Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(repo): Restore examples as workspaces #2208

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ocularrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const config = {
babel: false,

lint: {
paths: ['modules', 'docs', 'test'], // 'examples'], module resolution errors
paths: ['modules', 'docs', 'test', 'examples'],
extensions: ['js', 'ts', 'jsx', 'tsx']
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"require": "./dist/index.cjs"
},
"dependencies": {
"@luma.gl/constants": "9.1.0-alpha.14"
"@luma.gl/constants": "9.1.0-alpha.16"
}
}
8 changes: 4 additions & 4 deletions examples/api/animation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@math.gl/core": "4.1.0-alpha.3"
},
"devDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions examples/api/cubemap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/constants": "9.1.0-alpha.14",
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14",
"@luma.gl/webgpu": "9.1.0-alpha.14",
"@luma.gl/constants": "9.1.0-alpha.16",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@luma.gl/webgpu": "9.1.0-alpha.16",
"@math.gl/core": "4.1.0-alpha.3"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions examples/api/texture-3d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14",
"@luma.gl/webgpu": "9.1.0-alpha.14",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@luma.gl/webgpu": "9.1.0-alpha.16",
"@math.gl/core": "4.1.0-alpha.3"
},
"devDependencies": {
Expand Down
10 changes: 4 additions & 6 deletions examples/showcase/instancing/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

import {Device} from '@luma.gl/core';
import type {AnimationProps, ModelProps} from '@luma.gl/engine';
// @ts-ignore - ib added this to solve module resolution mess
import {AnimationLoopTemplate, CubeGeometry, Timeline, Model, ShaderInputs} from '@luma.gl/engine';
// @ts-ignore TODO - ib added this to solve module resolution mess
import {makeRandomGenerator, PickingManager, indexPicking as picking} from '@luma.gl/engine';
import {dirlight, ShaderModule} from '@luma.gl/shadertools';
import {Matrix4, radians} from '@math.gl/core';
Expand Down Expand Up @@ -60,20 +58,20 @@ fn vertexMain(inputs: VertexInputs) -> FragmentInputs {
let delta = length(inputs.instanceOffsets);
let offset = vec4<f32>(inputs.instanceOffsets, sin((app.time + delta) * 0.1) * 16.0, 0);
outputs.Position = app.projectionMatrix * app.viewMatrix * (app.modelMatrix * inputs.positions + offset);

outputs.normal = dirlight_setNormal((app.modelMatrix * vec4<f32>(inputs.normals, 0.0)).xyz);
outputs.color = inputs.instanceColors;

// vec4 pickColor = vec4(0., instanceIndexes, 1.0);
picking_setPickingColor(0);

return outputs;
}

@fragment
fn fragmentMain(inputs: FragmentInputs) -> @location(0) vec4<f32> {
var fragColor = inputs.color;
fragColor = dirlight_filterColor(fragColor, DirlightInputs(inputs.normal));
var fragColor = inputs.color;
fragColor = dirlight_filterColor(fragColor, DirlightInputs(inputs.normal));
return fragColor;
}
`;
Expand Down
10 changes: 5 additions & 5 deletions examples/showcase/instancing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14",
"@luma.gl/webgpu": "9.1.0-alpha.14",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@luma.gl/webgpu": "9.1.0-alpha.16",
"@math.gl/core": "4.1.0-alpha.3"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions examples/showcase/persistence/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14",
"@luma.gl/webgpu": "9.1.0-alpha.14",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@luma.gl/webgpu": "9.1.0-alpha.16",
"@math.gl/core": "4.1.0-alpha.3"
},
"devDependencies": {
Expand Down
14 changes: 7 additions & 7 deletions examples/showcase/postprocessing/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "luma.gl-examples-hello-gltf",
"name": "luma.gl-examples-postprocessing",
"version": "9.1.0-alpha.12",
"private": true,
"scripts": {
Expand All @@ -10,12 +10,12 @@
"dependencies": {
"@loaders.gl/core": "^4.2.0",
"@loaders.gl/gltf": "^4.2.0",
"@luma.gl/core": "9.1.0-alpha.12",
"@luma.gl/engine": "9.1.0-alpha.12",
"@luma.gl/gltf": "9.1.0-alpha.12",
"@luma.gl/shadertools": "9.1.0-alpha.12",
"@luma.gl/webgl": "9.1.0-alpha.12",
"@luma.gl/webgpu": "9.1.0-alpha.12",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/gltf": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@luma.gl/webgpu": "9.1.0-alpha.16",
"@math.gl/core": "4.1.0-alpha.3"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions examples/tutorials/hello-cube/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@math.gl/core": "4.1.0-alpha.3"
},
"devDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions examples/tutorials/hello-gltf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"dependencies": {
"@loaders.gl/core": "^4.2.0",
"@loaders.gl/gltf": "^4.2.0",
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/gltf": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14",
"@luma.gl/webgpu": "9.1.0-alpha.14",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/gltf": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@luma.gl/webgpu": "9.1.0-alpha.16",
"@math.gl/core": "4.1.0-alpha.3"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions examples/tutorials/hello-instanced-cubes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14",
"@luma.gl/webgpu": "9.1.0-alpha.14",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@luma.gl/webgpu": "9.1.0-alpha.16",
"@math.gl/core": "4.1.0-alpha.3"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions examples/tutorials/hello-instancing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14"
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16"
},
"devDependencies": {
"typescript": "^5.5.0",
Expand Down
10 changes: 5 additions & 5 deletions examples/tutorials/hello-triangle-geometry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14",
"@luma.gl/webgpu": "9.1.0-alpha.14"
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@luma.gl/webgpu": "9.1.0-alpha.16"
},
"devDependencies": {
"typescript": "^5.5.0",
Expand Down
8 changes: 4 additions & 4 deletions examples/tutorials/hello-triangle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgpu": "9.1.0-alpha.14",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgpu": "9.1.0-alpha.16",
"@math.gl/core": "4.1.0-alpha.3"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions examples/tutorials/hello-two-cubes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgpu": "9.1.0-alpha.14",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgpu": "9.1.0-alpha.16",
"@math.gl/core": "4.1.0-alpha.3"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions examples/tutorials/lighting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@math.gl/core": "4.1.0-alpha.3"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions examples/tutorials/shader-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14"
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16"
},
"devDependencies": {
"typescript": "^5.5.0",
Expand Down
8 changes: 4 additions & 4 deletions examples/tutorials/shader-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14"
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16"
},
"devDependencies": {
"typescript": "^5.5.0",
Expand Down
9 changes: 5 additions & 4 deletions examples/tutorials/transform-feedback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14",
"@luma.gl/webgpu": "9.1.0-alpha.14"
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@luma.gl/webgpu": "9.1.0-alpha.16"
},
"devDependencies": {
"typescript": "^5.1.6",
Expand Down
7 changes: 4 additions & 3 deletions examples/tutorials/transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14",
"@luma.gl/webgl": "9.1.0-alpha.14",
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16",
"@luma.gl/webgl": "9.1.0-alpha.16",
"@probe.gl/log": "^4.0.8"
},
"devDependencies": {
Expand Down
5 changes: 3 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"npmClient": "yarn",
"exact": true,
"packages": [
"modules/*"
"modules/*",
"examples/*/*"
],
"command": {
"publish": {
Expand All @@ -18,4 +19,4 @@
"publishConfig": {
"access": "public"
}
}
}
4 changes: 2 additions & 2 deletions modules/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"prepublishOnly": "npm run build-minified-bundle && npm run build-dev-bundle"
},
"peerDependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14"
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16"
},
"dependencies": {
"@math.gl/core": "4.1.0-alpha.3",
Expand Down
6 changes: 3 additions & 3 deletions modules/gltf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"prepublishOnly": "npm run build-minified-bundle && npm run build-dev-bundle"
},
"peerDependencies": {
"@luma.gl/core": "9.1.0-alpha.14",
"@luma.gl/engine": "9.1.0-alpha.14",
"@luma.gl/shadertools": "9.1.0-alpha.14"
"@luma.gl/core": "9.1.0-alpha.16",
"@luma.gl/engine": "9.1.0-alpha.16",
"@luma.gl/shadertools": "9.1.0-alpha.16"
},
"dependencies": {
"@loaders.gl/core": "^4.2.0",
Expand Down
Loading
Loading