annotate Samples/WebAssembly/BasicScene.html @ 984:35ed6812d639 toa2019090602

Build fix
author Benjamin Golinvaux <bgo@osimis.io>
date Fri, 06 Sep 2019 11:46:51 +0200
parents 0925b27e8750
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
616
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 <!doctype html>
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 <html lang="en-us">
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 <head>
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 <meta charset="utf-8">
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 <!-- Disable pinch zoom on mobile devices -->
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 <meta name="HandheldFriendly" content="true" />
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 <title>Stone of Orthanc</title>
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 <style>
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 html, body {
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 width: 100%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 height: 100%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 margin: 0px;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 border: 0;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 overflow: hidden; /* Disable scrollbars */
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 display: block; /* No floating content on sides */
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 }
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #mycanvas1 {
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 position:absolute;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 left:0%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 top:0%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 background-color: red;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 width: 50%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 height: 100%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 }
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 #mycanvas2 {
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 position:absolute;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 left:50%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 top:0%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 background-color: green;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 width: 50%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 height: 50%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 }
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 #mycanvas3 {
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 position:absolute;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 left:50%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 top:50%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 background-color: blue;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 width: 50%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 height: 50%;
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 }
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 </style>
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 </head>
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 <body>
618
0925b27e8750 mouse events in wasm sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 616
diff changeset
53 <canvas id="mycanvas1" oncontextmenu="return false;"></canvas>
0925b27e8750 mouse events in wasm sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 616
diff changeset
54 <canvas id="mycanvas2" oncontextmenu="return false;"></canvas>
0925b27e8750 mouse events in wasm sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 616
diff changeset
55 <canvas id="mycanvas3" oncontextmenu="return false;"></canvas>
616
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 <script type="text/javascript">
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 if (!('WebAssembly' in window)) {
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 alert('Sorry, your browser does not support WebAssembly :(');
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 } else {
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 window.addEventListener('WebAssemblyLoaded', function() {
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 Module.ccall('Initialize', null, null, null);
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 });
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 }
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 </script>
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 <script type="text/javascript" async src="BasicScene.js"></script>
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 </body>
97926984d5d0 WebAssembly sample using Scene2D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 </html>