@babylonjs/procedural-textures 5.0.0-rc.7 → 5.0.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 (108) hide show
  1. package/brick/brickProceduralTexture.d.ts +35 -35
  2. package/brick/brickProceduralTexture.fragment.d.ts +5 -5
  3. package/brick/brickProceduralTexture.fragment.js +8 -8
  4. package/brick/brickProceduralTexture.js +104 -104
  5. package/brick/brickProceduralTexture.js.map +1 -1
  6. package/brick/index.d.ts +1 -1
  7. package/brick/index.js +1 -1
  8. package/cloud/cloudProceduralTexture.d.ts +35 -35
  9. package/cloud/cloudProceduralTexture.fragment.d.ts +5 -5
  10. package/cloud/cloudProceduralTexture.fragment.js +8 -8
  11. package/cloud/cloudProceduralTexture.js +104 -104
  12. package/cloud/cloudProceduralTexture.js.map +1 -1
  13. package/cloud/index.d.ts +1 -1
  14. package/cloud/index.js +1 -1
  15. package/fire/fireProceduralTexture.d.ts +44 -44
  16. package/fire/fireProceduralTexture.fragment.d.ts +5 -5
  17. package/fire/fireProceduralTexture.fragment.js +8 -8
  18. package/fire/fireProceduralTexture.js +166 -166
  19. package/fire/fireProceduralTexture.js.map +1 -1
  20. package/fire/index.d.ts +1 -1
  21. package/fire/index.js +1 -1
  22. package/grass/grassProceduralTexture.d.ts +29 -29
  23. package/grass/grassProceduralTexture.fragment.d.ts +5 -5
  24. package/grass/grassProceduralTexture.fragment.js +8 -8
  25. package/grass/grassProceduralTexture.js +80 -80
  26. package/grass/grassProceduralTexture.js.map +1 -1
  27. package/grass/index.d.ts +1 -1
  28. package/grass/index.js +1 -1
  29. package/index.d.ts +10 -10
  30. package/index.js +11 -10
  31. package/index.js.map +1 -1
  32. package/legacy/legacy-brick.d.ts +1 -1
  33. package/legacy/legacy-brick.js +13 -12
  34. package/legacy/legacy-brick.js.map +1 -1
  35. package/legacy/legacy-cloud.d.ts +1 -1
  36. package/legacy/legacy-cloud.js +13 -12
  37. package/legacy/legacy-cloud.js.map +1 -1
  38. package/legacy/legacy-fire.d.ts +1 -1
  39. package/legacy/legacy-fire.js +13 -12
  40. package/legacy/legacy-fire.js.map +1 -1
  41. package/legacy/legacy-grass.d.ts +1 -1
  42. package/legacy/legacy-grass.js +13 -12
  43. package/legacy/legacy-grass.js.map +1 -1
  44. package/legacy/legacy-marble.d.ts +1 -1
  45. package/legacy/legacy-marble.js +13 -12
  46. package/legacy/legacy-marble.js.map +1 -1
  47. package/legacy/legacy-normalMap.d.ts +1 -1
  48. package/legacy/legacy-normalMap.js +13 -12
  49. package/legacy/legacy-normalMap.js.map +1 -1
  50. package/legacy/legacy-perlinNoise.d.ts +1 -1
  51. package/legacy/legacy-perlinNoise.js +13 -12
  52. package/legacy/legacy-perlinNoise.js.map +1 -1
  53. package/legacy/legacy-road.d.ts +1 -1
  54. package/legacy/legacy-road.js +13 -12
  55. package/legacy/legacy-road.js.map +1 -1
  56. package/legacy/legacy-starfield.d.ts +1 -1
  57. package/legacy/legacy-starfield.js +13 -12
  58. package/legacy/legacy-starfield.js.map +1 -1
  59. package/legacy/legacy-wood.d.ts +1 -1
  60. package/legacy/legacy-wood.js +13 -12
  61. package/legacy/legacy-wood.js.map +1 -1
  62. package/legacy/legacy.d.ts +1 -1
  63. package/legacy/legacy.js +16 -15
  64. package/legacy/legacy.js.map +1 -1
  65. package/license.md +71 -0
  66. package/marble/index.d.ts +1 -1
  67. package/marble/index.js +1 -1
  68. package/marble/marbleProceduralTexture.d.ts +35 -35
  69. package/marble/marbleProceduralTexture.fragment.d.ts +5 -5
  70. package/marble/marbleProceduralTexture.fragment.js +8 -8
  71. package/marble/marbleProceduralTexture.js +104 -104
  72. package/marble/marbleProceduralTexture.js.map +1 -1
  73. package/normalMap/index.d.ts +1 -1
  74. package/normalMap/index.js +1 -1
  75. package/normalMap/normalMapProceduralTexture.d.ts +28 -28
  76. package/normalMap/normalMapProceduralTexture.fragment.d.ts +5 -5
  77. package/normalMap/normalMapProceduralTexture.fragment.js +8 -8
  78. package/normalMap/normalMapProceduralTexture.js +69 -69
  79. package/normalMap/normalMapProceduralTexture.js.map +1 -1
  80. package/package.json +24 -5
  81. package/perlinNoise/index.d.ts +1 -1
  82. package/perlinNoise/index.js +1 -1
  83. package/perlinNoise/perlinNoiseProceduralTexture.d.ts +28 -28
  84. package/perlinNoise/perlinNoiseProceduralTexture.fragment.d.ts +5 -5
  85. package/perlinNoise/perlinNoiseProceduralTexture.fragment.js +8 -8
  86. package/perlinNoise/perlinNoiseProceduralTexture.js +69 -69
  87. package/perlinNoise/perlinNoiseProceduralTexture.js.map +1 -1
  88. package/road/index.d.ts +1 -1
  89. package/road/index.js +1 -1
  90. package/road/roadProceduralTexture.d.ts +26 -26
  91. package/road/roadProceduralTexture.fragment.d.ts +5 -5
  92. package/road/roadProceduralTexture.fragment.js +8 -8
  93. package/road/roadProceduralTexture.js +56 -56
  94. package/road/roadProceduralTexture.js.map +1 -1
  95. package/starfield/index.d.ts +1 -1
  96. package/starfield/index.js +1 -1
  97. package/starfield/starfieldProceduralTexture.d.ts +55 -55
  98. package/starfield/starfieldProceduralTexture.fragment.d.ts +5 -5
  99. package/starfield/starfieldProceduralTexture.fragment.js +8 -8
  100. package/starfield/starfieldProceduralTexture.js +215 -215
  101. package/starfield/starfieldProceduralTexture.js.map +1 -1
  102. package/wood/index.d.ts +1 -1
  103. package/wood/index.js +1 -1
  104. package/wood/woodProceduralTexture.d.ts +29 -29
  105. package/wood/woodProceduralTexture.fragment.d.ts +5 -5
  106. package/wood/woodProceduralTexture.fragment.js +8 -8
  107. package/wood/woodProceduralTexture.js +72 -72
  108. package/wood/woodProceduralTexture.js.map +1 -1
@@ -1,105 +1,105 @@
1
- import { __decorate, __extends } from "tslib";
2
- import { serialize, serializeAsColor4, SerializationHelper } from "@babylonjs/core/Misc/decorators.js";
3
- import { Color4 } from "@babylonjs/core/Maths/math.color.js";
4
- import { ProceduralTexture } from "@babylonjs/core/Materials/Textures/Procedurals/proceduralTexture.js";
5
- import { RegisterClass } from "@babylonjs/core/Misc/typeStore.js";
6
- import "./cloudProceduralTexture.fragment.js";
7
- var CloudProceduralTexture = /** @class */ (function (_super) {
8
- __extends(CloudProceduralTexture, _super);
9
- function CloudProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
10
- if (scene === void 0) { scene = null; }
11
- var _this = _super.call(this, name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
12
- _this._skyColor = new Color4(0.15, 0.68, 1.0, 1.0);
13
- _this._cloudColor = new Color4(1, 1, 1, 1.0);
14
- _this._amplitude = 1;
15
- _this._numOctaves = 4;
16
- _this.updateShaderUniforms();
17
- return _this;
18
- }
19
- CloudProceduralTexture.prototype.updateShaderUniforms = function () {
20
- this.setColor4("skyColor", this._skyColor);
21
- this.setColor4("cloudColor", this._cloudColor);
22
- this.setFloat("amplitude", this._amplitude);
23
- this.setInt("numOctaves", this._numOctaves);
24
- };
25
- Object.defineProperty(CloudProceduralTexture.prototype, "skyColor", {
26
- get: function () {
27
- return this._skyColor;
28
- },
29
- set: function (value) {
30
- this._skyColor = value;
31
- this.updateShaderUniforms();
32
- },
33
- enumerable: false,
34
- configurable: true
35
- });
36
- Object.defineProperty(CloudProceduralTexture.prototype, "cloudColor", {
37
- get: function () {
38
- return this._cloudColor;
39
- },
40
- set: function (value) {
41
- this._cloudColor = value;
42
- this.updateShaderUniforms();
43
- },
44
- enumerable: false,
45
- configurable: true
46
- });
47
- Object.defineProperty(CloudProceduralTexture.prototype, "amplitude", {
48
- get: function () {
49
- return this._amplitude;
50
- },
51
- set: function (value) {
52
- this._amplitude = value;
53
- this.updateShaderUniforms();
54
- },
55
- enumerable: false,
56
- configurable: true
57
- });
58
- Object.defineProperty(CloudProceduralTexture.prototype, "numOctaves", {
59
- get: function () {
60
- return this._numOctaves;
61
- },
62
- set: function (value) {
63
- this._numOctaves = value;
64
- this.updateShaderUniforms();
65
- },
66
- enumerable: false,
67
- configurable: true
68
- });
69
- /**
70
- * Serializes this cloud procedural texture
71
- * @returns a serialized cloud procedural texture object
72
- */
73
- CloudProceduralTexture.prototype.serialize = function () {
74
- var serializationObject = SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
75
- serializationObject.customType = "BABYLON.CloudProceduralTexture";
76
- return serializationObject;
77
- };
78
- /**
79
- * Creates a Cloud Procedural Texture from parsed cloud procedural texture data
80
- * @param parsedTexture defines parsed texture data
81
- * @param scene defines the current scene
82
- * @param rootUrl defines the root URL containing cloud procedural texture information
83
- * @returns a parsed Cloud Procedural Texture
84
- */
85
- CloudProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
86
- var texture = SerializationHelper.Parse(function () { return new CloudProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
87
- return texture;
88
- };
89
- __decorate([
90
- serializeAsColor4()
91
- ], CloudProceduralTexture.prototype, "skyColor", null);
92
- __decorate([
93
- serializeAsColor4()
94
- ], CloudProceduralTexture.prototype, "cloudColor", null);
95
- __decorate([
96
- serialize()
97
- ], CloudProceduralTexture.prototype, "amplitude", null);
98
- __decorate([
99
- serialize()
100
- ], CloudProceduralTexture.prototype, "numOctaves", null);
101
- return CloudProceduralTexture;
102
- }(ProceduralTexture));
103
- export { CloudProceduralTexture };
104
- RegisterClass("BABYLON.CloudProceduralTexture", CloudProceduralTexture);
1
+ import { __decorate, __extends } from "tslib";
2
+ import { serialize, serializeAsColor4, SerializationHelper } from "@babylonjs/core/Misc/decorators.js";
3
+ import { Color4 } from "@babylonjs/core/Maths/math.color.js";
4
+ import { ProceduralTexture } from "@babylonjs/core/Materials/Textures/Procedurals/proceduralTexture.js";
5
+ import { RegisterClass } from "@babylonjs/core/Misc/typeStore.js";
6
+ import "./cloudProceduralTexture.fragment.js";
7
+ var CloudProceduralTexture = /** @class */ (function (_super) {
8
+ __extends(CloudProceduralTexture, _super);
9
+ function CloudProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
10
+ if (scene === void 0) { scene = null; }
11
+ var _this = _super.call(this, name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
12
+ _this._skyColor = new Color4(0.15, 0.68, 1.0, 1.0);
13
+ _this._cloudColor = new Color4(1, 1, 1, 1.0);
14
+ _this._amplitude = 1;
15
+ _this._numOctaves = 4;
16
+ _this.updateShaderUniforms();
17
+ return _this;
18
+ }
19
+ CloudProceduralTexture.prototype.updateShaderUniforms = function () {
20
+ this.setColor4("skyColor", this._skyColor);
21
+ this.setColor4("cloudColor", this._cloudColor);
22
+ this.setFloat("amplitude", this._amplitude);
23
+ this.setInt("numOctaves", this._numOctaves);
24
+ };
25
+ Object.defineProperty(CloudProceduralTexture.prototype, "skyColor", {
26
+ get: function () {
27
+ return this._skyColor;
28
+ },
29
+ set: function (value) {
30
+ this._skyColor = value;
31
+ this.updateShaderUniforms();
32
+ },
33
+ enumerable: false,
34
+ configurable: true
35
+ });
36
+ Object.defineProperty(CloudProceduralTexture.prototype, "cloudColor", {
37
+ get: function () {
38
+ return this._cloudColor;
39
+ },
40
+ set: function (value) {
41
+ this._cloudColor = value;
42
+ this.updateShaderUniforms();
43
+ },
44
+ enumerable: false,
45
+ configurable: true
46
+ });
47
+ Object.defineProperty(CloudProceduralTexture.prototype, "amplitude", {
48
+ get: function () {
49
+ return this._amplitude;
50
+ },
51
+ set: function (value) {
52
+ this._amplitude = value;
53
+ this.updateShaderUniforms();
54
+ },
55
+ enumerable: false,
56
+ configurable: true
57
+ });
58
+ Object.defineProperty(CloudProceduralTexture.prototype, "numOctaves", {
59
+ get: function () {
60
+ return this._numOctaves;
61
+ },
62
+ set: function (value) {
63
+ this._numOctaves = value;
64
+ this.updateShaderUniforms();
65
+ },
66
+ enumerable: false,
67
+ configurable: true
68
+ });
69
+ /**
70
+ * Serializes this cloud procedural texture
71
+ * @returns a serialized cloud procedural texture object
72
+ */
73
+ CloudProceduralTexture.prototype.serialize = function () {
74
+ var serializationObject = SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
75
+ serializationObject.customType = "BABYLON.CloudProceduralTexture";
76
+ return serializationObject;
77
+ };
78
+ /**
79
+ * Creates a Cloud Procedural Texture from parsed cloud procedural texture data
80
+ * @param parsedTexture defines parsed texture data
81
+ * @param scene defines the current scene
82
+ * @param rootUrl defines the root URL containing cloud procedural texture information
83
+ * @returns a parsed Cloud Procedural Texture
84
+ */
85
+ CloudProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
86
+ var texture = SerializationHelper.Parse(function () { return new CloudProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
87
+ return texture;
88
+ };
89
+ __decorate([
90
+ serializeAsColor4()
91
+ ], CloudProceduralTexture.prototype, "skyColor", null);
92
+ __decorate([
93
+ serializeAsColor4()
94
+ ], CloudProceduralTexture.prototype, "cloudColor", null);
95
+ __decorate([
96
+ serialize()
97
+ ], CloudProceduralTexture.prototype, "amplitude", null);
98
+ __decorate([
99
+ serialize()
100
+ ], CloudProceduralTexture.prototype, "numOctaves", null);
101
+ return CloudProceduralTexture;
102
+ }(ProceduralTexture));
103
+ export { CloudProceduralTexture };
104
+ RegisterClass("BABYLON.CloudProceduralTexture", CloudProceduralTexture);
105
105
  //# sourceMappingURL=cloudProceduralTexture.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloudProceduralTexture.js","sourceRoot":"","sources":["../../../../../lts/proceduralTextures/generated/cloud/cloudProceduralTexture.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,2CAA6B;AACzF,OAAO,EAAE,MAAM,EAAE,4CAA8B;AAE/C,OAAO,EAAE,iBAAiB,EAAE,4EAA8D;AAE1F,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAGpD,OAAO,mCAAmC,CAAC;AAE3C;IAA4C,0CAAiB;IAMzD,gCAAY,IAAY,EAAE,IAAY,EAAE,KAA6B,EAAE,eA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aAED,UAAqB,KAAa;YAC9B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;YACxB,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAChC,CAAC;;;OALA;IAQD,sBAAW,8CAAU;aAArB;YACI,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;aAED,UAAsB,KAAa;YAC/B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;YACzB,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAChC,CAAC;;;OALA;IAOD;;;OAGG;IACI,0CAAS,GAAhB;QACI,IAAM,mBAAmB,GAAG,mBAAmB,CAAC,SAAS,CAAC,IAAI,EAAE,iBAAM,SAAS,WAAE,CAAC,CAAC;QACnF,mBAAmB,CAAC,UAAU,GAAG,gCAAgC,CAAC;QAElE,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACW,4BAAK,GAAnB,UAAoB,aAAkB,EAAE,KAAY,EAAE,OAAe;QACjE,IAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CACrC,cAAM,OAAA,IAAI,sBAAsB,CAAC,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,EAArH,CAAqH,EAC3H,aAAa,EACb,KAAK,EACL,OAAO,CACV,CAAC;QAEF,OAAO,OAAO,CAAC;IACnB,CAAC;IAlED;QADC,iBAAiB,EAAE;0DAGnB;IAQD;QADC,iBAAiB,EAAE;4DAGnB;IAQD;QADC,SAAS,EAAE;2DAGX;IAQD;QADC,SAAS,EAAE;4DAGX;IAmCL,6BAAC;CAAA,AAtFD,CAA4C,iBAAiB,GAsF5D;SAtFY,sBAAsB;AAwFnC,aAAa,CAAC,gCAAgC,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import { serialize, serializeAsColor4, SerializationHelper } from \"core/Misc/decorators\";\r\nimport { Color4 } from \"core/Maths/math.color\";\r\nimport { Texture } from \"core/Materials/Textures/texture\";\r\nimport { ProceduralTexture } from \"core/Materials/Textures/Procedurals/proceduralTexture\";\r\nimport { Scene } from \"core/scene\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport { Nullable } from \"core/types\";\r\n\r\nimport \"./cloudProceduralTexture.fragment\";\r\n\r\nexport class CloudProceduralTexture extends ProceduralTexture {\r\n private _skyColor = new Color4(0.15, 0.68, 1.0, 1.0);\r\n private _cloudColor = new Color4(1, 1, 1, 1.0);\r\n private _amplitude = 1;\r\n private _numOctaves = 4;\r\n\r\n constructor(name: string, size: number, scene: Nullable<Scene> = null, fallbackTexture?: Texture, generateMipMaps?: boolean) {\r\n super(name, size, \"cloudProceduralTexture\", scene, fallbackTexture, generateMipMaps);\r\n this.updateShaderUniforms();\r\n }\r\n\r\n public updateShaderUniforms() {\r\n this.setColor4(\"skyColor\", this._skyColor);\r\n this.setColor4(\"cloudColor\", this._cloudColor);\r\n this.setFloat(\"amplitude\", this._amplitude);\r\n this.setInt(\"numOctaves\", this._numOctaves);\r\n }\r\n\r\n @serializeAsColor4()\r\n public get skyColor(): Color4 {\r\n return this._skyColor;\r\n }\r\n\r\n public set skyColor(value: Color4) {\r\n this._skyColor = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serializeAsColor4()\r\n public get cloudColor(): Color4 {\r\n return this._cloudColor;\r\n }\r\n\r\n public set cloudColor(value: Color4) {\r\n this._cloudColor = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serialize()\r\n public get amplitude(): number {\r\n return this._amplitude;\r\n }\r\n\r\n public set amplitude(value: number) {\r\n this._amplitude = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serialize()\r\n public get numOctaves(): number {\r\n return this._numOctaves;\r\n }\r\n\r\n public set numOctaves(value: number) {\r\n this._numOctaves = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n /**\r\n * Serializes this cloud procedural texture\r\n * @returns a serialized cloud procedural texture object\r\n */\r\n public serialize(): any {\r\n const serializationObject = SerializationHelper.Serialize(this, super.serialize());\r\n serializationObject.customType = \"BABYLON.CloudProceduralTexture\";\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Creates a Cloud Procedural Texture from parsed cloud procedural texture data\r\n * @param parsedTexture defines parsed texture data\r\n * @param scene defines the current scene\r\n * @param rootUrl defines the root URL containing cloud procedural texture information\r\n * @returns a parsed Cloud Procedural Texture\r\n */\r\n public static Parse(parsedTexture: any, scene: Scene, rootUrl: string): CloudProceduralTexture {\r\n const texture = SerializationHelper.Parse(\r\n () => new CloudProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps),\r\n parsedTexture,\r\n scene,\r\n rootUrl\r\n );\r\n\r\n return texture;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.CloudProceduralTexture\", CloudProceduralTexture);\r\n"]}
1
+ {"version":3,"file":"cloudProceduralTexture.js","sourceRoot":"","sources":["../../../../../lts/proceduralTextures/generated/cloud/cloudProceduralTexture.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,2CAA6B;AACzF,OAAO,EAAE,MAAM,EAAE,4CAA8B;AAE/C,OAAO,EAAE,iBAAiB,EAAE,4EAA8D;AAE1F,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAGpD,OAAO,mCAAmC,CAAC;AAE3C;IAA4C,0CAAiB;IAMzD,gCAAY,IAAY,EAAE,IAAY,EAAE,KAA6B,EAAE,eAAyB,EAAE,eAAyB;QAAnF,sBAAA,EAAA,YAA6B;QAArE,YACI,kBAAM,IAAI,EAAE,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,CAAC,SAEvF;QARO,eAAS,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAC7C,iBAAW,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,C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,CAAC;QAChC,CAAC;;;OALA;IAOD;;;OAGG;IACI,0CAAS,GAAhB;QACI,IAAM,mBAAmB,GAAG,mBAAmB,CAAC,SAAS,CAAC,IAAI,EAAE,iBAAM,SAAS,WAAE,CAAC,CAAC;QACnF,mBAAmB,CAAC,UAAU,GAAG,gCAAgC,CAAC;QAElE,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACW,4BAAK,GAAnB,UAAoB,aAAkB,EAAE,KAAY,EAAE,OAAe;QACjE,IAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CACrC,cAAM,OAAA,IAAI,sBAAsB,CAAC,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,EAArH,CAAqH,EAC3H,aAAa,EACb,KAAK,EACL,OAAO,CACV,CAAC;QAEF,OAAO,OAAO,CAAC;IACnB,CAAC;IAlED;QADC,iBAAiB,EAAE;0DAGnB;IAQD;QADC,iBAAiB,EAAE;4DAGnB;IAQD;QADC,SAAS,EAAE;2DAGX;IAQD;QADC,SAAS,EAAE;4DAGX;IAmCL,6BAAC;CAAA,AAtFD,CAA4C,iBAAiB,GAsF5D;SAtFY,sBAAsB;AAwFnC,aAAa,CAAC,gCAAgC,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import { serialize, serializeAsColor4, SerializationHelper } from \"core/Misc/decorators\";\r\nimport { Color4 } from \"core/Maths/math.color\";\r\nimport type { Texture } from \"core/Materials/Textures/texture\";\r\nimport { ProceduralTexture } from \"core/Materials/Textures/Procedurals/proceduralTexture\";\r\nimport type { Scene } from \"core/scene\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport type { Nullable } from \"core/types\";\r\n\r\nimport \"./cloudProceduralTexture.fragment\";\r\n\r\nexport class CloudProceduralTexture extends ProceduralTexture {\r\n private _skyColor = new Color4(0.15, 0.68, 1.0, 1.0);\r\n private _cloudColor = new Color4(1, 1, 1, 1.0);\r\n private _amplitude = 1;\r\n private _numOctaves = 4;\r\n\r\n constructor(name: string, size: number, scene: Nullable<Scene> = null, fallbackTexture?: Texture, generateMipMaps?: boolean) {\r\n super(name, size, \"cloudProceduralTexture\", scene, fallbackTexture, generateMipMaps);\r\n this.updateShaderUniforms();\r\n }\r\n\r\n public updateShaderUniforms() {\r\n this.setColor4(\"skyColor\", this._skyColor);\r\n this.setColor4(\"cloudColor\", this._cloudColor);\r\n this.setFloat(\"amplitude\", this._amplitude);\r\n this.setInt(\"numOctaves\", this._numOctaves);\r\n }\r\n\r\n @serializeAsColor4()\r\n public get skyColor(): Color4 {\r\n return this._skyColor;\r\n }\r\n\r\n public set skyColor(value: Color4) {\r\n this._skyColor = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serializeAsColor4()\r\n public get cloudColor(): Color4 {\r\n return this._cloudColor;\r\n }\r\n\r\n public set cloudColor(value: Color4) {\r\n this._cloudColor = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serialize()\r\n public get amplitude(): number {\r\n return this._amplitude;\r\n }\r\n\r\n public set amplitude(value: number) {\r\n this._amplitude = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serialize()\r\n public get numOctaves(): number {\r\n return this._numOctaves;\r\n }\r\n\r\n public set numOctaves(value: number) {\r\n this._numOctaves = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n /**\r\n * Serializes this cloud procedural texture\r\n * @returns a serialized cloud procedural texture object\r\n */\r\n public serialize(): any {\r\n const serializationObject = SerializationHelper.Serialize(this, super.serialize());\r\n serializationObject.customType = \"BABYLON.CloudProceduralTexture\";\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Creates a Cloud Procedural Texture from parsed cloud procedural texture data\r\n * @param parsedTexture defines parsed texture data\r\n * @param scene defines the current scene\r\n * @param rootUrl defines the root URL containing cloud procedural texture information\r\n * @returns a parsed Cloud Procedural Texture\r\n */\r\n public static Parse(parsedTexture: any, scene: Scene, rootUrl: string): CloudProceduralTexture {\r\n const texture = SerializationHelper.Parse(\r\n () => new CloudProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps),\r\n parsedTexture,\r\n scene,\r\n rootUrl\r\n );\r\n\r\n return texture;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.CloudProceduralTexture\", CloudProceduralTexture);\r\n"]}
package/cloud/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./cloudProceduralTexture";
1
+ export * from "./cloudProceduralTexture";
package/cloud/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./cloudProceduralTexture.js";
1
+ export * from "./cloudProceduralTexture.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1,44 +1,44 @@
1
- import { Vector2 } from "@babylonjs/core/Maths/math.vector.js";
2
- import { Color3 } from "@babylonjs/core/Maths/math.color.js";
3
- import { Texture } from "@babylonjs/core/Materials/Textures/texture.js";
4
- import { ProceduralTexture } from "@babylonjs/core/Materials/Textures/Procedurals/proceduralTexture.js";
5
- import { Scene } from "@babylonjs/core/scene.js";
6
- import { Nullable } from "@babylonjs/core/types.js";
7
- import "./fireProceduralTexture.fragment";
8
- export declare class FireProceduralTexture extends ProceduralTexture {
9
- private _time;
10
- private _speed;
11
- private _autoGenerateTime;
12
- private _fireColors;
13
- private _alphaThreshold;
14
- constructor(name: string, size: number, scene?: Nullable<Scene>, fallbackTexture?: Texture, generateMipMaps?: boolean);
15
- updateShaderUniforms(): void;
16
- render(useCameraPostProcess?: boolean): void;
17
- static get PurpleFireColors(): Color3[];
18
- static get GreenFireColors(): Color3[];
19
- static get RedFireColors(): Color3[];
20
- static get BlueFireColors(): Color3[];
21
- get autoGenerateTime(): boolean;
22
- set autoGenerateTime(value: boolean);
23
- get fireColors(): Color3[];
24
- set fireColors(value: Color3[]);
25
- get time(): number;
26
- set time(value: number);
27
- get speed(): Vector2;
28
- set speed(value: Vector2);
29
- get alphaThreshold(): number;
30
- set alphaThreshold(value: number);
31
- /**
32
- * Serializes this fire procedural texture
33
- * @returns a serialized fire procedural texture object
34
- */
35
- serialize(): any;
36
- /**
37
- * Creates a Fire Procedural Texture from parsed fire procedural texture data
38
- * @param parsedTexture defines parsed texture data
39
- * @param scene defines the current scene
40
- * @param rootUrl defines the root URL containing fire procedural texture information
41
- * @returns a parsed Fire Procedural Texture
42
- */
43
- static Parse(parsedTexture: any, scene: Scene, rootUrl: string): FireProceduralTexture;
44
- }
1
+ import { Vector2 } from "@babylonjs/core/Maths/math.vector.js";
2
+ import { Color3 } from "@babylonjs/core/Maths/math.color.js";
3
+ import type { Texture } from "@babylonjs/core/Materials/Textures/texture.js";
4
+ import { ProceduralTexture } from "@babylonjs/core/Materials/Textures/Procedurals/proceduralTexture.js";
5
+ import type { Scene } from "@babylonjs/core/scene.js";
6
+ import type { Nullable } from "@babylonjs/core/types.js";
7
+ import "./fireProceduralTexture.fragment";
8
+ export declare class FireProceduralTexture extends ProceduralTexture {
9
+ private _time;
10
+ private _speed;
11
+ private _autoGenerateTime;
12
+ private _fireColors;
13
+ private _alphaThreshold;
14
+ constructor(name: string, size: number, scene?: Nullable<Scene>, fallbackTexture?: Texture, generateMipMaps?: boolean);
15
+ updateShaderUniforms(): void;
16
+ render(useCameraPostProcess?: boolean): void;
17
+ static get PurpleFireColors(): Color3[];
18
+ static get GreenFireColors(): Color3[];
19
+ static get RedFireColors(): Color3[];
20
+ static get BlueFireColors(): Color3[];
21
+ get autoGenerateTime(): boolean;
22
+ set autoGenerateTime(value: boolean);
23
+ get fireColors(): Color3[];
24
+ set fireColors(value: Color3[]);
25
+ get time(): number;
26
+ set time(value: number);
27
+ get speed(): Vector2;
28
+ set speed(value: Vector2);
29
+ get alphaThreshold(): number;
30
+ set alphaThreshold(value: number);
31
+ /**
32
+ * Serializes this fire procedural texture
33
+ * @returns a serialized fire procedural texture object
34
+ */
35
+ serialize(): any;
36
+ /**
37
+ * Creates a Fire Procedural Texture from parsed fire procedural texture data
38
+ * @param parsedTexture defines parsed texture data
39
+ * @param scene defines the current scene
40
+ * @param rootUrl defines the root URL containing fire procedural texture information
41
+ * @returns a parsed Fire Procedural Texture
42
+ */
43
+ static Parse(parsedTexture: any, scene: Scene, rootUrl: string): FireProceduralTexture;
44
+ }
@@ -1,5 +1,5 @@
1
- /** @hidden */
2
- export declare const fireProceduralTexturePixelShader: {
3
- name: string;
4
- shader: string;
5
- };
1
+ /** @hidden */
2
+ export declare const fireProceduralTexturePixelShader: {
3
+ name: string;
4
+ shader: string;
5
+ };
@@ -1,9 +1,9 @@
1
- // Do not edit.
2
- import { ShaderStore } from "@babylonjs/core/Engines/shaderStore.js";
3
- var name = "fireProceduralTexturePixelShader";
4
- var shader = "precision highp float;uniform float time;uniform vec3 c1;uniform vec3 c2;uniform vec3 c3;uniform vec3 c4;uniform vec3 c5;uniform vec3 c6;uniform vec2 speed;uniform float shift;uniform float alphaThreshold;varying vec2 vUV;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}\nfloat noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}\nfloat fbm(vec2 n) {float total=0.0,amplitude=1.0;for (int i=0; i<4; i++) {total+=noise(n)*amplitude;n+=n;amplitude*=0.5;}\nreturn total;}\nvoid main() {vec2 p=vUV*8.0;float q=fbm(p-time*0.1);vec2 r=vec2(fbm(p+q+time*speed.x-p.x-p.y),fbm(p+q-time*speed.y));vec3 c=mix(c1,c2,fbm(p+r))+mix(c3,c4,r.x)-mix(c5,c6,r.y);vec3 color=c*cos(shift*vUV.y);float luminance=dot(color.rgb,vec3(0.3,0.59,0.11));gl_FragColor=vec4(color,luminance*alphaThreshold+(1.0-alphaThreshold));}";
5
- // Sideeffect
6
- ShaderStore.ShadersStore[name] = shader;
7
- /** @hidden */
8
- export var fireProceduralTexturePixelShader = { name: name, shader: shader };
1
+ // Do not edit.
2
+ import { ShaderStore } from "@babylonjs/core/Engines/shaderStore.js";
3
+ var name = "fireProceduralTexturePixelShader";
4
+ var shader = "precision highp float;uniform float time;uniform vec3 c1;uniform vec3 c2;uniform vec3 c3;uniform vec3 c4;uniform vec3 c5;uniform vec3 c6;uniform vec2 speed;uniform float shift;uniform float alphaThreshold;varying vec2 vUV;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}\nfloat noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}\nfloat fbm(vec2 n) {float total=0.0,amplitude=1.0;for (int i=0; i<4; i++) {total+=noise(n)*amplitude;n+=n;amplitude*=0.5;}\nreturn total;}\nvoid main() {vec2 p=vUV*8.0;float q=fbm(p-time*0.1);vec2 r=vec2(fbm(p+q+time*speed.x-p.x-p.y),fbm(p+q-time*speed.y));vec3 c=mix(c1,c2,fbm(p+r))+mix(c3,c4,r.x)-mix(c5,c6,r.y);vec3 color=c*cos(shift*vUV.y);float luminance=dot(color.rgb,vec3(0.3,0.59,0.11));gl_FragColor=vec4(color,luminance*alphaThreshold+(1.0-alphaThreshold));}";
5
+ // Sideeffect
6
+ ShaderStore.ShadersStore[name] = shader;
7
+ /** @hidden */
8
+ export var fireProceduralTexturePixelShader = { name: name, shader: shader };
9
9
  //# sourceMappingURL=fireProceduralTexture.fragment.js.map