Animate path of TubeGeometry

I am following this example:

https://threejs.org/docs/#api/en/geometries/TubeGeometry

I want to create some kind of “flexible tube” with it where I have 1 sided of the TubeGeometry fixed, and the ohter end moving.

I have found many articles where a camera follows the path of a TubeGeometry. That is definitely NOT what I am looking for. I would like to create somethig (more or less) like a water hose from the fire department which is loose on one end moving randomly.

(e.g. like this Waterhose on YouTube (external link!)

Can I do this with a TubeGeometry ? If so how can I animate the path ?

You can use a circle extruded along a spline. The spline defines the curve of your hose. Another approach is to use skinning.

Here are two examples with Three.js skinning:

Tentacle with suckers
image

Psychedelic tapeworm
image

As for example for a tube along a spline, I don’t have a Three.js example right now, but I have a Suica example (Suica is based on Three.js, so this shows that it is possible):

Dynamic tube
image

4 Likes

:star_struck: Awesome examples !! :star_struck:

Going to study the first one.

1 Like

From the Collection of examples from discourse.threejs.org

DynamicTubeGeometryCaps

1 Like