Drawing a Selection Box #766
-
Hello, I'm having some trouble drawing a selection box over my canvas as demonstrated here in this three demo, the source code for which is here. I have been able to hook into the SelectionBox example in the Three codebase (I am able to console log the selected objects). However, attempting to overlay a div and style it as in the example is failing; nesting the Div inside the console throws an error as divs aren't part of the Three.js namespace, and it's not showing up when I render the canvas and div inside the same fragment, despite matching the selection styling in the linked example. What is the conventional way to mimic this behavior in fiber? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I think I solved this myself. I placed the div outside the fragment as previously said, but had been passing it improper coordinates to create the selection box. |
Beta Was this translation helpful? Give feedback.
I think I solved this myself. I placed the div outside the fragment as previously said, but had been passing it improper coordinates to create the selection box.