Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements text chat settings for the
3d-web-experience
.With this change, users can easily set up the text chat to be automatically
visible
andpinned
by default when the app starts, and also provide options for theusername
hash to color
feature, which improves chat readability by assigning colors deterministically to each username on the text chat.The new
Networked3dWebExperienceClientConfig
options are:chatVisibleByDefault?: boolean
(optional. defines if chat will be immediately visible and pinned when the app starts. If not provided, it will default totrue
);userNameToColorOptions?: StringToHslOptions
(optional. defineshueThresholds
,saturationThresholds
, andlightnessThresholds
for the logic that assigns a deterministic color perusername
. If not provided, it will default to the values illustrated on the usage example below.Usage example for
multi-user-3d-web-experience/client/src/index.ts
:The example above already shows the default values for the
userNameToColorOptions
. This option can also be used in a future PR to set the same color for the label that shows above the character showing its user name.What kind of change does your PR introduce? (check at least one)
Does your PR fulfill the following requirements?
2024-06-13.11-51-16.mp4