Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
That looks amazing !! By the way, how do you know it's using krpano ?
It should be 3 slipteed screens which I m sure that can be done using js
![]() |
Source code |
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
var krpanoplugin = function () { var local = this, krpano = null, plugin = null; /* Register the plugin for use with Krpano */ local.registerplugin = function (krpanointerface, pluginpath, pluginobject) { krpano = krpanointerface; plugin = pluginobject; initializeleapcontroller(); } /* Clean up when unloading the plugin */ local.unloadplugin = function () { plugin = null; krpano = null; } /* Detect clicks on the plugin [ NOT USED ] */ local.hittest = function (x, y) { return false; } /* Plugin was resized from XML Krpano [ NOT USED ] */ local.onresize = function (width, height) { return false; } /* Initialize Leap Controller */ function initializeleapcontroller() { Leap.loop(function (frame, done) { var hand = frame.hands[0]; if (hand) { var x = hand.palmPosition[0], y = hand.palmPosition[1], z = hand.palmPosition[2]; var pNx = hand.palmNormal[0], pNy = hand.palmNormal[1], pNz = hand.palmNormal[2]; var pDxr = hand.direction[0], pDyr = hand.direction[1], pDzr = hand.direction[2]; /* Tilting Forward and Backward Actions */ if ( pNz > 0.3 ) { // Forward krpano.set("vlookat_moveforce", "0.5"); } else if ( pNz < -0.3 ) { // Backward krpano.set("vlookat_moveforce", "-0.5"); } else { // Steady krpano.set("vlookat_moveforce", "0.0"); } /* Tilting Left and Right Actions */ if ( pNx > 0.3 ) { if ( pNx > 0.6 ) { // Fast Left krpano.set("hlookat_moveforce", "-2.0"); } else { // Left krpano.set("hlookat_moveforce", "-0.5"); } } else if ( pNx < -0.3 ) { if ( pNx < -0.6 ) { //Fast Right krpano.set("hlookat_moveforce", "2.0"); } else { // Right krpano.set("hlookat_moveforce", "0.5"); } } else { // Steady krpano.set("hlookat_moveforce", "0.0"); } } else { // Hand is no longer visible then we stop all movement krpano.set("vlookat_moveforce", "0.0"); krpano.set("hlookat_moveforce", "0.0"); } done(); }); } }; |
![]() |
Source code |
1 |
<plugin name="leapcontroller" url="leapcontroller.js" parent="" preload="true" x="0" y="0" visible="true" keep="true"/> |
Thank you all so much, the error is gone.You have to force html5 player, flash can't decode js.
This post has been edited 1 times, last edit by "thevtman" (Apr 7th 2014, 2:05am)