Spacetime-Meta / spacetime-sdk

The spacetime-sdk is a turnkey virtual environment package for building in the Spacetime Metaverse
https://www.spacetimemeta.io/metaverse/spawn-planet
MIT License
11 stars 2 forks source link

Move terrain logic in new TerrainController #38

Closed Liquid-Blocks closed 2 years ago

Liquid-Blocks commented 2 years ago

In the StdEnv, the part for loading the terrain needs optimization.

This section has the collider generation and the terrain loading mixed together. It makes this section very difficult to read and reuse.

The solution is to create an optimized TerrainController with an API to load and access the terrains properties.

Here is are the basic methods to give the TerrainController:

Task:

  1. Use the THREE.GLTFLoader and the loading logic inside the TerrainController
  2. Move the THREE.MeshBVH and the collider loginc inside the TerrainController
  3. Modify the StdEnv class to adapt with the new TerrainController
  4. Test and validate using the examples.

Ref Images: Image Image