NASA-AMMOS / 3DTilesRendererJS

Renderer for 3D Tiles in Javascript using three.js
https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/mars.html
Apache License 2.0
1.57k stars 280 forks source link

fix: const reassignment error in resolveDefault function #576

Closed imoken777 closed 3 months ago

imoken777 commented 3 months ago

Description

In the file src/three/gltf/classes/PropertySetAccessor.js, at line 194, in the resolveDefault function, the for loop variable i is incorrectly declared as const.

As it is currently written, it is not possible to reassign the const variable i, resulting in an error. Since i is incremented within the loop, it should be declared as let instead of const.

if ( isMatrixType( type ) ) {

    const elements = target.elements;
-   for ( const i = 0, l = elements.length; i < l; i ++ ) {
+   for ( let i = 0, l = elements.length; i < l; i ++ ) {

        elements[ i ] = value[ i ];

    }
}
gkjohnson commented 3 months ago

Great, thank you!

XieYongHong commented 3 months ago

How long will the new version be released