- # core classes
- from edu.cmu.cs.stage3.alice.core import *
- from edu.cmu.cs.stage3.alice.core.event import *
- from edu.cmu.cs.stage3.alice.core.response import *
- from edu.cmu.cs.stage3.alice.core.property import *
- # constants
- from edu.cmu.cs.stage3.alice.core.Direction import *
- from edu.cmu.cs.stage3.alice.core.style.TraditionalAnimationStyle import *
- # misc
- from edu.cmu.cs.stage3.alice.authoringtool import *
- from edu.cmu.cs.stage3.alice.authoringtool.util import *
- # image
- from java.awt.image import *
- graphicsConfiguration = AuthoringTool.getHack().getJAliceFrame().getGraphicsConfiguration()
- def setTexture(object, image):
- texture = TextureMap()
- texture.propertyChanged(PropertyEvent(texture.image, image))
- object.propertyChanged(PropertyEvent(object._diffuseColorMap, texture))
- def getTextureImage(object):
- '''
- returns java.awt.Image
- '''
- return object.diffuseColorMap.image
- def onScreen(obj):
- world.bool = camera.canSee(obj, false)
- def main(screen):
- img = graphicsConfiguration.createCompatibleImage(300, 300)
- screen.setTexture(img)
ueoa
Posted by Anonymous on Sat 11th Dec 2010 17:04
raw | new post
modification of post by Anonymous (view diff)
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.