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
--[[ | |
Copyright (c) 2009 Noel R. Cower | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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 lerpTable(delta, table) | |
-- assume table is sorted according to order | |
local peak = #table | |
for index = 1,#table do | |
if table[index][1] >= delta then | |
peak = index | |
break | |
end | |
end | |
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
/****************************************************************************** | |
Copyright (c) 2011 Noel R. Cower | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
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
class AnimationBlock | |
constructor: (@fps) -> | |
@millisecondsPerFrame = 1000.0 / fps | |
@animations = [] | |
@interval = null | |
@callback => | |
time = AnimationBlock.getTime() | |
animsCopy = @animations.slice(0) # copy the array | |
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
glfw = require('node-glfw') | |
gl = require('node-webgl').webgl | |
glfw.Init() | |
glfw.OpenWindow 800, 600, 0, 0, 0, 0, 16, 0, glfw.WINDOW | |
glfw.events.addListener 'keyup', (event) -> | |
glfw.CloseWindow() if event.which is glfw.KEY_ESC | |
# /listener |
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
/* | |
Copyright (c) 2012 Noel Cower | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
Show hidden characters
{ | |
"full_name": "A Nameless Jerk", | |
"license_wrap": 80 | |
} |
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
# comment | |
# test | |
_abra!(a, b = nil) -> { | |
# foobaz | |
_abra! = ->{ _abra! = 5; NULL } # wooperton | |
} # burp | |
ab = c * foo(bar) + 5 |
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
# comment | |
# test | |
_abra!(a, b = nil) -> { | |
# foobaz | |
_abra! = -> { _abra! = 5; NULL } # wooperton | |
} # burp | |
ab = c * foo(bar) + 5 |
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
# this | |
class foo { | |
class sublcass < foo { | |
woop(derp) -> { | |
derp(derp) | |
} | |
} | |
} | |
# is the same as this |