org.rajawali3d.materials / Material / getTime

getTime

open fun getTime(): Float

Sets the time value that is used in the shaders to create animated effects.


      public class MyRenderer extends Renderer
      {
      		private double mStartTime;
      		private Material mMyMaterial;
      
      		protected void initScene() {
      			mStartTime = SystemClock.elapsedRealtime();
      			...
             }
      
      		public void onDrawFrame(GL10 glUnused) {
      			super.onDrawFrame(glUnused);
      			mMyMaterial.setTime((SystemClock.elapsedRealtime() - mLastRender) / 1000d);
      			...
             }
      
      

Return
Float:

open fun getTime(): Float

Sets the time value that is used in the shaders to create animated effects.


      public class MyRenderer extends Renderer
      {
      		private double mStartTime;
      		private Material mMyMaterial;
      
      		protected void initScene() {
      			mStartTime = SystemClock.elapsedRealtime();
      			...
             }
      
      		public void onDrawFrame(GL10 glUnused) {
      			super.onDrawFrame(glUnused);
      			mMyMaterial.setTime((SystemClock.elapsedRealtime() - mLastRender) / 1000d);
      			...
             }
      
      

Return
Float: