Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Tween and timeline -- create ease animation in C++ (cpgf library version 1.5.5)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 wqking   Members   -  Reputation: 756

Posted 04 May 2013 - 09:41 PM

I'm glad to announce cpgf library version 1.5.5 is release.

 

cpgf library -- free C++ open source library for reflection, serialization, Lua, Google V8 JavaScript and Python script binding, callbacks

 

Changes log:

  • Added tweening and timeline library.
  • Added generic property accessors, getter and setter.
  • Refactored meta property to reuse generic property accessors.
  • Fixed a bug that using function (not pointer) as property accessor may cause wrong address crash in VC.
  • Fixed a bug that using policy GMetaRuleExplicitThis on property setter may cause wrong argument being selected.
  • Fixed a compile error in gstdint.h in VC 2012.

Sample code to create tween animation

// Define a sprite somewhere.
FooSprite mySprite;
 
// Setup the tween
GTween & tween = GTweenList::getInstance()->createTween()
  .duration(2.0f)
  .ease(ElasticEase::easeIn())
 
  // We can use getter/setter functions
  .target(createAccessor(&mySprite, &FooSprite::getX, &FooSprite::setX), 100)
 
  // We can also use property address directly, as long as the property is public.
  .target(createAccessor(&mySprite, &FooSprite::y, &FooSprite::y), 200)
;
 
// The main tick function
void gameLoop(float frameDuration)
{
  GTweenList::getInstance()->tick(frameDuration);
}

The library web site:
http://www.cpgf.org/

 

Tween library documentation

http://www.cpgf.org/document/cpgf-tween-library.html

 


http://www.cpgf.org/
cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.
v1.5.5 was released. Now supports tween and timeline for ease animation.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS