import { Surface, generateIsoValues } from "kelper-lit"
const vertices: number[] = ... ;
const indices : number[] = ... ;
const zCoord = vertices.filter((_, index) => index % 3 === 2);
const surface = new Surface(vertices, indices, scene)
surface.generateIsos({
attribute : zCoord,
isoList : generateIsoValues(zCoord, 20), // 20 iso-contours
lut : 'Blackbody',
viewFilled : true,
viewLines : true
})
git clone https://github.com/xaliphostes/kelper-lit.git
npm install
npm run serve
Then open this link