浏览代码

BabylonExporter 1.12

David Catuhe 11 年之前
父节点
当前提交
b3eab3917e
共有 32 个文件被更改,包括 1502 次插入4584 次删除
  1. 0 4
      Exporters/Blender/blender-test/TOB-out/.gitignore
  2. 二进制
      Exporters/Blender/blender-test/armature.png
  3. 0 74
      Exporters/Blender/blender-test/armature_JSON.html
  4. 0 63
      Exporters/Blender/blender-test/armature_inline.html
  5. 二进制
      Exporters/Blender/blender-test/automaton.png
  6. 0 64
      Exporters/Blender/blender-test/automaton_JSON.html
  7. 0 56
      Exporters/Blender/blender-test/automaton_inline.html
  8. 二进制
      Exporters/Blender/blender-test/blender-in/armature.blend
  9. 二进制
      Exporters/Blender/blender-test/blender-in/automaton.blend
  10. 二进制
      Exporters/Blender/blender-test/blender-in/camera_anim.blend
  11. 二进制
      Exporters/Blender/blender-test/blender-in/mesh_parent.blend
  12. 二进制
      Exporters/Blender/blender-test/blender-in/multi_group.blend
  13. 二进制
      Exporters/Blender/blender-test/blender-in/tableCloth.jpg
  14. 二进制
      Exporters/Blender/blender-test/blender-in/tmage512.png
  15. 二进制
      Exporters/Blender/blender-test/camera_anim.png
  16. 0 75
      Exporters/Blender/blender-test/camera_anim_JSON.html
  17. 0 63
      Exporters/Blender/blender-test/camera_anim_inline.html
  18. 0 70
      Exporters/Blender/blender-test/index.html
  19. 0 2
      Exporters/Blender/blender-test/lib/.gitignore
  20. 0 146
      Exporters/Blender/blender-test/lib/automaton_common.js
  21. 0 52
      Exporters/Blender/blender-test/lib/mesh_parent_common.js
  22. 0 134
      Exporters/Blender/blender-test/lib/multi_group_common.js
  23. 二进制
      Exporters/Blender/blender-test/mesh_parent.png
  24. 0 63
      Exporters/Blender/blender-test/mesh_parent_JSON.html
  25. 0 56
      Exporters/Blender/blender-test/mesh_parent_inline.html
  26. 二进制
      Exporters/Blender/blender-test/multi_group.png
  27. 0 67
      Exporters/Blender/blender-test/multi_group_JSON.html
  28. 0 58
      Exporters/Blender/blender-test/multi_group_inline.html
  29. 0 18
      Exporters/Blender/blender-test/readme.md
  30. 1498 944
      Exporters/Blender/io_export_babylon.py
  31. 0 2575
      Exporters/Blender/io_tower_of_babel.py
  32. 4 0
      Exporters/Blender/readme.md

+ 0 - 4
Exporters/Blender/blender-test/TOB-out/.gitignore

@@ -1,4 +0,0 @@
-# Ignore everything in this directory, but not require tester to create dir
-*
-# Except this file
-!.gitignore

二进制
Exporters/Blender/blender-test/armature.png


+ 0 - 74
Exporters/Blender/blender-test/armature_JSON.html

@@ -1,74 +0,0 @@
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>armature</title>
-    <!-- edit path - name of babylon library as required -->
-    <script src="./lib/babylon.js"></script>
-    <style>
-         html, body   { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } 
-         #renderCanvas{ width: 100%; height: 100%; } 
-         #button      {
-			color: white; background-color: Dimgray;
-			font-size: 14pt; font-weight: bold;
-			padding-left:4pt; padding-right:4pt;
-			
-			border: black outset 2pt; line-height: 2em;
-			cursor: pointer;
-		}     
-    </style>
-</head>
-<body>
-	<div id="buttonbar" style="background-color: Darkorange;">
-		<span id="button" onclick="pausePlay()"> Pause - Play </span>
-	</div>
-<canvas id="renderCanvas"></canvas>
-<script>
-    if (BABYLON.Engine.isSupported()) {
-        var canvas = document.getElementById("renderCanvas");
-        var engine = new BABYLON.Engine(canvas, true);
-        console.log("Babylon version:  " + BABYLON.Engine.Version);
-
-        var running = true;
-        var skeleton;
-        var scene;
-        var url = "./TOB-out/"; // edit when .babylon / texture files in a different dir than html
-        BABYLON.SceneLoader.Load(url, "armature.babylon", engine, 
-            function (newScene) {
-      	        scene = newScene; // assign so visible external function
-      	        
-                newScene.executeWhenReady(function () {
-                    skeleton = newScene.getSkeletonById(0); // leave integer due to legacy exporter
-                    newScene.beginAnimation(skeleton, 1, 45, true, 1);
-                    
-                   // Attach camera to canvas inputs
-                    newScene.activeCamera.attachControl(canvas);
-
-                    // Once the scene is loaded, register a render loop
-                    engine.runRenderLoop(function() {
-                        newScene.render();
-                    });
-                });
-            },
-            function (progress) {
-                // To do: give progress feedback to user
-            }
-        );
-    }else{
-        alert("WebGL not supported in this browser.\n\n" + 
-              "If in Safari browser, check 'Show Develop menu in menu bar' on the Advanced tab of Preferences.  " +
-              "On the 'Develop' menu, check the 'Enable WebGL' menu item.");
-    }
-
-    //Resize
-    window.addEventListener("resize", function () {
-        engine.resize();
-    });
-    function pausePlay() {
-        var animatable = scene.getAnimatableByTarget(skeleton);
-    	if (!running)animatable.restart();
-    	else animatable.pause();
-    	running = !running;
-    }
-</script>
-</body>
-</html>

+ 0 - 63
Exporters/Blender/blender-test/armature_inline.html

@@ -1,63 +0,0 @@
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>armature</title>
-    <!-- edit path - name of babylon library as required -->
-    <script src="./lib/babylon.js"></script>
-    <script src="./TOB-out/armature.js"></script>
-    <style>
-         html, body   { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } 
-         #renderCanvas{ width: 100%; height: 100%; } 
-         #button      {
-			color: white; background-color: Dimgray;
-			font-size: 14pt; font-weight: bold;
-			padding-left:4pt; padding-right:4pt;
-			
-			border: black outset 2pt; line-height: 2em;
-			cursor: pointer;
-		}     
-    </style>
-</head>
-<body>
-	<div id="buttonbar" style="background-color: Darkorange;">
-		<span id="button" onclick="pausePlay()"> Pause - Play </span>
-	</div>
-<canvas id="renderCanvas"></canvas>
-<script>
-    if (BABYLON.Engine.isSupported()) {
-        var canvas = document.getElementById("renderCanvas");
-        var engine = new BABYLON.Engine(canvas, true);
-        console.log("Babylon version:  " + BABYLON.Engine.Version);
-
-        var scene = new BABYLON.Scene(engine);
-        materialsRootDir = "./TOB-out"; // edit when texture files in a different dir than html
-        armature.initScene(scene, materialsRootDir);
-        
-        var skeleton = scene.getSkeletonById("0"); // string required for .js & .ts
-        scene.beginAnimation(skeleton, 1, 45, true, 1);
-        var running = true;
-        
-        scene.activeCamera.attachControl(canvas);
-        engine.runRenderLoop(function () {
-            scene.render();
-        });
-    }else{
-        alert("WebGL not supported in this browser.\n\n" + 
-              "If in Safari browser, check 'Show Develop menu in menu bar' on the Advanced tab of Preferences.  " +
-              "On the 'Develop' menu, check the 'Enable WebGL' menu item.");
-    }
-
-    //Resize
-    window.addEventListener("resize", function () {
-        engine.resize();
-    });
-	
-    function pausePlay() {
-        var animatable = scene.getAnimatableByTarget(skeleton);
-    	if (!running)animatable.restart();
-    	else animatable.pause();
-    	running = !running;
-    }
-</script>
-</body>
-</html>

二进制
Exporters/Blender/blender-test/automaton.png


+ 0 - 64
Exporters/Blender/blender-test/automaton_JSON.html

@@ -1,64 +0,0 @@
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>automaton</title>
-    <!-- edit path - name of babylon library as required -->
-    <script src="./lib/babylon.js"></script>
-    <script src="./lib/automaton_common.js"></script>
-    <style>
-         html, body   { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } 
-         #renderCanvas{ width: 100%; height: 100%; } 
-         #button      {
-			color: white; background-color: Dimgray;
-			font-size: 14pt; font-weight: bold;
-			padding-left:4pt; padding-right:4pt;
-			
-			border: black outset 2pt; line-height: 2em;
-			cursor: pointer;
-		}     
-    </style>
-</head>
-<body>
-	<div id="buttonbar" style="background-color: Darkorange;">
-		<span id="button" onclick="pausePlay()"> Pause - Play </span>
-		<span id="button" onclick="queueAnimation()"> Go Again </span>
-	</div>
-<canvas id="renderCanvas"></canvas>
-<script>
-    if (BABYLON.Engine.isSupported()) {
-        var canvas = document.getElementById("renderCanvas");
-        var engine = new BABYLON.Engine(canvas, true);
-        console.log("Babylon version:  " + BABYLON.Engine.Version);
-        
-        var url = "./TOB-out/"; // edit when .babylon / texture files in a different dir than html
-        BABYLON.SceneLoader.Load(url, "automaton.babylon", engine, 
-            function (newScene) {
-                newScene.executeWhenReady(function () {
-                	prep(newScene);
-                	queueAnimation();
-                    // Attach camera to canvas inputs
-                    newScene.activeCamera.attachControl(canvas);
-
-                    // Once the scene is loaded, register a render loop
-                    engine.runRenderLoop(function() {
-                        newScene.render();
-                    });
-                });
-            },
-            function (progress) {
-                // To do: give progress feedback to user
-            }
-        );
-    }else{
-        alert("WebGL not supported in this browser.\n\n" + 
-              "If in Safari browser, check 'Show Develop menu in menu bar' on the Advanced tab of Preferences.  " +
-              "On the 'Develop' menu, check the 'Enable WebGL' menu item.");
-    }
-
-    //Resize
-    window.addEventListener("resize", function () {
-        engine.resize();
-    });
-</script>
-</body>
-</html>

+ 0 - 56
Exporters/Blender/blender-test/automaton_inline.html

@@ -1,56 +0,0 @@
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>automaton</title>
-    <!-- edit path - name of babylon library as required -->
-    <script src="./lib/babylon.js"></script>
-    <script src="./TOB-out/automaton.js"></script>
-    <script src="./lib/automaton_common.js"></script>
-    <style>
-         html, body   { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } 
-         #renderCanvas{ width: 100%; height: 100%; } 
-         #button      {
-			color: white; background-color: Dimgray;
-			font-size: 14pt; font-weight: bold;
-			padding-left:4pt; padding-right:4pt;
-			
-			border: black outset 2pt; line-height: 2em;
-			cursor: pointer;
-		}     
-    </style>
-</head>
-<body>
-	<div id="buttonbar" style="background-color: Darkorange;">
-		<span id="button" onclick="pausePlay()"> Pause - Play </span>
-		<span id="button" onclick="queueAnimation()"> Go Again </span>
-	</div>
-<canvas id="renderCanvas"></canvas>
-<script>
-    if (BABYLON.Engine.isSupported()) {
-        var canvas = document.getElementById("renderCanvas");
-        var engine = new BABYLON.Engine(canvas, true);
-        console.log("Babylon version:  " + BABYLON.Engine.Version);
-
-        var scene = new BABYLON.Scene(engine);
-        materialsRootDir = "./TOB-out"; // edit when texture files in a different dir than html
-        automaton.initScene(scene, materialsRootDir);
-    	prep(scene);
-    	queueAnimation();
-    	
-        scene.activeCamera.attachControl(canvas);
-        engine.runRenderLoop(function () {
-            scene.render();
-        });
-    }else{
-        alert("WebGL not supported in this browser.\n\n" + 
-              "If in Safari browser, check 'Show Develop menu in menu bar' on the Advanced tab of Preferences.  " +
-              "On the 'Develop' menu, check the 'Enable WebGL' menu item.");
-    }
-
-    //Resize
-    window.addEventListener("resize", function () {
-        engine.resize();
-    });
-</script>
-</body>
-</html>

二进制
Exporters/Blender/blender-test/blender-in/armature.blend


二进制
Exporters/Blender/blender-test/blender-in/automaton.blend


二进制
Exporters/Blender/blender-test/blender-in/camera_anim.blend


二进制
Exporters/Blender/blender-test/blender-in/mesh_parent.blend


二进制
Exporters/Blender/blender-test/blender-in/multi_group.blend


二进制
Exporters/Blender/blender-test/blender-in/tableCloth.jpg


二进制
Exporters/Blender/blender-test/blender-in/tmage512.png


二进制
Exporters/Blender/blender-test/camera_anim.png


+ 0 - 75
Exporters/Blender/blender-test/camera_anim_JSON.html

@@ -1,75 +0,0 @@
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>camera_anim</title>
-    <!-- edit path - name of babylon library as required -->
-    <script src="./lib/babylon.js"></script>
-    <style>
-         html, body   { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } 
-         #renderCanvas{ width: 100%; height: 100%; } 
-         #button      {
-			color: white; background-color: Dimgray;
-			font-size: 14pt; font-weight: bold;
-			padding-left:4pt; padding-right:4pt;
-			
-			border: black outset 2pt; line-height: 2em;
-			cursor: pointer;
-		}     
-    </style>
-</head>
-<body>
-	<div id="buttonbar" style="background-color: Darkorange;">
-		<span id="button" onclick="pausePlay()"> Pause - Play </span>
-	</div>
-<canvas id="renderCanvas"></canvas>
-<script>
-    if (BABYLON.Engine.isSupported()) {
-        var canvas = document.getElementById("renderCanvas");
-        var engine = new BABYLON.Engine(canvas, true);
-        console.log("Babylon version:  " + BABYLON.Engine.Version);
-
-        var running = true;
-        var myCam;
-        var scene;
-        var url = "./TOB-out/" // edit when .babylon / texture files in a different dir than html
-        BABYLON.SceneLoader.Load(url, "camera_anim.babylon", engine, 
-            function (newScene) {
-        	    scene = newScene; // assign so visible external function
-        	    
-                newScene.executeWhenReady(function () {
-                    myCam = newScene.getCameraByName("Camera");
-                    var myLight = newScene.getLightByID("Point"); 
-                    myLight.parent = myCam;
-                    // Attach camera to canvas inputs
-                    newScene.activeCamera.attachControl(canvas);
-
-                    // Once the scene is loaded, register a render loop
-                    engine.runRenderLoop(function() {
-                        newScene.render();
-                    });
-                });
-            },
-            function (progress) {
-                // To do: give progress feedback to user
-            }
-        );
-    }else{
-        alert("WebGL not supported in this browser.\n\n" + 
-              "If in Safari browser, check 'Show Develop menu in menu bar' on the Advanced tab of Preferences.  " +
-              "On the 'Develop' menu, check the 'Enable WebGL' menu item.");
-    }
-
-    // Resize
-    window.addEventListener("resize", function () {
-        engine.resize();
-    });
-	
-    function pausePlay() {
-        var animatable = scene.getAnimatableByTarget(myCam);
-    	if (!running)animatable.restart();
-    	else animatable.pause();
-    	running = !running;
-    }
-</script>
-</body>
-</html>

+ 0 - 63
Exporters/Blender/blender-test/camera_anim_inline.html

@@ -1,63 +0,0 @@
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>camera_anim</title>
-    <!-- edit path - name of babylon library as required -->
-    <script src="./lib/babylon.js"></script>
-    <script src="./TOB-out/camera_anim.js"></script>
-    <style>
-         html, body   { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } 
-         #renderCanvas{ width: 100%; height: 100%; } 
-         #button      {
-			color: white; background-color: Dimgray;
-			font-size: 14pt; font-weight: bold;
-			padding-left:4pt; padding-right:4pt;
-			
-			border: black outset 2pt; line-height: 2em;
-			cursor: pointer;
-		}     
-    </style>
-</head>
-<body>
-	<div id="buttonbar" style="background-color: Darkorange;">
-		<span id="button" onclick="pausePlay()"> Pause - Play </span>
-	</div>
-<canvas id="renderCanvas"></canvas>
-<script>
-    if (BABYLON.Engine.isSupported()) {
-        var canvas = document.getElementById("renderCanvas");
-        var engine = new BABYLON.Engine(canvas, true);
-        console.log("Babylon version:  " + BABYLON.Engine.Version);
-
-        var scene = new BABYLON.Scene(engine);
-        materialsRootDir = "./TOB-out"; // edit when texture files in a different dir than html
-        camera_anim.initScene(scene, materialsRootDir);
-        
-        var running = true;
-        var myCam = scene.getCameraByName("Camera");
-        var myLight = scene.getLightByID("Point"); 
-        myLight.parent = myCam;
-        scene.activeCamera.attachControl(canvas);
-        engine.runRenderLoop(function () {
-            scene.render();
-        });
-    }else{
-        alert("WebGL not supported in this browser.\n\n" + 
-              "If in Safari browser, check 'Show Develop menu in menu bar' on the Advanced tab of Preferences.  " +
-              "On the 'Develop' menu, check the 'Enable WebGL' menu item.");
-    }
-
-    // Resize
-    window.addEventListener("resize", function () {
-        engine.resize();
-    });
-	
-    function pausePlay() {
-        var animatable = scene.getAnimatableByTarget(myCam);
-    	if (!running)animatable.restart();
-    	else animatable.pause();
-    	running = !running;
-    }
-</script>
-</body>
-</html>

+ 0 - 70
Exporters/Blender/blender-test/index.html

@@ -1,70 +0,0 @@
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>Tower of Babel Regression Testing</title>
-    <style>
-         body {font:100% Verdana,Tahoma,Arial,sans-serif; color:#303030; line-height:1.3em;}
-         p {margin:0 0 18px 8px;text-align:justify;}
-         table.my-tbl {margin:0 0 18px 8px;background-color:#808080;}
-         th.my-tbl {text-align:left; background-color:silver;}
-         td.my-tbl {background-color: #FBFBFB;}
-    </style>
-</head>
-<body>
-<p>This directory is for regression testing of the Tower of Babel.  It is assumed that the add-in has already been installed & enabled in Blender.</p>
-
-<p>Place the version of babylon.js you wish to use in the 'lib' directory.  The earliest supported is 1.14.  All of the html files reference it as 'babylon.js' to avoid having to edit them.  FYI, the htmls write a message into the browser console, listing the version, in-case you forget.  This is also for any scripts which should be common across a _JSON & _inline.html pair.</p>
-
-<p>The 'blender-in' directory holds each of the .blend files.  The name reflects the main thing being tested.  Refer to the table below, for a more complete list of features being tested.</p>
-
-<p>The 'TOB-out' directory is where you should direct the .babylon/.js/.ts/.html/.log output from Blender.  This directory is isolated, so that everything can easily be deleted.  This ensures that you are not actually running with stuff exported previously.  This directory is empty in Github (except for a .gitignore), so each .html  in this directory will not run unless, you open Blender with the respective .blend & export to this directory.</p>
-
-<p>Speaking of htmls, this directory has a xxx_JSON.html & xxx_inline.html for each .blend.</p>
-
-<p>Here is the list of tests & secondary features they test:</p>
-<table class="my-tbl">
-        <tr>
-            <th class="my-tbl">.blend</th>
-            <th class="my-tbl">inline</th>
-            <th class="my-tbl">JSON</th>
-            <th class="my-tbl">Camera</th>
-            <th class="my-tbl">Secondary features, notes</th>
-        </tr>
-        <tr>
-            <td class="my-tbl" >armature</td>
-            <td class="my-tbl" align="center"><a href="armature_inline.html" ><img src="armature.png"   alt=""></img></a></td>
-            <td class="my-tbl" align="center"><a href="armature_JSON.html"><img src="armature.png" alt=""></img></a></td>
-            <td class="my-tbl" >Device Orientation</td>
-            <td class="my-tbl">skeletal animation</td>
-        </tr>
-        <tr>
-            <td class="my-tbl" >automaton</td>
-            <td class="my-tbl" align="center"><a href="automaton_inline.html" ><img src="automaton.png"   alt=""></img></a></td>
-            <td class="my-tbl" align="center"><a href="automaton_JSON.html"><img src="automaton.png" alt=""></img></a></td>
-            <td class="my-tbl" >Free, Locked Target</td>
-            <td class="my-tbl">Single ShapeKeyGroup, function() part of a Event Series, back-face culling, instance level pause / resume</td>
-        </tr>
-        <tr>
-            <td class="my-tbl" >camera_anim</td>
-            <td class="my-tbl" align="center"><a href="camera_anim_inline.html" ><img src="camera_anim.png"   alt=""></img></a></td>
-            <td class="my-tbl" align="center"><a href="camera_anim_JSON.html"><img src="camera_anim.png" alt=""></img></a></td>
-            <td class="my-tbl" >Free</td>
-            <td class="my-tbl">Multi-materials, textures</td>
-        </tr>
-        <tr>
-            <td class="my-tbl" >mesh_parent</td>
-            <td class="my-tbl" align="center"><a href="mesh_parent_inline.html" ><img src="mesh_parent.png"   alt=""></img></a></td>
-            <td class="my-tbl" align="center"><a href="mesh_parent_JSON.html"><img src="mesh_parent.png" alt=""></img></a></td>
-            <td class="my-tbl" >Game Pad</td>
-            <td class="my-tbl">Shadows, animation to prove parenthood</td>
-        </tr>
-        <tr>
-            <td class="my-tbl" >multi_group</td>
-            <td class="my-tbl" align="center"><a href="multi_group_inline.html" ><img src="multi_group.png"   alt=""></img></a></td>
-            <td class="my-tbl" align="center"><a href="multi_group_JSON.html"><img src="multi_group.png" alt=""></img></a></td>
-            <td class="my-tbl" >Arc Rotation</td>
-            <td class="my-tbl">Multiple ShapeKeyGroup, independent & multi-group Event Series, AutomatonEventSeriesAction triggered through pick, normals, Group Conflicts, back-face culling, system wide pause / resume</td>
-        </tr>
-    </table>
-</body>
-</html>

+ 0 - 2
Exporters/Blender/blender-test/lib/.gitignore

@@ -1,2 +0,0 @@
-# Ignore babylon.js in this directory, but not any other .js files that may be needed, which are not generated by TOB
-babylon.js

+ 0 - 146
Exporters/Blender/blender-test/lib/automaton_common.js

@@ -1,146 +0,0 @@
-/**
- *  central location for automaton script, called by automaton_JSON.html & automaton_inline.html 
- */
-var scene; // for later camera jiggle in reset
-var cloth;
-var originalPos;
-var originalRot;
-var inAnim = false;
-
-// a custom non-linear Pace   completionRatios    durationRatios
-var hiccup = new BABYLON.Pace([.1, .8, .6, 1.0],[.25, .6, .8, 1.0]);
-
-// The creation of Deformations & Event Series need only be done once; requires no actual mesh; queue as often as you wish to run
-/**
- * Deformation is a sub-class of ReferenceDeformation, where the referenceStateName is Fixed to "BASIS"
- * @param {string} shapeKeyGroupName -  Used by Automaton to place in the correct ShapeKeyGroup queue(s).
- * @param {string} endStateName - Name of state key to deform to
- * @param {number} milliDuration - The number of milli seconds the deformation is to be completed in
- * @param {number} millisBefore - Fixed wait period, once a syncPartner (if any) is also ready (default 0)
- * @param {number} endStateRatio - ratio of the end state to be obtained from reference state: -1 (mirror) to 1 (default 1)
- * @param {Vector3} movePOV - Mesh movement relative to its current position/rotation to be performed at the same time (default null)
- *                  right-up-forward
- * @param {Vector3} rotatePOV - Incremental Mesh rotation to be performed at the same time (default null)
- *                  flipBack-twirlClockwise-tiltRight
- * @param {Pace} pace - Any Object with the function: getCompletionMilestone(currentDurationRatio) (default Pace.LINEAR)
- */
-//                                          Shape                                end-                                     flip back -
-//                                          Key                     dur-         state                                    twirl clockwise -
-//                                          Group          State    ation  wait  ratio  right-up-forward                  tilt right                        pace
- var stretching  = [new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  900, 500,   0.9), 
-                    new BABYLON.Deformation("ENTIRE MESH", "DRAPED", 1500,   0,  -0.1, null                             , null                            , hiccup) 
-                   ];//  illustrates the millisBefore parameter & the non-linear pace
- 
- var hardFlap    = [new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  800,   0,   0.1),
-                    new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  300,   0,  -0.2, new BABYLON.Vector3( 0,   2,  0))  
-                   ];// when your horizontal, up is really up; not all deformations need the same movePOV
- 
- var away        = [new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  200,   0,   0.3, new BABYLON.Vector3( 0, 1.5, 3.3)),
-                    new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  400,   0,  -0.2, new BABYLON.Vector3( 0, 1.5, 6.7)),
-                   ];// climbing forward; series repeat acceleration applied when queued to avoid jerk start
-                     // forward velocity: (3.3 + 6.7) / (200 + 400) = 0.016666 units / milli
- 
- var bankRight   = [new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  750,   0,   0.1, new BABYLON.Vector3(-2,   0, 16), new BABYLON.Vector3(0, .4,  .2)),
-                    new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  750,   0,  -0.2, new BABYLON.Vector3(-2,   0, 16), new BABYLON.Vector3(0, .4,  .2))  
-                   ];// twirl clockwise while tilting right; going left while on your right side is really up
-                     // forward velocity: (16 + 16) / (750 + 750) = 0.021333 units / milli
- 
- var backStretch = [new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  450,   0,   0.3, new BABYLON.Vector3( 0,   0, 12)),
-                    new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  450,   0,  -0.2, new BABYLON.Vector3( 0,   0, 12))  
-                   ];// need to make range (0.3 to -0.2), same as away, so can be seen so far away from camera
-                     // forward velocity: (12 + 12) / (450 + 450) = 0.026666 units / milli
- 
- var turnRight   = [new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  450,   0,  -0.1, new BABYLON.Vector3( 3,  0,  24), new BABYLON.Vector3(0, .6,   0)),
-                    new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  450,   0,  -0.2, new BABYLON.Vector3( 3,  0,  24), new BABYLON.Vector3(0, .6,   0)) 
-                   ];// twirl without aditional tilt; going right which starts to make it go down;
-                     // forward velocity: (24 + 24) / (450 + 450) = 0.053333 units / milli
- 
- var tiltToHoriz = [new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  250,   0,   0.3, new BABYLON.Vector3( 0,  -1,  8), new BABYLON.Vector3(0,  0, -.2)),
-                    new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  250,   0,  -0.1, new BABYLON.Vector3( 0,  -1,  8), new BABYLON.Vector3(0,  0, -.2))  
-                   ];// reverse the tilt from 'transRight' and 'bankRight'; down hill
-                     // forward velocity: (8 + 8) / (250 + 250) = 0.032 units / milli
- 
- var woosh       = [new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  400,   0  , 0.3, new BABYLON.Vector3( 12, -1, 25)),
-                    new BABYLON.Deformation("ENTIRE MESH", "DRAPED",  400,   0,  -0.1, new BABYLON.Vector3( 12, -1, 25))  
-                   ];// cross over right / down hill; eat your heart out Roddenberry
-                     // forward velocity: (25 + 25) / (400 + 400) = 0.0625 units / milli
- 
-                    // using the version of Deformation which does not default on the reference state, here "DRAPED", to going back to 'BASIS'
- var reset       = [new BABYLON.ReferenceDeformation("ENTIRE MESH", "DRAPED", "BASIS",  1, 0, 1), 
-                    function(){
-                         cloth.position = originalPos;
-                         cloth.rotation = originalRot;
-                         scene.activeCamera._getViewMatrix(); // jiggle camera to re-lock on target,  also done by ShapeKeyGroup.incrementallyDeform()
-                       	 var report = cloth.getTrackingReport();
-                       	 window.alert(report);
-                       	 console.log(report);
-                         setInAnim(false);
-                    } 
-                   ];                        
- /**
-  * @param {Array} _eventSeries - Elements must either be a ReferenceDeformation, Action, or function.  Min # of Deformations: 1
-  * @param {number} _nRepeats - Number of times to run through series elements.  There is sync across runs. (Default 1)
-  * @param {number} _initialWallclockProrating - The factor to multiply the duration of a Deformation before passing to a
-  *                 ShapeKeyGroup.  Amount is decreased or increased across repeats, so that it is 1 for the final repeat.
-  *                 Facilitates acceleration when > 1, & deceleration when < 1.  (Default 1)
-  * @param {string} _debug - Write progress messages to console when true (Default false)
-  */
-  //                                                                        first run
-  //                                                  Series    nRepeats    prorating             debug    
-var stretchSeries     = new BABYLON.AutomatonEventSeries(stretching , 2);
-var hardFlapSeries    = new BABYLON.AutomatonEventSeries(hardFlap   , 4);                        
-var awaySeries        = new BABYLON.AutomatonEventSeries(away       , 5     , 2.0                , true); // demo extra message     
-var bankRightSeries   = new BABYLON.AutomatonEventSeries(bankRight  , 3     , 0.021333 / 0.016666);   
-var backStretchSeries = new BABYLON.AutomatonEventSeries(backStretch, 2     , 0.026666 / 0.021333);
-var turnRightSeries   = new BABYLON.AutomatonEventSeries(turnRight  , 2     , 0.053333 / 0.026666);         
-var tiltToHorizSeries = new BABYLON.AutomatonEventSeries(tiltToHoriz, 3);            
-var wooshSeries       = new BABYLON.AutomatonEventSeries(woosh      , 3);            
-var resetSeries       = new BABYLON.AutomatonEventSeries(reset);            	
-
-function prep(sceneArg){
-	scene = sceneArg;
-	cloth = scene.getMeshByID("Cloth");
-	cloth.debug = true;
-	originalPos = cloth.position.clone();
-	originalRot = cloth.rotation.clone();
-
-	var entireGrp = cloth.getShapeKeyGroup("ENTIRE MESH");
-	entireGrp.mirrorAxisOnY(); // mirror on Y, so wings flapping up past horizontal created, using negative end state ratios 
-	
-	// set test to false to try to compare performance in final reports
-	if (1 === 1){
-    	entireGrp.addDerivedKey("BASIS", "DRAPED", -0.2);	
-    	entireGrp.addDerivedKey("BASIS", "DRAPED", -0.1);	
-    	entireGrp.addDerivedKey("BASIS", "DRAPED",  0.1);
-    	entireGrp.addDerivedKey("BASIS", "DRAPED",  0.3);
-    	entireGrp.addDerivedKey("BASIS", "DRAPED",  0.9);
-	}	
-}
-
-function setInAnim(inAnimArg){inAnim = inAnimArg;}
-
-function pausePlay() {
-	console.log("Requesting " + (cloth.isPaused() ? "resume" : "pause"));
-	// test instance pause-play
-	if (cloth.isPaused()) cloth.resumePlay();
-	else cloth.pausePlay();
-}
-
-function queueAnimation(){
-	if (inAnim){
-		console.log("queueAnimation while in progress ignored.");
-		return;
-	}
-	setInAnim(true);
-	 
-	 // the following calls return immediately, due to being put on the appropriate ShapeKeyGroup(s) queues
-     cloth.queueEventSeries(stretchSeries);
-     cloth.queueEventSeries(hardFlapSeries);                        
-     cloth.queueEventSeries(awaySeries);
-     cloth.queueEventSeries(bankRightSeries);   
-     cloth.queueEventSeries(backStretchSeries);
-     cloth.queueEventSeries(turnRightSeries);         
-     cloth.queueEventSeries(tiltToHorizSeries);            
-     cloth.queueEventSeries(wooshSeries);            
-     cloth.queueEventSeries(resetSeries);            
-}

+ 0 - 52
Exporters/Blender/blender-test/lib/mesh_parent_common.js

@@ -1,52 +0,0 @@
-/**
- *  central location for mesh_parent script, called by mesh_parent_JSON.html & mesh_parent_inline.html 
- */
-var breadMan;
-var ground;
-var meshes;
-var delta = new BABYLON.Vector3(0, 0, -.1);
-var running = true;
-var parenting = true;
-definedFacingForward = true;
-        
-function animate(scene){
-	if (!breadMan) breadMan = scene.getMeshByID("Gus");
-	if (!ground  ) ground   = scene.getMeshByID("Ground");
-	if (!meshes  ) meshes   = scene.meshes;
-	
-	if (running){
-		breadMan.rotation.y += 0.02;
-	    breadMan.rotation.z += 0.02;
-	    movePOV(0, 0, 0.1);
-	}        	
-}
-/**  "Borrowed" from Automaton
- * Perform relative position change from the the point of view of behind the front of the mesh.
- * This is performed taking into account the meshes current rotation, so you do not have to care.
- * @param {number} amountRight
- * @param {number} amountUp
- * @param {number} amountForward
- */
- function movePOV(amountRight, amountUp, amountForward) {
-     var rotMatrix = new BABYLON.Matrix();
-     var rotQuaternion = (breadMan.rotationQuaternion) ? breadMan.rotationQuaternion : BABYLON.Quaternion.RotationYawPitchRoll(breadMan.rotation.y, breadMan.rotation.x, breadMan.rotation.z);
-     rotQuaternion.toRotationMatrix(rotMatrix);
-     
-     var translationDelta = BABYLON.Vector3.Zero();
-     var defForwardMult = definedFacingForward ? -1 : 1;
-     BABYLON.Vector3.TransformCoordinatesFromFloatsToRef(amountRight * defForwardMult, amountUp, amountForward * defForwardMult, rotMatrix, translationDelta);
-     breadMan.position.addInPlace(translationDelta);
- };
- 
- function pausePlay() {
- 	running = !running;
- }
- 
- function orphanConceive() {
-	 parenting = !parenting;
-     for (index = 0; index < meshes.length; index++) {
-         var mesh = meshes[index];
-         if (mesh === breadMan || mesh === ground) continue;
-         mesh.parent = parenting ? breadMan : null;
-     }
- }

+ 0 - 134
Exporters/Blender/blender-test/lib/multi_group_common.js

@@ -1,134 +0,0 @@
-/**
- *  central location for multi_group script, called by multi_group_JSON.html & multi_group_inline.html 
- */
-
-var plane;
-function prep(scene){
-	plane = scene.getMeshByID("Plane");
-	plane.debug = true;
-
-	// pretty important when there are multiple groups moving at the same time to pre-define your keys
-	var leftGrp = plane.getShapeKeyGroup("LEFT");
-	leftGrp.mirrorAxisOnY();   // mirror on Y, so bump can also be a depression, using negative end state ratios
-	leftGrp.addDerivedKey("BASIS", "BUMP", -.2);	
-	leftGrp.addDerivedKey("BASIS", "BUMP",  .2);	
-
-	var middleGrp = plane.getShapeKeyGroup("MIDDLE");
-	middleGrp.mirrorAxisOnY(); // mirror on Y, so bump can also be a depression, using negative end state ratios
-	middleGrp.addDerivedKey("BASIS", "BUMP", -.2);	
-	middleGrp.addDerivedKey("BASIS", "BUMP",  .2);	
-
-	var rightGrp = plane.getShapeKeyGroup("RIGHT");
-	rightGrp.mirrorAxisOnY();  // mirror on Y, so bump can also be a depression, using negative end state ratios
-	rightGrp.addDerivedKey("BASIS", "BUMP", -.2);	
-	rightGrp.addDerivedKey("BASIS", "BUMP",  .2);	
-
-	// testing of AutomatonEventSeriesAction, trigger on a pick
-	var reset = [new BABYLON.ReferenceDeformation("LEFT"   ,"BUMP", "BASIS",  1, 0, 1),
-	             new BABYLON.ReferenceDeformation("RIGHT"  ,"BUMP", "BASIS",  1, 0, 1),
-	             new BABYLON.ReferenceDeformation("MIDDLE" ,"BUMP", "BASIS",  1, 0, 1),
-	             ];
-	var resetSeries = new BABYLON.AutomatonEventSeries(reset);
-	var resetAction = new BABYLON.AutomatonEventSeriesAction(BABYLON.ActionManager.OnPickTrigger, plane, resetSeries);
-	
-	plane.actionManager = new BABYLON.ActionManager(scene);
-	plane.actionManager.registerAction(resetAction);
-		
-}
-
-function left() {
-	boing("LEFT");
-}
-
-function middle() {
-	boing("MIDDLE");
-}
-
-function right() {
-	boing("RIGHT");
-}
-
-function boing(group){
-    /**
-     * sub-class of ReferenceDeformation, where the referenceStateName is Fixed to "BASIS"
-     * @param {string} shapeKeyGroupName -  Used by Automaton to place in the correct ShapeKeyGroup queue(s).
-     * @param {string} endStateName - Name of state key to deform to
-     * @param {number} milliDuration - The number of milli seconds the deformation is to be completed in
-     * @param {number} millisBefore - Fixed wait period, once a syncPartner (if any) is also ready (default 0)
-     * @param {number} endStateRatio - ratio of the end state to be obtained from reference state: -1 (mirror) to 1 (default 1)
-     * @param {Vector3} movePOV - Mesh movement relative to its current position/rotation to be performed at the same time (default null)
-     *                  right-up-forward
-     * @param {Vector3} rotatePOV - Incremental Mesh rotation to be performed at the same time (default null)
-     *                  flipBack-twirlClockwise-tiltRight
-     * @param {Pace} pace - Any Object with the function: getCompletionMilestone(currentDurationRatio) (default Pace.LINEAR)
-     */
-    //                                          Shape                               end-                                  flip back
-    //                                          Key                     dur-        state                                 twirl clockwise
-    //                                          Group          State    ation  wait ratio  right-up-forward               tilt right               pace
-    var stretch      = [new BABYLON.Deformation(group        ,"BUMP" ,  750,    0,   1.0), 
-                        new BABYLON.Deformation(group        ,"BUMP" ,  150,  100,   -.2)
-                       ];
-    
-    var vibrate      = [new BABYLON.Deformation(group        ,"BUMP" ,   75,    0,    .2), 
-                        new BABYLON.Deformation(group        ,"BUMP" ,   75,    0,   -.2),
-                       ];
-                     
-	var reset        = [new BABYLON.ReferenceDeformation(group  ,"BUMP", "BASIS",  50, 0, 1),
-                       ];
-	
-    plane.queueEventSeries(new BABYLON.AutomatonEventSeries(stretch));
-    plane.queueEventSeries(new BABYLON.AutomatonEventSeries(vibrate, 3, 0.8));
-    plane.queueEventSeries(new BABYLON.AutomatonEventSeries(reset));
-}
-
-function drumming() {
-	var dur = 75;
-	
-	// note right "BUMP" is in the opposite direction of left "BUMP", so down is > 0
-	var rightDown       = new BABYLON.ReferenceDeformation("RIGHT", "BASIS", "BUMP",  dur, 300,  .2); // starts too fast, & each subsequent down also needs to wait
-   	var rightLastDown   = new BABYLON.ReferenceDeformation("RIGHT", "BASIS", "BUMP",  dur, 300,  .2); // in sync with left, but delay for it after both are started
-	var rightUp         = new BABYLON.ReferenceDeformation("RIGHT", "BASIS", "BUMP",  dur,   0, -.2);
-	var rightHorizontal = new BABYLON.ReferenceDeformation("RIGHT", "BUMP", "BASIS",  dur,   0,   1);
-	var rightStall      = new BABYLON.ReferenceDeformation("RIGHT", "BUMP", "BASIS",    1, 150,   1); // same as rightHorizontal, so nothing happens (less CPU to wait)
-	
-   	var leftDown        = new BABYLON.ReferenceDeformation("LEFT" , "BASIS", "BUMP",  dur,   0, -.2);
-   	var leftUp          = new BABYLON.ReferenceDeformation("LEFT" , "BASIS", "BUMP",  dur,   0,  .2);
-	var leftHorizontal  = new BABYLON.ReferenceDeformation("LEFT" , "BUMP", "BASIS",  dur,   0,   1);
-   	
-   	// make last down beats a sync pair
-   	leftDown     .setSyncPartner(rightLastDown);
-   	rightLastDown.setSyncPartner(leftDown     );
-   	
-   	var series = [
-   	              // even though left is first in the series, sync will delay all lefts till rightLastDown is ready
-                  leftDown     , leftUp , leftHorizontal,
-   	              
-                  rightDown    , rightUp, rightHorizontal,
-                  rightDown    , rightUp, rightHorizontal,
-                  rightDown    , rightUp, rightHorizontal,
-                  rightLastDown, rightUp, rightHorizontal, rightStall
-   	             ];
-   	
-    plane.queueEventSeries(new BABYLON.AutomatonEventSeries(series, 3));
-}
-
-function conflict() {	
-	              // all three start at the same time, use delays for demo
-   	var series = [new BABYLON.Deformation("MIDDLE", "BUMP",  500, 1600,  1.0),
-   	              new BABYLON.Deformation("RIGHT" , "BUMP",  500,    0,  1.0),
-   	              new BABYLON.Deformation("LEFT"  , "BUMP",  500,    0,  1.0),
-   	              // functions and Actions run on the queue of the first series, in this case 'MIDDLE'
-                  function(){
-                      window.alert("Overlapping Shape Key Groups can exist, but it is up to the application programmer to manage, unlike here.\n\nAction test:  Pick mesh to reset");
-                  } 
-   	             ];
-
-    plane.queueEventSeries(new BABYLON.AutomatonEventSeries(series));
-}
-
-function pausePlay() {
-	console.log("Requesting " + (BABYLON.Automaton.isSystemPaused() ? "resume" : "pause"));
-	// test Automation system wide pause-play
-	if (BABYLON.Automaton.isSystemPaused()) BABYLON.Automaton.resumeSystem();
-   	else BABYLON.Automaton.pauseSystem();
-}

二进制
Exporters/Blender/blender-test/mesh_parent.png


+ 0 - 63
Exporters/Blender/blender-test/mesh_parent_JSON.html

@@ -1,63 +0,0 @@
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>mesh_parent</title>
-    <!-- edit path - name of babylon library as required -->
-    <script src="./lib/babylon.js"></script>
-    <script src="./lib/mesh_parent_common.js"></script>
-    <style>
-         html, body   { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } 
-         #renderCanvas{ width: 100%; height: 100%; } 
-         #button      {
-			color: white; background-color: Dimgray;
-			font-size: 14pt; font-weight: bold;
-			padding-left:4pt; padding-right:4pt;
-			
-			border: black outset 2pt; line-height: 2em;
-			cursor: pointer;
-		}     
-    </style>
-</head>
-<body>
-	<div id="buttonbar" style="background-color: Darkorange;">
-		<span id="button" onclick="pausePlay()"> Pause - Play </span>
-		<span id="button" onclick="orphanConceive()"> Orhpan - Conceive </span>
-	</div>
-<canvas id="renderCanvas"></canvas>
-<script>
-    if (BABYLON.Engine.isSupported()) {
-        var canvas = document.getElementById("renderCanvas");
-        var engine = new BABYLON.Engine(canvas, true);
-        console.log("Babylon version:  " + BABYLON.Engine.Version);
-
-        var url = "./TOB-out/"; // edit when .babylon / texture files in a different dir than html
-        BABYLON.SceneLoader.Load(url, "mesh_parent.babylon", engine, 
-            function (newScene) {
-                newScene.executeWhenReady(function () {
-                    // Attach camera to canvas inputs
-                    newScene.activeCamera.attachControl(canvas);
-                   
-                    // Once the scene is loaded, register a render loop
-                    engine.runRenderLoop(function() {
-                    	animate(newScene);
-                        newScene.render();
-                    });
-                });
-            },
-            function (progress) {
-                // To do: give progress feedback to user
-            }
-        );
-    }else{
-        alert("WebGL not supported in this browser.\n\n" + 
-              "If in Safari browser, check 'Show Develop menu in menu bar' on the Advanced tab of Preferences.  " +
-              "On the 'Develop' menu, check the 'Enable WebGL' menu item.");
-    }
-
-    //Resize
-    window.addEventListener("resize", function () {
-        engine.resize();
-    });
-</script>
-</body>
-</html>

+ 0 - 56
Exporters/Blender/blender-test/mesh_parent_inline.html

@@ -1,56 +0,0 @@
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>mesh_parent</title>
-    <!-- edit path - name of babylon library as required -->
-    <script src="./lib/babylon.js"></script>
-    <script src="./TOB-out/mesh_parent.js"></script>
-    <script src="./lib/mesh_parent_common.js"></script>
-    <style>
-         html, body   { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } 
-         #renderCanvas{ width: 100%; height: 100%; } 
-         #button      {
-			color: white; background-color: Dimgray;
-			font-size: 14pt; font-weight: bold;
-			padding-left:4pt; padding-right:4pt;
-			
-			border: black outset 2pt; line-height: 2em;
-			cursor: pointer;
-		}     
-    </style>
-</head>
-<body>
-	<div id="buttonbar" style="background-color: Darkorange;">
-		<span id="button" onclick="pausePlay()"> Pause - Play </span>
-		<span id="button" onclick="orphanConceive()"> Orhpan - Conceive </span>
-	</div>
-<canvas id="renderCanvas"></canvas>
-<script>
-    if (BABYLON.Engine.isSupported()) {
-        var canvas = document.getElementById("renderCanvas");
-        var engine = new BABYLON.Engine(canvas, true);
-        console.log("Babylon version:  " + BABYLON.Engine.Version);
-
-        var scene = new BABYLON.Scene(engine);
-        materialsRootDir = "./TOB-out"; // edit when texture files in a different dir than html
-        mesh_parent.initScene(scene, materialsRootDir);
-        scene.activeCamera.attachControl(canvas);
-        
-        engine.runRenderLoop(function () {
-            animate(scene);
-            scene.render();
-        });
-    }else{
-        alert("WebGL not supported in this browser.\n\n" + 
-              "If in Safari browser, check 'Show Develop menu in menu bar' on the Advanced tab of Preferences.  " +
-              "On the 'Develop' menu, check the 'Enable WebGL' menu item.");
-    }
-
-    //Resize
-    window.addEventListener("resize", function () {
-        engine.resize();
-    });
-    
-</script>
-</body>
-</html>

二进制
Exporters/Blender/blender-test/multi_group.png


+ 0 - 67
Exporters/Blender/blender-test/multi_group_JSON.html

@@ -1,67 +0,0 @@
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>multi_group</title>
-    <!-- edit path - name of babylon library as required -->
-    <script src="./lib/babylon.js"></script>
-    <script src="./lib/multi_group_common.js"></script>
-    <style>
-         html, body   { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } 
-         #renderCanvas{ width: 100%; height: 100%; } 
-         #button      {
-			color: white; background-color: Dimgray;
-			font-size: 14pt; font-weight: bold;
-			padding-left:4pt; padding-right:4pt;
-			
-			border: black outset 2pt; line-height: 2em;
-			cursor: pointer;
-		}     
-    </style>
-</head>
-<body>
-	<div id="buttonbar" style="background-color: Darkorange;">
-		<span id="button" onclick="pausePlay()"> Pause - Play </span>
-		<span id="button" onclick="left()"> Left </span>
-		<span id="button" onclick="middle()"> Middle </span>
-		<span id="button" onclick="right()"> Right </span>
-		<span id="button" onclick="drumming()"> Drumming </span>
-		<span id="button" onclick="conflict()"> Conflict </span>
-	</div>
-<canvas id="renderCanvas"></canvas>
-<script>
-    if (BABYLON.Engine.isSupported()) {
-        var canvas = document.getElementById("renderCanvas");
-        var engine = new BABYLON.Engine(canvas, true);
-        console.log("Babylon version:  " + BABYLON.Engine.Version);
-
-        var url = "./TOB-out/"; // edit when .babylon / texture files in a different dir than html
-        BABYLON.SceneLoader.Load(url, "multi_group.babylon", engine, 
-            function (newScene) {
-                newScene.executeWhenReady(function () {
-                	prep(newScene);
-                    // Attach camera to canvas inputs
-                    newScene.activeCamera.attachControl(canvas);
-
-                    // Once the scene is loaded, register a render loop
-                   engine.runRenderLoop(function () {
-                        newScene.render();
-                    });
-                });
-            },
-            function (progress) {
-                // To do: give progress feedback to user
-            }
-        );
-    }else{
-        alert("WebGL not supported in this browser.\n\n" + 
-              "If in Safari browser, check 'Show Develop menu in menu bar' on the Advanced tab of Preferences.  " +
-              "On the 'Develop' menu, check the 'Enable WebGL' menu item.");
-    }
-
-    //Resize
-    window.addEventListener("resize", function () {
-        engine.resize();
-    });
-</script>
-</body>
-</html>

+ 0 - 58
Exporters/Blender/blender-test/multi_group_inline.html

@@ -1,58 +0,0 @@
-<html>
-<head>
-    <meta charset="UTF-8">
-    <title>multi_group</title>
-    <!-- edit path - name of babylon library as required -->
-    <script src="./lib/babylon.js"></script>
-    <script src="./TOB-out/multi_group.js"></script>
-    <script src="./lib/multi_group_common.js"></script>
-    <style>
-         html, body   { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } 
-         #renderCanvas{ width: 100%; height: 100%; } 
-         #button      {
-			color: white; background-color: Dimgray;
-			font-size: 14pt; font-weight: bold;
-			padding-left:4pt; padding-right:4pt;
-			
-			border: black outset 2pt; line-height: 2em;
-			cursor: pointer;
-		}     
-    </style>
-</head>
-<body>
-	<div id="buttonbar" style="background-color: Darkorange;">
-		<span id="button" onclick="pausePlay()"> Pause - Play </span>
-		<span id="button" onclick="left()"> Left </span>
-		<span id="button" onclick="middle()"> Middle </span>
-		<span id="button" onclick="right()"> Right </span>
-		<span id="button" onclick="drumming()"> Drumming </span>
-		<span id="button" onclick="conflict()"> Conflict </span>
-	</div>
-<canvas id="renderCanvas"></canvas>
-<script>
-    if (BABYLON.Engine.isSupported()) {
-        var canvas = document.getElementById("renderCanvas");
-        var engine = new BABYLON.Engine(canvas, true);
-        console.log("Babylon version:  " + BABYLON.Engine.Version);
-
-        var scene = new BABYLON.Scene(engine);
-        materialsRootDir = "."; // edit when texture files in a different dir than html
-        multi_group.initScene(scene, materialsRootDir);
-        prep(scene);
-        scene.activeCamera.attachControl(canvas);
-        engine.runRenderLoop(function () {
-            scene.render();
-        });
-    }else{
-        alert("WebGL not supported in this browser.\n\n" + 
-              "If in Safari browser, check 'Show Develop menu in menu bar' on the Advanced tab of Preferences.  " +
-              "On the 'Develop' menu, check the 'Enable WebGL' menu item.");
-    }
-
-    //Resize
-    window.addEventListener("resize", function () {
-        engine.resize();
-    });
-</script>
-</body>
-</html>

+ 0 - 18
Exporters/Blender/blender-test/readme.md

@@ -1,18 +0,0 @@
-This directory is for regression testing of the Tower of Babel.  It is assumed that the add-in has already been installed & enabled in Blender.
-
-Place the version of babylon.js you wish to use in the 'lib' directory.  The earliest supported is 1.14.  All of the html files reference it as 'babylon.js' to avoid having to edit them.  FYI, the htmls write a message into the browser console, listing the version, in-case you forget.  This is also for any scripts which should be common across a _JSON & _inline.html pair.
-
-The 'blender-in' directory holds each of the .blend files.  The name reflects the main thing being tested.  Refer to the table below, for a more complete list of features being tested.
-
-The 'TOB-out' directory is where you should direct the .babylon/.js/.ts/.html/.log output from Blender.  This directory is isolated, so that everything can easily be deleted.  This ensures that you are not actually running with stuff exported previously.  This directory is empty in Github (except for a .gitignore), so each .html  in this directory will not run unless, you open Blender with the respective .blend & export to this directory.
-
-Speaking of htmls, this directory has a xxx_JSON.html & xxx_inline.html for each .blend.
-
-Here is the list of tests & secondary features they test:
-
-.blend       secondary features
------------- ------------------------------------------------------------------------------
-armature     skeletal animation
-automaton    Camera LockedTarget, Automaton's embedded Action Manager, Single ShapeKeyGroup
-camera_anim  Multi-materials, textures
-mesh_parent  Shadows

文件差异内容过多而无法显示
+ 1498 - 944
Exporters/Blender/io_export_babylon.py


文件差异内容过多而无法显示
+ 0 - 2575
Exporters/Blender/io_tower_of_babel.py


+ 4 - 0
Exporters/Blender/readme.md

@@ -13,6 +13,8 @@ The [Blender export plugin](http://blogs.msdn.com/b/eternalcoding/archive/2013/0
  * Check collisions
  * Gravity
  * Ellipsoid
+ * Animations
+ * All kind of Babylon.js cameras can be chosen from a custom dropdown list
 * **Lights**
  * Type (Point, directional (Sun), Spot, Hemispheric)
  * Name
@@ -23,6 +25,8 @@ The [Blender export plugin](http://blogs.msdn.com/b/eternalcoding/archive/2013/0
  * Energy
  * Diffuse color
  * Specular color
+ * Shadow maps (For directional lights)
+ * Animations
 * **Materials**
  * Name
  * Ambient color