SlideShare a Scribd company logo
Interactive Graphics
   w/ Javascript,
  HTML5 and CSS3
      Lee Lundrigan
       Sarah Allen
Class Materials

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

  • git@github.com:blazingcloud/
    simple_animation.git
Who are we?

• Blazing Cloud, Inc.
  • Product Development Consultancy
  • Training
• Lean Startup, Customer Development
• Languages: HTML, CSS, Javascript,
  Ruby, Objective-C, Java
Who are we?
• Lee Lundrigan
 • iOS, Mac and Mobile Web specialist
 • Wrote a cross mobile browser CSS
    framework that ran on iPhone,
    Android, Blackberry and WinMo

• Sarah Allen
 • 20 years of Product Experience
 • After Effects, Shockwave, Flash
    video, Open Laszlo, Lean Startup
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

More Related Content

KEY
Interactive Graphics using Javascript, HTML5 and CSS3
KEY
PDF
Practical HTML5: Using It Today
PPTX
HTML5 Graphics
PDF
Web Development with HTML5, CSS3 & JavaScript
PPTX
Animation programming
ZIP
Back To The Future.Key 2
PPTX
HTML5 - Chances and Pitfalls (Bytro Labs GmbH)
Interactive Graphics using Javascript, HTML5 and CSS3
Practical HTML5: Using It Today
HTML5 Graphics
Web Development with HTML5, CSS3 & JavaScript
Animation programming
Back To The Future.Key 2
HTML5 - Chances and Pitfalls (Bytro Labs GmbH)

Similar to Interactive Graphics w/ Javascript, HTML5 and CSS3 (20)

PPTX
HTML5 Animation in Mobile Web Games
PDF
Intro to HTML5
PPTX
HTML5 for Rich User Experience
PPTX
PDF
Back To The Future
PDF
Intro to HTML5 Game Programming
KEY
Web Apps
PDF
HTML5: where flash isn't needed anymore
PPTX
Javascript Animation with Canvas - Gregory Starr 2015
PPT
Google tools for webmasters
PPTX
HTML5: An Overview
PDF
[arra]stre Tech Talk
PPTX
Bringing HTML5 alive in SharePoint
KEY
Best Practices for Webcam Augmented Reality
PDF
PDF
Developing Interactive 3D Experiences in HTML5 with Carlos Ulloa
PDF
W3C HTML5 KIG-The complete guide to building html5 games
KEY
Rockstar Graphics with HTML5
PPTX
Improving Game Performance in the Browser
HTML5 Animation in Mobile Web Games
Intro to HTML5
HTML5 for Rich User Experience
Back To The Future
Intro to HTML5 Game Programming
Web Apps
HTML5: where flash isn't needed anymore
Javascript Animation with Canvas - Gregory Starr 2015
Google tools for webmasters
HTML5: An Overview
[arra]stre Tech Talk
Bringing HTML5 alive in SharePoint
Best Practices for Webcam Augmented Reality
Developing Interactive 3D Experiences in HTML5 with Carlos Ulloa
W3C HTML5 KIG-The complete guide to building html5 games
Rockstar Graphics with HTML5
Improving Game Performance in the Browser
Ad

More from Blazing Cloud (20)

PDF
Rails ORM De-mystifying Active Record has_many
PDF
Active Record Introduction - 3
PDF
Rails Class Intro - 1
PDF
Your first rails app - 2
PDF
RSpec Quick Reference
PDF
Extending rails
KEY
2day Ruby Class Intro
KEY
Mobile Lean UX
KEY
Interactive Graphics
KEY
Form helpers
KEY
Intro to Ruby (and RSpec)
KEY
What you don't know (yet)
KEY
Introduction to Rails
KEY
ActiveRecord
KEY
Ruby on Rails Class intro
KEY
Ruby on rails toolbox
KEY
Routes Controllers
KEY
Test Driven Development
KEY
Active Record
KEY
Enumerables
Rails ORM De-mystifying Active Record has_many
Active Record Introduction - 3
Rails Class Intro - 1
Your first rails app - 2
RSpec Quick Reference
Extending rails
2day Ruby Class Intro
Mobile Lean UX
Interactive Graphics
Form helpers
Intro to Ruby (and RSpec)
What you don't know (yet)
Introduction to Rails
ActiveRecord
Ruby on Rails Class intro
Ruby on rails toolbox
Routes Controllers
Test Driven Development
Active Record
Enumerables
Ad

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
Teaching material agriculture food technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
Encapsulation theory and applications.pdf
Approach and Philosophy of On baking technology
Spectral efficient network and resource selection model in 5G networks
MIND Revenue Release Quarter 2 2025 Press Release
cuic standard and advanced reporting.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.
Dropbox Q2 2025 Financial Results & Investor Presentation
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Per capita expenditure prediction using model stacking based on satellite ima...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Teaching material agriculture food technology
Big Data Technologies - Introduction.pptx
Unlocking AI with Model Context Protocol (MCP)

Interactive Graphics w/ Javascript, HTML5 and CSS3

  • 1. Interactive Graphics w/ Javascript, HTML5 and CSS3 Lee Lundrigan Sarah Allen
  • 2. Class Materials • You will want to get: • https://github.com/blazingcloud/ simple_animation • git@github.com:blazingcloud/ simple_animation.git
  • 3. Who are we? • Blazing Cloud, Inc. • Product Development Consultancy • Training • Lean Startup, Customer Development • Languages: HTML, CSS, Javascript, Ruby, Objective-C, Java
  • 4. Who are we? • Lee Lundrigan • iOS, Mac and Mobile Web specialist • Wrote a cross mobile browser CSS framework that ran on iPhone, Android, Blackberry and WinMo • Sarah Allen • 20 years of Product Experience • After Effects, Shockwave, Flash video, Open Laszlo, Lean Startup
  • 6. Tools of the trade • Oxygen XML Editor • http://www.oxygenxml.com • Aptana • http://www.aptana.com • TextEdit (on Mac) • TextPad (on Windows)
  • 7. Course Topics • Animation • 2D and 3D / HTML5 Canvas • Collision detection • Sprites • Sound • Interaction • Best practices
  • 8. 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
  • 9. 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.
  • 10. Coordinate System • Cartesian Coordinate System • Starts in upper left • Origin is (0,0) 0 0
  • 11. Animation • setInterval(code,millisec); • repeats until cleared • setTimeout(code, millisec); • Fires the event once • Note: There are 1000 milliseconds in one second.
  • 13. Lab - Simple Animation
  • 14. Collision Detection • Bounding box • Test using object’s center • {x: 10, y: 10}
  • 15. 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
  • 16. Keyboard Movement • document.onkeydown • detect character code • left: 37 right: 39 • set moving true • document.onkeyup • set moving false
  • 17. Keyboard Movement Cont... • Webkit based browsers have a bug • the keypress event doesn’t work for the arrow keys
  • 18. Lab - Game time

Editor's Notes