Module Built-in Components

Contains Needle Engine Core Components.

This includes

All these components are available wherever Needle Engine is used.

Animation

AnimationCurve

AnimationCurve is a representation of a curve that can be used to animate values over time.

BasicIKConstraint

Simple Inverse Kinematics Constraint

Animation and Sequencing

ClipExtrapolation
TrackType
Animation

Play animations

Animator

Animation controller and playback component

AnimatorController

Controls the playback of animations using a state machine architecture.

MarkerModel
PlayableDirector

Controls and plays TimelineAssets

SignalMarkerModel
AnimationClipModel
AudioClipModel
ClipModel
ControlClipModel
ScrollMarkerModel

Marker with a name, used for scroll-driven timelines. It is used together with elements in your HTML to define what time in the timeline should be active when the element is in the scroll view.

TimelineAssetModel
TrackModel
TrackOffset

Asset Management

DropListener

Component to handle drag and drop of files into the scene

GltfExport

Export selected 3D objects to glTF format

NestedGltf

Loads and instantiates a nested glTF file

SceneSwitcher

Dynamically loads and switches between multiple scenes

Camera

Camera

Rendering scenes from a specific viewpoint

CharacterControllerInput
OrbitControls

Camera controller using three.js OrbitControls

ViewBox

Automatically fits a box area into the camera view

Camera Controls

LookAtConstraint

Look At Constraint for OrbitControls

Character

CharacterController

Character Movement Controller

Constraints

OffsetConstraint

Maintains positional and rotational offset relative to another object

Effects

Antialiasing
BloomEffect

Bloom Post-Processing Effect

ChromaticAberration

Chromatic Aberration Post-Processing Effect

ColorAdjustments

Color Adjustments Post-Processing Effect

DepthOfField

Depth of Field Post-Processing Effect

EffectWrapper
PixelationEffect

Pixelation Post-Processing Effect

PostProcessingEffect

PostProcessingEffect is a base class for post processing effects that can be applied to the scene.
To create a custom post processing effect, extend this class and override the onCreateEffect method and call registerCustomEffectType to make it available in the editor.

ScreenSpaceAmbientOcclusion

Screenspace Ambient Occlusion post-processing effect.
We recommend using ScreenSpaceAmbientOcclusionN8 instead.

ScreenSpaceAmbientOcclusionN8

Screen Space Ambient Occlusion (SSAO) Post-Processing Effect

SharpeningEffect

Sharpening Post-Processing Effect

TiltShiftEffect

Tilt Shift Post-Processing Effect

ToneMappingEffect

Tonemapping Post-Processing Effect

Vignette

Vignette Post-Processing Effect

Volume

Manage Post-Processing Effects

Events

EventList

The EventList is a class that can be used to create a list of event listeners that can be invoked.

Everywhere Actions

ChangeMaterialOnClick

Changes the material of objects when clicked

ChangeTransformOnClick

Moves an object to a target transform upon click

EmphasizeOnClick

Emphasizes the target object when clicked

HideOnStart

Hides the object on scene start

PlayAnimationOnClick

Plays an animation when clicked

PlayAudioOnClick

Plays an audio clip when clicked

SetActiveOnClick

Sets the active state of an object when clicked

TapGestureTrigger

Triggers an action when the object is tapped/clicked

VisibilityAction

Hides or shows the object when clicked

Helpers

AxesHelper

Visualizes object axes in the scene

BoxGizmo

Display a box around the object

BoxHelperComponent

Bounding box helper with intersection tests

GltfExportBox

Bounding box helper with intersection tests

GridHelper

GridHelper is a component that allows to display a grid in the scene.

TransformGizmo

Object manipulation gizmo for translating, rotating, and scaling

Interaction

ObjectRaycaster

A Raycaster that performs raycasting against its own GameObject.

Interactivity

CharacterControllerInput
Deletable

Objects with this component can be destroyed by the DeleteBox component.

DeleteBox

Box area that deletes objects entering it

DragControls

Enables dragging of objects in 2D or 3D space

Duplicatable

Duplicates a GameObject on pointer events

EventTrigger

Triggers events on pointer interactions

OpenURL

OpenURL behaviour opens a URL in a new tab or window when the object (or any if it's children) is clicked.

SmoothFollow

Smoothly follows a target object

SpatialTrigger

A spatial trigger component that detects objects within a box-shaped area. Used to trigger events when objects enter, stay in, or exit the defined area

SpatialTriggerReceiver

Receives spatial trigger events

Interactivity, Everywhere Actions

LookAt

Makes the object look at a target object or the camera

Multimedia

AudioListener

Audio listener for 3D audio capture

AudioSource

3D audio source with spatial positioning and playback controls

VideoPlayer

Plays video clips from URLs or streams

Networking

Avatar

WebXR Avatar component for head and hands synchronization

Networking

Networking configuration

PlayerColor

Assigns a unique color to the player object

ScreenCapture

Share screen, camera or microphone in a networked room

SpectatorCamera

Spectator camera for following other users

SyncedCamera

Syncs camera position and rotation of users in a networked room

SyncedRoom

Joins a networked room based on URL parameters or a random room

SyncedTransform

Synchronizes object transform over the network with ownership management

Voip

Voice over IP for networked audio communication

Physics

BoxCollider

BoxCollider represents a box-shaped collision volume. Ideal for rectangular objects or objects that need a simple cuboid collision boundary.

CapsuleCollider

CapsuleCollider represents a capsule-shaped collision volume (cylinder with hemispherical ends). Ideal for character controllers and objects that need a rounded collision shape.

Collider

Physics collider

MeshCollider

MeshCollider creates a collision shape from a mesh geometry. Allows for complex collision shapes that match the exact geometry of an object.

Rigidbody

Rigidbody for physical interactions

SphereCollider

SphereCollider represents a sphere-shaped collision volume. Useful for objects that are roughly spherical in shape or need a simple collision boundary.

Rendering

ContactShadows

Display contact shadows on the ground

GroundProjectedEnv

Projects the environment map onto the ground

Light

Light component for various light types and shadow settings

LODGroup

Level of Detail Group for optimizing rendering

MeshRenderer
ParticleSystem

Handles the motion and rendering of many individual particles

ReflectionProbe

Provides reflection data to materials

RemoteSkybox

Sets the skybox or environment texture of a scene

Renderer
RendererLightmap

This component is automatically added by the Renderer component if the object has lightmap uvs AND we have a lightmap.

SeeThrough

Makes objects fade out when obscuring a reference point from the camera

ShadowCatcher

Creates a shadow mask or a light occluder

SkinnedMeshRenderer
Sprite

2D image renderer

Volume

Manage Post-Processing Effects

Sequencing and Timelines

SignalReceiver

Receives signals and invokes reactions

Splines

SplineUtils
SplineContainer

Holds spline data and generates a spline curve.

SplineWalker

Moves an object along a spline

Sprites

SpriteData

Used by the SpriteRenderer to hold the sprite sheet and the currently active sprite index.

SpriteRenderer

The sprite renderer renders a sprite on a GameObject using an assigned spritesheet (SpriteData).

SpriteSheet

UI

GraphicRaycaster

A Raycaster that performs raycasting against UI elements (objects with a CanvasRenderer component).

User Interface

BaseUIComponent

Derive from this class if you want to implement your own UI components.
It provides utility methods and simplifies managing the underlying three-mesh-ui hierarchy.

Button

UI Button that can be clicked to perform actions

Canvas

Root component for UI elements, managing layout and rendering settings

CanvasGroup

Group UI elements to control transparency and interactivity

EventSystem

Manages and dispatches input events to UI components

Graphic
GridLayoutGroup
HorizontalLayoutGroup
Image

Display a 2D image in the UI

InputField

Text field for user input

MaskableGraphic
NeedleMenu

Configuration component for the Needle Menu

Outline

Add an outline effect to UI elements

RawImage
RectTransform

Derive from this class if you want to implement your own UI components.
It provides utility methods and simplifies managing the underlying three-mesh-ui hierarchy.

SpatialHtml

Render HTML elements as 3D objects in the scene

Text

Display text in the UI

UIRootComponent

Derive from this class if you want to implement your own UI components.
It provides utility methods and simplifies managing the underlying three-mesh-ui hierarchy.

VerticalLayoutGroup

Utilities

DeviceFlag

Show or hide GameObject based on device type

XRFlag

Use the XRFlag component to show or hide objects based on the current XR state or session.
This means you can show or hide objects based on if the user is in VR, AR, using first person view or third person view.

Utility

AlignmentConstraint

Aligns and scales the object between two target GameObjects

Web

ClickThrough

Allows pointer events to "click through" the 3D canvas to HTML elements behind it.

CursorFollow

Makes the object follow the cursor position on screen

HoverAnimation

Hover Animation on Pointer Enter/Exit

ScrollFollow

Links scroll position to target objects

XR

Avatar

WebXR Avatar component for head and hands synchronization

SpatialGrabRaycaster

A Raycaster that performs sphere overlap raycasting for spatial grab interactions in XR.

TeleportTarget

This component is just used as a marker on objects for WebXR teleportation
The XRControllerMovement component can be configured to check if the TeleportTarget component is present on an object to allow teleporting to that object.

USDZExporter

Export 3D objects as USDZ files for QuickLook

WebARCameraBackground

Displays the camera feed as background in WebAR sessions

WebARSessionRoot

Root object for WebAR sessions, managing scene placement and user scaling in AR.

WebXR

WebXR Component for VR and AR support

WebXRImageTracking

Add this component to a object to enable image tracking in WebXR sessions.

WebXRPlaneTracking

Use this component to track planes and meshes in the real world when in immersive-ar (e.g. on Oculus Quest).

XRControllerFollow

Makes the object follow a specific XR controller or hand

XRControllerModel

Displays controller or hand models in XR

XRControllerMovement

Move the XR rig using controller input

XRFlag

Use the XRFlag component to show or hide objects based on the current XR state or session.
This means you can show or hide objects based on if the user is in VR, AR, using first person view or third person view.

XRRig

A user in XR (VR or AR) is parented to an XR rig during the session.
When moving through the scene the rig is moved instead of the user.

Other

ClearFlags

The ClearFlags enum is used to determine how the camera clears the background

DragMode

The DragMode determines how an object is dragged around in the scene.

__Ignore
ActionBuilder
ActionCollection
ActionModel
AnimationExtension
AnimationTrackHandler

A TrackHandler is responsible for evaluating a specific type of timeline track.
A timeline track can be an animation track, audio track, signal track, control track etc and is controlled by a PlayableDirector.

Attractor

Used to attract Rigidbodies towards the position of this component. Add Rigidbodies to the targets array to have them be attracted.
You can use negative strength values to create a repulsion effect.

AudioExtension
AudioTrackHandler

A TrackHandler is responsible for evaluating a specific type of timeline track.
A timeline track can be an animation track, audio track, signal track, control track etc and is controlled by a PlayableDirector.

AvatarLoader

Handles loading and instantiating avatar models from various sources. Provides functionality to find and extract important parts of an avatar (head, hands).

AvatarMarker

This is used to mark an object being controlled / owned by a player
This system might be refactored and moved to a more centralized place in a future version

AvatarModel

Represents an avatar model with head and hands references. Used for representing characters in 3D space.

BehaviorExtension

internal USDZ behaviours extension

BehaviorModel
Behaviour

Needle Engine component's are the main building blocks of the Needle Engine.
Derive from Behaviour to implement your own using the provided lifecycle methods.
Components can be added to any Object3D using addComponent or GameObject.addComponent.

CallInfo
CameraTargetReachedEvent
ColorBySpeedModule
ColorOverLifetimeModule
ControlTrackHandler

A TrackHandler is responsible for evaluating a specific type of timeline track.
A timeline track can be an animation track, audio track, signal track, control track etc and is controlled by a PlayableDirector.

CustomBranding

Custom branding for the QuickLook overlay, used by USDZExporter.

DocumentExtension
EmissionModule
EnvironmentScene
EventListEvent
FieldWithDefault
FixedJoint
GameObject

Base class for objects in Needle Engine. Extends Object3D from three.js. GameObjects can have components attached to them, which can be used to add functionality to the object. They manage their components and provide methods to add, remove and get components.

Gradient
GroupActionModel
HingeJoint
InheritVelocityModule
InstanceHandle

The instance handle is used to interface with the mesh that is rendered using instancing.

InstancingHandler

Handles instancing for Needle Engine.

Interactable
Keyframe

Keyframe is a representation of a keyframe in an AnimationCurve.

LimitVelocityOverLifetimeModule
LODModel
MainModule
MarkerTrackHandler

A TrackHandler is responsible for evaluating a specific type of timeline track.
A timeline track can be an animation track, audio track, signal track, control track etc and is controlled by a PlayableDirector.

MinMaxCurve
MinMaxGradient
NeedleUSDZExporter
NoiseModule
Padding
ParticleBurst
ParticleSubEmitter
ParticleSystemBaseBehaviour
PhysicsExtension
PointerEventData

This pointer event data object is passed to all event receivers that are currently active
It contains hit information if an object was hovered or clicked
If the event is received in onPointerDown or onPointerMove, you can call setPointerCapture to receive onPointerMove events even when the pointer has left the object until you call releasePointerCapture or when the pointerUp event happens
You can get additional information about the event or event source via the event property (of type NEPointerEvent)

PostProcessingHandler

PostProcessingHandler is responsible for applying post processing effects to the scene. It is internally used by the Volume component

PreliminaryAction

Needle Engine component's are the main building blocks of the Needle Engine.
Derive from Behaviour to implement your own using the provided lifecycle methods.
Components can be added to any Object3D using addComponent or GameObject.addComponent.

PreliminaryTrigger

Needle Engine component's are the main building blocks of the Needle Engine.
Derive from Behaviour to implement your own using the provided lifecycle methods.
Components can be added to any Object3D using addComponent or GameObject.addComponent.

Rect
RegisteredAnimationInfo
RotationBySpeedModule
RotationOverLifetimeModule
ShapeModule
SignalAsset

Used to reference a signal asset in a SignalReceiver. This is internally used by the SignalReceiverEvent.

SignalReceiverEvent

An event that links a signal to a reaction. Used internally by SignalReceiver.

SignalTrackHandler

A TrackHandler is responsible for evaluating a specific type of timeline track.
A timeline track can be an animation track, audio track, signal track, control track etc and is controlled by a PlayableDirector.

Size
SizeBySpeedModule
SizeOverLifetimeModule
SplineData
TextBuilder
TextExtension
TextureSheetAnimationModule
TrackHandler

A TrackHandler is responsible for evaluating a specific type of timeline track.
A timeline track can be an animation track, audio track, signal track, control track etc and is controlled by a PlayableDirector.

TrailModule
TransformData
TriggerBuilder
TriggerModel
UIRaycastUtils
UsageMarker

Marks an object as currently being interacted with. For example, DragControls set this on the dragged object to prevent DeleteBox from deleting it.

USDDocument
USDObject
USDWriter
USDZExporterContext
USDZText
USDZUIExtension
VariantAction
VelocityOverLifetimeModule
VolumeParameter
WebXRImageTrackingModel

WebXRImageTracking allows you to track images in the real world and place objects on top of them.
This component is only available in WebXR sessions.
The WebXRImageTrackingModel contains the image to track, the object to place on top of the image, and the size of the image as well as settings for the tracking.
Used by the WebXRImageTracking component

WebXRTrackedImage
XRState
IEffectProvider
IInputEventArgs
IPointerClickHandler
IPointerDownHandler
IPointerEnterHandler
IPointerEventHandler

Implement on your component to receive input events via the EventSystem component

IPointerExitHandler
IPointerMoveHandler
IPointerUpHandler
ISceneEventListener

The ISceneEventListener is called by the SceneSwitcher when a scene is loaded or unloaded.
It must be added to the root object of your scene (that is being loaded) or on the same object as the SceneSwitcher
It can be used to e.g. smooth the transition between scenes or to load additional content when a scene is loaded.

ITimelineAnimationOverride

Experimental interface for receiving timeline animation callbacks. Register at the PlayableDirector

UsdzBehaviour
DropListenerNetworkEventArguments

Network event arguments passed between clients when using the DropListener with networking

DropListenerOnDropArguments

Arguments provided to handlers when an object is dropped or added to the scene

WebXRPlaneTrackingEvent

Used by WebXRPlaneTracking to track planes in the real world.

XRPlaneContext

Used by WebXRPlaneTracking to track planes in the real world.

PostProcessingEffectOrder

Default order for post-processing effects. This can be used to sort effects by their rendering order when creating custom effects. E.g. in your custom effect, you can set order: PostProcessingEffectOrder.Bloom + 1; to ensure it gets rendered after the bloom effect. OR order: PostProcessingEffectOrder.Bloom - 1; to ensure it gets rendered before the bloom effect.

decompressGpuTexture

Reads back a texture from the GPU (can be compressed, a render texture, or anything), optionally applies RGBA colorScale to it, and returns CPU data for further usage. Note that there are WebGL / WebGPU rules preventing some use of data between WebGL contexts.

imageToCanvas

This method uses a '2d' canvas context for pixel manipulation, and can apply a color scale or Y flip to the given image. Unfortunately, canvas always uses premultiplied data, and thus images with low alpha values (or multiplying by a=0) will result in black pixels.

makeNameSafeForUSD
registerCustomEffectType