rhodonite
    Preparing search index...

    Interface IEntity

    The Interface for an Entity.

    interface IEntity {
        _isAlive: boolean;
        _myLatestCopyEntityUID: number;
        entityUID: number;
        objectUID: number;
        uniqueName: string;
        get engine(): Engine;
        _copyFrom(rnObject: RnObject): void;
        _destroy(): void;
        _removeComponent(componentTID: number): void;
        _setComponent(componentType: typeof Component, com: Component): void;
        getComponent(componentType: typeof Component): Component | undefined;
        getComponentByComponentTID(componentTID: number): Component | undefined;
        getTagValue(tagName: string): any;
        hasComponent(componentType: typeof Component): boolean;
        matchTag(tagName: string, tagValue: string): boolean;
        matchTags(tags: RnTags): boolean;
        matchTagsAsFreeStrings(stringArray: string[]): boolean;
        tryToGetAnimation(): AnimationComponent | undefined;
        tryToGetAnimationState(): AnimationStateComponent | undefined;
        tryToGetBlendShape(): BlendShapeComponent | undefined;
        tryToGetCamera(): CameraComponent | undefined;
        tryToGetCameraController(): CameraControllerComponent | undefined;
        tryToGetCharacterController(): CharacterControllerComponent | undefined;
        tryToGetConstraint(): ConstraintComponent | undefined;
        tryToGetEffekseer(): EffekseerComponent | undefined;
        tryToGetLight(): LightComponent | undefined;
        tryToGetMesh(): MeshComponent | undefined;
        tryToGetMeshRenderer(): MeshRendererComponent | undefined;
        tryToGetPhysics(): PhysicsComponent | undefined;
        tryToGetRaymarching(): RaymarchingComponent | undefined;
        tryToGetSceneGraph(): SceneGraphComponent | undefined;
        tryToGetShape(): ShapeComponent | undefined;
        tryToGetSkeletal(): SkeletalComponent | undefined;
        tryToGetTransform(): TransformComponent | undefined;
        tryToGetTrigger(): TriggerComponent | undefined;
        tryToGetVrm(): VrmComponent | undefined;
        tryToSetTag(tag: Tag): boolean;
        tryToSetUniqueName(name: string, toAddNameIfConflict: boolean): boolean;
        validateTagString(val: string): boolean;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    _isAlive: boolean
    _myLatestCopyEntityUID: number
    entityUID: number
    objectUID: number

    Unique identifier for the object

    uniqueName: string

    Unique name string for the object

    • get engine(): Engine

      Returns Engine

    • Internal

      Copies properties from another RnObject instance

      Parameters

      • rnObject: RnObject

        The source object to copy from

      Returns void

    • Internal

      Destroys this entity and releases all associated resources.

      Returns void

    • Internal

      Removes a component from this entity.

      Parameters

      • componentTID: number

        The component type identifier to remove

      Returns void

    • Internal

      Sets a component on this entity.

      Parameters

      • componentType: typeof Component

        The constructor/class of the component

      • com: Component

        The component instance to set

      Returns void

    • Retrieves a component of the specified type from this entity.

      Parameters

      • componentType: typeof Component

        The constructor/class of the component to retrieve

      Returns Component | undefined

      The component instance if found, undefined otherwise

    • Retrieves a component by its unique component type identifier.

      Parameters

      • componentTID: number

        The component type identifier

      Returns Component | undefined

      The component instance if found, undefined otherwise

    • Retrieves the value of a specific tag

      Parameters

      • tagName: string

        The name of the tag to retrieve

      Returns any

      The tag value or undefined if not found

    • Checks whether this entity has a component of the specified type.

      Parameters

      • componentType: typeof Component

        The constructor/class of the component to check

      Returns boolean

      True if the entity has the component, false otherwise

    • Checks if an object matches a specific tag name and value

      Parameters

      • tagName: string

        The tag name to match

      • tagValue: string

        The tag value to match

      Returns boolean

      True if the tag matches, false otherwise

    • Checks if the object has all the specified tags with matching values

      Parameters

      • tags: RnTags

        The tags object to match against

      Returns boolean

      True if all tags match, false otherwise

    • Checks if the object's combined tag string contains all provided strings

      Parameters

      • stringArray: string[]

        Array of strings to search for in tags

      Returns boolean

      True if all strings are found, false otherwise

    • Attempts to retrieve the AnimationComponent from this entity.

      Returns AnimationComponent | undefined

      The AnimationComponent if present, undefined otherwise

    • Attempts to retrieve the AnimationStateComponent from this entity.

      Returns AnimationStateComponent | undefined

      The AnimationStateComponent if present, undefined otherwise

    • Attempts to retrieve the BlendShapeComponent from this entity.

      Returns BlendShapeComponent | undefined

      The BlendShapeComponent if present, undefined otherwise

    • Attempts to retrieve the CameraComponent from this entity.

      Returns CameraComponent | undefined

      The CameraComponent if present, undefined otherwise

    • Attempts to retrieve the CameraControllerComponent from this entity.

      Returns CameraControllerComponent | undefined

      The CameraControllerComponent if present, undefined otherwise

    • Attempts to retrieve the ConstraintComponent from this entity.

      Returns ConstraintComponent | undefined

      The ConstraintComponent if present, undefined otherwise

    • Attempts to retrieve the EffekseerComponent from this entity.

      Returns EffekseerComponent | undefined

      The EffekseerComponent if present, undefined otherwise

    • Attempts to retrieve the LightComponent from this entity.

      Returns LightComponent | undefined

      The LightComponent if present, undefined otherwise

    • Attempts to retrieve the MeshComponent from this entity.

      Returns MeshComponent | undefined

      The MeshComponent if present, undefined otherwise

    • Attempts to retrieve the MeshRendererComponent from this entity.

      Returns MeshRendererComponent | undefined

      The MeshRendererComponent if present, undefined otherwise

    • Attempts to retrieve the PhysicsComponent from this entity.

      Returns PhysicsComponent | undefined

      The PhysicsComponent if present, undefined otherwise

    • Attempts to retrieve the RaymarchingComponent from this entity.

      Returns RaymarchingComponent | undefined

      The RaymarchingComponent if present, undefined otherwise

    • Attempts to retrieve the SceneGraphComponent from this entity.

      Returns SceneGraphComponent | undefined

      The SceneGraphComponent if present, undefined otherwise

    • Attempts to retrieve the ShapeComponent from this entity.

      Returns ShapeComponent | undefined

    • Attempts to retrieve the SkeletalComponent from this entity.

      Returns SkeletalComponent | undefined

      The SkeletalComponent if present, undefined otherwise

    • Attempts to retrieve the TransformComponent from this entity.

      Returns TransformComponent | undefined

      The TransformComponent if present, undefined otherwise

    • Attempts to retrieve the TriggerComponent from this entity.

      Returns TriggerComponent | undefined

    • Attempts to retrieve the VrmComponent from this entity.

      Returns VrmComponent | undefined

      The VrmComponent if present, undefined otherwise

    • Attempts to set a tag on the object

      Parameters

      • tag: Tag

        The tag object containing name and value

      Returns boolean

      True if the tag was successfully set, false otherwise

    • Attempts to set a unique name for the object

      Parameters

      • name: string

        The desired unique name

      • toAddNameIfConflict: boolean

        Whether to modify the name if it conflicts with existing names

      Returns boolean

      True if the name was successfully set, false otherwise

    • Validates a tag string to ensure it contains only allowed characters

      Parameters

      • val: string

        The string to validate

      Returns boolean

      True if the string is valid, false otherwise