Skip to content

Releases: jonobr1/two.js

Official Stable Release of Version 0.8.0

10 Jan 20:14
Compare
Choose a tag to compare

Version 0.8.0 introduces a port of the previously EcmaScript 5 syntax and brings it to modern day JavaScript coding practices with EcmaScript 6 features supported in all major browsers.

📋 This is a more-or-less entire rewrite of Two.js to use EcmaScript 6 features. In particular:

  • const / let instead of var for tighter scoping
  • class construction instead of prototypical modifications
  • Expanded classification of classes. For instance:
    • Two.Events is now a class
    • Two.Element is a new base class of Two.Shape, Two.Gradient, and anything else that can be queried in the scenegraph
  • Where possible functions are named instead of anonymous
  • Removes all MakeObservable methods in favor of Object.defineProperty invocations on constructor
  • Module imports are through typical exports and except for the root Two.js class, not with default. So you'll need to import specific modules like so:
import { Vector } from 'two.js/src/vector.js';
var v = new Vector();

🏁 These changes allow for improved:

  • TypeScript Declarations (fully expanded and invoked through TypeScript's types compiler)
  • Improved documentation
  • Code legibility and OOP style
  • More legible performance debugging
    • Easier to identify culprit functions in Chrome et al. performance debug consoles
  • And improved SVG interpretation

⚠️ These changes break:

  • Loose interoperability between Two.Vector and Two.Anchor. For any curve, it's required you use anchors instead of vectors now.

🗒️ All tests and first party examples are passing with documentation updated on two.js.org/docs

Official Stable Release of Version 0.7.13

15 Dec 21:28
Compare
Choose a tag to compare

Minor enhancements to Two.Gradient and Two.interpret including:

  • Improved SVG gradient interpretation
  • Two.interpret can properly unwrap CSS url() commands
  • Added Two.Gradient.units and respected in all renderers
  • Default units space for Two.Gradient is objectBoundingBox
  • Removed destructive attribute assignments in Two.interpret
  • Interpreted gradients are reused as <defs />

Official Stable Release of Version 0.7.12

24 Nov 18:57
9b92913
Compare
Choose a tag to compare

Fixed setting Two.Group.mask and Two.Path.mask to null, effectively removing or deleting a mask and improved adaptability of Two.Points.vertices.

Official Stable Release of Version 0.7.10

20 Nov 16:13
Compare
Choose a tag to compare

Fixed breaking issues with newly added Two.Points primitive.

Official Stable Release of Version 0.7.9

20 Nov 16:05
Compare
Choose a tag to compare

Added Two.Points object as a primitive and minor improvements including:

  • Improved two.load of images
  • Improved SVG interpretation

See changelog for a full list of additions.

Official Stable Release of Version 0.7.8

14 Jul 02:17
Compare
Choose a tag to compare

Created a shim version of TypeScript type definitions so that TypeScript projects can run Two.js without errors (though there is not code hinting yet).

Release of Version 0.7.7

14 Jul 01:45
Compare
Choose a tag to compare

Incorrectly formed TypeScript Types declared. Please do not use this version.

Official Stable Release of Version 0.7.6

10 Jul 15:00
Compare
Choose a tag to compare

Minor stability improvements in both client side and headless environments to Two.js. This includes:

  • Improved SVG interpretation
  • id assignment in all objects
  • Two.Path.vertices generation

See changelog for a full list of additions.

Official Stable Release of Version 0.7.5

25 May 17:30
6c859e1
Compare
Choose a tag to compare

Minor stability improvements in both client side and headless environments to Two.js. This includes:

  • Improved Typescript Declaration Types
  • Improved getBoundingClientRect calculations
  • Improved higher order primitive usability

See changelog for a full list of additions.

Official Stable Release of Version 0.7.4

02 Apr 20:50
Compare
Choose a tag to compare

Minor stability improvements in both client side and headless environments to Two.js. This includes:

  • Improved Typescript Declaration Types
  • Improved extras/ JavaScript and JavaScript Module accessing
  • Added Two.Shape.skewX and Two.Shape.skewY

See changelog for a full list of additions.