Code Monkey home page Code Monkey logo

Comments (2)

vonWolfehaus avatar vonWolfehaus commented on May 9, 2024

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.

vonWolfehaus avatar vonWolfehaus commented on May 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.