templates/gallery3D/galleryCircle3D_inline.html.twig line 1

Open in your IDE?
  1.     {% for message in app.flashes('notice') %}
  2.         <div class="flash-notice">
  3.             <div class='notice'>{{ message }}</div>
  4.         </div>
  5.     {% endfor %}
  6.     {% for message in app.flashes('error') %}
  7.         <div class="flash-error">
  8.             <div class='error'>{{ message }}</div>
  9.         </div>
  10.     {% endfor %}
  11.  
  12.     {#    we setup images for 3D space #}
  13.     {% set gallery3DInfo = [] %}
  14.     {% set gallery3DInfo = gallery3DInfo|merge({'image_size_horisontal': '4.8 3.2 0.08'}) %}
  15.     {% set gallery3DInfo = gallery3DInfo|merge({'frame_size_horisontal': '5.2 3.6 0.04'}) %}
  16.     {% set gallery3DInfo = gallery3DInfo|merge({'image_size_vertical': '3.2 4.8 0.08'}) %}
  17.     {% set gallery3DInfo = gallery3DInfo|merge({'frame_size_vertical': '3.6 5.2 0.04'}) %}
  18.     {#    we prepare textures #}
  19.     {% set textureArray = [] %}
  20.     {% set textureArray = textureArray|merge({'logo-texture-1': ''}) %}        
  21.     {% set textureArray = textureArray|merge({'floor-texture-1': ''}) %}
  22.     {% set textureArray = textureArray|merge({'floor-texture-2': ''}) %}
  23.     {% set textureArray = textureArray|merge({'ceil-texture-1': ''}) %}
  24.     {% set textureArray = textureArray|merge({'wall-texture-1': ''}) %}
  25.     {% set textureArray = textureArray|merge({'wall-texture-2': ''}) %}
  26.     {% set textureArray = textureArray|merge({'background-front': ''}) %}
  27.     {% set textureArray = textureArray|merge({'background-back': ''}) %}
  28.     {% set textureArray = textureArray|merge({'background-left': ''}) %}
  29.     {% set textureArray = textureArray|merge({'background-right': ''}) %}
  30.     {% set textureArray = textureArray|merge({'image-help-1': ''}) %}
  31.     {% set textureArray = textureArray|merge({'button-play': ''}) %}
  32.     {% set textureArray = textureArray|merge({'button-home': ''}) %}
  33.     {% set textureArray = textureArray|merge({'button-help': ''}) %}
  34.     {% set textureArray = textureArray|merge({'button-exit-1': ''}) %}
  35.     {% set textureArray = textureArray|merge({'gallery-logo': ''}) %}
  36.     {% set textureArray = textureArray|merge({'cart-texture-1': ''}) %}
  37.     {% set textureArray = textureArray|merge({'info-texture-1': ''}) %}
  38.     {% set textureArray = textureArray|merge({'bg-texture-1': ''}) %}
  39.     {% set textureArray = textureArray|merge({'bg-texture-2': ''}) %}
  40.     {% set textureArray = textureArray|merge({'bg-texture-3': ''}) %}
  41.     {% set textureArray = textureArray|merge({'bg-texture-4': ''}) %}
  42.     {% set imageTotalCount = galleryItemCollection|length %}
  43.     {% set rightAngle = deg2rad(90)|round(3, 'ceil') %}
  44.     {% set halfCircleAngle = deg2rad(180)|round(3, 'ceil') %}
  45.     {% set wholeCircleAngle = deg2rad(360)|round(3, 'ceil') %}
  46.     {% set yAngle = deg2rad(360/imageTotalCount) %}
  47.     {% if textureItemCollection is not defined %} 
  48.         {% set textureItemCollection = [] %}
  49.     {% endif %}
  50.     {% if gallery3D.guideCycle is defined and gallery3D.guideCycle > 0 %} 
  51.         {% set guideCycle = gallery3D.guideCycle %}
  52.     {% else %}
  53.         {% set guideCycle = 30 %}
  54.     {% endif %}
  55.  
  56.     {% for textureItem in textureItemCollection %}
  57.         {% if 'http' in textureItem.galleryItemFile %}
  58.             {% set texturePath = textureItem.galleryItemFile %}
  59.         {% else %}
  60.             {% set texturePath = userDirs['web'] ~ '/images/' ~ textureItem.galleryItemFile %}
  61.         {% endif %}
  62.         {% if textureItem.galleryItemName is defined and textureItem.galleryItemName != '' %}
  63.             {% set textureKey = textureItem.galleryItemName %}
  64. {#                {% set textureArray[textureKey] = texturePath %}#}
  65.             {% set textureArray = textureArray|merge({(textureKey): (texturePath)}) %}
  66.         {% endif %}
  67.   
  68.     {% endfor %}
  69.     {% if isFullscreen is defined and isFullscreen %}
  70.         {% set resizeButton = 'button_fullscreen' %}
  71.         {% set isFullscreen = true %}
  72.         {% set screenHeight = '90vh' %}
  73.     {% else %}
  74.         {% set resizeButton = 'button_defaultscreen' %}
  75.         {% set isFullscreen = false %}
  76.         {% set screenHeight = '323px' %}
  77.     {% endif %}    
  78.  
  79.         <!-- X3D  -->
  80.         <div style="width: 100vw; height: {{ screenHeight }}; display:block; right:0; left:0; box-sizing: border-box; position: absolute; left: 0; right: 0; background-color: Black;" id="x3d" class="x3d_container">
  81.                 <!-- menu -->
  82.                 
  83.               <div style="position: absolute; left: 0px; width: 100%; height: 40px; display:inline-block; border-right: 1px solid #EA5B0C; background-color: #222; opacity: 0.5; font-family: helvetica, sans-serif; font-weight: bold; font-size: 10px; color: #EA5B0C; padding-left:5px; z-index: 50;" class="x3d_menu" id="x3d_menu">
  84.                     
  85.                     <div style="margin-right:7px;padding-top:2px; display:inline-block; text-align: center;">
  86.                         <div><big>3D</big></div>
  87.                         <div><small>menu</small></div>
  88.                     </div>
  89.                     <div style="margin-right:7px; display:inline-block" id="x3d_menu_viewpoint_home">
  90.                         <button id="button_viewpoint_home" onclick="changeViewpoint('x3d_viewpoint_home'); rotateGallery(0)" style="font-family: helvetica, sans-serif; font-weight: normal; font-size: 10px; background-color: black; border: 1px solid #333; color: white;padding:2px;  background-image: url( '/images/x3dmenu_home.png' ); background-size: 31px 31px; height: 33px; width: 33px; border: 1px solid silver; border-radius:17px;" title="Home Viewpoint"></button>
  91.                 </div>    
  92.                     <div style="margin-right:7px; display:inline-block" id="x3d_menu_viewpoint_home2">
  93.                         <button id="button_viewpoint_home2" onclick="changeViewpoint('x3d_viewpoint_home2'); rotateGallery(0)" style="font-family: helvetica, sans-serif; font-weight: normal; font-size: 10px; background-color: black; border: 1px solid #333; color: white;padding:2px;  background-image: url( '/images/x3dmenu_home.png' ); background-size: 31px 31px; height: 33px; width: 33px; border: 1px solid silver; border-radius:17px;" title="Home 2 Viewpoint"></button>
  94.                 </div>    
  95.                 
  96.                     <div style="margin-right:7px; display:inline-block" id="x3d_menu_play_guide">
  97.                         <button id="button_play_guide" onclick="playGuide('AnimationTimer_header_reverse')" style="font-family: helvetica, sans-serif; font-weight: normal; font-size: 10px; background-color: black; border: 1px solid #333; color: white;padding:2px;  background-image: url( '/images/x3dmenu_play.png' ); background-size: 31px 31px; height: 33px; width: 33px; border: 1px solid silver; border-radius:17px;" title="Play Guide"></button>
  98.                 </div>                
  99.                     <div style="margin-right:7px; display:inline-block" id="x3d_menu_stop_guide">
  100.                         <button id="button_stop_guide" onclick="stopGuide('AnimationTimer_header_reverse')" style="font-family: helvetica, sans-serif; font-weight: normal; font-size: 10px; background-color: black; border: 1px solid #333; color: white;padding:2px;  background-image: url( '/images/x3dmenu_stop.png' ); background-size: 31px 31px; height: 33px; width: 33px; border: 1px solid silver; border-radius:17px;" title="Stop Guide"></button>
  101.                 </div>                            
  102.               <!--
  103.               <div style="margin-right:7px; display:inline-block" id="x3d_menu_tour">
  104.                 <button id="gallery_button_viewpoint" onclick="changeViewpoint('x3d_viewpoint_tour')" style="font-family: helvetica, sans-serif; font-weight: normal; font-size: 10px; background-color: black; border: 1px solid #333; color: white;padding:2px;  background-image: url( '/images/x3dmenu_walk.png' ); background-size: 31px 31px; height: 33px; width: 33px; border: 1px solid silver; border-radius:17px;" title="Tour"></button>
  105.                 </div>
  106.               -->
  107.               {% set itemCount = 0 %}
  108.               {% set yRotation = 0 %}
  109.                 {% for galleryItem in galleryItemCollection %}
  110.                   {% set itemId = galleryItem.galleryItemId %}
  111.                   {% set viewpoint = 'gallery_viewpoint_' ~ itemId %}
  112.                   <div style="margin-right:7px; display:inline-block" id="gallery_menu_viewpoint_{{ itemId }}">
  113.                 <button id="gallery_button_viewpoint_{{ itemId }}" onclick="stopGuide('AnimationTimer_header_reverse'); rotateGallery({{ yRotation }})" style="font-family: helvetica, sans-serif; font-weight: normal; font-size: 10px; background-color: black; border: 1px solid #333; color: white;padding:2px;  background-image: url( '/images/x3dmenu_eye.png' ); background-size: 31px 31px; height: 33px; width: 33px; border: 1px solid silver; border-radius:17px;" title="Gallery item {{ itemId }}"></button>
  114.                 </div>
  115.               {% endfor %}
  116.               <div style="margin-right:7px; display:inline-block" id="x3d_menu_defaultscreen">
  117.                 <button id="button_defaultscreen" style="font-family: helvetica, sans-serif; font-weight: normal; font-size: 10px; background-color: black; border: 1px solid #333; color: white;padding:2px;  background-image: url( '/images/x3dmenu_defaultscreen.png' ); background-size: 31px 31px; height: 33px; width: 33px; border: 1px solid silver; border-radius:17px;" title="default screen"></button>
  118.               </div>
  119.               <div style="margin-right:7px; display:inline-block" id="x3d_menu_fullscreen">
  120.                 <button id="button_fullscreen" style="font-family: helvetica, sans-serif; font-weight: normal; font-size: 10px; background-color: black; border: 1px solid #333; color: white;padding:2px; background-image: url( '/images/x3dmenu_fullscreen.png' ); background-size: 31px 31px; height: 33px; width: 33px; border: 1px solid silver; border-radius:17px;" title="full screen"></button>
  121.                 </div>
  122.               </div>
  123.               <div style="position: absolute; right: 0px; width: 0px; height: 100%; display:block; border-left: 1px solid #EFEFEF; background-color: #222; opacity: 0.8; text-align:left; font-family: helvetica, sans-serif; font-weight: bold; font-size: 10px; color: #FFF; padding-top:5px; padding-left:8px; padding-right:15px; z-index: 1;" id="x3d_item_detail">
  124.                   <div style="margin-top:1px" id="x3d_item_detail_close" style="tex-align: left; float: left;">
  125.                         <button id="button_item_detail_close" style="font-family: helvetica, sans-serif; font-weight: normal; font-size: 10px; background-color: black; border: 1px solid #333; color: white;padding:2px;  background-image: url( '{{ textureArray['button-exit-1'] }}' ); background-size: 31px 31px; height: 33px; width: 33px;" title="default screen"></button>
  126.                   </div>
  127.                   <div id="x3d_item_name" style="font-weight: bold; font-size: 22px; margin-top:8px"></div>
  128.                   <div style="margin-top:8px">
  129.                       <span id="x3d_item_description" style="font-weight: normal; font-size: 16px"></span>
  130.                   </div>        
  131.                   <div style="margin-top:6px" id="x3d_item_detail_close2" style="tex-align: left; float: left;">
  132.                         <button id="button_item_detail_close2" style="font-family: helvetica, sans-serif; font-weight: normal; font-size: 10px; background-color: black; border: 1px solid #333; color: white;padding:2px;  background-image: url( '{{ textureArray['button-exit-1'] }}' ); background-size: 31px 31px; height: 33px; width: 33px; " title="default screen"></button>
  133.                   </div>                                        
  134.               </div>
  135.                 <x3d width='100%' height="{{ screenHeight }}" id="x3d_section" class="x3d" style="height: {{ screenHeight }};background-color: #222;">
  136.                 <scene id="x3d_scene">
  137.                 <NavigationInfo headlight="true" visibilityLimit="0.0" type='"EXAMINE", "ANY"' avatarSize="0.25, 1.75, 0.75"></NavigationInfo>
  138.                 {% if gallery3D.preferredViewpointPosition is defined %} 
  139.                     {% set preferredViewpointPosition = gallery3D.preferredViewpointPosition %}
  140.                 {% else %}
  141.                     {% set preferredViewpointPosition = '0 3 0' %}
  142.                 {% endif %}
  143.                 {% if gallery3D.isStartGuide is defined and gallery3D.isStartGuide == true %} 
  144.                     <Transform DEF='TourAvatarWrapper' id='TourAvatarWrapper'>
  145.                         <viewpoint orientation='0 1 0 -1.7' position='{{ preferredViewpointPosition }}' DEF='x3d_viewpoint_tour' id='x3d_viewpoint_tour'></viewpoint>
  146.                     </Transform>
  147.                     <viewpoint orientation='0 1 0 {{ rightAngle }}' position='{{ preferredViewpointPosition }}' id='x3d_viewpoint_home'></viewpoint>
  148.                 {% else %}
  149.                     <viewpoint orientation='0 1 0 {{ rightAngle }}' position='{{ preferredViewpointPosition }}' id='x3d_viewpoint_home'></viewpoint>    
  150.                 {% endif %}
  151.                 
  152.                 <Transform DEF='AvatarWrapper' id='AvatarWrapper'>
  153.                     <viewpoint orientation='0 1 0 1.6' position='-5 3 7' DEF='x3d_viewpoint_1' id='x3d_viewpoint_1'></viewpoint>
  154.                 </Transform>
  155.                 <viewpoint orientation='0 1 0 1.6' position='-10 3 0'  id='x3d_viewpoint_2'></viewpoint>
  156.                 <viewpoint orientation='0 1 0 0.5' position='-10 3 -13'  id='x3d_viewpoint_3'></viewpoint>
  157.                 
  158.                 {% if gallery3D.isStartGuide is defined or gallery3D.isStartGuide == false %} 
  159.                     <Transform DEF='TourAvatarWrapper' id='TourAvatarWrapper'>
  160.                         <viewpoint orientation='0 1 0 1.6' position='0 3 0' DEF='x3d_viewpoint_tour' id='x3d_viewpoint_tour'></viewpoint>
  161.                     </Transform>
  162.                 {% endif %}            
  163.                 <DirectionalLight ambientIntensity='0.835991' direction='0.584419 0.286636 0.75914'></DirectionalLight>
  164.                 
  165.                 {% if gallery3D.preferredBackgroundSkyColor is defined and gallery3D.preferredBackgroundSkyColor != '' %}
  166.                     {% set preferredBackgroundSkyColor = gallery3D.preferredBackgroundSkyColor %}
  167.                 {% else %}
  168.                     {% set preferredBackgroundSkyColor = '0.8 0.8 0.2 0.8 0.8 0.2 0.1 0.1 0.6 0.1 0.1 0.6 0.1 0.25 0.8 0.6 0.6 0.9' %}
  169.                 {% endif %}    
  170.                 {% if gallery3D.preferredBackgroundGroundColor is defined and gallery3D.preferredBackgroundGroundColor != '' %}
  171.                     {% set preferredBackgroundGroundColor = gallery3D.preferredBackgroundGroundColor %}
  172.                 {% else %}
  173.                     {% set preferredBackgroundGroundColor = '0.2 0.2 0 0.3 0.3 0 0.5 0.5 0.3 0.1 0.3 0.4 0 0.2 0.4' %}
  174.                 {% endif %}                
  175.                 
  176.                 <Background groundColor='{{ preferredBackgroundGroundColor }}' skyAngle='0.04 0.05 0.1 1.309 1.570' skyColor='{{ preferredBackgroundSkyColor }}'></Background>
  177.                 <Group DEF='Animation_header'>
  178.                   <TimeSensor DEF='AnimationTimer_header'
  179.                       cycleInterval='{{ guideCycle }}'
  180.                       loop='true'
  181.                       isActive='false'></TimeSensor>                  
  182.                   <OrientationInterpolator DEF='BoxRotationInterpolator_header'
  183.                       key='0, 0.25, 0.5, 0.75, 1'
  184.                       keyValue='0 0 1 0, 0 -1 0 1.5707963267949, 0 -1 0 3.14159253438051, 0 1 0 1.57079644600419, 0 0 1 0'></OrientationInterpolator>
  185.                   <TimeSensor DEF='AnimationTimer_header_reverse' id='AnimationTimer_header_reverse'
  186.                       cycleInterval='{{ guideCycle }}'
  187.                       loop='true'
  188.                       isActive='true'></TimeSensor>                          
  189.                   <OrientationInterpolator DEF='BoxRotationInterpolator_header_reverse'
  190.                       key='0, 0.25, 0.5, 0.75, 1'
  191.                       keyValue='0 0 1 0, 0 1 0 1.57079644600419, 0 -1 0 3.14159253438051, 0 -1 0 1.5707963267949, 0 0 1 0'></OrientationInterpolator>
  192.                 </Group>
  193.                 {% if imageTotalCount < 4 %} 
  194.                     {% set bDistance = (imageTotalCount - 0) %}
  195.                 {% elseif imageTotalCount < 10 %}
  196.                     {% set bDistance = (imageTotalCount - 1.5) %}
  197.                 {% elseif imageTotalCount < 15 %}
  198.                     {% set bDistance = (imageTotalCount - 2) %}    
  199.                 {% else %}    
  200.                     {% set bDistance = (imageTotalCount - 3) %}    
  201.                 {% endif %}    
  202.                 {% set xPos = -15 %}    
  203.                 {% set zPos = 2 %}
  204.                 {% set yRotation = 0 %}
  205.                 {% set imageCount = 0 %}
  206.                 {% set imagePanelWidth = 5.2 %}
  207.                 {% set frontWallImageCount = 4 %}
  208.                 {% set sideWallImageCount = (imageTotalCount - frontWallImageCount)/2 %}
  209.                 {% set gamma = -(360 / imageTotalCount) %}
  210.                 {% set beta = 90 %}
  211.                 {% set alfa = (360 - beta) - gamma %}
  212.                 {% set curGamma = 0 %}
  213.                 {% set zPosFrontWall = null %}
  214.                 {% set yAngle = deg2rad(360/imageTotalCount) %}
  215.                 {% set userTranslationKey = "" %}
  216.                 {% set userTranslationKeyAdd = (1/imageTotalCount)|round(2, 'ceil') %}
  217.                 {% set userTranslationKeyCurr = 0 %}
  218.                 {% set userTranslationValue = "" %}
  219.                 {% set firstGamma = gamma * imageCount %}
  220.                 {% set firstAlfa = (360 - beta) - curGamma %}
  221.                 {% set firstGamma = gamma * imageCount %}
  222.                 {% set firstXPos = (bDistance * sin(deg2rad(firstAlfa)))/sin(deg2rad(90)) %}
  223.                 {% set firstZPos = (bDistance * sin(deg2rad(firstGamma)))/sin(deg2rad(90)) %}
  224.                 {% set firstXPosViewPoint = (firstXPos-5)|round(2, 'ceil') %}
  225.                 {% set firstZPosViewPoint = firstZPos|round(2, 'ceil') %}
  226.               
  227.               <viewpoint orientation='0 1 0 {{ (halfCircleAngle + rightAngle) }}' position='{{ firstXPosViewPoint }} 0 {{ firstZPosViewPoint }}' id='x3d_viewpoint_home2'></viewpoint>
  228.               
  229.               <Transform DEF='ImagesBox' id="ImagesBox" translation='0 0 0' rotation='0 1 0 0'>
  230.               
  231.               {% for galleryItem in galleryItemCollection %}
  232.                   {% set curGamma = gamma * imageCount %}
  233.                   {% set curAlfa = (360 - beta) - curGamma %}
  234.                   {% set xPos = (bDistance * sin(deg2rad(curAlfa)))/sin(deg2rad(90)) %}
  235.                   {% set zPos = (bDistance * sin(deg2rad(curGamma)))/sin(deg2rad(90)) %}
  236.                   {% set xPosViewPoint = (xPos-5)|round(2, 'ceil') %}
  237.                   {% set zPosViewPoint = zPos|round(2, 'ceil') %}
  238.                   {% set userTranslationKey = userTranslationKey ~ " " ~ userTranslationKeyCurr %}
  239.                   {% set userTranslationKeyCurr = userTranslationKeyCurr + userTranslationKeyAdd %}
  240.                   {% set userTranslationValue = userTranslationValue ~ " " ~ xPosViewPoint ~ " 0 " ~ zPosViewPoint %}
  241.                   {% if imageCount == 0 %} 
  242.                       {% set firstUserTranslationValue = " " ~ xPosViewPoint ~ " 0 " ~ zPosViewPoint ~ " " %}
  243.                       <viewpoint orientation='0 1 0 {{ -(yRotation - rightAngle) }}' position='{{ xPosViewPoint }} 3.5 {{ zPosViewPoint }}' id='x3d_viewpoint_home3'></viewpoint>
  244.                   {% endif %}        
  245.                   {% if imageCount == (imageTotalCount-1) %} 
  246.                       {% set userTranslationKey = userTranslationKey ~ " 1" %}
  247.                       {% set userTranslationValue = firstUserTranslationValue %}
  248.                   {% endif %}    
  249.                   {% set fileID = galleryItem.galleryItemId %}
  250.                   {% set itemId = galleryItem.galleryItemId %}
  251.                   {% if 'http' in galleryItem.galleryItemFile %}
  252.                         {% set path = galleryItem.galleryItemFile %}
  253.                         {% set pathObj = galleryItem.galleryItemFile %}
  254.                   {% else %}        
  255.                       {% set path = userDirs['web'] ~ '/images/' ~ galleryItem.galleryItemFile %}
  256.                     {% set pathObj = userDirs['web'] ~ '/images/' ~ galleryItem.galleryItemFile %}
  257.                 {% endif %}
  258.                 {% set image = path %}
  259.                 {% set img = imagecreatefromstring(file_get_contents(image)) %}
  260.                 {% set imgObj = imagecreatefromstring(file_get_contents(pathObj)) %}
  261.                 {% if ImageSX(imgObj) > ImageSY(imgObj) %} 
  262.                     {% set boxSize = gallery3DInfo['image_size_horisontal'] %}
  263.                     {% set frameSize = gallery3DInfo['frame_size_horisontal'] %}
  264.                 {% else %}
  265.                     {% set boxSize = gallery3DInfo['image_size_vertical'] %}
  266.                     {% set frameSize = gallery3DInfo['frame_size_vertical'] %}
  267.                 {% endif %}
  268.                 <viewpoint orientation='0 1 0 {{ -(yRotation + rightAngle) }}' position='{{ xPosViewPoint }} 0.1 {{ zPosViewPoint }}' id='gallery_viewpoint_{{ fileID }}'></viewpoint>
  269.                 <Transform rotation='0 1 0 {{ -(yRotation + rightAngle) }}' translation='{{ xPos }} 0 {{ zPos }}'>
  270.                 
  271.                   <Transform>
  272.                     <Shape onclick="changeViewpoint('gallery_viewpoint_{{ itemId }}')">
  273.                       <Appearance>
  274.                         <Material></Material>
  275.                         <ImageTexture url="{{ path }}"></ImageTexture>
  276.                       </Appearance>
  277.                       <Box size='{{ boxSize }}'></Box>
  278.                     </Shape>
  279.                     <TouchSensor DEF='Image1Sensor'></TouchSensor>
  280.                   </Transform>
  281.                   
  282.                   <Transform translation='0 0 0.0'>
  283.                     <Shape>
  284.                       <Appearance>
  285.                         <Material diffuseColor='0 0 0' transparency='0.3'></Material>
  286.                       </Appearance>
  287.                       <Box size='{{ frameSize }}'></Box>
  288.                     </Shape>
  289.                   </Transform>
  290.                 </Transform> 
  291.                 <Transform rotation='0 1 0 {{ -(yRotation + rightAngle) }}' translation='{{ xPos }} 1.3 {{ zPos }}'>    
  292.                     
  293.                 {% set menuX = 0 %}
  294.                 {% if galleryItem.clickURL is defined and galleryItem.clickURL != '' %}    
  295.                   <!-- browse url button -->
  296.                     <Anchor
  297.                         description='{{ 'system.browse_url'|trans }}'
  298.                         id = 'img_url_{{ galleryItem.galleryItemId }}'
  299.                         url='{{ galleryItem.clickURL }}'
  300.                         parameter = 'target=_blank'>
  301.                         <Transform translation='{{ (menuX - 0.8) }} -0.85 0'>
  302.                           <Shape>
  303.                             <Appearance>
  304.                                <Material diffuseColor='0 1 0'></Material>
  305.                                <ImageTexture url='{{ textureArray['browseurl-texture-1'] }}'></ImageTexture>
  306.                                    <TextureTransform scale='1 1'></TextureTransform>
  307.                             </Appearance>
  308.                             <Box size='1.7 0.7 0.1'></Box>
  309.                           </Shape>
  310.                         </Transform> 
  311.                     </Anchor>
  312.                     {% set menuX = menuX + 0.55 %}
  313.      
  314.                    {% endif %}
  315.                    {% if galleryItem.galleryItemDescription is defined and galleryItem.galleryItemDescription != '' %}
  316.                       <!--  more info button -->
  317.                         <Transform translation='{{ (menuX + 0.3) }} -0.85 0'>
  318.                           <Shape onclick="getGaleryItemDetail('{{ galleryItem.galleryItemName }}','{{ galleryItem.galleryItemDescription }}')">
  319.                             <Appearance>
  320.                                <Material diffuseColor='0 1 0'></Material>
  321.                                <ImageTexture url='{{ textureArray['browseurl-texture-1'] }}'></ImageTexture>
  322.                                    <TextureTransform scale='1 1'></TextureTransform>
  323.                             </Appearance>
  324.                             <Box size='1.7 0.7 0.1'></Box>
  325.                           </Shape>
  326.                         </Transform> 
  327.  
  328.                    {% set menuX = menuX + 0.55 %}
  329.                    {% endif %}
  330.  
  331.                 </Transform> 
  332.                 {% set yRotation = yRotation + yAngle %}
  333.                 {% set imageCount = imageCount + 1 %}
  334.               
  335.               {% endfor %}
  336.               
  337.                 <!-- logo 1 -->
  338.                 <Group DEF='Logo_Animation_header'>
  339.                   <TimeSensor DEF='LogoTimer'
  340.                       cycleInterval='24'
  341.                       loop='true'
  342.                       isActive='true'></TimeSensor>
  343.                   <OrientationInterpolator DEF='BoxRotationInterpolator'
  344.                       key='0, 0.25, 0.5, 0.75, 1'
  345.                       keyValue='0 0 1 0, 0 -1 0 1.5707963267949, 0 -1 0 3.14159253438051, 0 1 0 1.57079644600419, 0 0 1 0'></OrientationInterpolator>
  346.                 </Group>
  347.                 
  348.                 <Transform translation='0 8.5 0' >
  349.                       <Shape >
  350.                         <Appearance >
  351.                           <Material diffuseColor='0.1 0.1 0.1'>
  352.                           </Material>
  353.                         </Appearance>
  354.                         <Cylinder height='0.3' radius='1.5' >
  355.                         </Cylinder>
  356.                       </Shape>
  357.                 </Transform>                
  358.                 
  359.                 <Transform DEF='ExamineSensor' translation='0 7 0'>
  360.                   <Shape>
  361.                     <Appearance>
  362.                       <Material ambientIntensity='0.1'></Material>
  363.                       <ImageTexture url='{{ textureArray['logo-texture-1'] }}'></ImageTexture>
  364.                       <TextureTransform scale='1 1'></TextureTransform>
  365.                     </Appearance>
  366.                     <Box size='3 3 3'></Box>
  367.                   </Shape>
  368.                 </Transform>
  369.               </Transform>
  370.             <!-- Free World -->
  371.             {% if freeWorld is defined and freeWorld != null %}        
  372.                 <Transform translation='{{ freeWorld.preferredPosition }}' rotation='{{ freeWorld.preferredRotation }}' scale='{{ freeWorld.preferredScale }}'>
  373.                   
  374.                       <Inline url='"{{ freeWorld.xmlFile() }}"' >
  375.                     </Inline>
  376.                 </Transform>
  377.             {% endif %}
  378.     
  379.               
  380.           <ROUTE fromNode='AnimationTimer_header_reverse' fromField='fraction_changed' toNode='BoxRotationInterpolator_header_reverse' toField='set_fraction'></ROUTE>
  381.           <ROUTE fromNode='BoxRotationInterpolator_header_reverse' fromField='value_changed' toNode='ImagesBox' toField='rotation'></ROUTE>    
  382.           <Route fromNode="CLOCK" fromField ="fraction_changed" toNode="UserTranslation1" toField="set_fraction"> </Route> 
  383.           <Route fromNode="UserTranslation1" fromField ="value_changed" toNode="TourAvatarWrapper" toField="translation"> </Route>  
  384.         </scene>
  385.       </x3d>
  386.     </div>
  387.         
  388.         <script>
  389.             //we setup full screen 3d canvas
  390.             // var buttonResizeScreen = document.getElementById("button_defaultscreen");
  391.       //       buttonResizeScreen.click(); // this will trigger the click event
  392.               {% if isFullscreen is defined and isFullscreen %}
  393.                 {% set resizeButton = 'button_defaultscreen' %}
  394.             {% else %}
  395.                 $( document ).ready(function() {
  396.                 // alert( "ready!" );
  397.                     document.getElementById("button_defaultscreen").click(); 
  398.                 });
  399.             {% endif %}    
  400.         </script>