Procházet zdrojové kódy

Add ITexture.setDirty

master
Palash Bansal před 3 roky
rodič
revize
4d0f127da2
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3
    1
      src/core/ITexture.ts

+ 3
- 1
src/core/ITexture.ts Zobrazit soubor

@@ -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

}

Načítá se…
Zrušit
Uložit