Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
7c291f6f
T
three.js
项目概览
Ablesons
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7c291f6f
编写于
10月 23, 2018
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
cf9f8ee1
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
10 addition
and
10 deletion
+10
-10
build/three.js
build/three.js
+4
-4
build/three.min.js
build/three.min.js
+2
-2
build/three.module.js
build/three.module.js
+4
-4
未找到文件。
build/three.js
浏览文件 @
7c291f6f
...
@@ -21288,8 +21288,8 @@
...
@@ -21288,8 +21288,8 @@
var ipd = cameraLPos.distanceTo( cameraRPos );
var ipd = cameraLPos.distanceTo( cameraRPos );
var projL = cameraL.projectionMatrix;
var projL = cameraL.projectionMatrix
.elements
;
var projR = cameraR.projectionMatrix;
var projR = cameraR.projectionMatrix
.elements
;
// VR systems will have identical far and near planes, and
// VR systems will have identical far and near planes, and
// most likely identical top and bottom frustum extents.
// most likely identical top and bottom frustum extents.
...
@@ -21308,13 +21308,13 @@
...
@@ -21308,13 +21308,13 @@
// Calculate the new camera's position offset from the
// Calculate the new camera's position offset from the
// left camera.
// left camera.
var zOffset = ipd / ( leftFovL
+
rightFovR );
var zOffset = ipd / ( leftFovL
-
rightFovR );
var xOffset = zOffset * leftFovL;
var xOffset = zOffset * leftFovL;
// TODO: Better way to apply this offset?
// TODO: Better way to apply this offset?
cameraL.matrixWorld.decompose( camera.position, camera.quaternion, camera.scale );
cameraL.matrixWorld.decompose( camera.position, camera.quaternion, camera.scale );
camera.translateX( xOffset );
camera.translateX( xOffset );
camera.translateZ( - zOffset );
camera.translateZ( - zOffset
* 2
);
camera.matrixWorld.compose( camera.position, camera.quaternion, camera.scale );
camera.matrixWorld.compose( camera.position, camera.quaternion, camera.scale );
camera.matrixWorldInverse.getInverse( camera.matrixWorld );
camera.matrixWorldInverse.getInverse( camera.matrixWorld );
build/three.min.js
浏览文件 @
7c291f6f
...
@@ -133,8 +133,8 @@ if(1016===a){if(c.isWebGL2)return 5131;var d=b.get("OES_texture_half_float");if(
...
@@ -133,8 +133,8 @@ if(1016===a){if(c.isWebGL2)return 5131;var d=b.get("OES_texture_half_float");if(
if(206===a)return 772;if(207===a)return 773;if(208===a)return 774;if(209===a)return 775;if(210===a)return 776;if(33776===a||33777===a||33778===a||33779===a)if(d=b.get("WEBGL_compressed_texture_s3tc"),null!==d){if(33776===a)return d.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return d.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return d.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return d.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===a||35841===a||35842===a||35843===a)if(d=b.get("WEBGL_compressed_texture_pvrtc"),
if(206===a)return 772;if(207===a)return 773;if(208===a)return 774;if(209===a)return 775;if(210===a)return 776;if(33776===a||33777===a||33778===a||33779===a)if(d=b.get("WEBGL_compressed_texture_s3tc"),null!==d){if(33776===a)return d.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return d.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return d.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return d.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===a||35841===a||35842===a||35843===a)if(d=b.get("WEBGL_compressed_texture_pvrtc"),
null!==d){if(35840===a)return d.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===a)return d.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return d.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return d.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===a&&(d=b.get("WEBGL_compressed_texture_etc1"),null!==d))return d.COMPRESSED_RGB_ETC1_WEBGL;if(37808===a||37809===a||37810===a||37811===a||37812===a||37813===a||37814===a||37815===a||37816===a||37817===a||37818===a||37819===a||37820===a||37821===a)if(d=b.get("WEBGL_compressed_texture_astc"),
null!==d){if(35840===a)return d.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===a)return d.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return d.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return d.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===a&&(d=b.get("WEBGL_compressed_texture_etc1"),null!==d))return d.COMPRESSED_RGB_ETC1_WEBGL;if(37808===a||37809===a||37810===a||37811===a||37812===a||37813===a||37814===a||37815===a||37816===a||37817===a||37818===a||37819===a||37820===a||37821===a)if(d=b.get("WEBGL_compressed_texture_astc"),
null!==d)return a;if(103===a||104===a){if(c.isWebGL2){if(103===a)return 32775;if(104===a)return 32776}d=b.get("EXT_blend_minmax");if(null!==d){if(103===a)return d.MIN_EXT;if(104===a)return d.MAX_EXT}}if(1020===a){if(c.isWebGL2)return 34042;d=b.get("WEBGL_depth_texture");if(null!==d)return d.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Ob(){B.call(this);this.type="Group"}function Ra(){B.call(this);this.type="Camera";this.matrixWorldInverse=new P;this.projectionMatrix=new P;this.projectionMatrixInverse=
null!==d)return a;if(103===a||104===a){if(c.isWebGL2){if(103===a)return 32775;if(104===a)return 32776}d=b.get("EXT_blend_minmax");if(null!==d){if(103===a)return d.MIN_EXT;if(104===a)return d.MAX_EXT}}if(1020===a){if(c.isWebGL2)return 34042;d=b.get("WEBGL_depth_texture");if(null!==d)return d.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Ob(){B.call(this);this.type="Group"}function Ra(){B.call(this);this.type="Camera";this.matrixWorldInverse=new P;this.projectionMatrix=new P;this.projectionMatrixInverse=
new P}function V(a,b,c,d){Ra.call(this);this.type="PerspectiveCamera";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==c?c:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==b?b:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function Cc(a){V.call(this);this.cameras=a||[]}function df(a,b,c){ef.setFromMatrixPosition(b.matrixWorld);ff.setFromMatrixPosition(c.matrixWorld);var d=ef.distanceTo(ff),e=b.projectionMatrix
,f=c.projectionMatrix;c=e[14]/
new P}function V(a,b,c,d){Ra.call(this);this.type="PerspectiveCamera";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==c?c:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==b?b:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function Cc(a){V.call(this);this.cameras=a||[]}function df(a,b,c){ef.setFromMatrixPosition(b.matrixWorld);ff.setFromMatrixPosition(c.matrixWorld);var d=ef.distanceTo(ff),e=b.projectionMatrix
.elements,f=c.projectionMatrix.elements;
(e[10]-1);var g=e[14]/(e[10]+1),h=(e[8]-1)/e[0],k=(f[8]+1)/f[0],m=h*c,r=k*c,n=c*(e[9]+1)/e[5],q=c*(f[9]+1)/f[5];e=c*(e[9]-1)/e[5];f=c*(f[9]-1)/f[5];k=d/(h+k);h*=k;b.matrixWorld.decompose(a.position,a.quaternion,a.scale);a.translateX(h);a.translateZ(
-k);a.matrixWorld.compose(a.position,a.quaternion,a.scale);a.matrixWorldInverse.getInverse(a.matrixWorld);a.projectionMatrix.makePerspective(m-h,r+(d-h),Math.max(n,q),Math.min(e,f),c+k,g+k)}function gf(a){function b(){return null!==e&&!0===e.isPresenting}
c=e[14]/(e[10]-1);var g=e[14]/(e[10]+1),h=(e[8]-1)/e[0],k=(f[8]+1)/f[0],m=h*c,r=k*c,n=c*(e[9]+1)/e[5],q=c*(f[9]+1)/f[5];e=c*(e[9]-1)/e[5];f=c*(f[9]-1)/f[5];k=d/(h-k);h*=k;b.matrixWorld.decompose(a.position,a.quaternion,a.scale);a.translateX(h);a.translateZ(2*
-k);a.matrixWorld.compose(a.position,a.quaternion,a.scale);a.matrixWorldInverse.getInverse(a.matrixWorld);a.projectionMatrix.makePerspective(m-h,r+(d-h),Math.max(n,q),Math.min(e,f),c+k,g+k)}function gf(a){function b(){return null!==e&&!0===e.isPresenting}
function c(){if(b()){var c=e.getEyeParameters("left"),f=c.renderWidth*r;c=c.renderHeight*r;H=a.getPixelRatio();v=a.getSize();a.setDrawingBufferSize(2*f,c,1);I.start()}else d.enabled&&a.setDrawingBufferSize(v.width,v.height,H),I.stop()}var d=this,e=null,f=null,g=null,h=[],k=new P,m=new P,r=1,n="stage";"undefined"!==typeof window&&"VRFrameData"in window&&(f=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",c,!1));var q=new P,w=new ja,l=new p,u=new V;u.bounds=new Z(0,0,.5,1);u.layers.enable(1);
function c(){if(b()){var c=e.getEyeParameters("left"),f=c.renderWidth*r;c=c.renderHeight*r;H=a.getPixelRatio();v=a.getSize();a.setDrawingBufferSize(2*f,c,1);I.start()}else d.enabled&&a.setDrawingBufferSize(v.width,v.height,H),I.stop()}var d=this,e=null,f=null,g=null,h=[],k=new P,m=new P,r=1,n="stage";"undefined"!==typeof window&&"VRFrameData"in window&&(f=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",c,!1));var q=new P,w=new ja,l=new p,u=new V;u.bounds=new Z(0,0,.5,1);u.layers.enable(1);
var x=new V;x.bounds=new Z(.5,0,.5,1);x.layers.enable(2);var y=new Cc([u,x]);y.layers.enable(1);y.layers.enable(2);var v,H,G=[];this.enabled=!1;this.getController=function(a){var b=h[a];void 0===b&&(b=new Ob,b.matrixAutoUpdate=!1,b.visible=!1,h[a]=b);return b};this.getDevice=function(){return e};this.setDevice=function(a){void 0!==a&&(e=a);I.setContext(a)};this.setFramebufferScaleFactor=function(a){r=a};this.setFrameOfReferenceType=function(a){n=a};this.setPoseTarget=function(a){void 0!==a&&(g=a)};
var x=new V;x.bounds=new Z(.5,0,.5,1);x.layers.enable(2);var y=new Cc([u,x]);y.layers.enable(1);y.layers.enable(2);var v,H,G=[];this.enabled=!1;this.getController=function(a){var b=h[a];void 0===b&&(b=new Ob,b.matrixAutoUpdate=!1,b.visible=!1,h[a]=b);return b};this.getDevice=function(){return e};this.setDevice=function(a){void 0!==a&&(e=a);I.setContext(a)};this.setFramebufferScaleFactor=function(a){r=a};this.setFrameOfReferenceType=function(a){n=a};this.setPoseTarget=function(a){void 0!==a&&(g=a)};
this.getCamera=function(a){var b="stage"===n?1.6:0;if(null===e)return a.position.set(0,b,0),a;e.depthNear=a.near;e.depthFar=a.far;e.getFrameData(f);if("stage"===n){var c=e.stageParameters;c?k.fromArray(c.sittingToStandingTransform):k.makeTranslation(0,b,0)}b=f.pose;c=null!==g?g:a;c.matrix.copy(k);c.matrix.decompose(c.position,c.quaternion,c.scale);null!==b.orientation&&(w.fromArray(b.orientation),c.quaternion.multiply(w));null!==b.position&&(w.setFromRotationMatrix(k),l.fromArray(b.position),l.applyQuaternion(w),
this.getCamera=function(a){var b="stage"===n?1.6:0;if(null===e)return a.position.set(0,b,0),a;e.depthNear=a.near;e.depthFar=a.far;e.getFrameData(f);if("stage"===n){var c=e.stageParameters;c?k.fromArray(c.sittingToStandingTransform):k.makeTranslation(0,b,0)}b=f.pose;c=null!==g?g:a;c.matrix.copy(k);c.matrix.decompose(c.position,c.quaternion,c.scale);null!==b.orientation&&(w.fromArray(b.orientation),c.quaternion.multiply(w));null!==b.position&&(w.setFromRotationMatrix(k),l.fromArray(b.position),l.applyQuaternion(w),
...
...
build/three.module.js
浏览文件 @
7c291f6f
...
@@ -21282,8 +21282,8 @@ function setProjectionFromUnion( camera, cameraL, cameraR ) {
...
@@ -21282,8 +21282,8 @@ function setProjectionFromUnion( camera, cameraL, cameraR ) {
var ipd = cameraLPos.distanceTo( cameraRPos );
var ipd = cameraLPos.distanceTo( cameraRPos );
var projL = cameraL.projectionMatrix;
var projL = cameraL.projectionMatrix
.elements
;
var projR = cameraR.projectionMatrix;
var projR = cameraR.projectionMatrix
.elements
;
// VR systems will have identical far and near planes, and
// VR systems will have identical far and near planes, and
// most likely identical top and bottom frustum extents.
// most likely identical top and bottom frustum extents.
...
@@ -21302,13 +21302,13 @@ function setProjectionFromUnion( camera, cameraL, cameraR ) {
...
@@ -21302,13 +21302,13 @@ function setProjectionFromUnion( camera, cameraL, cameraR ) {
// Calculate the new camera's position offset from the
// Calculate the new camera's position offset from the
// left camera.
// left camera.
var zOffset = ipd / ( leftFovL
+
rightFovR );
var zOffset = ipd / ( leftFovL
-
rightFovR );
var xOffset = zOffset * leftFovL;
var xOffset = zOffset * leftFovL;
// TODO: Better way to apply this offset?
// TODO: Better way to apply this offset?
cameraL.matrixWorld.decompose( camera.position, camera.quaternion, camera.scale );
cameraL.matrixWorld.decompose( camera.position, camera.quaternion, camera.scale );
camera.translateX( xOffset );
camera.translateX( xOffset );
camera.translateZ( - zOffset );
camera.translateZ( - zOffset
* 2
);
camera.matrixWorld.compose( camera.position, camera.quaternion, camera.scale );
camera.matrixWorld.compose( camera.position, camera.quaternion, camera.scale );
camera.matrixWorldInverse.getInverse( camera.matrixWorld );
camera.matrixWorldInverse.getInverse( camera.matrixWorld );
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录