@pmndrs/pointer-events
Advanced tools
Comparing version 6.4.12-alpha.46 to 6.4.12-alpha.48
@@ -10,4 +10,4 @@ import { Pointer } from './pointer.js'; | ||
const { width, height, top, left } = element.getBoundingClientRect(); | ||
const x = e.pageX - left; | ||
const y = e.pageY - top; | ||
const x = e.clientX - left; | ||
const y = e.clientY - top; | ||
return target.set((x / width) * 2 - 1, -(y / height) * 2 + 1); | ||
@@ -14,0 +14,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"license": "SEE LICENSE IN LICENSE", | ||
"version": "6.4.12-alpha.46", | ||
"version": "6.4.12-alpha.48", | ||
"homepage": "https://github.com/pmndrs/xr", | ||
@@ -39,4 +39,8 @@ "author": "Bela Bohlender", | ||
"example": "vite example --host", | ||
"example:build": "vite build example" | ||
"example:build": "vite build example", | ||
"check:prettier": "prettier --check src", | ||
"check:eslint": "eslint 'src/**/*.ts'", | ||
"fix:prettier": "prettier --write src", | ||
"fix:eslint": "eslint 'src/**/*.ts' --fix" | ||
} | ||
} |
105441