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

Color: Added offset to fromArray.

上级 05696b48
......@@ -476,11 +476,13 @@ THREE.Color.prototype = {
},
fromArray: function ( array ) {
fromArray: function ( array, offset ) {
this.r = array[ 0 ];
this.g = array[ 1 ];
this.b = array[ 2 ];
if ( offset === undefined ) offset = 0;
this.r = array[ offset ];
this.g = array[ offset + 1 ];
this.b = array[ offset + 2 ];
return this;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册