Hi, I am struggle on blinked detection using xrblinked
I want to create a blink detection game but I canβt find any doc using xrblinked
Hi, I am struggle on blinked detection using xrblinked
I want to create a blink detection game but I canβt find any doc using xrblinked
I found this https://www.8thwall.com/docs/api/aframeevents/xrblinked/#description
but it not helping
Hi,
Iβve created a simple component that logs a message when a blink is detected:
Files / components / blink-detection.js
const blinkComponent = {
init() {
this.el.sceneEl.addEventListener('xrblinked', (evt) => {
console.log('Blinked!')
})
},
}
export {blinkComponent}
app.js
// Copyright (c) 2024 8th Wall, Inc.
//
// app.js is the main entry point for your 8th Wall app. Code here will execute after head.html
// is loaded, and before body.html is loaded.
import {blinkComponent} from './components/blink-detection'
AFRAME.registerComponent('blink-detection', blinkComponent)
Add the component to your a-scene in body.html.
Make sure that your a-scene has the βxrfaceβ component.
I am kinda new here
my body.html look like this or should I add xrblinked on body.html
<a-scene
landing-page
xrextras-loading
xrextras-runtime-error
xrextras-pause-on-hidden
renderer="maxCanvasWidth: 960; maxCanvasHeight: 960"
xrface="mirroredDisplay: true; maxDetections: 1; meshGeometry: eyes, face, mouth; cameraDirection: front; allowedDevices: any;">
<a-camera
look-controls="enabled: false"
wasd-controls="enabled: false"
position="0 1.6 0"></a-camera>
</a-scene>
Iβve published the project sample here.
Let me know if this helps!
This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.