Class ModelConverter

A converter class from glTF2 model to Rhodonite Native data

Methods

  • Parameters

    • draco: any
    • decoder: any
    • dracoGeometry: any
    • triangleStripDrawMode: boolean

    Returns undefined | Uint32Array

  • Sets up the hierarchy relationships between entities based on glTF node structure

    Parameters

    • gltfModel: RnM2

      The glTF model data

    • rnEntities: ISceneGraphEntity[]

      Array of Rhodonite entities to organize in hierarchy

    Returns void

  • Parameters

    • textureJson: RnM2TextureInfo
    • rnMaterial: Material
    • textureTransformScaleShaderSemantic: string
    • textureTransformOffsetShaderSemantic: string
    • textureTransformRotationShaderSemantic: string

    Returns void

  • Sets sparse accessor data by applying sparse indices and values to the base accessor

    Parameters

    • accessor: RnM2Accessor

      The glTF accessor with sparse data

    • rnAccessor: Accessor

      The Rhodonite accessor to modify

    Returns void