diff --git a/source/core/objects/particle/ParticleEmitter.js b/source/core/objects/particle/ParticleEmitter.js index 9fb368026..0d1dd90d7 100644 --- a/source/core/objects/particle/ParticleEmitter.js +++ b/source/core/objects/particle/ParticleEmitter.js @@ -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; } } }); @@ -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()); }; diff --git a/source/editor/ui/tab/animation/AnimationTab.js b/source/editor/ui/tab/animation/AnimationTab.js index 450232c65..c682991c7 100644 --- a/source/editor/ui/tab/animation/AnimationTab.js +++ b/source/editor/ui/tab/animation/AnimationTab.js @@ -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); @@ -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);