webani - v1.0.0
    Preparing search index...

    A 3D mesh object with support for animations, geometry, and skinning transformations.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    animationClass: typeof WebaniMeshAnimation = WebaniMeshAnimation

    Optional animation class used for interpolated animations.

    animations: { [key: string]: AnimationSet }

    The animations associated with the mesh.

    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 inverseBindMatrices(): Float32Array

      Gets the inverse bind matrices for skinning.

      Returns Float32Array

      The inverse bind matrices as a Float32Array.

    • get shallowCopy(): this

      Creates a shallow copy of the mesh, including the joints.

      Returns this

      A shallow copy of the current WebaniMesh 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

    • Updates the joint matrices, including the inverse bind matrices and joint object matrices.

      Parameters

      • inverseBindMatrices: boolean = true

        Whether to update the inverse bind matrices (default is true).

      • jointObjectMatrices: boolean = true

        Whether to update the joint object matrices (default is true).

      Returns void

    • Updates the vertex data, including triangle positions, normals, UVs, joint indices, and weights.

      Parameters

      • normals: boolean = true

        Whether to update the vertex normals (default is true).

      • trianglePositions: boolean = true

        Whether to update the triangle positions (default is true).

      • uvs: boolean = true

        Whether to update the vertex UVs (default is true).

      • jointIndices: boolean = true

        Whether to update the vertex joint indices (default is true).

      • weights: boolean = true

        Whether to update the vertex weights (default is true).

      Returns void