webani - v1.0.0
    Preparing search index...

    The base class for all renderable objects in Webani. This class handles geometry resolution, skinning transformations, and materials for an object.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Optional animation class used for interpolated animations.

    Type declaration

    extraTransforms: WorldTransform[] = []

    An array of additional world transforms that modify the object.

    material: WebaniMaterial

    The material applied to this object.

    The parent transformable object, if any.

    performSkinningTransformation: boolean = false

    A flag indicating whether skinning transformations should be applied.

    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 shallowCopy(): this

      Creates a shallow copy of the object, including a shallow copy of its material.

      Returns this

      A new instance of WebaniPrimitiveObject with the same properties as the current object.

    Methods

    • Fills the arrays required for the object's geometry (triangulation, normals, UVs, joint weights, etc.). This method ensures that the arrays are allocated with the correct size.

      Parameters

      • vertexCount: number = 0

        The number of vertices in the object.

      • jointCount: number = 0

        The number of joints for skinning.

      Returns void

    • Abstract method that subclasses must implement to resolve the geometry of the object. This method is responsible for setting up the triangulation and other geometry-related properties.

      Returns void