Skip to content

docs: update for canvas 3.0.0 - #2

Merged
triniwiz merged 1 commit into
mainfrom
docs/canvas-v3
Nov 8, 2026
Merged

triniwiz merged 1 commit into
mainfrom
docs/canvas-v3

Conversation

@triniwiz

@triniwiz triniwiz commented Nov 8, 2026

Copy link
Copy Markdown
Member

Brings the docs up to date with @nativescript/canvas 3.0.0.

New pages

  • OffscreenCanvas and Workers (/canvas/guides/offscreen-canvas): drawing with no view, transferControlToOffscreen(), and rendering in a Worker. Android and iOS send a handle with OffscreenCanvas._toHandle(), and Windows uses a postMessage transfer list. Includes one version that works on every runtime.
  • Web API Compatibility (/canvas/compatibility): every interface, with what is supported, what is a no-op, and what isn't available yet.
  • canvas-svg Styling (/canvas-svg/guides/styling): the stylesheet property, view styles the document inherits, and the supported selectors.

Updated

  • Installation: Windows and Linux in the platform table. The context table shows the backend each context uses on each platform.
  • Performance:
    • Threaded rendering: 2D and WebGL do their GPU work on another thread by default on Android, iOS and Windows. Covers which calls wait for that thread, how requestAnimationFrame holds back, and how to opt out.
    • Memory: encoded images stay encoded, V8 sees image memory, and unused GPU resources are freed.
  • Rendering Contexts / API Overview: the threaded attribute, Canvas.threaded2D / threadedWebGL, @nativescript/canvas/worker, and the OffscreenCanvas globals.
  • Images and ImageBitmap:
    • ImageAsset.toImageSource() and toNativeImage().
    • createImageBitmap rejects bytes it can't decode.
    • A WebGPU canvas works as a WebGL texImage2D source on Windows and Linux.
  • Upgrading to 3.0: a Threading section, plus the WebGL, image and svg behaviour changes that landed late in the 3.0 cycle.
  • WebGPU recipes / canvas-media: importExternalTexture now works on Android 10+ (with an RGB decoder), Windows and Linux. Previously documented as throwing on Android.
  • canvas-svg: the stylesheet property and error event. CSS animations can be started by any selector, not only #id.
  • Gamepad, audio-context, polyfill, events, home pages: Windows and Linux where each package supports them.

vitepress build passes, including its dead-link check. In-page anchors were checked against the built HTML.

- New pages: OffscreenCanvas and Workers, Web API Compatibility, and
  canvas-svg Styling
- Windows and Linux in the platform and context tables, and across the
  svg, media, gamepad, audio-context and polyfill pages
- Performance: threaded 2D and WebGL rendering (what waits on the
  thread, how to opt out) and image/GPU memory behaviour
- Images: ImageAsset toImageSource() and toNativeImage(), and
  createImageBitmap rejecting undecodable bytes
- WebGPU: importExternalTexture on Android 10+, Windows and Linux
- canvas-svg: the stylesheet property, the error event, and CSS
  animations started by any selector
- Upgrading to 3.0: the late threading, WebGL, image and svg
  behaviour changes
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d4da03e8-0390-485f-9829-10932b06d7c9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@triniwiz
triniwiz merged commit e350da1 into main Nov 8, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant