🚀 Auto-deploy: melhoria no snap e medição AR em 04/08/2026 21:34:30
This commit is contained in:
@@ -239,7 +239,7 @@ const CubeControlado = ({
|
||||
castShadow
|
||||
receiveShadow
|
||||
position={[0, 0.5, 0]}
|
||||
onClick={(e) => {
|
||||
onPointerDown={(e) => {
|
||||
e.stopPropagation();
|
||||
if (!e.intersections[0].face) return;
|
||||
const localNormal = e.intersections[0].face.normal;
|
||||
@@ -278,7 +278,7 @@ const Table = ({
|
||||
onSurfaceClick: (p: THREE.Vector3, n: THREE.Vector3) => void;
|
||||
onEdgeClick: (p: THREE.Vector3, n: THREE.Vector3) => void;
|
||||
}) => {
|
||||
const handleClick = (e: ThreeEvent<MouseEvent>) => {
|
||||
const handleClick = (e: ThreeEvent<PointerEvent>) => {
|
||||
e.stopPropagation();
|
||||
if (!e.intersections[0].face) return;
|
||||
const n = e.intersections[0].face.normal;
|
||||
@@ -293,12 +293,12 @@ const Table = ({
|
||||
return (
|
||||
<group position={[0, 0, -2]}>
|
||||
{/* Tampo Superior */}
|
||||
<mesh position={[0, 1, 0]} onClick={handleClick} castShadow receiveShadow>
|
||||
<mesh position={[0, 1, 0]} onPointerDown={handleClick} castShadow receiveShadow>
|
||||
<boxGeometry args={[2, 0.1, 1]} />
|
||||
<meshStandardMaterial color="#8B4513" />
|
||||
</mesh>
|
||||
{/* Prateleira Inferior */}
|
||||
<mesh position={[0, 0.5, 0]} onClick={handleClick} castShadow receiveShadow>
|
||||
<mesh position={[0, 0.4, 0]} onPointerDown={handleClick} castShadow receiveShadow>
|
||||
<boxGeometry args={[4, 0.1, 1]} />
|
||||
<meshStandardMaterial color="#A0522D" />
|
||||
</mesh>
|
||||
|
||||
Reference in New Issue
Block a user