Skip to content

Commit a2b37da

Browse files
author
yxyx136
committed
first commit
1 parent e40ba09 commit a2b37da

22 files changed

+1210
-0
lines changed

api/camera/Camera.js

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
function Camera( stX, stY, stZ, stRX, stRY, stRZ, perspective ) {
2+
this.px = stX;
3+
this.py = stY;
4+
this.pz = stZ;
5+
this.rx = stRX;
6+
this.ry = stRY;
7+
this.rz = stRZ;
8+
this.yTranslation = 200;
9+
this.controls = new Array( 87,83,65,68,16,32, 37,39,40,38 );
10+
this.walkSpeed = 1000;
11+
this.walkAccuracy = 1;
12+
this.jumpHeight = 30;
13+
this.lastJumpY = -1;
14+
this.jumpInterval = null;
15+
this.jump = false;
16+
this.moveCalculation = {};
17+
this.moveCalculation.m1 = 0;
18+
this.moveCalculation.m2 = 0;
19+
this.onMoveChangeValues = {
20+
px: 0,
21+
py: 0,
22+
pz: 0,
23+
rx: 0,
24+
ry: 0,
25+
rz: 0
26+
};
27+
this.enableDebugPositions = false;
28+
this.isFullscreen = false;
29+
this.isMousePointerLocked = false;
30+
this.perspective = perspective;
31+
this.moveEvents = [];
32+
this.domE = document.getElementById( "camera" );
33+
this.activeMouseDown = false;
34+
this.lastMousePos = {};
35+
this.updatePosition();
36+
CrossBrowserTransform.perspective(document.getElementById( "viewport" ), perspective);
37+
this.addUserEvents();
38+
}

0 commit comments

Comments
 (0)