Skip to content

Realistic watercolor drawings

TypeScript paintwatercolor

License the project under MIT and add third-party notices

Claudee0b08bc310d7
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..91cfbc3
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 Maksim Surguy
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 22f40f9..b35293d 100644
--- a/README.md
+++ b/README.md
@@ -149,7 +149,12 @@ In development, `window.app` and `window.engine` are available in the browser co
## Credits
-- [inkwash](https://github.com/johnowhitaker/inkwash) by Jonathan Whitaker, for the GPU fluid simulation.
+- [inkwash](https://github.com/johnowhitaker/inkwash) by Jonathan Whitaker, for the wet-paper fluid model, and [WebGL-Fluid-Simulation](https://github.com/PavelDoGreat/WebGL-Fluid-Simulation) by Pavel Dobryakov, for the GPU fluid solver.
+- [water-brush](https://github.com/1000ship/water-brush) by Chun Seonghyeok, where this app started.
- [spectral.js](https://github.com/rvanwijnen/spectral.js), for the spectral colour data.
- Single-line fonts (Hershey, EMS, Relief and others) from [drawingbots.net](https://drawingbots.net).
- [vpype-js](https://github.com/plottertools/vpype-js) for SVG import, [q-floodfill](https://github.com/pavelkukov/q-floodfill) for the fill tool, [heic-to](https://github.com/hoppergee/heic-to) for iPhone photos and [MediaPipe](https://ai.google.dev/edge/mediapipe) for hand tracking.
+
+## License
+
+[MIT](LICENSE). The bundled fonts and third-party code keep their own licenses (SIL Open Font License, Hershey Fonts license, MIT, Apache-2.0, LGPL-3.0). See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md
new file mode 100644
index 0000000..179c981
--- /dev/null
+++ b/THIRD_PARTY_NOTICES.md
@@ -0,0 +1,108 @@
+# Third-party notices
+
+Watercolor Playground's own code is released under the MIT License (see [LICENSE](LICENSE)).
+It builds on the work below, which keeps its own license.
+
+## Code and data
+
+### WebGL Fluid Simulation (MIT)
+
+The Navier–Stokes passes in `src/engine/shaders.ts` (divergence, pressure, gradient subtract,
+curl and vorticity confinement) follow the standard GPU fluid solver from
+[WebGL-Fluid-Simulation](https://github.com/PavelDoGreat/WebGL-Fluid-Simulation).
+
+```
+MIT License
+
+Copyright (c) 2017 Pavel Dobryakov
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+```
+
+### spectral.js (MIT)
+
+The reflectance data in `src/engine/spectral.ts` and `src/engine/spectralData.ts` comes from
+[spectral.js](https://github.com/rvanwijnen/spectral.js), Copyright (c) Ronald van Wijnen,
+released under the MIT License (same terms as above).
+
+### water-brush (MIT)
+
+The first version of this app grew out of [water-brush](https://github.com/1000ship/water-brush),
+Copyright 2021 Chun Seonghyeok, released under the MIT License (same terms as above).
+
+### inkwash
+
+The way water is handled (a wetness field that confines flow to wet paper, pigment that only
+moves where wet, and pigment that "fixes" into the paper) is modelled on
+[inkwash](https://github.com/johnowhitaker/inkwash) by Jonathan Whitaker.
+
+## Fonts
+
+The single-line fonts in `public/fonts/single-line/` were collected from
+[drawingbots.net](https://drawingbots.net). They are **not** covered by the MIT License.
+
+| Fonts | Source | License |
+|---|---|---|
+| EMS family (`EMS/`) | [Evil Mad Scientist SVG fonts](https://gitlab.com/oskay/svg-fonts) | SIL Open Font License 1.1 |
+| Cutlings family, EMS Allure/Elfin Smooth (`Cutlings/`) | [Ellen Wasbo, Cutlings](http://cutlings.wasbo.net/products-fonts/) | SIL Open Font License 1.1 |
+| Custom Script, Square Normal/Italic (`Shriinivas/`) | [inkscapestrokefont](https://github.com/Shriinivas/inkscapestrokefont), derived from Pinyon Script and Square Grotesk | SIL Open Font License 1.1 |
+| Relief SingleLine (`Relief/`) | [Relief SingleLine](https://github.com/isdat-type/Relief-SingleLine), Copyright 2021 The Relief SingleLine Project Authors | SIL Open Font License 1.1 |
+| Routed Gothic | [Routed Gothic](https://github.com/dse/routed-gothic) by Darren Embry | SIL Open Font License 1.1 |
+| Hershey family (`Hershey/`, `Cutlings/HersheyScript1smooth.svg`) | [Evil Mad Scientist SVG fonts](https://gitlab.com/oskay/svg-fonts), [inkscapestrokefont](https://github.com/Shriinivas/inkscapestrokefont), Cutlings | Hershey Fonts license (below) |
+
+The full text of the SIL Open Font License 1.1 is in
+[`public/fonts/single-line/EMS/OFL.txt`](public/fonts/single-line/EMS/OFL.txt) and at
+<https://openfontlicense.org>. `font-atlas.png` is a rendering of these fonts.
+
+### Hershey Fonts
+
+```
+USE RESTRICTION:
+ This distribution of the Hershey Fonts may be used by anyone for
+ any purpose, commercial or otherwise, providing that:
+ 1. The following acknowledgements must be distributed with
+ the font data:
+ - The Hershey Fonts were originally created by Dr.
+ A. V. Hershey while working at the U. S.
+ National Bureau of Standards.
+ - The format of the Font data in this distribution
+ was originally created by
+ James Hurt
+ Cognition, Inc.
+ 900 Technology Park Drive
+ Billerica, MA 01821
+ (mit-eddie!ci-dandelion!hurt)
+ 2. The font data in this distribution may be converted into
+ any other format *EXCEPT* the format distributed by
+ the U.S. NTIS where each point is described
+ in eight bytes as "xxx yyy:", where xxx and yyy are
+ the coordinate values as ASCII numbers.
+```
+
+## npm dependencies
+
+These are bundled into the built site. Each keeps its own license, shipped in its package.
+
+| Package | License |
+|---|---|
+| [preact](https://github.com/preactjs/preact), [@preact/signals](https://github.com/preactjs/signals) | MIT |
+| [vpype-js](https://github.com/plottertools/vpype-js) | MIT |
+| [q-floodfill](https://github.com/pavelkukov/q-floodfill) | MIT |
+| [@mediapipe/tasks-vision](https://github.com/google-ai-edge/mediapipe) | Apache-2.0 |
+| [heic-to](https://github.com/hoppergee/heic-to) | LGPL-3.0 (loaded unmodified as a separate, lazily imported chunk) |
diff --git a/package-lock.json b/package-lock.json
index 2cc6893..9bc707b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -19,7 +19,8 @@
"@preact/preset-vite": "^2.10.6",
"typescript": "^7.0.2",
"vite": "^8.3.2"
- }
+ },
+ "license": "MIT"
},
"node_modules/@babel/code-frame": {
"version": "7.29.7",
diff --git a/package.json b/package.json
index 346015d..ccdd79f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,7 @@
{
"name": "watercolor",
"private": true,
+ "license": "MIT",
"version": "0.1.0",
"type": "module",
"scripts": {