npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

space3

v1.1.1

Published

High performance WebGL compatible API for numerical simulation and graphics in 3D

Downloads

37

Readme

space3 is a general purpose maths framework !

Version Build status License

Brief

space3 is a rich and intuitive 3D maths API for algebra, geometry, ODE solving and curve manipulation.

It reaches surprisingly fast computation while keeping mathematical code natural to read and write.

Featuring

  • WebGL support with array based classes inheriting from Float64Array, column-major matrices, ...

  • Three.js support with compatible 3D coordinates manipulation, ...

  • Vast API designed to perform maths computation useful for computer graphics, numerical simulation, mechanics, physics...

  • Object oriented and functional intuitive syntax that makes formulas easy to drop.

  • Written in Typescript with standardized interfaces to allow easily subclassing over the framework and make the API simpler to use.

  • Fully documented with step-by-step guides and a complete reference

Usage

Import

ES6 and Typescript

import * as space3 from "space3";
import {Vector3, Matrix3} from "space3";

With Typescript only, you can directly import sources

import Vector3 from "space3/src/Vector3";

This makes the syntactic coloration more consistent.

Node.js

const space3 = require("space3");
const Vector3 = space3.Vector3, Matrix3 = space3.Matrix3;

Browser

WIP... Browser bundle coming soon. For now you can use a browser bundler such as browserify to transpile sources for browser.

Syntax overview

let u = new Vector3(1, 2, 3), v = Vector3.ones, er = Vector3.er(u);
let w = sub(u, v, v.mulc(10));
let r = 5;
u.add(v).mul(6);
v.copy(er.mul(r));

let m = Matrix3.rotX(Math.PI / 2);
v = m.prodv(add(w, v, u));
u.rot(w, Math.PI);
m.inv();

let p = new Point3(1, 2, 3, Vector3.ey), q = Point3.zeros;
p.origin = Vector3.zeros;
u = p.to(q);
p.translate(u);

Documentation

The documentation website contains a complete reference and step-by-step guides.

The guides are written such that beginners in maths and/or programming can easily get started but provides rigorous documentation for more advanced users.

Documentation Website

Unit tests

Contributions

If you want to improve math javascript experience don't hesitate to contribute. All kind of improvements are welcomed !

CONTRIBUTING.md