Skip to content

Instantly share code, notes, and snippets.

@Polyrhythm
Created October 8, 2016 04:54
Show Gist options
  • Save Polyrhythm/e3a6688403a33841760edd55a7cecb33 to your computer and use it in GitHub Desktop.
Save Polyrhythm/e3a6688403a33841760edd55a7cecb33 to your computer and use it in GitHub Desktop.
(ns game.scenes.one-two.core)
(defn glitch [duration]
(timeline [(tween {:analog-glitch {:color-drift 0.3 :scanline-jitter 0.3}} Camera/main duration)
(tween {:analog-glitch {:color-drift 0 :scanline-jitter 0}} Camera/main duration)])))
(defn init-scene []
(setup-scene))
(deftween [:analog-glitch :color-drift] [this]
{:get (.colorDrift this)
:base (a/cmpt this AnalogGlitch)
:base-tag AnalogGlitch
:tag System.Single})
(deftween [:analog-glitch :scanline-jitter] [this]
{:get (.scanLineJitter this)
:base (a/cmpt this AnalogGlitch)
:base-tag AnalogGlitch
:tag System.Single})
;==========================
(ns game.scene-manager
(:require [game.scenes.one-two.core :as one-two])
(defn start-game [])
(hook+ some-obj :start #start-game)
; invoked only by the REPL ^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment