Skip to content

Commit

Permalink
SceneNode::create_controls: add angle controller
Browse files Browse the repository at this point in the history
  • Loading branch information
ManifoldFR committed Apr 23, 2024
1 parent edd8a27 commit 4dea3c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,12 @@ class SceneNode {
this.controllers.push(radius_controller);
}
}
// Spotlight angle
if (this.object.angle !== undefined) {
let angle_controller = this.folder.add(this.object, "angle").min(0).step(0.01).max(Math.PI / 2 - 0.0001);
angle_controller.onChange(() => this.on_update());
this.controllers.push(angle_controller);
}
// Point light falloff distance
if (this.object.distance !== undefined){
let distance_controller = this.folder.add(this.object, "distance").min(0).step(0.1).max(100.0);
Expand Down

0 comments on commit 4dea3c9

Please sign in to comment.