Esempio n. 1
0
def outroFrames(args):
	xml = etree.parse('froscon2017/artwork/outro.svg').getroot()
	pathstr = xml.find(".//*[@id='animatePath']").get('d')
	frog = xml.find(".//*[@id='animatePath']").get('d')
	path = svg.path.parse_path(pathstr)

	init = path.point(0)

	frames = int(0.5*fps)
	for i in range(0, frames):
		p = path.point(i / frames) - init
		yield (
			('animatePath', 'style', 'opacity', 0),
			('recordingby', 'style', 'opacity', 0),
		)

	frames = 3*fps
	for i in range(0, frames):
		p = path.point(i / frames) - init
		yield (
			('frog', 'attr', 'transform', 'translate(%.4f, %.4f)' % (p.real, p.imag)),
		)

	frames = int(0.5*fps)+1
	for i in range(0, frames):
		yield tuple()

	frames = 1*fps
	for i in range(0, frames):
		yield (
			('logo',   'style', 'opacity', easeLinear(i, 1, -1, frames)),
		)

	frames = 1*fps
	for i in range(0, frames):
		yield (
			('logo',   'style', 'opacity', 0),
			('recordingby',   'style', 'opacity', easeLinear(i, 0, 1, frames)),
		)

	frames = 2*fps
	for i in range(0, frames):
		yield (
			('logo',   'style', 'opacity', 0),
			('recordingby',   'style', 'opacity', 1),
		)

	frames = 1*fps
	for i in range(0, frames):
		yield (
			('logo',   'style', 'opacity', 0),
			('recordingby',   'style', 'opacity', easeLinear(i, 1, -1, frames)),
		)

	frames = 1*fps
	for i in range(0, frames):
		yield (
			('logo',   'style', 'opacity', 0),
			('recordingby',   'style', 'opacity', 0),
		)
Esempio n. 2
0
def outroFrames(args):
	xml = etree.parse('froscon2016/artwork/outro.svg').getroot()
	pathstr = xml.find(".//*[@id='animatePath']").get('d')
	frog = xml.find(".//*[@id='animatePath']").get('d')
	path = svg.path.parse_path(pathstr)

	init = path.point(0)

	frames = int(0.5*fps)
	for i in range(0, frames):
		p = path.point(i / frames) - init
		yield (
			('animatePath', 'style', 'opacity', 0),
			('license', 'style', 'opacity', 0),
		)

	frames = 3*fps
	for i in range(0, frames):
		p = path.point(i / frames) - init
		yield (
			('frog', 'attr', 'transform', 'translate(%.4f, %.4f)' % (p.real, p.imag)),
		)

	frames = int(0.5*fps)+1
	for i in range(0, frames):
		yield tuple()

	frames = 1*fps
	for i in range(0, frames):
		yield (
			('logo',   'style', 'opacity', easeLinear(i, 1, -1, frames)),
		)

	frames = 1*fps
	for i in range(0, frames):
		yield (
			('logo',   'style', 'opacity', 0),
			('license',   'style', 'opacity', easeLinear(i, 0, 1, frames)),
		)

	frames = 2*fps
	for i in range(0, frames):
		yield (
			('logo',   'style', 'opacity', 0),
			('license',   'style', 'opacity', 1),
		)

	frames = 1*fps
	for i in range(0, frames):
		yield (
			('logo',   'style', 'opacity', 0),
			('license',   'style', 'opacity', easeLinear(i, 1, -1, frames)),
		)

	frames = 1*fps
	for i in range(0, frames):
		yield (
			('logo',   'style', 'opacity', 0),
			('license',   'style', 'opacity', 0),
		)
Esempio n. 3
0
def introFrames(args):
    xml = etree.parse('froscon2018/artwork/intro.svg').getroot()
    pathstr = xml.find(".//*[@id='animatePath']").get('d')
    frog = xml.find(".//*[@id='animatePath']").get('d')
    path = svg.path.parse_path(pathstr)

    init = path.point(0)

    frames = int(0.5 * fps)
    for i in range(0, frames):
        p = path.point(i / frames) - init
        yield (
            ('animatePath', 'style', 'opacity', 0),
            ('date', 'style', 'opacity', 0),
        )

    frames = 3 * fps
    for i in range(0, frames):
        p = path.point(i / frames) - init
        yield (('frog', 'attr', 'transform',
                'translate(%.4f, %.4f)' % (p.real, p.imag)), )

    frames = int(0.5 * fps)
    for i in range(0, frames):
        yield tuple()

    frames = 1 * fps
    for i in range(0, frames):
        yield (
            ('url', 'style', 'opacity', easeOutQuad(i, 1, -1, frames)),
            ('date', 'style', 'opacity', easeOutQuad(i, 0, 1, frames)),
        )

    frames = int(1.5 * fps)
    for i in range(0, frames):
        yield (
            ('url', 'style', 'opacity', 0),
            ('date', 'style', 'opacity', 1),
            ('bar', 'style', 'opacity', easeLinear(i, 1, -1, frames)),
            ('title', 'style', 'opacity', easeLinear(i, 1, -1, frames)),
        )

    # frames = 1*fps
    # for i in range(0, frames):
    # 	yield (
    # 	)

    frames = int(0.5 * fps) + 1
    for i in range(0, frames):
        yield (
            ('bar', 'style', 'opacity', 0),
            ('title', 'style', 'opacity', 0),
        )
Esempio n. 4
0
def get_points(path, seg):
    acc = []
    l = seg * len(path)
    for i in range(l):
        val = float(i) / l
        point = path.point(val)
        acc.append([point.real, point.imag])
    return acc