Skip to content

Commit

Permalink
Discuss animaiton and interactivity in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
zathras committed May 2, 2024
1 parent c043bd5 commit 9838232
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# jovial_svg

Robust, efficient rendering of SVG static images, supporting a well-defined
profile of SVG and an efficient binary storage format. Very fast load times
profile of SVG, an efficient binary storage format, and animation. Very
fast load times
result from using this binary format -- loading a pre-compiled binary file
is usually an order of magnitude faster than parsing an XML SVG file. Observed
speedups for loading larger SVG files range from 5x to 20x.

The supported SVG profile
includes the parts of
The supported SVG profile includes the parts of
[SVG Tiny 1.2](https://www.w3.org/TR/2008/REC-SVGTiny12-20081222/)
that are applicable to static images, plus a healthy subset of
[SVG 1.1](https://www.w3.org/TR/2011/REC-SVG11-20110816/). In-line
Expand Down Expand Up @@ -107,6 +107,24 @@ it.

<img width="80%" src="https://raw.githubusercontent.com/zathras/jovial_svg/main/doc/images/demo_screen_shot.png">

## Animation and Interactivity

Interactivity is supported by letting a program detect mouse clicks within
a rendered SVG asset. Named SVG nodes can be marked as exported, and exported
nodes' names and bounding rectangles are made available to the caller.
The bounding rectangles can be compared with the location of a mouse click
or touch event to determine which node was rendered at the given point.
See the `ExportedID` class for details.

A document object model (DOM) API is provided to programmatically modify an
SVG asset. Using it, Dart code can change rendering atributes like color,
line width, font and many others. It can also add or remove nodes from
the in-memory graph that represents the asset. These modifications can
be done repeatedly to achieve animation.

See `animation.dart` in the `examples` directory to see animaiton and
interactivity being used.

## Supported SVG Profile

Most features of SVG 1.1 that are applicable to static SVG documents are
Expand Down

0 comments on commit 9838232

Please sign in to comment.