-
Notifications
You must be signed in to change notification settings - Fork 19
Enhance SplatViewer and documentation updates #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Introduced new `Check` and `Dash` components for improved UI feedback in the SplatViewer documentation. - Updated `registry-mdx-components` to include new components and adjusted imports for better organization. - Enhanced the `SplatViewer` component with new controls and improved camera functionality. - Updated `package.json` to streamline the build process by chaining the `postbuild` command with `registry:build`. - Revised documentation to reflect the latest features and improvements, including new API references and usage examples. These changes enhance the user experience and provide clearer guidance for developers using the SplatViewer component.
commit: |
There was a problem hiding this 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 enhances the SplatViewer component and its documentation by adding new features, components, and improvements to the underlying animation and camera controls while updating registry metadata and MDX components. Key changes include:
- The introduction of new Check and Dash UI components for documentation.
- Updates to SplatViewer and SmartCamera components, including the new autoPlay and onTypeChange options as well as improved styling and animation functionality.
- Adjustments to registry and MDX components for better organization and clearer API references.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
packages/docs/registry/splat-viewer/utils/style.ts | Added a centralized style configuration (paris) for the viewer. |
packages/docs/registry/splat-viewer/utils/animation.ts | Introduced a new rotation track creator and its associated type definitions. |
packages/docs/registry/splat-viewer/splat-viewer.tsx | Updated the SplatViewer component to integrate SmartCamera, add autoPlay support, and clean up camera control props. |
packages/docs/registry/splat-viewer/splat-viewer-context.tsx | Enhanced context provider with autoPlay defaults and expanded API documentation comments. |
packages/docs/registry/splat-viewer/smart-camera.tsx | Added the SmartCamera component to handle interactive and animation modes using timeline subscriptions. |
packages/docs/registry/splat-viewer/index.tsx | Reorganized exports to include new controls and timeline modules. |
packages/docs/registry/splat-viewer/controls.tsx | Created a new Controls component with auto-hide functionality based on interaction state. |
packages/docs/registry.json & packages/docs/public/r/*.json | Updated registry metadata to reflect new component names, homepage links, and versioning. |
packages/docs/registry-mdx-components.tsx & packages/docs/mdx-components.js | Updated MDX component registrations to include the new Controls component and adjust import paths. |
packages/docs/content/blocks.mdx | Refined demo content to showcase new features, autoPlay behavior, and Check/Dash component usage. |
packages/docs/components/Check.tsx | Introduced Check and Dash components to visually indicate features in documentation. |
packages/docs/package.json | Modified postbuild script to chain registry:build after pagefind processing. |
|
||
console.log('interactive camera', initialPose); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove or disable the debug log 'console.log('interactive camera', initialPose);' to avoid unintended console output in production.
console.log('interactive camera', initialPose); | |
if (process.env.NODE_ENV !== 'production') { | |
console.log('interactive camera', initialPose); | |
} |
Copilot uses AI. Check for mistakes.
/** | ||
* Whether to automatically play the animation | ||
*/ | ||
autoPlay?: boolean, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'autoPlay' property is declared in both SplatViewerComponentProps and in the combined SplatViewerProps; please consolidate these definitions to avoid redundancy and potential ambiguity.
/** | |
* Whether to automatically play the animation | |
*/ | |
autoPlay?: boolean, | |
// Removed redundant autoPlay property from SplatViewerProps |
Copilot uses AI. Check for mistakes.
}) { | ||
const entityRef = useRef<PcEntity>(null); | ||
const { subscribe, isPlaying } = useTimeline(); | ||
console.log('isPlaying', isPlaying); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider removing the debug log 'console.log('isPlaying', isPlaying);' to prevent unnecessary logging in production builds.
console.log('isPlaying', isPlaying); |
Copilot uses AI. Check for mistakes.
Check
andDash
components for improved UI feedback in the SplatViewer documentation.registry-mdx-components
to include new components and adjusted imports for better organization.SplatViewer
component with new controls and improved camera functionality.package.json
to streamline the build process by chaining thepostbuild
command withregistry:build
.These changes enhance the user experience and provide clearer guidance for developers using the SplatViewer component.