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 ) {
...
@@ -88,10 +88,14 @@ Menubar.File = function ( editor ) {
var
output
=
geometry
.
toJSON
();
var
output
=
geometry
.
toJSON
();
try
{
try
{
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
}
catch
(
e
)
{
}
catch
(
e
)
{
output
=
JSON
.
stringify
(
output
);
output
=
JSON
.
stringify
(
output
);
}
}
exportString
(
output
,
'
geometry.json
'
);
exportString
(
output
,
'
geometry.json
'
);
...
@@ -118,10 +122,14 @@ Menubar.File = function ( editor ) {
...
@@ -118,10 +122,14 @@ Menubar.File = function ( editor ) {
var
output
=
object
.
toJSON
();
var
output
=
object
.
toJSON
();
try
{
try
{
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
}
catch
(
e
)
{
}
catch
(
e
)
{
output
=
JSON
.
stringify
(
output
);
output
=
JSON
.
stringify
(
output
);
}
}
exportString
(
output
,
'
model.json
'
);
exportString
(
output
,
'
model.json
'
);
...
@@ -139,10 +147,14 @@ Menubar.File = function ( editor ) {
...
@@ -139,10 +147,14 @@ Menubar.File = function ( editor ) {
var
output
=
editor
.
scene
.
toJSON
();
var
output
=
editor
.
scene
.
toJSON
();
try
{
try
{
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
JSON
.
stringify
(
output
,
null
,
'
\t
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
output
=
output
.
replace
(
/
[\n\t]
+
([\d\.
e
\-\[\]]
+
)
/g
,
'
$1
'
);
}
catch
(
e
)
{
}
catch
(
e
)
{
output
=
JSON
.
stringify
(
output
);
output
=
JSON
.
stringify
(
output
);
}
}
exportString
(
output
,
'
scene.json
'
);
exportString
(
output
,
'
scene.json
'
);
...
@@ -294,12 +306,12 @@ Menubar.File = function ( editor ) {
...
@@ -294,12 +306,12 @@ Menubar.File = function ( editor ) {
link
.
download
=
filename
||
'
data.json
'
;
link
.
download
=
filename
||
'
data.json
'
;
link
.
target
=
'
_blank
'
;
link
.
target
=
'
_blank
'
;
var
event
=
document
.
createEvent
(
"
MouseEvents
"
);
var
event
=
document
.
createEvent
(
'
MouseEvents
'
);
event
.
initMouseEvent
(
event
.
initMouseEvent
(
"
click
"
,
true
,
false
,
window
,
0
,
0
,
0
,
0
,
0
'
click
'
,
true
,
false
,
window
,
0
,
0
,
0
,
0
,
0
,
,
false
,
false
,
false
,
false
,
0
,
null
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 ) {
...
@@ -116,7 +116,7 @@ THREE.CanvasRenderer = function ( parameters ) {
if
(
_context
.
setLineDash
===
undefined
)
{
if
(
_context
.
setLineDash
===
undefined
)
{
_context
.
setLineDash
=
function
()
{}
_context
.
setLineDash
=
function
()
{}
;
}
}
...
@@ -821,7 +821,7 @@ THREE.CanvasRenderer = function ( parameters ) {
...
@@ -821,7 +821,7 @@ THREE.CanvasRenderer = function ( parameters ) {
return
{
return
{
canvas
:
undefined
,
canvas
:
undefined
,
version
:
texture
.
version
version
:
texture
.
version
}
}
;
}
}
...
@@ -832,7 +832,7 @@ THREE.CanvasRenderer = function ( parameters ) {
...
@@ -832,7 +832,7 @@ THREE.CanvasRenderer = function ( parameters ) {
return
{
return
{
canvas
:
undefined
,
canvas
:
undefined
,
version
:
0
version
:
0
}
}
;
}
}
...
@@ -866,7 +866,7 @@ THREE.CanvasRenderer = function ( parameters ) {
...
@@ -866,7 +866,7 @@ THREE.CanvasRenderer = function ( parameters ) {
return
{
return
{
canvas
:
_context
.
createPattern
(
canvas
,
repeat
),
canvas
:
_context
.
createPattern
(
canvas
,
repeat
),
version
:
texture
.
version
version
:
texture
.
version
}
}
;
}
}
...
...
src/audio/Audio.js
浏览文件 @
611efcba
...
@@ -62,11 +62,13 @@ THREE.Audio.prototype.setBuffer = function ( audioBuffer ) {
...
@@ -62,11 +62,13 @@ THREE.Audio.prototype.setBuffer = function ( audioBuffer ) {
var
scope
=
this
;
var
scope
=
this
;
audioBuffer
.
onReady
(
function
(
buffer
)
{
audioBuffer
.
onReady
(
function
(
buffer
)
{
scope
.
source
.
buffer
=
buffer
;
scope
.
source
.
buffer
=
buffer
;
scope
.
sourceType
=
'
buffer
'
;
scope
.
sourceType
=
'
buffer
'
;
if
(
scope
.
autoplay
)
scope
.
play
();
if
(
scope
.
autoplay
)
scope
.
play
();
});
}
);
return
this
;
return
this
;
...
...
src/audio/AudioBuffer.js
浏览文件 @
611efcba
...
@@ -26,7 +26,7 @@ THREE.AudioBuffer.prototype.load = function ( file ) {
...
@@ -26,7 +26,7 @@ THREE.AudioBuffer.prototype.load = function ( file ) {
for
(
var
i
=
0
;
i
<
scope
.
readyCallbacks
.
length
;
i
++
)
{
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 ( ) {
...
@@ -37,7 +37,7 @@ THREE.AudioListener.prototype.removeFilter = function ( ) {
}
}
}
}
;
THREE
.
AudioListener
.
prototype
.
setFilter
=
function
(
value
)
{
THREE
.
AudioListener
.
prototype
.
setFilter
=
function
(
value
)
{
...
...
src/audio/PositionalAudio.js
浏览文件 @
611efcba
...
@@ -20,7 +20,6 @@ THREE.PositionalAudio.prototype.getOutput = function () {
...
@@ -20,7 +20,6 @@ THREE.PositionalAudio.prototype.getOutput = function () {
};
};
THREE
.
PositionalAudio
.
prototype
.
setRefDistance
=
function
(
value
)
{
THREE
.
PositionalAudio
.
prototype
.
setRefDistance
=
function
(
value
)
{
this
.
panner
.
refDistance
=
value
;
this
.
panner
.
refDistance
=
value
;
...
@@ -69,7 +68,6 @@ THREE.PositionalAudio.prototype.getMaxDistance = function () {
...
@@ -69,7 +68,6 @@ THREE.PositionalAudio.prototype.getMaxDistance = function () {
};
};
THREE
.
PositionalAudio
.
prototype
.
updateMatrixWorld
=
(
function
()
{
THREE
.
PositionalAudio
.
prototype
.
updateMatrixWorld
=
(
function
()
{
var
position
=
new
THREE
.
Vector3
();
var
position
=
new
THREE
.
Vector3
();
...
...
src/cameras/OrthographicCamera.js
浏览文件 @
611efcba
...
@@ -37,20 +37,20 @@ THREE.OrthographicCamera.prototype.updateProjectionMatrix = function () {
...
@@ -37,20 +37,20 @@ THREE.OrthographicCamera.prototype.updateProjectionMatrix = function () {
};
};
THREE
.
OrthographicCamera
.
prototype
.
copy
=
function
(
source
)
{
THREE
.
OrthographicCamera
.
prototype
.
copy
=
function
(
source
)
{
THREE
.
Camera
.
prototype
.
copy
.
call
(
this
,
source
);
THREE
.
Camera
.
prototype
.
copy
.
call
(
this
,
source
);
this
.
left
=
source
.
left
;
this
.
left
=
source
.
left
;
this
.
right
=
source
.
right
;
this
.
right
=
source
.
right
;
this
.
top
=
source
.
top
;
this
.
top
=
source
.
top
;
this
.
bottom
=
source
.
bottom
;
this
.
bottom
=
source
.
bottom
;
this
.
near
=
source
.
near
;
this
.
near
=
source
.
near
;
this
.
far
=
source
.
far
;
this
.
far
=
source
.
far
;
this
.
zoom
=
source
.
zoom
;
this
.
zoom
=
source
.
zoom
;
return
this
;
return
this
;
};
};
THREE
.
OrthographicCamera
.
prototype
.
toJSON
=
function
(
meta
)
{
THREE
.
OrthographicCamera
.
prototype
.
toJSON
=
function
(
meta
)
{
...
...
src/cameras/PerspectiveCamera.js
浏览文件 @
611efcba
...
@@ -123,18 +123,18 @@ THREE.PerspectiveCamera.prototype.updateProjectionMatrix = function () {
...
@@ -123,18 +123,18 @@ THREE.PerspectiveCamera.prototype.updateProjectionMatrix = function () {
};
};
THREE
.
PerspectiveCamera
.
prototype
.
copy
=
function
(
source
)
{
THREE
.
PerspectiveCamera
.
prototype
.
copy
=
function
(
source
)
{
THREE
.
Camera
.
prototype
.
copy
.
call
(
this
,
source
);
THREE
.
Camera
.
prototype
.
copy
.
call
(
this
,
source
);
this
.
fov
=
source
.
fov
;
this
.
fov
=
source
.
fov
;
this
.
aspect
=
source
.
aspect
;
this
.
aspect
=
source
.
aspect
;
this
.
near
=
source
.
near
;
this
.
near
=
source
.
near
;
this
.
far
=
source
.
far
;
this
.
far
=
source
.
far
;
this
.
zoom
=
source
.
zoom
;
this
.
zoom
=
source
.
zoom
;
return
this
;
return
this
;
};
};
THREE
.
PerspectiveCamera
.
prototype
.
toJSON
=
function
(
meta
)
{
THREE
.
PerspectiveCamera
.
prototype
.
toJSON
=
function
(
meta
)
{
...
...
src/core/BufferGeometry.js
浏览文件 @
611efcba
...
@@ -436,16 +436,16 @@ THREE.BufferGeometry.prototype = {
...
@@ -436,16 +436,16 @@ THREE.BufferGeometry.prototype = {
if
(
geometry
.
uvsNeedUpdate
)
{
if
(
geometry
.
uvsNeedUpdate
)
{
var
attribute
=
this
.
attributes
.
uv
;
var
attribute
=
this
.
attributes
.
uv
;
if
(
attribute
!==
undefined
)
{
if
(
attribute
!==
undefined
)
{
attribute
.
copyVector2sArray
(
geometry
.
uvs
);
attribute
.
copyVector2sArray
(
geometry
.
uvs
);
attribute
.
needsUpdate
=
true
;
attribute
.
needsUpdate
=
true
;
}
}
geometry
.
uvsNeedUpdate
=
false
;
geometry
.
uvsNeedUpdate
=
false
;
}
}
...
@@ -710,11 +710,11 @@ THREE.BufferGeometry.prototype = {
...
@@ -710,11 +710,11 @@ THREE.BufferGeometry.prototype = {
// reset existing normals to zero
// 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 = {
...
@@ -826,7 +826,7 @@ THREE.BufferGeometry.prototype = {
computeOffsets
:
function
(
size
)
{
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 = {
...
@@ -226,7 +226,7 @@ THREE.Geometry.prototype = {
var
tempUVs
=
[];
var
tempUVs
=
[];
var
tempUVs2
=
[];
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
]
)
);
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录