Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2016-0-4 21:22

Class enchant.gl.Scene3D

Class Summary
Constructor Attributes Constructor Name and Description
 
Class for displayed Sprite3D tree route.
Field Summary
Field Attributes Field Name and Description
 
Scene3D background color
 
Child element array.
 
Lighting array.

Method Summary

Method Attributes Method Name and Description
 
addChild(sprite)
Add Sprite3D to scene.
 
addLight(light)
Add lighting to scene.
 
Gets ambient light source in scene.
 
Gets camera source in scene.
 
Gets directional light source in scene.
 
removeChild(sprite)
Delete Sprite3D from scene.
 
removeLight(light)
Delete lighting from scene
 
Sets ambient light source in scene.
 
setCamera(camera)
Sets scene's camera postion.
 
Sets directional light source in scene.
Methods borrowed from class enchant.EventTarget:
addEventListener
clearEventListener
dispatchEvent
on
removeEventListener

Class Detail

enchant.gl.Scene3D()
Class for displayed Sprite3D tree route. Currently, multiple definitions are impossible, and the Scene3D defined first will be returned.
  var scene = new Scene3D();
  var sprite = new Sprite3D();
  scene.addChild(sprite);

Field Detail

{Number[]} backgroundColor
Scene3D background color
{enchant.gl.Sprite3D[]} childNodes
Child element array. A list of Sprite3D added as child classes in this scene can be acquired. When adding or subtracting child classes, without directly operating this array, enchant.gl.Scene3D#addChild or enchant.gl.Scene3D#removeChild is used.
Lighting array. At present, the only light source active in the scene is 0. Acquires a list of light sources acquired in this scene. When lighting is added or deleted, without directly operating this array, enchant.gl.Scene3D#addLight or enchant.gl.Scene3D#removeLight is used.

Method Detail