Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen authored Nov 8, 2024
1 parent 2a08804 commit 9636310
Show file tree
Hide file tree
Showing 25 changed files with 15,318 additions and 11,016 deletions.
2 changes: 1 addition & 1 deletion examples/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@loaders.gl/csv": "^4.2.0",
"@loaders.gl/draco": "^4.2.0",
"@loaders.gl/gltf": "^4.2.0",
"@luma.gl/constants": "^9.1.0-alpha.19",
"@luma.gl/constants": "^9.1.0-beta.9",
"brace": "^0.11.1",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/mesh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@loaders.gl/obj": "^4.2.0",
"@math.gl/core": "^4.1.0-alpha.3",
"@math.gl/core": "^4.1.0",
"deck.gl": "^9.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
Expand Down
12 changes: 6 additions & 6 deletions modules/aggregation-layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.1.0-alpha.19",
"@luma.gl/shadertools": "^9.1.0-alpha.19",
"@math.gl/core": "^4.1.0-alpha.3",
"@math.gl/web-mercator": "^4.1.0-alpha.3",
"@luma.gl/constants": "^9.1.0-beta.9",
"@luma.gl/shadertools": "^9.1.0-beta.9",
"@math.gl/core": "^4.1.0",
"@math.gl/web-mercator": "^4.1.0",
"d3-hexbin": "^0.2.1"
},
"peerDependencies": {
"@deck.gl/core": "9.0.0-alpha.0",
"@deck.gl/layers": "9.0.0-alpha.0",
"@luma.gl/core": "^9.1.0-alpha.19",
"@luma.gl/engine": "^9.1.0-alpha.19"
"@luma.gl/core": "^9.1.0-beta.9",
"@luma.gl/engine": "^9.1.0-beta.9"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
6 changes: 3 additions & 3 deletions modules/arcgis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.1.0-alpha.19",
"@luma.gl/constants": "^9.1.0-beta.9",
"esri-loader": "^3.7.0"
},
"peerDependencies": {
"@arcgis/core": "^4.0.0",
"@deck.gl/core": "9.0.0-alpha.0",
"@luma.gl/core": "^9.1.0-alpha.19",
"@luma.gl/engine": "^9.1.0-alpha.19"
"@luma.gl/core": "^9.1.0-beta.9",
"@luma.gl/engine": "^9.1.0-beta.9"
},
"devDependencies": {
"@arcgis/core": "^4.21.0"
Expand Down
8 changes: 4 additions & 4 deletions modules/carto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
"@loaders.gl/mvt": "^4.2.0",
"@loaders.gl/schema": "^4.2.0",
"@loaders.gl/tiles": "^4.2.0",
"@luma.gl/core": "^9.1.0-alpha.19",
"@luma.gl/shadertools": "^9.1.0-alpha.19",
"@math.gl/web-mercator": "^4.1.0-alpha.3",
"@luma.gl/core": "^9.1.0-beta.9",
"@luma.gl/shadertools": "^9.1.0-beta.9",
"@math.gl/web-mercator": "^4.1.0",
"@types/d3-array": "^3.0.2",
"@types/d3-color": "^1.4.2",
"@types/d3-scale": "^3.0.0",
Expand All @@ -72,7 +72,7 @@
"@deck.gl/geo-layers": "9.0.0-alpha.0",
"@deck.gl/layers": "9.0.0-alpha.0",
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.1.0-alpha.19"
"@luma.gl/core": "^9.1.0-beta.9"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
18 changes: 9 additions & 9 deletions modules/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
"dependencies": {
"@loaders.gl/core": "^4.2.0",
"@loaders.gl/images": "^4.2.0",
"@luma.gl/constants": "^9.1.0-alpha.19",
"@luma.gl/core": "^9.1.0-alpha.19",
"@luma.gl/engine": "^9.1.0-alpha.19",
"@luma.gl/shadertools": "^9.1.0-alpha.19",
"@luma.gl/webgl": "^9.1.0-alpha.19",
"@math.gl/core": "^4.1.0-alpha.3",
"@math.gl/sun": "^4.1.0-alpha.3",
"@math.gl/types": "^4.1.0-alpha.3",
"@math.gl/web-mercator": "^4.1.0-alpha.3",
"@luma.gl/constants": "^9.1.0-beta.9",
"@luma.gl/core": "^9.1.0-beta.9",
"@luma.gl/engine": "^9.1.0-beta.9",
"@luma.gl/shadertools": "^9.1.0-beta.9",
"@luma.gl/webgl": "^9.1.0-beta.9",
"@math.gl/core": "^4.1.0",
"@math.gl/sun": "^4.1.0",
"@math.gl/types": "^4.1.0",
"@math.gl/web-mercator": "^4.1.0",
"@probe.gl/env": "^4.0.9",
"@probe.gl/log": "^4.0.9",
"@probe.gl/stats": "^4.0.9",
Expand Down
26 changes: 12 additions & 14 deletions modules/core/src/lib/layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ export type UpdateParameters<LayerT extends Layer> = {
changeFlags: ChangeFlags;
};

type DrawOptions = {
renderPass: RenderPass;
shaderModuleProps: any;
uniforms: any;
parameters: any;
context: LayerContext;
};

type SharedLayerState = {
[key: string]: unknown;
};
Expand Down Expand Up @@ -321,15 +329,6 @@ export default abstract class Layer<PropsT extends {} = {}> extends Component<
return (state && (state.models || (state.model && [state.model]))) || [];
}

// TODO deprecate in favour of setShaderModuleProps
/** Update shader module parameters */
setModuleParameters(moduleParameters: any): void {
for (const model of this.getModels()) {
// HACK as fp64 is not yet ported to UBO
model.uniforms = {ONE: 1};
}
}

/** Update shader input parameters */
setShaderModuleProps(...props: Parameters<Model['shaderInputs']['setProps']>): void {
for (const model of this.getModels()) {
Expand Down Expand Up @@ -531,9 +530,9 @@ export default abstract class Layer<PropsT extends {} = {}> extends Component<
}

// If state has a model, draw it with supplied uniforms
draw(opts) {
draw(opts: DrawOptions) {
for (const model of this.getModels()) {
model.draw(opts);
model.draw(opts.renderPass);
}
}

Expand Down Expand Up @@ -1056,7 +1055,6 @@ export default abstract class Layer<PropsT extends {} = {}> extends Component<
try {
// TODO/ib - hack move to luma Model.draw
if (shaderModuleProps) {
this.setModuleParameters({});
this.setShaderModuleProps(shaderModuleProps);
}

Expand All @@ -1076,7 +1074,7 @@ export default abstract class Layer<PropsT extends {} = {}> extends Component<
// Call subclass lifecycle method
if (context.device instanceof WebGLDevice) {
context.device.withParametersWebGL(parameters, () => {
const opts = {renderPass, shaderModuleProps, uniforms, parameters, context};
const opts: DrawOptions = {renderPass, shaderModuleProps, uniforms, parameters, context};

// extensions
for (const extension of this.props.extensions) {
Expand All @@ -1086,7 +1084,7 @@ export default abstract class Layer<PropsT extends {} = {}> extends Component<
this.draw(opts);
});
} else {
const opts = {renderPass, shaderModuleProps, uniforms, parameters, context};
const opts: DrawOptions = {renderPass, shaderModuleProps, uniforms, parameters, context};

// extensions
for (const extension of this.props.extensions) {
Expand Down
1 change: 1 addition & 0 deletions modules/core/src/shaderlib/project/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ export default {
commonOrigin: 'vec3<f32>',
pseudoMeters: 'f32'
}
// @ts-ignore TODO v9.1
} as const satisfies ShaderModule<ProjectProps, ProjectUniforms, {}>;
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ function getTransform(device: Device, attribute: Attribute): BufferTransform {
]
}
],
// @ts-expect-error fp64 module only sets ONE uniform via defaultUniforms
modules: [fp64arithmetic, interpolationUniforms],
defines: {
ATTRIBUTE_TYPE: attributeType,
Expand All @@ -205,7 +206,6 @@ function getTransform(device: Device, attribute: Attribute): BufferTransform {
// Default uniforms are not set without this
moduleSettings: {},
varyings: ['vCurrent', 'vCurrent64Low'],
// @ts-expect-error WebGLRenderPipeline only prop TODO - support in RenderPipeline?
bufferMode: GL.INTERLEAVED_ATTRIBS,
disableWarnings: true
});
Expand Down
10 changes: 5 additions & 5 deletions modules/extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.1.0-alpha.19",
"@luma.gl/shadertools": "^9.1.0-alpha.19",
"@math.gl/core": "^4.1.0-alpha.3"
"@luma.gl/constants": "^9.1.0-beta.9",
"@luma.gl/shadertools": "^9.1.0-beta.9",
"@math.gl/core": "^4.1.0"
},
"peerDependencies": {
"@deck.gl/core": "9.0.0-alpha.0",
"@luma.gl/core": "^9.1.0-alpha.19",
"@luma.gl/engine": "^9.1.0-alpha.19"
"@luma.gl/core": "^9.1.0-beta.9",
"@luma.gl/engine": "^9.1.0-beta.9"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
14 changes: 7 additions & 7 deletions modules/geo-layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
"@loaders.gl/terrain": "^4.2.0",
"@loaders.gl/tiles": "^4.2.0",
"@loaders.gl/wms": "^4.2.0",
"@luma.gl/gltf": "^9.1.0-alpha.19",
"@luma.gl/shadertools": "^9.1.0-alpha.19",
"@math.gl/core": "^4.1.0-alpha.3",
"@math.gl/culling": "^4.1.0-alpha.3",
"@math.gl/web-mercator": "^4.1.0-alpha.3",
"@luma.gl/gltf": "^9.1.0-beta.9",
"@luma.gl/shadertools": "^9.1.0-beta.9",
"@math.gl/core": "^4.1.0",
"@math.gl/culling": "^4.1.0",
"@math.gl/web-mercator": "^4.1.0",
"@types/geojson": "^7946.0.8",
"h3-js": "^4.1.0",
"long": "^3.2.0"
Expand All @@ -61,8 +61,8 @@
"@deck.gl/layers": "9.0.0-alpha.0",
"@deck.gl/mesh-layers": "9.0.0-alpha.0",
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.1.0-alpha.19",
"@luma.gl/engine": "^9.1.0-alpha.19"
"@luma.gl/core": "^9.1.0-beta.9",
"@luma.gl/engine": "^9.1.0-beta.9"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
6 changes: 3 additions & 3 deletions modules/google-maps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.1.0-alpha.19",
"@math.gl/core": "^4.1.0-alpha.3",
"@luma.gl/constants": "^9.1.0-beta.9",
"@math.gl/core": "^4.1.0",
"@types/google.maps": "^3.48.6"
},
"peerDependencies": {
"@deck.gl/core": "9.0.0-alpha.0",
"@luma.gl/core": "^9.1.0-alpha.19"
"@luma.gl/core": "^9.1.0-beta.9"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
2 changes: 1 addition & 1 deletion modules/jupyter-widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@loaders.gl/3d-tiles": "^4.2.0",
"@loaders.gl/core": "^4.2.0",
"@loaders.gl/csv": "^4.2.0",
"@luma.gl/core": "^9.1.0-alpha.19",
"@luma.gl/core": "^9.1.0-beta.9",
"d3-dsv": "^1.0.8",
"mapbox-gl": "^1.13.2"
},
Expand Down
10 changes: 5 additions & 5 deletions modules/layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@
"@loaders.gl/images": "^4.2.0",
"@loaders.gl/schema": "^4.2.0",
"@mapbox/tiny-sdf": "^2.0.5",
"@math.gl/core": "^4.1.0-alpha.3",
"@math.gl/polygon": "^4.1.0-alpha.3",
"@math.gl/web-mercator": "^4.1.0-alpha.3",
"@math.gl/core": "^4.1.0",
"@math.gl/polygon": "^4.1.0",
"@math.gl/web-mercator": "^4.1.0",
"earcut": "^2.2.4"
},
"peerDependencies": {
"@deck.gl/core": "9.0.0-alpha.0",
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.1.0-alpha.19",
"@luma.gl/engine": "^9.1.0-alpha.19"
"@luma.gl/core": "^9.1.0-beta.9",
"@luma.gl/engine": "^9.1.0-beta.9"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
4 changes: 2 additions & 2 deletions modules/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
"@deck.gl/react": "9.1.0-alpha.0",
"@deck.gl/widgets": "9.1.0-alpha.0",
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.1.0-alpha.19",
"@luma.gl/engine": "^9.1.0-alpha.19"
"@luma.gl/core": "^9.1.0-beta.9",
"@luma.gl/engine": "^9.1.0-beta.9"
},
"peerDependencies": {
"@arcgis/core": "^4.0.0",
Expand Down
8 changes: 4 additions & 4 deletions modules/mapbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "^9.1.0-alpha.19",
"@math.gl/web-mercator": "^4.1.0-alpha.3"
"@luma.gl/constants": "^9.1.0-beta.9",
"@math.gl/web-mercator": "^4.1.0"
},
"peerDependencies": {
"@deck.gl/core": "^9.0.0-alpha",
"@luma.gl/core": "^9.1.0-alpha.19"
"@deck.gl/core": "^9.1.0-alpha",
"@luma.gl/core": "^9.1.0-beta.9"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
10 changes: 5 additions & 5 deletions modules/mesh-layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
},
"dependencies": {
"@loaders.gl/gltf": "^4.2.0",
"@luma.gl/gltf": "^9.1.0-alpha.19",
"@luma.gl/shadertools": "^9.1.0-alpha.19"
"@luma.gl/gltf": "^9.1.0-beta.9",
"@luma.gl/shadertools": "^9.1.0-beta.9"
},
"peerDependencies": {
"@deck.gl/core": "^9.0.0-alpha",
"@luma.gl/core": "^9.1.0-alpha.19",
"@luma.gl/engine": "^9.1.0-alpha.19"
"@deck.gl/core": "^9.1.0-alpha",
"@luma.gl/core": "^9.1.0-beta.9",
"@luma.gl/engine": "^9.1.0-beta.9"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
6 changes: 3 additions & 3 deletions modules/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
"src"
],
"dependencies": {
"@luma.gl/test-utils": "^9.1.0-alpha.19"
"@luma.gl/test-utils": "^9.1.0-beta.9"
},
"peerDependencies": {
"@deck.gl/core": "^9.1.0-alpha.0",
"@luma.gl/core": "^9.1.0-alpha.19",
"@luma.gl/engine": "^9.1.0-alpha.19",
"@luma.gl/core": "^9.1.0-beta.9",
"@luma.gl/engine": "^9.1.0-beta.9",
"@probe.gl/test-utils": "^4.0.0"
},
"scripts": {},
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
"devDependencies": {
"@loaders.gl/csv": "^4.2.0",
"@loaders.gl/polyfills": "^4.2.0",
"@luma.gl/webgpu": "^9.1.0-alpha.19",
"@math.gl/proj4": "^4.1.0-alpha.3",
"@luma.gl/webgpu": "^9.1.0-beta.9",
"@luma.gl/effects": "^9.1.0-beta.9",
"@math.gl/proj4": "^4.1.0",
"@probe.gl/bench": "^4.0.9",
"jsdom": "^20.0.0",
"ocular-dev-tools": "2.0.0-alpha.33",
Expand Down
2 changes: 1 addition & 1 deletion test/apps/glsl-debugger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"start-local": "vite --config ../vite.config.local.mjs"
},
"dependencies": {
"@luma.gl/debug": "^9.1.0-alpha.17",
"@luma.gl/debug": "^9.1.0-beta.7",
"deck.gl": "^8.4.0",
"glsl-transpiler": "^1.8.5"
},
Expand Down
2 changes: 1 addition & 1 deletion test/apps/mask-first-person/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"dependencies": {
"deck.gl": "^8.4.0",
"@math.gl/core": "^4.1.0-alpha.3",
"@math.gl/core": "^4.1.0",
"@turf/circle": "6.5.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion test/apps/multi-viewport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"dependencies": {
"deck.gl": "^8.4.0",
"@math.gl/core": "^4.1.0-alpha.3",
"@math.gl/core": "^4.1.0",
"maplibre-gl": "^3.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
Expand Down
Loading

0 comments on commit 9636310

Please sign in to comment.