mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
infra wasm: remove useless wasm test.
the test hasn't been maintained properly, and we won't be maintaining it anymore. please use thorvg.viewer intead. it's much more accurate.
This commit is contained in:
parent
6ab32cae0b
commit
3eca77b280
2 changed files with 0 additions and 27 deletions
|
@ -1,26 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<canvas id="thorvg" width="320" height="320"></canvas>
|
|
||||||
<script>
|
|
||||||
var Module = {
|
|
||||||
onRuntimeInitialized: function() {
|
|
||||||
|
|
||||||
class SvgViewer {
|
|
||||||
constructor() {
|
|
||||||
var thorvg = new Module.ThorvgWasm();
|
|
||||||
this.canvas = document.getElementById("thorvg");
|
|
||||||
var context = this.canvas.getContext('2d');
|
|
||||||
thorvg.load("", this.canvas.width, this.canvas.height);
|
|
||||||
var buffer = thorvg.render();
|
|
||||||
var clampedBuffer = Uint8ClampedArray.from(buffer);
|
|
||||||
var imageData = new ImageData(clampedBuffer, this.canvas.width, this.canvas.height);
|
|
||||||
context.putImageData(imageData, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var instance = new SvgViewer();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<script src="thorvg-wasm.js"></script>
|
|
||||||
</html>
|
|
|
@ -5,7 +5,6 @@
|
||||||
if [ ! -d "./build_wasm" ]; then
|
if [ ! -d "./build_wasm" ]; then
|
||||||
sed "s|EMSDK:|$1|g" wasm_cross.txt > /tmp/.wasm_cross.txt
|
sed "s|EMSDK:|$1|g" wasm_cross.txt > /tmp/.wasm_cross.txt
|
||||||
meson -Db_lto=true -Ddefault_library=static -Dstatic=true -Dloaders="all, lottie_beta" -Dsavers="all" -Dbindings="wasm" -Dlog=true --cross-file /tmp/.wasm_cross.txt build_wasm
|
meson -Db_lto=true -Ddefault_library=static -Dstatic=true -Dloaders="all, lottie_beta" -Dsavers="all" -Dbindings="wasm" -Dlog=true --cross-file /tmp/.wasm_cross.txt build_wasm
|
||||||
cp ./test/wasm/wasm_test.html build_wasm/src/index.html
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ninja -C build_wasm/
|
ninja -C build_wasm/
|
||||||
|
|
Loading…
Add table
Reference in a new issue