Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added camera.play() in setActiveCamera and move event emission to the…
… end
  • Loading branch information
fernandojsg committed May 25, 2016
commit 6efa3dc2a6a80b457e3afeee1db67d1ccaa74c37
3 changes: 2 additions & 1 deletion src/systems/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ module.exports.System = registerSystem('camera', {

// Make new camera active.
this.activeCameraEl = newCameraEl;
this.activeCameraEl.play();
sceneEl.camera = newCamera;
sceneEl.emit('camera-set-active', {cameraEl: newCameraEl});

// Disable current camera
if (previousCamera) {
Expand All @@ -91,6 +91,7 @@ module.exports.System = registerSystem('camera', {
cameraEl.setAttribute('camera', 'active', false);
cameraEl.pause();
}
sceneEl.emit('camera-set-active', {cameraEl: newCameraEl});
}
});

Expand Down