| Package | sandy.core.scenegraph |
| Class | public class StarField |
| Inheritance | StarField ATransformable Node |
| Implements | IDisplayable |
| Property | Defined by | ||
|---|---|---|---|
![]() | appearance : Appearance
Set that appearance to all the children of that node
| Node | |
![]() | boundingBox : BBox
The bounding box of this node
IMPORTANT: Do not modify it unless you perfectly know what you are doing
| Node | |
![]() | boundingSphere : BSphere
The bounding sphere of this node
IMPORTANT: Do not modify it unless you perfectly know what you are doing
| Node | |
![]() | broadcaster : BubbleEventBroadcaster
The broadcaster
The broadcaster is used to send events to listeners. | Node | |
![]() | changed : Boolean = false
This property set the cache status of the current node.
| Node | |
| container : Sprite [read-only]
The container of this object
| StarField | ||
![]() | culled : CullingState
This property represent the culling state of the current node.
| Node | |
| depth : Number
The depth to draw the starfield at.
| StarField | ||
| depthIndex : int = -1
An index in stars array; if set to valid value, depth returns distance to that star.
| StarField | ||
![]() | disable : Boolean = false
Disable the local transformations applied to this Node if set to false.
| ATransformable | |
![]() | enableBackFaceCulling : Boolean
Change the backface culling state to all the shapes objects in the children list
| Node | |
![]() | enableEvents : Boolean
Enable event handling to all the children objects that can broadcast bubbling events
| Node | |
![]() | enableInteractivity : Boolean
Change the interactivity of all the children
| Node | |
| fadeFrom : Number = 0
Distance from screen where stars start to fade out
| StarField | ||
| fadeTo : Number = 1000
Distance from fadeFrom to the point where stars fade out completely
| StarField | ||
![]() | matrix : Matrix4 | ATransformable | |
![]() | name : String
Name of this node.
| Node | |
![]() | out : Vector
Forward direction ( local z ) in parent coordinates.
| ATransformable | |
![]() | pan : Number
Pans this object around the local y axis.
| ATransformable | |
![]() | parent : Node
The parent node of this node.
| Node | |
![]() | roll : Number
Rolls this object around the local z axis.
| ATransformable | |
![]() | rotateX : Number
Rotates this object around an axis parallel to the parents x axis.
| ATransformable | |
![]() | rotateY : Number
Rotates this object around an axis parallel to the parents y axis.
| ATransformable | |
![]() | rotateZ : Number
Rotates this object around an axis paralell to the parents z axis.
| ATransformable | |
![]() | scaleX : Number
x scale of this object.
| ATransformable | |
![]() | scaleY : Number
y scale of this object.
| ATransformable | |
![]() | scaleZ : Number
z scale of this object.
| ATransformable | |
![]() | scene : Scene3D = null
Reference to the scene is it linked to.
| Node | |
![]() | side : Vector
Side direction ( local x ) in parent coordinates.
| ATransformable | |
| starColors : Array
Array of star colors (if not specified, white is used).
| StarField | ||
| stars : Array
Array of Vertex - star coordinates data.
| StarField | ||
| starSprites : Array
Array of star sprites (any IBitmapDrawable-s; if not specified, StarField uses setPixel to draw a star).
| StarField | ||
![]() | target : Vector
The position in the parent frame this object should "look at".
| ATransformable | |
![]() | tilt : Number
Tilts this object around the local x axis.
| ATransformable | |
![]() | up : Vector
Up direction ( local y ) in parent coordinates.
| ATransformable | |
![]() | useSingleContainer : Boolean
Make all the Shape3D and descendants children react to this value.
| Node | |
![]() | visible : Boolean = true
Specify the visibility of this node.
| Node | |
![]() | x : Number
x position of this object in its parent frame.
| ATransformable | |
![]() | y : Number
y position of this object in its parent frame.
| ATransformable | |
![]() | z : Number
z position of the node in its parent frame.
| ATransformable | |
| Method | Defined by | ||
|---|---|---|---|
|
StarField(p_sName:String = "")
Creates a StarField.
| StarField | ||
![]() |
Adds a new child to this node.
| Node | |
![]() |
addEventListener(p_sEvt:String, p_oL:*):void
Adds a listener for the specified event.
| Node | |
|
clear():void
Clearing is done in render() method.
| StarField | ||
|
This tests for stars visibility.
| StarField | ||
![]() |
destroy():void
Delete this node and all its child nodes.
| Node | |
|
Displays the starfield.
| StarField | ||
![]() |
getChildByName(p_sName:String, p_bRecurs:Boolean = false):Node
Returns the child node with the specified name.
| Node | |
![]() |
getPosition(p_sMode:String = "local"):Vector
Returns the position of this group or object.
| ATransformable | |
![]() |
hasParent():Boolean
Tests if this node has a parent.
| Node | |
![]() |
initFrame():void
Initiates the local coordinate system for this object.
| ATransformable | |
![]() |
Tests if the node passed in the argument is parent of this node.
| Node | |
![]() |
lookAt(p_nX:Number, p_nY:Number, p_nZ:Number):void
Makes this object "look at" the specified position in the parent frame.
| ATransformable | |
![]() |
moveForward(p_nD:Number):void
Translates this object along its forward vector ( local z ) in the parent frame.
| ATransformable | |
![]() |
moveHorizontally(p_nD:Number):void
Translates this object parallel to its parent zx plane and in its forward direction.
| ATransformable | |
![]() |
moveLateraly(p_nD:Number):void
Translates this object laterally in its parent frame.
| ATransformable | |
![]() |
moveSideways(p_nD:Number):void
Translates this object along its side vector ( local x ) in the parent frame.
| ATransformable | |
![]() |
moveUpwards(p_nD:Number):void
Translates this object along its up vector ( local y ) in the parent frame.
| ATransformable | |
![]() |
moveVertically(p_nD:Number):void
Translates this object vertically in ots parent frame.
| ATransformable | |
![]() |
perform(p_iOperation:INodeOperation):void
Performs an operation on this node and all of its children.
| Node | |
|
remove():void
Provide the classical remove behaviour, plus remove the container to the display list.
| StarField | ||
![]() |
removeChildByName(p_sName:String):Boolean
Removes the child node with the specified name.
| Node | |
![]() |
removeEventListener(p_sEvt:String, p_oL:*):void
Removes a listener for the specified event.
| Node | |
|
Renders the starfield
| StarField | ||
![]() |
rotateAxis(p_nX:Number, p_nY:Number, p_nZ:Number, p_nAngle:Number):void
Rotate this object around the specified axis in the parent frame by the specified angle.
| ATransformable | |
![]() |
setPosition(p_nX:Number, p_nY:Number, p_nZ:Number):void
Sets the position of this object in coordinates of its parent frame.
| ATransformable | |
![]() |
swapParent(p_oNewParent:Node):void
Moves this node to another parent node.
| Node | |
![]() |
toString():String
Returns a string representation of this object
| ATransformable | |
![]() |
translate(p_nX:Number, p_nY:Number, p_nZ:Number):void
Translate this object from it's current position with the specified offsets.
| ATransformable | |
![]() |
Updates this node or object.
| ATransformable | |
![]() |
updateTransform():void
Updates the transform matrix of the current object/node before it is rendered.
| ATransformable | |
| container | property |
container:Sprite [read-only]The container of this object
Implementation public function get container():Sprite
| depth | property |
depth:Number [read-write]The depth to draw the starfield at. If depthIndex is set to valid value, depth returns distance to that star, otherwise value set by user (default: 1e10).
Implementation public function get depth():Number
public function set depth(value:Number):void
| depthIndex | property |
public var depthIndex:int = -1An index in stars array; if set to valid value, depth returns distance to that star.
| fadeFrom | property |
public var fadeFrom:Number = 0Distance from screen where stars start to fade out
| fadeTo | property |
public var fadeTo:Number = 1000Distance from fadeFrom to the point where stars fade out completely
| starColors | property |
public var starColors:ArrayArray of star colors (if not specified, white is used).
| stars | property |
public var stars:ArrayArray of Vertex - star coordinates data.
| starSprites | property |
public var starSprites:ArrayArray of star sprites (any IBitmapDrawable-s; if not specified, StarField uses setPixel to draw a star).
Star sprites are affected by corresponding starColors value; for DisplayObject-s, StarField will use their blendMode to draw them.
| StarField | () | constructor |
public function StarField(p_sName:String = "")Creates a StarField.
Parametersp_sName:String (default = "") — A string identifier for this object
|
| clear | () | method |
public function clear():voidClearing is done in render() method.
| cull | () | method |
public override function cull(p_oScene:Scene3D, p_oFrustum:Frustum, p_oViewMatrix:Matrix4, p_bChanged:Boolean):voidThis tests for stars visibility.
Parametersp_oScene:Scene3D — The current scene
|
|
p_oFrustum:Frustum — The frustum of the current camera
|
|
p_oViewMatrix:Matrix4 — The view martix of the curren camera
|
|
p_bChanged:Boolean |
| display | () | method |
public function display(p_oScene:Scene3D, p_oContainer:Sprite = null):voidDisplays the starfield.
Parametersp_oScene:Scene3D — The current scene
|
|
p_oContainer:Sprite (default = null) — The container to draw on
|
| remove | () | method |
public override function remove():voidProvide the classical remove behaviour, plus remove the container to the display list.
| render | () | method |
public override function render(p_oScene:Scene3D, p_oCamera:Camera3D):voidRenders the starfield
Parametersp_oScene:Scene3D — The current scene
|
|
p_oCamera:Camera3D — The current camera
|