raycaster:
:
<project root>/vr/client.js.
init SimpleRaycaster.
const SimpleRaycaster = {
getType: () => "simple",
getRayOrigin: () => [0, 0, 0],
getRayDirection: () => [0, 0, -1],
drawsCursor: () => true
};
function init(bundle, parent, options) {
init cursorVisibility: visible raycaster raycasters:
function init(bundle, parent, options) {
const vr = new VRInstance(bundle, 'Example', parent, {
raycasters: [
SimpleRaycaster
],
cursorVisibility: "visible",
enableHotReload: true,
...options,
});
vr.render = function() {
};
vr.start();
return vr;
}
window.ReactVR = {init};
. .