def loadMotion(name, motion): global _motionLookup print "loading motion", name if type(motion) != type(""): print "loading motion to lookup", name _motionLookup[name] = motion #print "proxy core", Core.getCore() Core.getCore().loadMotion(name, motion)
def getMotion(name): global _motionLookup #print _motionLookup.keys() print "getting motion", name #print "getMotion" if _motionLookup.has_key(name): print "core proxy: found motion,", name return _motionLookup[name] else: motion = Core.getCore().getMotion(name) if motion != None: motion.Reference() motion.thisown = False return getRealMotionType(motion)
def clear(): _motionLookup = {} _events = {} PiavcaWXApp.getWXApp().clear() Core.getCore().reset()
def getTime(): return Core.getCore().getTime()
void main() { if (textureAvailable) { vec3 texColor = vec3(texture2D(tex, TexCoord.st)); gl_FragColor = Color*vec4(texColor, 1.0); } else { gl_FragColor = Color; } } """ Core.getCore().setVertexShaderText(vertexShaderText) Core.getCore().setFragmentShaderText(fragmentShaderText) def getTime(): return Core.getCore().getTime() _motionLookup = {} def loadMotion(name, motion): global _motionLookup print "loading motion", name if type(motion) != type(""): print "loading motion to lookup", name _motionLookup[name] = motion #print "proxy core", Core.getCore() Core.getCore().loadMotion(name, motion)
void main() { if (textureAvailable) { vec3 texColor = vec3(texture2D(tex, TexCoord.st)); gl_FragColor = Color*vec4(texColor, 1.0); } else { gl_FragColor = Color; } } """ Core.getCore().setVertexShaderText(vertexShaderText) Core.getCore().setFragmentShaderText(fragmentShaderText) def getTime(): return Core.getCore().getTime() _motionLookup = {} def loadMotion(name, motion): global _motionLookup print "loading motion", name if type(motion) != type(""): print "loading motion to lookup", name