From b6568aba8a12424e15adf17cd1629c0cc7ff699f Mon Sep 17 00:00:00 2001 From: HexaField Date: Fri, 21 Jun 2024 13:38:09 +1000 Subject: [PATCH 1/3] IR-2746-Optimize-performance-of-webpages-when-not-rendering-3d-world --- public/scenes/Benchmarks.gltf | 8 +- public/scenes/Examples.gltf | 4 +- resources.json | 244 +++++++++++++++++----------------- src/sceneRoute.tsx | 37 ++---- 4 files changed, 140 insertions(+), 153 deletions(-) diff --git a/public/scenes/Benchmarks.gltf b/public/scenes/Benchmarks.gltf index f193b96..4275991 100644 --- a/public/scenes/Benchmarks.gltf +++ b/public/scenes/Benchmarks.gltf @@ -42,7 +42,7 @@ "bakeType": "Baked", "resolution": 2048, "refreshMode": "OnAwake", - "envMapOrigin": "https://localhost:8642/projects/default-project/default.envmap.ktx2", + "envMapOrigin": "__$project$__/default-project/default.envmap.ktx2", "boxProjection": true }, "EE_fog": { @@ -211,8 +211,8 @@ "shadowMapType": 2 }, "EE_scene_settings": { - "thumbnailURL": "https://localhost:8642/projects/default-project/default.thumbnail.jpg", - "loadingScreenURL": "https://localhost:8642/projects/default-project/default.loadingscreen.ktx2", + "thumbnailURL": "__$project$__/default-project/public/scenes/default.thumbnail.jpg", + "loadingScreenURL": "__$project$__/default-project/public/scenes/default.loadingscreen.ktx2", "primaryColor": "#38620D", "backgroundColor": "rgb(214, 214, 211)", "alternativeColor": "#376312", @@ -254,7 +254,7 @@ "EE_skybox": { "backgroundColor": 0, "equirectangularPath": "", - "cubemapPath": "https://localhost:8642/projects/default-project/assets/skyboxsun25deg/", + "cubemapPath": "__$project$__/default-project/assets/skyboxsun25deg/", "backgroundType": 1, "skyboxProps": { "turbidity": 10, diff --git a/public/scenes/Examples.gltf b/public/scenes/Examples.gltf index 4d4f7ba..94758d8 100644 --- a/public/scenes/Examples.gltf +++ b/public/scenes/Examples.gltf @@ -210,8 +210,8 @@ "shadowMapType": 2 }, "EE_scene_settings": { - "thumbnailURL": "__$project$__/default-project/default.thumbnail.jpg", - "loadingScreenURL": "__$project$__/default-project/default.loadingscreen.ktx2", + "thumbnailURL": "__$project$__/default-project/public/scenes/default.thumbnail.jpg", + "loadingScreenURL": "__$project$__/default-project/public/scenesdefault.loadingscreen.ktx2", "primaryColor": "#38620D", "backgroundColor": "rgb(214, 214, 211)", "alternativeColor": "#376312", diff --git a/resources.json b/resources.json index 43bace9..290af20 100644 --- a/resources.json +++ b/resources.json @@ -1,37 +1,15 @@ { - "assets/envmaps/hall.glb": { - "type": "file", - "tags": [ - "Model" - ], - "dependencies": [] - }, - "public/avatars/Adam/1a8a75bafb18c29e94be4f6e0df4503932791c732fd5b85f5991993ffef3199e.ktx2": { + "public/scenes/Examples.thumbnail.jpg": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/avatars/Adam.gltf": { - "type": "avatar", - "tags": [ - "Model" - ], - "dependencies": [ - "projects/ee-development-test-suite/public/avatars/Adam/1a8a75bafb18c29e94be4f6e0df4503932791c732fd5b85f5991993ffef3199e.ktx2", - "projects/ee-development-test-suite/public/avatars/Adam/1f68862e8529230781b98f1825852cb37039ab137a796da4e1a54368ab308693.ktx2", - "projects/ee-development-test-suite/public/avatars/Adam/3ebba2b690b91a31064fec6d6ca9e1558f4f56ddb804294c4663017e2a2ae8fc.bin", - "projects/ee-development-test-suite/public/avatars/Adam/5cbedd9382f99d1be408692e8d3b4172edb4aa5edcd9d90bca57f7c6b7db4e2b.bin", - "projects/ee-development-test-suite/public/avatars/Adam/9613d363e55e1af7cfb0dfb020bae9e417ccb11f6051da379ac96aa35cba59a0.ktx2", - "projects/ee-development-test-suite/public/avatars/Adam/Adam_data.bin", - "projects/ee-development-test-suite/public/avatars/Adam/ffd667f5c4c57f61a582c47337035d704ae616104df6ee505b3c715455c4c11c.ktx2" - ] - }, - "assets/GLTF/Flight Helmet/FlightHelmet.bin": { + "assets/GLTF/Flight Helmet/FlightHelmet.gltf": { "type": "file", "tags": [ - "unknown" + "Model" ], "dependencies": [] }, @@ -42,49 +20,49 @@ ], "dependencies": [] }, - "public/avatars/Adam/1f68862e8529230781b98f1825852cb37039ab137a796da4e1a54368ab308693.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LeatherPartsMat_BaseColor.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/animations/Racer/a8c5117aec263607fb9b24904949c1de9d246ff5a9518ab40e9555d191274122.ktx2": { + "public/avatars/Adam/1a8a75bafb18c29e94be4f6e0df4503932791c732fd5b85f5991993ffef3199e.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_RubberWoodMat_OcclusionRoughMetal.ktx2": { + "assets/Images/testImage.jpg": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/LOD/Test_LOD2.glb": { + "public/scenes/test.envmap.png": { "type": "file", "tags": [ - "Model" + "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_GlassPlasticMat_BaseColor.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LensesMat_Normal.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/graph/default-graph.json": { + "assets/LOD/Test_LOD0.glb": { "type": "file", "tags": [ - "Volumetric" + "Model" ], "dependencies": [] }, - "assets/animations/Racer/fb54d298ab7ec1b2628911e434f40ee06c24543923e0b3e14802cf55092b826a.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_RubberWoodMat_BaseColor.ktx2": { "type": "file", "tags": [ "Image" @@ -98,335 +76,357 @@ ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LensesMat_Normal.ktx2": { + "assets/animations/Racer/Racer_data.bin": { "type": "file", "tags": [ - "Image" + "unknown" ], "dependencies": [] }, - "public/avatars/Adam/9613d363e55e1af7cfb0dfb020bae9e417ccb11f6051da379ac96aa35cba59a0.ktx2": { + "assets/Videos/HDVideo.mp4": { "type": "file", "tags": [ - "Image" + "Video" ], "dependencies": [] }, - "public/scenes/bpcem-envmap-bake-test.scene.json": { - "type": "scene", - "tags": [], + "public/avatars/Test RPM.glb": { + "type": "avatar", + "tags": [ + "Model" + ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LeatherPartsMat_OcclusionRoughMetal.ktx2": { + "public/avatars/Adam/1f68862e8529230781b98f1825852cb37039ab137a796da4e1a54368ab308693.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/test.scene.json": { - "type": "scene", - "tags": [], - "dependencies": [] - }, - "public/scenes/bpcem-envmap-bake-test-bpcem-hall-bake-1.ktx2": { + "assets/graph/simpleController.json": { "type": "file", "tags": [ - "Image" + "Volumetric" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LeatherPartsMat_BaseColor.ktx2": { + "public/scenes/Benchmarks.envmap.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_MetalPartsMat_Normal.ktx2": { + "public/scenes/bpcem-envmap-bake-test-bpcem-hall-bake-2.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_RubberWoodMat_BaseColor.ktx2": { + "public/scenes/test.scene.json": { + "type": "scene", + "tags": [], + "dependencies": [] + }, + "public/scenes/animations-test.envmap.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/avatars/Adam/Adam_data.bin": { + "assets/animations/transforms.glb": { "type": "file", "tags": [ - "unknown" + "Model" ], "dependencies": [] }, - "assets/Images/testImage.jpg": { + "assets/animations/Racer/fb54d298ab7ec1b2628911e434f40ee06c24543923e0b3e14802cf55092b826a.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/animations/Racer/740e60973cb1cb9852ebe8821bcaf77f2fda66b68f5ed2c143ef504087968238.bin": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LensesMat_BaseColor.ktx2": { "type": "file", "tags": [ - "unknown" + "Image" ], "dependencies": [] }, - "public/scenes/animations-test.envmap.ktx2": { + "public/scenes/Examples.envmap.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/bpcem-envmap-bake-test.thumbnail.ktx2": { - "type": "file", + "public/scenes/Examples.gltf": { + "type": "scene", "tags": [ - "Image" + "Model" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LensesMat_BaseColor.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_MetalPartsMat_Normal.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/Videos/HDVideo.mp4": { + "assets/animations/Racer/740e60973cb1cb9852ebe8821bcaf77f2fda66b68f5ed2c143ef504087968238.bin": { "type": "file", "tags": [ - "Video" + "unknown" ], "dependencies": [] }, - "public/avatars/Test RPM.glb": { - "type": "avatar", + "assets/animations/tornado-mobile-xr.glb": { + "type": "file", "tags": [ "Model" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_MetalPartsMat_BaseColor.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_GlassPlasticMat_OcclusionRoughMetal.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/animations-test.scene.json": { - "type": "scene", - "tags": [], + "assets/animations/Racer/b10cf5cda7f6b46299df899e7d38424f8229b0019cec043bb70f3fc71117dc76.ktx2": { + "type": "file", + "tags": [ + "Image" + ], "dependencies": [] }, - "public/avatars/Test Avaturn.glb": { - "type": "avatar", + "public/scenes/Benchmarks.gltf": { + "type": "scene", "tags": [ "Model" ], "dependencies": [] }, - "assets/graph/simpleController.json": { + "public/scenes/animations-test.thumbnail.ktx2": { "type": "file", "tags": [ - "Volumetric" + "Image" ], "dependencies": [] }, - "public/scenes/Benchmarks.envmap.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_GlassPlasticMat_Normal.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/LOD/Test_LOD1.glb": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_RubberWoodMat_Normal.ktx2": { "type": "file", "tags": [ - "Model" + "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LeatherPartsMat_Normal.ktx2": { + "public/scenes/bpcem-envmap-bake-test.envmap.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_RubberWoodMat_Normal.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet.bin": { "type": "file", "tags": [ - "Image" + "unknown" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_MetalPartsMat_OcclusionRoughMetal.ktx2": { - "type": "file", + "public/avatars/Adam.gltf": { + "type": "avatar", "tags": [ - "Image" + "Model" ], - "dependencies": [] + "dependencies": [ + "projects/ee-development-test-suite/public/avatars/Adam/1a8a75bafb18c29e94be4f6e0df4503932791c732fd5b85f5991993ffef3199e.ktx2", + "projects/ee-development-test-suite/public/avatars/Adam/1f68862e8529230781b98f1825852cb37039ab137a796da4e1a54368ab308693.ktx2", + "projects/ee-development-test-suite/public/avatars/Adam/3ebba2b690b91a31064fec6d6ca9e1558f4f56ddb804294c4663017e2a2ae8fc.bin", + "projects/ee-development-test-suite/public/avatars/Adam/5cbedd9382f99d1be408692e8d3b4172edb4aa5edcd9d90bca57f7c6b7db4e2b.bin", + "projects/ee-development-test-suite/public/avatars/Adam/9613d363e55e1af7cfb0dfb020bae9e417ccb11f6051da379ac96aa35cba59a0.ktx2", + "projects/ee-development-test-suite/public/avatars/Adam/Adam_data.bin", + "projects/ee-development-test-suite/public/avatars/Adam/ffd667f5c4c57f61a582c47337035d704ae616104df6ee505b3c715455c4c11c.ktx2" + ] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_GlassPlasticMat_Normal.ktx2": { + "public/avatars/Adam/9613d363e55e1af7cfb0dfb020bae9e417ccb11f6051da379ac96aa35cba59a0.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/bpcem-envmap-bake-test-bpcem-hall-bake-2.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_MetalPartsMat_OcclusionRoughMetal.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/test.gltf": { - "type": "scene", - "tags": [], - "dependencies": [] - }, - "assets/animations/Racer/b10cf5cda7f6b46299df899e7d38424f8229b0019cec043bb70f3fc71117dc76.ktx2": { + "assets/LOD/Test_LOD2.glb": { "type": "file", "tags": [ - "Image" + "Model" ], "dependencies": [] }, - "assets/animations/rings.glb": { + "assets/envmaps/hall.glb": { "type": "file", "tags": [ "Model" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LensesMat_OcclusionRoughMetal.ktx2": { + "public/avatars/Adam/ffd667f5c4c57f61a582c47337035d704ae616104df6ee505b3c715455c4c11c.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/animations/Racer/Racer_data.bin": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LeatherPartsMat_OcclusionRoughMetal.ktx2": { "type": "file", "tags": [ - "unknown" + "Image" ], "dependencies": [] }, - "public/scenes/test.thumbnail.jpeg": { + "public/scenes/bpcem-envmap-bake-test.scene.json": { + "type": "scene", + "tags": [], + "dependencies": [] + }, + "assets/graph/default-graph.json": { "type": "file", "tags": [ - "Image" + "Volumetric" ], "dependencies": [] }, - "public/scenes/Examples.gltf": { - "type": "scene", + "assets/animations/Racer-transformed.gltf": { + "type": "file", "tags": [ "Model" ], "dependencies": [] }, - "public/scenes/Examples.envmap.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_MetalPartsMat_BaseColor.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/avatars/Adam/ffd667f5c4c57f61a582c47337035d704ae616104df6ee505b3c715455c4c11c.ktx2": { + "assets/animations/Racer/a8c5117aec263607fb9b24904949c1de9d246ff5a9518ab40e9555d191274122.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/animations/Racer-transformed.gltf": { + "public/scenes/bpcem-envmap-bake-test-bpcem-hall-bake-1.ktx2": { "type": "file", "tags": [ - "Model" + "Image" ], "dependencies": [] }, - "public/scenes/bpcem-envmap-bake-test.envmap.ktx2": { + "public/scenes/bpcem-envmap-bake-test.thumbnail.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/LOD/Test_LOD0.glb": { + "public/scenes/Benchmarks.thumbnail.jpg": { "type": "file", "tags": [ - "Model" + "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet.gltf": { + "assets/animations/rings.glb": { "type": "file", "tags": [ "Model" ], "dependencies": [] }, - "public/scenes/Benchmarks.gltf": { - "type": "scene", + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LeatherPartsMat_Normal.ktx2": { + "type": "file", "tags": [ - "Model" + "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_GlassPlasticMat_OcclusionRoughMetal.ktx2": { + "public/scenes/test.gltf": { + "type": "scene", + "tags": [], + "dependencies": [] + }, + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LensesMat_OcclusionRoughMetal.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/Examples.thumbnail.jpg": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_RubberWoodMat_OcclusionRoughMetal.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/animations-test.thumbnail.ktx2": { + "public/scenes/test.thumbnail.jpeg": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/test.envmap.png": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_GlassPlasticMat_BaseColor.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/Benchmarks.thumbnail.jpg": { - "type": "file", + "public/avatars/Test Avaturn.glb": { + "type": "avatar", "tags": [ - "Image" + "Model" ], "dependencies": [] }, - "assets/animations/tornado-mobile-xr.glb": { + "public/avatars/Adam/Adam_data.bin": { "type": "file", "tags": [ - "Model" + "unknown" ], "dependencies": [] }, - "assets/animations/transforms.glb": { + "public/scenes/animations-test.scene.json": { + "type": "scene", + "tags": [], + "dependencies": [] + }, + "assets/LOD/Test_LOD1.glb": { "type": "file", "tags": [ "Model" diff --git a/src/sceneRoute.tsx b/src/sceneRoute.tsx index 95e22af..7dd4d06 100644 --- a/src/sceneRoute.tsx +++ b/src/sceneRoute.tsx @@ -13,6 +13,8 @@ import { CameraComponent } from '@etherealengine/spatial/src/camera/components/C import { CameraOrbitComponent } from '@etherealengine/spatial/src/camera/components/CameraOrbitComponent' import { InputComponent } from '@etherealengine/spatial/src/input/components/InputComponent' import { RendererComponent } from '@etherealengine/spatial/src/renderer/WebGLRendererSystem' +import { useEngineCanvas } from '@etherealengine/client-core/src/hooks/useEngineCanvas' +import { EngineState } from '@etherealengine/spatial/src/EngineState' type Metadata = { name: string @@ -58,6 +60,7 @@ export const useRouteScene = (projectName = 'ee-development-test-suite', sceneNa const gltfState = useMutableState(GLTFAssetState) const sceneEntity = useHookstate(undefined) + const viewerEntity = useMutableState(EngineState).viewerEntity.value useEffect(() => { const sceneURL = `projects/${projectName}/${sceneName}` @@ -67,11 +70,11 @@ export const useRouteScene = (projectName = 'ee-development-test-suite', sceneNa }, [gltfState]) useImmediateEffect(() => { - const entity = Engine.instance.viewerEntity - setComponent(entity, CameraOrbitComponent) - setComponent(entity, InputComponent) - getComponent(entity, CameraComponent).position.set(0, 0, 4) - }, []) + if (!viewerEntity) return + setComponent(viewerEntity, CameraOrbitComponent) + setComponent(viewerEntity, InputComponent) + getComponent(viewerEntity, CameraComponent).position.set(0, 0, 4) + }, [viewerEntity]) return sceneEntity } @@ -86,6 +89,8 @@ const Routes = (props: { routes: RouteData[]; header: string }) => { const ref = useRef(null as null | HTMLDivElement) + useEngineCanvas(ref) + const onClick = (routeIndex: number) => { setCurrentRoute(routeIndex) setCurrentSubRoute(0) @@ -118,33 +123,15 @@ const Routes = (props: { routes: RouteData[]; header: string }) => { window.history.pushState(null, '', url.toString()) }, [currentRoute, currentSubRoute]) - useEffect(() => { - if (!ref?.current) return - - const canvas = getComponent(Engine.instance.viewerEntity, RendererComponent).renderer.domElement - canvas.parentElement?.removeChild(canvas) - ref.current.appendChild(canvas) - - getComponent(Engine.instance.viewerEntity, RendererComponent).needsResize = true - - const observer = new ResizeObserver(() => { - getComponent(Engine.instance.viewerEntity, RendererComponent).needsResize = true - }) - - observer.observe(ref.current) - return () => { - observer.disconnect() - } - }, [ref]) - const selectedRoute = currentRoute !== null ? routes[currentRoute] : null const selectedSub = selectedRoute && selectedRoute.sub && selectedRoute.sub[currentSubRoute] const Entry = selectedRoute && selectedRoute.entry const subProps = selectedSub ? selectedSub.props : {} + return ( <> -
+
From 9d055c44783b0adfe99693cf09a980d6d1505666 Mon Sep 17 00:00:00 2001 From: HexaField Date: Fri, 21 Jun 2024 13:48:43 +1000 Subject: [PATCH 2/3] format --- src/sceneRoute.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/sceneRoute.tsx b/src/sceneRoute.tsx index 7dd4d06..74589c4 100644 --- a/src/sceneRoute.tsx +++ b/src/sceneRoute.tsx @@ -5,16 +5,15 @@ import React, { useEffect, useRef, useState } from 'react' import { useLoadEngineWithScene, useNetwork } from '@etherealengine/client-core/src/components/World/EngineHooks' import { useLoadScene } from '@etherealengine/client-core/src/components/World/LoadLocationScene' +import { useEngineCanvas } from '@etherealengine/client-core/src/hooks/useEngineCanvas' import '@etherealengine/client-core/src/world/LocationModule' -import { Engine, Entity, getComponent, setComponent } from '@etherealengine/ecs' +import { Entity, getComponent, setComponent } from '@etherealengine/ecs' import { GLTFAssetState } from '@etherealengine/engine/src/gltf/GLTFState' import { useHookstate, useImmediateEffect, useMutableState } from '@etherealengine/hyperflux' +import { EngineState } from '@etherealengine/spatial/src/EngineState' import { CameraComponent } from '@etherealengine/spatial/src/camera/components/CameraComponent' import { CameraOrbitComponent } from '@etherealengine/spatial/src/camera/components/CameraOrbitComponent' import { InputComponent } from '@etherealengine/spatial/src/input/components/InputComponent' -import { RendererComponent } from '@etherealengine/spatial/src/renderer/WebGLRendererSystem' -import { useEngineCanvas } from '@etherealengine/client-core/src/hooks/useEngineCanvas' -import { EngineState } from '@etherealengine/spatial/src/EngineState' type Metadata = { name: string @@ -131,7 +130,7 @@ const Routes = (props: { routes: RouteData[]; header: string }) => { return ( <> -
+
From fc66af0f1c5344341c33af0d0ec81513a521bbc9 Mon Sep 17 00:00:00 2001 From: HexaField Date: Tue, 25 Jun 2024 10:24:05 +1000 Subject: [PATCH 3/3] sort resources json --- resources.json | 222 ++++++++++++++++++++++++------------------------- 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/resources.json b/resources.json index 290af20..fad9dd9 100644 --- a/resources.json +++ b/resources.json @@ -1,251 +1,239 @@ { - "public/scenes/Examples.thumbnail.jpg": { - "type": "file", - "tags": [ - "Image" - ], - "dependencies": [] - }, - "assets/GLTF/Flight Helmet/FlightHelmet.gltf": { + "assets/animations/Racer-transformed.gltf": { "type": "file", "tags": [ "Model" ], "dependencies": [] }, - "public/avatars/Adam/3ebba2b690b91a31064fec6d6ca9e1558f4f56ddb804294c4663017e2a2ae8fc.bin": { + "assets/animations/Racer/740e60973cb1cb9852ebe8821bcaf77f2fda66b68f5ed2c143ef504087968238.bin": { "type": "file", "tags": [ "unknown" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LeatherPartsMat_BaseColor.ktx2": { + "assets/animations/Racer/a8c5117aec263607fb9b24904949c1de9d246ff5a9518ab40e9555d191274122.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/avatars/Adam/1a8a75bafb18c29e94be4f6e0df4503932791c732fd5b85f5991993ffef3199e.ktx2": { + "assets/animations/Racer/b10cf5cda7f6b46299df899e7d38424f8229b0019cec043bb70f3fc71117dc76.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/Images/testImage.jpg": { + "assets/animations/Racer/fb54d298ab7ec1b2628911e434f40ee06c24543923e0b3e14802cf55092b826a.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/test.envmap.png": { + "assets/animations/Racer/Racer_data.bin": { "type": "file", "tags": [ - "Image" + "unknown" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LensesMat_Normal.ktx2": { + "assets/animations/rings.glb": { "type": "file", "tags": [ - "Image" + "Model" ], "dependencies": [] }, - "assets/LOD/Test_LOD0.glb": { + "assets/animations/tornado-mobile-xr.glb": { "type": "file", "tags": [ "Model" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_RubberWoodMat_BaseColor.ktx2": { + "assets/animations/transforms.glb": { "type": "file", "tags": [ - "Image" + "Model" ], "dependencies": [] }, - "public/avatars/Adam/5cbedd9382f99d1be408692e8d3b4172edb4aa5edcd9d90bca57f7c6b7db4e2b.bin": { + "assets/envmaps/hall.glb": { "type": "file", "tags": [ - "unknown" + "Model" ], "dependencies": [] }, - "assets/animations/Racer/Racer_data.bin": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_GlassPlasticMat_BaseColor.ktx2": { "type": "file", "tags": [ - "unknown" + "Image" ], "dependencies": [] }, - "assets/Videos/HDVideo.mp4": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_GlassPlasticMat_Normal.ktx2": { "type": "file", "tags": [ - "Video" + "Image" ], "dependencies": [] }, - "public/avatars/Test RPM.glb": { - "type": "avatar", + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_GlassPlasticMat_OcclusionRoughMetal.ktx2": { + "type": "file", "tags": [ - "Model" + "Image" ], "dependencies": [] }, - "public/avatars/Adam/1f68862e8529230781b98f1825852cb37039ab137a796da4e1a54368ab308693.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LeatherPartsMat_BaseColor.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/graph/simpleController.json": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LeatherPartsMat_Normal.ktx2": { "type": "file", "tags": [ - "Volumetric" + "Image" ], "dependencies": [] }, - "public/scenes/Benchmarks.envmap.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LeatherPartsMat_OcclusionRoughMetal.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/bpcem-envmap-bake-test-bpcem-hall-bake-2.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LensesMat_BaseColor.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/test.scene.json": { - "type": "scene", - "tags": [], - "dependencies": [] - }, - "public/scenes/animations-test.envmap.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LensesMat_Normal.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/animations/transforms.glb": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LensesMat_OcclusionRoughMetal.ktx2": { "type": "file", "tags": [ - "Model" + "Image" ], "dependencies": [] }, - "assets/animations/Racer/fb54d298ab7ec1b2628911e434f40ee06c24543923e0b3e14802cf55092b826a.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_MetalPartsMat_BaseColor.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LensesMat_BaseColor.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_MetalPartsMat_Normal.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/Examples.envmap.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_MetalPartsMat_OcclusionRoughMetal.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/Examples.gltf": { - "type": "scene", + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_RubberWoodMat_BaseColor.ktx2": { + "type": "file", "tags": [ - "Model" + "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_MetalPartsMat_Normal.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_RubberWoodMat_Normal.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/animations/Racer/740e60973cb1cb9852ebe8821bcaf77f2fda66b68f5ed2c143ef504087968238.bin": { + "assets/GLTF/Flight Helmet/FlightHelmet_Materials_RubberWoodMat_OcclusionRoughMetal.ktx2": { "type": "file", "tags": [ - "unknown" + "Image" ], "dependencies": [] }, - "assets/animations/tornado-mobile-xr.glb": { + "assets/GLTF/Flight Helmet/FlightHelmet.bin": { "type": "file", "tags": [ - "Model" + "unknown" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_GlassPlasticMat_OcclusionRoughMetal.ktx2": { + "assets/GLTF/Flight Helmet/FlightHelmet.gltf": { "type": "file", "tags": [ - "Image" + "Model" ], "dependencies": [] }, - "assets/animations/Racer/b10cf5cda7f6b46299df899e7d38424f8229b0019cec043bb70f3fc71117dc76.ktx2": { + "assets/graph/default-graph.json": { "type": "file", "tags": [ - "Image" + "Volumetric" ], "dependencies": [] }, - "public/scenes/Benchmarks.gltf": { - "type": "scene", + "assets/graph/simpleController.json": { + "type": "file", "tags": [ - "Model" + "Volumetric" ], "dependencies": [] }, - "public/scenes/animations-test.thumbnail.ktx2": { + "assets/Images/testImage.jpg": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_GlassPlasticMat_Normal.ktx2": { + "assets/LOD/Test_LOD0.glb": { "type": "file", "tags": [ - "Image" + "Model" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_RubberWoodMat_Normal.ktx2": { + "assets/LOD/Test_LOD1.glb": { "type": "file", "tags": [ - "Image" + "Model" ], "dependencies": [] }, - "public/scenes/bpcem-envmap-bake-test.envmap.ktx2": { + "assets/LOD/Test_LOD2.glb": { "type": "file", "tags": [ - "Image" + "Model" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet.bin": { + "assets/Videos/HDVideo.mp4": { "type": "file", "tags": [ - "unknown" + "Video" ], "dependencies": [] }, @@ -264,172 +252,184 @@ "projects/ee-development-test-suite/public/avatars/Adam/ffd667f5c4c57f61a582c47337035d704ae616104df6ee505b3c715455c4c11c.ktx2" ] }, - "public/avatars/Adam/9613d363e55e1af7cfb0dfb020bae9e417ccb11f6051da379ac96aa35cba59a0.ktx2": { + "public/avatars/Adam/1a8a75bafb18c29e94be4f6e0df4503932791c732fd5b85f5991993ffef3199e.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_MetalPartsMat_OcclusionRoughMetal.ktx2": { + "public/avatars/Adam/1f68862e8529230781b98f1825852cb37039ab137a796da4e1a54368ab308693.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/LOD/Test_LOD2.glb": { + "public/avatars/Adam/3ebba2b690b91a31064fec6d6ca9e1558f4f56ddb804294c4663017e2a2ae8fc.bin": { "type": "file", "tags": [ - "Model" + "unknown" ], "dependencies": [] }, - "assets/envmaps/hall.glb": { + "public/avatars/Adam/5cbedd9382f99d1be408692e8d3b4172edb4aa5edcd9d90bca57f7c6b7db4e2b.bin": { "type": "file", "tags": [ - "Model" + "unknown" ], "dependencies": [] }, - "public/avatars/Adam/ffd667f5c4c57f61a582c47337035d704ae616104df6ee505b3c715455c4c11c.ktx2": { + "public/avatars/Adam/9613d363e55e1af7cfb0dfb020bae9e417ccb11f6051da379ac96aa35cba59a0.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LeatherPartsMat_OcclusionRoughMetal.ktx2": { + "public/avatars/Adam/Adam_data.bin": { "type": "file", "tags": [ - "Image" + "unknown" ], "dependencies": [] }, - "public/scenes/bpcem-envmap-bake-test.scene.json": { - "type": "scene", - "tags": [], + "public/avatars/Adam/ffd667f5c4c57f61a582c47337035d704ae616104df6ee505b3c715455c4c11c.ktx2": { + "type": "file", + "tags": [ + "Image" + ], "dependencies": [] }, - "assets/graph/default-graph.json": { - "type": "file", + "public/avatars/Test Avaturn.glb": { + "type": "avatar", "tags": [ - "Volumetric" + "Model" ], "dependencies": [] }, - "assets/animations/Racer-transformed.gltf": { - "type": "file", + "public/avatars/Test RPM.glb": { + "type": "avatar", "tags": [ "Model" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_MetalPartsMat_BaseColor.ktx2": { + "public/scenes/animations-test.envmap.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/animations/Racer/a8c5117aec263607fb9b24904949c1de9d246ff5a9518ab40e9555d191274122.ktx2": { + "public/scenes/animations-test.scene.json": { + "type": "scene", + "tags": [], + "dependencies": [] + }, + "public/scenes/animations-test.thumbnail.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/bpcem-envmap-bake-test-bpcem-hall-bake-1.ktx2": { + "public/scenes/Benchmarks.envmap.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/bpcem-envmap-bake-test.thumbnail.ktx2": { + "public/scenes/Benchmarks.gltf": { + "type": "scene", + "tags": [ + "Model" + ], + "dependencies": [] + }, + "public/scenes/Benchmarks.thumbnail.jpg": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/Benchmarks.thumbnail.jpg": { + "public/scenes/bpcem-envmap-bake-test-bpcem-hall-bake-1.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/animations/rings.glb": { + "public/scenes/bpcem-envmap-bake-test-bpcem-hall-bake-2.ktx2": { "type": "file", "tags": [ - "Model" + "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LeatherPartsMat_Normal.ktx2": { + "public/scenes/bpcem-envmap-bake-test.envmap.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/test.gltf": { + "public/scenes/bpcem-envmap-bake-test.scene.json": { "type": "scene", "tags": [], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_LensesMat_OcclusionRoughMetal.ktx2": { + "public/scenes/bpcem-envmap-bake-test.thumbnail.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_RubberWoodMat_OcclusionRoughMetal.ktx2": { + "public/scenes/Examples.envmap.ktx2": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/scenes/test.thumbnail.jpeg": { - "type": "file", + "public/scenes/Examples.gltf": { + "type": "scene", "tags": [ - "Image" + "Model" ], "dependencies": [] }, - "assets/GLTF/Flight Helmet/FlightHelmet_Materials_GlassPlasticMat_BaseColor.ktx2": { + "public/scenes/Examples.thumbnail.jpg": { "type": "file", "tags": [ "Image" ], "dependencies": [] }, - "public/avatars/Test Avaturn.glb": { - "type": "avatar", + "public/scenes/test.envmap.png": { + "type": "file", "tags": [ - "Model" + "Image" ], "dependencies": [] }, - "public/avatars/Adam/Adam_data.bin": { - "type": "file", - "tags": [ - "unknown" - ], + "public/scenes/test.gltf": { + "type": "scene", + "tags": [], "dependencies": [] }, - "public/scenes/animations-test.scene.json": { + "public/scenes/test.scene.json": { "type": "scene", "tags": [], "dependencies": [] }, - "assets/LOD/Test_LOD1.glb": { + "public/scenes/test.thumbnail.jpeg": { "type": "file", "tags": [ - "Model" + "Image" ], "dependencies": [] }