UNPKG

@patricksurry/g3

Version:

A flexible Javascript framework for building steam gauge instrument panels that display live external metrics from flight (or other) simulators like XPlane or MS FS2020

35 lines (28 loc) 1.07 kB
<html> <body> <svg width=1024 height=768> <defs> <filter id="roughnessFilter"> <feTurbulence type='fractalNoise' baseFrequency="0.2" numOctaves="4"/> <feDiffuseLighting lighting-color='white' surfaceScale=1> <feDistantLight elevation=45 azimuth=45 /> </feDiffuseLighting> <feComposite in2="SourceGraphic" operator="arithmetic" k1=1 /> <!-- <feDisplacementMap in2="turbulence" in="SourceGraphic" scale="50" xChannelSelector="R" yChannelSelector="G"/> --> </filter> </defs> <circle cx="300" cy="300" r="200" style="fill: grey; stroke: blue; filter: url(#roughnessFilter)"/> <rect x="600" y="100" width="200" height="400" style="fill: red; stroke: blue; filter: url(#roughnessFilter)"/> <!-- type='tur' <feTurbulence type="fractalNoise" baseFrequency='0.04' numOctaves="5" result='noise' /> <feDiffuseLighting in='noise' lighting-color='white' surfaceScale='2'> <feDistantLight azimuth='45' elevation='60' /> </feDiffuseLighting> --> </svg> </body> </html>