Skip to content

Commit 2e6b4fb

Browse files
author
Dan Moran
committed
major redo of buffer geometry
1 parent e20b0d8 commit 2e6b4fb

File tree

3 files changed

+462
-19
lines changed

3 files changed

+462
-19
lines changed

README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,21 @@ totally indebted to [Amit's](http://www.redblobgames.com/grids/hexagons/) expana
3333
| NODATA_VALUE | Cells with this value will not be rendered | -999 |
3434
| tileScale | How much of each hex grid should be occupied by the rendered tile? | 0.7 |
3535
| showZerovalCells | Render cells with value=0? | false |
36-
| metalness | Control material appearance. | 0.2 |
3736
| hexDensity | Density of hex grid relative to input data. Using higher values, up to 1, will create more hexagons. | 0.3 |
3837
| hexDensityMobile | On mobile devices this value will be used instead of hexDensity | 0.1 |
3938
| shading | Material shading model: "flat" or "smooth" | flat |
39+
| emissive | Emissive color. Used for material | #000000
4040
| emissiveIntensity | Control brightness of the material | 0.2 |
41+
| metalness | Control material appearance. | 0.2 |
42+
| rougness | Control material rougness | 0.5 |
43+
| shininess | Control material shininess | 30 |
44+
| specular | Control material specular color | #111111
45+
| blending | THREE.js blending mode, as string | THREE.NormalBlending |
4146
| opacity | Opacity of the object. | 0.75 |
4247

48+
49+
50+
4351
### Color Palettes ###
4452
There are a few built-in palettes:
4553
`greypurple`, `aquablues`, `reds`, `redblue`, `RdYlBu`, `grass`, `winter`, `greens`, `autumn`, `hot`, `viridis`, `plasma`, `parula`, and `cool`.
@@ -80,16 +88,14 @@ This component requires D3 and the von-grid hex grid library.
8088
<script src="//d3js.org/d3.v4.min.js"></script>
8189
<script src="https://morandd.github.io/aframe-hexgraph-hexmap/hex-grid.min.js"></script>
8290
<script src="https://morandd.github.io/aframe-hexgraph-hexmap/aframe-hexgraph-hexmap.js"></script>
83-
<script src="https://morandd.github.io/aframe-hexgraph-hexmap/HexGridBufGeom.js"></script>
8491
8592
```
8693

8794

8895

8996
## TODO ##
9097
- Eliminate dependency on von-grid. At this point so much of the hex logic has been rewritten we do not use much from that library any more.
91-
- Combine the two .js's into one file
92-
- Add options to tune material. Or change to check if a material= component is attached to the same entity, and then use that instead.
98+
- If AFrame adds support for vertexColors=THREE.VertexColoring to the material component, change to read material options from a `material` component
9399
- Support JSON files that contain X/Y/Value tuples, ie scattered instead of continuous data
94100

95101

0 commit comments

Comments
 (0)