-
Notifications
You must be signed in to change notification settings - Fork 0
/
design.html
57 lines (55 loc) · 1.51 KB
/
design.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Design</title>
<script type="text/javascript" src="src/index.js"></script>
<script type="text/javascript" src="src/math.js"></script>
<script type="text/javascript" src="src/item.js"></script>
<style>
* {
padding: 0;
margin: 0;
}
html, body {
width: 100%;
height: 100%;
}
canvas {
/*background-color: #333;*/
width: 100%;
height: 100%;
display: block;
}
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<button id="cp">create plane</button>
<input id="x" type="number"/>
<input id="y" type="number"/>
<input id="z" type="number"/>
<script type="text/javascript">
let game = new See3D(document.getElementById("canvas"));
let scene = new See3D.View.Scene();
let camera = new See3D.View.Camera(new Point3D(0, 0, -100));
let line = new See3D.View.Line(new Point3D(0, 0, 10), new Point3D(-10, -10, -10), new Point3D(10, 10, 10));
let planePoints = [];
game.scene(scene);
scene.push(line);
scene.camera(camera);
window.onresize = () => {
game.width(window.innerWidth).height(window.innerHeight);
};
game.width(window.innerWidth).height(window.innerHeight);
game.whileRender();
let opt = {
audio: true,
video: {
width: window.innerWidth,
height: window.innerHeight
}
};
</script>
</body>
</html>