Added argument to freeze for setting the end frame, speed is now aware of variable framerates
This commit is contained in:
		
							parent
							
								
									f21cb21d9c
								
							
						
					
					
						commit
						e00671f0d5
					
				
					 5 changed files with 43 additions and 23 deletions
				
			
		| 
						 | 
				
			
			@ -1,12 +1,17 @@
 | 
			
		|||
const ImageCommand = require("../../classes/imageCommand.js");
 | 
			
		||||
 | 
			
		||||
class FreezeCommand extends ImageCommand {
 | 
			
		||||
  params = {
 | 
			
		||||
    loop: false
 | 
			
		||||
  };
 | 
			
		||||
  params(args) {
 | 
			
		||||
    const frameCount = parseInt(args[0]);
 | 
			
		||||
    return {
 | 
			
		||||
      loop: false,
 | 
			
		||||
      frame: isNaN(frameCount) ? -1 : frameCount
 | 
			
		||||
    };
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  static description = "Makes an image sequence only play once";
 | 
			
		||||
  static aliases = ["noloop", "once"];
 | 
			
		||||
  static arguments = ["{end frame number}"];
 | 
			
		||||
 | 
			
		||||
  static requiresGIF = true;
 | 
			
		||||
  static noImage = "you need to provide an image to freeze!";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue