• Stars
    star
    409
  • Rank 105,709 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 12 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pablo is a lightweight, expressive JavaScript SVG library. Pablo creates interactive drawings with SVG (Scalable Vector Graphics), giving access to all of SVG's granularity and power.

Pablo

For full documentation and interactive examples, see pablojs.com.

Pablo is a small, open-source JavaScript library for SVG, the web standard for vector graphics. It can be used for vector-based art, games, visualisations and interfaces.

Pablo focuses on simplicity and performance, targeting modern browsers for both desktop and mobile.

SVG has the potential to fulfil everything that Flash did for vector graphics on the web. However, SVG is severely behind Flash in terms of its developer tools. Pablo is a tiny offering to this cause.

Pablo is extendable via plugins and has no dependency on other JavaScript libraries.

Download

For production, use pablo.min.js.
For development, use pablo.js.

A test suite and changelog are available.

=====

How it works

Both SVG or HTML can be used in Pablo, although the main focus is on SVG.

Pablo acts as a thin wrapper around the contents of a web page, making it easier to work with dynamically-generated SVG and avoiding the verbose code required when using raw JavaScript.

Pablo provides methods like circle() and line() to create each kind of SVG element. It has methods for manipulating SVG and HTML, e.g. to change the appearance, size or position, and methods for filtering and sorting the elements.

It has a simple plugin system, allowing new functionality to be added.

Which browsers are supported

Basic SVG is supported in all modern browsers, including Internet Explorer 9 and mobile web browsers ([browser support table][browsers]).

Except in a couple of instances, Pablo doesn't attempt to workaround the lack of support in older browsers, although does let you know if the browser [is supported][issupported].

How it feels

Pablo's API is inspired by jQuery, Underscore, Backbone and Raphaël, although knowledge of these libraries isn't required. Using Pablo is to use SVG, so a growing knowledge of SVG goes hand-in-hand with using the library. See the Resources page for links and books on SVG.

See Pablo's API Reference for the details.

=====

Contributing

Your feedback is welcome. For bug reports and requests, please use the GitHub 'Issues' page or contact @premasagar.

[Pull requests][pullrequests] are welcome.

To update the documentation on pablojs.com, fork the [dharmafly/pablo-docs][pablo-docs] repo, edit the Markdown files in the docs folder on the master branch, and then send a pull request with the changes.

More Repositories

1

cleanslate

An extreme CSS reset stylesheet, for aggressively resetting the styling of an element and its children. Composed exclusively of CSS !important rules.
CSS
608
star
2

tim

A tiny, secure JavaScript micro-templating script.
JavaScript
250
star
3

sqwidget

JavaScript widget toolkit, for the creation and distribution of third-party web widgets.
JavaScript
141
star
4

sandie

Create a new JavaScript context within the browser. This allows external scripts to be loaded and arbitrary JavaScript to be executed without affecting the global scope. Potential conflicts between scripts are avoided via the sandbox of a 'sourceless' iframe document.
JavaScript
73
star
5

appleofmyiframe

JavaScript library for creating & manipulating 'sourceless' iframe documents (i.e. those without an external document src); jQuery plugin.
JavaScript
58
star
6

nitelite

A low-level Lightbox plugin for jQuery.
JavaScript
17
star
7

important

css !important manipulator (jQuery plugin)
JavaScript
13
star
8

cmd.js

A lightweight, asynchronous flow controller / file loader
JavaScript
11
star
9

mishmash

An assortment of little JavaScript functions, snippets and jQuery plugins. Stuff that doesn't warrant its own repository, but is too big or important for a gist.
JavaScript
10
star
10

theywriteforyou

Data journalism mashup, showing the number of articles by MPs in British newspapers.
JavaScript
9
star
11

sqweeze

A command line web asset optimisation and packaging tool.
Ruby
5
star
12

js1k

1KB JavaScript apps ~ #1: Phi
JavaScript
5
star
13

carboncopies

Carbon matching game for the Rewired State "Carbon & Energy Hack Day"
PHP
5
star
14

revolutionaries

@sciencehackday hack - an explorer of the evolution of great scientific inventors, thinkers and their discoveries
JavaScript
5
star
15

planetjs

Planet websites (RSS/Atom feed aggregator), in JavaScript
JavaScript
4
star
16

promisespromises

JavaScript
4
star
17

localbusiness

An experiment in visualising council payments data
JavaScript
2
star
18

allsizes

AllSizes is a (Greasemonkey) UserScript for Flickr, to give better access to Flickr photos: HTML for the various sizes, URLs, downloads.
JavaScript
2
star
19

adobe-prices

Data visualisation of Adobe's software prices across different countries
JavaScript
1
star
20

10ktrees

JavaScript
1
star
21

jasonpeewee

JavaScript
1
star