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

[refactor] Make scene definition synchronous by supplying our own Timeline #112

Merged
merged 11 commits into from
Jun 16, 2021

Conversation

chrisgervang
Copy link
Collaborator

@chrisgervang chrisgervang commented Jun 15, 2021

  • async new DeckAdapter({sceneBuilder}) removed, replaced by synchronous scene object parameter.
  • DeckAdapter.render({setReady}) is now optional since deck will only be referenced when recording.
  • Removed complexity inside DeckAdapter implementation.
  • Docs

@@ -71,16 +72,15 @@ export default function App() {
});
}, [viewStateA, viewStateB]);

const getDeckScene = timeline => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously users had to provide a callback so that deck could supply the timeline. It's confusing and not necessary.

@coveralls
Copy link

coveralls commented Jun 15, 2021

Pull Request Test Coverage Report for Build 941589418

  • 0 of 17 (0.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.7%) to 22.284%

Changes Missing Coverage Covered Lines Changed/Added Lines %
modules/core/src/adapters/deck-adapter.js 0 17 0.0%
Files with Coverage Reduction New Missed Lines %
modules/core/src/adapters/deck-adapter.js 2 0%
Totals Coverage Status
Change from base Build 941587490: 0.7%
Covered Lines: 139
Relevant Lines: 536

💛 - Coveralls

@@ -103,7 +103,7 @@ export default function App() {
}}
controller={true}
effects={[vignetteEffect, aaEffect]}
{...adapter.getProps({deckRef, setReady, onNextFrame, getLayers})}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We get to remove React Ref from hubble's interface, which helps #22 eventually happen.

constructor(sceneBuilder, glContext = undefined) {
this.sceneBuilder = sceneBuilder;
constructor(scene, glContext = undefined) {
this.scene = scene;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scene is now always defined, so the undefined behavior branches can be removed.

@chrisgervang chrisgervang merged commit c96685f into master Jun 16, 2021
@chrisgervang chrisgervang deleted the chr/hubble-timeline branch June 16, 2021 04:29
@chrisgervang chrisgervang added this to the 1.3 milestone Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants