Class: Project

Project(reporter, settings)

Project An actor should not be removed during runtime, or undo/redo will mess up

Constructor

new Project(reporter, settings)

Parameters:
Name Type Description
reporter Reporter
settings Object
Properties
Name Type Attributes Default Description
server URL <optional>
rendererSettings Object <optional>
reconnectTime number <optional>
5
Source:

Members

basis :string

Type:
  • string
Source:

bodyChangeHandlePromise :Promise|null

Type:
  • Promise | null
Source:

configurators :Array.<Configurator>

List of configurators
Type:
Source:

defaultImages :Object.<string, HTMLImageElement>

Type:
  • Object.<string, HTMLImageElement>
Source:

layerMap :Object.<string, number>

Map of 3D content type to THREE layer to keep everything nicely (and consistently) separated
Type:
  • Object.<string, number>
Source:

pkgs :Array.<Package>

List of packages
Type:
Source:

renderer :WebGLRenderer

Type:
  • WebGLRenderer
Source:

scene :Scene

Type:
  • Scene
Source:

server :ServerConnection

Type:
Source:

singleBlockInstances :Array.<SingleBlockInstance>

List of sbi's
Type:
Source:

standardQuaternions :Object.<string, Quaternion>

Set of quaternions that are used often
Type:
  • Object.<string, Quaternion>
Source:

timer :Timer

Type:
Source:

views :Array.<View>

List of views
Type:
Source:

Methods

_addPackageObject(pkg)

Add a new package to the internal register
Parameters:
Name Type Description
pkg Package
Source:

addActor(actor)

Parameters:
Name Type Description
actor Actor
Source:

(async) addConfigurator(settings, overwritePreviousStateopt) → {Promise.<Configurator>}

Parameters:
Name Type Attributes Default Description
settings Object
Properties
Name Type Description
pkg Package
overwritePreviousState Boolean <optional>
false
Source:
Returns:
Type
Promise.<Configurator>

(async) addPackage(packageURL)

Parameters:
Name Type Description
packageURL URL
Source:

addSingleBlockInstance(block, position, quaternion) → {SingleBlockInstance}

Parameters:
Name Type Description
block Block
position Vector3
quaternion Quaternion
Source:
Returns:
Type
SingleBlockInstance

addView(viewopt)

Parameters:
Name Type Attributes Description
view View <optional>
Source:

findComponentById(id) → {Component}

Search the loaded packages and current confugurations for a component with the supplied id
Parameters:
Name Type Description
id UUID
Source:
Returns:
Type
Component

(async) load(identifier)

Parameters:
Name Type Description
identifier UUID | String Project id or slug
Source:

onStateCursorMoved(selectedState)

Parameters:
Name Type Description
selectedState any
Source:

redo(stepsopt) → {Promise.<Object>}

Parameters:
Name Type Attributes Default Description
steps number <optional>
1
Source:
Returns:
Type
Promise.<Object>

setTheme(theme)

Sets a theme accross all configurators for the relevant package and squashes their state updates into one
Parameters:
Name Type Description
theme Theme
Source:

undo(stepsopt) → {Promise.<Object>}

Parameters:
Name Type Attributes Default Description
steps number <optional>
1
Source:
Returns:
Type
Promise.<Object>