Skip to content

Commit 5feb08c

Browse files
committed
🔧
1 parent aface1e commit 5feb08c

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/App/App.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import * as React from "react";
22
import * as THREE from "three";
33
import { GithubLogo } from "./Ui/GithubLogo";
4-
import { Canvas, extend, events, createRoot } from "@react-three/fiber";
4+
import { Canvas } from "@react-three/fiber";
55
import { XR8Controls } from "../XR8Canvas/XR8Controls";
66
import { loadXR8, xr8Hosted } from "../XR8Canvas/getXR8";
77
import { Game } from "./Game";
88
import { Dice } from "./Scene/Dice";
99
import tunnel from "tunnel-rat";
1010
import { Ground } from "./Scene/Ground";
1111
import { WebXRControls } from "../WebXRCanvas/WebXRControls";
12-
import { createPortal } from "react-dom";
13-
import { XR8 } from "../XR8Canvas/XR8";
12+
import type { XR8 } from "../XR8Canvas/XR8";
1413
import { Environment } from "./Scene/Environment";
1514
import { TrackingHint } from "./Ui/Hints/TrackingHint";
1615
import { useProgress } from "@react-three/drei";
@@ -122,15 +121,7 @@ export const App = () => {
122121
gl={renderer} // the renderer is created before so we can pass a custom canvas, instead of letting three.js create one. That way the canvas is a direct child of body. Which is supposed to be required for 8thWall (?)
123122
camera={{ position: new THREE.Vector3(0, 6, 6) }}
124123
shadows
125-
style={{
126-
position: "fixed",
127-
top: 0,
128-
left: 0,
129-
right: 0,
130-
bottom: 0,
131-
touchAction: "none",
132-
opacity: readyForRender ? 1 : 0,
133-
}}
124+
style={{ visibility: "hidden" }} // rtf still creates and attach an empty canvas. Let's make it invisible
134125
>
135126
{state.type === "xr8" && state.xr8 && (
136127
<XR8Controls

0 commit comments

Comments
 (0)