Skip to content

Commit 19323b7

Browse files
committed
Add overlay support to the model
Each chunk can now define an overlay. An overlay is drawn over the base model, and can have its own `color`, `gradient`, and `mask` properties. An overlay can be used to apply a pattern over the entire model at once. Using an overlay does have a performance impact because each polygon in a chunk with an overlay gets duplicated. But it makes it dramatically easier to apply a pattern over the entire model at once. A demo of this functionality has been added, called "overlay". It is not the nicest looking example, but it does demonstrate the functionality well.
1 parent bb2caa7 commit 19323b7

File tree

5 files changed

+453
-6
lines changed

5 files changed

+453
-6
lines changed

demo/src/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<li><a href="./recolor/index.html">recolor</a></li>
1515
<li><a href="./distort/index.html">distort</a></li>
1616
<li><a href="./fade/index.html">fade</a></li>
17+
<li><a href="./overlay/index.html">overlay</a></li>
1718
<li><a href="./beta/index.html">beta</a></li>
1819
<li><a href="./flask/index.html">flask</a></li>
1920
</ol>

demo/src/overlay/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<link rel="stylesheet" type="text/css" href="../style.css">
5+
<title>---</title>
6+
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
7+
<meta charset=utf-8>
8+
</head>
9+
<body>
10+
<div></div>
11+
<script src="bundle.js"></script>
12+
<p>Press C to copy the SVG text of the image.</p>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)