three-video-projection 0.0.8 → 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 +7 -13
- package/dist/index.mjs +7 -8
- package/package.json +2 -2
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:
|
|
57
|
-
elevationDeg:
|
|
58
|
-
rollDeg:
|
|
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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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:
|
|
21
|
-
elevationDeg:
|
|
22
|
-
rollDeg:
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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.
|
|
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
|
|
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",
|