A javascript port of http://toxiclibs.org for java and processing. Library works with, but is not dependant on, Processing.js
JavaScript Java Python
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 206 commits behind hapticdata:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Toxiclibs.js is a javascript port of Karsten Schmidt's Toxiclibs for Java and Processing. Toxiclibs.js works great with the Processing.js visualization library for but is not dependent on it. It can be used with any other library or by itself.

A few examples

additive_waves smooth_doodle polar_unravel circle_3_points line2d_intersection attraction2d draggable_particles softbody_square

classes currently in the toxiclibs.js compiled build:

Geometry (toxi. namespace)

  • AABB
  • AxisAlignedCylinder
  • BernsetinPolynomial
  • Circle
  • CircleIntersector
  • Cone
  • Ellipse
  • IsectData2D
  • IsectData3D
  • Line2D
  • Line3D
  • Matrix4x4
  • Polygon2D
  • Quaternion
  • Ray2D
  • Ray3D
  • Ray3DIntersector
  • Rect
  • Sphere
  • Spline2D
  • Triangle
  • Vec2D
  • Vec3D
  • XAxisCylinder
  • YAxisCylinder
  • ZAxisCylinder

Math (toxi. namespace)

  • MathUtils
  • InterpolationStrategy (abstract)
  • BezierInterpolation
  • CircularInterpolation
  • CosineInterpolation
  • DecimatedInterpolation
  • ExponentialInterpolation
  • Interpolation2D
  • LinearInterpolation
  • SigmoidInterpolation
  • ThresholdInterpolation
  • ZoomLensInterpolation
  • ScaleMap
  • SinCosLUT
  • AbstractWave (abstract)
  • AMFMSineWave
  • FMHarmonicSquareWave
  • FMSawtoothWave
  • FMSineWave
  • FMSquareWave
  • FMTriangleWave
  • SineWave

Color (toxi.color. namespace)

  • TColor

VerletPhysics2D (toxi.physics2d namespace)

  • VerletParticle2D
  • VerletSpring2D
  • AttractionBehavior
  • ConstantForceBehavior
  • GravityBehavior
  • AngularConstraint
  • AxisConstraint
  • CircularConstraint
  • MaxConstraint
  • MinConstraint
  • RectConstraint
  • ParticlePath2D
  • ParticleString2D
  • PullBackString2D
  • VerletConstrainedSpring2D
  • VerletMinDistanceSpring2D
  • VerletPhysics2D

http://haptic-data.com/toxiclibsjs was initiated on 1/5/2011 by Kyle Phillips http://haptic-data.com

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.


This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA