f8289b47d8
* avm2: Implement call stack * avm2: Class traits should have a special prefix * avm2: Stack tracebacks should also contain error message * avm2: Move method naming to Executable * avm2: Handle getter and setter methods in tracebacks * chore: Formatting * chore: Add comments * avm2: Make full_name write to a string, instead of creating a new one * core: Make GcArena publicly accessible * core: Add Deref impl for Either type * desktop: Add AVM2 call stack to panic message * avm2: Prefix native methods with a `/` * chore: Appease clippy * avm2: Check if method actually contains bytecode instead of unwrapping * web: Add AVM2 stack trace to panic message * chore: Formatting * chore: Clippy * avm2: Fix stack traces for free standing functions * core: Remove global data from context * core: Rename GcGlobalData to GcCallstack * core: Introduce StaticCallstack, make GcArena private again Co-authored-by: Adrian Wielgosik <4729533+adrian17@users.noreply.github.com> |
||
---|---|---|
.. | ||
src | ||
test | ||
tools | ||
.gitignore | ||
.mocharc.yaml | ||
README.md | ||
package.json | ||
tsconfig.json | ||
typedoc.json |
README.md
ruffle-core
ruffle-core is the core javascript bindings to the Wasm ruffle-web binary, and contains the actual public API.
Using ruffle-core
For more examples and in-depth documentation on how to use Ruffle on your website, please check out our wiki.
Host Ruffle
The core
package is configured for websites that build and bundle their files themselves.
Simply add ruffle
to an npm package, and use something like Webpack to actually bundle and serve
the files.
If you wish to use Ruffle on a website that doesn't use npm, we have a pre-bundled version which we call 'selfhosted'. Please refer to its documentation.
Please note that the .wasm
file must be served properly, and some web servers may not do that
correctly out of the box. Please see our wiki
for instructions on how to configure this, if you encounter a Incorrect response MIME type
error.
"Plug and Play"
If you have an existing website with flash content, you can simply include Ruffle as a script and our polyfill magic will replace everything for you. No fuss, no mess.
<script src="path/to/ruffle/ruffle.js"></script>
Javascript API
If you want to control the Ruffle player, you may use our Javascript API.
<script>
window.RufflePlayer = window.RufflePlayer || {};
window.addEventListener("DOMContentLoaded", () => {
let ruffle = window.RufflePlayer.newest();
let player = ruffle.createPlayer();
let container = document.getElementById("container");
container.appendChild(player);
player.load("movie.swf");
});
</script>
<script src="path/to/ruffle/ruffle.js"></script>
Building, testing or contributing
Please see the ruffle-web README.