-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathRedBasicController.html
More file actions
74 lines (70 loc) · 2.09 KB
/
Copy pathRedBasicController.html
File metadata and controls
74 lines (70 loc) · 2.09 KB
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
<!--
~ RedGL - MIT License
~ Copyright (c) 2018 - 2019 By RedCamel(webseon@gmail.com)
~ https://github.com/redcamel/RedGL2/blob/dev/LICENSE
~ Last modification time of this file - 2019.7.8 15:5
-->
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="keywords" content="RedGL,webgl,demo">
<title>RedGL | Example RedBasicController</title>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi"
/>
<link rel="stylesheet" href="../example.css">
<script src="../dat.gui.min.js"></script>
<script src="../baseTestUI.js"></script>
<script src="../../release/RedGL.min.js"></script>
</head>
<body>
<script id='testSource'>
var testUI;
var canvas;
var assetPath = '../../asset/'
canvas = document.createElement('canvas');
document.body.appendChild(canvas);
RedGL(canvas, function (v) {
if (v) {
console.log('초기화 성공!')
var tWorld, tScene, tController, tRenderer;
// 월드 생성
this['world'] = tWorld = RedWorld();
// 씬 생성
tScene = RedScene(this);
// 카메라 생성
tController = RedBasicController(this);
tController.x = tController.y = tController.z = 15
tController.tilt = -45
tController.pan = 45
console.log(tController)
// 렌더러 생성
tRenderer = RedRenderer();
// 뷰생성 및 적용
tWorld.addView(RedView(this, tScene, tController));
// 그리드 설정
tScene['grid'] = RedGrid(this)
// axis 설정
tScene['axis'] = RedAxis(this)
// 렌더시작
tRenderer.start(this, function (time) {
});
// 렌더 디버거 활성화
tRenderer.setDebugButton();
//
testUI(this, tController);
} else {
console.log('초기화 실패!')
}
});
testUI = function (redGL, tController) {
var gui = new baseTestUI(redGL);
gui.initRedGL();
gui.initBasicController(tController, true);
};
</script>
</body>
</html>