Преглед на файлове

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

master
Palash Bansal преди 2 години
родител
ревизия
3a9c6f1300
No account linked to committer's email address
променени са 4 файла, в които са добавени 14 реда и са изтрити 5 реда
  1. 2
    2
      plugins/tweakpane/package-lock.json
  2. 1
    1
      plugins/tweakpane/package.json
  3. 7
    2
      plugins/tweakpane/src/tpImageInputGenerator.ts
  4. 4
    0
      plugins/tweakpane/src/tpTheme.css

+ 2
- 2
plugins/tweakpane/package-lock.json Целия файл

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

+ 1
- 1
plugins/tweakpane/package.json Целия файл

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

+ 7
- 2
plugins/tweakpane/src/tpImageInputGenerator.ts Целия файл

} else { } else {
v1.needsUpdate = true 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 config.__proxy.value_ = v1
renderer.methods.setValue(config, v1, {last: true}, false) renderer.methods.setValue(config, v1, {last: true}, false)
get: () => { get: () => {
config.__proxy.value_ = renderer.methods.getValue(config) config.__proxy.value_ = renderer.methods.getValue(config)
const ret = proxyGetValue(config.__proxy.value_, viewer) 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 return ret
}, },
set: (v: any) => { set: (v: any) => {

+ 4
- 0
plugins/tweakpane/src/tpTheme.css Целия файл

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


:root { :root {

Loading…
Отказ
Запис