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
(ns xml-ids.core | |
(:require [clojure.xml :as xml]) | |
(:require [clojure.string :as string]) | |
(:require [clojure.java.io :as io]) | |
(:gen-class)) | |
(def source-list "list.txt") ;; List of paths to XML layouts, one per line. | |
(def ignored-tags [:import :data :variable :import :layout :merge :layout]) |
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
Training: Marathon Training | |
Wk: Mo Tu We Th Fr Sa Su | |
JUNE | |
0: 0 0 0 0 0 0 2 => 2 | |
0: 0 0 2 0 3 0 0 => 5 | |
0: 0 0 0 0 0 0 0 => 0 | |
JULY | |
1: 0 3 3 3 0 6 0 => 15 | |
2: 0 3 3 3 0 6 0 => 15 |
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
(defn bezier-line | |
(points color) | |
( | |
(def ts (range 0 1 .001)) | |
; Calculate the coordniates of the bezier curve: | |
(defn bezier-point | |
(t x0 x1 x2) | |
(add x1 | |
(mul | |
(pow |
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
(resize 100 100) | |
(fill (get-frame) "white") | |
(stroke (rect 23 26 54 49) "black") | |
(def f (get-frame)) | |
(def pls 1) | |
(def mns (sub 0 1)) | |
(defn shift-x (p a) | |
(pos (clamp (add p:x a) 0 f:w) p:y)) |
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
;; 1. Create Black-Transparent Mask from Black-White Image: | |
(open $path .15) | |
(defn bw-to-alpha | |
(p) | |
(p:0 p:1 p:2 (sub 255 p:0))) | |
(defn to-black-transparent | |
(pixel q) | |
(bw-to-alpha pixel)) |
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
(clear) | |
(def c:x 300) | |
(def c:y 300) | |
(def c:r 200) | |
(def petal-color (gradient (line 160 165 299 297) ("gold" "goldenrod"))) | |
; Draw Background: | |
(fill (get-frame) (gradient (line 301 300 301 5) ("#333" "#222"))) | |
(fill |
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
(def y ()) | |
(defn identity (x) x) | |
(defn copy-list | |
(xs) | |
(map xs identity)) | |
(defn append | |
(xs item) |
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
(clear) | |
(open $path .5) | |
(def background "black") | |
(def unit 10) | |
(def padding 1) | |
(def r (sub (div unit 2) padding)) | |
(def f (get-frame)) |
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
(def background "#242424") | |
(def dark "#72dec211") | |
(def light "#72dec222") | |
(def segment:l 400) | |
(def segment:shift 2) | |
(def screeen:w 1280) | |
(def screeen:h 800) | |
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
; Lain Script for Ronin | |
; https://hundredrabbits.github.io/Ronin/ | |
(def win | |
(js)) | |
(def screen | |
(:screen win)) | |
(clear) |
NewerOlder