浏览代码

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

}

正在加载...
取消
保存