Search results
Search results 1-20 of 1,000. There are even more results, please redefine your search.
maybe to add... if your plugin is in a scene it gets (re-)initialized every time you enter the scene and with keep=false removed using unloadplugin() when you leave. a proper initialization and unloading is very important. if you for example would do not remove an installed renderloop, you would get a 2nd one when you enter the scene again. such things can hog down the performance and your devices memory etc. by the way plugin[..].visible does not work in this case, because the plugin doesn't ha...
just FYI, this is not a very safe method. in unloadplugin you should UNLOAD everything. that means destroy any threejs content, free resources, disable active events and renderloops, etc
you can have a look at the default plugin example here: https://krpano.com/docu/plugininterface/#top Source code 1 2 3 4 5 6 7 8 9 // unloadplugin - exit point for the plugin (optionally) // - will be called from krpano when the plugin will be removed // - everything that was added by the plugin should be removed here local.unloadplugin = function() { /* REMOVE YOUR THREEJS STUFF HERE */ plugin = null; krpano = null; } your plugin has no unloadplugin() function at all
then your plugin is not working correctly. its unloadplugin() function should remove threejs and everything it installed (events etc)
Source code 1 2 3 4 5 6 7 8 9 10 11 <scene name="scene_1" title="0" onstart="remove()" thumburl="panos/1.tiles/thumb.jpg" lat="" lng="" heading=""> <plugin name="threejs" url="gltfloader.js" /> <view hlookat="1.245" vlookat="-14.021" fovtype="MFOV" fov="140.000" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" /> <preview url="panos/1.tiles/preview.jpg" /> <image type="CUBE" multires="true" tilesize="512"> <level tiledimagewidth="2624" tiledimageheight="2624"> <cube url="panos/1.til...
doesn't this already work if your scenes have proper tx/ty/tz coordinates ? maybe note that use3dtransition is a feature of vtourskin.xml, see skin_hotspotstyle, skin_hotspotstyle_click() and skin_scene3dtransition()
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 <krpano logkey="true"> <preview type="grid" /> <layer name="hscount" type="text" font="arial" css="text-align:left;font-weight:bold;color:#0114DD;font-size:25px;padding-left:10px;" width="120" height="30" bgcolor="0xffffff" align="topleft" bgalpha="0.8" keep="true" x="15" y="15" onloaded="hs_tag_click();" onclick="hs_tag_click();" /> <style name="spot" type="text" width="50" heig...
Source code 1 2 3 4 5 6 7 8 <action name="hs_tag_click" scope="local" args="name"> if(global.hs_tag_count === null, set(global.hs_tag_count, 0)); // reset only once! if(hotspot[get(name)].tag === 'hide' AND hotspot[get(name)].counted === null, set(hotspot[get(name)].counted, true); // tag as counted inc(global.hs_tag_count); calc(plugin[hscount].html, '14/' + global.hs_tag_count); ); </action> if you want to count each hotspot only once (without support to work across scenes) Source code 1 2 3 ...
btw, passing a function with argument would work like : krpano.events.addListener("onmousedown", function() { alert('hello'); });
a string is interpreted as krpano action. you need to pass the function itself : krpano.events.addListener("onmousedown", alertme); or maybe krpano.events.addListener("onmousedown", window.alertme);
ofc all of that is possible with krpano! study the examples and the documentation... learning takes time
untested ... Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 <layer name="hscount" type="text" font="arial" css="text-align:center;font-weight:bold;color:#0114DD;font-size:25px;" width="80" height="30" bgcolor="0xffffff" align="topleft" bgalpha="0.8" keep="true" zorder="9999" x="15" y="15" onloaded="hs_tag_click(get(name));" /> <action name="hs_tag_click" scope="local" args="name"> if(global.hs_tag_count === null, set(global.hs_tag_count, 0)); // only once! if(hotspot[get(name)].tag ===...
@Mische ... don't take us too seriously :)
hm... what is the reason/idea for your 1 pixel hotspots? storing the height (above floor) for each camera gives you the coordinates of floor points you need all camera / floor points accessible in an array using krpanos 1.21 screentodepth() you can easlily get the hitpoint of the mouse click on the model or maybe better calculate the hit of the mouse click on an imaginary floor point then you just need to find the closest floor point e.g. view.tx / ty / tz is the camera position use screentosphe...
next version... with randomized labyrinth ;)
Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 <group name="group_1"> <scene name="scene_1" /> <scene name="scene_2" /> <scene name="scene_3" /> <scene name="scene_4" /> <scene name="scene_5" /> <scene name="scene_6" /> <scene name="scene_7" /> </group> <action name="build_groups" scope="local"> trace("active scene = ",xml.scene); for(set(local.i,0), i LT group.count, inc(i), for(set(local.j,0), j LT group[get(i)].scene.count, inc(j), copy(local.name, group[get(i)].scene[get(...
there was/is the (textfield) onautosized event which is called when the layer gets its size. but it is missing now in the 1.21 documentation... @klaus: how do we do that in 1.21?
Quoted the new *var syntax nice :) like a C pointer