webani - v1.0.0
    Preparing search index...

    Represents a collection of WebaniTransformable objects. A WebaniCollection allows grouping multiple transformable objects together and provides methods for manipulating, accessing, and animating these objects.

    Collections can be treated as single objects in an animation context but allow for complex transformations and behaviors by containing multiple objects.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    animationClass: typeof WebaniCollectionAnimation = WebaniCollectionAnimation

    The animation class used for animating collections.

    extraTransforms: WorldTransform[] = []

    An array of additional world transforms that modify the object.

    objectArray: T[]

    The parent transformable object, if any.

    scaleCompensation: boolean = false

    Flag indicating whether to apply scale compensation for the parent object.

    transform: WorldTransform = ...

    The world transform of the object, including position, rotation, and scale.

    useOriginAsCenter: boolean = false

    Flag indicating whether to use the origin as the center of rotation.

    Accessors

    • get extraTransformsMatrixWithoutScale(): Matrix4

      The combined matrix of all extra transforms without scale compensation.

      Returns Matrix4

      A Matrix4 object representing the combined matrix of all extra transforms.

    • get flatObjects(): T[]

      Recursively flattens the collection, including all nested collections, into a single array of objects.

      Returns T[]

      A flat list of all objects contained in the collection, including those in nested collections.

    • get shallowCopy(): this

      Creates a shallow copy of the collection, including a shallow copy of each contained object.

      Returns this

      A new instance of WebaniCollection with shallow copies of the objects.

    Methods