upgraded aframe to v1.6.0 + added check for duplicate movement-controls & touch-controls
This commit is contained in:
parent
c3b0636bf7
commit
4bc3d1c520
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,43 @@
|
|||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:41:10 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:39:00 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:38:50 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:38:27 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:37:05 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:36:14 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:35:39 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 03:32:13 PM UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Oct 14 11:39:48 AM CEST 2024
|
||||
* https://xrfragment.org
|
||||
|
@ -3064,10 +3104,6 @@ xrf.frag.pos = function(v, opts){
|
|||
if( pos.x == undefined ){
|
||||
let obj = scene.getObjectByName(v.string)
|
||||
if( !obj ) return console.warn("#pos="+v.string+" not found")
|
||||
//let worldPos = new THREE.Vector3()
|
||||
//obj.getWorldPosition(worldPos)
|
||||
//camera.position.copy(worldPos)
|
||||
//obj.attach(camera) // instead of add() [keeps camera animations intact]
|
||||
obj.add(camera)
|
||||
camera.position.set(0,0,0)
|
||||
let c = camera.rotation
|
||||
|
@ -4834,6 +4870,8 @@ window.AFRAME.registerComponent('xrf', {
|
|||
},
|
||||
init: async function () {
|
||||
|
||||
this.data = Object.values(this.attrValue)[0]
|
||||
|
||||
// override this.data when URL has passed (`://....com/?https://foo.com/index.glb` e.g.)
|
||||
if( typeof this.data == "string" ){
|
||||
let searchIsUri = document.location.search &&
|
||||
|
@ -5048,6 +5086,8 @@ const MAX_DELTA = 0.2; // ms
|
|||
const EPS = 10e-6;
|
||||
const MOVED = 'moved';
|
||||
|
||||
if( !AFRAME.components['movement-controls'] ){
|
||||
|
||||
AFRAME.registerComponent('movement-controls', {
|
||||
|
||||
/*******************************************************************
|
||||
|
@ -5258,6 +5298,7 @@ AFRAME.registerComponent('movement-controls', {
|
|||
|
||||
}())
|
||||
});
|
||||
}
|
||||
AFRAME.components['hand-tracking-controls'].Component.prototype.onModelLoaded = function(onModelLoaded){
|
||||
return function(e){
|
||||
onModelLoaded.apply(this);
|
||||
|
@ -5325,6 +5366,9 @@ AFRAME.components['look-controls'].Component.prototype.updateOrientation = funct
|
|||
/**
|
||||
* Touch-to-move-forward controls for mobile.
|
||||
*/
|
||||
|
||||
if( !AFRAME.components['touch-controls'] ){
|
||||
|
||||
AFRAME.registerComponent('touch-controls', {
|
||||
schema: {
|
||||
enabled: { default: true },
|
||||
|
@ -5413,6 +5457,7 @@ AFRAME.registerComponent('touch-controls', {
|
|||
//xrSession.addEventListener('selectend', this.onTouchEnd);
|
||||
}
|
||||
})
|
||||
}
|
||||
window.AFRAME.registerComponent('xrf-button', {
|
||||
schema: {
|
||||
label: {
|
||||
|
|
|
@ -1,3 +1,43 @@
|
|||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:41:10 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:39:00 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:38:50 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:38:27 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:37:05 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:36:14 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:35:39 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 03:32:13 PM UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Oct 14 11:39:48 AM CEST 2024
|
||||
* https://xrfragment.org
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Mon Oct 14 11:39:48 AM CEST 2024
|
||||
* v0.5.1 generated at Mon Dec 9 15:41:10 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Mon Oct 14 11:39:48 AM CEST 2024
|
||||
* v0.5.1 generated at Mon Dec 9 15:41:10 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Mon Oct 14 11:39:48 AM CEST 2024
|
||||
* v0.5.1 generated at Mon Dec 9 15:41:10 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Mon Oct 14 11:39:48 AM CEST 2024
|
||||
* v0.5.1 generated at Mon Dec 9 15:41:10 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Mon Oct 14 11:39:48 AM CEST 2024
|
||||
* v0.5.1 generated at Mon Dec 9 15:41:10 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Mon Oct 14 11:39:48 AM CEST 2024
|
||||
* v0.5.1 generated at Mon Dec 9 15:41:10 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
|
|
@ -1,3 +1,43 @@
|
|||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:41:10 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:39:00 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:38:50 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:38:27 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:37:05 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:36:14 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:35:39 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 03:32:13 PM UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Oct 14 11:39:48 AM CEST 2024
|
||||
* https://xrfragment.org
|
||||
|
@ -3064,10 +3104,6 @@ xrf.frag.pos = function(v, opts){
|
|||
if( pos.x == undefined ){
|
||||
let obj = scene.getObjectByName(v.string)
|
||||
if( !obj ) return console.warn("#pos="+v.string+" not found")
|
||||
//let worldPos = new THREE.Vector3()
|
||||
//obj.getWorldPosition(worldPos)
|
||||
//camera.position.copy(worldPos)
|
||||
//obj.attach(camera) // instead of add() [keeps camera animations intact]
|
||||
obj.add(camera)
|
||||
camera.position.set(0,0,0)
|
||||
let c = camera.rotation
|
||||
|
|
|
@ -1,3 +1,43 @@
|
|||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:41:10 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:39:00 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:38:50 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:38:27 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:37:05 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:36:14 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 15:35:39 UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Dec 9 03:32:13 PM UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
/*
|
||||
* v0.5.1 generated at Mon Oct 14 11:39:48 AM CEST 2024
|
||||
* https://xrfragment.org
|
||||
|
@ -3064,10 +3104,6 @@ xrf.frag.pos = function(v, opts){
|
|||
if( pos.x == undefined ){
|
||||
let obj = scene.getObjectByName(v.string)
|
||||
if( !obj ) return console.warn("#pos="+v.string+" not found")
|
||||
//let worldPos = new THREE.Vector3()
|
||||
//obj.getWorldPosition(worldPos)
|
||||
//camera.position.copy(worldPos)
|
||||
//obj.attach(camera) // instead of add() [keeps camera animations intact]
|
||||
obj.add(camera)
|
||||
camera.position.set(0,0,0)
|
||||
let c = camera.rotation
|
||||
|
|
|
@ -5,6 +5,8 @@ window.AFRAME.registerComponent('xrf', {
|
|||
},
|
||||
init: async function () {
|
||||
|
||||
this.data = Object.values(this.attrValue)[0]
|
||||
|
||||
// override this.data when URL has passed (`://....com/?https://foo.com/index.glb` e.g.)
|
||||
if( typeof this.data == "string" ){
|
||||
let searchIsUri = document.location.search &&
|
||||
|
|
|
@ -9,6 +9,8 @@ const MAX_DELTA = 0.2; // ms
|
|||
const EPS = 10e-6;
|
||||
const MOVED = 'moved';
|
||||
|
||||
if( !AFRAME.components['movement-controls'] ){
|
||||
|
||||
AFRAME.registerComponent('movement-controls', {
|
||||
|
||||
/*******************************************************************
|
||||
|
@ -219,3 +221,4 @@ AFRAME.registerComponent('movement-controls', {
|
|||
|
||||
}())
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
/**
|
||||
* Touch-to-move-forward controls for mobile.
|
||||
*/
|
||||
|
||||
if( !AFRAME.components['touch-controls'] ){
|
||||
|
||||
AFRAME.registerComponent('touch-controls', {
|
||||
schema: {
|
||||
enabled: { default: true },
|
||||
|
@ -89,3 +92,4 @@ AFRAME.registerComponent('touch-controls', {
|
|||
//xrSession.addEventListener('selectend', this.onTouchEnd);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue