SlideShare ist ein Scribd-Unternehmen logo
1 von 17
While your waiting...

• You will want to get:
  • https://github.com/MacBoyPro/
    simple_animation

  • git@github.com:MacBoyPro/
    simple_animation.git
Interactive Graphics
   w/ Javascript,
  HTML5 and CSS3
      Lee Lundrigan
Who am I?
• Employer: Blazing Cloud, Inc.
• Job: Software Engineer
• Languages: HTML, CSS, Javascript,
  Ruby, Objective-C, Java
• Gold star
  • Wrote a cross mobile browser CSS
    framework that ran on iPhone,
    Android, Blackberry and WinMo
Who are YOU?
Tools of the trade
• Oxygen XML Editor
 • http://www.oxygenxml.com
• Aptana
 • http://www.aptana.com
• TextEdit (on Mac)
• TextPad (on Windows)
Course Topics
• Animation
  • 2D and 3D / HTML5 Canvas
  • Collision detection
  • Sprites
  • Sound
• Interaction
• Best practices
Vocab


vec·tor /ˈvektər/
Noun: A quantity having direction as
well as magnitude, esp. as determining
the position of one point in space
relative to another.

                         10
                               15
hertz (Hz)
a unit of frequency of one cycle per
second. Ex. 60Hz = 60 times per second

’tween/twēn/
Contraction: time between. The process
of creating in between frames.
Coordinate System

• Cartesian Coordinate System
 • Starts in upper left
 • Origin is (0,0)
                   0
               0
Animation

• setInterval(code,millisec);
  • repeats until cleared
• setTimeout(code, millisec);
  • Fires the event once
• Note: There are 1000 milliseconds in
  one second.
Animation Cont...


function draw() {
    ball.x += 10;
}
Lab - Simple Animation
Collision Detection


• Bounding box
• Test using object’s center
  • {x: 10, y: 10}
Sound

• HTML5 <embed> Tag
  <embed src="pong.mp3" id=”pong
  ”width=”0” height=”0”
  autostart=”false”/>
• Get the object by id
• Call the Play() method
Keyboard Movement
• document.onkeydown
 • detect character code
   • left: 37 right: 39
 • set moving true
• document.onkeyup
 • set moving false
Keyboard Movement
        Cont...


• Webkit based browsers have a bug
 • the keypress event doesn’t work for
   the arrow keys
Lab - Game time

Weitere ähnliche Inhalte

Was ist angesagt?

Mongo db washington dc 2014
Mongo db washington dc 2014Mongo db washington dc 2014
Mongo db washington dc 2014
ikanow
 
Canvas in html5 - TungVD
Canvas in html5 - TungVDCanvas in html5 - TungVD
Canvas in html5 - TungVD
Framgia Vietnam
 

Was ist angesagt? (10)

Drawing with the HTML5 Canvas
Drawing with the HTML5 CanvasDrawing with the HTML5 Canvas
Drawing with the HTML5 Canvas
 
Fast rendering with starling
Fast rendering with starlingFast rendering with starling
Fast rendering with starling
 
Scalable Assets Presentation
Scalable Assets PresentationScalable Assets Presentation
Scalable Assets Presentation
 
Mongo db washington dc 2014
Mongo db washington dc 2014Mongo db washington dc 2014
Mongo db washington dc 2014
 
Canvas in html5 - TungVD
Canvas in html5 - TungVDCanvas in html5 - TungVD
Canvas in html5 - TungVD
 
nunuStudio Geometrix 2017
nunuStudio Geometrix 2017nunuStudio Geometrix 2017
nunuStudio Geometrix 2017
 
Improving Game Performance in the Browser
Improving Game Performance in the BrowserImproving Game Performance in the Browser
Improving Game Performance in the Browser
 
Tiling and Zooming ASCII Art @ iOSoho
Tiling and Zooming ASCII Art @ iOSohoTiling and Zooming ASCII Art @ iOSoho
Tiling and Zooming ASCII Art @ iOSoho
 
Pruebas mostrando pdf's
Pruebas mostrando pdf'sPruebas mostrando pdf's
Pruebas mostrando pdf's
 
Photoshop
PhotoshopPhotoshop
Photoshop
 

Andere mochten auch

Introduction about wireframing and responsive webdesign
Introduction about wireframing and responsive webdesignIntroduction about wireframing and responsive webdesign
Introduction about wireframing and responsive webdesign
ipmindthegap
 
CSS, CSS Selectors, CSS Box Model
CSS, CSS Selectors, CSS Box ModelCSS, CSS Selectors, CSS Box Model
CSS, CSS Selectors, CSS Box Model
jamiecavanaugh
 
5.1 css box model
5.1 css box model5.1 css box model
5.1 css box model
Bulldogs83
 

Andere mochten auch (20)

Interactive Vector-Graphics in the Browser
Interactive Vector-Graphics in the BrowserInteractive Vector-Graphics in the Browser
Interactive Vector-Graphics in the Browser
 
Introduction about wireframing and responsive webdesign
Introduction about wireframing and responsive webdesignIntroduction about wireframing and responsive webdesign
Introduction about wireframing and responsive webdesign
 
Google's Principle's of Mobile Website Design
Google's Principle's of Mobile Website DesignGoogle's Principle's of Mobile Website Design
Google's Principle's of Mobile Website Design
 
Lecture3
Lecture3Lecture3
Lecture3
 
Next Steps in Responsive Design
Next Steps in Responsive DesignNext Steps in Responsive Design
Next Steps in Responsive Design
 
Webdesign New
Webdesign NewWebdesign New
Webdesign New
 
10 Design and Layout Principles Guaranteed to Improve Your Website V2
10 Design and Layout Principles Guaranteed to Improve Your Website V210 Design and Layout Principles Guaranteed to Improve Your Website V2
10 Design and Layout Principles Guaranteed to Improve Your Website V2
 
CSS Dasar #6 : Background
CSS Dasar #6 : BackgroundCSS Dasar #6 : Background
CSS Dasar #6 : Background
 
CSS Layout Techniques
CSS Layout TechniquesCSS Layout Techniques
CSS Layout Techniques
 
How to Make HTML and CSS Files
How to Make HTML and CSS FilesHow to Make HTML and CSS Files
How to Make HTML and CSS Files
 
CSS Layouting #5 : Position
CSS Layouting #5 : PositionCSS Layouting #5 : Position
CSS Layouting #5 : Position
 
CSS Box Model Presentation
CSS Box Model PresentationCSS Box Model Presentation
CSS Box Model Presentation
 
CSS Box Model
CSS Box ModelCSS Box Model
CSS Box Model
 
Css box model
Css  box modelCss  box model
Css box model
 
CSS Layouting #3 : Box Model
CSS Layouting #3 : Box ModelCSS Layouting #3 : Box Model
CSS Layouting #3 : Box Model
 
CSS, CSS Selectors, CSS Box Model
CSS, CSS Selectors, CSS Box ModelCSS, CSS Selectors, CSS Box Model
CSS, CSS Selectors, CSS Box Model
 
Responsive webdesign
Responsive webdesignResponsive webdesign
Responsive webdesign
 
5.1 css box model
5.1 css box model5.1 css box model
5.1 css box model
 
Responsive web designing ppt(1)
Responsive web designing ppt(1)Responsive web designing ppt(1)
Responsive web designing ppt(1)
 
10 Design & Layout Principles Guaranteed To Improve
10 Design & Layout Principles Guaranteed To Improve10 Design & Layout Principles Guaranteed To Improve
10 Design & Layout Principles Guaranteed To Improve
 

Ähnlich wie Interactive Graphics using Javascript, HTML5 and CSS3

Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
Serge Stinckwich
 
An Introduction to Go
An Introduction to GoAn Introduction to Go
An Introduction to Go
Cloudflare
 
Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)
Thinkful
 
Harmony intune final
Harmony intune finalHarmony intune final
Harmony intune final
MongoDB
 
Playing in Tune: How We Refactored Cube to Terabyte Scale
Playing in Tune: How We Refactored Cube to Terabyte ScalePlaying in Tune: How We Refactored Cube to Terabyte Scale
Playing in Tune: How We Refactored Cube to Terabyte Scale
MongoDB
 
JavaScript: Creative Coding for Browsers
JavaScript: Creative Coding for BrowsersJavaScript: Creative Coding for Browsers
JavaScript: Creative Coding for Browsers
noweverywhere
 

Ähnlich wie Interactive Graphics using Javascript, HTML5 and CSS3 (20)

XRobots
XRobotsXRobots
XRobots
 
Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQuery
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 
HTML5 Animation in Mobile Web Games
HTML5 Animation in Mobile Web GamesHTML5 Animation in Mobile Web Games
HTML5 Animation in Mobile Web Games
 
An Introduction to Go
An Introduction to GoAn Introduction to Go
An Introduction to Go
 
Khan Academy Computer Science
Khan Academy Computer ScienceKhan Academy Computer Science
Khan Academy Computer Science
 
Yavorsky
YavorskyYavorsky
Yavorsky
 
Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)
 
2015 Pharo Prague Lambda Meetup
2015 Pharo Prague Lambda Meetup2015 Pharo Prague Lambda Meetup
2015 Pharo Prague Lambda Meetup
 
Stupid Canvas Tricks
Stupid Canvas TricksStupid Canvas Tricks
Stupid Canvas Tricks
 
Making HTML5 Mobile Games Indistinguishable from Native Apps
Making HTML5 Mobile Games Indistinguishable from Native AppsMaking HTML5 Mobile Games Indistinguishable from Native Apps
Making HTML5 Mobile Games Indistinguishable from Native Apps
 
COMP 4026 Lecture 5 OpenFrameworks and Soli
COMP 4026 Lecture 5 OpenFrameworks and SoliCOMP 4026 Lecture 5 OpenFrameworks and Soli
COMP 4026 Lecture 5 OpenFrameworks and Soli
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
20120514 nodejsdublin
20120514 nodejsdublin20120514 nodejsdublin
20120514 nodejsdublin
 
Harmony intune final
Harmony intune finalHarmony intune final
Harmony intune final
 
Playing in Tune: How We Refactored Cube to Terabyte Scale
Playing in Tune: How We Refactored Cube to Terabyte ScalePlaying in Tune: How We Refactored Cube to Terabyte Scale
Playing in Tune: How We Refactored Cube to Terabyte Scale
 
BINARY DATA ADVENTURES IN BROWSER JAVASCRIPT
BINARY DATA ADVENTURES  IN BROWSER JAVASCRIPTBINARY DATA ADVENTURES  IN BROWSER JAVASCRIPT
BINARY DATA ADVENTURES IN BROWSER JAVASCRIPT
 
Making HTML5 Games with Phaser
Making HTML5 Games with PhaserMaking HTML5 Games with Phaser
Making HTML5 Games with Phaser
 
JavaScript: Creative Coding for Browsers
JavaScript: Creative Coding for BrowsersJavaScript: Creative Coding for Browsers
JavaScript: Creative Coding for Browsers
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
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
 

Kürzlich hochgeladen (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
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...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Interactive Graphics using Javascript, HTML5 and CSS3

Hinweis der Redaktion

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n