🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@pmndrs/pointer-events

Package Overview
Dependencies
Maintainers
0
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pmndrs/pointer-events - npm Package Compare versions

Comparing version

to
6.6.8

6

dist/pointer.d.ts

@@ -26,6 +26,10 @@ import { Object3D, OrthographicCamera, PerspectiveCamera } from 'three';

/**
* @default 300
* @deprecated use clickThresholdMs instead
*/
clickThesholdMs?: number;
/**
* @default 300
*/
clickThresholdMs?: number;
/**
* @default 500

@@ -32,0 +36,0 @@ */

8

dist/pointer.js

@@ -211,5 +211,5 @@ import { Object3D } from 'three';

}
const { contextMenuButton = 2, dblClickThresholdMs = 500, clickThesholdMs = 300 } = this.options;
const { clickThesholdMs, contextMenuButton = 2, dblClickThresholdMs = 500, clickThresholdMs = clickThesholdMs ?? 300, } = this.options;
this.pointerCapture = undefined;
const isClicked = getIsClicked(this.buttonsDownTime, this.intersection.object[buttonsDownTimeKey], nativeEvent.button, nativeEvent.timeStamp, clickThesholdMs);
const isClicked = getIsClicked(this.buttonsDownTime, this.intersection.object[buttonsDownTimeKey], nativeEvent.button, nativeEvent.timeStamp, clickThresholdMs);
const camera = this.getCamera();

@@ -316,3 +316,3 @@ //context menu

}
function getIsClicked(pointerButtonsPressTime, objectButtonsDownTime, button, buttonUpTime, clickThesholdMs) {
function getIsClicked(pointerButtonsPressTime, objectButtonsDownTime, button, buttonUpTime, clickThresholdMs) {
if (objectButtonsDownTime == null) {

@@ -325,3 +325,3 @@ return false;

}
if (buttonUpTime - objectButtonPressTime > clickThesholdMs) {
if (buttonUpTime - objectButtonPressTime > clickThresholdMs) {
return false;

@@ -328,0 +328,0 @@ }

@@ -5,3 +5,3 @@ {

"license": "SEE LICENSE IN LICENSE",
"version": "6.6.7",
"version": "6.6.8",
"homepage": "https://github.com/pmndrs/xr",

@@ -8,0 +8,0 @@ "author": "Bela Bohlender",