Example #1
0
class myscene(dragonfly.pandahive.spyderframe):
    a = Spyder.AxisSystem()
    a *= 0.25
    a.origin += (-8, 42, 0)
    env = Spyder.Model3D("models/environment", "egg", a)

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

    box = Spyder.Box2D(50, 470, 96, 96)
    icon = Spyder.Icon("pandaicon.png", "pandaicon", box, transparency=True)

    #Second panda
    a = Spyder.AxisSystem()
    a *= 0.002
    pandaclass2 = Spyder.ActorClass3D("models/panda-model", "egg", [("walk", "models/panda-walk4", "egg")], a,
                                      actorclassname="pandaclass2")

    box = Spyder.Box2D(200, 500, 48, 48)
    icon2 = Spyder.Icon("pandaicon.png", "pandaicon2", box, transparency=True)

    #Third panda
    a = Spyder.AxisSystem()
    a *= 0.3
    model = Spyder.Model3D("models/panda", "egg", a)
    pandaclass3 = Spyder.EntityClass3D("pandaclass3", [model])

    box = Spyder.Box2D(280, 480, 144, 112)
    icon3 = Spyder.Icon("pandaicon2.png", "pandaicon3", box, transparency=True)

    camcenter = Spyder.Entity3D(
        "camcenter",
        (
            Spyder.NewMaterial("white", color=(255, 255, 255)),
            Spyder.Block3D((1, 1, 1), material="white"),
        )
    )

    marker = Spyder.Entity3D(
        "marker",
        (
            Spyder.NewMaterial("blue", color=(0, 0, 255)),
            Spyder.Circle(2, origin=(0, 0, 0.1), material="blue")
        )
    )

    del a, box, model
Example #2
0
class myscene(dragonfly.pandahive.spyderframe):
    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 = Spyder.Box2D(50, 470, 96, 96)
    icon = Spyder.Icon("pandaicon.png", "pandaicon", box, transparency=True)

    del a, box
Example #3
0
class myscene(dragonfly.pandahive.spyderframe):
    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 = Spyder.Box2D(50, 470, 96, 96)
    icon = Spyder.Icon("pandaicon.png", "pandaicon", box, transparency=True)

    camcenter = Spyder.Entity3D("camcenter", (
        Spyder.NewMaterial("white", color=(255, 255, 255)),
        Spyder.Block3D((1, 1, 1), material="white"),
    ))

    del a, box
Example #4
0
class myscene(myspyderframe):
    scene = bee.parameter("bee")
    canvas = bee.parameter("bee")
    mousearea = bee.parameter("bee")

    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 = Spyder.Box2D(50, 470, 96, 96)
    icon = Spyder.Icon("pandaicon.png", "pandaicon", box, transparency=True)

    m1 = Spyder.NewMaterial("red", (255, 0, 0))
    m2 = Spyder.NewMaterial("green", (0, 255, 0))
    m3 = Spyder.NewMaterial("blue", (0, 0, 255))
    m_ax = Spyder.AxisSystem(origin=(5, -3, 0))
    m_ax2 = Spyder.AxisSystem(origin=(-5, -3, 3))
    m_ax2.rotateZ(30)
    m_ax2.rotateX(-60)

    del a, box
Example #5
0
class myscene(dragonfly.pandahive.spyderframe):
    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")

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

    box = Spyder.Box2D(50, 470, 96, 96)
    icon = Spyder.Icon("pandaicon.png", "pandaicon", box, transparency=True)

    #Second panda class
    a = Spyder.AxisSystem()
    a *= 0.002
    pandaclass2 = Spyder.ActorClass3D("models/panda-model",
                                      "egg",
                                      [("walk", "models/panda-walk4", "egg")],
                                      a,
                                      actorclassname="pandaclass2")

    box = Spyder.Box2D(200, 500, 48, 48)
    icon2 = Spyder.Icon("pandaicon.png", "pandaicon2", box, transparency=True)

    #Third panda class
    a = Spyder.AxisSystem()
    a *= 0.3
    model = Spyder.Model3D("models/panda", "egg", a)
    pandaclass3 = Spyder.EntityClass3D("pandaclass3", [model])

    box = Spyder.Box2D(280, 480, 144, 112)
    icon3 = Spyder.Icon("pandaicon2.png", "pandaicon3", box, transparency=True)

    del a, box, model
Example #6
0
class myscene(myspyderframe):
    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 = Spyder.Box2D(50, 470, 96, 96)
    icon = Spyder.Icon("pandaicon.png", "pandaicon", box, transparency=True)

    m1 = Spyder.NewMaterial("red", (255, 0, 0))
    m2 = Spyder.NewMaterial("green", (0, 255, 0))
    m3 = Spyder.NewMaterial("blue", (0, 0, 255))
    m4 = Spyder.NewMaterial("white", (255, 255, 255))
    m_ax = Spyder.AxisSystem(origin=(5, -3, 0))
    m_ax2 = Spyder.AxisSystem(origin=(-5, -3, 3))
    m_ax2.rotateZ(30)
    m_ax2.rotateX(-60)

    m = Spyder.World3D(materials=[m1, m2, m3, m4], objects=[m_ax, m_ax2])
    m.tofile("m.web")

    del m
    del a, box
Example #7
0
from pandalib import myhive, myscene, pandalogichive, pandalogicframe, load_hive, camerabind
import bee, dragonfly
from bee import connect
import Spyder

camerahive = "camera.web"

pandadict = {}  # global variable...

# First panda class
a = Spyder.AxisSystem()
a *= 0.005
data = "models/panda-model", "egg", [("walk", "models/panda-walk4", "egg")], a
box = Spyder.Box2D(50, 470, 96, 96)
image = "pandaicon.png", True
hivemap = "pandawalk.web"
pandadict["pandaclass"] = ("actor", data, box, image, hivemap)

#Second panda class
a = Spyder.AxisSystem()
a *= 0.002
data = "models/panda-model", "egg", [("walk", "models/panda-walk4", "egg")], a
box = Spyder.Box2D(200, 500, 48, 48)
image = "pandaicon.png", True
hivemap = "pandawalk2.web"
pandadict["pandaclass2"] = ("actor", data, box, image, hivemap)

#Third panda class
a = Spyder.AxisSystem()
a *= 0.3
data = "models/panda", "egg", [], a