three-video-projection 0.0.7 → 0.0.9

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/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -37,7 +36,6 @@ module.exports = __toCommonJS(index_exports);
37
36
  // src/three-video-projection.ts
38
37
  var THREE = __toESM(require("three"));
39
38
  async function createVideoProjector(opts) {
40
- var _a, _b, _c, _d, _e, _f, _g;
41
39
  const {
42
40
  scene,
43
41
  renderer,
@@ -53,17 +51,17 @@ async function createVideoProjector(opts) {
53
51
  isShowHelper = true
54
52
  } = opts;
55
53
  let orientParams = {
56
- azimuthDeg: (_a = orientationParams.azimuthDeg) != null ? _a : 0,
57
- elevationDeg: (_b = orientationParams.elevationDeg) != null ? _b : 0,
58
- rollDeg: (_c = orientationParams.rollDeg) != null ? _c : 0
54
+ azimuthDeg: orientationParams.azimuthDeg ?? 0,
55
+ elevationDeg: orientationParams.elevationDeg ?? 0,
56
+ rollDeg: orientationParams.rollDeg ?? 0
59
57
  };
60
58
  let projCam;
61
59
  let camHelper = null;
62
60
  projCam = new THREE.PerspectiveCamera(
63
- (_d = projCamParams.fov) != null ? _d : 30,
64
- (_e = projCamParams.aspect) != null ? _e : 1,
65
- (_f = projCamParams.near) != null ? _f : 0.5,
66
- (_g = projCamParams.far) != null ? _g : 50
61
+ projCamParams.fov ?? 30,
62
+ projCamParams.aspect ?? 1,
63
+ projCamParams.near ?? 0.5,
64
+ projCamParams.far ?? 50
67
65
  );
68
66
  projCam.position.set(
69
67
  projCamPosition[0],
@@ -300,7 +298,3 @@ async function createVideoProjector(opts) {
300
298
  orientationParams: orientParams
301
299
  };
302
300
  }
303
- // Annotate the CommonJS export names for ESM import in node:
304
- 0 && (module.exports = {
305
- createVideoProjector
306
- });
package/dist/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  // src/three-video-projection.ts
2
2
  import * as THREE from "three";
3
3
  async function createVideoProjector(opts) {
4
- var _a, _b, _c, _d, _e, _f, _g;
5
4
  const {
6
5
  scene,
7
6
  renderer,
@@ -17,17 +16,17 @@ async function createVideoProjector(opts) {
17
16
  isShowHelper = true
18
17
  } = opts;
19
18
  let orientParams = {
20
- azimuthDeg: (_a = orientationParams.azimuthDeg) != null ? _a : 0,
21
- elevationDeg: (_b = orientationParams.elevationDeg) != null ? _b : 0,
22
- rollDeg: (_c = orientationParams.rollDeg) != null ? _c : 0
19
+ azimuthDeg: orientationParams.azimuthDeg ?? 0,
20
+ elevationDeg: orientationParams.elevationDeg ?? 0,
21
+ rollDeg: orientationParams.rollDeg ?? 0
23
22
  };
24
23
  let projCam;
25
24
  let camHelper = null;
26
25
  projCam = new THREE.PerspectiveCamera(
27
- (_d = projCamParams.fov) != null ? _d : 30,
28
- (_e = projCamParams.aspect) != null ? _e : 1,
29
- (_f = projCamParams.near) != null ? _f : 0.5,
30
- (_g = projCamParams.far) != null ? _g : 50
26
+ projCamParams.fov ?? 30,
27
+ projCamParams.aspect ?? 1,
28
+ projCamParams.near ?? 0.5,
29
+ projCamParams.far ?? 50
31
30
  );
32
31
  projCam.position.set(
33
32
  projCamPosition[0],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-video-projection",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "Projector utility for projecting video textures onto meshes (three.js)",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "license": "MIT",
25
25
  "scripts": {
26
26
  "dev": "vite",
27
- "build": "tsup src/index.ts --format cjs,esm --dts",
27
+ "build": "tsup",
28
28
  "prepare": "npm run build",
29
29
  "build:cinema": "npm --prefix ./examples/cinema install && npm --prefix ./examples/cinema run build",
30
30
  "build:monitor": "npm --prefix ./examples/monitor install && npm --prefix ./examples/monitor run build",
@@ -38,18 +38,17 @@
38
38
  "@types/node": "^25.0.10",
39
39
  "@types/three": "^0.182.0",
40
40
  "@vitejs/plugin-vue": "^6.0.3",
41
- "hls.js": "^1.6.15",
42
- "stats.js": "^0.17.0",
43
41
  "tsup": "^8.5.1",
44
42
  "typescript": "^5.0.0",
45
43
  "vite": "^7.3.1",
46
44
  "vue": "^3.5.27",
47
- "three-player-controller": "^0.3.8"
45
+ "hls.js": "^1.6.15",
46
+ "stats.js": "^0.17.0",
47
+ "three-player-controller": "^0.3.1"
48
48
  },
49
49
  "repository": {
50
50
  "type": "git",
51
51
  "url": "https://github.com/hh-hang/three-video-projection"
52
52
  },
53
- "homepage": "https://hh-hang.github.io/three-video-projection/",
54
- "dependencies": {}
53
+ "homepage": "https://hh-hang.github.io/three-video-projection/"
55
54
  }