Home  >  Q&A  >  body text

javascript - How to change the zoom center in THREEjs?

I have a requirement
It is to write an animation that emits light beams from a light source similar to a flashlight

My idea is that the light source and the starting point of the light column are at the same position, and the light emission is only the scale in the z direction of the light column

Pictured!

But during actual operation, I found out. . The magnification in THREEJS is to magnify in all directions relative to its own center (if the z direction is stretched, it will also be stretched on both sides) instead of fixing one side and only magnifying in one direction as I thought. . . This also resulted in my simple need. . . Troublesome to implement

Please answer your questions. . . How to change it so that the cone can only be enlarged in one direction of Z. . .

滿天的星座滿天的星座2734 days ago602

reply all(1)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-19 10:38:36

    Ask and answer your own questions. .
    LINK

    reply
    0
  • Cancelreply