This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bezier(pts) { | |
return function (t) { | |
for (var a = pts; a.length > 1; a = b) // do..while loop in disguise | |
for (var i = 0, b = [], j; i < a.length - 1; i++) // cycle over control points | |
for (b[i] = [], j = 0; j < a[i].length; j++) // cycle over dimensions | |
b[i][j] = a[i][j] * (1 - t) + a[i+1][j] * t; // interpolation | |
return a[0]; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var FlexKeyboardHandler = FlexKeyboardHandler || {} | |
FlexKeyboardHandler.setup = function () | |
{ | |
window.addEventListener("keypress", FlexKeyboardHandler.keydownHandler, true); | |
window.addEventListener("keydown", FlexKeyboardHandler.keydownHandler, true); | |
getFlexApplication("MyApp").addEventListener("keypress", FlexKeyboardHandler.keydownHandler, true); | |
getFlexApplication("MyApp").addEventListener("keypress", FlexKeyboardHandler.keydownHandler, false); | |
window.focus(); | |
}; |
NewerOlder