diff --git a/index.html b/index.html index bdab366..039a305 100644 --- a/index.html +++ b/index.html @@ -205,6 +205,46 @@ #no-webxr a { color: #000; } + + #aria-output { + position: fixed; + left: 0; top: 0; + width: 50vw; + z-index: 99; + color: #fff; + background-color: rgba(0, 0, 0, 0.78) ; + } + + .a11y-point { + display: flex; + flex-wrap: nowrap; + flex-direction: row; + justify-content: center; + white-space: nowrap; + position: fixed; + width: 4px; height: 4px; + background-color: red; + border-radius: 50%; + z-index: 99; + } + + .xr-button { + position: absolute; + left: 50%; bottom: 20px; + transform: translateX(-50%); + padding: 16px 36px; + border: 1px solid transparent; + border-radius: 4px; + background: rgba(0,0,0,0.78); + color: #fff; + font: normal 16px sans-serif; + text-align: center; + z-index: 999; + } + + .xr-button:active { + border: 1px solid #fff; + } +
+
-

Hello! Currently loading Assets and Data

Hello! Currently loading Assets and Data
Handedness: - Left - RightLinks + Rechts - diff --git a/package-lock.json b/package-lock.json index bab4932..8baa8fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,10 @@ "version": "1.0.0", "license": "Apache-2.0", "dependencies": { + "@webxr-input-profiles/assets": "^1.0.12", + "@webxr-input-profiles/motion-controllers": "^1.0.0", "ecsy": "^0.4.2", + "i18next": "^22.1.4", "three": "^0.145.0", "three-obj-loader": "^1.1.3", "three-pointerlock": "0.0.2", @@ -42,6 +45,17 @@ "js-tokens": "^4.0.0" } }, + "node_modules/@babel/runtime": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz", + "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==", + "dependencies": { + "regenerator-runtime": "^0.13.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", @@ -1623,6 +1637,16 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, + "node_modules/@webxr-input-profiles/assets": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@webxr-input-profiles/assets/-/assets-1.0.12.tgz", + "integrity": "sha512-1/08iIqoxD+/4nV9tEbM496RcET2ImeMcmQUlGRRgeeat9s50/xRjNg59wLV3T/yTrUEkekHCpsHrvuf7GZQNQ==" + }, + "node_modules/@webxr-input-profiles/motion-controllers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@webxr-input-profiles/motion-controllers/-/motion-controllers-1.0.0.tgz", + "integrity": "sha512-Ppxde+G1/QZbU8ShCQg+eq5VtlcL/FPkerF1dkDOLlIml0LJD1tFqnCZYR0SrHzYleIQ2siRnOx7xbFLaCpExQ==" + }, "node_modules/abortcontroller-polyfill": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", @@ -2076,6 +2100,28 @@ "entities": "^3.0.1" } }, + "node_modules/i18next": { + "version": "22.1.4", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-22.1.4.tgz", + "integrity": "sha512-MCDtNRyovLY22rgLoZdCzg2QIza1V1A/3Hxb99akJzTDjcqCRWEsglTpFUt0vUjOxSxz+WmxmFETLHORRS+n6Q==", + "funding": [ + { + "type": "individual", + "url": "https://locize.com" + }, + { + "type": "individual", + "url": "https://locize.com/i18next.html" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + } + ], + "dependencies": { + "@babel/runtime": "^7.20.6" + } + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -2523,10 +2569,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "node_modules/require-from-string": { "version": "2.0.2", @@ -2819,6 +2864,14 @@ "js-tokens": "^4.0.0" } }, + "@babel/runtime": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz", + "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==", + "requires": { + "regenerator-runtime": "^0.13.11" + } + }, "@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", @@ -3848,6 +3901,16 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, + "@webxr-input-profiles/assets": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@webxr-input-profiles/assets/-/assets-1.0.12.tgz", + "integrity": "sha512-1/08iIqoxD+/4nV9tEbM496RcET2ImeMcmQUlGRRgeeat9s50/xRjNg59wLV3T/yTrUEkekHCpsHrvuf7GZQNQ==" + }, + "@webxr-input-profiles/motion-controllers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@webxr-input-profiles/motion-controllers/-/motion-controllers-1.0.0.tgz", + "integrity": "sha512-Ppxde+G1/QZbU8ShCQg+eq5VtlcL/FPkerF1dkDOLlIml0LJD1tFqnCZYR0SrHzYleIQ2siRnOx7xbFLaCpExQ==" + }, "abortcontroller-polyfill": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", @@ -4184,6 +4247,14 @@ "entities": "^3.0.1" } }, + "i18next": { + "version": "22.1.4", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-22.1.4.tgz", + "integrity": "sha512-MCDtNRyovLY22rgLoZdCzg2QIza1V1A/3Hxb99akJzTDjcqCRWEsglTpFUt0vUjOxSxz+WmxmFETLHORRS+n6Q==", + "requires": { + "@babel/runtime": "^7.20.6" + } + }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -4526,10 +4597,9 @@ "dev": true }, "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "require-from-string": { "version": "2.0.2", diff --git a/package.json b/package.json index 65dbb53..03b1305 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "private": true, "scripts": { "start": "parcel -p 80 index.html", + "startwithtls": "parcel -p 443 index.html --https", "build": "parcel build index.html", "watch": "parcel watch index.html" }, @@ -29,7 +30,10 @@ }, "homepage": "https://github.com/timondev/webxr-a11y#readme", "dependencies": { + "@webxr-input-profiles/assets": "^1.0.12", + "@webxr-input-profiles/motion-controllers": "^1.0.0", "ecsy": "^0.4.2", + "i18next": "^22.1.4", "three": "^0.145.0", "three-obj-loader": "^1.1.3", "three-pointerlock": "0.0.2", diff --git a/src/assets.js b/src/assets.js index 0832634..9b63b25 100644 --- a/src/assets.js +++ b/src/assets.js @@ -57,7 +57,7 @@ export default { pg_floor_lm_tex: { url: 'pg_floor_lm.jpg', options: { encoding: THREE.sRGBEncoding, flipY: false} }, pg_door_lm_tex: { url: 'pg_door_lm.jpg', options: { encoding: THREE.sRGBEncoding, flipY: false} }, pg_object_tex: { url: 'angel.basis', options: { encoding: THREE.sRGBEncoding, flipY: false} }, - pg_object_model: { url: 'angel.min.glb' }, // TODO: try draco version, angel.min.gl + pg_object_model: { url: 'angel.min.glb' }, pg_bg_tex: { url: 'pg_bg.jpg', options: { encoding: THREE.sRGBEncoding, flipY: false} }, pg_flare_tex: { url: 'flare.jpg', options: { encoding: THREE.sRGBEncoding, flipY: false} }, pg_panel_tex: { url: 'panel.basis', options: { encoding: THREE.sRGBEncoding, flipY: false} }, diff --git a/src/index.js b/src/index.js index a49ed19..7a254d6 100644 --- a/src/index.js +++ b/src/index.js @@ -3,7 +3,11 @@ import { PointerLockControls } from "three/examples/jsm/controls/PointerLockCont import { VRButton } from "./lib/VRButton.js"; import { slideshow } from "./lib/slideshow.js"; -import { loadAssets } from "./lib/assetManager.js"; +import { loadAsset, loadAssets } from "./lib/assetManager.js"; + +import { cameraDistanceTo, mobileAndTabletCheck } from "./lib/utils.js"; +// import { angleToClock, readSurroundings, requestText, speak } from './lib/a11y.js' +import { convertAngleToClock, getElementDefinition, getElementName, getElementPath, getNextKeyInObject, isElementChild, speak, translate, updateElementList } from "./lib/accessibility.js"; // ECSY import { World } from "ecsy"; @@ -19,6 +23,8 @@ import { SystemsGroup } from "./systems/SystemsGroup.js"; import assets from "./assets.js"; +import i18next from "i18next"; + import { Object3D, Rotation, @@ -54,6 +60,7 @@ import { shaders } from "./lib/shaders.js"; import WebXRPolyfill from "webxr-polyfill"; import { detectWebXR } from "./lib/utils.js"; +import { Constants, fetchProfile } from "@webxr-input-profiles/motion-controllers"; const polyfill = new WebXRPolyfill(); let clock = new THREE.Clock(); @@ -62,6 +69,7 @@ let scene, parent, renderer, camera, + spectator, controls, context = {}; let raycontrol, @@ -118,6 +126,10 @@ const handedness = urlObject.searchParams.has("handedness") ? urlObject.searchParams.get("handedness") : "right"; +const defaultLanguage = urlObject.searchParams.has("language") + ? urlObject.searchParams.get("language") + : "de"; + // Target positions when moving from one room to another const targetPositions = { hall: { @@ -136,6 +148,25 @@ const targetPositions = { }, }; +const centerVec = new THREE.Vector3(0, 0, 0); +const upVec = new THREE.Vector3(0, 1, 0); + +import en from './locales/en'; +import de from './locales/de_new'; +import { Vector3 } from "three"; + +i18next.init({ + lng: defaultLanguage, + resources: { + en: { + translation: en, + }, + de: { + translation: de, + }, + } +}) + const gotoRoom = (room) => { rooms[context.room].exit(context); raycontrol.deactivateAll(); @@ -238,6 +269,14 @@ const init = () => { listener = new THREE.AudioListener(); camera.add(listener); + spectator = new THREE.PerspectiveCamera( + 80, + window.innerWidth / window.innerHeight, + 0.005, + 10000 + ); + spectator.position.set(0, 1.6, 0); + ambientMusic = new THREE.Audio(listener); controls = new PointerLockControls(camera, renderer.domElement); @@ -279,6 +318,7 @@ const init = () => { context.scene = parent; context.renderer = renderer; context.camera = camera; + context.spectator = spectator; context.audioListener = listener; context.goto = null; context.cameraRig = cameraRig; @@ -286,6 +326,13 @@ const init = () => { context.world = ecsyWorld; context.systemsGroup = systemsGroup; context.handedness = handedness; + context.language = defaultLanguage; + + context.elements = []; + context.currentElement = ''; + + context.debugMode = !mobileAndTabletCheck(); + context.deltaTime = 0.0; window.context = context; @@ -296,13 +343,16 @@ const init = () => { "assets/", assets, () => { + speak('intro'); + raycontrol = new RayControl(context, handedness); context.raycontrol = raycontrol; + setupRayControl(); teleport = new Teleport(context); context.teleport = teleport; - setupControllers(); + setupControllers(renderer); roomHall.setup(context); roomPanorama.setup(context); roomPanoramaStereo.setup(context); @@ -322,9 +372,20 @@ const init = () => { gotoRoom(0); context.cameraRig.position.set(0, 0, 2); context.goto = null; + + window.setTimeout(() => { + speak('enter_vr'); + window.setTimeout(() => { speak('enter_vr_2') }, 1000); + window.setTimeout(() => { speak('enter_vr_3') }, 3000); + window.setTimeout(() => { speak('enter_vr_4') }, 5000); + }, 1000); } else { slideshow.setup(context); + + speak('exit_vr'); } + }, () => { + rooms[context.room].exit(context); }) ); renderer.setAnimationLoop(animate); @@ -344,29 +405,257 @@ const init = () => { ); } -const setupControllers = () => { - const model = assets["generic_controller_model"].scene; - const material = new THREE.MeshLambertMaterial({ - map: assets["controller_tex"], - }); - model.getObjectByName("body").material = material; - model.getObjectByName("trigger").material = material; - +const setupControllers = async (renderer) => { for (let i = 0; i < 2; i++) { let controller = controllers[i]; controller.boundingBox = new THREE.Box3(); controller.userData.grabbing = null; - controller.addEventListener("connected", function (event) { - this.add(model.clone()); - raycontrol.addController(this, event.data); + controller.addEventListener("connected", async (event) => { + const { profile, assetPath } = await fetchProfile(event.data, '/profiles') + const asset = await loadAsset(renderer, { url: assetPath }) + raycontrol.addController(controller, event.data, { profile, assetPath, asset }); + speak('controller_connected'); }); - controller.addEventListener("disconnect", function () { - this.remove(this.children[0]); - raycontrol.removeController(this, event.data); + controller.addEventListener("disconnect", async () => { + controller.remove(controller.children[0]); + raycontrol.removeController(controller, event.data); + speak('controller_disconnected'); }); } } +const setupRayControl = () => { + raycontrol.addControllerEventListener( + 'selectNext', + [ + { id: 'right-a', isStateModifier: true, state: Constants.ComponentState.PRESSED }, + { id: 'right-squeeze', isStateModifier: true, state: Constants.ComponentState.DEFAULT }, + ], + 0.5, + false, + (ctx, states) => { + if(ctx.elements.length == 0) { + return speak('no_objects_available'); + } + + if(ctx.currentElement != '') { + let elementName = getElementName(ctx.currentElement); + + if(isElementChild(ctx.currentElement)) { + let parent = getElementDefinition(getElementPath(ctx.currentElement)); + ctx.currentElement = getElementPath(ctx.currentElement) + '.' + getNextKeyInObject(parent.children, elementName); + speak(getElementDefinition(ctx.currentElement).name); + return; + } + + console.log(ctx.currentElement, ctx.elements.indexOf(elementName), ctx.elements); + let index = ctx.elements.indexOf(elementName); + ctx.currentElement = ctx.elements[(index != -1 && index < ctx.elements.length - 1) ? index + 1 : 0]; + speak(getElementDefinition(ctx.currentElement).name); + return; + } + + ctx.currentElement = ctx.elements[0]; + speak(getElementDefinition(ctx.currentElement).name); + } + ) + raycontrol.addControllerEventListener( + 'getDescription', + [ + { id: 'right-b', isStateModifier: true, state: Constants.ComponentState.PRESSED }, + { id: 'right-squeeze', isStateModifier: true, state: Constants.ComponentState.DEFAULT }, + ], + 1.0, + false, + (ctx, states) => { + if(ctx.elements.length == 0) { + return speak('no_objects_available'); + } + + if(ctx.currentElement != '') { + let definition = getElementDefinition(ctx.currentElement); + return speak(definition.description); + } + + return speak('no_element_selected'); + } + ) + raycontrol.addControllerEventListener( + 'changeLevel', + [ + { id: 'right-a', isStateModifier: true, state: Constants.ComponentState.PRESSED }, + { id: 'right-squeeze', isStateModifier: true, state: Constants.ComponentState.PRESSED }, + ], + 1.0, + false, + (ctx, states) => { + if(ctx.elements.length == 0) { + ctx.currentElement = ''; + return speak('lost_focus'); + } + + if(isElementChild(ctx.currentElement)) { + ctx.currentElement = getElementPath(ctx.currentElement); + speak(getElementDefinition(ctx.currentElement).name); + return; + } + + let parent = getElementDefinition(ctx.currentElement); + + if(parent.children != null) { + ctx.currentElement += '.' + getNextKeyInObject(parent.children, ''); + speak(getElementDefinition(ctx.currentElement).name); + return; + } + + speak('no_children'); + } + ) + raycontrol.addControllerEventListener( + 'debug', + [ + { id: 'left-squeeze', isStateModifier: true, state: Constants.ComponentState.DEFAULT }, + { id: 'left-thumbstick', isStateModifier: true, state: Constants.ComponentState.PRESSED } + ], + 0.2, + false, + (ctx, states) => { + // console.log('camera-positon', ctx.renderer.xr.getCamera(ctx.camera).position); + // console.log('camera-rotation', ctx.camera.rotation); + ctx.scene.traverseVisible((element) => { + if(element.name != '') console.log(element.name); + }); + } + ) + raycontrol.addControllerEventListener( + 'teleport', + [ + { id: 'right-squeeze', isStateModifier: true, state: Constants.ComponentState.PRESSED }, + { id: 'right-thumbstick', isStateModifier: true, state: Constants.ComponentState.PRESSED } + ], + 0.2, + false, + (ctx, states) => { + if(ctx.currentElement != null) { + let definition = getElementDefinition(ctx.currentElement); + if(definition != null && definition.teleportation != null) { + const { position, rotation } = definition.teleportation; + const camera = ctx.renderer.xr.getCamera(ctx.camera); + + ctx.cameraRig.position.sub(new THREE.Vector3(camera.position.x - position.x, 0.0, camera.position.z - position.z)); + + // camera.lookAt(rotation); + speak('teleport', { object: translate(definition.name) }); + } else { + speak('no_teleport'); + } + } + } + ) + raycontrol.addControllerEventListener( + 'interactLeft', + [ + { id: 'left-squeeze', isStateModifier: true, state: Constants.ComponentState.PRESSED }, + { id: 'left-y', isStateModifier: true, state: Constants.ComponentState.PRESSED }, + ], + 0.5, + false, + (ctx, states, controllerIndex) => { + if(ctx.elements.length == 0) { + return speak('no_objects_available'); + } + + if(ctx.currentElement != '') { + let definition = getElementDefinition(ctx.currentElement); + if(definition != null && definition.interaction != null && definition.interaction.event != null) { + let controller = ctx.renderer.xr.getController(controllerIndex); + return definition.interaction.event(ctx, controller, 'left'); + } else { + return speak('no_interaction_available'); + } + } + + return speak('no_element_selected'); + } + ) + raycontrol.addControllerEventListener( + 'interactRight', + [ + { id: 'right-squeeze', isStateModifier: true, state: Constants.ComponentState.PRESSED }, + { id: 'right-b', isStateModifier: true, state: Constants.ComponentState.PRESSED }, + ], + 0.5, + false, + (ctx, states, controllerIndex) => { + if(ctx.elements.length == 0) { + return speak('no_objects_available'); + } + + if(ctx.currentElement != '') { + let definition = getElementDefinition(ctx.currentElement); + if(definition != null && definition.interaction != null && definition.interaction.event != null) { + let controller = ctx.renderer.xr.getController(controllerIndex); + return definition.interaction.event(ctx, controller, 'right'); + } else { + return speak('no_interaction_available'); + } + } + + return speak('no_element_selected'); + } + ) + raycontrol.addControllerEventListener( + 'navigation', + [ + { id: 'right-squeeze', isStateModifier: true, state: Constants.ComponentState.DEFAULT }, + { id: 'right-thumbstick', isStateModifier: true, state: Constants.ComponentState.PRESSED } + ], + 0.2, + false, + (ctx, states) => { + if(ctx.elements.length == 0) { + return speak('no_objects_available'); + } + + if(ctx.currentElement == '') return speak('no_element_selected'); + let elementName = getElementName(ctx.currentElement); + let object = ctx.scene.getObjectByName(elementName); + + if(object == null) { + let definition = getElementDefinition(ctx.currentElement); + + if(definition == null || definition.position == null) return speak('no_element_selected'); + + object = definition; + } + + let position = object.position; + const cameraPosition = ctx.camera.position; + + let vector = new THREE.Vector3(); + ctx.camera.getWorldDirection(vector); + + // camera -> object + const u = new THREE.Vector2(position.x - cameraPosition.x, -1 * (position.z - cameraPosition.z)); + u.normalize(); + + // camera -> view + const v = new THREE.Vector3(1, 1, -1); + v.multiply(vector); + + let angle = Math.atan2(u.x * v.z - u.y * v.x, u.x * v.x + u.y * v.z) * 180 / Math.PI; + if(angle < 0) angle += 360.0; + + let objectDistancePositon = new THREE.Vector3(); + (object.room == null) ? object.getWorldPosition(objectDistancePositon) : objectDistancePositon.copy(position); + + const distance = cameraDistanceTo(ctx, objectDistancePositon); + + speak('navigation_text', { x: translate('clock', { clock: convertAngleToClock(angle) }), y: distance.toFixed(1) }); + } + ) +} + // @FIXME Hack for Oculus Browser issue const selectStartSkip = {}; const selectEndSkip = {}; @@ -388,8 +677,8 @@ const onSelectStart = (ev) => { } // <@FIXME - const trigger = ev.target.getObjectByName("trigger"); - trigger.rotation.x = -0.3; +// const trigger = ev.target.getObjectByName("trigger"); +// trigger.rotation.x = -0.3; raycontrol.onSelectStart(ev); } @@ -405,8 +694,8 @@ const onSelectEnd = (ev) => { } // <@FIXME - const trigger = ev.target.getObjectByName("trigger"); - trigger.rotation.x = 0; +// const trigger = ev.target.getObjectByName("trigger"); +// trigger.rotation.x = 0; raycontrol.onSelectEnd(ev); } @@ -414,6 +703,11 @@ const onWindowResize = () => { camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); renderer.setSize(window.innerWidth, window.innerHeight); + + if (context.debugMode) { + spectator.aspect = window.innerWidth / window.innerHeight; + spectator.updateProjectionMatrix(); + } } const animate = () => { @@ -442,6 +736,26 @@ const animate = () => { gotoRoom(context.goto); context.goto = null; } + + updateElementList(context); + if (context.debugMode && renderer.xr.isPresenting) { + const xrCamera = renderer.xr.getCamera(camera) + + spectator.projectionMatrix.copy(camera.projectionMatrix); + spectator.position.copy(xrCamera.position); + spectator.quaternion.copy(xrCamera.quaternion); + + const currentRenderTarget = renderer.getRenderTarget(); + + renderer.xr.isPresenting = false; + // render to the canvas on our main display + renderer.setRenderTarget(null); + renderer.render(scene, spectator); + + // reset back to enable WebXR + renderer.setRenderTarget(currentRenderTarget); + renderer.xr.isPresenting = true; + } } window.onload = () => { diff --git a/src/lib/ColorWheel.js b/src/lib/ColorWheel.js index 1d54f1f..1949dae 100644 --- a/src/lib/ColorWheel.js +++ b/src/lib/ColorWheel.js @@ -75,7 +75,7 @@ class ColorWheel { //this.ui.rotation.x = -Math.PI / 3; this.ui.position.y = 0.1; - controller.add(this.ui); + ctx.raycontrol.addAttachement("sprayCan", controller, this.ui); ctx.raycontrol.addState("colorwheel", { colliderMesh: this.ui, diff --git a/src/lib/RayControl.js b/src/lib/RayControl.js index d86ce66..2ee6dd0 100644 --- a/src/lib/RayControl.js +++ b/src/lib/RayControl.js @@ -1,372 +1,500 @@ -import * as THREE from 'three'; -import { EventDispatcher } from './EventDispatcher.js'; - -const tempMatrix = new THREE.Matrix4(); -let rayMaterial; +import { Constants, MotionController } from '@webxr-input-profiles/motion-controllers' +import * as THREE from 'three' +import { Matrix4 } from 'three' +import { Frustum } from 'three' +import { objects } from '../objects.js' +import { readRoom } from './a11y.js' +import { EventDispatcher } from './EventDispatcher.js' +import { getObjectDescription, requestTextToBeSpoken, sanitizedID } from './utils.js' + +const tempMatrix = new THREE.Matrix4() +let rayMaterial const validStateController = [ - "primary", - "secondary", - "both", - "left", - "right" -]; + 'primary', + 'secondary', + 'both', + 'left', + 'right' +] class RayControl extends EventDispatcher { - enable() { - this.setLineStyle(this.previousLineStyle); - this.enabled = true; + enable () { + this.setLineStyle(this.previousLineStyle) + this.enabled = true } - _sort() { - this.currentStates = this.currentStates.sort((a,b) => { - let pa = a.order || 0; - let pb = b.order || 0; - return pa - pb; - }); + _sort () { + this.currentStates = this.currentStates.sort((a, b) => { + const pa = a.order || 0 + const pb = b.order || 0 + return pa - pb + }) } - disable() { - this.lineBasic.visible = this.line0.visible = false; - this.enabled = false; - this.controllers.forEach(controller => controller.active = false); + disable () { + this.lineBasic.visible = this.line0.visible = false + this.enabled = false + this.controllers.forEach(controller => { controller.active = false }) } - changeHandedness(primary) { + changeHandedness (primary) { if (primary !== this.primary) { - this.primary = primary; - this.secondary = primary === "right" ? "left" : "right"; + this.primary = primary + this.secondary = primary === 'right' ? 'left' : 'right' - this.dispatchEvent("handednessChanged", {primary: this.primary, secondary: this.secondary}); + this.dispatchEvent('handednessChanged', { primary: this.primary, secondary: this.secondary }) } } - addState(name, state, activate) { + hasAttachment (name) { + this.attachements[name] !== null; + } + + addAttachement (name, controller, scene) { + this.attachements[name] = true; + controller.add(scene); + } + + removeAttachement (name, controllerData, scene) { + delete this.attachements[name]; + controllerData.controller.remove(scene); + } + + addControllerEventListener(name, modifiers, cooldown, instantReset, eventListener) { + this.controllerEvents[name] = { modifiers, callback: eventListener, cooldown, activeCooldown: 0, instantReset }; + } + + addState (name, state, activate) { if (this.states[name]) { - console.error(`RayControl state '${name}' already exist, please use a different name.`); - return; + console.error(`RayControl state '${name}' already exist, please use a different name.`) + return } - state.name = name; + state.name = name - if (typeof state.raycaster === "undefined") { - state.raycaster = true; + if (typeof state.raycaster === 'undefined') { + state.raycaster = true } - if (typeof state.controller === "undefined") { - state.controller = "primary"; + if (typeof state.controller === 'undefined') { + state.controller = 'primary' } else if (!validStateController.includes(state.controller)) { - console.warn("Invalid controller selector:", state.controller); - state.controller = "primary"; + console.warn('Invalid controller selector:', state.controller) + state.controller = 'primary' } - this.states[name] = state; + this.states[name] = state if (activate === true) { - this.currentStates.push(state); + this.currentStates.push(state) } - return state; + return state } - activateState(name) { + activateState (name) { if (this.states[name]) { - this.currentStates.push(this.states[name]); - this._sort(); + this.currentStates.push(this.states[name]) + this._sort() } } - deactivateAll(name) { - this.currentStates = []; + deactivateAll (name) { + this.currentStates = [] this.controllers.forEach(c => { this.currentStates.forEach(s => { if (c.intersections[s.name]) { - c.intersections[s.name] = null; + c.intersections[s.name] = null } - }); - }); + }) + }) } - deactivateState(name) { - this.currentStates.splice(this.currentStates.indexOf(name), 1); + deactivateState (name) { + this.currentStates.splice(this.currentStates.indexOf(name), 1) this.controllers.forEach(c => { if (c.intersections[name]) { - c.intersections[name] = null; + c.intersections[name] = null } - }); + }) - this._sort(); + this._sort() } - addController(controller, inputSource) { - let controllerData = { - controller: controller, - inputSource: inputSource, + addController (controller, inputSource, { profile, assetPath, asset }) { + const controllerData = { + controller, + inputSource, active: false, stateHit: {}, intersections: {}, currentIntersection: null, + previousControllerStates: {}, + motionController: new MotionController(inputSource, profile, assetPath), hit: false - }; + } + + this.addTouchPointDots(controllerData.motionController, asset); + + // FIX HP Controller + if(profile.profileId === 'hp-mixed-reality') { + asset.scene.rotation.x += Math.PI / 8.0; + } + + controller.add(asset.scene); - this.controllers.push(controllerData); + this.controllers.push(controllerData) - if (this.matchController(controllerData, "primary")) { - controller.add( this.raycasterContext ); + if (this.matchController(controllerData, 'primary')) { + controller.add(this.raycasterContext) } - this.dispatchEvent("controllerConnected", controllerData); + if (this.matchController(controllerData, 'secondary')) { + controller.add(this.secondaryRayCasterContext); + } + + this.dispatchEvent('controllerConnected', controllerData) } - removeController(controller) { - const index = this.controllers.findIndex(controllerData => controllerData.controller === controller); + removeController (controller) { + const index = this.controllers.findIndex(controllerData => controllerData.controller === controller) const controllerData = this.controllers.find(controllerData => controllerData.controller === controller) - this.controllers.splice(index, 1); - this.dispatchEvent("controllerDisconnected", controllerData); + this.controllers.splice(index, 1) + this.dispatchEvent('controllerDisconnected', controllerData) } - constructor(ctx, primary) { - super(); - this.ctx = ctx; + addTouchPointDots(motionController, asset) { + Object.values(motionController.components).forEach((component) => { + if (component.touchPointNodeName) { + const touchPointRoot = asset.getObjectByName(component.touchPointNodeName); + + const sphereGeometry = new THREE.SphereGeometry(0.001); + const material = new THREE.MeshBasicMaterial({ color: 0x0000FF }); + const touchPointDot = new THREE.Mesh(sphereGeometry, material); + touchPointRoot.add(touchPointDot); + } + }); + } - if (typeof primary === "undefined") { - this.primary = "right"; - this.secondary = "left"; + updateMotionControllerModel(motionController, controllerRoot) { + Object.values(motionController.components).forEach((component) => { + Object.values(component.visualResponses).forEach((visualResponse) => { + // Find the topmost node in the visualization + const valueNode = controllerRoot.getObjectByName(visualResponse.valueNodeName); + + // Calculate the new properties based on the weight supplied + if (visualResponse.valueNodeProperty === 'visibility') { + valueNode.visible = visualResponse.value; + } else if (visualResponse.valueNodeProperty === 'transform') { + const minNode = controllerRoot.getObjectByName(visualResponse.minNodeName); + const maxNode = controllerRoot.getObjectByName(visualResponse.maxNodeName); + + if(visualResponse.value < 0 || visualResponse.value > 1) { + return; + } + + valueNode.quaternion.slerpQuaternions( + minNode.quaternion, + maxNode.quaternion, + visualResponse.value + ); + + valueNode.position.lerpVectors( + minNode.position, + maxNode.position, + visualResponse.value + ); + } + }); + }) + + } + + constructor (ctx, primary) { + super() + this.ctx = ctx + + if (typeof primary === 'undefined') { + this.primary = 'right' + this.secondary = 'left' } else { - this.primary = primary; - this.secondary = primary === "right" ? "left" : "right"; + this.primary = primary + this.secondary = primary === 'right' ? 'left' : 'right' } - this.controllers = []; + this.controllers = [] - this.previousLineStyle = 'pretty'; - this.enabled = true; - this.raycaster = new THREE.Raycaster(); - this.states = {}; - this.currentStates = []; + this.previousLineStyle = 'pretty' + this.enabled = true + this.raycaster = new THREE.Raycaster() + this.states = {} + this.currentStates = [] + this.attachements = {} + this.controllerEvents = {} - const line = ctx.assets['teleport_model'].scene.getObjectByName('beam'); + const line = ctx.assets.teleport_model.scene.getObjectByName('beam') - ctx.assets['beam_tex'].wrapT = THREE.RepeatWrapping; - ctx.assets['beam_tex'].wrapS = THREE.RepeatWrapping; + ctx.assets.beam_tex.wrapT = THREE.RepeatWrapping + ctx.assets.beam_tex.wrapS = THREE.RepeatWrapping rayMaterial = line.material = new THREE.ShaderMaterial({ uniforms: { - time: {value: 0}, - active: {value: 0}, - tex: {value: ctx.assets['beam_tex']} + time: { value: 0 }, + active: { value: 0 }, + tex: { value: ctx.assets.beam_tex } }, vertexShader: ctx.shaders.basic_vert, fragmentShader: ctx.shaders.beam_frag, blending: THREE.AdditiveBlending, transparent: true - }); + }) - line.renderOrder = 10; + line.renderOrder = 10 - line.name = 'line'; - this.rayLength = 5; - line.scale.z = this.rayLength; + line.name = 'line' + this.rayLength = 5 + line.scale.z = this.rayLength this.line0 = line.clone(); this.line0.visible = true; - this.raycasterContext = new THREE.Group(); - this.raycasterContext.add(this.line0); - this.raycasterContext.name = 'raycasterContext'; + this.secondaryLine0 = line.clone(); + this.secondaryLine0.visible = false; + + this.raycasterContext = new THREE.Group() + this.raycasterContext.add(this.line0) + this.raycasterContext.name = 'raycasterContext' + + this.secondaryRayCasterContext = new THREE.Group() + this.secondaryRayCasterContext.add(this.secondaryLine0) + this.secondaryRayCasterContext.name = 'raycasterContext' - const geometry = new THREE.BufferGeometry().setFromPoints( [ new THREE.Vector3( 0, 0, 0 ), new THREE.Vector3( 0, 0, - 1 ) ] ); + const geometry = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(0, 0, 0), new THREE.Vector3(0, 0, -1)]); - this.lineBasic = new THREE.Line( geometry ); + this.lineBasic = new THREE.Line(geometry); this.lineBasic.name = 'line'; this.lineBasic.scale.z = 5; this.lineBasic.visible = false; this.raycasterContext.add(this.lineBasic); + this.secondaryRayCasterContext.add(this.lineBasic.clone()); } - setLineStyle(lineStyle) { - const basic = lineStyle === 'basic'; - this.lineBasic.visible = basic; - this.line0.visible = !basic; - this.previousLineStyle = lineStyle; + setLineStyle (lineStyle) { + const basic = lineStyle === 'basic' + this.lineBasic.visible = basic + this.line0.visible = !basic + this.previousLineStyle = lineStyle } /* selector could be: left, right, both, primary, secondary */ - matchController(controllerData, selector) { - const handedness = controllerData.inputSource.handedness; + matchController (controllerData, selector) { + const handedness = controllerData.inputSource.handedness return ( - (selector === handedness) || - (selector === "both" && (handedness === "right" || handedness === "left")) || - (selector === "primary" && this.primary === handedness) || - (selector === "secondary" && this.secondary === handedness) - ); + (selector === handedness) || + (selector === 'both' && (handedness === 'right' || handedness === 'left')) || + (selector === 'primary' && this.primary === handedness) || + (selector === 'secondary' && this.secondary === handedness) + ) } - onSelectStart(evt) { - if (!this.enabled) { return; } + onSelectStart (evt) { + if (!this.enabled) { return } - let controller = evt.target; - let controllerData = this.controllers.find(c => c.controller === controller); + const controller = evt.target + const controllerData = this.controllers.find(c => c.controller === controller) if (controllerData) { - controllerData.active = true; + controllerData.active = true if (controllerData.currentIntersection) { - const state = controllerData.currentIntersection.state; + const state = controllerData.currentIntersection.state if (state.onSelectStart) { - state.onSelectStart(controllerData.currentIntersection.intersection, controllerData.controller); + state.onSelectStart(controllerData.currentIntersection.intersection, controllerData.controller) } } // Check no raycaster states this.currentStates.forEach(state => { if (state.onSelectStart && !state.raycaster) { - state.onSelectStart(controllerData.intersections[state.name], controller); + state.onSelectStart(controllerData.intersections[state.name], controller) } - }); + }) } } - execute(ctx, delta, time) { - if (!this.enabled || this.currentStates.length === 0) { return; } - - rayMaterial.uniforms.time.value = time; + execute (ctx, delta, time) { + if (!this.enabled || this.currentStates.length === 0) { return } - let firstHit = false; + rayMaterial.uniforms.time.value = time - const stateIntersections = {}; for (let c = 0; c < this.controllers.length; c++) { - let controllerData = this.controllers[c]; + const controllerData = this.controllers[c] + + // update motion controller + const motionController = controllerData.motionController + motionController.updateFromGamepad() + + // update visual controller + this.updateMotionControllerModel(motionController, controllerData.controller) for (let i = 0; i < this.currentStates.length; i++) { - let state = this.currentStates[i]; + const state = this.currentStates[i] if (!state.raycaster) { - continue; + continue } // Check if this controller should be active on this state if (!this.matchController(controllerData, state.controller)) { - continue; + continue } - let controller = controllerData.controller; - let active = controllerData.active; - let intersections = this.getIntersections(controller, state.colliderMesh); + const controller = controllerData.controller + const intersections = this.getIntersections(controller, state.colliderMesh) if (intersections.length > 0) { // Use just the closest object - controllerData.intersections[state.name] = intersections[0]; - controllerData.stateHit[state.name] = true; + controllerData.intersections[state.name] = intersections[0] + controllerData.stateHit[state.name] = true } else { - controllerData.intersections[state.name] = null; + controllerData.intersections[state.name] = null } } } - this.line0.scale.z = Math.min(this.rayLength, 1); - this.lineBasic.scale.z = Math.min(this.rayLength, 1); + this.line0.scale.z = Math.min(this.rayLength, 1) + this.lineBasic.scale.z = Math.min(this.rayLength, 1) // For each controller, find the closest intersection from all the states for (let c = 0; c < this.controllers.length; c++) { - let controllerData = this.controllers[c]; - let intersections = Object.entries(controllerData.intersections).filter(i => i[1] !== null); - if (intersections.length > 0) { + const controllerData = this.controllers[c] + const intersections = Object.entries(controllerData.intersections).filter(i => i[1] !== null) + + const motionController = controllerData.motionController; + let states = {}; + for(let d = 0; d < motionController.data.length; d++) { + const id = sanitizedID(motionController.data[d].id, motionController.xrInputSource.handedness); + states[id] = motionController.data[d]; + } - intersections.sort((a,b) => { - return a[1].distance - b[1].distance; - }); + const keys = Object.keys(this.controllerEvents); + for(let ck = 0; ck < keys.length; ck++) { + const { modifiers, callback, cooldown, activeCooldown, instantReset } = this.controllerEvents[keys[ck]]; + let toBeExecuted = true; + for(let m = 0; m < modifiers.length; m++) { + if(states[modifiers[m].id] == null || (modifiers[m].isStateModifier == true && (states[modifiers[m].id].state == null || states[modifiers[m].id].state != modifiers[m].state)) || (modifiers[m].isXAxisModifier && (states[modifiers[m].id].xAxis == null || Math.abs(states[modifiers[m].id].xAxis) < modifiers[m].xAxis)) || + (modifiers[m].isYAxisModifier && (states[modifiers[m].id].yAxis == null || Math.abs(states[modifiers[m].id].yAxis) < modifiers[m].yAxis))) { + toBeExecuted = false; + break; + } + } - const intersectionData = intersections[0]; - const intersection = intersectionData[1]; - const state = this.states[intersectionData[0]]; + if(toBeExecuted) { + if(activeCooldown < (time - cooldown)) { + callback(ctx, states, c); + this.controllerEvents[keys[ck]].activeCooldown = time; + } + } else if(instantReset) { + this.controllerEvents[keys[ck]].activeCooldown = 0; + } + } - controllerData.prevIntersection = controllerData.currentIntersection; + if (intersections.length > 0) { + intersections.sort((a, b) => { + return a[1].distance - b[1].distance + }) + + const intersectionData = intersections[0] + const intersection = intersectionData[1] + const state = this.states[intersectionData[0]] + + controllerData.prevIntersection = controllerData.currentIntersection controllerData.currentIntersection = { state, intersection - }; + } if (state.lineStyleOnIntersection) { - this.setLineStyle(state.lineStyleOnIntersection); + this.setLineStyle(state.lineStyleOnIntersection) } else { - this.setLineStyle('advanced'); + this.setLineStyle('advanced') } - state.onHover && state.onHover(intersection, controllerData.active, controllerData.controller); - this.line0.scale.z = Math.min(intersection.distance, 1); - this.lineBasic.scale.z = Math.min(intersection.distance, 1); + state.onHover && state.onHover(intersection, controllerData.active, controllerData.controller) + this.line0.scale.z = Math.min(intersection.distance, 1) + this.lineBasic.scale.z = Math.min(intersection.distance, 1) } else { - controllerData.currentIntersection = null; + controllerData.currentIntersection = null } } // Handle onHoverLeave for (let c = 0; c < this.controllers.length; c++) { - let controllerData = this.controllers[c]; + const controllerData = this.controllers[c] if (!controllerData.prevIntersection) { - continue; + continue } // If we can't find the previous intersection currently enabled, we should emit hoverLeave if (!this.controllers.find(c => { - let prev = controllerData.prevIntersection; - let current = c.currentIntersection; + const prev = controllerData.prevIntersection + const current = c.currentIntersection return current && prev.state.name === current.state.name && - prev.intersection.object === current.intersection.object; + prev.intersection.object === current.intersection.object } - )) { + )) { controllerData.prevIntersection.state.onHoverLeave( controllerData.prevIntersection.intersection, false, controllerData.controller - ); + ) - controllerData.prevIntersection = null; + controllerData.prevIntersection = null } } } - getIntersections( controller, colliderMesh ) { - let raycasterContext = controller.getObjectByName('raycasterContext'); + getIntersections (controller, colliderMesh) { + const raycasterContext = controller.getObjectByName('raycasterContext') if (!raycasterContext) { - console.warn('No raycasterContext found for this controller', controller); - return []; + console.warn('No raycasterContext found for this controller', controller) + return [] } - tempMatrix.identity().extractRotation( raycasterContext.matrixWorld ); + tempMatrix.identity().extractRotation(raycasterContext.matrixWorld) - this.raycaster.ray.origin.setFromMatrixPosition( raycasterContext.matrixWorld ); - this.raycaster.ray.direction.set( 0, 0, - 1 ).applyMatrix4( tempMatrix ); + this.raycaster.ray.origin.setFromMatrixPosition(raycasterContext.matrixWorld) + this.raycaster.ray.direction.set(0, 0, -1).applyMatrix4(tempMatrix) if (Array.isArray(colliderMesh)) { - return this.raycaster.intersectObjects( colliderMesh, true); + return this.raycaster.intersectObjects(colliderMesh, true) } else { - return this.raycaster.intersectObject( colliderMesh, true); + return this.raycaster.intersectObject(colliderMesh, true) } } - onSelectEnd(evt) { - if (!this.enabled) { return; } + onSelectEnd (evt) { + if (!this.enabled) { return } - let controllerData = this.controllers.find(c => c.controller === evt.target) - if (!controllerData || !controllerData.active) { return; } + const controllerData = this.controllers.find(c => c.controller === evt.target) + if (!controllerData || !controllerData.active) { return } if (controllerData) { if (controllerData.currentIntersection) { - const state = controllerData.currentIntersection.state; + const state = controllerData.currentIntersection.state if (state.onSelectEnd) { - state.onSelectEnd(controllerData.currentIntersection.intersection, controllerData.controller); + state.onSelectEnd(controllerData.currentIntersection.intersection, controllerData.controller) } } // Check no raycaster states this.currentStates.forEach(state => { if (state.onSelectEnd && !state.raycaster) { - state.onSelectEnd(null, controllerData.controller); + state.onSelectEnd(null, controllerData.controller) } - }); + }) } - controllerData.active = false; + controllerData.active = false } } -export { rayMaterial, RayControl }; \ No newline at end of file +export { rayMaterial, RayControl } diff --git a/src/lib/VRButton.js b/src/lib/VRButton.js index e8d36e4..1fec13f 100644 --- a/src/lib/VRButton.js +++ b/src/lib/VRButton.js @@ -14,7 +14,7 @@ var VRButton = { - createButton: function ( renderer, callback ) { + createButton: function ( renderer, callback, exitCallback ) { const showEnterVR = ( /*device*/ ) => { @@ -48,23 +48,12 @@ var VRButton = { button.style.display = ''; - button.style.cursor = 'pointer'; - button.style.left = 'calc(50% - 50px)'; - button.style.width = '100px'; + // button.style.cursor = 'pointer'; + // button.style.left = 'calc(50% - 50px)'; + // button.style.width = '100px'; button.textContent = 'ENTER VR'; - - button.onmouseenter = function () { - - button.style.opacity = '1.0'; - - }; - - button.onmouseleave = function () { - - button.style.opacity = '0.5'; - - }; + button.tabIndex = "4"; button.onclick = function () { @@ -83,6 +72,7 @@ var VRButton = { } else { currentSession.end(); + exitCallback(); } @@ -93,10 +83,7 @@ var VRButton = { const disableButton = () => { button.style.display = ''; - - button.style.cursor = 'auto'; - button.style.left = 'calc(50% - 75px)'; - button.style.width = '150px'; + button.disabled = true; button.onmouseenter = null; button.onmouseleave = null; @@ -113,29 +100,13 @@ var VRButton = { } - const stylizeElement = ( element ) => { - - element.style.position = 'absolute'; - element.style.bottom = '20px'; - element.style.padding = '12px 6px'; - element.style.border = '1px solid #fff'; - element.style.borderRadius = '4px'; - element.style.background = 'rgba(0,0,0,0.1)'; - element.style.color = '#fff'; - element.style.font = 'normal 13px sans-serif'; - element.style.textAlign = 'center'; - element.style.opacity = '0.5'; - element.style.outline = 'none'; - element.style.zIndex = '999'; - - } - if ( 'xr' in navigator ) { var button = document.createElement( 'button' ); + button.classList.add('xr-button'); button.style.display = 'none'; - stylizeElement( button ); + // stylizeElement( button ); navigator.xr.isSessionSupported( 'immersive-vr' ).then( function ( supported ) { diff --git a/src/lib/a11y.js b/src/lib/a11y.js new file mode 100644 index 0000000..db3af9f --- /dev/null +++ b/src/lib/a11y.js @@ -0,0 +1,152 @@ +import * as THREE from 'three'; +import { objectDictionary } from '../objects'; +import { configureTextBuilder, Text } from 'troika-three-text'; +import i18next from 'i18next'; + +const frustum = new THREE.Frustum(); +const aabb = new THREE.Box3() +const sphere = new THREE.Sphere(); +const cameraObjectPosition = new THREE.Vector3(); +const position = new THREE.Vector3(); + +window.Box3 = THREE.Box3; + +const roomNames = [ + "hall", + "sound", + "photogrammetry", + "vertigo", + "panoramastereo", + "panorama1", + "panorama2", + "panorama3", + "panorama4", + "panorama5", +]; + +const readSurroundings = (ctx) => { + const xrCamera = ctx.renderer.xr.getCamera(ctx.camera) + + let distance = -1.0; + let cameraPosition = xrCamera.position; + ctx.objects = []; + + if(ctx.values.debugMode) { + document.querySelector('#a11y-points').innerHTML = ''; + } + + xrCamera.updateProjectionMatrix(); + frustum.setFromProjectionMatrix(new THREE.Matrix4().multiplyMatrices( ctx.camera.projectionMatrix, ctx.camera.matrixWorldInverse )) + + ctx.scene.updateWorldMatrix(true, true); + ctx.scene.traverseVisible((object) => { + if(object.name == '' || objectDictionary[object.name] == null || object instanceof Text) return; + if(object.isMesh && !frustum.intersectsObject(object)) { + return; + } + + if(object.isObject3D && object.isMesh !== true) { + aabb.setFromObject(object, true); + aabb.getBoundingSphere(sphere); + sphere.applyMatrix4(object.matrixWorld); + + if(!frustum.intersectsSphere(sphere)) return; + } + + object.getWorldPosition(position); + // position.applyMatrix4(object.matrixWorld); + distance = cameraPosition.distanceTo(position); + + const objectDefinition = objectDictionary[object.name]; + ctx.objects.push({ definition: objectDefinition, object }); + + if (ctx.values.debugMode) { + object.getWorldPosition(cameraObjectPosition); + cameraObjectPosition.project(ctx.camera); + + const onCameraPosition = new THREE.Vector2( + cameraObjectPosition.x * (window.innerWidth / 2) + (window.innerWidth / 2), + -cameraObjectPosition.y * (window.innerHeight / 2) + (window.innerHeight / 2) + ); + + const element = document.createElement('div'); + element.classList.add('a11y-point'); + element.style.left = `${onCameraPosition.x}px`; + element.style.top = `${onCameraPosition.y}px`; + element.innerText = object.name + ' · ' + distance.toFixed(2); + + element.dataset.name = object.name; + + document.querySelector('#a11y-points').appendChild(element); + } + }); + + Object.values(objectDictionary.__fake__).forEach((point) => { + if(!frustum.containsPoint(point.position) || point.room !== roomNames[ctx.room]) { + return; + } + + distance = cameraPosition.distanceTo(point.position); + const object = ctx.scene.getObjectByName(point.id); + ctx.objects.push({ definition: point, object }); + + if (ctx.values.debugMode) { + cameraObjectPosition.copy(point.position); + cameraObjectPosition.project(ctx.camera); + + const onCameraPosition = new THREE.Vector2( + cameraObjectPosition.x * (window.innerWidth / 2) + (window.innerWidth / 2), + -cameraObjectPosition.y * (window.innerHeight / 2) + (window.innerHeight / 2) + ); + + const element = document.createElement('div'); + element.classList.add('a11y-point'); + element.style.left = `${onCameraPosition.x}px`; + element.style.top = `${onCameraPosition.y}px`; + element.innerText = point.name + ' · ' + distance.toFixed(2); + + element.dataset.name = point.name; + + document.querySelector('#a11y-points').appendChild(element); + } + }) +} + +const angleToClock = (angle, language) => { + if(angle >= 345.0 || angle < 15.0) return i18next.t('clock', { clock: 12, lng: language }); + if(angle >= 15.0 && angle < 45.0) return i18next.t('clock', { clock: 1, lng: language }); + if(angle >= 45.0 && angle < 75.0) return i18next.t('clock', { clock: 2, lng: language }); + if(angle >= 75.0 && angle < 105.0) return i18next.t('clock', { clock: 3, lng: language }); + if(angle >= 105.0 && angle < 135.0) return i18next.t('clock', { clock: 4, lng: language }); + if(angle >= 135.0 && angle < 165.0) return i18next.t('clock', { clock: 5, lng: language }); + if(angle >= 165.0 && angle < 195.0) return i18next.t('clock', { clock: 6, lng: language }); + if(angle >= 195.0 && angle < 225.0) return i18next.t('clock', { clock: 7, lng: language }); + if(angle >= 225.0 && angle < 255.0) return i18next.t('clock', { clock: 8, lng: language }); + if(angle >= 255.0 && angle < 285.0) return i18next.t('clock', { clock: 9, lng: language }); + if(angle >= 285.0 && angle < 315.0) return i18next.t('clock', { clock: 10, lng: language }); + if(angle >= 315.0 && angle < 345.0) return i18next.t('clock', { clock: 11, lng: language }); + + return i18next.t('clock_unkown', { lng: language });; +} + +const requestText = (identifier, modifiers, language = 'de') => { + speak(i18next.t(identifier, { ...modifiers, lng: language })); +} + +const speak = (text) => { + const ariaOutput = document.getElementById('aria-output'); + + ariaOutput.innerHTML = ''; + ariaOutput.innerText = text; +} + +const readRoom = (ctx) => { + let zeroPoint = new THREE.Vector2(0.0, 0.0); + objects.sort((o1, o2) => { + return (Math.abs(o1.distance - o2.distance) < 0.5) ? Math.abs(o1.position.distanceTo(zeroPoint)) - Math.abs(o2.position.distanceTo(zeroPoint)) : Math.abs(o1.distance) - Math.abs(o2.distance) + }) + + return objects +} + +export { readRoom, requestText, angleToClock, speak, readSurroundings, getChildOfObject }; \ No newline at end of file diff --git a/src/lib/accessibility.js b/src/lib/accessibility.js new file mode 100644 index 0000000..5f7055b --- /dev/null +++ b/src/lib/accessibility.js @@ -0,0 +1,185 @@ +import i18next from 'i18next'; +import * as THREE from 'three'; +import { objectDictionary } from '../objects'; +import { cameraDistanceTo } from './utils'; + +let ARIA_OUTPUT = document.getElementById('aria-output'); + +const frustum = new THREE.Frustum(); +const aabb = new THREE.Box3() +const sphere = new THREE.Sphere(); +const cameraObjectPosition = new THREE.Vector3(); +const position = new THREE.Vector3(); + +const roomNames = [ + "hall", + "sound", + "photogrammetry", + "vertigo", + "panoramastereo", + "panorama1", + "panorama2", + "panorama3", + "panorama4", + "panorama5", +]; + +const updateElementList = (ctx) => { + const xrCamera = ctx.renderer.xr.getCamera(ctx.camera); + + // reset element list + ctx.elements = []; + let distances = {}; + + // clear screen in debugMode + if(ctx.debugMode) { + document.querySelector('#a11y-points').innerHTML = ''; + } + + // update camera, frustum and world matrix + xrCamera.updateProjectionMatrix(); + frustum.setFromProjectionMatrix(new THREE.Matrix4().multiplyMatrices( ctx.camera.projectionMatrix, ctx.camera.matrixWorldInverse )); + ctx.scene.updateWorldMatrix(true, true); + + // traverse visible scene + ctx.scene.traverseVisible((element) => { + if(element.name == '' || objectDictionary[element.name] == null || element instanceof Text) return; + + // ignore meshes outside of frustum + if(element.isMesh && !frustum.intersectsObject(element)) { + return; + } + + // ignore elements outside of frustum + if(element.isObject3D && element.isMesh !== true) { + aabb.setFromObject(element, true); + aabb.getBoundingSphere(sphere); + sphere.applyMatrix4(element.matrixWorld); + + if(!frustum.intersectsSphere(sphere)) return; + } + + element.getWorldPosition(cameraObjectPosition); + let distance = cameraDistanceTo(ctx, cameraObjectPosition); + + // insert element into list + ctx.elements.push(element.name); + distances[element.name] = distance; + + // update on screen position of element + if (ctx.debugMode) { + cameraObjectPosition.project(ctx.camera); + + const onCameraPosition = new THREE.Vector2( + cameraObjectPosition.x * (window.innerWidth / 2) + (window.innerWidth / 2), + -cameraObjectPosition.y * (window.innerHeight / 2) + (window.innerHeight / 2) + ); + + const debugElement = document.createElement('div'); + debugElement.classList.add('a11y-point'); + debugElement.style.left = `${onCameraPosition.x}px`; + debugElement.style.top = `${onCameraPosition.y}px`; + debugElement.innerText = element.name + ' · ' + distance.toFixed(2); + + document.querySelector('#a11y-points').appendChild(debugElement); + } + }); + + // loop through points that do not have a physical element + Object.values(objectDictionary.__fake__).forEach((point) => { + // ignore points which + if(!frustum.containsPoint(point.position) || point.room !== roomNames[ctx.room]) { + return; + } + + cameraObjectPosition.copy(point.position); + let distance = cameraDistanceTo(ctx, point.position); + + ctx.elements.push(point.id); + distances[point.id] = distance; + + if (ctx.debugMode) { + cameraObjectPosition.project(ctx.camera); + + const onCameraPosition = new THREE.Vector2( + cameraObjectPosition.x * (window.innerWidth / 2) + (window.innerWidth / 2), + -cameraObjectPosition.y * (window.innerHeight / 2) + (window.innerHeight / 2) + ); + + const debugElement = document.createElement('div'); + debugElement.classList.add('a11y-point'); + debugElement.style.left = `${onCameraPosition.x}px`; + debugElement.style.top = `${onCameraPosition.y}px`; + debugElement.innerText = point.id + ' · ' + distance.toFixed(2); + + document.querySelector('#a11y-points').appendChild(debugElement); + } + }); + + ctx.elements.sort((e1, e2) => { + return Math.abs(distances[e1] - distances[e2]) < 0.5 ? ('' + e1).localeCompare(e2) : Math.abs(distances[e1]) - Math.abs(distances[e2]); + }) + + if(ctx.currentElement != '') { + const elementName = getElementName(ctx.currentElement); + const element = ctx.scene.getObjectByName(elementName); + + if (element == null && (objectDictionary['__fake__'][elementName] == null || objectDictionary['__fake__'][elementName].room !== roomNames[ctx.room])) { + ctx.currentElement = ''; + // speak('lost_focus'); + } + } +} + +const isElementChild = (elementPath) => { + return elementPath.indexOf('.') !== -1; +} + +const getElementPath = (elementPath) => { + return elementPath.substring(0, elementPath.lastIndexOf('.')); +} + +const getElementName = (elementPath) => { + return elementPath.split('.').pop(); +} + +const getNextKeyInObject = (object, key) => { + let keys = Object.keys(object); + let index = keys.indexOf(key); + + if(keys.length == 0) return ''; + return keys[(index < keys.length - 1) ? index + 1 : 0]; +} + +const getElementDefinition = (elementPath) => { + let elementSections = elementPath.split('.'); + let pathName = elementSections.shift(); + let startingPoint = objectDictionary[pathName] ?? objectDictionary['__fake__'][pathName]; + + while(startingPoint != null && elementSections.length > 0) { + pathName = elementSections.shift(); + if(startingPoint.children == null) return null; + startingPoint = startingPoint.children[pathName]; + } + + return startingPoint; +} + +const convertAngleToClock = (angle) => { + return Math.round(angle * (12.0 / 360.0)) || 12; +} + +const speak = (message, options = {}) => { + if(ARIA_OUTPUT == null) { + ARIA_OUTPUT = document.getElementById('aria-output'); + } + + ARIA_OUTPUT.innerHTML = ''; + ARIA_OUTPUT.innerText = translate(message, options); +} + +const translate = (identifier, options = {}) => { + return i18next.t(identifier, { ...options, interpolation: { skipOnVariables: false }}) +} + +export { convertAngleToClock, isElementChild, getNextKeyInObject, getElementPath, getElementName, getElementDefinition, speak, translate, updateElementList } \ No newline at end of file diff --git a/src/lib/assetManager.js b/src/lib/assetManager.js index 579d381..115a16c 100644 --- a/src/lib/assetManager.js +++ b/src/lib/assetManager.js @@ -28,6 +28,66 @@ const allAssetsLoaded = (assets) => { return true; } +const loadAsset = async ( + renderer, + asset +) => { + const basisLoader = new BasisTextureLoader(); + basisLoader.setTranscoderPath(BASIS_LIB_PATH); + basisLoader.detectSupport(renderer); + + const gltfLoader = new GLTFLoader(); + const dracoLoader = new DRACOLoader(); + dracoLoader.setDecoderPath(DRACO_LIB_PATH); + gltfLoader.setDRACOLoader(dracoLoader); + + const texLoader = new THREE.TextureLoader(); + const objLoader = new OBJLoader(); + const fontLoader = new FontLoader(); + const audioLoader = new THREE.AudioLoader(); + + const loaders = { + gltf: gltfLoader, + glb: gltfLoader, + obj: objLoader, + gif: texLoader, + png: texLoader, + jpg: texLoader, + basis: basisLoader, + font: fontLoader, + ogg: audioLoader, + }; + + let assetPath = asset.url; + let ext = assetPath.substr(assetPath.lastIndexOf(".") + 1).toLowerCase(); + + return new Promise((resolve) => { loaders[ext].load( + assetPath, + (loadedAsset) => { + const options = asset.options; + asset = ext == "font" ? loadedAsset.data : loadedAsset; + + if (typeof options !== "undefined") { + if (typeof options.repeat !== "undefined") { + asset.repeat.set(options.repeat[0], options.repeat[1]); + delete options.repeat; + } + for (let opt in options) { + asset[opt] = options[opt]; + } + } + + resolve(asset) + }, + () => { + /* on progress */ + }, + (e) => { + console.error("Error loading asset", e); + } + )}); +} + function loadAssets( renderer, basePath, @@ -108,4 +168,4 @@ function loadAssets( } } -export { loadAssets }; \ No newline at end of file +export { loadAsset, loadAssets }; \ No newline at end of file diff --git a/src/lib/utils.js b/src/lib/utils.js index f7197ce..a40b09c 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -1,3 +1,26 @@ +import * as THREE from 'three'; +import { objects } from "../objects"; + +let cameraPosition = new THREE.Vector3(); +let objectPosition = new THREE.Vector3(); + +const cameraDistanceTo = (ctx, position) => { + objectPosition.copy(position); + objectPosition.y = 0; + + if(ctx.renderer.isPresenting) { + cameraPosition.copy(ctx.renderer.xr.getCamera(ctx.camera).position); + cameraPosition.add(ctx.cameraRig.position); + cameraPosition.y = 0; + return cameraPosition.distanceTo(objectPosition); + } + + cameraPosition.copy(ctx.camera.position); + cameraPosition.add(ctx.cameraRig.position); + cameraPosition.y = 0; + return cameraPosition.distanceTo(objectPosition); +} + const newMarker = (x, y, z, color) => { const geo = new THREE.SphereGeometry(0.04); const mat = new THREE.MeshBasicMaterial({ color: color ? color : 0xff0000 }); @@ -29,4 +52,22 @@ const detectWebXR = () => { } } -export { newMarker, angleBetween, getRandomInt, detectWebXR }; \ No newline at end of file +const sanitizedID = (id, handedness) => { + if(id.endsWith('trigger')) return `${handedness}-trigger`; + if(id.endsWith('squeeze')) return `${handedness}-squeeze`; + if(id.endsWith('thumbstick')) return `${handedness}-thumbstick`; + if(id.endsWith('x-button')) return `${handedness}-x`; + if(id.endsWith('y-button')) return `${handedness}-y`; + if(id.endsWith('a-button')) return `${handedness}-a`; + if(id.endsWith('b-button')) return `${handedness}-b`; + + return `${handedness}-unkown`; +} + +const mobileAndTabletCheck = function() { + let check = false; + (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera); + return check; +}; + +export { newMarker, cameraDistanceTo, angleBetween, getRandomInt, detectWebXR, sanitizedID, mobileAndTabletCheck }; \ No newline at end of file diff --git a/src/locales/de.json b/src/locales/de.json new file mode 100644 index 0000000..3004d43 --- /dev/null +++ b/src/locales/de.json @@ -0,0 +1,36 @@ +{ + "intro": "Hallo und Willkommen bei WebXR A11Y, ein Metaverse für Menschen mit Blindheit und Sehbehinderung. Klicke auf den \"Enter VR\"-Knopf um die Erfahrung zu starten. Um die dominante Hand zu ändern, klicke nachfolgend auf \"Links\" oder \"Rechts\".", + "no_objects_available": "Im Moment sind keine Objekte in Sichtweite.", + "enter_vr": "Willkommen, du wirst nun in der Halle teleportiert.", + "exit_vr": "Vielen Dank dass du WebXR A11Y ausprobiert hast. Du kannst das Headset nun abnehmen.", + "xylophone_name": "Xylophon-Instrument", + "doorA_name": "Geräusche Portal", + "doorB_name": "Engel Portal", + "doorC_name": "Vertigo Portal", + "foxr_name": "Hello WebXR-Logo", + "paintings_name": "Verschiedene Gemälde", + "panoballmesh1_name": "Stereo 360-Grad Bild Portal", + "panoballmesh2_name": "360-Grad Außenaustellungsbild Portal", + "panoballmesh3_name": "360-Grad Wanderwegbild Portal", + "panoballmesh4_name": "360-Grad Waldbild Portal", + "panoballmesh5_name": "360-Grad Bergblickbild Portal", + "panoballmesh6_name": "360-Grad Kollosiumsbild Portal", + "graffiti_name": "Graffiti-Wand", + "object_name": "Engelsstatue", + "newsticker_name": "News-Outlet", + "door_name": "Portal zurück zur Halle", + "navigation_text": "Das Objekt befindet sich auf {{x}} {{y}} Meter von dir entfernt.", + "clock_unkown": "X Uhr", + "clock_1": "1 Uhr", + "clock_2": "2 Uhr", + "clock_3": "3 Uhr", + "clock_4": "4 Uhr", + "clock_5": "5 Uhr", + "clock_6": "6 Uhr", + "clock_7": "7 Uhr", + "clock_8": "8 Uhr", + "clock_9": "9 Uhr", + "clock_10": "10 Uhr", + "clock_11": "11 Uhr", + "clock_12": "12 Uhr" +} \ No newline at end of file diff --git a/src/locales/de_new.json b/src/locales/de_new.json new file mode 100644 index 0000000..dcf5ba6 --- /dev/null +++ b/src/locales/de_new.json @@ -0,0 +1,82 @@ +{ + "intro": "Hallo und Willkommen bei WebXR A11Y, ein Metaverse für Menschen mit Blindheit und Sehbehinderung. Klicke auf den \"Enter VR\"-Knopf um die Erfahrung zu starten. Um die dominante Hand zu ändern, klicke nachfolgend auf \"Links\" oder \"Rechts\".", + "no_objects_available": "Im Moment sind keine Objekte in Sichtweite.", + "enter_vr": "Willkommen zur großen Halle. Der rechte Controller bietet verschiedene Möglichkeiten um mit den Erfahrungen zu interagieren. Die A-Taste wählt das nächstliegende Element aus. Die B-Taste gibt die Beschreibung des aktuellen Elements aus.", + "enter_vr_2": "Die A-Taste + Seitliche-Taste öffnet und schließt das Kinder-Menü des ausgewählten Elements.", + "enter_vr_3": "Die B-Taste + Seitliche Taste löst die Interaktion des ausgewählten Element aus. Das Drücken des Joy-Sticks gibt eine Navigationsbeschreibung zum aktuellen Element aus.", + "enter_vr_4": "Das Drücken des Joy-Sticks + Seitliche-Taste teleportiert dich vor das ausgewählte Element.", + "exit_vr": "Vielen Dank dass du WebXR A11Y ausprobiert hast. Du kannst das Headset nun abnehmen.", + "xylophone_name": "Xylofon", + "xylophone_description": "Musikinstrument aus Holzstäbchen, die mit Schlägeln angeschlagen werden.", + "xylophone_left_name": "Xylofon Schlägel Links", + "xylophone_right_name": "Xylofon Schlägel Rechts", + "xylohpone_stick_description": "Schlägel für Xylofon. Das Element ist greifbar", + "xylohpone_stick_interaction_description": "Greift den Schlägel mit dem jeweiligen Controller. Berühre dann einen Holzstab, um eine Note zu spielen.", + "teleport": "Teleportation gestartet, du bist nun bei {{object}}.", + "navigation_text": "Das Element befindet sich auf {{x}}, {{y}} Meter entfernt.", + "clock": "{{clock}} Uhr", + "change_level": "Ebene gewechselt. {{object}}", + "out_of_reach": "Die Interaktion ist zu weit weg, bitte annähern.", + "paintings_name": "Gemälde", + "paintings_description": "5 Gemälde aus verschiedenen Epochen die auf der Wand verteilt sind.", + "sorolla_name": "The Pink Robe. After The Bath", + "sorollo_description": "Gemälde von Joaquin Sorolla, 1916. Eine Frau mit Pinker Robe in einem italienischen Bad schaut nach dem Baden auf einen Herren im weißen Gewand, der ihr das Kleid anzieht.", + "bosch_name": "The Garden of Earthly Delights", + "bosch_description": "Gemälde von Hieronymous Bosch, 1490-1510. Drei verschiedene Gemälde in einem. Links ein Garten mit Tieren und wenigen Menschen. In der Mitte ein Garten mit vielen Menschen. Rechts eine dunkle Wüste mit Kreaturen.", + "rembrandt_name": "Self-Portrait", + "rembrandt_description": "Gemälde von Rembrandt von Rijn, 1659. Ein Portrait eines älteren Mannes in brauner Robbe mit einem braunen Hut. Der Mann ist nach Links gedreht und schaut aus dem Gemälde heraus.", + "seurat_name": "Gray, Weather, Grande Jatte", + "seurat_description": "Gemälde von Georges Seurat, 1888. Eine Landschaft am Ufer mit angekettetem Boot, einem Weg direkt am Ufer und ein paar Bäumen, die Richtung Wasser ragen.", + "degas_name": "The Dance Lesson", + "degas_description": "Gemälde von Edgar Degas, 1879. Ein Tanzraum mit 5 Frauen im Tütü. Eine sitzt mit orangem Oberteil auf dem Boden mit Blick nach unten. Zwei weitere stehen sich gegenüber mit rosa und weißem Oberteil. Zuletzt im Hintergrund zwei tanzende Frauen in Weiß", + "panoballs_name": "Panoramas", + "panoballs_description": "6 Panoramas mit verschiedenen Bildern. Wähle eins Aus um dich dorthin zu teleportieren.", + "panoballmesh1_name": "Stereo Panorama", + "panoballmesh1_description": "Panorama aus zwei Bildern, zeigt ein Museum von Innen.", + "panoballmesh2_name": "Außenaustellung Panorama", + "panoballmesh2_description": "Panorama für Außenausstellung", + "panoballmesh3_name": "Wanderpfad Panorama", + "panoballmesh3_description": "Panorama für Wanderpfad", + "panoballmesh4_name": "Wald Panorama", + "panoballmesh4_description": "Panorama für Waldspaziergang", + "panoballmesh5_name": "Bergaussicht Panorama", + "panoballmesh5_description": "Panorama für Bergaussicht", + "panoballmesh6_name": "Altes Gemäuer Panorama", + "panoballmesh6_description": "Panorama für Altes Gemäuer", + "newsticker_name": "Twitter-Screen", + "newsticker_description": "Screen, der diverse Tweets anzeigt. Interagiere um den aktuellen Tweet anzuhören.", + "newsticker_message": "Tweet by {{author}}: {{message}}", + "door_name": "Portal Halle", + "door_description": "Portal zurück zur Halle.", + "door_a_name": "Portal Soundroom", + "door_a_description": "Raum mit verschiedenen geräuschen Geräuschen rund um den Spieler.", + "door_b_name": "Portal Engel Ausstellung", + "door_b_description": "Raum mit einer Engelsstatue.", + "door_c_name": "Portal Vertigo", + "door_c_description": "Raum mit einem hohem Turm ohne Boden.", + "angel_name": "Baptismal Angel Kneeling, 1827 - 1828", + "angel_description": "Skulptur von Bertel Thorvaldes aus Marmor. Muttergotteskirche (Kopenhagen), Thorvaldsen Museum. Fotogrammetrischer Scan von Geoffry Marchal.", + "viewpoint_name": "Aussichtspunkt", + "viewpoint_description": "Letzer Aussichtspunkt vor dem Abgrund.", + "no_children": "Dieses Element hat keine Kinder.", + "no_element_selected": "Es ist kein Element ausgewählt.", + "no_interaction_available": "Es ist keine Interaktion möglich.", + "enter_room_a": "Willkommen im Soundroom. Warte etwas ab, um diverse Geräusche zu hören. Versuche gerne auf den jeweils abgespielten Sound zu zeigen und benenne ihn.", + "enter_room_b": "Willkommen im Ausstellungsraum. Genieße die klassiche Musik oder lasse dir etwas über die Engelstatue im Raum sagen.", + "enter_room_c": "Willkommen im Raum Vertigo. Leider ist es nicht möglich, diese Erfahrung gesamtheitlich über Ton zu präsentieren. Genieße trotzdem die frische Luft und gehe ein paar Schritte vor und zurück.", + "return_back": "Willkommen zurück in der Halle. Probiere gerne noch eine andere Erfahrung aus.", + "controller_connected": "Controller verbunden.", + "controller_disconnected": "Controller getrennt.", + "graffiti_name": "Graffiti-Wand", + "graffiti_description": "Eine Wand für Graffiti.", + "enter_graffiti": "Willkommen bei der Graffiti-Wand, der linke Controller ist nun eine Sprühdose. Mit auslösen des Triggers kannst du Farbe an die Wand sprühen. Probiere es gerne aus und zeichne einen Kreis.", + "exit_graffiti": "Der Graffitibereich wurde verlassen.", + "enter_xylophone": "Xylofon-Schlägel aufgenommen. Spiele ein paar Noten.", + "exit_xylophone": "Xylofon-Schlägel zurückgelegt.", + "enter_panorama_1": "Willkommen zum Stereo Panorama. Drücke die Trigger-Taste um zurückzukehren.", + "enter_panorama_2": "Willkommen zum Außenaustellung Panorama. Drücke die Trigger-Taste um zurückzukehren.", + "enter_panorama_3": "Willkommen zum Wanderpfad Panorama. Drücke die Trigger-Taste um zurückzukehren.", + "enter_panorama_4": "Willkommen zum Wald Panorama. Drücke die Trigger-Taste um zurückzukehren.", + "enter_panorama_5": "Willkommen zum Bergaussicht Panorama. Drücke die Trigger-Taste um zurückzukehren.", + "enter_panorama_6": "Willkommen zum Altes Gemäuer Panorama. Drücke die Trigger-Taste um zurückzukehren." +} \ No newline at end of file diff --git a/src/locales/en.json b/src/locales/en.json new file mode 100644 index 0000000..a4ac452 --- /dev/null +++ b/src/locales/en.json @@ -0,0 +1,36 @@ +{ + "intro": "Hello and welcome to WebXR A11Y, a metaverse for people with blindness and visual impairment. Click the \"Enter VR\"-button to start the experience. To change the dominant hand, click \"Left\" or \"Right\" below.", + "no_objects_available": "There are no objects in view at the moment.", + "enter_vr": "Welcome, you are now teleported in the hall", + "exit_vr": "Thank you for trying WebXR A11Y. You can now take off the headset.", + "xylophone_name": "xylophone_instrument", + "doorA_name": "Sound Portal", + "doorB_name": "Angel Portal", + "doorC_name": "Vertigo Portal", + "foxr_name": "Hello WebXR Logo", + "paintings_name": "Various Paintings", + "panoballmesh1_name": "Stereo 360 Degree Image Portal", + "panoballmesh2_name": "360 degree outdoor display image portal", + "panoballmesh3_name": "360-degree walking path image portal", + "panoballmesh4_name": "360-degree forest image portal", + "panoballmesh5_name": "360-degree mountain view image portal", + "panoballmesh6_name": "360-degree collage image portal", + "graffiti_name": "graffiti wall", + "object_name": "angel statue", + "newssticker_name": "news outlet", + "door_name": "portal back to the hall", + "navigation_text": "Object is located at {{x}} {{y}} meters away from you.", + "clock_unkown": "X clock", + "clock_1": "1 o'clock", + "clock_2": "2 o'clock", + "clock_3": "3 o'clock", + "clock_4": "4 o'clock", + "clock_5": "5 o'clock", + "clock_6": "6 o'clock", + "clock_7": "7 o'clock", + "clock_8": "8 o'clock", + "clock_9": "9 o'clock", + "clock_10": "10 o'clock", + "clock_11": "11 o'clock", + "clock_12": "12 o'clock" +} \ No newline at end of file diff --git a/src/locales/objects.json b/src/locales/objects.json new file mode 100644 index 0000000..1133198 --- /dev/null +++ b/src/locales/objects.json @@ -0,0 +1,79 @@ +Scene +paintings +bosch +degas +rembrandt +seurat +sorolla +panoball1 +panoball2 +xylophone +xnote000 +xnote001 +xnote002 +xnote003 +xnote004 +xnote005 +xnote006 +xnote007 +xnote008 +xnote009 +xnote010 +xnote011 +xnote012 +xylobolts +newsticker +author +hashtag +message +panoball6 +panoball3 +panoball4 +panoball5 +foxr +lightpanels +hall +teleport +sky +clouds +xylostick-left +xylostickball-left +xylostick-right +xylostickball-right +screen +graffiti +infopanel000 +infopanel001 +infopanel002 +infopanel003 +infopanel004 +infopanel005 +infopanel006 +infopanel007 +infopanel008 +infopanel009 +infopanel010 +infopanel012 +infopanel013 +infopanel011 +infopanel014 +mozillamr +infopanel015 +doorC +doorA +doorB +panoballmesh1 +panoballmesh2 +panoballmesh3 +panoballmesh4 +panoballmesh5 +panoballmesh6 + +panel +flare +teleport +door +floor +door_frame +bg +object \ No newline at end of file diff --git a/src/objects.js b/src/objects.js new file mode 100644 index 0000000..47983fe --- /dev/null +++ b/src/objects.js @@ -0,0 +1,258 @@ +import * as THREE from 'three' +import { speak } from './lib/accessibility'; +import { cameraDistanceTo } from './lib/utils'; +import { getCurrentNews } from './stations/NewsTicker'; +import { activateStick, deactivateStick } from './stations/Xylophone'; + + +const objectDictionary = { + xylophone: { + name: "xylophone_name", + description: "xylophone_description", + teleportation: { + position: new THREE.Vector3(2.1643, 0.0, -2.517), + rotation: new THREE.Vector3(-1.73, 0.0, 1.72), + }, + interaction: { + description: "", + event: (ctx, controller, hand) => { + let position = new THREE.Vector3(); + let elementName = (hand == 'left') ? "xylostick-left" : "xylostick-right"; + let target = ctx.scene.getObjectByName(elementName); + + if(controller.userData.grabbing !== null) { + deactivateStick(controller); + return speak('exit_xylophone'); + } + + target.getWorldPosition(position); + let distance = cameraDistanceTo(ctx, position); + + if(distance > 0.99) { + return speak('out_of_reach'); + } + + activateStick(ctx, 0, controller); + return speak('enter_xylophone'); + } + } + }, + paintings: { + name: "paintings_name", + description: "paintings_description", + teleportation: { + position: new THREE.Vector3(1.8642, 0.0, -0.8037), + rotation: new THREE.Vector3(-1.73, 0.0, 1.72), + }, + children: { + bosch: { + name: "bosch_name", + description: "bosch_description", + teleportation: { + position: new THREE.Vector3(5.05287, 0.0, -2.13125), + rotation: new THREE.Vector3(-1.73, 0.0, 1.72), + } + }, + degas: { + name: "degas_name", + description: "degas_description", + teleportation: { + position: new THREE.Vector3(6.52162, 0.0, 1.63323), + rotation: new THREE.Vector3(-1.73, 0.0, 1.72), + } + }, + rembrandt: { + name: "rembrandt_name", + description: "rembrandt_description", + teleportation: { + + } + }, + seurat: { + name: "seurat_name", + description: "seurat_description", + teleportation: { + position: new THREE.Vector3(6.52162, 0.0, 1.63323), + rotation: new THREE.Vector3(-1.73, 0.0, 1.72), + } + }, + sorolla: { + name: "sorolla_name", + description: "sorolla_description", + teleportation: { + position: new THREE.Vector3(5.7982, 0.0, -5.6888), + rotation: new THREE.Vector3(-1.73, 0.0, 1.72), + } + }, + }, + }, + door: { + name: 'door_name', + description: 'door_description', + interaction: { + description: "", + event: (ctx) => { + ctx.goto = 0; + speak('return_back'); + } + } + }, + doorC: { + name: 'door_c_name', + description: 'door_c_description', + interaction: { + description: "", + event: (ctx) => { + ctx.goto = 3; + speak('enter_room_c'); + } + } + }, + doorA: { + name: 'door_a_name', + description: 'door_a_description', + interaction: { + description: "", + event: (ctx) => { + ctx.goto = 1; + speak('enter_room_a'); + } + } + }, + doorB: { + name: 'door_b_name', + description: 'door_b_description', + interaction: { + description: "", + event: (ctx) => { + ctx.goto = 2; + speak('enter_room_b'); + } + } + }, + panoballmesh1: { + name: "panoballmesh1_name", + description: "panoballmesh1_description", + interaction: { + description: "", + event: (ctx) => { + ctx.goto = 4; + speak('enter_panorama_1'); + } + } + }, + object: { + name: "angel_name", + description: "angel_description" + }, + __fake__: { + graffiti: { + id: "graffiti", + name: "graffiti_name", + description: "graffiti_description", + position: new THREE.Vector3(-0.738, 1.5, 6.249), + room: 'hall', + teleportation: { + position: new THREE.Vector3(-0.82781, 0.0, 5.66473), + rotation: new THREE.Vector3(0.0, 0.0, 0.0,) + } + }, + panoballs: { + id: "panoballs", + name: "panoballs_name", + description: "panoballs_description", + position: new THREE.Vector3(-0.480724, 1.25, -0.796223), + room: 'hall', + children: { + panoballmesh2: { + name: "panoballmesh2_name", + description: "panoballmesh2_description", + interaction: { + description: "", + event: (ctx) => { + ctx.goto = 5; + speak('enter_panorama_2'); + } + } + }, + panoballmesh3: { + name: "panoballmesh3_name", + description: "panoballmesh3_description", + interaction: { + description: "", + event: (ctx) => { + ctx.goto = 6; + speak('enter_panorama_3'); + } + } + }, + panoballmesh4: { + name: "panoballmesh4_name", + description: "panoballmesh4_description", + interaction: { + description: "", + event: (ctx) => { + ctx.goto = 7; + speak('enter_panorama_4'); + } + } + }, + panoballmesh5: { + name: "panoballmesh5_name", + description: "panoballmesh5_description", + interaction: { + description: "", + event: (ctx) => { + ctx.goto = 8; + speak('enter_panorama_5'); + } + } + }, + panoballmesh6: { + name: "panoballmesh6_name", + description: "panoballmesh6_description", + interaction: { + description: "", + event: (ctx) => { + ctx.goto = 9; + speak('enter_panorama_6'); + } + } + }, + } + }, + newsticker: { + id: "newsticker", + name: "newsticker_name", + description: "newsticker_description", + position: new THREE.Vector3(-4.98878, 2.5, -0.95009), + room: 'hall', + teleportation: { + position: new THREE.Vector3(-1.0, 1.25, -0.796223), + rotation: new THREE.Vector3(-1.73, 0.0, 1.72), + }, + interaction: { + description: "newsticker_interaction_description", + event: (ctx) => { + let news = ctx.currentNews; + speak('newsticker_message', { message: news.message, author: news.author }); + } + } + }, + viewpoint: { + id: "viewpoint", + name: "viewpoint_name", + description: "viewpoint_description", + position: new THREE.Vector3(0.06607, 1.5, -4.37845), + room: 'vertigo', + teleportation: { + position: new THREE.Vector3(0.06607, 0.0, -4.37845), + rotation: new THREE.Vector3(0.0, 0.0, 0.0), + } + } + } +} + +window.objectDictionary = objectDictionary; + +export { objectDictionary } \ No newline at end of file diff --git a/src/rooms/Hall.js b/src/rooms/Hall.js index 88f2ef9..98591d7 100644 --- a/src/rooms/Hall.js +++ b/src/rooms/Hall.js @@ -160,6 +160,7 @@ const exit = (ctx) => { ctx.raycontrol.deactivateState("teleport"); xylophone.exit(ctx); + graffiti.exit(ctx); } const execute = (ctx, delta, time) => { diff --git a/src/rooms/PanoramaStereo.js b/src/rooms/PanoramaStereo.js index 7d4ef6f..e7e2cbb 100644 --- a/src/rooms/PanoramaStereo.js +++ b/src/rooms/PanoramaStereo.js @@ -28,6 +28,7 @@ const enter = (ctx) => { ctx.scene.add(panoL); ctx.scene.add(panoR); ctx.camera.layers.enable(1); + ctx.spectator.layers.enable(1); context = ctx; ctx.raycontrol.activateState("panoramaStereo"); @@ -37,6 +38,7 @@ const exit = (ctx) => { ctx.scene.remove(panoL); ctx.scene.remove(panoR); ctx.camera.layers.disable(1); + ctx.spectator.layers.disable(1); ctx.raycontrol.deactivateState("panoramaStereo"); } diff --git a/src/stations/Graffiti.js b/src/stations/Graffiti.js index 7e3a452..b72d3b1 100644 --- a/src/stations/Graffiti.js +++ b/src/stations/Graffiti.js @@ -10,6 +10,7 @@ import { DebugHelper, } from "../components"; import { angleBetween, getRandomInt } from "../lib/utils.js"; +import { speak } from "../lib/accessibility"; let colorWheel; @@ -22,7 +23,7 @@ const enter = (ctx) => { let material, wall, drawContext; let lastPosition = new THREE.Vector2(); -let brushImg, canvasTmp, ctxTmp; +let brushImg, canvasTmp, ctxTmp, drawingCanvas; let lastController; let paintImg = new Image(); @@ -37,7 +38,7 @@ const colorize = (r, g, b) => { imgData.data[t + 2] = (b * imgData.data[t + 2]) / 255; } ctxTmp.putImageData(imgData, 0, 0); - paintImg.src = canvasTmp.toDataURL(); + paintImg = canvasTmp.transferToImageBitmap(); } const setup = (ctx, hall) => { @@ -57,7 +58,7 @@ const setup = (ctx, hall) => { let checkerSpray = ctx.world.createEntity(); let spray = ctx.assets["spray_model"].scene; - const attachSprayCan = (controllerData) => { + const attachSprayCan = (ctx, controllerData) => { let controller = controllerData.controller; const handedness = controllerData.inputSource.handedness; let listener = new THREE.AudioListener(); @@ -68,7 +69,7 @@ const setup = (ctx, hall) => { audioLoader.load("assets/ogg/spray.ogg", (buffer) => { sound.setBuffer(buffer); sound.name = "spraySound"; - controller.add(sound); + ctx.raycontrol.addAttachement("spraySound", controller, sound); }); spray @@ -82,24 +83,26 @@ const setup = (ctx, hall) => { }); spray.getObjectByName("spraycolor").material = new THREE.MeshLambertMaterial({ color: 0xff0000 }); - controller.add(spray); + ctx.raycontrol.addAttachement("sprayCan", controller, spray); } - const attachColorWheel = (controllerData) => { - let controller = controllerData.controller; - colorWheel = new ColorWheel(ctx, controller, (rgb) => { - colorize(rgb.r, rgb.g, rgb.b); - spray - .getObjectByName("spraycolor") - .material.color.setRGB(rgb.r / 255, rgb.g / 255, rgb.b / 255); - }); + // const attachColorWheel = (controllerData) => { + // let controller = controllerData.controller; + // colorWheel = new ColorWheel(ctx, controller, (rgb) => { + // colorize(rgb.r, rgb.g, rgb.b); + // spray + // .getObjectByName("spraycolor") + // .material.color.setRGB(rgb.r / 255, rgb.g / 255, rgb.b / 255); + // }); - colorWheel.enter(); - } + // colorWheel.enter(); + // } ctx.raycontrol.addEventListener("controllerConnected", (controllerData) => { - if (ctx.raycontrol.matchController(controllerData, "primary")) { - attachSprayCan(controllerData); + if (ctx.raycontrol.matchController(controllerData, "secondary")) { + if(ctx.raycontrol.hasAttachment("sprayCan")) return; + + attachSprayCan(ctx, controllerData); checkerSpray .addComponent(AreaChecker) .addComponent(Object3D, { value: controllerData.controller }) @@ -119,6 +122,7 @@ const setup = (ctx, hall) => { raycasterContext.position.set(0, -0.015, -0.025); ctx.raycontrol.setLineStyle("basic"); ctx.raycontrol.activateState("graffiti"); + speak('enter_graffiti'); }, onExiting: (entity) => { const obj3D = entity.getComponent(Object3D).value; @@ -129,44 +133,50 @@ const setup = (ctx, hall) => { raycasterContext.position.set(0, 0, 0); ctx.raycontrol.setLineStyle("advanced"); ctx.raycontrol.deactivateState("graffiti"); + speak('exit_graffiti'); }, }); } else { - attachColorWheel(controllerData); - checker - .addComponent(AreaChecker) - .addComponent(Object3D, { value: controllerData.controller }) - .addComponent(AreaReactor, { - onEntering: (entity) => { - const obj3D = entity.getComponent(Object3D).value; - obj3D.getObjectByName("Scene").visible = false; - obj3D.getObjectByName("ColorWheel").visible = true; - }, - onExiting: (entity) => { - const obj3D = entity.getComponent(Object3D).value; - obj3D.getObjectByName("Scene").visible = true; - obj3D.getObjectByName("ColorWheel").visible = false; - }, - }); + if(ctx.raycontrol.hasAttachment("colorWheel")) return; + + // attachColorWheel(controllerData); + // checker + // .addComponent(AreaChecker) + // .addComponent(Object3D, { value: controllerData.controller }) + // .addComponent(AreaReactor, { + // onEntering: (entity) => { + // const obj3D = entity.getComponent(Object3D).value; + // obj3D.getObjectByName("Scene").visible = false; + // obj3D.getObjectByName("ColorWheel").visible = true; + // }, + // onExiting: (entity) => { + // const obj3D = entity.getComponent(Object3D).value; + // obj3D.getObjectByName("Scene").visible = true; + // obj3D.getObjectByName("ColorWheel").visible = false; + // }, + // }); } }); let width = 2048; let height = 1024; - let maxDistance = 1; + let maxDistance = 1.5; brushImg = new Image(); - canvasTmp = document.createElement("canvas"); - ctxTmp = canvasTmp.getContext("2d"); + canvasTmp = new window.OffscreenCanvas(512, 512); + ctxTmp = canvasTmp.getContext("2d", { desynchronized: true, willReadFrequently: true }); brushImg.onload = () => { canvasTmp.width = brushImg.width; canvasTmp.height = brushImg.height; + + ctxTmp.clearRect(0, 0, canvasTmp.width, canvasTmp.height); + ctxTmp.drawImage(brushImg, 0, 0); colorize(0, 0, 0); }; brushImg.src = "assets/spray_brush.png"; - const drawingCanvas = document.createElement("canvas"); + drawingCanvas = document.createElement("canvas"); drawingCanvas.width = width; drawingCanvas.height = height; @@ -175,6 +185,18 @@ const setup = (ctx, hall) => { drawContext.fillStyle = "#fff"; drawContext.fillRect(0, 0, width, height); + if(window.localStorage != null) { + const dataURL = localStorage.getItem('graffitiCanvas'); + + if(dataURL != null) { + let tmpImage = new Image(); + tmpImage.src = dataURL; + tmpImage.onload = () => { + drawContext.drawImage(tmpImage, 0, 0); + }; + } + } + let map = new THREE.CanvasTexture(drawingCanvas); material = new THREE.MeshBasicMaterial({ @@ -190,6 +212,7 @@ const setup = (ctx, hall) => { ctx.raycontrol.addState("graffiti", { colliderMesh: wall, + controller: 'secondary', lineStyleOnIntersection: "basic", onHover: (intersection, active, controller) => { if (active) { @@ -262,4 +285,10 @@ const setup = (ctx, hall) => { const execute = (ctx, delta, time) => {} -export { setup, enter, execute }; +const exit = (ctx) => { + if(window.localStorage != null) { + window.localStorage.setItem('graffitiCanvas', drawingCanvas.toDataURL()); + } +} + +export { setup, enter, execute, exit }; diff --git a/src/stations/NewsTicker.js b/src/stations/NewsTicker.js index 86eb304..8b2d75e 100644 --- a/src/stations/NewsTicker.js +++ b/src/stations/NewsTicker.js @@ -66,16 +66,17 @@ const setup = (ctx, hall) => { .then((res) => res.json()) .then((res) => { newsTicker.news = res; - nextNews(); + nextNews(ctx); }); } -const nextNews = () => { +const nextNews = (ctx) => { const n = newsTicker; n.authorText.getMutableComponent(Text).text = n.news[n.current].author; n.messageText.getMutableComponent(Text).text = n.news[n.current].message; n.current = (n.current + 1) % n.news.length; - setTimeout(nextNews, 3000); + ctx.currentNews = n.news[n.current]; + setTimeout(() => { nextNews(ctx) }, 15000); } const execute = (ctx, delta, time) => { @@ -83,4 +84,4 @@ const execute = (ctx, delta, time) => { screenMaterial.color.setRGB(v, v, v); } -export { setup, execute }; \ No newline at end of file +export { setup, execute, getCurrentNews }; \ No newline at end of file diff --git a/src/stations/PanoBalls.js b/src/stations/PanoBalls.js index 834131b..ea2dc53 100644 --- a/src/stations/PanoBalls.js +++ b/src/stations/PanoBalls.js @@ -32,6 +32,7 @@ const setup = (ctx, hall) => { side: THREE.BackSide, }) ); + ball.name = `panoballmesh${i + 1}`; ball.rotation.set(Math.PI, 0, 0); ball.position.copy(hall.getObjectByName(`panoball${i + 1}`).position); ball.userData.floatY = ball.position.y; diff --git a/src/stations/Xylophone.js b/src/stations/Xylophone.js index 56abb26..cd777e8 100644 --- a/src/stations/Xylophone.js +++ b/src/stations/Xylophone.js @@ -166,43 +166,50 @@ const onSelectStart = (evt) => { for (let i = 0; i < 2; i++) { bbox.setFromObject(xyloSticks[i]); if (controller.boundingBox.intersectsBox(bbox)){ - - setStickColor(i, 0xaaaaaa); - - _ctx.raycontrol.disable(); - - // stick grabbed from the other hand - if (xyloSticks[i].userData.grabbedBy) { - xyloSticks[i].userData.grabbedBy.userData.grabbing = null; - } - xyloSticks[i].position.set(0, 0, 0); - xyloSticks[i].rotation.set(0, 0, 0); - controller.add(xyloSticks[i]); - xyloSticks[i].userData.animation = 0; - controller.userData.grabbing = xyloSticks[i]; - xyloSticks[i].userData.grabbedBy = controller; + activateStick(_ctx, i, controller); return false; } } return true; } +const activateStick = (ctx, i, controller) => { + setStickColor(i, 0xaaaaaa); + + ctx.raycontrol.disable(); + + // stick grabbed from the other hand + if (xyloSticks[i].userData.grabbedBy) { + xyloSticks[i].userData.grabbedBy.userData.grabbing = null; + } + xyloSticks[i].position.set(0, 0, 0); + xyloSticks[i].rotation.set(0, 0, 0); + controller.add(xyloSticks[i]); + xyloSticks[i].userData.animation = 0; + controller.userData.grabbing = xyloSticks[i]; + xyloSticks[i].userData.grabbedBy = controller; +} + +const deactivateStick = (controller) => { + let stick = controller.userData.grabbing; + stick.getWorldPosition(auxVec); + hallRef.add(stick); + stick.position.copy(auxVec); + stick.rotation.copy(stick.userData.resetRotation); + stick.userData.grabbedBy = null; + stick.userData.animation = 1; + controller.userData.grabbing = null; +} + const onSelectEnd = (evt) => { _ctx.raycontrol.enable(); let controller = evt.target; if (controller.userData.grabbing !== null) { - let stick = controller.userData.grabbing; - stick.getWorldPosition(auxVec); - hallRef.add(stick); - stick.position.copy(auxVec); - stick.rotation.copy(stick.userData.resetRotation); - stick.userData.grabbedBy = null; - stick.userData.animation = 1; - controller.userData.grabbing = null; + deactivateStick(controller); return false; } return true; } -export { setup, enter, exit, execute, onSelectStart, onSelectEnd }; \ No newline at end of file +export { setup, enter, exit, execute, onSelectStart, onSelectEnd, activateStick, deactivateStick }; \ No newline at end of file diff --git a/static/profiles/generic-button/left.glb b/static/profiles/generic-button/left.glb new file mode 100644 index 0000000..9750866 Binary files /dev/null and b/static/profiles/generic-button/left.glb differ diff --git a/static/profiles/generic-button/none.glb b/static/profiles/generic-button/none.glb new file mode 100644 index 0000000..8f6455d Binary files /dev/null and b/static/profiles/generic-button/none.glb differ diff --git a/static/profiles/generic-button/profile.json b/static/profiles/generic-button/profile.json new file mode 100644 index 0000000..f2ec159 --- /dev/null +++ b/static/profiles/generic-button/profile.json @@ -0,0 +1,93 @@ +{ + "profileId": "generic-button", + "fallbackProfileIds": [], + "layouts": { + "left": { + "selectComponentId": "face-button", + "components": { + "face-button": { + "type": "button", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "face_button", + "visualResponses": { + "face_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "face_button_pressed_value", + "minNodeName": "face_button_pressed_min", + "maxNodeName": "face_button_pressed_max" + } + } + } + }, + "gamepadMapping": "", + "rootNodeName": "generic-button-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "face-button", + "components": { + "face-button": { + "type": "button", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "face_button", + "visualResponses": { + "face_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "face_button_pressed_value", + "minNodeName": "face_button_pressed_min", + "maxNodeName": "face_button_pressed_max" + } + } + } + }, + "gamepadMapping": "", + "rootNodeName": "generic-button-right", + "assetPath": "right.glb" + }, + "none": { + "selectComponentId": "face-button", + "components": { + "face-button": { + "type": "button", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "face_button", + "visualResponses": { + "face_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "face_button_pressed_value", + "minNodeName": "face_button_pressed_min", + "maxNodeName": "face_button_pressed_max" + } + } + } + }, + "gamepadMapping": "", + "rootNodeName": "generic-button-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/generic-button/right.glb b/static/profiles/generic-button/right.glb new file mode 100644 index 0000000..0912539 Binary files /dev/null and b/static/profiles/generic-button/right.glb differ diff --git a/static/profiles/generic-hand/left.glb b/static/profiles/generic-hand/left.glb new file mode 100644 index 0000000..375a326 Binary files /dev/null and b/static/profiles/generic-hand/left.glb differ diff --git a/static/profiles/generic-hand/profile.json b/static/profiles/generic-hand/profile.json new file mode 100644 index 0000000..2a96747 --- /dev/null +++ b/static/profiles/generic-hand/profile.json @@ -0,0 +1,66 @@ +{ + "profileId": "generic-hand", + "fallbackProfileIds": [ + "generic-hand-select" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-hand-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-hand-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/generic-hand/right.glb b/static/profiles/generic-hand/right.glb new file mode 100644 index 0000000..08b7ebb Binary files /dev/null and b/static/profiles/generic-hand/right.glb differ diff --git a/static/profiles/generic-touchpad/left.glb b/static/profiles/generic-touchpad/left.glb new file mode 100644 index 0000000..900b280 Binary files /dev/null and b/static/profiles/generic-touchpad/left.glb differ diff --git a/static/profiles/generic-touchpad/none.glb b/static/profiles/generic-touchpad/none.glb new file mode 100644 index 0000000..61ce08c Binary files /dev/null and b/static/profiles/generic-touchpad/none.glb differ diff --git a/static/profiles/generic-touchpad/profile.json b/static/profiles/generic-touchpad/profile.json new file mode 100644 index 0000000..93612a3 --- /dev/null +++ b/static/profiles/generic-touchpad/profile.json @@ -0,0 +1,273 @@ +{ + "profileId": "generic-touchpad", + "fallbackProfileIds": [], + "layouts": { + "left": { + "selectComponentId": "touchpad", + "components": { + "touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "touchpad", + "visualResponses": { + "touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_pressed_value", + "minNodeName": "touchpad_pressed_min", + "maxNodeName": "touchpad_pressed_max" + }, + "touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_xaxis_pressed_value", + "minNodeName": "touchpad_xaxis_pressed_min", + "maxNodeName": "touchpad_xaxis_pressed_max" + }, + "touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_yaxis_pressed_value", + "minNodeName": "touchpad_yaxis_pressed_min", + "maxNodeName": "touchpad_yaxis_pressed_max" + }, + "touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_xaxis_touched_value", + "minNodeName": "touchpad_xaxis_touched_min", + "maxNodeName": "touchpad_xaxis_touched_max" + }, + "touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_yaxis_touched_value", + "minNodeName": "touchpad_yaxis_touched_min", + "maxNodeName": "touchpad_yaxis_touched_max" + }, + "touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "touchpad_axes_touched_value" + } + }, + "gamepadMapping": "", + "rootNodeName": "generic-touchpad-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "touchpad", + "components": { + "touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "touchpad", + "visualResponses": { + "touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_pressed_value", + "minNodeName": "touchpad_pressed_min", + "maxNodeName": "touchpad_pressed_max" + }, + "touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_xaxis_pressed_value", + "minNodeName": "touchpad_xaxis_pressed_min", + "maxNodeName": "touchpad_xaxis_pressed_max" + }, + "touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_yaxis_pressed_value", + "minNodeName": "touchpad_yaxis_pressed_min", + "maxNodeName": "touchpad_yaxis_pressed_max" + }, + "touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_xaxis_touched_value", + "minNodeName": "touchpad_xaxis_touched_min", + "maxNodeName": "touchpad_xaxis_touched_max" + }, + "touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_yaxis_touched_value", + "minNodeName": "touchpad_yaxis_touched_min", + "maxNodeName": "touchpad_yaxis_touched_max" + }, + "touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "touchpad_axes_touched_value" + } + }, + "gamepadMapping": "", + "rootNodeName": "generic-touchpad-right", + "assetPath": "right.glb" + }, + "none": { + "selectComponentId": "touchpad", + "components": { + "touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "touchpad", + "visualResponses": { + "touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_pressed_value", + "minNodeName": "touchpad_pressed_min", + "maxNodeName": "touchpad_pressed_max" + }, + "touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_xaxis_pressed_value", + "minNodeName": "touchpad_xaxis_pressed_min", + "maxNodeName": "touchpad_xaxis_pressed_max" + }, + "touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_yaxis_pressed_value", + "minNodeName": "touchpad_yaxis_pressed_min", + "maxNodeName": "touchpad_yaxis_pressed_max" + }, + "touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_xaxis_touched_value", + "minNodeName": "touchpad_xaxis_touched_min", + "maxNodeName": "touchpad_xaxis_touched_max" + }, + "touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_yaxis_touched_value", + "minNodeName": "touchpad_yaxis_touched_min", + "maxNodeName": "touchpad_yaxis_touched_max" + }, + "touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "touchpad_axes_touched_value" + } + }, + "gamepadMapping": "", + "rootNodeName": "generic-touchpad-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/generic-touchpad/right.glb b/static/profiles/generic-touchpad/right.glb new file mode 100644 index 0000000..c1d9f52 Binary files /dev/null and b/static/profiles/generic-touchpad/right.glb differ diff --git a/static/profiles/generic-trigger-squeeze-thumbstick/left.glb b/static/profiles/generic-trigger-squeeze-thumbstick/left.glb new file mode 100644 index 0000000..16abb11 Binary files /dev/null and b/static/profiles/generic-trigger-squeeze-thumbstick/left.glb differ diff --git a/static/profiles/generic-trigger-squeeze-thumbstick/none.glb b/static/profiles/generic-trigger-squeeze-thumbstick/none.glb new file mode 100644 index 0000000..9109333 Binary files /dev/null and b/static/profiles/generic-trigger-squeeze-thumbstick/none.glb differ diff --git a/static/profiles/generic-trigger-squeeze-thumbstick/profile.json b/static/profiles/generic-trigger-squeeze-thumbstick/profile.json new file mode 100644 index 0000000..5734af6 --- /dev/null +++ b/static/profiles/generic-trigger-squeeze-thumbstick/profile.json @@ -0,0 +1,309 @@ +{ + "profileId": "generic-trigger-squeeze-thumbstick", + "fallbackProfileIds": [], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-squeeze-thumbstick-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-squeeze-thumbstick-right", + "assetPath": "right.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + }, + "xr_standard_squeeze_pressed_mirror": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_mirror_value", + "minNodeName": "xr_standard_squeeze_pressed_mirror_min", + "maxNodeName": "xr_standard_squeeze_pressed_mirror_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-squeeze-thumbstick-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/generic-trigger-squeeze-thumbstick/right.glb b/static/profiles/generic-trigger-squeeze-thumbstick/right.glb new file mode 100644 index 0000000..1787077 Binary files /dev/null and b/static/profiles/generic-trigger-squeeze-thumbstick/right.glb differ diff --git a/static/profiles/generic-trigger-squeeze-touchpad-thumbstick/left.glb b/static/profiles/generic-trigger-squeeze-touchpad-thumbstick/left.glb new file mode 100644 index 0000000..272712a Binary files /dev/null and b/static/profiles/generic-trigger-squeeze-touchpad-thumbstick/left.glb differ diff --git a/static/profiles/generic-trigger-squeeze-touchpad-thumbstick/none.glb b/static/profiles/generic-trigger-squeeze-touchpad-thumbstick/none.glb new file mode 100644 index 0000000..dcea814 Binary files /dev/null and b/static/profiles/generic-trigger-squeeze-touchpad-thumbstick/none.glb differ diff --git a/static/profiles/generic-trigger-squeeze-touchpad-thumbstick/profile.json b/static/profiles/generic-trigger-squeeze-touchpad-thumbstick/profile.json new file mode 100644 index 0000000..f641587 --- /dev/null +++ b/static/profiles/generic-trigger-squeeze-touchpad-thumbstick/profile.json @@ -0,0 +1,552 @@ +{ + "profileId": "generic-trigger-squeeze-touchpad-thumbstick", + "fallbackProfileIds": [], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-squeeze-touchpad-thumbstick-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-squeeze-touchpad-thumbstick-right", + "assetPath": "right.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + }, + "xr_standard_squeeze_pressed_mirror": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_mirror_value", + "minNodeName": "xr_standard_squeeze_pressed_mirror_min", + "maxNodeName": "xr_standard_squeeze_pressed_mirror_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-squeeze-touchpad-thumbstick-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/generic-trigger-squeeze-touchpad-thumbstick/right.glb b/static/profiles/generic-trigger-squeeze-touchpad-thumbstick/right.glb new file mode 100644 index 0000000..498c140 Binary files /dev/null and b/static/profiles/generic-trigger-squeeze-touchpad-thumbstick/right.glb differ diff --git a/static/profiles/generic-trigger-squeeze-touchpad/left.glb b/static/profiles/generic-trigger-squeeze-touchpad/left.glb new file mode 100644 index 0000000..2a23819 Binary files /dev/null and b/static/profiles/generic-trigger-squeeze-touchpad/left.glb differ diff --git a/static/profiles/generic-trigger-squeeze-touchpad/none.glb b/static/profiles/generic-trigger-squeeze-touchpad/none.glb new file mode 100644 index 0000000..22be86b Binary files /dev/null and b/static/profiles/generic-trigger-squeeze-touchpad/none.glb differ diff --git a/static/profiles/generic-trigger-squeeze-touchpad/profile.json b/static/profiles/generic-trigger-squeeze-touchpad/profile.json new file mode 100644 index 0000000..457c513 --- /dev/null +++ b/static/profiles/generic-trigger-squeeze-touchpad/profile.json @@ -0,0 +1,411 @@ +{ + "profileId": "generic-trigger-squeeze-touchpad", + "fallbackProfileIds": [], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-squeeze-touchpad-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-squeeze-touchpad-right", + "assetPath": "right.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + }, + "xr_standard_squeeze_pressed_mirror": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_mirror_value", + "minNodeName": "xr_standard_squeeze_pressed_mirror_min", + "maxNodeName": "xr_standard_squeeze_pressed_mirror_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-squeeze-touchpad-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/generic-trigger-squeeze-touchpad/right.glb b/static/profiles/generic-trigger-squeeze-touchpad/right.glb new file mode 100644 index 0000000..294a1fe Binary files /dev/null and b/static/profiles/generic-trigger-squeeze-touchpad/right.glb differ diff --git a/static/profiles/generic-trigger-squeeze/left.glb b/static/profiles/generic-trigger-squeeze/left.glb new file mode 100644 index 0000000..fddef8e Binary files /dev/null and b/static/profiles/generic-trigger-squeeze/left.glb differ diff --git a/static/profiles/generic-trigger-squeeze/none.glb b/static/profiles/generic-trigger-squeeze/none.glb new file mode 100644 index 0000000..14e66af Binary files /dev/null and b/static/profiles/generic-trigger-squeeze/none.glb differ diff --git a/static/profiles/generic-trigger-squeeze/profile.json b/static/profiles/generic-trigger-squeeze/profile.json new file mode 100644 index 0000000..60d8811 --- /dev/null +++ b/static/profiles/generic-trigger-squeeze/profile.json @@ -0,0 +1,168 @@ +{ + "profileId": "generic-trigger-squeeze", + "fallbackProfileIds": [], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-squeeze-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-squeeze-right", + "assetPath": "right.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + }, + "xr_standard_squeeze_pressed_mirror": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_mirror_value", + "minNodeName": "xr_standard_squeeze_pressed_mirror_min", + "maxNodeName": "xr_standard_squeeze_pressed_mirror_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-squeeze-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/generic-trigger-squeeze/right.glb b/static/profiles/generic-trigger-squeeze/right.glb new file mode 100644 index 0000000..d62051d Binary files /dev/null and b/static/profiles/generic-trigger-squeeze/right.glb differ diff --git a/static/profiles/generic-trigger-thumbstick/left.glb b/static/profiles/generic-trigger-thumbstick/left.glb new file mode 100644 index 0000000..2a9ed8e Binary files /dev/null and b/static/profiles/generic-trigger-thumbstick/left.glb differ diff --git a/static/profiles/generic-trigger-thumbstick/none.glb b/static/profiles/generic-trigger-thumbstick/none.glb new file mode 100644 index 0000000..ba516ec Binary files /dev/null and b/static/profiles/generic-trigger-thumbstick/none.glb differ diff --git a/static/profiles/generic-trigger-thumbstick/profile.json b/static/profiles/generic-trigger-thumbstick/profile.json new file mode 100644 index 0000000..ccd0b82 --- /dev/null +++ b/static/profiles/generic-trigger-thumbstick/profile.json @@ -0,0 +1,234 @@ +{ + "profileId": "generic-trigger-thumbstick", + "fallbackProfileIds": [], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-thumbstick-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-thumbstick-right", + "assetPath": "right.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-thumbstick-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/generic-trigger-thumbstick/right.glb b/static/profiles/generic-trigger-thumbstick/right.glb new file mode 100644 index 0000000..af53a5f Binary files /dev/null and b/static/profiles/generic-trigger-thumbstick/right.glb differ diff --git a/static/profiles/generic-trigger-touchpad-thumbstick/left.glb b/static/profiles/generic-trigger-touchpad-thumbstick/left.glb new file mode 100644 index 0000000..5593f19 Binary files /dev/null and b/static/profiles/generic-trigger-touchpad-thumbstick/left.glb differ diff --git a/static/profiles/generic-trigger-touchpad-thumbstick/none.glb b/static/profiles/generic-trigger-touchpad-thumbstick/none.glb new file mode 100644 index 0000000..20034f1 Binary files /dev/null and b/static/profiles/generic-trigger-touchpad-thumbstick/none.glb differ diff --git a/static/profiles/generic-trigger-touchpad-thumbstick/profile.json b/static/profiles/generic-trigger-touchpad-thumbstick/profile.json new file mode 100644 index 0000000..07d4445 --- /dev/null +++ b/static/profiles/generic-trigger-touchpad-thumbstick/profile.json @@ -0,0 +1,477 @@ +{ + "profileId": "generic-trigger-touchpad-thumbstick", + "fallbackProfileIds": [], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-touchpad-thumbstick-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-touchpad-thumbstick-right", + "assetPath": "right.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-touchpad-thumbstick-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/generic-trigger-touchpad-thumbstick/right.glb b/static/profiles/generic-trigger-touchpad-thumbstick/right.glb new file mode 100644 index 0000000..861d0b6 Binary files /dev/null and b/static/profiles/generic-trigger-touchpad-thumbstick/right.glb differ diff --git a/static/profiles/generic-trigger-touchpad/left.glb b/static/profiles/generic-trigger-touchpad/left.glb new file mode 100644 index 0000000..bab2e05 Binary files /dev/null and b/static/profiles/generic-trigger-touchpad/left.glb differ diff --git a/static/profiles/generic-trigger-touchpad/none.glb b/static/profiles/generic-trigger-touchpad/none.glb new file mode 100644 index 0000000..7c2e846 Binary files /dev/null and b/static/profiles/generic-trigger-touchpad/none.glb differ diff --git a/static/profiles/generic-trigger-touchpad/profile.json b/static/profiles/generic-trigger-touchpad/profile.json new file mode 100644 index 0000000..6027fd0 --- /dev/null +++ b/static/profiles/generic-trigger-touchpad/profile.json @@ -0,0 +1,336 @@ +{ + "profileId": "generic-trigger-touchpad", + "fallbackProfileIds": [], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-touchpad-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-touchpad-right", + "assetPath": "right.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-touchpad-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/generic-trigger-touchpad/right.glb b/static/profiles/generic-trigger-touchpad/right.glb new file mode 100644 index 0000000..1d64d5b Binary files /dev/null and b/static/profiles/generic-trigger-touchpad/right.glb differ diff --git a/static/profiles/generic-trigger/left.glb b/static/profiles/generic-trigger/left.glb new file mode 100644 index 0000000..5b44a88 Binary files /dev/null and b/static/profiles/generic-trigger/left.glb differ diff --git a/static/profiles/generic-trigger/none.glb b/static/profiles/generic-trigger/none.glb new file mode 100644 index 0000000..2cd6115 Binary files /dev/null and b/static/profiles/generic-trigger/none.glb differ diff --git a/static/profiles/generic-trigger/profile.json b/static/profiles/generic-trigger/profile.json new file mode 100644 index 0000000..5c16844 --- /dev/null +++ b/static/profiles/generic-trigger/profile.json @@ -0,0 +1,93 @@ +{ + "profileId": "generic-trigger", + "fallbackProfileIds": [], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-right", + "assetPath": "right.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "generic-trigger-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/generic-trigger/right.glb b/static/profiles/generic-trigger/right.glb new file mode 100644 index 0000000..b4c7089 Binary files /dev/null and b/static/profiles/generic-trigger/right.glb differ diff --git a/static/profiles/google-daydream/none.glb b/static/profiles/google-daydream/none.glb new file mode 100644 index 0000000..c7cb07b Binary files /dev/null and b/static/profiles/google-daydream/none.glb differ diff --git a/static/profiles/google-daydream/profile.json b/static/profiles/google-daydream/profile.json new file mode 100644 index 0000000..3d5649f --- /dev/null +++ b/static/profiles/google-daydream/profile.json @@ -0,0 +1,275 @@ +{ + "profileId": "google-daydream", + "fallbackProfileIds": [ + "generic-touchpad" + ], + "layouts": { + "left": { + "selectComponentId": "touchpad", + "components": { + "touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 0, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "touchpad", + "visualResponses": { + "touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_pressed_value", + "minNodeName": "touchpad_pressed_min", + "maxNodeName": "touchpad_pressed_max" + }, + "touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_xaxis_pressed_value", + "minNodeName": "touchpad_xaxis_pressed_min", + "maxNodeName": "touchpad_xaxis_pressed_max" + }, + "touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_yaxis_pressed_value", + "minNodeName": "touchpad_yaxis_pressed_min", + "maxNodeName": "touchpad_yaxis_pressed_max" + }, + "touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_xaxis_touched_value", + "minNodeName": "touchpad_xaxis_touched_min", + "maxNodeName": "touchpad_xaxis_touched_max" + }, + "touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_yaxis_touched_value", + "minNodeName": "touchpad_yaxis_touched_min", + "maxNodeName": "touchpad_yaxis_touched_max" + }, + "touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "touchpad_axes_touched_value" + } + }, + "gamepadMapping": "", + "rootNodeName": "google_daydream_none", + "assetPath": "none.glb" + }, + "right": { + "selectComponentId": "touchpad", + "components": { + "touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 0, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "touchpad", + "visualResponses": { + "touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_pressed_value", + "minNodeName": "touchpad_pressed_min", + "maxNodeName": "touchpad_pressed_max" + }, + "touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_xaxis_pressed_value", + "minNodeName": "touchpad_xaxis_pressed_min", + "maxNodeName": "touchpad_xaxis_pressed_max" + }, + "touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_yaxis_pressed_value", + "minNodeName": "touchpad_yaxis_pressed_min", + "maxNodeName": "touchpad_yaxis_pressed_max" + }, + "touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_xaxis_touched_value", + "minNodeName": "touchpad_xaxis_touched_min", + "maxNodeName": "touchpad_xaxis_touched_max" + }, + "touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_yaxis_touched_value", + "minNodeName": "touchpad_yaxis_touched_min", + "maxNodeName": "touchpad_yaxis_touched_max" + }, + "touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "touchpad_axes_touched_value" + } + }, + "gamepadMapping": "", + "rootNodeName": "google_daydream_none", + "assetPath": "none.glb" + }, + "none": { + "selectComponentId": "touchpad", + "components": { + "touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 0, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "touchpad", + "visualResponses": { + "touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_pressed_value", + "minNodeName": "touchpad_pressed_min", + "maxNodeName": "touchpad_pressed_max" + }, + "touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_xaxis_pressed_value", + "minNodeName": "touchpad_xaxis_pressed_min", + "maxNodeName": "touchpad_xaxis_pressed_max" + }, + "touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_yaxis_pressed_value", + "minNodeName": "touchpad_yaxis_pressed_min", + "maxNodeName": "touchpad_yaxis_pressed_max" + }, + "touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_xaxis_touched_value", + "minNodeName": "touchpad_xaxis_touched_min", + "maxNodeName": "touchpad_xaxis_touched_max" + }, + "touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "touchpad_yaxis_touched_value", + "minNodeName": "touchpad_yaxis_touched_min", + "maxNodeName": "touchpad_yaxis_touched_max" + }, + "touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "touchpad_axes_touched_value" + } + }, + "gamepadMapping": "", + "rootNodeName": "google-daydream-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/hp-mixed-reality/left.glb b/static/profiles/hp-mixed-reality/left.glb new file mode 100644 index 0000000..fd62ee2 Binary files /dev/null and b/static/profiles/hp-mixed-reality/left.glb differ diff --git a/static/profiles/hp-mixed-reality/profile.json b/static/profiles/hp-mixed-reality/profile.json new file mode 100644 index 0000000..3636f3f --- /dev/null +++ b/static/profiles/hp-mixed-reality/profile.json @@ -0,0 +1,287 @@ +{ + "profileId": "hp-mixed-reality", + "fallbackProfileIds": [ + "oculus-touch", + "generic-trigger-squeeze-thumbstick" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "x-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "x_button", + "visualResponses": { + "x_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "x_button_pressed_value", + "minNodeName": "x_button_pressed_min", + "maxNodeName": "x_button_pressed_max" + } + } + }, + "y-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "y_button", + "visualResponses": { + "y_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "y_button_pressed_value", + "minNodeName": "y_button_pressed_min", + "maxNodeName": "y_button_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "hp-mixed-reality-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "a-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "a_button", + "visualResponses": { + "a_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "a_button_pressed_value", + "minNodeName": "a_button_pressed_min", + "maxNodeName": "a_button_pressed_max" + } + } + }, + "b-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "b_button", + "visualResponses": { + "b_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "b_button_pressed_value", + "minNodeName": "b_button_pressed_min", + "maxNodeName": "b_button_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "hp-mixed-reality-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/hp-mixed-reality/right.glb b/static/profiles/hp-mixed-reality/right.glb new file mode 100644 index 0000000..af8d1be Binary files /dev/null and b/static/profiles/hp-mixed-reality/right.glb differ diff --git a/static/profiles/htc-vive-cosmos/left.glb b/static/profiles/htc-vive-cosmos/left.glb new file mode 100644 index 0000000..5ac9065 Binary files /dev/null and b/static/profiles/htc-vive-cosmos/left.glb differ diff --git a/static/profiles/htc-vive-cosmos/profile.json b/static/profiles/htc-vive-cosmos/profile.json new file mode 100644 index 0000000..c5777df --- /dev/null +++ b/static/profiles/htc-vive-cosmos/profile.json @@ -0,0 +1,328 @@ +{ + "profileId": "htc-vive-cosmos", + "fallbackProfileIds": [ + "generic-trigger-squeeze-thumbstick" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "x-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "x_button", + "visualResponses": { + "x_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "x_button_pressed_value", + "minNodeName": "x_button_pressed_min", + "maxNodeName": "x_button_pressed_max" + } + } + }, + "y-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "y_button", + "visualResponses": { + "y_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "y_button_pressed_value", + "minNodeName": "y_button_pressed_min", + "maxNodeName": "y_button_pressed_max" + } + } + }, + "bumper": { + "type": "button", + "gamepadIndices": { + "button": 6 + }, + "rootNodeName": "bumper", + "visualResponses": { + "bumper_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "bumper_pressed_value", + "minNodeName": "bumper_pressed_min", + "maxNodeName": "bumper_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc-vive-cosmos-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "a-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "a_button", + "visualResponses": { + "a_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "a_button_pressed_value", + "minNodeName": "a_button_pressed_min", + "maxNodeName": "a_button_pressed_max" + } + } + }, + "b-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "b_button", + "visualResponses": { + "b_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "b_button_pressed_value", + "minNodeName": "b_button_pressed_min", + "maxNodeName": "b_button_pressed_max" + } + } + }, + "bumper": { + "type": "button", + "gamepadIndices": { + "button": 6 + }, + "rootNodeName": "bumper", + "visualResponses": { + "bumper_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "bumper_pressed_value", + "minNodeName": "bumper_pressed_min", + "maxNodeName": "bumper_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc-vive-cosmos-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/htc-vive-cosmos/right.glb b/static/profiles/htc-vive-cosmos/right.glb new file mode 100644 index 0000000..d6a34e8 Binary files /dev/null and b/static/profiles/htc-vive-cosmos/right.glb differ diff --git a/static/profiles/htc-vive-focus-3/left.glb b/static/profiles/htc-vive-focus-3/left.glb new file mode 100644 index 0000000..5b394fb Binary files /dev/null and b/static/profiles/htc-vive-focus-3/left.glb differ diff --git a/static/profiles/htc-vive-focus-3/profile.json b/static/profiles/htc-vive-focus-3/profile.json new file mode 100644 index 0000000..1fe79b3 --- /dev/null +++ b/static/profiles/htc-vive-focus-3/profile.json @@ -0,0 +1,286 @@ +{ + "profileId": "htc-vive-focus-3", + "fallbackProfileIds": [ + "generic-trigger-squeeze-thumbstick" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "x-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "x_button", + "visualResponses": { + "x_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "x_button_pressed_value", + "minNodeName": "x_button_pressed_min", + "maxNodeName": "x_button_pressed_max" + } + } + }, + "y-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "y_button", + "visualResponses": { + "y_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "y_button_pressed_value", + "minNodeName": "y_button_pressed_min", + "maxNodeName": "y_button_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc-vive-focus-3-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "a-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "a_button", + "visualResponses": { + "a_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "a_button_pressed_value", + "minNodeName": "a_button_pressed_min", + "maxNodeName": "a_button_pressed_max" + } + } + }, + "b-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "b_button", + "visualResponses": { + "b_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "b_button_pressed_value", + "minNodeName": "b_button_pressed_min", + "maxNodeName": "b_button_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc-vive-focus-3-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/htc-vive-focus-3/right.glb b/static/profiles/htc-vive-focus-3/right.glb new file mode 100644 index 0000000..1efd1d2 Binary files /dev/null and b/static/profiles/htc-vive-focus-3/right.glb differ diff --git a/static/profiles/htc-vive-focus-plus/none.glb b/static/profiles/htc-vive-focus-plus/none.glb new file mode 100644 index 0000000..ede1a32 Binary files /dev/null and b/static/profiles/htc-vive-focus-plus/none.glb differ diff --git a/static/profiles/htc-vive-focus-plus/profile.json b/static/profiles/htc-vive-focus-plus/profile.json new file mode 100644 index 0000000..8af8f08 --- /dev/null +++ b/static/profiles/htc-vive-focus-plus/profile.json @@ -0,0 +1,413 @@ +{ + "profileId": "htc-vive-focus-plus", + "fallbackProfileIds": [ + "generic-trigger-squeeze-touchpad" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc_vive_focus_plus_none", + "assetPath": "none.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc_vive_focus_plus_none", + "assetPath": "none.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + }, + "xr_standard_squeeze_pressed_mirror": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_mirror_value", + "minNodeName": "xr_standard_squeeze_pressed_mirror_min", + "maxNodeName": "xr_standard_squeeze_pressed_mirror_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc-vive-focus-plus-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/htc-vive-focus/none.glb b/static/profiles/htc-vive-focus/none.glb new file mode 100644 index 0000000..f966539 Binary files /dev/null and b/static/profiles/htc-vive-focus/none.glb differ diff --git a/static/profiles/htc-vive-focus/profile.json b/static/profiles/htc-vive-focus/profile.json new file mode 100644 index 0000000..7f3d95e --- /dev/null +++ b/static/profiles/htc-vive-focus/profile.json @@ -0,0 +1,401 @@ +{ + "profileId": "htc-vive-focus", + "fallbackProfileIds": [ + "generic-trigger-touchpad" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "menu": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "menu", + "visualResponses": { + "menu_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "menu_pressed_value", + "minNodeName": "menu_pressed_min", + "maxNodeName": "menu_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc_vive_focus_none", + "assetPath": "none.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "menu": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "menu", + "visualResponses": { + "menu_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "menu_pressed_value", + "minNodeName": "menu_pressed_min", + "maxNodeName": "menu_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc_vive_focus_none", + "assetPath": "none.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "menu": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "menu", + "visualResponses": { + "menu_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "menu_pressed_value", + "minNodeName": "menu_pressed_min", + "maxNodeName": "menu_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc-vive-focus-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/htc-vive/none.glb b/static/profiles/htc-vive/none.glb new file mode 100644 index 0000000..2d73315 Binary files /dev/null and b/static/profiles/htc-vive/none.glb differ diff --git a/static/profiles/htc-vive/profile.json b/static/profiles/htc-vive/profile.json new file mode 100644 index 0000000..77dce66 --- /dev/null +++ b/static/profiles/htc-vive/profile.json @@ -0,0 +1,413 @@ +{ + "profileId": "htc-vive", + "fallbackProfileIds": [ + "generic-trigger-squeeze-touchpad" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc_vive_none", + "assetPath": "none.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc_vive_none", + "assetPath": "none.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + }, + "xr_standard_squeeze_pressed_mirror": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_mirror_value", + "minNodeName": "xr_standard_squeeze_pressed_mirror_min", + "maxNodeName": "xr_standard_squeeze_pressed_mirror_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "htc-vive-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/magicleap-one/none.glb b/static/profiles/magicleap-one/none.glb new file mode 100644 index 0000000..8ded9e8 Binary files /dev/null and b/static/profiles/magicleap-one/none.glb differ diff --git a/static/profiles/magicleap-one/profile.json b/static/profiles/magicleap-one/profile.json new file mode 100644 index 0000000..ef074d2 --- /dev/null +++ b/static/profiles/magicleap-one/profile.json @@ -0,0 +1,413 @@ +{ + "profileId": "magicleap-one", + "fallbackProfileIds": [ + "generic-trigger-squeeze-touchpad" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "magicleap_one_none", + "assetPath": "none.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "magicleap_one_none", + "assetPath": "none.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + }, + "xr_standard_squeeze_pressed_mirror": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_mirror_value", + "minNodeName": "xr_standard_squeeze_pressed_mirror_min", + "maxNodeName": "xr_standard_squeeze_pressed_mirror_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "magicleap-one-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/meta-quest-touch-pro/left.glb b/static/profiles/meta-quest-touch-pro/left.glb new file mode 100644 index 0000000..b5f7ec1 Binary files /dev/null and b/static/profiles/meta-quest-touch-pro/left.glb differ diff --git a/static/profiles/meta-quest-touch-pro/profile.json b/static/profiles/meta-quest-touch-pro/profile.json new file mode 100644 index 0000000..989fa4f --- /dev/null +++ b/static/profiles/meta-quest-touch-pro/profile.json @@ -0,0 +1,330 @@ +{ + "profileId": "meta-quest-touch-pro", + "fallbackProfileIds": [ + "oculus-touch-v2", + "oculus-touch", + "generic-trigger-squeeze-thumbstick" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "x-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "x_button", + "visualResponses": { + "x_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "x_button_pressed_value", + "minNodeName": "x_button_pressed_min", + "maxNodeName": "x_button_pressed_max" + } + } + }, + "y-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "y_button", + "visualResponses": { + "y_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "y_button_pressed_value", + "minNodeName": "y_button_pressed_min", + "maxNodeName": "y_button_pressed_max" + } + } + }, + "thumbrest": { + "type": "button", + "gamepadIndices": { + "button": 6 + }, + "rootNodeName": "thumbrest", + "visualResponses": { + "thumbrest_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "thumbrest_pressed_value", + "minNodeName": "thumbrest_pressed_min", + "maxNodeName": "thumbrest_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "meta-quest-touch-pro-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "a-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "a_button", + "visualResponses": { + "a_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "a_button_pressed_value", + "minNodeName": "a_button_pressed_min", + "maxNodeName": "a_button_pressed_max" + } + } + }, + "b-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "b_button", + "visualResponses": { + "b_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "b_button_pressed_value", + "minNodeName": "b_button_pressed_min", + "maxNodeName": "b_button_pressed_max" + } + } + }, + "thumbrest": { + "type": "button", + "gamepadIndices": { + "button": 6 + }, + "rootNodeName": "thumbrest", + "visualResponses": { + "thumbrest_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "thumbrest_pressed_value", + "minNodeName": "thumbrest_pressed_min", + "maxNodeName": "thumbrest_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "meta-quest-touch-pro-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/meta-quest-touch-pro/right.glb b/static/profiles/meta-quest-touch-pro/right.glb new file mode 100644 index 0000000..62e36ed Binary files /dev/null and b/static/profiles/meta-quest-touch-pro/right.glb differ diff --git a/static/profiles/microsoft-mixed-reality/left.glb b/static/profiles/microsoft-mixed-reality/left.glb new file mode 100644 index 0000000..b5cdad2 Binary files /dev/null and b/static/profiles/microsoft-mixed-reality/left.glb differ diff --git a/static/profiles/microsoft-mixed-reality/profile.json b/static/profiles/microsoft-mixed-reality/profile.json new file mode 100644 index 0000000..b09bd08 --- /dev/null +++ b/static/profiles/microsoft-mixed-reality/profile.json @@ -0,0 +1,364 @@ +{ + "profileId": "microsoft-mixed-reality", + "fallbackProfileIds": [ + "generic-trigger-squeeze-touchpad-thumbstick" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "microsoft-mixed-reality-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "microsoft-mixed-reality-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/microsoft-mixed-reality/right.glb b/static/profiles/microsoft-mixed-reality/right.glb new file mode 100644 index 0000000..3c42313 Binary files /dev/null and b/static/profiles/microsoft-mixed-reality/right.glb differ diff --git a/static/profiles/oculus-go/none.glb b/static/profiles/oculus-go/none.glb new file mode 100644 index 0000000..f6029fc Binary files /dev/null and b/static/profiles/oculus-go/none.glb differ diff --git a/static/profiles/oculus-go/profile.json b/static/profiles/oculus-go/profile.json new file mode 100644 index 0000000..1422d20 --- /dev/null +++ b/static/profiles/oculus-go/profile.json @@ -0,0 +1,338 @@ +{ + "profileId": "oculus-go", + "fallbackProfileIds": [ + "generic-trigger-touchpad" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "oculus_go_none", + "assetPath": "none.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "oculus_go_none", + "assetPath": "none.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "oculus-go-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/oculus-touch-v2/left.glb b/static/profiles/oculus-touch-v2/left.glb new file mode 100644 index 0000000..5a1107f Binary files /dev/null and b/static/profiles/oculus-touch-v2/left.glb differ diff --git a/static/profiles/oculus-touch-v2/profile.json b/static/profiles/oculus-touch-v2/profile.json new file mode 100644 index 0000000..c5676b2 --- /dev/null +++ b/static/profiles/oculus-touch-v2/profile.json @@ -0,0 +1,329 @@ +{ + "profileId": "oculus-touch-v2", + "fallbackProfileIds": [ + "oculus-touch", + "generic-trigger-squeeze-thumbstick" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "x-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "x_button", + "visualResponses": { + "x_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "x_button_pressed_value", + "minNodeName": "x_button_pressed_min", + "maxNodeName": "x_button_pressed_max" + } + } + }, + "y-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "y_button", + "visualResponses": { + "y_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "y_button_pressed_value", + "minNodeName": "y_button_pressed_min", + "maxNodeName": "y_button_pressed_max" + } + } + }, + "thumbrest": { + "type": "button", + "gamepadIndices": { + "button": 6 + }, + "rootNodeName": "thumbrest", + "visualResponses": { + "thumbrest_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "thumbrest_pressed_value", + "minNodeName": "thumbrest_pressed_min", + "maxNodeName": "thumbrest_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "oculus-touch-v2-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "a-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "a_button", + "visualResponses": { + "a_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "a_button_pressed_value", + "minNodeName": "a_button_pressed_min", + "maxNodeName": "a_button_pressed_max" + } + } + }, + "b-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "b_button", + "visualResponses": { + "b_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "b_button_pressed_value", + "minNodeName": "b_button_pressed_min", + "maxNodeName": "b_button_pressed_max" + } + } + }, + "thumbrest": { + "type": "button", + "gamepadIndices": { + "button": 6 + }, + "rootNodeName": "thumbrest", + "visualResponses": { + "thumbrest_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "thumbrest_pressed_value", + "minNodeName": "thumbrest_pressed_min", + "maxNodeName": "thumbrest_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "oculus-touch-v2-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/oculus-touch-v2/right.glb b/static/profiles/oculus-touch-v2/right.glb new file mode 100644 index 0000000..ca07031 Binary files /dev/null and b/static/profiles/oculus-touch-v2/right.glb differ diff --git a/static/profiles/oculus-touch-v3/left.glb b/static/profiles/oculus-touch-v3/left.glb new file mode 100644 index 0000000..e247b11 Binary files /dev/null and b/static/profiles/oculus-touch-v3/left.glb differ diff --git a/static/profiles/oculus-touch-v3/profile.json b/static/profiles/oculus-touch-v3/profile.json new file mode 100644 index 0000000..a61c32c --- /dev/null +++ b/static/profiles/oculus-touch-v3/profile.json @@ -0,0 +1,330 @@ +{ + "profileId": "oculus-touch-v3", + "fallbackProfileIds": [ + "oculus-touch-v2", + "oculus-touch", + "generic-trigger-squeeze-thumbstick" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "x-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "x_button", + "visualResponses": { + "x_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "x_button_pressed_value", + "minNodeName": "x_button_pressed_min", + "maxNodeName": "x_button_pressed_max" + } + } + }, + "y-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "y_button", + "visualResponses": { + "y_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "y_button_pressed_value", + "minNodeName": "y_button_pressed_min", + "maxNodeName": "y_button_pressed_max" + } + } + }, + "thumbrest": { + "type": "button", + "gamepadIndices": { + "button": 6 + }, + "rootNodeName": "thumbrest", + "visualResponses": { + "thumbrest_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "thumbrest_pressed_value", + "minNodeName": "thumbrest_pressed_min", + "maxNodeName": "thumbrest_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "oculus-touch-v3-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "a-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "a_button", + "visualResponses": { + "a_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "a_button_pressed_value", + "minNodeName": "a_button_pressed_min", + "maxNodeName": "a_button_pressed_max" + } + } + }, + "b-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "b_button", + "visualResponses": { + "b_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "b_button_pressed_value", + "minNodeName": "b_button_pressed_min", + "maxNodeName": "b_button_pressed_max" + } + } + }, + "thumbrest": { + "type": "button", + "gamepadIndices": { + "button": 6 + }, + "rootNodeName": "thumbrest", + "visualResponses": { + "thumbrest_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "thumbrest_pressed_value", + "minNodeName": "thumbrest_pressed_min", + "maxNodeName": "thumbrest_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "oculus-touch-v3-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/oculus-touch-v3/right.glb b/static/profiles/oculus-touch-v3/right.glb new file mode 100644 index 0000000..79ffc27 Binary files /dev/null and b/static/profiles/oculus-touch-v3/right.glb differ diff --git a/static/profiles/oculus-touch/left.glb b/static/profiles/oculus-touch/left.glb new file mode 100644 index 0000000..d519fd9 Binary files /dev/null and b/static/profiles/oculus-touch/left.glb differ diff --git a/static/profiles/oculus-touch/profile.json b/static/profiles/oculus-touch/profile.json new file mode 100644 index 0000000..6518fcc --- /dev/null +++ b/static/profiles/oculus-touch/profile.json @@ -0,0 +1,328 @@ +{ + "profileId": "oculus-touch", + "fallbackProfileIds": [ + "generic-trigger-squeeze-thumbstick" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "x-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "x_button", + "visualResponses": { + "x_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "x_button_pressed_value", + "minNodeName": "x_button_pressed_min", + "maxNodeName": "x_button_pressed_max" + } + } + }, + "y-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "y_button", + "visualResponses": { + "y_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "y_button_pressed_value", + "minNodeName": "y_button_pressed_min", + "maxNodeName": "y_button_pressed_max" + } + } + }, + "thumbrest": { + "type": "button", + "gamepadIndices": { + "button": 6 + }, + "rootNodeName": "thumbrest", + "visualResponses": { + "thumbrest_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "thumbrest_pressed_value", + "minNodeName": "thumbrest_pressed_min", + "maxNodeName": "thumbrest_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "oculus-touch-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "a-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "a_button", + "visualResponses": { + "a_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "a_button_pressed_value", + "minNodeName": "a_button_pressed_min", + "maxNodeName": "a_button_pressed_max" + } + } + }, + "b-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "b_button", + "visualResponses": { + "b_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "b_button_pressed_value", + "minNodeName": "b_button_pressed_min", + "maxNodeName": "b_button_pressed_max" + } + } + }, + "thumbrest": { + "type": "button", + "gamepadIndices": { + "button": 6 + }, + "rootNodeName": "thumbrest", + "visualResponses": { + "thumbrest_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "thumbrest_pressed_value", + "minNodeName": "thumbrest_pressed_min", + "maxNodeName": "thumbrest_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "oculus-touch-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/oculus-touch/right.glb b/static/profiles/oculus-touch/right.glb new file mode 100644 index 0000000..25cf269 Binary files /dev/null and b/static/profiles/oculus-touch/right.glb differ diff --git a/static/profiles/pico-g2/none.glb b/static/profiles/pico-g2/none.glb new file mode 100644 index 0000000..85dfbd0 Binary files /dev/null and b/static/profiles/pico-g2/none.glb differ diff --git a/static/profiles/pico-g2/profile.json b/static/profiles/pico-g2/profile.json new file mode 100644 index 0000000..bd9ef92 --- /dev/null +++ b/static/profiles/pico-g2/profile.json @@ -0,0 +1,338 @@ +{ + "profileId": "pico-g2", + "fallbackProfileIds": [ + "generic-trigger-touchpad" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "pico_g2_none", + "assetPath": "none.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "pico_g2_none", + "assetPath": "none.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "pico-g2-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/pico-neo2/left.glb b/static/profiles/pico-neo2/left.glb new file mode 100644 index 0000000..aa8b8c0 Binary files /dev/null and b/static/profiles/pico-neo2/left.glb differ diff --git a/static/profiles/pico-neo2/profile.json b/static/profiles/pico-neo2/profile.json new file mode 100644 index 0000000..2235ea2 --- /dev/null +++ b/static/profiles/pico-neo2/profile.json @@ -0,0 +1,286 @@ +{ + "profileId": "pico-neo2", + "fallbackProfileIds": [ + "generic-trigger-squeeze-thumbstick" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "x-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "x_button", + "visualResponses": { + "x_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "x_button_pressed_value", + "minNodeName": "x_button_pressed_min", + "maxNodeName": "x_button_pressed_max" + } + } + }, + "y-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "y_button", + "visualResponses": { + "y_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "y_button_pressed_value", + "minNodeName": "y_button_pressed_min", + "maxNodeName": "y_button_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "pico-neo2-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "a-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "a_button", + "visualResponses": { + "a_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "a_button_pressed_value", + "minNodeName": "a_button_pressed_min", + "maxNodeName": "a_button_pressed_max" + } + } + }, + "b-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "b_button", + "visualResponses": { + "b_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "b_button_pressed_value", + "minNodeName": "b_button_pressed_min", + "maxNodeName": "b_button_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "pico-neo2-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/pico-neo2/right.glb b/static/profiles/pico-neo2/right.glb new file mode 100644 index 0000000..228cd97 Binary files /dev/null and b/static/profiles/pico-neo2/right.glb differ diff --git a/static/profiles/pico-neo3/left.glb b/static/profiles/pico-neo3/left.glb new file mode 100644 index 0000000..af2091b Binary files /dev/null and b/static/profiles/pico-neo3/left.glb differ diff --git a/static/profiles/pico-neo3/profile.json b/static/profiles/pico-neo3/profile.json new file mode 100644 index 0000000..ec90a91 --- /dev/null +++ b/static/profiles/pico-neo3/profile.json @@ -0,0 +1,286 @@ +{ + "profileId": "pico-neo3", + "fallbackProfileIds": [ + "generic-trigger-squeeze-thumbstick" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "x-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "x_button", + "visualResponses": { + "x_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "x_button_pressed_value", + "minNodeName": "x_button_pressed_min", + "maxNodeName": "x_button_pressed_max" + } + } + }, + "y-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "y_button", + "visualResponses": { + "y_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "y_button_pressed_value", + "minNodeName": "y_button_pressed_min", + "maxNodeName": "y_button_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "pico-neo3-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "a-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "a_button", + "visualResponses": { + "a_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "a_button_pressed_value", + "minNodeName": "a_button_pressed_min", + "maxNodeName": "a_button_pressed_max" + } + } + }, + "b-button": { + "type": "button", + "gamepadIndices": { + "button": 5 + }, + "rootNodeName": "b_button", + "visualResponses": { + "b_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "b_button_pressed_value", + "minNodeName": "b_button_pressed_min", + "maxNodeName": "b_button_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "pico-neo3-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/pico-neo3/right.glb b/static/profiles/pico-neo3/right.glb new file mode 100644 index 0000000..6d5ff37 Binary files /dev/null and b/static/profiles/pico-neo3/right.glb differ diff --git a/static/profiles/profilesList.json b/static/profiles/profilesList.json new file mode 100644 index 0000000..3b44a7c --- /dev/null +++ b/static/profiles/profilesList.json @@ -0,0 +1,99 @@ +{ + "generic-button": { + "path": "generic-button/profile.json" + }, + "generic-hand": { + "path": "generic-hand/profile.json" + }, + "generic-touchpad": { + "path": "generic-touchpad/profile.json" + }, + "generic-trigger-squeeze-thumbstick": { + "path": "generic-trigger-squeeze-thumbstick/profile.json" + }, + "generic-trigger-squeeze-touchpad-thumbstick": { + "path": "generic-trigger-squeeze-touchpad-thumbstick/profile.json" + }, + "generic-trigger-squeeze-touchpad": { + "path": "generic-trigger-squeeze-touchpad/profile.json" + }, + "generic-trigger-squeeze": { + "path": "generic-trigger-squeeze/profile.json" + }, + "generic-trigger-thumbstick": { + "path": "generic-trigger-thumbstick/profile.json" + }, + "generic-trigger-touchpad-thumbstick": { + "path": "generic-trigger-touchpad-thumbstick/profile.json" + }, + "generic-trigger-touchpad": { + "path": "generic-trigger-touchpad/profile.json" + }, + "generic-trigger": { + "path": "generic-trigger/profile.json" + }, + "google-daydream": { + "path": "google-daydream/profile.json" + }, + "hp-mixed-reality": { + "path": "hp-mixed-reality/profile.json" + }, + "htc-vive-cosmos": { + "path": "htc-vive-cosmos/profile.json" + }, + "htc-vive-focus-3": { + "path": "htc-vive-focus-3/profile.json" + }, + "htc-vive-focus-plus": { + "path": "htc-vive-focus-plus/profile.json" + }, + "htc-vive-focus": { + "path": "htc-vive-focus/profile.json" + }, + "htc-vive": { + "path": "htc-vive/profile.json" + }, + "magicleap-one": { + "path": "magicleap-one/profile.json" + }, + "meta-quest-touch-pro": { + "path": "meta-quest-touch-pro/profile.json" + }, + "microsoft-mixed-reality": { + "path": "microsoft-mixed-reality/profile.json" + }, + "windows-mixed-reality": { + "path": "microsoft-mixed-reality/profile.json", + "deprecated": true + }, + "oculus-go": { + "path": "oculus-go/profile.json" + }, + "oculus-touch-v2": { + "path": "oculus-touch-v2/profile.json" + }, + "oculus-touch-v3": { + "path": "oculus-touch-v3/profile.json" + }, + "oculus-touch": { + "path": "oculus-touch/profile.json" + }, + "pico-g2": { + "path": "pico-g2/profile.json" + }, + "pico-neo2": { + "path": "pico-neo2/profile.json" + }, + "pico-neo3": { + "path": "pico-neo3/profile.json" + }, + "samsung-gearvr": { + "path": "samsung-gearvr/profile.json" + }, + "samsung-odyssey": { + "path": "samsung-odyssey/profile.json" + }, + "valve-index": { + "path": "valve-index/profile.json" + } +} diff --git a/static/profiles/samsung-gearvr/none.glb b/static/profiles/samsung-gearvr/none.glb new file mode 100644 index 0000000..eb087c5 Binary files /dev/null and b/static/profiles/samsung-gearvr/none.glb differ diff --git a/static/profiles/samsung-gearvr/profile.json b/static/profiles/samsung-gearvr/profile.json new file mode 100644 index 0000000..edc0358 --- /dev/null +++ b/static/profiles/samsung-gearvr/profile.json @@ -0,0 +1,401 @@ +{ + "profileId": "samsung-gearvr", + "fallbackProfileIds": [ + "generic-trigger-touchpad" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "menu": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "menu", + "visualResponses": { + "menu_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "menu_pressed_value", + "minNodeName": "menu_pressed_min", + "maxNodeName": "menu_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "samsung_gearvr_none", + "assetPath": "none.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "menu": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "menu", + "visualResponses": { + "menu_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "menu_pressed_value", + "minNodeName": "menu_pressed_min", + "maxNodeName": "menu_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "samsung_gearvr_none", + "assetPath": "none.glb" + }, + "none": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "menu": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "menu", + "visualResponses": { + "menu_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "menu_pressed_value", + "minNodeName": "menu_pressed_min", + "maxNodeName": "menu_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "samsung-gearvr-none", + "assetPath": "none.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/samsung-odyssey/left.glb b/static/profiles/samsung-odyssey/left.glb new file mode 100644 index 0000000..9b87fbb Binary files /dev/null and b/static/profiles/samsung-odyssey/left.glb differ diff --git a/static/profiles/samsung-odyssey/profile.json b/static/profiles/samsung-odyssey/profile.json new file mode 100644 index 0000000..4585fc4 --- /dev/null +++ b/static/profiles/samsung-odyssey/profile.json @@ -0,0 +1,365 @@ +{ + "profileId": "samsung-odyssey", + "fallbackProfileIds": [ + "microsoft-mixed-reality", + "generic-trigger-squeeze-touchpad-thumbstick" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "samsung-odyssey-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "samsung-odyssey-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/samsung-odyssey/right.glb b/static/profiles/samsung-odyssey/right.glb new file mode 100644 index 0000000..4ac21f1 Binary files /dev/null and b/static/profiles/samsung-odyssey/right.glb differ diff --git a/static/profiles/valve-index/left.glb b/static/profiles/valve-index/left.glb new file mode 100644 index 0000000..eba7857 Binary files /dev/null and b/static/profiles/valve-index/left.glb differ diff --git a/static/profiles/valve-index/profile.json b/static/profiles/valve-index/profile.json new file mode 100644 index 0000000..e30cbc3 --- /dev/null +++ b/static/profiles/valve-index/profile.json @@ -0,0 +1,406 @@ +{ + "profileId": "valve-index", + "fallbackProfileIds": [ + "generic-trigger-squeeze-touchpad-thumbstick" + ], + "layouts": { + "left": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "a-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "a_button", + "visualResponses": { + "a_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "a_button_pressed_value", + "minNodeName": "a_button_pressed_min", + "maxNodeName": "a_button_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "valve-index-left", + "assetPath": "left.glb" + }, + "right": { + "selectComponentId": "xr-standard-trigger", + "components": { + "xr-standard-trigger": { + "type": "trigger", + "gamepadIndices": { + "button": 0 + }, + "rootNodeName": "xr_standard_trigger", + "visualResponses": { + "xr_standard_trigger_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_trigger_pressed_value", + "minNodeName": "xr_standard_trigger_pressed_min", + "maxNodeName": "xr_standard_trigger_pressed_max" + } + } + }, + "xr-standard-squeeze": { + "type": "squeeze", + "gamepadIndices": { + "button": 1 + }, + "rootNodeName": "xr_standard_squeeze", + "visualResponses": { + "xr_standard_squeeze_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_squeeze_pressed_value", + "minNodeName": "xr_standard_squeeze_pressed_min", + "maxNodeName": "xr_standard_squeeze_pressed_max" + } + } + }, + "xr-standard-touchpad": { + "type": "touchpad", + "gamepadIndices": { + "button": 2, + "xAxis": 0, + "yAxis": 1 + }, + "rootNodeName": "xr_standard_touchpad", + "visualResponses": { + "xr_standard_touchpad_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_pressed_value", + "minNodeName": "xr_standard_touchpad_pressed_min", + "maxNodeName": "xr_standard_touchpad_pressed_max" + }, + "xr_standard_touchpad_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_xaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_xaxis_pressed_max" + }, + "xr_standard_touchpad_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_pressed_value", + "minNodeName": "xr_standard_touchpad_yaxis_pressed_min", + "maxNodeName": "xr_standard_touchpad_yaxis_pressed_max" + }, + "xr_standard_touchpad_xaxis_touched": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_xaxis_touched_value", + "minNodeName": "xr_standard_touchpad_xaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_xaxis_touched_max" + }, + "xr_standard_touchpad_yaxis_touched": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_touchpad_yaxis_touched_value", + "minNodeName": "xr_standard_touchpad_yaxis_touched_min", + "maxNodeName": "xr_standard_touchpad_yaxis_touched_max" + }, + "xr_standard_touchpad_axes_touched": { + "componentProperty": "state", + "states": [ + "touched", + "pressed" + ], + "valueNodeProperty": "visibility", + "valueNodeName": "xr_standard_touchpad_axes_touched_value" + } + }, + "touchPointNodeName": "xr_standard_touchpad_axes_touched_value" + }, + "xr-standard-thumbstick": { + "type": "thumbstick", + "gamepadIndices": { + "button": 3, + "xAxis": 2, + "yAxis": 3 + }, + "rootNodeName": "xr_standard_thumbstick", + "visualResponses": { + "xr_standard_thumbstick_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_pressed_value", + "minNodeName": "xr_standard_thumbstick_pressed_min", + "maxNodeName": "xr_standard_thumbstick_pressed_max" + }, + "xr_standard_thumbstick_xaxis_pressed": { + "componentProperty": "xAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_xaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max" + }, + "xr_standard_thumbstick_yaxis_pressed": { + "componentProperty": "yAxis", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value", + "minNodeName": "xr_standard_thumbstick_yaxis_pressed_min", + "maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max" + } + } + }, + "a-button": { + "type": "button", + "gamepadIndices": { + "button": 4 + }, + "rootNodeName": "a_button", + "visualResponses": { + "a_button_pressed": { + "componentProperty": "button", + "states": [ + "default", + "touched", + "pressed" + ], + "valueNodeProperty": "transform", + "valueNodeName": "a_button_pressed_value", + "minNodeName": "a_button_pressed_min", + "maxNodeName": "a_button_pressed_max" + } + } + } + }, + "gamepadMapping": "xr-standard", + "rootNodeName": "valve-index-right", + "assetPath": "right.glb" + } + } +} \ No newline at end of file diff --git a/static/profiles/valve-index/right.glb b/static/profiles/valve-index/right.glb new file mode 100644 index 0000000..3a2d4a4 Binary files /dev/null and b/static/profiles/valve-index/right.glb differ