Description of the problem
Here at InterleavedBuffer class, it is suggested to have default value 0 for stride. If user forget to specify stride, this.stride
would have value undefined
, this would cascade to var stride = data.stride;
, and further to _gl.vertexAttribPointer
causing undefined webgl behavior.
Three.js version
- Dev
- r85
- …
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Setting a default value for an argument means it is OK not to specify a value at all. However, in this case, a value must be set.
Also, if zero were the default, the next line could divide by zero.
three.js generally does not check parameter values.