Palash Bansal 3 лет назад
Родитель
Сommit
4d0f127da2
Аккаунт пользователя с таким Email не найден
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

}

Загрузка…
Отмена
Сохранить