Add project configuration and scene controller

- Created a new project configuration file `project.json` with metadata, camera settings, scene details, and lighting configurations.
- Implemented a new scene controller in `scena-controller copy.js` to manage 3D scene rendering, model loading, and user interactions.
- Integrated various loaders for STL and GLB models, along with functionality for dynamic material updates and model visibility toggling.
- Enhanced camera controls using TrackballControls for improved user navigation within the 3D environment.
This commit is contained in:
2026-01-21 16:10:18 +01:00
parent 7dca231004
commit 234cd7d415
28 changed files with 1699 additions and 208 deletions

View File

@@ -250,14 +250,14 @@ def stl_to_gltf(path_to_stl, out_path, is_binary):
print("Done! Exported to %s" %out_path)
def batch_conversion(binary_stl_path, out_path, is_binary):
#print(os.listdir(binary_stl_path))
for f in os.listdir(binary_stl_path):
new_file_name = f.replace('.stl','.glb')
destination = out_path+'/'+new_file_name
source = binary_stl_path+'/'+f
if source.endswith('.stl') and not source.startswith('.'):
if source.endswith('.stl') and not f.startswith('.'):
stl_to_gltf(source, destination, is_binary)
print('Convert: '+f+ ' ---> '+new_file_name)
@@ -267,8 +267,8 @@ if __name__ == '__main__':
import sys
if len(sys.argv) < 3:
print("use it like python3 stl_to_gltf.py /path/to/stl /path/to/gltf/folder -b -batch")
print("or python3 stl_to_gltf.py /path/to/stl /path/to/glb/file -b")
print("use it like python3 converter.py /path/to/stl /path/to/gltf/folder -b -batch")
print("or python3 converter.py /path/to/stl /path/to/glb/file -b")
sys.exit(1)
path_to_stl = sys.argv[1]