@luma.gl/engine 9.0.0-alpha.16 → 9.0.0-alpha.17
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 +55 -54
- package/dist/animation/key-frames.js.map +1 -0
- package/dist/animation/timeline.d.ts +4 -4
- package/dist/animation/timeline.d.ts.map +1 -1
- package/dist/animation/timeline.js +101 -94
- package/dist/animation/timeline.js.map +1 -0
- package/dist/animation-loop/animation-loop.d.ts +4 -2
- package/dist/animation-loop/animation-loop.d.ts.map +1 -1
- package/dist/animation-loop/animation-loop.js +358 -414
- package/dist/animation-loop/animation-loop.js.map +1 -0
- package/dist/animation-loop/animation-props.d.ts +3 -1
- package/dist/animation-loop/animation-props.d.ts.map +1 -1
- package/dist/animation-loop/animation-props.js +1 -0
- package/dist/animation-loop/animation-props.js.map +1 -0
- 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 +25 -26
- package/dist/animation-loop/make-animation-loop.js.map +1 -0
- package/dist/animation-loop/render-loop.js +5 -17
- package/dist/animation-loop/render-loop.js.map +1 -0
- package/dist/dist.dev.js +5240 -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 +18 -12
- package/dist/geometries/cone-geometry.js.map +1 -0
- 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 +60 -187
- package/dist/geometries/cube-geometry.js.map +1 -0
- 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 +15 -10
- package/dist/geometries/cylinder-geometry.js.map +1 -0
- 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 +160 -141
- package/dist/geometries/ico-sphere-geometry.js.map +1 -0
- 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 +111 -93
- package/dist/geometries/plane-geometry.js.map +1 -0
- 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 +95 -76
- package/dist/geometries/sphere-geometry.js.map +1 -0
- 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 +126 -105
- package/dist/geometries/truncated-cone-geometry.js.map +1 -0
- 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 +1 -0
- package/dist/geometry/geometry-table.js.map +1 -0
- package/dist/geometry/geometry-utils.js +32 -22
- package/dist/geometry/geometry-utils.js.map +1 -0
- package/dist/geometry/geometry.d.ts +4 -4
- package/dist/geometry/geometry.d.ts.map +1 -1
- package/dist/geometry/geometry.js +109 -96
- package/dist/geometry/geometry.js.map +1 -0
- package/dist/geometry/primitive-utils.js +1 -30
- package/dist/geometry/primitive-utils.js.map +1 -0
- package/dist/index.cjs +2222 -0
- package/dist/index.js +16 -20
- package/dist/index.js.map +1 -0
- package/dist/lib/clip-space.js +1 -50
- package/dist/lib/clip-space.js.map +1 -0
- package/dist/lib/model-utils.js +28 -101
- package/dist/lib/model-utils.js.map +1 -0
- package/dist/lib/model.d.ts +1 -1
- package/dist/lib/model.d.ts.map +1 -1
- package/dist/lib/model.js +129 -121
- package/dist/lib/model.js.map +1 -0
- 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 +165 -136
- package/dist/lib/pipeline-factory.js.map +1 -0
- package/dist.min.js +245 -0
- package/package.json +22 -13
- package/src/.DS_Store +0 -0
- package/src/animation/timeline.ts +1 -1
- package/src/animation-loop/animation-loop.ts +5 -5
- package/src/animation-loop/make-animation-loop.ts +2 -1
- package/src/geometry/geometry.ts +2 -2
- package/src/lib/pipeline-factory.ts +1 -1
- package/dist/bundle.d.ts +0 -2
- package/dist/bundle.d.ts.map +0 -1
- package/dist/bundle.js +0 -5
- package/dist/dist.min.js +0 -31
- package/dist/es5/animation/key-frames.js +0 -84
- package/dist/es5/animation/key-frames.js.map +0 -1
- package/dist/es5/animation/timeline.js +0 -183
- package/dist/es5/animation/timeline.js.map +0 -1
- package/dist/es5/animation-loop/animation-loop.js +0 -534
- package/dist/es5/animation-loop/animation-loop.js.map +0 -1
- package/dist/es5/animation-loop/animation-props.js +0 -2
- package/dist/es5/animation-loop/animation-props.js.map +0 -1
- package/dist/es5/animation-loop/make-animation-loop.js +0 -53
- package/dist/es5/animation-loop/make-animation-loop.js.map +0 -1
- package/dist/es5/animation-loop/render-loop.js +0 -39
- package/dist/es5/animation-loop/render-loop.js.map +0 -1
- package/dist/es5/bundle.js +0 -6
- package/dist/es5/bundle.js.map +0 -1
- package/dist/es5/geometries/cone-geometry.js +0 -43
- package/dist/es5/geometries/cone-geometry.js.map +0 -1
- package/dist/es5/geometries/cube-geometry.js +0 -84
- package/dist/es5/geometries/cube-geometry.js.map +0 -1
- package/dist/es5/geometries/cylinder-geometry.js +0 -39
- package/dist/es5/geometries/cylinder-geometry.js.map +0 -1
- package/dist/es5/geometries/ico-sphere-geometry.js +0 -185
- package/dist/es5/geometries/ico-sphere-geometry.js.map +0 -1
- package/dist/es5/geometries/plane-geometry.js +0 -137
- package/dist/es5/geometries/plane-geometry.js.map +0 -1
- package/dist/es5/geometries/sphere-geometry.js +0 -120
- package/dist/es5/geometries/sphere-geometry.js.map +0 -1
- package/dist/es5/geometries/truncated-cone-geometry.js +0 -160
- package/dist/es5/geometries/truncated-cone-geometry.js.map +0 -1
- package/dist/es5/geometry/geometry-table.js +0 -2
- package/dist/es5/geometry/geometry-table.js.map +0 -1
- package/dist/es5/geometry/geometry-utils.js +0 -39
- package/dist/es5/geometry/geometry-utils.js.map +0 -1
- package/dist/es5/geometry/geometry.js +0 -150
- package/dist/es5/geometry/geometry.js.map +0 -1
- package/dist/es5/geometry/primitive-utils.js +0 -2
- package/dist/es5/geometry/primitive-utils.js.map +0 -1
- package/dist/es5/index.js +0 -112
- package/dist/es5/index.js.map +0 -1
- package/dist/es5/lib/clip-space.js +0 -2
- package/dist/es5/lib/clip-space.js.map +0 -1
- package/dist/es5/lib/model-utils.js +0 -52
- package/dist/es5/lib/model-utils.js.map +0 -1
- package/dist/es5/lib/model.js +0 -173
- package/dist/es5/lib/model.js.map +0 -1
- package/dist/es5/lib/pipeline-factory.js +0 -244
- package/dist/es5/lib/pipeline-factory.js.map +0 -1
- package/dist/esm/animation/key-frames.js +0 -57
- package/dist/esm/animation/key-frames.js.map +0 -1
- package/dist/esm/animation/timeline.js +0 -113
- package/dist/esm/animation/timeline.js.map +0 -1
- package/dist/esm/animation-loop/animation-loop.js +0 -367
- package/dist/esm/animation-loop/animation-loop.js.map +0 -1
- package/dist/esm/animation-loop/animation-props.js +0 -2
- package/dist/esm/animation-loop/animation-props.js.map +0 -1
- package/dist/esm/animation-loop/make-animation-loop.js +0 -28
- package/dist/esm/animation-loop/make-animation-loop.js.map +0 -1
- package/dist/esm/animation-loop/render-loop.js +0 -7
- package/dist/esm/animation-loop/render-loop.js.map +0 -1
- package/dist/esm/bundle.js +0 -4
- package/dist/esm/bundle.js.map +0 -1
- package/dist/esm/geometries/cone-geometry.js +0 -21
- package/dist/esm/geometries/cone-geometry.js.map +0 -1
- package/dist/esm/geometries/cube-geometry.js +0 -67
- package/dist/esm/geometries/cube-geometry.js.map +0 -1
- package/dist/esm/geometries/cylinder-geometry.js +0 -18
- package/dist/esm/geometries/cylinder-geometry.js.map +0 -1
- package/dist/esm/geometries/ico-sphere-geometry.js +0 -170
- package/dist/esm/geometries/ico-sphere-geometry.js.map +0 -1
- package/dist/esm/geometries/plane-geometry.js +0 -119
- package/dist/esm/geometries/plane-geometry.js.map +0 -1
- package/dist/esm/geometries/sphere-geometry.js +0 -102
- package/dist/esm/geometries/sphere-geometry.js.map +0 -1
- package/dist/esm/geometries/truncated-cone-geometry.js +0 -136
- package/dist/esm/geometries/truncated-cone-geometry.js.map +0 -1
- package/dist/esm/geometry/geometry-table.js +0 -2
- package/dist/esm/geometry/geometry-table.js.map +0 -1
- package/dist/esm/geometry/geometry-utils.js +0 -37
- package/dist/esm/geometry/geometry-utils.js.map +0 -1
- package/dist/esm/geometry/geometry.js +0 -119
- package/dist/esm/geometry/geometry.js.map +0 -1
- package/dist/esm/geometry/primitive-utils.js +0 -2
- package/dist/esm/geometry/primitive-utils.js.map +0 -1
- package/dist/esm/index.js +0 -16
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lib/clip-space.js +0 -2
- package/dist/esm/lib/clip-space.js.map +0 -1
- package/dist/esm/lib/model-utils.js +0 -40
- package/dist/esm/lib/model-utils.js.map +0 -1
- package/dist/esm/lib/model.js +0 -146
- package/dist/esm/lib/model.js.map +0 -1
- package/dist/esm/lib/pipeline-factory.js +0 -180
- package/dist/esm/lib/pipeline-factory.js.map +0 -1
- package/src/bundle.ts +0 -4
package/dist/index.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
|
|
17
|
-
export { IcoSphereGeometry } from './geometries/ico-sphere-geometry.js';
|
|
18
|
-
export { PlaneGeometry } from './geometries/plane-geometry.js';
|
|
19
|
-
export { SphereGeometry } from './geometries/sphere-geometry.js';
|
|
20
|
-
export { TruncatedConeGeometry } from './geometries/truncated-cone-geometry.js';
|
|
1
|
+
export { Timeline } from "./animation/timeline.js";
|
|
2
|
+
export { KeyFrames } from "./animation/key-frames.js";
|
|
3
|
+
export { AnimationLoopTemplate } from "./animation-loop/render-loop.js";
|
|
4
|
+
export { AnimationLoop } from "./animation-loop/animation-loop.js";
|
|
5
|
+
export { makeAnimationLoop } from "./animation-loop/make-animation-loop.js";
|
|
6
|
+
export { Model } from "./lib/model.js";
|
|
7
|
+
export { PipelineFactory } from "./lib/pipeline-factory.js";
|
|
8
|
+
export { default as Geometry } from "./geometry/geometry.js";
|
|
9
|
+
export { ConeGeometry } from "./geometries/cone-geometry.js";
|
|
10
|
+
export { CubeGeometry } from "./geometries/cube-geometry.js";
|
|
11
|
+
export { CylinderGeometry } from "./geometries/cylinder-geometry.js";
|
|
12
|
+
export { IcoSphereGeometry } from "./geometries/ico-sphere-geometry.js";
|
|
13
|
+
export { PlaneGeometry } from "./geometries/plane-geometry.js";
|
|
14
|
+
export { SphereGeometry } from "./geometries/sphere-geometry.js";
|
|
15
|
+
export { TruncatedConeGeometry } from "./geometries/truncated-cone-geometry.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["Timeline","KeyFrames","AnimationLoopTemplate","AnimationLoop","makeAnimationLoop","Model","PipelineFactory","default","Geometry","ConeGeometry","CubeGeometry","CylinderGeometry","IcoSphereGeometry","PlaneGeometry","SphereGeometry","TruncatedConeGeometry"],"sources":["../src/index.ts"],"sourcesContent":["// luma.gl Engine API\n\n// Animation\nexport {Timeline} from './animation/timeline';\nexport {KeyFrames} from './animation/key-frames';\nexport type {AnimationProps} from './animation-loop/animation-props';\n\nexport {AnimationLoopTemplate} from './animation-loop/render-loop';\n\nexport type {AnimationLoopProps} from './animation-loop/animation-loop';\nexport {AnimationLoop} from './animation-loop/animation-loop';\n\nexport type {MakeAnimationLoopProps} from './animation-loop/make-animation-loop';\nexport {makeAnimationLoop} from './animation-loop/make-animation-loop';\n\nexport type {ModelProps} from './lib/model';\nexport {Model} from './lib/model';\n\nexport {PipelineFactory} from './lib/pipeline-factory';\n\n// Utils\n// export {default as ClipSpace} from './lib/clip-space';\n\n// Geometries\nexport {default as Geometry} from './geometry/geometry';\n\n// Primitives\nexport type {ConeGeometryProps} from './geometries/cone-geometry';\nexport {ConeGeometry} from './geometries/cone-geometry';\nexport type {CubeGeometryProps} from './geometries/cube-geometry';\nexport {CubeGeometry} from './geometries/cube-geometry';\nexport type {CylinderGeometryProps} from './geometries/cylinder-geometry';\nexport {CylinderGeometry} from './geometries/cylinder-geometry';\nexport type {IcoSphereGeometryProps} from './geometries/ico-sphere-geometry';\nexport {IcoSphereGeometry} from './geometries/ico-sphere-geometry';\nexport type {PlaneGeometryProps} from './geometries/plane-geometry';\nexport {PlaneGeometry} from './geometries/plane-geometry';\nexport type {SphereGeometryProps} from './geometries/sphere-geometry';\nexport {SphereGeometry} from './geometries/sphere-geometry';\nexport type {TruncatedConeGeometryProps} from './geometries/truncated-cone-geometry';\nexport {TruncatedConeGeometry} from './geometries/truncated-cone-geometry';\n\n"],"mappings":"SAGQA,QAAQ;AAAA,SACRC,SAAS;AAAA,SAGTC,qBAAqB;AAAA,SAGrBC,aAAa;AAAA,SAGbC,iBAAiB;AAAA,SAGjBC,KAAK;AAAA,SAELC,eAAe;AAAA,SAMfC,OAAO,IAAIC,QAAQ;AAAA,SAInBC,YAAY;AAAA,SAEZC,YAAY;AAAA,SAEZC,gBAAgB;AAAA,SAEhBC,iBAAiB;AAAA,SAEjBC,aAAa;AAAA,SAEbC,cAAc;AAAA,SAEdC,qBAAqB"}
|
package/dist/lib/clip-space.js
CHANGED
|
@@ -1,51 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// ClipSpace
|
|
3
|
-
/*
|
|
4
|
-
import GL from '@luma.gl/constants';
|
|
5
|
-
import Model, {ModelProps} from './model.js';
|
|
6
|
-
import Geometry from '../geometry/geometry.js';
|
|
7
1
|
|
|
8
|
-
|
|
9
|
-
attribute vec2 aClipSpacePosition;
|
|
10
|
-
attribute vec2 aTexCoord;
|
|
11
|
-
attribute vec2 aCoordinate;
|
|
12
|
-
|
|
13
|
-
varying vec2 position;
|
|
14
|
-
varying vec2 coordinate;
|
|
15
|
-
varying vec2 uv;
|
|
16
|
-
|
|
17
|
-
void main(void) {
|
|
18
|
-
gl_Position = vec4(aClipSpacePosition, 0., 1.);
|
|
19
|
-
position = aClipSpacePosition;
|
|
20
|
-
coordinate = aCoordinate;
|
|
21
|
-
uv = aTexCoord;
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
/* eslint-disable indent, no-multi-spaces *
|
|
26
|
-
const POSITIONS = [-1, -1, 1, -1, -1, 1, 1, 1];
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export default class ClipSpace extends Model {
|
|
30
|
-
constructor(gl: WebGLRenderingContext, opts?: ModelProps) {
|
|
31
|
-
const TEX_COORDS = POSITIONS.map((coord) => (coord === -1 ? 0 : coord));
|
|
32
|
-
|
|
33
|
-
super(
|
|
34
|
-
gl,
|
|
35
|
-
Object.assign({}, opts, {
|
|
36
|
-
vs: CLIPSPACE_VERTEX_SHADER,
|
|
37
|
-
geometry: new Geometry({
|
|
38
|
-
drawMode: GL.TRIANGLE_STRIP,
|
|
39
|
-
vertexCount: 4,
|
|
40
|
-
attributes: {
|
|
41
|
-
aClipSpacePosition: {size: 2, value: new Float32Array(POSITIONS)},
|
|
42
|
-
aTexCoord: {size: 2, value: new Float32Array(TEX_COORDS)},
|
|
43
|
-
aCoordinate: {size: 2, value: new Float32Array(TEX_COORDS)}
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
})
|
|
47
|
-
);
|
|
48
|
-
this.setVertexCount(4);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
*/
|
|
2
|
+
//# sourceMappingURL=clip-space.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clip-space.js","names":[],"sources":["../../src/lib/clip-space.ts"],"sourcesContent":["\n// ClipSpace\n/*\nimport GL from '@luma.gl/constants';\nimport Model, {ModelProps} from './model';\nimport Geometry from '../geometry/geometry';\n\nconst CLIPSPACE_VERTEX_SHADER = glsl`\\\nattribute vec2 aClipSpacePosition;\nattribute vec2 aTexCoord;\nattribute vec2 aCoordinate;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main(void) {\n gl_Position = vec4(aClipSpacePosition, 0., 1.);\n position = aClipSpacePosition;\n coordinate = aCoordinate;\n uv = aTexCoord;\n}\n`;\n\n/* eslint-disable indent, no-multi-spaces *\nconst POSITIONS = [-1, -1, 1, -1, -1, 1, 1, 1];\n\n\nexport default class ClipSpace extends Model {\n constructor(gl: WebGLRenderingContext, opts?: ModelProps) {\n const TEX_COORDS = POSITIONS.map((coord) => (coord === -1 ? 0 : coord));\n\n super(\n gl,\n Object.assign({}, opts, {\n vs: CLIPSPACE_VERTEX_SHADER,\n geometry: new Geometry({\n drawMode: GL.TRIANGLE_STRIP,\n vertexCount: 4,\n attributes: {\n aClipSpacePosition: {size: 2, value: new Float32Array(POSITIONS)},\n aTexCoord: {size: 2, value: new Float32Array(TEX_COORDS)},\n aCoordinate: {size: 2, value: new Float32Array(TEX_COORDS)}\n }\n })\n })\n );\n this.setVertexCount(4);\n }\n}\n*/"],"mappings":""}
|
package/dist/lib/model-utils.js
CHANGED
|
@@ -1,113 +1,40 @@
|
|
|
1
1
|
import { Buffer, assert } from '@luma.gl/api';
|
|
2
|
-
// Support for mapping new geometries with glTF attribute names to "classic" luma.gl shader names
|
|
3
2
|
const GLTF_TO_LUMA_ATTRIBUTE_MAP = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
POSITION: 'positions',
|
|
4
|
+
NORMAL: 'normals',
|
|
5
|
+
COLOR_0: 'colors',
|
|
6
|
+
TEXCOORD_0: 'texCoords',
|
|
7
|
+
TEXCOORD_1: 'texCoords1',
|
|
8
|
+
TEXCOORD_2: 'texCoords2'
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
export function getIndexBufferFromGeometry(device, geometry) {
|
|
11
|
+
if (!geometry.indices) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
const data = geometry.indices.value || geometry.indices;
|
|
15
|
+
assert(data instanceof Uint16Array || data instanceof Uint32Array, 'attribute array for "indices" must be of integer type');
|
|
16
|
+
return device.createBuffer({
|
|
17
|
+
usage: Buffer.INDEX,
|
|
18
|
+
data
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export function getAttributeBuffersFromGeometry(device, geometry) {
|
|
22
|
+
const buffers = {};
|
|
16
23
|
for (const [name, attribute] of Object.entries(geometry.attributes)) {
|
|
17
24
|
const remappedName = mapAttributeName(name);
|
|
18
|
-
|
|
19
|
-
if (attribute.constant) {
|
|
25
|
+
if (attribute !== null && attribute !== void 0 && attribute.constant) {
|
|
20
26
|
throw new Error('constant attributes not supported');
|
|
21
27
|
} else {
|
|
22
|
-
const typedArray = attribute.value;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
inferAttributeAccessor(name, accessor);
|
|
28
|
+
const typedArray = attribute === null || attribute === void 0 ? void 0 : attribute.value;
|
|
29
|
+
buffers[remappedName] = device.createBuffer({
|
|
30
|
+
data: typedArray,
|
|
31
|
+
id: "".concat(remappedName, "-buffer")
|
|
32
|
+
});
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export class Table {
|
|
34
|
-
length: number;
|
|
35
|
-
// columns: Record<string, TypedArray> = {};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export class GPUTable {
|
|
39
|
-
length: number;
|
|
40
|
-
columns: Record<string, Buffer> = {};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function convertTableToGPUTable(table: Table) {
|
|
44
|
-
// for (const ) {}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export function renameTableColumns(table: Table, map: (name: string) => string) {
|
|
48
|
-
const newColumns = table.columns.reduce()
|
|
49
|
-
table.clone();
|
|
50
|
-
}
|
|
51
|
-
*/
|
|
52
|
-
export function getIndexBufferFromGeometry(device, geometry) {
|
|
53
|
-
if (!geometry.indices) {
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
56
|
-
// @ts-expect-error
|
|
57
|
-
const data = geometry.indices.value || geometry.indices;
|
|
58
|
-
assert(data instanceof Uint16Array || data instanceof Uint32Array, 'attribute array for "indices" must be of integer type');
|
|
59
|
-
return device.createBuffer({ usage: Buffer.INDEX, data });
|
|
60
|
-
}
|
|
61
|
-
export function getAttributeBuffersFromGeometry(device, geometry) {
|
|
62
|
-
const buffers = {};
|
|
63
|
-
for (const [name, attribute] of Object.entries(geometry.attributes)) {
|
|
64
|
-
const remappedName = mapAttributeName(name);
|
|
65
|
-
if (attribute?.constant) {
|
|
66
|
-
throw new Error('constant attributes not supported');
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
const typedArray = attribute?.value;
|
|
70
|
-
buffers[remappedName] = device.createBuffer({ data: typedArray, id: `${remappedName}-buffer` });
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return buffers;
|
|
35
|
+
return buffers;
|
|
74
36
|
}
|
|
75
37
|
function mapAttributeName(name) {
|
|
76
|
-
|
|
77
|
-
return GLTF_TO_LUMA_ATTRIBUTE_MAP[name] || name;
|
|
78
|
-
}
|
|
79
|
-
/*
|
|
80
|
-
// Check for well known attribute names
|
|
81
|
-
// eslint-disable-next-line complexity
|
|
82
|
-
export function inferAttributeAccessor(attributeName, attribute) {
|
|
83
|
-
let category;
|
|
84
|
-
switch (attributeName) {
|
|
85
|
-
case 'texCoords':
|
|
86
|
-
case 'texCoord1':
|
|
87
|
-
case 'texCoord2':
|
|
88
|
-
case 'texCoord3':
|
|
89
|
-
category = 'uvs';
|
|
90
|
-
break;
|
|
91
|
-
case 'vertices':
|
|
92
|
-
case 'positions':
|
|
93
|
-
case 'normals':
|
|
94
|
-
case 'pickingColors':
|
|
95
|
-
category = 'vectors';
|
|
96
|
-
break;
|
|
97
|
-
default:
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Check for categorys
|
|
101
|
-
switch (category) {
|
|
102
|
-
case 'vectors':
|
|
103
|
-
attribute.size = attribute.size || 3;
|
|
104
|
-
break;
|
|
105
|
-
case 'uvs':
|
|
106
|
-
attribute.size = attribute.size || 2;
|
|
107
|
-
break;
|
|
108
|
-
default:
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
assert(Number.isFinite(attribute.size), `attribute ${attributeName} needs size`);
|
|
38
|
+
return GLTF_TO_LUMA_ATTRIBUTE_MAP[name] || name;
|
|
112
39
|
}
|
|
113
|
-
|
|
40
|
+
//# sourceMappingURL=model-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-utils.js","names":["Buffer","assert","GLTF_TO_LUMA_ATTRIBUTE_MAP","POSITION","NORMAL","COLOR_0","TEXCOORD_0","TEXCOORD_1","TEXCOORD_2","getIndexBufferFromGeometry","device","geometry","indices","undefined","data","value","Uint16Array","Uint32Array","createBuffer","usage","INDEX","getAttributeBuffersFromGeometry","buffers","name","attribute","Object","entries","attributes","remappedName","mapAttributeName","constant","Error","typedArray","id","concat"],"sources":["../../src/lib/model-utils.ts"],"sourcesContent":["import {Device, Buffer, assert} from '@luma.gl/api';\nimport type Geometry from '../geometry/geometry';\n\n// Support for mapping new geometries with glTF attribute names to \"classic\" luma.gl shader names\nconst GLTF_TO_LUMA_ATTRIBUTE_MAP = {\n POSITION: 'positions',\n NORMAL: 'normals',\n COLOR_0: 'colors',\n TEXCOORD_0: 'texCoords',\n TEXCOORD_1: 'texCoords1',\n TEXCOORD_2: 'texCoords2'\n};\n\n/*\nexport function getAttributeLayoutsFromGeometry(geometry: Geometry) {\n const layouts: Record<string, {}> = {};\n let indices = geometry.indices;\n\n for (const [name, attribute] of Object.entries(geometry.attributes)) {\n const remappedName = mapAttributeName(name);\n\n if (attribute.constant) {\n throw new Error('constant attributes not supported');\n } else {\n const typedArray = attribute.value;\n // Create accessor by copying the attribute and removing `value``\n const accessor = {...attribute};\n delete accessor.value;\n buffers[remappedName] = [device.createBuffer(typedArray), accessor];\n\n inferAttributeAccessor(name, accessor);\n }\n }\n}\n\nexport class Table {\n length: number;\n // columns: Record<string, TypedArray> = {};\n}\n\nexport class GPUTable {\n length: number;\n columns: Record<string, Buffer> = {};\n}\n\nexport function convertTableToGPUTable(table: Table) {\n // for (const ) {}\n}\n\nexport function renameTableColumns(table: Table, map: (name: string) => string) {\n const newColumns = table.columns.reduce()\n table.clone();\n}\n*/\n\nexport function getIndexBufferFromGeometry(device: Device, geometry: Geometry): Buffer | undefined {\n if (!geometry.indices) {\n return undefined;\n }\n\n // @ts-expect-error\n const data = geometry.indices.value || geometry.indices;\n assert(\n data instanceof Uint16Array || data instanceof Uint32Array,\n 'attribute array for \"indices\" must be of integer type'\n );\n return device.createBuffer({usage: Buffer.INDEX, data});\n}\n\nexport function getAttributeBuffersFromGeometry(device: Device, geometry: Geometry): Record<string, Buffer> {\n const buffers: Record<string, Buffer> = {};\n\n for (const [name, attribute] of Object.entries(geometry.attributes)) {\n const remappedName = mapAttributeName(name);\n if (attribute?.constant) {\n throw new Error('constant attributes not supported');\n } else {\n const typedArray = attribute?.value;\n buffers[remappedName] = device.createBuffer({data: typedArray, id: `${remappedName}-buffer`});\n }\n }\n\n return buffers;\n}\n\nfunction mapAttributeName(name: string): string {\n // @ts-ignore-error\n return GLTF_TO_LUMA_ATTRIBUTE_MAP[name] || name;\n}\n\n/*\n// Check for well known attribute names\n// eslint-disable-next-line complexity\nexport function inferAttributeAccessor(attributeName, attribute) {\n let category;\n switch (attributeName) {\n case 'texCoords':\n case 'texCoord1':\n case 'texCoord2':\n case 'texCoord3':\n category = 'uvs';\n break;\n case 'vertices':\n case 'positions':\n case 'normals':\n case 'pickingColors':\n category = 'vectors';\n break;\n default:\n }\n\n // Check for categorys\n switch (category) {\n case 'vectors':\n attribute.size = attribute.size || 3;\n break;\n case 'uvs':\n attribute.size = attribute.size || 2;\n break;\n default:\n }\n\n assert(Number.isFinite(attribute.size), `attribute ${attributeName} needs size`);\n}\n*/\n"],"mappings":"AAAA,SAAgBA,MAAM,EAAEC,MAAM,QAAO,cAAc;AAInD,MAAMC,0BAA0B,GAAG;EACjCC,QAAQ,EAAE,WAAW;EACrBC,MAAM,EAAE,SAAS;EACjBC,OAAO,EAAE,QAAQ;EACjBC,UAAU,EAAE,WAAW;EACvBC,UAAU,EAAE,YAAY;EACxBC,UAAU,EAAE;AACd,CAAC;AA4CD,OAAO,SAASC,0BAA0BA,CAACC,MAAc,EAAEC,QAAkB,EAAsB;EACjG,IAAI,CAACA,QAAQ,CAACC,OAAO,EAAE;IACrB,OAAOC,SAAS;EAClB;EAGA,MAAMC,IAAI,GAAGH,QAAQ,CAACC,OAAO,CAACG,KAAK,IAAIJ,QAAQ,CAACC,OAAO;EACvDX,MAAM,CACJa,IAAI,YAAYE,WAAW,IAAIF,IAAI,YAAYG,WAAW,EAC1D,uDAAuD,CACxD;EACD,OAAOP,MAAM,CAACQ,YAAY,CAAC;IAACC,KAAK,EAAEnB,MAAM,CAACoB,KAAK;IAAEN;EAAI,CAAC,CAAC;AACzD;AAEA,OAAO,SAASO,+BAA+BA,CAACX,MAAc,EAAEC,QAAkB,EAA0B;EAC1G,MAAMW,OAA+B,GAAG,CAAC,CAAC;EAE1C,KAAK,MAAM,CAACC,IAAI,EAAEC,SAAS,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACf,QAAQ,CAACgB,UAAU,CAAC,EAAE;IACnE,MAAMC,YAAY,GAAGC,gBAAgB,CAACN,IAAI,CAAC;IAC3C,IAAIC,SAAS,aAATA,SAAS,eAATA,SAAS,CAAEM,QAAQ,EAAE;MACvB,MAAM,IAAIC,KAAK,CAAC,mCAAmC,CAAC;IACtD,CAAC,MAAM;MACL,MAAMC,UAAU,GAAGR,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAET,KAAK;MACnCO,OAAO,CAACM,YAAY,CAAC,GAAGlB,MAAM,CAACQ,YAAY,CAAC;QAACJ,IAAI,EAAEkB,UAAU;QAAEC,EAAE,KAAAC,MAAA,CAAKN,YAAY;MAAS,CAAC,CAAC;IAC/F;EACF;EAEA,OAAON,OAAO;AAChB;AAEA,SAASO,gBAAgBA,CAACN,IAAY,EAAU;EAE9C,OAAOrB,0BAA0B,CAACqB,IAAI,CAAC,IAAIA,IAAI;AACjD"}
|
package/dist/lib/model.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Device, Buffer, RenderPipelineProps, RenderPass, Binding, Primitiv
|
|
|
2
2
|
import { RenderPipeline } from '@luma.gl/api';
|
|
3
3
|
import type { ShaderModule } from '@luma.gl/shadertools';
|
|
4
4
|
import type Geometry from '../geometry/geometry';
|
|
5
|
-
export type ModelProps = Omit<RenderPipelineProps, 'vs' | 'fs'> & {
|
|
5
|
+
export declare type ModelProps = Omit<RenderPipelineProps, 'vs' | 'fs'> & {
|
|
6
6
|
vs?: {
|
|
7
7
|
glsl?: string;
|
|
8
8
|
wgsl?: string;
|
package/dist/lib/model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/lib/model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,EAAC,MAAM,cAAc,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B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAQ;IAClC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,WAAW,SAAC;IACrB,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IAE5B,OAAO,CAAC,kBAAkB,CAAuE;gBAErF,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU;IA2C7C,OAAO,IAAI,IAAI;IAIf,IAAI,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI;IASnC,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAmBjC,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAMtD,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAMrC,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAMvD,uBAAuB;IACvB,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAMpD,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAMhD,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAWvC"}
|
package/dist/lib/model.js
CHANGED
|
@@ -1,138 +1,146 @@
|
|
|
1
|
-
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import { RenderPipeline } from '@luma.gl/api';
|
|
3
|
-
import { getAttributeBuffersFromGeometry, getIndexBufferFromGeometry } from
|
|
4
|
-
import { PipelineFactory } from
|
|
3
|
+
import { getAttributeBuffersFromGeometry, getIndexBufferFromGeometry } from "./model-utils.js";
|
|
4
|
+
import { PipelineFactory } from "./pipeline-factory.js";
|
|
5
5
|
const DEFAULT_MODEL_PROPS = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
|
15
15
|
};
|
|
16
|
-
/** v9 API */
|
|
17
16
|
export class Model {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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);
|
|
17
|
+
constructor(device, props) {
|
|
18
|
+
_defineProperty(this, "device", void 0);
|
|
19
|
+
_defineProperty(this, "pipeline", void 0);
|
|
20
|
+
_defineProperty(this, "id", void 0);
|
|
21
|
+
_defineProperty(this, "vs", void 0);
|
|
22
|
+
_defineProperty(this, "fs", null);
|
|
23
|
+
_defineProperty(this, "topology", void 0);
|
|
24
|
+
_defineProperty(this, "vertexCount", void 0);
|
|
25
|
+
_defineProperty(this, "props", void 0);
|
|
26
|
+
_defineProperty(this, "_getModuleUniforms", void 0);
|
|
27
|
+
this.props = {
|
|
28
|
+
...DEFAULT_MODEL_PROPS,
|
|
29
|
+
...props
|
|
30
|
+
};
|
|
31
|
+
props = this.props;
|
|
32
|
+
this.id = this.props.id;
|
|
33
|
+
this.device = device;
|
|
34
|
+
if (!props.vs) {
|
|
35
|
+
throw new Error('no vertex shader');
|
|
54
36
|
}
|
|
55
|
-
|
|
56
|
-
|
|
37
|
+
this.vs = getShaderSource(this.device, props.vs);
|
|
38
|
+
if (props.fs) {
|
|
39
|
+
this.fs = getShaderSource(this.device, props.fs);
|
|
57
40
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
});
|
|
64
|
-
return this;
|
|
41
|
+
this.vertexCount = this.props.vertexCount;
|
|
42
|
+
this.topology = this.props.topology;
|
|
43
|
+
if (this.props.geometry) {
|
|
44
|
+
this.vertexCount = this.props.geometry.vertexCount;
|
|
45
|
+
this.topology = this.props.geometry.topology || 'triangle-list';
|
|
65
46
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return this;
|
|
47
|
+
const pipelineFactory = PipelineFactory.getDefaultPipelineFactory(this.device);
|
|
48
|
+
const {
|
|
49
|
+
pipeline,
|
|
50
|
+
getUniforms
|
|
51
|
+
} = pipelineFactory.createRenderPipeline({
|
|
52
|
+
...this.props,
|
|
53
|
+
vs: this.vs,
|
|
54
|
+
fs: this.fs,
|
|
55
|
+
topology: this.topology,
|
|
56
|
+
parameters: props.parameters,
|
|
57
|
+
layout: props.layout
|
|
58
|
+
});
|
|
59
|
+
this.pipeline = pipeline;
|
|
60
|
+
this._getModuleUniforms = getUniforms;
|
|
61
|
+
if (this.props.geometry) {
|
|
62
|
+
this._setGeometry(this.props.geometry);
|
|
83
63
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
64
|
+
this.setUniforms(this._getModuleUniforms());
|
|
65
|
+
this.setProps(this.props);
|
|
66
|
+
}
|
|
67
|
+
destroy() {
|
|
68
|
+
this.pipeline.destroy();
|
|
69
|
+
}
|
|
70
|
+
draw(renderPass) {
|
|
71
|
+
this.pipeline.draw({
|
|
72
|
+
renderPass,
|
|
73
|
+
vertexCount: this.vertexCount,
|
|
74
|
+
instanceCount: this.props.instanceCount
|
|
75
|
+
});
|
|
76
|
+
return this;
|
|
77
|
+
}
|
|
78
|
+
setProps(props) {
|
|
79
|
+
if (props.indices) {
|
|
80
|
+
this.setIndexBuffer(props.indices);
|
|
88
81
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
// this._indices = indices;
|
|
92
|
-
return this;
|
|
82
|
+
if (props.attributes) {
|
|
83
|
+
this.setAttributes(props.attributes);
|
|
93
84
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
Object.assign(this.props.attributes, attributes);
|
|
97
|
-
return this;
|
|
85
|
+
if (props.bindings) {
|
|
86
|
+
this.setBindings(props.bindings);
|
|
98
87
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
this.pipeline.setBindings(bindings);
|
|
102
|
-
Object.assign(this.props.bindings, bindings);
|
|
103
|
-
return this;
|
|
88
|
+
if (props.uniforms) {
|
|
89
|
+
this.setUniforms(props.uniforms);
|
|
104
90
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
Object.assign(this.props.uniforms, uniforms);
|
|
108
|
-
return this;
|
|
91
|
+
if (props.moduleSettings) {
|
|
92
|
+
this.updateModuleSettings(props.moduleSettings);
|
|
109
93
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
updateModuleSettings(props) {
|
|
97
|
+
const uniforms = this._getModuleUniforms(props);
|
|
98
|
+
this.setUniforms(uniforms);
|
|
99
|
+
return this;
|
|
100
|
+
}
|
|
101
|
+
setIndexBuffer(indices) {
|
|
102
|
+
this.pipeline.setIndexBuffer(indices);
|
|
103
|
+
return this;
|
|
104
|
+
}
|
|
105
|
+
setAttributes(attributes) {
|
|
106
|
+
this.pipeline.setAttributes(attributes);
|
|
107
|
+
Object.assign(this.props.attributes, attributes);
|
|
108
|
+
return this;
|
|
109
|
+
}
|
|
110
|
+
setBindings(bindings) {
|
|
111
|
+
this.pipeline.setBindings(bindings);
|
|
112
|
+
Object.assign(this.props.bindings, bindings);
|
|
113
|
+
return this;
|
|
114
|
+
}
|
|
115
|
+
setUniforms(uniforms) {
|
|
116
|
+
this.pipeline.setUniforms(uniforms);
|
|
117
|
+
Object.assign(this.props.uniforms, uniforms);
|
|
118
|
+
return this;
|
|
119
|
+
}
|
|
120
|
+
_setGeometry(geometry) {
|
|
121
|
+
const geometryBuffers = getAttributeBuffersFromGeometry(this.device, geometry);
|
|
122
|
+
this.setAttributes(geometryBuffers);
|
|
123
|
+
const indexBuffer = getIndexBufferFromGeometry(this.device, geometry);
|
|
124
|
+
if (indexBuffer) {
|
|
125
|
+
this.setIndexBuffer(indexBuffer);
|
|
118
126
|
}
|
|
127
|
+
}
|
|
119
128
|
}
|
|
120
|
-
/** Create a shader from the different overloads */
|
|
121
129
|
function getShaderSource(device, shader) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
130
|
+
if (typeof shader === 'string') {
|
|
131
|
+
return shader;
|
|
132
|
+
}
|
|
133
|
+
switch (device.info.type) {
|
|
134
|
+
case 'webgpu':
|
|
135
|
+
if (shader !== null && shader !== void 0 && shader.wgsl) {
|
|
136
|
+
return shader.wgsl;
|
|
137
|
+
}
|
|
138
|
+
throw new Error('WebGPU does not support GLSL shaders');
|
|
139
|
+
default:
|
|
140
|
+
if (shader !== null && shader !== void 0 && shader.glsl) {
|
|
141
|
+
return shader.glsl;
|
|
142
|
+
}
|
|
143
|
+
throw new Error('WebGL does not support WGSL shaders');
|
|
144
|
+
}
|
|
138
145
|
}
|
|
146
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","names":["RenderPipeline","getAttributeBuffersFromGeometry","getIndexBufferFromGeometry","PipelineFactory","DEFAULT_MODEL_PROPS","_DEFAULT_PROPS","vs","fs","id","handle","undefined","userData","modules","moduleSettings","geometry","Model","constructor","device","props","_defineProperty","Error","getShaderSource","vertexCount","topology","pipelineFactory","getDefaultPipelineFactory","pipeline","getUniforms","createRenderPipeline","parameters","layout","_getModuleUniforms","_setGeometry","setUniforms","setProps","destroy","draw","renderPass","instanceCount","indices","setIndexBuffer","attributes","setAttributes","bindings","setBindings","uniforms","updateModuleSettings","Object","assign","geometryBuffers","indexBuffer","shader","info","type","wgsl","glsl"],"sources":["../../src/lib/model.ts"],"sourcesContent":["// luma.gl, MIT license\n\nimport type {Device, Buffer, RenderPipelineProps, RenderPass, Binding, PrimitiveTopology} from '@luma.gl/api';\nimport {RenderPipeline} from '@luma.gl/api';\nimport type { ShaderModule } from '@luma.gl/shadertools';\nimport type Geometry from '../geometry/geometry';\nimport {getAttributeBuffersFromGeometry, getIndexBufferFromGeometry} from './model-utils';\nimport {PipelineFactory} from './pipeline-factory';\n\nexport type ModelProps = Omit<RenderPipelineProps, 'vs' | 'fs'> & {\n // Model also accepts a string\n vs?: {glsl?: string; wgsl?: string} | string | null;\n fs?: {glsl?: string; wgsl?: string} | string | null;\n modules?: ShaderModule[];\n moduleSettings?: Record<string, Record<string, any>>;\n geometry?: Geometry | null;\n};\n\nconst DEFAULT_MODEL_PROPS: Required<ModelProps> = {\n ...RenderPipeline._DEFAULT_PROPS,\n vs: null,\n fs: null,\n id: 'unnamed',\n handle: undefined,\n userData: {},\n modules: [],\n moduleSettings: {},\n geometry: null\n};\n\n/** v9 API */\nexport class Model {\n readonly device: Device;\n readonly pipeline: RenderPipeline;\n readonly id: string;\n readonly vs: string;\n readonly fs: string | null = null;\n readonly topology: PrimitiveTopology;\n readonly vertexCount;\n props: Required<ModelProps>;\n\n private _getModuleUniforms: (props?: Record<string, Record<string, any>>) => Record<string, any>;\n\n constructor(device: Device, props: ModelProps) {\n this.props = {...DEFAULT_MODEL_PROPS, ...props};\n props = this.props;\n this.id = this.props.id;\n this.device = device;\n\n // Create the pipeline\n if (!props.vs) {\n throw new Error('no vertex shader');\n }\n this.vs = getShaderSource(this.device, props.vs);\n if (props.fs) {\n this.fs = getShaderSource(this.device, props.fs);\n }\n\n this.vertexCount = this.props.vertexCount;\n this.topology = this.props.topology;\n\n if (this.props.geometry) {\n this.vertexCount = this.props.geometry.vertexCount;\n this.topology = this.props.geometry.topology || 'triangle-list';\n }\n\n const pipelineFactory = PipelineFactory.getDefaultPipelineFactory(this.device);\n const {pipeline, getUniforms} = pipelineFactory.createRenderPipeline({\n ...this.props,\n vs: this.vs,\n fs: this.fs,\n topology: this.topology,\n parameters: props.parameters,\n layout: props.layout\n });\n\n this.pipeline = pipeline;\n this._getModuleUniforms = getUniforms;\n\n if (this.props.geometry) {\n this._setGeometry(this.props.geometry);\n }\n this.setUniforms(this._getModuleUniforms()) // Get all default module uniforms\n this.setProps(this.props);\n }\n\n destroy(): void {\n this.pipeline.destroy();\n }\n\n draw(renderPass?: RenderPass): this {\n this.pipeline.draw({\n renderPass,\n vertexCount: this.vertexCount,\n instanceCount: this.props.instanceCount\n });\n return this;\n }\n\n setProps(props: ModelProps): this {\n if (props.indices) {\n this.setIndexBuffer(props.indices);\n }\n if (props.attributes) {\n this.setAttributes(props.attributes);\n }\n if (props.bindings) {\n this.setBindings(props.bindings);\n }\n if (props.uniforms) {\n this.setUniforms(props.uniforms);\n }\n if (props.moduleSettings) {\n this.updateModuleSettings(props.moduleSettings);\n }\n return this;\n }\n\n updateModuleSettings(props: Record<string, any>): this {\n const uniforms = this._getModuleUniforms(props);\n this.setUniforms(uniforms);\n return this;\n }\n\n setIndexBuffer(indices: Buffer): this {\n this.pipeline.setIndexBuffer(indices);\n // this._indices = indices;\n return this;\n }\n\n setAttributes(attributes: Record<string, Buffer>): this {\n this.pipeline.setAttributes(attributes);\n Object.assign(this.props.attributes, attributes);\n return this;\n }\n\n /** Set the bindings */\n setBindings(bindings: Record<string, Binding>): this {\n this.pipeline.setBindings(bindings);\n Object.assign(this.props.bindings, bindings);\n return this;\n }\n\n setUniforms(uniforms: Record<string, any>): this {\n this.pipeline.setUniforms(uniforms);\n Object.assign(this.props.uniforms, uniforms);\n return this;\n }\n\n _setGeometry(geometry: Geometry): void {\n // this._deleteGeometryBuffers();\n\n const geometryBuffers = getAttributeBuffersFromGeometry(this.device, geometry);\n this.setAttributes(geometryBuffers);\n\n const indexBuffer = getIndexBufferFromGeometry(this.device, geometry);\n if (indexBuffer) {\n this.setIndexBuffer(indexBuffer);\n }\n }\n}\n\n/** Create a shader from the different overloads */\nfunction getShaderSource(device: Device, shader: string | {glsl?: string; wgsl?: string}): string {\n // TODO - detect WGSL/GLSL and throw an error if not supported\n if (typeof shader === 'string') {\n return shader;\n }\n\n switch (device.info.type) {\n case 'webgpu':\n if (shader?.wgsl) {\n return shader.wgsl;\n }\n throw new Error('WebGPU does not support GLSL shaders');\n\n default:\n if (shader?.glsl) {\n return shader.glsl;\n }\n throw new Error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';
|
|
2
2
|
import { Device, RenderPipeline } from '@luma.gl/api/';
|
|
3
3
|
import type { ShaderModule } from '@luma.gl/shadertools';
|
|
4
|
-
export type GetRenderPipelineOptions = {
|
|
4
|
+
export declare type GetRenderPipelineOptions = {
|
|
5
5
|
vs: string;
|
|
6
6
|
fs: string | null;
|
|
7
7
|
topology: PrimitiveTopology;
|
|
@@ -14,7 +14,7 @@ export type GetRenderPipelineOptions = {
|
|
|
14
14
|
varyings?: string[];
|
|
15
15
|
bufferMode?: number;
|
|
16
16
|
};
|
|
17
|
-
export type GetComputePipelineOptions = {
|
|
17
|
+
export declare type GetComputePipelineOptions = {
|
|
18
18
|
cs: string;
|
|
19
19
|
parameters?: RenderPipelineParameters;
|
|
20
20
|
modules?: ShaderModule[];
|
|
@@ -24,7 +24,7 @@ export type GetComputePipelineOptions = {
|
|
|
24
24
|
varyings?: string[];
|
|
25
25
|
bufferMode?: number;
|
|
26
26
|
};
|
|
27
|
-
type GetUniformsFunc = (props?: Record<string, any>) => Record<string, any>;
|
|
27
|
+
declare 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,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