@needle-tools/engine 4.7.0-next.22483b4 → 4.7.0-next.4bd7749
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/dist/{needle-engine.bundle-RgZNbAgp.js → needle-engine.bundle-BGHUA0S1.js} +21 -19
- package/dist/{needle-engine.bundle-CP5AJL1A.umd.cjs → needle-engine.bundle-DQ8S9diA.umd.cjs} +9 -7
- package/dist/{needle-engine.bundle-BnGp0ASs.min.js → needle-engine.bundle-kBkeRoLs.min.js} +9 -7
- package/dist/needle-engine.js +2 -2
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/lib/engine/engine_context.js +1 -1
- package/lib/engine/engine_context.js.map +1 -1
- package/lib/engine/engine_three_utils.js +4 -0
- package/lib/engine/engine_three_utils.js.map +1 -1
- package/lib/engine/webcomponents/needle-engine.attributes.d.ts +1 -1
- package/lib/engine-components/Camera.js +1 -1
- package/lib/engine-components/Camera.js.map +1 -1
- package/lib/engine-components/CameraUtils.js +5 -3
- package/lib/engine-components/CameraUtils.js.map +1 -1
- package/lib/engine-components/Skybox.js +4 -4
- package/lib/engine-components/Skybox.js.map +1 -1
- package/lib/engine-components/postprocessing/Effects/Antialiasing.js +1 -1
- package/lib/engine-components/postprocessing/Effects/Antialiasing.js.map +1 -1
- package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.js +1 -1
- package/lib/engine-components/postprocessing/PostProcessingHandler.js.map +1 -1
- package/lib/engine-components/postprocessing/Volume.js +1 -1
- package/lib/engine-components/postprocessing/Volume.js.map +1 -1
- package/package.json +1 -1
- package/plugins/common/logger.js +321 -0
- package/plugins/types/userconfig.d.ts +4 -2
- package/plugins/vite/alias.js +7 -2
- package/plugins/vite/imports-logger.js +1 -1
- package/plugins/vite/index.js +2 -0
- package/plugins/vite/logger.client.js +262 -0
- package/plugins/vite/logger.js +101 -0
- package/plugins/vite/materialx.js +6 -4
- package/src/engine/engine_context.ts +1 -1
- package/src/engine/engine_three_utils.ts +3 -0
- package/src/engine/webcomponents/needle-engine.attributes.ts +1 -1
- package/src/engine-components/Camera.ts +1 -1
- package/src/engine-components/CameraUtils.ts +5 -3
- package/src/engine-components/Skybox.ts +5 -5
- package/src/engine-components/postprocessing/Effects/Antialiasing.ts +1 -1
- package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.ts +1 -1
- package/src/engine-components/postprocessing/PostProcessingHandler.ts +1 -2
- package/src/engine-components/postprocessing/Volume.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to this package will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [4.7.0] - 2025-07-28
|
|
8
|
+
- Improved Postprocessing performance and stability
|
|
9
|
+
- Fix: Issue where Tonemapping would not be applied
|
|
10
|
+
- Change: Improve `<needle-engine background-image="<url>" />` support and deprecate the old `skybox-image` attribute
|
|
11
|
+
|
|
12
|
+
## [4.6.3] - 2025-07-25
|
|
13
|
+
- Update Vite alias plugin to make sure the same postprocessing module is used
|
|
14
|
+
- Improve postprocessing stability
|
|
15
|
+
- Fix: Postprocessing with transparent background
|
|
16
|
+
|
|
7
17
|
## [4.6.2] - 2025-07-23
|
|
8
18
|
- Postprocessing performance and stability improvements
|
|
9
19
|
- Add: Custom postprocessing effects can now use `PostProcessingEffectPriority` to ensure effects are correctly sorted (e.g. before DepthOfField)
|
|
@@ -1279,7 +1279,7 @@ function Fi(o, t = void 0, e = void 0, i = void 0) {
|
|
|
1279
1279
|
console.warn(`Object "${c.name}" has NaN values in position or scale.... will ignore it`, u, f);
|
|
1280
1280
|
return;
|
|
1281
1281
|
}
|
|
1282
|
-
n.expandByObject(c, !0), c.children = d;
|
|
1282
|
+
c.geometry === null && (c.geometry = void 0), n.expandByObject(c, !0), c.children = d;
|
|
1283
1283
|
}
|
|
1284
1284
|
for (const d of c.children)
|
|
1285
1285
|
a(d);
|
|
@@ -1804,11 +1804,11 @@ qo('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"]
|
|
|
1804
1804
|
qo('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";');
|
|
1805
1805
|
qo('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";');
|
|
1806
1806
|
qo('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
|
|
1807
|
-
qo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.7.0
|
|
1807
|
+
qo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.7.0";');
|
|
1808
1808
|
qo('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
1809
|
-
qo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "
|
|
1809
|
+
qo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Jul 28 2025 09:07:25 GMT+0000 (Coordinated Universal Time)";');
|
|
1810
1810
|
qo('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
|
|
1811
|
-
const es = "4.7.0
|
|
1811
|
+
const es = "4.7.0", Tg = "undefined", av = "Mon Jul 28 2025 09:07:25 GMT+0000 (Coordinated Universal Time)";
|
|
1812
1812
|
rv && console.log(`Engine version: ${es} (generator: ${Tg})
|
|
1813
1813
|
Project built at ${av}`);
|
|
1814
1814
|
const cc = NEEDLE_PUBLIC_KEY, zo = "needle_isActiveInHierarchy", Sa = "builtin_components", bd = "needle_editor_guid";
|
|
@@ -16943,7 +16943,7 @@ const Vt = (Sn = class extends j {
|
|
|
16943
16943
|
const s = `[Camera] Apply ClearFlags: ${$r[this._clearFlags]} - "${this.name}"`;
|
|
16944
16944
|
console.debug(s);
|
|
16945
16945
|
}
|
|
16946
|
-
const i = this.context.domElement.getAttribute("background-image") || this.context.domElement.getAttribute("background-color")
|
|
16946
|
+
const i = this.context.domElement.getAttribute("background-image") || this.context.domElement.getAttribute("background-color");
|
|
16947
16947
|
switch (this._clearFlags) {
|
|
16948
16948
|
case 0:
|
|
16949
16949
|
return;
|
|
@@ -33418,7 +33418,7 @@ class Mf extends ft {
|
|
|
33418
33418
|
// predicationMode: MODULES.POSTPROCESSING.MODULE.PredicationMode.DEPTH,
|
|
33419
33419
|
});
|
|
33420
33420
|
return this.preset.onValueChanged = (n) => {
|
|
33421
|
-
QE && console.log("Antialiasing preset changed to", n
|
|
33421
|
+
QE && console.log("Antialiasing preset changed to", n), e.applyPreset(n);
|
|
33422
33422
|
}, e;
|
|
33423
33423
|
}
|
|
33424
33424
|
}
|
|
@@ -33897,7 +33897,7 @@ class ms extends ft {
|
|
|
33897
33897
|
i,
|
|
33898
33898
|
n
|
|
33899
33899
|
);
|
|
33900
|
-
s.name = "
|
|
33900
|
+
s.name = "SSAO_N8";
|
|
33901
33901
|
const a = lg[this.quality];
|
|
33902
33902
|
s.setQualityMode(a), s.configuration.transparencyAware = !1;
|
|
33903
33903
|
const l = new ns(i, n);
|
|
@@ -34465,7 +34465,9 @@ class Th extends j {
|
|
|
34465
34465
|
if (!this.context.isInXR && (this.context.mainCamera && this._isDirty && this.apply(), this.context.composer && this._postprocessing && this._postprocessing.composer === this.context.composer)) {
|
|
34466
34466
|
if (this.context.renderer.getContext().isContextLost() && this.context.renderer.forceContextRestore(), this.context.composer.getRenderer() !== this.context.renderer && this.context.composer.setRenderer(this.context.renderer), this.context.composer.setMainScene(this.context.scene), this.multisampling === "auto")
|
|
34467
34467
|
if (this._postprocessing && this._postprocessing.hasSmaaEffect)
|
|
34468
|
-
this._postprocessing.multisampling !== 0 && (this._postprocessing.multisampling = 0, (mr || z()) && console.
|
|
34468
|
+
this._postprocessing.multisampling !== 0 && (this._postprocessing.multisampling = 0, (mr || z()) && console.log(`[PostProcessing] multisampling is disabled because it's set to 'auto' on your PostprocessingManager/Volume component that also has an SMAA effect.
|
|
34469
|
+
|
|
34470
|
+
If you need multisampling consider changing 'auto' to a fixed value (e.g. 4).`));
|
|
34469
34471
|
else {
|
|
34470
34472
|
const e = this.context.time.realtimeSinceStartup - this._multisampleAutoChangeTime;
|
|
34471
34473
|
if (this.context.time.realtimeSinceStartup - this._componentEnabledTime > 2 && e > 0.5) {
|
|
@@ -36175,7 +36177,7 @@ var RA = Object.defineProperty, Ah = (o, t, e, i) => {
|
|
|
36175
36177
|
return n && RA(t, e, n), n;
|
|
36176
36178
|
};
|
|
36177
36179
|
const Lt = S("debugskybox");
|
|
36178
|
-
By("
|
|
36180
|
+
By("background-image");
|
|
36179
36181
|
By("environment-image");
|
|
36180
36182
|
function n0(o, t, e, i, n) {
|
|
36181
36183
|
const s = new Fy();
|
|
@@ -36190,10 +36192,10 @@ function n0(o, t, e, i, n) {
|
|
|
36190
36192
|
const _u = new Array();
|
|
36191
36193
|
fe.registerCallback(me.ContextCreationStart, (o) => {
|
|
36192
36194
|
var n;
|
|
36193
|
-
const t = o.context, e = t.domElement.getAttribute("
|
|
36195
|
+
const t = o.context, e = t.domElement.getAttribute("background-image"), i = t.domElement.getAttribute("environment-image");
|
|
36194
36196
|
if (e) {
|
|
36195
|
-
Lt && console.log("Creating remote skybox to load " + e), ((n = t.mainCameraComponent) == null ? void 0 : n.clearFlags) !== $r.Skybox && console.warn('"
|
|
36196
|
-
const s = n0(t, e, !0, !1, "
|
|
36197
|
+
Lt && console.log("Creating remote skybox to load " + e), ((n = t.mainCameraComponent) == null ? void 0 : n.clearFlags) !== $r.Skybox && console.warn('"background-image" attribute has no effect: camera clear flags are not set to "Skybox"');
|
|
36198
|
+
const s = n0(t, e, !0, !1, "background-image");
|
|
36197
36199
|
_u.push(s);
|
|
36198
36200
|
}
|
|
36199
36201
|
if (i) {
|
|
@@ -43007,23 +43009,23 @@ const O2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43007
43009
|
__Ignore: KI
|
|
43008
43010
|
}, Symbol.toStringTag, { value: "Module" })), Cu = S("debugmissingcamera");
|
|
43009
43011
|
fe.registerCallback(me.MissingCamera, (o) => {
|
|
43010
|
-
var l, c, h
|
|
43012
|
+
var l, c, h;
|
|
43011
43013
|
Cu && console.warn("Creating missing camera");
|
|
43012
43014
|
const t = o.context.scene, e = new ve();
|
|
43013
43015
|
e.name = "Default Fallback Camera", t.add(e);
|
|
43014
43016
|
const i = new Ai();
|
|
43015
43017
|
if (i.sourceId = ((c = (l = o.files) == null ? void 0 : l[0]) == null ? void 0 : c.src) ?? "unknown", i.fieldOfView = 35, o.context.domElement.getAttribute("transparent") != null)
|
|
43016
43018
|
i.clearFlags = $r.Uninitialized;
|
|
43017
|
-
else if ((h = o.context.domElement.getAttribute("
|
|
43018
|
-
i.clearFlags = $r.Skybox,
|
|
43019
|
+
else if ((h = o.context.domElement.getAttribute("background-image")) != null && h.length || o.context.lightmaps.tryGetSkybox(i.sourceId))
|
|
43020
|
+
i.clearFlags = $r.Skybox, o.context.domElement.getAttribute("background-blurriness") === null && (o.context.scene.backgroundBlurriness = 0.2);
|
|
43019
43021
|
else {
|
|
43020
43022
|
if (i.clearFlags = $r.SolidColor, !o.context.domElement.getAttribute("background-color")) {
|
|
43021
|
-
let
|
|
43022
|
-
typeof window !== void 0 && window.matchMedia("(prefers-color-scheme: dark)").matches && (
|
|
43023
|
+
let d = "#efefef";
|
|
43024
|
+
typeof window !== void 0 && window.matchMedia("(prefers-color-scheme: dark)").matches && (d = "#1f1f1f"), t.background = new re(d);
|
|
43023
43025
|
}
|
|
43024
43026
|
if (!t.environment) {
|
|
43025
|
-
const
|
|
43026
|
-
t.environment =
|
|
43027
|
+
const d = new wC(o.context.renderer), u = new Xy("neutral");
|
|
43028
|
+
t.environment = d.fromScene(u, 0.025).texture;
|
|
43027
43029
|
}
|
|
43028
43030
|
}
|
|
43029
43031
|
const s = qa(e, i, !0);
|