| Package | alternativa.engine3d.core |
| Class | public class Surface |
| Implements | flash.events.IEventDispatcher |
| Property | Defined by | ||
|---|---|---|---|
| faces : Set
[read-only] A set of surface faces.
| Surface | ||
| id : Object [read-only] Surface identifier in Mesh-object.
| Surface | ||
| material : SurfaceMaterial
Surface material.
| Surface | ||
| mesh : Mesh
[read-only] Mesh-object containing given surface.
| Surface | ||
| mouseEnabled : Boolean = true Specifies whether this surface receives mouse messages.
| Surface | ||
| Method | Defined by | ||
|---|---|---|---|
|
Surface()
Creates a surface instance.
| Surface | ||
|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener.
| Surface | ||
|
addFace(face:Object):void
Add face to surface.
| Surface | ||
|
dispatchEvent(event:Event):Boolean
Dispatches an event.
| Surface | ||
|
hasEventListener(type:String):Boolean
Checks if there are registered event listeners for events with the given type.
| Surface | ||
|
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes an event listener.
| Surface | ||
|
removeFace(face:Object):void
Delete face from surface.
| Surface | ||
|
toString():String
Get string representation of object.
| Surface | ||
|
willTrigger(type:String):Boolean
| Surface | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when a user presses and releases left mouse button over the same surface. | Surface | |||
| Dispatched when a user presses left mouse button over a surface. | Surface | |||
| Dispatched when a user moves mouse cursor while it is over a surface. | Surface | |||
| Dispatched when a user moves mouse cursor away from a surface. | Surface | |||
| Dispatched when a user moves mouse cursor over a surface. | Surface | |||
| Dispatched when a user releases left mouse button over a surface. | Surface | |||
| Dispatched when a user spins mouse wheel over a surface. | Surface | |||
| faces | property |
| id | property |
id:Object [read-only]Surface identifier in Mesh-object. If surface does not belong to any Mesh-object, identifier value is set to null.
public function get id():Object
| material | property |
material:SurfaceMaterial [read-write]Surface material. When new material is assigned, old one will be deleted.
Implementation public function get material():SurfaceMaterial
public function set material(value:SurfaceMaterial):void
| mesh | property |
mesh:Mesh [read-only]Mesh-object containing given surface.
Implementation public function get mesh():Mesh
| mouseEnabled | property |
public var mouseEnabled:Boolean = trueSpecifies whether this surface receives mouse messages.
| Surface | () | constructor |
public function Surface()Creates a surface instance.
| addEventListener | () | method |
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):voidRegisters an event listener.
Parameterstype:String — the type of an event |
|
listener:Function — the listener function |
|
useCapture:Boolean (default = false) — not used |
|
priority:int (default = 0) — the priority level of the event listener. All listeners with priority n are processed before listeners of priority n-1. If two or more listeners share the same priority, they are processed in the order in which they were added. |
|
useWeakReference:Boolean (default = false) — Determines whether the reference to the listener is strong or weak. A strong reference prevents your listener from being garbage-collected. A weak reference does not. |
| addFace | () | method |
public function addFace(face:Object):voidAdd face to surface.
Parametersface:Object — Face class instance |
FaceNotFoundError — an attempt to add face that is already there |
|
InvalidIDError — an attempt to add face that is already there |
|
FaceExistsError — an attempt to add face that is already there |
See also
| dispatchEvent | () | method |
public function dispatchEvent(event:Event):BooleanDispatches an event.
Parametersevent:Event — the event to dispatch |
Boolean — false |
| hasEventListener | () | method |
public function hasEventListener(type:String):BooleanChecks if there are registered event listeners for events with the given type.
Parameterstype:String — the type of an event |
Boolean — true if there are listeners of events with the specified type, otherwise false |
| removeEventListener | () | method |
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):voidRemoves an event listener.
Parameterstype:String — the type of an event |
|
listener:Function — the listener function |
|
useCapture:Boolean (default = false) — not used |
| removeFace | () | method |
public function removeFace(face:Object):voidDelete face from surface. Face can be referred by alternativa.engine3d.core.Face class instance or Mesh-object face identifier.
face:Object — Face class instance or face identifier. |
FaceNotFoundError — an attempt to refer to a face with reserved value |
|
InvalidIDError — an attempt to refer to a face with reserved value |
See also
| toString | () | method |
public function toString():StringGet string representation of object.
ReturnsString — a string representation of the object |
| willTrigger | () | method |
public function willTrigger(type:String):BooleanParameters
type:String |
Boolean |
| click | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.CLICK
Dispatched when a user presses and releases left mouse button over the same surface.
The value of thetype property of a click event object.| mouseDown | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.MOUSE_DOWN
Dispatched when a user presses left mouse button over a surface.
The value of thetype property of a mouseDown event object.| mouseMove | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.MOUSE_MOVE
Dispatched when a user moves mouse cursor while it is over a surface.
The value of thetype property of a mouseMove event object.| mouseOut | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.MOUSE_OUT
Dispatched when a user moves mouse cursor away from a surface.
The value of thetype property of a mouseOut event object.| mouseOver | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.MOUSE_OVER
Dispatched when a user moves mouse cursor over a surface.
The value of thetype property of a mouseOver event object.| mouseUp | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.MOUSE_UP
Dispatched when a user releases left mouse button over a surface.
The value of thetype property of a mouseUp event object.| mouseWheel | event |
alternativa.engine3d.events.MouseEvent3D
alternativa.engine3d.events.MouseEvent3D.MOUSE_WHEEL
Dispatched when a user spins mouse wheel over a surface.
The value of thetype property of a mouseWheel event object.