MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / alloc

Method alloc

Source/Animation/Action.cpp:111–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109/* ActionProperty */
110
111Own<ActionDuration> PropertyAction::alloc(float duration, float start, float stop, Property::Enum prop, Ease::Enum easing) {
112 PropertyAction* action = new PropertyAction();
113 action->_start = start;
114 action->_delta = stop - start;
115 action->_duration = std::max(FLT_EPSILON, duration);
116 action->_setFunc = Property::getFunc(prop);
117 action->_ease = Ease::getFunc(easing);
118 action->_ended = false;
119 return Own<ActionDuration>(action);
120}
121
122Action* PropertyAction::create(float duration, float start, float stop, Property::Enum prop, Ease::Enum easing) {
123 return Action::create(PropertyAction::alloc(duration, start, stop, prop, easing));

Callers

nothing calls this directly

Calls 10

fmodFunction · 0.85
moveFunction · 0.85
loadTextureMethod · 0.80
toStringMethod · 0.65
maxFunction · 0.50
allocFunction · 0.50
toVec3Method · 0.45
getDurationMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected