فهرست منبع

Fix readme for pt

Etienne Margraff 8 سال پیش
والد
کامیت
236ce3513c
1فایلهای تغییر یافته به همراه21 افزوده شده و 14 حذف شده
  1. 21 14
      proceduralTexturesLibrary/readme.md

+ 21 - 14
proceduralTexturesLibrary/readme.md

@@ -45,20 +45,27 @@ To integrate your new procedural texture to the build process, you have to edit
 To test your procedural texture, you can use the /test/index.html file by adding a reference to your .js file. Then you will need to update the code to create an instance of your procedural texture and reference it in the UI system:
 
 ```
-gui.add(options, 'material', ['none','fire']).onFinishChange(function () {
-  switch (options.material) {
-    case "fire":
-      currentMaterial = fireMaterial;
-      break;
-    case "none":
-    default:
-      currentMaterial = std;
-      break;
-  }
-
-  currentMesh.material = currentMaterial;
-  window.enableMaterial(options.material);
-});
+gui.add(options, 'texture', ['default', 'fire', 'wood', 'cloud', 'grass', 'road', 'brick', 'marble', '[YOURTEXTURE]', 'starfield']).onFinishChange(function () {
+					resetPTOptions();
+					switch (options.texture) {
+						case "fire":
+							currentTexture = firePT;
+							addPToptions(firePT, ['time', 'alphaThreshold', 'speed', ]);
+							break;
+						
+            //.......................
+
+            //YOURTEXTURE
+
+						case "none":
+						default:
+							currentTexture = diffuseTexture;
+							break;
+					}
+
+					std.diffuseTexture = currentTexture;
+					window.enableTexture(options.texture);
+				});
 ```
 
 This page allows you to test your code with animated meshes, shadows, various kinds of lights and fog. Just use the UI on the right to turn features on and off.