Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
9b6bc255
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 搜索 >>
提交
9b6bc255
编写于
11月 18, 2016
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removed ObjectIdCount, MaterialIdCount and TextureIdCount. See #10095.
上级
5c42464f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
24 deletion
+17
-24
src/Three.js
src/Three.js
+2
-3
src/core/Object3D.js
src/core/Object3D.js
+5
-7
src/materials/Material.js
src/materials/Material.js
+4
-6
src/textures/Texture.js
src/textures/Texture.js
+6
-8
未找到文件。
src/Three.js
浏览文件 @
9b6bc255
...
...
@@ -27,10 +27,9 @@ export { CompressedTexture } from './textures/CompressedTexture.js';
export
{
CubeTexture
}
from
'
./textures/CubeTexture.js
'
;
export
{
CanvasTexture
}
from
'
./textures/CanvasTexture.js
'
;
export
{
DepthTexture
}
from
'
./textures/DepthTexture.js
'
;
export
{
Texture
IdCount
,
Texture
}
from
'
./textures/Texture.js
'
;
export
{
Texture
}
from
'
./textures/Texture.js
'
;
export
*
from
'
./geometries/Geometries.js
'
;
export
*
from
'
./materials/Materials.js
'
;
export
{
MaterialIdCount
}
from
'
./materials/Material.js
'
;
export
{
CompressedTextureLoader
}
from
'
./loaders/CompressedTextureLoader.js
'
;
export
{
BinaryTextureLoader
,
DataTextureLoader
}
from
'
./loaders/BinaryTextureLoader.js
'
;
export
{
CubeTextureLoader
}
from
'
./loaders/CubeTextureLoader.js
'
;
...
...
@@ -100,7 +99,7 @@ export {
BufferAttribute
}
from
'
./core/BufferAttribute.js
'
;
export
{
Face3
}
from
'
./core/Face3.js
'
;
export
{
Object3D
IdCount
,
Object3D
}
from
'
./core/Object3D.js
'
;
export
{
Object3D
}
from
'
./core/Object3D.js
'
;
export
{
Raycaster
}
from
'
./core/Raycaster.js
'
;
export
{
Layers
}
from
'
./core/Layers.js
'
;
export
{
EventDispatcher
}
from
'
./core/EventDispatcher.js
'
;
...
...
src/core/Object3D.js
浏览文件 @
9b6bc255
...
...
@@ -15,9 +15,11 @@ import { _Math } from '../math/Math';
* @author elephantatwork / www.elephantatwork.ch
*/
var
object3DId
=
0
;
function
Object3D
()
{
Object
.
defineProperty
(
this
,
'
id
'
,
{
value
:
Object3DIdCount
()
}
);
Object
.
defineProperty
(
this
,
'
id
'
,
{
value
:
object3DId
++
}
);
this
.
uuid
=
_Math
.
generateUUID
();
...
...
@@ -91,7 +93,7 @@ function Object3D() {
this
.
userData
=
{};
this
.
onBeforeRender
=
function
(){};
this
.
onBeforeRender
=
function
(){};
this
.
onAfterRender
=
function
(){};
}
...
...
@@ -727,8 +729,4 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
}
);
var
count
=
0
;
function
Object3DIdCount
()
{
return
count
++
;
};
export
{
Object3DIdCount
,
Object3D
};
export
{
Object3D
};
src/materials/Material.js
浏览文件 @
9b6bc255
...
...
@@ -7,9 +7,11 @@ import { _Math } from '../math/Math';
* @author alteredq / http://alteredqualia.com/
*/
var
materialId
=
0
;
function
Material
()
{
Object
.
defineProperty
(
this
,
'
id
'
,
{
value
:
MaterialIdCount
()
}
);
Object
.
defineProperty
(
this
,
'
id
'
,
{
value
:
materialId
++
}
);
this
.
uuid
=
_Math
.
generateUUID
();
...
...
@@ -342,8 +344,4 @@ Material.prototype = {
Object
.
assign
(
Material
.
prototype
,
EventDispatcher
.
prototype
);
var
count
=
0
;
function
MaterialIdCount
()
{
return
count
++
;
};
export
{
MaterialIdCount
,
Material
};
export
{
Material
};
src/textures/Texture.js
浏览文件 @
9b6bc255
...
...
@@ -10,9 +10,11 @@ import { Vector2 } from '../math/Vector2';
* @author szimek / https://github.com/szimek/
*/
var
textureId
=
0
;
function
Texture
(
image
,
mapping
,
wrapS
,
wrapT
,
magFilter
,
minFilter
,
format
,
type
,
anisotropy
,
encoding
)
{
Object
.
defineProperty
(
this
,
'
id
'
,
{
value
:
TextureIdCount
()
}
);
Object
.
defineProperty
(
this
,
'
id
'
,
{
value
:
textureId
++
}
);
this
.
uuid
=
_Math
.
generateUUID
();
...
...
@@ -47,7 +49,7 @@ function Texture( image, mapping, wrapS, wrapT, magFilter, minFilter, format, ty
//
// Also changing the encoding after already used by a Material will not automatically make the Material
// update. You need to explicitly call Material.needsUpdate to trigger it to recompile.
this
.
encoding
=
encoding
!==
undefined
?
encoding
:
LinearEncoding
;
this
.
encoding
=
encoding
!==
undefined
?
encoding
:
LinearEncoding
;
this
.
version
=
0
;
this
.
onUpdate
=
null
;
...
...
@@ -206,7 +208,7 @@ Texture.prototype = {
transformUv
:
function
(
uv
)
{
if
(
this
.
mapping
!==
UVMapping
)
return
;
if
(
this
.
mapping
!==
UVMapping
)
return
;
uv
.
multiply
(
this
.
repeat
);
uv
.
add
(
this
.
offset
);
...
...
@@ -285,8 +287,4 @@ Texture.prototype = {
Object
.
assign
(
Texture
.
prototype
,
EventDispatcher
.
prototype
);
var
count
=
0
;
function
TextureIdCount
()
{
return
count
++
;
};
export
{
TextureIdCount
,
Texture
};
export
{
Texture
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录