SetHalfFramerateMode in system.js

For developers using the Construct 2 Javascript SDK

Post » Wed Jun 11, 2014 3:04 am

Hi, @Ashley

I find that there has a function named "SetHalfFramerateMode" in system.js. It looks like to set the frame rate to 30 (half of 60). But I could not find it at actions list in event sheet.
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

Post » Wed Jun 11, 2014 9:54 am

It was deliberately removed some time ago (it doesn't work properly), but our general policy when removing features is to deprecate them (hide them so new users can't add it to new projects) so that existing projects using it don't crash or fail to open.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Wed Jun 11, 2014 10:15 am

@Ashley

But the condition and handle is still in tick() function
line 1639 in preview.js
Code: Select all
if (this.halfFramerateMode && this.ranLastRaf)
....


Although the this.halfFramerateMode will always be false.
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

Post » Wed Jun 11, 2014 11:04 am

Yep, the code is there but cold in case we wanted to easily turn it on again. (But there are no plans to.)
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests