Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve scene state when editing #42

Open
anthonye2007 opened this issue Mar 2, 2015 · 1 comment
Open

Preserve scene state when editing #42

anthonye2007 opened this issue Mar 2, 2015 · 1 comment

Comments

@anthonye2007
Copy link

Say I have a ball that starts behind the camera and moves in a circle around the camera. If I update the size of the ball in the code, the ball will get bigger but will also reset to its initial position.

I want to change the size of the ball as it passes in front of me without it having to reset.

@brianpeiris
Copy link
Owner

Ideally, it would be implemented something like the Khan Academy editor: http://youtu.be/2sEvlJKAuos?t=15m49s

But that might be overkill for an experiment. If your experiment is simple or scripted enough, you might be able to get away with persisting the objects in the scene and modifying their state instead of clearing them out (

constr.prototype.clearScene = function () {
for (var i = 0; i < this.sceneStuff.length; i++) {
this.scene.remove(this.sceneStuff[i]);
}
this.sceneStuff = [];
};
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants