This message was deleted.
# help
s
This message was deleted.
❤️ 1
f
I suspect this might be your problem? (assuming you're seeing the same error)
c
yes I see the same, let me update this real quick
that helped (to a degree)!
🎉 1
Now I’m stuck with this error though: I don’t really understand how the data in the tin.data array is arranged
Been looking at @fils implementation here, but still struggling to understand what’s going on https://observablehq.com/@fil/hello-delatin
a
The triangles are already being build by Delatin, so you shouldn’t need to worry with the
data
BufferArray, if I’m not mistaken… I think the
triangles
Array is comprised of
vertex1,vertex2,vertex3,elevation
quadruplets, so you may need to just build each triangle in three.js? I have not tried myself, so just speculating at first glance.
In further inspection of @Fil’s notebook, the
.triangles
contain `point1,point2,point3`` triplets, which can be looked up in
.coords
.and then the average elevation for the triangle is accessed via
.heightAt(μx,μy)
. Seems like
THREE.PolyhedralGeometry
could be used to build the triangles.
c
Thanks Adam! Will look into this 🙂
alright, update the code accordingly, but at least the indices need to fixed now
⛰️ 1