| Server IP : 162.214.74.102 / Your IP : 216.73.216.139 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/lrsys/www/lrsys_apps/marisol/AR/aframe/examples/ |
Upload File : |
<!DOCTYPE html>
<!-- include aframe -->
<script src="vendor/aframe/build/aframe.js"></script>
<!-- include aframe-ar.js -->
<script src="../build/aframe-ar.js"></script>
<script>
AFRAME.registerComponent('vidhandler', {
init: function () {
this.toggle = false;
document.querySelector("#penguin-sledding").pause(); //reference to the video
},
tick:function(){
if(document.querySelector("a-marker").object3D.visible == true){
if(!this.toggle){
this.toggle = true;
document.querySelector("#penguin-sledding").play();
document.getElementById("penguin-sledding").style.background: = 'transparent';
}
}else{
this.toggle = false;
document.querySelector("#penguin-sledding").pause();
}
}
});
</script>
<body style='margin : 0px; overflow: hidden; font-family: Monospace;'>
<!-- enable artoolkit on this scene -->
<a-scene stats embedded arjs='sourceType: webcam; detectionMode: mono; maxDetectionRate: 30; canvasWidth: 240; canvasHeight: 180'>
<!--define the object which gonna be put on this marker-->
<a-assets>
<a-asset-item id="tree-obj" src="../../data/obj/zapatillas/zapatillas.obj"></a-asset-item>
<a-asset-item id="tree-mtl" src="../../data/obj/zapatillas/zapatillas.mtl"></a-asset-item>
</a-assets>
<a-entity obj-model="obj: #tree-obj; mtl: #tree-mtl"></a-entity>
<a-marker-camera preset='hiro'></a-marker-camera>
</a-scene>
<!-- <a-scene embedded arjs='trackingMethod: best;'>
<a-anchor hit-testing-enabled='true'>
<a-entity>
<video type="video/webm" id="penguin-sledding" autoplay="true" loop="false" src="../../data/videos/004.webm" style="background: transparent;" webkit-playsinline>
</a-entity>
<a-video position="0 0.2 0" src="#penguin-sledding" rotation="-90 0 0"></a-video>
</a-anchor>
<a-camera-static preset='hiro'/>
<a-entity light="color: #ccccff; intensity: 1; type: ambient;background: transparent;" visible="">
</a-entity>
</a-scene>-->
</body>
</html>