) fails under swiftshader headless GL, so scene.executeWhenReady never resolves. The scene itself loads with no console/page errors and renders correctly in real browsers; verified manually.",
+ "timeoutMs": 120000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "Train",
+ "title": "Babylon.js - Train pure demo",
+ "legacyPath": "static/Demos/Train",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 60000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "GlowingEspilit",
+ "title": "Babylon.js - Glowing Espilit pure demo",
+ "legacyPath": "static/Demos/GlowingEspilit",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 60000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "Fresnel",
+ "title": "Babylon.js - Fresnel pure demo",
+ "legacyPath": "static/Demos/Fresnel",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 160
+ }
+ },
+ {
+ "slug": "Shadows",
+ "title": "Babylon.js - Shadows pure demo",
+ "legacyPath": "static/Demos/Shadows",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 120
+ }
+ },
+ {
+ "slug": "LOD",
+ "title": "Babylon.js - LOD pure demo",
+ "legacyPath": "static/Demos/LOD",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 120
+ }
+ },
+ {
+ "slug": "LookAt",
+ "title": "Babylon.js - LookAt pure demo",
+ "legacyPath": "static/Demos/LookAt",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 120
+ }
+ },
+ {
+ "slug": "Octree",
+ "title": "Babylon.js - Octree pure demo",
+ "legacyPath": "static/Demos/Octree",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 120
+ }
+ },
+ {
+ "slug": "PointLightShadowMap",
+ "title": "Babylon.js - Point light shadow map pure demo",
+ "legacyPath": "static/Demos/PointLightShadowMap",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 120
+ }
+ },
+ {
+ "slug": "Boom",
+ "title": "Babylon.js - Boom pure demo",
+ "legacyPath": "static/Demos/Boom",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 200
+ }
+ },
+ {
+ "slug": "VolumetricLightScattering",
+ "title": "Babylon.js - Volumetric Light Scattering pure demo",
+ "legacyPath": "static/Demos/VolumetricLightScattering",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 120
+ }
+ },
+ {
+ "slug": "AssetsManager",
+ "title": "Babylon.js - Assets manager pure demo",
+ "legacyPath": "static/Demos/AssetsManager",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "GUI",
+ "title": "Babylon.js - GUI pure demo",
+ "legacyPath": "static/Demos/GUI",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 120
+ }
+ },
+ {
+ "slug": "WaterMaterial",
+ "title": "Babylon.js - Water Material pure demo",
+ "legacyPath": "static/Demos/WaterMaterial",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 120
+ }
+ },
+ {
+ "slug": "CellShading",
+ "title": "Babylon.js - Cell Shading pure demo",
+ "legacyPath": "static/Demos/CellShading",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 120
+ }
+ },
+ {
+ "slug": "FireMaterial",
+ "title": "Babylon.js - Fire Material pure demo",
+ "legacyPath": "static/Demos/FireMaterial",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 120
+ }
+ },
+ {
+ "slug": "Fur",
+ "title": "Babylon.js - Fur pure demo",
+ "legacyPath": "static/Demos/Fur",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 20000,
+ "minimumColoredSamples": 120
+ }
+ },
+ {
+ "slug": "GLTF",
+ "title": "Babylon.js - GLTF pure demo",
+ "legacyPath": "static/Demos/GLTF",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 60000,
+ "minimumColoredSamples": 160
+ }
+ },
+ {
+ "slug": "GLTFMeshPrimitiveAttributeTest",
+ "title": "Babylon.js - Mesh primitive attribute test",
+ "legacyPath": "static/Demos/GLTFMeshPrimitiveAttributeTest",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 60000,
+ "minimumColoredSamples": 100
+ }
+ },
+ {
+ "slug": "GLTFNormals",
+ "title": "Babylon.js - Normals Test",
+ "legacyPath": "static/Demos/GLTFNormals",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 30000,
+ "minimumColoredSamples": 100
+ }
+ },
+ {
+ "slug": "Yeti",
+ "title": "Babylon.js - Yeti pure demo",
+ "legacyPath": "static/Demos/Yeti",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 60000,
+ "minimumColoredSamples": 160
+ }
+ },
+ {
+ "slug": "Offscreen",
+ "title": "Babylon.js - Worker mode pure demo",
+ "legacyPath": "static/Demos/Offscreen",
+ "sourceFiles": ["main.ts", "scene.ts", "worker.ts"],
+ "renderCheck": {
+ "timeoutMs": 45000,
+ "canvasSelector": "canvas",
+ "minimumCanvasCount": 2,
+ "minimumColoredSamples": 150
+ }
+ },
+ {
+ "slug": "Tunnel",
+ "title": "Babylon.js - Tunnel pure demo",
+ "legacyPath": "static/Demos/Tunnel",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 30000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "Particles2",
+ "title": "Babylon.js - Particles 2 pure demo",
+ "legacyPath": "static/Demos/Particles2",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 30000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "RefProbe",
+ "title": "Babylon.js - Reflection Probe pure demo",
+ "legacyPath": "static/Demos/RefProbe",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 45000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "SelfShadowing",
+ "title": "Babylon.js - Self Shadowing pure demo",
+ "legacyPath": "static/Demos/SelfShadowing",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 30000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "SoftShadows",
+ "title": "Babylon.js - Soft Shadows pure demo",
+ "legacyPath": "static/Demos/SoftShadows",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 45000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "Actions",
+ "title": "Babylon.js - Actions pure demo",
+ "legacyPath": "static/Demos/Actions",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 30000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "Starfield",
+ "title": "Babylon.js - Starfield pure demo",
+ "legacyPath": "static/Demos/Starfield",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 30000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "Polygon",
+ "title": "Babylon.js - Polygon pure demo",
+ "legacyPath": "static/Demos/Polygon",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 30000,
+ "minimumColoredSamples": 40
+ }
+ },
+ {
+ "slug": "Procedural",
+ "title": "Babylon.js - Procedural Textures pure demo",
+ "legacyPath": "static/Demos/Procedural",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 45000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "ExtrudePolygon",
+ "title": "Babylon.js - Extrude Polygon pure demo",
+ "legacyPath": "static/Demos/ExtrudePolygon",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 30000,
+ "minimumColoredSamples": 80
+ }
+ },
+ {
+ "slug": "SSAO",
+ "title": "Babylon.js - SSAO pure demo",
+ "legacyPath": "static/Demos/SSAO",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 45000,
+ "minimumColoredSamples": 60
+ }
+ },
+ {
+ "slug": "SSAO2",
+ "title": "Babylon.js - SSAO 2 pure demo",
+ "legacyPath": "static/Demos/SSAO2",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 45000,
+ "minimumColoredSamples": 60
+ }
+ },
+ {
+ "slug": "DragNDrop",
+ "title": "Babylon.js - Drag and Drop pure demo",
+ "legacyPath": "static/Demos/DragNDrop",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 30000,
+ "minimumColoredSamples": 60
+ }
+ },
+ {
+ "slug": "SPS",
+ "title": "Babylon.js - Solid Particle System pure demo",
+ "legacyPath": "static/Demos/SPS",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 45000,
+ "minimumColoredSamples": 60
+ }
+ },
+ {
+ "slug": "SPSCollisions",
+ "title": "Babylon.js - SPS Collisions pure demo",
+ "legacyPath": "static/Demos/SPSCollisions",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 30000,
+ "minimumColoredSamples": 60
+ }
+ },
+ {
+ "slug": "InstancedBones",
+ "title": "Babylon.js - Instanced Bones pure demo",
+ "legacyPath": "static/Demos/InstancedBones",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 45000,
+ "minimumColoredSamples": 60
+ }
+ },
+ {
+ "slug": "SponzaDynamicShadows",
+ "title": "Babylon.js - Sponza Dynamic Shadows pure demo",
+ "legacyPath": "static/Demos/SponzaDynamicShadows",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 60000,
+ "minimumColoredSamples": 60
+ }
+ },
+ {
+ "slug": "Instances2",
+ "title": "Babylon.js - Instances 2 pure demo",
+ "legacyPath": "static/Demos/Instances2",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 45000,
+ "minimumColoredSamples": 60
+ }
+ },
+ {
+ "slug": "Charting",
+ "title": "Babylon.js - Charting pure demo",
+ "legacyPath": "static/Demos/Charting",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 30000,
+ "minimumColoredSamples": 60
+ }
+ },
+ {
+ "slug": "MorphTargets",
+ "title": "Babylon.js - Morph Targets pure demo",
+ "legacyPath": "static/Demos/MorphTargets",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 30000,
+ "minimumColoredSamples": 40
+ }
+ },
+ {
+ "slug": "Dancers",
+ "title": "Babylon.js - Dancers pure demo",
+ "legacyPath": "static/Demos/Dancers",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 45000,
+ "minimumColoredSamples": 40
+ }
+ },
+ {
+ "slug": "Simplification",
+ "title": "Babylon.js - Simplification pure demo",
+ "legacyPath": "static/Demos/Simplification",
+ "sourceFiles": ["main.ts", "scene.ts"],
+ "renderCheck": {
+ "timeoutMs": 45000,
+ "minimumColoredSamples": 40
+ }
}
]
}
diff --git a/src/pureCompiledDemos/shared/demoRunner.ts b/src/pureCompiledDemos/shared/demoRunner.ts
index 1a6cf7de8..2c8177cdd 100644
--- a/src/pureCompiledDemos/shared/demoRunner.ts
+++ b/src/pureCompiledDemos/shared/demoRunner.ts
@@ -1,23 +1,41 @@
import {
RegisterAbstractEngineCubeTexture,
+ RegisterArcRotateCamera,
DepthRenderer,
Engine,
RegisterDepthRendererSceneComponent,
+ RegisterDirectionalLight,
RegisterEnginesExtensionsEngineCubeTexture,
RegisterEnginesExtensionsEngineDynamicTexture,
RegisterEnginesExtensionsEngineReadTexture,
+ RegisterFresnelParameters,
+ RegisterHemisphericLight,
+ RegisterLoadingScreen,
+ RegisterMultiMaterial,
RegisterOutlineRenderer,
+ RegisterPointLight,
Scene,
+ RegisterSpotLight,
RegisterStandardMaterial,
+ RegisterUniversalCamera,
} from "@babylonjs/core/pure";
void Scene;
// Required in pure builds so common demos don't rely on stripped side-effect registration.
RegisterAbstractEngineCubeTexture();
+RegisterArcRotateCamera();
+RegisterUniversalCamera();
+RegisterDirectionalLight();
+RegisterHemisphericLight();
+RegisterPointLight();
+RegisterSpotLight();
RegisterEnginesExtensionsEngineCubeTexture();
RegisterEnginesExtensionsEngineDynamicTexture();
RegisterEnginesExtensionsEngineReadTexture();
+RegisterLoadingScreen();
+RegisterFresnelParameters();
+RegisterMultiMaterial();
RegisterStandardMaterial();
RegisterDepthRendererSceneComponent(DepthRenderer);
RegisterOutlineRenderer();
diff --git a/static/Demos/Actions/actions.js b/static/Demos/Actions/actions.js
deleted file mode 100644
index bdbc3014d..000000000
--- a/static/Demos/Actions/actions.js
+++ /dev/null
@@ -1,149 +0,0 @@
-var CreateActionsTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, new BABYLON.Vector3(0, 0, 0), scene);
- camera.setPosition(new BABYLON.Vector3(20, 200, 400));
-
- camera.lowerBetaLimit = 0.1;
- camera.upperBetaLimit = (Math.PI / 2) * 0.99;
- camera.lowerRadiusLimit = 150;
-
- scene.clearColor = new BABYLON.Color3(0, 0, 0);
-
- var light1 = new BABYLON.PointLight("omni", new BABYLON.Vector3(0, 50, 0), scene);
- var light2 = new BABYLON.PointLight("omni", new BABYLON.Vector3(0, 50, 0), scene);
- var light3 = new BABYLON.PointLight("omni", new BABYLON.Vector3(0, 50, 0), scene);
-
- light1.diffuse = BABYLON.Color3.Red();
- light2.diffuse = BABYLON.Color3.Green();
- light3.diffuse = BABYLON.Color3.Blue();
-
- // Define states
- light1.state = "on";
- light2.state = "on";
- light3.state = "on";
-
- // Ground
- var ground = BABYLON.Mesh.CreateGround("ground", 1000, 1000, 1, scene, false);
- var groundMaterial = new BABYLON.StandardMaterial("ground", scene);
- groundMaterial.specularColor = BABYLON.Color3.Black();
- ground.material = groundMaterial;
-
- // Boxes
- var redBox = BABYLON.Mesh.CreateBox("red", 20, scene);
- var redMat = new BABYLON.StandardMaterial("ground", scene);
- redMat.diffuseColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- redMat.specularColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- redMat.emissiveColor = BABYLON.Color3.Red();
- redBox.material = redMat;
- redBox.position.x -= 100;
-
- var greenBox = BABYLON.Mesh.CreateBox("green", 20, scene);
- var greenMat = new BABYLON.StandardMaterial("ground", scene);
- greenMat.diffuseColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- greenMat.specularColor = new BABYLON.Color3(0.4, 0.4, 0.4);;
- greenMat.emissiveColor = BABYLON.Color3.Green();
- greenBox.material = greenMat;
- greenBox.position.z -= 100;
-
- var blueBox = BABYLON.Mesh.CreateBox("blue", 20, scene);
- var blueMat = new BABYLON.StandardMaterial("ground", scene);
- blueMat.diffuseColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- blueMat.specularColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- blueMat.emissiveColor = BABYLON.Color3.Blue();
- blueBox.material = blueMat;
- blueBox.position.x += 100;
-
- // Sphere
- var sphere = BABYLON.Mesh.CreateSphere("sphere", 16, 20, scene);
- var sphereMat = new BABYLON.StandardMaterial("ground", scene);
- sphereMat.diffuseColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- sphereMat.specularColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- sphereMat.emissiveColor = BABYLON.Color3.Purple();
- sphere.material = sphereMat;
- sphere.position.z += 100;
-
- // Rotating donut
- var donut = BABYLON.Mesh.CreateTorus("donut", 20, 8, 16, scene);
-
- // On pick interpolations
- var prepareButton = function (mesh, color, light) {
- var goToColorAction = new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnPickTrigger, light, "diffuse", color, 1000, null, true);
-
- mesh.actionManager = new BABYLON.ActionManager(scene);
- mesh.actionManager.registerAction(
- new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnPickTrigger, light, "diffuse", BABYLON.Color3.Black(), 1000))
- .then(new BABYLON.CombineAction(BABYLON.ActionManager.NothingTrigger, [ // Then is used to add a child action used alternatively with the root action.
- goToColorAction, // First click: root action. Second click: child action. Third click: going back to root action and so on...
- new BABYLON.SetValueAction(BABYLON.ActionManager.NothingTrigger, mesh.material, "wireframe", false)
- ]));
- mesh.actionManager.registerAction(new BABYLON.SetValueAction(BABYLON.ActionManager.OnPickTrigger, mesh.material, "wireframe", true))
- .then(new BABYLON.DoNothingAction());
- mesh.actionManager.registerAction(new BABYLON.SetStateAction(BABYLON.ActionManager.OnPickTrigger, light, "off"))
- .then(new BABYLON.SetStateAction(BABYLON.ActionManager.OnPickTrigger, light, "on"));
- }
-
- prepareButton(redBox, BABYLON.Color3.Red(), light1);
- prepareButton(greenBox, BABYLON.Color3.Green(), light2);
- prepareButton(blueBox, BABYLON.Color3.Blue(), light3);
-
- // Conditions
- sphere.actionManager = new BABYLON.ActionManager(scene);
- var condition1 = new BABYLON.StateCondition(sphere.actionManager, light1, "off");
- var condition2 = new BABYLON.StateCondition(sphere.actionManager, light1, "on");
-
- sphere.actionManager.registerAction(new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnLeftPickTrigger, camera, "alpha", 0, 500, condition1));
- sphere.actionManager.registerAction(new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnLeftPickTrigger, camera, "alpha", Math.PI, 500, condition2));
-
- // Over/Out
- var makeOverOut = function (mesh) {
- mesh.actionManager.registerAction(new BABYLON.SetValueAction(BABYLON.ActionManager.OnPointerOutTrigger, mesh.material, "emissiveColor", mesh.material.emissiveColor));
- mesh.actionManager.registerAction(new BABYLON.SetValueAction(BABYLON.ActionManager.OnPointerOverTrigger, mesh.material, "emissiveColor", BABYLON.Color3.White()));
- mesh.actionManager.registerAction(new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnPointerOutTrigger, mesh, "scaling", new BABYLON.Vector3(1, 1, 1), 150));
- mesh.actionManager.registerAction(new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnPointerOverTrigger, mesh, "scaling", new BABYLON.Vector3(1.1, 1.1, 1.1), 150));
- }
-
- makeOverOut(redBox);
- makeOverOut(greenBox);
- makeOverOut(blueBox);
- makeOverOut(sphere);
-
- // scene's actions
- scene.actionManager = new BABYLON.ActionManager(scene);
-
- var rotate = function (mesh) {
- scene.actionManager.registerAction(new BABYLON.IncrementValueAction(BABYLON.ActionManager.OnEveryFrameTrigger, mesh, "rotation.y", 0.01));
- }
-
- rotate(redBox);
- rotate(greenBox);
- rotate(blueBox);
-
- // Intersections
- donut.actionManager = new BABYLON.ActionManager(scene);
-
- donut.actionManager.registerAction(new BABYLON.SetValueAction(
- { trigger: BABYLON.ActionManager.OnIntersectionEnterTrigger, parameter: sphere },
- donut, "scaling", new BABYLON.Vector3(1.2, 1.2, 1.2)));
-
- donut.actionManager.registerAction(new BABYLON.SetValueAction(
- { trigger: BABYLON.ActionManager.OnIntersectionExitTrigger, parameter: sphere }
- , donut, "scaling", new BABYLON.Vector3(1, 1, 1)));
-
- // Keyboard
- scene.actionManager.registerAction(new BABYLON.ExecuteCodeAction(
- { trigger: BABYLON.ActionManager.OnKeyUpTrigger, parameter: "r" },
- function () {
- camera.setPosition(new BABYLON.Vector3(20, 200, 400));
- }));
-
- // Animations
- var alpha = 0;
- scene.registerBeforeRender(function () {
- donut.position.x = 100 * Math.cos(alpha);
- donut.position.y = 5;
- donut.position.z = 100 * Math.sin(alpha);
- alpha += 0.01;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Actions/demo.js b/static/Demos/Actions/demo.js
deleted file mode 100644
index 23a391110..000000000
--- a/static/Demos/Actions/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateActionsTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Actions/index.html b/static/Demos/Actions/index.html
deleted file mode 100644
index 27b4e276d..000000000
--- a/static/Demos/Actions/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Actions demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/AdvancedShadows/advancedShadows.js b/static/Demos/AdvancedShadows/advancedShadows.js
deleted file mode 100644
index bcf4af740..000000000
--- a/static/Demos/AdvancedShadows/advancedShadows.js
+++ /dev/null
@@ -1,218 +0,0 @@
-var CreateAdvancedShadowsTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.FreeCamera("Camera", new BABYLON.Vector3(20, 30, -100), scene);
-
- camera.attachControl(canvas, true);
-
- // Ground
- var ground01 = BABYLON.Mesh.CreateGround("Spotlight Hard Shadows", 24, 60, 1, scene, false);
- var ground02 = BABYLON.Mesh.CreateGround("Spotlight Poisson Sampling", 24, 60, 1, scene, false);
- var ground03 = BABYLON.Mesh.CreateGround("Spotlight ESM", 24, 60, 1, scene, false);
- var ground04 = BABYLON.Mesh.CreateGround("Spotlight Blur ESM", 24, 60, 1, scene, false);
-
- var ground11 = BABYLON.Mesh.CreateGround("Directional Hard Shadows", 24, 60, 1, scene, false);
- var ground12 = BABYLON.Mesh.CreateGround("Directional Poisson Sampling", 24, 60, 1, scene, false);
- var ground13 = BABYLON.Mesh.CreateGround("Directional ESM", 24, 60, 1, scene, false);
- var ground14 = BABYLON.Mesh.CreateGround("Directional Blur ESM", 24, 60, 1, scene, false);
-
- var groundMaterial = new BABYLON.StandardMaterial("ground", scene);
- groundMaterial.diffuseTexture = new BABYLON.Texture("/assets/ground.jpg", scene);
- groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- groundMaterial.emissiveColor = new BABYLON.Color3(0.2, 0.2, 0.2);
-
- ground01.material = groundMaterial;
- ground01.receiveShadows = true;
- ground01.position.x = -30;
- ground02.material = groundMaterial;
- ground02.receiveShadows = true;
- ground02.position.x = 0;
- ground03.material = groundMaterial;
- ground03.receiveShadows = true;
- ground03.position.x = 30;
- ground04.material = groundMaterial;
- ground04.receiveShadows = true;
- ground04.position.x = 60;
-
- ground11.material = groundMaterial;
- ground11.receiveShadows = true;
- ground11.position.z = 100;
- ground11.position.x = -30;
- ground12.material = groundMaterial;
- ground12.receiveShadows = true;
- ground12.position.z = 100;
- ground13.material = groundMaterial;
- ground13.receiveShadows = true;
- ground13.position.z = 100;
- ground13.position.x = 30;
- ground14.material = groundMaterial;
- ground14.receiveShadows = true;
- ground14.position.z = 100;
- ground14.position.x = 60;
-
-
- // --------- SPOTS -------------
- var light00 = new BABYLON.SpotLight("*spot00", new BABYLON.Vector3(-30, 20, -10), new BABYLON.Vector3(0, -1, 0.3), 1.2, 24, scene);
- var light01 = new BABYLON.SpotLight("*spot01", new BABYLON.Vector3(0, 20, -10), new BABYLON.Vector3(0, -1, 0.3), 1.2, 24, scene);
- var light02 = new BABYLON.SpotLight("*spot02", new BABYLON.Vector3(30, 20, -10), new BABYLON.Vector3(0, -1, 0.3), 1.2, 24, scene);
- var light03 = new BABYLON.SpotLight("*spot03", new BABYLON.Vector3(60, 20, -10), new BABYLON.Vector3(0, -1, 0.3), 1.2, 24, scene);
-
- // Boxes
- var box00 = BABYLON.Mesh.CreateBox("*box00", 5, scene, false);
- box00.position = new BABYLON.Vector3(-30, 5, 0);
- var box01 = BABYLON.Mesh.CreateBox("*box01", 5, scene, false);
- box01.position = new BABYLON.Vector3(0, 5, 0);
- var box02 = BABYLON.Mesh.CreateBox("*box02", 5, scene, false);
- box02.position = new BABYLON.Vector3(30, 5, 0);
- var box03 = BABYLON.Mesh.CreateBox("*box03", 5, scene, false);
- box03.position = new BABYLON.Vector3(60, 5, 0);
-
- var boxMaterial = new BABYLON.StandardMaterial("mat", scene);
- boxMaterial.diffuseColor = new BABYLON.Color3(1.0, 0, 0);
- boxMaterial.specularColor = new BABYLON.Color3(0.5, 0, 0);
- box00.material = boxMaterial;
- box01.material = boxMaterial;
- box02.material = boxMaterial;
- box03.material = boxMaterial;
-
- // Inclusions
- light00.includedOnlyMeshes.push(box00);
- light00.includedOnlyMeshes.push(ground01);
-
- light01.includedOnlyMeshes.push(box01);
- light01.includedOnlyMeshes.push(ground02);
-
- light02.includedOnlyMeshes.push(box02);
- light02.includedOnlyMeshes.push(ground03);
-
- light03.includedOnlyMeshes.push(box03);
- light03.includedOnlyMeshes.push(ground04);
-
- // Shadows
- var shadowGenerator00 = new BABYLON.ShadowGenerator(512, light00);
- shadowGenerator00.getShadowMap().renderList.push(box00);
-
- var shadowGenerator01 = new BABYLON.ShadowGenerator(512, light01);
- shadowGenerator01.getShadowMap().renderList.push(box01);
- shadowGenerator01.usePoissonSampling = true;
-
- var shadowGenerator02 = new BABYLON.ShadowGenerator(512, light02);
- shadowGenerator02.getShadowMap().renderList.push(box02);
- shadowGenerator02.useExponentialShadowMap = true;
-
- var shadowGenerator03 = new BABYLON.ShadowGenerator(512, light03);
- shadowGenerator03.getShadowMap().renderList.push(box03);
- shadowGenerator03.useBlurExponentialShadowMap = true;
- shadowGenerator03.blurBoxOffset = 2.0;
-
- // --------- DIRECTIONALS -------------
- var light04 = new BABYLON.DirectionalLight("*dir00", new BABYLON.Vector3(0, -0.6, 0.3), scene);
- var light05 = new BABYLON.DirectionalLight("*dir01", new BABYLON.Vector3(0, -0.6, 0.3), scene);
- var light06 = new BABYLON.DirectionalLight("*dir02", new BABYLON.Vector3(0, -0.6, 0.3), scene);
- var light07 = new BABYLON.DirectionalLight("*dir03", new BABYLON.Vector3(0, -0.6, 0.3), scene);
- light04.position = new BABYLON.Vector3(-30, 50, 60);
- light05.position = new BABYLON.Vector3(0, 50, 60);
- light06.position = new BABYLON.Vector3(30, 50, 60);
- light07.position = new BABYLON.Vector3(60, 50, 60);
-
- // Boxes
- var box04 = BABYLON.Mesh.CreateBox("*box04", 5, scene, false);
- box04.position = new BABYLON.Vector3(-30, 5, 100);
- var box05 = BABYLON.Mesh.CreateBox("*box05", 5, scene, false);
- box05.position = new BABYLON.Vector3(0, 5, 100);
- var box06 = BABYLON.Mesh.CreateBox("*box06", 5, scene, false);
- box06.position = new BABYLON.Vector3(30, 5, 100);
- var box07 = BABYLON.Mesh.CreateBox("*box07", 5, scene, false);
- box07.position = new BABYLON.Vector3(60, 5, 100);
-
- box04.material = boxMaterial;
- box05.material = boxMaterial;
- box06.material = boxMaterial;
- box07.material = boxMaterial;
-
- // Inclusions
- light04.includedOnlyMeshes.push(box04);
- light04.includedOnlyMeshes.push(ground11);
-
- light05.includedOnlyMeshes.push(box05);
- light05.includedOnlyMeshes.push(ground12);
-
- light06.includedOnlyMeshes.push(box06);
- light06.includedOnlyMeshes.push(ground13);
-
- light07.includedOnlyMeshes.push(box07);
- light07.includedOnlyMeshes.push(ground14);
-
- // Shadows
- var shadowGenerator04 = new BABYLON.ShadowGenerator(512, light04);
- shadowGenerator04.getShadowMap().renderList.push(box04);
-
- var shadowGenerator05 = new BABYLON.ShadowGenerator(512, light05);
- shadowGenerator05.getShadowMap().renderList.push(box05);
- shadowGenerator05.usePoissonSampling = true;
-
- var shadowGenerator06 = new BABYLON.ShadowGenerator(512, light06);
- shadowGenerator06.getShadowMap().renderList.push(box06);
- shadowGenerator06.useExponentialShadowMap = true;
-
- var shadowGenerator07 = new BABYLON.ShadowGenerator(512, light07);
- shadowGenerator07.getShadowMap().renderList.push(box07);
- shadowGenerator07.useBlurExponentialShadowMap = true;
-
- // Animations
- scene.registerBeforeRender(function () {
- box00.rotation.x += 0.01;
- box00.rotation.z += 0.02;
-
- box01.rotation.x += 0.01;
- box01.rotation.z += 0.02;
-
- box02.rotation.x += 0.01;
- box02.rotation.z += 0.02;
-
- box03.rotation.x += 0.01;
- box03.rotation.z += 0.02;
-
- box04.rotation.x += 0.01;
- box04.rotation.z += 0.02;
-
- box05.rotation.x += 0.01;
- box05.rotation.z += 0.02;
-
- box06.rotation.x += 0.01;
- box06.rotation.z += 0.02;
-
- box07.rotation.x += 0.01;
- box07.rotation.z += 0.02;
- });
-
- // Adding labels
- var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
-
-
- var addLabel = function(lights) {
- for (var i = 0; i < lights.length; i++) {
- var light = lights[i];
-
- var rect1 = new BABYLON.GUI.Rectangle();
- rect1.width = "120px";
- rect1.height = "40px";
- rect1.color = "white";
- rect1.fontSize = 12;
- rect1.thickness = 2;
- rect1.background = "Black";
- rect1.linkOffsetY = -50;
- advancedTexture.addControl(rect1);
- rect1.linkWithMesh(light);
-
- var label = new BABYLON.GUI.TextBlock();
- label.text = light.name;
- label.textWrapping = true;
- rect1.addControl(label);
- }
- }
-
- addLabel([ground01, ground02, ground03, ground04, ground11, ground12, ground13, ground14]);
-
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/AdvancedShadows/demo.js b/static/Demos/AdvancedShadows/demo.js
deleted file mode 100644
index 48fbad2e5..000000000
--- a/static/Demos/AdvancedShadows/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateAdvancedShadowsTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/AdvancedShadows/index.html b/static/Demos/AdvancedShadows/index.html
deleted file mode 100644
index 16dc1a0c1..000000000
--- a/static/Demos/AdvancedShadows/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Advanced Shadows demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/AssetsManager/assets.js b/static/Demos/AssetsManager/assets.js
deleted file mode 100644
index c83893360..000000000
--- a/static/Demos/AssetsManager/assets.js
+++ /dev/null
@@ -1,63 +0,0 @@
-"use strict";
-
-document.addEventListener("DOMContentLoaded", run, false);
-
-function run() {
- if (BABYLON.Engine.isSupported()) {
-
- BABYLON.Engine.ShadersRepository = "/Babylon/Shaders/";
-
- var canvas = document.getElementById("renderCanvas");
- var engine = new BABYLON.Engine(canvas, false);
-
- // Resize
- window.addEventListener("resize", function () {
- engine.resize();
- });
-
- // Scene, light and camera
- var scene = new BABYLON.Scene(engine);
- var light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(0, 1, 0), scene);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, Math.PI / 2, 100, new BABYLON.Vector3(0, 0, 0), scene);
- camera.attachControl(canvas, false);
-
- // Assets manager
- var assetsManager = new BABYLON.AssetsManager(scene);
-
- var meshTask = assetsManager.addMeshTask("skull task", "", "./", "skull.babylon");
-
- // You can handle success and error on a per-task basis (onSuccess, onError)
- meshTask.onSuccess = function (task) {
- task.loadedMeshes[0].position = new BABYLON.Vector3(0, 0, 0);
- }
-
- // But you can also do it on the assets manager itself (onTaskSuccess, onTaskError)
- assetsManager.onTaskError = function (task) {
- console.log("error while loading " + task.name);
- }
-
- // Text file and binary file can also be loaded in the same way
- var textTask = assetsManager.addTextFileTask("text task", "msg.txt");
- textTask.onSuccess = function(task) {
- console.log(task.text);
- }
-
- var binaryTask = assetsManager.addBinaryFileTask("binary task", "grass.jpg");
- binaryTask.onSuccess = function (task) {
- // Do something with task.data
- }
-
- assetsManager.onFinish = function (tasks) {
- engine.runRenderLoop(function () {
- scene.render();
- });
- };
-
-
- // Can now change loading background color:
- engine.loadingUIBackgroundColor = "Purple";
-
- // Just call load to initiate the loading sequence
- assetsManager.load();
- }
-};
\ No newline at end of file
diff --git a/static/Demos/AssetsManager/index.html b/static/Demos/AssetsManager/index.html
deleted file mode 100644
index 35fe3b30d..000000000
--- a/static/Demos/AssetsManager/index.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
- BabylonJS - Assets manager demo
-
-
-
-
-
-
-
-
-
diff --git a/static/Demos/Bones/bones.js b/static/Demos/Bones/bones.js
deleted file mode 100644
index cea7a54b4..000000000
--- a/static/Demos/Bones/bones.js
+++ /dev/null
@@ -1,61 +0,0 @@
-var CreateBonesTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0, -0.5, -1.0), scene);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, new BABYLON.Vector3(0, 30, 0), scene);
- camera.setPosition(new BABYLON.Vector3(20, 70, 120));
- light.position = new BABYLON.Vector3(20, 150, 70);
- camera.minZ = 10.0;
-
- scene.ambientColor = new BABYLON.Color3(0.3, 0.3, 0.3);
-
- // Ground
- var ground = BABYLON.Mesh.CreateGround("ground", 1000, 1000, 1, scene, false);
- var groundMaterial = new BABYLON.StandardMaterial("ground", scene);
- groundMaterial.diffuseColor = new BABYLON.Color3(0.2, 0.2, 0.2);
- groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- ground.material = groundMaterial;
- ground.receiveShadows = true;
-
- // Shadows
- var shadowGenerator = new BABYLON.ShadowGenerator(1024, light);
-
- // Meshes
- BABYLON.SceneLoader.ImportMesh("Rabbit", "../../assets/Rabbit/", "Rabbit.babylon", scene, function (newMeshes, particleSystems, skeletons) {
- var rabbit = newMeshes[1];
-
- rabbit.scaling = new BABYLON.Vector3(0.4, 0.4, 0.4);
- shadowGenerator.getShadowMap().renderList.push(rabbit);
-
- var rabbit2 = rabbit.clone("rabbit2");
- var rabbit3 = rabbit.clone("rabbit2");
-
- shadowGenerator.getShadowMap().renderList.push(rabbit2);
- shadowGenerator.getShadowMap().renderList.push(rabbit3);
-
- rabbit2.position = new BABYLON.Vector3(-50, 0, -20);
- rabbit2.skeleton = rabbit.skeleton.clone("clonedSkeleton");
-
- rabbit3.position = new BABYLON.Vector3(50, 0, -20);
- rabbit3.skeleton = rabbit.skeleton.clone("clonedSkeleton2");
-
- scene.beginAnimation(skeletons[0], 0, 100, true, 0.8);
- scene.beginAnimation(rabbit2.skeleton, 73, 100, true, 0.8);
- scene.beginAnimation(rabbit3.skeleton, 0, 72, true, 0.8);
-
- // Dude
- BABYLON.SceneLoader.ImportMesh("him", "../../assets/Dude/", "dude.babylon", scene, function (newMeshes2, particleSystems2, skeletons2) {
- var dude = newMeshes2[0];
-
- for (var index = 0; index < newMeshes2.length; index++) {
- shadowGenerator.getShadowMap().renderList.push(newMeshes2[index]);
- }
-
- dude.rotation.y = Math.PI;
- dude.position = new BABYLON.Vector3(0, 0, -80);
-
- scene.beginAnimation(skeletons2[0], 0, 100, true, 1.0);
- });
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Bones/demo.js b/static/Demos/Bones/demo.js
deleted file mode 100644
index 91cee2d41..000000000
--- a/static/Demos/Bones/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateBonesTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Bones/index.html b/static/Demos/Bones/index.html
deleted file mode 100644
index b307a4da6..000000000
--- a/static/Demos/Bones/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Bones demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Boom/boom.js b/static/Demos/Boom/boom.js
deleted file mode 100644
index 3e8d6b6b2..000000000
--- a/static/Demos/Boom/boom.js
+++ /dev/null
@@ -1,250 +0,0 @@
-var CreateBoomScene = function (engine) {
-
- // Particle parameters
- var size = 10; // particle size
- var widthNb = 30; // width particle number
- var heightNb = 20; // height particle number
- var gravity = -0.07; // gravity
- var restitution = 0.9; // energy restitution on ground collision ex : 0.6 => 60 %
- var friction = 0.995; // ground friction once the particle has landed
- var radius = size * heightNb / 12; // explosion radius
- var speed = radius * 1.2; // particle max speed
-
- // Ground parameters
- var subdivisions = 50;
- var width = 1000;
- var height = 1000;
- var groungHeight = width / 6;
-
- // Scene and camera
- var scene = new BABYLON.Scene(engine);
- scene.clearColor = new BABYLON.Color3(.4, .6, .8);
- var camera = new BABYLON.ArcRotateCamera("camera1", 0, 0, 0, new BABYLON.Vector3(0, 0, -0), scene);
- camera.setPosition(new BABYLON.Vector3(0, 0, -800));
- camera.attachControl(canvas, true);
-
- // Lights
- var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
- light.groundColor = new BABYLON.Color3(0.5, 0.5, 0.5);
- light.intensity = 0.2;
-
- var dir = new BABYLON.Vector3(0, -1, 1);
- var dirLight = new BABYLON.DirectionalLight("dl", dir, scene);
- dirLight.position = new BABYLON.Vector3(0, 200, -1000);
- dirLight.diffuse = BABYLON.Color3.White();
- dirLight.intensity = 0.8;
- dirLight.specular = new BABYLON.Color3(0.5, 0.5, 0.2);
-
- var pl = new BABYLON.PointLight("pl", new BABYLON.Vector3(0, 0, 0), scene);
- pl.diffuse = new BABYLON.Color3(1, 1, 1);
- pl.specular = BABYLON.Color3.Black();
- pl.intensity = 0.4;
-
- // Text
- var text = "BabylonJS Roxxx";
- var font = "bold 56px Arial";
- var tx = new BABYLON.DynamicTexture("dt", { width: 500, height: 65 }, scene);
- tx.hasAlpha = true;
- //var clearColor = "transparent";
- var clearColor = "red";
- tx.drawText(text, null, 45, font, "blue", clearColor, true, false);
- tx.drawText("CLICK = BOOM", null, 60, "bold 20px Arial", "yellow", null, true, true);
-
- var mat = new BABYLON.StandardMaterial("mat1", scene);
- mat.diffuseTexture = tx;
- mat.freeze();
-
- // Landscape
- // =========
-
- // Ground
- var quadsReady = false;
- // callback function to call when the ground is ready
- var setQuads = function (mesh) {
- quadsReady = true;
- mesh.getHeightAtCoordinates(mesh.position.x, mesh.position.z); // forces the underlying altitude array initialization
- };
- var options = { width: width, height: height, subdivisions: subdivisions, minHeight: 0, maxHeight: groungHeight, onReady: setQuads };
- var ground = BABYLON.MeshBuilder.CreateGroundFromHeightMap("ground", "/assets/heightMap.png", options, scene);
- var groundMaterial = new BABYLON.StandardMaterial("ground", scene);
- groundMaterial.diffuseTexture = new BABYLON.Texture("/assets/ground.jpg", scene);
- groundMaterial.diffuseTexture.uScale = 6;
- groundMaterial.diffuseTexture.vScale = 6;
- groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- ground.material = groundMaterial;
- ground.isPickable = false;
- ground.position.y = -heightNb * size;
- ground.position.z = heightNb * size;
- groundMaterial.freeze();
- ground.freezeWorldMatrix();
-
- // Disc
- var disc = BABYLON.MeshBuilder.CreateDisc("d", { radius: width * 4 }, scene);
- disc.position = ground.position;
- disc.position.y -= 0.1;
-
- disc.rotation.x = Math.PI / 2;
- var groundMaterial2 = new BABYLON.StandardMaterial("ground", scene);
- groundMaterial2.diffuseTexture = new BABYLON.Texture("/assets/ground.jpg", scene);
- groundMaterial2.diffuseTexture.uScale = 50;
- groundMaterial2.diffuseTexture.vScale = 50;
- groundMaterial2.specularColor = new BABYLON.Color3(0, 0, 0);
- groundMaterial2.zOffset = 1;
- groundMaterial2.freeze();
- disc.material = groundMaterial2;
- disc.isPickable = false;
- disc.freezeWorldMatrix();
-
- // SPS : the particles !
- var model = BABYLON.MeshBuilder.CreateBox("m", { size: size }, scene);
- var sps = new BABYLON.SolidParticleSystem("sps", scene, { isPickable: true });
- var nb = widthNb * heightNb;
- sps.addShape(model, nb);
- model.dispose();
- var s = sps.buildMesh();
- s.material = mat;
- s.freezeWorldMatrix();
-
- // SPS tmp internal vars to avoid memory re-allocations
- sps.vars.target = BABYLON.Vector3.Zero(); // the target point where to set the explosion center
- sps.vars.tmp = BABYLON.Vector3.Zero(); // tmp vector3
- sps.vars.totalWidth = size * widthNb; // wall width
- sps.vars.totalHeight = size * heightNb; // wall height
- sps.vars.shiftx = -sps.vars.totalWidth / 2; // shift value to center the wall on X
- sps.vars.shifty = -sps.vars.totalHeight / 2; // shift value to center the wall on Y
- sps.vars.radius = radius; // explosion radius
- sps.vars.minY = 0.0 // current ground altitude
- sps.vars.norm = BABYLON.Vector3.Zero(); // current ground normal
- sps.vars.sym = 0.0; // tmp for symetry computation around the normal
- sps.vars.loss = 0.0; // tmp float for energy loss
- sps.vars.justClicked = false; // flag to compute or not the initial velocities
-
- // Shadows : cast to the ground and to the disc
- var shadowGenerator = new BABYLON.ShadowGenerator(1024, dirLight);
- shadowGenerator.getShadowMap().renderList.push(s);
- shadowGenerator.setDarkness(0.2);
- shadowGenerator.usePoissonSampling = true;
- ground.receiveShadows = true;
- disc.receiveShadows = true;
-
- // SPS initializer: just set the particle along a vertical wall
- sps.initParticles = function (widthNb, heightNb, size) {
- var p = 0;
- for (var j = 0; j < heightNb; j++) {
- for (var i = 0; i < widthNb; i++) {
-
- // let's position the quads on a grid
- sps.particles[p].position.x = i * size + sps.vars.shiftx;
- sps.particles[p].position.y = j * size + sps.vars.shifty;
- sps.particles[p].position.z = 0;
-
- // let's set the texture per quad
- sps.particles[p].uvs.x = i * size / sps.vars.totalWidth;
- sps.particles[p].uvs.y = j * size / sps.vars.totalHeight;
- sps.particles[p].uvs.z = (i + 1) * size / sps.vars.totalWidth;
- sps.particles[p].uvs.w = (j + 1) * size / sps.vars.totalHeight;
-
- // set a custom random value per particle
- sps.particles[p].rand = 1 / (1 + Math.random()) / 10;
-
- // increment the particle index
- p++;
- }
- }
- }
-
- // SPS behavior : this function is called by setParticles() for each particle
- sps.updateParticle = function (p) {
-
- // just after the click, set once the initial velocity
- if (sps.vars.justClicked) {
- // let's give them an initial velocity according to their distance from the explosion center
- p.position.subtractToRef(sps.vars.target, sps.vars.tmp);
- var len = sps.vars.tmp.length();
- var scl = (len < 0.001) ? 1.0 : sps.vars.radius / len;
- sps.vars.tmp.normalize();
- p.velocity.x += sps.vars.tmp.x * scl * speed * (1 + Math.random() * .3);
- p.velocity.y += sps.vars.tmp.y * scl * speed * (1 + Math.random() * .3);
- p.velocity.z += sps.vars.tmp.z * scl * speed * (1 + Math.random() * .3);
- if (p.idx == sps.nbParticles - 1) {
- sps.vars.justClicked = false; // last particle initialized
- }
- }
-
- // move the particle
- if (boom && !sps.vars.justClicked) {
-
- sps.vars.minY = ground.getHeightAtCoordinates(p.position.x, p.position.z) + size; // get the current ground altitude beneath the particle
- sps.vars.loss = -restitution * p.rand * 10; // negate and attenuation
-
- if (p.position.y < sps.vars.minY) {
- // we compute the vector V2 symetric to the velocity vector V1 by the ground normal axis N : V2 = (2 * (N.V1) / ||N||²) * N - V1
- ground.getNormalAtCoordinatesToRef(p.position.x, p.position.z, sps.vars.norm); // get the ground normal
- sps.vars.sym = 2 * (sps.vars.norm.x * p.velocity.x + sps.vars.norm.y * p.velocity.y + sps.vars.norm.z * p.velocity.z) / sps.vars.norm.lengthSquared(); // 2 * (N.V1) / ||N||²
-
- p.velocity.x = sps.vars.sym * sps.vars.norm.x - p.velocity.x;
- p.velocity.z = sps.vars.sym * sps.vars.norm.z - p.velocity.z;
- p.velocity.y = sps.vars.sym * sps.vars.norm.y - p.velocity.y;
- p.velocity.x *= sps.vars.loss;
- p.velocity.y *= sps.vars.loss;
- p.velocity.z *= sps.vars.loss;
- }
-
- // move
- p.velocity.y += gravity;
- p.position.x += p.velocity.x;
- p.position.y += p.velocity.y;
- p.position.z += p.velocity.z;
-
- // rotate
- p.rotation.x += (p.velocity.z) * p.rand;
- p.rotation.y += (p.velocity.x) * p.rand;
- p.rotation.z += (p.velocity.y) * p.rand;
-
- // don't fall forever : beneath a certain y velocity limit, prevent the particle from bouncing or falling and apply the ground friction
- if (p.position.y < sps.vars.minY && Math.abs(p.velocity.y) < 0.1 - gravity) {
- p.velocity.x *= friction;
- p.velocity.z *= friction;
- p.position.y = sps.vars.minY;
- p.velocity.y = 0;
- }
- }
- };
-
- // If we want the shadows to fit the bounding box, we need to update it once per frame
- sps.afterUpdateParticles = function () {
- this.refreshVisibleSize();
- };
-
-
- // Init sps
- sps.initParticles(widthNb, heightNb, size); // compute initial particle positions
- sps.setParticles(); // set them
- sps.computeParticleColor = false; // the colors won't change
- sps.computeParticleTexture = false; // nor the texture now
-
- // Boom trigger
- var boom = false;
- scene.onPointerDown = function (evt, pickResult) {
- var faceId = pickResult.faceId;
- if (faceId == -1) { return; }
- var idx = sps.pickedParticles[faceId].idx;
- var p = sps.particles[idx];
- boom = true;
- // set the target (explosion center) at the distance "radius" from the picked particle on the camera-particle axis
- camera.position.subtractToRef(p.position, sps.vars.target);
- sps.vars.target.normalize();
- sps.vars.target.scaleInPlace(radius);
- sps.vars.target.addInPlace(p.position);
- sps.vars.justClicked = true;
- }
-
- // Animation
- // scene.debugLayer.show();
- scene.registerBeforeRender(function () {
- sps.setParticles();
- pl.position = camera.position;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Boom/demo.js b/static/Demos/Boom/demo.js
deleted file mode 100644
index c7f388c43..000000000
--- a/static/Demos/Boom/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateBoomScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Boom/index.html b/static/Demos/Boom/index.html
deleted file mode 100644
index f5259ee26..000000000
--- a/static/Demos/Boom/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Boom demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Bump/bump.js b/static/Demos/Bump/bump.js
deleted file mode 100644
index adf2aefb2..000000000
--- a/static/Demos/Bump/bump.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var CreateBumpScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(20, 100, 2), scene);
- var sphere = BABYLON.Mesh.CreateSphere("Sphere", 16, 3, scene);
- var material = new BABYLON.StandardMaterial("kosh", scene);
- material.bumpTexture = new BABYLON.Texture("normalMap.jpg", scene);
- material.bumpTexture.level = 1.0;
- material.diffuseColor = new BABYLON.Color3(1, 0, 0);
-
- sphere.material = material;
-
- camera.setPosition(new BABYLON.Vector3(-5, 5, 0));
-
- // Animations
- scene.registerBeforeRender(function() {
- sphere.rotation.y += 0.02;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Bump/demo.js b/static/Demos/Bump/demo.js
deleted file mode 100644
index fe9ee55b3..000000000
--- a/static/Demos/Bump/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateBumpScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Bump/index.html b/static/Demos/Bump/index.html
deleted file mode 100644
index 446f133e5..000000000
--- a/static/Demos/Bump/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Bump demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/CSG/csg.js b/static/Demos/CSG/csg.js
deleted file mode 100644
index aaf220b94..000000000
--- a/static/Demos/CSG/csg.js
+++ /dev/null
@@ -1,64 +0,0 @@
-var CreateCSGTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0, -0.5, -1.0), scene);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, new BABYLON.Vector3(0, 0, 0), scene);
- camera.setPosition(new BABYLON.Vector3(10, 10, 10));
- light.position = new BABYLON.Vector3(20, 150, 70);
- camera.minZ = 10.0;
-
- scene.ambientColor = new BABYLON.Color3(0.3, 0.3, 0.3);
-
- var sourceMat = new BABYLON.StandardMaterial("sourceMat", scene);
- sourceMat.wireframe = true;
- sourceMat.backFaceCulling = false;
-
- var a = BABYLON.Mesh.CreateSphere("sphere", 16, 4, scene);
- var b = BABYLON.Mesh.CreateBox("box", 4, scene);
- var c = BABYLON.Mesh.CreateBox("box", 4, scene);
-
- a.material = sourceMat;
- b.material = sourceMat;
- c.material = sourceMat;
-
- a.position.y += 5;
- b.position.y += 2.5;
- c.position.y += 3.5;
- c.rotation.y += Math.PI / 8.0;
-
- var aCSG = BABYLON.CSG.FromMesh(a);
- var bCSG = BABYLON.CSG.FromMesh(b);
- var cCSG = BABYLON.CSG.FromMesh(c);
-
- // Set up a MultiMaterial
- var mat0 = new BABYLON.StandardMaterial("mat0", scene);
- var mat1 = new BABYLON.StandardMaterial("mat1", scene);
-
- mat0.diffuseColor.copyFromFloats(0.8, 0.2, 0.2);
- mat0.backFaceCulling = false;
-
- mat1.diffuseColor.copyFromFloats(0.2, 0.8, 0.2);
- mat1.backFaceCulling = false;
-
- var subCSG = bCSG.subtract(aCSG);
- var newMesh = subCSG.toMesh("csg", mat0, scene);
- newMesh.position = new BABYLON.Vector3(-10, 0, 0);
-
- subCSG = aCSG.subtract(bCSG);
- newMesh = subCSG.toMesh("csg2", mat0, scene);
- newMesh.position = new BABYLON.Vector3(10, 0, 0);
-
- subCSG = aCSG.intersect(bCSG);
- newMesh = subCSG.toMesh("csg3", mat0, scene);
- newMesh.position = new BABYLON.Vector3(0, 0, 10);
-
- // Submeshes are built in order : mat0 will be for the first cube, and mat1 for the second
- var multiMat = new BABYLON.MultiMaterial("multiMat", scene);
- multiMat.subMaterials.push(mat0, mat1);
-
- // Last parameter to true means you want to build 1 subMesh for each mesh involved
- subCSG = bCSG.subtract(cCSG);
- newMesh = subCSG.toMesh("csg4", multiMat, scene, true);
- newMesh.position = new BABYLON.Vector3(0, 0, -10);
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/CSG/demo.js b/static/Demos/CSG/demo.js
deleted file mode 100644
index 456f69875..000000000
--- a/static/Demos/CSG/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateCSGTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/CSG/index.html b/static/Demos/CSG/index.html
deleted file mode 100644
index 117fe5f1a..000000000
--- a/static/Demos/CSG/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Constructive Solid Geometries demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/CellShading/cellShading.js b/static/Demos/CellShading/cellShading.js
deleted file mode 100644
index a6503bd3b..000000000
--- a/static/Demos/CellShading/cellShading.js
+++ /dev/null
@@ -1,49 +0,0 @@
-var CreateCellShadingScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var light = new BABYLON.PointLight("point01", new BABYLON.Vector3(0, 8, 0), scene);
- var camera = new BABYLON.FreeCamera("camera", new BABYLON.Vector3(0, 10, 7), scene);
- camera.setTarget(BABYLON.Vector3.Zero());
- camera.speed = 0.4;
-
- scene.ambientColor = new BABYLON.Color3(0, 0, 0);
- scene.clearColor = new BABYLON.Color3(0, 0, 0);
-
- // Ground
- var groundCellMaterial = new BABYLON.CellMaterial("cell", scene);
- groundCellMaterial.backFaceCulling = false;
- groundCellMaterial.diffuseTexture = new BABYLON.Texture("../../assets/albedo.png", scene);
- groundCellMaterial.diffuseTexture.uScale = 16;
- groundCellMaterial.diffuseTexture.vScale = 16;
- groundCellMaterial.computeHighLevel = true;
-
- var ground = BABYLON.Mesh.CreateGround("ground", 100, 100, 100, scene);
- ground.material = groundCellMaterial;
-
- // Torus
- var cellMaterial = new BABYLON.CellMaterial("cell", scene);
- cellMaterial.backFaceCulling = false;
- cellMaterial.diffuseColor = new BABYLON.Color3(1, 1, 1);
- cellMaterial.diffuseTexture = new BABYLON.Texture("/assets/wood.jpg", scene);
- cellMaterial.diffuseTexture.uScale = 3;
- cellMaterial.diffuseTexture.vScale = 3;
- cellMaterial.computeHighLevel = true;
-
- var knot = BABYLON.Mesh.CreateTorusKnot("knot", 1, 0.4, 128, 64, 2, 3, scene);
- knot.position.y = 3;
- knot.material = cellMaterial;
-
- var range = 60;
- var count = 100;
- for (var index = 0; index < count; index++) {
- var newInstance = knot.createInstance("i" + index);
- var x = range / 2 - Math.random() * range;
- var z = range / 2 - Math.random() * range;
- var y = 3;
-
- newInstance.position = new BABYLON.Vector3(x, y, z);
- newInstance.rotate(BABYLON.Axis.Y, Math.random() * Math.PI * 2, BABYLON.Space.WORLD);
- newInstance.scaling = new BABYLON.Vector3(1, 1, 1);
- }
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/CellShading/demo.js b/static/Demos/CellShading/demo.js
deleted file mode 100644
index 5a1258361..000000000
--- a/static/Demos/CellShading/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateCellShadingScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/CellShading/index.html b/static/Demos/CellShading/index.html
deleted file mode 100644
index 8fecb0239..000000000
--- a/static/Demos/CellShading/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Cell Shading demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Charting/charting.js b/static/Demos/Charting/charting.js
deleted file mode 100644
index 36aff3843..000000000
--- a/static/Demos/Charting/charting.js
+++ /dev/null
@@ -1,130 +0,0 @@
-var CreateChartingTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0, -0.5, 1.0), scene);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- camera.setPosition(new BABYLON.Vector3(20, 70, -100));
- light.position = new BABYLON.Vector3(0, 25, -50);
-
- // Data
- var scale = 0.6;
- var operatingSystem_Series = [
- { label: "Macintosh", value: 12, color: new BABYLON.Color3(0, 1, 0) },
- { label: "Windows", value: 77, color: new BABYLON.Color3(1, 0, 0) },
- { label: "Linux", value: 4, color: new BABYLON.Color3(1, 0, 1) },
- { label: "iOS", value: 3, color: new BABYLON.Color3(1, 1, 0) },
- { label: "Android", value: 2, color: new BABYLON.Color3(0, 0, 1) },
- { label: "Win Phone", value: 1, color: new BABYLON.Color3(1, 1, 1) }
- ];
-
- var browsers_Series = [
- { label: "IE", value: 32, color: new BABYLON.Color3(0, 0, 1) },
- { label: "Chrome", value: 28, color: new BABYLON.Color3(1, 0, 0) },
- { label: "Firefox", value: 16, color: new BABYLON.Color3(1, 0, 1) },
- { label: "Opera", value: 14, color: new BABYLON.Color3(1, 1, 0) },
- { label: "Safari", value: 10, color: new BABYLON.Color3(0, 1, 1) }
- ];
-
- var playgroundSize = 100;
- // Background
- var background = BABYLON.Mesh.CreatePlane("background", playgroundSize, scene, false);
- background.material = new BABYLON.StandardMaterial("background", scene);
- background.scaling.y = 0.5;
- background.position.z = playgroundSize / 2 - 0.5;
- background.position.y = playgroundSize / 4;
- background.receiveShadows = true;
- var backgroundTexture = new BABYLON.DynamicTexture("dynamic texture", 512, scene, true);
- background.material.diffuseTexture = backgroundTexture;
- background.material.specularColor = new BABYLON.Color3(0, 0, 0);
- background.material.backFaceCulling = false;
-
- backgroundTexture.drawText("Eternalcoding", null, 80, "bold 70px Segoe UI", "white", "#555555");
- backgroundTexture.drawText("- browsers statistics -", null, 250, "35px Segoe UI", "white", null);
- //background.material.reflectionTexture = new BABYLON.MirrorTexture("mirror", 1024, scene, true);
- //background.material.reflectionTexture.mirrorPlane = new BABYLON.Plane(0, 0, 1.0, -playgroundSize / 2 + 0.5);
- //background.material.reflectionTexture.level = 0.5;
-
- // Ground
- var ground = BABYLON.Mesh.CreateGround("ground", playgroundSize, playgroundSize, 1, scene, false);
- var groundMaterial = new BABYLON.StandardMaterial("ground", scene);
- groundMaterial.diffuseColor = new BABYLON.Color3(0.5, 0.5, 0.5);
- groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- ground.material = groundMaterial;
- ground.receiveShadows = true;
- ground.position.y = -0.1;
- //background.material.reflectionTexture.renderList.push(ground);
-
- var shadowGenerator = new BABYLON.ShadowGenerator(1024, light);
- shadowGenerator.usePoissonSampling = true;
-
- var createSeries = function (series) {
- var margin = 2;
- var offset = playgroundSize / (series.length) - margin;
- var x = -playgroundSize / 2 + offset / 2;
-
- for (var index = 0; index < series.length; index++) {
- var data = series[index];
-
- var bar = BABYLON.Mesh.CreateBox(data.label, 1.0, scene, false);
- bar.scaling = new BABYLON.Vector3(offset / 2.0, 0, offset / 2.0);
- bar.position.x = x;
- bar.position.y = 0;
-
- // Animate a bit
- var animation = new BABYLON.Animation("anim", "scaling", 30, BABYLON.Animation.ANIMATIONTYPE_VECTOR3);
- animation.setKeys([
- { frame: 0, value: new BABYLON.Vector3(offset / 2.0, 0, offset / 2.0) },
- { frame: 100, value: new BABYLON.Vector3(offset / 2.0, data.value * scale, offset / 2.0) }]);
- bar.animations.push(animation);
-
- animation = new BABYLON.Animation("anim2", "position.y", 30, BABYLON.Animation.ANIMATIONTYPE_FLOAT);
- animation.setKeys([
- { frame: 0, value: 0 },
- { frame: 100, value: (data.value * scale) / 2 }]);
- bar.animations.push(animation);
- scene.beginAnimation(bar, 0, 100, false, 2.0);
-
- // Material
- bar.material = new BABYLON.StandardMaterial(data.label + "mat", scene);
- bar.material.diffuseColor = data.color;
- bar.material.emissiveColor = data.color.scale(0.3);
- bar.material.specularColor = new BABYLON.Color3(0, 0, 0);
-
- // Shadows
- shadowGenerator.getShadowMap().renderList.push(bar);
-
- // Mirror
- // background.material.reflectionTexture.renderList.push(bar);
-
- // Legend
- var barLegend = BABYLON.Mesh.CreateGround(data.label + "Legend", playgroundSize / 2, offset * 2, 1, scene, false);
- barLegend.position.x = x;
- barLegend.position.z = -playgroundSize / 4;
- barLegend.rotation.y = Math.PI / 2;
-
- barLegend.material = new BABYLON.StandardMaterial(data.label + "LegendMat", scene);
- var barLegendTexture = new BABYLON.DynamicTexture("dynamic texture", 512, scene, true);
- barLegendTexture.hasAlpha = true;
- barLegend.material.diffuseTexture = barLegendTexture;
- barLegend.material.emissiveColor = new BABYLON.Color3(0.4, 0.4, 0.4);
-
- var size = barLegendTexture.getSize();
- barLegendTexture.drawText(data.label + " (" + data.value + "%)", 80, size.height / 2 + 30, "bold 50px Segoe UI", "white", "transparent");
- // background.material.reflectionTexture.renderList.push(barLegend);
-
- // Going next
- x += offset + margin;
- }
- };
-
- createSeries(browsers_Series);
-
- // Limit camera
- camera.lowerAlphaLimit = Math.PI;
- camera.upperAlphaLimit = 2 * Math.PI;
- camera.lowerBetaLimit = 0.1;
- camera.upperBetaLimit = (Math.PI / 2) * 0.99;
- camera.lowerRadiusLimit = 5;
- camera.upperRadiusLimit = 150;
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Charting/demo.js b/static/Demos/Charting/demo.js
deleted file mode 100644
index 62d457f96..000000000
--- a/static/Demos/Charting/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateChartingTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Charting/index.html b/static/Demos/Charting/index.html
deleted file mode 100644
index 5f11afee4..000000000
--- a/static/Demos/Charting/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Charting demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/CustomRenderTarget/customRenderTarget.js b/static/Demos/CustomRenderTarget/customRenderTarget.js
deleted file mode 100644
index d3d0f6dd7..000000000
--- a/static/Demos/CustomRenderTarget/customRenderTarget.js
+++ /dev/null
@@ -1,103 +0,0 @@
-var CreateCustomRenderTargetTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var material = new BABYLON.StandardMaterial("kosh", scene);
- material.diffuseColor = BABYLON.Color3.Purple();
- var light = new BABYLON.PointLight("Omni0", new BABYLON.Vector3(-17.6, 18.8, -49.9), scene);
-
- camera.setPosition(new BABYLON.Vector3(-15, 10, -20));
- camera.minZ = 1.0;
- camera.maxZ = 120.0;
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 100.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/TropicalSunnyDay", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
-
- // depth material
- BABYLON.Effect.ShadersStore["customDepthVertexShader"] =
- "#ifdef GL_ES\n" +
- "precision highp float;\n" +
- "#endif\n" +
- "attribute vec3 position;\n" +
- "uniform mat4 worldViewProjection;\n" +
- "void main(void) {\n" +
- "gl_Position = worldViewProjection * vec4(position, 1.0);\n" +
- "}";
- BABYLON.Effect.ShadersStore["customDepthPixelShader"] =
- "#ifdef GL_ES\n" +
- "precision highp float;\n" +
- "#endif\n" +
-
- "void main(void) {\n" +
- "float depth = 1.0 - (2.0 / (100.0 + 1.0 - gl_FragCoord.z * (100.0 - 1.0)));\n" +
- "gl_FragColor = vec4(depth, depth, depth, 1.0);\n" +
- "}\n" +
- "";
-
- var depthMaterial = new BABYLON.ShaderMaterial("customDepth", scene, "customDepth",
- {
- attributes: ["position"],
- uniforms: ["worldViewProjection"]
- });
-
- depthMaterial.backFaceCulling = false;
-
- // Plane
- var plane = BABYLON.Mesh.CreatePlane("map", 10, scene);
- plane.billboardMode = BABYLON.AbstractMesh.BILLBOARDMODE_ALL;
- plane.scaling.y = 1.0 / engine.getAspectRatio(scene.activeCamera);
-
- // Render target
- var renderTarget = new BABYLON.RenderTargetTexture("depth", 1024, scene, true);
- renderTarget.renderList.push(skybox);
- scene.customRenderTargets.push(renderTarget);
-
- renderTarget.onBeforeRender = function () {
- for (var index = 0; index < renderTarget.renderList.length; index++) {
- renderTarget.renderList[index]._savedMaterial = renderTarget.renderList[index].material;
- renderTarget.renderList[index].material = depthMaterial;
- }
- }
-
- renderTarget.onAfterRender = function () {
- // Restoring previoux material
- for (var index = 0; index < renderTarget.renderList.length; index++) {
- renderTarget.renderList[index].material = renderTarget.renderList[index]._savedMaterial;
- }
- }
-
- // Spheres
- var spheresCount = 20;
- var alpha = 0;
- for (var index = 0; index < spheresCount; index++) {
- var sphere = BABYLON.Mesh.CreateSphere("Sphere" + index, 32, 3, scene);
- sphere.position.x = 10 * Math.cos(alpha);
- sphere.position.z = 10 * Math.sin(alpha);
- sphere.material = material;
-
- alpha += (2 * Math.PI) / spheresCount;
-
- renderTarget.renderList.push(sphere);
- }
-
- // Plane material
- var mat = new BABYLON.StandardMaterial("plan mat", scene);
- mat.emissiveTexture = renderTarget;
- mat.disableLighting = true;
-
- plane.material = mat;
-
- // Animations
- scene.registerBeforeRender(function () {
- camera.alpha += 0.01 * scene.getAnimationRatio();
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/CustomRenderTarget/demo.js b/static/Demos/CustomRenderTarget/demo.js
deleted file mode 100644
index 537f078a2..000000000
--- a/static/Demos/CustomRenderTarget/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateCustomRenderTargetTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/CustomRenderTarget/index.html b/static/Demos/CustomRenderTarget/index.html
deleted file mode 100644
index d43daa031..000000000
--- a/static/Demos/CustomRenderTarget/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Custom Render Target demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/CustomShader/cellShading.js b/static/Demos/CustomShader/cellShading.js
deleted file mode 100644
index ebae5d42a..000000000
--- a/static/Demos/CustomShader/cellShading.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var CreateCellShadingScene = function (engine) {
-
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, Math.PI / 4, 40, BABYLON.Vector3.Zero(), scene);
- var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(20, 100, 2), scene);
- var sphere = BABYLON.Mesh.CreateSphere("Sphere0", 32, 3, scene);
- var cylinder = BABYLON.Mesh.CreateCylinder("Sphere1", 5, 3, 2, 32, 1, scene);
- var torus = BABYLON.Mesh.CreateTorus("Sphere2", 3, 1, 32, scene);
-
- var cellShadingMaterial = new BABYLON.ShaderMaterial("cellShading", scene, "../../assets/shaders/cellShading",
- {
- uniforms: ["world", "viewProjection"],
- samplers: ["textureSampler"]
- });
- cellShadingMaterial.setTexture("textureSampler", new BABYLON.Texture("../../assets/Ground.jpg", scene))
- .setVector3("vLightPosition", light.position)
- .setFloats("ToonThresholds", [0.95, 0.5, 0.2, 0.03])
- .setFloats("ToonBrightnessLevels", [1.0, 0.8, 0.6, 0.35, 0.01])
- .setColor3("vLightColor", light.diffuse);
-
- sphere.material = cellShadingMaterial;
- sphere.position = new BABYLON.Vector3(-10, 0, 0);
- cylinder.material = cellShadingMaterial;
- torus.material = cellShadingMaterial;
- torus.position = new BABYLON.Vector3(10, 0, 0);
-
- // Animations
- var alpha = 0;
- scene.registerBeforeRender(function () {
- sphere.rotation.y = alpha;
- sphere.rotation.x = alpha;
- cylinder.rotation.y = alpha;
- cylinder.rotation.x = alpha;
- torus.rotation.y = alpha;
- torus.rotation.x = alpha;
-
- alpha += 0.05;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/CustomShader/demo.js b/static/Demos/CustomShader/demo.js
deleted file mode 100644
index 5a1258361..000000000
--- a/static/Demos/CustomShader/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateCellShadingScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/CustomShader/index.html b/static/Demos/CustomShader/index.html
deleted file mode 100644
index b752fc381..000000000
--- a/static/Demos/CustomShader/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Custom Shader demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/DOF/demo.js b/static/Demos/DOF/demo.js
deleted file mode 100644
index 70ff62538..000000000
--- a/static/Demos/DOF/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateDOFTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/DOF/dof.js b/static/Demos/DOF/dof.js
deleted file mode 100644
index 39236c446..000000000
--- a/static/Demos/DOF/dof.js
+++ /dev/null
@@ -1,115 +0,0 @@
-var CreateDOFTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
-
- //Adding a light
- var light = new BABYLON.HemisphericLight("omni", new BABYLON.Vector3(0, 1, 0.1), scene);
- light.diffuse = new BABYLON.Color3(0.1, 0.1, 0.17);
- light.specular = new BABYLON.Color3(0.1, 0.1, 0.1);
- var light2 = new BABYLON.HemisphericLight("dirlight", new BABYLON.Vector3(1, -0.75, 0.25), scene);
- light2.diffuse = new BABYLON.Color3(0.95, 0.7, 0.4);
- light.specular = new BABYLON.Color3(0.7, 0.7, 0.4);
-
- //Adding an Arc Rotate Camera
- var camera = new BABYLON.ArcRotateCamera("Camera", 0.0, 1.3, 80, new BABYLON.Vector3(0, 10.0, 0), scene);
-
- camera.lowerRadiusLimit = 1;
- camera.maxZ = 2000;
-
- /*
- This is where we create the rendering pipeline and attach it to the camera.
- The pipeline accepts many parameters, but all of them are optional.
- Depending on what you set in your parameters array, some effects will be
- enabled or disabled. Here is a list of the possible parameters:
- {
- chromatic_aberration: number; // from 0 to x (1 for realism)
- edge_blur: number; // from 0 to x (1 for realism)
- distortion: number; // from 0 to x (1 for realism)
- grain_amount: number; // from 0 to 1
- grain_texture: BABYLON.Texture; // texture to use for grain effect; if unset, use random B&W noise
- dof_focus_distance: number; // depth-of-field: focus distance; unset to disable (disabled by default)
- dof_aperture: number; // depth-of-field: focus blur bias (default: 1)
- dof_darken: number; // depth-of-field: darken that which is out of focus (from 0 to 1, disabled by default)
- dof_pentagon: boolean; // depth-of-field: makes a pentagon-like "bokeh" effect
- dof_gain: number; // depth-of-field: highlights gain; unset to disable (disabled by default)
- dof_threshold: number; // depth-of-field: highlights threshold (default: 1)
- blur_noise: boolean; // add a little bit of noise to the blur (default: true)
- }
- */
-
- var lensEffect = new BABYLON.LensRenderingPipeline('lens', {
- edge_blur: 1.0,
- chromatic_aberration: 1.0,
- distortion: 1.0,
- dof_focus_distance: 50,
- dof_aperture: 6.0, // set this very high for tilt-shift effect
- grain_amount: 1.0,
- dof_pentagon: true,
- dof_gain: 1.0,
- dof_threshold: 1.0,
- dof_darken: 0.25
- }, scene, 1.0, camera);
-
- // generate ground
- var ground = BABYLON.Mesh.CreateGround("ground1", 300, 300, 2, scene);
- var ground_material = new BABYLON.StandardMaterial('ground', scene);
- ground_material.diffuseColor = new BABYLON.Color3(0.3, 0.3, 0.4);
- ground_material.specularColor = new BABYLON.Color3(0.04, 0.04, 0.04);
- ground_material.specularPower = 10;
- ground.material = ground_material;
-
- // skull material
- var material = new BABYLON.StandardMaterial('building', scene);
- material.diffuseColor = new BABYLON.Color3(0.8, 0.8, 0.85);
- material.specularColor = new BABYLON.Color3(0.07, 0.07, 0.07);
- material.specularPower = 100;
-
- // uncomment for debug!
- //scene.debugLayer.show();
-
- BABYLON.SceneLoader.ImportMesh("", "../../assets/", "skull.babylon", scene, function (newMeshes) {
- var mesh = newMeshes[0];
-
- var inst;
- var size;
- var angle;
- var dist;
- var count = 12;
-
- // generate skull instances
- for (var i = 0; i < count; i++) {
- angle = Math.PI * 2 * i / count;
-
- inst = mesh.createInstance('skull_inst');
- size = 0.75 + 0.5 * Math.random();
- dist = 100.0 + 15 * Math.random();
-
- inst.scaling.copyFromFloats(size, size, size);
- inst.rotation.y = -angle - Math.PI / 2;
-
- inst.position.y = size * 30.0;
- inst.position.x = Math.cos(angle) * dist;
- inst.position.z = Math.sin(angle) * dist;
- }
-
- for (var i = 0; i < count; i++) {
- angle = Math.PI * 2 * i / count;
-
- inst = mesh.createInstance('skull_inst');
- size = 0.25 + 0.25 * Math.random();
- dist = 30.0 + 5 * Math.random();
-
- inst.scaling.copyFromFloats(size, size, size);
- inst.rotation.y = -angle - Math.PI / 2;
-
- inst.position.y = size * 30.0;
- inst.position.x = Math.cos(angle) * dist;
- inst.position.z = Math.sin(angle) * dist;
-
- }
-
- mesh.setEnabled(false);
-
- });
-
- return scene;
-}
\ No newline at end of file
diff --git a/static/Demos/DOF/index.html b/static/Demos/DOF/index.html
deleted file mode 100644
index 97a047762..000000000
--- a/static/Demos/DOF/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Depth of Field demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Dancers/dat.gui.min.js b/static/Demos/Dancers/dat.gui.min.js
deleted file mode 100644
index faeb6a7af..000000000
--- a/static/Demos/Dancers/dat.gui.min.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * dat-gui JavaScript Controller Library
- * http://code.google.com/p/dat-gui
- *
- * Copyright 2011 Data Arts Team, Google Creative Lab
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- */
-var dat=dat||{};dat.gui=dat.gui||{};dat.utils=dat.utils||{};dat.controllers=dat.controllers||{};dat.dom=dat.dom||{};dat.color=dat.color||{};dat.utils.css=function(){return{load:function(f,a){a=a||document;var d=a.createElement("link");d.type="text/css";d.rel="stylesheet";d.href=f;a.getElementsByTagName("head")[0].appendChild(d)},inject:function(f,a){a=a||document;var d=document.createElement("style");d.type="text/css";d.innerHTML=f;a.getElementsByTagName("head")[0].appendChild(d)}}}();
-dat.utils.common=function(){var f=Array.prototype.forEach,a=Array.prototype.slice;return{BREAK:{},extend:function(d){this.each(a.call(arguments,1),function(a){for(var c in a)this.isUndefined(a[c])||(d[c]=a[c])},this);return d},defaults:function(d){this.each(a.call(arguments,1),function(a){for(var c in a)this.isUndefined(d[c])&&(d[c]=a[c])},this);return d},compose:function(){var d=a.call(arguments);return function(){for(var e=a.call(arguments),c=d.length-1;0<=c;c--)e=[d[c].apply(this,e)];return e[0]}},
-each:function(a,e,c){if(a)if(f&&a.forEach&&a.forEach===f)a.forEach(e,c);else if(a.length===a.length+0)for(var b=0,p=a.length;bthis.__max&&(a=this.__max);void 0!==this.__step&&0!=a%this.__step&&(a=Math.round(a/this.__step)*this.__step);return e.superclass.prototype.setValue.call(this,a)},min:function(a){this.__min=a;return this},max:function(a){this.__max=a;return this},step:function(a){this.__impliedStep=this.__step=a;this.__precision=d(a);return this}});return e}(dat.controllers.Controller,dat.utils.common);
-dat.controllers.NumberControllerBox=function(f,a,d){var e=function(c,b,f){function q(){var a=parseFloat(n.__input.value);d.isNaN(a)||n.setValue(a)}function l(a){var b=u-a.clientY;n.setValue(n.getValue()+b*n.__impliedStep);u=a.clientY}function r(){a.unbind(window,"mousemove",l);a.unbind(window,"mouseup",r)}this.__truncationSuspended=!1;e.superclass.call(this,c,b,f);var n=this,u;this.__input=document.createElement("input");this.__input.setAttribute("type","text");a.bind(this.__input,"change",q);a.bind(this.__input,
-"blur",function(){q();n.__onFinishChange&&n.__onFinishChange.call(n,n.getValue())});a.bind(this.__input,"mousedown",function(b){a.bind(window,"mousemove",l);a.bind(window,"mouseup",r);u=b.clientY});a.bind(this.__input,"keydown",function(a){13===a.keyCode&&(n.__truncationSuspended=!0,this.blur(),n.__truncationSuspended=!1)});this.updateDisplay();this.domElement.appendChild(this.__input)};e.superclass=f;d.extend(e.prototype,f.prototype,{updateDisplay:function(){var a=this.__input,b;if(this.__truncationSuspended)b=
-this.getValue();else{b=this.getValue();var d=Math.pow(10,this.__precision);b=Math.round(b*d)/d}a.value=b;return e.superclass.prototype.updateDisplay.call(this)}});return e}(dat.controllers.NumberController,dat.dom.dom,dat.utils.common);
-dat.controllers.NumberControllerSlider=function(f,a,d,e,c){function b(a,b,c,e,d){return e+(a-b)/(c-b)*(d-e)}var p=function(c,e,d,f,u){function A(c){c.preventDefault();var e=a.getOffset(k.__background),d=a.getWidth(k.__background);k.setValue(b(c.clientX,e.left,e.left+d,k.__min,k.__max));return!1}function g(){a.unbind(window,"mousemove",A);a.unbind(window,"mouseup",g);k.__onFinishChange&&k.__onFinishChange.call(k,k.getValue())}p.superclass.call(this,c,e,{min:d,max:f,step:u});var k=this;this.__background=
-document.createElement("div");this.__foreground=document.createElement("div");a.bind(this.__background,"mousedown",function(b){a.bind(window,"mousemove",A);a.bind(window,"mouseup",g);A(b)});a.addClass(this.__background,"slider");a.addClass(this.__foreground,"slider-fg");this.updateDisplay();this.__background.appendChild(this.__foreground);this.domElement.appendChild(this.__background)};p.superclass=f;p.useDefaultStyles=function(){d.inject(c)};e.extend(p.prototype,f.prototype,{updateDisplay:function(){var a=
-(this.getValue()-this.__min)/(this.__max-this.__min);this.__foreground.style.width=100*a+"%";return p.superclass.prototype.updateDisplay.call(this)}});return p}(dat.controllers.NumberController,dat.dom.dom,dat.utils.css,dat.utils.common,"/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\n.slider {\n box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);\n height: 1em;\n border-radius: 1em;\n background-color: #eee;\n padding: 0 0.5em;\n overflow: hidden;\n}\n\n.slider-fg {\n padding: 1px 0 2px 0;\n background-color: #aaa;\n height: 1em;\n margin-left: -0.5em;\n padding-right: 0.5em;\n border-radius: 1em 0 0 1em;\n}\n\n.slider-fg:after {\n display: inline-block;\n border-radius: 1em;\n background-color: #fff;\n border: 1px solid #aaa;\n content: '';\n float: right;\n margin-right: -1em;\n margin-top: -1px;\n height: 0.9em;\n width: 0.9em;\n}");
-dat.controllers.FunctionController=function(f,a,d){var e=function(c,b,d){e.superclass.call(this,c,b);var f=this;this.__button=document.createElement("div");this.__button.innerHTML=void 0===d?"Fire":d;a.bind(this.__button,"click",function(a){a.preventDefault();f.fire();return!1});a.addClass(this.__button,"button");this.domElement.appendChild(this.__button)};e.superclass=f;d.extend(e.prototype,f.prototype,{fire:function(){this.__onChange&&this.__onChange.call(this);this.getValue().call(this.object);
-this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}});return e}(dat.controllers.Controller,dat.dom.dom,dat.utils.common);
-dat.controllers.BooleanController=function(f,a,d){var e=function(c,b){e.superclass.call(this,c,b);var d=this;this.__prev=this.getValue();this.__checkbox=document.createElement("input");this.__checkbox.setAttribute("type","checkbox");a.bind(this.__checkbox,"change",function(){d.setValue(!d.__prev)},!1);this.domElement.appendChild(this.__checkbox);this.updateDisplay()};e.superclass=f;d.extend(e.prototype,f.prototype,{setValue:function(a){a=e.superclass.prototype.setValue.call(this,a);this.__onFinishChange&&
-this.__onFinishChange.call(this,this.getValue());this.__prev=this.getValue();return a},updateDisplay:function(){!0===this.getValue()?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0):this.__checkbox.checked=!1;return e.superclass.prototype.updateDisplay.call(this)}});return e}(dat.controllers.Controller,dat.dom.dom,dat.utils.common);
-dat.color.toString=function(f){return function(a){if(1==a.a||f.isUndefined(a.a)){for(a=a.hex.toString(16);6>a.length;)a="0"+a;return"#"+a}return"rgba("+Math.round(a.r)+","+Math.round(a.g)+","+Math.round(a.b)+","+a.a+")"}}(dat.utils.common);
-dat.color.interpret=function(f,a){var d,e,c=[{litmus:a.isString,conversions:{THREE_CHAR_HEX:{read:function(a){a=a.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null===a?!1:{space:"HEX",hex:parseInt("0x"+a[1].toString()+a[1].toString()+a[2].toString()+a[2].toString()+a[3].toString()+a[3].toString())}},write:f},SIX_CHAR_HEX:{read:function(a){a=a.match(/^#([A-F0-9]{6})$/i);return null===a?!1:{space:"HEX",hex:parseInt("0x"+a[1].toString())}},write:f},CSS_RGB:{read:function(a){a=a.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
-return null===a?!1:{space:"RGB",r:parseFloat(a[1]),g:parseFloat(a[2]),b:parseFloat(a[3])}},write:f},CSS_RGBA:{read:function(a){a=a.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\,\s*(.+)\s*\)/);return null===a?!1:{space:"RGB",r:parseFloat(a[1]),g:parseFloat(a[2]),b:parseFloat(a[3]),a:parseFloat(a[4])}},write:f}}},{litmus:a.isNumber,conversions:{HEX:{read:function(a){return{space:"HEX",hex:a,conversionName:"HEX"}},write:function(a){return a.hex}}}},{litmus:a.isArray,conversions:{RGB_ARRAY:{read:function(a){return 3!=
-a.length?!1:{space:"RGB",r:a[0],g:a[1],b:a[2]}},write:function(a){return[a.r,a.g,a.b]}},RGBA_ARRAY:{read:function(a){return 4!=a.length?!1:{space:"RGB",r:a[0],g:a[1],b:a[2],a:a[3]}},write:function(a){return[a.r,a.g,a.b,a.a]}}}},{litmus:a.isObject,conversions:{RGBA_OBJ:{read:function(b){return a.isNumber(b.r)&&a.isNumber(b.g)&&a.isNumber(b.b)&&a.isNumber(b.a)?{space:"RGB",r:b.r,g:b.g,b:b.b,a:b.a}:!1},write:function(a){return{r:a.r,g:a.g,b:a.b,a:a.a}}},RGB_OBJ:{read:function(b){return a.isNumber(b.r)&&
-a.isNumber(b.g)&&a.isNumber(b.b)?{space:"RGB",r:b.r,g:b.g,b:b.b}:!1},write:function(a){return{r:a.r,g:a.g,b:a.b}}},HSVA_OBJ:{read:function(b){return a.isNumber(b.h)&&a.isNumber(b.s)&&a.isNumber(b.v)&&a.isNumber(b.a)?{space:"HSV",h:b.h,s:b.s,v:b.v,a:b.a}:!1},write:function(a){return{h:a.h,s:a.s,v:a.v,a:a.a}}},HSV_OBJ:{read:function(b){return a.isNumber(b.h)&&a.isNumber(b.s)&&a.isNumber(b.v)?{space:"HSV",h:b.h,s:b.s,v:b.v}:!1},write:function(a){return{h:a.h,s:a.s,v:a.v}}}}}];return function(){e=!1;
-var b=1\n\n Here\'s the new load parameter for your GUI\'s constructor:\n\n \n\n \n\n
Automatically save\n values to
localStorage on exit.\n\n
The values saved to localStorage will\n override those passed to dat.GUI\'s constructor. This makes it\n easier to work incrementally, but localStorage is fragile,\n and your friends may not see the same values you do.\n \n
\n \n
\n\n',
-".dg {\n /** Clear list styles */\n /* Auto-place container */\n /* Auto-placed GUI's */\n /* Line items that don't contain folders. */\n /** Folder names */\n /** Hides closed items */\n /** Controller row */\n /** Name-half (left) */\n /** Controller-half (right) */\n /** Controller placement */\n /** Shorter number boxes when slider is present. */\n /** Ensure the entire boolean and function row shows a hand */ }\n .dg ul {\n list-style: none;\n margin: 0;\n padding: 0;\n width: 100%;\n clear: both; }\n .dg.ac {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 0;\n z-index: 0; }\n .dg:not(.ac) .main {\n /** Exclude mains in ac so that we don't hide close button */\n overflow: hidden; }\n .dg.main {\n -webkit-transition: opacity 0.1s linear;\n -o-transition: opacity 0.1s linear;\n -moz-transition: opacity 0.1s linear;\n transition: opacity 0.1s linear; }\n .dg.main.taller-than-window {\n overflow-y: auto; }\n .dg.main.taller-than-window .close-button {\n opacity: 1;\n /* TODO, these are style notes */\n margin-top: -1px;\n border-top: 1px solid #2c2c2c; }\n .dg.main ul.closed .close-button {\n opacity: 1 !important; }\n .dg.main:hover .close-button,\n .dg.main .close-button.drag {\n opacity: 1; }\n .dg.main .close-button {\n /*opacity: 0;*/\n -webkit-transition: opacity 0.1s linear;\n -o-transition: opacity 0.1s linear;\n -moz-transition: opacity 0.1s linear;\n transition: opacity 0.1s linear;\n border: 0;\n position: absolute;\n line-height: 19px;\n height: 20px;\n /* TODO, these are style notes */\n cursor: pointer;\n text-align: center;\n background-color: #000; }\n .dg.main .close-button:hover {\n background-color: #111; }\n .dg.a {\n float: right;\n margin-right: 15px;\n overflow-x: hidden; }\n .dg.a.has-save > ul {\n margin-top: 27px; }\n .dg.a.has-save > ul.closed {\n margin-top: 0; }\n .dg.a .save-row {\n position: fixed;\n top: 0;\n z-index: 1002; }\n .dg li {\n -webkit-transition: height 0.1s ease-out;\n -o-transition: height 0.1s ease-out;\n -moz-transition: height 0.1s ease-out;\n transition: height 0.1s ease-out; }\n .dg li:not(.folder) {\n cursor: auto;\n height: 27px;\n line-height: 27px;\n overflow: hidden;\n padding: 0 4px 0 5px; }\n .dg li.folder {\n padding: 0;\n border-left: 4px solid rgba(0, 0, 0, 0); }\n .dg li.title {\n cursor: pointer;\n margin-left: -4px; }\n .dg .closed li:not(.title),\n .dg .closed ul li,\n .dg .closed ul li > * {\n height: 0;\n overflow: hidden;\n border: 0; }\n .dg .cr {\n clear: both;\n padding-left: 3px;\n height: 27px; }\n .dg .property-name {\n cursor: default;\n float: left;\n clear: left;\n width: 40%;\n overflow: hidden;\n text-overflow: ellipsis; }\n .dg .c {\n float: left;\n width: 60%; }\n .dg .c input[type=text] {\n border: 0;\n margin-top: 4px;\n padding: 3px;\n width: 100%;\n float: right; }\n .dg .has-slider input[type=text] {\n width: 30%;\n /*display: none;*/\n margin-left: 0; }\n .dg .slider {\n float: left;\n width: 66%;\n margin-left: -5px;\n margin-right: 0;\n height: 19px;\n margin-top: 4px; }\n .dg .slider-fg {\n height: 100%; }\n .dg .c input[type=checkbox] {\n margin-top: 9px; }\n .dg .c select {\n margin-top: 5px; }\n .dg .cr.function,\n .dg .cr.function .property-name,\n .dg .cr.function *,\n .dg .cr.boolean,\n .dg .cr.boolean * {\n cursor: pointer; }\n .dg .selector {\n display: none;\n position: absolute;\n margin-left: -9px;\n margin-top: 23px;\n z-index: 10; }\n .dg .c:hover .selector,\n .dg .selector.drag {\n display: block; }\n .dg li.save-row {\n padding: 0; }\n .dg li.save-row .button {\n display: inline-block;\n padding: 0px 6px; }\n .dg.dialogue {\n background-color: #222;\n width: 460px;\n padding: 15px;\n font-size: 13px;\n line-height: 15px; }\n\n/* TODO Separate style and structure */\n#dg-new-constructor {\n padding: 10px;\n color: #222;\n font-family: Monaco, monospace;\n font-size: 10px;\n border: 0;\n resize: none;\n box-shadow: inset 1px 1px 1px #888;\n word-wrap: break-word;\n margin: 12px 0;\n display: block;\n width: 440px;\n overflow-y: scroll;\n height: 100px;\n position: relative; }\n\n#dg-local-explain {\n display: none;\n font-size: 11px;\n line-height: 17px;\n border-radius: 3px;\n background-color: #333;\n padding: 8px;\n margin-top: 10px; }\n #dg-local-explain code {\n font-size: 10px; }\n\n#dat-gui-save-locally {\n display: none; }\n\n/** Main type */\n.dg {\n color: #eee;\n font: 11px 'Lucida Grande', sans-serif;\n text-shadow: 0 -1px 0 #111;\n /** Auto place */\n /* Controller row, */\n /** Controllers */ }\n .dg.main {\n /** Scrollbar */ }\n .dg.main::-webkit-scrollbar {\n width: 5px;\n background: #1a1a1a; }\n .dg.main::-webkit-scrollbar-corner {\n height: 0;\n display: none; }\n .dg.main::-webkit-scrollbar-thumb {\n border-radius: 5px;\n background: #676767; }\n .dg li:not(.folder) {\n background: #1a1a1a;\n border-bottom: 1px solid #2c2c2c; }\n .dg li.save-row {\n line-height: 25px;\n background: #dad5cb;\n border: 0; }\n .dg li.save-row select {\n margin-left: 5px;\n width: 108px; }\n .dg li.save-row .button {\n margin-left: 5px;\n margin-top: 1px;\n border-radius: 2px;\n font-size: 9px;\n line-height: 7px;\n padding: 4px 4px 5px 4px;\n background: #c5bdad;\n color: #fff;\n text-shadow: 0 1px 0 #b0a58f;\n box-shadow: 0 -1px 0 #b0a58f;\n cursor: pointer; }\n .dg li.save-row .button.gears {\n background: #c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;\n height: 7px;\n width: 8px; }\n .dg li.save-row .button:hover {\n background-color: #bab19e;\n box-shadow: 0 -1px 0 #b0a58f; }\n .dg li.folder {\n border-bottom: 0; }\n .dg li.title {\n padding-left: 16px;\n background: black url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;\n cursor: pointer;\n border-bottom: 1px solid rgba(255, 255, 255, 0.2); }\n .dg .closed li.title {\n background-image: url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==); }\n .dg .cr.boolean {\n border-left: 3px solid #806787; }\n .dg .cr.function {\n border-left: 3px solid #e61d5f; }\n .dg .cr.number {\n border-left: 3px solid #2fa1d6; }\n .dg .cr.number input[type=text] {\n color: #2fa1d6; }\n .dg .cr.string {\n border-left: 3px solid #1ed36f; }\n .dg .cr.string input[type=text] {\n color: #1ed36f; }\n .dg .cr.function:hover, .dg .cr.boolean:hover {\n background: #111; }\n .dg .c input[type=text] {\n background: #303030;\n outline: none; }\n .dg .c input[type=text]:hover {\n background: #3c3c3c; }\n .dg .c input[type=text]:focus {\n background: #494949;\n color: #fff; }\n .dg .c .slider {\n background: #303030;\n cursor: ew-resize; }\n .dg .c .slider-fg {\n background: #2fa1d6; }\n .dg .c .slider:hover {\n background: #3c3c3c; }\n .dg .c .slider:hover .slider-fg {\n background: #44abda; }\n",
-dat.controllers.factory=function(f,a,d,e,c,b,p){return function(q,l,r,n){var u=q[l];if(p.isArray(r)||p.isObject(r))return new f(q,l,r);if(p.isNumber(u))return p.isNumber(r)&&p.isNumber(n)?new d(q,l,r,n):new a(q,l,{min:r,max:n});if(p.isString(u))return new e(q,l);if(p.isFunction(u))return new c(q,l,"");if(p.isBoolean(u))return new b(q,l)}}(dat.controllers.OptionController,dat.controllers.NumberControllerBox,dat.controllers.NumberControllerSlider,dat.controllers.StringController=function(f,a,d){var e=
-function(c,b){function d(){f.setValue(f.__input.value)}e.superclass.call(this,c,b);var f=this;this.__input=document.createElement("input");this.__input.setAttribute("type","text");a.bind(this.__input,"keyup",d);a.bind(this.__input,"change",d);a.bind(this.__input,"blur",function(){f.__onFinishChange&&f.__onFinishChange.call(f,f.getValue())});a.bind(this.__input,"keydown",function(a){13===a.keyCode&&this.blur()});this.updateDisplay();this.domElement.appendChild(this.__input)};e.superclass=f;d.extend(e.prototype,
-f.prototype,{updateDisplay:function(){a.isActive(this.__input)||(this.__input.value=this.getValue());return e.superclass.prototype.updateDisplay.call(this)}});return e}(dat.controllers.Controller,dat.dom.dom,dat.utils.common),dat.controllers.FunctionController,dat.controllers.BooleanController,dat.utils.common),dat.controllers.Controller,dat.controllers.BooleanController,dat.controllers.FunctionController,dat.controllers.NumberControllerBox,dat.controllers.NumberControllerSlider,dat.controllers.OptionController,
-dat.controllers.ColorController=function(f,a,d,e,c){function b(a,b,d,e){a.style.background="";c.each(l,function(c){a.style.cssText+="background: "+c+"linear-gradient("+b+", "+d+" 0%, "+e+" 100%); "})}function p(a){a.style.background="";a.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);";a.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";
-a.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";a.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";a.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}var q=function(f,n){function u(b){v(b);a.bind(window,"mousemove",v);a.bind(window,
-"mouseup",l)}function l(){a.unbind(window,"mousemove",v);a.unbind(window,"mouseup",l)}function g(){var a=e(this.value);!1!==a?(t.__color.__state=a,t.setValue(t.__color.toOriginal())):this.value=t.__color.toString()}function k(){a.unbind(window,"mousemove",w);a.unbind(window,"mouseup",k)}function v(b){b.preventDefault();var c=a.getWidth(t.__saturation_field),d=a.getOffset(t.__saturation_field),e=(b.clientX-d.left+document.body.scrollLeft)/c;b=1-(b.clientY-d.top+document.body.scrollTop)/c;1
-b&&(b=0);1e&&(e=0);t.__color.v=b;t.__color.s=e;t.setValue(t.__color.toOriginal());return!1}function w(b){b.preventDefault();var c=a.getHeight(t.__hue_field),d=a.getOffset(t.__hue_field);b=1-(b.clientY-d.top+document.body.scrollTop)/c;1b&&(b=0);t.__color.h=360*b;t.setValue(t.__color.toOriginal());return!1}q.superclass.call(this,f,n);this.__color=new d(this.getValue());this.__temp=new d(0);var t=this;this.domElement=document.createElement("div");a.makeSelectable(this.domElement,!1);
-this.__selector=document.createElement("div");this.__selector.className="selector";this.__saturation_field=document.createElement("div");this.__saturation_field.className="saturation-field";this.__field_knob=document.createElement("div");this.__field_knob.className="field-knob";this.__field_knob_border="2px solid ";this.__hue_knob=document.createElement("div");this.__hue_knob.className="hue-knob";this.__hue_field=document.createElement("div");this.__hue_field.className="hue-field";this.__input=document.createElement("input");
-this.__input.type="text";this.__input_textShadow="0 1px 1px ";a.bind(this.__input,"keydown",function(a){13===a.keyCode&&g.call(this)});a.bind(this.__input,"blur",g);a.bind(this.__selector,"mousedown",function(b){a.addClass(this,"drag").bind(window,"mouseup",function(b){a.removeClass(t.__selector,"drag")})});var y=document.createElement("div");c.extend(this.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"});c.extend(this.__field_knob.style,
-{position:"absolute",width:"12px",height:"12px",border:this.__field_knob_border+(.5>this.__color.v?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1});c.extend(this.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1});c.extend(this.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"});c.extend(y.style,{width:"100%",height:"100%",
-background:"none"});b(y,"top","rgba(0,0,0,0)","#000");c.extend(this.__hue_field.style,{width:"15px",height:"100px",display:"inline-block",border:"1px solid #555",cursor:"ns-resize"});p(this.__hue_field);c.extend(this.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:this.__input_textShadow+"rgba(0,0,0,0.7)"});a.bind(this.__saturation_field,"mousedown",u);a.bind(this.__field_knob,"mousedown",u);a.bind(this.__hue_field,"mousedown",function(b){w(b);a.bind(window,
-"mousemove",w);a.bind(window,"mouseup",k)});this.__saturation_field.appendChild(y);this.__selector.appendChild(this.__field_knob);this.__selector.appendChild(this.__saturation_field);this.__selector.appendChild(this.__hue_field);this.__hue_field.appendChild(this.__hue_knob);this.domElement.appendChild(this.__input);this.domElement.appendChild(this.__selector);this.updateDisplay()};q.superclass=f;c.extend(q.prototype,f.prototype,{updateDisplay:function(){var a=e(this.getValue());if(!1!==a){var f=!1;
-c.each(d.COMPONENTS,function(b){if(!c.isUndefined(a[b])&&!c.isUndefined(this.__color.__state[b])&&a[b]!==this.__color.__state[b])return f=!0,{}},this);f&&c.extend(this.__color.__state,a)}c.extend(this.__temp.__state,this.__color.__state);this.__temp.a=1;var l=.5>this.__color.v||.5a&&(a+=1);return{h:360*a,s:c/b,v:b/255}},rgb_to_hex:function(a,d,e){a=this.hex_with_component(0,2,a);a=this.hex_with_component(a,1,d);return a=this.hex_with_component(a,0,e)},component_from_hex:function(a,d){return a>>8*d&255},hex_with_component:function(a,d,e){return e<<(f=8*d)|a&~(255<
-
-
-
- Dancers Performance demo
-
-
-
-
-
-
-
-
-
-
diff --git a/static/Demos/Decals/decals.js b/static/Demos/Decals/decals.js
deleted file mode 100644
index 56d236a1b..000000000
--- a/static/Demos/Decals/decals.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var CreateDecalsTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
-
- //Adding a light
- var light = new BABYLON.HemisphericLight("Hemi", new BABYLON.Vector3(0, 1, 0), scene);
-
- //Adding an Arc Rotate Camera
- var camera = new BABYLON.ArcRotateCamera("Camera", -1.85, 1.2, 200, BABYLON.Vector3.Zero(), scene);
-
- // The first parameter can be used to specify which mesh to import. Here we import all meshes
- BABYLON.SceneLoader.ImportMesh("Shcroendiger'scat", "../../assets/", "SSAOcat.babylon", scene, function (newMeshes) {
- var cat = newMeshes[0];
-
- // Set the target of the camera to the first imported mesh
- camera.target = cat;
-
- var decalMaterial = new BABYLON.StandardMaterial("decalMat", scene);
- decalMaterial.diffuseTexture = new BABYLON.Texture("../../assets/impact.png", scene);
- decalMaterial.diffuseTexture.hasAlpha = true;
- decalMaterial.zOffset = -2;
-
- var onPointerDown = function (evt) {
- if (evt.button !== 0) {
- return;
- }
-
- // check if we are under a mesh
- var pickInfo = scene.pick(scene.pointerX, scene.pointerY, function (mesh) { return mesh === cat; });
- if (pickInfo.hit) {
- var decalSize = new BABYLON.Vector3(10, 10, 10);
-
- var newDecal = BABYLON.Mesh.CreateDecal("decal", cat, pickInfo.pickedPoint, pickInfo.getNormal(true), decalSize);
- newDecal.material = decalMaterial;
- }
- }
- var canvas = engine.getRenderingCanvas();
- canvas.addEventListener("pointerdown", onPointerDown, false);
-
- scene.onDispose = function () {
- canvas.removeEventListener("pointerdown", onPointerDown);
- }
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Decals/demo.js b/static/Demos/Decals/demo.js
deleted file mode 100644
index b0eef5ef8..000000000
--- a/static/Demos/Decals/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateDecalsTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Decals/index.html b/static/Demos/Decals/index.html
deleted file mode 100644
index e97c8d24b..000000000
--- a/static/Demos/Decals/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Decals demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/DefaultRenderingPipeline/default.js b/static/Demos/DefaultRenderingPipeline/default.js
deleted file mode 100644
index 2469231f5..000000000
--- a/static/Demos/DefaultRenderingPipeline/default.js
+++ /dev/null
@@ -1,216 +0,0 @@
-var createScene = function () {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 100, new BABYLON.Vector3(0, 0, 0), scene);
- camera.setPosition(new BABYLON.Vector3(80, 80, 120));
- camera.attachControl(canvas, true);
-
- var light = new BABYLON.HemisphericLight();
-
- BABYLON.SceneLoader.ImportMesh("", "/assets/skull/", "skull.babylon", scene, function (newMeshes) {
- // Set the target of the camera to the first imported mesh
- camera.target = newMeshes[0];
- });
-
- var defaultPipeline = new BABYLON.DefaultRenderingPipeline("default", true, scene, [camera]);
- defaultPipeline.bloomEnabled = false;
- defaultPipeline.fxaaEnabled = false;
- defaultPipeline.bloomWeight = 0.5;
- defaultPipeline.cameraFov = camera.fov;
-
- // GUI
- var bgCamera = new BABYLON.ArcRotateCamera("BGCamera", Math.PI / 2 + Math.PI / 7, Math.PI / 2, 100,
- new BABYLON.Vector3(0, 20, 0),
- scene);
- bgCamera.layerMask = 0x10000000;
-
- var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
- advancedTexture.layer.layerMask = 0x10000000;
-
- var panel = new BABYLON.GUI.StackPanel();
- panel.width = "300px";
- panel.isVertical = true;
- panel.paddingRight = "20px";
- panel.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_RIGHT;
- panel.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER;
- advancedTexture.addControl(panel);
-
- var addCheckbox = function(text, func, initialValue, left) {
- var checkbox = new BABYLON.GUI.Checkbox();
- checkbox.width = "20px";
- checkbox.height = "20px";
- checkbox.isChecked = initialValue;
- checkbox.color = "green";
- checkbox.onIsCheckedChangedObservable.add(function(value) {
- func(value);
- });
-
- var header = BABYLON.GUI.Control.AddHeader(checkbox, text, "180px", { isHorizontal: true, controlFirst: true});
- header.height = "30px";
- header.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
-
- if (left) {
- header.left = left;
- }
-
- panel.addControl(header);
- }
-
- var addSlider = function(text, func, initialValue, min, max, left) {
- var header = new BABYLON.GUI.TextBlock();
- header.text = text;
- header.height = "30px";
- header.color = "white";
- header.textHorizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
- panel.addControl(header);
- if (left) {
- header.left = left;
- }
-
- var slider = new BABYLON.GUI.Slider();
- slider.minimum = min;
- slider.maximum = max;
- slider.value = initialValue;
- slider.height = "20px";
- slider.color = "green";
- slider.background = "white";
- slider.onValueChangedObservable.add(function(value) {
- func(value);
- });
-
- if (left) {
- slider.paddingLeft = left;
- }
-
- panel.addControl(slider);
- }
-
- var addColorPicker = function(text, func, initialValue, left) {
- var header = new BABYLON.GUI.TextBlock();
- header.text = text;
- header.height = "30px";
- header.color = "white";
- header.textHorizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
- panel.addControl(header);
-
- if (left) {
- header.left = left;
- }
-
- var colorPicker = new BABYLON.GUI.ColorPicker();
- colorPicker.value = initialValue;
- colorPicker.size = "100px";
- colorPicker.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
- colorPicker.onValueChangedObservable.add(function(value) {
- func(value);
- });
-
- if (left) {
- colorPicker.left = left;
- }
-
- panel.addControl(colorPicker);
- }
-
- var toneMappingEnabled = defaultPipeline.imageProcessing.toneMappingEnabled;
- var vignetteEnabled = defaultPipeline.imageProcessing.vignetteEnabled;
- var vignetteColor = defaultPipeline.imageProcessing.vignetteColor;
- var vignetteWeight = defaultPipeline.imageProcessing.vignetteWeight;
- var vignetteBlendMode = defaultPipeline.imageProcessing.vignetteBlendMode;
- var colorCurvesEnabled = defaultPipeline.imageProcessing.colorCurvesEnabled;
- var contrast = defaultPipeline.imageProcessing.contrast;
- var exposure = defaultPipeline.imageProcessing.exposure;
-
- var curve = new BABYLON.ColorCurves();
- curve.globalHue = 200;
- curve.globalDensity = 80;
- curve.globalSaturation = 80;
-
- curve.highlightsHue = 20;
- curve.highlightsDensity = 80;
- curve.highlightsSaturation = -80;
-
- curve.shadowsHue = 2;
- curve.shadowsDensity = 80;
- curve.shadowsSaturation = 40;
-
- defaultPipeline.imageProcessing.colorCurves = curve;
-
- var rebindValues = function() {
- if (defaultPipeline.imageProcessing) {
- defaultPipeline.imageProcessing.toneMappingEnabled = toneMappingEnabled;
- defaultPipeline.imageProcessing.vignetteEnabled = vignetteEnabled;
- defaultPipeline.imageProcessing.vignetteWeight = vignetteWeight;
- defaultPipeline.imageProcessing.vignetteColor = vignetteColor;
- defaultPipeline.imageProcessing.vignetteBlendMode = vignetteBlendMode;
- defaultPipeline.imageProcessing.colorCurvesEnabled = colorCurvesEnabled;
- defaultPipeline.imageProcessing.contrast = contrast;
- defaultPipeline.imageProcessing.exposure = exposure;
- defaultPipeline.imageProcessing.colorCurves = curve;
- }
- }
-
- addCheckbox("fxaa", function(value) {
- defaultPipeline.fxaaEnabled = value;
- rebindValues();
- }, defaultPipeline.fxaaEnabled );
-
- addCheckbox("bloom", function(value) {
- defaultPipeline.bloomEnabled = value;
- rebindValues();
- }, defaultPipeline.bloomEnabled);
-
- addSlider("bloom weight", function(value) {
- defaultPipeline.bloomWeight = value;
- }, defaultPipeline.bloomWeight, 0, 2, "20px");
-
- addCheckbox("image processing", function(value) {
- defaultPipeline.imageProcessingEnabled = value;
- rebindValues();
- }, defaultPipeline.imageProcessingEnabled);
-
- addCheckbox("tone mapping", function(value) {
- defaultPipeline.imageProcessing.toneMappingEnabled = value;
- toneMappingEnabled = value;
- }, toneMappingEnabled, "20px");
-
- addCheckbox("vignette", function(value) {
- defaultPipeline.imageProcessing.vignetteEnabled = value;
- vignetteEnabled = value;
- }, vignetteEnabled, "20px");
-
- addCheckbox("vignette multiply", function(value) {
- var blendMode = value ? BABYLON.ImageProcessingConfiguration.VIGNETTEMODE_MULTIPLY : BABYLON.ImageProcessingConfiguration.VIGNETTEMODE_OPAQUE;
- defaultPipeline.imageProcessing.vignetteBlendMode = blendMode;
- vignetteBlendMode = blendMode;
- }, vignetteBlendMode === BABYLON.ImageProcessingConfiguration.VIGNETTEMODE_MULTIPLY, "40px");
-
- addColorPicker("vignette color", function(value) {
- defaultPipeline.imageProcessing.vignetteColor = value;
- vignetteColor = value;
- }, vignetteColor, "40px");
-
- addSlider("vignette weight", function(value) {
- defaultPipeline.imageProcessing.vignetteWeight = value;
- vignetteWeight = value;
- }, vignetteWeight, 0, 10, "40px");
-
- addCheckbox("color curves", function(value) {
- defaultPipeline.imageProcessing.colorCurvesEnabled = value;
- colorCurvesEnabled = value;
- }, colorCurvesEnabled, "20px");
-
- addSlider("camera contrast", function(value) {
- defaultPipeline.imageProcessing.contrast = value;
- contrast = value;
- }, contrast, 0, 4, "20px");
-
- addSlider("camera exposure", function(value) {
- defaultPipeline.imageProcessing.exposure = value;
- exposure = value;
- console.log(value);
- }, exposure, 0, 4, "20px");
-
- scene.activeCameras = [camera, bgCamera];
-
- return scene;
-}
\ No newline at end of file
diff --git a/static/Demos/DefaultRenderingPipeline/demo.js b/static/Demos/DefaultRenderingPipeline/demo.js
deleted file mode 100644
index db0e7914e..000000000
--- a/static/Demos/DefaultRenderingPipeline/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: createScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/DefaultRenderingPipeline/index.html b/static/Demos/DefaultRenderingPipeline/index.html
deleted file mode 100644
index ad68137f6..000000000
--- a/static/Demos/DefaultRenderingPipeline/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Default Rendering Pipeline demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
diff --git a/static/Demos/DisplacementMap/demo.js b/static/Demos/DisplacementMap/demo.js
deleted file mode 100644
index 77b45a650..000000000
--- a/static/Demos/DisplacementMap/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateDisplacementTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/DisplacementMap/displacementMap.js b/static/Demos/DisplacementMap/displacementMap.js
deleted file mode 100644
index c62be5634..000000000
--- a/static/Demos/DisplacementMap/displacementMap.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var CreateDisplacementTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var light = new BABYLON.HemisphericLight("Omni0", new BABYLON.Vector3(0, 1, 0), scene);
- var material = new BABYLON.StandardMaterial("kosh", scene);
- var sphere = BABYLON.Mesh.CreateSphere("Sphere", 32, 3, scene, true);
-
- camera.setPosition(new BABYLON.Vector3(-10, 10, 0));
-
- sphere.applyDisplacementMap("/assets/amiga.jpg", 0, 1.5);
-
- // Sphere material
- material.diffuseTexture = new BABYLON.Texture("/assets/amiga.jpg", scene);
- sphere.material = material;
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 100.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("/Scenes/Customs/skybox/skybox", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
- skybox.infiniteDistance = true;
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/DisplacementMap/index.html b/static/Demos/DisplacementMap/index.html
deleted file mode 100644
index c4935ea2c..000000000
--- a/static/Demos/DisplacementMap/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Displacement Map demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/DragNDrop/demo.js b/static/Demos/DragNDrop/demo.js
deleted file mode 100644
index d5e065f92..000000000
--- a/static/Demos/DragNDrop/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateDragDropTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/DragNDrop/dragdrop.js b/static/Demos/DragNDrop/dragdrop.js
deleted file mode 100644
index af455bba6..000000000
--- a/static/Demos/DragNDrop/dragdrop.js
+++ /dev/null
@@ -1,130 +0,0 @@
-var CreateDragDropTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, new BABYLON.Vector3(0, 0, 0), scene);
- camera.setPosition(new BABYLON.Vector3(20, 200, 400));
-
- camera.lowerBetaLimit = 0.1;
- camera.upperBetaLimit = (Math.PI / 2) * 0.99;
- camera.lowerRadiusLimit = 150;
-
- scene.clearColor = new BABYLON.Color3(0, 0, 0);
-
- // Light
- var light = new BABYLON.PointLight("omni", new BABYLON.Vector3(0, 50, 0), scene);
-
- // Ground
- var ground = BABYLON.Mesh.CreateGround("ground", 1000, 1000, 1, scene, false);
- var groundMaterial = new BABYLON.StandardMaterial("ground", scene);
- groundMaterial.specularColor = BABYLON.Color3.Black();
- ground.material = groundMaterial;
-
- // Meshes
- var redSphere = BABYLON.Mesh.CreateSphere("red", 32, 20, scene);
- var redMat = new BABYLON.StandardMaterial("ground", scene);
- redMat.diffuseColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- redMat.specularColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- redMat.emissiveColor = BABYLON.Color3.Red();
- redSphere.material = redMat;
- redSphere.position.y = 10;
- redSphere.position.x -= 100;
-
- var greenBox = BABYLON.Mesh.CreateBox("green", 20, scene);
- var greenMat = new BABYLON.StandardMaterial("ground", scene);
- greenMat.diffuseColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- greenMat.specularColor = new BABYLON.Color3(0.4, 0.4, 0.4);;
- greenMat.emissiveColor = BABYLON.Color3.Green();
- greenBox.material = greenMat;
- greenBox.position.z -= 100;
- greenBox.position.y = 10;
-
- var blueBox = BABYLON.Mesh.CreateBox("blue", 20, scene);
- var blueMat = new BABYLON.StandardMaterial("ground", scene);
- blueMat.diffuseColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- blueMat.specularColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- blueMat.emissiveColor = BABYLON.Color3.Blue();
- blueBox.material = blueMat;
- blueBox.position.x += 100;
- blueBox.position.y = 10;
-
-
- var purpleDonut = BABYLON.Mesh.CreateTorus("red", 30, 10, 32, scene);
- var purpleMat = new BABYLON.StandardMaterial("ground", scene);
- purpleMat.diffuseColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- purpleMat.specularColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- purpleMat.emissiveColor = BABYLON.Color3.Purple();
- purpleDonut.material = purpleMat;
- purpleDonut.position.y = 10;
- purpleDonut.position.z += 100;
-
- // Events
- var canvas = engine.getRenderingCanvas();
- var startingPoint;
- var currentMesh;
-
- var getGroundPosition = function (evt) {
- // Use a predicate to get position on the ground
- var pickinfo = scene.pick(scene.pointerX, scene.pointerY, function (mesh) { return mesh == ground; });
- if (pickinfo.hit) {
- return pickinfo.pickedPoint;
- }
-
- return null;
- }
-
- var onPointerDown = function (evt) {
- if (evt.button !== 0) {
- return;
- }
-
- // check if we are under a mesh
- var pickInfo = scene.pick(scene.pointerX, scene.pointerY, function (mesh) { return mesh !== ground; });
- if (pickInfo.hit) {
- currentMesh = pickInfo.pickedMesh;
- startingPoint = getGroundPosition(evt);
-
- if (startingPoint) { // we need to disconnect camera from canvas
- setTimeout(function () {
- camera.detachControl(canvas);
- }, 0);
- }
- }
- }
-
- var onPointerUp = function () {
- if (startingPoint) {
- camera.attachControl(canvas);
- startingPoint = null;
- return;
- }
- }
-
- var onPointerMove = function (evt) {
- if (!startingPoint) {
- return;
- }
-
- var current = getGroundPosition(evt);
-
- if (!current) {
- return;
- }
-
- var diff = current.subtract(startingPoint);
- currentMesh.position.addInPlace(diff);
-
- startingPoint = current;
-
- }
-
- canvas.addEventListener("pointerdown", onPointerDown, false);
- canvas.addEventListener("pointerup", onPointerUp, false);
- canvas.addEventListener("pointermove", onPointerMove, false);
-
- scene.onDispose = function () {
- canvas.removeEventListener("pointerdown", onPointerDown);
- canvas.removeEventListener("pointerup", onPointerUp);
- canvas.removeEventListener("pointermove", onPointerMove);
- }
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/DragNDrop/index.html b/static/Demos/DragNDrop/index.html
deleted file mode 100644
index f06e8a08c..000000000
--- a/static/Demos/DragNDrop/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Drag and Drop demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Espilit/demo.js b/static/Demos/Espilit/demo.js
deleted file mode 100644
index 1bbac7b48..000000000
--- a/static/Demos/Espilit/demo.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var demo = {
- scene: "Espilit",
- incremental: false,
- binary: true,
- doNotUseCDN: false,
- collisions: true,
- offline: false,
- onload: function () {
- scene.autoClear = true;
- scene.createOrUpdateSelectionOctree();
- scene.getMeshByName("Sol loin").useVertexColors = false;
- scene.gravity.scaleInPlace(0.5);
-
- var postProcess = new BABYLON.RefractionPostProcess("Refraction", "/scenes/customs/refMap.jpg", new BABYLON.Color3(1.0, 1.0, 1.0), 0.5, 0.5, 1.0, scene.cameras[1]);
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Espilit/index.html b/static/Demos/Espilit/index.html
deleted file mode 100644
index ee8a88401..000000000
--- a/static/Demos/Espilit/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Babylon.js - Espilit demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
diff --git a/static/Demos/ExtrudePolygon/demo.js b/static/Demos/ExtrudePolygon/demo.js
deleted file mode 100644
index db0e7914e..000000000
--- a/static/Demos/ExtrudePolygon/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: createScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/ExtrudePolygon/extrude.js b/static/Demos/ExtrudePolygon/extrude.js
deleted file mode 100644
index 9eedf9635..000000000
--- a/static/Demos/ExtrudePolygon/extrude.js
+++ /dev/null
@@ -1,961 +0,0 @@
-var createScene = function() {
- var scene = new BABYLON.Scene(engine);
-
- // camera
- var camera = new BABYLON.ArcRotateCamera("Camera", -Math.PI/2, Math.PI / 3, 25, new BABYLON.Vector3(0, 0, 4.5), scene);
- camera.attachControl(canvas, true);
-
- var light = new BABYLON.HemisphericLight("hemiLight", new BABYLON.Vector3(10, 10, 0), scene);
-
- var wallmat = new BABYLON.StandardMaterial("wallmaterial", scene);
- wallmat.diffuseTexture = new BABYLON.Texture("http://i.imgur.com/2b1C7UH.jpg", scene);
-
- var innerwallmat = new BABYLON.StandardMaterial("innerwallmaterial", scene);
- innerwallmat.diffuseColor = new BABYLON.Color3(240/255, 223/255, 203/255);
-
- //Polygon shape in XoZ plane
- var frontWallData = [
- new BABYLON.Vector3(-5.5, 0, -3),
- new BABYLON.Vector3(-0.5, 0, -3),
- new BABYLON.Vector3(-0.5, 0, -0.75),
- new BABYLON.Vector3(0.5, 0, -0.75),
- new BABYLON.Vector3(0.5, 0, -3),
- new BABYLON.Vector3(5.5, 0, -3),
- new BABYLON.Vector3(5.5, 0, 3),
- new BABYLON.Vector3(-5.5, 0, 3)
- ];
-
- //Holes in XoZ plane
- var frontWindowHoles = [];
- frontWindowHoles[0] = [
- new BABYLON.Vector3(-4.78, 0, -2.3),
- new BABYLON.Vector3(-1.58, 0, -2.3),
- new BABYLON.Vector3(-1.58, 0, -0.3),
- new BABYLON.Vector3(-4.78, 0, -0.3)
- ];
- frontWindowHoles[1] = [
- new BABYLON.Vector3(1.58, 0, -2.3),
- new BABYLON.Vector3(4.78, 0, -2.3),
- new BABYLON.Vector3(4.78, 0, -0.3),
- new BABYLON.Vector3(1.58, 0, -0.3)
- ];
- frontWindowHoles[2] = [
- new BABYLON.Vector3(-4.03, 0, 0.75),
- new BABYLON.Vector3(-2.13, 0, 0.75),
- new BABYLON.Vector3(-2.13, 0, 2.55),
- new BABYLON.Vector3(-4.03, 0, 2.55)
- ];
- frontWindowHoles[3] = [
- new BABYLON.Vector3(-0.65, 0, 0.75),
- new BABYLON.Vector3(0.65, 0, 0.75),
- new BABYLON.Vector3(0.65, 0, 2.55),
- new BABYLON.Vector3(-0.65, 0, 2.55)
- ];
- frontWindowHoles[4] = [
- new BABYLON.Vector3(2.13, 0, 0.75),
- new BABYLON.Vector3(4.03, 0, 0.75),
- new BABYLON.Vector3(4.03, 0, 2.55),
- new BABYLON.Vector3(2.13, 0, 2.55)
- ];
-
-
- var faceUV = new Array(3);
-
- faceUV[0] = new BABYLON.Vector4(0, 0, 7/15, 1);
- faceUV[1] = new BABYLON.Vector4(14/15, 0, 1, 1);
- faceUV[2] = new BABYLON.Vector4(7/15, 0, 14/15, 1);
-
- var frontWall = BABYLON.MeshBuilder.ExtrudePolygon("wall", {shape:frontWallData, depth: 0.15, holes:frontWindowHoles, faceUV: faceUV}, scene);
- frontWall.rotation.x = -Math.PI/2;
-
- frontWall.material = wallmat;
-
-
-
- var rearWallnb1Data = [
- new BABYLON.Vector3(1.4, 0, -3),
- new BABYLON.Vector3(5.5, 0, -3),
- new BABYLON.Vector3(5.5, 0, 3),
- new BABYLON.Vector3(1.4, 0, 3)
- ];
-
- //Holes in XoZ plane
- var rear1WindowHoles = [];
- rear1WindowHoles[0] = [
- new BABYLON.Vector3(3.7, 0, -1.8),
- new BABYLON.Vector3(4.5, 0, -1.8),
- new BABYLON.Vector3(4.5, 0, -0.3),
- new BABYLON.Vector3(3.7, 0, -0.3)
- ];
- rear1WindowHoles[1] = [
- new BABYLON.Vector3(1.9, 0, 0.75),
- new BABYLON.Vector3(2.7, 0, 0.75),
- new BABYLON.Vector3(2.7, 0, 2.55),
- new BABYLON.Vector3(1.9, 0, 2.55)
- ];
- rear1WindowHoles[2] = [
- new BABYLON.Vector3(4.2, 0, 0.75),
- new BABYLON.Vector3(5, 0, 0.75),
- new BABYLON.Vector3(5, 0, 2.55),
- new BABYLON.Vector3(4.2, 0, 2.55)
- ];
-
- var rearFaceUV = [];
- rearFaceUV[0] = new BABYLON.Vector4(7/15, 0, 14/15, 1);
- rearFaceUV[1] = new BABYLON.Vector4(14/15, 0, 1, 1);
- rearFaceUV[2] = new BABYLON.Vector4(0, 0, 7/15, 1);
-
- var rearWallnb1 = BABYLON.MeshBuilder.ExtrudePolygon("rearWallnb1", {shape:rearWallnb1Data, depth: 0.1, holes: rear1WindowHoles, faceUV: rearFaceUV}, scene);
- rearWallnb1.rotation.x = -Math.PI/2;
- rearWallnb1.position.z = 6.15;
-
- rearWallnb1.material = wallmat;
-
- var rearWallnb2Data = [
- new BABYLON.Vector3(-5.6, 0, -3),
- new BABYLON.Vector3(1.45, 0, -3),
- new BABYLON.Vector3(1.45, 0, 3),
- new BABYLON.Vector3(-2.075, 0, 5.5),
- new BABYLON.Vector3(-5.6, 0, 3)
- ];
-
-
- var rear2WindowHoles = [];
- rear2WindowHoles[0] = [
- new BABYLON.Vector3(-5, 0, -1.8),
- new BABYLON.Vector3(-1.85, 0, -1.8),
- new BABYLON.Vector3(-1.85, 0, -0.3),
- new BABYLON.Vector3(-5, 0, -0.3)
- ];
- rear2WindowHoles[1] = [
- new BABYLON.Vector3(-0.8, 0, -1.8),
- new BABYLON.Vector3(0.9, 0, -1.8),
- new BABYLON.Vector3(0.9, 0, -0.3),
- new BABYLON.Vector3(-0.8, 0, -0.3)
- ];
- rear2WindowHoles[2] = [
- new BABYLON.Vector3(-5, 0, 0.75),
- new BABYLON.Vector3(-1.85, 0, 0.75),
- new BABYLON.Vector3(-1.85, 0, 2.55),
- new BABYLON.Vector3(-5, 0, 2.55)
- ];
- rear2WindowHoles[3] = [
- new BABYLON.Vector3(-0.6, 0, 1.75),
- new BABYLON.Vector3(0.7, 0, 1.75),
- new BABYLON.Vector3(0.7, 0, 2.55),
- new BABYLON.Vector3(-0.6, 0, 2.55)
- ];
-
- var rearWallnb2 = BABYLON.MeshBuilder.ExtrudePolygon("rearWallnb2", {shape:rearWallnb2Data, holes: rear2WindowHoles, depth: 0.1, faceUV: rearFaceUV}, scene);
- rearWallnb2.rotation.x = -Math.PI/2;
- rearWallnb2.position.z = 9.15;
-
- rearWallnb2.material = wallmat;
-
- var sideWallnb1Data = [
- new BABYLON.Vector3(-3.15, 0, -3),
- new BABYLON.Vector3(3.1, 0, -3),
- new BABYLON.Vector3(3.1, 0, 3),
- new BABYLON.Vector3(0, 0, 5.5),
- new BABYLON.Vector3(-3.15, 0, 3)
- ];
-
- var side1FaceUV = new Array(3);
-
- side1FaceUV[0] = new BABYLON.Vector4(0, 0, 7/15, 1);
- side1FaceUV[1] = new BABYLON.Vector4(14/15, 0, 1, 1);
- side1FaceUV[2] = new BABYLON.Vector4(7/15, 0, 14/15, 1);
-
- var sideWallnb1 = BABYLON.MeshBuilder.ExtrudePolygon("sideWallnb1", {shape:sideWallnb1Data, depth: 0.1, faceUV: side1FaceUV}, scene);
- sideWallnb1.rotation.z = -Math.PI/2;
- sideWallnb1.rotation.x = -Math.PI/2;
- sideWallnb1.position.x = 5.6;
- sideWallnb1.position.z = 3.15;
-
- sideWallnb1.material = wallmat;
-
- var sideWallnb2Data = [
- new BABYLON.Vector3(-3.15, 0, -3),
- new BABYLON.Vector3(6, 0, -3),
- new BABYLON.Vector3(6, 0, 3),
- new BABYLON.Vector3(3.1, 0, 3),
- new BABYLON.Vector3(0, 0, 5.5),
- new BABYLON.Vector3(-3.15, 0, 3)
- ];
-
- var side2FaceUV = new Array(3);
-
- side2FaceUV[0] = new BABYLON.Vector4(7/15, 0, 14/15, 1);
- side2FaceUV[1] = new BABYLON.Vector4(14/15, 0, 1, 1);
- side2FaceUV[2] = new BABYLON.Vector4(0, 0, 7/15, 1)
-
- var sideWallnb2 = BABYLON.MeshBuilder.ExtrudePolygon("sideWallnb2", {shape:sideWallnb2Data, depth: 0.1, faceUV: side2FaceUV}, scene);
- sideWallnb2.rotation.z = -Math.PI/2;
- sideWallnb2.rotation.x = -Math.PI/2;
- sideWallnb2.position.x = -5.5;
- sideWallnb2.position.z = 3.15;
-
- sideWallnb2.material = wallmat;
-
- var sideWallnb3Data = [
- new BABYLON.Vector3(3.1, 0, -3),
- new BABYLON.Vector3(4.5, 0, -3),
- new BABYLON.Vector3(4.5, 0, -0.75),
- new BABYLON.Vector3(5.5, 0, -0.75),
- new BABYLON.Vector3(5.5, 0, -3),
- new BABYLON.Vector3(6, 0, -3),
- new BABYLON.Vector3(6, 0, 3),
- new BABYLON.Vector3(3.1, 0, 3)
- ];
-
- var side3FaceUV = new Array(3);
-
- side3FaceUV[0] = new BABYLON.Vector4(0, 0, 7/15, 1);
- side3FaceUV[1] = new BABYLON.Vector4(14/15, 0, 1, 1);
- side3FaceUV[2] = new BABYLON.Vector4(7/15, 0, 14/15, 1);
-
- var sideWallnb3 = BABYLON.MeshBuilder.ExtrudePolygon("sideWallnb3", {shape:sideWallnb3Data, depth: 0.1, faceUV: side3FaceUV}, scene);
- sideWallnb3.rotation.z = -Math.PI/2;
- sideWallnb3.rotation.x = -Math.PI/2;
- sideWallnb3.position.x = 1.45;
- sideWallnb3.position.z = 3.15;
-
- sideWallnb3.material = wallmat;
-
- var roofmat = new BABYLON.StandardMaterial("roofmat", scene);
- roofmat.diffuseTexture = new BABYLON.Texture("http://i.imgur.com/Vw4fzwq.jpg", scene);
-
- var roof1Data = [
- new BABYLON.Vector3(-0.05, 0, 0),
- new BABYLON.Vector3(0.1, 0, 0),
- new BABYLON.Vector3(3.3, 0, 2.65),
- new BABYLON.Vector3(6.5, 0, 0),
- new BABYLON.Vector3(6.6, 0, 0),
- new BABYLON.Vector3(3.3, 0, 2.8)
- ];
-
- var roof1 = BABYLON.MeshBuilder.ExtrudePolygon("roof1", {shape:roof1Data, depth: 11.5}, scene);
- roof1.rotation.z = -Math.PI/2;
- roof1.rotation.x = -Math.PI/2;
- roof1.position.x = 5.7;
- roof1.position.y = 2.9;
- roof1.position.z = -0.15;
-
- roof1.material = roofmat;
-
- var roof2Data = [
- new BABYLON.Vector3(0, 0, 0),
- new BABYLON.Vector3(0.142, 0, 0),
- new BABYLON.Vector3(3.834, 0, 2.6),
- new BABYLON.Vector3(7.476, 0, 0),
- new BABYLON.Vector3(7.618, 0, 0),
- new BABYLON.Vector3(3.834, 0, 2.7)
- ];
-
- var roof2 = BABYLON.MeshBuilder.ExtrudePolygon("roof2", {shape:roof2Data, depth: 3.2}, scene);
- roof2.rotation.x = -Math.PI/2;
- roof2.position.x = -5.9;
- roof2.position.y = 2.9;
- roof2.position.z = 6.3;
-
- roof2.material = roofmat;
-
- var roof3Data = [
- new BABYLON.Vector3(0.3, 0, 0.2),
- new BABYLON.Vector3(0.442, 0, 0.2),
- new BABYLON.Vector3(3.834, 0, 2.6),
- new BABYLON.Vector3(7.476, 0, 0),
- new BABYLON.Vector3(7.618, 0, 0),
- new BABYLON.Vector3(3.834, 0, 2.7)
- ];
-
- var roof3 = BABYLON.MeshBuilder.ExtrudePolygon("roof3", {shape:roof3Data, depth: 3.2}, scene);
- roof3.rotation.x = -Math.PI/2;
- roof3.position.x = -5.9;
- roof3.position.y = 2.9;
- roof3.position.z = 3.1;
-
- roof3.material = roofmat;
-
- var roof = BABYLON.Mesh.MergeMeshes([roof1, roof2, roof3], true);
-
-
- var stairsDepth = 2;
- var stairsHeight = 3.0;
- var stairsThickness = 0.05;
- var nBStairs = 12;
- var stairs = [];
- var x = 0;
- var z = 0;
- //up
- stairs.push(new BABYLON.Vector3(x, 0, z));
- z += stairsHeight/nBStairs - stairsThickness;
- stairs.push(new BABYLON.Vector3(x, 0, z));
- for(var i = 0; i
-
-
-
- Babylon.js - ExtrudePolygon demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Facets/demo.js b/static/Demos/Facets/demo.js
deleted file mode 100644
index 8960b463c..000000000
--- a/static/Demos/Facets/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateFacetsTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Facets/facets.js b/static/Demos/Facets/facets.js
deleted file mode 100644
index 57d3ad7e9..000000000
--- a/static/Demos/Facets/facets.js
+++ /dev/null
@@ -1,158 +0,0 @@
-var CreateFacetsTestScene = function (engine) {
- // scene
- var scene = new BABYLON.Scene(engine);
- scene.clearColor = new BABYLON.Color3(0.15, 0.15, 0.3);
- // camera
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 0, BABYLON.Vector3.Zero(), scene);
- camera.attachControl(canvas, true);
- camera.setPosition(new BABYLON.Vector3(0, 10.0, -150.0));
- // lights
- var light = new BABYLON.HemisphericLight('light1', new BABYLON.Vector3(0, 1, 0), scene);
- light.intensity = 0.2;
- var pl = new BABYLON.PointLight('pl', camera.position, scene);
- pl.intensity = 0.9;
- // material
- var meshMat = new BABYLON.StandardMaterial("sm", scene);
-
- // scene and physics params
- var gravity = new BABYLON.Vector3(0, -0.01, 0);
- // init ball velocity and position
- var ballOrigin = new BABYLON.Vector3(-20.0, 60.0, 0.0);
- var restitution = 0.60;
- var speed = 0.05;
- var sceneLimit = ballOrigin.y + 2.0;
-
- // mesh
- //var model1 = BABYLON.MeshBuilder.CreateBox("m1",{size: 4.0}, scene);
- var model1 = BABYLON.MeshBuilder.CreateTorusKnot("m1", {radius: 8.0, tube: 1.2, radialSegments: 48}, scene);
- var posfunc = function(p, i, s) {
- var x = (0.5 - Math.random()) * sceneLimit / 1.5;
- var y = (0.5 - Math.random()) * sceneLimit;
- var z = (0.5 - Math.random()) * sceneLimit / 1.5;
- p.position.x = x;
- p.position.y = y;
- p.position.z = z;
- p.rotation.x = 3.2 * Math.random();
- p.rotation.y = 3.2 * Math.random();
- p.rotation.z = 3.2 * Math.random();
- p.scaling.x = 0.5 + Math.random() * 0.5;
- p.scaling.y = p.scaling.x;
- p.scaling.z = p.scaling.x;
- };
- var meshSPS = new BABYLON.SolidParticleSystem("m", scene, {updatable: false});
- meshSPS.addShape(model1, 30, {positionFunction: posfunc});
- meshSPS.buildMesh();
- model1.dispose();
-
- meshSPS.refreshVisibleSize();
- var mesh = meshSPS.mesh;
- mesh.partitioningSubdivisions = 40;
- mesh.updateFacetData();
-
- // Balls
- var ballRadius = 1.0;
- var ballNb = 2000;
- var radiusSquared = ballRadius * ballRadius;
- var ball = BABYLON.MeshBuilder.CreateSphere('b', {diameter: ballRadius * 2.0, segments: 3}, scene);
- //var ball = BABYLON.MeshBuilder.CreatePolyhedron('p', {size: ballRadius / 2.0}, scene);
- var sps = new BABYLON.SolidParticleSystem('sps', scene);
- sps.addShape(ball, ballNb);
- ball.dispose();
- sps.buildMesh();
- //sps.mesh.showBoundingBox = true;
- //sps.computeBoundingBox = true;
- sps.isAlwaysVisible = true;
- sps.computeParticleRotation = false;
- sps.computeParticleTexture = false;
- sps.recycleParticle = function(p) {
- p.position.copyFrom(this.vars.origin);
- p.velocity.x = (Math.random() - 0.5) * this.vars.speed * 3.0 + this.vars.speed * 3.0 ;
- p.velocity.z = (Math.random() - 0.5) * this.vars.speed * 6.0;
- p.velocity.y = Math.random() * this.vars.speed * 10.0;
- p.scaling.x = 1.0;
- p.scaling.y = p.scaling.x;
- p.scaling.z = p.scaling.x;
- };
- sps.initParticles = function(origin, speed) {
- this.vars.origin = origin.clone();
- this.vars.speed = speed;
- for (var p = 0; p < this.nbParticles; p++) {
- this.recycleParticle(sps.particles[p]);
- this.particles[p].color.r = 0.4 + Math.random() * 0.6;
- this.particles[p].color.g = 0.4 + Math.random() * 0.6;
- this.particles[p].color.b = 0.4 + Math.random() * 0.6;
- this.particles[p].rotation.x = Math.random() * 3.2;
- this.particles[p].rotation.y = Math.random() * 3.2;
- this.particles[p].rotation.z = Math.random() * 3.2;
- }
- };
-
- // tmp vars
- var tmpDotVel = 0.0; // tmp dot facet normal * velocity
- var tmpDotPos = 0.0; // tmp dit facet normal * ball-facet vector
- var projected = BABYLON.Vector3.Zero(); // tmp projected vector
- var facetPosition = BABYLON.Vector3.Zero(); // tmp facet position
- var facetNorm = BABYLON.Vector3.Zero(); // tmp facet normal
- var normPos = BABYLON.Vector3.Zero(); // tmp vector to locate the ball on the normal from the projection
- var tmpVect = BABYLON.Vector3.Zero(); // tmp Vector3 : ball - projection
-
-
-
- // ball animation with custom simple physics
- // =========================================
- sps.updateParticle = function(p) {
-
- // check scene limits
- if (Math.abs(p.position.x) > sceneLimit || Math.abs(p.position.y) > sceneLimit || Math.abs(p.position.z) > sceneLimit) {
- sps.recycleParticle(p);
- return;
- }
-
- // apply force and move the ball
- p.velocity.addInPlace(gravity); // apply force : update velocity
- p.position.addInPlace(p.velocity); // apply velocity : update world position
-
- var closest = mesh.getClosestFacetAtCoordinates(p.position.x, p.position.y, p.position.z, projected, true, true);
- // if we've found one facet in the mesh partitioning
- if (closest != null) {
- // get the impact facet normal and position
- mesh.getFacetNormalToRef(closest, facetNorm);
- mesh.getFacetPositionToRef(closest, facetPosition);
-
- p.position.subtractToRef(projected, tmpVect); // tmpVect is the vector ball-projection
-
- // if the distance between the ball and the facet is lower than the ball radius, then collision
- if (tmpVect.lengthSquared() < radiusSquared) {
- // bounce result computation
- tmpDotVel = BABYLON.Vector3.Dot(p.velocity, facetNorm); // dot product (velocity, normal)
- p.velocity.x = (p.velocity.x - 2.0 * tmpDotVel * facetNorm.x) * restitution;
- p.velocity.y = (p.velocity.y - 2.0 * tmpDotVel * facetNorm.y) * restitution;
- p.velocity.z = (p.velocity.z - 2.0 * tmpDotVel * facetNorm.z) * restitution;
-
- facetNorm.scaleToRef(ballRadius * 1.01, normPos); // reset the ball at distance ballRadius on the facet
- projected.addToRef(normPos, p.position);
- }
- }
- p.scaling.x = 0.4 + Math.abs(p.velocity.x); // scale the ball according to its velocity
- p.scaling.y = 0.4 + Math.abs(p.velocity.y);
- p.scaling.z = 0.4 + Math.abs(p.velocity.z);
- };
-
-
- //scene.debugLayer.show();
- sps.initParticles(ballOrigin, speed);
- sps.setParticles();
- var k = 0.0;
- scene.registerBeforeRender(function () {
- mesh.rotation.y += 0.01;
- mesh.rotation.x = 0.6 * Math.sin(k);
- sps.setParticles();
- k += 0.02;
- });
-
- scene.onDisposeObservable.add(function() {
- mesh.disableFacetData();
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Facets/index.html b/static/Demos/Facets/index.html
deleted file mode 100644
index 25325841f..000000000
--- a/static/Demos/Facets/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Facet Data demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/FireMaterial/babylon.fireMaterial.min.js b/static/Demos/FireMaterial/babylon.fireMaterial.min.js
deleted file mode 100644
index 023d6fb4d..000000000
--- a/static/Demos/FireMaterial/babylon.fireMaterial.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var BABYLON;!function(e){var i=function(e){function i(){e.call(this),this.DIFFUSE=!1,this.CLIPPLANE=!1,this.ALPHATEST=!1,this.POINTSIZE=!1,this.FOG=!1,this.UV1=!1,this.NORMAL=!1,this.VERTEXCOLOR=!1,this.VERTEXALPHA=!1,this.BONES=!1,this.BONES4=!1,this.BonesPerMesh=0,this.INSTANCES=!1,this._keys=Object.keys(this)}return __extends(i,e),i}(e.MaterialDefines),n=function(n){function t(t,o){n.call(this,t,o),this.diffuseColor=new e.Color3(1,1,1),this.disableLighting=!1,this.speed=1,this._scaledDiffuse=new e.Color3,this._defines=new i,this._cachedDefines=new i,this._lastTime=0,this._cachedDefines.BonesPerMesh=-1}return __extends(t,n),t.prototype.needAlphaBlending=function(){return this.alpha<1},t.prototype.needAlphaTesting=function(){return!1},t.prototype.getAlphaTestTexture=function(){return null},t.prototype._checkCache=function(e,i,n){return i?this._defines.INSTANCES!==n?!1:i._materialDefines&&i._materialDefines.isEqual(this._defines)?!0:!1:!0},t.prototype.isReady=function(n,t){if(this.checkReadyOnlyOnce&&this._wasPreviouslyReady)return!0;var o=this.getScene();if(!this.checkReadyOnEveryCall&&this._renderId===o.getRenderId()&&this._checkCache(o,n,t))return!0;var s=(o.getEngine(),!1),r=!1;if(this._defines.reset(),o.texturesEnabled&&this.diffuseTexture&&e.StandardMaterial.DiffuseTextureEnabled){if(!this.diffuseTexture.isReady())return!1;r=!0,this._defines.DIFFUSE=!0}if(o.clipPlane&&(this._defines.CLIPPLANE=!0),this._defines.ALPHATEST=!0,(this.pointsCloud||o.forcePointsCloud)&&(this._defines.POINTSIZE=!0),o.fogEnabled&&n&&n.applyFog&&o.fogMode!==e.Scene.FOGMODE_NONE&&this.fogEnabled&&(this._defines.FOG=!0),n&&(s&&n.isVerticesDataPresent(e.VertexBuffer.NormalKind)&&(this._defines.NORMAL=!0),r&&n.isVerticesDataPresent(e.VertexBuffer.UVKind)&&(this._defines.UV1=!0),n.useVertexColors&&n.isVerticesDataPresent(e.VertexBuffer.ColorKind)&&(this._defines.VERTEXCOLOR=!0,n.hasVertexAlpha&&(this._defines.VERTEXALPHA=!0)),n.useBones&&n.computeBonesUsingShaders&&(this._defines.BONES=!0,this._defines.BonesPerMesh=n.skeleton.bones.length+1,this._defines.BONES4=!0),t&&(this._defines.INSTANCES=!0)),!this._defines.isEqual(this._cachedDefines)){this._defines.cloneTo(this._cachedDefines),o.resetCachedMaterial();var f=new e.EffectFallbacks;this._defines.FOG&&f.addFallback(1,"FOG"),this._defines.BONES4&&f.addFallback(0,"BONES4");var a=[e.VertexBuffer.PositionKind];this._defines.NORMAL&&a.push(e.VertexBuffer.NormalKind),this._defines.UV1&&a.push(e.VertexBuffer.UVKind),this._defines.VERTEXCOLOR&&a.push(e.VertexBuffer.ColorKind),this._defines.BONES&&(a.push(e.VertexBuffer.MatricesIndicesKind),a.push(e.VertexBuffer.MatricesWeightsKind)),this._defines.INSTANCES&&(a.push("world0"),a.push("world1"),a.push("world2"),a.push("world3"));var d="fire",l=this._defines.toString();this._effect=o.getEngine().createEffect(d,a,["world","view","viewProjection","vEyePosition","vFogInfos","vFogColor","pointSize","vDiffuseInfos","mBones","vClipPlane","diffuseMatrix","time","speed"],["diffuseSampler","distortionSampler","opacitySampler"],l,f,this.onCompiled,this.onError)}return this._effect.isReady()?(this._renderId=o.getRenderId(),this._wasPreviouslyReady=!0,n&&(n._materialDefines||(n._materialDefines=new i),this._defines.cloneTo(n._materialDefines)),!0):!1},t.prototype.bindOnlyWorldMatrix=function(e){this._effect.setMatrix("world",e)},t.prototype.bind=function(i,t){var o=this.getScene();if(this.bindOnlyWorldMatrix(i),this._effect.setMatrix("viewProjection",o.getTransformMatrix()),t&&t.useBones&&t.computeBonesUsingShaders&&this._effect.setMatrices("mBones",t.skeleton.getTransformMatrices()),o.getCachedMaterial()!==this){if(this.diffuseTexture&&e.StandardMaterial.DiffuseTextureEnabled&&(this._effect.setTexture("diffuseSampler",this.diffuseTexture),this._effect.setFloat2("vDiffuseInfos",this.diffuseTexture.coordinatesIndex,this.diffuseTexture.level),this._effect.setMatrix("diffuseMatrix",this.diffuseTexture.getTextureMatrix()),this._effect.setTexture("distortionSampler",this.distortionTexture),this._effect.setTexture("opacitySampler",this.opacityTexture)),o.clipPlane){var s=o.clipPlane;this._effect.setFloat4("vClipPlane",s.normal.x,s.normal.y,s.normal.z,s.d)}this.pointsCloud&&this._effect.setFloat("pointSize",this.pointSize),this._effect.setVector3("vEyePosition",o._mirroredCameraPosition?o._mirroredCameraPosition:o.activeCamera.position)}this._effect.setColor4("vDiffuseColor",this._scaledDiffuse,this.alpha*t.visibility),o.fogEnabled&&t.applyFog&&o.fogMode!==e.Scene.FOGMODE_NONE&&this._effect.setMatrix("view",o.getViewMatrix()),o.fogEnabled&&t.applyFog&&o.fogMode!==e.Scene.FOGMODE_NONE&&(this._effect.setFloat4("vFogInfos",o.fogMode,o.fogStart,o.fogEnd,o.fogDensity),this._effect.setColor3("vFogColor",o.fogColor)),this._lastTime+=o.getEngine().getDeltaTime(),this._effect.setFloat("time",this._lastTime),this._effect.setFloat("speed",this.speed),n.prototype.bind.call(this,i,t)},t.prototype.getAnimatables=function(){var e=[];return this.diffuseTexture&&this.diffuseTexture.animations&&this.diffuseTexture.animations.length>0&&e.push(this.diffuseTexture),this.distortionTexture&&this.distortionTexture.animations&&this.distortionTexture.animations.length>0&&e.push(this.distortionTexture),this.opacityTexture&&this.opacityTexture.animations&&this.opacityTexture.animations.length>0&&e.push(this.opacityTexture),e},t.prototype.dispose=function(e){this.diffuseTexture&&this.diffuseTexture.dispose(),this.distortionTexture&&this.distortionTexture.dispose(),n.prototype.dispose.call(this,e)},t.prototype.clone=function(e){var i=new t(e,this.getScene());return this.copyTo(i),this.diffuseTexture&&this.diffuseTexture.clone&&(i.diffuseTexture=this.diffuseTexture.clone()),this.distortionTexture&&this.distortionTexture.clone&&(i.distortionTexture=this.distortionTexture.clone()),this.opacityTexture&&this.opacityTexture.clone&&(i.opacityTexture=this.opacityTexture.clone()),i.diffuseColor=this.diffuseColor.clone(),i},t.prototype.serialize=function(){var e=n.prototype.serialize.call(this);return e.customType="BABYLON.FireMaterial",e.diffuseColor=this.diffuseColor.asArray(),e.speed=this.speed,e.disableLighting=this.disableLighting,this.diffuseTexture&&(e.diffuseTexture=this.diffuseTexture.serialize()),this.distortionTexture&&(e.distortionTexture=this.distortionTexture.serialize()),this.opacityTexture&&(e.opacityTexture=this.opacityTexture.serialize()),e},t.Parse=function(i,n,o){var s=new t(i.name,n);return s.diffuseColor=e.Color3.FromArray(i.diffuseColor),s.speed=i.speed,s.disableLighting=i.disableLighting,s.alpha=i.alpha,s.id=i.id,e.Tags.AddTagsTo(s,i.tags),s.backFaceCulling=i.backFaceCulling,s.wireframe=i.wireframe,i.diffuseTexture&&(s.diffuseTexture=e.Texture.Parse(i.diffuseTexture,n,o)),i.distortionTexture&&(s.distortionTexture=e.Texture.Parse(i.distortionTexture,n,o)),i.opacityTexture&&(s.opacityTexture=e.Texture.Parse(i.opacityTexture,n,o)),i.checkReadyOnlyOnce&&(s.checkReadyOnlyOnce=i.checkReadyOnlyOnce),s},t}(e.Material);e.FireMaterial=n}(BABYLON||(BABYLON={})),BABYLON.Effect.ShadersStore.fireVertexShader="precision highp float;\n\n// Attributes\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#ifdef BONES\nattribute vec4 matricesIndices;\nattribute vec4 matricesWeights;\n#endif\n\n// Uniforms\n\n#ifdef INSTANCES\nattribute vec4 world0;\nattribute vec4 world1;\nattribute vec4 world2;\nattribute vec4 world3;\n#else\nuniform mat4 world;\n#endif\n\nuniform mat4 view;\nuniform mat4 viewProjection;\n\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\n#endif\n\n#ifdef BONES\nuniform mat4 mBones[BonesPerMesh];\n#endif\n\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n\n// Output\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n#ifdef CLIPPLANE\nuniform vec4 vClipPlane;\nvarying float fClipDistance;\n#endif\n\n#ifdef FOG\nvarying float fFogDistance;\n#endif\n\n// Fire\nuniform float time;\nuniform float speed;\n\nvarying vec2 vDistortionCoords1;\nvarying vec2 vDistortionCoords2;\nvarying vec2 vDistortionCoords3;\n\nvoid main(void) {\n mat4 finalWorld;\n\n#ifdef INSTANCES\n finalWorld = mat4(world0, world1, world2, world3);\n#else\n finalWorld = world;\n#endif\n\n#ifdef BONES\n mat4 m0 = mBones[int(matricesIndices.x)] * matricesWeights.x;\n mat4 m1 = mBones[int(matricesIndices.y)] * matricesWeights.y;\n mat4 m2 = mBones[int(matricesIndices.z)] * matricesWeights.z;\n\n#ifdef BONES4\n mat4 m3 = mBones[int(matricesIndices.w)] * matricesWeights.w;\n finalWorld = finalWorld * (m0 + m1 + m2 + m3);\n#else\n finalWorld = finalWorld * (m0 + m1 + m2);\n#endif \n\n#endif\n gl_Position = viewProjection * finalWorld * vec4(position, 1.0);\n\n vec4 worldPos = finalWorld * vec4(position, 1.0);\n vPositionW = vec3(worldPos);\n\n#ifdef NORMAL\n vNormalW = normalize(vec3(finalWorld * vec4(normal, 0.0)));\n#endif\n\n // Texture coordinates\n#ifdef DIFFUSE\n vDiffuseUV = uv;\n vDiffuseUV.y -= 0.2;\n#endif\n\n // Clip plane\n#ifdef CLIPPLANE\n fClipDistance = dot(worldPos, vClipPlane);\n#endif\n\n // Fog\n#ifdef FOG\n fFogDistance = (view * worldPos).z;\n#endif\n\n // Vertex color\n#ifdef VERTEXCOLOR\n vColor = color;\n#endif\n\n // Point size\n#ifdef POINTSIZE\n gl_PointSize = pointSize;\n#endif\n\n // Fire\n vec3 layerSpeed = vec3(-0.2, -0.52, -0.1) * speed;\n \n vDistortionCoords1.x = uv.x;\n vDistortionCoords1.y = uv.y + layerSpeed.x * time / 1000.0;\n \n vDistortionCoords2.x = uv.x;\n vDistortionCoords2.y = uv.y + layerSpeed.y * time / 1000.0;\n \n vDistortionCoords3.x = uv.x;\n vDistortionCoords3.y = uv.y + layerSpeed.z * time / 1000.0;\n}\n",BABYLON.Effect.ShadersStore.firePixelShader="precision highp float;\n\n// Constants\nuniform vec3 vEyePosition;\n\n// Input\nvarying vec3 vPositionW;\n\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n\n// Samplers\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n\n// Fire\nuniform sampler2D distortionSampler;\nuniform sampler2D opacitySampler;\n\nvarying vec2 vDistortionCoords1;\nvarying vec2 vDistortionCoords2;\nvarying vec2 vDistortionCoords3;\n\n#ifdef CLIPPLANE\nvarying float fClipDistance;\n#endif\n\n// Fog\n#ifdef FOG\n\n#define FOGMODE_NONE 0.\n#define FOGMODE_EXP 1.\n#define FOGMODE_EXP2 2.\n#define FOGMODE_LINEAR 3.\n#define E 2.71828\n\nuniform vec4 vFogInfos;\nuniform vec3 vFogColor;\nvarying float fFogDistance;\n\nfloat CalcFogFactor()\n{\n float fogCoeff = 1.0;\n float fogStart = vFogInfos.y;\n float fogEnd = vFogInfos.z;\n float fogDensity = vFogInfos.w;\n\n if (FOGMODE_LINEAR == vFogInfos.x)\n {\n fogCoeff = (fogEnd - fFogDistance) / (fogEnd - fogStart);\n }\n else if (FOGMODE_EXP == vFogInfos.x)\n {\n fogCoeff = 1.0 / pow(E, fFogDistance * fogDensity);\n }\n else if (FOGMODE_EXP2 == vFogInfos.x)\n {\n fogCoeff = 1.0 / pow(E, fFogDistance * fFogDistance * fogDensity * fogDensity);\n }\n\n return clamp(fogCoeff, 0.0, 1.0);\n}\n#endif\n\nvec4 bx2(vec4 x)\n{\n return vec4(2.0) * x - vec4(1.0);\n}\n\nvoid main(void) {\n // Clip plane\n#ifdef CLIPPLANE\n if (fClipDistance > 0.0)\n discard;\n#endif\n\n vec3 viewDirectionW = normalize(vEyePosition - vPositionW);\n\n // Base color\n vec4 baseColor = vec4(1., 1., 1., 1.);\n\n // Alpha\n float alpha = 1.0;\n\n#ifdef DIFFUSE\n // Fire\n const float distortionAmount0 = 0.092;\n const float distortionAmount1 = 0.092;\n const float distortionAmount2 = 0.092;\n \n vec2 heightAttenuation = vec2(0.3, 0.39);\n \n vec4 noise0 = texture2D(distortionSampler, vDistortionCoords1);\n vec4 noise1 = texture2D(distortionSampler, vDistortionCoords2);\n vec4 noise2 = texture2D(distortionSampler, vDistortionCoords3);\n \n vec4 noiseSum = bx2(noise0) * distortionAmount0 + bx2(noise1) * distortionAmount1 + bx2(noise2) * distortionAmount2;\n \n vec4 perturbedBaseCoords = vec4(vDiffuseUV, 0.0, 1.0) + noiseSum * (vDiffuseUV.y * heightAttenuation.x + heightAttenuation.y);\n \n vec4 opacityColor = texture2D(opacitySampler, perturbedBaseCoords.xy);\n \n#ifdef ALPHATEST\n if (opacityColor.r < 0.1)\n discard;\n#endif\n \n baseColor = texture2D(diffuseSampler, perturbedBaseCoords.xy) * 2.0;\n baseColor *= opacityColor;\n\n baseColor.rgb *= vDiffuseInfos.y;\n#endif\n\n#ifdef VERTEXCOLOR\n baseColor.rgb *= vColor.rgb;\n#endif\n\n // Bump\n#ifdef NORMAL\n vec3 normalW = normalize(vNormalW);\n#else\n vec3 normalW = vec3(1.0, 1.0, 1.0);\n#endif\n\n // Lighting\n vec3 diffuseBase = vec3(1.0, 1.0, 1.0);\n\n#ifdef VERTEXALPHA\n alpha *= vColor.a;\n#endif\n\n // Composition\n vec4 color = vec4(baseColor.rgb, alpha);\n\n#ifdef FOG\n float fog = CalcFogFactor();\n color.rgb = fog * color.rgb + (1.0 - fog) * vFogColor;\n#endif\n\n gl_FragColor = color;\n}";
\ No newline at end of file
diff --git a/static/Demos/FireMaterial/demo.js b/static/Demos/FireMaterial/demo.js
deleted file mode 100644
index 38803791f..000000000
--- a/static/Demos/FireMaterial/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateFireTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/FireMaterial/fire.js b/static/Demos/FireMaterial/fire.js
deleted file mode 100644
index 23ddaed0f..000000000
--- a/static/Demos/FireMaterial/fire.js
+++ /dev/null
@@ -1,96 +0,0 @@
-var CreateFireTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
-
- // Camera
- var camera = new BABYLON.ArcRotateCamera("Camera", 3 * Math.PI / 2, Math.PI / 4, 30, new BABYLON.Vector3(0, 4, 0), scene);
-
- // Light
- var light = new BABYLON.SpotLight("light", new BABYLON.Vector3(8, 16, 8), new BABYLON.Vector3(-1, -2, -1), 3, 1, scene);
- var shadowGenerator = new BABYLON.ShadowGenerator(512, light);
- shadowGenerator.useBlurExponentialShadowMap = true;
- shadowGenerator.blurBoxOffset = 1;
- shadowGenerator.blurScale = 1.0;
- shadowGenerator.setDarkness(0.0);
-
- // Fire light, simulates the fire intensity
- var light2 = new BABYLON.PointLight("light2", new BABYLON.Vector3(0, 10, 0), scene);
- light2.diffuse = new BABYLON.Color3(1.0, 0.5, 0.0);
- light2.parent = rootMesh;
-
- var keys = [];
- var previous = null;
- for (var i = 0; i < 20; i++) {
- var rand = BABYLON.Scalar.Clamp(Math.random(), 0.5, 1.0);
-
- if (previous) {
- if (Math.abs(rand - previous) < 0.1) {
- continue;
- }
- }
-
- previous = rand;
-
- keys.push({
- frame: i,
- value: rand
- });
- }
-
- var anim = new BABYLON.Animation("anim", "intensity", 1, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE);
- anim.setKeys(keys);
-
- light2.animations.push(anim);
- scene.beginAnimation(light2, 0, keys.length, true, 8);
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 300.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/santa", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
-
- // Fire material
- var fireMaterial = new BABYLON.FireMaterial("fire", scene);
- fireMaterial.diffuseTexture = new BABYLON.Texture("../../assets/fire/diffuse.png", scene);
- fireMaterial.distortionTexture = new BABYLON.Texture("../../assets/fire/distortion.png", scene);
- fireMaterial.opacityTexture = new BABYLON.Texture("../../assets/fire/opacity.png", scene);
- fireMaterial.opacityTexture.level = 0.5;
- fireMaterial.speed = 5.0;
-
- // Load candle 3D Model
- var rootMesh = new BABYLON.Mesh("root", scene);
- rootMesh.scaling = new BABYLON.Vector3(4, 4, 4);
-
- BABYLON.SceneLoader.ImportMesh("", "../../assets/fire/", "candle.babylon", scene, function (meshes) {
- var plane = scene.getMeshByName("Plane");
- plane.receiveShadows = true;
-
- for (var i = 0; i < meshes.length; i++) {
- if (meshes[i] !== plane) {
- shadowGenerator.getShadowMap().renderList.push(meshes[i]);
- meshes[i].receiveShadows = false;
- }
-
- if (!meshes[i].parent) {
- meshes[i].parent = rootMesh;
- }
- }
-
- var torus = scene.getMeshByName("Torus");
- torus.receiveShadows = true;
-
- // Create the fire plane (billboarded on Y)
- plane = BABYLON.Mesh.CreatePlane("firePlane", 1.5, scene);
- plane.position = new BABYLON.Vector3(0, 8.3, 0);
- plane.scaling.x = 0.45;
- plane.scaling.y = 1.5;
- plane.billboardMode = BABYLON.Mesh.BILLBOARDMODE_Y;
- plane.material = fireMaterial;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/FireMaterial/index.html b/static/Demos/FireMaterial/index.html
deleted file mode 100644
index 9ad90b5f8..000000000
--- a/static/Demos/FireMaterial/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Fire Material demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Flat2009/demo.js b/static/Demos/Flat2009/demo.js
deleted file mode 100644
index 63c808da9..000000000
--- a/static/Demos/Flat2009/demo.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var demo = {
- scene: "Flat2009",
- incremental: false,
- binary: false,
- doNotUseCDN: false,
- collisions: true,
- offline: true,
- onload: function () {
- var ecran = scene.getMeshByName("Ecran");
- ecran.material.diffuseTexture = new BABYLON.VideoTexture("video", ["/Scenes/Flat2009/babylonjs.mp4", "/Scenes/Flat2009/babylonjs.webm"], scene, true, true);
- scene.createOrUpdateSelectionOctree();
- scene.gravity.scaleInPlace(0.5);
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Flat2009/index.html b/static/Demos/Flat2009/index.html
deleted file mode 100644
index d4de1b66e..000000000
--- a/static/Demos/Flat2009/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Babylon.js - Flat 2009 demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/FlightHelmet/demo.js b/static/Demos/FlightHelmet/demo.js
deleted file mode 100644
index 4771ec2e8..000000000
--- a/static/Demos/FlightHelmet/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateFlightHelmetScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/FlightHelmet/index.html b/static/Demos/FlightHelmet/index.html
deleted file mode 100644
index 8ff6c3140..000000000
--- a/static/Demos/FlightHelmet/index.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
- Babylon.js - Flight Helmet demo
-
-
-
-
-
-
-
-
-
-
-
-
-
- Flight Helmet by Patrick Ryan
-
-
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
-
\ No newline at end of file
diff --git a/static/Demos/FlightHelmet/index.js b/static/Demos/FlightHelmet/index.js
deleted file mode 100644
index a2199e66a..000000000
--- a/static/Demos/FlightHelmet/index.js
+++ /dev/null
@@ -1,52 +0,0 @@
-var CreateFlightHelmetScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- scene.clearColor = new BABYLON.Color4(0.02, 0.02, 0.02, 1.0);
- scene.imageProcessingConfiguration.contrast = 1.6;
- scene.imageProcessingConfiguration.exposure = 0.6;
- scene.imageProcessingConfiguration.toneMappingEnabled = true;
-
- engine.setHardwareScalingLevel(0.5);
-
- BABYLON.SceneLoader.Append("/Assets/FlightHelmet/glTF/", "FlightHelmet_Materials.gltf", scene, function () {
- scene.createDefaultCameraOrLight(true, true, true);
-
- scene.activeCamera.lowerRadiusLimit = 20;
- scene.activeCamera.upperRadiusLimit = 80;
- scene.activeCamera.alpha = 2.5;
- scene.activeCamera.beta = 1.5;
- scene.activeCamera.useAutoRotationBehavior = true;
-
- var light = new BABYLON.DirectionalLight("light1", new BABYLON.Vector3(2, -3, -1), scene);
- light.position = new BABYLON.Vector3(-20, 20, 6);
- var generator = new BABYLON.ShadowGenerator(512, light);
- generator.useBlurExponentialShadowMap = true;
- generator.blurKernel = 32;
- generator.getShadowMap().refreshRate = BABYLON.RenderTargetTexture.REFRESHRATE_RENDER_ONCE;
-
- for (var i = 0; i < scene.meshes.length; i++) {
- generator.addShadowCaster(scene.meshes[i]);
- }
-
- var helper = scene.createDefaultEnvironment({
- groundShadowLevel: 0.6,
- });
-
- helper.setMainColor(new BABYLON.Color3(.42, .41, .33));
-
- var options = new BABYLON.SceneOptimizerOptions(50, 2000);
- options.addOptimization(new BABYLON.HardwareScalingOptimization(0, 1));
-
- // Optimizer
- var optimizer = new BABYLON.SceneOptimizer(scene, options);
- optimizer.start();
-
- optimizer.onNewOptimizationAppliedObservable.add(function (optim) {
- console.log(optim.getDescription());
- });
- optimizer.onSuccessObservable.add(function () {
- console.log("Optimization done")
- });
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Fog/demo.js b/static/Demos/Fog/demo.js
deleted file mode 100644
index 76de2c418..000000000
--- a/static/Demos/Fog/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateFogScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Fog/fog.js b/static/Demos/Fog/fog.js
deleted file mode 100644
index 3739ec729..000000000
--- a/static/Demos/Fog/fog.js
+++ /dev/null
@@ -1,42 +0,0 @@
-var CreateFogScene = function(engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.FreeCamera("Camera", new BABYLON.Vector3(0, 0, -20), scene);
- var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(20, 100, 2), scene);
- var sphere0 = BABYLON.Mesh.CreateSphere("Sphere0", 16, 3, scene);
- var sphere1 = BABYLON.Mesh.CreateSphere("Sphere1", 16, 3, scene);
- var sphere2 = BABYLON.Mesh.CreateSphere("Sphere2", 16, 3, scene);
-
- var material0 = new BABYLON.StandardMaterial("mat0", scene);
- material0.diffuseColor = new BABYLON.Color3(1, 0, 0);
- sphere0.material = material0;
- sphere0.position = new BABYLON.Vector3(-10, 0, 0);
-
- var material1 = new BABYLON.StandardMaterial("mat1", scene);
- material1.diffuseColor = new BABYLON.Color3(1, 1, 0);
- sphere1.material = material1;
-
- var material2 = new BABYLON.StandardMaterial("mat2", scene);
- material2.diffuseColor = new BABYLON.Color3(1, 0, 1);
- sphere2.material = material2;
- sphere2.position = new BABYLON.Vector3(10, 0, 0);
-
- sphere1.convertToFlatShadedMesh();
-
- camera.setTarget(new BABYLON.Vector3(0, 0, 0));
-
- // Fog
- scene.fogMode = BABYLON.Scene.FOGMODE_EXP;
- scene.fogDensity = 0.1;
-
- // Animations
- var alpha = 0;
- scene.registerBeforeRender(function () {
- sphere0.position.z = 4 * Math.cos(alpha);
- sphere1.position.z = 4 * Math.sin(alpha);
- sphere2.position.z = 4 * Math.cos(alpha);
-
- alpha += 0.1;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Fog/index.html b/static/Demos/Fog/index.html
deleted file mode 100644
index 4189765cb..000000000
--- a/static/Demos/Fog/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Fog demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Fresnel/demo.js b/static/Demos/Fresnel/demo.js
deleted file mode 100644
index e4f3fe299..000000000
--- a/static/Demos/Fresnel/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateFresnelTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Fresnel/fresnel.js b/static/Demos/Fresnel/fresnel.js
deleted file mode 100644
index 1cc5e019d..000000000
--- a/static/Demos/Fresnel/fresnel.js
+++ /dev/null
@@ -1,143 +0,0 @@
-var CreateFresnelTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var material = new BABYLON.StandardMaterial("kosh", scene);
- var sphere1 = BABYLON.Mesh.CreateSphere("Sphere1", 32, 3, scene);
- var sphere2 = BABYLON.Mesh.CreateSphere("Sphere2", 32, 3, scene);
- var sphere3 = BABYLON.Mesh.CreateSphere("Sphere3", 32, 3, scene);
- var sphere4 = BABYLON.Mesh.CreateSphere("Sphere4", 32, 3, scene);
- var sphere5 = BABYLON.Mesh.CreateSphere("Sphere5", 32, 3, scene);
- var light = new BABYLON.PointLight("Omni0", new BABYLON.Vector3(-17.6, 18.8, -49.9), scene);
-
- camera.setPosition(new BABYLON.Vector3(-15, 3, 0));
-
- sphere2.position.z -= 5;
- sphere3.position.z += 5;
- sphere4.position.x += 5;
- sphere5.position.x -= 5;
-
- // Sphere1 material
- material.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/TropicalSunnyDay", scene);
- material.diffuseColor = new BABYLON.Color3(0, 0, 0);
- material.emissiveColor = new BABYLON.Color3(0.5, 0.5, 0.5);
- material.alpha = 0.2;
- material.specularPower = 16;
-
- // Fresnel
- material.reflectionFresnelParameters = new BABYLON.FresnelParameters();
- material.reflectionFresnelParameters.bias = 0.1;
-
- material.emissiveFresnelParameters = new BABYLON.FresnelParameters();
- material.emissiveFresnelParameters.bias = 0.6;
- material.emissiveFresnelParameters.power = 4;
- material.emissiveFresnelParameters.leftColor = BABYLON.Color3.White();
- material.emissiveFresnelParameters.rightColor = BABYLON.Color3.Black();
-
- material.opacityFresnelParameters = new BABYLON.FresnelParameters();
- material.opacityFresnelParameters.leftColor = BABYLON.Color3.White();
- material.opacityFresnelParameters.rightColor = BABYLON.Color3.Black();
-
- sphere1.material = material;
-
- // Sphere2 material
- material = new BABYLON.StandardMaterial("kosh2", scene);
- material.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/TropicalSunnyDay", scene);
- material.diffuseColor = new BABYLON.Color3(0, 0, 0);
- material.emissiveColor = new BABYLON.Color3(0.5, 0.5, 0.5);
- material.specularPower = 32;
-
- // Fresnel
- material.reflectionFresnelParameters = new BABYLON.FresnelParameters();
- material.reflectionFresnelParameters.bias = 0.1;
-
- material.emissiveFresnelParameters = new BABYLON.FresnelParameters();
- material.emissiveFresnelParameters.bias = 0.5;
- material.emissiveFresnelParameters.power = 4;
- material.emissiveFresnelParameters.leftColor = BABYLON.Color3.White();
- material.emissiveFresnelParameters.rightColor = BABYLON.Color3.Black();
-
- sphere2.material = material;
- sphere2.isBlocker = true; // For intercepting lens flare
-
- // Sphere3 material
- material = new BABYLON.StandardMaterial("kosh3", scene);
- material.diffuseColor = new BABYLON.Color3(0, 0, 0);
- material.emissiveColor = BABYLON.Color3.White();
- material.specularPower = 64;
- material.alpha = 0.2;
-
- // Fresnel
- material.emissiveFresnelParameters = new BABYLON.FresnelParameters();
- material.emissiveFresnelParameters.bias = 0.2;
- material.emissiveFresnelParameters.leftColor = BABYLON.Color3.White();
- material.emissiveFresnelParameters.rightColor = BABYLON.Color3.Black();
-
- material.opacityFresnelParameters = new BABYLON.FresnelParameters();
- material.opacityFresnelParameters.power = 4;
- material.opacityFresnelParameters.leftColor = BABYLON.Color3.White();
- material.opacityFresnelParameters.rightColor = BABYLON.Color3.Black();
-
- sphere3.material = material;
- sphere3.isBlocker = true; // For intercepting lens flare
-
- // Sphere4 material
- material = new BABYLON.StandardMaterial("kosh4", scene);
- material.diffuseColor = new BABYLON.Color3(0, 0, 0);
- material.emissiveColor = BABYLON.Color3.White();
- material.specularPower = 64;
-
- // Fresnel
- material.emissiveFresnelParameters = new BABYLON.FresnelParameters();
- material.emissiveFresnelParameters.power = 4;
- material.emissiveFresnelParameters.bias = 0.5;
- material.emissiveFresnelParameters.leftColor = BABYLON.Color3.White();
- material.emissiveFresnelParameters.rightColor = BABYLON.Color3.Black();
-
- sphere4.material = material;
- sphere4.isBlocker = true; // For intercepting lens flare
-
- // Sphere5 material
- material = new BABYLON.StandardMaterial("kosh5", scene);
- material.diffuseColor = new BABYLON.Color3(0, 0, 0);
- material.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/TropicalSunnyDay", scene);
- material.reflectionTexture.level = 0.5;
- material.specularPower = 64;
- material.emissiveColor = new BABYLON.Color3(0.2, 0.2, 0.2);
-
- // Fresnel
- material.emissiveFresnelParameters = new BABYLON.FresnelParameters();
- material.emissiveFresnelParameters.bias = 0.4;
- material.emissiveFresnelParameters.power = 2;
- material.emissiveFresnelParameters.leftColor = BABYLON.Color3.Black();
- material.emissiveFresnelParameters.rightColor = BABYLON.Color3.White();
-
- sphere5.material = material;
- sphere5.isBlocker = true; // For intercepting lens flare
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 100.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/TropicalSunnyDay", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
-
- // Lens flares
- var lensFlareSystem = new BABYLON.LensFlareSystem("lensFlareSystem", light, scene);
- var flare00 = new BABYLON.LensFlare(0.2, 0, new BABYLON.Color3(1, 1, 1), "../../assets/Flare.png", lensFlareSystem);
- var flare01 = new BABYLON.LensFlare(0.5, 0.2, new BABYLON.Color3(0.5, 0.5, 1), "../../assets/Flare.png", lensFlareSystem);
- var flare02 = new BABYLON.LensFlare(0.2, 1.0, new BABYLON.Color3(1, 1, 1), "../../assets/Flare.png", lensFlareSystem);
- var flare03 = new BABYLON.LensFlare(0.4, 0.4, new BABYLON.Color3(1, 0.5, 1), "../../assets/Flare.png", lensFlareSystem);
- var flare04 = new BABYLON.LensFlare(0.1, 0.6, new BABYLON.Color3(1, 1, 1), "../../assets/Flare.png", lensFlareSystem);
- var flare05 = new BABYLON.LensFlare(0.3, 0.8, new BABYLON.Color3(1, 1, 1), "../../assets/Flare.png", lensFlareSystem);
-
- // Animations
- scene.registerBeforeRender(function() {
- camera.alpha += 0.01 * scene.getAnimationRatio();
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Fresnel/index.html b/static/Demos/Fresnel/index.html
deleted file mode 100644
index a3a8bb3e4..000000000
--- a/static/Demos/Fresnel/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Fresnel demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Fur/demo.js b/static/Demos/Fur/demo.js
deleted file mode 100644
index 86e97173f..000000000
--- a/static/Demos/Fur/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateFurTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Fur/fur.js b/static/Demos/Fur/fur.js
deleted file mode 100644
index 67538dd89..000000000
--- a/static/Demos/Fur/fur.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var CreateFurTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", -2.5, 1.0, 200, new BABYLON.Vector3(0, 5, 0), scene);
-
- var configureFur = function (mesh) {
- var fur = new BABYLON.FurMaterial("fur", scene);
- fur.furLength = 0;
- fur.furAngle = 0;
- fur.furColor = new BABYLON.Color3(2, 2, 2);
- fur.diffuseTexture = mesh.material.diffuseTexture;
- fur.furTexture = BABYLON.FurMaterial.GenerateTexture("furTexture", scene);
- fur.furSpacing = 6;
- fur.furDensity = 20;
- fur.furSpeed = 300;
- fur.furGravity = new BABYLON.Vector3(0, -1, 0);
-
- mesh.material = fur;
-
- var quality = 30; // It is enougth
- var shells = BABYLON.FurMaterial.FurifyMesh(mesh, quality);
-
- // Special for bunny (ears)
- for (var i = 0; i < shells.length; i++) {
- shells[i].material.backFaceCulling = false;
- }
- }
-
- BABYLON.SceneLoader.Append("/assets/Rabbit/", "Rabbit.babylon", scene, function () {
- scene.activeCamera = camera;
-
- configureFur(scene.meshes[1]);
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Fur/index.html b/static/Demos/Fur/index.html
deleted file mode 100644
index 69d067157..000000000
--- a/static/Demos/Fur/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Fur demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
diff --git a/static/Demos/GLTF/demo.js b/static/Demos/GLTF/demo.js
deleted file mode 100644
index db0e7914e..000000000
--- a/static/Demos/GLTF/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: createScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/GLTF/gltf.js b/static/Demos/GLTF/gltf.js
deleted file mode 100644
index f8eed64a8..000000000
--- a/static/Demos/GLTF/gltf.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var createScene = function () {
- var scene = new BABYLON.Scene(engine);
-
- //Adding a light
- var light = new BABYLON.HemisphericLight();
-
- //Adding an Arc Rotate Camera
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0.8, 10, BABYLON.Vector3.Zero(), scene);
- camera.attachControl(canvas, false);
-
- // The first parameter can be used to specify which mesh to import. Here we import all meshes
- BABYLON.SceneLoader.Append("/assets/", "Alien.glb", scene, function (newMeshes) {
- scene.activeCamera = null;
- scene.createDefaultCameraOrLight(true);
- scene.activeCamera.attachControl(canvas, false);
- });
-
- return scene;
-}
\ No newline at end of file
diff --git a/static/Demos/GLTF/index.html b/static/Demos/GLTF/index.html
deleted file mode 100644
index 1b3931ad6..000000000
--- a/static/Demos/GLTF/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - GLTF demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
diff --git a/static/Demos/GLTF1CesiumMan/demo.js b/static/Demos/GLTF1CesiumMan/demo.js
deleted file mode 100644
index db0e7914e..000000000
--- a/static/Demos/GLTF1CesiumMan/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: createScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/GLTF1CesiumMan/index.html b/static/Demos/GLTF1CesiumMan/index.html
deleted file mode 100644
index 6b0ac190e..000000000
--- a/static/Demos/GLTF1CesiumMan/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Normals Test
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/GLTF1CesiumMan/index.js b/static/Demos/GLTF1CesiumMan/index.js
deleted file mode 100644
index ce664c98c..000000000
--- a/static/Demos/GLTF1CesiumMan/index.js
+++ /dev/null
@@ -1,41 +0,0 @@
-function createScene(engine) {
- var scene = new BABYLON.Scene(engine);
- scene.useRightHandedSystem = true;
- var hdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("/Assets/environment.dds", scene);
- hdrTexture.gammaSpace = false;
- scene.createDefaultSkybox(hdrTexture, true, 100, 0.3);
-
- var camera = new BABYLON.ArcRotateCamera("camera", -Math.PI / 2, Math.PI / 2, 3, new BABYLON.Vector3(0, 0.7, 0.8));
- camera.wheelPrecision = 100;
-
- camera.attachControl(scene.getEngine().getRenderingCanvas());
-
- loadModel(scene, "CesiumMan.gltf");
-
- return scene;
-}
-
-function loadModel(scene, name) {
- BABYLON.SceneLoader.ImportMesh("", "/Assets/glTF1CesiumMan/", name, scene, function (meshes) {
- var root = new BABYLON.Mesh("root", scene);
- meshes.forEach(mesh => {
- if (!mesh.parent) {
- mesh.setParent(root);
- }
- });
- root.rotation = new BABYLON.Vector3(0, Math.PI, 0);
- });
-}
-
-function createLabel(scene, text) {
- var dynamicTexture = new BABYLON.DynamicTexture("DynamicTexture", 512, scene, true);
- dynamicTexture.hasAlpha = true;
- dynamicTexture.drawText(text, null, null, "36px Arial", "white", "transparent");
- var plane = BABYLON.Mesh.CreatePlane("TextPlane", 2, scene);
- plane.material = new BABYLON.StandardMaterial("TextPlaneMaterial", scene);
- plane.material.backFaceCulling = false;
- plane.material.specularColor = BABYLON.Color3.Black();
- plane.material.diffuseTexture = dynamicTexture;
- plane.material.useAlphaFromDiffuseTexture = true;
- return plane;
-}
diff --git a/static/Demos/GLTFMeshPrimitiveAttributeTest/demo.js b/static/Demos/GLTFMeshPrimitiveAttributeTest/demo.js
deleted file mode 100644
index db0e7914e..000000000
--- a/static/Demos/GLTFMeshPrimitiveAttributeTest/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: createScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/GLTFMeshPrimitiveAttributeTest/index.html b/static/Demos/GLTFMeshPrimitiveAttributeTest/index.html
deleted file mode 100644
index 6b0ac190e..000000000
--- a/static/Demos/GLTFMeshPrimitiveAttributeTest/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Normals Test
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/GLTFMeshPrimitiveAttributeTest/index.js b/static/Demos/GLTFMeshPrimitiveAttributeTest/index.js
deleted file mode 100644
index a36ddb503..000000000
--- a/static/Demos/GLTFMeshPrimitiveAttributeTest/index.js
+++ /dev/null
@@ -1,51 +0,0 @@
-function createScene(engine) {
- var scene = new BABYLON.Scene(engine);
-
- var hdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("/Assets/environment.dds", scene);
- hdrTexture.gammaSpace = false;
- scene.createDefaultSkybox(hdrTexture, true, 100, 0.3);
-
- var camera = new BABYLON.ArcRotateCamera("camera", -Math.PI / 2, Math.PI / 2, 5);
- camera.wheelPrecision = 100;
- camera.attachControl(scene.getEngine().getRenderingCanvas());
-
- var title = createLabel(scene, "Generated Normal Attribute");
- title.position = new BABYLON.Vector3(+0, +1.7, 0);
-
- loadModel(scene, "NoNormalsBottom.gltf", new BABYLON.Vector3(-1.5, +0.7, 0), "Bottom Primitive");
- loadModel(scene, "NoNormalsMiddle.gltf", new BABYLON.Vector3(+0, +0.7, 0), "Middle Primitive");
- loadModel(scene, "NoNormalsTop.gltf", new BABYLON.Vector3(+1.5, +0.7, 0), "Top Primitive");
-
- return scene;
-}
-
-function loadModel(scene, name, center, caption) {
- BABYLON.SceneLoader.ImportMesh("", "/Assets/glTFMeshPrimitiveAttributeTest/", name, scene, function (meshes) {
- var root = new BABYLON.Mesh("root", scene);
- meshes.forEach(mesh => {
- if (!mesh.parent) {
- mesh.setParent(root);
- }
- });
-
- root.position = center;
- root.rotation = new BABYLON.Vector3(0, Math.PI, 0);
-
- var label = createLabel(scene, caption);
- label.position = center.clone();
- label.position.y -= 2;
- });
-}
-
-function createLabel(scene, text) {
- var dynamicTexture = new BABYLON.DynamicTexture("DynamicTexture", 512, scene, true);
- dynamicTexture.hasAlpha = true;
- dynamicTexture.drawText(text, null, null, "36px Arial", "white", "transparent");
- var plane = BABYLON.Mesh.CreatePlane("TextPlane", 2, scene);
- plane.material = new BABYLON.StandardMaterial("TextPlaneMaterial", scene);
- plane.material.backFaceCulling = false;
- plane.material.specularColor = BABYLON.Color3.Black();
- plane.material.diffuseTexture = dynamicTexture;
- plane.material.useAlphaFromDiffuseTexture = true;
- return plane;
-}
diff --git a/static/Demos/GLTFNormals/demo.js b/static/Demos/GLTFNormals/demo.js
deleted file mode 100644
index db0e7914e..000000000
--- a/static/Demos/GLTFNormals/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: createScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/GLTFNormals/index.html b/static/Demos/GLTFNormals/index.html
deleted file mode 100644
index 6b0ac190e..000000000
--- a/static/Demos/GLTFNormals/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Normals Test
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/GLTFNormals/index.js b/static/Demos/GLTFNormals/index.js
deleted file mode 100644
index b3cb27320..000000000
--- a/static/Demos/GLTFNormals/index.js
+++ /dev/null
@@ -1,51 +0,0 @@
-function createScene(engine) {
- var scene = new BABYLON.Scene(engine);
-
- var light = new BABYLON.DirectionalLight("light", new BABYLON.Vector3(1, -1, 1), scene);
-
- var sphere = BABYLON.Mesh.CreateSphere("sphere", 16, 0.5, scene);
- sphere.position.y = 1;
- sphere.material = new BABYLON.PBRMaterial("spherMaterial", scene);
- sphere.material.metallic = 0;
-
- var camera = new BABYLON.ArcRotateCamera("camera", -Math.PI / 2, Math.PI / 2, 6);
- camera.wheelPrecision = 100;
- camera.attachControl(scene.getEngine().getRenderingCanvas());
-
- loadModel(scene, "TestCube1.gltf", new BABYLON.Vector3(-2, -0.5, 0), "Normals + Tangents");
- loadModel(scene, "TestCube2.gltf", new BABYLON.Vector3(+0, -0.5, 0), "Normals Only");
- loadModel(scene, "TestCube3.gltf", new BABYLON.Vector3(+2, -0.5, 0), "No Normals/Tangents");
-
- return scene;
-}
-
-function loadModel(scene, name, center, caption) {
- BABYLON.SceneLoader.ImportMesh("", "/Assets/TestCube/", name, scene, function (meshes) {
- var root = new BABYLON.Mesh("root", scene);
- meshes.forEach(mesh => {
- if (!mesh.parent) {
- mesh.setParent(root);
- }
- });
-
- root.position = center;
- root.rotation = new BABYLON.Vector3(Math.PI / 4, Math.PI / 4, 0);
-
- var label = createLabel(scene, caption);
- label.position = center.clone();
- label.position.y -= 1;
- });
-}
-
-function createLabel(scene, text) {
- var dynamicTexture = new BABYLON.DynamicTexture("DynamicTexture", 512, scene, true);
- dynamicTexture.hasAlpha = true;
- dynamicTexture.drawText(text, null, null, "36px Arial", "white", "transparent");
- var plane = BABYLON.Mesh.CreatePlane("TextPlane", 2, scene);
- plane.material = new BABYLON.StandardMaterial("TextPlaneMaterial", scene);
- plane.material.backFaceCulling = false;
- plane.material.specularColor = BABYLON.Color3.Black();
- plane.material.diffuseTexture = dynamicTexture;
- plane.material.useAlphaFromDiffuseTexture = true;
- return plane;
-}
diff --git a/static/Demos/GUI/demo.js b/static/Demos/GUI/demo.js
deleted file mode 100644
index db0e7914e..000000000
--- a/static/Demos/GUI/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: createScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/GUI/gui.js b/static/Demos/GUI/gui.js
deleted file mode 100644
index 62aef07f1..000000000
--- a/static/Demos/GUI/gui.js
+++ /dev/null
@@ -1,258 +0,0 @@
-var createScene = function () {
- var scene = new BABYLON.Scene(engine);
-
-
- var camera = new BABYLON.ArcRotateCamera("Camera", -Math.PI / 2, 1.0, 110, BABYLON.Vector3.Zero(), scene);
- camera.attachControl(canvas, true);
-
- var hemi = new BABYLON.HemisphericLight("toto");
-
- var sphereMaterial = new BABYLON.StandardMaterial();
-
- //Creation of 6 spheres
- var sphere1 = BABYLON.Mesh.CreateSphere("Sphere1", 10.0, 9.0, scene);
- var sphere2 = BABYLON.Mesh.CreateSphere("Sphere2", 2.0, 9.0, scene);//Only two segments
- var sphere3 = BABYLON.Mesh.CreateSphere("Sphere3", 10.0, 9.0, scene);
- var sphere4 = BABYLON.Mesh.CreateSphere("Sphere4", 10.0, 0.5, scene);
- var sphere5 = BABYLON.Mesh.CreateSphere("Sphere5", 10.0, 9.0, scene);
- var sphere6 = BABYLON.Mesh.CreateSphere("Sphere6", 10.0, 9.0, scene);
- var sphere7 = BABYLON.Mesh.CreateSphere("Sphere7", 10.0, 9.0, scene);
-
- //Position the spheres
- sphere1.position.x = -30;
- sphere2.position.x = -20;
- sphere3.position.x = -10;
- sphere4.position.x = 0;
- sphere5.position.x = 10;
- sphere6.position.x = 20;
- sphere7.position.x = 30;
-
- // Material
- sphere1.material = sphereMaterial;
- sphere2.material = sphereMaterial;
- sphere3.material = sphereMaterial;
- sphere4.material = sphereMaterial;
- sphere5.material = sphereMaterial;
- sphere6.material = sphereMaterial;
- sphere7.material = sphereMaterial;
-
- // GUI
- var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("ui1");
-
- var panel = new BABYLON.GUI.StackPanel();
- panel.width = 0.25;
- panel.rotation = 0.2;
- panel.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
- advancedTexture.addControl(panel);
-
- var button1 = BABYLON.GUI.Button.CreateSimpleButton("but1", "Click Me");
- button1.width = 0.2;
- button1.height = "40px";
- button1.color = "white";
- button1.cornerRadius = 20;
- button1.background = "green";
- button1.onPointerUpObservable.add(function() {
- circle.scaleX += 0.1;
- });
- panel.addControl(button1);
-
- var circle = new BABYLON.GUI.Ellipse();
- circle.width = "50px";
- circle.color = "white";
- circle.thickness = 5;
- circle.height = "50px";
- circle.paddingTop = "2px";
- circle.paddingBottom = "2px";
- panel.addControl(circle);
-
- var button2 = BABYLON.GUI.Button.CreateSimpleButton("but2", "Click Me 2");
- button2.width = 0.2;
- button2.height = "40px";
- button2.color = "white";
- button2.background = "green";
- button2.onPointerUpObservable.add(function() {
- circle.scaleX -= 0.1;
- });
- panel.addControl(button2);
-
- var createLabel = function(mesh) {
- var label = new BABYLON.GUI.Rectangle("label for " + mesh.name);
- label.background = "black"
- label.height = "30px";
- label.alpha = 0.5;
- label.width = "100px";
- label.cornerRadius = 20;
- label.thickness = 1;
- label.linkOffsetY = 30;
- advancedTexture.addControl(label);
- label.linkWithMesh(mesh);
-
- var text1 = new BABYLON.GUI.TextBlock();
- text1.text = mesh.name;
- text1.color = "white";
- label.addControl(text1);
- }
-
- createLabel(sphere1);
- createLabel(sphere2);
- createLabel(sphere3);
- createLabel(sphere4);
- createLabel(sphere5);
- createLabel(sphere6);
-
- var label = new BABYLON.GUI.Rectangle("label for " + sphere7.name);
- label.background = "black"
- label.height = "30px";
- label.alpha = 0.5;
- label.width = "100px";
- label.cornerRadius = 20;
- label.thickness = 1;
- label.linkOffsetY = 30;
- label.top = "10%";
- label.zIndex = 5;
- label.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_TOP;
- advancedTexture.addControl(label);
-
- var text1 = new BABYLON.GUI.TextBlock();
- text1.text = sphere7.name;
- text1.color = "white";
- label.addControl(text1);
-
- var line = new BABYLON.GUI.Line();
- line.alpha = 0.5;
- line.lineWidth = 5;
- line.dash = [5, 10];
- advancedTexture.addControl(line);
- line.linkWithMesh(sphere7);
- line.connectedControl = label;
-
- var endRound = new BABYLON.GUI.Ellipse();
- endRound.width = "10px";
- endRound.background = "black";
- endRound.height = "10px";
- endRound.color = "white";
- advancedTexture.addControl(endRound);
- endRound.linkWithMesh(sphere7);
-
- // Plane
- var plane = BABYLON.Mesh.CreatePlane("plane", 20);
- plane.parent = sphere4;
- plane.position.y = -10;
-
- // GUI
- var advancedTexture2 = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane);
-
- var panel2 = new BABYLON.GUI.StackPanel();
- panel2.top = "100px";
- advancedTexture2.addControl(panel2);
-
- var button1 = BABYLON.GUI.Button.CreateSimpleButton("but1", "Click Me");
- button1.width = 1;
- button1.height = "100px";
- button1.color = "white";
- button1.fontSize = 50;
- button1.background = "green";
- panel2.addControl(button1);
-
- var textblock = new BABYLON.GUI.TextBlock();
- textblock.height = "150px";
- textblock.fontSize = 100;
- textblock.text = "please pick an option:";
- panel2.addControl(textblock);
-
- var addRadio = function(text, parent) {
-
- var button = new BABYLON.GUI.RadioButton();
- button.width = "40px";
- button.height = "40px";
- button.color = "white";
- button.background = "green";
-
- button.onIsCheckedChangedObservable.add(function(state) {
- if (state) {
- textblock.text = "You selected " + text;
- }
- });
-
- var header = BABYLON.GUI.Control.AddHeader(button, text, "400px", { isHorizontal: true, controlFirst: true });
- header.height = "100px";
- header.children[1].fontSize = 80;
- header.children[1].onPointerDownObservable.add(function() {
- button.isChecked = !button.isChecked;
- });
-
- parent.addControl(header);
- }
-
-
- addRadio("option 1", panel2);
- addRadio("option 2", panel2);
- addRadio("option 3", panel2);
- addRadio("option 4", panel2);
- addRadio("option 5", panel2);
-
- scene.registerBeforeRender(function() {
- panel.rotation += 0.01;
- });
-
- // Another GUI on the right
- var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
- advancedTexture.layer.layerMask = 2;
-
- var panel3 = new BABYLON.GUI.StackPanel();
- panel3.width = "220px";
- panel3.fontSize = "14px";
- panel3.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_RIGHT;
- panel3.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER;
- advancedTexture.addControl(panel3);
-
- var checkbox = new BABYLON.GUI.Checkbox();
- checkbox.width = "20px";
- checkbox.height = "20px";
- checkbox.isChecked = true;
- checkbox.color = "green";
-
- var panelForCheckbox = BABYLON.GUI.Control.AddHeader(checkbox, "checkbox", "180px", { isHorizontal: true, controlFirst: true});
- panelForCheckbox.color = "white";
- panelForCheckbox.height = "20px";
- panelForCheckbox.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
- panel3.addControl(panelForCheckbox);
-
- var header = new BABYLON.GUI.TextBlock();
- header.text = "Slider:";
- header.height = "40px";
- header.color = "white";
- header.textHorizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
- header.paddingTop = "10px";
- panel3.addControl(header);
-
- var slider = new BABYLON.GUI.Slider();
- slider.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
- slider.minimum = 0;
- slider.maximum = 2 * Math.PI;
- slider.color = "green";
- slider.value = 0;
- slider.height = "20px";
- slider.width = "200px";
- panel3.addControl(slider);
-
- header = new BABYLON.GUI.TextBlock();
- header.text = "Sphere diffuse:";
- header.height = "40px";
- header.color = "white";
- header.textHorizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
- header.paddingTop = "10px";
- panel3.addControl(header);
-
- var picker = new BABYLON.GUI.ColorPicker();
- picker.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
- picker.value = sphereMaterial.diffuseColor;
- picker.height = "150px";
- picker.width = "150px";
- picker.onValueChangedObservable.add(function(value) { // value is a color3
- sphereMaterial.diffuseColor = value;
- });
- panel3.addControl(picker);
-
- return scene;
-};
diff --git a/static/Demos/GUI/index.html b/static/Demos/GUI/index.html
deleted file mode 100644
index d6fb2a362..000000000
--- a/static/Demos/GUI/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - GUI demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
diff --git a/static/Demos/GlowLayer/demo.js b/static/Demos/GlowLayer/demo.js
deleted file mode 100644
index e7ea3e807..000000000
--- a/static/Demos/GlowLayer/demo.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var demo = {
- constructor: CreateScene,
- onload: function () {
-
- }
-};
\ No newline at end of file
diff --git a/static/Demos/GlowLayer/index.html b/static/Demos/GlowLayer/index.html
deleted file mode 100644
index 5349cde15..000000000
--- a/static/Demos/GlowLayer/index.html
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
- Babylon.js - Glow Layer demo
-
-
-
-
-
-
-
-
-
-
-
-
-
- Neon Pipe by Patrick Ryan
-
-
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/GlowLayer/index.js b/static/Demos/GlowLayer/index.js
deleted file mode 100644
index 11aaa1a2e..000000000
--- a/static/Demos/GlowLayer/index.js
+++ /dev/null
@@ -1,52 +0,0 @@
-var CreateScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- scene.clearColor = new BABYLON.Color4(0.02, 0.02, 0.02, 1.0);
- scene.imageProcessingConfiguration.contrast = 1.6;
- scene.imageProcessingConfiguration.exposure = 0.6;
- scene.imageProcessingConfiguration.toneMappingEnabled = true;
-
- // Load the model
- BABYLON.SceneLoader.Append("https://www.babylonjs.com/assets/NeonPipe/glTF/", "NeonPipe.gltf", scene, function (meshes) {
- // Create a camera pointing at your model.
- scene.createDefaultCameraOrLight(true, true, true);
- scene.activeCamera.lowerRadiusLimit = 20;
- scene.activeCamera.upperRadiusLimit = 80;
- scene.activeCamera.alpha = 2.5;
- scene.activeCamera.beta = 1.5;
- scene.activeCamera.useAutoRotationBehavior = true;
-
- var gl = new BABYLON.GlowLayer("glow", scene, { mainTextureSamples: 2 });
-
- var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
-
- var panel = new BABYLON.GUI.StackPanel();
- panel.width = "200px";
- panel.isVertical = false;
- panel.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_RIGHT;
- panel.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER;
- advancedTexture.addControl(panel);
-
- var checkbox = new BABYLON.GUI.Checkbox();
- checkbox.width = "20px";
- checkbox.height = "20px";
- checkbox.isChecked = true;
- checkbox.color = "green";
- checkbox.onIsCheckedChangedObservable.add(function(value) {
- gl.isEnabled = value;
- });
- panel.addControl(checkbox);
-
- var header = new BABYLON.GUI.TextBlock();
- header.text = "Glow Enabled";
- header.width = "180px";
- header.marginLeft = "5px";
- header.textHorizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
- header.color = "white";
- panel.addControl(header);
-
- var helper = scene.createDefaultEnvironment();
- helper.setMainColor(BABYLON.Color3.Gray());
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/GlowingEspilit/demo.js b/static/Demos/GlowingEspilit/demo.js
deleted file mode 100644
index 6564fa09a..000000000
--- a/static/Demos/GlowingEspilit/demo.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var demo = {
- scene: "Espilit",
- incremental: false,
- binary: true,
- doNotUseCDN: false,
- collisions: true,
- offline: false,
- onload: function () {
- scene.autoClear = true;
- scene.getMeshByName("Sol loin").useVertexColors = false;
- scene.gravity.scaleInPlace(0.5);
-
- var gl = new BABYLON.GlowLayer("glow", scene, {
- mainTextureSamples: 4
- });
- gl.customEmissiveColorSelector = function(mesh, subMesh, material, result) {
- if (mesh.name === "Bandes lum") {
- result.set(1, 1, 1, 1);
- } else {
- result.set(0, 0, 0, 0);
- }
- }
- var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
- light.intensity = 0.7;
- var VRHelper = scene.createDefaultVRExperience({createDeviceOrientationCamera:false});
- VRHelper.enableTeleportation({ floorMeshName: "Sols" });
- }
-};
\ No newline at end of file
diff --git a/static/Demos/GlowingEspilit/index.html b/static/Demos/GlowingEspilit/index.html
deleted file mode 100644
index c185dc70a..000000000
--- a/static/Demos/GlowingEspilit/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Glowing Espilit demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
diff --git a/static/Demos/Heart/demo.js b/static/Demos/Heart/demo.js
deleted file mode 100644
index 3a59563a0..000000000
--- a/static/Demos/Heart/demo.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var demo = {
- scene: "Heart",
- incremental: false,
- binary: false,
- doNotUseCDN: false,
- collisions: true,
- offline: true,
- onload: function () {
- scene.getMeshByName("Labels").setEnabled(false);
- scene.getMeshByName("lums").useVertexColors = false;
- scene.gravity.scaleInPlace(0.5);
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Heart/index.html b/static/Demos/Heart/index.html
deleted file mode 100644
index aa4f6366d..000000000
--- a/static/Demos/Heart/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Babylon.js - Heart demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Heightmap/demo.js b/static/Demos/Heightmap/demo.js
deleted file mode 100644
index 5554fe046..000000000
--- a/static/Demos/Heightmap/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateHeightMapTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Heightmap/heightMap.js b/static/Demos/Heightmap/heightMap.js
deleted file mode 100644
index d6fc44740..000000000
--- a/static/Demos/Heightmap/heightMap.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var CreateHeightMapTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var sun = new BABYLON.PointLight("Omni0", new BABYLON.Vector3(60, 100, 10), scene);
-
- camera.setPosition(new BABYLON.Vector3(-20, 20, 0));
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 100.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/skybox", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
-
- // Ground
- var ground = BABYLON.Mesh.CreateGroundFromHeightMap("ground", "heightMap.png", 100, 100, 100, 0, 10, scene, false);
- var groundMaterial = new BABYLON.StandardMaterial("ground", scene);
- groundMaterial.diffuseTexture = new BABYLON.Texture("ground.jpg", scene);
-
- groundMaterial.diffuseTexture.uScale = 6;
- groundMaterial.diffuseTexture.vScale = 6;
- groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- ground.position.y = -2.05;
- ground.material = groundMaterial;
-
- var beforeRenderFunction = function() {
- // Camera
- if (camera.beta < 0.1)
- camera.beta = 0.1;
- else if (camera.beta > (Math.PI / 2) * 0.9)
- camera.beta = (Math.PI / 2) * 0.9;
-
- if (camera.radius > 50)
- camera.radius = 50;
-
- if (camera.radius < 5)
- camera.radius = 5;
- };
-
- scene.registerBeforeRender(beforeRenderFunction);
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Heightmap/index.html b/static/Demos/Heightmap/index.html
deleted file mode 100644
index a05795120..000000000
--- a/static/Demos/Heightmap/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Heightmap demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Highlights/demo.js b/static/Demos/Highlights/demo.js
deleted file mode 100644
index 11d6c306f..000000000
--- a/static/Demos/Highlights/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateHighlightsScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Highlights/highlights.js b/static/Demos/Highlights/highlights.js
deleted file mode 100644
index cf6c6440f..000000000
--- a/static/Demos/Highlights/highlights.js
+++ /dev/null
@@ -1,107 +0,0 @@
-var CreateHighlightsScene = function () {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", -Math.PI / 4, Math.PI / 2.5, 200, BABYLON.Vector3.Zero(), scene);
- camera.attachControl(canvas, true);
- camera.minZ = 0.1;
-
- // Light
- new BABYLON.PointLight("point", new BABYLON.Vector3(0, 40, 0), scene);
-
- // Environment Texture
- var hdrTexture = new BABYLON.HDRCubeTexture("room.hdr", scene, 512);
-
- // Skybox
- var hdrSkybox = BABYLON.Mesh.CreateBox("hdrSkyBox", 1000.0, scene);
- var hdrSkyboxMaterial = new BABYLON.PBRMaterial("skyBox", scene);
- hdrSkyboxMaterial.backFaceCulling = false;
- hdrSkyboxMaterial.reflectionTexture = hdrTexture.clone();
- hdrSkyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- hdrSkyboxMaterial.microSurface = 1.0;
- hdrSkyboxMaterial.cameraExposure = 0.6;
- hdrSkyboxMaterial.cameraContrast = 1.6;
- hdrSkyboxMaterial.disableLighting = true;
- hdrSkybox.material = hdrSkyboxMaterial;
- hdrSkybox.infiniteDistance = true;
-
- // Create meshes
- var sphereGlass = BABYLON.Mesh.CreateSphere("sphereGlass", 48, 30.0, scene);
- sphereGlass.translate(new BABYLON.Vector3(1, 0, 0), -60);
-
- var sphereMetal = BABYLON.Mesh.CreateSphere("sphereMetal", 48, 30.0, scene);
- sphereMetal.translate(new BABYLON.Vector3(1, 0, 0), 60);
-
- var spherePlastic = BABYLON.Mesh.CreateSphere("spherePlastic", 48, 30.0, scene);
- spherePlastic.translate(new BABYLON.Vector3(0, 0, 1), -60);
-
- var woodPlank = BABYLON.MeshBuilder.CreateBox("plane", { width: 65, height: 1, depth: 65 }, scene);
-
- // Create materials
- var glass = new BABYLON.PBRMaterial("glass", scene);
- glass.reflectionTexture = hdrTexture;
- glass.refractionTexture = hdrTexture;
- glass.linkRefractionWithTransparency = true;
- glass.indexOfRefraction = 0.52;
- glass.alpha = 0;
- glass.directIntensity = 0.0;
- glass.environmentIntensity = 0.5;
- glass.cameraExposure = 0.5;
- glass.cameraContrast = 1.7;
- glass.microSurface = 1;
- glass.reflectivityColor = new BABYLON.Color3(0.2, 0.2, 0.2);
- glass.albedoColor = new BABYLON.Color3(0.95, 0.95, 0.95);
- sphereGlass.material = glass;
-
- var metal = new BABYLON.PBRMaterial("metal", scene);
- metal.reflectionTexture = hdrTexture;
- metal.directIntensity = 0.3;
- metal.environmentIntensity = 0.7;
- metal.cameraExposure = 0.55;
- metal.cameraContrast = 1.6;
- metal.microSurface = 0.96;
- metal.reflectivityColor = new BABYLON.Color3(0.9, 0.9, 0.9);
- metal.albedoColor = new BABYLON.Color3(1, 1, 1);
- sphereMetal.material = metal;
-
- var plastic = new BABYLON.PBRMaterial("plastic", scene);
- plastic.reflectionTexture = hdrTexture;
- plastic.directIntensity = 0.6;
- plastic.environmentIntensity = 0.7;
- plastic.cameraExposure = 0.6;
- plastic.cameraContrast = 1.6;
- plastic.microSurface = 0.96;
- plastic.albedoColor = new BABYLON.Color3(0.206, 0.94, 1);
- plastic.reflectivityColor = new BABYLON.Color3(0.05, 0.05, 0.05);
- spherePlastic.material = plastic;
-
- var wood = new BABYLON.PBRMaterial("wood", scene);
- wood.reflectionTexture = hdrTexture;
- wood.directIntensity = 1.5;
- wood.environmentIntensity = 0.5;
- wood.specularIntensity = 0.3;
- wood.cameraExposure = 0.9;
- wood.cameraContrast = 1.6;
-
- wood.reflectivityTexture = new BABYLON.Texture("reflectivity.png", scene);
- wood.useMicroSurfaceFromReflectivityMapAlpha = true;
-
- wood.albedoColor = BABYLON.Color3.White();
- wood.albedoTexture = new BABYLON.Texture("albedo.png", scene);
- woodPlank.material = wood;
-
- var hl = new BABYLON.HighlightLayer("hl", scene);
- hl.addMesh(sphereMetal, BABYLON.Color3.White());
- var hl2 = new BABYLON.HighlightLayer("hl", scene);
- hl2.addMesh(spherePlastic, BABYLON.Color3.Green());
- var hl3 = new BABYLON.HighlightLayer("hl", scene);
- hl3.addMesh(sphereGlass, BABYLON.Color3.Red());
-
- var alpha = 0;
- scene.registerBeforeRender(function () {
- hl.blurHorizontalSize = 0.4 + Math.cos(alpha);
- hl.blurVerticalSize = 0.4 + Math.cos(alpha);
-
- alpha += 0.01;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Highlights/index.html b/static/Demos/Highlights/index.html
deleted file mode 100644
index 1e5be3645..000000000
--- a/static/Demos/Highlights/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Highlights demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
diff --git a/static/Demos/HillValley/demo.js b/static/Demos/HillValley/demo.js
deleted file mode 100644
index 8290a3008..000000000
--- a/static/Demos/HillValley/demo.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var demo = {
- scene: "HillValley",
- optionalFolder: "hillvalley",
- incremental: true,
- binary: false,
- doNotUseCDN: false,
- collisions: true,
- offline: true,
- onload: function () {
- scene.collisionsEnabled = false;
- scene.lightsEnabled = false;
- scene.activeCamera.applyGravity = true;
- scene.createOrUpdateSelectionOctree();
- for (var matIndex = 0; matIndex < scene.materials.length; matIndex++) {
- scene.materials[matIndex].checkReadyOnEveryCall = false;
- }
- }
-};
\ No newline at end of file
diff --git a/static/Demos/HillValley/index.html b/static/Demos/HillValley/index.html
deleted file mode 100644
index 0d967933e..000000000
--- a/static/Demos/HillValley/index.html
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
- Babylon.js - Hill Valley demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
-
\ No newline at end of file
diff --git a/static/Demos/InstancedBones/bones2.js b/static/Demos/InstancedBones/bones2.js
deleted file mode 100644
index ad1bc20b7..000000000
--- a/static/Demos/InstancedBones/bones2.js
+++ /dev/null
@@ -1,57 +0,0 @@
-var CreateBones2TestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0, -0.5, -1.0), scene);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, new BABYLON.Vector3(0, 30, 0), scene);
- camera.setPosition(new BABYLON.Vector3(20, 70, 120));
- light.position = new BABYLON.Vector3(50, 250, 200);
- light.shadowOrthoScale = 2.0;
- camera.minZ = 1.0;
-
- scene.ambientColor = new BABYLON.Color3(0.3, 0.3, 0.3);
-
- // Ground
- var ground = BABYLON.Mesh.CreateGround("ground", 1000, 1000, 1, scene, false);
- var groundMaterial = new BABYLON.StandardMaterial("ground", scene);
- groundMaterial.diffuseColor = new BABYLON.Color3(0.2, 0.2, 0.2);
- groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- ground.material = groundMaterial;
- ground.receiveShadows = true;
-
- // Shadows
- var shadowGenerator = new BABYLON.ShadowGenerator(1024, light);
- shadowGenerator.useBlurExponentialShadowMap = true;
-
- // Dude
- BABYLON.SceneLoader.ImportMesh("him", "../../assets/Dude/", "dude.babylon", scene, function (newMeshes2, particleSystems2, skeletons2) {
- var dude = newMeshes2[0];
-
- for (var index = 1; index < newMeshes2.length; index++) {
- shadowGenerator.getShadowMap().renderList.push(newMeshes2[index]);
- }
-
- for (var count = 0; count < 50; count++) {
- var offsetX = 200 * Math.random() - 100;
- var offsetZ = 200 * Math.random() - 100;
- for (index = 1; index < newMeshes2.length; index++) {
- var instance = newMeshes2[index].createInstance("instance" + count);
-
- shadowGenerator.getShadowMap().renderList.push(instance);
-
- instance.parent = newMeshes2[index].parent;
- instance.position = newMeshes2[index].position.clone();
-
- if (!instance.parent.subMeshes) {
- instance.position.x += offsetX;
- instance.position.z -= offsetZ;
- }
- }
- }
-
- dude.rotation.y = Math.PI;
- dude.position = new BABYLON.Vector3(0, 0, -80);
-
- scene.beginAnimation(skeletons2[0], 0, 100, true, 1.0);
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/InstancedBones/demo.js b/static/Demos/InstancedBones/demo.js
deleted file mode 100644
index 66f987171..000000000
--- a/static/Demos/InstancedBones/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateBones2TestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/InstancedBones/index.html b/static/Demos/InstancedBones/index.html
deleted file mode 100644
index f081587fb..000000000
--- a/static/Demos/InstancedBones/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Instanced Bones demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Instances/demo.js b/static/Demos/Instances/demo.js
deleted file mode 100644
index d7b2661e2..000000000
--- a/static/Demos/Instances/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateInstancesTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Instances/index.html b/static/Demos/Instances/index.html
deleted file mode 100644
index 0371b7aaf..000000000
--- a/static/Demos/Instances/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Instances demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Instances/instances.js b/static/Demos/Instances/instances.js
deleted file mode 100644
index 0e86e2753..000000000
--- a/static/Demos/Instances/instances.js
+++ /dev/null
@@ -1,110 +0,0 @@
-var CreateInstancesTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0, -1, -0.3), scene);
- var camera = new BABYLON.FreeCamera("Camera", new BABYLON.Vector3(0, 10, -20), scene);
- camera.speed = 0.4;
-
- light.position = new BABYLON.Vector3(20, 60, 30);
-
- scene.ambientColor = BABYLON.Color3.FromInts(10, 30, 10);
- scene.clearColor = BABYLON.Color3.FromInts(127, 165, 13);
- scene.gravity = new BABYLON.Vector3(0, -0.5, 0);
-
- // Fog
- scene.fogMode = BABYLON.Scene.FOGMODE_EXP;
- scene.fogDensity = 0.02;
- scene.fogColor = scene.clearColor;
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 150.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/skybox", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
- skybox.infiniteDistance = true;
-
- // Invisible borders
- var border0 = BABYLON.Mesh.CreateBox("border0", 1, scene);
- border0.scaling = new BABYLON.Vector3(1, 100, 100);
- border0.position.x = -50.0;
- border0.checkCollisions = true;
- border0.isVisible = false;
-
- var border1 = BABYLON.Mesh.CreateBox("border1", 1, scene);
- border1.scaling = new BABYLON.Vector3(1, 100, 100);
- border1.position.x = 50.0;
- border1.checkCollisions = true;
- border1.isVisible = false;
-
- var border2 = BABYLON.Mesh.CreateBox("border2", 1, scene);
- border2.scaling = new BABYLON.Vector3(100, 100, 1);
- border2.position.z = 50.0;
- border2.checkCollisions = true;
- border2.isVisible = false;
-
- var border3 = BABYLON.Mesh.CreateBox("border3", 1, scene);
- border3.scaling = new BABYLON.Vector3(100, 100, 1);
- border3.position.z = -50.0;
- border3.checkCollisions = true;
- border3.isVisible = false;
-
- // Ground
- var ground = BABYLON.Mesh.CreateGroundFromHeightMap("ground", "../../assets/heightMap.png", 100, 100, 100, 0, 5, scene, false);
- var groundMaterial = new BABYLON.StandardMaterial("ground", scene);
- groundMaterial.diffuseTexture = new BABYLON.Texture("../../assets/ground.jpg", scene);
-
- groundMaterial.diffuseTexture.uScale = 6;
- groundMaterial.diffuseTexture.vScale = 6;
- groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- groundMaterial.emissiveColor = new BABYLON.Color3(0.3, 0.3, 0.3);
- ground.material = groundMaterial;
- ground.receiveShadows = true;
- ground.checkCollisions = true;
-
- ground.onReady = function () {
- ground.optimize(100);
-
- // Shadows
- var shadowGenerator = new BABYLON.ShadowGenerator(1024, light);
-
- // Trees
- BABYLON.SceneLoader.ImportMesh("", "../../assets/Tree/", "tree.babylon", scene, function (newMeshes) {
- newMeshes[0].material.opacityTexture = null;
- newMeshes[0].material.backFaceCulling = false;
- newMeshes[0].isVisible = false;
- newMeshes[0].position.y = ground.getHeightAtCoordinates(0, 0); // Getting height from ground object
-
- shadowGenerator.getShadowMap().renderList.push(newMeshes[0]);
- var range = 60;
- var count = 100;
- for (var index = 0; index < count; index++) {
- var newInstance = newMeshes[0].createInstance("i" + index);
- var x = range / 2 - Math.random() * range;
- var z = range / 2 - Math.random() * range;
-
- var y = ground.getHeightAtCoordinates(x, z); // Getting height from ground object
-
- newInstance.position = new BABYLON.Vector3(x, y, z);
-
- newInstance.rotate(BABYLON.Axis.Y, Math.random() * Math.PI * 2, BABYLON.Space.WORLD);
-
- var scale = 0.5 + Math.random() * 2;
- newInstance.scaling.addInPlace(new BABYLON.Vector3(scale, scale, scale));
-
- shadowGenerator.getShadowMap().renderList.push(newInstance);
- }
- shadowGenerator.getShadowMap().refreshRate = 0; // We need to compute it just once
- shadowGenerator.usePoissonSampling = true;
-
- // Collisions
- camera.checkCollisions = true;
- camera.applyGravity = true;
- });
- }
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Instances2/demo.js b/static/Demos/Instances2/demo.js
deleted file mode 100644
index d7b2661e2..000000000
--- a/static/Demos/Instances2/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateInstancesTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Instances2/index.html b/static/Demos/Instances2/index.html
deleted file mode 100644
index d30ca0283..000000000
--- a/static/Demos/Instances2/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Instances 2 demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Instances2/instances.js b/static/Demos/Instances2/instances.js
deleted file mode 100644
index 320bb433d..000000000
--- a/static/Demos/Instances2/instances.js
+++ /dev/null
@@ -1,145 +0,0 @@
-var CreateInstancesTestScene = function (engine) {
- var obj = null, obj_datas, vertices, total_vertices, emitter_pos;
-
- var rings1 = [];
- var rings2 = [];
- var rings3 = [];
- var rings4 = [];
- var rings5 = [];
-
- var radius = 280;
- var numPoints = 10;
- var TWO_PI = Math.PI * 2;
- var angle = TWO_PI / numPoints;
-
- var scale = 600;
- var scene = new BABYLON.Scene(engine);
- engine.backFaceCulling = false;
-
- camera = new BABYLON.ArcRotateCamera("Camera", 1.7, 0.7, 1350, BABYLON.Vector3.Zero(), scene);
- camera.setTarget(BABYLON.Vector3.Zero());
- camera.attachControl(canvas, false);
-
- var light = new BABYLON.HemisphericLight('light1', new BABYLON.Vector3(0, 0, 10), scene);
- light.intensity = 0.2;
-
- var plight = new BABYLON.PointLight('light1', new BABYLON.Vector3(0, 0, 180), scene);
-
- var mat = new BABYLON.StandardMaterial("mat", scene);
- mat.diffuseTexture = new BABYLON.Texture("test8q_dDo_d.jpg", scene);
- mat.bumpTexture = new BABYLON.Texture("test8q_dDo_n.jpg", scene);
- mat.specularTexture = new BABYLON.Texture("test8q_dDo_s.jpg", scene);
-
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 5000.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("skybox/nebula", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
-
-
- BABYLON.SceneLoader.ImportMesh("", "./", "killer.babylon", scene,
- function (mesh) {
- obj = mesh[0];
- obj.material = mat;
-
- for (var index = 0; index < numPoints; index++) {
- rings1[index] = obj.createInstance("i_" + index);
- rings2[index] = obj.createInstance("i_" + index);
- rings3[index] = obj.createInstance("i_" + index);
- rings4[index] = obj.createInstance("i_" + index);
- rings5[index] = obj.createInstance("i_" + index);
- }
-
- obj.rotation.x = 200;
- obj.isVisible = false;
-
- var t = 0.0;
- scene.registerBeforeRender(function () {
-
- for (var index = 0; index < numPoints; index++) {
- var speed = t / 10.0;
- var x = radius * Math.sin(speed + angle * index);
- var z = radius * Math.cos(speed + angle * index);
-
- rings1[index].position.x = x;
- rings1[index].position.z = z;
-
- rings1[index].lookAt(new BABYLON.Vector3.Zero());
- rings1[index].rotate(BABYLON.Axis.Y, 1.6, BABYLON.Space.LOCAL);
- }
-
- for (var index = 0; index < numPoints; index++) {
- var speed = -t / 8.0;
- var x = radius * Math.sin(speed + angle * index);
- var z = radius * Math.cos(speed + angle * index);
-
- rings2[index].position.x = x;
- rings2[index].position.y = 70;
- rings2[index].position.z = z;
-
- rings2[index].lookAt(new BABYLON.Vector3(0, 100, 0));
- rings2[index].rotate(BABYLON.Axis.Y, 1.6, BABYLON.Space.LOCAL);
- }
-
- for (var index = 0; index < numPoints; index++) {
- var speed = t / 12.0;
- var x = 200 * Math.sin(speed + angle * index);
- var z = 200 * Math.cos(speed + angle * index);
-
- rings3[index].position.x = x;
- rings3[index].position.y = 180;
- rings3[index].position.z = z;
-
- rings3[index].lookAt(new BABYLON.Vector3(0, 150, 0));
- rings3[index].rotate(BABYLON.Axis.Y, 1.6, BABYLON.Space.LOCAL);
- rings3[index].rotate(BABYLON.Axis.Z, -1.2, BABYLON.Space.LOCAL);
- }
-
- for (var index = 0; index < numPoints; index++) {
- var speed = -t / 6.0;
- var x = 150 * Math.sin(speed + angle * index);
- var z = 150 * Math.cos(speed + angle * index);
-
- rings4[index].position.x = x;
- rings4[index].position.y = 180;
- rings4[index].position.z = z;
-
- rings4[index].scaling = new BABYLON.Vector3(0.8, 0.8, 0.8);
-
- rings4[index].lookAt(new BABYLON.Vector3(0, 150, 0));
- rings4[index].rotate(BABYLON.Axis.Y, 1.6, BABYLON.Space.LOCAL);
- rings4[index].rotate(BABYLON.Axis.Z, -1.2, BABYLON.Space.LOCAL);
- }
-
- for (var index = 0; index < numPoints; index++) {
- var speed = -t / 10.0;
- var x = 750 * Math.sin(speed + angle * index);
- var z = 750 * Math.cos(speed + angle * index);
-
- rings5[index].position.x = x;
- rings5[index].position.z = z;
-
- rings5[index].scaling = new BABYLON.Vector3(2.5, 2.5, 2.5);
-
- rings5[index].lookAt(new BABYLON.Vector3.Zero());
- rings5[index].rotate(BABYLON.Axis.Y, 1.6, BABYLON.Space.LOCAL);
- }
-
- plight.intensity = 1 + Math.random() * 1.0 - 0.5;
- scale = Math.random() * 100 - 500;
- emitter.mesh.scaling = new BABYLON.Vector3(scale, scale, scale);
- t += 0.1;
- });
- });
-
- var emitter = new BABYLON.VolumetricLightScatteringPostProcess('godrays', 1.0, camera, null, 100, BABYLON.Texture.BILINEAR_SAMPLINGMODE, engine, false);
- emitter.mesh.material.diffuseTexture = new BABYLON.Texture("sun.png", scene, true, false, BABYLON.Texture.BILINEAR_SAMPLINGMODE);
- emitter.mesh.material.diffuseTexture.hasAlpha = true;
- emitter.mesh.position = new BABYLON.Vector3(0, 180, 0);
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/LOD/demo.js b/static/Demos/LOD/demo.js
deleted file mode 100644
index c0629263f..000000000
--- a/static/Demos/LOD/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateLODTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/LOD/index.html b/static/Demos/LOD/index.html
deleted file mode 100644
index bb1855ea0..000000000
--- a/static/Demos/LOD/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Level of Detail demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/LOD/lod.js b/static/Demos/LOD/lod.js
deleted file mode 100644
index c8230ee97..000000000
--- a/static/Demos/LOD/lod.js
+++ /dev/null
@@ -1,56 +0,0 @@
-var CreateLODTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.FreeCamera("Camera", new BABYLON.Vector3(0, 0, 0), scene);
- var hemi = new BABYLON.HemisphericLight("hemi", new BABYLON.Vector3(0, 1.0, 0), scene);
-
- scene.fogColor = scene.clearColor;
- scene.fogMode = BABYLON.Scene.FOGMODE_LINEAR;
- scene.fogStart = 10;
- scene.fogEnd = 50;
-
- // Materials
- var materialAmiga = new BABYLON.StandardMaterial("amiga", scene);
- materialAmiga.diffuseTexture = new BABYLON.Texture("../../assets/amiga.jpg", scene);
- materialAmiga.emissiveColor = new BABYLON.Color3(0.5, 0.5, 0.5);
- materialAmiga.diffuseTexture.uScale = 5;
- materialAmiga.diffuseTexture.vScale = 5;
-
- var materialRed = new BABYLON.StandardMaterial("red", scene);
- materialRed.emissiveColor = new BABYLON.Color3(0.5, 0, 0);
-
- // Create a wall of knots
- var count = 3;
- var scale = 4;
-
- var knot00 = BABYLON.Mesh.CreateTorusKnot("knot0", 0.5, 0.2, 128, 64, 2, 3, scene);
- var knot01 = BABYLON.Mesh.CreateTorusKnot("knot1", 0.5, 0.2, 32, 16, 2, 3, scene);
- var knot02 = BABYLON.Mesh.CreateTorusKnot("knot2", 0.5, 0.2, 24, 12, 2, 3, scene);
- var knot03 = BABYLON.Mesh.CreateTorusKnot("knot3", 0.5, 0.2, 16, 8, 2, 3, scene);
-
- knot00.setEnabled(false);
- knot01.setEnabled(false);
- knot02.setEnabled(false);
- knot03.setEnabled(false);
-
- knot00.material = materialAmiga;
- knot01.material = materialAmiga;
- knot02.material = materialRed;
- knot03.material = materialRed;
-
- knot00.addLODLevel(15, knot01);
- knot00.addLODLevel(30, knot02);
- knot00.addLODLevel(45, knot03);
- knot00.addLODLevel(55, null);
-
- for (var x = -count; x <= count; x++) {
- for (var y = -count; y <= count; y++) {
- for (var z = 5; z < 10; z++) {
- var knot = knot00.createInstance("knotI");
-
- knot.position = new BABYLON.Vector3(x * scale, y * scale, z * scale);
- }
- }
- }
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Lens/demo.js b/static/Demos/Lens/demo.js
deleted file mode 100644
index 8853e0fd8..000000000
--- a/static/Demos/Lens/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateLensFlaresTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Lens/index.html b/static/Demos/Lens/index.html
deleted file mode 100644
index f02f594a4..000000000
--- a/static/Demos/Lens/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Lens Flares demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Lens/lensFlares.js b/static/Demos/Lens/lensFlares.js
deleted file mode 100644
index 4722d9d9a..000000000
--- a/static/Demos/Lens/lensFlares.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var CreateLensFlaresTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var light0 = new BABYLON.PointLight("Omni0", new BABYLON.Vector3(21.84, 50, -28.26), scene);
-
- camera.alpha = 2.8;
- camera.beta = 2.25;
-
- // Creating light sphere
- var lightSphere0 = BABYLON.Mesh.CreateSphere("Sphere0", 16, 0.5, scene);
-
- lightSphere0.material = new BABYLON.StandardMaterial("white", scene);
- lightSphere0.material.diffuseColor = new BABYLON.Color3(0, 0, 0);
- lightSphere0.material.specularColor = new BABYLON.Color3(0, 0, 0);
- lightSphere0.material.emissiveColor = new BABYLON.Color3(1, 1, 1);
-
- lightSphere0.position = light0.position;
-
- var lensFlareSystem = new BABYLON.LensFlareSystem("lensFlareSystem", light0, scene);
- var flare00 = new BABYLON.LensFlare(0.2, 0, new BABYLON.Color3(1, 1, 1), "lens5.png", lensFlareSystem);
- var flare01 = new BABYLON.LensFlare(0.5, 0.2, new BABYLON.Color3(0.5, 0.5, 1), "lens4.png", lensFlareSystem);
- var flare02 = new BABYLON.LensFlare(0.2, 1.0, new BABYLON.Color3(1, 1, 1), "lens4.png", lensFlareSystem);
- var flare03 = new BABYLON.LensFlare(0.4, 0.4, new BABYLON.Color3(1, 0.5, 1), "../../assets/Flare.png", lensFlareSystem);
- var flare04 = new BABYLON.LensFlare(0.1, 0.6, new BABYLON.Color3(1, 1, 1), "lens5.png", lensFlareSystem);
- var flare05 = new BABYLON.LensFlare(0.3, 0.8, new BABYLON.Color3(1, 1, 1), "lens4.png", lensFlareSystem);
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 100.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/skybox", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skybox.material = skyboxMaterial;
- skybox.material.disableLighting = true;
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Lights/demo.js b/static/Demos/Lights/demo.js
deleted file mode 100644
index 3bf6f8dde..000000000
--- a/static/Demos/Lights/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateLightsTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Lights/index.html b/static/Demos/Lights/index.html
deleted file mode 100644
index b74df9002..000000000
--- a/static/Demos/Lights/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Lights demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Lights/lights.js b/static/Demos/Lights/lights.js
deleted file mode 100644
index 643b5c155..000000000
--- a/static/Demos/Lights/lights.js
+++ /dev/null
@@ -1,79 +0,0 @@
-var CreateLightsTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var light0 = new BABYLON.PointLight("Omni0", new BABYLON.Vector3(0, 10, 0), scene);
- var light1 = new BABYLON.PointLight("Omni1", new BABYLON.Vector3(0, -10, 0), scene);
- var light2 = new BABYLON.PointLight("Omni2", new BABYLON.Vector3(10, 0, 0), scene);
- var light3 = new BABYLON.DirectionalLight("Dir0", new BABYLON.Vector3(1, -1, 0), scene);
- var material = new BABYLON.StandardMaterial("kosh", scene);
- var sphere = BABYLON.Mesh.CreateSphere("Sphere", 16, 3, scene);
-
- camera.setPosition(new BABYLON.Vector3(-10, 10, 0));
-
- light3.parent = camera;
-
- // Creating light sphere
- var lightSphere0 = BABYLON.Mesh.CreateSphere("Sphere0", 16, 0.5, scene);
- var lightSphere1 = BABYLON.Mesh.CreateSphere("Sphere1", 16, 0.5, scene);
- var lightSphere2 = BABYLON.Mesh.CreateSphere("Sphere2", 16, 0.5, scene);
-
- lightSphere0.material = new BABYLON.StandardMaterial("red", scene);
- lightSphere0.material.diffuseColor = new BABYLON.Color3(0, 0, 0);
- lightSphere0.material.specularColor = new BABYLON.Color3(0, 0, 0);
- lightSphere0.material.emissiveColor = new BABYLON.Color3(1, 0, 0);
-
- lightSphere1.material = new BABYLON.StandardMaterial("green", scene);
- lightSphere1.material.diffuseColor = new BABYLON.Color3(0, 0, 0);
- lightSphere1.material.specularColor = new BABYLON.Color3(0, 0, 0);
- lightSphere1.material.emissiveColor = new BABYLON.Color3(0, 1, 0);
-
- lightSphere2.material = new BABYLON.StandardMaterial("blue", scene);
- lightSphere2.material.diffuseColor = new BABYLON.Color3(0, 0, 0);
- lightSphere2.material.specularColor = new BABYLON.Color3(0, 0, 0);
- lightSphere2.material.emissiveColor = new BABYLON.Color3(0, 0, 1);
-
- // Sphere material
- material.diffuseColor = new BABYLON.Color3(1, 1, 1);
- sphere.material = material;
-
- // Lights colors
- light0.diffuse = new BABYLON.Color3(1, 0, 0);
- light0.specular = new BABYLON.Color3(1, 0, 0);
-
- light1.diffuse = new BABYLON.Color3(0, 1, 0);
- light1.specular = new BABYLON.Color3(0, 1, 0);
-
- light2.diffuse = new BABYLON.Color3(0, 0, 1);
- light2.specular = new BABYLON.Color3(0, 0, 1);
-
- light3.diffuse = new BABYLON.Color3(1, 1, 1);
- light3.specular = new BABYLON.Color3(1, 1, 1);
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 100.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/skybox", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
- skybox.infiniteDistance = true;
-
- // Animations
- var alpha = 0;
- scene.registerBeforeRender(function () {
- light0.position = new BABYLON.Vector3(10 * Math.sin(alpha), 0, 10 * Math.cos(alpha));
- light1.position = new BABYLON.Vector3(10 * Math.sin(alpha), 0, -10 * Math.cos(alpha));
- light2.position = new BABYLON.Vector3(10 * Math.cos(alpha), 0, 10 * Math.sin(alpha));
-
- lightSphere0.position = light0.position;
- lightSphere1.position = light1.position;
- lightSphere2.position = light2.position;
-
- alpha += 0.01;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Lines/demo.js b/static/Demos/Lines/demo.js
deleted file mode 100644
index 8992470cf..000000000
--- a/static/Demos/Lines/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateLinesTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Lines/index.html b/static/Demos/Lines/index.html
deleted file mode 100644
index 79c366546..000000000
--- a/static/Demos/Lines/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Lines demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Lines/lines.js b/static/Demos/Lines/lines.js
deleted file mode 100644
index 736ba9205..000000000
--- a/static/Demos/Lines/lines.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var CreateLinesTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, new BABYLON.Vector3(0, 0, 0), scene);
- camera.setPosition(new BABYLON.Vector3(20, 200, 400));
-
- camera.maxZ = 20000;
-
- camera.lowerRadiusLimit = 150;
-
- scene.clearColor = new BABYLON.Color3(0, 0, 0);
-
- // Create a whirlpool
- var points = [];
-
- var radius = 0.5;
- var angle = 0;
- for (var index = 0; index < 1000; index++) {
- points.push(new BABYLON.Vector3(radius * Math.cos(angle), 0, radius * Math.sin(angle)));
- radius += 0.3;
- angle += 0.1;
- }
-
- var whirlpool = BABYLON.Mesh.CreateLines("whirlpool", points, scene, true);
- whirlpool.color = new BABYLON.Color3(1, 1, 1);
-
- var positionData = whirlpool.getVerticesData(BABYLON.VertexBuffer.PositionKind);
- var heightRange = 10;
- var alpha = 0;
- scene.registerBeforeRender(function() {
- for (var index = 0; index < 1000; index++) {
- positionData[index * 3 + 1] = heightRange * Math.sin(alpha + index * 0.1);
- }
-
- whirlpool.updateVerticesData(BABYLON.VertexBuffer.PositionKind, positionData);
-
- alpha += 0.05 * scene.getAnimationRatio();
- });
-
- return scene;
-};
diff --git a/static/Demos/LookAt/demo.js b/static/Demos/LookAt/demo.js
deleted file mode 100644
index 956f32297..000000000
--- a/static/Demos/LookAt/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateLookAtTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/LookAt/index.html b/static/Demos/LookAt/index.html
deleted file mode 100644
index bfafa19fb..000000000
--- a/static/Demos/LookAt/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Look at demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/LookAt/lookAt.js b/static/Demos/LookAt/lookAt.js
deleted file mode 100644
index 53711f02e..000000000
--- a/static/Demos/LookAt/lookAt.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- How to use lookat to make an eye-candy effect ! :)
- by Steve 'Stv' Duran for BabylonJS featured demos on 02.12.2015
-*/
-var camera;
-var scene;
-
-var cubes = [];
-var cubes_mat;
-
-// better random function
-function rnd(min, max) {
- return Math.floor(Math.random() * (max - min + 1) + min);
-}
-
-// Create random cubes in a box of 100x100x100
-function createCubesBall(num) {
- for (var i = 0; i < num; i++) {
- if (i === 0)
- cubes[i] = BABYLON.Mesh.CreateBox("b", 1.0, scene);
- else
- cubes[i] = cubes[0].createInstance("b" + i);
-
- var x = rnd(-50, 50);
- var y = rnd(-50, 50);
- var z = rnd(-50, 50);
-
- cubes[i].scaling = new BABYLON.Vector3(rnd(1.0, 1.5), rnd(1.0, 1.5), rnd(1.0, 10.0));
-
- cubes[i].position = new BABYLON.Vector3(x, y, z);
-
- cubes[i].lookAt(new BABYLON.Vector3(0, 0, 0));
- }
-}
-
-var CreateLookAtTestScene = function (engine) {
- scene = new BABYLON.Scene(engine);
- scene.clearColor = new BABYLON.Color3(0, 0, 0);
- engine.backFaceCulling = false;
-
- camera = new BABYLON.ArcRotateCamera("Camera", 33.7081, 0.9001, 39.91, BABYLON.Vector3.Zero(), scene);
- camera.setTarget(BABYLON.Vector3.Zero());
- camera.attachControl(canvas, false);
-
- var light = new BABYLON.PointLight('light1', new BABYLON.Vector3(0, 10, 0), scene);
-
- var light1 = new BABYLON.HemisphericLight("hemi", new BABYLON.Vector3(0, 10, 0), scene);
- light1.diffuseColor = new BABYLON.Color3(1, 1, 1);
-
- var sphere = BABYLON.Mesh.CreateSphere("s", 32, 5, scene);
-
- createCubesBall(1000);
-
- var mat_sphere = new BABYLON.StandardMaterial("s", scene);
- sphere.material = mat_sphere;
-
- var probe = new BABYLON.ReflectionProbe("probe", 512, scene);
- probe.renderList.push(sphere);
-
- cubes_mat = new BABYLON.StandardMaterial("m", scene);
- cubes_mat.diffuseTexture = new BABYLON.Texture("square.jpg", scene);
-
- cubes[0].material = cubes_mat;
-
- var container = BABYLON.Mesh.CreateBox("cont", 110, scene);
- var mat_cont = new BABYLON.StandardMaterial("mc", scene);
- mat_cont.alpha = 0.1;
- container.material = mat_cont;
-
- var px = 0, py = 0, pz = 0;
- var cr = 0, cg = 0, cb = 0;
- var t = 0.0;
-
- scene.registerBeforeRender(function () {
-
- // sin/cos random direction
- px = 25.0 * Math.cos(t / 3.5);
- py = 25.0 + 10.0 * Math.sin(t / 4.0);
- pz = 25.0 * Math.cos(t / 4.5);
-
- // sin/cos random color between 0,1
- cr = 0.5 + 0.5 * Math.sin(t / 12);
- cg = 0.5 + 0.5 * Math.sin(t / 14);
- cb = 0.5 + 0.5 * Math.sin(t / 16);
-
- // Change sphere and cubes colors
- mat_sphere.diffuseColor = new BABYLON.Color3(cr, cg, cb);
- mat_sphere.emissiveColor = new BABYLON.Color3(cr, cg, cb);
- cubes_mat.diffuseColor = new BABYLON.Color3(cr, cg, cb);
-
- // Move our sphere
- sphere.position = new BABYLON.Vector3(px, py, pz);
-
- // Make all cubes look at the moving sphere
- for (var i = 0; i < cubes.length; i++) {
- cubes[i].lookAt(new BABYLON.Vector3(px, py, pz));
- }
-
- camera.alpha = 4.0 * (Math.PI / 20 + Math.cos(t / 30));
- camera.beta = 2.0 * (Math.PI / 20 + Math.sin(t / 50));
- camera.radius = 180 + (-50 + 50 * Math.sin(t / 10));
-
- t += 0.1;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Mansion/demo.js b/static/Demos/Mansion/demo.js
deleted file mode 100644
index 9ec6365f0..000000000
--- a/static/Demos/Mansion/demo.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var demo = {
- scene: "Mansion",
- incremental: false,
- binary: false,
- doNotUseCDN: true,
- collisions: true,
- offline: false,
- onload: function () {
- // Additionnal tuning options
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Mansion/index.html b/static/Demos/Mansion/index.html
deleted file mode 100644
index 9898d6e57..000000000
--- a/static/Demos/Mansion/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Babylon.js - Mansion demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
diff --git a/static/Demos/MorphTargets/dat.gui.min.js b/static/Demos/MorphTargets/dat.gui.min.js
deleted file mode 100644
index faeb6a7af..000000000
--- a/static/Demos/MorphTargets/dat.gui.min.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * dat-gui JavaScript Controller Library
- * http://code.google.com/p/dat-gui
- *
- * Copyright 2011 Data Arts Team, Google Creative Lab
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- */
-var dat=dat||{};dat.gui=dat.gui||{};dat.utils=dat.utils||{};dat.controllers=dat.controllers||{};dat.dom=dat.dom||{};dat.color=dat.color||{};dat.utils.css=function(){return{load:function(f,a){a=a||document;var d=a.createElement("link");d.type="text/css";d.rel="stylesheet";d.href=f;a.getElementsByTagName("head")[0].appendChild(d)},inject:function(f,a){a=a||document;var d=document.createElement("style");d.type="text/css";d.innerHTML=f;a.getElementsByTagName("head")[0].appendChild(d)}}}();
-dat.utils.common=function(){var f=Array.prototype.forEach,a=Array.prototype.slice;return{BREAK:{},extend:function(d){this.each(a.call(arguments,1),function(a){for(var c in a)this.isUndefined(a[c])||(d[c]=a[c])},this);return d},defaults:function(d){this.each(a.call(arguments,1),function(a){for(var c in a)this.isUndefined(d[c])&&(d[c]=a[c])},this);return d},compose:function(){var d=a.call(arguments);return function(){for(var e=a.call(arguments),c=d.length-1;0<=c;c--)e=[d[c].apply(this,e)];return e[0]}},
-each:function(a,e,c){if(a)if(f&&a.forEach&&a.forEach===f)a.forEach(e,c);else if(a.length===a.length+0)for(var b=0,p=a.length;bthis.__max&&(a=this.__max);void 0!==this.__step&&0!=a%this.__step&&(a=Math.round(a/this.__step)*this.__step);return e.superclass.prototype.setValue.call(this,a)},min:function(a){this.__min=a;return this},max:function(a){this.__max=a;return this},step:function(a){this.__impliedStep=this.__step=a;this.__precision=d(a);return this}});return e}(dat.controllers.Controller,dat.utils.common);
-dat.controllers.NumberControllerBox=function(f,a,d){var e=function(c,b,f){function q(){var a=parseFloat(n.__input.value);d.isNaN(a)||n.setValue(a)}function l(a){var b=u-a.clientY;n.setValue(n.getValue()+b*n.__impliedStep);u=a.clientY}function r(){a.unbind(window,"mousemove",l);a.unbind(window,"mouseup",r)}this.__truncationSuspended=!1;e.superclass.call(this,c,b,f);var n=this,u;this.__input=document.createElement("input");this.__input.setAttribute("type","text");a.bind(this.__input,"change",q);a.bind(this.__input,
-"blur",function(){q();n.__onFinishChange&&n.__onFinishChange.call(n,n.getValue())});a.bind(this.__input,"mousedown",function(b){a.bind(window,"mousemove",l);a.bind(window,"mouseup",r);u=b.clientY});a.bind(this.__input,"keydown",function(a){13===a.keyCode&&(n.__truncationSuspended=!0,this.blur(),n.__truncationSuspended=!1)});this.updateDisplay();this.domElement.appendChild(this.__input)};e.superclass=f;d.extend(e.prototype,f.prototype,{updateDisplay:function(){var a=this.__input,b;if(this.__truncationSuspended)b=
-this.getValue();else{b=this.getValue();var d=Math.pow(10,this.__precision);b=Math.round(b*d)/d}a.value=b;return e.superclass.prototype.updateDisplay.call(this)}});return e}(dat.controllers.NumberController,dat.dom.dom,dat.utils.common);
-dat.controllers.NumberControllerSlider=function(f,a,d,e,c){function b(a,b,c,e,d){return e+(a-b)/(c-b)*(d-e)}var p=function(c,e,d,f,u){function A(c){c.preventDefault();var e=a.getOffset(k.__background),d=a.getWidth(k.__background);k.setValue(b(c.clientX,e.left,e.left+d,k.__min,k.__max));return!1}function g(){a.unbind(window,"mousemove",A);a.unbind(window,"mouseup",g);k.__onFinishChange&&k.__onFinishChange.call(k,k.getValue())}p.superclass.call(this,c,e,{min:d,max:f,step:u});var k=this;this.__background=
-document.createElement("div");this.__foreground=document.createElement("div");a.bind(this.__background,"mousedown",function(b){a.bind(window,"mousemove",A);a.bind(window,"mouseup",g);A(b)});a.addClass(this.__background,"slider");a.addClass(this.__foreground,"slider-fg");this.updateDisplay();this.__background.appendChild(this.__foreground);this.domElement.appendChild(this.__background)};p.superclass=f;p.useDefaultStyles=function(){d.inject(c)};e.extend(p.prototype,f.prototype,{updateDisplay:function(){var a=
-(this.getValue()-this.__min)/(this.__max-this.__min);this.__foreground.style.width=100*a+"%";return p.superclass.prototype.updateDisplay.call(this)}});return p}(dat.controllers.NumberController,dat.dom.dom,dat.utils.css,dat.utils.common,"/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\n.slider {\n box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);\n height: 1em;\n border-radius: 1em;\n background-color: #eee;\n padding: 0 0.5em;\n overflow: hidden;\n}\n\n.slider-fg {\n padding: 1px 0 2px 0;\n background-color: #aaa;\n height: 1em;\n margin-left: -0.5em;\n padding-right: 0.5em;\n border-radius: 1em 0 0 1em;\n}\n\n.slider-fg:after {\n display: inline-block;\n border-radius: 1em;\n background-color: #fff;\n border: 1px solid #aaa;\n content: '';\n float: right;\n margin-right: -1em;\n margin-top: -1px;\n height: 0.9em;\n width: 0.9em;\n}");
-dat.controllers.FunctionController=function(f,a,d){var e=function(c,b,d){e.superclass.call(this,c,b);var f=this;this.__button=document.createElement("div");this.__button.innerHTML=void 0===d?"Fire":d;a.bind(this.__button,"click",function(a){a.preventDefault();f.fire();return!1});a.addClass(this.__button,"button");this.domElement.appendChild(this.__button)};e.superclass=f;d.extend(e.prototype,f.prototype,{fire:function(){this.__onChange&&this.__onChange.call(this);this.getValue().call(this.object);
-this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}});return e}(dat.controllers.Controller,dat.dom.dom,dat.utils.common);
-dat.controllers.BooleanController=function(f,a,d){var e=function(c,b){e.superclass.call(this,c,b);var d=this;this.__prev=this.getValue();this.__checkbox=document.createElement("input");this.__checkbox.setAttribute("type","checkbox");a.bind(this.__checkbox,"change",function(){d.setValue(!d.__prev)},!1);this.domElement.appendChild(this.__checkbox);this.updateDisplay()};e.superclass=f;d.extend(e.prototype,f.prototype,{setValue:function(a){a=e.superclass.prototype.setValue.call(this,a);this.__onFinishChange&&
-this.__onFinishChange.call(this,this.getValue());this.__prev=this.getValue();return a},updateDisplay:function(){!0===this.getValue()?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0):this.__checkbox.checked=!1;return e.superclass.prototype.updateDisplay.call(this)}});return e}(dat.controllers.Controller,dat.dom.dom,dat.utils.common);
-dat.color.toString=function(f){return function(a){if(1==a.a||f.isUndefined(a.a)){for(a=a.hex.toString(16);6>a.length;)a="0"+a;return"#"+a}return"rgba("+Math.round(a.r)+","+Math.round(a.g)+","+Math.round(a.b)+","+a.a+")"}}(dat.utils.common);
-dat.color.interpret=function(f,a){var d,e,c=[{litmus:a.isString,conversions:{THREE_CHAR_HEX:{read:function(a){a=a.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null===a?!1:{space:"HEX",hex:parseInt("0x"+a[1].toString()+a[1].toString()+a[2].toString()+a[2].toString()+a[3].toString()+a[3].toString())}},write:f},SIX_CHAR_HEX:{read:function(a){a=a.match(/^#([A-F0-9]{6})$/i);return null===a?!1:{space:"HEX",hex:parseInt("0x"+a[1].toString())}},write:f},CSS_RGB:{read:function(a){a=a.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
-return null===a?!1:{space:"RGB",r:parseFloat(a[1]),g:parseFloat(a[2]),b:parseFloat(a[3])}},write:f},CSS_RGBA:{read:function(a){a=a.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\,\s*(.+)\s*\)/);return null===a?!1:{space:"RGB",r:parseFloat(a[1]),g:parseFloat(a[2]),b:parseFloat(a[3]),a:parseFloat(a[4])}},write:f}}},{litmus:a.isNumber,conversions:{HEX:{read:function(a){return{space:"HEX",hex:a,conversionName:"HEX"}},write:function(a){return a.hex}}}},{litmus:a.isArray,conversions:{RGB_ARRAY:{read:function(a){return 3!=
-a.length?!1:{space:"RGB",r:a[0],g:a[1],b:a[2]}},write:function(a){return[a.r,a.g,a.b]}},RGBA_ARRAY:{read:function(a){return 4!=a.length?!1:{space:"RGB",r:a[0],g:a[1],b:a[2],a:a[3]}},write:function(a){return[a.r,a.g,a.b,a.a]}}}},{litmus:a.isObject,conversions:{RGBA_OBJ:{read:function(b){return a.isNumber(b.r)&&a.isNumber(b.g)&&a.isNumber(b.b)&&a.isNumber(b.a)?{space:"RGB",r:b.r,g:b.g,b:b.b,a:b.a}:!1},write:function(a){return{r:a.r,g:a.g,b:a.b,a:a.a}}},RGB_OBJ:{read:function(b){return a.isNumber(b.r)&&
-a.isNumber(b.g)&&a.isNumber(b.b)?{space:"RGB",r:b.r,g:b.g,b:b.b}:!1},write:function(a){return{r:a.r,g:a.g,b:a.b}}},HSVA_OBJ:{read:function(b){return a.isNumber(b.h)&&a.isNumber(b.s)&&a.isNumber(b.v)&&a.isNumber(b.a)?{space:"HSV",h:b.h,s:b.s,v:b.v,a:b.a}:!1},write:function(a){return{h:a.h,s:a.s,v:a.v,a:a.a}}},HSV_OBJ:{read:function(b){return a.isNumber(b.h)&&a.isNumber(b.s)&&a.isNumber(b.v)?{space:"HSV",h:b.h,s:b.s,v:b.v}:!1},write:function(a){return{h:a.h,s:a.s,v:a.v}}}}}];return function(){e=!1;
-var b=1\n\n Here\'s the new load parameter for your GUI\'s constructor:\n\n \n\n \n\n
Automatically save\n values to
localStorage on exit.\n\n
The values saved to localStorage will\n override those passed to dat.GUI\'s constructor. This makes it\n easier to work incrementally, but localStorage is fragile,\n and your friends may not see the same values you do.\n \n
\n \n
\n\n',
-".dg {\n /** Clear list styles */\n /* Auto-place container */\n /* Auto-placed GUI's */\n /* Line items that don't contain folders. */\n /** Folder names */\n /** Hides closed items */\n /** Controller row */\n /** Name-half (left) */\n /** Controller-half (right) */\n /** Controller placement */\n /** Shorter number boxes when slider is present. */\n /** Ensure the entire boolean and function row shows a hand */ }\n .dg ul {\n list-style: none;\n margin: 0;\n padding: 0;\n width: 100%;\n clear: both; }\n .dg.ac {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 0;\n z-index: 0; }\n .dg:not(.ac) .main {\n /** Exclude mains in ac so that we don't hide close button */\n overflow: hidden; }\n .dg.main {\n -webkit-transition: opacity 0.1s linear;\n -o-transition: opacity 0.1s linear;\n -moz-transition: opacity 0.1s linear;\n transition: opacity 0.1s linear; }\n .dg.main.taller-than-window {\n overflow-y: auto; }\n .dg.main.taller-than-window .close-button {\n opacity: 1;\n /* TODO, these are style notes */\n margin-top: -1px;\n border-top: 1px solid #2c2c2c; }\n .dg.main ul.closed .close-button {\n opacity: 1 !important; }\n .dg.main:hover .close-button,\n .dg.main .close-button.drag {\n opacity: 1; }\n .dg.main .close-button {\n /*opacity: 0;*/\n -webkit-transition: opacity 0.1s linear;\n -o-transition: opacity 0.1s linear;\n -moz-transition: opacity 0.1s linear;\n transition: opacity 0.1s linear;\n border: 0;\n position: absolute;\n line-height: 19px;\n height: 20px;\n /* TODO, these are style notes */\n cursor: pointer;\n text-align: center;\n background-color: #000; }\n .dg.main .close-button:hover {\n background-color: #111; }\n .dg.a {\n float: right;\n margin-right: 15px;\n overflow-x: hidden; }\n .dg.a.has-save > ul {\n margin-top: 27px; }\n .dg.a.has-save > ul.closed {\n margin-top: 0; }\n .dg.a .save-row {\n position: fixed;\n top: 0;\n z-index: 1002; }\n .dg li {\n -webkit-transition: height 0.1s ease-out;\n -o-transition: height 0.1s ease-out;\n -moz-transition: height 0.1s ease-out;\n transition: height 0.1s ease-out; }\n .dg li:not(.folder) {\n cursor: auto;\n height: 27px;\n line-height: 27px;\n overflow: hidden;\n padding: 0 4px 0 5px; }\n .dg li.folder {\n padding: 0;\n border-left: 4px solid rgba(0, 0, 0, 0); }\n .dg li.title {\n cursor: pointer;\n margin-left: -4px; }\n .dg .closed li:not(.title),\n .dg .closed ul li,\n .dg .closed ul li > * {\n height: 0;\n overflow: hidden;\n border: 0; }\n .dg .cr {\n clear: both;\n padding-left: 3px;\n height: 27px; }\n .dg .property-name {\n cursor: default;\n float: left;\n clear: left;\n width: 40%;\n overflow: hidden;\n text-overflow: ellipsis; }\n .dg .c {\n float: left;\n width: 60%; }\n .dg .c input[type=text] {\n border: 0;\n margin-top: 4px;\n padding: 3px;\n width: 100%;\n float: right; }\n .dg .has-slider input[type=text] {\n width: 30%;\n /*display: none;*/\n margin-left: 0; }\n .dg .slider {\n float: left;\n width: 66%;\n margin-left: -5px;\n margin-right: 0;\n height: 19px;\n margin-top: 4px; }\n .dg .slider-fg {\n height: 100%; }\n .dg .c input[type=checkbox] {\n margin-top: 9px; }\n .dg .c select {\n margin-top: 5px; }\n .dg .cr.function,\n .dg .cr.function .property-name,\n .dg .cr.function *,\n .dg .cr.boolean,\n .dg .cr.boolean * {\n cursor: pointer; }\n .dg .selector {\n display: none;\n position: absolute;\n margin-left: -9px;\n margin-top: 23px;\n z-index: 10; }\n .dg .c:hover .selector,\n .dg .selector.drag {\n display: block; }\n .dg li.save-row {\n padding: 0; }\n .dg li.save-row .button {\n display: inline-block;\n padding: 0px 6px; }\n .dg.dialogue {\n background-color: #222;\n width: 460px;\n padding: 15px;\n font-size: 13px;\n line-height: 15px; }\n\n/* TODO Separate style and structure */\n#dg-new-constructor {\n padding: 10px;\n color: #222;\n font-family: Monaco, monospace;\n font-size: 10px;\n border: 0;\n resize: none;\n box-shadow: inset 1px 1px 1px #888;\n word-wrap: break-word;\n margin: 12px 0;\n display: block;\n width: 440px;\n overflow-y: scroll;\n height: 100px;\n position: relative; }\n\n#dg-local-explain {\n display: none;\n font-size: 11px;\n line-height: 17px;\n border-radius: 3px;\n background-color: #333;\n padding: 8px;\n margin-top: 10px; }\n #dg-local-explain code {\n font-size: 10px; }\n\n#dat-gui-save-locally {\n display: none; }\n\n/** Main type */\n.dg {\n color: #eee;\n font: 11px 'Lucida Grande', sans-serif;\n text-shadow: 0 -1px 0 #111;\n /** Auto place */\n /* Controller row, */\n /** Controllers */ }\n .dg.main {\n /** Scrollbar */ }\n .dg.main::-webkit-scrollbar {\n width: 5px;\n background: #1a1a1a; }\n .dg.main::-webkit-scrollbar-corner {\n height: 0;\n display: none; }\n .dg.main::-webkit-scrollbar-thumb {\n border-radius: 5px;\n background: #676767; }\n .dg li:not(.folder) {\n background: #1a1a1a;\n border-bottom: 1px solid #2c2c2c; }\n .dg li.save-row {\n line-height: 25px;\n background: #dad5cb;\n border: 0; }\n .dg li.save-row select {\n margin-left: 5px;\n width: 108px; }\n .dg li.save-row .button {\n margin-left: 5px;\n margin-top: 1px;\n border-radius: 2px;\n font-size: 9px;\n line-height: 7px;\n padding: 4px 4px 5px 4px;\n background: #c5bdad;\n color: #fff;\n text-shadow: 0 1px 0 #b0a58f;\n box-shadow: 0 -1px 0 #b0a58f;\n cursor: pointer; }\n .dg li.save-row .button.gears {\n background: #c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;\n height: 7px;\n width: 8px; }\n .dg li.save-row .button:hover {\n background-color: #bab19e;\n box-shadow: 0 -1px 0 #b0a58f; }\n .dg li.folder {\n border-bottom: 0; }\n .dg li.title {\n padding-left: 16px;\n background: black url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;\n cursor: pointer;\n border-bottom: 1px solid rgba(255, 255, 255, 0.2); }\n .dg .closed li.title {\n background-image: url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==); }\n .dg .cr.boolean {\n border-left: 3px solid #806787; }\n .dg .cr.function {\n border-left: 3px solid #e61d5f; }\n .dg .cr.number {\n border-left: 3px solid #2fa1d6; }\n .dg .cr.number input[type=text] {\n color: #2fa1d6; }\n .dg .cr.string {\n border-left: 3px solid #1ed36f; }\n .dg .cr.string input[type=text] {\n color: #1ed36f; }\n .dg .cr.function:hover, .dg .cr.boolean:hover {\n background: #111; }\n .dg .c input[type=text] {\n background: #303030;\n outline: none; }\n .dg .c input[type=text]:hover {\n background: #3c3c3c; }\n .dg .c input[type=text]:focus {\n background: #494949;\n color: #fff; }\n .dg .c .slider {\n background: #303030;\n cursor: ew-resize; }\n .dg .c .slider-fg {\n background: #2fa1d6; }\n .dg .c .slider:hover {\n background: #3c3c3c; }\n .dg .c .slider:hover .slider-fg {\n background: #44abda; }\n",
-dat.controllers.factory=function(f,a,d,e,c,b,p){return function(q,l,r,n){var u=q[l];if(p.isArray(r)||p.isObject(r))return new f(q,l,r);if(p.isNumber(u))return p.isNumber(r)&&p.isNumber(n)?new d(q,l,r,n):new a(q,l,{min:r,max:n});if(p.isString(u))return new e(q,l);if(p.isFunction(u))return new c(q,l,"");if(p.isBoolean(u))return new b(q,l)}}(dat.controllers.OptionController,dat.controllers.NumberControllerBox,dat.controllers.NumberControllerSlider,dat.controllers.StringController=function(f,a,d){var e=
-function(c,b){function d(){f.setValue(f.__input.value)}e.superclass.call(this,c,b);var f=this;this.__input=document.createElement("input");this.__input.setAttribute("type","text");a.bind(this.__input,"keyup",d);a.bind(this.__input,"change",d);a.bind(this.__input,"blur",function(){f.__onFinishChange&&f.__onFinishChange.call(f,f.getValue())});a.bind(this.__input,"keydown",function(a){13===a.keyCode&&this.blur()});this.updateDisplay();this.domElement.appendChild(this.__input)};e.superclass=f;d.extend(e.prototype,
-f.prototype,{updateDisplay:function(){a.isActive(this.__input)||(this.__input.value=this.getValue());return e.superclass.prototype.updateDisplay.call(this)}});return e}(dat.controllers.Controller,dat.dom.dom,dat.utils.common),dat.controllers.FunctionController,dat.controllers.BooleanController,dat.utils.common),dat.controllers.Controller,dat.controllers.BooleanController,dat.controllers.FunctionController,dat.controllers.NumberControllerBox,dat.controllers.NumberControllerSlider,dat.controllers.OptionController,
-dat.controllers.ColorController=function(f,a,d,e,c){function b(a,b,d,e){a.style.background="";c.each(l,function(c){a.style.cssText+="background: "+c+"linear-gradient("+b+", "+d+" 0%, "+e+" 100%); "})}function p(a){a.style.background="";a.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);";a.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";
-a.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";a.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";a.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}var q=function(f,n){function u(b){v(b);a.bind(window,"mousemove",v);a.bind(window,
-"mouseup",l)}function l(){a.unbind(window,"mousemove",v);a.unbind(window,"mouseup",l)}function g(){var a=e(this.value);!1!==a?(t.__color.__state=a,t.setValue(t.__color.toOriginal())):this.value=t.__color.toString()}function k(){a.unbind(window,"mousemove",w);a.unbind(window,"mouseup",k)}function v(b){b.preventDefault();var c=a.getWidth(t.__saturation_field),d=a.getOffset(t.__saturation_field),e=(b.clientX-d.left+document.body.scrollLeft)/c;b=1-(b.clientY-d.top+document.body.scrollTop)/c;1
-b&&(b=0);1e&&(e=0);t.__color.v=b;t.__color.s=e;t.setValue(t.__color.toOriginal());return!1}function w(b){b.preventDefault();var c=a.getHeight(t.__hue_field),d=a.getOffset(t.__hue_field);b=1-(b.clientY-d.top+document.body.scrollTop)/c;1b&&(b=0);t.__color.h=360*b;t.setValue(t.__color.toOriginal());return!1}q.superclass.call(this,f,n);this.__color=new d(this.getValue());this.__temp=new d(0);var t=this;this.domElement=document.createElement("div");a.makeSelectable(this.domElement,!1);
-this.__selector=document.createElement("div");this.__selector.className="selector";this.__saturation_field=document.createElement("div");this.__saturation_field.className="saturation-field";this.__field_knob=document.createElement("div");this.__field_knob.className="field-knob";this.__field_knob_border="2px solid ";this.__hue_knob=document.createElement("div");this.__hue_knob.className="hue-knob";this.__hue_field=document.createElement("div");this.__hue_field.className="hue-field";this.__input=document.createElement("input");
-this.__input.type="text";this.__input_textShadow="0 1px 1px ";a.bind(this.__input,"keydown",function(a){13===a.keyCode&&g.call(this)});a.bind(this.__input,"blur",g);a.bind(this.__selector,"mousedown",function(b){a.addClass(this,"drag").bind(window,"mouseup",function(b){a.removeClass(t.__selector,"drag")})});var y=document.createElement("div");c.extend(this.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"});c.extend(this.__field_knob.style,
-{position:"absolute",width:"12px",height:"12px",border:this.__field_knob_border+(.5>this.__color.v?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1});c.extend(this.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1});c.extend(this.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"});c.extend(y.style,{width:"100%",height:"100%",
-background:"none"});b(y,"top","rgba(0,0,0,0)","#000");c.extend(this.__hue_field.style,{width:"15px",height:"100px",display:"inline-block",border:"1px solid #555",cursor:"ns-resize"});p(this.__hue_field);c.extend(this.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:this.__input_textShadow+"rgba(0,0,0,0.7)"});a.bind(this.__saturation_field,"mousedown",u);a.bind(this.__field_knob,"mousedown",u);a.bind(this.__hue_field,"mousedown",function(b){w(b);a.bind(window,
-"mousemove",w);a.bind(window,"mouseup",k)});this.__saturation_field.appendChild(y);this.__selector.appendChild(this.__field_knob);this.__selector.appendChild(this.__saturation_field);this.__selector.appendChild(this.__hue_field);this.__hue_field.appendChild(this.__hue_knob);this.domElement.appendChild(this.__input);this.domElement.appendChild(this.__selector);this.updateDisplay()};q.superclass=f;c.extend(q.prototype,f.prototype,{updateDisplay:function(){var a=e(this.getValue());if(!1!==a){var f=!1;
-c.each(d.COMPONENTS,function(b){if(!c.isUndefined(a[b])&&!c.isUndefined(this.__color.__state[b])&&a[b]!==this.__color.__state[b])return f=!0,{}},this);f&&c.extend(this.__color.__state,a)}c.extend(this.__temp.__state,this.__color.__state);this.__temp.a=1;var l=.5>this.__color.v||.5a&&(a+=1);return{h:360*a,s:c/b,v:b/255}},rgb_to_hex:function(a,d,e){a=this.hex_with_component(0,2,a);a=this.hex_with_component(a,1,d);return a=this.hex_with_component(a,0,e)},component_from_hex:function(a,d){return a>>8*d&255},hex_with_component:function(a,d,e){return e<<(f=8*d)|a&~(255<
-
-
-
- Babylon.js - Morph targets demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/MorphTargets/morphTargets.js b/static/Demos/MorphTargets/morphTargets.js
deleted file mode 100644
index 8d2010172..000000000
--- a/static/Demos/MorphTargets/morphTargets.js
+++ /dev/null
@@ -1,135 +0,0 @@
-var addSpike = function(mesh) {
- var positions = mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind);
- var normals = mesh.getVerticesData(BABYLON.VertexBuffer.NormalKind);
- var indices = mesh.getIndices();
-
- for (var index = 0; index < 5; index++) {
- var randomVertexID = (mesh.getTotalVertices() * Math.random()) | 0;
- var position = BABYLON.Vector3.FromArray(positions, randomVertexID * 3);
- var normal = BABYLON.Vector3.FromArray(normals, randomVertexID * 3);
-
- position.addInPlace(normal);
-
- position.toArray(positions, randomVertexID * 3);
- }
-
- BABYLON.VertexData.ComputeNormals(positions, indices, normals);
- mesh.updateVerticesData(BABYLON.VertexBuffer.PositionKind, positions, false, false);
- mesh.updateVerticesData(BABYLON.VertexBuffer.NormalKind, normals, false, false);
-}
-
-var CreateMorphTargetsTestScene = function () {
-
- // This creates a basic Babylon Scene object (non-mesh)
- var scene = new BABYLON.Scene(engine);
-
- // This creates and positions a free camera (non-mesh)
- var camera = new BABYLON.ArcRotateCamera("camera1", 1.14, 1.13, 10, BABYLON.Vector3.Zero(), scene);
-
- // This targets the camera to scene origin
- camera.setTarget(BABYLON.Vector3.Zero());
-
- // This attaches the camera to the canvas
- camera.attachControl(canvas, true);
-
- // This creates a light, aiming 0,1,0 - to the sky (non-mesh)
- var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
-
- // Default intensity is 1. Let's dim the light a small amount
- light.intensity = 0.7;
-
- // Our built-in 'sphere' shape. Params: name, subdivs, size, scene
- var sphere = BABYLON.Mesh.CreateSphere("sphere1", 16, 2, scene);
-
- var hdrTexture = new BABYLON.HDRCubeTexture("/assets/room.hdr", scene, 512);
-
- var exposure = 0.6;
- var contrast = 1.6;
- var glass = new BABYLON.PBRMaterial("glass", scene);
- glass.reflectionTexture = hdrTexture;
- glass.refractionTexture = hdrTexture;
- glass.linkRefractionWithTransparency = true;
- glass.indexOfRefraction = 0.52;
- glass.alpha = 0;
- glass.cameraExposure = exposure;
- glass.cameraContrast = contrast;
- glass.microSurface = 1;
- glass.reflectivityColor = new BABYLON.Color3(0.2, 0.2, 0.2);
- glass.albedoColor = new BABYLON.Color3(0.85, 0.85, 0.85);
- sphere.material = glass;
-
- var sphere2 = BABYLON.Mesh.CreateSphere("sphere2", 16, 2, scene);
- sphere2.setEnabled(false);
- addSpike(sphere2);
-
- var sphere3 = BABYLON.Mesh.CreateSphere("sphere3", 16, 2, scene);
- sphere3.setEnabled(false);
- addSpike(sphere3);
-
- var sphere4 = BABYLON.Mesh.CreateSphere("sphere4", 16, 2, scene);
- sphere4.setEnabled(false);
- addSpike(sphere4);
-
- var sphere5 = BABYLON.Mesh.CreateSphere("sphere5", 16, 2, scene);
- sphere5.setEnabled(false);
- addSpike(sphere5);
-
- var manager = new BABYLON.MorphTargetManager();
- sphere.morphTargetManager = manager;
-
- var target0 = BABYLON.MorphTarget.FromMesh(sphere2, "sphere2", 0.25);
- manager.addTarget(target0);
-
- var target1 = BABYLON.MorphTarget.FromMesh(sphere3, "sphere3", 0.25);
- manager.addTarget(target1);
-
- var target2 = BABYLON.MorphTarget.FromMesh(sphere4, "sphere4", 0.25);
- manager.addTarget(target2);
-
- var target3 = BABYLON.MorphTarget.FromMesh(sphere5, "sphere5", 0.25);
- manager.addTarget(target3);
-
- var oldgui = document.querySelector("#datGUI");
- if (oldgui != null){
- oldgui.remove();
- }
-
- var gui = new dat.GUI();
- gui.domElement.style.marginTop = "100px";
- gui.domElement.id = "datGUI";
- var options = {
- influence0: 0.25,
- influence1: 0.25,
- influence2: 0.25,
- influence3: 0.25,
- }
-
- gui.add(options, "influence0", 0, 1).onChange(function(value) {
- target0.influence = value;
- });
-
- gui.add(options, "influence1", 0, 1).onChange(function(value) {
- target1.influence = value;
- });
-
- gui.add(options, "influence2", 0, 1).onChange(function(value) {
- target2.influence = value;
- });
-
- gui.add(options, "influence3", 0, 1).onChange(function(value) {
- target3.influence = value;
- });
-
- var button = { switch:function(){
- if (sphere.morphTargetManager) {
- sphere.morphTargetManager = null;
- } else {
- sphere.morphTargetManager = manager;
- }
- }};
-
- gui.add(button,'switch');
-
- return scene;
-
-};
\ No newline at end of file
diff --git a/static/Demos/MotionBlur/demo.js b/static/Demos/MotionBlur/demo.js
deleted file mode 100644
index 62d95f8ac..000000000
--- a/static/Demos/MotionBlur/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateMotionBlurtScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/MotionBlur/index.html b/static/Demos/MotionBlur/index.html
deleted file mode 100644
index db301629d..000000000
--- a/static/Demos/MotionBlur/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Motion Blur demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/MotionBlur/motionBlur.js b/static/Demos/MotionBlur/motionBlur.js
deleted file mode 100644
index f9f6ce18d..000000000
--- a/static/Demos/MotionBlur/motionBlur.js
+++ /dev/null
@@ -1,102 +0,0 @@
-var CreateMotionBlurtScene = function () {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", -Math.PI / 4, Math.PI / 2.5, 200, BABYLON.Vector3.Zero(), scene);
- camera.attachControl(canvas, true);
- camera.minZ = 0.1;
-
- // Light
- new BABYLON.PointLight("point", new BABYLON.Vector3(0, 40, 0), scene);
-
- // Environment Texture
- var hdrTexture = new BABYLON.HDRCubeTexture("/assets/room.hdr", scene, 512);
-
- // Skybox
- var hdrSkybox = BABYLON.Mesh.CreateBox("hdrSkyBox", 1000.0, scene);
- var hdrSkyboxMaterial = new BABYLON.PBRMaterial("skyBox", scene);
- hdrSkyboxMaterial.backFaceCulling = false;
- hdrSkyboxMaterial.reflectionTexture = hdrTexture.clone();
- hdrSkyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- hdrSkyboxMaterial.microSurface = 1.0;
- hdrSkyboxMaterial.cameraExposure = 0.6;
- hdrSkyboxMaterial.cameraContrast = 1.6;
- hdrSkyboxMaterial.disableLighting = true;
- hdrSkybox.material = hdrSkyboxMaterial;
- hdrSkybox.infiniteDistance = true;
-
- // Create meshes
- var sphereGlass = BABYLON.Mesh.CreateSphere("sphereGlass", 48, 30.0, scene);
- sphereGlass.translate(new BABYLON.Vector3(1, 0, 0), -60);
-
- var sphereMetal = BABYLON.Mesh.CreateSphere("sphereMetal", 48, 30.0, scene);
- sphereMetal.translate(new BABYLON.Vector3(1, 0, 0), 60);
-
- var spherePlastic = BABYLON.Mesh.CreateSphere("spherePlastic", 48, 30.0, scene);
- spherePlastic.translate(new BABYLON.Vector3(0, 0, 1), -60);
-
- var woodPlank = BABYLON.MeshBuilder.CreateBox("plane", { width: 65, height: 1, depth: 65 }, scene);
-
- // Create materials
- var glass = new BABYLON.PBRMaterial("glass", scene);
- glass.reflectionTexture = hdrTexture;
- glass.refractionTexture = hdrTexture;
- glass.linkRefractionWithTransparency = true;
- glass.indexOfRefraction = 0.52;
- glass.alpha = 0;
- glass.directIntensity = 0.0;
- glass.environmentIntensity = 0.5;
- glass.cameraExposure = 0.5;
- glass.cameraContrast = 1.7;
- glass.microSurface = 1;
- glass.reflectivityColor = new BABYLON.Color3(0.2, 0.2, 0.2);
- glass.albedoColor = new BABYLON.Color3(0.95, 0.95, 0.95);
- sphereGlass.material = glass;
-
- var metal = new BABYLON.PBRMaterial("metal", scene);
- metal.reflectionTexture = hdrTexture;
- metal.directIntensity = 0.3;
- metal.environmentIntensity = 0.7;
- metal.cameraExposure = 0.55;
- metal.cameraContrast = 1.6;
- metal.microSurface = 0.96;
- metal.reflectivityColor = new BABYLON.Color3(0.9, 0.9, 0.9);
- metal.albedoColor = new BABYLON.Color3(1, 1, 1);
- sphereMetal.material = metal;
-
- var plastic = new BABYLON.PBRMaterial("plastic", scene);
- plastic.reflectionTexture = hdrTexture;
- plastic.directIntensity = 0.6;
- plastic.environmentIntensity = 0.7;
- plastic.cameraExposure = 0.6;
- plastic.cameraContrast = 1.6;
- plastic.microSurface = 0.96;
- plastic.albedoColor = new BABYLON.Color3(0.206, 0.94, 1);
- plastic.reflectivityColor = new BABYLON.Color3(0.05, 0.05, 0.05);
- spherePlastic.material = plastic;
-
- var wood = new BABYLON.PBRMaterial("wood", scene);
- wood.reflectionTexture = hdrTexture;
- wood.directIntensity = 1.5;
- wood.environmentIntensity = 0.5;
- wood.specularIntensity = 0.3;
- wood.cameraExposure = 0.9;
- wood.cameraContrast = 1.6;
-
- wood.reflectivityTexture = new BABYLON.Texture("/assets/reflectivity.png", scene);
- wood.useMicroSurfaceFromReflectivityMapAlpha = true;
-
- wood.albedoColor = BABYLON.Color3.White();
- wood.albedoTexture = new BABYLON.Texture("/assets/albedo.png", scene);
- woodPlank.material = wood;
-
- // Create rendering pipeline
- var pipeline = new BABYLON.StandardRenderingPipeline("standard", scene, 1.0, null, [camera]);
- pipeline.lensTexture = pipeline.lensFlareDirtTexture = new BABYLON.Texture("/assets/lensdirt.jpg", scene);
- pipeline.lensStarTexture = new BABYLON.Texture("/assets/lensstar.png", scene);
- pipeline.lensColorTexture = new BABYLON.Texture("/assets/lenscolor.png", scene);
- pipeline.MotionBlurEnabled = true;
- pipeline.motionStrength = 0.2;
- pipeline.motionBlurSamples = 32;
-
- // Finish
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Multimaterial/demo.js b/static/Demos/Multimaterial/demo.js
deleted file mode 100644
index df3aacda9..000000000
--- a/static/Demos/Multimaterial/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateMultiMaterialScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Multimaterial/index.html b/static/Demos/Multimaterial/index.html
deleted file mode 100644
index 130a4a5a7..000000000
--- a/static/Demos/Multimaterial/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Multimaterial demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Multimaterial/multimat.js b/static/Demos/Multimaterial/multimat.js
deleted file mode 100644
index b5daed82d..000000000
--- a/static/Demos/Multimaterial/multimat.js
+++ /dev/null
@@ -1,40 +0,0 @@
-var CreateMultiMaterialScene = function(engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(20, 100, 2), scene);
-
-
- var material0 = new BABYLON.StandardMaterial("mat0", scene);
- material0.diffuseColor = new BABYLON.Color3(1, 0, 0);
- material0.bumpTexture = new BABYLON.Texture("normalMap.jpg", scene);
-
- var material1 = new BABYLON.StandardMaterial("mat1", scene);
- material1.diffuseColor = new BABYLON.Color3(0, 0, 1);
-
- var material2 = new BABYLON.StandardMaterial("mat2", scene);
- material2.emissiveColor = new BABYLON.Color3(0.4, 0, 0.4);
-
- var multimat = new BABYLON.MultiMaterial("multi", scene);
- multimat.subMaterials.push(material0);
- multimat.subMaterials.push(material1);
- multimat.subMaterials.push(material2);
-
- var sphere = BABYLON.Mesh.CreateSphere("Sphere0", 16, 3, scene);
- sphere.material = multimat;
-
- sphere.subMeshes = [];
- var verticesCount = sphere.getTotalVertices();
-
- sphere.subMeshes.push(new BABYLON.SubMesh(0, 0, verticesCount, 0, 900, sphere));
- sphere.subMeshes.push(new BABYLON.SubMesh(1, 0, verticesCount, 900, 900, sphere));
- sphere.subMeshes.push(new BABYLON.SubMesh(2, 0, verticesCount, 1800, 2088, sphere));
-
- camera.setPosition(new BABYLON.Vector3(-3, 3, 0));
-
- // Animations
- scene.registerBeforeRender(function () {
- sphere.rotation.y += 0.01;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Octree/demo.js b/static/Demos/Octree/demo.js
deleted file mode 100644
index 5790b5d2d..000000000
--- a/static/Demos/Octree/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateOctreeTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Octree/index.html b/static/Demos/Octree/index.html
deleted file mode 100644
index ac6a0e11b..000000000
--- a/static/Demos/Octree/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Octree demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Octree/octree.js b/static/Demos/Octree/octree.js
deleted file mode 100644
index f50fd8d72..000000000
--- a/static/Demos/Octree/octree.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var CreateOctreeTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var light0 = new BABYLON.PointLight("Omni0", new BABYLON.Vector3(0, 10, 0), scene);
- var material = new BABYLON.StandardMaterial("kosh", scene);
- var sphere = BABYLON.Mesh.CreateSphere("sphere0", 16, 1, scene);
-
- camera.setPosition(new BABYLON.Vector3(-10, 10, 0));
-
- // Sphere material
- material.diffuseColor = new BABYLON.Color3(0.5, 0.5, 0.5);
- material.specularColor = new BABYLON.Color3(1.0, 1.0, 1.0);
- material.specularPower = 32;
- material.checkReadyOnEveryCall = false;
- sphere.material = material;
-
- // Fog
- scene.fogMode = BABYLON.Scene.FOGMODE_EXP;
- scene.fogDensity = 0.05;
-
- // Clone spheres
- var playgroundSize = 50;
- for (var index = 0; index < 8000; index++) {
- var clone = sphere.clone("sphere" + (index + 1), null, true);
- var scale = Math.random() * 0.8 + 0.6;
- clone.scaling = new BABYLON.Vector3(scale, scale, scale);
- clone.position = new BABYLON.Vector3(Math.random() * 2 * playgroundSize - playgroundSize, Math.random() * 2 * playgroundSize - playgroundSize, Math.random() * 2 * playgroundSize - playgroundSize);
- }
- sphere.setEnabled(false);
- scene.createOrUpdateSelectionOctree();
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Offscreen/index.html b/static/Demos/Offscreen/index.html
deleted file mode 100644
index f82cd58af..000000000
--- a/static/Demos/Offscreen/index.html
+++ /dev/null
@@ -1,185 +0,0 @@
-
-
-
-
- Babylon.js - Worker mode
-
-
-
-
-
-
-
-
-
-
-
-
-
- Babylon.js Offscreen Canvas demo
-
-
- This test page is intended to demonstrate the use of Babylon.js in a worker thread.
- The left canvas is using Babylon.js directly from the main thread.
- The right canvas is using an offscreen canvas and the rendering is done using a worker thread.
-
- By clicking on the button below, we will simulate some random but heavy operations on the main thread to highlight why working with an offscreen canvas could be useful.
-
- Click
here for more documentation.
-
-
-
-
-
-
UI thread
-
Worker thread
-
-
-
Please wait loading...
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Offscreen/index.js b/static/Demos/Offscreen/index.js
deleted file mode 100644
index 689b11991..000000000
--- a/static/Demos/Offscreen/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var createScene = function () {
-
- var scene = new BABYLON.Scene(engine);
-
- BABYLON.SceneLoader.ImportMesh("", "https://models.babylonjs.com/", "flightHelmet.glb", scene, function (meshes) {
- scene.createDefaultCameraOrLight(true, true, true);
- scene.createDefaultEnvironment();
-
- meshes[0].rotationQuaternion = null;
- BABYLON.Animation.CreateAndStartAnimation("turnTable", meshes[0], "rotation.y", 60, 480, 0, Math.PI * 2);
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Offscreen/worker.js b/static/Demos/Offscreen/worker.js
deleted file mode 100644
index 4f91ca377..000000000
--- a/static/Demos/Offscreen/worker.js
+++ /dev/null
@@ -1,24 +0,0 @@
-importScripts("https://preview.babylonjs.com/babylon.js");
-importScripts("https://preview.babylonjs.com/loaders/babylonjs.loaders.min.js");
-importScripts("index.js");
-
-var engine;
-onmessage = function(evt) {
-
- if (evt.data.canvas) {
- canvas = evt.data.canvas;
-
- engine = new BABYLON.Engine(canvas, true);
- var scene = createScene();
-
- engine.runRenderLoop(function() {
- engine.resize();
- if (scene.activeCamera) {
- scene.render();
- }
- });
- } else {
- canvas.width = evt.data.width;
- canvas.height = evt.data.height;
- }
-}
\ No newline at end of file
diff --git a/static/Demos/PBR/demo.js b/static/Demos/PBR/demo.js
deleted file mode 100644
index 37ca1adc5..000000000
--- a/static/Demos/PBR/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreatePBRTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/PBR/index.html b/static/Demos/PBR/index.html
deleted file mode 100644
index 191d885db..000000000
--- a/static/Demos/PBR/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - PBR demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/PBR/pbr.js b/static/Demos/PBR/pbr.js
deleted file mode 100644
index 1fb5737e8..000000000
--- a/static/Demos/PBR/pbr.js
+++ /dev/null
@@ -1,75 +0,0 @@
-var CreatePBRTestScene = function () {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", -Math.PI / 4, Math.PI / 2.5, 200, BABYLON.Vector3.Zero(), scene);
- camera.attachControl(canvas, true);
- camera.minZ = 0.1;
-
- // Environment Texture
- var hdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("/Assets/environment.dds", scene);
-
- scene.imageProcessingConfiguration.exposure = 0.6;
- scene.imageProcessingConfiguration.contrast = 1.6;
-
- // Skybox
- var hdrSkybox = BABYLON.Mesh.CreateBox("hdrSkyBox", 1000.0, scene);
- var hdrSkyboxMaterial = new BABYLON.PBRMaterial("skyBox", scene);
- hdrSkyboxMaterial.backFaceCulling = false;
- hdrSkyboxMaterial.reflectionTexture = hdrTexture.clone();
- hdrSkyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- hdrSkyboxMaterial.microSurface = 1.0;
- hdrSkyboxMaterial.disableLighting = true;
- hdrSkybox.material = hdrSkyboxMaterial;
- hdrSkybox.infiniteDistance = true;
-
- // Create meshes
- var sphereGlass = BABYLON.Mesh.CreateSphere("sphereGlass", 48, 30.0, scene);
- sphereGlass.translate(new BABYLON.Vector3(1, 0, 0), -60);
-
- var sphereMetal = BABYLON.Mesh.CreateSphere("sphereMetal", 48, 30.0, scene);
- sphereMetal.translate(new BABYLON.Vector3(1, 0, 0), 60);
-
- var spherePlastic = BABYLON.Mesh.CreateSphere("spherePlastic", 48, 30.0, scene);
- spherePlastic.translate(new BABYLON.Vector3(0, 0, 1), -60);
-
- var woodPlank = BABYLON.MeshBuilder.CreateBox("plane", { width: 65, height: 1, depth: 65 }, scene);
-
- // Create materials
- var glass = new BABYLON.PBRMaterial("glass", scene);
- glass.reflectionTexture = hdrTexture;
- glass.refractionTexture = hdrTexture;
- glass.linkRefractionWithTransparency = true;
- glass.indexOfRefraction = 0.52;
- glass.alpha = 0;
- glass.microSurface = 1;
- glass.reflectivityColor = new BABYLON.Color3(0.2, 0.2, 0.2);
- glass.albedoColor = new BABYLON.Color3(0.85, 0.85, 0.85);
- sphereGlass.material = glass;
-
- var metal = new BABYLON.PBRMaterial("metal", scene);
- metal.reflectionTexture = hdrTexture;
- metal.microSurface = 0.96;
- metal.reflectivityColor = new BABYLON.Color3(0.85, 0.85, 0.85);
- metal.albedoColor = new BABYLON.Color3(0.01, 0.01, 0.01);
- sphereMetal.material = metal;
-
- var plastic = new BABYLON.PBRMaterial("plastic", scene);
- plastic.reflectionTexture = hdrTexture;
- plastic.microSurface = 0.96;
- plastic.albedoColor = new BABYLON.Color3(0.206, 0.94, 1);
- plastic.reflectivityColor = new BABYLON.Color3(0.003, 0.003, 0.003);
- spherePlastic.material = plastic;
-
- var wood = new BABYLON.PBRMaterial("wood", scene);
- wood.reflectionTexture = hdrTexture;
- wood.environmentIntensity = 1;
- wood.specularIntensity = 0.3;
-
- wood.reflectivityTexture = new BABYLON.Texture("/assets/reflectivity.png", scene);
- wood.useMicroSurfaceFromReflectivityMapAlpha = true;
-
- wood.albedoColor = BABYLON.Color3.White();
- wood.albedoTexture = new BABYLON.Texture("/assets/albedo.png", scene);
- woodPlank.material = wood;
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/PBRGlossy/demo.js b/static/Demos/PBRGlossy/demo.js
deleted file mode 100644
index 4a23be94e..000000000
--- a/static/Demos/PBRGlossy/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreatePBRGlossyScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/PBRGlossy/index.html b/static/Demos/PBRGlossy/index.html
deleted file mode 100644
index d16334cdc..000000000
--- a/static/Demos/PBRGlossy/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
- Babylon.js - PBR Glossy demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/PBRGlossy/index.js b/static/Demos/PBRGlossy/index.js
deleted file mode 100644
index 44959f512..000000000
--- a/static/Demos/PBRGlossy/index.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var CreatePBRGlossyScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- scene.clearColor = new BABYLON.Color4(0.02, 0.02, 0.02, 1.0);
- scene.imageProcessingConfiguration.contrast = 1.6;
- scene.imageProcessingConfiguration.exposure = 0.6;
- scene.imageProcessingConfiguration.toneMappingEnabled = true;
-
- engine.setHardwareScalingLevel(0.5);
-
- var hdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("/Assets/environment.dds", scene);
- hdrTexture.gammaSpace = false;
-
- BABYLON.SceneLoader.Append("/Assets/DamagedHelmet/glTF/", "DamagedHelmet.gltf", scene, function () {
- scene.createDefaultCameraOrLight(true, true, true);
- scene.createDefaultSkybox(hdrTexture, true, 100, 0.3);
-
- scene.activeCamera.lowerRadiusLimit = 2;
- scene.activeCamera.upperRadiusLimit = 20;
-
- var options = new BABYLON.SceneOptimizerOptions(50, 2000);
- options.addOptimization(new BABYLON.HardwareScalingOptimization(0, 1));
-
- // Optimizer
- var optimizer = new BABYLON.SceneOptimizer(scene, options);
- optimizer.start();
-
- optimizer.onNewOptimizationAppliedObservable.add(function (optim) {
- console.log(optim.getDescription());
- });
- optimizer.onSuccessObservable.add(function () {
- console.log("Optimization done")
- });
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/PBRGlossyBloom/demo.js b/static/Demos/PBRGlossyBloom/demo.js
deleted file mode 100644
index 4a23be94e..000000000
--- a/static/Demos/PBRGlossyBloom/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreatePBRGlossyScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/PBRGlossyBloom/index.html b/static/Demos/PBRGlossyBloom/index.html
deleted file mode 100644
index d16334cdc..000000000
--- a/static/Demos/PBRGlossyBloom/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
- Babylon.js - PBR Glossy demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/PBRGlossyBloom/index.js b/static/Demos/PBRGlossyBloom/index.js
deleted file mode 100644
index 346d7978a..000000000
--- a/static/Demos/PBRGlossyBloom/index.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var CreatePBRGlossyScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- scene.clearColor = new BABYLON.Color4(0.02, 0.02, 0.02, 1.0);
- scene.imageProcessingConfiguration.contrast = 1.6;
- scene.imageProcessingConfiguration.exposure = 0.6;
- scene.imageProcessingConfiguration.toneMappingEnabled = true;
- scene.imageProcessingConfiguration.vignetteWeight = 4;
- scene.imageProcessingConfiguration.vignetteColor = new BABYLON.Color4(0, 0, 0, 0);
- scene.imageProcessingConfiguration.vignetteEnabled = true;
-
- var hdrTexture = new BABYLON.CubeTexture.CreateFromPrefilteredData("/Assets/environment.dds", scene);
- hdrTexture.gammaSpace = false;
-
- BABYLON.SceneLoader.Append("/Assets/DamagedHelmet/glTF/", "DamagedHelmet.gltf", scene, function () {
- scene.createDefaultCameraOrLight(true, true, true);
- scene.createDefaultSkybox(hdrTexture, true, 100, 0.3);
-
- scene.activeCamera.lowerRadiusLimit = 2;
- scene.activeCamera.upperRadiusLimit = 20;
-
- var pipeline = new BABYLON.DefaultRenderingPipeline(
- "default", // The name of the pipeline
- true,
- scene, // The scene instance
- [scene.activeCamera] // The list of cameras to be attached to
- );
-
- pipeline.fxaaEnabled = true;
- pipeline.bloomEnabled = true;
- pipeline.bloomWeight = 0.2;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/PBRRough/demo.js b/static/Demos/PBRRough/demo.js
deleted file mode 100644
index f0ac96a74..000000000
--- a/static/Demos/PBRRough/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreatePBRRoughScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/PBRRough/index.html b/static/Demos/PBRRough/index.html
deleted file mode 100644
index 6cd6de543..000000000
--- a/static/Demos/PBRRough/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - PBR Rough demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/PBRRough/index.js b/static/Demos/PBRRough/index.js
deleted file mode 100644
index 3a015bfa3..000000000
--- a/static/Demos/PBRRough/index.js
+++ /dev/null
@@ -1,49 +0,0 @@
-var CreatePBRRoughScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- scene.clearColor = new BABYLON.Color4(0.02, 0.02, 0.02, 1.0);
- scene.imageProcessingConfiguration.contrast = 1.6;
- scene.imageProcessingConfiguration.exposure = 0.6;
- scene.imageProcessingConfiguration.toneMappingEnabled = true;
-
- var hdrTexture = new BABYLON.CubeTexture.CreateFromPrefilteredData("/Assets/environment.dds", scene);
- hdrTexture.gammaSpace = false;
-
- BABYLON.SceneLoader.Append("/Assets/", "Alien.glb", scene, function () {
- scene.createDefaultCameraOrLight(true, true, true);
- var sky = scene.createDefaultSkybox(hdrTexture, true, 100, 0.5);
-
- var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(-1, -2, -1), scene);
- light.position = new BABYLON.Vector3(-2, 4, -1);
- light.setDirectionToTarget(new BABYLON.Vector3(0, 1, 0));
- light.intensity = 20;
- light.shadowMinZ = 2.5;
- light.shadowMaxZ = 6;
- light.shadowEnabled = true;
-
- var light2 = new BABYLON.DirectionalLight("dir02", new BABYLON.Vector3(-1, -2, -1), scene);
- light2.position = new BABYLON.Vector3(2, 4, -1);
- light2.setDirectionToTarget(new BABYLON.Vector3(0, 0.5, 0));
- light2.intensity = 0;
- light2.shadowMinZ = 2.5;
- light2.shadowMaxZ = 6;
-
- var generator = new BABYLON.ShadowGenerator(512, light);
- generator.useBlurCloseExponentialShadowMap = true;
- generator.useKernelBlur = true;
- generator.blurScale = 1.0;
- generator.blurKernel = 10.0;
-
- for (var index = 0; index < scene.meshes.length; index++) {
- var m = scene.meshes[index];
- if (m === sky) {
- continue;
- }
- m.receiveShadows = true;
- generator.getShadowMap().renderList.push(m);
- }
-
- scene.materials[0].environmmentIntensity = 0.5;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/PPBloom/demo.js b/static/Demos/PPBloom/demo.js
deleted file mode 100644
index 56af7a2d5..000000000
--- a/static/Demos/PPBloom/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreatePostProcessBloomTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/PPBloom/index.html b/static/Demos/PPBloom/index.html
deleted file mode 100644
index e55c1980f..000000000
--- a/static/Demos/PPBloom/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Postprocess Bloom demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/PPBloom/postprocessBloom.js b/static/Demos/PPBloom/postprocessBloom.js
deleted file mode 100644
index 38cc21538..000000000
--- a/static/Demos/PPBloom/postprocessBloom.js
+++ /dev/null
@@ -1,78 +0,0 @@
-var CreatePostProcessBloomTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0, -1, -0.2), scene);
- var light2 = new BABYLON.DirectionalLight("dir02", new BABYLON.Vector3(-1, -2, -1), scene);
- light.position = new BABYLON.Vector3(0, 30, 0);
- light2.position = new BABYLON.Vector3(10, 20, 10);
-
- light.intensity = 0.6;
- light2.intensity = 0.6;
-
- camera.setPosition(new BABYLON.Vector3(-40, 40, 0));
- camera.lowerBetaLimit = (Math.PI / 2) * 0.9;
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 1000.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/snow", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
-
- // Spheres
- var sphere0 = BABYLON.Mesh.CreateSphere("Sphere0", 16, 10, scene);
- var sphere1 = BABYLON.Mesh.CreateSphere("Sphere1", 16, 10, scene);
- var sphere2 = BABYLON.Mesh.CreateSphere("Sphere2", 16, 10, scene);
- var cube = BABYLON.Mesh.CreateBox("Cube", 10.0, scene);
-
- sphere0.material = new BABYLON.StandardMaterial("white", scene);
- sphere0.material.diffuseColor = new BABYLON.Color3(0, 0, 0);
- sphere0.material.specularColor = new BABYLON.Color3(0, 0, 0);
- sphere0.material.emissiveColor = new BABYLON.Color3(1.0, 1.0, 1.0);
-
- sphere1.material = sphere0.material;
- sphere2.material = sphere0.material;
-
- cube.material = new BABYLON.StandardMaterial("red", scene);
- cube.material.diffuseColor = new BABYLON.Color3(0, 0, 0);
- cube.material.specularColor = new BABYLON.Color3(0, 0, 0);
- cube.material.emissiveColor = new BABYLON.Color3(1.0, 0, 0);
-
- // Post-process
- var blurWidth = 10.0;
-
- var postProcess0 = new BABYLON.PassPostProcess("Scene copy", 1.0, camera);
- var postProcess1 = new BABYLON.PostProcess("Down sample", "../../assets/postprocesses/downsample", ["screenSize", "highlightThreshold"], null, 0.25, camera, BABYLON.Texture.BILINEAR_SAMPLINGMODE);
- postProcess1.onApply = function (effect) {
- effect.setFloat2("screenSize", postProcess1.width, postProcess1.height);
- effect.setFloat("highlightThreshold", 0.90);
- };
- var postProcess2 = new BABYLON.BlurPostProcess("Horizontal blur", new BABYLON.Vector2(1.0, 0), blurWidth, 0.25, camera);
- var postProcess3 = new BABYLON.BlurPostProcess("Vertical blur", new BABYLON.Vector2(0, 1.0), blurWidth, 0.25, camera);
- var postProcess4 = new BABYLON.PostProcess("Final compose", "../../assets/postprocesses/compose", ["sceneIntensity", "glowIntensity", "highlightIntensity"], ["sceneSampler"], 1, camera);
- postProcess4.onApply = function (effect) {
- effect.setTextureFromPostProcess("sceneSampler", postProcess0);
- effect.setFloat("sceneIntensity", 0.5);
- effect.setFloat("glowIntensity", 0.4);
- effect.setFloat("highlightIntensity", 1.0);
- };
-
- // Animations
- var alpha = 0;
- scene.registerBeforeRender(function() {
- sphere0.position = new BABYLON.Vector3(20 * Math.sin(alpha), 0, 20 * Math.cos(alpha));
- sphere1.position = new BABYLON.Vector3(20 * Math.sin(alpha), 0, -20 * Math.cos(alpha));
- sphere2.position = new BABYLON.Vector3(20 * Math.cos(alpha), 0, 20 * Math.sin(alpha));
-
- cube.rotation.y += 0.01;
- cube.rotation.z += 0.01;
-
- alpha += 0.01;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/PPConvolution/demo.js b/static/Demos/PPConvolution/demo.js
deleted file mode 100644
index bd73b2cbb..000000000
--- a/static/Demos/PPConvolution/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateConvolutionTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/PPConvolution/index.html b/static/Demos/PPConvolution/index.html
deleted file mode 100644
index 638fb7dcf..000000000
--- a/static/Demos/PPConvolution/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Postprocess Convolution demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/PPConvolution/postprocessConvolution.js b/static/Demos/PPConvolution/postprocessConvolution.js
deleted file mode 100644
index 0bac79837..000000000
--- a/static/Demos/PPConvolution/postprocessConvolution.js
+++ /dev/null
@@ -1,63 +0,0 @@
-var CreateConvolutionTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0, -1, -0.2), scene);
- var light2 = new BABYLON.DirectionalLight("dir02", new BABYLON.Vector3(-1, 2, -1), scene);
- light.position = new BABYLON.Vector3(0, 30, 0);
- light2.position = new BABYLON.Vector3(10, 20, 10);
-
- light.intensity = 0.6;
- light2.intensity = 0.6;
-
- camera.setPosition(new BABYLON.Vector3(-40, 40, 0));
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 500.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/skybox", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
- skybox.infiniteDistance = true;
-
- // Spheres
- var sphere0 = BABYLON.Mesh.CreateSphere("Sphere0", 16, 10, scene);
- var sphere1 = BABYLON.Mesh.CreateSphere("Sphere1", 16, 10, scene);
- var sphere2 = BABYLON.Mesh.CreateSphere("Sphere2", 16, 10, scene);
- var cube = BABYLON.Mesh.CreateBox("Cube", 10.0, scene);
-
- sphere0.material = new BABYLON.StandardMaterial("white", scene);
- sphere0.material.diffuseColor = new BABYLON.Color3(0.5, 0.5, 1.0);
-
- sphere1.material = sphere0.material;
- sphere2.material = sphere0.material;
-
- sphere0.convertToFlatShadedMesh();
- sphere1.convertToFlatShadedMesh();
- sphere2.convertToFlatShadedMesh();
-
- cube.material = new BABYLON.StandardMaterial("red", scene);
- cube.material.diffuseColor = new BABYLON.Color3(1.0, 0.5, 0.5);
- cube.material.specularColor = new BABYLON.Color3(0, 0, 0);
-
- // Post-process
- var postProcess = new BABYLON.ConvolutionPostProcess("convolution", BABYLON.ConvolutionPostProcess.EmbossKernel, 1.0, camera);
-
- // Animations
- var alpha = 0;
- scene.registerBeforeRender(function() {
- sphere0.position = new BABYLON.Vector3(20 * Math.sin(alpha), 0, 20 * Math.cos(alpha));
- sphere1.position = new BABYLON.Vector3(20 * Math.sin(alpha), -20 * Math.cos(alpha), 0);
- sphere2.position = new BABYLON.Vector3(0, 20 * Math.cos(alpha), 20 * Math.sin(alpha));
-
- cube.rotation.y += 0.01;
- cube.rotation.z += 0.01;
-
- alpha += 0.05;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/PPRef/demo.js b/static/Demos/PPRef/demo.js
deleted file mode 100644
index d34cbbbb6..000000000
--- a/static/Demos/PPRef/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreatePostProcessRefractionTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/PPRef/index.html b/static/Demos/PPRef/index.html
deleted file mode 100644
index 710400d53..000000000
--- a/static/Demos/PPRef/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Postprocess Refraction demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/PPRef/postprocessRefraction.js b/static/Demos/PPRef/postprocessRefraction.js
deleted file mode 100644
index 74228ce34..000000000
--- a/static/Demos/PPRef/postprocessRefraction.js
+++ /dev/null
@@ -1,57 +0,0 @@
-var CreatePostProcessRefractionTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 100, BABYLON.Vector3.Zero(), scene);
- var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0, -1, -0.2), scene);
- var light2 = new BABYLON.DirectionalLight("dir02", new BABYLON.Vector3(-1, -2, -1), scene);
- light.position = new BABYLON.Vector3(0, 30, 0);
- light2.position = new BABYLON.Vector3(10, 20, 10);
-
- light.intensity = 0.6;
- light2.intensity = 0.6;
-
- camera.setPosition(new BABYLON.Vector3(-60, 60, 0));
- camera.lowerBetaLimit = (Math.PI / 2) * 0.8;
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 1000.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/snow", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
-
- // Spheres
- var sphere0 = BABYLON.Mesh.CreateSphere("Sphere0", 16, 10, scene);
- var sphere1 = BABYLON.Mesh.CreateSphere("Sphere1", 16, 10, scene);
- var sphere2 = BABYLON.Mesh.CreateSphere("Sphere2", 16, 10, scene);
-
- sphere0.material = new BABYLON.StandardMaterial("red", scene);
- sphere0.material.specularColor = new BABYLON.Color3(0, 0, 0);
- sphere0.material.diffuseColor = new BABYLON.Color3(1.0, 0, 0);
-
- sphere1.material = new BABYLON.StandardMaterial("green", scene);
- sphere1.material.specularColor = new BABYLON.Color3(0, 0, 0);
- sphere1.material.diffuseColor = new BABYLON.Color3(0, 1.0, 0);
-
- sphere2.material = new BABYLON.StandardMaterial("blue", scene);
- sphere2.material.specularColor = new BABYLON.Color3(0, 0, 0);
- sphere2.material.diffuseColor = new BABYLON.Color3(0, 0, 1.0);
-
- // Post-process
- var postProcess = new BABYLON.RefractionPostProcess("Refraction", "refMap.jpg", new BABYLON.Color3(1.0, 1.0, 1.0), 0.5, 0.5, 1.0, camera);
-
- // Animations
- var alpha = 0;
- scene.registerBeforeRender(function() {
- sphere0.position = new BABYLON.Vector3(20 * Math.sin(alpha), 0, 20 * Math.cos(alpha));
- sphere1.position = new BABYLON.Vector3(20 * Math.sin(alpha), 0, -20 * Math.cos(alpha));
- sphere2.position = new BABYLON.Vector3(20 * Math.cos(alpha), 0, 20 * Math.sin(alpha));
-
- alpha += 0.01;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Particles/demo.js b/static/Demos/Particles/demo.js
deleted file mode 100644
index 014ab640d..000000000
--- a/static/Demos/Particles/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateParticlesTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Particles/index.html b/static/Demos/Particles/index.html
deleted file mode 100644
index e2975000b..000000000
--- a/static/Demos/Particles/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Particles demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Particles/particles.js b/static/Demos/Particles/particles.js
deleted file mode 100644
index fd2d566d1..000000000
--- a/static/Demos/Particles/particles.js
+++ /dev/null
@@ -1,81 +0,0 @@
-var CreateParticlesTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- camera.setPosition(new BABYLON.Vector3(-5, 5, 0));
- camera.lowerBetaLimit = 0.1;
- camera.upperBetaLimit = (Math.PI / 2) * 0.99;
- camera.lowerRadiusLimit = 5;
-
- // Mirror
- var mirror = BABYLON.Mesh.CreateBox("Mirror", 1.0, scene);
- mirror.scaling = new BABYLON.Vector3(100.0, 0.01, 100.0);
- mirror.material = new BABYLON.StandardMaterial("mirror", scene);
- mirror.material.diffuseColor = new BABYLON.Color3(0.4, 0.4, 0.4);
- mirror.material.specularColor = new BABYLON.Color3(0, 0, 0);
- mirror.material.reflectionTexture = new BABYLON.MirrorTexture("mirror", 512, scene, true);
- mirror.material.reflectionTexture.mirrorPlane = new BABYLON.Plane(0, -1.0, 0, 0.0);
- mirror.material.reflectionTexture.level = 0.2;
- mirror.position = new BABYLON.Vector3(0, 0.0, 0);
-
- // Emitters
- var emitter0 = BABYLON.Mesh.CreateBox("emitter0", 0.1, scene);
- emitter0.isVisible = false;
-
- var emitter1 = BABYLON.Mesh.CreateBox("emitter0", 0.1, scene);
- emitter1.isVisible = false;
-
- mirror.material.reflectionTexture.renderList.push(emitter0);
- mirror.material.reflectionTexture.renderList.push(emitter1);
-
- // Particles
- var particleSystem = new BABYLON.ParticleSystem("particles", 4000, scene);
- particleSystem.particleTexture = new BABYLON.Texture("../../assets/Flare.png", scene);
- particleSystem.minAngularSpeed = -0.5;
- particleSystem.maxAngularSpeed = 0.5;
- particleSystem.minSize = 0.1;
- particleSystem.maxSize = 0.5;
- particleSystem.minLifeTime = 0.5;
- particleSystem.maxLifeTime = 2.0;
- particleSystem.minEmitPower = 0.5;
- particleSystem.maxEmitPower = 4.0;
- particleSystem.emitter = emitter0;
- particleSystem.emitRate = 400;
- particleSystem.blendMode = BABYLON.ParticleSystem.BLENDMODE_ONEONE;
- particleSystem.minEmitBox = new BABYLON.Vector3(-0.5, 0, -0.5);
- particleSystem.maxEmitBox = new BABYLON.Vector3(0.5, 0, 0.5);
- particleSystem.direction1 = new BABYLON.Vector3(-1, 1, -1);
- particleSystem.direction2 = new BABYLON.Vector3(1, 1, 1);
- particleSystem.color1 = new BABYLON.Color4(1, 0, 0, 1);
- particleSystem.color2 = new BABYLON.Color4(0, 1, 1, 1);
- particleSystem.gravity = new BABYLON.Vector3(0, -2.0, 0);
- particleSystem.start();
-
- var particleSystem2 = new BABYLON.ParticleSystem("particles", 4000, scene);
- particleSystem2.particleTexture = new BABYLON.Texture("../../assets/Flare.png", scene);
- particleSystem2.minSize = 0.1;
- particleSystem2.maxSize = 0.3;
- particleSystem2.minEmitPower = 1.0;
- particleSystem2.maxEmitPower = 2.0;
- particleSystem2.minLifeTime = 0.5;
- particleSystem2.maxLifeTime = 1.0;
- particleSystem2.emitter = emitter1;
- particleSystem2.emitRate = 500;
- particleSystem2.blendMode = BABYLON.ParticleSystem.BLENDMODE_ONEONE;
- particleSystem2.minEmitBox = new BABYLON.Vector3(0, 0, 0);
- particleSystem2.maxEmitBox = new BABYLON.Vector3(0, 0, 0);
- particleSystem2.gravity = new BABYLON.Vector3(0, -0.5, 0);
- particleSystem2.direction1 = new BABYLON.Vector3(0, 0, 0);
- particleSystem2.direction2 = new BABYLON.Vector3(0, 0, 0);
- particleSystem2.start();
-
- var alpha = 0;
- scene.registerBeforeRender(function () {
- emitter1.position.x = 3 * Math.cos(alpha);
- emitter1.position.y = 1.0;
- emitter1.position.z = 3 * Math.sin(alpha);
-
- alpha += 0.05 * scene.getAnimationRatio();
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Particles2/demo.js b/static/Demos/Particles2/demo.js
deleted file mode 100644
index 6664140a8..000000000
--- a/static/Demos/Particles2/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateParticles2TestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Particles2/index.html b/static/Demos/Particles2/index.html
deleted file mode 100644
index 3aa41ad00..000000000
--- a/static/Demos/Particles2/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Enhanced Particles demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Particles2/particles2.js b/static/Demos/Particles2/particles2.js
deleted file mode 100644
index c7d4d4e09..000000000
--- a/static/Demos/Particles2/particles2.js
+++ /dev/null
@@ -1,80 +0,0 @@
-var CreateParticles2TestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- camera.setPosition(new BABYLON.Vector3(-5, 5, 0));
- camera.lowerBetaLimit = 0.1;
- camera.upperBetaLimit = (Math.PI / 2) * 0.95;
- camera.lowerRadiusLimit = 5;
-
- // Emitters
- var emitter0 = BABYLON.Mesh.CreateBox("emitter0", 0.1, scene);
- emitter0.isVisible = false;
-
- // Custom shader for particles
- BABYLON.Effect.ShadersStore["myParticleFragmentShader"] =
- "#ifdef GL_ES\n" +
- "precision highp float;\n" +
- "#endif\n" +
-
- "varying vec2 vUV;\n" + // Provided by babylon.js
- "varying vec4 vColor;\n" + // Provided by babylon.js
-
- "uniform sampler2D diffuseSampler;\n" + // Provided by babylon.js
- "uniform float time;\n" + // This one is custom so we need to declare it to the effect
-
- "void main(void) {\n" +
- "vec2 position = vUV;\n" +
-
- "float color = 0.0;\n" +
- "vec2 center = vec2(0.5, 0.5);\n" +
-
- "color = sin(distance(position, center) * 10.0+ time * vColor.g);\n" +
-
- "vec4 baseColor = texture2D(diffuseSampler, vUV);\n" +
-
- "gl_FragColor = baseColor * vColor * vec4( vec3(color, color, color), 1.0 );\n" +
- "}\n" +
- "";
-
- // Effect
- var effect = engine.createEffectForParticles("myParticle", ["time"]);
-
- // Particles
- var particleSystem = new BABYLON.ParticleSystem("particles", 4000, scene, effect);
- particleSystem.particleTexture = new BABYLON.Texture("../../assets/Flare.png", scene);
- particleSystem.minSize = 0.1;
- particleSystem.maxSize = 1.0;
- particleSystem.minLifeTime = 0.5;
- particleSystem.maxLifeTime = 5.0;
- particleSystem.minEmitPower = 0.5;
- particleSystem.maxEmitPower = 3.0;
- particleSystem.emitter = emitter0;
- particleSystem.emitRate = 100;
- particleSystem.blendMode = BABYLON.ParticleSystem.BLENDMODE_ONEONE;
- particleSystem.direction1 = new BABYLON.Vector3(-1, 1, -1);
- particleSystem.direction2 = new BABYLON.Vector3(1, 1, 1);
- particleSystem.color1 = new BABYLON.Color4(1, 1, 0, 1);
- particleSystem.color2 = new BABYLON.Color4(1, 0.5, 0, 1);
- particleSystem.gravity = new BABYLON.Vector3(0, -1.0, 0);
- particleSystem.start();
-
- var time = 0;
- var order = 0.1;
-
- scene.registerBeforeRender(function () {
- // Waiting for effect to be compiled
- if (!effect) {
- return;
- }
-
- effect.setFloat("time", time);
-
- time += order;
-
- if (time > 100 || time < 0) {
- order *= -1;
- }
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/PointLightShadowMap/demo.js b/static/Demos/PointLightShadowMap/demo.js
deleted file mode 100644
index 5a68c24f4..000000000
--- a/static/Demos/PointLightShadowMap/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreatePointLightShadowScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/PointLightShadowMap/index.html b/static/Demos/PointLightShadowMap/index.html
deleted file mode 100644
index 12b400118..000000000
--- a/static/Demos/PointLightShadowMap/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Point Light Shadow Map demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/PointLightShadowMap/pointLightShadows.js b/static/Demos/PointLightShadowMap/pointLightShadows.js
deleted file mode 100644
index f9903ed68..000000000
--- a/static/Demos/PointLightShadowMap/pointLightShadows.js
+++ /dev/null
@@ -1,61 +0,0 @@
-var CreatePointLightShadowScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
-
- var camera = new BABYLON.ArcRotateCamera("Camera", 3 * Math.PI / 2, Math.PI / 8, 30, BABYLON.Vector3.Zero(), scene);
- camera.lowerRadiusLimit = 5;
- camera.upperRadiusLimit = 40;
- camera.minZ = 0;
-
- camera.attachControl(engine.getRenderingCanvas());
-
- var light = new BABYLON.PointLight("light1", new BABYLON.Vector3(0, 0, 0), scene);
- light.intensity = 0.7;
-
- var lightImpostor = BABYLON.Mesh.CreateSphere("sphere1", 16, 1, scene);
- var lightImpostorMat = new BABYLON.StandardMaterial("mat", scene);
- lightImpostor.material = lightImpostorMat;
- lightImpostorMat.emissiveColor = BABYLON.Color3.Yellow();
- lightImpostorMat.linkEmissiveWithDiffuse = true;
-
- lightImpostor.parent = light;
-
- var knot = BABYLON.Mesh.CreateTorusKnot("knot", 2, 0.2, 128, 64, 4, 1, scene);
- var torus = BABYLON.Mesh.CreateTorus("torus", 8, 1, 32, scene, false);
-
- var torusMat = new BABYLON.StandardMaterial("mat", scene);
- torus.material = torusMat;
- torusMat.diffuseColor = BABYLON.Color3.Red();
-
- var knotMat = new BABYLON.StandardMaterial("mat", scene);
- knot.material = knotMat;
- knotMat.diffuseColor = BABYLON.Color3.White();
-
- // Container
- var container = BABYLON.Mesh.CreateSphere("sphere2", 16, 50, scene, false, BABYLON.Mesh.BACKSIDE);
- var containerMat = new BABYLON.StandardMaterial("mat", scene);
- container.material = containerMat;
- containerMat.diffuseTexture = new BABYLON.Texture("../../assets/amiga.jpg", scene);
- containerMat.diffuseTexture.uScale = 10.0;
- containerMat.diffuseTexture.vScale = 10.0;
-
- // Shadow
- var shadowGenerator = new BABYLON.ShadowGenerator(1024, light);
- shadowGenerator.getShadowMap().renderList.push(knot, torus);
- shadowGenerator.setDarkness(0.5);
- shadowGenerator.usePoissonSampling = true;
- shadowGenerator.bias = 0;
-
- container.receiveShadows = true;
- torus.receiveShadows = true;
-
- scene.registerBeforeRender(function () {
- knot.rotation.y += 0.01;
- knot.rotation.x += 0.01;
-
- torus.rotation.y += 0.05;
- torus.rotation.z += 0.03;
- });
-
- return scene;
-
-};
\ No newline at end of file
diff --git a/static/Demos/Polygon/demo.js b/static/Demos/Polygon/demo.js
deleted file mode 100644
index bd34d088e..000000000
--- a/static/Demos/Polygon/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreatePolygonScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Polygon/index.html b/static/Demos/Polygon/index.html
deleted file mode 100644
index d977bab8d..000000000
--- a/static/Demos/Polygon/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
- Babylon.js - Polygon Mesh demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Polygon/poly2tri.js b/static/Demos/Polygon/poly2tri.js
deleted file mode 100644
index 8fdba401a..000000000
--- a/static/Demos/Polygon/poly2tri.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! poly2tri v1.3.5 | (c) 2009-2014 Poly2Tri Contributors */
-!function(t){if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.poly2tri=t()}}(function(){return function t(n,e,i){function o(s,p){if(!e[s]){if(!n[s]){var a="function"==typeof require&&require;if(!p&&a)return a(s,!0);if(r)return r(s,!0);throw new Error("Cannot find module '"+s+"'")}var h=e[s]={exports:{}};n[s][0].call(h.exports,function(t){var e=n[s][1][t];return o(e?e:t)},h,h.exports,t,n,e,i)}return e[s].exports}for(var r="function"==typeof require&&require,s=0;s=n.value)return this.search_node_=n,n}else for(;n=n.next;)if(tn)for(;(e=e.prev)&&t!==e.point;);else for(;(e=e.next)&&t!==e.point;);return e&&(this.search_node_=e),e},n.exports=i,n.exports.Node=e},{}],3:[function(t,n){"use strict";function e(t,n){if(!t)throw new Error(n||"Assert Failed")}n.exports=e},{}],4:[function(t,n){"use strict";var e=t("./xy"),i=function(t,n){this.x=+t||0,this.y=+n||0,this._p2t_edge_list=null};i.prototype.toString=function(){return e.toStringBase(this)},i.prototype.toJSON=function(){return{x:this.x,y:this.y}},i.prototype.clone=function(){return new i(this.x,this.y)},i.prototype.set_zero=function(){return this.x=0,this.y=0,this},i.prototype.set=function(t,n){return this.x=+t||0,this.y=+n||0,this},i.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},i.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},i.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},i.prototype.mul=function(t){return this.x*=t,this.y*=t,this},i.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},i.prototype.normalize=function(){var t=this.length();return this.x/=t,this.y/=t,t},i.prototype.equals=function(t){return this.x===t.x&&this.y===t.y},i.negate=function(t){return new i(-t.x,-t.y)},i.add=function(t,n){return new i(t.x+n.x,t.y+n.y)},i.sub=function(t,n){return new i(t.x-n.x,t.y-n.y)},i.mul=function(t,n){return new i(t*n.x,t*n.y)},i.cross=function(t,n){return"number"==typeof t?"number"==typeof n?t*n:new i(-t*n.y,t*n.x):"number"==typeof n?new i(n*t.y,-n*t.x):t.x*n.y-t.y*n.x},i.toString=e.toString,i.compare=e.compare,i.cmp=e.compare,i.equals=e.equals,i.dot=function(t,n){return t.x*n.x+t.y*n.y},n.exports=i},{"./xy":11}],5:[function(t,n){"use strict";var e=t("./xy"),i=function(t,n){this.name="PointError",this.points=n=n||[],this.message=t||"Invalid Points!";for(var i=0;in;++n)for(var i=t.getPoint(n),o=s(t,i),r=i._p2t_edge_list,a=0;r&&an.q.x,h(e.triangle,n.p,n.q)||(C(t,n,e),a(t,n.p,n.q,e.triangle,n.q))}function a(t,n,e,i,o){if(!h(i,n,e)){var r=i.pointCCW(o),s=z(e,r,n);if(s===M.COLLINEAR)throw new D("poly2tri EdgeEvent: Collinear not supported!",[e,r,n]);var p=i.pointCW(o),u=z(e,p,n);if(u===M.COLLINEAR)throw new D("poly2tri EdgeEvent: Collinear not supported!",[e,p,n]);s===u?(i=s===M.CW?i.neighborCCW(o):i.neighborCW(o),a(t,n,e,i,o)):q(t,n,e,i,o)}}function h(t,n,e){var i=t.edgeIndex(n,e);if(-1!==i){t.markConstrainedEdgeByIndex(i);var o=t.getNeighbor(i);return o&&o.markConstrainedEdgeByPoints(n,e),!0}return!1}function u(t,n,e){var i=new O(n,e.point,e.next.point);i.markNeighbor(e.triangle),t.addToMap(i);var o=new B(n);return o.next=e.next,o.prev=e,e.next.prev=o,e.next=o,l(t,i)||t.mapTriangleToNodes(i),o}function d(t,n){var e=new O(n.prev.point,n.point,n.next.point);e.markNeighbor(n.prev.triangle),e.markNeighbor(n.triangle),t.addToMap(e),n.prev.next=n.next,n.next.prev=n.prev,l(t,e)||t.mapTriangleToNodes(e)}function g(t,n){for(var e=n.next;e.next&&!j(e.point,e.next.point,e.prev.point);)d(t,e),e=e.next;for(e=n.prev;e.prev&&!j(e.point,e.next.point,e.prev.point);)d(t,e),e=e.prev;n.next&&n.next.next&&f(n)&&y(t,n)}function f(t){var n=t.point.x-t.next.next.point.x,e=t.point.y-t.next.next.point.y;return S(e>=0,"unordered y"),n>=0||Math.abs(n)e;++e)if(!n.delaunay_edge[e]){var i=n.getNeighbor(e);if(i){var o=n.getPoint(e),r=i.oppositePoint(n,o),s=i.index(r);if(i.constrained_edge[s]||i.delaunay_edge[s]){n.constrained_edge[e]=i.constrained_edge[s];continue}var p=c(o,n.pointCCW(o),n.pointCW(o),r);if(p){n.delaunay_edge[e]=!0,i.delaunay_edge[s]=!0,_(n,o,i,r);var a=!l(t,n);return a&&t.mapTriangleToNodes(n),a=!l(t,i),a&&t.mapTriangleToNodes(i),n.delaunay_edge[e]=!1,i.delaunay_edge[s]=!1,!0}}}return!1}function c(t,n,e,i){var o=t.x-i.x,r=t.y-i.y,s=n.x-i.x,p=n.y-i.y,a=o*p,h=s*r,u=a-h;if(0>=u)return!1;var d=e.x-i.x,g=e.y-i.y,f=d*r,l=o*g,c=f-l;if(0>=c)return!1;var _=s*g,y=d*p,x=o*o+r*r,v=s*s+p*p,C=d*d+g*g,b=x*(_-y)+v*c+C*u;return b>0}function _(t,n,e,i){var o,r,s,p;o=t.neighborCCW(n),r=t.neighborCW(n),s=e.neighborCCW(i),p=e.neighborCW(i);var a,h,u,d;a=t.getConstrainedEdgeCCW(n),h=t.getConstrainedEdgeCW(n),u=e.getConstrainedEdgeCCW(i),d=e.getConstrainedEdgeCW(i);var g,f,l,c;g=t.getDelaunayEdgeCCW(n),f=t.getDelaunayEdgeCW(n),l=e.getDelaunayEdgeCCW(i),c=e.getDelaunayEdgeCW(i),t.legalize(n,i),e.legalize(i,n),e.setDelaunayEdgeCCW(n,g),t.setDelaunayEdgeCW(n,f),t.setDelaunayEdgeCCW(i,l),e.setDelaunayEdgeCW(i,c),e.setConstrainedEdgeCCW(n,a),t.setConstrainedEdgeCW(n,h),t.setConstrainedEdgeCCW(i,u),e.setConstrainedEdgeCW(i,d),t.clearNeighbors(),e.clearNeighbors(),o&&e.markNeighbor(o),r&&t.markNeighbor(r),s&&t.markNeighbor(s),p&&e.markNeighbor(p),t.markNeighbor(e)}function y(t,n){for(t.basin.left_node=z(n.point,n.next.point,n.next.next.point)===M.CCW?n.next.next:n.next,t.basin.bottom_node=t.basin.left_node;t.basin.bottom_node.next&&t.basin.bottom_node.point.y>=t.basin.bottom_node.next.point.y;)t.basin.bottom_node=t.basin.bottom_node.next;if(t.basin.bottom_node!==t.basin.left_node){for(t.basin.right_node=t.basin.bottom_node;t.basin.right_node.next&&t.basin.right_node.point.yt.basin.right_node.point.y,x(t,t.basin.bottom_node))}}function x(t,n){if(!v(t,n)){d(t,n);var e;if(n.prev!==t.basin.left_node||n.next!==t.basin.right_node){if(n.prev===t.basin.left_node){if(e=z(n.point,n.next.point,n.next.next.point),e===M.CW)return;n=n.next}else if(n.next===t.basin.right_node){if(e=z(n.point,n.prev.point,n.prev.prev.point),e===M.CCW)return;n=n.prev}else n=n.prev.point.ye?!0:!1}function C(t,n,e){t.edge_event.right?b(t,n,e):E(t,n,e)}function b(t,n,e){for(;e.next.point.xn.p.x;)z(n.q,e.prev.point,n.p)===M.CW?P(t,n,e):e=e.prev}function P(t,n,e){e.point.x>n.p.x&&(z(e.point,e.prev.point,e.prev.prev.point)===M.CW?T(t,n,e):(N(t,n,e),P(t,n,e)))}function N(t,n,e){z(e.prev.point,e.prev.prev.point,e.prev.prev.prev.point)===M.CW?T(t,n,e.prev):z(n.q,e.prev.prev.point,n.p)===M.CW&&N(t,n,e.prev)}function T(t,n,e){d(t,e.prev),e.prev.point!==n.p&&z(n.q,e.prev.point,n.p)===M.CW&&z(e.point,e.prev.point,e.prev.prev.point)===M.CW&&T(t,n,e)}function q(t,n,e,i,o){var r=i.neighborAcross(o);S(r,"FLIP failed due to missing triangle!");var s=r.oppositePoint(i,o);if(i.getConstrainedEdgeAcross(o)){var p=i.index(o);throw new D("poly2tri Intersecting Constraints",[o,s,i.getPoint((p+1)%3),i.getPoint((p+2)%3)])}if(H(o,i.pointCCW(o),i.pointCW(o),s))if(_(i,o,r,s),t.mapTriangleToNodes(i),t.mapTriangleToNodes(r),o===e&&s===n)e===t.edge_event.constrained_edge.q&&n===t.edge_event.constrained_edge.p&&(i.markConstrainedEdgeByPoints(n,e),r.markConstrainedEdgeByPoints(n,e),l(t,i),l(t,r));else{var h=z(e,s,n);i=I(t,h,i,r,o,s),q(t,n,e,i,o)}else{var u=k(n,e,r,s);A(t,n,e,i,r,u),a(t,n,e,i,o)}}function I(t,n,e,i,o,r){var s;return n===M.CCW?(s=i.edgeIndex(o,r),i.delaunay_edge[s]=!0,l(t,i),i.clearDelaunayEdges(),e):(s=e.edgeIndex(o,r),e.delaunay_edge[s]=!0,l(t,e),e.clearDelaunayEdges(),i)}function k(t,n,e,i){var o=z(n,i,t);if(o===M.CW)return e.pointCCW(i);if(o===M.CCW)return e.pointCW(i);throw new D("poly2tri [Unsupported] nextFlipPoint: opposing point on constrained edge!",[n,i,t])}function A(t,n,e,i,o,r){var s=o.neighborAcross(r);S(s,"FLIP failed due to missing triangle");var p=s.oppositePoint(o,r);if(H(e,i.pointCCW(e),i.pointCW(e),p))q(t,e,p,s,p);else{var a=k(n,e,s,p);A(t,n,e,i,s,a)}}var S=t("./assert"),D=t("./pointerror"),O=t("./triangle"),B=t("./advancingfront").Node,L=t("./utils"),F=L.EPSILON,M=L.Orientation,z=L.orient2d,H=L.inScanArea,j=L.isAngleObtuse;e.triangulate=i},{"./advancingfront":2,"./assert":3,"./pointerror":5,"./triangle":9,"./utils":10}],8:[function(t,n){"use strict";var e=t("./pointerror"),i=t("./point"),o=t("./triangle"),r=t("./sweep"),s=t("./advancingfront"),p=s.Node,a=.3,h=function(t,n){if(this.p=t,this.q=n,t.y>n.y)this.q=t,this.p=n;else if(t.y===n.y)if(t.x>n.x)this.q=t,this.p=n;else if(t.x===n.x)throw new e("poly2tri Invalid Edge constructor: repeated points!",[t]);this.q._p2t_edge_list||(this.q._p2t_edge_list=[]),this.q._p2t_edge_list.push(this)},u=function(){this.left_node=null,this.bottom_node=null,this.right_node=null,this.width=0,this.left_highest=!1};u.prototype.clear=function(){this.left_node=null,this.bottom_node=null,this.right_node=null,this.width=0,this.left_highest=!1};var d=function(){this.constrained_edge=null,this.right=!1},g=function(t,n){n=n||{},this.triangles_=[],this.map_=[],this.points_=n.cloneArrays?t.slice(0):t,this.edge_list=[],this.pmin_=this.pmax_=null,this.front_=null,this.head_=null,this.tail_=null,this.af_head_=null,this.af_middle_=null,this.af_tail_=null,this.basin=new u,this.edge_event=new d,this.initEdges(this.points_)};g.prototype.addHole=function(t){this.initEdges(t);var n,e=t.length;for(n=0;e>n;n++)this.points_.push(t[n]);return this},g.prototype.AddHole=g.prototype.addHole,g.prototype.addHoles=function(t){var n,e=t.length;for(n=0;e>n;n++)this.initEdges(t[n]);return this.points_=this.points_.concat.apply(this.points_,t),this},g.prototype.addPoint=function(t){return this.points_.push(t),this},g.prototype.AddPoint=g.prototype.addPoint,g.prototype.addPoints=function(t){return this.points_=this.points_.concat(t),this},g.prototype.triangulate=function(){return r.triangulate(this),this},g.prototype.getBoundingBox=function(){return{min:this.pmin_,max:this.pmax_}},g.prototype.getTriangles=function(){return this.triangles_},g.prototype.GetTriangles=g.prototype.getTriangles,g.prototype.front=function(){return this.front_},g.prototype.pointCount=function(){return this.points_.length},g.prototype.head=function(){return this.head_},g.prototype.setHead=function(t){this.head_=t},g.prototype.tail=function(){return this.tail_},g.prototype.setTail=function(t){this.tail_=t},g.prototype.getMap=function(){return this.map_},g.prototype.initTriangulation=function(){var t,n=this.points_[0].x,e=this.points_[0].x,o=this.points_[0].y,r=this.points_[0].y,s=this.points_.length;for(t=1;s>t;t++){var p=this.points_[t];p.x>n&&(n=p.x),p.xo&&(o=p.y),p.yn;++n)this.edge_list.push(new h(t[n],t[(n+1)%e]))},g.prototype.getPoint=function(t){return this.points_[t]},g.prototype.addToMap=function(t){this.map_.push(t)},g.prototype.locateNode=function(t){return this.front_.locateNode(t.x)},g.prototype.createAdvancingFront=function(){var t,n,e,i=new o(this.points_[0],this.tail_,this.head_);this.map_.push(i),t=new p(i.getPoint(1),i),n=new p(i.getPoint(0),i),e=new p(i.getPoint(2)),this.front_=new s(t,e),t.next=n,n.next=e,n.prev=t,e.prev=n},g.prototype.removeNode=function(){},g.prototype.mapTriangleToNodes=function(t){for(var n=0;3>n;++n)if(!t.getNeighbor(n)){var e=this.front_.locatePoint(t.pointCW(t.getPoint(n)));e&&(e.triangle=t)}},g.prototype.removeFromMap=function(t){var n,e=this.map_,i=e.length;for(n=0;i>n;n++)if(e[n]===t){e.splice(n,1);break}},g.prototype.meshClean=function(t){for(var n,e,i=[t];n=i.pop();)if(!n.isInterior())for(n.setInterior(!0),this.triangles_.push(n),e=0;3>e;e++)n.constrained_edge[e]||i.push(n.getNeighbor(e))},n.exports=g},{"./advancingfront":2,"./point":4,"./pointerror":5,"./sweep":7,"./triangle":9}],9:[function(t,n){"use strict";var e=t("./xy"),i=function(t,n,e){this.points_=[t,n,e],this.neighbors_=[null,null,null],this.interior_=!1,this.constrained_edge=[!1,!1,!1],this.delaunay_edge=[!1,!1,!1]},o=e.toString;i.prototype.toString=function(){return"["+o(this.points_[0])+o(this.points_[1])+o(this.points_[2])+"]"},i.prototype.getPoint=function(t){return this.points_[t]},i.prototype.GetPoint=i.prototype.getPoint,i.prototype.getPoints=function(){return this.points_},i.prototype.getNeighbor=function(t){return this.neighbors_[t]},i.prototype.containsPoint=function(t){var n=this.points_;return t===n[0]||t===n[1]||t===n[2]},i.prototype.containsEdge=function(t){return this.containsPoint(t.p)&&this.containsPoint(t.q)},i.prototype.containsPoints=function(t,n){return this.containsPoint(t)&&this.containsPoint(n)},i.prototype.isInterior=function(){return this.interior_},i.prototype.setInterior=function(t){return this.interior_=t,this},i.prototype.markNeighborPointers=function(t,n,e){var i=this.points_;if(t===i[2]&&n===i[1]||t===i[1]&&n===i[2])this.neighbors_[0]=e;else if(t===i[0]&&n===i[2]||t===i[2]&&n===i[0])this.neighbors_[1]=e;else{if(!(t===i[0]&&n===i[1]||t===i[1]&&n===i[0]))throw new Error("poly2tri Invalid Triangle.markNeighborPointers() call");this.neighbors_[2]=e}},i.prototype.markNeighbor=function(t){var n=this.points_;t.containsPoints(n[1],n[2])?(this.neighbors_[0]=t,t.markNeighborPointers(n[1],n[2],this)):t.containsPoints(n[0],n[2])?(this.neighbors_[1]=t,t.markNeighborPointers(n[0],n[2],this)):t.containsPoints(n[0],n[1])&&(this.neighbors_[2]=t,t.markNeighborPointers(n[0],n[1],this))},i.prototype.clearNeighbors=function(){this.neighbors_[0]=null,this.neighbors_[1]=null,this.neighbors_[2]=null},i.prototype.clearDelaunayEdges=function(){this.delaunay_edge[0]=!1,this.delaunay_edge[1]=!1,this.delaunay_edge[2]=!1},i.prototype.pointCW=function(t){var n=this.points_;return t===n[0]?n[2]:t===n[1]?n[0]:t===n[2]?n[1]:null},i.prototype.pointCCW=function(t){var n=this.points_;return t===n[0]?n[1]:t===n[1]?n[2]:t===n[2]?n[0]:null},i.prototype.neighborCW=function(t){return t===this.points_[0]?this.neighbors_[1]:t===this.points_[1]?this.neighbors_[2]:this.neighbors_[0]},i.prototype.neighborCCW=function(t){return t===this.points_[0]?this.neighbors_[2]:t===this.points_[1]?this.neighbors_[0]:this.neighbors_[1]},i.prototype.getConstrainedEdgeCW=function(t){return t===this.points_[0]?this.constrained_edge[1]:t===this.points_[1]?this.constrained_edge[2]:this.constrained_edge[0]},i.prototype.getConstrainedEdgeCCW=function(t){return t===this.points_[0]?this.constrained_edge[2]:t===this.points_[1]?this.constrained_edge[0]:this.constrained_edge[1]},i.prototype.getConstrainedEdgeAcross=function(t){return t===this.points_[0]?this.constrained_edge[0]:t===this.points_[1]?this.constrained_edge[1]:this.constrained_edge[2]},i.prototype.setConstrainedEdgeCW=function(t,n){t===this.points_[0]?this.constrained_edge[1]=n:t===this.points_[1]?this.constrained_edge[2]=n:this.constrained_edge[0]=n},i.prototype.setConstrainedEdgeCCW=function(t,n){t===this.points_[0]?this.constrained_edge[2]=n:t===this.points_[1]?this.constrained_edge[0]=n:this.constrained_edge[1]=n},i.prototype.getDelaunayEdgeCW=function(t){return t===this.points_[0]?this.delaunay_edge[1]:t===this.points_[1]?this.delaunay_edge[2]:this.delaunay_edge[0]},i.prototype.getDelaunayEdgeCCW=function(t){return t===this.points_[0]?this.delaunay_edge[2]:t===this.points_[1]?this.delaunay_edge[0]:this.delaunay_edge[1]},i.prototype.setDelaunayEdgeCW=function(t,n){t===this.points_[0]?this.delaunay_edge[1]=n:t===this.points_[1]?this.delaunay_edge[2]=n:this.delaunay_edge[0]=n},i.prototype.setDelaunayEdgeCCW=function(t,n){t===this.points_[0]?this.delaunay_edge[2]=n:t===this.points_[1]?this.delaunay_edge[0]=n:this.delaunay_edge[1]=n},i.prototype.neighborAcross=function(t){return t===this.points_[0]?this.neighbors_[0]:t===this.points_[1]?this.neighbors_[1]:this.neighbors_[2]},i.prototype.oppositePoint=function(t,n){var e=t.pointCW(n);return this.pointCW(e)},i.prototype.legalize=function(t,n){var e=this.points_;if(t===e[0])e[1]=e[0],e[0]=e[2],e[2]=n;else if(t===e[1])e[2]=e[1],e[1]=e[0],e[0]=n;else{if(t!==e[2])throw new Error("poly2tri Invalid Triangle.legalize() call");e[0]=e[2],e[2]=e[1],e[1]=n}},i.prototype.index=function(t){var n=this.points_;if(t===n[0])return 0;if(t===n[1])return 1;if(t===n[2])return 2;throw new Error("poly2tri Invalid Triangle.index() call")},i.prototype.edgeIndex=function(t,n){var e=this.points_;if(t===e[0]){if(n===e[1])return 2;if(n===e[2])return 1}else if(t===e[1]){if(n===e[2])return 0;if(n===e[0])return 2}else if(t===e[2]){if(n===e[0])return 1;if(n===e[1])return 0}return-1},i.prototype.markConstrainedEdgeByIndex=function(t){this.constrained_edge[t]=!0},i.prototype.markConstrainedEdgeByEdge=function(t){this.markConstrainedEdgeByPoints(t.p,t.q)},i.prototype.markConstrainedEdgeByPoints=function(t,n){var e=this.points_;n===e[0]&&t===e[1]||n===e[1]&&t===e[0]?this.constrained_edge[2]=!0:n===e[0]&&t===e[2]||n===e[2]&&t===e[0]?this.constrained_edge[1]=!0:(n===e[1]&&t===e[2]||n===e[2]&&t===e[1])&&(this.constrained_edge[0]=!0)},n.exports=i},{"./xy":11}],10:[function(t,n,e){"use strict";function i(t,n,e){var i=(t.x-e.x)*(n.y-e.y),o=(t.y-e.y)*(n.x-e.x),r=i-o;return r>-s&&s>r?p.COLLINEAR:r>0?p.CCW:p.CW}function o(t,n,e,i){var o=(t.x-n.x)*(i.y-n.y)-(i.x-n.x)*(t.y-n.y);if(o>=-s)return!1;var r=(t.x-e.x)*(i.y-e.y)-(i.x-e.x)*(t.y-e.y);return s>=r?!1:!0}function r(t,n,e){var i=n.x-t.x,o=n.y-t.y,r=e.x-t.x,s=e.y-t.y;return 0>i*r+o*s}var s=1e-12;e.EPSILON=s;var p={CW:1,CCW:-1,COLLINEAR:0};e.Orientation=p,e.orient2d=i,e.inScanArea=o,e.isAngleObtuse=r},{}],11:[function(t,n){"use strict";function e(t){return"("+t.x+";"+t.y+")"}function i(t){var n=t.toString();return"[object Object]"===n?e(t):n}function o(t,n){return t.y===n.y?t.x-n.x:t.y-n.y}function r(t,n){return t.x===n.x&&t.y===n.y}n.exports={toString:i,toStringBase:e,compare:o,equals:r}},{}]},{},[6])(6)});
\ No newline at end of file
diff --git a/static/Demos/Polygon/polygon.js b/static/Demos/Polygon/polygon.js
deleted file mode 100644
index 0b4ae8b82..000000000
--- a/static/Demos/Polygon/polygon.js
+++ /dev/null
@@ -1,56 +0,0 @@
-var CreatePolygonScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(20, 100, 2), scene);
-
- camera.setPosition(new BABYLON.Vector3(-20, 20, -10));
-
- var birdData = "4.57998 4.03402 4.06435 4.06435 3.51839 4.21601 3.09376 4.42832 2.60846 4.57998 2.09284 4.7013 1.51655 4.82263 0.909929 4.94395 \
-0.242648 5.06527 -0.30331 5.0956 -1.15258 5.12594 -1.72887 5.12594 -2.48714 5.12594 -2.85111 5.03494 -3.36674 5.30792 -3.70038 5.52024 \
--4.15534 5.9752 -4.7013 6.27851 -5.0956 6.61215 -5.73255 6.67281 -6.55149 6.73348 -6.88513 6.61215 -7.46142 6.36951 -7.88605 6.18752 \
--8.25003 5.91454 -8.64433 5.61123 -8.88698 5.30792 -9.06896 5.00461 -9.25095 4.88329 -9.94856 4.73163 -10.6462 4.64064 -11.1011 4.54965 \
--11.3741 4.42832 -11.5561 4.21601 -11.0101 4.21601 -10.1305 3.94303 -9.61492 3.73071 -9.15996 3.4274 -8.73532 3.00277 -8.34102 2.6388 \
--7.97705 2.36582 -7.61308 2.03218 -7.18844 1.45589 -6.79414 1.12225 -6.64248 0.788605 -6.36951 0.242648 -6.24818 -0.212317 -6.00553 -0.515627 \
--5.73255 -0.818936 -5.24726 -1.2739 -4.7923 -1.60754 -4.42832 -2.00184 -3.67005 -2.21416 -3.18475 -2.39615 -2.5478 -2.69946 \
--1.91085 -2.79045 -1.06158 -2.88144 -0.333641 -2.88144 0.242648 -2.85111 0.94026 -2.82078 1.2739 -2.85111 1.42556 -3.0331 \
-1.42556 -3.30608 1.33456 -3.57905 1.15258 -4.00369 1.03125 -4.57998 0.849267 -5.15627 0.63695 -5.5809 0.30331 -5.91454 \
-0.060662 -6.15719 -0.333641 -6.27851 -0.697612 -6.27851 -1.15258 -6.36951 -1.57721 -6.39984 -2.09284 -6.52116 -2.36582 -6.79414 \
--2.48714 -7.06712 -2.18383 -6.97612 -1.85019 -6.79414 -1.42556 -6.76381 -1.15258 -6.79414 -1.36489 -6.88513 -1.69853 -6.97612 \
--1.97151 -7.12778 -2.12317 -7.37043 -2.27482 -7.64341 -2.39615 -7.91639 -2.36582 -8.21969 -2.03218 -7.85572 -1.81986 -7.7344 \
--1.57721 -7.67374 -1.36489 -7.49175 -1.21324 -7.40076 -0.849267 -7.2491 -0.60662 -7.12778 -0.242648 -6.91546 0.030331 -6.70315 \
-0.363972 -6.4605 0.242648 -6.61215 0.152837 -6.72007 -0.092855 -6.88818 -0.506653 -7.15974 -0.765276 -7.31491 -1.01097 -7.41836 \
--1.16614 -7.5606 -1.32132 -7.71577 -1.45063 -7.81922 -1.50235 -8.06492 -1.50235 -8.29768 -1.46356 -8.53044 -1.38597 -8.29768 \
--1.28252 -8.05199 -1.14028 -7.87095 -0.985106 -7.84509 -0.817001 -7.84509 -0.623033 -7.70284 -0.390272 -7.52181 -0.105787 -7.31491 \
-0.178699 -7.06922 0.489047 -6.84939 0.670083 -6.66835 0.928707 -6.47438 1.16147 -6.33214 1.47182 -6.13817 1.82096 -5.91834 \
-2.04079 -5.84076 2.15717 -5.71144 2.18303 -5.45282 2.06665 -5.28472 1.87268 -5.3623 1.49768 -5.63386 1.22612 -5.81489 1.03216 -5.91834 \
-0.876982 -5.95714 0.954569 -5.80196 1.00629 -5.60799 1.16147 -5.29765 1.3425 -4.9873 1.45888 -4.65109 1.47182 -4.4054 1.73044 -3.95281 \
-1.84682 -3.6166 1.98906 -3.30625 2.14424 -2.95711 2.26062 -2.75021 2.42872 -2.59503 2.63562 -2.50452 2.98476 -2.51745 3.12701 -2.71141 \
-3.06235 -3.09935 2.9589 -3.4097 2.86838 -3.75884 2.79079 -4.12091 2.70028 -4.43126 2.55803 -4.75454 2.48045 -5.03902 2.3382 -5.37523 \
-2.29941 -5.59506 2.23475 -5.90541 2.11837 -6.21576 1.7951 -6.65542 1.39423 -7.05628 1.09681 -7.26318 0.838188 -7.37956 \
-0.41146 -7.49594 -0.002337 -7.62526 -0.416135 -7.7675 -0.687689 -8.05199 -0.907519 -8.40113 -0.70062 -8.19423 -0.312685 -8.05199 \
--0.015268 -7.89681 0.217493 -7.89681 0.243355 -7.90974 0.023525 -8.1425 -0.157511 -8.25888 -0.403203 -8.43992 -0.648896 -8.75027 \
--0.778207 -8.90544 -0.881657 -9.18993 -0.80407 -9.60372 -0.597171 -9.177 -0.14458 -8.9701 0.269217 -8.62096 0.695946 -8.28475 1.13561 -8.00026 \
-1.52354 -7.62526 1.82096 -7.26318 1.95027 -7.09508 1.9632 -7.15974 1.66578 -7.58646 1.45888 -7.84509 1.13561 -8.20716 0.760601 -8.65975 \
-0.450253 -8.99596 0.269217 -9.28045 0.126974 -9.65545 0.19163 -10.2761 0.333873 -9.84942 0.63129 -9.68131 0.980431 -9.26751 1.26492 -8.72441 \
-1.60113 -8.31061 1.98906 -7.7675 2.36407 -7.34077 2.79079 -7.00456 3.13994 -6.7718 3.68304 -6.46145 4.14857 -6.33214 4.7434 -6.09938 \
-5.19599 -6.13817 4.85978 -5.87955 4.29081 -5.76317 3.77356 -5.81489 3.34683 -6.07352 2.77786 -6.47438 2.41579 -6.60369 \
-2.41579 -6.28042 2.59683 -5.84076 2.79079 -5.42696 2.99769 -4.90971 3.25632 -4.30195 3.50201 -3.52608 3.83822 -2.63383 4.07098 -2.40107 \
-4.39426 -2.28469 4.79512 -2.23296 4.54943 -2.02606 4.49771 -1.6252 4.54943 -1.50882 4.91151 -1.50882 5.54513 -1.45709 6.12704 -1.39244 \
-6.85118 -1.32778 7.44601 -1.14674 7.85981 -0.78467 7.79516 -0.409667 7.49774 -0.151043 7.84688 0.042924 8.23481 0.314479 \
-8.64861 0.702414 8.70034 1.09035 8.41585 1.42656 8.11843 1.62053 8.3512 2.06019 8.53223 2.38347 8.67447 2.74554 8.66154 3.22399 \
-8.80379 3.87055 8.90724 4.36193 9.1012 4.85332 9.43741 5.40936 9.90293 6.04298 10.3167 6.58609 10.7047 7.3749 10.9374 7.96973 11.1573 8.40939 \
-11.1573 8.84905 10.9374 9.05595 10.6659 9.28871 10.3426 9.37922 9.99345 9.34043 9.63138 8.97836 9.20465 8.48697 8.86844 8.1249 8.50637 7.72404 \
-8.17016 7.28438 7.74343 6.88351 7.43308 6.5473 7.16153 6.1723 6.70894 5.71971 6.20462 5.25418 5.72617 4.80159 5.13134 4.41366 \
-4.87271 4.16797";
-
-
- var rectangle = BABYLON.Polygon.Rectangle(-15, -15, 15, 15);
- var ground = new BABYLON.PolygonMeshBuilder("ground", rectangle, scene)
- .addHole(BABYLON.Polygon.Parse(birdData))
- .build();
-
- ground.material = new BABYLON.StandardMaterial("mat", scene);
- ground.material.backFaceCulling = false;
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Procedural/demo.js b/static/Demos/Procedural/demo.js
deleted file mode 100644
index f38c42b21..000000000
--- a/static/Demos/Procedural/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateProceduralTextureTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Procedural/index.html b/static/Demos/Procedural/index.html
deleted file mode 100644
index f181841aa..000000000
--- a/static/Demos/Procedural/index.html
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
- Babylon.js - Procedural textures demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Procedural/proceduralTexture.js b/static/Demos/Procedural/proceduralTexture.js
deleted file mode 100644
index dd9d661a6..000000000
--- a/static/Demos/Procedural/proceduralTexture.js
+++ /dev/null
@@ -1,165 +0,0 @@
-var CreateProceduralTextureTestScene = function (engine) {
- //Let's create some helpers
- var CreateBosquet = function (name, x, y, z, scene, shadowGenerator, woodMaterial, grassMaterial) {
- var bosquet = BABYLON.Mesh.CreateBox(name, 2, scene);
- bosquet.position = new BABYLON.Vector3(x, y, z);
- bosquet.material = grassMaterial;
-
- var bosquetbawl = BABYLON.Mesh.CreateBox(name + "bawl", 1, scene);
- bosquetbawl.position = new BABYLON.Vector3(x, y + 1, z);
- bosquetbawl.material = grassMaterial;
-
- shadowGenerator.getShadowMap().renderList.push(bosquet);
- shadowGenerator.getShadowMap().renderList.push(bosquetbawl);
- }
-
- var CreateTree = function (name, x, y, z, scene, shadowGenerator, woodMaterial, grassMaterial) {
- var trunk = BABYLON.Mesh.CreateCylinder(name + "trunk", 7, 2, 2, 12, 1, scene);
- trunk.position = new BABYLON.Vector3(x, y, z);
- trunk.material = woodMaterial;
-
- var leafs = BABYLON.Mesh.CreateSphere(name + "leafs", 20, 7, scene);
- leafs.position = new BABYLON.Vector3(x, y + 5.0, z);
- leafs.material = grassMaterial;
-
- shadowGenerator.getShadowMap().renderList.push(trunk);
- shadowGenerator.getShadowMap().renderList.push(leafs);
- }
-
- var createFontain = function (name, x, y, z, scene, shadowGenerator, marbleMaterial, fireMaterial) {
- var torus = BABYLON.Mesh.CreateTorus("torus", 5, 1, 20, scene);
- torus.position = new BABYLON.Vector3(x, y, z);
- torus.material = marbleMaterial;
-
- var fontainGround = BABYLON.Mesh.CreateBox("fontainGround", 4, scene);
- fontainGround.position = new BABYLON.Vector3(x, y - 2, z);
- fontainGround.material = marbleMaterial;
-
- var fontainSculptur1 = BABYLON.Mesh.CreateCylinder("fontainSculptur1", 2, 2, 1, 10, 1, scene);
- fontainSculptur1.position = new BABYLON.Vector3(x, y, z);
- fontainSculptur1.material = marbleMaterial;
-
- var fontainSculptur2 = BABYLON.Mesh.CreateSphere("fontainSculptur2", 7, 1.7, scene);
- fontainSculptur2.position = new BABYLON.Vector3(x, y + 0.9, z);
- fontainSculptur2.material = fireMaterial;
- fontainSculptur2.rotate(new BABYLON.Vector3(1.0, 0.0, 0.0), Math.PI / 2.0, BABYLON.Space.Local);
-
- shadowGenerator.getShadowMap().renderList.push(torus);
- shadowGenerator.getShadowMap().renderList.push(fontainSculptur1);
- shadowGenerator.getShadowMap().renderList.push(fontainSculptur2);
- }
-
- var createTorch = function (name, x, y, z, scene, shadowGenerator, brickMaterial, woodMaterial, grassMaterial) {
- //createBrickBlock
- var brickblock = BABYLON.Mesh.CreateBox(name + "brickblock", 1, scene);
- brickblock.position = new BABYLON.Vector3(x, y, z);
- brickblock.material = brickMaterial;
-
- //createWood
- var torchwood = BABYLON.Mesh.CreateCylinder(name + "torchwood", 2, 0.25, 0.1, 12, 1, scene);
- torchwood.position = new BABYLON.Vector3(x, y + 1, z);
- torchwood.material = woodMaterial;
-
- //leafs
- var leafs2 = BABYLON.Mesh.CreateSphere(name + "leafs2", 10, 1.2, scene);
- leafs2.position = new BABYLON.Vector3(x, y + 2, z);
- leafs2.material = grassMaterial;
-
- shadowGenerator.getShadowMap().renderList.push(torchwood);
- shadowGenerator.getShadowMap().renderList.push(leafs2);
- shadowGenerator.getShadowMap().renderList.push(brickblock);
- }
-
- //Ok, enough helpers, let the building start
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 1, 1.2, 25, new BABYLON.Vector3(10, 0, 0), scene);
- camera.upperBetaLimit = 1.2;
-
- //Material declaration
- var woodMaterial = new BABYLON.StandardMaterial(name, scene);
- var woodTexture = new BABYLON.WoodProceduralTexture(name + "text", 1024, scene);
- woodTexture.ampScale = 50.0;
- woodMaterial.diffuseTexture = woodTexture;
-
- var grassMaterial = new BABYLON.StandardMaterial(name + "bawl", scene);
- var grassTexture = new BABYLON.GrassProceduralTexture(name + "textbawl", 256, scene);
- grassMaterial.ambientTexture = grassTexture;
-
- var marbleMaterial = new BABYLON.StandardMaterial("torus", scene);
- var marbleTexture = new BABYLON.MarbleProceduralTexture("marble", 512, scene);
- marbleTexture.numberOfBricksHeight = 5;
- marbleTexture.numberOfBricksWidth = 5;
- marbleMaterial.ambientTexture = marbleTexture;
-
- var fireMaterial = new BABYLON.StandardMaterial("fontainSculptur2", scene);
- var fireTexture = new BABYLON.FireProceduralTexture("fire", 256, scene);
- fireMaterial.diffuseTexture = fireTexture;
- fireMaterial.opacityTexture = fireTexture;
-
- var brickMaterial = new BABYLON.StandardMaterial(name, scene);
- var brickTexture = new BABYLON.BrickProceduralTexture(name + "text", 512, scene);
- brickTexture.numberOfBricksHeight = 2;
- brickTexture.numberOfBricksWidth = 3;
- brickMaterial.diffuseTexture = brickTexture;
-
- //light
- var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(-0.5, -1, -0.5), scene);
- light.diffuse = new BABYLON.Color3(1, 1, 1);
- light.specular = new BABYLON.Color3(1, 1, 1);
- light.groundColor = new BABYLON.Color3(0, 0, 0);
- light.position = new BABYLON.Vector3(20, 40, 20);
-
- //Create a square of grass using a custom procedural texture
- var square = BABYLON.Mesh.CreateGround("square", 20, 20, 2, scene);
- square.position = new BABYLON.Vector3(0, 0, 0);
- var customMaterial = new BABYLON.StandardMaterial("custommat", scene);
- var customProcText = new BABYLON.CustomProceduralTexture("customtext", "./land", 1024, scene);
- customMaterial.ambientTexture = customProcText;
- square.material = customMaterial;
-
- //Applying some shadows
- var shadowGenerator = new BABYLON.ShadowGenerator(1024, light);
- shadowGenerator.usePoissonSampling = true;
- shadowGenerator.bias = 0;
- square.receiveShadows = true;
-
- //Creating 4 bosquets
- CreateBosquet("b1", -9, 1, 9, scene, shadowGenerator, woodMaterial, grassMaterial);
- CreateBosquet("b2", -9, 1, -9, scene, shadowGenerator, woodMaterial, grassMaterial);
- CreateBosquet("b3", 9, 1, 9, scene, shadowGenerator, woodMaterial, grassMaterial);
- CreateBosquet("b4", 9, 1, -9, scene, shadowGenerator, woodMaterial, grassMaterial);
-
- CreateTree("a1", 0, 3.5, 0, scene, shadowGenerator, woodMaterial, grassMaterial);
-
- //Creating macadam
- var macadam = BABYLON.Mesh.CreateGround("square", 20, 20, 2, scene);
- macadam.position = new BABYLON.Vector3(20, 0, 0);
- var customMaterialmacadam = new BABYLON.StandardMaterial("macadam", scene);
- var customProcTextmacadam = new BABYLON.RoadProceduralTexture("customtext", 512, scene);
- customMaterialmacadam.diffuseTexture = customProcTextmacadam;
- macadam.material = customMaterialmacadam;
- macadam.receiveShadows = true;
-
- //Creating a fontain
- createFontain("fontain", 20, 0.25, 0, scene, shadowGenerator, marbleMaterial, fireMaterial);
- createTorch("torch1", 15, 0.5, 5, scene, shadowGenerator, brickMaterial, woodMaterial, grassMaterial);
- createTorch("torch2", 15, 0.5, -5, scene, shadowGenerator, brickMaterial, woodMaterial, grassMaterial);
- createTorch("torch3", 25, 0.5, 5, scene, shadowGenerator, brickMaterial, woodMaterial, grassMaterial);
- createTorch("torch4", 25, 0.5, -5, scene, shadowGenerator, brickMaterial, woodMaterial, grassMaterial);
-
- //Using a procedural texture to create the sky
- var boxCloud = BABYLON.Mesh.CreateSphere("boxCloud", 100, 1000, scene);
- boxCloud.position = new BABYLON.Vector3(0, 0, 12);
- var cloudMaterial = new BABYLON.StandardMaterial("cloudMat", scene);
- var cloudProcText = new BABYLON.CloudProceduralTexture("cloud", 1024, scene);
- cloudMaterial.emissiveTexture = cloudProcText;
- cloudMaterial.backFaceCulling = false;
- cloudMaterial.emissiveTexture.coordinatesMode = BABYLON.Texture.FIXED_EQUIRECTANGULAR_MODE;
- boxCloud.material = cloudMaterial;
-
- scene.registerBeforeRender(function () {
- camera.alpha += 0.001 * scene.getAnimationRatio();
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/RefProbe/demo.js b/static/Demos/RefProbe/demo.js
deleted file mode 100644
index 5564741df..000000000
--- a/static/Demos/RefProbe/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateReflectionProbeTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/RefProbe/index.html b/static/Demos/RefProbe/index.html
deleted file mode 100644
index 6e72ecf7d..000000000
--- a/static/Demos/RefProbe/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Reflection Probe demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/RefProbe/reflectionProbe.js b/static/Demos/RefProbe/reflectionProbe.js
deleted file mode 100644
index 9a540acbe..000000000
--- a/static/Demos/RefProbe/reflectionProbe.js
+++ /dev/null
@@ -1,91 +0,0 @@
-var CreateReflectionProbeTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
-
- var camera = new BABYLON.ArcRotateCamera("camera1", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
-
- camera.setPosition(new BABYLON.Vector3(0, 5, -10));
-
- camera.upperBetaLimit = Math.PI / 2;
- camera.lowerRadiusLimit = 4;
-
- var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
- light.intensity = 0.7;
-
- var knot = BABYLON.Mesh.CreateTorusKnot("knot", 1, 0.4, 128, 64, 2, 3, scene);
-
- var yellowSphere = BABYLON.Mesh.CreateSphere("yellowSphere", 16, 1.5, scene);
- yellowSphere.setPreTransformMatrix(BABYLON.Matrix.Translation(3, 0, 0));
-
- var blueSphere = BABYLON.Mesh.CreateSphere("blueSphere", 16, 1.5, scene);
- blueSphere.setPreTransformMatrix(BABYLON.Matrix.Translation(-1, 3, 0));
-
- var greenSphere = BABYLON.Mesh.CreateSphere("greenSphere", 16, 1.5, scene);
- greenSphere.setPreTransformMatrix(BABYLON.Matrix.Translation(0, 0, 3));
-
- var generateSatelliteMaterial = function (root, color, others) {
- var material = new BABYLON.StandardMaterial("satelliteMat" + root.name, scene);
- material.diffuseColor = color;
- var probe = new BABYLON.ReflectionProbe("satelliteProbe" + root.name, 512, scene);
- for (var index = 0; index < others.length; index++) {
- probe.renderList.push(others[index]);
- }
-
- material.reflectionTexture = probe.cubeTexture;
-
- material.reflectionFresnelParameters = new BABYLON.FresnelParameters();
- material.reflectionFresnelParameters.bias = 0.02;
-
- root.material = material;
- probe.attachToMesh(root);
- }
-
- // Mirror
- var mirror = BABYLON.Mesh.CreateBox("Mirror", 1.0, scene);
- mirror.scaling = new BABYLON.Vector3(100.0, 0.01, 100.0);
- mirror.material = new BABYLON.StandardMaterial("mirror", scene);
- mirror.material.diffuseTexture = new BABYLON.Texture("../../assets/amiga.jpg", scene);
- mirror.material.diffuseTexture.uScale = 10;
- mirror.material.diffuseTexture.vScale = 10;
- mirror.material.reflectionTexture = new BABYLON.MirrorTexture("mirror", 1024, scene, true);
- mirror.material.reflectionTexture.mirrorPlane = new BABYLON.Plane(0, -1.0, 0, -2.0);
- mirror.material.reflectionTexture.renderList = [greenSphere, yellowSphere, blueSphere, knot];
- mirror.material.reflectionTexture.level = 0.5;
- mirror.position = new BABYLON.Vector3(0, -2, 0);
-
- // Main material
- var mainMaterial = new BABYLON.StandardMaterial("main", scene);
- knot.material = mainMaterial;
-
- var probe = new BABYLON.ReflectionProbe("main", 512, scene);
- probe.renderList.push(yellowSphere);
- probe.renderList.push(greenSphere);
- probe.renderList.push(blueSphere);
- probe.renderList.push(mirror);
- mainMaterial.diffuseColor = new BABYLON.Color3(1, 0.5, 0.5);
- mainMaterial.reflectionTexture = probe.cubeTexture;
- mainMaterial.reflectionFresnelParameters = new BABYLON.FresnelParameters();
- mainMaterial.reflectionFresnelParameters.bias = 0.02;
-
- // Satellite
- generateSatelliteMaterial(yellowSphere, BABYLON.Color3.Yellow(), [greenSphere, blueSphere, knot, mirror]);
- generateSatelliteMaterial(greenSphere, BABYLON.Color3.Green(), [yellowSphere, blueSphere, knot, mirror]);
- generateSatelliteMaterial(blueSphere, BABYLON.Color3.Blue(), [greenSphere, yellowSphere, knot, mirror]);
-
- yellowSphere.material.alpha = 0.8;
-
- // Fog
- scene.fogMode = BABYLON.Scene.FOGMODE_LINEAR;
- scene.fogColor = scene.clearColor;
- scene.fogStart = 20.0;
- scene.fogEnd = 50.0;
-
- // Animations
- scene.registerBeforeRender(function () {
- yellowSphere.rotation.y += 0.01;
- greenSphere.rotation.y += 0.01;
- blueSphere.rotation.y += 0.01;
- });
-
-
- return scene;
-};
diff --git a/static/Demos/Refraction/dat.gui.min.js b/static/Demos/Refraction/dat.gui.min.js
deleted file mode 100644
index faeb6a7af..000000000
--- a/static/Demos/Refraction/dat.gui.min.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * dat-gui JavaScript Controller Library
- * http://code.google.com/p/dat-gui
- *
- * Copyright 2011 Data Arts Team, Google Creative Lab
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- */
-var dat=dat||{};dat.gui=dat.gui||{};dat.utils=dat.utils||{};dat.controllers=dat.controllers||{};dat.dom=dat.dom||{};dat.color=dat.color||{};dat.utils.css=function(){return{load:function(f,a){a=a||document;var d=a.createElement("link");d.type="text/css";d.rel="stylesheet";d.href=f;a.getElementsByTagName("head")[0].appendChild(d)},inject:function(f,a){a=a||document;var d=document.createElement("style");d.type="text/css";d.innerHTML=f;a.getElementsByTagName("head")[0].appendChild(d)}}}();
-dat.utils.common=function(){var f=Array.prototype.forEach,a=Array.prototype.slice;return{BREAK:{},extend:function(d){this.each(a.call(arguments,1),function(a){for(var c in a)this.isUndefined(a[c])||(d[c]=a[c])},this);return d},defaults:function(d){this.each(a.call(arguments,1),function(a){for(var c in a)this.isUndefined(d[c])&&(d[c]=a[c])},this);return d},compose:function(){var d=a.call(arguments);return function(){for(var e=a.call(arguments),c=d.length-1;0<=c;c--)e=[d[c].apply(this,e)];return e[0]}},
-each:function(a,e,c){if(a)if(f&&a.forEach&&a.forEach===f)a.forEach(e,c);else if(a.length===a.length+0)for(var b=0,p=a.length;bthis.__max&&(a=this.__max);void 0!==this.__step&&0!=a%this.__step&&(a=Math.round(a/this.__step)*this.__step);return e.superclass.prototype.setValue.call(this,a)},min:function(a){this.__min=a;return this},max:function(a){this.__max=a;return this},step:function(a){this.__impliedStep=this.__step=a;this.__precision=d(a);return this}});return e}(dat.controllers.Controller,dat.utils.common);
-dat.controllers.NumberControllerBox=function(f,a,d){var e=function(c,b,f){function q(){var a=parseFloat(n.__input.value);d.isNaN(a)||n.setValue(a)}function l(a){var b=u-a.clientY;n.setValue(n.getValue()+b*n.__impliedStep);u=a.clientY}function r(){a.unbind(window,"mousemove",l);a.unbind(window,"mouseup",r)}this.__truncationSuspended=!1;e.superclass.call(this,c,b,f);var n=this,u;this.__input=document.createElement("input");this.__input.setAttribute("type","text");a.bind(this.__input,"change",q);a.bind(this.__input,
-"blur",function(){q();n.__onFinishChange&&n.__onFinishChange.call(n,n.getValue())});a.bind(this.__input,"mousedown",function(b){a.bind(window,"mousemove",l);a.bind(window,"mouseup",r);u=b.clientY});a.bind(this.__input,"keydown",function(a){13===a.keyCode&&(n.__truncationSuspended=!0,this.blur(),n.__truncationSuspended=!1)});this.updateDisplay();this.domElement.appendChild(this.__input)};e.superclass=f;d.extend(e.prototype,f.prototype,{updateDisplay:function(){var a=this.__input,b;if(this.__truncationSuspended)b=
-this.getValue();else{b=this.getValue();var d=Math.pow(10,this.__precision);b=Math.round(b*d)/d}a.value=b;return e.superclass.prototype.updateDisplay.call(this)}});return e}(dat.controllers.NumberController,dat.dom.dom,dat.utils.common);
-dat.controllers.NumberControllerSlider=function(f,a,d,e,c){function b(a,b,c,e,d){return e+(a-b)/(c-b)*(d-e)}var p=function(c,e,d,f,u){function A(c){c.preventDefault();var e=a.getOffset(k.__background),d=a.getWidth(k.__background);k.setValue(b(c.clientX,e.left,e.left+d,k.__min,k.__max));return!1}function g(){a.unbind(window,"mousemove",A);a.unbind(window,"mouseup",g);k.__onFinishChange&&k.__onFinishChange.call(k,k.getValue())}p.superclass.call(this,c,e,{min:d,max:f,step:u});var k=this;this.__background=
-document.createElement("div");this.__foreground=document.createElement("div");a.bind(this.__background,"mousedown",function(b){a.bind(window,"mousemove",A);a.bind(window,"mouseup",g);A(b)});a.addClass(this.__background,"slider");a.addClass(this.__foreground,"slider-fg");this.updateDisplay();this.__background.appendChild(this.__foreground);this.domElement.appendChild(this.__background)};p.superclass=f;p.useDefaultStyles=function(){d.inject(c)};e.extend(p.prototype,f.prototype,{updateDisplay:function(){var a=
-(this.getValue()-this.__min)/(this.__max-this.__min);this.__foreground.style.width=100*a+"%";return p.superclass.prototype.updateDisplay.call(this)}});return p}(dat.controllers.NumberController,dat.dom.dom,dat.utils.css,dat.utils.common,"/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\n.slider {\n box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);\n height: 1em;\n border-radius: 1em;\n background-color: #eee;\n padding: 0 0.5em;\n overflow: hidden;\n}\n\n.slider-fg {\n padding: 1px 0 2px 0;\n background-color: #aaa;\n height: 1em;\n margin-left: -0.5em;\n padding-right: 0.5em;\n border-radius: 1em 0 0 1em;\n}\n\n.slider-fg:after {\n display: inline-block;\n border-radius: 1em;\n background-color: #fff;\n border: 1px solid #aaa;\n content: '';\n float: right;\n margin-right: -1em;\n margin-top: -1px;\n height: 0.9em;\n width: 0.9em;\n}");
-dat.controllers.FunctionController=function(f,a,d){var e=function(c,b,d){e.superclass.call(this,c,b);var f=this;this.__button=document.createElement("div");this.__button.innerHTML=void 0===d?"Fire":d;a.bind(this.__button,"click",function(a){a.preventDefault();f.fire();return!1});a.addClass(this.__button,"button");this.domElement.appendChild(this.__button)};e.superclass=f;d.extend(e.prototype,f.prototype,{fire:function(){this.__onChange&&this.__onChange.call(this);this.getValue().call(this.object);
-this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}});return e}(dat.controllers.Controller,dat.dom.dom,dat.utils.common);
-dat.controllers.BooleanController=function(f,a,d){var e=function(c,b){e.superclass.call(this,c,b);var d=this;this.__prev=this.getValue();this.__checkbox=document.createElement("input");this.__checkbox.setAttribute("type","checkbox");a.bind(this.__checkbox,"change",function(){d.setValue(!d.__prev)},!1);this.domElement.appendChild(this.__checkbox);this.updateDisplay()};e.superclass=f;d.extend(e.prototype,f.prototype,{setValue:function(a){a=e.superclass.prototype.setValue.call(this,a);this.__onFinishChange&&
-this.__onFinishChange.call(this,this.getValue());this.__prev=this.getValue();return a},updateDisplay:function(){!0===this.getValue()?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0):this.__checkbox.checked=!1;return e.superclass.prototype.updateDisplay.call(this)}});return e}(dat.controllers.Controller,dat.dom.dom,dat.utils.common);
-dat.color.toString=function(f){return function(a){if(1==a.a||f.isUndefined(a.a)){for(a=a.hex.toString(16);6>a.length;)a="0"+a;return"#"+a}return"rgba("+Math.round(a.r)+","+Math.round(a.g)+","+Math.round(a.b)+","+a.a+")"}}(dat.utils.common);
-dat.color.interpret=function(f,a){var d,e,c=[{litmus:a.isString,conversions:{THREE_CHAR_HEX:{read:function(a){a=a.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null===a?!1:{space:"HEX",hex:parseInt("0x"+a[1].toString()+a[1].toString()+a[2].toString()+a[2].toString()+a[3].toString()+a[3].toString())}},write:f},SIX_CHAR_HEX:{read:function(a){a=a.match(/^#([A-F0-9]{6})$/i);return null===a?!1:{space:"HEX",hex:parseInt("0x"+a[1].toString())}},write:f},CSS_RGB:{read:function(a){a=a.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
-return null===a?!1:{space:"RGB",r:parseFloat(a[1]),g:parseFloat(a[2]),b:parseFloat(a[3])}},write:f},CSS_RGBA:{read:function(a){a=a.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\,\s*(.+)\s*\)/);return null===a?!1:{space:"RGB",r:parseFloat(a[1]),g:parseFloat(a[2]),b:parseFloat(a[3]),a:parseFloat(a[4])}},write:f}}},{litmus:a.isNumber,conversions:{HEX:{read:function(a){return{space:"HEX",hex:a,conversionName:"HEX"}},write:function(a){return a.hex}}}},{litmus:a.isArray,conversions:{RGB_ARRAY:{read:function(a){return 3!=
-a.length?!1:{space:"RGB",r:a[0],g:a[1],b:a[2]}},write:function(a){return[a.r,a.g,a.b]}},RGBA_ARRAY:{read:function(a){return 4!=a.length?!1:{space:"RGB",r:a[0],g:a[1],b:a[2],a:a[3]}},write:function(a){return[a.r,a.g,a.b,a.a]}}}},{litmus:a.isObject,conversions:{RGBA_OBJ:{read:function(b){return a.isNumber(b.r)&&a.isNumber(b.g)&&a.isNumber(b.b)&&a.isNumber(b.a)?{space:"RGB",r:b.r,g:b.g,b:b.b,a:b.a}:!1},write:function(a){return{r:a.r,g:a.g,b:a.b,a:a.a}}},RGB_OBJ:{read:function(b){return a.isNumber(b.r)&&
-a.isNumber(b.g)&&a.isNumber(b.b)?{space:"RGB",r:b.r,g:b.g,b:b.b}:!1},write:function(a){return{r:a.r,g:a.g,b:a.b}}},HSVA_OBJ:{read:function(b){return a.isNumber(b.h)&&a.isNumber(b.s)&&a.isNumber(b.v)&&a.isNumber(b.a)?{space:"HSV",h:b.h,s:b.s,v:b.v,a:b.a}:!1},write:function(a){return{h:a.h,s:a.s,v:a.v,a:a.a}}},HSV_OBJ:{read:function(b){return a.isNumber(b.h)&&a.isNumber(b.s)&&a.isNumber(b.v)?{space:"HSV",h:b.h,s:b.s,v:b.v}:!1},write:function(a){return{h:a.h,s:a.s,v:a.v}}}}}];return function(){e=!1;
-var b=1\n\n Here\'s the new load parameter for your GUI\'s constructor:\n\n \n\n \n\n
Automatically save\n values to
localStorage on exit.\n\n
The values saved to localStorage will\n override those passed to dat.GUI\'s constructor. This makes it\n easier to work incrementally, but localStorage is fragile,\n and your friends may not see the same values you do.\n \n
\n \n
\n\n',
-".dg {\n /** Clear list styles */\n /* Auto-place container */\n /* Auto-placed GUI's */\n /* Line items that don't contain folders. */\n /** Folder names */\n /** Hides closed items */\n /** Controller row */\n /** Name-half (left) */\n /** Controller-half (right) */\n /** Controller placement */\n /** Shorter number boxes when slider is present. */\n /** Ensure the entire boolean and function row shows a hand */ }\n .dg ul {\n list-style: none;\n margin: 0;\n padding: 0;\n width: 100%;\n clear: both; }\n .dg.ac {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 0;\n z-index: 0; }\n .dg:not(.ac) .main {\n /** Exclude mains in ac so that we don't hide close button */\n overflow: hidden; }\n .dg.main {\n -webkit-transition: opacity 0.1s linear;\n -o-transition: opacity 0.1s linear;\n -moz-transition: opacity 0.1s linear;\n transition: opacity 0.1s linear; }\n .dg.main.taller-than-window {\n overflow-y: auto; }\n .dg.main.taller-than-window .close-button {\n opacity: 1;\n /* TODO, these are style notes */\n margin-top: -1px;\n border-top: 1px solid #2c2c2c; }\n .dg.main ul.closed .close-button {\n opacity: 1 !important; }\n .dg.main:hover .close-button,\n .dg.main .close-button.drag {\n opacity: 1; }\n .dg.main .close-button {\n /*opacity: 0;*/\n -webkit-transition: opacity 0.1s linear;\n -o-transition: opacity 0.1s linear;\n -moz-transition: opacity 0.1s linear;\n transition: opacity 0.1s linear;\n border: 0;\n position: absolute;\n line-height: 19px;\n height: 20px;\n /* TODO, these are style notes */\n cursor: pointer;\n text-align: center;\n background-color: #000; }\n .dg.main .close-button:hover {\n background-color: #111; }\n .dg.a {\n float: right;\n margin-right: 15px;\n overflow-x: hidden; }\n .dg.a.has-save > ul {\n margin-top: 27px; }\n .dg.a.has-save > ul.closed {\n margin-top: 0; }\n .dg.a .save-row {\n position: fixed;\n top: 0;\n z-index: 1002; }\n .dg li {\n -webkit-transition: height 0.1s ease-out;\n -o-transition: height 0.1s ease-out;\n -moz-transition: height 0.1s ease-out;\n transition: height 0.1s ease-out; }\n .dg li:not(.folder) {\n cursor: auto;\n height: 27px;\n line-height: 27px;\n overflow: hidden;\n padding: 0 4px 0 5px; }\n .dg li.folder {\n padding: 0;\n border-left: 4px solid rgba(0, 0, 0, 0); }\n .dg li.title {\n cursor: pointer;\n margin-left: -4px; }\n .dg .closed li:not(.title),\n .dg .closed ul li,\n .dg .closed ul li > * {\n height: 0;\n overflow: hidden;\n border: 0; }\n .dg .cr {\n clear: both;\n padding-left: 3px;\n height: 27px; }\n .dg .property-name {\n cursor: default;\n float: left;\n clear: left;\n width: 40%;\n overflow: hidden;\n text-overflow: ellipsis; }\n .dg .c {\n float: left;\n width: 60%; }\n .dg .c input[type=text] {\n border: 0;\n margin-top: 4px;\n padding: 3px;\n width: 100%;\n float: right; }\n .dg .has-slider input[type=text] {\n width: 30%;\n /*display: none;*/\n margin-left: 0; }\n .dg .slider {\n float: left;\n width: 66%;\n margin-left: -5px;\n margin-right: 0;\n height: 19px;\n margin-top: 4px; }\n .dg .slider-fg {\n height: 100%; }\n .dg .c input[type=checkbox] {\n margin-top: 9px; }\n .dg .c select {\n margin-top: 5px; }\n .dg .cr.function,\n .dg .cr.function .property-name,\n .dg .cr.function *,\n .dg .cr.boolean,\n .dg .cr.boolean * {\n cursor: pointer; }\n .dg .selector {\n display: none;\n position: absolute;\n margin-left: -9px;\n margin-top: 23px;\n z-index: 10; }\n .dg .c:hover .selector,\n .dg .selector.drag {\n display: block; }\n .dg li.save-row {\n padding: 0; }\n .dg li.save-row .button {\n display: inline-block;\n padding: 0px 6px; }\n .dg.dialogue {\n background-color: #222;\n width: 460px;\n padding: 15px;\n font-size: 13px;\n line-height: 15px; }\n\n/* TODO Separate style and structure */\n#dg-new-constructor {\n padding: 10px;\n color: #222;\n font-family: Monaco, monospace;\n font-size: 10px;\n border: 0;\n resize: none;\n box-shadow: inset 1px 1px 1px #888;\n word-wrap: break-word;\n margin: 12px 0;\n display: block;\n width: 440px;\n overflow-y: scroll;\n height: 100px;\n position: relative; }\n\n#dg-local-explain {\n display: none;\n font-size: 11px;\n line-height: 17px;\n border-radius: 3px;\n background-color: #333;\n padding: 8px;\n margin-top: 10px; }\n #dg-local-explain code {\n font-size: 10px; }\n\n#dat-gui-save-locally {\n display: none; }\n\n/** Main type */\n.dg {\n color: #eee;\n font: 11px 'Lucida Grande', sans-serif;\n text-shadow: 0 -1px 0 #111;\n /** Auto place */\n /* Controller row, */\n /** Controllers */ }\n .dg.main {\n /** Scrollbar */ }\n .dg.main::-webkit-scrollbar {\n width: 5px;\n background: #1a1a1a; }\n .dg.main::-webkit-scrollbar-corner {\n height: 0;\n display: none; }\n .dg.main::-webkit-scrollbar-thumb {\n border-radius: 5px;\n background: #676767; }\n .dg li:not(.folder) {\n background: #1a1a1a;\n border-bottom: 1px solid #2c2c2c; }\n .dg li.save-row {\n line-height: 25px;\n background: #dad5cb;\n border: 0; }\n .dg li.save-row select {\n margin-left: 5px;\n width: 108px; }\n .dg li.save-row .button {\n margin-left: 5px;\n margin-top: 1px;\n border-radius: 2px;\n font-size: 9px;\n line-height: 7px;\n padding: 4px 4px 5px 4px;\n background: #c5bdad;\n color: #fff;\n text-shadow: 0 1px 0 #b0a58f;\n box-shadow: 0 -1px 0 #b0a58f;\n cursor: pointer; }\n .dg li.save-row .button.gears {\n background: #c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;\n height: 7px;\n width: 8px; }\n .dg li.save-row .button:hover {\n background-color: #bab19e;\n box-shadow: 0 -1px 0 #b0a58f; }\n .dg li.folder {\n border-bottom: 0; }\n .dg li.title {\n padding-left: 16px;\n background: black url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;\n cursor: pointer;\n border-bottom: 1px solid rgba(255, 255, 255, 0.2); }\n .dg .closed li.title {\n background-image: url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==); }\n .dg .cr.boolean {\n border-left: 3px solid #806787; }\n .dg .cr.function {\n border-left: 3px solid #e61d5f; }\n .dg .cr.number {\n border-left: 3px solid #2fa1d6; }\n .dg .cr.number input[type=text] {\n color: #2fa1d6; }\n .dg .cr.string {\n border-left: 3px solid #1ed36f; }\n .dg .cr.string input[type=text] {\n color: #1ed36f; }\n .dg .cr.function:hover, .dg .cr.boolean:hover {\n background: #111; }\n .dg .c input[type=text] {\n background: #303030;\n outline: none; }\n .dg .c input[type=text]:hover {\n background: #3c3c3c; }\n .dg .c input[type=text]:focus {\n background: #494949;\n color: #fff; }\n .dg .c .slider {\n background: #303030;\n cursor: ew-resize; }\n .dg .c .slider-fg {\n background: #2fa1d6; }\n .dg .c .slider:hover {\n background: #3c3c3c; }\n .dg .c .slider:hover .slider-fg {\n background: #44abda; }\n",
-dat.controllers.factory=function(f,a,d,e,c,b,p){return function(q,l,r,n){var u=q[l];if(p.isArray(r)||p.isObject(r))return new f(q,l,r);if(p.isNumber(u))return p.isNumber(r)&&p.isNumber(n)?new d(q,l,r,n):new a(q,l,{min:r,max:n});if(p.isString(u))return new e(q,l);if(p.isFunction(u))return new c(q,l,"");if(p.isBoolean(u))return new b(q,l)}}(dat.controllers.OptionController,dat.controllers.NumberControllerBox,dat.controllers.NumberControllerSlider,dat.controllers.StringController=function(f,a,d){var e=
-function(c,b){function d(){f.setValue(f.__input.value)}e.superclass.call(this,c,b);var f=this;this.__input=document.createElement("input");this.__input.setAttribute("type","text");a.bind(this.__input,"keyup",d);a.bind(this.__input,"change",d);a.bind(this.__input,"blur",function(){f.__onFinishChange&&f.__onFinishChange.call(f,f.getValue())});a.bind(this.__input,"keydown",function(a){13===a.keyCode&&this.blur()});this.updateDisplay();this.domElement.appendChild(this.__input)};e.superclass=f;d.extend(e.prototype,
-f.prototype,{updateDisplay:function(){a.isActive(this.__input)||(this.__input.value=this.getValue());return e.superclass.prototype.updateDisplay.call(this)}});return e}(dat.controllers.Controller,dat.dom.dom,dat.utils.common),dat.controllers.FunctionController,dat.controllers.BooleanController,dat.utils.common),dat.controllers.Controller,dat.controllers.BooleanController,dat.controllers.FunctionController,dat.controllers.NumberControllerBox,dat.controllers.NumberControllerSlider,dat.controllers.OptionController,
-dat.controllers.ColorController=function(f,a,d,e,c){function b(a,b,d,e){a.style.background="";c.each(l,function(c){a.style.cssText+="background: "+c+"linear-gradient("+b+", "+d+" 0%, "+e+" 100%); "})}function p(a){a.style.background="";a.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);";a.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";
-a.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";a.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";a.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}var q=function(f,n){function u(b){v(b);a.bind(window,"mousemove",v);a.bind(window,
-"mouseup",l)}function l(){a.unbind(window,"mousemove",v);a.unbind(window,"mouseup",l)}function g(){var a=e(this.value);!1!==a?(t.__color.__state=a,t.setValue(t.__color.toOriginal())):this.value=t.__color.toString()}function k(){a.unbind(window,"mousemove",w);a.unbind(window,"mouseup",k)}function v(b){b.preventDefault();var c=a.getWidth(t.__saturation_field),d=a.getOffset(t.__saturation_field),e=(b.clientX-d.left+document.body.scrollLeft)/c;b=1-(b.clientY-d.top+document.body.scrollTop)/c;1
-b&&(b=0);1e&&(e=0);t.__color.v=b;t.__color.s=e;t.setValue(t.__color.toOriginal());return!1}function w(b){b.preventDefault();var c=a.getHeight(t.__hue_field),d=a.getOffset(t.__hue_field);b=1-(b.clientY-d.top+document.body.scrollTop)/c;1b&&(b=0);t.__color.h=360*b;t.setValue(t.__color.toOriginal());return!1}q.superclass.call(this,f,n);this.__color=new d(this.getValue());this.__temp=new d(0);var t=this;this.domElement=document.createElement("div");a.makeSelectable(this.domElement,!1);
-this.__selector=document.createElement("div");this.__selector.className="selector";this.__saturation_field=document.createElement("div");this.__saturation_field.className="saturation-field";this.__field_knob=document.createElement("div");this.__field_knob.className="field-knob";this.__field_knob_border="2px solid ";this.__hue_knob=document.createElement("div");this.__hue_knob.className="hue-knob";this.__hue_field=document.createElement("div");this.__hue_field.className="hue-field";this.__input=document.createElement("input");
-this.__input.type="text";this.__input_textShadow="0 1px 1px ";a.bind(this.__input,"keydown",function(a){13===a.keyCode&&g.call(this)});a.bind(this.__input,"blur",g);a.bind(this.__selector,"mousedown",function(b){a.addClass(this,"drag").bind(window,"mouseup",function(b){a.removeClass(t.__selector,"drag")})});var y=document.createElement("div");c.extend(this.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"});c.extend(this.__field_knob.style,
-{position:"absolute",width:"12px",height:"12px",border:this.__field_knob_border+(.5>this.__color.v?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1});c.extend(this.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1});c.extend(this.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"});c.extend(y.style,{width:"100%",height:"100%",
-background:"none"});b(y,"top","rgba(0,0,0,0)","#000");c.extend(this.__hue_field.style,{width:"15px",height:"100px",display:"inline-block",border:"1px solid #555",cursor:"ns-resize"});p(this.__hue_field);c.extend(this.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:this.__input_textShadow+"rgba(0,0,0,0.7)"});a.bind(this.__saturation_field,"mousedown",u);a.bind(this.__field_knob,"mousedown",u);a.bind(this.__hue_field,"mousedown",function(b){w(b);a.bind(window,
-"mousemove",w);a.bind(window,"mouseup",k)});this.__saturation_field.appendChild(y);this.__selector.appendChild(this.__field_knob);this.__selector.appendChild(this.__saturation_field);this.__selector.appendChild(this.__hue_field);this.__hue_field.appendChild(this.__hue_knob);this.domElement.appendChild(this.__input);this.domElement.appendChild(this.__selector);this.updateDisplay()};q.superclass=f;c.extend(q.prototype,f.prototype,{updateDisplay:function(){var a=e(this.getValue());if(!1!==a){var f=!1;
-c.each(d.COMPONENTS,function(b){if(!c.isUndefined(a[b])&&!c.isUndefined(this.__color.__state[b])&&a[b]!==this.__color.__state[b])return f=!0,{}},this);f&&c.extend(this.__color.__state,a)}c.extend(this.__temp.__state,this.__color.__state);this.__temp.a=1;var l=.5>this.__color.v||.5a&&(a+=1);return{h:360*a,s:c/b,v:b/255}},rgb_to_hex:function(a,d,e){a=this.hex_with_component(0,2,a);a=this.hex_with_component(a,1,d);return a=this.hex_with_component(a,0,e)},component_from_hex:function(a,d){return a>>8*d&255},hex_with_component:function(a,d,e){return e<<(f=8*d)|a&~(255<
-
-
-
- Babylon.js - Refraction demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Refraction/refraction.js b/static/Demos/Refraction/refraction.js
deleted file mode 100644
index 9cc834524..000000000
--- a/static/Demos/Refraction/refraction.js
+++ /dev/null
@@ -1,100 +0,0 @@
-var CreateRefractionTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
-
- var camera = new BABYLON.ArcRotateCamera("camera1", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
-
- camera.setPosition(new BABYLON.Vector3(0, 5, -10));
-
- camera.attachControl(canvas);
-
- camera.upperBetaLimit = Math.PI / 2;
- camera.lowerRadiusLimit = 4;
-
- var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
- light.intensity = 0.7;
-
- var knot = BABYLON.Mesh.CreateTorusKnot("knot", 1, 0.4, 128, 64, 2, 3, scene);
-
- var yellowSphere = BABYLON.Mesh.CreateSphere("yellowSphere", 16, 1.5, scene);
- yellowSphere.setPivotMatrix(BABYLON.Matrix.Translation(3, 0, 0));
- var yellowMaterial = new BABYLON.StandardMaterial("yellowMaterial", scene);
- yellowMaterial.diffuseColor = BABYLON.Color3.Yellow();
- yellowSphere.material = yellowMaterial;
-
- var greenSphere = BABYLON.Mesh.CreateSphere("greenSphere", 16, 1.5, scene);
- greenSphere.setPivotMatrix(BABYLON.Matrix.Translation(0, 0, 3));
- var greenMaterial = new BABYLON.StandardMaterial("greenMaterial", scene);
- greenMaterial.diffuseColor = BABYLON.Color3.Green();
- greenSphere.material = greenMaterial;
-
- // Ground
- var ground = BABYLON.Mesh.CreateBox("Mirror", 1.0, scene);
- ground.scaling = new BABYLON.Vector3(100.0, 0.01, 100.0);
- ground.material = new BABYLON.StandardMaterial("ground", scene);
- ground.material.diffuseTexture = new BABYLON.Texture("/assets/amiga.jpg", scene);
- ground.material.diffuseTexture.uScale = 10;
- ground.material.diffuseTexture.vScale = 10;
- ground.position = new BABYLON.Vector3(0, -2, 0);
-
- // Main material
- var mainMaterial = new BABYLON.StandardMaterial("main", scene);
- knot.material = mainMaterial;
-
- var probe = new BABYLON.ReflectionProbe("main", 512, scene);
- probe.renderList.push(yellowSphere);
- probe.renderList.push(greenSphere);
- probe.renderList.push(ground);
- mainMaterial.diffuseColor = new BABYLON.Color3(1, 0.5, 0.5);
- mainMaterial.refractionTexture = probe.cubeTexture;
- mainMaterial.refractionFresnelParameters = new BABYLON.FresnelParameters();
- mainMaterial.refractionFresnelParameters.bias = 0.5;
- mainMaterial.refractionFresnelParameters.power = 16;
- mainMaterial.refractionFresnelParameters.leftColor = BABYLON.Color3.Black();
- mainMaterial.refractionFresnelParameters.rightColor = BABYLON.Color3.White();
- mainMaterial.refractionFresnelParameters.isEnabled = false;
- mainMaterial.indexOfRefraction = 1.05;
-
- // Fog
- scene.fogMode = BABYLON.Scene.FOGMODE_LINEAR;
- scene.fogColor = scene.clearColor;
- scene.fogStart = 20.0;
- scene.fogEnd = 50.0;
-
- // Animations
- scene.registerBeforeRender(function () {
- yellowSphere.rotation.y += 0.01;
- greenSphere.rotation.y += 0.01;
- });
-
- // UI
- var configObject = {
- bump: false,
- fresnel: false,
- indexOfRef: 1.05
- }
- var gui = new dat.GUI();
- gui.add(configObject, 'bump').onChange(function (value) {
- configObject.bump = value;
-
- if (!value) {
- if (mainMaterial.bumpTexture) {
- mainMaterial.bumpTexture.dispose();
- mainMaterial.bumpTexture = null;
- }
- } else {
- mainMaterial.bumpTexture = new BABYLON.Texture("/assets/normalMap.jpg", scene);
- }
- });
- gui.add(configObject, 'fresnel').onChange(function (value) {
- configObject.fresnel = value;
-
- mainMaterial.refractionFresnelParameters.isEnabled = value;
- });
- gui.add(configObject, 'indexOfRef', 0.1, 1.3).onChange(function (value) {
- configObject.indexOfRef = value;
-
- mainMaterial.indexOfRefraction = value;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Ribbons/demo.js b/static/Demos/Ribbons/demo.js
deleted file mode 100644
index 166494701..000000000
--- a/static/Demos/Ribbons/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateRibbonsTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Ribbons/index.html b/static/Demos/Ribbons/index.html
deleted file mode 100644
index 9bd0ed2f9..000000000
--- a/static/Demos/Ribbons/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Point Light Shadow Map demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Ribbons/ribbons.js b/static/Demos/Ribbons/ribbons.js
deleted file mode 100644
index 86edd617c..000000000
--- a/static/Demos/Ribbons/ribbons.js
+++ /dev/null
@@ -1,163 +0,0 @@
-var CreateRibbonsTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- scene.clearColor = new BABYLON.Color3(0, 0, 0.2);
- var camera = new BABYLON.ArcRotateCamera("Camera", Math.PI / 2 - 0.5, 0.5, 6, BABYLON.Vector3.Zero(), scene);
- camera.wheelPrecision = 100;
-
- // fire material
- var fireMaterial = new BABYLON.StandardMaterial("fireMaterial", scene);
- var fireTexture = new BABYLON.FireProceduralTexture("fire", 256, scene);
- fireTexture.level = 2;
- fireTexture.vScale = 0.5;
- fireMaterial.diffuseColor = new BABYLON.Color3(Math.random() / 2, Math.random() / 2, Math.random() / 2);
- fireMaterial.diffuseTexture = fireTexture;
- fireMaterial.alpha = 1;
- fireMaterial.specularTexture = fireTexture;
- fireMaterial.emissiveTexture = fireTexture;
- fireMaterial.specularPower = 4;
- fireMaterial.backFaceCulling = false;
- fireTexture.fireColors = [
- new BABYLON.Color3(Math.random() / 2, Math.random() / 2, Math.random() / 2),
- new BABYLON.Color3(Math.random() / 2, Math.random() / 2, Math.random() / 2),
- new BABYLON.Color3(Math.random() / 2, Math.random() / 2, Math.random() / 2),
- new BABYLON.Color3(Math.random() / 2, Math.random() / 2, Math.random() / 2),
- new BABYLON.Color3(Math.random() / 2, Math.random() / 2, Math.random() / 2),
- new BABYLON.Color3(Math.random() / 2, Math.random() / 2, Math.random() / 2)
- ];
-
- // initial vars
- var delay = 4000;
- var steps = Math.floor(delay / 80);;
-
- var paths = [];
- var targetPaths = [];
- var m = [1, 3, 1, 5, 1, 7, 1, 9];
- var lat = 50;
- var lng = 50;
- var deltas = [];
- var colors = fireTexture.fireColors;
- var deltaColors = [];
- var morph = false;
- var counter = 0;
- var rx = 0.0;
- var ry = 0.0;
- var deltarx = Math.random() / 200;
- var deltary = Math.random() / 400;
-
- // harmonic function : populates paths array according to m array
- var harmonic = function (m, lat, long, paths) {
- var pi = Math.PI;
- var pi2 = Math.PI * 2;
- var steplat = pi / lat;
- var steplon = pi2 / long;
- var index = 0;
- for (var theta = 0; theta <= pi2; theta += steplon) {
- var path = [];
- for (var phi = 0; phi <= pi; phi += steplat) {
- var r = 0;
- r += Math.pow(Math.sin(Math.floor(m[0]) * phi), Math.floor(m[1]));
- r += Math.pow(Math.cos(Math.floor(m[2]) * phi), Math.floor(m[3]));
- r += Math.pow(Math.sin(Math.floor(m[4]) * theta), Math.floor(m[5]));
- r += Math.pow(Math.cos(Math.floor(m[6]) * theta), Math.floor(m[7]));
- var p = new BABYLON.Vector3(r * Math.sin(phi) * Math.cos(theta), r * Math.cos(phi), r * Math.sin(phi) * Math.sin(theta));
- path.push(p);
- }
- paths[index] = path;
- index++;
- }
- };
-
- // new SH function : fill targetPaths and delta arrays with Vector3 and colors
- var newSH = function (m, paths, targetPaths, deltas, deltaColors) {
- morph = true;
- var scl = 1 / steps;
- // new harmonic
- for (var i = 0; i < m.length; i++) {
- var rand = parseInt(Math.random() * 10);
- m[i] = rand;
- }
- harmonic(m, lat, lng, targetPaths);
- // deltas computation
- var index = 0;
- for (var p = 0; p < targetPaths.length; p++) {
- var targetPath = targetPaths[p];
- var path = paths[p];
- for (var i = 0; i < targetPath.length; i++) {
- deltas[index] = (targetPath[i].subtract(path[i])).scale(scl);
- index++;
- }
- }
- // delta colors
- for (var c = 0; c < colors.length; c++) {
- deltaColors[c] = (new BABYLON.Color3(Math.random() / 2, Math.random() / 2, Math.random() / 2)).subtract(colors[c]).scale(scl);
- }
- // new rotation speeds
- deltarx = Math.random() / 200;
- deltary = Math.random() / 400;
- };
-
- // morphing function : update ribbons with intermediate m values
- var morphing = function (mesh, m, paths, targetPaths, deltas, deltaColors) {
- if (counter === steps) {
- counter = 0;
- morph = false;
- paths = targetPaths;
- }
- else {
- // update paths
- var index = 0;
- for (var p = 0; p < paths.length; p++) {
- var path = paths[p];
- for (var i = 0; i < path.length; i++) {
- path[i] = path[i].add(deltas[index]);
- index++;
- }
- }
- mesh = BABYLON.Mesh.CreateRibbon(null, paths, null, null, null, scene, null, null, mesh);
- // update colors
- for (var c = 0; c < colors.length; c++) {
- colors[c] = colors[c].add(deltaColors[c]);
- }
- }
- counter++;
- return mesh;
- };
-
- // SH init & ribbon creation
- harmonic(m, lat, lng, paths);
- var mesh = BABYLON.Mesh.CreateRibbon("ribbon", paths, true, false, 0, scene, true);
- mesh.freezeNormals();
- mesh.scaling = new BABYLON.Vector3(1, 1, 1);
- mesh.material = fireMaterial;
- // Volumetric Light
- var volLight = new BABYLON.VolumetricLightScatteringPostProcess("vl", 1.0, camera, mesh, 50, BABYLON.Texture.BILINEAR_SAMPLINGMODE, engine, false);
- volLight.exposure = 0.15;
- volLight.decay = 0.95;
- volLight.weight = 0.5;
-
- // interval setting
- var interval = window.setInterval(function () {
- newSH(m, paths, targetPaths, deltas, deltaColors);
- mesh = morphing(mesh, m, paths, targetPaths, deltas, deltaColors);
- }, delay);
-
- // immediate first SH
- newSH(m, paths, targetPaths, deltas, deltaColors);
-
- // then animation
- scene.registerBeforeRender(function () {
- if (morph) {
- mesh = morphing(mesh, m, paths, targetPaths, deltas, deltaColors);
- }
- rx += deltarx;
- ry -= deltary;
- mesh.rotation.y = ry;
- mesh.rotation.z = rx;
- });
-
- scene.onDispose = function () {
- clearInterval(interval);
- }
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/SPS/demo.js b/static/Demos/SPS/demo.js
deleted file mode 100644
index dc1e380ea..000000000
--- a/static/Demos/SPS/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateSPSTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/SPS/index.html b/static/Demos/SPS/index.html
deleted file mode 100644
index d70661d05..000000000
--- a/static/Demos/SPS/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Solid Particles System demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/SPS/sps.js b/static/Demos/SPS/sps.js
deleted file mode 100644
index 2cf4193d4..000000000
--- a/static/Demos/SPS/sps.js
+++ /dev/null
@@ -1,128 +0,0 @@
-var btexture = "grained_uv.png";
-var dcube = "cube.jpg";
-var dsaturne = "saturne.jpg";
-var dsun = "sun2.png";
-var atexture = "asteroid.jpg";
-var trings = "rings.png";
-
-function getRandomInt(min, max) {
- return Math.floor(Math.random() * (max - min + 1) + min);
-}
-
-var CreateSPSTestScene = function (engine) {
- scene = new BABYLON.Scene(engine);
- scene.clearColor = BABYLON.Color3.Black();
-
- camera = new BABYLON.ArcRotateCamera("Camera", -1.5, 1.3, 500, BABYLON.Vector3.Zero(), scene);
- camera.attachControl(canvas, false);
- camera.upperRadiusLimit = 600;
- camera.lowerRadiusLimit = 200;
-
- var light1 = new BABYLON.HemisphericLight("hemi", new BABYLON.Vector3(0, 50, 100), scene);
- light1.diffuseColor = new BABYLON.Color3(0, 10, 10);
-
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 1500.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/nebula", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
-
- var saturne = BABYLON.Mesh.CreateSphere("saturne", 16, 80, scene);
- var saturne_material = new BABYLON.StandardMaterial("saturne_material", scene);
- saturne_material.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/nebula", scene);
- saturne_material.diffuseTexture = new BABYLON.Texture(dsaturne, scene);
- saturne_material.diffuseColor = new BABYLON.Color3(0.8, 0.8, 0.8);
- saturne_material.emissiveColor = BABYLON.Color3.White();
- saturne_material.specularColor = BABYLON.Color3.Black();
- saturne_material.backFaceCulling = true;
-
- saturne_material.reflectionFresnelParameters = new BABYLON.FresnelParameters();
- saturne_material.reflectionFresnelParameters.bias = 0.2;
-
- saturne_material.emissiveFresnelParameters = new BABYLON.FresnelParameters();
- saturne_material.emissiveFresnelParameters.bias = 0.6;
- saturne_material.emissiveFresnelParameters.power = 4;
- saturne_material.emissiveFresnelParameters.leftColor = BABYLON.Color3.White();
- saturne_material.emissiveFresnelParameters.rightColor = new BABYLON.Color3(0.6, 0.6, 0.6);
-
- saturne.material = saturne_material;
-
- // saturne.rotation.z = -90;
- saturne.rotation.y = -12;
-
- var rings = BABYLON.Mesh.CreatePlane("rings", 600, scene);
- var m = new BABYLON.StandardMaterial("m", scene);
- m.diffuseTexture = new BABYLON.Texture(trings, scene);
- m.diffuseTexture.hasAlpha = true;
- m.backFaceCulling = false;
- rings.material = m;
-
- rings.rotation.x = Math.PI / 2;
-
- var nb = 20000;
-
- var myVertexFunction = function (particle, vertex, i) {
- vertex.x *= (Math.random() + 0.01) / getRandomInt(5, 10);
- vertex.y *= (Math.random() + 0.01) / getRandomInt(5, 10);
- vertex.z *= (Math.random() + 0.01) / getRandomInt(5, 10);
- };
-
- var myPositionFunction = function (particle, i, s) {
- var radius = 1.0;
- var TWO_PI = Math.PI * 2;
- var angle = TWO_PI / nb;
- var x, y;
-
- x = getRandomInt(90, 350) * Math.sin(angle * i);
- z = getRandomInt(90, 350) * Math.cos(angle * i);
-
- particle.position.x = x;
- particle.position.y = z;
- particle.position.z = (Math.random() - 0.5) * 5;
-
- particle.scale.x = getRandomInt(5, 35) / 10;
- particle.scale.y = getRandomInt(5, 35) / 10;
- particle.scale.z = getRandomInt(5, 35) / 10;
-
- particle.rotation.x = Math.random() * 3.15;
- particle.rotation.y = Math.random() * 3.15;
- particle.rotation.z = Math.random() * 1.5;
- };
-
- var rock = BABYLON.Mesh.CreateSphere("s", 0.5, 16, scene);
- var rock_material = new BABYLON.StandardMaterial("rock_material", scene);
- rock_material.diffuseTexture = new BABYLON.Texture(atexture, scene);
- rock_material.diffuseTexture.uScale = 16;
- rock_material.diffuseTexture.vScale = 16;
- rock_material.backFaceCulling = false;
-
- // SPS creation : Immutable {updatable: false}
- var SPS = new BABYLON.SolidParticleSystem('SPS', scene, { updatable: false });
- SPS.addShape(rock, nb, { positionFunction: myPositionFunction, vertexFunction: myVertexFunction });
- var mesh = SPS.buildMesh();
- SPS.mesh.material = rock.material;
- SPS.mesh.rotation.y = 90;
- SPS.mesh.rotation.x = Math.PI / 2;
-
- rock.dispose();
-
- var emitter = new BABYLON.VolumetricLightScatteringPostProcess('godrays', { passRatio: 0.5, postProcessRatio: 1.0 }, camera, null, 100, BABYLON.Texture.BILINEAR_SAMPLINGMODE, engine, false);
- emitter.mesh.material.diffuseTexture = new BABYLON.Texture("sun.png", scene, true, false, BABYLON.Texture.BILINEAR_SAMPLINGMODE);
- emitter.mesh.material.diffuseTexture.hasAlpha = true;
- emitter.mesh.position = new BABYLON.Vector3(200, 0, 500);
- emitter.mesh.scaling = new BABYLON.Vector3(250, 250, 250);
-
- var t = 0.0;
- scene.registerBeforeRender(function () {
-
- SPS.mesh.rotation.z = t / 10;
-
- t += 0.1;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/SPSCollisions/demo.js b/static/Demos/SPSCollisions/demo.js
deleted file mode 100644
index f67848304..000000000
--- a/static/Demos/SPSCollisions/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateSPSCollisionsTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/SPSCollisions/index.html b/static/Demos/SPSCollisions/index.html
deleted file mode 100644
index 5231b6437..000000000
--- a/static/Demos/SPSCollisions/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Solid Particles System Collisions demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/SPSCollisions/spscollisions.jpg b/static/Demos/SPSCollisions/spscollisions.jpg
deleted file mode 100644
index 8ba2dbbf9..000000000
Binary files a/static/Demos/SPSCollisions/spscollisions.jpg and /dev/null differ
diff --git a/static/Demos/SPSCollisions/spscollisions.js b/static/Demos/SPSCollisions/spscollisions.js
deleted file mode 100644
index 9df86db82..000000000
--- a/static/Demos/SPSCollisions/spscollisions.js
+++ /dev/null
@@ -1,152 +0,0 @@
-var CreateSPSCollisionsTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- scene.clearColor = new BABYLON.Color3(.4, .6, .9);
- var camera = new BABYLON.ArcRotateCamera("camera1", 0, 0, 0, new BABYLON.Vector3(0, 0, -0), scene);
- camera.setPosition(new BABYLON.Vector3(0, 100, -200));
- camera.attachControl(canvas, true);
-
- var pl = new BABYLON.PointLight("pl", new BABYLON.Vector3(0, 0, 0), scene);
- pl.diffuse = new BABYLON.Color3(1, 1, 1);
- pl.specular = new BABYLON.Color3(1, 1, 0.8);
- pl.intensity = 0.95;
- pl.position = camera.position;
-
- var sphereRadius = 18.0;
- var boxSize = 4.0;
- var ground = BABYLON.MeshBuilder.CreateGround("gd", { width: 1000.0, height: 1000.0 }, scene);
- var sphere = BABYLON.Mesh.CreateSphere("sphere", 10, sphereRadius * 2.0, scene);
- var box = BABYLON.MeshBuilder.CreateBox("b", { size: boxSize }, scene);
- var poly = BABYLON.MeshBuilder.CreatePolyhedron("p", { size: boxSize, type: 4, flat: true }, scene);
- var tetra = BABYLON.MeshBuilder.CreatePolyhedron("t", { size: boxSize / 2.0, flat: true }, scene);
- var matSphere = new BABYLON.StandardMaterial("ms", scene);
- var matGround = new BABYLON.StandardMaterial("mg", scene);
- matSphere.diffuseColor = BABYLON.Color3.Red();
- matGround.diffuseColor = new BABYLON.Color3(0.65, 0.6, 0.5);
- sphere.material = matSphere;
- ground.material = matGround;
- ground.freezeWorldMatrix();
- matSphere.freeze();
- matGround.freeze();
-
- // Particle system
- var particleNb = 1200;
- var nb = (particleNb / 3) | 0;
- var SPS = new BABYLON.SolidParticleSystem('SPS', scene, { particleIntersection: true });
- SPS.addShape(box, nb);
- SPS.addShape(poly, nb);
- SPS.addShape(tetra, nb)
- box.dispose();
- poly.dispose();
- tetra.dispose();
- var mesh = SPS.buildMesh();
- mesh.hasVertexAlpha = true;
- SPS.isAlwaysVisible = true;
- SPS.computeParticleTexture = false;
-
- // position things
- mesh.position.y = 80.0;
- mesh.position.x = -70.0;
- var sphereAltitude = mesh.position.y / 2.0;
- sphere.position.y = sphereAltitude;
-
- // shared variables
- var speed = 1.9; // particle max speed
- var cone = 0.5; // emitter aperture
- var gravity = -speed / 100; // gravity
- var restitution = 0.99; // energy restitution
- var k = 0.0;
- var sign = 1;
- var tmpPos = BABYLON.Vector3.Zero(); // current particle world position
- var tmpNormal = BABYLON.Vector3.Zero(); // current sphere normal on intersection point
- var tmpDot = 0.0; // current dot product
- var bboxesComputed = false; // the bbox are actually computed only after the first particle.update()
-
-
- // SPS initialization : just recycle all
- SPS.initParticles = function () {
- for (var p = 0; p < SPS.nbParticles; p++) {
- SPS.recycleParticle(SPS.particles[p]);
- }
- };
-
- // recycle : reset the particle at the emitter origin
- SPS.recycleParticle = function (particle) {
- particle.position.x = 0;
- particle.position.y = 0;
- particle.position.z = 0;
- particle.velocity.x = Math.random() * speed;
- particle.velocity.y = (Math.random() - 0.3) * cone * speed;
- particle.velocity.z = (Math.random() - 0.5) * cone * speed;
-
- particle.rotation.x = Math.random() * Math.PI;
- particle.rotation.y = Math.random() * Math.PI;
- particle.rotation.z = Math.random() * Math.PI;
-
- particle.scaling.x = Math.random() + 0.1;
- particle.scaling.y = Math.random() + 0.1;
- particle.scaling.z = Math.random() + 0.1;
-
- particle.color.r = Math.random() + 0.1;
- particle.color.g = Math.random() + 0.1;
- particle.color.b = Math.random() + 0.1;
- particle.color.a = 1.0;
- };
-
-
- // particle behavior
- SPS.updateParticle = function (particle) {
-
- // recycle if touched the ground
- if ((particle.position.y + mesh.position.y) < (ground.position.y + boxSize)) {
- particle.position.y = ground.position.y - mesh.position.y + boxSize / 2.0;
- particle.color.a -= 0.05;
- if (particle.color.a < 0) {
- this.recycleParticle(particle);
- }
- return;
- }
-
- // update velocity, rotation and position
- particle.velocity.y += gravity; // apply gravity to y
- (particle.position).addInPlace(particle.velocity); // update particle new position
- sign = (particle.idx % 2 == 0) ? 1 : -1; // rotation sign and then new value
- particle.rotation.z += 0.1 * sign;
- particle.rotation.x += 0.05 * sign;
- particle.rotation.y += 0.008 * sign;
-
- // intersection
- if (bboxesComputed && particle.intersectsMesh(sphere)) {
- particle.position.addToRef(mesh.position, tmpPos); // particle World position
- tmpPos.subtractToRef(sphere.position, tmpNormal); // normal to the sphere
- tmpNormal.normalize(); // normalize the sphere normal
- tmpDot = BABYLON.Vector3.Dot(particle.velocity, tmpNormal); // dot product (velocity, normal)
- // bounce result computation
- particle.velocity.x = -particle.velocity.x + 2.0 * tmpDot * tmpNormal.x;
- particle.velocity.y = -particle.velocity.y + 2.0 * tmpDot * tmpNormal.y;
- particle.velocity.z = -particle.velocity.z + 2.0 * tmpDot * tmpNormal.z;
- particle.velocity.scaleInPlace(restitution); // aply restitution
- particle.rotation.x *= -1.0;
- particle.rotation.y *= -1.0;
- particle.rotation.z *= -1.0;
- }
- };
-
- SPS.afterUpdateParticles = function () {
- bboxesComputed = true;
- };
-
- // init all particle values
- SPS.initParticles();
-
- //scene.debugLayer.show();
- // animation
- scene.registerBeforeRender(function () {
- SPS.setParticles();
- sphere.position.x = 30.0 * Math.sin(k);
- sphere.position.z = 20.0 * Math.sin(k * 6.0);
- sphere.position.y = 8.0 * Math.sin(k * 8.0) + sphereAltitude;
- k += 0.02;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/SSAO/demo.js b/static/Demos/SSAO/demo.js
deleted file mode 100644
index 95cf40030..000000000
--- a/static/Demos/SSAO/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateSSAOScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/SSAO/index.html b/static/Demos/SSAO/index.html
deleted file mode 100644
index a476111e9..000000000
--- a/static/Demos/SSAO/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Screen Space Ambient Occlusion demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/SSAO/ssao.js b/static/Demos/SSAO/ssao.js
deleted file mode 100644
index 5cf5fda38..000000000
--- a/static/Demos/SSAO/ssao.js
+++ /dev/null
@@ -1,48 +0,0 @@
-var CreateSSAOScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", -2.5, 1.0, 200, new BABYLON.Vector3(0, 0, 0), scene);
-
- // The first parameter can be used to specify which mesh to import. Here we import all meshes
- BABYLON.SceneLoader.Append("/assets/cat/", "cat.babylon", scene, function () {
-
- scene.activeCamera = camera;
-
- // Create ssao rendering pipeline
- /*
- SSAO is a rendering pipeline, so we have to attach it to cameras
- The ratio is used by SSAO & Blur post-processes before adding to the
- original scene color to save performances. It is advised to use a ratio
- between 0.5 or 0.25 for enough good results and performances.
- You can also attach cameras directly by passing an array of Camera to the
- last parameter.
- */
-
- var ssao = new BABYLON.SSAORenderingPipeline('ssaopipeline', scene, { ssaoRatio: 0.5, combineRatio: 1.0 });
- ssao.fallOff = 0.000001;
- ssao.area = 1;
- ssao.radius = 0.0004;
- ssao.totalStrength = 2;
- ssao.base = 1.3;
-
- scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline("ssaopipeline", camera);
-
- window.addEventListener("keydown", function (evt) {
- // draw SSAO with scene when pressed "1"
- if (evt.keyCode === 49) {
- scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline("ssaopipeline", camera);
- scene.postProcessRenderPipelineManager.enableEffectInPipeline("ssaopipeline", ssao.SSAOCombineRenderEffect, camera);
- }
- // draw without SSAO when pressed "2"
- else if (evt.keyCode === 50) {
- scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline("ssaopipeline", camera);
- }
- // draw only SSAO when pressed "3"
- else if (evt.keyCode === 51) {
- scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline("ssaopipeline", camera);
- scene.postProcessRenderPipelineManager.disableEffectInPipeline("ssaopipeline", ssao.SSAOCombineRenderEffect, camera);
- }
- });
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/SSAO2/demo.js b/static/Demos/SSAO2/demo.js
deleted file mode 100644
index 95cf40030..000000000
--- a/static/Demos/SSAO2/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateSSAOScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/SSAO2/index.html b/static/Demos/SSAO2/index.html
deleted file mode 100644
index 42234c335..000000000
--- a/static/Demos/SSAO2/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
- Babylon.js - Screen Space Ambient Occlusion demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/SSAO2/ssao.js b/static/Demos/SSAO2/ssao.js
deleted file mode 100644
index e29e176ec..000000000
--- a/static/Demos/SSAO2/ssao.js
+++ /dev/null
@@ -1,75 +0,0 @@
-var CreateSSAOScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", -2.5, 1.0, 200, new BABYLON.Vector3(0, 0, 0), scene);
-
- // The first parameter can be used to specify which mesh to import. Here we import all meshes
- BABYLON.SceneLoader.Append("/assets/cat/", "cat.babylon", scene, function () {
-
- scene.activeCamera = camera;
-
- // Create ssao 2 rendering pipeline
-
- // Create SSAO and configure all properties (for the example)
- var ssaoRatio = {
- ssaoRatio: 0.5, // Ratio of the SSAO post-process, in a lower resolution
- blurRatio: 1.0 // Ratio of the combine post-process (combines the SSAO and the scene)
- };
-
- var ssao = new BABYLON.SSAO2RenderingPipeline("ssao", scene, ssaoRatio);
- ssao.radius = 42;
- ssao.totalStrength = 0.9;
- ssao.base = 0.2;
- ssao.expensiveBlur = true;
- ssao.samples = 16;
- ssao.maxZ = 2500;
-
- // Attach camera to the SSAO render pipeline
- scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline("ssao", camera);
-
- window.addEventListener("keydown", function (evt) {
- // draw SSAO with scene when pressed "1"
- if (evt.keyCode === 49) {
- scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline("ssao", camera);
- scene.postProcessRenderPipelineManager.enableEffectInPipeline("ssao", ssao.SSAOCombineRenderEffect, camera);
- }
- // draw without SSAO when pressed "2"
- else if (evt.keyCode === 50) {
- scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline("ssao", camera);
- }
- // draw only SSAO when pressed "3"
- else if (evt.keyCode === 51) {
- scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline("ssao", camera);
- scene.postProcessRenderPipelineManager.disableEffectInPipeline("ssao", ssao.SSAOCombineRenderEffect, camera);
- }
- });
-
- var gui = new dat.GUI({ autoPlace : false});
- var elt = document.getElementById("gui");
- elt.style.position = "absolute";
- elt.style.right = "0px";
- elt.style.bottom = "0px";
- elt.appendChild(gui.domElement);
- gui.add(ssao, "radius", 1.0, 150.0);
- gui.add(ssao, "totalStrength", 0.1, 10);
- gui.add(ssao, "base", 0.0, 1.0);
- var samples = gui.add(ssao, "samples", 2, 32).step(1);
- gui.add(ssao, "expensiveBlur");
-
- ssao.ssaoRatio = 0.5;
- ssao.blurRatio = 1.0;
- var ssaoRatio = gui.add(ssao, "ssaoRatio", { Quarter: 0.25, Half: 0.5, Full: 1 });
- var blurRatio = gui.add(ssao, "blurRatio", { Quarter: 0.25, Half: 0.5, Full: 1 });
-
- ssaoRatio.onChange(function(value) {
- ssao._blurHPostProcess._options = value;
- });
-
- blurRatio.onChange(function(value) {
- ssao._blurVPostProcess._options = value;
- ssao._ssaoCombinePostProcess._options = value;
- });
-
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/SelfShadowing/demo.js b/static/Demos/SelfShadowing/demo.js
deleted file mode 100644
index 1eef86fad..000000000
--- a/static/Demos/SelfShadowing/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateShadowsTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/SelfShadowing/index.html b/static/Demos/SelfShadowing/index.html
deleted file mode 100644
index 3039ef11a..000000000
--- a/static/Demos/SelfShadowing/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Self-Shadowing demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/SelfShadowing/shadows.js b/static/Demos/SelfShadowing/shadows.js
deleted file mode 100644
index 7da335677..000000000
--- a/static/Demos/SelfShadowing/shadows.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var CreateShadowsTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
-
- // Setup environment
- var camera = new BABYLON.FreeCamera("Camera", new BABYLON.Vector3(0, 0, -20), scene);
- camera.attachControl(canvas, true);
- // light1
- var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(-1, -2, -1), scene);
- light.position = new BABYLON.Vector3(20, 40, 20);
-
- // Torus
- var torus = BABYLON.Mesh.CreateTorusKnot("knot", 2, 0.5, 128, 64, 2, 3, scene);
- torus.position.x = -5;
-
- var torus2 = BABYLON.Mesh.CreateTorusKnot("knot", 2, 0.5, 128, 64, 2, 3, scene);
- torus2.position.x = 5;
-
- // Shadows
- var shadowGenerator = new BABYLON.ShadowGenerator(1024, light, true);
- shadowGenerator.getShadowMap().renderList.push(torus);
- shadowGenerator.useBlurExponentialShadowMap = true;
- light.shadowMinZ = 1;
- light.shadowMaxZ = 2500;
- shadowGenerator.depthScale = 2500;
- shadowGenerator.bias = 0.001;
-
- torus.receiveShadows = true;
-
- scene.registerBeforeRender(function() {
- torus.rotation.x += 0.01;
- torus2.rotation.x += 0.01;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Shadows/demo.js b/static/Demos/Shadows/demo.js
deleted file mode 100644
index 1eef86fad..000000000
--- a/static/Demos/Shadows/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateShadowsTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Shadows/index.html b/static/Demos/Shadows/index.html
deleted file mode 100644
index c7cf3f0ae..000000000
--- a/static/Demos/Shadows/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Shadows demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Shadows/shadows.js b/static/Demos/Shadows/shadows.js
deleted file mode 100644
index 69345acfc..000000000
--- a/static/Demos/Shadows/shadows.js
+++ /dev/null
@@ -1,89 +0,0 @@
-var CreateShadowsTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, BABYLON.Vector3.Zero(), scene);
- var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0, -1, -0.2), scene);
- var light2 = new BABYLON.DirectionalLight("dir02", new BABYLON.Vector3(-1, -2, -1), scene);
- light.position = new BABYLON.Vector3(0, 30, 0);
- light2.position = new BABYLON.Vector3(10, 20, 10);
-
- light.intensity = 0.6;
- light2.intensity = 0.6;
-
- camera.setPosition(new BABYLON.Vector3(-20, 20, 0));
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 1000.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/night", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
-
- // Ground
- var ground = BABYLON.Mesh.CreateGround("ground", 1000, 1000, 1, scene, false);
- var groundMaterial = new BABYLON.StandardMaterial("ground", scene);
- if (engine.getCaps().s3tc) {
- groundMaterial.diffuseTexture = new BABYLON.Texture("grass.dds", scene);
- } else {
- groundMaterial.diffuseTexture = new BABYLON.Texture("grass.jpg", scene);
- }
- groundMaterial.diffuseTexture.uScale = 60;
- groundMaterial.diffuseTexture.vScale = 60;
- groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- ground.position.y = -2.05;
- ground.material = groundMaterial;
-
- // Torus
- var torus = BABYLON.Mesh.CreateTorus("torus", 8, 2, 32, scene, false);
- torus.position.y = 6.0;
- var torus2 = BABYLON.Mesh.CreateTorus("torus2", 4, 1, 32, scene, false);
- torus2.position.y = 6.0;
-
- var torusMaterial = new BABYLON.StandardMaterial("torus", scene);
- torusMaterial.diffuseColor = new BABYLON.Color3(0.5, 0.5, 0.5);
- torusMaterial.specularColor = new BABYLON.Color3(0.5, 0.5, 0.5);
- torus.material = torusMaterial;
- torus2.material = torusMaterial;
-
- // Shadows
- var shadowGenerator = new BABYLON.ShadowGenerator(512, light);
- shadowGenerator.getShadowMap().renderList.push(torus);
- shadowGenerator.getShadowMap().renderList.push(torus2);
- shadowGenerator.useVarianceShadowMap = true;
-
- var shadowGenerator2 = new BABYLON.ShadowGenerator(512, light2);
- shadowGenerator2.getShadowMap().renderList.push(torus);
- shadowGenerator2.getShadowMap().renderList.push(torus2);
- shadowGenerator2.useVarianceShadowMap = true;
-
- ground.receiveShadows = true;
-
- var beforeRenderFunction = function () {
- // Camera
- if (camera.beta < 0.1)
- camera.beta = 0.1;
- else if (camera.beta > (Math.PI / 2) * 0.99)
- camera.beta = (Math.PI / 2) * 0.99;
-
- if (camera.radius > 150)
- camera.radius = 150;
-
- if (camera.radius < 5)
- camera.radius = 5;
- };
-
- scene.registerBeforeRender(beforeRenderFunction);
-
- // Animations
- scene.registerBeforeRender(function () {
- torus.rotation.x += 0.01;
- torus.rotation.z += 0.02;
- torus2.rotation.x += 0.02;
- torus2.rotation.y += 0.01;
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Simplification/index.html b/static/Demos/Simplification/index.html
deleted file mode 100644
index 83923dbb3..000000000
--- a/static/Demos/Simplification/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
- Babylon - Basic scene
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Simplification/main.js b/static/Demos/Simplification/main.js
deleted file mode 100644
index eec4c6516..000000000
--- a/static/Demos/Simplification/main.js
+++ /dev/null
@@ -1,133 +0,0 @@
-var createScene = function (engine, canvas) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("ArcRotateCamera", 1, 0.8, 100, new BABYLON.Vector3(0, 0, 0), scene);
- camera.setTarget(BABYLON.Vector3.Zero());
- camera.attachControl(canvas, false);
- var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
- light.intensity = .5;
-
- var simplificationObject = new SimplificationGUI(scene);
-
- scene.registerBeforeRender(function () {
- if (simplificationObject.turnObject) {
- camera.alpha += 0.005;
- }
- if (scene.meshes.length === 0) return;
- var totals = scene.meshes.filter(function (mesh) {
- return !mesh._masterMesh
- }).map(function (mesh) {
- var lodObj = mesh.getLOD(camera);
- return {
- vertices: lodObj.getTotalVertices(),
- indices: lodObj.getTotalIndices()
- };
- }).reduce(function (prev, curr) {
- return {
- vertices: curr.vertices + prev.vertices,
- indices: curr.indices + prev.indices
- }
- });
-
- simplificationObject.vertices = totals.vertices;
- simplificationObject.indices = totals.indices;
- });
- generateGui(simplificationObject, scene, engine);
-
- var selectElement = document.getElementsByTagName("select")[0];
- selectElement.value = "Dude";
- fireEvent(selectElement, "change");
-
- return scene;
-};
-
-var SimplificationGUI = function (scene) {
- this.running = false;
- this.Click_To_Simplify = function () {
- if (this.running) return;
- this.running = true;
-
- this.state = "Simplifying...";
- var now = new Date().getTime() / 1000;
- var _this = this;
-
- scene.meshes.forEach(function (mesh) {
- if(!mesh.isVisible) return;
- if (mesh.hasLODLevels) {
- for (var index = 0; index < mesh._LODLevels.length; index++) {
- mesh._LODLevels[index].mesh.dispose();
- mesh.removeLODLevel(mesh._LODLevels[index].mesh);
- }
- }
- mesh.simplify([{ quality: _this.quality, distance: _this.atDistance, optimizeMesh: _this.optimizeMesh }],
- false, BABYLON.SimplificationType.QUADRATIC, function () {
- _this.running = false;
- var ms = Math.floor((new Date().getTime() / 1000 - now) * 1000) / 1000;
- _this.state = "Simplified in " + ms + " sec";
- });
- });
- };
- this.state = "Loaded";
- this.optimizeMesh = false;
- this.quality = 0.6;
- this.meshType = "HeightMap";
- this.atDistance = 40;
- this.vertices = 0;
- this.indices = 0;
- this.turnObject = true;
-}
-
-function fireEvent(obj, evt){
- var fireOnThis = obj;
- if( document.createEvent ) {
- var evObj = document.createEvent('MouseEvents');
- evObj.initEvent( evt, true, false );
- fireOnThis.dispatchEvent( evObj );
- }
-}
-
-var generateGui = function (simplificationObject, scene, engine) {
- var gui = new dat.GUI();
- gui.add(simplificationObject, 'state').listen();
- gui.add(simplificationObject, 'optimizeMesh').listen();
- gui.add(simplificationObject, 'quality', 0.01, 0.99);
- gui.add(simplificationObject, 'atDistance').min(0);
- var meshController = gui.add(simplificationObject, 'meshType', ['HeightMap', 'Skull', 'Cat', 'Snowman', 'Rabbit', 'Dude']);
- meshController.onChange(function (value) {
- engine.displayLoadingUI();
- simplificationObject.state = "Loading";
- scene.meshes.forEach(function (mesh) {
- if (mesh.hasLODLevels) {
- for (var index = 0; index < mesh._LODLevels.length; index++) {
- mesh._LODLevels[index].mesh.dispose();
- }
- }
- mesh.dispose();
- });
- scene.meshes = [];
- switch (value) {
- case "HeightMap":
- simplificationObject.optimizeMesh = false;
- BABYLON.Mesh.CreateGroundFromHeightMap("ground", "/Assets/heightmap.jpg", 100, 100, 150, 0, 20, scene, false, function (mesh) {
- engine.hideLoadingUI();
- scene.activeCamera.target = mesh;
- simplificationObject.state = "Loaded";
- });
- break;
- default:
- simplificationObject.optimizeMesh = true;
- var meshToLoad = (value==="Cat") ? "Shcroendiger'scat" : "";
- BABYLON.SceneLoader.ImportMesh(meshToLoad, "/Assets/" + value + "/", value + ".babylon", scene, function (newMeshes) {
- var selectedMesh = newMeshes[2] || newMeshes[1] || newMeshes[0];
- scene.activeCamera.target = selectedMesh.getBoundingInfo().boundingBox.center || newMeshes[0];
- engine.hideLoadingUI();
- simplificationObject.state = "Loaded";
- });
- break;
- }
- });
-
- gui.add(simplificationObject, 'vertices').listen();
- gui.add(simplificationObject, 'indices').listen();
- gui.add(simplificationObject, 'turnObject');
- gui.add(simplificationObject, 'Click_To_Simplify');
-}
\ No newline at end of file
diff --git a/static/Demos/SoftShadows/demo.js b/static/Demos/SoftShadows/demo.js
deleted file mode 100644
index ff66e3c5b..000000000
--- a/static/Demos/SoftShadows/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateSoftShadowsTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/SoftShadows/index.html b/static/Demos/SoftShadows/index.html
deleted file mode 100644
index 84519ccb7..000000000
--- a/static/Demos/SoftShadows/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Soft Shadows demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/SoftShadows/softShadows.js b/static/Demos/SoftShadows/softShadows.js
deleted file mode 100644
index 5042ad1f4..000000000
--- a/static/Demos/SoftShadows/softShadows.js
+++ /dev/null
@@ -1,58 +0,0 @@
-var CreateSoftShadowsTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", -2.5, 1.0, 200, new BABYLON.Vector3(0, 1.0, 0), scene);
-
- BABYLON.SceneLoader.Append("../../assets/", "SSAOcat.babylon", scene, function () {
-
- scene.lights[0].dispose();
- scene.activeCamera = camera;
- camera.attachControl(engine.getRenderingCanvas(), false);
-
- var light = new BABYLON.DirectionalLight("light", new BABYLON.Vector3(0, -0.5, 0.8), scene);
- var light2 = new BABYLON.DirectionalLight("light", new BABYLON.Vector3(0, -0.5, 0.8), scene);
- var light3 = new BABYLON.DirectionalLight("light", new BABYLON.Vector3(0, -0.5, 0.8), scene);
-
- light.position = new BABYLON.Vector3(0, 120.0, -10);
- light2.position = new BABYLON.Vector3(0, 120.0, -10);
- light3.position = new BABYLON.Vector3(0, 120.0, -10);
-
- light.diffuse = BABYLON.Color3.Red();
- light2.diffuse = BABYLON.Color3.Green();
- light3.diffuse = BABYLON.Color3.Blue();
-
- var cat = scene.meshes[2];
- cat.receiveShadows = false;
-
- // Shadows
- var generator = new BABYLON.ShadowGenerator(512, light);
- generator.getShadowMap().renderList.push(cat);
- generator.useBlurExponentialShadowMap = true;
- generator.blurBoxOffset = 2.0;
-
- var generator2 = new BABYLON.ShadowGenerator(512, light2);
- generator2.getShadowMap().renderList.push(cat);
- generator2.useBlurExponentialShadowMap = true;
- generator2.blurBoxOffset = 2.0;
-
- var generator3 = new BABYLON.ShadowGenerator(512, light3);
- generator3.getShadowMap().renderList.push(cat);
- generator3.useBlurExponentialShadowMap = true;
- generator3.blurBoxOffset = 2.0;
-
- // Animations
- var alpha = 0;
- scene.registerBeforeRender(function() {
- light.direction.z = 0.8 * Math.cos(alpha);
- light.direction.x = 0.3 * Math.sin(alpha);
-
- light2.direction.z = 0.3 * Math.cos(alpha);
- light2.direction.x = 0.8 * Math.sin(alpha);
-
- light3.direction.x = 0.3 * Math.cos(alpha);
- light3.direction.z = 0.8 * Math.sin(alpha);
- alpha += 0.01;
- });
- });
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/SpaceDeK/demo.js b/static/Demos/SpaceDeK/demo.js
deleted file mode 100644
index 0b57a3c9a..000000000
--- a/static/Demos/SpaceDeK/demo.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var demo = {
- scene: "SpaceDeK",
- incremental: false,
- binary: false,
- doNotUseCDN: false,
- collisions: true,
- offline: true,
- onload: function () {
- scene.collisionsEnabled = false;
- }
-};
\ No newline at end of file
diff --git a/static/Demos/SpaceDeK/index.html b/static/Demos/SpaceDeK/index.html
deleted file mode 100644
index 452f589e1..000000000
--- a/static/Demos/SpaceDeK/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Babylon.js - Omega Crusher demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
diff --git a/static/Demos/Spaceship/demo.js b/static/Demos/Spaceship/demo.js
deleted file mode 100644
index fe2183424..000000000
--- a/static/Demos/Spaceship/demo.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var demo = {
- scene: "Spaceship",
- incremental: false,
- binary: false,
- doNotUseCDN: false,
- collisions: true,
- offline: false,
- freeze: true,
- onload: function () {
-
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Spaceship/demoNoRendering.js b/static/Demos/Spaceship/demoNoRendering.js
deleted file mode 100644
index d0fe1269e..000000000
--- a/static/Demos/Spaceship/demoNoRendering.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var demo = {
- scene: "",
- incremental: false,
- binary: false,
- doNotUseCDN: false,
- collisions: true,
- offline: false,
- onload: function () {
-
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Spaceship/index.html b/static/Demos/Spaceship/index.html
deleted file mode 100644
index af7374209..000000000
--- a/static/Demos/Spaceship/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Babylon.js - Spaceship demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Spaceship/indexNoRendering.html b/static/Demos/Spaceship/indexNoRendering.html
deleted file mode 100644
index 8cec39152..000000000
--- a/static/Demos/Spaceship/indexNoRendering.html
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
- Babylon.js - Spaceship demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/SponzaDynamicShadows/demo.js b/static/Demos/SponzaDynamicShadows/demo.js
deleted file mode 100644
index f858e8aea..000000000
--- a/static/Demos/SponzaDynamicShadows/demo.js
+++ /dev/null
@@ -1,61 +0,0 @@
-var demo = {
- scene: "SponzaDynamicShadows",
- incremental: false,
- binary: false,
- doNotUseCDN: false,
- collisions: true,
- offline: false,
- onload: function () {
- var node = scene.getMeshByName("litghtmesh");
- var particleSystem = new BABYLON.ParticleSystem("New Particle System", 1000, scene);
- particleSystem.emitter = node;
- particleSystem.name = "New Particle System";
- particleSystem.renderingGroupId = 0;
- particleSystem.emitRate = 200;
- particleSystem.manualEmitCount = -1;
- particleSystem.updateSpeed = 0.005;
- particleSystem.targetStopDuration = 0;
- particleSystem.disposeOnStop = false;
- particleSystem.minEmitPower = 0;
- particleSystem.maxEmitPower = 0.3;
- particleSystem.minLifeTime = 0.2;
- particleSystem.maxLifeTime = 0.5;
- particleSystem.minSize = 0.05;
- particleSystem.maxSize = 0.8;
- particleSystem.minAngularSpeed = 0;
- particleSystem.maxAngularSpeed = 6.283185307179586;
- particleSystem.layerMask = 268435455;
- particleSystem.blendMode = 0;
- particleSystem.forceDepthWrite = false;
- particleSystem.gravity = new BABYLON.Vector3(0, 0, 0);
- particleSystem.direction1 = new BABYLON.Vector3(-7, 8, 3);
- particleSystem.direction2 = new BABYLON.Vector3(7, 8, -3);
- particleSystem.minEmitBox = new BABYLON.Vector3(0, 0, 0);
- particleSystem.maxEmitBox = new BABYLON.Vector3(0, 0, 0);
- particleSystem.color1 = new BABYLON.Color3(0.7, 0.8, 0.5465114353377606);
- particleSystem.color2 = new BABYLON.Color3(0.6707185797327061, 0.5, 0.23185333620389842);
- particleSystem.colorDead = new BABYLON.Color3(0.2980971465478694, 0, 0.3312190517198549);
- particleSystem.textureMask = new BABYLON.Color4(1, 1, 1, 1);
- particleSystem.id = "New Particle System";
- particleSystem.particleTexture = BABYLON.Texture.CreateFromBase64String("data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABkAAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjdENzY1NjNCQjk0RjExRTU5OEQ4QkJFMENFNjYwODI0IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjdENzY1NjNDQjk0RjExRTU5OEQ4QkJFMENFNjYwODI0Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6N0Q3NjU2MzlCOTRGMTFFNTk4RDhCQkUwQ0U2NjA4MjQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6N0Q3NjU2M0FCOTRGMTFFNTk4RDhCQkUwQ0U2NjA4MjQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAgICAgICAgICAgIDAwMDAwMDAwMDAQEBAQEBAQIBAQICAgECAgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwP/wAARCACAAIADAREAAhEBAxEB/8QBogAAAAYCAwEAAAAAAAAAAAAABwgGBQQJAwoCAQALAQAABgMBAQEAAAAAAAAAAAAGBQQDBwIIAQkACgsQAAIBAwQBAwMCAwMDAgYJdQECAwQRBRIGIQcTIgAIMRRBMiMVCVFCFmEkMxdScYEYYpElQ6Gx8CY0cgoZwdE1J+FTNoLxkqJEVHNFRjdHYyhVVlcassLS4vJkg3SThGWjs8PT4yk4ZvN1Kjk6SElKWFlaZ2hpanZ3eHl6hYaHiImKlJWWl5iZmqSlpqeoqaq0tba3uLm6xMXGx8jJytTV1tfY2drk5ebn6Onq9PX29/j5+hEAAgEDAgQEAwUEBAQGBgVtAQIDEQQhEgUxBgAiE0FRBzJhFHEIQoEjkRVSoWIWMwmxJMHRQ3LwF+GCNCWSUxhjRPGisiY1GVQ2RWQnCnODk0Z0wtLi8lVldVY3hIWjs8PT4/MpGpSktMTU5PSVpbXF1eX1KEdXZjh2hpamtsbW5vZnd4eXp7fH1+f3SFhoeIiYqLjI2Oj4OUlZaXmJmam5ydnp+So6SlpqeoqaqrrK2ur6/9oADAMBAAIRAxEAPwD5/wD7917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xunrb1AcnmKShVdRn+4sLXv46WeX6f4eP37r3Xtw0BxmYq6EjSYPt7i1reSlgm+n/Tz37r3TL7917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3XuhY6OxRzfaO18YE1/c/xr0Wvfw7ey1R9P+nXv3Xuvd44o4TtHdGMKFDTfwX0EWI823cTUfT/AFpffuvdBP7917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3XujU/CjCPuD5NdaYkRNIKv++XAUsCIOv8AddTf6EceH37r3XfzWwb7f+TPZeKMTxil/ub6dJAHn6/2rU/0/wCb3v3Xuiq+/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3XunHH4yqyMgSBGIJsWsbf7D37r3Qy7a6oq68xs8DuWtyVJ+v+w49+691aP8Ayz+g5q35ldMwvRkrIOwiR47309U75e30/qPfuvdZ/wCZb0DNR/MruaJKMqqDrzgR2HPVOxmP4/q3v3Xuqwdy9RVVFrZad1K3NwpH/EfQe/de6BLK4SsxcjLNG2gEjVb6W/1X49+690ze/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3XunHGY+TI1SQICQWGoj+l/p7917o43VfVbVzU/wDk976P7H09+691ZP1h8fmq0p/8iJuE/wB1/wCt+LX9+691dN/LL+Nn2ny96crHoLLEu/8AkxWtr6t3rGPxxy/v3Xupv8yz41/efL3uKtSguJV2BYiL/jn1bsiL+n9U9+691Td2X8eWpI5/8hIsG/3X/h/Qj37r3Vbfa3UrUJqP8m02Lf2Lf14+nv3XuiP53Dy4mreJlITUQLj9JB+n+tf37r3TH7917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuh26o20a+rgdo9Rd1J4v9SP969+691cR8fusEq2ov8nBuY/7H+tb8f19+691eF0R0RHVx0f+Rg3Ef+6/9b/D6+/de6vN+CPQEWE7466zRogn2ibr9Xjtp+52PuSlH44v57e/de6dfnD8fY853v2JmRRB/u02tZvHe/2+yNt031tbjwe/de6pQ7y6DjpIqv8AyIAAP/uv+n9ePfuvdUh/IPqtKNq21OBbX/Yt9L/4f09+691TL3DtP7KoqSsenSzWNrWsbg/19+690WMggkH6gkH/AFx7917rr37r3Xvfuvde9+691737r3TzQbey+TKiipPMWtb/ACilivf6f56eMD37r3S/xXR/aOaKjGbY+5L203zW3YL3+n/AjLQ29+690KOE+FHya3A8QxXWn3YkZQv+/wAtgQXDEf8AKzuqG3Hv3XurFOg/5Z/zKrZqN4emRIpMdiewuql4Nvw++AffuvdXz/Gz+WX8vaT7B6zpxYlHiJP9/wDq17Wt+I96v7917q+noD4I98YSKiOa66Sk0CPVfdWyKm1rX4pdyTXt/hf37r3VxnQnQud2RncNmcxhkofsErQzCtxlSVNRjaujAAo6uoJBNRbi/wBffuvdPHdnReW3pm8vl8ViY6xq9KMKfu8fTljTY2kpP+UqpgPBp7c29+691Ul318He7c3FWnC9fpV6xIUI3Psym1A3sf8AKtwwWvf8+/de6of+Sf8ALQ+W9cK96Hp9JlPkIP8Af7q+P+tv87vSP37r3VB/yC/llfMyllrHfpgIoaTn/SH1STYXJ4XfJP09+691WLuP4NfKLb1TUjKdX/arHI1/9/r15PYX/pTbtmJ59+690E2V6D7awmoZTaf2un9X+53bU1rfX/gPmZb+/de6D7IbWzuLJFfQ+Ar9R9zRyW/6k1En9PfuvdMBBBIP1Bsf9ce/de669+6909UO4cxjSDRVngK/T/J6WS3+wlgkB9+690vsV3j2jhdP8M3R9to/T/uF29Na3/URiZb/AOx9+690KWD+a/yawEkRxXZf2vjdCP8Afm9fzkAEfmp2pN+B7917qxroH+Zb8yqOajSHuUIqmMAf6POqT9LH+1sZr29+691fb8a/5lny8rfsEre4llU+IEf3A6tj+tv+OWyEt7917q/H4+/OHvfORUQzPYiVeoJqH91tkU972v8A8BttwW49+691cf0X3Zmt6ZbE4rMZdK9q2Oquoo8bTFjBj6mqv/kdJARYwX4/p7917p57m7myezsnlMZjMpHRSUUdMQDTUFQQaigpqr/lKppiSTNfn37r3VR3fvzV7swUVaMLv9KMIJAg/uzsyosBe3/Arb05NvfuvdUMfJT+ZN8t6AV6UPcCwqPJpA2F1hJb62sZdlSE8e/de6oJ+Qn8zH5mVMtaj9zh1LSD/mXnVA4Nx9V2KpP09+691V9uX5yfKLcFVVfxTtD7tXka4/uV15Bfnn/gNtKG1z7917oJcr3721m9Rym7PutV9X+4LbUN7/X/AID4aK3v3Xug+yG6c9lCxr67zljc/wCS0cVyfqf2aeO3v3XumAkkkn6k3P8Arn37r3XXv3Xuve/de697917r3v3XujDdRbl+yqqdWfSVdQbn+hH+2Hv3Xurmvjz2XHSNQ/vgWMf9of4Ee/de6vT6D7yipI6L/KwABH/bt/Tn37r3V6Pwd76izfdvX+FNaH+7Tc40GS+r7bZm4arkXP08F/fuvdOvzV79iwXdm/8ACitCCjTbNkElgPuNmbeqvpcWv5/fuvdUnd797xVcVZ/lgNxJ/uy973/x+vv3XuqMvkR2hHVmutUA38n9r+t7f7x7917qlTubdS1dRVASBrs9rH/E/Qj37r3RUGJZix+rEk/65N/fuvdde/de697917r3v3Xuve/de697917r3v3Xuve/de6ecJlZMXWRzKxCahqsbW/2r/be/de6PH1L2saFqb/KCNOj+1/S3059+691Z31X8g2o0px97awT+3b6W/xt7917q63+Wh8kxW/Lfp+hevusyb+uDJ9fH1fvSX+p/wCOfv3Xup38yb5KCg+W/cFClfZYV2FZRJ9PL1hsqa1r/kye/de6po7Q+RBq46gffXuG/wB2X/3i9vfuvdVkduduGuNT/lJNy/8Ab+v1/wAfp7917oge587JmKyRtZaMOT9eCb3/AN4Pv3Xukv7917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de6fMPnavEyq0TtoBBsCQV/1vzb37r3Rgdp9w1FF41NSy6bXGoi1v6g/wCPv3XurV/5ZXyClpfmZ0u71pCoOwwbycXPVO+VH1P9T7917qT/ADMfkHLU/Mzud0rWKsOvLWc246p2Kv4P+0+/de6qy3V3NUVayAVTHUCLaz/rEfX37r3Rd87ueszEj6pHEbE/Um5H+x5Hv3Xukv7917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3XuuwSDcEg/1BsffuvdG5+DW46nb3yi6vygqZI1pf763OsgDz9ebtpvqTx/nvfuvde+cm5KrcHyi7Pyn3UjrVf3K51fXwdd7Spvr+beH37r3RRizMbsSx/qSSf8Aeffuvdde/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de6GHoPKnCds7TyYbQab+O+r6W822szT/1H/HX37r3Xu/Mr/G+2t2ZPVr+5/gXqve/g21hqf6/9OffuvdA97917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3Xuve/de697917r3v3XulDtWvOLz1BXBtJg+6s39PLR1EP+8+T37r3XW6sgcpnq+uZtRn+19V738VHTwj/AHiP37r3Sf8Afuvde9+691737r3Xvfuvde9+691737r3Xvfuvde9+691737r3Xvfuvde9+691737r3Xvfuvde9+6914EjkEg/wBRx7917rskk3JJP9Tyffuvdde/de697917r3v3Xuve/de697917r3v3Xuve/de6//Z", "data:Part.jpg", scene);
- node.attachedParticleSystem = particleSystem;
- particleSystem.start();
- node = scene.getNodeByName("litghtmesh");
- node.position = new BABYLON.Vector3(2.5223299803446766, 2.0876, -3.525673483620715);
- node.rotation = new BABYLON.Vector3(0, 0, 0);
- node.rotationQuaternion = new BABYLON.Quaternion(0, 0, 0, -1);
- node.scaling = new BABYLON.Vector3(1, 1, 1);
-
- scene.getLightByName("Omni002").direction = null;
- scene.getLightByName("Omni001").direction = null;
-
- var shadowGenerator = scene.getLightByName("Omni002").getShadowGenerator();
- shadowGenerator.getShadowMap().refreshRate = 0;
- shadowGenerator.forceBackFacesOnly = true;
- shadowGenerator.bias = 0.01;
-
- shadowGenerator = scene.getLightByName("Omni001").getShadowGenerator();
- shadowGenerator.forceBackFacesOnly = true;
- shadowGenerator.bias = 0.01;
- }
-};
\ No newline at end of file
diff --git a/static/Demos/SponzaDynamicShadows/img/SponzaDSFB.jpg b/static/Demos/SponzaDynamicShadows/img/SponzaDSFB.jpg
deleted file mode 100644
index 306767fe9..000000000
Binary files a/static/Demos/SponzaDynamicShadows/img/SponzaDSFB.jpg and /dev/null differ
diff --git a/static/Demos/SponzaDynamicShadows/img/SponzaDSTwitter.jpg b/static/Demos/SponzaDynamicShadows/img/SponzaDSTwitter.jpg
deleted file mode 100644
index 7682717ce..000000000
Binary files a/static/Demos/SponzaDynamicShadows/img/SponzaDSTwitter.jpg and /dev/null differ
diff --git a/static/Demos/SponzaDynamicShadows/index.html b/static/Demos/SponzaDynamicShadows/index.html
deleted file mode 100644
index 3da61a7b9..000000000
--- a/static/Demos/SponzaDynamicShadows/index.html
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
-
- Babylon.js - Sponza Dynamic Shadows
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/StandardRenderingPipeline/demo.js b/static/Demos/StandardRenderingPipeline/demo.js
deleted file mode 100644
index f18140386..000000000
--- a/static/Demos/StandardRenderingPipeline/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateStandardRenderingPipelineTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/StandardRenderingPipeline/index.html b/static/Demos/StandardRenderingPipeline/index.html
deleted file mode 100644
index eeab4caab..000000000
--- a/static/Demos/StandardRenderingPipeline/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Standard Rendering Pipeline demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/StandardRenderingPipeline/standardRenderingPipeline.js b/static/Demos/StandardRenderingPipeline/standardRenderingPipeline.js
deleted file mode 100644
index f0b955f1c..000000000
--- a/static/Demos/StandardRenderingPipeline/standardRenderingPipeline.js
+++ /dev/null
@@ -1,95 +0,0 @@
-var CreateStandardRenderingPipelineTestScene = function () {
- var scene = new BABYLON.Scene(engine);
- scene.clearColor = BABYLON.Color3.Black();
-
- var camera = new BABYLON.ArcRotateCamera("Camera", -Math.PI / 4, Math.PI / 2.5, 200, BABYLON.Vector3.Zero(), scene);
- camera.attachControl(canvas, true, false);
- camera.minZ = 0.1;
-
- // Light
- new BABYLON.PointLight("point", new BABYLON.Vector3(0, 40, 0), scene);
-
- // Environment Texture
- var hdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("/assets/environment.dds", scene);
-
- // Skybox
- var hdrSkybox = BABYLON.Mesh.CreateBox("hdrSkyBox", 1000.0, scene);
- var hdrSkyboxMaterial = new BABYLON.PBRMaterial("skyBox", scene);
- hdrSkyboxMaterial.backFaceCulling = false;
- hdrSkyboxMaterial.reflectionTexture = hdrTexture.clone();
- hdrSkyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- hdrSkyboxMaterial.microSurface = 1.0;
- hdrSkyboxMaterial.cameraExposure = 0.6;
- hdrSkyboxMaterial.cameraContrast = 1.6;
- hdrSkyboxMaterial.disableLighting = true;
- hdrSkybox.material = hdrSkyboxMaterial;
- hdrSkybox.infiniteDistance = true;
-
- // Create meshes
- var woodPlank = BABYLON.MeshBuilder.CreateBox("plane", { width: 65, height: 1, depth: 65 }, scene);
-
- // Create materials
- var wood = new BABYLON.PBRMaterial("wood", scene);
- wood.reflectionTexture = hdrTexture;
- wood.directIntensity = 1.5;
- wood.environmentIntensity = 0.5;
- wood.specularIntensity = 0.3;
- wood.cameraExposure = 0.9;
- wood.cameraContrast = 1.6;
-
- wood.reflectivityTexture = new BABYLON.Texture("/assets/reflectivity.png", scene);
- wood.useMicroSurfaceFromReflectivityMapAlpha = true;
-
- wood.albedoColor = BABYLON.Color3.White();
- wood.albedoTexture = new BABYLON.Texture("/assets/albedo.png", scene);
- woodPlank.material = wood;
-
- // Create rendering pipeline
- var pipeline = new BABYLON.StandardRenderingPipeline("standard", scene, 1.0, null, [camera]);
- pipeline.lensTexture = pipeline.lensFlareDirtTexture = new BABYLON.Texture("/assets/lensdirt.jpg", scene);
- pipeline.lensStarTexture = new BABYLON.Texture("/assets/lensstar.png", scene);
- pipeline.lensColorTexture = new BABYLON.Texture("/assets/lenscolor.png", scene);
- pipeline.lensFlareDistortionStrength = 35;
- pipeline.depthOfFieldDistance = 0.002;
- pipeline.depthOfFieldBlurWidth = 32;
- pipeline.lensFlareStength = 5;
- pipeline.motionStrength = 0.1;
- pipeline.motionBlurSamples = 32;
-
- // GUI
- var gui = new dat.GUI();
- gui.add(pipeline, "brightThreshold").min(0.0).max(2.0).step(0.01);
- gui.add(pipeline, "exposure").min(0.0).max(10.0).step(0.1);
- gui.add(pipeline, "blurWidth").min(0).max(512).step(0.01);
- gui.add(pipeline, "horizontalBlur");
-
- var lensFlare = gui.addFolder("Lens Flare");
- lensFlare.open();
- lensFlare.add(pipeline, "LensFlareEnabled");
- lensFlare.add(pipeline, "lensFlareStrength").min(0).max(50).step(0.01);
- lensFlare.add(pipeline, "lensFlareHaloWidth").min(0).max(10).step(0.01);
- lensFlare.add(pipeline, "lensFlareGhostDispersal").min(0).max(100).step(0.1);
- lensFlare.add(pipeline, "lensFlareDistortionStrength").min(0).max(100).step(0.1);
-
- var luminance = gui.addFolder("Luminance Adaptation");
- luminance.open();
- luminance.add(pipeline, "HDREnabled");
- luminance.add(pipeline, "hdrMinimumLuminance").min(0).max(2);
- luminance.add(pipeline, "hdrDecreaseRate").min(0).max(2);
- luminance.add(pipeline, "hdrIncreaseRate").min(0).max(2);
-
- var depthOfField = gui.addFolder("Depth Of Field");
- depthOfField.open();
- depthOfField.add(pipeline, "DepthOfFieldEnabled");
- depthOfField.add(pipeline, "depthOfFieldDistance").min(0).max(1).step(0.01);
-
- var motionBlur = gui.addFolder("Motion Blur");
- motionBlur.open();
- motionBlur.add(pipeline, "MotionBlurEnabled");
- motionBlur.add(pipeline, "motionStrength").min(0).max(10);
- motionBlur.add(pipeline, "motionBlurSamples").step(1).min(1).max(64);
-
- gui.width = 400;
-
- return scene;
-};
diff --git a/static/Demos/Starfield/babylon.starfieldProceduralTexture.min.js b/static/Demos/Starfield/babylon.starfieldProceduralTexture.min.js
deleted file mode 100644
index 8229aa4ff..000000000
--- a/static/Demos/Starfield/babylon.starfieldProceduralTexture.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var BABYLON;!function(t){var e=function(t){function e(e,i,n,a,r){t.call(this,e,i,"starfieldProceduralTexture",n,a,r),this._time=1,this._alpha=.5,this._beta=.8,this._zoom=.8,this._formuparam=.53,this._stepsize=.1,this._tile=.85,this._brightness=.0015,this._darkmatter=.4,this._distfading=.73,this._saturation=.85,this.updateShaderUniforms()}return __extends(e,t),e.prototype.updateShaderUniforms=function(){this.setFloat("time",this._time),this.setFloat("alpha",this._alpha),this.setFloat("beta",this._beta),this.setFloat("zoom",this._zoom),this.setFloat("formuparam",this._formuparam),this.setFloat("stepsize",this._stepsize),this.setFloat("tile",this._tile),this.setFloat("brightness",this._brightness),this.setFloat("darkmatter",this._darkmatter),this.setFloat("distfading",this._distfading),this.setFloat("saturation",this._saturation)},Object.defineProperty(e.prototype,"time",{get:function(){return this._time},set:function(t){this._time=t,this.updateShaderUniforms()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(t){this._alpha=t,this.updateShaderUniforms()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"beta",{get:function(){return this._beta},set:function(t){this._beta=t,this.updateShaderUniforms()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formuparam",{get:function(){return this._formuparam},set:function(t){this._formuparam=t,this.updateShaderUniforms()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stepsize",{get:function(){return this._stepsize},set:function(t){this._stepsize=t,this.updateShaderUniforms()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"zoom",{get:function(){return this._zoom},set:function(t){this._zoom=t,this.updateShaderUniforms()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tile",{get:function(){return this._tile},set:function(t){this._tile=t,this.updateShaderUniforms()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"brightness",{get:function(){return this._brightness},set:function(t){this._brightness=t,this.updateShaderUniforms()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"darkmatter",{get:function(){return this._darkmatter},set:function(t){this._darkmatter=t,this.updateShaderUniforms()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"distfading",{get:function(){return this._distfading},set:function(t){this._distfading=t,this.updateShaderUniforms()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saturation",{get:function(){return this._saturation},set:function(t){this._saturation=t,this.updateShaderUniforms()},enumerable:!0,configurable:!0}),e}(t.ProceduralTexture);t.StarfieldProceduralTexture=e}(BABYLON||(BABYLON={})),BABYLON.Effect.ShadersStore.starfieldProceduralTexturePixelShader="precision highp float;\n\n//defined as const as fragment shaders does not support uniforms in loops\n#define volsteps 20\n#define iterations 15\n\nvarying vec2 vPosition;\nvarying vec2 vUV;\n\nuniform float time;\nuniform float alpha;\nuniform float beta;\nuniform float zoom;\nuniform float formuparam;\nuniform float stepsize;\nuniform float tile;\nuniform float brightness;\nuniform float darkmatter;\nuniform float distfading;\nuniform float saturation;\n\nvoid main()\n{\n vec3 dir = vec3(vUV * zoom, 1.);\n\n float localTime = time * 0.0001;\n\n // Rotation\n mat2 rot1 = mat2(cos(alpha), sin(alpha), -sin(alpha), cos(alpha));\n mat2 rot2 = mat2(cos(beta), sin(beta), -sin(beta), cos(beta));\n dir.xz *= rot1;\n dir.xy *= rot2;\n vec3 from = vec3(1., .5, 0.5);\n from += vec3(-2., localTime*2., localTime);\n from.xz *= rot1;\n from.xy *= rot2;\n\n //volumetric rendering\n float s = 0.1, fade = 1.;\n vec3 v = vec3(0.);\n for (int r = 0; r < volsteps; r++) {\n vec3 p = from + s*dir*.5;\n p = abs(vec3(tile) - mod(p, vec3(tile*2.))); // tiling fold\n float pa, a = pa = 0.;\n for (int i = 0; i < iterations; i++) {\n p = abs(p) / dot(p, p) - formuparam; // the magic formula\n a += abs(length(p) - pa); // absolute sum of average change\n pa = length(p);\n }\n float dm = max(0., darkmatter - a*a*.001); //dark matter\n a *= a*a; // add contrast\n if (r > 6) fade *= 1. - dm; // dark matter, don't render near\n //v+=vec3(dm,dm*.5,0.);\n v += fade;\n v += vec3(s, s*s, s*s*s*s)*a*brightness*fade; // coloring based on distance\n fade *= distfading; // distance fading\n s += stepsize;\n }\n v = mix(vec3(length(v)), v, saturation); //color adjust\n gl_FragColor = vec4(v*.01, 1.);\n}";
\ No newline at end of file
diff --git a/static/Demos/Starfield/demo.js b/static/Demos/Starfield/demo.js
deleted file mode 100644
index d0e764698..000000000
--- a/static/Demos/Starfield/demo.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var demo = {
- constructor: CreateStarfieldScene,
- noAttachControl: true,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Starfield/index.html b/static/Demos/Starfield/index.html
deleted file mode 100644
index 7955a5df1..000000000
--- a/static/Demos/Starfield/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Starfield procedural texture demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Starfield/starfield.js b/static/Demos/Starfield/starfield.js
deleted file mode 100644
index a5cefd00f..000000000
--- a/static/Demos/Starfield/starfield.js
+++ /dev/null
@@ -1,42 +0,0 @@
-var CreateStarfieldScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, -30, BABYLON.Vector3.Zero(), scene);
-
- //get spaceship
- var spaceDek;
- BABYLON.SceneLoader.ImportMesh("Vaisseau", "http://david.blob.core.windows.net/babylonjs/banner/SpaceDek/", "SpaceDek.babylon", scene, function (newMeshes, particleSystems) {
- spaceDek = newMeshes[0];
- spaceDek.position = new BABYLON.Vector3(6, 0, 0);
- spaceDek.scaling = new BABYLON.Vector3(0.2, 0.2, 0.2);
- spaceDek.rotation.y = Math.PI;
- spaceDek.rotation.z = -Math.PI / 7 * 3;
- spaceDek.rotation.x = Math.PI;
-
- scene.stopAnimation(spaceDek);
- for (var i = 0; i < particleSystems.length; i++) {
- if (particleSystems[i].emitter.name == "Part006" || particleSystems[i].emitter.name == "Part007") {
- particleSystems[i].stop();
- }
- }
- });
-
- var hemisphericLight = new BABYLON.HemisphericLight("hemi", new BABYLON.Vector3(0, 0.5, 0), scene);
-
- var spaceScale = 10.0;
- var space = BABYLON.Mesh.CreateCylinder("space", 10 * spaceScale, 0, 6 * spaceScale, 20, 20, scene);
-
- var starfieldPT = new BABYLON.StarfieldProceduralTexture("starfieldPT", 512, scene);
- var starfieldMaterial = new BABYLON.StandardMaterial("starfield", scene);
- starfieldMaterial.diffuseTexture = starfieldPT;
- starfieldMaterial.diffuseTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- starfieldMaterial.backFaceCulling = false;
- starfieldPT.beta = 0.1;
-
- space.material = starfieldMaterial;
-
- scene.registerBeforeRender(function () {
- starfieldPT.time += scene.getAnimationRatio() * 0.8;
- });
-
- return scene;
-}
\ No newline at end of file
diff --git a/static/Demos/TheCar/demo.js b/static/Demos/TheCar/demo.js
deleted file mode 100644
index 3d6a1fc15..000000000
--- a/static/Demos/TheCar/demo.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var demo = {
- scene: "TheCar",
- incremental: false,
- binary: true,
- doNotUseCDN: false,
- collisions: true,
- offline: false,
- onload: function () {
- scene.getMeshByName("C-Max_Pneu_arrière_gauche").material.bumpTexture = null;
- scene.getMeshByID("b73467cc-d1b0-4b8b-a767-12a95e0e28cf").alphaIndex = 0;
- }
-};
\ No newline at end of file
diff --git a/static/Demos/TheCar/index.html b/static/Demos/TheCar/index.html
deleted file mode 100644
index cf709eaea..000000000
--- a/static/Demos/TheCar/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Babylon.js - The Car demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
diff --git a/static/Demos/Train/demo.js b/static/Demos/Train/demo.js
deleted file mode 100644
index 80e48d472..000000000
--- a/static/Demos/Train/demo.js
+++ /dev/null
@@ -1,42 +0,0 @@
-var demo = {
- scene: "Train",
- incremental: false,
- binary: false,
- doNotUseCDN: false,
- collisions: true,
- offline: true,
- onload: function () {
- var canvas = scene.getEngine().getRenderingCanvas();
- scene.collisionsEnabled = false;
- for (var index = 0; index < scene.cameras.length; index++) {
- scene.cameras[index].minZ = 10;
- }
-
- for (index = 0; index < scene.meshes.length; index++) {
- var mesh = scene.meshes[index];
-
- mesh.isBlocker = mesh.checkCollisions;
- }
-
- scene.activeCamera.detachControl(canvas);
- scene.activeCamera = scene.cameras[6];
- scene.activeCamera.attachControl(canvas);
- scene.getMaterialByName("terrain_eau").bumpTexture = null;
-
- // Postprocesses
- var bwPostProcess = new BABYLON.BlackAndWhitePostProcess("Black and White", 1.0, scene.cameras[2]);
- scene.cameras[2].name = "B&W";
-
- var sepiaKernelMatrix = BABYLON.Matrix.FromValues(
- 0.393, 0.349, 0.272, 0,
- 0.769, 0.686, 0.534, 0,
- 0.189, 0.168, 0.131, 0,
- 0, 0, 0, 0
- );
- var sepiaPostProcess = new BABYLON.FilterPostProcess("Sepia", sepiaKernelMatrix, 1.0, scene.cameras[3]);
- scene.cameras[3].name = "SEPIA";
-
- var serializationObject = BABYLON.SceneSerializer.Serialize(scene);
- var string = JSON.stringify(serializationObject);
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Train/index.html b/static/Demos/Train/index.html
deleted file mode 100644
index 4e096ad81..000000000
--- a/static/Demos/Train/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Babylon.js - Train demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
diff --git a/static/Demos/Tunnel/demo.js b/static/Demos/Tunnel/demo.js
deleted file mode 100644
index 8918298aa..000000000
--- a/static/Demos/Tunnel/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateTunnelScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Tunnel/index.html b/static/Demos/Tunnel/index.html
deleted file mode 100644
index 5c01158d0..000000000
--- a/static/Demos/Tunnel/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Tunnel demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Tunnel/tunnel.js b/static/Demos/Tunnel/tunnel.js
deleted file mode 100644
index 99c8ac056..000000000
--- a/static/Demos/Tunnel/tunnel.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var CreateTunnelScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- scene.clearColor = BABYLON.Color3.Black();
-
- var camera = new BABYLON.ArcRotateCamera("Camera", 0, Math.PI / 2, 400, BABYLON.Vector3.Zero(), scene);
- camera.setTarget(BABYLON.Vector3.Zero());
-
- var light = new BABYLON.PointLight('light1', new BABYLON.Vector3(0, 0, 10), scene);
- light.position = camera.position;
-
- var tunnelTexture = new BABYLON.Texture("Inundation.jpg", scene);
-
- var tunnelShader = new BABYLON.PostProcess("Tunnel", "./tunnelpp", ["time"], ["tunnelSampler"], 0.9, camera);
-
- var time = 0.0;
-
- tunnelShader.onApply = function (effect) {
- effect.setFloat("time", time / 5.0);
- if (tunnelTexture.isReady()) {
- effect.setTexture("tunnelSampler", tunnelTexture);
- }
- time += 0.1;
- };
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/V8/demo.js b/static/Demos/V8/demo.js
deleted file mode 100644
index 997789854..000000000
--- a/static/Demos/V8/demo.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var demo = {
- scene: "v8",
- incremental: false,
- binary: false,
- doNotUseCDN: false,
- collisions: true,
- offline: false,
- onload: function () {
- scene.activeCamera.minZ = 1;
- scene.lights[0].getShadowGenerator().usePoissonSampling = true;
- scene.lights[0].getShadowGenerator().bias = 0.01;
- }
-};
\ No newline at end of file
diff --git a/static/Demos/V8/index.html b/static/Demos/V8/index.html
deleted file mode 100644
index 0df599c36..000000000
--- a/static/Demos/V8/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Babylon.js - V8 demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/VertexData/clouds.js b/static/Demos/VertexData/clouds.js
deleted file mode 100644
index 1876cc16b..000000000
--- a/static/Demos/VertexData/clouds.js
+++ /dev/null
@@ -1,84 +0,0 @@
-// Shamefully inspired by Mr Doob's demo:http://www.mrdoob.com/lab/javascript/webgl/clouds/
-var CreateVertexDataTestScene = function(engine) {
- var scene = new BABYLON.Scene(engine);
- var start_time = Date.now();
-
- // Creating background layer using a dynamic texture with 2D canvas
- var background = new BABYLON.Layer("back0", null, scene);
- background.texture = new BABYLON.DynamicTexture("dynamic texture", 512, scene, true);
- var textureContext = background.texture.getContext();
- var size = background.texture.getSize();
-
- textureContext.clearRect(0, 0, size.width, size.height);
-
- var gradient = textureContext.createLinearGradient(0, 0, 0, 512);
- gradient.addColorStop(0, "#1e4877");
- gradient.addColorStop(0.5, "#4584b4");
-
- textureContext.fillStyle = gradient;
- textureContext.fillRect(0, 0, 512, 512);
- background.texture.update();
-
- var camera = new BABYLON.FreeCamera("camera", new BABYLON.Vector3(0, -128, 0), scene);
- camera.fov = 30;
- camera.minZ = 1;
- camera.maxZ = 3000;
-
- var cloudMaterial = new BABYLON.ShaderMaterial("cloud", scene, {
- vertexElement: "vertexShaderCode",
- fragmentElement: "fragmentShaderCode"
- },
- {
- needAlphaBlending: true,
- attributes: ["position", "uv"],
- uniforms: ["worldViewProjection"],
- samplers: ["textureSampler"]
- });
- cloudMaterial.setTexture("textureSampler", new BABYLON.Texture("cloud.png", scene));
- cloudMaterial.setFloat("fogNear", -100);
- cloudMaterial.setFloat("fogFar", 3000);
- cloudMaterial.setColor3("fogColor", BABYLON.Color3.FromInts(69, 132, 180));
-
-// Create merged planes
- size = 128;
- var count = 8000;
-
- var globalVertexData;
-
- for (var i = 0; i < count; i++) {
- var planeVertexData = BABYLON.VertexData.CreatePlane({ size: 128 });
-
- delete planeVertexData.normals; // We do not need normals
-
- // Transform
- var randomScaling = Math.random() * Math.random() * 1.5 + 0.5;
- var transformMatrix = BABYLON.Matrix.Scaling(randomScaling, randomScaling, 1.0);
- transformMatrix = transformMatrix.multiply(BABYLON.Matrix.RotationZ(Math.random() * Math.PI));
- transformMatrix = transformMatrix.multiply(BABYLON.Matrix.Translation(Math.random() * 1000 - 500, -Math.random() * Math.random() * 100, count - i));
-
- planeVertexData.transform(transformMatrix);
-
- // Merge
- if (!globalVertexData) {
- globalVertexData = planeVertexData;
- } else {
- globalVertexData.merge(planeVertexData);
- }
- }
-
- var clouds = new BABYLON.Mesh("Clouds", scene);
- globalVertexData.applyToMesh(clouds);
-
- clouds.material = cloudMaterial;
-
- var clouds2 = clouds.clone();
- clouds2.position.z = -500;
-
- scene.registerBeforeRender(function() {
- var cameraDepth = ((Date.now() - start_time) * 0.03) % 8000;
-
- camera.position.z = cameraDepth;
- });
-
- return scene;
-}
diff --git a/static/Demos/VertexData/demo.js b/static/Demos/VertexData/demo.js
deleted file mode 100644
index d45190c69..000000000
--- a/static/Demos/VertexData/demo.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var demo = {
- constructor: CreateVertexDataTestScene,
- onload: function (scene) {
- scene.activeCamera.detachControl(scene.getEngine().getRenderingCanvas());
- }
-};
\ No newline at end of file
diff --git a/static/Demos/VertexData/index.html b/static/Demos/VertexData/index.html
deleted file mode 100644
index 9c237aaab..000000000
--- a/static/Demos/VertexData/index.html
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
- Babylon.js - Vertex Data demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Viper/demo.js b/static/Demos/Viper/demo.js
deleted file mode 100644
index 172e64268..000000000
--- a/static/Demos/Viper/demo.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var demo = {
- scene: "Viper",
- incremental: false,
- binary: false,
- doNotUseCDN: false,
- collisions: true,
- offline: true,
- freeze: true,
- onload: function () {
-
- }
-};
\ No newline at end of file
diff --git a/static/Demos/Viper/index.html b/static/Demos/Viper/index.html
deleted file mode 100644
index 7a90abd52..000000000
--- a/static/Demos/Viper/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Babylon.js - Viper demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
diff --git a/static/Demos/VolumetricLightScattering/demo.js b/static/Demos/VolumetricLightScattering/demo.js
deleted file mode 100644
index 6e598af0b..000000000
--- a/static/Demos/VolumetricLightScattering/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateVolumetricLightScatteringScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/VolumetricLightScattering/index.html b/static/Demos/VolumetricLightScattering/index.html
deleted file mode 100644
index 80a6c7bef..000000000
--- a/static/Demos/VolumetricLightScattering/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- Babylon.js - Volumetric Light Scattering demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/VolumetricLightScattering/volumetricLightScattering.js b/static/Demos/VolumetricLightScattering/volumetricLightScattering.js
deleted file mode 100644
index 24dd6307c..000000000
--- a/static/Demos/VolumetricLightScattering/volumetricLightScattering.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var CreateVolumetricLightScatteringScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
-
- //Adding a light
- var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(20, 20, 100), scene);
-
- //Adding an Arc Rotate Camera
- var camera = new BABYLON.ArcRotateCamera("Camera", -0.5, 2.2, 100, BABYLON.Vector3.Zero(), scene);
-
- // The first parameter can be used to specify which mesh to import. Here we import all meshes
- BABYLON.SceneLoader.ImportMesh("", "../../assets/", "skull.babylon", scene, function (newMeshes) {
- // Set the target of the camera to the first imported mesh
- camera.target = newMeshes[0];
-
- newMeshes[0].material = new BABYLON.StandardMaterial("skull", scene);
- newMeshes[0].material.emissiveColor = new BABYLON.Color3(0.2, 0.2, 0.2);
- });
-
- // Create the "God Rays" effect (volumetric light scattering)
- var godrays = new BABYLON.VolumetricLightScatteringPostProcess('godrays', 1.0, camera, null, 100, BABYLON.Texture.BILINEAR_SAMPLINGMODE, engine, false);
-
- // By default it uses a billboard to render the sun, just apply the desired texture
- // position and scale
- godrays.mesh.material.diffuseTexture = new BABYLON.Texture('../../assets/sun.png', scene, true, false, BABYLON.Texture.BILINEAR_SAMPLINGMODE);
- godrays.mesh.material.diffuseTexture.hasAlpha = true;
- godrays.mesh.position = new BABYLON.Vector3(-150, 150, 150);
- godrays.mesh.scaling = new BABYLON.Vector3(350, 350, 350);
-
- light.position = godrays.mesh.position;
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/WCafe/demo.js b/static/Demos/WCafe/demo.js
deleted file mode 100644
index 6b2f05c1f..000000000
--- a/static/Demos/WCafe/demo.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var demo = {
- scene: "WCafe",
- incremental: false,
- binary: false,
- doNotUseCDN: false,
- collisions: true,
- offline: true,
- freeze: true,
- onload: function () {
-
- }
-};
\ No newline at end of file
diff --git a/static/Demos/WCafe/index.html b/static/Demos/WCafe/index.html
deleted file mode 100644
index b5442ff94..000000000
--- a/static/Demos/WCafe/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
- Babylon.js - Windows Café demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/WaterMaterial/babylon.waterMaterial.js b/static/Demos/WaterMaterial/babylon.waterMaterial.js
deleted file mode 100644
index 4ca8fbfc5..000000000
--- a/static/Demos/WaterMaterial/babylon.waterMaterial.js
+++ /dev/null
@@ -1,662 +0,0 @@
-///
-///
-
-var BABYLON;
-(function (BABYLON) {
- var maxSimultaneousLights = 4;
- var WaterMaterialDefines = (function (_super) {
- __extends(WaterMaterialDefines, _super);
- function WaterMaterialDefines() {
- _super.call(this);
- this.BUMP = false;
- this.REFLECTION = false;
- this.CLIPPLANE = false;
- this.ALPHATEST = false;
- this.POINTSIZE = false;
- this.FOG = false;
- this.LIGHT0 = false;
- this.LIGHT1 = false;
- this.LIGHT2 = false;
- this.LIGHT3 = false;
- this.SPOTLIGHT0 = false;
- this.SPOTLIGHT1 = false;
- this.SPOTLIGHT2 = false;
- this.SPOTLIGHT3 = false;
- this.HEMILIGHT0 = false;
- this.HEMILIGHT1 = false;
- this.HEMILIGHT2 = false;
- this.HEMILIGHT3 = false;
- this.DIRLIGHT0 = false;
- this.DIRLIGHT1 = false;
- this.DIRLIGHT2 = false;
- this.DIRLIGHT3 = false;
- this.POINTLIGHT0 = false;
- this.POINTLIGHT1 = false;
- this.POINTLIGHT2 = false;
- this.POINTLIGHT3 = false;
- this.SHADOW0 = false;
- this.SHADOW1 = false;
- this.SHADOW2 = false;
- this.SHADOW3 = false;
- this.SHADOWS = false;
- this.SHADOWVSM0 = false;
- this.SHADOWVSM1 = false;
- this.SHADOWVSM2 = false;
- this.SHADOWVSM3 = false;
- this.SHADOWPCF0 = false;
- this.SHADOWPCF1 = false;
- this.SHADOWPCF2 = false;
- this.SHADOWPCF3 = false;
- this.NORMAL = false;
- this.UV1 = false;
- this.UV2 = false;
- this.VERTEXCOLOR = false;
- this.VERTEXALPHA = false;
- this.BONES = false;
- this.BONES4 = false;
- this.BonesPerMesh = 0;
- this.INSTANCES = false;
- this.SPECULARTERM = false;
- this._keys = Object.keys(this);
- }
- return WaterMaterialDefines;
- })(BABYLON.MaterialDefines);
- var WaterMaterial = (function (_super) {
- __extends(WaterMaterial, _super);
- /**
- * Constructor
- */
- function WaterMaterial(name, scene, renderTargetSize) {
- if (renderTargetSize === void 0) { renderTargetSize = new BABYLON.Vector2(512, 512); }
- _super.call(this, name, scene);
- this.renderTargetSize = renderTargetSize;
- this.diffuseColor = new BABYLON.Color3(1, 1, 1);
- this.specularColor = new BABYLON.Color3(0, 0, 0);
- this.specularPower = 64;
- this.disableLighting = false;
- /**
- * @param {number}: Represents the wind force
- */
- this.windForce = 6;
- /**
- * @param {Vector2}: The direction of the wind in the plane (X, Z)
- */
- this.windDirection = new BABYLON.Vector2(0, 1);
- /**
- * @param {number}: Wave height, represents the height of the waves
- */
- this.waveHeight = 0.4;
- /**
- * @param {number}: Bump height, represents the bump height related to the bump map
- */
- this.bumpHeight = 0.4;
- /**
- * @param {number}: The water color blended with the reflection and refraction samplers
- */
- this.waterColor = new BABYLON.Color3(0.1, 0.1, 0.6);
- /**
- * @param {number}: The blend factor related to the water color
- */
- this.colorBlendFactor = 0.2;
- /**
- * @param {number}: Represents the maximum length of a wave
- */
- this.waveLength = 0.1;
- /**
- * @param {number}: Defines the waves speed
- */
- this.waveSpeed = 1.0;
- /*
- * Private members
- */
- this._mesh = null;
- this._reflectionTransform = BABYLON.Matrix.Zero();
- this._lastTime = 0;
- this._scaledDiffuse = new BABYLON.Color3();
- this._scaledSpecular = new BABYLON.Color3();
- this._defines = new WaterMaterialDefines();
- this._cachedDefines = new WaterMaterialDefines();
- // Create render targets
- this._createRenderTargets(scene, renderTargetSize);
- }
- Object.defineProperty(WaterMaterial.prototype, "refractionTexture", {
- // Get / Set
- get: function () {
- return this._refractionRTT;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(WaterMaterial.prototype, "reflectionTexture", {
- get: function () {
- return this._reflectionRTT;
- },
- enumerable: true,
- configurable: true
- });
- // Methods
- WaterMaterial.prototype.addToRenderList = function (node) {
- this._refractionRTT.renderList.push(node);
- this._reflectionRTT.renderList.push(node);
- };
- WaterMaterial.prototype.enableRenderTargets = function (enable) {
- var refreshRate = enable ? 1 : 0;
- this._refractionRTT.refreshRate = refreshRate;
- this._reflectionRTT.refreshRate = refreshRate;
- };
- WaterMaterial.prototype.needAlphaBlending = function () {
- return (this.alpha < 1.0);
- };
- WaterMaterial.prototype.needAlphaTesting = function () {
- return false;
- };
- WaterMaterial.prototype.getAlphaTestTexture = function () {
- return null;
- };
- WaterMaterial.prototype._checkCache = function (scene, mesh, useInstances) {
- if (!mesh) {
- return true;
- }
- if (this._defines.INSTANCES !== useInstances) {
- return false;
- }
- if (mesh._materialDefines && mesh._materialDefines.isEqual(this._defines)) {
- return true;
- }
- return false;
- };
- WaterMaterial.prototype.isReady = function (mesh, useInstances) {
- if (this.checkReadyOnlyOnce) {
- if (this._wasPreviouslyReady) {
- return true;
- }
- }
- var scene = this.getScene();
- if (!this.checkReadyOnEveryCall) {
- if (this._renderId === scene.getRenderId()) {
- if (this._checkCache(scene, mesh, useInstances)) {
- return true;
- }
- }
- }
- var engine = scene.getEngine();
- var needNormals = false;
- var needUVs = false;
- this._defines.reset();
- // Textures
- if (scene.texturesEnabled) {
- if (this.bumpTexture && BABYLON.StandardMaterial.BumpTextureEnabled) {
- if (!this.bumpTexture.isReady()) {
- return false;
- }
- else {
- needUVs = true;
- this._defines.BUMP = true;
- }
- }
- if (BABYLON.StandardMaterial.ReflectionTextureEnabled) {
- this._defines.REFLECTION = true;
- }
- }
- // Effect
- if (scene.clipPlane) {
- this._defines.CLIPPLANE = true;
- }
- if (engine.getAlphaTesting()) {
- this._defines.ALPHATEST = true;
- }
- // Point size
- if (this.pointsCloud || scene.forcePointsCloud) {
- this._defines.POINTSIZE = true;
- }
- // Fog
- if (scene.fogEnabled && mesh && mesh.applyFog && scene.fogMode !== BABYLON.Scene.FOGMODE_NONE && this.fogEnabled) {
- this._defines.FOG = true;
- }
- var lightIndex = 0;
- if (scene.lightsEnabled && !this.disableLighting) {
- for (var index = 0; index < scene.lights.length; index++) {
- var light = scene.lights[index];
- if (!light.isEnabled()) {
- continue;
- }
- // Excluded check
- if (light._excludedMeshesIds.length > 0) {
- for (var excludedIndex = 0; excludedIndex < light._excludedMeshesIds.length; excludedIndex++) {
- var excludedMesh = scene.getMeshByID(light._excludedMeshesIds[excludedIndex]);
- if (excludedMesh) {
- light.excludedMeshes.push(excludedMesh);
- }
- }
- light._excludedMeshesIds = [];
- }
- // Included check
- if (light._includedOnlyMeshesIds.length > 0) {
- for (var includedOnlyIndex = 0; includedOnlyIndex < light._includedOnlyMeshesIds.length; includedOnlyIndex++) {
- var includedOnlyMesh = scene.getMeshByID(light._includedOnlyMeshesIds[includedOnlyIndex]);
- if (includedOnlyMesh) {
- light.includedOnlyMeshes.push(includedOnlyMesh);
- }
- }
- light._includedOnlyMeshesIds = [];
- }
- if (!light.canAffectMesh(mesh)) {
- continue;
- }
- needNormals = true;
- this._defines["LIGHT" + lightIndex] = true;
- var type;
- if (light instanceof BABYLON.SpotLight) {
- type = "SPOTLIGHT" + lightIndex;
- }
- else if (light instanceof BABYLON.HemisphericLight) {
- type = "HEMILIGHT" + lightIndex;
- }
- else if (light instanceof BABYLON.PointLight) {
- type = "POINTLIGHT" + lightIndex;
- }
- else {
- type = "DIRLIGHT" + lightIndex;
- }
- this._defines[type] = true;
- // Specular
- if (!light.specular.equalsFloats(0, 0, 0)) {
- this._defines.SPECULARTERM = true;
- }
- // Shadows
- if (scene.shadowsEnabled) {
- var shadowGenerator = light.getShadowGenerator();
- if (mesh && mesh.receiveShadows && shadowGenerator) {
- this._defines["SHADOW" + lightIndex] = true;
- this._defines.SHADOWS = true;
- if (shadowGenerator.useVarianceShadowMap || shadowGenerator.useBlurVarianceShadowMap) {
- this._defines["SHADOWVSM" + lightIndex] = true;
- }
- if (shadowGenerator.usePoissonSampling) {
- this._defines["SHADOWPCF" + lightIndex] = true;
- }
- }
- }
- lightIndex++;
- if (lightIndex === maxSimultaneousLights)
- break;
- }
- }
- // Attribs
- if (mesh) {
- if (needNormals && mesh.isVerticesDataPresent(BABYLON.VertexBuffer.NormalKind)) {
- this._defines.NORMAL = true;
- }
- if (needUVs) {
- if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.UVKind)) {
- this._defines.UV1 = true;
- }
- if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.UV2Kind)) {
- this._defines.UV2 = true;
- }
- }
- if (mesh.useVertexColors && mesh.isVerticesDataPresent(BABYLON.VertexBuffer.ColorKind)) {
- this._defines.VERTEXCOLOR = true;
- if (mesh.hasVertexAlpha) {
- this._defines.VERTEXALPHA = true;
- }
- }
- if (mesh.useBones && mesh.computeBonesUsingShaders) {
- this._defines.BONES = true;
- this._defines.BonesPerMesh = (mesh.skeleton.bones.length + 1);
- this._defines.BONES4 = true;
- }
- // Instances
- if (useInstances) {
- this._defines.INSTANCES = true;
- }
- }
- this._mesh = mesh;
- // Get correct effect
- if (!this._defines.isEqual(this._cachedDefines)) {
- this._defines.cloneTo(this._cachedDefines);
- scene.resetCachedMaterial();
- // Fallbacks
- var fallbacks = new BABYLON.EffectFallbacks();
- if (this._defines.FOG) {
- fallbacks.addFallback(1, "FOG");
- }
- for (lightIndex = 0; lightIndex < maxSimultaneousLights; lightIndex++) {
- if (!this._defines["LIGHT" + lightIndex]) {
- continue;
- }
- if (lightIndex > 0) {
- fallbacks.addFallback(lightIndex, "LIGHT" + lightIndex);
- }
- if (this._defines["SHADOW" + lightIndex]) {
- fallbacks.addFallback(0, "SHADOW" + lightIndex);
- }
- if (this._defines["SHADOWPCF" + lightIndex]) {
- fallbacks.addFallback(0, "SHADOWPCF" + lightIndex);
- }
- if (this._defines["SHADOWVSM" + lightIndex]) {
- fallbacks.addFallback(0, "SHADOWVSM" + lightIndex);
- }
- }
- if (this._defines.BONES4) {
- fallbacks.addFallback(0, "BONES4");
- }
- //Attributes
- var attribs = [BABYLON.VertexBuffer.PositionKind];
- if (this._defines.NORMAL) {
- attribs.push(BABYLON.VertexBuffer.NormalKind);
- }
- if (this._defines.UV1) {
- attribs.push(BABYLON.VertexBuffer.UVKind);
- }
- if (this._defines.UV2) {
- attribs.push(BABYLON.VertexBuffer.UV2Kind);
- }
- if (this._defines.VERTEXCOLOR) {
- attribs.push(BABYLON.VertexBuffer.ColorKind);
- }
- if (this._defines.BONES) {
- attribs.push(BABYLON.VertexBuffer.MatricesIndicesKind);
- attribs.push(BABYLON.VertexBuffer.MatricesWeightsKind);
- }
- if (this._defines.INSTANCES) {
- attribs.push("world0");
- attribs.push("world1");
- attribs.push("world2");
- attribs.push("world3");
- }
- // Legacy browser patch
- var shaderName = "water";
- var join = this._defines.toString();
- this._effect = scene.getEngine().createEffect(shaderName, attribs, ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", "vSpecularColor",
- "vLightData0", "vLightDiffuse0", "vLightSpecular0", "vLightDirection0", "vLightGround0", "lightMatrix0",
- "vLightData1", "vLightDiffuse1", "vLightSpecular1", "vLightDirection1", "vLightGround1", "lightMatrix1",
- "vLightData2", "vLightDiffuse2", "vLightSpecular2", "vLightDirection2", "vLightGround2", "lightMatrix2",
- "vLightData3", "vLightDiffuse3", "vLightSpecular3", "vLightDirection3", "vLightGround3", "lightMatrix3",
- "vFogInfos", "vFogColor", "pointSize",
- "vNormalInfos",
- "mBones",
- "vClipPlane", "normalMatrix",
- "shadowsInfo0", "shadowsInfo1", "shadowsInfo2", "shadowsInfo3",
- // Water
- "worldReflectionViewProjection", "windDirection", "waveLength", "time", "windForce",
- "cameraPosition", "bumpHeight", "waveHeight", "waterColor", "colorBlendFactor", "waveSpeed"
- ], ["normalSampler",
- "shadowSampler0", "shadowSampler1", "shadowSampler2", "shadowSampler3",
- // Water
- "refractionSampler", "reflectionSampler"
- ], join, fallbacks, this.onCompiled, this.onError);
- }
- if (!this._effect.isReady()) {
- return false;
- }
- this._renderId = scene.getRenderId();
- this._wasPreviouslyReady = true;
- if (mesh) {
- if (!mesh._materialDefines) {
- mesh._materialDefines = new WaterMaterialDefines();
- }
- this._defines.cloneTo(mesh._materialDefines);
- }
- return true;
- };
- WaterMaterial.prototype.bindOnlyWorldMatrix = function (world) {
- this._effect.setMatrix("world", world);
- };
- WaterMaterial.prototype.bind = function (world, mesh) {
- var scene = this.getScene();
- // Matrices
- this.bindOnlyWorldMatrix(world);
- this._effect.setMatrix("viewProjection", scene.getTransformMatrix());
- // Bones
- if (mesh && mesh.useBones && mesh.computeBonesUsingShaders) {
- this._effect.setMatrices("mBones", mesh.skeleton.getTransformMatrices());
- }
- if (scene.getCachedMaterial() !== this) {
- // Textures
- if (this.bumpTexture && BABYLON.StandardMaterial.BumpTextureEnabled) {
- this._effect.setTexture("normalSampler", this.bumpTexture);
- this._effect.setFloat2("vNormalInfos", this.bumpTexture.coordinatesIndex, this.bumpTexture.level);
- this._effect.setMatrix("normalMatrix", this.bumpTexture.getTextureMatrix());
- }
- // Clip plane
- if (scene.clipPlane) {
- var clipPlane = scene.clipPlane;
- this._effect.setFloat4("vClipPlane", clipPlane.normal.x, clipPlane.normal.y, clipPlane.normal.z, clipPlane.d);
- }
- // Point size
- if (this.pointsCloud) {
- this._effect.setFloat("pointSize", this.pointSize);
- }
- this._effect.setVector3("vEyePosition", scene._mirroredCameraPosition ? scene._mirroredCameraPosition : scene.activeCamera.position);
- }
- this._effect.setColor4("vDiffuseColor", this._scaledDiffuse, this.alpha * mesh.visibility);
- if (this._defines.SPECULARTERM) {
- this._effect.setColor4("vSpecularColor", this.specularColor, this.specularPower);
- }
- if (scene.lightsEnabled && !this.disableLighting) {
- var lightIndex = 0;
- for (var index = 0; index < scene.lights.length; index++) {
- var light = scene.lights[index];
- if (!light.isEnabled()) {
- continue;
- }
- if (!light.canAffectMesh(mesh)) {
- continue;
- }
- if (light instanceof BABYLON.PointLight) {
- // Point Light
- light.transferToEffect(this._effect, "vLightData" + lightIndex);
- }
- else if (light instanceof BABYLON.DirectionalLight) {
- // Directional Light
- light.transferToEffect(this._effect, "vLightData" + lightIndex);
- }
- else if (light instanceof BABYLON.SpotLight) {
- // Spot Light
- light.transferToEffect(this._effect, "vLightData" + lightIndex, "vLightDirection" + lightIndex);
- }
- else if (light instanceof BABYLON.HemisphericLight) {
- // Hemispheric Light
- light.transferToEffect(this._effect, "vLightData" + lightIndex, "vLightGround" + lightIndex);
- }
- light.diffuse.scaleToRef(light.intensity, this._scaledDiffuse);
- this._effect.setColor4("vLightDiffuse" + lightIndex, this._scaledDiffuse, light.range);
- if (this._defines.SPECULARTERM) {
- light.specular.scaleToRef(light.intensity, this._scaledSpecular);
- this._effect.setColor3("vLightSpecular" + lightIndex, this._scaledSpecular);
- }
- // Shadows
- if (scene.shadowsEnabled) {
- var shadowGenerator = light.getShadowGenerator();
- if (mesh.receiveShadows && shadowGenerator) {
- this._effect.setMatrix("lightMatrix" + lightIndex, shadowGenerator.getTransformMatrix());
- this._effect.setTexture("shadowSampler" + lightIndex, shadowGenerator.getShadowMapForRendering());
- this._effect.setFloat3("shadowsInfo" + lightIndex, shadowGenerator.getDarkness(), shadowGenerator.getShadowMap().getSize().width, shadowGenerator.bias);
- }
- }
- lightIndex++;
- if (lightIndex === maxSimultaneousLights)
- break;
- }
- }
- // View
- if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== BABYLON.Scene.FOGMODE_NONE) {
- this._effect.setMatrix("view", scene.getViewMatrix());
- }
- // Fog
- if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== BABYLON.Scene.FOGMODE_NONE) {
- this._effect.setFloat4("vFogInfos", scene.fogMode, scene.fogStart, scene.fogEnd, scene.fogDensity);
- this._effect.setColor3("vFogColor", scene.fogColor);
- }
- // Water
- if (BABYLON.StandardMaterial.ReflectionTextureEnabled) {
- this._effect.setTexture("refractionSampler", this._refractionRTT);
- this._effect.setTexture("reflectionSampler", this._reflectionRTT);
- }
- var wrvp = this._mesh.getWorldMatrix().multiply(this._reflectionTransform).multiply(scene.getProjectionMatrix());
- this._lastTime += scene.getEngine().getDeltaTime();
- this._effect.setMatrix("worldReflectionViewProjection", wrvp);
- this._effect.setVector2("windDirection", this.windDirection);
- this._effect.setFloat("waveLength", this.waveLength);
- this._effect.setFloat("time", this._lastTime / 100000);
- this._effect.setFloat("windForce", this.windForce);
- this._effect.setFloat("waveHeight", this.waveHeight);
- this._effect.setFloat("bumpHeight", this.bumpHeight);
- this._effect.setColor4("waterColor", this.waterColor, 1.0);
- this._effect.setFloat("colorBlendFactor", this.colorBlendFactor);
- this._effect.setFloat("waveSpeed", this.waveSpeed);
- _super.prototype.bind.call(this, world, mesh);
- };
- WaterMaterial.prototype._createRenderTargets = function (scene, renderTargetSize) {
- var _this = this;
- // Render targets
- this._refractionRTT = new BABYLON.RenderTargetTexture(name + "_refraction", { width: renderTargetSize.x, height: renderTargetSize.y }, scene, false, true);
- this._reflectionRTT = new BABYLON.RenderTargetTexture(name + "_reflection", { width: renderTargetSize.x, height: renderTargetSize.y }, scene, false, true);
- scene.customRenderTargets.push(this._refractionRTT);
- scene.customRenderTargets.push(this._reflectionRTT);
- var isVisible;
- var clipPlane = null;
- var savedViewMatrix;
- var mirrorMatrix = BABYLON.Matrix.Zero();
- this._refractionRTT.onBeforeRender = function () {
- if (_this._mesh) {
- isVisible = _this._mesh.isVisible;
- _this._mesh.isVisible = false;
- }
- // Clip plane
- clipPlane = scene.clipPlane;
- var positiony = _this._mesh ? _this._mesh.position.y : 0.0;
- scene.clipPlane = BABYLON.Plane.FromPositionAndNormal(new BABYLON.Vector3(0, positiony - 0.1, 0), new BABYLON.Vector3(0, 1, 0));
- };
- this._refractionRTT.onAfterRender = function () {
- if (_this._mesh) {
- _this._mesh.isVisible = isVisible;
- }
- // Clip plane
- scene.clipPlane = clipPlane;
- };
- this._reflectionRTT.onBeforeRender = function () {
- if (_this._mesh) {
- isVisible = _this._mesh.isVisible;
- _this._mesh.isVisible = false;
- }
- // Clip plane
- clipPlane = scene.clipPlane;
- var positiony = _this._mesh ? _this._mesh.position.y : 0.0;
- scene.clipPlane = BABYLON.Plane.FromPositionAndNormal(new BABYLON.Vector3(0, positiony + 0.1, 0), new BABYLON.Vector3(0, -1, 0));
- // Transform
- BABYLON.Matrix.ReflectionToRef(scene.clipPlane, mirrorMatrix);
- savedViewMatrix = scene.getViewMatrix();
- mirrorMatrix.multiplyToRef(savedViewMatrix, _this._reflectionTransform);
- scene.setTransformMatrix(_this._reflectionTransform, scene.getProjectionMatrix());
- scene.getEngine().cullBackFaces = false;
- scene._mirroredCameraPosition = BABYLON.Vector3.TransformCoordinates(scene.activeCamera.position, mirrorMatrix);
- };
- this._reflectionRTT.onAfterRender = function () {
- if (_this._mesh) {
- _this._mesh.isVisible = isVisible;
- }
- // Clip plane
- scene.clipPlane = clipPlane;
- // Transform
- scene.setTransformMatrix(savedViewMatrix, scene.getProjectionMatrix());
- scene.getEngine().cullBackFaces = true;
- scene._mirroredCameraPosition = null;
- };
- };
- WaterMaterial.prototype.getAnimatables = function () {
- var results = [];
- if (this.bumpTexture && this.bumpTexture.animations && this.bumpTexture.animations.length > 0) {
- results.push(this.bumpTexture);
- }
- if (this._reflectionRTT && this._reflectionRTT.animations && this._reflectionRTT.animations.length > 0) {
- results.push(this._reflectionRTT);
- }
- if (this._refractionRTT && this._refractionRTT.animations && this._refractionRTT.animations.length > 0) {
- results.push(this._refractionRTT);
- }
- return results;
- };
- WaterMaterial.prototype.dispose = function (forceDisposeEffect) {
- if (this.bumpTexture) {
- this.bumpTexture.dispose();
- }
- if (this._reflectionRTT) {
- this._reflectionRTT.dispose();
- }
- if (this._refractionRTT) {
- this._refractionRTT.dispose();
- }
- _super.prototype.dispose.call(this, forceDisposeEffect);
- };
- WaterMaterial.prototype.clone = function (name) {
- var newMaterial = new WaterMaterial(name, this.getScene());
- // Base material
- this.copyTo(newMaterial);
- // water material
- if (this.bumpTexture && this.bumpTexture.clone) {
- newMaterial.bumpTexture = this.bumpTexture.clone();
- }
- newMaterial.diffuseColor = this.diffuseColor.clone();
- return newMaterial;
- };
- WaterMaterial.prototype.serialize = function () {
- var serializationObject = _super.prototype.serialize.call(this);
- serializationObject.customType = "BABYLON.WaterMaterial";
- serializationObject.diffuseColor = this.diffuseColor.asArray();
- serializationObject.specularColor = this.specularColor.asArray();
- serializationObject.specularPower = this.specularPower;
- serializationObject.disableLighting = this.disableLighting;
- serializationObject.windForce = this.windForce;
- serializationObject.windDirection = this.windDirection.asArray();
- serializationObject.waveHeight = this.waveHeight;
- serializationObject.bumpHeight = this.bumpHeight;
- serializationObject.waterColor = this.waterColor.asArray();
- serializationObject.colorBlendFactor = this.colorBlendFactor;
- serializationObject.waveLength = this.waveLength;
- serializationObject.renderTargetSize = this.renderTargetSize.asArray();
- if (this.bumpTexture) {
- serializationObject.bumpTexture = this.bumpTexture.serialize();
- }
- return serializationObject;
- };
- WaterMaterial.Parse = function (source, scene, rootUrl) {
- var renderTargetSize = source.renderTargetSize ? BABYLON.Vector2.FromArray(source.renderTargetSize) : null;
- var material = new WaterMaterial(source.name, scene, renderTargetSize);
- material.diffuseColor = BABYLON.Color3.FromArray(source.diffuseColor);
- material.specularColor = BABYLON.Color3.FromArray(source.specularColor);
- material.specularPower = source.specularPower;
- material.disableLighting = source.disableLighting;
- material.windForce = source.windForce;
- material.windDirection = BABYLON.Vector2.FromArray(source.windDirection);
- material.waveHeight = source.waveHeight;
- material.bumpHeight = source.bumpHeight;
- material.waterColor = BABYLON.Color3.FromArray(source.waterColor);
- material.colorBlendFactor = source.colorBlendFactor;
- material.waveLength = source.waveLength;
- material.renderTargetSize = BABYLON.Vector2.FromArray(source.renderTargetSize);
- material.alpha = source.alpha;
- material.id = source.id;
- BABYLON.Tags.AddTagsTo(material, source.tags);
- material.backFaceCulling = source.backFaceCulling;
- material.wireframe = source.wireframe;
- if (source.bumpTexture) {
- material.bumpTexture = BABYLON.Texture.Parse(source.bumpTexture, scene, rootUrl);
- }
- if (source.checkReadyOnlyOnce) {
- material.checkReadyOnlyOnce = source.checkReadyOnlyOnce;
- }
- return material;
- };
- WaterMaterial.CreateDefaultMesh = function (name, scene) {
- var mesh = BABYLON.Mesh.CreateGround(name, 512, 512, 32, scene, false);
- return mesh;
- };
- return WaterMaterial;
- })(BABYLON.Material);
- BABYLON.WaterMaterial = WaterMaterial;
-})(BABYLON || (BABYLON = {}));
-
-BABYLON.Effect.ShadersStore['waterVertexShader'] = "precision highp float;\r\n\r\n// Attributes\r\nattribute vec3 position;\r\n#ifdef NORMAL\r\nattribute vec3 normal;\r\n#endif\r\n#ifdef UV1\r\nattribute vec2 uv;\r\n#endif\r\n#ifdef UV2\r\nattribute vec2 uv2;\r\n#endif\r\n#ifdef VERTEXCOLOR\r\nattribute vec4 color;\r\n#endif\r\n#ifdef BONES\r\nattribute vec4 matricesIndices;\r\nattribute vec4 matricesWeights;\r\n#endif\r\n\r\n// Uniforms\r\n\r\n#ifdef INSTANCES\r\nattribute vec4 world0;\r\nattribute vec4 world1;\r\nattribute vec4 world2;\r\nattribute vec4 world3;\r\n#else\r\nuniform mat4 world;\r\n#endif\r\n\r\nuniform mat4 view;\r\nuniform mat4 viewProjection;\r\n\r\n#ifdef BUMP\r\nvarying vec2 vNormalUV;\r\nuniform mat4 normalMatrix;\r\nuniform vec2 vNormalInfos;\r\n#endif\r\n\r\n#ifdef BONES\r\nuniform mat4 mBones[BonesPerMesh];\r\n#endif\r\n\r\n#ifdef POINTSIZE\r\nuniform float pointSize;\r\n#endif\r\n\r\n// Output\r\nvarying vec3 vPositionW;\r\n#ifdef NORMAL\r\nvarying vec3 vNormalW;\r\n#endif\r\n\r\n#ifdef VERTEXCOLOR\r\nvarying vec4 vColor;\r\n#endif\r\n\r\n#ifdef CLIPPLANE\r\nuniform vec4 vClipPlane;\r\nvarying float fClipDistance;\r\n#endif\r\n\r\n#ifdef FOG\r\nvarying float fFogDistance;\r\n#endif\r\n\r\n#ifdef SHADOWS\r\n#if defined(SPOTLIGHT0) || defined(DIRLIGHT0)\r\nuniform mat4 lightMatrix0;\r\nvarying vec4 vPositionFromLight0;\r\n#endif\r\n#if defined(SPOTLIGHT1) || defined(DIRLIGHT1)\r\nuniform mat4 lightMatrix1;\r\nvarying vec4 vPositionFromLight1;\r\n#endif\r\n#if defined(SPOTLIGHT2) || defined(DIRLIGHT2)\r\nuniform mat4 lightMatrix2;\r\nvarying vec4 vPositionFromLight2;\r\n#endif\r\n#if defined(SPOTLIGHT3) || defined(DIRLIGHT3)\r\nuniform mat4 lightMatrix3;\r\nvarying vec4 vPositionFromLight3;\r\n#endif\r\n#endif\r\n\r\n// Water uniforms\r\nuniform mat4 worldReflectionViewProjection;\r\nuniform vec2 windDirection;\r\nuniform float waveLength;\r\nuniform float time;\r\nuniform float windForce;\r\nuniform float waveHeight;\r\nuniform float waveSpeed;\r\n\r\n// Water varyings\r\nvarying vec3 vPosition;\r\nvarying vec3 vRefractionMapTexCoord;\r\nvarying vec3 vReflectionMapTexCoord;\r\n\r\nvoid main(void) {\r\n\tmat4 finalWorld;\r\n\r\n#ifdef INSTANCES\r\n\tfinalWorld = mat4(world0, world1, world2, world3);\r\n#else\r\n\tfinalWorld = world;\r\n#endif\r\n\r\n#ifdef BONES\r\n\tmat4 m0 = mBones[int(matricesIndices.x)] * matricesWeights.x;\r\n\tmat4 m1 = mBones[int(matricesIndices.y)] * matricesWeights.y;\r\n\tmat4 m2 = mBones[int(matricesIndices.z)] * matricesWeights.z;\r\n\r\n#ifdef BONES4\r\n\tmat4 m3 = mBones[int(matricesIndices.w)] * matricesWeights.w;\r\n\tfinalWorld = finalWorld * (m0 + m1 + m2 + m3);\r\n#else\r\n\tfinalWorld = finalWorld * (m0 + m1 + m2);\r\n#endif \r\n\r\n#endif\r\n\r\n\tvec4 worldPos = finalWorld * vec4(position, 1.0);\r\n\tvPositionW = vec3(worldPos);\r\n\r\n#ifdef NORMAL\r\n\tvNormalW = normalize(vec3(finalWorld * vec4(normal, 0.0)));\r\n#endif\r\n\r\n\t// Texture coordinates\r\n#ifndef UV1\r\n\tvec2 uv = vec2(0., 0.);\r\n#endif\r\n#ifndef UV2\r\n\tvec2 uv2 = vec2(0., 0.);\r\n#endif\r\n\r\n#ifdef BUMP\r\n\tif (vNormalInfos.x == 0.)\r\n\t{\r\n\t\tvNormalUV = vec2(normalMatrix * vec4((uv * 1.0) / waveLength + time * windForce * windDirection, 1.0, 0.0));\r\n\t}\r\n\telse\r\n\t{\r\n\t\tvNormalUV = vec2(normalMatrix * vec4((uv2 * 1.0) / waveLength + time * windForce * windDirection, 1.0, 0.0));\r\n\t}\r\n#endif\r\n\r\n\t// Clip plane\r\n#ifdef CLIPPLANE\r\n\tfClipDistance = dot(worldPos, vClipPlane);\r\n#endif\r\n\r\n\t// Fog\r\n#ifdef FOG\r\n\tfFogDistance = (view * worldPos).z;\r\n#endif\r\n\r\n\t// Shadows\r\n#ifdef SHADOWS\r\n#if defined(SPOTLIGHT0) || defined(DIRLIGHT0)\r\n\tvPositionFromLight0 = lightMatrix0 * worldPos;\r\n#endif\r\n#if defined(SPOTLIGHT1) || defined(DIRLIGHT1)\r\n\tvPositionFromLight1 = lightMatrix1 * worldPos;\r\n#endif\r\n#if defined(SPOTLIGHT2) || defined(DIRLIGHT2)\r\n\tvPositionFromLight2 = lightMatrix2 * worldPos;\r\n#endif\r\n#if defined(SPOTLIGHT3) || defined(DIRLIGHT3)\r\n\tvPositionFromLight3 = lightMatrix3 * worldPos;\r\n#endif\r\n#endif\r\n\r\n\t// Vertex color\r\n#ifdef VERTEXCOLOR\r\n\tvColor = color;\r\n#endif\r\n\r\n\t// Point size\r\n#ifdef POINTSIZE\r\n\tgl_PointSize = pointSize;\r\n#endif\r\n\r\n\tvec3 p = position;\r\n\t/*\r\n\tfloat newY = (sin(((p.x / 0.05) + time * waveSpeed * windForce) * windDirection.x) * waveHeight * 5.0)\r\n\t\t\t + (cos(((p.z / 0.05) + time * waveSpeed * windForce) * windDirection.y) * waveHeight * 5.0);\r\n\t*/\r\n\tfloat newY = (sin(((p.x / 0.05) + time * waveSpeed)) * waveHeight * windDirection.x * 5.0)\r\n\t\t\t + (cos(((p.z / 0.05) + time * waveSpeed)) * waveHeight * windDirection.y * 5.0);\r\n\tp.y += abs(newY);\r\n\t\r\n\tgl_Position = viewProjection * finalWorld * vec4(p, 1.0);\r\n\r\n#ifdef REFLECTION\r\n\tworldPos = viewProjection * finalWorld * vec4(p, 1.0);\r\n\t\r\n\t// Water\r\n\tvPosition = position;\r\n\t\r\n\tvRefractionMapTexCoord.x = 0.5 * (worldPos.w + worldPos.x);\r\n\tvRefractionMapTexCoord.y = 0.5 * (worldPos.w + worldPos.y);\r\n\tvRefractionMapTexCoord.z = worldPos.w;\r\n\t\r\n\tworldPos = worldReflectionViewProjection * vec4(position, 1.0);\r\n\tvReflectionMapTexCoord.x = 0.5 * (worldPos.w + worldPos.x);\r\n\tvReflectionMapTexCoord.y = 0.5 * (worldPos.w + worldPos.y);\r\n\tvReflectionMapTexCoord.z = worldPos.w;\r\n#endif\r\n}\r\n";
-BABYLON.Effect.ShadersStore['waterPixelShader'] = "precision highp float;\r\n\r\n// Constants\r\nuniform vec3 vEyePosition;\r\nuniform vec4 vDiffuseColor;\r\n\r\n#ifdef SPECULARTERM\r\nuniform vec4 vSpecularColor;\r\n#endif\r\n\r\n// Input\r\nvarying vec3 vPositionW;\r\n\r\n#ifdef NORMAL\r\nvarying vec3 vNormalW;\r\n#endif\r\n\r\n#ifdef VERTEXCOLOR\r\nvarying vec4 vColor;\r\n#endif\r\n\r\n// Lights\r\n#ifdef LIGHT0\r\nuniform vec4 vLightData0;\r\nuniform vec4 vLightDiffuse0;\r\n#ifdef SPECULARTERM\r\nuniform vec3 vLightSpecular0;\r\n#endif\r\n#ifdef SHADOW0\r\n#if defined(SPOTLIGHT0) || defined(DIRLIGHT0)\r\nvarying vec4 vPositionFromLight0;\r\nuniform sampler2D shadowSampler0;\r\n#else\r\nuniform samplerCube shadowSampler0;\r\n#endif\r\nuniform vec3 shadowsInfo0;\r\n#endif\r\n#ifdef SPOTLIGHT0\r\nuniform vec4 vLightDirection0;\r\n#endif\r\n#ifdef HEMILIGHT0\r\nuniform vec3 vLightGround0;\r\n#endif\r\n#endif\r\n\r\n#ifdef LIGHT1\r\nuniform vec4 vLightData1;\r\nuniform vec4 vLightDiffuse1;\r\n#ifdef SPECULARTERM\r\nuniform vec3 vLightSpecular1;\r\n#endif\r\n#ifdef SHADOW1\r\n#if defined(SPOTLIGHT1) || defined(DIRLIGHT1)\r\nvarying vec4 vPositionFromLight1;\r\nuniform sampler2D shadowSampler1;\r\n#else\r\nuniform samplerCube shadowSampler1;\r\n#endif\r\nuniform vec3 shadowsInfo1;\r\n#endif\r\n#ifdef SPOTLIGHT1\r\nuniform vec4 vLightDirection1;\r\n#endif\r\n#ifdef HEMILIGHT1\r\nuniform vec3 vLightGround1;\r\n#endif\r\n#endif\r\n\r\n#ifdef LIGHT2\r\nuniform vec4 vLightData2;\r\nuniform vec4 vLightDiffuse2;\r\n#ifdef SPECULARTERM\r\nuniform vec3 vLightSpecular2;\r\n#endif\r\n#ifdef SHADOW2\r\n#if defined(SPOTLIGHT2) || defined(DIRLIGHT2)\r\nvarying vec4 vPositionFromLight2;\r\nuniform sampler2D shadowSampler2;\r\n#else\r\nuniform samplerCube shadowSampler2;\r\n#endif\r\nuniform vec3 shadowsInfo2;\r\n#endif\r\n#ifdef SPOTLIGHT2\r\nuniform vec4 vLightDirection2;\r\n#endif\r\n#ifdef HEMILIGHT2\r\nuniform vec3 vLightGround2;\r\n#endif\r\n#endif\r\n\r\n#ifdef LIGHT3\r\nuniform vec4 vLightData3;\r\nuniform vec4 vLightDiffuse3;\r\n#ifdef SPECULARTERM\r\nuniform vec3 vLightSpecular3;\r\n#endif\r\n#ifdef SHADOW3\r\n#if defined(SPOTLIGHT3) || defined(DIRLIGHT3)\r\nvarying vec4 vPositionFromLight3;\r\nuniform sampler2D shadowSampler3;\r\n#else\r\nuniform samplerCube shadowSampler3;\r\n#endif\r\nuniform vec3 shadowsInfo3;\r\n#endif\r\n#ifdef SPOTLIGHT3\r\nuniform vec4 vLightDirection3;\r\n#endif\r\n#ifdef HEMILIGHT3\r\nuniform vec3 vLightGround3;\r\n#endif\r\n#endif\r\n\r\n// Samplers\r\n#ifdef BUMP\r\nvarying vec2 vNormalUV;\r\nuniform sampler2D normalSampler;\r\nuniform vec2 vNormalInfos;\r\n#endif\r\n\r\nuniform sampler2D refractionSampler;\r\nuniform sampler2D reflectionSampler;\r\n\r\n// Water uniforms\r\nconst float LOG2 = 1.442695;\r\n\r\nuniform vec3 cameraPosition;\r\n\r\nuniform vec4 waterColor;\r\nuniform float colorBlendFactor;\r\n\r\nuniform float bumpHeight;\r\n\r\n// Water varyings\r\nvarying vec3 vRefractionMapTexCoord;\r\nvarying vec3 vReflectionMapTexCoord;\r\nvarying vec3 vPosition;\r\n\r\n// Shadows\r\n#ifdef SHADOWS\r\n\r\nfloat unpack(vec4 color)\r\n{\r\n\tconst vec4 bit_shift = vec4(1.0 / (255.0 * 255.0 * 255.0), 1.0 / (255.0 * 255.0), 1.0 / 255.0, 1.0);\r\n\treturn dot(color, bit_shift);\r\n}\r\n\r\n#if defined(POINTLIGHT0) || defined(POINTLIGHT1) || defined(POINTLIGHT2) || defined(POINTLIGHT3)\r\nfloat computeShadowCube(vec3 lightPosition, samplerCube shadowSampler, float darkness, float bias)\r\n{\r\n\tvec3 directionToLight = vPositionW - lightPosition;\r\n\tfloat depth = length(directionToLight);\r\n\r\n\tdepth = clamp(depth, 0., 1.);\r\n\r\n\tdirectionToLight.y = 1.0 - directionToLight.y;\r\n\r\n\tfloat shadow = unpack(textureCube(shadowSampler, directionToLight)) + bias;\r\n\r\n\tif (depth > shadow)\r\n\t{\r\n\t\treturn darkness;\r\n\t}\r\n\treturn 1.0;\r\n}\r\n\r\nfloat computeShadowWithPCFCube(vec3 lightPosition, samplerCube shadowSampler, float bias, float darkness)\r\n{\r\n\tvec3 directionToLight = vPositionW - lightPosition;\r\n\tfloat depth = length(directionToLight);\r\n\r\n\tdepth = clamp(depth, 0., 1.);\r\n\r\n\tdirectionToLight.y = 1.0 - directionToLight.y;\r\n\r\n\tfloat visibility = 1.;\r\n\r\n\tvec3 poissonDisk[4];\r\n\tpoissonDisk[0] = vec3(-0.094201624, 0.04, -0.039906216);\r\n\tpoissonDisk[1] = vec3(0.094558609, -0.04, -0.076890725);\r\n\tpoissonDisk[2] = vec3(-0.094184101, 0.01, -0.092938870);\r\n\tpoissonDisk[3] = vec3(0.034495938, -0.01, 0.029387760);\r\n\r\n\t// Poisson Sampling\r\n\tfloat biasedDepth = depth - bias;\r\n\r\n\tif (unpack(textureCube(shadowSampler, directionToLight + poissonDisk[0])) < biasedDepth) visibility -= 0.25;\r\n\tif (unpack(textureCube(shadowSampler, directionToLight + poissonDisk[1])) < biasedDepth) visibility -= 0.25;\r\n\tif (unpack(textureCube(shadowSampler, directionToLight + poissonDisk[2])) < biasedDepth) visibility -= 0.25;\r\n\tif (unpack(textureCube(shadowSampler, directionToLight + poissonDisk[3])) < biasedDepth) visibility -= 0.25;\r\n\r\n\treturn min(1.0, visibility + darkness);\r\n}\r\n#endif\r\n\r\n#if defined(SPOTLIGHT0) || defined(SPOTLIGHT1) || defined(SPOTLIGHT2) || defined(SPOTLIGHT3) || defined(DIRLIGHT0) || defined(DIRLIGHT1) || defined(DIRLIGHT2) || defined(DIRLIGHT3)\r\nfloat computeShadow(vec4 vPositionFromLight, sampler2D shadowSampler, float darkness, float bias)\r\n{\r\n\tvec3 depth = vPositionFromLight.xyz / vPositionFromLight.w;\r\n\tdepth = 0.5 * depth + vec3(0.5);\r\n\tvec2 uv = depth.xy;\r\n\r\n\tif (uv.x < 0. || uv.x > 1.0 || uv.y < 0. || uv.y > 1.0)\r\n\t{\r\n\t\treturn 1.0;\r\n\t}\r\n\r\n\tfloat shadow = unpack(texture2D(shadowSampler, uv)) + bias;\r\n\r\n\tif (depth.z > shadow)\r\n\t{\r\n\t\treturn darkness;\r\n\t}\r\n\treturn 1.;\r\n}\r\n\r\nfloat computeShadowWithPCF(vec4 vPositionFromLight, sampler2D shadowSampler, float mapSize, float bias, float darkness)\r\n{\r\n\tvec3 depth = vPositionFromLight.xyz / vPositionFromLight.w;\r\n\tdepth = 0.5 * depth + vec3(0.5);\r\n\tvec2 uv = depth.xy;\r\n\r\n\tif (uv.x < 0. || uv.x > 1.0 || uv.y < 0. || uv.y > 1.0)\r\n\t{\r\n\t\treturn 1.0;\r\n\t}\r\n\r\n\tfloat visibility = 1.;\r\n\r\n\tvec2 poissonDisk[4];\r\n\tpoissonDisk[0] = vec2(-0.94201624, -0.39906216);\r\n\tpoissonDisk[1] = vec2(0.94558609, -0.76890725);\r\n\tpoissonDisk[2] = vec2(-0.094184101, -0.92938870);\r\n\tpoissonDisk[3] = vec2(0.34495938, 0.29387760);\r\n\r\n\t// Poisson Sampling\r\n\tfloat biasedDepth = depth.z - bias;\r\n\r\n\tif (unpack(texture2D(shadowSampler, uv + poissonDisk[0] / mapSize)) < biasedDepth) visibility -= 0.25;\r\n\tif (unpack(texture2D(shadowSampler, uv + poissonDisk[1] / mapSize)) < biasedDepth) visibility -= 0.25;\r\n\tif (unpack(texture2D(shadowSampler, uv + poissonDisk[2] / mapSize)) < biasedDepth) visibility -= 0.25;\r\n\tif (unpack(texture2D(shadowSampler, uv + poissonDisk[3] / mapSize)) < biasedDepth) visibility -= 0.25;\r\n\r\n\treturn min(1.0, visibility + darkness);\r\n}\r\n\r\n// Thanks to http://devmaster.net/\r\nfloat unpackHalf(vec2 color)\r\n{\r\n\treturn color.x + (color.y / 255.0);\r\n}\r\n\r\nfloat linstep(float low, float high, float v) {\r\n\treturn clamp((v - low) / (high - low), 0.0, 1.0);\r\n}\r\n\r\nfloat ChebychevInequality(vec2 moments, float compare, float bias)\r\n{\r\n\tfloat p = smoothstep(compare - bias, compare, moments.x);\r\n\tfloat variance = max(moments.y - moments.x * moments.x, 0.02);\r\n\tfloat d = compare - moments.x;\r\n\tfloat p_max = linstep(0.2, 1.0, variance / (variance + d * d));\r\n\r\n\treturn clamp(max(p, p_max), 0.0, 1.0);\r\n}\r\n\r\nfloat computeShadowWithVSM(vec4 vPositionFromLight, sampler2D shadowSampler, float bias, float darkness)\r\n{\r\n\tvec3 depth = vPositionFromLight.xyz / vPositionFromLight.w;\r\n\tdepth = 0.5 * depth + vec3(0.5);\r\n\tvec2 uv = depth.xy;\r\n\r\n\tif (uv.x < 0. || uv.x > 1.0 || uv.y < 0. || uv.y > 1.0 || depth.z >= 1.0)\r\n\t{\r\n\t\treturn 1.0;\r\n\t}\r\n\r\n\tvec4 texel = texture2D(shadowSampler, uv);\r\n\r\n\tvec2 moments = vec2(unpackHalf(texel.xy), unpackHalf(texel.zw));\r\n\treturn min(1.0, 1.0 - ChebychevInequality(moments, depth.z, bias) + darkness);\r\n}\r\n#endif\r\n#endif\r\n\r\n#ifdef CLIPPLANE\r\nvarying float fClipDistance;\r\n#endif\r\n\r\n// Fog\r\n#ifdef FOG\r\n\r\n#define FOGMODE_NONE 0.\r\n#define FOGMODE_EXP 1.\r\n#define FOGMODE_EXP2 2.\r\n#define FOGMODE_LINEAR 3.\r\n#define E 2.71828\r\n\r\nuniform vec4 vFogInfos;\r\nuniform vec3 vFogColor;\r\nvarying float fFogDistance;\r\n\r\nfloat CalcFogFactor()\r\n{\r\n\tfloat fogCoeff = 1.0;\r\n\tfloat fogStart = vFogInfos.y;\r\n\tfloat fogEnd = vFogInfos.z;\r\n\tfloat fogDensity = vFogInfos.w;\r\n\r\n\tif (FOGMODE_LINEAR == vFogInfos.x)\r\n\t{\r\n\t\tfogCoeff = (fogEnd - fFogDistance) / (fogEnd - fogStart);\r\n\t}\r\n\telse if (FOGMODE_EXP == vFogInfos.x)\r\n\t{\r\n\t\tfogCoeff = 1.0 / pow(E, fFogDistance * fogDensity);\r\n\t}\r\n\telse if (FOGMODE_EXP2 == vFogInfos.x)\r\n\t{\r\n\t\tfogCoeff = 1.0 / pow(E, fFogDistance * fFogDistance * fogDensity * fogDensity);\r\n\t}\r\n\r\n\treturn clamp(fogCoeff, 0.0, 1.0);\r\n}\r\n#endif\r\n\r\n// Light Computing\r\nstruct lightingInfo\r\n{\r\n\tvec3 diffuse;\r\n#ifdef SPECULARTERM\r\n\tvec3 specular;\r\n#endif\r\n};\r\n\r\nlightingInfo computeLighting(vec3 viewDirectionW, vec3 vNormal, vec4 lightData, vec3 diffuseColor, vec3 specularColor, float range, float glossiness, vec3 bumpColor) {\r\n\tlightingInfo result;\r\n\r\n\tvec3 lightVectorW;\r\n\tfloat attenuation = 1.0;\r\n\tif (lightData.w == 0.)\r\n\t{\r\n\t\tvec3 direction = lightData.xyz - vPositionW;\r\n\r\n\t\tattenuation = max(0., 1.0 - length(direction) / range);\r\n\t\tlightVectorW = normalize(direction);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tlightVectorW = normalize(-lightData.xyz);\r\n\t}\r\n\r\n\t// diffuse\r\n\tfloat ndl = max(0., dot(vNormal, lightVectorW));\r\n\tresult.diffuse = ndl * diffuseColor * attenuation;\r\n\r\n\t// Specular\r\n#ifdef SPECULARTERM\r\n\tvec3 angleW = normalize(viewDirectionW + lightVectorW);\r\n\tvec3 perturbation = bumpHeight * (bumpColor.rgb - 0.5);\r\n\tvec3 halfvec = normalize(angleW + lightVectorW + vec3(perturbation.x, perturbation.y, perturbation.z));\r\n\t\r\n\tfloat temp = max(0., dot(vNormal, halfvec));\r\n\ttemp = pow(temp, max(1., glossiness));\r\n\t\r\n\tresult.specular = temp * specularColor * attenuation;\r\n#endif\r\n\r\n\treturn result;\r\n}\r\n\r\nlightingInfo computeSpotLighting(vec3 viewDirectionW, vec3 vNormal, vec4 lightData, vec4 lightDirection, vec3 specularColor, vec3 diffuseColor, float range, float glossiness, vec3 bumpColor) {\r\n\tlightingInfo result;\r\n\r\n\tvec3 direction = lightData.xyz - vPositionW;\r\n\tvec3 lightVectorW = normalize(direction);\r\n\tfloat attenuation = max(0., 1.0 - length(direction) / range);\r\n\r\n\t// diffuse\r\n\tfloat cosAngle = max(0., dot(-lightDirection.xyz, lightVectorW));\r\n\tfloat spotAtten = 0.0;\r\n\r\n\tif (cosAngle >= lightDirection.w)\r\n\t{\r\n\t\tcosAngle = max(0., pow(cosAngle, lightData.w));\r\n\t\tspotAtten = clamp((cosAngle - lightDirection.w) / (1. - cosAngle), 0.0, 1.0);\r\n\r\n\t\t// Diffuse\r\n\t\tfloat ndl = max(0., dot(vNormal, -lightDirection.xyz));\r\n\t\tresult.diffuse = ndl * spotAtten * diffuseColor * attenuation;\r\n\r\n\t\t// Specular\r\n#ifdef SPECULARTERM\t\t\r\n\t\tvec3 angleW = normalize(viewDirectionW - lightDirection.xyz);\r\n\t\tvec3 perturbation = bumpHeight * (bumpColor.rgb - 0.5);\r\n\t\tvec3 halfvec = normalize(angleW + vec3(perturbation.x, perturbation.y, perturbation.z));\r\n\t\t\r\n\t\tfloat temp = max(0., dot(vNormal, halfvec));\r\n\t\ttemp = pow(temp, max(1., glossiness));\r\n\t\t\r\n\t\tresult.specular = specularColor * temp * spotAtten * attenuation;\r\n#endif\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.diffuse = vec3(0.);\r\n#ifdef SPECULARTERM\r\n\tresult.specular = vec3(0.);\r\n#endif\r\n\r\n\treturn result;\r\n}\r\n\r\nlightingInfo computeHemisphericLighting(vec3 viewDirectionW, vec3 vNormal, vec4 lightData, vec3 diffuseColor, vec3 specularColor, vec3 groundColor, float glossiness, vec3 bumpColor) {\r\n\tlightingInfo result;\r\n\r\n\t// Diffuse\r\n\tfloat ndl = dot(vNormal, lightData.xyz) * 0.5 + 0.5;\r\n\tresult.diffuse = mix(groundColor, diffuseColor, ndl);\r\n\t\r\n\t// Specular\r\n#ifdef SPECULARTERM\r\n\tvec3 angleW = normalize(viewDirectionW + lightData.xyz);\r\n\tvec3 perturbation = bumpHeight * (bumpColor.rgb - 0.5);\r\n\tvec3 halfvec = normalize(angleW + vec3(perturbation.x, perturbation.y, perturbation.z));\r\n\t\r\n\tfloat temp = max(0.0, dot(vNormal, halfvec));\r\n\ttemp = pow(temp, max(1.0, glossiness));\r\n\t\r\n\tresult.specular = temp * specularColor;\r\n#endif\r\n\r\n\treturn result;\r\n}\r\n\r\nvoid main(void) {\r\n\t// Clip plane\r\n#ifdef CLIPPLANE\r\n\tif (fClipDistance > 0.0)\r\n\t\tdiscard;\r\n#endif\r\n\r\n\tvec3 viewDirectionW = normalize(vEyePosition - vPositionW);\r\n\r\n\t// Base color\r\n\tvec4 baseColor = vec4(1., 1., 1., 1.);\r\n\tvec3 diffuseColor = vDiffuseColor.rgb;\r\n\t\r\n#ifdef SPECULARTERM\r\n\tfloat glossiness = vSpecularColor.a;\r\n\tvec3 specularColor = vSpecularColor.rgb;\r\n#else\r\n\tfloat glossiness = 0.;\r\n#endif\r\n\r\n\t// Alpha\r\n\tfloat alpha = vDiffuseColor.a;\r\n\r\n#ifdef BUMP\r\n\tbaseColor = texture2D(normalSampler, vNormalUV);\r\n\tvec3 bumpColor = baseColor.rgb;\r\n\r\n#ifdef ALPHATEST\r\n\tif (baseColor.a < 0.4)\r\n\t\tdiscard;\r\n#endif\r\n\r\n\tbaseColor.rgb *= vNormalInfos.y;\r\n#else\r\n\tvec3 bumpColor = vec3(1.0);\r\n#endif\r\n\r\n#ifdef VERTEXCOLOR\r\n\tbaseColor.rgb *= vColor.rgb;\r\n#endif\r\n\r\n\t// Bump\r\n#ifdef NORMAL\r\n\tvec3 normalW = normalize(vNormalW);\r\n\tvec2 perturbation = bumpHeight * (baseColor.rg - 0.5);\r\n#else\r\n\tvec3 normalW = vec3(1.0, 1.0, 1.0);\r\n\tvec2 perturbation = bumpHeight * (vec2(1.0, 1.0) - 0.5);\r\n#endif\r\n\r\n#ifdef REFLECTION\r\n\t// Water\r\n\tvec3 eyeVector = normalize(vEyePosition - vPosition);\r\n\t\r\n\tvec2 projectedRefractionTexCoords = clamp(vRefractionMapTexCoord.xy / vRefractionMapTexCoord.z + perturbation, 0.0, 1.0);\r\n\tvec4 refractiveColor = texture2D(refractionSampler, projectedRefractionTexCoords);\r\n\t\r\n\tvec2 projectedReflectionTexCoords = clamp(vReflectionMapTexCoord.xy / vReflectionMapTexCoord.z + perturbation, 0.0, 1.0);\r\n\tvec4 reflectiveColor = texture2D(reflectionSampler, projectedReflectionTexCoords);\r\n\t\r\n\tvec3 upVector = vec3(0.0, 1.0, 0.0);\r\n\t\r\n\tfloat fresnelTerm = max(dot(eyeVector, upVector), 0.0);\r\n\t\r\n\tvec4 combinedColor = refractiveColor * fresnelTerm + reflectiveColor * (1.0 - fresnelTerm);\r\n\t\r\n\tbaseColor = colorBlendFactor * waterColor + (1.0 - colorBlendFactor) * combinedColor;\r\n#endif\r\n\r\n\t// Lighting\r\n\tvec3 diffuseBase = vec3(0., 0., 0.);\r\n#ifdef SPECULARTERM\r\n\tvec3 specularBase = vec3(0., 0., 0.);\r\n#endif\r\n\tfloat shadow = 1.;\r\n\r\n#ifdef LIGHT0\r\n#ifndef SPECULARTERM\r\n\tvec3 vLightSpecular0 = vec3(0.0);\r\n#endif\r\n#ifdef SPOTLIGHT0\r\n\tlightingInfo info = computeSpotLighting(viewDirectionW, normalW, vLightData0, vLightDirection0, vLightDiffuse0.rgb, vLightSpecular0, vLightDiffuse0.a, glossiness, bumpColor);\r\n#endif\r\n#ifdef HEMILIGHT0\r\n\tlightingInfo info = computeHemisphericLighting(viewDirectionW, normalW, vLightData0, vLightDiffuse0.rgb, vLightSpecular0, vLightGround0, glossiness, bumpColor);\r\n#endif\r\n#if defined(POINTLIGHT0) || defined(DIRLIGHT0)\r\n\tlightingInfo info = computeLighting(viewDirectionW, normalW, vLightData0, vLightDiffuse0.rgb, vLightSpecular0, vLightDiffuse0.a, glossiness, bumpColor);\r\n#endif\r\n#ifdef SHADOW0\r\n#ifdef SHADOWVSM0\r\n\tshadow = computeShadowWithVSM(vPositionFromLight0, shadowSampler0, shadowsInfo0.z, shadowsInfo0.x);\r\n#else\r\n#ifdef SHADOWPCF0\r\n\t#if defined(POINTLIGHT0)\r\n\tshadow = computeShadowWithPCFCube(vLightData0.xyz, shadowSampler0, shadowsInfo0.z, shadowsInfo0.x);\r\n\t#else\r\n\tshadow = computeShadowWithPCF(vPositionFromLight0, shadowSampler0, shadowsInfo0.y, shadowsInfo0.z, shadowsInfo0.x);\r\n\t#endif\r\n#else\r\n\t#if defined(POINTLIGHT0)\r\n\tshadow = computeShadowCube(vLightData0.xyz, shadowSampler0, shadowsInfo0.x, shadowsInfo0.z);\r\n\t#else\r\n\tshadow = computeShadow(vPositionFromLight0, shadowSampler0, shadowsInfo0.x, shadowsInfo0.z);\r\n\t#endif\r\n#endif\r\n#endif\r\n#else\r\n\tshadow = 1.;\r\n#endif\r\n\tdiffuseBase += info.diffuse * shadow;\r\n#ifdef SPECULARTERM\r\n\tspecularBase += info.specular * shadow;\r\n#endif\r\n#endif\r\n\r\n#ifdef LIGHT1\r\n#ifndef SPECULARTERM\r\n\tvec3 vLightSpecular1 = vec3(0.0);\r\n#endif\r\n#ifdef SPOTLIGHT1\r\n\tinfo = computeSpotLighting(viewDirectionW, normalW, vLightData1, vLightDirection1, vLightDiffuse1.rgb, vLightSpecular1, vLightDiffuse1.a, glossiness, bumpColor);\r\n#endif\r\n#ifdef HEMILIGHT1\r\n\tinfo = computeHemisphericLighting(viewDirectionW, normalW, vLightData1, vLightDiffuse1.rgb, vLightSpecular1, vLightGround1.a, glossiness, bumpColor);\r\n#endif\r\n#if defined(POINTLIGHT1) || defined(DIRLIGHT1)\r\n\tinfo = computeLighting(viewDirectionW, normalW, vLightData1, vLightDiffuse1.rgb, vLightSpecular1, vLightDiffuse1.a, glossiness, bumpColor);\r\n#endif\r\n#ifdef SHADOW1\r\n#ifdef SHADOWVSM1\r\n\tshadow = computeShadowWithVSM(vPositionFromLight1, shadowSampler1, shadowsInfo1.z, shadowsInfo1.x);\r\n#else\r\n#ifdef SHADOWPCF1\r\n#if defined(POINTLIGHT1)\r\n\tshadow = computeShadowWithPCFCube(vLightData1.xyz, shadowSampler1, shadowsInfo1.z, shadowsInfo1.x);\r\n#else\r\n\tshadow = computeShadowWithPCF(vPositionFromLight1, shadowSampler1, shadowsInfo1.y, shadowsInfo1.z, shadowsInfo1.x);\r\n#endif\r\n#else\r\n\t#if defined(POINTLIGHT1)\r\n\tshadow = computeShadowCube(vLightData1.xyz, shadowSampler1, shadowsInfo1.x, shadowsInfo1.z);\r\n\t#else\r\n\tshadow = computeShadow(vPositionFromLight1, shadowSampler1, shadowsInfo1.x, shadowsInfo1.z);\r\n\t#endif\r\n#endif\r\n#endif\r\n#else\r\n\tshadow = 1.;\r\n#endif\r\n\tdiffuseBase += info.diffuse * shadow;\r\n#ifdef SPECULARTERM\r\n\tspecularBase += info.specular * shadow;\r\n#endif\r\n#endif\r\n\r\n#ifdef LIGHT2\r\n#ifndef SPECULARTERM\r\n\tvec3 vLightSpecular2 = vec3(0.0);\r\n#endif\r\n#ifdef SPOTLIGHT2\r\n\tinfo = computeSpotLighting(viewDirectionW, normalW, vLightData2, vLightDirection2, vLightDiffuse2.rgb, vLightSpecular2, vLightDiffuse2.a, glossiness, bumpColor);\r\n#endif\r\n#ifdef HEMILIGHT2\r\n\tinfo = computeHemisphericLighting(viewDirectionW, normalW, vLightData2, vLightDiffuse2.rgb, vLightSpecular2, vLightGround2, glossiness, bumpColor);\r\n#endif\r\n#if defined(POINTLIGHT2) || defined(DIRLIGHT2)\r\n\tinfo = computeLighting(viewDirectionW, normalW, vLightData2, vLightDiffuse2.rgb, vLightSpecular2, vLightDiffuse2.a, glossiness, bumpColor);\r\n#endif\r\n#ifdef SHADOW2\r\n#ifdef SHADOWVSM2\r\n\tshadow = computeShadowWithVSM(vPositionFromLight2, shadowSampler2, shadowsInfo2.z, shadowsInfo2.x);\r\n#else\r\n#ifdef SHADOWPCF2\r\n#if defined(POINTLIGHT2)\r\n\tshadow = computeShadowWithPCFCube(vLightData2.xyz, shadowSampler2, shadowsInfo2.z, shadowsInfo2.x);\r\n#else\r\n\tshadow = computeShadowWithPCF(vPositionFromLight2, shadowSampler2, shadowsInfo2.y, shadowsInfo2.z, shadowsInfo2.x);\r\n#endif\r\n#else\r\n\t#if defined(POINTLIGHT2)\r\n\tshadow = computeShadowCube(vLightData2.xyz, shadowSampler2, shadowsInfo2.x, shadowsInfo2.z);\r\n\t#else\r\n\tshadow = computeShadow(vPositionFromLight2, shadowSampler2, shadowsInfo2.x, shadowsInfo2.z);\r\n\t#endif\r\n#endif\t\r\n#endif\t\r\n#else\r\n\tshadow = 1.;\r\n#endif\r\n\tdiffuseBase += info.diffuse * shadow;\r\n#ifdef SPECULARTERM\r\n\tspecularBase += info.specular * shadow;\r\n#endif\r\n#endif\r\n\r\n#ifdef LIGHT3\r\n#ifndef SPECULARTERM\r\n\tvec3 vLightSpecular3 = vec3(0.0);\r\n#endif\r\n#ifdef SPOTLIGHT3\r\n\tinfo = computeSpotLighting(viewDirectionW, normalW, vLightData3, vLightDirection3, vLightDiffuse3.rgb, vLightSpecular3, vLightDiffuse3.a, glossiness, bumpColor);\r\n#endif\r\n#ifdef HEMILIGHT3\r\n\tinfo = computeHemisphericLighting(viewDirectionW, normalW, vLightData3, vLightDiffuse3.rgb, vLightSpecular3, vLightGround3, glossiness, bumpColor);\r\n#endif\r\n#if defined(POINTLIGHT3) || defined(DIRLIGHT3)\r\n\tinfo = computeLighting(viewDirectionW, normalW, vLightData3, vLightDiffuse3.rgb, vLightSpecular3, vLightDiffuse3.a, glossiness, bumpColor);\r\n#endif\r\n#ifdef SHADOW3\r\n#ifdef SHADOWVSM3\r\n\t\tshadow = computeShadowWithVSM(vPositionFromLight3, shadowSampler3, shadowsInfo3.z, shadowsInfo3.x);\r\n#else\r\n#ifdef SHADOWPCF3\r\n#if defined(POINTLIGHT3)\r\n\tshadow = computeShadowWithPCFCube(vLightData3.xyz, shadowSampler3, shadowsInfo3.z, shadowsInfo3.x);\r\n#else\r\n\tshadow = computeShadowWithPCF(vPositionFromLight3, shadowSampler3, shadowsInfo3.y, shadowsInfo3.z, shadowsInfo3.x);\r\n#endif\r\n#else\r\n\t#if defined(POINTLIGHT3)\r\n\tshadow = computeShadowCube(vLightData3.xyz, shadowSampler3, shadowsInfo3.x, shadowsInfo3.z);\r\n\t#else\r\n\tshadow = computeShadow(vPositionFromLight3, shadowSampler3, shadowsInfo3.x, shadowsInfo3.z);\r\n\t#endif\r\n#endif\t\r\n#endif\t\r\n#else\r\n\tshadow = 1.;\r\n#endif\r\n\tdiffuseBase += info.diffuse * shadow;\r\n#ifdef SPECULARTERM\r\n\tspecularBase += info.specular * shadow;\r\n#endif\r\n#endif\r\n\r\n#ifdef VERTEXALPHA\r\n\talpha *= vColor.a;\r\n#endif\r\n\r\n#ifdef SPECULARTERM\r\n\tvec3 finalSpecular = specularBase * specularColor;\r\n#else\r\n\tvec3 finalSpecular = vec3(0.0);\r\n#endif\r\n\r\n\tvec3 finalDiffuse = clamp(diffuseBase * diffuseColor, 0.0, 1.0) * baseColor.rgb;\r\n\r\n\t// Composition\r\n\tvec4 color = vec4(finalDiffuse + finalSpecular, alpha);\r\n\r\n#ifdef FOG\r\n\tfloat fog = CalcFogFactor();\r\n\tcolor.rgb = fog * color.rgb + (1.0 - fog) * vFogColor;\r\n#endif\r\n\t\r\n\tgl_FragColor = color;\r\n}";
diff --git a/static/Demos/WaterMaterial/demo.js b/static/Demos/WaterMaterial/demo.js
deleted file mode 100644
index 2382aa829..000000000
--- a/static/Demos/WaterMaterial/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var demo = {
- constructor: CreateWaterTestScene,
- onload: function () {
- }
-};
\ No newline at end of file
diff --git a/static/Demos/WaterMaterial/index.html b/static/Demos/WaterMaterial/index.html
deleted file mode 100644
index 9a6128014..000000000
--- a/static/Demos/WaterMaterial/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
- Babylon.js - Water Material demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debug layer
-
-
- Fullscreen
-
-
-
Control panel
-
-
-
-
- Active camera:
-
-
- Change control method:
-
- Touch camera
-
-
- VR Device orientation camera
-
-
- Gamepad camera
-
-
- Virtual joysticks camera
-
-
- Anaglyph camera
-
-
-
- Post-processes:
- Toggle FXAA (antialiasing)
- Toggle FSAA 4X (antialiasing)
- Toggle Black and white
- Toggle Sepia
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
\ No newline at end of file
diff --git a/static/Demos/WaterMaterial/water.js b/static/Demos/WaterMaterial/water.js
deleted file mode 100644
index 76a3f6d98..000000000
--- a/static/Demos/WaterMaterial/water.js
+++ /dev/null
@@ -1,62 +0,0 @@
-var CreateWaterTestScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
-
- // Camera
- var camera = new BABYLON.ArcRotateCamera("Camera", 3 * Math.PI / 2, Math.PI / 4, 100, BABYLON.Vector3.Zero(), scene);
-
- // Light
- var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
-
- // Skybox
- var skybox = BABYLON.Mesh.CreateBox("skyBox", 5000.0, scene);
- var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
- skyboxMaterial.backFaceCulling = false;
- skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("../../assets/skybox/TropicalSunnyDay", scene);
- skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
- skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
- skyboxMaterial.disableLighting = true;
- skybox.material = skyboxMaterial;
-
- // Water material
- var waterMaterial = new BABYLON.WaterMaterial("waterMaterial", scene, new BABYLON.Vector2(512, 512));
- waterMaterial.bumpTexture = new BABYLON.Texture("../../assets/waterbump.png", scene);
- waterMaterial.windForce = -10;
- waterMaterial.waveHeight = 0.5;
- waterMaterial.bumpHeight = 0.1;
- waterMaterial.waveLength = 0.1;
- waterMaterial.waveSpeed = 50.0;
- waterMaterial.colorBlendFactor = 0;
- waterMaterial.windDirection = new BABYLON.Vector2(1, 1);
- waterMaterial.colorBlendFactor = 0;
-
- // Ground
- var groundTexture = new BABYLON.Texture("../../assets/sand.jpg", scene);
- groundTexture.vScale = groundTexture.uScale = 4.0;
-
- var groundMaterial = new BABYLON.StandardMaterial("groundMaterial", scene);
- groundMaterial.diffuseTexture = groundTexture;
-
- var ground = BABYLON.Mesh.CreateGround("ground", 512, 512, 32, scene, false);
- ground.position.y = -1;
- ground.material = groundMaterial;
-
- // Water mesh
- var waterMesh = BABYLON.Mesh.CreateGround("waterMesh", 512, 512, 32, scene, false);
- waterMesh.material = waterMaterial;
-
- // Sphere
- var sphereMaterial = new BABYLON.StandardMaterial("sphereMaterial", scene);
- sphereMaterial.diffuseTexture = new BABYLON.Texture("../../assets/wood.jpg", scene);
-
- var sphere = BABYLON.Mesh.CreateSphere("sphere", 32, 24, scene);
- sphere.position.y = 20;
- sphere.material = sphereMaterial;
-
- // Configure water material
- waterMaterial.addToRenderList(ground);
- waterMaterial.addToRenderList(skybox);
- waterMaterial.addToRenderList(sphere);
-
- return scene;
-};
\ No newline at end of file
diff --git a/static/Demos/Yeti/demo.js b/static/Demos/Yeti/demo.js
deleted file mode 100644
index 0049f6351..000000000
--- a/static/Demos/Yeti/demo.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var demo = {
- constructor: CreateYetiScene,
- onload: function () {
-
- }
-};
diff --git a/static/Demos/Yeti/index.html b/static/Demos/Yeti/index.html
deleted file mode 100644
index 87cbbb494..000000000
--- a/static/Demos/Yeti/index.html
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
- Babylon.js - Yeti demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Yeti by by Patrick Ryan
-
-
-
-
-
-
-
- Sorry but your browser does not support WebGL...
-
-
-
-
\ No newline at end of file
diff --git a/static/Demos/Yeti/index.js b/static/Demos/Yeti/index.js
deleted file mode 100644
index 2888f2986..000000000
--- a/static/Demos/Yeti/index.js
+++ /dev/null
@@ -1,91 +0,0 @@
-var CreateYetiScene = function (engine) {
- var scene = new BABYLON.Scene(engine);
- scene.clearColor = new BABYLON.Color4(0.02, 0.02, 0.02, 1.0);
- scene.imageProcessingConfiguration.contrast = 1.6;
- scene.imageProcessingConfiguration.exposure = 0.6;
- scene.imageProcessingConfiguration.toneMappingEnabled = true;
-
- BABYLON.SceneLoader.OnPluginActivatedObservable.add(function (plugin) {
- if (plugin.name === "gltf" && plugin instanceof BABYLON.GLTFFileLoader) {
- plugin.animationStartMode = BABYLON.GLTFLoaderAnimationStartMode.ALL;
- plugin.compileMaterials = true;
- }
- });
-
- engine.setHardwareScalingLevel(0.75);
- BABYLON.SceneLoader.Append("/Assets/Yeti/glTF/", "Yeti_Idle.gltf", scene, function () {
- scene.createDefaultCameraOrLight(true, true, true);
-
- scene.activeCamera.alpha = 2;
- scene.activeCamera.beta = 1.5;
- scene.activeCamera.lowerRadiusLimit = 20;
- scene.activeCamera.upperRadiusLimit = 200;
- scene.activeCamera.useAutoRotationBehavior = true;
-
- for (var i = 0; i < scene.meshes.length; i++) {
- scene.meshes[i].alwaysSelectAsActiveMesh = true;
- }
-
- // Environment
- var helper = scene.createDefaultEnvironment({
- skyboxSize: 1000,
- groundShadowLevel: 0.6,
- });
- helper.setMainColor(BABYLON.Color3.White());
-
- // SNOW
- var fountain = BABYLON.Mesh.CreateBox("fountain", .1, scene);
- fountain.position.y = 100;
- fountain.isVisible = false;
-
- var particleSystem = new BABYLON.ParticleSystem("particles", 1500, scene, null, true);
- particleSystem.particleTexture = new BABYLON.Texture("/Assets/Yeti/snowflake.png", scene);
- scene.registerBeforeRender(function() {
- particleSystem.startSpriteCellID = Math.round(Math.random() * 3 - 1);
- particleSystem.endSpriteCellID = particleSystem.startSpriteCellID;
- });
- particleSystem.startSpriteCellID = 0;
- particleSystem.endSpriteCellID = 0;
- particleSystem.spriteCellHeight = 512;
- particleSystem.spriteCellWidth = 512;
-
- // Where the particles come from
- particleSystem.emitter = fountain; // the starting object, the emitter
- particleSystem.minEmitBox = new BABYLON.Vector3(-100, 0, -100); // Starting all from
- particleSystem.maxEmitBox = new BABYLON.Vector3(100, 0, 100); // To...
-
- particleSystem.minSize = 0.5;
- particleSystem.maxSize = 4;
-
- particleSystem.minLifeTime = 1.2;
- particleSystem.maxLifeTime = 1.6;
-
- particleSystem.emitRate = 150;
-
- // Blend mode : BLENDMODE_ONEONE, or BLENDMODE_STANDARD
- particleSystem.blendMode = BABYLON.ParticleSystem.BLENDMODE_ONEONE;
-
- particleSystem.gravity = new BABYLON.Vector3(0, -98, 0);
- particleSystem.direction1 = new BABYLON.Vector3(5.5, -1, 5.5);
- particleSystem.direction2 = new BABYLON.Vector3(-5.5, -1, -5.5);
-
- particleSystem.minAngularSpeed = 0;
- particleSystem.maxAngularSpeed = Math.PI;
-
- // Speed
- particleSystem.minEmitPower = 1;
- particleSystem.maxEmitPower = 10;
- particleSystem.updateSpeed = 0.005;
-
- var gui = new dat.GUI();
- gui.add(particleSystem, 'minSize', 0.1, 5);
- gui.add(particleSystem, 'maxSize', 0.1, 5);
- gui.add(particleSystem, 'emitRate', 1, 500);
- gui.add(particleSystem, 'updateSpeed', 0, 0.02);
-
- // Start the particle system
- particleSystem.start();
- });
-
- return scene;
-};
\ No newline at end of file