Przeglądaj źródła

Add ITexture.setDirty

master
Palash Bansal 3 lat temu
rodzic
commit
4d0f127da2
No account linked to committer's email address
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3
    1
      src/core/ITexture.ts

+ 3
- 1
src/core/ITexture.ts Wyświetl plik

isCompressedTexture?: boolean isCompressedTexture?: boolean
is3DDataTexture?: boolean is3DDataTexture?: boolean


setDirty?(): void

} }


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

} }

Ładowanie…
Anuluj
Zapisz