From: Ryan Pavlik Date: Tue, 19 Jan 2021 23:24:15 +0000 (-0600) Subject: Add 11_update_js_three_r111.patch to support three.js r111 X-Git-Tag: archive/raspbian/3.1+ds1-4+rpi1^2~86 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=130593ad1ee5a528c6c26b70f9f7f2001272e844;p=solvespace.git Add 11_update_js_three_r111.patch to support three.js r111 --- diff --git a/debian/patches/11_update_js_three_r111.patch b/debian/patches/11_update_js_three_r111.patch new file mode 100644 index 0000000..4488a29 --- /dev/null +++ b/debian/patches/11_update_js_three_r111.patch @@ -0,0 +1,34 @@ +From: Ryan Pavlik +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) { diff --git a/debian/patches/series b/debian/patches/series index 9c8db6b..46a6dce 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 04_use_system_unifont.patch 10_mimalloc_restrict_cpu_yield.patch +11_update_js_three_r111.patch