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

Fix uniform decorator setter.

master
Palash Bansal пре 2 година
родитељ
комит
edcdd80b11
No account linked to committer's email address
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3
    2
      src/three/utils/decorators.ts

+ 3
- 2
src/three/utils/decorators.ts Прегледај датотеку

@@ -29,9 +29,10 @@ export function uniform({uniforms, propKey, thisTarget = false, onChange}: {unif
return getUniform(this).value
},
set(newVal: any) {
let val = getUniform(this).value
const u = getUniform(this)
const val = u.value
if (val === newVal) return
val = newVal
u.value = newVal
safeSetProperty(this, 'uniformsNeedUpdate', true, true)
onChange && callOnChange.call(this, onChange, [propertyKey, newVal])
},

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