Giter VIP home page Giter VIP logo

head-first-html5's People

Contributors

bethrobson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

head-first-html5's Issues

Chapter 8 Videobooth.js

Where is the exercise to complete this code?

I believe the code would have to be added into the videobooth.html for a button to be pressed for an additional filter, but I couldn't
find the exercise in the book or anywhere online. Thanks in advance! Awesome book(s) by the way!!

/*

  • bwcartoon is an extra filter for an exercise
    */
    function bwcartoon(pos, r, g, b, outputData) {
    var offset = pos * 4;
    if (outputData[offset] < 120) {
    outputData[offset] = 80;
    outputData[++offset] = 80;
    outputData[++offset] = 80;
    } else {
    outputData[offset] = 255;
    outputData[++offset] = 255;
    outputData[++offset] = 255;
    }
    outputData[++offset] = 255;
    ++offset;
    }

ch.8 videobooth.js problem

I'm following through the examples in the book, both are great by the way! And I'm running into a problem with Ch.8 videobooth. I looked on the wickedlysmart homepage for ways to contact your team, this seemed the most appropriate.

I was having an awful time getting the video and canvas effects working in real time. Only Chrome was playing the video in real time and updating the effects with the toggles at the same time. Firefox & Safari both had an issue where I would hit play, hear audio but no video would be updated, hit pause, then play again, then a single frame of video would be rendered with the effects. I'm hosting off localserver and experimented on my own website so file:// isn't the problem.

I think the problem is with requestAnimationFrame. When I reset to the old way of setTimeout, things seemed to work better. After fiddling around, I could only deduce that requestAnimationFrame needed some kind of intervall call, since it was only updating when I hit the pause and then the play button.

After some searching, I found a polyfill solution on gist at https://gist.github.com/paulirish/1579671 that smooths out the effect rendering in Firefox but still only renders every 10-15 frames on Safari.

Any ideas for an improved workaround? I think Safari and Chrome use the same WebKit engine, though I could be wrong.

I'm on a Mac osx 10.8.4, Firefox 22.0, Safari 6.0.5, Chrome 27.0.1453.116

Thank you again for putting up all these great examples and comments inside the code, they really help me learn a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.