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

Provide a super-simple "Hello, World!"-like example #17

Closed
tstelzer opened this issue Mar 12, 2019 · 3 comments
Closed

Provide a super-simple "Hello, World!"-like example #17

tstelzer opened this issue Mar 12, 2019 · 3 comments

Comments

@tstelzer
Copy link

First of all, thank you so much for bringing together two awesome libraries -- I have been an adamant user of react and just recently discovered three.js -- mixing the two sounds awesome. I appreciate your work so much!

Something I am missing is a super-simple "Hello, World!"-like example that does not go into the details of the API (like the examples/components files), but only draws a static cube, or something.

The first example in the README could be such a thing, however, I am unsure if those just dummy / pseudo-examples? I tried to copy&paste the first (under "How it looks like"), amending all the missing dependencies, of course, and I got:

screengrab-2019-03-12_10 28 05

... should it look like that? I don't know. Probably not. If you look at the three.js getting started, they build a cube and rotate it. That's it. I fear, what you have as the first example is already too complex. I would love to help by pushing a PR, however I admit, I am still struggling to get a minimum working example running (will probably try to clone the examples/components next).

I believe a dead-simple example like a rotating cube, similar to the three.js getting-started could drive adoption and avoid some frustration.

Best

Timm

@drcmda
Copy link
Member

drcmda commented Mar 12, 2019

Ah, that's the auto-resize, you must put the containing div to relative or absolute and give it a size, otherwise it will be pushed out of bounds. I'm still figuring out how to either do this better or communicate it. That's been a known issue with auto-measuring tools. I could also not measure, like a generic canvas and leave that up to you, but that wouldn't be convenient. Any ideas?

@drcmda
Copy link
Member

drcmda commented Mar 12, 2019

Here's the example, with root having a fixed size: https://codesandbox.io/s/rrppl0y8l4 I'll mention this in the GH front.

@tstelzer
Copy link
Author

Ah, having a working codesandbox for that is even better. Thanks!

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

No branches or pull requests

2 participants