UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

518 lines (228 loc) 7.2 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [EntityModelNodeOverride](./server.entitymodelnodeoverride.md) ## EntityModelNodeOverride class Represents a name-match model node override rule for an Entity. When to use: configuring visual and transform overrides for one or more model nodes selected by name match. **Signature:** ```typescript export default class EntityModelNodeOverride implements protocol.Serializable ``` **Implements:** protocol.Serializable ## Remarks Node overrides are match-rule based and may target multiple nodes. Matching is case-insensitive. Exact match is used by default; wildcard matching is only enabled when `*` is used at the start and/or end of `nameMatch` (`head*`<!-- -->, `*head`<!-- -->, `*head*`<!-- -->). Supported override settings include emissive color/intensity, hidden state, and local position/rotation/scale. \*\*Category:\*\* Entities ## Constructors <table><thead><tr><th> Constructor </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [(constructor)(options)](./server.entitymodelnodeoverride._constructor_.md) </td><td> </td><td> Creates a new EntityModelNodeOverride instance. </td></tr> </tbody></table> ## Properties <table><thead><tr><th> Property </th><th> Modifiers </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> [emissiveColor](./server.entitymodelnodeoverride.emissivecolor.md) </td><td> `readonly` </td><td> [RgbColor](./server.rgbcolor.md) \| undefined </td><td> The emissive color for matching nodes. \*\*Category:\*\* Entities </td></tr> <tr><td> [emissiveIntensity](./server.entitymodelnodeoverride.emissiveintensity.md) </td><td> `readonly` </td><td> number \| undefined </td><td> The emissive intensity for matching nodes. \*\*Category:\*\* Entities </td></tr> <tr><td> [entity](./server.entitymodelnodeoverride.entity.md) </td><td> `readonly` </td><td> [Entity](./server.entity.md) </td><td> The entity that the model node override belongs to. \*\*Category:\*\* Entities </td></tr> <tr><td> [isHidden](./server.entitymodelnodeoverride.ishidden.md) </td><td> `readonly` </td><td> boolean </td><td> Whether the matched node(s) are hidden. \*\*Category:\*\* Entities </td></tr> <tr><td> [localPosition](./server.entitymodelnodeoverride.localposition.md) </td><td> `readonly` </td><td> [Vector3Like](./server.vector3like.md) \| undefined </td><td> The local position set for matching nodes. \*\*Category:\*\* Entities </td></tr> <tr><td> [localPositionInterpolationMs](./server.entitymodelnodeoverride.localpositioninterpolationms.md) </td><td> `readonly` </td><td> number \| undefined </td><td> The interpolation time in milliseconds applied to local position changes. \*\*Category:\*\* Entities </td></tr> <tr><td> [localRotation](./server.entitymodelnodeoverride.localrotation.md) </td><td> `readonly` </td><td> [QuaternionLike](./server.quaternionlike.md) \| undefined </td><td> The local rotation set for matching nodes. \*\*Category:\*\* Entities </td></tr> <tr><td> [localRotationInterpolationMs](./server.entitymodelnodeoverride.localrotationinterpolationms.md) </td><td> `readonly` </td><td> number \| undefined </td><td> The interpolation time in milliseconds applied to local rotation changes. \*\*Category:\*\* Entities </td></tr> <tr><td> [localScale](./server.entitymodelnodeoverride.localscale.md) </td><td> `readonly` </td><td> [Vector3Like](./server.vector3like.md) \| undefined </td><td> The local scale set for matching nodes. \*\*Category:\*\* Entities </td></tr> <tr><td> [localScaleInterpolationMs](./server.entitymodelnodeoverride.localscaleinterpolationms.md) </td><td> `readonly` </td><td> number \| undefined </td><td> The interpolation time in milliseconds applied to local scale changes. \*\*Category:\*\* Entities </td></tr> <tr><td> [name](./server.entitymodelnodeoverride.name.md) </td><td> `readonly` </td><td> string </td><td> Alias used by networking serializer and protocol schema (`n`<!-- -->). \*\*Category:\*\* Entities </td></tr> <tr><td> [nameMatch](./server.entitymodelnodeoverride.namematch.md) </td><td> `readonly` </td><td> string </td><td> The node name match selector for this override. Exact match by default, with optional edge wildcard (`head*`<!-- -->, `*head`<!-- -->, `*head*`<!-- -->). \*\*Category:\*\* Entities </td></tr> </tbody></table> ## Methods <table><thead><tr><th> Method </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [remove()](./server.entitymodelnodeoverride.remove.md) </td><td> </td><td> Removes this model node override from its parent entity. </td></tr> <tr><td> [setEmissiveColor(emissiveColor)](./server.entitymodelnodeoverride.setemissivecolor.md) </td><td> </td><td> Sets the emissive color for matching nodes. </td></tr> <tr><td> [setEmissiveIntensity(emissiveIntensity)](./server.entitymodelnodeoverride.setemissiveintensity.md) </td><td> </td><td> Sets the emissive intensity for matching nodes. </td></tr> <tr><td> [setHidden(hidden)](./server.entitymodelnodeoverride.sethidden.md) </td><td> </td><td> Sets the hidden state for matching nodes. </td></tr> <tr><td> [setLocalPosition(localPosition)](./server.entitymodelnodeoverride.setlocalposition.md) </td><td> </td><td> Sets the local position for matching nodes. </td></tr> <tr><td> [setLocalPositionInterpolationMs(interpolationMs)](./server.entitymodelnodeoverride.setlocalpositioninterpolationms.md) </td><td> </td><td> Sets the interpolation time in milliseconds applied to local position changes. </td></tr> <tr><td> [setLocalRotation(localRotation)](./server.entitymodelnodeoverride.setlocalrotation.md) </td><td> </td><td> Sets the local rotation for matching nodes. </td></tr> <tr><td> [setLocalRotationInterpolationMs(interpolationMs)](./server.entitymodelnodeoverride.setlocalrotationinterpolationms.md) </td><td> </td><td> Sets the interpolation time in milliseconds applied to local rotation changes. </td></tr> <tr><td> [setLocalScale(localScale)](./server.entitymodelnodeoverride.setlocalscale.md) </td><td> </td><td> Sets the local scale for matching nodes. </td></tr> <tr><td> [setLocalScaleInterpolationMs(interpolationMs)](./server.entitymodelnodeoverride.setlocalscaleinterpolationms.md) </td><td> </td><td> Sets the interpolation time in milliseconds applied to local scale changes. </td></tr> </tbody></table>