Quellcode durchsuchen

Add ITexture.setDirty

master
Palash Bansal vor 3 Jahren
Ursprung
Commit
4d0f127da2
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. 3
    1
      src/core/ITexture.ts

+ 3
- 1
src/core/ITexture.ts Datei anzeigen

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

}

Laden…
Abbrechen
Speichern