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
$.Pb = function(a, b, c, d) { | |
return{textures:{}, materials:xf(xg(function(a, b) { | |
return new ka(null, 2, [Df, Of.b(Qf.b(b)), Lf, 1 - Tf.b(Qf.b(b))], null); | |
}, Sd.a(Ce, Z.a(Pf, Q.a(qd, bf(a)))))), geometries:xf(Q.a(qd, Z.a(function(a) { | |
return function g(a) { | |
return new V(null, function() { | |
for (;;) { | |
var b = E(a); | |
if (b) { | |
if (R(b)) { |
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 [n nil fizz (cycle [n n "fizz"]) buzz (cycle [n n n n "buzz"]) nums (iterate inc 1)] | |
(take 20 (map #(if (or %1 %2) (str %1 %2) %3) fizz buzz nums))) |
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
a = m.map(e => m.vector.apply(null, e), a_poly.vertices) | |
b = m.map(e => m.vector.apply(null, e), b_poly.vertices) | |
m.equals(m.set(a), | |
m.set(b)) | |
// you could cache the hash, so whenever and area (or polygon) is created/updated | |
// you would store the hash on it; inside the poly class (or Area) | |
v = m.map(e => m.vector.apply(null, e), this.vertices) |
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
macro @ { | |
case { _ $x } => { | |
letstx $sx = [makeValue(unwrapSyntax(#{$x}), #{here})]; | |
return #{ Symbol.for($sx) } | |
} | |
} | |
function todoApp(state, action) { | |
if (state === undefined) state = initialState; | |
switch (action.type) { |
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 nines.mesh | |
(:require [thi.ng.ndarray.core :as nd])) | |
(defprotocol Graph | |
(add-node [this x]) | |
(set-edge [this [u v] val]) | |
(get-edge [this [u v]]) | |
(del-edge [this [u v]]) | |
(neighbors [this x])) |
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
// DEPTH | |
varying vec3 vViewPosition; | |
vertex: | |
attribute vec3 position; | |
uniform mat4 proj; | |
uniform mat4 view; |
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
float sdPlane(vec3 p, vec4 n) { | |
// n must be normalized | |
return dot(p, n.xyz) + n.w; | |
} | |
vec3 opTx(mat4 m, vec3 p) { | |
vec4 q = m * vec4(p, 1.0); | |
return q.xyz; | |
} |
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
{:description "FIXME: write description", | |
:compile-path "/tmp/test/target/classes", | |
:deploy-repositories | |
[["clojars" | |
{:url "https://clojars.org/repo/", | |
:password :gpg, | |
:username :gpg}]], | |
:group "test", | |
:license | |
{:name "Eclipse Public License", |
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
import Color exposing (..) | |
import Graphics.Collage exposing (..) | |
import Graphics.Element exposing (..) | |
import Mouse | |
import Window | |
import Time | |
import Signal | |
main : Signal Element |
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
;; -- clj macros | |
(defmacro defmodel | |
([name init [[state & args] & clauses]] | |
`(defmodel ~name | |
~(str "Reducing following messages into " name ": " | |
(clojure.string/join ", " (map first clauses))) | |
~init ([~state ~@args] ~@clauses))) | |
([name doc-string init [[state & args] & clauses]] | |
`(do |