question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:

  • hex grids
  • grids
  • tokens

Things missing in the 2D component set:

  • ability to drag / drop tokens (currently only implemented for cards / decks)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
nicolodaviscommented, Mar 12, 2019

FYI: Might be worth checking out https://github.com/drcmda/react-three-fiber for the 3D stuff.

1reaction
Korlacommented, Oct 6, 2018

Alright, I’ll start working on it on that branch on my fork, and will make PR(s) to your branch as necessary.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Semantic UI
Semantic is a development framework that helps create beautiful, responsive layouts using human-friendly HTML. Concise HTML. Semantic UI treats words andΒ ...
Read more >
You Don't Need A UI Framework - Smashing Magazine
By β€œUI framework”, I mean any third-party package that is focused on providing styled UI components. It includes CSS frameworks like Bootstrap,Β ...
Read more >
What is UI Framework and Reasons to Use UI Framework?
UI stands for (User-Interface), and a UI framework is a software tool for building software programs to run on the web, in the...
Read more >
7 Best React UI Framework and Component Libraries in 2022
Best React framework and component libraries in 2022 Β· Material UI Β· Grommet Β· React Redux Β· React Router Β· Blueprint UI Β·...
Read more >
UIkit
A lightweight and modular front-end framework for developing fast and powerful web interfaces. Get Started Get Started.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found