提交 f495bbf6 编写于 作者: M Mr.doob

WebXR: Replaced frameOfReferenceType with referenceSpaceType.

上级 c36ee094
......@@ -9,9 +9,9 @@ var WEBVR = {
createButton: function ( renderer, options ) {
if ( options && options.frameOfReferenceType ) {
if ( options && options.referenceSpaceType ) {
renderer.vr.setFrameOfReferenceType( options.frameOfReferenceType );
renderer.vr.setReferenceSpaceType( options.referenceSpaceType );
}
......
......@@ -36,7 +36,7 @@
renderer.vr.enabled = true;
document.body.appendChild( renderer.domElement );
document.body.appendChild( WEBVR.createButton( renderer, { frameOfReferenceType: 'head-model' } ) );
document.body.appendChild( WEBVR.createButton( renderer, { referenceSpaceType: 'local' } ) );
//
......
......@@ -33,7 +33,7 @@
renderer.vr.enabled = true;
document.body.appendChild( renderer.domElement );
document.body.appendChild( WEBVR.createButton( renderer, { frameOfReferenceType: 'eye-level' } ) );
document.body.appendChild( WEBVR.createButton( renderer, { referenceSpaceType: 'local' } ) );
//
......
......@@ -132,7 +132,7 @@
renderer.vr.enabled = true;
container.appendChild( renderer.domElement );
document.body.appendChild( WEBVR.createButton( renderer, { frameOfReferenceType: 'head-model' } ) );
document.body.appendChild( WEBVR.createButton( renderer, { referenceSpaceType: 'local' } ) );
//
......
......@@ -29,7 +29,7 @@ function WebVRManager( renderer ) {
var framebufferScaleFactor = 1.0;
var frameOfReferenceType = 'stage';
var referenceSpaceType = 'local-floor';
if ( typeof window !== 'undefined' && 'VRFrameData' in window ) {
......@@ -234,9 +234,9 @@ function WebVRManager( renderer ) {
};
this.setFrameOfReferenceType = function ( value ) {
this.setReferenceSpaceType = function ( value ) {
frameOfReferenceType = value;
referenceSpaceType = value;
};
......@@ -248,7 +248,7 @@ function WebVRManager( renderer ) {
this.getCamera = function ( camera ) {
var userHeight = frameOfReferenceType === 'stage' ? 1.6 : 0;
var userHeight = referenceSpaceType === 'local-floor' ? 1.6 : 0;
if ( isPresenting() === false ) {
......@@ -266,7 +266,7 @@ function WebVRManager( renderer ) {
//
if ( frameOfReferenceType === 'stage' ) {
if ( referenceSpaceType === 'local-floor' ) {
var stageParameters = device.stageParameters;
......@@ -323,7 +323,7 @@ function WebVRManager( renderer ) {
standingMatrixInverse.getInverse( standingMatrix );
if ( frameOfReferenceType === 'stage' ) {
if ( referenceSpaceType === 'local-floor' ) {
cameraL.matrixWorldInverse.multiply( standingMatrixInverse );
cameraR.matrixWorldInverse.multiply( standingMatrixInverse );
......@@ -406,6 +406,14 @@ function WebVRManager( renderer ) {
};
// DEPRECATED
this.setFrameOfReferenceType = function () {
console.warn( 'THREE.WebVRManager: setFrameOfReferenceType() has been deprecated.' );
};
}
export { WebVRManager };
......@@ -305,6 +305,12 @@ function WebXRManager( renderer ) {
};
this.setFrameOfReferenceType = function () {
console.warn( 'THREE.WebXRManager: setFrameOfReferenceType() has been deprecated.' );
};
this.submitFrame = function () {};
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册