Skip to content

Commit 52319c8

Browse files
committed
Update deps and readme
1 parent 7b4a205 commit 52319c8

14 files changed

+128
-142
lines changed

.github/workflows/build.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Install Node.js
2626
uses: actions/setup-node@v4
2727
with:
28-
node-version: 22.9.0
28+
node-version: 22.14.0
2929
cache: 'npm'
3030

3131
- name: Get Package Version
@@ -38,16 +38,14 @@ jobs:
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4040
with:
41-
draft: true
4241
tag_name: ${{ steps.package-version.outputs.version }}
4342
name: Release ${{ steps.package-version.outputs.version }}
44-
body: Binaries at ${{ github.sha }}
4543

4644
build:
4745
name: Build
4846
strategy:
4947
matrix:
50-
os: [ubuntu-22.04, windows-2022, macos-14]
48+
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, macos-14]
5149

5250
runs-on: ${{ matrix.os }}
5351

@@ -61,7 +59,7 @@ jobs:
6159
- name: Install Node.js
6260
uses: actions/setup-node@v4
6361
with:
64-
node-version: 22.9.0
62+
node-version: 22.14.0
6563
cache: 'npm'
6664

6765
- name: Install Modules
@@ -83,7 +81,6 @@ jobs:
8381
env:
8482
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8583
with:
86-
draft: true
8784
tag_name: ${{ steps.package-version.outputs.version }}
8885
name: Release ${{ steps.package-version.outputs.version }}
8986
files: ${{ steps.pack-files.outputs.pack }}

.github/workflows/cpplint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install Node.js
2727
uses: actions/setup-node@v4
2828
with:
29-
node-version: 22.9.0
29+
node-version: 22.14.0
3030
cache: 'npm'
3131

3232
- name: Install Modules

.github/workflows/eslint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install Node.js
2727
uses: actions/setup-node@v4
2828
with:
29-
node-version: 22.9.0
29+
node-version: 22.14.0
3030
cache: 'npm'
3131

3232
- name: Install Modules

.github/workflows/publish.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install Node.js
2222
uses: actions/setup-node@v4
2323
with:
24-
node-version: 22.9.0
24+
node-version: 22.14.0
2525
cache: 'npm'
2626

2727
- name: Get Package Version
@@ -41,6 +41,5 @@ jobs:
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4343
with:
44-
draft: true
4544
tag_name: ${{ steps.package-version.outputs.version }}
4645
name: Release ${{ steps.package-version.outputs.version }}

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: Unit Tests
1717
strategy:
1818
matrix:
19-
os: [ubuntu-22.04, windows-2022, macos-14]
19+
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, macos-14]
2020

2121
runs-on: ${{ matrix.os }}
2222

@@ -30,7 +30,7 @@ jobs:
3030
- name: Install Node.js
3131
uses: actions/setup-node@v4
3232
with:
33-
node-version: 22.9.0
33+
node-version: 22.14.0
3434
cache: 'npm'
3535

3636
- name: Install Modules

README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,19 @@ step during the `npm i` command.
3535
## Image
3636

3737
```js
38-
const Image = require('image-raub');
38+
import Image from 'image-raub';
39+
const image = new Image('images/test.png'); // relative to CWD
40+
icon.on('load', () => { console.log('data', image.width, image.height, image.data); });
3941
```
4042

41-
See [TypeScript defenitions](/index.d.ts) for more details.
43+
For loaded images, `image.data` will contain a `Buffer` of `4 * width * height` bytes.
44+
You can directly interact with that buffer - read or write, and then save the image
45+
to a file or use it any other way.
46+
47+
With `Image.fromPixels()` it is possible to generate new images from scratch by providing
48+
your own data buffer.
49+
50+
See [TS declarations](/index.d.ts) for more details.
4251

4352

4453
### Set window icon
@@ -47,7 +56,7 @@ Compatible with [glfw-raub](https://github.com/node-3d/glfw-raub) `window.icon`
4756

4857
```js
4958
const icon = new Image();
50-
icon.src = __dirname + '/icons/logo.png';
59+
icon.src = 'icons/logo.png';
5160
icon.on('load', () => { window.icon = icon; });
5261
```
5362

@@ -72,7 +81,7 @@ image.onload = () => {
7281
gl.bindTexture(gl.TEXTURE_2D, null);
7382
};
7483

75-
image.src = `${__dirname}/texture.jpg`;
84+
image.src = 'textures/grass.jpg';
7685
```
7786

7887

examples/data-uri.json

-1
This file was deleted.

0 commit comments

Comments
 (0)