Home > server > ModelRegistry
Manages model data for all known models of the game.
Signature:
export default class ModelRegistry The ModelRegistry is created internally as a global singletone accessible with the static property ModelRegistry.instance.
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the ModelRegistry class.
import { ModelRegistry } from 'hytopia';
const modelRegistry = ModelRegistry.instance;
const boundingBox = modelRegistry.getBoundingBox('models/player.gltf');|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
The global ModelRegistry instance as a singleton. | ||
|
boolean |
Whether to use optimized models when they are loaded. | ||
|
boolean |
Whether to always run model optimization on server start. |
|
Method |
Modifiers |
Description |
|---|---|---|
|
Retrieves an array of all known animation names for a model. | ||
|
Retrieves the bounding box of a model. | ||
|
Retrieves the Y-axis height of a model for a scale of 1. | ||
|
Retrieves the names of all nodes in a model. | ||
|
Retrieves the trimesh of a model. | ||
|
Checks if a model has a node with the given name. |