Closed Liquid-Blocks closed 2 years ago
In the StdEnv, the part for loading the terrain needs optimization.
StdEnv
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.
TerrainController
Here is are the basic methods to give the TerrainController:
TerrainController.loadTerrain(<URL or path>, scene, x, y, z)
TerrainController.generateCollider(scene)
Task:
THREE.GLTFLoader
THREE.MeshBVH
Ref Images:
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
:TerrainController.loadTerrain(<URL or path>, scene, x, y, z)
TerrainController.generateCollider(scene)
Task:
THREE.GLTFLoader
and the loading logic inside theTerrainController
THREE.MeshBVH
and the collider loginc inside theTerrainController
StdEnv
class to adapt with the newTerrainController
Ref Images: