aframevr / aframevr/aframe

color property types should be able to take a THREE.Color or rgb vector

Open
#1,331 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request perf
Dominant language
JavaScript
Stars
17.6k
Forks
4.4k
PR merge metrics
No merged PRs in 30d

Description

Description: In animations, we have to convert from rgb vector/three.color to a hex string every time we want to set attribute on a color. Would be good to have color parser handle setAttribute(component, colorPropType, {r: 0, g: 0, b: 0} and defer the stringification to hex.

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating the color property parser and the animation path that calls setAttribute, as described in the issue. Verify how THREE.Color and {r, g, b} values are currently handled, then confirm that both forms are accepted and stringification to a hex value is deferred until needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, three.js
Domain
frontend, web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.