21 lines
		
	
	
		
			769 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			769 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from lnx.logicnode.lnx_nodes import *
 | |
| 
 | |
| class FloatDeltaInterpolateNode(LnxLogicTreeNode):
 | |
|     """Linearly interpolate to a new value with specified interpolation `Rate`.
 | |
|     @input From: Value to interpolate from.
 | |
|     @input To: Value to interpolate to.
 | |
|     @input Delta Time: Delta Time.
 | |
|     @input Rate: Rate of interpolation.
 | |
|     """
 | |
|     bl_idname = 'LNFloatDeltaInterpolateNode'
 | |
|     bl_label = 'Float Delta Interpolate'
 | |
|     lnx_version = 1
 | |
| 
 | |
|     def lnx_init(self, context):
 | |
|         self.add_input('LnxFloatSocket', 'From', default_value=0.0)
 | |
|         self.add_input('LnxFloatSocket', 'To', default_value=1.0)
 | |
|         self.add_input('LnxFloatSocket', 'Delta Time')
 | |
|         self.add_input('LnxFloatSocket', 'Rate')
 | |
| 
 | |
|         self.add_output('LnxFloatSocket', 'Result')
 |