Comments (2)
These are very valid points. Thank you.
The first one is a bug. The other two are more about a consistent and intuitive approach.
All of them have in release 0.4.8
. Please note this is a breaking change!
New behavior:
Grid generator now accepts side length
argument for both hexagon and triangle-shaped grids. This side length works as you would expect in the real world.
Examples:
- hexagon-shaped grid of side length equal to 1 produces a grid of exactly 1 cell.
- hexagon-shaped grid of side length equal to 2 produces a grid of 7 cells.
- hexagon-shaped grid of side length equal to 3 produces a grid of 19 cells.
- triangle-shaped grid of side length equal to 1 produces a grid of exactly 1 cell.
- triangle-shaped grid of side length equal to 2 produces a grid of 3 cells.
- triangle-shaped grid of side length equal to 3 produces a grid of 6 cells.
- triangle-shaped grid of side length equal to 4 produces a grid of 10 cells.
from hex-grid.
This is great, thank you!
from hex-grid.
Related Issues (12)
- Cell initializer that takes CubeCoordinates is not public. HOT 1
- issues with rectangular generator HOT 3
- Finetune coordinates converter and grid generator
- Feature request: Caching HOT 3
- Intent to flush out drawing instructions in the README HOT 2
- Points x and y properties are not public. HOT 1
- Feature request: Get the pixel width/height of the grid HOT 3
- Feature request: Store user data in cells HOT 6
- Hex to screen wrong implementation HOT 7
- Feature Request: an initializer with a single size for the entire HexGrid HOT 6
- HexSize width & height are not public HOT 1
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 hex-grid.