Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

AnnotationManager props do not apply to the variables

Open
#306 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
react, typescript
Domain
frontend, web-dev

Research direction

Start with the AnnotationManager entry point in playcanvas/scripts/esm/annotations.mjs and trace how the Script component passes props, comparing hotspotSize with hotspotColor and hoverColor. Reproduce the issue with the provided Script example; it is done when both color props affect the created annotation or the supported usage is clearly documented.

Written by the indexing model from the issue text.

Description

When creating annotations using the Script component such as this:

import { AnnotationManager } from 'playcanvas/scripts/esm/annotations.mjs';
...
<Script
  script={AnnotationManager}
  hotspotSize={200}
  opacity={0.5}
  hotspotColor={[0, 1, 0, 0.5]} // just example numbers
  hoverColor={[1, 0, 0, 1]}
/>

In this case, the hotspotSize is applying correctly, but the hotspotColor and hoverColor do not work.

Is there a better way to use this? The docs do not mention useScript, but I see that the Script component uses this under the hood.

I guess the real question is if Annotations should be created via the Script component, or manually created in useEffects in a custom script or similar.

Dominant language
TypeScript
Stars
536
Forks
60
Avg merge
2d 13h
Merged PRs (30d)
13

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from playcanvas/react

All issues in playcanvas/react

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.