Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

Commit

Permalink
[descriptors] Move vertexColors up to Material
Browse files Browse the repository at this point in the history
Fixes #132
  • Loading branch information
toxicFork committed Jan 3, 2017
1 parent 04f54e1 commit 300f1d4
Show file tree
Hide file tree
Showing 16 changed files with 70 additions and 45 deletions.
10 changes: 0 additions & 10 deletions src/lib/descriptors/Material/LineBasicMaterialDescriptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ class LineBasicMaterialDescriptor extends MaterialDescriptorBase {
});
});

this.hasProp('vertexColors', {
type: PropTypes.oneOf([
THREE.NoColors,
THREE.FaceColors,
THREE.VertexColors,
]),
simple: true,
default: THREE.NoColors,
});

this.hasProp('fog', {
type: PropTypes.bool,
update(threeObject, fog, existsInProps) {
Expand Down
10 changes: 0 additions & 10 deletions src/lib/descriptors/Material/LineDashedMaterialDescriptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@ class LineDashedMaterialDescriptor extends MaterialDescriptorBase {
});
});

this.hasProp('vertexColors', {
type: PropTypes.oneOf([
THREE.NoColors,
THREE.FaceColors,
THREE.VertexColors,
]),
simple: true,
default: THREE.NoColors,
});

this.hasProp('fog', {
type: PropTypes.bool,
update(threeObject, fog, existsInProps) {
Expand Down
10 changes: 10 additions & 0 deletions src/lib/descriptors/Material/MaterialDescriptorBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ class MaterialDescriptorBase extends THREEElementDescriptor {
default: undefined,
});

this.hasProp('vertexColors', {
type: PropTypes.oneOf([
THREE.NoColors,
THREE.FaceColors,
THREE.VertexColors,
]),
simple: true,
default: THREE.NoColors,
});

this._colors = [];
}

Expand Down
10 changes: 0 additions & 10 deletions src/lib/descriptors/Material/PointsMaterialDescriptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@ class PointsMaterialDescriptor extends MaterialDescriptorBase {
updateInitial: true,
default: true,
});

this.hasProp('vertexColors', {
type: PropTypes.oneOf([
THREE.NoColors,
THREE.FaceColors,
THREE.VertexColors,
]),
simple: true,
default: THREE.NoColors,
});
}

construct(props) {
Expand Down
10 changes: 5 additions & 5 deletions wiki/lineBasicMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Defaults to `material`. Other example values:
### map
``` THREE.Texture ```

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### color
``` one of types [THREE.Color, number, string] ```

Expand All @@ -80,11 +85,6 @@ Defaults to `material`. Other example values:

**Default**: `'round'`

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### fog
``` bool ```

Expand Down
10 changes: 5 additions & 5 deletions wiki/lineDashedMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Defaults to `material`. Other example values:
### map
``` THREE.Texture ```

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### color
``` one of types [THREE.Color, number, string] ```

Expand Down Expand Up @@ -95,11 +100,6 @@ Defaults to `material`. Other example values:

**Default**: `'round'`

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### fog
``` bool ```

Expand Down
5 changes: 5 additions & 0 deletions wiki/meshBasicMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Defaults to `material`. Other example values:
### map
``` THREE.Texture ```

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### color
``` one of types [THREE.Color, number, string] ```

Expand Down
5 changes: 5 additions & 0 deletions wiki/meshDepthMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Defaults to `material`. Other example values:
### map
``` THREE.Texture ```

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### wireframe
``` bool ```

Expand Down
5 changes: 5 additions & 0 deletions wiki/meshLambertMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Defaults to `material`. Other example values:
### map
``` THREE.Texture ```

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### color
``` one of types [THREE.Color, number, string] ```

Expand Down
5 changes: 5 additions & 0 deletions wiki/meshNormalMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Defaults to `material`. Other example values:
### map
``` THREE.Texture ```

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### wireframe
``` bool ```

Expand Down
5 changes: 5 additions & 0 deletions wiki/meshPhongMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Defaults to `material`. Other example values:
### map
``` THREE.Texture ```

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### color
``` one of types [THREE.Color, number, string] ```

Expand Down
5 changes: 5 additions & 0 deletions wiki/meshStandardMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Defaults to `material`. Other example values:
### map
``` THREE.Texture ```

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### color
``` one of types [THREE.Color, number, string] ```: Geometry color

Expand Down
10 changes: 5 additions & 5 deletions wiki/pointsMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Defaults to `material`. Other example values:
### map
``` THREE.Texture ```

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### color
``` one of types [THREE.Color, number, string] ```

Expand All @@ -80,11 +85,6 @@ Defaults to `material`. Other example values:

**Default**: `true`

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### resourceId
``` string ```: The resource id of this object, only used if it is placed into [[resources]].

Expand Down
5 changes: 5 additions & 0 deletions wiki/rawShaderMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ Defaults to `material`. Other example values:
### map
``` THREE.Texture ```

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### uniforms
``` any ```: The uniforms to be used for the shader.

Expand Down
5 changes: 5 additions & 0 deletions wiki/shaderMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ Defaults to `material`. Other example values:
### map
``` THREE.Texture ```

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### uniforms
``` any ```: The uniforms to be used for the shader.

Expand Down
5 changes: 5 additions & 0 deletions wiki/spriteMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Defaults to `material`. Other example values:
### map
``` THREE.Texture ```

### vertexColors
``` one of [THREE.NoColors, THREE.FaceColors, THREE.VertexColors] ```

**Default**: `THREE.NoColors`

### color
``` one of types [THREE.Color, number, string] ```

Expand Down

0 comments on commit 300f1d4

Please sign in to comment.