rhodonite
    Preparing search index...

    Class ModelConverter

    A converter class from glTF2 model to Rhodonite Native data

    Index
    • Parameters

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

      Returns Uint32Array<ArrayBufferLike> | undefined

    • Parameters

      Returns number

    • Parameters

      • engine: Engine
      • image: RnM2Image
      • gltfModel: RnM2
      • __namedParameters: { autoDetectTransparency?: boolean } = {}

      Returns Promise<Texture>

    • Returns boolean

    • Parameters

      Returns Float32Array

    • Internal

      Sets up animation data from glTF animations

      Parameters

      Returns void

    • 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

    • Sets up skeletal animation and joint hierarchies from glTF skin data

      Parameters

      Returns void

    • Parameters

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

      Returns void

    • Sets up transform properties for entities from glTF node data

      Parameters

      • gltfModel: RnM2

        The glTF model data

      • groups: ISceneGraphEntity[]

        Array of scene graph entities to apply transforms to

      Returns void

    • Converts a glTF model to Rhodonite objects asynchronously (with full texture loading)

      Parameters

      • engine: Engine
      • gltfModel: RnM2

        The glTF model data to convert

      Returns Promise<ISceneGraphEntity>

      Promise resolving to the root group entity containing the converted scene

    • Converts a glTF model to Rhodonite objects synchronously (without texture loading)

      Parameters

      • engine: Engine
      • gltfModel: RnM2

        The glTF model data to convert

      Returns ISceneGraphEntity

      The root group entity containing the converted scene

    • 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