@needle-tools/engine 4.7.0-next.4bd7749 → 4.7.0-next.598a777
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 +1 -1
- package/dist/{needle-engine.bundle-DQ8S9diA.umd.cjs → needle-engine.bundle-C6_Q9p9H.umd.cjs} +115 -115
- package/dist/{needle-engine.bundle-kBkeRoLs.min.js → needle-engine.bundle-DNmnR0bU.min.js} +113 -113
- package/dist/{needle-engine.bundle-BGHUA0S1.js → needle-engine.bundle-DWTaMxD9.js} +3434 -3435
- 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_addressables.d.ts +1 -3
- package/lib/engine/engine_addressables.js +5 -12
- package/lib/engine/engine_addressables.js.map +1 -1
- package/lib/engine/engine_lightdata.js +12 -2
- package/lib/engine/engine_lightdata.js.map +1 -1
- package/package.json +2 -2
- package/src/engine/engine_addressables.ts +6 -15
- package/src/engine/engine_lightdata.ts +10 -2
|
@@ -53,10 +53,12 @@ export class LightDataRegistry implements ILightDataRegistry {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
tryGetSkybox(sourceId?: SourceIdentifier | null): Texture | null {
|
|
56
|
+
if (debugLightmap) console.log("[Get Skybox]", sourceId, this._lightmaps)
|
|
56
57
|
return this.tryGet(sourceId, LightmapType.Skybox, 0);
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
tryGetReflection(sourceId?: SourceIdentifier | null): Texture | null {
|
|
61
|
+
if (debugLightmap) console.log("[Get Reflection]", sourceId, this._lightmaps)
|
|
60
62
|
return this.tryGet(sourceId, LightmapType.Reflection, 0);
|
|
61
63
|
}
|
|
62
64
|
|
|
@@ -66,9 +68,15 @@ export class LightDataRegistry implements ILightDataRegistry {
|
|
|
66
68
|
return null;
|
|
67
69
|
}
|
|
68
70
|
const entry = this._lightmaps.get(sourceId);
|
|
69
|
-
if (!entry)
|
|
71
|
+
if (!entry) {
|
|
72
|
+
if (debugLightmap) console.warn(`[Lighting] No ${LightmapType[type]} texture entry for`, sourceId);
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
70
75
|
const arr = entry.get(type);
|
|
71
|
-
if (arr === undefined)
|
|
76
|
+
if (arr === undefined) {
|
|
77
|
+
if (debugLightmap) console.warn(`[Lighting] No ${LightmapType[type]} texture for`, sourceId, "index", index);
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
72
80
|
if (!arr?.length || arr.length <= index) return null;
|
|
73
81
|
return arr[index];
|
|
74
82
|
}
|