1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00
This commit is contained in:
Kevin Levron 2021-10-30 21:46:26 +02:00
parent 78ec1b9570
commit b377d0f1da
3 changed files with 28 additions and 26 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "troisjs", "name": "troisjs",
"version": "0.3.2", "version": "0.3.3",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"types": "tsc", "types": "tsc",
@ -8,32 +8,31 @@
"rollup": "tsc && rollup -c" "rollup": "tsc && rollup -c"
}, },
"devDependencies": { "devDependencies": {
"@rollup/plugin-replace": "^2.3.3", "@rollup/plugin-replace": "^3.0.0",
"@types/three": "^0.127.1", "@types/three": "^0.133.1",
"@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/eslint-plugin": "^5.2.0",
"@typescript-eslint/parser": "^4.22.0", "@typescript-eslint/parser": "^5.2.0",
"@vitejs/plugin-vue": "^1.2.1", "@vitejs/plugin-vue": "^1.2.1",
"@vue/compiler-sfc": "^3.0.11", "@vue/compiler-sfc": "^3.2.20",
"@vue/eslint-config-standard": "^5.1.2", "@vue/eslint-config-standard": "^6.1.0",
"@vue/eslint-config-typescript": "^7.0.0", "@vue/eslint-config-typescript": "^9.0.0",
"cannon": "^0.6.2", "cannon": "^0.6.2",
"esbuild": "^0.11.15", "esbuild": "^0.13.11",
"eslint": "^7.7.0", "eslint": "^8.1.0",
"eslint-plugin-import": "^2.22.0", "eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1", "eslint-plugin-promise": "^5.1.1",
"eslint-plugin-standard": "^4.0.1", "eslint-plugin-vue": "^8.0.3",
"eslint-plugin-vue": "^7.9.0",
"gsap": "^3.5.1", "gsap": "^3.5.1",
"rollup-plugin-dts": "^3.0.1", "rollup-plugin-dts": "^4.0.0",
"rollup-plugin-esbuild": "^4.1.0", "rollup-plugin-esbuild": "^4.1.0",
"stats.js": "0.17.0", "stats.js": "0.17.0",
"three": "^0.127", "three": "^0.134.0",
"typescript": "^4.1.5", "typescript": "^4.1.5",
"vite": "^2.1.5", "vite": "^2.6.13",
"vue": "^3.0.11", "vue": "^3.2.20",
"vue-eslint-parser": "^7.6.0", "vue-eslint-parser": "^8.0.1",
"vue-tsc": "^0.0.25" "vue-tsc": "^0.28.10"
}, },
"main": "build/trois.js", "main": "build/trois.js",
"module": "build/trois.module.js", "module": "build/trois.module.js",

View File

@ -1,7 +1,7 @@
// import vue from 'rollup-plugin-vue' // import vue from 'rollup-plugin-vue'
import esbuild from 'rollup-plugin-esbuild' import esbuild from 'rollup-plugin-esbuild'
import replace from '@rollup/plugin-replace' import replace from '@rollup/plugin-replace'
import dts from "rollup-plugin-dts" import dts from 'rollup-plugin-dts'
const input = 'src/export.ts' const input = 'src/export.ts'
@ -9,10 +9,12 @@ const external = [
'three', 'three',
'three/examples/jsm/controls/OrbitControls.js', 'three/examples/jsm/controls/OrbitControls.js',
'three/examples/jsm/deprecated/Geometry.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/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/FBXLoader.js',
'three/examples/jsm/loaders/GLTFLoader.js',
'three/examples/jsm/postprocessing/BokehPass.js', 'three/examples/jsm/postprocessing/BokehPass.js',
'three/examples/jsm/postprocessing/EffectComposer.js', 'three/examples/jsm/postprocessing/EffectComposer.js',
'three/examples/jsm/postprocessing/FilmPass.js', 'three/examples/jsm/postprocessing/FilmPass.js',
@ -30,9 +32,9 @@ const external = [
] ]
const cdnReplaces = { const cdnReplaces = {
'from \'vue\'': 'from \'https://unpkg.com/vue@3.0.11/dist/vue.esm-browser.prod.js\'', 'from \'vue\'': 'from \'https://unpkg.com/vue@3.2.20/dist/vue.esm-browser.prod.js\'',
'from \'three\'': 'from \'https://unpkg.com/three@0.127.0/build/three.module.js\'', 'from \'three\'': 'from \'https://cdn.skypack.dev/three@0.134.0/build/three.module.js\'',
'from \'three/examples': 'from \'https://unpkg.com/three@0.127.0/examples', 'from \'three/examples': 'from \'https://cdn.skypack.dev/three@0.134.0/examples',
delimiters: ['', ''], delimiters: ['', ''],
} }

View File

@ -1,5 +1,6 @@
import { defineComponent, PropType, watch } from 'vue' 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' import Mesh, { MeshSetupInterface } from './Mesh'
interface TextSetupInterface extends MeshSetupInterface { interface TextSetupInterface extends MeshSetupInterface {