@swf2es/player 0.0.0-stage → 0.1.1

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 (1329) hide show
  1. package/LICENSE +202 -0
  2. package/LICENSE.third-party +51 -0
  3. package/README.md +38 -2
  4. package/dist/air-definitions.d.ts +2 -0
  5. package/dist/air-definitions.d.ts.map +1 -0
  6. package/dist/air-definitions.js +130 -0
  7. package/dist/air-definitions.js.map +1 -0
  8. package/dist/avm1/amf.d.ts +155 -0
  9. package/dist/avm1/amf.d.ts.map +1 -0
  10. package/dist/avm1/amf.js +508 -0
  11. package/dist/avm1/amf.js.map +1 -0
  12. package/dist/avm1/avm1.d.ts +448 -0
  13. package/dist/avm1/avm1.d.ts.map +1 -0
  14. package/dist/avm1/avm1.js +1305 -0
  15. package/dist/avm1/avm1.js.map +1 -0
  16. package/dist/avm1/bindings.d.ts +56 -0
  17. package/dist/avm1/bindings.d.ts.map +1 -0
  18. package/dist/avm1/bindings.js +215 -0
  19. package/dist/avm1/bindings.js.map +1 -0
  20. package/dist/avm1/classes.d.ts +33 -0
  21. package/dist/avm1/classes.d.ts.map +1 -0
  22. package/dist/avm1/classes.js +76 -0
  23. package/dist/avm1/classes.js.map +1 -0
  24. package/dist/avm1/clips.d.ts +54 -0
  25. package/dist/avm1/clips.d.ts.map +1 -0
  26. package/dist/avm1/clips.js +230 -0
  27. package/dist/avm1/clips.js.map +1 -0
  28. package/dist/avm1/compile.d.ts +8 -0
  29. package/dist/avm1/compile.d.ts.map +1 -0
  30. package/dist/avm1/compile.js +141 -0
  31. package/dist/avm1/compile.js.map +1 -0
  32. package/dist/avm1/external.d.ts +44 -0
  33. package/dist/avm1/external.d.ts.map +1 -0
  34. package/dist/avm1/external.js +80 -0
  35. package/dist/avm1/external.js.map +1 -0
  36. package/dist/avm1/focus.d.ts +68 -0
  37. package/dist/avm1/focus.d.ts.map +1 -0
  38. package/dist/avm1/focus.js +279 -0
  39. package/dist/avm1/focus.js.map +1 -0
  40. package/dist/avm1/globals/BitmapData.d.ts +30 -0
  41. package/dist/avm1/globals/BitmapData.d.ts.map +1 -0
  42. package/dist/avm1/globals/BitmapData.js +543 -0
  43. package/dist/avm1/globals/BitmapData.js.map +1 -0
  44. package/dist/avm1/globals/Button.d.ts +8 -0
  45. package/dist/avm1/globals/Button.d.ts.map +1 -0
  46. package/dist/avm1/globals/Button.js +32 -0
  47. package/dist/avm1/globals/Button.js.map +1 -0
  48. package/dist/avm1/globals/Color.d.ts +11 -0
  49. package/dist/avm1/globals/Color.d.ts.map +1 -0
  50. package/dist/avm1/globals/Color.js +116 -0
  51. package/dist/avm1/globals/Color.js.map +1 -0
  52. package/dist/avm1/globals/ExternalInterface.d.ts +20 -0
  53. package/dist/avm1/globals/ExternalInterface.d.ts.map +1 -0
  54. package/dist/avm1/globals/ExternalInterface.js +311 -0
  55. package/dist/avm1/globals/ExternalInterface.js.map +1 -0
  56. package/dist/avm1/globals/FileReference.d.ts +4 -0
  57. package/dist/avm1/globals/FileReference.d.ts.map +1 -0
  58. package/dist/avm1/globals/FileReference.js +218 -0
  59. package/dist/avm1/globals/FileReference.js.map +1 -0
  60. package/dist/avm1/globals/Key.d.ts +21 -0
  61. package/dist/avm1/globals/Key.d.ts.map +1 -0
  62. package/dist/avm1/globals/Key.js +61 -0
  63. package/dist/avm1/globals/Key.js.map +1 -0
  64. package/dist/avm1/globals/LoadVars.d.ts +39 -0
  65. package/dist/avm1/globals/LoadVars.d.ts.map +1 -0
  66. package/dist/avm1/globals/LoadVars.js +209 -0
  67. package/dist/avm1/globals/LoadVars.js.map +1 -0
  68. package/dist/avm1/globals/LocalConnection.d.ts +5 -0
  69. package/dist/avm1/globals/LocalConnection.d.ts.map +1 -0
  70. package/dist/avm1/globals/LocalConnection.js +93 -0
  71. package/dist/avm1/globals/LocalConnection.js.map +1 -0
  72. package/dist/avm1/globals/MovieClip.d.ts +156 -0
  73. package/dist/avm1/globals/MovieClip.d.ts.map +1 -0
  74. package/dist/avm1/globals/MovieClip.js +1071 -0
  75. package/dist/avm1/globals/MovieClip.js.map +1 -0
  76. package/dist/avm1/globals/MovieClipLoader.d.ts +29 -0
  77. package/dist/avm1/globals/MovieClipLoader.d.ts.map +1 -0
  78. package/dist/avm1/globals/MovieClipLoader.js +91 -0
  79. package/dist/avm1/globals/MovieClipLoader.js.map +1 -0
  80. package/dist/avm1/globals/NetConnection.d.ts +68 -0
  81. package/dist/avm1/globals/NetConnection.d.ts.map +1 -0
  82. package/dist/avm1/globals/NetConnection.js +262 -0
  83. package/dist/avm1/globals/NetConnection.js.map +1 -0
  84. package/dist/avm1/globals/PrintJob.d.ts +4 -0
  85. package/dist/avm1/globals/PrintJob.d.ts.map +1 -0
  86. package/dist/avm1/globals/PrintJob.js +38 -0
  87. package/dist/avm1/globals/PrintJob.js.map +1 -0
  88. package/dist/avm1/globals/Selection.d.ts +17 -0
  89. package/dist/avm1/globals/Selection.d.ts.map +1 -0
  90. package/dist/avm1/globals/Selection.js +63 -0
  91. package/dist/avm1/globals/Selection.js.map +1 -0
  92. package/dist/avm1/globals/SharedObject.d.ts +20 -0
  93. package/dist/avm1/globals/SharedObject.d.ts.map +1 -0
  94. package/dist/avm1/globals/SharedObject.js +246 -0
  95. package/dist/avm1/globals/SharedObject.js.map +1 -0
  96. package/dist/avm1/globals/Sound.d.ts +36 -0
  97. package/dist/avm1/globals/Sound.d.ts.map +1 -0
  98. package/dist/avm1/globals/Sound.js +239 -0
  99. package/dist/avm1/globals/Sound.js.map +1 -0
  100. package/dist/avm1/globals/Stage.d.ts +7 -0
  101. package/dist/avm1/globals/Stage.d.ts.map +1 -0
  102. package/dist/avm1/globals/Stage.js +13 -0
  103. package/dist/avm1/globals/Stage.js.map +1 -0
  104. package/dist/avm1/globals/StyleSheet.d.ts +10 -0
  105. package/dist/avm1/globals/StyleSheet.d.ts.map +1 -0
  106. package/dist/avm1/globals/StyleSheet.js +206 -0
  107. package/dist/avm1/globals/StyleSheet.js.map +1 -0
  108. package/dist/avm1/globals/TextField.d.ts +44 -0
  109. package/dist/avm1/globals/TextField.d.ts.map +1 -0
  110. package/dist/avm1/globals/TextField.js +397 -0
  111. package/dist/avm1/globals/TextField.js.map +1 -0
  112. package/dist/avm1/globals/TextFormat.d.ts +19 -0
  113. package/dist/avm1/globals/TextFormat.d.ts.map +1 -0
  114. package/dist/avm1/globals/TextFormat.js +195 -0
  115. package/dist/avm1/globals/TextFormat.js.map +1 -0
  116. package/dist/avm1/globals/TextSnapshot.d.ts +6 -0
  117. package/dist/avm1/globals/TextSnapshot.d.ts.map +1 -0
  118. package/dist/avm1/globals/TextSnapshot.js +89 -0
  119. package/dist/avm1/globals/TextSnapshot.js.map +1 -0
  120. package/dist/avm1/globals/XML.d.ts +9 -0
  121. package/dist/avm1/globals/XML.d.ts.map +1 -0
  122. package/dist/avm1/globals/XML.js +397 -0
  123. package/dist/avm1/globals/XML.js.map +1 -0
  124. package/dist/avm1/globals/XMLNode.d.ts +93 -0
  125. package/dist/avm1/globals/XMLNode.d.ts.map +1 -0
  126. package/dist/avm1/globals/XMLNode.js +414 -0
  127. package/dist/avm1/globals/XMLNode.js.map +1 -0
  128. package/dist/avm1/globals/XMLSocket.d.ts +19 -0
  129. package/dist/avm1/globals/XMLSocket.d.ts.map +1 -0
  130. package/dist/avm1/globals/XMLSocket.js +206 -0
  131. package/dist/avm1/globals/XMLSocket.js.map +1 -0
  132. package/dist/avm1/globals/drawing.d.ts +8 -0
  133. package/dist/avm1/globals/drawing.d.ts.map +1 -0
  134. package/dist/avm1/globals/drawing.js +203 -0
  135. package/dist/avm1/globals/drawing.js.map +1 -0
  136. package/dist/avm1/globals/filters.d.ts +30 -0
  137. package/dist/avm1/globals/filters.d.ts.map +1 -0
  138. package/dist/avm1/globals/filters.js +636 -0
  139. package/dist/avm1/globals/filters.js.map +1 -0
  140. package/dist/avm1/globals/geom.d.ts +28 -0
  141. package/dist/avm1/globals/geom.d.ts.map +1 -0
  142. package/dist/avm1/globals/geom.js +601 -0
  143. package/dist/avm1/globals/geom.js.map +1 -0
  144. package/dist/avm1/input.d.ts +106 -0
  145. package/dist/avm1/input.d.ts.map +1 -0
  146. package/dist/avm1/input.js +484 -0
  147. package/dist/avm1/input.js.map +1 -0
  148. package/dist/avm1/keyboard.d.ts +17 -0
  149. package/dist/avm1/keyboard.d.ts.map +1 -0
  150. package/dist/avm1/keyboard.js +114 -0
  151. package/dist/avm1/keyboard.js.map +1 -0
  152. package/dist/avm1/loads.d.ts +67 -0
  153. package/dist/avm1/loads.d.ts.map +1 -0
  154. package/dist/avm1/loads.js +353 -0
  155. package/dist/avm1/loads.js.map +1 -0
  156. package/dist/avm1/net.d.ts +83 -0
  157. package/dist/avm1/net.d.ts.map +1 -0
  158. package/dist/avm1/net.js +220 -0
  159. package/dist/avm1/net.js.map +1 -0
  160. package/dist/avm1/paths.d.ts +30 -0
  161. package/dist/avm1/paths.d.ts.map +1 -0
  162. package/dist/avm1/paths.js +105 -0
  163. package/dist/avm1/paths.js.map +1 -0
  164. package/dist/avm1/pointer.d.ts +113 -0
  165. package/dist/avm1/pointer.d.ts.map +1 -0
  166. package/dist/avm1/pointer.js +513 -0
  167. package/dist/avm1/pointer.js.map +1 -0
  168. package/dist/avm1/queue.d.ts +106 -0
  169. package/dist/avm1/queue.d.ts.map +1 -0
  170. package/dist/avm1/queue.js +304 -0
  171. package/dist/avm1/queue.js.map +1 -0
  172. package/dist/avm1/sound.d.ts +36 -0
  173. package/dist/avm1/sound.d.ts.map +1 -0
  174. package/dist/avm1/sound.js +107 -0
  175. package/dist/avm1/sound.js.map +1 -0
  176. package/dist/avm1/swf.d.ts +90 -0
  177. package/dist/avm1/swf.d.ts.map +1 -0
  178. package/dist/avm1/swf.js +142 -0
  179. package/dist/avm1/swf.js.map +1 -0
  180. package/dist/avm1/timers.d.ts +49 -0
  181. package/dist/avm1/timers.d.ts.map +1 -0
  182. package/dist/avm1/timers.js +114 -0
  183. package/dist/avm1/timers.js.map +1 -0
  184. package/dist/bitmap/bitmap.d.ts +231 -0
  185. package/dist/bitmap/bitmap.d.ts.map +1 -0
  186. package/dist/bitmap/bitmap.js +628 -0
  187. package/dist/bitmap/bitmap.js.map +1 -0
  188. package/dist/bitmap/draw.d.ts +11 -0
  189. package/dist/bitmap/draw.d.ts.map +1 -0
  190. package/dist/bitmap/draw.js +69 -0
  191. package/dist/bitmap/draw.js.map +1 -0
  192. package/dist/bitmap/dxt.d.ts +5 -0
  193. package/dist/bitmap/dxt.d.ts.map +1 -0
  194. package/dist/bitmap/dxt.js +12 -0
  195. package/dist/bitmap/dxt.js.map +1 -0
  196. package/dist/bitmap/filters.d.ts +82 -0
  197. package/dist/bitmap/filters.d.ts.map +1 -0
  198. package/dist/bitmap/filters.js +657 -0
  199. package/dist/bitmap/filters.js.map +1 -0
  200. package/dist/bitmap/images.d.ts +30 -0
  201. package/dist/bitmap/images.d.ts.map +1 -0
  202. package/dist/bitmap/images.js +241 -0
  203. package/dist/bitmap/images.js.map +1 -0
  204. package/dist/bitmap/kernel.d.ts +12 -0
  205. package/dist/bitmap/kernel.d.ts.map +1 -0
  206. package/dist/bitmap/kernel.js +66 -0
  207. package/dist/bitmap/kernel.js.map +1 -0
  208. package/dist/bitmap/ops.d.ts +144 -0
  209. package/dist/bitmap/ops.d.ts.map +1 -0
  210. package/dist/bitmap/ops.js +1240 -0
  211. package/dist/bitmap/ops.js.map +1 -0
  212. package/dist/bitmap/pixel-bender.d.ts +89 -0
  213. package/dist/bitmap/pixel-bender.d.ts.map +1 -0
  214. package/dist/bitmap/pixel-bender.js +912 -0
  215. package/dist/bitmap/pixel-bender.js.map +1 -0
  216. package/dist/bitmap/png.d.ts +4 -0
  217. package/dist/bitmap/png.d.ts.map +1 -0
  218. package/dist/bitmap/png.js +140 -0
  219. package/dist/bitmap/png.js.map +1 -0
  220. package/dist/bitmap/turbulence.d.ts +17 -0
  221. package/dist/bitmap/turbulence.d.ts.map +1 -0
  222. package/dist/bitmap/turbulence.js +90 -0
  223. package/dist/bitmap/turbulence.js.map +1 -0
  224. package/dist/clock.d.ts +60 -0
  225. package/dist/clock.d.ts.map +1 -0
  226. package/dist/clock.js +183 -0
  227. package/dist/clock.js.map +1 -0
  228. package/dist/display/bitmapobject.d.ts +18 -0
  229. package/dist/display/bitmapobject.d.ts.map +1 -0
  230. package/dist/display/bitmapobject.js +26 -0
  231. package/dist/display/bitmapobject.js.map +1 -0
  232. package/dist/display/bounds.d.ts +59 -0
  233. package/dist/display/bounds.d.ts.map +1 -0
  234. package/dist/display/bounds.js +521 -0
  235. package/dist/display/bounds.js.map +1 -0
  236. package/dist/display/buttonobject.d.ts +76 -0
  237. package/dist/display/buttonobject.d.ts.map +1 -0
  238. package/dist/display/buttonobject.js +306 -0
  239. package/dist/display/buttonobject.js.map +1 -0
  240. package/dist/display/color.d.ts +9 -0
  241. package/dist/display/color.d.ts.map +1 -0
  242. package/dist/display/color.js +41 -0
  243. package/dist/display/color.js.map +1 -0
  244. package/dist/display/container.d.ts +49 -0
  245. package/dist/display/container.d.ts.map +1 -0
  246. package/dist/display/container.js +151 -0
  247. package/dist/display/container.js.map +1 -0
  248. package/dist/display/display.d.ts +11 -0
  249. package/dist/display/display.d.ts.map +1 -0
  250. package/dist/display/display.js +15 -0
  251. package/dist/display/display.js.map +1 -0
  252. package/dist/display/displayobject.d.ts +363 -0
  253. package/dist/display/displayobject.d.ts.map +1 -0
  254. package/dist/display/displayobject.js +665 -0
  255. package/dist/display/displayobject.js.map +1 -0
  256. package/dist/display/drawing.d.ts +111 -0
  257. package/dist/display/drawing.d.ts.map +1 -0
  258. package/dist/display/drawing.js +614 -0
  259. package/dist/display/drawing.js.map +1 -0
  260. package/dist/display/filters.d.ts +99 -0
  261. package/dist/display/filters.d.ts.map +1 -0
  262. package/dist/display/filters.js +286 -0
  263. package/dist/display/filters.js.map +1 -0
  264. package/dist/display/geometry.d.ts +37 -0
  265. package/dist/display/geometry.d.ts.map +1 -0
  266. package/dist/display/geometry.js +190 -0
  267. package/dist/display/geometry.js.map +1 -0
  268. package/dist/display/gradients.d.ts +29 -0
  269. package/dist/display/gradients.d.ts.map +1 -0
  270. package/dist/display/gradients.js +118 -0
  271. package/dist/display/gradients.js.map +1 -0
  272. package/dist/display/graphicsdata.d.ts +41 -0
  273. package/dist/display/graphicsdata.d.ts.map +1 -0
  274. package/dist/display/graphicsdata.js +593 -0
  275. package/dist/display/graphicsdata.js.map +1 -0
  276. package/dist/display/instantiate.d.ts +15 -0
  277. package/dist/display/instantiate.d.ts.map +1 -0
  278. package/dist/display/instantiate.js +72 -0
  279. package/dist/display/instantiate.js.map +1 -0
  280. package/dist/display/matrix3d.d.ts +68 -0
  281. package/dist/display/matrix3d.d.ts.map +1 -0
  282. package/dist/display/matrix3d.js +374 -0
  283. package/dist/display/matrix3d.js.map +1 -0
  284. package/dist/display/morph.d.ts +17 -0
  285. package/dist/display/morph.d.ts.map +1 -0
  286. package/dist/display/morph.js +227 -0
  287. package/dist/display/morph.js.map +1 -0
  288. package/dist/display/movieclip.d.ts +115 -0
  289. package/dist/display/movieclip.d.ts.map +1 -0
  290. package/dist/display/movieclip.js +681 -0
  291. package/dist/display/movieclip.js.map +1 -0
  292. package/dist/display/perspective.d.ts +35 -0
  293. package/dist/display/perspective.d.ts.map +1 -0
  294. package/dist/display/perspective.js +194 -0
  295. package/dist/display/perspective.js.map +1 -0
  296. package/dist/display/plane.d.ts +52 -0
  297. package/dist/display/plane.d.ts.map +1 -0
  298. package/dist/display/plane.js +142 -0
  299. package/dist/display/plane.js.map +1 -0
  300. package/dist/display/scale9.d.ts +78 -0
  301. package/dist/display/scale9.d.ts.map +1 -0
  302. package/dist/display/scale9.js +237 -0
  303. package/dist/display/scale9.js.map +1 -0
  304. package/dist/display/shapeobject.d.ts +53 -0
  305. package/dist/display/shapeobject.d.ts.map +1 -0
  306. package/dist/display/shapeobject.js +132 -0
  307. package/dist/display/shapeobject.js.map +1 -0
  308. package/dist/display/shapes.d.ts +146 -0
  309. package/dist/display/shapes.d.ts.map +1 -0
  310. package/dist/display/shapes.js +408 -0
  311. package/dist/display/shapes.js.map +1 -0
  312. package/dist/display/stretch.d.ts +42 -0
  313. package/dist/display/stretch.d.ts.map +1 -0
  314. package/dist/display/stretch.js +192 -0
  315. package/dist/display/stretch.js.map +1 -0
  316. package/dist/display/textobjects.d.ts +98 -0
  317. package/dist/display/textobjects.d.ts.map +1 -0
  318. package/dist/display/textobjects.js +223 -0
  319. package/dist/display/textobjects.js.map +1 -0
  320. package/dist/display/timeline.d.ts +252 -0
  321. package/dist/display/timeline.d.ts.map +1 -0
  322. package/dist/display/timeline.js +472 -0
  323. package/dist/display/timeline.js.map +1 -0
  324. package/dist/display/value-lists.d.ts +10 -0
  325. package/dist/display/value-lists.d.ts.map +1 -0
  326. package/dist/display/value-lists.js +41 -0
  327. package/dist/display/value-lists.js.map +1 -0
  328. package/dist/display/videoobject.d.ts +7 -0
  329. package/dist/display/videoobject.d.ts.map +1 -0
  330. package/dist/display/videoobject.js +7 -0
  331. package/dist/display/videoobject.js.map +1 -0
  332. package/dist/display/walk.d.ts +45 -0
  333. package/dist/display/walk.d.ts.map +1 -0
  334. package/dist/display/walk.js +128 -0
  335. package/dist/display/walk.js.map +1 -0
  336. package/dist/files.d.ts +77 -0
  337. package/dist/files.d.ts.map +1 -0
  338. package/dist/files.js +335 -0
  339. package/dist/files.js.map +1 -0
  340. package/dist/hosts.d.ts +406 -0
  341. package/dist/hosts.d.ts.map +1 -0
  342. package/dist/hosts.js +208 -0
  343. package/dist/hosts.js.map +1 -0
  344. package/dist/index.d.ts +24 -0
  345. package/dist/index.d.ts.map +1 -0
  346. package/dist/index.js +19 -0
  347. package/dist/index.js.map +1 -0
  348. package/dist/input/activation.d.ts +12 -0
  349. package/dist/input/activation.d.ts.map +1 -0
  350. package/dist/input/activation.js +57 -0
  351. package/dist/input/activation.js.map +1 -0
  352. package/dist/input/avm1.d.ts +22 -0
  353. package/dist/input/avm1.d.ts.map +1 -0
  354. package/dist/input/avm1.js +83 -0
  355. package/dist/input/avm1.js.map +1 -0
  356. package/dist/input/canvas.d.ts +19 -0
  357. package/dist/input/canvas.d.ts.map +1 -0
  358. package/dist/input/canvas.js +64 -0
  359. package/dist/input/canvas.js.map +1 -0
  360. package/dist/input/context-menu.d.ts +16 -0
  361. package/dist/input/context-menu.d.ts.map +1 -0
  362. package/dist/input/context-menu.js +64 -0
  363. package/dist/input/context-menu.js.map +1 -0
  364. package/dist/input/keyboard.d.ts +138 -0
  365. package/dist/input/keyboard.d.ts.map +1 -0
  366. package/dist/input/keyboard.js +459 -0
  367. package/dist/input/keyboard.js.map +1 -0
  368. package/dist/input/pointer.d.ts +186 -0
  369. package/dist/input/pointer.d.ts.map +1 -0
  370. package/dist/input/pointer.js +864 -0
  371. package/dist/input/pointer.js.map +1 -0
  372. package/dist/input/text-editor.d.ts +47 -0
  373. package/dist/input/text-editor.d.ts.map +1 -0
  374. package/dist/input/text-editor.js +320 -0
  375. package/dist/input/text-editor.js.map +1 -0
  376. package/dist/input/touch.d.ts +41 -0
  377. package/dist/input/touch.d.ts.map +1 -0
  378. package/dist/input/touch.js +210 -0
  379. package/dist/input/touch.js.map +1 -0
  380. package/dist/localconnection.d.ts +34 -0
  381. package/dist/localconnection.d.ts.map +1 -0
  382. package/dist/localconnection.js +91 -0
  383. package/dist/localconnection.js.map +1 -0
  384. package/dist/media/audio.d.ts +67 -0
  385. package/dist/media/audio.d.ts.map +1 -0
  386. package/dist/media/audio.js +377 -0
  387. package/dist/media/audio.js.map +1 -0
  388. package/dist/media/dynamic-sound.d.ts +10 -0
  389. package/dist/media/dynamic-sound.d.ts.map +1 -0
  390. package/dist/media/dynamic-sound.js +91 -0
  391. package/dist/media/dynamic-sound.js.map +1 -0
  392. package/dist/media/extract.d.ts +41 -0
  393. package/dist/media/extract.d.ts.map +1 -0
  394. package/dist/media/extract.js +136 -0
  395. package/dist/media/extract.js.map +1 -0
  396. package/dist/media/mp3.d.ts +19 -0
  397. package/dist/media/mp3.d.ts.map +1 -0
  398. package/dist/media/mp3.js +153 -0
  399. package/dist/media/mp3.js.map +1 -0
  400. package/dist/media/sounds.d.ts +157 -0
  401. package/dist/media/sounds.d.ts.map +1 -0
  402. package/dist/media/sounds.js +508 -0
  403. package/dist/media/sounds.js.map +1 -0
  404. package/dist/media/streaming-audio.d.ts +3 -0
  405. package/dist/media/streaming-audio.d.ts.map +1 -0
  406. package/dist/media/streaming-audio.js +134 -0
  407. package/dist/media/streaming-audio.js.map +1 -0
  408. package/dist/player.d.ts +169 -0
  409. package/dist/player.d.ts.map +1 -0
  410. package/dist/player.js +617 -0
  411. package/dist/player.js.map +1 -0
  412. package/dist/playerglobal/air/net/WebSocket.d.ts +4 -0
  413. package/dist/playerglobal/air/net/WebSocket.d.ts.map +1 -0
  414. package/dist/playerglobal/air/net/WebSocket.js +251 -0
  415. package/dist/playerglobal/air/net/WebSocket.js.map +1 -0
  416. package/dist/playerglobal/air-library.d.ts +6 -0
  417. package/dist/playerglobal/air-library.d.ts.map +1 -0
  418. package/dist/playerglobal/air-library.js +9 -0
  419. package/dist/playerglobal/air-library.js.map +1 -0
  420. package/dist/playerglobal/context3d/context.d.ts +5 -0
  421. package/dist/playerglobal/context3d/context.d.ts.map +1 -0
  422. package/dist/playerglobal/context3d/context.js +472 -0
  423. package/dist/playerglobal/context3d/context.js.map +1 -0
  424. package/dist/playerglobal/context3d/errors.d.ts +11 -0
  425. package/dist/playerglobal/context3d/errors.d.ts.map +1 -0
  426. package/dist/playerglobal/context3d/errors.js +101 -0
  427. package/dist/playerglobal/context3d/errors.js.map +1 -0
  428. package/dist/playerglobal/context3d/lifecycle.d.ts +61 -0
  429. package/dist/playerglobal/context3d/lifecycle.d.ts.map +1 -0
  430. package/dist/playerglobal/context3d/lifecycle.js +342 -0
  431. package/dist/playerglobal/context3d/lifecycle.js.map +1 -0
  432. package/dist/playerglobal/context3d/readback.d.ts +21 -0
  433. package/dist/playerglobal/context3d/readback.d.ts.map +1 -0
  434. package/dist/playerglobal/context3d/readback.js +56 -0
  435. package/dist/playerglobal/context3d/readback.js.map +1 -0
  436. package/dist/playerglobal/context3d/resources.d.ts +5 -0
  437. package/dist/playerglobal/context3d/resources.d.ts.map +1 -0
  438. package/dist/playerglobal/context3d/resources.js +298 -0
  439. package/dist/playerglobal/context3d/resources.js.map +1 -0
  440. package/dist/playerglobal/context3d.d.ts +6 -0
  441. package/dist/playerglobal/context3d.d.ts.map +1 -0
  442. package/dist/playerglobal/context3d.js +96 -0
  443. package/dist/playerglobal/context3d.js.map +1 -0
  444. package/dist/playerglobal/flash/accessibility/Accessibility.d.ts +4 -0
  445. package/dist/playerglobal/flash/accessibility/Accessibility.d.ts.map +1 -0
  446. package/dist/playerglobal/flash/accessibility/Accessibility.js +22 -0
  447. package/dist/playerglobal/flash/accessibility/Accessibility.js.map +1 -0
  448. package/dist/playerglobal/flash/crypto/generateRandomBytes.d.ts +3 -0
  449. package/dist/playerglobal/flash/crypto/generateRandomBytes.d.ts.map +1 -0
  450. package/dist/playerglobal/flash/crypto/generateRandomBytes.js +33 -0
  451. package/dist/playerglobal/flash/crypto/generateRandomBytes.js.map +1 -0
  452. package/dist/playerglobal/flash/data/EncryptedLocalStore.d.ts +4 -0
  453. package/dist/playerglobal/flash/data/EncryptedLocalStore.d.ts.map +1 -0
  454. package/dist/playerglobal/flash/data/EncryptedLocalStore.js +62 -0
  455. package/dist/playerglobal/flash/data/EncryptedLocalStore.js.map +1 -0
  456. package/dist/playerglobal/flash/desktop/Clipboard.d.ts +9 -0
  457. package/dist/playerglobal/flash/desktop/Clipboard.d.ts.map +1 -0
  458. package/dist/playerglobal/flash/desktop/Clipboard.js +174 -0
  459. package/dist/playerglobal/flash/desktop/Clipboard.js.map +1 -0
  460. package/dist/playerglobal/flash/desktop/NativeApplication.d.ts +6 -0
  461. package/dist/playerglobal/flash/desktop/NativeApplication.d.ts.map +1 -0
  462. package/dist/playerglobal/flash/desktop/NativeApplication.js +180 -0
  463. package/dist/playerglobal/flash/desktop/NativeApplication.js.map +1 -0
  464. package/dist/playerglobal/flash/display/AVM1Movie.d.ts +3 -0
  465. package/dist/playerglobal/flash/display/AVM1Movie.d.ts.map +1 -0
  466. package/dist/playerglobal/flash/display/AVM1Movie.js +20 -0
  467. package/dist/playerglobal/flash/display/AVM1Movie.js.map +1 -0
  468. package/dist/playerglobal/flash/display/Bitmap.d.ts +4 -0
  469. package/dist/playerglobal/flash/display/Bitmap.d.ts.map +1 -0
  470. package/dist/playerglobal/flash/display/Bitmap.js +59 -0
  471. package/dist/playerglobal/flash/display/Bitmap.js.map +1 -0
  472. package/dist/playerglobal/flash/display/BitmapData.d.ts +10 -0
  473. package/dist/playerglobal/flash/display/BitmapData.d.ts.map +1 -0
  474. package/dist/playerglobal/flash/display/BitmapData.js +634 -0
  475. package/dist/playerglobal/flash/display/BitmapData.js.map +1 -0
  476. package/dist/playerglobal/flash/display/DisplayObject.d.ts +8 -0
  477. package/dist/playerglobal/flash/display/DisplayObject.d.ts.map +1 -0
  478. package/dist/playerglobal/flash/display/DisplayObject.js +615 -0
  479. package/dist/playerglobal/flash/display/DisplayObject.js.map +1 -0
  480. package/dist/playerglobal/flash/display/DisplayObjectContainer.d.ts +4 -0
  481. package/dist/playerglobal/flash/display/DisplayObjectContainer.d.ts.map +1 -0
  482. package/dist/playerglobal/flash/display/DisplayObjectContainer.js +225 -0
  483. package/dist/playerglobal/flash/display/DisplayObjectContainer.js.map +1 -0
  484. package/dist/playerglobal/flash/display/Graphics.d.ts +8 -0
  485. package/dist/playerglobal/flash/display/Graphics.d.ts.map +1 -0
  486. package/dist/playerglobal/flash/display/Graphics.js +346 -0
  487. package/dist/playerglobal/flash/display/Graphics.js.map +1 -0
  488. package/dist/playerglobal/flash/display/InteractiveObject.d.ts +12 -0
  489. package/dist/playerglobal/flash/display/InteractiveObject.d.ts.map +1 -0
  490. package/dist/playerglobal/flash/display/InteractiveObject.js +88 -0
  491. package/dist/playerglobal/flash/display/InteractiveObject.js.map +1 -0
  492. package/dist/playerglobal/flash/display/Loader.d.ts +4 -0
  493. package/dist/playerglobal/flash/display/Loader.d.ts.map +1 -0
  494. package/dist/playerglobal/flash/display/Loader.js +80 -0
  495. package/dist/playerglobal/flash/display/Loader.js.map +1 -0
  496. package/dist/playerglobal/flash/display/LoaderInfo.d.ts +8 -0
  497. package/dist/playerglobal/flash/display/LoaderInfo.d.ts.map +1 -0
  498. package/dist/playerglobal/flash/display/LoaderInfo.js +129 -0
  499. package/dist/playerglobal/flash/display/LoaderInfo.js.map +1 -0
  500. package/dist/playerglobal/flash/display/MovieClip.d.ts +4 -0
  501. package/dist/playerglobal/flash/display/MovieClip.d.ts.map +1 -0
  502. package/dist/playerglobal/flash/display/MovieClip.js +195 -0
  503. package/dist/playerglobal/flash/display/MovieClip.js.map +1 -0
  504. package/dist/playerglobal/flash/display/NativeWindow.d.ts +8 -0
  505. package/dist/playerglobal/flash/display/NativeWindow.d.ts.map +1 -0
  506. package/dist/playerglobal/flash/display/NativeWindow.js +246 -0
  507. package/dist/playerglobal/flash/display/NativeWindow.js.map +1 -0
  508. package/dist/playerglobal/flash/display/Shader.d.ts +4 -0
  509. package/dist/playerglobal/flash/display/Shader.d.ts.map +1 -0
  510. package/dist/playerglobal/flash/display/Shader.js +27 -0
  511. package/dist/playerglobal/flash/display/Shader.js.map +1 -0
  512. package/dist/playerglobal/flash/display/ShaderData.d.ts +7 -0
  513. package/dist/playerglobal/flash/display/ShaderData.d.ts.map +1 -0
  514. package/dist/playerglobal/flash/display/ShaderData.js +86 -0
  515. package/dist/playerglobal/flash/display/ShaderData.js.map +1 -0
  516. package/dist/playerglobal/flash/display/ShaderInput.d.ts +20 -0
  517. package/dist/playerglobal/flash/display/ShaderInput.d.ts.map +1 -0
  518. package/dist/playerglobal/flash/display/ShaderInput.js +65 -0
  519. package/dist/playerglobal/flash/display/ShaderInput.js.map +1 -0
  520. package/dist/playerglobal/flash/display/ShaderJob.d.ts +4 -0
  521. package/dist/playerglobal/flash/display/ShaderJob.d.ts.map +1 -0
  522. package/dist/playerglobal/flash/display/ShaderJob.js +182 -0
  523. package/dist/playerglobal/flash/display/ShaderJob.js.map +1 -0
  524. package/dist/playerglobal/flash/display/ShaderParameter.d.ts +4 -0
  525. package/dist/playerglobal/flash/display/ShaderParameter.d.ts.map +1 -0
  526. package/dist/playerglobal/flash/display/ShaderParameter.js +24 -0
  527. package/dist/playerglobal/flash/display/ShaderParameter.js.map +1 -0
  528. package/dist/playerglobal/flash/display/Shape.d.ts +4 -0
  529. package/dist/playerglobal/flash/display/Shape.d.ts.map +1 -0
  530. package/dist/playerglobal/flash/display/Shape.js +14 -0
  531. package/dist/playerglobal/flash/display/Shape.js.map +1 -0
  532. package/dist/playerglobal/flash/display/SimpleButton.d.ts +4 -0
  533. package/dist/playerglobal/flash/display/SimpleButton.d.ts.map +1 -0
  534. package/dist/playerglobal/flash/display/SimpleButton.js +104 -0
  535. package/dist/playerglobal/flash/display/SimpleButton.js.map +1 -0
  536. package/dist/playerglobal/flash/display/Sprite.d.ts +4 -0
  537. package/dist/playerglobal/flash/display/Sprite.d.ts.map +1 -0
  538. package/dist/playerglobal/flash/display/Sprite.js +85 -0
  539. package/dist/playerglobal/flash/display/Sprite.js.map +1 -0
  540. package/dist/playerglobal/flash/display/Stage.d.ts +4 -0
  541. package/dist/playerglobal/flash/display/Stage.d.ts.map +1 -0
  542. package/dist/playerglobal/flash/display/Stage.js +232 -0
  543. package/dist/playerglobal/flash/display/Stage.js.map +1 -0
  544. package/dist/playerglobal/flash/display/Stage3D.d.ts +4 -0
  545. package/dist/playerglobal/flash/display/Stage3D.d.ts.map +1 -0
  546. package/dist/playerglobal/flash/display/Stage3D.js +55 -0
  547. package/dist/playerglobal/flash/display/Stage3D.js.map +1 -0
  548. package/dist/playerglobal/flash/display/shaders.d.ts +45 -0
  549. package/dist/playerglobal/flash/display/shaders.d.ts.map +1 -0
  550. package/dist/playerglobal/flash/display/shaders.js +229 -0
  551. package/dist/playerglobal/flash/display/shaders.js.map +1 -0
  552. package/dist/playerglobal/flash/events/Event.d.ts +4 -0
  553. package/dist/playerglobal/flash/events/Event.d.ts.map +1 -0
  554. package/dist/playerglobal/flash/events/Event.js +59 -0
  555. package/dist/playerglobal/flash/events/Event.js.map +1 -0
  556. package/dist/playerglobal/flash/events/EventDispatcher.d.ts +11 -0
  557. package/dist/playerglobal/flash/events/EventDispatcher.d.ts.map +1 -0
  558. package/dist/playerglobal/flash/events/EventDispatcher.js +104 -0
  559. package/dist/playerglobal/flash/events/EventDispatcher.js.map +1 -0
  560. package/dist/playerglobal/flash/events/GestureEvent.d.ts +4 -0
  561. package/dist/playerglobal/flash/events/GestureEvent.d.ts.map +1 -0
  562. package/dist/playerglobal/flash/events/GestureEvent.js +35 -0
  563. package/dist/playerglobal/flash/events/GestureEvent.js.map +1 -0
  564. package/dist/playerglobal/flash/events/HTTPStatusEvent.d.ts +3 -0
  565. package/dist/playerglobal/flash/events/HTTPStatusEvent.d.ts.map +1 -0
  566. package/dist/playerglobal/flash/events/HTTPStatusEvent.js +9 -0
  567. package/dist/playerglobal/flash/events/HTTPStatusEvent.js.map +1 -0
  568. package/dist/playerglobal/flash/events/KeyboardEvent.d.ts +4 -0
  569. package/dist/playerglobal/flash/events/KeyboardEvent.d.ts.map +1 -0
  570. package/dist/playerglobal/flash/events/KeyboardEvent.js +52 -0
  571. package/dist/playerglobal/flash/events/KeyboardEvent.js.map +1 -0
  572. package/dist/playerglobal/flash/events/MouseEvent.d.ts +11 -0
  573. package/dist/playerglobal/flash/events/MouseEvent.d.ts.map +1 -0
  574. package/dist/playerglobal/flash/events/MouseEvent.js +60 -0
  575. package/dist/playerglobal/flash/events/MouseEvent.js.map +1 -0
  576. package/dist/playerglobal/flash/events/PressAndTapGestureEvent.d.ts +4 -0
  577. package/dist/playerglobal/flash/events/PressAndTapGestureEvent.d.ts.map +1 -0
  578. package/dist/playerglobal/flash/events/PressAndTapGestureEvent.js +31 -0
  579. package/dist/playerglobal/flash/events/PressAndTapGestureEvent.js.map +1 -0
  580. package/dist/playerglobal/flash/events/TimerEvent.d.ts +4 -0
  581. package/dist/playerglobal/flash/events/TimerEvent.d.ts.map +1 -0
  582. package/dist/playerglobal/flash/events/TimerEvent.js +17 -0
  583. package/dist/playerglobal/flash/events/TimerEvent.js.map +1 -0
  584. package/dist/playerglobal/flash/events/TouchEvent.d.ts +4 -0
  585. package/dist/playerglobal/flash/events/TouchEvent.d.ts.map +1 -0
  586. package/dist/playerglobal/flash/events/TouchEvent.js +46 -0
  587. package/dist/playerglobal/flash/events/TouchEvent.js.map +1 -0
  588. package/dist/playerglobal/flash/external/ExternalInterface.d.ts +4 -0
  589. package/dist/playerglobal/flash/external/ExternalInterface.d.ts.map +1 -0
  590. package/dist/playerglobal/flash/external/ExternalInterface.js +74 -0
  591. package/dist/playerglobal/flash/external/ExternalInterface.js.map +1 -0
  592. package/dist/playerglobal/flash/filesystem/File.d.ts +22 -0
  593. package/dist/playerglobal/flash/filesystem/File.d.ts.map +1 -0
  594. package/dist/playerglobal/flash/filesystem/File.js +341 -0
  595. package/dist/playerglobal/flash/filesystem/File.js.map +1 -0
  596. package/dist/playerglobal/flash/filesystem/FileStream.d.ts +4 -0
  597. package/dist/playerglobal/flash/filesystem/FileStream.d.ts.map +1 -0
  598. package/dist/playerglobal/flash/filesystem/FileStream.js +454 -0
  599. package/dist/playerglobal/flash/filesystem/FileStream.js.map +1 -0
  600. package/dist/playerglobal/flash/filesystem/paths.d.ts +43 -0
  601. package/dist/playerglobal/flash/filesystem/paths.d.ts.map +1 -0
  602. package/dist/playerglobal/flash/filesystem/paths.js +157 -0
  603. package/dist/playerglobal/flash/filesystem/paths.js.map +1 -0
  604. package/dist/playerglobal/flash/filesystem/writes.d.ts +36 -0
  605. package/dist/playerglobal/flash/filesystem/writes.d.ts.map +1 -0
  606. package/dist/playerglobal/flash/filesystem/writes.js +144 -0
  607. package/dist/playerglobal/flash/filesystem/writes.js.map +1 -0
  608. package/dist/playerglobal/flash/filters/BevelFilter.d.ts +4 -0
  609. package/dist/playerglobal/flash/filters/BevelFilter.d.ts.map +1 -0
  610. package/dist/playerglobal/flash/filters/BevelFilter.js +5 -0
  611. package/dist/playerglobal/flash/filters/BevelFilter.js.map +1 -0
  612. package/dist/playerglobal/flash/filters/BitmapFilter.d.ts +33 -0
  613. package/dist/playerglobal/flash/filters/BitmapFilter.d.ts.map +1 -0
  614. package/dist/playerglobal/flash/filters/BitmapFilter.js +206 -0
  615. package/dist/playerglobal/flash/filters/BitmapFilter.js.map +1 -0
  616. package/dist/playerglobal/flash/filters/BlurFilter.d.ts +4 -0
  617. package/dist/playerglobal/flash/filters/BlurFilter.d.ts.map +1 -0
  618. package/dist/playerglobal/flash/filters/BlurFilter.js +5 -0
  619. package/dist/playerglobal/flash/filters/BlurFilter.js.map +1 -0
  620. package/dist/playerglobal/flash/filters/ColorMatrixFilter.d.ts +4 -0
  621. package/dist/playerglobal/flash/filters/ColorMatrixFilter.d.ts.map +1 -0
  622. package/dist/playerglobal/flash/filters/ColorMatrixFilter.js +12 -0
  623. package/dist/playerglobal/flash/filters/ColorMatrixFilter.js.map +1 -0
  624. package/dist/playerglobal/flash/filters/ConvolutionFilter.d.ts +4 -0
  625. package/dist/playerglobal/flash/filters/ConvolutionFilter.d.ts.map +1 -0
  626. package/dist/playerglobal/flash/filters/ConvolutionFilter.js +27 -0
  627. package/dist/playerglobal/flash/filters/ConvolutionFilter.js.map +1 -0
  628. package/dist/playerglobal/flash/filters/DisplacementMapFilter.d.ts +12 -0
  629. package/dist/playerglobal/flash/filters/DisplacementMapFilter.d.ts.map +1 -0
  630. package/dist/playerglobal/flash/filters/DisplacementMapFilter.js +52 -0
  631. package/dist/playerglobal/flash/filters/DisplacementMapFilter.js.map +1 -0
  632. package/dist/playerglobal/flash/filters/DropShadowFilter.d.ts +4 -0
  633. package/dist/playerglobal/flash/filters/DropShadowFilter.d.ts.map +1 -0
  634. package/dist/playerglobal/flash/filters/DropShadowFilter.js +5 -0
  635. package/dist/playerglobal/flash/filters/DropShadowFilter.js.map +1 -0
  636. package/dist/playerglobal/flash/filters/GlowFilter.d.ts +4 -0
  637. package/dist/playerglobal/flash/filters/GlowFilter.d.ts.map +1 -0
  638. package/dist/playerglobal/flash/filters/GlowFilter.js +5 -0
  639. package/dist/playerglobal/flash/filters/GlowFilter.js.map +1 -0
  640. package/dist/playerglobal/flash/filters/GradientBevelFilter.d.ts +4 -0
  641. package/dist/playerglobal/flash/filters/GradientBevelFilter.d.ts.map +1 -0
  642. package/dist/playerglobal/flash/filters/GradientBevelFilter.js +5 -0
  643. package/dist/playerglobal/flash/filters/GradientBevelFilter.js.map +1 -0
  644. package/dist/playerglobal/flash/filters/GradientGlowFilter.d.ts +4 -0
  645. package/dist/playerglobal/flash/filters/GradientGlowFilter.d.ts.map +1 -0
  646. package/dist/playerglobal/flash/filters/GradientGlowFilter.js +5 -0
  647. package/dist/playerglobal/flash/filters/GradientGlowFilter.js.map +1 -0
  648. package/dist/playerglobal/flash/filters/ShaderFilter.d.ts +4 -0
  649. package/dist/playerglobal/flash/filters/ShaderFilter.d.ts.map +1 -0
  650. package/dist/playerglobal/flash/filters/ShaderFilter.js +54 -0
  651. package/dist/playerglobal/flash/filters/ShaderFilter.js.map +1 -0
  652. package/dist/playerglobal/flash/geom/Matrix3D.d.ts +4 -0
  653. package/dist/playerglobal/flash/geom/Matrix3D.d.ts.map +1 -0
  654. package/dist/playerglobal/flash/geom/Matrix3D.js +362 -0
  655. package/dist/playerglobal/flash/geom/Matrix3D.js.map +1 -0
  656. package/dist/playerglobal/flash/geom/PerspectiveProjection.d.ts +13 -0
  657. package/dist/playerglobal/flash/geom/PerspectiveProjection.d.ts.map +1 -0
  658. package/dist/playerglobal/flash/geom/PerspectiveProjection.js +123 -0
  659. package/dist/playerglobal/flash/geom/PerspectiveProjection.js.map +1 -0
  660. package/dist/playerglobal/flash/geom/Transform.d.ts +13 -0
  661. package/dist/playerglobal/flash/geom/Transform.d.ts.map +1 -0
  662. package/dist/playerglobal/flash/geom/Transform.js +246 -0
  663. package/dist/playerglobal/flash/geom/Transform.js.map +1 -0
  664. package/dist/playerglobal/flash/geom/Utils3D.d.ts +4 -0
  665. package/dist/playerglobal/flash/geom/Utils3D.d.ts.map +1 -0
  666. package/dist/playerglobal/flash/geom/Utils3D.js +86 -0
  667. package/dist/playerglobal/flash/geom/Utils3D.js.map +1 -0
  668. package/dist/playerglobal/flash/globalization/Collator.d.ts +4 -0
  669. package/dist/playerglobal/flash/globalization/Collator.d.ts.map +1 -0
  670. package/dist/playerglobal/flash/globalization/Collator.js +150 -0
  671. package/dist/playerglobal/flash/globalization/Collator.js.map +1 -0
  672. package/dist/playerglobal/flash/globalization/CurrencyFormatter.d.ts +4 -0
  673. package/dist/playerglobal/flash/globalization/CurrencyFormatter.d.ts.map +1 -0
  674. package/dist/playerglobal/flash/globalization/CurrencyFormatter.js +273 -0
  675. package/dist/playerglobal/flash/globalization/CurrencyFormatter.js.map +1 -0
  676. package/dist/playerglobal/flash/globalization/CurrencyParseResult.d.ts +4 -0
  677. package/dist/playerglobal/flash/globalization/CurrencyParseResult.d.ts.map +1 -0
  678. package/dist/playerglobal/flash/globalization/CurrencyParseResult.js +22 -0
  679. package/dist/playerglobal/flash/globalization/CurrencyParseResult.js.map +1 -0
  680. package/dist/playerglobal/flash/globalization/DateTimeFormatter.d.ts +4 -0
  681. package/dist/playerglobal/flash/globalization/DateTimeFormatter.d.ts.map +1 -0
  682. package/dist/playerglobal/flash/globalization/DateTimeFormatter.js +464 -0
  683. package/dist/playerglobal/flash/globalization/DateTimeFormatter.js.map +1 -0
  684. package/dist/playerglobal/flash/globalization/LocaleID.d.ts +4 -0
  685. package/dist/playerglobal/flash/globalization/LocaleID.d.ts.map +1 -0
  686. package/dist/playerglobal/flash/globalization/LocaleID.js +145 -0
  687. package/dist/playerglobal/flash/globalization/LocaleID.js.map +1 -0
  688. package/dist/playerglobal/flash/globalization/NumberFormatter.d.ts +67 -0
  689. package/dist/playerglobal/flash/globalization/NumberFormatter.d.ts.map +1 -0
  690. package/dist/playerglobal/flash/globalization/NumberFormatter.js +445 -0
  691. package/dist/playerglobal/flash/globalization/NumberFormatter.js.map +1 -0
  692. package/dist/playerglobal/flash/globalization/NumberParseResult.d.ts +3 -0
  693. package/dist/playerglobal/flash/globalization/NumberParseResult.d.ts.map +1 -0
  694. package/dist/playerglobal/flash/globalization/NumberParseResult.js +23 -0
  695. package/dist/playerglobal/flash/globalization/NumberParseResult.js.map +1 -0
  696. package/dist/playerglobal/flash/globalization/StringTools.d.ts +4 -0
  697. package/dist/playerglobal/flash/globalization/StringTools.d.ts.map +1 -0
  698. package/dist/playerglobal/flash/globalization/StringTools.js +60 -0
  699. package/dist/playerglobal/flash/globalization/StringTools.js.map +1 -0
  700. package/dist/playerglobal/flash/globalization/locale.d.ts +62 -0
  701. package/dist/playerglobal/flash/globalization/locale.d.ts.map +1 -0
  702. package/dist/playerglobal/flash/globalization/locale.js +191 -0
  703. package/dist/playerglobal/flash/globalization/locale.js.map +1 -0
  704. package/dist/playerglobal/flash/media/Camera.d.ts +4 -0
  705. package/dist/playerglobal/flash/media/Camera.d.ts.map +1 -0
  706. package/dist/playerglobal/flash/media/Camera.js +90 -0
  707. package/dist/playerglobal/flash/media/Camera.js.map +1 -0
  708. package/dist/playerglobal/flash/media/Microphone.d.ts +4 -0
  709. package/dist/playerglobal/flash/media/Microphone.d.ts.map +1 -0
  710. package/dist/playerglobal/flash/media/Microphone.js +127 -0
  711. package/dist/playerglobal/flash/media/Microphone.js.map +1 -0
  712. package/dist/playerglobal/flash/media/Sound.d.ts +16 -0
  713. package/dist/playerglobal/flash/media/Sound.d.ts.map +1 -0
  714. package/dist/playerglobal/flash/media/Sound.js +544 -0
  715. package/dist/playerglobal/flash/media/Sound.js.map +1 -0
  716. package/dist/playerglobal/flash/media/SoundMixer.d.ts +4 -0
  717. package/dist/playerglobal/flash/media/SoundMixer.d.ts.map +1 -0
  718. package/dist/playerglobal/flash/media/SoundMixer.js +75 -0
  719. package/dist/playerglobal/flash/media/SoundMixer.js.map +1 -0
  720. package/dist/playerglobal/flash/media/SoundTransform.d.ts +4 -0
  721. package/dist/playerglobal/flash/media/SoundTransform.d.ts.map +1 -0
  722. package/dist/playerglobal/flash/media/SoundTransform.js +41 -0
  723. package/dist/playerglobal/flash/media/SoundTransform.js.map +1 -0
  724. package/dist/playerglobal/flash/media/Video.d.ts +4 -0
  725. package/dist/playerglobal/flash/media/Video.d.ts.map +1 -0
  726. package/dist/playerglobal/flash/media/Video.js +44 -0
  727. package/dist/playerglobal/flash/media/Video.js.map +1 -0
  728. package/dist/playerglobal/flash/net/FileFilter.d.ts +4 -0
  729. package/dist/playerglobal/flash/net/FileFilter.d.ts.map +1 -0
  730. package/dist/playerglobal/flash/net/FileFilter.js +28 -0
  731. package/dist/playerglobal/flash/net/FileFilter.js.map +1 -0
  732. package/dist/playerglobal/flash/net/FileReference.d.ts +4 -0
  733. package/dist/playerglobal/flash/net/FileReference.d.ts.map +1 -0
  734. package/dist/playerglobal/flash/net/FileReference.js +198 -0
  735. package/dist/playerglobal/flash/net/FileReference.js.map +1 -0
  736. package/dist/playerglobal/flash/net/LocalConnection.d.ts +5 -0
  737. package/dist/playerglobal/flash/net/LocalConnection.d.ts.map +1 -0
  738. package/dist/playerglobal/flash/net/LocalConnection.js +168 -0
  739. package/dist/playerglobal/flash/net/LocalConnection.js.map +1 -0
  740. package/dist/playerglobal/flash/net/NetConnection.d.ts +4 -0
  741. package/dist/playerglobal/flash/net/NetConnection.d.ts.map +1 -0
  742. package/dist/playerglobal/flash/net/NetConnection.js +156 -0
  743. package/dist/playerglobal/flash/net/NetConnection.js.map +1 -0
  744. package/dist/playerglobal/flash/net/SharedObject.d.ts +4 -0
  745. package/dist/playerglobal/flash/net/SharedObject.d.ts.map +1 -0
  746. package/dist/playerglobal/flash/net/SharedObject.js +300 -0
  747. package/dist/playerglobal/flash/net/SharedObject.js.map +1 -0
  748. package/dist/playerglobal/flash/net/Socket.d.ts +4 -0
  749. package/dist/playerglobal/flash/net/Socket.d.ts.map +1 -0
  750. package/dist/playerglobal/flash/net/Socket.js +283 -0
  751. package/dist/playerglobal/flash/net/Socket.js.map +1 -0
  752. package/dist/playerglobal/flash/net/URLRequest.d.ts +4 -0
  753. package/dist/playerglobal/flash/net/URLRequest.d.ts.map +1 -0
  754. package/dist/playerglobal/flash/net/URLRequest.js +94 -0
  755. package/dist/playerglobal/flash/net/URLRequest.js.map +1 -0
  756. package/dist/playerglobal/flash/net/URLStream.d.ts +4 -0
  757. package/dist/playerglobal/flash/net/URLStream.d.ts.map +1 -0
  758. package/dist/playerglobal/flash/net/URLStream.js +147 -0
  759. package/dist/playerglobal/flash/net/URLStream.js.map +1 -0
  760. package/dist/playerglobal/flash/net/XMLSocket.d.ts +4 -0
  761. package/dist/playerglobal/flash/net/XMLSocket.d.ts.map +1 -0
  762. package/dist/playerglobal/flash/net/XMLSocket.js +15 -0
  763. package/dist/playerglobal/flash/net/XMLSocket.js.map +1 -0
  764. package/dist/playerglobal/flash/net/local-modern.d.ts +4 -0
  765. package/dist/playerglobal/flash/net/local-modern.d.ts.map +1 -0
  766. package/dist/playerglobal/flash/net/local-modern.js +143 -0
  767. package/dist/playerglobal/flash/net/local-modern.js.map +1 -0
  768. package/dist/playerglobal/flash/net/local-values.d.ts +6 -0
  769. package/dist/playerglobal/flash/net/local-values.d.ts.map +1 -0
  770. package/dist/playerglobal/flash/net/local-values.js +218 -0
  771. package/dist/playerglobal/flash/net/local-values.js.map +1 -0
  772. package/dist/playerglobal/flash/net/navigateToURL.d.ts +4 -0
  773. package/dist/playerglobal/flash/net/navigateToURL.d.ts.map +1 -0
  774. package/dist/playerglobal/flash/net/navigateToURL.js +30 -0
  775. package/dist/playerglobal/flash/net/navigateToURL.js.map +1 -0
  776. package/dist/playerglobal/flash/profiler/Telemetry.d.ts +3 -0
  777. package/dist/playerglobal/flash/profiler/Telemetry.d.ts.map +1 -0
  778. package/dist/playerglobal/flash/profiler/Telemetry.js +26 -0
  779. package/dist/playerglobal/flash/profiler/Telemetry.js.map +1 -0
  780. package/dist/playerglobal/flash/sensors/Accelerometer.d.ts +3 -0
  781. package/dist/playerglobal/flash/sensors/Accelerometer.d.ts.map +1 -0
  782. package/dist/playerglobal/flash/sensors/Accelerometer.js +13 -0
  783. package/dist/playerglobal/flash/sensors/Accelerometer.js.map +1 -0
  784. package/dist/playerglobal/flash/system/ApplicationDomain.d.ts +4 -0
  785. package/dist/playerglobal/flash/system/ApplicationDomain.d.ts.map +1 -0
  786. package/dist/playerglobal/flash/system/ApplicationDomain.js +70 -0
  787. package/dist/playerglobal/flash/system/ApplicationDomain.js.map +1 -0
  788. package/dist/playerglobal/flash/system/Capabilities.d.ts +4 -0
  789. package/dist/playerglobal/flash/system/Capabilities.d.ts.map +1 -0
  790. package/dist/playerglobal/flash/system/Capabilities.js +164 -0
  791. package/dist/playerglobal/flash/system/Capabilities.js.map +1 -0
  792. package/dist/playerglobal/flash/system/FSCommandHost.d.ts +4 -0
  793. package/dist/playerglobal/flash/system/FSCommandHost.d.ts.map +1 -0
  794. package/dist/playerglobal/flash/system/FSCommandHost.js +18 -0
  795. package/dist/playerglobal/flash/system/FSCommandHost.js.map +1 -0
  796. package/dist/playerglobal/flash/system/Security.d.ts +4 -0
  797. package/dist/playerglobal/flash/system/Security.d.ts.map +1 -0
  798. package/dist/playerglobal/flash/system/Security.js +47 -0
  799. package/dist/playerglobal/flash/system/Security.js.map +1 -0
  800. package/dist/playerglobal/flash/system/SecurityDomain.d.ts +4 -0
  801. package/dist/playerglobal/flash/system/SecurityDomain.d.ts.map +1 -0
  802. package/dist/playerglobal/flash/system/SecurityDomain.js +22 -0
  803. package/dist/playerglobal/flash/system/SecurityDomain.js.map +1 -0
  804. package/dist/playerglobal/flash/system/System.d.ts +4 -0
  805. package/dist/playerglobal/flash/system/System.d.ts.map +1 -0
  806. package/dist/playerglobal/flash/system/System.js +74 -0
  807. package/dist/playerglobal/flash/system/System.js.map +1 -0
  808. package/dist/playerglobal/flash/system/Worker.d.ts +6 -0
  809. package/dist/playerglobal/flash/system/Worker.d.ts.map +1 -0
  810. package/dist/playerglobal/flash/system/Worker.js +113 -0
  811. package/dist/playerglobal/flash/system/Worker.js.map +1 -0
  812. package/dist/playerglobal/flash/text/Font.d.ts +8 -0
  813. package/dist/playerglobal/flash/text/Font.d.ts.map +1 -0
  814. package/dist/playerglobal/flash/text/Font.js +96 -0
  815. package/dist/playerglobal/flash/text/Font.js.map +1 -0
  816. package/dist/playerglobal/flash/text/StaticText.d.ts +3 -0
  817. package/dist/playerglobal/flash/text/StaticText.d.ts.map +1 -0
  818. package/dist/playerglobal/flash/text/StaticText.js +17 -0
  819. package/dist/playerglobal/flash/text/StaticText.js.map +1 -0
  820. package/dist/playerglobal/flash/text/StyleSheet.d.ts +9 -0
  821. package/dist/playerglobal/flash/text/StyleSheet.d.ts.map +1 -0
  822. package/dist/playerglobal/flash/text/StyleSheet.js +66 -0
  823. package/dist/playerglobal/flash/text/StyleSheet.js.map +1 -0
  824. package/dist/playerglobal/flash/text/TextField.d.ts +4 -0
  825. package/dist/playerglobal/flash/text/TextField.d.ts.map +1 -0
  826. package/dist/playerglobal/flash/text/TextField.js +708 -0
  827. package/dist/playerglobal/flash/text/TextField.js.map +1 -0
  828. package/dist/playerglobal/flash/text/TextRenderer.d.ts +4 -0
  829. package/dist/playerglobal/flash/text/TextRenderer.d.ts.map +1 -0
  830. package/dist/playerglobal/flash/text/TextRenderer.js +78 -0
  831. package/dist/playerglobal/flash/text/TextRenderer.js.map +1 -0
  832. package/dist/playerglobal/flash/text/engine/FontDescription.d.ts +4 -0
  833. package/dist/playerglobal/flash/text/engine/FontDescription.d.ts.map +1 -0
  834. package/dist/playerglobal/flash/text/engine/FontDescription.js +142 -0
  835. package/dist/playerglobal/flash/text/engine/FontDescription.js.map +1 -0
  836. package/dist/playerglobal/flash/text/engine/TabStop.d.ts +4 -0
  837. package/dist/playerglobal/flash/text/engine/TabStop.d.ts.map +1 -0
  838. package/dist/playerglobal/flash/text/engine/TabStop.js +47 -0
  839. package/dist/playerglobal/flash/text/engine/TabStop.js.map +1 -0
  840. package/dist/playerglobal/flash/trace/Trace.d.ts +3 -0
  841. package/dist/playerglobal/flash/trace/Trace.d.ts.map +1 -0
  842. package/dist/playerglobal/flash/trace/Trace.js +18 -0
  843. package/dist/playerglobal/flash/trace/Trace.js.map +1 -0
  844. package/dist/playerglobal/flash/ui/ContextMenu.d.ts +4 -0
  845. package/dist/playerglobal/flash/ui/ContextMenu.d.ts.map +1 -0
  846. package/dist/playerglobal/flash/ui/ContextMenu.js +18 -0
  847. package/dist/playerglobal/flash/ui/ContextMenu.js.map +1 -0
  848. package/dist/playerglobal/flash/ui/GameInput.d.ts +4 -0
  849. package/dist/playerglobal/flash/ui/GameInput.d.ts.map +1 -0
  850. package/dist/playerglobal/flash/ui/GameInput.js +20 -0
  851. package/dist/playerglobal/flash/ui/GameInput.js.map +1 -0
  852. package/dist/playerglobal/flash/ui/Keyboard.d.ts +3 -0
  853. package/dist/playerglobal/flash/ui/Keyboard.d.ts.map +1 -0
  854. package/dist/playerglobal/flash/ui/Keyboard.js +28 -0
  855. package/dist/playerglobal/flash/ui/Keyboard.js.map +1 -0
  856. package/dist/playerglobal/flash/ui/Mouse.d.ts +4 -0
  857. package/dist/playerglobal/flash/ui/Mouse.d.ts.map +1 -0
  858. package/dist/playerglobal/flash/ui/Mouse.js +128 -0
  859. package/dist/playerglobal/flash/ui/Mouse.js.map +1 -0
  860. package/dist/playerglobal/flash/ui/Multitouch.d.ts +4 -0
  861. package/dist/playerglobal/flash/ui/Multitouch.d.ts.map +1 -0
  862. package/dist/playerglobal/flash/ui/Multitouch.js +47 -0
  863. package/dist/playerglobal/flash/ui/Multitouch.js.map +1 -0
  864. package/dist/playerglobal/flash/utils/ByteArray.d.ts +5 -0
  865. package/dist/playerglobal/flash/utils/ByteArray.d.ts.map +1 -0
  866. package/dist/playerglobal/flash/utils/ByteArray.js +156 -0
  867. package/dist/playerglobal/flash/utils/ByteArray.js.map +1 -0
  868. package/dist/playerglobal/flash/utils/Timer.d.ts +4 -0
  869. package/dist/playerglobal/flash/utils/Timer.d.ts.map +1 -0
  870. package/dist/playerglobal/flash/utils/Timer.js +26 -0
  871. package/dist/playerglobal/flash/utils/Timer.js.map +1 -0
  872. package/dist/playerglobal/flash/xml/XMLDocument.d.ts +4 -0
  873. package/dist/playerglobal/flash/xml/XMLDocument.d.ts.map +1 -0
  874. package/dist/playerglobal/flash/xml/XMLDocument.js +75 -0
  875. package/dist/playerglobal/flash/xml/XMLDocument.js.map +1 -0
  876. package/dist/playerglobal/index.d.ts +6 -0
  877. package/dist/playerglobal/index.d.ts.map +1 -0
  878. package/dist/playerglobal/index.js +225 -0
  879. package/dist/playerglobal/index.js.map +1 -0
  880. package/dist/playerglobal/libraries.d.ts +5 -0
  881. package/dist/playerglobal/libraries.d.ts.map +1 -0
  882. package/dist/playerglobal/libraries.js +11 -0
  883. package/dist/playerglobal/libraries.js.map +1 -0
  884. package/dist/playerglobal/playerglobal-library.d.ts +3 -0
  885. package/dist/playerglobal/playerglobal-library.d.ts.map +1 -0
  886. package/dist/playerglobal/playerglobal-library.js +23 -0
  887. package/dist/playerglobal/playerglobal-library.js.map +1 -0
  888. package/dist/playerglobal/toplevel.d.ts +14 -0
  889. package/dist/playerglobal/toplevel.d.ts.map +1 -0
  890. package/dist/playerglobal/toplevel.js +123 -0
  891. package/dist/playerglobal/toplevel.js.map +1 -0
  892. package/dist/scene/advanced.d.ts +28 -0
  893. package/dist/scene/advanced.d.ts.map +1 -0
  894. package/dist/scene/advanced.js +182 -0
  895. package/dist/scene/advanced.js.map +1 -0
  896. package/dist/scene/context-menu.d.ts +16 -0
  897. package/dist/scene/context-menu.d.ts.map +1 -0
  898. package/dist/scene/context-menu.js +230 -0
  899. package/dist/scene/context-menu.js.map +1 -0
  900. package/dist/scene/fills.d.ts +45 -0
  901. package/dist/scene/fills.d.ts.map +1 -0
  902. package/dist/scene/fills.js +39 -0
  903. package/dist/scene/fills.js.map +1 -0
  904. package/dist/scene/filter-layers.d.ts +99 -0
  905. package/dist/scene/filter-layers.d.ts.map +1 -0
  906. package/dist/scene/filter-layers.js +352 -0
  907. package/dist/scene/filter-layers.js.map +1 -0
  908. package/dist/scene/filters.d.ts +47 -0
  909. package/dist/scene/filters.d.ts.map +1 -0
  910. package/dist/scene/filters.js +314 -0
  911. package/dist/scene/filters.js.map +1 -0
  912. package/dist/scene/hidden.d.ts +8 -0
  913. package/dist/scene/hidden.d.ts.map +1 -0
  914. package/dist/scene/hidden.js +33 -0
  915. package/dist/scene/hidden.js.map +1 -0
  916. package/dist/scene/lines.d.ts +87 -0
  917. package/dist/scene/lines.d.ts.map +1 -0
  918. package/dist/scene/lines.js +242 -0
  919. package/dist/scene/lines.js.map +1 -0
  920. package/dist/scene/masks.d.ts +32 -0
  921. package/dist/scene/masks.d.ts.map +1 -0
  922. package/dist/scene/masks.js +136 -0
  923. package/dist/scene/masks.js.map +1 -0
  924. package/dist/scene/paints.d.ts +86 -0
  925. package/dist/scene/paints.d.ts.map +1 -0
  926. package/dist/scene/paints.js +282 -0
  927. package/dist/scene/paints.js.map +1 -0
  928. package/dist/scene/parts.d.ts +57 -0
  929. package/dist/scene/parts.d.ts.map +1 -0
  930. package/dist/scene/parts.js +156 -0
  931. package/dist/scene/parts.js.map +1 -0
  932. package/dist/scene/pixel-bender-glsl.d.ts +32 -0
  933. package/dist/scene/pixel-bender-glsl.d.ts.map +1 -0
  934. package/dist/scene/pixel-bender-glsl.js +618 -0
  935. package/dist/scene/pixel-bender-glsl.js.map +1 -0
  936. package/dist/scene/planes.d.ts +89 -0
  937. package/dist/scene/planes.d.ts.map +1 -0
  938. package/dist/scene/planes.js +177 -0
  939. package/dist/scene/planes.js.map +1 -0
  940. package/dist/scene/pointer.d.ts +18 -0
  941. package/dist/scene/pointer.d.ts.map +1 -0
  942. package/dist/scene/pointer.js +245 -0
  943. package/dist/scene/pointer.js.map +1 -0
  944. package/dist/scene/shapes.d.ts +56 -0
  945. package/dist/scene/shapes.d.ts.map +1 -0
  946. package/dist/scene/shapes.js +300 -0
  947. package/dist/scene/shapes.js.map +1 -0
  948. package/dist/scene/stale-shapes.d.ts +18 -0
  949. package/dist/scene/stale-shapes.d.ts.map +1 -0
  950. package/dist/scene/stale-shapes.js +39 -0
  951. package/dist/scene/stale-shapes.js.map +1 -0
  952. package/dist/scene/strokes.d.ts +20 -0
  953. package/dist/scene/strokes.d.ts.map +1 -0
  954. package/dist/scene/strokes.js +111 -0
  955. package/dist/scene/strokes.js.map +1 -0
  956. package/dist/scene/text-items.d.ts +48 -0
  957. package/dist/scene/text-items.d.ts.map +1 -0
  958. package/dist/scene/text-items.js +206 -0
  959. package/dist/scene/text-items.js.map +1 -0
  960. package/dist/scene/text.d.ts +98 -0
  961. package/dist/scene/text.d.ts.map +1 -0
  962. package/dist/scene/text.js +249 -0
  963. package/dist/scene/text.js.map +1 -0
  964. package/dist/scene/view.d.ts +277 -0
  965. package/dist/scene/view.d.ts.map +1 -0
  966. package/dist/scene/view.js +1185 -0
  967. package/dist/scene/view.js.map +1 -0
  968. package/dist/scripting/clipboard.d.ts +61 -0
  969. package/dist/scripting/clipboard.d.ts.map +1 -0
  970. package/dist/scripting/clipboard.js +147 -0
  971. package/dist/scripting/clipboard.js.map +1 -0
  972. package/dist/scripting/code.d.ts +294 -0
  973. package/dist/scripting/code.d.ts.map +1 -0
  974. package/dist/scripting/code.js +901 -0
  975. package/dist/scripting/code.js.map +1 -0
  976. package/dist/scripting/evaluate.d.ts +38 -0
  977. package/dist/scripting/evaluate.d.ts.map +1 -0
  978. package/dist/scripting/evaluate.js +145 -0
  979. package/dist/scripting/evaluate.js.map +1 -0
  980. package/dist/scripting/events.d.ts +69 -0
  981. package/dist/scripting/events.d.ts.map +1 -0
  982. package/dist/scripting/events.js +173 -0
  983. package/dist/scripting/events.js.map +1 -0
  984. package/dist/scripting/handover.d.ts +76 -0
  985. package/dist/scripting/handover.d.ts.map +1 -0
  986. package/dist/scripting/handover.js +183 -0
  987. package/dist/scripting/handover.js.map +1 -0
  988. package/dist/scripting/lazy.d.ts +9 -0
  989. package/dist/scripting/lazy.d.ts.map +1 -0
  990. package/dist/scripting/lazy.js +39 -0
  991. package/dist/scripting/lazy.js.map +1 -0
  992. package/dist/scripting/lifecycle.d.ts +90 -0
  993. package/dist/scripting/lifecycle.d.ts.map +1 -0
  994. package/dist/scripting/lifecycle.js +273 -0
  995. package/dist/scripting/lifecycle.js.map +1 -0
  996. package/dist/scripting/loads.d.ts +220 -0
  997. package/dist/scripting/loads.d.ts.map +1 -0
  998. package/dist/scripting/loads.js +861 -0
  999. package/dist/scripting/loads.js.map +1 -0
  1000. package/dist/scripting/sha256.d.ts +5 -0
  1001. package/dist/scripting/sha256.d.ts.map +1 -0
  1002. package/dist/scripting/sha256.js +96 -0
  1003. package/dist/scripting/sha256.js.map +1 -0
  1004. package/dist/scripting/symbols.d.ts +74 -0
  1005. package/dist/scripting/symbols.d.ts.map +1 -0
  1006. package/dist/scripting/symbols.js +349 -0
  1007. package/dist/scripting/symbols.js.map +1 -0
  1008. package/dist/scripting/timers.d.ts +145 -0
  1009. package/dist/scripting/timers.d.ts.map +1 -0
  1010. package/dist/scripting/timers.js +435 -0
  1011. package/dist/scripting/timers.js.map +1 -0
  1012. package/dist/scripting/workers.d.ts +138 -0
  1013. package/dist/scripting/workers.d.ts.map +1 -0
  1014. package/dist/scripting/workers.js +924 -0
  1015. package/dist/scripting/workers.js.map +1 -0
  1016. package/dist/scripting.d.ts +486 -0
  1017. package/dist/scripting.d.ts.map +1 -0
  1018. package/dist/scripting.js +1019 -0
  1019. package/dist/scripting.js.map +1 -0
  1020. package/dist/stage.d.ts +3 -0
  1021. package/dist/stage.d.ts.map +1 -0
  1022. package/dist/stage.js +5 -0
  1023. package/dist/stage.js.map +1 -0
  1024. package/dist/text/csm.d.ts +34 -0
  1025. package/dist/text/csm.d.ts.map +1 -0
  1026. package/dist/text/csm.js +114 -0
  1027. package/dist/text/csm.js.map +1 -0
  1028. package/dist/text/css.d.ts +9 -0
  1029. package/dist/text/css.d.ts.map +1 -0
  1030. package/dist/text/css.js +168 -0
  1031. package/dist/text/css.js.map +1 -0
  1032. package/dist/text/fonts.d.ts +23 -0
  1033. package/dist/text/fonts.d.ts.map +1 -0
  1034. package/dist/text/fonts.js +98 -0
  1035. package/dist/text/fonts.js.map +1 -0
  1036. package/dist/text/layout.d.ts +79 -0
  1037. package/dist/text/layout.d.ts.map +1 -0
  1038. package/dist/text/layout.js +394 -0
  1039. package/dist/text/layout.js.map +1 -0
  1040. package/dist/text/saffron.d.ts +121 -0
  1041. package/dist/text/saffron.d.ts.map +1 -0
  1042. package/dist/text/saffron.js +442 -0
  1043. package/dist/text/saffron.js.map +1 -0
  1044. package/dist/text/static.d.ts +33 -0
  1045. package/dist/text/static.d.ts.map +1 -0
  1046. package/dist/text/static.js +110 -0
  1047. package/dist/text/static.js.map +1 -0
  1048. package/dist/text/text.d.ts +69 -0
  1049. package/dist/text/text.d.ts.map +1 -0
  1050. package/dist/text/text.js +432 -0
  1051. package/dist/text/text.js.map +1 -0
  1052. package/dist/workers/protocol.d.ts +128 -0
  1053. package/dist/workers/protocol.d.ts.map +1 -0
  1054. package/dist/workers/protocol.js +2 -0
  1055. package/dist/workers/protocol.js.map +1 -0
  1056. package/dist/workers/thread.d.ts +15 -0
  1057. package/dist/workers/thread.d.ts.map +1 -0
  1058. package/dist/workers/thread.js +160 -0
  1059. package/dist/workers/thread.js.map +1 -0
  1060. package/dist/workers/wire.d.ts +53 -0
  1061. package/dist/workers/wire.d.ts.map +1 -0
  1062. package/dist/workers/wire.js +199 -0
  1063. package/dist/workers/wire.js.map +1 -0
  1064. package/package.json +55 -3
  1065. package/src/air-definitions.ts +129 -0
  1066. package/src/avm1/amf.ts +564 -0
  1067. package/src/avm1/avm1.ts +1652 -0
  1068. package/src/avm1/bindings.ts +257 -0
  1069. package/src/avm1/classes.ts +85 -0
  1070. package/src/avm1/clips.ts +305 -0
  1071. package/src/avm1/compile.ts +179 -0
  1072. package/src/avm1/external.ts +99 -0
  1073. package/src/avm1/focus.ts +342 -0
  1074. package/src/avm1/globals/BitmapData.ts +736 -0
  1075. package/src/avm1/globals/Button.ts +43 -0
  1076. package/src/avm1/globals/Color.ts +138 -0
  1077. package/src/avm1/globals/ExternalInterface.ts +402 -0
  1078. package/src/avm1/globals/FileReference.ts +249 -0
  1079. package/src/avm1/globals/Key.ts +102 -0
  1080. package/src/avm1/globals/LoadVars.ts +280 -0
  1081. package/src/avm1/globals/LocalConnection.ts +137 -0
  1082. package/src/avm1/globals/MovieClip.ts +1365 -0
  1083. package/src/avm1/globals/MovieClipLoader.ts +150 -0
  1084. package/src/avm1/globals/NetConnection.ts +352 -0
  1085. package/src/avm1/globals/PrintJob.ts +57 -0
  1086. package/src/avm1/globals/Selection.ts +103 -0
  1087. package/src/avm1/globals/SharedObject.ts +300 -0
  1088. package/src/avm1/globals/Sound.ts +326 -0
  1089. package/src/avm1/globals/Stage.ts +19 -0
  1090. package/src/avm1/globals/StyleSheet.ts +280 -0
  1091. package/src/avm1/globals/TextField.ts +611 -0
  1092. package/src/avm1/globals/TextFormat.ts +250 -0
  1093. package/src/avm1/globals/TextSnapshot.ts +128 -0
  1094. package/src/avm1/globals/XML.ts +521 -0
  1095. package/src/avm1/globals/XMLNode.ts +502 -0
  1096. package/src/avm1/globals/XMLSocket.ts +267 -0
  1097. package/src/avm1/globals/drawing.ts +253 -0
  1098. package/src/avm1/globals/filters.ts +782 -0
  1099. package/src/avm1/globals/geom.ts +887 -0
  1100. package/src/avm1/input.ts +556 -0
  1101. package/src/avm1/keyboard.ts +133 -0
  1102. package/src/avm1/loads.ts +461 -0
  1103. package/src/avm1/net.ts +287 -0
  1104. package/src/avm1/paths.ts +132 -0
  1105. package/src/avm1/pointer.ts +607 -0
  1106. package/src/avm1/queue.ts +335 -0
  1107. package/src/avm1/sound.ts +135 -0
  1108. package/src/avm1/swf.ts +193 -0
  1109. package/src/avm1/timers.ts +141 -0
  1110. package/src/bitmap/bitmap.ts +796 -0
  1111. package/src/bitmap/draw.ts +96 -0
  1112. package/src/bitmap/dxt.ts +20 -0
  1113. package/src/bitmap/filters.ts +810 -0
  1114. package/src/bitmap/images.ts +304 -0
  1115. package/src/bitmap/kernel.ts +77 -0
  1116. package/src/bitmap/ops.ts +1608 -0
  1117. package/src/bitmap/pixel-bender.ts +1089 -0
  1118. package/src/bitmap/png.ts +152 -0
  1119. package/src/bitmap/turbulence.ts +117 -0
  1120. package/src/clock.ts +196 -0
  1121. package/src/display/bitmapobject.ts +31 -0
  1122. package/src/display/bounds.ts +702 -0
  1123. package/src/display/buttonobject.ts +382 -0
  1124. package/src/display/color.ts +54 -0
  1125. package/src/display/container.ts +169 -0
  1126. package/src/display/display.ts +28 -0
  1127. package/src/display/displayobject.ts +823 -0
  1128. package/src/display/drawing.ts +744 -0
  1129. package/src/display/filters.ts +393 -0
  1130. package/src/display/geometry.ts +237 -0
  1131. package/src/display/gradients.ts +165 -0
  1132. package/src/display/graphicsdata.ts +745 -0
  1133. package/src/display/instantiate.ts +95 -0
  1134. package/src/display/matrix3d.ts +461 -0
  1135. package/src/display/morph.ts +275 -0
  1136. package/src/display/movieclip.ts +771 -0
  1137. package/src/display/perspective.ts +253 -0
  1138. package/src/display/plane.ts +192 -0
  1139. package/src/display/scale9.ts +321 -0
  1140. package/src/display/shapeobject.ts +160 -0
  1141. package/src/display/shapes.ts +602 -0
  1142. package/src/display/stretch.ts +217 -0
  1143. package/src/display/textobjects.ts +248 -0
  1144. package/src/display/timeline.ts +831 -0
  1145. package/src/display/value-lists.ts +50 -0
  1146. package/src/display/videoobject.ts +7 -0
  1147. package/src/display/walk.ts +169 -0
  1148. package/src/files.ts +466 -0
  1149. package/src/hosts.ts +645 -0
  1150. package/src/index.ts +66 -0
  1151. package/src/input/activation.ts +62 -0
  1152. package/src/input/avm1.ts +102 -0
  1153. package/src/input/canvas.ts +74 -0
  1154. package/src/input/context-menu.ts +105 -0
  1155. package/src/input/keyboard.ts +645 -0
  1156. package/src/input/pointer.ts +1127 -0
  1157. package/src/input/text-editor.ts +361 -0
  1158. package/src/input/touch.ts +302 -0
  1159. package/src/localconnection.ts +129 -0
  1160. package/src/media/audio.ts +484 -0
  1161. package/src/media/dynamic-sound.ts +118 -0
  1162. package/src/media/extract.ts +191 -0
  1163. package/src/media/mp3.ts +205 -0
  1164. package/src/media/sounds.ts +735 -0
  1165. package/src/media/streaming-audio.ts +150 -0
  1166. package/src/player.ts +686 -0
  1167. package/src/playerglobal/air/net/WebSocket.ts +318 -0
  1168. package/src/playerglobal/air-library.ts +14 -0
  1169. package/src/playerglobal/context3d/context.ts +672 -0
  1170. package/src/playerglobal/context3d/errors.ts +116 -0
  1171. package/src/playerglobal/context3d/lifecycle.ts +428 -0
  1172. package/src/playerglobal/context3d/readback.ts +65 -0
  1173. package/src/playerglobal/context3d/resources.ts +406 -0
  1174. package/src/playerglobal/context3d.ts +111 -0
  1175. package/src/playerglobal/flash/accessibility/Accessibility.ts +30 -0
  1176. package/src/playerglobal/flash/crypto/generateRandomBytes.ts +38 -0
  1177. package/src/playerglobal/flash/data/EncryptedLocalStore.ts +75 -0
  1178. package/src/playerglobal/flash/desktop/Clipboard.ts +217 -0
  1179. package/src/playerglobal/flash/desktop/NativeApplication.ts +241 -0
  1180. package/src/playerglobal/flash/display/AVM1Movie.ts +24 -0
  1181. package/src/playerglobal/flash/display/Bitmap.ts +76 -0
  1182. package/src/playerglobal/flash/display/BitmapData.ts +963 -0
  1183. package/src/playerglobal/flash/display/DisplayObject.ts +787 -0
  1184. package/src/playerglobal/flash/display/DisplayObjectContainer.ts +274 -0
  1185. package/src/playerglobal/flash/display/Graphics.ts +489 -0
  1186. package/src/playerglobal/flash/display/InteractiveObject.ts +124 -0
  1187. package/src/playerglobal/flash/display/Loader.ts +126 -0
  1188. package/src/playerglobal/flash/display/LoaderInfo.ts +205 -0
  1189. package/src/playerglobal/flash/display/MovieClip.ts +245 -0
  1190. package/src/playerglobal/flash/display/NativeWindow.ts +313 -0
  1191. package/src/playerglobal/flash/display/Shader.ts +39 -0
  1192. package/src/playerglobal/flash/display/ShaderData.ts +105 -0
  1193. package/src/playerglobal/flash/display/ShaderInput.ts +101 -0
  1194. package/src/playerglobal/flash/display/ShaderJob.ts +234 -0
  1195. package/src/playerglobal/flash/display/ShaderParameter.ts +36 -0
  1196. package/src/playerglobal/flash/display/Shape.ts +19 -0
  1197. package/src/playerglobal/flash/display/SimpleButton.ts +126 -0
  1198. package/src/playerglobal/flash/display/Sprite.ts +115 -0
  1199. package/src/playerglobal/flash/display/Stage.ts +298 -0
  1200. package/src/playerglobal/flash/display/Stage3D.ts +90 -0
  1201. package/src/playerglobal/flash/display/shaders.ts +296 -0
  1202. package/src/playerglobal/flash/events/Event.ts +85 -0
  1203. package/src/playerglobal/flash/events/EventDispatcher.ts +143 -0
  1204. package/src/playerglobal/flash/events/GestureEvent.ts +49 -0
  1205. package/src/playerglobal/flash/events/HTTPStatusEvent.ts +12 -0
  1206. package/src/playerglobal/flash/events/KeyboardEvent.ts +75 -0
  1207. package/src/playerglobal/flash/events/MouseEvent.ts +88 -0
  1208. package/src/playerglobal/flash/events/PressAndTapGestureEvent.ts +48 -0
  1209. package/src/playerglobal/flash/events/TimerEvent.ts +20 -0
  1210. package/src/playerglobal/flash/events/TouchEvent.ts +64 -0
  1211. package/src/playerglobal/flash/external/ExternalInterface.ts +104 -0
  1212. package/src/playerglobal/flash/filesystem/File.ts +450 -0
  1213. package/src/playerglobal/flash/filesystem/FileStream.ts +556 -0
  1214. package/src/playerglobal/flash/filesystem/paths.ts +181 -0
  1215. package/src/playerglobal/flash/filesystem/writes.ts +203 -0
  1216. package/src/playerglobal/flash/filters/BevelFilter.ts +9 -0
  1217. package/src/playerglobal/flash/filters/BitmapFilter.ts +237 -0
  1218. package/src/playerglobal/flash/filters/BlurFilter.ts +8 -0
  1219. package/src/playerglobal/flash/filters/ColorMatrixFilter.ts +15 -0
  1220. package/src/playerglobal/flash/filters/ConvolutionFilter.ts +31 -0
  1221. package/src/playerglobal/flash/filters/DisplacementMapFilter.ts +69 -0
  1222. package/src/playerglobal/flash/filters/DropShadowFilter.ts +9 -0
  1223. package/src/playerglobal/flash/filters/GlowFilter.ts +9 -0
  1224. package/src/playerglobal/flash/filters/GradientBevelFilter.ts +8 -0
  1225. package/src/playerglobal/flash/filters/GradientGlowFilter.ts +8 -0
  1226. package/src/playerglobal/flash/filters/ShaderFilter.ts +75 -0
  1227. package/src/playerglobal/flash/geom/Matrix3D.ts +468 -0
  1228. package/src/playerglobal/flash/geom/PerspectiveProjection.ts +162 -0
  1229. package/src/playerglobal/flash/geom/Transform.ts +335 -0
  1230. package/src/playerglobal/flash/geom/Utils3D.ts +132 -0
  1231. package/src/playerglobal/flash/globalization/Collator.ts +205 -0
  1232. package/src/playerglobal/flash/globalization/CurrencyFormatter.ts +365 -0
  1233. package/src/playerglobal/flash/globalization/CurrencyParseResult.ts +35 -0
  1234. package/src/playerglobal/flash/globalization/DateTimeFormatter.ts +594 -0
  1235. package/src/playerglobal/flash/globalization/LocaleID.ts +202 -0
  1236. package/src/playerglobal/flash/globalization/NumberFormatter.ts +574 -0
  1237. package/src/playerglobal/flash/globalization/NumberParseResult.ts +40 -0
  1238. package/src/playerglobal/flash/globalization/StringTools.ts +78 -0
  1239. package/src/playerglobal/flash/globalization/locale.ts +245 -0
  1240. package/src/playerglobal/flash/media/Camera.ts +122 -0
  1241. package/src/playerglobal/flash/media/Microphone.ts +177 -0
  1242. package/src/playerglobal/flash/media/Sound.ts +714 -0
  1243. package/src/playerglobal/flash/media/SoundMixer.ts +97 -0
  1244. package/src/playerglobal/flash/media/SoundTransform.ts +61 -0
  1245. package/src/playerglobal/flash/media/Video.ts +64 -0
  1246. package/src/playerglobal/flash/net/FileFilter.ts +42 -0
  1247. package/src/playerglobal/flash/net/FileReference.ts +273 -0
  1248. package/src/playerglobal/flash/net/LocalConnection.ts +218 -0
  1249. package/src/playerglobal/flash/net/NetConnection.ts +219 -0
  1250. package/src/playerglobal/flash/net/SharedObject.ts +356 -0
  1251. package/src/playerglobal/flash/net/Socket.ts +360 -0
  1252. package/src/playerglobal/flash/net/URLRequest.ts +140 -0
  1253. package/src/playerglobal/flash/net/URLStream.ts +203 -0
  1254. package/src/playerglobal/flash/net/XMLSocket.ts +18 -0
  1255. package/src/playerglobal/flash/net/local-modern.ts +164 -0
  1256. package/src/playerglobal/flash/net/local-values.ts +245 -0
  1257. package/src/playerglobal/flash/net/navigateToURL.ts +42 -0
  1258. package/src/playerglobal/flash/profiler/Telemetry.ts +35 -0
  1259. package/src/playerglobal/flash/sensors/Accelerometer.ts +15 -0
  1260. package/src/playerglobal/flash/system/ApplicationDomain.ts +94 -0
  1261. package/src/playerglobal/flash/system/Capabilities.ts +203 -0
  1262. package/src/playerglobal/flash/system/FSCommandHost.ts +23 -0
  1263. package/src/playerglobal/flash/system/Security.ts +61 -0
  1264. package/src/playerglobal/flash/system/SecurityDomain.ts +27 -0
  1265. package/src/playerglobal/flash/system/System.ts +96 -0
  1266. package/src/playerglobal/flash/system/Worker.ts +147 -0
  1267. package/src/playerglobal/flash/text/Font.ts +124 -0
  1268. package/src/playerglobal/flash/text/StaticText.ts +21 -0
  1269. package/src/playerglobal/flash/text/StyleSheet.ts +87 -0
  1270. package/src/playerglobal/flash/text/TextField.ts +789 -0
  1271. package/src/playerglobal/flash/text/TextRenderer.ts +104 -0
  1272. package/src/playerglobal/flash/text/engine/FontDescription.ts +198 -0
  1273. package/src/playerglobal/flash/text/engine/TabStop.ts +70 -0
  1274. package/src/playerglobal/flash/trace/Trace.ts +25 -0
  1275. package/src/playerglobal/flash/ui/ContextMenu.ts +26 -0
  1276. package/src/playerglobal/flash/ui/GameInput.ts +27 -0
  1277. package/src/playerglobal/flash/ui/Keyboard.ts +34 -0
  1278. package/src/playerglobal/flash/ui/Mouse.ts +170 -0
  1279. package/src/playerglobal/flash/ui/Multitouch.ts +62 -0
  1280. package/src/playerglobal/flash/utils/ByteArray.ts +184 -0
  1281. package/src/playerglobal/flash/utils/Timer.ts +39 -0
  1282. package/src/playerglobal/flash/xml/XMLDocument.ts +101 -0
  1283. package/src/playerglobal/index.ts +233 -0
  1284. package/src/playerglobal/libraries.ts +12 -0
  1285. package/src/playerglobal/playerglobal-library.ts +28 -0
  1286. package/src/playerglobal/toplevel.ts +158 -0
  1287. package/src/scene/advanced.ts +282 -0
  1288. package/src/scene/context-menu.ts +270 -0
  1289. package/src/scene/fills.ts +90 -0
  1290. package/src/scene/filter-layers.ts +503 -0
  1291. package/src/scene/filters.ts +421 -0
  1292. package/src/scene/hidden.ts +37 -0
  1293. package/src/scene/lines.ts +322 -0
  1294. package/src/scene/masks.ts +195 -0
  1295. package/src/scene/paints.ts +378 -0
  1296. package/src/scene/parts.ts +205 -0
  1297. package/src/scene/pixel-bender-glsl.ts +722 -0
  1298. package/src/scene/planes.ts +260 -0
  1299. package/src/scene/pointer.ts +278 -0
  1300. package/src/scene/shapes.ts +386 -0
  1301. package/src/scene/stale-shapes.ts +56 -0
  1302. package/src/scene/strokes.ts +157 -0
  1303. package/src/scene/text-items.ts +324 -0
  1304. package/src/scene/text.ts +360 -0
  1305. package/src/scene/view.ts +1591 -0
  1306. package/src/scripting/clipboard.ts +169 -0
  1307. package/src/scripting/code.ts +1094 -0
  1308. package/src/scripting/evaluate.ts +178 -0
  1309. package/src/scripting/events.ts +236 -0
  1310. package/src/scripting/handover.ts +253 -0
  1311. package/src/scripting/lazy.ts +67 -0
  1312. package/src/scripting/lifecycle.ts +307 -0
  1313. package/src/scripting/loads.ts +1112 -0
  1314. package/src/scripting/sha256.ts +107 -0
  1315. package/src/scripting/symbols.ts +454 -0
  1316. package/src/scripting/timers.ts +504 -0
  1317. package/src/scripting/workers.ts +1144 -0
  1318. package/src/scripting.ts +1300 -0
  1319. package/src/stage.ts +7 -0
  1320. package/src/text/csm.ts +173 -0
  1321. package/src/text/css.ts +198 -0
  1322. package/src/text/fonts.ts +129 -0
  1323. package/src/text/layout.ts +525 -0
  1324. package/src/text/saffron.ts +539 -0
  1325. package/src/text/static.ts +147 -0
  1326. package/src/text/text.ts +538 -0
  1327. package/src/workers/protocol.ts +124 -0
  1328. package/src/workers/thread.ts +188 -0
  1329. package/src/workers/wire.ts +263 -0
@@ -0,0 +1,1185 @@
1
+ // The renderer as the player drives it (docs/renderer.md): a view that
2
+ // owns a WebGL 2 canvas, walks the display list into a scene list and its
3
+ // rows, and has @swf2es/render plan and draw it.
4
+ import { IDENTITY } from "@swf2es/format";
5
+ import { Tessellator } from "@swf2es/native/render";
6
+ import { ALPHA_MASK, BLEND, BLEND_NAMES, CLAMP, Commands, FILL_SHADER, Filters, Geometries, KERNEL, Keeps, LAYER, measureLayers, NO_WHOLE, NORMAL, PLANE, plan, Rows, SceneList, SHADED, SMOOTH, Textures, WHOLE_ALIASED, WHOLE_SMOOTH, } from "@swf2es/render";
7
+ import { WebGLBackend } from "@swf2es/render/webgl";
8
+ import { argbOf } from "../bitmap/bitmap.js";
9
+ import { BitmapObject } from "../display/bitmapobject.js";
10
+ import { concatColor, concatColorInto, IDENTITY_COLOR, sameColor } from "../display/color.js";
11
+ import { Container } from "../display/container.js";
12
+ import { CLEAN } from "../display/displayobject.js";
13
+ import { concat, invert, shifted } from "../display/geometry.js";
14
+ import { bitmapScale, drawnRect, outsideMaskMap, placeQuad } from "../display/plane.js";
15
+ import { sliceDrawn, sliceLayers } from "../display/scale9.js";
16
+ import { cached, ShapeObject } from "../display/shapeobject.js";
17
+ import { facing } from "../display/shapes.js";
18
+ import { settledStretch, stretchOf } from "../display/stretch.js";
19
+ import { StaticTextObject, TextObject } from "../display/textobjects.js";
20
+ import { Clips } from "../display/walk.js";
21
+ import { allowResets, holdSegments, MOST, resetSegments, store as saffronStore, } from "../text/saffron.js";
22
+ import { AdvancedTexts } from "./advanced.js";
23
+ import { FilterLayers } from "./filter-layers.js";
24
+ import { undrawnFilter } from "./filters.js";
25
+ import { syncHidden } from "./hidden.js";
26
+ import { LineCache } from "./lines.js";
27
+ import { Masks } from "./masks.js";
28
+ import { Paints, paintSampler } from "./paints.js";
29
+ import { Parts } from "./parts.js";
30
+ import { Planes, planeUnchanged } from "./planes.js";
31
+ import { bindCanvasPointer } from "./pointer.js";
32
+ import { unsupported } from "./shapes.js";
33
+ import { StaleShapes } from "./stale-shapes.js";
34
+ import { deviceTextResolution, fieldItems, staticItems } from "./text.js";
35
+ import { placedRow, TextItems } from "./text-items.js";
36
+ /** No transform, where a walk starts. */
37
+ const UNIT_PLACE = [1, 0, 0, 1, 0, 0];
38
+ /**
39
+ * Draws the player's display list on a canvas of its own. Each render
40
+ * walks the whole list, writing a row for each object drawn and an entry
41
+ * for each of its layers' geometries, each geometry made once and kept
42
+ * while drawn; then plans the frame and has the backend draw it.
43
+ */
44
+ export class RenderView {
45
+ canvas;
46
+ gl;
47
+ /** View pixels a stage pixel, before the resolution: a host showing the stage larger. */
48
+ scale = 1;
49
+ /** Screen pixels a stage pixel, which hairlines will be drawn a pixel of; the scale's if null. */
50
+ screenScale = null;
51
+ background;
52
+ transparent;
53
+ /** Lines stroked anew and lines found stroked already (LineCache.counts). */
54
+ counts;
55
+ resolution;
56
+ width;
57
+ height;
58
+ stageQuality = "HIGH";
59
+ backend;
60
+ tessellator;
61
+ /** Whether the view made its canvas, whose context it then loses with itself. */
62
+ ownCanvas;
63
+ /** The tessellator the view made, which it disposes of with itself; none if it was given one. */
64
+ ownTessellator;
65
+ scene = new SceneList();
66
+ rows = new Rows();
67
+ geometries = new Geometries();
68
+ textures = new Textures();
69
+ commands = new Commands();
70
+ filters = new Filters();
71
+ lineCache;
72
+ parts;
73
+ paints = new Paints(this.textures, {
74
+ read: (id, width, height) => this.backend.readTexture(id, width, height),
75
+ fill: (id, r, pixel) => this.backend.fillTexture(this.textures, id, r.x, r.y, r.width, r.height, pixel),
76
+ copy: (from, r, to, dx, dy) => this.backend.copyTexture(this.textures, from, r.x, r.y, r.width, r.height, to, dx, dy),
77
+ });
78
+ staleShapes = new StaleShapes();
79
+ textItems;
80
+ advancedTexts;
81
+ masks;
82
+ filterLayers;
83
+ planes;
84
+ /** The largest texture side the context makes, which a filtered layer's padding must fit. */
85
+ textureLimit;
86
+ /** The outlines' store kept while the view is (text/saffron.ts, holdSegments), let go of with it. */
87
+ releaseOutlines = holdSegments();
88
+ /** The walk's depth, and a colour transform a depth, which a concatenation there is made in. */
89
+ walkDepth = 0;
90
+ /** Each depth's transform on the stage, a b c d tx ty, which its children are placed under. */
91
+ places = new Float64Array(6 * 64);
92
+ /** A Bitmap's placement moved onto whole pixels (wholePixels). */
93
+ moved = new Float64Array(6);
94
+ colorSlots = [];
95
+ /** The sliced owner whose children are walked now, its slice, and its parent's linear transform. */
96
+ sliceOwner = null;
97
+ ownerSlice = null;
98
+ ownerParent = [1, 0, 0, 1];
99
+ /** The outputs kept: filtered objects' (FilterLayers) and 3D objects' bitmaps (Planes). */
100
+ keeps = new Keeps();
101
+ /** Moves on as what every kept output was made at changes: the scale, the stage's quality. */
102
+ keptGeneration = 0;
103
+ keptScale = 0;
104
+ keptQuality = "";
105
+ keptScreen = null;
106
+ /** The stage's frames drawn. */
107
+ frames = 0;
108
+ /** Where a frame is drawn, filled in as it is. */
109
+ target = { width: 0, height: 0, scale: 1, x: 0, y: 0, resolution: 1, pixel: 1 };
110
+ /**
111
+ * What BitmapData.draw draws alone, while it is drawn (snapshot), and the
112
+ * matrix it is drawn through, after its scroll's shift.
113
+ */
114
+ drawRoot = null;
115
+ /**
116
+ * Whether the walk is BitmapData.draw's, which leaves the objects' flags
117
+ * for the stage's frame; a 3D object's pass in the frame clears them, as
118
+ * the frame's walk would.
119
+ */
120
+ snapshotting = false;
121
+ /** Target pixels a pixel of what filters run on, where not the scale: in a 3D object's bitmap. */
122
+ filterUnits = null;
123
+ drawMatrix = IDENTITY;
124
+ /**
125
+ * The alpha mask drawn for what it masks (drawAlphaMask), which the walk
126
+ * places where it stands on the stage and draws though it is a mask.
127
+ */
128
+ placedAlphaMask = null;
129
+ /**
130
+ * Whether an alpha mask's objects are walked, whose flags their own place
131
+ * on the list may have cleared first: their filters run anew, keeping no
132
+ * output, as nothing would say when one changed.
133
+ */
134
+ inAlphaMask = false;
135
+ /** An object's transform's linear part, made its stretch in place (stretchOf). */
136
+ stretchScratch = [0, 0, 0, 0];
137
+ constructor(options) {
138
+ // First, so that a page that cannot run the render module throws before a context is made.
139
+ this.ownTessellator = options.fillTessellator ? null : new Tessellator();
140
+ this.tessellator = options.fillTessellator ?? this.ownTessellator.tessellate;
141
+ this.width = options.width;
142
+ this.height = options.height;
143
+ this.resolution = options.resolution ?? 1;
144
+ this.background = options.background ?? 0xffffff;
145
+ this.transparent = options.transparent ?? false;
146
+ this.ownCanvas = !options.canvas;
147
+ this.canvas = options.canvas ?? document.createElement("canvas");
148
+ const gl = this.canvas.getContext("webgl2", {
149
+ alpha: this.transparent,
150
+ antialias: false,
151
+ depth: false,
152
+ premultipliedAlpha: true,
153
+ preserveDrawingBuffer: options.preserveDrawingBuffer ?? false,
154
+ stencil: true,
155
+ });
156
+ if (!gl) {
157
+ throw new Error("the renderer needs WebGL 2");
158
+ }
159
+ this.gl = gl;
160
+ this.backend = new WebGLBackend(gl);
161
+ this.samples = options.samples ?? 1;
162
+ this.textureLimit = gl.getParameter(gl.MAX_TEXTURE_SIZE);
163
+ this.lineCache = new LineCache(this.geometries, this.tessellator);
164
+ this.counts = this.lineCache.counts;
165
+ this.parts = new Parts(this.geometries, this.tessellator, this.lineCache);
166
+ this.textItems = new TextItems(this.geometries, this.textures, this.parts);
167
+ this.advancedTexts = new AdvancedTexts(this.geometries);
168
+ this.masks = new Masks(this.geometries, this.parts);
169
+ this.filterLayers = new FilterLayers(this.geometries, this.textures, this.keeps, this.paints);
170
+ this.planes = new Planes(this.geometries);
171
+ this.canvas.addEventListener("webglcontextlost", this.lost);
172
+ this.canvas.addEventListener("webglcontextrestored", this.restored);
173
+ this.resize(this.width, this.height, this.resolution);
174
+ }
175
+ /** A lost context is asked back, as Flash's player would have it, by preventing the default. */
176
+ lost = (event) => {
177
+ event.preventDefault();
178
+ };
179
+ /** The context came back: the backend made again, and every texture added again as it is drawn. */
180
+ restored = () => {
181
+ this.backend.restore(this.geometries);
182
+ this.textures.lost();
183
+ this.keeps.lost();
184
+ };
185
+ /**
186
+ * Whether bitmaps that ask to be are smoothed: not at the stage's low
187
+ * quality, nor in a draw for BitmapData at a sample a pixel.
188
+ */
189
+ get smoothing() {
190
+ return this.snapshotting ? this.scale > 1 : this.stageQuality !== "LOW";
191
+ }
192
+ /**
193
+ * Samples a pixel the stage and its blend and filter layers are
194
+ * multisampled with, as the GPU allows, 1 for none: Flash's anti-aliasing,
195
+ * which its host sets by the stage's quality, none at low whatever is set.
196
+ * A BitmapData's draw supersamples instead, as Flash's does.
197
+ */
198
+ get samples() {
199
+ return this.wantedSamples;
200
+ }
201
+ set samples(samples) {
202
+ this.wantedSamples = Math.max(1, Math.floor(samples) || 1);
203
+ this.backend.samples = this.stageQuality === "LOW" ? 1 : this.wantedSamples;
204
+ }
205
+ /** The samples the host asked for, which the stage's low quality sets aside (`samples`). */
206
+ wantedSamples = 1;
207
+ /** The stage's quality, "LOW" to "BEST", which will decide bitmaps' smoothing. */
208
+ get quality() {
209
+ return this.stageQuality;
210
+ }
211
+ set quality(quality) {
212
+ this.stageQuality = quality;
213
+ // Flash draws edges aliased at low, whatever samples the host asked for.
214
+ this.samples = this.wantedSamples;
215
+ }
216
+ /**
217
+ * The rectangle of the stage, from (x, y), the canvas shows: its size
218
+ * the canvas's (resize), in stage
219
+ * pixels, where a host's margins or alignment show more of the stage or
220
+ * less than its own.
221
+ */
222
+ setViewport(x, y, _width, _height) {
223
+ this.viewX = x;
224
+ this.viewY = y;
225
+ }
226
+ /** The stage's point the canvas's corner shows (setViewport). */
227
+ viewX = 0;
228
+ viewY = 0;
229
+ /** Canvas pixels a stage pixel (resize). */
230
+ get canvasResolution() {
231
+ return this.resolution;
232
+ }
233
+ /** How many geometries it keeps, which a page may check. */
234
+ get geometryCount() {
235
+ return this.geometries.count;
236
+ }
237
+ /** How many device texts' runs it keeps drawn (rasterized device text), which a page may check. */
238
+ get textRuns() {
239
+ return this.textItems.runCount;
240
+ }
241
+ /** The canvas made `width` by `height` stage pixels at `resolution` canvas pixels each. */
242
+ resize(width, height, resolution = this.resolution) {
243
+ this.width = width;
244
+ this.height = height;
245
+ this.resolution = resolution;
246
+ this.canvas.width = Math.max(1, Math.round(width * resolution));
247
+ this.canvas.height = Math.max(1, Math.round(height * resolution));
248
+ }
249
+ /** Draw `root`'s display list. */
250
+ render(root) {
251
+ this.scene.reset();
252
+ this.rows.reset();
253
+ this.filters.reset();
254
+ // The drawing buffer, which a browser may hold smaller than the canvas asks for.
255
+ const target = this.target;
256
+ target.width = this.gl.drawingBufferWidth;
257
+ target.height = this.gl.drawingBufferHeight;
258
+ target.scale = this.scale * this.resolution;
259
+ target.resolution = this.resolution;
260
+ // A pixel of the screen, where the host says what that is (screenScale).
261
+ target.pixel = this.screenScale ? target.scale / this.screenScale : 1;
262
+ // Outputs kept at another scale, with bitmaps smoothed otherwise or hairlines at another
263
+ // width, are drawn again.
264
+ if (target.scale !== this.keptScale ||
265
+ this.stageQuality !== this.keptQuality ||
266
+ this.screenScale !== this.keptScreen) {
267
+ this.keptScale = target.scale;
268
+ this.keptQuality = this.stageQuality;
269
+ this.keptScreen = this.screenScale;
270
+ this.keptGeneration++;
271
+ }
272
+ // The outlines' store started again between frames, before it fills: not in a walk, where the
273
+ // quads drawn before would name runs it let go of (text/saffron.ts, allowResets).
274
+ if (saffronStore.used > MOST * 0.75) {
275
+ resetSegments();
276
+ }
277
+ allowResets(false);
278
+ try {
279
+ this.walkFrom(root);
280
+ }
281
+ finally {
282
+ allowResets(true);
283
+ }
284
+ measureLayers(this.scene, this.rows, this.geometries, target);
285
+ this.filterLayers.noteKept(this.scene);
286
+ this.frames++;
287
+ plan(this.scene, this.transparent ? 0 : (0xff000000 | this.background) >>> 0, this.commands);
288
+ this.uploadOutlines();
289
+ this.backend.execute(this.commands, this.scene, this.rows, this.geometries, this.textures, this.filters, this.keeps, target);
290
+ this.geometries.endFrame();
291
+ this.textures.endFrame();
292
+ this.keeps.endFrame();
293
+ }
294
+ /**
295
+ * `o` and what is in it, under its parent's transform on the stage (a b
296
+ * c d tx ty) and colour transform. Masks are walked but not drawn, nor
297
+ * what is hidden; every object's flags are cleared, as the player
298
+ * expects of a renderer.
299
+ */
300
+ walk(o, tint, hidden) {
301
+ if (hidden) {
302
+ syncHidden(o, this.snapshotting);
303
+ return;
304
+ }
305
+ // Its parent's transform from the stack of them, where its own goes for its children: numbers
306
+ // a recursive call passed were boxed, six an object on every frame.
307
+ const depth = this.walkDepth++;
308
+ let places = this.places;
309
+ const at = depth * 6;
310
+ const pa = places[at];
311
+ const pb = places[at + 1];
312
+ const pc = places[at + 2];
313
+ const pd = places[at + 3];
314
+ const ptx = places[at + 4];
315
+ const pty = places[at + 5];
316
+ const root = o === this.drawRoot;
317
+ // An alpha mask drawn for what it masks is placed by its parent's slot alone (drawAlphaMask).
318
+ const placing = o === this.placedAlphaMask;
319
+ const m = root ? this.drawMatrix : placing ? IDENTITY : o.flatPlaced;
320
+ const a = pa * m.a + pc * m.b;
321
+ const b = pb * m.a + pd * m.b;
322
+ const c = pa * m.c + pc * m.d;
323
+ const d = pb * m.c + pd * m.d;
324
+ const tx = pa * m.tx + pc * m.ty + ptx;
325
+ const ty = pb * m.tx + pd * m.ty + pty;
326
+ // Its own after its parent's, where its rows and its children read it.
327
+ if (at + 12 > places.length) {
328
+ const grown = new Float64Array(places.length * 2);
329
+ grown.set(places);
330
+ this.places = grown;
331
+ places = grown;
332
+ }
333
+ places[at + 6] = a;
334
+ places[at + 7] = b;
335
+ places[at + 8] = c;
336
+ places[at + 9] = d;
337
+ places[at + 10] = tx;
338
+ places[at + 11] = ty;
339
+ if (!hidden && o.visible) {
340
+ noteUnsupported(o);
341
+ }
342
+ // What BitmapData.draw takes is drawn though hidden, or a mask.
343
+ hidden ||= !root && !placing && (!o.visible || o.maskOf !== null || o.clipDepth > 0);
344
+ // BitmapData.draw takes its object without its own colour transform, as adl draws it.
345
+ const own = root ? null : o.colorTransform;
346
+ // Into a slot of its depth's, which its subtree's walk alone reads: rows copy what they take.
347
+ let color = own ? (tint ? this.concatAt(depth, tint, own) : own) : tint;
348
+ // Its mask, drawn where it stands on the stage, then its scroll's rectangle, clip all it draws;
349
+ // a 3D mask, or one inside what it masks, masks nothing in Flash. A script's mask on the display
350
+ // list masks by its alpha where both are cached as bitmaps, as adl draws it (the `alpha-masks`
351
+ // case): what it masks drawn as a layer, the mask's own layer composited onto it by its alpha
352
+ // (drawAlphaMask). A timeline's masks clip by their shapes, cached or not (`alpha-masks-avm1`).
353
+ // One met while an alpha mask is drawn clips by its shape: two masks each holding what the other
354
+ // masks would otherwise draw each other without end.
355
+ let clipped = false;
356
+ let alphaMask = null;
357
+ // A 3D object's content is drawn into its bitmap (drawPlane), which a 2D mask clips there, in
358
+ // its pass, not its quad on the stage.
359
+ const plane = !hidden && !root && o.space !== null;
360
+ if (!hidden && !plane && o.mask) {
361
+ const mask = !o.maskOf && !o.mask.encloses(o) && !o.mask.space ? o.mask : null;
362
+ if (mask?.parent && !this.inAlphaMask && cached(o) && cached(mask)) {
363
+ alphaMask = mask;
364
+ }
365
+ else if (mask) {
366
+ const w = this.placedMask(mask);
367
+ const first = this.masks.maskBegin(this.scene);
368
+ this.masks.walkMask(this.scene, this.rows, this.snapshotting, mask, w.a, w.b, w.c, w.d, w.tx, w.ty, true);
369
+ this.masks.maskUse(this.scene, first);
370
+ clipped = true;
371
+ }
372
+ else {
373
+ unsupported.masks++;
374
+ }
375
+ }
376
+ // A blend mode draws it as a layer, composited onto what is below in its mode. An explicit
377
+ // layer with children colours their combined pixels, its own fills with them, which then take
378
+ // no colour of their own; without children, it colours each fill.
379
+ // A layer of no children is its fills, drawn as normal; a mode it has no blend for (a Pixel
380
+ // Bender shader's) is drawn as normal, and counted.
381
+ // BitmapData.draw takes its object with no blend mode, as with no transform or colour.
382
+ // A blend shader's mode names its kernel's chain of the frame's filters; "shader" with none is
383
+ // normal. A filtered object blends as the bitmap Flash keeps of it, over its whole rectangle.
384
+ const shading = !root && !hidden && o.blendMode === "shader";
385
+ const named = shading
386
+ ? o.blendShader
387
+ ? KERNEL +
388
+ this.filterLayers.kernelChain(o.blendShader, this.filters, BLEND, !plane && o.filters.length > 0)
389
+ : NORMAL
390
+ : root
391
+ ? NORMAL
392
+ : BLEND_NAMES.indexOf(o.blendMode);
393
+ if (named < 0 && !hidden) {
394
+ unsupported.blendModes++;
395
+ }
396
+ const childful = o instanceof Container && o.children.length > 0;
397
+ // A 3D object's layer is its bitmap already.
398
+ const mode = hidden || named < 0 || (named === LAYER && (!childful || plane)) ? NORMAL : named;
399
+ // Its filters draw it as a layer too, which they run over before its blend: adl filters the
400
+ // object, then blends what they make, in its colour from the stage down, as a bitmap of it. The
401
+ // 9-slice grid that reshapes what it draws itself (display/scale9.ts): its own, sliced as its
402
+ // morphs take their new ratios, so that its bounds are this frame's; or, for a Shape, its
403
+ // owner's, kept as the owner's children are walked, unless it is filtered, which adl draws as a
404
+ // bitmap of it, stretched whole (sliceFor). Masks are hidden, and draw unsliced; so does what
405
+ // BitmapData.draw takes, its Shapes by its grid too, which draws with no transform of its own.
406
+ const ownSlice = !hidden && o.scale9Grid && !root ? sliceDrawn(o) : null;
407
+ const slice = ownSlice ??
408
+ (!hidden &&
409
+ o instanceof ShapeObject &&
410
+ o.parent !== null &&
411
+ o.parent === this.sliceOwner &&
412
+ o.filters.length === 0
413
+ ? this.ownerSlice
414
+ : null);
415
+ // A 3D object's content is drawn in its own space into a bitmap, which its quad then places in
416
+ // perspective (drawPlane); its filters run in the bitmap, its blend on the quad.
417
+ const filtering = hidden || plane || o.filters.length === 0
418
+ ? null
419
+ : this.filterLayers.filterPlan(o, this.filterUnits, this.scale, this.drawRoot !== null);
420
+ // Its colour, which a 3D object's bitmap takes, all above it drawn into it.
421
+ const full = color;
422
+ // A ShaderFilter's kernel runs over Flash's bitmap of the object, of whole pixels.
423
+ const whole = !filtering?.whole
424
+ ? NO_WHOLE
425
+ : this.stageQuality === "LOW"
426
+ ? WHOLE_ALIASED
427
+ : WHOLE_SMOOTH;
428
+ let layerRow = -1;
429
+ let layer = -1;
430
+ let drawnFrom = 0;
431
+ let output = null;
432
+ // Its filters run before its alpha mask is applied, as Flash masks the bitmap they make: then in
433
+ // a layer of their own, composited as normal into the one the mask is, which takes its mode.
434
+ const wrapped = alphaMask !== null && filtering !== null;
435
+ const inner = wrapped ? NORMAL : mode;
436
+ if (wrapped) {
437
+ this.scene.layerBegin();
438
+ }
439
+ if (mode !== NORMAL || filtering || alphaMask) {
440
+ if (mode === LAYER || filtering) {
441
+ layerRow = color ? this.rows.add(1, 0, 0, 1, 0, 0, color) : -1;
442
+ color = null;
443
+ }
444
+ // What its filters made last, where nothing they ran on changed: composited again where it
445
+ // moved to, and all in it walked hidden, as Flash draws a filtered object's bitmap again.
446
+ // A blend shader's layer is composited anew each frame: a kept one's mode is a byte.
447
+ output =
448
+ filtering && !this.drawRoot && mode < KERNEL && !this.inAlphaMask
449
+ ? this.filterLayers.keptOutput(o, filtering, slice?.key ?? "", a, b, c, d, tx, ty, this.target, this.frames, this.keptGeneration, whole)
450
+ : null;
451
+ if (output?.reused) {
452
+ const k = output.handle;
453
+ const rect = this.filterLayers.keptRect;
454
+ this.scene.keptLayer(k.id, inner, layerRow, rect[0], rect[1], rect[2], rect[3]);
455
+ this.keeps.use(k.id);
456
+ hidden = true;
457
+ }
458
+ else {
459
+ // Over the rectangle of what is drawn in it, which measureLayers finds; its padding is set
460
+ // once its filters are fitted to that.
461
+ drawnFrom = this.scene.length;
462
+ const keep = output?.keeping ? output.handle.id : -1;
463
+ layer = this.scene.layerBegin(filtering ? 0 : -1, keep, whole);
464
+ }
465
+ }
466
+ // Drawn in its pass, which walked all in it, its flags cleared: walked here no further. Else
467
+ // walked hidden, to clear them.
468
+ const passed = plane && this.drawPlane(o, full, pa, pb, pc, pd, ptx, pty);
469
+ hidden ||= plane;
470
+ // Its scroll's rectangle clips what it draws, inside its layer.
471
+ const r = hidden ? null : o.scroll;
472
+ if (r) {
473
+ // A rectangle of no size clips everything, as an empty one does.
474
+ const width = Math.max(0, r.xMax - r.xMin);
475
+ const height = Math.max(0, r.yMax - r.yMin);
476
+ const first = this.masks.maskBegin(this.scene);
477
+ this.masks.rectMask(this.scene, this.rows, a, b, c, d, tx, ty, r.xMin, r.yMin, width, height);
478
+ this.masks.maskUse(this.scene, first);
479
+ }
480
+ // A shape takes a morph's new ratio as it is drawn, which its bounds and hit tests follow; one
481
+ // whose bitmap cache Flash shows stale draws what that shows (staleShape).
482
+ const shape = o instanceof ShapeObject
483
+ ? this.staleShapes.staleShape(o, hidden, this.snapshotting, a, b, c, d)
484
+ : null;
485
+ // adl culls drawTriangles' triangles as they turn on the screen, or in a BitmapData's draw.
486
+ const version = o.drawing ? o.drawing.version : 0;
487
+ const drawn = o.drawing
488
+ ? facing(o.drawing.layers, a * d - b * c < 0, version)
489
+ : (shape?.layers ?? null);
490
+ const layers = hidden || !drawn
491
+ ? null
492
+ : slice
493
+ ? sliceLayers(drawn, slice, ownSlice ? null : o.placed, version)
494
+ : drawn;
495
+ if (o.drawing && layers) {
496
+ this.parts.dropUndrawn(o, layers, version);
497
+ }
498
+ // A sliced line keeps the width it has in its owner's parent's space, as adl's does, times a
499
+ // Shape child's own scale; made as a stroked layer first needs it.
500
+ let lineBy = null;
501
+ let row = -1;
502
+ let lineRow = -1;
503
+ // Lines that scale both ways, stroked through the transform's settled stretch, which every
504
+ // angle and instance shares (display/stretch.ts), and placed by the rest of it.
505
+ let stretch;
506
+ let stretchRow = -1;
507
+ if (layers) {
508
+ // A pixel of the screen, in the stage's pixels: the least a line is wide.
509
+ const least = 1 / (this.screenScale ?? this.scale * this.resolution);
510
+ // Alpha left whole by the colour transform: a line's overlaps then draw nothing new.
511
+ const opaque = !color || color.aMul + color.aAdd / 255 >= 1;
512
+ // Read once for the object, not for each textured part.
513
+ const smoothing = this.smoothing;
514
+ for (let i = 0; i < layers.length; i++) {
515
+ for (const { part, handle } of this.parts.partsOf(layers[i], version)) {
516
+ // Kept while drawn, even with no texture yet: a layer let go of is tessellated again whole.
517
+ this.geometries.use(handle.id);
518
+ // A shader fill's draw names its kernel's chain of the frame's filters.
519
+ if (part.paint?.type === "shader") {
520
+ if (row < 0) {
521
+ row = this.rows.addPlaced(this.places, at + 6, color);
522
+ }
523
+ const chain = this.filterLayers.kernelChain(part.paint.use, this.filters, FILL_SHADER);
524
+ this.scene.draw(handle.id, row, NORMAL, chain, SHADED);
525
+ continue;
526
+ }
527
+ const textured = part.paint !== null || part.mesh !== null;
528
+ const texture = textured ? this.paints.paintTexture(part) : null;
529
+ if (textured && !texture) {
530
+ continue;
531
+ }
532
+ if (row < 0) {
533
+ row = this.rows.addPlaced(this.places, at + 6, color);
534
+ }
535
+ if (texture) {
536
+ this.textures.use(texture.id);
537
+ }
538
+ this.scene.draw(handle.id, row, NORMAL, texture?.id ?? -1, texture ? paintSampler(part, smoothing) : 0);
539
+ }
540
+ // The layer's lines after its fills: through its stretch where they scale both ways, else
541
+ // stroked in the stage's axes and placed by the translation alone.
542
+ if (layers[i].strokes.length === 0) {
543
+ continue;
544
+ }
545
+ if (slice && !lineBy) {
546
+ lineBy = ownSlice ? [pa, pb, pc, pd] : this.childLineSpace(o);
547
+ }
548
+ const even = !lineBy && this.lineCache.of(layers[i], version).even;
549
+ if (even && stretch === undefined) {
550
+ // Settled for the widest line of the object's layers that scale both ways (evenWidth).
551
+ let widest = 0;
552
+ for (let k = 0; k < layers.length; k++) {
553
+ widest = Math.max(widest, this.lineCache.of(layers[k], version).width);
554
+ }
555
+ const m = this.stretchScratch;
556
+ m[0] = a;
557
+ m[1] = b;
558
+ m[2] = c;
559
+ m[3] = d;
560
+ stretch = stretchOf(m, m);
561
+ stretch = stretch && settledStretch(stretch, widest, least, stretch);
562
+ }
563
+ const by = even ? stretch : null;
564
+ const lines = by
565
+ ? this.lineCache.take(layers[i], version, by[0], by[1], by[2], by[3], least, null, opaque)
566
+ : this.lineCache.take(layers[i], version, a, b, c, d, least, lineBy, opaque);
567
+ if (!lines) {
568
+ continue;
569
+ }
570
+ if (by && stretchRow < 0) {
571
+ // m s⁻¹, s symmetric: what turns and mirrors the stretched lines into place.
572
+ const det = by[0] * by[3] - by[1] * by[1];
573
+ const n0 = by[3] / det;
574
+ const n1 = -by[1] / det;
575
+ const n3 = by[0] / det;
576
+ stretchRow = this.rows.add(a * n0 + c * n1, b * n0 + d * n1, a * n1 + c * n3, b * n1 + d * n3, tx, ty, color);
577
+ }
578
+ else if (!by && lineRow < 0) {
579
+ lineRow = this.rows.addTranslated(this.places, at + 6, color);
580
+ }
581
+ this.geometries.use(lines.id);
582
+ this.scene.draw(lines.id, by ? stretchRow : lineRow, NORMAL);
583
+ }
584
+ }
585
+ if (!hidden && (o instanceof TextObject || o instanceof StaticTextObject)) {
586
+ const omitted = { advanced: false, clip: null, clipFrom: 0, clipTo: 0 };
587
+ const items = o instanceof TextObject ? fieldItems(o, omitted) : staticItems(o, omitted);
588
+ // Its embedded glyphs as Saffron draws them, all in one geometry drawn where the first of
589
+ // them was, else as normal text.
590
+ // In a 3D object's bitmap, whose pixels are not the stage's, as normal text.
591
+ const advanced = omitted.advanced && !this.planes.inPass
592
+ ? this.advancedTexts.advancedText(o, a, b, c, d, this.target, this.drawRoot !== null)
593
+ : null;
594
+ if (omitted.advanced && !advanced) {
595
+ unsupported.advancedTexts++;
596
+ }
597
+ let glyphsDrawn = false;
598
+ let glyph = 0;
599
+ let normal = 0;
600
+ // Device text as sharp as the text is shown: canvas pixels a stage pixel, at its stretch.
601
+ const resolution = o instanceof TextObject && !o.embedFonts
602
+ ? deviceTextResolution([a, b, c, d], this.scale * this.resolution)
603
+ : 1;
604
+ // Its text, where it runs over, clipped inside the gutter; its box and caret are not.
605
+ const clip = omitted.clip;
606
+ for (let k = 0; k < items.length; k++) {
607
+ if (clip && k === omitted.clipFrom) {
608
+ const first = this.masks.maskBegin(this.scene);
609
+ this.masks.rectMask(this.scene, this.rows, a, b, c, d, tx, ty, clip.x, clip.y, clip.width, clip.height);
610
+ this.masks.maskUse(this.scene, first);
611
+ }
612
+ // A glyph whose tables found no room among Saffron's is drawn as normal text.
613
+ const item = items[k];
614
+ let drawnNormal = false;
615
+ if (advanced && item.kind === "glyph") {
616
+ drawnNormal = advanced.normal[normal] === glyph;
617
+ normal += drawnNormal ? 1 : 0;
618
+ glyph++;
619
+ }
620
+ if (!advanced || item.kind !== "glyph" || drawnNormal) {
621
+ this.textItems.drawTextItem(this.scene, this.rows, item, a, b, c, d, tx, ty, color, resolution);
622
+ }
623
+ else if (!glyphsDrawn && advanced.handle) {
624
+ glyphsDrawn = true;
625
+ this.geometries.use(advanced.handle.id);
626
+ this.scene.draw(advanced.handle.id, placedRow(this.rows, a, b, c, d, tx, ty, advanced.m, color), NORMAL);
627
+ }
628
+ if (clip && k === omitted.clipTo - 1) {
629
+ this.masks.popMask(this.scene);
630
+ }
631
+ }
632
+ }
633
+ const store = o instanceof BitmapObject && !hidden ? o.store : null;
634
+ if (store && !store.disposed && store.width > 0 && store.height > 0) {
635
+ const quad = this.parts.quad(store.width, store.height);
636
+ const texture = this.paints.storeTexture(store);
637
+ const moved = wholePixels(this.places, at + 6, this.target.scale / this.target.pixel, this.moved);
638
+ if (moved) {
639
+ row = this.rows.addPlaced(this.moved, 0, color);
640
+ }
641
+ else if (row < 0) {
642
+ row = this.rows.addPlaced(this.places, at + 6, color);
643
+ }
644
+ this.geometries.use(quad.id);
645
+ this.textures.use(texture.id);
646
+ const smooth = !moved && o.smoothing && this.smoothing;
647
+ this.scene.draw(quad.id, row, NORMAL, texture.id, (smooth ? SMOOTH : 0) | CLAMP);
648
+ }
649
+ if (o instanceof Container && !passed) {
650
+ // A timeline's clip layer clips the children after it, up to its clip depth: kept track of
651
+ // only where a child is one, as most containers have none.
652
+ const children = o.children;
653
+ let clips = null;
654
+ let open = 0;
655
+ // A sliced owner's Shapes are sliced by its grid, their lines as wide as in its parent's space.
656
+ const owner = this.sliceOwner;
657
+ const ownerSlice = this.ownerSlice;
658
+ const ownerParent = this.ownerParent;
659
+ this.sliceOwner = ownSlice ? o : null;
660
+ this.ownerSlice = ownSlice;
661
+ if (ownSlice) {
662
+ this.ownerParent = [pa, pb, pc, pd];
663
+ }
664
+ for (let i = 0; i < children.length; i++) {
665
+ const child = children[i];
666
+ if (!clips && child.clipDepth > 0) {
667
+ clips = new Clips();
668
+ }
669
+ if (clips) {
670
+ const n = clips.enter(child);
671
+ for (; open > n; open--) {
672
+ this.masks.popMask(this.scene);
673
+ }
674
+ }
675
+ if (child.clipDepth > 0 && !hidden) {
676
+ const first = this.masks.maskBegin(this.scene);
677
+ this.masks.walkMask(this.scene, this.rows, this.snapshotting, child, a, b, c, d, tx, ty, false);
678
+ this.masks.maskUse(this.scene, first);
679
+ open++;
680
+ continue;
681
+ }
682
+ this.walk(child, color, hidden);
683
+ }
684
+ this.sliceOwner = owner;
685
+ this.ownerSlice = ownerSlice;
686
+ this.ownerParent = ownerParent;
687
+ for (; open > 0; open--) {
688
+ this.masks.popMask(this.scene);
689
+ }
690
+ if (!this.snapshotting) {
691
+ o.descendantsDirty = false;
692
+ }
693
+ }
694
+ if (r) {
695
+ this.masks.popMask(this.scene);
696
+ }
697
+ if (output?.reused) {
698
+ // Composited again already.
699
+ }
700
+ else if (filtering) {
701
+ const fitted = this.filterLayers.fitFilters(o, filtering, drawnFrom, this.scene, this.rows, this.target, this.resolution, this.scale, this.drawRoot !== null, this.textureLimit);
702
+ this.scene.padLayer(layer, fitted.padding);
703
+ this.scene.layerEnd(inner, layerRow, this.filterLayers.chainOf(fitted, this.filters));
704
+ if (output) {
705
+ output.pad = fitted.padding;
706
+ this.filterLayers.ranLayer(output, layer);
707
+ }
708
+ }
709
+ if (alphaMask) {
710
+ this.drawAlphaMask(alphaMask);
711
+ this.scene.layerEnd(mode, wrapped ? -1 : layerRow);
712
+ }
713
+ else if (!filtering && mode !== NORMAL) {
714
+ this.scene.layerEnd(mode, layerRow);
715
+ }
716
+ if (clipped) {
717
+ this.masks.popMask(this.scene);
718
+ }
719
+ this.walkDepth--;
720
+ // A draw for BitmapData leaves them for the stage's.
721
+ if (!this.snapshotting) {
722
+ o.dirty = CLEAN;
723
+ }
724
+ }
725
+ /**
726
+ * `mask`, an alpha mask, drawn into a layer of its own as it would be
727
+ * drawn where it stands on the stage, though it is a mask: in its colour
728
+ * and its ancestors', its filters run, from a slot of the walk's above
729
+ * the object it masks. The layer is composited onto that object's
730
+ * (ALPHA_MASK), which ends after it.
731
+ */
732
+ drawAlphaMask(mask) {
733
+ const w = this.placedMask(mask);
734
+ const depth = this.walkDepth;
735
+ const at = depth + 1;
736
+ if ((at + 2) * 6 > this.places.length) {
737
+ const grown = new Float64Array(this.places.length * 2);
738
+ grown.set(this.places);
739
+ this.places = grown;
740
+ }
741
+ const places = this.places;
742
+ places[at * 6] = w.a;
743
+ places[at * 6 + 1] = w.b;
744
+ places[at * 6 + 2] = w.c;
745
+ places[at * 6 + 3] = w.d;
746
+ places[at * 6 + 4] = w.tx;
747
+ places[at * 6 + 5] = w.ty;
748
+ const placed = this.placedAlphaMask;
749
+ const inMask = this.inAlphaMask;
750
+ this.walkDepth = at;
751
+ this.placedAlphaMask = mask;
752
+ this.inAlphaMask = true;
753
+ this.scene.layerBegin();
754
+ this.walk(mask, ancestorsColor(mask), false);
755
+ this.scene.layerEnd(ALPHA_MASK, -1);
756
+ this.placedAlphaMask = placed;
757
+ this.inAlphaMask = inMask;
758
+ this.walkDepth = depth;
759
+ }
760
+ /**
761
+ * The linear transform a Shape child of a sliced owner draws its lines
762
+ * as wide through: the owner's parent's, kept as the owner's children
763
+ * are walked, times its own matrix.
764
+ */
765
+ childLineSpace(o) {
766
+ const q = this.ownerParent;
767
+ const m = o.matrix;
768
+ return [
769
+ q[0] * m.a + q[2] * m.b,
770
+ q[1] * m.a + q[3] * m.b,
771
+ q[0] * m.c + q[2] * m.d,
772
+ q[1] * m.c + q[3] * m.d,
773
+ ];
774
+ }
775
+ /** `o` walked from the stage's origin, untinted; the stage's, moved by its viewport. */
776
+ walkFrom(o) {
777
+ this.walkDepth = 0;
778
+ this.places.set(UNIT_PLACE);
779
+ if (!this.drawRoot) {
780
+ this.places[4] = -this.viewX;
781
+ this.places[5] = -this.viewY;
782
+ }
783
+ this.walk(o, null, false);
784
+ }
785
+ /** `parent` and `child` concatenated into depth `depth`'s colour slot, made once and kept. */
786
+ concatAt(depth, parent, child) {
787
+ let slot = this.colorSlots[depth];
788
+ if (!slot) {
789
+ slot = { ...IDENTITY_COLOR };
790
+ this.colorSlots[depth] = slot;
791
+ }
792
+ return concatColorInto(slot, parent, child);
793
+ }
794
+ /**
795
+ * A 3D object drawn as Flash draws it (display/plane.ts): what it and its
796
+ * children draw, in its own space, a texel a pixel at `samples` a side
797
+ * and averaged down, into a bitmap kept as a kept output, in a pass of
798
+ * its own before the frame's (drawPlaneContent), in its colour `full`,
799
+ * filtered; then the bitmap's quad, placed by its plane in its parent's
800
+ * space (a b c d tx ty on the stage), smoothed at each pixel of Flash's.
801
+ * The bitmap is kept while nothing it holds changes (unchanged). Nothing
802
+ * where its quad has a corner behind the eye, or it draws nothing, or a
803
+ * 3D object masks it, which leaves nothing of it in Flash. Whether all in
804
+ * it was walked, or needs no walk, its flags clear.
805
+ */
806
+ drawPlane(o, full, a, b, c, d, tx, ty) {
807
+ if (o.mask?.space) {
808
+ return false;
809
+ }
810
+ // Counted in another's bitmap, placed by what moves with all above it.
811
+ this.planes.place();
812
+ // What it draws, measured again only where something in it may have changed.
813
+ const k = this.planes.state(o);
814
+ const unchanged = planeUnchanged(o, k, this.frames, this.snapshotting);
815
+ const rect = unchanged && k.rect ? k.rect : drawnRect(o);
816
+ const quad = this.planes.quad;
817
+ if (!rect ||
818
+ !placeQuad(o.placed, rect.x, rect.y, rect.x + rect.width, rect.y + rect.height, quad)) {
819
+ return false;
820
+ }
821
+ const { samples, texels } = bitmapScale(quad.width, quad.height, this.textureLimit);
822
+ const width = Math.max(1, Math.ceil(quad.width * texels));
823
+ const height = Math.max(1, Math.ceil(quad.height * texels));
824
+ // Let go of on the first frame it is not drawn: one not drawn on the frame before is drawn
825
+ // anew, and a timeline makes 3D objects anew as it plays. BitmapData.draw's apart, in its
826
+ // colour and at its quality, which the stage's bitmap must not take.
827
+ const keeps = this.snapshotting ? this.planes.drawnBitmaps : this.planes.keptBitmaps;
828
+ let keep = keeps.get(o);
829
+ const alive = keep !== undefined && this.keeps.alive(keep);
830
+ if (!keep || !alive) {
831
+ keep = this.keeps.add(0);
832
+ keeps.set(o, keep);
833
+ }
834
+ this.keeps.use(keep.id);
835
+ // Its quad, made before its content's pass, in which a 3D object inside it works out its own in
836
+ // `quad`.
837
+ const handle = this.planes.quadGeometry(o, width, height);
838
+ this.geometries.use(handle.id);
839
+ const row = this.rows.add(a, b, c, d, tx, ty, null);
840
+ const left = quad.x;
841
+ const top = quad.y;
842
+ // Its bitmap kept where it holds what it would draw now: nothing in it has a flag to clear.
843
+ const same = alive &&
844
+ unchanged &&
845
+ k.generation === this.keptGeneration &&
846
+ k.mask === o.mask &&
847
+ (!o.mask || o.encloses(o.mask)) &&
848
+ k.left === left &&
849
+ k.top === top &&
850
+ k.texels === texels &&
851
+ k.samples === samples &&
852
+ k.width === width &&
853
+ k.height === height &&
854
+ (full ? k.colored && sameColor(k.color, full) : !k.colored);
855
+ if (!same) {
856
+ k.unkeepable = this.drawPlaneContent(o, full, left, top, texels, samples, width, height, keep.id);
857
+ }
858
+ if (!this.snapshotting) {
859
+ k.seenAt = this.frames;
860
+ k.generation = this.keptGeneration;
861
+ k.rect = rect;
862
+ k.scrolled = o.scroll !== null;
863
+ k.filters = o.filters;
864
+ k.mask = o.mask;
865
+ k.left = left;
866
+ k.top = top;
867
+ k.texels = texels;
868
+ k.samples = samples;
869
+ k.width = width;
870
+ k.height = height;
871
+ k.colored = full !== null;
872
+ if (full) {
873
+ Object.assign(k.color, full);
874
+ }
875
+ }
876
+ this.scene.draw(handle.id, row, NORMAL, keep.id, PLANE);
877
+ return true;
878
+ }
879
+ /**
880
+ * A 3D object's content drawn into its bitmap, kept as kept output `keep`:
881
+ * walked with the object as the root of a pass of its own, as
882
+ * BitmapData.draw walks its object, placed by its own space's pixels from
883
+ * the bitmap's corner (left, top) at `texels` a pixel, at `samples` target pixels
884
+ * each, with lists of its own, which a 3D object in it nests in again.
885
+ */
886
+ drawPlaneContent(o, full, left, top, texels, samples, width, height, keep) {
887
+ const pass = this.planes.enter();
888
+ const outer = this.passState();
889
+ const target = {
890
+ width: width * samples,
891
+ height: height * samples,
892
+ scale: samples,
893
+ x: 0,
894
+ y: 0,
895
+ resolution: 1,
896
+ pixel: samples,
897
+ };
898
+ this.scene = pass.scene;
899
+ this.rows = pass.rows;
900
+ this.filters = pass.filters;
901
+ this.commands = pass.commands;
902
+ this.target = target;
903
+ this.scale = samples;
904
+ // Filters at the bitmap's units of the object's pixels, which a large object has fewer of.
905
+ this.filterUnits = samples * texels;
906
+ this.resolution = 1;
907
+ this.screenScale = 1;
908
+ this.drawRoot = o;
909
+ // Its scroll's rectangle at its bitmap's origin, as its bounds have it.
910
+ const m = { a: texels, b: 0, c: 0, d: texels, tx: -left * texels, ty: -top * texels };
911
+ this.drawMatrix = o.scroll ? shifted(m, o.scroll) : m;
912
+ this.sliceOwner = null;
913
+ this.ownerSlice = null;
914
+ let placed = false;
915
+ try {
916
+ this.scene.reset();
917
+ this.rows.reset();
918
+ this.filters.reset();
919
+ // A walk from a slot of its own above the object's own in the frame's, as from the stage's
920
+ // origin.
921
+ const at = this.walkDepth + 1;
922
+ this.walkDepth = at;
923
+ if ((at + 2) * 6 > this.places.length) {
924
+ const grown = new Float64Array(this.places.length * 2);
925
+ grown.set(this.places);
926
+ this.places = grown;
927
+ }
928
+ this.places.set(UNIT_PLACE, at * 6);
929
+ this.walk(o, full, false);
930
+ measureLayers(this.scene, this.rows, this.geometries, target);
931
+ plan(this.scene, 0, this.commands);
932
+ this.backend.drawPlane(keep, this.commands, this.scene, this.rows, this.geometries, this.textures, this.filters, this.keeps, target, width, height, samples);
933
+ }
934
+ finally {
935
+ placed = this.planes.leave();
936
+ this.restorePass(outer);
937
+ }
938
+ return placed;
939
+ }
940
+ /** What advanced text's quads name of the outlines' store, uploaded. */
941
+ uploadOutlines() {
942
+ this.backend.uploadOutlines(saffronStore.data, saffronStore.used, saffronStore.epoch);
943
+ }
944
+ /**
945
+ * `o` drawn alone, as BitmapData.draw takes a display object, through `m`
946
+ * into a `width` by `height` bitmap, read back as premultiplied ARGB: at
947
+ * `samples` a side and averaged, as Flash covers edges (4 at its high
948
+ * quality). Built at the draw's own
949
+ * scale, a hairline a pixel of the bitmap, then drawn `samples` times
950
+ * larger, filters and device text at that many units a pixel; no flag of
951
+ * any object is cleared, nor an output kept, which are the stage's.
952
+ */
953
+ snapshot(o, m, width, height, samples = 4) {
954
+ const pixels = this.drawAlone(o, m, width, height, samples, (n) => argbOf(this.backend.snapshot(this.commands, this.scene, this.rows, this.geometries, this.textures, this.filters, this.keeps, this.target, width, height, n)));
955
+ return pixels ?? new Uint32Array(Math.max(0, width * height));
956
+ }
957
+ /**
958
+ * `o` drawn as `snapshot` draws it, then composited source over into
959
+ * `store` at (x, y) on the GPU, into the store's texture, where it stays
960
+ * till a script reads the pixels (Paints): nothing is read back, nor the
961
+ * store uploaded again to show it. Not for a store too large for a
962
+ * texture, nor an opaque one holding alpha, whose pixels read two ways
963
+ * (BitmapStore.holdsAlpha); false, having drawn nothing, for those.
964
+ */
965
+ drawInto(store, o, m, x, y, width, height, samples) {
966
+ if (store.disposed ||
967
+ store.holdsAlpha ||
968
+ Math.max(store.width, store.height) > this.textureLimit ||
969
+ this.gl.isContextLost()) {
970
+ return false;
971
+ }
972
+ const handle = this.paints.storeTexture(store);
973
+ const drawn = this.drawAlone(o, m, width, height, samples, (n) => this.backend.drawIntoTexture(this.commands, this.scene, this.rows, this.geometries, this.textures, this.filters, this.keeps, this.target, width, height, n, handle.id, x, y, !store.transparent));
974
+ if (!drawn) {
975
+ return false;
976
+ }
977
+ this.paints.drawn(store);
978
+ return true;
979
+ }
980
+ /**
981
+ * `o` walked and planned alone, through `m` into a `width` by `height`
982
+ * bitmap at `samples` a side, as few as a texture holds, then `draw`n
983
+ * with the samples taken; null for a size no texture holds.
984
+ */
985
+ drawAlone(o, m, width, height, samples, draw) {
986
+ // As many samples as a texture holds, halved as BitmapData.draw's are.
987
+ let n = Math.max(1, samples);
988
+ while (n > 1 && Math.max(width, height) * n > this.textureLimit) {
989
+ n /= 2;
990
+ }
991
+ if (width <= 0 || height <= 0 || Math.max(width, height) > this.textureLimit) {
992
+ return null;
993
+ }
994
+ const stage = this.passState();
995
+ this.target = {
996
+ width: width * n,
997
+ height: height * n,
998
+ scale: n,
999
+ x: 0,
1000
+ y: 0,
1001
+ resolution: 1,
1002
+ pixel: n,
1003
+ };
1004
+ this.scale = n;
1005
+ this.resolution = 1;
1006
+ this.screenScale = 1;
1007
+ this.drawRoot = o;
1008
+ this.snapshotting = true;
1009
+ this.drawMatrix = o.scroll ? shifted(m, o.scroll) : m;
1010
+ try {
1011
+ this.scene.reset();
1012
+ this.rows.reset();
1013
+ this.filters.reset();
1014
+ if (saffronStore.used > MOST * 0.75) {
1015
+ resetSegments();
1016
+ }
1017
+ allowResets(false);
1018
+ this.walkFrom(o);
1019
+ measureLayers(this.scene, this.rows, this.geometries, this.target);
1020
+ plan(this.scene, 0, this.commands);
1021
+ this.uploadOutlines();
1022
+ return draw(n);
1023
+ }
1024
+ finally {
1025
+ allowResets(true);
1026
+ this.restorePass(stage);
1027
+ }
1028
+ }
1029
+ /**
1030
+ * What a pass of its own, BitmapData.draw's or a 3D object's bitmap's,
1031
+ * swaps out of the walk, for it to be put back (restorePass).
1032
+ */
1033
+ passState() {
1034
+ return {
1035
+ scene: this.scene,
1036
+ rows: this.rows,
1037
+ filters: this.filters,
1038
+ commands: this.commands,
1039
+ target: this.target,
1040
+ scale: this.scale,
1041
+ filterUnits: this.filterUnits,
1042
+ resolution: this.resolution,
1043
+ screenScale: this.screenScale,
1044
+ drawRoot: this.drawRoot,
1045
+ drawMatrix: this.drawMatrix,
1046
+ snapshotting: this.snapshotting,
1047
+ walkDepth: this.walkDepth,
1048
+ sliceOwner: this.sliceOwner,
1049
+ ownerSlice: this.ownerSlice,
1050
+ };
1051
+ }
1052
+ restorePass(s) {
1053
+ this.scene = s.scene;
1054
+ this.rows = s.rows;
1055
+ this.filters = s.filters;
1056
+ this.commands = s.commands;
1057
+ this.target = s.target;
1058
+ this.scale = s.scale;
1059
+ this.filterUnits = s.filterUnits;
1060
+ this.resolution = s.resolution;
1061
+ this.screenScale = s.screenScale;
1062
+ this.drawRoot = s.drawRoot;
1063
+ this.drawMatrix = s.drawMatrix;
1064
+ this.snapshotting = s.snapshotting;
1065
+ this.walkDepth = s.walkDepth;
1066
+ this.sliceOwner = s.sliceOwner;
1067
+ this.ownerSlice = s.ownerSlice;
1068
+ }
1069
+ /**
1070
+ * Where a mask is drawn: on the stage, or, in a draw for BitmapData, in
1071
+ * the bitmap, where it stands to what is drawn as it stands on the stage.
1072
+ */
1073
+ placedMask(mask) {
1074
+ const root = this.drawRoot;
1075
+ // In a 3D object's bitmap by the matrices up to it, or Flash's rule for one outside it.
1076
+ if (root && this.planes.inPass) {
1077
+ return this.planeMask(root, mask);
1078
+ }
1079
+ const onStage = toStageFlat(mask);
1080
+ if (!root) {
1081
+ // Moved by the viewport, as the stage's walk is (walkFrom).
1082
+ return this.viewX === 0 && this.viewY === 0
1083
+ ? onStage
1084
+ : { ...onStage, tx: onStage.tx - this.viewX, ty: onStage.ty - this.viewY };
1085
+ }
1086
+ // One drawn through no inverse, scaled to nothing on the stage, has no place to measure the mask
1087
+ // from: it masks as it stands on the stage.
1088
+ const rootInverse = invert(toStageFlat(root));
1089
+ return rootInverse ? concat(concat(onStage, rootInverse), this.drawMatrix) : onStage;
1090
+ }
1091
+ /**
1092
+ * Where a mask is drawn in the bitmap of `o`, a 3D object, the root of its
1093
+ * bitmap's pass: one in the object by its matrices up to it; one outside
1094
+ * it by Flash's rule for that (display/plane.ts, outsideMaskMap).
1095
+ */
1096
+ planeMask(o, mask) {
1097
+ let m;
1098
+ if (o.encloses(mask)) {
1099
+ m = mask.flatPlaced;
1100
+ for (let p = mask.parent; p && p !== o; p = p.parent) {
1101
+ m = concat(m, p.flatPlaced);
1102
+ }
1103
+ }
1104
+ else {
1105
+ m = outsideMaskMap(o, mask);
1106
+ this.planes.place();
1107
+ }
1108
+ return concat(m, this.drawMatrix);
1109
+ }
1110
+ /** The mouse, touches and wheel on the canvas to `player`'s stage (pointer.ts); what undoes it. */
1111
+ bindPointer(player) {
1112
+ // The stage the canvas shows, read as each event comes: the host may zoom the view.
1113
+ const view = this;
1114
+ return bindCanvasPointer(this.canvas, player, {
1115
+ get bounds() {
1116
+ const k = view.scale * view.resolution;
1117
+ return {
1118
+ x: view.viewX,
1119
+ y: view.viewY,
1120
+ width: view.canvas.width / k,
1121
+ height: view.canvas.height / k,
1122
+ };
1123
+ },
1124
+ });
1125
+ }
1126
+ /** What the view made on its context let go of, the context with it if the canvas is its own, and its tessellator. */
1127
+ destroy() {
1128
+ this.canvas.removeEventListener("webglcontextlost", this.lost);
1129
+ this.canvas.removeEventListener("webglcontextrestored", this.restored);
1130
+ this.backend.destroy();
1131
+ this.releaseOutlines();
1132
+ this.ownTessellator?.dispose();
1133
+ if (this.ownCanvas && !this.gl.isContextLost()) {
1134
+ this.gl.getExtension("WEBGL_lose_context")?.loseContext();
1135
+ }
1136
+ }
1137
+ }
1138
+ /** Count what `o` asks of the renderer that it does not draw yet (shapes.ts, unsupported). */
1139
+ function noteUnsupported(o) {
1140
+ if (o.filters.length > 0 && undrawnFilter(o.filters)) {
1141
+ unsupported.filters++;
1142
+ }
1143
+ }
1144
+ /**
1145
+ * Whether the placement at `places[at]` only moves a Bitmap, at `unit` of
1146
+ * Flash's pixels a stage pixel; if so, `out` is it moved onto whole pixels
1147
+ * of Flash's. Flash draws such a bitmap texel for pixel, smoothed or not,
1148
+ * on the pixel its twips round to, a fraction of 8 twips (0.4 of a pixel)
1149
+ * or more up (the bitmap-sampling case, drawn in adl).
1150
+ */
1151
+ function wholePixels(places, at, unit, out) {
1152
+ if (places[at + 1] !== 0 ||
1153
+ places[at + 2] !== 0 ||
1154
+ Math.abs(places[at] * unit - 1) > 1e-9 ||
1155
+ Math.abs(places[at + 3] * unit - 1) > 1e-9) {
1156
+ return false;
1157
+ }
1158
+ out[0] = places[at];
1159
+ out[1] = 0;
1160
+ out[2] = 0;
1161
+ out[3] = places[at + 3];
1162
+ out[4] = Math.floor((Math.round(places[at + 4] * unit * 20) + 12) / 20) / unit;
1163
+ out[5] = Math.floor((Math.round(places[at + 5] * unit * 20) + 12) / 20) / unit;
1164
+ return true;
1165
+ }
1166
+ /** Where `o` stands on the stage, its matrices as the walk takes them, after their scroll's shift. */
1167
+ function toStageFlat(o) {
1168
+ let m = o.flatPlaced;
1169
+ for (let p = o.parent; p; p = p.parent) {
1170
+ m = concat(m, p.flatPlaced);
1171
+ }
1172
+ return m;
1173
+ }
1174
+ /** The colour `o`'s ancestors give what it draws, as the walk concatenates it; null for none. */
1175
+ function ancestorsColor(o) {
1176
+ let color = null;
1177
+ for (let p = o.parent; p; p = p.parent) {
1178
+ const own = p.colorTransform;
1179
+ if (own) {
1180
+ color = color ? concatColor(own, color) : own;
1181
+ }
1182
+ }
1183
+ return color;
1184
+ }
1185
+ //# sourceMappingURL=view.js.map