Add 11_update_js_three_r111.patch to support three.js r111
authorRyan Pavlik <ryan.pavlik@collabora.com>
Tue, 19 Jan 2021 23:24:15 +0000 (17:24 -0600)
committerRyan Pavlik <ryan.pavlik@collabora.com>
Thu, 21 Jan 2021 15:58:29 +0000 (09:58 -0600)
debian/patches/11_update_js_three_r111.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/11_update_js_three_r111.patch b/debian/patches/11_update_js_three_r111.patch
new file mode 100644 (file)
index 0000000..4488a29
--- /dev/null
@@ -0,0 +1,34 @@
+From: Ryan Pavlik <ryan.pavlik@collabora.com>
+Date: Tue, 19 Jan 2021 17:22:35 -0600
+Subject: Update javascript to be compatible with threejs r111
+
+---
+ res/threejs/SolveSpaceControls.js | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/res/threejs/SolveSpaceControls.js b/res/threejs/SolveSpaceControls.js
+index e141ace..ca74fd5 100644
+--- a/res/threejs/SolveSpaceControls.js
++++ b/res/threejs/SolveSpaceControls.js
+@@ -470,9 +470,9 @@ solvespace = function(obj, params) {
+         changeBasis.makeBasis(camera.right, camera.up, n);
+         for (var i = 0; i < 2; i++) {
+-            var newLightPos = changeBasis.applyToVector3Array(
+-                [obj.lights.d[i].direction[0], obj.lights.d[i].direction[1],
+-                    obj.lights.d[i].direction[2]]);
++            var newLightPos = new THREE.Vector3(obj.lights.d[i].direction[0],
++                obj.lights.d[i].direction[1],
++                obj.lights.d[i].direction[2]).applyMatrix4(changeBasis);
+             directionalLightArray[i].position.set(newLightPos[0],
+                 newLightPos[1], newLightPos[2]);
+         }
+@@ -515,7 +515,7 @@ solvespace = function(obj, params) {
+         }
+         geometry.computeBoundingSphere();
+-        return new THREE.Mesh(geometry, new THREE.MultiMaterial(materialList));
++        return new THREE.Mesh(geometry, materialList);
+     }
+     function createEdges(meshObj) {
index 9c8db6b56ee34ab5e8bd31f89ee4105c2fc7ebfb..46a6dce85549aa3be860da596cf72eea525eb06d 100644 (file)
@@ -4,3 +4,4 @@
 04_use_system_unifont.patch
 
 10_mimalloc_restrict_cpu_yield.patch
+11_update_js_three_r111.patch