소스 검색

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

# Conflicts:
#	src/Rendering/babylon.geometryBufferRenderer.ts
Julien Moreau-Mathis 8 년 전
부모
커밋
28ebcc3bb0
100개의 변경된 파일30079개의 추가작업 그리고 28355개의 파일을 삭제
  1. BIN
      Exporters/3ds Max/Max2Babylon-0.8.0.zip
  2. 1 1
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Texture.cs
  3. 11 5
      Exporters/3ds Max/Max2Babylon/Tools/WebServer.cs
  4. BIN
      Exporters/Blender/Blender2Babylon-5.2.zip
  5. BIN
      Exporters/Blender/Blender2Babylon-5.3.zip
  6. 3 85
      Exporters/Blender/readme.md
  7. 1 1
      Exporters/Blender/src/babylon-js/__init__.py
  8. 14 1
      Exporters/Blender/src/babylon-js/light_shadow.py
  9. 7 6
      Exporters/Blender/src/babylon-js/package_level.py
  10. 66 8
      Exporters/Blender/src/babylon-js/world.py
  11. 8425 8151
      Playground/babylon.d.txt
  12. 56 10
      Playground/css/index.css
  13. 20 0
      Playground/debug.html
  14. 20 0
      Playground/frame.html
  15. 6 3
      Playground/index-local.html
  16. 25 2
      Playground/index.html
  17. 20 0
      Playground/index2_5.html
  18. 7 2
      Playground/js/index.js
  19. 2 2
      Playground/package.json
  20. BIN
      Playground/waitlogo.png
  21. 4 4
      Playground/zipContent/index.html
  22. 17 8
      Tools/Gulp/config.json
  23. 5 2
      Tools/Gulp/gulpfile.js
  24. BIN
      assets/textures/grass.dds
  25. BIN
      assets/textures/player.png
  26. BIN
      assets/textures/test.png
  27. 352 225
      dist/preview release/babylon.d.ts
  28. 86 44
      dist/preview release/babylon.js
  29. 1505 928
      dist/preview release/babylon.max.js
  30. 352 225
      dist/preview release/babylon.module.d.ts
  31. 87 45
      dist/preview release/babylon.worker.js
  32. 992 868
      dist/preview release/customConfigurations/minimalViewer/babylon.d.ts
  33. 29 28
      dist/preview release/customConfigurations/minimalViewer/babylon.js
  34. 13948 12712
      dist/preview release/customConfigurations/minimalViewer/babylon.max.js
  35. 992 868
      dist/preview release/customConfigurations/minimalViewer/babylon.module.d.ts
  36. 15 0
      dist/preview release/gui/babylon.gui.d.ts
  37. 158 23
      dist/preview release/gui/babylon.gui.js
  38. 3 2
      dist/preview release/gui/babylon.gui.min.js
  39. 263 263
      dist/preview release/inspector/babylon.inspector.bundle.js
  40. 0 26
      dist/preview release/inspector/babylon.inspector.d.ts
  41. 2 152
      dist/preview release/inspector/babylon.inspector.js
  42. 3 3
      dist/preview release/inspector/babylon.inspector.min.js
  43. 3 0
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  44. 2 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  45. 58 62
      dist/preview release/loaders/babylon.glTF2FileLoader.d.ts
  46. 690 1063
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  47. 5 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  48. 58 62
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  49. 698 1068
      dist/preview release/loaders/babylon.glTFFileLoader.js
  50. 7 2
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  51. 5 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  52. 2 2
      dist/preview release/materialsLibrary/babylon.cellMaterial.js
  53. 1 1
      dist/preview release/materialsLibrary/babylon.cellMaterial.min.js
  54. 2 0
      dist/preview release/materialsLibrary/babylon.customMaterial.d.ts
  55. 6 1
      dist/preview release/materialsLibrary/babylon.customMaterial.js
  56. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  57. 1 1
      dist/preview release/materialsLibrary/babylon.furMaterial.js
  58. 1 1
      dist/preview release/materialsLibrary/babylon.furMaterial.min.js
  59. 2 2
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  60. 1 1
      dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js
  61. 1 2
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  62. 1 1
      dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js
  63. 3 5
      dist/preview release/materialsLibrary/babylon.legacyPbrMaterial.js
  64. 3 3
      dist/preview release/materialsLibrary/babylon.legacyPbrMaterial.min.js
  65. 2 3
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  66. 1 1
      dist/preview release/materialsLibrary/babylon.normalMaterial.min.js
  67. 2 2
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js
  68. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js
  69. 2 2
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js
  70. 1 1
      dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js
  71. 1 1
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js
  72. 1 1
      dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js
  73. 1 1
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js
  74. 1 1
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js
  75. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.js
  76. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  77. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  78. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  79. 13 0
      dist/preview release/proceduralTexturesLibrary/babylon.perlinNoiseProceduralTexture.d.ts
  80. 47 0
      dist/preview release/proceduralTexturesLibrary/babylon.perlinNoiseProceduralTexture.js
  81. 1 0
      dist/preview release/proceduralTexturesLibrary/babylon.perlinNoiseProceduralTexture.min.js
  82. 3 2
      dist/preview release/what's new.md
  83. 39 2
      gui/src/advancedDynamicTexture.ts
  84. 7 0
      gui/src/controls/container.ts
  85. 51 1
      gui/src/controls/control.ts
  86. 5 6
      gui/src/controls/ellipse.ts
  87. 79 11
      gui/src/controls/image.ts
  88. 7 11
      gui/src/controls/radioButton.ts
  89. 0 5
      inspector/src/Inspector.ts
  90. 0 72
      inspector/src/adapters/Canvas2DAdapter.ts
  91. 0 45
      inspector/src/tabs/Canvas2DTab.ts
  92. 0 7
      inspector/src/tabs/StatsTab.ts
  93. 0 4
      inspector/src/tabs/TabBar.ts
  94. 0 72
      inspector/test/index.js
  95. 74 0
      license.md
  96. 3 0
      loaders/src/glTF/1.0/babylon.glTFLoader.ts
  97. 662 1062
      loaders/src/glTF/2.0/babylon.glTFLoader.ts
  98. 6 17
      loaders/src/glTF/2.0/babylon.glTFLoaderExtension.ts
  99. 17 35
      loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts
  100. 0 0
      loaders/src/glTF/2.0/babylon.glTFLoaderUtils.ts

BIN
Exporters/3ds Max/Max2Babylon-0.8.0.zip


+ 1 - 1
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.Texture.cs

@@ -207,7 +207,7 @@ namespace Max2Babylon
             // Animations
             var animations = new List<BabylonAnimation>();
             ExportFloatAnimation("uOffset", animations, key => new[] { uvGen.GetUOffs(key) });
-            ExportFloatAnimation("vOffset", animations, key => new[] { uvGen.GetVOffs(key) });
+            ExportFloatAnimation("vOffset", animations, key => new[] { -uvGen.GetVOffs(key) });
             ExportFloatAnimation("uScale", animations, key => new[] { uvGen.GetUScl(key) });
             ExportFloatAnimation("vScale", animations, key => new[] { uvGen.GetVScl(key) });
             ExportFloatAnimation("uAng", animations, key => new[] { uvGen.GetUAng(key) });

+ 11 - 5
Exporters/3ds Max/Max2Babylon/Tools/WebServer.cs

@@ -18,12 +18,12 @@ namespace Max2Babylon
 
 <head>
     <title>Babylon.js</title>
-    <script type='text/javascript' src='http://www.babylonjs.com/oimo.js'></script>
-    <script type='text/javascript' src='http://www.babylonjs.com/cannon.js'></script>
-    <script type='text/javascript' src='http://www.babylonjs.com/babylon.js'></script>
-    <script type='text/javascript' src='http://www.babylonjs.com/babylon.inspector.bundle.js'></script>
+    <script type='text/javascript' src='https://preview.babylonjs.com/oimo.js'></script>
+    <script type='text/javascript' src='https://preview.babylonjs.com/cannon.js'></script>
+    <script type='text/javascript' src='https://preview.babylonjs.com/babylon.js'></script>
+    <script type='text/javascript' src='https://preview.babylonjs.com/inspector/babylon.inspector.bundle.js'></script>
     <style type='text/css'>
-        html, body, div, canvas {
+        html, body, canvas {
             width: 100%;
             height: 100%;
             padding: 0;
@@ -54,6 +54,12 @@ namespace Max2Babylon
         BABYLON.SceneLoader.Load('', '###SCENE###', engine, function (newScene) {
             newScene.activeCamera.attachControl(canvas);
 
+            var keyboard = newScene.activeCamera.inputs.attached.keyboard;
+            keyboard.keysUp.push(87);
+            keyboard.keysDown.push(83);
+            keyboard.keysLeft.push(65);
+            keyboard.keysRight.push(68);
+
             engine.runRenderLoop(function() {
                 newScene.render();
             });

BIN
Exporters/Blender/Blender2Babylon-5.2.zip


BIN
Exporters/Blender/Blender2Babylon-5.3.zip


+ 3 - 85
Exporters/Blender/readme.md

@@ -1,90 +1,8 @@
 Blender to Babylon.js exporter
 ==============================
 
-The [Blender export plugin](http://blogs.msdn.com/b/eternalcoding/archive/2013/06/28/babylon-js-how-to-load-a-babylon-file-produced-with-blender.aspx) supports the following features:
-
-For a discussion of Tower of Babel exporter, along with the difference this exporter, see [ToB readme](https://github.com/BabylonJS/Extensions/tree/master/QueuedInterpolation/Blender).
-
-* **Cameras**
- * Name
- * Position
- * Target
- * Fov
- * Clip start
- * Clip end
- * Check collisions
- * Gravity
- * Ellipsoid
- * Actions exported as AnimationRanges
- * 3D Camera Rigs
- * All kind of Babylon.js cameras can be chosen from a custom dropdown list
-* **Lights**
- * Type (Point, directional (Sun), Spot, Hemispheric)
- * Name
- * Position
- * Direction
- * Spot size
- * Spot blend 
- * Energy
- * Diffuse color
- * Specular color
- * Include only meshes in same Blender layer
- * Shadow maps, all types (For directional lights)
- * Actions exported as AnimationRanges
-* **Materials**
- * Name
- * Name space
- * Ambient color
- * Diffuse color
- * Specular color
- * Specular hardness
- * Emissive color
- * Alpha
- * Backface culling
- * Diffuse texture
- * Ambient texture
- * Opacity texture
- * Reflection texture
- * Emissive texture
- * Bump texture
- * Procedural Texture Baking
- * Cycles Render Baking
- * Check Ready Only Once
- * Maximum Simultaneous Lights
-* **Multi-materials**
- * Name
- * Child materials
- * 32 bit vertex limit for multi-materials
-* **Textures**
- * Name
- * Associated file
- * Level
- * Use alpha
- * uOffset / voffset
- * uScale / uScale
- * uAng / vAng / Wang
- * WrapU / WrapV
- * Coordinates index
- * Texture in-lining to .babylon file
-* **Meshes**
- * Name
- * Geometry (Positions & normals)
- * Position
- * Rotation
- * Scaling
- * FreezeWorldMatrix
- * Texture coordinates (2 channels)
- * Vertex colors
- * Visibility
- * Load disabled
- * Check collisions
- * Billboard
- * Receive and cast shadows
- * Bones (armatures) and bones' actions
- 	* Variable Max Bone Influencers / vertex
- * Actions exported as AnimationRanges
-
-
-
+Direct download of [last version](https://github.com/BabylonJS/Babylon.js/blob/master/Exporters/Blender/Blender2Babylon-5.3.zip?raw=true).
 
+See the [exporters documentation](http://doc.babylonjs.com/exporters) for a list of [features](http://doc.babylonjs.com/exporters/blender), some [tips](http://doc.babylonjs.com/exporters/blender_tips) and others.
 
+Tower of Babel extension can be found [here](https://github.com/BabylonJS/Extensions/tree/master/QueuedInterpolation/Blender).

+ 1 - 1
Exporters/Blender/src/babylon-js/__init__.py

@@ -1,7 +1,7 @@
 bl_info = {
     'name': 'Babylon.js',
     'author': 'David Catuhe, Jeff Palmer',
-    'version': (5, 3, -1),
+    'version': (5, 3, 0),
     'blender': (2, 76, 0),
     'location': 'File > Export > Babylon.js (.babylon)',
     'description': 'Export Babylon.js scenes (.babylon)',

+ 14 - 1
Exporters/Blender/src/babylon-js/light_shadow.py

@@ -113,6 +113,7 @@ class ShadowGenerator:
         self.lightId = lamp.name
         self.mapSize = lamp.data.shadowMapSize
         self.shadowBias = lamp.data.shadowBias
+        self.shadowDarkness = lamp.data.shadowDarkness
 
         if lamp.data.shadowMap == ESM_SHADOWS:
             self.useExponentialShadowMap = True
@@ -133,7 +134,8 @@ class ShadowGenerator:
         file_handler.write('{')
         write_int(file_handler, 'mapSize', self.mapSize, True)
         write_string(file_handler, 'lightId', self.lightId)
-        write_float(file_handler, 'bias', self.shadowBias)
+        write_float(file_handler, 'bias', self.shadowBias, precision = 5)
+        write_float(file_handler, 'darkness', self.shadowDarkness)
 
         if hasattr(self, 'useExponentialShadowMap') :
             write_bool(file_handler, 'useExponentialShadowMap', self.useExponentialShadowMap)
@@ -195,6 +197,13 @@ bpy.types.Lamp.shadowBlurBoxOffset = bpy.props.IntProperty(
     description='Setting when using a Blur Variance shadow map',
     default = 0
 )
+bpy.types.Lamp.shadowDarkness = bpy.props.FloatProperty(
+    name='Shadow Darkness',
+    description='Shadow Darkness',
+    default = 1,
+    min = 0, 
+    max = 1
+)
 #===============================================================================
 class LightPanel(bpy.types.Panel):
     bl_label = get_title()
@@ -220,6 +229,10 @@ class LightPanel(bpy.types.Panel):
         row = layout.row()
         row.enabled = usingShadows
         row.prop(ob.data, 'shadowBias')
+        
+        row = layout.row()
+        row.enabled = usingShadows
+        row.prop(ob.data, 'shadowDarkness')
 
         box = layout.box()
         box.label(text="Blur ESM Shadows")

+ 7 - 6
Exporters/Blender/src/babylon-js/package_level.py

@@ -4,8 +4,8 @@ from mathutils import Euler, Matrix
 
 from bpy import app
 from time import strftime
-MAX_FLOAT_PRECISION_INT = 4
-MAX_FLOAT_PRECISION = '%.' + str(MAX_FLOAT_PRECISION_INT) + 'f'
+FLOAT_PRECISION_DEFAULT = 4
+#MAX_FLOAT_PRECISION = '%.' + str(MAX_FLOAT_PRECISION_DEFAULT) + 'f'
 VERTEX_OUTPUT_PER_LINE = 50
 STRIP_LEADING_ZEROS_DEFAULT = False # false for .babylon
 #===============================================================================
@@ -92,8 +92,9 @@ def legal_js_identifier(input):
         out += '_' + prefix
     return out
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-def format_f(num, stripLeadingZero = STRIP_LEADING_ZEROS_DEFAULT):
-    s = MAX_FLOAT_PRECISION % num # rounds to N decimal places while changing to string
+def format_f(num, stripLeadingZero = STRIP_LEADING_ZEROS_DEFAULT, precision = FLOAT_PRECISION_DEFAULT):
+    fmt = '%.' + str(precision) + 'f'
+    s = fmt % num  # rounds to N decimal places
     s = s.rstrip('0') # strip trailing zeroes
     s = s.rstrip('.') # strip trailing .
     s = '0' if s == '-0' else s # nuke -0
@@ -267,8 +268,8 @@ def write_string(file_handler, name, string, noComma = False):
         file_handler.write(',')
     file_handler.write('"' + name + '":"' + string + '"')
 
-def write_float(file_handler, name, float):
-    file_handler.write(',"' + name + '":' + format_f(float))
+def write_float(file_handler, name, float, precision = FLOAT_PRECISION_DEFAULT):
+    file_handler.write(',"' + name + '":' + format_f(float, precision = precision))
 
 def write_int(file_handler, name, int, noComma = False):
     if noComma == False:

+ 66 - 8
Exporters/Blender/src/babylon-js/world.py

@@ -2,12 +2,19 @@ from .logger import *
 from .package_level import *
 
 import bpy
+import mathutils
 
 # used in World constructor, defined in BABYLON.Scene
-#FOGMODE_NONE = 0
-#FOGMODE_EXP = 1
-#FOGMODE_EXP2 = 2
+FOGMODE_NONE = 0
+FOGMODE_EXP = 1
+FOGMODE_EXP2 = 2
 FOGMODE_LINEAR = 3
+
+eFOGMODE_NONE = "NONE"
+eFOGMODE_LINEAR = "LINEAR"
+eFOGMODE_EXP = "EXP"
+eFOGMODE_EXP2 = "EXP2"
+
 #===============================================================================
 class World:
     def __init__(self, scene):
@@ -23,12 +30,19 @@ class World:
         self.gravity = scene.gravity
 
         if world and world.mist_settings.use_mist:
-            self.fogMode = FOGMODE_LINEAR
+            if world.fogMode == eFOGMODE_LINEAR:
+                self.fogMode = FOGMODE_LINEAR
+            elif world.fogMode == eFOGMODE_EXP:
+                self.fogMode = FOGMODE_EXP
+            elif world.fogMode == eFOGMODE_EXP2:
+                self.fogMode = FOGMODE_EXP2
             self.fogColor = world.horizon_color
             self.fogStart = world.mist_settings.start
             self.fogEnd = world.mist_settings.depth
-            self.fogDensity = 0.1
-
+            self.fogDensity = world.fogDensity
+        else:
+            self.fogMode = FOGMODE_NONE
+        
         Logger.log('Python World class constructor completed')
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     def to_scene_file(self, file_handler, needPhysics):
@@ -40,9 +54,53 @@ class World:
         if needPhysics:
             write_bool(file_handler, 'physicsEnabled', True)
             
-        if hasattr(self, 'fogMode'):
+        if hasattr(self, 'fogMode') and (self.fogMode != FOGMODE_NONE):
             write_int(file_handler, 'fogMode', self.fogMode)
             write_color(file_handler, 'fogColor', self.fogColor)
             write_float(file_handler, 'fogStart', self.fogStart)
             write_float(file_handler, 'fogEnd', self.fogEnd)
-            write_float(file_handler, 'fogDensity', self.fogDensity)
+            write_float(file_handler, 'fogDensity', self.fogDensity)
+
+#===============================================================================
+
+bpy.types.World.fogMode = bpy.props.EnumProperty(
+    name='Fog Mode',
+    description='',
+    items = ((eFOGMODE_LINEAR   , 'Linear',             'Linear Fog'),
+             (eFOGMODE_EXP      , 'Exponential',        'Exponential Fog'),
+             (eFOGMODE_EXP2     , 'Exponential Squared','Exponential Squared Fog')
+            ),
+    default = eFOGMODE_LINEAR
+)
+
+bpy.types.World.fogDensity = bpy.props.FloatProperty(
+    name='Fog Density',
+    description='',
+    default = 0.3
+)
+
+#===============================================================================
+class WorldPanel(bpy.types.Panel):
+    bl_label = get_title()
+    bl_space_type = 'PROPERTIES'
+    bl_region_type = 'WINDOW'
+    bl_context = 'world'
+
+    @classmethod
+    def poll(cls, context):
+        ob = context.world
+        #print(ob.data)
+        return ob is not None and isinstance(ob, bpy.types.World)
+
+    def draw(self, context):
+        ob = context.world
+        fogEnabled = ob.mist_settings.use_mist
+        layout = self.layout
+        row = layout.row()
+        row.enabled = fogEnabled
+        row.prop(ob, 'fogMode')
+        
+        row = layout.row()
+        row.enabled = fogEnabled
+        row.prop(ob, 'fogDensity')
+        

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 8425 - 8151
Playground/babylon.d.txt


+ 56 - 10
Playground/css/index.css

@@ -9,6 +9,59 @@ body {
     overflow: hidden;
     font-family: sans-serif;
 }
+#waitDiv {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    background: black;
+    opacity: 0.8;
+    top:0px;
+    left:0px;
+    z-index: 10;
+    flex-direction: column;
+}
+
+#waitLogo {
+    -webkit-animation: spin1 2s infinite ease-in-out;
+    -moz-animation: spin1 2s infinite ease-in-out;
+    -o-animation: spin1 2s infinite ease-in-out;
+    -ms-animation: spin1 2s infinite ease-in-out;
+    animation: spin1 2s infinite ease-in-out;
+    -webkit-transform-origin: 50% 50%;
+    -moz-transform-origin: 50% 50%;
+    -o-transform-origin: 50% 50%;
+    transform-origin: 50% 50%;    
+}
+
+@-webkit-keyframes spin1 {
+0% { -webkit-transform: rotate(0deg);}
+100% { -webkit-transform: rotate(360deg);}
+}
+@-moz-keyframes spin1 {
+0% { -moz-transform: rotate(0deg);}
+100% { -moz-transform: rotate(360deg);}
+}
+@-o-keyframes spin1 {
+0% { -o-transform: rotate(0deg);}
+100% { -o-transform: rotate(360deg);}
+}
+@-ms-keyframes spin1 {
+0% { -ms-transform: rotate(0deg);}
+100% { -ms-transform: rotate(360deg);}
+}
+@keyframes spin1 {
+0% { transform: rotate(0deg);}
+100% { transform: rotate(360deg);}
+} 
+
+#waitTitle {
+    text-align: center;
+    font-size: 38px;
+    color: #15A4FA;
+}
 .wrapper {
     height: calc(100% - 40px - 30px); /* nvabar top and bottom*/
     width: 100%;
@@ -465,16 +518,6 @@ body {
 }
 @media (max-width: 1475px) {
     .navBar1600 { display: none; }
-    .navBar1475 { display: block; }
-    .navBar1030 { display: none; }
-    .navBar750 { display: none; }
-
-    .navbar .select .toDisplayBig ul {
-        column-count: 3;
-    }
-}
-@media (max-width: 1030px) {
-    .navBar1600 { display: none; }
     .navBar1475 { display: none; }
     .navBar1030 { display: block; }
     .navBar750 { display: none; }
@@ -491,6 +534,9 @@ body {
     .removeOnPhone {
         display : none !important;
     }
+    .navbar .select .toDisplayBig {
+        width:350px;
+    }    
     .navbar .select .toDisplayBig ul {
         column-count: 1;
     }

+ 20 - 0
Playground/debug.html

@@ -5,6 +5,26 @@
     <title>Babylon.js Playground</title>
     <meta charset='utf-8' />
     <meta name="viewport" content="width=device-width, user-scalable=no">
+    <link rel="shortcut icon" href="https://www.babylonjs.com/img/favicon/favicon.ico">
+	<link rel="apple-touch-icon" sizes="57x57" href="https://www.babylonjs.com/img/favicon/apple-icon-57x57.png">
+	<link rel="apple-touch-icon" sizes="60x60" href="https://www.babylonjs.com/img/favicon/apple-icon-60x60.png">
+	<link rel="apple-touch-icon" sizes="72x72" href="https://www.babylonjs.com/img/favicon/apple-icon-72x72.png">
+	<link rel="apple-touch-icon" sizes="76x76" href="https://www.babylonjs.com/img/favicon/apple-icon-76x76.png">
+	<link rel="apple-touch-icon" sizes="114x114" href="https://www.babylonjs.com/img/favicon/apple-icon-114x114.png">
+	<link rel="apple-touch-icon" sizes="120x120" href="https://www.babylonjs.com/img/favicon/apple-icon-120x120.png">
+	<link rel="apple-touch-icon" sizes="144x144" href="https://www.babylonjs.com/img/favicon/apple-icon-144x144.png">
+	<link rel="apple-touch-icon" sizes="152x152" href="https://www.babylonjs.com/img/favicon/apple-icon-152x152.png">
+	<link rel="apple-touch-icon" sizes="180x180" href="https://www.babylonjs.com/img/favicon/apple-icon-180x180.png">
+	<link rel="icon" type="image/png" sizes="192x192"  href="https://www.babylonjs.com/img/favicon/android-icon-192x192.png">
+	<link rel="icon" type="image/png" sizes="32x32" href="https://www.babylonjs.com/img/favicon/favicon-32x32.png">
+	<link rel="icon" type="image/png" sizes="96x96" href="https://www.babylonjs.com/img/favicon/favicon-96x96.png">
+	<link rel="icon" type="image/png" sizes="16x16" href="https://www.babylonjs.com/img/favicon/favicon-16x16.png">
+	<link rel="manifest" href="https://www.babylonjs.com/img/favicon/manifest.json">
+	<meta name="msapplication-TileColor" content="#ffffff">
+	<meta name="msapplication-TileImage" content="https://www.babylonjs.com/img/favicon/ms-icon-144x144.png">
+	<meta name="msapplication-config" content="https://www.babylonjs.com/img/favicon/browserconfig.xml">
+	<meta name="theme-color" content="#ffffff">
+
     <script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
     <!--For canvas/code separator-->
     <script src="js/libs/split.js"></script>

+ 20 - 0
Playground/frame.html

@@ -3,6 +3,26 @@
 
 <head>
     <title>Babylon.js Playground</title>
+    <link rel="shortcut icon" href="https://www.babylonjs.com/img/favicon/favicon.ico">
+	<link rel="apple-touch-icon" sizes="57x57" href="https://www.babylonjs.com/img/favicon/apple-icon-57x57.png">
+	<link rel="apple-touch-icon" sizes="60x60" href="https://www.babylonjs.com/img/favicon/apple-icon-60x60.png">
+	<link rel="apple-touch-icon" sizes="72x72" href="https://www.babylonjs.com/img/favicon/apple-icon-72x72.png">
+	<link rel="apple-touch-icon" sizes="76x76" href="https://www.babylonjs.com/img/favicon/apple-icon-76x76.png">
+	<link rel="apple-touch-icon" sizes="114x114" href="https://www.babylonjs.com/img/favicon/apple-icon-114x114.png">
+	<link rel="apple-touch-icon" sizes="120x120" href="https://www.babylonjs.com/img/favicon/apple-icon-120x120.png">
+	<link rel="apple-touch-icon" sizes="144x144" href="https://www.babylonjs.com/img/favicon/apple-icon-144x144.png">
+	<link rel="apple-touch-icon" sizes="152x152" href="https://www.babylonjs.com/img/favicon/apple-icon-152x152.png">
+	<link rel="apple-touch-icon" sizes="180x180" href="https://www.babylonjs.com/img/favicon/apple-icon-180x180.png">
+	<link rel="icon" type="image/png" sizes="192x192"  href="https://www.babylonjs.com/img/favicon/android-icon-192x192.png">
+	<link rel="icon" type="image/png" sizes="32x32" href="https://www.babylonjs.com/img/favicon/favicon-32x32.png">
+	<link rel="icon" type="image/png" sizes="96x96" href="https://www.babylonjs.com/img/favicon/favicon-96x96.png">
+	<link rel="icon" type="image/png" sizes="16x16" href="https://www.babylonjs.com/img/favicon/favicon-16x16.png">
+	<link rel="manifest" href="https://www.babylonjs.com/img/favicon/manifest.json">
+	<meta name="msapplication-TileColor" content="#ffffff">
+	<meta name="msapplication-TileImage" content="https://www.babylonjs.com/img/favicon/ms-icon-144x144.png">
+	<meta name="msapplication-config" content="https://www.babylonjs.com/img/favicon/browserconfig.xml">
+	<meta name="theme-color" content="#ffffff">
+
     <script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
     <!-- Babylon.js -->
     <script src="https://preview.babylonjs.com/cannon.js"></script>

+ 6 - 3
Playground/index-local.html

@@ -29,7 +29,6 @@
             Babylon.js Playground
         </div>
         <div class="version" id="mainTitle">
-            v3.0-alpha
         </div>
 
         <div class="category">
@@ -104,7 +103,6 @@
             Babylon.js Playground
         </div>
         <div class="version" id="mainTitle">
-            v3.0-alpha
         </div>
 
         <div class="category">
@@ -302,7 +300,7 @@
         <div id="jsEditor"></div>
         <div id="canvasZone">
             <canvas touch-action="none" id="renderCanvas"></canvas>
-        </div>
+        </div>          
     </div>
 
     <span class="label" id="fpsLabel">FPS</span>
@@ -343,6 +341,11 @@
         </div>
     </div>
 
+    <div id="waitDiv">
+        <span id="waitTitle">Babylon.js Playground<BR><BR><BR></span>
+        <img src="waitlogo.png" id="waitLogo"/>
+    </div>   
+
     <script src="https://code.jquery.com/jquery.js"></script>
 
     <script src="js/actions.js"></script>

+ 25 - 2
Playground/index.html

@@ -5,6 +5,26 @@
     <title>Babylon.js Playground</title>
     <meta charset='utf-8' />
     <meta name="viewport" content="width=device-width, user-scalable=no">
+    <link rel="shortcut icon" href="https://www.babylonjs.com/img/favicon/favicon.ico">
+	<link rel="apple-touch-icon" sizes="57x57" href="https://www.babylonjs.com/img/favicon/apple-icon-57x57.png">
+	<link rel="apple-touch-icon" sizes="60x60" href="https://www.babylonjs.com/img/favicon/apple-icon-60x60.png">
+	<link rel="apple-touch-icon" sizes="72x72" href="https://www.babylonjs.com/img/favicon/apple-icon-72x72.png">
+	<link rel="apple-touch-icon" sizes="76x76" href="https://www.babylonjs.com/img/favicon/apple-icon-76x76.png">
+	<link rel="apple-touch-icon" sizes="114x114" href="https://www.babylonjs.com/img/favicon/apple-icon-114x114.png">
+	<link rel="apple-touch-icon" sizes="120x120" href="https://www.babylonjs.com/img/favicon/apple-icon-120x120.png">
+	<link rel="apple-touch-icon" sizes="144x144" href="https://www.babylonjs.com/img/favicon/apple-icon-144x144.png">
+	<link rel="apple-touch-icon" sizes="152x152" href="https://www.babylonjs.com/img/favicon/apple-icon-152x152.png">
+	<link rel="apple-touch-icon" sizes="180x180" href="https://www.babylonjs.com/img/favicon/apple-icon-180x180.png">
+	<link rel="icon" type="image/png" sizes="192x192"  href="https://www.babylonjs.com/img/favicon/android-icon-192x192.png">
+	<link rel="icon" type="image/png" sizes="32x32" href="https://www.babylonjs.com/img/favicon/favicon-32x32.png">
+	<link rel="icon" type="image/png" sizes="96x96" href="https://www.babylonjs.com/img/favicon/favicon-96x96.png">
+	<link rel="icon" type="image/png" sizes="16x16" href="https://www.babylonjs.com/img/favicon/favicon-16x16.png">
+	<link rel="manifest" href="https://www.babylonjs.com/img/favicon/manifest.json">
+	<meta name="msapplication-TileColor" content="#ffffff">
+	<meta name="msapplication-TileImage" content="https://www.babylonjs.com/img/favicon/ms-icon-144x144.png">
+	<meta name="msapplication-config" content="https://www.babylonjs.com/img/favicon/browserconfig.xml">
+	<meta name="theme-color" content="#ffffff">
+    
     <script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
     <!--For canvas/code separator-->
     <script src="js/libs/split.js"></script>
@@ -65,7 +85,6 @@
             Babylon.js Playground
         </div>
         <div class="version" id="mainTitle">
-            v3.0-alpha
         </div>
 
         <div class="category">
@@ -140,7 +159,6 @@
             Babylon.js Playground
         </div>
         <div class="version" id="mainTitle">
-            v3.0-alpha
         </div>
 
         <div class="category">
@@ -379,6 +397,11 @@
         </div>
     </div>
 
+    <div id="waitDiv">
+        <span id="waitTitle">Babylon.js Playground<BR><BR><BR></span>
+        <img src="waitlogo.png" id="waitLogo"/>
+    </div>   
+
     <script src="https://code.jquery.com/jquery.js"></script>
 
     <script src="js/actions.js"></script>

+ 20 - 0
Playground/index2_5.html

@@ -5,6 +5,26 @@
     <title>Babylon.js Playground</title>
     <meta charset='utf-8' />
     <meta name="viewport" content="width=device-width, user-scalable=no">
+    <link rel="shortcut icon" href="https://www.babylonjs.com/img/favicon/favicon.ico">
+	<link rel="apple-touch-icon" sizes="57x57" href="https://www.babylonjs.com/img/favicon/apple-icon-57x57.png">
+	<link rel="apple-touch-icon" sizes="60x60" href="https://www.babylonjs.com/img/favicon/apple-icon-60x60.png">
+	<link rel="apple-touch-icon" sizes="72x72" href="https://www.babylonjs.com/img/favicon/apple-icon-72x72.png">
+	<link rel="apple-touch-icon" sizes="76x76" href="https://www.babylonjs.com/img/favicon/apple-icon-76x76.png">
+	<link rel="apple-touch-icon" sizes="114x114" href="https://www.babylonjs.com/img/favicon/apple-icon-114x114.png">
+	<link rel="apple-touch-icon" sizes="120x120" href="https://www.babylonjs.com/img/favicon/apple-icon-120x120.png">
+	<link rel="apple-touch-icon" sizes="144x144" href="https://www.babylonjs.com/img/favicon/apple-icon-144x144.png">
+	<link rel="apple-touch-icon" sizes="152x152" href="https://www.babylonjs.com/img/favicon/apple-icon-152x152.png">
+	<link rel="apple-touch-icon" sizes="180x180" href="https://www.babylonjs.com/img/favicon/apple-icon-180x180.png">
+	<link rel="icon" type="image/png" sizes="192x192"  href="https://www.babylonjs.com/img/favicon/android-icon-192x192.png">
+	<link rel="icon" type="image/png" sizes="32x32" href="https://www.babylonjs.com/img/favicon/favicon-32x32.png">
+	<link rel="icon" type="image/png" sizes="96x96" href="https://www.babylonjs.com/img/favicon/favicon-96x96.png">
+	<link rel="icon" type="image/png" sizes="16x16" href="https://www.babylonjs.com/img/favicon/favicon-16x16.png">
+	<link rel="manifest" href="https://www.babylonjs.com/img/favicon/manifest.json">
+	<meta name="msapplication-TileColor" content="#ffffff">
+	<meta name="msapplication-TileImage" content="https://www.babylonjs.com/img/favicon/ms-icon-144x144.png">
+	<meta name="msapplication-config" content="https://www.babylonjs.com/img/favicon/browserconfig.xml">
+	<meta name="theme-color" content="#ffffff">
+
     <script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
     <!--For canvas/code separator-->
     <script src="js/libs/split.js"></script>

+ 7 - 2
Playground/js/index.js

@@ -92,6 +92,7 @@
             xhr.onreadystatechange = function () {
                 if (xhr.readyState === 4) {
                     if (xhr.status === 200) {
+                        xhr.onreadystatechange = null;
                         blockEditorChange = true;
                         jsEditor.setValue(xhr.responseText);
                         jsEditor.setPosition({ lineNumber: 0, column: 0 });
@@ -142,8 +143,8 @@
                                 a.innerHTML = (index + 1) + " - " + scripts[index];
                                 a.scriptLinkIndex = index + 1;
                                 a.onclick = onScriptClick;
-                                option.scriptLinkIndex = index + 1;
-                                option.onclick = onScriptClick;
+                                // option.scriptLinkIndex = index + 1;
+                                // option.onclick = onScriptClick;
 
                                 option.appendChild(a);
 
@@ -280,6 +281,10 @@
 
         compileAndRun = function () {
             try {
+                var waitRing = document.getElementById("waitDiv");
+                if (waitRing) {
+                    waitRing.style.display = "none";
+                }
 
                 if (!BABYLON.Engine.isSupported()) {
                     showError("Your browser does not support WebGL", null);

+ 2 - 2
Playground/package.json

@@ -1,6 +1,6 @@
 {
   "name": "babylonjsplayground",
-  "version": "2.6.0",
+  "version": "3.0.0",
   "description": "Babylon.js is a 3D engine based on webgl and javascript",
   "main": "",
   "repository": {
@@ -9,7 +9,7 @@
   "readme": "https://github.com/BabylonJS/Babylon.js/blob/master/readme.md",
   "license": "(Apache-2.0)",
   "devDependencies": {
-    "monaco-editor": "^0.7.0"
+    "monaco-editor": "~0.7.0"
   },
   "scripts": {
     "test": "browser-sync start --server --files **/* --no-inject-changes --startPath index.html"

BIN
Playground/waitlogo.png


+ 4 - 4
Playground/zipContent/index.html

@@ -5,10 +5,10 @@
 
         <title>Babylon.js sample code</title>
         <!-- Babylon.js -->
-        <script src="http://www.babylonjs.com/hand.minified-1.2.js"></script>
-        <script src="http://www.babylonjs.com/cannon.js"></script>
-        <script src="http://www.babylonjs.com/oimo.js"></script>
-        <script src="http://www.babylonjs.com/babylon.js"></script>
+        <script src="https://www.babylonjs.com/hand.minified-1.2.js"></script>
+        <script src="https://preview.babylonjs.com/cannon.js"></script>
+        <script src="https://preview.babylonjs.com/oimo.js"></script>
+        <script src="https://preview.babylonjs.com/babylon.js"></script>
         <style>
             html, body {
                 overflow: hidden;

+ 17 - 8
Tools/Gulp/config.json

@@ -21,14 +21,17 @@
                 "additionalPostProcess_blur", "additionalPostProcess_fxaa", "additionalPostProcess_imageProcessing",
                 "bones", "hdr", "polygonMesh", "csg", "lensFlares", "physics", "textureFormats", "debug", "morphTargets",
                 "colorCurves", "octrees", "simd", "vr", "virtualJoystick", "optimizations", "highlights", "assetsManager",
-                "mapTexture", "dynamicFloatArray", "serialization", "probes", "layer"
+                "mapTexture", "dynamicFloatArray", "serialization", "probes", "layer", "textureTools"
         ],
         "minimal": ["standardMaterial", "freeCamera", "hemisphericLight"],
         "minimalWithBuilder": ["meshBuilder", "standardMaterial", "freeCamera", "hemisphericLight"],
         "minimalViewer": [
-                "meshBuilder", "animations", "arcRotateCamera", "additionalTextures", "textureFormats", "debug",
-                "multiMaterial", "pbrMaterial", "pointLight", "directionalLight", "spotLight", "additionalPostProcess_blur", "additionalPostProcess_fxaa", "additionalPostProcess_highlights", "additionalPostProcess_imageProcessing",
-                "colorCurves", "defaultRenderingPipeline"
+                "animations", "arcRotateCamera", "additionalTextures", "textureFormats",
+                "shadows", "pointLight", "directionalLight", "spotLight",
+                "multiMaterial", "pbrMaterial",
+                "meshBuilder", "layer",
+                "additionalPostProcess_blur", "additionalPostProcess_fxaa", "additionalPostProcess_highlights", "additionalPostProcess_imageProcessing", "colorCurves", "defaultRenderingPipeline",
+                "debug", "textureTools"
         ],
         "distributed": ["minimalViewer"]
     },
@@ -86,6 +89,16 @@
                 "particles.vertex",
                 "particles.fragment"
             ]
+        },         
+        "textureTools" : 
+        {
+            "files": [
+                "../../src/Tools/babylon.textureTools.js"
+            ],
+            "dependUpon" : [
+                "core",
+                "postProcesses"
+            ]
         }, 
         "solidParticles" : 
         {
@@ -208,7 +221,6 @@
                 "bumpVertexDeclaration",
                 "clipPlaneVertexDeclaration",
                 "fogVertexDeclaration",
-                "shadowsVertexDeclaration",
                 "morphTargetsVertexGlobalDeclaration",
                 "morphTargetsVertexDeclaration",
                 "logDepthDeclaration",
@@ -268,7 +280,6 @@
                 "bumpVertexDeclaration",
                 "clipPlaneVertexDeclaration",
                 "fogVertexDeclaration",
-                "shadowsVertexDeclaration",
                 "morphTargetsVertexGlobalDeclaration",
                 "morphTargetsVertexDeclaration",
                 "logDepthDeclaration",
@@ -1404,7 +1415,6 @@
                     "../../inspector/src/adapters/CameraAdapter.ts",
                     "../../inspector/src/adapters/SoundAdapter.ts",
                     "../../inspector/src/adapters/TextureAdapter.ts",
-                    "../../inspector/src/adapters/Canvas2DAdapter.ts",
                     "../../inspector/src/adapters/LightAdapter.ts",
                     "../../inspector/src/adapters/MaterialAdapter.ts",
                     "../../inspector/src/adapters/MeshAdapter.ts",
@@ -1424,7 +1434,6 @@
                     "../../inspector/src/tabs/CameraTab.ts",
                     "../../inspector/src/tabs/SoundTab.ts",
                     "../../inspector/src/tabs/TextureTab.ts",
-                    "../../inspector/src/tabs/Canvas2DTab.ts",
                     "../../inspector/src/tabs/LightTab.ts",
                     "../../inspector/src/tabs/MaterialTab.ts",
                     "../../inspector/src/tabs/MeshTab.ts",

+ 5 - 2
Tools/Gulp/gulpfile.js

@@ -319,7 +319,10 @@ var buildExternalLibrary = function (library, settings, watch) {
 /**
  * The default task, concat and min the main BJS files.
  */
-gulp.task("default", function (cb) {
+gulp.task("default", ["typescript-all"], function () {
+});
+
+gulp.task("mainBuild", function (cb) {
     runSequence("buildWorker", "build", cb);
 });
 
@@ -327,7 +330,7 @@ gulp.task("default", function (cb) {
  * Build the releasable files.
  */
 gulp.task("typescript", function (cb) {
-    runSequence("typescript-compile", "default", cb);
+    runSequence("typescript-compile", "mainBuild", cb);
 });
 
 /**

BIN
assets/textures/grass.dds


BIN
assets/textures/player.png


BIN
assets/textures/test.png


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 352 - 225
dist/preview release/babylon.d.ts


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 86 - 44
dist/preview release/babylon.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1505 - 928
dist/preview release/babylon.max.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 352 - 225
dist/preview release/babylon.module.d.ts


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 87 - 45
dist/preview release/babylon.worker.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 992 - 868
dist/preview release/customConfigurations/minimalViewer/babylon.d.ts


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 29 - 28
dist/preview release/customConfigurations/minimalViewer/babylon.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 13948 - 12712
dist/preview release/customConfigurations/minimalViewer/babylon.max.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 992 - 868
dist/preview release/customConfigurations/minimalViewer/babylon.module.d.ts


+ 15 - 0
dist/preview release/gui/babylon.gui.d.ts

@@ -19,9 +19,11 @@ declare module BABYLON.GUI {
         private _fullscreenViewport;
         private _idealWidth;
         private _idealHeight;
+        private _renderAtIdealSize;
         background: string;
         idealWidth: number;
         idealHeight: number;
+        renderAtIdealSize: boolean;
         readonly layer: Layer;
         constructor(name: string, width: number, height: number, scene: Scene, generateMipMaps?: boolean, samplingMode?: number);
         executeOnAllControls(func: (control: Control) => void, container?: Container): void;
@@ -30,6 +32,7 @@ declare module BABYLON.GUI {
         removeControl(control: Control): AdvancedDynamicTexture;
         dispose(): void;
         private _onResize();
+        _getGlobalViewport(scene: Scene): Viewport;
         private _checkUpdate(camera);
         private _render();
         private _doPicking(x, y, type);
@@ -214,6 +217,9 @@ declare module BABYLON.GUI {
         readonly centerY: number;
         constructor(name?: string);
         protected _getTypeName(): string;
+        getLocalCoordinates(globalCoordinates: Vector2): Vector2;
+        getLocalCoordinatesToRef(globalCoordinates: Vector2, result: Vector2): Control;
+        moveToVector3(position: Vector3, scene: Scene): void;
         linkWithMesh(mesh: AbstractMesh): void;
         _moveToProjectedPosition(projectedPosition: Vector3): void;
         _markMatrixAsDirty(): void;
@@ -261,6 +267,7 @@ declare module BABYLON.GUI {
             isHorizontal: boolean;
             controlFirst: boolean;
         }): StackPanel;
+        protected static drawEllipse(x: number, y: number, width: number, height: number, context: CanvasRenderingContext2D): void;
     }
 }
 
@@ -480,6 +487,14 @@ declare module BABYLON.GUI {
         private _stretch;
         private _source;
         private _autoScale;
+        private _sourceLeft;
+        private _sourceTop;
+        private _sourceWidth;
+        private _sourceHeight;
+        sourceLeft: number;
+        sourceTop: number;
+        sourceWidth: number;
+        sourceHeight: number;
         autoScale: boolean;
         stretch: number;
         domImage: HTMLImageElement;

+ 158 - 23
dist/preview release/gui/babylon.gui.js

@@ -28,6 +28,7 @@ var BABYLON;
                 _this._fullscreenViewport = new BABYLON.Viewport(0, 0, 1, 1);
                 _this._idealWidth = 0;
                 _this._idealHeight = 0;
+                _this._renderAtIdealSize = false;
                 _this._renderObserver = _this.getScene().onBeforeCameraRenderObservable.add(function (camera) { return _this._checkUpdate(camera); });
                 _this._rootContainer._link(null, _this);
                 _this.hasAlpha = true;
@@ -82,6 +83,20 @@ var BABYLON;
                 enumerable: true,
                 configurable: true
             });
+            Object.defineProperty(AdvancedDynamicTexture.prototype, "renderAtIdealSize", {
+                get: function () {
+                    return this._renderAtIdealSize;
+                },
+                set: function (value) {
+                    if (this._renderAtIdealSize === value) {
+                        return;
+                    }
+                    this._renderAtIdealSize = value;
+                    this._onResize();
+                },
+                enumerable: true,
+                configurable: true
+            });
             Object.defineProperty(AdvancedDynamicTexture.prototype, "layer", {
                 get: function () {
                     return this._layerToDispose;
@@ -140,6 +155,16 @@ var BABYLON;
                 var textureSize = this.getSize();
                 var renderWidth = engine.getRenderWidth();
                 var renderHeight = engine.getRenderHeight();
+                if (this._renderAtIdealSize) {
+                    if (this._idealWidth) {
+                        renderHeight = (renderHeight * this._idealWidth) / renderWidth;
+                        renderWidth = this._idealWidth;
+                    }
+                    else if (this._idealHeight) {
+                        renderWidth = (renderWidth * this._idealHeight) / renderHeight;
+                        renderHeight = this._idealHeight;
+                    }
+                }
                 if (textureSize.width !== renderWidth || textureSize.height !== renderHeight) {
                     this.scaleTo(renderWidth, renderHeight);
                     this.markAsDirty();
@@ -148,6 +173,10 @@ var BABYLON;
                     }
                 }
             };
+            AdvancedDynamicTexture.prototype._getGlobalViewport = function (scene) {
+                var engine = scene.getEngine();
+                return this._fullscreenViewport.toGlobal(engine.getRenderWidth(), engine.getRenderHeight());
+            };
             AdvancedDynamicTexture.prototype._checkUpdate = function (camera) {
                 if (this._layerToDispose) {
                     if ((camera.layerMask & this._layerToDispose.layerMask) === 0) {
@@ -156,8 +185,7 @@ var BABYLON;
                 }
                 if (this._isFullscreen && this._linkedControls.length) {
                     var scene = this.getScene();
-                    var engine = scene.getEngine();
-                    var globalViewport = this._fullscreenViewport.toGlobal(engine.getRenderWidth(), engine.getRenderHeight());
+                    var globalViewport = this._getGlobalViewport(scene);
                     for (var _i = 0, _a = this._linkedControls; _i < _a.length; _i++) {
                         var control = _a[_i];
                         var mesh = control._linkedMesh;
@@ -179,6 +207,7 @@ var BABYLON;
                 this.update();
             };
             AdvancedDynamicTexture.prototype._render = function () {
+                var engine = this.getScene().getEngine();
                 var textureSize = this.getSize();
                 var renderWidth = textureSize.width;
                 var renderHeight = textureSize.height;
@@ -197,6 +226,12 @@ var BABYLON;
                 this._rootContainer._draw(measure, context);
             };
             AdvancedDynamicTexture.prototype._doPicking = function (x, y, type) {
+                var engine = this.getScene().getEngine();
+                var textureSize = this.getSize();
+                if (this._isFullscreen) {
+                    x = x * (textureSize.width / engine.getRenderWidth());
+                    y = y * (textureSize.height / engine.getRenderHeight());
+                }
                 if (this._capturingControl) {
                     this._capturingControl._processObservables(type, x, y);
                     return;
@@ -999,6 +1034,33 @@ var BABYLON;
             Control.prototype._getTypeName = function () {
                 return "Control";
             };
+            Control.prototype.getLocalCoordinates = function (globalCoordinates) {
+                var result = BABYLON.Vector2.Zero();
+                this.getLocalCoordinatesToRef(globalCoordinates, result);
+                return result;
+            };
+            Control.prototype.getLocalCoordinatesToRef = function (globalCoordinates, result) {
+                result.x = globalCoordinates.x - this._currentMeasure.left;
+                result.y = globalCoordinates.y - this._currentMeasure.top;
+                return this;
+            };
+            Control.prototype.moveToVector3 = function (position, scene) {
+                if (!this._host || this._root !== this._host._rootContainer) {
+                    BABYLON.Tools.Error("Cannot move a control to a vector3 if the control is not at root level");
+                    return;
+                }
+                this.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
+                this.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_TOP;
+                var engine = scene.getEngine();
+                var globalViewport = this._host._getGlobalViewport(scene);
+                var projectedPosition = BABYLON.Vector3.Project(position, BABYLON.Matrix.Identity(), scene.getTransformMatrix(), globalViewport);
+                this._moveToProjectedPosition(projectedPosition);
+                if (projectedPosition.z < 0 || projectedPosition.z > 1) {
+                    this.isVisible = false;
+                    return;
+                }
+                this.isVisible = true;
+            };
             Control.prototype.linkWithMesh = function (mesh) {
                 if (!this._host || this._root !== this._host._rootContainer) {
                     BABYLON.Tools.Error("Cannot link a control to a mesh if the control is not at root level");
@@ -1241,7 +1303,7 @@ var BABYLON;
                 return true;
             };
             Control.prototype._processPicking = function (x, y, type) {
-                if (!this.isHitTestVisible) {
+                if (!this.isHitTestVisible || !this.isVisible) {
                     return false;
                 }
                 if (!this.contains(x, y)) {
@@ -1424,6 +1486,15 @@ var BABYLON;
                 }
                 return panel;
             };
+            Control.drawEllipse = function (x, y, width, height, context) {
+                context.translate(x, y);
+                context.scale(width, height);
+                context.beginPath();
+                context.arc(0, 0, 1, 0, 2 * Math.PI);
+                context.closePath();
+                context.scale(1 / width, 1 / height);
+                context.translate(-x, -y);
+            };
             return Control;
         }());
         // Statics
@@ -1564,6 +1635,9 @@ var BABYLON;
                 }
             };
             Container.prototype._draw = function (parentMeasure, context) {
+                if (!this.isVisible) {
+                    return;
+                }
                 context.save();
                 this._applyStates(context);
                 if (this._processMeasures(parentMeasure, context)) {
@@ -1579,6 +1653,9 @@ var BABYLON;
                 context.restore();
             };
             Container.prototype._processPicking = function (x, y, type) {
+                if (!this.isHitTestVisible || !this.isVisible) {
+                    return false;
+                }
                 if (!_super.prototype.contains.call(this, x, y)) {
                     return false;
                 }
@@ -1867,9 +1944,7 @@ var BABYLON;
             };
             Ellipse.prototype._localDraw = function (context) {
                 context.save();
-                context.beginPath();
-                context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, 0, 0, 2 * Math.PI);
-                context.closePath();
+                GUI.Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, context);
                 if (this._background) {
                     context.fillStyle = this._background;
                     context.fill();
@@ -1891,8 +1966,7 @@ var BABYLON;
                 this._measureForChildren.top += this._thickness;
             };
             Ellipse.prototype._clipForChildren = function (context) {
-                context.beginPath();
-                context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2, this._currentMeasure.height / 2, 0, 0, 2 * Math.PI);
+                GUI.Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2, this._currentMeasure.height / 2, context);
                 context.clip();
             };
             return Ellipse;
@@ -2557,10 +2631,8 @@ var BABYLON;
                 if (this._processMeasures(parentMeasure, context)) {
                     var actualWidth = this._currentMeasure.width - this._thickness;
                     var actualHeight = this._currentMeasure.height - this._thickness;
-                    // Outer                
-                    context.beginPath();
-                    context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, 0, 0, 2 * Math.PI);
-                    context.closePath();
+                    // Outer
+                    GUI.Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, context);
                     context.fillStyle = this._background;
                     context.fill();
                     context.strokeStyle = this.color;
@@ -2571,9 +2643,7 @@ var BABYLON;
                         context.fillStyle = this.color;
                         var offsetWidth = actualWidth * this._checkSizeRatio;
                         var offseHeight = actualHeight * this._checkSizeRatio;
-                        context.beginPath();
-                        context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, offsetWidth / 2 - this._thickness / 2, offseHeight / 2 - this._thickness / 2, 0, 0, 2 * Math.PI);
-                        context.closePath();
+                        GUI.Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, offsetWidth / 2 - this._thickness / 2, offseHeight / 2 - this._thickness / 2, context);
                         context.fill();
                     }
                 }
@@ -2791,9 +2861,69 @@ var BABYLON;
                 _this._loaded = false;
                 _this._stretch = Image.STRETCH_FILL;
                 _this._autoScale = false;
+                _this._sourceLeft = 0;
+                _this._sourceTop = 0;
+                _this._sourceWidth = 0;
+                _this._sourceHeight = 0;
                 _this.source = url;
                 return _this;
             }
+            Object.defineProperty(Image.prototype, "sourceLeft", {
+                get: function () {
+                    return this._sourceLeft;
+                },
+                set: function (value) {
+                    if (this._sourceLeft === value) {
+                        return;
+                    }
+                    this._sourceLeft = value;
+                    this._markAsDirty();
+                },
+                enumerable: true,
+                configurable: true
+            });
+            Object.defineProperty(Image.prototype, "sourceTop", {
+                get: function () {
+                    return this._sourceTop;
+                },
+                set: function (value) {
+                    if (this._sourceTop === value) {
+                        return;
+                    }
+                    this._sourceTop = value;
+                    this._markAsDirty();
+                },
+                enumerable: true,
+                configurable: true
+            });
+            Object.defineProperty(Image.prototype, "sourceWidth", {
+                get: function () {
+                    return this._sourceWidth;
+                },
+                set: function (value) {
+                    if (this._sourceWidth === value) {
+                        return;
+                    }
+                    this._sourceWidth = value;
+                    this._markAsDirty();
+                },
+                enumerable: true,
+                configurable: true
+            });
+            Object.defineProperty(Image.prototype, "sourceHeight", {
+                get: function () {
+                    return this._sourceHeight;
+                },
+                set: function (value) {
+                    if (this._sourceHeight === value) {
+                        return;
+                    }
+                    this._sourceHeight = value;
+                    this._markAsDirty();
+                },
+                enumerable: true,
+                configurable: true
+            });
             Object.defineProperty(Image.prototype, "autoScale", {
                 get: function () {
                     return this._autoScale;
@@ -2865,6 +2995,7 @@ var BABYLON;
                     this._domImage.onload = function () {
                         _this._onImageLoaded();
                     };
+                    this._domImage.crossOrigin = "anonymous";
                     this._domImage.src = value;
                 },
                 enumerable: true,
@@ -2882,26 +3013,30 @@ var BABYLON;
             };
             Image.prototype._draw = function (parentMeasure, context) {
                 context.save();
+                var x = this._sourceLeft;
+                var y = this._sourceTop;
+                var width = this._sourceWidth ? this._sourceWidth : this._imageWidth;
+                var height = this._sourceHeight ? this._sourceHeight : this._imageHeight;
                 this._applyStates(context);
                 if (this._processMeasures(parentMeasure, context)) {
                     if (this._loaded) {
                         switch (this._stretch) {
                             case Image.STRETCH_NONE:
-                                context.drawImage(this._domImage, this._currentMeasure.left, this._currentMeasure.top);
+                                context.drawImage(this._domImage, x, y, width, height, this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
                                 break;
                             case Image.STRETCH_FILL:
-                                context.drawImage(this._domImage, 0, 0, this._imageWidth, this._imageHeight, this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
+                                context.drawImage(this._domImage, x, y, width, height, this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
                                 break;
                             case Image.STRETCH_UNIFORM:
-                                var hRatio = this._currentMeasure.width / this._imageWidth;
-                                var vRatio = this._currentMeasure.height / this._imageHeight;
+                                var hRatio = this._currentMeasure.width / width;
+                                var vRatio = this._currentMeasure.height / height;
                                 var ratio = Math.min(hRatio, vRatio);
-                                var centerX = (this._currentMeasure.width - this._imageWidth * ratio) / 2;
-                                var centerY = (this._currentMeasure.height - this._imageHeight * ratio) / 2;
-                                context.drawImage(this._domImage, 0, 0, this._imageWidth, this._imageHeight, this._currentMeasure.left + centerX, this._currentMeasure.top + centerY, this._imageWidth * ratio, this._imageHeight * ratio);
+                                var centerX = (this._currentMeasure.width - width * ratio) / 2;
+                                var centerY = (this._currentMeasure.height - height * ratio) / 2;
+                                context.drawImage(this._domImage, x, y, width, height, this._currentMeasure.left + centerX, this._currentMeasure.top + centerY, width * ratio, height * ratio);
                                 break;
                             case Image.STRETCH_EXTEND:
-                                context.drawImage(this._domImage, this._currentMeasure.left, this._currentMeasure.top);
+                                context.drawImage(this._domImage, x, y, width, height, this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
                                 if (this._autoScale) {
                                     this.synchronizeSizeWithContent();
                                 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3 - 2
dist/preview release/gui/babylon.gui.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 263 - 263
dist/preview release/inspector/babylon.inspector.bundle.js


+ 0 - 26
dist/preview release/inspector/babylon.inspector.d.ts

@@ -353,25 +353,6 @@ declare module INSPECTOR {
 }
 
 declare module INSPECTOR {
-    class Canvas2DAdapter extends Adapter implements IToolVisible, IToolDebug {
-        constructor(obj: any);
-        /** Returns the name displayed in the tree */
-        id(): string;
-        /** Returns the type of this object - displayed in the tree */
-        type(): string;
-        /** Returns the list of properties to be displayed for this adapter */
-        getProperties(): Array<PropertyLine>;
-        getTools(): Array<AbstractTreeTool>;
-        setVisible(b: boolean): void;
-        isVisible(): boolean;
-        /** Overrides super */
-        debug(b: boolean): void;
-        /** Overrides super.highlight */
-        highlight(b: boolean): void;
-    }
-}
-
-declare module INSPECTOR {
     class LightAdapter extends Adapter implements IToolVisible {
         private static _PROPERTIES;
         constructor(obj: BABYLON.Light);
@@ -853,13 +834,6 @@ declare module INSPECTOR {
 }
 
 declare module INSPECTOR {
-    class Canvas2DTab extends PropertyTab {
-        constructor(tabbar: TabBar, inspector: Inspector);
-        protected _getTree(): Array<TreeItem>;
-    }
-}
-
-declare module INSPECTOR {
     class LightTab extends PropertyTab {
         constructor(tabbar: TabBar, inspector: Inspector);
         protected _getTree(): Array<TreeItem>;

+ 2 - 152
dist/preview release/inspector/babylon.inspector.js

@@ -18,10 +18,6 @@ var INSPECTOR;
             // Save HTML document and window
             Inspector.DOCUMENT = window.document;
             Inspector.WINDOW = window;
-            // Load the Canvas2D library if it's not already done
-            if (!BABYLON.Canvas2D) {
-                BABYLON.Tools.LoadScript("https://www.babylonjs.com/babylon.canvas2d.js", function () { });
-            }
             // POPUP MODE
             if (popup) {
                 // Build the inspector in the given parent
@@ -976,87 +972,6 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var Canvas2DAdapter = (function (_super) {
-        __extends(Canvas2DAdapter, _super);
-        function Canvas2DAdapter(obj) {
-            return _super.call(this, obj) || this;
-        }
-        /** Returns the name displayed in the tree */
-        Canvas2DAdapter.prototype.id = function () {
-            var str = '';
-            if (this._obj.id) {
-                str = this._obj.id;
-            } // otherwise nothing displayed        
-            return str;
-        };
-        /** Returns the type of this object - displayed in the tree */
-        Canvas2DAdapter.prototype.type = function () {
-            return INSPECTOR.Helpers.GET_TYPE(this._obj);
-        };
-        /** Returns the list of properties to be displayed for this adapter */
-        Canvas2DAdapter.prototype.getProperties = function () {
-            var _this = this;
-            var propertiesLines = [];
-            if (this._obj.propDic) {
-                var dico = this._obj.propDic;
-                dico.forEach(function (name, propInfo) {
-                    var property = new INSPECTOR.Property(name, _this.actualObject);
-                    propertiesLines.push(new INSPECTOR.PropertyLine(property));
-                });
-            }
-            // TODO REMOVE THIS WHEN PROPERTIES WILL BE DECORATED
-            var toAddDirty = [
-                'actualZOffset', 'isSizeAuto', 'layoutArea', 'layoutAreaPos', 'contentArea',
-                'marginOffset', 'paddingOffset', 'isPickable', 'isContainer', 'boundingInfo',
-                'levelBoundingInfo', 'isSizedByContent', 'isPositionAuto', 'actualScale', 'layoutBoundingInfo',
-                '_cachedTexture', 'actualOpacity'
-            ];
-            for (var _i = 0, toAddDirty_1 = toAddDirty; _i < toAddDirty_1.length; _i++) {
-                var dirty = toAddDirty_1[_i];
-                var infos = new INSPECTOR.Property(dirty, this.actualObject);
-                propertiesLines.push(new INSPECTOR.PropertyLine(infos));
-            }
-            return propertiesLines;
-        };
-        Canvas2DAdapter.prototype.getTools = function () {
-            var tools = [];
-            tools.push(new INSPECTOR.Checkbox(this));
-            tools.push(new INSPECTOR.DebugArea(this));
-            return tools;
-        };
-        /// TOOLS ///
-        Canvas2DAdapter.prototype.setVisible = function (b) {
-            this._obj.levelVisible = b;
-        };
-        Canvas2DAdapter.prototype.isVisible = function () {
-            return this._obj.levelVisible;
-        };
-        /** Overrides super */
-        Canvas2DAdapter.prototype.debug = function (b) {
-            this._obj["displayDebugAreas"] = b;
-        };
-        /** Overrides super.highlight */
-        Canvas2DAdapter.prototype.highlight = function (b) {
-        };
-        return Canvas2DAdapter;
-    }(INSPECTOR.Adapter));
-    INSPECTOR.Canvas2DAdapter = Canvas2DAdapter;
-})(INSPECTOR || (INSPECTOR = {}));
-
-//# sourceMappingURL=Canvas2DAdapter.js.map
-
-var __extends = (this && this.__extends) || (function () {
-    var extendStatics = Object.setPrototypeOf ||
-        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
-        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
-    return function (d, b) {
-        extendStatics(d, b);
-        function __() { this.constructor = d; }
-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-    };
-})();
-var INSPECTOR;
-(function (INSPECTOR) {
     var LightAdapter = (function (_super) {
         __extends(LightAdapter, _super);
         function LightAdapter(obj) {
@@ -2083,6 +1998,8 @@ var INSPECTOR;
     INSPECTOR.HDRCubeTextureElement = HDRCubeTextureElement;
 })(INSPECTOR || (INSPECTOR = {}));
 
+//# sourceMappingURL=HDRCubeTextureElement.js.map
+
 var __extends = (this && this.__extends) || (function () {
     var extendStatics = Object.setPrototypeOf ||
         ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2832,63 +2749,6 @@ var __extends = (this && this.__extends) || (function () {
 })();
 var INSPECTOR;
 (function (INSPECTOR) {
-    var Canvas2DTab = (function (_super) {
-        __extends(Canvas2DTab, _super);
-        function Canvas2DTab(tabbar, inspector) {
-            return _super.call(this, tabbar, 'Canvas2D', inspector) || this;
-        }
-        /* Overrides */
-        Canvas2DTab.prototype._getTree = function () {
-            var _this = this;
-            var arr = [];
-            // get all canvas2D
-            var instances = BABYLON.Canvas2D.instances || [];
-            // Recursive method building the tree panel
-            var createNode = function (obj) {
-                if (obj.children && obj.children.length > 0) {
-                    var node = new INSPECTOR.TreeItem(_this, new INSPECTOR.Canvas2DAdapter(obj));
-                    for (var _i = 0, _a = obj.children; _i < _a.length; _i++) {
-                        var child = _a[_i];
-                        if (!INSPECTOR.Helpers.IsSystemName(child.id)) {
-                            var n = createNode(child);
-                            node.add(n);
-                        }
-                    }
-                    node.update();
-                    return node;
-                }
-                else {
-                    return new INSPECTOR.TreeItem(_this, new INSPECTOR.Canvas2DAdapter(obj));
-                }
-            };
-            for (var _i = 0, instances_1 = instances; _i < instances_1.length; _i++) {
-                var inst = instances_1[_i];
-                if (INSPECTOR.Helpers.IsSystemName(inst.id)) {
-                    continue;
-                }
-                var c2d = inst;
-                var nodes = createNode(c2d);
-                arr.push(nodes);
-            }
-            return arr;
-        };
-        return Canvas2DTab;
-    }(INSPECTOR.PropertyTab));
-    INSPECTOR.Canvas2DTab = Canvas2DTab;
-})(INSPECTOR || (INSPECTOR = {}));
-
-var __extends = (this && this.__extends) || (function () {
-    var extendStatics = Object.setPrototypeOf ||
-        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
-        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
-    return function (d, b) {
-        extendStatics(d, b);
-        function __() { this.constructor = d; }
-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-    };
-})();
-var INSPECTOR;
-(function (INSPECTOR) {
     var LightTab = (function (_super) {
         __extends(LightTab, _super);
         function LightTab(tabbar, inspector) {
@@ -3516,12 +3376,6 @@ var INSPECTOR;
                     elem: elemValue,
                     updateFct: function () { return _this._scene.lights.length.toString(); }
                 });
-                elemLabel = _this._createStatLabel("Total lights", _this._panel);
-                elemValue = INSPECTOR.Helpers.CreateDiv('stat-value', _this._panel);
-                _this._updatableProperties.push({
-                    elem: elemValue,
-                    updateFct: function () { return _this._scene.lights.length.toString(); }
-                });
                 elemLabel = _this._createStatLabel("Total vertices", _this._panel);
                 elemValue = INSPECTOR.Helpers.CreateDiv('stat-value', _this._panel);
                 _this._updatableProperties.push({
@@ -3771,10 +3625,6 @@ var INSPECTOR;
             _this._tabs.push(_this._meshTab);
             _this._tabs.push(new INSPECTOR.ShaderTab(_this, _this._inspector));
             _this._tabs.push(new INSPECTOR.LightTab(_this, _this._inspector));
-            // Add only the tab canvas2D if Canvas2D is defined
-            if (BABYLON.Canvas2D) {
-                _this._tabs.push(new INSPECTOR.Canvas2DTab(_this, _this._inspector));
-            }
             _this._tabs.push(new INSPECTOR.MaterialTab(_this, _this._inspector));
             _this._tabs.push(new INSPECTOR.CameraTab(_this, _this._inspector));
             _this._tabs.push(new INSPECTOR.SoundTab(_this, _this._inspector));

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3 - 3
dist/preview release/inspector/babylon.inspector.min.js


+ 3 - 0
dist/preview release/loaders/babylon.glTF1FileLoader.js

@@ -759,6 +759,9 @@ var BABYLON;
                         continue;
                     }
                     var children = joint.children;
+                    if (!children) {
+                        continue;
+                    }
                     foundBone = false;
                     for (var k = 0; k < children.length; k++) {
                         if (children[k] === id) {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 2
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


+ 58 - 62
dist/preview release/loaders/babylon.glTF2FileLoader.d.ts

@@ -118,6 +118,7 @@ declare module BABYLON.GLTF2 {
     interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels: IGLTFAnimationChannel[];
         samplers: IGLTFAnimationSampler[];
+        targets?: any[];
     }
     interface IGLTFAssetProfile extends IGLTFProperty {
         api?: string;
@@ -132,7 +133,8 @@ declare module BABYLON.GLTF2 {
     interface IGLTFBuffer extends IGLTFChildRootProperty {
         uri?: string;
         byteLength: number;
-        loadedBufferView: ArrayBufferView;
+        loadedData: ArrayBufferView;
+        loadedObservable: Observable<IGLTFBuffer>;
     }
     interface IGLTFBufferView extends IGLTFChildRootProperty {
         buffer: number;
@@ -211,7 +213,12 @@ declare module BABYLON.GLTF2 {
         scale?: number[];
         translation?: number[];
         weights?: number[];
-        babylonNode?: Node;
+        index?: number;
+        babylonMesh?: Mesh;
+        babylonSkinToBones?: {
+            [skin: number]: Bone;
+        };
+        babylonAnimationTargets?: Node[];
     }
     interface IGLTFSampler extends IGLTFChildRootProperty {
         magFilter?: ETextureMagFilter;
@@ -226,13 +233,14 @@ declare module BABYLON.GLTF2 {
         inverseBindMatrices?: number;
         skeleton?: number;
         joints: number[];
+        index?: number;
         babylonSkeleton?: Skeleton;
     }
     interface IGLTFTexture extends IGLTFChildRootProperty {
         sampler?: number;
         source: number;
-        babylonTextures: Texture[];
-        blobURL: string;
+        babylonTextures?: Texture[];
+        blobURL?: string;
     }
     interface IGLTFTextureInfo {
         index: number;
@@ -258,57 +266,59 @@ declare module BABYLON.GLTF2 {
         skins?: IGLTFSkin[];
         textures?: IGLTFTexture[];
     }
-    interface IGLTFRuntime {
-        gltf: IGLTF;
-        babylonScene: Scene;
-        rootUrl: string;
-        importOnlyMeshes: boolean;
-        importMeshesNames?: string[];
-        defaultMaterial?: PBRMaterial;
-    }
-    /**
-    * Bones
-    */
-    interface INodeToRoot {
-        bone: Bone;
-        node: IGLTFNode;
-        index: number;
-    }
-    interface IJointNode {
-        node: IGLTFNode;
-        index: number;
-    }
 }
 
 
 declare module BABYLON.GLTF2 {
-    /**
-    * glTF File Loader Plugin
-    */
     class GLTFLoader implements IGLTFLoader {
+        private _gltf;
+        private _pendingCount;
+        private _onLoaded;
+        private _errors;
+        private _babylonScene;
+        private _rootUrl;
+        private _defaultMaterial;
         static Extensions: {
             [name: string]: GLTFLoaderExtension;
         };
         static RegisterExtension(extension: GLTFLoaderExtension): void;
-        static LoadMaterial(runtime: IGLTFRuntime, index: number): IGLTFMaterial;
-        static LoadCoreMaterialAsync(runtime: IGLTFRuntime, index: number, onSuccess: () => void, onError: () => void): void;
-        private static _loadMetallicRoughnessMaterialPropertiesAsync(runtime, material, onSuccess, onError);
-        static LoadCommonMaterialPropertiesAsync(runtime: IGLTFRuntime, material: IGLTFMaterial, onSuccess: () => void, onError: () => void): void;
-        static LoadAlphaProperties(runtime: IGLTFRuntime, material: IGLTFMaterial): void;
-        static LoadTextureAsync(runtime: IGLTFRuntime, textureInfo: IGLTFTextureInfo, onSuccess: (babylonTexture: Texture) => void, onError: () => void): void;
-        private static _createTextureAsync(runtime, texture, texCoord, url, onSuccess, onError);
-        /**
-        * Import meshes
-        */
-        importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onError?: () => void): void;
-        /**
-        * Load scene
-        */
+        static LoadMaterial(index: number): IGLTFMaterial;
+        static LoadCoreMaterial(index: number): Material;
+        static LoadCommonMaterialProperties(material: IGLTFMaterial): void;
+        static LoadAlphaProperties(material: IGLTFMaterial): void;
+        static LoadTexture(textureInfo: IGLTFTextureInfo): Texture;
+        importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onError: () => void): void;
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: () => void, onError: () => void): void;
-        private static _loadBuffersAsync(runtime, onSuccess, onError);
-        private static _loadBufferAsync(runtime, index, onSuccess, onError);
-        private static _loadMaterialsAsync(runtime, onSuccess, onError);
-        private static _createRuntime(scene, data, rootUrl, importOnlyMeshes);
+        private _loadAsync(nodeNames, scene, data, rootUrl, onSuccess, onError);
+        private _loadData(data);
+        private _showMeshes();
+        private _startAnimations();
+        private _clear();
+        private _loadScene(nodeNames);
+        private _loadSkin(node);
+        private _updateBone(node, parentNode, skin, inverseBindMatrixData);
+        private _createBone(node, skin);
+        private _loadMesh(node, parentNode);
+        private _loadMeshData(node, mesh, babylonMesh);
+        private _loadVertexDataAsync(primitive, onSuccess);
+        private _createMorphTargets(node, mesh, primitive, babylonMesh);
+        private _loadMorphTargetsData(mesh, primitive, vertexData, babylonMesh);
+        private _loadTransform(node, babylonMesh);
+        private _traverseScene(nodeNames, scene, action);
+        private _traverseNode(nodeNames, index, action, parentNode?);
+        private _loadAnimations();
+        private _loadAnimationChannel(animation, animationIndex, channelIndex);
+        private _loadBufferAsync(index, onSuccess);
+        private _loadBufferViewAsync(bufferView, byteOffset, byteLength, componentType, onSuccess);
+        private _loadAccessorAsync(accessor, onSuccess);
+        private _addPendingData(data);
+        private _removePendingData(data);
+        private _getDefaultMaterial();
+        private _loadMaterial(index);
+        private _loadCoreMaterial(index);
+        private _loadCommonMaterialProperties(material);
+        private _loadAlphaProperties(material);
+        private _loadTexture(textureInfo);
     }
 }
 
@@ -343,23 +353,11 @@ declare module BABYLON.GLTF2 {
          * @param mode: the filter mode value
          */
         static GetTextureFilterMode(mode: number): ETextureMinFilter;
-        static GetBufferFromBufferView(runtime: IGLTFRuntime, bufferView: IGLTFBufferView, byteOffset: number, byteLength: number, componentType: EComponentType): ArrayBufferView;
-        /**
-         * Returns a buffer from its accessor
-         * @param runtime: the GLTF runtime
-         * @param accessor: the GLTF accessor
-         */
-        static GetBufferFromAccessor(runtime: IGLTFRuntime, accessor: IGLTFAccessor): ArrayBufferView;
         /**
          * Decodes a buffer view into a string
          * @param view: the buffer view
          */
         static DecodeBufferToText(view: ArrayBufferView): string;
-        /**
-         * Returns the default material of gltf.
-         * @param scene: the Babylon.js scene
-         */
-        static GetDefaultMaterial(runtime: IGLTFRuntime): PBRMaterial;
     }
 }
 
@@ -370,10 +368,8 @@ declare module BABYLON.GLTF2 {
         enabled: boolean;
         constructor(name: string);
         readonly name: string;
-        protected postCreateRuntime(runtime: IGLTFRuntime): void;
-        protected loadMaterialAsync(runtime: IGLTFRuntime, index: number, onSuccess: () => void, onError: () => void): boolean;
-        static PostCreateRuntime(runtime: IGLTFRuntime): void;
-        static LoadMaterialAsync(runtime: IGLTFRuntime, index: number, onSuccess: () => void, onError: () => void): void;
+        protected loadMaterial(index: number): Material;
+        static LoadMaterial(index: number): Material;
     }
 }
 
@@ -381,6 +377,6 @@ declare module BABYLON.GLTF2 {
 declare module BABYLON.GLTF2 {
     class GLTFMaterialsPbrSpecularGlossinessExtension extends GLTFLoaderExtension {
         constructor();
-        protected loadMaterialAsync(runtime: IGLTFRuntime, index: number, onSuccess: () => void, onError: () => void): boolean;
+        protected loadMaterial(index: number): Material;
     }
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 690 - 1063
dist/preview release/loaders/babylon.glTF2FileLoader.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 5 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


+ 58 - 62
dist/preview release/loaders/babylon.glTFFileLoader.d.ts

@@ -613,6 +613,7 @@ declare module BABYLON.GLTF2 {
     interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels: IGLTFAnimationChannel[];
         samplers: IGLTFAnimationSampler[];
+        targets?: any[];
     }
     interface IGLTFAssetProfile extends IGLTFProperty {
         api?: string;
@@ -627,7 +628,8 @@ declare module BABYLON.GLTF2 {
     interface IGLTFBuffer extends IGLTFChildRootProperty {
         uri?: string;
         byteLength: number;
-        loadedBufferView: ArrayBufferView;
+        loadedData: ArrayBufferView;
+        loadedObservable: Observable<IGLTFBuffer>;
     }
     interface IGLTFBufferView extends IGLTFChildRootProperty {
         buffer: number;
@@ -706,7 +708,12 @@ declare module BABYLON.GLTF2 {
         scale?: number[];
         translation?: number[];
         weights?: number[];
-        babylonNode?: Node;
+        index?: number;
+        babylonMesh?: Mesh;
+        babylonSkinToBones?: {
+            [skin: number]: Bone;
+        };
+        babylonAnimationTargets?: Node[];
     }
     interface IGLTFSampler extends IGLTFChildRootProperty {
         magFilter?: ETextureMagFilter;
@@ -721,13 +728,14 @@ declare module BABYLON.GLTF2 {
         inverseBindMatrices?: number;
         skeleton?: number;
         joints: number[];
+        index?: number;
         babylonSkeleton?: Skeleton;
     }
     interface IGLTFTexture extends IGLTFChildRootProperty {
         sampler?: number;
         source: number;
-        babylonTextures: Texture[];
-        blobURL: string;
+        babylonTextures?: Texture[];
+        blobURL?: string;
     }
     interface IGLTFTextureInfo {
         index: number;
@@ -753,57 +761,59 @@ declare module BABYLON.GLTF2 {
         skins?: IGLTFSkin[];
         textures?: IGLTFTexture[];
     }
-    interface IGLTFRuntime {
-        gltf: IGLTF;
-        babylonScene: Scene;
-        rootUrl: string;
-        importOnlyMeshes: boolean;
-        importMeshesNames?: string[];
-        defaultMaterial?: PBRMaterial;
-    }
-    /**
-    * Bones
-    */
-    interface INodeToRoot {
-        bone: Bone;
-        node: IGLTFNode;
-        index: number;
-    }
-    interface IJointNode {
-        node: IGLTFNode;
-        index: number;
-    }
 }
 
 
 declare module BABYLON.GLTF2 {
-    /**
-    * glTF File Loader Plugin
-    */
     class GLTFLoader implements IGLTFLoader {
+        private _gltf;
+        private _pendingCount;
+        private _onLoaded;
+        private _errors;
+        private _babylonScene;
+        private _rootUrl;
+        private _defaultMaterial;
         static Extensions: {
             [name: string]: GLTFLoaderExtension;
         };
         static RegisterExtension(extension: GLTFLoaderExtension): void;
-        static LoadMaterial(runtime: IGLTFRuntime, index: number): IGLTFMaterial;
-        static LoadCoreMaterialAsync(runtime: IGLTFRuntime, index: number, onSuccess: () => void, onError: () => void): void;
-        private static _loadMetallicRoughnessMaterialPropertiesAsync(runtime, material, onSuccess, onError);
-        static LoadCommonMaterialPropertiesAsync(runtime: IGLTFRuntime, material: IGLTFMaterial, onSuccess: () => void, onError: () => void): void;
-        static LoadAlphaProperties(runtime: IGLTFRuntime, material: IGLTFMaterial): void;
-        static LoadTextureAsync(runtime: IGLTFRuntime, textureInfo: IGLTFTextureInfo, onSuccess: (babylonTexture: Texture) => void, onError: () => void): void;
-        private static _createTextureAsync(runtime, texture, texCoord, url, onSuccess, onError);
-        /**
-        * Import meshes
-        */
-        importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onError?: () => void): void;
-        /**
-        * Load scene
-        */
+        static LoadMaterial(index: number): IGLTFMaterial;
+        static LoadCoreMaterial(index: number): Material;
+        static LoadCommonMaterialProperties(material: IGLTFMaterial): void;
+        static LoadAlphaProperties(material: IGLTFMaterial): void;
+        static LoadTexture(textureInfo: IGLTFTextureInfo): Texture;
+        importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onError: () => void): void;
         loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: () => void, onError: () => void): void;
-        private static _loadBuffersAsync(runtime, onSuccess, onError);
-        private static _loadBufferAsync(runtime, index, onSuccess, onError);
-        private static _loadMaterialsAsync(runtime, onSuccess, onError);
-        private static _createRuntime(scene, data, rootUrl, importOnlyMeshes);
+        private _loadAsync(nodeNames, scene, data, rootUrl, onSuccess, onError);
+        private _loadData(data);
+        private _showMeshes();
+        private _startAnimations();
+        private _clear();
+        private _loadScene(nodeNames);
+        private _loadSkin(node);
+        private _updateBone(node, parentNode, skin, inverseBindMatrixData);
+        private _createBone(node, skin);
+        private _loadMesh(node, parentNode);
+        private _loadMeshData(node, mesh, babylonMesh);
+        private _loadVertexDataAsync(primitive, onSuccess);
+        private _createMorphTargets(node, mesh, primitive, babylonMesh);
+        private _loadMorphTargetsData(mesh, primitive, vertexData, babylonMesh);
+        private _loadTransform(node, babylonMesh);
+        private _traverseScene(nodeNames, scene, action);
+        private _traverseNode(nodeNames, index, action, parentNode?);
+        private _loadAnimations();
+        private _loadAnimationChannel(animation, animationIndex, channelIndex);
+        private _loadBufferAsync(index, onSuccess);
+        private _loadBufferViewAsync(bufferView, byteOffset, byteLength, componentType, onSuccess);
+        private _loadAccessorAsync(accessor, onSuccess);
+        private _addPendingData(data);
+        private _removePendingData(data);
+        private _getDefaultMaterial();
+        private _loadMaterial(index);
+        private _loadCoreMaterial(index);
+        private _loadCommonMaterialProperties(material);
+        private _loadAlphaProperties(material);
+        private _loadTexture(textureInfo);
     }
 }
 
@@ -838,23 +848,11 @@ declare module BABYLON.GLTF2 {
          * @param mode: the filter mode value
          */
         static GetTextureFilterMode(mode: number): ETextureMinFilter;
-        static GetBufferFromBufferView(runtime: IGLTFRuntime, bufferView: IGLTFBufferView, byteOffset: number, byteLength: number, componentType: EComponentType): ArrayBufferView;
-        /**
-         * Returns a buffer from its accessor
-         * @param runtime: the GLTF runtime
-         * @param accessor: the GLTF accessor
-         */
-        static GetBufferFromAccessor(runtime: IGLTFRuntime, accessor: IGLTFAccessor): ArrayBufferView;
         /**
          * Decodes a buffer view into a string
          * @param view: the buffer view
          */
         static DecodeBufferToText(view: ArrayBufferView): string;
-        /**
-         * Returns the default material of gltf.
-         * @param scene: the Babylon.js scene
-         */
-        static GetDefaultMaterial(runtime: IGLTFRuntime): PBRMaterial;
     }
 }
 
@@ -865,10 +863,8 @@ declare module BABYLON.GLTF2 {
         enabled: boolean;
         constructor(name: string);
         readonly name: string;
-        protected postCreateRuntime(runtime: IGLTFRuntime): void;
-        protected loadMaterialAsync(runtime: IGLTFRuntime, index: number, onSuccess: () => void, onError: () => void): boolean;
-        static PostCreateRuntime(runtime: IGLTFRuntime): void;
-        static LoadMaterialAsync(runtime: IGLTFRuntime, index: number, onSuccess: () => void, onError: () => void): void;
+        protected loadMaterial(index: number): Material;
+        static LoadMaterial(index: number): Material;
     }
 }
 
@@ -876,6 +872,6 @@ declare module BABYLON.GLTF2 {
 declare module BABYLON.GLTF2 {
     class GLTFMaterialsPbrSpecularGlossinessExtension extends GLTFLoaderExtension {
         constructor();
-        protected loadMaterialAsync(runtime: IGLTFRuntime, index: number, onSuccess: () => void, onError: () => void): boolean;
+        protected loadMaterial(index: number): Material;
     }
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 698 - 1068
dist/preview release/loaders/babylon.glTFFileLoader.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 7 - 2
dist/preview release/loaders/babylon.glTFFileLoader.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 5 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 2
dist/preview release/materialsLibrary/babylon.cellMaterial.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.cellMaterial.min.js


+ 2 - 0
dist/preview release/materialsLibrary/babylon.customMaterial.d.ts

@@ -29,6 +29,8 @@ declare module BABYLON {
         static ShaderIndexer: number;
         CustomParts: ShaderSpecialParts;
         ShaderVersion: CustomShaderStructure;
+        _isCreatedShader: boolean;
+        _createdShaderName: string;
         _customUniform: string[];
         _newUniforms: string[];
         _newUniformInstances: any[];

+ 6 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.js

@@ -383,7 +383,7 @@ varying vec4 vColor;\n\
 #include<bumpVertexDeclaration>\n\
 #include<clipPlaneVertexDeclaration>\n\
 #include<fogVertexDeclaration>\n\
-#include<shadowsVertexDeclaration>[0..maxSimultaneousLights]\n\
+#include<__decl__lightFragment>[0..maxSimultaneousLights]\n\
 #include<morphTargetsVertexGlobalDeclaration>\n\
 #include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n\
 #ifdef REFLECTIONMAP_SKYBOX\n\
@@ -572,6 +572,9 @@ vColor=color;\n\
             return arr;
         };
         CustomMaterial.prototype.Builder = function (shaderName, uniforms, uniformBuffers, samplers, defines) {
+            if (this._isCreatedShader)
+                return this._createdShaderName;
+            this._isCreatedShader = false;
             CustomMaterial.ShaderIndexer++;
             var name = name + "custom_" + CustomMaterial.ShaderIndexer;
             this.ReviewUniform("uniform", uniforms);
@@ -598,6 +601,8 @@ vColor=color;\n\
                 .replace('#[Fragment_Custom_Diffuse]', (this.CustomParts.Fragment_Custom_Diffuse ? this.CustomParts.Fragment_Custom_Diffuse : ""))
                 .replace('#[Fragment_Custom_Alpha]', (this.CustomParts.Fragment_Custom_Alpha ? this.CustomParts.Fragment_Custom_Alpha : ""))
                 .replace('#[Fragment_Before_FragColor]', (this.CustomParts.Fragment_Before_FragColor ? this.CustomParts.Fragment_Before_FragColor : ""));
+            this._isCreatedShader = true;
+            this._createdShaderName = name;
             return name;
         };
         CustomMaterial.prototype.SelectVersion = function (ver) {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.furMaterial.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.furMaterial.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 2
dist/preview release/materialsLibrary/babylon.gradientMaterial.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 2
dist/preview release/materialsLibrary/babylon.lavaMaterial.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3 - 5
dist/preview release/materialsLibrary/babylon.legacyPbrMaterial.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3 - 3
dist/preview release/materialsLibrary/babylon.legacyPbrMaterial.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 3
dist/preview release/materialsLibrary/babylon.normalMaterial.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.normalMaterial.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 2
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 2
dist/preview release/materialsLibrary/babylon.simpleMaterial.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.terrainMaterial.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


+ 13 - 0
dist/preview release/proceduralTexturesLibrary/babylon.perlinNoiseProceduralTexture.d.ts

@@ -0,0 +1,13 @@
+
+declare module BABYLON {
+    class PerlinNoiseProceduralTexture extends ProceduralTexture {
+        time: number;
+        speed: number;
+        translationSpeed: number;
+        private _currentTranslation;
+        constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
+        updateShaderUniforms(): void;
+        render(useCameraPostProcess?: boolean): void;
+        resize(size: any, generateMipMaps: any): void;
+    }
+}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 47 - 0
dist/preview release/proceduralTexturesLibrary/babylon.perlinNoiseProceduralTexture.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 0
dist/preview release/proceduralTexturesLibrary/babylon.perlinNoiseProceduralTexture.min.js


+ 3 - 2
dist/preview release/what's new.md

@@ -24,10 +24,10 @@
  - New kernel based blur. [Demo](https://www.babylonjs-playground.com/#FBH4J7#1) ([deltakosh](https://github.com/deltakosh))
  - New highlights postprocess ([deltakosh](https://github.com/deltakosh))
  - New DefaultRenderingPipeline to enable image processing effect. [Demo](https://www.babylonjs-playground.com/#Y3C0HQ) ([deltakosh](https://github.com/deltakosh))
- - Sepctor.js New WebGL debugger: [more info here](http://spector.babylonjs.com) ([Sebastien Vandenberghe](https://github.com/sebavan))
+ - Spector.js New WebGL debugger: [more info here](http://spector.babylonjs.com) ([Sebastien Vandenberghe](https://github.com/sebavan))
+ - New blur mode for mirrors. [Demo](https://www.babylonjs-playground.com/#9I6NX1) ([deltakosh](https://github.com/deltakosh)) 
 
 ### Updates
-- New `mesh.recomputeNormals` function ([deltakosh](https://github.com/deltakosh))
 - New helpers to use ExtrudePolygon. [Demo](http://www.babylonjs-playground.com/#RNCYVM#10) ([Cubees](https://github.com/Cubees))
 - PostProcess can now use alpha blending and share outputs ([deltakosh](https://github.com/deltakosh))
 - Added `ArcRotateCamera.panningInertia` to decouple inertia from panning inertia ([deltakosh](https://github.com/deltakosh))
@@ -65,6 +65,7 @@
 - Added glTF 2.0 loader with versioning support ([bghgary](https://github.com/bghgary), thanks to [BeardedGnome](https://github.com/BeardedGnome) for animation updates)
 - New `Motion Blur` effect added into `StandardRenderingPipeline` [Demo](http://www.babylonjs.com/Demos/MotionBlur/) ([Julien Moreau-Mathis](https://github.com/julien-moreau))
 - Allow the BlackAndWhite post process to adjust the degree in subsequent frames, for `Welcome to Wonderland`	types of animation ([jcpalmer](https://github.com/Palmer-JC))
+- New `BABYLON.TextureTools.CreateResizedCopy` function to create a copy of a texture and chage its size ([deltakosh](https://github.com/deltakosh)) 
  
 ### Bug fixes
 - Fixed a bug with spotlight direction ([deltakosh](https://github.com/deltakosh)) 

+ 39 - 2
gui/src/advancedDynamicTexture.ts

@@ -20,6 +20,7 @@ module BABYLON.GUI {
         private _fullscreenViewport = new Viewport(0, 0, 1, 1);
         private _idealWidth = 0;
         private _idealHeight = 0;
+        private _renderAtIdealSize = false;
 
         public get background(): string {
             return this._background;
@@ -62,6 +63,19 @@ module BABYLON.GUI {
             this._rootContainer._markAllAsDirty();
         }     
 
+        public get renderAtIdealSize(): boolean {
+            return this._renderAtIdealSize;
+        }
+
+        public set renderAtIdealSize(value: boolean) {
+            if (this._renderAtIdealSize === value) {
+                return;
+            }
+
+            this._renderAtIdealSize = value;
+            this._onResize();
+        }    
+
         public get layer(): Layer {
             return this._layerToDispose;
         }   
@@ -147,6 +161,16 @@ module BABYLON.GUI {
             var renderWidth = engine.getRenderWidth();
             var renderHeight = engine.getRenderHeight();
 
+            if (this._renderAtIdealSize) {
+                if (this._idealWidth) {
+                    renderHeight = (renderHeight * this._idealWidth) / renderWidth;
+                    renderWidth = this._idealWidth;
+                } else if (this._idealHeight) {
+                    renderWidth = (renderWidth * this._idealHeight) / renderHeight;
+                    renderHeight = this._idealHeight;                    
+                }
+            }
+
             if (textureSize.width !== renderWidth || textureSize.height !== renderHeight) {
                 this.scaleTo(renderWidth, renderHeight);
 
@@ -158,6 +182,11 @@ module BABYLON.GUI {
             }
         }
 
+        public _getGlobalViewport(scene: Scene): Viewport {
+            var engine = scene.getEngine();
+            return this._fullscreenViewport.toGlobal(engine.getRenderWidth(), engine.getRenderHeight());
+        }
+
         private _checkUpdate(camera: Camera): void {
             if (this._layerToDispose) {
                 if ((camera.layerMask & this._layerToDispose.layerMask) === 0) {
@@ -167,8 +196,7 @@ module BABYLON.GUI {
 
             if (this._isFullscreen && this._linkedControls.length) {
                 var scene = this.getScene();
-                var engine = scene.getEngine();
-                var globalViewport = this._fullscreenViewport.toGlobal(engine.getRenderWidth(), engine.getRenderHeight());
+                var globalViewport = this._getGlobalViewport(scene);
 
                 for (var control of this._linkedControls) {
                     var mesh = control._linkedMesh;
@@ -195,6 +223,7 @@ module BABYLON.GUI {
         }
 
         private _render(): void {
+            var engine = this.getScene().getEngine();
             var textureSize = this.getSize();
             var renderWidth = textureSize.width;
             var renderHeight = textureSize.height;
@@ -216,6 +245,14 @@ module BABYLON.GUI {
         }
 
         private _doPicking(x: number, y: number, type: number): void {
+            var engine = this.getScene().getEngine();
+            var textureSize = this.getSize();
+
+            if (this._isFullscreen) {
+                x = x * (textureSize.width / engine.getRenderWidth());
+                y = y * (textureSize.height / engine.getRenderHeight());
+            }
+            
             if (this._capturingControl) {
                 this._capturingControl._processObservables(type, x, y);
                 return;

+ 7 - 0
gui/src/controls/container.ts

@@ -127,6 +127,9 @@ module BABYLON.GUI {
         }
 
         public _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void {      
+            if (!this.isVisible) {
+                return;
+            }
             context.save();
            
             this._applyStates(context);
@@ -145,6 +148,10 @@ module BABYLON.GUI {
         }
 
         public _processPicking(x: number, y: number, type: number): boolean {
+            if (!this.isHitTestVisible || !this.isVisible) {
+                return false;
+            }
+
             if (!super.contains(x, y)) {
                 return false;
             }

+ 51 - 1
gui/src/controls/control.ts

@@ -399,6 +399,42 @@ module BABYLON.GUI {
             return "Control";
         }
 
+        public getLocalCoordinates(globalCoordinates: Vector2): Vector2 {
+            var result = Vector2.Zero();
+
+            this.getLocalCoordinatesToRef(globalCoordinates, result);
+
+            return result;
+        }
+
+        public getLocalCoordinatesToRef(globalCoordinates: Vector2, result: Vector2): Control {
+            result.x = globalCoordinates.x - this._currentMeasure.left;
+            result.y = globalCoordinates.y - this._currentMeasure.top;
+            return this;
+        }
+
+        public moveToVector3(position: Vector3, scene: Scene): void {
+            if (!this._host || this._root !== this._host._rootContainer) {
+                Tools.Error("Cannot move a control to a vector3 if the control is not at root level");
+                return;
+            }
+            
+            this.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
+            this.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_TOP;
+
+            var engine = scene.getEngine();
+            var globalViewport = this._host._getGlobalViewport(scene);
+            var projectedPosition = Vector3.Project(position, Matrix.Identity(), scene.getTransformMatrix(), globalViewport);
+
+            this._moveToProjectedPosition(projectedPosition);
+
+            if (projectedPosition.z < 0 || projectedPosition.z > 1) {
+                this.isVisible = false;
+                return;
+            }
+            this.isVisible = true;
+        }
+
         public linkWithMesh(mesh: AbstractMesh): void {
             if (!this._host || this._root !== this._host._rootContainer) {
                 Tools.Error("Cannot link a control to a mesh if the control is not at root level");
@@ -696,7 +732,7 @@ module BABYLON.GUI {
         }
 
         public _processPicking(x: number, y: number, type: number): boolean {
-            if (!this.isHitTestVisible) {
+            if (!this.isHitTestVisible || !this.isVisible) {
                 return false;
             }
 
@@ -904,5 +940,19 @@ module BABYLON.GUI {
 
             return panel;
         }
+
+        protected static drawEllipse(x:number, y:number, width:number, height:number, context:CanvasRenderingContext2D):void{
+
+            context.translate(x, y);
+            context.scale(width, height);
+
+            context.beginPath();
+            context.arc(0, 0, 1, 0, 2 * Math.PI);
+            context.closePath();
+
+            context.scale(1/width, 1/height);
+            context.translate(-x, -y);
+            
+        }
     }    
 }

+ 5 - 6
gui/src/controls/ellipse.ts

@@ -28,10 +28,8 @@ module BABYLON.GUI {
         protected _localDraw(context: CanvasRenderingContext2D): void {
             context.save();
 
-            context.beginPath();
-            context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, 
-                            this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, 0, 0, 2 * Math.PI);
-            context.closePath();
+            Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, 
+                            this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, context);
 
             if (this._background) {
                 context.fillStyle = this._background;
@@ -61,8 +59,9 @@ module BABYLON.GUI {
         }
 
        protected _clipForChildren(context: CanvasRenderingContext2D) {
-            context.beginPath();
-            context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2, this._currentMeasure.height / 2, 0, 0, 2 * Math.PI);
+
+            Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, this._currentMeasure.width / 2, this._currentMeasure.height / 2, context);
+            
             context.clip();
         }
     }    

+ 79 - 11
gui/src/controls/image.ts

@@ -12,6 +12,67 @@ module BABYLON.GUI {
         private _source: string;
         private _autoScale = false;
 
+        private _sourceLeft = 0;
+        private _sourceTop = 0;
+        private _sourceWidth= 0;
+        private _sourceHeight = 0;
+
+        public get sourceLeft(): number {
+            return this._sourceLeft;
+        }
+
+        public set sourceLeft(value: number) {
+            if (this._sourceLeft === value) {
+                return;
+            }
+
+            this._sourceLeft = value;
+
+            this._markAsDirty();
+        }   
+
+        public get sourceTop(): number {
+            return this._sourceTop;
+        }
+
+        public set sourceTop(value: number) {
+            if (this._sourceTop === value) {
+                return;
+            }
+
+            this._sourceTop = value;
+
+            this._markAsDirty();
+        }    
+
+        public get sourceWidth(): number {
+            return this._sourceWidth;
+        }
+
+        public set sourceWidth(value: number) {
+            if (this._sourceWidth === value) {
+                return;
+            }
+
+            this._sourceWidth = value;
+
+            this._markAsDirty();
+        }  
+
+        public get sourceHeight(): number {
+            return this._sourceHeight;
+        }
+
+        public set sourceHeight(value: number) {
+            if (this._sourceHeight === value) {
+                return;
+            }
+
+            this._sourceHeight = value;
+
+            this._markAsDirty();
+        }          
+
         public get autoScale(): boolean {
             return this._autoScale;
         }
@@ -84,7 +145,7 @@ module BABYLON.GUI {
             this._domImage.onload = () => {
                 this._onImageLoaded();
             }
-            
+            this._domImage.crossOrigin = "anonymous";
             this._domImage.src = value;
         }
 
@@ -108,31 +169,38 @@ module BABYLON.GUI {
         }
 
         public _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void {
-            context.save();
+            context.save();          
+            let x = this._sourceLeft;
+            let y = this._sourceTop;
+
+            let width = this._sourceWidth ? this._sourceWidth : this._imageWidth;
+            let height = this._sourceHeight ? this._sourceHeight : this._imageHeight;
 
             this._applyStates(context);
             if (this._processMeasures(parentMeasure, context)) {
                 if (this._loaded) {
                     switch (this._stretch) {
                         case Image.STRETCH_NONE:
-                            context.drawImage(this._domImage, this._currentMeasure.left, this._currentMeasure.top);
+                            context.drawImage(this._domImage, x, y, width, height,
+                                              this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
                             break;
                         case Image.STRETCH_FILL:
-                            context.drawImage(this._domImage, 0, 0, this._imageWidth, this._imageHeight, 
+                            context.drawImage(this._domImage, x, y, width, height, 
                                                             this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
                             break;
                         case Image.STRETCH_UNIFORM:
-                            var hRatio = this._currentMeasure.width  / this._imageWidth;
-                            var vRatio =  this._currentMeasure.height / this._imageHeight;
+                            var hRatio = this._currentMeasure.width  / width;
+                            var vRatio =  this._currentMeasure.height / height;
                             var ratio = Math.min(hRatio, vRatio);
-                            var centerX = (this._currentMeasure.width - this._imageWidth * ratio) / 2;
-                            var centerY = (this._currentMeasure.height - this._imageHeight * ratio) / 2; 
+                            var centerX = (this._currentMeasure.width - width * ratio) / 2;
+                            var centerY = (this._currentMeasure.height - height * ratio) / 2; 
 
-                            context.drawImage(this._domImage, 0, 0, this._imageWidth, this._imageHeight,
-                                                            this._currentMeasure.left + centerX, this._currentMeasure.top + centerY, this._imageWidth * ratio, this._imageHeight * ratio);
+                            context.drawImage(this._domImage, x, y, width, height,
+                                                            this._currentMeasure.left + centerX, this._currentMeasure.top + centerY, width * ratio, height * ratio);
                             break;
                         case Image.STRETCH_EXTEND:
-                            context.drawImage(this._domImage, this._currentMeasure.left, this._currentMeasure.top);
+                            context.drawImage(this._domImage, x, y, width, height,
+                                              this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
                             if (this._autoScale) {
                                 this.synchronizeSizeWithContent();
                             } 

+ 7 - 11
gui/src/controls/radioButton.ts

@@ -104,19 +104,17 @@ module BABYLON.GUI {
                 let actualWidth = this._currentMeasure.width - this._thickness;
                 let actualHeight = this._currentMeasure.height - this._thickness;
 
-                // Outer                
-                context.beginPath();
-                context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, 
-                            this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, 0, 0, 2 * Math.PI);
-                context.closePath();
-
+                // Outer
+                Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, 
+                            this._currentMeasure.width / 2 - this._thickness / 2, this._currentMeasure.height / 2 - this._thickness / 2, context);
+                
                 context.fillStyle = this._background;
                 context.fill();
 
                 context.strokeStyle = this.color;
                 context.lineWidth = this._thickness;
 
-                context.stroke(); 
+                context.stroke();
 
                 // Inner
                 if (this._isChecked) {
@@ -124,10 +122,8 @@ module BABYLON.GUI {
                     let offsetWidth = actualWidth * this._checkSizeRatio;
                     let offseHeight = actualHeight * this._checkSizeRatio;
 
-                    context.beginPath();
-                    context.ellipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, 
-                                    offsetWidth / 2 - this._thickness / 2, offseHeight / 2  - this._thickness / 2, 0, 0, 2 * Math.PI);
-                    context.closePath();
+                    Control.drawEllipse(this._currentMeasure.left + this._currentMeasure.width / 2, this._currentMeasure.top + this._currentMeasure.height / 2, 
+                                    offsetWidth / 2 - this._thickness / 2, offseHeight / 2  - this._thickness / 2, context);
 
                     context.fill();
                 }

+ 0 - 5
inspector/src/Inspector.ts

@@ -53,11 +53,6 @@ module INSPECTOR {
             Inspector.DOCUMENT = window.document;
             Inspector.WINDOW = window;
 
-            // Load the Canvas2D library if it's not already done
-            if (!BABYLON.Canvas2D) {
-                BABYLON.Tools.LoadScript("https://www.babylonjs.com/babylon.canvas2d.js", () => { });
-            }
-
             // POPUP MODE
             if (popup) {
                 // Build the inspector in the given parent

+ 0 - 72
inspector/src/adapters/Canvas2DAdapter.ts

@@ -1,72 +0,0 @@
-module INSPECTOR {
-
-    export class Canvas2DAdapter
-        extends Adapter
-        implements IToolVisible, IToolDebug {
-
-        constructor(obj: any) {
-            super(obj);
-        }
-
-        /** Returns the name displayed in the tree */
-        public id(): string {
-            let str = '';
-            if (this._obj.id) {
-                str = this._obj.id;
-            } // otherwise nothing displayed        
-            return str;
-        }
-
-        /** Returns the type of this object - displayed in the tree */
-        public type(): string {
-            return Helpers.GET_TYPE(this._obj);
-        }
-
-        /** Returns the list of properties to be displayed for this adapter */
-        public getProperties(): Array<PropertyLine> {
-            let propertiesLines = [];
-            if (this._obj.propDic) {
-                let dico = this._obj.propDic as BABYLON.StringDictionary<BABYLON.Prim2DPropInfo>;
-                dico.forEach((name, propInfo) => {
-                    let property = new Property(name, this.actualObject);
-                    propertiesLines.push(new PropertyLine(property));
-                });
-            }
-            // TODO REMOVE THIS WHEN PROPERTIES WILL BE DECORATED
-            let toAddDirty = [
-                'actualZOffset', 'isSizeAuto', 'layoutArea', 'layoutAreaPos', 'contentArea',
-                'marginOffset', 'paddingOffset', 'isPickable', 'isContainer', 'boundingInfo',
-                'levelBoundingInfo', 'isSizedByContent', 'isPositionAuto', 'actualScale', 'layoutBoundingInfo',
-                '_cachedTexture', 'actualOpacity'];
-            for (let dirty of toAddDirty) {
-                let infos = new Property(dirty, this.actualObject);
-                propertiesLines.push(new PropertyLine(infos));
-            }
-            return propertiesLines;
-        }
-
-        public getTools(): Array<AbstractTreeTool> {
-            let tools = [];
-            tools.push(new Checkbox(this));
-            tools.push(new DebugArea(this));
-            return tools;
-        }
-
-        /// TOOLS ///
-        public setVisible(b: boolean) {
-            this._obj.levelVisible = b;
-        }
-        public isVisible(): boolean {
-            return this._obj.levelVisible;
-        }
-        /** Overrides super */
-        public debug(b: boolean) {
-            this._obj["displayDebugAreas"] = b;
-        }
-        /** Overrides super.highlight */
-        public highlight(b: boolean) {
-        }
-
-
-    }
-}

+ 0 - 45
inspector/src/tabs/Canvas2DTab.ts

@@ -1,45 +0,0 @@
-module INSPECTOR{
-    
-    export class Canvas2DTab extends PropertyTab {
-                
-        constructor(tabbar:TabBar, inspector:Inspector) {
-            super(tabbar, 'Canvas2D', inspector); 
-        }
-
-        /* Overrides */
-        protected _getTree() : Array<TreeItem> {
-            let arr = [];
-            
-            // get all canvas2D
-            let instances = BABYLON.Canvas2D.instances || [];
-           
-            // Recursive method building the tree panel
-            let createNode = (obj : BABYLON.Prim2DBase) => {
-                if (obj.children && obj.children.length > 0) {
-                    let node = new TreeItem(this, new Canvas2DAdapter(obj));
-                    for (let child of obj.children) {     
-                        if (!Helpers.IsSystemName(child.id)) {  
-                            let n = createNode(child);
-                            node.add(n); 
-                        }
-                    }
-                    node.update();
-                    return node;
-                } else {
-                    return new TreeItem(this, new Canvas2DAdapter(obj));
-                }
-            };
-            
-            for (let inst of instances) {
-                if (Helpers.IsSystemName(inst.id)) {
-                    continue;
-                }
-                let c2d : BABYLON.Canvas2D = inst as BABYLON.Canvas2D;
-                let nodes = createNode(c2d);
-                arr.push(nodes);
-            }
-            return arr;
-        }
-    }
-    
-}

+ 0 - 7
inspector/src/tabs/StatsTab.ts

@@ -68,13 +68,6 @@ module INSPECTOR {
                     updateFct:() => { return this._scene.lights.length.toString()}
                 });
 
-                elemLabel = this._createStatLabel("Total lights", this._panel);
-                elemValue = Helpers.CreateDiv('stat-value', this._panel);
-                this._updatableProperties.push({ 
-                    elem:elemValue, 
-                    updateFct:() => { return this._scene.lights.length.toString()}
-                });
-
                 elemLabel = this._createStatLabel("Total vertices", this._panel);
                 elemValue = Helpers.CreateDiv('stat-value', this._panel);
                 this._updatableProperties.push({ 

+ 0 - 4
inspector/src/tabs/TabBar.ts

@@ -32,10 +32,6 @@ module INSPECTOR {
             this._tabs.push(this._meshTab);
             this._tabs.push(new ShaderTab(this, this._inspector));
             this._tabs.push(new LightTab(this, this._inspector));
-            // Add only the tab canvas2D if Canvas2D is defined
-            if (BABYLON.Canvas2D) {
-                this._tabs.push(new Canvas2DTab(this, this._inspector));
-            }
             this._tabs.push(new MaterialTab(this, this._inspector));
 
             this._tabs.push(new CameraTab(this, this._inspector));

+ 0 - 72
inspector/test/index.js

@@ -1,5 +1,4 @@
 /// <reference path="../../dist/preview release/babylon.d.ts"/>
-/// <reference path="../../dist/preview release/canvas2D/babylon.canvas2D.d.ts"/>
 
 var Test = (function () {
     function Test(canvasId) {
@@ -28,7 +27,6 @@ var Test = (function () {
             }
         });
         this.scene.executeWhenReady(function () {
-            _this._initGame();
             _this.engine.runRenderLoop(function () {
                 _this.scene.render();
             });
@@ -214,78 +212,8 @@ var Test = (function () {
             b.position.z = Math.sin(r) * d;
             cubes.push(b);
         }
-        var canvas = new BABYLON.ScreenSpaceCanvas2D(scene, {
-            id: "ScreenCanvas",
-            cachingStrategy: BABYLON.Canvas2D.CACHESTRATEGY_TOPLEVELGROUPS
-
-        });
-        i = 0;
-        for (var _i = 0, cubes_1 = cubes; _i < cubes_1.length; _i++) {
-            var cube = cubes_1[_i];
-            new BABYLON.Group2D({
-                parent: canvas, id: "GroupTag #" + i, width: 80, height: 40, trackNode: cube, origin: BABYLON.Vector2.Zero(),
-                children: [
-                    new BABYLON.Rectangle2D({
-                        id: "firstRect", width: 80, height: 26, x: 0, y: 0, origin: BABYLON.Vector2.Zero(), border: "#FFFFFFFF", fill: "#808080FF", children: [
-                            new BABYLON.Text2D(cube.name, { marginAlignment: "h: center, v:center", fontName: "bold 12px Arial" })
-                        ]
-                    })
-                ]
-            });
-            ++i;
-        }
-
 
         this.scene = scene;
     };
-    Test.prototype._initGame = function () {
-        this._createCanvas();
-    };
-    /**
-     * Create the canvas2D
-     */
-    Test.prototype._createCanvas = function () {
-        // object hierarchy  g1 -> g2 -> rect
-
-        // when cachingStrategy is 1 or 2 - everything is rendered
-        // when it is 3 - only direct children of g1 are rendered
-        var canvas = new BABYLON.ScreenSpaceCanvas2D(this.scene,
-            {
-                id: "ScreenCanvas",
-                cachingStrategy: BABYLON.Canvas2D.CACHESTRATEGY_DONTCACHE
-            });           // 1
-        // cachingStrategy: BABYLON.Canvas2D.CACHESTRATEGY_TOPLEVELGROUPS });      // 2 
-        // cachingStrategy: BABYLON.Canvas2D.CACHESTRATEGY_ALLGROUPS });           // 3
-
-        canvas.createCanvasProfileInfoCanvas();
-
-        // parent group            
-        var g1 = new BABYLON.Group2D({
-            parent: canvas, id: "G1",
-            x: 50, y: 50, size: new BABYLON.Size(60, 60)
-        });
-
-        // just to see it    
-        let frame1 = new BABYLON.Rectangle2D({
-            parent: g1,
-            x: 0, y: 0, size: g1.size, border: "#FF0000FF"
-        });
-
-        // child group
-        let g2 = new BABYLON.Group2D({
-            parent: g1, id: "G2",
-            x: 10, y: 10, size: new BABYLON.Size(40, 40)
-        });
-
-        // just to see it
-        let frame2 = new BABYLON.Rectangle2D({ parent: g2, x: 0, y: 0, size: g2.size, border: "#0000FFFF" });
-
-        let rect = new BABYLON.Rectangle2D({
-            parent: g2, x: 10, y: 10, size: new BABYLON.Size(20, 20),
-            fill: "#00FF00FF"
-        });
-
-        return canvas;
-    };
     return Test;
 }());

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 74 - 0
license.md


+ 3 - 0
loaders/src/glTF/1.0/babylon.glTFLoader.ts

@@ -523,6 +523,9 @@ module BABYLON.GLTF1 {
                 }
 
                 var children = joint.children;
+                if (!children) {
+                    continue;
+                }
                 foundBone = false;
 
                 for (var k = 0; k < children.length; k++) {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 662 - 1062
loaders/src/glTF/2.0/babylon.glTFLoader.ts


+ 6 - 17
loaders/src/glTF/2.0/babylon.glTFLoaderExtension.ts

@@ -14,35 +14,24 @@ module BABYLON.GLTF2 {
             return this._name;
         }
 
-        protected postCreateRuntime(runtime: IGLTFRuntime): void {}
-
-        // Return true to stop other extensions from loading materials.
-        protected loadMaterialAsync(runtime: IGLTFRuntime, index: number, onSuccess: () => void, onError: () => void): boolean { return false; }
+        protected loadMaterial(index: number): Material { return null; }
 
         // ---------
         // Utilities
         // ---------
 
-        public static PostCreateRuntime(runtime: IGLTFRuntime): void {
-            for (var extensionName in GLTFLoader.Extensions) {
-                var extension = GLTFLoader.Extensions[extensionName];
-                if (extension.enabled) {
-                    extension.postCreateRuntime(runtime);
-                }
-            }
-        }
-
-        public static LoadMaterialAsync(runtime: IGLTFRuntime, index: number, onSuccess: () => void, onError: () => void): void {
+        public static LoadMaterial(index: number): Material {
             for (var extensionName in GLTFLoader.Extensions) {
                 var extension = GLTFLoader.Extensions[extensionName];
                 if (extension.enabled) {
-                    if (extension.loadMaterialAsync(runtime, index, onSuccess, onError)) {
-                        return;
+                    var babylonMaterial = extension.loadMaterial(index);
+                    if (babylonMaterial) {
+                        return babylonMaterial;
                     }
                 }
             }
 
-            GLTFLoader.LoadCoreMaterialAsync(runtime, index, onSuccess, onError);
+            return GLTFLoader.LoadCoreMaterial(index);
         }
     }
 }

+ 17 - 35
loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts

@@ -103,6 +103,9 @@ module BABYLON.GLTF2 {
     export interface IGLTFAnimation extends IGLTFChildRootProperty {
         channels: IGLTFAnimationChannel[];
         samplers: IGLTFAnimationSampler[];
+
+        // Runtime values
+        targets?: any[];
     }
 
     export interface IGLTFAssetProfile extends IGLTFProperty {
@@ -121,8 +124,9 @@ module BABYLON.GLTF2 {
         uri?: string;
         byteLength: number;
 
-        // Loaded buffer (optimize)
-        loadedBufferView: ArrayBufferView
+        // Runtime values
+        loadedData: ArrayBufferView;
+        loadedObservable: Observable<IGLTFBuffer>;
     }
 
     export interface IGLTFBufferView extends IGLTFChildRootProperty {
@@ -184,7 +188,7 @@ module BABYLON.GLTF2 {
         alphaCutoff: number;
         doubleSided?: boolean;
 
-        // Babylon.js values (optimize)
+        // Runtime values
         babylonMaterial?: PBRMaterial;
     }
 
@@ -212,8 +216,11 @@ module BABYLON.GLTF2 {
         translation?: number[];
         weights?: number[];
 
-        // Babylon.js values (optimize)
-        babylonNode?: Node;
+        // Runtime values
+        index?: number;
+        babylonMesh?: Mesh;
+        babylonSkinToBones?: { [skin: number]: Bone };
+        babylonAnimationTargets?: Node[];
     }
 
     export interface IGLTFSampler extends IGLTFChildRootProperty {
@@ -232,7 +239,8 @@ module BABYLON.GLTF2 {
         skeleton?: number;
         joints: number[];
 
-        // Babylon.js values (optimize)
+        // Runtime values
+        index?: number;
         babylonSkeleton?: Skeleton;
     }
 
@@ -240,9 +248,9 @@ module BABYLON.GLTF2 {
         sampler?: number;
         source: number;
 
-        // Babylon.js values (optimize, one per coordinate index)
-        babylonTextures: Texture[];
-        blobURL: string;
+        // Runtime values (one per coordinate index)
+        babylonTextures?: Texture[];
+        blobURL?: string;
     }
 
     export interface IGLTFTextureInfo {
@@ -270,30 +278,4 @@ module BABYLON.GLTF2 {
         skins?: IGLTFSkin[];
         textures?: IGLTFTexture[];
     }
-
-    export interface IGLTFRuntime {
-        gltf: IGLTF;
-
-        babylonScene: Scene;
-        rootUrl: string;
-
-        importOnlyMeshes: boolean;
-        importMeshesNames?: string[];
-
-        defaultMaterial?: PBRMaterial;
-    }
-
-    /**
-    * Bones
-    */
-    export interface INodeToRoot {
-        bone: Bone;
-        node: IGLTFNode;
-        index: number;
-    }
-
-    export interface IJointNode {
-        node: IGLTFNode;
-        index: number;
-    }
 }

+ 0 - 0
loaders/src/glTF/2.0/babylon.glTFLoaderUtils.ts


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.