Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
2f1c268c
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,发现更多精彩内容 >>
提交
2f1c268c
编写于
5月 10, 2021
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds
上级
35eaf190
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
156 addition
and
148 deletion
+156
-148
build/three.js
build/three.js
+86
-75
build/three.min.js
build/three.min.js
+1
-1
build/three.module.js
build/three.module.js
+69
-72
未找到文件。
build/three.js
浏览文件 @
2f1c268c
...
...
@@ -1904,6 +1904,9 @@
this.depth = source.depth;
this.viewport.copy(source.viewport);
this.texture = source.texture.clone();
this.texture.image = { ...this.texture.image
}; // See #20328.
this.depthBuffer = source.depthBuffer;
this.stencilBuffer = source.stencilBuffer;
this.depthTexture = source.depthTexture;
...
...
@@ -6077,69 +6080,71 @@
let materialId = 0;
function Material() {
Object.defineProperty(this, 'id', {
value: materialId++
});
this.uuid = generateUUID();
this.name = '';
this.type = 'Material';
this.fog = true;
this.blending = NormalBlending;
this.side = FrontSide;
this.vertexColors = false;
this.opacity = 1;
this.transparent = false;
this.blendSrc = SrcAlphaFactor;
this.blendDst = OneMinusSrcAlphaFactor;
this.blendEquation = AddEquation;
this.blendSrcAlpha = null;
this.blendDstAlpha = null;
this.blendEquationAlpha = null;
this.depthFunc = LessEqualDepth;
this.depthTest = true;
this.depthWrite = true;
this.stencilWriteMask = 0xff;
this.stencilFunc = AlwaysStencilFunc;
this.stencilRef = 0;
this.stencilFuncMask = 0xff;
this.stencilFail = KeepStencilOp;
this.stencilZFail = KeepStencilOp;
this.stencilZPass = KeepStencilOp;
this.stencilWrite = false;
this.clippingPlanes = null;
this.clipIntersection = false;
this.clipShadows = false;
this.shadowSide = null;
this.colorWrite = true;
this.precision = null; // override the renderer's default precision for this material
this.polygonOffset = false;
this.polygonOffsetFactor = 0;
this.polygonOffsetUnits = 0;
this.dithering = false;
this.alphaTest = 0;
this.alphaToCoverage = false;
this.premultipliedAlpha = false;
this.visible = true;
this.toneMapped = true;
this.userData = {};
this.version = 0;
}
Material.prototype = Object.assign(Object.create(EventDispatcher.prototype), {
constructor: Material,
isMaterial: true,
onBuild: function ()
class Material extends EventDispatcher {
constructor() {
super();
Object.defineProperty(this, 'id', {
value: materialId++
});
this.uuid = generateUUID();
this.name = '';
this.type = 'Material';
this.fog = true;
this.blending = NormalBlending;
this.side = FrontSide;
this.vertexColors = false;
this.opacity = 1;
this.transparent = false;
this.blendSrc = SrcAlphaFactor;
this.blendDst = OneMinusSrcAlphaFactor;
this.blendEquation = AddEquation;
this.blendSrcAlpha = null;
this.blendDstAlpha = null;
this.blendEquationAlpha = null;
this.depthFunc = LessEqualDepth;
this.depthTest = true;
this.depthWrite = true;
this.stencilWriteMask = 0xff;
this.stencilFunc = AlwaysStencilFunc;
this.stencilRef = 0;
this.stencilFuncMask = 0xff;
this.stencilFail = KeepStencilOp;
this.stencilZFail = KeepStencilOp;
this.stencilZPass = KeepStencilOp;
this.stencilWrite = false;
this.clippingPlanes = null;
this.clipIntersection = false;
this.clipShadows = false;
this.shadowSide = null;
this.colorWrite = true;
this.precision = null; // override the renderer's default precision for this material
this.polygonOffset = false;
this.polygonOffsetFactor = 0;
this.polygonOffsetUnits = 0;
this.dithering = false;
this.alphaTest = 0;
this.alphaToCoverage = false;
this.premultipliedAlpha = false;
this.visible = true;
this.toneMapped = true;
this.userData = {};
this.version = 0;
}
onBuild()
/* shaderobject, renderer */
{},
onBeforeCompile: function ()
{}
onBeforeCompile()
/* shaderobject, renderer */
{},
customProgramCacheKey: function () {
{}
customProgramCacheKey() {
return this.onBeforeCompile.toString();
},
setValues: function (values) {
}
setValues(values) {
if (values === undefined) return;
for (const key in values) {
...
...
@@ -6172,8 +6177,9 @@
this[key] = newValue;
}
}
},
toJSON: function (meta) {
}
toJSON(meta) {
const isRoot = meta === undefined || typeof meta === 'string';
if (isRoot) {
...
...
@@ -6331,11 +6337,13 @@
}
return data;
},
clone: function () {
}
clone() {
return new this.constructor().copy(this);
},
copy: function (source) {
}
copy(source) {
this.name = source.name;
this.fog = source.fog;
this.blending = source.blending;
...
...
@@ -6389,18 +6397,21 @@
this.toneMapped = source.toneMapped;
this.userData = JSON.parse(JSON.stringify(source.userData));
return this;
},
dispose: function () {
}
dispose() {
this.dispatchEvent({
type: 'dispose'
});
}
});
Object.defineProperty(Material.prototype, 'needsUpdate', {
set: function (value) {
set needsUpdate(value) {
if (value === true) this.version++;
}
});
}
Material.prototype.isMaterial = true;
const _colorKeywords = {
'aliceblue': 0xF0F8FF,
...
...
@@ -10077,7 +10088,7 @@
const UniformsLib = {
common: {
diffuse: {
value: new Color(0x
eeeeee
)
value: new Color(0x
ffffff
)
},
opacity: {
value: 1.0
...
...
@@ -10303,7 +10314,7 @@
},
points: {
diffuse: {
value: new Color(0x
eeeeee
)
value: new Color(0x
ffffff
)
},
opacity: {
value: 1.0
...
...
@@ -10326,7 +10337,7 @@
},
sprite: {
diffuse: {
value: new Color(0x
eeeeee
)
value: new Color(0x
ffffff
)
},
opacity: {
value: 1.0
build/three.min.js
浏览文件 @
2f1c268c
此差异已折叠。
点击以展开。
build/three.module.js
浏览文件 @
2f1c268c
...
...
@@ -2514,6 +2514,7 @@ class WebGLRenderTarget extends EventDispatcher {
this.viewport.copy( source.viewport );
this.texture = source.texture.clone();
this.texture.image = { ...this.texture.image }; // See #20328.
this.depthBuffer = source.depthBuffer;
this.stencilBuffer = source.stencilBuffer;
...
...
@@ -7999,91 +8000,89 @@ class Triangle {
let materialId = 0;
function Material()
{
class Material extends EventDispatcher
{
Object.defineProperty( this, 'id', { value: materialId ++ } );
this.uuid = generateUUID();
constructor() {
this.name = '';
this.type = 'Material';
super();
this.fog = true
;
Object.defineProperty( this, 'id', { value: materialId ++ } )
;
this.blending = NormalBlending;
this.side = FrontSide;
this.vertexColors = false;
this.uuid = generateUUID();
this.opacity = 1
;
this.transparent = false
;
this.name = ''
;
this.type = 'Material'
;
this.blendSrc = SrcAlphaFactor;
this.blendDst = OneMinusSrcAlphaFactor;
this.blendEquation = AddEquation;
this.blendSrcAlpha = null;
this.blendDstAlpha = null;
this.blendEquationAlpha = null;
this.fog = true;
this.depthFunc = LessEqualDepth
;
this.depthTest = tru
e;
this.depthWrite = tru
e;
this.blending = NormalBlending
;
this.side = FrontSid
e;
this.vertexColors = fals
e;
this.stencilWriteMask = 0xff;
this.stencilFunc = AlwaysStencilFunc;
this.stencilRef = 0;
this.stencilFuncMask = 0xff;
this.stencilFail = KeepStencilOp;
this.stencilZFail = KeepStencilOp;
this.stencilZPass = KeepStencilOp;
this.stencilWrite = false;
this.opacity = 1;
this.transparent = false;
this.clippingPlanes = null;
this.clipIntersection = false;
this.clipShadows = false;
this.blendSrc = SrcAlphaFactor;
this.blendDst = OneMinusSrcAlphaFactor;
this.blendEquation = AddEquation;
this.blendSrcAlpha = null;
this.blendDstAlpha = null;
this.blendEquationAlpha = null;
this.shadowSide = null;
this.depthFunc = LessEqualDepth;
this.depthTest = true;
this.depthWrite = true;
this.colorWrite = true;
this.stencilWriteMask = 0xff;
this.stencilFunc = AlwaysStencilFunc;
this.stencilRef = 0;
this.stencilFuncMask = 0xff;
this.stencilFail = KeepStencilOp;
this.stencilZFail = KeepStencilOp;
this.stencilZPass = KeepStencilOp;
this.stencilWrite = false;
this.precision = null; // override the renderer's default precision for this material
this.clippingPlanes = null;
this.clipIntersection = false;
this.clipShadows = false;
this.polygonOffset = false;
this.polygonOffsetFactor = 0;
this.polygonOffsetUnits = 0;
this.shadowSide = null;
this.dithering = fals
e;
this.colorWrite = tru
e;
this.alphaTest = 0;
this.alphaToCoverage = false;
this.premultipliedAlpha = false;
this.precision = null; // override the renderer's default precision for this material
this.visible = true;
this.polygonOffset = false;
this.polygonOffsetFactor = 0;
this.polygonOffsetUnits = 0;
this.toneMapped = tru
e;
this.dithering = fals
e;
this.userData = {};
this.alphaTest = 0;
this.alphaToCoverage = false;
this.premultipliedAlpha = false;
this.version = 0
;
this.visible = true
;
}
this.toneMapped = true;
Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ), {
this.userData = {};
constructor: Material,
this.version = 0;
isMaterial: true,
}
onBuild
: function ( /* shaderobject, renderer */ ) {},
onBuild
( /* shaderobject, renderer */ ) {}
onBeforeCompile
: function ( /* shaderobject, renderer */ ) {},
onBeforeCompile
( /* shaderobject, renderer */ ) {}
customProgramCacheKey
: function
() {
customProgramCacheKey() {
return this.onBeforeCompile.toString();
}
,
}
setValues
: function
( values ) {
setValues( values ) {
if ( values === undefined ) return;
...
...
@@ -8132,9 +8131,9 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
}
}
,
}
toJSON
: function
( meta ) {
toJSON( meta ) {
const isRoot = ( meta === undefined || typeof meta === 'string' );
...
...
@@ -8348,15 +8347,15 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
return data;
}
,
}
clone
: function
() {
clone() {
return new this.constructor().copy( this );
}
,
}
copy
: function
( source ) {
copy( source ) {
this.name = source.name;
...
...
@@ -8433,25 +8432,23 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
return this;
}
,
}
dispose
: function
() {
dispose() {
this.dispatchEvent( { type: 'dispose' } );
}
} );
Object.defineProperty( Material.prototype, 'needsUpdate', {
set: function ( value ) {
set needsUpdate( value ) {
if ( value === true ) this.version ++;
}
} );
}
Material.prototype.isMaterial = true;
const _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF,
'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2,
...
...
@@ -13145,7 +13142,7 @@ const UniformsLib = {
common: {
diffuse: { value: new Color( 0x
eeeeee
) },
diffuse: { value: new Color( 0x
ffffff
) },
opacity: { value: 1.0 },
map: { value: null },
...
...
@@ -13322,7 +13319,7 @@ const UniformsLib = {
points: {
diffuse: { value: new Color( 0x
eeeeee
) },
diffuse: { value: new Color( 0x
ffffff
) },
opacity: { value: 1.0 },
size: { value: 1.0 },
scale: { value: 1.0 },
...
...
@@ -13334,7 +13331,7 @@ const UniformsLib = {
sprite: {
diffuse: { value: new Color( 0x
eeeeee
) },
diffuse: { value: new Color( 0x
ffffff
) },
opacity: { value: 1.0 },
center: { value: new Vector2( 0.5, 0.5 ) },
rotation: { value: 0.0 },
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录