@luma.gl/core 9.0.24 → 9.0.25
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/adapter/type-utils/vertex-format-from-attribute.d.ts.map +1 -1
- package/dist/adapter/type-utils/vertex-format-from-attribute.js +7 -0
- package/dist/dist.dev.js +10 -2
- package/dist/dist.min.js +2 -2
- package/dist/index.cjs +11 -3
- package/dist/index.cjs.map +2 -2
- package/dist/init.js +1 -1
- package/dist/lib/luma.d.ts.map +1 -1
- package/dist/lib/luma.js +4 -2
- package/package.json +2 -2
- package/src/adapter/type-utils/vertex-format-from-attribute.ts +8 -0
- package/src/lib/luma.ts +5 -3
package/dist/init.js
CHANGED
|
@@ -11,7 +11,7 @@ import { lumaStats } from "./utils/stats-manager.js";
|
|
|
11
11
|
function initializeLuma() {
|
|
12
12
|
// Version detection using babel plugin
|
|
13
13
|
// @ts-expect-error
|
|
14
|
-
const VERSION = typeof "9.0.
|
|
14
|
+
const VERSION = typeof "9.0.25" !== 'undefined' ? "9.0.25" : 'running from source';
|
|
15
15
|
const STARTUP_MESSAGE = 'set luma.log.level=1 (or higher) to trace rendering';
|
|
16
16
|
// Assign luma.log.level in console to control logging: \
|
|
17
17
|
// 0: none, 1: minimal, 2: verbose, 3: attribute/uniforms, 4: gl logs
|
package/dist/lib/luma.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"luma.d.ts","sourceRoot":"","sources":["../../src/lib/luma.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,EAAC,WAAW,EAAC,6BAA0B;AACnD,OAAO,EAAC,MAAM,EAAC,6BAA0B;AACzC,OAAO,EAAC,YAAY,EAAC,kCAA+B;AAOpD,2CAA2C;AAC3C,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG;IAC5C,yFAAyF;IACzF,IAAI,CAAC,EAAE,O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E,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,gBAAgB,CAAC;IACzD,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;CACjB,CAAC;AAEF,+FAA+F;AAC/F,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG;IAC5C,wDAAwD;IACxD,MAAM,EAAE,sBAAsB,CAAC;IAC/B,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,IAAI;IACf,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAI9C;IAEF,mCAAmC;IACnC,MAAM,CAAC,KAAK,EAAE,YAAY,CAAa;IAEvC,iBAAiB;IACjB,MAAM,CAAC,GAAG,EAAE,GAAG,CAAO;IAEtB,MAAM,CAAC,eAAe,CAAC,aAAa,EAAE,GAAG,EAAE,GAAyB,IAAI;IAOxE,MAAM,CAAC,mBAAmB,IAAI,MAAM,EAAE;IAKtC,MAAM,CAAC,mBAAmB,IAAI,MAAM,EAAE;IAUtC,MAAM,CAAC,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAI5D,kFAAkF;WACrE,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC;IAgCpE,wCAAwC;WAC3B,YAAY,CAAC,KAAK,GAAE,iBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC;IAgDzE,MAAM,CAAC,aAAa,CAAC,OAAO,GAAE,OAAc,GAAG,IAAI;CAsBpD"}
|
package/dist/lib/luma.js
CHANGED
|
@@ -74,15 +74,17 @@ export class luma {
|
|
|
74
74
|
props.type = 'webgl';
|
|
75
75
|
}
|
|
76
76
|
const devices = getDeviceMap(props.devices) || deviceMap;
|
|
77
|
+
let WebGPUDevice;
|
|
78
|
+
let WebGLDevice;
|
|
77
79
|
switch (props.type) {
|
|
78
80
|
case 'webgpu':
|
|
79
|
-
|
|
81
|
+
WebGPUDevice = devices.get('webgpu');
|
|
80
82
|
if (WebGPUDevice) {
|
|
81
83
|
return await WebGPUDevice.create(props);
|
|
82
84
|
}
|
|
83
85
|
break;
|
|
84
86
|
case 'webgl':
|
|
85
|
-
|
|
87
|
+
WebGLDevice = devices.get('webgl');
|
|
86
88
|
if (WebGLDevice) {
|
|
87
89
|
return await WebGLDevice.create(props);
|
|
88
90
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luma.gl/core",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.25",
|
|
4
4
|
"description": "The luma.gl core Device API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"@probe.gl/stats": "^4.0.2",
|
|
47
47
|
"@types/offscreencanvas": "^2019.6.4"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "8feda326a27d6ed21211a35162a46ef952405ad6"
|
|
50
50
|
}
|
|
@@ -77,6 +77,14 @@ export function getVertexFormatFromAttribute(
|
|
|
77
77
|
const components = size as 1 | 2 | 3 | 4;
|
|
78
78
|
let dataType: DataType | DataTypeNorm = getDataTypeFromTypedArray(typedArray);
|
|
79
79
|
|
|
80
|
+
// TODO - Special cases for WebGL (not supported on WebGPU), overrides the check below
|
|
81
|
+
if (dataType === 'uint8' && normalized && components === 1) {
|
|
82
|
+
return 'unorm8-webgl';
|
|
83
|
+
}
|
|
84
|
+
if (dataType === 'uint8' && normalized && components === 3) {
|
|
85
|
+
return 'unorm8x3-webgl';
|
|
86
|
+
}
|
|
87
|
+
|
|
80
88
|
if (dataType === 'uint8' || dataType === 'sint8') {
|
|
81
89
|
if (components === 1 || components === 3) {
|
|
82
90
|
// WebGPU 8 bit formats must be aligned to 16 bit boundaries');
|
package/src/lib/luma.ts
CHANGED
|
@@ -111,17 +111,19 @@ export class luma {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
const devices = getDeviceMap(props.devices) || deviceMap;
|
|
114
|
+
let WebGPUDevice;
|
|
115
|
+
let WebGLDevice;
|
|
114
116
|
|
|
115
117
|
switch (props.type) {
|
|
116
118
|
case 'webgpu':
|
|
117
|
-
|
|
119
|
+
WebGPUDevice = devices.get('webgpu') as any;
|
|
118
120
|
if (WebGPUDevice) {
|
|
119
121
|
return await WebGPUDevice.create(props);
|
|
120
122
|
}
|
|
121
123
|
break;
|
|
122
124
|
|
|
123
125
|
case 'webgl':
|
|
124
|
-
|
|
126
|
+
WebGLDevice = devices.get('webgl') as any;
|
|
125
127
|
if (WebGLDevice) {
|
|
126
128
|
return await WebGLDevice.create(props);
|
|
127
129
|
}
|
|
@@ -139,7 +141,7 @@ export class luma {
|
|
|
139
141
|
if (WebGPUDevice?.isSupported?.()) {
|
|
140
142
|
return await WebGPUDevice.create(props);
|
|
141
143
|
}
|
|
142
|
-
WebGLDevice = devices.get('webgl');
|
|
144
|
+
WebGLDevice = devices.get('webgl') as any;
|
|
143
145
|
if (WebGLDevice?.isSupported?.()) {
|
|
144
146
|
return await WebGLDevice.create(props);
|
|
145
147
|
}
|