chad-autry / hex-grid-map Goto Github PK
View Code? Open in Web Editor NEWA canvas based widget for drawing hexagonal grids
Home Page: http://chad-autry.github.io/hex-grid-map
License: MIT License
A canvas based widget for drawing hexagonal grids
Home Page: http://chad-autry.github.io/hex-grid-map
License: MIT License
The pattern I'm using is to generally export a constructor as a commons js module.
JSDoc is documenting that weirdly. Such class: module: files receive two links in the index. The Automatic comment does not correctly show to us new (require('module-name'))();
Fix the template and publish.js to look nice for the pattern.
Add an example filtering datasource to demonstrate the datasource chain.
Rename to hexagonally-gridded-map (maybe just hex-grid-map?)
Publish to NPM
Allow the grid-line style to be customized. Includes line length as well as look which can be used to zoom in and out.
Add gradients to the path drawn item, including some fade manipulation
Provide a foreground layer which the user can draw to like the background layer
For the static example, have an info badge which says how many items are above and below the window.
Can be used for when a stack of items all look the same to make it more clear that they have been scrolled.
Need a drawn item factory for arrows which can be used to represent gravity
Provide a widget in the static example which allows the grid to be rotated and zoomed.
Should be created using the badges overlay and mouse handlers.
Add paths and vectors to the grid group
If there are too many items in a cell, window them. Allow the cell items to be dragged up and down within the window
Allow for a variable vertical perspective to be chosen. Current hard coded default is a near isometric dimetric perspective. Allow true isometric to be chosen.
Used some copy pasted rotations, I think the Z index backwards from what I want (positive Z up)
If I view the demo window on mobile (or while simulating mobile) I can no longer scroll the JSDoc. I was able to scroll JSdoc before going to demo and back.
Currently letting paper.js handle mouse events, I did want to handle those myself from the HexBoard controller.
Provide a method to center a given cell in the middle of the canvas. Can be used to center on a known cell co-ordinate, or the re-center when the canvas is resized.
Animate the translucency in the windowing function to look a bit smoother so it doesn't "bounce"
The frame rate visibly stutters in Firefox, it is quite good in Chrome.
I use chrome on mobile. The demo page didn't work, then magically worked, now doesn't work again on my mobile browser.
Debug on mobile to figure out what the issue is
Allow the instantiating application to use paper.js for other things that just the hex-widget. This would also allow for multiple hex-widgets to be shown at a time.
Add more vector manipulation
Consider introducing Node.js EventEmitter for the listeners
The current test page is just full of junk I toss up there to see (and not even up to date since I don't have a build system publishing)
Need to get an official demo page showing off the type of space scene the widget and the default items are supposed to be capable of producing.
Allow for item transitions to be animated.
Add more configuration options to the lens flare exampleForegroundContext.
Provide a background layer, and function that defines how it should be redrawn as the grid is dragged
In the static example allow the canvas to be resized dynamically.
Add option to have a colors outline around spheres.
Fix the code links in the generated documentation to point at the files on github
Finish off the datastore to send notifications to listeners for removed and updated items
Simple to understand when we want to see the source code of the demo it tells us the route doesn't exist (it does the same in the 3D version)
The navbar blocks mouse interaction with the map all the way to the sides and top of the screen, and a bit below the navbar itself.
Its margins or something are intercepting the mouse events.
Started throwing files just into the root project since I thought that'd help using require.
Its getting messy.
You can require('packagename/folder/path/module')
Need to get a good folder structure going, and migrate the files
Cell items should be put into above grid groups and below grid groups instead of the cheat now where a part of the grid is re-drawn.
Once done vectors and paths added to the grid group will intersect item groups naturally
HTML5 canvas pixel co-ordinates are centered between pixels.
Twiddle the position/endpoints of the grid paths to ensure crisp lines
The initial exampleForeGroundContext is explicitlly for len flare, and the exampleBackgroundContext is explicitlly for a starry background. Make it more generic such that the context stays the same, but the user can plug in different datasources.
Allow the border around spheres to be optional, so that only the desired circles show
My exampleDrawnItemFactory and the implimented windowing function expect all items to have a 0 height.
Should allow a Drawn Item Factory to specify a height for each item.
Should allow the windowing function fully visible + fade to be specified as a function of position
The comments and self documentation in SphereDrawnItemFactory is not up to what I consider my usual standard.
Allow the grid to be rotated in the 12 different orientations. Make the current rotation available to the DrawnItemFactory.
Add a spherical object drawn item factory.
Should be realizable/recolor able. Should be tilted for the default skewed perspective. Should add a drawn item both above and below the grid
Use use paper.js's capabillity to have symbols for drawn items. If a similar item has been drawn before, use a cache and a key to return just a PlacedSymbol.
Clean up the cache when there are no longer any items of that type in the datastore.
Run tests and publish to npm on push using Travis CI
Provide overrideable mousehandler functions for ItemClicked, CellClicked, MouseEnter/Leave --> Item/Cell
Provide same mouse handling for badges/vectors/paths
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.