hilbert-chart-3d 0.9.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ See also the [2D version](https://github.com/vasturiano/hilbert-chart).
|
|
|
16
16
|
|
|
17
17
|
* [IPv4 Address Space](https://vasturiano.github.io/hilbert-chart-3d/examples/ipv4-address-space/) ([source](https://github.com/vasturiano/hilbert-chart-3d/blob/master/examples/ipv4-address-space/index.html))
|
|
18
18
|
* [Ordinal (cubic pie chart)](https://vasturiano.github.io/hilbert-chart-3d/examples/ordinal/) ([source](https://github.com/vasturiano/hilbert-chart-3d/blob/master/examples/ordinal/index.html))
|
|
19
|
+
* [IPv6 BGP Routing Table](https://vasturiano.github.io/hilbert-chart-3d/examples/bgp-announced-space-ipv6/) ([source](https://github.com/vasturiano/hilbert-chart-3d/blob/master/examples/bgp-announced-space-ipv6/index.html))
|
|
19
20
|
|
|
20
21
|
## Quick start
|
|
21
22
|
|
|
@@ -42,7 +43,7 @@ new HilbertChart3D(<domElement>, { configOptions })
|
|
|
42
43
|
|
|
43
44
|
| Config options | Description | Default |
|
|
44
45
|
| --- | --- | :--: |
|
|
45
|
-
| <b>controlType</b>: <i>str</i> or <i>class</i> | Which type of control to use to control the camera. Choice between [trackball](https://threejs.org/examples/misc_controls_trackball.html), [arcball](https://threejs.org/examples/misc_controls_arcball.html), [orbit](https://threejs.org/examples/#misc_controls_orbit), [fly](https://threejs.org/examples/misc_controls_fly.html), or a custom [Three.js controls](https://threejs.org/docs/#Controls) class. | `
|
|
46
|
+
| <b>controlType</b>: <i>str</i> or <i>class</i> | Which type of control to use to control the camera. Choice between [trackball](https://threejs.org/examples/misc_controls_trackball.html), [arcball](https://threejs.org/examples/misc_controls_arcball.html), [orbit](https://threejs.org/examples/#misc_controls_orbit), [fly](https://threejs.org/examples/misc_controls_fly.html), or a custom [Three.js controls](https://threejs.org/docs/#Controls) class. | `orbit` |
|
|
46
47
|
| <b>rendererConfig</b>: <i>object</i> | Configuration parameters to pass to the [ThreeJS WebGLRenderer](https://threejs.org/docs/#api/en/renderers/WebGLRenderer) constructor. | `{ antialias: true, alpha: true }` |
|
|
47
48
|
|
|
48
49
|
### Container
|
package/dist/hilbert-chart-3d.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Version 0.
|
|
1
|
+
// Version 0.10.0 hilbert-chart-3d - https://github.com/vasturiano/hilbert-chart-3d
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -153359,6 +153359,12 @@ var<${access}> ${ name } : ${ structName };`;
|
|
|
153359
153359
|
});
|
|
153360
153360
|
mesh.instanceMatrix.needsUpdate = true;
|
|
153361
153361
|
mesh.computeBoundingSphere();
|
|
153362
|
+
|
|
153363
|
+
// Link instanced mesh to each datum
|
|
153364
|
+
d.forEach((d, idx) => {
|
|
153365
|
+
d.__threeObjHilbert = mesh;
|
|
153366
|
+
d.__threeObjInstanceId = idx;
|
|
153367
|
+
});
|
|
153362
153368
|
return mesh;
|
|
153363
153369
|
}).onUpdateObj((mesh, d) => {
|
|
153364
153370
|
labelAtlas.tagGeometry(mesh.geometry, d, {
|
|
@@ -153584,7 +153590,7 @@ var<${access}> ${ name } : ${ structName };`;
|
|
|
153584
153590
|
}
|
|
153585
153591
|
},
|
|
153586
153592
|
stateInit({
|
|
153587
|
-
controlType = '
|
|
153593
|
+
controlType = 'orbit',
|
|
153588
153594
|
rendererConfig
|
|
153589
153595
|
}) {
|
|
153590
153596
|
const hilbert = new index$1();
|
|
@@ -153627,6 +153633,7 @@ var<${access}> ${ name } : ${ structName };`;
|
|
|
153627
153633
|
const d = getHilbertObjData(obj, intersection);
|
|
153628
153634
|
d ? state.onClick?.(d, ev) : state.onBackgroundClick?.(ev);
|
|
153629
153635
|
});
|
|
153636
|
+
state.renderObjs.camera().near = 0.001;
|
|
153630
153637
|
state.renderObjs.camera().position.z = 500;
|
|
153631
153638
|
state.controlType === 'fly' && (state.renderObjs.controls().movementSpeed = 80);
|
|
153632
153639
|
|