|
@@ -0,0 +1,82 @@
|
|
|
+import { MeshPhongMaterial } from './MeshPhongMaterial';
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author takahirox / http://github.com/takahirox
|
|
|
+ *
|
|
|
+ * parameters = {
|
|
|
+ * color: <hex>,
|
|
|
+ * specular: <hex>,
|
|
|
+ * shininess: <float>,
|
|
|
+ * opacity: <float>,
|
|
|
+ *
|
|
|
+ * map: new THREE.Texture( <Image> ),
|
|
|
+ *
|
|
|
+ * lightMap: new THREE.Texture( <Image> ),
|
|
|
+ * lightMapIntensity: <float>
|
|
|
+ *
|
|
|
+ * aoMap: new THREE.Texture( <Image> ),
|
|
|
+ * aoMapIntensity: <float>
|
|
|
+ *
|
|
|
+ * emissive: <hex>,
|
|
|
+ * emissiveIntensity: <float>
|
|
|
+ * emissiveMap: new THREE.Texture( <Image> ),
|
|
|
+ *
|
|
|
+ * bumpMap: new THREE.Texture( <Image> ),
|
|
|
+ * bumpScale: <float>,
|
|
|
+ *
|
|
|
+ * normalMap: new THREE.Texture( <Image> ),
|
|
|
+ * normalScale: <Vector2>,
|
|
|
+ *
|
|
|
+ * displacementMap: new THREE.Texture( <Image> ),
|
|
|
+ * displacementScale: <float>,
|
|
|
+ * displacementBias: <float>,
|
|
|
+ *
|
|
|
+ * specularMap: new THREE.Texture( <Image> ),
|
|
|
+ *
|
|
|
+ * alphaMap: new THREE.Texture( <Image> ),
|
|
|
+ *
|
|
|
+ * envMap: new THREE.TextureCube( [posx, negx, posy, negy, posz, negz] ),
|
|
|
+ * combine: THREE.Multiply,
|
|
|
+ * reflectivity: <float>,
|
|
|
+ * refractionRatio: <float>,
|
|
|
+ *
|
|
|
+ * gradientMap: new THREE.Texture( <Image> ),
|
|
|
+ *
|
|
|
+ * wireframe: <boolean>,
|
|
|
+ * wireframeLinewidth: <float>,
|
|
|
+ *
|
|
|
+ * skinning: <bool>,
|
|
|
+ * morphTargets: <bool>,
|
|
|
+ * morphNormals: <bool>
|
|
|
+ * }
|
|
|
+ */
|
|
|
+
|
|
|
+function MeshToonMaterial( parameters ) {
|
|
|
+
|
|
|
+ MeshPhongMaterial.call( this );
|
|
|
+
|
|
|
+ this.type = 'MeshToonMaterial';
|
|
|
+
|
|
|
+ this.gradientMap = null;
|
|
|
+
|
|
|
+ this.setValues( parameters );
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+MeshToonMaterial.prototype = Object.create( MeshPhongMaterial.prototype );
|
|
|
+MeshToonMaterial.prototype.constructor = MeshToonMaterial;
|
|
|
+
|
|
|
+MeshToonMaterial.prototype.isMeshToonMaterial = true;
|
|
|
+
|
|
|
+MeshToonMaterial.prototype.copy = function ( source ) {
|
|
|
+
|
|
|
+ MeshPhongMaterial.prototype.copy.call( this, source );
|
|
|
+
|
|
|
+ this.gradientMap = source.gradientMap;
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export { MeshToonMaterial };
|