소스 검색

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 파일 보기

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…
취소
저장