-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathraiu3d.js
More file actions
34 lines (25 loc) · 709 Bytes
/
raiu3d.js
File metadata and controls
34 lines (25 loc) · 709 Bytes
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
var r3ds, r3dg, r3df;
r3d.can_name = "c";
r3d.start = function() {
//Game 1
r3dg.location_x, r3dg.location_y, r3dg.location_z;
//Game 2
r3dg.fov, r3dg.view_angle_x, r3dg.view_angle_z;
//Files html
r3df.can = function() {return document.getElementById(r3d.can_name);}, r3f.ctx;
//Files vahe
r3df.point_deg;
}
function render(nx, ny, nz) {
r3df.point_deg = Math.atan2(nx, ny) * 180 / Math.PI;
}
function angle(x, y) {
return Math.atan2(x, y) * 180 / Math.PI;
}
function draw() {
ctx = can().getContext('2d');
ctx.beginPath();
ctx.arc(pa, 300, 10, 0, 2 * Math.PI, false);
ctx.fillStyle = 'black';
ctx.fill();
}