Skip to content

Commit

Permalink
Bump aframe-master dist/ builds. (09a31ee...97b8a2b)
Browse files Browse the repository at this point in the history
  • Loading branch information
SupermediumBot committed Oct 10, 2023
1 parent 97b8a2b commit 4ed6627
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 34 deletions.
62 changes: 32 additions & 30 deletions dist/aframe-master.js
Original file line number Diff line number Diff line change
Expand Up @@ -18207,7 +18207,7 @@ module.exports.Component = registerComponent('oculus-touch-controls', {
}
}
var modelUrl = this.displayModel[data.hand].modelUrl;
this.isTouchV3orPlus = this.displayModel === CONTROLLER_PROPERTIES['oculus-touch-v3'] || this.displayModel === CONTROLLER_PROPERTIES['meta-quest-touch-plus'];
this.isTouchV3orPROorPlus = this.displayModel === CONTROLLER_PROPERTIES['oculus-touch-v3'] || this.displayModel === CONTROLLER_PROPERTIES['meta-quest-touch-pro'] || this.displayModel === CONTROLLER_PROPERTIES['meta-quest-touch-plus'];
this.el.setAttribute('gltf-model', modelUrl);
},
injectTrackedControls: function (controller) {
Expand Down Expand Up @@ -18241,8 +18241,8 @@ module.exports.Component = registerComponent('oculus-touch-controls', {
return;
}
// move the button meshes
if (this.isTouchV3orPlus) {
this.onButtonChangedV3orPlus(evt);
if (this.isTouchV3orPROorPlus) {
this.onButtonChangedV3orPROorPlus(evt);
} else {
var buttonMeshes = this.buttonMeshes;
var analogValue;
Expand All @@ -18262,34 +18262,23 @@ module.exports.Component = registerComponent('oculus-touch-controls', {
// Pass along changed event with button state, using the buttom mapping for convenience.
this.el.emit(button + 'changed', evt.detail.state);
},
clickButtons: ['xbutton', 'ybutton', 'abutton', 'bbutton', 'thumbstick'],
onButtonChangedV3orPlus: function (evt) {
onButtonChangedV3orPROorPlus: function (evt) {
var button = this.mapping[this.data.hand].buttons[evt.detail.id];
var buttonObjects = this.buttonObjects;
var analogValue;
if (!buttonObjects) {
return;
}
analogValue = evt.detail.state.value;
analogValue *= this.data.hand === 'left' ? -1 : 1;
if (button === 'trigger') {
this.triggerEuler.copy(this.buttonRanges.trigger.min.rotation);
this.triggerEuler.x += analogValue * this.buttonRanges.trigger.diff.x;
this.triggerEuler.y += analogValue * this.buttonRanges.trigger.diff.y;
this.triggerEuler.z += analogValue * this.buttonRanges.trigger.diff.z;
buttonObjects.trigger.setRotationFromEuler(this.triggerEuler);
} else if (button === 'grip') {
buttonObjects.grip.position.x = buttonObjects.grip.minX + analogValue * 0.004;
} else if (this.clickButtons.includes(button)) {
buttonObjects[button].position.y = analogValue === 0 ? this.buttonRanges[button].unpressedY : this.buttonRanges[button].pressedY;
}
buttonObjects[button].quaternion.slerpQuaternions(this.buttonRanges[button].min.quaternion, this.buttonRanges[button].max.quaternion, analogValue);
buttonObjects[button].position.lerpVectors(this.buttonRanges[button].min.position, this.buttonRanges[button].max.position, analogValue);
},
onModelLoaded: function (evt) {
if (!this.data.model) {
return;
}
if (this.isTouchV3orPlus) {
this.onTouchV3orPlusModelLoaded(evt);
if (this.isTouchV3orPROorPlus) {
this.onTouchV3orPROorPlusModelLoaded(evt);
} else {
// All oculus headset controller models prior to the Quest 2 (i.e., Oculus Touch V3)
// used a consistent format that is handled here
Expand Down Expand Up @@ -18322,7 +18311,7 @@ module.exports.Component = registerComponent('oculus-touch-controls', {
model.position.copy(this.displayModel[this.data.hand].modelPivotOffset);
model.rotation.copy(this.displayModel[this.data.hand].modelPivotRotation);
},
onTouchV3orPlusModelLoaded: function (evt) {
onTouchV3orPROorPlusModelLoaded: function (evt) {
var controllerObject3D = this.controllerObject3D = evt.detail.model;
var buttonObjects = this.buttonObjects = {};
var buttonMeshes = this.buttonMeshes = {};
Expand All @@ -18338,11 +18327,18 @@ module.exports.Component = registerComponent('oculus-touch-controls', {
buttonObjects.thumbstick = controllerObject3D.getObjectByName('xr_standard_thumbstick_pressed_value');
buttonRanges.thumbstick = {
min: controllerObject3D.getObjectByName('xr_standard_thumbstick_pressed_min'),
max: controllerObject3D.getObjectByName('xr_standard_thumbstick_pressed_max'),
originalRotation: this.buttonObjects.thumbstick.rotation.clone()
max: controllerObject3D.getObjectByName('xr_standard_thumbstick_pressed_max')
};
buttonObjects.thumbstickXAxis = controllerObject3D.getObjectByName('xr_standard_thumbstick_xaxis_pressed_value');
buttonRanges.thumbstickXAxis = {
min: controllerObject3D.getObjectByName('xr_standard_thumbstick_xaxis_pressed_min'),
max: controllerObject3D.getObjectByName('xr_standard_thumbstick_xaxis_pressed_max')
};
buttonObjects.thumbstickYAxis = controllerObject3D.getObjectByName('xr_standard_thumbstick_yaxis_pressed_value');
buttonRanges.thumbstickYAxis = {
min: controllerObject3D.getObjectByName('xr_standard_thumbstick_yaxis_pressed_min'),
max: controllerObject3D.getObjectByName('xr_standard_thumbstick_yaxis_pressed_max')
};
buttonRanges.thumbstick.pressedY = buttonObjects.thumbstick.position.y;
buttonRanges.thumbstick.unpressedY = buttonRanges.thumbstick.pressedY + Math.abs(buttonRanges.thumbstick.max.position.y) - Math.abs(buttonRanges.thumbstick.min.position.y);
buttonMeshes.trigger = controllerObject3D.getObjectByName('trigger');
buttonObjects.trigger = controllerObject3D.getObjectByName('xr_standard_trigger_pressed_value');
buttonRanges.trigger = {
Expand Down Expand Up @@ -18370,16 +18366,16 @@ module.exports.Component = registerComponent('oculus-touch-controls', {
min: controllerObject3D.getObjectByName(button2 + '_button_pressed_min'),
max: controllerObject3D.getObjectByName(button2 + '_button_pressed_max')
};
buttonRanges[button1id].unpressedY = buttonObjects[button1id].position.y;
buttonRanges[button1id].pressedY = buttonRanges[button1id].unpressedY + Math.abs(buttonRanges[button1id].max.position.y) - Math.abs(buttonRanges[button1id].min.position.y);
buttonRanges[button2id].unpressedY = buttonObjects[button2id].position.y;
buttonRanges[button2id].pressedY = buttonRanges[button2id].unpressedY - Math.abs(buttonRanges[button2id].max.position.y) + Math.abs(buttonRanges[button2id].min.position.y);
},
onAxisMoved: function (evt) {
emitIfAxesChanged(this, this.mapping[this.data.hand].axes, evt);
},
onThumbstickMoved: function (evt) {
if (!this.isTouchV3orPlus || !this.buttonMeshes || !this.buttonMeshes.thumbstick) {
if (!this.buttonMeshes || !this.buttonMeshes.thumbstick) {
return;
}
if (this.isTouchV3orPROorPlus) {
this.updateThumbstickTouchV3orPROorPlus(evt);
return;
}
for (var axis in evt.detail) {
Expand All @@ -18390,6 +18386,12 @@ module.exports.Component = registerComponent('oculus-touch-controls', {
y: 'x',
x: 'z'
},
updateThumbstickTouchV3orPROorPlus: function (evt) {
var normalizedXAxis = (evt.detail.x + 1.0) / 2.0;
this.buttonObjects.thumbstickXAxis.quaternion.slerpQuaternions(this.buttonRanges.thumbstickXAxis.min.quaternion, this.buttonRanges.thumbstickXAxis.max.quaternion, normalizedXAxis);
var normalizedYAxis = (evt.detail.y + 1.0) / 2.0;
this.buttonObjects.thumbstickYAxis.quaternion.slerpQuaternions(this.buttonRanges.thumbstickYAxis.min.quaternion, this.buttonRanges.thumbstickYAxis.max.quaternion, normalizedYAxis);
},
updateModel: function (buttonName, evtName) {
if (!this.data.model) {
return;
Expand Down Expand Up @@ -30278,7 +30280,7 @@ __webpack_require__(/*! ./core/a-mixin */ "./src/core/a-mixin.js");
// Extras.
__webpack_require__(/*! ./extras/components/ */ "./src/extras/components/index.js");
__webpack_require__(/*! ./extras/primitives/ */ "./src/extras/primitives/index.js");
console.log('A-Frame Version: 1.4.2 (Date 2023-10-09, Commit #bf299abd)');
console.log('A-Frame Version: 1.4.2 (Date 2023-10-10, Commit #97b8a2bc)');
console.log('THREE Version (https://github.com/supermedium/three.js):', pkg.dependencies['super-three']);
console.log('WebVR Polyfill Version:', pkg.dependencies['webvr-polyfill']);
module.exports = window.AFRAME = {
Expand Down
2 changes: 1 addition & 1 deletion dist/aframe-master.js.map

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ require('./core/a-mixin');
require('./extras/components/');
require('./extras/primitives/');

console.log('A-Frame Version: 1.4.2 (Date 2023-10-09, Commit #bf299abd)');
console.log('A-Frame Version: 1.4.2 (Date 2023-10-10, Commit #97b8a2bc)');
console.log('THREE Version (https://github.com/supermedium/three.js):',
pkg.dependencies['super-three']);
console.log('WebVR Polyfill Version:', pkg.dependencies['webvr-polyfill']);
Expand Down

0 comments on commit 4ed6627

Please sign in to comment.