SlideShare uma empresa Scribd logo
1 de 17
Android Developer Days 2013
Engin Yağız Hatay
Who Am I ?
Engin Yağız Hatay
Computer Engineer
Geek @ Codemodeon
Outline
• Graphics in Browser
CSS3 /Canvas / SVG / WebGL
• HTML5 Canvas
• Browser Support
• Libraries : Paperjs / ProcessingJS / SeriouslyJS
• Canvas in Mobile
• Performance
• Mobile Graphics / Creative Coding
• Tools
http://www.creativeapplications.net/
Idea/Inspiration
Graphics in Browser
• CSS3 /Canvas / SVG / WebGL / Flash
• Which one to use ?
• User Interfaces ?
• Rounded Corners, Shadows ?
• 3D ?
• Games, Fractals?
• Animations ?
• Scalable images ?
HTML5 - Canvas
• 2D Drawing platform
• All you need is plain JavaScript
• Created by Apple (Used for dashboard
widgets)
• Now it’s an HTML5 Standard
• «Resolution dependent bitmap»
Which means every visual is represented by
pixels (non-vectoral)
HTML5-Canvas (cont.)
• You can save the resulting image as a .png or
.jpg.
• There are no DOM nodes for anything you
draw. It is all pixels.
• Not suited for Web site or application user
interfaces.
• Requires you to manually redraw each
element in the interface
Some Details
• «Proxying canvases to workers»
• What is a worker ?
• Workers are unable to reach DOM elements
• So we need a proxy
• canvasProxy = canvas . transferControlToProxy()
• canvasProxy . setContext(context)
SVG
• Resolution independent
• Allows scaling for any screen resolution.
• Very good support for animations. Elements can be
animated using a declarative syntax, or via JavaScript.
• Better solution for Web application user interfaces
WebGL
• WebGL is a cross-platform web standard
• Low-level 3D graphics API based on OpenGL
ES 2.0 (Shaders/GLSL)
• Exposed through the HTML5 Canvas element
as Document Object Model interfaces.
• canvas context mode :
CanvasRenderingContext2D
WebGLRenderingContext
Browser Support
Canvas
WebGL
Browser Support (cont.)
SVG
CSS
Libraries
• PaperJS – Hard to Debug – PaperScript
• Easel.js/Kinetic.js/Fabric.js
• ProcessingJS – Own language - .pde files
• RaphaelJS – SVG in every browser
• ThreeJS - http://threejs.org/ - 3D JS – WebGL
• SeriouslyJS – Interesting WebGL library
(Your shortcut to useful shaders – Great for
video and image manipulation)
Performance
• Hardware Acceleration
• Pre-rendering
Off-screen Canvas
• Batching canvas calls
Single draw call
• Renderers: special for
js,canvas and audio
Ex: Ejecta http://bit.ly/cQ743c
Tools
• JS Performance Monitor – Stats.js
https://github.com/mrdoob/stats.js
• Ai to Canvas – Drawing,Animation,Built-in
Events
http://visitmix.com/labs/ai2canvas/
Mobile Graphics / Creative Coding
openFrameworks (C++)
ProcessınG / Processıngjs
(Java/JS)
libCınder (C++)
Graphics Libraries (OpenGL, GLUT,)
Utilities (FreeType, Poco,Assimp)
Tools(OpenCV),MathLibraries
I/O,Sound,Video,Import-Export
Top IDEs (Processing has its own IDE)
Powerful
Large Communities (Processing & OF)
Cross Platform (Android/IOS/Mac/PC/Linux)
Thank You

Mais conteúdo relacionado

Mais procurados

New Tools for Visualization in JavaScript - Sept. 2011
New Tools for Visualization in JavaScript - Sept. 2011New Tools for Visualization in JavaScript - Sept. 2011
New Tools for Visualization in JavaScript - Sept. 2011
philogb
 
JavaScript para Graficos y Visualizacion de Datos
JavaScript para Graficos y Visualizacion de DatosJavaScript para Graficos y Visualizacion de Datos
JavaScript para Graficos y Visualizacion de Datos
philogb
 
Cloud App Develop
Cloud App DevelopCloud App Develop
Cloud App Develop
Fin Chen
 

Mais procurados (20)

Extending GWT
Extending GWTExtending GWT
Extending GWT
 
Mobile WebKit Optimizations & Tools
Mobile WebKit Optimizations & ToolsMobile WebKit Optimizations & Tools
Mobile WebKit Optimizations & Tools
 
New Tools for Visualization in JavaScript - Sept. 2011
New Tools for Visualization in JavaScript - Sept. 2011New Tools for Visualization in JavaScript - Sept. 2011
New Tools for Visualization in JavaScript - Sept. 2011
 
Akademy 2010 presentation
Akademy 2010 presentationAkademy 2010 presentation
Akademy 2010 presentation
 
React.js and Flux in details
React.js and Flux in detailsReact.js and Flux in details
React.js and Flux in details
 
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
 
Decoupled (Headless) Drupal
Decoupled (Headless) DrupalDecoupled (Headless) Drupal
Decoupled (Headless) Drupal
 
Adventures in Collective Funding
Adventures in Collective FundingAdventures in Collective Funding
Adventures in Collective Funding
 
Announcing StencilJS
Announcing StencilJSAnnouncing StencilJS
Announcing StencilJS
 
JavaScript para Graficos y Visualizacion de Datos
JavaScript para Graficos y Visualizacion de DatosJavaScript para Graficos y Visualizacion de Datos
JavaScript para Graficos y Visualizacion de Datos
 
React native: building native iOS apps with javascript
React native: building native iOS apps with javascriptReact native: building native iOS apps with javascript
React native: building native iOS apps with javascript
 
20111129 modernizr
20111129 modernizr20111129 modernizr
20111129 modernizr
 
Image video processing and canvas element by Abhay Rao
Image video processing and canvas element by Abhay RaoImage video processing and canvas element by Abhay Rao
Image video processing and canvas element by Abhay Rao
 
Sugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a timeSugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a time
 
Nodejs
NodejsNodejs
Nodejs
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
 
Cloud App Develop
Cloud App DevelopCloud App Develop
Cloud App Develop
 
Jhipster
JhipsterJhipster
Jhipster
 
Improve WordPress load times with a CDN
Improve WordPress load times with a CDNImprove WordPress load times with a CDN
Improve WordPress load times with a CDN
 
Full stack JavaScript - the folly of choice
Full stack JavaScript - the folly of choiceFull stack JavaScript - the folly of choice
Full stack JavaScript - the folly of choice
 

Semelhante a Html5 Canvas and Mobile Graphics

Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3
Karambir Singh Nain
 
The Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG FilesThe Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG Files
Mario Heiderich
 
Browser and Cloud - The Future of IDEs?
Browser and Cloud - The Future of IDEs?Browser and Cloud - The Future of IDEs?
Browser and Cloud - The Future of IDEs?
martinlippert
 

Semelhante a Html5 Canvas and Mobile Graphics (20)

W3C HTML5 KIG-The complete guide to building html5 games
W3C HTML5 KIG-The complete guide to building html5 gamesW3C HTML5 KIG-The complete guide to building html5 games
W3C HTML5 KIG-The complete guide to building html5 games
 
Html5 (games)
Html5 (games)Html5 (games)
Html5 (games)
 
Svcc 2013-css3-and-mobile
Svcc 2013-css3-and-mobileSvcc 2013-css3-and-mobile
Svcc 2013-css3-and-mobile
 
SVG Strikes Back
SVG Strikes BackSVG Strikes Back
SVG Strikes Back
 
Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3Building a Better Web with HTML5 and CSS3
Building a Better Web with HTML5 and CSS3
 
Html5 more than just html5 v final
Html5  more than just html5 v finalHtml5  more than just html5 v final
Html5 more than just html5 v final
 
HTML5DevConf 2013 (October): WebGL is a game changer!
HTML5DevConf 2013 (October): WebGL is a game changer!HTML5DevConf 2013 (October): WebGL is a game changer!
HTML5DevConf 2013 (October): WebGL is a game changer!
 
Make your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScriptMake your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScript
 
20120802 timisoara
20120802 timisoara20120802 timisoara
20120802 timisoara
 
Introduction of openGL
Introduction  of openGLIntroduction  of openGL
Introduction of openGL
 
CANVAS vs SVG @ FrontInRio 2011
CANVAS vs SVG @ FrontInRio 2011CANVAS vs SVG @ FrontInRio 2011
CANVAS vs SVG @ FrontInRio 2011
 
Advanced Web Graphics with Canvas
Advanced Web Graphics with CanvasAdvanced Web Graphics with Canvas
Advanced Web Graphics with Canvas
 
The Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG FilesThe Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG Files
 
Academy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphicsAcademy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphics
 
JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
Browser and Cloud - The Future of IDEs?
Browser and Cloud - The Future of IDEs?Browser and Cloud - The Future of IDEs?
Browser and Cloud - The Future of IDEs?
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
Before Going Vector
Before Going VectorBefore Going Vector
Before Going Vector
 
Peru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVMPeru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVM
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Html5 Canvas and Mobile Graphics

  • 1. Android Developer Days 2013 Engin Yağız Hatay
  • 2. Who Am I ? Engin Yağız Hatay Computer Engineer Geek @ Codemodeon
  • 3. Outline • Graphics in Browser CSS3 /Canvas / SVG / WebGL • HTML5 Canvas • Browser Support • Libraries : Paperjs / ProcessingJS / SeriouslyJS • Canvas in Mobile • Performance • Mobile Graphics / Creative Coding • Tools
  • 5. Graphics in Browser • CSS3 /Canvas / SVG / WebGL / Flash • Which one to use ? • User Interfaces ? • Rounded Corners, Shadows ? • 3D ? • Games, Fractals? • Animations ? • Scalable images ?
  • 6. HTML5 - Canvas • 2D Drawing platform • All you need is plain JavaScript • Created by Apple (Used for dashboard widgets) • Now it’s an HTML5 Standard • «Resolution dependent bitmap» Which means every visual is represented by pixels (non-vectoral)
  • 7. HTML5-Canvas (cont.) • You can save the resulting image as a .png or .jpg. • There are no DOM nodes for anything you draw. It is all pixels. • Not suited for Web site or application user interfaces. • Requires you to manually redraw each element in the interface
  • 8. Some Details • «Proxying canvases to workers» • What is a worker ? • Workers are unable to reach DOM elements • So we need a proxy • canvasProxy = canvas . transferControlToProxy() • canvasProxy . setContext(context)
  • 9. SVG • Resolution independent • Allows scaling for any screen resolution. • Very good support for animations. Elements can be animated using a declarative syntax, or via JavaScript. • Better solution for Web application user interfaces
  • 10. WebGL • WebGL is a cross-platform web standard • Low-level 3D graphics API based on OpenGL ES 2.0 (Shaders/GLSL) • Exposed through the HTML5 Canvas element as Document Object Model interfaces. • canvas context mode : CanvasRenderingContext2D WebGLRenderingContext
  • 13. Libraries • PaperJS – Hard to Debug – PaperScript • Easel.js/Kinetic.js/Fabric.js • ProcessingJS – Own language - .pde files • RaphaelJS – SVG in every browser • ThreeJS - http://threejs.org/ - 3D JS – WebGL • SeriouslyJS – Interesting WebGL library (Your shortcut to useful shaders – Great for video and image manipulation)
  • 14. Performance • Hardware Acceleration • Pre-rendering Off-screen Canvas • Batching canvas calls Single draw call • Renderers: special for js,canvas and audio Ex: Ejecta http://bit.ly/cQ743c
  • 15. Tools • JS Performance Monitor – Stats.js https://github.com/mrdoob/stats.js • Ai to Canvas – Drawing,Animation,Built-in Events http://visitmix.com/labs/ai2canvas/
  • 16. Mobile Graphics / Creative Coding openFrameworks (C++) ProcessınG / Processıngjs (Java/JS) libCınder (C++) Graphics Libraries (OpenGL, GLUT,) Utilities (FreeType, Poco,Assimp) Tools(OpenCV),MathLibraries I/O,Sound,Video,Import-Export Top IDEs (Processing has its own IDE) Powerful Large Communities (Processing & OF) Cross Platform (Android/IOS/Mac/PC/Linux)

Notas do Editor

  1. http://www.html5rocks.com/en/tutorials/canvas/performance/http://www.useragentman.com/blog/2012/09/23/cross-browser-gpu-acceleration-and-requestanimationframe-in-depth/