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

how to resize an 3d object in three.js ? ? ? #991

Closed
gova05cse opened this issue Dec 31, 2011 · 10 comments
Closed

how to resize an 3d object in three.js ? ? ? #991

gova05cse opened this issue Dec 31, 2011 · 10 comments
Labels

Comments

@gova05cse
Copy link

i am trying to develop a 3-d modelling tools using three.js ......

i have just used ur examples to render 3d objects in wire frame platforms !

now i want to resize the 3d objects using mouse dragging events or by scaling the 3d object by clicking on a button !

awaiting fo ur reply !

@mrdoob
Copy link
Owner

mrdoob commented Dec 31, 2011

The Mesh object has the scale property. Just do mesh.scale.x = 2 or mesh.scale.set( 2, 1, 1 ).

@mrdoob mrdoob closed this as completed Dec 31, 2011
@daef
Copy link

daef commented Nov 25, 2015

i have the same problem as the guy over there: http://stackoverflow.com/questions/19150120/scaling-an-object-in-three-js

the moment i change scale i get flooded with:
"Matrix3.getInverse(): can't invert matrix, determinant is 0"
in three-r73.js:4482:5

@gunderson
Copy link

I get the same error. Using THREE.CylinderGeometry

@WestLangley
Copy link
Collaborator

@gunderson Try stackoverflow if you need help.

@gangsthub
Copy link

gangsthub commented Jan 3, 2018

If you have a group of objects, try to add them to a group as rendering parent and scale the parent...

const renderingParent = new THREE.Group();
// ...
renderingParent.scale.set(2,1,1);
renderingParent.add(groupOfObjects);

@luisarandas
Copy link

What if I am constantly changing? (I don't want to calculate scales 10 times)
Isn't there a method that actually changes the geometry width and height?
Best, Luis

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 16, 2019

@luisarandas Please use the forum or stackoverflow for help requests.

@dygy

This comment has been minimized.

@dygy

This comment has been minimized.

@gangsthub
Copy link

I kindly suggest you, @dygy, to move the question to the forum if you want to get a proper answer: https://discourse.threejs.org/

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

No branches or pull requests

9 participants