PageRenderTime 15ms CodeModel.GetById 9ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/src/away3d/events/Object3DEvent.as

http://github.com/away3d/away3d-core-fp11
ActionScript | 67 lines | 24 code | 10 blank | 33 comment | 0 complexity | 3224f980467ac55040eaea18d8de97b6 MD5 | raw file
 1package away3d.events
 2{
 3	import away3d.core.base.*;
 4	
 5	import flash.events.Event;
 6	
 7	/**
 8	 * Passed as a parameter when a 3d object event occurs
 9	 */
10	public class Object3DEvent extends Event
11	{
12		/**
13		 * Defines the value of the type property of a visiblityUpdated event object.
14		 */
15		public static const VISIBLITY_UPDATED:String = "visiblityUpdated";
16		
17		/**
18		 * Defines the value of the type property of a scenetransformChanged event object.
19		 */
20		public static const SCENETRANSFORM_CHANGED:String = "scenetransformChanged";
21		
22		/**
23		 * Defines the value of the type property of a sceneChanged event object.
24		 */
25		public static const SCENE_CHANGED:String = "sceneChanged";
26		
27		/**
28		 * Defines the value of the type property of a positionChanged event object.
29		 */
30		public static const POSITION_CHANGED:String = "positionChanged";
31		
32		/**
33		 * Defines the value of the type property of a rotationChanged event object.
34		 */
35		public static const ROTATION_CHANGED:String = "rotationChanged";
36		
37		/**
38		 * Defines the value of the type property of a scaleChanged event object.
39		 */
40		public static const SCALE_CHANGED:String = "scaleChanged";
41		
42		/**
43		 * A reference to the 3d object that is relevant to the event.
44		 */
45		public var object:Object3D;
46		
47		/**
48		 * Creates a new <code>MaterialEvent</code> object.
49		 *
50		 * @param    type        The type of the event. Possible values are: <code>Object3DEvent.TRANSFORM_CHANGED</code>, <code>Object3DEvent.SCENETRANSFORM_CHANGED</code>, <code>Object3DEvent.SCENE_CHANGED</code>, <code>Object3DEvent.RADIUS_CHANGED</code> and <code>Object3DEvent.DIMENSIONS_CHANGED</code>.
51		 * @param    object        A reference to the 3d object that is relevant to the event.
52		 */
53		public function Object3DEvent(type:String, object:Object3D)
54		{
55			super(type);
56			this.object = object;
57		}
58		
59		/**
60		 * Creates a copy of the Object3DEvent object and sets the value of each property to match that of the original.
61		 */
62		public override function clone():Event
63		{
64			return new Object3DEvent(type, object);
65		}
66	}
67}