templates/eshop3D/eshop3D.html.twig line 1

Open in your IDE?
  1. {% extends 'layoutEshop3d.html.twig' %}
  2. {% block page_contents %}
  3.     {% for message in app.flashes('notice') %}
  4.         <div class="flash-notice">
  5.             <div class='notice'>{{ message }}</div>
  6.         </div>
  7.     {% endfor %}
  8.     {% for message in app.flashes('error') %}
  9.         <div class="flash-error">
  10.             <div class='error'>{{ message }}</div>
  11.         </div>
  12.     {% endfor %}
  13. {#    {% block title %}{{ 'Hello E-shop 3D' }}{% endblock %}#}
  14.     {#    we setup images for 3D space #}
  15.     {% set gallery3DInfo = [] %}
  16.     {% set gallery3DInfo = gallery3DInfo|merge({'image_size_horisontal': '4.8 3.2 0.1'}) %}
  17.     {% set gallery3DInfo = gallery3DInfo|merge({'frame_size_horisontal': '5.2 3.6 0.1'}) %}
  18.     {% set gallery3DInfo = gallery3DInfo|merge({'image_size_vertical': '3.2 4.8 0.1'}) %}
  19.     {% set gallery3DInfo = gallery3DInfo|merge({'frame_size_vertical': '3.6 5.2 0.1'}) %}
  20.     {#    we prepare textures #}
  21.     {% set textureArray = [] %}
  22.     {% set textureArray = textureArray|merge({'floor-texture-1': ''}) %}
  23.     {% set textureArray = textureArray|merge({'floor-texture-2': ''}) %}
  24.     {% set textureArray = textureArray|merge({'ceil-texture-1': ''}) %}
  25.     {% set textureArray = textureArray|merge({'wall-texture-1': ''}) %}
  26.     {% set textureArray = textureArray|merge({'wall-texture-2': ''}) %}
  27.     {% set textureArray = textureArray|merge({'background-front': ''}) %}
  28.     {% set textureArray = textureArray|merge({'background-back': ''}) %}
  29.     {% set textureArray = textureArray|merge({'background-left': ''}) %}
  30.     {% set textureArray = textureArray|merge({'background-right': ''}) %}
  31.     {% set textureArray = textureArray|merge({'image-help-1': ''}) %}
  32.     {% set textureArray = textureArray|merge({'button-play': ''}) %}
  33.     {% set textureArray = textureArray|merge({'button-home': ''}) %}
  34.     {% set textureArray = textureArray|merge({'button-help': ''}) %}
  35.     {% set textureArray = textureArray|merge({'button-exit-1': ''}) %}
  36.     {% set textureArray = textureArray|merge({'gallery-logo': ''}) %}
  37.     {% set textureArray = textureArray|merge({'cart-texture-1': ''}) %}
  38.     {% set textureArray = textureArray|merge({'info-texture-1': ''}) %}
  39.     {% set textureArray = textureArray|merge({'bg-texture-1': ''}) %}
  40.     {% set textureArray = textureArray|merge({'bg-texture-2': ''}) %}
  41.     {% set textureArray = textureArray|merge({'bg-texture-3': ''}) %}
  42.     {% set textureArray = textureArray|merge({'bg-texture-4': ''}) %}
  43.     {% if textureItemCollection is defined %}
  44.         {% for textureItem in textureItemCollection %}
  45.             {% if 'http' in textureItem.galleryItemFile %}
  46.                 {% set texturePath = textureItem.galleryItemFile %}
  47.             {% else %}
  48.                 {% set texturePath = userDirs['web'] ~ '/images/' ~ textureItem.galleryItemFile %}
  49.             {% endif %}
  50.             {% if textureItem.galleryItemName is defined and textureItem.galleryItemName != '' %}
  51.                 {% set textureKey = textureItem.galleryItemName %}
  52. {#                {% set textureArray[textureKey] = texturePath %}#}
  53.                 {% set textureArray = textureArray|merge({(textureKey): (texturePath)}) %}
  54.             {% endif %}
  55.         {% endfor %}
  56.     {% endif %}
  57.     {% if textureArray['wall-texture-2'] == '' %}
  58.         {% set textureArray = textureArray|merge({'wall-texture-2': (textureArray['wall-texture-1'])}) %}
  59.     {% endif %}
  60.     {% set tourArray = [] %}
  61.         <!-- X3D  -->
  62.         <div style="width: 100vw; height: 90vh; display:block; right:0; left:0; box-sizing: border-box; position: absolute; left: 0; right: 0; background-color: Black;" id="x3d" class="x3d_container">
  63.                 <!-- menu -->
  64.                     <div style="position: absolute; left: 0px; width: 100%; height: 50px; display:block; border-right: 1px solid #EA5B0C; background-color: #222; opacity: 0.8; text-align:center; font-family: helvetica, sans-serif; font-weight: bold; font-size: 10px; color: #EA5B0C; padding-top:5px; z-index: 3; vertical-align: top;" id="x3d_menu">
  65.                     
  66.                     <div style="margin-right:2px; display:inline-block" id="x3d_menu_viewpoint_home">
  67.                         <button id="button_viewpoint_home" onclick="changeViewpoint('x3d_viewpoint_home')" 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: 40px 40px; height: 42px; width: 42px;" title="Home Viewpoint"></button>
  68.                     </div>                        
  69.                     <div style="margin-right:2px; display:inline-block" id="x3d_menu_viewpoint_menu">
  70.                         <button id="button_viewpoint_menu" onclick="changeViewpoint('x3d_viewpoint_menu')" 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_menu.png' ); background-size: 40px 40px; height: 42px; width: 42px;" title="Menu Viewpoint"></button>
  71.                     </div>
  72.                     <div style="margin-right:7px; display:inline-block" id="x3d_menu_tour">
  73.                         <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;" title="Tour"></button>
  74.                         </div>                    
  75.                       <!--
  76.                           <div style="margin-top:7px" id="x3d_menu_viewpoint_1">
  77.                             <button id="button_viewpoint_1" onclick="changeViewpoint('x3d_viewpoint_1')" 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;" title="viewpoint 1"></button>
  78.                       </div>
  79.                           <div style="margin-top:7px" id="x3d_menu_viewpoint_2">
  80.                             <button id="button_viewpoint_2" onclick="changeViewpoint('x3d_viewpoint_2')" 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;" title="viewpoint 2"></button>
  81.                       </div>
  82.                           <div style="margin-top:7px" id="x3d_menu_viewpoint_3">
  83.                             <button id="button_viewpoint_3" onclick="changeViewpoint('x3d_viewpoint_3')" 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;" title="viewpoint 3"></button>
  84.                       </div>    
  85.                       -->
  86.                     {% for category in childNodes %}
  87.                         {% set catId = category.categoryId %}
  88.                         {% set viewpoint = 'category_viewpoint_' ~ catId %}
  89.                         <span style="margin-right:2px; display:inline-block" id="root_category_menu_viewpoint_{{ catId }}">
  90.                             <button id="category_button_viewpoint_{{ catId }}" onclick="changeViewpoint('root_category_viewpoint_{{ catId }}')" style="font-family: helvetica, sans-serif; font-weight: strong; font-size: 10px; background-color: black; padding-top:2px; padding-bottom:2px; border: 1px solid #333; color: white; height: 33px;" title="{{ category.categoryName }}">{{ category.categoryName }}</button>
  91.                         </span>
  92.                     {% endfor %}
  93.                         <span style="margin-right:7px; display:inline-block" id="x3d_menu_defaultscreen">
  94.                             <button id="button_defaultscreen" onclick="sceneResize('normal')" 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;" title="default screen"></button>
  95.                       </span>
  96.                       <span style="margin-right:2px; display:inline-block" id="x3d_menu_fullscreen">
  97.                         <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;" title="full screen"></button>
  98.                     </span>
  99.                   </div>
  100.                   <!-- product detail info -->
  101.                   <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: 5;" id="x3d_product_detail">
  102.                       <div style="margin-top:1px" id="x3d_product_detail_close" style="text-align: left; float: left;">
  103.                             <button id="button_product_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>
  104.                       </div>
  105.                       <div id="x3d_product_name" style="font-weight: bold; font-size: 22px; margin-top:8px"></div>
  106.                       <div>
  107.                             <span style="font-weight: normal; font-size: 11px;">{{ 'product.key'|trans }}: </span>
  108.                             <span id="x3d_product_key" style="font-weight: bold; font-size: 16px;"></span>
  109.                       </div>
  110.                       <div>
  111.                           <span style="font-weight: normal; font-size: 11px;">{{ 'eshop.price'|trans }}: </span>
  112.                           <span id="x3d_product_price" style="font-weight: bold; font-size: 16px;"></span>
  113.                         {{ app.session.get('eshopCurrency').currencyKey }}
  114.                       </div>
  115.                       <div style="margin-top:8px">
  116.                           <span id="x3d_product_description" style="font-weight: normal; font-size: 16px"></span>
  117.                       </div>    
  118.                       <div style="margin-top:8px">
  119.                           <span> 
  120.                             <img id="x3d_product_image" src="" alt="Product Image" style="height: 25vw"></img>
  121.                           </span>
  122.                       </div>    
  123.                       <div style="margin-top:8px" id="x3d_button_addcart" style="text-align: left; float: left;">
  124.                           <input hidden id="x3d_product_id" name="x3d_product_id" value="">
  125.                             <input hidden id="x3d_eshop_id" name="x3d_eshop_id" value="{{ eshop.eshopId }}">
  126.                             <button id="button_addcart" style="font-family: helvetica, sans-serif; font-weight: normal; font-size: 10px; background-color: DarkGreen; border: 1px solid #333; color: white;padding:2px; height: 33px; width: 233px" title="Add to basket">Add to basket</button>
  127.                       </div>    
  128.                       <div style="margin-top:6px" id="x3d_product_detail_close2" style="text-align: left; float: left;">
  129.                             <button id="button_product_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>
  130.                       </div>                                        
  131.                   </div>
  132.                   <!-- result info message -->
  133.                 <div style="position: absolute; top: 0px; width: 100%; height: 0px; display:block; border-bottom: 1px solid #EFEFEF; background-color: #000; opacity: 0.8; text-align:center; font-family: helvetica, sans-serif; font-weight: bold; font-size: 10px; color: #FFF; padding-top:0px; z-index: 5;" id="x3d_info_message">
  134.                     <table border='0' id='infoMessageTable' class='infoMessageTable' align="center" cellpadding='0' cellspacing='0' style="display: none">
  135.                       <tr>
  136.                         <td valign='top'>
  137.                                <x3d width='50px' height='35px' profile='Immersive' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'>
  138.                               <scene>
  139.                                 <Transform DEF = 'CubeGallery'
  140.                                   translation = '0 0 0'
  141.                                   scale = '10 10 10'>
  142.                                   <Inline nameSpaceName="LogoCubex" mapDEFToID="true" url="/Logo_Cubes_Noclick.x3d" />
  143.                                 </Transform>
  144.                               </scene>
  145.                             </x3d> 
  146.                         </td>
  147.                         <td valign='top'>
  148.                             <div id="x3d_info_message_text" style="font-weight: normal; font-size: 16px; margin-top: 7px; margin-left:5px"></div>
  149.                         </td>
  150.                         <td valign='top'>
  151.                             <div style="margin-top:1px; text-align: left; float: left;" id="x3d_info_message_close">
  152.                             <button id="button_info_message_close" style="font-family: helvetica, sans-serif; font-weight: normal; font-size: 10px; background-color: black; border: 1px solid #333; color: white;margin-left:12px;  background-image: url( '{{ textureArray['button-exit-1'] }}' ); background-size: 25px 25px; height: 27px; width: 27px; margin-top: 2px; display: none" title="close message panel"></button>
  153.                               </div>    
  154.                         </td>                        
  155.                       </tr>
  156.                     </table>      
  157.                   </div>            
  158.                   <!-- quick basket  -->
  159.                 <div style="position: absolute; top: 0px; right: 0px; width: 50%; height: 0px; display:block; background-color: #000; opacity: 0.8; text-align:center; font-family: helvetica, sans-serif; font-weight: bold; font-size: 10px; color: #FFF; padding-top:0px; z-index: 1; margin-left: auto; margin-right: auto;text-align: left; float: left;" id="x3d_quick_basket">
  160.                     <table border='0' id='quickBasketTable' class='quickBasketTable' align="center" cellpadding='0' cellspacing='0' style="display: none">
  161.                       <tr>
  162.                         <td valign='top'>
  163.                             <div id="x3d_quick_basket_title" style="font-weight: normal; font-size: 16px; margin-top: 7px; margin-left:5px"><h4>Quick Basket</h4></div>
  164.                         </td>
  165.                       </tr>
  166.                       <tr>
  167.                         <td valign='top'>
  168.                             <div id="x3d_quick_basket_text" style="font-weight: normal; font-size: 16px; text-align: left; margin-top: 7px; margin-left:5px"></div>
  169.                             <div style="margin-top:1px; display: inline-block; text-align: left; float: left;" id="x3d_quick_basket_open">
  170.                         <button id="button_quick_basket_open" style="font-family: helvetica, sans-serif; font-weight: bold; font-size: 12px; background-color: Gray; border: 1px solid #111; color: white; margin-left:12px; background-size: 25px 25px; height: 27px; width: 150px; margin-top: 2px" title="Go to Basket" value="Go to Basket" onclick="window.location.href='/eshop/{{ eshop.eshopId }}/basket';">{{ 'eshop.go_to_basket'|trans }}</button>
  171.                         </div>                 
  172.                         <div style="margin-top:1px;text-align: left; display: inline-block; float: left; " id="x3d_quick_basket_close">
  173.                         <button id="button_quick_basket_close" style="font-family: helvetica, sans-serif; font-weight: bold; font-size: 12px; background-color: Gray; border: 1px solid #111; color: white; margin-left:12px; background-size: 25px 25px; height: 27px; width: 27px; margin-top: 2px" title="close quick basket panel" value="x">x</button>
  174.                         </div>  
  175.                         </td>    
  176.                       </tr>    
  177.                       <tr>                
  178.                         <td valign='top'>
  179.                             
  180.                         </td>                        
  181.                       </tr>
  182.                     </table>      
  183.               
  184.                   </div>                            
  185.                 <x3d width='100%' height="90vh" id="x3d_section" style="height: 90vh; border-bottom: 2px solid #EA5B0C;background-color: #222;">
  186.                 <scene id="x3d_scene">
  187.                 <NavigationInfo headlight="true" visibilityLimit="0.0" type='"FLY", "WALK", "ANY"' avatarSize="0.25, 2.4, 0.75" speed='2.0'></NavigationInfo>
  188.                 
  189. <!--                 <Background backUrl='[]' bind='false' bottomUrl='[]' crossOrigin='""' description='""' frontUrl='"http://easycommerc.cz/users/Kantona/images/Bg-007-01.jpeg"' groundAngle='[]' groundColor='(0,0,0)' isActive='false' leftUrl='http://easycommerc.cz/users/Kantona/images/Bg-007-02.jpeg' metadata='X3DMetadataObject' rightUrl='"http://easycommerc.cz/users/Kantona/images/Bg-007-03.jpeg"' scaling='false' skyAngle='[]' skyColor='(0,0,0)' topUrl='"http://easycommerc.cz/users/Kantona/images/Bg-007-04.jpeg"' transparency='0/1' ></Background>  -->
  190.                     {% if isStartGuide is not defined %}
  191.                         {% set isStartGuide = false %}
  192.                     {% endif %}
  193.                     {% if isStartGuide is defined and isStartGuide %}
  194.                         <Transform DEF='TourAvatarWrapper' id='TourAvatarWrapper'>
  195.                             <viewpoint orientation='0 1 0 -0.2' position='0 3 0' DEF='x3d_viewpoint_tour' id='x3d_viewpoint_tour'></viewpoint>
  196.                         </Transform>
  197.                         <viewpoint orientation='0 1 0 1' position='-10 3 0'  id='x3d_viewpoint_2'></viewpoint>
  198.                         <Transform DEF='AvatarWrapper' id='AvatarWrapper'>
  199.                             <viewpoint orientation='0 1 0 -0' position='0 3 9'  id='x3d_viewpoint_1'></viewpoint>
  200.                         </Transform>
  201.                     {% else %}
  202.                         <Transform DEF='AvatarWrapper' id='AvatarWrapper'>
  203.                             <viewpoint orientation='0 1 0 -0' position='0 3 9'  id='x3d_viewpoint_1'></viewpoint>
  204.                         </Transform>
  205.                         <viewpoint orientation='0 1 0 1' position='-10 3 0'  id='x3d_viewpoint_2'></viewpoint>
  206.                         <Transform DEF='TourAvatarWrapper' id='TourAvatarWrapper'>
  207.                             <viewpoint orientation='0 1 0 -0.2' position='0 3 0' DEF='x3d_viewpoint_tour' id='x3d_viewpoint_tour'></viewpoint>
  208.                         </Transform>
  209.                     {% endif %}
  210.                 
  211.                 <viewpoint orientation='0 1 0 0.5' position='-10 3 -13'  id='x3d_viewpoint_3'></viewpoint>
  212.                 <viewpoint orientation='0 1 0 -0' position='0 3 8'  id='x3d_viewpoint_home'></viewpoint>
  213.                     <viewpoint orientation='0 1 0 -0' position='0 3 15'  id='x3d_viewpoint_menu'></viewpoint>
  214.                 
  215.                 <DirectionalLight ambientIntensity='0.835991' direction='0.584419 0.286636 0.75914'></DirectionalLight>
  216.                 <Background groundColor='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' skyAngle='0.04 0.05 0.1 1.309 1.570' skyColor='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'></Background>
  217.                 
  218.                 <!-- <PositionInterpolator DEF='UserTranslation1' key='0 0.3 0.5 0.8 1.0' keyValue='-12 0 0 -2 0 20 12 0 -20 12 0 0 -12 0 0'/></PositionInterpolator> -->
  219.                 <TimeSensor DEF='CLOCK' cycleInterval='33' loop='true' enabled='true'></TimeSensor>
  220.                 
  221.               <Transform DEF='CategoriesBox' translation='0 0 0' rotation='0 1 0 -0.13117953405799'>
  222.                 {# Root Categories#}
  223.                   {% set rootCategoryX = -7 %}
  224.                   {% set bDistance = 20 %}
  225.                   {% set catCount = 0 %}
  226.                   {% set countRootCategories = childNodes|length %}
  227.                   {% set gamma = -(180 / countRootCategories) %}
  228.                   {% set beta = 90 %}
  229.                   {% set alfa = (180 - beta) - gamma %}
  230.                   {% set shopWidth = (countRootCategories + 2) * 10 %}
  231.                   {% set yRotation = null %}
  232.                   {% set xPos = 20 %}
  233.                   {% set zPos = -30 %}
  234.                   {% for category in childNodes %}
  235.                       {% set catCount = catCount + 1 %}
  236.                       {% set curGamma = gamma * catCount %}
  237.                       {% set curAlfa = (180 - beta) - curGamma %}
  238. {#                      {% set zPos = (bDistance * sin(deg2rad(curGamma)))/sin(deg2rad(90)) %}#}
  239. {#                      $xPos = ($bDistance * sin(deg2rad($curAlfa)))/sin(deg2rad(90));#}
  240.                       {% set xPos = (xPos - 10) %}
  241. {#                      {% set zPos = (zPos + 20) %}#}
  242.                       {% set curGamma = gamma * catCount %}
  243.                       {% if yRotation == null %}
  244.                           {% set yRotation = 1.5 %}
  245.                       {% else %}
  246.                           {% set yRotation = yRotation - 3.3/countRootCategories %}
  247.                       {% endif %}
  248.                       {% set yRotation = 0.0 %}
  249.                       {% set catId = category.categoryId %}
  250.                       {% set categoryProductCount = categoryProducts[catId]|length %}
  251.                       {% if category.categoryName|length > 30 %}
  252.                           {% set labelFontSize = 0.3 %}
  253.                           {% set smallLabelFontSize = 0.12 %}
  254.                       {% elseif category.categoryName|length > 15 %}
  255.                           {% set labelFontSize = 0.5 %}
  256.                           {% set smallLabelFontSize = 0.2 %}
  257.                       {% else %}
  258.                           {% set labelFontSize = 0.7 %}
  259.                           {% set smallLabelFontSize = 0.3 %}
  260.                       {% endif %}
  261.                       {% if 'http' in category.image1 %}
  262.                           {% set imgPath = category.image1 %}
  263.                           {% set path = imgPath %}
  264.                           {% set imageThumbPath = 'users/' ~ user.userName ~ '/images/thumb_' ~ path %}
  265.                           {% set imgSysPath = category.image1 %}
  266.                           {% set isURL = true %}
  267.                       {% else %}
  268.                           {% set imgPath = userDirs['web'] ~ '/images/' ~ category.image1 %}
  269.                           {% set imgPath = userDirs['images'] ~ category.image1 %}
  270.                       {% endif %}
  271.                         {#  we prepare the category box size #}
  272.                       {% set thumbWidth = 150 %}
  273.                       {% set thumbHeight = 150 %}
  274.                       {% set maxThumbHeight = 150 %}
  275.                       {% set width = 150 %}
  276.                       {% set tourViewPoint = [] %}
  277.                       {% set tourViewPoint = tourViewPoint|merge({'x': (-(xPos + 2))}) %}
  278.                       {% set tourViewPoint = tourViewPoint|merge({'y': 0}) %}
  279.                       {% set tourViewPoint = tourViewPoint|merge({'z': (zPos + 15.55)}) %}
  280.                       {% set tourArray = tourArray|merge([tourViewPoint]) %}
  281.                     <Transform translation='{{ -(xPos + 2) }} 5.7 {{ zPos + 0.55 }}' rotation='0 1 0 {{ yRotation }}'>
  282.                         <viewpoint position='0 -2.2 8.5'  id='root_category_viewpoint_{{ catId }}'></viewpoint>
  283.                         <!-- category label background -->
  284.                         <Transform translation='0 0.1 0.0'>
  285.                             <shape onclick="changeViewpoint('root_category_viewpoint_{{ catId }}')">
  286.                                 <appearance>
  287.                                     <material diffuseColor='0 0 0' specularColor='0 0 0' transparency='0.4'></material>
  288.                                 </appearance>
  289.                                 <box size='6.5,1.3,0.01'></box>
  290.                             </shape>
  291.                         </Transform>    
  292.                         <!-- category label -->                    
  293.                         <Transform translation='0.0 -0.1 0.05'>
  294.                             <shape onclick="changeViewpoint('root_category_viewpoint_{{ catId }}')">
  295.                                 <appearance>
  296.                                     <material ambientIntensity='0.7' diffuseColor='1 1 1' specularColor='1 1 1'></material>
  297.                                 </appearance>
  298.                                 <text string='{{ category.categoryName }}' solid='false'>
  299.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="{{ labelFontSize }}"></fontstyle>
  300.                                 </text>
  301.                             </shape>
  302.                         </Transform>
  303.                         <!-- category arch -->
  304.                         <Transform translation='0 1 -0.5' rotation='1 0 0 1.60'>
  305.                             <Shape>
  306.                                 <Appearance>
  307.                           <Material ambientIntensity='0.1'></Material>
  308.                           <ImageTexture url='{{ textureArray['wall-texture-2'] }}'></ImageTexture>
  309.                           <TextureTransform scale='1 2.5'/>
  310.                                 </Appearance>
  311.                                 <Cylinder height='0.4' radius='2.05'></Cylinder>
  312.                             </Shape>
  313.                         </Transform>
  314.                         <!-- category image -->
  315.                         <Transform translation='0 1 -0.5' rotation='1 0 0 1.60'>
  316.                             <Shape>
  317.                                 <Appearance>
  318.                           <Material ambientIntensity='0.1' diffuseColor='1 1 1' specularColor='1 1 1' transparency='0.4'></Material>
  319.                                 </Appearance>
  320.                                 <Cylinder height='0.5' radius='1.8'></Cylinder>
  321.                             </Shape>
  322.                         </Transform>      
  323.                         
  324.                         <Transform translation='0 1.7 -0.3'>
  325.                             <shape onclick="changeViewpoint('root_category_viewpoint_{{ catId }}')">
  326.                                 <appearance>
  327.                                     <material diffuseColor='0 0 0' specularColor='0 0 0'></material>
  328.                                     <ImageTexture url='{{ imgPath }}'></ImageTexture>
  329.                                     <TextureTransform scale='1 1'/>
  330.                                 </appearance>
  331.                                 <Box size='{{ thumbWidth/100 }} {{ thumbHeight/100 }} {{ thumbWidth/100 }}'/>
  332.                             </shape>
  333.                         </Transform>
  334.                         <!-- category - left column -->
  335.                         <Transform translation='-3.5 -4.15 0'>
  336.                         <shape>
  337.                             <appearance>
  338.                               <Material ambientIntensity='0.1'></Material>
  339.                               <ImageTexture url='{{ textureArray['wall-texture-2'] }}'></ImageTexture>
  340.                               <TextureTransform scale='0.5 1'/>
  341.                             </appearance>
  342.                             <box size='0.7, 10,0.7'></box>
  343.                         </shape>
  344.                         </Transform>
  345.                         
  346.                         <!-- category - right column -->
  347.                         <Transform translation='3.5 -4.15 0'>
  348.                         <shape>
  349.                             <appearance>
  350.                           <Material ambientIntensity='0.1'></Material>
  351.                           <ImageTexture url='{{ textureArray['wall-texture-2'] }}'></ImageTexture>
  352.                           <TextureTransform scale='0.5 0.5'/>
  353.                             </appearance>
  354.                             <box size='0.7, 10,0.7'></box>
  355.                         </shape>
  356.                         </Transform>    
  357.                         <Transform translation='2.1 -5.55 0'>
  358.                         <shape>
  359.                             <appearance>
  360.                                   <material diffuseColor='0 0 0' specularColor='0 0 0' transparency='0.4'></material>
  361.                             </appearance>
  362.                             <box size='2.1, 10, 0.01'></box>
  363.                         </shape>
  364.                         </Transform>                        
  365.                         <!-- small label title -->                    
  366.                         <Transform translation='2.2 -3.1 0.55'>
  367.                             <shape onclick="changeViewpoint('root_category_viewpoint_{{ catId }}')">
  368.                                 <appearance>
  369.                                     <material diffuseColor='1 1 1' specularColor='1 1 1'></material>
  370.                                 </appearance>
  371.                                 <text string='{{ category.categoryName }}' solid='false'>
  372.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="{{ smallLabelFontSize }}"></fontstyle>
  373.                                 </text>
  374.                             </shape>
  375.                         </Transform>
  376.                         <!-- small label background -->
  377.                         <Transform translation='2.5 -2.7 0.5'>
  378.                             <shape onclick="changeViewpoint('root_category_viewpoint_{{ catId }}')">
  379.                                 <appearance>
  380.                                     <material diffuseColor='0 0 0'></material>
  381.                                 </appearance>
  382.                                 <box size='2.8,0.5,0.01'></box>
  383.                             </shape>
  384.                         </Transform>
  385. {#                        subcategories as list#}
  386.                         {% set subCategories = category.children %}
  387.                         {% set subCategoriesCount = subCategories|length %}
  388. {#                        we count products in subcategories#}
  389.                         {% set subCatProductCount = 0 %}
  390.                         {% for subCat in subCategories %}
  391.                             {% set subCatProductCount = subCatProductCount + categoryProducts[category.categoryId]|length %}
  392.                         {% endfor %}
  393.                         {% set positionZ = subCatProductCount * 2 %}
  394.                         {% set subCatCount = 0 %}
  395.                         {% set productPositionZ = 3 %}
  396.                         {% set productPositionY = -2.8 %}
  397.                         {% for subCat in subCategories %}
  398.                             {% set subCatId = subCat.categoryId %}
  399.                             {% set productPositionY = productPositionY - 0.55 %}
  400.                             <!-- small label title -->
  401.                             <Transform translation='2.2 {{ productPositionY-0.3 }} 0.55'>
  402.                                 <shape onclick="changeViewpoint('category_viewpoint_{{ subCatId }}')">
  403.                                     <appearance>
  404.                                         <material diffuseColor='1 1 1' specularColor='1 1 1'></material>
  405.                                     </appearance>
  406.                                     <text string='{{ subCat.categoryName }}' solid='false'>
  407.                                         <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="{{ smallLabelFontSize }}"></fontstyle>
  408.                                     </text>
  409.                                 </shape>
  410.                             </Transform>
  411.                             <!-- small label background -->
  412.                             <Transform translation='2.5 {{ productPositionY + 0.1 }} 0.5'>
  413.                                 <shape onclick="changeViewpoint('category_viewpoint_{{ subCatId }}')">
  414.                                     <appearance>
  415.                                         <material diffuseColor='0.2 0.2 0.2'></material>
  416.                                     </appearance>
  417.                                     <box size='2.8,0.5,0.01'></box>
  418.                                 </shape>
  419.                             </Transform>
  420.                         {% endfor %}
  421.                         <!-- special products in front of main categories -->
  422.                         {# {% set categoryProductLocationZ = 2 * categoryProductCount + 1.8 %}#}
  423.                         {% set frontCategoryLocationZ = 7 %}
  424.                         {% set categoryProductLocationZ = 2 * categoryProductCount + frontCategoryLocationZ %}
  425.                 <Transform translation='-2.3 -4.7 {{ frontCategoryLocationZ }}' rotation='0 1 0 0'>
  426.                     {% set rootCategoryX = rootCategoryX + 3.3 %}
  427.                     {# displays products in category #}
  428.                     {% set productCount = 0 %}
  429.                     {% set isURL = false %}
  430.                     {% set categoryId = category.categoryId %}
  431.                     {% for product in categoryProducts[categoryId] %}
  432.                         {% set productCount = productCount + 1 %}
  433.                         {% set productPositionX = productCount * 21 %}
  434.                         {% set productPositionZ = productCount * 2 %}
  435.                         {% if 'http' in product.image1 %}
  436.                             {% set imgPath = product.image1 %}
  437.                             {% set imgSysPath = product.image1 %}
  438.                             {% set isURL = true %}
  439.                         {% else %}
  440.                             {% set imgPath = userDirs['web'] ~ '/images/' ~ product.image1 %}
  441.                             {% set imgSysPath = userDirs['images'] ~ '/' ~ product.image1 %}
  442.                         {% endif %}
  443.                         {# we prepare the product box size #}
  444.                         {% set thumbWidth = 147 %}
  445.                         {% set thumbHeight = 147 %}
  446.                         {% set maxThumbHeight = 147 %}
  447.                         {% set width = 147 %}
  448.                         {# we load VAT #}
  449.                         {% set productVAT = null %}
  450.                         {% if product is defined and product.productVAT is defined and product.productVAT > 0 %}
  451.                             {# VAT is derived from productVAT #}
  452.                             {% set productVAT = product.productVAT %}
  453.                         {% elseif eshop.preferredVAT is defined and eshop.preferredVAT > 0 %}
  454.                             {# VAT is derived from eshop VAT #}
  455.                             {% set productVAT = eshop.preferredVAT %}
  456.                         {% endif %}
  457.                         {% if category.categoryName|length > 15 %}
  458.                             {% set labelFontSize = 0.2 %}
  459.                         {% elseif category.categoryName|length > 30 %}
  460.                             {% set labelFontSize = 0.1 %}
  461.                         {% else %}
  462.                             {% set labelFontSize = 0.4 %}
  463.                         {% endif %}
  464.                         {# we get price(s) to display#}
  465.                         {% set displayPrice = null %}
  466.                         {% set displayPriceVAT = null %}
  467.                         {% set defaultDisplayPrice = null %}
  468.                         {% set defaultDisplayPriceVAT = null %}
  469.                         {% for price in categoryProductPrices[categoryId] %}
  470.                             {% if price.productId == product.productId %}
  471.                                 {# we get price level according to logged contact-customer #}
  472.                                 {% if app.session.get('contact') is defined and app.session.get('contact').priceLevel is defined and price.priceLevelId == app.session.get('contact').priceLevel.priceLevelId %}
  473.                                     {# we get netto or brutto value according to e-shop configuration #}
  474.                                     {% if eshop.displayNettoPrices is defined and eshop.displayNettoPrices == true %}
  475.                                         {% set displayPrice = price.nettoValue|round(eshop.roundPrice, 'ceil') %}
  476.                                     {% else %}
  477.                                         {% set displayPrice = price.bruttoValue|round(eshop.roundPrice, 'ceil') %}
  478.                                     {% endif %}
  479.                                     {% if eshop.displayNettoPrices is defined and eshop.displayNettoPrices == true %}
  480.                                         {% set displayPrice = displayPrice + (displayPrice * (productVAT/100)) %}
  481.                                         {% set displayPriceVATLabel = 'product.price_with_VAT'|trans %}
  482.                                     {% else %}
  483.                                         {% set displayPrice = displayPrice - (displayPrice * (productVAT/100)) %}
  484.                                         {% set displayPriceVATLabel = 'product.price_without_VAT'|trans %}
  485.                                     {% endif %}
  486.                                 {% elseif price.priceLevelId == 1 %}
  487.                                     {# we get default price level #}
  488.                                     {# we get netto or brutto value according to e-shop configuration #}
  489.                                     {% if eshop.displayNettoPrices is defined and eshop.displayNettoPrices == true %}
  490.                                         {% set displayPrice = price.nettoValue|round(eshop.roundPrice, 'ceil') %}
  491.                                     {% else %}
  492.                                         {% set displayPrice = price.bruttoValue|round(eshop.roundPrice, 'ceil') %}
  493.                                     {% endif %}
  494.                                     {% if eshop.displayNettoPrices is defined and eshop.displayNettoPrices == true %}
  495.                                         {% set displayPrice = displayPrice + (displayPrice * (productVAT/100)) %}
  496.                                         {% set displayPriceVATLabel = 'product.price_with_VAT'|trans %}
  497.                                     {% else %}
  498.                                         {% set displayPrice = displayPrice - (displayPrice * (productVAT/100)) %}
  499.                                         {% set displayPriceVATLabel = 'product.price_without_VAT'|trans %}
  500.                                     {% endif %}
  501.                                 {% endif %}
  502.                             {% endif %}
  503.                         {% endfor %}
  504.                         {% set maxLength = 20 %}
  505.                         {% if product.productName|length > maxLength %}
  506.                             {% set productName = product.productName|slice(0, maxLength) ~ ".." %}
  507.                         {% else %}
  508.                             {% set productName = product.productName %}
  509.                         {% endif %}
  510.                         {% if productName|length > 11 %}
  511.                             {% set productLabelFontSize = 0.15 %}
  512.                         {% elseif productName|length > 20  %}
  513.                             {% set productLabelFontSize = 0.07 %}
  514.                         {% elseif productName|length > 50  %}
  515.                             {% set productLabelFontSize = 0.05 %}
  516.                         {% else %}
  517.                             {% set productLabelFontSize = 0.25 %}
  518.                         {% endif %}
  519.                         {% if displayPrice|length > 3 %}
  520.                             {% set priceLabelFontSize = 0.15 %}
  521.                         {% elseif displayPrice|length > 10  %}
  522.                             {% set priceLabelFontSize = 0.10 %}
  523.                         {% else %}
  524.                             {% set priceLabelFontSize = 0.25 %}
  525.                         {% endif %}
  526.                       <!-- product viewpoint -->
  527.                     <viewpoint orientation='0 1 0 1.6' position='3.5 1.2 -{{ productPositionZ }}'  id='product_viewpoint_{{ product.productId }}'></viewpoint>
  528.                     <Transform translation='0 1.25 -{{ productPositionZ }}'>
  529.                       <shape onclick="changeViewpoint('product_viewpoint_{{ product.productId }}')">
  530.                         <Appearance>
  531.                           <Material diffuseColor='0 0 0' emissiveColor='0 0 0'></Material>
  532.                           <ImageTexture url='{{ imgPath }}'></ImageTexture>
  533.                         </Appearance>
  534.                         <Box size='{{ (thumbWidth/100)|number_format }} {{ (thumbHeight/100)|number_format }} {{ (thumbWidth/100)|number_format }}'/>
  535.                       </Shape>
  536.                     </Transform>
  537.                     <!-- product name -->
  538.                     <Transform translation='0.85 -0.1 -{{ productPositionZ + 0.07 }}' rotation='0 1 0 1.545'>
  539.                             <shape onclick="getProductDetail('{{ eshop.eshopId }}','{{ product.productId }}')">
  540.                                 <appearance>
  541.                                     <material specularColor='0 1 0'></material>
  542.                                 </appearance>
  543.                                 <text string='{{ productName }} {{ productLabelFontSize }}' solid='false'>
  544.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="{{ productLabelFontSize }}"></fontstyle>
  545.                                 </text>
  546.                             </shape>
  547.                            </Transform>                        
  548.                    
  549.                     <!-- more info button -->
  550.                     <Transform translation='0 2.25 -{{ (productPositionZ - 0.55) }}'>
  551.                       <Shape onclick="getProductDetail('{{ eshop.eshopId }}','{{ product.productId }}')">
  552.                         <Appearance>
  553.                            <Material diffuseColor='0 0 0' emissiveColor='0 0 0'></Material>
  554.                            <ImageTexture url='{{ textureArray['info-texture-1'] }}'></ImageTexture>
  555.                                <TextureTransform scale='1 1'></TextureTransform>
  556.                         </Appearance>
  557.                         <Box size='0.5 0.5 0.5'/>
  558.                       </Shape>
  559.                     </Transform>                    
  560.                     <!-- price label - right -->
  561.                     <Transform translation='0.33 1.85 -{{ (productPositionZ - 0.0) }}' rotation='0 1 0 1.6'>
  562.                             <shape>
  563.                                 <appearance>
  564.                                     <material diffuseColor='0 0 0' specularColor='0 0 0'></material>
  565.                                 </appearance>
  566.                                 <text string='{{ displayPrice }}' solid='false'>
  567.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="{{ priceLabelFontSize }}"></fontstyle>
  568.                                 </text>
  569.                             </shape>
  570.                     </Transform>        
  571.                     <Transform translation='0.33 1.7 -{{ (productPositionZ - 0.05) }}' rotation='0 1 0 1.6'>
  572.                             <shape>
  573.                                 <appearance>
  574.                                     <material diffuseColor='0 0 0' specularColor='0 0 0'></material>
  575.                                 </appearance>
  576.                                 <text string='{{ app.session.get('eshopCurrency').currencyKey }}' solid='false'>
  577.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="0.15"></fontstyle>
  578.                                 </text>
  579.                             </shape>
  580.                     </Transform>
  581.                     <!-- price label - left -->
  582.                     <Transform translation='-0.01 1.85 -{{ (productPositionZ + 0.25) }}' rotation='0 1 0 -1.6'>
  583.                             <shape>
  584.                                 <appearance>
  585.                                     <material diffuseColor='0 0 0' specularColor='0 0 0'></material>
  586.                                 </appearance>
  587.                                 <text string='{{ displayPrice }}' solid='false'>
  588.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="{{ priceLabelFontSize }}"></fontstyle>
  589.                                 </text>
  590.                             </shape>
  591.                     </Transform>
  592.                     <Transform translation='-0.01 1.7 -{{ (productPositionZ + 0.15) }}' rotation='0 1 0 -1.6'>
  593.                             <shape>
  594.                                 <appearance>
  595.                                     <material diffuseColor='0 0 0' specularColor='0 0 0'></material>
  596.                                 </appearance>
  597.                                 <text string='{{ app.session.get('eshopCurrency').currencyKey }}' solid='false'>
  598.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="0.15"></fontstyle>
  599.                                 </text>
  600.                             </shape>
  601.                     </Transform>
  602.                     <Transform translation='0 2.25 -{{ productPositionZ }}'>
  603.                       <Shape>
  604.                         <Appearance>
  605.                           <Material diffuseColor='1 1 1' emissiveColor='1 1 1'></Material>
  606.                         </Appearance>
  607.                         <Box size='0.5 0.5 0.5'/>
  608.                       </Shape>
  609.                     </Transform>    
  610.                     <!-- add to basket button -->
  611.                     <Transform translation='0 2.25 -{{ (productPositionZ + 0.55) }}'>
  612.                       <Shape onclick="addBasket('{{ eshop.eshopId }}','{{ product.productId }}',1,{{ displayPrice }})">
  613.                         <Appearance>
  614.                            <Material diffuseColor='0 1 0'></Material>
  615.                            <ImageTexture url='{{ textureArray['cart-texture-1'] }}'></ImageTexture>
  616.                                <TextureTransform scale='1 1'></TextureTransform>
  617.                         </Appearance>
  618.                         <Box size='0.5 0.5 0.5'/>
  619.                       </Shape>
  620.                     </Transform> 
  621.                     <!-- product shelf -->
  622.                     <Transform translation='0 0.33 -{{ productPositionZ }}'>
  623.                       <Shape onclick="getProductDetail('{{ eshop.eshopId }}','{{ product.productId }}')">
  624.                         <Appearance>
  625.                           <Material diffuseColor='0 0 0' emissiveColor='0 0 0'></Material>
  626.                         </Appearance>
  627.                         <Box size='1.6 0.3 1.6'/>
  628.                       </Shape>
  629.                     </Transform>                    
  630.                     <Transform translation='0 -0.25 -{{ productPositionZ }}'>
  631.                       <Shape>
  632.                         <Appearance>
  633.                           <Material diffuseColor='0.1 0.1 0.1' emissiveColor='0.1 0.1 0.1' transparency='0.4'></Material>
  634.                         </Appearance>
  635.                         <Box size='1.3 {{ (thumbHeight/100) }} 1.3'/>
  636.                       </Shape>
  637.                     </Transform>                                  
  638.                 {% endfor %}
  639.                 </Transform>
  640.                 {# subcategories as shelves #}
  641.                 {% set subCategories = category.children %}
  642.                 {% set subCategoriesCount = subCategories|length %}
  643.                 {# we count products in subcategories #}
  644.                 {% set subCatProductCount = 0 %}
  645.                 {% set subCatProductCount = 0 %}
  646.                 {% for subCat in subCategories %}
  647.                     {% set subCatId = subCat.categoryId %}
  648.                     {% set subCatProductCount = subCatProductCount + categoryProducts[subCatId]|length %}
  649.                     {% set positionZ2 = (subCatProductCount * 1) %}
  650.                     {% set positionZ = (2 * subCatProductCount + 1.8) %}
  651.                 {% endfor %}
  652.                 <Transform translation='-2.3 -4.2 0' rotation='0 1 0 0'>
  653.                     {% set subCatCount = 0 %}
  654.                     {% set preProductPositionZ = productPositionZ %}
  655.                     {% set productPositionZ = categoryProductLocationZ - (2 * frontCategoryLocationZ) %}
  656.                     {% for subCat in subCategories %}
  657.                         {% set subCatCount = subCatCount + 1 %}
  658.                         {% set subCatId = subCat.categoryId %}
  659.                         {% set subCatPositionX = ((subCatCount * 5)-3) %}
  660.                         {% set subCatPositionZ = -19 %}
  661.                         {% if subCat.categoryName|length > 13 %}
  662.                             {% set labelFontSize = 0.4 %}
  663.                             {% set bgLength = 0.275 %}
  664.                         {% elseif subCat.categoryName|length > 22  %}
  665.                             {% set labelFontSize = 0.3 %}
  666.                             {% set bgLength = 0.2 %}
  667.                         {% else %}
  668.                             {% set labelFontSize = 0.6 %}
  669.                             {% set bgLength = 0.375 %}
  670.                         {% endif %}
  671.                         {% set subCatBgLength = (subCat.categoryName|length * bgLength) %}
  672.                         {% if subCatYPosition is defined %}
  673.                             {% set subCatYPosition = subCatYPosition + 1 %}
  674.                         {% else %}
  675.                             {% set subCatYPosition = 4 %}
  676.                         {% endif %}
  677.                         
  678.                         <viewpoint orientation='0 1 0 1.6' position='7 1.7 -{{ (productPositionZ + 1.3) }}' id='category_viewpoint_{{ subCatId }}'></viewpoint>
  679.                         <!-- subcategory label background -->
  680.                         <Transform translation='0 {{ (subCatYPosition + 0.2) }} -{{ (productPositionZ + 3) }}' rotation='0 1 0 1.54'>
  681.                             <shape onclick="changeViewpoint('category_viewpoint_{{ subCatId }}')">
  682.                                 <appearance>
  683.                                     <material diffuseColor='0.2 0.2 0.2'></material>
  684.                                 </appearance>
  685.                                 <box size='{{ subCatBgLength }},0.7,0.01'></box>
  686.                             </shape>
  687.                         </Transform>
  688.                         <!-- subcategory label -->
  689.                         <Transform translation='0.1 {{ (subCatYPosition - 0.05) }} -{{ (productPositionZ + 1) }}' rotation='0 1 0 1.54'>
  690.                             <shape onclick="changeViewpoint('category_viewpoint_{{ subCatId }}')">
  691.                                 <appearance>
  692.                                     <material diffuseColor='1 1 1' specularColor='1 1 1'></material>
  693.                                 </appearance>
  694.                                 <text string='{{ subCat.categoryName }}::QQW2::{{ preProductPositionZ }}:{{ productPositionZ }}' solid='false'>
  695.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="{{ labelFontSize }}"></fontstyle>
  696.                                 </text>
  697.                             </shape>
  698.                         </Transform>
  699.                         {% set productCount = 0 %}
  700.                         {% for product in categoryProducts[subCat.categoryId] %}
  701.                             {% set productCount = productCount + 1 %}
  702.                             {% set productPositionX = (productCount * 21) %}
  703.                             {% set productRowCount = 2 %}
  704.                             {% if productCount % productRowCount == 0 %}
  705.                                 {% set productPositionY = -1 %}
  706.                             {% else %}
  707.                                 {% set productPositionY = 1.2 %}
  708.                                 {% set productPositionZ = productPositionZ + 2 %}
  709.                             {% endif %}
  710.                             {% set isURL = false %}
  711.                             {% if 'http' in product.image1 %}
  712.                                 {% set imgPath = product.image1 %}
  713.                                 {% set imgSysPath = product.image1 %}
  714.                                 {% set isURL = true %}
  715.                             {% else %}
  716.                                 {% set imgPath = userDirs['web'] ~ '/images/' ~ product.image1 %}
  717.                                 {% set imgSysPath = userDirs['images'] ~ '/' ~ product.image1 %}
  718.                             {% endif %}
  719.                             {# we prepare the product box size#}
  720.                             {#                        @to_continue #}
  721.                             {% set thumbWidth = 120 %}
  722.                             {% set maxThumbHeight = 120 %}
  723.                             {# we load VAT #}
  724.                             {% set productVAT = null %}
  725.                             {% if product is defined and product.productVAT is defined and product.productVAT > 0 %}
  726.                                 {#    VAT is derived from productVAT #}
  727.                                 {% set productVAT = product.productVAT %}
  728.                             {% elseif eshop.preferredVAT is defined and eshop.preferredVAT > 0  %}
  729.                                 {#    VAT is derived from eshop VAT #}
  730.                                 {% set productVAT = eshop.preferredVAT %}
  731.                             {% endif %}
  732.                             {# we get price(s) to display #}
  733.                             {% set displayPrice = null %}
  734.                             {% set displayPriceVAT = null %}
  735.                             {% set defaultDisplayPrice = null %}
  736.                             {% set defaultDisplayPriceVAT = null %}
  737.                             {% for price in categoryProductPrices[subCat.categoryId()] %}
  738.                                 {% if price.productId == product.productId %}
  739.                                     {# we get price level according to logged contact-customer #}
  740.                                     {% if app.session.get('contact') is defined and app.session.get('contact').priceLevel.priceLevelId is defined and app.session.get('contact').priceLevel and price.priceLevelId == app.session.get('contact').priceLevel.priceLevelId %}
  741.                                         {# we get netto or brutto value according to e-shop configuration #}
  742.                                         {% if eshop.displayNettoPrices is defined and eshop.displayNettoPrices == true %}
  743.                                             {% set displayPrice = price.nettoValue|round(eshop.roundPrice, 'ceil') %}
  744.                                         {% else %}
  745.                                             {% set displayPrice = price.bruttoValue|round(eshop.roundPrice, 'ceil') %}
  746.                                         {% endif %}
  747.                                         {% if eshop.displayNettoPrices is defined and eshop.displayNettoPrices == true %}
  748.                                             {% set displayPrice = displayPrice + (displayPrice * (productVAT/100)) %}
  749.                                             {% set displayPriceVATLabel = 'product.price_with_VAT'|trans %}
  750.                                         {% else %}
  751.                                             {% set displayPrice = displayPrice - (displayPrice * (productVAT/100)) %}
  752.                                             {% set displayPriceVATLabel = 'product.price_without_VAT'|trans %}
  753.                                         {% endif %}
  754.                                     {% elseif price.priceLevelId == 1 %}
  755.                                         {# we get default price level #}
  756.                                         {# we get netto or brutto value according to e-shop configuration #}
  757.                                         {% if eshop.displayNettoPrices is defined and eshop.displayNettoPrices == true %}
  758.                                             {% set displayPrice = price.nettoValue|round(eshop.roundPrice, 'ceil') %}
  759.                                         {% else %}
  760.                                             {% set displayPrice = price.bruttoValue|round(eshop.roundPrice, 'ceil') %}
  761.                                         {% endif %}
  762.                                         {% if eshop.displayNettoPrices is defined and eshop.displayNettoPrices == true %}
  763.                                             {% set displayPrice = displayPrice + (displayPrice * (productVAT/100)) %}
  764.                                             {% set displayPriceVATLabel = 'product.price_with_VAT'|trans %}
  765.                                         {% else %}
  766.                                             {% set displayPrice = displayPrice - (displayPrice * (productVAT/100)) %}
  767.                                             {% set displayPriceVATLabel = 'product.price_without_VAT'|trans %}
  768.                                         {% endif %}
  769.                                     {% endif %}
  770.                                 {% endif %}
  771.                             {% endfor %}
  772.                             {% set displayPackPrice = null %}
  773.                             {% set displayPackPriceVAT = null %}
  774.                             {% set defaultDisplayPackPrice = null %}
  775.                             {% set defaultDisplayPackPriceVAT = null %}
  776.                             {% if isPackSaleModule %}
  777.                                 {% for price in categoryProductPrices[subCat.categoryId] %}
  778.                                     {% if price.productId == product.productId %}
  779.                                         {% if app.session.get('contact') is defined and app.session.get('contact').priceLevel is defined and price.priceLevelId == app.session.get('contact').priceLevel.priceLevelId %}
  780.                                             {# we get netto or brutto value according to e-shop configuration #}
  781.                                             {% if eshop.displayNettoPrices is defined and eshop.displayNettoPrices %}
  782.                                                 {% set displayPackPrice = price.nettoValue|round(eshop.roundPrice, 'ceil') %}
  783.                                             {% else %}
  784.                                                 {% set displayPackPrice = price.bruttoValue|round(eshop.roundPrice, 'ceil') %}
  785.                                             {% endif %}
  786.                                             {% if eshop.displayNettoPrices is defined and eshop.displayNettoPrices %}
  787.                                                 {% set displayPackPriceVAT = displayPrice + (displayPrice * (productVAT/100)) %}
  788.                                                 {% set displayPriceVATLabel = 'product.price_with_VAT'|trans %}
  789.                                             {% else %}
  790.                                                 {% set displayPackPriceVAT = displayPrice - (displayPrice * (productVAT/100)) %}
  791.                                                 {% set displayPriceVATLabel = 'product.price_without_VAT'|trans %}
  792.                                             {% endif %}
  793.                                         {% elseif price.priceLevelId == 1 %}
  794.                                             {# we get default price level#}
  795.                                             {% if eshop.displayNettoPrices is defined and eshop.displayNettoPrices %}
  796.                                                 {% set displayPackPrice = price.nettoValue|round(eshop.roundPrice, 'ceil') %}
  797.                                             {% else %}
  798.                                                 {% set displayPackPrice = price.bruttoValue|round(eshop.roundPrice, 'ceil') %}
  799.                                             {% endif %}
  800.                                             {% if eshop.displayNettoPrices is defined and eshop.displayNettoPrices %}
  801.                                                 {% set displayPackPriceVAT = displayPrice + (displayPrice * (productVAT/100)) %}
  802.                                                 {% set displayPriceVATLabel = 'product.price_with_VAT'|trans %}
  803.                                             {% else %}
  804.                                                 {% set displayPackPriceVAT = displayPrice - (displayPrice * (productVAT/100)) %}
  805.                                                 {% set displayPriceVATLabel = 'product.price_without_VAT'|trans %}
  806.                                             {% endif %}
  807.                                         {% endif %}
  808.                                     {% endif %}
  809.                                 {% endfor %}
  810.                             {% endif %}
  811.                             {% set maxLength = 20 %}
  812.                             {% if product.productName|length > maxLength %}
  813.                                 {% set productName = product.productName|slice(0, maxLength) ~ ".." %}
  814.                             {% else %}
  815.                                 {% set productName = product.productName %}
  816.                             {% endif %}
  817.                             {% if productName|length > 11 %}
  818.                                 {% set productLabelFontSize = 0.15 %}
  819.                             {% elseif productName|length > 20  %}
  820.                                 {% set productLabelFontSize = 0.07 %}
  821.                             {% elseif productName|length > 50  %}
  822.                                 {% set productLabelFontSize = 0.05 %}
  823.                             {% else %}
  824.                                 {% set productLabelFontSize = 0.25 %}
  825.                             {% endif %}
  826.                             {% if displayPrice|length > 3 %}
  827.                                 {% set priceLabelFontSize = 0.15 %}
  828.                             {% elseif displayPrice|length > 10  %}
  829.                                 {% set priceLabelFontSize = 0.10 %}
  830.                             {% else %}
  831.                                 {% set priceLabelFontSize = 0.25 %}
  832.                             {% endif %}
  833.                     <!-- product viewpoint -->
  834.                     <viewpoint orientation='0 1 0 1.6' position='6.0 1.25 -{{ productPositionZ }}'  id='product_viewpoint_{{ product.productId }}'></viewpoint>
  835.                 
  836.                     <!-- product box -->
  837.                     <Transform translation='0 {{ (productPositionY + 1.25) }} -{{ productPositionZ }}'>
  838.                         <shape onclick="changeViewpoint('product_viewpoint_{{ product.productId }}')">
  839.                             <Appearance>
  840.                               <Material diffuseColor='0 0 0' emissiveColor='0 0 0' transparency='0.5'></Material>
  841.                               <ImageTexture url='{{ imgPath }}'></ImageTexture>
  842.                             </Appearance>
  843.                             <Box size='{{ (thumbWidth/100)|number_format }} {{ (thumbHeight/100)|number_format }} {{ (thumbWidth/100) }}'/>
  844.                           </Shape>
  845.                     </Transform>
  846.                     <!-- product name -->
  847.                     <Transform translation='0.8 {{ (productPositionY + 0.4) }} -{{ (productPositionZ - 0.78) }}' rotation='0 1 0 1.54'>
  848.                             <shape onclick="getProductDetail('{{ eshop.eshopId }}','{{ product.productId }}')">
  849.                                 <appearance>
  850.                                     <material specularColor='0 1 0'></material>
  851.                                 </appearance>
  852.                                 <text string='{{ productName }}' solid='false'>
  853.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="{{ productLabelFontSize }}"></fontstyle>
  854.                                 </text>
  855.                             </shape>
  856.                            </Transform>    
  857.                     <!-- more info button -->
  858.                     <Transform translation='0 {{ (productPositionY + 2.25) }} -{{ (productPositionZ - 0.55) }}'>
  859.                       <Shape onclick="getProductDetail('{{ eshop.eshopId }}','{{ product.productId }}')">
  860.                         <Appearance>
  861.                            <Material diffuseColor='0 0 0' emissiveColor='0 0 0'></Material>
  862.                            <ImageTexture url='{{ textureArray['info-texture-1'] }}'></ImageTexture>
  863.                                <TextureTransform scale='1 1'></TextureTransform>
  864.                         </Appearance>
  865.                         <Box size='0.5 0.5 0.5'/>
  866.                       </Shape>
  867.                     </Transform>                    
  868.                     <!-- price label - right -->
  869.                     <Transform translation='0.3 {{ (productPositionY + 2.25) }} -{{ (productPositionZ - 0.25) }}' rotation='0 1 0 1.6'>
  870.                             <shape>
  871.                                 <appearance>
  872.                                     <material diffuseColor='0 0 0' specularColor='0 0 0'></material>
  873.                                 </appearance>
  874.                                 <text string='{{ displayPrice }}' solid='false'>
  875.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="{{ (priceLabelFontSize) }}"></fontstyle>
  876.                                 </text>
  877.                             </shape>
  878.                             </Transform>    
  879.                     <Transform translation='0.3 {{ (productPositionY + 2.1) }} -{{ (productPositionZ - 0.15) }}' rotation='0 1 0 1.6'>
  880.                             <shape>
  881.                                 <appearance>
  882.                                     <material diffuseColor='0 0 0' specularColor='0 0 0'></material>
  883.                                 </appearance>
  884.                                 <text string='{{ app.session.get('eshopCurrency').currencyKey }}' solid='false'>
  885.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="0.15"></fontstyle>
  886.                                 </text>
  887.                             </shape>
  888.                     </Transform>
  889.                     <!-- price label - left -->
  890.                      <Transform translation='-0.3 {{ (productPositionY + 2.25) }} -{{ (productPositionZ + 0.25) }}' rotation='0 1 0 -1.6'>
  891.                             <shape>
  892.                                 <appearance>
  893.                                     <material diffuseColor='0 0 0' specularColor='0 0 0'></material>
  894.                                 </appearance>
  895.                                 <text string='{{ displayPrice }}' solid='false'>
  896.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="{{ (priceLabelFontSize) }}"></fontstyle>
  897.                                 </text>
  898.                             </shape>
  899.                             </Transform>
  900.                         <Transform translation='-0.3 {{ (productPositionY + 2.1) }} -{{ (productPositionZ + 0.15) }}' rotation='0 1 0 -1.6'>
  901.                             <shape>
  902.                                 <appearance>
  903.                                     <material diffuseColor='0 0 0' specularColor='0 0 0'></material>
  904.                                 </appearance>
  905.                                 <text string='{{ app.session.get('eshopCurrency').currencyKey }}' solid='false'>
  906.                                     <fontstyle family="TYPEWRITER" style="BOLDITALIC" size="0.15"></fontstyle>
  907.                                 </text>
  908.                             </shape>
  909.                             </Transform>                                            
  910.                         
  911.                     <Transform translation='0 {{ (productPositionY + 2.25) }} -{{ (productPositionZ) }}'>
  912.                       <Shape>
  913.                         <Appearance>
  914.                           <Material diffuseColor='1 1 1' emissiveColor='1 1 1'></Material>
  915.                         </Appearance>
  916.                         <Box size='0.5 0.5 0.5'/>
  917.                       </Shape>
  918.                     </Transform>
  919.                     
  920.                     <!-- add to basket button -->
  921.                     <Transform translation='0 {{ (productPositionY + 2.25) }} -{{ (productPositionZ + 0.55) }}'>
  922.                       <Shape onclick="addBasket('{{ eshop.eshopId }}','{{ product.productId }}',1, {{ displayPrice }})">
  923.                         <Appearance>
  924.                           <Material diffuseColor='0 1 0'></Material>
  925.                           <ImageTexture url='{{ textureArray['cart-texture-1'] }}'></ImageTexture>
  926.                               <TextureTransform scale='1 1'></TextureTransform>
  927.                         </Appearance>
  928.                         <Box size='0.5 0.5 0.5'/>
  929.                       </Shape>
  930.                     </Transform>
  931.                     {% if productCount is divisible by(productRowCount) %}
  932.                         <!-- product shelf - bottom -->
  933.                         <Transform translation='0 -0.57 -{{ productPositionZ }}'>
  934.                           <Shape onclick="getProductDetail('{{ eshop.eshopId }}','{{ product.productId }}')">
  935.                             <Appearance>
  936.                               <Material diffuseColor='0 0 0' emissiveColor='0 0 0'></Material>
  937.                             </Appearance>
  938.                             <Box size='1.6 0.2 1.6'/>
  939.                           </Shape>
  940.                         </Transform>
  941.                         <Transform translation='0 -1.2 -{{ productPositionZ }}'>
  942.                           <Shape>
  943.                             <Appearance>
  944.                               <Material diffuseColor='0.1 0.1 0.1' emissiveColor='0.1 0.1 0.1' transparency='0.4'></Material>
  945.                             </Appearance>
  946.                             <Box size='1.3 {{ (thumbHeight/100)|number_format }} 1.3'/>
  947.                           </Shape>
  948.                         </Transform>
  949.                   {% else %}
  950.                     <!-- product shelf - top -->
  951.                     <Transform translation='0 1.63 -{{ productPositionZ }}'>
  952.                       <Shape onclick="getProductDetail('{{ eshop.eshopId }}','{{ product.productId }}')">
  953.                         <Appearance>
  954.                           <Material diffuseColor='0 0 0' emissiveColor='0 0 0'></Material>
  955.                         </Appearance>
  956.                         <Box size='1.6 0.2 1.6'/>
  957.                       </Shape>
  958.                     </Transform>                    
  959.                     <Transform translation='0 1.63 -{{ productPositionZ }}'>
  960.                       <Shape>
  961.                         <Appearance>
  962.                           <Material diffuseColor='0.1 0.1 0.1' emissiveColor='0.1 0.1 0.1' transparency='0.4'></Material>
  963.                         </Appearance>
  964.                         <Box size='1.3 0.21 1.3'/>
  965.                       </Shape>
  966.                     </Transform>
  967.                   {% endif %}
  968.                     {% endfor %}
  969.                 {% endfor %}
  970.                 </Transform>
  971.             </Transform>
  972.           {% endfor %}
  973.             
  974.             <!-- Free Worlds -->
  975.             {% if eshop3D is defined and eshop3D.freeWorlds is defined %}
  976.                 {% for freeWorld in eshop3D.freeWorlds %}
  977.                 <Transform translation='{{ freeWorld.preferredPosition }}' rotation='{{ freeWorld.preferredRotation }}' scale='{{ freeWorld.preferredScale }}'>
  978.                   
  979.                       <Inline url='"{{ freeWorld.xmlFile }}"' >
  980.                     </Inline>
  981.                 </Transform>
  982.                 {% endfor %}
  983.             {% endif %}
  984.             <!-- Tour -->
  985.             {% set tourPeriod = 1/(tourArray|length)  %}
  986.             {% set tourCurrentKey = 0  %}
  987.             {% set tourKey = ''  %}
  988.             {% set tourKeyValue = ''  %}
  989.             {% set tourCount = 0  %}
  990.             {% set tourFirstKeyValue = ''  %}
  991.             {% for tourViewpoint in tourArray %}
  992. {#                <HR>tourViewpoint: {{ dump(tourViewpoint) }}#}
  993.                 {% set tourKey = tourKey ~ ' ' ~  tourCurrentKey|trans %}
  994.                 {% set tourCurrentKey = tourCurrentKey + tourPeriod %}
  995.                 {% set tourKeyValue = tourKeyValue ~ ' ' ~ tourViewpoint["x"]|trans ~ ' ' ~ tourViewpoint["y"]|trans ~ ' ' ~ tourViewpoint["z"]|trans %}
  996.                 {% if tourCount == 0 %}
  997.                     {% set tourFirstKeyValue = tourViewpoint["x"]|trans ~ ' ' ~ tourViewpoint["y"]|trans ~ ' ' ~ tourViewpoint["z"]|trans %}
  998.                 {% endif %}
  999.                 {% set tourCount = tourCount + 1 %}
  1000.             {% endfor %}
  1001.             {% set tourKey =  tourKey ~ ' 1' %}
  1002.             {% set tourKeyValue =  tourKeyValue ~ ' ' ~ tourFirstKeyValue %}
  1003.             <!-- <PositionInterpolator DEF='UserTranslation1' key='0 0.3 0.5 0.8 1.0' keyValue='-12 0 0 -2 0 20 12 0 -20 12 0 0 -12 0 0'/></PositionInterpolator> -->
  1004.             <PositionInterpolator DEF='UserTranslation1' key='{{ tourKey }}' keyValue='{{ tourKeyValue }}'></PositionInterpolator>
  1005.                 <!-- floor -->
  1006.                 <Shape>
  1007.                   <Appearance>
  1008.                     <Material ambientIntensity='0.1'/></Material>
  1009.                     <ImageTexture url='{{ textureArray['floor-texture-1'] }}'></ImageTexture>
  1010.                     <TextureTransform scale='15 15'></TextureTransform>
  1011.                   </Appearance>
  1012.                   <IndexedFaceSet solid='false' coordIndex='0 1 2 3 -1'>
  1013.                     <Coordinate point='-{{ (shopWidth/2)|round(2, 'ceil') }} 0 15.3 {{ (shopWidth/2)|round(2, 'ceil') }} 0 15.3 {{ (shopWidth/2)|round(2, 'ceil') }} 0 -70 -{{ (shopWidth/2)|round(2, 'ceil') }} 0 -70'/>
  1014.                   </IndexedFaceSet>
  1015.                 </Shape>
  1016.                 
  1017.                 <!-- ceil -->
  1018. <!--                 <Shape>
  1019.                   <Appearance>
  1020.                     <Material ambientIntensity='0.1' diffuseColor='0 0 0' specularColor='0 0 0' transparency='0.8'></Material>
  1021.                   </Appearance>
  1022.                   <IndexedFaceSet solid='false' coordIndex='0 1 2 3 -1'>
  1023.                     <Coordinate point='<?= -(round($shopWidth/2)) ?> 8.9 15.3 <?= (round($shopWidth/2)) ?> 8.9 15.3 <?= (round($shopWidth/2)) ?> 8.9 -70 <?= -(round($shopWidth/2)) ?> 8.9 -70'/>
  1024.                   </IndexedFaceSet>
  1025.                 </Shape> -->
  1026.                 
  1027.                 <!-- back wall - top -->
  1028.                 <Transform translation='0 8.4 15.3'>
  1029.                   <Shape>
  1030.                     <Appearance>
  1031.                       <Material ambientIntensity='0.1'></Material>
  1032.                       <ImageTexture url='{{ textureArray['wall-texture-1'] }}'></ImageTexture>
  1033.                       <TextureTransform scale='15 0.7'></TextureTransform>
  1034.                     </Appearance>
  1035.                     <Box size='{{ shopWidth }} 2.2 0.4'/>
  1036.                   </Shape>
  1037.                 </Transform>    
  1038.                 <!-- back floor rim -->
  1039.                 <Transform translation='0.0 0.0 15.3'>
  1040.                   <Shape>
  1041.                     <Appearance>
  1042.                       <Material ambientIntensity='0.1' diffuseColor='0 0 0' specularColor='0 0 0' transparency='0.3'></Material>
  1043.                     </Appearance>
  1044.                     <Box size='{{ (shopWidth + 2) }} 0.4 2.2'/>
  1045.                   </Shape>
  1046.                 </Transform>            
  1047.                 
  1048.                 <!-- front wall - top -->
  1049.                 <Transform translation='0 8.4 -69.8'>
  1050.                   <Shape>
  1051.                     <Appearance>
  1052.                       <Material ambientIntensity='0.1'></Material>
  1053.                       <ImageTexture url='{{ textureArray['wall-texture-1'] }}'></ImageTexture>
  1054.                       <TextureTransform scale='15 0.7'></TextureTransform>
  1055.                     </Appearance>
  1056.                     <Box size='{{ shopWidth }} 2.2 0.4'/>
  1057.                   </Shape>
  1058.                 </Transform>
  1059.                 <!-- front floor rim -->
  1060.                 <Transform translation='0.0 0.0 -69.8'>
  1061.                   <Shape>
  1062.                     <Appearance>
  1063.                       <Material ambientIntensity='0.1' diffuseColor='0 0 0' specularColor='0 0 0' transparency='0.3'></Material>
  1064.                     </Appearance>
  1065.                     <Box size='{{ (shopWidth + 2) }} 0.4 2.2'/>
  1066.                   </Shape>
  1067.                 </Transform>
  1068.                 
  1069.                 <!-- front left column -->
  1070.                 <Transform translation='-{{ (shopWidth/2)|round(2, 'ceil') }} 4.6 -69.8'>
  1071.                   <Shape>
  1072.                     <Appearance>
  1073.                       <Material ambientIntensity='0.1'></Material>
  1074.                       <ImageTexture url='{{ textureArray['wall-texture-1'] }}'></ImageTexture>
  1075.                       <TextureTransform scale='0.5 2'/>
  1076.                     </Appearance>
  1077.                     <Box size='1.5 9.2 1.5'/>
  1078.                   </Shape>
  1079.                 </Transform>
  1080.                 <!-- middle left column -->
  1081.                 <Transform translation='-{{ (shopWidth/2)|round(2, 'ceil') }} 4.6 -25.8'>
  1082.                   <Shape>
  1083.                     <Appearance>
  1084.                       <Material ambientIntensity='0.1'></Material>
  1085.                       <ImageTexture url='{{ textureArray['wall-texture-1'] }}'></ImageTexture>
  1086.                       <TextureTransform scale='0.5 2'/>
  1087.                     </Appearance>
  1088.                     <Box size='1.5 9.2 1.5'/>
  1089.                   </Shape>
  1090.                 </Transform>
  1091.                 <!-- back left column -->
  1092.                 <Transform translation='-{{ (shopWidth/2)|round(2, 'ceil') }} 4.6 15.3'>
  1093.                   <Shape>
  1094.                     <Appearance>
  1095.                       <Material ambientIntensity='0.1'></Material>
  1096.                       <ImageTexture url='{{ textureArray['wall-texture-1'] }}'></ImageTexture>
  1097.                       <TextureTransform scale='0.5 2'/>
  1098.                     </Appearance>
  1099.                     <Box size='1.5 9.2 1.5'/>
  1100.                   </Shape>
  1101.                 </Transform>
  1102.             
  1103.                 <!-- front right column -->
  1104.                 <Transform translation='{{ (shopWidth/2)|round(2, 'ceil') }} 4.6 -69.8'>
  1105.                   <Shape>
  1106.                     <Appearance>
  1107.                       <Material ambientIntensity='0.1'></Material>
  1108.                       <ImageTexture url='{{ textureArray['wall-texture-1'] }}'></ImageTexture>
  1109.                       <TextureTransform scale='0.5 2'/>
  1110.                     </Appearance>
  1111.                     <Box size='1.5 9.2 1.5'/>
  1112.                   </Shape>
  1113.                 </Transform>
  1114.                 <!-- middle right column -->
  1115.                 <Transform translation='{{ (shopWidth/2)|round(2, 'ceil') }} 4.6 -25.8'>
  1116.                   <Shape>
  1117.                     <Appearance>
  1118.                       <Material ambientIntensity='0.1'></Material>
  1119.                       <ImageTexture url='{{ textureArray['wall-texture-1'] }}'></ImageTexture>
  1120.                       <TextureTransform scale='0.5 2'/>
  1121.                     </Appearance>
  1122.                     <Box size='1.5 9.2 1.5'/>
  1123.                   </Shape>
  1124.                 </Transform>
  1125.                 <!-- back right column -->
  1126.                 <Transform translation='{{ (shopWidth/2)|round(2, 'ceil') }} 4.6 15.3'>
  1127.                   <Shape>
  1128.                     <Appearance>
  1129.                       <Material ambientIntensity='0.1'></Material>
  1130.                       <ImageTexture url='{{ textureArray['wall-texture-1'] }}'></ImageTexture>
  1131.                       <TextureTransform scale='0.5 2'/>
  1132.                     </Appearance>
  1133.                     <Box size='1.5 9.2 1.5'/>
  1134.                   </Shape>
  1135.                 </Transform>                
  1136.                 <!-- left panel below ceiling -->
  1137.                 <Transform translation='-{{ (shopWidth/2)|round(2, 'ceil') }} 8.4 -27.2'>
  1138.                   <Shape>
  1139.                     <Appearance>
  1140.                       <Material ambientIntensity='0.1'></Material>
  1141.                       <ImageTexture url='{{ textureArray['wall-texture-1'] }}'></ImageTexture>
  1142.                       <TextureTransform scale='15 0.7'></TextureTransform>
  1143.                     </Appearance>
  1144.                     <Box size='0.4 2.2 85'/>
  1145.                   </Shape>
  1146.                 </Transform>
  1147.                 <!-- right panel below ceiling -->
  1148.                 <Transform translation='{{ (shopWidth/2)|round(2, 'ceil') }} 8.4 -27.2'>
  1149.                   <Shape>
  1150.                     <Appearance>
  1151.                       <Material ambientIntensity='0.1'></Material>
  1152.                       <ImageTexture url='{{ textureArray['wall-texture-1'] }}'></ImageTexture>
  1153.                       <TextureTransform scale='15 0.7'></TextureTransform>
  1154.                     </Appearance>
  1155.                     <Box size='0.4 2.2 85'/>
  1156.                   </Shape>
  1157.                 </Transform>
  1158.                 <!-- left floor rim -->
  1159.                 <Transform translation='-{{ (shopWidth/2)|round(2, 'ceil') }} 0.0 -27.2'>
  1160.                   <Shape>
  1161.                     <Appearance>
  1162.                       <Material ambientIntensity='0.1' diffuseColor='0 0 0' specularColor='0 0 0' transparency='0.3'></Material>
  1163.                     </Appearance>
  1164.                     <Box size='2.2 0.4 87'/>
  1165.                   </Shape>
  1166.                 </Transform>    
  1167.                 <!-- right floor rim -->
  1168.                 <Transform translation='{{ (shopWidth/2)|round(2, 'ceil') }} 0.0 -27.2'>
  1169.                   <Shape>
  1170.                     <Appearance>
  1171.                       <Material ambientIntensity='0.1' diffuseColor='0 0 0' specularColor='0 0 0' transparency='0.3'></Material>
  1172.                     </Appearance>
  1173.                     <Box size='2.2 0.4 87'/>
  1174.                   </Shape>
  1175.                 </Transform>
  1176.               </Transform>
  1177.             
  1178.                   <Route fromNode="CLOCK" fromField ="fraction_changed" toNode="UserTranslation1" toField="set_fraction"> </Route> 
  1179.                 <Route fromNode="UserTranslation1" fromField ="value_changed" toNode="TourAvatarWrapper" toField="translation"> </Route>
  1180.         </scene>
  1181.       </x3d>
  1182.     </div>
  1183.     <script>
  1184.         //we setup full screen 3d canvas
  1185.         //var buttonFullscreen = document.getElementById("button_fullscreen");
  1186.             //buttonFullscreen.click(); // this will trigger the click event
  1187.             //$( document ).ready(function() {
  1188.             //console.log( "ready!" );
  1189.             //document.getElementById("button_fullscreen").click(); 
  1190.         //});
  1191.     </script>
  1192. {% endblock %}