Fudge Aid
    Preparing search index...

    Class ComponentStateMachine<State>

    Core functionality of the state machine, holding solely the current state and, while in transition, the next state, the instructions for the machine and comfort methods to transit and act.

    Type Parameters

    • State

    Hierarchy

    • ComponentScript
      • ComponentStateMachine

    Implements

    Index

    Constructors

    Properties

    stateCurrent: State
    stateNext: State
    baseClass: typeof Component

    refers back to this class from any subclass e.g. in order to find compatible other resources

    iSubclass: number

    subclasses get a iSubclass number for identification

    subclasses: typeof Component[]

    list of all the subclasses derived from this class, if they registered properly

    Accessors

    • get isSingleton(): boolean

      Is true, when only one instance of the component class can be attached to a node

      Returns boolean

    • get node(): Node

      Retrieves the node, this component is currently attached to

      Returns Node

    • get type(): string

      Retrieves the type of this mutable subclass as the name of the runtime class

      Returns string

      The type of the mutable

    Methods

    • De- / Activate this component. Inactive components will not be processed by the renderer.

      Parameters

      • _on: boolean

      Returns void

    • See EventTarget.addEventListener for reference. Works with EventListenerUnified and EventUnified

      Parameters

      • _type: string
      • _handler: EventListenerUnified
      • Optional_options: boolean | AddEventListenerOptions

      Returns void

    • Updates the property values of the instance according to the state of the animation mutator. Override to implement custom animation behavior.

      Parameters

      • _mutator: AnimationMutator

      Returns void

    • Tries to attach the component to the given node, removing it from the node it was attached to if applicable

      Parameters

      • _container: Node

      Returns void

    • Parameters

      • _serialization: Serialization

      Returns Promise<Serializable>

    • See EventTarget.dispatchEvent for reference. Works with with EventUnified

      Parameters

      • _event: EventUnified

      Returns boolean

    • Override this to draw visual aids for this component inside the editors render view. Use Gizmos inside the override to draw stuff.

      Parameters

      • Optional_cmpCamera: ComponentCamera

      Returns void

    • See drawGizmos. Only displayed while the corresponding node is selected.

      Parameters

      • Optional_cmpCamera: ComponentCamera

      Returns void

    • Retrieves the specified Metadata.attributeTypes | attribute types from the Metadata | metadata of this instance's class.

      Returns MetaAttributeTypes

    • Retrieves the Metadata | metadata of this instance's class.

      Returns Metadata

    • Collect applicable attributes of the instance and copies of their values in a Mutator-object. By default, a mutator cannot be extended, since extensions are not available in the object the mutator belongs to. A mutator may be reduced by the descendants of Mutable to contain only the properties needed.

      Parameters

      • Optional_extendable: boolean

      Returns Mutator

    • Returns an associative array with the same attributes as the given mutator, but with the corresponding types as string-values. Does not recurse into objects! This will return the decorated Metadata meta-type instead of the runtime-type of the object, if available.

      Parameters

      • _mutator: Mutator

      Returns MutatorAttributeTypes

    • Collect the attributes of the instance and their values applicable for animation. Basic functionality is identical to getMutator, returned mutator should then be reduced by the subclassed instance

      Parameters

      • Optional_extendable: boolean

      Returns MutatorForAnimation

    • Collect the attributes of the instance and their values applicable for the user interface. Basic functionality is identical to getMutator, returned mutator should then be reduced by the subclassed instance

      Parameters

      • Optional_extendable: boolean

      Returns MutatorForUserInterface

    • Updates the attribute values of the instance according to the state of the mutator. The mutation may be restricted to a subset of the mutator and the event dispatching suppressed. Uses mutateBase, but can be overwritten in subclasses

      Parameters

      • _mutator: Mutator
      • Optional_selection: string[]
      • Optional_dispatchMutate: boolean

      Returns void | Promise<void>

    • See EventTarget.removeEventListener for reference. Works with EventListenerUnified and EventUnified

      Parameters

      • _type: string
      • _handler: EventListenerUnified
      • Optional_options: boolean | AddEventListenerOptions

      Returns void

    • Updates the values of the given mutator according to the current state of the instance

      Parameters

      • _mutator: Mutator

      Returns void

    • Decorator allows to attach Mutable functionality to existing classes.

      Parameters

      • _mutator: Mutator
      • _path: string[]

      Returns Mutator