We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0da336 commit 339b4fdCopy full SHA for 339b4fd
1 file changed
src/renderer/webgl/WebGLPipeline.js
@@ -1341,6 +1341,25 @@ var WebGLPipeline = new Class({
1341
return this.bindTexture(target.texture, unit);
1342
},
1343
1344
+ /**
1345
+ * Sets the current duration into a 1f uniform value based on the given name.
1346
+ *
1347
+ * This can be used for mapping time uniform values, such as `iTime`.
1348
1349
+ * @method Phaser.Renderer.WebGL.WebGLPipeline#setTime
1350
+ * @since 3.50.0
1351
1352
+ * @param {string} name - The name of the uniform to set.
1353
1354
+ * @return {this} This WebGLPipeline instance.
1355
+ */
1356
+ setTime: function (uniform)
1357
+ {
1358
+ this.set1f(uniform, this.game.loop.getDuration());
1359
+
1360
+ return this;
1361
+ },
1362
1363
/**
1364
* Sets a 1f uniform value based on the given name on the currently set shader.
1365
*
0 commit comments