| Package | sandy.core.scenegraph |
| Class | public class Sound3D |
| Inheritance | Sound3D ATransformable Node |
| 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 | |
![]() | culled : CullingState
This property represent the culling state of the current node.
| Node | |
| CULL_PLAY : String = "cullPlay" [static]
| Sound3D | ||
| CULL_STOP : String = "cullStop" [static]
| Sound3D | ||
| currentLoop : int [read-only]
| Sound3D | ||
![]() | 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 | |
| flipPan : Boolean = true
If flipPan is true the left and right channels of the sound are mirrored if the camera is facing away from the sound
| Sound3D | ||
| isFlipped : Boolean [read-only]
Returns true if the stereo panorama is mirrored, flipPan have to be true to enable stereo flipping
| Sound3D | ||
| LOOP : String = "loop" [static]
| Sound3D | ||
| loops : int = 0xffffff
Number of loops before the sound stops
| Sound3D | ||
| loopStartTime : Number = 0
Start time to play the audio from if the sound loops
| Sound3D | ||
![]() | matrix : Matrix4 | ATransformable | |
| maxPan : Number = 1
Maximal pan is a positive Number from 0-1 or higher
| Sound3D | ||
![]() | 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 | |
| soundChannel : SoundChannel [read-only]
| Sound3D | ||
| soundMode : String [read-only]
| Sound3D | ||
| soundPan : Boolean = true
If pan is true the panning of the sound is relative to the camera rotation
| Sound3D | ||
| soundRadius : Number
The radius of the sound
| Sound3D | ||
| soundSource : *
Set the sound source, the sound source can be a String, URLRequest, Sound or SoundChannel object
| Sound3D | ||
| soundVolume : Number
Max volume of the sound if camera position is at sound position
| Sound3D | ||
| startTime : Number = 0
The start time to play the audio from
| Sound3D | ||
| stereo : Boolean = false
If the sound contains two channels, stereo have to be set to true in order to mix left and right channels correctly
| Sound3D | ||
![]() | 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 | |
| type : String = "speech"
Type is either SPEECH or NOISE, SPEECH will start the sound at the last position if the camera enters the sphere of the sound
| Sound3D | ||
![]() | 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 | ||
|---|---|---|---|
|
Sound3D(p_sName:String = "", p_oSoundSource:* = null, p_nVolume:Number = 1, p_nMaxPan:Number = 0, p_nRadius:Number = 1, p_bStereo:Boolean = false)
Creates a 3D sound object wich can be placed in the 3d scene.
| Sound3D | ||
![]() |
Adds a new child to this node.
| Node | |
![]() |
addEventListener(p_sEvt:String, p_oL:*):void
Adds a listener for the specified event.
| Node | |
| Sound3D | |||
![]() |
destroy():void
Delete this node and all its child nodes.
| Node | |
![]() |
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 | |
|
play(p_nStartTime:Number = -1, p_iLoops:int = -1, p_nLoopStartTime:Number = -1, p_bResume:Boolean = false):void
Start Sound sources of type Sound or UrlRequest.
| Sound3D | ||
![]() |
remove():void
Removes this node from the node tree, saving its child nodes.
| Node | |
![]() |
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 this node.
| Node | |
![]() |
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 | |
|
stop():void
Stop the sound source and SoundChannel
| Sound3D | ||
![]() |
swapParent(p_oNewParent:Node):void
Moves this node to another parent node.
| Node | |
|
toString():String
| Sound3D | ||
![]() |
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 | |
| Constant | Defined by | ||
|---|---|---|---|
![]() | children : Array
The children of this node are stored inside this array.
| Node | |
![]() | id : uint
The unique id of this node in the node graph.
| Node | |
![]() | modelMatrix : Matrix4
Cached matrix corresponding to the transformation to the 0,0,0 frame system
| Node | |
| NOISE : String = "noise" [static]
| Sound3D | ||
| SPEECH : String = "speech" [static]
| Sound3D | ||
![]() | viewMatrix : Matrix4
Cached matrix corresponding to the transformation to the camera frame system
| Node | |
| CULL_PLAY | property |
public static var CULL_PLAY:String = "cullPlay"
| CULL_STOP | property |
public static var CULL_STOP:String = "cullStop"
| currentLoop | property |
currentLoop:int [read-only]Implementation
public function get currentLoop():int
| flipPan | property |
public var flipPan:Boolean = trueIf flipPan is true the left and right channels of the sound are mirrored if the camera is facing away from the sound
| isFlipped | property |
isFlipped:Boolean [read-only]Returns true if the stereo panorama is mirrored, flipPan have to be true to enable stereo flipping
Implementation public function get isFlipped():Boolean
| LOOP | property |
public static var LOOP:String = "loop"
| loops | property |
public var loops:int = 0xffffffNumber of loops before the sound stops
| loopStartTime | property |
public var loopStartTime:Number = 0Start time to play the audio from if the sound loops
| maxPan | property |
public var maxPan:Number = 1Maximal pan is a positive Number from 0-1 or higher
| soundChannel | property |
soundChannel:SoundChannel [read-only]Implementation
public function get soundChannel():SoundChannel
| soundMode | property |
soundMode:String [read-only]Implementation
public function get soundMode():String
| soundPan | property |
public var soundPan:Boolean = trueIf pan is true the panning of the sound is relative to the camera rotation
| soundRadius | property |
public var soundRadius:NumberThe radius of the sound
| soundSource | property |
soundSource:* [read-write]Set the sound source, the sound source can be a String, URLRequest, Sound or SoundChannel object
Implementation public function get soundSource():*
public function set soundSource(value:*):void
| soundVolume | property |
public var soundVolume:NumberMax volume of the sound if camera position is at sound position
| startTime | property |
public var startTime:Number = 0The start time to play the audio from
| stereo | property |
public var stereo:Boolean = falseIf the sound contains two channels, stereo have to be set to true in order to mix left and right channels correctly
| type | property |
public var type:String = "speech"Type is either SPEECH or NOISE, SPEECH will start the sound at the last position if the camera enters the sphere of the sound
| Sound3D | () | constructor |
public function Sound3D(p_sName:String = "", p_oSoundSource:* = null, p_nVolume:Number = 1, p_nMaxPan:Number = 0, p_nRadius:Number = 1, p_bStereo:Boolean = false)Creates a 3D sound object wich can be placed in the 3d scene. Set stereo to true if the sound source is in stereo. If stereo is true, both channels are at the same position in 3d space, but the stereo panorama is kept and mirrored if required. To create a true stereo effect, take two Sound3D instances and two mono sound sources on different locations in 3d space.
Parametersp_sName:String (default = "") — p_sName A string identifier for this object
|
|
p_oSoundSource:* (default = null) — The sound source, a String, UrlRequest, Sound or a SoundChannel object
|
|
p_nVolume:Number (default = 1) — Volume of the sound
|
|
p_nMaxPan:Number (default = 0) — Max pan of the sound, if zero panning is disabled
|
|
p_nRadius:Number (default = 1) — Radius of the sound in 3d units
|
|
p_bStereo:Boolean (default = false) — If the sound contains two different channels
|
| cull | () | method |
public override function cull(p_oScene:Scene3D, p_oFrustum:Frustum, p_oViewMatrix:Matrix4, p_bChanged:Boolean):voidParameters
p_oScene:Scene3D |
|
p_oFrustum:Frustum |
|
p_oViewMatrix:Matrix4 |
|
p_bChanged:Boolean |
| play | () | method |
public function play(p_nStartTime:Number = -1, p_iLoops:int = -1, p_nLoopStartTime:Number = -1, p_bResume:Boolean = false):voidStart Sound sources of type Sound or UrlRequest. Sound sources of type SoundChannel don't support the play method
Parametersp_nStartTime:Number (default = -1) |
|
p_iLoops:int (default = -1) |
|
p_nLoopStartTime:Number (default = -1) |
|
p_bResume:Boolean (default = false) |
| stop | () | method |
public function stop():voidStop the sound source and SoundChannel
| toString | () | method |
public override function toString():String
Returns
String |
| NOISE | constant |
public static const NOISE:String = "noise"
| SPEECH | constant |
public static const SPEECH:String = "speech"