Skip to content

Commit

Permalink
update to latest version of wand template
Browse files Browse the repository at this point in the history
  • Loading branch information
jfschwarz committed Jul 5, 2022
1 parent e529115 commit 2280cfd
Show file tree
Hide file tree
Showing 14 changed files with 621 additions and 931 deletions.
16 changes: 7 additions & 9 deletions test/cases/wand.only/0.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,12 @@
"secondInDay": 41269,
"secondInYear": 14037118
},
"sparkle": {
"sparkles": [
{ "scale": 1, "tx": 1352, "ty": 349 },
{ "scale": 35, "tx": 249, "ty": 1000 },
{ "scale": 55, "tx": 1169, "ty": 1155 },
{ "scale": 75, "tx": 1448, "ty": 1355 },
{ "scale": 55, "tx": 1148, "ty": 1410 }
]
},
"sparkles": [
{ "scale": 1, "tx": 1352, "ty": 349 },
{ "scale": 35, "tx": 249, "ty": 1000 },
{ "scale": 55, "tx": 1169, "ty": 1155 },
{ "scale": 75, "tx": 1448, "ty": 1355 },
{ "scale": 55, "tx": 1148, "ty": 1410 }
],
"xp": { "cap": 10000, "amount": 2705, "crown": false }
}
2 changes: 1 addition & 1 deletion test/cases/wand.only/0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
512 changes: 259 additions & 253 deletions test/cases/wand.only/Template.sol

Large diffs are not rendered by default.

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

<defs>
<filter id="burstBlur">
<feGaussianBlur in="SourceGraphic" stdDeviation="2"></feGaussianBlur>
<feGaussianBlur in="SourceGraphic" stdDeviation="2"/>
</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"
d="m1000 2435-199 334 195-335-573 212 570-214-892-20 889 18-1123-339 1121 335-1244-713 1243 709-1242-1106L988 2418-133 938
990 2415 101 616l892 1796L423 382l573 2028L801 260l199 2149 199-2149-195 2150 573-2028-569 2030 891-1796-889 1799L2133
938 1012 2418l1244-1102-1243 1106 1243-709-1244 713 1121-335-1123 338 889-17-892 20 570 214-573-212 195 335-199-334z"
fill="white"
></path>
/>
12 changes: 6 additions & 6 deletions test/cases/wand.only/birthchart.partial.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
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>
<stop stop-color="#FFFCFC" stop-opacity="0.7"/>
<stop offset="1" stop-color="#534E41" stop-opacity="0.6"/>
</radialGradient>
<clipPath id="aspect-clip">
<circle cx="0" cy="0" r="260"></circle>
<circle cx="0" cy="0" r="260"/>
</clipPath>
<filter id="planet_blur">
<feGaussianBlur stdDeviation="4"></feGaussianBlur>
<feGaussianBlur stdDeviation="4"/>
</filter>
<style>
.p0 {
Expand Down Expand Up @@ -51,13 +51,13 @@
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}}
{{#if visible }}<circle cx="{{int16 x}}" cy="{{int16 y}}" class="p{{@index}}" r="11"/>{{/if}}
{{/each}}
</g>
</g>
34 changes: 17 additions & 17 deletions test/cases/wand.only/filter.partial.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
in="SourceAlpha"
result="alphablur"
stdDeviation="8"
></feGaussianBlur>
/>

{{! <!-- Background glow --> }}
<feGaussianBlur
in="SourceAlpha"
stdDeviation="30"
result="glow"
></feGaussianBlur>
/>
<feColorMatrix
in="glow"
result="bgGlow"
Expand All @@ -26,7 +26,7 @@
0 -1 0 0 1
0 0 -1 0 1
0 0 0 1 0 "
></feColorMatrix>
/>

{{! <!-- Emboss/Bevel --> }}
{{#each layers}}
Expand All @@ -36,18 +36,18 @@
numOctaves="{{uint8 turbOct}}"
seed="1004123123"
result="turb_{{@index}}"
></feTurbulence>
/>
<feGaussianBlur
stdDeviation="{{uint8 turbBlur}}"
stdDeviation="{{uint8 turbBlur decimals=1}}"
in="SourceAlpha"
result="turb_blur_{{@index}}"
></feGaussianBlur>
/>
<feDisplacementMap
scale="{{uint8 dispScale}}"
in="turb_blur_{{@index}}"
in2="turb_{{@index}}"
result="disp_turb_{{@index}}"
></feDisplacementMap>
/>
<feColorMatrix
type="matrix"
values="0 0 0 0 0,
Expand All @@ -56,12 +56,12 @@
0 0 0 1 0"
in="disp_turb_{{@index}}"
result="co_mat_{{@index}}"
></feColorMatrix>
/>
<feGaussianBlur
stdDeviation="{{uint8 blurX}} {{uint8 blurY}}"
stdDeviation="{{uint8 blurX decimals=1}} {{uint8 blurY decimals=1}}"
in="co_mat_{{@index}}"
result="blur_co_mat_{{@index}}"
></feGaussianBlur>
/>
<feSpecularLighting
surfaceScale="{{uint8 surfaceScale}}"
specularConstant="{{uint8 specConstant decimals=2}}"
Expand All @@ -70,14 +70,14 @@
in="blur_co_mat_{{@index}}"
result="lighting_{{@index}}"
>
<fePointLight x="{{int16 pointX}}" y="{{int16 pointY}}" z="{{int16 pointZ}}"></fePointLight>
<fePointLight x="{{int16 pointX}}" y="{{int16 pointY}}" z="{{int16 pointZ}}"/>
</feSpecularLighting>
<feComposite
operator="in"
in="lighting_{{@index}}"
in2="co_mat_{{@index}}"
result="comp_light_1_{{@index}}"
></feComposite>
/>
<feComposite
operator="arithmetic"
k1="0"
Expand All @@ -87,21 +87,21 @@
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>
<feMergeNode in="bgGlow"/>
<feMergeNode in="SourceGraphic"/>
{{#each layers}}
<feMergeNode in="comp_light_final_{{@index}}"></feMergeNode>
<feMergeNode in="comp_light_final_{{@index}}"/>
{{/each}}
</feMerge>
</filter>
Loading

0 comments on commit 2280cfd

Please sign in to comment.