Detecting WHEN for transition:
In the above example, all mouse events are indicated. Scaling is handled onDocumentMouseWheelby adjusting the camera properties fov. Increase decreases fov, while Decrease increases it. It would be trivial to detect when it has fovreached the minimum / maximum value, which will cause a transition to a new scene.
Detecting WHERE to jump:
- , . - hotspot-like, , , (, THREE.Sphere, ). , 6 , , .
onDocumentMouseMove lat lon (, , ). (: , lon , reset, - 0.0-359.99 -.) , 45-:
if(lat > 45){
// you're looking up
}
else if(lat < -45){
// you're looking down
}
else{
// you're looking at a side, check "lon" instead
}
, , .
. , . THREE.Scene. reset - . . . - , .
@Marquizzo:
- . , MeshBasicMaterial ( ). scene.background, . , , "" (, CSS).
, , .
var mesh = null,
colorChange = -0.01;
mesh.material.color.addScalar(colorChange);
if(mesh.material.color.r + colorChange < 0 || mesh.material.color.r + colorChange > 1){
colorChange = -colorChange;
}
, , .
, @Vad, , .