three-render-objects
Advanced tools
Comparing version 1.35.0 to 1.36.0
@@ -62,5 +62,5 @@ import { WebGLRendererParameters, Renderer, Object3D, Light, WebGLRenderer, Scene, Camera, Intersection } from 'three'; | ||
// Interaction | ||
onClick(callback: (obj: object | null, event: MouseEvent, intersectionPoint: { x: number, y: number, z: number }) => void): ChainableInstance; | ||
onRightClick(callback: (obj: object | null, event: MouseEvent, intersectionPoint: { x: number, y: number, z: number }) => void): ChainableInstance; | ||
onHover(callback: (obj: object | null, previousObj: object | null) => void): ChainableInstance; | ||
onClick(callback: (obj: object | null, event: MouseEvent, intersection: Intersection) => void): ChainableInstance; | ||
onRightClick(callback: (obj: object | null, event: MouseEvent, intersection: Intersection) => void): ChainableInstance; | ||
onHover(callback: (obj: object | null, previousObj: object | null, intersection: Intersection | null) => void): ChainableInstance; | ||
hoverOrderComparator(): Obj3DCompFn; | ||
@@ -67,0 +67,0 @@ hoverOrderComparator(compFn: Obj3DCompFn): ChainableInstance; |
{ | ||
"name": "three-render-objects", | ||
"version": "1.35.0", | ||
"version": "1.36.0", | ||
"description": "Easy way to render ThreeJS objects with built-in interaction defaults", | ||
@@ -50,3 +50,3 @@ "license": "MIT", | ||
"accessor-fn": "1", | ||
"float-tooltip": "^1.6", | ||
"float-tooltip": "^1.7", | ||
"kapsule": "^1.16", | ||
@@ -53,0 +53,0 @@ "polished": "4" |
@@ -83,5 +83,5 @@ three-render-objects | ||
| --- | --- | :--: | | ||
| <b>onClick</b>(<i>fn</i>) | Callback function for object clicks with left mouse button. The object (or `null` if there's no object under the mouse line of sight), the event object and the coordinates of the intersecting point in the object's surface are included as arguments `onClick(object, event, { x, y, z })`. | - | | ||
| <b>onRightClick</b>(<i>fn</i>) | Callback function for object right-clicks. The object (or `null` if there's no object under the mouse line of sight), the event object and the coordinates of the intersecting point in the object's surface are included as arguments `onRightClick(object, event, { x, y, z })`. | - | | ||
| <b>onHover</b>(<i>fn</i>) | Callback function for object mouse over events. The object (or `null` if there's no object under the mouse line of sight) is included as the first argument, and the previous hovered object (or `null`) as second argument: `onHover(obj, prevObj)`. | - | | ||
| <b>onClick</b>(<i>fn</i>) | Callback function for object clicks with left mouse button. The object (or `null` if there's no object under the mouse line of sight), the event object and the intersection object are included as arguments `onClick(object, event, intersection)`. | - | | ||
| <b>onRightClick</b>(<i>fn</i>) | Callback function for object right-clicks. The object (or `null` if there's no object under the mouse line of sight), the event object and the intersection object are included as arguments `onRightClick(object, event, intersection)`. | - | | ||
| <b>onHover</b>(<i>fn</i>) | Callback function for object mouse over events. The object (or `null` if there's no object under the mouse line of sight), the previous hovered object (or `null`) and the intersection object are included as arguments: `onHover(obj, prevObj, intersection)`. | - | | ||
| <b>hoverOrderComparator</b>([<i>fn</i>]) | Getter/setter for the comparator function to use when hovering over multiple objects under the same line of sight. This function can be used to prioritize hovering some objects over others. | By default, hovering priority is based solely on camera proximity (closest object wins). | | ||
@@ -88,0 +88,0 @@ | <b>hoverFilter</b>([<i>fn</i>]) | Getter/setter for the filter function that defines whether an object is eligible for hovering and other interactions. This function receives an object as sole argument and should return a `boolean` value | `() => true` | |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
7140824
56710
+ Addedthree@0.173.0(transitive)
- Removedthree@0.172.0(transitive)
Updatedfloat-tooltip@^1.7