slint/examples/graphicstest
Simon Hausmann 48df8d0911 Rework the API between the items and the renderer
Move fields out of the HighLevelRenderingPrimitive that are suitable to
represent as uniform variables. That reduces fields like Image or
Rectangle to their image or dimension, and only if *they* change, then
we re-do the work of building geometry and uploading it to the GPU.

Instead, the typically animated properties such as the position or the
color are passed separately with each draw call. This avoids re-decoding
PNG files and uploading them again when moving an image element around
on the screen.
2020-08-05 09:44:12 +02:00
..
src Rework the API between the items and the renderer 2020-08-05 09:44:12 +02:00
.gitignore Ignore some generated files 2020-05-11 08:59:39 +02:00
Cargo.toml Rename sixtyfps_corelib to sixtyfps-corelib 2020-08-03 10:01:58 +02:00
index.html Fix wasm build 2020-05-07 15:07:29 +02:00
logo.png Start with image rendering 2020-05-05 18:20:21 +02:00
README Add README that explains how to try the wasm build 2020-05-07 15:07:29 +02:00

To try the WASM build, use these steps:

cargo build --target wasm32-unknown-unknown --bin graphicstest
cd examples/graphicstest
mkdir -p generated
wasm-bindgen ../../target/wasm32-unknown-unknown/debug/graphicstest.wasm --out-dir generated --no-modules
cp index.html generated/

Then serve for example with

cd generated/
python -m SimpleHTTPServer

and go to

http://localhost:8000/index.html