Is there any method moving gltf model partially?

I currently studied three.js…

Suddenly I wonder three.js actually can moving some part of gltf model separately.

like a wheel of car model, button on radio model etc…

I know three.js is not a blender or Unity like modeling tool or animating tool but i really want to know is there any method i don’t know about that.

(P.S This is my first question to three.js community, sorry for awful english. really thank to answer my question! thx)

You can use getObjectByName - if you prepare your model in Blender, pass the mesh ID you used in Blender to getObjectByName, and you’ll get that part of the model:

new THREE.GLTFLoader().load('model.glb', ({ scene }) => {
  const cube = scene.getObjectByName('Cube'); // NOTE This will return the child with name "Cube" as an Object3D / Mesh

  cube.position.x += 5.0;

1 Like