shaders 2.5.118 → 2.5.120
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/core/index.js +73 -16
- package/dist/core/renderer.d.ts.map +1 -1
- package/dist/js/createShader.js +1 -1
- package/dist/react/Shader.js +1 -1
- package/dist/react/bundle.js +64 -64
- package/dist/solid/engine/Shader.js +1 -1
- package/dist/svelte/index.js +1 -1
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/package.json +1 -1
package/dist/core/index.js
CHANGED
|
@@ -769,6 +769,10 @@ function shaderRenderer() {
|
|
|
769
769
|
let pendingNodeRemoval = false;
|
|
770
770
|
let globalEventUnregister = null;
|
|
771
771
|
let unloadHandler = null;
|
|
772
|
+
let windowResizeHandler = null;
|
|
773
|
+
let cachedMaxTextureDim = 8192;
|
|
774
|
+
let lastRequestedWidth = 0;
|
|
775
|
+
let lastRequestedHeight = 0;
|
|
772
776
|
let enablePerformanceTracking = true;
|
|
773
777
|
const performanceTracker = new PerformanceTracker();
|
|
774
778
|
let pendingRegistrationQueue = [];
|
|
@@ -784,9 +788,22 @@ function shaderRenderer() {
|
|
|
784
788
|
let previousTextures = /* @__PURE__ */ new Set();
|
|
785
789
|
let pendingResize = null;
|
|
786
790
|
let isResizeScheduled = false;
|
|
791
|
+
const clampToTextureCap = (w, h) => {
|
|
792
|
+
const pr = renderer?.getPixelRatio?.() ?? 1;
|
|
793
|
+
const gpuCssCap = Math.max(1, Math.floor(cachedMaxTextureDim / pr) - 1);
|
|
794
|
+
const capW = Math.min(w, window.innerWidth, gpuCssCap);
|
|
795
|
+
const capH = Math.min(h, window.innerHeight, gpuCssCap);
|
|
796
|
+
const scale = Math.min(capW / w, capH / h, 1);
|
|
797
|
+
return {
|
|
798
|
+
width: Math.max(1, Math.round(w * scale)),
|
|
799
|
+
height: Math.max(1, Math.round(h * scale))
|
|
800
|
+
};
|
|
801
|
+
};
|
|
787
802
|
const updateRendererDimensions = (width, height) => {
|
|
788
803
|
if (width <= 0 || height <= 0) return;
|
|
789
|
-
if (width ===
|
|
804
|
+
if (width === lastRequestedWidth && height === lastRequestedHeight) return;
|
|
805
|
+
lastRequestedWidth = width;
|
|
806
|
+
lastRequestedHeight = height;
|
|
790
807
|
pendingResize = {
|
|
791
808
|
width,
|
|
792
809
|
height
|
|
@@ -796,8 +813,9 @@ function shaderRenderer() {
|
|
|
796
813
|
requestAnimationFrame(() => {
|
|
797
814
|
isResizeScheduled = false;
|
|
798
815
|
if (!pendingResize) return;
|
|
799
|
-
const
|
|
816
|
+
const raw = pendingResize;
|
|
800
817
|
pendingResize = null;
|
|
818
|
+
const { width: width$1, height: height$1 } = clampToTextureCap(raw.width, raw.height);
|
|
801
819
|
currentWidth = width$1;
|
|
802
820
|
currentHeight = height$1;
|
|
803
821
|
if (!hasInitialDimensions) {
|
|
@@ -1918,23 +1936,29 @@ function shaderRenderer() {
|
|
|
1918
1936
|
executeAfterRenderCallbacks(cappedDeltaTime);
|
|
1919
1937
|
if (enablePerformanceTracking) {
|
|
1920
1938
|
performance.mark("shader-gpu-end");
|
|
1939
|
+
let recordedTrueGpuTime = false;
|
|
1921
1940
|
if (renderer instanceof WebGPURenderer) try {
|
|
1922
1941
|
const backend = renderer.backend;
|
|
1923
1942
|
if (backend && backend.get && backend.get(renderer)) {
|
|
1924
1943
|
const renderContext = backend.get(renderer);
|
|
1925
1944
|
if (renderContext?.timestampQuery) {
|
|
1926
1945
|
const gpuTime = renderContext.timestampQuery.getResult();
|
|
1927
|
-
if (gpuTime !== null && gpuTime !== void 0)
|
|
1946
|
+
if (gpuTime !== null && gpuTime !== void 0) {
|
|
1947
|
+
performanceTracker.recordGpuTime(gpuTime / 1e6);
|
|
1948
|
+
recordedTrueGpuTime = true;
|
|
1949
|
+
}
|
|
1928
1950
|
}
|
|
1929
1951
|
}
|
|
1930
1952
|
} catch (e) {}
|
|
1931
1953
|
try {
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1954
|
+
if (!recordedTrueGpuTime) {
|
|
1955
|
+
performance.measure("shader-gpu-time", "shader-gpu-start", "shader-gpu-end");
|
|
1956
|
+
const gpuMeasure = performance.getEntriesByName("shader-gpu-time")[0];
|
|
1957
|
+
if (gpuMeasure) performanceTracker.recordGpuTime(gpuMeasure.duration);
|
|
1958
|
+
performance.clearMeasures("shader-gpu-time");
|
|
1959
|
+
}
|
|
1935
1960
|
performance.clearMarks("shader-gpu-start");
|
|
1936
1961
|
performance.clearMarks("shader-gpu-end");
|
|
1937
|
-
performance.clearMeasures("shader-gpu-time");
|
|
1938
1962
|
} catch (e) {}
|
|
1939
1963
|
}
|
|
1940
1964
|
if (enablePerformanceTracking) {
|
|
@@ -2099,6 +2123,16 @@ function shaderRenderer() {
|
|
|
2099
2123
|
cleanup();
|
|
2100
2124
|
};
|
|
2101
2125
|
window.addEventListener("beforeunload", unloadHandler);
|
|
2126
|
+
windowResizeHandler = () => {
|
|
2127
|
+
if (lastRequestedWidth > 0 && lastRequestedHeight > 0) {
|
|
2128
|
+
const rawW = lastRequestedWidth;
|
|
2129
|
+
const rawH = lastRequestedHeight;
|
|
2130
|
+
lastRequestedWidth = 0;
|
|
2131
|
+
lastRequestedHeight = 0;
|
|
2132
|
+
updateRendererDimensions(rawW, rawH);
|
|
2133
|
+
}
|
|
2134
|
+
};
|
|
2135
|
+
window.addEventListener("resize", windowResizeHandler, { passive: true });
|
|
2102
2136
|
if (localAbortController.signal.aborted) return;
|
|
2103
2137
|
if (context) {
|
|
2104
2138
|
console.log("[Shaders] Using provided WebGL context");
|
|
@@ -2166,16 +2200,19 @@ function shaderRenderer() {
|
|
|
2166
2200
|
cachedCanvasRect = rect;
|
|
2167
2201
|
isVisible = !shouldObserveElement || rect.width > 0 && rect.height > 0 && rect.top < window.innerHeight && rect.bottom > 0 && rect.left < window.innerWidth && rect.right > 0;
|
|
2168
2202
|
shouldAnimate = true;
|
|
2169
|
-
const
|
|
2170
|
-
const
|
|
2171
|
-
const
|
|
2172
|
-
const
|
|
2173
|
-
if (
|
|
2174
|
-
|
|
2175
|
-
|
|
2203
|
+
const rawWidth = rect.width > 0 ? rect.width : canvas.width;
|
|
2204
|
+
const rawHeight = rect.height > 0 ? rect.height : canvas.height;
|
|
2205
|
+
const roundedRawWidth = Math.round(rawWidth);
|
|
2206
|
+
const roundedRawHeight = Math.round(rawHeight);
|
|
2207
|
+
if (roundedRawWidth > 0 && roundedRawHeight > 0) {
|
|
2208
|
+
lastRequestedWidth = roundedRawWidth;
|
|
2209
|
+
lastRequestedHeight = roundedRawHeight;
|
|
2210
|
+
const { width: clampedWidth, height: clampedHeight } = clampToTextureCap(roundedRawWidth, roundedRawHeight);
|
|
2211
|
+
currentWidth = clampedWidth;
|
|
2212
|
+
currentHeight = clampedHeight;
|
|
2176
2213
|
hasInitialDimensions = true;
|
|
2177
|
-
renderer.setSize(
|
|
2178
|
-
const aspectRatio =
|
|
2214
|
+
renderer.setSize(clampedWidth, clampedHeight, false);
|
|
2215
|
+
const aspectRatio = clampedWidth / clampedHeight;
|
|
2179
2216
|
const frustumHeight = 2;
|
|
2180
2217
|
const frustumWidth = frustumHeight * aspectRatio;
|
|
2181
2218
|
camera.left = -frustumWidth / 2;
|
|
@@ -2188,6 +2225,22 @@ function shaderRenderer() {
|
|
|
2188
2225
|
} else hasInitialDimensions = false;
|
|
2189
2226
|
if (shouldAnimate) startAnimation();
|
|
2190
2227
|
if (!localAbortController.signal.aborted) {
|
|
2228
|
+
try {
|
|
2229
|
+
if (renderer.backend?.isWebGPUBackend === true) {
|
|
2230
|
+
const lim = (renderer.backend?.device)?.limits?.maxTextureDimension2D;
|
|
2231
|
+
if (typeof lim === "number" && lim > 0) cachedMaxTextureDim = lim;
|
|
2232
|
+
} else {
|
|
2233
|
+
const lim = renderer.capabilities?.maxTextureSize;
|
|
2234
|
+
if (typeof lim === "number" && lim > 0) cachedMaxTextureDim = lim;
|
|
2235
|
+
}
|
|
2236
|
+
} catch {}
|
|
2237
|
+
if (lastRequestedWidth > 0 && lastRequestedHeight > 0) {
|
|
2238
|
+
const rawW = lastRequestedWidth;
|
|
2239
|
+
const rawH = lastRequestedHeight;
|
|
2240
|
+
lastRequestedWidth = 0;
|
|
2241
|
+
lastRequestedHeight = 0;
|
|
2242
|
+
updateRendererDimensions(rawW, rawH);
|
|
2243
|
+
}
|
|
2191
2244
|
isInitialized = true;
|
|
2192
2245
|
isRendererReady = true;
|
|
2193
2246
|
processQueuedRegistrations();
|
|
@@ -2221,6 +2274,10 @@ function shaderRenderer() {
|
|
|
2221
2274
|
window.removeEventListener("beforeunload", unloadHandler);
|
|
2222
2275
|
unloadHandler = null;
|
|
2223
2276
|
}
|
|
2277
|
+
if (windowResizeHandler) {
|
|
2278
|
+
window.removeEventListener("resize", windowResizeHandler);
|
|
2279
|
+
windowResizeHandler = null;
|
|
2280
|
+
}
|
|
2224
2281
|
stopAnimation();
|
|
2225
2282
|
disposePreviousTextures();
|
|
2226
2283
|
currentTextures.forEach((texture$1) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../src/renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,IAAI,EAMT,cAAc,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAA;AAInC,OAAO,EAAoB,eAAe,EAAE,mBAAmB,EAAE,UAAU,EAA8D,YAAY,EAAE,cAAc,EAAE,cAAc,EAAqB,WAAW,EAAC,MAAM,SAAS,CAAA;AACrO,OAAO,EAAqB,gBAAgB,EAAC,MAAM,sBAAsB,CAAA;AAMzE;;GAEG;AACH,UAAU,QAAQ;IAEd;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IAErB;;OAEG;IACH,gBAAgB,EAAE,mBAAmB,CAAC,cAAc,CAAC,CAAA;IAErD;;OAEG;IACH,QAAQ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AU,MAAM;0BAvlBf,IAAI;yBAyBL,IAAI;yBApPE,OAAO,CAAC,IAAI,CAAC;+BA0Mb,gBAAgB;;eAgnBmB,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;2BArBpE,QAAQ,GAAG,OAAO,GAAG,IAAI;;qCAwBhB,OAAO,KAAG,OAAO;2BAK3B,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;;;mCAr6EZ,MAAM,KAAG,QAAQ,EAAE;oCA+CzC,IAAI,YACF,QAAQ,UACV,MAAM,kBACE,GAAG,CAAC,MAAM,CAAC,gBACb,IAAI,KACnB,IAAI;0CA0VK,IAAI,YACF,QAAQ,KACnB,IAAI;;;;EAmiEV"}
|
package/dist/js/createShader.js
CHANGED
|
@@ -48,7 +48,7 @@ async function createShader(canvas, preset, options) {
|
|
|
48
48
|
if (isExternalUser()) {
|
|
49
49
|
const checkRendering = () => {
|
|
50
50
|
if (renderer.getPerformanceStats().fps > 0) {
|
|
51
|
-
telemetryCollector = startTelemetry(renderer, "2.5.
|
|
51
|
+
telemetryCollector = startTelemetry(renderer, "2.5.120", options?.disableTelemetry || false, false);
|
|
52
52
|
if (telemetryCollector) telemetryCollector.start();
|
|
53
53
|
telemetryStartTimeout = null;
|
|
54
54
|
} else telemetryStartTimeout = setTimeout(checkRendering, 500);
|
package/dist/react/Shader.js
CHANGED
|
@@ -89,7 +89,7 @@ const Shader = ({ children, disableTelemetry = false, colorSpace = "p3-linear",
|
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
if (rendererRef.current.getPerformanceStats().fps > 0) {
|
|
92
|
-
telemetryCollectorRef.current = startTelemetry(rendererRef.current, "2.5.
|
|
92
|
+
telemetryCollectorRef.current = startTelemetry(rendererRef.current, "2.5.120", disableTelemetry, isPreview);
|
|
93
93
|
if (telemetryCollectorRef.current) telemetryCollectorRef.current.start();
|
|
94
94
|
telemetryStartTimeoutRef.current = null;
|
|
95
95
|
} else telemetryStartTimeoutRef.current = window.setTimeout(checkRendering, 500);
|