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 clojure-nen2580.core | |
(:require [thi.ng.geom.core :as g] | |
[thi.ng.geom.line :as l)) | |
(defn normal [l] | |
(let [[p q] (:points l)] | |
(g/normalize (g/- q p)))) | |
(defn continuous? [a b] | |
(let [na (normal a) |
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
(defn memoize-async | |
"Returns a memoized version of a referentially transparent function. The | |
memoized version of the function keeps a cache of the mapping from arguments | |
to results and, when calls with the same arguments are repeated often, has | |
higher performance at the expense of higher memory use. | |
http://stackoverflow.com/questions/24698536/" | |
[f] | |
(let [mem (atom {})] | |
(fn [& args] | |
(go |
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
(def lookup-sentinel #?(:clj ::not-found :cljs (js-obj)) | |
(def pending-sentinel #?(:clj ::pending :cljs (js-obj)) | |
(defn memoize-async | |
[f] | |
(let [>in (chan) | |
pending (pub >in :args) | |
mem (atom {})] | |
(letfn | |
[(memoized [& args] |
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
[ 94%] Building CXX object CMakeFiles/collada2gltfConvert.dir/GLTF/GLTFCleanupEvaluator.cpp.o | |
[ 94%] Building CXX object CMakeFiles/collada2gltfConvert.dir/profiles/webgl-1.0/GLTFWebGL_1_0_Profile.cpp.o | |
[ 94%] Building CXX object CMakeFiles/collada2gltfConvert.dir/shaders/commonProfileShaders.cpp.o | |
[ 95%] Building CXX object CMakeFiles/collada2gltfConvert.dir/helpers/geometryHelpers.cpp.o | |
/home/skrat/Workspace/xxx/glTF/glTF/COLLADA2GLTF/helpers/geometryHelpers.cpp: In function ‘bool GLTF::__RemapPrimitiveVertices(std::shared_ptr<GLTF::GLTFPrimitive>, std::vector<std::shared_ptr<GLTF::GLTFAccessor> >, GLTF::MeshAttributeVector, GLTF::MeshAttributeVector, unsigned int*, std::shared_ptr<GLTF::GLTFPrimitiveRemapInfos>, unsigned int*)’: | |
/home/skrat/Workspace/xxx/glTF/glTF/COLLADA2GLTF/helpers/geometryHelpers.cpp:260:74: error: ‘memcpy’ was not declared in this scope | |
memcpy(ptrDst, ptrSrc, bufferInfos->elementByteLength); | |
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
(string/join | |
"\n" (->> (range 12) | |
(partition 3) | |
(map (fn [[a b c]] (str "xxx" a " " b " " 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
(go-loop [[c & chs] (all-ma-channels)] | |
(if c | |
(let [x (<! c)] | |
... | |
(recur chs)) | |
return-val)) |
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
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building xxx 1.0.5-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ xxx --- | |
[INFO] xxx:xxx:jar:1.0.5-SNAPSHOT | |
[INFO] +- org.clojure:clojure:jar:1.9.0-alpha12:compile | |
[INFO] +- org.clojure:clojurescript:jar:1.9.211:compile |
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
### Building ClojureScript | |
Leiningen 2.7.0 on Java 1.8.0_92 OpenJDK 64-Bit Server VM | |
Building | |
Done building | |
### Bundling 1st Stage ClojureScript | |
### Building 1st Stage Binary | |
-- The C compiler identification is Clang 3.8.0 | |
-- The CXX compiler identification is GNU 6.1.1 | |
-- Check for working C compiler: /usr/bin/clang | |
-- Check for working C compiler: /usr/bin/clang -- works |
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
(-> spec | |
(assoc-in | |
[:uniforms :view] | |
(-> (mat/look-at ...) | |
(g/rotate-y ...))) | |
(update-in | |
[:uniforms :model] | |
g/* (-> M44 (g/rotate-x HALF_PI)))) |
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
var viewer = new Cesium.Viewer('cesiumContainer', { | |
infoBox : false, | |
selectionIndicator : false, | |
shadows : true | |
}); | |
function createModel(url, height) { | |
viewer.entities.removeAll(); | |
var position = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, height); |