From b377d0f1daed9840319e0dc6bad241fa71305cda Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Sat, 30 Oct 2021 21:46:26 +0200 Subject: [PATCH] 0.3.3 --- package.json | 37 ++++++++++++++++++------------------- rollup.config.js | 14 ++++++++------ src/meshes/Text.ts | 3 ++- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 8d44bdf..22d86d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "troisjs", - "version": "0.3.2", + "version": "0.3.3", "scripts": { "dev": "vite", "types": "tsc", @@ -8,32 +8,31 @@ "rollup": "tsc && rollup -c" }, "devDependencies": { - "@rollup/plugin-replace": "^2.3.3", - "@types/three": "^0.127.1", - "@typescript-eslint/eslint-plugin": "^4.22.0", - "@typescript-eslint/parser": "^4.22.0", + "@rollup/plugin-replace": "^3.0.0", + "@types/three": "^0.133.1", + "@typescript-eslint/eslint-plugin": "^5.2.0", + "@typescript-eslint/parser": "^5.2.0", "@vitejs/plugin-vue": "^1.2.1", - "@vue/compiler-sfc": "^3.0.11", - "@vue/eslint-config-standard": "^5.1.2", - "@vue/eslint-config-typescript": "^7.0.0", + "@vue/compiler-sfc": "^3.2.20", + "@vue/eslint-config-standard": "^6.1.0", + "@vue/eslint-config-typescript": "^9.0.0", "cannon": "^0.6.2", - "esbuild": "^0.11.15", - "eslint": "^7.7.0", + "esbuild": "^0.13.11", + "eslint": "^8.1.0", "eslint-plugin-import": "^2.22.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.1", - "eslint-plugin-vue": "^7.9.0", + "eslint-plugin-promise": "^5.1.1", + "eslint-plugin-vue": "^8.0.3", "gsap": "^3.5.1", - "rollup-plugin-dts": "^3.0.1", + "rollup-plugin-dts": "^4.0.0", "rollup-plugin-esbuild": "^4.1.0", "stats.js": "0.17.0", - "three": "^0.127", + "three": "^0.134.0", "typescript": "^4.1.5", - "vite": "^2.1.5", - "vue": "^3.0.11", - "vue-eslint-parser": "^7.6.0", - "vue-tsc": "^0.0.25" + "vite": "^2.6.13", + "vue": "^3.2.20", + "vue-eslint-parser": "^8.0.1", + "vue-tsc": "^0.28.10" }, "main": "build/trois.js", "module": "build/trois.module.js", diff --git a/rollup.config.js b/rollup.config.js index 36899c1..ee7595d 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,7 +1,7 @@ // import vue from 'rollup-plugin-vue' import esbuild from 'rollup-plugin-esbuild' import replace from '@rollup/plugin-replace' -import dts from "rollup-plugin-dts" +import dts from 'rollup-plugin-dts' const input = 'src/export.ts' @@ -9,10 +9,12 @@ const external = [ 'three', 'three/examples/jsm/controls/OrbitControls.js', 'three/examples/jsm/deprecated/Geometry.js', - 'three/examples/jsm/lights/RectAreaLightUniformsLib.js', + 'three/examples/jsm/geometries/TextGeometry.js', 'three/examples/jsm/helpers/RectAreaLightHelper.js', - 'three/examples/jsm/loaders/GLTFLoader.js', + 'three/examples/jsm/lights/RectAreaLightUniformsLib.js', + 'three/examples/jsm/loaders/FontLoader.js', 'three/examples/jsm/loaders/FBXLoader.js', + 'three/examples/jsm/loaders/GLTFLoader.js', 'three/examples/jsm/postprocessing/BokehPass.js', 'three/examples/jsm/postprocessing/EffectComposer.js', 'three/examples/jsm/postprocessing/FilmPass.js', @@ -30,9 +32,9 @@ const external = [ ] const cdnReplaces = { - 'from \'vue\'': 'from \'https://unpkg.com/vue@3.0.11/dist/vue.esm-browser.prod.js\'', - 'from \'three\'': 'from \'https://unpkg.com/three@0.127.0/build/three.module.js\'', - 'from \'three/examples': 'from \'https://unpkg.com/three@0.127.0/examples', + 'from \'vue\'': 'from \'https://unpkg.com/vue@3.2.20/dist/vue.esm-browser.prod.js\'', + 'from \'three\'': 'from \'https://cdn.skypack.dev/three@0.134.0/build/three.module.js\'', + 'from \'three/examples': 'from \'https://cdn.skypack.dev/three@0.134.0/examples', delimiters: ['', ''], } diff --git a/src/meshes/Text.ts b/src/meshes/Text.ts index 60dedc4..9125e48 100644 --- a/src/meshes/Text.ts +++ b/src/meshes/Text.ts @@ -1,5 +1,6 @@ import { defineComponent, PropType, watch } from 'vue' -import { Font, FontLoader, TextGeometry } from 'three' +import { TextGeometry } from 'three/examples/jsm/geometries/TextGeometry.js' +import { Font, FontLoader } from 'three/examples/jsm/loaders/FontLoader.js' import Mesh, { MeshSetupInterface } from './Mesh' interface TextSetupInterface extends MeshSetupInterface {