@babylonjs/core 7.53.0 → 7.53.1

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 (111) hide show
  1. package/Engines/abstractEngine.js +2 -2
  2. package/Engines/abstractEngine.js.map +1 -1
  3. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js +1 -1
  4. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js.map +1 -1
  5. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.js +7 -2
  6. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.js.map +1 -1
  7. package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +1 -0
  8. package/FlowGraph/CustomTypes/flowGraphMatrix.js +18 -17
  9. package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -1
  10. package/FlowGraph/flowGraphDataConnection.d.ts +10 -1
  11. package/FlowGraph/flowGraphDataConnection.js +23 -13
  12. package/FlowGraph/flowGraphDataConnection.js.map +1 -1
  13. package/FlowGraph/flowGraphRichTypes.d.ts +5 -0
  14. package/FlowGraph/flowGraphRichTypes.js +12 -0
  15. package/FlowGraph/flowGraphRichTypes.js.map +1 -1
  16. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.d.ts +2 -2
  17. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.js +6 -6
  18. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.js.map +1 -1
  19. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.d.ts +2 -2
  20. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.js +6 -6
  21. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.js.map +1 -1
  22. package/FrameGraph/Node/Blocks/PostProcesses/anaglyphPostProcessBlock.d.ts +30 -0
  23. package/FrameGraph/Node/Blocks/PostProcesses/anaglyphPostProcessBlock.js +48 -0
  24. package/FrameGraph/Node/Blocks/PostProcesses/anaglyphPostProcessBlock.js.map +1 -0
  25. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.d.ts +3 -3
  26. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +6 -6
  27. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js.map +1 -1
  28. package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.d.ts +38 -0
  29. package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.js +88 -0
  30. package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.js.map +1 -0
  31. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +2 -2
  32. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +6 -6
  33. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
  34. package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.d.ts +2 -2
  35. package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.js +6 -6
  36. package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.js.map +1 -1
  37. package/FrameGraph/Node/Blocks/Textures/clearBlock.d.ts +2 -2
  38. package/FrameGraph/Node/Blocks/Textures/clearBlock.js +7 -7
  39. package/FrameGraph/Node/Blocks/Textures/clearBlock.js.map +1 -1
  40. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.d.ts +2 -2
  41. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js +6 -6
  42. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js.map +1 -1
  43. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.d.ts +2 -2
  44. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js +7 -7
  45. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js.map +1 -1
  46. package/FrameGraph/Node/Blocks/index.d.ts +2 -0
  47. package/FrameGraph/Node/Blocks/index.js +2 -0
  48. package/FrameGraph/Node/Blocks/index.js.map +1 -1
  49. package/FrameGraph/Node/nodeRenderGraph.js +2 -2
  50. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  51. package/FrameGraph/Tasks/Layers/baseLayerTask.d.ts +3 -3
  52. package/FrameGraph/Tasks/Layers/baseLayerTask.js +12 -12
  53. package/FrameGraph/Tasks/Layers/baseLayerTask.js.map +1 -1
  54. package/FrameGraph/Tasks/PostProcesses/anaglyphTask.d.ts +21 -0
  55. package/FrameGraph/Tasks/PostProcesses/anaglyphTask.js +27 -0
  56. package/FrameGraph/Tasks/PostProcesses/anaglyphTask.js.map +1 -0
  57. package/FrameGraph/Tasks/PostProcesses/bloomTask.d.ts +2 -2
  58. package/FrameGraph/Tasks/PostProcesses/bloomTask.js +5 -5
  59. package/FrameGraph/Tasks/PostProcesses/bloomTask.js.map +1 -1
  60. package/FrameGraph/Tasks/PostProcesses/chromaticAberrationTask.d.ts +17 -0
  61. package/FrameGraph/Tasks/PostProcesses/chromaticAberrationTask.js +23 -0
  62. package/FrameGraph/Tasks/PostProcesses/chromaticAberrationTask.js.map +1 -0
  63. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.d.ts +2 -2
  64. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js +5 -5
  65. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js.map +1 -1
  66. package/FrameGraph/Tasks/PostProcesses/postProcessTask.d.ts +2 -2
  67. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js +1 -1
  68. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js.map +1 -1
  69. package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.d.ts +2 -2
  70. package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.js +8 -8
  71. package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.js.map +1 -1
  72. package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +3 -3
  73. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +9 -9
  74. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
  75. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js +7 -7
  76. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js.map +1 -1
  77. package/FrameGraph/Tasks/Rendering/utilityLayerRendererTask.d.ts +3 -3
  78. package/FrameGraph/Tasks/Rendering/utilityLayerRendererTask.js +3 -3
  79. package/FrameGraph/Tasks/Rendering/utilityLayerRendererTask.js.map +1 -1
  80. package/FrameGraph/Tasks/Texture/clearTextureTask.d.ts +3 -3
  81. package/FrameGraph/Tasks/Texture/clearTextureTask.js +8 -8
  82. package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
  83. package/FrameGraph/Tasks/Texture/copyToTextureTask.d.ts +3 -3
  84. package/FrameGraph/Tasks/Texture/copyToTextureTask.js +3 -3
  85. package/FrameGraph/Tasks/Texture/copyToTextureTask.js.map +1 -1
  86. package/FrameGraph/Tasks/Texture/generateMipMapsTask.d.ts +2 -2
  87. package/FrameGraph/Tasks/Texture/generateMipMapsTask.js +5 -5
  88. package/FrameGraph/Tasks/Texture/generateMipMapsTask.js.map +1 -1
  89. package/FrameGraph/index.d.ts +2 -0
  90. package/FrameGraph/index.js +2 -0
  91. package/FrameGraph/index.js.map +1 -1
  92. package/Materials/materialDefines.js +1 -1
  93. package/Materials/materialDefines.js.map +1 -1
  94. package/Meshes/Builders/shapeBuilder.d.ts +6 -2
  95. package/Meshes/Builders/shapeBuilder.js.map +1 -1
  96. package/PostProcesses/anaglyphPostProcess.d.ts +0 -1
  97. package/PostProcesses/anaglyphPostProcess.js +14 -11
  98. package/PostProcesses/anaglyphPostProcess.js.map +1 -1
  99. package/PostProcesses/chromaticAberrationPostProcess.d.ts +15 -8
  100. package/PostProcesses/chromaticAberrationPostProcess.js +72 -42
  101. package/PostProcesses/chromaticAberrationPostProcess.js.map +1 -1
  102. package/PostProcesses/index.d.ts +2 -0
  103. package/PostProcesses/index.js +2 -0
  104. package/PostProcesses/index.js.map +1 -1
  105. package/PostProcesses/thinAnaglyphPostProcess.d.ts +23 -0
  106. package/PostProcesses/thinAnaglyphPostProcess.js +42 -0
  107. package/PostProcesses/thinAnaglyphPostProcess.js.map +1 -0
  108. package/PostProcesses/thinChromaticAberrationPostProcess.d.ts +45 -0
  109. package/PostProcesses/thinChromaticAberrationPostProcess.js +69 -0
  110. package/PostProcesses/thinChromaticAberrationPostProcess.js.map +1 -0
  111. package/package.json +1 -1
@@ -43,7 +43,9 @@ export declare function ExtrudeShape(name: string, options: {
43
43
  invertUV?: boolean;
44
44
  firstNormal?: Vector3;
45
45
  adjustFrame?: boolean;
46
- capFunction?: Function;
46
+ capFunction?: Nullable<{
47
+ (shapePath: Vector3[]): Vector3[];
48
+ }>;
47
49
  }, scene?: Nullable<Scene>): Mesh;
48
50
  /**
49
51
  * Creates an custom extruded shape mesh.
@@ -97,7 +99,9 @@ export declare function ExtrudeShapeCustom(name: string, options: {
97
99
  invertUV?: boolean;
98
100
  firstNormal?: Vector3;
99
101
  adjustFrame?: boolean;
100
- capFunction?: Function;
102
+ capFunction?: Nullable<{
103
+ (shapePath: Vector3[]): Vector3[];
104
+ }>;
101
105
  }, scene?: Nullable<Scene>): Mesh;
102
106
  /**
103
107
  * Class containing static functions to help procedurally build meshes
@@ -1 +1 @@
1
- {"version":3,"file":"shapeBuilder.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/Builders/shapeBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,YAAY,CACxB,IAAY,EAC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AI,EAC7B,SAAmB,EACnB,eAAwB,EACxB,QAAe,EACX,EAAE;IACN,MAAM,OAAO,GAAG;QACZ,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,QAAQ;QAClB,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM;QACvC,eAAe,EAAE,eAAe;QAChC,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,SAAS;KACvB,CAAC;IAEF,OAAO,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC,CAAC;AAEF,IAAI,CAAC,kBAAkB,GAAG,CACtB,IAAY,EACZ,KAAgB,EAChB,IAAe,EACf,aAAkE,EAClE,gBAAqE,EACrE,gBAAyB,EACzB,eAAwB,EACxB,GAAW,EACX,KAAY,EACZ,SAAmB,EACnB,eAAwB,EACxB,QAAe,EACX,EAAE;IACN,MAAM,OAAO,GAAG;QACZ,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,IAAI;QACV,aAAa,EAAE,aAAa;QAC5B,gBAAgB,EAAE,gBAAgB;QAClC,gBAAgB,EAAE,gBAAgB;QAClC,eAAe,EAAE,eAAe;QAChC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM;QACvC,eAAe,EAAE,eAAe;QAChC,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,SAAS;KACvB,CAAC;IAEF,OAAO,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACpD,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"../../types\";\r\nimport type { Scene } from \"../../scene\";\r\nimport type { Vector4 } from \"../../Maths/math.vector\";\r\nimport { Vector3, TmpVectors, Matrix } from \"../../Maths/math.vector\";\r\nimport { Mesh } from \"../mesh\";\r\nimport { CreateRibbon } from \"./ribbonBuilder\";\r\nimport { Path3D } from \"../../Maths/math.path\";\r\n\r\n/**\r\n * Creates an extruded shape mesh. The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.\r\n * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.\r\n * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.\r\n * * The parameter `rotation` (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.\r\n * * The parameter `scale` (float, default 1) is the value to scale the shape.\r\n * * The parameter `closeShape` (boolean, default false) closes the shape when true, since v5.0.0.\r\n * * The parameter `closePath` (boolean, default false) closes the path when true and no caps, since v5.0.0.\r\n * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL\r\n * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#extruded-shape\r\n * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape.\r\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\r\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\r\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture.\r\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.\r\n * * The optional parameter `firstNormal` (Vector3) defines the direction of the first normal of the supplied path. Consider using this for any path that is straight, and particular for paths in the xy plane.\r\n * * The optional `adjustFrame` (boolean, default false) will cause the internally generated Path3D tangents, normals, and binormals to be adjusted so that a) they are always well-defined, and b) they do not reverse from one path point to the next. This prevents the extruded shape from being flipped and/or rotated with resulting mesh self-intersections. This is primarily useful for straight paths that can reverse direction.\r\n * @param name defines the name of the mesh\r\n * @param options defines the options used to create the mesh\r\n * @param scene defines the hosting scene\r\n * @returns the extruded shape mesh\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes\r\n */\r\nexport function ExtrudeShape(\r\n name: string,\r\n options: {\r\n shape: Vector3[];\r\n path: Vector3[];\r\n scale?: number;\r\n rotation?: number;\r\n closeShape?: boolean;\r\n closePath?: boolean;\r\n cap?: number;\r\n updatable?: boolean;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n instance?: Mesh;\r\n invertUV?: boolean;\r\n firstNormal?: Vector3;\r\n adjustFrame?: boolean;\r\n capFunction?: Function;\r\n },\r\n scene: Nullable<Scene> = null\r\n): Mesh {\r\n const path = options.path;\r\n const shape = options.shape;\r\n const scale = options.scale || 1;\r\n const rotation = options.rotation || 0;\r\n const cap = options.cap === 0 ? 0 : options.cap || Mesh.NO_CAP;\r\n const updatable = options.updatable;\r\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\r\n const instance = options.instance || null;\r\n const invertUV = options.invertUV || false;\r\n const closeShape = options.closeShape || false;\r\n const closePath = options.closePath || false;\r\n const capFunction = options.capFunction || null;\r\n\r\n return _ExtrudeShapeGeneric(\r\n name,\r\n shape,\r\n path,\r\n scale,\r\n rotation,\r\n null,\r\n null,\r\n closePath,\r\n closeShape,\r\n cap,\r\n false,\r\n scene,\r\n updatable ? true : false,\r\n sideOrientation,\r\n instance,\r\n invertUV,\r\n options.frontUVs || null,\r\n options.backUVs || null,\r\n options.firstNormal || null,\r\n options.adjustFrame ? true : false,\r\n capFunction\r\n );\r\n}\r\n\r\n/**\r\n * Creates an custom extruded shape mesh.\r\n * The custom extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.\r\n * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.\r\n * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.\r\n * * The parameter `rotationFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the beginning of the path\r\n * * It must returns a float value that will be the rotation in radians applied to the shape on each path point.\r\n * * The parameter `scaleFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the beginning of the path\r\n * * It must returns a float value that will be the scale value applied to the shape on each path point\r\n * * The parameter `closeShape` (boolean, default false) closes the shape when true, since v5.0.0.\r\n * * The parameter `closePath` (boolean, default false) closes the path when true and no caps, since v5.0.0.\r\n * * The parameter `ribbonClosePath` (boolean, default false) forces the extrusion underlying ribbon to close all the paths in its `pathArray` - depreciated in favor of closeShape\r\n * * The parameter `ribbonCloseArray` (boolean, default false) forces the extrusion underlying ribbon to close its `pathArray` - depreciated in favor of closePath\r\n * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL\r\n * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#extruded-shape\r\n * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape\r\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\r\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\r\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture\r\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\r\n * * The optional parameter `firstNormal` (Vector3) defines the direction of the first normal of the supplied path. It should be supplied when the path is in the xy plane, and particularly if these sections are straight, because the underlying Path3D object will pick a normal in the xy plane that causes the extrusion to be collapsed into the plane. This should be used for any path that is straight.\r\n * * The optional `adjustFrame` (boolean, default false) will cause the internally generated Path3D tangents, normals, and binormals to be adjusted so that a) they are always well-defined, and b) they do not reverse from one path point to the next. This prevents the extruded shape from being flipped and/or rotated with resulting mesh self-intersections. This is primarily useful for straight paths that can reverse direction.\r\n * @param name defines the name of the mesh\r\n * @param options defines the options used to create the mesh\r\n * @param scene defines the hosting scene\r\n * @returns the custom extruded shape mesh\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#custom-extruded-shapes\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes\r\n */\r\nexport function ExtrudeShapeCustom(\r\n name: string,\r\n options: {\r\n shape: Vector3[];\r\n path: Vector3[];\r\n scaleFunction?: Nullable<{ (i: number, distance: number): number }>;\r\n rotationFunction?: Nullable<{ (i: number, distance: number): number }>;\r\n ribbonCloseArray?: boolean;\r\n ribbonClosePath?: boolean;\r\n closeShape?: boolean;\r\n closePath?: boolean;\r\n cap?: number;\r\n updatable?: boolean;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n instance?: Mesh;\r\n invertUV?: boolean;\r\n firstNormal?: Vector3;\r\n adjustFrame?: boolean;\r\n capFunction?: Function;\r\n },\r\n scene: Nullable<Scene> = null\r\n): Mesh {\r\n const path = options.path;\r\n const shape = options.shape;\r\n const scaleFunction =\r\n options.scaleFunction ||\r\n (() => {\r\n return 1;\r\n });\r\n const rotationFunction =\r\n options.rotationFunction ||\r\n (() => {\r\n return 0;\r\n });\r\n const ribbonCloseArray = options.closePath || options.ribbonCloseArray || false;\r\n const ribbonClosePath = options.closeShape || options.ribbonClosePath || false;\r\n const cap = options.cap === 0 ? 0 : options.cap || Mesh.NO_CAP;\r\n const updatable = options.updatable;\r\n const firstNormal = options.firstNormal || null;\r\n const adjustFrame = options.adjustFrame || false;\r\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\r\n const instance = options.instance;\r\n const invertUV = options.invertUV || false;\r\n const capFunction = options.capFunction || null;\r\n return _ExtrudeShapeGeneric(\r\n name,\r\n shape,\r\n path,\r\n null,\r\n null,\r\n scaleFunction,\r\n rotationFunction,\r\n ribbonCloseArray,\r\n ribbonClosePath,\r\n cap,\r\n true,\r\n scene,\r\n updatable ? true : false,\r\n sideOrientation,\r\n instance || null,\r\n invertUV,\r\n options.frontUVs || null,\r\n options.backUVs || null,\r\n firstNormal,\r\n adjustFrame,\r\n capFunction || null\r\n );\r\n}\r\n\r\nfunction _ExtrudeShapeGeneric(\r\n name: string,\r\n shape: Vector3[],\r\n curve: Vector3[],\r\n scale: Nullable<number>,\r\n rotation: Nullable<number>,\r\n scaleFunction: Nullable<{ (i: number, distance: number): number }>,\r\n rotateFunction: Nullable<{ (i: number, distance: number): number }>,\r\n rbCA: boolean,\r\n rbCP: boolean,\r\n cap: number,\r\n custom: boolean,\r\n scene: Nullable<Scene>,\r\n updtbl: boolean,\r\n side: number,\r\n instance: Nullable<Mesh>,\r\n invertUV: boolean,\r\n frontUVs: Nullable<Vector4>,\r\n backUVs: Nullable<Vector4>,\r\n firstNormal: Nullable<Vector3>,\r\n adjustFrame: boolean,\r\n capFunction: Nullable<Function>\r\n): Mesh {\r\n // extrusion geometry\r\n const extrusionPathArray = (\r\n shape: Vector3[],\r\n curve: Vector3[],\r\n path3D: Path3D,\r\n shapePaths: Vector3[][],\r\n scale: Nullable<number>,\r\n rotation: Nullable<number>,\r\n scaleFunction: Nullable<{ (i: number, distance: number): number }>,\r\n rotateFunction: Nullable<{ (i: number, distance: number): number }>,\r\n cap: number,\r\n custom: boolean,\r\n adjustFrame: boolean\r\n ) => {\r\n const tangents = path3D.getTangents();\r\n const normals = path3D.getNormals();\r\n const binormals = path3D.getBinormals();\r\n const distances = path3D.getDistances();\r\n if (adjustFrame) {\r\n /* fix tangents,normals, binormals */\r\n for (let i = 0; i < tangents.length; i++) {\r\n if (tangents[i].x == 0 && tangents[i].y == 0 && tangents[i].z == 0) {\r\n tangents[i].copyFrom(tangents[i - 1]);\r\n }\r\n if (normals[i].x == 0 && normals[i].y == 0 && normals[i].z == 0) {\r\n normals[i].copyFrom(normals[i - 1]);\r\n }\r\n if (binormals[i].x == 0 && binormals[i].y == 0 && binormals[i].z == 0) {\r\n binormals[i].copyFrom(binormals[i - 1]);\r\n }\r\n if (i > 0) {\r\n let v = tangents[i - 1];\r\n if (Vector3.Dot(v, tangents[i]) < 0) {\r\n tangents[i].scaleInPlace(-1);\r\n }\r\n v = normals[i - 1];\r\n if (Vector3.Dot(v, normals[i]) < 0) {\r\n normals[i].scaleInPlace(-1);\r\n }\r\n v = binormals[i - 1];\r\n if (Vector3.Dot(v, binormals[i]) < 0) {\r\n binormals[i].scaleInPlace(-1);\r\n }\r\n }\r\n }\r\n }\r\n let angle = 0;\r\n const returnScale = () => {\r\n return scale !== null ? scale : 1;\r\n };\r\n const returnRotation = () => {\r\n return rotation !== null ? rotation : 0;\r\n };\r\n const rotate: { (i: number, distance: number): number } = custom && rotateFunction ? rotateFunction : returnRotation;\r\n const scl: { (i: number, distance: number): number } = custom && scaleFunction ? scaleFunction : returnScale;\r\n let index = cap === Mesh.NO_CAP || cap === Mesh.CAP_END ? 0 : 2;\r\n const rotationMatrix: Matrix = TmpVectors.Matrix[0];\r\n\r\n for (let i = 0; i < curve.length; i++) {\r\n const shapePath: Vector3[] = [];\r\n const angleStep = rotate(i, distances[i]);\r\n const scaleRatio = scl(i, distances[i]);\r\n Matrix.RotationAxisToRef(tangents[i], angle, rotationMatrix);\r\n for (let p = 0; p < shape.length; p++) {\r\n const planed = tangents[i].scale(shape[p].z).add(normals[i].scale(shape[p].x)).add(binormals[i].scale(shape[p].y));\r\n const rotated = Vector3.Zero();\r\n Vector3.TransformCoordinatesToRef(planed, rotationMatrix, rotated);\r\n rotated.scaleInPlace(scaleRatio).addInPlace(curve[i]);\r\n shapePath[p] = rotated;\r\n }\r\n shapePaths[index] = shapePath;\r\n angle += angleStep;\r\n index++;\r\n }\r\n // cap\r\n const defaultCapPath = (shapePath: Vector3[]) => {\r\n const pointCap = Array<Vector3>();\r\n const barycenter = Vector3.Zero();\r\n let i: number;\r\n for (i = 0; i < shapePath.length; i++) {\r\n barycenter.addInPlace(shapePath[i]);\r\n }\r\n barycenter.scaleInPlace(1.0 / shapePath.length);\r\n for (i = 0; i < shapePath.length; i++) {\r\n pointCap.push(barycenter);\r\n }\r\n return pointCap;\r\n };\r\n const capPath = capFunction || defaultCapPath;\r\n switch (cap) {\r\n case Mesh.NO_CAP:\r\n break;\r\n case Mesh.CAP_START:\r\n shapePaths[0] = capPath(shapePaths[2]);\r\n shapePaths[1] = shapePaths[2];\r\n break;\r\n case Mesh.CAP_END:\r\n shapePaths[index] = shapePaths[index - 1];\r\n shapePaths[index + 1] = capPath(shapePaths[index - 1]);\r\n break;\r\n case Mesh.CAP_ALL:\r\n shapePaths[0] = capPath(shapePaths[2]);\r\n shapePaths[1] = shapePaths[2];\r\n shapePaths[index] = shapePaths[index - 1];\r\n shapePaths[index + 1] = capPath(shapePaths[index - 1]);\r\n break;\r\n default:\r\n break;\r\n }\r\n return shapePaths;\r\n };\r\n let path3D;\r\n let pathArray;\r\n if (instance) {\r\n // instance update\r\n const storage = instance._creationDataStorage!;\r\n path3D = firstNormal ? storage.path3D.update(curve, firstNormal) : storage.path3D.update(curve);\r\n pathArray = extrusionPathArray(shape, curve, storage.path3D, storage.pathArray, scale, rotation, scaleFunction, rotateFunction, storage.cap, custom, adjustFrame);\r\n instance = CreateRibbon(\"\", { pathArray, closeArray: false, closePath: false, offset: 0, updatable: false, sideOrientation: 0, instance }, scene || undefined);\r\n\r\n return instance;\r\n }\r\n // extruded shape creation\r\n path3D = firstNormal ? new Path3D(curve, firstNormal) : new Path3D(curve);\r\n const newShapePaths = new Array<Array<Vector3>>();\r\n cap = cap < 0 || cap > 3 ? 0 : cap;\r\n pathArray = extrusionPathArray(shape, curve, path3D, newShapePaths, scale, rotation, scaleFunction, rotateFunction, cap, custom, adjustFrame);\r\n const extrudedGeneric = CreateRibbon(\r\n name,\r\n {\r\n pathArray: pathArray,\r\n closeArray: rbCA,\r\n closePath: rbCP,\r\n updatable: updtbl,\r\n sideOrientation: side,\r\n invertUV: invertUV,\r\n frontUVs: frontUVs || undefined,\r\n backUVs: backUVs || undefined,\r\n },\r\n scene\r\n );\r\n extrudedGeneric._creationDataStorage!.pathArray = pathArray;\r\n extrudedGeneric._creationDataStorage!.path3D = path3D;\r\n extrudedGeneric._creationDataStorage!.cap = cap;\r\n\r\n return extrudedGeneric;\r\n}\r\n\r\n/**\r\n * Class containing static functions to help procedurally build meshes\r\n * @deprecated please use the functions directly from the module\r\n */\r\nexport const ShapeBuilder = {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n ExtrudeShape,\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n ExtrudeShapeCustom,\r\n};\r\n\r\nMesh.ExtrudeShape = (\r\n name: string,\r\n shape: Vector3[],\r\n path: Vector3[],\r\n scale: number,\r\n rotation: number,\r\n cap: number,\r\n scene: Nullable<Scene> = null,\r\n updatable?: boolean,\r\n sideOrientation?: number,\r\n instance?: Mesh\r\n): Mesh => {\r\n const options = {\r\n shape: shape,\r\n path: path,\r\n scale: scale,\r\n rotation: rotation,\r\n cap: cap === 0 ? 0 : cap || Mesh.NO_CAP,\r\n sideOrientation: sideOrientation,\r\n instance: instance,\r\n updatable: updatable,\r\n };\r\n\r\n return ExtrudeShape(name, options, scene);\r\n};\r\n\r\nMesh.ExtrudeShapeCustom = (\r\n name: string,\r\n shape: Vector3[],\r\n path: Vector3[],\r\n scaleFunction: Nullable<{ (i: number, distance: number): number }>,\r\n rotationFunction: Nullable<{ (i: number, distance: number): number }>,\r\n ribbonCloseArray: boolean,\r\n ribbonClosePath: boolean,\r\n cap: number,\r\n scene: Scene,\r\n updatable?: boolean,\r\n sideOrientation?: number,\r\n instance?: Mesh\r\n): Mesh => {\r\n const options = {\r\n shape: shape,\r\n path: path,\r\n scaleFunction: scaleFunction,\r\n rotationFunction: rotationFunction,\r\n ribbonCloseArray: ribbonCloseArray,\r\n ribbonClosePath: ribbonClosePath,\r\n cap: cap === 0 ? 0 : cap || Mesh.NO_CAP,\r\n sideOrientation: sideOrientation,\r\n instance: instance,\r\n updatable: updatable,\r\n };\r\n\r\n return ExtrudeShapeCustom(name, options, scene);\r\n};\r\n"]}
1
+ {"version":3,"file":"shapeBuilder.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/Builders/shapeBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,YAAY,CACxB,IAAY,EACZ,OAiBC,EACD,QAAyB,IAAI;IAE7B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1B,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAC5B,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC;IACjC,MAAM,QAAQ,GA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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM;QACvC,eAAe,EAAE,eAAe;QAChC,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,SAAS;KACvB,CAAC;IAEF,OAAO,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC,CAAC;AAEF,IAAI,CAAC,kBAAkB,GAAG,CACtB,IAAY,EACZ,KAAgB,EAChB,IAAe,EACf,aAAkE,EAClE,gBAAqE,EACrE,gBAAyB,EACzB,eAAwB,EACxB,GAAW,EACX,KAAY,EACZ,SAAmB,EACnB,eAAwB,EACxB,QAAe,EACX,EAAE;IACN,MAAM,OAAO,GAAG;QACZ,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,IAAI;QACV,aAAa,EAAE,aAAa;QAC5B,gBAAgB,EAAE,gBAAgB;QAClC,gBAAgB,EAAE,gBAAgB;QAClC,eAAe,EAAE,eAAe;QAChC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM;QACvC,eAAe,EAAE,eAAe;QAChC,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,SAAS;KACvB,CAAC;IAEF,OAAO,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACpD,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"../../types\";\r\nimport type { Scene } from \"../../scene\";\r\nimport type { Vector4 } from \"../../Maths/math.vector\";\r\nimport { Vector3, TmpVectors, Matrix } from \"../../Maths/math.vector\";\r\nimport { Mesh } from \"../mesh\";\r\nimport { CreateRibbon } from \"./ribbonBuilder\";\r\nimport { Path3D } from \"../../Maths/math.path\";\r\n\r\n/**\r\n * Creates an extruded shape mesh. The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.\r\n * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.\r\n * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.\r\n * * The parameter `rotation` (float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve.\r\n * * The parameter `scale` (float, default 1) is the value to scale the shape.\r\n * * The parameter `closeShape` (boolean, default false) closes the shape when true, since v5.0.0.\r\n * * The parameter `closePath` (boolean, default false) closes the path when true and no caps, since v5.0.0.\r\n * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL\r\n * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#extruded-shape\r\n * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape.\r\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\r\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\r\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture.\r\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.\r\n * * The optional parameter `firstNormal` (Vector3) defines the direction of the first normal of the supplied path. Consider using this for any path that is straight, and particular for paths in the xy plane.\r\n * * The optional `adjustFrame` (boolean, default false) will cause the internally generated Path3D tangents, normals, and binormals to be adjusted so that a) they are always well-defined, and b) they do not reverse from one path point to the next. This prevents the extruded shape from being flipped and/or rotated with resulting mesh self-intersections. This is primarily useful for straight paths that can reverse direction.\r\n * @param name defines the name of the mesh\r\n * @param options defines the options used to create the mesh\r\n * @param scene defines the hosting scene\r\n * @returns the extruded shape mesh\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes\r\n */\r\nexport function ExtrudeShape(\r\n name: string,\r\n options: {\r\n shape: Vector3[];\r\n path: Vector3[];\r\n scale?: number;\r\n rotation?: number;\r\n closeShape?: boolean;\r\n closePath?: boolean;\r\n cap?: number;\r\n updatable?: boolean;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n instance?: Mesh;\r\n invertUV?: boolean;\r\n firstNormal?: Vector3;\r\n adjustFrame?: boolean;\r\n capFunction?: Nullable<{ (shapePath: Vector3[]): Vector3[] }>;\r\n },\r\n scene: Nullable<Scene> = null\r\n): Mesh {\r\n const path = options.path;\r\n const shape = options.shape;\r\n const scale = options.scale || 1;\r\n const rotation = options.rotation || 0;\r\n const cap = options.cap === 0 ? 0 : options.cap || Mesh.NO_CAP;\r\n const updatable = options.updatable;\r\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\r\n const instance = options.instance || null;\r\n const invertUV = options.invertUV || false;\r\n const closeShape = options.closeShape || false;\r\n const closePath = options.closePath || false;\r\n const capFunction = options.capFunction || null;\r\n\r\n return _ExtrudeShapeGeneric(\r\n name,\r\n shape,\r\n path,\r\n scale,\r\n rotation,\r\n null,\r\n null,\r\n closePath,\r\n closeShape,\r\n cap,\r\n false,\r\n scene,\r\n updatable ? true : false,\r\n sideOrientation,\r\n instance,\r\n invertUV,\r\n options.frontUVs || null,\r\n options.backUVs || null,\r\n options.firstNormal || null,\r\n options.adjustFrame ? true : false,\r\n capFunction\r\n );\r\n}\r\n\r\n/**\r\n * Creates an custom extruded shape mesh.\r\n * The custom extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.\r\n * * The parameter `shape` is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis.\r\n * * The parameter `path` is a required array of successive Vector3. This is the axis curve the shape is extruded along.\r\n * * The parameter `rotationFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the beginning of the path\r\n * * It must returns a float value that will be the rotation in radians applied to the shape on each path point.\r\n * * The parameter `scaleFunction` (JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the beginning of the path\r\n * * It must returns a float value that will be the scale value applied to the shape on each path point\r\n * * The parameter `closeShape` (boolean, default false) closes the shape when true, since v5.0.0.\r\n * * The parameter `closePath` (boolean, default false) closes the path when true and no caps, since v5.0.0.\r\n * * The parameter `ribbonClosePath` (boolean, default false) forces the extrusion underlying ribbon to close all the paths in its `pathArray` - depreciated in favor of closeShape\r\n * * The parameter `ribbonCloseArray` (boolean, default false) forces the extrusion underlying ribbon to close its `pathArray` - depreciated in favor of closePath\r\n * * The parameter `cap` sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL\r\n * * The optional parameter `instance` is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#extruded-shape\r\n * * Remember you can only change the shape or path point positions, not their number when updating an extruded shape\r\n * * You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE\r\n * * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation\r\n * * The optional parameter `invertUV` (boolean, default false) swaps in the geometry the U and V coordinates to apply a texture\r\n * * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created\r\n * * The optional parameter `firstNormal` (Vector3) defines the direction of the first normal of the supplied path. It should be supplied when the path is in the xy plane, and particularly if these sections are straight, because the underlying Path3D object will pick a normal in the xy plane that causes the extrusion to be collapsed into the plane. This should be used for any path that is straight.\r\n * * The optional `adjustFrame` (boolean, default false) will cause the internally generated Path3D tangents, normals, and binormals to be adjusted so that a) they are always well-defined, and b) they do not reverse from one path point to the next. This prevents the extruded shape from being flipped and/or rotated with resulting mesh self-intersections. This is primarily useful for straight paths that can reverse direction.\r\n * @param name defines the name of the mesh\r\n * @param options defines the options used to create the mesh\r\n * @param scene defines the hosting scene\r\n * @returns the custom extruded shape mesh\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#custom-extruded-shapes\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes\r\n */\r\nexport function ExtrudeShapeCustom(\r\n name: string,\r\n options: {\r\n shape: Vector3[];\r\n path: Vector3[];\r\n scaleFunction?: Nullable<{ (i: number, distance: number): number }>;\r\n rotationFunction?: Nullable<{ (i: number, distance: number): number }>;\r\n ribbonCloseArray?: boolean;\r\n ribbonClosePath?: boolean;\r\n closeShape?: boolean;\r\n closePath?: boolean;\r\n cap?: number;\r\n updatable?: boolean;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n instance?: Mesh;\r\n invertUV?: boolean;\r\n firstNormal?: Vector3;\r\n adjustFrame?: boolean;\r\n capFunction?: Nullable<{ (shapePath: Vector3[]): Vector3[] }>;\r\n },\r\n scene: Nullable<Scene> = null\r\n): Mesh {\r\n const path = options.path;\r\n const shape = options.shape;\r\n const scaleFunction =\r\n options.scaleFunction ||\r\n (() => {\r\n return 1;\r\n });\r\n const rotationFunction =\r\n options.rotationFunction ||\r\n (() => {\r\n return 0;\r\n });\r\n const ribbonCloseArray = options.closePath || options.ribbonCloseArray || false;\r\n const ribbonClosePath = options.closeShape || options.ribbonClosePath || false;\r\n const cap = options.cap === 0 ? 0 : options.cap || Mesh.NO_CAP;\r\n const updatable = options.updatable;\r\n const firstNormal = options.firstNormal || null;\r\n const adjustFrame = options.adjustFrame || false;\r\n const sideOrientation = Mesh._GetDefaultSideOrientation(options.sideOrientation);\r\n const instance = options.instance;\r\n const invertUV = options.invertUV || false;\r\n const capFunction = options.capFunction || null;\r\n return _ExtrudeShapeGeneric(\r\n name,\r\n shape,\r\n path,\r\n null,\r\n null,\r\n scaleFunction,\r\n rotationFunction,\r\n ribbonCloseArray,\r\n ribbonClosePath,\r\n cap,\r\n true,\r\n scene,\r\n updatable ? true : false,\r\n sideOrientation,\r\n instance || null,\r\n invertUV,\r\n options.frontUVs || null,\r\n options.backUVs || null,\r\n firstNormal,\r\n adjustFrame,\r\n capFunction || null\r\n );\r\n}\r\n\r\nfunction _ExtrudeShapeGeneric(\r\n name: string,\r\n shape: Vector3[],\r\n curve: Vector3[],\r\n scale: Nullable<number>,\r\n rotation: Nullable<number>,\r\n scaleFunction: Nullable<{ (i: number, distance: number): number }>,\r\n rotateFunction: Nullable<{ (i: number, distance: number): number }>,\r\n rbCA: boolean,\r\n rbCP: boolean,\r\n cap: number,\r\n custom: boolean,\r\n scene: Nullable<Scene>,\r\n updtbl: boolean,\r\n side: number,\r\n instance: Nullable<Mesh>,\r\n invertUV: boolean,\r\n frontUVs: Nullable<Vector4>,\r\n backUVs: Nullable<Vector4>,\r\n firstNormal: Nullable<Vector3>,\r\n adjustFrame: boolean,\r\n capFunction: Nullable<{ (shapePath: Vector3[]): Vector3[] }>\r\n): Mesh {\r\n // extrusion geometry\r\n const extrusionPathArray = (\r\n shape: Vector3[],\r\n curve: Vector3[],\r\n path3D: Path3D,\r\n shapePaths: Vector3[][],\r\n scale: Nullable<number>,\r\n rotation: Nullable<number>,\r\n scaleFunction: Nullable<{ (i: number, distance: number): number }>,\r\n rotateFunction: Nullable<{ (i: number, distance: number): number }>,\r\n cap: number,\r\n custom: boolean,\r\n adjustFrame: boolean\r\n ) => {\r\n const tangents = path3D.getTangents();\r\n const normals = path3D.getNormals();\r\n const binormals = path3D.getBinormals();\r\n const distances = path3D.getDistances();\r\n if (adjustFrame) {\r\n /* fix tangents,normals, binormals */\r\n for (let i = 0; i < tangents.length; i++) {\r\n if (tangents[i].x == 0 && tangents[i].y == 0 && tangents[i].z == 0) {\r\n tangents[i].copyFrom(tangents[i - 1]);\r\n }\r\n if (normals[i].x == 0 && normals[i].y == 0 && normals[i].z == 0) {\r\n normals[i].copyFrom(normals[i - 1]);\r\n }\r\n if (binormals[i].x == 0 && binormals[i].y == 0 && binormals[i].z == 0) {\r\n binormals[i].copyFrom(binormals[i - 1]);\r\n }\r\n if (i > 0) {\r\n let v = tangents[i - 1];\r\n if (Vector3.Dot(v, tangents[i]) < 0) {\r\n tangents[i].scaleInPlace(-1);\r\n }\r\n v = normals[i - 1];\r\n if (Vector3.Dot(v, normals[i]) < 0) {\r\n normals[i].scaleInPlace(-1);\r\n }\r\n v = binormals[i - 1];\r\n if (Vector3.Dot(v, binormals[i]) < 0) {\r\n binormals[i].scaleInPlace(-1);\r\n }\r\n }\r\n }\r\n }\r\n let angle = 0;\r\n const returnScale = () => {\r\n return scale !== null ? scale : 1;\r\n };\r\n const returnRotation = () => {\r\n return rotation !== null ? rotation : 0;\r\n };\r\n const rotate: { (i: number, distance: number): number } = custom && rotateFunction ? rotateFunction : returnRotation;\r\n const scl: { (i: number, distance: number): number } = custom && scaleFunction ? scaleFunction : returnScale;\r\n let index = cap === Mesh.NO_CAP || cap === Mesh.CAP_END ? 0 : 2;\r\n const rotationMatrix: Matrix = TmpVectors.Matrix[0];\r\n\r\n for (let i = 0; i < curve.length; i++) {\r\n const shapePath: Vector3[] = [];\r\n const angleStep = rotate(i, distances[i]);\r\n const scaleRatio = scl(i, distances[i]);\r\n Matrix.RotationAxisToRef(tangents[i], angle, rotationMatrix);\r\n for (let p = 0; p < shape.length; p++) {\r\n const planed = tangents[i].scale(shape[p].z).add(normals[i].scale(shape[p].x)).add(binormals[i].scale(shape[p].y));\r\n const rotated = Vector3.Zero();\r\n Vector3.TransformCoordinatesToRef(planed, rotationMatrix, rotated);\r\n rotated.scaleInPlace(scaleRatio).addInPlace(curve[i]);\r\n shapePath[p] = rotated;\r\n }\r\n shapePaths[index] = shapePath;\r\n angle += angleStep;\r\n index++;\r\n }\r\n // cap\r\n const defaultCapPath = (shapePath: Vector3[]) => {\r\n const pointCap = Array<Vector3>();\r\n const barycenter = Vector3.Zero();\r\n let i: number;\r\n for (i = 0; i < shapePath.length; i++) {\r\n barycenter.addInPlace(shapePath[i]);\r\n }\r\n barycenter.scaleInPlace(1.0 / shapePath.length);\r\n for (i = 0; i < shapePath.length; i++) {\r\n pointCap.push(barycenter);\r\n }\r\n return pointCap;\r\n };\r\n const capPath = capFunction || defaultCapPath;\r\n switch (cap) {\r\n case Mesh.NO_CAP:\r\n break;\r\n case Mesh.CAP_START:\r\n shapePaths[0] = capPath(shapePaths[2]);\r\n shapePaths[1] = shapePaths[2];\r\n break;\r\n case Mesh.CAP_END:\r\n shapePaths[index] = shapePaths[index - 1];\r\n shapePaths[index + 1] = capPath(shapePaths[index - 1]);\r\n break;\r\n case Mesh.CAP_ALL:\r\n shapePaths[0] = capPath(shapePaths[2]);\r\n shapePaths[1] = shapePaths[2];\r\n shapePaths[index] = shapePaths[index - 1];\r\n shapePaths[index + 1] = capPath(shapePaths[index - 1]);\r\n break;\r\n default:\r\n break;\r\n }\r\n return shapePaths;\r\n };\r\n let path3D;\r\n let pathArray;\r\n if (instance) {\r\n // instance update\r\n const storage = instance._creationDataStorage!;\r\n path3D = firstNormal ? storage.path3D.update(curve, firstNormal) : storage.path3D.update(curve);\r\n pathArray = extrusionPathArray(shape, curve, storage.path3D, storage.pathArray, scale, rotation, scaleFunction, rotateFunction, storage.cap, custom, adjustFrame);\r\n instance = CreateRibbon(\"\", { pathArray, closeArray: false, closePath: false, offset: 0, updatable: false, sideOrientation: 0, instance }, scene || undefined);\r\n\r\n return instance;\r\n }\r\n // extruded shape creation\r\n path3D = firstNormal ? new Path3D(curve, firstNormal) : new Path3D(curve);\r\n const newShapePaths = new Array<Array<Vector3>>();\r\n cap = cap < 0 || cap > 3 ? 0 : cap;\r\n pathArray = extrusionPathArray(shape, curve, path3D, newShapePaths, scale, rotation, scaleFunction, rotateFunction, cap, custom, adjustFrame);\r\n const extrudedGeneric = CreateRibbon(\r\n name,\r\n {\r\n pathArray: pathArray,\r\n closeArray: rbCA,\r\n closePath: rbCP,\r\n updatable: updtbl,\r\n sideOrientation: side,\r\n invertUV: invertUV,\r\n frontUVs: frontUVs || undefined,\r\n backUVs: backUVs || undefined,\r\n },\r\n scene\r\n );\r\n extrudedGeneric._creationDataStorage!.pathArray = pathArray;\r\n extrudedGeneric._creationDataStorage!.path3D = path3D;\r\n extrudedGeneric._creationDataStorage!.cap = cap;\r\n\r\n return extrudedGeneric;\r\n}\r\n\r\n/**\r\n * Class containing static functions to help procedurally build meshes\r\n * @deprecated please use the functions directly from the module\r\n */\r\nexport const ShapeBuilder = {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n ExtrudeShape,\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n ExtrudeShapeCustom,\r\n};\r\n\r\nMesh.ExtrudeShape = (\r\n name: string,\r\n shape: Vector3[],\r\n path: Vector3[],\r\n scale: number,\r\n rotation: number,\r\n cap: number,\r\n scene: Nullable<Scene> = null,\r\n updatable?: boolean,\r\n sideOrientation?: number,\r\n instance?: Mesh\r\n): Mesh => {\r\n const options = {\r\n shape: shape,\r\n path: path,\r\n scale: scale,\r\n rotation: rotation,\r\n cap: cap === 0 ? 0 : cap || Mesh.NO_CAP,\r\n sideOrientation: sideOrientation,\r\n instance: instance,\r\n updatable: updatable,\r\n };\r\n\r\n return ExtrudeShape(name, options, scene);\r\n};\r\n\r\nMesh.ExtrudeShapeCustom = (\r\n name: string,\r\n shape: Vector3[],\r\n path: Vector3[],\r\n scaleFunction: Nullable<{ (i: number, distance: number): number }>,\r\n rotationFunction: Nullable<{ (i: number, distance: number): number }>,\r\n ribbonCloseArray: boolean,\r\n ribbonClosePath: boolean,\r\n cap: number,\r\n scene: Scene,\r\n updatable?: boolean,\r\n sideOrientation?: number,\r\n instance?: Mesh\r\n): Mesh => {\r\n const options = {\r\n shape: shape,\r\n path: path,\r\n scaleFunction: scaleFunction,\r\n rotationFunction: rotationFunction,\r\n ribbonCloseArray: ribbonCloseArray,\r\n ribbonClosePath: ribbonClosePath,\r\n cap: cap === 0 ? 0 : cap || Mesh.NO_CAP,\r\n sideOrientation: sideOrientation,\r\n instance: instance,\r\n updatable: updatable,\r\n };\r\n\r\n return ExtrudeShapeCustom(name, options, scene);\r\n};\r\n"]}
@@ -22,5 +22,4 @@ export declare class AnaglyphPostProcess extends PostProcess {
22
22
  * @param reusable defines if the postprocess will be reused multiple times per frame
23
23
  */
24
24
  constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: AbstractEngine, reusable?: boolean);
25
- protected _gatherImports(useWebGPU: boolean, list: Promise<any>[]): void;
26
25
  }
@@ -1,5 +1,6 @@
1
1
  import { PostProcess } from "./postProcess.js";
2
2
  import { RegisterClass } from "../Misc/typeStore.js";
3
+ import { ThinAnaglyphPostProcess } from "./thinAnaglyphPostProcess.js";
3
4
  /**
4
5
  * Postprocess used to generate anaglyphic rendering
5
6
  */
@@ -21,22 +22,24 @@ export class AnaglyphPostProcess extends PostProcess {
21
22
  * @param reusable defines if the postprocess will be reused multiple times per frame
22
23
  */
23
24
  constructor(name, options, rigCameras, samplingMode, engine, reusable) {
24
- super(name, "anaglyph", null, ["leftSampler"], options, rigCameras[1], samplingMode, engine, reusable);
25
+ const localOptions = {
26
+ samplers: ThinAnaglyphPostProcess.Samplers,
27
+ size: typeof options === "number" ? options : undefined,
28
+ camera: rigCameras[1],
29
+ samplingMode,
30
+ engine,
31
+ reusable,
32
+ ...options,
33
+ };
34
+ super(name, ThinAnaglyphPostProcess.FragmentUrl, {
35
+ effectWrapper: typeof options === "number" || !options.effectWrapper ? new ThinAnaglyphPostProcess(name, engine, localOptions) : undefined,
36
+ ...localOptions,
37
+ });
25
38
  this._passedProcess = rigCameras[0]._rigPostProcess;
26
39
  this.onApplyObservable.add((effect) => {
27
40
  effect.setTextureFromPostProcess("leftSampler", this._passedProcess);
28
41
  });
29
42
  }
30
- _gatherImports(useWebGPU, list) {
31
- if (useWebGPU) {
32
- this._webGPUReady = true;
33
- list.push(import("../ShadersWGSL/anaglyph.fragment.js"));
34
- }
35
- else {
36
- list.push(import("../Shaders/anaglyph.fragment.js"));
37
- }
38
- super._gatherImports(useWebGPU, list);
39
- }
40
43
  }
41
44
  RegisterClass("BABYLON.AnaglyphPostProcess", AnaglyphPostProcess);
42
45
  //# sourceMappingURL=anaglyphPostProcess.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"anaglyphPostProcess.js","sourceRoot":"","sources":["../../../../dev/core/src/PostProcesses/anaglyphPostProcess.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,WAAW;IAGhD;;;OAGG;IACa,YAAY;QACxB,OAAO,qBAAqB,CAAC;IACjC,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,IAAY,EAAE,OAAoC,EAAE,UAAoB,EAAE,YAAqB,EAAE,MAAuB,EAAE,QAAkB;QACpJ,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QACvG,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC;QAEpD,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE;YAC1C,MAAM,CAAC,yBAAyB,CAAC,aAAa,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;IACP,CAAC;IAEkB,cAAc,CAAC,SAAkB,EAAE,IAAoB;QACtE,IAAI,SAAS,EAAE,CAAC;YACZ,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YACzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,kCAAkC,CAAC,CAAC,CAAC;QAC1D,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,8BAA8B,CAAC,CAAC,CAAC;QACtD,CAAC;QAED,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;CACJ;AAED,aAAa,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"../types\";\r\nimport type { PostProcessOptions } from \"./postProcess\";\r\nimport { PostProcess } from \"./postProcess\";\r\nimport type { Camera } from \"../Cameras/camera\";\r\nimport type { Effect } from \"../Materials/effect\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\nimport type { AbstractEngine } from \"core/Engines/abstractEngine\";\r\n\r\n/**\r\n * Postprocess used to generate anaglyphic rendering\r\n */\r\nexport class AnaglyphPostProcess extends PostProcess {\r\n private _passedProcess: Nullable<PostProcess>;\r\n\r\n /**\r\n * Gets a string identifying the name of the class\r\n * @returns \"AnaglyphPostProcess\" string\r\n */\r\n public override getClassName(): string {\r\n return \"AnaglyphPostProcess\";\r\n }\r\n\r\n /**\r\n * Creates a new AnaglyphPostProcess\r\n * @param name defines postprocess name\r\n * @param options defines creation options or target ratio scale\r\n * @param rigCameras defines cameras using this postprocess\r\n * @param samplingMode defines required sampling mode (BABYLON.Texture.NEAREST_SAMPLINGMODE by default)\r\n * @param engine defines hosting engine\r\n * @param reusable defines if the postprocess will be reused multiple times per frame\r\n */\r\n constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: AbstractEngine, reusable?: boolean) {\r\n super(name, \"anaglyph\", null, [\"leftSampler\"], options, rigCameras[1], samplingMode, engine, reusable);\r\n this._passedProcess = rigCameras[0]._rigPostProcess;\r\n\r\n this.onApplyObservable.add((effect: Effect) => {\r\n effect.setTextureFromPostProcess(\"leftSampler\", this._passedProcess);\r\n });\r\n }\r\n\r\n protected override _gatherImports(useWebGPU: boolean, list: Promise<any>[]) {\r\n if (useWebGPU) {\r\n this._webGPUReady = true;\r\n list.push(import(\"../ShadersWGSL/anaglyph.fragment\"));\r\n } else {\r\n list.push(import(\"../Shaders/anaglyph.fragment\"));\r\n }\r\n\r\n super._gatherImports(useWebGPU, list);\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.AnaglyphPostProcess\", AnaglyphPostProcess);\r\n"]}
1
+ {"version":3,"file":"anaglyphPostProcess.js","sourceRoot":"","sources":["../../../../dev/core/src/PostProcesses/anaglyphPostProcess.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,WAAW;IAGhD;;;OAGG;IACa,YAAY;QACxB,OAAO,qBAAqB,CAAC;IACjC,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,IAAY,EAAE,OAAoC,EAAE,UAAoB,EAAE,YAAqB,EAAE,MAAuB,EAAE,QAAkB;QACpJ,MAAM,YAAY,GAAG;YACjB,QAAQ,EAAE,uBAAuB,CAAC,QAAQ;YAC1C,IAAI,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;YACvD,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;YACrB,YAAY;YACZ,MAAM;YACN,QAAQ;YACR,GAAI,OAA8B;SACrC,CAAC;QAEF,KAAK,CAAC,IAAI,EAAE,uBAAuB,CAAC,WAAW,EAAE;YAC7C,aAAa,EAAE,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS;YAC1I,GAAG,YAAY;SAClB,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC;QAEpD,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE;YAC1C,MAAM,CAAC,yBAAyB,CAAC,aAAa,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAED,aAAa,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"../types\";\r\nimport type { PostProcessOptions } from \"./postProcess\";\r\nimport { PostProcess } from \"./postProcess\";\r\nimport type { Camera } from \"../Cameras/camera\";\r\nimport type { Effect } from \"../Materials/effect\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\nimport type { AbstractEngine } from \"core/Engines/abstractEngine\";\r\nimport { ThinAnaglyphPostProcess } from \"./thinAnaglyphPostProcess\";\r\n\r\n/**\r\n * Postprocess used to generate anaglyphic rendering\r\n */\r\nexport class AnaglyphPostProcess extends PostProcess {\r\n private _passedProcess: Nullable<PostProcess>;\r\n\r\n /**\r\n * Gets a string identifying the name of the class\r\n * @returns \"AnaglyphPostProcess\" string\r\n */\r\n public override getClassName(): string {\r\n return \"AnaglyphPostProcess\";\r\n }\r\n\r\n /**\r\n * Creates a new AnaglyphPostProcess\r\n * @param name defines postprocess name\r\n * @param options defines creation options or target ratio scale\r\n * @param rigCameras defines cameras using this postprocess\r\n * @param samplingMode defines required sampling mode (BABYLON.Texture.NEAREST_SAMPLINGMODE by default)\r\n * @param engine defines hosting engine\r\n * @param reusable defines if the postprocess will be reused multiple times per frame\r\n */\r\n constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: AbstractEngine, reusable?: boolean) {\r\n const localOptions = {\r\n samplers: ThinAnaglyphPostProcess.Samplers,\r\n size: typeof options === \"number\" ? options : undefined,\r\n camera: rigCameras[1],\r\n samplingMode,\r\n engine,\r\n reusable,\r\n ...(options as PostProcessOptions),\r\n };\r\n\r\n super(name, ThinAnaglyphPostProcess.FragmentUrl, {\r\n effectWrapper: typeof options === \"number\" || !options.effectWrapper ? new ThinAnaglyphPostProcess(name, engine, localOptions) : undefined,\r\n ...localOptions,\r\n });\r\n\r\n this._passedProcess = rigCameras[0]._rigPostProcess;\r\n\r\n this.onApplyObservable.add((effect: Effect) => {\r\n effect.setTextureFromPostProcess(\"leftSampler\", this._passedProcess);\r\n });\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.AnaglyphPostProcess\", AnaglyphPostProcess);\r\n"]}
@@ -1,10 +1,11 @@
1
- import { Vector2 } from "../Maths/math.vector";
1
+ import type { Vector2 } from "../Maths/math.vector";
2
2
  import type { Nullable } from "../types";
3
3
  import type { PostProcessOptions } from "./postProcess";
4
4
  import { PostProcess } from "./postProcess";
5
5
  import type { Camera } from "../Cameras/camera";
6
6
  import type { AbstractEngine } from "../Engines/abstractEngine";
7
7
  import type { Scene } from "../scene";
8
+ import { ThinChromaticAberrationPostProcess } from "./thinChromaticAberrationPostProcess";
8
9
  /**
9
10
  * The ChromaticAberrationPostProcess separates the rgb channels in an image to produce chromatic distortion around the edges of the screen
10
11
  */
@@ -12,28 +13,35 @@ export declare class ChromaticAberrationPostProcess extends PostProcess {
12
13
  /**
13
14
  * The amount of separation of rgb channels (default: 30)
14
15
  */
15
- aberrationAmount: number;
16
+ get aberrationAmount(): number;
17
+ set aberrationAmount(value: number);
16
18
  /**
17
19
  * The amount the effect will increase for pixels closer to the edge of the screen. (default: 0)
18
20
  */
19
- radialIntensity: number;
21
+ get radialIntensity(): number;
22
+ set radialIntensity(value: number);
20
23
  /**
21
24
  * The normalized direction in which the rgb channels should be separated. If set to 0,0 radial direction will be used. (default: Vector2(0.707,0.707))
22
25
  */
23
- direction: Vector2;
26
+ get direction(): Vector2;
27
+ set direction(value: Vector2);
24
28
  /**
25
29
  * The center position where the radialIntensity should be around. [0.5,0.5 is center of screen, 1,1 is top right corner] (default: Vector2(0.5 ,0.5))
26
30
  */
27
- centerPosition: Vector2;
31
+ get centerPosition(): Vector2;
32
+ set centerPosition(value: Vector2);
28
33
  /** The width of the screen to apply the effect on */
29
- screenWidth: number;
34
+ get screenWidth(): number;
35
+ set screenWidth(value: number);
30
36
  /** The height of the screen to apply the effect on */
31
- screenHeight: number;
37
+ get screenHeight(): number;
38
+ set screenHeight(value: number);
32
39
  /**
33
40
  * Gets a string identifying the name of the class
34
41
  * @returns "ChromaticAberrationPostProcess" string
35
42
  */
36
43
  getClassName(): string;
44
+ protected _effectWrapper: ThinChromaticAberrationPostProcess;
37
45
  /**
38
46
  * Creates a new instance ChromaticAberrationPostProcess
39
47
  * @param name The name of the effect.
@@ -48,7 +56,6 @@ export declare class ChromaticAberrationPostProcess extends PostProcess {
48
56
  * @param blockCompilation If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)
49
57
  */
50
58
  constructor(name: string, screenWidth: number, screenHeight: number, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: AbstractEngine, reusable?: boolean, textureType?: number, blockCompilation?: boolean);
51
- protected _gatherImports(useWebGPU: boolean, list: Promise<any>[]): void;
52
59
  /**
53
60
  * @internal
54
61
  */
@@ -1,14 +1,64 @@
1
1
  import { __decorate } from "../tslib.es6.js";
2
- import { Vector2 } from "../Maths/math.vector.js";
3
2
  import { PostProcess } from "./postProcess.js";
4
3
 
5
4
  import { RegisterClass } from "../Misc/typeStore.js";
6
5
  import { serialize } from "../Misc/decorators.js";
7
6
  import { SerializationHelper } from "../Misc/decorators.serialization.js";
7
+ import { ThinChromaticAberrationPostProcess } from "./thinChromaticAberrationPostProcess.js";
8
8
  /**
9
9
  * The ChromaticAberrationPostProcess separates the rgb channels in an image to produce chromatic distortion around the edges of the screen
10
10
  */
11
11
  export class ChromaticAberrationPostProcess extends PostProcess {
12
+ /**
13
+ * The amount of separation of rgb channels (default: 30)
14
+ */
15
+ get aberrationAmount() {
16
+ return this._effectWrapper.aberrationAmount;
17
+ }
18
+ set aberrationAmount(value) {
19
+ this._effectWrapper.aberrationAmount = value;
20
+ }
21
+ /**
22
+ * The amount the effect will increase for pixels closer to the edge of the screen. (default: 0)
23
+ */
24
+ get radialIntensity() {
25
+ return this._effectWrapper.radialIntensity;
26
+ }
27
+ set radialIntensity(value) {
28
+ this._effectWrapper.radialIntensity = value;
29
+ }
30
+ /**
31
+ * The normalized direction in which the rgb channels should be separated. If set to 0,0 radial direction will be used. (default: Vector2(0.707,0.707))
32
+ */
33
+ get direction() {
34
+ return this._effectWrapper.direction;
35
+ }
36
+ set direction(value) {
37
+ this._effectWrapper.direction = value;
38
+ }
39
+ /**
40
+ * The center position where the radialIntensity should be around. [0.5,0.5 is center of screen, 1,1 is top right corner] (default: Vector2(0.5 ,0.5))
41
+ */
42
+ get centerPosition() {
43
+ return this._effectWrapper.centerPosition;
44
+ }
45
+ set centerPosition(value) {
46
+ this._effectWrapper.centerPosition = value;
47
+ }
48
+ /** The width of the screen to apply the effect on */
49
+ get screenWidth() {
50
+ return this._effectWrapper.screenWidth;
51
+ }
52
+ set screenWidth(value) {
53
+ this._effectWrapper.screenWidth = value;
54
+ }
55
+ /** The height of the screen to apply the effect on */
56
+ get screenHeight() {
57
+ return this._effectWrapper.screenHeight;
58
+ }
59
+ set screenHeight(value) {
60
+ this._effectWrapper.screenHeight = value;
61
+ }
12
62
  /**
13
63
  * Gets a string identifying the name of the class
14
64
  * @returns "ChromaticAberrationPostProcess" string
@@ -30,43 +80,23 @@ export class ChromaticAberrationPostProcess extends PostProcess {
30
80
  * @param blockCompilation If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)
31
81
  */
32
82
  constructor(name, screenWidth, screenHeight, options, camera, samplingMode, engine, reusable, textureType = 0, blockCompilation = false) {
33
- super(name, "chromaticAberration", ["chromatic_aberration", "screen_width", "screen_height", "direction", "radialIntensity", "centerPosition"], [], options, camera, samplingMode, engine, reusable, null, textureType, undefined, null, blockCompilation);
34
- /**
35
- * The amount of separation of rgb channels (default: 30)
36
- */
37
- this.aberrationAmount = 30;
38
- /**
39
- * The amount the effect will increase for pixels closer to the edge of the screen. (default: 0)
40
- */
41
- this.radialIntensity = 0;
42
- /**
43
- * The normalized direction in which the rgb channels should be separated. If set to 0,0 radial direction will be used. (default: Vector2(0.707,0.707))
44
- */
45
- this.direction = new Vector2(0.707, 0.707);
46
- /**
47
- * The center position where the radialIntensity should be around. [0.5,0.5 is center of screen, 1,1 is top right corner] (default: Vector2(0.5 ,0.5))
48
- */
49
- this.centerPosition = new Vector2(0.5, 0.5);
83
+ const localOptions = {
84
+ uniforms: ThinChromaticAberrationPostProcess.Uniforms,
85
+ size: typeof options === "number" ? options : undefined,
86
+ camera,
87
+ samplingMode,
88
+ engine,
89
+ reusable,
90
+ textureType,
91
+ blockCompilation,
92
+ ...options,
93
+ };
94
+ super(name, ThinChromaticAberrationPostProcess.FragmentUrl, {
95
+ effectWrapper: typeof options === "number" || !options.effectWrapper ? new ThinChromaticAberrationPostProcess(name, engine, localOptions) : undefined,
96
+ ...localOptions,
97
+ });
50
98
  this.screenWidth = screenWidth;
51
99
  this.screenHeight = screenHeight;
52
- this.onApplyObservable.add((effect) => {
53
- effect.setFloat("chromatic_aberration", this.aberrationAmount);
54
- effect.setFloat("screen_width", screenWidth);
55
- effect.setFloat("screen_height", screenHeight);
56
- effect.setFloat("radialIntensity", this.radialIntensity);
57
- effect.setFloat2("direction", this.direction.x, this.direction.y);
58
- effect.setFloat2("centerPosition", this.centerPosition.x, this.centerPosition.y);
59
- });
60
- }
61
- _gatherImports(useWebGPU, list) {
62
- if (useWebGPU) {
63
- this._webGPUReady = true;
64
- list.push(Promise.all([import("../ShadersWGSL/chromaticAberration.fragment.js")]));
65
- }
66
- else {
67
- list.push(Promise.all([import("../Shaders/chromaticAberration.fragment.js")]));
68
- }
69
- super._gatherImports(useWebGPU, list);
70
100
  }
71
101
  /**
72
102
  * @internal
@@ -79,21 +109,21 @@ export class ChromaticAberrationPostProcess extends PostProcess {
79
109
  }
80
110
  __decorate([
81
111
  serialize()
82
- ], ChromaticAberrationPostProcess.prototype, "aberrationAmount", void 0);
112
+ ], ChromaticAberrationPostProcess.prototype, "aberrationAmount", null);
83
113
  __decorate([
84
114
  serialize()
85
- ], ChromaticAberrationPostProcess.prototype, "radialIntensity", void 0);
115
+ ], ChromaticAberrationPostProcess.prototype, "radialIntensity", null);
86
116
  __decorate([
87
117
  serialize()
88
- ], ChromaticAberrationPostProcess.prototype, "direction", void 0);
118
+ ], ChromaticAberrationPostProcess.prototype, "direction", null);
89
119
  __decorate([
90
120
  serialize()
91
- ], ChromaticAberrationPostProcess.prototype, "centerPosition", void 0);
121
+ ], ChromaticAberrationPostProcess.prototype, "centerPosition", null);
92
122
  __decorate([
93
123
  serialize()
94
- ], ChromaticAberrationPostProcess.prototype, "screenWidth", void 0);
124
+ ], ChromaticAberrationPostProcess.prototype, "screenWidth", null);
95
125
  __decorate([
96
126
  serialize()
97
- ], ChromaticAberrationPostProcess.prototype, "screenHeight", void 0);
127
+ ], ChromaticAberrationPostProcess.prototype, "screenHeight", null);
98
128
  RegisterClass("BABYLON.ChromaticAberrationPostProcess", ChromaticAberrationPostProcess);
99
129
  //# sourceMappingURL=chromaticAberrationPostProcess.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chromaticAberrationPostProcess.js","sourceRoot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AO,mBAAmB,CAAC,KAAK,CAC5B,GAAG,EAAE;YACD,OAAO,IAAI,8BAA8B,CACrC,iBAAiB,CAAC,IAAI,EACtB,iBAAiB,CAAC,WAAW,EAC7B,iBAAiB,CAAC,YAAY,EAC9B,iBAAiB,CAAC,OAAO,EACzB,YAAY,EACZ,iBAAiB,CAAC,wBAAwB,EAC1C,KAAK,CAAC,SAAS,EAAE,EACjB,iBAAiB,CAAC,QAAQ,EAC1B,iBAAiB,CAAC,WAAW,EAC7B,KAAK,CACR,CAAC;QACN,CAAC,EACD,iBAAiB,EACjB,KAAK,EACL,OAAO,CACV,CAAC;IACN,CAAC;CACJ;AA9HG;IADC,SAAS,EAAE;wEACU;AAMtB;IADC,SAAS,EAAE;uEACQ;AAMpB;IADC,SAAS,EAAE;iEAC0B;AAMtC;IADC,SAAS,EAAE;sEAC2B;AAIvC;IADC,SAAS,EAAE;mEACQ;AAIpB;IADC,SAAS,EAAE;oEACS;AAsGzB,aAAa,CAAC,wCAAwC,EAAE,8BAA8B,CAAC,CAAC","sourcesContent":["import { Vector2 } from \"../Maths/math.vector\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { PostProcessOptions } from \"./postProcess\";\r\nimport { PostProcess } from \"./postProcess\";\r\nimport type { Effect } from \"../Materials/effect\";\r\nimport type { Camera } from \"../Cameras/camera\";\r\nimport type { AbstractEngine } from \"../Engines/abstractEngine\";\r\nimport { Constants } from \"../Engines/constants\";\r\n\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\nimport { serialize } from \"../Misc/decorators\";\r\nimport { SerializationHelper } from \"../Misc/decorators.serialization\";\r\n\r\nimport type { Scene } from \"../scene\";\r\n\r\n/**\r\n * The ChromaticAberrationPostProcess separates the rgb channels in an image to produce chromatic distortion around the edges of the screen\r\n */\r\nexport class ChromaticAberrationPostProcess extends PostProcess {\r\n /**\r\n * The amount of separation of rgb channels (default: 30)\r\n */\r\n @serialize()\r\n aberrationAmount = 30;\r\n\r\n /**\r\n * The amount the effect will increase for pixels closer to the edge of the screen. (default: 0)\r\n */\r\n @serialize()\r\n radialIntensity = 0;\r\n\r\n /**\r\n * The normalized direction in which the rgb channels should be separated. If set to 0,0 radial direction will be used. (default: Vector2(0.707,0.707))\r\n */\r\n @serialize()\r\n direction = new Vector2(0.707, 0.707);\r\n\r\n /**\r\n * The center position where the radialIntensity should be around. [0.5,0.5 is center of screen, 1,1 is top right corner] (default: Vector2(0.5 ,0.5))\r\n */\r\n @serialize()\r\n centerPosition = new Vector2(0.5, 0.5);\r\n\r\n /** The width of the screen to apply the effect on */\r\n @serialize()\r\n screenWidth: number;\r\n\r\n /** The height of the screen to apply the effect on */\r\n @serialize()\r\n screenHeight: number;\r\n\r\n /**\r\n * Gets a string identifying the name of the class\r\n * @returns \"ChromaticAberrationPostProcess\" string\r\n */\r\n public override getClassName(): string {\r\n return \"ChromaticAberrationPostProcess\";\r\n }\r\n\r\n /**\r\n * Creates a new instance ChromaticAberrationPostProcess\r\n * @param name The name of the effect.\r\n * @param screenWidth The width of the screen to apply the effect on.\r\n * @param screenHeight The height of the screen to apply the effect on.\r\n * @param options The required width/height ratio to downsize to before computing the render pass.\r\n * @param camera The camera to apply the render pass to.\r\n * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)\r\n * @param engine The engine which the post process will be applied. (default: current engine)\r\n * @param reusable If the post process can be reused on the same frame. (default: false)\r\n * @param textureType Type of textures used when performing the post process. (default: 0)\r\n * @param blockCompilation If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)\r\n */\r\n constructor(\r\n name: string,\r\n screenWidth: number,\r\n screenHeight: number,\r\n options: number | PostProcessOptions,\r\n camera: Nullable<Camera>,\r\n samplingMode?: number,\r\n engine?: AbstractEngine,\r\n reusable?: boolean,\r\n textureType: number = Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n blockCompilation = false\r\n ) {\r\n super(\r\n name,\r\n \"chromaticAberration\",\r\n [\"chromatic_aberration\", \"screen_width\", \"screen_height\", \"direction\", \"radialIntensity\", \"centerPosition\"],\r\n [],\r\n options,\r\n camera,\r\n samplingMode,\r\n engine,\r\n reusable,\r\n null,\r\n textureType,\r\n undefined,\r\n null,\r\n blockCompilation\r\n );\r\n\r\n this.screenWidth = screenWidth;\r\n this.screenHeight = screenHeight;\r\n\r\n this.onApplyObservable.add((effect: Effect) => {\r\n effect.setFloat(\"chromatic_aberration\", this.aberrationAmount);\r\n effect.setFloat(\"screen_width\", screenWidth);\r\n effect.setFloat(\"screen_height\", screenHeight);\r\n effect.setFloat(\"radialIntensity\", this.radialIntensity);\r\n effect.setFloat2(\"direction\", this.direction.x, this.direction.y);\r\n effect.setFloat2(\"centerPosition\", this.centerPosition.x, this.centerPosition.y);\r\n });\r\n }\r\n\r\n protected override _gatherImports(useWebGPU: boolean, list: Promise<any>[]) {\r\n if (useWebGPU) {\r\n this._webGPUReady = true;\r\n list.push(Promise.all([import(\"../ShadersWGSL/chromaticAberration.fragment\")]));\r\n } else {\r\n list.push(Promise.all([import(\"../Shaders/chromaticAberration.fragment\")]));\r\n }\r\n\r\n super._gatherImports(useWebGPU, list);\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public static override _Parse(parsedPostProcess: any, targetCamera: Camera, scene: Scene, rootUrl: string): Nullable<ChromaticAberrationPostProcess> {\r\n return SerializationHelper.Parse(\r\n () => {\r\n return new ChromaticAberrationPostProcess(\r\n parsedPostProcess.name,\r\n parsedPostProcess.screenWidth,\r\n parsedPostProcess.screenHeight,\r\n parsedPostProcess.options,\r\n targetCamera,\r\n parsedPostProcess.renderTargetSamplingMode,\r\n scene.getEngine(),\r\n parsedPostProcess.reusable,\r\n parsedPostProcess.textureType,\r\n false\r\n );\r\n },\r\n parsedPostProcess,\r\n scene,\r\n rootUrl\r\n );\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.ChromaticAberrationPostProcess\", ChromaticAberrationPostProcess);\r\n"]}
1
+ {"version":3,"file":"chromaticAberrationPostProcess.js","sourceRo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AAM,CAAU,MAAM,CAAC,iBAAsB,EAAE,YAAoB,EAAE,KAAY,EAAE,OAAe;QACrG,OAAO,mBAAmB,CAAC,KAAK,CAC5B,GAAG,EAAE;YACD,OAAO,IAAI,8BAA8B,CACrC,iBAAiB,CAAC,IAAI,EACtB,iBAAiB,CAAC,WAAW,EAC7B,iBAAiB,CAAC,YAAY,EAC9B,iBAAiB,CAAC,OAAO,EACzB,YAAY,EACZ,iBAAiB,CAAC,wBAAwB,EAC1C,KAAK,CAAC,SAAS,EAAE,EACjB,iBAAiB,CAAC,QAAQ,EAC1B,iBAAiB,CAAC,WAAW,EAC7B,KAAK,CACR,CAAC;QACN,CAAC,EACD,iBAAiB,EACjB,KAAK,EACL,OAAO,CACV,CAAC;IACN,CAAC;CACJ;AAhJG;IADC,SAAS,EAAE;sEAGX;AAUD;IADC,SAAS,EAAE;qEAGX;AAUD;IADC,SAAS,EAAE;+DAGX;AAUD;IADC,SAAS,EAAE;oEAGX;AAQD;IADC,SAAS,EAAE;iEAGX;AAQD;IADC,SAAS,EAAE;kEAGX;AAwFL,aAAa,CAAC,wCAAwC,EAAE,8BAA8B,CAAC,CAAC","sourcesContent":["import type { Vector2 } from \"../Maths/math.vector\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { PostProcessOptions } from \"./postProcess\";\r\nimport { PostProcess } from \"./postProcess\";\r\nimport type { Camera } from \"../Cameras/camera\";\r\nimport type { AbstractEngine } from \"../Engines/abstractEngine\";\r\nimport { Constants } from \"../Engines/constants\";\r\n\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\nimport { serialize } from \"../Misc/decorators\";\r\nimport { SerializationHelper } from \"../Misc/decorators.serialization\";\r\n\r\nimport type { Scene } from \"../scene\";\r\nimport { ThinChromaticAberrationPostProcess } from \"./thinChromaticAberrationPostProcess\";\r\n\r\n/**\r\n * The ChromaticAberrationPostProcess separates the rgb channels in an image to produce chromatic distortion around the edges of the screen\r\n */\r\nexport class ChromaticAberrationPostProcess extends PostProcess {\r\n /**\r\n * The amount of separation of rgb channels (default: 30)\r\n */\r\n @serialize()\r\n public get aberrationAmount() {\r\n return this._effectWrapper.aberrationAmount;\r\n }\r\n\r\n public set aberrationAmount(value: number) {\r\n this._effectWrapper.aberrationAmount = value;\r\n }\r\n\r\n /**\r\n * The amount the effect will increase for pixels closer to the edge of the screen. (default: 0)\r\n */\r\n @serialize()\r\n public get radialIntensity() {\r\n return this._effectWrapper.radialIntensity;\r\n }\r\n\r\n public set radialIntensity(value: number) {\r\n this._effectWrapper.radialIntensity = value;\r\n }\r\n\r\n /**\r\n * The normalized direction in which the rgb channels should be separated. If set to 0,0 radial direction will be used. (default: Vector2(0.707,0.707))\r\n */\r\n @serialize()\r\n public get direction() {\r\n return this._effectWrapper.direction;\r\n }\r\n\r\n public set direction(value: Vector2) {\r\n this._effectWrapper.direction = value;\r\n }\r\n\r\n /**\r\n * The center position where the radialIntensity should be around. [0.5,0.5 is center of screen, 1,1 is top right corner] (default: Vector2(0.5 ,0.5))\r\n */\r\n @serialize()\r\n public get centerPosition() {\r\n return this._effectWrapper.centerPosition;\r\n }\r\n\r\n public set centerPosition(value: Vector2) {\r\n this._effectWrapper.centerPosition = value;\r\n }\r\n\r\n /** The width of the screen to apply the effect on */\r\n @serialize()\r\n public get screenWidth() {\r\n return this._effectWrapper.screenWidth;\r\n }\r\n\r\n public set screenWidth(value: number) {\r\n this._effectWrapper.screenWidth = value;\r\n }\r\n\r\n /** The height of the screen to apply the effect on */\r\n @serialize()\r\n public get screenHeight() {\r\n return this._effectWrapper.screenHeight;\r\n }\r\n\r\n public set screenHeight(value: number) {\r\n this._effectWrapper.screenHeight = value;\r\n }\r\n\r\n /**\r\n * Gets a string identifying the name of the class\r\n * @returns \"ChromaticAberrationPostProcess\" string\r\n */\r\n public override getClassName(): string {\r\n return \"ChromaticAberrationPostProcess\";\r\n }\r\n\r\n protected override _effectWrapper: ThinChromaticAberrationPostProcess;\r\n\r\n /**\r\n * Creates a new instance ChromaticAberrationPostProcess\r\n * @param name The name of the effect.\r\n * @param screenWidth The width of the screen to apply the effect on.\r\n * @param screenHeight The height of the screen to apply the effect on.\r\n * @param options The required width/height ratio to downsize to before computing the render pass.\r\n * @param camera The camera to apply the render pass to.\r\n * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)\r\n * @param engine The engine which the post process will be applied. (default: current engine)\r\n * @param reusable If the post process can be reused on the same frame. (default: false)\r\n * @param textureType Type of textures used when performing the post process. (default: 0)\r\n * @param blockCompilation If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)\r\n */\r\n constructor(\r\n name: string,\r\n screenWidth: number,\r\n screenHeight: number,\r\n options: number | PostProcessOptions,\r\n camera: Nullable<Camera>,\r\n samplingMode?: number,\r\n engine?: AbstractEngine,\r\n reusable?: boolean,\r\n textureType: number = Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n blockCompilation = false\r\n ) {\r\n const localOptions = {\r\n uniforms: ThinChromaticAberrationPostProcess.Uniforms,\r\n size: typeof options === \"number\" ? options : undefined,\r\n camera,\r\n samplingMode,\r\n engine,\r\n reusable,\r\n textureType,\r\n blockCompilation,\r\n ...(options as PostProcessOptions),\r\n };\r\n\r\n super(name, ThinChromaticAberrationPostProcess.FragmentUrl, {\r\n effectWrapper: typeof options === \"number\" || !options.effectWrapper ? new ThinChromaticAberrationPostProcess(name, engine, localOptions) : undefined,\r\n ...localOptions,\r\n });\r\n\r\n this.screenWidth = screenWidth;\r\n this.screenHeight = screenHeight;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public static override _Parse(parsedPostProcess: any, targetCamera: Camera, scene: Scene, rootUrl: string): Nullable<ChromaticAberrationPostProcess> {\r\n return SerializationHelper.Parse(\r\n () => {\r\n return new ChromaticAberrationPostProcess(\r\n parsedPostProcess.name,\r\n parsedPostProcess.screenWidth,\r\n parsedPostProcess.screenHeight,\r\n parsedPostProcess.options,\r\n targetCamera,\r\n parsedPostProcess.renderTargetSamplingMode,\r\n scene.getEngine(),\r\n parsedPostProcess.reusable,\r\n parsedPostProcess.textureType,\r\n false\r\n );\r\n },\r\n parsedPostProcess,\r\n scene,\r\n rootUrl\r\n );\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.ChromaticAberrationPostProcess\", ChromaticAberrationPostProcess);\r\n"]}
@@ -31,9 +31,11 @@ export * from "./vrDistortionCorrectionPostProcess";
31
31
  export * from "./vrMultiviewToSingleviewPostProcess";
32
32
  export * from "./screenSpaceReflectionPostProcess";
33
33
  export * from "./screenSpaceCurvaturePostProcess";
34
+ export * from "./thinAnaglyphPostProcess";
34
35
  export * from "./thinBlackAndWhitePostProcess";
35
36
  export * from "./thinBloomEffect";
36
37
  export * from "./thinBlurPostProcess";
38
+ export * from "./thinChromaticAberrationPostProcess";
37
39
  export * from "./thinCircleOfConfusionPostProcess";
38
40
  export * from "./thinDepthOfFieldEffect";
39
41
  export * from "./thinExtractHighlightsPostProcess";
@@ -32,9 +32,11 @@ export * from "./vrDistortionCorrectionPostProcess.js";
32
32
  export * from "./vrMultiviewToSingleviewPostProcess.js";
33
33
  export * from "./screenSpaceReflectionPostProcess.js";
34
34
  export * from "./screenSpaceCurvaturePostProcess.js";
35
+ export * from "./thinAnaglyphPostProcess.js";
35
36
  export * from "./thinBlackAndWhitePostProcess.js";
36
37
  export * from "./thinBloomEffect.js";
37
38
  export * from "./thinBlurPostProcess.js";
39
+ export * from "./thinChromaticAberrationPostProcess.js";
38
40
  export * from "./thinCircleOfConfusionPostProcess.js";
39
41
  export * from "./thinDepthOfFieldEffect.js";
40
42
  export * from "./thinExtractHighlightsPostProcess.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/PostProcesses/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,m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AAU;AACV,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AAEpD,UAAU;AACV,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./anaglyphPostProcess\";\r\nexport * from \"./blackAndWhitePostProcess\";\r\nexport * from \"./bloomEffect\";\r\nexport * from \"./bloomMergePostProcess\";\r\nexport * from \"./blurPostProcess\";\r\nexport * from \"./chromaticAberrationPostProcess\";\r\nexport * from \"./circleOfConfusionPostProcess\";\r\nexport * from \"./colorCorrectionPostProcess\";\r\nexport * from \"./convolutionPostProcess\";\r\nexport * from \"./depthOfFieldBlurPostProcess\";\r\nexport * from \"./depthOfFieldEffect\";\r\nexport * from \"./depthOfFieldMergePostProcess\";\r\nexport * from \"./displayPassPostProcess\";\r\nexport * from \"./extractHighlightsPostProcess\";\r\nexport * from \"./filterPostProcess\";\r\nexport * from \"./fxaaPostProcess\";\r\nexport * from \"./grainPostProcess\";\r\nexport * from \"./highlightsPostProcess\";\r\nexport * from \"./imageProcessingPostProcess\";\r\nexport * from \"./motionBlurPostProcess\";\r\nexport * from \"./passPostProcess\";\r\nexport * from \"./postProcess\";\r\nexport * from \"./postProcessManager\";\r\nexport * from \"./refractionPostProcess\";\r\nexport * from \"./RenderPipeline/index\";\r\nexport * from \"./sharpenPostProcess\";\r\nexport * from \"./stereoscopicInterlacePostProcess\";\r\nexport * from \"./tonemapPostProcess\";\r\nexport * from \"./volumetricLightScatteringPostProcess\";\r\nexport * from \"./vrDistortionCorrectionPostProcess\";\r\nexport * from \"./vrMultiviewToSingleviewPostProcess\";\r\nexport * from \"./screenSpaceReflectionPostProcess\";\r\nexport * from \"./screenSpaceCurvaturePostProcess\";\r\n\r\nexport * from \"./thinBlackAndWhitePostProcess\";\r\nexport * from \"./thinBloomEffect\";\r\nexport * from \"./thinBlurPostProcess\";\r\nexport * from \"./thinCircleOfConfusionPostProcess\";\r\nexport * from \"./thinDepthOfFieldEffect\";\r\nexport * from \"./thinExtractHighlightsPostProcess\";\r\nexport * from \"./thinPassPostProcess\";\r\n\r\n// Postprocess\r\nexport * from \"../Shaders/postprocess.vertex\";\r\nexport * from \"../ShadersWGSL/postprocess.vertex\";\r\n\r\n// Blur postprocess\r\nexport * from \"../Shaders/kernelBlur.fragment\";\r\nexport * from \"../Shaders/kernelBlur.vertex\";\r\nexport * from \"../ShadersWGSL/kernelBlur.fragment\";\r\nexport * from \"../ShadersWGSL/kernelBlur.vertex\";\r\n\r\n// Pass postprocess\r\nexport * from \"../Shaders/pass.fragment\";\r\nexport * from \"../Shaders/passCube.fragment\";\r\nexport * from \"../ShadersWGSL/pass.fragment\";\r\nexport * from \"../ShadersWGSL/passCube.fragment\";\r\n\r\n// vrDFistortionCorrection postprocess\r\nexport * from \"../Shaders/vrDistortionCorrection.fragment\";\r\nexport * from \"../ShadersWGSL/vrDistortionCorrection.fragment\";\r\n\r\n// Image processing postprocess\r\nexport * from \"../ShadersWGSL/imageProcessing.fragment\";\r\nexport * from \"../Shaders/imageProcessing.fragment\";\r\n\r\n// Sharpen\r\nexport * from \"../Shaders/sharpen.fragment\";\r\nexport * from \"../ShadersWGSL/sharpen.fragment\";\r\n\r\n// Grain\r\nexport * from \"../Shaders/grain.fragment\";\r\nexport * from \"../ShadersWGSL/grain.fragment\";\r\n\r\n// Chromatic Aberration\r\nexport * from \"../Shaders/chromaticAberration.fragment\";\r\nexport * from \"../ShadersWGSL/chromaticAberration.fragment\";\r\n\r\n// Depth of field merge\r\nexport * from \"../Shaders/depthOfFieldMerge.fragment\";\r\nexport * from \"../ShadersWGSL/depthOfFieldMerge.fragment\";\r\n\r\n// Circle of confusion\r\nexport * from \"../Shaders/circleOfConfusion.fragment\";\r\nexport * from \"../ShadersWGSL/circleOfConfusion.fragment\";\r\n\r\n// Bloom\r\nexport * from \"../Shaders/bloomMerge.fragment\";\r\nexport * from \"../ShadersWGSL/bloomMerge.fragment\";\r\n\r\n// Extract highlights\r\nexport * from \"../Shaders/extractHighlights.fragment\";\r\nexport * from \"../ShadersWGSL/extractHighlights.fragment\";\r\n\r\n// FXAA\r\nexport * from \"../Shaders/fxaa.fragment\";\r\nexport * from \"../Shaders/fxaa.vertex\";\r\nexport * from \"../ShadersWGSL/fxaa.fragment\";\r\nexport * from \"../ShadersWGSL/fxaa.vertex\";\r\n\r\n// B&W\r\nexport * from \"../Shaders/blackAndWhite.fragment\";\r\nexport * from \"../ShadersWGSL/blackAndWhite.fragment\";\r\n\r\n// Anaglyph\r\nexport * from \"../Shaders/anaglyph.fragment\";\r\nexport * from \"../ShadersWGSL/anaglyph.fragment\";\r\n\r\n// Convolution\r\nexport * from \"../Shaders/convolution.fragment\";\r\nexport * from \"../ShadersWGSL/convolution.fragment\";\r\n\r\n// Color correction\r\nexport * from \"../Shaders/colorCorrection.fragment\";\r\nexport * from \"../ShadersWGSL/colorCorrection.fragment\";\r\n\r\n// Motion blur\r\nexport * from \"../Shaders/motionBlur.fragment\";\r\nexport * from \"../ShadersWGSL/motionBlur.fragment\";\r\n\r\n// Filter\r\nexport * from \"../Shaders/filter.fragment\";\r\nexport * from \"../ShadersWGSL/filter.fragment\";\r\n\r\n// Highlights\r\nexport * from \"../Shaders/highlights.fragment\";\r\nexport * from \"../ShadersWGSL/highlights.fragment\";\r\n\r\n// Display\r\nexport * from \"../Shaders/displayPass.fragment\";\r\nexport * from \"../ShadersWGSL/displayPass.fragment\";\r\n\r\n// Tonemap\r\nexport * from \"../Shaders/tonemap.fragment\";\r\nexport * from \"../ShadersWGSL/tonemap.fragment\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/PostProcesses/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,k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AAc,oCAAoC,CAAC;AAEnD,UAAU;AACV,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AAEpD,UAAU;AACV,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./anaglyphPostProcess\";\r\nexport * from \"./blackAndWhitePostProcess\";\r\nexport * from \"./bloomEffect\";\r\nexport * from \"./bloomMergePostProcess\";\r\nexport * from \"./blurPostProcess\";\r\nexport * from \"./chromaticAberrationPostProcess\";\r\nexport * from \"./circleOfConfusionPostProcess\";\r\nexport * from \"./colorCorrectionPostProcess\";\r\nexport * from \"./convolutionPostProcess\";\r\nexport * from \"./depthOfFieldBlurPostProcess\";\r\nexport * from \"./depthOfFieldEffect\";\r\nexport * from \"./depthOfFieldMergePostProcess\";\r\nexport * from \"./displayPassPostProcess\";\r\nexport * from \"./extractHighlightsPostProcess\";\r\nexport * from \"./filterPostProcess\";\r\nexport * from \"./fxaaPostProcess\";\r\nexport * from \"./grainPostProcess\";\r\nexport * from \"./highlightsPostProcess\";\r\nexport * from \"./imageProcessingPostProcess\";\r\nexport * from \"./motionBlurPostProcess\";\r\nexport * from \"./passPostProcess\";\r\nexport * from \"./postProcess\";\r\nexport * from \"./postProcessManager\";\r\nexport * from \"./refractionPostProcess\";\r\nexport * from \"./RenderPipeline/index\";\r\nexport * from \"./sharpenPostProcess\";\r\nexport * from \"./stereoscopicInterlacePostProcess\";\r\nexport * from \"./tonemapPostProcess\";\r\nexport * from \"./volumetricLightScatteringPostProcess\";\r\nexport * from \"./vrDistortionCorrectionPostProcess\";\r\nexport * from \"./vrMultiviewToSingleviewPostProcess\";\r\nexport * from \"./screenSpaceReflectionPostProcess\";\r\nexport * from \"./screenSpaceCurvaturePostProcess\";\r\n\r\nexport * from \"./thinAnaglyphPostProcess\";\r\nexport * from \"./thinBlackAndWhitePostProcess\";\r\nexport * from \"./thinBloomEffect\";\r\nexport * from \"./thinBlurPostProcess\";\r\nexport * from \"./thinChromaticAberrationPostProcess\";\r\nexport * from \"./thinCircleOfConfusionPostProcess\";\r\nexport * from \"./thinDepthOfFieldEffect\";\r\nexport * from \"./thinExtractHighlightsPostProcess\";\r\nexport * from \"./thinPassPostProcess\";\r\n\r\n// Postprocess\r\nexport * from \"../Shaders/postprocess.vertex\";\r\nexport * from \"../ShadersWGSL/postprocess.vertex\";\r\n\r\n// Blur postprocess\r\nexport * from \"../Shaders/kernelBlur.fragment\";\r\nexport * from \"../Shaders/kernelBlur.vertex\";\r\nexport * from \"../ShadersWGSL/kernelBlur.fragment\";\r\nexport * from \"../ShadersWGSL/kernelBlur.vertex\";\r\n\r\n// Pass postprocess\r\nexport * from \"../Shaders/pass.fragment\";\r\nexport * from \"../Shaders/passCube.fragment\";\r\nexport * from \"../ShadersWGSL/pass.fragment\";\r\nexport * from \"../ShadersWGSL/passCube.fragment\";\r\n\r\n// vrDFistortionCorrection postprocess\r\nexport * from \"../Shaders/vrDistortionCorrection.fragment\";\r\nexport * from \"../ShadersWGSL/vrDistortionCorrection.fragment\";\r\n\r\n// Image processing postprocess\r\nexport * from \"../ShadersWGSL/imageProcessing.fragment\";\r\nexport * from \"../Shaders/imageProcessing.fragment\";\r\n\r\n// Sharpen\r\nexport * from \"../Shaders/sharpen.fragment\";\r\nexport * from \"../ShadersWGSL/sharpen.fragment\";\r\n\r\n// Grain\r\nexport * from \"../Shaders/grain.fragment\";\r\nexport * from \"../ShadersWGSL/grain.fragment\";\r\n\r\n// Chromatic Aberration\r\nexport * from \"../Shaders/chromaticAberration.fragment\";\r\nexport * from \"../ShadersWGSL/chromaticAberration.fragment\";\r\n\r\n// Depth of field merge\r\nexport * from \"../Shaders/depthOfFieldMerge.fragment\";\r\nexport * from \"../ShadersWGSL/depthOfFieldMerge.fragment\";\r\n\r\n// Circle of confusion\r\nexport * from \"../Shaders/circleOfConfusion.fragment\";\r\nexport * from \"../ShadersWGSL/circleOfConfusion.fragment\";\r\n\r\n// Bloom\r\nexport * from \"../Shaders/bloomMerge.fragment\";\r\nexport * from \"../ShadersWGSL/bloomMerge.fragment\";\r\n\r\n// Extract highlights\r\nexport * from \"../Shaders/extractHighlights.fragment\";\r\nexport * from \"../ShadersWGSL/extractHighlights.fragment\";\r\n\r\n// FXAA\r\nexport * from \"../Shaders/fxaa.fragment\";\r\nexport * from \"../Shaders/fxaa.vertex\";\r\nexport * from \"../ShadersWGSL/fxaa.fragment\";\r\nexport * from \"../ShadersWGSL/fxaa.vertex\";\r\n\r\n// B&W\r\nexport * from \"../Shaders/blackAndWhite.fragment\";\r\nexport * from \"../ShadersWGSL/blackAndWhite.fragment\";\r\n\r\n// Anaglyph\r\nexport * from \"../Shaders/anaglyph.fragment\";\r\nexport * from \"../ShadersWGSL/anaglyph.fragment\";\r\n\r\n// Convolution\r\nexport * from \"../Shaders/convolution.fragment\";\r\nexport * from \"../ShadersWGSL/convolution.fragment\";\r\n\r\n// Color correction\r\nexport * from \"../Shaders/colorCorrection.fragment\";\r\nexport * from \"../ShadersWGSL/colorCorrection.fragment\";\r\n\r\n// Motion blur\r\nexport * from \"../Shaders/motionBlur.fragment\";\r\nexport * from \"../ShadersWGSL/motionBlur.fragment\";\r\n\r\n// Filter\r\nexport * from \"../Shaders/filter.fragment\";\r\nexport * from \"../ShadersWGSL/filter.fragment\";\r\n\r\n// Highlights\r\nexport * from \"../Shaders/highlights.fragment\";\r\nexport * from \"../ShadersWGSL/highlights.fragment\";\r\n\r\n// Display\r\nexport * from \"../Shaders/displayPass.fragment\";\r\nexport * from \"../ShadersWGSL/displayPass.fragment\";\r\n\r\n// Tonemap\r\nexport * from \"../Shaders/tonemap.fragment\";\r\nexport * from \"../ShadersWGSL/tonemap.fragment\";\r\n"]}