Skip to content

Commit 9a8baf6

Browse files
committed
Update deps but three
1 parent b5f44e7 commit 9a8baf6

15 files changed

+3385
-4926
lines changed

modules.d.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
// Allowing import MDL-files
2-
declare module '*.mdl'
2+
declare module '*.mdl';
33

4-
declare module 'fast-png'
5-
declare module 'three-orbit-controls'
4+
declare module 'three-orbit-controls';
65

76
declare module 'fast-dataview' {
87
class FastDataView extends DataView {}
98

109
// prettier-ignore
1110
namespace FastDataView {}
12-
export = FastDataView
11+
export = FastDataView;
1312
}

package.json

+44-42
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scripts": {
3-
"start": "webpack-dev-server --mode development --host 0.0.0.0",
4-
"build": "webpack --p",
3+
"start": "webpack serve --mode development --host 0.0.0.0",
4+
"build": "webpack --mode production",
55
"test": "jest",
66
"prettier": "prettier -c --write ./src/**/*"
77
},
@@ -18,7 +18,7 @@
1818
},
1919
"globals": {
2020
"ts-jest": {
21-
"tsConfig": "tsconfig.json"
21+
"tsconfig": "tsconfig.json"
2222
}
2323
},
2424
"testMatch": [
@@ -31,49 +31,51 @@
3131
]
3232
},
3333
"devDependencies": {
34-
"@babel/core": "^7.1.6",
35-
"@types/gl-matrix": "^2.4.0",
36-
"@types/html-webpack-plugin": "^2.30.3",
37-
"@types/jest": "^24.0.25",
38-
"@types/jest-image-snapshot": "^2.11.1",
39-
"@types/node": "^10.3.1",
40-
"@types/ramda": "^0.25.34",
41-
"@types/react": "^16.8.2",
42-
"@types/react-color": "^2.14.0",
43-
"@types/react-dom": "^16.8.0",
44-
"@types/react-dropzone": "^4.2.2",
45-
"@types/react-hot-loader": "^4.1.0",
46-
"@types/styled-components": "4.1.8",
34+
"@babel/core": "^7.16.12",
35+
"@types/gl-matrix": "^3.2.0",
36+
"@types/html-webpack-plugin": "^3.2.6",
37+
"@types/jest": "^27.4.0",
38+
"@types/jest-image-snapshot": "^4.3.1",
39+
"@types/node": "^17.0.13",
40+
"@types/ramda": "^0.27.64",
41+
"@types/react": "^17.0.38",
42+
"@types/react-color": "^3.0.6",
43+
"@types/react-dom": "^17.0.11",
44+
"@types/react-dropzone": "^5.1.0",
45+
"@types/react-hot-loader": "^4.1.1",
46+
"@types/styled-components": "^5.1.21",
4747
"@types/three": "^0.93.19",
48-
"awesome-typescript-loader": "^5.2.0",
49-
"babel-plugin-styled-components": "^1.8.0",
48+
"awesome-typescript-loader": "^5.2.1",
49+
"babel-plugin-styled-components": "^2.0.2",
5050
"fast-dataview": "^0.3.3",
51-
"file-loader": "^1.1.11",
52-
"html-webpack-plugin": "^3.2.0",
53-
"jest": "^24.9.0",
54-
"jest-image-snapshot": "^2.5.0",
55-
"prettier": "^1.11.1",
56-
"ts-jest": "^24.2.0",
57-
"ts-node": "^8.5.4",
58-
"typescript": "^3.7.4",
59-
"typescript-eslint-parser": "^20.0.0",
60-
"webpack": "^4.0.0-beta.3",
61-
"webpack-cli": "^3.0.8",
62-
"webpack-dev-server": "^3.1.4"
51+
"file-loader": "^6.2.0",
52+
"html-webpack-plugin": "^5.5.0",
53+
"jest": "^27.4.7",
54+
"jest-image-snapshot": "^4.5.1",
55+
"prettier": "^2.5.1",
56+
"ts-jest": "^27.1.3",
57+
"ts-loader": "^9.2.6",
58+
"ts-node": "^10.4.0",
59+
"typescript": "^4.5.5",
60+
"typescript-eslint-parser": "^22.0.0",
61+
"webpack": "^5.67.0",
62+
"webpack-cli": "^4.9.2",
63+
"webpack-dev-server": "^4.7.3"
6364
},
6465
"dependencies": {
65-
"fast-png": "^3.1.0",
66-
"gl-matrix": "^2.7.1",
67-
"libreact": "^2.8.1",
68-
"multi-array-view": "^0.1.0",
69-
"ramda": "^0.25.0",
70-
"react": "^16.8.1",
71-
"react-color": "^2.17.0",
72-
"react-dom": "^16.8.1",
73-
"react-dropzone": "^8.0.4",
74-
"react-hot-loader": "^4.6.5",
75-
"style-loader": "^0.23.1",
76-
"styled-components": "^4.4.1",
66+
"@types/webpack": "^5.28.0",
67+
"fast-png": "^6.1.0",
68+
"gl-matrix": "^3.4.3",
69+
"libreact": "^2.13.3",
70+
"multi-array-view": "^0.1.7",
71+
"ramda": "^0.28.0",
72+
"react": "^17.0.2",
73+
"react-color": "^2.19.3",
74+
"react-dom": "^17.0.2",
75+
"react-dropzone": "^11.5.1",
76+
"react-hot-loader": "^4.13.0",
77+
"style-loader": "^3.3.1",
78+
"styled-components": "^5.3.3",
7779
"three": "^0.101.1",
7880
"three-orbit-controls": "^82.1.0"
7981
}

src/lib/__tests__/binaryReader.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as fs from 'fs';
22
import * as path from 'path';
3-
import * as FastDataView from 'fast-dataview';
3+
import FastDataView from 'fast-dataview';
44
import * as structs from '../../const/structs';
55
import { readStruct, readStructMultiple } from '../binaryReader';
66
import {
@@ -23,7 +23,7 @@ import {
2323
string,
2424
array,
2525
vec3,
26-
skip,
26+
skip
2727
} from '../dataTypes';
2828

2929
// Loading model for testing

src/lib/__tests__/geometryBuilder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const leetModelData = parseModel(leetBuffer);
1111
const meshDataPath = [
1212
[0, 0, 0],
1313
[0, 0, 1],
14-
[1, 1, 0],
14+
[1, 1, 0]
1515
];
1616

1717
describe('test geometry building', () => {
+26-20
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
1-
import * as path from 'path'
2-
import * as fs from 'fs'
3-
import { parseModel } from '../modelDataParser'
4-
import { calcBoneQuaternion, calcRotations } from '../geometryTransformer'
1+
import * as path from 'path';
2+
import * as fs from 'fs';
3+
import { parseModel } from '../modelDataParser';
4+
import { calcBoneQuaternion, calcRotations } from '../geometryTransformer';
55

6-
const leetPath = path.resolve(__dirname, '../../__mock__/leet.mdl')
7-
const leetBuffer: ArrayBuffer = fs.readFileSync(leetPath).buffer
8-
const leetModelData = parseModel(leetBuffer)
6+
const leetPath = path.resolve(__dirname, '../../__mock__/leet.mdl');
7+
const leetBuffer: ArrayBuffer = fs.readFileSync(leetPath).buffer;
8+
const leetModelData = parseModel(leetBuffer);
99

10-
//
11-
;[[0, 0, 0], [15, 2, 23], [6, 55, 10]].forEach(([boneIndex, sequenceIndex, frame]) => {
10+
[
11+
[0, 0, 0],
12+
[15, 2, 23],
13+
[6, 55, 10]
14+
].forEach(([boneIndex, sequenceIndex, frame]) => {
1215
test(`should calculate valid quaternion of bone #${boneIndex} sequence #${sequenceIndex} frame #${frame}`, () => {
13-
const bone = leetModelData.bones[boneIndex]
14-
const animOffset = leetModelData.animations[sequenceIndex][boneIndex].offset
15-
const animValues = leetModelData.animValues
16+
const bone = leetModelData.bones[boneIndex];
17+
const animOffset = leetModelData.animations[sequenceIndex][boneIndex].offset;
18+
const animValues = leetModelData.animValues;
1619

17-
expect(calcBoneQuaternion(frame, bone, animOffset, animValues, boneIndex, sequenceIndex, 0)).toMatchSnapshot()
18-
})
19-
})
20+
expect(calcBoneQuaternion(frame, bone, animOffset, animValues, boneIndex, sequenceIndex, 0)).toMatchSnapshot();
21+
});
22+
});
2023

21-
//
22-
;[[0, 0], [2, 23], [55, 10]].forEach(([sequenceIndex, frame]) => {
24+
[
25+
[0, 0],
26+
[2, 23],
27+
[55, 10]
28+
].forEach(([sequenceIndex, frame]) => {
2329
test(`should calculate rotations of a #${sequenceIndex} sequence of #${frame} frame`, () => {
24-
expect(calcRotations(leetModelData, sequenceIndex, frame)).toMatchSnapshot()
25-
})
26-
})
30+
expect(calcRotations(leetModelData, sequenceIndex, frame)).toMatchSnapshot();
31+
});
32+
});

0 commit comments

Comments
 (0)