| @@ -1,20 +1,20 @@ | |||
| { | |||
| "name": "@threepipe/plugin-tweakpane-editor", | |||
| "version": "0.1.5", | |||
| "version": "0.1.6", | |||
| "lockfileVersion": 2, | |||
| "requires": true, | |||
| "packages": { | |||
| "": { | |||
| "name": "@threepipe/plugin-tweakpane-editor", | |||
| "version": "0.1.5", | |||
| "version": "0.1.6", | |||
| "license": "Apache-2.0", | |||
| "dependencies": { | |||
| "@threepipe/plugin-tweakpane": "file:./../tweakpane/src/", | |||
| "threepipe": "file:./../../src/", | |||
| "treejs": "git://github.com/repalash/treejs.git#d303016bb74e75725d13e97291ac1d4727985918" | |||
| "threepipe": "file:./../../src/" | |||
| }, | |||
| "devDependencies": { | |||
| "tippy.js": "^6.3.7" | |||
| "tippy.js": "^6.3.7", | |||
| "treejs": "git://github.com/repalash/treejs.git#d303016bb74e75725d13e97291ac1d4727985918" | |||
| } | |||
| }, | |||
| "../../src": {}, | |||
| @@ -51,6 +51,7 @@ | |||
| "version": "2.0.0", | |||
| "resolved": "git+ssh://git@github.com/repalash/treejs.git#d303016bb74e75725d13e97291ac1d4727985918", | |||
| "integrity": "sha512-HqK9Ow4VF50w9tFiRNe8jJ89Tpjkgwxot2h7r6sd+G+Xnq+IgtW5ml9Aq5CjBw1wYesq3sfxO5ZVQhfA0WV8ww==", | |||
| "dev": true, | |||
| "license": "MIT" | |||
| } | |||
| }, | |||
| @@ -79,6 +80,7 @@ | |||
| "treejs": { | |||
| "version": "git+ssh://git@github.com/repalash/treejs.git#d303016bb74e75725d13e97291ac1d4727985918", | |||
| "integrity": "sha512-HqK9Ow4VF50w9tFiRNe8jJ89Tpjkgwxot2h7r6sd+G+Xnq+IgtW5ml9Aq5CjBw1wYesq3sfxO5ZVQhfA0WV8ww==", | |||
| "dev": true, | |||
| "from": "treejs@git://github.com/repalash/treejs.git#d303016bb74e75725d13e97291ac1d4727985918" | |||
| } | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| { | |||
| "name": "@threepipe/plugin-tweakpane-editor", | |||
| "description": "Tweakpane Editor Plugin for ThreePipe", | |||
| "version": "0.1.5", | |||
| "version": "0.1.6", | |||
| "devDependencies": { | |||
| "tippy.js": "^6.3.7" | |||
| "tippy.js": "^6.3.7", | |||
| "treejs": "git://github.com/repalash/treejs.git#d303016bb74e75725d13e97291ac1d4727985918" | |||
| }, | |||
| "dependencies": { | |||
| "threepipe": "file:./../../src/", | |||
| "@threepipe/plugin-tweakpane": "file:./../tweakpane/src/", | |||
| "treejs": "git://github.com/repalash/treejs.git#d303016bb74e75725d13e97291ac1d4727985918" | |||
| "@threepipe/plugin-tweakpane": "file:./../tweakpane/src/" | |||
| }, | |||
| "clean-package": { | |||
| "remove": [ | |||
| @@ -121,6 +121,7 @@ | |||
| position: relative; | |||
| width: auto; | |||
| height: 1.2rem; | |||
| aspect-ratio: 1; | |||
| } | |||
| .mode-buttons-container{ | |||
| @@ -28,6 +28,10 @@ declare module '*.css' { | |||
| const content: string | |||
| export default content | |||
| } | |||
| declare module '*.css?inline' { | |||
| const content: string | |||
| export default content | |||
| } | |||
| // export {} | |||
| @@ -1,12 +1,12 @@ | |||
| { | |||
| "name": "@threepipe/plugin-tweakpane", | |||
| "version": "0.1.5", | |||
| "version": "0.1.6", | |||
| "lockfileVersion": 2, | |||
| "requires": true, | |||
| "packages": { | |||
| "": { | |||
| "name": "@threepipe/plugin-tweakpane", | |||
| "version": "0.1.5", | |||
| "version": "0.1.6", | |||
| "license": "Apache-2.0", | |||
| "dependencies": { | |||
| "threepipe": "file:./../../src/" | |||
| @@ -1,7 +1,7 @@ | |||
| { | |||
| "name": "@threepipe/plugin-tweakpane", | |||
| "description": "Tweakpane UI Plugin for ThreePipe", | |||
| "version": "0.1.5", | |||
| "version": "0.1.6", | |||
| "devDependencies": { | |||
| "tweakpane-image-plugin": "https://github.com/repalash/tweakpane-image-plugin/releases/download/v1.1.404/package.tgz", | |||
| "uiconfig-tweakpane": "^0.0.8" | |||
| @@ -59,7 +59,7 @@ export class TweakpaneUiPlugin extends UiConfigRendererTweakpane implements IVie | |||
| plugins.forEach(plugin => this.setupPluginUi(plugin)) | |||
| } | |||
| setupPluginUi<T extends IViewerPlugin>(plugin: T|Class<T>): UiObjectConfig | undefined { | |||
| setupPluginUi<T extends IViewerPlugin>(plugin: T|Class<T>, params?: Partial<UiObjectConfig>): UiObjectConfig | undefined { | |||
| const p = (<Class<IViewerPlugin>>plugin).prototype ? this._viewer?.getPlugin<T>(<Class<T>>plugin) : <T>plugin | |||
| if (!p) { | |||
| console.warn('plugin not found:', plugin) | |||
| @@ -68,7 +68,7 @@ export class TweakpaneUiPlugin extends UiConfigRendererTweakpane implements IVie | |||
| this._plugins.push(p) | |||
| if (p.uiConfig && p.uiConfig.hidden === undefined) p.uiConfig.hidden = false // todo; this is a hack for now | |||
| const ui = p.uiConfig | |||
| this.appendChild(ui) | |||
| this.appendChild(ui, params) | |||
| this._setupPluginSerializationContext(ui, p) | |||
| return ui | |||
| } | |||
| @@ -28,6 +28,10 @@ declare module '*.css' { | |||
| const content: string | |||
| export default content | |||
| } | |||
| declare module '*.css?inline' { | |||
| const content: string | |||
| export default content | |||
| } | |||
| // export {} | |||