Browse Source

Material constants and `THREE.Texture`

Mr.doob 14 years ago
parent
commit
adb275a093
2 changed files with 36 additions and 0 deletions
  1. 16 0
      src/materials/Material.js
  2. 20 0
      src/materials/Texture.js

+ 16 - 0
src/materials/Material.js

@@ -0,0 +1,16 @@
+/**
+ * @author mr.doob / http://mrdoob.com/
+ * }
+ */
+
+THREE.UVMapping = 0;
+THREE.ReflectionMap = 1;
+THREE.CubeMap = 2;
+
+THREE.FlatShading = 0;
+THREE.GouraudShading = 1;
+THREE.PhongShading = 2;
+
+THREE.NormalBlending = 0;
+THREE.AdditiveBlending = 1;
+THREE.SubstractiveBlending = 2;

+ 20 - 0
src/materials/Texture.js

@@ -0,0 +1,20 @@
+/**
+ * @author mr.doob / http://mrdoob.com/
+ * }
+ */
+
+THREE.Texture = function ( image, mapping ) {
+
+	this.image = image;
+	this.mapping = mapping;
+
+	this.toString = function () {
+
+		return 'THREE.Texture (<br/>' +
+			'image: ' + this.image + '<br/>' +
+			'mapping: ' + this.mapping + '<br/>' +
+			')';
+
+	};
+
+};