[arch-commits] Commit in sagemath/trunk (PKGBUILD sagemath-threejs-100.patch)

Antonio Rojas arojas at archlinux.org
Mon Apr 22 11:23:56 UTC 2019


    Date: Monday, April 22, 2019 @ 11:23:55
  Author: arojas
Revision: 452920

Update three.js patch

Modified:
  sagemath/trunk/PKGBUILD
  sagemath/trunk/sagemath-threejs-100.patch

----------------------------+
 PKGBUILD                   |    2 +-
 sagemath-threejs-100.patch |   30 ++++++++++++++++++++++++++++--
 2 files changed, 29 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-04-22 10:52:10 UTC (rev 452919)
+++ PKGBUILD	2019-04-22 11:23:55 UTC (rev 452920)
@@ -61,7 +61,7 @@
             '961bfb5694b67d425d21240d71490cb71714b5207c23448c89be0966512ff8f9'
             'a42f3b152b1aedb8abf16bc70971419919d1fe30328574e7fef8305f9d07d938'
             '9ec56a3788e32c54f35abeaeedf7cadf6670fa10d39007050b23b93d3c35278e'
-            '3190167368e1689eb29b905b6703fdd41f11c075cc25442caf6305393f3e218c')
+            '3ee624bb47f757516a860799d817168fe9cf74e603416e18e70c93c692259242')
 
 prepare(){
   cd sage-$pkgver

Modified: sagemath-threejs-100.patch
===================================================================
--- sagemath-threejs-100.patch	2019-04-22 10:52:10 UTC (rev 452919)
+++ sagemath-threejs-100.patch	2019-04-22 11:23:55 UTC (rev 452920)
@@ -1,5 +1,5 @@
 diff --git a/src/ext/threejs/threejs_template.html b/src/ext/threejs/threejs_template.html
-index 0243bc1..d6ad3a7 100644
+index 0243bc1..48e8268 100644
 --- a/src/ext/threejs/threejs_template.html
 +++ b/src/ext/threejs/threejs_template.html
 @@ -114,7 +114,7 @@ SAGE_SCRIPTS
@@ -11,7 +11,33 @@
  
      var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 0.1, 1000 );
      camera.up.set( 0, 0, 1 );
-@@ -235,7 +235,11 @@ SAGE_SCRIPTS
+@@ -177,7 +177,11 @@ SAGE_SCRIPTS
+                                                    transparent: transparent, opacity: json.opacity,
+                                                    alphaTest: .1 } );
+ 
+-        var c = geometry.center().multiplyScalar( -1 );
++        var c = new THREE.Vector3();
++        geometry.computeBoundingBox();
++        geometry.boundingBox.getCenter( c );
++        geometry.translate( -c.x, -c.y, -c.z );
++
+         var mesh = new THREE.Points( geometry, material );
+         mesh.position.set( c.x, c.y, c.z );
+         scene.add( mesh );
+@@ -199,7 +203,11 @@ SAGE_SCRIPTS
+         var material = new THREE.LineBasicMaterial( { color: json.color, linewidth: json.linewidth,
+                                                       transparent: transparent, opacity: json.opacity } );
+ 
+-        var c = geometry.center().multiplyScalar( -1 );
++        var c = new THREE.Vector3();
++        geometry.computeBoundingBox();
++        geometry.boundingBox.getCenter( c );
++        geometry.translate( -c.x, -c.y, -c.z );
++
+         var mesh = new THREE.LineSegments( geometry, material );
+         mesh.position.set( c.x, c.y, c.z );
+         scene.add( mesh );
+@@ -235,7 +243,11 @@ SAGE_SCRIPTS
                                       transparent: transparent, opacity: json.opacity,
                                       shininess: 20 } );
  



More information about the arch-commits mailing list