Hi, if you need keep the polygonal hotspot in all scene just add the property keep="true". But you can test your style quickly, I think that yes, it would be work.
Best regards,
Fdo
thanks for the quick reply.
My question is dictated by the idea of removing the definition of polygonal hotspots from the scene code.
I have already tried to do this, but unfortunately only attributes that are between the "<style>" and "/>" tags have been taken. "<point>" was not included.
I asked because maybe someone would know a trick.
I'm afraid that you have to add points manually, luckily with new Krpano we could achieve this really easy by utilizing "onloaded.addevent". Please check this example:
<style name="test_poly" fillalpha="0.8" keep="true" onloaded.addevent="add_points">
<point name="n1" ath="0" atv="0"/>
<point name="n2" ath="10" atv="10"/>
<point name="n3" ath="0" atv="20"/>
<point name="n4" ath="-10" atv="10"/>
</style>
<action name="add_points" scope="local">
for (set(i, 0), i LT style[test_poly].point.count, inc(i),
debugvar(style[test_poly].point[get(i)].ath);
copy(caller.point[get(i)].ath, style[test_poly].point[get(i)].ath);
copy(caller.point[get(i)].atv, style[test_poly].point[get(i)].atv);
);
// delele init point
set(caller.point[init].name, null);
</action>
<action name="test_startup" autorun="onstart">
addhotspot('test_hotspot');
// Must set an init point or the hotspot will never be loaded
// Could be deleted later
set(hotspot['test_hotspot'],
point[init].ath=500,
point[init].atv=400,
);
hotspot['test_hotspot'].loadstyle(test_poly);
</action>
thanks for the help. Looks like a very nice trick. It doesn't matter that you need to add one point. It's not much for being able to operate outside the scene code without adding an action with point data. :)