Panda3D
Loading...
Searching...
No Matches
Transitions Class Reference

Public Member Functions

 __init__ (self, loader, model=None, scale=3.0, pos=Vec3(0, 0, 0))
 
 __del__ (self)
 
 fadeIn (self, t=0.5, finishIval=None, blendType='noBlend')
 
 fadeOut (self, t=0.5, finishIval=None, blendType='noBlend')
 
 fadeOutActive (self)
 
 fadeScreen (self, alpha=0.5)
 
 fadeScreenColor (self, color)
 
 getFadeInIval (self, t=0.5, finishIval=None, blendType='noBlend')
 
 getFadeOutIval (self, t=0.5, finishIval=None, blendType='noBlend')
 
 irisIn (self, t=0.5, finishIval=None, blendType='noBlend')
 
 irisOut (self, t=0.5, finishIval=None, blendType='noBlend')
 
 letterboxOff (self, t=0.25, finishIval=None, blendType='noBlend')
 
 letterboxOn (self, t=0.25, finishIval=None, blendType='noBlend')
 
 loadFade (self)
 
 loadIris (self)
 Iris.
 
 loadLetterbox (self)
 Letterbox.
 
 noFade (self)
 
 noIris (self)
 
 noLetterbox (self)
 
 noTransitions (self)
 
 setFadeColor (self, r, g, b)
 
 setFadeModel (self, model, scale=1.0)
 Fade.
 

Public Attributes

 alphaOff = Vec4(1, 1, 1, 0)
 
 alphaOn = Vec4(1, 1, 1, 1)
 
 fade = None
 
 fadeModel = model
 
str fadeTaskName = "fadeTask"
 
 imagePos = pos
 
 iris = None
 
str irisTaskName = "irisTask"
 
 lerpFunc = LerpColorScaleInterval
 
 letterbox = None
 
 letterboxBottom
 
 letterboxIval = None
 
str letterboxTaskName = "letterboxTask"
 
 letterboxTop
 
 transitionIval = None
 

Static Public Attributes

str FadeModelName = "models/misc/fade"
 
str IrisModelName = "models/misc/iris"
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
loader,
model = None,
scale = 3.0,
pos = Vec3(0, 0, 0) )

◆ __del__()

__del__ ( self)

Member Function Documentation

◆ fadeIn()

fadeIn ( self,
t = 0.5,
finishIval = None,
blendType = 'noBlend' )
Play a fade in transition over t seconds.
Places a polygon on the aspect2d plane then lerps the color
from black to transparent. When the color lerp is finished, it
parents the fade polygon to hidden.

◆ fadeOut()

fadeOut ( self,
t = 0.5,
finishIval = None,
blendType = 'noBlend' )
Play a fade out transition over t seconds.
Places a polygon on the aspect2d plane then lerps the color
from transparent to full black. When the color lerp is finished,
it leaves the fade polygon covering the aspect2d plane until you
fadeIn or call noFade.
lerp

◆ fadeOutActive()

fadeOutActive ( self)

◆ fadeScreen()

fadeScreen ( self,
alpha = 0.5 )
Put a semitransparent screen over the camera plane
to darken out the world. Useful for drawing attention to
a dialog box for instance

◆ fadeScreenColor()

fadeScreenColor ( self,
color )
Put a semitransparent screen over the camera plane
to darken out the world. Useful for drawing attention to
a dialog box for instance

◆ getFadeInIval()

getFadeInIval ( self,
t = 0.5,
finishIval = None,
blendType = 'noBlend' )
Returns an interval without starting it.  This is particularly useful in
cutscenes, so when the cutsceneIval is escaped out of we can finish the fade immediately

◆ getFadeOutIval()

getFadeOutIval ( self,
t = 0.5,
finishIval = None,
blendType = 'noBlend' )
Create a sequence that lerps the color out, then
parents the fade to hidden

◆ irisIn()

irisIn ( self,
t = 0.5,
finishIval = None,
blendType = 'noBlend' )
Play an iris in transition over t seconds.
Places a polygon on the aspect2d plane then lerps the scale
of the iris polygon up so it looks like we iris in. When the
scale lerp is finished, it parents the iris polygon to hidden.

◆ irisOut()

irisOut ( self,
t = 0.5,
finishIval = None,
blendType = 'noBlend' )
Play an iris out transition over t seconds.
Places a polygon on the aspect2d plane then lerps the scale
of the iris down so it looks like we iris out. When the scale
lerp is finished, it leaves the iris polygon covering the
aspect2d plane until you irisIn or call noIris.

◆ letterboxOff()

letterboxOff ( self,
t = 0.25,
finishIval = None,
blendType = 'noBlend' )
Move black bars away over t seconds.

◆ letterboxOn()

letterboxOn ( self,
t = 0.25,
finishIval = None,
blendType = 'noBlend' )
Move black bars in over t seconds.

◆ loadFade()

loadFade ( self)

◆ loadIris()

loadIris ( self)

Iris.

◆ loadLetterbox()

loadLetterbox ( self)

Letterbox.

◆ noFade()

noFade ( self)
Removes any current fade tasks and parents the fade polygon away

◆ noIris()

noIris ( self)
Removes any current iris tasks and parents the iris polygon away

◆ noLetterbox()

noLetterbox ( self)
Removes any current letterbox tasks and parents the letterbox polygon away

◆ noTransitions()

noTransitions ( self)
This call should immediately remove any and all transitions running

◆ setFadeColor()

setFadeColor ( self,
r,
g,
b )

◆ setFadeModel()

setFadeModel ( self,
model,
scale = 1.0 )

Fade.

Member Data Documentation

◆ alphaOff

alphaOff = Vec4(1, 1, 1, 0)

◆ alphaOn

alphaOn = Vec4(1, 1, 1, 1)

◆ fade

fade = None

◆ fadeModel

fadeModel = model

◆ FadeModelName

str FadeModelName = "models/misc/fade"
static

◆ fadeTaskName

str fadeTaskName = "fadeTask"

◆ imagePos

imagePos = pos

◆ iris

iris = None

◆ IrisModelName

str IrisModelName = "models/misc/iris"
static

◆ irisTaskName

str irisTaskName = "irisTask"

◆ lerpFunc

◆ letterbox

letterbox = None

◆ letterboxBottom

letterboxBottom
Initial value:
= DirectFrame(
parent = self.letterbox,
guiId = 'letterboxBottom',
relief = DGG.FLAT,
state = DGG.NORMAL,
frameColor = (0, 0, 0, 1),
borderWidth = (0, 0),
frameSize = (-1, 1, 0, 0.2),
pos = (0, 0, -1.2),
image = barImage,
image_scale = (2.25,1,.5),
image_pos = (0,0,.1),
image_color = (0.3,0.3,0.3,1),
sortOrder = 0,
)

◆ letterboxIval

letterboxIval = None

◆ letterboxTaskName

str letterboxTaskName = "letterboxTask"

◆ letterboxTop

letterboxTop
Initial value:
= DirectFrame(
parent = self.letterbox,
guiId = 'letterboxTop',
relief = DGG.FLAT,
state = DGG.NORMAL,
frameColor = (0, 0, 0, 1),
borderWidth = (0, 0),
frameSize = (-1, 1, 0, 0.2),
pos = (0, 0, 1.0),
image = barImage,
image_scale = (2.25,1,.5),
image_pos = (0,0,.1),
image_color = (0.3,0.3,0.3,1),
sortOrder = 0,
)

◆ transitionIval

transitionIval = None