Skip to content

Commit

Permalink
Particle scale fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tentone committed Feb 10, 2018
1 parent e9ed510 commit 6a9fe1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
11 changes: 7 additions & 4 deletions source/core/objects/particle/ParticleEmitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,19 @@ function ParticleEmitter(group, emitter)
this.name = "particle";
this.frustumCulled = false;

var group = this.group;
var self = this;
Object.defineProperties(this,
{
texture:
{
get: function()
{
return group.texture;
return self.group.texture;
},
set: function(texture)
{
group.texture = texture;
self.group.texture = texture;
self.group.uniforms.texture.value = texture;
}
}
});
Expand Down Expand Up @@ -135,8 +136,10 @@ ParticleEmitter.prototype.reload = function()
*
* @method onBeforeRender
*/
ParticleEmitter.prototype.onBeforeRender = function()
ParticleEmitter.prototype.onBeforeRender = function(renderer, scene, camera, renderTarget)
{
this.group.uniforms.scale.value = renderer.getSize().height;

this.group.tick(this.clock.getDelta());
};

Expand Down
5 changes: 1 addition & 4 deletions source/editor/ui/tab/animation/AnimationTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ function AnimationTab(parent, closeable, container, index)
//Timeline
this.timeline = document.createElement("div");
this.timeline.style.position = "absolute";
this.timeline.style.overflowY = "auto";
this.timeline.style.overflowX = "hidden";
this.timeline.style.overflow = "auto";
this.timeline.style.top = "20px";
this.element.appendChild(this.timeline);

Expand All @@ -145,8 +144,6 @@ function AnimationTab(parent, closeable, container, index)
//Tracks
this.tracks = document.createElement("div");
this.tracks.style.position = "absolute";
this.tracks.style.overflowX = "auto";
this.tracks.style.overflowY = "hidden";
this.tracks.style.backgroundColor = Editor.theme.panelColor;
this.timeline.appendChild(this.tracks);

Expand Down

0 comments on commit 6a9fe1e

Please sign in to comment.