Skip to content

Commit a6c0683

Browse files
committed
all web-based examples work now
1 parent b2e2d98 commit a6c0683

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

examples/transparency-example.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,17 @@
110110
</defs>
111111
<path fill="url(#a)" d="M0 0h500v500H0z"></path>
112112
</svg>
113-
<script src="../dist/trianglify.min.js"></script>
113+
<script src="../dist/trianglify.bundle.umd.js"></script>
114114
<script>
115115
// set up the base pattern
116-
var pattern = Trianglify({
116+
const pattern = trianglify({
117117
height: window.innerHeight,
118118
width: window.innerWidth,
119-
x_colors: ['rgba(255, 255, 255, 0.1)', 'rgba(255, 255, 255, 1)'],
120-
stroke_width: 0,
121-
cell_size: Math.ceil(window.innerWidth / 8)})
122-
var svg = pattern.svg()
119+
xColors: ['rgba(255, 255, 255, 0.1)', 'rgba(255, 255, 255, 1)'],
120+
yColors: 'match',
121+
cellSize: Math.ceil(window.innerWidth / 8)
122+
})
123+
var svg = pattern.toSVG()
123124
svg.id = 'trianglify-overlay'
124125
document.body.appendChild(svg)
125126
</script>

0 commit comments

Comments
 (0)