Skip to content

Commit 369c6bc

Browse files
Update README.md
1 parent 51c6009 commit 369c6bc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,30 @@
33
This is weird and terrible.
44

55
We use a THREE.js Canvas Renderer in a paint worklet!!
6+
7+
The worklet code is in [main.js](https://github.com/AdaRoseCannon/three-paint/blob/master/src/main.js)
8+
9+
Use `npm run start` to build it.
10+
11+
Use it in HTML like so:
12+
13+
14+
```html
15+
16+
<style>
17+
.some-el {
18+
--rotate-x: 0;
19+
--rotate-y: 0;
20+
--rotate-z: 0;
21+
22+
background-color: lavenderblush;
23+
background-image: paint(three);
24+
}
25+
</style>
26+
27+
<script>
28+
CSS.paintWorklet.addModule('./dist/bundle.js');
29+
<script>
30+
```
31+
32+
![Preview](https://pbs.twimg.com/media/Dh1Zk_qX0AAf10P.jpg)

0 commit comments

Comments
 (0)