-
Notifications
You must be signed in to change notification settings - Fork 29
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
Conversation
@@ -71,16 +72,15 @@ export default function App() { | |||
}); | |||
}, [viewStateA, viewStateB]); | |||
|
|||
const getDeckScene = timeline => { |
There was a problem hiding this comment.
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.
Pull Request Test Coverage Report for Build 941589418
💛 - Coveralls |
@@ -103,7 +103,7 @@ export default function App() { | |||
}} | |||
controller={true} | |||
effects={[vignetteEffect, aaEffect]} | |||
{...adapter.getProps({deckRef, setReady, onNextFrame, getLayers})} |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
new DeckAdapter({sceneBuilder})
removed, replaced by synchronousscene
object parameter.DeckAdapter.render({setReady})
is now optional since deck will only be referenced when recording.DeckAdapter
implementation.