Mesh Draw Range
App: apps/mesh_draw_range/
Uses setDrawRange and clearDrawRange to reveal a grid of triangles over time: a sine wave drives how many vertices are “visible,” so triangles appear progressively (then hide and repeat).
Run from root
Section titled “Run from root”% ./plume3d mesh_draw_rangeor
Run from app directory
Section titled “Run from app directory”% ./../plume3d .What it does
Section titled “What it does”- Builds a 5×5 grid of small triangles (each cell = 3 vertices), draw mode
"triangles". - In
update:ratio = (Math.sin(_time) + 1) / 2, thenvisibleCount = floor(ratio * totalVertices)aligned to a multiple of 3. - If
visibleCount > 0:_mesh.setDrawRange(0, visibleCount); else_mesh.clearDrawRange().