跳到主要内容

append 添加基础纹理到管理器中

append

类型: MethodDeclaration

所属类: TextureManager

定义位置: webgl.ts

描述

添加基础纹理到管理器中

参数 texture: 基础纹理

参数

参数名类型描述默认值
textureBaseTexture--

返回值

类型: void

源代码

位置: 第 2369 行

public append(texture: BaseTexture): void {
if (texture.index === -1) {
// 给纹理分配一个未使用的索引
let i = this.pointer
const map = this.map
while (map[i] !== undefined) {i++}
map[i] = texture
texture.index = i
this.pointer = i + 1
this.count++
}
}

文档生成时间:2025/7/7 12:07:07