Skip to content

Commit

Permalink
Pulling in upstream (#16)
Browse files Browse the repository at this point in the history
* Upgrade packages, downgrade node (for now) (#14)

Pinning node to version 12.6.3 per discussion. Upgrading to deck 8.2.2

* Improve App Integration: Make Camera and Layers Optional in a DeckScene (#15)

* Minor keyframe class clean up, removing unused defaults

* Camera and Layers are optional in a DeckScene

- Animating the camera is optional, but if a keyframe is defined then viewState is controlled by camera keyframe.
  - To Use: do not provide a `camera` to `keyframes` parameter when constructing DeckScene.
- Animating layers is optional, only replace layers prop when scene provides layers.
  - To Use: do not provide a `renderLayers` parameter when constructing DeckScene

* Adding Camera Example to docs

* [FIX/ADD] Fixed missing steps to instructions + added extra notation (#13)

* [FIX/ADD] Fixed missing steps to instructions + added extra notation

* [FIX] Forgot missing step in #8

* [FIX/ADD] Fix step 9 and added clarification

* [DEL] Extraneous folders/files

* Adding a ResolutionGuide component to examples...(#17)

...so the background doesn't look so empty.

* v1.1.0-alpha.3 (#18)

* v1.1.0-alpha.4

* Bump lodash from 4.17.15 to 4.17.19

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <[email protected]>

* Bump elliptic from 6.5.2 to 6.5.3

Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](indutny/elliptic@v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: RaymondDashWu <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 11, 2020
1 parent 32b1234 commit f22467f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
12 changes: 4 additions & 8 deletions examples/camera/app.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import React, {useState, useRef} from 'react';
import DeckGL from '@deck.gl/react';
import {DeckAdapter} from '@hubble.gl/core';
import {DeckAdapter, CameraKeyframes} from '@hubble.gl/core';
import {useNextFrame, BasicControls, ResolutionGuide} from '@hubble.gl/react';
import {sceneBuilder} from './scene';
import {layers} from './layers';
import {vignette, fxaa} from '@luma.gl/shadertools';
import {PostProcessEffect} from '@deck.gl/core';

import {CameraKeyframes} from '@hubble.gl/core';
import {easing} from 'popmotion';

const INITIAL_VIEW_STATE = {
Expand Down Expand Up @@ -41,9 +39,7 @@ export default function App() {
const deckgl = useRef(null);
const [ready, setReady] = useState(false);
const [busy, setBusy] = useState(false);

const [viewState, setViewState] = useState(INITIAL_VIEW_STATE); //Added to maintain user's interactions with viewState

const nextFrame = useNextFrame();

const updateCamera = (prevCamera) => {
Expand Down Expand Up @@ -79,18 +75,18 @@ export default function App() {
</div>
<DeckGL
ref={deckgl}
initialViewState={INITIAL_VIEW_STATE}
parameters={{
depthTest: false,
clearColor: [61 / 255, 20 / 255, 76 / 255, 1]
// blend: true,
// blendEquation: GL.FUNC_ADD,
// blendFunc: [GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA]
}}

viewState={viewState}
onViewStateChange={({viewState}) => {
setViewState(viewState);
}}
controller={true}

effects={[vignetteEffect, aaEffect]}
layers={layers}
{...adapter.getProps(deckgl, setReady, nextFrame)}
Expand Down
1 change: 0 additions & 1 deletion examples/camera/scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export async function sceneBuilder(animationLoop) {
easings: [easing.easeInOut]
})
};

const currentCamera = animationLoop.timeline.attachAnimation(keyframes.camera);

return new DeckScene({
Expand Down
1 change: 0 additions & 1 deletion modules/core/src/adapters/deck-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export default class DeckAdapter {

// Animating the camera is optional, but if a keyframe is defined then viewState is controlled by camera keyframe.
if (this.scene && this.scene.keyframes.camera && this.enabled) {

props.controller = false;
props.viewState = this._getViewState();
}
Expand Down
4 changes: 4 additions & 0 deletions modules/core/src/scene/deck-scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export default class DeckScene {
return Boolean(this._renderLayers);
}

hasLayers() {
return Boolean(this._renderLayers);
}

renderLayers() {
return this._renderLayers(this);
}
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2575,9 +2575,9 @@ bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5:
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==

bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0:
version "4.11.8"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==
version "4.11.9"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828"
integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==

bn.js@^5.1.1:
version "5.1.1"
Expand Down Expand Up @@ -3881,9 +3881,9 @@ electron-to-chromium@^1.3.413:
integrity sha512-HMDYkANGhx6vfbqpOf/hc6hWEmiOipOHGDeRDeUb3HLD3XIWpvKQxFgWf0tgHcr3aNv6I/8VPecplqmQsXoZSw==

elliptic@^6.0.0, elliptic@^6.5.2:
version "6.5.2"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762"
integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==
version "6.5.3"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6"
integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==
dependencies:
bn.js "^4.4.0"
brorand "^1.0.1"
Expand Down Expand Up @@ -6266,9 +6266,9 @@ lodash.uniq@^4.5.0:
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=

lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.2.1:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
version "4.17.19"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==

log-driver@^1.2.7:
version "1.2.7"
Expand Down

0 comments on commit f22467f

Please sign in to comment.