skezo / Reticulum

A simple gaze interaction manager for VR in the browser with Three.js.
http://skezo.github.io/Reticulum/
61 stars 15 forks source link

Added support for `lockDistance` option #20

Closed UXVirtual closed 8 years ago

UXVirtual commented 8 years ago

Setting lockDistance to true allows the reticle to be positioned at the restPoint distance always, without moving it to intersect with the gazed object. E.g.

Reticulum.init(camera, {
        proximity: false,
        clickevents: true,
        lockDistance: true,
        near: 1400,
        far: 1600,
        reticle: {
            visible: true,
            restPoint: 50,
            color: 0xcc0000,
            innerRadius: 0.005,
            outerRadius: 0.01,
            hover: {
                color: 0xffffff,
                innerRadius: 0.005,
                outerRadius: 0.01,
                speed: 2,
                vibrate: 50
            }
        },
        fuse: {
            visible: true,
            duration: 0.5,
            color: 0xffffff,
            innerRadius: 0.01,
            outerRadius: 0.015,
            vibrate: 100,
            clickCancelFuse: false
        }
    });