Bläddra i källkod

Make tweakpane editor portable, default TweakpaneUiPlugin expanded true if not mobile/tablet.

master
Palash Bansal 1 år sedan
förälder
incheckning
171f0b8526
Inget konto är kopplat till bidragsgivarens mejladress

+ 1
- 1
plugins/tweakpane-editor/package.json Visa fil

@@ -30,7 +30,7 @@
"replace": {
"dependencies": {},
"peerDependencies": {
"threepipe": "^0.0.42",
"threepipe": "^0.0.43",
"@threepipe/plugin-tweakpane": "^0.5.4"
}
}

+ 2
- 2
plugins/tweakpane/package-lock.json Visa fil

@@ -1,12 +1,12 @@
{
"name": "@threepipe/plugin-tweakpane",
"version": "0.5.5",
"version": "0.5.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@threepipe/plugin-tweakpane",
"version": "0.5.5",
"version": "0.5.6",
"license": "Apache-2.0",
"dependencies": {
"threepipe": "file:./../../src/"

+ 1
- 1
plugins/tweakpane/package.json Visa fil

@@ -1,7 +1,7 @@
{
"name": "@threepipe/plugin-tweakpane",
"description": "Tweakpane UI Plugin for ThreePipe",
"version": "0.5.5",
"version": "0.5.6",
"devDependencies": {
"tweakpane-image-plugin": "https://github.com/repalash/tweakpane-image-plugin/releases/download/v1.1.404/package.tgz",
"uiconfig-tweakpane": "^0.0.10",

+ 9
- 3
plugins/tweakpane/src/TweakpaneUiPlugin.ts Visa fil

@@ -18,8 +18,14 @@ import {
UiObjectConfig,
uploadFile,
Vector2,
Vector3, Texture,
Vector4, UndoManagerPlugin, WebGLRenderTarget, WebGLCubeRenderTarget, WebGLMultipleRenderTargets,
Vector3,
Texture,
Vector4,
UndoManagerPlugin,
WebGLRenderTarget,
WebGLCubeRenderTarget,
WebGLMultipleRenderTargets,
mobileAndTabletCheck,
} from 'threepipe'
import styles from './tpTheme.css?inline'
import {tpImageInputGenerator} from './tpImageInputGenerator'
@@ -36,7 +42,7 @@ export class TweakpaneUiPlugin extends UiConfigRendererTweakpane implements IVie
@uiDropdown('Color Mode', ['black', 'white', 'blue'].map(label=>({label})))
colorMode: 'black'|'white'|'blue'

constructor(expanded = false, bigTheme = true, container?: HTMLElement, colorMode?: 'black'|'white'|'blue') {
constructor(expanded = !mobileAndTabletCheck(), bigTheme = true, container?: HTMLElement, colorMode?: 'black'|'white'|'blue') {
super(container ?? document.getElementById(TweakpaneUiPlugin.CONTAINER_SLOT) ?? document.getElementById('tweakpaneMainPanelSlot') ?? document.body, {
expanded, autoPostFrame: false,
}, false)

Laddar…
Avbryt
Spara