Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
ac34b11a
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 搜索 >>
提交
ac34b11a
编写于
12月 01, 2017
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
d2d91d29
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
828 addition
and
746 deletion
+828
-746
build/three.js
build/three.js
+72
-31
build/three.min.js
build/three.min.js
+684
-684
build/three.module.js
build/three.module.js
+72
-31
未找到文件。
build/three.js
浏览文件 @
ac34b11a
...
...
@@ -325,19 +325,27 @@
// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136
var lut = []; for (var i=0; i<256; i++) { lut[i] = (i<16?'0':'')+(i).toString(16).toUpperCase(); }
var lut = [];
for ( var i = 0; i < 256; i ++ ) {
lut[ i ] = ( i < 16 ? '0' : '' ) + ( i ).toString( 16 ).toUpperCase();
return function () {
var d0 = Math.random()*0xffffffff|0;
var d1 = Math.random()*0xffffffff|0;
var d2 = Math.random()*0xffffffff|0;
var d3 = Math.random()*0xffffffff|0;
return lut[d0&0xff]+lut[d0>>8&0xff]+lut[d0>>16&0xff]+lut[d0>>24&0xff]+'-'+
lut[d1&0xff]+lut[d1>>8&0xff]+'-'+lut[d1>>16&0x0f|0x40]+lut[d1>>24&0xff]+'-'+
lut[d2&0x3f|0x80]+lut[d2>>8&0xff]+'-'+lut[d2>>16&0xff]+lut[d2>>24&0xff]+
lut[d3&0xff]+lut[d3>>8&0xff]+lut[d3>>16&0xff]+lut[d3>>24&0xff];
}
return function () {
var d0 = Math.random() * 0xffffffff | 0;
var d1 = Math.random() * 0xffffffff | 0;
var d2 = Math.random() * 0xffffffff | 0;
var d3 = Math.random() * 0xffffffff | 0;
return lut[ d0 & 0xff ] + lut[ d0 >> 8 & 0xff ] + lut[ d0 >> 16 & 0xff ] + lut[ d0 >> 24 & 0xff ] + '-' +
lut[ d1 & 0xff ] + lut[ d1 >> 8 & 0xff ] + '-' + lut[ d1 >> 16 & 0x0f | 0x40 ] + lut[ d1 >> 24 & 0xff ] + '-' +
lut[ d2 & 0x3f | 0x80 ] + lut[ d2 >> 8 & 0xff ] + '-' + lut[ d2 >> 16 & 0xff ] + lut[ d2 >> 24 & 0xff ] +
lut[ d3 & 0xff ] + lut[ d3 >> 8 & 0xff ] + lut[ d3 >> 16 & 0xff ] + lut[ d3 >> 24 & 0xff ];
};
} )(),
clamp: function ( value, min, max ) {
...
...
@@ -18435,6 +18443,7 @@
function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, infoMemory ) {
var _isWebGL2 = ( typeof WebGL2RenderingContext !== 'undefined' && _gl instanceof window.WebGL2RenderingContext );
var _videoTextures = {};
//
...
...
@@ -18529,8 +18538,13 @@
deallocateTexture( texture );
infoMemory.textures --;
if ( texture.isVideoTexture ) {
delete _videoTextures[ texture.id ];
}
infoMemory.textures --;
}
...
...
@@ -18832,6 +18846,12 @@
textureProperties.__webglTexture = _gl.createTexture();
if ( texture.isVideoTexture ) {
_videoTextures[ texture.id ] = texture;
}
infoMemory.textures ++;
}
...
...
@@ -19213,11 +19233,22 @@
}
function updateVideoTextures() {
for ( var id in _videoTextures ) {
_videoTextures[ id ].update();
}
}
this.setTexture2D = setTexture2D;
this.setTextureCube = setTextureCube;
this.setTextureCubeDynamic = setTextureCubeDynamic;
this.setupRenderTarget = setupRenderTarget;
this.updateRenderTargetMipmap = updateRenderTargetMipmap;
this.updateVideoTextures = updateVideoTextures;
}
...
...
@@ -21168,7 +21199,8 @@
_stencil = parameters.stencil !== undefined ? parameters.stencil : true,
_antialias = parameters.antialias !== undefined ? parameters.antialias : false,
_premultipliedAlpha = parameters.premultipliedAlpha !== undefined ? parameters.premultipliedAlpha : true,
_preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false;
_preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false,
_powerPreference = parameters.powerPreference !== undefined ? parameters.powerPreference : 'default';
var lightsArray = [];
var shadowsArray = [];
...
...
@@ -21314,9 +21346,15 @@
stencil: _stencil,
antialias: _antialias,
premultipliedAlpha: _premultipliedAlpha,
preserveDrawingBuffer: _preserveDrawingBuffer
preserveDrawingBuffer: _preserveDrawingBuffer,
powerPreference: _powerPreference
};
// event listeners must be registered before WebGL context is created, see #12753
_canvas.addEventListener( 'webglcontextlost', onContextLost, false );
_canvas.addEventListener( 'webglcontextrestored', onContextRestore, false );
_gl = _context || _canvas.getContext( 'webgl', contextAttributes ) || _canvas.getContext( 'experimental-webgl', contextAttributes );
if ( _gl === null ) {
...
...
@@ -21345,9 +21383,6 @@
}
_canvas.addEventListener( 'webglcontextlost', onContextLost, false );
_canvas.addEventListener( 'webglcontextrestored', onContextRestore, false );
} catch ( error ) {
console.error( 'THREE.WebGLRenderer: ' + error );
...
...
@@ -22239,6 +22274,10 @@
//
textures.updateVideoTextures();
//
if ( _clippingEnabled ) _clipping.beginShadows();
shadowMap.render( shadowsArray, scene, camera );
...
...
@@ -25019,7 +25058,9 @@
Group.prototype = Object.assign( Object.create( Object3D.prototype ), {
constructor: Group
constructor: Group,
isGroup: true
} );
...
...
@@ -25032,29 +25073,29 @@
Texture.call( this, video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
this.generateMipmaps = false;
this.needsUpdate = true;
var scope = this;
}
function update()
{
VideoTexture.prototype = Object.assign( Object.create( Texture.prototype ),
{
var video = scope.image;
constructor: VideoTexture,
if ( video.readyState >= video.HAVE_CURRENT_DATA ) {
isVideoTexture: true,
scope.needsUpdate = true;
update: function () {
}
var video = this.image;
requestAnimationFrame( update );
if ( video.readyState >= video.HAVE_CURRENT_DATA ) {
}
this.needsUpdate = true;
requestAnimationFrame( update );
}
}
}
VideoTexture.prototype = Object.create( Texture.prototype );
VideoTexture.prototype.constructor = VideoTexture;
} );
/**
* @author alteredq / http://alteredqualia.com/
...
...
@@ -28203,7 +28244,7 @@
this.setIndex( indicesArray );
this.addAttribute( 'position', new Float32BufferAttribute( verticesArray, 3 ) );
this.addAttribute( 'uv', new Float32BufferAttribute(
options.arrays.uv
, 2 ) );
this.addAttribute( 'uv', new Float32BufferAttribute(
uvArray
, 2 ) );
}
...
...
@@ -44809,7 +44850,7 @@
Object.defineProperties( WebVRManager.prototype, {
standing: {
set: function (
value
) {
set: function (
/* value */
) {
console.warn( 'THREE.WebVRManager: .standing has been removed.' );
build/three.min.js
浏览文件 @
ac34b11a
此差异已折叠。
点击以展开。
build/three.module.js
浏览文件 @
ac34b11a
...
...
@@ -319,19 +319,27 @@ var _Math = {
// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136
var lut = []; for (var i=0; i<256; i++) { lut[i] = (i<16?'0':'')+(i).toString(16).toUpperCase(); }
var lut = [];
for ( var i = 0; i < 256; i ++ ) {
lut[ i ] = ( i < 16 ? '0' : '' ) + ( i ).toString( 16 ).toUpperCase();
return function () {
var d0 = Math.random()*0xffffffff|0;
var d1 = Math.random()*0xffffffff|0;
var d2 = Math.random()*0xffffffff|0;
var d3 = Math.random()*0xffffffff|0;
return lut[d0&0xff]+lut[d0>>8&0xff]+lut[d0>>16&0xff]+lut[d0>>24&0xff]+'-'+
lut[d1&0xff]+lut[d1>>8&0xff]+'-'+lut[d1>>16&0x0f|0x40]+lut[d1>>24&0xff]+'-'+
lut[d2&0x3f|0x80]+lut[d2>>8&0xff]+'-'+lut[d2>>16&0xff]+lut[d2>>24&0xff]+
lut[d3&0xff]+lut[d3>>8&0xff]+lut[d3>>16&0xff]+lut[d3>>24&0xff];
}
return function () {
var d0 = Math.random() * 0xffffffff | 0;
var d1 = Math.random() * 0xffffffff | 0;
var d2 = Math.random() * 0xffffffff | 0;
var d3 = Math.random() * 0xffffffff | 0;
return lut[ d0 & 0xff ] + lut[ d0 >> 8 & 0xff ] + lut[ d0 >> 16 & 0xff ] + lut[ d0 >> 24 & 0xff ] + '-' +
lut[ d1 & 0xff ] + lut[ d1 >> 8 & 0xff ] + '-' + lut[ d1 >> 16 & 0x0f | 0x40 ] + lut[ d1 >> 24 & 0xff ] + '-' +
lut[ d2 & 0x3f | 0x80 ] + lut[ d2 >> 8 & 0xff ] + '-' + lut[ d2 >> 16 & 0xff ] + lut[ d2 >> 24 & 0xff ] +
lut[ d3 & 0xff ] + lut[ d3 >> 8 & 0xff ] + lut[ d3 >> 16 & 0xff ] + lut[ d3 >> 24 & 0xff ];
};
} )(),
clamp: function ( value, min, max ) {
...
...
@@ -18429,6 +18437,7 @@ function WebGLPrograms( renderer, extensions, capabilities ) {
function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, infoMemory ) {
var _isWebGL2 = ( typeof WebGL2RenderingContext !== 'undefined' && _gl instanceof window.WebGL2RenderingContext );
var _videoTextures = {};
//
...
...
@@ -18523,8 +18532,13 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
deallocateTexture( texture );
infoMemory.textures --;
if ( texture.isVideoTexture ) {
delete _videoTextures[ texture.id ];
}
infoMemory.textures --;
}
...
...
@@ -18826,6 +18840,12 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
textureProperties.__webglTexture = _gl.createTexture();
if ( texture.isVideoTexture ) {
_videoTextures[ texture.id ] = texture;
}
infoMemory.textures ++;
}
...
...
@@ -19207,11 +19227,22 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
}
function updateVideoTextures() {
for ( var id in _videoTextures ) {
_videoTextures[ id ].update();
}
}
this.setTexture2D = setTexture2D;
this.setTextureCube = setTextureCube;
this.setTextureCubeDynamic = setTextureCubeDynamic;
this.setupRenderTarget = setupRenderTarget;
this.updateRenderTargetMipmap = updateRenderTargetMipmap;
this.updateVideoTextures = updateVideoTextures;
}
...
...
@@ -21162,7 +21193,8 @@ function WebGLRenderer( parameters ) {
_stencil = parameters.stencil !== undefined ? parameters.stencil : true,
_antialias = parameters.antialias !== undefined ? parameters.antialias : false,
_premultipliedAlpha = parameters.premultipliedAlpha !== undefined ? parameters.premultipliedAlpha : true,
_preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false;
_preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false,
_powerPreference = parameters.powerPreference !== undefined ? parameters.powerPreference : 'default';
var lightsArray = [];
var shadowsArray = [];
...
...
@@ -21308,9 +21340,15 @@ function WebGLRenderer( parameters ) {
stencil: _stencil,
antialias: _antialias,
premultipliedAlpha: _premultipliedAlpha,
preserveDrawingBuffer: _preserveDrawingBuffer
preserveDrawingBuffer: _preserveDrawingBuffer,
powerPreference: _powerPreference
};
// event listeners must be registered before WebGL context is created, see #12753
_canvas.addEventListener( 'webglcontextlost', onContextLost, false );
_canvas.addEventListener( 'webglcontextrestored', onContextRestore, false );
_gl = _context || _canvas.getContext( 'webgl', contextAttributes ) || _canvas.getContext( 'experimental-webgl', contextAttributes );
if ( _gl === null ) {
...
...
@@ -21339,9 +21377,6 @@ function WebGLRenderer( parameters ) {
}
_canvas.addEventListener( 'webglcontextlost', onContextLost, false );
_canvas.addEventListener( 'webglcontextrestored', onContextRestore, false );
} catch ( error ) {
console.error( 'THREE.WebGLRenderer: ' + error );
...
...
@@ -22233,6 +22268,10 @@ function WebGLRenderer( parameters ) {
//
textures.updateVideoTextures();
//
if ( _clippingEnabled ) _clipping.beginShadows();
shadowMap.render( shadowsArray, scene, camera );
...
...
@@ -25013,7 +25052,9 @@ function Group() {
Group.prototype = Object.assign( Object.create( Object3D.prototype ), {
constructor: Group
constructor: Group,
isGroup: true
} );
...
...
@@ -25026,29 +25067,29 @@ function VideoTexture( video, mapping, wrapS, wrapT, magFilter, minFilter, forma
Texture.call( this, video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
this.generateMipmaps = false;
this.needsUpdate = true;
var scope = this;
}
function update()
{
VideoTexture.prototype = Object.assign( Object.create( Texture.prototype ),
{
var video = scope.image;
constructor: VideoTexture,
if ( video.readyState >= video.HAVE_CURRENT_DATA ) {
isVideoTexture: true,
scope.needsUpdate = true;
update: function () {
}
var video = this.image;
requestAnimationFrame( update );
if ( video.readyState >= video.HAVE_CURRENT_DATA ) {
}
this.needsUpdate = true;
requestAnimationFrame( update );
}
}
}
VideoTexture.prototype = Object.create( Texture.prototype );
VideoTexture.prototype.constructor = VideoTexture;
} );
/**
* @author alteredq / http://alteredqualia.com/
...
...
@@ -28197,7 +28238,7 @@ ExtrudeBufferGeometry.prototype.addShape = function ( shape, options ) {
this.setIndex( indicesArray );
this.addAttribute( 'position', new Float32BufferAttribute( verticesArray, 3 ) );
this.addAttribute( 'uv', new Float32BufferAttribute(
options.arrays.uv
, 2 ) );
this.addAttribute( 'uv', new Float32BufferAttribute(
uvArray
, 2 ) );
}
...
...
@@ -44803,7 +44844,7 @@ Object.assign( WebVRManager.prototype, {
Object.defineProperties( WebVRManager.prototype, {
standing: {
set: function (
value
) {
set: function (
/* value */
) {
console.warn( 'THREE.WebVRManager: .standing has been removed.' );
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录