def __init__(self, ox=0.0, oy=0.0, oz=0.0, speed=1.0): self.keys = pi3d.key() self.x = self.ox = ox self.y = self.oy = oy self.z = self.oz = oz self.speed = speed self.rot = 0 self.tilt = 0
cloudimg = pi3d.loadTextureAlpha("textures/earth_clouds.png",True) earthimg = pi3d.loadTexture("textures/world_map.jpg") moonimg = pi3d.loadTexture("textures/moon.jpg") starsimg = pi3d.loadTexture("textures/stars2.jpg") watimg = pi3d.loadTexture("textures/water.jpg") mysphere = pi3d.createSphere(2,24,24,0.0,"earth",0,0,0) mysphere2 = pi3d.createSphere(2.05,24,24,0.0,"clouds",0,0,0) mymoon = pi3d.createSphere(0.4,16,16,0.0,"moon",0,0,0) mymoon2 = pi3d.createSphere(0.1,16,16,0.0,"moon2",0,0,0) arialFont = pi3d.font("AR_CENA","#dd00aa") #load AR_CENA font and set the font colour to 'raspberry' destineFont = pi3d.font("AR_DELANEY", "#0055ff") # Fetch key presses mykeys = pi3d.key() mtrx = pi3d.matrix() rot=0.0 rot1=0.0 rot2=0.0 #create a light mylight = pi3d.createLight(0,1,1,1,"",10,10,50, .8,.8,.8) # Display scene while 1: display.clear() mylight.off()
station.add(ssphere, 20, 0, 20) station.add(ssphere, -20, 0, 20) station.add(scorrid, -20, 0, 0, 90, 0, 0) station.add(scorrid, 0, 0, 20, 90, 90, 0) station.add(scorrid, 0, 0, -20, 90, 90, 0) #avatar camera rot = 0.0 tilt = 0.0 avhgt = 2.0 xm = 0.0 zm = 0.0 ym = -(mymap.calcHeight(xm, zm) + avhgt) # Fetch key presses mykeys = pi3d.key() mymouse = pi3d.mouse() mymouse.start() mtrx = pi3d.matrix() omx = mymouse.x omy = mymouse.y myfog = pi3d.fog(0.002, (0.3, 0.8, 0.6, 0.5)) mylight = pi3d.createLight(0, 1, 1, 1, "", 10, 10, 10, .9, .7, .6) # Display scene and rotate cuboid while 1: display.clear() mtrx.identity()