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
Lee Lundrigan
 
KEY
Iagc2
Lee Lundrigan
 
PDF
Practical HTML5: Using It Today
Doris Chen
 
PPTX
HTML5 Graphics
Murillo Grubler
 
PDF
Web Development with HTML5, CSS3 & JavaScript
Edureka!
 
PPTX
Animation programming
Stanley Fok
 
ZIP
Back To The Future.Key 2
gueste8cc560
 
PPTX
HTML5 - Chances and Pitfalls (Bytro Labs GmbH)
Felix Faber
 
Interactive Graphics using Javascript, HTML5 and CSS3
Lee Lundrigan
 
Practical HTML5: Using It Today
Doris Chen
 
HTML5 Graphics
Murillo Grubler
 
Web Development with HTML5, CSS3 & JavaScript
Edureka!
 
Animation programming
Stanley Fok
 
Back To The Future.Key 2
gueste8cc560
 
HTML5 - Chances and Pitfalls (Bytro Labs GmbH)
Felix Faber
 

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

PPTX
HTML5 Animation in Mobile Web Games
livedoor
 
PDF
Intro to HTML5
Jussi Pohjolainen
 
PPTX
HTML5 for Rich User Experience
Mahbubur Rahman
 
PPTX
Html5
Ahmed Jadalla
 
PDF
Back To The Future
Bill Scott
 
PDF
Intro to HTML5 Game Programming
James Williams
 
KEY
Web Apps
Tim Wray
 
PDF
HTML5: where flash isn't needed anymore
Remy Sharp
 
PPTX
Javascript Animation with Canvas - Gregory Starr 2015
Gregory Starr
 
PPT
Google tools for webmasters
Rujata Patil
 
PPTX
HTML5: An Overview
Nagendra Um
 
PDF
[arra]stre Tech Talk
Genevieve Smith-Nunes
 
PPTX
Bringing HTML5 alive in SharePoint
Chad Schroeder
 
KEY
Best Practices for Webcam Augmented Reality
Zugara
 
PDF
ART169_tut_flash
Márcio Antônio Moraes Reyes
 
PDF
Developing Interactive 3D Experiences in HTML5 with Carlos Ulloa
FITC
 
PDF
W3C HTML5 KIG-The complete guide to building html5 games
Changhwan Yi
 
KEY
Rockstar Graphics with HTML5
Dave Balmer
 
PPTX
Improving Game Performance in the Browser
FITC
 
HTML5 Animation in Mobile Web Games
livedoor
 
Intro to HTML5
Jussi Pohjolainen
 
HTML5 for Rich User Experience
Mahbubur Rahman
 
Back To The Future
Bill Scott
 
Intro to HTML5 Game Programming
James Williams
 
Web Apps
Tim Wray
 
HTML5: where flash isn't needed anymore
Remy Sharp
 
Javascript Animation with Canvas - Gregory Starr 2015
Gregory Starr
 
Google tools for webmasters
Rujata Patil
 
HTML5: An Overview
Nagendra Um
 
[arra]stre Tech Talk
Genevieve Smith-Nunes
 
Bringing HTML5 alive in SharePoint
Chad Schroeder
 
Best Practices for Webcam Augmented Reality
Zugara
 
Developing Interactive 3D Experiences in HTML5 with Carlos Ulloa
FITC
 
W3C HTML5 KIG-The complete guide to building html5 games
Changhwan Yi
 
Rockstar Graphics with HTML5
Dave Balmer
 
Improving Game Performance in the Browser
FITC
 
Ad

More from Blazing Cloud (20)

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

Recently uploaded (20)

PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PPTX
The Power of IoT Sensor Integration in Smart Infrastructure and Automation.pptx
Rejig Digital
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
Enable Enterprise-Ready Security on IBM i Systems.pdf
Precisely
 
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
AVTRON Technologies LLC
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Shreyas_Phanse_Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
SHREYAS PHANSE
 
PPTX
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
DOCX
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
DevOps & Developer Experience Summer BBQ
AUGNYC
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
agentic-ai-and-the-future-of-autonomous-systems.pdf
siddharthnetsavvies
 
PDF
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
The Power of IoT Sensor Integration in Smart Infrastructure and Automation.pptx
Rejig Digital
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
Enable Enterprise-Ready Security on IBM i Systems.pdf
Precisely
 
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
AVTRON Technologies LLC
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
Software Development Methodologies in 2025
KodekX
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Shreyas_Phanse_Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
SHREYAS PHANSE
 
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
DevOps & Developer Experience Summer BBQ
AUGNYC
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
agentic-ai-and-the-future-of-autonomous-systems.pdf
siddharthnetsavvies
 
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
Doc9.....................................
SofiaCollazos
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 

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 • [email protected]: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