Skip to content

Commit

Permalink
update to latest wand templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jfschwarz committed Jul 5, 2022
1 parent 00b0a8f commit e5d1762
Show file tree
Hide file tree
Showing 11 changed files with 369 additions and 430 deletions.
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.
132 changes: 62 additions & 70 deletions test/cases/wand.only/Template.sol

Large diffs are not rendered by default.

17 changes: 6 additions & 11 deletions test/cases/wand.only/background.partial.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,25 @@
{{/if}}
{{#if linear}}
{{#if light}}
<linearGradient id="lin0" gradientTransform="rotate(90)">
<linearGradient id="l0" gradientTransform="rotate(90)">
<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 style="fill:url(#l0)" width="2000" height="3000"/>
{{/if}}
{{#if dark}}
<linearGradient id="lin0" gradientTransform="rotate(90)">
<linearGradient id="l0" gradientTransform="rotate(90)">
<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 style="fill:url(#l0)" width="2000" height="3000"/>
{{/if}}
{{/if}}
</g>

<defs>
<filter id="burstBlur">
<feGaussianBlur in="SourceGraphic" stdDeviation="2"/>
</filter>
</defs>
<path
filter="url(#burstBlur)"
style="opacity: 0.5"
filter="url(#bb)"
style="opacity: .5"
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"
Expand Down
23 changes: 9 additions & 14 deletions test/cases/wand.only/birthchart.partial.hbs
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<g transform="translate(1000 1060)">
<defs>
<radialGradient
id="aspectgradient"
id="ag"
cx="0"
cy="0"
r="1"
gradientUnits="objectBoundingBox"
gradientTransform="translate(0.5 0.5)"
gradientTransform="translate(.5 .5)"
>
<stop stop-color="#FFFCFC" stop-opacity="0.7"/>
<stop offset="1" stop-color="#534E41" stop-opacity="0.6"/>
<stop stop-color="#FFFCFC" stop-opacity=".7"/>
<stop offset="1" stop-color="#534E41" stop-opacity=".6"/>
</radialGradient>
<clipPath id="aspect-clip">
<circle cx="0" cy="0" r="260"/>
</clipPath>
<filter id="planet_blur">
<feGaussianBlur stdDeviation="4"/>
</filter>
<clipPath id="ac"><circle cx="0" cy="0" r="260"/></clipPath>
<filter id="pb"><feGaussianBlur stdDeviation="4"/></filter>
<style>
.p0 {
fill: #FFF6F2
Expand Down Expand Up @@ -48,14 +43,14 @@
{{#each aspects length=8}}
<path
d="M{{int16 x1}},{{int16 y1}} L{{int16 x2}},{{int16 y2}} m25,25"
stroke="url(#aspectgradient)"
stroke="url(#ag)"
stroke-width="8"
clip-path="url(#aspect-clip)"
clip-path="url(#ac)"
/>
{{/each}}


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

{{! <!-- Background glow --> }}
<feGaussianBlur
in="SourceAlpha"
stdDeviation="30"
result="glow"
/>
<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 "
/>

{{! <!-- Emboss/Bevel --> }}
{{#each layers}}
<feTurbulence
{{#if fractalNoise}}type="fractalNoise"{{/if}}
baseFrequency="{{uint8 turbFreqX decimals=3}} {{uint8 turbFreqY decimals=3}}"
numOctaves="{{uint8 turbOct}}"
seed="1004123123"
result="turb_{{@index}}"
/>
<defs>
<filter
color-interpolation-filters="sRGB"
id="ge"
width="250%"
height="250%"
x="-75%"
y="-55%"
>
<feGaussianBlur
stdDeviation="{{uint8 turbBlur decimals=1}}"
in="SourceAlpha"
result="turb_blur_{{@index}}"
result="alphablur"
stdDeviation="8"
/>
<feDisplacementMap
scale="{{uint8 dispScale}}"
in="turb_blur_{{@index}}"
in2="turb_{{@index}}"
result="disp_turb_{{@index}}"

{{! Background glow }}
<feGaussianBlur
in="SourceAlpha"
stdDeviation="30"
result="fg"
/>
<feColorMatrix
in="fg"
result="bgg"
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}}"
/>
<feGaussianBlur
stdDeviation="{{uint8 blurX decimals=1}} {{uint8 blurY decimals=1}}"
in="co_mat_{{@index}}"
result="blur_co_mat_{{@index}}"
values="-1 0 0 0 1
0 -1 0 0 1
0 0 -1 0 1
0 0 0 1 0 "
/>
<feSpecularLighting
surfaceScale="{{uint8 surfaceScale}}"
specularConstant="{{uint8 specConstant decimals=2}}"
specularExponent="{{uint8 specExponent}}"
lighting-color="{{lightColor}}"
in="blur_co_mat_{{@index}}"
result="lighting_{{@index}}"
>
<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
operator="arithmetic"
k1="0"
k2="0"
k3="{{uint8 opacity decimals=2}}"
k4="0"
in="disp_turb_{{@index}}"
in2="comp_light_1_{{@index}}"
result="comp_light_2_{{@index}}"
/>
<feComposite
operator="in"
in2="SourceAlpha"
in="comp_light_2_{{@index}}"
result="comp_light_final_{{@index}}"
/>

{{/each}}

<feMerge>
<feMergeNode in="bgGlow"/>
<feMergeNode in="SourceGraphic"/>
{{! Emboss/Bevel }}
{{#each layers}}
<feMergeNode in="comp_light_final_{{@index}}"/>
<feTurbulence
{{#if fractalNoise}}type="fractalNoise"{{/if}}
baseFrequency="{{uint8 turbFreqX decimals=3}} {{uint8 turbFreqY decimals=3}}"
numOctaves="{{uint8 turbOct}}"
seed="1004123123"
result="t{{@index}}"
/>
<feGaussianBlur
stdDeviation="{{uint8 turbBlur decimals=1}}"
in="SourceAlpha"
result="tb{{@index}}"
/>
<feDisplacementMap
scale="{{uint8 dispScale}}"
in="tb{{@index}}"
in2="t{{@index}}"
result="dt{{@index}}"
/>
<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="dt{{@index}}"
result="cm{{@index}}"
/>
<feGaussianBlur
stdDeviation="{{uint8 blurX decimals=1}} {{uint8 blurY decimals=1}}"
in="cm{{@index}}"
result="bcm{{@index}}"
/>
<feSpecularLighting
surfaceScale="{{uint8 surfaceScale}}"
specularConstant="{{uint8 specConstant decimals=2}}"
specularExponent="{{uint8 specExponent}}"
lighting-color="{{lightColor}}"
in="bcm{{@index}}"
result="l{{@index}}"
>
<fePointLight x="{{int16 pointX}}" y="{{int16 pointY}}" z="{{int16 pointZ}}"/>
</feSpecularLighting>
<feComposite
operator="in"
in="l{{@index}}"
in2="cm{{@index}}"
result="cl1{{@index}}"
/>
<feComposite
operator="arithmetic"
k1="0"
k2="0"
k3="{{uint8 opacity decimals=2}}"
k4="0"
in="dt{{@index}}"
in2="cl1{{@index}}"
result="cl2{{@index}}"
/>
<feComposite
operator="in"
in2="SourceAlpha"
in="cl2{{@index}}"
result="clf{{@index}}"
/>

{{/each}}
</feMerge>
</filter>

<feMerge>
<feMergeNode in="bgg"/>
<feMergeNode in="SourceGraphic"/>
{{#each layers}}
<feMergeNode in="clf{{@index}}"/>
{{/each}}
</feMerge>
</filter>

<filter id="bb">
<feGaussianBlur in="SourceGraphic" stdDeviation="2"/>
</filter>
</defs>
2 changes: 1 addition & 1 deletion test/cases/wand.only/halo.partial.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<defs>
<g id="halo" filter="url(#glowEmboss)">
<g id="halo" filter="url(#ge)">
<path
d="
{{~#if halo0~}}
Expand Down
Loading

0 comments on commit e5d1762

Please sign in to comment.