Three.js: Syntax warnings when compiling

Created on 14 Aug 2019  路  8Comments  路  Source: mrdoob/three.js

Description of the problem

Hello on last dev three.js have 4 syntax warning when is compile with ECMASCRIPT5_STRICT.
it's not very important, it's just prettier without

line 6907 > Redeclared variable : _diff
line 16228 > Redeclared variable : extention
line 21266 > Redeclared variable : image
line 21288 > Redeclared variable : mipmaps

Three.js version
  • [x] Dev
  • [ ] r107
  • [ ] ...
Bug

All 8 comments

line 6907 > Redeclared variable : _diff

This one should be gone on latest dev. However, it's hard to find the other ones without providing the respective build file. This might help to understand to what lines of code the line numbers refer to.

yes
6907 -- src/math/ray.js > line 9 > _diff is define two time at start
16228 -- src/renderers/webgl/WebGLIndexedBufferRenderer.js > line 42 > 'var extension' is 'extension'
21266 -- src/renderers/webgl/WebGLTextures.js > line 413 > 'var image = mipmap.image[ i ].image;' is 'image = mipmap.image[ i ].image;'
21288 -- src/renderers/webgl/WebGLTextures.js > line 435 > 'var mipmaps = cubeImage[ i ].mipmaps;' is 'mipmaps = cubeImage[ i ].mipmaps;'

Do you want to clean up these redefinitions?

if you can it would be cool

very cool only one more on last dev :)

in src/lights/PointLightShadow.js
line 67 shadowMatrix = this.matrix, is already declared in line 64

Hmm, how come we don't see these warnings when we run npm run build-closure?
We're also using --language_in=ECMASCRIPT5_STRICT... 馃

i use old compiler methode for a project
without node only with python script and closure-compiler-v20161024.jar

but yes is strange you don't see 碌?

in src/lights/PointLightShadow.js
line 67 shadowMatrix = this.matrix, is already declared in line 64

Already solved via #17351

Was this page helpful?
0 / 5 - 0 ratings