Skip to content

Conversation

@willeastcott
Copy link
Contributor

Modernize the code in @example blocks by using arrow functions.

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

@willeastcott willeastcott added docs Documentation related enhancement labels Apr 25, 2025
@willeastcott willeastcott self-assigned this Apr 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the code examples in JSDoc blocks by replacing traditional function expressions with arrow functions.

  • Updated examples in multiple modules (scene, xr, asset, etc.) to use arrow functions for callbacks.
  • Enhanced code readability and consistency across documented examples.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/scene/graph-node.js Converted callback functions in example blocks.
src/framework/xr/xr-input-source.js Replaced anonymous functions with arrow functions.
src/framework/xr/xr-hit-test.js Modernized hit test examples with arrow functions.
src/framework/xr/xr-hit-test-source.js Updated callback syntax in examples.
src/framework/xr/xr-anchors.js Converted callbacks in anchor management examples.
src/framework/script.js Modernized loading screen example with arrow functions.
src/framework/scene-registry.js Updated scene loading and settings examples.
src/framework/handlers/container.js Revised container resource examples to use arrow functions.
src/framework/components/camera/component.js Converted camera component example callbacks.
src/framework/bundle/bundle.js Updated bundle event examples with arrow functions.
src/framework/asset/asset.js Replaced asset ready callback with arrow function.
src/framework/asset/asset-registry.js Modernized asset registry examples with arrow functions.

@willeastcott willeastcott merged commit 5097e23 into main Apr 27, 2025
7 checks passed
@willeastcott willeastcott deleted the docs-use-arrow branch April 27, 2025 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants