# @houdini-css-paint/deep-sea

> CSS Paintlet for drawing stylised 2D sea floor

Latest version **0.1.3** (published 2021-01-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @houdini-css-paint/deep-sea
pnpm add @houdini-css-paint/deep-sea
yarn add @houdini-css-paint/deep-sea
bun add @houdini-css-paint/deep-sea
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2021-01-26 |
| First published | 2021-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Georgi Nikolov |
| Maintainers | nikoloffgeorgi |
| Keywords | houdini, css, css-houdini, PaintWorklet, paint, worklet |

## Links

- npm: https://www.npmjs.com/package/@houdini-css-paint/deep-sea
- Repository: https://github.com/gnikoloff/houdini-dojo
- Homepage: https://github.com/gnikoloff/houdini-dojo#readme
- Issues: https://github.com/gnikoloff/houdini-dojo/issues
- npm.io page: https://npm.io/package/@houdini-css-paint/deep-sea

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2021-01-26
- 0.1.5 — 2021-01-25
- 0.1.4 — 2021-01-25
- 0.1.2 — 2021-01-25
- 0.1.1 — 2021-01-25
- 0.1.0 — 2021-01-25
- 0.0.6 — 2021-01-24
- 0.0.4 — 2021-01-24
- 0.0.2 — 2021-01-24
- 0.0.1 — 2021-01-24

## README

# CSS Houdini Deep Sea

A CSS Houdini Paintlet to render stylised 2D sea floor.

![Deep Sea Paintlet Render](https://css-houdini-dojo.georgi-nikolov.com/images/deep-sea-paintlet-export.png)

Demo Page - [http://css-houdini-dojo.georgi-nikolov.com](http://css-houdini-dojo.georgi-nikolov.com/)

## 1. Load the Worklet

Using CDN is the easiest way to add this Worklet:

```
if ('paintWorklet' in CSS) {
  CSS.paintWorklet.addModule('https://unpkg.com/@houdini-css-paint/deep-sea/index.js');
}
```

## 2. Polyfill

To add support for all modern browsers, you can load the worklet with [css-paint-polyfill](https://github.com/GoogleChromeLabs/css-paint-polyfill) fallback.

```
<script>
  ;(async function() {
    if (CSS['paintWorklet'] === undefined)
      await import('https://unpkg.com/css-paint-polyfill')

    CSS.paintWorklet.addModule('https://unpkg.com/@houdini-css-paint/deep-sea/index.js')
  })()
</script>
```

## 3. Using the Paintlet

To use this Paintlet after you have succesffuly loaded it, you need to add `background(-image): paint(deep-sea)` to any HTML element on your page. You can control its appearance just like any other regular image referenced in CSS with properties such as `background-size`, `background-repeat`, `background-position` and so on.

```
.my-element {
  --deep-sea-bubbles-count: 36;
  --deep-sea-grass-count: 100;
  --deep-sea-background-color: #110755;
  --deep-sea-grass-color: #639c5b;
  --deep-sea-grass-height: 50%;

  background-image: paint(deep-sea);
}
```

| Property                    | Description                               | Default Value |
| --------------------------- | ----------------------------------------- | ------------- |
| --deep-sea-bubbles-count    | How many bubbles to render                | 100           |
| --deep-sea-grass-count      | How much individual grass stems to render | 100           |
| --deep-sea-background-color | Background color                          | #6ab04c       |
| --deep-sea-grass-color      | Grass color                               | #639c5b       |
| --deep-sea-grass-height     | Grass height in percentage                | 60%           |

# License

MIT License

---
_Source: https://npm.io/package/@houdini-css-paint/deep-sea · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
