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;
        tryToGetConstraint(): ConstraintComponent | undefined;
        tryToGetEffekseer(): EffekseerComponent | undefined;
        tryToGetLight(): LightComponent | undefined;
        tryToGetMesh(): MeshComponent | undefined;
        tryToGetMeshRenderer(): MeshRendererComponent | undefined;
        tryToGetPhysics(): PhysicsComponent | undefined;
        tryToGetRaymarching(): RaymarchingComponent | undefined;
        tryToGetSceneGraph(): SceneGraphComponent | undefined;
        tryToGetSkeletal(): SkeletalComponent | undefined;
        tryToGetTransform(): TransformComponent | undefined;
        tryToGetVrm(): VrmComponent | undefined;
        tryToSetTag(tag: Tag): boolean;
        tryToSetUniqueName(name: string, toAddNameIfConflict: boolean): boolean;
        validateTagString(val: string): boolean;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

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

    Unique identifier for the object

    uniqueName: string

    Unique name string for the object

    Accessors

    Methods

    • Internal

      Removes a component from this entity.

      Parameters

      • componentTID: number

        The component type identifier to remove

      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'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 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