Построение тура по частичным панорамам iPhone. Их около 40+ и кажется, что на мобильных устройствах заканчивается память.
Кроме того, при использовании версии A-frame 0.5.0 приведенный ниже код работает на рабочем столе, но не в последней версии 0.9.2.
<a-entity id="pano_01" visible="true">
<a-curvedimage asset-on-demand="src: ../Html_Templates/pix/Upgrade.jpg" height="145" radius="100" theta-length="300" rotation="0 33 0"></a-curvedimage>
<a-sky asset-on-demand="src: ../Html_Templates/pix/Upgrade_sky.jpg" rotation="0 -90 0"></a-sky>
<a-image asset-on-demand="src: ../Html_Templates/pix/UI_Next.png" position="0 -0.5 -3" scale="0.35 0.35 0.35" onclick="setpano_02()"></a-image>
</a-entity>
<a-entity id="pano_02" visible="false">
<a-sky asset-on-demand="src: ../Html_Templates/pix/JRO_Arrive_sky.jpg"></a-sky>
<a-curvedimage asset-on-demand="src: ../Html_Templates/pix/JRO_Arrive.jpg" height="140" radius="100.0" theta-length="300" rotation="0 60 0"></a-curvedimage>
<a-image asset-on-demand="src: ../Html_Templates/pix/UI_Next.png" position="1 -0.5 -3" scale="0.35 0.35 0.35" onclick="setpano_03()"></a-image>
<a-image asset-on-demand="src: ../Html_Templates/pix/UI_Back.png" position="-1 -0.5 -3" scale="0.35 0.35 0.35" onclick="setpano_01()"></a-image>
</a-entity>
Java, которые поддерживают вышеперечисленное:
function setpano_01() {
document.getElementById('pano_01').setAttribute('visible', 'true')
document.getElementById('pano_02').setAttribute('visible', 'false')
}
function setpano_02() {
document.getElementById('pano_01').setAttribute('visible', 'false')
document.getElementById('pano_02').setAttribute('visible', 'true')
document.getElementById('pano_03').setAttribute('visible', 'false')
Я ожидаю, что сценарий актива по требованию поможет высвободить ресурсы памяти, но, похоже, он не работает для этой стратегии. Кроме того, я надеялся, что в последней версии A-Frame будет улучшено управление памятью.
(Надеюсь, теперь вопрос лучше сформулирован).