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

Set scale of objects which have units of "scene" #369

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

joshnice
Copy link

@joshnice joshnice commented Sep 6, 2022

Allow an object in the threebox world which is using units of "scene", to use the setScale function. Provided example as well.

@jscastro76
Copy link
Owner

Hi, @joshnice
Thanks for contributing!
I haven't had time yet to test all the changes but at first sight I see a mistake options.scale = this.scale; must be set always, not only in the else part. The reason is basically to keep that value updated always to the latest. This is needed to avoid any issue if you clone an object, otherwise the new object won't be able to restore with the latest value.

options.scale = this.scale;

If you change that, I'm happy to approve and welcome you as contributor!

@joshnice
Copy link
Author

Hi @jscastro76,
I have made the changes you suggested and thanks for the explanation of why it needed to be changed!
I also found an issue that when the object is loaded with units of meters the setScale function does not work (this is happening in the master), I did not know if you were aware of this or not. However when I am using Threebox I load the models in with the units of scene, so this does not affect me.

@jscastro76
Copy link
Owner

Hi @jscastro76, I have made the changes you suggested and thanks for the explanation of why it needed to be changed! I also found an issue that when the object is loaded with units of meters the setScale function does not work (this is happening in the master), I did not know if you were aware of this or not. However when I am using Threebox I load the models in with the units of scene, so this does not affect me.

setScale should work as it's heavily used when the model has fix zoom property... can you elaborate or show me that bug in any example?

@joshnice
Copy link
Author

Sorry I was mistaken, I had not set the fixedZoom property as true. So there is no issue with the units being meters and setting the scale.

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

Successfully merging this pull request may close these issues.

2 participants