@babylonjs/procedural-textures 7.34.4 → 7.35.1
Sign up to get free protection for your applications and to get access to all the features.
- package/fire/fireProceduralTexture.js.map +1 -1
- package/grass/grassProceduralTexture.js.map +1 -1
- package/legacy/legacy-brick.js.map +1 -1
- package/legacy/legacy-cloud.js.map +1 -1
- package/legacy/legacy-fire.js.map +1 -1
- package/legacy/legacy-grass.js.map +1 -1
- package/legacy/legacy-marble.js.map +1 -1
- package/legacy/legacy-normalMap.js.map +1 -1
- package/legacy/legacy-perlinNoise.js.map +1 -1
- package/legacy/legacy-road.js.map +1 -1
- package/legacy/legacy-starfield.js.map +1 -1
- package/legacy/legacy-wood.js.map +1 -1
- package/legacy/legacy.js.map +1 -1
- package/normalMap/normalMapProceduralTexture.js.map +1 -1
- package/package.json +2 -2
- package/perlinNoise/perlinNoiseProceduralTexture.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fireProceduralTexture.js","sourceRoot":"","sources":["../../../../dev/proceduralTextures/src/fire/fireProceduralTexture.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,2CAA6B;AACrE,OAAO,EAAE,mBAAmB,EAAE,yDAA2C;AACzE,OAAO,EAAE,OAAO,EAAE,6CAA+B;AACjD,OAAO,EAAE,MAAM,EAAE,4CAA8B;AAE/C,OAAO,EAAE,iBAAiB,EAAE,4EAA8D;AAE1F,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAGpD,OAAO,kCAAkC,CAAC;AAE1C,MAAM,OAAO,qBAAsB,SAAQ,iBAAiB;IAOxD,YAAY,IAAY,EAAE,IAAY,EAAE,QAAyB,IAAI,EAAE,eAAyB,EAAE,eAAyB;QACvH,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;QAPhF,UAAK,GAAW,GAAG,CAAC;QACpB,WAAM,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,GAAG,CAA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AAC,CAAC,CAAC,CAAC;SAC9D;QAED,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC;QAE5B,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAvFG;IADC,SAAS,EAAE;6DAGX;AAgBD;IADC,SAAS,EAAE;iDAGX;AAQD;IADC,kBAAkB,EAAE;kDAGpB;AAQD;IADC,SAAS,EAAE;2DAGX;AAiDL,aAAa,CAAC,+BAA+B,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["import { serialize, serializeAsVector2 } from \"core/Misc/decorators\";\r\nimport { SerializationHelper } from \"core/Misc/decorators.serialization\";\r\nimport { Vector2 } from \"core/Maths/math.vector\";\r\nimport { Color3 } 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 \"./fireProceduralTexture.fragment\";\r\n\r\nexport class FireProceduralTexture extends ProceduralTexture {\r\n private _time: number = 0.0;\r\n private _speed = new Vector2(0.5, 0.3);\r\n private _autoGenerateTime: boolean = true;\r\n private _fireColors: Color3[];\r\n private _alphaThreshold: number = 0.5;\r\n\r\n constructor(name: string, size: number, scene: Nullable<Scene> = null, fallbackTexture?: Texture, generateMipMaps?: boolean) {\r\n super(name, size, \"fireProceduralTexture\", scene, fallbackTexture, generateMipMaps);\r\n this._fireColors = FireProceduralTexture.RedFireColors;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n public updateShaderUniforms() {\r\n this.setFloat(\"time\", this._time);\r\n this.setVector2(\"speed\", this._speed);\r\n this.setColor3(\"c1\", this._fireColors[0]);\r\n this.setColor3(\"c2\", this._fireColors[1]);\r\n this.setColor3(\"c3\", this._fireColors[2]);\r\n this.setColor3(\"c4\", this._fireColors[3]);\r\n this.setColor3(\"c5\", this._fireColors[4]);\r\n this.setColor3(\"c6\", this._fireColors[5]);\r\n this.setFloat(\"alphaThreshold\", this._alphaThreshold);\r\n }\r\n\r\n public override render(useCameraPostProcess?: boolean) {\r\n const scene = this.getScene();\r\n if (this._autoGenerateTime && scene) {\r\n this._time += scene.getAnimationRatio() * 0.03;\r\n this.updateShaderUniforms();\r\n }\r\n super.render(useCameraPostProcess);\r\n }\r\n\r\n public static get PurpleFireColors(): Color3[] {\r\n return [new Color3(0.5, 0.0, 1.0), new Color3(0.9, 0.0, 1.0), new Color3(0.2, 0.0, 1.0), new Color3(1.0, 0.9, 1.0), new Color3(0.1, 0.1, 1.0), new Color3(0.9, 0.9, 1.0)];\r\n }\r\n\r\n public static get GreenFireColors(): Color3[] {\r\n return [new Color3(0.5, 1.0, 0.0), new Color3(0.5, 1.0, 0.0), new Color3(0.3, 0.4, 0.0), new Color3(0.5, 1.0, 0.0), new Color3(0.2, 0.0, 0.0), new Color3(0.5, 1.0, 0.0)];\r\n }\r\n\r\n public static get RedFireColors(): Color3[] {\r\n return [new Color3(0.5, 0.0, 0.1), new Color3(0.9, 0.0, 0.0), new Color3(0.2, 0.0, 0.0), new Color3(1.0, 0.9, 0.0), new Color3(0.1, 0.1, 0.1), new Color3(0.9, 0.9, 0.9)];\r\n }\r\n\r\n public static get BlueFireColors(): Color3[] {\r\n return [new Color3(0.1, 0.0, 0.5), new Color3(0.0, 0.0, 0.5), new Color3(0.1, 0.0, 0.2), new Color3(0.0, 0.0, 1.0), new Color3(0.1, 0.2, 0.3), new Color3(0.0, 0.2, 0.9)];\r\n }\r\n\r\n @serialize()\r\n public get autoGenerateTime(): boolean {\r\n return this._autoGenerateTime;\r\n }\r\n\r\n public set autoGenerateTime(value: boolean) {\r\n this._autoGenerateTime = value;\r\n }\r\n\r\n public get fireColors(): Color3[] {\r\n return this._fireColors;\r\n }\r\n\r\n public set fireColors(value: Color3[]) {\r\n this._fireColors = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serialize()\r\n public get time(): number {\r\n return this._time;\r\n }\r\n\r\n public set time(value: number) {\r\n this._time = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serializeAsVector2()\r\n public get speed(): Vector2 {\r\n return this._speed;\r\n }\r\n\r\n public set speed(value: Vector2) {\r\n this._speed = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serialize()\r\n public get alphaThreshold(): number {\r\n return this._alphaThreshold;\r\n }\r\n\r\n public set alphaThreshold(value: number) {\r\n this._alphaThreshold = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n /**\r\n * Serializes this fire procedural texture\r\n * @returns a serialized fire procedural texture object\r\n */\r\n public override serialize(): any {\r\n const serializationObject = SerializationHelper.Serialize(this, super.serialize());\r\n serializationObject.customType = \"BABYLON.FireProceduralTexture\";\r\n\r\n serializationObject.fireColors = [];\r\n for (let i = 0; i < this._fireColors.length; i++) {\r\n serializationObject.fireColors.push(this._fireColors[i].asArray());\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Creates a Fire Procedural Texture from parsed fire 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 fire procedural texture information\r\n * @returns a parsed Fire Procedural Texture\r\n */\r\n public static override Parse(parsedTexture: any, scene: Scene, rootUrl: string): FireProceduralTexture {\r\n const texture = SerializationHelper.Parse(\r\n () => new FireProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps),\r\n parsedTexture,\r\n scene,\r\n rootUrl\r\n );\r\n\r\n const colors: Color3[] = [];\r\n for (let i = 0; i < parsedTexture.fireColors.length; i++) {\r\n colors.push(Color3.FromArray(parsedTexture.fireColors[i]));\r\n }\r\n\r\n texture.fireColors = colors;\r\n\r\n return texture;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.FireProceduralTexture\", FireProceduralTexture);\r\n"]}
|
1
|
+
{"version":3,"file":"fireProceduralTexture.js","sourceRoot":"","sources":["../../../../dev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AAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;QACvE,CAAC;QAED,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAU,KAAK,CAAC,aAAkB,EAAE,KAAY,EAAE,OAAe;QAC1E,MAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CACrC,GAAG,EAAE,CAAC,IAAI,qBAAqB,CAAC,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,EAC1H,aAAa,EACb,KAAK,EACL,OAAO,CACV,CAAC;QAEF,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/D,CAAC;QAED,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC;QAE5B,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAvFG;IADC,SAAS,EAAE;6DAGX;AAgBD;IADC,SAAS,EAAE;iDAGX;AAQD;IADC,kBAAkB,EAAE;kDAGpB;AAQD;IADC,SAAS,EAAE;2DAGX;AAiDL,aAAa,CAAC,+BAA+B,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["import { serialize, serializeAsVector2 } from \"core/Misc/decorators\";\r\nimport { SerializationHelper } from \"core/Misc/decorators.serialization\";\r\nimport { Vector2 } from \"core/Maths/math.vector\";\r\nimport { Color3 } 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 \"./fireProceduralTexture.fragment\";\r\n\r\nexport class FireProceduralTexture extends ProceduralTexture {\r\n private _time: number = 0.0;\r\n private _speed = new Vector2(0.5, 0.3);\r\n private _autoGenerateTime: boolean = true;\r\n private _fireColors: Color3[];\r\n private _alphaThreshold: number = 0.5;\r\n\r\n constructor(name: string, size: number, scene: Nullable<Scene> = null, fallbackTexture?: Texture, generateMipMaps?: boolean) {\r\n super(name, size, \"fireProceduralTexture\", scene, fallbackTexture, generateMipMaps);\r\n this._fireColors = FireProceduralTexture.RedFireColors;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n public updateShaderUniforms() {\r\n this.setFloat(\"time\", this._time);\r\n this.setVector2(\"speed\", this._speed);\r\n this.setColor3(\"c1\", this._fireColors[0]);\r\n this.setColor3(\"c2\", this._fireColors[1]);\r\n this.setColor3(\"c3\", this._fireColors[2]);\r\n this.setColor3(\"c4\", this._fireColors[3]);\r\n this.setColor3(\"c5\", this._fireColors[4]);\r\n this.setColor3(\"c6\", this._fireColors[5]);\r\n this.setFloat(\"alphaThreshold\", this._alphaThreshold);\r\n }\r\n\r\n public override render(useCameraPostProcess?: boolean) {\r\n const scene = this.getScene();\r\n if (this._autoGenerateTime && scene) {\r\n this._time += scene.getAnimationRatio() * 0.03;\r\n this.updateShaderUniforms();\r\n }\r\n super.render(useCameraPostProcess);\r\n }\r\n\r\n public static get PurpleFireColors(): Color3[] {\r\n return [new Color3(0.5, 0.0, 1.0), new Color3(0.9, 0.0, 1.0), new Color3(0.2, 0.0, 1.0), new Color3(1.0, 0.9, 1.0), new Color3(0.1, 0.1, 1.0), new Color3(0.9, 0.9, 1.0)];\r\n }\r\n\r\n public static get GreenFireColors(): Color3[] {\r\n return [new Color3(0.5, 1.0, 0.0), new Color3(0.5, 1.0, 0.0), new Color3(0.3, 0.4, 0.0), new Color3(0.5, 1.0, 0.0), new Color3(0.2, 0.0, 0.0), new Color3(0.5, 1.0, 0.0)];\r\n }\r\n\r\n public static get RedFireColors(): Color3[] {\r\n return [new Color3(0.5, 0.0, 0.1), new Color3(0.9, 0.0, 0.0), new Color3(0.2, 0.0, 0.0), new Color3(1.0, 0.9, 0.0), new Color3(0.1, 0.1, 0.1), new Color3(0.9, 0.9, 0.9)];\r\n }\r\n\r\n public static get BlueFireColors(): Color3[] {\r\n return [new Color3(0.1, 0.0, 0.5), new Color3(0.0, 0.0, 0.5), new Color3(0.1, 0.0, 0.2), new Color3(0.0, 0.0, 1.0), new Color3(0.1, 0.2, 0.3), new Color3(0.0, 0.2, 0.9)];\r\n }\r\n\r\n @serialize()\r\n public get autoGenerateTime(): boolean {\r\n return this._autoGenerateTime;\r\n }\r\n\r\n public set autoGenerateTime(value: boolean) {\r\n this._autoGenerateTime = value;\r\n }\r\n\r\n public get fireColors(): Color3[] {\r\n return this._fireColors;\r\n }\r\n\r\n public set fireColors(value: Color3[]) {\r\n this._fireColors = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serialize()\r\n public get time(): number {\r\n return this._time;\r\n }\r\n\r\n public set time(value: number) {\r\n this._time = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serializeAsVector2()\r\n public get speed(): Vector2 {\r\n return this._speed;\r\n }\r\n\r\n public set speed(value: Vector2) {\r\n this._speed = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serialize()\r\n public get alphaThreshold(): number {\r\n return this._alphaThreshold;\r\n }\r\n\r\n public set alphaThreshold(value: number) {\r\n this._alphaThreshold = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n /**\r\n * Serializes this fire procedural texture\r\n * @returns a serialized fire procedural texture object\r\n */\r\n public override serialize(): any {\r\n const serializationObject = SerializationHelper.Serialize(this, super.serialize());\r\n serializationObject.customType = \"BABYLON.FireProceduralTexture\";\r\n\r\n serializationObject.fireColors = [];\r\n for (let i = 0; i < this._fireColors.length; i++) {\r\n serializationObject.fireColors.push(this._fireColors[i].asArray());\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Creates a Fire Procedural Texture from parsed fire 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 fire procedural texture information\r\n * @returns a parsed Fire Procedural Texture\r\n */\r\n public static override Parse(parsedTexture: any, scene: Scene, rootUrl: string): FireProceduralTexture {\r\n const texture = SerializationHelper.Parse(\r\n () => new FireProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps),\r\n parsedTexture,\r\n scene,\r\n rootUrl\r\n );\r\n\r\n const colors: Color3[] = [];\r\n for (let i = 0; i < parsedTexture.fireColors.length; i++) {\r\n colors.push(Color3.FromArray(parsedTexture.fireColors[i]));\r\n }\r\n\r\n texture.fireColors = colors;\r\n\r\n return texture;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.FireProceduralTexture\", FireProceduralTexture);\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"grassProceduralTexture.js","sourceRoot":"","sources":["../../../../dev/proceduralTextures/src/grass/grassProceduralTexture.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,2CAA6B;AACzD,OAAO,EAAE,mBAAmB,EAAE,yDAA2C;AACzE,OAAO,EAAE,MAAM,EAAE,4CAA8B;AAE/C,OAAO,EAAE,iBAAiB,EAAE,4EAA8D;AAE1F,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAGpD,OAAO,mCAAmC,CAAC;AAE3C,MAAM,OAAO,sBAAuB,SAAQ,iBAAiB;IAIzD,YAAY,IAAY,EAAE,IAAY,EAAE,QAAyB,IAAI,EAAE,eAAyB,EAAE,eAAyB;QACvH,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;QAHjF,iBAAY,GAAG,IAAI,MAAM,CAAC,CAAC,EA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CAAC,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,EAC3H,aAAa,EACb,KAAK,EACL,OAAO,CACV,CAAC;QAEF,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACxD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChE,CAAC;QAED,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC;QAE7B,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAjDG;IADC,iBAAiB,EAAE;yDAGnB;AAiDL,aAAa,CAAC,gCAAgC,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import { serializeAsColor3 } from \"core/Misc/decorators\";\r\nimport { SerializationHelper } from \"core/Misc/decorators.serialization\";\r\nimport { Color3 } 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 \"./grassProceduralTexture.fragment\";\r\n\r\nexport class GrassProceduralTexture extends ProceduralTexture {\r\n private _grassColors: Color3[];\r\n private _groundColor = new Color3(1, 1, 1);\r\n\r\n constructor(name: string, size: number, scene: Nullable<Scene> = null, fallbackTexture?: Texture, generateMipMaps?: boolean) {\r\n super(name, size, \"grassProceduralTexture\", scene, fallbackTexture, generateMipMaps);\r\n\r\n this._grassColors = [new Color3(0.29, 0.38, 0.02), new Color3(0.36, 0.49, 0.09), new Color3(0.51, 0.6, 0.28)];\r\n\r\n this.updateShaderUniforms();\r\n }\r\n\r\n public updateShaderUniforms() {\r\n this.setColor3(\"herb1Color\", this._grassColors[0]);\r\n this.setColor3(\"herb2Color\", this._grassColors[1]);\r\n this.setColor3(\"herb3Color\", this._grassColors[2]);\r\n this.setColor3(\"groundColor\", this._groundColor);\r\n }\r\n\r\n public get grassColors(): Color3[] {\r\n return this._grassColors;\r\n }\r\n\r\n public set grassColors(value: Color3[]) {\r\n this._grassColors = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serializeAsColor3()\r\n public get groundColor(): Color3 {\r\n return this._groundColor;\r\n }\r\n\r\n public set groundColor(value: Color3) {\r\n this._groundColor = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n /**\r\n * Serializes this grass procedural texture\r\n * @returns a serialized grass procedural texture object\r\n */\r\n public override serialize(): any {\r\n const serializationObject = SerializationHelper.Serialize(this, super.serialize());\r\n serializationObject.customType = \"BABYLON.GrassProceduralTexture\";\r\n\r\n serializationObject.grassColors = [];\r\n for (let i = 0; i < this._grassColors.length; i++) {\r\n serializationObject.grassColors.push(this._grassColors[i].asArray());\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Creates a Grass Procedural Texture from parsed grass 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 grass procedural texture information\r\n * @returns a parsed Grass Procedural Texture\r\n */\r\n public static override Parse(parsedTexture: any, scene: Scene, rootUrl: string): GrassProceduralTexture {\r\n const texture = SerializationHelper.Parse(\r\n () => new GrassProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps),\r\n parsedTexture,\r\n scene,\r\n rootUrl\r\n );\r\n\r\n const colors: Color3[] = [];\r\n for (let i = 0; i < parsedTexture.grassColors.length; i++) {\r\n colors.push(Color3.FromArray(parsedTexture.grassColors[i]));\r\n }\r\n\r\n texture.grassColors = colors;\r\n\r\n return texture;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GrassProceduralTexture\", GrassProceduralTexture);\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-brick.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-brick.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,0BAAwC;AAErE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"legacy-brick.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-brick.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,0BAAwC;AAErE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAC5B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,iBAAkB,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;AACL,CAAC;AAED,kCAAgD","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nimport * as proceduralTexture from \"procedural-textures/brick/index\";\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof globalObject !== \"undefined\") {\r\n for (const key in proceduralTexture) {\r\n (<any>globalObject).BABYLON[key] = (<any>proceduralTexture)[key];\r\n }\r\n}\r\n\r\nexport * from \"procedural-textures/brick/index\";\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-cloud.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-cloud.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,0BAAwC;AAErE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"legacy-cloud.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-cloud.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,0BAAwC;AAErE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAC5B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,iBAAkB,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;AACL,CAAC;AAED,kCAAgD","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nimport * as proceduralTexture from \"procedural-textures/cloud/index\";\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof globalObject !== \"undefined\") {\r\n for (const key in proceduralTexture) {\r\n (<any>globalObject).BABYLON[key] = (<any>proceduralTexture)[key];\r\n }\r\n}\r\n\r\nexport * from \"procedural-textures/cloud/index\";\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-fire.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-fire.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,yBAAuC;AAEpE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"legacy-fire.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-fire.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,yBAAuC;AAEpE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAC5B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,iBAAkB,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;AACL,CAAC;AAED,iCAA+C","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nimport * as proceduralTexture from \"procedural-textures/fire/index\";\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof globalObject !== \"undefined\") {\r\n for (const key in proceduralTexture) {\r\n (<any>globalObject).BABYLON[key] = (<any>proceduralTexture)[key];\r\n }\r\n}\r\n\r\nexport * from \"procedural-textures/fire/index\";\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-grass.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-grass.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,0BAAwC;AAErE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"legacy-grass.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-grass.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,0BAAwC;AAErE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAC5B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,iBAAkB,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;AACL,CAAC;AAED,kCAAgD","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nimport * as proceduralTexture from \"procedural-textures/grass/index\";\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof globalObject !== \"undefined\") {\r\n for (const key in proceduralTexture) {\r\n (<any>globalObject).BABYLON[key] = (<any>proceduralTexture)[key];\r\n }\r\n}\r\n\r\nexport * from \"procedural-textures/grass/index\";\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-marble.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-marble.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,2BAAyC;AAEtE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"legacy-marble.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-marble.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,2BAAyC;AAEtE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAC5B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,iBAAkB,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;AACL,CAAC;AAED,mCAAiD","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nimport * as proceduralTexture from \"procedural-textures/marble/index\";\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof globalObject !== \"undefined\") {\r\n for (const key in proceduralTexture) {\r\n (<any>globalObject).BABYLON[key] = (<any>proceduralTexture)[key];\r\n }\r\n}\r\n\r\nexport * from \"procedural-textures/marble/index\";\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-normalMap.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-normalMap.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,8BAA4C;AAEzE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"legacy-normalMap.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-normalMap.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,8BAA4C;AAEzE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAC5B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,iBAAkB,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;AACL,CAAC;AAED,sCAAoD","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nimport * as proceduralTexture from \"procedural-textures/normalMap/index\";\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof globalObject !== \"undefined\") {\r\n for (const key in proceduralTexture) {\r\n (<any>globalObject).BABYLON[key] = (<any>proceduralTexture)[key];\r\n }\r\n}\r\n\r\nexport * from \"procedural-textures/normalMap/index\";\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-perlinNoise.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-perlinNoise.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,gCAA8C;AAE3E;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"legacy-perlinNoise.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-perlinNoise.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,gCAA8C;AAE3E;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAC5B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,iBAAkB,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;AACL,CAAC;AAED,wCAAsD","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nimport * as proceduralTexture from \"procedural-textures/perlinNoise/index\";\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof globalObject !== \"undefined\") {\r\n for (const key in proceduralTexture) {\r\n (<any>globalObject).BABYLON[key] = (<any>proceduralTexture)[key];\r\n }\r\n}\r\n\r\nexport * from \"procedural-textures/perlinNoise/index\";\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-road.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-road.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,yBAAuC;AAEpE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"legacy-road.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-road.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,yBAAuC;AAEpE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAC5B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,iBAAkB,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;AACL,CAAC;AAED,iCAA+C","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nimport * as proceduralTexture from \"procedural-textures/road/index\";\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof globalObject !== \"undefined\") {\r\n for (const key in proceduralTexture) {\r\n (<any>globalObject).BABYLON[key] = (<any>proceduralTexture)[key];\r\n }\r\n}\r\n\r\nexport * from \"procedural-textures/road/index\";\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-starfield.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-starfield.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,8BAA4C;AAEzE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"legacy-starfield.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-starfield.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,8BAA4C;AAEzE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAC5B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,iBAAkB,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;AACL,CAAC;AAED,sCAAoD","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nimport * as proceduralTexture from \"procedural-textures/starfield/index\";\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof globalObject !== \"undefined\") {\r\n for (const key in proceduralTexture) {\r\n (<any>globalObject).BABYLON[key] = (<any>proceduralTexture)[key];\r\n }\r\n}\r\n\r\nexport * from \"procedural-textures/starfield/index\";\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy-wood.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-wood.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,yBAAuC;AAEpE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"legacy-wood.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy-wood.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,yBAAuC;AAEpE;;;GAGG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAC5B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,iBAAkB,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;AACL,CAAC;AAED,iCAA+C","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nimport * as proceduralTexture from \"procedural-textures/wood/index\";\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof globalObject !== \"undefined\") {\r\n for (const key in proceduralTexture) {\r\n (<any>globalObject).BABYLON[key] = (<any>proceduralTexture)[key];\r\n }\r\n}\r\n\r\nexport * from \"procedural-textures/wood/index\";\r\n"]}
|
package/legacy/legacy.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"legacy.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,qBAAqB,oBAAkC;AAEnE;;;;;GAKG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"legacy.js","sourceRoot":"","sources":["../../../../lts/proceduralTextures/src/legacy/legacy.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,KAAK,qBAAqB,oBAAkC;AAEnE;;;;;GAKG;AACH,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACjH,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IAChC,YAAa,CAAC,OAAO,GAAS,YAAa,CAAC,OAAO,IAAI,EAAE,CAAC;IAChE,KAAK,MAAM,GAAG,IAAI,qBAAqB,EAAE,CAAC;QAChC,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,qBAAsB,CAAC,GAAG,CAAC,CAAC;IACzE,CAAC;AACL,CAAC;AAED,4BAA0C","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nimport * as ProceduralTexturesLib from \"procedural-textures/index\";\r\n\r\n/**\r\n * Legacy support, defining window.BABYLON.GridMaterial... (global variable).\r\n *\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof globalObject !== \"undefined\") {\r\n (<any>globalObject).BABYLON = (<any>globalObject).BABYLON || {};\r\n for (const mat in ProceduralTexturesLib) {\r\n (<any>globalObject).BABYLON[mat] = (<any>ProceduralTexturesLib)[mat];\r\n }\r\n}\r\n\r\nexport * from \"procedural-textures/index\";\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"normalMapProceduralTexture.js","sourceRoot":"","sources":["../../../../dev/proceduralTextures/src/normalMap/normalMapProceduralTexture.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,2CAA6B;AAC1D,OAAO,EAAE,mBAAmB,EAAE,yDAA2C;AAEzE,OAAO,EAAE,iBAAiB,EAAE,4EAA8D;AAE1F,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAEpD,OAAO,uCAAuC,CAAC;AAE/C,MAAM,OAAO,0BAA2B,SAAQ,iBAAiB;IAG7D,YAAY,IAAY,EAAE,IAAY,EAAE,QAAyB,IAAI,EAAE,eAAyB,EAAE,eAAyB;QACvH,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,4BAA4B,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;QACzF,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAChC,CAAC;IAEM,oBAAoB;QACvB,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAY,CAAC,CAAC;IAC1D,CAAC;IAEe,MAAM,CAAC,oBAA8B;QACjD,KAAK,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACvC,CAAC;IAEe,MAAM,CAAC,IAAS,EAAE,eAAoB;QAClD,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAEpC,uCAAuC;QACvC,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAChC,CAAC;IAEe,OAAO;QACnB,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE;
|
1
|
+
{"version":3,"file":"normalMapProceduralTexture.js","sourceRoot":"","sources":["../../../../dev/proceduralTextures/src/normalMap/normalMapProceduralTexture.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,2CAA6B;AAC1D,OAAO,EAAE,mBAAmB,EAAE,yDAA2C;AAEzE,OAAO,EAAE,iBAAiB,EAAE,4EAA8D;AAE1F,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAEpD,OAAO,uCAAuC,CAAC;AAE/C,MAAM,OAAO,0BAA2B,SAAQ,iBAAiB;IAG7D,YAAY,IAAY,EAAE,IAAY,EAAE,QAAyB,IAAI,EAAE,eAAyB,EAAE,eAAyB;QACvH,KAAK,CAAC,IAAI,EAAE,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AC1E,MAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CACrC,GAAG,EAAE,CAAC,IAAI,0BAA0B,CAAC,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,EAC/H,aAAa,EACb,KAAK,EACL,OAAO,CACV,CAAC;QAEF,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AArCG;IADC,kBAAkB,EAAE;6DAGpB;AAqCL,aAAa,CAAC,oCAAoC,EAAE,0BAA0B,CAAC,CAAC","sourcesContent":["import { serializeAsTexture } from \"core/Misc/decorators\";\r\nimport { SerializationHelper } from \"core/Misc/decorators.serialization\";\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\nimport \"./normalMapProceduralTexture.fragment\";\r\n\r\nexport class NormalMapProceduralTexture extends ProceduralTexture {\r\n private _baseTexture: Texture;\r\n\r\n constructor(name: string, size: number, scene: Nullable<Scene> = null, fallbackTexture?: Texture, generateMipMaps?: boolean) {\r\n super(name, size, \"normalMapProceduralTexture\", scene, fallbackTexture, generateMipMaps);\r\n this.updateShaderUniforms();\r\n }\r\n\r\n public updateShaderUniforms() {\r\n this.setTexture(\"baseSampler\", this._baseTexture);\r\n this.setFloat(\"size\", this.getRenderSize() as number);\r\n }\r\n\r\n public override render(useCameraPostProcess?: boolean) {\r\n super.render(useCameraPostProcess);\r\n }\r\n\r\n public override resize(size: any, generateMipMaps: any): void {\r\n super.resize(size, generateMipMaps);\r\n\r\n // We need to update the \"size\" uniform\r\n this.updateShaderUniforms();\r\n }\r\n\r\n public override isReady(): boolean {\r\n if (!this._baseTexture || !this._baseTexture.isReady()) {\r\n return false;\r\n }\r\n\r\n return super.isReady();\r\n }\r\n\r\n @serializeAsTexture()\r\n public get baseTexture(): Texture {\r\n return this._baseTexture;\r\n }\r\n\r\n public set baseTexture(texture: Texture) {\r\n this._baseTexture = texture;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n /**\r\n * Serializes this normal map procedural texture\r\n * @returns a serialized normal map procedural texture object\r\n */\r\n public override serialize(): any {\r\n const serializationObject = SerializationHelper.Serialize(this, super.serialize());\r\n serializationObject.customType = \"BABYLON.NormalMapProceduralTexture\";\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Creates a Normal Map Procedural Texture from parsed normal map 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 normal map procedural texture information\r\n * @returns a parsed Normal Map Procedural Texture\r\n */\r\n public static override Parse(parsedTexture: any, scene: Scene, rootUrl: string): NormalMapProceduralTexture {\r\n const texture = SerializationHelper.Parse(\r\n () => new NormalMapProceduralTexture(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.NormalMapProceduralTexture\", NormalMapProceduralTexture);\r\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@babylonjs/procedural-textures",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.35.1",
|
4
4
|
"main": "index.js",
|
5
5
|
"module": "index.js",
|
6
6
|
"types": "index.d.ts",
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"postcompile": "build-tools -c add-js-to-es6"
|
19
19
|
},
|
20
20
|
"devDependencies": {
|
21
|
-
"@babylonjs/core": "^7.
|
21
|
+
"@babylonjs/core": "^7.35.1",
|
22
22
|
"@dev/build-tools": "^1.0.0",
|
23
23
|
"@lts/procedural-textures": "^1.0.0"
|
24
24
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"perlinNoiseProceduralTexture.js","sourceRoot":"","sources":["../../../../dev/proceduralTextures/src/perlinNoise/perlinNoiseProceduralTexture.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,2CAA6B;AACjD,OAAO,EAAE,mBAAmB,EAAE,yDAA2C;AAEzE,OAAO,EAAE,iBAAiB,EAAE,4EAA8D;AAE1F,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAEpD,OAAO,yCAAyC,CAAC;AAEjD,MAAM,OAAO,4BAA6B,SAAQ,iBAAiB;IAY/D,YAAY,IAAY,EAAE,IAAY,EAAE,QAAyB,IAAI,EAAE,eAAyB,EAAE,eAAyB;QACvH,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,8BAA8B,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;QAXxF,SAAI,GAAW,GAAG,CAAC;QAGnB,cAAS,GAAW,GAAG,CAAC;QAGxB,qBAAgB,GAAW,GAAG,CAAC;QAE9B,wBAAmB,GAAW,CAAC,CAAC;QAIpC,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAChC,CAAC;IAEM,oBAAoB;QACvB,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAY,CAAC,CAAC;QAEtD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAE9B,IAAI,CAAC,KAAK,EAAE;
|
1
|
+
{"version":3,"file":"perlinNoiseProceduralTexture.js","sourceRoot":"","sources":["../../../../dev/proceduralTextures/src/perlinNoise/perlinNoiseProceduralTexture.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,2CAA6B;AACjD,OAAO,EAAE,mBAAmB,EAAE,yDAA2C;AAEzE,OAAO,EAAE,iBAAiB,EAAE,4EAA8D;AAE1F,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAEpD,OAAO,yCAAyC,CAAC;AAEjD,MAAM,OAAO,4BAA6B,SAAQ,iBAAiB;IA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OAGG;IACa,SAAS;QACrB,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;QACnF,mBAAmB,CAAC,UAAU,GAAG,sCAAsC,CAAC;QAExE,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAU,KAAK,CAAC,aAAkB,EAAE,KAAY,EAAE,OAAe;QAC1E,MAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CACrC,GAAG,EAAE,CAAC,IAAI,4BAA4B,CAAC,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,EACjI,aAAa,EACb,KAAK,EACL,OAAO,CACV,CAAC;QAEF,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AArEU;IADN,SAAS,EAAE;0DACc;AAGnB;IADN,SAAS,EAAE;+DACmB;AAGxB;IADN,SAAS,EAAE;sEAC0B;AAiE1C,aAAa,CAAC,sCAAsC,EAAE,4BAA4B,CAAC,CAAC","sourcesContent":["import { serialize } from \"core/Misc/decorators\";\r\nimport { SerializationHelper } from \"core/Misc/decorators.serialization\";\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\nimport \"./perlinNoiseProceduralTexture.fragment\";\r\n\r\nexport class PerlinNoiseProceduralTexture extends ProceduralTexture {\r\n @serialize()\r\n public time: number = 0.0;\r\n\r\n @serialize()\r\n public timeScale: number = 1.0;\r\n\r\n @serialize()\r\n public translationSpeed: number = 1.0;\r\n\r\n private _currentTranslation: number = 0;\r\n\r\n constructor(name: string, size: number, scene: Nullable<Scene> = null, fallbackTexture?: Texture, generateMipMaps?: boolean) {\r\n super(name, size, \"perlinNoiseProceduralTexture\", scene, fallbackTexture, generateMipMaps);\r\n this.updateShaderUniforms();\r\n }\r\n\r\n public updateShaderUniforms() {\r\n this.setFloat(\"size\", this.getRenderSize() as number);\r\n\r\n const scene = this.getScene();\r\n\r\n if (!scene) {\r\n return;\r\n }\r\n const deltaTime = scene.getEngine().getDeltaTime();\r\n\r\n this.time += deltaTime;\r\n this.setFloat(\"time\", (this.time * this.timeScale) / 1000);\r\n\r\n this._currentTranslation += (deltaTime * this.translationSpeed) / 1000.0;\r\n this.setFloat(\"translationSpeed\", this._currentTranslation);\r\n }\r\n\r\n public override render(useCameraPostProcess?: boolean) {\r\n this.updateShaderUniforms();\r\n super.render(useCameraPostProcess);\r\n }\r\n\r\n public override resize(size: any, generateMipMaps: any): void {\r\n super.resize(size, generateMipMaps);\r\n }\r\n\r\n /**\r\n * Serializes this perlin noise procedural texture\r\n * @returns a serialized perlin noise procedural texture object\r\n */\r\n public override serialize(): any {\r\n const serializationObject = SerializationHelper.Serialize(this, super.serialize());\r\n serializationObject.customType = \"BABYLON.PerlinNoiseProceduralTexture\";\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Creates a Perlin Noise Procedural Texture from parsed perlin noise 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 perlin noise procedural texture information\r\n * @returns a parsed Perlin Noise Procedural Texture\r\n */\r\n public static override Parse(parsedTexture: any, scene: Scene, rootUrl: string): PerlinNoiseProceduralTexture {\r\n const texture = SerializationHelper.Parse(\r\n () => new PerlinNoiseProceduralTexture(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.PerlinNoiseProceduralTexture\", PerlinNoiseProceduralTexture);\r\n"]}
|