diff --git a/.gitignore b/.gitignore index fe3e494..db59637 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ oldFiles stash public-stash notes.txt -stats.html \ No newline at end of file +stats.html +.history \ No newline at end of file diff --git a/package.json b/package.json index 38e7b54..2c7a753 100644 --- a/package.json +++ b/package.json @@ -1,69 +1,69 @@ { - "name": "@3d-dice/dice-box", - "author": { - "name": "Frank Ali" - }, - "description": "A 3D environment for rolling game dice", - "version": "1.0.5", - "keywords": [ - "3D", - "dice", - "roll", - "roller", - "javascript", - "rpg", - "dnd", - "d&d", - "tabletop" - ], - "license": "MIT", - "homepage": "https://fantasticdice.games/", - "repository": { - "type": "git", - "url": "https://github.com/3d-dice/dice-box" - }, - "bugs": { - "url": "https://github.com/3d-dice/dice-box/issues" - }, - "files": [ - "dist", - "copyAssets.js" - ], - "main": "./dist/dice-box.es.js", - "dev-files": [ - "src" - ], - "dev-main": "./src/index", - "scripts": { - "dev": "vite", - "build": "vite build", - "serve": "vite preview", - "postinstall": "node copyAssets.js" - }, - "dependencies": { - "@babylonjs/core": "^5.10.0", - "@babylonjs/loaders": "^5.10.0", - "@babylonjs/materials": "^5.10.0", - "copy-dir": "^1.3.0", - "node-abort-controller": "^3.0.1" - }, - "devDependencies": { - "rollup-plugin-copy": "^3.4.0", - "rollup-plugin-visualizer": "^5.6.0", - "vite": "^2.9.10" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all", - "not ie all" - ], - "development": [ - ">0.2%", - "not dead", - "not op_mini all", - "not ie all" - ] - } + "name": "@3d-dice/dice-box", + "author": { + "name": "Frank Ali" + }, + "description": "A 3D environment for rolling game dice", + "version": "1.0.6", + "keywords": [ + "3D", + "dice", + "roll", + "roller", + "javascript", + "rpg", + "dnd", + "d&d", + "tabletop" + ], + "license": "MIT", + "homepage": "https://fantasticdice.games/", + "repository": { + "type": "git", + "url": "https://github.com/3d-dice/dice-box" + }, + "bugs": { + "url": "https://github.com/3d-dice/dice-box/issues" + }, + "files": [ + "dist", + "copyAssets.js" + ], + "main": "./dist/dice-box.es.js", + "dev-files": [ + "src" + ], + "dev-main": "./src/index", + "scripts": { + "dev": "vite", + "build": "vite build", + "serve": "vite preview", + "postinstall": "node copyAssets.js" + }, + "dependencies": { + "@babylonjs/core": "^5.10.0", + "@babylonjs/loaders": "^5.10.0", + "@babylonjs/materials": "^5.10.0", + "copy-dir": "^1.3.0", + "node-abort-controller": "^3.0.1" + }, + "devDependencies": { + "rollup-plugin-copy": "^3.4.0", + "rollup-plugin-visualizer": "^5.6.0", + "vite": "^2.9.10" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all", + "not ie all" + ], + "development": [ + ">0.2%", + "not dead", + "not op_mini all", + "not ie all" + ] + } } diff --git a/src/components/Dice.js b/src/components/Dice.js index ed4e1c0..2933c0a 100644 --- a/src/components/Dice.js +++ b/src/components/Dice.js @@ -186,7 +186,7 @@ class Dice { } static ray = new Ray(Vector3.Zero(), Vector3.Zero(), 1) - static vector3 = new Vector3.Zero() + static vector3 = Vector3.Zero() static setVector3(x,y,z) { return Dice.vector3.set(x,y,z) diff --git a/vite.config.js b/vite.config.js index 1bd8a54..63f82b7 100644 --- a/vite.config.js +++ b/vite.config.js @@ -13,15 +13,18 @@ module.exports = defineConfig({ }, assetsDir: 'assets/dice-box', rollupOptions: { - preserveEntrySignatures: "allow-extension", + preserveEntrySignatures: 'allow-extension', input: { main: path.resolve(__dirname, 'src/index.js') }, output: [{ - format: "es", + format: 'es', manualChunks: { // babylon: ['@babylonjs/core','@babylonjs/loaders','@babylonjs/materials'] }, + entryFileNames: 'assets/dice-box.es.js', + chunkFileNames: 'assets/[name].js', + assetFileNames: 'assets/[name].[ext]', sourcemap: false, }], plugins: [ @@ -37,7 +40,7 @@ module.exports = defineConfig({ dest: path.resolve(__dirname, 'dist/assets/dice-box') } ], - hook: "writeBundle" + hook: 'writeBundle' }), // visualizer({ // open: true,