Skip to main content

All Questions

1 vote
1 answer
1k views

Setting global rotation of a vector using a quaternion in THREE.js

I would like to set the absolute global rotation of a vector using a quaternion. Let's say I have a function f(v, q) which rotates vector v to quaternion q. THREE.Vector3 has a .applyQuaternion ...
Carpetfizz's user avatar
  • 9,069
0 votes
1 answer
1k views

Rotate camera to look at Selected object in three.js

I am trying to design a map. So, when I select any geometry, I want the object to come at the centre of the viewport and the camera to be looking at it. I have spent quite a lot of time looking ...
SAK's user avatar
  • 85
3 votes
0 answers
274 views

Rotation of an object in the tangent space of a globe

Given the two following inputs: a point on a sphere (like an observer on Earth); and the world matrix of an object in space (the position and attitude of a satellite), how to get the azimuth and ...
Mouloud85's user avatar
  • 4,174
1 vote
1 answer
707 views

THREE.js - Quaternion to lat, lon

I am trying to convert vrDisplays rotation (comes in quaternions) to latitude and longitude, since an API I use needs the current rotation of the head mounted display in lat and lon values. ...
Manuel Graf's user avatar
0 votes
2 answers
416 views

3D: avoid pinching at poles when creating sphere from polar coordinates

I'm using Wikipedia's spherical coordinate system article to create a sphere made out of particles in Three.js. Based on this article, I created a small Polarizer class that takes in polar coordinates ...
M -'s user avatar
  • 28.2k