New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pmndrs/handle

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pmndrs/handle - npm Package Compare versions

Comparing version 6.5.0 to 6.5.1-alpha.2

28

dist/screen/camera.js

@@ -29,3 +29,3 @@ import { ArrayCamera, Euler, Object3D, Quaternion, Vector3 } from 'three';

}
const offsetHelper = new Vector3();
const vectorHelper = new Vector3();
const zToUpHelper = new Quaternion();

@@ -59,3 +59,3 @@ export function computeScreenCameraStoreTransformation(pitch, yaw, cameraDistanceToOrigin, origin, position, rotation, up = Object3D.DEFAULT_UP) {

},
setCameraPosition(x, y, z, keepOffsetToOrigin) {
setCameraPosition(x, y, z, keepOffsetToOrigin = false) {
const update = {};

@@ -66,11 +66,11 @@ buildCameraPositionUpdate(update, x, y, z, get().origin, upToZ);

eHelper.set(state.pitch, state.yaw, 0, 'YXZ');
computeOriginToCameraOffset(offsetHelper, state.distance, eHelper, zToUp);
offsetHelper.x -= x;
offsetHelper.y -= y;
offsetHelper.z -= z;
update.origin = offsetHelper.toArray();
computeOriginToCameraOffset(vectorHelper, state.distance, eHelper, zToUp);
vectorHelper.x -= x;
vectorHelper.y -= y;
vectorHelper.z -= z;
update.origin = vectorHelper.toArray();
}
set(update);
},
setOriginPosition(x, y, z, keepOffsetToCamera) {
setOriginPosition(x, y, z, keepOffsetToCamera = false) {
const origin = [x, y, z];

@@ -80,10 +80,6 @@ const update = {

};
if (keepOffsetToCamera === true) {
const state = get();
eHelper.set(state.pitch, state.yaw, 0, 'YXZ');
computeOriginToCameraOffset(offsetHelper, state.distance, eHelper, zToUp);
offsetHelper.x += x;
offsetHelper.y += y;
offsetHelper.z += z;
buildCameraPositionUpdate(update, offsetHelper.x, offsetHelper.y, offsetHelper.z, origin, upToZ);
if (keepOffsetToCamera === false) {
const { pitch, distance, origin: oldOrigin, yaw } = get();
computeScreenCameraStoreTransformation(pitch, yaw, distance, oldOrigin, vectorHelper, undefined, up);
buildCameraPositionUpdate(update, vectorHelper.x, vectorHelper.y, vectorHelper.z, origin, upToZ);
}

@@ -90,0 +86,0 @@ set(update);

@@ -7,3 +7,3 @@ {

"homepage": "https://github.com/pmndrs/xr",
"version": "6.5.0",
"version": "6.5.1-alpha.2",
"keywords": [

@@ -25,3 +25,3 @@ "r3f",

"zustand": "^4.5.2",
"@pmndrs/pointer-events": "^6.5.0"
"@pmndrs/pointer-events": "^6.5.1-alpha.2"
},

@@ -28,0 +28,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc