Is there a direct way to get the x-axis of a three.js transform? Or do I have to work it out from the rotation of the transform? If so, what is a good algorithm for doing this?
Related
I'm learning how to plot a sphere and other geometries like a torus using P5.js and was wondering if is possible to draw curves on these surfaces and how to do it. If someone could help me I would be glad.
Honestly I'm such a begineer that I don't even know how to start.
I've a point cloud object in Three.js with thousands of 2d geo location points. They are laying on the same z plane.
Currently, with using normal blending with semitransparent points, I can achieve the first result of the image below, blending the colors of the overlapping points to achieve an alpha value of 1.
I'm interested to achieve the saturation of the second image where overlapping points saturate to white. Is it possible using only blending? or I need something else like Effect Composer?
Thanks
What I'm trying to do is to "drape" some points on a PlaneGeometry. I have the planar coordinates of the points in the same coordinate system of my plane geometry, what I need i sto get the "height" from the plane to position the points on top of it.
What's the best way to achieve it? Querying the planar mesh in Javascript would be to heavy. Should it be done (and could it be done) using the vertex shader?
EDIT
Probably using a ray caster is the right solution, something like shown in this example: http://threejs.org/examples/#webgl_geometry_terrain_raycast
EDIT2
Raycasting does the job, but it's quite slow for a lot of objects. I suppose there are more efficient ways to do that...
https://dl.dropboxusercontent.com/u/13861666/2014-01-17%2011_27_15-firenze.png
I have just started an experiment with modelling a building and visualising it in a web browser using WebGL, aided by three.js. What I would like to achieve is a 3D visualisation of a field like temperature or relative humidity. These are 3D entities that have a value at all points in space, but have no boundaries. An efficient way of visualizing these quantities could be a semi-transparent heat map, a see-through cloud with colours that indicate the intensity of the 3D-phenomenon. Is there some way this effect could be achieved?
Thanks!
I'm using FlyControls for moving and rotation my plane (I'm doing a flight sim), and it works pretty well. However now I have ran into a problem where one possible solution would be to know the euler angles of my plane.
Unfortunately FlyControls is using Quaternion. Is there a possible way to get the angles somehow? Of course, I could rewrite the FlyControls module to use euler angles. But I would like to avoid that if possible.
var rotation = new THREE.Euler().setFromQuaternion( quaternion, eulerOrder );
three.js r.69