Skip to content

Commit

Permalink
add latest wand svg and tweak dedupeThreshold
Browse files Browse the repository at this point in the history
  • Loading branch information
jfschwarz committed Jun 23, 2022
1 parent 97b0fb9 commit ce2240e
Show file tree
Hide file tree
Showing 26 changed files with 2,459 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/cases/wand.only/.solid-mustacherc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"condenseWhitespace": true,
"dedupeThreshold": 128
}
134 changes: 134 additions & 0 deletions test/cases/wand.only/0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"frame": { "title": "FLOURISHING MISTY WORLD", "level3": true },
"stars": { "starsSeed": 132413 },
"planets": [
{ "x": -335, "y": 0, "visible": true },
{ "x": -377, "y": -50, "visible": true },
{ "x": -564, "y": -330, "visible": false },
{ "x": -614, "y": -517, "visible": false },
{ "x": -208, "y": -1465, "visible": false },
{ "x": -428, "y": -123, "visible": true },
{ "x": -629, "y": -712, "visible": false },
{ "x": 1025, "y": -1320, "visible": false }
],
"aspects": [
{ "x1": 223, "y1": -133, "x2": -218, "y2": 142 },
{ "x1": 260, "y1": 0, "x2": 120, "y2": 231 },
{ "x1": 258, "y1": -34, "x2": -106, "y2": 238 },
{ "x1": 224, "y1": -131, "x2": 234, "y2": 113 },
{ "x1": 172, "y1": -195, "x2": 257, "y2": 40 }
],
"background": {
"hue": 0,
"radial": true,
"color": { "hue": 50, "saturation": 50, "lightness": 50 },
"dark": true
},
"halo": {
"halo0": true,
"rhythm": [
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false,
true,
false
],
"hue": 230
},
"handle": { "handle0": true },
"filter": {
"layers": [
{
"turbType": "turbulence",
"turbFreqX": 0.001,
"turbFreqY": 0.001,
"turbOct": 1,
"turbBlur": 2,
"dispScale": 200,
"specConstant": 0.75,
"specExponent": 30,
"surfaceScale": 5,
"pointX": -50,
"pointY": -100,
"pointZ": 400,
"lightColor": "#ffffff",
"opacity": 1,
"blurX": 2,
"blurY": 2
}
]
},
"stone": {
"turbType": "fractalNoise",
"turbFreqX": 0.004,
"turbFreqY": 0.007,
"turbOct": 2,
"redAmp": 0.69,
"redExp": -0.43,
"redOff": 0.16,
"greenAmp": 0.61,
"greenExp": -0.66,
"greenOff": -0.63,
"blueAmp": 0.58,
"blueExp": 0.01,
"blueOff": -0.15,
"rotation": 26,
"seasonsAmplitude": 76,
"secondInDay": 59604.55,
"secondInYear": 13969053
},
"sparkle": {
"sparkles": [
{
"ty": 391.6136462835958,
"tx": 187.4746810737406,
"scale": 0.8962530326055658
},
{
"ty": 589.0896098447873,
"tx": 1633.1620912485369,
"scale": 0.409025855746877
},
{
"ty": 382.8053562020036,
"tx": 425.8586546432447,
"scale": 0.5538792607669576
},
{
"ty": 1435.297180663201,
"tx": 273.8071962589959,
"scale": 0.9541531025098982
},
{
"ty": 380.6652321184142,
"tx": 1230.476996666956,
"scale": 0.3493180213573832
},
{
"ty": 689.6458358601778,
"tx": 1723.309567315027,
"scale": 0.4153771077466417
}
]
},
"xp": { "cap": 10000, "amount": 3221, "crown": false }
}
752 changes: 752 additions & 0 deletions test/cases/wand.only/Template.sol

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions test/cases/wand.only/background.partial.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<g style="filter: hue-rotate({{uint16 hue}}deg);">
{{#if radial}}
{{#if light}}
<rect style="fill:hsla({{color.hue}}, {{color.saturation}}%, {{color.lightness}}%, 1)" width="2000" height="3000"></rect>
<radialGradient id="grad0">
<stop offset="0" style="stop-color:hsla({{color.hue}}, 100%, 95%, 1)"></stop>
<stop offset="1" style="stop-color:hsla(55, 66%, 83%, 0)"></stop>
</radialGradient>
<circle style="fill:url(#grad0)" cx="1000" cy="1925" r="1133"></circle>
<circle style="fill:url(#grad0)" cx="1000" cy="372" r="1133"></circle>
{{/if}}
{{#if dark}}
<rect style="fill:hsl({{color.hue}}, 30%, 7%)" width="2000" height="3000"></rect>
<radialGradient id="grad0">
<stop offset="0" style="stop-color: hsla({{color.hue}}, {{color.saturation}}%, {{color.lightness}}%, 1)"></stop>
<stop offset="1" style="stop-color: hsla({{color.hue}}, {{color.saturation}}%, {{color.lightness}}%, 0)"></stop>
</radialGradient>
<circle style="fill:url(#grad0)" cx="1000" cy="1925" r="1133"></circle>
<circle style="fill:url(#grad0)" cx="1000" cy="372" r="1133"></circle>
{{/if}}
{{/if}}
{{#if linear}}
{{#if light}}
<linearGradient id="lin0" gradientTransform="rotate(90)">
<stop offset="0%" stop-color="hsla(55, 66%, 83%, 1)"></stop>
<stop offset="100%" stop-color="hsla({{color.hue}}, {{color.saturation}}%, {{color.lightness}}%, 1)"></stop>
</linearGradient>
<rect style="fill:url(#lin0)" width="2000" height="3000"></rect>
{{/if}}
{{#if dark}}
<linearGradient id="lin0" gradientTransform="rotate(90)">
<stop offset="0%" stop-color="hsl({{color.hue}}, 30%, 7%)"></stop>
<stop offset="100%" stop-color="hsla({{color.hue}}, {{color.saturation}}%, {{color.lightness}}%, 1)"></stop>
</linearGradient>
<rect style="fill:url(#lin0)" width="2000" height="3000"></rect>
{{/if}}
{{/if}}
</g>

<defs>
<filter id="burstBlur">
<feGaussianBlur in="SourceGraphic" stdDeviation="2"></feGaussianBlur>
</filter>
</defs>
<path
filter="url(#burstBlur)"
style="opacity: 0.5"
d="M1000,2434.7l-198.9,334.1l194.9-334.7L422.9,2646l569.6-213.7l-891.4-19.9l888.6,17.1l-1122.4-338.6
l1120.5,335.1l-1243.4-713L987.3,2422L-255.5,1315.5L987.9,2418.1L-132.6,937.5l1122.4,1477L101.1,616l891.4,1795.7L422.9,382.4
l573.2,2027.5L801.1,259.6L1000,2409.3l198.9-2149.7l-194.9,2150.3l573.2-2027.5l-569.6,2029.3L1898.9,616l-888.6,1798.5
l1122.4-1477L1012.1,2418.1l1243.4-1102.6L1012.7,2422l1242.8-709.1l-1243.4,713l1120.5-335.1l-1122.4,338.6l888.6-17.1
l-891.4,19.9l569.6,213.7l-573.2-211.9l194.9,334.7L1000,2434.7z"
fill="white"
></path>
63 changes: 63 additions & 0 deletions test/cases/wand.only/birthchart.partial.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<g transform="translate(1000 1060)">
<defs>
<radialGradient
id="aspectgradient"
cx="0"
cy="0"
r="1"
gradientUnits="objectBoundingBox"
gradientTransform="translate(0.5 0.5)"
>
<stop stop-color="#FFFCFC" stop-opacity="0.7"></stop>
<stop offset="1" stop-color="#534E41" stop-opacity="0.6"></stop>
</radialGradient>
<clipPath id="aspect-clip">
<circle cx="0" cy="0" r="260"></circle>
</clipPath>
<filter id="planet_blur">
<feGaussianBlur stdDeviation="4"></feGaussianBlur>
</filter>
<style>
.p0 {
fill: #FFF6F2
}
.p1 {
fill: #FFFCF0
}
.p2 {
fill: #FFEDED
}
.p3 {
fill: #FFEEF4
}
.p4 {
fill: #FFF3E9
}
.p5 {
fill: #ECFDFF
}
.p6 {
fill: #EEF7FF
}
.p7 {
fill: #F8F0FF
}
</style>
</defs>

{{#each aspects length=8}}
<path
d="M{{int16 x1}},{{int16 y1}} L{{int16 x2}},{{int16 y2}} m25,25"
stroke="url(#aspectgradient)"
stroke-width="8"
clip-path="url(#aspect-clip)"
></path>
{{/each}}


<g filter="url(#planet_blur)">
{{#each planets length=8}}
{{#if visible }}<circle cx="{{int16 x}}" cy="{{int16 y}}" class="p{{@index}}" r="11"></circle>{{/if}}
{{/each}}
</g>
</g>
107 changes: 107 additions & 0 deletions test/cases/wand.only/filter.partial.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<filter
color-interpolation-filters="sRGB"
id="glowEmboss"
width="250%"
height="250%"
x="-75%"
y="-55%"
>
<feGaussianBlur
in="SourceAlpha"
result="alphablur"
stdDeviation="8"
></feGaussianBlur>

{{! <!-- Background glow --> }}
<feGaussianBlur
in="SourceAlpha"
stdDeviation="30"
result="glow"
></feGaussianBlur>
<feColorMatrix
in="glow"
result="bgGlow"
type="matrix"
values="-1 0 0 0 1
0 -1 0 0 1
0 0 -1 0 1
0 0 0 1 0 "
></feColorMatrix>

{{! <!-- Emboss/Bevel --> }}
{{#each layers}}
<feTurbulence
type="{{turbType}}"
baseFrequency="{{turbFreqX}} {{turbFreqY}}"
numOctaves="{{turbOct}}"
seed="1004123123"
result="turb_{{@index}}"
></feTurbulence>
<feGaussianBlur
stdDeviation="{{turbBlur}}"
in="SourceAlpha"
result="turb_blur_{{@index}}"
></feGaussianBlur>
<feDisplacementMap
scale="{{dispScale}}"
in="turb_blur_{{@index}}"
in2="turb_{{@index}}"
result="disp_turb_{{@index}}"
></feDisplacementMap>
<feColorMatrix
type="matrix"
values="0 0 0 0 0,
0 0 0 0 0,
0 0 0 0 0,
0 0 0 1 0"
in="disp_turb_{{@index}}"
result="co_mat_{{@index}}"
></feColorMatrix>
<feGaussianBlur
stdDeviation="{{blurX}} {{blurY}}"
in="co_mat_{{@index}}"
result="blur_co_mat_{{@index}}"
></feGaussianBlur>
<feSpecularLighting
surfaceScale="{{surfaceScale}}"
specularConstant="{{specConstant}}"
specularExponent="{{specExponent}}"
lighting-color="{{lightColor}}"
in="blur_co_mat_{{@index}}"
result="lighting_{{@index}}"
>
<fePointLight x="{{pointX}}" y="{{pointY}}" z="{{pointZ}}"></fePointLight>
</feSpecularLighting>
<feComposite
operator="in"
in="lighting_{{@index}}"
in2="co_mat_{{@index}}"
result="comp_light_1_{{@index}}"
></feComposite>
<feComposite
operator="arithmetic"
k1="0"
k2="0"
k3="{{opacity}}"
k4="0"
in="disp_turb_{{@index}}"
in2="comp_light_1_{{@index}}"
result="comp_light_2_{{@index}}"
></feComposite>
<feComposite
operator="in"
in2="SourceAlpha"
in="comp_light_2_{{@index}}"
result="comp_light_final_{{@index}}"
></feComposite>

{{/each}}

<feMerge>
<feMergeNode in="bgGlow"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
{{#each layers}}
<feMergeNode in="comp_light_final_{{@index}}"></feMergeNode>
{{/each}}
</feMerge>
</filter>
Loading

0 comments on commit ce2240e

Please sign in to comment.