Skip to content

Commit

Permalink
Fix cabinet path
Browse files Browse the repository at this point in the history
  • Loading branch information
LostBeard committed Oct 5, 2023
1 parent 24ff35e commit e316896
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SpawnDev.BlazorJS.BabylonJS6.Demo/Pages/Index.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ void Engine_RenderLoop()
light.Intensity = 0.7;
// load .obj
// https://free3d.com/3d-model/office-filing-cabinet-341696.html
var objBytes = await HttpClient.GetByteArrayAsync("assets/filing_cabinet.obj");
var val = await JS.Fetch("/assets/filing_cabinet.obj");
var blob = await val.Blob();
var response = await JS.Fetch("assets/filing_cabinet.obj");
if (!response.Ok) throw new Exception("Failed to load: filing_cabinet.obj");
var blob = await response.Blob();
var file = new File([blob], "filing_cabinet.obj");
BABYLON.SceneLoader.ImportMesh("", "", file, scene, Callback.CreateOne<Array<AbstractMesh>, Array<BaseParticleSystem>, Array<Skeleton>, Array<AnimationGroup>, Array<TransformNode>, Array<Geometry>, Array<Light>>((meshes, particaleSystems, skeletons, animationGroups, transformNodes, geometries, lights) =>
{
Expand Down

0 comments on commit e316896

Please sign in to comment.