@onerjs/core 8.26.3 → 8.26.4

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 (137) hide show
  1. package/Engines/abstractEngine.js +2 -2
  2. package/Engines/abstractEngine.js.map +1 -1
  3. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +0 -6
  4. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
  5. package/FrameGraph/frameGraphContext.d.ts +1 -2
  6. package/FrameGraph/frameGraphContext.js +1 -4
  7. package/FrameGraph/frameGraphContext.js.map +1 -1
  8. package/Lights/Clustered/clusteredLightContainer.d.ts +1 -1
  9. package/Lights/Clustered/clusteredLightContainer.js +5 -4
  10. package/Lights/Clustered/clusteredLightContainer.js.map +1 -1
  11. package/Lights/pointLight.js +4 -4
  12. package/Lights/pointLight.js.map +1 -1
  13. package/Lights/rectAreaLight.js +4 -4
  14. package/Lights/rectAreaLight.js.map +1 -1
  15. package/Lights/spotLight.js +2 -2
  16. package/Lights/spotLight.js.map +1 -1
  17. package/Materials/Background/backgroundMaterial.d.ts +91 -19
  18. package/Materials/Background/backgroundMaterial.js +245 -17
  19. package/Materials/Background/backgroundMaterial.js.map +1 -1
  20. package/Materials/Node/Blocks/Dual/lightBlock.js +4 -15
  21. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  22. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +5 -28
  23. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  24. package/Materials/Node/nodeMaterial.d.ts +69 -57
  25. package/Materials/Node/nodeMaterial.js +86 -9
  26. package/Materials/Node/nodeMaterial.js.map +1 -1
  27. package/Materials/Node/nodeMaterialBuildState.d.ts +1 -3
  28. package/Materials/Node/nodeMaterialBuildState.js +15 -35
  29. package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
  30. package/Materials/PBR/index.d.ts +0 -5
  31. package/Materials/PBR/index.js +0 -5
  32. package/Materials/PBR/index.js.map +1 -1
  33. package/Materials/PBR/pbrBaseMaterial.d.ts +43 -57
  34. package/Materials/PBR/pbrBaseMaterial.js +304 -21
  35. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  36. package/Materials/PBR/pbrMaterial.d.ts +78 -0
  37. package/Materials/PBR/pbrMaterial.js +110 -0
  38. package/Materials/PBR/pbrMaterial.js.map +1 -1
  39. package/Materials/imageProcessingConfiguration.defines.d.ts +0 -25
  40. package/Materials/imageProcessingConfiguration.defines.js +0 -27
  41. package/Materials/imageProcessingConfiguration.defines.js.map +1 -1
  42. package/Materials/index.d.ts +0 -2
  43. package/Materials/index.js +0 -2
  44. package/Materials/index.js.map +1 -1
  45. package/Materials/material.d.ts +0 -14
  46. package/Materials/material.js +0 -14
  47. package/Materials/material.js.map +1 -1
  48. package/Materials/materialHelper.functions.d.ts +0 -53
  49. package/Materials/materialHelper.functions.js +0 -297
  50. package/Materials/materialHelper.functions.js.map +1 -1
  51. package/Materials/standardMaterial.d.ts +121 -57
  52. package/Materials/standardMaterial.js +250 -21
  53. package/Materials/standardMaterial.js.map +1 -1
  54. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +0 -1
  55. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  56. package/Misc/decorators.d.ts +0 -7
  57. package/Misc/decorators.js +0 -34
  58. package/Misc/decorators.js.map +1 -1
  59. package/Particles/Node/Blocks/Emitters/createParticleBlock.js +1 -10
  60. package/Particles/Node/Blocks/Emitters/createParticleBlock.js.map +1 -1
  61. package/Particles/Node/Blocks/index.d.ts +0 -2
  62. package/Particles/Node/Blocks/index.js +0 -2
  63. package/Particles/Node/Blocks/index.js.map +1 -1
  64. package/Particles/Node/Blocks/particleInputBlock.js +1 -4
  65. package/Particles/Node/Blocks/particleInputBlock.js.map +1 -1
  66. package/Rendering/IBLShadows/iblShadowsPluginMaterial.d.ts +1 -2
  67. package/Rendering/IBLShadows/iblShadowsPluginMaterial.js +0 -45
  68. package/Rendering/IBLShadows/iblShadowsPluginMaterial.js.map +1 -1
  69. package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +1 -2
  70. package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
  71. package/Rendering/geometryBufferRenderer.js +4 -6
  72. package/Rendering/geometryBufferRenderer.js.map +1 -1
  73. package/Rendering/iblCdfGenerator.js +20 -28
  74. package/Rendering/iblCdfGenerator.js.map +1 -1
  75. package/Rendering/reflectiveShadowMap.d.ts +3 -3
  76. package/Shaders/ShadersInclude/backgroundUboDeclaration.js +1 -1
  77. package/Shaders/ShadersInclude/backgroundUboDeclaration.js.map +1 -1
  78. package/Shaders/ShadersInclude/clusteredLightingFunctions.js +1 -3
  79. package/Shaders/ShadersInclude/clusteredLightingFunctions.js.map +1 -1
  80. package/Shaders/ShadersInclude/defaultUboDeclaration.js +1 -1
  81. package/Shaders/ShadersInclude/defaultUboDeclaration.js.map +1 -1
  82. package/Shaders/ShadersInclude/hdrFilteringFunctions.js +0 -34
  83. package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
  84. package/Shaders/ShadersInclude/helperFunctions.js +1 -1
  85. package/Shaders/ShadersInclude/helperFunctions.js.map +1 -1
  86. package/Shaders/ShadersInclude/importanceSampling.js +0 -4
  87. package/Shaders/ShadersInclude/importanceSampling.js.map +1 -1
  88. package/Shaders/ShadersInclude/lightsFragmentFunctions.js +0 -1
  89. package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  90. package/Shaders/ShadersInclude/pbrBRDFFunctions.js +1 -1
  91. package/Shaders/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
  92. package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js +0 -1
  93. package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
  94. package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js +1 -3
  95. package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  96. package/Shaders/ShadersInclude/pbrHelperFunctions.js +0 -2
  97. package/Shaders/ShadersInclude/pbrHelperFunctions.js.map +1 -1
  98. package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
  99. package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  100. package/ShadersWGSL/ShadersInclude/backgroundUboDeclaration.js +1 -1
  101. package/ShadersWGSL/ShadersInclude/backgroundUboDeclaration.js.map +1 -1
  102. package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js +1 -1
  103. package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js.map +1 -1
  104. package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js +0 -28
  105. package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
  106. package/ShadersWGSL/ShadersInclude/importanceSampling.js +0 -4
  107. package/ShadersWGSL/ShadersInclude/importanceSampling.js.map +1 -1
  108. package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js +1 -1
  109. package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
  110. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +1 -3
  111. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  112. package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js +0 -2
  113. package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js.map +1 -1
  114. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
  115. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  116. package/package.json +1 -1
  117. package/scene.d.ts +0 -21
  118. package/scene.js +3 -29
  119. package/scene.js.map +1 -1
  120. package/Materials/PBR/openPbrMaterial.d.ts +0 -998
  121. package/Materials/PBR/openPbrMaterial.js +0 -2069
  122. package/Materials/PBR/openPbrMaterial.js.map +0 -1
  123. package/Materials/floatingOriginMatrixOverrides.d.ts +0 -3
  124. package/Materials/floatingOriginMatrixOverrides.js +0 -91
  125. package/Materials/floatingOriginMatrixOverrides.js.map +0 -1
  126. package/Materials/imageProcessing.d.ts +0 -65
  127. package/Materials/imageProcessing.js +0 -162
  128. package/Materials/imageProcessing.js.map +0 -1
  129. package/Materials/uv.defines.d.ts +0 -22
  130. package/Materials/uv.defines.js +0 -24
  131. package/Materials/uv.defines.js.map +0 -1
  132. package/Particles/Node/Blocks/particleLocalVariableBlock.d.ts +0 -38
  133. package/Particles/Node/Blocks/particleLocalVariableBlock.js +0 -108
  134. package/Particles/Node/Blocks/particleLocalVariableBlock.js.map +0 -1
  135. package/Particles/Node/Blocks/particleVectorLengthBlock.d.ts +0 -26
  136. package/Particles/Node/Blocks/particleVectorLengthBlock.js +0 -50
  137. package/Particles/Node/Blocks/particleVectorLengthBlock.js.map +0 -1
@@ -1,162 +0,0 @@
1
- /* eslint-disable @typescript-eslint/naming-convention */
2
- import { serializeAsImageProcessingConfiguration } from "../Misc/decorators.js";
3
- /**
4
- * Mixin to add Image processing defines to your material defines
5
- * @internal
6
- */
7
- export function ImageProcessingMixin(base) {
8
- return class extends base {
9
- /**
10
- * Constructor for the ImageProcessingMixin.
11
- * @param args - arguments to pass to the base class constructor
12
- */
13
- constructor(...args) {
14
- super(...args);
15
- // Decorators don't work on this annonymous class
16
- // so I'm setting this up manually.
17
- serializeAsImageProcessingConfiguration.call(this, this, "_imageProcessingConfiguration");
18
- }
19
- /**
20
- * Gets the image processing configuration used either in this material.
21
- */
22
- get imageProcessingConfiguration() {
23
- return this._imageProcessingConfiguration;
24
- }
25
- /**
26
- * Sets the Default image processing configuration used either in the this material.
27
- *
28
- * If sets to null, the scene one is in use.
29
- */
30
- set imageProcessingConfiguration(value) {
31
- this._attachImageProcessingConfiguration(value);
32
- // Ensure the effect will be rebuilt.
33
- if (this._markAllSubMeshesAsImageProcessingDirty) {
34
- this._markAllSubMeshesAsImageProcessingDirty();
35
- }
36
- }
37
- /**
38
- * Attaches a new image processing configuration to the Standard Material.
39
- * @param configuration
40
- */
41
- _attachImageProcessingConfiguration(configuration) {
42
- if (configuration === this._imageProcessingConfiguration) {
43
- return;
44
- }
45
- // Detaches observer
46
- if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
47
- this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
48
- }
49
- // Pick the scene configuration if needed
50
- if (!configuration && this.getScene) {
51
- this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
52
- }
53
- else if (configuration) {
54
- this._imageProcessingConfiguration = configuration;
55
- }
56
- // Attaches observer
57
- if (this._imageProcessingConfiguration) {
58
- this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(() => {
59
- // Ensure the effect will be rebuilt.
60
- if (this._markAllSubMeshesAsImageProcessingDirty) {
61
- this._markAllSubMeshesAsImageProcessingDirty();
62
- }
63
- });
64
- }
65
- }
66
- /**
67
- * Gets whether the color curves effect is enabled.
68
- */
69
- get cameraColorCurvesEnabled() {
70
- return this.imageProcessingConfiguration.colorCurvesEnabled;
71
- }
72
- /**
73
- * Sets whether the color curves effect is enabled.
74
- */
75
- set cameraColorCurvesEnabled(value) {
76
- this.imageProcessingConfiguration.colorCurvesEnabled = value;
77
- }
78
- /**
79
- * Gets whether the color grading effect is enabled.
80
- */
81
- get cameraColorGradingEnabled() {
82
- return this.imageProcessingConfiguration.colorGradingEnabled;
83
- }
84
- /**
85
- * Gets whether the color grading effect is enabled.
86
- */
87
- set cameraColorGradingEnabled(value) {
88
- this.imageProcessingConfiguration.colorGradingEnabled = value;
89
- }
90
- /**
91
- * Gets whether tonemapping is enabled or not.
92
- */
93
- get cameraToneMappingEnabled() {
94
- return this._imageProcessingConfiguration.toneMappingEnabled;
95
- }
96
- /**
97
- * Sets whether tonemapping is enabled or not
98
- */
99
- set cameraToneMappingEnabled(value) {
100
- this._imageProcessingConfiguration.toneMappingEnabled = value;
101
- }
102
- /**
103
- * The camera exposure used on this material.
104
- * This property is here and not in the camera to allow controlling exposure without full screen post process.
105
- * This corresponds to a photographic exposure.
106
- */
107
- get cameraExposure() {
108
- return this._imageProcessingConfiguration.exposure;
109
- }
110
- /**
111
- * The camera exposure used on this material.
112
- * This property is here and not in the camera to allow controlling exposure without full screen post process.
113
- * This corresponds to a photographic exposure.
114
- */
115
- set cameraExposure(value) {
116
- this._imageProcessingConfiguration.exposure = value;
117
- }
118
- /**
119
- * Gets The camera contrast used on this material.
120
- */
121
- get cameraContrast() {
122
- return this._imageProcessingConfiguration.contrast;
123
- }
124
- /**
125
- * Sets The camera contrast used on this material.
126
- */
127
- set cameraContrast(value) {
128
- this._imageProcessingConfiguration.contrast = value;
129
- }
130
- /**
131
- * Gets the Color Grading 2D Lookup Texture.
132
- */
133
- get cameraColorGradingTexture() {
134
- return this._imageProcessingConfiguration.colorGradingTexture;
135
- }
136
- /**
137
- * Sets the Color Grading 2D Lookup Texture.
138
- */
139
- set cameraColorGradingTexture(value) {
140
- this._imageProcessingConfiguration.colorGradingTexture = value;
141
- }
142
- /**
143
- * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
144
- * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
145
- * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
146
- * corresponding to low luminance, medium luminance, and high luminance areas respectively.
147
- */
148
- get cameraColorCurves() {
149
- return this._imageProcessingConfiguration.colorCurves;
150
- }
151
- /**
152
- * The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).
153
- * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
154
- * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
155
- * corresponding to low luminance, medium luminance, and high luminance areas respectively.
156
- */
157
- set cameraColorCurves(value) {
158
- this._imageProcessingConfiguration.colorCurves = value;
159
- }
160
- };
161
- }
162
- //# sourceMappingURL=imageProcessing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"imageProcessing.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/imageProcessing.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EAAE,uCAAuC,EAAE,MAAM,oBAAoB,CAAC;AAS7E;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAgD,IAAW;IAC3F,OAAO,KAAM,SAAQ,IAAI;QACrB;;;WAGG;QACH,YAAY,GAAG,IAAW;YACtB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YACf,iDAAiD;YACjD,mCAAmC;YACnC,uCAAuC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,+BAA+B,CAAC,CAAC;QAC9F,CAAC;QAMD;;WAEG;QACH,IAAW,4BAA4B;YACnC,OAAO,IAAI,CAAC,6BAA6B,CAAC;QAC9C,CAAC;QAED;;;;WAIG;QACH,IAAW,4BAA4B,CAAC,KAAmC;YACvE,IAAI,CAAC,mCAAmC,CAAC,KAAK,CAAC,CAAC;YAEhD,qCAAqC;YACrC,IAAK,IAAY,CAAC,uCAAuC,EAAE,CAAC;gBACvD,IAAY,CAAC,uCAAuC,EAAE,CAAC;YAC5D,CAAC;QACL,CAAC;QAOD;;;WAGG;QACI,mCAAmC,CAAC,aAAqD;YAC5F,IAAI,aAAa,KAAK,IAAI,CAAC,6BAA6B,EAAE,CAAC;gBACvD,OAAO;YACX,CAAC;YAED,oBAAoB;YACpB,IAAI,IAAI,CAAC,6BAA6B,IAAI,IAAI,CAAC,wBAAwB,EAAE,CAAC;gBACtE,IAAI,CAAC,6BAA6B,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;YAChG,CAAC;YAED,yCAAyC;YACzC,IAAI,CAAC,aAAa,IAAK,IAAY,CAAC,QAAQ,EAAE,CAAC;gBAC3C,IAAI,CAAC,6BAA6B,GAAI,IAAY,CAAC,QAAQ,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AI,CAAC,6BAA6B,CAAC,QAAQ,GAAG,KAAK,CAAC;QACxD,CAAC;QAED;;WAEG;QACH,IAAW,cAAc;YACrB,OAAO,IAAI,CAAC,6BAA6B,CAAC,QAAQ,CAAC;QACvD,CAAC;QAED;;WAEG;QACH,IAAW,cAAc,CAAC,KAAa;YACnC,IAAI,CAAC,6BAA6B,CAAC,QAAQ,GAAG,KAAK,CAAC;QACxD,CAAC;QAED;;WAEG;QACH,IAAW,yBAAyB;YAChC,OAAO,IAAI,CAAC,6BAA6B,CAAC,mBAAmB,CAAC;QAClE,CAAC;QACD;;WAEG;QACH,IAAW,yBAAyB,CAAC,KAA4B;YAC7D,IAAI,CAAC,6BAA6B,CAAC,mBAAmB,GAAG,KAAK,CAAC;QACnE,CAAC;QAED;;;;;WAKG;QACH,IAAW,iBAAiB;YACxB,OAAO,IAAI,CAAC,6BAA6B,CAAC,WAAW,CAAC;QAC1D,CAAC;QACD;;;;;WAKG;QACH,IAAW,iBAAiB,CAAC,KAA4B;YACrD,IAAI,CAAC,6BAA6B,CAAC,WAAW,GAAG,KAAK,CAAC;QAC3D,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport { serializeAsImageProcessingConfiguration } from \"../Misc/decorators\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { ImageProcessingConfiguration } from \"./imageProcessingConfiguration\";\r\nimport type { Observer } from \"../Misc/observable\";\r\nimport type { BaseTexture } from \"../Materials/Textures/baseTexture\";\r\nimport type { ColorCurves } from \"../Materials/colorCurves\";\r\n\r\ntype ImageProcessingMixinConstructor<T = {}> = new (...args: any[]) => T;\r\n\r\n/**\r\n * Mixin to add Image processing defines to your material defines\r\n * @internal\r\n */\r\nexport function ImageProcessingMixin<Tbase extends ImageProcessingMixinConstructor>(base: Tbase) {\r\n return class extends base {\r\n /**\r\n * Constructor for the ImageProcessingMixin.\r\n * @param args - arguments to pass to the base class constructor\r\n */\r\n constructor(...args: any[]) {\r\n super(...args);\r\n // Decorators don't work on this annonymous class\r\n // so I'm setting this up manually.\r\n serializeAsImageProcessingConfiguration.call(this, this, \"_imageProcessingConfiguration\");\r\n }\r\n /**\r\n * Default configuration related to image processing available in the standard Material.\r\n */\r\n public _imageProcessingConfiguration: ImageProcessingConfiguration;\r\n\r\n /**\r\n * Gets the image processing configuration used either in this material.\r\n */\r\n public get imageProcessingConfiguration(): ImageProcessingConfiguration {\r\n return this._imageProcessingConfiguration;\r\n }\r\n\r\n /**\r\n * Sets the Default image processing configuration used either in the this material.\r\n *\r\n * If sets to null, the scene one is in use.\r\n */\r\n public set imageProcessingConfiguration(value: ImageProcessingConfiguration) {\r\n this._attachImageProcessingConfiguration(value);\r\n\r\n // Ensure the effect will be rebuilt.\r\n if ((this as any)._markAllSubMeshesAsImageProcessingDirty) {\r\n (this as any)._markAllSubMeshesAsImageProcessingDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Keep track of the image processing observer to allow dispose and replace.\r\n */\r\n public _imageProcessingObserver: Nullable<Observer<ImageProcessingConfiguration>>;\r\n\r\n /**\r\n * Attaches a new image processing configuration to the Standard Material.\r\n * @param configuration\r\n */\r\n public _attachImageProcessingConfiguration(configuration: Nullable<ImageProcessingConfiguration>): void {\r\n if (configuration === this._imageProcessingConfiguration) {\r\n return;\r\n }\r\n\r\n // Detaches observer\r\n if (this._imageProcessingConfiguration && this._imageProcessingObserver) {\r\n this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);\r\n }\r\n\r\n // Pick the scene configuration if needed\r\n if (!configuration && (this as any).getScene) {\r\n this._imageProcessingConfiguration = (this as any).getScene().imageProcessingConfiguration;\r\n } else if (configuration) {\r\n this._imageProcessingConfiguration = configuration;\r\n }\r\n\r\n // Attaches observer\r\n if (this._imageProcessingConfiguration) {\r\n this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(() => {\r\n // Ensure the effect will be rebuilt.\r\n if ((this as any)._markAllSubMeshesAsImageProcessingDirty) {\r\n (this as any)._markAllSubMeshesAsImageProcessingDirty();\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Gets whether the color curves effect is enabled.\r\n */\r\n public get cameraColorCurvesEnabled(): boolean {\r\n return this.imageProcessingConfiguration.colorCurvesEnabled;\r\n }\r\n /**\r\n * Sets whether the color curves effect is enabled.\r\n */\r\n public set cameraColorCurvesEnabled(value: boolean) {\r\n this.imageProcessingConfiguration.colorCurvesEnabled = value;\r\n }\r\n\r\n /**\r\n * Gets whether the color grading effect is enabled.\r\n */\r\n public get cameraColorGradingEnabled(): boolean {\r\n return this.imageProcessingConfiguration.colorGradingEnabled;\r\n }\r\n /**\r\n * Gets whether the color grading effect is enabled.\r\n */\r\n public set cameraColorGradingEnabled(value: boolean) {\r\n this.imageProcessingConfiguration.colorGradingEnabled = value;\r\n }\r\n\r\n /**\r\n * Gets whether tonemapping is enabled or not.\r\n */\r\n public get cameraToneMappingEnabled(): boolean {\r\n return this._imageProcessingConfiguration.toneMappingEnabled;\r\n }\r\n /**\r\n * Sets whether tonemapping is enabled or not\r\n */\r\n public set cameraToneMappingEnabled(value: boolean) {\r\n this._imageProcessingConfiguration.toneMappingEnabled = value;\r\n }\r\n\r\n /**\r\n * The camera exposure used on this material.\r\n * This property is here and not in the camera to allow controlling exposure without full screen post process.\r\n * This corresponds to a photographic exposure.\r\n */\r\n public get cameraExposure(): number {\r\n return this._imageProcessingConfiguration.exposure;\r\n }\r\n /**\r\n * The camera exposure used on this material.\r\n * This property is here and not in the camera to allow controlling exposure without full screen post process.\r\n * This corresponds to a photographic exposure.\r\n */\r\n public set cameraExposure(value: number) {\r\n this._imageProcessingConfiguration.exposure = value;\r\n }\r\n\r\n /**\r\n * Gets The camera contrast used on this material.\r\n */\r\n public get cameraContrast(): number {\r\n return this._imageProcessingConfiguration.contrast;\r\n }\r\n\r\n /**\r\n * Sets The camera contrast used on this material.\r\n */\r\n public set cameraContrast(value: number) {\r\n this._imageProcessingConfiguration.contrast = value;\r\n }\r\n\r\n /**\r\n * Gets the Color Grading 2D Lookup Texture.\r\n */\r\n public get cameraColorGradingTexture(): Nullable<BaseTexture> {\r\n return this._imageProcessingConfiguration.colorGradingTexture;\r\n }\r\n /**\r\n * Sets the Color Grading 2D Lookup Texture.\r\n */\r\n public set cameraColorGradingTexture(value: Nullable<BaseTexture>) {\r\n this._imageProcessingConfiguration.colorGradingTexture = value;\r\n }\r\n\r\n /**\r\n * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).\r\n * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.\r\n * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;\r\n * corresponding to low luminance, medium luminance, and high luminance areas respectively.\r\n */\r\n public get cameraColorCurves(): Nullable<ColorCurves> {\r\n return this._imageProcessingConfiguration.colorCurves;\r\n }\r\n /**\r\n * The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).\r\n * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.\r\n * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;\r\n * corresponding to low luminance, medium luminance, and high luminance areas respectively.\r\n */\r\n public set cameraColorCurves(value: Nullable<ColorCurves>) {\r\n this._imageProcessingConfiguration.colorCurves = value;\r\n }\r\n };\r\n}\r\n"]}
@@ -1,22 +0,0 @@
1
- type UVDefinesMixinConstructor<T = {}> = new (...args: any[]) => T;
2
- /**
3
- * Mixin to add UV defines to your material defines
4
- * @internal
5
- */
6
- export declare function UVDefinesMixin<Tbase extends UVDefinesMixinConstructor>(base: Tbase): {
7
- new (...args: any[]): {
8
- MAINUV1: boolean;
9
- MAINUV2: boolean;
10
- MAINUV3: boolean;
11
- MAINUV4: boolean;
12
- MAINUV5: boolean;
13
- MAINUV6: boolean;
14
- UV1: boolean;
15
- UV2: boolean;
16
- UV3: boolean;
17
- UV4: boolean;
18
- UV5: boolean;
19
- UV6: boolean;
20
- };
21
- } & Tbase;
22
- export {};
@@ -1,24 +0,0 @@
1
- /**
2
- * Mixin to add UV defines to your material defines
3
- * @internal
4
- */
5
- export function UVDefinesMixin(base) {
6
- return class extends base {
7
- constructor() {
8
- super(...arguments);
9
- this.MAINUV1 = false;
10
- this.MAINUV2 = false;
11
- this.MAINUV3 = false;
12
- this.MAINUV4 = false;
13
- this.MAINUV5 = false;
14
- this.MAINUV6 = false;
15
- this.UV1 = false;
16
- this.UV2 = false;
17
- this.UV3 = false;
18
- this.UV4 = false;
19
- this.UV5 = false;
20
- this.UV6 = false;
21
- }
22
- };
23
- }
24
- //# sourceMappingURL=uv.defines.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uv.defines.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/uv.defines.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,cAAc,CAA0C,IAAW;IAC/E,OAAO,KAAM,SAAQ,IAAI;QAAlB;;YACI,YAAO,GAAG,KAAK,CAAC;YAChB,YAAO,GAAG,KAAK,CAAC;YAChB,YAAO,GAAG,KAAK,CAAC;YAChB,YAAO,GAAG,KAAK,CAAC;YAChB,YAAO,GAAG,KAAK,CAAC;YAChB,YAAO,GAAG,KAAK,CAAC;YAChB,QAAG,GAAG,KAAK,CAAC;YACZ,QAAG,GAAG,KAAK,CAAC;YACZ,QAAG,GAAG,KAAK,CAAC;YACZ,QAAG,GAAG,KAAK,CAAC;YACZ,QAAG,GAAG,KAAK,CAAC;YACZ,QAAG,GAAG,KAAK,CAAC;QACvB,CAAC;KAAA,CAAC;AACN,CAAC","sourcesContent":["type UVDefinesMixinConstructor<T = {}> = new (...args: any[]) => T;\r\n\r\n/**\r\n * Mixin to add UV defines to your material defines\r\n * @internal\r\n */\r\nexport function UVDefinesMixin<Tbase extends UVDefinesMixinConstructor>(base: Tbase) {\r\n return class extends base {\r\n public MAINUV1 = false;\r\n public MAINUV2 = false;\r\n public MAINUV3 = false;\r\n public MAINUV4 = false;\r\n public MAINUV5 = false;\r\n public MAINUV6 = false;\r\n public UV1 = false;\r\n public UV2 = false;\r\n public UV3 = false;\r\n public UV4 = false;\r\n public UV5 = false;\r\n public UV6 = false;\r\n };\r\n}\r\n"]}
@@ -1,38 +0,0 @@
1
- import { NodeParticleBlock } from "../nodeParticleBlock.js";
2
- import type { NodeParticleConnectionPoint } from "../nodeParticleBlockConnectionPoint.js";
3
- import type { NodeParticleBuildState } from "../nodeParticleBuildState.js";
4
- export declare enum ParticleLocalVariableBlockScope {
5
- Particle = 0,
6
- Loop = 1
7
- }
8
- /**
9
- * Defines a block used to store local values
10
- * #A1OS53#5
11
- */
12
- export declare class ParticleLocalVariableBlock extends NodeParticleBlock {
13
- /**
14
- * Gets or sets the scope used by the block
15
- */
16
- scope: ParticleLocalVariableBlockScope;
17
- /**
18
- * Create a new ParticleLocalVariableBlock
19
- * @param name defines the block name
20
- */
21
- constructor(name: string);
22
- /**
23
- * Gets the current class name
24
- * @returns the class name
25
- */
26
- getClassName(): string;
27
- /**
28
- * Gets the input component
29
- */
30
- get input(): NodeParticleConnectionPoint;
31
- /**
32
- * Gets the output component
33
- */
34
- get output(): NodeParticleConnectionPoint;
35
- _build(state: NodeParticleBuildState): void;
36
- serialize(): any;
37
- _deserialize(serializationObject: any): void;
38
- }
@@ -1,108 +0,0 @@
1
- import { __decorate } from "../../../tslib.es6.js";
2
- import { editableInPropertyPage } from "../../../Decorators/nodeDecorator.js";
3
- import { RegisterClass } from "../../../Misc/typeStore.js";
4
- import { NodeParticleBlockConnectionPointTypes } from "../Enums/nodeParticleBlockConnectionPointTypes.js";
5
- import { NodeParticleBlock } from "../nodeParticleBlock.js";
6
- export var ParticleLocalVariableBlockScope;
7
- (function (ParticleLocalVariableBlockScope) {
8
- ParticleLocalVariableBlockScope[ParticleLocalVariableBlockScope["Particle"] = 0] = "Particle";
9
- ParticleLocalVariableBlockScope[ParticleLocalVariableBlockScope["Loop"] = 1] = "Loop";
10
- })(ParticleLocalVariableBlockScope || (ParticleLocalVariableBlockScope = {}));
11
- /**
12
- * Defines a block used to store local values
13
- * #A1OS53#5
14
- */
15
- export class ParticleLocalVariableBlock extends NodeParticleBlock {
16
- /**
17
- * Create a new ParticleLocalVariableBlock
18
- * @param name defines the block name
19
- */
20
- constructor(name) {
21
- super(name);
22
- /**
23
- * Gets or sets the scope used by the block
24
- */
25
- this.scope = ParticleLocalVariableBlockScope.Particle;
26
- this._isDebug = true;
27
- this.registerInput("input", NodeParticleBlockConnectionPointTypes.AutoDetect);
28
- this.registerOutput("output", NodeParticleBlockConnectionPointTypes.BasedOnInput);
29
- this._outputs[0]._typeConnectionSource = this._inputs[0];
30
- this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.FloatGradient);
31
- this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.Vector2Gradient);
32
- this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.Vector3Gradient);
33
- this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.Color4Gradient);
34
- this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.System);
35
- this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.Particle);
36
- this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.Texture);
37
- }
38
- /**
39
- * Gets the current class name
40
- * @returns the class name
41
- */
42
- getClassName() {
43
- return "ParticleLocalVariableBlock";
44
- }
45
- /**
46
- * Gets the input component
47
- */
48
- get input() {
49
- return this._inputs[0];
50
- }
51
- /**
52
- * Gets the output component
53
- */
54
- get output() {
55
- return this._outputs[0];
56
- }
57
- _build(state) {
58
- if (!this.input.isConnected) {
59
- this.output._storedFunction = null;
60
- this.output._storedValue = null;
61
- return;
62
- }
63
- let storedValue = null;
64
- let localId = -1;
65
- const func = (state) => {
66
- if (!state.particleContext && !state.systemContext) {
67
- storedValue = null;
68
- return null;
69
- }
70
- const id = (this.scope === ParticleLocalVariableBlockScope.Particle ? state.particleContext?.id : state.systemContext?.getScene().getFrameId()) || -1;
71
- if (localId !== id) {
72
- localId = id;
73
- storedValue = null;
74
- }
75
- if (storedValue === null) {
76
- storedValue = this.input.getConnectedValue(state);
77
- }
78
- return storedValue;
79
- };
80
- if (this.output.isConnected) {
81
- this.output._storedFunction = func;
82
- }
83
- else {
84
- this.output._storedValue = func(state);
85
- }
86
- }
87
- serialize() {
88
- const serializationObject = super.serialize();
89
- serializationObject.scope = this.scope;
90
- return serializationObject;
91
- }
92
- _deserialize(serializationObject) {
93
- super._deserialize(serializationObject);
94
- this.scope = serializationObject.scope;
95
- }
96
- }
97
- __decorate([
98
- editableInPropertyPage("Scope", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
99
- embedded: true,
100
- notifiers: { rebuild: true },
101
- options: [
102
- { label: "Particle", value: ParticleLocalVariableBlockScope.Particle },
103
- { label: "Loop", value: ParticleLocalVariableBlockScope.Loop },
104
- ],
105
- })
106
- ], ParticleLocalVariableBlock.prototype, "scope", void 0);
107
- RegisterClass("BABYLON.ParticleLocalVariableBlock", ParticleLocalVariableBlock);
108
- //# sourceMappingURL=particleLocalVariableBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"particleLocalVariableBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Particles/Node/Blocks/particleLocalVariableBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,sBAAsB,EAA0B,6CAAsC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,gDAAgD,CAAC;AACvG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAIzD,MAAM,CAAN,IAAY,+BAGX;AAHD,WAAY,+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AAI,EAAE,CAAC;gBACvB,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACtD,CAAC;YAED,OAAO,WAAW,CAAC;QACvB,CAAC,CAAC;QAEF,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;QACvC,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC;IACL,CAAC;IAEe,SAAS;QACrB,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAE9C,mBAAmB,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEvC,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QAExC,IAAI,CAAC,KAAK,GAAG,mBAAmB,CAAC,KAAK,CAAC;IAC3C,CAAC;CACJ;AAhGU;IARN,sBAAsB,CAAC,OAAO,uCAA+B,UAAU,EAAE;QACtE,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QAC5B,OAAO,EAAE;YACL,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,+BAA+B,CAAC,QAAQ,EAAE;YACtE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,+BAA+B,CAAC,IAAI,EAAE;SACjE;KACJ,CAAC;yDACsD;AAkG5D,aAAa,CAAC,oCAAoC,EAAE,0BAA0B,CAAC,CAAC","sourcesContent":["import { editableInPropertyPage, PropertyTypeForEdition } from \"core/Decorators/nodeDecorator\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeParticleBlockConnectionPointTypes } from \"../Enums/nodeParticleBlockConnectionPointTypes\";\r\nimport { NodeParticleBlock } from \"../nodeParticleBlock\";\r\nimport type { NodeParticleConnectionPoint } from \"../nodeParticleBlockConnectionPoint\";\r\nimport type { NodeParticleBuildState } from \"../nodeParticleBuildState\";\r\n\r\nexport enum ParticleLocalVariableBlockScope {\r\n Particle = 0,\r\n Loop = 1,\r\n}\r\n\r\n/**\r\n * Defines a block used to store local values\r\n * #A1OS53#5\r\n */\r\nexport class ParticleLocalVariableBlock extends NodeParticleBlock {\r\n /**\r\n * Gets or sets the scope used by the block\r\n */\r\n @editableInPropertyPage(\"Scope\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n embedded: true,\r\n notifiers: { rebuild: true },\r\n options: [\r\n { label: \"Particle\", value: ParticleLocalVariableBlockScope.Particle },\r\n { label: \"Loop\", value: ParticleLocalVariableBlockScope.Loop },\r\n ],\r\n })\r\n public scope = ParticleLocalVariableBlockScope.Particle;\r\n\r\n /**\r\n * Create a new ParticleLocalVariableBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this._isDebug = true;\r\n\r\n this.registerInput(\"input\", NodeParticleBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.FloatGradient);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.Vector2Gradient);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.Vector3Gradient);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.Color4Gradient);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.System);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.Particle);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeParticleBlockConnectionPointTypes.Texture);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"ParticleLocalVariableBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeParticleConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeParticleConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n public override _build(state: NodeParticleBuildState) {\r\n if (!this.input.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n let storedValue: any = null;\r\n let localId = -1;\r\n\r\n const func = (state: NodeParticleBuildState) => {\r\n if (!state.particleContext && !state.systemContext) {\r\n storedValue = null;\r\n return null;\r\n }\r\n\r\n const id = (this.scope === ParticleLocalVariableBlockScope.Particle ? state.particleContext?.id : state.systemContext?.getScene()!.getFrameId()) || -1;\r\n\r\n if (localId !== id) {\r\n localId = id;\r\n storedValue = null;\r\n }\r\n\r\n if (storedValue === null) {\r\n storedValue = this.input.getConnectedValue(state);\r\n }\r\n\r\n return storedValue;\r\n };\r\n\r\n if (this.output.isConnected) {\r\n this.output._storedFunction = func;\r\n } else {\r\n this.output._storedValue = func(state);\r\n }\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.scope = this.scope;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.scope = serializationObject.scope;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.ParticleLocalVariableBlock\", ParticleLocalVariableBlock);\r\n"]}
@@ -1,26 +0,0 @@
1
- import { NodeParticleBlock } from "../nodeParticleBlock.js";
2
- import type { NodeParticleConnectionPoint } from "../nodeParticleBlockConnectionPoint.js";
3
- /**
4
- * Block used to compute vector length
5
- */
6
- export declare class ParticleVectorLengthBlock extends NodeParticleBlock {
7
- /**
8
- * Creates a new ParticleVectorLengthBlock
9
- * @param name defines the block name
10
- */
11
- constructor(name: string);
12
- /**
13
- * Gets the current class name
14
- * @returns the class name
15
- */
16
- getClassName(): string;
17
- /**
18
- * Gets the input operand input component
19
- */
20
- get input(): NodeParticleConnectionPoint;
21
- /**
22
- * Gets the output component
23
- */
24
- get output(): NodeParticleConnectionPoint;
25
- _build(): void;
26
- }
@@ -1,50 +0,0 @@
1
- import { RegisterClass } from "../../../Misc/typeStore.js";
2
- import { NodeParticleBlock } from "../nodeParticleBlock.js";
3
- import { NodeParticleBlockConnectionPointTypes } from "../Enums/nodeParticleBlockConnectionPointTypes.js";
4
- /**
5
- * Block used to compute vector length
6
- */
7
- export class ParticleVectorLengthBlock extends NodeParticleBlock {
8
- /**
9
- * Creates a new ParticleVectorLengthBlock
10
- * @param name defines the block name
11
- */
12
- constructor(name) {
13
- super(name);
14
- this.registerInput("input", NodeParticleBlockConnectionPointTypes.AutoDetect);
15
- this.registerOutput("output", NodeParticleBlockConnectionPointTypes.Float);
16
- this._inputs[0].addExcludedConnectionPointFromAllowedTypes(NodeParticleBlockConnectionPointTypes.Vector2 | NodeParticleBlockConnectionPointTypes.Vector3);
17
- }
18
- /**
19
- * Gets the current class name
20
- * @returns the class name
21
- */
22
- getClassName() {
23
- return "ParticleVectorLengthBlock";
24
- }
25
- /**
26
- * Gets the input operand input component
27
- */
28
- get input() {
29
- return this._inputs[0];
30
- }
31
- /**
32
- * Gets the output component
33
- */
34
- get output() {
35
- return this._outputs[0];
36
- }
37
- _build() {
38
- if (!this.input.isConnected) {
39
- this.output._storedFunction = null;
40
- this.output._storedValue = null;
41
- return;
42
- }
43
- this.output._storedFunction = (state) => {
44
- const input = this.input.getConnectedValue(state);
45
- return input.length();
46
- };
47
- }
48
- }
49
- RegisterClass("BABYLON.ParticleVectorLengthBlock", ParticleVectorLengthBlock);
50
- //# sourceMappingURL=particleVectorLengthBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"particleVectorLengthBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Particles/Node/Blocks/particleVectorLengthBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qCAAqC,EAAE,MAAM,gDAAgD,CAAC;AAGvG;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,iBAAiB;IAC5D;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,KAAK,CAAC,CAAC;QAE3E,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,0CAA0C,CAAC,qCAAqC,CAAC,OAAO,GAAG,qCAAqC,CAAC,OAAO,CAAC,CAAC;IAC9J,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,2BAA2B,CAAC;IACvC,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAEe,MAAM;QAClB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;YAChC,OAAO;QACX,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;YACpC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAClD,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1B,CAAC,CAAC;IACN,CAAC;CACJ;AAED,aAAa,CAAC,mCAAmC,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeParticleBlock } from \"../nodeParticleBlock\";\r\nimport { NodeParticleBlockConnectionPointTypes } from \"../Enums/nodeParticleBlockConnectionPointTypes\";\r\nimport type { NodeParticleConnectionPoint } from \"../nodeParticleBlockConnectionPoint\";\r\n\r\n/**\r\n * Block used to compute vector length\r\n */\r\nexport class ParticleVectorLengthBlock extends NodeParticleBlock {\r\n /**\r\n * Creates a new ParticleVectorLengthBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"input\", NodeParticleBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.Float);\r\n\r\n this._inputs[0].addExcludedConnectionPointFromAllowedTypes(NodeParticleBlockConnectionPointTypes.Vector2 | NodeParticleBlockConnectionPointTypes.Vector3);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"ParticleVectorLengthBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input operand input component\r\n */\r\n public get input(): NodeParticleConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeParticleConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n public override _build() {\r\n if (!this.input.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const input = this.input.getConnectedValue(state);\r\n return input.length();\r\n };\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.ParticleVectorLengthBlock\", ParticleVectorLengthBlock);\r\n"]}