SlideShare a Scribd company logo
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

More Related Content

What's hot (10)

PPTX
Drawing with the HTML5 Canvas
Henry Osborne
 
PPT
Fast rendering with starling
Flash Conference
 
PDF
Scalable Assets Presentation
Nigel Barber
 
PDF
Mongo db washington dc 2014
ikanow
 
PPT
Canvas in html5 - TungVD
Framgia Vietnam
 
PPTX
nunuStudio Geometrix 2017
José Ferrão
 
PPTX
Improving Game Performance in the Browser
FITC
 
PDF
Tiling and Zooming ASCII Art @ iOSoho
Daniel Doubrovkine
 
PDF
Pruebas mostrando pdf's
recepcioncedir
 
PPTX
Photoshop
Soraya Elsayed
 
Drawing with the HTML5 Canvas
Henry Osborne
 
Fast rendering with starling
Flash Conference
 
Scalable Assets Presentation
Nigel Barber
 
Mongo db washington dc 2014
ikanow
 
Canvas in html5 - TungVD
Framgia Vietnam
 
nunuStudio Geometrix 2017
José Ferrão
 
Improving Game Performance in the Browser
FITC
 
Tiling and Zooming ASCII Art @ iOSoho
Daniel Doubrovkine
 
Pruebas mostrando pdf's
recepcioncedir
 
Photoshop
Soraya Elsayed
 

Viewers also liked (20)

ODP
Interactive Vector-Graphics in the Browser
tec
 
PPTX
Introduction about wireframing and responsive webdesign
ipmindthegap
 
PPTX
Google's Principle's of Mobile Website Design
Mrkt360 Inc.
 
KEY
Lecture3
Lee Lundrigan
 
PDF
Next Steps in Responsive Design
Justin Avery
 
PPT
Webdesign New
lyngdoh
 
PPTX
10 Design and Layout Principles Guaranteed to Improve Your Website V2
Lauren Martin
 
PDF
CSS Dasar #6 : Background
Sandhika Galih
 
PPTX
CSS Layout Techniques
Harshal Patil
 
ODP
How to Make HTML and CSS Files
LearningNerd
 
PDF
CSS Layouting #5 : Position
Sandhika Galih
 
PPSX
CSS Box Model Presentation
Reed Crouch
 
PDF
CSS Box Model
Gerson Abesamis
 
PDF
Css box model
Nicha Jutasirivongse
 
PDF
CSS Layouting #3 : Box Model
Sandhika Galih
 
PPT
CSS, CSS Selectors, CSS Box Model
jamiecavanaugh
 
PDF
Responsive webdesign
Bart De Waele
 
PPT
5.1 css box model
Bulldogs83
 
PPTX
Responsive web designing ppt(1)
admecindia1
 
PPTX
10 Design & Layout Principles Guaranteed To Improve
Lauren Martin
 
Interactive Vector-Graphics in the Browser
tec
 
Introduction about wireframing and responsive webdesign
ipmindthegap
 
Google's Principle's of Mobile Website Design
Mrkt360 Inc.
 
Lecture3
Lee Lundrigan
 
Next Steps in Responsive Design
Justin Avery
 
Webdesign New
lyngdoh
 
10 Design and Layout Principles Guaranteed to Improve Your Website V2
Lauren Martin
 
CSS Dasar #6 : Background
Sandhika Galih
 
CSS Layout Techniques
Harshal Patil
 
How to Make HTML and CSS Files
LearningNerd
 
CSS Layouting #5 : Position
Sandhika Galih
 
CSS Box Model Presentation
Reed Crouch
 
CSS Box Model
Gerson Abesamis
 
Css box model
Nicha Jutasirivongse
 
CSS Layouting #3 : Box Model
Sandhika Galih
 
CSS, CSS Selectors, CSS Box Model
jamiecavanaugh
 
Responsive webdesign
Bart De Waele
 
5.1 css box model
Bulldogs83
 
Responsive web designing ppt(1)
admecindia1
 
10 Design & Layout Principles Guaranteed To Improve
Lauren Martin
 
Ad

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

PDF
XRobots
Dr. Jan Köhnlein
 
PDF
Building a game engine with jQuery
Paul Bakaus
 
PDF
Mobile Web Development with HTML5
Roy Clarkson
 
KEY
Using Smalltalk for controlling robotics systems
Serge Stinckwich
 
PPTX
HTML5 Animation in Mobile Web Games
livedoor
 
PDF
An Introduction to Go
Cloudflare
 
PDF
Khan Academy Computer Science
jeresig
 
PDF
Yavorsky
Maksym Stepanchuk
 
PDF
Build a game with javascript (may 21 atlanta)
Thinkful
 
PDF
2015 Pharo Prague Lambda Meetup
Pharo
 
KEY
Stupid Canvas Tricks
deanhudson
 
PDF
Making HTML5 Mobile Games Indistinguishable from Native Apps
FITC
 
PDF
COMP 4026 Lecture 5 OpenFrameworks and Soli
Mark Billinghurst
 
PDF
Building Dynamic AWS Lambda Applications with BoxLang
Ortus Solutions, Corp
 
PDF
Building Dynamic AWS Lambda Applications with BoxLang
Ortus Solutions, Corp
 
PPTX
Mobile native-hacks
DevelopmentArc LLC
 
KEY
20120514 nodejsdublin
Richard Rodger
 
PDF
Playing in Tune: How We Refactored Cube to Terabyte Scale
MongoDB
 
PDF
Harmony intune final
MongoDB
 
PDF
BINARY DATA ADVENTURES IN BROWSER JAVASCRIPT
Or Hiltch
 
Building a game engine with jQuery
Paul Bakaus
 
Mobile Web Development with HTML5
Roy Clarkson
 
Using Smalltalk for controlling robotics systems
Serge Stinckwich
 
HTML5 Animation in Mobile Web Games
livedoor
 
An Introduction to Go
Cloudflare
 
Khan Academy Computer Science
jeresig
 
Build a game with javascript (may 21 atlanta)
Thinkful
 
2015 Pharo Prague Lambda Meetup
Pharo
 
Stupid Canvas Tricks
deanhudson
 
Making HTML5 Mobile Games Indistinguishable from Native Apps
FITC
 
COMP 4026 Lecture 5 OpenFrameworks and Soli
Mark Billinghurst
 
Building Dynamic AWS Lambda Applications with BoxLang
Ortus Solutions, Corp
 
Building Dynamic AWS Lambda Applications with BoxLang
Ortus Solutions, Corp
 
Mobile native-hacks
DevelopmentArc LLC
 
20120514 nodejsdublin
Richard Rodger
 
Playing in Tune: How We Refactored Cube to Terabyte Scale
MongoDB
 
Harmony intune final
MongoDB
 
BINARY DATA ADVENTURES IN BROWSER JAVASCRIPT
Or Hiltch
 
Ad

Recently uploaded (20)

PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Python basic programing language for automation
DanialHabibi2
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
July Patch Tuesday
Ivanti
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 

Interactive Graphics using Javascript, HTML5 and CSS3

  • 1. While your waiting... • You will want to get: • https://github.com/MacBoyPro/ simple_animation • [email protected]:MacBoyPro/ simple_animation.git
  • 2. Interactive Graphics w/ Javascript, HTML5 and CSS3 Lee Lundrigan
  • 3. 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
  • 5. Tools of the trade • Oxygen XML Editor • http://www.oxygenxml.com • Aptana • http://www.aptana.com • TextEdit (on Mac) • TextPad (on Windows)
  • 6. Course Topics • Animation • 2D and 3D / HTML5 Canvas • Collision detection • Sprites • Sound • Interaction • Best practices
  • 7. 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
  • 8. 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.
  • 9. Coordinate System • Cartesian Coordinate System • Starts in upper left • Origin is (0,0) 0 0
  • 10. Animation • setInterval(code,millisec); • repeats until cleared • setTimeout(code, millisec); • Fires the event once • Note: There are 1000 milliseconds in one second.
  • 12. Lab - Simple Animation
  • 13. Collision Detection • Bounding box • Test using object’s center • {x: 10, y: 10}
  • 14. 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
  • 15. Keyboard Movement • document.onkeydown • detect character code • left: 37 right: 39 • set moving true • document.onkeyup • set moving false
  • 16. Keyboard Movement Cont... • Webkit based browsers have a bug • the keypress event doesn’t work for the arrow keys
  • 17. Lab - Game time

Editor's Notes