-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1099 from t3kt/0.35
0.35
- Loading branch information
Showing
221 changed files
with
2,089 additions
and
514 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// @Param1 {"default":1, "normMin":0, "normMax":2} | ||
|
||
ReturnT thismap(CoordT p, ContextT ctx) { | ||
|
||
float cell = 0.; | ||
vec3 axes = vec3(0.); | ||
|
||
if (p.y > abs(p.x) && p.y > abs(p.z)) { | ||
// top | ||
cell = 0.; | ||
// no change to p | ||
} else if (-p.y > abs(p.x) && -p.y > abs(p.z)) { | ||
// bottom | ||
cell = 1.; | ||
pR(p.yz, radians(180.)); | ||
} else if (-p.x > abs(p.y) && -p.x > abs(p.z)) { | ||
// left | ||
cell = 2.; | ||
pR(p.xy, radians(90.)); | ||
pR(p.xz, radians(180.)); | ||
} else if (p.x > abs(p.y) && p.x > abs(p.z)) { | ||
// right | ||
cell = 3.; | ||
pR(p.xy, radians(-90.)); | ||
} else if (p.z > 0. && p.z > p.x && p.z > p.y) { | ||
// back | ||
cell = 4.; | ||
pR(p.yz, radians(90.)); | ||
pR(p.xz, radians(90.)); | ||
} else if (p.z < 0. && p.z < p.x && p.z < p.y) { | ||
// front | ||
cell = 5.; | ||
pR(p.yz, radians(270.)); | ||
} else { | ||
return createNonHitSdf(); | ||
} | ||
return inputOp1(p, ctx); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// @Size {"default":1, "style":"XY", "normMin":0, "normMax":2} | ||
// @Thickness {"default": 0.1, "normMax": 0.5} | ||
|
||
ReturnT thismap(CoordT p, ContextT ctx) { | ||
vec2 sz = THIS_Size; | ||
float th = THIS_Thickness; | ||
float d; | ||
|
||
if (false) { | ||
vec2 dO2 = abs(p)-sz+vec2(th); | ||
float dO = length(max(dO2, 0.)) + min(max(dO2.x, dO2.y), 0.); | ||
|
||
vec2 dI2 = abs(p)-sz; | ||
float dI = length(max(dI2, 0.)) + min(max(dI2.x, dI2.y), 0.); | ||
|
||
d = max(-dO, dI); | ||
// d = dO; | ||
} else { | ||
p = abs(p) - sz; | ||
vec2 q = abs(p+th)-th; | ||
d = min( | ||
length(max(vec2(p.x, q.y),0.))+min(max(p.x, q.y), 0.), | ||
length(max(vec2(q.x, p.y),0.))+min(max(q.x, p.y), 0.)); | ||
} | ||
return createSdf(d); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// @Size {"default":1, "style":"XYZ", "normMin":0, "normMax":2} | ||
// @Thickness {"default": 0.1, "normMax": 0.5} | ||
|
||
ReturnT thismap(CoordT p, ContextT ctx) { | ||
vec3 sz = THIS_Size; | ||
float th = THIS_Thickness; | ||
float d; | ||
|
||
vec2 p1 = abs(p.xy) - sz.xy; | ||
vec2 q = abs(p1+th)-th; | ||
d = min( | ||
length(max(vec2(p1.x, q.y),0.))+min(max(p1.x, q.y), 0.), | ||
length(max(vec2(q.x, p1.y),0.))+min(max(q.x, p1.y), 0.)); | ||
d = max(d, | ||
abs(p.z) - sz.z | ||
); | ||
return createSdf(d); | ||
} |
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 +1 @@ | ||
toolkitVersion: '0.34' | ||
toolkitVersion: '0.35' |
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
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
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
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
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
Oops, something went wrong.