plasma-devel@kde.org Subject: Re: javascript animations Aaron >we now have themable animation support in libplasma. one of the things >we've >been dreaming of since the original Animator class was born has come true Glad to know that I helped to make dreams come true (plus it provides a heck of ego boost!). :-) Attending tokamak and being able to discuss the subject with you, Marco and Richard was essential to get this rolling. >* a desktop theme can include one or more JS scripts in the animations/ >subdirectory. each file can contain multiple animation definitions, each >of >which must be registered by calling registerAnimation(String name, >Function >func) in the script Sweet! I was expecting that AnimationEngine::loadScript() would require some further love to get this done. Nice surprise. >* scripted animation registration is "first come, first serve" so until >the >theme is changed, animations can not overwrite each other. this should >keep >things a sane (e.g. fallback themes won't overwrite existing anim defs) I was wondering if a namespace approach could extend this in the future? The advantage of this FIFO approach is that we ensure that the users can't mix animations of different themes, thus guarantees consistency. >what is left to do: >*do an audit of the js API for animations to make sure it does everything >we >need/want, such as animation groups This is working fine, at least in my tests in the playground. Some other missing bits that I recall from the top of my head: - export the easing curves to the js engine, since without this all the js animation logic would be linear. - allow more initialization parameters while creating the jsanim object/function/instance/whatever - support calling a 'resetAnimation' method in the jsanim when the animation is over to reset the target widget status properties accordingly (required if we want to port the PulseAnimation to js) >Do you have anything in mind for using QML in themes? As QML can also >define >animations, I was wondering how it would conflict/help with the JS >Animations ? Morpheuz, not sure about this (maybe wait for QML to mature a little more?). I can imagine that we could provide an Animator::create() factory that would generate an animation object based in a QML file along the lines of what exists for js? I'm just not sure if we could share the script engine (i.e. execution context) between them. Best regards Adenilson a.k.a. Savago INdT - Instituto Nokia de Tecnologia _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel