How to change the vertex position of a mesh using the transform controls

this is demo.

The realized function is that the network renders other colors outside the box

Can’t I use the transform controls to change vertices?

Can someone help me, please?

Here is the updated fiddle with the expected behavior: Edit fiddle - JSFiddle - Code Playground

Do not execute mesh.geometry.applyMatrix4(mesh.matrixWorld) every time the mesh is transformed. Unless you need the data in JS always perform vertex transformation in the shader since it’s way faster. This can be easily done by transforming the pos vector in your vertex shader to world space by multiplying with the world matrix.

This is what I wanted as expected, thank you very much!