SlideShare une entreprise Scribd logo
1  sur  17
Javascript visualisation frameworks www.JSinSA.com JS in SA Conference 2011 SVG via Raphäel, Canvas and others Brendon McLean, Intellection Software @brendon9x
State of the Web 2-oh-no www.JSinSA.com JS in SA Conference 2011
The Tale of Two Rendering Modes www.JSinSA.com JS in SA Conference 2011 Immediate Mode: function draw() {           context.fillStyle = "red";          context.fillRect(0, 0, 100, 20);      }      setInterval(draw, 1000 / 20); } Examples: Almost everything.
The Tale of Two Rendering Modes www.JSinSA.com JS in SA Conference 2011 Retained mode: <svgxmlns="http://www.w3.org/2000/svg" version="1.1" width="640" height="480">    <path fill="none" stroke="#666666</path>    <circle cx="120" cy="390" r="8”></circle> </svg> Example: HTML – the DOM.
www.JSinSA.com JS in SA Conference 2011 Pros & Cons Retained Immediate Fast Robust Limitless possibility Easy client side programming ,[object Object]
Much easier for events
Exportable as document
Mostly constructed in tools or on server side,[object Object]
The unlikely hero: VML www.JSinSA.com JS in SA Conference 2011 “This is me doing my online banking in the year 2010” “Yes, we wear jump suits…”
At a glance www.JSinSA.com JS in SA Conference 2011 Properties Primitives circle rect ellipse path text ,[object Object]
fill
opacity
x, y, w, h
rotation, scale, translation
etc...Extra ,[object Object],[object Object]
Beziers www.JSinSA.com JS in SA Conference 2011 Like logo canvas.path([  	"M", start.x, start.y,                      // Move to  	"L", lineEnd.x, lineEnd.y,                  // Line to 	"Q", control.x, control.y, end.x, end.y,    // Quadratic bezier to 	"Z"]);
Line chart www.JSinSA.com JS in SA Conference 2011 Events just like DOM varslider = canvas.rect(s.x, s.y, s.width, s.height).attr({  	           fill: "white", "fill-opacity": 0.3, stroke: "white"         }).drag(function(dx, dy) {  sliderModel.x = this.startX + dx;  slider.attr({x: sliderModel.x});              update();          }, function() {  this.startX = slider.attr("x");          });

Contenu connexe

Similaire à JSinSA - JS Visualisation APIs

I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not FlashThomas Fuchs
 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Patrick Chanezon
 
Drawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebDrawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebCloudinary
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the WorldJonathan Snook
 
Painless visual testing
Painless visual testingPainless visual testing
Painless visual testinggojkoadzic
 
STC Summit 2015 Hypergraphics for visual-first help
STC Summit 2015 Hypergraphics for visual-first helpSTC Summit 2015 Hypergraphics for visual-first help
STC Summit 2015 Hypergraphics for visual-first helpDave Gardiner
 
Web accessibility
Web accessibilityWeb accessibility
Web accessibilityEb Styles
 
Visualization of Big Data in Web Apps
Visualization of Big Data in Web AppsVisualization of Big Data in Web Apps
Visualization of Big Data in Web AppsEPAM
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech TourCarol McDonald
 
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...Codemotion
 
WebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open webWebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open webpjcozzi
 
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile EventHTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile EventRobert Nyman
 
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichHTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichRobert Nyman
 
Beholding the giant pyramid of application development; why Ajax applications...
Beholding the giant pyramid of application development; why Ajax applications...Beholding the giant pyramid of application development; why Ajax applications...
Beholding the giant pyramid of application development; why Ajax applications...Javeline B.V.
 
ESRI Dev Meetup: Building Distributed JavaScript Map Widgets
ESRI Dev Meetup: Building Distributed JavaScript Map WidgetsESRI Dev Meetup: Building Distributed JavaScript Map Widgets
ESRI Dev Meetup: Building Distributed JavaScript Map WidgetsAllan Glen
 
Interactive Vector-Graphics in the Browser
Interactive Vector-Graphics in the BrowserInteractive Vector-Graphics in the Browser
Interactive Vector-Graphics in the Browsertec
 

Similaire à JSinSA - JS Visualisation APIs (20)

SVG overview
SVG overviewSVG overview
SVG overview
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?
 
Canvas
CanvasCanvas
Canvas
 
SVGD3Angular2React
SVGD3Angular2ReactSVGD3Angular2React
SVGD3Angular2React
 
Drawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebDrawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the Web
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
 
Painless visual testing
Painless visual testingPainless visual testing
Painless visual testing
 
STC Summit 2015 Hypergraphics for visual-first help
STC Summit 2015 Hypergraphics for visual-first helpSTC Summit 2015 Hypergraphics for visual-first help
STC Summit 2015 Hypergraphics for visual-first help
 
Web accessibility
Web accessibilityWeb accessibility
Web accessibility
 
Visualization of Big Data in Web Apps
Visualization of Big Data in Web AppsVisualization of Big Data in Web Apps
Visualization of Big Data in Web Apps
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech Tour
 
CSS3 vs jQuery
CSS3 vs jQueryCSS3 vs jQuery
CSS3 vs jQuery
 
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...
 
WebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open webWebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open web
 
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile EventHTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
 
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichHTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
 
Beholding the giant pyramid of application development; why Ajax applications...
Beholding the giant pyramid of application development; why Ajax applications...Beholding the giant pyramid of application development; why Ajax applications...
Beholding the giant pyramid of application development; why Ajax applications...
 
ESRI Dev Meetup: Building Distributed JavaScript Map Widgets
ESRI Dev Meetup: Building Distributed JavaScript Map WidgetsESRI Dev Meetup: Building Distributed JavaScript Map Widgets
ESRI Dev Meetup: Building Distributed JavaScript Map Widgets
 
Interactive Vector-Graphics in the Browser
Interactive Vector-Graphics in the BrowserInteractive Vector-Graphics in the Browser
Interactive Vector-Graphics in the Browser
 

JSinSA - JS Visualisation APIs

  • 1. Javascript visualisation frameworks www.JSinSA.com JS in SA Conference 2011 SVG via Raphäel, Canvas and others Brendon McLean, Intellection Software @brendon9x
  • 2. State of the Web 2-oh-no www.JSinSA.com JS in SA Conference 2011
  • 3. The Tale of Two Rendering Modes www.JSinSA.com JS in SA Conference 2011 Immediate Mode: function draw() { context.fillStyle = "red"; context.fillRect(0, 0, 100, 20); } setInterval(draw, 1000 / 20); } Examples: Almost everything.
  • 4. The Tale of Two Rendering Modes www.JSinSA.com JS in SA Conference 2011 Retained mode: <svgxmlns="http://www.w3.org/2000/svg" version="1.1" width="640" height="480"> <path fill="none" stroke="#666666</path> <circle cx="120" cy="390" r="8”></circle> </svg> Example: HTML – the DOM.
  • 5.
  • 8.
  • 9. The unlikely hero: VML www.JSinSA.com JS in SA Conference 2011 “This is me doing my online banking in the year 2010” “Yes, we wear jump suits…”
  • 10.
  • 11. fill
  • 15.
  • 16. Beziers www.JSinSA.com JS in SA Conference 2011 Like logo canvas.path([ "M", start.x, start.y, // Move to "L", lineEnd.x, lineEnd.y, // Line to "Q", control.x, control.y, end.x, end.y, // Quadratic bezier to "Z"]);
  • 17. Line chart www.JSinSA.com JS in SA Conference 2011 Events just like DOM varslider = canvas.rect(s.x, s.y, s.width, s.height).attr({ fill: "white", "fill-opacity": 0.3, stroke: "white" }).drag(function(dx, dy) { sliderModel.x = this.startX + dx; slider.attr({x: sliderModel.x}); update(); }, function() { this.startX = slider.attr("x"); });
  • 18. The gallery www.JSinSA.com JS in SA Conference 2011 vari = canvas.image(src, x, y, w, h); i.translate(dx, dy); i.animate({rotation: 45}, 1000, "<>"); i.scale(sx, sy);
  • 19. Canvas (2D) Similar primitives to SVG Procedural Results in bitmaps Pixel access Context transforms www.JSinSA.com JS in SA Conference 2011
  • 20. WebGL (Canvas 3D) Based on OpenGL ES (iOS, etc) Extremely low-level End user likely to use libraries (like THREE.js) www.JSinSA.com JS in SA Conference 2011
  • 21. What’s it good for? www.JSinSA.com JS in SA Conference 2011 “...a solution looking for a problem.” - 1960
  • 22. Future Cool stuff Shaders – powerful like lasers WebCL future (512 core computation) Not cool stuff Hardware support No IE support (Mozilla plugin coming) www.JSinSA.com JS in SA Conference 2011
  • 23. www.JSinSA.com JS in SA Conference 2011 Questions

Notes de l'éditeur

  1. Cape Town?
  2. Note much that spans everythingFuture looking better