I'd like to share the source for my Giant Floating Robot Head demo! It's an app that lets you control a 3D robot head by moving your own head, and uses volume to control the robot's mouth.
Demo is available here:
Code is available here:
http://code.google.com/p/hangout-experiments/source/browse/#git%2Fface
Outside of showing off some relatively straightforward three.js, the app also demonstrates the value of smoothing. The app keeps a 5-frame window of values for tilt/pan/roll and then takes a weighted average of them to choose the face position for that frame. Key source snippets are here:
No comments:
Post a Comment