Skip to content

Commit 8ebe18d

Browse files
committed
Update dependencies
1 parent ed1affe commit 8ebe18d

File tree

17 files changed

+535
-372
lines changed

17 files changed

+535
-372
lines changed

.github/workflows/eslint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ jobs:
1212
Eslint:
1313
strategy:
1414
matrix:
15-
os: [ubuntu-20.04]
15+
os: [ubuntu-22.04]
1616

1717
runs-on: ${{ matrix.os }}
1818

1919
steps:
2020

2121
- name: Fetch Repository
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323
with:
2424
persist-credentials: false
2525

2626
- name: Install Node.js
27-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v4
2828
with:
29-
node-version: 18.16.0
29+
node-version: 22.9.0
3030
cache: 'npm'
3131

3232
- name: Install Modules

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
steps:
1515

1616
- name: Fetch Repository
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818
with:
1919
persist-credentials: false
2020

2121
- name: Install Node.js
22-
uses: actions/setup-node@v3
22+
uses: actions/setup-node@v4
2323
with:
24-
node-version: 18.16.0
24+
node-version: 22.9.0
2525
cache: 'npm'
2626

2727
- name: Get Package Version

.github/workflows/test.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Test
2+
defaults:
3+
run:
4+
shell: bash
25

36
on:
47
push:
@@ -12,28 +15,29 @@ jobs:
1215
Test:
1316
strategy:
1417
matrix:
15-
os: [ubuntu-20.04]
18+
os: [ubuntu-22.04, windows-2022, macos-14]
1619

1720
runs-on: ${{ matrix.os }}
1821

1922
steps:
2023

2124
- name: Fetch Repository
22-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2326
with:
2427
persist-credentials: false
2528

2629
- name: Install Node.js
27-
uses: actions/setup-node@v3
30+
uses: actions/setup-node@v4
2831
with:
29-
node-version: 18.16.0
32+
node-version: 22.9.0
3033
cache: 'npm'
3134

3235
- name: Install Modules
3336
run: npm ci
3437

3538
- name: Run Unit Tests
36-
if: matrix.os == 'ubuntu-20.04'
39+
if: matrix.os == 'ubuntu-22.04'
3740
run: |
38-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/ci
39-
xvfb-run --auto-servernum npm run test
41+
sudo apt-get update -qq
42+
sudo apt-get install -qq libgles2-mesa-dev libxcb-cursor0 libxcb-icccm4 libxcb-keysyms1 libxcb-shape0 libxcb-xkb1 libxkbcommon-x11-0
43+
xvfb-run --auto-servernum npm run test-ci

__screenshots__/ui.png

1.73 KB
Loading

ci/libxcb-xkb.so.1

-106 KB
Binary file not shown.

ci/libxkbcommon-x11.so.0

-30.9 KB
Binary file not shown.

eslint.config.js

Lines changed: 1 addition & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,3 @@
11
'use strict';
22

3-
const js = require('@eslint/js');
4-
5-
6-
module.exports = [
7-
{
8-
ignores: ['examples/clouds']
9-
},
10-
js.configs.recommended,
11-
{
12-
languageOptions: {
13-
'parserOptions': {
14-
'ecmaVersion': 2022,
15-
sourceType: 'commonjs'
16-
},
17-
globals: {
18-
global: 'readonly',
19-
require: 'readonly',
20-
Buffer: 'readonly',
21-
module: 'readonly',
22-
console: 'readonly',
23-
__dirname: 'readonly',
24-
process: 'readonly',
25-
setTimeout: 'readonly',
26-
setImmediate: 'readonly',
27-
clearImmediate: 'readonly',
28-
URL: 'readonly',
29-
},
30-
},
31-
'rules': {
32-
'arrow-parens': ['error', 'always'],
33-
'no-trailing-spaces': [
34-
'error',
35-
{
36-
'skipBlankLines': true
37-
}
38-
],
39-
'indent': [
40-
'error',
41-
'tab',
42-
{
43-
'SwitchCase': 1
44-
}
45-
],
46-
'operator-linebreak': [
47-
'error',
48-
'after',
49-
{
50-
'overrides': {
51-
'?': 'before',
52-
':': 'before'
53-
}
54-
}
55-
],
56-
'max-len': ['error', 110],
57-
'quotes': [
58-
'error',
59-
'single'
60-
],
61-
'semi': [
62-
'error',
63-
'always'
64-
],
65-
'no-multiple-empty-lines': ['error', { 'max': 3, 'maxEOF': 1, 'maxBOF': 1 }],
66-
'keyword-spacing': ['error', { 'before': true, 'after': true }],
67-
'space-before-blocks': ['error'],
68-
'space-before-function-paren': [
69-
'error', {'anonymous': 'always', 'named': 'never', 'asyncArrow': 'always'}
70-
],
71-
'camelcase': ['error'],
72-
'no-tabs': [0],
73-
'no-unused-vars': [
74-
'error',
75-
{
76-
'argsIgnorePattern': '^_',
77-
'varsIgnorePattern': '^_',
78-
'caughtErrorsIgnorePattern': '^_'
79-
}
80-
],
81-
'global-require': [0],
82-
'no-underscore-dangle': [0],
83-
'no-plusplus': [0],
84-
'no-shadow': [0],
85-
'node/no-unpublished-require': [0],
86-
'no-process-exit': [0],
87-
'linebreak-style': [0],
88-
'node/no-missing-require': [0],
89-
'no-console': [0],
90-
'node/no-unsupported-features/es-builtins': 0,
91-
'node/no-unsupported-features/node-builtins': 0,
92-
'func-names': [
93-
'error',
94-
'never',
95-
{
96-
'generators': 'never'
97-
}
98-
]
99-
}
100-
},
101-
];
3+
module.exports = require('addon-tools-raub/utils/eslint-common');

examples/gui/main.ts

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,25 @@ import { init as initQml } from '3d-qml-raub';
1010
const __dirname = dirname(fileURLToPath(import.meta.url));
1111

1212
const {
13-
doc, Image: Img, gl,
13+
doc, Image: Img, gl, Screen,
1414
} = init({
1515
isGles3: true,
1616
isWebGL2: true,
1717
autoEsc: true,
1818
autoFullscreen: true,
19+
title: 'QML UI',
1920
});
20-
2121
addThreeHelpers(three, gl);
2222

23+
const screen = new Screen({ three, fov: 90, near: 1, far: 2000, z: 1000 });
24+
const scene = screen.scene;
25+
2326
const { QmlOverlay, loop } = initQml({ doc, gl, cwd: __dirname, three });
2427

25-
const icon = new Img(__dirname + '/../qml.png');
28+
const icon = new Img('qml.png'); // use `npm run gui` from "examples", so CWD is there
2629
icon.on('load', () => { doc.icon = (icon as unknown as typeof doc.icon); });
27-
doc.title = 'QML UI';
28-
29-
30-
const scene = new three.Scene();
31-
scene.fog = new three.FogExp2( 0x000000, 0.0007 );
3230

33-
const cameraPerspective = new three.PerspectiveCamera(90, doc.w / doc.h, 1, 2000);
34-
cameraPerspective.position.z = 1000;
35-
36-
const renderer = new three.WebGLRenderer();
37-
renderer.setPixelRatio(doc.devicePixelRatio);
38-
renderer.setSize(doc.w, doc.h);
39-
// renderer.debug.checkShaderErrors = false;
40-
41-
doc.on('resize', () => {
42-
cameraPerspective.aspect = doc.w / doc.h;
43-
cameraPerspective.updateProjectionMatrix();
44-
renderer.setSize(doc.w, doc.h);
45-
});
31+
scene.fog = new three.FogExp2(0x000000, 0.0007);
4632

4733
const overlay = new QmlOverlay({ file: `${__dirname}/qml/gui.qml` });
4834
scene.add(overlay.mesh);
@@ -83,7 +69,7 @@ const update = () => {
8369
material.color.setHSL(getTimeHue(), 1, 0.5);
8470
particles.rotation.y = Date.now() * 0.00005;
8571

86-
renderer.render(scene, cameraPerspective);
72+
screen.draw();
8773
};
8874

8975
loop(() => update());

0 commit comments

Comments
 (0)