A renderer agnostic two-dimensional drawing api for the web.
Full Changelog: https://github.com/jonobr1/two.js/compare/v0.8.12...v0.8.13
Full Changelog: https://github.com/jonobr1/two.js/compare/v0.8.11...v0.8.12
Full Changelog: https://github.com/jonobr1/two.js/compare/v0.8.10...v0.8.11
Full Changelog: https://github.com/jonobr1/two.js/compare/v0.8.7...v0.8.10
Full Changelog: https://github.com/jonobr1/two.js/compare/v0.8.5...v0.8.6
Full Changelog: https://github.com/jonobr1/two.js/compare/v0.8.5...v0.8.7
import { ZUI } from 'two.js/extras/zui.js'
Two.Gradient
parent parameter to Two.Stop.clone
Full Changelog: https://github.com/jonobr1/two.js/compare/v0.8.3...v0.8.5
Two.Element.className
constructionFull Changelog: https://github.com/jonobr1/two.js/compare/v0.8.2...v0.8.3
Shape.worldMatrix
Two.Utils.read.path
Full Changelog: https://github.com/jonobr1/two.js/compare/v0.8.0...v0.8.2 & https://two.js.org/change-log/
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 scopingclass
construction instead of prototypical modificationsTwo.Events
is now a classTwo.Element
is a new base class of Two.Shape
, Two.Gradient
, and anything else that can be queried in the scenegraphMakeObservable
methods in favor of Object.defineProperty
invocations on constructor
export
s 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:
⚠️ These changes break:
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