SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
JAVASCRIPT GRAPHIC LIBRARIES
ALENA KALTUNEVICH 10/11/2013
1
Summary
Introduction
Most Popular JS graphic libraries
HTML5 canvas element
KineticJs
Three.JS
External links
2
Introduction
JavaScript graphic libraries are free, easy to use and are based on html5
canvas element or svg technology.
They provide easy and efficient tool for creating:
2d elements: lines, curves, shapes
3d content: polygons , perspective
Styling: shades, filters
Graphs and charts,
Drag and drop interactive elements,
Animations without using Flash technology
http://www.html5canvastutorials.com/labs/html5-canvas-ultimate-flash-
killer/
3
Most popular JS graphic libraries
D3.js
Powerful library for manipulating data based documents, allows to bind arbitrary data to
DOM and create original effects to visualize them.
Does not support well IE earlier versions.
http://bl.ocks.org/mbostock/3943967
http://mbostock.github.io/d3/tutorial/circle.html
Processing.js
The code is written using Processing language and then it is included in HTML page, good
for creating interactive graphic elements.
http://mariuswatz.com/works/abstract01js/index_auto.html
Raphael
Draws graphics for web sites using SVG for most browsers, VML for older versions of IE.
http://raphaeljs.com/curver.html
http://raphaeljs.com/polar-clock.html 4
Most popular JS graphic libraries
KinetcJs
Used for rendering 2d content such as curves, lines , shapes in static or animated way
http://www.html5canvastutorials.com/labs/html5-canvas-wheel-of-fortune/
Three.js
Used for rendering 3d content
http://blackjk3.github.io/threefab/
BonsaiJS
Used for creating svg based graphics
http://demos.bonsaijs.org/demos/rainbow/index.html
5
HTML5 Canvas element
Tag similar to any other html tag
The contents of the tag is rendered with JavaScript
Context is an object used to render graphics inside the canvas element
The context can be 2d or webgl (3d)
6
HTML5 Canvas element
Within canvas element you can draw lines, curves, polygons
Line Quadratic curve
Polygon
7
http://www.html5canvastutorials.com/labs/html5-canvas-elastic-stars-with-kineticjs/
http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs-brighten-or-
darken-image-tutorial/
KineticJs offers the possibility to use build-in 2d elements such as cercles, rectangles,
and other shapes .
You can make these elements draggable, place them on different layers, apply
transformation and styling features like scaling, shadowing etc.
When you are working with images, filters are available for inverting colors,
grayscaling and other similar effects.
8
Multiple possibilities exist for animating elements:
you can apply linear movement, oscillation movement, random direction
movement, rotation based on mathematical formulas :
http://www.html5canvastutorials.com/kineticjs/html5-
canvas-all-easing-functions-with-kineticjs/
http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs-
animate-position-tutorial/
You have the possibility to make elements move only within the boundaries of
delimited area :
http://www.html5canvastutorials.com/kineticjs/html5-canvas-drag-and-drop-shapes-
horizontally-or-vertically-tutorial/
9
Three.js
Three.js is used to render 3d content with renderer object
var renderer = new THREE.WebGLRenderer();
3d objects are represented by meshes
var plane = new THREE.Mesh(new THREE.PlaneGeometry(300, 300)
Then Meshes are added to the scene
scene.add(plane);
Scene is then rendered with camera, orthographic and perspective
var camera = new THREE.PerspectiveCamera(45,
window.innerWidth / window.innerHeight, 1, 1000);
http://www.html5canvastutorials.com/three/html5-canvas-webgl-plane-with-three-js/
10
Three.js
Different lights are available such as spot light, point light, ambient light etc
You apply different textures and materials to the meshes
var material = new THREE.MeshPhongMaterial({color: 0xe4e4e4});
Very impressive results can be achieved when rendering complex shape object
modeled with a 3d modeling program such as Blender.
You can also give to the user the possibility to interact with the scene and modify
dynamically the content of the scene.
http://threejs.org/examples/webgl_materials_cubemap_balls_reflection.html
http://carvisualizer.plus360degrees.com/threejs/
11
External links
http://bonsaijs.org/
http://raphaeljs.com/
http://mrdoob.github.io/three.js/
http://d3js.org/
http://kineticjs.com/
http://processingjs.org/
http://www.html5canvastutorials.com/
12
Find out more
• On https://techblog.betclicgroup.com/
About Betclic
• Betclic Everest Group, one of the world leaders in online gaming, has a unique portfolio
comprising various complementary international brands: Betclic, Everest Gaming, bet-at-
home.com, Expekt…
• Active in 100 countries with more than 12 million customers worldwide, the Group is
committed to promoting secure and responsible gaming and is a member of several
international professional associations including the EGBA (European Gaming and Betting
Association) and the ESSA (European Sports Security Association).
• Through our brands, Betclic Everest Group places expertise, technological know-how and
security at the heart of our strategy to deliver an on-line gaming offer attuned to the passion
of our players.

Weitere ähnliche Inhalte

Andere mochten auch

Chameleon game engine
Chameleon game engineChameleon game engine
Chameleon game engineVictor Porof
 
Firefox WebGL developer tools
Firefox WebGL developer toolsFirefox WebGL developer tools
Firefox WebGL developer toolsVictor Porof
 
Introduction to 3D and shaders
Introduction to 3D and shadersIntroduction to 3D and shaders
Introduction to 3D and shadersVictor Porof
 
Design in Tech Report 2017
Design in Tech Report 2017Design in Tech Report 2017
Design in Tech Report 2017John Maeda
 

Andere mochten auch (6)

Chameleon game engine
Chameleon game engineChameleon game engine
Chameleon game engine
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
Firefox WebGL developer tools
Firefox WebGL developer toolsFirefox WebGL developer tools
Firefox WebGL developer tools
 
User engagement in the digital world
User engagement in the digital worldUser engagement in the digital world
User engagement in the digital world
 
Introduction to 3D and shaders
Introduction to 3D and shadersIntroduction to 3D and shaders
Introduction to 3D and shaders
 
Design in Tech Report 2017
Design in Tech Report 2017Design in Tech Report 2017
Design in Tech Report 2017
 

Ähnlich wie Mini-Training: JS Graphical Libraries

WebGL - It's GO Time
WebGL - It's GO TimeWebGL - It's GO Time
WebGL - It's GO TimeTony Parisi
 
Academy PRO: D3, part 3
Academy PRO: D3, part 3Academy PRO: D3, part 3
Academy PRO: D3, part 3Binary Studio
 
From Zero to Hero – Web Performance
From Zero to Hero – Web PerformanceFrom Zero to Hero – Web Performance
From Zero to Hero – Web PerformanceSebastian Springer
 
New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5Jamshid Hashimi
 
Academy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphicsAcademy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphicsBinary Studio
 
Dynamic Graph Plotting with WPF
Dynamic Graph Plotting with WPFDynamic Graph Plotting with WPF
Dynamic Graph Plotting with WPFIJERD Editor
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인Daum DNA
 
GraphTech Ecosystem - part 3: Graph Visualization
GraphTech Ecosystem - part 3: Graph VisualizationGraphTech Ecosystem - part 3: Graph Visualization
GraphTech Ecosystem - part 3: Graph VisualizationLinkurious
 
Migrating your Web app to Virtual Reality
Migrating your Web app to Virtual RealityMigrating your Web app to Virtual Reality
Migrating your Web app to Virtual RealityDenis Radin
 
Web development today
Web development todayWeb development today
Web development todayJaydev Gajera
 
React Native custom components
React Native custom componentsReact Native custom components
React Native custom componentsJeremy Grancher
 
Pluggable visualisation of moodle datasets using native browser technologies ...
Pluggable visualisation of moodle datasets using native browser technologies ...Pluggable visualisation of moodle datasets using native browser technologies ...
Pluggable visualisation of moodle datasets using native browser technologies ...Ireland & UK Moodlemoot 2012
 
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)Oleksii Prohonnyi
 

Ähnlich wie Mini-Training: JS Graphical Libraries (20)

Html5
Html5Html5
Html5
 
WebGL - It's GO Time
WebGL - It's GO TimeWebGL - It's GO Time
WebGL - It's GO Time
 
Academy PRO: D3, part 3
Academy PRO: D3, part 3Academy PRO: D3, part 3
Academy PRO: D3, part 3
 
From Zero to Hero – Web Performance
From Zero to Hero – Web PerformanceFrom Zero to Hero – Web Performance
From Zero to Hero – Web Performance
 
New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5
 
Plunge into HTML5 Canvas – Let’s begin
Plunge into HTML5 Canvas – Let’s beginPlunge into HTML5 Canvas – Let’s begin
Plunge into HTML5 Canvas – Let’s begin
 
Academy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphicsAcademy PRO: HTML5 API graphics
Academy PRO: HTML5 API graphics
 
Dynamic Graph Plotting with WPF
Dynamic Graph Plotting with WPFDynamic Graph Plotting with WPF
Dynamic Graph Plotting with WPF
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인
 
GraphTech Ecosystem - part 3: Graph Visualization
GraphTech Ecosystem - part 3: Graph VisualizationGraphTech Ecosystem - part 3: Graph Visualization
GraphTech Ecosystem - part 3: Graph Visualization
 
Migrating your Web app to Virtual Reality
Migrating your Web app to Virtual RealityMigrating your Web app to Virtual Reality
Migrating your Web app to Virtual Reality
 
Web development today
Web development todayWeb development today
Web development today
 
React Native custom components
React Native custom componentsReact Native custom components
React Native custom components
 
What is HTML5
What is HTML5What is HTML5
What is HTML5
 
Pluggable visualisation of moodle datasets using native browser technologies ...
Pluggable visualisation of moodle datasets using native browser technologies ...Pluggable visualisation of moodle datasets using native browser technologies ...
Pluggable visualisation of moodle datasets using native browser technologies ...
 
Flash Web Development.pdf
Flash Web Development.pdfFlash Web Development.pdf
Flash Web Development.pdf
 
Volunteer.rb
Volunteer.rbVolunteer.rb
Volunteer.rb
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
HTML5 data attributes
HTML5 data attributes HTML5 data attributes
HTML5 data attributes
 
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
D3.JS Tips & Tricks (export to svg, crossfilter, maps etc.)
 

Mehr von Betclic Everest Group Tech Team

Mini-training: Personalization & Recommendation Demystified
Mini-training: Personalization & Recommendation DemystifiedMini-training: Personalization & Recommendation Demystified
Mini-training: Personalization & Recommendation DemystifiedBetclic Everest Group Tech Team
 

Mehr von Betclic Everest Group Tech Team (20)

Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)
 
Mini training - Moving to xUnit.net
Mini training - Moving to xUnit.netMini training - Moving to xUnit.net
Mini training - Moving to xUnit.net
 
Mini training - Introduction to Microsoft Azure Storage
Mini training - Introduction to Microsoft Azure StorageMini training - Introduction to Microsoft Azure Storage
Mini training - Introduction to Microsoft Azure Storage
 
Akka.Net
Akka.NetAkka.Net
Akka.Net
 
Mini training- Scenario Driven Design
Mini training- Scenario Driven DesignMini training- Scenario Driven Design
Mini training- Scenario Driven Design
 
Email Management in Outlook
Email Management in OutlookEmail Management in Outlook
Email Management in Outlook
 
Mini-Training: SSO with Windows Identity Foundation
Mini-Training: SSO with Windows Identity FoundationMini-Training: SSO with Windows Identity Foundation
Mini-Training: SSO with Windows Identity Foundation
 
Training - What is Performance ?
Training  - What is Performance ?Training  - What is Performance ?
Training - What is Performance ?
 
Mini-Training: Docker
Mini-Training: DockerMini-Training: Docker
Mini-Training: Docker
 
Mini Training Flyway
Mini Training FlywayMini Training Flyway
Mini Training Flyway
 
Mini-Training: NDepend
Mini-Training: NDependMini-Training: NDepend
Mini-Training: NDepend
 
Management 3.0 Workout
Management 3.0 WorkoutManagement 3.0 Workout
Management 3.0 Workout
 
Lean for Business
Lean for BusinessLean for Business
Lean for Business
 
Short-Training asp.net vNext
Short-Training asp.net vNextShort-Training asp.net vNext
Short-Training asp.net vNext
 
Training – Going Async
Training – Going AsyncTraining – Going Async
Training – Going Async
 
Mini-Training: Mobile UX Trends
Mini-Training: Mobile UX TrendsMini-Training: Mobile UX Trends
Mini-Training: Mobile UX Trends
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Mini-training: Personalization & Recommendation Demystified
Mini-training: Personalization & Recommendation DemystifiedMini-training: Personalization & Recommendation Demystified
Mini-training: Personalization & Recommendation Demystified
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 

Kürzlich hochgeladen

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Kürzlich hochgeladen (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Mini-Training: JS Graphical Libraries

  • 1. JAVASCRIPT GRAPHIC LIBRARIES ALENA KALTUNEVICH 10/11/2013 1
  • 2. Summary Introduction Most Popular JS graphic libraries HTML5 canvas element KineticJs Three.JS External links 2
  • 3. Introduction JavaScript graphic libraries are free, easy to use and are based on html5 canvas element or svg technology. They provide easy and efficient tool for creating: 2d elements: lines, curves, shapes 3d content: polygons , perspective Styling: shades, filters Graphs and charts, Drag and drop interactive elements, Animations without using Flash technology http://www.html5canvastutorials.com/labs/html5-canvas-ultimate-flash- killer/ 3
  • 4. Most popular JS graphic libraries D3.js Powerful library for manipulating data based documents, allows to bind arbitrary data to DOM and create original effects to visualize them. Does not support well IE earlier versions. http://bl.ocks.org/mbostock/3943967 http://mbostock.github.io/d3/tutorial/circle.html Processing.js The code is written using Processing language and then it is included in HTML page, good for creating interactive graphic elements. http://mariuswatz.com/works/abstract01js/index_auto.html Raphael Draws graphics for web sites using SVG for most browsers, VML for older versions of IE. http://raphaeljs.com/curver.html http://raphaeljs.com/polar-clock.html 4
  • 5. Most popular JS graphic libraries KinetcJs Used for rendering 2d content such as curves, lines , shapes in static or animated way http://www.html5canvastutorials.com/labs/html5-canvas-wheel-of-fortune/ Three.js Used for rendering 3d content http://blackjk3.github.io/threefab/ BonsaiJS Used for creating svg based graphics http://demos.bonsaijs.org/demos/rainbow/index.html 5
  • 6. HTML5 Canvas element Tag similar to any other html tag The contents of the tag is rendered with JavaScript Context is an object used to render graphics inside the canvas element The context can be 2d or webgl (3d) 6
  • 7. HTML5 Canvas element Within canvas element you can draw lines, curves, polygons Line Quadratic curve Polygon 7
  • 8. http://www.html5canvastutorials.com/labs/html5-canvas-elastic-stars-with-kineticjs/ http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs-brighten-or- darken-image-tutorial/ KineticJs offers the possibility to use build-in 2d elements such as cercles, rectangles, and other shapes . You can make these elements draggable, place them on different layers, apply transformation and styling features like scaling, shadowing etc. When you are working with images, filters are available for inverting colors, grayscaling and other similar effects. 8
  • 9. Multiple possibilities exist for animating elements: you can apply linear movement, oscillation movement, random direction movement, rotation based on mathematical formulas : http://www.html5canvastutorials.com/kineticjs/html5- canvas-all-easing-functions-with-kineticjs/ http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs- animate-position-tutorial/ You have the possibility to make elements move only within the boundaries of delimited area : http://www.html5canvastutorials.com/kineticjs/html5-canvas-drag-and-drop-shapes- horizontally-or-vertically-tutorial/ 9
  • 10. Three.js Three.js is used to render 3d content with renderer object var renderer = new THREE.WebGLRenderer(); 3d objects are represented by meshes var plane = new THREE.Mesh(new THREE.PlaneGeometry(300, 300) Then Meshes are added to the scene scene.add(plane); Scene is then rendered with camera, orthographic and perspective var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 1000); http://www.html5canvastutorials.com/three/html5-canvas-webgl-plane-with-three-js/ 10
  • 11. Three.js Different lights are available such as spot light, point light, ambient light etc You apply different textures and materials to the meshes var material = new THREE.MeshPhongMaterial({color: 0xe4e4e4}); Very impressive results can be achieved when rendering complex shape object modeled with a 3d modeling program such as Blender. You can also give to the user the possibility to interact with the scene and modify dynamically the content of the scene. http://threejs.org/examples/webgl_materials_cubemap_balls_reflection.html http://carvisualizer.plus360degrees.com/threejs/ 11
  • 13. Find out more • On https://techblog.betclicgroup.com/
  • 14. About Betclic • Betclic Everest Group, one of the world leaders in online gaming, has a unique portfolio comprising various complementary international brands: Betclic, Everest Gaming, bet-at- home.com, Expekt… • Active in 100 countries with more than 12 million customers worldwide, the Group is committed to promoting secure and responsible gaming and is a member of several international professional associations including the EGBA (European Gaming and Betting Association) and the ESSA (European Sports Security Association). • Through our brands, Betclic Everest Group places expertise, technological know-how and security at the heart of our strategy to deliver an on-line gaming offer attuned to the passion of our players.