@babylonjs/core 7.51.2 → 7.51.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/Engines/ICanvas.d.ts +96 -1
  2. package/Engines/ICanvas.js.map +1 -1
  3. package/Engines/Native/nativeInterfaces.d.ts +7 -1
  4. package/Engines/Native/nativeInterfaces.js.map +1 -1
  5. package/Engines/WebGPU/webgpuTextureManager.js +3 -3
  6. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  7. package/Engines/abstractEngine.d.ts +7 -1
  8. package/Engines/abstractEngine.js +10 -2
  9. package/Engines/abstractEngine.js.map +1 -1
  10. package/Engines/nativeEngine.d.ts +7 -1
  11. package/Engines/nativeEngine.js +12 -0
  12. package/Engines/nativeEngine.js.map +1 -1
  13. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.d.ts +5 -1
  14. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.js +16 -5
  15. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.js.map +1 -1
  16. package/Layers/effectLayer.d.ts +5 -0
  17. package/Layers/effectLayer.js +7 -0
  18. package/Layers/effectLayer.js.map +1 -1
  19. package/Loading/sceneLoader.d.ts +25 -11
  20. package/Loading/sceneLoader.js +28 -11
  21. package/Loading/sceneLoader.js.map +1 -1
  22. package/Materials/material.js +1 -0
  23. package/Materials/material.js.map +1 -1
  24. package/Meshes/csg2.d.ts +2 -2
  25. package/Meshes/csg2.js +2 -2
  26. package/Meshes/csg2.js.map +1 -1
  27. package/Meshes/instancedMesh.d.ts +5 -0
  28. package/Meshes/instancedMesh.js +6 -0
  29. package/Meshes/instancedMesh.js.map +1 -1
  30. package/Misc/environmentTextureTools.js +2 -2
  31. package/Misc/environmentTextureTools.js.map +1 -1
  32. package/Rendering/IBLShadows/iblShadowsPluginMaterial.js +26 -18
  33. package/Rendering/IBLShadows/iblShadowsPluginMaterial.js.map +1 -1
  34. package/package.json +1 -1
  35. package/scene.js +8 -0
  36. package/scene.js.map +1 -1
@@ -12,7 +12,7 @@ import type { IColor3Like, IColor4Like, IViewportLike } from "../Maths/math.like
12
12
  import type { ISceneLike } from "./abstractEngine";
13
13
  import type { IMaterialContext } from "./IMaterialContext";
14
14
  import type { IDrawContext } from "./IDrawContext";
15
- import type { ICanvas, IImage } from "./ICanvas";
15
+ import type { ICanvas, IImage, IPath2D } from "./ICanvas";
16
16
  import type { IStencilState } from "../States/IStencilState";
17
17
  import type { RenderTargetWrapper } from "./renderTargetWrapper";
18
18
  import type { NativeData } from "./Native/nativeDataStream";
@@ -502,6 +502,12 @@ export declare class NativeEngine extends Engine {
502
502
  * @returns IImage interface
503
503
  */
504
504
  createCanvasImage(): IImage;
505
+ /**
506
+ * Create a 2D path to use with canvas
507
+ * @returns IPath2D interface
508
+ * @param d SVG path string
509
+ */
510
+ createCanvasPath2D(d?: string): IPath2D;
505
511
  /**
506
512
  * Update a portion of an internal texture
507
513
  * @param texture defines the texture to update
@@ -2044,6 +2044,18 @@ export class NativeEngine extends Engine {
2044
2044
  const image = new _native.Image();
2045
2045
  return image;
2046
2046
  }
2047
+ /**
2048
+ * Create a 2D path to use with canvas
2049
+ * @returns IPath2D interface
2050
+ * @param d SVG path string
2051
+ */
2052
+ createCanvasPath2D(d) {
2053
+ if (!_native.Canvas) {
2054
+ throw new Error("Native Canvas plugin not available.");
2055
+ }
2056
+ const path2d = new _native.Path2D(d);
2057
+ return path2d;
2058
+ }
2047
2059
  /**
2048
2060
  * Update a portion of an internal texture
2049
2061
  * @param texture defines the texture to update