Skip to content

Commit

Permalink
Gatsby update (#1030)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen authored Apr 3, 2019
1 parent 323a1ce commit 8055588
Show file tree
Hide file tree
Showing 46 changed files with 202 additions and 97 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
yarn.lock -diff
build/** -diff
dist/** -diff
_docs/** -diff
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
],
"main": "index.js",
"dependencies": {
"@luma.gl/constants": "^7.0.0-alpha.6"
"@luma.gl/constants": "^7.0.0-beta"
}
}
4 changes: 2 additions & 2 deletions examples/core/cubemap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"build": "webpack --env.analyze"
},
"dependencies": {
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/core/dof/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/core/fragment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open"
},
"dependencies": {
"@luma.gl/core": "^7.0.0-alpha"
"@luma.gl/core": "^7.0.0-beta"
},
"devDependencies": {
"webpack": "^4.3.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/core/gltf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
},
"dependencies": {
"@loaders.gl/core": "v1.0.0-alpha.2",
"@luma.gl/addons": "^7.0.0-alpha.16",
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/addons": "^7.0.0-beta",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/core/instancing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/core": "7.0.0-alpha",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/core/mandelbrot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/core": "^7.0.0-alpha"
"@luma.gl/core": "^7.0.0-beta"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/core/persistence/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open --mode=development"
},
"dependencies": {
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/core/shadowmap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/core/texture-3d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": "webpack --env.local --env.analyze --profile --json > stats.json"
},
"dependencies": {
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1",
"noise3d": "^1.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/core/transform-feedback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/core": "^7.0.0-alpha"
"@luma.gl/core": "^7.0.0-beta"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/core/transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/core": "^7.0.0-beta",
"probe.gl": "^3.0.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/lessons/01/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/core": "^7.0.0-alpha"
"@luma.gl/core": "^7.0.0-beta"
},
"devDependencies": {
"webpack": "^4.3.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/lessons/02/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/core": "^7.0.0-alpha"
"@luma.gl/core": "^7.0.0-beta"
},
"devDependencies": {
"webpack": "^4.3.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/lessons/03/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/core": "^7.0.0-alpha"
"@luma.gl/core": "^7.0.0-beta"
},
"devDependencies": {
"webpack": "^4.3.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/lessons/04/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/core": "^7.0.0-alpha"
"@luma.gl/core": "^7.0.0-beta"
},
"devDependencies": {
"webpack": "^4.3.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/lessons/05/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions examples/lessons/06/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/addons": "^7.0.0-alpha",
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/addons": "^7.0.0-beta",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions examples/lessons/07/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/addons": "^7.0.0-alpha",
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/addons": "^7.0.0-beta",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions examples/lessons/08/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/addons": "^7.0.0-alpha",
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/addons": "^7.0.0-beta",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/lessons/09/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/addons": "^7.0.0-alpha"
"@luma.gl/core": "^7.0.0-beta",
"@luma.gl/addons": "^7.0.0-beta"
},
"devDependencies": {
"webpack": "^4.3.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/lessons/10/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/addons": "^7.0.0-beta.1",
"@luma.gl/constants": "^7.0.0-beta.1",
"@luma.gl/core": "^7.0.0-beta.1",
"@luma.gl/addons": "^7.0.0-beta",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
26 changes: 15 additions & 11 deletions examples/lessons/11/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,32 +173,36 @@ function addMouseHandler(canvas) {

function getControlValues() {
/* global document */
let element = null;
function getElementValue(id, defaultValue) {
const element = document.getElementById(id);
return element ? parseFloat(element.value) : defaultValue;
}

const lighting = (element = document.getElementById('lighting')) ? element.checked : true;
const element = document.getElementById('lighting');
const lighting = element ? element.checked : true;

const ambientColor =
lighting &&
new Vector3(
parseFloat((element = document.getElementById('ambientR')) ? element.value : '0.2'),
parseFloat((element = document.getElementById('ambientG')) ? element.value : '0.2'),
parseFloat((element = document.getElementById('ambientB')) ? element.value : '0.2')
getElementValue('ambientR', 0.2),
getElementValue('ambientG', 0.2),
getElementValue('ambientB', 0.2)
);

const lightingDirection =
lighting &&
new Vector3(
parseFloat((element = document.getElementById('lightDirectionX')) ? element.value : '-1'),
parseFloat((element = document.getElementById('lightDirectionY')) ? element.value : '-1'),
parseFloat((element = document.getElementById('lightDirectionZ')) ? element.value : '-1')
getElementValue('lightDirectionX', -1),
getElementValue('lightDirectionY', -1),
getElementValue('lightDirectionZ', -1)
);

const directionalColor =
lighting &&
new Vector3(
parseFloat((element = document.getElementById('directionalR')) ? element.value : '0.8'),
parseFloat((element = document.getElementById('directionalG')) ? element.value : '0.8'),
parseFloat((element = document.getElementById('directionalB')) ? element.value : '0.8')
getElementValue('directionalR', 0.8),
getElementValue('directionalG', 0.8),
getElementValue('directionalB', 0.8)
);

return {lighting, ambientColor, lightingDirection, directionalColor};
Expand Down
6 changes: 3 additions & 3 deletions examples/lessons/11/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/addons": "^7.0.0-alpha",
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/addons": "^7.0.0-beta",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
27 changes: 16 additions & 11 deletions examples/lessons/12/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,30 +117,35 @@ const animationLoop = new AnimationLoop({

const uVMatrix = new Matrix4().lookAt({eye: eyePos, center: [0, 0, 0], up: [0, 1, 0]});

let element = null;
/* global document */
const lighting = (element = document.getElementById('lighting')) ? element.checked : true;
function getElementValue(id, defaultValue) {
const element = document.getElementById(id);
return element ? element.value : defaultValue;
}

const element = document.getElementById('lighting');
const lighting = element ? element.checked : true;

moon.setUniforms({uUseLighting: lighting});
cube.setUniforms({uUseLighting: lighting});

if (lighting) {
const ambientColor = new Vector3(
parseFloat((element = document.getElementById('ambientR')) ? element.value : '0.2'),
parseFloat((element = document.getElementById('ambientG')) ? element.value : '0.2'),
parseFloat((element = document.getElementById('ambientB')) ? element.value : '0.2')
parseFloat(getElementValue('ambientR', 0.2)),
parseFloat(getElementValue('ambientG', 0.2)),
parseFloat(getElementValue('ambientB', 0.2))
);

const pointLightingLocation = new Vector3(
parseFloat((element = document.getElementById('lightPositionX')) ? element.value : '0'),
parseFloat((element = document.getElementById('lightPositionY')) ? element.value : '0'),
parseFloat((element = document.getElementById('lightPositionZ')) ? element.value : '0')
parseFloat(getElementValue('lightPositionX', 0)),
parseFloat(getElementValue('lightPositionY', 0)),
parseFloat(getElementValue('lightPositionZ', 0))
);

const pointLightColor = new Vector3(
parseFloat((element = document.getElementById('pointR')) ? element.value : '0.8'),
parseFloat((element = document.getElementById('pointG')) ? element.value : '0.8'),
parseFloat((element = document.getElementById('pointB')) ? element.value : '0.8')
parseFloat(getElementValue('pointR', 0.8)),
parseFloat(getElementValue('pointG', 0.8)),
parseFloat(getElementValue('pointB', 0.8))
);

moon.setUniforms({
Expand Down
4 changes: 2 additions & 2 deletions examples/lessons/12/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/lessons/13/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/lessons/14/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/core": "^7.0.0-alpha"
"@luma.gl/core": "^7.0.0-beta"
},
"devDependencies": {
"webpack": "^4.3.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/lessons/15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/lessons/16/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"start-local": "webpack-dev-server --env.local --progress --hot --open -d"
},
"dependencies": {
"@luma.gl/constants": "^7.0.0-alpha.3",
"@luma.gl/core": "^7.0.0-alpha",
"@luma.gl/constants": "^7.0.0-beta",
"@luma.gl/core": "^7.0.0-beta",
"math.gl": "^2.3.1"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 8055588

Please sign in to comment.