hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
76 lines (36 loc) • 1.12 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [ModelRegistry](./server.modelregistry.md) > [getTrimesh](./server.modelregistry.gettrimesh.md)
## ModelRegistry.getTrimesh() method
Retrieves the trimesh of a model.
**Signature:**
```typescript
getTrimesh(modelUri: string, scale?: Vector3Like): ModelTrimesh | undefined;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
modelUri
</td><td>
string
</td><td>
The URI of the model to retrieve the trimesh for.
</td></tr>
<tr><td>
scale
</td><td>
[Vector3Like](./server.vector3like.md)
</td><td>
_(Optional)_ Optional scaling to apply to the trimesh. Defaults to 1 for all axes (no scaling).
</td></tr>
</tbody></table>
**Returns:**
[ModelTrimesh](./server.modeltrimesh.md) \| undefined
The trimesh of the model.
\*\*Requires:\*\* Model data must be loaded (server startup).
\*\*Category:\*\* Models