85 lines
1.9 KiB
Python
Executable File
85 lines
1.9 KiB
Python
Executable File
#!/usr/bin/python3
|
|
# -*- coding: utf-8 -*-
|
|
# -*- mode: Python -*-
|
|
|
|
|
|
'''
|
|
|
|
This is the most basic generator you can imagine: straight up static!
|
|
v0.1.0
|
|
|
|
Use it to test your filters and outputs
|
|
|
|
Licensed under GNU GPLv3
|
|
|
|
by cocoa
|
|
|
|
'''
|
|
|
|
import sys
|
|
from os import path, getcwd
|
|
abspath, filename = path.split(path.realpath(__file__ ))
|
|
sys.path.insert(0, path.join(abspath,"../lib"))
|
|
from clitools import Clitools
|
|
|
|
name="generator::dummy"
|
|
|
|
|
|
import argparse
|
|
|
|
argsparser = argparse.ArgumentParser(description="dummy generator")
|
|
argsparser.add_argument("-f","--fps",help="Frame Per Second",default=30,type=int)
|
|
argsparser.add_argument("-s","--speed",help="point per frame progress",default=3,type=int)
|
|
argsparser.add_argument("-v","--verbose",action="store_true",help="Verbose output")
|
|
args = argsparser.parse_args()
|
|
|
|
fps=args.fps
|
|
verbose=args.verbose
|
|
cli = Clitools({
|
|
"verbose" : verbose,
|
|
"looptime" : 1 / fps,
|
|
"name" : name
|
|
})
|
|
|
|
|
|
color = 16777215
|
|
square = [[100.0, 100.0, color], [100.0, 500.0, color], [500.0, 500.0, color], [500.0, 100.0, color], [100.0, 100.0, color]]
|
|
line =[]
|
|
for i in range(00,800,int(800/120)):
|
|
line.append([i, 400, color])
|
|
square = [[100.0, 100.0, color], [100.0, 500.0, color], [500.0, 500.0, color], [500.0, 100.0, color], [100.0, 100.0, color]]
|
|
mire = [
|
|
[600,600,0],
|
|
[600,600,color],
|
|
[700,600,color],
|
|
[700,700,color],
|
|
[600,700,color],
|
|
[600,600,color],
|
|
[100,100,0],
|
|
[100,100,color],
|
|
[200,100,color],
|
|
[200,200,color],
|
|
[100,200,color],
|
|
[100,100,color],
|
|
[0,0,0],
|
|
[0,0,color],
|
|
[800,0,color],
|
|
[800,800,color],
|
|
[0,800,color],
|
|
[0,0,color],
|
|
[350,400,0],
|
|
[350,400,color],
|
|
[450,400,color],
|
|
[400,350,0],
|
|
[400,350,color],
|
|
[400,450,color],
|
|
]
|
|
|
|
shape = mire
|
|
|
|
|
|
while True:
|
|
cli.startFrame()
|
|
print(shape, flush=True);
|
|
cli.endFrame()
|