Sha256: 3907da5641ade5414ea51055f9f95f32db1366b27c735b511a60808ac11d9b53
Contents?: true
Size: 661 Bytes
Versions: 43
Compression:
Stored size: 661 Bytes
Contents
%w[xot rays reflex processing] .map {|s| File.expand_path "../../#{s}/lib", __dir__} .each {|s| $:.unshift s if !$:.include?(s) && File.directory?(s)} require 'processing' using Processing w, h = width, height cam = Capture.new w, h, Capture.list.last cam.start images = 60.times.map { Graphics.new w, h } draw do if frameCount % 2 == 0 images.unshift images.pop images.first.tap do |image| image.beginDraw { image.image cam, 0, 0 } end end background 0 segment_h= h / images.size images.each.with_index do |image, i| y = i * segment_h copy image, 0, y, w, segment_h, 0, y, w, segment_h end end
Version data entries
43 entries across 43 versions & 1 rubygems