@luma.gl/engine 9.0.0-alpha.15 → 9.0.0-alpha.16
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/key-frames.d.ts +1 -1
- package/dist/animation/key-frames.d.ts.map +1 -1
- package/dist/animation/key-frames.js +51 -72
- package/dist/animation/timeline.d.ts +4 -4
- package/dist/animation/timeline.d.ts.map +1 -1
- package/dist/animation/timeline.js +94 -131
- package/dist/animation-loop/animation-loop.d.ts +2 -3
- package/dist/animation-loop/animation-loop.d.ts.map +1 -1
- package/dist/animation-loop/animation-loop.js +414 -473
- package/dist/animation-loop/animation-props.d.ts +1 -2
- package/dist/animation-loop/animation-props.d.ts.map +1 -1
- package/dist/animation-loop/animation-props.js +0 -1
- package/dist/animation-loop/make-animation-loop.d.ts +1 -1
- package/dist/animation-loop/make-animation-loop.d.ts.map +1 -1
- package/dist/animation-loop/make-animation-loop.js +26 -31
- package/dist/animation-loop/render-loop.js +17 -7
- package/dist/bundle.js +2 -2
- package/dist/dist.min.js +31 -0
- package/dist/es5/animation/key-frames.js +84 -0
- package/dist/es5/animation/key-frames.js.map +1 -0
- package/dist/es5/animation/timeline.js +183 -0
- package/dist/es5/animation/timeline.js.map +1 -0
- package/dist/es5/animation-loop/animation-loop.js +534 -0
- package/dist/es5/animation-loop/animation-loop.js.map +1 -0
- package/dist/es5/animation-loop/animation-props.js +2 -0
- package/dist/es5/animation-loop/animation-props.js.map +1 -0
- package/dist/es5/animation-loop/make-animation-loop.js +53 -0
- package/dist/es5/animation-loop/make-animation-loop.js.map +1 -0
- package/dist/es5/animation-loop/render-loop.js +39 -0
- package/dist/es5/animation-loop/render-loop.js.map +1 -0
- package/dist/es5/bundle.js +6 -0
- package/dist/es5/bundle.js.map +1 -0
- package/dist/es5/geometries/cone-geometry.js +43 -0
- package/dist/es5/geometries/cone-geometry.js.map +1 -0
- package/dist/es5/geometries/cube-geometry.js +84 -0
- package/dist/es5/geometries/cube-geometry.js.map +1 -0
- package/dist/es5/geometries/cylinder-geometry.js +39 -0
- package/dist/es5/geometries/cylinder-geometry.js.map +1 -0
- package/dist/es5/geometries/ico-sphere-geometry.js +185 -0
- package/dist/es5/geometries/ico-sphere-geometry.js.map +1 -0
- package/dist/es5/geometries/plane-geometry.js +137 -0
- package/dist/es5/geometries/plane-geometry.js.map +1 -0
- package/dist/es5/geometries/sphere-geometry.js +120 -0
- package/dist/es5/geometries/sphere-geometry.js.map +1 -0
- package/dist/es5/geometries/truncated-cone-geometry.js +160 -0
- package/dist/es5/geometries/truncated-cone-geometry.js.map +1 -0
- package/dist/es5/geometry/geometry-table.js +2 -0
- package/dist/es5/geometry/geometry-table.js.map +1 -0
- package/dist/es5/geometry/geometry-utils.js +39 -0
- package/dist/es5/geometry/geometry-utils.js.map +1 -0
- package/dist/es5/geometry/geometry.js +150 -0
- package/dist/es5/geometry/geometry.js.map +1 -0
- package/dist/es5/geometry/primitive-utils.js +2 -0
- package/dist/es5/geometry/primitive-utils.js.map +1 -0
- package/dist/es5/index.js +112 -0
- package/dist/es5/index.js.map +1 -0
- package/dist/es5/lib/clip-space.js +2 -0
- package/dist/es5/lib/clip-space.js.map +1 -0
- package/dist/es5/lib/model-utils.js +52 -0
- package/dist/es5/lib/model-utils.js.map +1 -0
- package/dist/es5/lib/model.js +173 -0
- package/dist/es5/lib/model.js.map +1 -0
- package/dist/es5/lib/pipeline-factory.js +244 -0
- package/dist/es5/lib/pipeline-factory.js.map +1 -0
- package/dist/esm/animation/key-frames.js +57 -0
- package/dist/esm/animation/key-frames.js.map +1 -0
- package/dist/esm/animation/timeline.js +113 -0
- package/dist/esm/animation/timeline.js.map +1 -0
- package/dist/esm/animation-loop/animation-loop.js +367 -0
- package/dist/esm/animation-loop/animation-loop.js.map +1 -0
- package/dist/esm/animation-loop/animation-props.js +2 -0
- package/dist/esm/animation-loop/animation-props.js.map +1 -0
- package/dist/esm/animation-loop/make-animation-loop.js +28 -0
- package/dist/esm/animation-loop/make-animation-loop.js.map +1 -0
- package/dist/esm/animation-loop/render-loop.js +7 -0
- package/dist/esm/animation-loop/render-loop.js.map +1 -0
- package/dist/esm/bundle.js +4 -0
- package/dist/esm/bundle.js.map +1 -0
- package/dist/esm/geometries/cone-geometry.js +21 -0
- package/dist/esm/geometries/cone-geometry.js.map +1 -0
- package/dist/esm/geometries/cube-geometry.js +67 -0
- package/dist/esm/geometries/cube-geometry.js.map +1 -0
- package/dist/esm/geometries/cylinder-geometry.js +18 -0
- package/dist/esm/geometries/cylinder-geometry.js.map +1 -0
- package/dist/esm/geometries/ico-sphere-geometry.js +170 -0
- package/dist/esm/geometries/ico-sphere-geometry.js.map +1 -0
- package/dist/esm/geometries/plane-geometry.js +119 -0
- package/dist/esm/geometries/plane-geometry.js.map +1 -0
- package/dist/esm/geometries/sphere-geometry.js +102 -0
- package/dist/esm/geometries/sphere-geometry.js.map +1 -0
- package/dist/esm/geometries/truncated-cone-geometry.js +136 -0
- package/dist/esm/geometries/truncated-cone-geometry.js.map +1 -0
- package/dist/esm/geometry/geometry-table.js +2 -0
- package/dist/esm/geometry/geometry-table.js.map +1 -0
- package/dist/esm/geometry/geometry-utils.js +37 -0
- package/dist/esm/geometry/geometry-utils.js.map +1 -0
- package/dist/esm/geometry/geometry.js +119 -0
- package/dist/esm/geometry/geometry.js.map +1 -0
- package/dist/esm/geometry/primitive-utils.js +2 -0
- package/dist/esm/geometry/primitive-utils.js.map +1 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/clip-space.js +2 -0
- package/dist/esm/lib/clip-space.js.map +1 -0
- package/dist/esm/lib/model-utils.js +40 -0
- package/dist/esm/lib/model-utils.js.map +1 -0
- package/dist/esm/lib/model.js +146 -0
- package/dist/esm/lib/model.js.map +1 -0
- package/dist/esm/lib/pipeline-factory.js +180 -0
- package/dist/esm/lib/pipeline-factory.js.map +1 -0
- package/dist/geometries/cone-geometry.d.ts +1 -1
- package/dist/geometries/cone-geometry.d.ts.map +1 -1
- package/dist/geometries/cone-geometry.js +12 -17
- package/dist/geometries/cube-geometry.d.ts +1 -1
- package/dist/geometries/cube-geometry.d.ts.map +1 -1
- package/dist/geometries/cube-geometry.js +187 -56
- package/dist/geometries/cylinder-geometry.d.ts +1 -1
- package/dist/geometries/cylinder-geometry.d.ts.map +1 -1
- package/dist/geometries/cylinder-geometry.js +10 -14
- package/dist/geometries/ico-sphere-geometry.d.ts +1 -1
- package/dist/geometries/ico-sphere-geometry.d.ts.map +1 -1
- package/dist/geometries/ico-sphere-geometry.js +141 -170
- package/dist/geometries/plane-geometry.d.ts +1 -1
- package/dist/geometries/plane-geometry.d.ts.map +1 -1
- package/dist/geometries/plane-geometry.js +93 -121
- package/dist/geometries/sphere-geometry.d.ts +1 -1
- package/dist/geometries/sphere-geometry.d.ts.map +1 -1
- package/dist/geometries/sphere-geometry.js +76 -100
- package/dist/geometries/truncated-cone-geometry.d.ts +1 -1
- package/dist/geometries/truncated-cone-geometry.d.ts.map +1 -1
- package/dist/geometries/truncated-cone-geometry.js +104 -131
- package/dist/geometry/geometry-table.d.ts +1 -1
- package/dist/geometry/geometry-table.d.ts.map +1 -1
- package/dist/geometry/geometry-table.js +0 -1
- package/dist/geometry/geometry-utils.js +22 -41
- package/dist/geometry/geometry.d.ts +4 -4
- package/dist/geometry/geometry.d.ts.map +1 -1
- package/dist/geometry/geometry.js +96 -142
- package/dist/geometry/primitive-utils.js +30 -1
- package/dist/index.js +20 -16
- package/dist/lib/clip-space.js +50 -1
- package/dist/lib/model-utils.js +97 -29
- package/dist/lib/model.d.ts +1 -1
- package/dist/lib/model.d.ts.map +1 -1
- package/dist/lib/model.js +122 -166
- package/dist/lib/pipeline-factory.d.ts +3 -3
- package/dist/lib/pipeline-factory.d.ts.map +1 -1
- package/dist/lib/pipeline-factory.js +136 -204
- package/package.json +11 -10
- package/dist/animation/key-frames.js.map +0 -1
- package/dist/animation/timeline.js.map +0 -1
- package/dist/animation-loop/animation-loop.js.map +0 -1
- package/dist/animation-loop/animation-props.js.map +0 -1
- package/dist/animation-loop/make-animation-loop.js.map +0 -1
- package/dist/animation-loop/render-loop.js.map +0 -1
- package/dist/bundle.js.map +0 -1
- package/dist/geometries/cone-geometry.js.map +0 -1
- package/dist/geometries/cube-geometry.js.map +0 -1
- package/dist/geometries/cylinder-geometry.js.map +0 -1
- package/dist/geometries/ico-sphere-geometry.js.map +0 -1
- package/dist/geometries/plane-geometry.js.map +0 -1
- package/dist/geometries/sphere-geometry.js.map +0 -1
- package/dist/geometries/truncated-cone-geometry.js.map +0 -1
- package/dist/geometry/geometry-table.js.map +0 -1
- package/dist/geometry/geometry-utils.js.map +0 -1
- package/dist/geometry/geometry.js.map +0 -1
- package/dist/geometry/primitive-utils.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/clip-space.js.map +0 -1
- package/dist/lib/model-utils.js.map +0 -1
- package/dist/lib/model.js.map +0 -1
- package/dist/lib/pipeline-factory.js.map +0 -1
package/dist/lib/model.js
CHANGED
|
@@ -1,182 +1,138 @@
|
|
|
1
|
-
|
|
1
|
+
// luma.gl, MIT license
|
|
2
2
|
import { RenderPipeline } from '@luma.gl/api';
|
|
3
|
-
import { getAttributeBuffersFromGeometry, getIndexBufferFromGeometry } from './model-utils';
|
|
4
|
-
import { PipelineFactory } from './pipeline-factory';
|
|
5
|
-
const DEFAULT_MODEL_PROPS = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { getAttributeBuffersFromGeometry, getIndexBufferFromGeometry } from './model-utils.js';
|
|
4
|
+
import { PipelineFactory } from './pipeline-factory.js';
|
|
5
|
+
const DEFAULT_MODEL_PROPS = {
|
|
6
|
+
...RenderPipeline._DEFAULT_PROPS,
|
|
7
|
+
vs: null,
|
|
8
|
+
fs: null,
|
|
9
|
+
id: 'unnamed',
|
|
10
|
+
handle: undefined,
|
|
11
|
+
userData: {},
|
|
12
|
+
modules: [],
|
|
13
|
+
moduleSettings: {},
|
|
14
|
+
geometry: null
|
|
14
15
|
};
|
|
16
|
+
/** v9 API */
|
|
15
17
|
export class Model {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
18
|
+
constructor(device, props) {
|
|
19
|
+
this.fs = null;
|
|
20
|
+
this.props = { ...DEFAULT_MODEL_PROPS, ...props };
|
|
21
|
+
props = this.props;
|
|
22
|
+
this.id = this.props.id;
|
|
23
|
+
this.device = device;
|
|
24
|
+
// Create the pipeline
|
|
25
|
+
if (!props.vs) {
|
|
26
|
+
throw new Error('no vertex shader');
|
|
27
|
+
}
|
|
28
|
+
this.vs = getShaderSource(this.device, props.vs);
|
|
29
|
+
if (props.fs) {
|
|
30
|
+
this.fs = getShaderSource(this.device, props.fs);
|
|
31
|
+
}
|
|
32
|
+
this.vertexCount = this.props.vertexCount;
|
|
33
|
+
this.topology = this.props.topology;
|
|
34
|
+
if (this.props.geometry) {
|
|
35
|
+
this.vertexCount = this.props.geometry.vertexCount;
|
|
36
|
+
this.topology = this.props.geometry.topology || 'triangle-list';
|
|
37
|
+
}
|
|
38
|
+
const pipelineFactory = PipelineFactory.getDefaultPipelineFactory(this.device);
|
|
39
|
+
const { pipeline, getUniforms } = pipelineFactory.createRenderPipeline({
|
|
40
|
+
...this.props,
|
|
41
|
+
vs: this.vs,
|
|
42
|
+
fs: this.fs,
|
|
43
|
+
topology: this.topology,
|
|
44
|
+
parameters: props.parameters,
|
|
45
|
+
layout: props.layout
|
|
46
|
+
});
|
|
47
|
+
this.pipeline = pipeline;
|
|
48
|
+
this._getModuleUniforms = getUniforms;
|
|
49
|
+
if (this.props.geometry) {
|
|
50
|
+
this._setGeometry(this.props.geometry);
|
|
51
|
+
}
|
|
52
|
+
this.setUniforms(this._getModuleUniforms()); // Get all default module uniforms
|
|
53
|
+
this.setProps(this.props);
|
|
44
54
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (props.fs) {
|
|
49
|
-
this.fs = getShaderSource(this.device, props.fs);
|
|
55
|
+
destroy() {
|
|
56
|
+
this.pipeline.destroy();
|
|
50
57
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
draw(renderPass) {
|
|
59
|
+
this.pipeline.draw({
|
|
60
|
+
renderPass,
|
|
61
|
+
vertexCount: this.vertexCount,
|
|
62
|
+
instanceCount: this.props.instanceCount
|
|
63
|
+
});
|
|
64
|
+
return this;
|
|
58
65
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
setProps(props) {
|
|
67
|
+
if (props.indices) {
|
|
68
|
+
this.setIndexBuffer(props.indices);
|
|
69
|
+
}
|
|
70
|
+
if (props.attributes) {
|
|
71
|
+
this.setAttributes(props.attributes);
|
|
72
|
+
}
|
|
73
|
+
if (props.bindings) {
|
|
74
|
+
this.setBindings(props.bindings);
|
|
75
|
+
}
|
|
76
|
+
if (props.uniforms) {
|
|
77
|
+
this.setUniforms(props.uniforms);
|
|
78
|
+
}
|
|
79
|
+
if (props.moduleSettings) {
|
|
80
|
+
this.updateModuleSettings(props.moduleSettings);
|
|
81
|
+
}
|
|
82
|
+
return this;
|
|
76
83
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
destroy() {
|
|
83
|
-
this.pipeline.destroy();
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
draw(renderPass) {
|
|
87
|
-
this.pipeline.draw({
|
|
88
|
-
renderPass,
|
|
89
|
-
vertexCount: this.vertexCount,
|
|
90
|
-
instanceCount: this.props.instanceCount
|
|
91
|
-
});
|
|
92
|
-
return this;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
setProps(props) {
|
|
96
|
-
if (props.indices) {
|
|
97
|
-
this.setIndexBuffer(props.indices);
|
|
84
|
+
updateModuleSettings(props) {
|
|
85
|
+
const uniforms = this._getModuleUniforms(props);
|
|
86
|
+
this.setUniforms(uniforms);
|
|
87
|
+
return this;
|
|
98
88
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
setIndexBuffer(indices) {
|
|
90
|
+
this.pipeline.setIndexBuffer(indices);
|
|
91
|
+
// this._indices = indices;
|
|
92
|
+
return this;
|
|
102
93
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
94
|
+
setAttributes(attributes) {
|
|
95
|
+
this.pipeline.setAttributes(attributes);
|
|
96
|
+
Object.assign(this.props.attributes, attributes);
|
|
97
|
+
return this;
|
|
106
98
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
99
|
+
/** Set the bindings */
|
|
100
|
+
setBindings(bindings) {
|
|
101
|
+
this.pipeline.setBindings(bindings);
|
|
102
|
+
Object.assign(this.props.bindings, bindings);
|
|
103
|
+
return this;
|
|
110
104
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
setUniforms(uniforms) {
|
|
106
|
+
this.pipeline.setUniforms(uniforms);
|
|
107
|
+
Object.assign(this.props.uniforms, uniforms);
|
|
108
|
+
return this;
|
|
114
109
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return this;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
setIndexBuffer(indices) {
|
|
127
|
-
this.pipeline.setIndexBuffer(indices);
|
|
128
|
-
return this;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
setAttributes(attributes) {
|
|
132
|
-
this.pipeline.setAttributes(attributes);
|
|
133
|
-
Object.assign(this.props.attributes, attributes);
|
|
134
|
-
return this;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
setBindings(bindings) {
|
|
138
|
-
this.pipeline.setBindings(bindings);
|
|
139
|
-
Object.assign(this.props.bindings, bindings);
|
|
140
|
-
return this;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
setUniforms(uniforms) {
|
|
144
|
-
this.pipeline.setUniforms(uniforms);
|
|
145
|
-
Object.assign(this.props.uniforms, uniforms);
|
|
146
|
-
return this;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
_setGeometry(geometry) {
|
|
150
|
-
const geometryBuffers = getAttributeBuffersFromGeometry(this.device, geometry);
|
|
151
|
-
this.setAttributes(geometryBuffers);
|
|
152
|
-
const indexBuffer = getIndexBufferFromGeometry(this.device, geometry);
|
|
153
|
-
|
|
154
|
-
if (indexBuffer) {
|
|
155
|
-
this.setIndexBuffer(indexBuffer);
|
|
110
|
+
_setGeometry(geometry) {
|
|
111
|
+
// this._deleteGeometryBuffers();
|
|
112
|
+
const geometryBuffers = getAttributeBuffersFromGeometry(this.device, geometry);
|
|
113
|
+
this.setAttributes(geometryBuffers);
|
|
114
|
+
const indexBuffer = getIndexBufferFromGeometry(this.device, geometry);
|
|
115
|
+
if (indexBuffer) {
|
|
116
|
+
this.setIndexBuffer(indexBuffer);
|
|
117
|
+
}
|
|
156
118
|
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
119
|
}
|
|
160
|
-
|
|
120
|
+
/** Create a shader from the different overloads */
|
|
161
121
|
function getShaderSource(device, shader) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
throw new Error('WebGL does not support WGSL shaders');
|
|
180
|
-
}
|
|
122
|
+
// TODO - detect WGSL/GLSL and throw an error if not supported
|
|
123
|
+
if (typeof shader === 'string') {
|
|
124
|
+
return shader;
|
|
125
|
+
}
|
|
126
|
+
switch (device.info.type) {
|
|
127
|
+
case 'webgpu':
|
|
128
|
+
if (shader?.wgsl) {
|
|
129
|
+
return shader.wgsl;
|
|
130
|
+
}
|
|
131
|
+
throw new Error('WebGPU does not support GLSL shaders');
|
|
132
|
+
default:
|
|
133
|
+
if (shader?.glsl) {
|
|
134
|
+
return shader.glsl;
|
|
135
|
+
}
|
|
136
|
+
throw new Error('WebGL does not support WGSL shaders');
|
|
137
|
+
}
|
|
181
138
|
}
|
|
182
|
-
//# sourceMappingURL=model.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RenderPipelineParameters, PrimitiveTopology, ShaderLayout } from '@luma.gl/api';
|
|
2
2
|
import { Device, RenderPipeline } from '@luma.gl/api/';
|
|
3
3
|
import type { ShaderModule } from '@luma.gl/shadertools';
|
|
4
|
-
export
|
|
4
|
+
export type GetRenderPipelineOptions = {
|
|
5
5
|
vs: string;
|
|
6
6
|
fs: string | null;
|
|
7
7
|
topology: PrimitiveTopology;
|
|
@@ -14,7 +14,7 @@ export declare type GetRenderPipelineOptions = {
|
|
|
14
14
|
varyings?: string[];
|
|
15
15
|
bufferMode?: number;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type GetComputePipelineOptions = {
|
|
18
18
|
cs: string;
|
|
19
19
|
parameters?: RenderPipelineParameters;
|
|
20
20
|
modules?: ShaderModule[];
|
|
@@ -24,7 +24,7 @@ export declare type GetComputePipelineOptions = {
|
|
|
24
24
|
varyings?: string[];
|
|
25
25
|
bufferMode?: number;
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
type GetUniformsFunc = (props?: Record<string, any>) => Record<string, any>;
|
|
28
28
|
/** Efficiently create shared pipelines with varying parameters */
|
|
29
29
|
export declare class PipelineFactory {
|
|
30
30
|
readonly device: Device;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline-factory.d.ts","sourceRoot":"","sources":["../../src/lib/pipeline-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,wBAAwB,EAAE,iBAAiB,EAAE,YAAY,EAAC,MAAM,cAAc,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAE,cAAc,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGzD,
|
|
1
|
+
{"version":3,"file":"pipeline-factory.d.ts","sourceRoot":"","sources":["../../src/lib/pipeline-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,wBAAwB,EAAE,iBAAiB,EAAE,YAAY,EAAC,MAAM,cAAc,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAE,cAAc,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGzD,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC7B,UAAU,CAAC,EAAE,wBAAwB,CAAC;IAEtC,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAC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