Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add pdf support #5896
Add pdf support #5896
Changes from all commits
f272a1f
0774fd7
c8e3284
bb190db
f9ff3c8
026a46f
f810a7b
640fdc1
287bd43
7819dbf
73e2491
b8d3372
72a490b
65d8061
22b59ad
45b9a57
d1430c4
10ab0f5
aea1863
5bcc818
57c98cf
8a7ebad
0f0ef10
276b083
b6c9d80
1d46c4d
f89c7e0
49287ca
98842a4
50aebc7
29af0b6
f714900
f9aea69
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
It would be nice to avoid this call to
anyEntityWith
.One option is to memoize
menu
, as inAnother option that seems nice is to set
menu
in apreload
, since it feels correct to assign it as part of initialization. This commit explores that idea bbbe398 . The calling code looks like this:The inner function will be repeated in a
setInterval
until it returns true.I don't know the best way to handle cases like this where we are assuming that some long-lived entity will be created during initialization, and we want to hold a reference to it. I'd like to avoid sticking more things on
APP
when this comes up.For now, the simplest solution I could come up with is to just call
anyEntityWith
every tick (with a!
for type coercion), even though it'll be the same entity every time.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.
For video menu we just made a query and grabbed the first element, which is basically the same as anyEntityWith.
I definitely like the idea of doing it in a preload. The setInterval seems surprising. Ideally we should be able to do it synchronously. Maybe the functions you pass to prelaod get called after APP has been set up and passed a world. Some obviously will also be async after that, but this one shouldn't need to be.
We could also just have a way to get the world with a promise which would remove the need to modify preload.