Oooh, nice one @indexofrefraction !
Tested this and also works:
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<scene name="scene1" autoload="true">
<image>
<sphere url="texture.jpg" />
<depthmap url="model.obj" hittest="true" rendermode="3dmodel" scale="100" textured="true" waitforload="true" center="0,0,0" axis="+x+y+z"/>
</image>
</scene>
<style name="button" type="text" css="text-align:center;" padding="4 8" mergedalpha="false" bgborder="0 0xFFFFFF 1" bgroundedge="1" bgshadow="0 1 4 0x000000 1.0" ondown="set(bgcolor, 0xDDDDDD);" onup="set(bgcolor, 0xFFFFFF);" />
<layer name="changescenebutton" style="button" keep="true" html="Switch Texture" width="80" align="bottom" y="50" onclick="changetexture();" />
<action name="changetexture" >
<!-- loadscene(scene2, null, MERGE|KEEPVIEW, BLEND(0.5)); -->
image.reset();
set(image.sphere.url, 'texture-2.jpg');
set(image.depthmap.url, "model.obj");
set(image.depthmap.rendermode, "3dmodel");
set(image.depthmap.scale, "100");
loadpanoimage(MERGE|KEEPVIEW, BLEND(0.5));
</action>
|