David Catuhe 6 년 전
부모
커밋
2efd64d1bd
26개의 변경된 파일6823개의 추가작업 그리고 6741개의 파일을 삭제
  1. 3338 3320
      Playground/babylon.d.txt
  2. 3348 3330
      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/babylon.no-module.max.js
  6. 1 1
      dist/preview release/babylon.worker.js
  7. 20 0
      dist/preview release/es6.js
  8. 1 1
      dist/preview release/gui/babylon.gui.js
  9. 1 1
      dist/preview release/gui/babylon.gui.min.js
  10. 1 1
      dist/preview release/gui/babylon.gui.min.js.map
  11. 8 8
      dist/preview release/inspector/babylon.inspector.bundle.js
  12. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js.map
  13. 1 1
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  14. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  15. 1 1
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  16. 1 1
      dist/preview release/loaders/babylonjs.loaders.min.js
  17. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  18. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  19. 1 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  20. 1 1
      dist/preview release/serializers/babylon.glTF2Serializer.min.js
  21. 1 1
      dist/preview release/serializers/babylonjs.serializers.min.js
  22. 5 19
      dist/preview release/viewer/babylon.viewer.d.ts
  23. 2 2
      dist/preview release/viewer/babylon.viewer.js
  24. 2 2
      dist/preview release/viewer/babylon.viewer.max.js
  25. 5 22
      dist/preview release/viewer/babylon.viewer.module.d.ts
  26. 40 23
      tests/nullEngine/app.js

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


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3348 - 3330
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/babylon.no-module.max.js

@@ -69069,6 +69069,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();
@@ -69132,6 +69143,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
          */

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


+ 20 - 0
dist/preview release/es6.js

@@ -69069,6 +69069,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();
@@ -69132,6 +69143,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
          */

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


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


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


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


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


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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


+ 5 - 19
dist/preview release/viewer/babylon.viewer.d.ts

@@ -168,11 +168,11 @@ declare module BabylonViewer {
                 * Mainly used for help and errors
                 * @param subScreen the name of the subScreen. Those can be defined in the configuration object
                 */
-            showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
+            showOverlayScreen(subScreen: string): Promise<string> | Promise<Template>;
             /**
                 * Hide the overlay screen.
                 */
-            hideOverlayScreen(): Promise<Template> | Promise<string>;
+            hideOverlayScreen(): Promise<string> | Promise<Template>;
             /**
                 * show the viewer (in case it was hidden)
                 *
@@ -189,11 +189,11 @@ declare module BabylonViewer {
                 * Show the loading screen.
                 * The loading screen can be configured using the configuration object
                 */
-            showLoadingScreen(): Promise<Template> | Promise<string>;
+            showLoadingScreen(): Promise<string> | Promise<Template>;
             /**
                 * Hide the loading screen
                 */
-            hideLoadingScreen(): Promise<Template> | Promise<string>;
+            hideLoadingScreen(): Promise<string> | Promise<Template>;
             dispose(): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }
@@ -924,7 +924,7 @@ declare module BabylonViewer {
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 declare module BabylonViewer {
@@ -1558,20 +1558,6 @@ declare module BabylonViewer {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 declare module BabylonViewer {
-    /**
-        * A custom upgrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedUpgrade(sceneManager: SceneManager): boolean;
-    /**
-        * A custom degrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedDegrade(sceneManager: SceneManager): boolean;
-}
-declare module BabylonViewer {
 }
 declare module BabylonViewer {
     export interface IEnvironmentMapConfiguration {

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


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


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

@@ -200,11 +200,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
                 * Mainly used for help and errors
                 * @param subScreen the name of the subScreen. Those can be defined in the configuration object
                 */
-            showOverlayScreen(subScreen: string): Promise<Template> | Promise<string>;
+            showOverlayScreen(subScreen: string): Promise<string> | Promise<Template>;
             /**
                 * Hide the overlay screen.
                 */
-            hideOverlayScreen(): Promise<Template> | Promise<string>;
+            hideOverlayScreen(): Promise<string> | Promise<Template>;
             /**
                 * show the viewer (in case it was hidden)
                 *
@@ -221,11 +221,11 @@ declare module 'babylonjs-viewer/viewer/defaultViewer' {
                 * Show the loading screen.
                 * The loading screen can be configured using the configuration object
                 */
-            showLoadingScreen(): Promise<Template> | Promise<string>;
+            showLoadingScreen(): Promise<string> | Promise<Template>;
             /**
                 * Hide the loading screen
                 */
-            hideLoadingScreen(): Promise<Template> | Promise<string>;
+            hideLoadingScreen(): Promise<string> | Promise<Template>;
             dispose(): void;
             protected _onConfigurationLoaded(configuration: ViewerConfiguration): void;
     }
@@ -985,14 +985,13 @@ declare module 'babylonjs-viewer/templating/viewerTemplatePlugin' {
 }
 
 declare module 'babylonjs-viewer/optimizer/custom' {
-    import { extendedUpgrade } from "babylonjs-viewer/optimizer/custom/extended";
     import { SceneManager } from "babylonjs-viewer/managers/sceneManager";
     /**
       *
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 
@@ -1663,22 +1662,6 @@ declare module 'babylonjs-viewer/loader/plugins' {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 
-declare module 'babylonjs-viewer/optimizer/custom/extended' {
-    import { SceneManager } from 'babylonjs-viewer/managers/sceneManager';
-    /**
-        * A custom upgrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedUpgrade(sceneManager: SceneManager): boolean;
-    /**
-        * A custom degrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedDegrade(sceneManager: SceneManager): boolean;
-}
-
 declare module 'babylonjs-viewer/configuration/interfaces' {
     export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
     export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';

+ 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;