Modify vertex-positions of Plane?
See original GitHub issueHello, I’m new to Three.js and started playing around with the demos. I’ve tried to modify the positions of my plane like this:
var oGeo = new THREE.PlaneGeometry( 1, 1, 1, 1 );
oGeo.vertices[0].position.z = -0.5;
oGeo.vertices[0].position.y = 0.2;
That worked for the positioning, but I think my light won’t get applied on this plane like it should. There has to be a proper way doing this. Can you help me, please?
What I’m actually trying to do is a tilemap with 16x16 planes. I want to be able to modify the y-position of every plane dynamically.
Issue Analytics
- State:
- Created 12 years ago
- Comments:25 (5 by maintainers)
Top Results From Across the Web
Manipulating a vertex on a plane - Unity Answers
you need to access the vertices through the Mesh function this way. function Update () {; var mesh : Mesh = GetComponent(MeshFilter).mesh; ...
Read more >Change vertex positions on a plane by customizing the ...
I would like to animate the vertex positions on a plane, using a meshStandardMaterial in order to benefit from it's built-in PBR features....
Read more >Three.js what is the most performant way of changing a vertex ...
The best way in terms of performance is to update the positions in the vertex shader. This is because your geometry's position attribute...
Read more >Using geometry nodes, is it possible to transform vertices, that ...
As of Blender 3.0 the Attribute Vector Math node is legacy. And there is now a much simpler way to transform vertices by...
Read more >Positions Editor window | Package Manager UI website
Use the Positions Editor window to enter specific translation coordinates to modify vertex positions. ... Tip: You can access this tool from the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ve added those two lines:
Now the light seems to be correct. Now I can realize my real-time-modification of those planes. But it really is a very dirty solution, isn’t it? Is this the only way to realize real-time modification of Objects? I know that it is possible to do this directly on the shader, but for the start, this is to high for me. Any other hints?
Btw. Thank you very much fabricasapiens
@murci thank you SO much for the heads up about verticesNeedUpdate