Type error in the EcctrlJostick.tsx file

Open
#137 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
react, three.js, typescript
Domain
frontend

Research direction

Open EcctrlJostick.tsx and run the project's TypeScript check to inspect the geometry, material, and DOM query errors described in the issue. Done means the reported assignments and possible null result are accepted by TypeScript without introducing new errors.

Written by the indexing model from the issue text.

Description

I found typing issues in the EcctrlJostick.tsx file. Buttons of type THREE.CylinderGeometry are not compatible with the geometry parameter of the mesh component; geometry is of type BufferGeometry | Readonly<BufferGeometry. The same thing happens with the material property.

Example:
<mesh geometry={buttonLargeBaseGeo} material={buttonBaseMaterial} ... />

Image

Similarly, when searching for elements in the DOM, they may be null.
Example:
const buttonDiv: HTMLDivElement = document.querySelector("#ecctrl-button")

Image

I'm using Next.js version 15.3.2 and the ecctrl library 1.0.92.

Dominant language
TypeScript
Stars
823
Forks
102
PR merge metrics
No merged PRs in 30d

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 pmndrs/ecctrl

All issues in pmndrs/ecctrl

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.