You are not logged in.

Search results

Search results 1-6 of 6.

Saturday, October 5th 2019, 7:21pm

Author: alexp

Is it possible to define "inline" js plugins?

Quoted from "webseta" hotspot.url = "data:text/plain Did you try data:text/javascript ?

Thursday, October 3rd 2019, 9:48pm

Author: alexp

krpano 1.20

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...

Friday, September 27th 2019, 9:02pm

Author: alexp

how to access a function in js plugin from xml

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...

Friday, September 27th 2019, 12:02pm

Author: alexp

how to access a function in js plugin from xml

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

Friday, September 27th 2019, 11:04am

Author: alexp

krpano interface object (via onready vs registerplugin)

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.

Friday, September 27th 2019, 10:49am

Author: alexp

ios 13 and DeviceOrientationEvent.requestPermission

Quoted from "Leon" DeviceOrientationEvent.requestPermission() .then(function() { console.log('DeviceOrientationEvent, DeviceMotionEvent enabled'); }) It seems permission have to be requested separately for DeviceOrientationEvent and DeviceMotionEvent