Interactable camera path (#372)

* click to add cameras

* buttons for translate, rotation, and world/local

* gui layout mostly done

* interpolation works

* slider play works

* camera code mostly working
This commit is contained in:
Ethan Weber authored and GitHub committed 2022-09-10 14:06:03 -07:00
1 parent ad4a6c4a6f
commit adf249b3cd
11 files changed
+650 -48

No files matched your search

+8
View File
@@ -60,6 +60,10 @@ export default class SceneNode {
return child.find(path.slice(1));
}
find_object(path) {
return this.find(path.concat(['<object>'])).object;
}
set_property(property, value) {
if (property === 'position') {
this.object.position.set(value[0], value[1], value[2]);
@@ -83,6 +87,10 @@ export default class SceneNode {
);
}
set_object_from_path(path, object) {
this.find(path.concat(['<object>'])).set_object(object);
}
set_object(object) {
const parent = this.object.parent;
this.dispose_recursive();