study note_{Three.js}

3D in Web journey starts! Trying to convert last week’s sketch from Processing into Three.js. But can’t finished it by Monday for the class, still in progress… Here’s what I got so far(WARNING: ROUGH), and below are the notes on translating Processing into JavaScript. Will organized it once I finish the work. Stay tuned!

Experience I learned from banging my head against bloody wall

  1. put your codes in function and then execute them by calling the function
    • tried to rotate my goddamn tetrahedron without doing this and had been failing for nearly 2 hours, just kept failing and failing and failing….
  2. OOP
    • links
      • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript
      • http://stackoverflow.com/questions/572897/how-does-javascript-prototype-work
      • https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js/issues/8
      • http://javascriptissexy.com/javascript-prototype-in-plain-detailed-language/
      • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/prototype
      • http://www.objectplayground.com/
  3. color
    • if using HSL, material.color.setHSL( h, s, l); –> *careful* can’t set s, l both to 1, it’d be white even though h < 1
  4. Web Audio API
    • http://srchea.com/experimenting-with-web-audio-api-three-js-webgl
  5. Clickable!!
    • http://soledadpenades.com/articles/three-js-tutorials/object-picking/
    • http://threejs.org/examples/canvas_interactive_cubes.html
    • http://stackoverflow.com/questions/11036106/three-js-projector-and-ray-objects

Face and Spider_60 sec. animation_{stages * 3}

Audio wave research time!

Totally not what I planed to do. I ended up make a story about a face and a spider. And it’s a face I guess represents the dark side of human beings. Scared easily by the unknown, and psyched about seeing spider being bullied by boxes.

3 stages story. Codes are gross and messy because I stayed up all night and was unconscious most of the time, and it can’t be played in Openprocessing I don’t know why… But. I kind of like the result even though it’s rough as hell, and I plan to make a v.2 of this.  Soon.

Codes

Continue reading