upgrade dependencies

This commit is contained in:
Pig Fang 2019-12-26 10:57:27 +08:00
parent 0f966c18cd
commit 1121ee4c09
6 changed files with 1158 additions and 1161 deletions

2252
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -33,13 +33,14 @@
"dist" "dist"
], ],
"dependencies": { "dependencies": {
"three": "^0.97.0" "three": "^0.112.0"
}, },
"devDependencies": { "devDependencies": {
"@rollup/plugin-node-resolve": "^6.0.0",
"@types/chai": "^4.1.4", "@types/chai": "^4.1.4",
"@types/mocha": "^5.2.5", "@types/mocha": "^5.2.5",
"@types/three": "^0.93.4", "@types/three": "^0.93.4",
"chai": "^4.1.2", "chai": "^4.2.0",
"karma": "^3.0.0", "karma": "^3.0.0",
"karma-chrome-launcher": "^2.2.0", "karma-chrome-launcher": "^2.2.0",
"karma-mocha": "^1.3.0", "karma-mocha": "^1.3.0",
@ -49,16 +50,15 @@
"npm-run-all": "^4.1.3", "npm-run-all": "^4.1.3",
"puppeteer": "^1.7.0", "puppeteer": "^1.7.0",
"rimraf": "^2.6.2", "rimraf": "^2.6.2",
"rollup": "^0.66.6", "rollup": "^1.27.14",
"rollup-plugin-license": "^0.7.0", "rollup-plugin-license": "^0.13.0",
"rollup-plugin-node-resolve": "^3.3.0", "rollup-plugin-terser": "^5.1.3",
"rollup-plugin-typescript2": "^0.17.1", "rollup-plugin-typescript2": "^0.25.3",
"rollup-plugin-uglify": "^6.0.0",
"ts-loader": "^5.2.2", "ts-loader": "^5.2.2",
"tslint": "^5.11.0", "tslint": "^5.11.0",
"tslint-formatter-beauty": "^3.0.0-beta.2", "tslint-formatter-beauty": "^3.0.0-beta.2",
"typescript": "^3.0.1", "typescript": "^3.7.4",
"url-loader": "^1.1.1", "url-loader": "^1.1.1",
"webpack": "^4.17.1" "webpack": "^4.41.4"
} }
} }

View File

@ -1,6 +1,6 @@
import { uglify } from "rollup-plugin-uglify"; import { terser } from "rollup-plugin-terser";
import typescript from "rollup-plugin-typescript2"; import typescript from "rollup-plugin-typescript2";
import resolve from "rollup-plugin-node-resolve"; import resolve from "@rollup/plugin-node-resolve";
import license from "rollup-plugin-license"; import license from "rollup-plugin-license";
const base = { const base = {
@ -43,7 +43,7 @@ export default [
output: Object.assign({}, base.output[0], { file: "dist/skinview3d.min.js" }), output: Object.assign({}, base.output[0], { file: "dist/skinview3d.min.js" }),
plugins: (() => { plugins: (() => {
const plugin = base.plugins.slice(); const plugin = base.plugins.slice();
plugin.splice(1, 0, uglify()); plugin.splice(1, 0, terser());
return plugin; return plugin;
})() })()
}) })

View File

@ -159,7 +159,8 @@ export class SkinViewer {
} }
get width() { get width() {
return this.renderer.getSize().width; const target = new THREE.Vector2();
return this.renderer.getSize(target).width;
} }
set width(newWidth) { set width(newWidth) {
@ -167,7 +168,8 @@ export class SkinViewer {
} }
get height() { get height() {
return this.renderer.getSize().height; const target = new THREE.Vector2();
return this.renderer.getSize(target).height;
} }
set height(newHeight) { set height(newHeight) {

View File

@ -38,7 +38,7 @@ describe("process skin texture", () => {
await Promise.resolve(); await Promise.resolve();
const canvas = document.createElement("canvas"); const canvas = document.createElement("canvas");
loadSkinToCanvas(canvas, image); loadSkinToCanvas(canvas, image);
const data = canvas.getContext("2d").getImageData(0, 0, 64, 32).data; const data = canvas.getContext("2d")!.getImageData(0, 0, 64, 32).data;
const checkArea = (x0, y0, w, h) => { const checkArea = (x0, y0, w, h) => {
for (let x = x0; x < x0 + w; x++) { for (let x = x0; x < x0 + w; x++) {
for (let y = y0; y < y0 + h; y++) { for (let y = y0; y < y0 + h; y++) {

View File

@ -1,17 +1,14 @@
{ {
"compilerOptions": { "compilerOptions": {
"module": "es2015", "module": "es2015",
"moduleResolution": "node",
"target": "es5", "target": "es5",
"declaration": true, "declaration": true,
"strict": true, "strict": true,
"noImplicitAny": false, "noImplicitAny": false,
"strictFunctionTypes": false, "strictFunctionTypes": false
"lib": [
"es2015",
"dom"
]
}, },
"include": [ "include": [
"src/**.ts" "src"
] ]
} }