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

Materials: Promoted vertexColors.

上级 7992d5c4
......@@ -8,9 +8,7 @@
*
* linewidth: <float>,
* linecap: "round",
* linejoin: "round",
*
* vertexColors: <bool>
* linejoin: "round"
* }
*/
......@@ -26,8 +24,6 @@ THREE.LineBasicMaterial = function ( parameters ) {
this.linecap = 'round';
this.linejoin = 'round';
this.vertexColors = THREE.NoColors;
this.setValues( parameters );
......@@ -46,8 +42,6 @@ THREE.LineBasicMaterial.prototype.copy = function ( source ) {
this.linecap = source.linecap;
this.linejoin = source.linejoin;
this.vertexColors = source.vertexColors;
return this;
};
......@@ -9,9 +9,7 @@
*
* scale: <float>,
* dashSize: <float>,
* gapSize: <float>,
*
* vertexColors: THREE.NoColors / THREE.FaceColors / THREE.VertexColors
* gapSize: <float>
* }
*/
......@@ -29,8 +27,6 @@ THREE.LineDashedMaterial = function ( parameters ) {
this.dashSize = 3;
this.gapSize = 1;
this.vertexColors = THREE.NoColors;
this.setValues( parameters );
};
......@@ -50,8 +46,6 @@ THREE.LineDashedMaterial.prototype.copy = function ( source ) {
this.dashSize = source.dashSize;
this.gapSize = source.gapSize;
this.vertexColors = source.vertexColors;
return this;
};
......@@ -13,13 +13,14 @@ THREE.Material = function () {
this.type = 'Material';
this.fog = true;
this.blending = THREE.NormalBlending;
this.side = THREE.FrontSide;
this.vertexColors = THREE.NoColors; // THREE.NoColors, THREE.VertexColors, THREE.FaceColors
this.opacity = 1;
this.transparent = false;
this.blending = THREE.NormalBlending;
this.blendSrc = THREE.SrcAlphaFactor;
this.blendDst = THREE.OneMinusSrcAlphaFactor;
this.blendEquation = THREE.AddEquation;
......@@ -192,11 +193,10 @@ THREE.Material.prototype = {
if ( this.size !== undefined ) data.size = this.size;
if ( this.sizeAttenuation !== undefined ) data.sizeAttenuation = this.sizeAttenuation;
if ( this.vertexColors !== undefined && this.vertexColors !== THREE.NoColors ) data.vertexColors = this.vertexColors;
if ( this.shading !== undefined && this.shading !== THREE.SmoothShading ) data.shading = this.shading;
if ( this.blending !== THREE.NormalBlending ) data.blending = this.blending;
if ( this.shading !== undefined && this.shading !== THREE.SmoothShading ) data.shading = this.shading;
if ( this.side !== THREE.FrontSide ) data.side = this.side;
if ( this.vertexColors !== THREE.NoColors ) data.vertexColors = this.vertexColors;
if ( this.opacity < 1 ) data.opacity = this.opacity;
if ( this.transparent === true ) data.transparent = this.transparent;
......@@ -248,13 +248,14 @@ THREE.Material.prototype = {
this.name = source.name;
this.fog = source.fog;
this.blending = source.blending;
this.side = source.side;
this.vertexColors = source.vertexColors;
this.opacity = source.opacity;
this.transparent = source.transparent;
this.blending = source.blending;
this.blendSrc = source.blendSrc;
this.blendDst = source.blendDst;
this.blendEquation = source.blendEquation;
......
......@@ -26,8 +26,6 @@
* wireframe: <boolean>,
* wireframeLinewidth: <float>,
*
* vertexColors: THREE.NoColors / THREE.VertexColors / THREE.FaceColors,
*
* skinning: <bool>,
* morphTargets: <bool>
* }
......@@ -62,8 +60,6 @@ THREE.MeshBasicMaterial = function ( parameters ) {
this.wireframeLinecap = 'round';
this.wireframeLinejoin = 'round';
this.vertexColors = THREE.NoColors;
this.skinning = false;
this.morphTargets = false;
......@@ -101,8 +97,6 @@ THREE.MeshBasicMaterial.prototype.copy = function ( source ) {
this.wireframeLinecap = source.wireframeLinecap;
this.wireframeLinejoin = source.wireframeLinejoin;
this.vertexColors = source.vertexColors;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
......
......@@ -30,8 +30,6 @@
* wireframe: <boolean>,
* wireframeLinewidth: <float>,
*
* vertexColors: THREE.NoColors / THREE.VertexColors / THREE.FaceColors,
*
* skinning: <bool>,
* morphTargets: <bool>,
* morphNormals: <bool>
......@@ -72,8 +70,6 @@ THREE.MeshLambertMaterial = function ( parameters ) {
this.wireframeLinecap = 'round';
this.wireframeLinejoin = 'round';
this.vertexColors = THREE.NoColors;
this.skinning = false;
this.morphTargets = false;
this.morphNormals = false;
......@@ -117,8 +113,6 @@ THREE.MeshLambertMaterial.prototype.copy = function ( source ) {
this.wireframeLinecap = source.wireframeLinecap;
this.wireframeLinejoin = source.wireframeLinejoin;
this.vertexColors = source.vertexColors;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
this.morphNormals = source.morphNormals;
......
......@@ -44,8 +44,6 @@
* wireframe: <boolean>,
* wireframeLinewidth: <float>,
*
* vertexColors: THREE.NoColors / THREE.VertexColors / THREE.FaceColors,
*
* skinning: <bool>,
* morphTargets: <bool>,
* morphNormals: <bool>
......@@ -100,8 +98,6 @@ THREE.MeshPhongMaterial = function ( parameters ) {
this.wireframeLinecap = 'round';
this.wireframeLinejoin = 'round';
this.vertexColors = THREE.NoColors;
this.skinning = false;
this.morphTargets = false;
this.morphNormals = false;
......@@ -159,8 +155,6 @@ THREE.MeshPhongMaterial.prototype.copy = function ( source ) {
this.wireframeLinecap = source.wireframeLinecap;
this.wireframeLinejoin = source.wireframeLinejoin;
this.vertexColors = source.vertexColors;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
this.morphNormals = source.morphNormals;
......
......@@ -45,8 +45,6 @@
* wireframe: <boolean>,
* wireframeLinewidth: <float>,
*
* vertexColors: THREE.NoColors / THREE.VertexColors / THREE.FaceColors,
*
* skinning: <bool>,
* morphTargets: <bool>,
* morphNormals: <bool>
......@@ -105,8 +103,6 @@ THREE.MeshStandardMaterial = function ( parameters ) {
this.wireframeLinecap = 'round';
this.wireframeLinejoin = 'round';
this.vertexColors = THREE.NoColors;
this.skinning = false;
this.morphTargets = false;
this.morphNormals = false;
......@@ -168,8 +164,6 @@ THREE.MeshStandardMaterial.prototype.copy = function ( source ) {
this.wireframeLinecap = source.wireframeLinecap;
this.wireframeLinejoin = source.wireframeLinejoin;
this.vertexColors = source.vertexColors;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
this.morphNormals = source.morphNormals;
......
......@@ -8,9 +8,7 @@
* map: new THREE.Texture( <Image> ),
*
* size: <float>,
* sizeAttenuation: <bool>,
*
* vertexColors: <bool>
* sizeAttenuation: <bool>
* }
*/
......@@ -27,8 +25,6 @@ THREE.PointsMaterial = function ( parameters ) {
this.size = 1;
this.sizeAttenuation = true;
this.vertexColors = THREE.NoColors;
this.setValues( parameters );
};
......@@ -47,8 +43,6 @@ THREE.PointsMaterial.prototype.copy = function ( source ) {
this.size = source.size;
this.sizeAttenuation = source.sizeAttenuation;
this.vertexColors = source.vertexColors;
return this;
};
......@@ -15,8 +15,6 @@
*
* lights: <bool>,
*
* vertexColors: THREE.NoColors / THREE.VertexColors / THREE.FaceColors,
*
* skinning: <bool>,
* morphTargets: <bool>,
* morphNormals: <bool>
......@@ -46,8 +44,6 @@ THREE.ShaderMaterial = function ( parameters ) {
this.lights = false; // set to use scene lights
this.clipping = false; // set to use user-defined clipping planes
this.vertexColors = THREE.NoColors; // set to use "color" attribute stream
this.skinning = false; // set to use skinning attribute streams
this.morphTargets = false; // set to use morph targets
......@@ -106,8 +102,6 @@ THREE.ShaderMaterial.prototype.copy = function ( source ) {
this.lights = source.lights;
this.clipping = source.clipping;
this.vertexColors = source.vertexColors;
this.skinning = source.skinning;
this.morphTargets = source.morphTargets;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册