@needle-tools/engine 4.8.3 → 4.8.4-next.4b82f63
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/CHANGELOG.md +10 -0
- package/README.md +5 -0
- package/dist/{gltf-progressive-Do1XJNMG.js → gltf-progressive-B3JW4cAu.js} +247 -248
- package/dist/gltf-progressive-DorC035H.min.js +8 -0
- package/dist/{gltf-progressive-CHV7_60B.umd.cjs → gltf-progressive-PB_58h1b.umd.cjs} +6 -6
- package/dist/{needle-engine.bundle-Drb5H9t2.min.js → needle-engine.bundle-BVuM3c3B.min.js} +146 -137
- package/dist/{needle-engine.bundle-CiIS3tNq.js → needle-engine.bundle-DBzjaUJC.js} +6060 -6075
- package/dist/{needle-engine.bundle-d8rUkpZi.umd.cjs → needle-engine.bundle-DONP3IRg.umd.cjs} +141 -132
- package/dist/needle-engine.js +3 -3
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/dist/{vendor-CGONwIc0.js → vendor-B_ytQUuR.js} +6 -6
- package/dist/{vendor-BlSxe9JJ.min.js → vendor-C31T0mYm.min.js} +2 -2
- package/dist/{vendor-Cty8Dnri.umd.cjs → vendor-D51IT5ns.umd.cjs} +9 -9
- package/lib/engine/debug/debug_console.js +2 -32
- package/lib/engine/debug/debug_console.js.map +1 -1
- package/lib/engine/engine_context.d.ts +1 -1
- package/lib/engine/engine_context.js +5 -12
- package/lib/engine/engine_context.js.map +1 -1
- package/lib/engine/engine_networking_streams.js +13 -2
- package/lib/engine/engine_networking_streams.js.map +1 -1
- package/lib/engine/webcomponents/buttons.js +6 -2
- package/lib/engine/webcomponents/buttons.js.map +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.js +10 -0
- package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
- package/lib/engine/webcomponents/needle-engine.loading.js +1 -1
- package/lib/engine/webcomponents/needle-engine.loading.js.map +1 -1
- package/lib/engine-components/DragControls.js +0 -1
- package/lib/engine-components/DragControls.js.map +1 -1
- package/lib/engine-components/OrbitControls.d.ts +1 -0
- package/lib/engine-components/OrbitControls.js +6 -0
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/lib/engine-components/TransformGizmo.js +10 -2
- package/lib/engine-components/TransformGizmo.js.map +1 -1
- package/package.json +4 -4
- package/plugins/vite/peer.js +60 -2
- package/plugins/vite/poster-client.js +35 -51
- package/plugins/vite/poster.js +2 -3
- package/src/engine/debug/debug_console.ts +2 -32
- package/src/engine/engine_context.ts +7 -12
- package/src/engine/engine_networking_streams.ts +17 -8
- package/src/engine/webcomponents/buttons.ts +6 -2
- package/src/engine/webcomponents/needle menu/needle-menu.ts +10 -0
- package/src/engine/webcomponents/needle-engine.loading.ts +1 -1
- package/src/engine-components/DragControls.ts +0 -1
- package/src/engine-components/OrbitControls.ts +5 -0
- package/src/engine-components/TransformGizmo.ts +11 -2
- package/dist/gltf-progressive-B--ZfCTJ.min.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransformGizmo.js","sourceRoot":"","sources":["../../src/engine-components/TransformGizmo.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAqC,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAErF,OAAO,KAAK,MAAM,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,OAAO,cAAe,SAAQ,SAAS;IAEzC;;OAEG;IAEI,OAAO,GAAY,KAAK,CAAC;IAEhC;;;OAGG;IAEI,eAAe,GAAW,CAAC,CA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K,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAC3C,MAAM;YAEV,KAAK,EAAE,EAAE,WAAW;gBAChB,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAC/C,MAAM;SACb;IACL,CAAC,CAAA;IAED;;;;OAIG;IACK,mBAAmB,GAAG,CAAC,KAAK,EAAE,EAAE;QACpC,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO;QAC1B,QAAQ,KAAK,CAAC,OAAO,EAAE;YACnB,KAAK,EAAE,EAAE,QAAQ;gBACb,IAAI,CAAC,eAAe,EAAE,CAAC;gBACvB,MAAM;SAEb;IAEL,CAAC,CAAA;CACJ;AA/MG;IADC,YAAY,EAAE;+CACiB;AAOhC;IADC,YAAY,EAAE;uDACoB;AAOnC;IADC,YAAY,EAAE;yDACuB;AAOtC;IADC,YAAY,EAAE;iDACgB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/engine",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.4-next.4b82f63",
|
|
4
4
|
"description": "Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.",
|
|
5
5
|
"main": "dist/needle-engine.min.js",
|
|
6
6
|
"exports": {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
],
|
|
94
94
|
"dependencies": {
|
|
95
95
|
"@dimforge/rapier3d-compat": "^0.14.0",
|
|
96
|
-
"@needle-tools/gltf-progressive": "3.3.
|
|
96
|
+
"@needle-tools/gltf-progressive": "^3.3.1",
|
|
97
97
|
"@webxr-input-profiles/motion-controllers": "^1.0.0",
|
|
98
98
|
"flatbuffers": "2.0.4",
|
|
99
99
|
"md5": "^2.3.0",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"simplex-noise": "^4.0.1",
|
|
104
104
|
"stats.js": "^0.17.0",
|
|
105
105
|
"three": "npm:@needle-tools/three@0.169.7",
|
|
106
|
-
"three-mesh-bvh": "0.9.1",
|
|
106
|
+
"three-mesh-bvh": "^0.9.1",
|
|
107
107
|
"three-mesh-ui": "npm:@needle-tools/three-mesh-ui@^7.1.5-alpha.5",
|
|
108
108
|
"three.quarks": "0.15.6",
|
|
109
109
|
"uuid": "^9.0.0",
|
|
@@ -167,4 +167,4 @@
|
|
|
167
167
|
"module": "lib/needle-engine.js",
|
|
168
168
|
"typings": "lib/needle-engine.d.ts",
|
|
169
169
|
"types": "lib/needle-engine.d.ts"
|
|
170
|
-
}
|
|
170
|
+
}
|
package/plugins/vite/peer.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
1
|
const peerjsString = `/* needle: fix for peerjs */ window.global = window; var parcelRequire;`
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* @param {import('../types').userSettings} userSettings
|
|
5
|
+
* @returns {import("vite").Plugin | undefined}
|
|
6
6
|
*/
|
|
7
7
|
export const needlePeerjs = (command, config, userSettings) => {
|
|
8
8
|
|
|
@@ -10,6 +10,7 @@ export const needlePeerjs = (command, config, userSettings) => {
|
|
|
10
10
|
|
|
11
11
|
return {
|
|
12
12
|
name: 'needle:peerjs',
|
|
13
|
+
enforce: "pre",
|
|
13
14
|
transformIndexHtml: {
|
|
14
15
|
order: 'pre',
|
|
15
16
|
handler(html, _ctx) {
|
|
@@ -23,7 +24,64 @@ export const needlePeerjs = (command, config, userSettings) => {
|
|
|
23
24
|
},
|
|
24
25
|
]
|
|
25
26
|
}
|
|
26
|
-
}
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
transform: (code, id) => {
|
|
30
|
+
return patchWebRTCAdapterForGemini(code, id);
|
|
27
31
|
}
|
|
28
32
|
}
|
|
29
33
|
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @param {string} code
|
|
40
|
+
* @param {string} id
|
|
41
|
+
* @returns {string | undefined}
|
|
42
|
+
*/
|
|
43
|
+
function patchWebRTCAdapterForGemini(code, id) {
|
|
44
|
+
// Match navigator.mediaDevices.getUserMedia assignments
|
|
45
|
+
const assignmentRegex = /(navigator\d{0,1})\.mediaDevices\.getUserMedia\s*=\s*function/gm;
|
|
46
|
+
|
|
47
|
+
let didTransform = false;
|
|
48
|
+
let transformedCode = code;
|
|
49
|
+
let match;
|
|
50
|
+
|
|
51
|
+
while ((match = assignmentRegex.exec(code)) !== null) {
|
|
52
|
+
const navigatorRef = match[1];
|
|
53
|
+
const matchStart = match.index;
|
|
54
|
+
|
|
55
|
+
// Find the end of the function assignment
|
|
56
|
+
let braceCount = 0;
|
|
57
|
+
let inFunction = false;
|
|
58
|
+
let endIndex = matchStart;
|
|
59
|
+
|
|
60
|
+
for (let i = matchStart; i < code.length; i++) {
|
|
61
|
+
const char = code[i];
|
|
62
|
+
if (char === '{') {
|
|
63
|
+
braceCount++;
|
|
64
|
+
inFunction = true;
|
|
65
|
+
} else if (char === '}') {
|
|
66
|
+
braceCount--;
|
|
67
|
+
if (inFunction && braceCount === 0) {
|
|
68
|
+
endIndex = i + 1;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const originalAssignment = code.substring(matchStart, endIndex);
|
|
75
|
+
const wrappedAssignment = `if (Object.getOwnPropertyDescriptor(${navigatorRef}.mediaDevices, "getUserMedia")?.writable) {\n ${originalAssignment}\n}`;
|
|
76
|
+
didTransform = true;
|
|
77
|
+
transformedCode = transformedCode.replace(originalAssignment, wrappedAssignment);
|
|
78
|
+
// console.log("-------------------------------\nTRANSFORMED\n", id, "\nOriginal:", originalAssignment, "\nWrapped:", wrappedAssignment, "\n\n");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if(!didTransform) return undefined;
|
|
82
|
+
|
|
83
|
+
console.log("[needle:peerjs] Fixed WebRTC assignment");
|
|
84
|
+
|
|
85
|
+
return transformedCode;
|
|
86
|
+
|
|
87
|
+
}
|
|
@@ -1,40 +1,46 @@
|
|
|
1
1
|
|
|
2
2
|
async function generatePoster() {
|
|
3
|
-
const { screenshot2 } = await import("@needle-tools/engine");
|
|
4
3
|
|
|
5
4
|
try {
|
|
6
|
-
const
|
|
7
|
-
if (!needleEngine) return null;
|
|
5
|
+
const { screenshot2, onStart } = await import("@needle-tools/engine");
|
|
8
6
|
|
|
9
7
|
// Keep in sync with og:image:width meta tags
|
|
10
8
|
// https://developers.facebook.com/docs/sharing/best-practices/
|
|
11
9
|
const width = 1080;
|
|
12
10
|
const height = 1080;
|
|
13
|
-
const context = await needleEngine.getContext();
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
12
|
+
return new Promise(res => {
|
|
13
|
+
onStart(async context => {
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
if (context.lodsManager.manager) {
|
|
16
|
+
await context.lodsManager.manager.awaitLoading({ frames: 5, maxPromisesPerObject: 2, waitForFirstCapture: true });
|
|
17
|
+
}
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
const mimeType = "image/webp";
|
|
20
|
+
|
|
21
|
+
// We're reading back as a blob here because that's async, and doesn't seem
|
|
22
|
+
// to stress the GPU so much on memory-constrained devices.
|
|
23
|
+
const blob = await screenshot2({ context, width, height, mimeType, type: "blob" });
|
|
24
|
+
|
|
25
|
+
// We can only send a DataURL, so we need to convert it back here.
|
|
26
|
+
const dataUrl = await new Promise((resolve, reject) => {
|
|
27
|
+
const reader = new FileReader();
|
|
28
|
+
reader.onload = function () {
|
|
29
|
+
resolve(reader.result);
|
|
30
|
+
};
|
|
31
|
+
reader.onloadend = function () {
|
|
32
|
+
resolve(null);
|
|
33
|
+
};
|
|
34
|
+
reader.readAsDataURL(blob);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
res(dataUrl);
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
}, { once: true });
|
|
42
|
+
})
|
|
36
43
|
|
|
37
|
-
return dataUrl;
|
|
38
44
|
}
|
|
39
45
|
catch (e) {
|
|
40
46
|
console.error(e);
|
|
@@ -42,33 +48,11 @@ async function generatePoster() {
|
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
|
|
45
|
-
async function sendPoster() {
|
|
46
|
-
const blob = await generatePoster();
|
|
47
|
-
import.meta.hot.send("needle:screenshot", { data: blob });
|
|
48
|
-
}
|
|
49
51
|
|
|
50
|
-
// communicate via vite
|
|
51
52
|
if (import.meta.hot) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
sendPoster();
|
|
58
|
-
}, 200);
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// for debugging: build extra button with dev-only options
|
|
62
|
-
/*
|
|
63
|
-
var button = document.createElement("button");
|
|
64
|
-
button.id = "send-msg";
|
|
65
|
-
button.innerHTML = "Generate Poster";
|
|
66
|
-
button.style.position = "fixed";
|
|
67
|
-
button.style.zIndex = "9999";
|
|
68
|
-
document.body.appendChild(button);
|
|
69
|
-
|
|
70
|
-
document.querySelector("#send-msg").addEventListener("click", async () => {
|
|
71
|
-
sendPoster();
|
|
72
|
-
});
|
|
73
|
-
*/
|
|
53
|
+
async function run() {
|
|
54
|
+
const blob = await generatePoster();
|
|
55
|
+
import.meta.hot.send("needle:screenshot", { data: blob });
|
|
56
|
+
}
|
|
57
|
+
run();
|
|
74
58
|
}
|
package/plugins/vite/poster.js
CHANGED
|
@@ -36,7 +36,7 @@ export const needlePoster = (command, config, userSettings) => {
|
|
|
36
36
|
}
|
|
37
37
|
try {
|
|
38
38
|
const targetPath = "./" + getPosterPath();
|
|
39
|
-
console.debug(`
|
|
39
|
+
console.debug(`[needle:poster] Saving automatic poster to ${targetPath}`);
|
|
40
40
|
// remove data:image/png;base64, from the beginning of the string
|
|
41
41
|
if (targetPath.endsWith(".webp"))
|
|
42
42
|
data.data = data.data.replace(/^data:image\/webp;base64,/, "");
|
|
@@ -47,10 +47,9 @@ export const needlePoster = (command, config, userSettings) => {
|
|
|
47
47
|
fs.mkdirSync(dir, { recursive: true })
|
|
48
48
|
}
|
|
49
49
|
fs.writeFileSync(targetPath, Buffer.from(data.data, "base64"));
|
|
50
|
-
console.debug("Saved poster to file");
|
|
51
50
|
}
|
|
52
51
|
catch (err) {
|
|
53
|
-
console.error("Failed to save poster", err.message);
|
|
52
|
+
console.error("[needle:poster] Failed to save poster", err.message);
|
|
54
53
|
}
|
|
55
54
|
});
|
|
56
55
|
},
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { isDevEnvironment } from "./debug.js";
|
|
4
|
-
import { getErrorCount, makeErrorsVisibleForDevelopment } from "./debug_overlay.js";
|
|
1
|
+
import { getParam } from "../engine_utils.js";
|
|
2
|
+
import { getErrorCount } from "./debug_overlay.js";
|
|
5
3
|
|
|
6
4
|
let consoleInstance: VConsole | null | undefined = undefined;
|
|
7
5
|
let consoleHtmlElement: HTMLElement | null = null;
|
|
@@ -12,38 +10,10 @@ let watchInterval: any = null;
|
|
|
12
10
|
const defaultButtonIcon = "terminal";
|
|
13
11
|
|
|
14
12
|
const showConsole = getParam("console");
|
|
15
|
-
const suppressConsole = getParam("noerrors") || getParam("noconsole") || window.crossOriginIsolated;
|
|
16
13
|
if (showConsole) {
|
|
17
14
|
showDebugConsole();
|
|
18
15
|
}
|
|
19
16
|
|
|
20
|
-
if (!suppressConsole && (showConsole || isLocalNetwork())) {
|
|
21
|
-
if (isLocalNetwork() && !showConsole) {
|
|
22
|
-
const consoleUrl = new URL(window.location.href);
|
|
23
|
-
consoleUrl.searchParams.set("console", "1");
|
|
24
|
-
console.log("🌵 Tip: You can add the \"?console\" query parameter to the url to show the debug console (on mobile it will automatically open in the bottom right corner when your get errors during development. In VR a spatial console will appear.)", "\nOpen this page to get the console: " + consoleUrl.toString());
|
|
25
|
-
}
|
|
26
|
-
const enableConsole = DeviceUtilities.isMobileDevice() || (DeviceUtilities.isQuest() && isDevEnvironment());
|
|
27
|
-
if (enableConsole || showConsole) {
|
|
28
|
-
// we need to invoke this here - otherwise we will miss errors that happen after the console is loaded
|
|
29
|
-
// and calling the method from the root needle-engine.ts import is evaluated later (if we import the method from the toplevel file and then invoke it)
|
|
30
|
-
makeErrorsVisibleForDevelopment();
|
|
31
|
-
beginWatchingLogs();
|
|
32
|
-
createConsole(true);
|
|
33
|
-
if (enableConsole) {
|
|
34
|
-
const engineElement = document.querySelector("needle-engine");
|
|
35
|
-
engineElement?.addEventListener("enter-ar", () => {
|
|
36
|
-
if (showConsole || consoleInstance || getErrorCount() > 0) {
|
|
37
|
-
if (getParam("noerrors")) return;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
engineElement?.addEventListener("exit-ar", () => {
|
|
41
|
-
onResetConsoleElementToDefaultParent();
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
17
|
const $defaultConsoleParent = Symbol("consoleParent");
|
|
48
18
|
|
|
49
19
|
export function showDebugConsole() {
|
|
@@ -980,14 +980,14 @@ export class Context implements IContext {
|
|
|
980
980
|
if (this.isInXR) return true;
|
|
981
981
|
if (!this._isVisible) return false;
|
|
982
982
|
// Make sure not to call getComputedStyle multiple times per frame
|
|
983
|
-
if (this.
|
|
984
|
-
this.
|
|
983
|
+
if (!this._needsVisibleUpdate && this._lastStyleComputedResult !== undefined) return this._lastStyleComputedResult;
|
|
984
|
+
this._needsVisibleUpdate = false;
|
|
985
985
|
const style = getComputedStyle(this.domElement);
|
|
986
986
|
this._lastStyleComputedResult = style.visibility !== "hidden" && style.display !== "none" && style.opacity !== "0";
|
|
987
987
|
return this._lastStyleComputedResult;
|
|
988
988
|
}
|
|
989
|
-
private
|
|
990
|
-
private _lastStyleComputedResult: boolean =
|
|
989
|
+
private _needsVisibleUpdate: boolean = true;
|
|
990
|
+
private _lastStyleComputedResult: boolean | undefined = undefined;
|
|
991
991
|
|
|
992
992
|
private _createId: number = 0;
|
|
993
993
|
private async internalOnCreate(opts?: ContextCreateArgs): Promise<boolean> {
|
|
@@ -1391,6 +1391,7 @@ export class Context implements IContext {
|
|
|
1391
1391
|
this.renderer.info.reset();
|
|
1392
1392
|
}
|
|
1393
1393
|
|
|
1394
|
+
this._needsVisibleUpdate = true;
|
|
1394
1395
|
|
|
1395
1396
|
const sessionStarted = frame !== null && this._xrFrame === null;
|
|
1396
1397
|
this._xrFrame = frame;
|
|
@@ -1420,8 +1421,8 @@ export class Context implements IContext {
|
|
|
1420
1421
|
|
|
1421
1422
|
Context.Current = this;
|
|
1422
1423
|
this.time.update();
|
|
1423
|
-
|
|
1424
|
-
|
|
1424
|
+
|
|
1425
|
+
if (debugframerate) console.log("FPS", (this.time.smoothedFps).toFixed(0));
|
|
1425
1426
|
|
|
1426
1427
|
|
|
1427
1428
|
looputils.processNewScripts(this);
|
|
@@ -1460,7 +1461,6 @@ export class Context implements IContext {
|
|
|
1460
1461
|
}
|
|
1461
1462
|
this.executeCoroutines(FrameEvent.EarlyUpdate);
|
|
1462
1463
|
invokeLifecycleFunctions(this, FrameEvent.EarlyUpdate);
|
|
1463
|
-
if (this.onHandlePaused()) return false;
|
|
1464
1464
|
|
|
1465
1465
|
this._currentFrameEvent = FrameEvent.Update;
|
|
1466
1466
|
|
|
@@ -1474,8 +1474,6 @@ export class Context implements IContext {
|
|
|
1474
1474
|
}
|
|
1475
1475
|
this.executeCoroutines(FrameEvent.Update);
|
|
1476
1476
|
invokeLifecycleFunctions(this, FrameEvent.Update);
|
|
1477
|
-
if (this.onHandlePaused()) return false;
|
|
1478
|
-
|
|
1479
1477
|
this._currentFrameEvent = FrameEvent.LateUpdate;
|
|
1480
1478
|
|
|
1481
1479
|
for (let i = 0; i < this.scripts_lateUpdate.length; i++) {
|
|
@@ -1490,7 +1488,6 @@ export class Context implements IContext {
|
|
|
1490
1488
|
// this.mainLight = null;
|
|
1491
1489
|
this.executeCoroutines(FrameEvent.LateUpdate);
|
|
1492
1490
|
invokeLifecycleFunctions(this, FrameEvent.LateUpdate);
|
|
1493
|
-
if (this.onHandlePaused()) return false;
|
|
1494
1491
|
|
|
1495
1492
|
if (this.physicsSteps === undefined) {
|
|
1496
1493
|
this.physicsSteps = 1;
|
|
@@ -1499,8 +1496,6 @@ export class Context implements IContext {
|
|
|
1499
1496
|
this.internalUpdatePhysics(this.physicsSteps);
|
|
1500
1497
|
}
|
|
1501
1498
|
|
|
1502
|
-
if (this.onHandlePaused()) return false;
|
|
1503
|
-
|
|
1504
1499
|
if (this.isVisibleToUser || this.runInBackground) {
|
|
1505
1500
|
|
|
1506
1501
|
this._currentFrameEvent = FrameEvent.OnBeforeRender;
|
|
@@ -8,7 +8,7 @@ import { showBalloonMessage } from "./debug/index.js";
|
|
|
8
8
|
import { Application } from "./engine_application.js";
|
|
9
9
|
import { Context } from "./engine_context.js";
|
|
10
10
|
import type { IModel } from "./engine_networking_types.js";
|
|
11
|
-
import { type IComponent,isComponent } from "./engine_types.js";
|
|
11
|
+
import { type IComponent, isComponent } from "./engine_types.js";
|
|
12
12
|
import { getParam } from "./engine_utils.js";
|
|
13
13
|
|
|
14
14
|
|
|
@@ -113,8 +113,8 @@ class CallHandle extends EventDispatcher<any> {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
function applySdpTransform(sdp){
|
|
117
|
-
sdp = sdp.replace("a=fmtp:111 minptime=10;useinbandfec=1","a=fmtp:111 ptime=5;useinbandfec=1;stereo=1;maxplaybackrate=48000;maxaveragebitrat=128000;sprop-stereo=1");
|
|
116
|
+
function applySdpTransform(sdp) {
|
|
117
|
+
sdp = sdp.replace("a=fmtp:111 minptime=10;useinbandfec=1", "a=fmtp:111 ptime=5;useinbandfec=1;stereo=1;maxplaybackrate=48000;maxaveragebitrat=128000;sprop-stereo=1");
|
|
118
118
|
return sdp;
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -237,10 +237,19 @@ export class PeerHandle extends EventDispatcher<any> {
|
|
|
237
237
|
this.context = context;
|
|
238
238
|
this.id = id;
|
|
239
239
|
this.setupPeer();
|
|
240
|
-
navigator
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
240
|
+
const isGetUserMediaWriteable = Object.getOwnPropertyDescriptor(navigator, "getUserMedia")?.writable;
|
|
241
|
+
try {
|
|
242
|
+
if (isGetUserMediaWriteable) {
|
|
243
|
+
navigator["getUserMedia"] = (
|
|
244
|
+
navigator["getUserMedia"] || navigator["webkitGetUserMedia"] ||
|
|
245
|
+
navigator["mozGetUserMedia"] || navigator["msGetUserMedia"]
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
else if (debug) console.warn("[PeerJs] getUserMedia is not writable");
|
|
249
|
+
}
|
|
250
|
+
catch (err) {
|
|
251
|
+
if (debug) console.error("[PeerJs] Error setting getUserMedia", err);
|
|
252
|
+
}
|
|
244
253
|
}
|
|
245
254
|
|
|
246
255
|
private _enabled: boolean = false;
|
|
@@ -479,7 +488,7 @@ export class NetworkedStreams extends EventDispatcher<any> {
|
|
|
479
488
|
}
|
|
480
489
|
|
|
481
490
|
if (!context) throw new Error("Failed to create NetworkedStreams because context is undefined");
|
|
482
|
-
else if(!(context instanceof Context)) throw new Error("Failed to create NetworkedStreams because context is not an instance of Context");
|
|
491
|
+
else if (!(context instanceof Context)) throw new Error("Failed to create NetworkedStreams because context is not an instance of Context");
|
|
483
492
|
if (!peer) throw new Error("Failed to create NetworkedStreams because peer is undefined");
|
|
484
493
|
|
|
485
494
|
this.context = context;
|
|
@@ -218,7 +218,11 @@ export class ButtonsFactory {
|
|
|
218
218
|
await generateAndInsertQRCode();
|
|
219
219
|
// TODO: make sure it doesnt overflow the screen
|
|
220
220
|
// we need to add the qrCodeContainer to the body to get the correct size
|
|
221
|
-
|
|
221
|
+
// TODO: we would need to search for the right engine element to insert this into if there are more
|
|
222
|
+
// Insert the QR code overlay inside the needle-engine element
|
|
223
|
+
const engine_element = document.body.querySelector("needle-engine");
|
|
224
|
+
const parent = engine_element || document.body;
|
|
225
|
+
parent.appendChild(qrCodeContainer);
|
|
222
226
|
const containerRect = qrCodeElement.getBoundingClientRect();
|
|
223
227
|
const buttonRect = qrCodeButton.getBoundingClientRect();
|
|
224
228
|
qrCodeContainer.style.left = (buttonRect.left + buttonRect.width * .5 - containerRect.width * .5) + "px";
|
|
@@ -245,7 +249,7 @@ export class ButtonsFactory {
|
|
|
245
249
|
document.fullscreenElement.appendChild(qrCodeContainer);
|
|
246
250
|
}
|
|
247
251
|
else
|
|
248
|
-
|
|
252
|
+
parent.appendChild(qrCodeContainer);
|
|
249
253
|
}
|
|
250
254
|
|
|
251
255
|
/** hides to QRCode overlay and unsubscribes from events */
|
|
@@ -287,6 +287,16 @@ export class NeedleMenuElement extends HTMLElement {
|
|
|
287
287
|
// TODO: make host full size again and move the buttons to a wrapper so that we can later easily open e.g. foldouts/dropdowns / use the whole canvas space
|
|
288
288
|
template.innerHTML = `<style>
|
|
289
289
|
|
|
290
|
+
/** Styling attributes that ensure the nested menu z-index does not cause it to overlay elements outside of <needle-engine> */
|
|
291
|
+
:host {
|
|
292
|
+
position: absolute;
|
|
293
|
+
width: 100%;
|
|
294
|
+
height: 100%;
|
|
295
|
+
z-index: 0;
|
|
296
|
+
top: 0;
|
|
297
|
+
pointer-events: none;
|
|
298
|
+
}
|
|
299
|
+
|
|
290
300
|
#root {
|
|
291
301
|
position: absolute;
|
|
292
302
|
width: auto;
|
|
@@ -206,7 +206,7 @@ export class EngineLoadingView implements ILoadingViewHandler {
|
|
|
206
206
|
this._loadingElement.style.display = "flex";
|
|
207
207
|
this._loadingElement.style.alignItems = "center";
|
|
208
208
|
this._loadingElement.style.justifyContent = "center";
|
|
209
|
-
this._loadingElement.style.zIndex =
|
|
209
|
+
this._loadingElement.style.zIndex = "0";
|
|
210
210
|
this._loadingElement.style.flexDirection = "column";
|
|
211
211
|
this._loadingElement.style.pointerEvents = "none";
|
|
212
212
|
this._loadingElement.style.color = "white";
|
|
@@ -454,7 +454,6 @@ export class DragControls extends Behaviour implements IPointerEventHandler {
|
|
|
454
454
|
const sync = GameObject.getComponentInChildren(evt.object, SyncedTransform);
|
|
455
455
|
if (sync) {
|
|
456
456
|
sync.fastMode = false;
|
|
457
|
-
// sync?.requestOwnership();
|
|
458
457
|
}
|
|
459
458
|
}
|
|
460
459
|
if (this._marker)
|
|
@@ -565,6 +565,11 @@ export class OrbitControls extends Behaviour implements ICameraController {
|
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
|
|
568
|
+
onPausedChanged(isPaused: boolean): void {
|
|
569
|
+
if (!this._controls) return;
|
|
570
|
+
if (isPaused) this._controls.enabled = false;
|
|
571
|
+
}
|
|
572
|
+
|
|
568
573
|
|
|
569
574
|
/** @internal */
|
|
570
575
|
onBeforeRender() {
|
|
@@ -129,13 +129,22 @@ export class TransformGizmo extends Behaviour {
|
|
|
129
129
|
private onControlChangedEvent = (event) => {
|
|
130
130
|
const orbit = this.orbit;
|
|
131
131
|
if (orbit) orbit.enabled = !event.value;
|
|
132
|
+
|
|
132
133
|
if (event.value) {
|
|
133
|
-
//
|
|
134
|
-
const sync =
|
|
134
|
+
// Start of interaction
|
|
135
|
+
const sync = this.gameObject.getComponentInParent(SyncedTransform);
|
|
135
136
|
if (sync) {
|
|
137
|
+
sync.fastMode = true;
|
|
136
138
|
sync.requestOwnership();
|
|
137
139
|
}
|
|
138
140
|
}
|
|
141
|
+
else {
|
|
142
|
+
// End of interaction
|
|
143
|
+
const sync = this.gameObject.getComponentInParent(SyncedTransform);
|
|
144
|
+
if (sync) {
|
|
145
|
+
sync.fastMode = false;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
139
148
|
}
|
|
140
149
|
|
|
141
150
|
/**
|