Skip to main content

Sage: Open Source Mathematics Software: Jupyter extension for 3D graphics with threejs

Project description

Custom build of Three.js for SageMath

This package provides a single minified Javascript file three.min.js, which combines standard Three.js with a number of scripts from examples/jsm/.

The file is made available both as package data of a Python package jupyter_threejs_sage (for local access by SageMath) and as a Jupyter notebook extension (to be installed in the Jupyter notebook's Python environment).

Development

The steps to create this build from a stable tagged version of Three.js are

  • Perform a shallow clone of the desired version with

git clone --depth=1 --branch r<n> --single-branch https://github.com/mrdoob/three.js.git

  • Add the following lines to src/Three.js just after all other exports
export { OrbitControls } from '../examples/jsm/controls/OrbitControls.js';
export { Line2 } from '../examples/jsm/lines/Line2.js';
export { LineGeometry } from '../examples/jsm/lines/LineGeometry.js';
export { LineMaterial } from '../examples/jsm/lines/LineMaterial.js';
export { LineSegments2 } from '../examples/jsm/lines/LineSegments2.js';
export { LineSegmentsGeometry } from '../examples/jsm/lines/LineSegmentsGeometry.js';
  • Move into the library directory with cd three.js

  • Configure the library with npm install

  • Build the library with npm run build

    The minified file three.min.js will be located in the build directory.

  • Copy the minified file to the build directory here.

  • Create a new directory for the new version in jupyter_threejs_sage/static/ and copy the minified file there. (Do not remove old versions that needed by any released versions of Sage.)

  • The final step before releasing is to update the version file.

As noted in this issue, Three.js releases can be modified for up to a week after the initial release. This build process should wait for this period of time to ensure future consistency of building.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter_threejs_sage-130.tar.gz (490.3 kB view details)

Uploaded Source

Built Distribution

jupyter_threejs_sage-130-py3-none-any.whl (979.1 kB view details)

Uploaded Python 3

File details

Details for the file jupyter_threejs_sage-130.tar.gz.

File metadata

  • Download URL: jupyter_threejs_sage-130.tar.gz
  • Upload date:
  • Size: 490.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for jupyter_threejs_sage-130.tar.gz
Algorithm Hash digest
SHA256 e12c2d9933f07a39afd7af9f47fb948f08ef37d225efeff41e5f0409ca249ddc
MD5 eb854bb6f4cc05bd009792e43719d599
BLAKE2b-256 3c757e3fad0d99ef5a18a8b7ade919f7e022b07490a26ba215f53c0341c2c3fe

See more details on using hashes here.

File details

Details for the file jupyter_threejs_sage-130-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyter_threejs_sage-130-py3-none-any.whl
Algorithm Hash digest
SHA256 dcc618023a37514598537ae93ee82bdcd8710cc4df8fa0746f51dbc513356e52
MD5 d682513634b6003b51303dde888d86f8
BLAKE2b-256 b949770da740adc8a2e430b09971de8ebd48e049643679b6c902431a4d329bbc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page