Skip to content

Commit

Permalink
fixed near/far of camera, close #540
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzhenn committed Nov 13, 2017
1 parent 7d08ef7 commit d419883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/map/Map.Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ Map.include(/** @lends Map.prototype */{
const farZ = maxScale * size.height / 2 / this._getFovRatio() + 1;
// camera projection matrix
const projMatrix = this.projMatrix || createMat4();
mat4.perspective(projMatrix, fov, size.width / size.height, 1, farZ);
mat4.perspective(projMatrix, fov, size.width / size.height, 0.1, farZ);
mat4.scale(projMatrix, projMatrix, [1, -1, 1]);
// camera world matrix
const worldMatrix = this._getCameraWorldMatrix();
Expand Down

0 comments on commit d419883

Please sign in to comment.