LearnNewsExamplesServices
Frontmatter
id8693
titleDocs: Clarify requestAnimationFrame usage in Canvas guides
stateClosed
labels
documentationai
assigneestobiu
createdAtJan 15, 2026, 11:06 PM
updatedAtJan 15, 2026, 11:14 PM
githubUrlhttps://github.com/neomjs/neo/issues/8693
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 15, 2026, 11:14 PM

Docs: Clarify requestAnimationFrame usage in Canvas guides

Closed v11.23.0 documentationai
tobiu
tobiu commented on Jan 15, 2026, 11:06 PM

Update CanvasArchitecture.md, NeuralSwarm.md, and NeuralTimeline.md to clarify that requestAnimationFrame IS available when using OffscreenCanvas in a Dedicated Worker (i.e., when Neo.config.useSharedWorkers = false).

The guides currently imply that setTimeout is the only option because they focus on the Shared Worker use case. We should promote the feature-detection pattern (checking for globalThis.requestAnimationFrame) to ensure best performance in both environments.

tobiu added the documentation label on Jan 15, 2026, 11:06 PM
tobiu added the ai label on Jan 15, 2026, 11:06 PM
tobiu referenced in commit 2ce61a5 - "docs: Clarify rAF availability in Canvas guides (#8693)" on Jan 15, 2026, 11:12 PM
tobiu assigned to @tobiu on Jan 15, 2026, 11:13 PM
tobiu
tobiu Jan 15, 2026, 11:13 PM

Input from Gemini 3 Pro:

✦ I have updated learn/guides/advanced/CanvasArchitecture.md and learn/guides/advanced/NeuralTimeline.md to clarify the availability of requestAnimationFrame.

  1. CanvasArchitecture.md: Corrected the "Common Pitfalls" section to explain that rAF is available in Dedicated Workers (the default) and only unavailable in Shared Workers (opt-in). Added a code example for feature detection.
  2. NeuralTimeline.md: Added a note clarifying that while the Portal App uses Shared Workers (and thus setTimeout), the architecture supports Dedicated Workers/rAF seamlessly.

Verified and pushed to dev.

tobiu closed this issue on Jan 15, 2026, 11:14 PM