Hey in Three.js the sudden change is that the mesh (filter) and mesh rendering aren’t components and instead those are merged into a special game object that is called a Mesh.
This means, that you should be able to do this:
import { Behaviour, serializable } from "@needle-tools/engine";
import { Object3D, Mesh } from "three";
export class Example extends Behaviour {
@serializable(Object3D)
target?: Object3D;
@serializable(Mesh)
myMesh?: Mesh;
awake(): void {
if (this.target instanceof Mesh && this.myMesh) {
this.target.geometry = this.myMesh.geometry;
}
}
}
Here’s the relevant three.js page. As you can see the Mesh class derives from a Object3D (which is equivalent to a GameObject in Unity - so calling this.gameObject gives you the three.js Object3D object which can be of type Group, Mesh or SkinnedMesh) three.js docs
We have an implementation for the Renderer component that you have in Unity that you can use to e.g. easily access Materials but we don’t have it for the MeshFilter component that Unity has