layoutIndex
TypeScriptget layoutIndex(): Promise<number>Swift declarationvar layoutIndex: IntThe index of the layout that contains this attribute. The index refers to an entry in ``LowLevelMesh/Descriptor-swift.struct/vertexLayouts``.
struct · iOS 18.0+ · SDK 27.1
struct AttributeAn object that determines how to store vertex attribute data in memory and map it to RealityKit shader attributes.
get layoutIndex(): Promise<number>Swift declarationvar layoutIndex: IntThe index of the layout that contains this attribute. The index refers to an entry in ``LowLevelMesh/Descriptor-swift.struct/vertexLayouts``.
setLayoutIndex(value: number): Promise<void>Swift declarationvar layoutIndex: IntThe index of the layout that contains this attribute. The index refers to an entry in ``LowLevelMesh/Descriptor-swift.struct/vertexLayouts``.
get format(): Promise<_Metal_MTLVertexFormat>Swift declarationvar format: MTLVertexFormatThe format of the vertex attribute. When reading from a geometry modifier or surface shader, the value converts to its runtime representation using Metal's standard rules. For details about Metal's standard rules, see <doc://com.apple.documentation/documentation/metal/mtlvertexattributedescriptor/1516081-format>.
setFormat(value: _Metal_MTLVertexFormat): Promise<void>Swift declarationvar format: MTLVertexFormatThe format of the vertex attribute. When reading from a geometry modifier or surface shader, the value converts to its runtime representation using Metal's standard rules. For details about Metal's standard rules, see <doc://com.apple.documentation/documentation/metal/mtlvertexattributedescriptor/1516081-format>.
get offset(): Promise<number>Swift declarationvar offset: IntThe location of an attribute in vertex data, determined by the byte offset from the start of the vertex data.
setOffset(value: number): Promise<void>Swift declarationvar offset: IntThe location of an attribute in vertex data, determined by the byte offset from the start of the vertex data.
static init(semantic: LowLevelMesh_VertexSemantic, format: _Metal_MTLVertexFormat, layoutIndex: number, offset: number): Promise<LowLevelMesh_Attribute>Swift declarationinit(semantic: LowLevelMesh.VertexSemantic, format: MTLVertexFormat, layoutIndex: Int = 0, offset: Int)Creates an attribute for a low-level mesh.
get semantic(): Promise<LowLevelMesh_VertexSemantic>Swift declarationvar semantic: LowLevelMesh.VertexSemanticThe semantic of the vertex attribute, which describes how you want RealityKit to interpret the attribute. RealityKit consults the vertex semantic when interpreting the data in your ``LowLevelMesh``. For example, an attribute with the semantic value of ``LowLevelMesh/VertexSemantic/position`` uses to determine the position of a vertex.
setSemantic(value: LowLevelMesh_VertexSemantic): Promise<void>Swift declarationvar semantic: LowLevelMesh.VertexSemanticThe semantic of the vertex attribute, which describes how you want RealityKit to interpret the attribute. RealityKit consults the vertex semantic when interpreting the data in your ``LowLevelMesh``. For example, an attribute with the semantic value of ``LowLevelMesh/VertexSemantic/position`` uses to determine the position of a vertex.
No declarations were skipped in this snapshot.