Socket
Socket
Sign inDemoInstall

three-pointer-controls

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

three-pointer-controls - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

lib/animation/Animation.js

8

lib/controls.js
// Generated by CoffeeScript 1.9.2
(function() {
var BUTTON, Dolly, KEY, Orbit, Pan, STATE, UP, addWheelListener, clone, defaults, preventDefault, ref, registerEventListeners,
var Animation, BUTTON, Dolly, KEY, Orbit, Pan, STATE, UP, addWheelListener, clone, defaults, preventDefault, ref, registerEventListeners,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

@@ -20,2 +20,4 @@

Animation = require('./animation/Animation');
UP = {

@@ -59,2 +61,3 @@ x: 0,

this.orbit = new Orbit(this);
this.animation = new Animation(this);
this.element = void 0;

@@ -108,2 +111,3 @@ }

}
this.animation.setStatus(this.config.animation.onInteraction);
this.element = event.target;

@@ -138,2 +142,3 @@ document.addEventListener('pointermove', this.onPointerMove);

}
this.animation.setStatus(this.config.animation.onInteraction);
this.update();

@@ -144,2 +149,3 @@ };

preventDefault(event);
this.animation.setStatus(this.config.animation.onInteraction);
document.removeEventListener('pointermove', this.onPointerMove);

@@ -146,0 +152,0 @@ document.removeEventListener('pointerup', this.onPointerUp);

13

lib/defaults.js
// Generated by CoffeeScript 1.9.2
(function() {
var BUTTON, KEY, ref;
var ANIMATION, BUTTON, KEY, ref;
ref = require('./enums'), BUTTON = ref.BUTTON, KEY = ref.KEY;
ref = require('./enums'), BUTTON = ref.BUTTON, KEY = ref.KEY, ANIMATION = ref.ANIMATION;

@@ -21,6 +21,2 @@ module.exports = {

speed: 1.0,
auto: {
enabled: false,
speed: 2.0
},
minYaw: -Infinity,

@@ -41,2 +37,7 @@ maxYaw: Infinity,

}
},
animation: {
enabled: true,
onInteraction: ANIMATION.STOP,
loop: true
}

@@ -43,0 +44,0 @@ };

@@ -26,2 +26,9 @@ // Generated by CoffeeScript 1.9.2

module.exports.ANIMATION = {
PLAY: 0,
PAUSE: 1,
STOP: 2,
DONE: 3
};
}).call(this);

@@ -5,6 +5,6 @@ {

"license": "MIT",
"version": "0.3.0",
"version": "0.4.0",
"main": "./lib/controls.js",
"scripts": {
"test": "npm build && coffee -c ./test/test.coffee && beefy test/test.js",
"test": "npm run build && coffee -c ./test/test.coffee && beefy test/test.js",
"prepublish": "npm run build",

@@ -11,0 +11,0 @@ "build": "coffee -co lib/ src/",

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.9.0
// Generated by CoffeeScript 1.9.2
(function() {

@@ -56,2 +56,5 @@ var PointerControls, THREE, addAxis, addCube, buildCanvasApp, camera, controls, render, renderer, resize, scene, start;

controls.control(camera)["with"](document);
controls.animation.orbit({
yawSpeed: 0.5
});
addAxis(scene, 0xff0000, new THREE.Vector3(1, 0, 0));

@@ -58,0 +61,0 @@ addAxis(scene, 0x00ff00, new THREE.Vector3(0, 1, 0));

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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