feat(stage-ui): LookAt 3 functions: looking at camera; looking at mouse; looking forward (tracking disabled)#326
Conversation
✅ Deploy Preview for airi-vtuber ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for airi-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Summary of Changes
Hello @Lilia-Chen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
I've implemented a new feature that significantly enhances the interactivity of VRM models by allowing users to control how the model's eyes track. This update provides three distinct options: the model's eyes can follow the camera, track the user's mouse cursor, or remain fixed looking straight ahead. This provides greater flexibility and realism for VRM model interactions within the application.
Highlights
- New Eye-Tracking Modes: I've introduced three distinct eye-tracking modes for VRM models: 'Camera' (model's eyes follow the camera's perspective), 'Mouse' (model's eyes track the user's mouse cursor on the screen), and 'Disabled' (model's eyes look straight forward, ignoring external input).
- User Interface for Mode Selection: I've added a new section to the VRM model settings in the UI, providing intuitive buttons for users to easily switch between the 'Camera', 'Mouse', and 'Disabled' eye-tracking modes.
- Core Eye-Tracking Logic: I've implemented the underlying logic to handle each eye-tracking mode. For 'Mouse' tracking, this includes raycasting from the camera through the mouse cursor to determine a 3D target point for the model's gaze. The 'Disabled' mode sets a fixed forward-looking target.
- Internationalization Support: I've updated the internationalization files (English and Chinese) to include the new 'eye-tracking-mode' label, ensuring the UI is properly localized.
- State Management and Persistence: I've integrated the new eye-tracking mode and target position into the VRM store, ensuring that the selected mode and the model's eye height are persisted across sessions using local storage.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request adds eye tracking functionality to the VRM model, allowing it to look at the camera, the mouse, or straight ahead. The implementation is mostly solid, but I've found a couple of important issues. There's a bug in the mouse tracking logic that incorrectly calculates the look-at target's depth, and a typo in a local storage key in the VRM store. I've also pointed out some areas for improvement regarding code duplication and consistency in comment language. Addressing these points will improve the correctness and maintainability of the new feature.
packages/stage-ui/src/components/Scenarios/Settings/ModelSettings/VRM.vue
Outdated
Show resolved
Hide resolved
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
packages/stage-ui/src/components/Scenarios/Settings/ModelSettings/VRM.vue
Outdated
Show resolved
Hide resolved
packages/stage-ui/src/components/Scenarios/Settings/ModelSettings/VRM.vue
Outdated
Show resolved
Hide resolved
packages/stage-ui/src/components/Scenarios/Settings/ModelSettings/VRM.vue
Outdated
Show resolved
Hide resolved
…ngs/VRM.vue Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Neko <neko@ayaka.moe>
…ngs/VRM.vue Co-authored-by: Neko <neko@ayaka.moe>
…se; looking forward (tracking disabled) (moeru-ai#326) --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Neko <neko@ayaka.moe>
Description
This is an update for the last PR regarding the look at functionality for VRM models. User can now switch between 3 types of eye tracking modes: looking at mouse, looking at camera, and looking forward
Linked Issues
#318
Additional context
None.