Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
This library generates triangle meshes for all the prime knots in the Rolfsen table.
Knotess consumes a compact binary file that provides XYZ positions for bézier control points, then produces tube shapes by sweeping a polygon along the bézier curve.
const SPINEDATA = 'centerlines.bin';
fetch(SPINEDATA).then(res => res.arrayBuffer()).then((data) => {
const knots = new Knotess(data);
const link = knots.tessellate('7.2.3');
const mesh = link[0];
const nverts = mesh.vertices.length / 6; // positions and normals
console.info(`The first component has ${nverts} vertices.`);
});
Install with NPM (npm install knotess
) or Yarn (yarn add knotess
), then:
import Knotess from 'knotess';
Or use a browser build directly as follows. Note the external dependency on glMatrix.
<script src="//unpkg.com/gl-matrix@2.8.1/dist/gl-matrix-min.js"></script>
<script src="//unpkg.com/knotess@1.0.0/knotess.js"></script>
Constructs a tessellator given a flat array of floating-point XYZ coordinates for the knot centerlines.
Given an Alexander-Briggs-Rolfsen identifier and an optional configuration dictionary,
returns an array of "meshes" where each mesh is a dictionary with three entries:
a Float32Array
vertex buffer, a Uint16Array
triangle buffer, and aUint16Array
wireframe
buffer.
Dictionary from Alexander-Briggs-Rolfsen number (e.g. "2.2.1") to arrays of two-tuples, where each two-tuple defines a range within the centerlines buffer. In knot theory parlance, each two-tuple corresponds to a component and each entry in the dictionary corresponds to a link.
Array of strings where each string corresponds to a row in the Rolfsen table. Each string is a space-delimited list of Alexander-Briggs-Rolfsen identifiers.
FAQs
Tessellate mathematical knots in JavaScript
The npm package knotess receives a total of 49 weekly downloads. As such, knotess popularity was classified as not popular.
We found that knotess demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.