If set to false the camera controls are disabled. Default is true.
if the attribute is not set it returns null
Get the context that is created when the src attribute is set and the loading has finished.
The tonemapping setting configured as an attribute on the
StaticobservedEmitted when loading begins for the scene. The event is cancelable — calling preventDefault()
will stop the default loading UI behavior, so apps can implement custom loading flows.
Optionaloptions: boolean | AddEventListenerOptionsEmitted repeatedly while loading resources. Use the event detail to show progress.
Optionaloptions: boolean | AddEventListenerOptionsEmitted when scene loading has finished.
Optionaloptions: boolean | AddEventListenerOptionsEmitted when an XR session ends.
Optionaloptions: boolean | AddEventListenerOptionsEmitted when entering an AR session.
Optionaloptions: boolean | AddEventListenerOptionsEmitted when exiting an AR session.
Optionaloptions: boolean | AddEventListenerOptionsEmitted when entering a VR session.
Optionaloptions: boolean | AddEventListenerOptionsEmitted when exiting a VR session.
Optionaloptions: boolean | AddEventListenerOptionsEmitted when the engine has rendered its first frame and is ready.
Optionaloptions: boolean | AddEventListenerOptionsEmitted when an XR session is started. You can do additional setup here.
Optionaloptions: boolean | AddEventListenerOptionsEmitted when loading begins for the scene. The event is cancelable — calling preventDefault()
will stop the default loading UI behavior, so apps can implement custom loading flows.
Optionaloptions: boolean | AddEventListenerOptionsEmitted when loading begins for the scene. The event is cancelable — calling preventDefault()
will stop the default loading UI behavior, so apps can implement custom loading flows.
Optionaloptions: boolean | AddEventListenerOptionsEmitted when loading begins for the scene. The event is cancelable — calling preventDefault()
will stop the default loading UI behavior, so apps can implement custom loading flows.
Optionaloptions: boolean | AddEventListenerOptionsGet the current context for this web component instance. The context is created when the src attribute is set and the loading has finished.
The context is disposed when the needle engine is removed from the document (you can prevent this by setting the keep-alive attribute to true).
a promise that resolves to the context when the loading has finished
The
<needle-engine>web component. See NeedleEngineAttributes attributes for supported attributesThe web component creates and manages a Needle Engine context, which is responsible for rendering a 3D scene using threejs.
The context is created when the
srcattribute is set, and disposed when the element is removed from the DOM. You can prevent cleanup by setting thekeep-aliveattribute totrue.The context is accessible from the
<needle-engine>element:document.querySelector("needle-engine").context. See https://engine.needle.tools/docs/reference/needle-engine-attributesExample
Example