Nathan Adams
df6764a69c
chore: Add license metadata to all packages & crates
2020-05-27 00:11:02 -07:00
JustinCB
e4f7c950bb
chore: Enable fixed tests
2020-05-26 23:56:36 -07:00
JustinCB
4828945666
web: Fix frame polyfill
2020-05-26 23:56:36 -07:00
Sean-Thomas
2d557f8fb6
Added Opt-Groups for Web Demo
...
This commit adds HTML Opt-Groups separating Games and Animations on the web demo sample dropdown menu. There are also a few tiny styling changes. Mainly the addition of a transition duration to the logo image, as well as changing "max-device-width" to "max-width" on a media query so that the "mobile" view is shown if you scale down the window on desktop browsers.
2020-05-24 19:09:19 -07:00
dependabot-preview[bot]
35d46daa36
build(deps-dev): bump lerna from 3.21.0 to 3.22.0 in /web
...
Bumps [lerna](https://github.com/lerna/lerna/tree/HEAD/core/lerna ) from 3.21.0 to 3.22.0.
- [Release notes](https://github.com/lerna/lerna/releases )
- [Changelog](https://github.com/lerna/lerna/blob/master/core/lerna/CHANGELOG.md )
- [Commits](https://github.com/lerna/lerna/commits/v3.22.0/core/lerna )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-25 01:43:07 +00:00
Nathan Adams
d846ed943b
web: Split frame/iframe polyfill tests into provided vs injected, as we see issues with one or the other
2020-05-24 08:57:16 -07:00
Nathan Adams
8a32f0d053
web: Add polyfill test for <iframe>s
2020-05-24 08:57:16 -07:00
Nathan Adams
a7abdba49c
web: Add test for classic <frame>s
2020-05-24 08:57:16 -07:00
Nathan Adams
a0bfe72b19
web: Add polyfill tests
2020-05-24 08:57:16 -07:00
Nathan Adams
34927583be
web: Made VersionRange actually work, and add tests for it
2020-05-23 10:35:53 -07:00
dependabot-preview[bot]
daebcbfed5
build(deps-dev): bump eslint from 7.0.0 to 7.1.0 in /web
...
Bumps [eslint](https://github.com/eslint/eslint ) from 7.0.0 to 7.1.0.
- [Release notes](https://github.com/eslint/eslint/releases )
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md )
- [Commits](https://github.com/eslint/eslint/compare/v7.0.0...v7.1.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-23 17:28:44 +00:00
dependabot-preview[bot]
f8062b610f
build(deps-dev): bump mocha from 7.1.2 to 7.2.0 in /web
...
Bumps [mocha](https://github.com/mochajs/mocha ) from 7.1.2 to 7.2.0.
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/v7.2.0/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v7.1.2...v7.2.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-23 17:28:03 +00:00
Mike Welsh
94f2154514
chore: Bump copy-webpack-plugin to 6.0.1
2020-05-20 23:34:17 -07:00
Justin-CB
cbc2f6a03a
web: Avoid TypeError when instantiating polyfill ( fix #607 )
...
Co-authored-by: JustinCB <JustinCB@opmbx.org>
2020-05-20 12:42:54 -07:00
Justin-CB
1582584be8
chore: Run npm audit fix
...
Co-authored-by: JustinCB <JustinCB@opmbx.org>
2020-05-20 11:30:06 -07:00
dependabot-preview[bot]
6f5f389f7a
build(deps-dev): bump html-webpack-plugin from 3.2.0 to 4.3.0 in /web
...
Bumps [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin ) from 3.2.0 to 4.3.0.
- [Release notes](https://github.com/jantimon/html-webpack-plugin/releases )
- [Changelog](https://github.com/jantimon/html-webpack-plugin/blob/master/CHANGELOG.md )
- [Commits](https://github.com/jantimon/html-webpack-plugin/compare/v3.2.0...v4.3.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-20 04:10:38 +00:00
Nathan Adams
6b464bf80f
web: Build core on preparation of the core package
2020-05-19 11:42:57 +02:00
Nathan Adams
82c1930c0f
web: web doesn't need install before bootstrap now
2020-05-19 11:42:57 +02:00
Nathan Adams
9f4455f2fb
web: Fixed extra </div> in demo
2020-05-19 11:42:56 +02:00
Nathan Adams
3fcb7f08e2
web: Add 'npm run format' command for ease of use
2020-05-19 11:42:56 +02:00
Nathan Adams
d1bb3c4e28
web: Array.flat doesn't exist in node10
2020-05-19 11:42:56 +02:00
Nathan Adams
2f9846b05c
web: Don't hoist in lerna bootstrap, it seems to cause issues installing CLI dependencies
2020-05-19 11:42:56 +02:00
Nathan Adams
b0b54b59f9
web: Avoid any issues with parseInt("0...")
2020-05-19 11:42:56 +02:00
Nathan Adams
f3690db1bf
web: Fixed bug with broken comparisons in Version#is_compatible_with
2020-05-19 11:42:55 +02:00
Nathan Adams
bd6ed0b234
web: Add initial tests to core package
2020-05-19 11:42:55 +02:00
Nathan Adams
11f68b90f9
web: Switch to using commonjs style require/exports
...
It looks like things still don't play nice with modules yet :(
2020-05-19 11:42:55 +02:00
Nathan Adams
b2cc178d8e
web: We don't need to specify npx here I think
2020-05-19 11:42:54 +02:00
Nathan Adams
b8e63045b2
web: Moved source of core into core/src, to prep for tests
2020-05-19 11:42:54 +02:00
Nathan Adams
55c9672921
web: Simplified export interface of ruffle-core
2020-05-19 11:42:54 +02:00
Nathan Adams
0ab3c9f69b
web: Made demo use ruffle-selfhosted
2020-05-19 11:42:54 +02:00
Nathan Adams
e9a394ac27
web: Only core will build ruffle, the other packages will use that
2020-05-19 11:42:54 +02:00
Nathan Adams
8436c1f9d9
web: Update package-lock
2020-05-19 11:42:53 +02:00
Nathan Adams
7b8a4ffed1
web: Switch to using lerna for package management
2020-05-19 11:42:53 +02:00
Nathan Adams
b6523324ed
web: Move each web package into a packages/ directory
2020-05-19 11:42:53 +02:00
Nathan Adams
df341959b3
web: Convert js-src to its own package that's depended on by selfhosted/extension/demo
2020-05-19 11:42:53 +02:00
Justin-CB
5d56d6b489
extension: Remove unneded code from lv0.js
...
Co-authored-by: JustinCB <JustinCB@opmbx.org>
2020-05-19 02:41:44 -07:00
dependabot-preview[bot]
6134ae091f
build(deps): bump generational-arena from 0.2.7 to 0.2.8
...
Bumps [generational-arena](https://github.com/fitzgen/generational-arena ) from 0.2.7 to 0.2.8.
- [Release notes](https://github.com/fitzgen/generational-arena/releases )
- [Changelog](https://github.com/fitzgen/generational-arena/blob/master/CHANGELOG.md )
- [Commits](https://github.com/fitzgen/generational-arena/compare/0.2.7...0.2.8 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-18 23:54:45 -07:00
Nathan Adams
a4b705c731
web: Reformatted all javascript with prettier
2020-05-16 01:58:18 -07:00
Nathan Adams
56e467b557
web: Add prettier, not yet ran on codebase
2020-05-16 01:58:18 -07:00
Nathan Adams
0bb188ad0b
web: Fix bug where we didn't properly catch when custom elements weren't registering
2020-05-16 01:58:18 -07:00
Nathan Adams
6ec77e0ca2
web: Fixed construction of SourceAPI ignoring the provided name
2020-05-16 01:58:18 -07:00
Nathan Adams
077c3ec973
web: Fix broken version comparison logic
2020-05-16 01:58:18 -07:00
Nathan Adams
18d747d5fa
web: Fix eslint: Unexpected duplicate 'super()' (constructor-super)
2020-05-16 01:58:18 -07:00
Nathan Adams
efe33e1631
web: Fix eslint: Don't access Object.prototype method directly (no-prototype-builtins)
2020-05-16 01:58:18 -07:00
Nathan Adams
2c0b12a93f
web: Fix eslint: Variable is defined but not used (no-unused-vars)
2020-05-16 01:58:18 -07:00
Nathan Adams
0b445bee1c
web: Fix eslint: Unnecessary semicolon (no-extra-semi)
2020-05-16 01:58:18 -07:00
Nathan Adams
43ee0e499e
web: Add eslint to web projects, mostly unopinionated
2020-05-16 01:58:18 -07:00
Nathan Adams
1bb7b49411
web: Add root npm project for web
2020-05-16 01:58:18 -07:00
Mike Welsh
d15a4ed994
web: Fallback to canvas render backend in more cases ( fix #545 )
2020-05-14 22:36:19 -07:00
dependabot-preview[bot]
1f0e695465
build(deps): bump fnv from 1.0.6 to 1.0.7
...
Bumps [fnv](https://github.com/servo/rust-fnv ) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/servo/rust-fnv/releases )
- [Commits](https://github.com/servo/rust-fnv/compare/v1.0.6...v1.0.7 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-14 19:05:48 +00:00
Justin-CB
ee69f77126
web: Don't polyfill elements with no src or data attributes (fix #542 )
...
* Don't polyfill elements with no src or data attributes
* Move elem.src check to ruffle-embed and add param check to ruffle-object
Co-authored-by: Toad06 <toad06@foo.bar>
Co-authored-by: JustinCB <JustinCB@opmbx.org>
2020-05-11 23:33:46 -07:00
Mike Welsh
604bcb9285
chore: Formatting
2020-05-10 21:54:21 -07:00
JustinCB
75f398cf16
Added optout
2020-05-10 21:54:21 -07:00
JustinCB
7413732834
Add plugin polyfill code to lv0.js (thanks @Toad06 )
2020-05-10 21:54:21 -07:00
JustinCB
29eacdfd21
Simplify loading code
2020-05-10 21:54:21 -07:00
JustinCB
93eb796045
Insert ruffle earlier
2020-05-10 21:54:21 -07:00
JustinCB
21ebabce7e
Refactored getting extension path out of insertion function
2020-05-10 21:54:21 -07:00
JustinCB
850fb81574
Load ruffle.js at page load
2020-05-10 21:54:21 -07:00
dependabot-preview[bot]
1e971a6cff
build(deps-dev): bump webpack-dev-server in /web/selfhosted
...
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server ) from 3.10.3 to 3.11.0.
- [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.3...v3.11.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-10 10:30:10 +00:00
Justin-CB
f9767e0da4
web: Simplify play button code
...
Co-authored-by: JustinCB <JustinCB@opmbx.org>
2020-05-04 16:12:55 -07:00
Nathan Adams
51d9f3ef36
core: Change Player::new to take in a SwfMovie, not &[u8]
2020-05-04 16:07:38 -07:00
Mike Welsh
2331b49ea4
web: Enable canvas feature by default
...
WebGL will take priority. Fallback to canvas if WebGL creation
fails.
2020-05-04 08:10:53 -07:00
Mike Welsh
cde7798ded
webgl: Default MSAA to 4x, 2x on mobile/tablets
...
Also ensure we clamp MSAA at maximum available, in case the sample
count is not supported by the device.
2020-05-02 10:41:09 -07:00
Mike Welsh
936b314569
web: Add features for enabling webgl/canvas backend
2020-05-02 10:39:40 -07:00
Mike Welsh
fa5c09b0cd
web: Add WebGL render backend
2020-05-02 10:38:18 -07:00
Mike Welsh
f09bd8c079
core: Clean up tick/render loop
...
Don't call `render` from `Player::tick`; instead, require the
frontends to explicitly call `render` when they wish to redraw.
The frontend can query `Player::needs_render` to see if the stage
is dirty and needs a redraw. Update desktop and web to use this
new method.
This fits better with the newer winit event loop model, which
requires explicitly calling `request_redraw`, and should avoid
spurious renders.
2020-05-02 04:25:21 -07:00
Mike Welsh
87bf0f44c4
render: Move canvas renderer to separate subcrate
2020-04-29 23:26:41 -07:00
Sean-Thomas
97d1eb5eb9
Web Demo Mobile Styling Changes + Bug Fix
...
- Mobile styling changes for web demo page on mobile devices. Now the sample dropdown will show up on smaller devices.
-Fixed bug with random selection of SWF files.
2020-04-29 23:26:11 -07:00
JustinCB
a3733705a8
web: Add "frames" polyfill setting
2020-04-29 23:23:25 -07:00
Justin-CB
c8989e4d28
web: Add all_frames to make extension work on pages with frames
2020-04-29 23:23:25 -07:00
Mike Welsh
4a53d95753
web: Add width and height to observed attributes for Ruffle elements
2020-04-28 06:10:41 -07:00
Mike Welsh
46b14e5a7f
web: Tweak shadow template CSS to ensure default width/height ( fix #529 )
2020-04-28 05:50:50 -07:00
dependabot-preview[bot]
014df249a8
build(deps): bump jpeg-decoder from 0.1.18 to 0.1.19
...
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder ) from 0.1.18 to 0.1.19.
- [Release notes](https://github.com/image-rs/jpeg-decoder/releases )
- [Changelog](https://github.com/image-rs/jpeg-decoder/blob/master/CHANGELOG.md )
- [Commits](https://github.com/image-rs/jpeg-decoder/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-28 04:54:23 +00:00
Mike Welsh
0921f18417
web: Avoid out-of-bounds slice from zero sample SoundStreamBlock
2020-04-27 07:49:59 -07:00
Mike Welsh
8aa12d181f
render: Remove RenderBackend::draw_pause_overlay
2020-04-27 04:45:53 -07:00
Mike Welsh
c94df5243e
web: Add nicer play button
2020-04-27 04:45:53 -07:00
dependabot-preview[bot]
56bed86a89
build(deps): bump svg from 0.7.2 to 0.8.0
...
Bumps [svg](https://github.com/bodoni/svg ) from 0.7.2 to 0.8.0.
- [Release notes](https://github.com/bodoni/svg/releases )
- [Commits](https://github.com/bodoni/svg/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-26 21:18:43 +00:00
dependabot-preview[bot]
f7cf943740
build(deps-dev): bump @wasm-tool/wasm-pack-plugin in /web/selfhosted
...
Bumps [@wasm-tool/wasm-pack-plugin](https://github.com/wasm-tool/wasm-pack-plugin ) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/wasm-tool/wasm-pack-plugin/releases )
- [Commits](https://github.com/wasm-tool/wasm-pack-plugin/compare/v1.3.0...v1.3.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-25 11:33:38 +00:00
dependabot-preview[bot]
169fb6a1a3
build(deps-dev): bump webpack from 4.42.1 to 4.43.0 in /web/selfhosted
...
Bumps [webpack](https://github.com/webpack/webpack ) from 4.42.1 to 4.43.0.
- [Release notes](https://github.com/webpack/webpack/releases )
- [Commits](https://github.com/webpack/webpack/compare/v4.42.1...v4.43.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-25 10:19:35 +00:00
dependabot-preview[bot]
62ab2ad787
build(deps-dev): bump @wasm-tool/wasm-pack-plugin in /web/selfhosted
...
Bumps [@wasm-tool/wasm-pack-plugin](https://github.com/wasm-tool/wasm-pack-plugin ) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/wasm-tool/wasm-pack-plugin/releases )
- [Commits](https://github.com/wasm-tool/wasm-pack-plugin/compare/v1.2.0...v1.3.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-22 20:22:39 +00:00
dependabot-preview[bot]
307d27709f
build(deps): bump console_log from 0.1.2 to 0.2.0
...
Bumps [console_log](https://github.com/iamcodemaker/console_log ) from 0.1.2 to 0.2.0.
- [Release notes](https://github.com/iamcodemaker/console_log/releases )
- [Commits](https://github.com/iamcodemaker/console_log/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-21 12:59:40 +00:00
dependabot-preview[bot]
0dfe0d76c1
build(deps): bump png from 0.16.2 to 0.16.3
...
Bumps [png](https://github.com/image-rs/image-png ) from 0.16.2 to 0.16.3.
- [Release notes](https://github.com/image-rs/image-png/releases )
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image-png/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-19 21:32:03 +00:00
Mike Welsh
ddfd84ecdd
web: Stop playing sounds when an instance is destroyed
2020-04-13 04:57:10 -07:00
Sean-Thomas
4d91a202e1
web/demo: Add dropdown to select sample SWF
...
- replaced static polyfill embed on web demo with JS API code.
- added swf_lib JSON file for sample SWFs.
- added console logs for when a Ruffle instance is created or destroyed in ruffle-player.js.
- more minor styling changes to the web demo index page.
2020-04-13 04:55:57 -07:00
dependabot-preview[bot]
6d837d69d4
build(deps): bump svg from 0.7.1 to 0.7.2
...
Bumps [svg](https://github.com/bodoni/svg ) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/bodoni/svg/releases )
- [Commits](https://github.com/bodoni/svg/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-13 11:15:12 +00:00
dependabot-preview[bot]
c20f3736ca
build(deps): bump png from 0.16.1 to 0.16.2
...
Bumps [png](https://github.com/image-rs/image-png ) from 0.16.1 to 0.16.2.
- [Release notes](https://github.com/image-rs/image-png/releases )
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md )
- [Commits](https://github.com/image-rs/image-png/compare/v0.16.1...v0.16.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-04 07:03:37 +00:00
Justin-CB
ba19e6c2e1
web: Add additional flash MIME types to polyfill
...
Co-authored-by: Justin Bester <justin@frankenmando.local>
2020-04-01 18:45:32 -07:00
Mike Welsh
0c0d3dfd41
core: Add Navigator::time_since_launch to use for getTimer
...
Change `ActionGetTime` (`getTimer`) to use a new backend method.
This allows it to return updated times if it is called multiple
times in a single frame. This fixes hangs caused by games that use
busy-loop "frame limiter" code.
2020-03-28 22:28:07 -07:00
Sean-Thomas
ec869fa656
Tweaked styling for demo page
2020-03-28 19:42:15 -07:00
Mike Welsh
c1abbdacdd
chore: Fix naming convention
2020-03-26 02:55:25 -07:00
Mike Welsh
e237536293
web: Blacklist "Adobe Flash Player" title attribute ( fix #468 )
...
The "Click to activate Flash" box from Chrome stomps on the title
attribute of a Flash embed when you mouse over it. This causes
an annoying "Adobe Flash Player" tooltip to appear even after
Ruffle replaces the embeds.
Now we check for this specific title and remove it.
2020-03-26 02:37:25 -07:00
Mike Welsh
c2e9d5d757
web: Install plugin spoof immediately on script load
...
Scripts like SWFObject check for the Flash plugin immediately when
they load, so we can't defer installing the spoof. Fixes #448 .
2020-03-25 20:14:31 -07:00
Mike Welsh
353eeec6c3
web: Return matching Flash Player version for MIME type description
...
The plugin detection spoofer would add " "Shockwave Flash 32.0 r0
(compatible; Ruffle 0.1)" to the Flash MIME type description in
the plugins array. However, this breaks SWFObject's version
detection, which does a simple String split.
Now we return the same value as the official player:
"Shockwave Flash 32.0 r0"
2020-03-25 20:14:31 -07:00
Mike Welsh
774aa59210
web: Default public_path to currentScript URL
...
Also automatically add trailing slash on public_path if necessary.
2020-03-25 00:54:21 -07:00
Mike Welsh
5591cec0f7
web: Fix #412 , incorrect bitmap rendering when cached
2020-03-24 23:08:15 -07:00
Mike Welsh
fa063a6f53
web: Enable dynamic-content polyfill by default
...
Co-authored-by: Justin-CB <55590227+Justin-CB@users.noreply.github.com>
2020-03-24 22:13:10 -07:00
Mike Welsh
e332e5c24c
web: Simplify polyfill code
...
Addresses #464 . Use `document.getElementsByTagName` to find all
object and embed tags in the document. For dynamic content,
we keep these live collections around, and re-check them whenever
a MutationObserver fires.
Co-authored-by: Justin-CB <55590227+Justin-CB@users.noreply.github.com>
2020-03-24 22:13:10 -07:00
dependabot-preview[bot]
80bfaa5f11
build(deps-dev): bump webpack from 4.42.0 to 4.42.1 in /web/selfhosted
...
Bumps [webpack](https://github.com/webpack/webpack ) from 4.42.0 to 4.42.1.
- [Release notes](https://github.com/webpack/webpack/releases )
- [Commits](https://github.com/webpack/webpack/compare/v4.42.0...v4.42.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-24 19:29:20 +00:00
Mike Welsh
4561b591bf
web: Handle percentage dimensions in polyfill ( fix #433 )
...
When Ruffle replaces a Flash embed, the width/height of the embed
are copied over to CSS of the Ruffle element. "px" was being
appended even if the dimensions were a % value, which CSS rejected.
Try to be a little smarter about parsing out the HTML dimension
attributes (HTML is more lenient). Append "px" only if the value
isn't a percentage.
Fixes #433 .
2020-03-21 01:23:23 -07:00
Mike Welsh
9e6fe41a91
web: Ignore errors on `Element.setAttribute` in polyfill
...
Ruffle would not polyfill a Flash embed if it had bogus attributes
in the embed tag. Now these errors are silently ignored.
Fixes the other part of #457 .
2020-03-20 20:47:58 -07:00