From 038446287d298da1684392e31db150f49506d64c Mon Sep 17 00:00:00 2001
From: Greg Fodor <gfodor@gmail.com>
Date: Tue, 2 Oct 2018 21:01:18 +0000
Subject: [PATCH] Change camera pan curves

---
 src/components/scene-preview-camera.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/components/scene-preview-camera.js b/src/components/scene-preview-camera.js
index a6e715691..46fde4498 100644
--- a/src/components/scene-preview-camera.js
+++ b/src/components/scene-preview-camera.js
@@ -33,7 +33,12 @@ AFRAME.registerComponent("scene-preview-camera", {
 
   tick: function() {
     let t = (new Date().getTime() - this.startTime) / (1000.0 * this.data.duration);
-    t = (t * t) / (2 * (t * t - t) + 1); // Simple beizer smoothing
+
+    if (!this.backwards) {
+      t = t * (2 - t);
+    } else {
+      t = t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
+    }
 
     const from = this.backwards ? this.targetPoint : this.startPoint;
     const to = this.backwards ? this.startPoint : this.targetPoint;
-- 
GitLab