Skip to content

Scale vs args boxBufferGeometry #1816

Answered by drcmda
Kinatzo asked this question in Q&A
Discussion options

You must be logged in to vote

scale is better because args re-construct the object from scratch:

<boxGeometry args={[1, 2, 3]} />

is the same as writing

const box1 = new THREE.BoxGeometry(1, 2, 3)

scale on the other hand just stretches the object, and in a cubes case that's the same as providing args.

btw boxBufferGeometry is deprecated. everything is now just [name]Geometry and it's buffergeometry as the only remaining geometry type in three.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Kinatzo
Comment options

Answer selected by Kinatzo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants