Simple Transformation Three.js

It is far from easy to start using Three.js. The documentation is incomplete and confused, and other resources are outdated. So please bear with me

How can I just transform the geometry and / or mesh?

Take this as an example. How can I make this cylinder bow like a banana?

var material = wireframe: new THREE.MeshBasicMaterial({color: 0x00ff00}); var geometry = new THREE.CylinderGeometry(15, 15, 80, 30, 1, false) , mesh = new THREE.Mesh(geometry, material); 

The authors of the Three.js examples tend to overdo it and throw so many unrelated things into their demos that the starter cannot understand the point. Take this morph demographics . Why can't they come up with a simple Geometry object and modify it?

Since this is directly related to morphing, I would also like to know how I can create a drilling rig that behaves realistically (i.e. hands do not fall off). In Cinema 4D, it's really simple, but how can I tell Three.js that a single morph point should control multiple grid points?

Take this simple Three.js robot as an example.

+4
source share
1 answer

I understand how you feel about the fact that the official demos of Three.js are so functional that itโ€™s hard to extract code for individual effects that you might want to include in your own programs. It was my motivation to create a collection of elementary and carefully commented examples in

http://stemkoski.imtqy.com/Three.js/

While this collection does not contain the example you are looking for (at least for now), I just wanted to share this link with you in the hope that it can help you learn about other individual functions in the future.

+5
source

Source: https://habr.com/ru/post/1482034/


All Articles