Canvatorium Lab 055
Combine plane detection and surface magnetism to snap an object to the walls in a room.
This lab expands on Lab 054 and Lab 017 to create a simple scene where I can drag an object around, snapping it to a wall when releasing it. The wall meshes are only visible while holding the subject. This works well for vertical surfaces, but it can be a bit wonky with horizontal ones. I’m guessing that is why keepOrientationVertical
is set to true
by default.
NOTE: As of September 24, 2023 this scene isn’t working in production. It has something to do with the way that I’m loading earcut
, but I haven’t found a solution.
This lab is part of a project called Canvatorium, an experimental design lab for spatial computing. Learn more.