AnnotationManager props do not apply to the variables
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
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from playcanvas/react
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
playcanvas/react#320 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
playcanvas/react#315 · 2 comments ·
Maintainers usually reply within 1 day
-
Expose reference from <Application /> componentMay be free again @abstrakt8 claimed this 250 days ago, and no pull request is open. Openenhancement
playcanvas/react#309 · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
playcanvas/react#308 · 8 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
playcanvas/react#303 · 1 comment ·
Maintainers usually reply within 1 day
All issues in playcanvas/react
Similar issues
-
Flaky: mongodb-memory-server 'Port already in use' when another process starts a mongod concurrentlyOpenarea:testing bug effort:S priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
lens:agent lens:process process
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
thebristolsound/birdbrain#1772 ·
Maintainers usually reply within 1 day
-
bug priority:low ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/data-liberation-agent#685 ·
Maintainers usually reply within 1 day
-
Business
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day