소스 검색

Add ITexture.setDirty

master
Palash Bansal 3 년 전
부모
커밋
4d0f127da2
No account linked to committer's email address
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3
    1
      src/core/ITexture.ts

+ 3
- 1
src/core/ITexture.ts 파일 보기

@@ -17,12 +17,14 @@ export interface ITexture extends Texture {
isCompressedTexture?: boolean
is3DDataTexture?: boolean

setDirty?(): void

}

export function upgradeTexture(this: ITexture) {
this.assetType = 'texture'
if (!this.userData) this.userData = {}
if (!this.userData.__appliedMaterials) this.userData.__appliedMaterials = new Set()
if (!this.setDirty) this.setDirty = ()=>this.needsUpdate = true
// todo: uiconfig, dispose, etc

}

Loading…
취소
저장