swf2js 0.1.2 → 0.4.0
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/README.md +81 -14
- package/package.json +11 -7
- package/studio/actionscript-roundtrip.test.js +54 -0
- package/studio/actionscript-scripts.test.js +169 -0
- package/studio/animated-image.test.js +137 -0
- package/studio/arithmetic.test.js +16 -0
- package/studio/as3-import.test.js +110 -0
- package/studio/audio-info.test.js +44 -0
- package/studio/components.test.js +152 -0
- package/studio/document-editing.test.js +92 -0
- package/studio/examples/01-space-mission.json +1628 -0
- package/studio/examples/02-clockwork-vault.json +1079 -0
- package/studio/examples/03-neon-synth.json +1364 -0
- package/studio/examples/04-kinetic-poster.json +923 -0
- package/studio/examples/05-signal-relay.json +1131 -0
- package/studio/examples/06-calculator.json +564 -0
- package/studio/frame-editing.test.js +129 -0
- package/studio/frame-events.test.js +117 -0
- package/studio/groups.test.js +88 -0
- package/studio/index.html +962 -0
- package/studio/interaction-triggers.test.js +37 -0
- package/studio/linked-actions.test.js +48 -0
- package/studio/lottie.test.js +208 -0
- package/studio/masks.test.js +43 -0
- package/studio/media-assets.test.js +62 -0
- package/studio/paint-tools.test.js +60 -0
- package/studio/playback.test.js +17 -0
- package/studio/project-io.test.js +405 -0
- package/studio/project-preview.test.js +475 -0
- package/studio/scene-transition.test.js +32 -0
- package/studio/server/archive-companions.js +27 -0
- package/studio/server/as3-library.js +91 -0
- package/studio/server/assets.js +162 -0
- package/studio/server/audio-info.js +82 -0
- package/studio/server/font-files.js +332 -0
- package/studio/server/http.js +135 -0
- package/studio/server/linked-actions.js +93 -0
- package/studio/server/png-decode.js +1 -0
- package/studio/server/project-movie.js +1164 -0
- package/studio/server/project-preview.js +152 -0
- package/studio/server/projects.js +370 -0
- package/studio/server/report.js +29 -0
- package/studio/server/routes.js +93 -0
- package/studio/server/swf-authoring.js +90 -0
- package/studio/server/swf-control-runtime.as +513 -0
- package/studio/server/swf-controls.js +119 -0
- package/studio/server/swf-export.js +293 -0
- package/studio/server/swf-import.js +1675 -0
- package/studio/server/swf-morphs.js +64 -0
- package/studio/server/swf-routes.js +42 -0
- package/studio/server/swf-streams.js +80 -0
- package/studio/server/swf-transition-runtime.as +52 -0
- package/studio/server/tween-recovery.js +106 -0
- package/studio/server-api.test.js +283 -0
- package/studio/server.js +320 -0
- package/studio/src/animated-image.js +423 -0
- package/studio/src/appearance-inspector.js +63 -0
- package/studio/src/arithmetic.js +50 -0
- package/studio/src/authored-controls.js +42 -0
- package/studio/src/busy.js +41 -0
- package/studio/src/canvas.js +430 -0
- package/studio/src/clipper-browser.js +2 -0
- package/studio/src/color-transform.js +38 -0
- package/studio/src/component-inspector.js +126 -0
- package/studio/src/components.js +268 -0
- package/studio/src/display-frame.js +262 -0
- package/studio/src/document-editing.js +69 -0
- package/studio/src/event-editor.js +150 -0
- package/studio/src/frame-editing.js +150 -0
- package/studio/src/frame-events.js +128 -0
- package/studio/src/frame-image.js +28 -0
- package/studio/src/groups.js +125 -0
- package/studio/src/handler-editor.js +122 -0
- package/studio/src/history.js +83 -0
- package/studio/src/imported-paths.js +99 -0
- package/studio/src/index.js +3582 -0
- package/studio/src/interaction-triggers.js +42 -0
- package/studio/src/json-patch.js +77 -0
- package/studio/src/layer-icons.js +25 -0
- package/studio/src/lottie-export.js +948 -0
- package/studio/src/lottie-import.js +1138 -0
- package/studio/src/masks.js +69 -0
- package/studio/src/media-assets.js +188 -0
- package/studio/src/media-library.js +193 -0
- package/studio/src/model.js +431 -0
- package/studio/src/numeric-fields.js +46 -0
- package/studio/src/object-list.js +57 -0
- package/studio/src/paint-tools.js +76 -0
- package/studio/src/placement-effects.js +74 -0
- package/studio/src/playback.js +10 -0
- package/studio/src/preview-audio.js +64 -0
- package/studio/src/preview-interactions.js +106 -0
- package/studio/src/preview-recorder.js +335 -0
- package/studio/src/preview-surface.js +338 -0
- package/studio/src/project-io.js +905 -0
- package/studio/src/project-session.js +375 -0
- package/studio/src/projects-dialog.js +319 -0
- package/studio/src/scene-transition.js +129 -0
- package/studio/src/script-editor.js +175 -0
- package/studio/src/script-references.js +74 -0
- package/studio/src/scripted-controls.js +146 -0
- package/studio/src/scripts.js +185 -0
- package/studio/src/stage-guides.js +101 -0
- package/studio/src/svg-animation.js +416 -0
- package/studio/src/svg-context.js +522 -0
- package/studio/src/svg-frame.js +413 -0
- package/studio/src/svg-import.js +1208 -0
- package/studio/src/swf-recording.js +104 -0
- package/studio/src/symbol-library.js +39 -0
- package/studio/src/symbols.js +62 -0
- package/studio/src/text-fields.js +58 -0
- package/studio/src/theme.js +43 -0
- package/studio/src/timeline.js +321 -0
- package/studio/src/vector-cut.js +103 -0
- package/studio/src/vector-geometry.js +254 -0
- package/studio/src/vector-style.js +146 -0
- package/studio/src/video-encode.js +84 -0
- package/studio/src/video-export.js +331 -0
- package/studio/src/video-mux.js +339 -0
- package/studio/src/video-playback.js +281 -0
- package/studio/src/workspace.js +344 -0
- package/studio/stroke-style.test.js +119 -0
- package/studio/styles.css +1547 -0
- package/studio/svg-export.test.js +162 -0
- package/studio/svg-import.test.js +318 -0
- package/studio/swf-authoring.test.js +140 -0
- package/studio/swf-export.test.js +324 -0
- package/studio/swf-import.test.js +489 -0
- package/studio/symbols.test.js +68 -0
- package/studio/tests/accessibility-interactions.mjs +138 -0
- package/studio/tests/appearance-interactions.mjs +103 -0
- package/studio/tests/control-interactions.mjs +60 -0
- package/studio/tests/event-interactions.mjs +117 -0
- package/studio/tests/external-resources.mjs +174 -0
- package/studio/tests/frame-image.mjs +71 -0
- package/studio/tests/html-export.mjs +68 -0
- package/studio/tests/import-files.mjs +131 -0
- package/studio/tests/lottie.mjs +125 -0
- package/studio/tests/mask-interactions.mjs +148 -0
- package/studio/tests/media-interactions.mjs +109 -0
- package/studio/tests/paint-interactions.mjs +64 -0
- package/studio/tests/project-interactions.mjs +244 -0
- package/studio/tests/script-interactions.mjs +178 -0
- package/studio/tests/scripted-control-interactions.mjs +107 -0
- package/studio/tests/svg-export.mjs +149 -0
- package/studio/tests/text-field-interactions.mjs +64 -0
- package/studio/tests/theme-interactions.mjs +53 -0
- package/studio/tests/timeline-browser.mjs +507 -0
- package/studio/tests/transition-interactions.mjs +94 -0
- package/studio/tests/trigger-interactions.mjs +93 -0
- package/studio/tests/video-export.mjs +243 -0
- package/studio/tests/workspace-interactions.mjs +226 -0
- package/studio/tween-recovery.test.js +31 -0
- package/studio/vector-style.test.js +56 -0
- package/studio/video-export.test.js +326 -0
- package/studiospec/actionscript.md +88 -0
- package/studiospec/architecture.md +378 -0
- package/studiospec/controls.md +100 -0
- package/studiospec/file-support.md +268 -0
- package/studiospec/lottie.md +69 -0
- package/studiospec/requirements.md +135 -0
- package/studiospec/stroke-style.md +95 -0
- package/studiospec/svg-export.md +83 -0
- package/studiospec/svg-import.md +139 -0
- package/studiospec/swooflib-integration.md +115 -0
- package/studiospec/tasks.md +573 -0
- package/studiospec/video-export.md +127 -0
- package/swf2js/__tests__/actionscript.test.js +1609 -0
- package/swf2js/__tests__/adpcm-audio.test.js +43 -0
- package/swf2js/__tests__/as2-compiler.test.js +153 -0
- package/swf2js/__tests__/as3-mixed-depth.test.js +498 -0
- package/swf2js/__tests__/authored-sprite-hit.test.js +118 -0
- package/swf2js/__tests__/authored-sprite-sizing.test.js +164 -0
- package/swf2js/__tests__/avm1-action-prefix.test.js +134 -0
- package/swf2js/__tests__/avm1-attach-movie.test.js +1151 -0
- package/swf2js/__tests__/avm1-boxhead-budget.test.js +73 -0
- package/swf2js/__tests__/avm1-cfg-bubble-tanks.test.js +101 -0
- package/swf2js/__tests__/avm1-cfg-mario-kart.test.js +184 -0
- package/swf2js/__tests__/avm1-cfg-mario.test.js +31 -0
- package/swf2js/__tests__/avm1-cfg-pacman.test.js +49 -0
- package/swf2js/__tests__/avm1-checkers-gameplay.test.js +122 -0
- package/swf2js/__tests__/avm1-clip-actions.test.js +2002 -0
- package/swf2js/__tests__/avm1-clone-drag.test.js +626 -0
- package/swf2js/__tests__/avm1-decompiler.test.js +102 -0
- package/swf2js/__tests__/avm1-dynamic-locals.test.js +159 -0
- package/swf2js/__tests__/avm1-formal-parameters.test.js +71 -0
- package/swf2js/__tests__/avm1-key-events.test.js +52 -0
- package/swf2js/__tests__/avm1-load-bitmap.test.js +75 -0
- package/swf2js/__tests__/avm1-loading-host-actions.test.js +764 -0
- package/swf2js/__tests__/avm1-multibyte-strings.test.js +63 -0
- package/swf2js/__tests__/avm1-pacman-gameplay.test.js +115 -0
- package/swf2js/__tests__/avm1-shape-hittest.test.js +311 -0
- package/swf2js/__tests__/avm1-shared-bodies.test.js +57 -0
- package/swf2js/__tests__/avm1-shared-runtime.test.js +1364 -0
- package/swf2js/__tests__/avm1-snake-gameplay.test.js +139 -0
- package/swf2js/__tests__/avm1-super.test.js +70 -0
- package/swf2js/__tests__/avm1-target-path.test.js +325 -0
- package/swf2js/__tests__/avm1-try.test.js +229 -0
- package/swf2js/__tests__/avm2-activation-closures.test.js +65 -0
- package/swf2js/__tests__/avm2-applytype.test.js +180 -0
- package/swf2js/__tests__/avm2-call-ops.test.js +232 -0
- package/swf2js/__tests__/avm2-callsuperid.test.js +231 -0
- package/swf2js/__tests__/avm2-class-initializer.test.js +219 -0
- package/swf2js/__tests__/avm2-custom-namespace.test.js +139 -0
- package/swf2js/__tests__/avm2-describe-type.test.js +96 -0
- package/swf2js/__tests__/avm2-dictionary.test.js +96 -0
- package/swf2js/__tests__/avm2-domain-memory.test.js +332 -0
- package/swf2js/__tests__/avm2-e4x.test.js +326 -0
- package/swf2js/__tests__/avm2-exceptions.test.js +81 -0
- package/swf2js/__tests__/avm2-findprop.test.js +110 -0
- package/swf2js/__tests__/avm2-getlex.test.js +166 -0
- package/swf2js/__tests__/avm2-global-slot.test.js +106 -0
- package/swf2js/__tests__/avm2-interface.test.js +95 -0
- package/swf2js/__tests__/avm2-multiname-precedence.test.js +148 -0
- package/swf2js/__tests__/avm2-named-namespace-types.test.js +106 -0
- package/swf2js/__tests__/avm2-optional-args.test.js +100 -0
- package/swf2js/__tests__/avm2-outer-scopes.test.js +101 -0
- package/swf2js/__tests__/avm2-package-internal-class.test.js +106 -0
- package/swf2js/__tests__/avm2-protected-namespace.test.js +105 -0
- package/swf2js/__tests__/avm2-protected.test.js +214 -0
- package/swf2js/__tests__/avm2-qwop-gameplay.test.js +116 -0
- package/swf2js/__tests__/avm2-runtime-namespaces.test.js +159 -0
- package/swf2js/__tests__/avm2-script-traits.test.js +89 -0
- package/swf2js/__tests__/avm2-shared-runtime.test.js +52 -0
- package/swf2js/__tests__/avm2-slot-ops.test.js +117 -0
- package/swf2js/__tests__/avm2-type-ops.test.js +224 -0
- package/swf2js/__tests__/bevel-filter.test.js +116 -0
- package/swf2js/__tests__/bitmap-button-mask.test.js +106 -0
- package/swf2js/__tests__/bitmap-data-draw.test.js +388 -0
- package/swf2js/__tests__/bitmap-decoder.test.js +108 -0
- package/swf2js/__tests__/bitmapdata-color-bounds.test.js +70 -0
- package/swf2js/__tests__/bitmapdata-copy-channel.test.js +91 -0
- package/swf2js/__tests__/bitmapdata-copy-pixels.test.js +136 -0
- package/swf2js/__tests__/bitmapdata-fill-compare.test.js +241 -0
- package/swf2js/__tests__/bitmapdata-filter.test.js +232 -0
- package/swf2js/__tests__/bitmapdata-hit-test.test.js +71 -0
- package/swf2js/__tests__/bitmapdata-merge.test.js +84 -0
- package/swf2js/__tests__/bitmapdata-palette-map.test.js +92 -0
- package/swf2js/__tests__/bitmapdata-pixels-io.test.js +198 -0
- package/swf2js/__tests__/bitmapdata-threshold.test.js +97 -0
- package/swf2js/__tests__/bitmapdata-vector.test.js +82 -0
- package/swf2js/__tests__/blur-filter.test.js +48 -0
- package/swf2js/__tests__/bundle-emitter.test.js +394 -0
- package/swf2js/__tests__/button-actions.test.js +370 -0
- package/swf2js/__tests__/button-color-transform.test.js +48 -0
- package/swf2js/__tests__/button-decoder.test.js +106 -0
- package/swf2js/__tests__/button-hit-test.test.js +825 -0
- package/swf2js/__tests__/button-scaling-grid.test.js +124 -0
- package/swf2js/__tests__/button-sound.test.js +105 -0
- package/swf2js/__tests__/bytearray-coercion.test.js +23 -0
- package/swf2js/__tests__/bytearray-object-serialization.test.js +380 -0
- package/swf2js/__tests__/cfg-switch-loop.test.js +103 -0
- package/swf2js/__tests__/clip-depth-mask.test.js +119 -0
- package/swf2js/__tests__/clipped-bitmap-fill.test.js +118 -0
- package/swf2js/__tests__/companion-swf.test.js +638 -0
- package/swf2js/__tests__/context-menu.test.js +149 -0
- package/swf2js/__tests__/convolution-filter.test.js +74 -0
- package/swf2js/__tests__/definefont4.test.js +280 -0
- package/swf2js/__tests__/display-displacement.test.js +161 -0
- package/swf2js/__tests__/display-list.test.js +80 -0
- package/swf2js/__tests__/display-mask-render.test.js +656 -0
- package/swf2js/__tests__/displayobject-stage.test.js +320 -0
- package/swf2js/__tests__/embedded-script-audio.test.js +131 -0
- package/swf2js/__tests__/embedded-swf.test.js +202 -0
- package/swf2js/__tests__/embedded-textfield.test.js +107 -0
- package/swf2js/__tests__/embedded-timeline-audio.test.js +182 -0
- package/swf2js/__tests__/embedded-timeline-input.test.js +420 -0
- package/swf2js/__tests__/embedded-timer-lifecycle.test.js +145 -0
- package/swf2js/__tests__/event-priority-order.test.js +125 -0
- package/swf2js/__tests__/event-weak-listeners.test.js +53 -0
- package/swf2js/__tests__/event-will-trigger.test.js +43 -0
- package/swf2js/__tests__/flash-text-engine-content.test.js +115 -0
- package/swf2js/__tests__/flash-text-engine-format.test.js +95 -0
- package/swf2js/__tests__/flash-text-engine-line.test.js +314 -0
- package/swf2js/__tests__/font-encoder.test.js +95 -0
- package/swf2js/__tests__/font-outline-text.test.js +659 -0
- package/swf2js/__tests__/glow-shadow-filter.test.js +68 -0
- package/swf2js/__tests__/graphics-bitmap-smoothing.test.js +32 -0
- package/swf2js/__tests__/graphics-fill-lifetime.test.js +36 -0
- package/swf2js/__tests__/graphics-gradient-matrix.test.js +53 -0
- package/swf2js/__tests__/graphics-stroke-hit-test.test.js +457 -0
- package/swf2js/__tests__/hit-test-primitives.test.js +414 -0
- package/swf2js/__tests__/input-events.test.js +714 -0
- package/swf2js/__tests__/integration/corpus.test.js +41 -0
- package/swf2js/__tests__/loader-embedded-swf.test.js +210 -0
- package/swf2js/__tests__/loader-info.test.js +81 -0
- package/swf2js/__tests__/local-connection.test.js +122 -0
- package/swf2js/__tests__/morph-focal-gradient.test.js +51 -0
- package/swf2js/__tests__/morph-topology.test.js +267 -0
- package/swf2js/__tests__/movie-data-codec.test.js +128 -0
- package/swf2js/__tests__/nellymoser-audio.test.js +84 -0
- package/swf2js/__tests__/opaque-background-cache.test.js +352 -0
- package/swf2js/__tests__/path-stream.test.js +81 -0
- package/swf2js/__tests__/place-object-filters.test.js +88 -0
- package/swf2js/__tests__/place-object3-decoder.test.js +116 -0
- package/swf2js/__tests__/place-object3-image.test.js +85 -0
- package/swf2js/__tests__/player-version.test.js +46 -0
- package/swf2js/__tests__/root-textfield.test.js +287 -0
- package/swf2js/__tests__/scaling-grid.test.js +183 -0
- package/swf2js/__tests__/shape-decoder.test.js +361 -0
- package/swf2js/__tests__/shape-line-style2.test.js +138 -0
- package/swf2js/__tests__/shape-nonscaling-stroke.test.js +131 -0
- package/swf2js/__tests__/shape-pixel-hint.test.js +101 -0
- package/swf2js/__tests__/simplebutton-pointer.test.js +1477 -0
- package/swf2js/__tests__/socket-offline.test.js +67 -0
- package/swf2js/__tests__/sound-avm1-stop.test.js +99 -0
- package/swf2js/__tests__/sound-envelope.test.js +110 -0
- package/swf2js/__tests__/sound-extract.test.js +168 -0
- package/swf2js/__tests__/sound-id3.test.js +283 -0
- package/swf2js/__tests__/sound-load.test.js +259 -0
- package/swf2js/__tests__/sound-mixer-spectrum.test.js +261 -0
- package/swf2js/__tests__/sound-stream-sprite.test.js +624 -0
- package/swf2js/__tests__/sound-transform.test.js +104 -0
- package/swf2js/__tests__/speex-audio.test.js +77 -0
- package/swf2js/__tests__/stage-noscale.test.js +45 -0
- package/swf2js/__tests__/swf-encoder.test.js +134 -0
- package/swf2js/__tests__/swflib-assemble.test.js +20 -0
- package/swf2js/__tests__/textfield-html-text.test.js +368 -0
- package/swf2js/__tests__/textfield-line-layout.test.js +339 -0
- package/swf2js/__tests__/textfield-programmatic-overlay.test.js +2506 -0
- package/swf2js/__tests__/textfield-scroll.test.js +79 -0
- package/swf2js/__tests__/textfield-selection.test.js +383 -0
- package/swf2js/__tests__/timeline-effect-surfaces.test.js +295 -0
- package/swf2js/__tests__/timeline-named-anchor.test.js +139 -0
- package/swf2js/__tests__/timeline-scenes.test.js +1723 -0
- package/swf2js/__tests__/urlloader-http-status.test.js +236 -0
- package/{src → swf2js}/cli.js +43 -11
- package/swf2js/compiler/as2-classes.js +156 -0
- package/swf2js/compiler/as2-parser.js +598 -0
- package/swf2js/compiler/avm1-codegen.js +897 -0
- package/swf2js/compiler/index.js +28 -0
- package/{src → swf2js}/decoder/button-decoder.js +3 -1
- package/swf2js/decoder/png.js +114 -0
- package/{src → swf2js}/decoder/shape-decoder.js +20 -10
- package/{src → swf2js}/decoder/tag-decoder.js +5 -3
- package/{src → swf2js}/decoder/tag-types.js +4 -0
- package/swf2js/decompiler/avm1-decompiler.js +1138 -0
- package/{src → swf2js}/emitter/asset-encoder.js +66 -113
- package/{src → swf2js}/emitter/bundle-emitter.js +209 -78
- package/swf2js/emitter/external-resources.js +39 -0
- package/swf2js/emitter/movie-data-codec.js +91 -0
- package/swf2js/encoder/bit-writer.js +182 -0
- package/swf2js/encoder/shape-encoder.js +310 -0
- package/swf2js/encoder/swf-builder.js +639 -0
- package/swf2js/encoder/swf-writer.js +55 -0
- package/{src/runtime/swflib/assemble.js → swf2js/runtime/assemble-swooflib.js} +4 -3
- package/{src → swf2js}/runtime/avm1-runtime.js +102 -63
- package/{src → swf2js}/runtime/index.js +1 -1
- package/{src → swf2js}/runtime/movie-runtime.js +28 -2
- package/{src → swf2js}/transpiler/actionscript.js +82 -19
- package/{src → swf2js}/transpiler/avm1/avm1-opcodes.js +5 -3
- package/{src → swf2js}/transpiler/avm1/avm1-transpiler.js +69 -6
- package/{src → swf2js}/transpiler/avm2/avm2-transpiler.js +1 -1
- package/{src → swf2js}/transpiler/timeline/display-list.js +41 -22
- package/{src → swf2js}/transpiler/timeline/timeline-codegen.js +97 -36
- package/swooflib/README.md +569 -0
- package/swooflib/adpcm.js +147 -0
- package/{src/runtime/swflib → swooflib}/builtins.js +6 -0
- package/{src/runtime/swflib → swooflib}/context-menu.js +7 -1
- package/swooflib/control-definitions.js +42 -0
- package/swooflib/control-widget.js +763 -0
- package/swooflib/controls.js +300 -0
- package/{src/runtime/swflib → swooflib}/display.js +16 -10
- package/{src/runtime/swflib → swooflib}/events.js +11 -0
- package/{src/runtime/swflib → swooflib}/flash.js +6 -5
- package/{src/runtime/swflib → swooflib}/graphics.js +81 -19
- package/{src/runtime/swflib → swooflib}/input.js +12 -14
- package/{src/runtime/swflib → swooflib}/loader.js +52 -22
- package/swooflib/movie-network.js +86 -0
- package/swooflib/path-stream.js +169 -0
- package/{src/runtime/swflib → swooflib}/render.js +3 -13
- package/{src/runtime/swflib → swooflib}/sound.js +25 -2
- package/{src/runtime/swflib → swooflib}/stage.js +3 -3
- package/swooflib/stream-time.js +21 -0
- package/{src/runtime/swflib → swooflib}/system.js +88 -37
- package/{src/runtime/swflib → swooflib}/text-paint.js +14 -3
- package/{src/runtime/swflib → swooflib}/text.js +8 -0
- package/swooflib/xml-node.js +53 -0
- package/src/emitter/timeline-data-codec.js +0 -58
- /package/{src → swf2js}/decoder/symbol-table.js +0 -0
- /package/{src → swf2js}/emitter/embedded-swf.js +0 -0
- /package/{src → swf2js}/emitter/font-encoder.js +0 -0
- /package/{src → swf2js}/model/swf-document.js +0 -0
- /package/{src → swf2js}/model/transpile-result.js +0 -0
- /package/{src → swf2js}/parser/bit-reader.js +0 -0
- /package/{src → swf2js}/parser/decompressor.js +0 -0
- /package/{src → swf2js}/parser/swf-parser.js +0 -0
- /package/{src → swf2js}/pretty-printer/pretty-printer.js +0 -0
- /package/{src → swf2js}/runtime/avm2-runtime.js +0 -0
- /package/{src → swf2js}/runtime/embedded-movie-runtime.js +0 -0
- /package/{src → swf2js}/transpiler/avm1/avm1-ir.js +0 -0
- /package/{src → swf2js}/transpiler/avm1/avm1-rewrite.js +0 -0
- /package/{src → swf2js}/transpiler/avm2/abc-reader.js +0 -0
- /package/{src → swf2js}/transpiler/cfg-structurer.js +0 -0
- /package/{src → swf2js}/util/diagnostics.js +0 -0
- /package/{src → swf2js}/util/logger.js +0 -0
- /package/{src/runtime/swflib → swooflib}/bitmap-image.js +0 -0
- /package/{src/runtime/swflib → swooflib}/bitmap.js +0 -0
- /package/{src/runtime/swflib → swooflib}/bytearray.js +0 -0
- /package/{src/runtime/swflib → swooflib}/compiled-swf.js +0 -0
- /package/{src/runtime/swflib → swooflib}/cursor-flag.js +0 -0
- /package/{src/runtime/swflib → swooflib}/dictionary.js +0 -0
- /package/{src/runtime/swflib → swooflib}/filters.js +0 -0
- /package/{src/runtime/swflib → swooflib}/geom.js +0 -0
- /package/{src/runtime/swflib → swooflib}/glyph-metrics.js +0 -0
- /package/{src/runtime/swflib → swooflib}/host.js +0 -0
- /package/{src/runtime/swflib → swooflib}/inherit.js +0 -0
- /package/{src/runtime/swflib → swooflib}/marks.js +0 -0
- /package/{src/runtime/swflib → swooflib}/matrix3d.js +0 -0
- /package/{src/runtime/swflib → swooflib}/pointer-bridge.js +0 -0
- /package/{src/runtime/swflib → swooflib}/projection.js +0 -0
- /package/{src/runtime/swflib → swooflib}/sprite-drag.js +0 -0
- /package/{src/runtime/swflib → swooflib}/stage-ref.js +0 -0
- /package/{src/runtime/swflib → swooflib}/text-field.js +0 -0
- /package/{src/runtime/swflib → swooflib}/transform.js +0 -0
- /package/{src/runtime/swflib → swooflib}/xml.js +0 -0
|
@@ -0,0 +1,569 @@
|
|
|
1
|
+
# swooflib Developer Guide
|
|
2
|
+
|
|
3
|
+
## What this library is
|
|
4
|
+
|
|
5
|
+
`swooflib/` is the browser-side Flash API compatibility runtime used by Swoof's generated movie bundles. Its ES modules can also be used directly to author browser movies from code: construct display objects, draw vector artwork, add text, update transforms over time, and render to a canvas.
|
|
6
|
+
|
|
7
|
+
The library provides the Flash-style building blocks, not a complete authoring application. A direct-authored movie owns its scene model, frame evaluation, playback loop, scene transitions, browser input wiring, and asset loading. The examples below show that division explicitly; imports describe the current source modules and are not a versioned public SDK contract.
|
|
8
|
+
|
|
9
|
+
## Capability map
|
|
10
|
+
|
|
11
|
+
| Area | Main modules | What is available |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| Display tree | `display.js`, `graphics.js` | `DisplayObject`, `DisplayObjectContainer`, `InteractiveObject`, `Shape`, `Sprite`; transforms, child ordering, bounds, and hit testing |
|
|
14
|
+
| Vector graphics | `graphics.js` | Fill/stroke, rectangles, circles, ellipses, rounded rectangles, paths, quadratic/cubic curves, triangles, gradients, and bitmap fills |
|
|
15
|
+
| Text | `text-field.js`, `text.js`, `text-paint.js` | `TextField`, `TextFormat`, `Font`, style sheets, text metrics, layout, and painting |
|
|
16
|
+
| Input and events | `events.js`, `input.js`, `pointer-bridge.js`, `stage.js` | Event dispatch, mouse/pointer, touch, keyboard, focus, button states, and drag helpers |
|
|
17
|
+
| Timelines and buttons | `loader.js`, `boot.js` | `MovieClip` playback/navigation methods, scenes/frame labels, `SimpleButton`, and the compiled SWF timeline engine |
|
|
18
|
+
| Rendering | `render.js` | Canvas display-tree painting, transforms, masks, and effects; primarily runtime infrastructure |
|
|
19
|
+
| Other Flash APIs | `geom.js`, `bitmap.js`, `sound.js`, `filters.js`, `system.js`, and related modules | Geometry, bitmap data, audio, filters, timers, loading, and Flash API compatibility |
|
|
20
|
+
|
|
21
|
+
## Directly authoring a movie with Swoof
|
|
22
|
+
|
|
23
|
+
A useful direct-authored movie has four parts: a canvas host, a display tree, a scene/frame model, and input actions. `swooflib` provides the display objects and renderer; the movie's own code decides what each frame means and what interactions do.
|
|
24
|
+
|
|
25
|
+
For example, with an HTML canvas and module entry (`<canvas id="stage" width="640" height="360"></canvas>` and `<script type="module" src="./movie.js"></script>`), this module creates a small two-scene movie with vector art, text, looping motion, and a clickable scene transition. The imports assume the authoring module is next to the `swooflib/` directory; adjust relative paths for your project.
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { Sprite, Shape } from './swooflib/graphics.js';
|
|
29
|
+
import { renderDisplayTree } from './swooflib/render.js';
|
|
30
|
+
import { TextField } from './swooflib/text-field.js';
|
|
31
|
+
import { TextFormat } from './swooflib/text.js';
|
|
32
|
+
|
|
33
|
+
const canvas = document.querySelector('#stage');
|
|
34
|
+
if (!(canvas instanceof HTMLCanvasElement)) throw new Error('Missing #stage canvas');
|
|
35
|
+
const ctx = canvas.getContext('2d');
|
|
36
|
+
if (!ctx) throw new Error('Canvas 2D context is unavailable');
|
|
37
|
+
|
|
38
|
+
const width = 640;
|
|
39
|
+
const height = 360;
|
|
40
|
+
const fps = 24;
|
|
41
|
+
const frameCount = 48;
|
|
42
|
+
canvas.width = width;
|
|
43
|
+
canvas.height = height;
|
|
44
|
+
|
|
45
|
+
function makeButton(label) {
|
|
46
|
+
const button = new Sprite();
|
|
47
|
+
button.graphics.beginFill(0x244c70);
|
|
48
|
+
button.graphics.lineStyle(2, 0x9bdcff);
|
|
49
|
+
button.graphics.drawRoundRect(0, 0, 180, 48, 12, 12);
|
|
50
|
+
button.graphics.endFill();
|
|
51
|
+
|
|
52
|
+
const text = new TextField();
|
|
53
|
+
text.text = label;
|
|
54
|
+
text.defaultTextFormat = new TextFormat('Arial', 20, 0xffffff);
|
|
55
|
+
text.width = 180;
|
|
56
|
+
text.height = 48;
|
|
57
|
+
text.selectable = false;
|
|
58
|
+
button.addChild(text);
|
|
59
|
+
return button;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const titleScene = new Sprite();
|
|
63
|
+
const title = new TextField();
|
|
64
|
+
title.text = 'A Swoof-authored movie';
|
|
65
|
+
title.defaultTextFormat = new TextFormat('Arial', 28, 0xffffff);
|
|
66
|
+
title.width = 520;
|
|
67
|
+
title.height = 48;
|
|
68
|
+
title.x = 48;
|
|
69
|
+
title.y = 48;
|
|
70
|
+
titleScene.addChild(title);
|
|
71
|
+
|
|
72
|
+
const startButton = makeButton('Start');
|
|
73
|
+
startButton.x = 48;
|
|
74
|
+
startButton.y = 130;
|
|
75
|
+
titleScene.addChild(startButton);
|
|
76
|
+
|
|
77
|
+
const playScene = new Sprite();
|
|
78
|
+
const ball = new Shape();
|
|
79
|
+
ball.graphics.beginFill(0x40d8a0);
|
|
80
|
+
ball.graphics.drawCircle(0, 0, 22);
|
|
81
|
+
ball.graphics.endFill();
|
|
82
|
+
ball.y = 180;
|
|
83
|
+
playScene.addChild(ball);
|
|
84
|
+
|
|
85
|
+
const backButton = makeButton('Back to title');
|
|
86
|
+
backButton.x = 24;
|
|
87
|
+
backButton.y = 24;
|
|
88
|
+
playScene.addChild(backButton);
|
|
89
|
+
|
|
90
|
+
const scenes = new Map([
|
|
91
|
+
['title', titleScene],
|
|
92
|
+
['play', playScene],
|
|
93
|
+
]);
|
|
94
|
+
let activeScene = 'title';
|
|
95
|
+
let sceneStartedAt = performance.now();
|
|
96
|
+
|
|
97
|
+
function enterScene(sceneId) {
|
|
98
|
+
activeScene = sceneId;
|
|
99
|
+
sceneStartedAt = performance.now();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function renderFrame(sceneId, frame) {
|
|
103
|
+
const t = frame / frameCount;
|
|
104
|
+
ball.x = 80 + 460 * t;
|
|
105
|
+
ball.y = 180 + Math.sin(t * Math.PI * 2) * 55;
|
|
106
|
+
ball.rotation = 360 * t;
|
|
107
|
+
|
|
108
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
109
|
+
ctx.clearRect(0, 0, width, height);
|
|
110
|
+
ctx.fillStyle = '#101820';
|
|
111
|
+
ctx.fillRect(0, 0, width, height);
|
|
112
|
+
renderDisplayTree(ctx, scenes.get(sceneId), 0);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function stagePoint(event) {
|
|
116
|
+
const rect = canvas.getBoundingClientRect();
|
|
117
|
+
return {
|
|
118
|
+
x: (event.clientX - rect.left) * width / rect.width,
|
|
119
|
+
y: (event.clientY - rect.top) * height / rect.height,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
canvas.addEventListener('pointerup', event => {
|
|
124
|
+
const point = stagePoint(event);
|
|
125
|
+
if (activeScene === 'title' && startButton.hitTestPoint(point.x, point.y, true)) {
|
|
126
|
+
enterScene('play');
|
|
127
|
+
} else if (activeScene === 'play' && backButton.hitTestPoint(point.x, point.y, true)) {
|
|
128
|
+
enterScene('title');
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
function tick(now) {
|
|
133
|
+
const frame = Math.floor((now - sceneStartedAt) * fps / 1000) % frameCount;
|
|
134
|
+
renderFrame(activeScene, frame);
|
|
135
|
+
requestAnimationFrame(tick);
|
|
136
|
+
}
|
|
137
|
+
requestAnimationFrame(tick);
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
This example intentionally uses a small app-owned scene map and frame evaluator rather than pretending a fresh `MovieClip` already has authored frames. For a real movie, move the scene definitions and keyframes into data, use stable IDs for symbols and instances, and make one deterministic `renderFrame(scene, frame)` function serve both playback and timeline scrubbing. Use `SimpleButton` when you need Flash-style visual states; the example uses native pointer events plus Swoof hit testing so the host/input boundary stays visible.
|
|
141
|
+
|
|
142
|
+
## Broader Flash API surface
|
|
143
|
+
|
|
144
|
+
The builtins catalog in `flash.js` exposes compatibility packages for generated movies. The main surface includes:
|
|
145
|
+
|
|
146
|
+
| Package | Representative classes and features |
|
|
147
|
+
|---|---|
|
|
148
|
+
| `flash.display` | `Stage`, `DisplayObject`, containers, `Sprite`, `Shape`, `MovieClip`, `SimpleButton`, `Bitmap` / `BitmapData`, `Loader` |
|
|
149
|
+
| `flash.geom` | `Point`, `Rectangle`, `Matrix`, `ColorTransform`, `Transform`, `Vector3D`, `Matrix3D`, perspective projection |
|
|
150
|
+
| `flash.events` | `EventDispatcher`, lifecycle/frame events, mouse, touch, keyboard, focus, progress, IO, and gesture events |
|
|
151
|
+
| `flash.text` | `TextField`, `TextFormat`, `Font`, styles, metrics, and `flash.text.engine` text-layout classes |
|
|
152
|
+
| `flash.media` | `Sound`, `SoundChannel`, `SoundMixer`, `SoundTransform`, and ID3 metadata |
|
|
153
|
+
| `flash.filters` | Blur, glow, shadow, bevel, gradient, color-matrix, convolution, and displacement filters |
|
|
154
|
+
| `flash.utils` | `ByteArray`, `Dictionary`, `Timer`, `getTimer`, and typed `Vector` support |
|
|
155
|
+
| `flash.net` | `URLLoader`, `URLRequest`, `URLVariables`, `Socket`, `SharedObject`, `LocalConnection`, and URL navigation |
|
|
156
|
+
| `flash.system` / `flash.ui` / `flash.xml` | Capabilities/security/application domains; keyboard/mouse/multitouch/context menus; XML/XMLList helpers |
|
|
157
|
+
|
|
158
|
+
This is a compatibility surface, not a promise that every API behaves exactly like Adobe Flash or is equally useful outside generated movies. Browser security, browser codecs, and host initialization still apply. For exact names and behavior, `flash.js` declares the package catalog; individual modules contain implementation details.
|
|
159
|
+
|
|
160
|
+
## Creating display objects
|
|
161
|
+
|
|
162
|
+
The source modules expose named ES-module classes. For example, an app can construct a display tree and vector object like this:
|
|
163
|
+
|
|
164
|
+
```js
|
|
165
|
+
import { Sprite, Shape } from './swooflib/graphics.js';
|
|
166
|
+
|
|
167
|
+
const root = new Sprite();
|
|
168
|
+
const box = new Shape();
|
|
169
|
+
|
|
170
|
+
box.graphics.beginFill(0x2080e0);
|
|
171
|
+
box.graphics.lineStyle(2, 0x102030);
|
|
172
|
+
box.graphics.drawRect(0, 0, 120, 80);
|
|
173
|
+
box.graphics.endFill();
|
|
174
|
+
box.x = 24;
|
|
175
|
+
box.y = 32;
|
|
176
|
+
|
|
177
|
+
root.addChild(box);
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
`Graphics` also provides `drawCircle`, `drawEllipse`, `moveTo`, `lineTo`, `curveTo`, `cubicCurveTo`, `drawPath`, fill/stroke controls, and `getBounds` / `containsPoint` helpers. See `graphics.js` for the precise current method signatures and path command behavior.
|
|
181
|
+
|
|
182
|
+
Text can be represented with `TextField` and `TextFormat`:
|
|
183
|
+
|
|
184
|
+
```js
|
|
185
|
+
import { TextField } from './swooflib/text-field.js';
|
|
186
|
+
import { TextFormat } from './swooflib/text.js';
|
|
187
|
+
|
|
188
|
+
const label = new TextField();
|
|
189
|
+
label.text = 'Hello';
|
|
190
|
+
label.defaultTextFormat = new TextFormat('Arial', 24, 0xffffff);
|
|
191
|
+
label.width = 180;
|
|
192
|
+
label.height = 40;
|
|
193
|
+
root.addChild(label);
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
These snippets build display objects only. They do not mount a stage, connect a canvas, or start rendering.
|
|
197
|
+
|
|
198
|
+
## Rendering an app-owned scene
|
|
199
|
+
|
|
200
|
+
`renderDisplayTree(ctx, root, depth)` in `render.js` paints a display tree into a Canvas 2D context. It is a low-level renderer entry, not a complete stage/application host. A small app can own the canvas and render loop:
|
|
201
|
+
|
|
202
|
+
```js
|
|
203
|
+
import { Sprite, Shape } from './swooflib/graphics.js';
|
|
204
|
+
import { renderDisplayTree } from './swooflib/render.js';
|
|
205
|
+
|
|
206
|
+
const canvas = document.querySelector('#stage');
|
|
207
|
+
const ctx = canvas.getContext('2d');
|
|
208
|
+
const root = new Sprite();
|
|
209
|
+
const dot = new Shape();
|
|
210
|
+
|
|
211
|
+
dot.graphics.beginFill(0x20c080);
|
|
212
|
+
dot.graphics.drawCircle(0, 0, 20);
|
|
213
|
+
dot.graphics.endFill();
|
|
214
|
+
root.addChild(dot);
|
|
215
|
+
|
|
216
|
+
function draw() {
|
|
217
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
218
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
219
|
+
renderDisplayTree(ctx, root, 0);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
draw();
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
The renderer does not clear the canvas or create the canvas element. Set its backing width/height to the authored stage size; CSS may scale the canvas to fit the page. If the editor adds device-pixel-ratio scaling, keep the resulting context transform consistent when clearing and rendering.
|
|
226
|
+
|
|
227
|
+
The classes are useful for drawing and hit testing, but `renderDisplayTree` currently exposes a low-level renderer signature. Prefer wrapping it in an app-owned `renderFrame()` or a future documented host facade instead of scattering calls to it through UI components.
|
|
228
|
+
|
|
229
|
+
## Coordinates and drawing conventions
|
|
230
|
+
|
|
231
|
+
- For app-authored display objects, use stage pixels. `x` and `y` are local to the parent; children are painted in container order, so later children appear above earlier ones.
|
|
232
|
+
- `scaleX` and `scaleY` are multipliers (`1` means authored size); `rotation` is in degrees. Use the display object's transform APIs when a full matrix is needed.
|
|
233
|
+
- `Shape` is a leaf with a `graphics` object. `Sprite` is a container with both `graphics` and child objects.
|
|
234
|
+
- Fill and stroke settings are drawing commands: set them before drawing the path they style. `beginFill(color, alpha)` and `lineStyle(width, color, alpha, ...)` use numeric RGB colors and optional alpha.
|
|
235
|
+
- `moveTo` starts a path; `lineTo` adds a straight segment; `curveTo(cx, cy, x, y)` adds a quadratic segment; `cubicCurveTo(c1x, c1y, c2x, c2y, x, y)` adds a cubic segment. For simple closed shapes, prefer a convenience primitive such as `drawRect`, `drawCircle`, or `drawEllipse`.
|
|
236
|
+
- `drawPath(commands, data, winding)` consumes command-specific coordinate pairs. A quadratic command consumes its control point and endpoint; a cubic command consumes two control points and an endpoint. There is no public close-path command: a filled Canvas path closes implicitly, but to close its stroke, add a final line back to the first point.
|
|
237
|
+
- `Graphics.clear()` removes recorded drawing commands. Redraw a changed shape by clearing and issuing its fill/stroke/path commands again.
|
|
238
|
+
- `Graphics.getBounds()` and `containsPoint()` can support selection and hit-testing, but hit testing depends on browser Canvas/`Path2D` capabilities and is not a substitute for validating editor-specific selection behavior.
|
|
239
|
+
|
|
240
|
+
For paths built from command arrays, the command enum is `GraphicsPathCommand` and the fill rule is `GraphicsPathWinding`. This makes the data layout explicit:
|
|
241
|
+
|
|
242
|
+
```js
|
|
243
|
+
import { GraphicsPathCommand as Cmd, GraphicsPathWinding as Winding } from './swooflib/graphics.js';
|
|
244
|
+
|
|
245
|
+
box.graphics.beginFill(0xf0a030);
|
|
246
|
+
box.graphics.lineStyle(2, 0x402010);
|
|
247
|
+
box.graphics.drawPath(
|
|
248
|
+
[Cmd.MOVE_TO, Cmd.LINE_TO, Cmd.CUBIC_CURVE_TO, Cmd.LINE_TO, Cmd.LINE_TO],
|
|
249
|
+
[0, 0, 60, 0, 80, 0, 100, 30, 120, 40, 120, 80, 0, 80, 0, 0],
|
|
250
|
+
Winding.NON_ZERO
|
|
251
|
+
);
|
|
252
|
+
box.graphics.endFill();
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
The final line returns to the start, closing both fill and stroke. For simple rectangles/circles, prefer the convenience methods over hand-authored command arrays.
|
|
256
|
+
|
|
257
|
+
## Transform composition and visual effects
|
|
258
|
+
|
|
259
|
+
Every `DisplayObject` has parent-local `x` / `y`, `scaleX` / `scaleY`, `rotation` (degrees), `alpha`, `visible`, and a `transform`. Parent and child transforms compose; the display list order determines which sibling draws on top. Animate these properties when only an object's pose changes instead of rebuilding its `Graphics`.
|
|
260
|
+
|
|
261
|
+
For a full affine transform, assign a `Matrix` to `transform.matrix`. Its fields map local points as `x' = a*x + c*y + tx`, `y' = b*x + d*y + ty`. Avoid mixing repeated matrix assignment with separate `x` / `scale` / `rotation` updates on the same object; choose one representation for the evaluated pose.
|
|
262
|
+
The convenience `DisplayObject.rotation` property is in degrees; `Matrix.rotate(angle)` takes radians.
|
|
263
|
+
|
|
264
|
+
```js
|
|
265
|
+
import { ColorTransform, Matrix, Rectangle } from './swooflib/geom.js';
|
|
266
|
+
import { GlowFilter } from './swooflib/filters.js';
|
|
267
|
+
|
|
268
|
+
symbol.transform.matrix = new Matrix(1.1, 0.15, -0.15, 1.1, 200, 100);
|
|
269
|
+
symbol.alpha = 0.9;
|
|
270
|
+
symbol.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 8, 24, 0);
|
|
271
|
+
symbol.filters = [new GlowFilter(0x40d8a0, 0.8, 10, 10, 1.5)];
|
|
272
|
+
symbol.scrollRect = new Rectangle(0, 0, 160, 90);
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
`ColorTransform` applies per-channel multipliers and offsets; `alpha` is a convenient alpha-multiplier property. `mask`, `scrollRect`, `blendMode`, and filters can shape or composite a display subtree. The Canvas renderer may rasterize effects through offscreen surfaces, so filters and complex masks can cost more than simple transforms. `Matrix3D` and `PerspectiveProjection` are also available, but this is still a Canvas renderer, not a GPU 3D scene engine; validate the result and cost in the target browser.
|
|
276
|
+
|
|
277
|
+
The filter classes include `BlurFilter`, `DropShadowFilter`, `GlowFilter`, `BevelFilter`, `GradientGlowFilter`, `GradientBevelFilter`, `ColorMatrixFilter`, `ConvolutionFilter`, and `DisplacementMapFilter`. Assign a list to `displayObject.filters`; filter parameters and fidelity are implementation-specific, so check the corresponding class in `filters.js` and verify the actual rendered result.
|
|
278
|
+
|
|
279
|
+
Use `localToGlobal()` and `globalToLocal()` when converting coordinates between a nested symbol and the stage. Pointer coordinates passed to `hitTestPoint()` are stage/global coordinates. A transformed parent affects both drawing and hit testing.
|
|
280
|
+
|
|
281
|
+
## Writing animation in code
|
|
282
|
+
|
|
283
|
+
For an app-owned scene, keep the authored data separate from runtime display instances. Evaluate the requested frame into object properties, then render the display tree. The following illustrates a two-second looping motion; it is not a `MovieClip` timeline:
|
|
284
|
+
|
|
285
|
+
```js
|
|
286
|
+
const fps = 24;
|
|
287
|
+
const frameCount = 48;
|
|
288
|
+
const startedAt = performance.now();
|
|
289
|
+
|
|
290
|
+
function renderFrame(frame) {
|
|
291
|
+
const t = frame / (frameCount - 1);
|
|
292
|
+
dot.x = 30 + 300 * t;
|
|
293
|
+
draw();
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
function tick(now) {
|
|
297
|
+
const frame = Math.floor(((now - startedAt) * fps / 1000) % frameCount);
|
|
298
|
+
renderFrame(frame);
|
|
299
|
+
requestAnimationFrame(tick);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
requestAnimationFrame(tick);
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
For keyframes, interpolate properties explicitly in the app's evaluator:
|
|
306
|
+
|
|
307
|
+
```js
|
|
308
|
+
const lerp = (a, b, t) => a + (b - a) * t;
|
|
309
|
+
|
|
310
|
+
function evaluateMotion(frame) {
|
|
311
|
+
const t = Math.max(0, Math.min(1, (frame - 12) / (36 - 12)));
|
|
312
|
+
dot.x = lerp(40, 400, t);
|
|
313
|
+
dot.y = lerp(180, 90, t);
|
|
314
|
+
dot.rotation = lerp(0, 360, t);
|
|
315
|
+
dot.alpha = lerp(1, 0.25, t);
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
For an editor, use a deterministic evaluator that takes a scene and frame number. Scrubbing should call that evaluator directly; playback should advance a frame clock at the document's frame rate and call the same evaluator. Keep play/pause/seek, interpolation, looping, and scene transitions in the app/player layer unless a future swooflib API explicitly owns them. Decide explicitly whether values outside keyframe spans hold, disappear, or continue; the library does not choose this policy for an authoring document.
|
|
320
|
+
|
|
321
|
+
When repeatedly updating vector geometry, decide whether to mutate transforms or rebuild `Graphics` commands. Rebuilding commands is straightforward but costs more; changing `x`, `y`, scale, rotation, or alpha keeps the drawing commands intact. For many authored objects, maintain an ID-to-display-object map so each evaluated frame updates existing instances rather than recreating the whole display tree.
|
|
322
|
+
|
|
323
|
+
## Easing and scene transitions
|
|
324
|
+
|
|
325
|
+
Swoof does not provide a general tween/easing engine or a generic scene-transition controller. Some generated movies include their own tween or transition logic; that behavior belongs to the movie code. For a direct-authored movie, calculate eased values in the same frame evaluator used by playback and scrubbing:
|
|
326
|
+
|
|
327
|
+
```js
|
|
328
|
+
const clamp01 = value => Math.max(0, Math.min(1, value));
|
|
329
|
+
const smoothstep = value => value * value * (3 - 2 * value);
|
|
330
|
+
|
|
331
|
+
function evaluateTween(frame, object, from, to, firstFrame, lastFrame) {
|
|
332
|
+
const raw = clamp01((frame - firstFrame) / (lastFrame - firstFrame));
|
|
333
|
+
const t = smoothstep(raw);
|
|
334
|
+
object.x = from.x + (to.x - from.x) * t;
|
|
335
|
+
object.y = from.y + (to.y - from.y) * t;
|
|
336
|
+
object.rotation = from.rotation + (to.rotation - from.rotation) * t;
|
|
337
|
+
object.alpha = from.alpha + (to.alpha - from.alpha) * t;
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Scene navigation and visual transitions are separate concerns. A click can change the active scene immediately, as in the direct-authoring example. A fade-through-color can use a full-stage overlay: fade it in, switch scenes at the midpoint, then fade it out.
|
|
342
|
+
|
|
343
|
+
```js
|
|
344
|
+
const curtain = new Shape();
|
|
345
|
+
curtain.graphics.beginFill(0x000000);
|
|
346
|
+
curtain.graphics.drawRect(0, 0, stageWidth, stageHeight);
|
|
347
|
+
curtain.graphics.endFill();
|
|
348
|
+
|
|
349
|
+
function renderFadeFrame(progress, fromId, toId) {
|
|
350
|
+
const t = Math.max(0, Math.min(1, progress));
|
|
351
|
+
const sceneId = t < 0.5 ? fromId : toId;
|
|
352
|
+
curtain.alpha = t < 0.5 ? t * 2 : (1 - t) * 2;
|
|
353
|
+
clearStage();
|
|
354
|
+
renderDisplayTree(ctx, scenes.get(sceneId), 0);
|
|
355
|
+
renderDisplayTree(ctx, curtain, 0);
|
|
356
|
+
}
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
`clearStage`, `scenes`, `ctx`, and the stage dimensions belong to the movie host. A true cross-fade between opaque scenes requires drawing them to separate layers and compositing those layers; changing `DisplayObject.alpha` alone is not a timeline transition engine. A wipe can be authored with a moving mask or `scrollRect`; Swoof supplies those display features, but not preset fade/wipe transitions. Keep scene changes, duration, interruption policy, and cleanup in the app's player.
|
|
360
|
+
|
|
361
|
+
For a transpiled movie, `MovieClip.gotoAndPlay()` / `gotoAndStop()` navigate the attached movie timeline and frame labels. They do not create an app-level scene system or apply a visual transition effect. A newly constructed `MovieClip` has no authored frame sequence until a timeline is attached.
|
|
362
|
+
|
|
363
|
+
## Events, input, and buttons
|
|
364
|
+
|
|
365
|
+
Display objects inherit event-dispatch behavior. The runtime includes `MouseEvent`, `TouchEvent`, `KeyboardEvent`, and focus events. `InteractiveObject` supports mouse and focus-related properties; `SimpleButton` supports up, over, down, and hit-test states. `Sprite` also has mouse/touch drag methods.
|
|
366
|
+
|
|
367
|
+
An event listener can be registered on an object:
|
|
368
|
+
|
|
369
|
+
```js
|
|
370
|
+
import { MouseEvent } from './swooflib/events.js';
|
|
371
|
+
|
|
372
|
+
box.addEventListener(MouseEvent.CLICK, onBoxClick);
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
Common Flash event type values include `click`, `mouseDown`, `mouseUp`, `mouseMove`, `rollOver`, and `rollOut`; use the constants on `MouseEvent` rather than guessing event strings. `EventDispatcher` supports add/remove listeners, capture/bubble phases, listener priority, and dispatch.
|
|
376
|
+
|
|
377
|
+
Receiving browser input requires the display tree to be connected to the runtime's stage, canvas, and pointer binding. Merely creating a `Sprite` or registering a listener does not wire native browser events. The current binding helpers are runtime infrastructure; use them through an adapter rather than calling internal input functions as an app API.
|
|
378
|
+
|
|
379
|
+
If an app owns pointer handling, convert CSS coordinates to the canvas backing-stage coordinates before hit testing:
|
|
380
|
+
|
|
381
|
+
```js
|
|
382
|
+
function stagePoint(event, canvas) {
|
|
383
|
+
const rect = canvas.getBoundingClientRect();
|
|
384
|
+
return {
|
|
385
|
+
x: (event.clientX - rect.left) * canvas.width / rect.width,
|
|
386
|
+
y: (event.clientY - rect.top) * canvas.height / rect.height,
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
canvas.addEventListener('pointerup', event => {
|
|
391
|
+
const point = stagePoint(event, canvas);
|
|
392
|
+
if (box.hitTestPoint(point.x, point.y, true)) {
|
|
393
|
+
// Invoke the app/editor action for this object in preview mode.
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
This assumes the canvas content fills its CSS rectangle. If the stage is letterboxed inside a wrapper or transformed separately, convert against the actual stage-content rectangle instead. `hitTestPoint` takes global/stage coordinates; it accounts for the object's display-tree transforms.
|
|
399
|
+
|
|
400
|
+
For keyboard controls in a directly authored app, the host can map native browser keys to movie actions:
|
|
401
|
+
|
|
402
|
+
```js
|
|
403
|
+
window.addEventListener('keydown', event => {
|
|
404
|
+
if (event.code === 'Space') {
|
|
405
|
+
event.preventDefault();
|
|
406
|
+
player.togglePlayback();
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
`KeyboardEvent` and `TouchEvent` are Swoof event classes for a connected runtime/input bridge; they do not automatically subscribe a standalone app to `window` keyboard events. Pointer Events provide a convenient browser-side path for mouse, pen, and touch when the app owns the host.
|
|
412
|
+
|
|
413
|
+
`SimpleButton` is a display object with separate `upState`, `overState`, `downState`, and optional `hitTestState` display objects. It does not itself define an app action such as “go to scene B”; attach event behavior in the movie/app layer. For a custom editor, keep pointer gestures in two modes: edit mode selects/manipulates objects; preview mode dispatches authored interactions.
|
|
414
|
+
|
|
415
|
+
`Sprite.startDrag(lockCenter, bounds)` / `stopDrag()` and `startTouchDrag(id, lockCenter, bounds)` / `stopTouchDrag(id)` are available, but require the runtime's input bridge to be active.
|
|
416
|
+
|
|
417
|
+
## Scenes, button actions, sprites, and transforms
|
|
418
|
+
|
|
419
|
+
The answer depends on whether the content is a transpiled SWF movie or a new app-authored scene:
|
|
420
|
+
|
|
421
|
+
| Capability | Transpiled SWF movie | App/editor-authored content |
|
|
422
|
+
|---|---|---|
|
|
423
|
+
| Scenes | SWF scene metadata is available on a host-timeline `MovieClip`; `gotoAndPlay` / `gotoAndStop` accept a frame and scene, and `nextScene` / `prevScene` are implemented. | `swooflib` does not provide a general scene collection/controller. Keep scenes and the active-scene state in the app/editor. |
|
|
424
|
+
| Clickable buttons | Decoded SWF button and clip actions are passed to the compiled runtime and can execute as part of the movie. | `SimpleButton` provides visual states and hit testing, but does not contain a destination/action property. Attach a click listener and call the app's own scene controller. |
|
|
425
|
+
| Input dispatch | The generated movie host connects stage, canvas, pointer/keyboard handling, hit testing, and compiled actions. | Display objects and event classes exist, but a standalone app must connect a stage/input host or provide its own browser-event adapter. |
|
|
426
|
+
| Sprites | Authored SWF sprites become nested display/timeline content in the movie runtime. | `Sprite` is a container with vector graphics and child objects; use it to group objects or build reusable display subtrees. |
|
|
427
|
+
| Transforms | SWF placements and ActionScript transforms are applied by the movie runtime. | `DisplayObject` properties and `Transform` support app-side transforms; the app updates them from its own animation state. |
|
|
428
|
+
|
|
429
|
+
For an SWF-hosted movie, a root `MovieClip` delegates these calls to the attached host timeline:
|
|
430
|
+
|
|
431
|
+
```js
|
|
432
|
+
root.gotoAndStop(12, 'Scene 2');
|
|
433
|
+
root.gotoAndPlay(1, 'Scene 1');
|
|
434
|
+
root.nextScene();
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
These are Flash movie-timeline operations, not a way to create scenes in a fresh `MovieClip`. A new `MovieClip` starts with one frame and its default scene metadata; it needs a host/local timeline before those calls can change authored visual frames.
|
|
438
|
+
|
|
439
|
+
For app-authored content, compose objects with `Sprite`, and use a `SimpleButton` for a multi-state control:
|
|
440
|
+
|
|
441
|
+
```js
|
|
442
|
+
import { Sprite } from './swooflib/graphics.js';
|
|
443
|
+
import { SimpleButton } from './swooflib/loader.js';
|
|
444
|
+
import { MouseEvent } from './swooflib/events.js';
|
|
445
|
+
|
|
446
|
+
const sceneRoot = new Sprite();
|
|
447
|
+
const button = new SimpleButton();
|
|
448
|
+
button.upState = makeButtonArtwork('OPEN');
|
|
449
|
+
button.overState = makeButtonArtwork('OPEN');
|
|
450
|
+
button.downState = makeButtonArtwork('OPEN');
|
|
451
|
+
button.hitTestState = makeButtonArtwork('OPEN');
|
|
452
|
+
button.addEventListener(MouseEvent.CLICK, () => showScene('details'));
|
|
453
|
+
sceneRoot.addChild(button);
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
`makeButtonArtwork` and `showScene` above are app functions, not swooflib APIs. The button will only receive browser clicks after the app has connected its display tree to an input-capable stage/host. If only one visual state is needed, a `Sprite` or `Shape` with an event listener may be enough.
|
|
457
|
+
|
|
458
|
+
For transforms, `x` and `y` are parent-local coordinates; `scaleX` / `scaleY` are multipliers (normally `1` is unchanged size); `rotation` is in degrees. Child transforms compose with their parent's transform. Set a `DisplayObject`'s `transform.matrix` when an authored affine matrix is more convenient. Hit testing uses the display tree's transforms; pass stage/global coordinates to `hitTestPoint`.
|
|
459
|
+
|
|
460
|
+
In short: swooflib supplies sprites, transforms, button visuals, and Flash event types. In generated movies, the bundle and movie host provide compiled scene/button behavior. In a directly authored movie, scene definitions, button destinations, and general control flow belong to the movie code you write.
|
|
461
|
+
|
|
462
|
+
## Audio and sound design
|
|
463
|
+
|
|
464
|
+
The direct modules expose `Sound`, `SoundChannel`, `SoundTransform`, and `SoundMixer` from `sound.js`. Use `Sound.load(url)` for an external audio resource, then call `play()` in response to a user action so browser autoplay policies are satisfied. `play(startTimeMs, loops, transform)` returns a channel that can be stopped, inspected through `position`, and given its own volume/pan transform. `Sound.start(secondsOffset, loops)` uses seconds for the offset; `Sound.play()` uses milliseconds.
|
|
465
|
+
|
|
466
|
+
```js
|
|
467
|
+
import { Sound, SoundTransform } from './swooflib/sound.js';
|
|
468
|
+
import { IOErrorEvent } from './swooflib/events.js';
|
|
469
|
+
|
|
470
|
+
const music = new Sound();
|
|
471
|
+
music.addEventListener(IOErrorEvent.IO_ERROR, event => {
|
|
472
|
+
console.error(`Could not load music: ${event.text}`);
|
|
473
|
+
});
|
|
474
|
+
music.load('./assets/music.mp3');
|
|
475
|
+
|
|
476
|
+
let musicChannel = null;
|
|
477
|
+
function startMusicFromUserAction() {
|
|
478
|
+
musicChannel?.stop();
|
|
479
|
+
musicChannel = music.play(0, 0, new SoundTransform(0.35, 0));
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
function updateMusicFade(progress) {
|
|
483
|
+
if (musicChannel) musicChannel.soundTransform.volume = 0.35 * (1 - progress);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
function stopMovieAudio() {
|
|
487
|
+
musicChannel?.stop();
|
|
488
|
+
musicChannel = null;
|
|
489
|
+
music.close();
|
|
490
|
+
}
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
Attach `startMusicFromUserAction` to a click/tap/keyboard action; do not start playback automatically on page load. Handle `IOErrorEvent.IO_ERROR` for load failures and `Event.SOUND_COMPLETE` on a channel when completion matters. `SoundTransform.volume` and `pan` control a channel; `SoundMixer.soundTransform` and `SoundMixer.stopAll()` control global playback. Stop channels and close resources when their scene/player is disposed. Generated output keeps audio assets alongside movie metadata and code; direct-authored movies should own an explicit asset map and decide which scene starts/stops each channel.
|
|
494
|
+
|
|
495
|
+
## Bitmaps, masks, and runtime services
|
|
496
|
+
|
|
497
|
+
- **Raster content:** `BitmapData` is a mutable, canvas-backed pixel buffer; `Bitmap` displays it. `Graphics.beginBitmapFill()` uses bitmap data as a fill. External image fetch/decode and disposal should be owned by the movie host or an explicit asset manager.
|
|
498
|
+
- **Clipping and effects:** a display object can use `mask`, `scrollRect`, `filters`, and blend-mode state. These are useful for wipes, portals, glows, shadows, and compositing. Complex effects can allocate/rasterize offscreen canvases, so profile them on the target stage size.
|
|
499
|
+
- **Stage and input:** the runtime exposes stage size, frame rate, scale mode, alignment, and quality. Generated output configures these in its host; a direct movie should define authored dimensions and manage its own CSS scaling, resize handling, and pointer-to-stage conversion.
|
|
500
|
+
- **Utilities and loading:** `Timer`, `ByteArray`, `Dictionary`, `Loader`, `URLLoader`, and related Flash compatibility classes are available through the runtime catalog. For new browser-authored content, prefer browser-native asset/network APIs when they fit, and use these compatibility classes only after checking their browser and host requirements.
|
|
501
|
+
|
|
502
|
+
## Timelines and playback
|
|
503
|
+
|
|
504
|
+
`MovieClip` has `play()`, `stop()`, `gotoAndPlay()`, `gotoAndStop()`, `nextFrame()`, and `prevFrame()` methods. For SWF-authored movies these methods are connected to the runtime timeline created by `boot.js`.
|
|
505
|
+
|
|
506
|
+
`MovieClip` starts with one frame. Its playback methods only advance visible content when a local or host timeline has been attached; calling `play()` on a newly constructed clip does not create animation data. `addFrameScript(frameIndex0, fn, ...)` registers callbacks using zero-based frame indexes, unlike the usual one-based `currentFrame`.
|
|
507
|
+
|
|
508
|
+
The host timeline engine consumes compiled movie data and button-action tables. It is not a general timeline engine for arbitrary editor-authored keyframes or tweens. An editor/app with its own scene model should own frame evaluation, tween interpolation, playback state, and scene navigation, then adapt the evaluated state to display objects.
|
|
509
|
+
|
|
510
|
+
Complex movies in the generated output use more than a flat list of drawings: there are root and nested timelines, reusable symbols, named instances, frame/label navigation, and scripts that respond to input or create and remove display objects. For direct authoring, model those as your own scenes, symbols, frame data, and actions, then instantiate/update Swoof display objects. Do not try to encode all behavior as static frame records.
|
|
511
|
+
|
|
512
|
+
## Learning from the generated movies
|
|
513
|
+
|
|
514
|
+
The files under [`Swf/`](../Swf/) are generated movies, intentionally useful as references for how Swoof is used in complete, complex browser movies; they are not original SWF inputs. A generated movie commonly has an HTML stage, a copy of the `swoof/` runtime, a `bundle.js`, `timeline-data.js`, and an `assets/` directory. Together these show the output contract and runtime patterns:
|
|
515
|
+
|
|
516
|
+
- **Stage contract:** dimensions, frame rate, background, and stage wrapping are explicit. Preserve one authored coordinate space and scale the canvas separately for display.
|
|
517
|
+
- **Display list:** frames place symbols at depths, with transforms, names, and removals. In direct code, use stable instance IDs and explicit child ordering rather than generated character IDs.
|
|
518
|
+
- **Reusable artwork:** complex content is grouped into nested sprites/clips with their own timelines. In direct code, make `Sprite` factory functions or symbol classes and compose them into scene roots.
|
|
519
|
+
- **Timeline behavior:** root and nested playheads, labels, frame callbacks, and navigation work together. In direct code, represent this as scene/frame data and a deterministic evaluator; use labels or symbolic IDs rather than scattering magic frame numbers.
|
|
520
|
+
- **Transitions and poses:** movie logic navigates labels/scenes, responds to button states, and changes position, scale, rotation, alpha, color, and sometimes effects. Direct code should make those values explicit in frame/action state; Swoof does not infer a tween or scene-transition policy.
|
|
521
|
+
- **Movie logic:** the bundle contains behavior such as input handling, state changes, clip creation/removal, and navigation. In direct code, express these as named actions/controllers and wire them to Swoof event or hit-test APIs.
|
|
522
|
+
- **Audio and other assets:** image and audio resources may be external files referenced by metadata, with playback controlled by code. In direct code, keep asset identifiers/loading separate from display-list construction and explicitly manage channels and resource cleanup.
|
|
523
|
+
- **Effects:** filters, masks, blend state, and color transforms add visual treatment to display objects. Use these as optional rendering properties and keep an eye on offscreen rasterization cost.
|
|
524
|
+
|
|
525
|
+
The generated `timeline-data.js` is playback data: its frames describe placements/removals, while character records describe vector draws, text/font data, bitmaps, buttons, filters, and nested sprite timelines. `bundle.js` carries compiled movie-specific behavior and calls the runtime's mount path. The sidecar may be plain or packed. Learn from the separation of artwork, timeline, logic, and assets; do not make those generated records your source authoring format.
|
|
526
|
+
|
|
527
|
+
The direct-authoring equivalent is to keep a movie document (scenes, symbols, instances, timeline tracks, assets, and actions) separate from the live display tree. Build or update `Sprite`, `Shape`, `TextField`, and other objects from that document, evaluate a frame, then call the renderer. This keeps editing/scrubbing deterministic and avoids coupling authoring data to transpiler internals.
|
|
528
|
+
|
|
529
|
+
## Runtime roles
|
|
530
|
+
|
|
531
|
+
Keep these responsibilities distinct when writing a new movie:
|
|
532
|
+
|
|
533
|
+
| Layer | Responsibility |
|
|
534
|
+
|---|---|
|
|
535
|
+
| Direct movie/document | Owns scenes, symbols, stable instance IDs, timeline tracks/keyframes, frame evaluation, actions, and app-level pause/seek/navigation. |
|
|
536
|
+
| `swooflib` | Supplies display objects, vector/text/bitmap drawing, transforms, events, hit testing, Flash-compatible classes, and low-level rendering/runtime pieces. |
|
|
537
|
+
| Browser host | Owns the canvas, animation scheduling, native input, asset fetch/decode, resizing, and cleanup. |
|
|
538
|
+
| Generated movie runtime | For transpiled output only: mounts the bundle and timeline data, runs compiled scripts, and applies SWF playback behavior. This is not required for a direct-authored movie. |
|
|
539
|
+
|
|
540
|
+
Use the transpiler/runtime path when the input is an existing SWF. For a movie created directly with Swoof, start from the direct-authoring example above and build the document/player layer your movie needs; do not route your new artwork through generated timeline records.
|
|
541
|
+
|
|
542
|
+
## Runtime initialization and integration boundary
|
|
543
|
+
|
|
544
|
+
`builtins.js` is the runtime assembly entry for generated movies. Importing it installs the Flash package tree, stage, and pointer binding, and publishes runtime helpers on `globalThis.__swoof_swflib`. `render.js`, `input.js`, and many `__swoof_swflib` members are implementation-level facilities used by the generated runtime.
|
|
545
|
+
|
|
546
|
+
For editor or standalone app development:
|
|
547
|
+
|
|
548
|
+
1. Keep the app's document/model separate from Flash display instances.
|
|
549
|
+
2. Build an adapter that maps app objects to `Shape`, `Sprite`, `TextField`, and other appropriate display objects.
|
|
550
|
+
3. Keep editing selection/handles separate from preview input dispatch.
|
|
551
|
+
4. Own app-level scheduling and timeline interpolation unless explicitly using a SWF-hosted `MovieClip`.
|
|
552
|
+
5. Avoid depending directly on private globals or low-level renderer/input helpers.
|
|
553
|
+
6. If multiple apps need the same mount/render/input lifecycle, add a small, tested public facade to `swooflib` and document that facade as the supported API.
|
|
554
|
+
|
|
555
|
+
The editor-specific adapter spike and acceptance checks are described in [`editorspec/swooflib-integration.md`](../editorspec/swooflib-integration.md).
|
|
556
|
+
|
|
557
|
+
## Source map
|
|
558
|
+
|
|
559
|
+
- `builtins.js` — assembles and installs the runtime builtins.
|
|
560
|
+
- `display.js` — display tree classes, geometry, transforms, and hit testing.
|
|
561
|
+
- `graphics.js` — `Graphics`, `Shape`, and `Sprite`.
|
|
562
|
+
- `geom.js`, `transform.js`, `matrix3d.js`, `projection.js` — points, rectangles, affine/color transforms, 3D matrices, and perspective projection.
|
|
563
|
+
- `text-field.js`, `text.js`, `text-paint.js` — text objects, formats, and painting.
|
|
564
|
+
- `events.js`, `input.js`, `pointer-bridge.js`, `stage.js` — events and input routing.
|
|
565
|
+
- `filters.js`, `render.js` — filter objects, masks, compositing, and Canvas display-tree rendering.
|
|
566
|
+
- `bitmap.js`, `bitmap-image.js` — `BitmapData`, `Bitmap`, and bitmap display-image handling.
|
|
567
|
+
- `sound.js` — sound loading/playback, channels, transforms, and mixer support.
|
|
568
|
+
- `loader.js` — `MovieClip`, `SimpleButton`, loader objects, and scene/frame metadata.
|
|
569
|
+
- `boot.js` — compiled movie timeline engine and movie mounting.
|