MCPcopy
hub / github.com/julianshapiro/velocity / testFrame

Function testFrame

test/src/2_Option/Option Fps Limit.ts:17–32  ·  view source on GitHub ↗
(frameRate)

Source from the content-addressed store, hash-verified

15 const $target = getTarget(),
16 frameRates = [5, 15, 30, 60],
17 testFrame = (frameRate) => {
18 let counter = 0;
19
20 Velocity.defaults.fpsLimit = frameRate;
21 // Test if the frame rate is assigned succesfully.
22 assert.equal(frameRate, Velocity.defaults.fpsLimit, "Setting global fps limit to " + frameRate);
23
24 return Velocity($target, defaultProperties,
25 {
26 duration: 1000,
27 progress() {
28 counter++;
29 },
30 })
31 .then(() => counter);
32 };
33
34 assert.expect(frameRates.length * 2);
35 // Test if the limit is working for 60, 30, 15 and 5 fps.

Callers 2

test.jsFile · 0.85

Calls 1

VelocityInterface · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…