commit de72f31357a98349ae1a75906cfb8abc9d23743a Author: 4ndr3 Date: Thu Sep 3 11:26:21 2015 +0000 ffnord-con-2015-2 hinzugefügt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ff3b68 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +#alle Dateien ignorieren... +* + +#ausser... +!/ffnord-con-2015-2 +!/ffnord-con-2015-2/* +!/ffnord-con-2015-2/*/* +!/ffnord-con-2015-2/*/*/* +!.gitignore +!README diff --git a/ffnord-con-2015-2/29c3/LICENSE.txt b/ffnord-con-2015-2/29c3/LICENSE.txt new file mode 100644 index 0000000..bfb23a2 --- /dev/null +++ b/ffnord-con-2015-2/29c3/LICENSE.txt @@ -0,0 +1,2 @@ +Font is Source Code Pro: + http://store1.adobe.com/cfusion/store/html/index.cfm?event=displayFont&code=SOUC10003050 diff --git a/ffnord-con-2015-2/29c3/bold.ttf b/ffnord-con-2015-2/29c3/bold.ttf new file mode 100644 index 0000000..5f39b69 Binary files /dev/null and b/ffnord-con-2015-2/29c3/bold.ttf differ diff --git a/ffnord-con-2015-2/29c3/light.ttf b/ffnord-con-2015-2/29c3/light.ttf new file mode 100644 index 0000000..1c68ee3 Binary files /dev/null and b/ffnord-con-2015-2/29c3/light.ttf differ diff --git a/ffnord-con-2015-2/29c3/node.lua b/ffnord-con-2015-2/29c3/node.lua new file mode 100644 index 0000000..3420be4 --- /dev/null +++ b/ffnord-con-2015-2/29c3/node.lua @@ -0,0 +1,26 @@ +gl.setup(1280, 720) + +local scramble = require "scramble" + +util.auto_loader(_G) + +function write(font, x, y, text, size, r, g, b, a) + local s = scramble.scramble(text) + return function() + font:write(x, y, s(), size, r, g, b, a) + end +end + +local lines = { + write(light, 350, 0 * 144, "f/f.n[o", 140, 1 ,.706,0 ,.8), + write(light, 50 , 1 * 144, "r.d/-]>", 140, .8 ,.8 ,.7 ,.8), + write(light, 600, 2 * 144, "c.o-n/ ", 140, .863,0 ,.404,.8), + write(light, 50 , 3 * 144, " / -2.0", 140, .7 ,.7 ,.7 ,.8), + write(bold, 350, 4 * 144, "1(5).-2", 140, 0 ,.62 ,.878,.8), +} + +function node.render() + for i = 1, #lines do + lines[i]() + end +end diff --git a/ffnord-con-2015-2/29c3/scramble.lua b/ffnord-con-2015-2/29c3/scramble.lua new file mode 100644 index 0000000..279872b --- /dev/null +++ b/ffnord-con-2015-2/29c3/scramble.lua @@ -0,0 +1,90 @@ +local sys = require "sys" +local math = require "math" +local table = require "table" +local base = _G + +module("scramble") + +function scramble(text) + local all_breaks = '/.-{}()[]<>|,;!?' + local breaks = {} + for idx = 1, #all_breaks do + breaks[all_breaks:sub(idx, idx)]=true + end + -- print(#breaks) + local mode = "up" + local interval = 0.2 + local swap_end + local next_action = sys.now() + interval + local stack = {} + + local function is_break(text, pos) + local char = text:sub(pos, pos) + local is_break = breaks[char] + -- print(char, is_break) + return is_break, char + end + local function random_break() + local pos = math.random(1, #all_breaks) + return all_breaks:sub(pos, pos) + end + local function replace2(text, pos, c1, c2) + return text:sub(1, pos-1) .. c1 .. c2 .. text:sub(pos+2) + end + local function replace(text, pos, c) + return text:sub(1, pos-1) .. c .. text:sub(pos+1) + end + + local function get() + local now = sys.now() + if now > next_action then + -- print(mode) + if mode == "up" then + local pos, is_1_break, is_2_break, char_1, char_2 + repeat + pos = math.random(1, #text-1) + is_1_break, char_1 = is_break(text, pos) + is_2_break, char_2 = is_break(text, pos+1) + until is_1_break ~= is_2_break + -- print(pos, is_1_break, is_2_break) + + if is_1_break then + table.insert(stack, {pos, random_break(), char_2}) + text = replace2(text, pos, char_2, random_break()) + else + table.insert(stack, {pos, char_1, random_break()}) + text = replace2(text, pos, random_break(), char_1) + end + interval = interval - 0.01 + if interval < 0.02 then + mode = "down" + end + elseif mode == "down" then + local pos, char1, char2 = base.unpack(table.remove(stack, #stack)) + text = replace2(text, pos, char1, char2) + interval = interval + 0.01 + if #stack == 0 then + mode = "swap" + swap_end = now + 15 + interval = 2 + end + elseif mode == "swap" then + local pos, is_break_char, _ + repeat + pos = math.random(1, #text-1) + is_break_char, _ = is_break(text, pos) + until is_break_char + text = replace(text, pos, random_break()) + if now > swap_end then + interval = 0.2 + mode = "up" + end + end + next_action = now + interval + end + return text + end + return get +end + + diff --git a/ffnord-con-2015-2/31c3/COPYRIGHT b/ffnord-con-2015-2/31c3/COPYRIGHT new file mode 100644 index 0000000..01cea36 --- /dev/null +++ b/ffnord-con-2015-2/31c3/COPYRIGHT @@ -0,0 +1,7 @@ +Created by Florian Wesch + +This work is licensed under a Creative Commons Attribution 4.0 International License. +http://creativecommons.org/licenses/by/4.0/ + +The tiles.png, package.png, screenshot.jpg are based on the design by graphorama +http://www.graphorama.de/blog/31c3-das-design/ diff --git a/ffnord-con-2015-2/31c3/README.creole b/ffnord-con-2015-2/31c3/README.creole new file mode 100644 index 0000000..d478c5a --- /dev/null +++ b/ffnord-con-2015-2/31c3/README.creole @@ -0,0 +1,6 @@ += A 31c3 themed background pattern + +{{screenshot.jpg|Screenshot}} + +Background pattern for the +[[http://events.ccc.de/congress/2014/wiki/Static:Main_Page|31c3 conference in Hamburg]]. diff --git a/ffnord-con-2015-2/31c3/node.json b/ffnord-con-2015-2/31c3/node.json new file mode 100644 index 0000000..2cf832e --- /dev/null +++ b/ffnord-con-2015-2/31c3/node.json @@ -0,0 +1,4 @@ +{ + "name": "31c3 Pattern", + "options": [] +} diff --git a/ffnord-con-2015-2/31c3/node.lua b/ffnord-con-2015-2/31c3/node.lua new file mode 100644 index 0000000..48a7328 --- /dev/null +++ b/ffnord-con-2015-2/31c3/node.lua @@ -0,0 +1,29 @@ +gl.setup(NATIVE_WIDTH, NATIVE_HEIGHT) + +sys.set_flag("slow_gc") + +util.resource_loader{ + "shader31c3.frag"; + "noise.png"; + "tiles.png"; +} + +function node.render() + local now = sys.now() + + local x = math.sin(now/62) * 320 + local y = math.cos(now/128) * 200 + + gl.perspective(80 + math.cos(now/5) * 3, x + math.sin(now/14)*10, y + math.cos(now/14.4)*20, -100, x, y, 0) + gl.rotate(math.cos(now/9)*5, 0, 0, 1) + + shader31c3:use{ + time = now / 1234.5; + noise = noise; + tile_res = {16, 16}; + res = {16.0 * 12, 16.0 * 12}; + } + + local size = 40 + tiles:draw(-16*size, -16*size, 16*size, 16*size) +end diff --git a/ffnord-con-2015-2/31c3/noise.png b/ffnord-con-2015-2/31c3/noise.png new file mode 100644 index 0000000..2597b80 Binary files /dev/null and b/ffnord-con-2015-2/31c3/noise.png differ diff --git a/ffnord-con-2015-2/31c3/package.json b/ffnord-con-2015-2/31c3/package.json new file mode 100644 index 0000000..4b7a375 --- /dev/null +++ b/ffnord-con-2015-2/31c3/package.json @@ -0,0 +1,6 @@ +{ + "name": "Animated background pattern", + "author": "fw@dividuum.de", + "desc": "Background pattern created for the 31c3 conference in Hamburg", + "repository": "https://github.com/info-beamer/package-31c3-background" +} diff --git a/ffnord-con-2015-2/31c3/package.png b/ffnord-con-2015-2/31c3/package.png new file mode 100644 index 0000000..ea75a43 Binary files /dev/null and b/ffnord-con-2015-2/31c3/package.png differ diff --git a/ffnord-con-2015-2/31c3/screenshot.jpg b/ffnord-con-2015-2/31c3/screenshot.jpg new file mode 100644 index 0000000..61054a4 Binary files /dev/null and b/ffnord-con-2015-2/31c3/screenshot.jpg differ diff --git a/ffnord-con-2015-2/31c3/shader31c3.frag b/ffnord-con-2015-2/31c3/shader31c3.frag new file mode 100644 index 0000000..cb925af --- /dev/null +++ b/ffnord-con-2015-2/31c3/shader31c3.frag @@ -0,0 +1,28 @@ +uniform sampler2D Texture; +uniform sampler2D noise; +varying vec2 TexCoord; +uniform float time; +uniform vec2 res; +uniform vec2 tile_res; + +const vec2 one = vec2(1.0, 1.0); + +void main() { + vec2 tcoord_res = TexCoord * res; + vec2 noise_vec1 = vec2(0.0, time * 0.8); + vec2 noise_vec2 = noise_vec1 + vec2(time * 0.9, 0.0); + + vec2 pos = floor(tcoord_res) / res; + + float foo = texture2D(noise, mod(pos * 41.0 + noise_vec1, one)).x; + float bar = texture2D(noise, mod(pos * 5.0 + noise_vec2, one)).x; + + vec2 t = vec2(foo, bar); + t = floor(t * tile_res) / tile_res; + + // gl_FragColor = vec4(t, 0.0, 1.0); + gl_FragColor = vec4(texture2D( + Texture, + mod(tcoord_res, one) / tile_res + t + ).rgb, 1.0); +} diff --git a/ffnord-con-2015-2/31c3/tiles.png b/ffnord-con-2015-2/31c3/tiles.png new file mode 100644 index 0000000..09a3a3d Binary files /dev/null and b/ffnord-con-2015-2/31c3/tiles.png differ diff --git a/ffnord-con-2015-2/README b/ffnord-con-2015-2/README new file mode 100644 index 0000000..062b63f --- /dev/null +++ b/ffnord-con-2015-2/README @@ -0,0 +1,3 @@ +Animation für die ffnord->con2015.2 in Hamburg; zusammengeabaut aus Animationen vom 29c3 [ https://github.com/dividuum/info-beamer-nodes/tree/master/29c3-logo ] und 31c3 [ https://github.com/info-beamer/package-31c3-background ] + +Die 31C3-logos im Hintergrund sollen noch gegen Freifunklogos getauscht werden. diff --git a/ffnord-con-2015-2/node.lua b/ffnord-con-2015-2/node.lua new file mode 100644 index 0000000..c3eec37 --- /dev/null +++ b/ffnord-con-2015-2/node.lua @@ -0,0 +1,6 @@ +gl.setup(1280, 720) + +function node.render() + resource.render_child("31c3"):draw(0, 0, 1280, 720) + resource.render_child("29c3"):draw(0, 0, 1280, 720) +end