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

Embed on websites #2

Open
quantuminformation opened this issue Jul 25, 2017 · 6 comments
Open

Embed on websites #2

quantuminformation opened this issue Jul 25, 2017 · 6 comments
Assignees

Comments

@quantuminformation
Copy link
Owner

Would be cool to allow people to embed this game on their sites, eg in a 404 page.

@quantuminformation
Copy link
Owner Author

will publish to npm + allow people to pass canvas element to Game class

@quantuminformation
Copy link
Owner Author

this was tricker than I thought due to image paths

@generic-github-user
Copy link
Collaborator

You could also use an <iframe> with the src set to the hosted game page. Could be a little tricky to get the dimensions right for all screen sizes, but it should be doable and should avoid the cross-origin image loading issues.

@quantuminformation
Copy link
Owner Author

cross-origin wasn't the issue here, but the paths were relative to the npm directory in the game.

@generic-github-user
Copy link
Collaborator

I see. Let me know if you need any help.

@quantuminformation
Copy link
Owner Author

This would be helpful thx. Maybe the iframe is the simplest approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants