hilbert-chart-3d 0.10.0 → 1.0.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
@@ -8,7 +8,11 @@ Hilbert Chart 3D
8
8
 
9
9
  A 3D hilbert space-filling curve chart for representing one-dimensional lengths on a three-dimensional space.
10
10
 
11
- Uses [ThreeJS](https://github.com/mrdoob/three.js/)/WebGL for 3D rendering.
11
+ <p align="center">
12
+ <a href="https://vasturiano.github.io/hilbert-chart-3d/examples/ipv4-address-space/"><img width="80%" src="https://vasturiano.github.io/hilbert-chart-3d/examples/ipv4-address-space/preview.png"></a>
13
+ </p>
14
+
15
+ Uses [ThreeJS](https://github.com/mrdoob/three.js/)/WebGL for 3D rendering and [three-hilbert](https://github.com/vasturiano/three-hilbert) for the layout computation.
12
16
 
13
17
  See also the [2D version](https://github.com/vasturiano/hilbert-chart).
14
18
 
@@ -44,7 +48,7 @@ new HilbertChart3D(<domElement>, { configOptions })
44
48
  | Config options | Description | Default |
45
49
  | --- | --- | :--: |
46
50
  | <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` |
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 }` |
51
+ | <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, reversedDepthBuffer: true }` |
48
52
 
49
53
  ### Container
50
54
  | Method | Description | Default |
@@ -1,4 +1,4 @@
1
- // Version 0.10.0 hilbert-chart-3d - https://github.com/vasturiano/hilbert-chart-3d
1
+ // Version 1.0.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) :
@@ -153591,7 +153591,11 @@ var<${access}> ${ name } : ${ structName };`;
153591
153591
  },
153592
153592
  stateInit({
153593
153593
  controlType = 'orbit',
153594
- rendererConfig
153594
+ rendererConfig = {
153595
+ reversedDepthBuffer: true,
153596
+ antialias: true,
153597
+ alpha: true
153598
+ }
153595
153599
  }) {
153596
153600
  const hilbert = new index$1();
153597
153601
  return {
@@ -153633,8 +153637,11 @@ var<${access}> ${ name } : ${ structName };`;
153633
153637
  const d = getHilbertObjData(obj, intersection);
153634
153638
  d ? state.onClick?.(d, ev) : state.onBackgroundClick?.(ev);
153635
153639
  });
153636
- state.renderObjs.camera().near = 0.001;
153637
- state.renderObjs.camera().position.z = 500;
153640
+ const camera = state.renderObjs.camera();
153641
+ camera.near = 0.001;
153642
+ camera.position.x = -350;
153643
+ camera.position.y = 160;
153644
+ camera.position.z = -175;
153638
153645
  state.controlType === 'fly' && (state.renderObjs.controls().movementSpeed = 80);
153639
153646
 
153640
153647
  //