Exemple #1
0
    def setupTextures(self):
        content = Content("Aurora")

        ch1_file = content.add_asset('iChannel0.png')
        ch2_file = content.add_asset('iChannel1.png')
        self.img = ofImage(ch1_file)
        self.img2 = ofImage(ch2_file)
        self.fbo2 = ofFbo()
        self.fbo2.allocate(self.width, self.height)
        self.fbo2.begin()
        self.img2.draw(0, 0, self.width, self.height)
        self.fbo2.end()
Exemple #2
0
from openframeworks import *
from protopixel import Content
from tempfile import mkdtemp
import os.path
from random import randint
import imp

content = Content("IngoSchusterAurora")

aurora_file = content.add_asset("Aurora.py")
aurora = imp.load_source('aurora',aurora_file)

print "IngoSchusterSunset"


#a global variable
num_modes = 3
elapsedTime = 0.0
change_time = 350
width = 600
height= 100
content.FBO_SIZE = (width,height) #optional: define size of FBO, default=(100,100)
targetAlpha = 1.0
currentAlpha = 0.0
energy = 1.0
fbo = ofFbo()
fboVisuals = ofFbo()
shader = ofShader()
mode = 0

content.add_parameter("gamma", min=0.0, max=1.0, value=0.85)
Exemple #3
0
from protopixel import Content
from openframeworks import *

import os.path
from tempfile import mkdtemp

content = Content("SnowFlakes")

side = 256
content.FBO_SIZE = (side, side)
shaderfile = content.add_asset('shader')
shader = ofShader()

temp_dir = mkdtemp()
frag_file = os.path.join(temp_dir, 's.frag')
vert_file = os.path.join(temp_dir, 's.vert')
shader_file_of = os.path.join(temp_dir, 's')

#a global variable
color = ofColor(255)
elapsedTime = 0.0
startColorIndex = 1
endColorIndex = 2
scaleFactor = 10
speedFactor = 0.6

content.add_parameter("color1", type="color", value=ofColor(255, 255, 255))
content.add_parameter("color2", type="color", value=ofColor(255, 255, 255))
content.add_parameter("color3", type="color", value=ofColor(255, 255, 255))
content.add_parameter("change_hue", value=True)
content.add_parameter("color_speed", min=0.00, max=1.0, value=0.1)
Exemple #4
0
content = Content("ProtoPixeFrames")

print "ProtoPixeFrames"

color = ofColor(255)
shader = ofShader()
targetAlpha = 1.0
currentAlpha = 0.0

size = 10
content.FBO_SIZE = (size, size)
content.add_parameter("gamma", min=0.0, max=1.0, value=0.9)
content.add_parameter("Color", type="color", value=ofColor(255, 255, 255))

rainbow_file = content.add_asset("rainbow.py")
rainbow = imp.load_source('rainbow', rainbow_file)

square_file = content.add_asset("square.py")
square = imp.load_source('square', square_file)


def setup():
    """
    This will be called at the beggining, you set your stuff here
    """

    global rainbow, square

    rainbow = rainbow.Rainbow(size, size)
    square = square.Square(size, size)
Exemple #5
0
from openframeworks import *
from protopixel import Content
from tempfile import mkdtemp
import os.path
from random import randint
import imp

content = Content("IngoSchuster")

sunset_file = content.add_asset("Sunset.py")
sunset = imp.load_source('sunset', sunset_file)

clouds_file = content.add_asset("Clouds.py")
clouds = imp.load_source('clouds', clouds_file)

aurora_file = content.add_asset("Aurora.py")
aurora = imp.load_source('clouds', aurora_file)

print "IngoSchuster"

#a global variable
num_modes = 3
elapsedTime = 0.0
change_time = 350
width = 600
height = 100
content.FBO_SIZE = (width, height
                    )  #optional: define size of FBO, default=(100,100)
targetAlpha = 1.0
currentAlpha = 0.0
energy = 1.0
Exemple #6
0
from openframeworks import *
from protopixel import Content
from tempfile import mkdtemp
import os.path
from random import randint
import imp

content = Content("IngoSchusterclouds")

clouds_file = content.add_asset("Clouds.py")
clouds = imp.load_source('clouds', clouds_file)

print "IngoSchusterSunset"

#a global variable
num_modes = 3
elapsedTime = 0.0
change_time = 350
width = 600
height = 100
content.FBO_SIZE = (width, height
                    )  #optional: define size of FBO, default=(100,100)
targetAlpha = 1.0
currentAlpha = 0.0
energy = 1.0
fbo = ofFbo()
fboVisuals = ofFbo()
shader = ofShader()
mode = 0

content.add_parameter("gamma", min=0.0, max=1.0, value=0.9)
Exemple #7
0
from openframeworks import *
from protopixel import Content
from tempfile import mkdtemp
import os.path
from random import randint
import imp

from OSC import OSCClient, OSCMessage

content = Content("ProtoPixelDress")

sparkle_file = content.add_asset("sparkle.py")
sparkles = imp.load_source('sparkles', sparkle_file)

rainbow_file = content.add_asset("rainbow.py")
rainbow = imp.load_source('rainbow', rainbow_file)

fade_file = content.add_asset("fade.py")
fade = imp.load_source('fade', fade_file)

waves_file = content.add_asset("waves.py")
waves = imp.load_source('waves', waves_file)

circles_file = content.add_asset("circles.py")
circles = imp.load_source('circles', circles_file)

OSC_DEST_IP = "localhost"
OSC_BROADCAST_IP = "192.168.8.255"
OSC_BROADCAST_PORT = 2346
OSC_DEST_PORT = 2345
from openframeworks import *
from protopixel import Content
import numpy as np

content = Content("Assets example Script")


# If you want to use an external asset inside a script
# you can declare it like this:

cat_file = content.add_asset('cat.jpeg')

# This could be a file or a folder.

# This serves two different purposes:
# - It is equivalent to os.path.join(os.path.dirname(__file__),'cat.jpeg'),
#   so it allows you to get a valid path for an asset that is relative to
#   the script, but is easier to write.
# - It tells ProtoPixel Create about these files, so it can pack them when
#   exporting a project.

def setup():
    global image
    image = ofImage(cat_file)
    content.FBO_SIZE = (int(image.getWidth()), int(image.getHeight()))

def draw():
    image.draw(0,0)

Exemple #9
0
from openframeworks import *
from protopixel import Content
from tempfile import mkdtemp
import os.path
from random import randint
import imp

content = Content("IngoSchusterSunset")

sunset_file = content.add_asset("Sunset.py")
sunset = imp.load_source('sunset', sunset_file)

print "IngoSchusterSunset"

#a global variable
num_modes = 3
elapsedTime = 0.0
change_time = 350
width = 600
height = 100
content.FBO_SIZE = (width, height
                    )  #optional: define size of FBO, default=(100,100)
targetAlpha = 1.0
currentAlpha = 0.0
energy = 1.0
fbo = ofFbo()
fboVisuals = ofFbo()
shader = ofShader()
mode = 0

content.add_parameter("gamma", min=0.0, max=1.0, value=0.9)