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 @@ -334,8 +334,7 @@ Map.include(/** @lends Map.prototype */{
334334 */
335335 _calcMatrices : function ( ) {
336336 // closure matrixes to reuse
337- const m0 = createMat4 ( ) ,
338- m1 = createMat4 ( ) ;
337+ const m1 = createMat4 ( ) ;
339338 return function ( ) {
340339 //必须先删除缓存的常用值,否则后面计算常用值时,会循环引用造成错误
341340 delete this . _mapRes ;
@@ -363,7 +362,7 @@ Map.include(/** @lends Map.prototype */{
363362 this . projMatrix = projMatrix ;
364363
365364 // view matrix
366- this . viewMatrix = mat4 . invert ( m0 , worldMatrix ) ;
365+ this . viewMatrix = mat4 . invert ( this . viewMatrix || createMat4 ( ) , worldMatrix ) ;
367366 // matrix for world point => screen point
368367 this . projViewMatrix = mat4 . multiply ( this . projViewMatrix || createMat4 ( ) , projMatrix , this . viewMatrix ) ;
369368 this . _calcCascadeMatrixes ( ) ;
You can’t perform that action at this time.
0 commit comments