Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mousedown: 'xrsqueezestart',
mouseup: 'xrsqueezeend',
click: 'xrsqueeze'
},
// TODO decide on event names, and handle touching without press:
// all: {
// mousedown: 'xrbuttondown',
// mouseup: 'xrbuttonup',
// click: 'xrbuttonclick'
// }
}
// ...and add shortcut event handler properties on Object3DFacade for those events:
Facade.defineEventProperty(Object3DFacade, 'onXRSelectStart', 'xrselectstart')
Facade.defineEventProperty(Object3DFacade, 'onXRSelect', 'xrselect')
Facade.defineEventProperty(Object3DFacade, 'onXRSelectEnd', 'xrselectend')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueezeStart', 'xrsqueezestart')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueeze', 'xrsqueeze')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueezeEnd', 'xrsqueezeend')
export default XRInputSourceFacade
},
// TODO decide on event names, and handle touching without press:
// all: {
// mousedown: 'xrbuttondown',
// mouseup: 'xrbuttonup',
// click: 'xrbuttonclick'
// }
}
// ...and add shortcut event handler properties on Object3DFacade for those events:
Facade.defineEventProperty(Object3DFacade, 'onXRSelectStart', 'xrselectstart')
Facade.defineEventProperty(Object3DFacade, 'onXRSelect', 'xrselect')
Facade.defineEventProperty(Object3DFacade, 'onXRSelectEnd', 'xrselectend')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueezeStart', 'xrsqueezestart')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueeze', 'xrsqueeze')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueezeEnd', 'xrsqueezeend')
export default XRInputSourceFacade
// Predefine shape to facilitate JS engine optimization
assign(Object3DFacade.prototype, {
lookAt: null,
threeObject: null,
_parentObject3DFacade: null,
_removeChildIds: null,
_matrixChanged: true,
_worldMatrixVersion: -1,
_worldMatrixVersionAfterLastUpdate: -1,
_boundingSphereChanged: false
})
// Define onBeforeRender/onAfterRender event handler properties
Facade.defineEventProperty(Object3DFacade, 'onBeforeRender', 'beforerender')
Facade.defineEventProperty(Object3DFacade, 'onAfterRender', 'afterrender')
export default Object3DFacade
Object.defineProperty(Object3DFacade.prototype, 'isObject3DFacade', {value: true})
// Predefine shape to facilitate JS engine optimization
assign(Object3DFacade.prototype, {
lookAt: null,
threeObject: null,
_parentObject3DFacade: null,
_removeChildIds: null,
_matrixChanged: true,
_worldMatrixVersion: -1,
_worldMatrixVersionAfterLastUpdate: -1,
_boundingSphereChanged: false
})
// Define onBeforeRender/onAfterRender event handler properties
Facade.defineEventProperty(Object3DFacade, 'onBeforeRender', 'beforerender')
Facade.defineEventProperty(Object3DFacade, 'onAfterRender', 'afterrender')
export default Object3DFacade
[BUTTON_SQUEEZE]: {
mousedown: 'xrsqueezestart',
mouseup: 'xrsqueezeend',
click: 'xrsqueeze'
},
// TODO decide on event names, and handle touching without press:
// all: {
// mousedown: 'xrbuttondown',
// mouseup: 'xrbuttonup',
// click: 'xrbuttonclick'
// }
}
// ...and add shortcut event handler properties on Object3DFacade for those events:
Facade.defineEventProperty(Object3DFacade, 'onXRSelectStart', 'xrselectstart')
Facade.defineEventProperty(Object3DFacade, 'onXRSelect', 'xrselect')
Facade.defineEventProperty(Object3DFacade, 'onXRSelectEnd', 'xrselectend')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueezeStart', 'xrsqueezestart')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueeze', 'xrsqueeze')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueezeEnd', 'xrsqueezeend')
export default XRInputSourceFacade
mouseup: 'xrsqueezeend',
click: 'xrsqueeze'
},
// TODO decide on event names, and handle touching without press:
// all: {
// mousedown: 'xrbuttondown',
// mouseup: 'xrbuttonup',
// click: 'xrbuttonclick'
// }
}
// ...and add shortcut event handler properties on Object3DFacade for those events:
Facade.defineEventProperty(Object3DFacade, 'onXRSelectStart', 'xrselectstart')
Facade.defineEventProperty(Object3DFacade, 'onXRSelect', 'xrselect')
Facade.defineEventProperty(Object3DFacade, 'onXRSelectEnd', 'xrselectend')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueezeStart', 'xrsqueezestart')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueeze', 'xrsqueeze')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueezeEnd', 'xrsqueezeend')
export default XRInputSourceFacade
},
[BUTTON_SQUEEZE]: {
mousedown: 'xrsqueezestart',
mouseup: 'xrsqueezeend',
click: 'xrsqueeze'
},
// TODO decide on event names, and handle touching without press:
// all: {
// mousedown: 'xrbuttondown',
// mouseup: 'xrbuttonup',
// click: 'xrbuttonclick'
// }
}
// ...and add shortcut event handler properties on Object3DFacade for those events:
Facade.defineEventProperty(Object3DFacade, 'onXRSelectStart', 'xrselectstart')
Facade.defineEventProperty(Object3DFacade, 'onXRSelect', 'xrselect')
Facade.defineEventProperty(Object3DFacade, 'onXRSelectEnd', 'xrselectend')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueezeStart', 'xrsqueezestart')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueeze', 'xrsqueeze')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueezeEnd', 'xrsqueezeend')
export default XRInputSourceFacade
click: 'xrsqueeze'
},
// TODO decide on event names, and handle touching without press:
// all: {
// mousedown: 'xrbuttondown',
// mouseup: 'xrbuttonup',
// click: 'xrbuttonclick'
// }
}
// ...and add shortcut event handler properties on Object3DFacade for those events:
Facade.defineEventProperty(Object3DFacade, 'onXRSelectStart', 'xrselectstart')
Facade.defineEventProperty(Object3DFacade, 'onXRSelect', 'xrselect')
Facade.defineEventProperty(Object3DFacade, 'onXRSelectEnd', 'xrselectend')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueezeStart', 'xrsqueezestart')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueeze', 'xrsqueeze')
Facade.defineEventProperty(Object3DFacade, 'onXRSqueezeEnd', 'xrsqueezeend')
export default XRInputSourceFacade