-
Notifications
You must be signed in to change notification settings - Fork 558
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
Newlines don't work with Canvas rendering #1213
Comments
ok hmmmm i dont think who created this framework is alive rn |
This comment has been minimized.
This comment has been minimized.
@nekromoff please don't hijack my thread to talk about whether CraftyJS is dead or not. The last commit was in 2018. |
This comment has been minimized.
This comment has been minimized.
Well, as far as I know \n in JS language always puts text in new line, so just try putting a simple space between. Just guessing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just want to point out that the code below works if your component has DOM, but not Canvas (and obviously not WebGL, which doesn't seem to support text yet):
Crafty.e("Text").text("hi\nthere")
Renders in Canvas as
hi there
and in DOM as:Tested with v0.9.0.
The text was updated successfully, but these errors were encountered: