Editor

Provides functionality for editing and manipulating 3D objects in a web-based environment.

Constructor

new Editor(frame3D, assetManager, options)

Parameters:
NameTypeDescription
frame3Dmodule:@ud-viz/frame3d~Planar | module:@ud-viz/frame3d~Base

frame 3d

assetManagerAssetManager

asset manager

optionsobject

options

Properties
NameTypeDescription
externalScriptVariablesInputsArray

input to edit ExternalScriptComponent variables

gameScriptVariablesInputsArray

input to edit GameScriptComponent variables

userDataInputsArray

input to edit .userData

object3DModelsArray

models of object3D

possibleExternalScriptIdsArray

ids that can be added to a gameobject3d ExternalScriptComponent

possibleGameScriptIdsArray

ids that can be added to a gameobject3d GameScriptComponent

userDataobject

user data

Classes

Editor

Members

assetManager :AssetManager

Type:
  • AssetManager

buttonTargetGameObject3D :HTMLElement

Type:
  • HTMLElement

colliderParent :Object3D

Type:
  • Object3D

currentGODomelement :HTMLElement

Type:
  • HTMLElement

currentGameObject3D :GameObject3D|null

Type:
  • GameObject3D | null

currentGameObjectMeshBox3 :Box3

Type:
  • Box3

currentObjectInput :undefined|null

Type:
  • undefined | null

frame3D :module:@ud-viz/frame3d~Planar|module:@ud-viz/frame3d~Base

Type:
  • module:@ud-viz/frame3d~Planar | module:@ud-viz/frame3d~Base

gameObjectInput :GameObject3DInput

leftPan :HTMLElement

Type:
  • HTMLElement

orbitControls :OrbitControls

Type:
  • OrbitControls

process :RequestAnimationFrameProcess

Type:
  • RequestAnimationFrameProcess

shapeContext :object

Type:
  • object

toolsDomElement :HTMLElement

Type:
  • HTMLElement

transformControls :TransformControls

Type:
  • TransformControls

userData :object

Type:
  • object

Methods

focusCurrentGameObject3D()

Move camera to focus current game object 3d

selectGameObject3D(go, force)

Parameters:
NameTypeDefaultDescription
goGameObject3D

game object 3d to select for edition

forcebooleanfalse

force even if the selected gameobject3d is the same

selectPointMesh(mesh)

Parameters:
NameTypeDescription
meshMesh

point mesh to select with transform controls

selectShape(shapeIndex)

Parameters:
NameTypeDescription
shapeIndexnumber

index of the shape to select

setCurrentGameObject3DJSON(gameObject3DJSON)

Parameters:
NameTypeDescription
gameObject3DJSONobject

json of the gameobject to set

setOrbitControlsTargetTo(obj)

Parameters:
NameTypeDescription
objObject3D

object 3d to target

updateBox3()

Update box3 wrapping selected game object 3d

updateCollider()

Update collider shapes in the 3D scene

updateShapeSelected(rebuildShapeGeometry)

Update shape selected (when a property of the shape has changed)

Parameters:
NameTypeDefaultDescription
rebuildShapeGeometrybooleantrue

shape selected needs to rebuild its geometry

(static) computeBox3GameObject3D(obj) → {Box3}

Parameters:
NameTypeDescription
objObject3D

object 3d to compute box3

Returns:
  • box 3 of the object 3d
Type: 
Box3