Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.com
) Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »Shanti« (9. Juni 2009, 05:54)
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
<script>
var krpano = function(){
document.getElementbyId('#krpanoSWFObject');
}
function set_events(){
krpano.set("events.onclick", "js(doubleclick())"); //Doubleclick event
}
function doubleclick(){
setTimeout("numclick = 0",200);
numclick = numclick + 1;
if (numclick == 2){
move_and_zoom();
}
}
function move_and_zoom(){
//get the spherical coordinates of the place where the user clicked.
var mousex = krpano.get("mouse.x");
var mousey = krpano.get("mouse.y");
var spherical_coordinates = krpano.get("screentosphere("+mousex+","+mousey+")"); //convert x/y in ath/atv
var coordinates_array = spherical_coordinates.split(",");
var Ath = Math.round(Number(coordinates_array[0]) * 100) / 100; //round up to 2 decimals after ,
var Atv = Math.round(Number(coordinates_array[1]) * 100) / 100;
krpano.call("lookat("+Ath+","+Atv+", 50)"); //move and zoom a bit.
}
</script>
|
|
|
Quellcode |
1 2 3 |
<events onxmlcomplete="js(set_events())" /> |
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comI think the experience from Street View is the best.
Double click and their "smart hotspot" are crucial to make a real immersive experience.
I love the way google shows a circle in perspective if you are over the street, or an oriented square if you are over a building, that's really helps to make the 3D illusion.
And google interprets our double clicks, orienting the view and zooming the image if we are clicking a building or changing the pano if we click over the street (even they made a "pseudo blending" so we don't feel the "break" of changing the pano).
Is there a way to make something similar to Google Street View?
I think they are combining the LIDAR information to make their smart hotspot. But maybe we could define manually where is the street (or floor) and where are the walls, so our mouse can show with a circle (or square) in perspective according with the real 3D of the scene.
That's would a really big step for KRPano
there is also the double click plugin from ahoeben..
would that be a good alternative?
Tuur![]()