Add axis helper

This commit is contained in:
Nettika 2026-01-28 23:45:55 -08:00
parent 2aed1c37ce
commit c42f6ff9ed
No known key found for this signature in database
2 changed files with 9 additions and 1 deletions

View file

@ -37,7 +37,7 @@ A step-by-step checklist for porting MatterControl's design features to a Vue +
### Scene Helpers ### Scene Helpers
- [x] Add ground grid helper (XZ plane) - [x] Add ground grid helper (XZ plane)
- [ ] Add axis helper (RGB arrows for X/Y/Z) - [x] Add axis helper (RGB arrows for X/Y/Z)
- [ ] Add option to toggle grid visibility - [ ] Add option to toggle grid visibility
- [ ] Add option to toggle axis visibility - [ ] Add option to toggle axis visibility

View file

@ -35,6 +35,9 @@ function initScene() {
// Add grid helper // Add grid helper
addGridHelper() addGridHelper()
// Add axis helper
addAxisHelper()
// Add a test cube to verify rendering // Add a test cube to verify rendering
addTestCube() addTestCube()
@ -50,6 +53,11 @@ function addGridHelper() {
scene.add(gridHelper) scene.add(gridHelper)
} }
function addAxisHelper() {
const axisHelper = new THREE.AxesHelper(5)
scene.add(axisHelper)
}
function addLighting() { function addLighting() {
// Ambient light for base illumination // Ambient light for base illumination
const ambientLight = new THREE.AmbientLight(0xffffff, 0.4) const ambientLight = new THREE.AmbientLight(0xffffff, 0.4)