Kaynağa Gözat

Fix image id empty string in tweakpane image input generator, fix pointer events behind the tweakpane container

master
Palash Bansal 2 yıl önce
ebeveyn
işleme
3a9c6f1300
No account linked to committer's email address

+ 2
- 2
plugins/tweakpane/package-lock.json Dosyayı Görüntüle

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

+ 1
- 1
plugins/tweakpane/package.json Dosyayı Görüntüle

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

+ 7
- 2
plugins/tweakpane/src/tpImageInputGenerator.ts Dosyayı Görüntüle

@@ -108,7 +108,10 @@ const setterTex = (v1: any, config: UiObjectConfig, renderer: TweakpaneUiPlugin)
} else {
v1.needsUpdate = true
}
if (!staticData.textureMap[v1.image?.id]) staticData.textureMap[v1.image?.id] = v1
if (v1.image) {
if (!v1.image.id?.length) v1.image.id = generateUUID()
if (!staticData.textureMap[v1.image.id]) staticData.textureMap[v1.image.id] = v1
}
}
config.__proxy.value_ = v1
renderer.methods.setValue(config, v1, {last: true}, false)
@@ -294,7 +297,9 @@ export const tpImageInputGenerator = (viewer: ThreeViewer) => (parent: any /* Fo
get: () => {
config.__proxy.value_ = renderer.methods.getValue(config)
const ret = proxyGetValue(config.__proxy.value_, viewer)
if (!staticData.textureMap[ret.id ?? ret]) staticData.textureMap[ret.id ?? ret] = config.__proxy.value_
if (typeof ret !== 'string' && !ret.id?.length) ret.id = generateUUID()
const id = typeof ret === 'string' ? ret : ret.id ?? ret
if (!staticData.textureMap[id]) staticData.textureMap[id] = config.__proxy.value_
return ret
},
set: (v: any) => {

+ 4
- 0
plugins/tweakpane/src/tpTheme.css Dosyayı Görüntüle

@@ -2,6 +2,10 @@
/*padding-right: 0.25rem;*/
height: calc(100% - 6rem);
max-height: calc(100% - 6rem);
pointer-events: none;
}
#tweakpaneUiContainer > div{
pointer-events: auto;
}

:root {

Loading…
İptal
Kaydet