hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
60 lines (29 loc) • 1.14 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [BlockTextureRegistry](./server.blocktextureregistry.md) > [getBlockTextureMetadata](./server.blocktextureregistry.getblocktexturemetadata.md)
## BlockTextureRegistry.getBlockTextureMetadata() method
Retrieves metadata for a block texture. Returns array for cubemaps (6 faces) or standard textures (1 face).
**Signature:**
```typescript
getBlockTextureMetadata(textureUri: string): BlockTextureMetadata[] | undefined;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
textureUri
</td><td>
string
</td><td>
The URI of the texture (e.g., 'blocks/stone.png' or 'blocks/grass').
</td></tr>
</tbody></table>
**Returns:**
[BlockTextureMetadata](./server.blocktexturemetadata.md)<!-- -->\[\] \| undefined
Array of texture metadata, or undefined if not found.
\*\*Requires:\*\* Atlas must be preloaded (server startup).
\*\*Category:\*\* Textures