import direct.directbase.DirectStart
from pandac.PandaModules import *

#Load the first environment model

poly = loader.loadModel("bin/lib/site-packages/cubocta")

poly.reparentTo(render)
poly.setPos(0,0,0)
poly.setTwoSided(1)

base.trackball.node().setPos(0, 10, 0)

plight = PointLight('plight')
plight.setColor(VBase4(0.8, 0.2, 0.2, 1))
plnp = render.attachNewNode(plight)
plnp.setPos(0, 10, 0)
render.setLight(plnp)

# Directional light 01

directionalLight = DirectionalLight( "directionalLight1" )
directionalLight.setColor( Vec4( 0.8, 0.2, 0.2, 1 ) )
directionalLightNP = render.attachNewNode( directionalLight)
directionalLightNP.setHpr(0, 10, 0)
render.setLight(directionalLightNP)

# Directional light 01

directionalLight = DirectionalLight( "directionalLight2" )
directionalLight.setColor( Vec4( 0.8, 0.2, 0.2, 1 ) )
directionalLightNP = render.attachNewNode( directionalLight)
directionalLightNP.setHpr(180, -10, 0)
render.setLight(directionalLightNP)

alight = AmbientLight('alight')
alight.setColor(VBase4(0.9, 0.9, 0.9, 1))
alnp = render.attachNewNode(alight)
render.setLight(alnp)

#Run the tutorial

run()
# code highlighted using py2html.py version 0.8