Skip to content

Commit

Permalink
chore: Use @math.gl/core instead of math.gl
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Jan 9, 2021
1 parent e212bd8 commit 3620e3a
Show file tree
Hide file tree
Showing 69 changed files with 1,130 additions and 646 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches:
- master
pull_request_target:
pull_request:

jobs:
test-node:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
],
"main": "index.js",
"dependencies": {
"@luma.gl/constants": "^8.1.0-beta.1"
"@luma.gl/constants": "^8.3.0"
}
}
2 changes: 1 addition & 1 deletion docs/getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The full contents of the `package.json` should be the following (dependency vers
"author": "",
"license": "ISC",
"dependencies": {
"@luma.gl/core": "^8.0.0"
"@luma.gl/core": "^8.3.0"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/hello-cube.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ As always, we'll start with our imports:
import {AnimationLoop, Model, CubeGeometry} from '@luma.gl/engine';
import {Texture2D, clear} from '@luma.gl/webgl';
import {setParameters} from '@luma.gl/gltools';
import {Matrix4} from 'math.gl';
import {Matrix4} from '@math.gl/core';
```

Our shaders are somewhat more involved that we've seen before:
Expand Down Expand Up @@ -105,7 +105,7 @@ If all went well, you should see a rotating cube with the Uber Visualization log
import {AnimationLoop, Model, CubeGeometry} from '@luma.gl/engine';
import {Texture2D, clear} from '@luma.gl/webgl';
import {setParameters} from '@luma.gl/gltools';
import {Matrix4} from 'math.gl';
import {Matrix4} from '@math.gl/core';

const vs = `\
attribute vec3 positions;
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/instanced-transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {AnimationLoop, Model, Transform, CubeGeometry} from '@luma.gl/engine';
import {Buffer, Texture2D, clear} from '@luma.gl/webgl';
import {setParameters, isWebGL2} from '@luma.gl/gltools';
import {phongLighting} from '@luma.gl/shadertools';
import {Matrix4} from 'math.gl';
import {Matrix4} from '@math.gl/core';
```
The vertex shader for our transform feedback is quite simple. It just increments a scalar rotation value on each run:

Expand Down Expand Up @@ -205,7 +205,7 @@ import {AnimationLoop, Model, Transform, CubeGeometry} from '@luma.gl/engine';
import {Buffer, Texture2D, clear} from '@luma.gl/webgl';
import {setParameters, isWebGL2} from '@luma.gl/gltools';
import {phongLighting} from '@luma.gl/shadertools';
import {Matrix4} from 'math.gl';
import {Matrix4} from '@math.gl/core';
const transformVs = `
attribute float rotations;
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/lighting.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {AnimationLoop, Model, CubeGeometry} from '@luma.gl/engine';
import {Texture2D, clear} from '@luma.gl/webgl';
import {setParameters} from '@luma.gl/gltools';
import {phongLighting} from '@luma.gl/shadertools';
import {Matrix4} from 'math.gl';
import {Matrix4} from '@math.gl/core';
```
The `phongLighting` shader module adds functions to our fragment shader to facilitate lighting calculations.

Expand Down Expand Up @@ -137,7 +137,7 @@ import {AnimationLoop, Model, CubeGeometry} from '@luma.gl/engine';
import {Texture2D, clear} from '@luma.gl/webgl';
import {setParameters} from '@luma.gl/gltools';
import {phongLighting} from '@luma.gl/shadertools';
import {Matrix4} from 'math.gl';
import {Matrix4} from '@math.gl/core';

const vs = `\
attribute vec3 positions;
Expand Down
2 changes: 1 addition & 1 deletion docs/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ This change will enable tree-shaking bundlers to remove unused experimental expo
Math functions were moved from luma.gl to the separate math.gl module in v4.1. As of v6.0, they are no longer forwarded by luma.gl and now need to be imported directly from math.gl:

```js
import {radians, degrees, Vector2, Vector3, Vector4, Matrix4} from 'math.gl';
import {radians, degrees, Vector2, Vector3, Vector4, Matrix4} from '@math.gl/core';
```

luma.gl v6.0 removes a number of previously deprecated symbols. luma.gl will now issue an error rather than a warning if the old usage is detecated.
Expand Down
2 changes: 1 addition & 1 deletion examples/api/animation/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import {AnimationLoop, CubeGeometry, Timeline, KeyFrames, Model} from '@luma.gl/engine';
import {setParameters} from '@luma.gl/gltools';
import {dirlight} from '@luma.gl/shadertools';
import {Matrix4, radians} from 'math.gl';
import {Matrix4, radians} from '@math.gl/core';
import {getRandom} from '../../utils';

const random = getRandom();
Expand Down
8 changes: 4 additions & 4 deletions examples/api/animation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/engine": "^8.2.0",
"@luma.gl/gltools": "^8.2.0",
"@luma.gl/shadertools": "^8.2.0",
"math.gl": "^3.1.3"
"@luma.gl/engine": "^8.3.0",
"@luma.gl/gltools": "^8.3.0",
"@luma.gl/shadertools": "^8.3.0",
"@math.gl/core": "^3.4.1"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/api/cubemap/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import GL from '@luma.gl/constants';
import {AnimationLoop, Model, CubeGeometry} from '@luma.gl/engine';
import {Texture2D, TextureCube, loadImage} from '@luma.gl/webgl';
import {setParameters} from '@luma.gl/gltools';
import {Matrix4, radians} from 'math.gl';
import {Matrix4, radians} from '@math.gl/core';

const INFO_HTML = `
<p>
Expand Down
10 changes: 5 additions & 5 deletions examples/api/cubemap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"build": "webpack --env.analyze"
},
"dependencies": {
"@luma.gl/constants": "^8.2.0",
"@luma.gl/engine": "^8.2.0",
"@luma.gl/gltools": "^8.2.0",
"@luma.gl/webgl": "^8.2.0",
"math.gl": "^3.1.3"
"@luma.gl/constants": "^8.3.0",
"@luma.gl/engine": "^8.3.0",
"@luma.gl/gltools": "^8.3.0",
"@luma.gl/webgl": "^8.3.0",
"@math.gl/core": "^3.4.1"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/api/program-management/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {AnimationLoop, Model, ProgramManager} from '@luma.gl/core';
import {setParameters} from '@luma.gl/gltools';
import {dirlight as dirlightBase} from '@luma.gl/shadertools';
import {CubeGeometry} from '@luma.gl/engine';
import {Matrix4, radians} from 'math.gl';
import {Matrix4, radians} from '@math.gl/core';
import {getRandom} from '../../utils';

const random = getRandom();
Expand Down
10 changes: 5 additions & 5 deletions examples/api/program-management/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/core": "^8.2.0",
"@luma.gl/engine": "^8.2.0",
"@luma.gl/gltools": "^8.2.0",
"@luma.gl/shadertools": "^8.2.0",
"math.gl": "^3.1.3"
"@luma.gl/core": "^8.3.0",
"@luma.gl/engine": "^8.3.0",
"@luma.gl/gltools": "^8.3.0",
"@luma.gl/shadertools": "^8.3.0",
"@math.gl/core": "^3.4.1"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/api/texture-3d/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {AnimationLoop, Model} from '@luma.gl/engine';
import {Texture3D, Buffer} from '@luma.gl/webgl';
import {setParameters, isWebGL2} from '@luma.gl/gltools';
import {Matrix4, radians} from 'math.gl';
import {Matrix4, radians} from '@math.gl/core';
import {perlin, lerp, shuffle, range} from './perlin';
import {getRandom} from '../../utils';

Expand Down
8 changes: 4 additions & 4 deletions examples/api/texture-3d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/engine": "^8.2.0",
"@luma.gl/webgl": "^8.2.0",
"@luma.gl/gltools": "^8.2.0",
"math.gl": "^3.1.3"
"@luma.gl/engine": "^8.3.0",
"@luma.gl/webgl": "^8.3.0",
"@luma.gl/gltools": "^8.3.0",
"@math.gl/core": "^3.4.1"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/getting-started/external-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/gltools": "^8.2.0",
"@luma.gl/webgl": "^8.2.0",
"@luma.gl/engine": "^8.2.0",
"@luma.gl/gltools": "^8.3.0",
"@luma.gl/webgl": "^8.3.0",
"@luma.gl/engine": "^8.3.0",
"core-js": "^3.5.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/getting-started/hello-cube/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {AnimationLoop, Model, CubeGeometry} from '@luma.gl/engine';
import {Texture2D, clear} from '@luma.gl/webgl';
import {setParameters} from '@luma.gl/gltools';
import {Matrix4} from 'math.gl';
import {Matrix4} from '@math.gl/core';

const INFO_HTML = `
<p>
Expand Down
10 changes: 5 additions & 5 deletions examples/getting-started/hello-cube/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"build": "webpack --env.analyze"
},
"dependencies": {
"@luma.gl/engine": "^8.2.0",
"@luma.gl/gltools": "^8.2.0",
"@luma.gl/shadertools": "^8.2.0",
"@luma.gl/webgl": "^8.2.0",
"math.gl": "^3.1.3"
"@luma.gl/engine": "^8.3.0",
"@luma.gl/gltools": "^8.3.0",
"@luma.gl/shadertools": "^8.3.0",
"@luma.gl/webgl": "^8.3.0",
"@math.gl/core": "^3.4.1"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/getting-started/hello-instancing-high/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/webgl": "^8.2.0",
"@luma.gl/engine": "^8.2.0",
"@luma.gl/webgl": "^8.3.0",
"@luma.gl/engine": "^8.3.0",
"core-js": "^3.5.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/getting-started/hello-instancing-low/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/engine": "^8.2.0",
"@luma.gl/gltools": "^8.2.0",
"@luma.gl/engine": "^8.3.0",
"@luma.gl/gltools": "^8.3.0",
"core-js": "^3.5.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions examples/getting-started/hello-instancing-mid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/webgl": "^8.2.0",
"@luma.gl/engine": "^8.2.0",
"@luma.gl/shadertools": "^8.2.0"
"@luma.gl/webgl": "^8.3.0",
"@luma.gl/engine": "^8.3.0",
"@luma.gl/shadertools": "^8.3.0"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/getting-started/hello-triangle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/webgl": "^8.2.0",
"@luma.gl/engine": "^8.2.0"
"@luma.gl/webgl": "^8.3.0",
"@luma.gl/engine": "^8.3.0"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/getting-started/instanced-transform/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {AnimationLoop, Model, Transform, CubeGeometry} from '@luma.gl/engine';
import {Buffer, Texture2D, clear} from '@luma.gl/webgl';
import {setParameters, isWebGL2} from '@luma.gl/gltools';
import {phongLighting} from '@luma.gl/shadertools';
import {Matrix4} from 'math.gl';
import {Matrix4} from '@math.gl/core';
import {getRandom} from '../../utils';

const INFO_HTML = `
Expand Down
10 changes: 5 additions & 5 deletions examples/getting-started/instanced-transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"build": "webpack --env.analyze"
},
"dependencies": {
"@luma.gl/engine": "^8.2.0",
"@luma.gl/gltools": "^8.2.0",
"@luma.gl/shadertools": "^8.2.0",
"@luma.gl/webgl": "^8.2.0",
"math.gl": "^3.1.3"
"@luma.gl/engine": "^8.3.0",
"@luma.gl/gltools": "^8.3.0",
"@luma.gl/shadertools": "^8.3.0",
"@luma.gl/webgl": "^8.3.0",
"@math.gl/core": "^3.4.1"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/getting-started/lighting/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {AnimationLoop, Model, CubeGeometry} from '@luma.gl/engine';
import {Texture2D, clear} from '@luma.gl/webgl';
import {setParameters} from '@luma.gl/gltools';
import {phongLighting} from '@luma.gl/shadertools';
import {Matrix4} from 'math.gl';
import {Matrix4} from '@math.gl/core';

const INFO_HTML = `
<p>
Expand Down
10 changes: 5 additions & 5 deletions examples/getting-started/lighting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"build": "webpack --env.analyze"
},
"dependencies": {
"@luma.gl/engine": "^8.2.0",
"@luma.gl/gltools": "^8.2.0",
"@luma.gl/shadertools": "^8.2.0",
"@luma.gl/webgl": "^8.2.0",
"math.gl": "^3.1.3"
"@luma.gl/engine": "^8.3.0",
"@luma.gl/gltools": "^8.3.0",
"@luma.gl/shadertools": "^8.3.0",
"@luma.gl/webgl": "^8.3.0",
"@math.gl/core": "^3.4.1"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/getting-started/shader-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/webgl": "^8.2.0",
"@luma.gl/engine": "^8.2.0"
"@luma.gl/webgl": "^8.3.0",
"@luma.gl/engine": "^8.3.0"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/getting-started/shader-modules-low/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/engine": "^8.2.0",
"@luma.gl/gltools": "^8.2.0",
"@luma.gl/shadertools": "^8.2.0",
"@luma.gl/engine": "^8.3.0",
"@luma.gl/gltools": "^8.3.0",
"@luma.gl/shadertools": "^8.3.0",
"core-js": "^3.5.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions examples/getting-started/transform-feedback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/webgl": "^8.2.0",
"@luma.gl/engine": "^8.2.0",
"@luma.gl/gltools": "^8.2.0"
"@luma.gl/webgl": "^8.3.0",
"@luma.gl/engine": "^8.3.0",
"@luma.gl/gltools": "^8.3.0"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/performance/stress-test/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {AnimationLoop, Model, CubeGeometry} from '@luma.gl/engine';
import {clear, Texture2D, Buffer} from '@luma.gl/webgl';
import {dirlight} from '@luma.gl/shadertools';
import {withParameters, isWebGL2} from '@luma.gl/gltools';
import {Matrix4, radians} from 'math.gl';
import {Matrix4, radians} from '@math.gl/core';
import {StatsWidget} from '@probe.gl/stats-widget';
import {getRandom} from '../../utils';

Expand Down
12 changes: 6 additions & 6 deletions examples/performance/stress-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/constants": "^8.2.0",
"@luma.gl/engine": "^8.2.0",
"@luma.gl/webgl": "^8.2.0",
"@luma.gl/gltools": "^8.2.0",
"@luma.gl/shadertools": "^8.2.0",
"@luma.gl/constants": "^8.3.0",
"@luma.gl/engine": "^8.3.0",
"@luma.gl/webgl": "^8.3.0",
"@luma.gl/gltools": "^8.3.0",
"@luma.gl/shadertools": "^8.3.0",
"@probe.gl/stats-widget": "^3.2.1",
"math.gl": "^3.1.3"
"@math.gl/core": "^3.4.1"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down

0 comments on commit 3620e3a

Please sign in to comment.