Skip to content

Commit

Permalink
change _hidden to visible
Browse files Browse the repository at this point in the history
  • Loading branch information
guycalledfrank committed Jun 8, 2016
1 parent 4b5c0f6 commit 69fb2fe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/framework/components/particle-system/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ pc.extend(pc, function() {

if (!this.data.autoPlay) {
this.pause();
this.emitter.meshInstance._hidden = true;
this.emitter.meshInstance.visible = false;
}
}

Expand Down Expand Up @@ -562,7 +562,7 @@ pc.extend(pc, function() {
play: function() {
this.data.paused = false;
if (this.emitter) {
this.emitter.meshInstance._hidden = false;
this.emitter.meshInstance.visible = true;
this.emitter.loop = this.data.loop;
this.emitter.resetTime();
}
Expand Down
2 changes: 1 addition & 1 deletion src/framework/components/particle-system/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ pc.extend(pc, function() {

if (data.enabled && entity.enabled) {
var emitter = data.model.emitter;
if (emitter.meshInstance._hidden) continue;
if (!emitter.meshInstance.visible) continue;

if (!data.paused) {

Expand Down
2 changes: 1 addition & 1 deletion src/scene/forward-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ pc.extend(pc, function () {
visible = true;
meshPos = null;
if (!drawCall.command) {
if (!drawCall.visible) continue; // use hidden property to quickly hide/show meshInstances
if (!drawCall.visible) continue; // use visible property to quickly hide/show meshInstances
meshInstance = drawCall;

// Only alpha sort and cull mesh instances in the main world
Expand Down
2 changes: 1 addition & 1 deletion src/scene/particle-emitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,7 @@ pc.extend(pc, function() {
if (!this.loop) {
if (Date.now() > this.endTime) {
if (this.onFinished) this.onFinished();
this.meshInstance._hidden = true;
this.meshInstance.visible = false;
}
}

Expand Down

0 comments on commit 69fb2fe

Please sign in to comment.