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
| // Try these at https://charlieroberts.github.io/marching/playground/ | |
| // 1 Jul | |
| march( | |
| mb = Julia() | |
| .material(Material('phong', Vec3(.0), Vec3(.5), Vec3(1), 32, Vec3(0))), | |
| Plane(Vec3(0, 0, 1), 0.5).material('white glow') | |
| ) | |
| .fog( .2, Vec3(0.25, 0.3, 0) ) |
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
| d1 | |
| -- $ dubd | |
| -- $ stb 0.3 (chunk 8 (fast 2)) | |
| -- $ slow 8 $ chop 16 | |
| -- $ smash 8 [2,8,7,2] | |
| -- $ fast 2 | |
| $ s "pads" # n 3 # l 1 -- Peace is the mission | |
| -- $ s "pads" # n 20 # l 1 -- Intense pads | |
| -- $ s "pads" # n 21 # l 1 -- Elevate | |
| -- $ basspad # l 1 |
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
| -- _______ __ __ _______ __ _______ __ __ __ __ __ | |
| -- | __|__| |_| | |.--.--.| |--. | __|.---.-.| |_.-----.| | |__| |_.-----. | |
| -- | | | | _| || | || _ | |__ || _ || _| -__|| | | | _| -__| | |
| -- |_______|__|____|___|___||_____||_____| |_______||___._||____|_____||__|__|__|____|_____| | |
| ------------------------------------------------------------------------------ | |
| -- HARMONIUM | |
| d1 | |
| -- $ degradeBy 0.2 |
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
| // 1 Mar 2021 | |
| // Alright time for a new 30 day series! I present to you a new round of Marching.js | |
| m = march( | |
| u = Union2( | |
| hl1 = Halve(Onion(Sphere(3), 0.012), Halve.UP), | |
| hl2 = Halve(Onion(Sphere(2), 0.012), Halve.UP), | |
| hl3 = Halve(Onion(Sphere(1), 0.012), Halve.UP), | |
| hl4 = Halve(Onion(Sphere(0.5), 0.012), Halve.UP), |
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
| sin = ({time}) => Math.sin(time) // sin | |
| sq = ({time}) => ((Math.sin(time) < 0) ? 0 : 1) // square | |
| saw = ({time}) => (time % 1) * 2 - 1 // saw | |
| sinf = (freq) => ({time}) => Math.sin(time*freq) // sin at freq | |
| sqf = freq => ({time}) => ((Math.sin(time*freq) < 0) ? 0 : 1) // square at freq | |
| sawf = (freq) => ({time}) => ((time * freq) % 1) * 2 - 1 // saw at freq | |
| rsinf = (min,max,freq) => ({time}) => Math.sin(time*freq) * max + min // ranged sin at freq | |
| rsqf = (min,max,freq) => ({time}) => ((Math.sin(time*freq) < 0) ? 0 : 1) * max + min // ranged square at freq |
OlderNewer