Create your app
create-react-app my-app
cd my-app
Eject it, so that we can modify webpack config
npm run eject
y # when prompted
Create your app
create-react-app my-app
cd my-app
Eject it, so that we can modify webpack config
npm run eject
y # when prompted
| // total number of samples at each fragment | |
| #define NUM_SAMPLES {{ numSamples }} | |
| #define NUM_SPIRAL_TURNS {{ numSpiralTurns }} | |
| #define USE_ACTUAL_NORMALS {{ useActualNormals }} | |
| #define VARIATION {{ variation }} | |
| uniform sampler2D sGBuffer; |
| (defn noise-rect [r n] | |
| (let [area (g/area r) | |
| bl (bottom-left r) | |
| br (v2 (right r) (bottom r)) | |
| tr (top-right r) | |
| tl (v2 (left r) (top r)) | |
| add-x #(m/+ %2 (v2 % 0)) | |
| add-y #(m/+ %2 (v2 0 %)) | |
| vs (map #(apply divide-segment %) | |
| [[bl br n] |
| [ | |
| [ | |
| [234, 112, 112], | |
| [253, 196, 182], | |
| [229, 149, 114], | |
| [38, 148, 171] | |
| ], | |
| [ | |
| [0, 24, 113], | |
| [255, 88, 93], |
| (defn draw-text [] | |
| (let [x-interval (x-interval) | |
| h (* 0.1 (q/height))] | |
| (q/text-align :center :center) | |
| (q/push-matrix) | |
| (q/translate x-interval (* 0.12 (q/height))) | |
| (doseq [ch "TEXT"] | |
| (q/text-char ch 0 0) | |
| (q/translate 0 h)) |
| (defn sph [theta r] | |
| [(* r (Math/cos theta)) | |
| (* r (Math/sin theta))]) |