three-render-objects 1.39.3 → 1.40.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
|
@@ -20,7 +20,7 @@ import ThreeRenderObjects from 'three-render-objects';
|
|
|
20
20
|
```
|
|
21
21
|
or using a *script* tag
|
|
22
22
|
```html
|
|
23
|
-
<script src="//
|
|
23
|
+
<script src="//cdn.jsdelivr.net/npm/three-render-objects"></script>
|
|
24
24
|
```
|
|
25
25
|
then
|
|
26
26
|
```js
|
|
@@ -90,6 +90,7 @@ new ThreeRenderObjects(<domElement>, { configOptions })
|
|
|
90
90
|
| <b>pointsHoverPrecision</b>([<i>int</i>]) | Getter/setter for the precision to use when detecting hover events over [Points](https://threejs.org/docs/#api/objects/Points) objects. | 1 |
|
|
91
91
|
| <b>tooltipContent</b>([<i>str</i> or <i>fn</i>]) | Object accessor function or attribute for label (shown in tooltip). Supports plain text, HTML string content, an [HTML element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement) or [React JSX](https://react.dev/learn/writing-markup-with-jsx). ||
|
|
92
92
|
| <b>enablePointerInteraction([<i>boolean</i>]) | Getter/setter for whether to enable the mouse tracking events. This activates an internal tracker of the canvas mouse position and enables the functionality of object hover/click and tooltip labels, at the cost of performance. If you're looking for maximum gain in your render performance it's recommended to switch off this property. | `true` |
|
|
93
|
+
| <b>pointerRaycasterThrottleMs([<i>int</i>]) | Getter/setter for the minimum amount of time (in ms) to wait between raycaster checks for the pointer tracker. Increasing this value will improve render performance at the cost of potential lag in pointer interactions. | `50` |
|
|
93
94
|
| <b>hoverDuringDrag([<i>boolean</i>]) | Getter/setter for whether to trigger hover events while using the controls via pointer dragging.| `false` |
|
|
94
95
|
| <b>clickAfterDrag([<i>boolean</i>]) | Getter/setter for whether to trigger a click event after dragging using the controls.| `false` |
|
|
95
96
|
| <b>getPointerPos() | Getter for the current position of the pointer relative to the viewport, in `{ x, y }` px coordinates. ||
|
|
@@ -74,6 +74,8 @@ declare class ThreeRenderObjectsGeneric<ChainableInstance> {
|
|
|
74
74
|
pointsHoverPrecision(precision: number): ChainableInstance;
|
|
75
75
|
tooltipContent(): Obj3DAccessor<string | HTMLElement | ReactHTMLElement<HTMLElement> | boolean>;
|
|
76
76
|
tooltipContent(contentAccessor: Obj3DAccessor<string | HTMLElement | ReactHTMLElement<HTMLElement> | boolean>): ChainableInstance;
|
|
77
|
+
pointerRaycasterThrottleMs(): number;
|
|
78
|
+
pointerRaycasterThrottleMs(ms: number): ChainableInstance;
|
|
77
79
|
enablePointerInteraction(): boolean;
|
|
78
80
|
enablePointerInteraction(enable: boolean): ChainableInstance;
|
|
79
81
|
hoverDuringDrag(): boolean;
|
|
@@ -91,4 +93,5 @@ declare class ThreeRenderObjectsGeneric<ChainableInstance> {
|
|
|
91
93
|
|
|
92
94
|
declare class ThreeRenderObjects extends ThreeRenderObjectsGeneric<ThreeRenderObjects> {}
|
|
93
95
|
|
|
94
|
-
export {
|
|
96
|
+
export { ThreeRenderObjectsGeneric, ThreeRenderObjects as default };
|
|
97
|
+
export type { ConfigOptions };
|