Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
8360b2ec
T
three.js
项目概览
车家大少爷
/
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,发现更多精彩内容 >>
提交
8360b2ec
编写于
3月 20, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
ce14abbf
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
386 addition
and
348 deletion
+386
-348
build/three.js
build/three.js
+56
-17
build/three.min.js
build/three.min.js
+330
-331
未找到文件。
build/three.js
浏览文件 @
8360b2ec
...
...
@@ -12739,10 +12739,21 @@ THREE.Mesh = function ( geometry, material ) {
THREE.Object3D.call( this );
this.geometry = geometry;
this.material = ( material !== undefined ) ? material : new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, wireframe: true } );
this.geometry = null;
this.material = null;
this.setGeometry( geometry );
this.setMaterial( material );
};
THREE.Mesh.prototype = Object.create( THREE.Object3D.prototype );
THREE.Mesh.prototype.setGeometry = function ( geometry ) {
if ( this.geometry !== undefined ) {
if ( geometry !== undefined ) {
this.geometry = geometry;
if ( this.geometry.boundingSphere === null ) {
...
...
@@ -12756,7 +12767,19 @@ THREE.Mesh = function ( geometry, material ) {
};
THREE.Mesh.prototype = Object.create( THREE.Object3D.prototype );
THREE.Mesh.prototype.setMaterial = function ( material ) {
if ( material !== undefined ) {
this.material = material;
} else {
this.material = new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, wireframe: true } );
}
};
THREE.Mesh.prototype.updateMorphTargets = function () {
...
...
@@ -22579,7 +22602,23 @@ THREE.WebGLRenderer = function ( parameters ) {
for ( var o = 0, ol = scene.__webglObjects.length; o < ol; o ++ ) {
updateObject( scene.__webglObjects[ o ].object );
var object = scene.__webglObjects[ o ].object;
// TODO: Remove this hack (WebGLRenderer refactoring)
if ( object.__webglInit === undefined ) {
if ( object.__webglActive !== undefined ) {
removeObject( object, scene );
}
addObject( object, scene );
}
updateObject( object );
}
...
...
@@ -22587,11 +22626,11 @@ THREE.WebGLRenderer = function ( parameters ) {
// Objects adding
function addObject
( object, scene ) {
function addObject( object, scene ) {
var g, geometry, material, geometryGroup;
if (
! object.__webglInit
) {
if (
object.__webglInit === undefined
) {
object.__webglInit = true;
...
...
@@ -22692,7 +22731,7 @@ THREE.WebGLRenderer = function ( parameters ) {
}
if (
! object.__webglActive
) {
if (
object.__webglActive === undefined
) {
if ( object instanceof THREE.Mesh ) {
...
...
@@ -22741,7 +22780,7 @@ THREE.WebGLRenderer = function ( parameters ) {
};
function addBuffer
( objlist, buffer, object ) {
function addBuffer( objlist, buffer, object ) {
objlist.push(
{
...
...
@@ -22754,7 +22793,7 @@ THREE.WebGLRenderer = function ( parameters ) {
};
function addBufferImmediate
( objlist, object ) {
function addBufferImmediate( objlist, object ) {
objlist.push(
{
...
...
@@ -22768,7 +22807,7 @@ THREE.WebGLRenderer = function ( parameters ) {
// Objects updates
function updateObject
( object ) {
function updateObject( object ) {
var geometry = object.geometry,
geometryGroup, customAttributesDirty, material;
...
...
@@ -22877,7 +22916,7 @@ THREE.WebGLRenderer = function ( parameters ) {
// Objects updates - custom attributes check
function areCustomAttributesDirty
( material ) {
function areCustomAttributesDirty( material ) {
for ( var a in material.attributes ) {
...
...
@@ -22889,7 +22928,7 @@ THREE.WebGLRenderer = function ( parameters ) {
};
function clearCustomAttributes
( material ) {
function clearCustomAttributes( material ) {
for ( var a in material.attributes ) {
...
...
@@ -22901,7 +22940,7 @@ THREE.WebGLRenderer = function ( parameters ) {
// Objects removal
function removeObject
( object, scene ) {
function removeObject( object, scene ) {
if ( object instanceof THREE.Mesh ||
object instanceof THREE.ParticleSystem ||
...
...
@@ -22924,11 +22963,11 @@ THREE.WebGLRenderer = function ( parameters ) {
}
object.__webglActive = fals
e;
delete object.__webglActiv
e;
};
function removeInstances
( objlist, object ) {
function removeInstances( objlist, object ) {
for ( var o = objlist.length - 1; o >= 0; o -- ) {
...
...
@@ -22942,7 +22981,7 @@ THREE.WebGLRenderer = function ( parameters ) {
};
function removeInstancesDirect
( objlist, object ) {
function removeInstancesDirect( objlist, object ) {
for ( var o = objlist.length - 1; o >= 0; o -- ) {
...
...
build/three.min.js
浏览文件 @
8360b2ec
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录