Add axis helper
This commit is contained in:
parent
2aed1c37ce
commit
c42f6ff9ed
2 changed files with 9 additions and 1 deletions
2
TODO.md
2
TODO.md
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue