JavaScript Creativity

Book description

"

JavaScript Creativity teaches you how to use every feature of this versatile and powerful language in exciting and creative ways. JavaScript can be used for so much more than simple interactivity. Master your use of canvas, animation, audio and video, 3D visualizations, motion detection and real-time collaboration. In every chapter of this book you will learn how to use and evolve JavaScript's creative capabilities in your own projects, as well as having project examples to follow throughout. Specifically, you will learn how to:

  • Expertly use canvas and animation
  • Push audio and video to their full capabilities
  • Code and manipulate advanced 3D visualizations
  • Create your own music directly from the browser
  • Implement real-time collaboration with Node.js
  • Explore real-time audio and video with WebRTC
  • Play with motion detection and gesture control
  • Combine all features into one social music creation experiment, similar to Google's 'Jam with Chrome'
JavaScript Creativity is for the developer who has a working knowledge of JavaScript and wants to take their code to the next level. Every feature explored can be manipulated and implemented in your everyday projects to really impress your clients or just increase your code skill. This book is an exciting, action-packed introduction to all the advanced and truly creative aspects of this language - start creative coding today! "

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Author
  8. About the Technical Reviewer
  9. Acknowledgments
  10. Foreword
  11. Chapter 1: Introduction
    1. What You Need to Know
      1. CSS
      2. Debugging
      3. Browser Compatibility
      4. JavaScript Console
      5. Sources
      6. Timeline
      7. Canvas Profiles
    2. Summary
  12. Chapter 2: Canvas and Animation Basics
    1. What Is Canvas?
      1. RequestAnimationFrame
      2. Linear Interpolation
      3. Follow the Mouse
      4. Bouncing Box
    2. “Clever” Animation
    3. Introducing Drag-and-Drop
      1. Making the Paintbrush
    4. Summary
  13. Chapter 3: Audio and Video Basics
    1. Containers and Codecs
      1. Containers
      2. Codecs
      3. Encoding Videos
      4. Browser Compatibility
    2. Using the <audio> and <video> elements
      1. <audio>
      2. <video>
    3. Attributes and Properties
      1. Controls
      2. Autoplay
      3. Preload
      4. Loop
      5. Played
      6. Buffered
      7. Duration
      8. Volume
      9. Playback Rate
      10. Network State
    4. Web Audio API
      1. Analyzing Audio
      2. Frequency Visualization
      3. Spectrogram
      4. Web Audio API Nodes
    5. Manipulating Video
    6. Summary
  14. Chapter 4: Beginning 3D
    1. Basics of 3D
      1. Three.js
      2. Data Visualizations
    2. Summary
  15. Chapter 5: Creating Music in the Browser
    1. Music Theory
      1. Creating a Keyboard
    2. Summary
  16. Chapter 6: The Music Player
    1. Media Player
      1. Specification
      2. Where to Start
      3. Playlists
      4. Player Object
      5. Main App View
      6. Drag and Drop
      7. Integrating the Music Creation
      8. Music Visualization
    2. Summary
  17. Chapter 7: Real-time Collaboration with Node.js
    1. Making a Chatroom
      1. Installing Node.js
      2. Socket.IO and Express
    2. Summary
  18. Chapter 8: Video-to-Video Using WebRTC
    1. Introduction to WebRTC
      1. GetUserMedia(   )
      2. Specifications
      3. Servers
      4. Where to Start?
    2. Technologies Behind WebRTC
      1. ICE
      2. NAT Traversal
      3. STUN/TURN
      4. SDP
    3. Client-side Code
    4. Summary
  19. Chapter 9: Motion Detection
    1. An Introduction to Motion Detection
      1. Boilerplate for Video Manipulation
      2. Basic Video Manipulation
      3. Motion Detection
    2. Motion Tracking
      1. Haar-like Features
      2. Viola–Jones
      3. Using js-objectDetect
    3. Summary
  20. Chapter 10: Interacting with the Browser Using Gestures
    1. Taking the Keyboard Server-Side
    2. Controlling the Music with a Webcam
    3. Summary
  21. Chapter 11: Appendix
    1. The Future
    2. Further Reading
      1. Algorithms
    3. Links
      1. Chapter 1
      2. Chapter 3
      3. Chapter 4
      4. Chapter 5
      5. Chapter 6
      6. Chapter 7
      7. Chapter 8
      8. Chapter 9
  22. Index

Product information

  • Title: JavaScript Creativity
  • Author(s): Shane Hudson
  • Release date: June 2014
  • Publisher(s): Apress
  • ISBN: 9781430259442