Beispiel #1
0
def show_coloredtextbox(ctb):
    ctb2 = ctb.to_coloredtextbox()
    args = canvasargs(ctb2)
    p = plugin_single_required(args)
    pattern = ("canvas", "show", "init", ("object", "coloredtextbox"))
    d = dummydrone(plugindict={pattern: p})
    return d.getinstance()
Beispiel #2
0
class myscene(dragonfly.pandahive.spyderframe):
    pandaicon_ = bee.get_parameter("pandaicon")

    a = Spyder.AxisSystem()
    a *= 0.25
    a.origin += (-8, 42, 0)
    env = Spyder.Model3D("models/environment", "egg", a)

    a = Spyder.AxisSystem()
    a *= 0.005
    mypanda = Spyder.Actor3D("models/panda-model",
                             "egg", [("walk", "models/panda-walk4", "egg")],
                             a,
                             entityname="mypanda")

    a = Spyder.AxisSystem()
    a *= 0.005
    pandaclass = Spyder.ActorClass3D("models/panda-model",
                                     "egg",
                                     [("walk", "models/panda-walk4", "egg")],
                                     a,
                                     actorclassname="pandaclass")

    box = box2d(50, 470, 96, 96)
    params = parameters()
    params.transparency = True
    args = canvasargs("pandaicon.png", pandaicon_, box, params)
    plugin = plugin_single_required(args)
    pattern = ("canvas", "draw", "init", ("object", "image"))
    d1 = dummydrone(plugindict={pattern: plugin})

    i1 = bee.init("mousearea")
    i1.register(pandaicon_, box)

    del a, box, params, args, plugin, pattern
Beispiel #3
0
def show_image(i):
    b = i.box
    box = box2d(b.x, b.y, b.sizex, b.sizey, b.mode)
    params = parameters()
    if i.transparency: params.transparency = True
    args = canvasargs(i.image, i.identifier, box, params)
    plugin = plugin_single_required(args)
    pattern = ("canvas", "draw", "init", ("object", "image"))
    d1 = dummydrone(plugindict={pattern: plugin})
    return d1.getinstance()
Beispiel #4
0
class myscene(bee.frame):
    pandaclassname_ = bee.get_parameter("pandaclassname")
    pandaname_ = bee.get_parameter("pandaname")
    pandaicon_ = bee.get_parameter("pandaicon")

    c1 = bee.configure("scene")
    c1.import_mesh_EGG("models/environment")
    a = NodePath("")
    a.setScale(0.25)
    a.setPos(-8, 42, 0)
    mat = a.getMat()
    m = (mat.getRow3(3), mat.getRow3(0), mat.getRow3(1), mat.getRow3(2))
    c1.add_model_MATRIX(matrix=m)

    c2 = bee.configure("scene")
    c2.import_mesh_EGG("models/panda-model")
    a = NodePath("")
    a.setScale(0.005)
    mat = a.getMat()
    m = (mat.getRow3(3), mat.getRow3(0), mat.getRow3(1), mat.getRow3(2))
    c2.add_actor_MATRIX(matrix=m, entityname=pandaname_)
    c2.import_mesh_EGG("models/panda-walk4")
    c2.add_animation("walk")

    c3 = bee.configure("scene")
    c3.import_mesh_EGG("models/panda-model")
    a = NodePath("")
    a.setScale(0.005)
    mat = a.getMat()
    m = (mat.getRow3(3), mat.getRow3(0), mat.getRow3(1), mat.getRow3(2))
    c3.add_actorclass_MATRIX(matrix=m, actorclassname=pandaclassname_)
    c3.import_mesh_EGG("models/panda-walk4")
    c3.add_animation("walk")

    box = box2d(50, 470, 96, 96)
    params = parameters()
    params.transparency = True
    args = canvasargs("pandaicon.png", pandaicon_, box, params)
    plugin = plugin_single_required(args)
    pattern = ("canvas", "draw", "init", ("object", "image"))
    d1 = dummydrone(plugindict={pattern: plugin})

    i1 = bee.init("mousearea")
    i1.register(pandaicon_, box)

    del a, m, mat, box, params, args, plugin, pattern
Beispiel #5
0
class myscene(bee.frame):
    pandaclassname_ = bee.get_parameter("pandaclassname")
    pandaname_ = bee.get_parameter("pandaname")
    pandaicon_ = bee.get_parameter("pandaicon")

    c1 = bee.configure("scene")
    c1.import_mesh_EGG("models/environment")
    a = Spyder.AxisSystem()
    a *= 0.25
    a.origin += (-8, 42, 0)
    c1.add_model_SPYDER(axissystem=a)

    c2 = bee.configure("scene")
    c2.import_mesh_EGG("models/panda-model")
    a = Spyder.AxisSystem()
    a *= 0.005
    c2.add_actor_SPYDER(axissystem=a, entityname=pandaname_)
    c2.import_mesh_EGG("models/panda-walk4")
    c2.add_animation("walk")

    c3 = bee.configure("scene")
    c3.import_mesh_EGG("models/panda-model")
    a = Spyder.AxisSystem()
    a *= 0.005
    c3.add_actorclass_SPYDER(axissystem=a, actorclassname=pandaclassname_)
    c3.import_mesh_EGG("models/panda-walk4")
    c3.add_animation("walk")

    box = box2d(50, 470, 96, 96)
    params = parameters()
    params.transparency = True
    args = canvasargs("pandaicon.png", pandaicon_, box, params)
    plugin = plugin_single_required(args)
    pattern = ("canvas", "draw", "init", ("object", "image"))
    d1 = dummydrone(plugindict={pattern: plugin})

    i1 = bee.init("mousearea")
    i1.register(pandaicon_, box)

    del a, box, params, args, plugin, pattern
Beispiel #6
0
def show_coloredtextbox(ctb):
    args = canvasargs(ctb.coloredtext, box=ctb.box)
    p = plugin_single_required(args)
    pattern = ("canvas", "draw", "init", "ColoredText")
    d = dummydrone(plugindict={pattern: p})
    return d.getinstance()
Beispiel #7
0
def show_coloredtextbox(ctb):
    args = canvasargs(ctb)
    p = plugin_single_required(args)
    pattern = ("canvas", "show", "init", "ColoredTextBox")
    d = dummydrone(plugindict={pattern: p})
    return d.getinstance()