Advertisement
Guest User

Untitled

a guest
Feb 25th, 2024
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. const {cube, sphere} = Manifold;
  2.  
  3. const p = new Mesh({numProp: 3, vertProperties: new Float32Array([
  4. 0, 0, 0,
  5. 1, 0, 0,
  6. 0, 1, 0,
  7. 1, 1, 0,
  8. 0, 0, 1,
  9. 1, 0, 1,
  10. 0, 1, 1,
  11. 1, 1, 1,
  12. 0.4, 0.4, 0.5,
  13. 0.6, 0.4, 0.5,
  14. 0.5, 0.6, 0.5,
  15. 0.4, 0.4, 0.5,
  16. 0.6, 0.4, 0.5,
  17. 0.5, 0.6, 0.5,
  18. ]), triVerts: new Uint32Array([
  19. 5,11,4,
  20. 5,12,11,
  21. 4,11,6,
  22. 6,11,13,
  23. 6,13,7,
  24. 7,13,12,
  25. 7,12,5,
  26. 13,11,12,
  27. 0,9,1,
  28. 0,8,9,
  29. 1,9,3,
  30. 3,9,10,
  31. 3,10,2,
  32. 2,10,8,
  33. 2,8,0,
  34. 8,10,9,
  35. 4,1,5,
  36. 4,0,1,
  37. 5,3,7,
  38. 5,1,3,
  39. 7,2,6,
  40. 7,3,2,
  41. 6,0,4,
  42. 6,2,0,
  43. ])})
  44.  
  45. const result = new Manifold(p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement