File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -371,8 +371,7 @@ Map.include(/** @lends Map.prototype */{
371
371
*/
372
372
_calcMatrices : function ( ) {
373
373
// closure matrixes to reuse
374
- const m0 = createMat4 ( ) ,
375
- m1 = createMat4 ( ) ;
374
+ const m1 = createMat4 ( ) ;
376
375
return function ( ) {
377
376
//必须先删除缓存的常用值,否则后面计算常用值时,会循环引用造成错误
378
377
delete this . _mapRes ;
@@ -400,7 +399,7 @@ Map.include(/** @lends Map.prototype */{
400
399
this . projMatrix = projMatrix ;
401
400
402
401
// view matrix
403
- this . viewMatrix = mat4 . invert ( m0 , worldMatrix ) ;
402
+ this . viewMatrix = mat4 . invert ( this . viewMatrix || createMat4 ( ) , worldMatrix ) ;
404
403
// matrix for world point => screen point
405
404
this . projViewMatrix = mat4 . multiply ( this . projViewMatrix || createMat4 ( ) , projMatrix , this . viewMatrix ) ;
406
405
this . _calcCascadeMatrixes ( ) ;
You can’t perform that action at this time.
0 commit comments