@awayjs/scene 0.13.325 → 0.13.327

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/.eslintrc +100 -100
  2. package/README.md +61 -61
  3. package/bundle/awayjs-scene.umd.js +2 -2
  4. package/bundle/awayjs-scene.umd.js.map +1 -1
  5. package/copyVersionToIndex.js +23 -23
  6. package/dist/index.d.ts +76 -76
  7. package/dist/index.js +67 -67
  8. package/dist/lib/Scene.d.ts +85 -85
  9. package/dist/lib/Scene.d.ts.map +1 -1
  10. package/dist/lib/Scene.js +285 -285
  11. package/dist/lib/Settings.d.ts +15 -16
  12. package/dist/lib/Settings.d.ts.map +1 -1
  13. package/dist/lib/Settings.js +56 -60
  14. package/dist/lib/adapters/IDisplayObjectAdapter.d.ts +13 -13
  15. package/dist/lib/adapters/IDisplayObjectAdapter.js +1 -1
  16. package/dist/lib/adapters/IFilter.d.ts +24 -24
  17. package/dist/lib/adapters/IFilter.js +1 -1
  18. package/dist/lib/adapters/IMovieClipAdapter.d.ts +15 -15
  19. package/dist/lib/adapters/IMovieClipAdapter.js +1 -1
  20. package/dist/lib/adapters/ITextfieldAdapter.d.ts +4 -4
  21. package/dist/lib/adapters/ITextfieldAdapter.js +1 -1
  22. package/dist/lib/base/IBitmapDrawable.d.ts +11 -11
  23. package/dist/lib/base/IBitmapDrawable.js +1 -1
  24. package/dist/lib/base/IFrameLabel.d.ts +4 -4
  25. package/dist/lib/base/IFrameLabel.js +1 -1
  26. package/dist/lib/base/IFrameScript.d.ts +5 -5
  27. package/dist/lib/base/IFrameScript.js +1 -1
  28. package/dist/lib/base/MouseButtons.d.ts +26 -26
  29. package/dist/lib/base/MouseButtons.js +1 -1
  30. package/dist/lib/base/Timeline.d.ts +147 -147
  31. package/dist/lib/base/Timeline.js +525 -525
  32. package/dist/lib/base/TimelineActionType.d.ts +18 -18
  33. package/dist/lib/base/TimelineActionType.js +1 -1
  34. package/dist/lib/controllers/ControllerBase.d.ts +14 -14
  35. package/dist/lib/controllers/ControllerBase.js +60 -60
  36. package/dist/lib/controllers/FirstPersonController.d.ts +78 -78
  37. package/dist/lib/controllers/FirstPersonController.js +228 -228
  38. package/dist/lib/controllers/FollowController.d.ts +12 -12
  39. package/dist/lib/controllers/FollowController.js +27 -27
  40. package/dist/lib/controllers/HoverController.d.ts +105 -105
  41. package/dist/lib/controllers/HoverController.js +302 -302
  42. package/dist/lib/controllers/LookAtController.d.ts +14 -14
  43. package/dist/lib/controllers/LookAtController.js +68 -68
  44. package/dist/lib/controllers/SpringController.d.ts +38 -38
  45. package/dist/lib/controllers/SpringController.js +59 -59
  46. package/dist/lib/display/Billboard.d.ts +132 -132
  47. package/dist/lib/display/Billboard.js +397 -397
  48. package/dist/lib/display/Camera.d.ts +31 -31
  49. package/dist/lib/display/Camera.js +72 -72
  50. package/dist/lib/display/DisplayObject.d.ts +926 -921
  51. package/dist/lib/display/DisplayObject.d.ts.map +1 -1
  52. package/dist/lib/display/DisplayObject.js +1603 -1595
  53. package/dist/lib/display/DisplayObjectContainer.d.ts +325 -325
  54. package/dist/lib/display/DisplayObjectContainer.js +486 -486
  55. package/dist/lib/display/LineSegment.d.ts +69 -69
  56. package/dist/lib/display/LineSegment.js +203 -203
  57. package/dist/lib/display/LoaderContainer.d.ts +504 -504
  58. package/dist/lib/display/LoaderContainer.js +603 -603
  59. package/dist/lib/display/MorphSprite.d.ts +20 -20
  60. package/dist/lib/display/MorphSprite.js +246 -246
  61. package/dist/lib/display/MovieClip.d.ts +149 -149
  62. package/dist/lib/display/MovieClip.js +733 -733
  63. package/dist/lib/display/SimpleButton.d.ts +158 -158
  64. package/dist/lib/display/SimpleButton.js +228 -228
  65. package/dist/lib/display/Skybox.d.ts +144 -144
  66. package/dist/lib/display/Skybox.js +288 -288
  67. package/dist/lib/display/Sprite.d.ts +65 -65
  68. package/dist/lib/display/Sprite.js +134 -134
  69. package/dist/lib/display/TextField.d.ts +1104 -1104
  70. package/dist/lib/display/TextField.js +3019 -3019
  71. package/dist/lib/display/TextSprite.d.ts +16 -16
  72. package/dist/lib/display/TextSprite.js +36 -36
  73. package/dist/lib/elements/SkyboxElements.d.ts +29 -29
  74. package/dist/lib/elements/SkyboxElements.js +127 -127
  75. package/dist/lib/errors/CastError.d.ts +4 -4
  76. package/dist/lib/errors/CastError.js +10 -10
  77. package/dist/lib/events/CameraEvent.d.ts +16 -16
  78. package/dist/lib/events/CameraEvent.js +30 -30
  79. package/dist/lib/events/FocusEvent.d.ts +42 -42
  80. package/dist/lib/events/FocusEvent.js +43 -43
  81. package/dist/lib/events/KeyboardEvent.d.ts +21 -21
  82. package/dist/lib/events/KeyboardEvent.js +43 -43
  83. package/dist/lib/events/MouseEvent.d.ts +91 -91
  84. package/dist/lib/events/MouseEvent.js +122 -122
  85. package/dist/lib/events/PointerEvent.d.ts +93 -93
  86. package/dist/lib/events/PointerEvent.js +73 -73
  87. package/dist/lib/events/ResizeEvent.d.ts +15 -15
  88. package/dist/lib/events/ResizeEvent.js +38 -38
  89. package/dist/lib/events/TextfieldEvent.d.ts +19 -19
  90. package/dist/lib/events/TextfieldEvent.js +28 -28
  91. package/dist/lib/events/TouchEvent.d.ts +54 -54
  92. package/dist/lib/events/TouchEvent.js +89 -89
  93. package/dist/lib/factories/DefaultSceneGraphFactory.d.ts +27 -27
  94. package/dist/lib/factories/DefaultSceneGraphFactory.js +55 -55
  95. package/dist/lib/factories/ISceneGraphFactory.d.ts +20 -20
  96. package/dist/lib/factories/ISceneGraphFactory.js +1 -1
  97. package/dist/lib/image/SceneImage2D.d.ts +221 -220
  98. package/dist/lib/image/SceneImage2D.d.ts.map +1 -1
  99. package/dist/lib/image/SceneImage2D.js +609 -610
  100. package/dist/lib/managers/DefaultFontManager.d.ts +14 -14
  101. package/dist/lib/managers/DefaultFontManager.js +101 -101
  102. package/dist/lib/managers/DeviceFontManager.d.ts +8 -8
  103. package/dist/lib/managers/DeviceFontManager.js +44 -44
  104. package/dist/lib/managers/FrameScriptManager.d.ts +37 -37
  105. package/dist/lib/managers/FrameScriptManager.js +386 -386
  106. package/dist/lib/managers/IInputRecorder.d.ts +3 -3
  107. package/dist/lib/managers/IInputRecorder.js +1 -1
  108. package/dist/lib/managers/MouseManager.d.ts +74 -74
  109. package/dist/lib/managers/MouseManager.js +803 -803
  110. package/dist/lib/prefabs/PrefabBase.d.ts +19 -19
  111. package/dist/lib/prefabs/PrefabBase.js +42 -42
  112. package/dist/lib/prefabs/PrimitiveCapsulePrefab.d.ts +56 -56
  113. package/dist/lib/prefabs/PrimitiveCapsulePrefab.js +269 -269
  114. package/dist/lib/prefabs/PrimitiveConePrefab.d.ts +21 -21
  115. package/dist/lib/prefabs/PrimitiveConePrefab.js +43 -43
  116. package/dist/lib/prefabs/PrimitiveCubePrefab.d.ts +74 -74
  117. package/dist/lib/prefabs/PrimitiveCubePrefab.js +545 -545
  118. package/dist/lib/prefabs/PrimitiveCylinderPrefab.d.ts +79 -79
  119. package/dist/lib/prefabs/PrimitiveCylinderPrefab.js +584 -584
  120. package/dist/lib/prefabs/PrimitivePlanePrefab.d.ts +65 -65
  121. package/dist/lib/prefabs/PrimitivePlanePrefab.js +300 -300
  122. package/dist/lib/prefabs/PrimitivePolygonPrefab.d.ts +29 -29
  123. package/dist/lib/prefabs/PrimitivePolygonPrefab.js +64 -64
  124. package/dist/lib/prefabs/PrimitivePrefabBase.d.ts +67 -67
  125. package/dist/lib/prefabs/PrimitivePrefabBase.js +158 -158
  126. package/dist/lib/prefabs/PrimitiveSpherePrefab.d.ts +48 -48
  127. package/dist/lib/prefabs/PrimitiveSpherePrefab.js +294 -294
  128. package/dist/lib/prefabs/PrimitiveTorusPrefab.d.ts +55 -55
  129. package/dist/lib/prefabs/PrimitiveTorusPrefab.js +260 -260
  130. package/dist/lib/text/AntiAliasType.d.ts +24 -24
  131. package/dist/lib/text/AntiAliasType.js +28 -28
  132. package/dist/lib/text/BitmapFontChar.d.ts +39 -39
  133. package/dist/lib/text/BitmapFontChar.js +42 -42
  134. package/dist/lib/text/BitmapFontTable.d.ts +73 -73
  135. package/dist/lib/text/BitmapFontTable.js +183 -183
  136. package/dist/lib/text/FNTGenerator.d.ts +10 -10
  137. package/dist/lib/text/FNTGenerator.js +74 -74
  138. package/dist/lib/text/FNTGeneratorCanvas.d.ts +22 -22
  139. package/dist/lib/text/FNTGeneratorCanvas.js +211 -211
  140. package/dist/lib/text/FNTGeneratrorBase.d.ts +7 -7
  141. package/dist/lib/text/FNTGeneratrorBase.js +7 -7
  142. package/dist/lib/text/Font.d.ts +38 -38
  143. package/dist/lib/text/Font.js +109 -109
  144. package/dist/lib/text/FontLookUpMode.d.ts +5 -5
  145. package/dist/lib/text/FontLookUpMode.js +7 -7
  146. package/dist/lib/text/FontStyleName.d.ts +6 -6
  147. package/dist/lib/text/FontStyleName.js +7 -7
  148. package/dist/lib/text/GridFitType.d.ts +31 -31
  149. package/dist/lib/text/GridFitType.js +35 -35
  150. package/dist/lib/text/HTMLTextProcessor.d.ts +8 -8
  151. package/dist/lib/text/HTMLTextProcessor.js +426 -426
  152. package/dist/lib/text/IFontTable.d.ts +16 -16
  153. package/dist/lib/text/IFontTable.js +1 -1
  154. package/dist/lib/text/TesselatedFontChar.d.ts +58 -58
  155. package/dist/lib/text/TesselatedFontChar.js +66 -66
  156. package/dist/lib/text/TesselatedFontTable.d.ts +88 -88
  157. package/dist/lib/text/TesselatedFontTable.js +963 -963
  158. package/dist/lib/text/TextFieldAutoSize.d.ts +28 -28
  159. package/dist/lib/text/TextFieldAutoSize.js +32 -32
  160. package/dist/lib/text/TextFieldType.d.ts +20 -20
  161. package/dist/lib/text/TextFieldType.js +24 -24
  162. package/dist/lib/text/TextFormat.d.ts +273 -273
  163. package/dist/lib/text/TextFormat.js +449 -449
  164. package/dist/lib/text/TextFormatAlign.d.ts +26 -26
  165. package/dist/lib/text/TextFormatAlign.js +30 -30
  166. package/dist/lib/text/TextInteractionMode.d.ts +21 -21
  167. package/dist/lib/text/TextInteractionMode.js +25 -25
  168. package/dist/lib/text/TextLineMetrics.d.ts +61 -61
  169. package/dist/lib/text/TextLineMetrics.js +42 -42
  170. package/dist/lib/text/TextShape.d.ts +22 -22
  171. package/dist/lib/text/TextShape.js +75 -75
  172. package/dist/lib/tools/Merge.d.ts +81 -81
  173. package/dist/lib/tools/Merge.js +266 -266
  174. package/dist/lib/utils/Cast.d.ts +20 -20
  175. package/dist/lib/utils/Cast.js +271 -271
  176. package/index.ts +92 -92
  177. package/lib/Scene.ts +340 -339
  178. package/lib/Settings.ts +77 -83
  179. package/lib/adapters/IDisplayObjectAdapter.ts +23 -23
  180. package/lib/adapters/IFilter.ts +25 -25
  181. package/lib/adapters/IMovieClipAdapter.ts +26 -26
  182. package/lib/adapters/ITextfieldAdapter.ts +6 -6
  183. package/lib/base/IBitmapDrawable.ts +13 -13
  184. package/lib/base/IFrameLabel.ts +3 -3
  185. package/lib/base/IFrameScript.ts +4 -4
  186. package/lib/base/MouseButtons.ts +31 -31
  187. package/lib/base/Timeline.ts +715 -715
  188. package/lib/base/TimelineActionType.ts +18 -18
  189. package/lib/controllers/ControllerBase.ts +66 -66
  190. package/lib/controllers/FirstPersonController.ts +241 -241
  191. package/lib/controllers/FollowController.ts +22 -22
  192. package/lib/controllers/HoverController.ts +304 -304
  193. package/lib/controllers/LookAtController.ts +75 -75
  194. package/lib/controllers/SpringController.ts +91 -91
  195. package/lib/display/Billboard.ts +468 -468
  196. package/lib/display/Camera.ts +75 -75
  197. package/lib/display/DisplayObject.ts +1843 -1829
  198. package/lib/display/DisplayObjectContainer.ts +546 -546
  199. package/lib/display/LineSegment.ts +229 -229
  200. package/lib/display/LoaderContainer.ts +651 -651
  201. package/lib/display/MorphSprite.ts +339 -339
  202. package/lib/display/MovieClip.ts +870 -870
  203. package/lib/display/SimpleButton.ts +224 -224
  204. package/lib/display/Skybox.ts +352 -352
  205. package/lib/display/Sprite.ts +154 -154
  206. package/lib/display/TextField.ts +3876 -3876
  207. package/lib/display/TextSprite.ts +34 -34
  208. package/lib/elements/SkyboxElements.ts +141 -141
  209. package/lib/errors/CastError.ts +6 -6
  210. package/lib/events/CameraEvent.ts +29 -29
  211. package/lib/events/FocusEvent.ts +69 -69
  212. package/lib/events/KeyboardEvent.ts +40 -40
  213. package/lib/events/MouseEvent.ts +144 -144
  214. package/lib/events/PointerEvent.ts +145 -145
  215. package/lib/events/ResizeEvent.ts +31 -31
  216. package/lib/events/TextfieldEvent.ts +28 -28
  217. package/lib/events/TouchEvent.ts +103 -103
  218. package/lib/factories/DefaultSceneGraphFactory.ts +58 -58
  219. package/lib/factories/ISceneGraphFactory.ts +28 -28
  220. package/lib/image/SceneImage2D.ts +912 -912
  221. package/lib/managers/DefaultFontManager.ts +124 -124
  222. package/lib/managers/DeviceFontManager.ts +55 -55
  223. package/lib/managers/FrameScriptManager.ts +440 -440
  224. package/lib/managers/IInputRecorder.ts +2 -2
  225. package/lib/managers/MouseManager.ts +942 -942
  226. package/lib/prefabs/PrefabBase.ts +47 -47
  227. package/lib/prefabs/PrimitiveCapsulePrefab.ts +286 -286
  228. package/lib/prefabs/PrimitiveConePrefab.ts +37 -37
  229. package/lib/prefabs/PrimitiveCubePrefab.ts +630 -630
  230. package/lib/prefabs/PrimitiveCylinderPrefab.ts +657 -657
  231. package/lib/prefabs/PrimitivePlanePrefab.ts +352 -352
  232. package/lib/prefabs/PrimitivePolygonPrefab.ts +53 -53
  233. package/lib/prefabs/PrimitivePrefabBase.ts +177 -177
  234. package/lib/prefabs/PrimitiveSpherePrefab.ts +336 -336
  235. package/lib/prefabs/PrimitiveTorusPrefab.ts +282 -282
  236. package/lib/text/AntiAliasType.ts +24 -24
  237. package/lib/text/BitmapFontChar.ts +53 -53
  238. package/lib/text/BitmapFontTable.ts +213 -213
  239. package/lib/text/FNTGenerator.ts +100 -100
  240. package/lib/text/FNTGeneratorCanvas.ts +292 -292
  241. package/lib/text/FNTGeneratrorBase.ts +10 -10
  242. package/lib/text/Font.ts +114 -114
  243. package/lib/text/FontLookUpMode.ts +5 -5
  244. package/lib/text/FontStyleName.ts +6 -6
  245. package/lib/text/GridFitType.ts +32 -32
  246. package/lib/text/HTMLTextProcessor.ts +421 -421
  247. package/lib/text/IFontTable.ts +17 -17
  248. package/lib/text/TesselatedFontChar.ts +80 -80
  249. package/lib/text/TesselatedFontTable.ts +1181 -1181
  250. package/lib/text/TextFieldAutoSize.ts +30 -30
  251. package/lib/text/TextFieldType.ts +21 -21
  252. package/lib/text/TextFormat.ts +603 -603
  253. package/lib/text/TextFormatAlign.ts +28 -28
  254. package/lib/text/TextInteractionMode.ts +21 -21
  255. package/lib/text/TextLineMetrics.ts +74 -74
  256. package/lib/text/TextShape.ts +91 -91
  257. package/lib/tools/Merge.ts +311 -311
  258. package/lib/utils/Cast.ts +304 -304
  259. package/package.json +74 -74
  260. package/rollup.config.js +33 -33
  261. package/scripts/build.sh +2 -2
  262. package/scripts/gendocs.sh +14 -14
  263. package/scripts/genexamples.sh +14 -14
  264. package/scripts/genfull.sh +14 -14
  265. package/system.config.js +51 -51
  266. package/tsconfig.json +18 -18
@@ -1,922 +1,927 @@
1
- import { Transform, Matrix3D, Rectangle, Vector3D, AssetBase, Loader } from '@awayjs/core';
2
- import { BlendMode } from '@awayjs/stage';
3
- import { BoundingVolumeType, IEntity, BoundsPicker, HierarchicalProperty, AlignmentMode, OrientationMode, IContainer, ContainerNode } from '@awayjs/view';
4
- import { IMaterial, Style, StyleEvent, RenderEntity, _Render_RenderableBase, CacheRenderer } from '@awayjs/renderer';
5
- import { DisplayObjectContainer } from './DisplayObjectContainer';
6
- import { ControllerBase } from '../controllers/ControllerBase';
7
- import { IBitmapDrawable } from '../base/IBitmapDrawable';
8
- import { IFilter } from '../adapters/IFilter';
9
- /**
10
- * The DisplayObject class is the base class for all objects that can be
11
- * placed on the display list. The display list manages all objects displayed
12
- * in flash. Use the DisplayObjectContainer class to arrange the
13
- * display objects in the display list. DisplayObjectContainer objects can
14
- * have child display objects, while other display objects, such as Shape and
15
- * TextField objects, are "leaf" nodes that have only parents and siblings, no
16
- * children.
17
- *
18
- * <p>The DisplayObject class supports fbasic functionality like the <i>x</i>
19
- * and <i>y</i> position of an object, as well as more advanced properties of
20
- * the object such as its transformation matrix. </p>
21
- *
22
- * <p>DisplayObject is an abstract base class; therefore, you cannot call
23
- * DisplayObject directly. Invoking <code>new DisplayObject()</code> throws an
24
- * <code>ArgumentError</code> exception. </p>
25
- *
26
- * <p>All display objects inherit from the DisplayObject class.</p>
27
- *
28
- * <p>The DisplayObject class itself does not include any APIs for rendering
29
- * content onscreen. For that reason, if you want create a custom subclass of
30
- * the DisplayObject class, you will want to extend one of its subclasses that
31
- * do have APIs for rendering content onscreen, such as the Shape, Sprite,
32
- * Bitmap, SimpleButton, TextField, or MovieClip class.</p>
33
- *
34
- * <p>The DisplayObject class contains several broadcast events. Normally, the
35
- * target of any particular event is a specific DisplayObject instance. For
36
- * example, the target of an <code>added</code> event is the specific
37
- * DisplayObject instance that was added to the display list. Having a single
38
- * target restricts the placement of event listeners to that target and in
39
- * some cases the target's ancestors on the display list. With broadcast
40
- * events, however, the target is not a specific DisplayObject instance, but
41
- * rather all DisplayObject instances, including those that are not on the
42
- * display list. This means that you can add a listener to any DisplayObject
43
- * instance to listen for broadcast events. In addition to the broadcast
44
- * events listed in the DisplayObject class's Events table, the DisplayObject
45
- * class also inherits two broadcast events from the EventDispatcher class:
46
- * <code>activate</code> and <code>deactivate</code>.</p>
47
- *
48
- * <p>Some properties previously used in the ActionScript 1.0 and 2.0
49
- * MovieClip, TextField, and Button classes(such as <code>_alpha</code>,
50
- * <code>_height</code>, <code>_pName</code>, <code>_width</code>,
51
- * <code>_x</code>, <code>_y</code>, and others) have equivalents in the
52
- * ActionScript 3.0 DisplayObject class that are renamed so that they no
53
- * longer begin with the underscore(_) character.</p>
54
- *
55
- * <p>For more information, see the "Display Programming" chapter of the
56
- * <i>ActionScript 3.0 Developer's Guide</i>.</p>
57
- *
58
- * @event added Dispatched when a display object is added to the
59
- * display list. The following methods trigger this
60
- * event:
61
- * <code>DisplayObjectContainer.addChild()</code>,
62
- * <code>DisplayObjectContainer.addChildAt()</code>.
63
- * @event addedToScene Dispatched when a display object is added to the on
64
- * scene display list, either directly or through the
65
- * addition of a sub tree in which the display object
66
- * is contained. The following methods trigger this
67
- * event:
68
- * <code>DisplayObjectContainer.addChild()</code>,
69
- * <code>DisplayObjectContainer.addChildAt()</code>.
70
- * @event enterFrame [broadcast event] Dispatched when the playhead is
71
- * entering a new frame. If the playhead is not
72
- * moving, or if there is only one frame, this event
73
- * is dispatched continuously in conjunction with the
74
- * frame rate. This event is a broadcast event, which
75
- * means that it is dispatched by all display objects
76
- * with a listener registered for this event.
77
- * @event exitFrame [broadcast event] Dispatched when the playhead is
78
- * exiting the current frame. All frame scripts have
79
- * been run. If the playhead is not moving, or if
80
- * there is only one frame, this event is dispatched
81
- * continuously in conjunction with the frame rate.
82
- * This event is a broadcast event, which means that
83
- * it is dispatched by all display objects with a
84
- * listener registered for this event.
85
- * @event frameConstructed [broadcast event] Dispatched after the constructors
86
- * of frame display objects have run but before frame
87
- * scripts have run. If the playhead is not moving, or
88
- * if there is only one frame, this event is
89
- * dispatched continuously in conjunction with the
90
- * frame rate. This event is a broadcast event, which
91
- * means that it is dispatched by all display objects
92
- * with a listener registered for this event.
93
- * @event removed Dispatched when a display object is about to be
94
- * removed from the display list. Two methods of the
95
- * DisplayObjectContainer class generate this event:
96
- * <code>removeChild()</code> and
97
- * <code>removeChildAt()</code>.
98
- *
99
- * <p>The following methods of a
100
- * DisplayObjectContainer object also generate this
101
- * event if an object must be removed to make room for
102
- * the new object: <code>addChild()</code>,
103
- * <code>addChildAt()</code>, and
104
- * <code>setChildIndex()</code>. </p>
105
- * @event removedFromScene Dispatched when a display object is about to be
106
- * removed from the display list, either directly or
107
- * through the removal of a sub tree in which the
108
- * display object is contained. Two methods of the
109
- * DisplayObjectContainer class generate this event:
110
- * <code>removeChild()</code> and
111
- * <code>removeChildAt()</code>.
112
- *
113
- * <p>The following methods of a
114
- * DisplayObjectContainer object also generate this
115
- * event if an object must be removed to make room for
116
- * the new object: <code>addChild()</code>,
117
- * <code>addChildAt()</code>, and
118
- * <code>setChildIndex()</code>. </p>
119
- * @event render [broadcast event] Dispatched when the display list
120
- * is about to be updated and rendered. This event
121
- * provides the last opportunity for objects listening
122
- * for this event to make changes before the display
123
- * list is rendered. You must call the
124
- * <code>invalidate()</code> method of the Scene
125
- * object each time you want a <code>render</code>
126
- * event to be dispatched. <code>Render</code> events
127
- * are dispatched to an object only if there is mutual
128
- * trust between it and the object that called
129
- * <code>Scene.invalidate()</code>. This event is a
130
- * broadcast event, which means that it is dispatched
131
- * by all display objects with a listener registered
132
- * for this event.
133
- *
134
- * <p><b>Note: </b>This event is not dispatched if the
135
- * display is not rendering. This is the case when the
136
- * content is either minimized or obscured. </p>
137
- */
138
- export declare class DisplayObject extends AssetBase implements IBitmapDrawable, IContainer {
139
- _renderObjects: Record<number, RenderEntity | _Render_RenderableBase | CacheRenderer>;
140
- _containerNodes: Record<number, ContainerNode>;
141
- private _mouseChildren;
142
- _material: IMaterial;
143
- _style: Style;
144
- private _loader;
145
- private _mouseX;
146
- private _mouseY;
147
- private _root;
148
- private _boundsVisible;
149
- private _boundsPrefab;
150
- private _boundsPrefabDirty;
151
- private _boundsPrimitive;
152
- private _pName;
153
- private _scrollRect;
154
- private _scrollRectPrimitive;
155
- protected _parent: DisplayObjectContainer;
156
- _sessionID: number;
157
- _avmDepthID: number;
158
- pickObjectFromTimeline: boolean;
159
- private _alignmentMode;
160
- private _scale9Grid;
161
- protected _transform: Transform;
162
- private _visible;
163
- private _maskId;
164
- protected _timelineMasks: DisplayObject[] | undefined;
165
- protected _mask: DisplayObject | undefined;
166
- private _mouseEnabled;
167
- private _eulers;
168
- _registrationMatrix3D: Matrix3D;
169
- private _defaultBoundingVolume;
170
- cursorType: string;
171
- protected _isInFocus: boolean;
172
- protected _tabEnabled: boolean;
173
- protected _tabIndex: number;
174
- private _maskMode;
175
- private _pickObject;
176
- _hierarchicalPropsDirty: number;
177
- private _onInvalidatePropertiesDelegate;
178
- private _onInvalidateImagesDelegate;
179
- isSlice9ScaledMC: boolean;
180
- isSlice9ScaledSprite: boolean;
181
- avm1Symbol: any;
182
- isAVMScene: boolean;
183
- placeObjectTag: any;
184
- getScriptPrecedence(): number[];
185
- getMouseCursor(): string;
186
- get tabEnabled(): boolean;
187
- set tabEnabled(value: boolean);
188
- get tabIndex(): number;
189
- set tabIndex(value: number);
190
- get isInFocus(): boolean;
191
- set isInFocus(value: boolean);
192
- setFocus(value: boolean, fromMouseDown?: boolean, sendSoftKeyEvent?: boolean): void;
193
- /**
194
- *
195
- */
196
- get alignmentMode(): AlignmentMode;
197
- set alignmentMode(value: AlignmentMode);
198
- /**
199
- * Indicates the alpha transparency value of the object specified. Valid
200
- * values are 0(fully transparent) to 1(fully opaque). The default value is
201
- * 1. Display objects with <code>alpha</code> set to 0 <i>are</i> active,
202
- * even though they are invisible.
203
- */
204
- get alpha(): number;
205
- set alpha(value: number);
206
- /**
207
- * A value from the BlendMode class that specifies which blend mode to use. A
208
- * bitmap can be drawn internally in two ways. If you have a blend mode
209
- * enabled or an external clipping mask, the bitmap is drawn by adding a
210
- * bitmap-filled square shape to the vector render. If you attempt to set
211
- * this property to an invalid value, Flash runtimes set the value to
212
- * <code>BlendMode.NORMAL</code>.
213
- *
214
- * <p>The <code>blendMode</code> property affects each pixel of the display
215
- * object. Each pixel is composed of three constituent colors(red, green,
216
- * and blue), and each constituent color has a value between 0x00 and 0xFF.
217
- * Flash Player or Adobe AIR compares each constituent color of one pixel in
218
- * the movie clip with the corresponding color of the pixel in the
219
- * background. For example, if <code>blendMode</code> is set to
220
- * <code>BlendMode.LIGHTEN</code>, Flash Player or Adobe AIR compares the red
221
- * value of the display object with the red value of the background, and uses
222
- * the lighter of the two as the value for the red component of the displayed
223
- * color.</p>
224
- *
225
- * <p>The following table describes the <code>blendMode</code> settings. The
226
- * BlendMode class defines string values you can use. The illustrations in
227
- * the table show <code>blendMode</code> values applied to a circular display
228
- * object(2) superimposed on another display object(1).</p>
229
- */
230
- _blendMode: BlendMode;
231
- set blendMode(v: BlendMode);
232
- get blendMode(): BlendMode;
233
- /**
234
- *
235
- */
236
- get defaultBoundingVolume(): BoundingVolumeType;
237
- set defaultBoundingVolume(value: BoundingVolumeType);
238
- /**
239
- * If set to <code>true</code>, NME will use the software renderer to cache
240
- * an internal bitmap representation of the display object. For native targets,
241
- * this is often much slower than the default hardware renderer. When you
242
- * are using the Flash target, this caching may increase performance for display
243
- * objects that contain complex vector content.
244
- *
245
- * <p>All vector data for a display object that has a cached bitmap is drawn
246
- * to the bitmap instead of the main display. If
247
- * <code>cacheAsBitmapMatrix</code> is null or unsupported, the bitmap is
248
- * then copied to the main display as unstretched, unrotated pixels snapped
249
- * to the nearest pixel boundaries. Pixels are mapped 1 to 1 with the parent
250
- * object. If the bounds of the bitmap change, the bitmap is recreated
251
- * instead of being stretched.</p>
252
- *
253
- * <p>If <code>cacheAsBitmapMatrix</code> is non-null and supported, the
254
- * object is drawn to the off-screen bitmap using that matrix and the
255
- * stretched and/or rotated results of that rendering are used to draw the
256
- * object to the main display.</p>
257
- *
258
- * <p>No internal bitmap is created unless the <code>BBitmap</code>
259
- * property is set to <code>true</code>.</p>
260
- *
261
- * <p>After you set the <code>cacheAsBitmap</code> property to
262
- * <code>true</code>, the rendering does not change, however the display
263
- * object performs pixel snapping automatically. The animation speed can be
264
- * significantly faster depending on the complexity of the vector content.
265
- * </p>
266
- *
267
- * <p>The <code>cacheAsBitmap</code> property is automatically set to
268
- * <code>true</code> whenever you apply a filter to a display object(when
269
- * its <code>filter</code> array is not empty), and if a display object has a
270
- * filter applied to it, <code>cacheAsBitmap</code> is reported as
271
- * <code>true</code> for that display object, even if you set the property to
272
- * <code>false</code>. If you clear all filters for a display object, the
273
- * <code>cacheAsBitmap</code> setting changes to what it was last set to.</p>
274
- *
275
- * <p>A display object does not use a bitmap even if the
276
- * <code>cacheAsBitmap</code> property is set to <code>true</code> and
277
- * instead renders from vector data in the following cases:</p>
278
- *
279
- * <ul>
280
- * <li>The bitmap is too large. In AIR 1.5 and Flash Player 10, the maximum
281
- * size for a bitmap image is 8,191 pixels in width or height, and the total
282
- * number of pixels cannot exceed 16,777,215 pixels.(So, if a bitmap image
283
- * is 8,191 pixels wide, it can only be 2,048 pixels high.) In Flash Player 9
284
- * and earlier, the limitation is is 2880 pixels in height and 2,880 pixels
285
- * in width.</li>
286
- * <li>The bitmap fails to allocate(out of memory error). </li>
287
- * </ul>
288
- *
289
- * <p>The <code>cacheAsBitmap</code> property is best used with movie clips
290
- * that have mostly static content and that do not scale and rotate
291
- * frequently. With such movie clips, <code>cacheAsBitmap</code> can lead to
292
- * performance increases when the movie clip is translated(when its <i>x</i>
293
- * and <i>y</i> position is changed).</p>
294
- */
295
- private _bitmapCache;
296
- get cacheAsBitmap(): boolean;
297
- set cacheAsBitmap(v: boolean);
298
- /**
299
- *
300
- */
301
- castsShadows: boolean;
302
- /**
303
- * Defines the rotation of the 3d object as a <code>Vector3D</code>
304
- * object containing euler angles for rotation around x, y and z axis.
305
- */
306
- get eulers(): Vector3D;
307
- set eulers(value: Vector3D);
308
- /**
309
- * An object that can contain any extra data.
310
- */
311
- extra: Object;
312
- /**
313
- * An indexed array that contains each filter object currently associated
314
- * with the display object. The flash.filters package contains several
315
- * classes that define specific filters you can use.
316
- *
317
- * <p>Filters can be applied in Flash Professional at design time, or at run
318
- * time by using ActionScript code. To apply a filter by using ActionScript,
319
- * you must make a temporary copy of the entire <code>filters</code> array,
320
- * modify the temporary array, then assign the value of the temporary array
321
- * back to the <code>filters</code> array. You cannot directly add a new
322
- * filter object to the <code>filters</code> array.</p>
323
- *
324
- * <p>To add a filter by using ActionScript, perform the following steps
325
- * (assume that the target display object is named
326
- * <code>myDisplayObject</code>):</p>
327
- *
328
- * <ol>
329
- * <li>Create a new filter object by using the constructor method of your
330
- * chosen filter class.</li>
331
- * <li>Assign the value of the <code>myDisplayObject.filters</code> array
332
- * to a temporary array, such as one named <code>myFilters</code>.</li>
333
- * <li>Add the new filter object to the <code>myFilters</code> temporary
334
- * array.</li>
335
- * <li>Assign the value of the temporary array to the
336
- * <code>myDisplayObject.filters</code> array.</li>
337
- * </ol>
338
- *
339
- * <p>If the <code>filters</code> array is undefined, you do not need to use
340
- * a temporary array. Instead, you can directly assign an array literal that
341
- * contains one or more filter objects that you create. The first example in
342
- * the Examples section adds a drop shadow filter by using code that handles
343
- * both defined and undefined <code>filters</code> arrays.</p>
344
- *
345
- * <p>To modify an existing filter object, you must use the technique of
346
- * modifying a copy of the <code>filters</code> array:</p>
347
- *
348
- * <ol>
349
- * <li>Assign the value of the <code>filters</code> array to a temporary
350
- * array, such as one named <code>myFilters</code>.</li>
351
- * <li>Modify the property by using the temporary array,
352
- * <code>myFilters</code>. For example, to set the quality property of the
353
- * first filter in the array, you could use the following code:
354
- * <code>myFilters[0].quality = 1;</code></li>
355
- * <li>Assign the value of the temporary array to the <code>filters</code>
356
- * array.</li>
357
- * </ol>
358
- *
359
- * <p>At load time, if a display object has an associated filter, it is
360
- * marked to cache itself as a transparent bitmap. From this point forward,
361
- * as long as the display object has a valid filter list, the player caches
362
- * the display object as a bitmap. This source bitmap is used as a source
363
- * image for the filter effects. Each display object usually has two bitmaps:
364
- * one with the original unfiltered source display object and another for the
365
- * final image after filtering. The final image is used when rendering. As
366
- * long as the display object does not change, the final image does not need
367
- * updating.</p>
368
- *
369
- * <p>The flash.filters package includes classes for filters. For example, to
370
- * create a DropShadow filter, you would write:</p>
371
- *
372
- * @throws ArgumentError When <code>filters</code> includes a ShaderFilter
373
- * and the shader output type is not compatible with
374
- * this operation(the shader must specify a
375
- * <code>pixel4</code> output).
376
- * @throws ArgumentError When <code>filters</code> includes a ShaderFilter
377
- * and the shader doesn't specify any image input or
378
- * the first input is not an <code>image4</code> input.
379
- * @throws ArgumentError When <code>filters</code> includes a ShaderFilter
380
- * and the shader specifies an image input that isn't
381
- * provided.
382
- * @throws ArgumentError When <code>filters</code> includes a ShaderFilter, a
383
- * ByteArray or Vector.<Number> instance as a shader
384
- * input, and the <code>width</code> and
385
- * <code>height</code> properties aren't specified for
386
- * the ShaderInput object, or the specified values
387
- * don't match the amount of data in the input data.
388
- * See the <code>ShaderInput.input</code> property for
389
- * more information.
390
- */
391
- private _filters;
392
- set filters(v: Array<IFilter>);
393
- get filters(): Array<IFilter>;
394
- updateFilters(_newFilters: IFilter[]): void;
395
- /**
396
- * Indicates the instance container index of the DisplayObject. The object can be
397
- * identified in the child list of its parent display object container by
398
- * calling the <code>getChildByIndex()</code> method of the display object
399
- * container.
400
- *
401
- * <p>If the DisplayObject has no parent container, index defaults to 0.</p>
402
- */
403
- get index(): number;
404
- /**
405
- * Returns a LoaderInfo object containing information about loading the file
406
- * to which this display object belongs. The <code>loaderInfo</code> property
407
- * is defined only for the root display object of a SWF file or for a loaded
408
- * Bitmap(not for a Bitmap that is drawn with ActionScript). To find the
409
- * <code>loaderInfo</code> object associated with the SWF file that contains
410
- * a display object named <code>myDisplayObject</code>, use
411
- * <code>myDisplayObject.root.loaderInfo</code>.
412
- *
413
- * <p>A large SWF file can monitor its download by calling
414
- * <code>this.root.loaderInfo.addEventListener(Event.COMPLETE,
415
- * func)</code>.</p>
416
- */
417
- get loader(): Loader;
418
- /**
419
- * The calling display object is masked by the specified <code>mask</code>
420
- * object. To ensure that masking works when the Stage is scaled, the
421
- * <code>mask</code> display object must be in an active part of the display
422
- * list. The <code>mask</code> object itself is not drawn. Set
423
- * <code>mask</code> to <code>null</code> to remove the mask.
424
- *
425
- * <p>To be able to scale a mask object, it must be on the display list. To
426
- * be able to drag a mask Sprite object(by calling its
427
- * <code>startDrag()</code> method), it must be on the display list. To call
428
- * the <code>startDrag()</code> method for a mask sprite based on a
429
- * <code>mouseDown</code> event being dispatched by the sprite, set the
430
- * sprite's <code>buttonMode</code> property to <code>true</code>.</p>
431
- *
432
- * <p>When display objects are cached by setting the
433
- * <code>cacheAsBitmap</code> property to <code>true</code> an the
434
- * <code>cacheAsBitmapMatrix</code> property to a Matrix object, both the
435
- * mask and the display object being masked must be part of the same cached
436
- * bitmap. Thus, if the display object is cached, then the mask must be a
437
- * child of the display object. If an ancestor of the display object on the
438
- * display list is cached, then the mask must be a child of that ancestor or
439
- * one of its descendents. If more than one ancestor of the masked object is
440
- * cached, then the mask must be a descendent of the cached container closest
441
- * to the masked object in the display list.</p>
442
- *
443
- * <p><b>Note:</b> A single <code>mask</code> object cannot be used to mask
444
- * more than one calling display object. When the <code>mask</code> is
445
- * assigned to a second display object, it is removed as the mask of the
446
- * first object, and that object's <code>mask</code> property becomes
447
- * <code>null</code>.</p>
448
- */
449
- get mask(): DisplayObject | undefined;
450
- set mask(value: DisplayObject | undefined);
451
- get maskMode(): boolean;
452
- set maskMode(value: boolean);
453
- get pickObject(): DisplayObjectContainer;
454
- set pickObject(value: DisplayObjectContainer);
455
- /**
456
- * Specifies whether this object receives mouse, or other user input,
457
- * messages. The default value is <code>true</code>, which means that by
458
- * default any InteractiveObject instance that is on the display list
459
- * receives mouse events or other user input events. If
460
- * <code>mouseEnabled</code> is set to <code>false</code>, the instance does
461
- * not receive any mouse events(or other user input events like keyboard
462
- * events). Any children of this instance on the display list are not
463
- * affected. To change the <code>mouseEnabled</code> behavior for all
464
- * children of an object on the display list, use
465
- * <code>flash.display.DisplayObjectContainer.mouseChildren</code>.
466
- *
467
- * <p> No event is dispatched by setting this property. You must use the
468
- * <code>addEventListener()</code> method to create interactive
469
- * functionality.</p>
470
- */
471
- get mouseEnabled(): boolean;
472
- set mouseEnabled(value: boolean);
473
- /**
474
- * Indicates the x coordinate of the mouse or user input device position, in
475
- * pixels.
476
- *
477
- * <p><b>Note</b>: For a DisplayObject that has been rotated, the returned x
478
- * coordinate will reflect the non-rotated object.</p>
479
- */
480
- get mouseX(): number;
481
- /**
482
- * Indicates the y coordinate of the mouse or user input device position, in
483
- * pixels.
484
- *
485
- * <p><b>Note</b>: For a DisplayObject that has been rotated, the returned y
486
- * coordinate will reflect the non-rotated object.</p>
487
- */
488
- get mouseY(): number;
489
- /**
490
- * Indicates the instance name of the DisplayObject. The object can be
491
- * identified in the child list of its parent display object container by
492
- * calling the <code>getChildByName()</code> method of the display object
493
- * container.
494
- *
495
- * @throws IllegalOperationError If you are attempting to set this property
496
- * on an object that was placed on the timeline
497
- * in the Flash authoring tool.
498
- */
499
- get name(): string;
500
- set name(value: string);
501
- /**
502
- *
503
- */
504
- orientationMode: OrientationMode;
505
- /**
506
- * Indicates the DisplayObjectContainer object that contains this display
507
- * object. Use the <code>parent</code> property to specify a relative path to
508
- * display objects that are above the current display object in the display
509
- * list hierarchy.
510
- *
511
- * <p>You can use <code>parent</code> to move up multiple levels in the
512
- * display list as in the following:</p>
513
- *
514
- * @throws SecurityError The parent display object belongs to a security
515
- * sandbox to which you do not have access. You can
516
- * avoid this situation by having the parent movie call
517
- * the <code>Security.allowDomain()</code> method.
518
- */
519
- get parent(): DisplayObjectContainer;
520
- /**
521
- * Defines the local point around which the object rotates.
522
- */
523
- get registrationPoint(): Vector3D;
524
- set registrationPoint(value: Vector3D);
525
- /**
526
- * Defines the local scale.
527
- */
528
- get registrationScale(): Vector3D;
529
- set registrationScale(value: Vector3D);
530
- /**
531
- * For a display object in a loaded SWF file, the <code>root</code> property
532
- * is the top-most display object in the portion of the display list's tree
533
- * structure represented by that SWF file. For a Bitmap object representing a
534
- * loaded image file, the <code>root</code> property is the Bitmap object
535
- * itself. For the instance of the main class of the first SWF file loaded,
536
- * the <code>root</code> property is the display object itself. The
537
- * <code>root</code> property of the Scene object is the Scene object itself.
538
- * The <code>root</code> property is set to <code>null</code> for any display
539
- * object that has not been added to the display list, unless it has been
540
- * added to a display object container that is off the display list but that
541
- * is a child of the top-most display object in a loaded SWF file.
542
- *
543
- * <p>For example, if you create a new Sprite object by calling the
544
- * <code>Sprite()</code> constructor method, its <code>root</code> property
545
- * is <code>null</code> until you add it to the display list(or to a display
546
- * object container that is off the display list but that is a child of the
547
- * top-most display object in a SWF file).</p>
548
- *
549
- * <p>For a loaded SWF file, even though the Loader object used to load the
550
- * file may not be on the display list, the top-most display object in the
551
- * SWF file has its <code>root</code> property set to itself. The Loader
552
- * object does not have its <code>root</code> property set until it is added
553
- * as a child of a display object for which the <code>root</code> property is
554
- * set.</p>
555
- */
556
- get root(): DisplayObjectContainer;
557
- /**
558
- * Indicates the rotation of the DisplayObject instance, in degrees, from its
559
- * original orientation. Values from 0 to 180 represent clockwise rotation;
560
- * values from 0 to -180 represent counterclockwise rotation. Values outside
561
- * this range are added to or subtracted from 360 to obtain a value within
562
- * the range. For example, the statement <code>my_video.rotation = 450</code>
563
- * is the same as <code> my_video.rotation = 90</code>.
564
- */
565
- rotation: number;
566
- /**
567
- * Indicates the x-axis rotation of the DisplayObject instance, in degrees,
568
- * from its original orientation relative to the 3D parent container. Values
569
- * from 0 to 180 represent clockwise rotation; values from 0 to -180
570
- * represent counterclockwise rotation. Values outside this range are added
571
- * to or subtracted from 360 to obtain a value within the range.
572
- */
573
- get rotationX(): number;
574
- set rotationX(val: number);
575
- /**
576
- * Indicates the y-axis rotation of the DisplayObject instance, in degrees,
577
- * from its original orientation relative to the 3D parent container. Values
578
- * from 0 to 180 represent clockwise rotation; values from 0 to -180
579
- * represent counterclockwise rotation. Values outside this range are added
580
- * to or subtracted from 360 to obtain a value within the range.
581
- */
582
- get rotationY(): number;
583
- set rotationY(val: number);
584
- /**
585
- * Indicates the z-axis rotation of the DisplayObject instance, in degrees,
586
- * from its original orientation relative to the 3D parent container. Values
587
- * from 0 to 180 represent clockwise rotation; values from 0 to -180
588
- * represent counterclockwise rotation. Values outside this range are added
589
- * to or subtracted from 360 to obtain a value within the range.
590
- */
591
- get rotationZ(): number;
592
- set rotationZ(val: number);
593
- /**
594
- * The current scaling grid that is in effect. If set to <code>null</code>,
595
- * the entire display object is scaled normally when any scale transformation
596
- * is applied.
597
- *
598
- * <p>When you define the <code>scale9Grid</code> property, the display
599
- * object is divided into a grid with nine regions based on the
600
- * <code>scale9Grid</code> rectangle, which defines the center region of the
601
- * grid. The eight other regions of the grid are the following areas: </p>
602
- *
603
- * <ul>
604
- * <li>The upper-left corner outside of the rectangle</li>
605
- * <li>The area above the rectangle </li>
606
- * <li>The upper-right corner outside of the rectangle</li>
607
- * <li>The area to the left of the rectangle</li>
608
- * <li>The area to the right of the rectangle</li>
609
- * <li>The lower-left corner outside of the rectangle</li>
610
- * <li>The area below the rectangle</li>
611
- * <li>The lower-right corner outside of the rectangle</li>
612
- * </ul>
613
- *
614
- * <p>You can think of the eight regions outside of the center(defined by
615
- * the rectangle) as being like a picture frame that has special rules
616
- * applied to it when scaled.</p>
617
- *
618
- * <p>When the <code>scale9Grid</code> property is set and a display object
619
- * is scaled, all text and gradients are scaled normally; however, for other
620
- * types of objects the following rules apply:</p>
621
- *
622
- * <ul>
623
- * <li>Content in the center region is scaled normally. </li>
624
- * <li>Content in the corners is not scaled. </li>
625
- * <li>Content in the top and bottom regions is scaled horizontally only.
626
- * Content in the left and right regions is scaled vertically only.</li>
627
- * <li>All fills(including bitmaps, video, and gradients) are stretched to
628
- * fit their shapes.</li>
629
- * </ul>
630
- *
631
- * <p>If a display object is rotated, all subsequent scaling is normal(and
632
- * the <code>scale9Grid</code> property is ignored).</p>
633
- *
634
- * <p>For example, consider the following display object and a rectangle that
635
- * is applied as the display object's <code>scale9Grid</code>:</p>
636
- *
637
- * <p>A common use for setting <code>scale9Grid</code> is to set up a display
638
- * object to be used as a component, in which edge regions retain the same
639
- * width when the component is scaled.</p>
640
- *
641
- * @throws ArgumentError If you pass an invalid argument to the method.
642
- */
643
- get scale9Grid(): Rectangle;
644
- set scale9Grid(value: Rectangle);
645
- /**
646
- * Indicates the horizontal scale(percentage) of the object as applied from
647
- * the registration point. The default registration point is(0,0). 1.0
648
- * equals 100% scale.
649
- *
650
- * <p>Scaling the local coordinate system changes the <code>x</code> and
651
- * <code>y</code> property values, which are defined in whole pixels. </p>
652
- */
653
- get scaleX(): number;
654
- set scaleX(val: number);
655
- /**
656
- * Indicates the vertical scale(percentage) of an object as applied from the
657
- * registration point of the object. The default registration point is(0,0).
658
- * 1.0 is 100% scale.
659
- *
660
- * <p>Scaling the local coordinate system changes the <code>x</code> and
661
- * <code>y</code> property values, which are defined in whole pixels. </p>
662
- */
663
- get scaleY(): number;
664
- set scaleY(val: number);
665
- /**
666
- * Indicates the depth scale(percentage) of an object as applied from the
667
- * registration point of the object. The default registration point is(0,0).
668
- * 1.0 is 100% scale.
669
- *
670
- * <p>Scaling the local coordinate system changes the <code>x</code>,
671
- * <code>y</code> and <code>z</code> property values, which are defined in
672
- * whole pixels. </p>
673
- */
674
- get scaleZ(): number;
675
- set scaleZ(val: number);
676
- /**
677
- * Indicates the horizontal skew(angle) of the object as applied from
678
- * the registration point. The default registration point is(0,0).
679
- */
680
- get skewX(): number;
681
- set skewX(val: number);
682
- /**
683
- * Indicates the vertical skew(angle) of an object as applied from the
684
- * registration point of the object. The default registration point is(0,0).
685
- */
686
- get skewY(): number;
687
- set skewY(val: number);
688
- /**
689
- * Indicates the depth skew(angle) of an object as applied from the
690
- * registration point of the object. The default registration point is(0,0).
691
- */
692
- get skewZ(): number;
693
- set skewZ(val: number);
694
- /**
695
- * The scroll rectangle bounds of the display object. The display object is
696
- * cropped to the size defined by the rectangle, and it scrolls within the
697
- * rectangle when you change the <code>x</code> and <code>y</code> properties
698
- * of the <code>scrollRect</code> object.
699
- *
700
- * <p>The properties of the <code>scrollRect</code> Rectangle object use the
701
- * display object's coordinate space and are scaled just like the overall
702
- * display object. The corner bounds of the cropped window on the scrolling
703
- * display object are the origin of the display object(0,0) and the point
704
- * defined by the width and height of the rectangle. They are not centered
705
- * around the origin, but use the origin to define the upper-left corner of
706
- * the area. A scrolled display object always scrolls in whole pixel
707
- * increments. </p>
708
- *
709
- * <p>You can scroll an object left and right by setting the <code>x</code>
710
- * property of the <code>scrollRect</code> Rectangle object. You can scroll
711
- * an object up and down by setting the <code>y</code> property of the
712
- * <code>scrollRect</code> Rectangle object. If the display object is rotated
713
- * 90° and you scroll it left and right, the display object actually scrolls
714
- * up and down.</p>
715
- */
716
- get scrollRect(): Rectangle;
717
- set scrollRect(value: Rectangle);
718
- /**
719
- *
720
- */
721
- get material(): IMaterial;
722
- set material(value: IMaterial);
723
- /**
724
- *
725
- */
726
- get style(): Style;
727
- set style(value: Style);
728
- /**
729
- *
730
- */
731
- get boundsVisible(): boolean;
732
- set boundsVisible(value: boolean);
733
- getScrollRectPrimitive(): IContainer;
734
- getBoundsPrimitive(picker: BoundsPicker): IContainer;
735
- /**
736
- * An object with properties pertaining to a display object's matrix, color
737
- * transform, and pixel bounds. The specific properties - matrix,
738
- * colorTransform, and three read-only properties
739
- * (<code>concatenatedMatrix</code>, <code>concatenatedColorTransform</code>,
740
- * and <code>pixelBounds</code>) - are described in the entry for the
741
- * Transform class.
742
- *
743
- * <p>Each of the transform object's properties is itself an object. This
744
- * concept is important because the only way to set new values for the matrix
745
- * or colorTransform objects is to create a new object and copy that object
746
- * into the transform.matrix or transform.colorTransform property.</p>
747
- *
748
- * <p>For example, to increase the <code>tx</code> value of a display
749
- * object's matrix, you must make a copy of the entire matrix object, then
750
- * copy the new object into the matrix property of the transform object:</p>
751
- * <pre xml:space="preserve"><code> public myMatrix:Matrix =
752
- * myDisplayObject.transform.matrix; myMatrix.tx += 10;
753
- * myDisplayObject.transform.matrix = myMatrix; </code></pre>
754
- *
755
- * <p>You cannot directly set the <code>tx</code> property. The following
756
- * code has no effect on <code>myDisplayObject</code>: </p>
757
- * <pre xml:space="preserve"><code> myDisplayObject.transform.matrix.tx +=
758
- * 10; </code></pre>
759
- *
760
- * <p>You can also copy an entire transform object and assign it to another
761
- * display object's transform property. For example, the following code
762
- * copies the entire transform object from <code>myOldDisplayObj</code> to
763
- * <code>myNewDisplayObj</code>:</p>
764
- * <code>myNewDisplayObj.transform = myOldDisplayObj.transform;</code>
765
- *
766
- * <p>The resulting display object, <code>myNewDisplayObj</code>, now has the
767
- * same values for its matrix, color transform, and pixel bounds as the old
768
- * display object, <code>myOldDisplayObj</code>.</p>
769
- *
770
- * <p>Note that AIR for TV devices use hardware acceleration, if it is
771
- * available, for color transforms.</p>
772
- */
773
- get transform(): Transform;
774
- /**
775
- * Whether or not the display object is visible. Display objects that are not
776
- * visible are disabled. For example, if <code>visible=false</code> for an
777
- * InteractiveObject instance, it cannot be clicked.
778
- */
779
- get visible(): boolean;
780
- set visible(value: boolean);
781
- /**
782
- * Update mask from timeline and take account that can be a scriptMask
783
- *
784
- * @param masks Masks from timeline
785
- */
786
- set timelineMasks(masks: DisplayObject[] | undefined);
787
- get timelineMasks(): DisplayObject[] | undefined;
788
- /**
789
- * Determines whether or not the children of the object are mouse, or user
790
- * input device, enabled. If an object is enabled, a user can interact with
791
- * it by using a mouse or user input device. The default is
792
- * <code>true</code>.
793
- *
794
- * <p>This property is useful when you create a button with an instance of
795
- * the Sprite class(instead of using the SimpleButton class). When you use a
796
- * Sprite instance to create a button, you can choose to decorate the button
797
- * by using the <code>addChild()</code> method to add additional Sprite
798
- * instances. This process can cause unexpected behavior with mouse events
799
- * because the Sprite instances you add as children can become the target
800
- * object of a mouse event when you expect the parent instance to be the
801
- * target object. To ensure that the parent instance serves as the target
802
- * objects for mouse events, you can set the <code>mouseChildren</code>
803
- * property of the parent instance to <code>false</code>.</p>
804
- *
805
- * <p> No event is dispatched by setting this property. You must use the
806
- * <code>addEventListener()</code> method to create interactive
807
- * functionality.</p>
808
- */
809
- get mouseChildren(): boolean;
810
- set mouseChildren(value: boolean);
811
- /**
812
- * Indicates the <i>x</i> coordinate of the DisplayObject instance relative
813
- * to the local coordinates of the parent DisplayObjectContainer. If the
814
- * object is inside a DisplayObjectContainer that has transformations, it is
815
- * in the local coordinate system of the enclosing DisplayObjectContainer.
816
- * Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the
817
- * DisplayObjectContainer's children inherit a coordinate system that is
818
- * rotated 90° counterclockwise. The object's coordinates refer to the
819
- * registration point position.
820
- */
821
- get x(): number;
822
- set x(val: number);
823
- /**
824
- * Indicates the <i>y</i> coordinate of the DisplayObject instance relative
825
- * to the local coordinates of the parent DisplayObjectContainer. If the
826
- * object is inside a DisplayObjectContainer that has transformations, it is
827
- * in the local coordinate system of the enclosing DisplayObjectContainer.
828
- * Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the
829
- * DisplayObjectContainer's children inherit a coordinate system that is
830
- * rotated 90° counterclockwise. The object's coordinates refer to the
831
- * registration point position.
832
- */
833
- get y(): number;
834
- set y(val: number);
835
- /**
836
- * Indicates the z coordinate position along the z-axis of the DisplayObject
837
- * instance relative to the 3D parent container. The z property is used for
838
- * 3D coordinates, not screen or pixel coordinates.
839
- *
840
- * <p>When you set a <code>z</code> property for a display object to
841
- * something other than the default value of <code>0</code>, a corresponding
842
- * Matrix3D object is automatically created. for adjusting a display object's
843
- * position and orientation in three dimensions. When working with the
844
- * z-axis, the existing behavior of x and y properties changes from screen or
845
- * pixel coordinates to positions relative to the 3D parent container.</p>
846
- *
847
- * <p>For example, a child of the <code>_root</code> at position x = 100, y =
848
- * 100, z = 200 is not drawn at pixel location(100,100). The child is drawn
849
- * wherever the 3D projection calculation puts it. The calculation is:</p>
850
- *
851
- * <p><code>(x~~cameraFocalLength/cameraRelativeZPosition,
852
- * y~~cameraFocalLength/cameraRelativeZPosition)</code></p>
853
- */
854
- get z(): number;
855
- set z(val: number);
856
- /**
857
- *
858
- */
859
- zOffset: number;
860
- /**
861
- * Creates a new <code>DisplayObject</code> instance.
862
- */
863
- constructor();
864
- advanceFrame(): void;
865
- getEntity(): IEntity;
866
- _initNode(node: ContainerNode): void;
867
- /**
868
- *
869
- */
870
- clone(): DisplayObject;
871
- copyTo(displayObject: DisplayObject): void;
872
- /**
873
- *
874
- */
875
- dispose(): void;
876
- disposeValues(): void;
877
- /**
878
- * Rotates the 3d object around to face a point defined relative
879
- * to the local coordinates of the parent <code>ObjectContainer3D</code>.
880
- *
881
- * @param scenePosition The vector defining the point to be looked at
882
- * @param upAxis An optional vector used to define the desired
883
- * up orientation of the 3d object after rotation has occurred
884
- */
885
- lookAt(scenePosition: Vector3D, upAxis?: Vector3D): void;
886
- /**
887
- * Moves the local point around which the object rotates.
888
- *
889
- * @param dx The amount of movement along the local x axis.
890
- * @param dy The amount of movement along the local y axis.
891
- * @param dz The amount of movement along the local z axis.
892
- */
893
- movePivot(dx: number, dy: number, dz: number): void;
894
- reset(): void;
895
- /**
896
- * @internal
897
- */
898
- _iController: ControllerBase;
899
- hasDispatchedAddedToStage: boolean;
900
- isOnDisplayList(): boolean;
901
- /**
902
- * @internal
903
- */
904
- _setParent(parent: DisplayObjectContainer): void;
905
- _invalidateHierarchicalProperty(propDirty: HierarchicalProperty): void;
906
- /**
907
- * @internal
908
- */
909
- get maskId(): number;
910
- protected _setScaleX(val: number): void;
911
- protected _setScaleY(val: number): void;
912
- protected _setScaleZ(val: number): void;
913
- private _updateBoundsPrefab;
914
- protected _updateMaskMode(): void;
915
- _invalidateMaterial(): void;
916
- private _invalidateStyle;
917
- invalidateElements(): void;
918
- protected _onInvalidateProperties(_event?: StyleEvent): void;
919
- protected _onInvalidateImages(_event?: StyleEvent): void;
920
- protected _getDefaultBoundingVolume(): BoundingVolumeType;
921
- }
1
+ import { Transform, Matrix3D, Rectangle, Vector3D, AssetBase, Loader, IAbstractionPool, IAsset, IAbstraction, AbstractionSet } from '@awayjs/core';
2
+ import { BlendMode } from '@awayjs/stage';
3
+ import { BoundingVolumeType, IEntity, BoundsPicker, HierarchicalProperty, AlignmentMode, OrientationMode, IContainer, ContainerNode } from '@awayjs/view';
4
+ import { IMaterial, Style, StyleEvent, RenderEntity, _Render_RenderableBase, CacheRenderer } from '@awayjs/renderer';
5
+ import { DisplayObjectContainer } from './DisplayObjectContainer';
6
+ import { ControllerBase } from '../controllers/ControllerBase';
7
+ import { IBitmapDrawable } from '../base/IBitmapDrawable';
8
+ import { IFilter } from '../adapters/IFilter';
9
+ /**
10
+ * The DisplayObject class is the base class for all objects that can be
11
+ * placed on the display list. The display list manages all objects displayed
12
+ * in flash. Use the DisplayObjectContainer class to arrange the
13
+ * display objects in the display list. DisplayObjectContainer objects can
14
+ * have child display objects, while other display objects, such as Shape and
15
+ * TextField objects, are "leaf" nodes that have only parents and siblings, no
16
+ * children.
17
+ *
18
+ * <p>The DisplayObject class supports fbasic functionality like the <i>x</i>
19
+ * and <i>y</i> position of an object, as well as more advanced properties of
20
+ * the object such as its transformation matrix. </p>
21
+ *
22
+ * <p>DisplayObject is an abstract base class; therefore, you cannot call
23
+ * DisplayObject directly. Invoking <code>new DisplayObject()</code> throws an
24
+ * <code>ArgumentError</code> exception. </p>
25
+ *
26
+ * <p>All display objects inherit from the DisplayObject class.</p>
27
+ *
28
+ * <p>The DisplayObject class itself does not include any APIs for rendering
29
+ * content onscreen. For that reason, if you want create a custom subclass of
30
+ * the DisplayObject class, you will want to extend one of its subclasses that
31
+ * do have APIs for rendering content onscreen, such as the Shape, Sprite,
32
+ * Bitmap, SimpleButton, TextField, or MovieClip class.</p>
33
+ *
34
+ * <p>The DisplayObject class contains several broadcast events. Normally, the
35
+ * target of any particular event is a specific DisplayObject instance. For
36
+ * example, the target of an <code>added</code> event is the specific
37
+ * DisplayObject instance that was added to the display list. Having a single
38
+ * target restricts the placement of event listeners to that target and in
39
+ * some cases the target's ancestors on the display list. With broadcast
40
+ * events, however, the target is not a specific DisplayObject instance, but
41
+ * rather all DisplayObject instances, including those that are not on the
42
+ * display list. This means that you can add a listener to any DisplayObject
43
+ * instance to listen for broadcast events. In addition to the broadcast
44
+ * events listed in the DisplayObject class's Events table, the DisplayObject
45
+ * class also inherits two broadcast events from the EventDispatcher class:
46
+ * <code>activate</code> and <code>deactivate</code>.</p>
47
+ *
48
+ * <p>Some properties previously used in the ActionScript 1.0 and 2.0
49
+ * MovieClip, TextField, and Button classes(such as <code>_alpha</code>,
50
+ * <code>_height</code>, <code>_pName</code>, <code>_width</code>,
51
+ * <code>_x</code>, <code>_y</code>, and others) have equivalents in the
52
+ * ActionScript 3.0 DisplayObject class that are renamed so that they no
53
+ * longer begin with the underscore(_) character.</p>
54
+ *
55
+ * <p>For more information, see the "Display Programming" chapter of the
56
+ * <i>ActionScript 3.0 Developer's Guide</i>.</p>
57
+ *
58
+ * @event added Dispatched when a display object is added to the
59
+ * display list. The following methods trigger this
60
+ * event:
61
+ * <code>DisplayObjectContainer.addChild()</code>,
62
+ * <code>DisplayObjectContainer.addChildAt()</code>.
63
+ * @event addedToScene Dispatched when a display object is added to the on
64
+ * scene display list, either directly or through the
65
+ * addition of a sub tree in which the display object
66
+ * is contained. The following methods trigger this
67
+ * event:
68
+ * <code>DisplayObjectContainer.addChild()</code>,
69
+ * <code>DisplayObjectContainer.addChildAt()</code>.
70
+ * @event enterFrame [broadcast event] Dispatched when the playhead is
71
+ * entering a new frame. If the playhead is not
72
+ * moving, or if there is only one frame, this event
73
+ * is dispatched continuously in conjunction with the
74
+ * frame rate. This event is a broadcast event, which
75
+ * means that it is dispatched by all display objects
76
+ * with a listener registered for this event.
77
+ * @event exitFrame [broadcast event] Dispatched when the playhead is
78
+ * exiting the current frame. All frame scripts have
79
+ * been run. If the playhead is not moving, or if
80
+ * there is only one frame, this event is dispatched
81
+ * continuously in conjunction with the frame rate.
82
+ * This event is a broadcast event, which means that
83
+ * it is dispatched by all display objects with a
84
+ * listener registered for this event.
85
+ * @event frameConstructed [broadcast event] Dispatched after the constructors
86
+ * of frame display objects have run but before frame
87
+ * scripts have run. If the playhead is not moving, or
88
+ * if there is only one frame, this event is
89
+ * dispatched continuously in conjunction with the
90
+ * frame rate. This event is a broadcast event, which
91
+ * means that it is dispatched by all display objects
92
+ * with a listener registered for this event.
93
+ * @event removed Dispatched when a display object is about to be
94
+ * removed from the display list. Two methods of the
95
+ * DisplayObjectContainer class generate this event:
96
+ * <code>removeChild()</code> and
97
+ * <code>removeChildAt()</code>.
98
+ *
99
+ * <p>The following methods of a
100
+ * DisplayObjectContainer object also generate this
101
+ * event if an object must be removed to make room for
102
+ * the new object: <code>addChild()</code>,
103
+ * <code>addChildAt()</code>, and
104
+ * <code>setChildIndex()</code>. </p>
105
+ * @event removedFromScene Dispatched when a display object is about to be
106
+ * removed from the display list, either directly or
107
+ * through the removal of a sub tree in which the
108
+ * display object is contained. Two methods of the
109
+ * DisplayObjectContainer class generate this event:
110
+ * <code>removeChild()</code> and
111
+ * <code>removeChildAt()</code>.
112
+ *
113
+ * <p>The following methods of a
114
+ * DisplayObjectContainer object also generate this
115
+ * event if an object must be removed to make room for
116
+ * the new object: <code>addChild()</code>,
117
+ * <code>addChildAt()</code>, and
118
+ * <code>setChildIndex()</code>. </p>
119
+ * @event render [broadcast event] Dispatched when the display list
120
+ * is about to be updated and rendered. This event
121
+ * provides the last opportunity for objects listening
122
+ * for this event to make changes before the display
123
+ * list is rendered. You must call the
124
+ * <code>invalidate()</code> method of the Scene
125
+ * object each time you want a <code>render</code>
126
+ * event to be dispatched. <code>Render</code> events
127
+ * are dispatched to an object only if there is mutual
128
+ * trust between it and the object that called
129
+ * <code>Scene.invalidate()</code>. This event is a
130
+ * broadcast event, which means that it is dispatched
131
+ * by all display objects with a listener registered
132
+ * for this event.
133
+ *
134
+ * <p><b>Note: </b>This event is not dispatched if the
135
+ * display is not rendering. This is the case when the
136
+ * content is either minimized or obscured. </p>
137
+ */
138
+ export declare class DisplayObject extends AssetBase implements IBitmapDrawable, IContainer, IAbstractionPool {
139
+ private static _store;
140
+ readonly abstractions: AbstractionSet;
141
+ _renderObjects: Record<number, RenderEntity | _Render_RenderableBase | CacheRenderer>;
142
+ _containerNodes: Record<number, ContainerNode>;
143
+ private _mouseChildren;
144
+ _material: IMaterial;
145
+ _style: Style;
146
+ private _loader;
147
+ private _mouseX;
148
+ private _mouseY;
149
+ private _root;
150
+ private _boundsVisible;
151
+ private _boundsPrefab;
152
+ private _boundsPrefabDirty;
153
+ private _boundsPrimitive;
154
+ private _pName;
155
+ private _scrollRect;
156
+ private _scrollRectPrimitive;
157
+ protected _parent: DisplayObjectContainer;
158
+ _sessionID: number;
159
+ _avmDepthID: number;
160
+ pickObjectFromTimeline: boolean;
161
+ private _alignmentMode;
162
+ private _scale9Grid;
163
+ protected _transform: Transform;
164
+ private _visible;
165
+ private _maskId;
166
+ protected _timelineMasks: DisplayObject[] | undefined;
167
+ protected _mask: DisplayObject | undefined;
168
+ private _mouseEnabled;
169
+ private _eulers;
170
+ _registrationMatrix3D: Matrix3D;
171
+ private _defaultBoundingVolume;
172
+ cursorType: string;
173
+ protected _isInFocus: boolean;
174
+ protected _tabEnabled: boolean;
175
+ protected _tabIndex: number;
176
+ private _maskMode;
177
+ private _pickObject;
178
+ _hierarchicalPropsDirty: number;
179
+ private _onInvalidatePropertiesDelegate;
180
+ private _onInvalidateImagesDelegate;
181
+ isSlice9ScaledMC: boolean;
182
+ isSlice9ScaledSprite: boolean;
183
+ avm1Symbol: any;
184
+ isAVMScene: boolean;
185
+ placeObjectTag: any;
186
+ getScriptPrecedence(): number[];
187
+ getMouseCursor(): string;
188
+ get tabEnabled(): boolean;
189
+ set tabEnabled(value: boolean);
190
+ get tabIndex(): number;
191
+ set tabIndex(value: number);
192
+ get isInFocus(): boolean;
193
+ set isInFocus(value: boolean);
194
+ setFocus(value: boolean, fromMouseDown?: boolean, sendSoftKeyEvent?: boolean): void;
195
+ /**
196
+ *
197
+ */
198
+ get alignmentMode(): AlignmentMode;
199
+ set alignmentMode(value: AlignmentMode);
200
+ /**
201
+ * Indicates the alpha transparency value of the object specified. Valid
202
+ * values are 0(fully transparent) to 1(fully opaque). The default value is
203
+ * 1. Display objects with <code>alpha</code> set to 0 <i>are</i> active,
204
+ * even though they are invisible.
205
+ */
206
+ get alpha(): number;
207
+ set alpha(value: number);
208
+ /**
209
+ * A value from the BlendMode class that specifies which blend mode to use. A
210
+ * bitmap can be drawn internally in two ways. If you have a blend mode
211
+ * enabled or an external clipping mask, the bitmap is drawn by adding a
212
+ * bitmap-filled square shape to the vector render. If you attempt to set
213
+ * this property to an invalid value, Flash runtimes set the value to
214
+ * <code>BlendMode.NORMAL</code>.
215
+ *
216
+ * <p>The <code>blendMode</code> property affects each pixel of the display
217
+ * object. Each pixel is composed of three constituent colors(red, green,
218
+ * and blue), and each constituent color has a value between 0x00 and 0xFF.
219
+ * Flash Player or Adobe AIR compares each constituent color of one pixel in
220
+ * the movie clip with the corresponding color of the pixel in the
221
+ * background. For example, if <code>blendMode</code> is set to
222
+ * <code>BlendMode.LIGHTEN</code>, Flash Player or Adobe AIR compares the red
223
+ * value of the display object with the red value of the background, and uses
224
+ * the lighter of the two as the value for the red component of the displayed
225
+ * color.</p>
226
+ *
227
+ * <p>The following table describes the <code>blendMode</code> settings. The
228
+ * BlendMode class defines string values you can use. The illustrations in
229
+ * the table show <code>blendMode</code> values applied to a circular display
230
+ * object(2) superimposed on another display object(1).</p>
231
+ */
232
+ _blendMode: BlendMode;
233
+ set blendMode(v: BlendMode);
234
+ get blendMode(): BlendMode;
235
+ /**
236
+ *
237
+ */
238
+ get defaultBoundingVolume(): BoundingVolumeType;
239
+ set defaultBoundingVolume(value: BoundingVolumeType);
240
+ /**
241
+ * If set to <code>true</code>, NME will use the software renderer to cache
242
+ * an internal bitmap representation of the display object. For native targets,
243
+ * this is often much slower than the default hardware renderer. When you
244
+ * are using the Flash target, this caching may increase performance for display
245
+ * objects that contain complex vector content.
246
+ *
247
+ * <p>All vector data for a display object that has a cached bitmap is drawn
248
+ * to the bitmap instead of the main display. If
249
+ * <code>cacheAsBitmapMatrix</code> is null or unsupported, the bitmap is
250
+ * then copied to the main display as unstretched, unrotated pixels snapped
251
+ * to the nearest pixel boundaries. Pixels are mapped 1 to 1 with the parent
252
+ * object. If the bounds of the bitmap change, the bitmap is recreated
253
+ * instead of being stretched.</p>
254
+ *
255
+ * <p>If <code>cacheAsBitmapMatrix</code> is non-null and supported, the
256
+ * object is drawn to the off-screen bitmap using that matrix and the
257
+ * stretched and/or rotated results of that rendering are used to draw the
258
+ * object to the main display.</p>
259
+ *
260
+ * <p>No internal bitmap is created unless the <code>BBitmap</code>
261
+ * property is set to <code>true</code>.</p>
262
+ *
263
+ * <p>After you set the <code>cacheAsBitmap</code> property to
264
+ * <code>true</code>, the rendering does not change, however the display
265
+ * object performs pixel snapping automatically. The animation speed can be
266
+ * significantly faster depending on the complexity of the vector content.
267
+ * </p>
268
+ *
269
+ * <p>The <code>cacheAsBitmap</code> property is automatically set to
270
+ * <code>true</code> whenever you apply a filter to a display object(when
271
+ * its <code>filter</code> array is not empty), and if a display object has a
272
+ * filter applied to it, <code>cacheAsBitmap</code> is reported as
273
+ * <code>true</code> for that display object, even if you set the property to
274
+ * <code>false</code>. If you clear all filters for a display object, the
275
+ * <code>cacheAsBitmap</code> setting changes to what it was last set to.</p>
276
+ *
277
+ * <p>A display object does not use a bitmap even if the
278
+ * <code>cacheAsBitmap</code> property is set to <code>true</code> and
279
+ * instead renders from vector data in the following cases:</p>
280
+ *
281
+ * <ul>
282
+ * <li>The bitmap is too large. In AIR 1.5 and Flash Player 10, the maximum
283
+ * size for a bitmap image is 8,191 pixels in width or height, and the total
284
+ * number of pixels cannot exceed 16,777,215 pixels.(So, if a bitmap image
285
+ * is 8,191 pixels wide, it can only be 2,048 pixels high.) In Flash Player 9
286
+ * and earlier, the limitation is is 2880 pixels in height and 2,880 pixels
287
+ * in width.</li>
288
+ * <li>The bitmap fails to allocate(out of memory error). </li>
289
+ * </ul>
290
+ *
291
+ * <p>The <code>cacheAsBitmap</code> property is best used with movie clips
292
+ * that have mostly static content and that do not scale and rotate
293
+ * frequently. With such movie clips, <code>cacheAsBitmap</code> can lead to
294
+ * performance increases when the movie clip is translated(when its <i>x</i>
295
+ * and <i>y</i> position is changed).</p>
296
+ */
297
+ private _cacheAsBitmap;
298
+ get cacheAsBitmap(): boolean;
299
+ set cacheAsBitmap(value: boolean);
300
+ /**
301
+ *
302
+ */
303
+ castsShadows: boolean;
304
+ /**
305
+ * Defines the rotation of the 3d object as a <code>Vector3D</code>
306
+ * object containing euler angles for rotation around x, y and z axis.
307
+ */
308
+ get eulers(): Vector3D;
309
+ set eulers(value: Vector3D);
310
+ /**
311
+ * An object that can contain any extra data.
312
+ */
313
+ extra: Object;
314
+ /**
315
+ * An indexed array that contains each filter object currently associated
316
+ * with the display object. The flash.filters package contains several
317
+ * classes that define specific filters you can use.
318
+ *
319
+ * <p>Filters can be applied in Flash Professional at design time, or at run
320
+ * time by using ActionScript code. To apply a filter by using ActionScript,
321
+ * you must make a temporary copy of the entire <code>filters</code> array,
322
+ * modify the temporary array, then assign the value of the temporary array
323
+ * back to the <code>filters</code> array. You cannot directly add a new
324
+ * filter object to the <code>filters</code> array.</p>
325
+ *
326
+ * <p>To add a filter by using ActionScript, perform the following steps
327
+ * (assume that the target display object is named
328
+ * <code>myDisplayObject</code>):</p>
329
+ *
330
+ * <ol>
331
+ * <li>Create a new filter object by using the constructor method of your
332
+ * chosen filter class.</li>
333
+ * <li>Assign the value of the <code>myDisplayObject.filters</code> array
334
+ * to a temporary array, such as one named <code>myFilters</code>.</li>
335
+ * <li>Add the new filter object to the <code>myFilters</code> temporary
336
+ * array.</li>
337
+ * <li>Assign the value of the temporary array to the
338
+ * <code>myDisplayObject.filters</code> array.</li>
339
+ * </ol>
340
+ *
341
+ * <p>If the <code>filters</code> array is undefined, you do not need to use
342
+ * a temporary array. Instead, you can directly assign an array literal that
343
+ * contains one or more filter objects that you create. The first example in
344
+ * the Examples section adds a drop shadow filter by using code that handles
345
+ * both defined and undefined <code>filters</code> arrays.</p>
346
+ *
347
+ * <p>To modify an existing filter object, you must use the technique of
348
+ * modifying a copy of the <code>filters</code> array:</p>
349
+ *
350
+ * <ol>
351
+ * <li>Assign the value of the <code>filters</code> array to a temporary
352
+ * array, such as one named <code>myFilters</code>.</li>
353
+ * <li>Modify the property by using the temporary array,
354
+ * <code>myFilters</code>. For example, to set the quality property of the
355
+ * first filter in the array, you could use the following code:
356
+ * <code>myFilters[0].quality = 1;</code></li>
357
+ * <li>Assign the value of the temporary array to the <code>filters</code>
358
+ * array.</li>
359
+ * </ol>
360
+ *
361
+ * <p>At load time, if a display object has an associated filter, it is
362
+ * marked to cache itself as a transparent bitmap. From this point forward,
363
+ * as long as the display object has a valid filter list, the player caches
364
+ * the display object as a bitmap. This source bitmap is used as a source
365
+ * image for the filter effects. Each display object usually has two bitmaps:
366
+ * one with the original unfiltered source display object and another for the
367
+ * final image after filtering. The final image is used when rendering. As
368
+ * long as the display object does not change, the final image does not need
369
+ * updating.</p>
370
+ *
371
+ * <p>The flash.filters package includes classes for filters. For example, to
372
+ * create a DropShadow filter, you would write:</p>
373
+ *
374
+ * @throws ArgumentError When <code>filters</code> includes a ShaderFilter
375
+ * and the shader output type is not compatible with
376
+ * this operation(the shader must specify a
377
+ * <code>pixel4</code> output).
378
+ * @throws ArgumentError When <code>filters</code> includes a ShaderFilter
379
+ * and the shader doesn't specify any image input or
380
+ * the first input is not an <code>image4</code> input.
381
+ * @throws ArgumentError When <code>filters</code> includes a ShaderFilter
382
+ * and the shader specifies an image input that isn't
383
+ * provided.
384
+ * @throws ArgumentError When <code>filters</code> includes a ShaderFilter, a
385
+ * ByteArray or Vector.<Number> instance as a shader
386
+ * input, and the <code>width</code> and
387
+ * <code>height</code> properties aren't specified for
388
+ * the ShaderInput object, or the specified values
389
+ * don't match the amount of data in the input data.
390
+ * See the <code>ShaderInput.input</code> property for
391
+ * more information.
392
+ */
393
+ private _filters;
394
+ set filters(v: Array<IFilter>);
395
+ get filters(): Array<IFilter>;
396
+ updateFilters(_newFilters: IFilter[]): void;
397
+ /**
398
+ * Indicates the instance container index of the DisplayObject. The object can be
399
+ * identified in the child list of its parent display object container by
400
+ * calling the <code>getChildByIndex()</code> method of the display object
401
+ * container.
402
+ *
403
+ * <p>If the DisplayObject has no parent container, index defaults to 0.</p>
404
+ */
405
+ get index(): number;
406
+ /**
407
+ * Returns a LoaderInfo object containing information about loading the file
408
+ * to which this display object belongs. The <code>loaderInfo</code> property
409
+ * is defined only for the root display object of a SWF file or for a loaded
410
+ * Bitmap(not for a Bitmap that is drawn with ActionScript). To find the
411
+ * <code>loaderInfo</code> object associated with the SWF file that contains
412
+ * a display object named <code>myDisplayObject</code>, use
413
+ * <code>myDisplayObject.root.loaderInfo</code>.
414
+ *
415
+ * <p>A large SWF file can monitor its download by calling
416
+ * <code>this.root.loaderInfo.addEventListener(Event.COMPLETE,
417
+ * func)</code>.</p>
418
+ */
419
+ get loader(): Loader;
420
+ /**
421
+ * The calling display object is masked by the specified <code>mask</code>
422
+ * object. To ensure that masking works when the Stage is scaled, the
423
+ * <code>mask</code> display object must be in an active part of the display
424
+ * list. The <code>mask</code> object itself is not drawn. Set
425
+ * <code>mask</code> to <code>null</code> to remove the mask.
426
+ *
427
+ * <p>To be able to scale a mask object, it must be on the display list. To
428
+ * be able to drag a mask Sprite object(by calling its
429
+ * <code>startDrag()</code> method), it must be on the display list. To call
430
+ * the <code>startDrag()</code> method for a mask sprite based on a
431
+ * <code>mouseDown</code> event being dispatched by the sprite, set the
432
+ * sprite's <code>buttonMode</code> property to <code>true</code>.</p>
433
+ *
434
+ * <p>When display objects are cached by setting the
435
+ * <code>cacheAsBitmap</code> property to <code>true</code> an the
436
+ * <code>cacheAsBitmapMatrix</code> property to a Matrix object, both the
437
+ * mask and the display object being masked must be part of the same cached
438
+ * bitmap. Thus, if the display object is cached, then the mask must be a
439
+ * child of the display object. If an ancestor of the display object on the
440
+ * display list is cached, then the mask must be a child of that ancestor or
441
+ * one of its descendents. If more than one ancestor of the masked object is
442
+ * cached, then the mask must be a descendent of the cached container closest
443
+ * to the masked object in the display list.</p>
444
+ *
445
+ * <p><b>Note:</b> A single <code>mask</code> object cannot be used to mask
446
+ * more than one calling display object. When the <code>mask</code> is
447
+ * assigned to a second display object, it is removed as the mask of the
448
+ * first object, and that object's <code>mask</code> property becomes
449
+ * <code>null</code>.</p>
450
+ */
451
+ get mask(): DisplayObject | undefined;
452
+ set mask(value: DisplayObject | undefined);
453
+ get maskMode(): boolean;
454
+ set maskMode(value: boolean);
455
+ get pickObject(): DisplayObjectContainer;
456
+ set pickObject(value: DisplayObjectContainer);
457
+ /**
458
+ * Specifies whether this object receives mouse, or other user input,
459
+ * messages. The default value is <code>true</code>, which means that by
460
+ * default any InteractiveObject instance that is on the display list
461
+ * receives mouse events or other user input events. If
462
+ * <code>mouseEnabled</code> is set to <code>false</code>, the instance does
463
+ * not receive any mouse events(or other user input events like keyboard
464
+ * events). Any children of this instance on the display list are not
465
+ * affected. To change the <code>mouseEnabled</code> behavior for all
466
+ * children of an object on the display list, use
467
+ * <code>flash.display.DisplayObjectContainer.mouseChildren</code>.
468
+ *
469
+ * <p> No event is dispatched by setting this property. You must use the
470
+ * <code>addEventListener()</code> method to create interactive
471
+ * functionality.</p>
472
+ */
473
+ get mouseEnabled(): boolean;
474
+ set mouseEnabled(value: boolean);
475
+ /**
476
+ * Indicates the x coordinate of the mouse or user input device position, in
477
+ * pixels.
478
+ *
479
+ * <p><b>Note</b>: For a DisplayObject that has been rotated, the returned x
480
+ * coordinate will reflect the non-rotated object.</p>
481
+ */
482
+ get mouseX(): number;
483
+ /**
484
+ * Indicates the y coordinate of the mouse or user input device position, in
485
+ * pixels.
486
+ *
487
+ * <p><b>Note</b>: For a DisplayObject that has been rotated, the returned y
488
+ * coordinate will reflect the non-rotated object.</p>
489
+ */
490
+ get mouseY(): number;
491
+ /**
492
+ * Indicates the instance name of the DisplayObject. The object can be
493
+ * identified in the child list of its parent display object container by
494
+ * calling the <code>getChildByName()</code> method of the display object
495
+ * container.
496
+ *
497
+ * @throws IllegalOperationError If you are attempting to set this property
498
+ * on an object that was placed on the timeline
499
+ * in the Flash authoring tool.
500
+ */
501
+ get name(): string;
502
+ set name(value: string);
503
+ /**
504
+ *
505
+ */
506
+ orientationMode: OrientationMode;
507
+ /**
508
+ * Indicates the DisplayObjectContainer object that contains this display
509
+ * object. Use the <code>parent</code> property to specify a relative path to
510
+ * display objects that are above the current display object in the display
511
+ * list hierarchy.
512
+ *
513
+ * <p>You can use <code>parent</code> to move up multiple levels in the
514
+ * display list as in the following:</p>
515
+ *
516
+ * @throws SecurityError The parent display object belongs to a security
517
+ * sandbox to which you do not have access. You can
518
+ * avoid this situation by having the parent movie call
519
+ * the <code>Security.allowDomain()</code> method.
520
+ */
521
+ get parent(): DisplayObjectContainer;
522
+ /**
523
+ * Defines the local point around which the object rotates.
524
+ */
525
+ get registrationPoint(): Vector3D;
526
+ set registrationPoint(value: Vector3D);
527
+ /**
528
+ * Defines the local scale.
529
+ */
530
+ get registrationScale(): Vector3D;
531
+ set registrationScale(value: Vector3D);
532
+ /**
533
+ * For a display object in a loaded SWF file, the <code>root</code> property
534
+ * is the top-most display object in the portion of the display list's tree
535
+ * structure represented by that SWF file. For a Bitmap object representing a
536
+ * loaded image file, the <code>root</code> property is the Bitmap object
537
+ * itself. For the instance of the main class of the first SWF file loaded,
538
+ * the <code>root</code> property is the display object itself. The
539
+ * <code>root</code> property of the Scene object is the Scene object itself.
540
+ * The <code>root</code> property is set to <code>null</code> for any display
541
+ * object that has not been added to the display list, unless it has been
542
+ * added to a display object container that is off the display list but that
543
+ * is a child of the top-most display object in a loaded SWF file.
544
+ *
545
+ * <p>For example, if you create a new Sprite object by calling the
546
+ * <code>Sprite()</code> constructor method, its <code>root</code> property
547
+ * is <code>null</code> until you add it to the display list(or to a display
548
+ * object container that is off the display list but that is a child of the
549
+ * top-most display object in a SWF file).</p>
550
+ *
551
+ * <p>For a loaded SWF file, even though the Loader object used to load the
552
+ * file may not be on the display list, the top-most display object in the
553
+ * SWF file has its <code>root</code> property set to itself. The Loader
554
+ * object does not have its <code>root</code> property set until it is added
555
+ * as a child of a display object for which the <code>root</code> property is
556
+ * set.</p>
557
+ */
558
+ get root(): DisplayObjectContainer;
559
+ /**
560
+ * Indicates the rotation of the DisplayObject instance, in degrees, from its
561
+ * original orientation. Values from 0 to 180 represent clockwise rotation;
562
+ * values from 0 to -180 represent counterclockwise rotation. Values outside
563
+ * this range are added to or subtracted from 360 to obtain a value within
564
+ * the range. For example, the statement <code>my_video.rotation = 450</code>
565
+ * is the same as <code> my_video.rotation = 90</code>.
566
+ */
567
+ rotation: number;
568
+ /**
569
+ * Indicates the x-axis rotation of the DisplayObject instance, in degrees,
570
+ * from its original orientation relative to the 3D parent container. Values
571
+ * from 0 to 180 represent clockwise rotation; values from 0 to -180
572
+ * represent counterclockwise rotation. Values outside this range are added
573
+ * to or subtracted from 360 to obtain a value within the range.
574
+ */
575
+ get rotationX(): number;
576
+ set rotationX(val: number);
577
+ /**
578
+ * Indicates the y-axis rotation of the DisplayObject instance, in degrees,
579
+ * from its original orientation relative to the 3D parent container. Values
580
+ * from 0 to 180 represent clockwise rotation; values from 0 to -180
581
+ * represent counterclockwise rotation. Values outside this range are added
582
+ * to or subtracted from 360 to obtain a value within the range.
583
+ */
584
+ get rotationY(): number;
585
+ set rotationY(val: number);
586
+ /**
587
+ * Indicates the z-axis rotation of the DisplayObject instance, in degrees,
588
+ * from its original orientation relative to the 3D parent container. Values
589
+ * from 0 to 180 represent clockwise rotation; values from 0 to -180
590
+ * represent counterclockwise rotation. Values outside this range are added
591
+ * to or subtracted from 360 to obtain a value within the range.
592
+ */
593
+ get rotationZ(): number;
594
+ set rotationZ(val: number);
595
+ /**
596
+ * The current scaling grid that is in effect. If set to <code>null</code>,
597
+ * the entire display object is scaled normally when any scale transformation
598
+ * is applied.
599
+ *
600
+ * <p>When you define the <code>scale9Grid</code> property, the display
601
+ * object is divided into a grid with nine regions based on the
602
+ * <code>scale9Grid</code> rectangle, which defines the center region of the
603
+ * grid. The eight other regions of the grid are the following areas: </p>
604
+ *
605
+ * <ul>
606
+ * <li>The upper-left corner outside of the rectangle</li>
607
+ * <li>The area above the rectangle </li>
608
+ * <li>The upper-right corner outside of the rectangle</li>
609
+ * <li>The area to the left of the rectangle</li>
610
+ * <li>The area to the right of the rectangle</li>
611
+ * <li>The lower-left corner outside of the rectangle</li>
612
+ * <li>The area below the rectangle</li>
613
+ * <li>The lower-right corner outside of the rectangle</li>
614
+ * </ul>
615
+ *
616
+ * <p>You can think of the eight regions outside of the center(defined by
617
+ * the rectangle) as being like a picture frame that has special rules
618
+ * applied to it when scaled.</p>
619
+ *
620
+ * <p>When the <code>scale9Grid</code> property is set and a display object
621
+ * is scaled, all text and gradients are scaled normally; however, for other
622
+ * types of objects the following rules apply:</p>
623
+ *
624
+ * <ul>
625
+ * <li>Content in the center region is scaled normally. </li>
626
+ * <li>Content in the corners is not scaled. </li>
627
+ * <li>Content in the top and bottom regions is scaled horizontally only.
628
+ * Content in the left and right regions is scaled vertically only.</li>
629
+ * <li>All fills(including bitmaps, video, and gradients) are stretched to
630
+ * fit their shapes.</li>
631
+ * </ul>
632
+ *
633
+ * <p>If a display object is rotated, all subsequent scaling is normal(and
634
+ * the <code>scale9Grid</code> property is ignored).</p>
635
+ *
636
+ * <p>For example, consider the following display object and a rectangle that
637
+ * is applied as the display object's <code>scale9Grid</code>:</p>
638
+ *
639
+ * <p>A common use for setting <code>scale9Grid</code> is to set up a display
640
+ * object to be used as a component, in which edge regions retain the same
641
+ * width when the component is scaled.</p>
642
+ *
643
+ * @throws ArgumentError If you pass an invalid argument to the method.
644
+ */
645
+ get scale9Grid(): Rectangle;
646
+ set scale9Grid(value: Rectangle);
647
+ /**
648
+ * Indicates the horizontal scale(percentage) of the object as applied from
649
+ * the registration point. The default registration point is(0,0). 1.0
650
+ * equals 100% scale.
651
+ *
652
+ * <p>Scaling the local coordinate system changes the <code>x</code> and
653
+ * <code>y</code> property values, which are defined in whole pixels. </p>
654
+ */
655
+ get scaleX(): number;
656
+ set scaleX(val: number);
657
+ /**
658
+ * Indicates the vertical scale(percentage) of an object as applied from the
659
+ * registration point of the object. The default registration point is(0,0).
660
+ * 1.0 is 100% scale.
661
+ *
662
+ * <p>Scaling the local coordinate system changes the <code>x</code> and
663
+ * <code>y</code> property values, which are defined in whole pixels. </p>
664
+ */
665
+ get scaleY(): number;
666
+ set scaleY(val: number);
667
+ /**
668
+ * Indicates the depth scale(percentage) of an object as applied from the
669
+ * registration point of the object. The default registration point is(0,0).
670
+ * 1.0 is 100% scale.
671
+ *
672
+ * <p>Scaling the local coordinate system changes the <code>x</code>,
673
+ * <code>y</code> and <code>z</code> property values, which are defined in
674
+ * whole pixels. </p>
675
+ */
676
+ get scaleZ(): number;
677
+ set scaleZ(val: number);
678
+ /**
679
+ * Indicates the horizontal skew(angle) of the object as applied from
680
+ * the registration point. The default registration point is(0,0).
681
+ */
682
+ get skewX(): number;
683
+ set skewX(val: number);
684
+ /**
685
+ * Indicates the vertical skew(angle) of an object as applied from the
686
+ * registration point of the object. The default registration point is(0,0).
687
+ */
688
+ get skewY(): number;
689
+ set skewY(val: number);
690
+ /**
691
+ * Indicates the depth skew(angle) of an object as applied from the
692
+ * registration point of the object. The default registration point is(0,0).
693
+ */
694
+ get skewZ(): number;
695
+ set skewZ(val: number);
696
+ /**
697
+ * The scroll rectangle bounds of the display object. The display object is
698
+ * cropped to the size defined by the rectangle, and it scrolls within the
699
+ * rectangle when you change the <code>x</code> and <code>y</code> properties
700
+ * of the <code>scrollRect</code> object.
701
+ *
702
+ * <p>The properties of the <code>scrollRect</code> Rectangle object use the
703
+ * display object's coordinate space and are scaled just like the overall
704
+ * display object. The corner bounds of the cropped window on the scrolling
705
+ * display object are the origin of the display object(0,0) and the point
706
+ * defined by the width and height of the rectangle. They are not centered
707
+ * around the origin, but use the origin to define the upper-left corner of
708
+ * the area. A scrolled display object always scrolls in whole pixel
709
+ * increments. </p>
710
+ *
711
+ * <p>You can scroll an object left and right by setting the <code>x</code>
712
+ * property of the <code>scrollRect</code> Rectangle object. You can scroll
713
+ * an object up and down by setting the <code>y</code> property of the
714
+ * <code>scrollRect</code> Rectangle object. If the display object is rotated
715
+ * 90° and you scroll it left and right, the display object actually scrolls
716
+ * up and down.</p>
717
+ */
718
+ get scrollRect(): Rectangle;
719
+ set scrollRect(value: Rectangle);
720
+ /**
721
+ *
722
+ */
723
+ get material(): IMaterial;
724
+ set material(value: IMaterial);
725
+ /**
726
+ *
727
+ */
728
+ get style(): Style;
729
+ set style(value: Style);
730
+ /**
731
+ *
732
+ */
733
+ get boundsVisible(): boolean;
734
+ set boundsVisible(value: boolean);
735
+ getScrollRectPrimitive(): IContainer;
736
+ getBoundsPrimitive(picker: BoundsPicker): IContainer;
737
+ /**
738
+ * An object with properties pertaining to a display object's matrix, color
739
+ * transform, and pixel bounds. The specific properties - matrix,
740
+ * colorTransform, and three read-only properties
741
+ * (<code>concatenatedMatrix</code>, <code>concatenatedColorTransform</code>,
742
+ * and <code>pixelBounds</code>) - are described in the entry for the
743
+ * Transform class.
744
+ *
745
+ * <p>Each of the transform object's properties is itself an object. This
746
+ * concept is important because the only way to set new values for the matrix
747
+ * or colorTransform objects is to create a new object and copy that object
748
+ * into the transform.matrix or transform.colorTransform property.</p>
749
+ *
750
+ * <p>For example, to increase the <code>tx</code> value of a display
751
+ * object's matrix, you must make a copy of the entire matrix object, then
752
+ * copy the new object into the matrix property of the transform object:</p>
753
+ * <pre xml:space="preserve"><code> public myMatrix:Matrix =
754
+ * myDisplayObject.transform.matrix; myMatrix.tx += 10;
755
+ * myDisplayObject.transform.matrix = myMatrix; </code></pre>
756
+ *
757
+ * <p>You cannot directly set the <code>tx</code> property. The following
758
+ * code has no effect on <code>myDisplayObject</code>: </p>
759
+ * <pre xml:space="preserve"><code> myDisplayObject.transform.matrix.tx +=
760
+ * 10; </code></pre>
761
+ *
762
+ * <p>You can also copy an entire transform object and assign it to another
763
+ * display object's transform property. For example, the following code
764
+ * copies the entire transform object from <code>myOldDisplayObj</code> to
765
+ * <code>myNewDisplayObj</code>:</p>
766
+ * <code>myNewDisplayObj.transform = myOldDisplayObj.transform;</code>
767
+ *
768
+ * <p>The resulting display object, <code>myNewDisplayObj</code>, now has the
769
+ * same values for its matrix, color transform, and pixel bounds as the old
770
+ * display object, <code>myOldDisplayObj</code>.</p>
771
+ *
772
+ * <p>Note that AIR for TV devices use hardware acceleration, if it is
773
+ * available, for color transforms.</p>
774
+ */
775
+ get transform(): Transform;
776
+ /**
777
+ * Whether or not the display object is visible. Display objects that are not
778
+ * visible are disabled. For example, if <code>visible=false</code> for an
779
+ * InteractiveObject instance, it cannot be clicked.
780
+ */
781
+ get visible(): boolean;
782
+ set visible(value: boolean);
783
+ /**
784
+ * Update mask from timeline and take account that can be a scriptMask
785
+ *
786
+ * @param masks Masks from timeline
787
+ */
788
+ set timelineMasks(masks: DisplayObject[] | undefined);
789
+ get timelineMasks(): DisplayObject[] | undefined;
790
+ /**
791
+ * Determines whether or not the children of the object are mouse, or user
792
+ * input device, enabled. If an object is enabled, a user can interact with
793
+ * it by using a mouse or user input device. The default is
794
+ * <code>true</code>.
795
+ *
796
+ * <p>This property is useful when you create a button with an instance of
797
+ * the Sprite class(instead of using the SimpleButton class). When you use a
798
+ * Sprite instance to create a button, you can choose to decorate the button
799
+ * by using the <code>addChild()</code> method to add additional Sprite
800
+ * instances. This process can cause unexpected behavior with mouse events
801
+ * because the Sprite instances you add as children can become the target
802
+ * object of a mouse event when you expect the parent instance to be the
803
+ * target object. To ensure that the parent instance serves as the target
804
+ * objects for mouse events, you can set the <code>mouseChildren</code>
805
+ * property of the parent instance to <code>false</code>.</p>
806
+ *
807
+ * <p> No event is dispatched by setting this property. You must use the
808
+ * <code>addEventListener()</code> method to create interactive
809
+ * functionality.</p>
810
+ */
811
+ get mouseChildren(): boolean;
812
+ set mouseChildren(value: boolean);
813
+ /**
814
+ * Indicates the <i>x</i> coordinate of the DisplayObject instance relative
815
+ * to the local coordinates of the parent DisplayObjectContainer. If the
816
+ * object is inside a DisplayObjectContainer that has transformations, it is
817
+ * in the local coordinate system of the enclosing DisplayObjectContainer.
818
+ * Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the
819
+ * DisplayObjectContainer's children inherit a coordinate system that is
820
+ * rotated 90° counterclockwise. The object's coordinates refer to the
821
+ * registration point position.
822
+ */
823
+ get x(): number;
824
+ set x(val: number);
825
+ /**
826
+ * Indicates the <i>y</i> coordinate of the DisplayObject instance relative
827
+ * to the local coordinates of the parent DisplayObjectContainer. If the
828
+ * object is inside a DisplayObjectContainer that has transformations, it is
829
+ * in the local coordinate system of the enclosing DisplayObjectContainer.
830
+ * Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the
831
+ * DisplayObjectContainer's children inherit a coordinate system that is
832
+ * rotated 90° counterclockwise. The object's coordinates refer to the
833
+ * registration point position.
834
+ */
835
+ get y(): number;
836
+ set y(val: number);
837
+ /**
838
+ * Indicates the z coordinate position along the z-axis of the DisplayObject
839
+ * instance relative to the 3D parent container. The z property is used for
840
+ * 3D coordinates, not screen or pixel coordinates.
841
+ *
842
+ * <p>When you set a <code>z</code> property for a display object to
843
+ * something other than the default value of <code>0</code>, a corresponding
844
+ * Matrix3D object is automatically created. for adjusting a display object's
845
+ * position and orientation in three dimensions. When working with the
846
+ * z-axis, the existing behavior of x and y properties changes from screen or
847
+ * pixel coordinates to positions relative to the 3D parent container.</p>
848
+ *
849
+ * <p>For example, a child of the <code>_root</code> at position x = 100, y =
850
+ * 100, z = 200 is not drawn at pixel location(100,100). The child is drawn
851
+ * wherever the 3D projection calculation puts it. The calculation is:</p>
852
+ *
853
+ * <p><code>(x~~cameraFocalLength/cameraRelativeZPosition,
854
+ * y~~cameraFocalLength/cameraRelativeZPosition)</code></p>
855
+ */
856
+ get z(): number;
857
+ set z(val: number);
858
+ /**
859
+ *
860
+ */
861
+ zOffset: number;
862
+ /**
863
+ * Creates a new <code>DisplayObject</code> instance.
864
+ */
865
+ constructor();
866
+ advanceFrame(): void;
867
+ getEntity(): IEntity;
868
+ _initNode(node: ContainerNode): void;
869
+ /**
870
+ *
871
+ */
872
+ clone(): DisplayObject;
873
+ copyTo(displayObject: DisplayObject): void;
874
+ /**
875
+ *
876
+ */
877
+ dispose(): void;
878
+ disposeValues(): void;
879
+ /**
880
+ * Rotates the 3d object around to face a point defined relative
881
+ * to the local coordinates of the parent <code>ObjectContainer3D</code>.
882
+ *
883
+ * @param scenePosition The vector defining the point to be looked at
884
+ * @param upAxis An optional vector used to define the desired
885
+ * up orientation of the 3d object after rotation has occurred
886
+ */
887
+ lookAt(scenePosition: Vector3D, upAxis?: Vector3D): void;
888
+ /**
889
+ * Moves the local point around which the object rotates.
890
+ *
891
+ * @param dx The amount of movement along the local x axis.
892
+ * @param dy The amount of movement along the local y axis.
893
+ * @param dz The amount of movement along the local z axis.
894
+ */
895
+ movePivot(dx: number, dy: number, dz: number): void;
896
+ reset(): void;
897
+ /**
898
+ * @internal
899
+ */
900
+ _iController: ControllerBase;
901
+ hasDispatchedAddedToStage: boolean;
902
+ isOnDisplayList(): boolean;
903
+ /**
904
+ * @internal
905
+ */
906
+ _setParent(parent: DisplayObjectContainer): void;
907
+ _invalidateHierarchicalProperty(propDirty: HierarchicalProperty): void;
908
+ /**
909
+ * @internal
910
+ */
911
+ get maskId(): number;
912
+ protected _setScaleX(val: number): void;
913
+ protected _setScaleY(val: number): void;
914
+ protected _setScaleZ(val: number): void;
915
+ private _updateBoundsPrefab;
916
+ protected _updateMaskMode(): void;
917
+ _invalidateMaterial(): void;
918
+ private _invalidateStyle;
919
+ invalidateElements(): void;
920
+ protected _onInvalidateProperties(_event?: StyleEvent): void;
921
+ protected _onInvalidateImages(_event?: StyleEvent): void;
922
+ protected _getDefaultBoundingVolume(): BoundingVolumeType;
923
+ requestAbstraction(asset: IAsset): IAbstraction;
924
+ storeAbstraction(abstraction: IAbstraction): void;
925
+ getNode(container: IContainer): ContainerNode;
926
+ }
922
927
  //# sourceMappingURL=DisplayObject.d.ts.map