
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@cognite/three-combo-controls
Advanced tools
Orbit & first person camera controller for three.js
$ npm install @cognite/three-combo-controls
or
$ yarn add @cognite/three-combo-controls
import ComboControls from '@cognite/three-combo-controls';
import * as THREE from 'three';
const controls = new ComboControls(camera, domElement);
const clock = new THREE.Clock();
function animate() {
controls.update(clock.getDelta());
// ...
}
Mouse actions:
Touch actions:
Keyboard actions:
controls.dispose();
controls.addEventListener('cameraChange', (event) => {
const { position, target } = event.camera;
// position & target in world space and instanceof THREE.Vector3
});
// options with default values
controls.enabled = true; // enable / disable all interactions
controls.enableDamping = true; // enable / disable smooth transitions
controls.dampingFactor = 0.2; // smooth transition factor (<= 1). Move (targetState - currentState) * dampingFactor for each `controls.update` call
controls.dynamicTarget = false; // possible to zoom past the target (will move the target if you are closer than minDistance to the target)
controls.dollyFactor = 0.98; // zoom factor (when zooming one step the distance to the target will be distance = oldDistance * dollyFactor)
controls.minDistance = 1; // minimum distance to the target (see also dynamicTarget)
controls.maxDistance = Infinity; // maximum distance to the target
controls.minPolarAngle = 0; // minium polar angle around the target (radians)
controls.maxPolarAngle = Math.PI; // maximum polar angle around the target (radians)
controls.minAzimuthAngle = -Infinity; // minimum azimuth angle around the target (radians)
controls.maxAzimuthAngle = Infinity; // maximum azimuth angle around the target (radians)
controls.enableKeyboardNavigation = true; // enable / disable keyboard navigation
controls.keyboardDollySpeed = 2; // using keyboard ('W' & 'S') will zoom equal to keyboardDollySpeed mouse wheel events
controls.keyboardPanSpeed = 10; // using keyboard ('A' & 'D') to pan will be equal to keyboardPanSpeed pixels mouse pan
controls.keyboardSpeedFactor = 3; // speed factor for keyboard navigation (pan & zoom) when 'shift' key is pressed
controls.firstPersonRotationFactor = 0.4; // rotation speed in first person mode
controls.pinchPanSpeed = 1; // pinch (touch) pan speed
controls.pinchEpsilon = 2; // minimum pixels change for pinch (touch & pan) to trigger pinch action
controls.pointerRotationSpeedPolar = Math.PI / 360; // rotation speed for touch in radians per pixel
controls.pointerRotationSpeedAzimuth = Math.PI / 360; // rotation speed for touch in radians per pixel
controls.keyboardRotationSpeedAzimuth = 10 * Math.PI / 360; // rotation speed for keyboard first person mode (arrow-keys).
controls.keyboardRotationSpeedPolar = 10 * Math.PI / 360; // rotation speed for keyboard first person mode (arrow-keys).
controls.minZoom = 0; // minimum zoom distance, only available when camera is orthographic
controls.maxZoom = Infinity; // maximum zoom distance, only available when camera is orthographic
controls.orthographicCameraDollyFactor = 0.3; // dolly factor of orthographic camera
$ npm install
$ npm run start
FAQs
Orbit & first person camera controller for THREE.JS
The npm package @cognite/three-combo-controls receives a total of 49 weekly downloads. As such, @cognite/three-combo-controls popularity was classified as not popular.
We found that @cognite/three-combo-controls demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 112 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.