提交 90bd8e03 编写于 作者: M Mr.doob

Updated builds.

上级 14a98f92
......@@ -1561,6 +1561,19 @@ THREE.Vector2.prototype = {
},
fromAttribute: function ( attribute, index, offset ) {
if ( offset === undefined ) offset = 0;
index = index * attribute.itemSize + offset;
this.x = attribute.array[ index ];
this.y = attribute.array[ index + 1 ];
return this;
},
clone: function () {
return new THREE.Vector2( this.x, this.y );
......@@ -2382,6 +2395,20 @@ THREE.Vector3.prototype = {
},
fromAttribute: function ( attribute, index, offset ) {
if ( offset === undefined ) offset = 0;
index = index * attribute.itemSize + offset;
this.x = attribute.array[ index ];
this.y = attribute.array[ index + 1 ];
this.z = attribute.array[ index + 2 ];
return this;
},
clone: function () {
return new THREE.Vector3( this.x, this.y, this.z );
......@@ -3042,6 +3069,21 @@ THREE.Vector4.prototype = {
},
fromAttribute: function ( attribute, index, offset ) {
if ( offset === undefined ) offset = 0;
index = index * attribute.itemSize + offset;
this.x = attribute.array[ index ];
this.y = attribute.array[ index + 1 ];
this.z = attribute.array[ index + 2 ];
this.w = attribute.array[ index + 3 ];
return this;
},
clone: function () {
return new THREE.Vector4( this.x, this.y, this.z, this.w );
......@@ -13993,6 +14035,7 @@ THREE.MeshFaceMaterial.prototype = {
* map: new THREE.Texture( <Image> ),
*
* size: <float>,
* sizeAttenuation: <bool>,
*
* blending: THREE.NormalBlending,
* depthTest: <bool>,
......@@ -17976,6 +18019,8 @@ THREE.WebGLRenderer = function ( parameters ) {
var _canvas = parameters.canvas !== undefined ? parameters.canvas : document.createElement( 'canvas' ),
_context = parameters.context !== undefined ? parameters.context : null,
pixelRatio = 1,
_precision = parameters.precision !== undefined ? parameters.precision : 'highp',
_alpha = parameters.alpha !== undefined ? parameters.alpha : false,
......@@ -18004,7 +18049,6 @@ THREE.WebGLRenderer = function ( parameters ) {
this.domElement = _canvas;
this.context = null;
this.devicePixelRatio = self.devicePixelRatio !== undefined ? self.devicePixelRatio : 1;
// clearing
......@@ -18426,10 +18470,22 @@ THREE.WebGLRenderer = function ( parameters ) {
};
this.getPixelRatio = function () {
return pixelRatio;
};
this.setPixelRatio = function ( value ) {
pixelRatio = value;
};
this.setSize = function ( width, height, updateStyle ) {
_canvas.width = width * this.devicePixelRatio;
_canvas.height = height * this.devicePixelRatio;
_canvas.width = width * pixelRatio;
_canvas.height = height * pixelRatio;
if ( updateStyle !== false ) {
......@@ -18444,11 +18500,11 @@ THREE.WebGLRenderer = function ( parameters ) {
this.setViewport = function ( x, y, width, height ) {
_viewportX = x * this.devicePixelRatio;
_viewportY = y * this.devicePixelRatio;
_viewportX = x * pixelRatio;
_viewportY = y * pixelRatio;
_viewportWidth = width * this.devicePixelRatio;
_viewportHeight = height * this.devicePixelRatio;
_viewportWidth = width * pixelRatio;
_viewportHeight = height * pixelRatio;
_gl.viewport( _viewportX, _viewportY, _viewportWidth, _viewportHeight );
......@@ -18457,10 +18513,10 @@ THREE.WebGLRenderer = function ( parameters ) {
this.setScissor = function ( x, y, width, height ) {
_gl.scissor(
x * this.devicePixelRatio,
y * this.devicePixelRatio,
width * this.devicePixelRatio,
height * this.devicePixelRatio
x * pixelRatio,
y * pixelRatio,
width * pixelRatio,
height * pixelRatio
);
};
......@@ -27212,7 +27268,7 @@ THREE.AudioListener.prototype.updateMatrixWorld = ( function () {
var listener = this.context.listener;
var up = this.up;
this.matrixWorld.decompose( position, quaternion, scale );
orientation.set( 0, 0, -1 ).applyQuaternion( quaternion );
......@@ -29894,8 +29950,6 @@ THREE.Animation.prototype.reset = function () {
var object = this.hierarchy[ h ];
object.matrixAutoUpdate = true;
if ( object.animationCache === undefined ) {
object.animationCache = {
......@@ -30038,7 +30092,6 @@ THREE.Animation.prototype.update = (function(){
} else {
this.stop();
return;
}
......@@ -30078,9 +30131,6 @@ THREE.Animation.prototype.update = (function(){
}
object.matrixAutoUpdate = true;
object.matrixWorldNeedsUpdate = true;
var scale = ( this.currentTime - prevKey.time ) / ( nextKey.time - prevKey.time );
var prevXYZ = prevKey[ type ];
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册