Преглед изворни кода

add params to TweakpaneUiPlugin.setupPluginUi similar to appendChild. Fix util-button in tweakpane editor in safari, move treejs to devDependencies

master
Palash Bansal пре 2 година
родитељ
комит
973571833b
No account linked to committer's email address

+ 7
- 5
plugins/tweakpane-editor/package-lock.json Прегледај датотеку

@@ -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"
}
}

+ 4
- 4
plugins/tweakpane-editor/package.json Прегледај датотеку

@@ -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": [

+ 1
- 0
plugins/tweakpane-editor/src/TweakpaneEditorPlugin.css Прегледај датотеку

@@ -121,6 +121,7 @@
position: relative;
width: auto;
height: 1.2rem;
aspect-ratio: 1;
}

.mode-buttons-container{

+ 4
- 0
plugins/tweakpane-editor/src/global.d.ts Прегледај датотеку

@@ -28,6 +28,10 @@ declare module '*.css' {
const content: string
export default content
}
declare module '*.css?inline' {
const content: string
export default content
}

// export {}


+ 2
- 2
plugins/tweakpane/package-lock.json Прегледај датотеку

@@ -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
- 1
plugins/tweakpane/package.json Прегледај датотеку

@@ -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"

+ 2
- 2
plugins/tweakpane/src/TweakpaneUiPlugin.ts Прегледај датотеку

@@ -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
}

+ 4
- 0
plugins/tweakpane/src/global.d.ts Прегледај датотеку

@@ -28,6 +28,10 @@ declare module '*.css' {
const content: string
export default content
}
declare module '*.css?inline' {
const content: string
export default content
}

// export {}


Loading…
Откажи
Сачувај