@next2d/player 1.14.19 → 1.14.21

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 (386) hide show
  1. package/index.js +3 -3
  2. package/package.json +31 -6
  3. package/interface/AjaxEventImpl.d.ts +0 -5
  4. package/interface/AjaxEventImpl.js +0 -1
  5. package/interface/AjaxOptionImpl.d.ts +0 -13
  6. package/interface/AjaxOptionImpl.js +0 -1
  7. package/interface/AttachmentImpl.d.ts +0 -11
  8. package/interface/AttachmentImpl.js +0 -1
  9. package/interface/BitmapDataChannelImpl.d.ts +0 -1
  10. package/interface/BitmapDataChannelImpl.js +0 -1
  11. package/interface/BitmapDrawObjectImpl.d.ts +0 -6
  12. package/interface/BitmapDrawObjectImpl.js +0 -1
  13. package/interface/BitmapFilterTypeImpl.d.ts +0 -1
  14. package/interface/BitmapFilterTypeImpl.js +0 -1
  15. package/interface/BlendModeImpl.d.ts +0 -1
  16. package/interface/BlendModeImpl.js +0 -1
  17. package/interface/BoundsImpl.d.ts +0 -6
  18. package/interface/BoundsImpl.js +0 -1
  19. package/interface/Character.d.ts +0 -2
  20. package/interface/Character.js +0 -1
  21. package/interface/CharacterImpl.d.ts +0 -2
  22. package/interface/CharacterImpl.js +0 -1
  23. package/interface/ClipObjectImpl.d.ts +0 -14
  24. package/interface/ClipObjectImpl.js +0 -1
  25. package/interface/ColorStopImpl.d.ts +0 -7
  26. package/interface/ColorStopImpl.js +0 -1
  27. package/interface/DictionaryTagImpl.d.ts +0 -7
  28. package/interface/DictionaryTagImpl.js +0 -1
  29. package/interface/DisplacementMapFilterModeImpl.d.ts +0 -1
  30. package/interface/DisplacementMapFilterModeImpl.js +0 -1
  31. package/interface/DisplayImpl.d.ts +0 -28
  32. package/interface/DisplayImpl.js +0 -1
  33. package/interface/DisplayObjectImpl.d.ts +0 -2
  34. package/interface/DisplayObjectImpl.js +0 -1
  35. package/interface/DragRulesImpl.d.ts +0 -7
  36. package/interface/DragRulesImpl.js +0 -1
  37. package/interface/DropTargetImpl.d.ts +0 -2
  38. package/interface/DropTargetImpl.js +0 -1
  39. package/interface/EventDispatcherImpl.d.ts +0 -2
  40. package/interface/EventDispatcherImpl.js +0 -1
  41. package/interface/EventListenerImpl.d.ts +0 -6
  42. package/interface/EventListenerImpl.js +0 -1
  43. package/interface/EventsImpl.d.ts +0 -20
  44. package/interface/EventsImpl.js +0 -1
  45. package/interface/FillMeshImpl.d.ts +0 -5
  46. package/interface/FillMeshImpl.js +0 -1
  47. package/interface/FilterArrayImpl.d.ts +0 -10
  48. package/interface/FilterArrayImpl.js +0 -1
  49. package/interface/FilterQualityImpl.d.ts +0 -1
  50. package/interface/FilterQualityImpl.js +0 -1
  51. package/interface/FiltersImpl.d.ts +0 -20
  52. package/interface/FiltersImpl.js +0 -1
  53. package/interface/GeomImpl.d.ts +0 -12
  54. package/interface/GeomImpl.js +0 -1
  55. package/interface/GradientTypeImpl.d.ts +0 -3
  56. package/interface/GradientTypeImpl.js +0 -1
  57. package/interface/GraphicsParentImpl.d.ts +0 -2
  58. package/interface/GraphicsParentImpl.js +0 -1
  59. package/interface/GridImpl.d.ts +0 -6
  60. package/interface/GridImpl.js +0 -1
  61. package/interface/ImageTypeImpl.d.ts +0 -1
  62. package/interface/ImageTypeImpl.js +0 -1
  63. package/interface/IndexRangeImpl.d.ts +0 -4
  64. package/interface/IndexRangeImpl.js +0 -1
  65. package/interface/LoaderInfoDataImpl.d.ts +0 -7
  66. package/interface/LoaderInfoDataImpl.js +0 -1
  67. package/interface/LoopConfigImpl.d.ts +0 -8
  68. package/interface/LoopConfigImpl.js +0 -1
  69. package/interface/LoopTypeImpl.d.ts +0 -1
  70. package/interface/LoopTypeImpl.js +0 -1
  71. package/interface/MediaImpl.d.ts +0 -10
  72. package/interface/MediaImpl.js +0 -1
  73. package/interface/MovieClipActionObjectImpl.d.ts +0 -5
  74. package/interface/MovieClipActionObjectImpl.js +0 -1
  75. package/interface/MovieClipCharacterImpl.d.ts +0 -18
  76. package/interface/MovieClipCharacterImpl.js +0 -1
  77. package/interface/MovieClipLabelObjectImpl.d.ts +0 -4
  78. package/interface/MovieClipLabelObjectImpl.js +0 -1
  79. package/interface/MovieClipSoundObjectImpl.d.ts +0 -5
  80. package/interface/MovieClipSoundObjectImpl.js +0 -1
  81. package/interface/NetImpl.d.ts +0 -6
  82. package/interface/NetImpl.js +0 -1
  83. package/interface/NoCodeDataImpl.d.ts +0 -7
  84. package/interface/NoCodeDataImpl.js +0 -1
  85. package/interface/NoCodeDataZlibImpl.d.ts +0 -4
  86. package/interface/NoCodeDataZlibImpl.js +0 -1
  87. package/interface/ParentImpl.d.ts +0 -2
  88. package/interface/ParentImpl.js +0 -1
  89. package/interface/PlaceObjectImpl.d.ts +0 -12
  90. package/interface/PlaceObjectImpl.js +0 -1
  91. package/interface/PlayerHitObjectImpl.d.ts +0 -7
  92. package/interface/PlayerHitObjectImpl.js +0 -1
  93. package/interface/PlayerModeImpl.d.ts +0 -1
  94. package/interface/PlayerModeImpl.js +0 -1
  95. package/interface/PlayerOptionsImpl.d.ts +0 -8
  96. package/interface/PlayerOptionsImpl.js +0 -1
  97. package/interface/PointImpl.d.ts +0 -4
  98. package/interface/PointImpl.js +0 -1
  99. package/interface/PreObjectImpl.d.ts +0 -23
  100. package/interface/PreObjectImpl.js +0 -1
  101. package/interface/PropertyBitmapDataMessageImpl.d.ts +0 -8
  102. package/interface/PropertyBitmapDataMessageImpl.js +0 -1
  103. package/interface/PropertyContainerMessageImpl.d.ts +0 -6
  104. package/interface/PropertyContainerMessageImpl.js +0 -1
  105. package/interface/PropertyMessageImpl.d.ts +0 -41
  106. package/interface/PropertyMessageImpl.js +0 -1
  107. package/interface/PropertyMessageMapImpl.d.ts +0 -2
  108. package/interface/PropertyMessageMapImpl.js +0 -1
  109. package/interface/PropertyShapeMessageImpl.d.ts +0 -6
  110. package/interface/PropertyShapeMessageImpl.js +0 -1
  111. package/interface/PropertyTextMessageImpl.d.ts +0 -25
  112. package/interface/PropertyTextMessageImpl.js +0 -1
  113. package/interface/PropertyVideoMessageImpl.d.ts +0 -5
  114. package/interface/PropertyVideoMessageImpl.js +0 -1
  115. package/interface/RGBAImpl.d.ts +0 -6
  116. package/interface/RGBAImpl.js +0 -1
  117. package/interface/ShapeCharacterImpl.d.ts +0 -14
  118. package/interface/ShapeCharacterImpl.js +0 -1
  119. package/interface/SoundCharacterImpl.d.ts +0 -5
  120. package/interface/SoundCharacterImpl.js +0 -1
  121. package/interface/SoundTagImpl.d.ts +0 -6
  122. package/interface/SoundTagImpl.js +0 -1
  123. package/interface/SpriteImpl.d.ts +0 -2
  124. package/interface/SpriteImpl.js +0 -1
  125. package/interface/StageDataImpl.d.ts +0 -6
  126. package/interface/StageDataImpl.js +0 -1
  127. package/interface/StageQualityImpl.d.ts +0 -1
  128. package/interface/StageQualityImpl.js +0 -1
  129. package/interface/StrokeMethImpl.d.ts +0 -4
  130. package/interface/StrokeMethImpl.js +0 -1
  131. package/interface/StrokeTypeImpl.d.ts +0 -2
  132. package/interface/StrokeTypeImpl.js +0 -1
  133. package/interface/SurfaceFilterImpl.d.ts +0 -6
  134. package/interface/SurfaceFilterImpl.js +0 -1
  135. package/interface/TextBreakObjectImpl.d.ts +0 -9
  136. package/interface/TextBreakObjectImpl.js +0 -1
  137. package/interface/TextCharacterImpl.d.ts +0 -27
  138. package/interface/TextCharacterImpl.js +0 -1
  139. package/interface/TextDataImpl.d.ts +0 -2
  140. package/interface/TextDataImpl.js +0 -1
  141. package/interface/TextFieldAutoSizeImpl.d.ts +0 -1
  142. package/interface/TextFieldAutoSizeImpl.js +0 -1
  143. package/interface/TextFieldTypeImpl.d.ts +0 -1
  144. package/interface/TextFieldTypeImpl.js +0 -1
  145. package/interface/TextFormatAlignImpl.d.ts +0 -1
  146. package/interface/TextFormatAlignImpl.js +0 -1
  147. package/interface/TextFormatVerticalAlignImpl.d.ts +0 -1
  148. package/interface/TextFormatVerticalAlignImpl.js +0 -1
  149. package/interface/TextImageObjectImpl.d.ts +0 -11
  150. package/interface/TextImageObjectImpl.js +0 -1
  151. package/interface/TextImpl.d.ts +0 -6
  152. package/interface/TextImpl.js +0 -1
  153. package/interface/TextObjectImpl.d.ts +0 -7
  154. package/interface/TextObjectImpl.js +0 -1
  155. package/interface/TextObjectModeImpl.d.ts +0 -1
  156. package/interface/TextObjectModeImpl.js +0 -1
  157. package/interface/TextStringObjectImpl.d.ts +0 -7
  158. package/interface/TextStringObjectImpl.js +0 -1
  159. package/interface/UIImpl.d.ts +0 -8
  160. package/interface/UIImpl.js +0 -1
  161. package/interface/URLLoaderDataFormatImpl.d.ts +0 -1
  162. package/interface/URLLoaderDataFormatImpl.js +0 -1
  163. package/interface/URLRequestMethodImpl.d.ts +0 -1
  164. package/interface/URLRequestMethodImpl.js +0 -1
  165. package/interface/UniformDataImpl.d.ts +0 -5
  166. package/interface/UniformDataImpl.js +0 -1
  167. package/interface/UnzipQueueImpl.d.ts +0 -6
  168. package/interface/UnzipQueueImpl.js +0 -1
  169. package/interface/VerticesImpl.d.ts +0 -1
  170. package/interface/VerticesImpl.js +0 -1
  171. package/interface/VideoCharacterImpl.d.ts +0 -12
  172. package/interface/VideoCharacterImpl.js +0 -1
  173. package/next2d/display/BitmapData.d.ts +0 -143
  174. package/next2d/display/BitmapData.js +0 -387
  175. package/next2d/display/BlendMode.d.ts +0 -204
  176. package/next2d/display/BlendMode.js +0 -240
  177. package/next2d/display/DisplayObject.d.ts +0 -565
  178. package/next2d/display/DisplayObject.js +0 -1670
  179. package/next2d/display/DisplayObjectContainer.d.ts +0 -351
  180. package/next2d/display/DisplayObjectContainer.js +0 -1776
  181. package/next2d/display/FrameLabel.d.ts +0 -98
  182. package/next2d/display/FrameLabel.js +0 -120
  183. package/next2d/display/Graphics.d.ts +0 -577
  184. package/next2d/display/Graphics.js +0 -2161
  185. package/next2d/display/GraphicsBitmapFill.d.ts +0 -49
  186. package/next2d/display/GraphicsBitmapFill.js +0 -86
  187. package/next2d/display/GraphicsGradientFill.d.ts +0 -66
  188. package/next2d/display/GraphicsGradientFill.js +0 -157
  189. package/next2d/display/InteractiveObject.d.ts +0 -32
  190. package/next2d/display/InteractiveObject.js +0 -43
  191. package/next2d/display/Loader.d.ts +0 -131
  192. package/next2d/display/Loader.js +0 -321
  193. package/next2d/display/LoaderInfo.d.ts +0 -122
  194. package/next2d/display/LoaderInfo.js +0 -184
  195. package/next2d/display/LoopConfig.d.ts +0 -108
  196. package/next2d/display/LoopConfig.js +0 -156
  197. package/next2d/display/LoopType.d.ts +0 -104
  198. package/next2d/display/LoopType.js +0 -122
  199. package/next2d/display/MovieClip.d.ts +0 -314
  200. package/next2d/display/MovieClip.js +0 -941
  201. package/next2d/display/Shape.d.ts +0 -169
  202. package/next2d/display/Shape.js +0 -509
  203. package/next2d/display/Sprite.d.ts +0 -175
  204. package/next2d/display/Sprite.js +0 -280
  205. package/next2d/display/Stage.d.ts +0 -164
  206. package/next2d/display/Stage.js +0 -251
  207. package/next2d/events/Event.d.ts +0 -424
  208. package/next2d/events/Event.js +0 -560
  209. package/next2d/events/EventDispatcher.d.ts +0 -138
  210. package/next2d/events/EventDispatcher.js +0 -623
  211. package/next2d/events/EventPhase.d.ts +0 -80
  212. package/next2d/events/EventPhase.js +0 -94
  213. package/next2d/events/FocusEvent.d.ts +0 -89
  214. package/next2d/events/FocusEvent.js +0 -103
  215. package/next2d/events/HTTPStatusEvent.d.ts +0 -107
  216. package/next2d/events/HTTPStatusEvent.js +0 -139
  217. package/next2d/events/IOErrorEvent.d.ts +0 -82
  218. package/next2d/events/IOErrorEvent.js +0 -101
  219. package/next2d/events/MouseEvent.d.ts +0 -163
  220. package/next2d/events/MouseEvent.js +0 -207
  221. package/next2d/events/ProgressEvent.d.ts +0 -97
  222. package/next2d/events/ProgressEvent.js +0 -123
  223. package/next2d/events/VideoEvent.d.ts +0 -145
  224. package/next2d/events/VideoEvent.js +0 -181
  225. package/next2d/filters/BevelFilter.d.ts +0 -254
  226. package/next2d/filters/BevelFilter.js +0 -491
  227. package/next2d/filters/BitmapFilter.d.ts +0 -75
  228. package/next2d/filters/BitmapFilter.js +0 -95
  229. package/next2d/filters/BlurFilter.d.ts +0 -150
  230. package/next2d/filters/BlurFilter.js +0 -370
  231. package/next2d/filters/ColorMatrixFilter.d.ts +0 -116
  232. package/next2d/filters/ColorMatrixFilter.js +0 -179
  233. package/next2d/filters/ConvolutionFilter.d.ts +0 -210
  234. package/next2d/filters/ConvolutionFilter.js +0 -366
  235. package/next2d/filters/DisplacementMapFilter.d.ts +0 -212
  236. package/next2d/filters/DisplacementMapFilter.js +0 -372
  237. package/next2d/filters/DropShadowFilter.d.ts +0 -240
  238. package/next2d/filters/DropShadowFilter.js +0 -461
  239. package/next2d/filters/GlowFilter.d.ts +0 -204
  240. package/next2d/filters/GlowFilter.js +0 -356
  241. package/next2d/filters/GradientBevelFilter.d.ts +0 -243
  242. package/next2d/filters/GradientBevelFilter.js +0 -474
  243. package/next2d/filters/GradientGlowFilter.d.ts +0 -243
  244. package/next2d/filters/GradientGlowFilter.js +0 -464
  245. package/next2d/geom/ColorTransform.d.ts +0 -201
  246. package/next2d/geom/ColorTransform.js +0 -278
  247. package/next2d/geom/Matrix.d.ts +0 -299
  248. package/next2d/geom/Matrix.js +0 -454
  249. package/next2d/geom/Point.d.ts +0 -213
  250. package/next2d/geom/Point.js +0 -274
  251. package/next2d/geom/Rectangle.d.ts +0 -364
  252. package/next2d/geom/Rectangle.js +0 -513
  253. package/next2d/geom/Transform.d.ts +0 -213
  254. package/next2d/geom/Transform.js +0 -492
  255. package/next2d/media/Sound.d.ts +0 -208
  256. package/next2d/media/Sound.js +0 -504
  257. package/next2d/media/SoundMixer.d.ts +0 -68
  258. package/next2d/media/SoundMixer.js +0 -115
  259. package/next2d/media/SoundTransform.d.ts +0 -80
  260. package/next2d/media/SoundTransform.js +0 -111
  261. package/next2d/media/Video.d.ts +0 -331
  262. package/next2d/media/Video.js +0 -856
  263. package/next2d/net/URLRequest.d.ts +0 -143
  264. package/next2d/net/URLRequest.js +0 -232
  265. package/next2d/net/URLRequestHeader.d.ts +0 -82
  266. package/next2d/net/URLRequestHeader.js +0 -105
  267. package/next2d/text/TextField.d.ts +0 -644
  268. package/next2d/text/TextField.js +0 -2662
  269. package/next2d/text/TextFormat.d.ts +0 -250
  270. package/next2d/text/TextFormat.js +0 -460
  271. package/next2d/ui/Easing.d.ts +0 -359
  272. package/next2d/ui/Easing.js +0 -481
  273. package/next2d/ui/Job.d.ts +0 -155
  274. package/next2d/ui/Job.js +0 -333
  275. package/next2d/ui/Tween.d.ts +0 -62
  276. package/next2d/ui/Tween.js +0 -72
  277. package/packages/Display.d.ts +0 -3
  278. package/packages/Display.js +0 -36
  279. package/packages/Events.d.ts +0 -3
  280. package/packages/Events.js +0 -28
  281. package/packages/Filters.d.ts +0 -3
  282. package/packages/Filters.js +0 -28
  283. package/packages/Geom.d.ts +0 -3
  284. package/packages/Geom.js +0 -20
  285. package/packages/Media.d.ts +0 -3
  286. package/packages/Media.js +0 -18
  287. package/packages/Net.d.ts +0 -3
  288. package/packages/Net.js +0 -14
  289. package/packages/Text.d.ts +0 -3
  290. package/packages/Text.js +0 -14
  291. package/packages/UI.d.ts +0 -3
  292. package/packages/UI.js +0 -16
  293. package/player/Next2D.d.ts +0 -70
  294. package/player/Next2D.js +0 -192
  295. package/player/Player.d.ts +0 -334
  296. package/player/Player.js +0 -1863
  297. package/util/CacheStore.d.ts +0 -115
  298. package/util/CacheStore.js +0 -276
  299. package/util/Global.d.ts +0 -23
  300. package/util/Global.js +0 -67
  301. package/util/RenderUtil.d.ts +0 -472
  302. package/util/RenderUtil.js +0 -686
  303. package/util/Shortcut.d.ts +0 -28
  304. package/util/Shortcut.js +0 -28
  305. package/util/Util.d.ts +0 -334
  306. package/util/Util.js +0 -844
  307. package/webgl/BezierConverter.d.ts +0 -59
  308. package/webgl/BezierConverter.js +0 -106
  309. package/webgl/CanvasGradientToWebGL.d.ts +0 -94
  310. package/webgl/CanvasGradientToWebGL.js +0 -181
  311. package/webgl/CanvasPatternToWebGL.d.ts +0 -39
  312. package/webgl/CanvasPatternToWebGL.js +0 -66
  313. package/webgl/CanvasToWebGLContext.d.ts +0 -596
  314. package/webgl/CanvasToWebGLContext.js +0 -1421
  315. package/webgl/CanvasToWebGLContextBlend.d.ts +0 -97
  316. package/webgl/CanvasToWebGLContextBlend.js +0 -299
  317. package/webgl/CanvasToWebGLContextGrid.d.ts +0 -74
  318. package/webgl/CanvasToWebGLContextGrid.js +0 -283
  319. package/webgl/CanvasToWebGLContextMask.d.ts +0 -113
  320. package/webgl/CanvasToWebGLContextMask.js +0 -436
  321. package/webgl/CanvasToWebGLContextPath.d.ts +0 -111
  322. package/webgl/CanvasToWebGLContextPath.js +0 -210
  323. package/webgl/CanvasToWebGLContextStyle.d.ts +0 -77
  324. package/webgl/CanvasToWebGLContextStyle.js +0 -139
  325. package/webgl/ColorBufferPool.d.ts +0 -58
  326. package/webgl/ColorBufferPool.js +0 -134
  327. package/webgl/FrameBufferManager.d.ts +0 -135
  328. package/webgl/FrameBufferManager.js +0 -358
  329. package/webgl/StencilBufferPool.d.ts +0 -56
  330. package/webgl/StencilBufferPool.js +0 -142
  331. package/webgl/TextureManager.d.ts +0 -130
  332. package/webgl/TextureManager.js +0 -296
  333. package/webgl/VertexArrayObjectManager.d.ts +0 -95
  334. package/webgl/VertexArrayObjectManager.js +0 -277
  335. package/webgl/WebGLFillMeshGenerator.d.ts +0 -31
  336. package/webgl/WebGLFillMeshGenerator.js +0 -101
  337. package/webgl/WebGLStrokeMeshGenerator.d.ts +0 -182
  338. package/webgl/WebGLStrokeMeshGenerator.js +0 -504
  339. package/webgl/shader/CanvasToWebGLShader.d.ts +0 -85
  340. package/webgl/shader/CanvasToWebGLShader.js +0 -192
  341. package/webgl/shader/CanvasToWebGLShaderList.d.ts +0 -70
  342. package/webgl/shader/CanvasToWebGLShaderList.js +0 -109
  343. package/webgl/shader/GradientLUTGenerator.d.ts +0 -36
  344. package/webgl/shader/GradientLUTGenerator.js +0 -123
  345. package/webgl/shader/WebGLShaderUniform.d.ts +0 -52
  346. package/webgl/shader/WebGLShaderUniform.js +0 -165
  347. package/webgl/shader/fragment/FragmentShaderLibrary.d.ts +0 -18
  348. package/webgl/shader/fragment/FragmentShaderLibrary.js +0 -35
  349. package/webgl/shader/fragment/FragmentShaderSource.d.ts +0 -29
  350. package/webgl/shader/fragment/FragmentShaderSource.js +0 -99
  351. package/webgl/shader/fragment/FragmentShaderSourceBlend.d.ts +0 -67
  352. package/webgl/shader/fragment/FragmentShaderSourceBlend.js +0 -319
  353. package/webgl/shader/fragment/FragmentShaderSourceGradient.d.ts +0 -44
  354. package/webgl/shader/fragment/FragmentShaderSourceGradient.js +0 -114
  355. package/webgl/shader/fragment/FragmentShaderSourceGradientLUT.d.ts +0 -14
  356. package/webgl/shader/fragment/FragmentShaderSourceGradientLUT.js +0 -58
  357. package/webgl/shader/fragment/FragmentShaderSourceTexture.d.ts +0 -12
  358. package/webgl/shader/fragment/FragmentShaderSourceTexture.js +0 -36
  359. package/webgl/shader/fragment/filter/FragmentShaderSourceBlurFilter.d.ts +0 -12
  360. package/webgl/shader/fragment/filter/FragmentShaderSourceBlurFilter.js +0 -42
  361. package/webgl/shader/fragment/filter/FragmentShaderSourceColorMatrixFilter.d.ts +0 -11
  362. package/webgl/shader/fragment/filter/FragmentShaderSourceColorMatrixFilter.js +0 -35
  363. package/webgl/shader/fragment/filter/FragmentShaderSourceConvolutionFilter.d.ts +0 -16
  364. package/webgl/shader/fragment/filter/FragmentShaderSourceConvolutionFilter.js +0 -80
  365. package/webgl/shader/fragment/filter/FragmentShaderSourceDisplacementMapFilter.d.ts +0 -15
  366. package/webgl/shader/fragment/filter/FragmentShaderSourceDisplacementMapFilter.js +0 -106
  367. package/webgl/shader/fragment/filter/FragmentShaderSourceFilter.d.ts +0 -112
  368. package/webgl/shader/fragment/filter/FragmentShaderSourceFilter.js +0 -275
  369. package/webgl/shader/variants/BlendShaderVariantCollection.d.ts +0 -99
  370. package/webgl/shader/variants/BlendShaderVariantCollection.js +0 -239
  371. package/webgl/shader/variants/FilterShaderVariantCollection.d.ts +0 -150
  372. package/webgl/shader/variants/FilterShaderVariantCollection.js +0 -395
  373. package/webgl/shader/variants/GradientLUTShaderVariantCollection.d.ts +0 -49
  374. package/webgl/shader/variants/GradientLUTShaderVariantCollection.js +0 -107
  375. package/webgl/shader/variants/GradientShapeShaderVariantCollection.d.ts +0 -61
  376. package/webgl/shader/variants/GradientShapeShaderVariantCollection.js +0 -196
  377. package/webgl/shader/variants/ShapeShaderVariantCollection.d.ts +0 -117
  378. package/webgl/shader/variants/ShapeShaderVariantCollection.js +0 -427
  379. package/webgl/shader/vertex/VertexShaderLibrary.d.ts +0 -18
  380. package/webgl/shader/vertex/VertexShaderLibrary.js +0 -75
  381. package/webgl/shader/vertex/VertexShaderSource.d.ts +0 -23
  382. package/webgl/shader/vertex/VertexShaderSource.js +0 -92
  383. package/webgl/shader/vertex/VertexShaderSourceFill.d.ts +0 -45
  384. package/webgl/shader/vertex/VertexShaderSourceFill.js +0 -112
  385. package/webgl/shader/vertex/VertexShaderSourceStroke.d.ts +0 -27
  386. package/webgl/shader/vertex/VertexShaderSourceStroke.js +0 -149
@@ -1,941 +0,0 @@
1
- import { Sprite } from "./Sprite";
2
- import { FrameLabel } from "./FrameLabel";
3
- import { Sound } from "../media/Sound";
4
- import { Event } from "../events/Event";
5
- import { $setCurrentLoaderInfo } from "../../util/Global";
6
- import { $currentPlayer, $rendererWorker } from "../../util/Util";
7
- import { $Array, $getArray, $getMap, $isNaN, $Math } from "../../util/RenderUtil";
8
- /**
9
- * MovieClip クラスは、Sprite、DisplayObjectContainer、InteractiveObject、DisplayObject
10
- * および EventDispatcher クラスを継承します。
11
- * MovieClip オブジェクトには、Sprite オブジェクトとは違ってタイムラインがあります。
12
- * タイムラインの再生ヘッドが停止されても、その MovieClip オブジェクトの子 MovieClip オブジェクトの再生ヘッドは停止しません。
13
- *
14
- * The MovieClip class inherits from the following classes: Sprite, DisplayObjectContainer,
15
- * InteractiveObject, DisplayObject, and EventDispatcher.
16
- * Unlike the Sprite object, a MovieClip object has a timeline.
17
- * When the playback head of the timeline is stopped,
18
- * the playback head of the child MovieClip object of that MovieClip object will not be stopped.
19
- *
20
- * @class
21
- * @memberOf next2d.display
22
- * @extends Sprite
23
- */
24
- export class MovieClip extends Sprite {
25
- /**
26
- * @constructor
27
- * @public
28
- */
29
- constructor() {
30
- super();
31
- /**
32
- * @type {boolean}
33
- * @default false
34
- * @private
35
- */
36
- this._$stopFlag = false;
37
- /**
38
- * @type {boolean}
39
- * @default true
40
- * @private
41
- */
42
- this._$canAction = true;
43
- /**
44
- * @type {boolean}
45
- * @default false
46
- * @private
47
- */
48
- this._$childRemove = false;
49
- /**
50
- * @type {boolean}
51
- * @default true
52
- * @private
53
- */
54
- this._$canSound = true;
55
- /**
56
- * @type {boolean}
57
- * @default false
58
- * @private
59
- */
60
- this._$actionProcess = false;
61
- /**
62
- * @type {Map}
63
- * @private
64
- */
65
- this._$actions = $getMap();
66
- /**
67
- * @type {Map}
68
- * @private
69
- */
70
- this._$frameCache = $getMap();
71
- /**
72
- * @type {Map}
73
- * @default null
74
- * @private
75
- */
76
- this._$labels = null;
77
- /**
78
- * @type {Map}
79
- * @private
80
- */
81
- this._$sounds = $getMap();
82
- /**
83
- * @type {number}
84
- * @default 0
85
- * @private
86
- */
87
- this._$actionOffset = 0;
88
- /**
89
- * @type {number}
90
- * @default 0
91
- * @private
92
- */
93
- this._$actionLimit = 0;
94
- /**
95
- * @type {number}
96
- * @default 1
97
- * @private
98
- */
99
- this._$currentFrame = 1;
100
- /**
101
- * @type {number}
102
- * @default 1
103
- * @private
104
- */
105
- this._$totalFrames = 1;
106
- /**
107
- * @type {boolean}
108
- * @default false
109
- * @private
110
- */
111
- this._$isPlaying = false;
112
- /**
113
- * @type {LoopConfig}
114
- * @default null
115
- * @private
116
- */
117
- this._$loopConfig = null;
118
- /**
119
- * @type {number}
120
- * @default 0
121
- * @private
122
- */
123
- this._$tweenFrame = 0;
124
- }
125
- /**
126
- * @description 指定されたクラスのストリングを返します。
127
- * Returns the string representation of the specified class.
128
- *
129
- * @return {string}
130
- * @default [class MovieClip]
131
- * @method
132
- * @static
133
- */
134
- static toString() {
135
- return "[class MovieClip]";
136
- }
137
- /**
138
- * @description 指定されたクラスの空間名を返します。
139
- * Returns the space name of the specified class.
140
- *
141
- * @return {string}
142
- * @default next2d.display.MovieClip
143
- * @const
144
- * @static
145
- */
146
- static get namespace() {
147
- return "next2d.display.MovieClip";
148
- }
149
- /**
150
- * @description 指定されたオブジェクトのストリングを返します。
151
- * Returns the string representation of the specified object.
152
- *
153
- * @return {string}
154
- * @default [object MovieClip]
155
- * @method
156
- * @public
157
- */
158
- toString() {
159
- return "[object MovieClip]";
160
- }
161
- /**
162
- * @description 指定されたオブジェクトの空間名を返します。
163
- * Returns the space name of the specified object.
164
- *
165
- * @return {string}
166
- * @default next2d.display.MovieClip
167
- * @const
168
- * @public
169
- */
170
- get namespace() {
171
- return "next2d.display.MovieClip";
172
- }
173
- /**
174
- * @description MovieClip インスタンスのタイムライン内の再生ヘッドが置かれているフレームの番号を示します。
175
- * Specifies the number of the frame in which the playhead is located
176
- * in the timeline of the MovieClip instance.
177
- *
178
- * @member {number}
179
- * @default 1
180
- * @readonly
181
- * @public
182
- */
183
- get currentFrame() {
184
- return this._$currentFrame;
185
- }
186
- /**
187
- * @description MovieClip インスタンスのタイムライン内の現在のフレームにあるラベルです。
188
- * The label at the current frame in the timeline of the MovieClip instance.
189
- *
190
- * @member {FrameLabel|null}
191
- * @readonly
192
- * @public
193
- */
194
- get currentFrameLabel() {
195
- if (!this._$labels) {
196
- return null;
197
- }
198
- const frame = this._$currentFrame;
199
- if (!this._$labels.has(frame)) {
200
- return null;
201
- }
202
- return this._$labels.get(frame) || null;
203
- }
204
- /**
205
- * @description 現在のシーンの FrameLabel オブジェクトの配列を返します。
206
- * Returns an array of FrameLabel objects from the current scene.
207
- *
208
- * @member {array|null}
209
- * @readonly
210
- * @public
211
- */
212
- get currentLabels() {
213
- return !this._$labels || !this._$labels.size
214
- ? null
215
- : $Array.from(this._$labels.values());
216
- }
217
- /**
218
- * @description ムービークリップが現在再生されているかどうかを示すブール値です。
219
- * A Boolean value that indicates whether a movie clip is curently playing.
220
- *
221
- * @member {boolean}
222
- * @default false
223
- * @readonly
224
- * @public
225
- */
226
- get isPlaying() {
227
- return this._$isPlaying;
228
- }
229
- /**
230
- * @description MovieClip インスタンス内のフレーム総数です。
231
- * The total number of frames in the MovieClip instance.
232
- *
233
- * @member {number}
234
- * @default 1
235
- * @readonly
236
- * @public
237
- */
238
- get totalFrames() {
239
- return this._$totalFrames;
240
- }
241
- /**
242
- * @description MovieClipのフレームヘッダーの移動方法の設定オブジェクトを返します。
243
- * Returns a configuration object for how MovieClip's frame headers are moved.
244
- *
245
- * @member {object}
246
- * @default null
247
- * @public
248
- */
249
- get loopConfig() {
250
- if (this._$loopConfig) {
251
- return this._$loopConfig;
252
- }
253
- const place = this._$getPlaceObject();
254
- if (!place || !place.loop) {
255
- return null;
256
- }
257
- if (this._$tweenFrame) {
258
- this._$changePlace = this._$tweenFrame !== this._$parent._$currentFrame;
259
- this._$tweenFrame = 0;
260
- }
261
- if (place.loop.tweenFrame) {
262
- this._$tweenFrame = place.loop.tweenFrame;
263
- }
264
- return place.loop;
265
- }
266
- set loopConfig(loop_config) {
267
- this._$loopConfig = loop_config;
268
- if (loop_config) {
269
- loop_config.frame = this._$startFrame;
270
- this._$loopConfig = loop_config;
271
- this._$currentFrame = this._$getLoopFrame(loop_config);
272
- }
273
- }
274
- /**
275
- * @description 指定されたフレームで SWF ファイルの再生を開始します。
276
- * Starts playing the SWF file at the specified frame.
277
- *
278
- * @param {number|string} frame
279
- * @return {void}
280
- * @method
281
- * @public
282
- */
283
- gotoAndPlay(frame) {
284
- this.play();
285
- this._$goToFrame(frame);
286
- }
287
- /**
288
- * @description このムービークリップの指定されたフレームに再生ヘッドを送り、そこで停止させます。
289
- * Brings the playhead to the specified frame
290
- * of the movie clip and stops it there.
291
- *
292
- * @param {number|string} frame
293
- * @return {void}
294
- * @method
295
- * @public
296
- */
297
- gotoAndStop(frame) {
298
- this.stop();
299
- this._$goToFrame(frame);
300
- }
301
- /**
302
- * @description 次のフレームに再生ヘッドを送り、停止します。
303
- * Sends the playhead to the next frame and stops it.
304
- *
305
- * @return {void}
306
- * @method
307
- * @public
308
- */
309
- nextFrame() {
310
- this.stop();
311
- if (this._$totalFrames > this._$currentFrame) {
312
- this._$goToFrame(this._$currentFrame + 1);
313
- }
314
- }
315
- /**
316
- * @description ムービークリップのタイムライン内で再生ヘッドを移動します。
317
- * Moves the playhead in the timeline of the movie clip.
318
- *
319
- * @return {void}
320
- * @method
321
- * @public
322
- */
323
- play() {
324
- this._$stopFlag = false;
325
- this._$isPlaying = true;
326
- this._$updateState();
327
- }
328
- /**
329
- * @description 直前のフレームに再生ヘッドを戻し、停止します。
330
- * Sends the playhead to the previous frame and stops it.
331
- *
332
- * @return {void}
333
- * @method
334
- * @public
335
- */
336
- prevFrame() {
337
- const frame = this._$currentFrame - 1;
338
- if (frame) {
339
- this.stop();
340
- this._$goToFrame(frame);
341
- }
342
- }
343
- /**
344
- * @description ムービークリップ内の再生ヘッドを停止します。
345
- * Stops the playhead in the movie clip.
346
- *
347
- * @return {void}
348
- * @method
349
- * @public
350
- */
351
- stop() {
352
- this._$stopFlag = true;
353
- this._$isPlaying = false;
354
- }
355
- /**
356
- * @description タイムラインに対して動的にLabelを追加できます。
357
- * Labels can be added dynamically to the timeline.
358
- *
359
- * @example <caption>Example1 usage of addFrameLabel.</caption>
360
- * // case 1
361
- * const {MovieClip, FrameLabel} = next2d.display;
362
- * const movieClip = new MovieClip();
363
- * movieClip.addFrameLabel(new FrameLabel(1, "start"));
364
- *
365
- * @param {FrameLabel} frame_label
366
- * @return {void}
367
- * @public
368
- */
369
- addFrameLabel(frame_label) {
370
- if (!this._$labels) {
371
- this._$labels = $getMap();
372
- }
373
- this._$labels.set(frame_label.frame, frame_label);
374
- }
375
- /**
376
- * @description 指定のフレームのアクションを追加できます
377
- * You can add an action for a given frame.
378
- *
379
- * @example <caption>Example1 usage of addFrameScript.</caption>
380
- * // case 1
381
- * const {MovieClip} = next2d.display;
382
- * const movieClip = new MovieClip();
383
- * movieClip.addFrameScript(1 , function ()
384
- * {
385
- * this.stop();
386
- * });
387
- *
388
- * @example <caption>Example3 usage of addFrameScript.</caption>
389
- * // case 2
390
- * const {MovieClip} = next2d.display;
391
- * const movieClip = new MovieClip();
392
- * movieClip.addFrameScript(1, method_1, 2, method_2, 10, method_10);
393
- *
394
- * @return {void}
395
- * @method
396
- * @public
397
- */
398
- addFrameScript(...args) {
399
- for (let idx = 0; idx < args.length; idx += 2) {
400
- const value = args[idx];
401
- let frame = +value;
402
- if ($isNaN(frame)) {
403
- frame = this._$getFrameForLabel(`${value}`);
404
- }
405
- const script = args[idx + 1];
406
- if (script && frame && this._$totalFrames >= frame) {
407
- this._$addAction(frame, script);
408
- }
409
- // end action add
410
- if (frame === this._$currentFrame) {
411
- // set action position
412
- const player = $currentPlayer();
413
- player._$actionOffset = player._$actions.length;
414
- // execute action stack
415
- this._$canAction = true;
416
- this._$setAction();
417
- // adjustment
418
- if (player._$actionOffset !== player._$actions.length) {
419
- // marge
420
- const actions = player._$actions.splice(0, player._$actionOffset);
421
- player._$actions.push(...player._$actions, ...actions);
422
- // reset
423
- player._$actionOffset = 0;
424
- }
425
- }
426
- }
427
- }
428
- /**
429
- * @param {string} name
430
- * @return {number}
431
- * @private
432
- */
433
- _$getFrameForLabel(name) {
434
- if (!this._$labels) {
435
- return 0;
436
- }
437
- for (const [frame, frameLabel] of this._$labels) {
438
- if (frameLabel.name === name) {
439
- return frame;
440
- }
441
- }
442
- return 0;
443
- }
444
- /**
445
- * @param {number} frame
446
- * @param {function} script
447
- * @return {void}
448
- * @method
449
- * @private
450
- */
451
- _$addAction(frame, script) {
452
- if (frame) {
453
- if (!this._$actions.has(frame)) {
454
- this._$actions.set(frame, $getArray());
455
- }
456
- const actions = this._$actions.get(frame);
457
- if (actions) {
458
- actions.push(script);
459
- }
460
- }
461
- }
462
- /**
463
- * @return {void}
464
- * @private
465
- */
466
- _$setAction() {
467
- // added event
468
- this._$executeAddedEvent();
469
- if (this._$canAction) {
470
- const frame = this._$currentFrame;
471
- // frame label event
472
- if (this._$labels && this._$labels.has(frame)) {
473
- const frameLabel = this._$labels.get(frame);
474
- if (frameLabel && frameLabel.willTrigger(Event.FRAME_LABEL)) {
475
- frameLabel.dispatchEvent(new Event(Event.FRAME_LABEL));
476
- }
477
- }
478
- // add action queue
479
- if (this._$actions.size && this._$actions.has(frame)) {
480
- const player = $currentPlayer();
481
- const index = player._$actions.indexOf(this);
482
- if (index === -1) {
483
- player._$actions.push(this);
484
- }
485
- }
486
- }
487
- }
488
- /**
489
- * @param {number|string} value
490
- * @return {void}
491
- * @private
492
- */
493
- _$goToFrame(value) {
494
- let frame = +value;
495
- if ($isNaN(frame)) {
496
- frame = this._$getFrameForLabel(`${value}`);
497
- }
498
- if (frame < 1) {
499
- frame = 1;
500
- }
501
- // over
502
- if (frame > this._$totalFrames) {
503
- this._$currentFrame = this._$totalFrames;
504
- this._$clearChildren();
505
- // flag off
506
- this._$canAction = false;
507
- this._$wait = false;
508
- return;
509
- }
510
- const player = $currentPlayer();
511
- switch (true) {
512
- case frame !== this._$currentFrame:
513
- {
514
- // flag off
515
- this._$wait = false;
516
- const currentFrame = this._$currentFrame;
517
- if (this._$actionProcess) {
518
- this._$frameCache.set("nextFrame", frame);
519
- this._$frameCache.set("stopFlag", this._$stopFlag);
520
- this._$frameCache.set("isPlaying", this._$isPlaying);
521
- }
522
- // setup
523
- this._$currentFrame = frame;
524
- this._$clearChildren();
525
- // set action position
526
- player._$actionOffset = player._$actions.length;
527
- const position = player._$actionOffset
528
- ? player._$actions.indexOf(this)
529
- : -1;
530
- this._$canAction = true;
531
- this._$prepareActions();
532
- // adjustment
533
- if (player._$actionOffset
534
- && player._$actionOffset !== player._$actions.length) {
535
- // marge
536
- const actions = player._$actions.splice(0, player._$actionOffset);
537
- player._$actions.push(...player._$actions, ...actions);
538
- // reset
539
- player._$actionOffset = 0;
540
- }
541
- if (!this._$actionProcess && (position > -1 || !player._$actionOffset)) {
542
- while (player._$actions.length) {
543
- if (player._$actions.length === position) {
544
- break;
545
- }
546
- // target object
547
- const mc = player._$actions.pop();
548
- if (!mc) {
549
- continue;
550
- }
551
- mc._$canAction = false;
552
- mc._$actionOffset = 0;
553
- mc._$actionLimit = 0;
554
- if (mc._$actionProcess && mc._$frameCache.size) {
555
- mc._$currentFrame = mc._$frameCache.get("nextFrame");
556
- mc._$clearChildren();
557
- mc._$stopFlag = mc._$frameCache.get("stopFlag");
558
- mc._$isPlaying = mc._$frameCache.get("isPlaying");
559
- mc._$frameCache.clear();
560
- }
561
- const frame = mc._$currentFrame;
562
- if (!mc._$actions.has(frame)) {
563
- continue;
564
- }
565
- const actions = mc._$actions.get(frame);
566
- if (!actions) {
567
- continue;
568
- }
569
- for (let idx = 0; idx < actions.length; ++idx) {
570
- try {
571
- $setCurrentLoaderInfo(mc._$loaderInfo);
572
- actions[idx].apply(mc);
573
- }
574
- catch (e) {
575
- mc.stop();
576
- }
577
- }
578
- }
579
- }
580
- if (this._$actionProcess) {
581
- this._$currentFrame = currentFrame;
582
- this._$clearChildren();
583
- }
584
- }
585
- break;
586
- case !this._$actionProcess && player._$actions.indexOf(this) > -1:
587
- {
588
- if (!this._$actionLimit) {
589
- break;
590
- }
591
- // flag off
592
- this._$wait = false;
593
- const myActions = player._$actions.splice(this._$actionOffset, this._$actionLimit);
594
- while (myActions.length) {
595
- const mc = myActions.pop();
596
- if (!mc) {
597
- continue;
598
- }
599
- // target reset
600
- mc._$canAction = false;
601
- mc._$actionOffset = 0;
602
- mc._$actionLimit = 0;
603
- const frame = mc._$currentFrame;
604
- if (!mc._$actions.has(frame)) {
605
- continue;
606
- }
607
- const actions = mc._$actions.get(frame);
608
- if (!actions) {
609
- continue;
610
- }
611
- for (let idx = 0; idx < actions.length; ++idx) {
612
- try {
613
- $setCurrentLoaderInfo(mc._$loaderInfo);
614
- // @ts-ignore
615
- actions[idx].apply(mc);
616
- }
617
- catch (e) {
618
- mc.stop();
619
- }
620
- }
621
- }
622
- }
623
- break;
624
- default:
625
- break;
626
- }
627
- $setCurrentLoaderInfo(null);
628
- // set sound
629
- if (this._$canSound && this._$sounds.size
630
- && this._$sounds.has(this._$currentFrame)
631
- && !player._$sounds.has(this._$instanceId)) {
632
- player._$sounds.set(this._$instanceId, this);
633
- }
634
- }
635
- /**
636
- * @return {void}
637
- * @method
638
- * @private
639
- */
640
- _$prepareActions() {
641
- // draw flag
642
- this._$wait = false;
643
- const children = this._$needsChildren
644
- ? this._$getChildren()
645
- : this._$children;
646
- for (let idx = children.length - 1; idx > -1; --idx) {
647
- children[idx]._$prepareActions();
648
- }
649
- this._$setAction();
650
- }
651
- /**
652
- * @return {boolean}
653
- * @method
654
- * @private
655
- */
656
- _$nextFrame() {
657
- let isNext = this._$needsChildren;
658
- switch (true) {
659
- case this._$wait:
660
- isNext = true;
661
- this._$wait = false;
662
- break;
663
- case this._$stopFlag:
664
- case this._$totalFrames === 1:
665
- break;
666
- default:
667
- {
668
- isNext = true;
669
- // action on
670
- this._$canAction = true;
671
- // sound on
672
- this._$canSound = true;
673
- const loopConfig = this.loopConfig;
674
- if (!loopConfig) {
675
- // next frame point
676
- ++this._$currentFrame;
677
- if (this._$currentFrame > this._$totalFrames) {
678
- this._$currentFrame = 1;
679
- }
680
- }
681
- else {
682
- const totalFrames = loopConfig.end
683
- ? loopConfig.end
684
- : this._$totalFrames;
685
- switch (loopConfig.type) {
686
- case 0: // REPEAT
687
- if (this._$changePlace) {
688
- this._$currentFrame = loopConfig.start;
689
- }
690
- else {
691
- ++this._$currentFrame;
692
- if (this._$currentFrame > totalFrames) {
693
- this._$currentFrame = loopConfig.start;
694
- }
695
- }
696
- break;
697
- case 1: // NO_REPEAT
698
- if (this._$changePlace) {
699
- this._$currentFrame = loopConfig.start;
700
- }
701
- else {
702
- ++this._$currentFrame;
703
- if (this._$currentFrame > totalFrames) {
704
- this._$currentFrame = totalFrames;
705
- isNext = false;
706
- // action on
707
- this._$canAction = false;
708
- // sound on
709
- this._$canSound = false;
710
- }
711
- }
712
- break;
713
- case 2: // FIXED
714
- if (this._$changePlace) {
715
- this._$currentFrame = loopConfig.start;
716
- }
717
- else {
718
- isNext = false;
719
- // action on
720
- this._$canAction = false;
721
- // sound on
722
- this._$canSound = false;
723
- }
724
- break;
725
- case 3: // NO_REPEAT_REVERSAL
726
- if (this._$changePlace) {
727
- this._$currentFrame = totalFrames;
728
- }
729
- else {
730
- --this._$currentFrame;
731
- if (loopConfig.start > this._$currentFrame) {
732
- this._$currentFrame = loopConfig.start;
733
- isNext = false;
734
- // action on
735
- this._$canAction = false;
736
- // sound on
737
- this._$canSound = false;
738
- }
739
- }
740
- break;
741
- case 4: // REPEAT_REVERSAL
742
- if (this._$changePlace) {
743
- this._$currentFrame = totalFrames;
744
- }
745
- else {
746
- --this._$currentFrame;
747
- if (loopConfig.start > this._$currentFrame) {
748
- this._$currentFrame = totalFrames;
749
- }
750
- }
751
- break;
752
- }
753
- }
754
- // clear
755
- if (isNext) {
756
- this._$clearChildren();
757
- }
758
- // set sound
759
- if (this._$canSound && this._$sounds.size
760
- && this._$sounds.has(this._$currentFrame)) {
761
- const player = $currentPlayer();
762
- if (!player._$sounds.has(this._$instanceId)) {
763
- player._$sounds.set(this._$instanceId, this);
764
- }
765
- }
766
- }
767
- break;
768
- }
769
- const children = this._$needsChildren
770
- ? this._$getChildren()
771
- : this._$children;
772
- for (let idx = children.length - 1; idx > -1; --idx) {
773
- const child = children[idx];
774
- if (!child._$isNext) {
775
- continue;
776
- }
777
- if (isNext) {
778
- child._$nextFrame();
779
- }
780
- else {
781
- isNext = child._$nextFrame();
782
- }
783
- }
784
- // frame action
785
- this._$setAction();
786
- this._$isNext = isNext;
787
- if (!this._$posted && $rendererWorker) {
788
- this._$postProperty();
789
- }
790
- return this._$isNext;
791
- }
792
- /**
793
- * @param {LoopConfig} loop_config
794
- * @return {number}
795
- * @method
796
- * @private
797
- */
798
- _$getLoopFrame(loop_config) {
799
- const parent = this._$parent;
800
- const length = parent._$currentFrame - loop_config.frame;
801
- let frame = 1;
802
- switch (loop_config.type) {
803
- case 0: // REPEAT
804
- {
805
- const totalFrame = loop_config.end
806
- ? loop_config.end
807
- : this._$totalFrames;
808
- frame = loop_config.start;
809
- for (let idx = 0; idx < length; ++idx) {
810
- ++frame;
811
- if (frame > totalFrame) {
812
- frame = loop_config.start;
813
- }
814
- }
815
- }
816
- break;
817
- case 1: // NO_REPEAT
818
- {
819
- const totalFrame = loop_config.end
820
- ? loop_config.end
821
- : this._$totalFrames;
822
- frame = $Math.min(totalFrame, loop_config.start + length);
823
- }
824
- break;
825
- case 2: // FIXED
826
- frame = loop_config.start;
827
- break;
828
- case 3: // NO_REPEAT_REVERSAL
829
- frame = loop_config.end
830
- ? loop_config.end
831
- : this._$totalFrames;
832
- frame = $Math.max(loop_config.start, frame - length);
833
- break;
834
- case 4: // REPEAT_REVERSAL
835
- {
836
- const totalFrame = loop_config.end
837
- ? loop_config.end
838
- : this._$totalFrames;
839
- frame = totalFrame;
840
- for (let idx = 0; idx < length; ++idx) {
841
- --frame;
842
- if (loop_config.start > frame) {
843
- frame = totalFrame;
844
- }
845
- }
846
- }
847
- break;
848
- }
849
- return frame;
850
- }
851
- /**
852
- * @param {object} character
853
- * @return {void}
854
- * @method
855
- * @private
856
- */
857
- _$buildCharacter(character) {
858
- if (character.sounds) {
859
- for (let idx = 0; idx < character.sounds.length; ++idx) {
860
- const object = character.sounds[idx];
861
- const sounds = $getArray();
862
- for (let idx = 0; idx < object.sound.length; ++idx) {
863
- const sound = new Sound();
864
- sound._$build(object.sound[idx], this);
865
- sounds.push(sound);
866
- }
867
- this._$sounds.set(object.frame, sounds);
868
- }
869
- }
870
- if (character.actions) {
871
- for (let idx = 0; idx < character.actions.length; ++idx) {
872
- const object = character.actions[idx];
873
- if (!object.script) {
874
- object.script = Function(object.action);
875
- }
876
- this._$addAction(object.frame, object.script);
877
- }
878
- }
879
- if (character.labels) {
880
- for (let idx = 0; idx < character.labels.length; ++idx) {
881
- const label = character.labels[idx];
882
- this.addFrameLabel(new FrameLabel(label.name, label.frame));
883
- }
884
- }
885
- this._$totalFrames = character.totalFrame || 1;
886
- }
887
- /**
888
- * @param {object} character
889
- * @return {void}
890
- * @method
891
- * @private
892
- */
893
- _$sync(character) {
894
- super._$sync(character);
895
- this._$buildCharacter(character);
896
- }
897
- /**
898
- * @param {object} tag
899
- * @param {DisplayObjectContainer} parent
900
- * @return {object}
901
- * @method
902
- * @private
903
- */
904
- _$build(tag, parent) {
905
- const character = super._$build(tag, parent);
906
- this._$buildCharacter(character);
907
- return character;
908
- }
909
- /**
910
- * @return {void}
911
- * @method
912
- * @private
913
- */
914
- _$soundPlay() {
915
- if (!this._$sounds.has(this._$currentFrame)) {
916
- return;
917
- }
918
- const sounds = this._$sounds.get(this._$currentFrame);
919
- if (sounds.length) {
920
- // set SoundTransform
921
- let soundTransform = this._$soundTransform;
922
- let parent = this._$parent;
923
- while (parent) {
924
- if (parent._$soundTransform) {
925
- soundTransform = parent._$soundTransform;
926
- }
927
- parent = parent._$parent;
928
- }
929
- // play sound
930
- for (let idx = 0; idx < sounds.length; ++idx) {
931
- const sound = sounds[idx];
932
- if (soundTransform) {
933
- sound.loopCount = soundTransform.loop ? 0xffffff : 0;
934
- sound.volume = soundTransform.volume;
935
- }
936
- sound.play();
937
- }
938
- }
939
- this._$canSound = false;
940
- }
941
- }