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