Calibrated Scale (fade out)

Hi community!

Picture:

Demo: https://codepen.io/prisoner849/full/PoEQPWR

An attempt to build a calibrated scale around an object, that fades out with depth relative to the object.

10 Likes

Ok, this is pretty damn cool!
Is it possible to have the lines stand straight up 90 degrees instead of laying flat? :thinking:

You should just be able to rotate the lines object by 90 degrees…

let circularScale = makeCalibratedScale(6);
circularScale.rotation.x = 90 * Math.PI / 180

Thanks, but that rotates the entire ring object. I’m hoping to get the individual lines rotated so that the ring is in the same position, but the lines would be rotated 90 degrees.

Yes, it is possible. You have to change line 40 – that is where the end point of each line is set. Once you set it the way you need, you will get something like this:

2 Likes

Thanks, I’ll give that a shot.

ah like that, yes as @PavelBoytchev has mentioned, line 40 would probably become something like…

v3.clone().setLength(r).setZ(len * 0.25)
3 Likes

Slightly changed the function for calibrated scale. Now it has the parameter for angle.

Examples:

  • let circularScale = makeCalibratedScale(6, -Math.PI * 0.25);

  • let circularScale = makeCalibratedScale(6, Math.PI * 0.5);

  • let circularScale = makeCalibratedScale(6); //default is 0

3 Likes

And if someone is crazy enough, it is possible to spin the markers along the main line (although it makes no sense):

3 Likes

This is what I wanted to do :smile: :handshake:

2 Likes

Thank you so much!
Might seem simple to you, but you guys really do amazing stuff.

1 Like