Does the 1.19 use WebGL-Hotspots or still CSS3D?The pre-releases are using CSS3D by default for normal rendering and WebGL when stereo-rendering.Does the 1.19 use WebGL-Hotspots or still CSS3D?
|
|
Quellcode |
1 2 3 4 |
<!-- TEMP PRE-RELEASE STUFF --> <display hotspotrenderer="webgl" devices="html5" /> <!-- force using WebGL for the hotspots --> <view continuousupdates="true" devices="html5" /> <!-- constantly update the screen (required for WebGL hotspots for the moment) --> <!-- TEMP PRE-RELEASE STUFF --> |
But with the final 1.19 release the hotspots will be rendered by WebGL by default.
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »James Hay« (29. September 2015, 22:39)
What exactly do you mean or what do you want to do?
An API for using a custom framebuffer as hotspot texture?
|
|
Quellcode |
1 2 3 |
for(set(i,0), i LT hotspot.count, inc(i), if(hotspot[get(i)].linkedscene,if(hotspot[get(i)].style EQ 'skin_tooltips', set(hotspot[get(i)].style,'skin_hotspotstyle'););); ); |
Klauss, just replaced the vtourskin.xml and the webvr files with the files from 1.19-pr3 and it is now not displaying stereoscopic at all. I'm confused as to what I'm doing wrong here. Thanks for your help.Try using the vtourskin.xml from 1.19 pre-release 3.
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comHmm... with which version do you compare?but question is why loadstyle is overwriting style attribute.
Your colorrun.xml is wrong - you are including there the webvr.xml (and an additionally gyro - why?) and this changes/overwrites the WebVR settings that were made in the vtourskin.xml.Klauss, just replaced the vtourskin.xml and the webvr files with the files from 1.19-pr3 and it is now not displaying stereoscopic at all. I'm confused as to what I'm doing wrong here. Thanks for your help.
Exactly. I want to replace the image of the hotspot with an dynamic texture, which I can control with javascript.
|
|
Quellcode |
1 2 3 4 5 6 7 |
if (krpano.webGL)
{
// have WebGL support
// get the WebGL context
var gl = krpano.webGL.context;
}
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
/ get the hotspot
var hotspot = krpano.get("hotspot[NAME]");
// get the hotspot WebGL texture (only possible when the texture was at least once rendered via WebGL)
if (hotspot.GL)
{
var texture = hotspot.GL.tex;
if (texture)
{
// do some stuff with the texture - e.g. bind it to a custom framebuffer:
gl.bindTexture(gl.TEXTURE_2D, texture);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, your_tex_width, your_tex_height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
gl.bindFramebuffer(gl.FRAMEBUFFER, your_framebuffer);
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
gl.bindTexture(gl.TEXTURE_2D, null);
}
}
|
Klauss,
Your colorrun.xml is wrong - you are including there the webvr.xml (and an additionally gyro - why?) and this changes/overwrites the WebVR settings that were made in the vtourskin.xml.Klauss, just replaced the vtourskin.xml and the webvr files with the files from 1.19-pr3 and it is now not displaying stereoscopic at all. I'm confused as to what I'm doing wrong here. Thanks for your help.
Please don't try adding xml code in an 'experimental way', as you can see this leads to non or wrong working stuff. Either remove the webvr.xml and the gyro from the xml or use the default output xml code.
Best regards,
Klaus
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »James Hay« (29. September 2015, 22:38)
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<krpano onstart="loadscene(demo)"> <scene name="demo"> <preview type="grid(CUBE,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" /> <!-- Not showing on flash --> <style name="popup_hotspot_style" url="%SWFPATH%/skin/images/info.png" keep="true" /> <hotspot style="popup_hotspot_style" ath="-30" atv="0" /> <!-- Showing on flash --> <hotspot url="%SWFPATH%/skin/images/info.png" ath="30" atv="0" /> <!-- showing on flash but alpha is not applied --> <style name="popup_hotspot_style1" alpha="0.5" keep="true" /> <hotspot style="popup_hotspot_style1" ath="-60" atv="0" url="%SWFPATH%/skin/images/info.png" /> <!-- Works on flash --> <hotspot onloaded="loadstyle(popup_hotspot_style1)" ath="-90" atv="0" url="%SWFPATH%/skin/images/info.png" /> </scene> </krpano> |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Zephyr« (10. September 2015, 21:50)