Sfoglia il codice sorgente

Fix uniform decorator setter.

master
Palash Bansal 2 anni fa
parent
commit
edcdd80b11
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3
    2
      src/three/utils/decorators.ts

+ 3
- 2
src/three/utils/decorators.ts Vedi File

return getUniform(this).value return getUniform(this).value
}, },
set(newVal: any) { set(newVal: any) {
let val = getUniform(this).value
const u = getUniform(this)
const val = u.value
if (val === newVal) return if (val === newVal) return
val = newVal
u.value = newVal
safeSetProperty(this, 'uniformsNeedUpdate', true, true) safeSetProperty(this, 'uniformsNeedUpdate', true, true)
onChange && callOnChange.call(this, onChange, [propertyKey, newVal]) onChange && callOnChange.call(this, onChange, [propertyKey, newVal])
}, },

Loading…
Annulla
Salva