how many scenes can be loaded in parallel
how many scenes after the currently active scene should be preloaded
how many scenes before the currently active scene should be preloaded
the url parameter that is set/used to store the currently loaded scene in, set to "" to disable
when enabled the new scene is pushed to the browser navigation history, only works with a valid query parameter set
when enabled you can switch between scenes using keyboard left, right, A and D or number keys
when enabled will automatically apply the environment scene lights
when enabled the scene name will be used as the query parameter (otherwise the scene index will be used)
Needs queryParameterName
set
when enabled you can switch between scenes using swipe (mobile only)
The index of the currently loaded and active scene
Get the progress of the currently loading scene. This is undefined if no scene is loading
You can also subscribe to the loading event by adding an event listener to the scene switcher.
For example like this sceneSwitcher.addEventListeneer("progress", (e) => {...})
Forward (0,0,-1) vector in world space
Right (1,0,0) vector in world space
Up (0,1,0) vector in world space
Optional
earlyOptional
lateOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
resolveOptional
updateGenerated using TypeDoc
Can be used to dynamically load and unload extra content
Available scenes are defined in the
scenes
array.events
loadscene-start
: Called when a scene starts loadingloadscene-finished
: Called when a scene finished loadingprogress
: Called when a scene is loading and the progress changes Subscribe to events like this:sceneSwitcher.addEventListener("loadscene-start", (e) => {...})