skia2/demos.skia.org/demos/web_worker/index.html
Kevin Lubick 7026961111 [canvaskit] Remove references to particles.skia.org from demos
We should encourage users to use a real CDN, not a random build of ours.

This also fixes a few broken demos.

Change-Id: I3b607665744b5f481bca0b9b3072aaa25b3d2c57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/371221
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-02-18 19:00:44 +00:00

40 lines
1.2 KiB
HTML

<!DOCTYPE html>
<title>CanvasKit Web Worker Demo</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
canvas {
border: 1px dashed grey;
}
.canvas-container {
float: left;
}
</style>
<body>
<h1>CanvasKit in a Web Worker demo</h1>
<p>NOTE: this demo currently only works in chromium-based browsers, where
<a href="https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas#Browser_compatibility">
Offscreen Canvas
</a>
is supported.
</p>
<div class="canvas-container">
<h2>Normal Canvas</h2>
<canvas id="onscreen-canvas" width=500 height=500></canvas>
<button id="busy-button">Make main thread busy</button>
</div>
<div class="canvas-container">
<h2>Web Worker Canvas</h2>
<canvas id="offscreen-canvas" width=500 height=500></canvas>
</div>
</body>
<!-- TODO(kjlubick) Remove the particles link when we have skottie in npm again -->
<script type="text/javascript" src="https://particles.skia.org/dist/canvaskit.js"></script>
<script type="text/javascript" src="shared.js"></script>
<script type="text/javascript" src="main.js"></script>