refactor: replace createjs.Ticker framerate with requestAnimationFrame idle management#7451
Conversation
|
🧪 Jest Test Results ✅ All Jest tests passed! This PR is ready to merge. Coverage: Statements: 48.09% | Branches: 39.61% | Functions: 52.88% | Lines: 48.5% |
|
AFAIU, Wrap |
|
Thanks for the review @lavjeetrai!
this._startRenderLoop = () => {
if (this._renderLoopRunning) return;
this._renderLoopRunning = true;This ensures only one rAF loop runs at a The existing lock prevents any rAF stampede. |
lavjeetrai
left a comment
There was a problem hiding this comment.
lgtm,thanks for clarification
Category
refactor
Summary
Removes all
createjs.Ticker.frameratecalls andreplaces them with the existing
requestAnimationFramerender loop (
_startRenderLoop).Changes
createjs.Ticker.framerate = 60(initial setup)createjs.Ticker.framerate = ACTIVE_FPSin
_resetIdleTimercreatejs.Ticker.framerate = IDLE_FPSin idle watcher
ACTIVE_FPSandIDLE_FPSconstants_startRenderLoop()now handles idle/active renderingWhy This Is Safe
_startRenderLoop()at line 537 already usesrequestAnimationFrameand callsstage.update()directly. It naturally pauses when
stageDirty=false,making explicit Ticker framerate control redundant.
Testing
Part of CreateJS migration effort for DMP 2026.
PR Category
cc @walterbender @sum2it @omsuneri