You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// accumulate mesh vertices and uvvarmodel=this.meshCustomBlock(value,x,y,z);vertices=vertices.concat(model.vertices);uv=uv.concat(model.uv);
The use of concat causes the allocation of new arrays (of ever increasing size), which is needlessly expensive. Appending in-place is much faster, e.g.
I'm rendering some maps using a chunk distance of 2-4, 32x32x32 chunks, and using custom block models for a significant fraction of the blocks in the scene. This change significantly improves performance for my application (reducing meshing time by as much as 10 seconds!)
The text was updated successfully, but these errors were encountered:
The code at
mesh-plugin.js:101
currently reads:The use of
concat
causes the allocation of new arrays (of ever increasing size), which is needlessly expensive. Appending in-place is much faster, e.g.I'm rendering some maps using a chunk distance of 2-4, 32x32x32 chunks, and using custom block models for a significant fraction of the blocks in the scene. This change significantly improves performance for my application (reducing meshing time by as much as 10 seconds!)
The text was updated successfully, but these errors were encountered: