zincjs 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "zincjs",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "ZincJS (Web-based-Zinc-Visualisation)",
5
+ "type": "module",
5
6
  "main": "build/zinc.js",
6
7
  "directories": {
7
8
  "doc": "docs"
@@ -44,18 +45,20 @@
44
45
  "url": "https://github.com/alan-wu/ZincJS/issues"
45
46
  },
46
47
  "homepage": "http://alan-wu.github.io/ZincJS/",
48
+ "engines": {
49
+ "node": ">=20"
50
+ },
47
51
  "devDependencies": {
48
- "@vitest/coverage-v8": "^1.6.1",
52
+ "@vitest/coverage-v8": "^4.1.11",
49
53
  "auto-changelog": "^2.4.0",
50
54
  "chai": "^4.1.0",
51
55
  "gl": "^8.1.6",
52
56
  "happy-dom": "^20.10.6",
53
57
  "jsdoc": "^4.0.2",
54
58
  "msw": "^2.14.6",
55
- "vite": "^5.0.10",
59
+ "vite": "^8.2.1",
56
60
  "vite-plugin-node-polyfills": "^0.28.0",
57
- "vitest": "^1.6.1",
58
- "webpack-node-externals": "^3.0.0"
61
+ "vitest": "^4.1.11"
59
62
  },
60
63
  "dependencies": {
61
64
  "css-element-queries": "^1.2.2",
@@ -181,7 +181,7 @@ ZincObject.prototype.setMesh = function(mesh, localTimeEnabled, localMorphColour
181
181
  if (this.animationClip && (this.animationClip[0] != undefined)) {
182
182
  this.clipAction = this.mixer.clipAction(this.animationClip[0]).setDuration(
183
183
  this.duration);
184
- this.clipAction.loop = THREE.LoopOnce;
184
+ this.clipAction.loop = THREE.LoopRepeat;
185
185
  this.clipAction.clampWhenFinished = true;
186
186
  this.clipAction.play();
187
187
  }
package/vite.config.js CHANGED
@@ -7,7 +7,7 @@ export default defineConfig({
7
7
  outDir: 'build',
8
8
  minify: true,
9
9
  lib: {
10
- entry: path.resolve(__dirname, 'src/zinc.js'),
10
+ entry: path.resolve(import.meta.dirname, 'src/zinc.js'),
11
11
  name: 'Zinc',
12
12
  fileName: () => 'zinc.js',
13
13
  formats: ['es', 'umd'],
@@ -25,7 +25,8 @@ export default defineConfig({
25
25
  'css-element-queries': 'cssElememtQueries',
26
26
  three: 'THREE',
27
27
  'three-spritetext': 'SpriteText',
28
- 'three/examples/jsm/loaders/GLTFLoader': 'GLTFLoader'
28
+ 'three/examples/jsm/loaders/GLTFLoader': 'GLTFLoader',
29
+ 'fflate': 'fflate'
29
30
  }
30
31
  }
31
32
  },