CutJS is a minimal JavaScript library for composing high-performance, dynamic and interactable 2D HTML5 graphics. It is inspired by DOM and jQuery with a new concept called pinning introduced instead of styling.
CutJS works with modern browsers and mobile devices and intended to be used for game and visual app development.
A CutJS app consists of a tree of nodes and image cutouts. Each node includes zero, one or more cutouts and is pinned (transformed) against its parent. Cutouts comes from either image textures or Canvas drawing.
Each rendering cycle consists of ticking and painting the tree. On ticking nodes adjust themselves to recent updates and then on painting each node transforms according to its pinning, pastes its cutouts and then delegates to its children.
Rendering is retained and is paused in each cycle unless/until it is touched directly or indirectly.
Following code demonstrate a simple use case. Cut.Loader and Cut.Mouse are pluggable components.
Loading...
Loading...
Copyright (c) 2013-2014 Ali Shakiba, Piqnt LLC and other contributors
Available under the MIT license