hilbert-chart-3d 0.1.0 → 0.2.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
@@ -10,6 +10,8 @@ A 3D hilbert space-filling curve chart for representing one-dimensional lengths
10
10
 
11
11
  Uses [ThreeJS](https://github.com/mrdoob/three.js/)/WebGL for 3D rendering.
12
12
 
13
+ See also the [2D version](https://github.com/vasturiano/hilbert-chart).
14
+
13
15
  ## Examples
14
16
 
15
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))
@@ -56,6 +58,7 @@ new HilbertChart3D(<domElement>, { configOptions })
56
58
  | <b>padding</b>([<i>number</i>, <i>string</i> or <i>fn</i>]) | Getter/setter for the range object padding ratio accessor function (`fn(range)`), attribute or a constant number for all ranges. The padding ratio should be a number between `0` and `1` representing the proportional size of the padding space compared to the width of the path. | 0 |
57
59
  | <b>valFormatter</b>([<i>fn</i>]) | Getter/setter for the value formatting function (`fn(value)`), in default tooltips. Values may be Numbers or BigInts; should return a string. | `d => d` |
58
60
  | <b>simplifyCurves</b>([<i>boolean</i>]) | Getter/setter for whether to simplify the resolution of the curve to the most canonical 2-bit boundary that fits the range integral. For example, in a 2nd order curve (64 values), a range from 8 to 23 can be simplified from 16 vertices to 2 (each filling a cube with 8 values). This simplification greatly reduces the number of vertices in the curve and improves the calculation and rendering performance, specially for high-order ranges which tend to fall on bit boundaries. | `true` |
61
+ | <b>useInstancedMeshes</b>([<i>boolean</i>]) | Getter/setter for whether to render compatible segments with [THREE.InstancedMesh](https://threejs.org/docs/#InstancedMesh) to reduce draw calls. Segments that cannot be instanced use regular meshes. | `false` |
59
62
  | <b>focusOn</b>(<i>pos</i>, <i>length</i>, [<i>ms</i>]) | Zoom-in on a particular area of the chart, defined by [`pos`, `pos+length-1`]. `pos` and `length` may be Numbers or BigInts. An optional 3rd argument defines the duration of the transition (in ms) to animate the zooming motion. A value of 0 (default) jumps immediately to the final position. ||
60
63
  | <b>zoomToFit</b>([<i>ms</i>], [<i>px</i>], [<i>nodeFilterFn</i>]) | Automatically moves the camera so that all of the hilbert segments become visible within its field of view. It accepts two optional arguments: the first defines the duration of the transition (in ms) to animate the camera motion (default: 0ms). The second argument is the amount of padding (in px) between the edge of the canvas and the outermost node location (default: 10px). | `(0, 10)` |
61
64
  | <b>tooltipContent</b>([<i>string</i> or <i>fn</i>]) | Getter/setter for the range object tooltip content accessor function or attribute. Supports plain text or HTML content. | `<label>: <start> - <end>` |
@@ -36,6 +36,8 @@ declare class HilbertChart<R extends RangeBounds = Range> {
36
36
  valFormatter(formatter: NumFormatter): HilbertChart<R>;
37
37
  simplifyCurves(): boolean;
38
38
  simplifyCurves(simplifyCurves: boolean): HilbertChart<R>;
39
+ useInstancedMeshes(): boolean;
40
+ useInstancedMeshes(useInstancedMeshes: boolean): HilbertChart<R>;
39
41
 
40
42
  focusOn(pos: NumericValue, length: NumericValue, ms?: number): HilbertChart<R>;
41
43