Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions dist/aframe-extras.controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ module.exports = AFRAME.registerComponent('gamepad-controls', {
yaw.rotation.y -= lookVector.x;
pitch.rotation.x -= lookVector.y;
pitch.rotation.x = Math.max(-Math.PI / 2, Math.min(Math.PI / 2, pitch.rotation.x));
data.camera.object3D.rotation.set(pitch.rotation.x, yaw.rotation.y, 0);
this.el.object3D.rotation.set(pitch.rotation.x, yaw.rotation.y, 0);

// Sync with look-controls pitch/yaw if available.
if (hasLookControls) {
Expand Down Expand Up @@ -1134,7 +1134,7 @@ module.exports = AFRAME.registerComponent('gamepad-controls', {
var xrController = this.system.controllers[i];
var xrGamepad = xrController ? xrController.gamepad : null;
_xrGamepads.push(xrGamepad);
if (xrGamepad && xrGamepad.handedness === handPreference) return xrGamepad;
if (xrGamepad && xrController.handedness === handPreference) return xrGamepad;
}

// https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/hand
Expand Down Expand Up @@ -1181,7 +1181,7 @@ module.exports = AFRAME.registerComponent('gamepad-controls', {
case Joystick.MOVEMENT:
return target.set(gamepad.axes[2], gamepad.axes[3]);
case Joystick.ROTATION:
return target.set(gamepad.axes[0], gamepad.axes[1]);
return target.set(gamepad.axes[2], 0);
}
} else {
switch (index) {
Expand Down Expand Up @@ -1449,7 +1449,9 @@ module.exports = AFRAME.registerComponent('movement-controls', {

init: function init() {
var el = this.el;

if (!this.data.camera) {
this.data.camera = el.querySelector('[camera]');
}
this.velocityCtrl = null;

this.velocity = new THREE.Vector3();
Expand Down
2 changes: 1 addition & 1 deletion dist/aframe-extras.controls.min.js

Large diffs are not rendered by default.

35,766 changes: 35,721 additions & 45 deletions dist/aframe-extras.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/aframe-extras.loaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -7280,7 +7280,8 @@ module.exports = AFRAME.registerComponent('animation-mixer', {
crossFadeDuration: { default: 0 },
loop: { default: 'repeat', oneOf: Object.keys(LoopMode) },
repetitions: { default: Infinity, min: 0 },
timeScale: { default: 1 }
timeScale: { default: 1 },
startFrame: { default: 0 }
},

init: function init() {
Expand Down Expand Up @@ -7373,12 +7374,14 @@ module.exports = AFRAME.registerComponent('animation-mixer', {
for (var clip, i = 0; clip = clips[i]; i++) {
if (clip.name.match(re)) {
var action = this.mixer.clipAction(clip, model);

action.enabled = true;
action.clampWhenFinished = data.clampWhenFinished;
if (data.duration) action.setDuration(data.duration);
if (data.timeScale !== 1) action.setEffectiveTimeScale(data.timeScale);
action.setLoop(LoopMode[data.loop], data.repetitions).fadeIn(data.crossFadeDuration).play();
this.activeActions.push(action);
this.mixer.setTime(data.startFrame / 1000);
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion dist/aframe-extras.loaders.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/aframe-extras.min.js

Large diffs are not rendered by default.

35,695 changes: 35,683 additions & 12 deletions dist/aframe-extras.pathfinding.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/aframe-extras.pathfinding.min.js

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/controls/gamepad-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ module.exports = AFRAME.registerComponent('gamepad-controls', {
yaw.rotation.y -= lookVector.x;
pitch.rotation.x -= lookVector.y;
pitch.rotation.x = Math.max(- Math.PI / 2, Math.min(Math.PI / 2, pitch.rotation.x));
data.camera.object3D.rotation.set(pitch.rotation.x, yaw.rotation.y, 0);
this.el.object3D.rotation.set(pitch.rotation.x, yaw.rotation.y, 0);

// Sync with look-controls pitch/yaw if available.
if (hasLookControls) {
Expand Down Expand Up @@ -251,7 +251,7 @@ module.exports = AFRAME.registerComponent('gamepad-controls', {
const xrController = this.system.controllers[i];
const xrGamepad = xrController ? xrController.gamepad : null;
_xrGamepads.push(xrGamepad);
if (xrGamepad && xrGamepad.handedness === handPreference) return xrGamepad;
if (xrGamepad && xrController.handedness === handPreference) return xrGamepad;
}

// https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/hand
Expand Down Expand Up @@ -296,7 +296,7 @@ module.exports = AFRAME.registerComponent('gamepad-controls', {
// See: https://github.com/donmccurdy/aframe-extras/issues/307
switch (index) {
case Joystick.MOVEMENT: return target.set(gamepad.axes[2], gamepad.axes[3]);
case Joystick.ROTATION: return target.set(gamepad.axes[0], gamepad.axes[1]);
case Joystick.ROTATION: return target.set(gamepad.axes[2], 0);
}
} else {
switch (index) {
Expand Down