SceneModule Module

The SceneModule class exposes properties and methods to access the objects in a scene.

Usage

var Scene = require('Scene');

Properties

PropertyDescription

root

(get) root: SceneObjectBase (set) (Not Available)

Returns an object that is the root of the scene tree. Other objects are accessed by walking down the scene tree from the root using the SceneObjectBase.child and SceneObjectBase.find methods.

Methods

MethodDescription

unprojectToFocalPlane

unprojectToFocalPlane(location: PixelPointSignal): PointSignal

Returns a signal with the value that corresponds to the 3d point (in World Space, in current units) of the given screenSpace point from the PixelPointSignal. The z coordinate of the PointSignal will be calculated so that the 3d point will always be on the canvas (which should be on the Focal Plane).

This function can be combined with TouchGestures to create a 3d point signal. var S = require('Scene') TouchGestures.onPan().subscribe(function(gesture) {   var signal = S.unprojectToFocalPlane(gesture.location); });

unprojectWithDepth

unprojectWithDepth(location: PixelPointSignal, depth: number): PointSignal Returns a signal with the value that corresponds to the 3d point value (in World Space, in current units) of the given screenSpace point from the PixelPointSignal The z coordinate of the PointSignal will always be equal to the given depth value. The depth should be given in current units.

This function can be combined with TouchGestures to create a 3d point signal. var Scene = require('Scene') var TouchGestures = require('TouchGestures') TouchGestures.onPan().subscribe(function(gesture) {   var signal = Scene.unprojectWithDepth(gesture.location, 0.5); });

Classes

ClassDescription

AmbientLightSource

The AmbientLightSource class describes an ambient lighting source.

AudioSource

The AudioSource class encapsulates an audio source for a scene.

Bounds2D

The Bounds2D class describes the bounds of a scene element.

Camera

The Camera class exposes details about the device camera focal area.

CameraVisibility

The CameraVisibility class describes whether or not an object is visible from various camera views.

Canvas

The Canvas class describes a scene canvas.

DirectionalLightSource

The DirectionalLightSource class describes a directional light source.

FaceMesh

The FaceMesh class describes a face mesh.

FocalPlane

The FocalPlane class exposes details about the focal plane of the device camera.

Mesh

The Mesh class describes a scene mesh.

ParticleSystem

The ParticleSystem class implements the particle management system for the scene.

ParticleTypeDescription

The ParticleTypeDescription class provides functionality for setting particle sprite densities in the scene.

ParticleTypeDescriptions

The ParticleTypeDescriptions class provides a container for particle type descriptions.

PlanarDiv

The PlanarDiv class describes a div on a plane.

PlanarFlexContainer

The PlanarFlexContainer class describes a flex container on a plane.

PlanarFlexItem

The PlanarFlexItem class describes a flex item on a plane.

PlanarImage

The PlanarImage class describes an image rendered on a plane.

PlanarObject

The PlanarObject class describes an object on a plane.

PlanarText

The PlanarText class describes text on a plane.

Plane

The Plane class describes a plane.

PointLightSource

The PointLightSource class describes a point light source.

Scene

The Scene class implements properties and methods to access the objects in a scene.

SceneObject

The SceneObject class describes an object in a scene.

SceneObjectBase

The SceneObjectBase class describes a scene object.

ScreenPlane

The ScreenPlane class describes a screen plane.

SpotLightSource

The SpotLightSource class describes a spot light source.

SvgImage

The SvgImage class describes an SVG image.

TextAlignmentWrapper

The TextAlignmentWrapper class contains text alignment details.

Transform

The Transform class describes an object transform for a scene.

Enums

EnumDescription

HorizontalAlignment

The HorizontalAlignment enum describes how an element is aligned horizontally.

RenderMode

The RenderMode enum describes how to render a scene object.

ScalingOption

The ScalingOption enum describes how an element is scaled.

TextAlignment

The TextAlignment enum describes how a text element is aligned horizontally.

VerticalAlignment

The VerticalAlignment enum describes how an element is aligned vertically.

VerticalTextAlignment

The VerticalTextAlignment enum describes how a text element is aligned vertically.