MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / Camera

Function Camera

libs/mapv/mapv.3d.js:11–35  ·  view source on GitHub ↗
(gl)

Source from the content-addressed store, hash-verified

9};
10
11var Camera = function Camera(gl) {
12
13 this.gl = gl;
14 // this.radius = 100;
15 // this.lon = 0;
16 // this.lat = 0;
17
18 this.radius = 4000;
19 this.lon = 90;
20 this.lat = 45;
21
22 this.transX = 100 * conf.longitudeLatitudeScale;
23 this.transY = 30 * conf.longitudeLatitudeScale;
24
25 var canvas = gl.canvas;
26
27 gl.viewport(0, 0, canvas.width, canvas.height);
28 var pMatrix = mat4.create();
29 mat4.perspective(pMatrix, 45, canvas.width / canvas.height, 1, 100000.0);
30 gl.uniformMatrix4fv(gl.uPMatrix, false, pMatrix);
31
32 this.computerXYZ();
33 this.render();
34 this.init();
35};
36
37Camera.prototype.init = function () {
38 this.drag();

Callers

nothing calls this directly

Calls 3

renderMethod · 0.65
createMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected