mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
*** empty log message ***
This commit is contained in:
parent
418fe328f4
commit
f057a225d5
@ -386,3 +386,34 @@ class LerpColorScaleInterval(LerpInterval):
|
||||
# Initialize superclass
|
||||
LerpInterval.__init__(self, name, duration, functorFunc, blendType)
|
||||
|
||||
|
||||
|
||||
class LerpColorInterval(LerpInterval):
|
||||
# Name counter
|
||||
lerpColorNum = 1
|
||||
# Class methods
|
||||
def __init__(self, node, duration, startColor, endColor,
|
||||
other=None, blendType='noBlend', name=None):
|
||||
|
||||
def functorFunc(node=node, startColor=startColor,
|
||||
endColor=endColor, other=other):
|
||||
assert(not node.isEmpty())
|
||||
if callable(endColor):
|
||||
# This may be a thunk that returns a point.
|
||||
endColor = endColor()
|
||||
if callable(startColor):
|
||||
# This may be a thunk that returns a point.
|
||||
startColor = startColor()
|
||||
if (other != None):
|
||||
functor = ColorLerpFunctor(node, startColor, endColor, other)
|
||||
else:
|
||||
functor = ColorLerpFunctor(node, startColor, endColor)
|
||||
return functor
|
||||
|
||||
# Generate unique name if necessary
|
||||
if (name == None):
|
||||
name = 'LerpColorInterval-%d' % LerpColorInterval.lerpColorNum
|
||||
LerpColorInterval.lerpColorNum += 1
|
||||
# Initialize superclass
|
||||
LerpInterval.__init__(self, name, duration, functorFunc, blendType)
|
||||
|
||||
|
@ -306,6 +306,8 @@ class ShowBase:
|
||||
using the indicated window. This should only be called once
|
||||
per application.
|
||||
"""
|
||||
|
||||
print 'setup mouse'
|
||||
|
||||
# We create both a MouseAndKeyboard object and a MouseWatcher object
|
||||
# for the window. The MouseAndKeyboard generates mouse events and
|
||||
|
Loading…
x
Reference in New Issue
Block a user