Skip to content

Commit

Permalink
gl.compileAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
clementroche committed Nov 8, 2024
1 parent 65b5ae1 commit 832ce9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/webgl/components/preload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function Preload() {
const active = useProgress((state) => state.active)

useDebounce(
() => {
async () => {
if (active) return

console.log('Preloading...')
Expand All @@ -28,7 +28,7 @@ export function Preload() {
}
})
// Now compile the scene
gl.compile(scene, camera)
await gl.compileAsync(scene, camera)
// And for good measure, hit it with a cube camera
const cubeRenderTarget = new WebGLCubeRenderTarget(128)
const cubeCamera = new CubeCamera(0.01, 100000, cubeRenderTarget)
Expand Down

1 comment on commit 832ce9d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚡️ Lighthouse report for the changes in this commit:

🟢 Performance: 100
🟢 Accessibility: 90
🟢 Best practices: 96
🟠 SEO: 63

Lighthouse ran on https://satus-du48ohjpn-darkroom-engineering.vercel.app/

Please sign in to comment.