API/loader/GLTFResource/

GLTFResource

Product after GLTF parser, usually, `defaultSceneRoot` is only needed to use.

Hierarchy: EngineObject

constructor 

new GLTFResource(engine: Engine)

Parameters

  • engine

animations 

animations: []

Oasis AnimationClip after AnimationParser.

buffers 

buffers: []

ArrayBuffer after BufferParser.

cameras 

cameras: []

Oasis Camera after SceneParser.

defaultSceneRoot 

defaultSceneRoot: Entity

Oasis RootEntity after SceneParser.

entities 

entities: []

Oasis Entity after EntityParser.

gltf 

gltf: IGLTF

GLTF file content.

instanceId ReadOnly

instanceId: number

Engine unique id.

lights 

lights: []

GLTF can export lights in extension KHR_lights_punctual

materials 

materials: []

Oasis Material after MaterialParser.

meshes 

meshes: []

Oasis BufferMesh after MeshParser.

sceneRoots 

sceneRoots: []

Oasis RootEntities after SceneParser.

skins 

skins: []

Oasis Skin after SkinParser.

textures 

textures: []

Oasis Texture2D after TextureParser.

url 

url: string

GLTF file url.

variants 

variants: []

Renderer can replace material by `renderer.setMaterial` if gltf use plugin-in KHR_materials_variants.

engine 

get engine(): Engine

Get the engine which the object belongs.