stephomi / sculptgl

DEVELOPMENT STOPPED I'm now working on Nomad Sculpt instead
https://stephaneginier.com/sculptgl/
MIT License
1.4k stars 361 forks source link

Bad size #75

Closed DougRogers closed 6 years ago

DougRogers commented 6 years ago

in Mesh.js function initColorsAndMaterials
'len' shouble be nbVertices

if (!this._meshData._materialsPBR || this._meshData._materialsPBR.length !== len) { var mAr = this._meshData._materialsPBR = new Float32Array(len); for (i = 0; i < len; ++i) { <---------------- HERE var j = i * 3; mAr[j] = 0.18; mAr[j + 1] = 0.08; mAr[j + 2] = 1.0; } }

stephomi commented 6 years ago

Thanks I'll make the fix later https://github.com/stephomi/sculptgl/blob/bc42ae37009dbc6a8f8f48a9627984bc8910bc9f/src/mesh/Mesh.js#L435

stephomi commented 6 years ago

Fixed by https://github.com/stephomi/sculptgl/commit/637d7576e63354fe9cb080191d38383ecb508432