Skip to content

格式

typescript
Mesh.indexFormat

所属类: Mesh

描述

网格索引缓冲区数据的格式。

索引缓冲区可以是 16 位或 32 位,详细介绍见IndexFormat。索引的作用是确定网格的三角面,通过索引指定顶点的顺序,从而构成三角面的顶点连接。通过使用索引,可以减少存储和渲染大型网格所需的内存。

参数

参数名类型描述

返回值

类型描述
IndexFormat索引缓冲区数据格式

代码示例

typescript
let mesh = Resources.Load<Mesh>(Mesh, "meshId");
mesh.indexFormat;