forked from SuperIlu/DOjS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patha3d.js
29 lines (26 loc) · 829 Bytes
/
a3d.js
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
/*
** This function is called once when the script is started.
*/
function Setup() {
SetFramerate(30);
VDebug([[1, 2, 3, 4, 5, EGA.RED], [11, 12, 13, 14, 15, EGA.GREEN]]);
Print(JSON.stringify(GetIdentityMatrix()));
Print(JSON.stringify(GetTranslationMatrix(1, 2, 3)));
Print(JSON.stringify(GetScalingMatrix(1, 2, 3)));
Print(JSON.stringify(GetXRotatateMatrix(10)));
Print(JSON.stringify(GetYRotatateMatrix(20)));
Print(JSON.stringify(GetZRotatateMatrix(30)));
Print(JSON.stringify(GetRotateMatrix(10, 20, 30)));
}
/*
** This function is repeatedly until ESC is pressed or Stop() is called.
*/
function Loop() {
ClearScreen(EGA.BLACK);
TextXY(SizeX() / 2, SizeY() / 2, "Hello World!", EGA.WHITE, NO_COLOR);
}
/*
** This function is called on any input.
*/
function Input(event) {
}