Skip to content

Commit

Permalink
postponing refreshObjects for a single frame..
Browse files Browse the repository at this point in the history
  • Loading branch information
poeticAndroid committed Jul 15, 2021
1 parent d630a6b commit f0e9bb1
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 119 deletions.
6 changes: 3 additions & 3 deletions dist/a-game.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module.exports={
"name": "a-game",
"title": "A-Game",
"version": "0.17.2",
"version": "0.17.3",
"description": "game components for A-Frame",
"homepage": "https://github.com/poeticAndroid/a-game/blob/master/README.md",
"main": "index.js",
Expand Down Expand Up @@ -31,7 +31,7 @@ module.exports={
"devDependencies": {
"browserify": "^17.0.0",
"foreach-cli": "^1.8.1",
"minify": "^7.0.1",
"minify": "^7.0.2",
"pre-commit": "^1.2.2",
"watchify": "^4.0.0"
}
Expand Down Expand Up @@ -2433,7 +2433,7 @@ AFRAME.registerComponent("trigger", {
},

tick() {
if (!this.objects) this.refreshObjects()
if (!this.objects) return this.refreshObjects()
let local = THREE.Vector3.temp()
let width = parseFloat(this.el.getAttribute("width") || 1)
let height = parseFloat(this.el.getAttribute("height") || 1)
Expand Down
2 changes: 1 addition & 1 deletion dist/a-game.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/scenes/ballmachine.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<a-main position="0 -1 0">
<a-sky color="lightblue"></a-sky>
<a-box trigger onevent__trigger="entity:a-main; property:include; value:./scenes/demo.html;" position="0 -2 0"
width="1024" depth="1024" visible="false"></a-box>
<a-box start floor position="0 0 0" color="#696" width="16" depth="8" height="0.125"></a-box>
<a-box floor position="0 0 -16" color="#696" width="16" depth="8" height="0.125"></a-box>
<a-box floor position="8 0 -8" color="#696" width="8" depth="16" height="0.125"></a-box>
Expand Down
2 changes: 2 additions & 0 deletions dist/scenes/chairs.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<a-main>
<a-sky color="#ECECEC"></a-sky>
<a-box trigger onevent__trigger="entity:a-main; property:include; value:./scenes/demo.html;" position="0 -2 0"
width="1024" depth="1024" visible="false"></a-box>
<a-box start floor rotation="-90 0 0" width="40" height="40" depth="0.125" color="#7BC8A4"></a-box>
<a-entity include="models/chair.html" position="0 9 -4" scale="0.5 0.5 0.5"></a-entity>
<a-entity include="models/chair.html" position="0 6 -4" rotation="180 0 0"></a-entity>
Expand Down
7 changes: 7 additions & 0 deletions dist/scenes/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@
<a-box button onstate__pressed="property:color; off:green; on:lime;" scale="0.125 0.125 0.125" position="4 1 -4">
</a-box>
</a-entity>
<a-box floor src="#woodImg" position="-20 0 -4" width="8" depth="8" height="0.5"></a-box>
<a-cylinder trigger onevent__trigger="entity:a-main; property:include; value:./scenes/ballmachine.html;"
position="-18 1 -7" height="2" radius="0.5" material="opacity:0.5"></a-cylinder>
<a-cylinder trigger onevent__trigger="entity:a-main; property:include; value:./scenes/chairs.html;"
position="-20 1 -7" height="2" radius="0.5" material="opacity:0.5"></a-cylinder>
<a-cylinder trigger onevent__trigger="entity:a-main; property:include; value:./scenes/ragdoll.html;"
position="-22 1 -7" height="2" radius="0.5" material="opacity:0.5"></a-cylinder>
<a-box floor src="#granite" position="-8 0 0" scale="2 1 2" body="type:kinematic;"
animation="dur: 20000; property: position; to: -16 0 0; dir: alternate; loop:true;"></a-box>
<a-box floor src="#granite" position="8 -2 0" scale="2 1 2" body="type:kinematic;"
Expand Down
2 changes: 2 additions & 0 deletions dist/scenes/hello.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<a-main>
<a-box trigger onevent__trigger="entity:a-main; property:include; value:./scenes/demo.html;" position="0 -2 0"
width="1024" depth="1024" visible="false"></a-box>
<a-box body="type:dynamic" position="-1 2.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
<a-sphere body="type:dynamic" position="0 2.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
<a-cylinder body="type:dynamic" position="1 2.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
Expand Down
2 changes: 2 additions & 0 deletions dist/scenes/ragdoll.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<a-main>
<a-sky color="lightblue"></a-sky>
<a-box trigger onevent__trigger="entity:a-main; property:include; value:./scenes/demo.html;" position="0 -2 0"
width="1024" depth="1024" visible="false"></a-box>
<a-box start floor position="0 -1.25 0" rotation="-90 0 0" width="16" height="16" depth="0.125" color="#7BC8A4">
</a-box>

Expand Down
Loading

0 comments on commit f0e9bb1

Please sign in to comment.