Interface NeedleEngineAttributes

Supported attributes for the <needle-engine> web component.

interface NeedleEngineAttributes {
    "auto-fit": "true" | "false";
    "auto-rotate": "true" | "false";
    autoplay: "true" | "false";
    "background-blurriness": string;
    "background-color": string;
    "background-image": string;
    "background-intensity": string;
    "background-rotation": string | number;
    "camera-controls": string;
    clickthrough: "true" | "false";
    "contact-shadows": "true" | "false";
    dracoDecoderPath: string;
    dracoDecoderType: "wasm" | "js";
    "environment-image": string;
    "environment-intensity": string;
    "focus-rect": string | HTMLElement;
    hash: string;
    "keep-alive": "true" | "false";
    ktx2DecoderPath: string;
    "loading-style": "auto" | "dark" | "light";
    src: string;
    "tone-mapping": TonemappingAttributeOptions;
    "tone-mapping-exposure": string;
    transparent: "true" | "false";
}

Properties

"auto-fit": "true" | "false"

Automatically fit model into camera view on load.

"auto-rotate": "true" | "false"

Auto-rotate model until user interacts.

autoplay: "true" | "false"

Play animations automatically on scene load.

"background-blurriness": string

Blurs the background image. 0 (sharp) to 1 (fully blurred).

"background-color": string

CSS background color if no skybox/background image is provided.

"background-image": string

URL to .exr, .hdr, .png, .jpg to be used as skybox.

"background-intensity": string

Intensity multiplier for the background image.

"background-rotation": string | number

Rotation of the background image in degrees.

"camera-controls": string

Set to automatically add OrbitControls to the loaded scene.

clickthrough: "true" | "false"

Allow pointer events to pass through transparent parts.

"contact-shadows": "true" | "false"

Enable/disable contact shadows.

dracoDecoderPath: string

Override the default draco decoder path location.

dracoDecoderType: "wasm" | "js"

Override the default draco library type.

"environment-image": string

URL to .exr, .hdr, .png, .jpg to be used for lighting.

"environment-intensity": string

Intensity multiplier for environment lighting.

"focus-rect": string | HTMLElement

CSS selector or HTMLElement for camera focus.

hash: string

String attached to the context for caching/identification.

"keep-alive": "true" | "false"

Prevent context from being disposed when element is removed from DOM.

ktx2DecoderPath: string

Override the default KTX2 transcoder/decoder path.

"loading-style": "auto" | "dark" | "light"

Loading overlay style.

src: string

Change which model gets loaded.

"tone-mapping": TonemappingAttributeOptions

Tonemapping mode.

"tone-mapping-exposure": string

Exposure multiplier for tonemapping.

transparent: "true" | "false"

Enable/disable renderer canvas transparency.