How to get access to the local.registerplugin function   [SOLVED] - View the solution

Share your tips and tricks here or get help with any Panotour 2.0+ problem!
No bug reports (of any kind) in this forum!
no avatar
Abusername
Member
 
Topic author
Posts: 15
Likes: 1 post
Liked in: 0 post
Joined: Mon Feb 26, 2018 2:26 pm
Info

How to get access to the local.registerplugin function  [SOLVED]

by Abusername » Tue Mar 13, 2018 3:56 pm

When you make a krpano plugin for vanilla krpano, you have the option to get values from the local.registerplugin function. Specifically the following values: krpanointerface, pluginpath, pluginobject.

These would be very useful for me since I'm not sure I can get the WebGL canvas object without them. Does anyone know where in the Panotours pipeline the registerplugin function is ran. Or is there another way to get the same functionality?

no avatar
Abusername
Member
 
Topic author
Posts: 15
Likes: 1 post
Liked in: 0 post
Joined: Mon Feb 26, 2018 2:26 pm
Info

Re: How to get access to the local.registerplugin function

by Abusername » Fri Mar 16, 2018 1:35 pm

Maybe someone can point me to the documentation on how to get access to these values. Assuming such documentation exists. I think it would be helpful if there was a unminified version of KolorTools.js. I surmise the functions for registering plugins is actually there.

User avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: How to get access to the local.registerplugin function

by benji33 » Fri Mar 16, 2018 3:51 pm

Our JS plugins doesn't use the krpano plugin interface.
Have a look on this documentation to see how to create a Panotour JS plugin :
http://www.kolor.com/wiki-en/action/view/My_first_plugin_(Javascript)

The file used to register/remove plugins is KolorBootstrap.js.

no avatar
Abusername
Member
 
Topic author
Posts: 15
Likes: 1 post
Liked in: 0 post
Joined: Mon Feb 26, 2018 2:26 pm
Info

Re: How to get access to the local.registerplugin function

by Abusername » Fri Mar 16, 2018 3:54 pm

I have created a Panotour plugin and it works great. I just need to get the WebGL canvas and context objects. I would be very grateful if anyone can offer assistance on this front.

no avatar
Abusername
Member
 
Topic author
Posts: 15
Likes: 1 post
Liked in: 0 post
Joined: Mon Feb 26, 2018 2:26 pm
Info

Re: How to get access to the local.registerplugin function

by Abusername » Mon Mar 19, 2018 3:04 pm

I have contacted the author of Krpano and he apparently doesn't know how Panotours implemented this. I have also looked at the build in library files and have goten an object called krpanoJS. Yet I cannnot find the WebGL object from it.

no avatar
Abusername
Member
 
Topic author
Posts: 15
Likes: 1 post
Liked in: 0 post
Joined: Mon Feb 26, 2018 2:26 pm
Info

Re: How to get access to the local.registerplugin function

by Abusername » Wed Mar 21, 2018 12:50 pm

Maybe I can create my own functions for these basic Krpano features. Can someone at Kolor help?

User avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: How to get access to the local.registerplugin function

by benji33 » Thu Mar 22, 2018 4:30 pm

If you need to access the krpano player from JavaScript you can call the getCurrentTourPlayer() function.
You'll have access to the krpano player.

I've made a Panotour plugin called testWebGL must be installed into the plugins and tools directories of the Panotour User directory.
Try it, it allows you to use the krpano.webGL properities of a krpano plugin.
Perhaps this could be working for you.
Attachments
testWebGL.zip
(2.23 KiB) Downloaded 17 times

no avatar
Abusername
Member
 
Topic author
Posts: 15
Likes: 1 post
Liked in: 0 post
Joined: Mon Feb 26, 2018 2:26 pm
Info

Re: How to get access to the local.registerplugin function

by Abusername » Tue Mar 27, 2018 10:38 am

Thank you very much.


Who is online

Users browsing this forum: No registered users and 4 guests