Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an object property that changes all the materials by a color #211

Closed
jscastro76 opened this issue Mar 26, 2021 · 0 comments
Closed
Assignees
Labels
🍏 feature New feature or request
Milestone

Comments

@jscastro76
Copy link
Owner

Describe the solution you'd like
Some scenarios require to highlight an object visually, an option could be to paint the object in one single color. This color should be ideally an hexadecimal value (following three.js constructor), and it will change the colors of all the materials of the object:

obj.color = 0xff0000 //this will paint the object in red

The property should be able to restore the original colors and materials setting it to null

obj.color = null //this will restore object original colors

A more advanced approach could be to accept all the different variations of color values a material accepts

@jscastro76 jscastro76 added the 🍏 feature New feature or request label Mar 26, 2021
@jscastro76 jscastro76 added this to the v.2.2.0. milestone Mar 26, 2021
@jscastro76 jscastro76 self-assigned this Mar 26, 2021
@jscastro76 jscastro76 modified the milestones: v.2.2.0., v2.2.1. Mar 26, 2021
jscastro76 added a commit that referenced this issue Mar 29, 2021
- #211 Create an object property that changes all the materials by a color
jscastro76 added a commit that referenced this issue Apr 3, 2021
Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements and bugs.

#### ✨ Enhancements
- #212 Allow to remove an object by name
- #211 Create an object property that changes all the materials by a color
- #169 Update to Three.js v127
  - #214 Full refactor of tb.tube
  - #215 Refactor tb.line
  - #216 Refactor tb.update
  - #217 utils.material should allow THREE.DoubleSide
  - #218 Remove CustomEvent from events
  - #219 Remove .getInverse()
  - #220 Update Loaders
  - #221 Add fflate module

#### 🪲 Bug fixes
- #222 fflate depends on a physical file

#### 📝 Documentation
- Updated [documentation](/docs/Threebox.md) (`obj.color`, `tb.removeByName`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍏 feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant