Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
fe42ceb6
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,发现更多精彩内容 >>
提交
fe42ceb6
编写于
10月 01, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
28e6e6cc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
34 addition
and
30 deletion
+34
-30
build/three.js
build/three.js
+30
-26
build/three.min.js
build/three.min.js
+4
-4
未找到文件。
build/three.js
浏览文件 @
fe42ceb6
...
...
@@ -26051,54 +26051,58 @@ THREE.Gyroscope = function () {
THREE.Gyroscope.prototype = Object.create( THREE.Object3D.prototype );
THREE.Gyroscope.prototype.updateMatrixWorld =
function ( force
) {
THREE.Gyroscope.prototype.updateMatrixWorld =
( function (
) {
this.matrixAutoUpdate && this.updateMatrix();
var translationObject = new THREE.Vector3();
var quaternionObject = new THREE.Quaternion();
var scaleObject = new THREE.Vector3();
// update matrixWorld
var translationWorld = new THREE.Vector3();
var quaternionWorld = new THREE.Quaternion();
var scaleWorld = new THREE.Vector3();
if ( this.matrixWorldNeedsUpdate ||
force ) {
return function (
force ) {
if ( this.parent ) {
this.matrixAutoUpdate && this.updateMatrix();
this.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix );
// update matrixWorld
this.matrixWorld.decompose( this.translationWorld, this.quaternionWorld, this.scaleWorld );
this.matrix.decompose( this.translationObject, this.quaternionObject, this.scaleObject );
if ( this.matrixWorldNeedsUpdate || force ) {
this.matrixWorld.compose( this.translationWorld, this.quaternionObject, this.scaleWorld );
if ( this.parent ) {
this.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix );
} else {
this.matrixWorld.decompose( translationWorld, quaternionWorld, scaleWorld );
this.matrix.decompose( translationObject, quaternionObject, scaleObject );
this.matrixWorld.copy( this.matrix
);
this.matrixWorld.compose( translationWorld, quaternionObject, scaleWorld
);
}
} else {
this.matrixWorldNeedsUpdate = false
;
this.matrixWorld.copy( this.matrix )
;
force = true;
}
}
// update children
this.matrixWorldNeedsUpdate = false;
for ( var i = 0, l = this.children.length; i < l; i ++ ) {
force = true;
this.children[ i ].updateMatrixWorld( force );
}
}
// update children
};
for ( var i = 0, l = this.children.length; i < l; i ++ ) {
THREE.Gyroscope.prototype.translationWorld = new THREE.Vector3();
THREE.Gyroscope.prototype.translationObject = new THREE.Vector3();
THREE.Gyroscope.prototype.quaternionWorld = new THREE.Quaternion();
THREE.Gyroscope.prototype.quaternionObject = new THREE.Quaternion();
THREE.Gyroscope.prototype.scaleWorld = new THREE.Vector3();
THREE.Gyroscope.prototype.scaleObject = new THREE.Vector3();
this.children[ i ].updateMatrixWorld( force );
}
};
}() );
// File:src/extras/core/Path.js
...
...
build/three.min.js
浏览文件 @
fe42ceb6
...
...
@@ -607,10 +607,10 @@ THREE.CurvePath.prototype.getBoundingBox=function(){var a=this.getPoints(),b,c,d
THREE
.
CurvePath
.
prototype
.
createPointsGeometry
=
function
(
a
){
a
=
this
.
getPoints
(
a
,
!
0
);
return
this
.
createGeometry
(
a
)};
THREE
.
CurvePath
.
prototype
.
createSpacedPointsGeometry
=
function
(
a
){
a
=
this
.
getSpacedPoints
(
a
,
!
0
);
return
this
.
createGeometry
(
a
)};
THREE
.
CurvePath
.
prototype
.
createGeometry
=
function
(
a
){
for
(
var
b
=
new
THREE
.
Geometry
,
c
=
0
;
c
<
a
.
length
;
c
++
)
b
.
vertices
.
push
(
new
THREE
.
Vector3
(
a
[
c
].
x
,
a
[
c
].
y
,
a
[
c
].
z
||
0
));
return
b
};
THREE
.
CurvePath
.
prototype
.
addWrapPath
=
function
(
a
){
this
.
bends
.
push
(
a
)};
THREE
.
CurvePath
.
prototype
.
getTransformedPoints
=
function
(
a
,
b
){
var
c
=
this
.
getPoints
(
a
),
d
,
e
;
b
||
(
b
=
this
.
bends
);
d
=
0
;
for
(
e
=
b
.
length
;
d
<
e
;
d
++
)
c
=
this
.
getWrapPoints
(
c
,
b
[
d
]);
return
c
};
THREE
.
CurvePath
.
prototype
.
getTransformedSpacedPoints
=
function
(
a
,
b
){
var
c
=
this
.
getSpacedPoints
(
a
),
d
,
e
;
b
||
(
b
=
this
.
bends
);
d
=
0
;
for
(
e
=
b
.
length
;
d
<
e
;
d
++
)
c
=
this
.
getWrapPoints
(
c
,
b
[
d
]);
return
c
};
THREE
.
CurvePath
.
prototype
.
getWrapPoints
=
function
(
a
,
b
){
var
c
=
this
.
getBoundingBox
(),
d
,
e
,
g
,
f
,
h
,
k
;
d
=
0
;
for
(
e
=
a
.
length
;
d
<
e
;
d
++
)
g
=
a
[
d
],
f
=
g
.
x
,
h
=
g
.
y
,
k
=
f
/
c
.
maxX
,
k
=
b
.
getUtoTmapping
(
k
,
f
),
f
=
b
.
getPoint
(
k
),
k
=
b
.
getTangent
(
k
),
k
.
set
(
-
k
.
y
,
k
.
x
).
multiplyScalar
(
h
),
g
.
x
=
f
.
x
+
k
.
x
,
g
.
y
=
f
.
y
+
k
.
y
;
return
a
};
THREE
.
Gyroscope
=
function
(){
THREE
.
Object3D
.
call
(
this
)};
THREE
.
Gyroscope
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
Gyroscope
.
prototype
.
updateMatrixWorld
=
function
(
a
){
this
.
matrixAutoUpdate
&&
this
.
updateMatrix
();
if
(
this
.
matrixWorldNeedsUpdate
||
a
)
this
.
parent
?(
this
.
matrixWorld
.
multiplyMatrices
(
this
.
parent
.
matrixWorld
,
this
.
matrix
),
this
.
matrixWorld
.
decompose
(
this
.
translationWorld
,
this
.
quaternionWorld
,
this
.
scaleWorld
),
this
.
matrix
.
decompose
(
this
.
translationObject
,
this
.
quaternionObject
,
this
.
scaleObject
),
this
.
matrixWorld
.
compose
(
this
.
translationWorld
,
this
.
quaternionObject
,
this
.
scaleWorld
)):
this
.
matrixWorld
.
copy
(
this
.
matrix
),
this
.
matrixWorldNeedsUpdate
=!
1
,
a
=!
0
;
for
(
var
b
=
0
,
c
=
this
.
children
.
length
;
b
<
c
;
b
++
)
this
.
children
[
b
].
updateMatrixWorld
(
a
)};
THREE
.
Gyroscope
.
prototype
.
translationWorld
=
new
THREE
.
Vector3
;
THREE
.
Gyroscope
.
prototype
.
translationObject
=
new
THREE
.
Vector3
;
THREE
.
Gyroscope
.
prototype
.
quaternionWorld
=
new
THREE
.
Quaternion
;
THREE
.
Gyroscope
.
prototype
.
quaternionObject
=
new
THREE
.
Quaternion
;
THREE
.
Gyroscope
.
prototype
.
scaleWorld
=
new
THREE
.
Vector3
;
THREE
.
Gyroscope
.
prototype
.
scaleObject
=
new
THREE
.
Vector3
;
THREE
.
Path
=
function
(
a
){
THREE
.
CurvePath
.
call
(
this
);
this
.
actions
=
[];
a
&&
this
.
fromPoints
(
a
)};
THREE
.
Path
.
prototype
=
Object
.
create
(
THREE
.
CurvePath
.
prototype
);
THREE
.
PathActions
=
{
MOVE_TO
:
"
moveTo
"
,
LINE_TO
:
"
lineTo
"
,
QUADRATIC_CURVE_TO
:
"
quadraticCurveTo
"
,
BEZIER_CURVE_TO
:
"
bezierCurveTo
"
,
CSPLINE_THRU
:
"
splineThru
"
,
ARC
:
"
arc
"
,
ELLIPSE
:
"
ellipse
"
};
THREE
.
Path
.
prototype
.
fromPoints
=
function
(
a
){
this
.
moveTo
(
a
[
0
].
x
,
a
[
0
].
y
);
for
(
var
b
=
1
,
c
=
a
.
length
;
b
<
c
;
b
++
)
this
.
lineTo
(
a
[
b
].
x
,
a
[
b
].
y
)};
THREE
.
Path
.
prototype
.
moveTo
=
function
(
a
,
b
){
var
c
=
Array
.
prototype
.
slice
.
call
(
arguments
);
this
.
actions
.
push
({
action
:
THREE
.
PathActions
.
MOVE_TO
,
args
:
c
})};
THREE
.
Path
.
prototype
.
lineTo
=
function
(
a
,
b
){
var
c
=
Array
.
prototype
.
slice
.
call
(
arguments
),
d
=
this
.
actions
[
this
.
actions
.
length
-
1
].
args
,
d
=
new
THREE
.
LineCurve
(
new
THREE
.
Vector2
(
d
[
d
.
length
-
2
],
d
[
d
.
length
-
1
]),
new
THREE
.
Vector2
(
a
,
b
));
this
.
curves
.
push
(
d
);
this
.
actions
.
push
({
action
:
THREE
.
PathActions
.
LINE_TO
,
args
:
c
})};
THREE
.
Gyroscope
.
prototype
.
updateMatrixWorld
=
function
(
){
var
a
=
new
THREE
.
Vector3
,
b
=
new
THREE
.
Quaternion
,
c
=
new
THREE
.
Vector3
,
d
=
new
THREE
.
Vector3
,
e
=
new
THREE
.
Quaternion
,
g
=
new
THREE
.
Vector3
;
return
function
(
f
){
this
.
matrixAutoUpdate
&&
this
.
updateMatrix
();
if
(
this
.
matrixWorldNeedsUpdate
||
f
)
this
.
parent
?(
this
.
matrixWorld
.
multiplyMatrices
(
this
.
parent
.
matrixWorld
,
this
.
matrix
),
this
.
matrixWorld
.
decompose
(
d
,
e
,
g
),
this
.
matrix
.
decompose
(
a
,
b
,
c
),
this
.
matrixWorld
.
compose
(
d
,
b
,
g
)):
this
.
matrixWorld
.
copy
(
this
.
matrix
),
this
.
matrixWorldNeedsUpdate
=
!
1
,
f
=!
0
;
for
(
var
h
=
0
,
k
=
this
.
children
.
length
;
h
<
k
;
h
++
)
this
.
children
[
h
].
updateMatrixWorld
(
f
)}}();
THREE
.
Path
=
function
(
a
){
THREE
.
CurvePath
.
call
(
this
);
this
.
actions
=
[];
a
&&
this
.
fromPoints
(
a
)};
THREE
.
Path
.
prototype
=
Object
.
create
(
THREE
.
CurvePath
.
prototype
);
THREE
.
PathActions
=
{
MOVE_TO
:
"
moveTo
"
,
LINE_TO
:
"
lineTo
"
,
QUADRATIC_CURVE_TO
:
"
quadraticCurveTo
"
,
BEZIER_CURVE_TO
:
"
bezierCurveTo
"
,
CSPLINE_THRU
:
"
splineThru
"
,
ARC
:
"
arc
"
,
ELLIPSE
:
"
ellipse
"
}
;
THREE
.
Path
.
prototype
.
fromPoints
=
function
(
a
){
this
.
moveTo
(
a
[
0
].
x
,
a
[
0
].
y
);
for
(
var
b
=
1
,
c
=
a
.
length
;
b
<
c
;
b
++
)
this
.
lineTo
(
a
[
b
].
x
,
a
[
b
].
y
)};
THREE
.
Path
.
prototype
.
moveTo
=
function
(
a
,
b
){
var
c
=
Array
.
prototype
.
slice
.
call
(
arguments
);
this
.
actions
.
push
({
action
:
THREE
.
PathActions
.
MOVE_TO
,
args
:
c
}
)};
THREE
.
Path
.
prototype
.
lineTo
=
function
(
a
,
b
){
var
c
=
Array
.
prototype
.
slice
.
call
(
arguments
),
d
=
this
.
actions
[
this
.
actions
.
length
-
1
].
args
,
d
=
new
THREE
.
LineCurve
(
new
THREE
.
Vector2
(
d
[
d
.
length
-
2
],
d
[
d
.
length
-
1
]),
new
THREE
.
Vector2
(
a
,
b
));
this
.
curves
.
push
(
d
);
this
.
actions
.
push
({
action
:
THREE
.
PathActions
.
LINE_TO
,
args
:
c
})};
THREE
.
Path
.
prototype
.
quadraticCurveTo
=
function
(
a
,
b
,
c
,
d
){
var
e
=
Array
.
prototype
.
slice
.
call
(
arguments
),
g
=
this
.
actions
[
this
.
actions
.
length
-
1
].
args
,
g
=
new
THREE
.
QuadraticBezierCurve
(
new
THREE
.
Vector2
(
g
[
g
.
length
-
2
],
g
[
g
.
length
-
1
]),
new
THREE
.
Vector2
(
a
,
b
),
new
THREE
.
Vector2
(
c
,
d
));
this
.
curves
.
push
(
g
);
this
.
actions
.
push
({
action
:
THREE
.
PathActions
.
QUADRATIC_CURVE_TO
,
args
:
e
})};
THREE
.
Path
.
prototype
.
bezierCurveTo
=
function
(
a
,
b
,
c
,
d
,
e
,
g
){
var
f
=
Array
.
prototype
.
slice
.
call
(
arguments
),
h
=
this
.
actions
[
this
.
actions
.
length
-
1
].
args
,
h
=
new
THREE
.
CubicBezierCurve
(
new
THREE
.
Vector2
(
h
[
h
.
length
-
2
],
h
[
h
.
length
-
1
]),
new
THREE
.
Vector2
(
a
,
b
),
new
THREE
.
Vector2
(
c
,
d
),
new
THREE
.
Vector2
(
e
,
g
));
this
.
curves
.
push
(
h
);
this
.
actions
.
push
({
action
:
THREE
.
PathActions
.
BEZIER_CURVE_TO
,
args
:
f
})};
THREE
.
Path
.
prototype
.
splineThru
=
function
(
a
){
var
b
=
Array
.
prototype
.
slice
.
call
(
arguments
),
c
=
this
.
actions
[
this
.
actions
.
length
-
1
].
args
,
c
=
[
new
THREE
.
Vector2
(
c
[
c
.
length
-
2
],
c
[
c
.
length
-
1
])];
Array
.
prototype
.
push
.
apply
(
c
,
a
);
c
=
new
THREE
.
SplineCurve
(
c
);
this
.
curves
.
push
(
c
);
this
.
actions
.
push
({
action
:
THREE
.
PathActions
.
CSPLINE_THRU
,
args
:
b
})};
THREE
.
Path
.
prototype
.
arc
=
function
(
a
,
b
,
c
,
d
,
e
,
g
){
var
f
=
this
.
actions
[
this
.
actions
.
length
-
1
].
args
;
this
.
absarc
(
a
+
f
[
f
.
length
-
2
],
b
+
f
[
f
.
length
-
1
],
c
,
d
,
e
,
g
)};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录