Jelajahi Sumber

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

David Catuhe 7 tahun lalu
induk
melakukan
4ae72959db
100 mengubah file dengan 41925 tambahan dan 35471 penghapusan
  1. 9646 7334
      Playground/babylon.d.txt
  2. TEMPAT SAMPAH
      Playground/textures/Runyon_Canyon_A_2k_cube_specular.dds
  3. TEMPAT SAMPAH
      Playground/textures/earthnormal.jpg
  4. TEMPAT SAMPAH
      Playground/textures/rockyGround_basecolor.png
  5. TEMPAT SAMPAH
      Playground/textures/rockyGround_metalRough.png
  6. TEMPAT SAMPAH
      Playground/textures/rockyGround_normal.png
  7. 15 1
      Viewer/assets/templates/default/error.html
  8. 1 1
      Viewer/src/loader/plugins/msftLodLoaderPlugin.ts
  9. 823 0
      assets/particles/systems/fire.json
  10. 378 0
      assets/particles/systems/rain.json
  11. 161 0
      assets/particles/systems/smoke.json
  12. 2 2
      assets/particles/systems/sun.json
  13. TEMPAT SAMPAH
      assets/particles/textures/fire/Fire_SpriteSheet1_8x8.png
  14. TEMPAT SAMPAH
      assets/particles/textures/fire/Fire_SpriteSheet2_8x8.png
  15. TEMPAT SAMPAH
      assets/particles/textures/fire/Fire_SpriteSheet3_8x8.png
  16. TEMPAT SAMPAH
      assets/particles/textures/fire/sparks.png
  17. TEMPAT SAMPAH
      assets/particles/textures/rain/Rain.png
  18. TEMPAT SAMPAH
      assets/particles/textures/smoke/Smoke_SpriteSheet_8x8.png
  19. 17 3
      contributing.md
  20. 9559 7245
      dist/preview release/babylon.d.ts
  21. 1 1
      dist/preview release/babylon.js
  22. 3118 1251
      dist/preview release/babylon.max.js
  23. 3118 1251
      dist/preview release/babylon.no-module.max.js
  24. 1 1
      dist/preview release/babylon.worker.js
  25. 3118 1251
      dist/preview release/es6.js
  26. 1 1
      dist/preview release/glTF2Interface/package.json
  27. 1 1
      dist/preview release/gui/babylon.gui.min.js.map
  28. 1 1
      dist/preview release/gui/package.json
  29. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js.map
  30. 1 1
      dist/preview release/inspector/package.json
  31. 96 96
      dist/preview release/loaders/babylon.glTF2FileLoader.d.ts
  32. 945 915
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  33. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  34. 96 96
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  35. 945 915
      dist/preview release/loaders/babylon.glTFFileLoader.js
  36. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  37. 96 96
      dist/preview release/loaders/babylonjs.loaders.d.ts
  38. 945 915
      dist/preview release/loaders/babylonjs.loaders.js
  39. 1 1
      dist/preview release/loaders/babylonjs.loaders.min.js
  40. 96 96
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  41. 2 2
      dist/preview release/loaders/package.json
  42. 1 1
      dist/preview release/materialsLibrary/package.json
  43. 1 1
      dist/preview release/postProcessesLibrary/package.json
  44. 1 1
      dist/preview release/proceduralTexturesLibrary/package.json
  45. 3 5
      dist/preview release/serializers/babylon.glTF2Serializer.d.ts
  46. 3 0
      dist/preview release/serializers/babylon.glTF2Serializer.js
  47. 3 5
      dist/preview release/serializers/babylonjs.serializers.d.ts
  48. 3 0
      dist/preview release/serializers/babylonjs.serializers.js
  49. 3 5
      dist/preview release/serializers/babylonjs.serializers.module.d.ts
  50. 2 2
      dist/preview release/serializers/package.json
  51. 6520 13274
      dist/preview release/typedocValidationBaseline.json
  52. 159 2
      dist/preview release/viewer/babylon.viewer.d.ts
  53. 3 3
      dist/preview release/viewer/babylon.viewer.js
  54. 5 5
      dist/preview release/viewer/babylon.viewer.max.js
  55. 163 1
      dist/preview release/viewer/babylon.viewer.module.d.ts
  56. 3 2
      dist/preview release/what's new.md
  57. 2 2
      loaders/src/glTF/2.0/Extensions/EXT_lights_image_based.ts
  58. 4 4
      loaders/src/glTF/2.0/Extensions/KHR_draco_mesh_compression.ts
  59. 6 6
      loaders/src/glTF/2.0/Extensions/KHR_lights_punctual.ts
  60. 3 3
      loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts
  61. 3 3
      loaders/src/glTF/2.0/Extensions/KHR_materials_unlit.ts
  62. 2 2
      loaders/src/glTF/2.0/Extensions/KHR_texture_transform.ts
  63. 5 5
      loaders/src/glTF/2.0/Extensions/MSFT_audio_emitter.ts
  64. 3 3
      loaders/src/glTF/2.0/Extensions/MSFT_lod.ts
  65. 2 2
      loaders/src/glTF/2.0/Extensions/MSFT_minecraftMesh.ts
  66. 2 2
      loaders/src/glTF/2.0/Extensions/MSFT_sRGBFactors.ts
  67. 52 52
      loaders/src/glTF/2.0/babylon.glTFLoader.ts
  68. 10 10
      loaders/src/glTF/2.0/babylon.glTFLoaderExtension.ts
  69. 49 49
      loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts
  70. 1 1
      package.json
  71. 4 1
      readme.md
  72. 3 0
      serializers/src/glTF/2.0/Extensions/KHR_texture_transform.ts
  73. 0 8
      serializers/src/glTF/2.0/babylon.glTFExporterExtension.ts
  74. 20 75
      src/Actions/babylon.actionManager.ts
  75. 260 7
      src/Actions/babylon.directActions.ts
  76. 60 3
      src/Actions/babylon.interpolateValueAction.ts
  77. 182 26
      src/Animations/babylon.easing.ts
  78. 379 181
      src/Audio/babylon.audioEngine.ts
  79. 50 1
      src/Audio/babylon.sound.ts
  80. 146 129
      src/Behaviors/Cameras/babylon.autoRotationBehavior.ts
  81. 14 0
      src/Behaviors/Cameras/babylon.bouncingBehavior.ts
  82. 33 6
      src/Behaviors/Cameras/babylon.framingBehavior.ts
  83. 21 5
      src/Behaviors/Mesh/babylon.pointerDragBehavior.ts
  84. 13 2
      src/Behaviors/Mesh/babylon.sixDofDragBehavior.ts
  85. 50 10
      src/Cameras/Inputs/babylon.arcRotateCameraGamepadInput.ts
  86. 67 9
      src/Cameras/Inputs/babylon.arcRotateCameraKeyboardMoveInput.ts
  87. 35 8
      src/Cameras/Inputs/babylon.arcRotateCameraMouseWheelInput.ts
  88. 57 7
      src/Cameras/Inputs/babylon.arcRotateCameraPointersInput.ts
  89. 48 6
      src/Cameras/Inputs/babylon.arcRotateCameraVRDeviceOrientationInput.ts
  90. 34 5
      src/Cameras/Inputs/babylon.freeCameraDeviceOrientationInput.ts
  91. 49 10
      src/Cameras/Inputs/babylon.freeCameraGamepadInput.ts
  92. 53 12
      src/Cameras/Inputs/babylon.freeCameraKeyboardMoveInput.ts
  93. 46 8
      src/Cameras/Inputs/babylon.freeCameraMouseInput.ts
  94. 48 12
      src/Cameras/Inputs/babylon.freeCameraTouchInput.ts
  95. 44 8
      src/Cameras/Inputs/babylon.freeCameraVirtualJoystickInput.ts
  96. 2 1
      src/Cameras/Stereoscopic/babylon.anaglyphArcRotateCamera.ts
  97. 1 0
      src/Cameras/Stereoscopic/babylon.anaglyphFreeCamera.ts
  98. 1 0
      src/Cameras/Stereoscopic/babylon.anaglyphGamepadCamera.ts
  99. 1 0
      src/Cameras/Stereoscopic/babylon.anaglyphUniversalCamera.ts
  100. 0 0
      src/Cameras/Stereoscopic/babylon.stereoscopicArcRotateCamera.ts

File diff ditekan karena terlalu besar
+ 9646 - 7334
Playground/babylon.d.txt


TEMPAT SAMPAH
Playground/textures/Runyon_Canyon_A_2k_cube_specular.dds


TEMPAT SAMPAH
Playground/textures/earthnormal.jpg


TEMPAT SAMPAH
Playground/textures/rockyGround_basecolor.png


TEMPAT SAMPAH
Playground/textures/rockyGround_metalRough.png


TEMPAT SAMPAH
Playground/textures/rockyGround_normal.png


+ 15 - 1
Viewer/assets/templates/default/error.html

@@ -1 +1,15 @@
-Error loading the model
+<style>
+    .narrator-readable-text {
+        border: none;
+        background: none;
+        color: inherit;
+        border: none;
+        padding: 0;
+        font: inherit;
+        cursor: pointer;
+        outline: inherit;
+    }
+</style>
+
+<!-- Accessibility button that a screen narrator will read -->
+<button class="narrator-readable-text">Error loading the model</button>

+ 1 - 1
Viewer/src/loader/plugins/msftLodLoaderPlugin.ts

@@ -17,7 +17,7 @@ export class MSFTLodLoaderPlugin implements ILoaderPlugin {
 
 
     public onExtensionLoaded(extension: IGLTFLoaderExtension) {
     public onExtensionLoaded(extension: IGLTFLoaderExtension) {
         if (extension.name === "MSFT_lod" && this._model.configuration.loaderConfiguration) {
         if (extension.name === "MSFT_lod" && this._model.configuration.loaderConfiguration) {
-            const MSFT_lod = extension as GLTF2.Extensions.MSFT_lod;
+            const MSFT_lod = extension as GLTF2.Loader.Extensions.MSFT_lod;
             MSFT_lod.enabled = !!this._model.configuration.loaderConfiguration.progressiveLoading;
             MSFT_lod.enabled = !!this._model.configuration.loaderConfiguration.progressiveLoading;
             MSFT_lod.maxLODsToLoad = this._model.configuration.loaderConfiguration.maxLODsToLoad || Number.MAX_VALUE;
             MSFT_lod.maxLODsToLoad = this._model.configuration.loaderConfiguration.maxLODsToLoad || Number.MAX_VALUE;
         }
         }

+ 823 - 0
assets/particles/systems/fire.json

@@ -0,0 +1,823 @@
+{
+    "systems":
+    [
+        {
+            "name": "fireSystem",
+            "id": "fireSystem",
+            "capacity": 5,
+            "emitter":
+            [
+                0,
+                3.25,
+                0
+            ],
+            "particleEmitterType":
+            {
+                "type": "BoxParticleEmitter",
+                "direction1":
+                [
+                    0,
+                    1,
+                    0
+                ],
+                "direction2":
+                [
+                    0,
+                    1,
+                    0
+                ],
+                "minEmitBox":
+                [
+                    -0.5,
+                    0,
+                    -0.5
+                ],
+                "maxEmitBox":
+                [
+                    0.5,
+                    0,
+                    0.5
+                ]
+            },
+            "textureName": "fire/Fire_SpriteSheet1_8x8.png",
+            "invertY": false,
+            "animations": [],
+            "startDelay": 0,
+            "renderingGroupId": 0,
+            "isBillboardBased": true,
+            "billboardMode": 2,
+            "minAngularSpeed": 0,
+            "maxAngularSpeed": 0,
+            "minSize": 6,
+            "maxSize": 8,
+            "minScaleX": 1,
+            "maxScaleX": 1,
+            "minScaleY": 1,
+            "maxScaleY": 1,
+            "minEmitPower": 0,
+            "maxEmitPower": 0,
+            "minLifeTime": 2,
+            "maxLifeTime": 3,
+            "emitRate": 2,
+            "gravity":
+            [
+                0,
+                0,
+                0
+            ],
+            "noiseStrength":
+            [
+                10,
+                10,
+                10
+            ],
+            "color1":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "color2":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "colorDead":
+            [
+                1,
+                1,
+                1,
+                0
+            ],
+            "updateSpeed": 0.016666666666666666,
+            "targetStopDuration": 0,
+            "blendMode": 4,
+            "preWarmCycles": 100,
+            "preWarmStepOffset": 10,
+            "minInitialRotation": -0.1,
+            "maxInitialRotation": 0.1,
+            "startSpriteCellID": 0,
+            "endSpriteCellID": 63,
+            "spriteCellChangeSpeed": 1,
+            "spriteCellWidth": 128,
+            "spriteCellHeight": 128,
+            "spriteRandomStartCell": true,
+            "isAnimationSheetEnabled": true,
+            "colorGradients":
+            [
+                {
+                    "gradient": 0,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0
+                    ]
+                },
+                {
+                    "gradient": 0.1,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0.6
+                    ]
+                },
+                {
+                    "gradient": 0.9,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0.6
+                    ]
+                },
+                {
+                    "gradient": 1,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0
+                    ]
+                }
+            ],
+            "rampGradients":
+            [
+                {
+                    "gradient": 0,
+                    "color":
+                    [
+                        1,
+                        1,
+                        1
+                    ]
+                },
+                {
+                    "gradient": 1,
+                    "color":
+                    [
+                        0.7968,
+                        0.3685,
+                        0.1105
+                    ]
+                }
+            ],
+            "useRampGradients": true,
+            "colorRemapGradients":
+            [
+                {
+                    "gradient": 0,
+                    "factor1": 0.2,
+                    "factor2": 1
+                },
+                {
+                    "gradient": 1,
+                    "factor1": 0.2,
+                    "factor2": 1
+                }
+            ],
+            "textureMask":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "customShader": null,
+            "preventAutoStart": false
+        },
+        {
+            "name": "sparksEdge",
+            "id": "sparksEdge",
+            "capacity": 20,
+            "emitter":
+            [
+                0,
+                0,
+                0
+            ],
+            "particleEmitterType":
+            {
+                "type": "ConeParticleEmitter",
+                "radius": 1,
+                "angle": 0.8,
+                "directionRandomizer": 0
+            },
+            "textureName": "fire/sparks.png",
+            "invertY": true,
+            "animations": [],
+            "startDelay": 0,
+            "renderingGroupId": 0,
+            "isBillboardBased": true,
+            "billboardMode": 7,
+            "minAngularSpeed": 0,
+            "maxAngularSpeed": 0,
+            "minSize": 0.2,
+            "maxSize": 0.3,
+            "minScaleX": 1,
+            "maxScaleX": 1,
+            "minScaleY": 1,
+            "maxScaleY": 1,
+            "minEmitPower": 15,
+            "maxEmitPower": 20,
+            "minLifeTime": 1.5,
+            "maxLifeTime": 2.5,
+            "emitRate": 20,
+            "gravity":
+            [
+                0,
+                0,
+                0
+            ],
+            "noiseStrength":
+            [
+                2,
+                1,
+                1
+            ],
+            "color1":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "color2":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "colorDead":
+            [
+                1,
+                1,
+                1,
+                0
+            ],
+            "updateSpeed": 0.016666666666666666,
+            "targetStopDuration": 0,
+            "blendMode": 2,
+            "preWarmCycles": 100,
+            "preWarmStepOffset": 10,
+            "minInitialRotation": 0,
+            "maxInitialRotation": 0,
+            "startSpriteCellID": 0,
+            "endSpriteCellID": 0,
+            "spriteCellChangeSpeed": 1,
+            "spriteCellWidth": 0,
+            "spriteCellHeight": 0,
+            "spriteRandomStartCell": false,
+            "isAnimationSheetEnabled": false,
+            "colorGradients":
+            [
+                {
+                    "gradient": 0,
+                    "color1":
+                    [
+                        0.9245,
+                        0.654,
+                        0.0915,
+                        0
+                    ]
+                },
+                {
+                    "gradient": 0.04,
+                    "color1":
+                    [
+                        0.9062,
+                        0.6132,
+                        0.0942,
+                        0.1
+                    ]
+                },
+                {
+                    "gradient": 0.4,
+                    "color1":
+                    [
+                        0.7968,
+                        0.3685,
+                        0.1105,
+                        1
+                    ]
+                },
+                {
+                    "gradient": 0.7,
+                    "color1":
+                    [
+                        0.6886,
+                        0.1266,
+                        0.1266,
+                        1
+                    ]
+                },
+                {
+                    "gradient": 0.9,
+                    "color1":
+                    [
+                        0.3113,
+                        0.0367,
+                        0.0367,
+                        0.6
+                    ]
+                },
+                {
+                    "gradient": 1,
+                    "color1":
+                    [
+                        0.3113,
+                        0.0367,
+                        0.0367,
+                        0
+                    ]
+                }
+            ],
+            "rampGradients":
+            [
+                {
+                    "gradient": 0,
+                    "color":
+                    [
+                        1,
+                        1,
+                        1
+                    ]
+                },
+                {
+                    "gradient": 1,
+                    "color":
+                    [
+                        0.7968,
+                        0.63685,
+                        0.4105
+                    ]
+                }
+            ],
+            "useRampGradients": true,
+            "colorRemapGradients":
+            [
+                {
+                    "gradient": 0,
+                    "factor1": 0,
+                    "factor2": 0.1
+                },
+                {
+                    "gradient": 0.2,
+                    "factor1": 0.1,
+                    "factor2": 0.8
+                },
+                {
+                    "gradient": 0.3,
+                    "factor1": 0.2,
+                    "factor2": 0.85
+                },
+                {
+                    "gradient": 0.35,
+                    "factor1": 0.4,
+                    "factor2": 0.85
+                },
+                {
+                    "gradient": 0.4,
+                    "factor1": 0.5,
+                    "factor2": 0.9
+                },
+                {
+                    "gradient": 0.5,
+                    "factor1": 0.95,
+                    "factor2": 1
+                },
+                {
+                    "gradient": 1,
+                    "factor1": 0.95,
+                    "factor2": 1
+                }
+            ],
+            "limitVelocityGradients":
+            [
+                {
+                    "gradient": 0,
+                    "factor1": 7
+                },
+                {
+                    "gradient": 1,
+                    "factor1": 1
+                }
+            ],
+            "limitVelocityDamping": 0.5,
+            "noiseTexture":
+            {
+                "customType": "BABYLON.NoiseProceduralTexture",
+                "brightness": 0.5,
+                "octaves": 8,
+                "persistence": 1,
+                "animationSpeedFactor": 3,
+                "size": 256,
+                "generateMipMaps": true
+            },
+            "textureMask":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "customShader": null,
+            "preventAutoStart": false
+        },
+        {
+            "name": "fireSystem2",
+            "id": "fireSystem2",
+            "capacity": 3,
+            "emitter":
+            [
+                0,
+                2.25,
+                0
+            ],
+            "particleEmitterType":
+            {
+                "type": "BoxParticleEmitter",
+                "direction1":
+                [
+                    0,
+                    1,
+                    0
+                ],
+                "direction2":
+                [
+                    0,
+                    1,
+                    0
+                ],
+                "minEmitBox":
+                [
+                    -0.5,
+                    0,
+                    -0.5
+                ],
+                "maxEmitBox":
+                [
+                    0.5,
+                    0,
+                    0.5
+                ]
+            },
+            "textureName": "fire/Fire_SpriteSheet2_8x8.png",
+            "invertY": false,
+            "animations": [],
+            "startDelay": 0,
+            "renderingGroupId": 0,
+            "isBillboardBased": true,
+            "billboardMode": 2,
+            "minAngularSpeed": 0,
+            "maxAngularSpeed": 0,
+            "minSize": 5,
+            "maxSize": 6,
+            "minScaleX": 1,
+            "maxScaleX": 1,
+            "minScaleY": 1,
+            "maxScaleY": 1,
+            "minEmitPower": 0,
+            "maxEmitPower": 0,
+            "minLifeTime": 2,
+            "maxLifeTime": 3,
+            "emitRate": 2,
+            "gravity":
+            [
+                0,
+                0,
+                0
+            ],
+            "noiseStrength":
+            [
+                10,
+                10,
+                10
+            ],
+            "color1":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "color2":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "colorDead":
+            [
+                1,
+                1,
+                1,
+                0
+            ],
+            "updateSpeed": 0.016666666666666666,
+            "targetStopDuration": 0,
+            "blendMode": 4,
+            "preWarmCycles": 100,
+            "preWarmStepOffset": 10,
+            "minInitialRotation": -0.1,
+            "maxInitialRotation": 0.1,
+            "startSpriteCellID": 0,
+            "endSpriteCellID": 63,
+            "spriteCellChangeSpeed": 0.9,
+            "spriteCellWidth": 128,
+            "spriteCellHeight": 128,
+            "spriteRandomStartCell": true,
+            "isAnimationSheetEnabled": true,
+            "colorGradients":
+            [
+                {
+                    "gradient": 0,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0
+                    ]
+                },
+                {
+                    "gradient": 0.1,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0.6
+                    ]
+                },
+                {
+                    "gradient": 0.9,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0.6
+                    ]
+                },
+                {
+                    "gradient": 1,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0
+                    ]
+                }
+            ],
+            "rampGradients":
+            [
+                {
+                    "gradient": 0,
+                    "color":
+                    [
+                        1,
+                        1,
+                        1
+                    ]
+                },
+                {
+                    "gradient": 1,
+                    "color":
+                    [
+                        0.7968,
+                        0.3685,
+                        0.1105
+                    ]
+                }
+            ],
+            "useRampGradients": true,
+            "colorRemapGradients":
+            [
+                {
+                    "gradient": 0,
+                    "factor1": 0.2,
+                    "factor2": 1
+                },
+                {
+                    "gradient": 1,
+                    "factor1": 0.2,
+                    "factor2": 1
+                }
+            ],
+            "textureMask":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "customShader": null,
+            "preventAutoStart": false
+        },
+        {
+            "name": "fireSystem3",
+            "id": "fireSystem3",
+            "capacity": 3,
+            "emitter":
+            [
+                0,
+                2.25,
+                0
+            ],
+            "particleEmitterType":
+            {
+                "type": "BoxParticleEmitter",
+                "direction1":
+                [
+                    0,
+                    1,
+                    0
+                ],
+                "direction2":
+                [
+                    0,
+                    1,
+                    0
+                ],
+                "minEmitBox":
+                [
+                    -0.5,
+                    0,
+                    -0.5
+                ],
+                "maxEmitBox":
+                [
+                    0.5,
+                    0,
+                    0.5
+                ]
+            },
+            "textureName": "fire/Fire_SpriteSheet3_8x8.png",
+            "invertY": false,
+            "animations": [],
+            "startDelay": 0,
+            "renderingGroupId": 0,
+            "isBillboardBased": true,
+            "billboardMode": 2,
+            "minAngularSpeed": 0,
+            "maxAngularSpeed": 0,
+            "minSize": 5,
+            "maxSize": 6,
+            "minScaleX": 1,
+            "maxScaleX": 1,
+            "minScaleY": 1,
+            "maxScaleY": 1,
+            "minEmitPower": 0,
+            "maxEmitPower": 0,
+            "minLifeTime": 2,
+            "maxLifeTime": 3,
+            "emitRate": 2,
+            "gravity":
+            [
+                0,
+                0,
+                0
+            ],
+            "noiseStrength":
+            [
+                10,
+                10,
+                10
+            ],
+            "color1":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "color2":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "colorDead":
+            [
+                1,
+                1,
+                1,
+                0
+            ],
+            "updateSpeed": 0.016666666666666666,
+            "targetStopDuration": 0,
+            "blendMode": 4,
+            "preWarmCycles": 100,
+            "preWarmStepOffset": 10,
+            "minInitialRotation": -0.1,
+            "maxInitialRotation": 0.1,
+            "startSpriteCellID": 0,
+            "endSpriteCellID": 63,
+            "spriteCellChangeSpeed": 0.9,
+            "spriteCellWidth": 128,
+            "spriteCellHeight": 128,
+            "spriteRandomStartCell": true,
+            "isAnimationSheetEnabled": true,
+            "colorGradients":
+            [
+                {
+                    "gradient": 0,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0
+                    ]
+                },
+                {
+                    "gradient": 0.1,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0.6
+                    ]
+                },
+                {
+                    "gradient": 0.9,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0.6
+                    ]
+                },
+                {
+                    "gradient": 1,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0
+                    ]
+                }
+            ],
+            "rampGradients":
+            [
+                {
+                    "gradient": 0,
+                    "color":
+                    [
+                        1,
+                        1,
+                        1
+                    ]
+                },
+                {
+                    "gradient": 1,
+                    "color":
+                    [
+                        0.7968,
+                        0.3685,
+                        0.1105
+                    ]
+                }
+            ],
+            "useRampGradients": true,
+            "colorRemapGradients":
+            [
+                {
+                    "gradient": 0,
+                    "factor1": 0.2,
+                    "factor2": 1
+                },
+                {
+                    "gradient": 1,
+                    "factor1": 0.2,
+                    "factor2": 1
+                }
+            ],
+            "textureMask":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "customShader": null,
+            "preventAutoStart": false
+        }
+    ]
+}

+ 378 - 0
assets/particles/systems/rain.json

@@ -0,0 +1,378 @@
+{
+    "systems":
+    [
+        {
+            "name": "rainDense",
+            "id": "rainDense",
+            "capacity": 3000,
+            "emitter":
+            [
+                0,
+                30,
+                0
+            ],
+            "particleEmitterType":
+            {
+                "type": "BoxParticleEmitter",
+                "direction1":
+                [
+                    0,
+                    -1,
+                    0
+                ],
+                "direction2":
+                [
+                    0,
+                    -1,
+                    0
+                ],
+                "minEmitBox":
+                [
+                    -30,
+                    0,
+                    -30
+                ],
+                "maxEmitBox":
+                [
+                    30,
+                    0,
+                    30
+                ]
+            },
+            "textureName": "rain/Rain.png",
+            "animations": [],
+            "startDelay": 0,
+            "renderingGroupId": 0,
+            "isBillboardBased": true,
+            "billboardMode": 2,
+            "minAngularSpeed": 0,
+            "maxAngularSpeed": 0,
+            "minSize": 1,
+            "maxSize": 1,
+            "minScaleX": 0.25,
+            "maxScaleX": 0.25,
+            "minScaleY": 0.3,
+            "maxScaleY": 0.3,
+            "minEmitPower": 10,
+            "maxEmitPower": 12,
+            "minLifeTime": 3,
+            "maxLifeTime": 3,
+            "emitRate": 600,
+            "gravity":
+            [
+                0,
+                0,
+                0
+            ],
+            "noiseStrength":
+            [
+                10,
+                10,
+                10
+            ],
+            "color1":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "color2":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "colorDead":
+            [
+                1,
+                1,
+                1,
+                0
+            ],
+            "updateSpeed": 0.03333333333333333,
+            "targetStopDuration": 0,
+            "blendMode": 1,
+            "preWarmCycles": 50,
+            "preWarmStepOffset": 1,
+            "minInitialRotation": 0,
+            "maxInitialRotation": 0,
+            "startSpriteCellID": 0,
+            "endSpriteCellID": 3,
+            "spriteCellChangeSpeed": 0,
+            "spriteCellWidth": 128,
+            "spriteCellHeight": 512,
+            "spriteRandomStartCell": true,
+            "isAnimationSheetEnabled": true,
+            "colorGradients":
+            [
+                {
+                    "gradient": 0,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0.3
+                    ]
+                },
+                {
+                    "gradient": 1,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0.3
+                    ]
+                }
+            ],
+            "textureMask":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "customShader": null,
+            "preventAutoStart": false
+        },
+        {
+            "name": "rainSplash",
+            "id": "rainSplash",
+            "capacity": 100,
+            "emitter":
+            [
+                0,
+                30,
+                0
+            ],
+            "particleEmitterType":
+            {
+                "type": "BoxParticleEmitter",
+                "direction1":
+                [
+                    0,
+                    -1,
+                    0
+                ],
+                "direction2":
+                [
+                    0,
+                    -1,
+                    0
+                ],
+                "minEmitBox":
+                [
+                    -20,
+                    0,
+                    -20
+                ],
+                "maxEmitBox":
+                [
+                    50,
+                    0,
+                    50
+                ]
+            },
+            "textureName": "rain/Rain.png",
+            "animations": [],
+            "startDelay": 0,
+            "renderingGroupId": 0,
+            "isBillboardBased": true,
+            "billboardMode": 2,
+            "minAngularSpeed": 0,
+            "maxAngularSpeed": 0,
+            "minSize": 1,
+            "maxSize": 1,
+            "minScaleX": 0.25,
+            "maxScaleX": 0.25,
+            "minScaleY": 0.3,
+            "maxScaleY": 0.3,
+            "minEmitPower": 10,
+            "maxEmitPower": 10,
+            "minLifeTime": 2.95,
+            "maxLifeTime": 2.95,
+            "emitRate": 50,
+            "gravity":
+            [
+                0,
+                0,
+                0
+            ],
+            "noiseStrength":
+            [
+                10,
+                10,
+                10
+            ],
+            "color1":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "color2":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "colorDead":
+            [
+                1,
+                1,
+                1,
+                0
+            ],
+            "updateSpeed": 0.03333333333333333,
+            "targetStopDuration": 0,
+            "blendMode": 1,
+            "preWarmCycles": 0,
+            "preWarmStepOffset": 1,
+            "minInitialRotation": 0,
+            "maxInitialRotation": 0,
+            "startSpriteCellID": 0,
+            "endSpriteCellID": 3,
+            "spriteCellChangeSpeed": 0,
+            "spriteCellWidth": 128,
+            "spriteCellHeight": 512,
+            "spriteRandomStartCell": true,
+            "isAnimationSheetEnabled": true,
+            "colorGradients":
+            [
+                {
+                    "gradient": 0,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0.3
+                    ]
+                },
+                {
+                    "gradient": 1,
+                    "color1":
+                    [
+                        1,
+                        1,
+                        1,
+                        0.3
+                    ]
+                }
+            ],
+            "textureMask":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "customShader": null,
+            "preventAutoStart": false,
+            "subEmitters":
+            [
+                [
+                    {
+                        "type": 1,
+                        "inheritDirection": false,
+                        "inheritedVelocityAmount": 0,
+                        "particleSystem":
+                        {
+                            "name": "splash",
+                            "id": "splash",
+                            "capacity": 200,
+                            "emitterId": "",
+                            "particleEmitterType":
+                            {
+                                "type": "ConeParticleEmitter",
+                                "radius": 0.2,
+                                "angle": 3,
+                                "directionRandomizer": 0
+                            },
+                            "textureName": "rain/Rain.png",
+                            "animations": [],
+                            "startDelay": 0,
+                            "renderingGroupId": 0,
+                            "isBillboardBased": true,
+                            "billboardMode": 8,
+                            "minAngularSpeed": 0,
+                            "maxAngularSpeed": 0,
+                            "minSize": 0.05,
+                            "maxSize": 0.12,
+                            "minScaleX": 1,
+                            "maxScaleX": 1,
+                            "minScaleY": 1,
+                            "maxScaleY": 1,
+                            "minEmitPower": 1,
+                            "maxEmitPower": 2,
+                            "minLifeTime": 0.2,
+                            "maxLifeTime": 0.4,
+                            "emitRate": 60,
+                            "gravity":
+                            [
+                                0,
+                                0,
+                                0
+                            ],
+                            "noiseStrength":
+                            [
+                                10,
+                                10,
+                                10
+                            ],
+                            "color1":
+                            [
+                                1,
+                                1,
+                                1,
+                                1
+                            ],
+                            "color2":
+                            [
+                                1,
+                                1,
+                                1,
+                                1
+                            ],
+                            "colorDead":
+                            [
+                                1,
+                                1,
+                                1,
+                                0
+                            ],
+                            "updateSpeed": 0.03333333333333333,
+                            "targetStopDuration": 0.3,
+                            "blendMode": 1,
+                            "preWarmCycles": 0,
+                            "preWarmStepOffset": 1,
+                            "minInitialRotation": 0,
+                            "maxInitialRotation": 0,
+                            "startSpriteCellID": 0,
+                            "endSpriteCellID": 3,
+                            "spriteCellChangeSpeed": 0,
+                            "spriteCellWidth": 128,
+                            "spriteCellHeight": 512,
+                            "spriteRandomStartCell": true,
+                            "isAnimationSheetEnabled": true,
+                            "textureMask":
+                            [
+                                1,
+                                1,
+                                1,
+                                1
+                            ],
+                            "customShader": null,
+                            "preventAutoStart": false
+                        }
+                    }
+                ]
+            ]
+        }
+    ]
+}

+ 161 - 0
assets/particles/systems/smoke.json

@@ -0,0 +1,161 @@
+{
+    "systems":
+    [
+        {
+            "name": "default system",
+            "id": "default system",
+            "capacity": 500,
+            "emitter":
+            [
+                0,
+                0,
+                0
+            ],
+            "particleEmitterType":
+            {
+                "type": "ConeParticleEmitter",
+                "radius": 0.1,
+                "angle": 0.6,
+                "directionRandomizer": 0
+            },
+            "textureName": "smoke/Smoke_SpriteSheet_8x8.png",
+            "animations": [],
+            "startDelay": 0,
+            "renderingGroupId": 0,
+            "isBillboardBased": true,
+            "minAngularSpeed": 0,
+            "maxAngularSpeed": 0,
+            "minSize": 3,
+            "maxSize": 5,
+            "minScaleX": 1,
+            "maxScaleX": 1,
+            "minScaleY": 1,
+            "maxScaleY": 1,
+            "minEmitPower": 1.2,
+            "maxEmitPower": 1.4,
+            "minLifeTime": 10,
+            "maxLifeTime": 11,
+            "emitRate": 30,
+            "gravity":
+            [
+                0.1,
+                0,
+                0.05
+            ],
+            "noiseStrength":
+            [
+                0.2,
+                0,
+                0.15
+            ],
+            "color1":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "color2":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "colorDead":
+            [
+                1,
+                1,
+                1,
+                0
+            ],
+            "updateSpeed": 0.016666666666666666,
+            "targetStopDuration": 0,
+            "blendMode": 1,
+            "preWarmCycles": 0,
+            "preWarmStepOffset": 1,
+            "minInitialRotation": -0.7,
+            "maxInitialRotation": 0.7,
+            "startSpriteCellID": 0,
+            "endSpriteCellID": 63,
+            "spriteCellChangeSpeed": 2.5,
+            "spriteCellWidth": 128,
+            "spriteCellHeight": 128,
+            "spriteRandomStartCell": true,
+            "colorGradients":
+            [
+                {
+                    "gradient": 0,
+                    "color1":
+                    [
+                        0.5,
+                        0.5,
+                        0.5,
+                        0
+                    ]
+                },
+                {
+                    "gradient": 0.3,
+                    "color1":
+                    [
+                        0.3,
+                        0.3,
+                        0.3,
+                        0.5
+                    ]
+                },
+                {
+                    "gradient": 0.7,
+                    "color1":
+                    [
+                        0.2,
+                        0.2,
+                        0.2,
+                        0.3
+                    ]
+                },
+                {
+                    "gradient": 1,
+                    "color1":
+                    [
+                        0.1,
+                        0.1,
+                        0.1,
+                        0
+                    ]
+                }
+            ],
+            "sizeGradients":
+            [
+                {
+                    "gradient": 0,
+                    "factor1": 1
+                },
+                {
+                    "gradient": 1,
+                    "factor1": 6
+                }
+            ],
+            "noiseTexture":
+            {
+                "customType": "BABYLON.NoiseProceduralTexture",
+                "brightness": 0.5,
+                "octaves": 4,
+                "persistence": 0.2,
+                "animationSpeedFactor": 5,
+                "size": 256,
+                "generateMipMaps": true
+            },
+            "textureMask":
+            [
+                1,
+                1,
+                1,
+                1
+            ],
+            "customShader": null,
+            "preventAutoStart": false,
+            "isAnimationSheetEnabled": true
+        }
+    ]
+}

+ 2 - 2
assets/particles/systems/sun.json

@@ -13,8 +13,8 @@
   },
   },
   "systems": [
   "systems": [
     {
     {
-      "name": "surfaceParticles",
-      "id": "surfaceParticles",
+      "name": "sunSystem",
+      "id": "sunSystem",
       "capacity": 1600,
       "capacity": 1600,
       "renderingGroupId": 3,
       "renderingGroupId": 3,
       "isBillboardBased": false,
       "isBillboardBased": false,

TEMPAT SAMPAH
assets/particles/textures/fire/Fire_SpriteSheet1_8x8.png


TEMPAT SAMPAH
assets/particles/textures/fire/Fire_SpriteSheet2_8x8.png


TEMPAT SAMPAH
assets/particles/textures/fire/Fire_SpriteSheet3_8x8.png


TEMPAT SAMPAH
assets/particles/textures/fire/sparks.png


TEMPAT SAMPAH
assets/particles/textures/rain/Rain.png


TEMPAT SAMPAH
assets/particles/textures/smoke/Smoke_SpriteSheet_8x8.png


+ 17 - 3
contributing.md

@@ -1,6 +1,22 @@
 # Contributing to Babylon.js
 # Contributing to Babylon.js
 
 
-The foundation of **Babylon.js** is simplicity. 
+## Golden rules
+
+**Babylon.js** is built upon 3 golden rules:
+
+1. You cannot add code that will break backward compatibility
+2. You cannot add code that will slow down the rendering process
+3. You cannot add code that will make things complex to use
+
+### Backward compatibility
+
+The first golden rule is a really important one because we want our users to trust Babylon.js. And when we need to introduce something that will break backward compatibility, we know that it will imply more work for our customers to switch to a new version. So even if something could be simpler to do by breaking the backward compatibility, we will not do it (exceptions may apply of course if there is a problem with performance or if this is related to a bug).
+
+### Performance
+
+Babylon.js is a 3D rendering engine. So every piece of code has to be scrutinized to look for potential bottlenecks or slow downs. Ultimately the goal is to render more with less resources.
+
+### Simplicity
 
 
 A developer should be able to quickly and easily learn to use the API. 
 A developer should be able to quickly and easily learn to use the API. 
 
 
@@ -8,8 +24,6 @@ Simplicity and a low barrier to entry are must-have features of every API. If yo
 
 
 You can always add to an API, you cannot ever remove anything from one. If the design does not feel right, and you ship it anyway, you are likely to regret having done so.
 You can always add to an API, you cannot ever remove anything from one. If the design does not feel right, and you ship it anyway, you are likely to regret having done so.
 
 
-That's why many of the guidelines of this document are obvious and serve only one purpose: Simplicity.
-
 ## Forum and Github issues
 ## Forum and Github issues
 
 
 Since the very beginning, Babylon.js relies on a great forum and a tremendous community: http://www.html5gamedevs.com/forum/16-babylonjs/.
 Since the very beginning, Babylon.js relies on a great forum and a tremendous community: http://www.html5gamedevs.com/forum/16-babylonjs/.

File diff ditekan karena terlalu besar
+ 9559 - 7245
dist/preview release/babylon.d.ts


File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/babylon.js


File diff ditekan karena terlalu besar
+ 3118 - 1251
dist/preview release/babylon.max.js


File diff ditekan karena terlalu besar
+ 3118 - 1251
dist/preview release/babylon.no-module.max.js


File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/babylon.worker.js


File diff ditekan karena terlalu besar
+ 3118 - 1251
dist/preview release/es6.js


+ 1 - 1
dist/preview release/glTF2Interface/package.json

@@ -1,7 +1,7 @@
 {
 {
     "name": "babylonjs-gltf2interface",
     "name": "babylonjs-gltf2interface",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
-    "version": "3.3.0-beta.5",
+    "version": "3.3.0-rc.0",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js.map


+ 1 - 1
dist/preview release/gui/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-gui",
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "3.3.0-beta.5",
+    "version": "3.3.0-rc.0",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js.map


+ 1 - 1
dist/preview release/inspector/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-inspector",
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
     "description": "The Babylon.js inspector.",
-    "version": "3.3.0-beta.5",
+    "version": "3.3.0-rc.0",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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

@@ -351,7 +351,7 @@ declare module BABYLON {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2 {
+declare module BABYLON.GLTF2.Loader {
     /**
     /**
      * Loader interface with an index field.
      * Loader interface with an index field.
      */
      */
@@ -364,7 +364,7 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAccessor extends IAccessor, IArrayItem {
+    interface IAccessor extends GLTF2.IAccessor, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
         /** @hidden */
@@ -373,10 +373,10 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAnimationChannel extends IAnimationChannel, IArrayItem {
+    interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {
     }
     }
     /** @hidden */
     /** @hidden */
-    interface _ILoaderAnimationSamplerData {
+    interface _IAnimationSamplerData {
         input: Float32Array;
         input: Float32Array;
         interpolation: AnimationSamplerInterpolation;
         interpolation: AnimationSamplerInterpolation;
         output: Float32Array;
         output: Float32Array;
@@ -384,30 +384,30 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAnimationSampler extends IAnimationSampler, IArrayItem {
+    interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {
         /** @hidden */
         /** @hidden */
-        _data?: Promise<_ILoaderAnimationSamplerData>;
+        _data?: Promise<_IAnimationSamplerData>;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAnimation extends IAnimation, IArrayItem {
-        channels: ILoaderAnimationChannel[];
-        samplers: ILoaderAnimationSampler[];
+    interface IAnimation extends GLTF2.IAnimation, IArrayItem {
+        channels: IAnimationChannel[];
+        samplers: IAnimationSampler[];
         /** @hidden */
         /** @hidden */
         _babylonAnimationGroup?: AnimationGroup;
         _babylonAnimationGroup?: AnimationGroup;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderBuffer extends IBuffer, IArrayItem {
+    interface IBuffer extends GLTF2.IBuffer, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderBufferView extends IBufferView, IArrayItem {
+    interface IBufferView extends GLTF2.IBufferView, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
         /** @hidden */
@@ -416,40 +416,40 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderCamera extends ICamera, IArrayItem {
+    interface ICamera extends GLTF2.ICamera, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderImage extends IImage, IArrayItem {
+    interface IImage extends GLTF2.IImage, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterialNormalTextureInfo extends IMaterialNormalTextureInfo, ILoaderTextureInfo {
+    interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterialOcclusionTextureInfo extends IMaterialOcclusionTextureInfo, ILoaderTextureInfo {
+    interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterialPbrMetallicRoughness extends IMaterialPbrMetallicRoughness {
-        baseColorTexture?: ILoaderTextureInfo;
-        metallicRoughnessTexture?: ILoaderTextureInfo;
+    interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {
+        baseColorTexture?: ITextureInfo;
+        metallicRoughnessTexture?: ITextureInfo;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterial extends IMaterial, IArrayItem {
-        pbrMetallicRoughness?: ILoaderMaterialPbrMetallicRoughness;
-        normalTexture?: ILoaderMaterialNormalTextureInfo;
-        occlusionTexture?: ILoaderMaterialOcclusionTextureInfo;
-        emissiveTexture?: ILoaderTextureInfo;
+    interface IMaterial extends GLTF2.IMaterial, IArrayItem {
+        pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
+        normalTexture?: IMaterialNormalTextureInfo;
+        occlusionTexture?: IMaterialOcclusionTextureInfo;
+        emissiveTexture?: ITextureInfo;
         /** @hidden */
         /** @hidden */
         _babylonData?: {
         _babylonData?: {
             [drawMode: number]: {
             [drawMode: number]: {
@@ -462,22 +462,22 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMesh extends IMesh, IArrayItem {
-        primitives: ILoaderMeshPrimitive[];
+    interface IMesh extends GLTF2.IMesh, IArrayItem {
+        primitives: IMeshPrimitive[];
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMeshPrimitive extends IMeshPrimitive, IArrayItem {
+    interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderNode extends INode, IArrayItem {
+    interface INode extends GLTF2.INode, IArrayItem {
         /**
         /**
          * The parent glTF node.
          * The parent glTF node.
          */
          */
-        parent?: ILoaderNode;
+        parent?: INode;
         /** @hidden */
         /** @hidden */
         _babylonMesh?: Mesh;
         _babylonMesh?: Mesh;
         /** @hidden */
         /** @hidden */
@@ -488,7 +488,7 @@ declare module BABYLON.GLTF2 {
         _numMorphTargets?: number;
         _numMorphTargets?: number;
     }
     }
     /** @hidden */
     /** @hidden */
-    interface _ILoaderSamplerData {
+    interface _ISamplerData {
         noMipMaps: boolean;
         noMipMaps: boolean;
         samplingMode: number;
         samplingMode: number;
         wrapU: number;
         wrapU: number;
@@ -497,19 +497,19 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderSampler extends ISampler, IArrayItem {
+    interface ISampler extends GLTF2.ISampler, IArrayItem {
         /** @hidden */
         /** @hidden */
-        _data?: _ILoaderSamplerData;
+        _data?: _ISamplerData;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderScene extends IScene, IArrayItem {
+    interface IScene extends GLTF2.IScene, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderSkin extends ISkin, IArrayItem {
+    interface ISkin extends GLTF2.ISkin, IArrayItem {
         /** @hidden */
         /** @hidden */
         _babylonSkeleton?: Skeleton;
         _babylonSkeleton?: Skeleton;
         /** @hidden */
         /** @hidden */
@@ -518,30 +518,30 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderTexture extends ITexture, IArrayItem {
+    interface ITexture extends GLTF2.ITexture, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderTextureInfo extends ITextureInfo {
+    interface ITextureInfo extends GLTF2.ITextureInfo {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderGLTF extends IGLTF {
-        accessors?: ILoaderAccessor[];
-        animations?: ILoaderAnimation[];
-        buffers?: ILoaderBuffer[];
-        bufferViews?: ILoaderBufferView[];
-        cameras?: ILoaderCamera[];
-        images?: ILoaderImage[];
-        materials?: ILoaderMaterial[];
-        meshes?: ILoaderMesh[];
-        nodes?: ILoaderNode[];
-        samplers?: ILoaderSampler[];
-        scenes?: ILoaderScene[];
-        skins?: ILoaderSkin[];
-        textures?: ILoaderTexture[];
+    interface IGLTF extends GLTF2.IGLTF {
+        accessors?: IAccessor[];
+        animations?: IAnimation[];
+        buffers?: IBuffer[];
+        bufferViews?: IBufferView[];
+        cameras?: ICamera[];
+        images?: IImage[];
+        materials?: IMaterial[];
+        meshes?: IMesh[];
+        nodes?: INode[];
+        samplers?: ISampler[];
+        scenes?: IScene[];
+        skins?: ISkin[];
+        textures?: ITexture[];
     }
     }
 }
 }
 
 
@@ -566,14 +566,14 @@ declare module BABYLON.GLTF2 {
          * Assign an `index` field to each item of the given array.
          * Assign an `index` field to each item of the given array.
          * @param array The array of items
          * @param array The array of items
          */
          */
-        static Assign(array?: IArrayItem[]): void;
+        static Assign(array?: Loader.IArrayItem[]): void;
     }
     }
     /**
     /**
      * The glTF 2.0 loader
      * The glTF 2.0 loader
      */
      */
     class GLTFLoader implements IGLTFLoader {
     class GLTFLoader implements IGLTFLoader {
         /** The glTF object parsed from the JSON. */
         /** The glTF object parsed from the JSON. */
-        gltf: ILoaderGLTF;
+        gltf: Loader.IGLTF;
         /** The Babylon scene when loading the asset. */
         /** The Babylon scene when loading the asset. */
         babylonScene: Scene;
         babylonScene: Scene;
         /** @hidden */
         /** @hidden */
@@ -634,7 +634,7 @@ declare module BABYLON.GLTF2 {
          * @param scene The glTF scene property
          * @param scene The glTF scene property
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        loadSceneAsync(context: string, scene: ILoaderScene): Promise<void>;
+        loadSceneAsync(context: string, scene: Loader.IScene): Promise<void>;
         private _forEachPrimitive;
         private _forEachPrimitive;
         private _getMeshes;
         private _getMeshes;
         private _getSkeletons;
         private _getSkeletons;
@@ -647,7 +647,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
          */
          */
-        loadNodeAsync(context: string, node: ILoaderNode, assign?: (babylonMesh: Mesh) => void): Promise<Mesh>;
+        loadNodeAsync(context: string, node: Loader.INode, assign?: (babylonMesh: Mesh) => void): Promise<Mesh>;
         private _loadMeshAsync;
         private _loadMeshAsync;
         private _loadMeshPrimitiveAsync;
         private _loadMeshPrimitiveAsync;
         private _loadVertexDataAsync;
         private _loadVertexDataAsync;
@@ -668,7 +668,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete
          */
          */
-        loadCameraAsync(context: string, camera: ILoaderCamera, assign?: (babylonCamera: Camera) => void): Promise<Camera>;
+        loadCameraAsync(context: string, camera: Loader.ICamera, assign?: (babylonCamera: Camera) => void): Promise<Camera>;
         private _loadAnimationsAsync;
         private _loadAnimationsAsync;
         /**
         /**
          * Loads a glTF animation.
          * Loads a glTF animation.
@@ -676,7 +676,7 @@ declare module BABYLON.GLTF2 {
          * @param animation The glTF animation property
          * @param animation The glTF animation property
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete
          */
          */
-        loadAnimationAsync(context: string, animation: ILoaderAnimation): Promise<AnimationGroup>;
+        loadAnimationAsync(context: string, animation: Loader.IAnimation): Promise<AnimationGroup>;
         private _loadAnimationChannelAsync;
         private _loadAnimationChannelAsync;
         private _loadAnimationSamplerAsync;
         private _loadAnimationSamplerAsync;
         private _loadBufferAsync;
         private _loadBufferAsync;
@@ -686,14 +686,14 @@ declare module BABYLON.GLTF2 {
          * @param bufferView The glTF buffer view property
          * @param bufferView The glTF buffer view property
          * @returns A promise that resolves with the loaded data when the load is complete
          * @returns A promise that resolves with the loaded data when the load is complete
          */
          */
-        loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView>;
+        loadBufferViewAsync(context: string, bufferView: Loader.IBufferView): Promise<ArrayBufferView>;
         private _loadIndicesAccessorAsync;
         private _loadIndicesAccessorAsync;
         private _loadFloatAccessorAsync;
         private _loadFloatAccessorAsync;
         private _loadVertexBufferViewAsync;
         private _loadVertexBufferViewAsync;
         private _loadVertexAccessorAsync;
         private _loadVertexAccessorAsync;
         private _loadMaterialMetallicRoughnessPropertiesAsync;
         private _loadMaterialMetallicRoughnessPropertiesAsync;
         /** @hidden */
         /** @hidden */
-        _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign?: (babylonMaterial: Material) => void): Promise<Material>;
+        _loadMaterialAsync(context: string, material: Loader.IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign?: (babylonMaterial: Material) => void): Promise<Material>;
         private _createDefaultMaterial;
         private _createDefaultMaterial;
         /**
         /**
          * Creates a Babylon material from a glTF material.
          * Creates a Babylon material from a glTF material.
@@ -702,7 +702,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonDrawMode The draw mode for the Babylon material
          * @param babylonDrawMode The draw mode for the Babylon material
          * @returns The Babylon material
          * @returns The Babylon material
          */
          */
-        createMaterial(context: string, material: ILoaderMaterial, babylonDrawMode: number): Material;
+        createMaterial(context: string, material: Loader.IMaterial, babylonDrawMode: number): Material;
         /**
         /**
          * Loads properties from a glTF material into a Babylon material.
          * Loads properties from a glTF material into a Babylon material.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -710,7 +710,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Promise<void>;
+        loadMaterialPropertiesAsync(context: string, material: Loader.IMaterial, babylonMaterial: Material): Promise<void>;
         /**
         /**
          * Loads the normal, occlusion, and emissive properties from a glTF material into a Babylon material.
          * Loads the normal, occlusion, and emissive properties from a glTF material into a Babylon material.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -718,7 +718,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Promise<void>;
+        loadMaterialBasePropertiesAsync(context: string, material: Loader.IMaterial, babylonMaterial: Material): Promise<void>;
         /**
         /**
          * Loads the alpha properties from a glTF material into a Babylon material.
          * Loads the alpha properties from a glTF material into a Babylon material.
          * Must be called after the setting the albedo texture of the Babylon material when the material has an albedo texture.
          * Must be called after the setting the albedo texture of the Babylon material when the material has an albedo texture.
@@ -726,7 +726,7 @@ declare module BABYLON.GLTF2 {
          * @param material The glTF material property
          * @param material The glTF material property
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          */
          */
-        loadMaterialAlphaProperties(context: string, material: ILoaderMaterial, babylonMaterial: Material): void;
+        loadMaterialAlphaProperties(context: string, material: Loader.IMaterial, babylonMaterial: Material): void;
         /**
         /**
          * Loads a glTF texture info.
          * Loads a glTF texture info.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -734,7 +734,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete
          */
          */
-        loadTextureInfoAsync(context: string, textureInfo: ILoaderTextureInfo, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
+        loadTextureInfoAsync(context: string, textureInfo: Loader.ITextureInfo, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
         private _loadTextureAsync;
         private _loadTextureAsync;
         private _loadSampler;
         private _loadSampler;
         /**
         /**
@@ -743,7 +743,7 @@ declare module BABYLON.GLTF2 {
          * @param image The glTF image property
          * @param image The glTF image property
          * @returns A promise that resolves with the loaded data when the load is complete
          * @returns A promise that resolves with the loaded data when the load is complete
          */
          */
-        loadImageAsync(context: string, image: ILoaderImage): Promise<ArrayBufferView>;
+        loadImageAsync(context: string, image: Loader.IImage): Promise<ArrayBufferView>;
         /**
         /**
          * Loads a glTF uri.
          * Loads a glTF uri.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -839,7 +839,7 @@ declare module BABYLON.GLTF2 {
          * @param scene The glTF scene property
          * @param scene The glTF scene property
          * @returns A promise that resolves when the load is complete or null if not handled
          * @returns A promise that resolves when the load is complete or null if not handled
          */
          */
-        loadSceneAsync?(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync?(context: string, scene: Loader.IScene): Nullable<Promise<void>>;
         /**
         /**
          * Define this method to modify the default behavior when loading nodes.
          * Define this method to modify the default behavior when loading nodes.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -847,7 +847,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete or null if not handled
          */
          */
-        loadNodeAsync?(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync?(context: string, node: Loader.INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
         /**
         /**
          * Define this method to modify the default behavior when loading cameras.
          * Define this method to modify the default behavior when loading cameras.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -855,14 +855,14 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled
          */
          */
-        loadCameraAsync?(context: string, camera: ILoaderCamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
+        loadCameraAsync?(context: string, camera: Loader.ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
         /**
         /**
          * @hidden Define this method to modify the default behavior when loading vertex data for mesh primitives.
          * @hidden Define this method to modify the default behavior when loading vertex data for mesh primitives.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
          * @param primitive The glTF mesh primitive property
          * @param primitive The glTF mesh primitive property
          * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled
          */
          */
-        _loadVertexDataAsync?(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
+        _loadVertexDataAsync?(context: string, primitive: Loader.IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
         /**
         /**
          * @hidden Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
          * @hidden Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -870,7 +870,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled
          */
          */
-        _loadMaterialAsync?(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
+        _loadMaterialAsync?(context: string, material: Loader.IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
         /**
         /**
          * Define this method to modify the default behavior when creating materials.
          * Define this method to modify the default behavior when creating materials.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -878,7 +878,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonDrawMode The draw mode for the Babylon material
          * @param babylonDrawMode The draw mode for the Babylon material
          * @returns The Babylon material or null if not handled
          * @returns The Babylon material or null if not handled
          */
          */
-        createMaterial?(context: string, material: ILoaderMaterial, babylonDrawMode: number): Nullable<Material>;
+        createMaterial?(context: string, material: Loader.IMaterial, babylonDrawMode: number): Nullable<Material>;
         /**
         /**
          * Define this method to modify the default behavior when loading material properties.
          * Define this method to modify the default behavior when loading material properties.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -886,7 +886,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete or null if not handled
          * @returns A promise that resolves when the load is complete or null if not handled
          */
          */
-        loadMaterialPropertiesAsync?(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync?(context: string, material: Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
         /**
         /**
          * Define this method to modify the default behavior when loading texture infos.
          * Define this method to modify the default behavior when loading texture infos.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -894,14 +894,14 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
          */
          */
-        loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
+        loadTextureInfoAsync?(context: string, textureInfo: Loader.ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
         /**
         /**
          * Define this method to modify the default behavior when loading animations.
          * Define this method to modify the default behavior when loading animations.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
          * @param animation The glTF animation property
          * @param animation The glTF animation property
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled
          */
          */
-        loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
+        loadAnimationAsync?(context: string, animation: Loader.IAnimation): Nullable<Promise<AnimationGroup>>;
         /**
         /**
          * Define this method to modify the default behavior when loading uris.
          * Define this method to modify the default behavior when loading uris.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -914,11 +914,11 @@ declare module BABYLON.GLTF2 {
 /**
 /**
  * Defines the module for the built-in glTF 2.0 loader extensions.
  * Defines the module for the built-in glTF 2.0 loader extensions.
  */
  */
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
      */
      */
@@ -957,9 +957,9 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onReady(): void;
         onReady(): void;
         /** @hidden */
         /** @hidden */
-        loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
         /** @hidden */
         /** @hidden */
-        _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
+        _loadMaterialAsync(context: string, material: IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
         /** @hidden */
         /** @hidden */
         _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
         _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
         /**
         /**
@@ -971,7 +971,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /** @hidden */
     /** @hidden */
     class MSFT_minecraftMesh implements IGLTFLoaderExtension {
     class MSFT_minecraftMesh implements IGLTFLoaderExtension {
         readonly name: string;
         readonly name: string;
@@ -979,12 +979,12 @@ declare module BABYLON.GLTF2.Extensions {
         private _loader;
         private _loader;
         constructor(loader: GLTFLoader);
         constructor(loader: GLTFLoader);
         dispose(): void;
         dispose(): void;
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /** @hidden */
     /** @hidden */
     class MSFT_sRGBFactors implements IGLTFLoaderExtension {
     class MSFT_sRGBFactors implements IGLTFLoaderExtension {
         readonly name: string;
         readonly name: string;
@@ -992,12 +992,12 @@ declare module BABYLON.GLTF2.Extensions {
         private _loader;
         private _loader;
         constructor(loader: GLTFLoader);
         constructor(loader: GLTFLoader);
         dispose(): void;
         dispose(): void;
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
      * [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
      */
      */
@@ -1016,11 +1016,11 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onLoading(): void;
         onLoading(): void;
         /** @hidden */
         /** @hidden */
-        loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
         /** @hidden */
         /** @hidden */
-        loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
         /** @hidden */
         /** @hidden */
-        loadAnimationAsync(context: string, animation: ILoaderAnimation): Nullable<Promise<AnimationGroup>>;
+        loadAnimationAsync(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
         private _loadClipAsync;
         private _loadClipAsync;
         private _loadEmitterAsync;
         private _loadEmitterAsync;
         private _getEventAction;
         private _getEventAction;
@@ -1029,7 +1029,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression)
      */
      */
@@ -1045,12 +1045,12 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         dispose(): void;
         dispose(): void;
         /** @hidden */
         /** @hidden */
-        _loadVertexDataAsync(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
+        _loadVertexDataAsync(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
      */
      */
@@ -1065,13 +1065,13 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         dispose(): void;
         dispose(): void;
         /** @hidden */
         /** @hidden */
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
         private _loadSpecularGlossinessPropertiesAsync;
         private _loadSpecularGlossinessPropertiesAsync;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit)
      */
      */
@@ -1086,13 +1086,13 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         dispose(): void;
         dispose(): void;
         /** @hidden */
         /** @hidden */
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
         private _loadUnlitPropertiesAsync;
         private _loadUnlitPropertiesAsync;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
      * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
      */
      */
@@ -1110,14 +1110,14 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onLoading(): void;
         onLoading(): void;
         /** @hidden */
         /** @hidden */
-        loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
-     * [Specification](https://github.com/AltspaceVR/glTF/blob/avr-sampler-offset-tile/extensions/2.0/Khronos/KHR_texture_transform/README.md) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md)
      */
      */
     class KHR_texture_transform implements IGLTFLoaderExtension {
     class KHR_texture_transform implements IGLTFLoaderExtension {
         /** The name of this extension. */
         /** The name of this extension. */
@@ -1135,7 +1135,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
      * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
      */
      */
@@ -1153,7 +1153,7 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onLoading(): void;
         onLoading(): void;
         /** @hidden */
         /** @hidden */
-        loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
         private _loadLightAsync;
         private _loadLightAsync;
     }
     }
 }
 }

File diff ditekan karena terlalu besar
+ 945 - 915
dist/preview release/loaders/babylon.glTF2FileLoader.js


File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


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

@@ -913,7 +913,7 @@ declare module BABYLON.GLTF1 {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2 {
+declare module BABYLON.GLTF2.Loader {
     /**
     /**
      * Loader interface with an index field.
      * Loader interface with an index field.
      */
      */
@@ -926,7 +926,7 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAccessor extends IAccessor, IArrayItem {
+    interface IAccessor extends GLTF2.IAccessor, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
         /** @hidden */
@@ -935,10 +935,10 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAnimationChannel extends IAnimationChannel, IArrayItem {
+    interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {
     }
     }
     /** @hidden */
     /** @hidden */
-    interface _ILoaderAnimationSamplerData {
+    interface _IAnimationSamplerData {
         input: Float32Array;
         input: Float32Array;
         interpolation: AnimationSamplerInterpolation;
         interpolation: AnimationSamplerInterpolation;
         output: Float32Array;
         output: Float32Array;
@@ -946,30 +946,30 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAnimationSampler extends IAnimationSampler, IArrayItem {
+    interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {
         /** @hidden */
         /** @hidden */
-        _data?: Promise<_ILoaderAnimationSamplerData>;
+        _data?: Promise<_IAnimationSamplerData>;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAnimation extends IAnimation, IArrayItem {
-        channels: ILoaderAnimationChannel[];
-        samplers: ILoaderAnimationSampler[];
+    interface IAnimation extends GLTF2.IAnimation, IArrayItem {
+        channels: IAnimationChannel[];
+        samplers: IAnimationSampler[];
         /** @hidden */
         /** @hidden */
         _babylonAnimationGroup?: AnimationGroup;
         _babylonAnimationGroup?: AnimationGroup;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderBuffer extends IBuffer, IArrayItem {
+    interface IBuffer extends GLTF2.IBuffer, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderBufferView extends IBufferView, IArrayItem {
+    interface IBufferView extends GLTF2.IBufferView, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
         /** @hidden */
@@ -978,40 +978,40 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderCamera extends ICamera, IArrayItem {
+    interface ICamera extends GLTF2.ICamera, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderImage extends IImage, IArrayItem {
+    interface IImage extends GLTF2.IImage, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterialNormalTextureInfo extends IMaterialNormalTextureInfo, ILoaderTextureInfo {
+    interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterialOcclusionTextureInfo extends IMaterialOcclusionTextureInfo, ILoaderTextureInfo {
+    interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterialPbrMetallicRoughness extends IMaterialPbrMetallicRoughness {
-        baseColorTexture?: ILoaderTextureInfo;
-        metallicRoughnessTexture?: ILoaderTextureInfo;
+    interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {
+        baseColorTexture?: ITextureInfo;
+        metallicRoughnessTexture?: ITextureInfo;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterial extends IMaterial, IArrayItem {
-        pbrMetallicRoughness?: ILoaderMaterialPbrMetallicRoughness;
-        normalTexture?: ILoaderMaterialNormalTextureInfo;
-        occlusionTexture?: ILoaderMaterialOcclusionTextureInfo;
-        emissiveTexture?: ILoaderTextureInfo;
+    interface IMaterial extends GLTF2.IMaterial, IArrayItem {
+        pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
+        normalTexture?: IMaterialNormalTextureInfo;
+        occlusionTexture?: IMaterialOcclusionTextureInfo;
+        emissiveTexture?: ITextureInfo;
         /** @hidden */
         /** @hidden */
         _babylonData?: {
         _babylonData?: {
             [drawMode: number]: {
             [drawMode: number]: {
@@ -1024,22 +1024,22 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMesh extends IMesh, IArrayItem {
-        primitives: ILoaderMeshPrimitive[];
+    interface IMesh extends GLTF2.IMesh, IArrayItem {
+        primitives: IMeshPrimitive[];
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMeshPrimitive extends IMeshPrimitive, IArrayItem {
+    interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderNode extends INode, IArrayItem {
+    interface INode extends GLTF2.INode, IArrayItem {
         /**
         /**
          * The parent glTF node.
          * The parent glTF node.
          */
          */
-        parent?: ILoaderNode;
+        parent?: INode;
         /** @hidden */
         /** @hidden */
         _babylonMesh?: Mesh;
         _babylonMesh?: Mesh;
         /** @hidden */
         /** @hidden */
@@ -1050,7 +1050,7 @@ declare module BABYLON.GLTF2 {
         _numMorphTargets?: number;
         _numMorphTargets?: number;
     }
     }
     /** @hidden */
     /** @hidden */
-    interface _ILoaderSamplerData {
+    interface _ISamplerData {
         noMipMaps: boolean;
         noMipMaps: boolean;
         samplingMode: number;
         samplingMode: number;
         wrapU: number;
         wrapU: number;
@@ -1059,19 +1059,19 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderSampler extends ISampler, IArrayItem {
+    interface ISampler extends GLTF2.ISampler, IArrayItem {
         /** @hidden */
         /** @hidden */
-        _data?: _ILoaderSamplerData;
+        _data?: _ISamplerData;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderScene extends IScene, IArrayItem {
+    interface IScene extends GLTF2.IScene, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderSkin extends ISkin, IArrayItem {
+    interface ISkin extends GLTF2.ISkin, IArrayItem {
         /** @hidden */
         /** @hidden */
         _babylonSkeleton?: Skeleton;
         _babylonSkeleton?: Skeleton;
         /** @hidden */
         /** @hidden */
@@ -1080,30 +1080,30 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderTexture extends ITexture, IArrayItem {
+    interface ITexture extends GLTF2.ITexture, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderTextureInfo extends ITextureInfo {
+    interface ITextureInfo extends GLTF2.ITextureInfo {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderGLTF extends IGLTF {
-        accessors?: ILoaderAccessor[];
-        animations?: ILoaderAnimation[];
-        buffers?: ILoaderBuffer[];
-        bufferViews?: ILoaderBufferView[];
-        cameras?: ILoaderCamera[];
-        images?: ILoaderImage[];
-        materials?: ILoaderMaterial[];
-        meshes?: ILoaderMesh[];
-        nodes?: ILoaderNode[];
-        samplers?: ILoaderSampler[];
-        scenes?: ILoaderScene[];
-        skins?: ILoaderSkin[];
-        textures?: ILoaderTexture[];
+    interface IGLTF extends GLTF2.IGLTF {
+        accessors?: IAccessor[];
+        animations?: IAnimation[];
+        buffers?: IBuffer[];
+        bufferViews?: IBufferView[];
+        cameras?: ICamera[];
+        images?: IImage[];
+        materials?: IMaterial[];
+        meshes?: IMesh[];
+        nodes?: INode[];
+        samplers?: ISampler[];
+        scenes?: IScene[];
+        skins?: ISkin[];
+        textures?: ITexture[];
     }
     }
 }
 }
 
 
@@ -1128,14 +1128,14 @@ declare module BABYLON.GLTF2 {
          * Assign an `index` field to each item of the given array.
          * Assign an `index` field to each item of the given array.
          * @param array The array of items
          * @param array The array of items
          */
          */
-        static Assign(array?: IArrayItem[]): void;
+        static Assign(array?: Loader.IArrayItem[]): void;
     }
     }
     /**
     /**
      * The glTF 2.0 loader
      * The glTF 2.0 loader
      */
      */
     class GLTFLoader implements IGLTFLoader {
     class GLTFLoader implements IGLTFLoader {
         /** The glTF object parsed from the JSON. */
         /** The glTF object parsed from the JSON. */
-        gltf: ILoaderGLTF;
+        gltf: Loader.IGLTF;
         /** The Babylon scene when loading the asset. */
         /** The Babylon scene when loading the asset. */
         babylonScene: Scene;
         babylonScene: Scene;
         /** @hidden */
         /** @hidden */
@@ -1196,7 +1196,7 @@ declare module BABYLON.GLTF2 {
          * @param scene The glTF scene property
          * @param scene The glTF scene property
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        loadSceneAsync(context: string, scene: ILoaderScene): Promise<void>;
+        loadSceneAsync(context: string, scene: Loader.IScene): Promise<void>;
         private _forEachPrimitive;
         private _forEachPrimitive;
         private _getMeshes;
         private _getMeshes;
         private _getSkeletons;
         private _getSkeletons;
@@ -1209,7 +1209,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
          */
          */
-        loadNodeAsync(context: string, node: ILoaderNode, assign?: (babylonMesh: Mesh) => void): Promise<Mesh>;
+        loadNodeAsync(context: string, node: Loader.INode, assign?: (babylonMesh: Mesh) => void): Promise<Mesh>;
         private _loadMeshAsync;
         private _loadMeshAsync;
         private _loadMeshPrimitiveAsync;
         private _loadMeshPrimitiveAsync;
         private _loadVertexDataAsync;
         private _loadVertexDataAsync;
@@ -1230,7 +1230,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete
          */
          */
-        loadCameraAsync(context: string, camera: ILoaderCamera, assign?: (babylonCamera: Camera) => void): Promise<Camera>;
+        loadCameraAsync(context: string, camera: Loader.ICamera, assign?: (babylonCamera: Camera) => void): Promise<Camera>;
         private _loadAnimationsAsync;
         private _loadAnimationsAsync;
         /**
         /**
          * Loads a glTF animation.
          * Loads a glTF animation.
@@ -1238,7 +1238,7 @@ declare module BABYLON.GLTF2 {
          * @param animation The glTF animation property
          * @param animation The glTF animation property
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete
          */
          */
-        loadAnimationAsync(context: string, animation: ILoaderAnimation): Promise<AnimationGroup>;
+        loadAnimationAsync(context: string, animation: Loader.IAnimation): Promise<AnimationGroup>;
         private _loadAnimationChannelAsync;
         private _loadAnimationChannelAsync;
         private _loadAnimationSamplerAsync;
         private _loadAnimationSamplerAsync;
         private _loadBufferAsync;
         private _loadBufferAsync;
@@ -1248,14 +1248,14 @@ declare module BABYLON.GLTF2 {
          * @param bufferView The glTF buffer view property
          * @param bufferView The glTF buffer view property
          * @returns A promise that resolves with the loaded data when the load is complete
          * @returns A promise that resolves with the loaded data when the load is complete
          */
          */
-        loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView>;
+        loadBufferViewAsync(context: string, bufferView: Loader.IBufferView): Promise<ArrayBufferView>;
         private _loadIndicesAccessorAsync;
         private _loadIndicesAccessorAsync;
         private _loadFloatAccessorAsync;
         private _loadFloatAccessorAsync;
         private _loadVertexBufferViewAsync;
         private _loadVertexBufferViewAsync;
         private _loadVertexAccessorAsync;
         private _loadVertexAccessorAsync;
         private _loadMaterialMetallicRoughnessPropertiesAsync;
         private _loadMaterialMetallicRoughnessPropertiesAsync;
         /** @hidden */
         /** @hidden */
-        _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign?: (babylonMaterial: Material) => void): Promise<Material>;
+        _loadMaterialAsync(context: string, material: Loader.IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign?: (babylonMaterial: Material) => void): Promise<Material>;
         private _createDefaultMaterial;
         private _createDefaultMaterial;
         /**
         /**
          * Creates a Babylon material from a glTF material.
          * Creates a Babylon material from a glTF material.
@@ -1264,7 +1264,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonDrawMode The draw mode for the Babylon material
          * @param babylonDrawMode The draw mode for the Babylon material
          * @returns The Babylon material
          * @returns The Babylon material
          */
          */
-        createMaterial(context: string, material: ILoaderMaterial, babylonDrawMode: number): Material;
+        createMaterial(context: string, material: Loader.IMaterial, babylonDrawMode: number): Material;
         /**
         /**
          * Loads properties from a glTF material into a Babylon material.
          * Loads properties from a glTF material into a Babylon material.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1272,7 +1272,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Promise<void>;
+        loadMaterialPropertiesAsync(context: string, material: Loader.IMaterial, babylonMaterial: Material): Promise<void>;
         /**
         /**
          * Loads the normal, occlusion, and emissive properties from a glTF material into a Babylon material.
          * Loads the normal, occlusion, and emissive properties from a glTF material into a Babylon material.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1280,7 +1280,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Promise<void>;
+        loadMaterialBasePropertiesAsync(context: string, material: Loader.IMaterial, babylonMaterial: Material): Promise<void>;
         /**
         /**
          * Loads the alpha properties from a glTF material into a Babylon material.
          * Loads the alpha properties from a glTF material into a Babylon material.
          * Must be called after the setting the albedo texture of the Babylon material when the material has an albedo texture.
          * Must be called after the setting the albedo texture of the Babylon material when the material has an albedo texture.
@@ -1288,7 +1288,7 @@ declare module BABYLON.GLTF2 {
          * @param material The glTF material property
          * @param material The glTF material property
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          */
          */
-        loadMaterialAlphaProperties(context: string, material: ILoaderMaterial, babylonMaterial: Material): void;
+        loadMaterialAlphaProperties(context: string, material: Loader.IMaterial, babylonMaterial: Material): void;
         /**
         /**
          * Loads a glTF texture info.
          * Loads a glTF texture info.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1296,7 +1296,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete
          */
          */
-        loadTextureInfoAsync(context: string, textureInfo: ILoaderTextureInfo, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
+        loadTextureInfoAsync(context: string, textureInfo: Loader.ITextureInfo, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
         private _loadTextureAsync;
         private _loadTextureAsync;
         private _loadSampler;
         private _loadSampler;
         /**
         /**
@@ -1305,7 +1305,7 @@ declare module BABYLON.GLTF2 {
          * @param image The glTF image property
          * @param image The glTF image property
          * @returns A promise that resolves with the loaded data when the load is complete
          * @returns A promise that resolves with the loaded data when the load is complete
          */
          */
-        loadImageAsync(context: string, image: ILoaderImage): Promise<ArrayBufferView>;
+        loadImageAsync(context: string, image: Loader.IImage): Promise<ArrayBufferView>;
         /**
         /**
          * Loads a glTF uri.
          * Loads a glTF uri.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1401,7 +1401,7 @@ declare module BABYLON.GLTF2 {
          * @param scene The glTF scene property
          * @param scene The glTF scene property
          * @returns A promise that resolves when the load is complete or null if not handled
          * @returns A promise that resolves when the load is complete or null if not handled
          */
          */
-        loadSceneAsync?(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync?(context: string, scene: Loader.IScene): Nullable<Promise<void>>;
         /**
         /**
          * Define this method to modify the default behavior when loading nodes.
          * Define this method to modify the default behavior when loading nodes.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1409,7 +1409,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete or null if not handled
          */
          */
-        loadNodeAsync?(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync?(context: string, node: Loader.INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
         /**
         /**
          * Define this method to modify the default behavior when loading cameras.
          * Define this method to modify the default behavior when loading cameras.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1417,14 +1417,14 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled
          */
          */
-        loadCameraAsync?(context: string, camera: ILoaderCamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
+        loadCameraAsync?(context: string, camera: Loader.ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
         /**
         /**
          * @hidden Define this method to modify the default behavior when loading vertex data for mesh primitives.
          * @hidden Define this method to modify the default behavior when loading vertex data for mesh primitives.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
          * @param primitive The glTF mesh primitive property
          * @param primitive The glTF mesh primitive property
          * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled
          */
          */
-        _loadVertexDataAsync?(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
+        _loadVertexDataAsync?(context: string, primitive: Loader.IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
         /**
         /**
          * @hidden Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
          * @hidden Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1432,7 +1432,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled
          */
          */
-        _loadMaterialAsync?(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
+        _loadMaterialAsync?(context: string, material: Loader.IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
         /**
         /**
          * Define this method to modify the default behavior when creating materials.
          * Define this method to modify the default behavior when creating materials.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1440,7 +1440,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonDrawMode The draw mode for the Babylon material
          * @param babylonDrawMode The draw mode for the Babylon material
          * @returns The Babylon material or null if not handled
          * @returns The Babylon material or null if not handled
          */
          */
-        createMaterial?(context: string, material: ILoaderMaterial, babylonDrawMode: number): Nullable<Material>;
+        createMaterial?(context: string, material: Loader.IMaterial, babylonDrawMode: number): Nullable<Material>;
         /**
         /**
          * Define this method to modify the default behavior when loading material properties.
          * Define this method to modify the default behavior when loading material properties.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1448,7 +1448,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete or null if not handled
          * @returns A promise that resolves when the load is complete or null if not handled
          */
          */
-        loadMaterialPropertiesAsync?(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync?(context: string, material: Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
         /**
         /**
          * Define this method to modify the default behavior when loading texture infos.
          * Define this method to modify the default behavior when loading texture infos.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1456,14 +1456,14 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
          */
          */
-        loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
+        loadTextureInfoAsync?(context: string, textureInfo: Loader.ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
         /**
         /**
          * Define this method to modify the default behavior when loading animations.
          * Define this method to modify the default behavior when loading animations.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
          * @param animation The glTF animation property
          * @param animation The glTF animation property
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled
          */
          */
-        loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
+        loadAnimationAsync?(context: string, animation: Loader.IAnimation): Nullable<Promise<AnimationGroup>>;
         /**
         /**
          * Define this method to modify the default behavior when loading uris.
          * Define this method to modify the default behavior when loading uris.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1476,11 +1476,11 @@ declare module BABYLON.GLTF2 {
 /**
 /**
  * Defines the module for the built-in glTF 2.0 loader extensions.
  * Defines the module for the built-in glTF 2.0 loader extensions.
  */
  */
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
      */
      */
@@ -1519,9 +1519,9 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onReady(): void;
         onReady(): void;
         /** @hidden */
         /** @hidden */
-        loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
         /** @hidden */
         /** @hidden */
-        _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
+        _loadMaterialAsync(context: string, material: IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
         /** @hidden */
         /** @hidden */
         _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
         _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
         /**
         /**
@@ -1533,7 +1533,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /** @hidden */
     /** @hidden */
     class MSFT_minecraftMesh implements IGLTFLoaderExtension {
     class MSFT_minecraftMesh implements IGLTFLoaderExtension {
         readonly name: string;
         readonly name: string;
@@ -1541,12 +1541,12 @@ declare module BABYLON.GLTF2.Extensions {
         private _loader;
         private _loader;
         constructor(loader: GLTFLoader);
         constructor(loader: GLTFLoader);
         dispose(): void;
         dispose(): void;
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /** @hidden */
     /** @hidden */
     class MSFT_sRGBFactors implements IGLTFLoaderExtension {
     class MSFT_sRGBFactors implements IGLTFLoaderExtension {
         readonly name: string;
         readonly name: string;
@@ -1554,12 +1554,12 @@ declare module BABYLON.GLTF2.Extensions {
         private _loader;
         private _loader;
         constructor(loader: GLTFLoader);
         constructor(loader: GLTFLoader);
         dispose(): void;
         dispose(): void;
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
      * [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
      */
      */
@@ -1578,11 +1578,11 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onLoading(): void;
         onLoading(): void;
         /** @hidden */
         /** @hidden */
-        loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
         /** @hidden */
         /** @hidden */
-        loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
         /** @hidden */
         /** @hidden */
-        loadAnimationAsync(context: string, animation: ILoaderAnimation): Nullable<Promise<AnimationGroup>>;
+        loadAnimationAsync(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
         private _loadClipAsync;
         private _loadClipAsync;
         private _loadEmitterAsync;
         private _loadEmitterAsync;
         private _getEventAction;
         private _getEventAction;
@@ -1591,7 +1591,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression)
      */
      */
@@ -1607,12 +1607,12 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         dispose(): void;
         dispose(): void;
         /** @hidden */
         /** @hidden */
-        _loadVertexDataAsync(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
+        _loadVertexDataAsync(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
      */
      */
@@ -1627,13 +1627,13 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         dispose(): void;
         dispose(): void;
         /** @hidden */
         /** @hidden */
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
         private _loadSpecularGlossinessPropertiesAsync;
         private _loadSpecularGlossinessPropertiesAsync;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit)
      */
      */
@@ -1648,13 +1648,13 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         dispose(): void;
         dispose(): void;
         /** @hidden */
         /** @hidden */
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
         private _loadUnlitPropertiesAsync;
         private _loadUnlitPropertiesAsync;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
      * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
      */
      */
@@ -1672,14 +1672,14 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onLoading(): void;
         onLoading(): void;
         /** @hidden */
         /** @hidden */
-        loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
-     * [Specification](https://github.com/AltspaceVR/glTF/blob/avr-sampler-offset-tile/extensions/2.0/Khronos/KHR_texture_transform/README.md) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md)
      */
      */
     class KHR_texture_transform implements IGLTFLoaderExtension {
     class KHR_texture_transform implements IGLTFLoaderExtension {
         /** The name of this extension. */
         /** The name of this extension. */
@@ -1697,7 +1697,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
      * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
      */
      */
@@ -1715,7 +1715,7 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onLoading(): void;
         onLoading(): void;
         /** @hidden */
         /** @hidden */
-        loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
         private _loadLightAsync;
         private _loadLightAsync;
     }
     }
 }
 }

File diff ditekan karena terlalu besar
+ 945 - 915
dist/preview release/loaders/babylon.glTFFileLoader.js


File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.min.js


+ 96 - 96
dist/preview release/loaders/babylonjs.loaders.d.ts

@@ -1043,7 +1043,7 @@ declare module BABYLON.GLTF1 {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2 {
+declare module BABYLON.GLTF2.Loader {
     /**
     /**
      * Loader interface with an index field.
      * Loader interface with an index field.
      */
      */
@@ -1056,7 +1056,7 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAccessor extends IAccessor, IArrayItem {
+    interface IAccessor extends GLTF2.IAccessor, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
         /** @hidden */
@@ -1065,10 +1065,10 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAnimationChannel extends IAnimationChannel, IArrayItem {
+    interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {
     }
     }
     /** @hidden */
     /** @hidden */
-    interface _ILoaderAnimationSamplerData {
+    interface _IAnimationSamplerData {
         input: Float32Array;
         input: Float32Array;
         interpolation: AnimationSamplerInterpolation;
         interpolation: AnimationSamplerInterpolation;
         output: Float32Array;
         output: Float32Array;
@@ -1076,30 +1076,30 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAnimationSampler extends IAnimationSampler, IArrayItem {
+    interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {
         /** @hidden */
         /** @hidden */
-        _data?: Promise<_ILoaderAnimationSamplerData>;
+        _data?: Promise<_IAnimationSamplerData>;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAnimation extends IAnimation, IArrayItem {
-        channels: ILoaderAnimationChannel[];
-        samplers: ILoaderAnimationSampler[];
+    interface IAnimation extends GLTF2.IAnimation, IArrayItem {
+        channels: IAnimationChannel[];
+        samplers: IAnimationSampler[];
         /** @hidden */
         /** @hidden */
         _babylonAnimationGroup?: AnimationGroup;
         _babylonAnimationGroup?: AnimationGroup;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderBuffer extends IBuffer, IArrayItem {
+    interface IBuffer extends GLTF2.IBuffer, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderBufferView extends IBufferView, IArrayItem {
+    interface IBufferView extends GLTF2.IBufferView, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
         /** @hidden */
@@ -1108,40 +1108,40 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderCamera extends ICamera, IArrayItem {
+    interface ICamera extends GLTF2.ICamera, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderImage extends IImage, IArrayItem {
+    interface IImage extends GLTF2.IImage, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterialNormalTextureInfo extends IMaterialNormalTextureInfo, ILoaderTextureInfo {
+    interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterialOcclusionTextureInfo extends IMaterialOcclusionTextureInfo, ILoaderTextureInfo {
+    interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterialPbrMetallicRoughness extends IMaterialPbrMetallicRoughness {
-        baseColorTexture?: ILoaderTextureInfo;
-        metallicRoughnessTexture?: ILoaderTextureInfo;
+    interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {
+        baseColorTexture?: ITextureInfo;
+        metallicRoughnessTexture?: ITextureInfo;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterial extends IMaterial, IArrayItem {
-        pbrMetallicRoughness?: ILoaderMaterialPbrMetallicRoughness;
-        normalTexture?: ILoaderMaterialNormalTextureInfo;
-        occlusionTexture?: ILoaderMaterialOcclusionTextureInfo;
-        emissiveTexture?: ILoaderTextureInfo;
+    interface IMaterial extends GLTF2.IMaterial, IArrayItem {
+        pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
+        normalTexture?: IMaterialNormalTextureInfo;
+        occlusionTexture?: IMaterialOcclusionTextureInfo;
+        emissiveTexture?: ITextureInfo;
         /** @hidden */
         /** @hidden */
         _babylonData?: {
         _babylonData?: {
             [drawMode: number]: {
             [drawMode: number]: {
@@ -1154,22 +1154,22 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMesh extends IMesh, IArrayItem {
-        primitives: ILoaderMeshPrimitive[];
+    interface IMesh extends GLTF2.IMesh, IArrayItem {
+        primitives: IMeshPrimitive[];
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMeshPrimitive extends IMeshPrimitive, IArrayItem {
+    interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderNode extends INode, IArrayItem {
+    interface INode extends GLTF2.INode, IArrayItem {
         /**
         /**
          * The parent glTF node.
          * The parent glTF node.
          */
          */
-        parent?: ILoaderNode;
+        parent?: INode;
         /** @hidden */
         /** @hidden */
         _babylonMesh?: Mesh;
         _babylonMesh?: Mesh;
         /** @hidden */
         /** @hidden */
@@ -1180,7 +1180,7 @@ declare module BABYLON.GLTF2 {
         _numMorphTargets?: number;
         _numMorphTargets?: number;
     }
     }
     /** @hidden */
     /** @hidden */
-    interface _ILoaderSamplerData {
+    interface _ISamplerData {
         noMipMaps: boolean;
         noMipMaps: boolean;
         samplingMode: number;
         samplingMode: number;
         wrapU: number;
         wrapU: number;
@@ -1189,19 +1189,19 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderSampler extends ISampler, IArrayItem {
+    interface ISampler extends GLTF2.ISampler, IArrayItem {
         /** @hidden */
         /** @hidden */
-        _data?: _ILoaderSamplerData;
+        _data?: _ISamplerData;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderScene extends IScene, IArrayItem {
+    interface IScene extends GLTF2.IScene, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderSkin extends ISkin, IArrayItem {
+    interface ISkin extends GLTF2.ISkin, IArrayItem {
         /** @hidden */
         /** @hidden */
         _babylonSkeleton?: Skeleton;
         _babylonSkeleton?: Skeleton;
         /** @hidden */
         /** @hidden */
@@ -1210,30 +1210,30 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderTexture extends ITexture, IArrayItem {
+    interface ITexture extends GLTF2.ITexture, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderTextureInfo extends ITextureInfo {
+    interface ITextureInfo extends GLTF2.ITextureInfo {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderGLTF extends IGLTF {
-        accessors?: ILoaderAccessor[];
-        animations?: ILoaderAnimation[];
-        buffers?: ILoaderBuffer[];
-        bufferViews?: ILoaderBufferView[];
-        cameras?: ILoaderCamera[];
-        images?: ILoaderImage[];
-        materials?: ILoaderMaterial[];
-        meshes?: ILoaderMesh[];
-        nodes?: ILoaderNode[];
-        samplers?: ILoaderSampler[];
-        scenes?: ILoaderScene[];
-        skins?: ILoaderSkin[];
-        textures?: ILoaderTexture[];
+    interface IGLTF extends GLTF2.IGLTF {
+        accessors?: IAccessor[];
+        animations?: IAnimation[];
+        buffers?: IBuffer[];
+        bufferViews?: IBufferView[];
+        cameras?: ICamera[];
+        images?: IImage[];
+        materials?: IMaterial[];
+        meshes?: IMesh[];
+        nodes?: INode[];
+        samplers?: ISampler[];
+        scenes?: IScene[];
+        skins?: ISkin[];
+        textures?: ITexture[];
     }
     }
 }
 }
 
 
@@ -1258,14 +1258,14 @@ declare module BABYLON.GLTF2 {
          * Assign an `index` field to each item of the given array.
          * Assign an `index` field to each item of the given array.
          * @param array The array of items
          * @param array The array of items
          */
          */
-        static Assign(array?: IArrayItem[]): void;
+        static Assign(array?: Loader.IArrayItem[]): void;
     }
     }
     /**
     /**
      * The glTF 2.0 loader
      * The glTF 2.0 loader
      */
      */
     class GLTFLoader implements IGLTFLoader {
     class GLTFLoader implements IGLTFLoader {
         /** The glTF object parsed from the JSON. */
         /** The glTF object parsed from the JSON. */
-        gltf: ILoaderGLTF;
+        gltf: Loader.IGLTF;
         /** The Babylon scene when loading the asset. */
         /** The Babylon scene when loading the asset. */
         babylonScene: Scene;
         babylonScene: Scene;
         /** @hidden */
         /** @hidden */
@@ -1326,7 +1326,7 @@ declare module BABYLON.GLTF2 {
          * @param scene The glTF scene property
          * @param scene The glTF scene property
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        loadSceneAsync(context: string, scene: ILoaderScene): Promise<void>;
+        loadSceneAsync(context: string, scene: Loader.IScene): Promise<void>;
         private _forEachPrimitive;
         private _forEachPrimitive;
         private _getMeshes;
         private _getMeshes;
         private _getSkeletons;
         private _getSkeletons;
@@ -1339,7 +1339,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
          */
          */
-        loadNodeAsync(context: string, node: ILoaderNode, assign?: (babylonMesh: Mesh) => void): Promise<Mesh>;
+        loadNodeAsync(context: string, node: Loader.INode, assign?: (babylonMesh: Mesh) => void): Promise<Mesh>;
         private _loadMeshAsync;
         private _loadMeshAsync;
         private _loadMeshPrimitiveAsync;
         private _loadMeshPrimitiveAsync;
         private _loadVertexDataAsync;
         private _loadVertexDataAsync;
@@ -1360,7 +1360,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete
          */
          */
-        loadCameraAsync(context: string, camera: ILoaderCamera, assign?: (babylonCamera: Camera) => void): Promise<Camera>;
+        loadCameraAsync(context: string, camera: Loader.ICamera, assign?: (babylonCamera: Camera) => void): Promise<Camera>;
         private _loadAnimationsAsync;
         private _loadAnimationsAsync;
         /**
         /**
          * Loads a glTF animation.
          * Loads a glTF animation.
@@ -1368,7 +1368,7 @@ declare module BABYLON.GLTF2 {
          * @param animation The glTF animation property
          * @param animation The glTF animation property
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete
          */
          */
-        loadAnimationAsync(context: string, animation: ILoaderAnimation): Promise<AnimationGroup>;
+        loadAnimationAsync(context: string, animation: Loader.IAnimation): Promise<AnimationGroup>;
         private _loadAnimationChannelAsync;
         private _loadAnimationChannelAsync;
         private _loadAnimationSamplerAsync;
         private _loadAnimationSamplerAsync;
         private _loadBufferAsync;
         private _loadBufferAsync;
@@ -1378,14 +1378,14 @@ declare module BABYLON.GLTF2 {
          * @param bufferView The glTF buffer view property
          * @param bufferView The glTF buffer view property
          * @returns A promise that resolves with the loaded data when the load is complete
          * @returns A promise that resolves with the loaded data when the load is complete
          */
          */
-        loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView>;
+        loadBufferViewAsync(context: string, bufferView: Loader.IBufferView): Promise<ArrayBufferView>;
         private _loadIndicesAccessorAsync;
         private _loadIndicesAccessorAsync;
         private _loadFloatAccessorAsync;
         private _loadFloatAccessorAsync;
         private _loadVertexBufferViewAsync;
         private _loadVertexBufferViewAsync;
         private _loadVertexAccessorAsync;
         private _loadVertexAccessorAsync;
         private _loadMaterialMetallicRoughnessPropertiesAsync;
         private _loadMaterialMetallicRoughnessPropertiesAsync;
         /** @hidden */
         /** @hidden */
-        _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign?: (babylonMaterial: Material) => void): Promise<Material>;
+        _loadMaterialAsync(context: string, material: Loader.IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign?: (babylonMaterial: Material) => void): Promise<Material>;
         private _createDefaultMaterial;
         private _createDefaultMaterial;
         /**
         /**
          * Creates a Babylon material from a glTF material.
          * Creates a Babylon material from a glTF material.
@@ -1394,7 +1394,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonDrawMode The draw mode for the Babylon material
          * @param babylonDrawMode The draw mode for the Babylon material
          * @returns The Babylon material
          * @returns The Babylon material
          */
          */
-        createMaterial(context: string, material: ILoaderMaterial, babylonDrawMode: number): Material;
+        createMaterial(context: string, material: Loader.IMaterial, babylonDrawMode: number): Material;
         /**
         /**
          * Loads properties from a glTF material into a Babylon material.
          * Loads properties from a glTF material into a Babylon material.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1402,7 +1402,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Promise<void>;
+        loadMaterialPropertiesAsync(context: string, material: Loader.IMaterial, babylonMaterial: Material): Promise<void>;
         /**
         /**
          * Loads the normal, occlusion, and emissive properties from a glTF material into a Babylon material.
          * Loads the normal, occlusion, and emissive properties from a glTF material into a Babylon material.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1410,7 +1410,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Promise<void>;
+        loadMaterialBasePropertiesAsync(context: string, material: Loader.IMaterial, babylonMaterial: Material): Promise<void>;
         /**
         /**
          * Loads the alpha properties from a glTF material into a Babylon material.
          * Loads the alpha properties from a glTF material into a Babylon material.
          * Must be called after the setting the albedo texture of the Babylon material when the material has an albedo texture.
          * Must be called after the setting the albedo texture of the Babylon material when the material has an albedo texture.
@@ -1418,7 +1418,7 @@ declare module BABYLON.GLTF2 {
          * @param material The glTF material property
          * @param material The glTF material property
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          */
          */
-        loadMaterialAlphaProperties(context: string, material: ILoaderMaterial, babylonMaterial: Material): void;
+        loadMaterialAlphaProperties(context: string, material: Loader.IMaterial, babylonMaterial: Material): void;
         /**
         /**
          * Loads a glTF texture info.
          * Loads a glTF texture info.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1426,7 +1426,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete
          */
          */
-        loadTextureInfoAsync(context: string, textureInfo: ILoaderTextureInfo, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
+        loadTextureInfoAsync(context: string, textureInfo: Loader.ITextureInfo, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
         private _loadTextureAsync;
         private _loadTextureAsync;
         private _loadSampler;
         private _loadSampler;
         /**
         /**
@@ -1435,7 +1435,7 @@ declare module BABYLON.GLTF2 {
          * @param image The glTF image property
          * @param image The glTF image property
          * @returns A promise that resolves with the loaded data when the load is complete
          * @returns A promise that resolves with the loaded data when the load is complete
          */
          */
-        loadImageAsync(context: string, image: ILoaderImage): Promise<ArrayBufferView>;
+        loadImageAsync(context: string, image: Loader.IImage): Promise<ArrayBufferView>;
         /**
         /**
          * Loads a glTF uri.
          * Loads a glTF uri.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1531,7 +1531,7 @@ declare module BABYLON.GLTF2 {
          * @param scene The glTF scene property
          * @param scene The glTF scene property
          * @returns A promise that resolves when the load is complete or null if not handled
          * @returns A promise that resolves when the load is complete or null if not handled
          */
          */
-        loadSceneAsync?(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync?(context: string, scene: Loader.IScene): Nullable<Promise<void>>;
         /**
         /**
          * Define this method to modify the default behavior when loading nodes.
          * Define this method to modify the default behavior when loading nodes.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1539,7 +1539,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete or null if not handled
          */
          */
-        loadNodeAsync?(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync?(context: string, node: Loader.INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
         /**
         /**
          * Define this method to modify the default behavior when loading cameras.
          * Define this method to modify the default behavior when loading cameras.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1547,14 +1547,14 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled
          */
          */
-        loadCameraAsync?(context: string, camera: ILoaderCamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
+        loadCameraAsync?(context: string, camera: Loader.ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
         /**
         /**
          * @hidden Define this method to modify the default behavior when loading vertex data for mesh primitives.
          * @hidden Define this method to modify the default behavior when loading vertex data for mesh primitives.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
          * @param primitive The glTF mesh primitive property
          * @param primitive The glTF mesh primitive property
          * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled
          */
          */
-        _loadVertexDataAsync?(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
+        _loadVertexDataAsync?(context: string, primitive: Loader.IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
         /**
         /**
          * @hidden Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
          * @hidden Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1562,7 +1562,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled
          */
          */
-        _loadMaterialAsync?(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
+        _loadMaterialAsync?(context: string, material: Loader.IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
         /**
         /**
          * Define this method to modify the default behavior when creating materials.
          * Define this method to modify the default behavior when creating materials.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1570,7 +1570,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonDrawMode The draw mode for the Babylon material
          * @param babylonDrawMode The draw mode for the Babylon material
          * @returns The Babylon material or null if not handled
          * @returns The Babylon material or null if not handled
          */
          */
-        createMaterial?(context: string, material: ILoaderMaterial, babylonDrawMode: number): Nullable<Material>;
+        createMaterial?(context: string, material: Loader.IMaterial, babylonDrawMode: number): Nullable<Material>;
         /**
         /**
          * Define this method to modify the default behavior when loading material properties.
          * Define this method to modify the default behavior when loading material properties.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1578,7 +1578,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete or null if not handled
          * @returns A promise that resolves when the load is complete or null if not handled
          */
          */
-        loadMaterialPropertiesAsync?(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync?(context: string, material: Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
         /**
         /**
          * Define this method to modify the default behavior when loading texture infos.
          * Define this method to modify the default behavior when loading texture infos.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1586,14 +1586,14 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
          */
          */
-        loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
+        loadTextureInfoAsync?(context: string, textureInfo: Loader.ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
         /**
         /**
          * Define this method to modify the default behavior when loading animations.
          * Define this method to modify the default behavior when loading animations.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
          * @param animation The glTF animation property
          * @param animation The glTF animation property
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled
          */
          */
-        loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
+        loadAnimationAsync?(context: string, animation: Loader.IAnimation): Nullable<Promise<AnimationGroup>>;
         /**
         /**
          * Define this method to modify the default behavior when loading uris.
          * Define this method to modify the default behavior when loading uris.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1606,11 +1606,11 @@ declare module BABYLON.GLTF2 {
 /**
 /**
  * Defines the module for the built-in glTF 2.0 loader extensions.
  * Defines the module for the built-in glTF 2.0 loader extensions.
  */
  */
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
      */
      */
@@ -1649,9 +1649,9 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onReady(): void;
         onReady(): void;
         /** @hidden */
         /** @hidden */
-        loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
         /** @hidden */
         /** @hidden */
-        _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
+        _loadMaterialAsync(context: string, material: IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
         /** @hidden */
         /** @hidden */
         _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
         _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
         /**
         /**
@@ -1663,7 +1663,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /** @hidden */
     /** @hidden */
     class MSFT_minecraftMesh implements IGLTFLoaderExtension {
     class MSFT_minecraftMesh implements IGLTFLoaderExtension {
         readonly name: string;
         readonly name: string;
@@ -1671,12 +1671,12 @@ declare module BABYLON.GLTF2.Extensions {
         private _loader;
         private _loader;
         constructor(loader: GLTFLoader);
         constructor(loader: GLTFLoader);
         dispose(): void;
         dispose(): void;
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /** @hidden */
     /** @hidden */
     class MSFT_sRGBFactors implements IGLTFLoaderExtension {
     class MSFT_sRGBFactors implements IGLTFLoaderExtension {
         readonly name: string;
         readonly name: string;
@@ -1684,12 +1684,12 @@ declare module BABYLON.GLTF2.Extensions {
         private _loader;
         private _loader;
         constructor(loader: GLTFLoader);
         constructor(loader: GLTFLoader);
         dispose(): void;
         dispose(): void;
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
      * [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
      */
      */
@@ -1708,11 +1708,11 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onLoading(): void;
         onLoading(): void;
         /** @hidden */
         /** @hidden */
-        loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
         /** @hidden */
         /** @hidden */
-        loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
         /** @hidden */
         /** @hidden */
-        loadAnimationAsync(context: string, animation: ILoaderAnimation): Nullable<Promise<AnimationGroup>>;
+        loadAnimationAsync(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
         private _loadClipAsync;
         private _loadClipAsync;
         private _loadEmitterAsync;
         private _loadEmitterAsync;
         private _getEventAction;
         private _getEventAction;
@@ -1721,7 +1721,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression)
      */
      */
@@ -1737,12 +1737,12 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         dispose(): void;
         dispose(): void;
         /** @hidden */
         /** @hidden */
-        _loadVertexDataAsync(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
+        _loadVertexDataAsync(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
      */
      */
@@ -1757,13 +1757,13 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         dispose(): void;
         dispose(): void;
         /** @hidden */
         /** @hidden */
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
         private _loadSpecularGlossinessPropertiesAsync;
         private _loadSpecularGlossinessPropertiesAsync;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit)
      */
      */
@@ -1778,13 +1778,13 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         dispose(): void;
         dispose(): void;
         /** @hidden */
         /** @hidden */
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
         private _loadUnlitPropertiesAsync;
         private _loadUnlitPropertiesAsync;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
      * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
      */
      */
@@ -1802,14 +1802,14 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onLoading(): void;
         onLoading(): void;
         /** @hidden */
         /** @hidden */
-        loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
-     * [Specification](https://github.com/AltspaceVR/glTF/blob/avr-sampler-offset-tile/extensions/2.0/Khronos/KHR_texture_transform/README.md) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md)
      */
      */
     class KHR_texture_transform implements IGLTFLoaderExtension {
     class KHR_texture_transform implements IGLTFLoaderExtension {
         /** The name of this extension. */
         /** The name of this extension. */
@@ -1827,7 +1827,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
      * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
      */
      */
@@ -1845,7 +1845,7 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onLoading(): void;
         onLoading(): void;
         /** @hidden */
         /** @hidden */
-        loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
         private _loadLightAsync;
         private _loadLightAsync;
     }
     }
 }
 }

File diff ditekan karena terlalu besar
+ 945 - 915
dist/preview release/loaders/babylonjs.loaders.js


File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.min.js


+ 96 - 96
dist/preview release/loaders/babylonjs.loaders.module.d.ts

@@ -1050,7 +1050,7 @@ declare module BABYLON.GLTF1 {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2 {
+declare module BABYLON.GLTF2.Loader {
     /**
     /**
      * Loader interface with an index field.
      * Loader interface with an index field.
      */
      */
@@ -1063,7 +1063,7 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAccessor extends IAccessor, IArrayItem {
+    interface IAccessor extends GLTF2.IAccessor, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
         /** @hidden */
@@ -1072,10 +1072,10 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAnimationChannel extends IAnimationChannel, IArrayItem {
+    interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {
     }
     }
     /** @hidden */
     /** @hidden */
-    interface _ILoaderAnimationSamplerData {
+    interface _IAnimationSamplerData {
         input: Float32Array;
         input: Float32Array;
         interpolation: AnimationSamplerInterpolation;
         interpolation: AnimationSamplerInterpolation;
         output: Float32Array;
         output: Float32Array;
@@ -1083,30 +1083,30 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAnimationSampler extends IAnimationSampler, IArrayItem {
+    interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {
         /** @hidden */
         /** @hidden */
-        _data?: Promise<_ILoaderAnimationSamplerData>;
+        _data?: Promise<_IAnimationSamplerData>;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderAnimation extends IAnimation, IArrayItem {
-        channels: ILoaderAnimationChannel[];
-        samplers: ILoaderAnimationSampler[];
+    interface IAnimation extends GLTF2.IAnimation, IArrayItem {
+        channels: IAnimationChannel[];
+        samplers: IAnimationSampler[];
         /** @hidden */
         /** @hidden */
         _babylonAnimationGroup?: AnimationGroup;
         _babylonAnimationGroup?: AnimationGroup;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderBuffer extends IBuffer, IArrayItem {
+    interface IBuffer extends GLTF2.IBuffer, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderBufferView extends IBufferView, IArrayItem {
+    interface IBufferView extends GLTF2.IBufferView, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
         /** @hidden */
         /** @hidden */
@@ -1115,40 +1115,40 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderCamera extends ICamera, IArrayItem {
+    interface ICamera extends GLTF2.ICamera, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderImage extends IImage, IArrayItem {
+    interface IImage extends GLTF2.IImage, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterialNormalTextureInfo extends IMaterialNormalTextureInfo, ILoaderTextureInfo {
+    interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterialOcclusionTextureInfo extends IMaterialOcclusionTextureInfo, ILoaderTextureInfo {
+    interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterialPbrMetallicRoughness extends IMaterialPbrMetallicRoughness {
-        baseColorTexture?: ILoaderTextureInfo;
-        metallicRoughnessTexture?: ILoaderTextureInfo;
+    interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {
+        baseColorTexture?: ITextureInfo;
+        metallicRoughnessTexture?: ITextureInfo;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMaterial extends IMaterial, IArrayItem {
-        pbrMetallicRoughness?: ILoaderMaterialPbrMetallicRoughness;
-        normalTexture?: ILoaderMaterialNormalTextureInfo;
-        occlusionTexture?: ILoaderMaterialOcclusionTextureInfo;
-        emissiveTexture?: ILoaderTextureInfo;
+    interface IMaterial extends GLTF2.IMaterial, IArrayItem {
+        pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
+        normalTexture?: IMaterialNormalTextureInfo;
+        occlusionTexture?: IMaterialOcclusionTextureInfo;
+        emissiveTexture?: ITextureInfo;
         /** @hidden */
         /** @hidden */
         _babylonData?: {
         _babylonData?: {
             [drawMode: number]: {
             [drawMode: number]: {
@@ -1161,22 +1161,22 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMesh extends IMesh, IArrayItem {
-        primitives: ILoaderMeshPrimitive[];
+    interface IMesh extends GLTF2.IMesh, IArrayItem {
+        primitives: IMeshPrimitive[];
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderMeshPrimitive extends IMeshPrimitive, IArrayItem {
+    interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderNode extends INode, IArrayItem {
+    interface INode extends GLTF2.INode, IArrayItem {
         /**
         /**
          * The parent glTF node.
          * The parent glTF node.
          */
          */
-        parent?: ILoaderNode;
+        parent?: INode;
         /** @hidden */
         /** @hidden */
         _babylonMesh?: Mesh;
         _babylonMesh?: Mesh;
         /** @hidden */
         /** @hidden */
@@ -1187,7 +1187,7 @@ declare module BABYLON.GLTF2 {
         _numMorphTargets?: number;
         _numMorphTargets?: number;
     }
     }
     /** @hidden */
     /** @hidden */
-    interface _ILoaderSamplerData {
+    interface _ISamplerData {
         noMipMaps: boolean;
         noMipMaps: boolean;
         samplingMode: number;
         samplingMode: number;
         wrapU: number;
         wrapU: number;
@@ -1196,19 +1196,19 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderSampler extends ISampler, IArrayItem {
+    interface ISampler extends GLTF2.ISampler, IArrayItem {
         /** @hidden */
         /** @hidden */
-        _data?: _ILoaderSamplerData;
+        _data?: _ISamplerData;
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderScene extends IScene, IArrayItem {
+    interface IScene extends GLTF2.IScene, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderSkin extends ISkin, IArrayItem {
+    interface ISkin extends GLTF2.ISkin, IArrayItem {
         /** @hidden */
         /** @hidden */
         _babylonSkeleton?: Skeleton;
         _babylonSkeleton?: Skeleton;
         /** @hidden */
         /** @hidden */
@@ -1217,30 +1217,30 @@ declare module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderTexture extends ITexture, IArrayItem {
+    interface ITexture extends GLTF2.ITexture, IArrayItem {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderTextureInfo extends ITextureInfo {
+    interface ITextureInfo extends GLTF2.ITextureInfo {
     }
     }
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    interface ILoaderGLTF extends IGLTF {
-        accessors?: ILoaderAccessor[];
-        animations?: ILoaderAnimation[];
-        buffers?: ILoaderBuffer[];
-        bufferViews?: ILoaderBufferView[];
-        cameras?: ILoaderCamera[];
-        images?: ILoaderImage[];
-        materials?: ILoaderMaterial[];
-        meshes?: ILoaderMesh[];
-        nodes?: ILoaderNode[];
-        samplers?: ILoaderSampler[];
-        scenes?: ILoaderScene[];
-        skins?: ILoaderSkin[];
-        textures?: ILoaderTexture[];
+    interface IGLTF extends GLTF2.IGLTF {
+        accessors?: IAccessor[];
+        animations?: IAnimation[];
+        buffers?: IBuffer[];
+        bufferViews?: IBufferView[];
+        cameras?: ICamera[];
+        images?: IImage[];
+        materials?: IMaterial[];
+        meshes?: IMesh[];
+        nodes?: INode[];
+        samplers?: ISampler[];
+        scenes?: IScene[];
+        skins?: ISkin[];
+        textures?: ITexture[];
     }
     }
 }
 }
 
 
@@ -1265,14 +1265,14 @@ declare module BABYLON.GLTF2 {
          * Assign an `index` field to each item of the given array.
          * Assign an `index` field to each item of the given array.
          * @param array The array of items
          * @param array The array of items
          */
          */
-        static Assign(array?: IArrayItem[]): void;
+        static Assign(array?: Loader.IArrayItem[]): void;
     }
     }
     /**
     /**
      * The glTF 2.0 loader
      * The glTF 2.0 loader
      */
      */
     class GLTFLoader implements IGLTFLoader {
     class GLTFLoader implements IGLTFLoader {
         /** The glTF object parsed from the JSON. */
         /** The glTF object parsed from the JSON. */
-        gltf: ILoaderGLTF;
+        gltf: Loader.IGLTF;
         /** The Babylon scene when loading the asset. */
         /** The Babylon scene when loading the asset. */
         babylonScene: Scene;
         babylonScene: Scene;
         /** @hidden */
         /** @hidden */
@@ -1333,7 +1333,7 @@ declare module BABYLON.GLTF2 {
          * @param scene The glTF scene property
          * @param scene The glTF scene property
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        loadSceneAsync(context: string, scene: ILoaderScene): Promise<void>;
+        loadSceneAsync(context: string, scene: Loader.IScene): Promise<void>;
         private _forEachPrimitive;
         private _forEachPrimitive;
         private _getMeshes;
         private _getMeshes;
         private _getSkeletons;
         private _getSkeletons;
@@ -1346,7 +1346,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
          */
          */
-        loadNodeAsync(context: string, node: ILoaderNode, assign?: (babylonMesh: Mesh) => void): Promise<Mesh>;
+        loadNodeAsync(context: string, node: Loader.INode, assign?: (babylonMesh: Mesh) => void): Promise<Mesh>;
         private _loadMeshAsync;
         private _loadMeshAsync;
         private _loadMeshPrimitiveAsync;
         private _loadMeshPrimitiveAsync;
         private _loadVertexDataAsync;
         private _loadVertexDataAsync;
@@ -1367,7 +1367,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete
          */
          */
-        loadCameraAsync(context: string, camera: ILoaderCamera, assign?: (babylonCamera: Camera) => void): Promise<Camera>;
+        loadCameraAsync(context: string, camera: Loader.ICamera, assign?: (babylonCamera: Camera) => void): Promise<Camera>;
         private _loadAnimationsAsync;
         private _loadAnimationsAsync;
         /**
         /**
          * Loads a glTF animation.
          * Loads a glTF animation.
@@ -1375,7 +1375,7 @@ declare module BABYLON.GLTF2 {
          * @param animation The glTF animation property
          * @param animation The glTF animation property
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete
          */
          */
-        loadAnimationAsync(context: string, animation: ILoaderAnimation): Promise<AnimationGroup>;
+        loadAnimationAsync(context: string, animation: Loader.IAnimation): Promise<AnimationGroup>;
         private _loadAnimationChannelAsync;
         private _loadAnimationChannelAsync;
         private _loadAnimationSamplerAsync;
         private _loadAnimationSamplerAsync;
         private _loadBufferAsync;
         private _loadBufferAsync;
@@ -1385,14 +1385,14 @@ declare module BABYLON.GLTF2 {
          * @param bufferView The glTF buffer view property
          * @param bufferView The glTF buffer view property
          * @returns A promise that resolves with the loaded data when the load is complete
          * @returns A promise that resolves with the loaded data when the load is complete
          */
          */
-        loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView>;
+        loadBufferViewAsync(context: string, bufferView: Loader.IBufferView): Promise<ArrayBufferView>;
         private _loadIndicesAccessorAsync;
         private _loadIndicesAccessorAsync;
         private _loadFloatAccessorAsync;
         private _loadFloatAccessorAsync;
         private _loadVertexBufferViewAsync;
         private _loadVertexBufferViewAsync;
         private _loadVertexAccessorAsync;
         private _loadVertexAccessorAsync;
         private _loadMaterialMetallicRoughnessPropertiesAsync;
         private _loadMaterialMetallicRoughnessPropertiesAsync;
         /** @hidden */
         /** @hidden */
-        _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign?: (babylonMaterial: Material) => void): Promise<Material>;
+        _loadMaterialAsync(context: string, material: Loader.IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign?: (babylonMaterial: Material) => void): Promise<Material>;
         private _createDefaultMaterial;
         private _createDefaultMaterial;
         /**
         /**
          * Creates a Babylon material from a glTF material.
          * Creates a Babylon material from a glTF material.
@@ -1401,7 +1401,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonDrawMode The draw mode for the Babylon material
          * @param babylonDrawMode The draw mode for the Babylon material
          * @returns The Babylon material
          * @returns The Babylon material
          */
          */
-        createMaterial(context: string, material: ILoaderMaterial, babylonDrawMode: number): Material;
+        createMaterial(context: string, material: Loader.IMaterial, babylonDrawMode: number): Material;
         /**
         /**
          * Loads properties from a glTF material into a Babylon material.
          * Loads properties from a glTF material into a Babylon material.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1409,7 +1409,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Promise<void>;
+        loadMaterialPropertiesAsync(context: string, material: Loader.IMaterial, babylonMaterial: Material): Promise<void>;
         /**
         /**
          * Loads the normal, occlusion, and emissive properties from a glTF material into a Babylon material.
          * Loads the normal, occlusion, and emissive properties from a glTF material into a Babylon material.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1417,7 +1417,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Promise<void>;
+        loadMaterialBasePropertiesAsync(context: string, material: Loader.IMaterial, babylonMaterial: Material): Promise<void>;
         /**
         /**
          * Loads the alpha properties from a glTF material into a Babylon material.
          * Loads the alpha properties from a glTF material into a Babylon material.
          * Must be called after the setting the albedo texture of the Babylon material when the material has an albedo texture.
          * Must be called after the setting the albedo texture of the Babylon material when the material has an albedo texture.
@@ -1425,7 +1425,7 @@ declare module BABYLON.GLTF2 {
          * @param material The glTF material property
          * @param material The glTF material property
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          */
          */
-        loadMaterialAlphaProperties(context: string, material: ILoaderMaterial, babylonMaterial: Material): void;
+        loadMaterialAlphaProperties(context: string, material: Loader.IMaterial, babylonMaterial: Material): void;
         /**
         /**
          * Loads a glTF texture info.
          * Loads a glTF texture info.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1433,7 +1433,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete
          */
          */
-        loadTextureInfoAsync(context: string, textureInfo: ILoaderTextureInfo, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
+        loadTextureInfoAsync(context: string, textureInfo: Loader.ITextureInfo, assign?: (babylonTexture: BaseTexture) => void): Promise<BaseTexture>;
         private _loadTextureAsync;
         private _loadTextureAsync;
         private _loadSampler;
         private _loadSampler;
         /**
         /**
@@ -1442,7 +1442,7 @@ declare module BABYLON.GLTF2 {
          * @param image The glTF image property
          * @param image The glTF image property
          * @returns A promise that resolves with the loaded data when the load is complete
          * @returns A promise that resolves with the loaded data when the load is complete
          */
          */
-        loadImageAsync(context: string, image: ILoaderImage): Promise<ArrayBufferView>;
+        loadImageAsync(context: string, image: Loader.IImage): Promise<ArrayBufferView>;
         /**
         /**
          * Loads a glTF uri.
          * Loads a glTF uri.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1538,7 +1538,7 @@ declare module BABYLON.GLTF2 {
          * @param scene The glTF scene property
          * @param scene The glTF scene property
          * @returns A promise that resolves when the load is complete or null if not handled
          * @returns A promise that resolves when the load is complete or null if not handled
          */
          */
-        loadSceneAsync?(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync?(context: string, scene: Loader.IScene): Nullable<Promise<void>>;
         /**
         /**
          * Define this method to modify the default behavior when loading nodes.
          * Define this method to modify the default behavior when loading nodes.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1546,7 +1546,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete or null if not handled
          */
          */
-        loadNodeAsync?(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync?(context: string, node: Loader.INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
         /**
         /**
          * Define this method to modify the default behavior when loading cameras.
          * Define this method to modify the default behavior when loading cameras.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1554,14 +1554,14 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled
          */
          */
-        loadCameraAsync?(context: string, camera: ILoaderCamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
+        loadCameraAsync?(context: string, camera: Loader.ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
         /**
         /**
          * @hidden Define this method to modify the default behavior when loading vertex data for mesh primitives.
          * @hidden Define this method to modify the default behavior when loading vertex data for mesh primitives.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
          * @param primitive The glTF mesh primitive property
          * @param primitive The glTF mesh primitive property
          * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled
          */
          */
-        _loadVertexDataAsync?(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
+        _loadVertexDataAsync?(context: string, primitive: Loader.IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
         /**
         /**
          * @hidden Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
          * @hidden Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1569,7 +1569,7 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled
          */
          */
-        _loadMaterialAsync?(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
+        _loadMaterialAsync?(context: string, material: Loader.IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
         /**
         /**
          * Define this method to modify the default behavior when creating materials.
          * Define this method to modify the default behavior when creating materials.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1577,7 +1577,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonDrawMode The draw mode for the Babylon material
          * @param babylonDrawMode The draw mode for the Babylon material
          * @returns The Babylon material or null if not handled
          * @returns The Babylon material or null if not handled
          */
          */
-        createMaterial?(context: string, material: ILoaderMaterial, babylonDrawMode: number): Nullable<Material>;
+        createMaterial?(context: string, material: Loader.IMaterial, babylonDrawMode: number): Nullable<Material>;
         /**
         /**
          * Define this method to modify the default behavior when loading material properties.
          * Define this method to modify the default behavior when loading material properties.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1585,7 +1585,7 @@ declare module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete or null if not handled
          * @returns A promise that resolves when the load is complete or null if not handled
          */
          */
-        loadMaterialPropertiesAsync?(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync?(context: string, material: Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
         /**
         /**
          * Define this method to modify the default behavior when loading texture infos.
          * Define this method to modify the default behavior when loading texture infos.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1593,14 +1593,14 @@ declare module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
          */
          */
-        loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
+        loadTextureInfoAsync?(context: string, textureInfo: Loader.ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
         /**
         /**
          * Define this method to modify the default behavior when loading animations.
          * Define this method to modify the default behavior when loading animations.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
          * @param animation The glTF animation property
          * @param animation The glTF animation property
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled
          */
          */
-        loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
+        loadAnimationAsync?(context: string, animation: Loader.IAnimation): Nullable<Promise<AnimationGroup>>;
         /**
         /**
          * Define this method to modify the default behavior when loading uris.
          * Define this method to modify the default behavior when loading uris.
          * @param context The context when loading the asset
          * @param context The context when loading the asset
@@ -1613,11 +1613,11 @@ declare module BABYLON.GLTF2 {
 /**
 /**
  * Defines the module for the built-in glTF 2.0 loader extensions.
  * Defines the module for the built-in glTF 2.0 loader extensions.
  */
  */
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod)
      */
      */
@@ -1656,9 +1656,9 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onReady(): void;
         onReady(): void;
         /** @hidden */
         /** @hidden */
-        loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
         /** @hidden */
         /** @hidden */
-        _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
+        _loadMaterialAsync(context: string, material: IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
         /** @hidden */
         /** @hidden */
         _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
         _loadUriAsync(context: string, uri: string): Nullable<Promise<ArrayBufferView>>;
         /**
         /**
@@ -1670,7 +1670,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /** @hidden */
     /** @hidden */
     class MSFT_minecraftMesh implements IGLTFLoaderExtension {
     class MSFT_minecraftMesh implements IGLTFLoaderExtension {
         readonly name: string;
         readonly name: string;
@@ -1678,12 +1678,12 @@ declare module BABYLON.GLTF2.Extensions {
         private _loader;
         private _loader;
         constructor(loader: GLTFLoader);
         constructor(loader: GLTFLoader);
         dispose(): void;
         dispose(): void;
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /** @hidden */
     /** @hidden */
     class MSFT_sRGBFactors implements IGLTFLoaderExtension {
     class MSFT_sRGBFactors implements IGLTFLoaderExtension {
         readonly name: string;
         readonly name: string;
@@ -1691,12 +1691,12 @@ declare module BABYLON.GLTF2.Extensions {
         private _loader;
         private _loader;
         constructor(loader: GLTFLoader);
         constructor(loader: GLTFLoader);
         dispose(): void;
         dispose(): void;
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
      * [Specification](https://github.com/najadojo/glTF/tree/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter)
      */
      */
@@ -1715,11 +1715,11 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onLoading(): void;
         onLoading(): void;
         /** @hidden */
         /** @hidden */
-        loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
         /** @hidden */
         /** @hidden */
-        loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
         /** @hidden */
         /** @hidden */
-        loadAnimationAsync(context: string, animation: ILoaderAnimation): Nullable<Promise<AnimationGroup>>;
+        loadAnimationAsync(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
         private _loadClipAsync;
         private _loadClipAsync;
         private _loadEmitterAsync;
         private _loadEmitterAsync;
         private _getEventAction;
         private _getEventAction;
@@ -1728,7 +1728,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression)
      */
      */
@@ -1744,12 +1744,12 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         dispose(): void;
         dispose(): void;
         /** @hidden */
         /** @hidden */
-        _loadVertexDataAsync(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
+        _loadVertexDataAsync(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)
      */
      */
@@ -1764,13 +1764,13 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         dispose(): void;
         dispose(): void;
         /** @hidden */
         /** @hidden */
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
         private _loadSpecularGlossinessPropertiesAsync;
         private _loadSpecularGlossinessPropertiesAsync;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit)
      * [Specification](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit)
      */
      */
@@ -1785,13 +1785,13 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         dispose(): void;
         dispose(): void;
         /** @hidden */
         /** @hidden */
-        loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
         private _loadUnlitPropertiesAsync;
         private _loadUnlitPropertiesAsync;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
      * [Specification](https://github.com/KhronosGroup/glTF/blob/1048d162a44dbcb05aefc1874bfd423cf60135a6/extensions/2.0/Khronos/KHR_lights_punctual/README.md) (Experimental)
      */
      */
@@ -1809,14 +1809,14 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onLoading(): void;
         onLoading(): void;
         /** @hidden */
         /** @hidden */
-        loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
     }
     }
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
-     * [Specification](https://github.com/AltspaceVR/glTF/blob/avr-sampler-offset-tile/extensions/2.0/Khronos/KHR_texture_transform/README.md) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md)
      */
      */
     class KHR_texture_transform implements IGLTFLoaderExtension {
     class KHR_texture_transform implements IGLTFLoaderExtension {
         /** The name of this extension. */
         /** The name of this extension. */
@@ -1834,7 +1834,7 @@ declare module BABYLON.GLTF2.Extensions {
 }
 }
 
 
 
 
-declare module BABYLON.GLTF2.Extensions {
+declare module BABYLON.GLTF2.Loader.Extensions {
     /**
     /**
      * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
      * [Specification](https://github.com/KhronosGroup/glTF/blob/eb3e32332042e04691a5f35103f8c261e50d8f1e/extensions/2.0/Khronos/EXT_lights_image_based/README.md) (Experimental)
      */
      */
@@ -1852,7 +1852,7 @@ declare module BABYLON.GLTF2.Extensions {
         /** @hidden */
         /** @hidden */
         onLoading(): void;
         onLoading(): void;
         /** @hidden */
         /** @hidden */
-        loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>;
         private _loadLightAsync;
         private _loadLightAsync;
     }
     }
 }
 }

+ 2 - 2
dist/preview release/loaders/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-loaders",
     "name": "babylonjs-loaders",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
-    "version": "3.3.0-beta.5",
+    "version": "3.3.0-rc.0",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     ],
     "license": "Apache-2.0",
     "license": "Apache-2.0",
     "dependencies": {
     "dependencies": {
-        "babylonjs-gltf2interface": "3.3.0-beta.5"
+        "babylonjs-gltf2interface": "3.3.0-rc.0"
     },
     },
     "peerDependencies": {
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"
         "babylonjs": ">=3.2.0-alpha"

+ 1 - 1
dist/preview release/materialsLibrary/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-materials",
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-beta.5",
+    "version": "3.3.0-rc.0",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/postProcessesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-post-process",
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-beta.5",
+    "version": "3.3.0-rc.0",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-procedural-textures",
     "name": "babylonjs-procedural-textures",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-beta.5",
+    "version": "3.3.0-rc.0",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 3 - 5
dist/preview release/serializers/babylon.glTF2Serializer.d.ts

@@ -945,11 +945,6 @@ declare module BABYLON.GLTF2.Exporter {
         postExportMeshPrimitiveAsync?(context: string, meshPrimitive: IMeshPrimitive, babylonSubMesh: SubMesh, binaryWriter: _BinaryWriter): Nullable<Promise<IMeshPrimitive>>;
         postExportMeshPrimitiveAsync?(context: string, meshPrimitive: IMeshPrimitive, babylonSubMesh: SubMesh, binaryWriter: _BinaryWriter): Nullable<Promise<IMeshPrimitive>>;
     }
     }
 }
 }
-/**
- * Defines the module for the built-in glTF 2.0 exporter extensions.
- */
-declare module BABYLON.GLTF2.Extensions {
-}
 
 
 
 
 declare module BABYLON {
 declare module BABYLON {
@@ -974,6 +969,9 @@ declare module BABYLON {
 }
 }
 
 
 
 
+/**
+ * @hidden
+ */
 declare module BABYLON.GLTF2.Exporter.Extensions {
 declare module BABYLON.GLTF2.Exporter.Extensions {
     /**
     /**
      * @hidden
      * @hidden

+ 3 - 0
dist/preview release/serializers/babylon.glTF2Serializer.js

@@ -3457,6 +3457,9 @@ var BABYLON;
 //# sourceMappingURL=babylon.glTFFileExporter.js.map
 //# sourceMappingURL=babylon.glTFFileExporter.js.map
 
 
 /// <reference path="../../../../../dist/preview release/gltf2Interface/babylon.glTF2Interface.d.ts"/>
 /// <reference path="../../../../../dist/preview release/gltf2Interface/babylon.glTF2Interface.d.ts"/>
+/**
+ * @hidden
+ */
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;

+ 3 - 5
dist/preview release/serializers/babylonjs.serializers.d.ts

@@ -953,11 +953,6 @@ declare module BABYLON.GLTF2.Exporter {
         postExportMeshPrimitiveAsync?(context: string, meshPrimitive: IMeshPrimitive, babylonSubMesh: SubMesh, binaryWriter: _BinaryWriter): Nullable<Promise<IMeshPrimitive>>;
         postExportMeshPrimitiveAsync?(context: string, meshPrimitive: IMeshPrimitive, babylonSubMesh: SubMesh, binaryWriter: _BinaryWriter): Nullable<Promise<IMeshPrimitive>>;
     }
     }
 }
 }
-/**
- * Defines the module for the built-in glTF 2.0 exporter extensions.
- */
-declare module BABYLON.GLTF2.Extensions {
-}
 
 
 
 
 declare module BABYLON {
 declare module BABYLON {
@@ -982,6 +977,9 @@ declare module BABYLON {
 }
 }
 
 
 
 
+/**
+ * @hidden
+ */
 declare module BABYLON.GLTF2.Exporter.Extensions {
 declare module BABYLON.GLTF2.Exporter.Extensions {
     /**
     /**
      * @hidden
      * @hidden

+ 3 - 0
dist/preview release/serializers/babylonjs.serializers.js

@@ -3618,6 +3618,9 @@ var BABYLON;
 //# sourceMappingURL=babylon.glTFFileExporter.js.map
 //# sourceMappingURL=babylon.glTFFileExporter.js.map
 
 
 
 
+/**
+ * @hidden
+ */
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
     var GLTF2;
     var GLTF2;

+ 3 - 5
dist/preview release/serializers/babylonjs.serializers.module.d.ts

@@ -960,11 +960,6 @@ declare module BABYLON.GLTF2.Exporter {
         postExportMeshPrimitiveAsync?(context: string, meshPrimitive: IMeshPrimitive, babylonSubMesh: SubMesh, binaryWriter: _BinaryWriter): Nullable<Promise<IMeshPrimitive>>;
         postExportMeshPrimitiveAsync?(context: string, meshPrimitive: IMeshPrimitive, babylonSubMesh: SubMesh, binaryWriter: _BinaryWriter): Nullable<Promise<IMeshPrimitive>>;
     }
     }
 }
 }
-/**
- * Defines the module for the built-in glTF 2.0 exporter extensions.
- */
-declare module BABYLON.GLTF2.Extensions {
-}
 
 
 
 
 declare module BABYLON {
 declare module BABYLON {
@@ -989,6 +984,9 @@ declare module BABYLON {
 }
 }
 
 
 
 
+/**
+ * @hidden
+ */
 declare module BABYLON.GLTF2.Exporter.Extensions {
 declare module BABYLON.GLTF2.Exporter.Extensions {
     /**
     /**
      * @hidden
      * @hidden

+ 2 - 2
dist/preview release/serializers/package.json

@@ -4,7 +4,7 @@
     },
     },
     "name": "babylonjs-serializers",
     "name": "babylonjs-serializers",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
-    "version": "3.3.0-beta.5",
+    "version": "3.3.0-rc.0",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     ],
     "license": "Apache-2.0",
     "license": "Apache-2.0",
     "dependencies": {
     "dependencies": {
-        "babylonjs-gltf2interface": "3.3.0-beta.5"
+        "babylonjs-gltf2interface": "3.3.0-rc.0"
     },
     },
     "peerDependencies": {
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"
         "babylonjs": ">=3.2.0-alpha"

File diff ditekan karena terlalu besar
+ 6520 - 13274
dist/preview release/typedocValidationBaseline.json


+ 159 - 2
dist/preview release/viewer/babylon.viewer.d.ts

@@ -515,10 +515,167 @@ declare module BabylonViewer {
     }
     }
 }
 }
 declare module BabylonViewer {
 declare module BabylonViewer {
+    /**
+        * The current state of the model
+        */
+    export enum ModelState {
+            INIT = 0,
+            LOADING = 1,
+            LOADED = 2,
+            ENTRY = 3,
+            ENTRYDONE = 4,
+            COMPLETE = 5,
+            CANCELED = 6,
+            ERROR = 7
+    }
+    /**
+        * The viewer model is a container for all assets representing a sngle loaded model.
+        */
+    export class ViewerModel implements BABYLON.IDisposable {
+            /**
+                * The loader used to load this model.
+                */
+            loader: BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync;
+            /**
+                * This model's root mesh (the parent of all other meshes).
+                * This mesh does not(!) exist in the meshes array.
+                */
+            rootMesh: BABYLON.AbstractMesh;
+            /**
+                * ParticleSystems connected to this model
+                */
+            particleSystems: Array<BABYLON.IParticleSystem>;
+            /**
+                * Skeletons defined in this model
+                */
+            skeletons: Array<BABYLON.Skeleton>;
+            /**
+                * The current model animation.
+                * On init, this will be undefined.
+                */
+            currentAnimation: IModelAnimation;
+            /**
+                * Observers registered here will be executed when the model is done loading
+                */
+            onLoadedObservable: BABYLON.Observable<ViewerModel>;
+            /**
+                * Observers registered here will be executed when the loader notified of a progress event
+                */
+            onLoadProgressObservable: BABYLON.Observable<BABYLON.SceneLoaderProgressEvent>;
+            /**
+                * Observers registered here will be executed when the loader notified of an error.
+                */
+            onLoadErrorObservable: BABYLON.Observable<{
+                    message: string;
+                    exception: any;
+            }>;
+            /**
+                * Will be executed after the model finished loading and complete, including entry animation and lod
+                */
+            onCompleteObservable: BABYLON.Observable<ViewerModel>;
+            /**
+                * Observers registered here will be executed every time the model is being configured.
+                * This can be used to extend the model's configuration without extending the class itself
+                */
+            onAfterConfigure: BABYLON.Observable<ViewerModel>;
+            /**
+                * The current model state (loaded, error, etc)
+                */
+            state: ModelState;
+            /**
+                * A loadID provided by the modelLoader, unique to ths (Abstract)Viewer instance.
+                */
+            loadId: number;
+            loadInfo: BABYLON.GLTF2.IAsset;
+            constructor(_observablesManager: ObservablesManager, modelConfiguration: IModelConfiguration, _configurationContainer?: ConfigurationContainer | undefined);
+            shadowsRenderedAfterLoad: boolean;
+            getViewerId(): string | undefined;
+            /**
+             * Set whether this model is enabled or not.
+             */
+            enabled: boolean;
+            loaderDone: boolean;
+            /**
+                * Add a mesh to this model.
+                * Any mesh that has no parent will be provided with the root mesh as its new parent.
+                *
+                * @param mesh the new mesh to add
+                * @param triggerLoaded should this mesh trigger the onLoaded observable. Used when adding meshes manually.
+                */
+            addMesh(mesh: BABYLON.AbstractMesh, triggerLoaded?: boolean): Promise<ViewerModel> | undefined;
+            /**
+                * get the list of meshes (excluding the root mesh)
+                */
+            readonly meshes: BABYLON.AbstractMesh[];
+            /**
+             * (Re-)set the model's entire configuration
+             * @param newConfiguration the new configuration to replace the new one
+             */
+            configuration: IModelConfiguration;
+            /**
+                * Update the current configuration with new values.
+                * Configuration will not be overwritten, but merged with the new configuration.
+                * Priority is to the new configuration
+                * @param newConfiguration the configuration to be merged into the current configuration;
+                */
+            updateConfiguration(newConfiguration: Partial<IModelConfiguration>): void;
+            /**
+                * Add a new animation group to this model.
+                * @param animationGroup the new animation group to be added
+                */
+            addAnimationGroup(animationGroup: BABYLON.AnimationGroup): void;
+            /**
+                * Get the ModelAnimation array
+                */
+            getAnimations(): Array<IModelAnimation>;
+            /**
+                * Get the animations' names. Using the names you can play a specific animation.
+                */
+            getAnimationNames(): Array<string>;
+            /**
+                * Get an animation by the provided name. Used mainly when playing n animation.
+                * @param name the name of the animation to find
+                */
+            protected _getAnimationByName(name: string): BABYLON.Nullable<IModelAnimation>;
+            /**
+                * Choose an initialized animation using its name and start playing it
+                * @param name the name of the animation to play
+                * @returns The model aniamtion to be played.
+                */
+            playAnimation(name: string): IModelAnimation;
+            setCurrentAnimationByName(name: string): IModelAnimation;
+            /**
+                * Apply a material configuration to a material
+                * @param material BABYLON.Material to apply configuration to
+                * @hidden
+                */
+            _applyModelMaterialConfiguration(material: BABYLON.Material): void;
+            /**
+             * Begin @animations with the specified @easingFunction
+             * @param animations The BABYLON Animations to begin
+             * @param duration of transition, in seconds
+             * @param easingFunction An easing function to apply
+             * @param easingMode A easing mode to apply to the easingFunction
+             * @param onAnimationEnd Call back trigger at the end of the animation.
+             */
+            transitionTo(animations: BABYLON.Animation[], duration: number, easingFunction: any, easingMode: number | undefined, onAnimationEnd: () => void): void;
+            /**
+                * Stops and removes all animations that have been applied to the model
+                */
+            stopAllAnimations(): void;
+            /**
+                * Will remove this model from the viewer (but NOT dispose it).
+                */
+            remove(): void;
+            /**
+                * Dispose this model, including all of its associated assets.
+                */
+            dispose(): void;
+    }
 }
 }
 declare module BabylonViewer {
 declare module BabylonViewer {
     /**
     /**
-        * Animation play mode enum - is the animation looping or playing once
+        * BABYLON.Animation play mode enum - is the animation looping or playing once
         */
         */
     export const enum AnimationPlayMode {
     export const enum AnimationPlayMode {
             ONCE = 0,
             ONCE = 0,
@@ -600,7 +757,7 @@ declare module BabylonViewer {
                 */
                 */
             readonly currentFrame: number;
             readonly currentFrame: number;
             /**
             /**
-                * Animation's FPS value
+                * BABYLON.Animation's FPS value
                 */
                 */
             readonly fps: number;
             readonly fps: number;
             /**
             /**

File diff ditekan karena terlalu besar
+ 3 - 3
dist/preview release/viewer/babylon.viewer.js


File diff ditekan karena terlalu besar
+ 5 - 5
dist/preview release/viewer/babylon.viewer.max.js


+ 163 - 1
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -566,7 +566,169 @@ declare module 'babylonjs-viewer/loader/modelLoader' {
 }
 }
 
 
 declare module 'babylonjs-viewer/model/viewerModel' {
 declare module 'babylonjs-viewer/model/viewerModel' {
-    
+    import { ISceneLoaderPlugin, ISceneLoaderPluginAsync, AnimationGroup, AbstractMesh, Observable, SceneLoaderProgressEvent, IParticleSystem, Skeleton, IDisposable, Nullable, Animation, Material } from "babylonjs";
+    import { GLTF2 } from "babylonjs-loaders";
+    import { IModelConfiguration } from "babylonjs-viewer/configuration/interfaces/modelConfiguration";
+    import { IModelAnimation } from "babylonjs-viewer/model/modelAnimation";
+    import { ObservablesManager } from "babylonjs-viewer/managers/observablesManager";
+    import { ConfigurationContainer } from "babylonjs-viewer/configuration/configurationContainer";
+    /**
+        * The current state of the model
+        */
+    export enum ModelState {
+            INIT = 0,
+            LOADING = 1,
+            LOADED = 2,
+            ENTRY = 3,
+            ENTRYDONE = 4,
+            COMPLETE = 5,
+            CANCELED = 6,
+            ERROR = 7
+    }
+    /**
+        * The viewer model is a container for all assets representing a sngle loaded model.
+        */
+    export class ViewerModel implements IDisposable {
+            /**
+                * The loader used to load this model.
+                */
+            loader: ISceneLoaderPlugin | ISceneLoaderPluginAsync;
+            /**
+                * This model's root mesh (the parent of all other meshes).
+                * This mesh does not(!) exist in the meshes array.
+                */
+            rootMesh: AbstractMesh;
+            /**
+                * ParticleSystems connected to this model
+                */
+            particleSystems: Array<IParticleSystem>;
+            /**
+                * Skeletons defined in this model
+                */
+            skeletons: Array<Skeleton>;
+            /**
+                * The current model animation.
+                * On init, this will be undefined.
+                */
+            currentAnimation: IModelAnimation;
+            /**
+                * Observers registered here will be executed when the model is done loading
+                */
+            onLoadedObservable: Observable<ViewerModel>;
+            /**
+                * Observers registered here will be executed when the loader notified of a progress event
+                */
+            onLoadProgressObservable: Observable<SceneLoaderProgressEvent>;
+            /**
+                * Observers registered here will be executed when the loader notified of an error.
+                */
+            onLoadErrorObservable: Observable<{
+                    message: string;
+                    exception: any;
+            }>;
+            /**
+                * Will be executed after the model finished loading and complete, including entry animation and lod
+                */
+            onCompleteObservable: Observable<ViewerModel>;
+            /**
+                * Observers registered here will be executed every time the model is being configured.
+                * This can be used to extend the model's configuration without extending the class itself
+                */
+            onAfterConfigure: Observable<ViewerModel>;
+            /**
+                * The current model state (loaded, error, etc)
+                */
+            state: ModelState;
+            /**
+                * A loadID provided by the modelLoader, unique to ths (Abstract)Viewer instance.
+                */
+            loadId: number;
+            loadInfo: GLTF2.IAsset;
+            constructor(_observablesManager: ObservablesManager, modelConfiguration: IModelConfiguration, _configurationContainer?: ConfigurationContainer | undefined);
+            shadowsRenderedAfterLoad: boolean;
+            getViewerId(): string | undefined;
+            /**
+             * Set whether this model is enabled or not.
+             */
+            enabled: boolean;
+            loaderDone: boolean;
+            /**
+                * Add a mesh to this model.
+                * Any mesh that has no parent will be provided with the root mesh as its new parent.
+                *
+                * @param mesh the new mesh to add
+                * @param triggerLoaded should this mesh trigger the onLoaded observable. Used when adding meshes manually.
+                */
+            addMesh(mesh: AbstractMesh, triggerLoaded?: boolean): Promise<ViewerModel> | undefined;
+            /**
+                * get the list of meshes (excluding the root mesh)
+                */
+            readonly meshes: AbstractMesh[];
+            /**
+             * (Re-)set the model's entire configuration
+             * @param newConfiguration the new configuration to replace the new one
+             */
+            configuration: IModelConfiguration;
+            /**
+                * Update the current configuration with new values.
+                * Configuration will not be overwritten, but merged with the new configuration.
+                * Priority is to the new configuration
+                * @param newConfiguration the configuration to be merged into the current configuration;
+                */
+            updateConfiguration(newConfiguration: Partial<IModelConfiguration>): void;
+            /**
+                * Add a new animation group to this model.
+                * @param animationGroup the new animation group to be added
+                */
+            addAnimationGroup(animationGroup: AnimationGroup): void;
+            /**
+                * Get the ModelAnimation array
+                */
+            getAnimations(): Array<IModelAnimation>;
+            /**
+                * Get the animations' names. Using the names you can play a specific animation.
+                */
+            getAnimationNames(): Array<string>;
+            /**
+                * Get an animation by the provided name. Used mainly when playing n animation.
+                * @param name the name of the animation to find
+                */
+            protected _getAnimationByName(name: string): Nullable<IModelAnimation>;
+            /**
+                * Choose an initialized animation using its name and start playing it
+                * @param name the name of the animation to play
+                * @returns The model aniamtion to be played.
+                */
+            playAnimation(name: string): IModelAnimation;
+            setCurrentAnimationByName(name: string): IModelAnimation;
+            /**
+                * Apply a material configuration to a material
+                * @param material Material to apply configuration to
+                * @hidden
+                */
+            _applyModelMaterialConfiguration(material: Material): void;
+            /**
+             * Begin @animations with the specified @easingFunction
+             * @param animations The BABYLON Animations to begin
+             * @param duration of transition, in seconds
+             * @param easingFunction An easing function to apply
+             * @param easingMode A easing mode to apply to the easingFunction
+             * @param onAnimationEnd Call back trigger at the end of the animation.
+             */
+            transitionTo(animations: Animation[], duration: number, easingFunction: any, easingMode: number | undefined, onAnimationEnd: () => void): void;
+            /**
+                * Stops and removes all animations that have been applied to the model
+                */
+            stopAllAnimations(): void;
+            /**
+                * Will remove this model from the viewer (but NOT dispose it).
+                */
+            remove(): void;
+            /**
+                * Dispose this model, including all of its associated assets.
+                */
+            dispose(): void;
+    }
 }
 }
 
 
 declare module 'babylonjs-viewer/model/modelAnimation' {
 declare module 'babylonjs-viewer/model/modelAnimation' {

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

@@ -17,6 +17,7 @@
   - Add uniform scaling drag support to scale gizmo ([TrevorDev](https://github.com/TrevorDev))
   - Add uniform scaling drag support to scale gizmo ([TrevorDev](https://github.com/TrevorDev))
   - Support interacting with child elements ([TrevorDev](https://github.com/TrevorDev))
   - Support interacting with child elements ([TrevorDev](https://github.com/TrevorDev))
   - BoundingBox gizmo support for including/excluding descendants when computing the bounding box ([TrevorDev](https://github.com/TrevorDev))
   - BoundingBox gizmo support for including/excluding descendants when computing the bounding box ([TrevorDev](https://github.com/TrevorDev))
+  - Drag start and stop events for bounding box drag and uniform scale drag ([TrevorDev](https://github.com/TrevorDev))
 - Particle system improvements ([Deltakosh](https://github.com/deltakosh))
 - Particle system improvements ([Deltakosh](https://github.com/deltakosh))
   - Added a ParticleHelper class to create some pre-configured particle systems in a one-liner method style. [Doc](https://doc.babylonjs.com/How_To/ParticleHelper) ([Deltakosh](https://github.com/deltakosh)) / ([DevChris](https://github.com/yovanoc))
   - Added a ParticleHelper class to create some pre-configured particle systems in a one-liner method style. [Doc](https://doc.babylonjs.com/How_To/ParticleHelper) ([Deltakosh](https://github.com/deltakosh)) / ([DevChris](https://github.com/yovanoc))
   - Improved CPU particles rendering performance (up to x2 on low end devices)
   - Improved CPU particles rendering performance (up to x2 on low end devices)
@@ -118,7 +119,7 @@
 - Added Video Recorder [Issue 4708](https://github.com/BabylonJS/Babylon.js/issues/4708) ([sebavan](http://www.github.com/sebavan))
 - Added Video Recorder [Issue 4708](https://github.com/BabylonJS/Babylon.js/issues/4708) ([sebavan](http://www.github.com/sebavan))
 - Added support for main WebGL2 texture formats ([PeapBoy](https://github.com/NicolasBuecher))
 - Added support for main WebGL2 texture formats ([PeapBoy](https://github.com/NicolasBuecher))
 - Added fadeInOutBehavior and tooltipText for holographic buttons ([TrevorDev](https://github.com/TrevorDev))
 - Added fadeInOutBehavior and tooltipText for holographic buttons ([TrevorDev](https://github.com/TrevorDev))
-- StartDrag method added to pointerDragBehavior to simulate the start of a drag ([TrevorDev](https://github.com/TrevorDev))
+- StartDrag method added to pointerDragBehavior used to simulate the start of a drag ([TrevorDev](https://github.com/TrevorDev))
 - Added EdgesLineRenderer to address [#4919](https://github.com/BabylonJS/Babylon.js/pull/4919) ([barteq100](https://github.com/barteq100))
 - Added EdgesLineRenderer to address [#4919](https://github.com/BabylonJS/Babylon.js/pull/4919) ([barteq100](https://github.com/barteq100))
 - Added ```ambientTextureImpactOnAnalyticalLights``` in PBRMaterial to allow fine grained control of the AmbientTexture on the analytical diffuse light ([sebavan](http://www.github.com/sebavan))
 - Added ```ambientTextureImpactOnAnalyticalLights``` in PBRMaterial to allow fine grained control of the AmbientTexture on the analytical diffuse light ([sebavan](http://www.github.com/sebavan))
 - BoundingBoxGizmo scalePivot field that can be used to always scale objects from the bottom ([TrevorDev](https://github.com/TrevorDev))
 - BoundingBoxGizmo scalePivot field that can be used to always scale objects from the bottom ([TrevorDev](https://github.com/TrevorDev))
@@ -198,7 +199,7 @@
 - Set missing parentId in Mesh.serialize() for instances ([julien-moreau](https://github.com/julien-moreau))
 - Set missing parentId in Mesh.serialize() for instances ([julien-moreau](https://github.com/julien-moreau))
 - Do not modify pivot point when using bounding box gizmo or behaviors ([TrevorDev](https://github.com/TrevorDev))
 - Do not modify pivot point when using bounding box gizmo or behaviors ([TrevorDev](https://github.com/TrevorDev))
 - GPUParticleSystem does not get stuck in burst loop when stopped and started ([TrevorDev](https://github.com/TrevorDev))
 - GPUParticleSystem does not get stuck in burst loop when stopped and started ([TrevorDev](https://github.com/TrevorDev))
-- trackPosition:false not working in webVRCamera ([TrevorDev](https://github.com/TrevorDev))
+- trackPosition:false not working in webVRCamera/controllers ([TrevorDev](https://github.com/TrevorDev))
 - Spring Joint could not be removed ([TrevorDev](https://github.com/TrevorDev))
 - Spring Joint could not be removed ([TrevorDev](https://github.com/TrevorDev))
 - Sometimes duplicate controller models are loaded in VR ([TrevorDev](https://github.com/TrevorDev))
 - Sometimes duplicate controller models are loaded in VR ([TrevorDev](https://github.com/TrevorDev))
 
 

+ 2 - 2
loaders/src/glTF/2.0/Extensions/EXT_lights_image_based.ts

@@ -1,6 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
-module BABYLON.GLTF2.Extensions {
+module BABYLON.GLTF2.Loader.Extensions {
     const NAME = "EXT_lights_image_based";
     const NAME = "EXT_lights_image_based";
 
 
     interface ILightReference {
     interface ILightReference {
@@ -56,7 +56,7 @@ module BABYLON.GLTF2.Extensions {
         }
         }
 
 
         /** @hidden */
         /** @hidden */
-        public loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>> { 
+        public loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>> { 
             return GLTFLoader.LoadExtensionAsync<ILightReference>(context, scene, this.name, (extensionContext, extension) => {
             return GLTFLoader.LoadExtensionAsync<ILightReference>(context, scene, this.name, (extensionContext, extension) => {
                 const promises = new Array<Promise<any>>();
                 const promises = new Array<Promise<any>>();
 
 

+ 4 - 4
loaders/src/glTF/2.0/Extensions/KHR_draco_mesh_compression.ts

@@ -1,6 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
-module BABYLON.GLTF2.Extensions {
+module BABYLON.GLTF2.Loader.Extensions {
     const NAME = "KHR_draco_mesh_compression";
     const NAME = "KHR_draco_mesh_compression";
 
 
     interface IKHRDracoMeshCompression {
     interface IKHRDracoMeshCompression {
@@ -8,7 +8,7 @@ module BABYLON.GLTF2.Extensions {
         attributes: { [name: string]: number };
         attributes: { [name: string]: number };
     }
     }
 
 
-    interface ILoaderBufferViewDraco extends ILoaderBufferView {
+    interface IBufferViewDraco extends IBufferView {
         _dracoBabylonGeometry?: Promise<Geometry>;
         _dracoBabylonGeometry?: Promise<Geometry>;
     }
     }
 
 
@@ -41,7 +41,7 @@ module BABYLON.GLTF2.Extensions {
         }
         }
 
 
         /** @hidden */
         /** @hidden */
-        public _loadVertexDataAsync(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> {
+        public _loadVertexDataAsync(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> {
             return GLTFLoader.LoadExtensionAsync<IKHRDracoMeshCompression, Geometry>(context, primitive, this.name, (extensionContext, extension) => {
             return GLTFLoader.LoadExtensionAsync<IKHRDracoMeshCompression, Geometry>(context, primitive, this.name, (extensionContext, extension) => {
                 if (primitive.mode != undefined) {
                 if (primitive.mode != undefined) {
                     if (primitive.mode !== MeshPrimitiveMode.TRIANGLE_STRIP &&
                     if (primitive.mode !== MeshPrimitiveMode.TRIANGLE_STRIP &&
@@ -79,7 +79,7 @@ module BABYLON.GLTF2.Extensions {
                 loadAttribute("WEIGHTS_0", VertexBuffer.MatricesWeightsKind);
                 loadAttribute("WEIGHTS_0", VertexBuffer.MatricesWeightsKind);
                 loadAttribute("COLOR_0", VertexBuffer.ColorKind);
                 loadAttribute("COLOR_0", VertexBuffer.ColorKind);
 
 
-                var bufferView = ArrayItem.Get(extensionContext, this._loader.gltf.bufferViews, extension.bufferView) as ILoaderBufferViewDraco;
+                var bufferView = ArrayItem.Get(extensionContext, this._loader.gltf.bufferViews, extension.bufferView) as IBufferViewDraco;
                 if (!bufferView._dracoBabylonGeometry) {
                 if (!bufferView._dracoBabylonGeometry) {
                     bufferView._dracoBabylonGeometry = this._loader.loadBufferViewAsync(`#/bufferViews/${bufferView.index}`, bufferView).then(data => {
                     bufferView._dracoBabylonGeometry = this._loader.loadBufferViewAsync(`#/bufferViews/${bufferView.index}`, bufferView).then(data => {
                         if (!this._dracoCompression) {
                         if (!this._dracoCompression) {

+ 6 - 6
loaders/src/glTF/2.0/Extensions/KHR_lights_punctual.ts

@@ -1,6 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
-module BABYLON.GLTF2.Extensions {
+module BABYLON.GLTF2.Loader.Extensions {
     const NAME = "KHR_lights_punctual";
     const NAME = "KHR_lights_punctual";
 
 
     enum LightType {
     enum LightType {
@@ -63,13 +63,13 @@ module BABYLON.GLTF2.Extensions {
         }
         }
 
 
         /** @hidden */
         /** @hidden */
-        public loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>> { 
+        public loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>> { 
             return GLTFLoader.LoadExtensionAsync<ILightReference, Mesh>(context, node, this.name, (extensionContext, extension) => {
             return GLTFLoader.LoadExtensionAsync<ILightReference, Mesh>(context, node, this.name, (extensionContext, extension) => {
                 return this._loader.loadNodeAsync(context, node, babylonMesh => {
                 return this._loader.loadNodeAsync(context, node, babylonMesh => {
                     let babylonLight: Light;
                     let babylonLight: Light;
 
 
-                    const name = babylonMesh.name;
                     const light = ArrayItem.Get(extensionContext, this._lights, extension.light);
                     const light = ArrayItem.Get(extensionContext, this._lights, extension.light);
+                    const name = light.name || babylonMesh.name;
 
 
                     switch (light.type) {
                     switch (light.type) {
                         case LightType.DIRECTIONAL: {
                         case LightType.DIRECTIONAL: {
@@ -81,9 +81,9 @@ module BABYLON.GLTF2.Extensions {
                             break;
                             break;
                         }
                         }
                         case LightType.SPOT: {
                         case LightType.SPOT: {
-                            const babylonSpotLight = new SpotLight(name, Vector3.Zero(), Vector3.Backward(), 0, 2, this._loader.babylonScene);
-                            babylonSpotLight.angle = light.spot && light.spot.outerConeAngle || Math.PI / 4;
-                            babylonSpotLight.innerAngle = light.spot && light.spot.innerConeAngle || 0;
+                            const babylonSpotLight = new SpotLight(name, Vector3.Zero(), Vector3.Backward(), 0, 1, this._loader.babylonScene);
+                            babylonSpotLight.angle = ((light.spot && light.spot.outerConeAngle) || Math.PI / 4) * 2;
+                            babylonSpotLight.innerAngle = ((light.spot && light.spot.innerConeAngle) || 0) * 2;
                             babylonLight = babylonSpotLight;
                             babylonLight = babylonSpotLight;
                             break;
                             break;
                         }
                         }

+ 3 - 3
loaders/src/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.ts

@@ -1,6 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
-module BABYLON.GLTF2.Extensions {
+module BABYLON.GLTF2.Loader.Extensions {
     const NAME = "KHR_materials_pbrSpecularGlossiness";
     const NAME = "KHR_materials_pbrSpecularGlossiness";
 
 
     interface IKHRMaterialsPbrSpecularGlossiness {
     interface IKHRMaterialsPbrSpecularGlossiness {
@@ -34,7 +34,7 @@ module BABYLON.GLTF2.Extensions {
         }
         }
 
 
         /** @hidden */
         /** @hidden */
-        public loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
+        public loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
             return GLTFLoader.LoadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, this.name, (extensionContext, extension) => {
             return GLTFLoader.LoadExtensionAsync<IKHRMaterialsPbrSpecularGlossiness>(context, material, this.name, (extensionContext, extension) => {
                 const promises = new Array<Promise<any>>();
                 const promises = new Array<Promise<any>>();
                 promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));
                 promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));
@@ -44,7 +44,7 @@ module BABYLON.GLTF2.Extensions {
             });
             });
         }
         }
 
 
-        private _loadSpecularGlossinessPropertiesAsync(context: string, material: ILoaderMaterial, properties: IKHRMaterialsPbrSpecularGlossiness, babylonMaterial: Material): Promise<void> {
+        private _loadSpecularGlossinessPropertiesAsync(context: string, material: IMaterial, properties: IKHRMaterialsPbrSpecularGlossiness, babylonMaterial: Material): Promise<void> {
             if (!(babylonMaterial instanceof PBRMaterial)) {
             if (!(babylonMaterial instanceof PBRMaterial)) {
                 throw new Error(`${context}: Material type not supported`);
                 throw new Error(`${context}: Material type not supported`);
             }
             }

+ 3 - 3
loaders/src/glTF/2.0/Extensions/KHR_materials_unlit.ts

@@ -1,6 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
-module BABYLON.GLTF2.Extensions {
+module BABYLON.GLTF2.Loader.Extensions {
     const NAME = "KHR_materials_unlit";
     const NAME = "KHR_materials_unlit";
 
 
     /**
     /**
@@ -26,13 +26,13 @@ module BABYLON.GLTF2.Extensions {
         }
         }
 
 
         /** @hidden */
         /** @hidden */
-        public loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
+        public loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
             return GLTFLoader.LoadExtensionAsync(context, material, this.name, () => {
             return GLTFLoader.LoadExtensionAsync(context, material, this.name, () => {
                 return this._loadUnlitPropertiesAsync(context, material, babylonMaterial);
                 return this._loadUnlitPropertiesAsync(context, material, babylonMaterial);
             });
             });
         }
         }
 
 
-        private _loadUnlitPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Promise<void> {
+        private _loadUnlitPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Promise<void> {
             if (!(babylonMaterial instanceof PBRMaterial)) {
             if (!(babylonMaterial instanceof PBRMaterial)) {
                 throw new Error(`${context}: Material type not supported`);
                 throw new Error(`${context}: Material type not supported`);
             }
             }

+ 2 - 2
loaders/src/glTF/2.0/Extensions/KHR_texture_transform.ts

@@ -1,6 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
-module BABYLON.GLTF2.Extensions {
+module BABYLON.GLTF2.Loader.Extensions {
     const NAME = "KHR_texture_transform";
     const NAME = "KHR_texture_transform";
 
 
     interface IKHRTextureTransform {
     interface IKHRTextureTransform {
@@ -11,7 +11,7 @@ module BABYLON.GLTF2.Extensions {
     }
     }
 
 
     /**
     /**
-     * [Specification](https://github.com/AltspaceVR/glTF/blob/avr-sampler-offset-tile/extensions/2.0/Khronos/KHR_texture_transform/README.md) (Experimental)
+     * [Specification](https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md)
      */
      */
     export class KHR_texture_transform implements IGLTFLoaderExtension {
     export class KHR_texture_transform implements IGLTFLoaderExtension {
         /** The name of this extension. */
         /** The name of this extension. */

+ 5 - 5
loaders/src/glTF/2.0/Extensions/MSFT_audio_emitter.ts

@@ -1,6 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
-module BABYLON.GLTF2.Extensions {
+module BABYLON.GLTF2.Loader.Extensions {
     const NAME = "MSFT_audio_emitter";
     const NAME = "MSFT_audio_emitter";
 
 
     interface IClipReference {
     interface IClipReference {
@@ -119,7 +119,7 @@ module BABYLON.GLTF2.Extensions {
         }
         }
 
 
         /** @hidden */
         /** @hidden */
-        public loadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>> {
+        public loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>> {
             return GLTFLoader.LoadExtensionAsync<IEmittersReference>(context, scene, this.name, (extensionContext, extension) => {
             return GLTFLoader.LoadExtensionAsync<IEmittersReference>(context, scene, this.name, (extensionContext, extension) => {
                 const promises = new Array<Promise<any>>();
                 const promises = new Array<Promise<any>>();
 
 
@@ -140,7 +140,7 @@ module BABYLON.GLTF2.Extensions {
         }
         }
 
 
         /** @hidden */
         /** @hidden */
-        public loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>> {
+        public loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>> {
             return GLTFLoader.LoadExtensionAsync<IEmittersReference, Mesh>(context, node, this.name, (extensionContext, extension) => {
             return GLTFLoader.LoadExtensionAsync<IEmittersReference, Mesh>(context, node, this.name, (extensionContext, extension) => {
                 const promises = new Array<Promise<any>>();
                 const promises = new Array<Promise<any>>();
 
 
@@ -171,7 +171,7 @@ module BABYLON.GLTF2.Extensions {
         }
         }
 
 
         /** @hidden */
         /** @hidden */
-        public loadAnimationAsync(context: string, animation: ILoaderAnimation): Nullable<Promise<AnimationGroup>> {
+        public loadAnimationAsync(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>> {
             return GLTFLoader.LoadExtensionAsync<ILoaderAnimationEvents, AnimationGroup>(context, animation, this.name, (extensionContext, extension) => {
             return GLTFLoader.LoadExtensionAsync<ILoaderAnimationEvents, AnimationGroup>(context, animation, this.name, (extensionContext, extension) => {
                 return this._loader.loadAnimationAsync(context, animation).then(babylonAnimationGroup => {
                 return this._loader.loadAnimationAsync(context, animation).then(babylonAnimationGroup => {
                     const promises = new Array<Promise<any>>();
                     const promises = new Array<Promise<any>>();
@@ -274,7 +274,7 @@ module BABYLON.GLTF2.Extensions {
             }
             }
         }
         }
 
 
-        private _loadAnimationEventAsync(context: string, animationContext: string, animation: ILoaderAnimation, event: ILoaderAnimationEvent, babylonAnimationGroup: AnimationGroup): Promise<void> {
+        private _loadAnimationEventAsync(context: string, animationContext: string, animation: IAnimation, event: ILoaderAnimationEvent, babylonAnimationGroup: AnimationGroup): Promise<void> {
             if (babylonAnimationGroup.targetedAnimations.length == 0) {
             if (babylonAnimationGroup.targetedAnimations.length == 0) {
                 return Promise.resolve();
                 return Promise.resolve();
             }
             }

+ 3 - 3
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts

@@ -1,6 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
-module BABYLON.GLTF2.Extensions {
+module BABYLON.GLTF2.Loader.Extensions {
     const NAME = "MSFT_lod";
     const NAME = "MSFT_lod";
 
 
     interface IMSFTLOD {
     interface IMSFTLOD {
@@ -111,7 +111,7 @@ module BABYLON.GLTF2.Extensions {
         }
         }
 
 
         /** @hidden */
         /** @hidden */
-        public loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>> {
+        public loadNodeAsync(context: string, node: INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>> {
             return GLTFLoader.LoadExtensionAsync<IMSFTLOD, Mesh>(context, node, this.name, (extensionContext, extension) => {
             return GLTFLoader.LoadExtensionAsync<IMSFTLOD, Mesh>(context, node, this.name, (extensionContext, extension) => {
                 let firstPromise: Promise<Mesh>;
                 let firstPromise: Promise<Mesh>;
 
 
@@ -157,7 +157,7 @@ module BABYLON.GLTF2.Extensions {
         }
         }
 
 
         /** @hidden */
         /** @hidden */
-        public _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>> {
+        public _loadMaterialAsync(context: string, material: IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>> {
             // Don't load material LODs if already loading a node LOD.
             // Don't load material LODs if already loading a node LOD.
             if (this._nodeIndexLOD) {
             if (this._nodeIndexLOD) {
                 return null;
                 return null;

+ 2 - 2
loaders/src/glTF/2.0/Extensions/MSFT_minecraftMesh.ts

@@ -1,6 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
-module BABYLON.GLTF2.Extensions {
+module BABYLON.GLTF2.Loader.Extensions {
     const NAME = "MSFT_minecraftMesh";
     const NAME = "MSFT_minecraftMesh";
 
 
     /** @hidden */
     /** @hidden */
@@ -18,7 +18,7 @@ module BABYLON.GLTF2.Extensions {
             delete this._loader;
             delete this._loader;
         }
         }
 
 
-        public loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
+        public loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
             return GLTFLoader.LoadExtraAsync<boolean>(context, material, this.name, (extraContext, extra) => {
             return GLTFLoader.LoadExtraAsync<boolean>(context, material, this.name, (extraContext, extra) => {
                 if (extra) {
                 if (extra) {
                     if (!(babylonMaterial instanceof PBRMaterial)) {
                     if (!(babylonMaterial instanceof PBRMaterial)) {

+ 2 - 2
loaders/src/glTF/2.0/Extensions/MSFT_sRGBFactors.ts

@@ -1,6 +1,6 @@
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../../dist/preview release/babylon.d.ts"/>
 
 
-module BABYLON.GLTF2.Extensions {
+module BABYLON.GLTF2.Loader.Extensions {
     const NAME = "MSFT_sRGBFactors";
     const NAME = "MSFT_sRGBFactors";
 
 
     /** @hidden */
     /** @hidden */
@@ -18,7 +18,7 @@ module BABYLON.GLTF2.Extensions {
             delete this._loader;
             delete this._loader;
         }
         }
 
 
-        public loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
+        public loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
             return GLTFLoader.LoadExtraAsync<boolean>(context, material, this.name, (extraContext, extra) => {
             return GLTFLoader.LoadExtraAsync<boolean>(context, material, this.name, (extraContext, extra) => {
                 if (extra) {
                 if (extra) {
                     if (!(babylonMaterial instanceof PBRMaterial)) {
                     if (!(babylonMaterial instanceof PBRMaterial)) {

+ 52 - 52
loaders/src/glTF/2.0/babylon.glTFLoader.ts

@@ -37,7 +37,7 @@ module BABYLON.GLTF2 {
          * Assign an `index` field to each item of the given array.
          * Assign an `index` field to each item of the given array.
          * @param array The array of items
          * @param array The array of items
          */
          */
-        public static Assign(array?: IArrayItem[]): void {
+        public static Assign(array?: Loader.IArrayItem[]): void {
             if (array) {
             if (array) {
                 for (let index = 0; index < array.length; index++) {
                 for (let index = 0; index < array.length; index++) {
                     array[index].index = index;
                     array[index].index = index;
@@ -51,7 +51,7 @@ module BABYLON.GLTF2 {
      */
      */
     export class GLTFLoader implements IGLTFLoader {
     export class GLTFLoader implements IGLTFLoader {
         /** The glTF object parsed from the JSON. */
         /** The glTF object parsed from the JSON. */
-        public gltf: ILoaderGLTF;
+        public gltf: Loader.IGLTF;
 
 
         /** The Babylon scene when loading the asset. */
         /** The Babylon scene when loading the asset. */
         public babylonScene: Scene;
         public babylonScene: Scene;
@@ -71,7 +71,7 @@ module BABYLON.GLTF2 {
         private _progressCallback?: (event: SceneLoaderProgressEvent) => void;
         private _progressCallback?: (event: SceneLoaderProgressEvent) => void;
         private _requests = new Array<IFileRequestInfo>();
         private _requests = new Array<IFileRequestInfo>();
 
 
-        private static readonly _DefaultSampler: ILoaderSampler = { index: -1 };
+        private static readonly _DefaultSampler: Loader.ISampler = { index: -1 };
 
 
         private static _ExtensionNames = new Array<string>();
         private static _ExtensionNames = new Array<string>();
         private static _ExtensionFactories: { [name: string]: (loader: GLTFLoader) => IGLTFLoaderExtension } = {};
         private static _ExtensionFactories: { [name: string]: (loader: GLTFLoader) => IGLTFLoaderExtension } = {};
@@ -293,7 +293,7 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         private _loadData(data: IGLTFLoaderData): void {
         private _loadData(data: IGLTFLoaderData): void {
-            this.gltf = data.json as ILoaderGLTF;
+            this.gltf = data.json as Loader.IGLTF;
             this._setupData();
             this._setupData();
 
 
             if (data.bin) {
             if (data.bin) {
@@ -372,10 +372,10 @@ module BABYLON.GLTF2 {
             this.log(GLTFLoaderState[this._state]);
             this.log(GLTFLoaderState[this._state]);
         }
         }
 
 
-        private _createRootNode(): ILoaderNode {
+        private _createRootNode(): Loader.INode {
             this._rootBabylonMesh = new Mesh("__root__", this.babylonScene);
             this._rootBabylonMesh = new Mesh("__root__", this.babylonScene);
 
 
-            const rootNode: ILoaderNode = {
+            const rootNode: Loader.INode = {
                 _babylonMesh: this._rootBabylonMesh,
                 _babylonMesh: this._rootBabylonMesh,
                 index: -1
                 index: -1
             };
             };
@@ -408,7 +408,7 @@ module BABYLON.GLTF2 {
          * @param scene The glTF scene property
          * @param scene The glTF scene property
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        public loadSceneAsync(context: string, scene: ILoaderScene): Promise<void> {
+        public loadSceneAsync(context: string, scene: Loader.IScene): Promise<void> {
             const extensionPromise = this._extensionsLoadSceneAsync(context, scene);
             const extensionPromise = this._extensionsLoadSceneAsync(context, scene);
             if (extensionPromise) {
             if (extensionPromise) {
                 return extensionPromise;
                 return extensionPromise;
@@ -434,7 +434,7 @@ module BABYLON.GLTF2 {
             return Promise.all(promises).then(() => {});
             return Promise.all(promises).then(() => {});
         }
         }
 
 
-        private _forEachPrimitive(node: ILoaderNode, callback: (babylonMesh: Mesh) => void): void {
+        private _forEachPrimitive(node: Loader.INode, callback: (babylonMesh: Mesh) => void): void {
             if (node._primitiveBabylonMeshes) {
             if (node._primitiveBabylonMeshes) {
                 for (const babylonMesh of node._primitiveBabylonMeshes) {
                 for (const babylonMesh of node._primitiveBabylonMeshes) {
                     callback(babylonMesh);
                     callback(babylonMesh);
@@ -533,7 +533,7 @@ module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete
          */
          */
-        public loadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void = () => {}): Promise<Mesh> {
+        public loadNodeAsync(context: string, node: Loader.INode, assign: (babylonMesh: Mesh) => void = () => {}): Promise<Mesh> {
             const extensionPromise = this._extensionsLoadNodeAsync(context, node, assign);
             const extensionPromise = this._extensionsLoadNodeAsync(context, node, assign);
             if (extensionPromise) {
             if (extensionPromise) {
                 return extensionPromise;
                 return extensionPromise;
@@ -591,7 +591,7 @@ module BABYLON.GLTF2 {
             });
             });
         }
         }
 
 
-        private _loadMeshAsync(context: string, node: ILoaderNode, mesh: ILoaderMesh, babylonMesh: Mesh): Promise<void> {
+        private _loadMeshAsync(context: string, node: Loader.INode, mesh: Loader.IMesh, babylonMesh: Mesh): Promise<void> {
             const promises = new Array<Promise<any>>();
             const promises = new Array<Promise<any>>();
 
 
             this.logOpen(`${context} ${mesh.name || ""}`);
             this.logOpen(`${context} ${mesh.name || ""}`);
@@ -630,7 +630,7 @@ module BABYLON.GLTF2 {
             });
             });
         }
         }
 
 
-        private _loadMeshPrimitiveAsync(context: string, node: ILoaderNode, mesh: ILoaderMesh, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Promise<void> {
+        private _loadMeshPrimitiveAsync(context: string, node: Loader.INode, mesh: Loader.IMesh, primitive: Loader.IMeshPrimitive, babylonMesh: Mesh): Promise<void> {
             const promises = new Array<Promise<any>>();
             const promises = new Array<Promise<any>>();
 
 
             this.logOpen(`${context}`);
             this.logOpen(`${context}`);
@@ -664,7 +664,7 @@ module BABYLON.GLTF2 {
             return Promise.all(promises).then(() => {});
             return Promise.all(promises).then(() => {});
         }
         }
 
 
-        private _loadVertexDataAsync(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Promise<Geometry> {
+        private _loadVertexDataAsync(context: string, primitive: Loader.IMeshPrimitive, babylonMesh: Mesh): Promise<Geometry> {
             const extensionPromise = this._extensionsLoadVertexDataAsync(context, primitive, babylonMesh);
             const extensionPromise = this._extensionsLoadVertexDataAsync(context, primitive, babylonMesh);
             if (extensionPromise) {
             if (extensionPromise) {
                 return extensionPromise;
                 return extensionPromise;
@@ -689,7 +689,7 @@ module BABYLON.GLTF2 {
                 }));
                 }));
             }
             }
 
 
-            const loadAttribute = (attribute: string, kind: string, callback?: (accessor: ILoaderAccessor) => void) => {
+            const loadAttribute = (attribute: string, kind: string, callback?: (accessor: Loader.IAccessor) => void) => {
                 if (attributes[attribute] == undefined) {
                 if (attributes[attribute] == undefined) {
                     return;
                     return;
                 }
                 }
@@ -727,7 +727,7 @@ module BABYLON.GLTF2 {
             });
             });
         }
         }
 
 
-        private _createMorphTargets(context: string, node: ILoaderNode, mesh: ILoaderMesh, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): void {
+        private _createMorphTargets(context: string, node: Loader.INode, mesh: Loader.IMesh, primitive: Loader.IMeshPrimitive, babylonMesh: Mesh): void {
             if (!primitive.targets) {
             if (!primitive.targets) {
                 return;
                 return;
             }
             }
@@ -747,7 +747,7 @@ module BABYLON.GLTF2 {
             }
             }
         }
         }
 
 
-        private _loadMorphTargetsAsync(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh, babylonGeometry: Geometry): Promise<void> {
+        private _loadMorphTargetsAsync(context: string, primitive: Loader.IMeshPrimitive, babylonMesh: Mesh, babylonGeometry: Geometry): Promise<void> {
             if (!primitive.targets) {
             if (!primitive.targets) {
                 return Promise.resolve();
                 return Promise.resolve();
             }
             }
@@ -814,7 +814,7 @@ module BABYLON.GLTF2 {
             return Promise.all(promises).then(() => {});
             return Promise.all(promises).then(() => {});
         }
         }
 
 
-        private static _LoadTransform(node: ILoaderNode, babylonNode: TransformNode): void {
+        private static _LoadTransform(node: Loader.INode, babylonNode: TransformNode): void {
             let position = Vector3.Zero();
             let position = Vector3.Zero();
             let rotation = Quaternion.Identity();
             let rotation = Quaternion.Identity();
             let scaling = Vector3.One();
             let scaling = Vector3.One();
@@ -834,7 +834,7 @@ module BABYLON.GLTF2 {
             babylonNode.scaling = scaling;
             babylonNode.scaling = scaling;
         }
         }
 
 
-        private _loadSkinAsync(context: string, node: ILoaderNode, skin: ILoaderSkin): Promise<void> {
+        private _loadSkinAsync(context: string, node: Loader.INode, skin: Loader.ISkin): Promise<void> {
             const assignSkeleton = (skeleton: Skeleton) => {
             const assignSkeleton = (skeleton: Skeleton) => {
                 this._forEachPrimitive(node, babylonMesh => {
                 this._forEachPrimitive(node, babylonMesh => {
                     babylonMesh.skeleton = skeleton;
                     babylonMesh.skeleton = skeleton;
@@ -864,7 +864,7 @@ module BABYLON.GLTF2 {
             }));
             }));
         }
         }
 
 
-        private _loadBones(context: string, skin: ILoaderSkin): void {
+        private _loadBones(context: string, skin: Loader.ISkin): void {
             const babylonBones: { [index: number]: Bone } = {};
             const babylonBones: { [index: number]: Bone } = {};
             for (const index of skin.joints) {
             for (const index of skin.joints) {
                 const node = ArrayItem.Get(`${context}/joints/${index}`, this.gltf.nodes, index);
                 const node = ArrayItem.Get(`${context}/joints/${index}`, this.gltf.nodes, index);
@@ -872,7 +872,7 @@ module BABYLON.GLTF2 {
             }
             }
         }
         }
 
 
-        private _loadBone(node: ILoaderNode, skin: ILoaderSkin, babylonBones: { [index: number]: Bone }): Bone {
+        private _loadBone(node: Loader.INode, skin: Loader.ISkin, babylonBones: { [index: number]: Bone }): Bone {
             let babylonBone = babylonBones[node.index];
             let babylonBone = babylonBones[node.index];
             if (babylonBone) {
             if (babylonBone) {
                 return babylonBone;
                 return babylonBone;
@@ -894,7 +894,7 @@ module BABYLON.GLTF2 {
             return babylonBone;
             return babylonBone;
         }
         }
 
 
-        private _loadSkinInverseBindMatricesDataAsync(context: string, skin: ILoaderSkin): Promise<Nullable<Float32Array>> {
+        private _loadSkinInverseBindMatricesDataAsync(context: string, skin: Loader.ISkin): Promise<Nullable<Float32Array>> {
             if (skin.inverseBindMatrices == undefined) {
             if (skin.inverseBindMatrices == undefined) {
                 return Promise.resolve(null);
                 return Promise.resolve(null);
             }
             }
@@ -922,7 +922,7 @@ module BABYLON.GLTF2 {
             }
             }
         }
         }
 
 
-        private _getNodeMatrix(node: ILoaderNode): Matrix {
+        private _getNodeMatrix(node: Loader.INode): Matrix {
             return node.matrix ?
             return node.matrix ?
                 Matrix.FromArray(node.matrix) :
                 Matrix.FromArray(node.matrix) :
                 Matrix.Compose(
                 Matrix.Compose(
@@ -938,7 +938,7 @@ module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete
          */
          */
-        public loadCameraAsync(context: string, camera: ILoaderCamera, assign: (babylonCamera: Camera) => void = () => {}): Promise<Camera> {
+        public loadCameraAsync(context: string, camera: Loader.ICamera, assign: (babylonCamera: Camera) => void = () => {}): Promise<Camera> {
             const extensionPromise = this._extensionsLoadCameraAsync(context, camera, assign);
             const extensionPromise = this._extensionsLoadCameraAsync(context, camera, assign);
             if (extensionPromise) {
             if (extensionPromise) {
                 return extensionPromise;
                 return extensionPromise;
@@ -1012,7 +1012,7 @@ module BABYLON.GLTF2 {
          * @param animation The glTF animation property
          * @param animation The glTF animation property
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete
          */
          */
-        public loadAnimationAsync(context: string, animation: ILoaderAnimation): Promise<AnimationGroup> {
+        public loadAnimationAsync(context: string, animation: Loader.IAnimation): Promise<AnimationGroup> {
             const promise = this._extensionsLoadAnimationAsync(context, animation);
             const promise = this._extensionsLoadAnimationAsync(context, animation);
             if (promise) {
             if (promise) {
                 return promise;
                 return promise;
@@ -1036,7 +1036,7 @@ module BABYLON.GLTF2 {
             });
             });
         }
         }
 
 
-        private _loadAnimationChannelAsync(context: string, animationContext: string, animation: ILoaderAnimation, channel: ILoaderAnimationChannel, babylonAnimationGroup: AnimationGroup): Promise<void> {
+        private _loadAnimationChannelAsync(context: string, animationContext: string, animation: Loader.IAnimation, channel: Loader.IAnimationChannel, babylonAnimationGroup: AnimationGroup): Promise<void> {
             const targetNode = ArrayItem.Get(`${context}/target/node`, this.gltf.nodes, channel.target.node);
             const targetNode = ArrayItem.Get(`${context}/target/node`, this.gltf.nodes, channel.target.node);
 
 
             // Ignore animations that have no animation targets.
             // Ignore animations that have no animation targets.
@@ -1192,7 +1192,7 @@ module BABYLON.GLTF2 {
             });
             });
         }
         }
 
 
-        private _loadAnimationSamplerAsync(context: string, sampler: ILoaderAnimationSampler): Promise<_ILoaderAnimationSamplerData> {
+        private _loadAnimationSamplerAsync(context: string, sampler: Loader.IAnimationSampler): Promise<Loader._IAnimationSamplerData> {
             if (sampler._data) {
             if (sampler._data) {
                 return sampler._data;
                 return sampler._data;
             }
             }
@@ -1225,7 +1225,7 @@ module BABYLON.GLTF2 {
             return sampler._data;
             return sampler._data;
         }
         }
 
 
-        private _loadBufferAsync(context: string, buffer: ILoaderBuffer): Promise<ArrayBufferView> {
+        private _loadBufferAsync(context: string, buffer: Loader.IBuffer): Promise<ArrayBufferView> {
             if (buffer._data) {
             if (buffer._data) {
                 return buffer._data;
                 return buffer._data;
             }
             }
@@ -1245,7 +1245,7 @@ module BABYLON.GLTF2 {
          * @param bufferView The glTF buffer view property
          * @param bufferView The glTF buffer view property
          * @returns A promise that resolves with the loaded data when the load is complete
          * @returns A promise that resolves with the loaded data when the load is complete
          */
          */
-        public loadBufferViewAsync(context: string, bufferView: ILoaderBufferView): Promise<ArrayBufferView> {
+        public loadBufferViewAsync(context: string, bufferView: Loader.IBufferView): Promise<ArrayBufferView> {
             if (bufferView._data) {
             if (bufferView._data) {
                 return bufferView._data;
                 return bufferView._data;
             }
             }
@@ -1263,7 +1263,7 @@ module BABYLON.GLTF2 {
             return bufferView._data;
             return bufferView._data;
         }
         }
 
 
-        private _loadIndicesAccessorAsync(context: string, accessor: ILoaderAccessor): Promise<IndicesArray> {
+        private _loadIndicesAccessorAsync(context: string, accessor: Loader.IAccessor): Promise<IndicesArray> {
             if (accessor.type !== AccessorType.SCALAR) {
             if (accessor.type !== AccessorType.SCALAR) {
                 throw new Error(`${context}/type: Invalid value ${accessor.type}`);
                 throw new Error(`${context}/type: Invalid value ${accessor.type}`);
             }
             }
@@ -1286,7 +1286,7 @@ module BABYLON.GLTF2 {
             return accessor._data as Promise<IndicesArray>;
             return accessor._data as Promise<IndicesArray>;
         }
         }
 
 
-        private _loadFloatAccessorAsync(context: string, accessor: ILoaderAccessor): Promise<Float32Array> {
+        private _loadFloatAccessorAsync(context: string, accessor: Loader.IAccessor): Promise<Float32Array> {
             // TODO: support normalized and stride
             // TODO: support normalized and stride
 
 
             if (accessor.componentType !== AccessorComponentType.FLOAT) {
             if (accessor.componentType !== AccessorComponentType.FLOAT) {
@@ -1338,7 +1338,7 @@ module BABYLON.GLTF2 {
             return accessor._data as Promise<Float32Array>;
             return accessor._data as Promise<Float32Array>;
         }
         }
 
 
-        private _loadVertexBufferViewAsync(bufferView: ILoaderBufferView, kind: string): Promise<Buffer> {
+        private _loadVertexBufferViewAsync(bufferView: Loader.IBufferView, kind: string): Promise<Buffer> {
             if (bufferView._babylonBuffer) {
             if (bufferView._babylonBuffer) {
                 return bufferView._babylonBuffer;
                 return bufferView._babylonBuffer;
             }
             }
@@ -1350,7 +1350,7 @@ module BABYLON.GLTF2 {
             return bufferView._babylonBuffer;
             return bufferView._babylonBuffer;
         }
         }
 
 
-        private _loadVertexAccessorAsync(context: string, accessor: ILoaderAccessor, kind: string): Promise<VertexBuffer> {
+        private _loadVertexAccessorAsync(context: string, accessor: Loader.IAccessor, kind: string): Promise<VertexBuffer> {
             if (accessor._babylonVertexBuffer) {
             if (accessor._babylonVertexBuffer) {
                 return accessor._babylonVertexBuffer;
                 return accessor._babylonVertexBuffer;
             }
             }
@@ -1379,7 +1379,7 @@ module BABYLON.GLTF2 {
             return accessor._babylonVertexBuffer;
             return accessor._babylonVertexBuffer;
         }
         }
 
 
-        private _loadMaterialMetallicRoughnessPropertiesAsync(context: string, material: ILoaderMaterial, properties: ILoaderMaterialPbrMetallicRoughness, babylonMaterial: Material): Promise<void> {
+        private _loadMaterialMetallicRoughnessPropertiesAsync(context: string, properties: Loader.IMaterialPbrMetallicRoughness, babylonMaterial: Material): Promise<void> {
             if (!(babylonMaterial instanceof PBRMaterial)) {
             if (!(babylonMaterial instanceof PBRMaterial)) {
                 throw new Error(`${context}: Material type not supported`);
                 throw new Error(`${context}: Material type not supported`);
             }
             }
@@ -1419,7 +1419,7 @@ module BABYLON.GLTF2 {
         }
         }
 
 
         /** @hidden */
         /** @hidden */
-        public _loadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void = () => {}): Promise<Material> {
+        public _loadMaterialAsync(context: string, material: Loader.IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void = () => {}): Promise<Material> {
             const extensionPromise = this._extensionsLoadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign);
             const extensionPromise = this._extensionsLoadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign);
             if (extensionPromise) {
             if (extensionPromise) {
                 return extensionPromise;
                 return extensionPromise;
@@ -1481,7 +1481,7 @@ module BABYLON.GLTF2 {
          * @param babylonDrawMode The draw mode for the Babylon material
          * @param babylonDrawMode The draw mode for the Babylon material
          * @returns The Babylon material
          * @returns The Babylon material
          */
          */
-        public createMaterial(context: string, material: ILoaderMaterial, babylonDrawMode: number): Material {
+        public createMaterial(context: string, material: Loader.IMaterial, babylonDrawMode: number): Material {
             const extensionPromise = this._extensionsCreateMaterial(context, material, babylonDrawMode);
             const extensionPromise = this._extensionsCreateMaterial(context, material, babylonDrawMode);
             if (extensionPromise) {
             if (extensionPromise) {
                 return extensionPromise;
                 return extensionPromise;
@@ -1498,7 +1498,7 @@ module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        public loadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Promise<void> {
+        public loadMaterialPropertiesAsync(context: string, material: Loader.IMaterial, babylonMaterial: Material): Promise<void> {
             const extensionPromise = this._extensionsLoadMaterialPropertiesAsync(context, material, babylonMaterial);
             const extensionPromise = this._extensionsLoadMaterialPropertiesAsync(context, material, babylonMaterial);
             if (extensionPromise) {
             if (extensionPromise) {
                 return extensionPromise;
                 return extensionPromise;
@@ -1509,7 +1509,7 @@ module BABYLON.GLTF2 {
             promises.push(this.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));
             promises.push(this.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));
 
 
             if (material.pbrMetallicRoughness) {
             if (material.pbrMetallicRoughness) {
-                promises.push(this._loadMaterialMetallicRoughnessPropertiesAsync(`${context}/pbrMetallicRoughness`, material, material.pbrMetallicRoughness, babylonMaterial));
+                promises.push(this._loadMaterialMetallicRoughnessPropertiesAsync(`${context}/pbrMetallicRoughness`, material.pbrMetallicRoughness, babylonMaterial));
             }
             }
 
 
             this.loadMaterialAlphaProperties(context, material, babylonMaterial);
             this.loadMaterialAlphaProperties(context, material, babylonMaterial);
@@ -1524,7 +1524,7 @@ module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete
          * @returns A promise that resolves when the load is complete
          */
          */
-        public loadMaterialBasePropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Promise<void> {
+        public loadMaterialBasePropertiesAsync(context: string, material: Loader.IMaterial, babylonMaterial: Material): Promise<void> {
             if (!(babylonMaterial instanceof PBRMaterial)) {
             if (!(babylonMaterial instanceof PBRMaterial)) {
                 throw new Error(`${context}: Material type not supported`);
                 throw new Error(`${context}: Material type not supported`);
             }
             }
@@ -1576,7 +1576,7 @@ module BABYLON.GLTF2 {
          * @param material The glTF material property
          * @param material The glTF material property
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          */
          */
-        public loadMaterialAlphaProperties(context: string, material: ILoaderMaterial, babylonMaterial: Material): void {
+        public loadMaterialAlphaProperties(context: string, material: Loader.IMaterial, babylonMaterial: Material): void {
             if (!(babylonMaterial instanceof PBRMaterial)) {
             if (!(babylonMaterial instanceof PBRMaterial)) {
                 throw new Error(`${context}: Material type not supported`);
                 throw new Error(`${context}: Material type not supported`);
             }
             }
@@ -1616,7 +1616,7 @@ module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete
          */
          */
-        public loadTextureInfoAsync(context: string, textureInfo: ILoaderTextureInfo, assign: (babylonTexture: BaseTexture) => void = () => {}): Promise<BaseTexture> {
+        public loadTextureInfoAsync(context: string, textureInfo: Loader.ITextureInfo, assign: (babylonTexture: BaseTexture) => void = () => {}): Promise<BaseTexture> {
             const extensionPromise = this._extensionsLoadTextureInfoAsync(context, textureInfo, assign);
             const extensionPromise = this._extensionsLoadTextureInfoAsync(context, textureInfo, assign);
             if (extensionPromise) {
             if (extensionPromise) {
                 return extensionPromise;
                 return extensionPromise;
@@ -1635,7 +1635,7 @@ module BABYLON.GLTF2 {
             return promise;
             return promise;
         }
         }
 
 
-        private _loadTextureAsync(context: string, texture: ILoaderTexture, assign: (babylonTexture: BaseTexture) => void = () => {}): Promise<BaseTexture> {
+        private _loadTextureAsync(context: string, texture: Loader.ITexture, assign: (babylonTexture: BaseTexture) => void = () => {}): Promise<BaseTexture> {
             const promises = new Array<Promise<any>>();
             const promises = new Array<Promise<any>>();
 
 
             this.logOpen(`${context} ${texture.name || ""}`);
             this.logOpen(`${context} ${texture.name || ""}`);
@@ -1676,7 +1676,7 @@ module BABYLON.GLTF2 {
             });
             });
         }
         }
 
 
-        private _loadSampler(context: string, sampler: ILoaderSampler): _ILoaderSamplerData {
+        private _loadSampler(context: string, sampler: Loader.ISampler): Loader._ISamplerData {
             if (!sampler._data) {
             if (!sampler._data) {
                 sampler._data = {
                 sampler._data = {
                     noMipMaps: (sampler.minFilter === TextureMinFilter.NEAREST || sampler.minFilter === TextureMinFilter.LINEAR),
                     noMipMaps: (sampler.minFilter === TextureMinFilter.NEAREST || sampler.minFilter === TextureMinFilter.LINEAR),
@@ -1695,7 +1695,7 @@ module BABYLON.GLTF2 {
          * @param image The glTF image property
          * @param image The glTF image property
          * @returns A promise that resolves with the loaded data when the load is complete
          * @returns A promise that resolves with the loaded data when the load is complete
          */
          */
-        public loadImageAsync(context: string, image: ILoaderImage): Promise<ArrayBufferView> {
+        public loadImageAsync(context: string, image: Loader.IImage): Promise<ArrayBufferView> {
             if (!image._data) {
             if (!image._data) {
                 this.logOpen(`${context} ${image.name || ""}`);
                 this.logOpen(`${context} ${image.name || ""}`);
 
 
@@ -1810,7 +1810,7 @@ module BABYLON.GLTF2 {
             }
             }
         }
         }
 
 
-        private static _GetTextureSamplingMode(context: string, sampler: ILoaderSampler): number {
+        private static _GetTextureSamplingMode(context: string, sampler: Loader.ISampler): number {
             // Set defaults if undefined
             // Set defaults if undefined
             const magFilter = sampler.magFilter == undefined ? TextureMagFilter.LINEAR : sampler.magFilter;
             const magFilter = sampler.magFilter == undefined ? TextureMagFilter.LINEAR : sampler.magFilter;
             const minFilter = sampler.minFilter == undefined ? TextureMinFilter.LINEAR_MIPMAP_LINEAR : sampler.minFilter;
             const minFilter = sampler.minFilter == undefined ? TextureMinFilter.LINEAR_MIPMAP_LINEAR : sampler.minFilter;
@@ -1994,39 +1994,39 @@ module BABYLON.GLTF2 {
             this._forEachExtensions(extension => extension.onReady && extension.onReady());
             this._forEachExtensions(extension => extension.onReady && extension.onReady());
         }
         }
 
 
-        private _extensionsLoadSceneAsync(context: string, scene: ILoaderScene): Nullable<Promise<void>> {
+        private _extensionsLoadSceneAsync(context: string, scene: Loader.IScene): Nullable<Promise<void>> {
             return this._applyExtensions(scene, extension => extension.loadSceneAsync && extension.loadSceneAsync(context, scene));
             return this._applyExtensions(scene, extension => extension.loadSceneAsync && extension.loadSceneAsync(context, scene));
         }
         }
 
 
-        private _extensionsLoadNodeAsync(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>> {
+        private _extensionsLoadNodeAsync(context: string, node: Loader.INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>> {
             return this._applyExtensions(node, extension => extension.loadNodeAsync && extension.loadNodeAsync(context, node, assign));
             return this._applyExtensions(node, extension => extension.loadNodeAsync && extension.loadNodeAsync(context, node, assign));
         }
         }
 
 
-        private _extensionsLoadCameraAsync(context: string, camera: ILoaderCamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>> {
+        private _extensionsLoadCameraAsync(context: string, camera: Loader.ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>> {
             return this._applyExtensions(camera, extension => extension.loadCameraAsync && extension.loadCameraAsync(context, camera, assign));
             return this._applyExtensions(camera, extension => extension.loadCameraAsync && extension.loadCameraAsync(context, camera, assign));
         }
         }
 
 
-        private _extensionsLoadVertexDataAsync(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> {
+        private _extensionsLoadVertexDataAsync(context: string, primitive: Loader.IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>> {
             return this._applyExtensions(primitive, extension => extension._loadVertexDataAsync && extension._loadVertexDataAsync(context, primitive, babylonMesh));
             return this._applyExtensions(primitive, extension => extension._loadVertexDataAsync && extension._loadVertexDataAsync(context, primitive, babylonMesh));
         }
         }
 
 
-        private _extensionsLoadMaterialAsync(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>> {
+        private _extensionsLoadMaterialAsync(context: string, material: Loader.IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>> {
             return this._applyExtensions(material, extension => extension._loadMaterialAsync && extension._loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign));
             return this._applyExtensions(material, extension => extension._loadMaterialAsync && extension._loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign));
         }
         }
 
 
-        private _extensionsCreateMaterial(context: string, material: ILoaderMaterial, babylonDrawMode: number): Nullable<Material> {
+        private _extensionsCreateMaterial(context: string, material: Loader.IMaterial, babylonDrawMode: number): Nullable<Material> {
             return this._applyExtensions({}, extension => extension.createMaterial && extension.createMaterial(context, material, babylonDrawMode));
             return this._applyExtensions({}, extension => extension.createMaterial && extension.createMaterial(context, material, babylonDrawMode));
         }
         }
 
 
-        private _extensionsLoadMaterialPropertiesAsync(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
+        private _extensionsLoadMaterialPropertiesAsync(context: string, material: Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {
             return this._applyExtensions(material, extension => extension.loadMaterialPropertiesAsync && extension.loadMaterialPropertiesAsync(context, material, babylonMaterial));
             return this._applyExtensions(material, extension => extension.loadMaterialPropertiesAsync && extension.loadMaterialPropertiesAsync(context, material, babylonMaterial));
         }
         }
 
 
-        private _extensionsLoadTextureInfoAsync(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>> {
+        private _extensionsLoadTextureInfoAsync(context: string, textureInfo: Loader.ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>> {
             return this._applyExtensions(textureInfo, extension => extension.loadTextureInfoAsync && extension.loadTextureInfoAsync(context, textureInfo, assign));
             return this._applyExtensions(textureInfo, extension => extension.loadTextureInfoAsync && extension.loadTextureInfoAsync(context, textureInfo, assign));
         }
         }
 
 
-        private _extensionsLoadAnimationAsync(context: string, animation: ILoaderAnimation): Nullable<Promise<AnimationGroup>> {
+        private _extensionsLoadAnimationAsync(context: string, animation: Loader.IAnimation): Nullable<Promise<AnimationGroup>> {
             return this._applyExtensions(animation, extension => extension.loadAnimationAsync && extension.loadAnimationAsync(context, animation));
             return this._applyExtensions(animation, extension => extension.loadAnimationAsync && extension.loadAnimationAsync(context, animation));
         }
         }
 
 

+ 10 - 10
loaders/src/glTF/2.0/babylon.glTFLoaderExtension.ts

@@ -21,7 +21,7 @@ module BABYLON.GLTF2 {
          * @param scene The glTF scene property
          * @param scene The glTF scene property
          * @returns A promise that resolves when the load is complete or null if not handled
          * @returns A promise that resolves when the load is complete or null if not handled
          */
          */
-        loadSceneAsync?(context: string, scene: ILoaderScene): Nullable<Promise<void>>;
+        loadSceneAsync?(context: string, scene: Loader.IScene): Nullable<Promise<void>>;
 
 
         /**
         /**
          * Define this method to modify the default behavior when loading nodes.
          * Define this method to modify the default behavior when loading nodes.
@@ -30,7 +30,7 @@ module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon mesh when the load is complete or null if not handled
          */
          */
-        loadNodeAsync?(context: string, node: ILoaderNode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
+        loadNodeAsync?(context: string, node: Loader.INode, assign: (babylonMesh: Mesh) => void): Nullable<Promise<Mesh>>;
 
 
         /**
         /**
          * Define this method to modify the default behavior when loading cameras.
          * Define this method to modify the default behavior when loading cameras.
@@ -39,7 +39,7 @@ module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled
          */
          */
-        loadCameraAsync?(context: string, camera: ILoaderCamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
+        loadCameraAsync?(context: string, camera: Loader.ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
 
 
         /**
         /**
          * @hidden Define this method to modify the default behavior when loading vertex data for mesh primitives.
          * @hidden Define this method to modify the default behavior when loading vertex data for mesh primitives.
@@ -47,7 +47,7 @@ module BABYLON.GLTF2 {
          * @param primitive The glTF mesh primitive property
          * @param primitive The glTF mesh primitive property
          * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled
          */
          */
-        _loadVertexDataAsync?(context: string, primitive: ILoaderMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
+        _loadVertexDataAsync?(context: string, primitive: Loader.IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
 
 
         /**
         /**
          * @hidden Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
          * @hidden Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
@@ -56,7 +56,7 @@ module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled
          */
          */
-        _loadMaterialAsync?(context: string, material: ILoaderMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
+        _loadMaterialAsync?(context: string, material: Loader.IMaterial, babylonMesh: Mesh, babylonDrawMode: number, assign: (babylonMaterial: Material) => void): Nullable<Promise<Material>>;
 
 
         /**
         /**
          * Define this method to modify the default behavior when creating materials.
          * Define this method to modify the default behavior when creating materials.
@@ -65,7 +65,7 @@ module BABYLON.GLTF2 {
          * @param babylonDrawMode The draw mode for the Babylon material
          * @param babylonDrawMode The draw mode for the Babylon material
          * @returns The Babylon material or null if not handled
          * @returns The Babylon material or null if not handled
          */
          */
-        createMaterial?(context: string, material: ILoaderMaterial, babylonDrawMode: number): Nullable<Material>;
+        createMaterial?(context: string, material: Loader.IMaterial, babylonDrawMode: number): Nullable<Material>;
 
 
         /**
         /**
          * Define this method to modify the default behavior when loading material properties.
          * Define this method to modify the default behavior when loading material properties.
@@ -74,7 +74,7 @@ module BABYLON.GLTF2 {
          * @param babylonMaterial The Babylon material
          * @param babylonMaterial The Babylon material
          * @returns A promise that resolves when the load is complete or null if not handled
          * @returns A promise that resolves when the load is complete or null if not handled
          */
          */
-        loadMaterialPropertiesAsync?(context: string, material: ILoaderMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
+        loadMaterialPropertiesAsync?(context: string, material: Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
 
 
         /**
         /**
          * Define this method to modify the default behavior when loading texture infos.
          * Define this method to modify the default behavior when loading texture infos.
@@ -83,7 +83,7 @@ module BABYLON.GLTF2 {
          * @param assign A function called synchronously after parsing the glTF properties
          * @param assign A function called synchronously after parsing the glTF properties
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled
          */
          */
-        loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
+        loadTextureInfoAsync?(context: string, textureInfo: Loader.ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
 
 
         /**
         /**
          * Define this method to modify the default behavior when loading animations.
          * Define this method to modify the default behavior when loading animations.
@@ -91,7 +91,7 @@ module BABYLON.GLTF2 {
          * @param animation The glTF animation property
          * @param animation The glTF animation property
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled
          * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled
          */
          */
-        loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
+        loadAnimationAsync?(context: string, animation: Loader.IAnimation): Nullable<Promise<AnimationGroup>>;
 
 
         /**
         /**
          * Define this method to modify the default behavior when loading uris.
          * Define this method to modify the default behavior when loading uris.
@@ -106,5 +106,5 @@ module BABYLON.GLTF2 {
 /**
 /**
  * Defines the module for the built-in glTF 2.0 loader extensions.
  * Defines the module for the built-in glTF 2.0 loader extensions.
  */
  */
-module BABYLON.GLTF2.Extensions {
+module BABYLON.GLTF2.Loader.Extensions {
 }
 }

+ 49 - 49
loaders/src/glTF/2.0/babylon.glTFLoaderInterfaces.ts

@@ -1,6 +1,6 @@
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
 
 
-module BABYLON.GLTF2 {
+module BABYLON.GLTF2.Loader {
     /**
     /**
      * Loader interface with an index field.
      * Loader interface with an index field.
      */
      */
@@ -14,7 +14,7 @@ module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderAccessor extends IAccessor, IArrayItem {
+    export interface IAccessor extends GLTF2.IAccessor, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
 
 
@@ -25,11 +25,11 @@ module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderAnimationChannel extends IAnimationChannel, IArrayItem {
+    export interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {
     }
     }
 
 
     /** @hidden */
     /** @hidden */
-    export interface _ILoaderAnimationSamplerData {
+    export interface _IAnimationSamplerData {
         input: Float32Array;
         input: Float32Array;
         interpolation: AnimationSamplerInterpolation;
         interpolation: AnimationSamplerInterpolation;
         output: Float32Array;
         output: Float32Array;
@@ -38,17 +38,17 @@ module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderAnimationSampler extends IAnimationSampler, IArrayItem {
+    export interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {
         /** @hidden */
         /** @hidden */
-        _data?: Promise<_ILoaderAnimationSamplerData>;
+        _data?: Promise<_IAnimationSamplerData>;
     }
     }
 
 
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderAnimation extends IAnimation, IArrayItem {
-        channels: ILoaderAnimationChannel[];
-        samplers: ILoaderAnimationSampler[];
+    export interface IAnimation extends GLTF2.IAnimation, IArrayItem {
+        channels: IAnimationChannel[];
+        samplers: IAnimationSampler[];
 
 
         /** @hidden */
         /** @hidden */
         _babylonAnimationGroup?: AnimationGroup;
         _babylonAnimationGroup?: AnimationGroup;
@@ -57,7 +57,7 @@ module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderBuffer extends IBuffer, IArrayItem {
+    export interface IBuffer extends GLTF2.IBuffer, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
     }
     }
@@ -65,7 +65,7 @@ module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderBufferView extends IBufferView, IArrayItem {
+    export interface IBufferView extends GLTF2.IBufferView, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
 
 
@@ -76,13 +76,13 @@ module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderCamera extends ICamera, IArrayItem {
+    export interface ICamera extends GLTF2.ICamera, IArrayItem {
     }
     }
 
 
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderImage extends IImage, IArrayItem {
+    export interface IImage extends GLTF2.IImage, IArrayItem {
         /** @hidden */
         /** @hidden */
         _data?: Promise<ArrayBufferView>;
         _data?: Promise<ArrayBufferView>;
     }
     }
@@ -90,31 +90,31 @@ module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderMaterialNormalTextureInfo extends IMaterialNormalTextureInfo, ILoaderTextureInfo {
+    export interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {
     }
     }
 
 
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderMaterialOcclusionTextureInfo extends IMaterialOcclusionTextureInfo, ILoaderTextureInfo {
+    export interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {
     }
     }
 
 
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderMaterialPbrMetallicRoughness extends IMaterialPbrMetallicRoughness {
-        baseColorTexture?: ILoaderTextureInfo;
-        metallicRoughnessTexture?: ILoaderTextureInfo;
+    export interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {
+        baseColorTexture?: ITextureInfo;
+        metallicRoughnessTexture?: ITextureInfo;
     }
     }
 
 
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderMaterial extends IMaterial, IArrayItem {
-        pbrMetallicRoughness?: ILoaderMaterialPbrMetallicRoughness;
-        normalTexture?: ILoaderMaterialNormalTextureInfo;
-        occlusionTexture?: ILoaderMaterialOcclusionTextureInfo;
-        emissiveTexture?: ILoaderTextureInfo;
+    export interface IMaterial extends GLTF2.IMaterial, IArrayItem {
+        pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
+        normalTexture?: IMaterialNormalTextureInfo;
+        occlusionTexture?: IMaterialOcclusionTextureInfo;
+        emissiveTexture?: ITextureInfo;
 
 
         /** @hidden */
         /** @hidden */
         _babylonData?: {
         _babylonData?: {
@@ -129,24 +129,24 @@ module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderMesh extends IMesh, IArrayItem {
-        primitives: ILoaderMeshPrimitive[];
+    export interface IMesh extends GLTF2.IMesh, IArrayItem {
+        primitives: IMeshPrimitive[];
     }
     }
 
 
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderMeshPrimitive extends IMeshPrimitive, IArrayItem {
+    export interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
     }
     }
 
 
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderNode extends INode, IArrayItem {
+    export interface INode extends GLTF2.INode, IArrayItem {
         /**
         /**
          * The parent glTF node.
          * The parent glTF node.
          */
          */
-        parent?: ILoaderNode;
+        parent?: INode;
 
 
         /** @hidden */
         /** @hidden */
         _babylonMesh?: Mesh;
         _babylonMesh?: Mesh;
@@ -162,7 +162,7 @@ module BABYLON.GLTF2 {
     }
     }
 
 
     /** @hidden */
     /** @hidden */
-    export interface _ILoaderSamplerData {
+    export interface _ISamplerData {
         noMipMaps: boolean;
         noMipMaps: boolean;
         samplingMode: number;
         samplingMode: number;
         wrapU: number;
         wrapU: number;
@@ -172,21 +172,21 @@ module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderSampler extends ISampler, IArrayItem {
+    export interface ISampler extends GLTF2.ISampler, IArrayItem {
         /** @hidden */
         /** @hidden */
-        _data?: _ILoaderSamplerData;
+        _data?: _ISamplerData;
     }
     }
 
 
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderScene extends IScene, IArrayItem {
+    export interface IScene extends GLTF2.IScene, IArrayItem {
     }
     }
 
 
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderSkin extends ISkin, IArrayItem {
+    export interface ISkin extends GLTF2.ISkin, IArrayItem {
         /** @hidden */
         /** @hidden */
         _babylonSkeleton?: Skeleton;
         _babylonSkeleton?: Skeleton;
 
 
@@ -197,31 +197,31 @@ module BABYLON.GLTF2 {
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderTexture extends ITexture, IArrayItem {
+    export interface ITexture extends GLTF2.ITexture, IArrayItem {
     }
     }
 
 
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderTextureInfo extends ITextureInfo {
+    export interface ITextureInfo extends GLTF2.ITextureInfo {
     }
     }
 
 
     /**
     /**
      * Loader interface with additional members.
      * Loader interface with additional members.
      */
      */
-    export interface ILoaderGLTF extends IGLTF {
-        accessors?: ILoaderAccessor[];
-        animations?: ILoaderAnimation[];
-        buffers?: ILoaderBuffer[];
-        bufferViews?: ILoaderBufferView[];
-        cameras?: ILoaderCamera[];
-        images?: ILoaderImage[];
-        materials?: ILoaderMaterial[];
-        meshes?: ILoaderMesh[];
-        nodes?: ILoaderNode[];
-        samplers?: ILoaderSampler[];
-        scenes?: ILoaderScene[];
-        skins?: ILoaderSkin[];
-        textures?: ILoaderTexture[];
+    export interface IGLTF extends GLTF2.IGLTF {
+        accessors?: IAccessor[];
+        animations?: IAnimation[];
+        buffers?: IBuffer[];
+        bufferViews?: IBufferView[];
+        cameras?: ICamera[];
+        images?: IImage[];
+        materials?: IMaterial[];
+        meshes?: IMesh[];
+        nodes?: INode[];
+        samplers?: ISampler[];
+        scenes?: IScene[];
+        skins?: ISkin[];
+        textures?: ITexture[];
     }
     }
 }
 }

+ 1 - 1
package.json

@@ -9,7 +9,7 @@
     ],
     ],
     "name": "babylonjs",
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "3.3.0-beta.5",
+    "version": "3.3.0-rc.0",
     "repository": {
     "repository": {
         "type": "git",
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 4 - 1
readme.md

@@ -3,7 +3,9 @@ Babylon.js
 
 
 Getting started? Play directly with the Babylon.js API via our [playground](http://www.babylonjs.com/playground). It contains also lot of simple samples to learn how to use it.
 Getting started? Play directly with the Babylon.js API via our [playground](http://www.babylonjs.com/playground). It contains also lot of simple samples to learn how to use it.
 
 
-[![Build Status](https://travis-ci.com/BabylonJS/Babylon.js.svg)](https://travis-ci.com/BabylonJS/Babylon.js) 
+[![Build Status](https://travis-ci.com/BabylonJS/Babylon.js.svg)](https://travis-ci.com/BabylonJS/Babylon.js)
+[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/babylonJS/babylon.js.svg)](http://isitmaintained.com/project/babylonJS/babylon.js "Average time to resolve an issue")
+[![Percentage of issues still open](http://isitmaintained.com/badge/open/babylonJS/babylon.js.svg)](http://isitmaintained.com/project/babylonJS/babylon.js "Percentage of issues still open")
 
 
 **Any questions?** Here is our official [forum](http://www.html5gamedevs.com/forum/16-babylonjs/) on www.html5gamedevs.com.
 **Any questions?** Here is our official [forum](http://www.html5gamedevs.com/forum/16-babylonjs/) on www.html5gamedevs.com.
 
 
@@ -113,6 +115,7 @@ If you want to contribute, please read our [contribution guidelines](https://git
  - Maya [exporter](https://github.com/BabylonJS/Exporters/tree/master/Maya) can be used to generate a .babylon file from 3DS Max
  - Maya [exporter](https://github.com/BabylonJS/Exporters/tree/master/Maya) can be used to generate a .babylon file from 3DS Max
  - Blender [exporter](https://github.com/BabylonJS/Exporters/tree/master/Blender) can be used to generate a .babylon file from Blender 3d
  - Blender [exporter](https://github.com/BabylonJS/Exporters/tree/master/Blender) can be used to generate a .babylon file from Blender 3d
  - Unity 5 [exporter](https://github.com/BabylonJS/Exporters/tree/master/Unity%205) can be used to export your geometries from Unity 5 scene editor(animations are supported)
  - Unity 5 [exporter](https://github.com/BabylonJS/Exporters/tree/master/Unity%205) can be used to export your geometries from Unity 5 scene editor(animations are supported)
+ - [glTF Tools](https://github.com/KhronosGroup/glTF#gltf-tools) by KhronosGroup
 
 
 ## Features
 ## Features
 To get a complete list of supported features, please visit our [website](http://www.babylonjs.com/#specifications).
 To get a complete list of supported features, please visit our [website](http://www.babylonjs.com/#specifications).

+ 3 - 0
serializers/src/glTF/2.0/Extensions/KHR_texture_transform.ts

@@ -1,5 +1,8 @@
 /// <reference path="../../../../../dist/preview release/gltf2Interface/babylon.glTF2Interface.d.ts"/>
 /// <reference path="../../../../../dist/preview release/gltf2Interface/babylon.glTF2Interface.d.ts"/>
 
 
+/**
+ * @hidden
+ */
 module BABYLON.GLTF2.Exporter.Extensions {
 module BABYLON.GLTF2.Exporter.Extensions {
     const NAME = "KHR_texture_transform";
     const NAME = "KHR_texture_transform";
 
 

+ 0 - 8
serializers/src/glTF/2.0/babylon.glTFExporterExtension.ts

@@ -23,13 +23,5 @@ module BABYLON.GLTF2.Exporter {
          * @param binaryWriter glTF serializer binary writer instance
          * @param binaryWriter glTF serializer binary writer instance
          */
          */
         postExportMeshPrimitiveAsync?(context: string, meshPrimitive: IMeshPrimitive, babylonSubMesh: SubMesh, binaryWriter: _BinaryWriter): Nullable<Promise<IMeshPrimitive>>;
         postExportMeshPrimitiveAsync?(context: string, meshPrimitive: IMeshPrimitive, babylonSubMesh: SubMesh, binaryWriter: _BinaryWriter): Nullable<Promise<IMeshPrimitive>>;
-
-
     }
     }
-}
-
-/**
- * Defines the module for the built-in glTF 2.0 exporter extensions.
- */
-module BABYLON.GLTF2.Extensions {
 }
 }

+ 20 - 75
src/Actions/babylon.actionManager.ts

@@ -82,161 +82,106 @@
      * @see http://doc.babylonjs.com/how_to/how_to_use_actions
      * @see http://doc.babylonjs.com/how_to/how_to_use_actions
      */
      */
     export class ActionManager {
     export class ActionManager {
-        // Statics
-        private static _NothingTrigger = 0;
-        private static _OnPickTrigger = 1;
-        private static _OnLeftPickTrigger = 2;
-        private static _OnRightPickTrigger = 3;
-        private static _OnCenterPickTrigger = 4;
-        private static _OnPickDownTrigger = 5;
-        private static _OnDoublePickTrigger = 6;
-        private static _OnPickUpTrigger = 7;
-        private static _OnLongPressTrigger = 8;
-        private static _OnPointerOverTrigger = 9;
-        private static _OnPointerOutTrigger = 10;
-        private static _OnEveryFrameTrigger = 11;
-        private static _OnIntersectionEnterTrigger = 12;
-        private static _OnIntersectionExitTrigger = 13;
-        private static _OnKeyDownTrigger = 14;
-        private static _OnKeyUpTrigger = 15;
-        private static _OnPickOutTrigger = 16;
-
         /**
         /**
          * Nothing
          * Nothing
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get NothingTrigger(): number {
-            return ActionManager._NothingTrigger;
-        }
+        public static readonly NothingTrigger = 0;
 
 
         /** 
         /** 
          * On pick 
          * On pick 
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnPickTrigger(): number {
-            return ActionManager._OnPickTrigger;
-        }
+        public static readonly OnPickTrigger = 1;
 
 
         /** 
         /** 
          * On left pick
          * On left pick
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnLeftPickTrigger(): number {
-            return ActionManager._OnLeftPickTrigger;
-        }
+        public static readonly OnLeftPickTrigger  = 2;
 
 
         /** 
         /** 
          * On right pick
          * On right pick
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnRightPickTrigger(): number {
-            return ActionManager._OnRightPickTrigger;
-        }
+        public static readonly OnRightPickTrigger = 3;
 
 
         /** 
         /** 
          * On center pick 
          * On center pick 
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnCenterPickTrigger(): number {
-            return ActionManager._OnCenterPickTrigger;
-        }
+        public static readonly OnCenterPickTrigger = 4;
 
 
         /** 
         /** 
          * On pick down
          * On pick down
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnPickDownTrigger(): number {
-            return ActionManager._OnPickDownTrigger;
-        }
+        public static readonly OnPickDownTrigger = 5;
 
 
         /** 
         /** 
          * On double pick
          * On double pick
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnDoublePickTrigger(): number {
-            return ActionManager._OnDoublePickTrigger;
-        }
+        public static readonly OnDoublePickTrigger = 6;
 
 
         /** 
         /** 
          * On pick up
          * On pick up
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnPickUpTrigger(): number {
-            return ActionManager._OnPickUpTrigger;
-        }
-
+        public static readonly OnPickUpTrigger = 7;
         /**
         /**
          * On pick out.
          * On pick out.
          * This trigger will only be raised if you also declared a OnPickDown
          * This trigger will only be raised if you also declared a OnPickDown
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnPickOutTrigger(): number {
-            return ActionManager._OnPickOutTrigger;
-        }
+        public static readonly OnPickOutTrigger = 16;
 
 
         /** 
         /** 
          * On long press
          * On long press
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnLongPressTrigger(): number {
-            return ActionManager._OnLongPressTrigger;
-        }
+        public static readonly OnLongPressTrigger = 8;
 
 
         /** 
         /** 
          * On pointer over
          * On pointer over
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnPointerOverTrigger(): number {
-            return ActionManager._OnPointerOverTrigger;
-        }
+        public static readonly OnPointerOverTrigger = 9;
 
 
         /** 
         /** 
          * On pointer out
          * On pointer out
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnPointerOutTrigger(): number {
-            return ActionManager._OnPointerOutTrigger;
-        }
+        public static readonly OnPointerOutTrigger = 10;
 
 
         /** 
         /** 
          * On every frame
          * On every frame
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnEveryFrameTrigger(): number {
-            return ActionManager._OnEveryFrameTrigger;
-        }
-
+        public static readonly OnEveryFrameTrigger = 11;
         /** 
         /** 
          * On intersection enter
          * On intersection enter
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnIntersectionEnterTrigger(): number {
-            return ActionManager._OnIntersectionEnterTrigger;
-        }
+        public static readonly OnIntersectionEnterTrigger = 12;
 
 
         /** 
         /** 
          * On intersection exit
          * On intersection exit
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnIntersectionExitTrigger(): number {
-            return ActionManager._OnIntersectionExitTrigger;
-        }
+        public static readonly OnIntersectionExitTrigger = 13;
 
 
         /**
         /**
          * On key down
          * On key down
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnKeyDownTrigger(): number {
-            return ActionManager._OnKeyDownTrigger;
-        }
+        public static readonly OnKeyDownTrigger = 14;
 
 
         /**
         /**
          * On key up
          * On key up
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          * @see http://doc.babylonjs.com/how_to/how_to_use_actions#triggers
          */
          */
-        public static get OnKeyUpTrigger(): number {
-            return ActionManager._OnKeyUpTrigger;
-        }
+        public static readonly OnKeyUpTrigger = 15;
 
 
         /** Gets the list of active triggers */
         /** Gets the list of active triggers */
         public static Triggers: { [key: string]: number } = {};
         public static Triggers: { [key: string]: number } = {};
@@ -356,7 +301,7 @@
             for (var index = 0; index < this.actions.length; index++) {
             for (var index = 0; index < this.actions.length; index++) {
                 var action = this.actions[index];
                 var action = this.actions[index];
 
 
-                if (action.trigger >= ActionManager._OnPickTrigger && action.trigger <= ActionManager._OnPointerOutTrigger) {
+                if (action.trigger >= ActionManager.OnPickTrigger && action.trigger <= ActionManager.OnPointerOutTrigger) {
                     return true;
                     return true;
                 }
                 }
             }
             }
@@ -371,7 +316,7 @@
             for (var index = 0; index < this.actions.length; index++) {
             for (var index = 0; index < this.actions.length; index++) {
                 var action = this.actions[index];
                 var action = this.actions[index];
 
 
-                if (action.trigger >= ActionManager._OnPickTrigger && action.trigger <= ActionManager._OnPickUpTrigger) {
+                if (action.trigger >= ActionManager.OnPickTrigger && action.trigger <= ActionManager.OnPickUpTrigger) {
                     return true;
                     return true;
                 }
                 }
             }
             }
@@ -398,7 +343,7 @@
             for (var t in ActionManager.Triggers) {
             for (var t in ActionManager.Triggers) {
                 if (ActionManager.Triggers.hasOwnProperty(t)) {
                 if (ActionManager.Triggers.hasOwnProperty(t)) {
                     let t_int = parseInt(t);
                     let t_int = parseInt(t);
-                    if (t_int >= ActionManager._OnPickTrigger && t_int <= ActionManager._OnPickUpTrigger) {
+                    if (t_int >= ActionManager.OnPickTrigger && t_int <= ActionManager.OnPickUpTrigger) {
                         return true;
                         return true;
                     }
                     }
                 }
                 }

+ 260 - 7
src/Actions/babylon.directActions.ts

@@ -1,11 +1,28 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * This defines an action responsible to toggle a boolean once triggered.
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions
+     */
     export class SwitchBooleanAction extends Action {
     export class SwitchBooleanAction extends Action {
+        /**
+         * The path to the boolean property in the target object
+         */
+        public propertyPath: string;
+
         private _target: any;
         private _target: any;
         private _effectiveTarget: any;
         private _effectiveTarget: any;
         private _property: string;
         private _property: string;
 
 
-        constructor(triggerOptions: any, target: any, public propertyPath: string, condition?: Condition) {
+        /**
+         * Instantiate the action
+         * @param triggerOptions defines the trigger options
+         * @param target defines the object containing the boolean
+         * @param propertyPath defines the path to the boolean property in the target object
+         * @param condition defines the trigger related conditions
+         */
+        constructor(triggerOptions: any, target: any, propertyPath: string, condition?: Condition) {
             super(triggerOptions, condition);
             super(triggerOptions, condition);
+            this.propertyPath = propertyPath;
             this._target = this._effectiveTarget = target;
             this._target = this._effectiveTarget = target;
         }
         }
 
 
@@ -15,10 +32,18 @@
             this._property = this._getProperty(this.propertyPath);
             this._property = this._getProperty(this.propertyPath);
         }
         }
 
 
+        /**
+         * Execute the action toggle the boolean value.
+         */
         public execute(): void {
         public execute(): void {
             this._effectiveTarget[this._property] = !this._effectiveTarget[this._property];
             this._effectiveTarget[this._property] = !this._effectiveTarget[this._property];
         }
         }
 
 
+        /**
+         * Serializes the actions and its related information.
+         * @param parent defines the object to serialize in
+         * @returns the serialized object
+         */
         public serialize(parent: any): any {
         public serialize(parent: any): any {
             return super._serialize({
             return super._serialize({
                 name: "SwitchBooleanAction",
                 name: "SwitchBooleanAction",
@@ -30,18 +55,44 @@
         }
         }
     }
     }
 
 
+    /**
+     * This defines an action responsible to set a the state field of the target
+     *  to a desired value once triggered.
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions
+     */
     export class SetStateAction extends Action {
     export class SetStateAction extends Action {
+        /**
+         * The value to store in the state field.
+         */
+        public value: string;
+
         private _target: any;
         private _target: any;
 
 
-        constructor(triggerOptions: any, target: any, public value: string, condition?: Condition) {
+        /**
+         * Instantiate the action
+         * @param triggerOptions defines the trigger options
+         * @param target defines the object containing the state property
+         * @param value defines the value to store in the state field
+         * @param condition defines the trigger related conditions
+         */
+        constructor(triggerOptions: any, target: any, value: string, condition?: Condition) {
             super(triggerOptions, condition);
             super(triggerOptions, condition);
+            this.value = value;
             this._target = target;
             this._target = target;
         }
         }
 
 
+        /**
+         * Execute the action and store the value on the target state property.
+         */
         public execute(): void {
         public execute(): void {
             this._target.state = this.value;
             this._target.state = this.value;
         }
         }
 
 
+        /**
+         * Serializes the actions and its related information.
+         * @param parent defines the object to serialize in
+         * @returns the serialized object
+         */
         public serialize(parent: any): any {
         public serialize(parent: any): any {
             return super._serialize({
             return super._serialize({
                 name: "SetStateAction",
                 name: "SetStateAction",
@@ -53,13 +104,38 @@
         }
         }
     }
     }
 
 
+    /**
+     * This defines an action responsible to set a property of the target
+     *  to a desired value once triggered.
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions
+     */
     export class SetValueAction extends Action {
     export class SetValueAction extends Action {
+        /**
+         * The path of the property to set in the target.
+         */
+        public propertyPath: string;
+
+        /**
+         * The value to set in the property
+         */
+        public value: any;
+
         private _target: any;
         private _target: any;
         private _effectiveTarget: any;
         private _effectiveTarget: any;
         private _property: string;
         private _property: string;
 
 
-        constructor(triggerOptions: any, target: any, public propertyPath: string, public value: any, condition?: Condition) {
+        /**
+         * Instantiate the action
+         * @param triggerOptions defines the trigger options
+         * @param target defines the object containing the property
+         * @param propertyPath defines the path of the property to set in the target
+         * @param value defines the value to set in the property
+         * @param condition defines the trigger related conditions
+         */
+        constructor(triggerOptions: any, target: any, propertyPath: string, value: any, condition?: Condition) {
             super(triggerOptions, condition);
             super(triggerOptions, condition);
+            this.propertyPath = propertyPath;
+            this.value = value;
             this._target = this._effectiveTarget = target;
             this._target = this._effectiveTarget = target;
         }
         }
 
 
@@ -69,6 +145,9 @@
             this._property = this._getProperty(this.propertyPath);
             this._property = this._getProperty(this.propertyPath);
         }
         }
 
 
+        /**
+         * Execute the action and set the targetted property to the desired value.
+         */
         public execute(): void {
         public execute(): void {
             this._effectiveTarget[this._property] = this.value;
             this._effectiveTarget[this._property] = this.value;
 
 
@@ -77,6 +156,11 @@
             }
             }
         }
         }
 
 
+        /**
+         * Serializes the actions and its related information.
+         * @param parent defines the object to serialize in
+         * @returns the serialized object
+         */
         public serialize(parent: any): any {
         public serialize(parent: any): any {
             return super._serialize({
             return super._serialize({
                 name: "SetValueAction",
                 name: "SetValueAction",
@@ -89,13 +173,38 @@
         }
         }
     }
     }
 
 
+    /**
+     * This defines an action responsible to increment the target value
+     *  to a desired value once triggered.
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions
+     */
     export class IncrementValueAction extends Action {
     export class IncrementValueAction extends Action {
+        /**
+         * The path of the property to increment in the target.
+         */
+        public propertyPath: string;
+
+        /**
+         * The value we should increment the property by.
+         */
+        public value: any;
+
         private _target: any;
         private _target: any;
         private _effectiveTarget: any;
         private _effectiveTarget: any;
         private _property: string;
         private _property: string;
 
 
-        constructor(triggerOptions: any, target: any, public propertyPath: string, public value: any, condition?: Condition) {
+        /**
+         * Instantiate the action
+         * @param triggerOptions defines the trigger options
+         * @param target defines the object containing the property
+         * @param propertyPath defines the path of the property to increment in the target
+         * @param value defines the value value we should increment the property by
+         * @param condition defines the trigger related conditions
+         */
+        constructor(triggerOptions: any, target: any, propertyPath: string, value: any, condition?: Condition) {
             super(triggerOptions, condition);
             super(triggerOptions, condition);
+            this.propertyPath = propertyPath;
+            this.value = value;
             this._target = this._effectiveTarget = target;
             this._target = this._effectiveTarget = target;
         }
         }
 
 
@@ -109,6 +218,9 @@
             }
             }
         }
         }
 
 
+        /**
+         * Execute the action and increment the target of the value amount.
+         */
         public execute(): void {
         public execute(): void {
             this._effectiveTarget[this._property] += this.value;
             this._effectiveTarget[this._property] += this.value;
 
 
@@ -117,6 +229,11 @@
             }
             }
         }
         }
 
 
+        /**
+         * Serializes the actions and its related information.
+         * @param parent defines the object to serialize in
+         * @returns the serialized object
+         */
         public serialize(parent: any): any {
         public serialize(parent: any): any {
             return super._serialize({
             return super._serialize({
                 name: "IncrementValueAction",
                 name: "IncrementValueAction",
@@ -129,11 +246,42 @@
         }
         }
     }
     }
 
 
+    /**
+     * This defines an action responsible to start an animation once triggered.
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions
+     */
     export class PlayAnimationAction extends Action {
     export class PlayAnimationAction extends Action {
+        /**
+         * Where the animation should start (animation frame)
+         */
+        public from: number;
+
+        /**
+         * Where the animation should stop (animation frame)
+         */
+        public to: number;
+
+        /**
+         * Define if the animation should loop or stop after the first play.
+         */
+        public loop?: boolean;
+
         private _target: any;
         private _target: any;
 
 
-        constructor(triggerOptions: any, target: any, public from: number, public to: number, public loop?: boolean, condition?: Condition) {
+        /**
+         * Instantiate the action
+         * @param triggerOptions defines the trigger options
+         * @param target defines the target animation or animation name
+         * @param from defines from where the animation should start (animation frame)
+         * @param end defines where the animation should stop (animation frame)
+         * @param loop defines if the animation should loop or stop after the first play
+         * @param condition defines the trigger related conditions
+         */
+        constructor(triggerOptions: any, target: any, from: number, to: number, loop?: boolean, condition?: Condition) {
             super(triggerOptions, condition);
             super(triggerOptions, condition);
+            this.from = from;
+            this.to = to;
+            this.loop = loop;
             this._target = target;
             this._target = target;
         }
         }
 
 
@@ -141,11 +289,19 @@
         public _prepare(): void {
         public _prepare(): void {
         }
         }
 
 
+        /**
+         * Execute the action and play the animation.
+         */
         public execute(): void {
         public execute(): void {
             var scene = this._actionManager.getScene();
             var scene = this._actionManager.getScene();
             scene.beginAnimation(this._target, this.from, this.to, this.loop);
             scene.beginAnimation(this._target, this.from, this.to, this.loop);
         }
         }
 
 
+        /**
+         * Serializes the actions and its related information.
+         * @param parent defines the object to serialize in
+         * @returns the serialized object
+         */
         public serialize(parent: any): any {
         public serialize(parent: any): any {
             return super._serialize({
             return super._serialize({
                 name: "PlayAnimationAction",
                 name: "PlayAnimationAction",
@@ -159,9 +315,19 @@
         }
         }
     }
     }
 
 
+    /**
+     * This defines an action responsible to stop an animation once triggered.
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions
+     */
     export class StopAnimationAction extends Action {
     export class StopAnimationAction extends Action {
         private _target: any;
         private _target: any;
 
 
+        /**
+         * Instantiate the action
+         * @param triggerOptions defines the trigger options
+         * @param target defines the target animation or animation name
+         * @param condition defines the trigger related conditions
+         */
         constructor(triggerOptions: any, target: any, condition?: Condition) {
         constructor(triggerOptions: any, target: any, condition?: Condition) {
             super(triggerOptions, condition);
             super(triggerOptions, condition);
             this._target = target;
             this._target = target;
@@ -171,11 +337,19 @@
         public _prepare(): void {
         public _prepare(): void {
         }
         }
 
 
+        /**
+         * Execute the action and stop the animation.
+         */
         public execute(): void {
         public execute(): void {
             var scene = this._actionManager.getScene();
             var scene = this._actionManager.getScene();
             scene.stopAnimation(this._target);
             scene.stopAnimation(this._target);
         }
         }
 
 
+        /**
+         * Serializes the actions and its related information.
+         * @param parent defines the object to serialize in
+         * @returns the serialized object
+         */
         public serialize(parent: any): any {
         public serialize(parent: any): any {
             return super._serialize({
             return super._serialize({
                 name: "StopAnimationAction",
                 name: "StopAnimationAction",
@@ -184,14 +358,31 @@
         }
         }
     }
     }
 
 
+    /**
+     * This defines an action responsible that does nothing once triggered.
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions
+     */
     export class DoNothingAction extends Action {
     export class DoNothingAction extends Action {
+        /**
+         * Instantiate the action
+         * @param triggerOptions defines the trigger options
+         * @param condition defines the trigger related conditions
+         */
         constructor(triggerOptions: any = ActionManager.NothingTrigger, condition?: Condition) {
         constructor(triggerOptions: any = ActionManager.NothingTrigger, condition?: Condition) {
             super(triggerOptions, condition);
             super(triggerOptions, condition);
         }
         }
 
 
+        /**
+         * Execute the action and do nothing.
+         */
         public execute(): void {
         public execute(): void {
         }
         }
 
 
+        /**
+         * Serializes the actions and its related information.
+         * @param parent defines the object to serialize in
+         * @returns the serialized object
+         */
         public serialize(parent: any): any {
         public serialize(parent: any): any {
             return super._serialize({
             return super._serialize({
                 name: "DoNothingAction",
                 name: "DoNothingAction",
@@ -200,9 +391,25 @@
         }
         }
     }
     }
 
 
+    /**
+     * This defines an action responsible to trigger several actions once triggered.
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions
+     */
     export class CombineAction extends Action {
     export class CombineAction extends Action {
-        constructor(triggerOptions: any, public children: Action[], condition?: Condition) {
+        /**
+         * The list of aggregated animations to run.
+         */
+        public children: Action[];
+
+        /**
+         * Instantiate the action
+         * @param triggerOptions defines the trigger options
+         * @param children defines the list of aggregated animations to run
+         * @param condition defines the trigger related conditions
+         */
+        constructor(triggerOptions: any, children: Action[], condition?: Condition) {
             super(triggerOptions, condition);
             super(triggerOptions, condition);
+            this.children = children;
         }
         }
 
 
         /** @hidden */
         /** @hidden */
@@ -213,12 +420,20 @@
             }
             }
         }
         }
 
 
+        /**
+         * Execute the action and executes all the aggregated actions.
+         */
         public execute(evt: ActionEvent): void {
         public execute(evt: ActionEvent): void {
             for (var index = 0; index < this.children.length; index++) {
             for (var index = 0; index < this.children.length; index++) {
                 this.children[index].execute(evt);
                 this.children[index].execute(evt);
             }
             }
         }
         }
 
 
+        /**
+         * Serializes the actions and its related information.
+         * @param parent defines the object to serialize in
+         * @returns the serialized object
+         */
         public serialize(parent: any): any {
         public serialize(parent: any): any {
             var serializationObject = super._serialize({
             var serializationObject = super._serialize({
                 name: "CombineAction",
                 name: "CombineAction",
@@ -234,20 +449,50 @@
         }
         }
     }
     }
 
 
+    /**
+     * This defines an action responsible to run code (external event) once triggered.
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions
+     */
     export class ExecuteCodeAction extends Action {
     export class ExecuteCodeAction extends Action {
-        constructor(triggerOptions: any, public func: (evt: ActionEvent) => void, condition?: Condition) {
+        /**
+         * The callback function to run.
+         */
+        public func: (evt: ActionEvent) => void;
+
+        /**
+         * Instantiate the action
+         * @param triggerOptions defines the trigger options
+         * @param func defines the callback function to run
+         * @param condition defines the trigger related conditions
+         */
+        constructor(triggerOptions: any, func: (evt: ActionEvent) => void, condition?: Condition) {
             super(triggerOptions, condition);
             super(triggerOptions, condition);
+            this.func = func;
         }
         }
 
 
+        /**
+         * Execute the action and run the attached code.
+         */
         public execute(evt: ActionEvent): void {
         public execute(evt: ActionEvent): void {
             this.func(evt);
             this.func(evt);
         }
         }
     }
     }
 
 
+    /**
+     * This defines an action responsible to set the parent property of the target once triggered.
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions
+     */
     export class SetParentAction extends Action {
     export class SetParentAction extends Action {
         private _parent: any;
         private _parent: any;
         private _target: any;
         private _target: any;
 
 
+        /**
+         * Instantiate the action
+         * @param triggerOptions defines the trigger options
+         * @param target defines the target containing the parent property
+         * @param parent defines from where the animation should start (animation frame)
+         * @param condition defines the trigger related conditions
+         */
         constructor(triggerOptions: any, target: any, parent: any, condition?: Condition) {
         constructor(triggerOptions: any, target: any, parent: any, condition?: Condition) {
             super(triggerOptions, condition);
             super(triggerOptions, condition);
             this._target = target;
             this._target = target;
@@ -258,6 +503,9 @@
         public _prepare(): void {
         public _prepare(): void {
         }
         }
 
 
+        /**
+         * Execute the action and set the parent property.
+         */
         public execute(): void {
         public execute(): void {
             if (this._target.parent === this._parent) {
             if (this._target.parent === this._parent) {
                 return;
                 return;
@@ -271,6 +519,11 @@
             this._target.parent = this._parent;
             this._target.parent = this._parent;
         }
         }
 
 
+        /**
+         * Serializes the actions and its related information.
+         * @param parent defines the object to serialize in
+         * @returns the serialized object
+         */
         public serialize(parent: any): any {
         public serialize(parent: any): any {
             return super._serialize({
             return super._serialize({
                 name: "SetParentAction",
                 name: "SetParentAction",

+ 60 - 3
src/Actions/babylon.interpolateValueAction.ts

@@ -1,14 +1,63 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * This defines an action responsible to change the value of a property
+     * by interpolating between its current value and the newly set one once triggered.
+     * @see http://doc.babylonjs.com/how_to/how_to_use_actions
+     */
     export class InterpolateValueAction extends Action {
     export class InterpolateValueAction extends Action {
+        /**
+         * Defines the path of the property where the value should be interpolated
+         */
+        public propertyPath: string;
+        
+        /**
+         * Defines the target value at the end of the interpolation.
+         */
+        public value: any;
+
+        /**
+         * Defines the time it will take for the property to interpolate to the value.
+         */
+        public duration: number = 1000;
+
+        /**
+         * Defines if the other scene animations should be stopped when the action has been triggered
+         */
+        public stopOtherAnimations?: boolean;
+
+        /**
+         * Defines a callback raised once the interpolation animation has been done.
+         */
+        public onInterpolationDone?: () => void;
+        
+        /**
+         * Observable triggered once the interpolation animation has been done.
+         */
+        public onInterpolationDoneObservable = new Observable<InterpolateValueAction>();
+
         private _target: any;
         private _target: any;
         private _effectiveTarget: any;
         private _effectiveTarget: any;
         private _property: string;
         private _property: string;
 
 
-        public onInterpolationDoneObservable = new Observable<InterpolateValueAction>();
-
-        constructor(triggerOptions: any, target: any, public propertyPath: string, public value: any, public duration: number = 1000, condition?: Condition, public stopOtherAnimations?: boolean, public onInterpolationDone?: () => void) {
+        /**
+         * Instantiate the action
+         * @param triggerOptions defines the trigger options
+         * @param target defines the object containing the value to interpolate
+         * @param propertyPath defines the path to the property in the target object
+         * @param value defines the target value at the end of the interpolation
+         * @param duration deines the time it will take for the property to interpolate to the value.
+         * @param condition defines the trigger related conditions
+         * @param stopOtherAnimations defines if the other scene animations should be stopped when the action has been triggered
+         * @param onInterpolationDone defines a callback raised once the interpolation animation has been done
+         */
+        constructor(triggerOptions: any, target: any, propertyPath: string, value: any, duration: number = 1000, condition?: Condition, stopOtherAnimations?: boolean, onInterpolationDone?: () => void) {
             super(triggerOptions, condition);
             super(triggerOptions, condition);
 
 
+            this.propertyPath = propertyPath;
+            this.value = value;
+            this.duration = duration;
+            this.stopOtherAnimations = stopOtherAnimations;
+            this.onInterpolationDone = onInterpolationDone;
             this._target = this._effectiveTarget = target;
             this._target = this._effectiveTarget = target;
         }
         }
 
 
@@ -18,6 +67,9 @@
             this._property = this._getProperty(this.propertyPath);
             this._property = this._getProperty(this.propertyPath);
         }
         }
 
 
+        /**
+         * Execute the action starts the value interpolation.
+         */
         public execute(): void {
         public execute(): void {
             var scene = this._actionManager.getScene();
             var scene = this._actionManager.getScene();
             var keys = [
             var keys = [
@@ -65,6 +117,11 @@
             scene.beginDirectAnimation(this._effectiveTarget, [animation], 0, 100, false, 1, wrapper);
             scene.beginDirectAnimation(this._effectiveTarget, [animation], 0, 100, false, 1, wrapper);
         }
         }
 
 
+        /**
+         * Serializes the actions and its related information.
+         * @param parent defines the object to serialize in
+         * @returns the serialized object
+         */
         public serialize(parent: any): any {
         public serialize(parent: any): any {
             return super._serialize({
             return super._serialize({
                 name: "InterpolateValueAction",
                 name: "InterpolateValueAction",

+ 182 - 26
src/Animations/babylon.easing.ts

@@ -1,42 +1,73 @@
 module BABYLON {
 module BABYLON {
 
 
+    /**
+     * This represents the main contract an easing function should follow.
+     * Easing functions are used throughout the animation system.
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export interface IEasingFunction {
     export interface IEasingFunction {
+        /**
+         * Given an input gradient between 0 and 1, this returns the corrseponding value
+         * of the easing function. 
+         * The link below provides some of the most common examples of easing functions.
+         * @see https://easings.net/
+         * @param gradient Defines the value between 0 and 1 we want the easing value for
+         * @returns the corresponding value on the curve defined by the easing function
+         */
         ease(gradient: number): number;
         ease(gradient: number): number;
     }
     }
 
 
+    /**
+     * Base class used for every default easing function.
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class EasingFunction implements IEasingFunction {
     export class EasingFunction implements IEasingFunction {
-        //Statics
-        private static _EASINGMODE_EASEIN = 0;
-        private static _EASINGMODE_EASEOUT = 1;
-        private static _EASINGMODE_EASEINOUT = 2;
+        /**
+         * Interpolation follows the mathematical formula associated with the easing function.
+         */
+        public static readonly EASINGMODE_EASEIN = 0;
 
 
-        public static get EASINGMODE_EASEIN(): number {
-            return EasingFunction._EASINGMODE_EASEIN;
-        }
-
-        public static get EASINGMODE_EASEOUT(): number {
-            return EasingFunction._EASINGMODE_EASEOUT;
-        }
+        /**
+         * Interpolation follows 100% interpolation minus the output of the formula associated with the easing function.
+         */
+        public static readonly EASINGMODE_EASEOUT = 1;
 
 
-        public static get EASINGMODE_EASEINOUT(): number {
-            return EasingFunction._EASINGMODE_EASEINOUT;
-        }
+        /**
+         * Interpolation uses EaseIn for the first half of the animation and EaseOut for the second half.
+         */
+        public static readonly EASINGMODE_EASEINOUT = 2;
 
 
-        // Properties
         private _easingMode = EasingFunction.EASINGMODE_EASEIN;
         private _easingMode = EasingFunction.EASINGMODE_EASEIN;
 
 
+        /**
+         * Sets the easing mode of the current function.
+         * @param easingMode Defines the willing mode (EASINGMODE_EASEIN, EASINGMODE_EASEOUT or EASINGMODE_EASEINOUT)
+         */
         public setEasingMode(easingMode: number) {
         public setEasingMode(easingMode: number) {
             var n = Math.min(Math.max(easingMode, 0), 2);
             var n = Math.min(Math.max(easingMode, 0), 2);
             this._easingMode = n;
             this._easingMode = n;
         }
         }
+        /**
+         * Gets the current easing mode.
+         * @returns the easing mode
+         */
         public getEasingMode(): number {
         public getEasingMode(): number {
             return this._easingMode;
             return this._easingMode;
         }
         }
 
 
+        /**
+         * @hidden
+         */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
             throw new Error('You must implement this method');
             throw new Error('You must implement this method');
         }
         }
 
 
+        /**
+         * Given an input gradient between 0 and 1, this returns the corrseponding value
+         * of the easing function.
+         * @param gradient Defines the value between 0 and 1 we want the easing value for
+         * @returns the corresponding value on the curve defined by the easing function
+         */
         public ease(gradient: number): number {
         public ease(gradient: number): number {
             switch (this._easingMode) {
             switch (this._easingMode) {
                 case EasingFunction.EASINGMODE_EASEIN:
                 case EasingFunction.EASINGMODE_EASEIN:
@@ -51,32 +82,66 @@
 
 
             return (this.easeInCore(gradient * 2) * 0.5);
             return (this.easeInCore(gradient * 2) * 0.5);
         }
         }
-
     }
     }
 
 
+    /**
+     * Easing function with a circle shape (see link below).
+     * @see https://easings.net/#easeInCirc
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class CircleEase extends EasingFunction implements IEasingFunction {
     export class CircleEase extends EasingFunction implements IEasingFunction {
+        /** @hidden */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
             gradient = Math.max(0, Math.min(1, gradient));
             gradient = Math.max(0, Math.min(1, gradient));
             return (1.0 - Math.sqrt(1.0 - (gradient * gradient)));
             return (1.0 - Math.sqrt(1.0 - (gradient * gradient)));
         }
         }
     }
     }
 
 
+    /**
+     * Easing function with a ease back shape (see link below).
+     * @see https://easings.net/#easeInBack
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class BackEase extends EasingFunction implements IEasingFunction {
     export class BackEase extends EasingFunction implements IEasingFunction {
-        constructor(public amplitude: number = 1) {
+        /**
+         * Instantiates a back ease easing
+         * @see https://easings.net/#easeInBack
+         * @param amplitude Defines the amplitude of the function
+         */
+        constructor(
+            /** Defines the amplitude of the function */
+            public amplitude: number = 1) {
             super();
             super();
         }
         }
 
 
+        /** @hidden */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
             var num = Math.max(0, this.amplitude);
             var num = Math.max(0, this.amplitude);
             return (Math.pow(gradient, 3.0) - ((gradient * num) * Math.sin(3.1415926535897931 * gradient)));
             return (Math.pow(gradient, 3.0) - ((gradient * num) * Math.sin(3.1415926535897931 * gradient)));
         }
         }
     }
     }
 
 
+    /**
+     * Easing function with a bouncing shape (see link below).
+     * @see https://easings.net/#easeInBounce
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class BounceEase extends EasingFunction implements IEasingFunction {
     export class BounceEase extends EasingFunction implements IEasingFunction {
-        constructor(public bounces: number= 3, public bounciness: number= 2) {
+        /**
+         * Instantiates a bounce easing
+         * @see https://easings.net/#easeInBounce
+         * @param bounces Defines the number of bounces
+         * @param bounciness Defines the amplitude of the bounce
+         */
+        constructor(
+            /** Defines the number of bounces */
+            public bounces: number= 3, 
+            /** Defines the amplitude of the bounce */
+            public bounciness: number= 2) {
             super();
             super();
         }
         }
 
 
+        /** @hidden */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
             var y = Math.max(0.0, this.bounces);
             var y = Math.max(0.0, this.bounces);
             var bounciness = this.bounciness;
             var bounciness = this.bounciness;
@@ -99,17 +164,39 @@
         }
         }
     }
     }
 
 
+    /**
+     * Easing function with a power of 3 shape (see link below).
+     * @see https://easings.net/#easeInCubic
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class CubicEase extends EasingFunction implements IEasingFunction {
     export class CubicEase extends EasingFunction implements IEasingFunction {
+        /** @hidden */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
             return (gradient * gradient * gradient);
             return (gradient * gradient * gradient);
         }
         }
     }
     }
 
 
+    /**
+     * Easing function with an elastic shape (see link below).
+     * @see https://easings.net/#easeInElastic
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class ElasticEase extends EasingFunction implements IEasingFunction {
     export class ElasticEase extends EasingFunction implements IEasingFunction {
-        constructor(public oscillations: number= 3, public springiness: number= 3) {
+        /**
+         * Instantiates an elastic easing function
+         * @see https://easings.net/#easeInElastic
+         * @param oscillations Defines the number of oscillations
+         * @param springiness Defines the amplitude of the oscillations
+         */
+        constructor(
+            /** Defines the number of oscillations*/
+            public oscillations: number= 3,
+            /** Defines the amplitude of the oscillations*/
+            public springiness: number= 3) {
             super();
             super();
         }
         }
 
 
+        /** @hidden */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
             var num2;
             var num2;
             var num3 = Math.max(0.0, this.oscillations);
             var num3 = Math.max(0.0, this.oscillations);
@@ -124,11 +211,24 @@
         }
         }
     }
     }
 
 
+    /**
+     * Easing function with an exponential shape (see link below).
+     * @see https://easings.net/#easeInExpo
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class ExponentialEase extends EasingFunction implements IEasingFunction {
     export class ExponentialEase extends EasingFunction implements IEasingFunction {
-        constructor(public exponent: number= 2) {
+        /**
+         * Instantiates an exponential easing function
+         * @see https://easings.net/#easeInExpo
+         * @param exponent Defines the exponent of the function
+         */
+        constructor(
+            /** Defines the exponent of the function */
+            public exponent: number= 2) {
             super();
             super();
         }
         }
 
 
+        /** @hidden */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
             if (this.exponent <= 0) {
             if (this.exponent <= 0) {
                 return gradient;
                 return gradient;
@@ -138,51 +238,107 @@
         }
         }
     }
     }
 
 
+    /**
+     * Easing function with a power shape (see link below).
+     * @see https://easings.net/#easeInQuad
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class PowerEase  extends EasingFunction implements IEasingFunction {
     export class PowerEase  extends EasingFunction implements IEasingFunction {
-        constructor(public power: number= 2) {
+        /**
+         * Instantiates an power base easing function
+         * @see https://easings.net/#easeInQuad
+         * @param power Defines the power of the function
+         */
+        constructor(
+            /** Defines the power of the function */
+            public power: number= 2) {
             super();
             super();
         }
         }
 
 
+        /** @hidden */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
             var y = Math.max(0.0, this.power);
             var y = Math.max(0.0, this.power);
             return Math.pow(gradient, y);
             return Math.pow(gradient, y);
         }
         }
     }
     }
 
 
+    /**
+     * Easing function with a power of 2 shape (see link below).
+     * @see https://easings.net/#easeInQuad
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class QuadraticEase extends EasingFunction implements IEasingFunction {
     export class QuadraticEase extends EasingFunction implements IEasingFunction {
+        /** @hidden */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
             return (gradient * gradient);
             return (gradient * gradient);
-
-           
-
         }
         }
     }
     }
 
 
+    /**
+     * Easing function with a power of 4 shape (see link below).
+     * @see https://easings.net/#easeInQuart
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class QuarticEase extends EasingFunction implements IEasingFunction {
     export class QuarticEase extends EasingFunction implements IEasingFunction {
+        /** @hidden */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
             return (gradient * gradient * gradient * gradient);
             return (gradient * gradient * gradient * gradient);
         }
         }
     }
     }
 
 
+    /**
+     * Easing function with a power of 5 shape (see link below).
+     * @see https://easings.net/#easeInQuint
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class QuinticEase extends EasingFunction implements IEasingFunction {
     export class QuinticEase extends EasingFunction implements IEasingFunction {
+        /** @hidden */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
             return (gradient * gradient * gradient * gradient * gradient);
             return (gradient * gradient * gradient * gradient * gradient);
         }
         }
     }
     }
 
 
+    /**
+     * Easing function with a sin shape (see link below).
+     * @see https://easings.net/#easeInSine
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class SineEase  extends EasingFunction implements IEasingFunction {
     export class SineEase  extends EasingFunction implements IEasingFunction {
+        /** @hidden */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
             return (1.0 - Math.sin(1.5707963267948966 * (1.0 - gradient)));
             return (1.0 - Math.sin(1.5707963267948966 * (1.0 - gradient)));
         }
         }
     }
     }
 
 
+    /**
+     * Easing function with a bezier shape (see link below).
+     * @see http://cubic-bezier.com/#.17,.67,.83,.67
+     * @see http://doc.babylonjs.com/babylon101/animations#easing-functions
+     */
     export class BezierCurveEase extends EasingFunction implements IEasingFunction {
     export class BezierCurveEase extends EasingFunction implements IEasingFunction {
-        constructor(public x1: number= 0, public y1: number= 0, public x2: number= 1, public y2: number= 1) {
+        /**
+         * Instantiates a bezier function
+         * @see http://cubic-bezier.com/#.17,.67,.83,.67
+         * @param x1 Defines the x component of the start tangent in the bezier curve
+         * @param y1 Defines the y component of the start tangent in the bezier curve
+         * @param x2 Defines the x component of the end tangent in the bezier curve
+         * @param y2 Defines the y component of the end tangent in the bezier curve
+         */
+        constructor(
+            /** Defines the x component of the start tangent in the bezier curve */
+            public x1: number= 0,
+            /** Defines the y component of the start tangent in the bezier curve */
+            public y1: number= 0,
+            /** Defines the x component of the end tangent in the bezier curve */
+            public x2: number= 1,
+            /** Defines the y component of the end tangent in the bezier curve */
+            public y2: number= 1) {
             super();
             super();
         }
         }
 
 
+        /** @hidden */
         public easeInCore(gradient: number): number {
         public easeInCore(gradient: number): number {
-            return BezierCurve.interpolate(gradient, this.x1, this.y1, this.x2, this.y2);
+            return BezierCurve.Interpolate(gradient, this.x1, this.y1, this.x2, this.y2);
         }
         }
     }
     }
 }
 }

File diff ditekan karena terlalu besar
+ 379 - 181
src/Audio/babylon.audioEngine.ts


+ 50 - 1
src/Audio/babylon.sound.ts

@@ -1,10 +1,35 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Defines a sound that can be played in the application.
+     * The sound can either be an ambient track or a simple sound played in reaction to a user action.
+     * @see http://doc.babylonjs.com/how_to/playing_sounds_and_music
+     */
     export class Sound {
     export class Sound {
+        /**
+         * The name of the sound in the scene.
+         */
         public name: string;
         public name: string;
+        /**
+         * Does the sound autoplay once loaded.
+         */
         public autoplay: boolean = false;
         public autoplay: boolean = false;
+        /**
+         * Does the sound loop after it finishes playing once.
+         */
         public loop: boolean = false;
         public loop: boolean = false;
+        /**
+         * Does the sound use a custom attenuation curve to simulate the falloff
+         * happening when the source gets further away from the camera.
+         * @see http://doc.babylonjs.com/how_to/playing_sounds_and_music#creating-your-own-custom-attenuation-function
+         */
         public useCustomAttenuation: boolean = false;
         public useCustomAttenuation: boolean = false;
+        /**
+         * The sound track id this sound belongs to.
+         */
         public soundTrackId: number;
         public soundTrackId: number;
+        /**
+         * Does this sound enables spatial sound.
+         */
         public spatialSound: boolean = false;
         public spatialSound: boolean = false;
         public refDistance: number = 1;
         public refDistance: number = 1;
         public rolloffFactor: number = 1;
         public rolloffFactor: number = 1;
@@ -189,6 +214,7 @@ module BABYLON {
                                                 }
                                                 }
                                             });
                                             });
                                             document.body.appendChild(this._htmlAudioElement);
                                             document.body.appendChild(this._htmlAudioElement);
+                                            this._htmlAudioElement.load();
                                         }
                                         }
                                         break;
                                         break;
                                     }
                                     }
@@ -535,7 +561,30 @@ module BABYLON {
                         this._streamingSource.disconnect();
                         this._streamingSource.disconnect();
                         this._streamingSource.connect(this._inputAudioNode);
                         this._streamingSource.connect(this._inputAudioNode);
                         if (this._htmlAudioElement) {
                         if (this._htmlAudioElement) {
-                            this._htmlAudioElement.play();
+                            // required to manage properly the new suspended default state of Chrome
+                            // When the option 'streaming: true' is used, we need first to wait for
+                            // the audio engine to be unlocked by a user gesture before trying to play
+                            // an HTML Audio elememt
+                            var tryToPlay = () => {
+                                if (Engine.audioEngine.unlocked) {
+                                    var playPromise = this._htmlAudioElement.play();
+
+                                    // In browsers that don’t yet support this functionality,
+                                    // playPromise won’t be defined.
+                                    if (playPromise !== undefined) {
+                                        playPromise.catch(function(error) {
+                                            // Automatic playback failed.
+                                            // Waiting for the audio engine to be unlocked by user click on unmute
+                                            Engine.audioEngine.lock();
+                                            Engine.audioEngine.onAudioUnlockedObservable.addOnce(() => { tryToPlay(); });
+                                        });
+                                    }
+                                }
+                                else {
+                                    Engine.audioEngine.onAudioUnlockedObservable.addOnce(() => { tryToPlay(); });
+                                }
+                            }
+                            tryToPlay();
                         }
                         }
                     }
                     }
                     else {
                     else {

+ 146 - 129
src/Behaviors/Cameras/babylon.autoRotationBehavior.ts

@@ -1,76 +1,83 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * The autoRotation behavior (BABYLON.AutoRotationBehavior) is designed to create a smooth rotation of an ArcRotateCamera when there is no user interaction.
+     * @see http://doc.babylonjs.com/how_to/camera_behaviors#autorotation-behavior
+     */
     export class AutoRotationBehavior implements Behavior<ArcRotateCamera> {
     export class AutoRotationBehavior implements Behavior<ArcRotateCamera> {
+        /**
+         * Gets the name of the behavior.
+         */
         public get name(): string {
         public get name(): string {
             return "AutoRotation";
             return "AutoRotation";
         }
         }
 
 
         private _zoomStopsAnimation = false;
         private _zoomStopsAnimation = false;
-		private _idleRotationSpeed = 0.05;
-		private _idleRotationWaitTime = 2000;
+        private _idleRotationSpeed = 0.05;
+        private _idleRotationWaitTime = 2000;
         private _idleRotationSpinupTime = 2000;  
         private _idleRotationSpinupTime = 2000;  
        
        
-		/**
-		* Sets the flag that indicates if user zooming should stop animation.
-		*/
-		public set zoomStopsAnimation(flag: boolean) {
-			this._zoomStopsAnimation = flag;
-		}
-
-		/**
-		* Gets the flag that indicates if user zooming should stop animation.
-		*/
-		public get zoomStopsAnimation(): boolean {
-			return this._zoomStopsAnimation;
+        /**
+        * Sets the flag that indicates if user zooming should stop animation.
+        */
+        public set zoomStopsAnimation(flag: boolean) {
+            this._zoomStopsAnimation = flag;
+        }
+
+        /**
+        * Gets the flag that indicates if user zooming should stop animation.
+        */
+        public get zoomStopsAnimation(): boolean {
+            return this._zoomStopsAnimation;
         }       
         }       
         
         
-		/**
-		* Sets the default speed at which the camera rotates around the model.
-		*/
-		public set idleRotationSpeed(speed: number) {
-			this._idleRotationSpeed = speed;
-		}
-
-		/**
-		* Gets the default speed at which the camera rotates around the model.
-		*/
-		public get idleRotationSpeed() {
-			return this._idleRotationSpeed;
-		}
-
-		/**
-		* Sets the time (in milliseconds) to wait after user interaction before the camera starts rotating.
-		*/
-		public set idleRotationWaitTime(time: number) {
-			this._idleRotationWaitTime = time;
-		}
-
-		/**
-		* Gets the time (milliseconds) to wait after user interaction before the camera starts rotating.
-		*/
-		public get idleRotationWaitTime() {
-			return this._idleRotationWaitTime;
-		}
-
-		/**
-		* Sets the time (milliseconds) to take to spin up to the full idle rotation speed.
-		*/
-		public set idleRotationSpinupTime(time: number) {
-			this._idleRotationSpinupTime = time;
-		}
-
-		/**
-		* Gets the time (milliseconds) to take to spin up to the full idle rotation speed.
-		*/
-		public get idleRotationSpinupTime() {
-			return this._idleRotationSpinupTime;
-		}
-
-		/**
-		 * Gets a value indicating if the camera is currently rotating because of this behavior
-		 */
-		public get rotationInProgress(): boolean {
-			return Math.abs(this._cameraRotationSpeed) > 0;
-		}
+        /**
+        * Sets the default speed at which the camera rotates around the model.
+        */
+        public set idleRotationSpeed(speed: number) {
+            this._idleRotationSpeed = speed;
+        }
+
+        /**
+        * Gets the default speed at which the camera rotates around the model.
+        */
+        public get idleRotationSpeed() {
+            return this._idleRotationSpeed;
+        }
+
+        /**
+        * Sets the time (in milliseconds) to wait after user interaction before the camera starts rotating.
+        */
+        public set idleRotationWaitTime(time: number) {
+            this._idleRotationWaitTime = time;
+        }
+
+        /**
+        * Gets the time (milliseconds) to wait after user interaction before the camera starts rotating.
+        */
+        public get idleRotationWaitTime() {
+            return this._idleRotationWaitTime;
+        }
+
+        /**
+        * Sets the time (milliseconds) to take to spin up to the full idle rotation speed.
+        */
+        public set idleRotationSpinupTime(time: number) {
+            this._idleRotationSpinupTime = time;
+        }
+
+        /**
+        * Gets the time (milliseconds) to take to spin up to the full idle rotation speed.
+        */
+        public get idleRotationSpinupTime() {
+            return this._idleRotationSpinupTime;
+        }
+
+        /**
+         * Gets a value indicating if the camera is currently rotating because of this behavior
+         */
+        public get rotationInProgress(): boolean {
+            return Math.abs(this._cameraRotationSpeed) > 0;
+        }
         
         
         // Default behavior functions
         // Default behavior functions
         private _onPrePointerObservableObserver: Nullable<Observer<PointerInfoPre>>;
         private _onPrePointerObservableObserver: Nullable<Observer<PointerInfoPre>>;
@@ -78,13 +85,20 @@ module BABYLON {
         private _attachedCamera: Nullable<ArcRotateCamera>;
         private _attachedCamera: Nullable<ArcRotateCamera>;
         private _isPointerDown = false;
         private _isPointerDown = false;
         private _lastFrameTime: Nullable<number> = null;
         private _lastFrameTime: Nullable<number> = null;
-		private _lastInteractionTime = -Infinity;
-		private _cameraRotationSpeed: number = 0;
-
-		public init(): void {
-			// Do notihng
-		}
+        private _lastInteractionTime = -Infinity;
+        private _cameraRotationSpeed: number = 0;
+
+        /**
+         * Initializes the behavior.
+         */
+        public init(): void {
+            // Do notihng
+        }
 
 
+        /**
+         * Attaches the behavior to its arc rotate camera.
+         * @param camera Defines the camera to attach the behavior to
+         */
         public attach(camera: ArcRotateCamera): void {
         public attach(camera: ArcRotateCamera): void {
             this._attachedCamera = camera;
             this._attachedCamera = camera;
             let scene = this._attachedCamera.getScene();
             let scene = this._attachedCamera.getScene();
@@ -112,78 +126,81 @@ module BABYLON {
                 this._applyUserInteraction();
                 this._applyUserInteraction();
     
     
                 let timeToRotation = now - this._lastInteractionTime - this._idleRotationWaitTime;
                 let timeToRotation = now - this._lastInteractionTime - this._idleRotationWaitTime;
-				let scale = Math.max(Math.min(timeToRotation / (this._idleRotationSpinupTime), 1), 0);
+                let scale = Math.max(Math.min(timeToRotation / (this._idleRotationSpinupTime), 1), 0);
                 this._cameraRotationSpeed = this._idleRotationSpeed * scale;
                 this._cameraRotationSpeed = this._idleRotationSpeed * scale;
     
     
-				// Step camera rotation by rotation speed
-				if (this._attachedCamera) {
-					this._attachedCamera.alpha -= this._cameraRotationSpeed * (dt / 1000);
-				}
+                // Step camera rotation by rotation speed
+                if (this._attachedCamera) {
+                    this._attachedCamera.alpha -= this._cameraRotationSpeed * (dt / 1000);
+                }
             });
             });
         }
         }
-             
+
+        /**
+         * Detaches the behavior from its current arc rotate camera.
+         */
         public detach(): void {
         public detach(): void {
-			if (!this._attachedCamera) {
-				return;
-			}
+            if (!this._attachedCamera) {
+                return;
+            }
             let scene = this._attachedCamera.getScene();
             let scene = this._attachedCamera.getScene();
-			
-			if (this._onPrePointerObservableObserver) {
-				scene.onPrePointerObservable.remove(this._onPrePointerObservableObserver);
-			}
-			
-			this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver);
-			this._attachedCamera = null;
-		}
-
-		/**
-		 * Returns true if user is scrolling. 
-		 * @return true if user is scrolling.
-		 */
-		private _userIsZooming(): boolean {
-			if (!this._attachedCamera) {
-				return false;
-			}			
-			return this._attachedCamera.inertialRadiusOffset !== 0;
-		}   		
-		
-		private _lastFrameRadius = 0;
-		private _shouldAnimationStopForInteraction(): boolean {
-			if (!this._attachedCamera) {
-				return false;
-			}	
-
-			var zoomHasHitLimit = false;
-			if (this._lastFrameRadius === this._attachedCamera.radius && this._attachedCamera.inertialRadiusOffset !== 0) {
-				zoomHasHitLimit = true;
-			}
-
-			// Update the record of previous radius - works as an approx. indicator of hitting radius limits
-			this._lastFrameRadius = this._attachedCamera.radius;
-			return this._zoomStopsAnimation ? zoomHasHitLimit : this._userIsZooming();
-		}   		
-
-		/**
-		 *  Applies any current user interaction to the camera. Takes into account maximum alpha rotation.
-		 */          
+            
+            if (this._onPrePointerObservableObserver) {
+                scene.onPrePointerObservable.remove(this._onPrePointerObservableObserver);
+            }
+            
+            this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver);
+            this._attachedCamera = null;
+        }
+
+        /**
+         * Returns true if user is scrolling. 
+         * @return true if user is scrolling.
+         */
+        private _userIsZooming(): boolean {
+            if (!this._attachedCamera) {
+                return false;
+            }			
+            return this._attachedCamera.inertialRadiusOffset !== 0;
+        }   		
+        
+        private _lastFrameRadius = 0;
+        private _shouldAnimationStopForInteraction(): boolean {
+            if (!this._attachedCamera) {
+                return false;
+            }	
+
+            var zoomHasHitLimit = false;
+            if (this._lastFrameRadius === this._attachedCamera.radius && this._attachedCamera.inertialRadiusOffset !== 0) {
+                zoomHasHitLimit = true;
+            }
+
+            // Update the record of previous radius - works as an approx. indicator of hitting radius limits
+            this._lastFrameRadius = this._attachedCamera.radius;
+            return this._zoomStopsAnimation ? zoomHasHitLimit : this._userIsZooming();
+        }   		
+
+        /**
+         *  Applies any current user interaction to the camera. Takes into account maximum alpha rotation.
+         */          
         private _applyUserInteraction(): void {
         private _applyUserInteraction(): void {
-			if (this._userIsMoving() && !this._shouldAnimationStopForInteraction()) {
+            if (this._userIsMoving() && !this._shouldAnimationStopForInteraction()) {
                 this._lastInteractionTime = Tools.Now;
                 this._lastInteractionTime = Tools.Now;
-			}
+            }
         }                
         }                
    
    
         // Tools
         // Tools
         private _userIsMoving(): boolean {
         private _userIsMoving(): boolean {
-			if (!this._attachedCamera) {
-				return false;
-			}	
-			
-			return this._attachedCamera.inertialAlphaOffset !== 0 ||
-				this._attachedCamera.inertialBetaOffset !== 0 ||
-				this._attachedCamera.inertialRadiusOffset !== 0 ||
-				this._attachedCamera.inertialPanningX !== 0 ||
-				this._attachedCamera.inertialPanningY !== 0 ||
-				this._isPointerDown;
-		}
+            if (!this._attachedCamera) {
+                return false;
+            }	
+            
+            return this._attachedCamera.inertialAlphaOffset !== 0 ||
+                this._attachedCamera.inertialBetaOffset !== 0 ||
+                this._attachedCamera.inertialRadiusOffset !== 0 ||
+                this._attachedCamera.inertialPanningX !== 0 ||
+                this._attachedCamera.inertialPanningY !== 0 ||
+                this._isPointerDown;
+        }
     }
     }
 }
 }

+ 14 - 0
src/Behaviors/Cameras/babylon.bouncingBehavior.ts

@@ -1,8 +1,12 @@
 module BABYLON {
 module BABYLON {
     /**
     /**
      * Add a bouncing effect to an ArcRotateCamera when reaching a specified minimum and maximum radius
      * Add a bouncing effect to an ArcRotateCamera when reaching a specified minimum and maximum radius
+     * @see http://doc.babylonjs.com/how_to/camera_behaviors#bouncing-behavior
      */
      */
     export class BouncingBehavior implements Behavior<ArcRotateCamera> {
     export class BouncingBehavior implements Behavior<ArcRotateCamera> {
+        /**
+         * Gets the name of the behavior.
+         */
         public get name(): string {
         public get name(): string {
             return "Bouncing";
             return "Bouncing";
         }
         }
@@ -79,10 +83,17 @@ module BABYLON {
         private _onAfterCheckInputsObserver: Nullable<Observer<Camera>>;
         private _onAfterCheckInputsObserver: Nullable<Observer<Camera>>;
         private _onMeshTargetChangedObserver: Nullable<Observer<Nullable<AbstractMesh>>>;
         private _onMeshTargetChangedObserver: Nullable<Observer<Nullable<AbstractMesh>>>;
 
 
+        /**
+         * Initializes the behavior.
+         */
         public init(): void {
         public init(): void {
             // Do notihng
             // Do notihng
         }
         }
 
 
+        /**
+         * Attaches the behavior to its arc rotate camera.
+         * @param camera Defines the camera to attach the behavior to
+         */
         public attach(camera: ArcRotateCamera): void {
         public attach(camera: ArcRotateCamera): void {
             this._attachedCamera = camera;
             this._attachedCamera = camera;
             this._onAfterCheckInputsObserver = camera.onAfterCheckInputsObservable.add(() => {
             this._onAfterCheckInputsObserver = camera.onAfterCheckInputsObservable.add(() => {
@@ -102,6 +113,9 @@ module BABYLON {
             });
             });
         }
         }
 
 
+        /**
+         * Detaches the behavior from its current arc rotate camera.
+         */
         public detach(): void {
         public detach(): void {
             if (!this._attachedCamera) {
             if (!this._attachedCamera) {
                 return;
                 return;

+ 33 - 6
src/Behaviors/Cameras/babylon.framingBehavior.ts

@@ -1,5 +1,12 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * The framing behavior (BABYLON.FramingBehavior) is designed to automatically position an ArcRotateCamera when its target is set to a mesh. It is also useful if you want to prevent the camera to go under a virtual horizontal plane.
+     * @see http://doc.babylonjs.com/how_to/camera_behaviors#framing-behavior
+     */
     export class FramingBehavior implements Behavior<ArcRotateCamera> {
     export class FramingBehavior implements Behavior<ArcRotateCamera> {
+        /**
+         * Gets the name of the behavior.
+         */
         public get name(): string {
         public get name(): string {
             return "Framing";
             return "Framing";
         }
         }
@@ -139,6 +146,12 @@ module BABYLON {
             return this._framingTime;
             return this._framingTime;
         }
         }
 
 
+        /**
+         * Define if the behavior should automatically change the configured
+         * camera limits and sensibilities.
+         */
+        public autoCorrectCameraLimitsAndSensibility = true;
+
         // Default behavior functions
         // Default behavior functions
         private _onPrePointerObservableObserver: Nullable<Observer<PointerInfoPre>>;
         private _onPrePointerObservableObserver: Nullable<Observer<PointerInfoPre>>;
         private _onAfterCheckInputsObserver: Nullable<Observer<Camera>>;
         private _onAfterCheckInputsObserver: Nullable<Observer<Camera>>;
@@ -147,10 +160,17 @@ module BABYLON {
         private _isPointerDown = false;
         private _isPointerDown = false;
         private _lastInteractionTime = -Infinity;
         private _lastInteractionTime = -Infinity;
 
 
+        /**
+         * Initializes the behavior.
+         */
         public init(): void {
         public init(): void {
             // Do notihng
             // Do notihng
         }
         }
 
 
+        /**
+         * Attaches the behavior to its arc rotate camera.
+         * @param camera Defines the camera to attach the behavior to
+         */
         public attach(camera: ArcRotateCamera): void {
         public attach(camera: ArcRotateCamera): void {
             this._attachedCamera = camera;
             this._attachedCamera = camera;
             let scene = this._attachedCamera.getScene();
             let scene = this._attachedCamera.getScene();
@@ -184,6 +204,9 @@ module BABYLON {
             });
             });
         }
         }
 
 
+        /**
+         * Detaches the behavior from its current arc rotate camera.
+         */
         public detach(): void {
         public detach(): void {
             if (!this._attachedCamera) {
             if (!this._attachedCamera) {
                 return;
                 return;
@@ -307,19 +330,23 @@ module BABYLON {
             let radius = 0;
             let radius = 0;
             if (this._mode === FramingBehavior.FitFrustumSidesMode) {
             if (this._mode === FramingBehavior.FitFrustumSidesMode) {
                 let position = this._calculateLowerRadiusFromModelBoundingSphere(minimumWorld, maximumWorld);
                 let position = this._calculateLowerRadiusFromModelBoundingSphere(minimumWorld, maximumWorld);
-                this._attachedCamera.lowerRadiusLimit = radiusWorld.length() + this._attachedCamera.minZ;
+                if (this.autoCorrectCameraLimitsAndSensibility) {
+                    this._attachedCamera.lowerRadiusLimit = radiusWorld.length() + this._attachedCamera.minZ;
+                }
                 radius = position;
                 radius = position;
             } else if (this._mode === FramingBehavior.IgnoreBoundsSizeMode) {
             } else if (this._mode === FramingBehavior.IgnoreBoundsSizeMode) {
                 radius = this._calculateLowerRadiusFromModelBoundingSphere(minimumWorld, maximumWorld);
                 radius = this._calculateLowerRadiusFromModelBoundingSphere(minimumWorld, maximumWorld);
-                if (this._attachedCamera.lowerRadiusLimit === null) {
+                if (this.autoCorrectCameraLimitsAndSensibility && this._attachedCamera.lowerRadiusLimit === null) {
                     this._attachedCamera.lowerRadiusLimit = this._attachedCamera.minZ;
                     this._attachedCamera.lowerRadiusLimit = this._attachedCamera.minZ;
                 }
                 }
             }
             }
 
 
             // Set sensibilities
             // Set sensibilities
-            let extend = maximumWorld.subtract(minimumWorld).length();
-            this._attachedCamera.panningSensibility = 5000 / extend;
-            this._attachedCamera.wheelPrecision = 100 / radius;
+            if (this.autoCorrectCameraLimitsAndSensibility) {
+                const extend = maximumWorld.subtract(minimumWorld).length();
+                this._attachedCamera.panningSensibility = 5000 / extend;
+                this._attachedCamera.wheelPrecision = 100 / radius;
+            }
 
 
             // transition to new radius
             // transition to new radius
             if (!this._radiusTransition) {
             if (!this._radiusTransition) {
@@ -511,4 +538,4 @@ module BABYLON {
          */
          */
         public static FitFrustumSidesMode = 1;
         public static FitFrustumSidesMode = 1;
     }
     }
-}
+}

+ 21 - 5
src/Behaviors/Mesh/babylon.pointerDragBehavior.ts

@@ -3,6 +3,7 @@ module BABYLON {
      * A behavior that when attached to a mesh will allow the mesh to be dragged around the screen based on pointer events
      * A behavior that when attached to a mesh will allow the mesh to be dragged around the screen based on pointer events
      */
      */
     export class PointerDragBehavior implements Behavior<Mesh> {
     export class PointerDragBehavior implements Behavior<Mesh> {
+        private static _AnyMouseID = -2;
         private _attachedNode: Mesh; 
         private _attachedNode: Mesh; 
         private _dragPlane: Mesh;
         private _dragPlane: Mesh;
         private _scene:Scene;
         private _scene:Scene;
@@ -159,6 +160,15 @@ module BABYLON {
                     }
                     }
                 }else if(pointerInfo.type == BABYLON.PointerEventTypes.POINTERMOVE){
                 }else if(pointerInfo.type == BABYLON.PointerEventTypes.POINTERMOVE){
                     var pointerId = (<PointerEvent>pointerInfo.event).pointerId;
                     var pointerId = (<PointerEvent>pointerInfo.event).pointerId;
+
+                    // If drag was started with anyMouseID specified, set pointerID to the next mouse that moved
+                    if(this.currentDraggingPointerID === PointerDragBehavior._AnyMouseID && pointerId !== PointerDragBehavior._AnyMouseID && (<PointerEvent>pointerInfo.event).pointerType == "mouse"){
+                        if(this._lastPointerRay[this.currentDraggingPointerID]){
+                            this._lastPointerRay[pointerId] = this._lastPointerRay[this.currentDraggingPointerID];
+                            delete this._lastPointerRay[this.currentDraggingPointerID];
+                        }
+                        this.currentDraggingPointerID = pointerId;
+                    }
                     
                     
                     // Keep track of last pointer ray, this is used simulating the start of a drag in startDrag()
                     // Keep track of last pointer ray, this is used simulating the start of a drag in startDrag()
                     if(!this._lastPointerRay[pointerId]){
                     if(!this._lastPointerRay[pointerId]){
@@ -204,19 +214,25 @@ module BABYLON {
         private _lastPointerRay:{[key: number]: Ray} = {};
         private _lastPointerRay:{[key: number]: Ray} = {};
         /**
         /**
          * Simulates the start of a pointer drag event on the behavior
          * Simulates the start of a pointer drag event on the behavior
-         * @param pointerId pointerID of the pointer that should be simulated (Default: 1 for mouse pointer)
+         * @param pointerId pointerID of the pointer that should be simulated (Default: Any mouse pointer ID)
          * @param fromRay initial ray of the pointer to be simulated (Default: Ray from camera to attached mesh)
          * @param fromRay initial ray of the pointer to be simulated (Default: Ray from camera to attached mesh)
          * @param startPickedPoint picked point of the pointer to be simulated (Default: attached mesh position)
          * @param startPickedPoint picked point of the pointer to be simulated (Default: attached mesh position)
          */
          */
-        public startDrag(pointerId = 1, fromRay?:Ray, startPickedPoint?:Vector3){
+        public startDrag(pointerId:number = PointerDragBehavior._AnyMouseID, fromRay?:Ray, startPickedPoint?:Vector3){
             this._startDrag(pointerId, fromRay, startPickedPoint);
             this._startDrag(pointerId, fromRay, startPickedPoint);
-            if(this._lastPointerRay[pointerId]){
+            
+            var lastRay =  this._lastPointerRay[pointerId];
+            if(pointerId === PointerDragBehavior._AnyMouseID){
+                lastRay = this._lastPointerRay[<any>Object.keys(this._lastPointerRay)[0]];
+            }
+            
+            if(lastRay){
                 // if there was a last pointer ray drag the object there
                 // if there was a last pointer ray drag the object there
-                this._moveDrag(this._lastPointerRay[pointerId]);
+                this._moveDrag(lastRay);
             }
             }
         }
         }
 
 
-        private _startDrag(pointerId = 1, fromRay?:Ray, startPickedPoint?:Vector3){
+        private _startDrag(pointerId:number, fromRay?:Ray, startPickedPoint?:Vector3){
             if(!this._scene.activeCamera || this.dragging || !this._attachedNode){
             if(!this._scene.activeCamera || this.dragging || !this._attachedNode){
                 return;
                 return;
             }
             }

+ 13 - 2
src/Behaviors/Mesh/babylon.sixDofDragBehavior.ts

@@ -33,8 +33,15 @@ module BABYLON {
          * If camera controls should be detached during the drag
          * If camera controls should be detached during the drag
          */
          */
         public detachCameraControls = true;
         public detachCameraControls = true;
-
-
+        /**
+         * Fires each time a drag starts
+         */
+        public onDragStartObservable = new Observable<{}>()
+        /**
+         *  Fires each time a drag ends (eg. mouse release after drag)
+         */
+        public onDragEndObservable = new Observable<{}>()
+        
         constructor(){
         constructor(){
         }
         }
         
         
@@ -118,6 +125,7 @@ module BABYLON {
                             }
                             }
                         }
                         }
                         BoundingBoxGizmo._RestorePivotPoint(pickedMesh);
                         BoundingBoxGizmo._RestorePivotPoint(pickedMesh);
+                        this.onDragStartObservable.notifyObservers({});
                     }
                     }
                 }else if(pointerInfo.type == BABYLON.PointerEventTypes.POINTERUP){
                 }else if(pointerInfo.type == BABYLON.PointerEventTypes.POINTERUP){
                     if(this.currentDraggingPointerID == (<PointerEvent>pointerInfo.event).pointerId){
                     if(this.currentDraggingPointerID == (<PointerEvent>pointerInfo.event).pointerId){
@@ -131,6 +139,7 @@ module BABYLON {
                         if(this.detachCameraControls && attachedElement && this._scene.activeCamera && !this._scene.activeCamera.leftCamera){
                         if(this.detachCameraControls && attachedElement && this._scene.activeCamera && !this._scene.activeCamera.leftCamera){
                             this._scene.activeCamera.attachControl(attachedElement, true);
                             this._scene.activeCamera.attachControl(attachedElement, true);
                         }
                         }
+                        this.onDragEndObservable.notifyObservers({});
                     }
                     }
                 }else if(pointerInfo.type == BABYLON.PointerEventTypes.POINTERMOVE){
                 }else if(pointerInfo.type == BABYLON.PointerEventTypes.POINTERMOVE){
                     if(this.currentDraggingPointerID == (<PointerEvent>pointerInfo.event).pointerId && this.dragging && pointerInfo.pickInfo && pointerInfo.pickInfo.ray && pickedMesh){
                     if(this.currentDraggingPointerID == (<PointerEvent>pointerInfo.event).pointerId && this.dragging && pointerInfo.pickInfo && pointerInfo.pickInfo.ray && pickedMesh){
@@ -213,6 +222,8 @@ module BABYLON {
             if(this._virtualDragMesh){
             if(this._virtualDragMesh){
                 this._virtualDragMesh.dispose();
                 this._virtualDragMesh.dispose();
             }
             }
+            this.onDragEndObservable.clear();
+            this.onDragStartObservable.clear();
         }
         }
     }
     }
 }
 }

+ 50 - 10
src/Cameras/Inputs/babylon.arcRotateCameraGamepadInput.ts

@@ -1,18 +1,42 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Manage the gamepad inputs to control an arc rotate camera.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+     */
     export class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
     export class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
-        camera: ArcRotateCamera;
+        /**
+         * Defines the camera the input is attached to.
+         */
+        public camera: ArcRotateCamera;
 
 
+        /**
+         * Defines the gamepad the input is gathering event from.
+         */
         public gamepad: Nullable<Gamepad>;
         public gamepad: Nullable<Gamepad>;
-        private _onGamepadConnectedObserver : Nullable<Observer<Gamepad>>;
-        private _onGamepadDisconnectedObserver : Nullable<Observer<Gamepad>>;
 
 
+        /**
+         * Defines the gamepad rotation sensiblity.
+         * This is the threshold from when rotation starts to be accounted for to prevent jittering.
+         */
         @serialize()
         @serialize()
         public gamepadRotationSensibility = 80;
         public gamepadRotationSensibility = 80;
 
 
+        /**
+         * Defines the gamepad move sensiblity.
+         * This is the threshold from when moving starts to be accounted for for to prevent jittering.
+         */
         @serialize()
         @serialize()
         public gamepadMoveSensibility = 40;
         public gamepadMoveSensibility = 40;
 
 
-        attachControl(element: HTMLElement, noPreventDefault?: boolean) {
+        private _onGamepadConnectedObserver : Nullable<Observer<Gamepad>>;
+        private _onGamepadDisconnectedObserver : Nullable<Observer<Gamepad>>;
+
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        public attachControl(element: HTMLElement, noPreventDefault?: boolean): void {
             let manager = this.camera.getScene().gamepadManager;
             let manager = this.camera.getScene().gamepadManager;
             this._onGamepadConnectedObserver = manager.onGamepadConnectedObservable.add((gamepad) => {
             this._onGamepadConnectedObserver = manager.onGamepadConnectedObservable.add((gamepad) => {
                 if (gamepad.type !== Gamepad.POSE_ENABLED) {
                 if (gamepad.type !== Gamepad.POSE_ENABLED) {
@@ -21,24 +45,32 @@ module BABYLON {
                         this.gamepad = gamepad;
                         this.gamepad = gamepad;
                     }
                     }
                 }
                 }
-            });  
+            });
 
 
             this._onGamepadDisconnectedObserver = manager.onGamepadDisconnectedObservable.add((gamepad)=> {
             this._onGamepadDisconnectedObserver = manager.onGamepadDisconnectedObservable.add((gamepad)=> {
                 if (this.gamepad === gamepad) {
                 if (this.gamepad === gamepad) {
                     this.gamepad = null;
                     this.gamepad = null;
                 }
                 }
-            });            
+            });
             
             
             this.gamepad = manager.getGamepadByType(Gamepad.XBOX);
             this.gamepad = manager.getGamepadByType(Gamepad.XBOX);
         }
         }
 
 
-        detachControl(element: Nullable<HTMLElement>) {
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
+        public detachControl(element: Nullable<HTMLElement>): void {
             this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver);            
             this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver);            
             this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver);
             this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver);
             this.gamepad = null;
             this.gamepad = null;
         }
         }
 
 
-        checkInputs() {
+        /**
+         * Update the current camera state depending on the inputs that have been used this frame.
+         * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.
+         */
+        public checkInputs(): void {
             if (this.gamepad) {
             if (this.gamepad) {
                 var camera = this.camera;
                 var camera = this.camera;
                 var RSValues = this.gamepad.rightStick;
                 var RSValues = this.gamepad.rightStick;
@@ -70,11 +102,19 @@ module BABYLON {
             }
             }
         }
         }
 
 
-        getClassName(): string {
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        public getClassName(): string {
             return "ArcRotateCameraGamepadInput";
             return "ArcRotateCameraGamepadInput";
         }
         }
 
 
-        getSimpleName() {
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        public getSimpleName(): string {
             return "gamepad";
             return "gamepad";
         }        
         }        
     }
     }

+ 67 - 9
src/Cameras/Inputs/babylon.arcRotateCameraKeyboardMoveInput.ts

@@ -1,32 +1,67 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Manage the keyboard inputs to control the movement of an arc rotate camera.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+     */
     export class ArcRotateCameraKeyboardMoveInput implements ICameraInput<ArcRotateCamera> {
     export class ArcRotateCameraKeyboardMoveInput implements ICameraInput<ArcRotateCamera> {
-        camera: ArcRotateCamera;
-        private _keys = new Array<number>();
-        
+        /**
+         * Defines the camera the input is attached to.
+         */
+        public camera: ArcRotateCamera;
+
+        /**
+         * Defines the list of key codes associated with the up action (increase alpha)
+         */
         @serialize()
         @serialize()
         public keysUp = [38];
         public keysUp = [38];
 
 
+        /**
+         * Defines the list of key codes associated with the down action (decrease alpha)
+         */
         @serialize()
         @serialize()
         public keysDown = [40];
         public keysDown = [40];
 
 
+        /**
+         * Defines the list of key codes associated with the left action (increase beta)
+         */
         @serialize()
         @serialize()
         public keysLeft = [37];
         public keysLeft = [37];
 
 
+        /**
+         * Defines the list of key codes associated with the right action (decrease beta)
+         */
         @serialize()
         @serialize()
         public keysRight = [39];
         public keysRight = [39];
 
 
+        /**
+         * Defines the list of key codes associated with the reset action.
+         * Those keys reset the camera to its last stored state (with the method camera.storeState())
+         */
         @serialize()
         @serialize()
         public keysReset = [220];
         public keysReset = [220];
 
 
+        /**
+         * Defines the panning sensibility of the inputs.
+         * (How fast is the camera paning)
+         */
         @serialize()
         @serialize()
         public panningSensibility: number = 50.0;
         public panningSensibility: number = 50.0;
 
 
+        /**
+         * Defines the zooming sensibility of the inputs.
+         * (How fast is the camera zooming)
+         */
         @serialize()
         @serialize()
         public zoomingSensibility: number = 25.0;
         public zoomingSensibility: number = 25.0;
 
 
+        /**
+         * Defines wether maintaining the alt key down switch the movement mode from
+         * orientation to zoom.
+         */
         @serialize()
         @serialize()
         public useAltToZoom: boolean = true;
         public useAltToZoom: boolean = true;
 
 
+        private _keys = new Array<number>();
         private _ctrlPressed: boolean;
         private _ctrlPressed: boolean;
         private _altPressed: boolean;
         private _altPressed: boolean;
         private _onCanvasBlurObserver: Nullable<Observer<Engine>>;
         private _onCanvasBlurObserver: Nullable<Observer<Engine>>;
@@ -34,7 +69,12 @@ module BABYLON {
         private _engine: Engine;
         private _engine: Engine;
         private _scene: Scene;
         private _scene: Scene;
 
 
-        public attachControl(element: HTMLElement, noPreventDefault?: boolean) {
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        public attachControl(element: HTMLElement, noPreventDefault?: boolean): void {
             if (this._onCanvasBlurObserver) {
             if (this._onCanvasBlurObserver) {
                 return;
                 return;
             }
             }
@@ -93,6 +133,10 @@ module BABYLON {
             });    
             });    
         }
         }
 
 
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
         public detachControl(element: Nullable<HTMLElement>) {
         public detachControl(element: Nullable<HTMLElement>) {
             if (this._scene) {
             if (this._scene) {
                 if (this._onKeyboardObserver) {
                 if (this._onKeyboardObserver) {
@@ -108,7 +152,11 @@ module BABYLON {
             this._keys = [];
             this._keys = [];
         }
         }
 
 
-        public checkInputs() {
+        /**
+         * Update the current camera state depending on the inputs that have been used this frame.
+         * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.
+         */
+        public checkInputs(): void {
             if (this._onKeyboardObserver){
             if (this._onKeyboardObserver){
                 var camera = this.camera;
                 var camera = this.camera;
 
 
@@ -147,17 +195,27 @@ module BABYLON {
                             camera.inertialBetaOffset += 0.01;
                             camera.inertialBetaOffset += 0.01;
                         }
                         }
                     } else if (this.keysReset.indexOf(keyCode) !== -1) {
                     } else if (this.keysReset.indexOf(keyCode) !== -1) {
-                        camera.restoreState();
+                        if (camera.useInputToRestoreState) {
+                            camera.restoreState();
+                        }
                     }
                     }
                 }
                 }
             }
             }
         }
         }
 
 
-        getClassName(): string {
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        public getClassName(): string {
             return "ArcRotateCameraKeyboardMoveInput";
             return "ArcRotateCameraKeyboardMoveInput";
         }
         }
-        
-        getSimpleName(){
+
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        public getSimpleName(): string{
             return "keyboard";
             return "keyboard";
         }
         }
     }
     }

+ 35 - 8
src/Cameras/Inputs/babylon.arcRotateCameraMouseWheelInput.ts

@@ -1,10 +1,17 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Manage the mouse wheel inputs to control an arc rotate camera.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+     */
     export class ArcRotateCameraMouseWheelInput implements ICameraInput<ArcRotateCamera> {
     export class ArcRotateCameraMouseWheelInput implements ICameraInput<ArcRotateCamera> {
-        camera: ArcRotateCamera;
-
-        private _wheel: Nullable<(p: PointerInfo, s: EventState) => void>;
-        private _observer: Nullable<Observer<PointerInfo>>;
+        /**
+         * Defines the camera the input is attached to.
+         */
+        public camera: ArcRotateCamera;
 
 
+        /**
+         * Gets or Set the mouse wheel precision or how fast is the camera zooming.
+         */
         @serialize()
         @serialize()
         public wheelPrecision = 3.0;
         public wheelPrecision = 3.0;
 
 
@@ -15,7 +22,15 @@ module BABYLON {
         @serialize()
         @serialize()
         public wheelDeltaPercentage = 0;
         public wheelDeltaPercentage = 0;
 
 
-        public attachControl(element: HTMLElement, noPreventDefault?: boolean) {
+        private _wheel: Nullable<(p: PointerInfo, s: EventState) => void>;
+        private _observer: Nullable<Observer<PointerInfo>>;
+
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        public attachControl(element: HTMLElement, noPreventDefault?: boolean): void {
             this._wheel = (p, s) => {
             this._wheel = (p, s) => {
                 //sanity check - this should be a PointerWheel event.
                 //sanity check - this should be a PointerWheel event.
                 if (p.type !== PointerEventTypes.POINTERWHEEL) return;
                 if (p.type !== PointerEventTypes.POINTERWHEEL) return;
@@ -50,7 +65,11 @@ module BABYLON {
             this._observer = this.camera.getScene().onPointerObservable.add(this._wheel, PointerEventTypes.POINTERWHEEL);
             this._observer = this.camera.getScene().onPointerObservable.add(this._wheel, PointerEventTypes.POINTERWHEEL);
         }
         }
 
 
-        public detachControl(element: Nullable<HTMLElement>) {
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
+        public detachControl(element: Nullable<HTMLElement>): void {
             if (this._observer && element) {
             if (this._observer && element) {
                 this.camera.getScene().onPointerObservable.remove(this._observer);
                 this.camera.getScene().onPointerObservable.remove(this._observer);
                 this._observer = null;
                 this._observer = null;
@@ -58,11 +77,19 @@ module BABYLON {
             }
             }
         }
         }
 
 
-        getClassName(): string {
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        public getClassName(): string {
             return "ArcRotateCameraMouseWheelInput";
             return "ArcRotateCameraMouseWheelInput";
         }
         }
 
 
-        getSimpleName() {
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        public getSimpleName(): string {
             return "mousewheel";
             return "mousewheel";
         }
         }
     }
     }

+ 57 - 7
src/Cameras/Inputs/babylon.arcRotateCameraPointersInput.ts

@@ -1,16 +1,35 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Manage the pointers inputs to control an arc rotate camera.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+     */
     export class ArcRotateCameraPointersInput implements ICameraInput<ArcRotateCamera> {
     export class ArcRotateCameraPointersInput implements ICameraInput<ArcRotateCamera> {
-        camera: ArcRotateCamera;
+        /**
+         * Defines the camera the input is attached to.
+         */
+        public camera: ArcRotateCamera;
 
 
+        /**
+         * Defines the buttons associated with the input to handle camera move.
+         */
         @serialize()
         @serialize()
         public buttons = [0, 1, 2];
         public buttons = [0, 1, 2];
 
 
+        /**
+         * Defines the pointer angular sensibility  along the X axis or how fast is the camera rotating.
+         */
         @serialize()
         @serialize()
         public angularSensibilityX = 1000.0;
         public angularSensibilityX = 1000.0;
 
 
+        /**
+         * Defines the pointer angular sensibility along the Y axis or how fast is the camera rotating.
+         */
         @serialize()
         @serialize()
         public angularSensibilityY = 1000.0;
         public angularSensibilityY = 1000.0;
 
 
+        /**
+         * Defines the pointer pinch precision or how fast is the camera zooming.
+         */
         @serialize()
         @serialize()
         public pinchPrecision = 12.0;
         public pinchPrecision = 12.0;
 
 
@@ -21,18 +40,30 @@ module BABYLON {
         @serialize()
         @serialize()
         public pinchDeltaPercentage = 0;
         public pinchDeltaPercentage = 0;
 
 
+        /**
+         * Defines the pointer panning sensibility or how fast is the camera moving.
+         */
         @serialize()
         @serialize()
         public panningSensibility: number = 1000.0;
         public panningSensibility: number = 1000.0;
 
 
+        /**
+         * Defines whether panning (2 fingers swipe) is enabled through multitouch.
+         */
         @serialize()
         @serialize()
         public multiTouchPanning: boolean = true;
         public multiTouchPanning: boolean = true;
 
 
+        /**
+         * Defines whether panning is enabled for both pan (2 fingers swipe) and zoom (pinch) through multitouch.
+         */
         @serialize()
         @serialize()
         public multiTouchPanAndZoom: boolean = true;
         public multiTouchPanAndZoom: boolean = true;
 
 
-        private _isPanClick: boolean = false;
+        /**
+         * Revers pinch action direction.
+         */
         public pinchInwards = true;
         public pinchInwards = true;
 
 
+        private _isPanClick: boolean = false;
         private _pointerInput: (p: PointerInfo, s: EventState) => void;
         private _pointerInput: (p: PointerInfo, s: EventState) => void;
         private _observer: Nullable<Observer<PointerInfo>>;
         private _observer: Nullable<Observer<PointerInfo>>;
         private _onMouseMove: Nullable<(e: MouseEvent) => any>;
         private _onMouseMove: Nullable<(e: MouseEvent) => any>;
@@ -42,7 +73,12 @@ module BABYLON {
         private _onLostFocus: Nullable<(e: FocusEvent) => any>;
         private _onLostFocus: Nullable<(e: FocusEvent) => any>;
         private _onContextMenu: Nullable<(e: PointerEvent) => void>;
         private _onContextMenu: Nullable<(e: PointerEvent) => void>;
 
 
-        public attachControl(element: HTMLElement, noPreventDefault?: boolean) {
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        public attachControl(element: HTMLElement, noPreventDefault?: boolean): void {
             var engine = this.camera.getEngine();
             var engine = this.camera.getEngine();
             var cacheSoloPointer: Nullable<{ x: number, y: number, pointerId: number, type: any }>; // cache pointer object for better perf on camera rotation
             var cacheSoloPointer: Nullable<{ x: number, y: number, pointerId: number, type: any }>; // cache pointer object for better perf on camera rotation
             var pointA: Nullable<{ x: number, y: number, pointerId: number, type: any }> = null;
             var pointA: Nullable<{ x: number, y: number, pointerId: number, type: any }> = null;
@@ -90,7 +126,9 @@ module BABYLON {
                     }
                     }
                 }
                 }
                 else if (p.type === PointerEventTypes.POINTERDOUBLETAP) {
                 else if (p.type === PointerEventTypes.POINTERDOUBLETAP) {
-                    this.camera.restoreState();
+                    if (this.camera.useInputToRestoreState) {
+                        this.camera.restoreState();
+                    }
                 }
                 }
                 else if (p.type === PointerEventTypes.POINTERUP && srcElement) {
                 else if (p.type === PointerEventTypes.POINTERUP && srcElement) {
                     try {
                     try {
@@ -314,7 +352,11 @@ module BABYLON {
             ]);
             ]);
         }
         }
 
 
-        public detachControl(element: Nullable<HTMLElement>) {
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
+        public detachControl(element: Nullable<HTMLElement>): void {
             if (this._onLostFocus) {
             if (this._onLostFocus) {
                 Tools.UnregisterTopRootEvents([
                 Tools.UnregisterTopRootEvents([
                     { name: "blur", handler: this._onLostFocus }
                     { name: "blur", handler: this._onLostFocus }
@@ -353,11 +395,19 @@ module BABYLON {
             }
             }
         }
         }
 
 
-        getClassName(): string {
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        public getClassName(): string {
             return "ArcRotateCameraPointersInput";
             return "ArcRotateCameraPointersInput";
         }
         }
 
 
-        getSimpleName() {
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        public getSimpleName(): string {
             return "pointers";
             return "pointers";
         }
         }
     }
     }

+ 48 - 6
src/Cameras/Inputs/babylon.arcRotateCameraVRDeviceOrientationInput.ts

@@ -1,9 +1,27 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Manage the device orientation inputs (gyroscope) to control an arc rotate camera.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+     */
     export class ArcRotateCameraVRDeviceOrientationInput implements ICameraInput<ArcRotateCamera> {
     export class ArcRotateCameraVRDeviceOrientationInput implements ICameraInput<ArcRotateCamera> {
-        camera: ArcRotateCamera;
+        /**
+         * Defines the camera the input is attached to.
+         */
+        public camera: ArcRotateCamera;
 
 
+        /**
+         * Defines a correction factor applied on the alpha value retrieved from the orientation events.
+         */
         public alphaCorrection = 1;
         public alphaCorrection = 1;
+
+        /**
+         * Defines a correction factor applied on the beta value retrieved from the orientation events.
+         */
         public betaCorrection = 1;
         public betaCorrection = 1;
+
+        /**
+         * Defines a correction factor applied on the gamma value retrieved from the orientation events.
+         */
         public gammaCorrection = 1;
         public gammaCorrection = 1;
 
 
         private _alpha = 0;
         private _alpha = 0;
@@ -12,11 +30,19 @@ module BABYLON {
 
 
         private _deviceOrientationHandler: () => void;
         private _deviceOrientationHandler: () => void;
 
 
+        /**
+         * Instantiate a new ArcRotateCameraVRDeviceOrientationInput.
+         */
         constructor() {
         constructor() {
             this._deviceOrientationHandler = this._onOrientationEvent.bind(this);
             this._deviceOrientationHandler = this._onOrientationEvent.bind(this);
         }
         }
 
 
-        attachControl(element: HTMLElement, noPreventDefault?: boolean) {
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        public attachControl(element: HTMLElement, noPreventDefault?: boolean): void {
             this.camera.attachControl(element, noPreventDefault);
             this.camera.attachControl(element, noPreventDefault);
             window.addEventListener("deviceorientation", this._deviceOrientationHandler);
             window.addEventListener("deviceorientation", this._deviceOrientationHandler);
         }
         }
@@ -33,7 +59,11 @@ module BABYLON {
             this._dirty = true;
             this._dirty = true;
         }
         }
 
 
-        public checkInputs() {
+        /**
+         * Update the current camera state depending on the inputs that have been used this frame.
+         * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.
+         */
+        public checkInputs(): void {
             if (this._dirty) {
             if (this._dirty) {
                 this._dirty = false;
                 this._dirty = false;
 
 
@@ -46,15 +76,27 @@ module BABYLON {
             }
             }
         }
         }
 
 
-        detachControl(element: Nullable<HTMLElement>) {
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
+        public detachControl(element: Nullable<HTMLElement>): void {
             window.removeEventListener("deviceorientation", this._deviceOrientationHandler);
             window.removeEventListener("deviceorientation", this._deviceOrientationHandler);
         }
         }
 
 
-        getClassName(): string {
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        public getClassName(): string {
             return "ArcRotateCameraVRDeviceOrientationInput";
             return "ArcRotateCameraVRDeviceOrientationInput";
         }
         }
 
 
-        getSimpleName() {
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        public getSimpleName(): string {
             return "VRDeviceOrientation";
             return "VRDeviceOrientation";
         }
         }
     }
     }

+ 34 - 5
src/Cameras/Inputs/babylon.freeCameraDeviceOrientationInput.ts

@@ -2,6 +2,7 @@ module BABYLON {
     /**
     /**
      * Takes information about the orientation of the device as reported by the deviceorientation event to orient the camera.
      * Takes information about the orientation of the device as reported by the deviceorientation event to orient the camera.
      * Screen rotation is taken into account.
      * Screen rotation is taken into account.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
      */
      */
     export class FreeCameraDeviceOrientationInput implements ICameraInput<FreeCamera> {
     export class FreeCameraDeviceOrientationInput implements ICameraInput<FreeCamera> {
         private _camera: FreeCamera;
         private _camera: FreeCamera;
@@ -15,11 +16,18 @@ module BABYLON {
         private _beta: number = 0;
         private _beta: number = 0;
         private _gamma: number = 0;
         private _gamma: number = 0;
 
 
+        /**
+         * Instantiates a new input
+         * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+         */
         constructor() {
         constructor() {
             this._constantTranform = new Quaternion(- Math.sqrt(0.5), 0, 0, Math.sqrt(0.5));
             this._constantTranform = new Quaternion(- Math.sqrt(0.5), 0, 0, Math.sqrt(0.5));
             this._orientationChanged();
             this._orientationChanged();
         }
         }
 
 
+        /**
+         * Define the camera controlled by the input.
+         */
         public get camera(): FreeCamera {
         public get camera(): FreeCamera {
             return this._camera;
             return this._camera;
         }
         }
@@ -31,7 +39,12 @@ module BABYLON {
             }
             }
         }
         }
 
 
-        attachControl(element: HTMLElement, noPreventDefault?: boolean) {
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        public attachControl(element: HTMLElement, noPreventDefault?: boolean): void {
             window.addEventListener("orientationchange", this._orientationChanged);
             window.addEventListener("orientationchange", this._orientationChanged);
             window.addEventListener("deviceorientation", this._deviceOrientation);
             window.addEventListener("deviceorientation", this._deviceOrientation);
             //In certain cases, the attach control is called AFTER orientation was changed,
             //In certain cases, the attach control is called AFTER orientation was changed,
@@ -51,12 +64,20 @@ module BABYLON {
             this._gamma = evt.gamma !== null ? evt.gamma : 0;
             this._gamma = evt.gamma !== null ? evt.gamma : 0;
         }
         }
 
 
-        detachControl(element: Nullable<HTMLElement>) {
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
+        public detachControl(element: Nullable<HTMLElement>): void {
             window.removeEventListener("orientationchange", this._orientationChanged);
             window.removeEventListener("orientationchange", this._orientationChanged);
             window.removeEventListener("deviceorientation", this._deviceOrientation);
             window.removeEventListener("deviceorientation", this._deviceOrientation);
         }
         }
 
 
-        public checkInputs() {
+        /**
+         * Update the current camera state depending on the inputs that have been used this frame.
+         * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.
+         */
+        public checkInputs(): void {
             //if no device orientation provided, don't update the rotation.
             //if no device orientation provided, don't update the rotation.
             //Only testing against alpha under the assumption thatnorientation will never be so exact when set.
             //Only testing against alpha under the assumption thatnorientation will never be so exact when set.
             if (!this._alpha) return;
             if (!this._alpha) return;
@@ -68,11 +89,19 @@ module BABYLON {
             this._camera.rotationQuaternion.w *= -1;
             this._camera.rotationQuaternion.w *= -1;
         }
         }
 
 
-        getClassName(): string {
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        public getClassName(): string {
             return "FreeCameraDeviceOrientationInput";
             return "FreeCameraDeviceOrientationInput";
         }
         }
 
 
-        getSimpleName() {
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        public getSimpleName(): string {
             return "deviceOrientation";
             return "deviceOrientation";
         }
         }
     }
     }

+ 49 - 10
src/Cameras/Inputs/babylon.freeCameraGamepadInput.ts

@@ -1,24 +1,47 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Manage the gamepad inputs to control a free camera.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+     */
     export class FreeCameraGamepadInput implements ICameraInput<FreeCamera> {
     export class FreeCameraGamepadInput implements ICameraInput<FreeCamera> {
-        camera: FreeCamera;
+        /**
+         * Define the camera the input is attached to.
+         */
+        public camera: FreeCamera;
 
 
-        public gamepad: Nullable<Gamepad>;        
-        private _onGamepadConnectedObserver : Nullable<Observer<Gamepad>>;
-        private _onGamepadDisconnectedObserver : Nullable<Observer<Gamepad>>;
+        /**
+         * Define the Gamepad controlling the input
+         */
+        public gamepad: Nullable<Gamepad>;
 
 
+        /**
+         * Defines the gamepad rotation sensiblity.
+         * This is the threshold from when rotation starts to be accounted for to prevent jittering.
+         */
         @serialize()
         @serialize()
         public gamepadAngularSensibility = 200;
         public gamepadAngularSensibility = 200;
 
 
+        /**
+         * Defines the gamepad move sensiblity.
+         * This is the threshold from when moving starts to be accounted for for to prevent jittering.
+         */
         @serialize()
         @serialize()
         public gamepadMoveSensibility = 40;
         public gamepadMoveSensibility = 40;
-
+        
         // private members
         // private members
+        private _onGamepadConnectedObserver : Nullable<Observer<Gamepad>>;
+        private _onGamepadDisconnectedObserver : Nullable<Observer<Gamepad>>;
         private _cameraTransform: Matrix = Matrix.Identity();
         private _cameraTransform: Matrix = Matrix.Identity();
         private _deltaTransform: Vector3 = Vector3.Zero();
         private _deltaTransform: Vector3 = Vector3.Zero();
         private _vector3: Vector3 = Vector3.Zero();
         private _vector3: Vector3 = Vector3.Zero();
         private _vector2: Vector2 = Vector2.Zero();
         private _vector2: Vector2 = Vector2.Zero();
 
 
-        attachControl(element: HTMLElement, noPreventDefault?: boolean) {
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        public attachControl(element: HTMLElement, noPreventDefault?: boolean): void {
             let manager = this.camera.getScene().gamepadManager;
             let manager = this.camera.getScene().gamepadManager;
             this._onGamepadConnectedObserver = manager.onGamepadConnectedObservable.add((gamepad) => {
             this._onGamepadConnectedObserver = manager.onGamepadConnectedObservable.add((gamepad) => {
                 if (gamepad.type !== Gamepad.POSE_ENABLED) {
                 if (gamepad.type !== Gamepad.POSE_ENABLED) {
@@ -38,13 +61,21 @@ module BABYLON {
             this.gamepad = manager.getGamepadByType(Gamepad.XBOX);
             this.gamepad = manager.getGamepadByType(Gamepad.XBOX);
         }
         }
 
 
-        detachControl(element: Nullable<HTMLElement>) {
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
+        public detachControl(element: Nullable<HTMLElement>): void {
             this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver);
             this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver);
             this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver);
             this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver);
             this.gamepad = null;
             this.gamepad = null;
         }
         }
 
 
-        checkInputs() {
+        /**
+         * Update the current camera state depending on the inputs that have been used this frame.
+         * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.
+         */
+        public checkInputs(): void {
             if (this.gamepad && this.gamepad.leftStick) {
             if (this.gamepad && this.gamepad.leftStick) {
                 var camera = this.camera;
                 var camera = this.camera;
                 var LSValues = this.gamepad.leftStick;
                 var LSValues = this.gamepad.leftStick;
@@ -80,11 +111,19 @@ module BABYLON {
             }
             }
         }
         }
 
 
-        getClassName(): string {
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        public getClassName(): string {
             return "FreeCameraGamepadInput";
             return "FreeCameraGamepadInput";
         }
         }
 
 
-        getSimpleName() {
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        public getSimpleName(): string {
             return "gamepad";
             return "gamepad";
         }
         }
     }
     }

+ 53 - 12
src/Cameras/Inputs/babylon.freeCameraKeyboardMoveInput.ts

@@ -1,25 +1,50 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Manage the keyboard inputs to control the movement of a free camera.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+     */
     export class FreeCameraKeyboardMoveInput implements ICameraInput<FreeCamera> {
     export class FreeCameraKeyboardMoveInput implements ICameraInput<FreeCamera> {
-        camera: FreeCamera;
-        private _keys = new Array<number>();
-        private _onCanvasBlurObserver: Nullable<Observer<Engine>>;
-        private _onKeyboardObserver: Nullable<Observer<KeyboardInfo>>;
-        private _engine: Engine;
-        private _scene: Scene;
-
+        /**
+         * Defines the camera the input is attached to.
+         */
+        public camera: FreeCamera;
+
+        /**
+         * Gets or Set the list of keyboard keys used to control the forward move of the camera.
+         */
         @serialize()
         @serialize()
         public keysUp = [38];
         public keysUp = [38];
 
 
+        /**
+         * Gets or Set the list of keyboard keys used to control the backward move of the camera.
+         */
         @serialize()
         @serialize()
         public keysDown = [40];
         public keysDown = [40];
 
 
+        /**
+         * Gets or Set the list of keyboard keys used to control the left strafe move of the camera.
+         */
         @serialize()
         @serialize()
         public keysLeft = [37];
         public keysLeft = [37];
 
 
+        /**
+         * Gets or Set the list of keyboard keys used to control the right strafe move of the camera.
+         */
         @serialize()
         @serialize()
         public keysRight = [39];
         public keysRight = [39];
 
 
-        attachControl(element: HTMLElement, noPreventDefault?: boolean) {
+        private _keys = new Array<number>();
+        private _onCanvasBlurObserver: Nullable<Observer<Engine>>;
+        private _onKeyboardObserver: Nullable<Observer<KeyboardInfo>>;
+        private _engine: Engine;
+        private _scene: Scene;
+
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        public attachControl(element: HTMLElement, noPreventDefault?: boolean): void {
             if (this._onCanvasBlurObserver) {
             if (this._onCanvasBlurObserver) {
                 return;
                 return;
             }
             }
@@ -66,7 +91,11 @@ module BABYLON {
             });
             });
         }
         }
 
 
-        detachControl(element: Nullable<HTMLElement>) {
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
+        public detachControl(element: Nullable<HTMLElement>): void {
             if (this._scene) {
             if (this._scene) {
                 if (this._onKeyboardObserver) {
                 if (this._onKeyboardObserver) {
                     this._scene.onKeyboardObservable.remove(this._onKeyboardObserver);
                     this._scene.onKeyboardObservable.remove(this._onKeyboardObserver);
@@ -81,7 +110,11 @@ module BABYLON {
             this._keys = [];
             this._keys = [];
         }
         }
 
 
-        public checkInputs() {
+        /**
+         * Update the current camera state depending on the inputs that have been used this frame.
+         * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.
+         */
+        public checkInputs(): void {
             if (this._onKeyboardObserver) {
             if (this._onKeyboardObserver) {
                 var camera = this.camera;
                 var camera = this.camera;
                 // Keyboard
                 // Keyboard
@@ -110,7 +143,11 @@ module BABYLON {
             }
             }
         }
         }
 
 
-        getClassName(): string {
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        public getClassName(): string {
             return "FreeCameraKeyboardMoveInput";
             return "FreeCameraKeyboardMoveInput";
         }
         }
 
 
@@ -119,7 +156,11 @@ module BABYLON {
             this._keys = [];
             this._keys = [];
         }
         }
 
 
-        getSimpleName() {
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        public getSimpleName(): string {
             return "keyboard";
             return "keyboard";
         }
         }
     }
     }

+ 46 - 8
src/Cameras/Inputs/babylon.freeCameraMouseInput.ts

@@ -1,23 +1,49 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Manage the mouse inputs to control the movement of a free camera.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+     */
     export class FreeCameraMouseInput implements ICameraInput<FreeCamera> {
     export class FreeCameraMouseInput implements ICameraInput<FreeCamera> {
-        camera: FreeCamera;
-
+        /**
+         * Defines the camera the input is attached to.
+         */
+        public camera: FreeCamera;
+
+        /**
+         * Defines the buttons associated with the input to handle camera move.
+         */
         @serialize()
         @serialize()
         public buttons = [0, 1, 2];
         public buttons = [0, 1, 2];
 
 
+        /**
+         * Defines the pointer angular sensibility  along the X and Y axis or how fast is the camera rotating.
+         */
         @serialize()
         @serialize()
         public angularSensibility = 2000.0;
         public angularSensibility = 2000.0;
 
 
         private _pointerInput: (p: PointerInfo, s: EventState) => void;
         private _pointerInput: (p: PointerInfo, s: EventState) => void;
         private _onMouseMove: Nullable<(e: MouseEvent) => any>;
         private _onMouseMove: Nullable<(e: MouseEvent) => any>;
         private _observer: Nullable<Observer<PointerInfo>>;
         private _observer: Nullable<Observer<PointerInfo>>;
-
         private previousPosition: Nullable<{ x: number, y: number }> = null;
         private previousPosition: Nullable<{ x: number, y: number }> = null;
 
 
-        constructor(public touchEnabled = true) {
+        /**
+         * Manage the mouse inputs to control the movement of a free camera.
+         * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+         * @param touchEnabled Defines if touch is enabled or not
+         */
+        constructor(
+            /**
+             * Define if touch is enabled in the mouse input
+             */
+            public touchEnabled = true) {
         }
         }
 
 
-        attachControl(element: HTMLElement, noPreventDefault?: boolean) {
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        public attachControl(element: HTMLElement, noPreventDefault?: boolean):void {
             var engine = this.camera.getEngine();
             var engine = this.camera.getEngine();
 
 
             if (!this._pointerInput) {
             if (!this._pointerInput) {
@@ -122,7 +148,11 @@ module BABYLON {
 
 
         }
         }
 
 
-        detachControl(element: Nullable<HTMLElement>) {
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
+        public detachControl(element: Nullable<HTMLElement>):void {
             if (this._observer && element) {
             if (this._observer && element) {
                 this.camera.getScene().onPointerObservable.remove(this._observer);
                 this.camera.getScene().onPointerObservable.remove(this._observer);
 
 
@@ -136,11 +166,19 @@ module BABYLON {
             }
             }
         }
         }
 
 
-        getClassName(): string {
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        public getClassName(): string {
             return "FreeCameraMouseInput";
             return "FreeCameraMouseInput";
         }
         }
 
 
-        getSimpleName() {
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        public getSimpleName(): string {
             return "mouse";
             return "mouse";
         }
         }
     }
     }

+ 48 - 12
src/Cameras/Inputs/babylon.freeCameraTouchInput.ts

@@ -1,6 +1,27 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Manage the touch inputs to control the movement of a free camera.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+     */
     export class FreeCameraTouchInput implements ICameraInput<FreeCamera> {
     export class FreeCameraTouchInput implements ICameraInput<FreeCamera> {
-        camera: FreeCamera;
+        /**
+         * Defines the camera the input is attached to.
+         */
+        public camera: FreeCamera;
+
+        /**
+         * Defines the touch sensibility for rotation.
+         * The higher the faster.
+         */
+        @serialize()
+        public touchAngularSensibility: number = 200000.0;
+
+        /**
+         * Defines the touch sensibility for move.
+         * The higher the faster.
+         */
+        @serialize()
+        public touchMoveSensibility: number = 250.0;
 
 
         private _offsetX: Nullable<number> = null;
         private _offsetX: Nullable<number> = null;
         private _offsetY: Nullable<number> = null;
         private _offsetY: Nullable<number> = null;
@@ -10,13 +31,12 @@ module BABYLON {
         private _observer: Nullable<Observer<PointerInfo>>;
         private _observer: Nullable<Observer<PointerInfo>>;
         private _onLostFocus: Nullable<(e: FocusEvent) => any>;
         private _onLostFocus: Nullable<(e: FocusEvent) => any>;
 
 
-        @serialize()
-        public touchAngularSensibility: number = 200000.0;
-
-        @serialize()
-        public touchMoveSensibility: number = 250.0;
-
-        attachControl(element: HTMLElement, noPreventDefault?: boolean) {
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        public attachControl(element: HTMLElement, noPreventDefault?: boolean): void {
             var previousPosition: Nullable<{ x: number, y: number }> = null;
             var previousPosition: Nullable<{ x: number, y: number }> = null;
 
 
             if (this._pointerInput === undefined) {
             if (this._pointerInput === undefined) {
@@ -98,7 +118,11 @@ module BABYLON {
             }
             }
         }
         }
 
 
-        detachControl(element: Nullable<HTMLElement>) {
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
+        public detachControl(element: Nullable<HTMLElement>): void {
             if (this._pointerInput && element) {
             if (this._pointerInput && element) {
                 if (this._observer) {
                 if (this._observer) {
                     this.camera.getScene().onPointerObservable.remove(this._observer);
                     this.camera.getScene().onPointerObservable.remove(this._observer);
@@ -115,7 +139,11 @@ module BABYLON {
             }
             }
         }
         }
 
 
-        checkInputs() {
+        /**
+         * Update the current camera state depending on the inputs that have been used this frame.
+         * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.
+         */
+        public checkInputs(): void {
             if (this._offsetX && this._offsetY) {
             if (this._offsetX && this._offsetY) {
                 var camera = this.camera;
                 var camera = this.camera;
                 camera.cameraRotation.y += this._offsetX / this.touchAngularSensibility;
                 camera.cameraRotation.y += this._offsetX / this.touchAngularSensibility;
@@ -132,11 +160,19 @@ module BABYLON {
             }
             }
         }
         }
 
 
-        getClassName(): string {
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        public getClassName(): string {
             return "FreeCameraTouchInput";
             return "FreeCameraTouchInput";
         }
         }
 
 
-        getSimpleName() {
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        public getSimpleName(): string {
             return "touch";
             return "touch";
         }
         }
     }
     }

+ 44 - 8
src/Cameras/Inputs/babylon.freeCameraVirtualJoystickInput.ts

@@ -1,18 +1,37 @@
 module BABYLON {
 module BABYLON {
+    /**
+     * Manage the Virtual Joystick inputs to control the movement of a free camera.
+     * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
+     */
     export class FreeCameraVirtualJoystickInput implements ICameraInput<FreeCamera> {
     export class FreeCameraVirtualJoystickInput implements ICameraInput<FreeCamera> {
-        camera: FreeCamera;
+        /**
+         * Defines the camera the input is attached to.
+         */
+        public camera: FreeCamera;
 
 
         private _leftjoystick: VirtualJoystick;
         private _leftjoystick: VirtualJoystick;
         private _rightjoystick: VirtualJoystick;
         private _rightjoystick: VirtualJoystick;
-        
+
+        /**
+         * Gets the left stick of the virtual joystick.
+         * @returns The virtual Joystick
+         */
         public getLeftJoystick(): VirtualJoystick {
         public getLeftJoystick(): VirtualJoystick {
             return this._leftjoystick;
             return this._leftjoystick;
         }
         }
 
 
+        /**
+         * Gets the right stick of the virtual joystick.
+         * @returns The virtual Joystick
+         */
         public getRightJoystick(): VirtualJoystick {
         public getRightJoystick(): VirtualJoystick {
             return this._rightjoystick;
             return this._rightjoystick;
         }
         }
 
 
+        /**
+         * Update the current camera state depending on the inputs that have been used this frame.
+         * This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.
+         */
         public checkInputs() {
         public checkInputs() {
             if (this._leftjoystick){
             if (this._leftjoystick){
                 var camera = this.camera;
                 var camera = this.camera;
@@ -30,8 +49,13 @@ module BABYLON {
                 }
                 }
             }
             }
         }
         }
-        
-        attachControl(element : HTMLElement, noPreventDefault?: boolean) {
+
+        /**
+         * Attach the input controls to a specific dom element to get the input from.
+         * @param element Defines the element the controls should be listened from
+         * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
+         */
+        public attachControl(element : HTMLElement, noPreventDefault?: boolean): void {
             this._leftjoystick = new VirtualJoystick(true);
             this._leftjoystick = new VirtualJoystick(true);
             this._leftjoystick.setAxisForUpDown(JoystickAxis.Z);
             this._leftjoystick.setAxisForUpDown(JoystickAxis.Z);
             this._leftjoystick.setAxisForLeftRight(JoystickAxis.X);
             this._leftjoystick.setAxisForLeftRight(JoystickAxis.X);
@@ -44,16 +68,28 @@ module BABYLON {
             this._rightjoystick.setJoystickColor("yellow");
             this._rightjoystick.setJoystickColor("yellow");
         }
         }
 
 
-        detachControl(element: Nullable<HTMLElement>) {
+        /**
+         * Detach the current controls from the specified dom element.
+         * @param element Defines the element to stop listening the inputs from
+         */
+        public detachControl(element: Nullable<HTMLElement>): void {
             this._leftjoystick.releaseCanvas();
             this._leftjoystick.releaseCanvas();
             this._rightjoystick.releaseCanvas();
             this._rightjoystick.releaseCanvas();
         }
         }
 
 
-        getClassName(): string {
+        /**
+         * Gets the class name of the current intput.
+         * @returns the class name
+         */
+        public getClassName(): string {
             return "FreeCameraVirtualJoystickInput";
             return "FreeCameraVirtualJoystickInput";
         }
         }
-        
-        getSimpleName(){
+
+        /**
+         * Get the friendly name associated with the input class.
+         * @returns the input friendly name
+         */
+        public getSimpleName(): string {
             return "virtualJoystick";
             return "virtualJoystick";
         }
         }
     }
     }

+ 2 - 1
src/Cameras/Stereoscopic/babylon.anaglyphArcRotateCamera.ts

@@ -5,7 +5,8 @@ module BABYLON {
 
 
     /**
     /**
      * Camera used to simulate anaglyphic rendering (based on ArcRotateCamera)
      * Camera used to simulate anaglyphic rendering (based on ArcRotateCamera)
-     */    
+     * @see http://doc.babylonjs.com/features/cameras#anaglyph-cameras
+     */
     export class AnaglyphArcRotateCamera extends ArcRotateCamera {
     export class AnaglyphArcRotateCamera extends ArcRotateCamera {
 
 
         /**
         /**

+ 1 - 0
src/Cameras/Stereoscopic/babylon.anaglyphFreeCamera.ts

@@ -5,6 +5,7 @@ module BABYLON {
 
 
     /**
     /**
      * Camera used to simulate anaglyphic rendering (based on FreeCamera)
      * Camera used to simulate anaglyphic rendering (based on FreeCamera)
+     * @see http://doc.babylonjs.com/features/cameras#anaglyph-cameras
      */
      */
     export class AnaglyphFreeCamera extends FreeCamera {
     export class AnaglyphFreeCamera extends FreeCamera {
         /**
         /**

+ 1 - 0
src/Cameras/Stereoscopic/babylon.anaglyphGamepadCamera.ts

@@ -5,6 +5,7 @@ module BABYLON {
 
 
     /**
     /**
      * Camera used to simulate anaglyphic rendering (based on GamepadCamera)
      * Camera used to simulate anaglyphic rendering (based on GamepadCamera)
+     * @see http://doc.babylonjs.com/features/cameras#anaglyph-cameras
      */       
      */       
     export class AnaglyphGamepadCamera extends GamepadCamera {
     export class AnaglyphGamepadCamera extends GamepadCamera {
         /**
         /**

+ 1 - 0
src/Cameras/Stereoscopic/babylon.anaglyphUniversalCamera.ts

@@ -5,6 +5,7 @@ module BABYLON {
 
 
     /**
     /**
      * Camera used to simulate anaglyphic rendering (based on UniversalCamera)
      * Camera used to simulate anaglyphic rendering (based on UniversalCamera)
+     * @see http://doc.babylonjs.com/features/cameras#anaglyph-cameras
      */        
      */        
     export class AnaglyphUniversalCamera extends UniversalCamera {
     export class AnaglyphUniversalCamera extends UniversalCamera {
         /**
         /**

+ 0 - 0
src/Cameras/Stereoscopic/babylon.stereoscopicArcRotateCamera.ts


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini