Package | twaver.threed.network |
Class | public class Network3D |
Inheritance | Network3D ![]() |
Subclasses | Overview |
Network3D is designed to represent a 3D scene. Network3D extends UIComponent and creates 3D scene with Stage3D. Developers should choose Flex SDK 4.5 or above, and have to set the backgroundAlpha property of the Application element as zero when they want to develop a flex project.
Developers can insert 3D objects into the ElementBox of a Network3D object. Those 3D objects are described by twaver.Element objects which are assigned correct 3D styles. The 3D objects include predefined primitive objects and external models which are stored in 3ds, md2, md5, and dae files. There are 12 predefined primitives in this library.
In order to display the scene in the screen, developers should apply a camera in the scene. Developers can invoke applyHoverCamera to view the scene with an orbit camera or invoke applyCommonCamera to use a first-person perspective camera. In addition to project the scene onto the screen by applying the camera, users can interact with the scene by mouse, key board or touch. Users can rotate the whole scene with the orbit camera or walk in the scene with the first-person perspective camera.
Developers can control the movement of the camera or even reset the property of the camera's lens and at the same time Network3D object will dispatch the Camera3DEvent object. Developers can do more work with this kind of event, such as automatically opening a door when the camera is about 1.5 meters away from a cabinet.
Developers can add at most six lights into the scene. Light object is described by LightProfile. With lights, developers can add shadow effect to a 3D object. In order to display the shadow, you will have to add a Plane object which SHAODW_LIGHT_TAG style should be set as the tag of the spcicified light with which you want to create the shadow. More details about the shadow effect you can refer to the guider or the example code at the bottom of the document. More details are described in our guider document or the document about twaver.threed.util.Consts3D class. All the primitives are listed as below:
twaver.threed.util.Consts3DD.TTHREED_SHAPE_TYPE_CUBE, twaver.Threed.util.Consts3D.THREED_SHAPE_TYPE_COMPLEXCUBE, twaver.threed.util.Consts3D.THREED_SHAPE_TYPE_SPHERE, twaver.threed.util.Consts3D.THREED_SHAPE_TYPE_CONE, twaver.threed.util.Consts3D.THREED_SHAPE_TYPE_CYLINDER, twaver.threed.util.Consts3D.THREED_SHAPE_TYPE_PLANE, twaver.threed.util.Consts3D.THREED_SHAPE_TYPE_LINE, twaver.threed.util.Consts3D.THREED_SHAPE_TYPE_LINEAREXTRUSION, twaver.threed.util.Consts3D.THREED_SHAPE_TYPE_LATHEEXTRUSION, twaver.threed.util.Consts3D.THREED_SHAPE_TYPE_BOXSCENE, twaver.threed.util.Consts3D.THREED_SHAPE_TYPE_TERRAIN
Property | Defined By | ||
---|---|---|---|
alarmAttachmentEnableDyeFunction : Function [write-only]
| Network3D | ||
alarmColorFunction : Function [write-only]
Sets alarmColorFunction of a Network3D object. | Network3D | ||
alarmEffectFunction : Function [write-only]
Sets alarmEffectFunction of a Network3D obejct. | Network3D | ||
alarmEnableElementDyeFunction : Function [write-only]
Sets the alarmEnableElementDyeFunction of a Network3D object. | Network3D | ||
alarmEnableFunction : Function [write-only]
| Network3D | ||
ancestorAllowMouse : Boolean [write-only] | Network3D | ||
backgroundAlpha : Number [write-only]
Specifies the alpha of the scene's background. | Network3D | ||
backgroundColor : uint [write-only]
Specifies the color of the scene's background. | Network3D | ||
calculateHeightFunction : Function
Sets the calculateHeightFunction of a Network3D object. | Network3D | ||
cameraDirection : Vector3D [read-only]
Gets the direction of the current camera. | Network3D | ||
cameraDistance : Number
Gets the distance between the orbit camrea and the pivot of the scene. | Network3D | ||
cameraMoveForwardStep : Number = 2
Defines the specified distance of the camera to move forward or backward. | Network3D | ||
cameraMoveSideStep : Number = 2
Defines the specified distance of the camera's sideways movement. | Network3D | ||
cameraPosition : Vector3D
Gets the position of the camrea. | Network3D | ||
edtingPlane : String = xz
Defines on which plane users can drag and move the specified 3D objects. | Network3D | ||
elementBox : ElementBox
Gets the data container of a Network3D object. | Network3D | ||
enableChildSelected : Boolean [write-only] | Network3D | ||
enableZoom : Boolean = true
Decides whether users can zoom in/out the scene with mouse. | Network3D | ||
eyeHeight : Number = 50
Defines the height of the avatar when developers using the first-person view. | Network3D | ||
farLimit : Number
Gets the distance to the far plane from the frustum. | Network3D | ||
fogColor : uint [write-only]
Sets the color of the fog effect. | Network3D | ||
fogMaxDistance : Number [write-only]
Sets the maximum of the distance to the camera from the fog effect. | Network3D | ||
fogMinDistance : Number [write-only]
Sets the minimum of the distance to the camera from the fog effect. | Network3D | ||
fov : Number [read-only]
Gets the field of view of the camera. | Network3D | ||
fps : uint [read-only]
Gets current frame rate in FPS(Frames per second). | Network3D | ||
nearLimit : Number
Gets the distance to the near plane from the frustum. | Network3D | ||
panAngle : Number
Gets the pan angle of the camera in degrees. | Network3D | ||
panAngleLowLimit : Number
Gets the minimum of the orbit camera's pan angle. | Network3D | ||
panAngleUpLimit : Number
Gets the maximum of the orbit camera's pan angle. | Network3D | ||
panWithMouse : Boolean = true
Decides whether users can pan the whole scene with mouse. | Network3D | ||
renderLevel : int [write-only]
Defines the antialias ability of the Network3D object. | Network3D | ||
rotateWithKeyboard : Boolean = false | Network3D | ||
rotateWithKeyboardOffset : Number = 1 | Network3D | ||
selectedColorFunction : Function [write-only]
Sets selectedColorFunction of a Network3D obejct. | Network3D | ||
selectedEffectFunction : Function [write-only]
Sets the selectedEffectFunction which will decorate the selected 3D object in the scene with delveopers' customation. | Network3D | ||
selectedWidthFunction : Function [write-only]
Sets selectedWidthFunction of a Network3D obejct. | Network3D | ||
selectionFunction : Function
Retrives the selectionFunction of a Network3D object. | Network3D | ||
target : * [write-only]
Assigns the target which the camrea points to in the scene. | Network3D | ||
tiltAngle : Number
Gets the tilt angle of the camera in degrees. | Network3D | ||
tiltAngleLowLimit : Number
Gets the minimum of the camera's tilt angle. | Network3D | ||
tiltAngleUpLimit : Number
Gets the maximum of the camera's tilt angle. | Network3D | ||
tiltWithMouse : Boolean = true
Decides whether users can tilt the whole scene with mouse. | Network3D | ||
validateLocationFunction : Function
Gets current validateLocationFunction of a Network3D obejct. | Network3D | ||
visibleFunction : Function
Gets current visibleFunction of a Network3D object. | Network3D | ||
zoomStep : Number = 8
Defines the zoom step. | Network3D |
Method | Defined By | ||
---|---|---|---|
Network3D(box:ElementBox = null)
Constructor. | Network3D | ||
addLight(lp:LightProfile):void
Adds a light into the scene. | Network3D | ||
addMouseOnCanvasListener(type:String, listener:Function):void | Network3D | ||
addMouseOnElementListener(type:String, listener:Function):void | Network3D | ||
applyCommonCamera(pos:Vector3D, panAngle:Number = 180, tiltAngle:Number = 90):void
Applies the first-person view in the scene. | Network3D | ||
applyDragCamera(panAngle:Number = -180, tiltAngle:Number = 10, distance:Number = 500):void
Applies the orbit camera on the scene. | Network3D | ||
applyHoverCamera(panAngle:Number = -180, tiltAngle:Number = 10, distance:Number = 500):void
Applies the orbit camera on the scene. | Network3D | ||
clearLights():void
Clears all the lights in the scene. | Network3D | ||
dispose():void
Releases the resource occupied by a Network3D object, especially the Stage3D resource. | Network3D | ||
getElementVertexAnimationNames(id:*):Array
Gets all the names of the animations defined in external model files. | Network3D | ||
getEnviromentID():Object
Retrives the enviroment element's id. | Network3D | ||
getHeightAt(x:Number, z:Number):Number
Gets the y value by specifing the x and z coordinate according the terrain of the scene. | Network3D | ||
getReferenceTerrainID():Object
Retrives the terrain element's id. | Network3D | ||
hideAxises():void
Hides the axises in the scene. | Network3D | ||
isValidatedLocation(x:Number, y:Number, z:Number):Boolean
Decides whether the camera can be moved to the specified postion described by x, y and z coordinates. | Network3D | ||
isVisible(element:Element):Boolean
Decides whether a twaver.Element can be seen in the 3D scene. | Network3D | ||
refreshUIs():void | Network3D | ||
removeLight(tag:String):void
Removes a light from the scene by specifing its tag. | Network3D | ||
removeMouseOnCanvasListener(type:String, listener:Function):void | Network3D | ||
removeMouseOnElementListener(type:String, listener:Function):void | Network3D | ||
saveAsBitmapData():BitmapData
Exports the current visible scene to a BitmapData object. | Network3D | ||
scrafe(d:Number):void | Network3D | ||
setEnviromentByID(id:Object):void
Specifies which element is used as the enviroment. | Network3D | ||
setReferenceTerrainByID(id:Object):void
Specifies which element is used as the terrain. | Network3D | ||
shareSceneWith(n:Network3D):void
Shares the whole 3D scene with another Network3D object. | Network3D | ||
showAxises():void
Displays the axises in the scene. | Network3D | ||
updateLight(lp:LightProfile):void
Updates the properties of a light which has been added into the scene. | Network3D | ||
walk(d:Number):void | Network3D |
Method | Defined By | ||
---|---|---|---|
setInteractions(name:String, interactions:Array):void | Network3D |
alarmAttachmentEnableDyeFunction | property |
alarmAttachmentEnableDyeFunction:Function
[write-only]
public function set alarmAttachmentEnableDyeFunction(value:Function):void
alarmColorFunction | property |
alarmColorFunction:Function
[write-only] Sets alarmColorFunction of a Network3D object. With alarmColorFunction, the Network3D object can decide what color is used to dye a 3D object when an alarm occurs. The 3D object will be dyed by the color of the highest AlarmSeverity of the new created alarms as defult.
public function set alarmColorFunction(value:Function):void
alarmEffectFunction | property |
alarmEffectFunction:Function
[write-only] Sets alarmEffectFunction of a Network3D obejct. With alarmEffectFunction, developers can customize the effect of a 3D object when a alarm occurs on it.
public function set alarmEffectFunction(value:Function):void
alarmEnableElementDyeFunction | property |
alarmEnableElementDyeFunction:Function
[write-only] Sets the alarmEnableElementDyeFunction of a Network3D object. With alarmEnableELementDyeFunction, Network3D can decide whether to dye the related 3D obejct with the specified color when an alarm occurs from a twaver.Element object. If the style Style3D.ALARM_ELEMENTDYE_ENABLE of a twaver.Element is set as true, the releated 3D object will be dyed by the specified alarm color as default.
public function set alarmEnableElementDyeFunction(value:Function):void
alarmEnableFunction | property |
alarmEnableFunction:Function
[write-only]
public function set alarmEnableFunction(value:Function):void
ancestorAllowMouse | property |
ancestorAllowMouse:Boolean
[write-only] public function set ancestorAllowMouse(value:Boolean):void
backgroundAlpha | property |
backgroundAlpha:Number
[write-only] Specifies the alpha of the scene's background.
public function set backgroundAlpha(value:Number):void
backgroundColor | property |
backgroundColor:uint
[write-only] Specifies the color of the scene's background.
public function set backgroundColor(value:uint):void
calculateHeightFunction | property |
calculateHeightFunction:Function
Sets the calculateHeightFunction of a Network3D object. With calculateHeightFunction, a Network3D object can retrive an expected y coordinate by specified x and z coordinates.
public function get calculateHeightFunction():Function
public function set calculateHeightFunction(value:Function):void
camera | property |
camera:Camera3D
[read-only] ThreedSpace function get camera():Camera3D
cameraDirection | property |
cameraDirection:Vector3D
[read-only] Gets the direction of the current camera.
public function get cameraDirection():Vector3D
cameraDistance | property |
cameraDistance:Number
Gets the distance between the orbit camrea and the pivot of the scene.
public function get cameraDistance():Number
public function set cameraDistance(value:Number):void
cameraMoveForwardStep | property |
public var cameraMoveForwardStep:Number = 2
Defines the specified distance of the camera to move forward or backward.
The default value is 2
.
cameraMoveSideStep | property |
public var cameraMoveSideStep:Number = 2
Defines the specified distance of the camera's sideways movement.
The default value is 2
.
cameraPosition | property |
cameraPosition:Vector3D
Gets the position of the camrea.
public function get cameraPosition():Vector3D
public function set cameraPosition(value:Vector3D):void
control | property |
control:wedfuo99
[read-only] ThreedSpace function get control():wedfuo99
edtingPlane | property |
public var edtingPlane:String = xz
Defines on which plane users can drag and move the specified 3D objects.
The default value is twaver.threed.utils.Consts3D#PLANE_XZ
.
elementBox | property |
elementBox:ElementBox
Gets the data container of a Network3D object.
public function get elementBox():ElementBox
public function set elementBox(value:ElementBox):void
enableChildSelected | property |
enableChildSelected:Boolean
[write-only] public function set enableChildSelected(value:Boolean):void
enableZoom | property |
public var enableZoom:Boolean = true
Decides whether users can zoom in/out the scene with mouse.
The default value is true
.
eyeHeight | property |
public var eyeHeight:Number = 50
Defines the height of the avatar when developers using the first-person view.
farLimit | property |
farLimit:Number
Gets the distance to the far plane from the frustum.
public function get farLimit():Number
public function set farLimit(value:Number):void
fogColor | property |
fogColor:uint
[write-only] Sets the color of the fog effect.
public function set fogColor(value:uint):void
fogMaxDistance | property |
fogMaxDistance:Number
[write-only] Sets the maximum of the distance to the camera from the fog effect.
public function set fogMaxDistance(value:Number):void
fogMinDistance | property |
fogMinDistance:Number
[write-only] Sets the minimum of the distance to the camera from the fog effect.
public function set fogMinDistance(value:Number):void
fov | property |
fov:Number
[read-only] Gets the field of view of the camera.
public function get fov():Number
fps | property |
fps:uint
[read-only] Gets current frame rate in FPS(Frames per second).
public function get fps():uint
nearLimit | property |
nearLimit:Number
Gets the distance to the near plane from the frustum.
public function get nearLimit():Number
public function set nearLimit(value:Number):void
panAngle | property |
panAngle:Number
Gets the pan angle of the camera in degrees.
public function get panAngle():Number
public function set panAngle(value:Number):void
panAngleLowLimit | property |
panAngleLowLimit:Number
Gets the minimum of the orbit camera's pan angle.
public function get panAngleLowLimit():Number
public function set panAngleLowLimit(value:Number):void
panAngleUpLimit | property |
panAngleUpLimit:Number
Gets the maximum of the orbit camera's pan angle.
public function get panAngleUpLimit():Number
public function set panAngleUpLimit(value:Number):void
panWithMouse | property |
public var panWithMouse:Boolean = true
Decides whether users can pan the whole scene with mouse.
The default value is true
.
renderLevel | property |
renderLevel:int
[write-only] Defines the antialias ability of the Network3D object. It does not work on mobile.
public function set renderLevel(value:int):void
rotateWithKeyboard | property |
public var rotateWithKeyboard:Boolean = false
rotateWithKeyboardOffset | property |
public var rotateWithKeyboardOffset:Number = 1
selectedColorFunction | property |
selectedColorFunction:Function
[write-only] Sets selectedColorFunction of a Network3D obejct. With selectedColorFunction, the Network3D object will be able to decide what color is used to render the framework of a selected 3D obejct. The value of the Style3D.SELECTED_EFFECT_COLOR style is used as default.
public function set selectedColorFunction(value:Function):void
selectedEffectFunction | property |
selectedEffectFunction:Function
[write-only] Sets the selectedEffectFunction which will decorate the selected 3D object in the scene with delveopers' customation.
public function set selectedEffectFunction(value:Function):void
selectedWidthFunction | property |
selectedWidthFunction:Function
[write-only] Sets selectedWidthFunction of a Network3D obejct. With selectedWidthFunction, the Network3D object will be able the thickness of the framework of a selected 3D obejct. By default, the value of the Style3D.SELECTED_FRAMEWORK_WIDTH style is used.
public function set selectedWidthFunction(value:Function):void
selectionFunction | property |
selectionFunction:Function
Retrives the selectionFunction of a Network3D object.
public function get selectionFunction():Function
public function set selectionFunction(value:Function):void
target | property |
target:*
[write-only] Assigns the target which the camrea points to in the scene.
public function set target(value:any):void
tiltAngle | property |
tiltAngle:Number
Gets the tilt angle of the camera in degrees.
public function get tiltAngle():Number
public function set tiltAngle(value:Number):void
tiltAngleLowLimit | property |
tiltAngleLowLimit:Number
Gets the minimum of the camera's tilt angle.
public function get tiltAngleLowLimit():Number
public function set tiltAngleLowLimit(value:Number):void
tiltAngleUpLimit | property |
tiltAngleUpLimit:Number
Gets the maximum of the camera's tilt angle.
public function get tiltAngleUpLimit():Number
public function set tiltAngleUpLimit(value:Number):void
tiltWithMouse | property |
public var tiltWithMouse:Boolean = true
Decides whether users can tilt the whole scene with mouse.
The default value is true
.
validateLocationFunction | property |
validateLocationFunction:Function
Gets current validateLocationFunction of a Network3D obejct.
public function get validateLocationFunction():Function
public function set validateLocationFunction(value:Function):void
visibleFunction | property |
visibleFunction:Function
Gets current visibleFunction of a Network3D object.
public function get visibleFunction():Function
public function set visibleFunction(value:Function):void
zoomStep | property |
public var zoomStep:Number = 8
Defines the zoom step. Network3D control the camera's zoom by moving the camera forward or backward.
The default value is 8
.
Network3D | () | Constructor |
public function Network3D(box:ElementBox = null)
Constructor.
Parametersbox:ElementBox (default = null ) — a specified twaver.ElementBox object as the data container. Developers have to use twaver.Element
objects to describe 3D object with 3D styles. Only after those twaver.Element objects have been
filled into the data container, the 3D objects can be seen in the 3D scene.
Network3D will automatically create a private data container if developers do not specify an ElementBox object.
|
addLight | () | method |
public function addLight(lp:LightProfile):void
Adds a light into the scene.
Parameters
lp:LightProfile — LightProfile. The profile of the light which should be added into the scene.
|
addMouseOnCanvasListener | () | method |
public function addMouseOnCanvasListener(type:String, listener:Function):void
Parameters
type:String | |
listener:Function |
addMouseOnElementListener | () | method |
public function addMouseOnElementListener(type:String, listener:Function):void
Parameters
type:String | |
listener:Function |
applyCommonCamera | () | method |
public function applyCommonCamera(pos:Vector3D, panAngle:Number = 180, tiltAngle:Number = 90):void
Applies the first-person view in the scene. With this camera, users can walk through the scene with key board and look around with mouse.
Parameters
pos:Vector3D — Vector3D The position of the camrea.
| |
panAngle:Number (default = 180 ) — Number The pan angle of the camera.
| |
tiltAngle:Number (default = 90 ) — Number The tilt angle of the camera.
|
applyDragCamera | () | method |
public function applyDragCamera(panAngle:Number = -180, tiltAngle:Number = 10, distance:Number = 500):void
Applies the orbit camera on the scene. With this kind of camera users can not only rotate the whole scene with the mouse of the pc or the touch movement on the pad, but also drag and move the selected 3D object in the scene on the specified axis plane.
Parameters
panAngle:Number (default = -180 ) — Number. The pan angle of the camera in the scene.
| |
tiltAngle:Number (default = 10 ) — Number. The tilt angle of the camera in the scene.
| |
distance:Number (default = 500 ) — Number. The distance between the camera and the pivot of the scene.
|
applyHoverCamera | () | method |
public function applyHoverCamera(panAngle:Number = -180, tiltAngle:Number = 10, distance:Number = 500):void
Applies the orbit camera on the scene. With this kind of camera users can rotate the whole scene with the mouse of the pc or touch movement on the pad.
Parameters
panAngle:Number (default = -180 ) — Number. The pan angle of the camera in the scene.
| |
tiltAngle:Number (default = 10 ) — Number. The tilt angle of the camera in the scene.
| |
distance:Number (default = 500 ) — Number. The distance between the camera and the pivot of the scene.
|
clearLights | () | method |
public function clearLights():void
Clears all the lights in the scene. A SceneEvent whose type is SceneEvent.LIGHTS_CLEARED will be dispatched.
dispose | () | method |
public function dispose():void
Releases the resource occupied by a Network3D object, especially the Stage3D resource. If you want to remove a Network3D component from a container, do not forget to invoke this method.
getElementVertexAnimationNames | () | method |
public function getElementVertexAnimationNames(id:*):Array
Gets all the names of the animations defined in external model files.
Parameters
id:* |
Array — Array. The names of the predefined animations.
|
getEnviromentID | () | method |
public function getEnviromentID():Object
Retrives the enviroment element's id.
ReturnsObject — Object. The id of the enviroment element.
|
getHeightAt | () | method |
public function getHeightAt(x:Number, z:Number):Number
Gets the y value by specifing the x and z coordinate according the terrain of the scene.
Parameters
x:Number — Number. The specified x coordinate.
| |
z:Number — Number. The specified z coordiante.
|
Number — Number. The relative y value according to the terrain of the scene. If developers have predefined a calculateHeightFunction in the Network3D, this method will get the y coordinate according to the specified calclateHightFunction.
Otherwise Network3D will return the y coordinate according to the terrain in the scene.
|
getReferenceTerrainID | () | method |
public function getReferenceTerrainID():Object
Retrives the terrain element's id.
ReturnsObject — Object. The id of the terrain element.
|
hideAxises | () | method |
public function hideAxises():void
Hides the axises in the scene.
isValidatedLocation | () | method |
public function isValidatedLocation(x:Number, y:Number, z:Number):Boolean
Decides whether the camera can be moved to the specified postion described by x, y and z coordinates.
Parameters
x:Number — Number. The x coordiante.
| |
y:Number — Number. The y coordinate.
| |
z:Number — Number. The z coordinate.
|
Boolean — Boolean. If the specified position is valid, returns true; otherwise, false.
|
isVisible | () | method |
public function isVisible(element:Element):Boolean
Decides whether a twaver.Element can be seen in the 3D scene.
Parameters
element:Element |
Boolean |
refreshUIs | () | method |
public function refreshUIs():void
removeLight | () | method |
public function removeLight(tag:String):void
Removes a light from the scene by specifing its tag. A SceneEvent whose type is SceneEvent.LIGHT_REMOVED will be dispatched.
Parameters
tag:String — String. The tag of the light which is expected to be removed. Network3D use the tag as an id to indentify a light in the scene.
Please refer to twaver.threed.LightProfile.
|
See also
removeMouseOnCanvasListener | () | method |
public function removeMouseOnCanvasListener(type:String, listener:Function):void
Parameters
type:String | |
listener:Function |
removeMouseOnElementListener | () | method |
public function removeMouseOnElementListener(type:String, listener:Function):void
Parameters
type:String | |
listener:Function |
saveAsBitmapData | () | method |
public function saveAsBitmapData():BitmapData
Exports the current visible scene to a BitmapData object. Developers can implement some requirements with the BitmapData, such as saving it as an image
ReturnsBitmapData — BitmapData. The snap shot of current visible 3D scene.
|
scrafe | () | method |
public function scrafe(d:Number):void
Parameters
d:Number |
setEnviromentByID | () | method |
public function setEnviromentByID(id:Object):void
Specifies which element is used as the enviroment.
Parameters
id:Object — Object. The id of the enviroment element.
|
setInteractions | () | method |
protected function setInteractions(name:String, interactions:Array):void
Parameters
name:String | |
interactions:Array |
setReferenceTerrainByID | () | method |
public function setReferenceTerrainByID(id:Object):void
Specifies which element is used as the terrain. The element can be identified by the specified id.
Parameters
id:Object — Object. The id of the terrain element.
|
shareSceneWith | () | method |
public function shareSceneWith(n:Network3D):void
Shares the whole 3D scene with another Network3D object. Network3D creates the releated 3D objects of the Element objects filled into the ElementBox objects in the 3D scene. If developers want to display the same scene with different camera, developers can invoke this method which can save the memory.
Parameters
n:Network3D — the specified Network3D object to share the same scene.
|
showAxises | () | method |
public function showAxises():void
Displays the axises in the scene.
updateLight | () | method |
public function updateLight(lp:LightProfile):void
Updates the properties of a light which has been added into the scene.
Parameters
lp:LightProfile — A LightProfile object used to store the new properties. Network3D
will find the relative light in the scene by the tag property of lp, and will update the light with the properties stored in lp.
|
walk | () | method |
public function walk(d:Number):void
Parameters
d:Number |
In order to make the stage3D visible: <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:ns="http://www.servasoft.com/twaver/3D" creationComplete="init()" backgroundAlpha="0"><s:Application> Insert 3D obejct: var node:Node = new Node(); node.setStyle(Style3D.THREED_SHAPE_TYPE,Consts3D.THREED_SHAPE_TYPE_BILLBOARD); node.setStyle(Style3D.MAPPINGTYPE,Consts3D.MAPPINGTYPE_COMMON); node.setStyle(Style3D.PROPERTY_SPACE_LOCATION,new Vector3D(0,0,0)); node.setStyle(Style3D.PROPERTY_SIZE,size); node.setStyle(Style3D.BILLBOARD_TEXTURE,source); network.elementBox.add(node); Display shadows: