Skip to main content

src

Typestring | string[] | null
Defaultnull

Source URL to fetch 3D model. glb / glTF models are supported.
If an array is given, it will load and display the models in the given order.

Example

Single

{
src: "/egjs-view3d/model/draco/alarm.glb"
}

LOD(Level of Detail) applied

View3D will load and display all 3D models given in the src array sequentially.
You can use this behavior to load 3D model with smaller size, which can decrease time to interactive.

info

Test this example with the network throttling applied.

Load 3D model
{
src: [
"/egjs-view3d/model/lod/plant/simplified.gltf",
"/egjs-view3d/model/draco/plant.glb"
],
poster: "/egjs-view3d/poster/plant.png"
}