I am creating a scene using A-frame (https://aframe.io) and I'm wondering how I can set the physics in my scene to variable using the A-frame physics component. What should happen is the physics inside my scene should be set to the value of my variabled called x. How can this be done?
Code to my scene: https://jsfiddle.net/AidanYoung/1cmgLkrp/2/ Code to the physics component: https://github.com/n5ro/aframe-physics-system
Now currently the physics in my scene is set using the <a-scene>
tag and it's current set to -10. I want to change the physics to equal the variable x. Here is the part of my code where the physics is set:
<a-scene background="color: lightblue;"
renderer="antialias: true; gammaOutput: false;"
light="defaultLightsEnabled: true;"
physics="gravity: -10;
debug: false; restitution: 10;">
Currently the gravity is set at -10. I want to set the gravity to the value of the variable x. How can this be done?