dependabot-preview[bot]
fde5e0a730
build(deps-dev): bump webpack from 4.41.5 to 4.41.6 in /web/selfhosted
...
Bumps [webpack](https://github.com/webpack/webpack ) from 4.41.5 to 4.41.6.
- [Release notes](https://github.com/webpack/webpack/releases )
- [Commits](https://github.com/webpack/webpack/compare/v4.41.5...v4.41.6 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-12 01:25:30 +00:00
dependabot-preview[bot]
6681e843a9
build(deps): bump byteorder from 1.3.2 to 1.3.4
...
Bumps [byteorder](https://github.com/BurntSushi/byteorder ) from 1.3.2 to 1.3.4.
- [Release notes](https://github.com/BurntSushi/byteorder/releases )
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md )
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.3.2...1.3.4 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-12 00:57:11 +00:00
dependabot-preview[bot]
c17fa52565
build(deps-dev): bump webpack-dev-server in /web/selfhosted
...
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server ) from 3.10.2 to 3.10.3.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases )
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.10.2...v3.10.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-12 00:53:47 +00:00
Mike Welsh
843169d0e8
core: Merge #350 , improved dynamic text support
2020-02-11 16:52:44 -08:00
David Wendt
18516c8eac
Pre-strip HTML from HTML tags, rather than skipping them.
2020-02-03 19:32:05 -05:00
David Wendt
7d225f8b55
Fix overflow when shifting `u8`s
2020-02-03 14:46:36 -05:00
David Wendt
3d6b00c1e4
Impl the remaining text layout properties
2020-02-03 14:46:36 -05:00
David Wendt
517e7ce9ff
Add word-wrap for `measure_text` and caching for word-wrap calculations
2020-02-03 14:46:36 -05:00
David Wendt
5e808c8cd6
Adjust the wordwrap machinery to work in break points (indicies where new lines start) so we can cache them later
2020-02-03 14:46:35 -05:00
David Wendt
fb8664c818
Implement wordWrap and multiline rendering, poorly
2020-02-03 14:46:35 -05:00
David Wendt
7df8eb7674
Impl `is_multiline`'s effect of respecting newlines
2020-02-03 14:46:35 -05:00
David Wendt
f95ec777de
Also impl storage of the `wordWrap` flag
2020-02-03 14:46:34 -05:00
David Wendt
819757e2b6
Fix text measurement now that the underlying SWF tags are correctly parsed as `Twips`.
...
Transform coordinates are always in twips, so we have to convert pixels to twips when evaluating the font, and then convert back when measuring.
2020-02-03 14:46:34 -05:00
David Wendt
63b7d172f4
`TextRecord.height` is also in `Twips`.
...
Notably, the `Text` rendering code does not appear to actually work in pixel scale.
2020-02-03 14:46:34 -05:00
David Wendt
fde7715fb8
`EditText.height` is in `Twips`
2020-02-03 14:46:33 -05:00
David Wendt
75022f36d2
Pull `TextFormat` into the `font` module.
...
Also, since there's a separate function for attaching virtual properties to an AVM1 `TextField` object, let's use that!
2020-02-03 14:46:33 -05:00
David Wendt
4b3660bf2c
Impl get/set for `is_multiline`.
2020-02-03 14:46:32 -05:00
David Wendt
c1ff1d94d5
Pull the `EditText.evaluateFont` method into `Font`.
...
`Text` itself doesn't use this method, but it probably could with some changes.
2020-02-03 14:46:32 -05:00
David Wendt
81b7958090
Impl `textWidth` / `textHeight`, although it currently only works well for single-line scenarios.
2020-02-03 14:46:32 -05:00
David Wendt
2181f0d0d0
Impl `getNewTextFormat`/`setNewTextFormat`.
...
These don't actually do anything yet, because we don't track text spans, nor do we actually use those text spans to alter rendering or text layout.
2020-02-03 14:46:30 -05:00
David Wendt
db56217f20
`TextFormat` does *not* coerce `undefined` or `null`; instead those both become `null`.
2020-02-03 14:46:30 -05:00
David Wendt
8449d964ef
Implement `TextFormat` as a property bag.
2020-02-03 14:46:29 -05:00
David Wendt
2b0600ab1a
Impl `createTextField`.
2020-02-03 14:46:29 -05:00
dependabot-preview[bot]
580144d57b
build(deps): bump structopt from 0.3.8 to 0.3.9
...
Bumps [structopt](https://github.com/TeXitoi/structopt ) from 0.3.8 to 0.3.9.
- [Release notes](https://github.com/TeXitoi/structopt/releases )
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.8...v0.3.9 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-01 11:05:33 +00:00
Mike Welsh
2ff76775e0
core: Empty movie clips can not be used as a mask
...
When a movie clip or button is used as a mask, the masking will be
disabled if that object has no children; the maskee will be
completely visible. An empty movie clip inside an empty movie clip
successfully masks.
An EditText can also not be used as a masker (although it can be
wrapped inside a movie clip, and then the text successfully masks).
Add a `TDisplayObject::allow_mask` trait method that will
return whether the object can be used as a mask.
This fixes characters not being visible in Dad 'n' Me.
2020-02-01 01:15:31 -08:00
Mike Welsh
6b7966f3fc
chore: Update comments in canvas mask rendering
2020-01-31 20:27:24 -08:00
Mike Welsh
2e304a81ef
core: Flag as transformed-by-script after swapDepths
2020-01-31 19:44:42 -08:00
Mike Welsh
a55a378a73
avm1: Improve comments in MovieClip depth methods
2020-01-31 19:44:42 -08:00
Mike Welsh
4d1f7c4d4a
tests: Add movieclip depth method tests
2020-01-31 19:44:42 -08:00
Mike Welsh
a4e175a790
avm1: Implement MovieClip.getNextHighestDepth
2020-01-31 19:44:42 -08:00
Mike Welsh
4d12cd1566
avm1: Implement MovieClip.getDepth
2020-01-31 19:44:42 -08:00
Mike Welsh
9e337ede34
avm1: Implement MovieClip.swapDepths
2020-01-31 19:44:42 -08:00
dependabot-preview[bot]
2f98fd1a0e
build(deps-dev): bump webpack-dev-server in /web/selfhosted
...
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server ) from 3.10.1 to 3.10.2.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases )
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.10.1...v3.10.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-31 19:44:42 -08:00
dependabot-preview[bot]
9d950e3705
build(deps-dev): bump webpack-dev-server in /web/selfhosted
...
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server ) from 3.10.1 to 3.10.2.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases )
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.10.1...v3.10.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-31 19:05:42 +00:00
Mike Welsh
0d91fb423e
core: Goto only runs if frame is an integer
2020-01-30 15:17:01 -08:00
Mike Welsh
c079cb3bca
core: Don't run frame actions when seeking past end of timeline
...
If you goto past the final loaded frame of a timeline, for example,
with gotoAndStop(9999), this seeks to the final frame on the
timeline, but it doesn't run the actions on this frame.
MovieClip::goto_frame now will not run the final frame actions if
the target frame was not reached.
2020-01-30 15:17:01 -08:00
Mike Welsh
8aae07bbf3
core: Frame labels are case insensitive
2020-01-30 15:17:01 -08:00
Mike Welsh
a835573f3c
tests: Add test for global GotoFrame action
2020-01-30 15:17:01 -08:00
Mike Welsh
62467bb880
avm1: Handle invalid parameters in GotoFrame2
...
Use the same code path for the global GotoFrame2 action and
MovieClip.gotoAndX, which properly handles out-of-range and invalid
values like NaN.
Fixes Disorderly hanging on game start
(https://www.newgrounds.com/portal/view/121896 )
2020-01-30 15:17:01 -08:00
Mike Welsh
3ab0d4ef80
web: Merge #352 , improved performance on canvas
...
Shape-drawing performance improvements on the canvas backend.
2020-01-30 15:16:09 -08:00
dependabot-preview[bot]
cf2d29f65a
build(deps): bump indicatif from 0.13.0 to 0.14.0
...
Bumps [indicatif](https://github.com/mitsuhiko/indicatif ) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/mitsuhiko/indicatif/releases )
- [Commits](https://github.com/mitsuhiko/indicatif/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 17:42:12 +00:00
Mike Welsh
087f15f28c
web: Clear audio decoding buffer before each decode ( fix #357 )
2020-01-29 12:29:54 -08:00
David Wendt
abedb1262a
Make sure `DrawImage` commands get the image filter.
2020-01-29 14:19:19 -05:00
David Wendt
30fc56649b
Clamp u8 values to the [0, 255] range.
2020-01-29 14:19:19 -05:00
David Wendt
a57d0e12b3
Do not apply a color filter at all unless rendering a bitmap or gradient.
...
This significantly improves render times, as browsers appear to apply filters in the most general, inefficient way possible.
2020-01-29 14:19:18 -05:00
David Wendt
746971e38a
Avoid unnecessary calls to `set_attribute`/`set_filter`.
2020-01-29 14:19:18 -05:00
David Wendt
693537a294
Line widths and miter limits should be in pixels, not twips
2020-01-29 14:19:18 -05:00
David Wendt
b611067bc5
First pass on a more-optimized render path that uses canvas draw commands directly rather than precompiling SVGs as images.
2020-01-29 14:19:18 -05:00
David Wendt
4ee60d9214
Make `swf_shape_to_svg` output the entire `ShapeData` list itself, and also it's not called that anymore.
2020-01-29 14:19:18 -05:00
David Wendt
70cdcb60a7
Break shape data up into a series of canvas commands, including direct fills and strokes.
2020-01-29 14:19:18 -05:00