Skip to content

Instantly share code, notes, and snippets.

View ggcrunchy's full-sized avatar

Steven Johnson ggcrunchy

View GitHub Profile
@ggcrunchy
ggcrunchy / Image1.jpg
Last active June 3, 2016 22:53
Mesh curve
Image1.jpg
@ggcrunchy
ggcrunchy / circles.lua
Last active May 8, 2016 18:28
Circumcircle and incircle code + test from article
--
-- 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:
--
-- The above copyright notice and this permission notice shall be
@ggcrunchy
ggcrunchy / glowy_ball.lua
Last active May 8, 2016 18:31
Glowy noise-based ball, camping it here until I give it a proper home (it's been lingering in a random main.lua)
--
-- 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:
--
-- The above copyright notice and this permission notice shall be
@ggcrunchy
ggcrunchy / main.lua
Created July 26, 2015 04:53
Demonstrates an issue with removeSelf as a validity test
local widget = require("widget") -- Not used in this Gist, but seems to be necessary
local composer = require("composer")
composer.gotoScene("test_scene")
@ggcrunchy
ggcrunchy / Image.jpg
Last active August 29, 2015 14:24
Multi-pass blur shader example
Image.jpg
@ggcrunchy
ggcrunchy / Text.png
Last active August 29, 2015 14:24
Wavy text shader example
Text.png
@ggcrunchy
ggcrunchy / main.lua
Last active August 29, 2015 14:24
Glass-filling shader example
--- Shader-based example for filling a glass X percent.
--
-- 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:
@ggcrunchy
ggcrunchy / kernel_filter_custom_heat.lua
Last active November 19, 2015 21:18
Heat haze example
--- Heat haze shader.
--
-- 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:
@ggcrunchy
ggcrunchy / kernel_generator_custom_simplex2.lua
Last active August 29, 2015 14:17
Simplex noise-based shader
--- An example shader that uses simplex noise.
--
-- 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: