c-frame / aframe-extras

Add-ons and helpers for A-Frame VR.

Home Page:https://c-frame.github.io/aframe-extras/examples/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hex-grid is broken since 1.2.0

diarmidmackenzie opened this issue · comments

hex-grid has a dependency on THREE.Geometry, so has been broken since 1.2.0.

I've been looking into options for fixing.

hex-grid is based on this repo (the build from this is here)
https://github.com/vonWolfehaus/von-grid

Status of this repo is described as follows.

NOTE: This repo is no longer maintained
Feel free to fork and do whatever. There is a dev branch that has an incomplete rewrite, but everything here is so old that even I don't get what I was thinking. Enjoy!

The dev branch appears to have moved from Geomrty to BufferGeometry. However that dev branch is described as "incomplete", and is untouched since Feb 2017.

The project doesn't have any unit tests, making maintenance by an unfamiliar developer fairly high-risk.

From a brief skim of the 73 forks of the project, I don't see any that has any significant later work done on it.

Options for repaiting hex-grid component in this repo:

  1. make a minimal set of changes to von-grid/main to be compatible with latest THREE
  2. take von-grid/dev as a start-point and try to get this working with latest THREE
  3. look for a more up-to-date / maintained hex grid component, and build on that
  4. build a new hex grid component from scratch.

Option 1 is probably OK short-term, but feels like a poor long-term choice.
I don't fancy taking on 2 or 4, at least not in the short-term.

Some digging on 3 led to...

A. https://www.youtube.com/watch?v=4fC2fuVdsyA

  • Decent start, but it's more sample code, than a maintained component, so more of a leg-up for 4, than an option for 3.
  • Uses instancing for performance, which is a nice improvement on the previous implementation here.

B. https://github.com/Bunkerbewohner/threejs-hex-map

  • Uses THREE.BufferGeometry, at least.
  • Not touched in 6 years
  • Higher level - includes specific hex tiles for diffferent terrain types etc.

C. https://github.com/flauwekeul/honeycomb

  • Up-to-date & maintained, but targets 2D web, not 3D web.

D. https://hofk.de/main/discourse.threejs/BeginnerExample/BeginnerExample.html#:~:text=function%20createHoneyComb(%20radius%2C%20rings%2C%20thick%2C%20depth%20)%20%7B

  • A very old THREE.js example
  • Just some very basic sample code

Bottom line, no viable candidates for option 3 that I can find.

Net of this - no good options for reviving hex-grid at this point, without significant work (2, 3 or 4), or creating substantial future maintenance liabilities (1).

Thanks for looking into it. My take is just to remove the component from the repository. If someone is interested in reviving a hexgrid component, they can contribute one as a separate repository. Can you please create a PR that removes all the related files?

There were lots of people playing with hexagon tiles around November 2021. Here are some resources:

https://twitter.com/SketchpunkLabs/status/1444785252963078151
https://www.patreon.com/posts/procedural-map-57298750
https://www.patreon.com/posts/procedural-map-57342090

https://hexagons.glitch.me
https://twitter.com/AdaRoseCannon/status/1461707481269387272
https://twitter.com/AdaRoseCannon/status/1450863707710533634
https://twitter.com/AdaRoseCannon/status/1455556539062882313
https://twitter.com/AdaRoseCannon/status/1467629411533049863

procedural Hexagon terrain generator using R3F, Zustand and Leva
Demo: https://l9i5u.csb.app/
Code: https://codesandbox.io/embed/hexterrain-l9i5u
"It was Inspired by Christos Stavridis’ Houdini based hexagon tile terrain generator (https://gum.co/hexagona)
It used Perlin noise a based FBM function and tons of instancing for everything."

Erindale's recreation of this in Blender https://www.youtube.com/watch?v=EboNtLKn_m8
also in Blender, but with lego https://twitter.com/Sanctus_Art/status/1483535677807640584

The hexgrid component was removed in #408.