Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
611efcba
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,发现更多精彩内容 >>
提交
611efcba
编写于
11月 17, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
jslint/jshint fixes
上级
812de070
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
47 addition
and
35 deletion
+47
-35
editor/js/Menubar.File.js
editor/js/Menubar.File.js
+16
-4
examples/js/renderers/CanvasRenderer.js
examples/js/renderers/CanvasRenderer.js
+4
-4
src/audio/Audio.js
src/audio/Audio.js
+4
-2
src/audio/AudioBuffer.js
src/audio/AudioBuffer.js
+1
-1
src/audio/AudioListener.js
src/audio/AudioListener.js
+1
-1
src/audio/PositionalAudio.js
src/audio/PositionalAudio.js
+0
-2
src/cameras/OrthographicCamera.js
src/cameras/OrthographicCamera.js
+5
-5
src/cameras/PerspectiveCamera.js
src/cameras/PerspectiveCamera.js
+5
-5
src/core/BufferGeometry.js
src/core/BufferGeometry.js
+10
-10
src/core/Geometry.js
src/core/Geometry.js
+1
-1
未找到文件。
editor/js/Menubar.File.js
浏览文件 @
611efcba
...
...
@@ -88,10 +88,14 @@ Menubar.File = function ( editor ) {
var
output
=
geometry
.
toJSON
();
try
{
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
}
catch
(
e
)
{
output
=
JSON
.
stringify
(
output
);
}
exportString
(
output
,
'
geometry.json
'
);
...
...
@@ -118,10 +122,14 @@ Menubar.File = function ( editor ) {
var
output
=
object
.
toJSON
();
try
{
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
}
catch
(
e
)
{
output
=
JSON
.
stringify
(
output
);
}
exportString
(
output
,
'
model.json
'
);
...
...
@@ -139,10 +147,14 @@ Menubar.File = function ( editor ) {
var
output
=
editor
.
scene
.
toJSON
();
try
{
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
}
catch
(
e
)
{
output
=
JSON
.
stringify
(
output
);
}
exportString
(
output
,
'
scene.json
'
);
...
...
@@ -294,12 +306,12 @@ Menubar.File = function ( editor ) {
link
.
download
=
filename
||
'
data.json
'
;
link
.
target
=
'
_blank
'
;
var
event
=
document
.
createEvent
(
"
MouseEvents
"
);
var
event
=
document
.
createEvent
(
'
MouseEvents
'
);
event
.
initMouseEvent
(
"
click
"
,
true
,
false
,
window
,
0
,
0
,
0
,
0
,
0
,
false
,
false
,
false
,
false
,
0
,
null
'
click
'
,
true
,
false
,
window
,
0
,
0
,
0
,
0
,
0
,
false
,
false
,
false
,
false
,
0
,
null
);
link
.
dispatchEvent
(
event
);
link
.
dispatchEvent
(
event
);
};
...
...
examples/js/renderers/CanvasRenderer.js
浏览文件 @
611efcba
...
...
@@ -116,7 +116,7 @@ THREE.CanvasRenderer = function ( parameters ) {
if
(
_context
.
setLineDash
===
undefined
)
{
_context
.
setLineDash
=
function
()
{}
_context
.
setLineDash
=
function
()
{}
;
}
...
...
@@ -821,7 +821,7 @@ THREE.CanvasRenderer = function ( parameters ) {
return
{
canvas
:
undefined
,
version
:
texture
.
version
}
}
;
}
...
...
@@ -832,7 +832,7 @@ THREE.CanvasRenderer = function ( parameters ) {
return
{
canvas
:
undefined
,
version
:
0
}
}
;
}
...
...
@@ -866,7 +866,7 @@ THREE.CanvasRenderer = function ( parameters ) {
return
{
canvas
:
_context
.
createPattern
(
canvas
,
repeat
),
version
:
texture
.
version
}
}
;
}
...
...
src/audio/Audio.js
浏览文件 @
611efcba
...
...
@@ -62,11 +62,13 @@ THREE.Audio.prototype.setBuffer = function ( audioBuffer ) {
var
scope
=
this
;
audioBuffer
.
onReady
(
function
(
buffer
)
{
audioBuffer
.
onReady
(
function
(
buffer
)
{
scope
.
source
.
buffer
=
buffer
;
scope
.
sourceType
=
'
buffer
'
;
if
(
scope
.
autoplay
)
scope
.
play
();
});
}
);
return
this
;
...
...
src/audio/AudioBuffer.js
浏览文件 @
611efcba
...
...
@@ -26,7 +26,7 @@ THREE.AudioBuffer.prototype.load = function ( file ) {
for
(
var
i
=
0
;
i
<
scope
.
readyCallbacks
.
length
;
i
++
)
{
scope
.
readyCallbacks
[
i
](
scope
.
buffer
);
scope
.
readyCallbacks
[
i
](
scope
.
buffer
);
}
...
...
src/audio/AudioListener.js
浏览文件 @
611efcba
...
...
@@ -37,7 +37,7 @@ THREE.AudioListener.prototype.removeFilter = function ( ) {
}
}
}
;
THREE
.
AudioListener
.
prototype
.
setFilter
=
function
(
value
)
{
...
...
src/audio/PositionalAudio.js
浏览文件 @
611efcba
...
...
@@ -20,7 +20,6 @@ THREE.PositionalAudio.prototype.getOutput = function () {
};
THREE
.
PositionalAudio
.
prototype
.
setRefDistance
=
function
(
value
)
{
this
.
panner
.
refDistance
=
value
;
...
...
@@ -69,7 +68,6 @@ THREE.PositionalAudio.prototype.getMaxDistance = function () {
};
THREE
.
PositionalAudio
.
prototype
.
updateMatrixWorld
=
(
function
()
{
var
position
=
new
THREE
.
Vector3
();
...
...
src/cameras/OrthographicCamera.js
浏览文件 @
611efcba
...
...
@@ -37,20 +37,20 @@ THREE.OrthographicCamera.prototype.updateProjectionMatrix = function () {
};
THREE
.
OrthographicCamera
.
prototype
.
copy
=
function
(
source
)
{
THREE
.
Camera
.
prototype
.
copy
.
call
(
this
,
source
);
this
.
left
=
source
.
left
;
this
.
right
=
source
.
right
;
this
.
top
=
source
.
top
;
this
.
bottom
=
source
.
bottom
;
this
.
near
=
source
.
near
;
this
.
far
=
source
.
far
;
this
.
zoom
=
source
.
zoom
;
return
this
;
};
THREE
.
OrthographicCamera
.
prototype
.
toJSON
=
function
(
meta
)
{
...
...
src/cameras/PerspectiveCamera.js
浏览文件 @
611efcba
...
...
@@ -123,18 +123,18 @@ THREE.PerspectiveCamera.prototype.updateProjectionMatrix = function () {
};
THREE
.
PerspectiveCamera
.
prototype
.
copy
=
function
(
source
)
{
THREE
.
Camera
.
prototype
.
copy
.
call
(
this
,
source
);
this
.
fov
=
source
.
fov
;
this
.
aspect
=
source
.
aspect
;
this
.
near
=
source
.
near
;
this
.
far
=
source
.
far
;
this
.
zoom
=
source
.
zoom
;
return
this
;
};
THREE
.
PerspectiveCamera
.
prototype
.
toJSON
=
function
(
meta
)
{
...
...
src/core/BufferGeometry.js
浏览文件 @
611efcba
...
...
@@ -436,16 +436,16 @@ THREE.BufferGeometry.prototype = {
if
(
geometry
.
uvsNeedUpdate
)
{
var
attribute
=
this
.
attributes
.
uv
;
var
attribute
=
this
.
attributes
.
uv
;
if
(
attribute
!==
undefined
)
{
if
(
attribute
!==
undefined
)
{
attribute
.
copyVector2sArray
(
geometry
.
uvs
);
attribute
.
needsUpdate
=
true
;
attribute
.
copyVector2sArray
(
geometry
.
uvs
);
attribute
.
needsUpdate
=
true
;
}
}
geometry
.
uvsNeedUpdate
=
false
;
geometry
.
uvsNeedUpdate
=
false
;
}
...
...
@@ -710,11 +710,11 @@ THREE.BufferGeometry.prototype = {
// reset existing normals to zero
var
normals
=
attributes
.
normal
.
array
;
var
array
=
attributes
.
normal
.
array
;
for
(
var
i
=
0
,
il
=
normals
.
length
;
i
<
il
;
i
++
)
{
for
(
var
i
=
0
,
il
=
array
.
length
;
i
<
il
;
i
++
)
{
normals
[
i
]
=
0
;
array
[
i
]
=
0
;
}
...
...
@@ -826,7 +826,7 @@ THREE.BufferGeometry.prototype = {
computeOffsets
:
function
(
size
)
{
console
.
warn
(
'
THREE.BufferGeometry: .computeOffsets() has been removed.
'
);
console
.
warn
(
'
THREE.BufferGeometry: .computeOffsets() has been removed.
'
);
},
...
...
src/core/Geometry.js
浏览文件 @
611efcba
...
...
@@ -226,7 +226,7 @@ THREE.Geometry.prototype = {
var
tempUVs
=
[];
var
tempUVs2
=
[];
for
(
var
i
=
0
,
j
=
0
;
i
<
vertices
.
length
;
i
+=
3
,
j
+=
2
)
{
for
(
var
i
=
0
,
j
=
0
;
i
<
vertices
.
length
;
i
+=
3
,
j
+=
2
)
{
scope
.
vertices
.
push
(
new
THREE
.
Vector3
(
vertices
[
i
],
vertices
[
i
+
1
],
vertices
[
i
+
2
]
)
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录