sebavan преди 6 години
родител
ревизия
71b246de65
променени са 25 файла, в които са добавени 62181 реда и са изтрити 10341 реда
  1. 52219 495
      Playground/babylon.d.txt
  2. 9810 9792
      dist/preview release/babylon.d.ts
  3. 1 1
      dist/preview release/babylon.js
  4. 20 0
      dist/preview release/babylon.max.js
  5. 20 0
      dist/preview release/gui/babylon.gui.d.ts
  6. 1 1
      dist/preview release/gui/babylon.gui.js
  7. 1 1
      dist/preview release/gui/babylon.gui.min.js
  8. 41 0
      dist/preview release/gui/babylon.gui.module.d.ts
  9. 8 8
      dist/preview release/inspector/babylon.inspector.bundle.js
  10. 1 1
      dist/preview release/inspector/babylon.inspector.d.ts
  11. 2 2
      dist/preview release/inspector/babylon.inspector.module.d.ts
  12. 1 1
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  13. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  14. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  15. 1 1
      dist/preview release/loaders/babylonjs.loaders.min.js
  16. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  17. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  18. 1 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  19. 1 1
      dist/preview release/serializers/babylon.glTF2Serializer.min.js
  20. 1 1
      dist/preview release/serializers/babylonjs.serializers.min.js
  21. 2 2
      dist/preview release/viewer/babylon.viewer.d.ts
  22. 2 2
      dist/preview release/viewer/babylon.viewer.js
  23. 2 2
      dist/preview release/viewer/babylon.viewer.max.js
  24. 2 2
      dist/preview release/viewer/babylon.viewer.module.d.ts
  25. 40 23
      tests/nullEngine/app.js

Файловите разлики са ограничени, защото са твърде много
+ 52219 - 495
Playground/babylon.d.txt


Файловите разлики са ограничени, защото са твърде много
+ 9810 - 9792
dist/preview release/babylon.d.ts


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/babylon.js


+ 20 - 0
dist/preview release/babylon.max.js

@@ -69102,6 +69102,17 @@ var BABYLON;
              */
             this.parentId = null;
             /**
+             * The culling strategy to use to check whether the solid particle must be culled or not when using isInFrustum().
+             * The possible values are :
+             * - AbstractMesh.CULLINGSTRATEGY_STANDARD
+             * - AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY
+             * - AbstractMesh.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION
+             * - AbstractMesh.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY
+             * The default value for solid particles is AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY
+             * Please read each static variable documentation in the class AbstractMesh to get details about the culling process.
+             * */
+            this.cullingStrategy = BABYLON.AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY;
+            /**
              * @hidden Internal global position in the SPS.
              */
             this._globalPosition = BABYLON.Vector3.Zero();
@@ -69165,6 +69176,15 @@ var BABYLON;
             return this._boundingInfo.intersects(target._boundingInfo, false);
         };
         /**
+         * Returns `true` if the solid particle is within the frustum defined by the passed array of planes.
+         * A particle is in the frustum if its bounding box intersects the frustum
+         * @param frustumPlanes defines the frustum to test
+         * @returns true if the particle is in the frustum planes
+         */
+        SolidParticle.prototype.isInFrustum = function (frustumPlanes) {
+            return this._boundingInfo !== null && this._boundingInfo.isInFrustum(frustumPlanes, this.cullingStrategy);
+        };
+        /**
          * get the rotation matrix of the particle
          * @hidden
          */

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

@@ -846,6 +846,26 @@ declare module BABYLON.GUI {
             _onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number): boolean;
             _onPointerMove(target: Control, coordinates: BABYLON.Vector2): void;
             _onPointerUp(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean): void;
+            /**
+                * This function expands the color picker by creating a color picker dialog with manual
+                * color value input and the ability to save colors into an array to be used later in
+                * subsequent launches of the dialogue.
+                * @param advancedTexture defines the AdvancedDynamicTexture the dialog is assigned to
+                * @param options defines size for dialog and options for saved colors. Also accepts last color picked as hex string and saved colors array as hex strings.
+                * @returns picked color as a hex string and the saved colors array as hex strings.
+                */
+            static ShowPickerDialogAsync(advancedTexture: AdvancedDynamicTexture, options: {
+                    pickerWidth?: string;
+                    pickerHeight?: string;
+                    headerHeight?: string;
+                    lastColor?: string;
+                    swatchLimit?: number;
+                    numSwatchesPerLine?: number;
+                    savedColors?: Array<string>;
+            }): Promise<{
+                    savedColors?: string[];
+                    pickedColor: string;
+            }>;
     }
 }
 declare module BABYLON.GUI {

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/gui/babylon.gui.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


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

@@ -913,6 +913,7 @@ declare module 'babylonjs-gui/2D/controls/colorpicker' {
     import { Control } from "babylonjs-gui/2D/controls/control";
     import { Color3, Observable, Vector2 } from "babylonjs";
     import { Measure } from "babylonjs-gui/2D/measure";
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
     /** Class used to create color pickers */
     export class ColorPicker extends Control {
             name?: string | undefined;
@@ -944,6 +945,26 @@ declare module 'babylonjs-gui/2D/controls/colorpicker' {
             _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number): boolean;
             _onPointerMove(target: Control, coordinates: Vector2): void;
             _onPointerUp(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean): void;
+            /**
+                * This function expands the color picker by creating a color picker dialog with manual
+                * color value input and the ability to save colors into an array to be used later in
+                * subsequent launches of the dialogue.
+                * @param advancedTexture defines the AdvancedDynamicTexture the dialog is assigned to
+                * @param options defines size for dialog and options for saved colors. Also accepts last color picked as hex string and saved colors array as hex strings.
+                * @returns picked color as a hex string and the saved colors array as hex strings.
+                */
+            static ShowPickerDialogAsync(advancedTexture: AdvancedDynamicTexture, options: {
+                    pickerWidth?: string;
+                    pickerHeight?: string;
+                    headerHeight?: string;
+                    lastColor?: string;
+                    swatchLimit?: number;
+                    numSwatchesPerLine?: number;
+                    savedColors?: Array<string>;
+            }): Promise<{
+                    savedColors?: string[];
+                    pickedColor: string;
+            }>;
     }
 }
 
@@ -4170,6 +4191,26 @@ declare module BABYLON.GUI {
             _onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number): boolean;
             _onPointerMove(target: Control, coordinates: BABYLON.Vector2): void;
             _onPointerUp(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean): void;
+            /**
+                * This function expands the color picker by creating a color picker dialog with manual
+                * color value input and the ability to save colors into an array to be used later in
+                * subsequent launches of the dialogue.
+                * @param advancedTexture defines the AdvancedDynamicTexture the dialog is assigned to
+                * @param options defines size for dialog and options for saved colors. Also accepts last color picked as hex string and saved colors array as hex strings.
+                * @returns picked color as a hex string and the saved colors array as hex strings.
+                */
+            static ShowPickerDialogAsync(advancedTexture: AdvancedDynamicTexture, options: {
+                    pickerWidth?: string;
+                    pickerHeight?: string;
+                    headerHeight?: string;
+                    lastColor?: string;
+                    swatchLimit?: number;
+                    numSwatchesPerLine?: number;
+                    savedColors?: Array<string>;
+            }): Promise<{
+                    savedColors?: string[];
+                    pickedColor: string;
+            }>;
     }
 }
 declare module BABYLON.GUI {

Файловите разлики са ограничени, защото са твърде много
+ 8 - 8
dist/preview release/inspector/babylon.inspector.bundle.js


+ 1 - 1
dist/preview release/inspector/babylon.inspector.d.ts

@@ -1,6 +1,6 @@
 /*Babylon.js Inspector*/
 // Dependencies for this module:
-//   ../../../../tools/gulp/babylonjs
+//   ../../../../Tools/Gulp/babylonjs
 declare module INSPECTOR {
 }
 declare module INSPECTOR {

+ 2 - 2
dist/preview release/inspector/babylon.inspector.module.d.ts

@@ -1,6 +1,6 @@
 /*Babylon.js Inspector*/
 // Dependencies for this module:
-//   ../../../../tools/gulp/babylonjs
+//   ../../../../Tools/Gulp/babylonjs
 
 declare module 'babylonjs-inspector' {
     export * from "babylonjs-inspector/inspector";
@@ -31,7 +31,7 @@ declare module 'babylonjs-inspector/components/propertyChangedEvent' {
 
 /*Babylon.js Inspector*/
 // Dependencies for this module:
-//   ../../../../tools/gulp/babylonjs
+//   ../../../../Tools/Gulp/babylonjs
 declare module INSPECTOR {
 }
 declare module INSPECTOR {

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/loaders/babylon.glTFFileLoader.min.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/loaders/babylonjs.loaders.min.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/serializers/babylon.glTF2Serializer.min.js


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/serializers/babylonjs.serializers.min.js


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

@@ -4,8 +4,8 @@
 declare module "babylonjs-loaders"{ export=BABYLON;}
 // Generated by dts-bundle v0.7.3
 // Dependencies for this module:
-//   ../../../../../tools/gulp/babylonjs
-//   ../../../../../tools/gulp/babylonjs-loaders
+//   ../../../../../Tools/Gulp/babylonjs
+//   ../../../../../Tools/Gulp/babylonjs-loaders
 declare module BabylonViewer {
     /**
         * BabylonJS Viewer

Файловите разлики са ограничени, защото са твърде много
+ 2 - 2
dist/preview release/viewer/babylon.viewer.js


Файловите разлики са ограничени, защото са твърде много
+ 2 - 2
dist/preview release/viewer/babylon.viewer.max.js


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

@@ -5,8 +5,8 @@ declare module "babylonjs-loaders"{ export=BABYLON;}
 
 // Generated by dts-bundle v0.7.3
 // Dependencies for this module:
-//   ../../../../../tools/gulp/babylonjs
-//   ../../../../../tools/gulp/babylonjs-loaders
+//   ../../../../../Tools/Gulp/babylonjs
+//   ../../../../../Tools/Gulp/babylonjs-loaders
 
 declare module 'babylonjs-viewer' {
     import { mapperManager } from 'babylonjs-viewer/configuration/mappers';

+ 40 - 23
tests/nullEngine/app.js

@@ -315,29 +315,46 @@ var engine = new BABYLON.NullEngine();
 // var serialized = BABYLON.SceneSerializer.SerializeMesh(parent, true, true);
 // console.log(serialized);
 
-var scene = new BABYLON.Scene(engine);
+// var scene = new BABYLON.Scene(engine);
 
-var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(20, 20, 100), scene);
+// var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(20, 20, 100), scene);
 
-var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0.8, 100, BABYLON.Vector3.Zero(), scene);
+// var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0.8, 100, BABYLON.Vector3.Zero(), scene);
+
+// BABYLON.SceneLoader.ImportMesh("", "https://playground.babylonjs.com/scenes/", "skull.babylon", scene, function(newMeshes) {
+//     camera.target = newMeshes[0];
 
-BABYLON.SceneLoader.ImportMesh("", "https://playground.babylonjs.com/scenes/", "skull.babylon", scene, function(newMeshes) {
-    camera.target = newMeshes[0];
-
-    console.log("Meshes loaded from babylon file: " + newMeshes.length);
-    for (var index = 0; index < newMeshes.length; index++) {
-        console.log(newMeshes[index].toString());
-    }
-
-    BABYLON.SceneLoader.ImportMesh("", "https://www.babylonjs.com/Assets/DamagedHelmet/glTF/", "DamagedHelmet.gltf", scene, function(meshes) {
-        console.log("Meshes loaded from gltf file: " + meshes.length);
-        for (var index = 0; index < meshes.length; index++) {
-            console.log(meshes[index].toString());
-        }
-    });
-
-    console.log("render started")
-    engine.runRenderLoop(function() {
-        scene.render();
-    })
-});
+//     console.log("Meshes loaded from babylon file: " + newMeshes.length);
+//     for (var index = 0; index < newMeshes.length; index++) {
+//         console.log(newMeshes[index].toString());
+//     }
+
+//     BABYLON.SceneLoader.ImportMesh("", "https://www.babylonjs.com/Assets/DamagedHelmet/glTF/", "DamagedHelmet.gltf", scene, function(meshes) {
+//         console.log("Meshes loaded from gltf file: " + meshes.length);
+//         for (var index = 0; index < meshes.length; index++) {
+//             console.log(meshes[index].toString());
+//         }
+//     });
+
+//     console.log("render started")
+//     engine.runRenderLoop(function() {
+//         scene.render();
+//     })
+// });
+var scene = new BABYLON.Scene(engine);
+var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0.8, 100, BABYLON.Vector3.Zero(), scene);
+const scaling = engine.getHardwareScalingLevel();
+
+const pos = BABYLON.Vector3.Project(
+    new BABYLON.Vector3(5, 10, 3),
+    BABYLON.Matrix.IdentityReadOnly,
+    scene.getTransformMatrix(),
+    scene.activeCamera.viewport.toGlobal(
+        engine.getRenderWidth(),
+        engine.getRenderHeight(),
+    ),
+);
+pos.x *= scaling;
+pos.y *= scaling;
+pos.z *= scaling;
+return pos;