Changes
Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
@@ -533,3 +533,46 @@ function ShareTab(p: XRHudInWorldProps) {
|
||||
</group>
|
||||
);
|
||||
}
|
||||
|
||||
function WebXRTab() {
|
||||
const xrFeatures = useModelStore((s) => s.xrFeatures);
|
||||
const setXRFeature = useModelStore((s) => s.setXRFeature);
|
||||
const reset = useModelStore((s) => s.resetXRFeatures);
|
||||
const keys: { k: keyof typeof xrFeatures; label: string }[] = [
|
||||
{ k: 'handTracking', label: 'Hand' },
|
||||
{ k: 'planeDetection', label: 'Planes' },
|
||||
{ k: 'hitTest', label: 'HitTest' },
|
||||
{ k: 'domOverlay', label: 'DOM Ovl' },
|
||||
{ k: 'anchors', label: 'Anchors' },
|
||||
{ k: 'meshDetection', label: 'Mesh' },
|
||||
{ k: 'depthSensing', label: 'Depth' },
|
||||
{ k: 'layers', label: 'Layers' },
|
||||
{ k: 'bodyTracking', label: 'Body' },
|
||||
];
|
||||
return (
|
||||
<group>
|
||||
<Text position={[-0.24, 0.115, 0]} fontSize={0.0085} color="#94a3b8" anchorX="left" maxWidth={0.48}>
|
||||
Desligue uma feature por vez para descobrir qual ativa o grid de segurança do Quest.
|
||||
</Text>
|
||||
<Text position={[-0.24, 0.095, 0]} fontSize={0.0075} color="#f59e0b" anchorX="left" maxWidth={0.48}>
|
||||
Mudanças entram em vigor ao sair e re-entrar no AR.
|
||||
</Text>
|
||||
{keys.map((it, i) => {
|
||||
const col = i % 3;
|
||||
const row = Math.floor(i / 3);
|
||||
const x = -0.18 + col * 0.14;
|
||||
const y = 0.05 - row * 0.045;
|
||||
const on = xrFeatures[it.k];
|
||||
return (
|
||||
<XR3DButton key={it.k}
|
||||
position={[x, y, 0]} size={[0.125, 0.034]}
|
||||
label={`${it.label} ${on ? 'ON' : 'OFF'}`}
|
||||
active={on} onClick={() => setXRFeature(it.k, !on)}
|
||||
fontSize={0.0085} />
|
||||
);
|
||||
})}
|
||||
<XR3DButton position={[0, -0.14, 0]} size={[0.18, 0.028]}
|
||||
label="↺ Resetar (todas ON)" onClick={reset} fontSize={0.009} />
|
||||
</group>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user