@thi.ng/rasterize 1.0.185 → 1.0.186
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -23
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
|
-
<!-- Please see: https://
|
|
3
|
-
# 
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@thi.ng/rasterize)
|
|
6
6
|

|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
10
|
> This is one of 214 standalone projects, maintained as part
|
|
11
|
-
> of the [@thi.ng/umbrella](https://
|
|
11
|
+
> of the [@thi.ng/umbrella](https://codeberg.org/thi.ng/umbrella/) ecosystem
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
14
|
-
> 🚀 Please help me to work full-time on these projects by [sponsoring
|
|
15
|
-
>
|
|
14
|
+
> 🚀 Please help me to work full-time on these projects by [sponsoring
|
|
15
|
+
> me](https://codeberg.org/thi.ng/umbrella/src/branch/develop/CONTRIBUTING.md#donations).
|
|
16
|
+
> Thank you! ❤️
|
|
16
17
|
|
|
17
18
|
- [About](#about)
|
|
18
19
|
- [Circle](#circle)
|
|
@@ -37,9 +38,9 @@ Headless 2D shape drawing, filling & rasterization for arbitrary targets/purpose
|
|
|
37
38
|
The functions in this package can be used with any
|
|
38
39
|
[`IGrid2D`](https://docs.thi.ng/umbrella/api/interfaces/IGrid2D.html) compatible
|
|
39
40
|
grid/image type (e.g. those provided by
|
|
40
|
-
[@thi.ng/pixel](https://
|
|
41
|
+
[@thi.ng/pixel](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/pixel)
|
|
41
42
|
or
|
|
42
|
-
[@thi.ng/text-canvas](https://
|
|
43
|
+
[@thi.ng/text-canvas](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/text-canvas)).
|
|
43
44
|
|
|
44
45
|
Currently the following functions are available. All of them support [custom
|
|
45
46
|
shader-like](#custom-shaders) functions to produce "pixel" values.
|
|
@@ -122,19 +123,19 @@ const img = floatBuffer(W, W);
|
|
|
122
123
|
drawCircle(img, W/2, W/2, W/2 - 4, defUVGradient(W, W), true);
|
|
123
124
|
```
|
|
124
125
|
|
|
125
|
-

|
|
126
127
|
|
|
127
128
|
## Status
|
|
128
129
|
|
|
129
130
|
**ALPHA** - bleeding edge / work-in-progress
|
|
130
131
|
|
|
131
|
-
[Search or submit any issues for this package](https://
|
|
132
|
+
[Search or submit any issues for this package](https://codeberg.org/thi.ng/umbrella/issues?q=%5Brasterize%5D)
|
|
132
133
|
|
|
133
134
|
## Related packages
|
|
134
135
|
|
|
135
|
-
- [@thi.ng/grid-iterators](https://
|
|
136
|
-
- [@thi.ng/pixel](https://
|
|
137
|
-
- [@thi.ng/text-canvas](https://
|
|
136
|
+
- [@thi.ng/grid-iterators](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/grid-iterators) - 2D grid and shape iterators w/ multiple orderings
|
|
137
|
+
- [@thi.ng/pixel](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/pixel) - Typedarray integer & float pixel buffers w/ customizable formats, blitting, drawing, convolution
|
|
138
|
+
- [@thi.ng/text-canvas](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/text-canvas) - Text based canvas, drawing, plotting, tables with arbitrary formatting (incl. ANSI/HTML)
|
|
138
139
|
|
|
139
140
|
## Installation
|
|
140
141
|
|
|
@@ -166,25 +167,25 @@ Package sizes (brotli'd, pre-treeshake): ESM: 1.47 KB
|
|
|
166
167
|
|
|
167
168
|
## Dependencies
|
|
168
169
|
|
|
169
|
-
- [@thi.ng/api](https://
|
|
170
|
-
- [@thi.ng/checks](https://
|
|
171
|
-
- [@thi.ng/equiv](https://
|
|
172
|
-
- [@thi.ng/grid-iterators](https://
|
|
173
|
-
- [@thi.ng/porter-duff](https://
|
|
174
|
-
- [@thi.ng/random](https://
|
|
175
|
-
- [@thi.ng/transducers](https://
|
|
170
|
+
- [@thi.ng/api](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/api)
|
|
171
|
+
- [@thi.ng/checks](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/checks)
|
|
172
|
+
- [@thi.ng/equiv](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/equiv)
|
|
173
|
+
- [@thi.ng/grid-iterators](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/grid-iterators)
|
|
174
|
+
- [@thi.ng/porter-duff](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/porter-duff)
|
|
175
|
+
- [@thi.ng/random](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random)
|
|
176
|
+
- [@thi.ng/transducers](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/transducers)
|
|
176
177
|
|
|
177
178
|
Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
|
|
178
179
|
|
|
179
180
|
## Usage examples
|
|
180
181
|
|
|
181
182
|
One project in this repo's
|
|
182
|
-
[/examples](https://
|
|
183
|
+
[/examples](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples)
|
|
183
184
|
directory is using this package:
|
|
184
185
|
|
|
185
|
-
| Screenshot | Description | Live demo | Source
|
|
186
|
-
|
|
187
|
-
| <img src="https://
|
|
186
|
+
| Screenshot | Description | Live demo | Source |
|
|
187
|
+
|:-----------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------|:------------------------------------------------------|:-------------------------------------------------------------------------------------------|
|
|
188
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/rasterize-blend.jpg" width="240"/> | Steering behavior drawing with alpha-blended shapes | [Demo](https://demo.thi.ng/umbrella/rasterize-blend/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/rasterize-blend) |
|
|
188
189
|
|
|
189
190
|
## API
|
|
190
191
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rasterize",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.186",
|
|
4
4
|
"description": "Headless 2D shape drawing, filling & rasterization for arbitrary targets/purposes (no canvas required)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://
|
|
11
|
+
"url": "git+https://codeberg.org/thi.ng/umbrella.git",
|
|
12
12
|
"directory": "packages/rasterize"
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://thi.ng/rasterize",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@thi.ng/api": "^8.12.
|
|
44
|
-
"@thi.ng/checks": "^3.8.
|
|
45
|
-
"@thi.ng/equiv": "^2.1.
|
|
46
|
-
"@thi.ng/grid-iterators": "^4.0.
|
|
47
|
-
"@thi.ng/porter-duff": "^2.1.
|
|
48
|
-
"@thi.ng/random": "^4.1.
|
|
49
|
-
"@thi.ng/transducers": "^9.6.
|
|
43
|
+
"@thi.ng/api": "^8.12.18",
|
|
44
|
+
"@thi.ng/checks": "^3.8.8",
|
|
45
|
+
"@thi.ng/equiv": "^2.1.107",
|
|
46
|
+
"@thi.ng/grid-iterators": "^4.0.158",
|
|
47
|
+
"@thi.ng/porter-duff": "^2.1.130",
|
|
48
|
+
"@thi.ng/random": "^4.1.43",
|
|
49
|
+
"@thi.ng/transducers": "^9.6.31"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"esbuild": "^0.27.2",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"status": "alpha",
|
|
128
128
|
"year": 2021
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "8ddf86ea0a1e658ddbf19cc645b29d0c176e29c4\n"
|
|
131
131
|
}
|