ソースを参照

Add ITexture.setDirty

master
Palash Bansal 3年前
コミット
4d0f127da2
コミッターのメールアドレスに関連付けられたアカウントが存在しません
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

}

読み込み中…
キャンセル
保存