Skip to content
Permalink
Browse files

Merge remote-tracking branch 'upstream/master' into libToModules

  • Loading branch information...
sebavan
sebavan committed Jan 7, 2019
2 parents e7b2eb1 + f35bb92 commit 870f9248e2bf615804ec9691d4e01ba25d2bdd4e
@@ -23,7 +23,7 @@
<!-- Monaco -->

<!-- Babylon.js -->
<script src="../tools/DevLoader/BabylonLoader.js"></script>
<script src="../Tools/DevLoader/BabylonLoader.js"></script>

<link href="css/index.css" rel="stylesheet" />
</head>
@@ -56,8 +56,8 @@
<!-- Extensions -->
<script src="https://rawgit.com/BabylonJS/Extensions/master/ClonerSystem/src/babylonx.cloner.js" async></script>
<script src="https://rawgit.com/BabylonJS/Extensions/master/CompoundShader/src/babylonx.CompoundShader.js" async></script>
<!-- <script async src="https://www.babylontoolkit.com/playground/scripts/babylon.navmesh.js"></script>
<script async src="https://www.babylontoolkit.com/playground/scripts/babylon.manager.js"></script> -->
<!-- <script async src="https://www.babylontoolkit.com/Playground/scripts/babylon.navmesh.js"></script>
<script async src="https://www.babylontoolkit.com/Playground/scripts/babylon.manager.js"></script> -->

<link href="css/index.css" rel="stylesheet" />
</head>
@@ -54,8 +54,8 @@
<!-- Extensions -->
<script src="https://rawgit.com/BabylonJS/Extensions/master/ClonerSystem/src/babylonx.cloner.js" async></script>
<script src="https://rawgit.com/BabylonJS/Extensions/master/CompoundShader/src/babylonx.CompoundShader.js" async></script>
<script src="https://www.babylontoolkit.com/playground/scripts/babylon.navmesh.js"></script>
<script src="https://www.babylontoolkit.com/playground/scripts/babylon.manager.js"></script>
<script src="https://www.babylontoolkit.com/Playground/scripts/babylon.navmesh.js"></script>
<script src="https://www.babylontoolkit.com/Playground/scripts/babylon.manager.js"></script>

<link href="css/index.css" rel="stylesheet" />
<link href="css/color_ts.css" rel="stylesheet" />
@@ -131,8 +131,9 @@
- Update physics position using absolutePosition instead of pivotPosition ([TrevorDev](https://github.com/TrevorDev))
- Disable camera arrow key controls when the Command key is selected on Mac OS ([kcoley](https://github.com/kcoley))
- Viewer should not set receiveShadows on an instanced mesh ([TrevorDev](https://github.com/TrevorDev))
- Updated comment in TransformNode.rotationQuaternion to include undefined as one of the potential return values ([nathankmiller](https://github.com/nathankmiller)
- CannonJS ignores connectedPivot joint parameter ([TrevorDev](https://github.com/TrevorDev)))
- Updated comment in TransformNode.rotationQuaternion to include undefined as one of the potential return values ([nathankmiller](https://github.com/nathankmiller))
- CannonJS ignores connectedPivot joint parameter ([TrevorDev](https://github.com/TrevorDev))
- Fix case sensitive paths ([mrdunk](https://github.com))

### Core Engine
- Fixed a bug with `mesh.alwaysSelectAsActiveMesh` preventing layerMask to be taken in account ([Deltakosh](https://github.com/deltakosh))
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, user-scalable=no">

<!--Babylon-->
<script src="../tools/DevLoader/BabylonLoader.js"></script>
<script src="../Tools/DevLoader/BabylonLoader.js"></script>

<style>
html,
@@ -94,14 +94,14 @@
var knot = BABYLON.Mesh.CreateTorusKnot("knot", 10, 3, 128, 64, 2, 3, scene);
knot.setEnabled(false);
var heightMap = BABYLON.Mesh.CreateGroundFromHeightMap("heightMap", "/playground/textures/heightMap.png", 100, 100, 100, 0, 10, scene, false);
var heightMap = BABYLON.Mesh.CreateGroundFromHeightMap("heightMap", "/Playground/textures/heightMap.png", 100, 100, 100, 0, 10, scene, false);
heightMap.setEnabled(false);
// 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("/playground/textures/TropicalSunnyDay", scene);
skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("/Playground/textures/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);
@@ -113,7 +113,7 @@
// Rabbit
var rabbit;
BABYLON.SceneLoader.ImportMesh("Rabbit", "/playground/scenes/", "Rabbit.babylon", scene, function (newMeshes, particleSystems, skeletons) {
BABYLON.SceneLoader.ImportMesh("Rabbit", "/Playground/scenes/", "Rabbit.babylon", scene, function (newMeshes, particleSystems, skeletons) {
rabbit = newMeshes[1];
rabbit.setEnabled(false);
rabbit.scaling = new BABYLON.Vector3(0.3, 0.3, 0.3);
@@ -172,14 +172,14 @@
// Create shaders
var std = new BABYLON.StandardMaterial("std", scene);
std.diffuseTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
std.diffuseTexture = new BABYLON.Texture("/Playground/textures/amiga.jpg", scene);
std.diffuseTexture.uScale = 5;
std.diffuseTexture.vScale = 5;
var lava = prepareLava();
var simple = new BABYLON.SimpleMaterial("simple", scene);
simple.diffuseTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
simple.diffuseTexture = new BABYLON.Texture("/Playground/textures/amiga.jpg", scene);
simple.diffuseTexture.uScale = 5;
simple.diffuseTexture.vScale = 5;
@@ -1,6 +1,6 @@
window.prepareCell = function() {
var cell = new BABYLON.CellMaterial("cell", scene);
cell.diffuseTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
cell.diffuseTexture = new BABYLON.Texture("/Playground/textures/amiga.jpg", scene);
cell.diffuseTexture.uScale = cell.diffuseTexture.vScale = 3;
cell.computeHighLevel = true;

@@ -2,28 +2,28 @@ window.prepareMix = function() {
var mix = new BABYLON.MixMaterial("mix", scene);
mix.specularColor = new BABYLON.Color3(0.5, 0.5, 0.5);
mix.specularPower = 64;
mix.mixTexture1 = new BABYLON.Texture("/playground/textures/mixMap.png", scene);
mix.mixTexture2 = new BABYLON.Texture("/playground/textures/mixMap_2.png", scene);
mix.mixTexture1 = new BABYLON.Texture("/Playground/textures/mixMap.png", scene);
mix.mixTexture2 = new BABYLON.Texture("/Playground/textures/mixMap_2.png", scene);

mix.diffuseTexture1 = new BABYLON.Texture("/playground/textures/floor.png", scene);
mix.diffuseTexture2 = new BABYLON.Texture("/playground/textures/rock.png", scene);
mix.diffuseTexture3 = new BABYLON.Texture("/playground/textures/grass.png", scene);
mix.diffuseTexture4 = new BABYLON.Texture("/playground/textures/floor.png", scene);
mix.diffuseTexture1 = new BABYLON.Texture("/Playground/textures/floor.png", scene);
mix.diffuseTexture2 = new BABYLON.Texture("/Playground/textures/rock.png", scene);
mix.diffuseTexture3 = new BABYLON.Texture("/Playground/textures/grass.png", scene);
mix.diffuseTexture4 = new BABYLON.Texture("/Playground/textures/floor.png", scene);

mix.diffuseTexture1.uScale = mix.diffuseTexture1.vScale = 10;
mix.diffuseTexture2.uScale = mix.diffuseTexture2.vScale = 10;
mix.diffuseTexture3.uScale = mix.diffuseTexture3.vScale = 10;
mix.diffuseTexture4.uScale = mix.diffuseTexture4.vScale = 10;

mix.diffuseTexture5 = new BABYLON.Texture("/playground/textures/leopard_fur.jpg", scene);
mix.diffuseTexture6 = new BABYLON.Texture("/playground/textures/fur.jpg", scene);
mix.diffuseTexture7 = new BABYLON.Texture("/playground/textures/sand.jpg", scene);
mix.diffuseTexture8 = new BABYLON.Texture("/playground/textures/crate.png", scene);
mix.diffuseTexture5 = new BABYLON.Texture("/Playground/textures/leopard_fur.JPG", scene);
mix.diffuseTexture6 = new BABYLON.Texture("/Playground/textures/fur.jpg", scene);
mix.diffuseTexture7 = new BABYLON.Texture("/Playground/textures/sand.jpg", scene);
mix.diffuseTexture8 = new BABYLON.Texture("/Playground/textures/crate.png", scene);

mix.diffuseTexture5.uScale = mix.diffuseTexture5.vScale = 10;
mix.diffuseTexture6.uScale = mix.diffuseTexture6.vScale = 10;
mix.diffuseTexture7.uScale = mix.diffuseTexture7.vScale = 5;
mix.diffuseTexture8.uScale = mix.diffuseTexture8.vScale = 10;

return mix;
};
};
@@ -1,12 +1,12 @@
window.prepareBackgroundMaterial = function() {
var backSky = new BABYLON.BackgroundMaterial("backSky", scene);
var hdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("/playground/textures/environment.dds", scene);
var hdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("/Playground/textures/environment.dds", scene);
hdrTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE
backSky.reflectionTexture = hdrTexture;
backSky.backFaceCulling = false;

var back = new BABYLON.BackgroundMaterial("back", scene);
back.diffuseTexture = new BABYLON.Texture("/playground/textures/WhiteTransarentRamp.png", scene);
back.diffuseTexture = new BABYLON.Texture("/Playground/textures/WhiteTransarentRamp.png", scene);
back.diffuseTexture.hasAlpha = true;

// Skybox
@@ -1,8 +1,8 @@
window.prepareFire = function() {
var fire = new BABYLON.FireMaterial("fire", scene);
fire.diffuseTexture = new BABYLON.Texture("/playground/textures/fire/diffuse.png", scene);
fire.distortionTexture = new BABYLON.Texture("/playground/textures/fire/distortion.png", scene);
fire.opacityTexture = new BABYLON.Texture("/playground/textures/fire/opacity.png", scene);
fire.diffuseTexture = new BABYLON.Texture("/Playground/textures/fire/diffuse.png", scene);
fire.distortionTexture = new BABYLON.Texture("/Playground/textures/fire/distortion.png", scene);
fire.opacityTexture = new BABYLON.Texture("/Playground/textures/fire/opacity.png", scene);

registerRangeUI("fire", "speed", 0, 20, function(value) {
fire.speed = value;
@@ -1,9 +1,9 @@
window.prepareLava = function() {
var lava = new BABYLON.LavaMaterial("lava", scene);
lava.diffuseTexture = new BABYLON.Texture("/playground/textures/lava/lavatile.jpg", scene);
lava.diffuseTexture = new BABYLON.Texture("/Playground/textures/lava/lavatile.jpg", scene);
lava.diffuseTexture.uScale = 0.5;
lava.diffuseTexture.vScale = 0.5;
lava.noiseTexture = new BABYLON.Texture("/playground/textures/lava/cloud.png", scene);
lava.noiseTexture = new BABYLON.Texture("/Playground/textures/lava/cloud.png", scene);
lava.fogColor = BABYLON.Color3.Black();
lava.speed = 2.5;

@@ -1,11 +1,11 @@
window.preparePBR = function() {
var pbr = new BABYLON.PBRMaterial("pbr", scene);

pbr.albedoTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
pbr.albedoTexture = new BABYLON.Texture("/Playground/textures/amiga.jpg", scene);
pbr.albedoTexture.uScale = 5;
pbr.albedoTexture.vScale = 5;

var hdrTexture = new BABYLON.HDRCubeTexture("/playground/textures/environment.hdr", scene, 512);
var hdrTexture = new BABYLON.HDRCubeTexture("/Playground/textures/environment.hdr", scene, 512);


// Uncomment for PMREM Generation
@@ -15,7 +15,7 @@ window.preparePBR = function() {
pbr.linkRefractionWithTransparency = true;
pbr.indexOfRefraction = 0.52;

var colorGrading = new BABYLON.Texture("/playground/textures/colorGrade.png", scene, true);
var colorGrading = new BABYLON.Texture("/Playground/textures/colorGrade.png", scene, true);
pbr.cameraColorGradingTexture = colorGrading;
pbr.colorGradingEnabled = true;

@@ -1,14 +1,14 @@
window.preparePBRMetallicRoughness = function() {
var pbr = new BABYLON.PBRMetallicRoughnessMaterial("pbrmetallicroughness", scene);

pbr.baseTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
pbr.baseTexture = new BABYLON.Texture("/Playground/textures/amiga.jpg", scene);
pbr.baseTexture.uScale = 5;
pbr.baseTexture.vScale = 5;
pbr.metallic = 0.5;
pbr.roughness = 0.1;

// Uncomment for PMREM Generation
var hdrTexture = new BABYLON.HDRCubeTexture("/playground/textures/environment.hdr", scene, 512);
var hdrTexture = new BABYLON.HDRCubeTexture("/Playground/textures/environment.hdr", scene, 512);
// var hdrTexture = new BABYLON.HDRCubeTexture("textures/hdr/environment.hdr", scene, 128, false, true, false, true);

// Skybox
@@ -1,14 +1,14 @@
window.preparePBRSpecularGlossiness = function() {
var pbr = new BABYLON.PBRSpecularGlossinessMaterial("pbrspecularglossiness", scene);

pbr.diffuseTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
pbr.diffuseTexture = new BABYLON.Texture("/Playground/textures/amiga.jpg", scene);
pbr.diffuseTexture.uScale = 5;
pbr.diffuseTexture.vScale = 5;
pbr.specularColor = new BABYLON.Color3(0.3, 0.3, 0.3);
pbr.glossiness = 0.9;

// Uncomment for PMREM Generation
var hdrTexture = new BABYLON.HDRCubeTexture("/playground/textures/environment.hdr", scene, 512);
var hdrTexture = new BABYLON.HDRCubeTexture("/Playground/textures/environment.hdr", scene, 512);
// var hdrTexture = new BABYLON.HDRCubeTexture("textures/hdr/environment.hdr", scene, 128, false, true, false, true);

// Skybox
@@ -2,14 +2,14 @@ window.prepareTerrain = function() {
var terrain = new BABYLON.TerrainMaterial("terrain", scene);
terrain.specularColor = new BABYLON.Color3(0.5, 0.5, 0.5);
terrain.specularPower = 64;
terrain.mixTexture = new BABYLON.Texture("/playground/textures/mixMap.png", scene);
terrain.diffuseTexture1 = new BABYLON.Texture("/playground/textures/floor.png", scene);
terrain.diffuseTexture2 = new BABYLON.Texture("/playground/textures/rock.png", scene);
terrain.diffuseTexture3 = new BABYLON.Texture("/playground/textures/grass.png", scene);
terrain.mixTexture = new BABYLON.Texture("/Playground/textures/mixMap.png", scene);
terrain.diffuseTexture1 = new BABYLON.Texture("/Playground/textures/floor.png", scene);
terrain.diffuseTexture2 = new BABYLON.Texture("/Playground/textures/rock.png", scene);
terrain.diffuseTexture3 = new BABYLON.Texture("/Playground/textures/grass.png", scene);

terrain.bumpTexture1 = new BABYLON.Texture("/playground/textures/floor_bump.PNG", scene);
terrain.bumpTexture2 = new BABYLON.Texture("/playground/textures/rockn.png", scene);
terrain.bumpTexture3 = new BABYLON.Texture("/playground/textures/grassn.png", scene);
terrain.bumpTexture1 = new BABYLON.Texture("/Playground/textures/floor_bump.PNG", scene);
terrain.bumpTexture2 = new BABYLON.Texture("/Playground/textures/rockn.png", scene);
terrain.bumpTexture3 = new BABYLON.Texture("/Playground/textures/grassn.png", scene);

terrain.diffuseTexture1.uScale = terrain.diffuseTexture1.vScale = 10;
terrain.diffuseTexture2.uScale = terrain.diffuseTexture2.vScale = 10;
@@ -1,10 +1,10 @@
window.prepareTriPlanar = function() {
var triPlanar = new BABYLON.TriPlanarMaterial("triplanar", scene);
triPlanar.diffuseTextureX = new BABYLON.Texture("/playground/textures/rock.png", scene);
triPlanar.diffuseTextureY = new BABYLON.Texture("/playground/textures/grass.png", scene);
triPlanar.diffuseTextureX = new BABYLON.Texture("/Playground/textures/rock.png", scene);
triPlanar.diffuseTextureY = new BABYLON.Texture("/Playground/textures/grass.png", scene);
triPlanar.diffuseTextureZ = triPlanar.diffuseTextureX;
triPlanar.normalTextureX = new BABYLON.Texture("/playground/textures/rockn.png", scene);
triPlanar.normalTextureY = new BABYLON.Texture("/playground/textures/grassn.png", scene);
triPlanar.normalTextureX = new BABYLON.Texture("/Playground/textures/rockn.png", scene);
triPlanar.normalTextureY = new BABYLON.Texture("/Playground/textures/grassn.png", scene);
triPlanar.normalTextureZ = triPlanar.normalTextureX;
triPlanar.specularPower = 64;
triPlanar.tileSize = 1.5;
@@ -2,7 +2,7 @@ window.prepareWater = function() {
var water = new BABYLON.WaterMaterial("water", scene);
water.backFaceCulling = false;
water.enableRenderTargets(false);
water.bumpTexture = new BABYLON.Texture("/playground/textures/waterbump.png", scene);
water.bumpTexture = new BABYLON.Texture("/Playground/textures/waterbump.png", scene);
water.windForce = 45;
water.waveHeight = 1.3;
water.windDirection = new BABYLON.Vector2(1, 1);
@@ -4,7 +4,7 @@
<head>
<title>Shaders Library</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js"></script>
<script src="../tools/DevLoader/BabylonLoader.js"></script>
<script src="../Tools/DevLoader/BabylonLoader.js"></script>

<style>
html,
@@ -4,7 +4,7 @@
<head>
<title>Procedural textures Library</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js"></script>
<script src="../tools/DevLoader/BabylonLoader.js"></script>
<script src="../Tools/DevLoader/BabylonLoader.js"></script>

<style>
html,
@@ -90,7 +90,7 @@
var skybox = BABYLON.Mesh.CreateBox("skyBox", 1000.0, scene);
var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
skyboxMaterial.backFaceCulling = false;
skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("/playground/textures/TropicalSunnyDay", scene);
skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("/Playground/textures/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);
@@ -102,7 +102,7 @@
// Rabbit
var rabbit;
BABYLON.SceneLoader.ImportMesh("Rabbit", "/playground/scenes/", "Rabbit.babylon", scene, function (newMeshes, particleSystems, skeletons) {
BABYLON.SceneLoader.ImportMesh("Rabbit", "/Playground/scenes/", "Rabbit.babylon", scene, function (newMeshes, particleSystems, skeletons) {
rabbit = newMeshes[1];
rabbit.setEnabled(false);
rabbit.scaling = new BABYLON.Vector3(0.3, 0.3, 0.3);
@@ -161,7 +161,7 @@
var std = new BABYLON.StandardMaterial("std", scene);
std.specularColor = new BABYLON.Color3(0, 0, 0);
var diffuseTexture = new BABYLON.Texture("/playground/textures/amiga.jpg", scene);
var diffuseTexture = new BABYLON.Texture("/Playground/textures/amiga.jpg", scene);
diffuseTexture.uScale = 5;
diffuseTexture.vScale = 5;
@@ -109,7 +109,7 @@ import { ArcRotateCameraInputsManager } from "../Cameras/arcRotateCameraInputsMa
* This can help limiting how the Camera is able to move in the scene.
*/
@serialize()
public upperBetaLimit = Math.PI;
public upperBetaLimit = Math.PI - 0.01;

/**
* Minimum allowed distance of the camera to the target (The camera can not get closer).
@@ -2698,6 +2698,14 @@ import { EngineStore } from "./Engines/engineStore";
}
}

/**
* Resets the last animation time frame.
* Useful to override when animations start running when loading a scene for the first time.
*/
public resetLastAnimationTimeFrame(): void {
this._animationTimeLast = BABYLON.Tools.Now;
}

private _animate(): void {
if (!this.animationsEnabled || this._activeAnimatables.length === 0) {
return;
Oops, something went wrong.

0 comments on commit 870f924

Please sign in to comment.
You can’t perform that action at this time.