Skip to content

Fix VR mode handling in plugin#1

Open
keilyn3d wants to merge 2 commits into
masterfrom
fix-vr-mode
Open

Fix VR mode handling in plugin#1
keilyn3d wants to merge 2 commits into
masterfrom
fix-vr-mode

Conversation

@keilyn3d

Copy link
Copy Markdown
Owner

Add VR mode handling to html2canvas plugin to read DOM state and avoid caching and requestAnimationFrame.

  • src/index.ts

    • Add vrMode option to ContextOptions.
    • Update renderElement function to handle VR mode.
  • src/core/cache-storage.ts

    • Add condition to bypass caching when in VR mode.
    • Update addImage and match methods to handle VR mode.
  • src/core/context.ts

    • Add vrMode flag to Context class.
    • Update constructor to accept a VR mode parameter.
  • src/tests/index.ts

    • Add tests to verify the plugin's behavior in VR mode.
    • Update existing tests to handle VR mode.

Add VR mode handling to html2canvas plugin to read DOM state and avoid caching and requestAnimationFrame.

* **src/index.ts**
  - Add `vrMode` option to `ContextOptions`.
  - Update `renderElement` function to handle VR mode.

* **src/core/cache-storage.ts**
  - Add condition to bypass caching when in VR mode.
  - Update `addImage` and `match` methods to handle VR mode.

* **src/core/context.ts**
  - Add `vrMode` flag to `Context` class.
  - Update constructor to accept a VR mode parameter.

* **src/__tests__/index.ts**
  - Add tests to verify the plugin's behavior in VR mode.
  - Update existing tests to handle VR mode.
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