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

Fix simple scene rendering #141

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

frank-weindel
Copy link
Collaborator

Simple scenes that do not involve textures, text or any later mutations were not rendering to the canvas. This is due to the default texture "ColorTexture" not being loaded prior to the scene being rendered. This texture must be loaded before any solid color Nodes will render. When this issue was happening the RAF was paused right before the texture was loaded and that texture loaded event did not trigger a requestRender() from the stage.

The solution here is to request a render once from the stage after the default texture has loaded.

Fixes #123

Simple scenes that do not involve textures, text or any later mutations were not
rendering to the canvas. This is due to the default texture "ColorTexture" not
being loaded prior to the scene being rendered. This texture must be loaded
before any solid color Nodes will render. When this issue was happening
the RAF was paused right before the texture was loaded and that texture loaded
event did not trigger a requestRender() from the stage.

The solution here is to request a render once from the stage after the default
texture has loaded.
Copy link
Contributor

@wouterlucas wouterlucas left a comment

Choose a reason for hiding this comment

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

nice1 👌

Copy link
Contributor

@michielvandergeest michielvandergeest left a comment

Choose a reason for hiding this comment

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

👍

@frank-weindel frank-weindel added this pull request to the merge queue Jan 30, 2024
Merged via the queue into main with commit ff7c86d Jan 30, 2024
2 checks passed
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.

Renderer doesn't render anything, unless there is at least 1 text node or a node with a src or texture
5 participants