@luma.gl/engine 9.3.0-alpha.9 → 9.3.1
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/animation-loop/make-animation-loop.d.ts.map +1 -1
- package/dist/animation-loop/make-animation-loop.js +1 -0
- package/dist/animation-loop/make-animation-loop.js.map +1 -1
- package/dist/compute/computation.js +2 -2
- package/dist/compute/computation.js.map +1 -1
- package/dist/debug/debug-framebuffer.d.ts +9 -4
- package/dist/debug/debug-framebuffer.d.ts.map +1 -1
- package/dist/debug/debug-framebuffer.js +91 -45
- package/dist/debug/debug-framebuffer.js.map +1 -1
- package/dist/dist.dev.js +200 -126
- package/dist/dist.min.js +33 -33
- package/dist/dynamic-texture/dynamic-texture.d.ts.map +1 -1
- package/dist/dynamic-texture/dynamic-texture.js +3 -1
- package/dist/dynamic-texture/dynamic-texture.js.map +1 -1
- package/dist/dynamic-texture/texture-data.js +2 -2
- package/dist/dynamic-texture/texture-data.js.map +1 -1
- package/dist/geometries/cube-geometry.js +7 -7
- package/dist/geometries/cube-geometry.js.map +1 -1
- package/dist/geometries/ico-sphere-geometry.js +3 -1
- package/dist/geometries/ico-sphere-geometry.js.map +1 -1
- package/dist/geometry/gpu-geometry.d.ts.map +1 -1
- package/dist/geometry/gpu-geometry.js +3 -0
- package/dist/geometry/gpu-geometry.js.map +1 -1
- package/dist/index.cjs +176 -108
- package/dist/index.cjs.map +3 -3
- package/dist/material/material.js +2 -2
- package/dist/material/material.js.map +1 -1
- package/dist/model/model.d.ts.map +1 -1
- package/dist/model/model.js +45 -34
- package/dist/model/model.js.map +1 -1
- package/dist/models/billboard-texture-model.js +4 -4
- package/dist/models/billboard-texture-module.d.ts +1 -1
- package/dist/models/billboard-texture-module.js +1 -1
- package/dist/models/light-model-utils.js +2 -2
- package/dist/modules/picking/color-picking.d.ts +2 -2
- package/dist/modules/picking/index-picking.d.ts +2 -2
- package/dist/modules/picking/legacy-color-picking.d.ts +4 -4
- package/dist/modules/picking/picking-uniforms.d.ts +1 -1
- package/dist/modules/picking/picking-uniforms.d.ts.map +1 -1
- package/dist/modules/picking/picking-uniforms.js +1 -1
- package/dist/modules/picking/picking.d.ts +2 -2
- package/dist/passes/get-fragment-shader.js +4 -4
- package/dist/shader-inputs.d.ts.map +1 -1
- package/dist/shader-inputs.js +20 -23
- package/dist/shader-inputs.js.map +1 -1
- package/package.json +4 -4
- package/src/animation-loop/make-animation-loop.ts +1 -0
- package/src/compute/computation.ts +2 -2
- package/src/debug/debug-framebuffer.ts +139 -61
- package/src/dynamic-texture/dynamic-texture.ts +3 -5
- package/src/dynamic-texture/texture-data.ts +2 -2
- package/src/dynamic-texture/texture-data.ts.disabled +1 -1
- package/src/geometries/cube-geometry.ts +7 -7
- package/src/geometries/ico-sphere-geometry.ts +3 -1
- package/src/geometry/gpu-geometry.ts +3 -0
- package/src/material/material.ts +2 -2
- package/src/model/model.ts +48 -36
- package/src/models/billboard-texture-model.ts +4 -4
- package/src/models/billboard-texture-module.ts +1 -1
- package/src/models/light-model-utils.ts +2 -2
- package/src/modules/picking/picking-uniforms.ts +1 -1
- package/src/passes/get-fragment-shader.ts +4 -4
- package/src/shader-inputs.ts +32 -41
package/dist/shader-inputs.js
CHANGED
|
@@ -50,12 +50,11 @@ export class ShaderInputs {
|
|
|
50
50
|
this.moduleBindings = {};
|
|
51
51
|
// Initialize the modules
|
|
52
52
|
for (const [name, module] of Object.entries(modules)) {
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
log.warn(`Module name: ${name} vs ${module.name}`)();
|
|
53
|
+
if (module) {
|
|
54
|
+
this._addModule(module);
|
|
55
|
+
if (module.name && name !== module.name && !this.options.disableWarnings) {
|
|
56
|
+
log.warn(`Module name: ${name} vs ${module.name}`)();
|
|
57
|
+
}
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
}
|
|
@@ -74,15 +73,16 @@ export class ShaderInputs {
|
|
|
74
73
|
if (!this.options.disableWarnings) {
|
|
75
74
|
log.warn(`Module ${name} not found`)();
|
|
76
75
|
}
|
|
77
|
-
continue; // eslint-disable-line no-continue
|
|
78
76
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
77
|
+
else {
|
|
78
|
+
const oldUniforms = this.moduleUniforms[moduleName];
|
|
79
|
+
const oldBindings = this.moduleBindings[moduleName];
|
|
80
|
+
const uniformsAndBindings = module.getUniforms?.(moduleProps, oldUniforms) || moduleProps;
|
|
81
|
+
const { uniforms, bindings } = splitUniformsAndBindings(uniformsAndBindings, module.uniformTypes);
|
|
82
|
+
this.moduleUniforms[moduleName] = mergeModuleUniforms(oldUniforms, uniforms, module.uniformTypes);
|
|
83
|
+
this.moduleBindings[moduleName] = { ...oldBindings, ...bindings };
|
|
84
|
+
// this.moduleUniformsChanged ||= moduleName;
|
|
85
|
+
}
|
|
86
86
|
// console.log(`setProps(${String(moduleName)}`, moduleName, this.moduleUniforms[moduleName])
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -129,10 +129,9 @@ export class ShaderInputs {
|
|
|
129
129
|
function mergeModuleUniforms(currentUniforms = {}, nextUniforms = {}, uniformTypes = {}) {
|
|
130
130
|
const mergedUniforms = { ...currentUniforms };
|
|
131
131
|
for (const [key, value] of Object.entries(nextUniforms)) {
|
|
132
|
-
if (value
|
|
133
|
-
|
|
132
|
+
if (value !== undefined) {
|
|
133
|
+
mergedUniforms[key] = mergeModuleUniformValue(currentUniforms[key], value, uniformTypes[key]);
|
|
134
134
|
}
|
|
135
|
-
mergedUniforms[key] = mergeModuleUniformValue(currentUniforms[key], value, uniformTypes[key]);
|
|
136
135
|
}
|
|
137
136
|
return mergedUniforms;
|
|
138
137
|
}
|
|
@@ -150,10 +149,9 @@ function mergeModuleUniformValue(currentValue, nextValue, uniformType) {
|
|
|
150
149
|
const mergedArray = currentArray.slice();
|
|
151
150
|
for (let index = 0; index < nextValue.length; index++) {
|
|
152
151
|
const elementValue = nextValue[index];
|
|
153
|
-
if (elementValue
|
|
154
|
-
|
|
152
|
+
if (elementValue !== undefined) {
|
|
153
|
+
mergedArray[index] = mergeModuleUniformValue(currentArray[index], elementValue, uniformType[0]);
|
|
155
154
|
}
|
|
156
|
-
mergedArray[index] = mergeModuleUniformValue(currentArray[index], elementValue, uniformType[0]);
|
|
157
155
|
}
|
|
158
156
|
return mergedArray;
|
|
159
157
|
}
|
|
@@ -164,10 +162,9 @@ function mergeModuleUniformValue(currentValue, nextValue, uniformType) {
|
|
|
164
162
|
const currentObject = isPlainUniformObject(currentValue) ? currentValue : {};
|
|
165
163
|
const mergedObject = { ...currentObject };
|
|
166
164
|
for (const [key, value] of Object.entries(nextValue)) {
|
|
167
|
-
if (value
|
|
168
|
-
|
|
165
|
+
if (value !== undefined) {
|
|
166
|
+
mergedObject[key] = mergeModuleUniformValue(currentObject[key], value, uniformStruct[key]);
|
|
169
167
|
}
|
|
170
|
-
mergedObject[key] = mergeModuleUniformValue(currentObject[key], value, uniformStruct[key]);
|
|
171
168
|
}
|
|
172
169
|
return mergedObject;
|
|
173
170
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader-inputs.js","sourceRoot":"","sources":["../src/shader-inputs.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,GAAG,EAAC,MAAM,eAAe,CAAC;AAClC,2HAA2H;AAC3H,OAAO,EACL,2BAA2B,EAG5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,wBAAwB,EAAC,+CAA4C;AAW7E;;;;;;GAMG;AACH,MAAM,OAAO,YAAY;IAKvB,OAAO,GAAkC;QACvC,eAAe,EAAE,KAAK;KACvB,CAAC;IAEF;;;OAGG;IACH,yBAAyB;IACzB,OAAO,CAA4D;IAEnE,gDAAgD;IAChD,cAAc,CAAuE;IACr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AAC,CAAC;AACvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luma.gl/engine",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.1",
|
|
4
4
|
"description": "3D Engine Components for luma.gl",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"prepublishOnly": "npm run build-minified-bundle && npm run build-dev-bundle"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@luma.gl/core": "9.3.0
|
|
44
|
-
"@luma.gl/shadertools": "9.3.0
|
|
43
|
+
"@luma.gl/core": "~9.3.0",
|
|
44
|
+
"@luma.gl/shadertools": "~9.3.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@math.gl/core": "^4.1.0",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"@probe.gl/log": "^4.1.1",
|
|
50
50
|
"@probe.gl/stats": "^4.1.1"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "c13ab4389f5616e6f7f21bfa4e113ac600e6ecab"
|
|
53
53
|
}
|
|
@@ -43,6 +43,7 @@ export function makeAnimationLoop(
|
|
|
43
43
|
// Any async loading can be handled here
|
|
44
44
|
return await renderLoop?.onInitialize(animationProps);
|
|
45
45
|
} catch (error) {
|
|
46
|
+
console.error(error);
|
|
46
47
|
setError(animationProps.animationLoop.device, error as Error);
|
|
47
48
|
return null;
|
|
48
49
|
}
|
|
@@ -240,11 +240,11 @@ export class Computation {
|
|
|
240
240
|
|
|
241
241
|
setShaderInputs(shaderInputs: ShaderInputs): void {
|
|
242
242
|
this.shaderInputs = shaderInputs;
|
|
243
|
-
this._uniformStore = new UniformStore(this.shaderInputs.modules);
|
|
243
|
+
this._uniformStore = new UniformStore(this.device, this.shaderInputs.modules);
|
|
244
244
|
// Create uniform buffer bindings for all modules
|
|
245
245
|
for (const [moduleName, module] of Object.entries(this.shaderInputs.modules)) {
|
|
246
246
|
if (shaderModuleHasUniforms(module)) {
|
|
247
|
-
const uniformBuffer = this._uniformStore.getManagedUniformBuffer(
|
|
247
|
+
const uniformBuffer = this._uniformStore.getManagedUniformBuffer(moduleName);
|
|
248
248
|
this.bindings[`${moduleName}Uniforms`] = uniformBuffer;
|
|
249
249
|
}
|
|
250
250
|
}
|
|
@@ -2,75 +2,153 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import type {Framebuffer, Texture} from '@luma.gl/core';
|
|
6
|
-
// import {copyTextureToImage} from '../debug/copy-texture-to-image';
|
|
5
|
+
import type {Device, Framebuffer, RenderPass, Texture} from '@luma.gl/core';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
let ctx: CanvasRenderingContext2D | null = null;
|
|
11
|
-
// let targetImage: HTMLImageElement | null = null;
|
|
7
|
+
const DEBUG_FRAMEBUFFER_STATE_KEY = '__debugFramebufferState';
|
|
8
|
+
const DEFAULT_MARGIN_PX = 8;
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
type DebugFramebufferOptions = {
|
|
11
|
+
id: string;
|
|
12
|
+
minimap?: boolean;
|
|
13
|
+
opaque?: boolean;
|
|
14
|
+
top?: string;
|
|
15
|
+
left?: string;
|
|
16
|
+
rgbaScale?: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type DebugFramebufferState = {
|
|
20
|
+
flushing: boolean;
|
|
21
|
+
queuedFramebuffers: Framebuffer[];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Debug utility to blit queued offscreen framebuffers into the default framebuffer
|
|
26
|
+
* without CPU readback. Currently implemented for WebGL only.
|
|
27
|
+
*/
|
|
15
28
|
export function debugFramebuffer(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
renderPass: RenderPass,
|
|
30
|
+
source: Framebuffer | Texture | null,
|
|
31
|
+
options: DebugFramebufferOptions
|
|
32
|
+
): void {
|
|
33
|
+
if (renderPass.device.type !== 'webgl') {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const state = getDebugFramebufferState(renderPass.device);
|
|
38
|
+
if (state.flushing) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (isDefaultRenderPass(renderPass)) {
|
|
43
|
+
flushDebugFramebuffers(renderPass, options, state);
|
|
44
|
+
return;
|
|
31
45
|
}
|
|
32
|
-
|
|
33
|
-
if (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
canvas.style.zIndex = '100';
|
|
38
|
-
canvas.style.position = 'absolute';
|
|
39
|
-
canvas.style.top = top; // ⚠️
|
|
40
|
-
canvas.style.left = left; // ⚠️
|
|
41
|
-
canvas.style.border = 'blue 5px solid';
|
|
42
|
-
canvas.style.transform = 'scaleY(-1)';
|
|
43
|
-
document.body.appendChild(canvas);
|
|
44
|
-
|
|
45
|
-
ctx = canvas.getContext('2d');
|
|
46
|
-
// targetImage = new Image();
|
|
46
|
+
|
|
47
|
+
if (source && isFramebuffer(source) && source.handle !== null) {
|
|
48
|
+
if (!state.queuedFramebuffers.includes(source)) {
|
|
49
|
+
state.queuedFramebuffers.push(source);
|
|
50
|
+
}
|
|
47
51
|
}
|
|
52
|
+
}
|
|
48
53
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
function flushDebugFramebuffers(
|
|
55
|
+
renderPass: RenderPass,
|
|
56
|
+
options: DebugFramebufferOptions,
|
|
57
|
+
state: DebugFramebufferState
|
|
58
|
+
): void {
|
|
59
|
+
if (state.queuedFramebuffers.length === 0) {
|
|
60
|
+
return;
|
|
55
61
|
}
|
|
56
62
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
const webglDevice = renderPass.device as Device & {gl: WebGL2RenderingContext};
|
|
64
|
+
const {gl} = webglDevice;
|
|
65
|
+
const previousReadFramebuffer = gl.getParameter(gl.READ_FRAMEBUFFER_BINDING);
|
|
66
|
+
const previousDrawFramebuffer = gl.getParameter(gl.DRAW_FRAMEBUFFER_BINDING);
|
|
67
|
+
const [targetWidth, targetHeight] = renderPass.device
|
|
68
|
+
.getDefaultCanvasContext()
|
|
69
|
+
.getDrawingBufferSize();
|
|
70
|
+
|
|
71
|
+
let topPx = parseCssPixel(options.top, DEFAULT_MARGIN_PX);
|
|
72
|
+
const leftPx = parseCssPixel(options.left, DEFAULT_MARGIN_PX);
|
|
73
|
+
|
|
74
|
+
state.flushing = true;
|
|
75
|
+
try {
|
|
76
|
+
for (const framebuffer of state.queuedFramebuffers) {
|
|
77
|
+
const [targetX0, targetY0, targetX1, targetY1, previewHeight] = getOverlayRect({
|
|
78
|
+
framebuffer,
|
|
79
|
+
targetWidth,
|
|
80
|
+
targetHeight,
|
|
81
|
+
topPx,
|
|
82
|
+
leftPx,
|
|
83
|
+
minimap: options.minimap
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
gl.bindFramebuffer(gl.READ_FRAMEBUFFER, framebuffer.handle as WebGLFramebuffer | null);
|
|
87
|
+
gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, null);
|
|
88
|
+
gl.blitFramebuffer(
|
|
89
|
+
0,
|
|
90
|
+
0,
|
|
91
|
+
framebuffer.width,
|
|
92
|
+
framebuffer.height,
|
|
93
|
+
targetX0,
|
|
94
|
+
targetY0,
|
|
95
|
+
targetX1,
|
|
96
|
+
targetY1,
|
|
97
|
+
gl.COLOR_BUFFER_BIT,
|
|
98
|
+
gl.NEAREST
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
topPx += previewHeight + DEFAULT_MARGIN_PX;
|
|
73
102
|
}
|
|
74
|
-
|
|
103
|
+
} finally {
|
|
104
|
+
gl.bindFramebuffer(gl.READ_FRAMEBUFFER, previousReadFramebuffer);
|
|
105
|
+
gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, previousDrawFramebuffer);
|
|
106
|
+
state.flushing = false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function getOverlayRect(options: {
|
|
111
|
+
framebuffer: Framebuffer;
|
|
112
|
+
targetWidth: number;
|
|
113
|
+
targetHeight: number;
|
|
114
|
+
topPx: number;
|
|
115
|
+
leftPx: number;
|
|
116
|
+
minimap?: boolean;
|
|
117
|
+
}): [number, number, number, number, number] {
|
|
118
|
+
const {framebuffer, targetWidth, targetHeight, topPx, leftPx, minimap} = options;
|
|
119
|
+
const maxWidth = minimap ? Math.max(Math.floor(targetWidth / 4), 1) : targetWidth;
|
|
120
|
+
const maxHeight = minimap ? Math.max(Math.floor(targetHeight / 4), 1) : targetHeight;
|
|
121
|
+
const scale = Math.min(maxWidth / framebuffer.width, maxHeight / framebuffer.height);
|
|
122
|
+
const previewWidth = Math.max(Math.floor(framebuffer.width * scale), 1);
|
|
123
|
+
const previewHeight = Math.max(Math.floor(framebuffer.height * scale), 1);
|
|
124
|
+
const targetX0 = leftPx;
|
|
125
|
+
const targetY0 = Math.max(targetHeight - topPx - previewHeight, 0);
|
|
126
|
+
const targetX1 = targetX0 + previewWidth;
|
|
127
|
+
const targetY1 = targetY0 + previewHeight;
|
|
128
|
+
return [targetX0, targetY0, targetX1, targetY1, previewHeight];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function getDebugFramebufferState(device: Device): DebugFramebufferState {
|
|
132
|
+
device.userData[DEBUG_FRAMEBUFFER_STATE_KEY] ||= {
|
|
133
|
+
flushing: false,
|
|
134
|
+
queuedFramebuffers: []
|
|
135
|
+
} satisfies DebugFramebufferState;
|
|
136
|
+
return device.userData[DEBUG_FRAMEBUFFER_STATE_KEY] as DebugFramebufferState;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function isFramebuffer(value: Framebuffer | Texture): value is Framebuffer {
|
|
140
|
+
return 'colorAttachments' in value;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function isDefaultRenderPass(renderPass: RenderPass): boolean {
|
|
144
|
+
const framebuffer = renderPass.props.framebuffer as {handle?: unknown} | null;
|
|
145
|
+
return !framebuffer || framebuffer.handle === null;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function parseCssPixel(value: string | undefined, defaultValue: number): number {
|
|
149
|
+
if (!value) {
|
|
150
|
+
return defaultValue;
|
|
75
151
|
}
|
|
152
|
+
const parsedValue = Number.parseInt(value, 10);
|
|
153
|
+
return Number.isFinite(parsedValue) ? parsedValue : defaultValue;
|
|
76
154
|
}
|
|
@@ -18,14 +18,11 @@ import {
|
|
|
18
18
|
// cube constants
|
|
19
19
|
type TextureCubeFace,
|
|
20
20
|
TEXTURE_CUBE_FACE_MAP,
|
|
21
|
-
|
|
22
21
|
// texture slice/mip data types
|
|
23
22
|
type TextureSubresource,
|
|
24
|
-
|
|
25
23
|
// props (dimension + data)
|
|
26
24
|
type TextureDataProps,
|
|
27
25
|
type TextureDataAsyncProps,
|
|
28
|
-
|
|
29
26
|
// combined data for different texture types
|
|
30
27
|
type Texture1DData,
|
|
31
28
|
type Texture2DData,
|
|
@@ -33,7 +30,6 @@ import {
|
|
|
33
30
|
type TextureArrayData,
|
|
34
31
|
type TextureCubeArrayData,
|
|
35
32
|
type TextureCubeData,
|
|
36
|
-
|
|
37
33
|
// Helpers
|
|
38
34
|
getTextureSizeFromData,
|
|
39
35
|
resolveTextureImageFormat,
|
|
@@ -116,7 +112,9 @@ export class DynamicTexture {
|
|
|
116
112
|
return 'DynamicTexture';
|
|
117
113
|
}
|
|
118
114
|
toString(): string {
|
|
119
|
-
|
|
115
|
+
const width = this._texture?.width ?? this.props.width ?? '?';
|
|
116
|
+
const height = this._texture?.height ?? this.props.height ?? '?';
|
|
117
|
+
return `DynamicTexture:"${this.id}":${width}x${height}px:(${this.isReady ? 'ready' : 'loading...'})`;
|
|
120
118
|
}
|
|
121
119
|
|
|
122
120
|
constructor(device: Device, props: DynamicTextureProps) {
|
|
@@ -40,11 +40,11 @@ export type TextureSliceData = TextureMipLevelData | TextureMipLevelData[];
|
|
|
40
40
|
export type TextureCubeFace = '+X' | '-X' | '+Y' | '-Y' | '+Z' | '-Z';
|
|
41
41
|
|
|
42
42
|
/** Array of cube texture faces. @note: index in array is the face index */
|
|
43
|
-
//
|
|
43
|
+
// biome-ignore format: preserve layout
|
|
44
44
|
export const TEXTURE_CUBE_FACES = ['+X', '-X', '+Y', '-Y', '+Z', '-Z'] as const satisfies readonly TextureCubeFace[];
|
|
45
45
|
|
|
46
46
|
/** Map of cube texture face names to face indexes */
|
|
47
|
-
//
|
|
47
|
+
// biome-ignore format: preserve layout
|
|
48
48
|
export const TEXTURE_CUBE_FACE_MAP = {'+X': 0, '-X': 1, '+Y': 2, '-Y': 3, '+Z': 4, '-Z': 5} as const satisfies Record<TextureCubeFace, number>;
|
|
49
49
|
|
|
50
50
|
/** @todo - Define what data type is supported for 1D textures. TextureImageData with height = 1 */
|
|
@@ -131,7 +131,7 @@ export function normalizeTextureData(
|
|
|
131
131
|
|
|
132
132
|
/** Convert luma.gl cubemap face constants to depth index */
|
|
133
133
|
export function getCubeFaceDepth(face: TextureCubeFace): number {
|
|
134
|
-
//
|
|
134
|
+
// biome-ignore format: preserve layout
|
|
135
135
|
switch (face) {
|
|
136
136
|
case '+X': return 0;
|
|
137
137
|
case '-X': return 1;
|
|
@@ -35,13 +35,13 @@ export class CubeGeometry extends Geometry {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
//
|
|
38
|
+
// biome-ignore format: preserve layout
|
|
39
39
|
const CUBE_INDICES = new Uint16Array([
|
|
40
40
|
0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11, 12, 13,
|
|
41
41
|
14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23
|
|
42
42
|
]);
|
|
43
43
|
|
|
44
|
-
//
|
|
44
|
+
// biome-ignore format: preserve layout
|
|
45
45
|
const CUBE_POSITIONS = new Float32Array([
|
|
46
46
|
-1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1,
|
|
47
47
|
-1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1,
|
|
@@ -52,7 +52,7 @@ const CUBE_POSITIONS = new Float32Array([
|
|
|
52
52
|
]);
|
|
53
53
|
|
|
54
54
|
// TODO - could be Uint8
|
|
55
|
-
//
|
|
55
|
+
// biome-ignore format: preserve layout
|
|
56
56
|
const CUBE_NORMALS = new Float32Array([
|
|
57
57
|
// Front face
|
|
58
58
|
0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,
|
|
@@ -68,7 +68,7 @@ const CUBE_NORMALS = new Float32Array([
|
|
|
68
68
|
-1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0
|
|
69
69
|
]);
|
|
70
70
|
|
|
71
|
-
//
|
|
71
|
+
// biome-ignore format: preserve layout
|
|
72
72
|
const CUBE_TEX_COORDS = new Float32Array([
|
|
73
73
|
// Front face
|
|
74
74
|
0, 0, 1, 0, 1, 1, 0, 1,
|
|
@@ -85,7 +85,7 @@ const CUBE_TEX_COORDS = new Float32Array([
|
|
|
85
85
|
]);
|
|
86
86
|
|
|
87
87
|
// float4 position
|
|
88
|
-
//
|
|
88
|
+
// biome-ignore format: preserve layout
|
|
89
89
|
export const CUBE_NON_INDEXED_POSITIONS = new Float32Array([
|
|
90
90
|
1, -1, 1,
|
|
91
91
|
-1, -1, 1,
|
|
@@ -131,7 +131,7 @@ export const CUBE_NON_INDEXED_POSITIONS = new Float32Array([
|
|
|
131
131
|
]);
|
|
132
132
|
|
|
133
133
|
// float2 uv,
|
|
134
|
-
//
|
|
134
|
+
// biome-ignore format: preserve layout
|
|
135
135
|
export const CUBE_NON_INDEXED_TEX_COORDS = new Float32Array([
|
|
136
136
|
1, 1,
|
|
137
137
|
0, 1,
|
|
@@ -177,7 +177,7 @@ export const CUBE_NON_INDEXED_TEX_COORDS = new Float32Array([
|
|
|
177
177
|
]);
|
|
178
178
|
|
|
179
179
|
// float4 color
|
|
180
|
-
//
|
|
180
|
+
// biome-ignore format: preserve layout
|
|
181
181
|
export const CUBE_NON_INDEXED_COLORS = new Float32Array([
|
|
182
182
|
1, 0, 1, 1,
|
|
183
183
|
0, 0, 1, 1,
|
|
@@ -75,7 +75,9 @@ function tesselateIcosaHedron(props: IcoSphereGeometryProps) {
|
|
|
75
75
|
|
|
76
76
|
positions.push(xm, ym, zm);
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
const pointIndex = positions.length / 3 - 1;
|
|
79
|
+
pointMemo[key] = pointIndex;
|
|
80
|
+
return pointIndex;
|
|
79
81
|
};
|
|
80
82
|
})();
|
|
81
83
|
|
package/src/material/material.ts
CHANGED
|
@@ -94,11 +94,11 @@ export class Material<
|
|
|
94
94
|
])
|
|
95
95
|
) as {[P in keyof TModuleProps]?: ShaderModule[] extends never ? never : any};
|
|
96
96
|
this.shaderInputs = props.shaderInputs || new ShaderInputs<TModuleProps>(moduleMap);
|
|
97
|
-
this._uniformStore = new UniformStore(this.shaderInputs.modules);
|
|
97
|
+
this._uniformStore = new UniformStore(this.device, this.shaderInputs.modules);
|
|
98
98
|
|
|
99
99
|
for (const [moduleName, module] of Object.entries(this.shaderInputs.modules)) {
|
|
100
100
|
if (this.ownsModule(moduleName) && shaderModuleHasUniforms(module)) {
|
|
101
|
-
const uniformBuffer = this._uniformStore.getManagedUniformBuffer(
|
|
101
|
+
const uniformBuffer = this._uniformStore.getManagedUniformBuffer(moduleName);
|
|
102
102
|
this.bindings[`${moduleName}Uniforms`] = uniformBuffer;
|
|
103
103
|
}
|
|
104
104
|
}
|