Just recording the current state and future work planned.
We're going to ship both 2D and 3D (using threejs) components! The two sets of components will be created using the same API so you can seamlessly switch between the two.
I've started a new branch 3d to track development of this. I've split the UI framework into 2d and 3d directories:
src/ui/
โโโ 2d
โย ย โโโ card.css
โย ย โโโ card.js
โย ย โโโ card.test.js
โย ย โโโ deck.css
โย ย โโโ deck.js
โย ย โโโ deck.test.js
โย ย โโโ grid.js
โย ย โโโ grid.test.js
โย ย โโโ hex.js
โย ย โโโ hex.test.js
โย ย โโโ logo.js
โย ย โโโ logo.test.js
โย ย โโโ token.js
โย ย โโโ token.test.js
โย ย โโโ ui.js
โย ย โโโ ui.ssr.test.js
โย ย โโโ ui.test.js
โโโ 3d
โย ย โโโ card.css
โย ย โโโ card.js
โย ย โโโ deck.css
โย ย โโโ deck.js
โย ย โโโ grid.js
โย ย โโโ hex.js
โย ย โโโ token.js
โย ย โโโ ui.js
โโโ card.js
โโโ deck.js
โโโ grid.js
โโโ hex.js
โโโ hex-utils.js
โโโ hex-utils.test.js
โโโ token.js
โโโ ui-context.js
โโโ ui.js
Each component has a file in the root directory (which is exposed as the public API) and one in each of the 2d and 3d directories. The root component just delegates to the appropriate rendering component based on a prop that you pass to the <UI> element.
For example:
<UI>
<Deck><Card/></Deck>
</UI>
renders DOM elements as cards and decks, whereas:
<UI three={true}>
<Deck><Card/></Deck>
</UI>
renders to a threejs canvas.
Things missing in the 3D component set:
Things missing in the 2D component set:
@Korla Are you still interested in working on the 3D hex grid?
@nicolodavis Yes I am, I have been occupied for a while with making "The Hive" using boardgame.io, but it's gotten to the point where a 3D-renderer is actually a good next step, so I could take a stab at implementing the hex renderer.
Will you be merging your 3D-branch with master some time soon, or should I start working on it off your branch?
Let's keep it as a separate branch for now and work on that. I'll merge it in once the 3D components have feature parity with the 2D components.
Alright, I'll start working on it on that branch on my fork, and will make PR(s) to your branch as necessary.
FYI, I am working now on the "ability to drag / drop tokens (currently only implemented for cards / decks)" for the 2D component
Is anyone doing the grid, hex map or tokens right now? I am interested in doing them.
Are you talking about the 3D components? I think @Korla signed up for them but probably got busy.
Are you talking about the 3D components? I think @Korla signed up for them but probably got busy.
Yes, I am trying to make change on the 3D-branch right now. Btw, any ideas on how to guide the camera in 3D?
I'm going to merge the 3D branch into master after https://github.com/nicolodavis/boardgame.io/pull/316 so just be aware of that. It probably won't change any of the directory structure, but just the destination of your pull request once you're done with your change.
About camera views, we should probably have a pan mode. The threejs repo has some examples of this I think, but I haven't had time to explore them yet.
I'm almost ready to merge the 3d branch into master. The one remaining item is that token.js does not have 100% test coverage.
@flamecoals I think this was from your PR #316?

Yes, I think it is my fault, I will raise a PR to fix it.
On Mon, Jan 21, 2019, 10:20 AM Nicolo John Davis notifications@github.com
wrote:
I'm almost ready to merge the 3d branch into master. The one remaining
item is that token.js does not have 100% test coverage.@flamecoals https://github.com/flamecoals I think this was from your PR
316 https://github.com/nicolodavis/boardgame.io/pull/316?
[image: screenshot from 2019-01-21 23-17-22]
https://user-images.githubusercontent.com/236078/51483073-222a1900-1dd3-11e9-9030-95661aa25eb6.pngโ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nicolodavis/boardgame.io/issues/282#issuecomment-456109043,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA_Jh2PmPZ7DfzKMZgqzIFXO4-VoxJ12ks5vFdrJgaJpZM4XKUyW
.
Merged into master.
FYI: Might be worth checking out https://github.com/drcmda/react-three-fiber for the 3D stuff.
This is interesting, I'll have a look
This effort has stalled a bit.
I'm going to propose a slightly different direction (I'll link to a new issue and close this one):
New design to follow in a separate issue (#455).
Most helpful comment
FYI: Might be worth checking out https://github.com/drcmda/react-three-fiber for the 3D stuff.