Giter VIP home page Giter VIP logo

hex-grid-map's People

Contributors

chad-autry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hex-grid-map's Issues

JSDoc classes as modules

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.

Re-name and Publish

Rename to hexagonally-gridded-map (maybe just hex-grid-map?)
Publish to NPM

Gridline Style Options

Allow the grid-line style to be customized. Includes line length as well as look which can be used to zoom in and out.

Path Gradients

Add gradients to the path drawn item, including some fade manipulation

Foreground

Provide a foreground layer which the user can draw to like the background layer

Windowing Badge

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.

Arrows

Need a drawn item factory for arrows which can be used to represent gravity

Rotate/Zoom Overlay Widget

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.

Cell Windowing

If there are too many items in a cell, window them. Allow the cell items to be dragged up and down within the window

Variable Vertical Perspective

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.

Sphere Z co-ordinates

Used some copy pasted rotations, I think the Z index backwards from what I want (positive Z up)

Viewing demo window claims all touch drag events

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.

Center Cell in Canvas

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.

Mobile Browsers

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 multiple paper.js canvases

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.

Vector Manipulation

Add more vector manipulation

  • snapto center
  • max distance (from source and from dest)
  • ghost vector showing pre-drag + vector showing change
  • onDrop
  • onCellChanged

Consider introducing Node.js EventEmitter for the listeners

Demo Page

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.

Background Layer

Provide a background layer, and function that defines how it should be redrawn as the grid is dragged

Canvas Resizing

In the static example allow the canvas to be resized dynamically.

Documentation Links

Fix the code links in the generated documentation to point at the files on github

No code demo

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)

Navbar on Demo Page blocks mouse interaction

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.

Reorganize Code Under Folders

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

Split Cell Items Above and Below Grid

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

Twiddle Pixels

HTML5 canvas pixel co-ordinates are centered between pixels.
Twiddle the position/endpoints of the grid paths to ensure crisp lines

Genericize ForeGround Context and BackGround Context

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.

Sphere Borders

Allow the border around spheres to be optional, so that only the desired circles show

Allow variable height items

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

Grid Rotation

Allow the grid to be rotated in the 12 different orientations. Make the current rotation available to the DrawnItemFactory.

Spherical Objects

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

Cache Symbols in ExampleDrawnItemFactory

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.

Build System

Run tests and publish to npm on push using Travis CI

Mouse Handling

Provide overrideable mousehandler functions for ItemClicked, CellClicked, MouseEnter/Leave --> Item/Cell
Provide same mouse handling for badges/vectors/paths

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.