예제 #1
0
파일: effects02.py 프로젝트: Knio/miru
from pyglet.gl import *
import pyglet

from miru.ui import TestWindow
from miru.track import PosTrack
from miru import effects
from miru import utils
from miru import input
from miru import core
from miru import graphics
from miru.context import context

fog = effects.Fog(density=0.075, color=(0.65,0.9,0.75,0.5), equation=effects.Fog.EQ_EXP)
w = TestWindow(680, 400, clear_color=fog.color)

w.set_vsync(False)

context.camera.pos=(0,1.25,4)
context.window = w
context.control = input.SimpleMouseControl()

utils.add_fps_display(context)

o = w._load_object()
o.pos += (2,0.55,-3)
o = w._load_object()
o.pos += (0.5,1.55,-10)
o = w._load_object()
o.pos += (-0.5,0.55,0)

예제 #2
0
파일: track00.py 프로젝트: Knio/miru
from pyglet import font
from pyglet import clock

from miru.ui import TestWindow
from miru.context import context
from miru import input
from miru import utils
from miru.camera import *

# initialize the window
w = TestWindow(680, 400)
w.set_vsync(0)
utils.add_fps_display(context)
context.camera.pos = (0,0,10)
context.window = w

for i in range(-30,35,5):
    o = w._load_object()
    o.pos.x = i
    o.pos.z -= 5
w._load_object()

target = context.camera.objects[-1]
target.pos.z += 5
target.angle.x = 45
context.camera.track_target = target
step = 0.010


def main():
    global target, step