aws-samples / aws-tools-for-babylonjs-editor

AWS Tools for Babylon.JS Editor is a suite of tools meant to interact with Babylon.JS Editor by utilizing the capabilities of AWS products.
Apache License 2.0
32 stars 9 forks source link

Fix: replace manual asset configuration with SceneImportTools #28

Closed JuliaABurch closed 2 years ago

JuliaABurch commented 2 years ago

Description

This change released in 4.1.1 of the Editor allows us to use the same import logic the editor uses when a gltf file is drag-dropped into the scene from the asset manager.

This allows us to remove all of the (frankly hacky and hard to maintain) code that was written to subtly manipulate paths and metadata so that hosts would save and reload properly.

Testing done

  1. Create a new (blank) project
  2. Add a host from Open Source Hosts Tools
  3. Press play, confirm that the host animates properly and looks at the camera
  4. Save, and then File -> Reload Project
  5. Confirm that the host is not missing textures
  6. Press play again and confirm that the host still animates properly and looks at the camera
  7. Additionally, press Run... and then Open in browser to ensure that textures/animations load properly when the project is run from the browser

    By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.