-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
(ns weather-magic.models | ||
(:require | ||
[thi.ng.math.core :as m :refer [PI HALF_PI TWO_PI]] | ||
[thi.ng.geom.core :as g] | ||
[thi.ng.geom.gl.glmesh :as glm] | ||
[thi.ng.geom.vector :as v :refer [vec2 vec3]] | ||
[thi.ng.geom.sphere :as s] | ||
[thi.ng.geom.plane :as p] | ||
[thi.ng.geom.attribs :as attr] | ||
[thi.ng.geom.rect :as rect])) | ||
[thi.ng.math.core :as m :refer [PI HALF_PI TWO_PI]] | ||
[thi.ng.geom.core :as g] | ||
[thi.ng.geom.gl.glmesh :as glm] | ||
[thi.ng.geom.vector :as v :refer [vec2 vec3]] | ||
[thi.ng.geom.sphere :as s] | ||
[thi.ng.geom.plane :as p] | ||
[thi.ng.geom.attribs :as attr] | ||
[thi.ng.geom.rect :as rect])) | ||
|
||
(defonce sphere | ||
(-> (s/sphere 1) | ||
(g/center) | ||
(g/as-mesh {:mesh (glm/gl-mesh 4096 #{:uv :vnorm}) | ||
:res 32 | ||
:attribs {:uv (attr/supplied-attrib | ||
:uv (fn [[u v]] (vec2 (- 1 u) v))) | ||
:uv (fn [[u v]] (vec2 (- 1 u) v))) | ||
:vnorm (fn [_ _ v _] (m/normalize v))}}))) | ||
|
||
(defonce plane | ||
(-> (rect/rect 4 3) | ||
(g/as-mesh {:mesh (glm/gl-mesh 4096 #{:uv :vnorm}) | ||
:res 32 | ||
:attribs {:uv (attr/supplied-attrib | ||
:uv (fn [[u v]] (vec2 (- 1 u) v))) | ||
:uv (fn [[u v]] (vec2 (- 1 u) v))) | ||
:vnorm (fn [_ _ v _] (m/normalize v))}}))) |
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
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