Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
61520f0d
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,体验更适合开发者的 AI 搜索 >>
提交
61520f0d
编写于
5月 26, 2017
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed some more lgtm.com alerts.
上级
96a2f631
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
50 addition
and
102 deletion
+50
-102
editor/js/History.js
editor/js/History.js
+1
-1
examples/js/WaterShader.js
examples/js/WaterShader.js
+1
-2
examples/js/geometries/TeapotBufferGeometry.js
examples/js/geometries/TeapotBufferGeometry.js
+1
-3
examples/js/loaders/AWDLoader.js
examples/js/loaders/AWDLoader.js
+0
-2
examples/js/loaders/AssimpLoader.js
examples/js/loaders/AssimpLoader.js
+0
-10
examples/js/loaders/BinaryLoader.js
examples/js/loaders/BinaryLoader.js
+1
-2
examples/js/loaders/ColladaLoader.js
examples/js/loaders/ColladaLoader.js
+4
-6
examples/js/loaders/NRRDLoader.js
examples/js/loaders/NRRDLoader.js
+0
-7
examples/js/loaders/PVRLoader.js
examples/js/loaders/PVRLoader.js
+17
-17
examples/js/loaders/VRMLLoader.js
examples/js/loaders/VRMLLoader.js
+14
-19
examples/js/math/Lut.js
examples/js/math/Lut.js
+4
-4
examples/js/modifiers/BufferSubdivisionModifier.js
examples/js/modifiers/BufferSubdivisionModifier.js
+0
-5
examples/js/renderers/RaytracingWorker.js
examples/js/renderers/RaytracingWorker.js
+1
-3
examples/webgl_gpgpu_protoplanet.html
examples/webgl_gpgpu_protoplanet.html
+0
-8
examples/webgl_materials_nodes.html
examples/webgl_materials_nodes.html
+1
-3
examples/webgl_materials_skin.html
examples/webgl_materials_skin.html
+1
-3
examples/webgl_postprocessing_dof2.html
examples/webgl_postprocessing_dof2.html
+1
-1
examples/webgl_postprocessing_glitch.html
examples/webgl_postprocessing_glitch.html
+2
-2
src/geometries/ExtrudeGeometry.js
src/geometries/ExtrudeGeometry.js
+1
-4
未找到文件。
editor/js/History.js
浏览文件 @
61520f0d
...
...
@@ -273,7 +273,7 @@ History.prototype = {
if
(
cmd
===
undefined
||
id
===
cmd
.
id
)
break
;
cmd
=
this
.
undo
();
this
.
undo
();
}
...
...
examples/js/WaterShader.js
浏览文件 @
61520f0d
...
...
@@ -307,8 +307,7 @@ THREE.Water.prototype.updateTextureMatrix = function () {
q
.
w
=
(
1.0
+
projectionMatrix
.
elements
[
10
]
)
/
projectionMatrix
.
elements
[
14
];
// Calculate the scaled plane vector
var
c
=
new
THREE
.
Vector4
();
c
=
this
.
clipPlane
.
multiplyScalar
(
2.0
/
this
.
clipPlane
.
dot
(
q
)
);
var
c
=
this
.
clipPlane
.
multiplyScalar
(
2.0
/
this
.
clipPlane
.
dot
(
q
)
);
// Replacing the third row of the projection matrix
projectionMatrix
.
elements
[
2
]
=
c
.
x
;
...
...
examples/js/geometries/TeapotBufferGeometry.js
浏览文件 @
61520f0d
...
...
@@ -479,7 +479,7 @@ THREE.TeapotBufferGeometry = function ( size, segments, bottom, lid, body, fitLi
var
tcoord
;
var
sstep
,
tstep
;
var
vertPerRow
,
eps
;
var
vertPerRow
;
var
s
,
t
,
sval
,
tval
,
p
;
var
dsval
=
0
;
...
...
@@ -532,8 +532,6 @@ THREE.TeapotBufferGeometry = function ( size, segments, bottom, lid, body, fitLi
vertPerRow
=
segments
+
1
;
eps
=
0.0000001
;
var
surfCount
=
0
;
var
vertCount
=
0
;
...
...
examples/js/loaders/AWDLoader.js
浏览文件 @
61520f0d
...
...
@@ -288,7 +288,6 @@
mtx
,
materials
,
mat
,
mat_id
,
num_materials
,
materials_parsed
,
parent
,
i
;
...
...
@@ -301,7 +300,6 @@
geometries
=
this
.
getBlock
(
data_id
);
materials
=
[];
materials_parsed
=
0
;
for
(
i
=
0
;
i
<
num_materials
;
i
++
)
{
...
...
examples/js/loaders/AssimpLoader.js
浏览文件 @
61520f0d
...
...
@@ -493,16 +493,6 @@
}
function
aiAnimation
()
{
this
.
mName
=
""
;
this
.
mDuration
=
0
;
this
.
mTicksPerSecond
=
0
;
this
.
mNumChannels
=
0
;
this
.
mChannels
=
[];
}
function
sortWeights
(
indexes
,
weights
)
{
var
pairs
=
[];
...
...
examples/js/loaders/BinaryLoader.js
浏览文件 @
61520f0d
...
...
@@ -92,7 +92,7 @@ THREE.BinaryLoader.prototype = {
start_quad_flat
,
start_quad_smooth
,
start_quad_flat_uv
,
start_quad_smooth_uv
,
tri_size
,
quad_size
,
len_tri_flat
,
len_tri_smooth
,
len_tri_flat_uv
,
len_tri_smooth_uv
,
len_quad_flat
,
len_quad_smooth
,
len_quad_flat_uv
,
len_quad_smooth_uv
;
len_quad_flat
,
len_quad_smooth
,
len_quad_flat_uv
;
THREE
.
Geometry
.
call
(
this
);
...
...
@@ -119,7 +119,6 @@ THREE.BinaryLoader.prototype = {
len_quad_flat
=
md
.
nquad_flat
*
(
quad_size
);
len_quad_smooth
=
md
.
nquad_smooth
*
(
quad_size
+
md
.
normal_index_bytes
*
4
);
len_quad_flat_uv
=
md
.
nquad_flat_uv
*
(
quad_size
+
md
.
uv_index_bytes
*
4
);
len_quad_smooth_uv
=
md
.
nquad_smooth_uv
*
(
quad_size
+
md
.
normal_index_bytes
*
4
+
md
.
uv_index_bytes
*
4
);
// read buffers
...
...
examples/js/loaders/ColladaLoader.js
浏览文件 @
61520f0d
...
...
@@ -682,11 +682,11 @@ THREE.ColladaLoader = function () {
}
function
applySkin
(
geometry
,
instanceCtrl
,
frame
)
{
function
applySkin
(
geometry
,
instanceCtrl
,
frame
)
{
var
skinController
=
controllers
[
instanceCtrl
.
url
]
;
if
(
frame
===
undefined
)
frame
=
40
;
frame
=
frame
!==
undefined
?
frame
:
40
;
var
skinController
=
controllers
[
instanceCtrl
.
url
]
;
if
(
!
skinController
||
!
skinController
.
skin
)
{
...
...
@@ -2171,13 +2171,11 @@ THREE.ColladaLoader = function () {
var
dotSyntax
=
(
sid
.
indexOf
(
"
.
"
)
>=
0
);
var
arrSyntax
=
(
sid
.
indexOf
(
"
(
"
)
>=
0
);
var
arrIndices
;
var
member
;
if
(
dotSyntax
)
{
parts
=
sid
.
split
(
"
.
"
);
sid
=
parts
.
shift
();
member
=
parts
.
shift
();
}
else
if
(
arrSyntax
)
{
...
...
@@ -2871,7 +2869,7 @@ THREE.ColladaLoader = function () {
var
j
,
k
,
pList
=
primitive
.
p
,
inputs
=
primitive
.
inputs
;
var
input
,
index
,
idx32
;
var
source
,
numParams
;
var
vc
Index
=
0
,
vcount
=
3
,
maxOffset
=
0
;
var
vc
ount
,
vcIndex
=
0
,
maxOffset
=
0
;
var
texture_sets
=
[];
for
(
j
=
0
;
j
<
inputs
.
length
;
j
++
)
{
...
...
examples/js/loaders/NRRDLoader.js
浏览文件 @
61520f0d
...
...
@@ -367,13 +367,6 @@ THREE.NRRDLoader.prototype = {
}
else
{
var
v
=
headerObject
.
vectors
;
var
origin
=
headerObject
.
space_origin
;
if
(
!
origin
)
{
origin
=
[
0
,
0
,
0
];
}
volume
.
matrix
.
set
(
_spaceX
*
v
[
0
][
0
],
_spaceX
*
v
[
1
][
0
],
_spaceX
*
v
[
2
][
0
],
0
,
_spaceY
*
v
[
0
][
1
],
_spaceY
*
v
[
1
][
1
],
_spaceY
*
v
[
2
][
1
],
0
,
...
...
examples/js/loaders/PVRLoader.js
浏览文件 @
61520f0d
/*
/*
* PVRLoader
* Author: pierre lepers
* Date: 17/09/2014 11:09
...
...
@@ -36,7 +36,7 @@ THREE.PVRLoader.parse = function ( buffer, loadMipmaps ) {
return
THREE
.
PVRLoader
.
_parseV3
(
pvrDatas
);
}
}
// PVR v2
else
if
(
header
[
11
]
===
0x21525650
)
{
...
...
@@ -51,10 +51,10 @@ THREE.PVRLoader.parse = function ( buffer, loadMipmaps ) {
};
THREE
.
PVRLoader
.
_parseV3
=
function
(
pvrDatas
)
{
var
header
=
pvrDatas
.
header
;
var
bpp
,
format
;
var
metaLen
=
header
[
12
],
pixelFormat
=
header
[
2
],
...
...
@@ -109,7 +109,7 @@ THREE.PVRLoader._parseV2 = function ( pvrDatas ) {
numMipmaps
=
header
[
3
],
flags
=
header
[
4
],
dataLength
=
header
[
5
],
bpp
=
header
[
6
],
//
bpp = header[ 6 ],
bitmaskRed
=
header
[
7
],
bitmaskGreen
=
header
[
8
],
bitmaskBlue
=
header
[
9
],
...
...
@@ -141,7 +141,7 @@ THREE.PVRLoader._parseV2 = function ( pvrDatas ) {
}
else
throw
new
Error
(
"
pvrtc - unknown format
"
+
formatFlags
);
pvrDatas
.
dataPtr
=
headerLength
;
...
...
@@ -162,14 +162,14 @@ THREE.PVRLoader._parseV2 = function ( pvrDatas ) {
THREE
.
PVRLoader
.
_extract
=
function
(
pvrDatas
)
{
var
pvr
=
{
mipmaps
:
[],
width
:
pvrDatas
.
width
,
height
:
pvrDatas
.
height
,
format
:
pvrDatas
.
format
,
mipmapCount
:
pvrDatas
.
numMipmaps
,
isCubemap
:
pvrDatas
.
isCubemap
mipmaps
:
[],
width
:
pvrDatas
.
width
,
height
:
pvrDatas
.
height
,
format
:
pvrDatas
.
format
,
mipmapCount
:
pvrDatas
.
numMipmaps
,
isCubemap
:
pvrDatas
.
isCubemap
};
var
buffer
=
pvrDatas
.
buffer
;
...
...
@@ -246,10 +246,10 @@ THREE.PVRLoader._extract = function ( pvrDatas ) {
var
byteArray
=
new
Uint8Array
(
buffer
,
dataOffset
,
dataSize
);
var
mipmap
=
{
data
:
byteArray
,
width
:
sWidth
,
height
:
sHeight
var
mipmap
=
{
data
:
byteArray
,
width
:
sWidth
,
height
:
sHeight
};
pvr
.
mipmaps
[
surfIndex
*
pvrDatas
.
numMipmaps
+
mipLevel
]
=
mipmap
;
...
...
examples/js/loaders/VRMLLoader.js
浏览文件 @
61520f0d
...
...
@@ -114,22 +114,20 @@ THREE.VRMLLoader.prototype = {
*/
var
paintFaces
=
function
(
geometry
,
radius
,
angles
,
colors
,
directionIsDown
)
{
var
f
,
n
,
p
,
vertexIndex
,
color
;
var
direction
=
directionIsDown
?
1
:
-
1
;
var
faceIndices
=
[
'
a
'
,
'
b
'
,
'
c
'
,
'
d
'
];
var
coord
=
[
],
aColor
,
bColor
,
t
=
1
,
A
=
{},
B
=
{},
applyColor
=
false
,
colorIndex
;
var
coord
=
[
],
A
=
{},
B
=
{},
applyColor
=
false
;
for
(
var
k
=
0
;
k
<
angles
.
length
;
k
++
)
{
var
vec
=
{
};
// push the vector at which the color changes
vec
.
y
=
direction
*
(
Math
.
cos
(
angles
[
k
]
)
*
radius
);
vec
.
x
=
direction
*
(
Math
.
sin
(
angles
[
k
]
)
*
radius
);
var
vec
=
{
x
:
direction
*
(
Math
.
cos
(
angles
[
k
]
)
*
radius
),
y
:
direction
*
(
Math
.
sin
(
angles
[
k
]
)
*
radius
)
};
coord
.
push
(
vec
);
...
...
@@ -138,15 +136,15 @@ THREE.VRMLLoader.prototype = {
// painting the colors on the faces
for
(
var
i
=
0
;
i
<
geometry
.
faces
.
length
;
i
++
)
{
f
=
geometry
.
faces
[
i
];
var
f
=
geometry
.
faces
[
i
];
n
=
(
f
instanceof
THREE
.
Face3
)
?
3
:
4
;
var
n
=
(
f
instanceof
THREE
.
Face3
)
?
3
:
4
;
for
(
var
j
=
0
;
j
<
n
;
j
++
)
{
vertexIndex
=
f
[
faceIndices
[
j
]
];
v
ar
v
ertexIndex
=
f
[
faceIndices
[
j
]
];
p
=
geometry
.
vertices
[
vertexIndex
];
var
p
=
geometry
.
vertices
[
vertexIndex
];
for
(
var
index
=
0
;
index
<
colors
.
length
;
index
++
)
{
...
...
@@ -174,15 +172,14 @@ THREE.VRMLLoader.prototype = {
if
(
applyColor
)
{
bColor
=
colors
[
index
+
1
];
aColor
=
colors
[
index
];
var
aColor
=
colors
[
index
];
var
bColor
=
colors
[
index
+
1
];
// below is simple linear interpolation
t
=
Math
.
abs
(
p
.
y
-
A
.
y
)
/
(
A
.
y
-
B
.
y
);
var
t
=
Math
.
abs
(
p
.
y
-
A
.
y
)
/
(
A
.
y
-
B
.
y
);
// to make it faster, you can only calculate this if the y coord changes, the color is the same for points with the same y
color
=
interpolateColors
(
aColor
,
bColor
,
t
);
var
color
=
interpolateColors
(
aColor
,
bColor
,
t
);
f
.
vertexColors
[
j
]
=
color
;
...
...
@@ -190,7 +187,7 @@ THREE.VRMLLoader.prototype = {
}
else
if
(
undefined
===
f
.
vertexColors
[
j
]
)
{
colorIndex
=
directionIsDown
?
colors
.
length
-
1
:
0
;
var
colorIndex
=
directionIsDown
?
colors
.
length
-
1
:
0
;
f
.
vertexColors
[
j
]
=
colors
[
colorIndex
];
}
...
...
@@ -1025,8 +1022,6 @@ THREE.VRMLLoader.prototype = {
for
(
var
i
=
0
,
l
=
data
.
children
.
length
;
i
<
l
;
i
++
)
{
var
child
=
data
.
children
[
i
];
parseNode
(
data
.
children
[
i
],
object
);
}
...
...
examples/js/math/Lut.js
浏览文件 @
61520f0d
...
...
@@ -20,11 +20,10 @@ THREE.Lut = function ( colormap, numberofcolors ) {
var
min
=
this
.
map
[
j
][
0
];
var
max
=
this
.
map
[
j
+
1
][
0
];
var
color
=
new
THREE
.
Color
(
0xffffff
);
var
minColor
=
new
THREE
.
Color
(
0xffffff
).
setHex
(
this
.
map
[
j
][
1
]
);
var
maxColor
=
new
THREE
.
Color
(
0xffffff
).
setHex
(
this
.
map
[
j
+
1
][
1
]
);
color
=
minColor
.
lerp
(
maxColor
,
(
i
-
min
)
/
(
max
-
min
)
);
var
color
=
minColor
.
lerp
(
maxColor
,
(
i
-
min
)
/
(
max
-
min
)
);
this
.
lut
.
push
(
color
);
...
...
@@ -176,10 +175,11 @@ THREE.Lut.prototype = {
var
min
=
this
.
map
[
j
-
1
][
0
];
var
max
=
this
.
map
[
j
][
0
];
var
color
=
new
THREE
.
Color
(
0xffffff
);
var
minColor
=
new
THREE
.
Color
(
0xffffff
).
setHex
(
this
.
map
[
j
-
1
][
1
]
);
var
maxColor
=
new
THREE
.
Color
(
0xffffff
).
setHex
(
this
.
map
[
j
][
1
]
);
color
=
minColor
.
lerp
(
maxColor
,
(
i
-
min
)
/
(
max
-
min
)
);
var
color
=
minColor
.
lerp
(
maxColor
,
(
i
-
min
)
/
(
max
-
min
)
);
data
[
k
*
4
]
=
Math
.
round
(
color
.
r
*
255
);
data
[
k
*
4
+
1
]
=
Math
.
round
(
color
.
g
*
255
);
...
...
examples/js/modifiers/BufferSubdivisionModifier.js
浏览文件 @
61520f0d
...
...
@@ -242,7 +242,6 @@ function compute_vertex_normals( geometry ) {
}
var
tmpx
,
tmpy
,
tmpz
;
var
t_len
;
for
(
var
i
=
0
,
il
=
oldFaces
.
length
;
i
<
il
;
i
++
)
{
...
...
@@ -268,10 +267,6 @@ function compute_vertex_normals( geometry ) {
full_weights
[
1
]
=
(
my_weight
/
newNormalFaces
.
buffer
[
oldFaces
.
register
[
0
].
b
]
);
full_weights
[
2
]
=
(
my_weight
/
newNormalFaces
.
buffer
[
oldFaces
.
register
[
0
].
c
]
);
tmpx
=
newNormals
.
register
[
3
].
x
*
full_weights
[
0
];
tmpy
=
newNormals
.
register
[
3
].
y
*
full_weights
[
0
];
tmpz
=
newNormals
.
register
[
3
].
z
*
full_weights
[
0
];
newNormals
.
buffer
[
(
oldFaces
.
register
[
0
].
a
*
3
)
+
0
]
+=
newNormals
.
register
[
3
].
x
*
full_weights
[
0
];
newNormals
.
buffer
[
(
oldFaces
.
register
[
0
].
a
*
3
)
+
1
]
+=
newNormals
.
register
[
3
].
y
*
full_weights
[
0
];
newNormals
.
buffer
[
(
oldFaces
.
register
[
0
].
a
*
3
)
+
2
]
+=
newNormals
.
register
[
3
].
z
*
full_weights
[
0
];
...
...
examples/js/renderers/RaytracingWorker.js
浏览文件 @
61520f0d
...
...
@@ -80,12 +80,10 @@ self.onmessage = function( e ) {
* @author zz95 / http://github.com/zz85
*/
THREE
.
RaytracingRendererWorker
=
function
(
parameters
)
{
THREE
.
RaytracingRendererWorker
=
function
()
{
console
.
log
(
'
THREE.RaytracingRendererWorker
'
,
THREE
.
REVISION
);
parameters
=
parameters
||
{};
var
scope
=
this
;
var
maxRecursionDepth
=
3
;
...
...
examples/webgl_gpgpu_protoplanet.html
浏览文件 @
61520f0d
...
...
@@ -312,8 +312,6 @@
}
var
last
=
performance
.
now
();
var
gpuCompute
;
var
velocityVariable
;
var
positionVariable
;
...
...
@@ -600,12 +598,6 @@
function
render
()
{
var
now
=
performance
.
now
();
var
delta
=
(
now
-
last
)
/
1000
;
if
(
delta
>
1
)
delta
=
1
;
// safety cap on large deltas
last
=
now
;
gpuCompute
.
compute
();
particleUniforms
.
texturePosition
.
value
=
gpuCompute
.
getCurrentRenderTarget
(
positionVariable
).
texture
;
...
...
examples/webgl_materials_nodes.html
浏览文件 @
61520f0d
...
...
@@ -577,8 +577,6 @@
var
colorA
=
new
THREE
.
ColorNode
(
0xFFFFFF
);
var
colorB
=
new
THREE
.
ColorNode
(
0x0054df
);
var
uv
=
new
THREE
.
UVNode
();
var
timeScale
=
new
THREE
.
OperatorNode
(
time
,
speed
,
...
...
@@ -1901,7 +1899,7 @@
var
setMyVar
=
new
THREE
.
FunctionNode
(
[
"
float setMyVar( vec3 pos ) {
"
,
// set "myVar" in vertex shader in this example,
// set "myVar" in vertex shader in this example,
// can be used in fragment shader too or in rest of the current shader
"
myVar = pos;
"
,
// it is not accept "void" functions for now!
...
...
examples/webgl_materials_skin.html
浏览文件 @
61520f0d
...
...
@@ -109,9 +109,7 @@
// MATERIALS
var
diffuse
=
0xbbbbbb
,
specular
=
0x070707
,
shininess
=
50
;
specular
=
0x555555
;
var
diffuse
=
0xbbbbbb
,
specular
=
0x555555
,
shininess
=
50
;
var
shader
=
THREE
.
ShaderSkin
[
"
skin
"
];
...
...
examples/webgl_postprocessing_dof2.html
浏览文件 @
61520f0d
...
...
@@ -496,7 +496,7 @@ Use WEBGL Depth buffer support?
}
for
(
var
i
=
0
;
i
<
leaves
;
i
++
)
{
plane
=
planes
[
i
];
var
plane
=
planes
[
i
];
plane
.
rotation
.
x
+=
plane
.
rotation
.
dx
;
plane
.
rotation
.
y
+=
plane
.
rotation
.
dy
;
plane
.
rotation
.
z
+=
plane
.
rotation
.
dz
;
...
...
examples/webgl_postprocessing_glitch.html
浏览文件 @
61520f0d
...
...
@@ -77,10 +77,10 @@
scene
.
add
(
object
);
var
geometry
=
new
THREE
.
SphereGeometry
(
1
,
4
,
4
);
var
material
=
new
THREE
.
MeshPhongMaterial
(
{
color
:
0xffffff
,
shading
:
THREE
.
FlatShading
}
);
for
(
var
i
=
0
;
i
<
100
;
i
++
)
{
material
=
new
THREE
.
MeshPhongMaterial
(
{
color
:
0xffffff
*
Math
.
random
(),
shading
:
THREE
.
FlatShading
}
);
var
material
=
new
THREE
.
MeshPhongMaterial
(
{
color
:
0xffffff
*
Math
.
random
(),
shading
:
THREE
.
FlatShading
}
);
var
mesh
=
new
THREE
.
Mesh
(
geometry
,
material
);
mesh
.
position
.
set
(
Math
.
random
()
-
0.5
,
Math
.
random
()
-
0.5
,
Math
.
random
()
-
0.5
).
normalize
();
...
...
src/geometries/ExtrudeGeometry.js
浏览文件 @
61520f0d
...
...
@@ -56,7 +56,6 @@ function ExtrudeBufferGeometry( shapes, options ) {
if
(
typeof
(
shapes
)
===
"
undefined
"
)
{
shapes
=
[];
return
;
}
...
...
@@ -211,8 +210,6 @@ ExtrudeBufferGeometry.prototype.addShape = function ( shape, options ) {
}
reverse
=
false
;
// If vertices are in order now, we shouldn't need to worry about them again (hopefully)!
}
...
...
@@ -256,7 +253,7 @@ ExtrudeBufferGeometry.prototype.addShape = function ( shape, options ) {
// inPt' is the intersection of the two lines parallel to the two
// adjacent edges of inPt at a distance of 1 unit on the left side.
var
v_trans_x
,
v_trans_y
,
shrink_by
=
1
;
// resulting translation vector for inPt
var
v_trans_x
,
v_trans_y
,
shrink_by
;
// resulting translation vector for inPt
// good reading for geometry algorithms (here: line-line intersection)
// http://geomalgorithms.com/a05-_intersect-1.html
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录