|
@@ -1,14 +1,14 @@
|
|
import {
|
|
import {
|
|
Object3D
|
|
Object3D
|
|
-} from "../../../build/three.module.js";
|
|
|
|
|
|
+} from '../../../build/three.module.js';
|
|
|
|
|
|
import {
|
|
import {
|
|
XRHandPrimitiveModel
|
|
XRHandPrimitiveModel
|
|
-} from "./XRHandPrimitiveModel.js";
|
|
|
|
|
|
+} from './XRHandPrimitiveModel.js';
|
|
|
|
|
|
import {
|
|
import {
|
|
XRHandOculusMeshModel
|
|
XRHandOculusMeshModel
|
|
-} from "./XRHandOculusMeshModel.js";
|
|
|
|
|
|
+} from './XRHandOculusMeshModel.js';
|
|
|
|
|
|
function XRHandModel( controller ) {
|
|
function XRHandModel( controller ) {
|
|
|
|
|
|
@@ -40,7 +40,7 @@ XRHandModel.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
|
|
-var XRHandModelFactory = ( function () {
|
|
|
|
|
|
+const XRHandModelFactory = ( function () {
|
|
|
|
|
|
function XRHandModelFactory() {
|
|
function XRHandModelFactory() {
|
|
|
|
|
|
@@ -62,7 +62,6 @@ var XRHandModelFactory = ( function () {
|
|
createHandModel: function ( controller, profile, options ) {
|
|
createHandModel: function ( controller, profile, options ) {
|
|
|
|
|
|
const handModel = new XRHandModel( controller );
|
|
const handModel = new XRHandModel( controller );
|
|
- let scene = null;
|
|
|
|
|
|
|
|
controller.addEventListener( 'connected', ( event ) => {
|
|
controller.addEventListener( 'connected', ( event ) => {
|
|
|
|
|
|
@@ -74,15 +73,15 @@ var XRHandModelFactory = ( function () {
|
|
handModel.xrInputSource = xrInputSource;
|
|
handModel.xrInputSource = xrInputSource;
|
|
|
|
|
|
// @todo Detect profile if not provided
|
|
// @todo Detect profile if not provided
|
|
- if ( profile === undefined || profile === "spheres" ) {
|
|
|
|
|
|
+ if ( profile === undefined || profile === 'spheres' ) {
|
|
|
|
|
|
- handModel.motionController = new XRHandPrimitiveModel( handModel, controller, this.path, xrInputSource.handedness, { primitive: "sphere" } );
|
|
|
|
|
|
+ handModel.motionController = new XRHandPrimitiveModel( handModel, controller, this.path, xrInputSource.handedness, { primitive: 'sphere' } );
|
|
|
|
|
|
- } else if ( profile === "boxes" ) {
|
|
|
|
|
|
+ } else if ( profile === 'boxes' ) {
|
|
|
|
|
|
- handModel.motionController = new XRHandPrimitiveModel( handModel, controller, this.path, xrInputSource.handedness, { primitive: "box" } );
|
|
|
|
|
|
+ handModel.motionController = new XRHandPrimitiveModel( handModel, controller, this.path, xrInputSource.handedness, { primitive: 'box' } );
|
|
|
|
|
|
- } else if ( profile === "oculus" ) {
|
|
|
|
|
|
+ } else if ( profile === 'oculus' ) {
|
|
|
|
|
|
handModel.motionController = new XRHandOculusMeshModel( handModel, controller, this.path, xrInputSource.handedness, options );
|
|
handModel.motionController = new XRHandOculusMeshModel( handModel, controller, this.path, xrInputSource.handedness, options );
|
|
|
|
|