-
Support
<canvas>
resizing via thelayout
property on the clock or gauge (not to be confused with thelayout
property on certain theme layers). -
The new
theory
theme illustrates the relationship between degrees, minutes/seconds, hours, and radians. -
Layers of type
radial
can now include aradians
element (instead ofdegrees
) to specify the angular change directly in radians. -
Ability to set clock pulse rate via the
pulse
value on the theme object. The clock pulse rate is mostly used to decide how often a clock "ticks" underdiscrete
animation. The default value is1000
, which means the clock will "tick" precisely once per second.For example, in the
decimal
clock, the pulse is set to 864, causing the decimal clock to tick every 864 milliseconds or 0.864 seconds. -
Ability to set a text background color for text radials. Use the
background
property to prepaint a rectangle of the indicated color before painting the text. Useful for ensuring text is painted against a solid-color background if it happens to be positioned on top of some colored pixels. -
New example demonstrating a resizing analog clock.
-
Fixed inconsistent positioning via the
center
property. Setting the position of a clock or gauge viacenter
should now work correctly. -
Fixed incorrect timing of decimal clock's second hand. The second hand will now tick correctly once every 0.864 seconds.
-
Added minified/packaged distribution sources to
dist/
, includingrevolve.js
,revolve.min.js
,revolve.pkgd.js
,revolve.pkgd.min.js
,revolve-themes.js
, andrevolve-themes.min.js
. -
Reintroduced
revolve-themes.json
, a standalone JavaScript file containing all predefined themes.
- Improved build packaging.
- Package registration issue.
-
New default theme for gauges:
unitless
. -
Pass arbitrary options with
data-[option-name]="[option-value]"
attributes on Revolve.js<canvas>
elements. For example, switch a clock betweencontinuous
anddiscrete
animation withdata-mode="continuous"
. -
Support for GitHub Package Registry.
-
Support for packaged builds (
revolve.pkgd.js
andrevolve.pkgd.min.js
) which include all themes. In these builds, predefined themes are embedded into the mainRevolve
object asRevolve.themes
. For example, thedark
theme can be accessed atRevolve.themes.dark
. -
Usage examples in the
/examples
folder. -
Screenshots of each theme in the
/assets/themes
folder.
- Issue with auto-initialization of
<canvas data-revolve="...">
elements.
The initial public release of Revolve.js.
-
Robust on-screen rendering of analog clocks and gauges with HTML canvas.
-
Precision alignment and geometrical positioning of clock elements.
-
Continuous and discrete animation with millisecond precision.
-
Custom clock and gauge axes (for example, to implement a pressure gauge).
-
Scalable graphics at any size or level of zoom.
-
Multiple predefined themes, from classic office clocks to speedometers.
-
JSON-driven theming system allows clock and gauge customization to the pixel.
-
Clean ES6 JavaScript with a permissive MIT license and no dependencies.
-
Dedicated project website at https://revolvejs.org.
-
Package-friendly via Yarn and/or NPM; supports AMD, CommonJS, and browser-global approaches.