Skip to content

Commit

Permalink
removed fps: 1 for performance reasons; added workaround to load titl…
Browse files Browse the repository at this point in the history
…e and nav for field painter
  • Loading branch information
weddingdj committed Aug 22, 2019
1 parent 1dfe1d6 commit 1d7e7e5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class="post-title"
geometry="primitive: plane; width: 2"
position="{{ $position['x'] }} 0 {{ $position['z'] }}"
rotation="0 -90 0"
material="shader: html; fps: 1; side: double; target: #post-title-texture-{{ $blog_post['post-title-north']['#content-id'] }}; transparent: true; ratio: width">
material="shader: html; target: #post-title-texture-{{ $blog_post['post-title-north']['#content-id'] }}; transparent: true; ratio: width">
@if ($post_counter > 0)
<a-entity
id="navigation-arrow-up-{{ $blog_post['post-title-north']['#content-id'] }}"
Expand All @@ -14,7 +14,7 @@ class="navigation-arrow-up collidable"
geometry="primitive: plane; width: 1; height: 1"
position="-1.15 0 -0.001"
rotation="0 0 0"
material="shader: html; fps: 1; side: double; target: #navigation-arrow-up-texture; transparent: true; ratio: width">
material="shader: html; target: #navigation-arrow-up-texture; transparent: true; ratio: width">
</a-entity>
@else
<a-entity
Expand All @@ -23,7 +23,7 @@ class="navigation-arrow-up"
geometry="primitive: plane; width: 1; height: 1"
position="-1.15 0 -0.001"
rotation="0 0 0"
material="shader: html; fps: 1; side: double; target: #navigation-arrow-up-inactive-texture; transparent: true; ratio: width">
material="shader: html; target: #navigation-arrow-up-inactive-texture; transparent: true; ratio: width">
</a-entity>
@endif
@if ((count($content['blog-posts']) - 1) > $post_counter)
Expand All @@ -34,7 +34,7 @@ class="navigation-arrow-down collidable"
geometry="primitive: plane; width: 1; height: 1"
position="1.15 0 -0.001"
rotation="0 0 0"
material="shader: html; fps: 1; side: double; target: #navigation-arrow-down-texture; transparent: true; ratio: width">
material="shader: html; target: #navigation-arrow-down-texture; transparent: true; ratio: width">
</a-entity>
@else
<a-entity
Expand All @@ -43,7 +43,7 @@ class="navigation-arrow-down"
geometry="primitive: plane; width: 1; height: 1"
position="1.15 0 -0.001"
rotation="0 0 0"
material="shader: html; fps: 1; side: double; target: #navigation-arrow-down-inactive-texture; transparent: true; ratio: width">
material="shader: html; target: #navigation-arrow-down-inactive-texture; transparent: true; ratio: width">
</a-entity>
@endif
</a-entity>
Expand Down
22 changes: 17 additions & 5 deletions themes/ideaspace-compass-blog/views/scene-painter.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class="blog-post-rotate collidable"
position="1.5 -1 -0.5"
rotation="-30 -90 0"
geometry="primitive: plane; width: 0.5"
material="shader: html; side: double; target: #blog-post-rotate-left-texture; transparent: true; ratio: width">
material="shader: html; target: #blog-post-rotate-left-texture; transparent: true; ratio: width">
</a-entity>
<a-entity
id="blog-post-rotate-right"
Expand All @@ -237,7 +237,7 @@ class="blog-post-rotate collidable"
position="1.5 -1 0.5"
rotation="-30 -90 0"
geometry="primitive: plane; width: 0.5"
material="shader: html; side: double; target: #blog-post-rotate-right-texture; transparent: true; ratio: width">
material="shader: html; target: #blog-post-rotate-right-texture; transparent: true; ratio: width">
</a-entity>
@if (isset($content['general-settings'][0]['blog-icon']) || isset($content['general-settings'][0]['blog-about']))
<a-entity
Expand All @@ -247,7 +247,7 @@ class="collidable"
position="1.5 -1 0"
rotation="-30 -90 0"
geometry="primitive: plane; width: 0.5"
material="shader: html; side: double; target: #about-link-texture; transparent: true; ratio: width">
material="shader: html; target: #about-link-texture; transparent: true; ratio: width">
</a-entity>
<a-rounded
id="about-wrapper"
Expand All @@ -269,7 +269,7 @@ class="collidable"
id="about"
geometry="primitive: plane; width: 2.8"
position="0 0 0.001"
material="shader: html; side: double; target: #about-texture; transparent: true; ratio: width">
material="shader: html; target: #about-texture; transparent: true; ratio: width">
</a-entity>
</a-rounded>
@endif
Expand All @@ -281,7 +281,7 @@ class="collidable"
position="1.5 -1.25 0"
rotation="-30 -90 0"
geometry="primitive: plane; width: 1.2"
material="shader: html; side: double; target: #ideaspacevr-texture; transparent: true; ratio: width">
material="shader: html; target: #ideaspacevr-texture; transparent: true; ratio: width">
</a-entity>

</a-entity>
Expand Down Expand Up @@ -427,6 +427,18 @@ class="collidable"
for (var j = 0; j < rotate_elems.length; j++) {
rotate_elems[j].components.material.shader.__render();
}
var title = document.querySelectorAll('.post-title');
for (var j = 0; j < title.length; j++) {
title[j].components.material.shader.__render();
}
var nav_arrow_up = document.querySelectorAll('.navigation-arrow-up');
for (var j = 0; j < nav_arrow_up.length; j++) {
nav_arrow_up[j].components.material.shader.__render();
}
var nav_arrow_down = document.querySelectorAll('.navigation-arrow-down');
for (var j = 0; j < nav_arrow_down.length; j++) {
nav_arrow_down[j].components.material.shader.__render();
}
var about_elem = document.querySelector('#about-link');
about_elem.components.material.shader.__render();
var about_elem2 = document.querySelector('#about');
Expand Down

0 comments on commit 1d7e7e5

Please sign in to comment.