-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
83 lines (76 loc) · 3.44 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Forth Engine</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="assets/style.css" />
</head>
<body>
<div class="wrapper" id="wrapper">
<h1>Forth Engine</h1>
<p>Forth Engine is an open-source C++ Engine to render and manipulate high, four dimensional objects into three dimensional objects that can be rendered via ordinary graphics renderer, like OpenGL.</p>
<canvas class=emscripten id=canvas tabindex=-1></canvas>
<p class="shape-selectors">
<button onclick="sendKey(49)" data-balloon-pos="up" data-balloon="Pentatope">1</button>
<button onclick="sendKey(50)" data-balloon-pos="up" data-balloon="Tesseract">2</button>
<button onclick="sendKey(51)" data-balloon-pos="up" data-balloon="Hexdecahedroid">3</button>
<button onclick="sendKey(52)" data-balloon-pos="up" data-balloon="Icosatetrahedroid">4</button>
<button onclick="sendKey(53)" data-balloon-pos="up" data-balloon="Hecatonicosahedroid">5</button>
<button onclick="sendKey(54)" data-balloon-pos="up" data-balloon="Hexacosidedroid">6</button>
<button onclick="sendKey(55)" data-balloon-pos="up" data-balloon="Hypersphere">7</button>
<button onclick="sendKey(56)" data-balloon-pos="up" data-balloon="Rounded Tesseract">8</button>
<button onclick="sendKey(57)" data-balloon-pos="up" data-balloon="Custom Shape">9</button>
</p>
<noscript>
<img src="images/preview.gif" alt="Preview" title="Rotating Hexacosidedroid">
<style>
.shape-selectors, .emscripten {
display: none;
}
</style>
</noscript>
<p>Forth Engine is a successor to <a href="https://assetstore.unity.com/packages/tools/modeling/engine-4-34475">Engine4</a>, and currently it's in main development phase.</p>
<p>Links:</p>
<a href="https://github.com/forth-engine/forth-library">Forth Library</a>
<br>
<a href="https://github.com/forth-engine/demo">Executable Demos</a>
<ul>
<li><a href="https://wellosoft.github.io/demo/forth/primitiveDemo.html">primitiveDemo</a></li>
<li><a href="https://wellosoft.github.io/demo/forth/frustumDemo.html">frustumDemo</a></li>
<li><a href="https://wellosoft.github.io/demo/forth/thirdPersonViewDemo.html">thirdPersonViewDemo</a></li>
<li><a href="https://wellosoft.github.io/demo/forth/physicsDemo.html">physicsDemo</a></li>
</ul>
<script>
var Module = {
preRun: [],
postRun: [],
locateFile: function(path, prefix) {
return "https://wellosoft.github.io/demo/forth/" + path;
},
canvas: function () {
var e = document.getElementById("canvas");
return e.addEventListener("webglcontextlost", function (e) {
alert("WebGL context lost. You will need to reload the page."), e.preventDefault()
}, !1), e
}(),
onRuntimeInitialized: function() {
setTimeout(function() {
GLFW.onKeydown({keyCode: 54});
document.getElementById("canvas").exitPointerLock();
var w = document.getElementById('wrapper').clientWidth;
if (w < 800) {
Module.setCanvasSize(w, w * 3 / 4);
}
}, 500);
}
};
function sendKey(code) {
GLFW.onKeydown({keyCode: code});
}
</script>
<script async src="https://wellosoft.github.io/demo/forth/primitiveDemo.js"></script>
</div>
</body>
</html>