This file contains hidden or 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
using arcadia.messages; | |
using clojure.lang; | |
using System; | |
using UnityEngine; | |
using urbanOutfitters.parapoint; | |
namespace urbanOutfitters.moholy | |
{ | |
[Serializable] | |
public class EllipsulonData : MonoBehaviour, IParaPoint, IStart, IOnDrawGizmosSelected, IType | |
{ |
This file contains hidden or 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
using arcadia.messages; | |
using clojure.lang; | |
using System; | |
using UnityEngine; | |
using urbanOutfitters.parapoint; | |
namespace urbanOutfitters.moholy | |
{ | |
[Serializable] | |
public class EllipsulonData : MonoBehaviour, IAwake, IParaPoint, IStart, IOnDrawGizmosSelected, IType | |
{ |
This file contains hidden or 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
(defscn cursed-cube-clump | |
(let [cc (GameObject. "cursed-cube-clump") | |
n 1000 | |
w 60] | |
(dotimes [i n] | |
(let [c (hydrate cubespec)] | |
(set! (.parent (transform c)) (transform cc)) | |
(set! (.localScale (transform c)) | |
(v3 1 1 (+ (/ i w) (mod i w)))) | |
(set! (.localPosition (transform c)) |
This file contains hidden or 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
(defscn cube-clump | |
(let [cc (GameObject. "cube-clump") | |
n 1000 | |
w 60] | |
(dotimes [i n] | |
(let [c (create-primitive :cube)] | |
(set! (.parent (transform c)) (transform cc)) | |
(set! (.localScale (transform c)) | |
(v3 1 1 (+ (/ i w) (mod i w)))) | |
(set! (.localPosition (transform c)) |
This file contains hidden or 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
(use 'arcadia.hydrate 'arcadia.core) | |
(defmacro vfor [& body] | |
`(vec (for ~@body))) | |
(defn tree-it [make-node, branching, depth, spacing, width] | |
(let [xsfn (fn [lvl, parentx] | |
(vfor [i (range branching)] | |
(- parentx | |
(* 0.5 |
This file contains hidden or 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
(defmacro if-first | |
([bindings then] | |
`(when-first ~bindings ~then)) | |
([bindings then else] | |
(let [[x xs] bindings] | |
`(if-let [xs# (seq ~xs)] | |
(let [~x (first xs#)] | |
~then) | |
~else)))) |
This file contains hidden or 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
;; ============================================================ | |
;; why didn't I think of this earlier | |
;; strictly speaking this uses eval, so maybe problematic 4 certain | |
;; export targets, depending on how we handle that; eval only called | |
;; at compile time tho, so maybe we could excise it in a way that's | |
;; smart enough to still allow this sort of tomfoolery. | |
(defmacro meval [& stuff] | |
(eval (cons 'do stuff))) |
This file contains hidden or 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 wall-jiggle.wall-jiggle | |
(:use arcadia.core | |
arcadia.linear) | |
(:require [arcadia.updater :as updr]) | |
(:import [UnityEngine Transform])) | |
(defscn wall | |
(let [top (GameObject. "wall")] | |
(dotimes [x 10] | |
(dotimes [y 10] |
This file contains hidden or 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
(defcomponent ProtagonistDriver [logic] | |
(Update [this] | |
(when-let [f (:update logic)] | |
(f this))) | |
(OnCollisionEnter [this that] | |
(when-let [f (:on-collision-enter logic)] | |
(f this that)))) |
This file contains hidden or 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
(let [ns 'clojure-west.demo] | |
(require ns) | |
(in-ns ns) | |
(use | |
'clojure.pprint | |
'clojure.repl | |
'clojure-west.freeze) | |
(require | |
;'[clojure-west.mesh :as mesh] | |
'[clojure-west.materials :as mat] |