Skip to content

Commit 9016f0e

Browse files
author
Dan Moran
committed
refresh example
1 parent 2e6b4fb commit 9016f0e

File tree

1 file changed

+50
-9
lines changed

1 file changed

+50
-9
lines changed

example/index.html

+50-9
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
<script src="//d3js.org/d3.v4.min.js"></script>
1717

1818
<script src="hex-grid.min.js"></script>
19-
2019
<script src="../aframe-hexgraph-hexmap.js"></script>
21-
<script src="../HexGridBufGeom.js"></script>
2220

2321

2422
<script>
@@ -28,7 +26,6 @@
2826
},
2927
play: function(){
3028
console.log("Play!");
31-
d3.select('#mygraph').transition().duration(1500).attr('scale', "1 0.2 1");
3229
}
3330
});
3431
</script>
@@ -86,17 +83,61 @@
8683
<img id="sampledata2" src="asia_small.png" style="display:none"/>
8784
</a-assets>
8885

89-
<a-sky color="#aaa"></a-sky>
86+
<a-sky color="#dedede"></a-sky>
87+
88+
<a-entity id="mygraph" aframe-hexgraph-hexmap="
89+
src:#sampledata2;
90+
width:5;
91+
scaleArea:false;
92+
opacity:1;
93+
scaleHeight:true;
94+
showZerovalCells:false;
95+
tileScale:0.7;
96+
wireframeOn:false;
97+
hexDensity:0.45;
98+
hexDensityMobile:0.33,
99+
metalness: 0.58,
100+
rougness: 1,
101+
wireframeColor:#000;
102+
palette: viridis" scale="1.5 0.01 1.5" >
103+
104+
<a-animation attribute="scale"
105+
dur="4000"
106+
delay="200"
107+
easing="ease-out"
108+
direction="alternate"
109+
fill="forwards"
110+
to="2 0.5 2"></a-animation>
90111

91-
<a-entity id="mygraph" aframe-hexgraph-hexmap="src:#sampledata2; width:5; scaleArea:false; opacity:1; scaleHeight:true; showZerovalCells:false; tileScale:0.7; wireframeOn:false; hexDensity:0.45; hexDensityMobile:0.33, wireframeColor:#000; palette: ['#fff7ec','#fee8c8','#fdd49e','#fdbb84','#fc8d59','#ef6548','#d7301f','#990000']" scale="1 0 1" >
92112
</a-entity>
93113

94114

95115

96-
97-
<a-entity camera look-controls wasd-controls="fly:true" mouse-cursor="" position="1 1 2">
98-
</a-entity>
99-
116+
<!-- Tasteful lighting is important -->
117+
<a-entity light="type: ambient; color: #fff; intensity: 1.99"></a-entity>
118+
<a-entity light="color:white; type: point; target:target; intensity:.7" position="-35 50 0"></a-entity>
119+
<a-entity light="color:white; type: point; target:target; intensity:1.1" position="35 50 0"></a-entity>
120+
121+
122+
<a-entity
123+
camera="active:true"
124+
id="camera_orbit"
125+
position="0 3 6"
126+
wasd-controls="fly:true"
127+
orbit-controls="
128+
autoRotate: false;
129+
target: #mygraph;
130+
enableDamping: true;
131+
dampingFactor: 0.125;
132+
rotateSpeed:0.15;
133+
zoomSpeed:0.5;
134+
minPolarAngle: 0.7;
135+
maxPolarAngle:1.3;
136+
maxAzimuthAngle:1.2;
137+
minAzimuthAngle: -1.2;
138+
minDistance:1;
139+
maxDistance:100;">
140+
</a-entity>
100141

101142
</a-scene>
102143

0 commit comments

Comments
 (0)