three-render-objects 1.31.0 → 1.32.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
|
@@ -24,8 +24,7 @@ or using a *script* tag
|
|
|
24
24
|
```
|
|
25
25
|
then
|
|
26
26
|
```js
|
|
27
|
-
const myCanvas = ThreeRenderObjects()
|
|
28
|
-
myCanvas(<myDOMElement>)
|
|
27
|
+
const myCanvas = new ThreeRenderObjects(<myDOMElement>)
|
|
29
28
|
.objects(<myData>);
|
|
30
29
|
```
|
|
31
30
|
|
|
@@ -33,7 +32,7 @@ myCanvas(<myDOMElement>)
|
|
|
33
32
|
|
|
34
33
|
### Initialisation
|
|
35
34
|
```js
|
|
36
|
-
ThreeRenderObjects({ configOptions })
|
|
35
|
+
new ThreeRenderObjects(<domElement>, { configOptions })
|
|
37
36
|
```
|
|
38
37
|
|
|
39
38
|
| Config options | Description | Default |
|
|
@@ -19,8 +19,9 @@ type Coords = { x: number; y: number; z: number; };
|
|
|
19
19
|
|
|
20
20
|
type Obj3DCompFn = (a: Object3D, b: Object3D) => number;
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
(element: HTMLElement)
|
|
22
|
+
declare class ThreeRenderObjectsGeneric<ChainableInstance> {
|
|
23
|
+
constructor(element: HTMLElement, configOptions?: ConfigOptions);
|
|
24
|
+
|
|
24
25
|
resetProps(): ChainableInstance;
|
|
25
26
|
|
|
26
27
|
// Data input
|
|
@@ -83,8 +84,6 @@ interface ThreeRenderObjectsGenericInstance<ChainableInstance> {
|
|
|
83
84
|
intersectingObjects(x: number, y: number): Intersection[];
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
declare function ThreeRenderObjects(configOptions?: ConfigOptions): ThreeRenderObjectsInstance;
|
|
87
|
+
declare class ThreeRenderObjects extends ThreeRenderObjectsGeneric<ThreeRenderObjects> {}
|
|
89
88
|
|
|
90
|
-
export { type ConfigOptions,
|
|
89
|
+
export { type ConfigOptions, ThreeRenderObjectsGeneric, ThreeRenderObjects as default };
|