sevan 9 лет назад
Родитель
Сommit
17f6b52f90

+ 6 - 0
loaders/readme.md

@@ -17,4 +17,10 @@ BABYLON.SceneLoader.Load("/Files/", "ch9.stl", engine, function (newScene) {
        newScene.render(); 
    }); 
 });
+```
+
+To compile, from the tools/gulp folder:
+
+```
+gulp loaders
 ```

+ 17 - 20
materialsLibrary/readme.md

@@ -33,35 +33,32 @@ But you can also start from scratch as you are not forced to support all these f
 
 ## Integrating the material in the build process
 
-To build all materials and generate the *dist* folder, just run:
+To build all materials and generate the *dist* folder, just run from the tools/gulp folder:
 
 ```
-gulp
+gulp materialsLibrary
 ```
 
-To integrate your new material to the build process, you have to edit the config.sjon file and add an entry in the "materials" section of the file:
+To integrate your new material to the build process, you have to edit the config.json file in the tools/gulp and add an entry in the "materialsLibrary/libraries" section of the file:
 
 ```
-{
-  "materials": [
-    {
-      "file": "shaders/simple/babylon.simpleMaterial.ts",
-      "shaderFiles": [
-        "shaders/simple/simple.vertex.fx",
-        "shaders/simple/simple.fragment.fx"
-      ],
-      "output": "babylon.simpleMaterial.js"
-    }
-  ],
-  "build": {
-    "distOutputDirectory": "dist/"
-  }
-}
+  "libraries": [
+    ...
+      {
+        "files": ["../../materialsLibrary/src/gradient/babylon.gradientMaterial.ts"],
+        "shaderFiles": [
+          "../../materialsLibrary/src/gradient/gradient.vertex.fx",
+          "../../materialsLibrary/src/gradient/gradient.fragment.fx"
+        ],
+        "output": "babylon.gradientMaterial.js"
+      }
+      ...
+  ]
 ```
 
 ## Testing your material
 
-To test your material, 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 material and reference it in the UI system:
+To test your material, you can use the /materialsLibrary/index.html page. References are added automatically. You only need to update the code to create an instance of your material and reference it in the UI system:
 
 ```
 gui.add(options, 'material', ['standard', 'simple']).onFinishChange(function () {
@@ -80,7 +77,7 @@ gui.add(options, 'material', ['standard', 'simple']).onFinishChange(function ()
 
 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.
 
-To serve this page, you can start:
+To serve this page, you can start from the tools/gulp folder the task:
 
 ```
 gulp webserver

+ 41 - 17
postProcessLibrary/readme.md

@@ -9,33 +9,57 @@ sphere.material.diffuseTexture = fire;
 
 ## Adding a new post process to the library
 
-To add a new post process, you have to create your own folder in *postProcesses* folder. Then you need to add a .ts file and one .fragment.fx files:
+To add a new post process, you have to create your own folder in *postProcesses/src* folder. Then you need to add a .ts file and one .fragment.fx files:
 * The .ts is the TypeScript code of your post process
 * .fx file: GLSL code for fragment shaders
 
 ## Integrating the post process in the build process
 
-To build all post processes and generate the *dist* folder, just run:
+To build all post processes and generate the *dist* folder, just run from the tools/gulp folder:
 
 ```
-gulp
+gulp postProcesLibrary
 ```
 
-To integrate your new post process to the build process, you have to edit the config.sjon file and add an entry in the "postProcesses" section of the file:
+To integrate your new post process to the build process, you have to edit the config.json file in the tools/gulp folder and add an entry in the "postProcessLibray/libraries" section of the file:
 
 ```
-{
-  "postProcesses": [
-    {
-      "file": "postProcesses/asciiArt/babylon.asciiArtPostProcess.ts",
-      "shaderFiles": [
-        "postProcesses/asciiArt/asciiart.fragment.fx"
-      ],
-      "output": "babylon.asciiArtPostProcess.js"
-    }
-  ],
-  "build": {
-    "distOutputDirectory": "dist/"
+  "libraries": [   
+    ... 
+      {
+        "files": ["../../postProcessLibrary/src/asciiArt/babylon.asciiArtPostProcess.ts"],
+        "shaderFiles": [
+          "../../postProcessLibrary/src/asciiArt/asciiart.fragment.fx"
+        ],
+        "output": "babylon.asciiArtPostProcess.js"
+      }
+    '''
+  ]
+```
+
+## Testing your post process
+
+To test your post process, you can use the /postProcessLibrary/index.html  page. References are added automatically. You only need to update the code to create an instance of your material and reference it in the UI system:
+
+```
+switch (options.postProcess) {
+    case "asciiArt":
+      camera.detachPostProcess(aaPostProcess);
+      camera.detachPostProcess(drPostProcess);
+      camera.attachPostProcess(aaPostProcess);
+      break;
+    case "digitalRain":
+      camera.detachPostProcess(aaPostProcess);
+      camera.detachPostProcess(drPostProcess);
+      camera.attachPostProcess(drPostProcess);
+      break;
   }
-}
+```
+
+This page allows you to test your code on a simple sphere.
+
+To serve this page, you can start from the tools/gulp folder the task:
+
+```
+gulp webserver
 ```

+ 16 - 19
proceduralTexturesLibrary/readme.md

@@ -15,34 +15,31 @@ To add a new procedural texture, you have to create your own folder in *procedur
 
 ## Integrating the procedural texture in the build process
 
-To build all procedural textures and generate the *dist* folder, just run:
+To build all procedural textures and generate the *dist* folder, just run from the tools/gulp folder:
 
 ```
-gulp
+gulp proceduralTextureLibrary
 ```
 
-To integrate your new procedural texture to the build process, you have to edit the config.sjon file and add an entry in the "proceduralTextures" section of the file:
+To integrate your new procedural texture to the build process, you have to edit the config.sjonfile in the tools/gulp folder and add an entry in the "proceduralTextureLibrary/libraries" section of the file:
 
 ```
-{
-  "proceduralTextures": [
-    {
-      "file": "proceduralTextures/fire/babylon.fireProceduralTexture.ts",
-      "shaderFiles": [
-        "proceduralTextures/fire/fireProceduralTexture.fragment.fx"
-      ],
-      "output": "babylon.fireProceduralTexture.js"
-    }
-  ],
-  "build": {
-    "distOutputDirectory": "dist/"
-  }
-}
+  "libraries": [
+    ...
+      {
+        "files": ["../../proceduralTexturesLibrary/src/wood/babylon.woodProceduralTexture.ts"],
+        "shaderFiles": [
+          "../../proceduralTexturesLibrary/src/wood/woodProceduralTexture.fragment.fx"
+        ],
+        "output": "babylon.woodProceduralTexture.js"
+      }
+    ...
+  ]
 ```
 
 ## Testing your procedural texture
 
-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:
+To test your procedural texture, you can use the /proceduralTextureLibrary/index.html  page. References are added automatically. You only need to update the code to create an instance of your procedural texture and reference it in the UI system:
 
 ```
 gui.add(options, 'texture', ['default', 'fire', 'wood', 'cloud', 'grass', 'road', 'brick', 'marble', '[YOURTEXTURE]', 'starfield']).onFinishChange(function () {
@@ -70,7 +67,7 @@ gui.add(options, 'texture', ['default', 'fire', 'wood', 'cloud', 'grass', 'road'
 
 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.
 
-To serve this page, you can start:
+To serve this page, you can start from the tools/gulp folder the task:
 
 ```
 gulp webserver

+ 3 - 3
serializers/readme.md

@@ -2,8 +2,8 @@
 
 You will find here all serialization tools that you can use to generate different formats from .babylon
 
-To compile:
+To compile, from the tools/gulp folder:
+
 ```
-npm install
-gulp
+gulp serializers
 ```