[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
XWidgetSoft Forum :: View topic - HELP: How to make a second hand move more smoothly : CLOSED
XWidgetSoft Forum
https://bbs.xwidget.com/

HELP: How to make a second hand move more smoothly : CLOSED
https://bbs.xwidget.com/viewtopic.php?f=8&t=6052
Page 1 of 1

Author:  yereverluvinuncleber [ December 4th, 2015, 8:47 am ]
Post subject:  HELP: How to make a second hand move more smoothly : CLOSED

I have a rotator for a second hand and have bound it to the datetimecore using the ${SecondPercent} tag to control clock hand movement. The hand moves one tick each second.

I would like to make the hand move more smoothly and to slide around the face moving in tenths of a second divisions. Is there a tag that does this automatically or do I have to do it in code?

Author:  yereverluvinuncleber [ December 8th, 2015, 4:20 am ]
Post subject:  Re: HELP: tag to make a second hand move more smoothly - CLO

BUMP: anyone out there with an idea as to how to do this with the IDE, timer cores and tags?

I can simply do it in code using javascript with the following function called by a timer with an interval of 0.1s

function updateTime() {
var theDate = new Date();

var theSeconds = theDate.getSeconds();
var theMilliseconds = theDate.getMilliseconds();
var useSeconds = Math.round(10 * (theSeconds + (theMilliseconds / 1000))) / 10;
secondHand.RotateAngle = (useSeconds * 6) % 360;
}

The above code is standard .js and might need fettling for Xwidget to extract the date/time information - Xwidget provides this sort of data.

Click on the second hand and unbind the datetimecore2 and remove the tag.
Clicking on datetimecore2 allows you to select the functions for it - you should add 'updateTime'.
This got the hands rotating at a 1 second interval.

Set the interval on datetime core to 100ms, smooth animation now achieved.

Do the same for any shadow image you have created and the shadow will rotate in synch. with the second hand.

Note: the hands only rotate when the widget is running and not in the IDE.

Author:  Jimking [ December 8th, 2015, 6:08 am ]
Post subject:  Re: HELP: tag to make a second hand move more smoothly

I don't understand very well your thought man, but check the "Animate" tab -> Switch Aanimation and test the various combinations/effects changing also the "Duration (Sec)". Keep in mind to control the cpu usage though...

Author:  yereverluvinuncleber [ December 8th, 2015, 3:03 pm ]
Post subject:  Re: HELP: tag to make a second hand move more smoothly

I'll have a look, thanks - but the usage of the switch animation is completely unclear to me and in the absence of any documentation I don't currently see how to use this part of the Xwidget IDE. If you have used it and have some examples then I'd appreciate the help.

Instead I have added that javascript function which is called by the datetime core on the onUpdate event. Instead of using the Xwidget functions it uses the rotateAngle property to rotate the second hand. It seems to work very well.

What I was looking for Jim is a way of using the ${SecondPercent} tag or similar to move the second hand smoothly rather than jerkily, the ${SecondPercent} tag rotates the hand only once per second.

That Konfabulator widget, the thread of which you deleted earlier, shows exactly how I want the hand to move.

Author:  Jimking [ December 8th, 2015, 4:53 pm ]
Post subject:  Re: HELP: tag to make a second hand move more smoothly


Author:  yereverluvinuncleber [ December 8th, 2015, 6:15 pm ]
Post subject:  Re: HELP: tag to make a second hand move more smoothly

Thankyou Jim, I'll post the widget here shortly for you to have a look at. That widget you directed me to should be enough as it does some nifty stuff - I'll have a look and see how it does what it does, thanks!

Author:  yereverluvinuncleber [ December 8th, 2015, 6:33 pm ]
Post subject:  Re: HELP: tag to make a second hand move more smoothly

That is a very nifty effect and I do like it. I see what you are trying to recommend, to add a linear effect to the rotation of the hand, I can't get it to work but I like the idea.

Author:  yereverluvinuncleber [ December 12th, 2015, 8:09 am ]
Post subject:  Re: HELP: tag to make a second hand move more smoothly

See my second post on how I fixed it. Doing it in javascript code is much more simple than trying to figure out how to use an undocumented feature in Xwidgets.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/