Comments (2)
Hello. I recommend getting familiar with hexagon cube coordinates since that's what I use as a basis for the grid. More specifically, in HexGrid.js
you can see that I have a cached property _directions
(also _diagonals
) that you can use to find the neighboring tile in the direction you want to go in, and then simply adding the Cell
values within those arrays to keep going for whatever distance you wish.
There's a lot of Threejs tutorials on how to display text in a way that always faces the camera - I recommend digging one of those up. Once you have the text showing, you could modify the Tile.js
class to create the text object and attach it to the THREE.Mesh
the Tile
uses, or at least copy its position
Vector3.
Be sure to use the dev
branch - the difference is much more clear there. A Cell
is simply the position and other data that's relevant to the grid classes for their own use. A Tile
is the actual 3D mesh that copies the cell's position for displaying in the correct place.
If this answered your questions, please close this issue, I'd appreciate it.
from von-grid.
Since it's been a while I'll close this, but feel free to ask for any clarifications here.
from von-grid.
Related Issues (20)
- Remove existing tiles HOT 1
- loadJSON malfunction HOT 4
- incomplete hex overlay HOT 1
- Not able to move around the hoverMesh in Editor HOT 2
- Editor dosnt work correctly on localhost HOT 2
- Best way to implement other hexgrid forms HOT 1
- Callbacks for loading HOT 1
- square-ish board HOT 1
- Port to modules HOT 2
- Problem when click on tiles on MOBILE HOT 3
- multi-level grid cells HOT 1
- individual vertex height HOT 1
- Setting camera / focus in the middle of hexgrid
- Freshening dependencies?
- removeAllTiles function doesn't remove all tiles
- TypeScript types?
- Environment ? HOT 9
- Update lib paths HOT 3
- Some bugs in SquareGrid HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from von-grid.