skia-canvas 1.0.0 → 1.0.2
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/CHANGELOG.md +10 -1
- package/README.md +9 -6
- package/lib/index.js +4 -0
- package/package.json +5 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- ## 🥚 ⟩ [Unreleased] -->
|
|
4
4
|
|
|
5
|
+
## 📦 ⟩ [v1.0.1] ⟩ Oct 15, 2022
|
|
6
|
+
|
|
7
|
+
### Bugfixes
|
|
8
|
+
- If an offscreen buffer can't be allocated using the Vulkan renderer, CPU rendering is used as a fallback
|
|
9
|
+
- The `drawCanvas()` routine now works even when the destination canvas is later saved as an SVG (previously, the source canvas would be missing from the output). Caveat: this only works if the destination canvas is using the default `source-over` blend mode, has its `globalAlpha` set to 1, and is not using shadows or the `effect` property. If any of those defaults have been changed, the drawn canvas will not appear in the saved SVG. Bitmap and PDF exports do not have this restriction.
|
|
10
|
+
|
|
11
|
+
### Misc. Improvements
|
|
12
|
+
- Added a `fullscreen` event to the `Window` class to flag changes into and out of full-screen mode.
|
|
13
|
+
|
|
5
14
|
## 📦 ⟩ [v1.0.0] ⟩ Aug 5, 2022
|
|
6
15
|
|
|
7
16
|
### New Features
|
|
@@ -17,7 +26,7 @@
|
|
|
17
26
|
|
|
18
27
|
### Misc. Improvements
|
|
19
28
|
- The [`.filter`][filter] property's `"blur(…)"` and `"drop-shadow(…)"` effects now match browser behavior much more closely and scale appropriately with the `density` export option.
|
|
20
|
-
- Antialiasing is smoother, particularly when down-scaling images, thanks to the use of mipmaps rather than Skia's (apparently buggy?) implementation of
|
|
29
|
+
- Antialiasing is smoother, particularly when down-scaling images, thanks to the use of mipmaps rather than Skia's (apparently buggy?) implementation of bicubic interpolation.
|
|
21
30
|
- Calling `clearRect()` with dimensions that fully enclose the canvas will now discard all the vector objects that have been drawn so far (rather than simply covering them up).
|
|
22
31
|
- Upgraded Skia to milestone 103
|
|
23
32
|
|
package/README.md
CHANGED
|
@@ -1065,12 +1065,15 @@ Removes the window from the screen permanently. References to the `Window` objec
|
|
|
1065
1065
|
#### `on()` / `off()` / `once()`
|
|
1066
1066
|
The `Window` object is an [Event Emitter][event_emitter] subclass and supports all the standard methods for adding and removing event listeners. The supported events are mostly consistent with browser-based DOM events, but include some non-standard additions (⚡) specific to Skia Canvas:
|
|
1067
1067
|
|
|
1068
|
-
| Mouse | Keyboard | Window
|
|
1069
|
-
| -- | -- | --
|
|
1070
|
-
| [`mousedown`][mousedown] | [`keydown`][keydown] | [`
|
|
1071
|
-
| [`mouseup`][mouseup] | [`keyup`][keyup] | [`
|
|
1072
|
-
| [`mousemove`][mousemove] | [`input`][input] |
|
|
1073
|
-
| [`wheel`][wheel]
|
|
1068
|
+
| Mouse | Keyboard | Window | Focus | Animation |
|
|
1069
|
+
| -- | -- | -- | -- | -- |
|
|
1070
|
+
| [`mousedown`][mousedown] | [`keydown`][keydown] | [`fullscreen`](#fullscreen-event) ⚡ | [`blur`][blur] | [`setup`][setup] ⚡|
|
|
1071
|
+
| [`mouseup`][mouseup] | [`keyup`][keyup] | [`move`](#move-event) ⚡ | [`focus`][focus] | [`frame`][frame] ⚡|
|
|
1072
|
+
| [`mousemove`][mousemove] | [`input`][input] | [`resize`][resize] | | [`draw`][draw] ⚡ |
|
|
1073
|
+
| [`wheel`][wheel] |
|
|
1074
|
+
|
|
1075
|
+
##### `fullscreen` event
|
|
1076
|
+
Emitted when the a window switches into or out of full-screen mode. The event object includes a boolean `enabled` property flagging the new state.
|
|
1074
1077
|
|
|
1075
1078
|
##### `move` event
|
|
1076
1079
|
Emitted when the user drags the window to a new position. The event object includes `top` and `left` properties expressed in resolution-independent points.
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skia-canvas",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "A GPU-accelerated Canvas Graphics API for Node",
|
|
5
5
|
"author": "Christian Swinehart <drafting@samizdat.co>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"build": "cargo-cp-artifact -nc lib/v6/index.node -- cargo build --message-format=json-render-diagnostics",
|
|
22
22
|
"install": "node-pre-gyp install || npm run build -- --release",
|
|
23
23
|
"package": "node-pre-gyp package",
|
|
24
|
-
"upload": "
|
|
24
|
+
"upload": "gh release upload v$npm_package_version build/stage/v$npm_package_version/*",
|
|
25
25
|
"test": "jest"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/jest": "^28.1.6",
|
|
37
37
|
"@types/node": "^18.6.1",
|
|
38
|
-
"aws-sdk": "^2.1181.0",
|
|
39
38
|
"express": "^4.18.1",
|
|
40
39
|
"jest": "^28.1.3",
|
|
41
40
|
"lodash": "^4.17.21",
|
|
@@ -47,13 +46,10 @@
|
|
|
47
46
|
],
|
|
48
47
|
"binary": {
|
|
49
48
|
"module_name": "index",
|
|
50
|
-
"module_path": "./lib/
|
|
49
|
+
"module_path": "./lib/v6",
|
|
51
50
|
"remote_path": "./v{version}",
|
|
52
|
-
"package_name": "{platform}-{arch}-{
|
|
53
|
-
"host": "https://skia-canvas
|
|
54
|
-
"napi_versions": [
|
|
55
|
-
6
|
|
56
|
-
]
|
|
51
|
+
"package_name": "{platform}-{arch}-{libc}.tar.gz",
|
|
52
|
+
"host": "https://github.com/samizdatco/skia-canvas/releases/download"
|
|
57
53
|
},
|
|
58
54
|
"keywords": [
|
|
59
55
|
"canvas",
|