docsby gkjohnson
On this page

Methods

new StructuralMetadata(
	// The root `EXT_structural_metadata` extension object.
	definition: Object,

	// Loaded GLTF textures referenced by property textures.
	textures: Array<Texture>,

	// Loaded GLTF buffer views referenced by property tables.
	buffers: Array<ArrayBuffer>,

	// Per-primitive metadata indices (property texture / attribute refs).
	nodeMetadata: Object | null = null,

	// The three.js object associated with `nodeMetadata`.
	object: Object3D | null = null
)
getPropertyTableData(
	// Table index or array of table indices.
	tableIndices: number | Array<number>,

	// Row ID or array of row IDs.
	ids: number | Array<number>,

	// Optional target object or array to write into.
	target: Object | Array | null = null
): Object | Array
getPropertyTableInfo(
	tableIndices: Array<number> | null = null
): Array<{name: string, className: string}> | Object
getPropertyTextureData(
	// Triangle index from a raycast hit.
	triangle: number,

	// Barycentric coordinate of the hit point.
	barycoord: Vector3,

	// Optional target array to write into.
	target: Array = []
): Array
async getPropertyTextureDataAsync(
	// Triangle index from a raycast hit.
	triangle: number,

	// Barycentric coordinate of the hit point.
	barycoord: Vector3,

	// Optional target array to write into.
	target: Array = []
): Array
getPropertyTextureInfo(): Array<{name: string, className: string, properties: Object}>
getPropertyAttributeData(
	// Vertex index.
	attributeIndex: number,

	// Optional target array to write into.
	target: Array = []
): Array
getPropertyAttributeInfo(): Array<{name: string, className: string}>
dispose(): void