From 69785bc0a2b25c28c61cbf6ff2b00ed7c8b2a272 Mon Sep 17 00:00:00 2001 From: Brian Zinn Date: Sat, 26 Aug 2023 12:11:33 -0700 Subject: [PATCH] update: Asset relative locations --- .../static/content/examples/basic/assign-to/AssignTo.tsx | 4 ++-- .../static/content/examples/gui/skybox-3d/Skybox3D.tsx | 4 ++-- .../examples/hooks/asset-manager/AssetManager.tsx | 2 +- .../examples/post-process/image/PostProcessImage.tsx | 2 +- .../textures/fresnel-parameters/FresnelParameters.tsx | 2 +- .../examples/textures/image-textures/ImageTextures.tsx | 4 ++-- .../textures/pbr-configuration/PBRConfiguration.tsx | 6 +++--- packages/static/content/examples/textures/pbr/PBR.tsx | 9 ++++++--- packages/static/content/examples/textures/pbr/index.mdx | 2 +- 9 files changed, 19 insertions(+), 16 deletions(-) diff --git a/packages/static/content/examples/basic/assign-to/AssignTo.tsx b/packages/static/content/examples/basic/assign-to/AssignTo.tsx index 60b84382..c2512dea 100644 --- a/packages/static/content/examples/basic/assign-to/AssignTo.tsx +++ b/packages/static/content/examples/basic/assign-to/AssignTo.tsx @@ -28,13 +28,13 @@ export const FromInstance = () => ( useRoughnessFromMetallicTextureGreen useMetallnessFromMetallicTextureBlue > - + diff --git a/packages/static/content/examples/gui/skybox-3d/Skybox3D.tsx b/packages/static/content/examples/gui/skybox-3d/Skybox3D.tsx index da4c9764..e204bf80 100644 --- a/packages/static/content/examples/gui/skybox-3d/Skybox3D.tsx +++ b/packages/static/content/examples/gui/skybox-3d/Skybox3D.tsx @@ -6,11 +6,11 @@ import { Engine, Scene, Skybox } from 'react-babylonjs' const SkyboxScenes = [ { name: 'sunny day', - texture: `../../assets/textures/TropicalSunnyDay`, + texture: `../../../assets/textures/TropicalSunnyDay`, }, { name: 'specular HDR', - texture: `../../assets/textures/SpecularHDR.dds`, + texture: `../../../assets/textures/SpecularHDR.dds`, }, ] diff --git a/packages/static/content/examples/hooks/asset-manager/AssetManager.tsx b/packages/static/content/examples/hooks/asset-manager/AssetManager.tsx index 6b185fb8..eaa3ac63 100644 --- a/packages/static/content/examples/hooks/asset-manager/AssetManager.tsx +++ b/packages/static/content/examples/hooks/asset-manager/AssetManager.tsx @@ -11,7 +11,7 @@ import { Engine, Scene, Task, TaskType, useAssetManager, useBeforeRender } from const pointCloudAssets: Task[] = [ { taskType: TaskType.Binary, - url: '../../assets/kitti/000000.bin', + url: '../../../assets/kitti/000000.bin', name: 'Velodyne-kitt-dataset', }, ] diff --git a/packages/static/content/examples/post-process/image/PostProcessImage.tsx b/packages/static/content/examples/post-process/image/PostProcessImage.tsx index 8f79737c..e9d4c77e 100644 --- a/packages/static/content/examples/post-process/image/PostProcessImage.tsx +++ b/packages/static/content/examples/post-process/image/PostProcessImage.tsx @@ -100,7 +100,7 @@ const ColorGrading = () => { diff --git a/packages/static/content/examples/textures/fresnel-parameters/FresnelParameters.tsx b/packages/static/content/examples/textures/fresnel-parameters/FresnelParameters.tsx index f850f12a..06d591f0 100644 --- a/packages/static/content/examples/textures/fresnel-parameters/FresnelParameters.tsx +++ b/packages/static/content/examples/textures/fresnel-parameters/FresnelParameters.tsx @@ -9,7 +9,7 @@ import { Engine, Scene, Skybox } from 'react-babylonjs' * Insipration Playground: https://www.babylonjs-playground.com/#AQZJ4C#0 */ const WithFresnelParameters = () => { - let sunnyDayRootUrl = '../../assets/textures/TropicalSunnyDay' + let sunnyDayRootUrl = '../../../assets/textures/TropicalSunnyDay' let pointLightRef = useRef(null) const [pointLightDiffuse, setPointLightDiffuse] = useState(() => new Color3(1, 0.5, 0.5)) diff --git a/packages/static/content/examples/textures/image-textures/ImageTextures.tsx b/packages/static/content/examples/textures/image-textures/ImageTextures.tsx index dbaff630..2d396e11 100644 --- a/packages/static/content/examples/textures/image-textures/ImageTextures.tsx +++ b/packages/static/content/examples/textures/image-textures/ImageTextures.tsx @@ -14,12 +14,12 @@ const textureAssets: Task[] = [ }, { taskType: TaskType.Texture, - url: '../../assets/textures/grass.png', + url: '../../../assets/textures/grass.png', name: 'grass', }, { taskType: TaskType.Texture, - url: '../../assets/textures/bump.png', + url: '../../../assets/textures/bump.png', name: 'bump', }, ] diff --git a/packages/static/content/examples/textures/pbr-configuration/PBRConfiguration.tsx b/packages/static/content/examples/textures/pbr-configuration/PBRConfiguration.tsx index 1ef3a13f..bdb75fec 100644 --- a/packages/static/content/examples/textures/pbr-configuration/PBRConfiguration.tsx +++ b/packages/static/content/examples/textures/pbr-configuration/PBRConfiguration.tsx @@ -13,7 +13,7 @@ type DynamicConfigProps = { * Official Demo: https://www.babylonjs.com/demos/pbr/ */ const WithDynamicConfig: FC = ({ roughness }) => { - let environmentUrl = '../../assets/textures/environment.dds' + let environmentUrl = '../../../assets/textures/environment.dds' const [_, setTexturesLoaded] = useState(false) const cubeTextureRef = useRef(undefined) @@ -128,8 +128,8 @@ const WithDynamicConfig: FC = ({ roughness }) => { albedoColor={Color3.White()} useMicroSurfaceFromReflectivityMapAlpha > - - + + diff --git a/packages/static/content/examples/textures/pbr/PBR.tsx b/packages/static/content/examples/textures/pbr/PBR.tsx index 87931cf0..f3b9c327 100644 --- a/packages/static/content/examples/textures/pbr/PBR.tsx +++ b/packages/static/content/examples/textures/pbr/PBR.tsx @@ -11,7 +11,7 @@ import { Engine, Scene } from 'react-babylonjs' * Official Demo: https://www.babylonjs.com/demos/pbr/ */ const WithPBR = () => { - let environmentUrl = '../../assets/textures/environment.dds' + let environmentUrl = '../../../assets/textures/environment.dds' const [_, setTexturesLoaded] = useState(false) const cubeTextureRef = useRef(undefined) @@ -140,8 +140,11 @@ const WithPBR = () => { albedoColor={Color3.White()} useMicroSurfaceFromReflectivityMapAlpha > - - + + diff --git a/packages/static/content/examples/textures/pbr/index.mdx b/packages/static/content/examples/textures/pbr/index.mdx index fa64872b..76be3067 100644 --- a/packages/static/content/examples/textures/pbr/index.mdx +++ b/packages/static/content/examples/textures/pbr/index.mdx @@ -8,7 +8,7 @@ Physical Based Rendering - accomplished here with PBRMaterial.