/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

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