Search results
Search results 1-18 of 18.
When you use static template without bundler it works https://codesandbox.io/s/gallant-pateu-5…ile=/index.html
It seems this error is specific to Codesandbox or Parcel. For example this works fine locally, but have an error in Codesandbox https://codesandbox.io/s/admiring-dawn-0…ile=/index.html
You can acces krpano object like this Source code 1 const krpano = document.getElementById('krpanoSWFObject').get('global'); Where krpanoSWFObject is the id that you pass to the embedpano Source code 1 embedpano({ id:"krpanoSWFObject"....})
You need to call the embedpano function after the krpano script is loaded. As it's done in the krpano default html synchronously or use load event if you load script dynamically.
Hi, disable xml encryption in your old project if it's enabled.
To disable it onstart in the skin.xml there is an option in the description setting Source code 1 openatstart="true" change it to false To close it call action Source code 1 closeKolorArea_description()
Here is an example code Source code 1 <hotspot name="spot1" onover="get_scene_data" onout="set(layer[scene_data_img].visible, false)" Source code 1 2 <layer name="scene_data_img" keep="true" width="200" height="100" align="top" edge="bottom" /> <layer name="scene_data_text" keep="true" type="text" parent="scene_data_img" align="center" css="text-align:center" /> Source code 1 2 3 4 5 6 <action name="get_scene_data"> txtadd(layer[scene_data_img].parent, 'hotspot[',get(name),']'); set(layer[scene_...
Google for Screen Sharing Apps
Quoted from "aschakel" But, how to make a CSS hotspot? I mean to add styles to a hotspot that is made in KRpano, as in your example. Hotspots should have property renderer="css3d" and you can get the sprite hotspot[name].sprite - an element that you can style with CSS, add CSS class to it with Javascript element.classList.add("class-name")
Yes it's absolutely possible with krpano. However, in this example, this made with CSS transform and transition. It has a div element with an icon with border-radius: 50%; that makes it round and :hover rule that change it to the bigger size and transition property to animate the size changing. The second div element with the title has a small scale by default to be invisible and on hover the icon element title has transform: scale(1, 1); and transition to smoothly appear on the screen.
Quoted from "tshah" How do I dynamically place the layer to the opposite side if the hotspot's location is too close to the edge? You can change the layer edge property. Here is the action example, it works better if your layer aligned to "top" Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <action name="change_edge" type="Javascript"><![CDATA[ var hotspotName = args[1]; var layerName = args[2]; var offset = parseFloat(args[3]); var l = krpano.layer.getItem(layerName); // save original e...
Maybe upgrade krpano to 1.20.8 for panotour will help...
Quoted from "webseta" hotspot.url = "data:text/plain Did you try data:text/javascript ?
Quoted from "jeromebg" Thanx a lot for the Panotour package update ! When adding a basic hotspot to go to another scene a warning message is displayed in the logs : WARNING: Unknown action: events.dispatch ? I also see warning messages in log of the Panotour project All events.dispatch produses warnings. There is an action Source code 1 2 3 <action name="mainloadscene"> if (xml.scene != %1, events.dispatch(onleavingscene, true); .... If I call this action in Chrome devtools - no warnings in the...
Yes you can use a basic action. I just saw in your code krpano.events... which is used in Javascript type actions. Depends on your project, dynamically set onnewscene action in event Source code 1 set(events['testevent'].onnewscene, 'newsceneaction'); or set in event directly Source code 1 <events keep="true" name="testevent" onnewscene="newsceneaction" /> The action, which will be executed on new scene Source code 1 <action name="newsceneaction">jsget(returnedValue, 'someFunction()');trace('val...
In the action of type="Javascript" you can try like this Source code 1 krpano.events.getItem('testevent').onnewscene = "jsget(returnedValue, 'someFunction()');trace('value: ', get(returnedValue));"; This assumes that you have event 'testevent' in the xml and someFunction returns a value
As stated in the docs, in onready callback you get krpano Javascript-Interface object (where you need to use get, set, call). Inside the plugin you get The krpano Interface Object - this object provides access to interfacing functions and to the whole krpano data structure.
Quoted from "Leon" DeviceOrientationEvent.requestPermission() .then(function() { console.log('DeviceOrientationEvent, DeviceMotionEvent enabled'); }) It seems permission have to be requested separately for DeviceOrientationEvent and DeviceMotionEvent