|
@@ -226,8 +226,11 @@ var BABYLON;
|
|
|
this._skyColor = new BABYLON.Color3(0.15, 0.68, 1.0);
|
|
|
this._cloudColor = new BABYLON.Color3(1, 1, 1);
|
|
|
|
|
|
+ this.updateShaderUniforms();
|
|
|
+
|
|
|
// Use 0 to render just once, 1 to render on every frame, 2 to render every two frames and so on...
|
|
|
this.refreshRate = 0;
|
|
|
+ // https://www.shadertoy.com/view/XsjSRt
|
|
|
}
|
|
|
CloudProceduralTexture.prototype.updateShaderUniforms = function () {
|
|
|
this.setColor3("skyColor", this._skyColor);
|
|
@@ -274,5 +277,129 @@ var BABYLON;
|
|
|
return GrassProceduralTexture;
|
|
|
})(BABYLON.ProceduralTexture);
|
|
|
BABYLON.GrassProceduralTexture = GrassProceduralTexture;
|
|
|
+
|
|
|
+ var RockProceduralTexture = (function (_super) {
|
|
|
+ __extends(RockProceduralTexture, _super);
|
|
|
+ function RockProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
|
|
|
+ _super.call(this, name, size, "rock", scene, fallbackTexture, generateMipMaps);
|
|
|
+
|
|
|
+ // Use 0 to render just once, 1 to render on every frame, 2 to render every two frames and so on...
|
|
|
+ this.refreshRate = 0;
|
|
|
+ }
|
|
|
+ return RockProceduralTexture;
|
|
|
+ })(BABYLON.ProceduralTexture);
|
|
|
+ BABYLON.RockProceduralTexture = RockProceduralTexture;
|
|
|
+
|
|
|
+ var RoadProceduralTexture = (function (_super) {
|
|
|
+ __extends(RoadProceduralTexture, _super);
|
|
|
+ function RoadProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
|
|
|
+ _super.call(this, name, size, "road", scene, fallbackTexture, generateMipMaps);
|
|
|
+
|
|
|
+ // Use 0 to render just once, 1 to render on every frame, 2 to render every two frames and so on...
|
|
|
+ this.refreshRate = 0;
|
|
|
+ }
|
|
|
+ return RoadProceduralTexture;
|
|
|
+ })(BABYLON.ProceduralTexture);
|
|
|
+ BABYLON.RoadProceduralTexture = RoadProceduralTexture;
|
|
|
+
|
|
|
+ var BrickProceduralTexture = (function (_super) {
|
|
|
+ __extends(BrickProceduralTexture, _super);
|
|
|
+ function BrickProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
|
|
|
+ _super.call(this, name, size, "brick", scene, fallbackTexture, generateMipMaps);
|
|
|
+ this._numberOfBricksHeight = 15;
|
|
|
+ this._numberOfBricksWidth = 5;
|
|
|
+
|
|
|
+ this.updateShaderUniforms();
|
|
|
+
|
|
|
+ // Use 0 to render just once, 1 to render on every frame, 2 to render every two frames and so on...
|
|
|
+ this.refreshRate = 0;
|
|
|
+ }
|
|
|
+ BrickProceduralTexture.prototype.updateShaderUniforms = function () {
|
|
|
+ this.setFloat("numberOfBricksHeight", this._numberOfBricksHeight);
|
|
|
+ this.setFloat("numberOfBricksWidth", this._numberOfBricksWidth);
|
|
|
+ };
|
|
|
+
|
|
|
+ Object.defineProperty(BrickProceduralTexture.prototype, "numberOfBricksHeight", {
|
|
|
+ get: function () {
|
|
|
+ return this._numberOfBricksHeight;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+
|
|
|
+ Object.defineProperty(BrickProceduralTexture.prototype, "cloudColor", {
|
|
|
+ set: function (value) {
|
|
|
+ this._numberOfBricksHeight = value;
|
|
|
+ this.updateShaderUniforms();
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+
|
|
|
+ Object.defineProperty(BrickProceduralTexture.prototype, "numberOfBricksWidth", {
|
|
|
+ get: function () {
|
|
|
+ return this._numberOfBricksWidth;
|
|
|
+ },
|
|
|
+ set: function (value) {
|
|
|
+ this._numberOfBricksHeight = value;
|
|
|
+ this.updateShaderUniforms();
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+
|
|
|
+ return BrickProceduralTexture;
|
|
|
+ })(BABYLON.ProceduralTexture);
|
|
|
+ BABYLON.BrickProceduralTexture = BrickProceduralTexture;
|
|
|
+
|
|
|
+ var MarbleProceduralTexture = (function (_super) {
|
|
|
+ __extends(MarbleProceduralTexture, _super);
|
|
|
+ function MarbleProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
|
|
|
+ _super.call(this, name, size, "marble", scene, fallbackTexture, generateMipMaps);
|
|
|
+ this._numberOfBricksHeight = 3;
|
|
|
+ this._numberOfBricksWidth = 3;
|
|
|
+
|
|
|
+ this.updateShaderUniforms();
|
|
|
+
|
|
|
+ // Use 0 to render just once, 1 to render on every frame, 2 to render every two frames and so on...
|
|
|
+ this.refreshRate = 0;
|
|
|
+ }
|
|
|
+ MarbleProceduralTexture.prototype.updateShaderUniforms = function () {
|
|
|
+ this.setFloat("numberOfBricksHeight", this._numberOfBricksHeight);
|
|
|
+ this.setFloat("numberOfBricksWidth", this._numberOfBricksWidth);
|
|
|
+ };
|
|
|
+
|
|
|
+ Object.defineProperty(MarbleProceduralTexture.prototype, "numberOfBricksHeight", {
|
|
|
+ get: function () {
|
|
|
+ return this._numberOfBricksHeight;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+
|
|
|
+ Object.defineProperty(MarbleProceduralTexture.prototype, "cloudColor", {
|
|
|
+ set: function (value) {
|
|
|
+ this._numberOfBricksHeight = value;
|
|
|
+ this.updateShaderUniforms();
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+
|
|
|
+ Object.defineProperty(MarbleProceduralTexture.prototype, "numberOfBricksWidth", {
|
|
|
+ get: function () {
|
|
|
+ return this._numberOfBricksWidth;
|
|
|
+ },
|
|
|
+ set: function (value) {
|
|
|
+ this._numberOfBricksHeight = value;
|
|
|
+ this.updateShaderUniforms();
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+
|
|
|
+ return MarbleProceduralTexture;
|
|
|
+ })(BABYLON.ProceduralTexture);
|
|
|
+ BABYLON.MarbleProceduralTexture = MarbleProceduralTexture;
|
|
|
})(BABYLON || (BABYLON = {}));
|
|
|
//# sourceMappingURL=babylon.standardProceduralTexture.js.map
|