|
1 | 1 | import * as React from "react"; |
2 | 2 | import * as THREE from "three"; |
3 | 3 | import { GithubLogo } from "./Ui/GithubLogo"; |
4 | | -import { Canvas, extend, events, createRoot } from "@react-three/fiber"; |
| 4 | +import { Canvas } from "@react-three/fiber"; |
5 | 5 | import { XR8Controls } from "../XR8Canvas/XR8Controls"; |
6 | 6 | import { loadXR8, xr8Hosted } from "../XR8Canvas/getXR8"; |
7 | 7 | import { Game } from "./Game"; |
8 | 8 | import { Dice } from "./Scene/Dice"; |
9 | 9 | import tunnel from "tunnel-rat"; |
10 | 10 | import { Ground } from "./Scene/Ground"; |
11 | 11 | import { WebXRControls } from "../WebXRCanvas/WebXRControls"; |
12 | | -import { createPortal } from "react-dom"; |
13 | | -import { XR8 } from "../XR8Canvas/XR8"; |
| 12 | +import type { XR8 } from "../XR8Canvas/XR8"; |
14 | 13 | import { Environment } from "./Scene/Environment"; |
15 | 14 | import { TrackingHint } from "./Ui/Hints/TrackingHint"; |
16 | 15 | import { useProgress } from "@react-three/drei"; |
@@ -122,15 +121,7 @@ export const App = () => { |
122 | 121 | 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 (?) |
123 | 122 | camera={{ position: new THREE.Vector3(0, 6, 6) }} |
124 | 123 | 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 |
134 | 125 | > |
135 | 126 | {state.type === "xr8" && state.xr8 && ( |
136 | 127 | <XR8Controls |
|
0 commit comments