🚀 Auto-deploy: melhoria no snap e medição AR em 04/08/2026 20:30:55
This commit is contained in:
@@ -7,7 +7,8 @@ import {
|
|||||||
Environment,
|
Environment,
|
||||||
PerspectiveCamera,
|
PerspectiveCamera,
|
||||||
} from "@react-three/drei";
|
} from "@react-three/drei";
|
||||||
import { XR, createXRStore } from "@react-three/xr";
|
import { XR } from "@react-three/xr";
|
||||||
|
import { xrStore as store } from "@/stores/useXRStore";
|
||||||
import * as THREE from "three";
|
import * as THREE from "three";
|
||||||
import {
|
import {
|
||||||
Beaker,
|
Beaker,
|
||||||
@@ -17,6 +18,7 @@ import {
|
|||||||
RotateCcw,
|
RotateCcw,
|
||||||
Hand,
|
Hand,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
import { Suspense } from "react";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ============================================================
|
* ============================================================
|
||||||
@@ -39,10 +41,6 @@ const CUBE_SIZE = 1;
|
|||||||
|
|
||||||
type AlignPhase = 'IDLE' | 'WAIT_SURFACE' | 'WAIT_FACE2' | 'WAIT_EDGE';
|
type AlignPhase = 'IDLE' | 'WAIT_SURFACE' | 'WAIT_FACE2' | 'WAIT_EDGE';
|
||||||
|
|
||||||
const store = createXRStore({
|
|
||||||
controller: { left: true, right: true },
|
|
||||||
});
|
|
||||||
|
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
// COMPONENTE: CuboControlado
|
// COMPONENTE: CuboControlado
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
@@ -411,8 +409,9 @@ const QuestCubeLab = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ height: 600 }}>
|
<div style={{ height: 600 }}>
|
||||||
<Canvas shadows>
|
<Canvas shadows gl={{ antialias: true, alpha: true }}>
|
||||||
<XR store={store}>
|
<XR store={store}>
|
||||||
|
<Suspense fallback={null}>
|
||||||
<PerspectiveCamera makeDefault position={[3, 4, 6]} fov={50} />
|
<PerspectiveCamera makeDefault position={[3, 4, 6]} fov={50} />
|
||||||
<ambientLight intensity={0.5} />
|
<ambientLight intensity={0.5} />
|
||||||
<directionalLight position={[5, 8, 5]} intensity={1} castShadow shadow-mapSize-width={1024} shadow-mapSize-height={1024} />
|
<directionalLight position={[5, 8, 5]} intensity={1} castShadow shadow-mapSize-width={1024} shadow-mapSize-height={1024} />
|
||||||
@@ -441,6 +440,7 @@ const QuestCubeLab = () => {
|
|||||||
</mesh>
|
</mesh>
|
||||||
<OrbitControls makeDefault enableDamping />
|
<OrbitControls makeDefault enableDamping />
|
||||||
<Environment preset="city" />
|
<Environment preset="city" />
|
||||||
|
</Suspense>
|
||||||
</XR>
|
</XR>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user