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

extrusion.materials null by default, but not labelled as 'required' in documentation #310

Closed
janhaa opened this issue Dec 29, 2021 · 2 comments
Assignees
Labels
📑 code improvement 📝 documentation Improvements or additions to documentation
Milestone

Comments

@janhaa
Copy link

janhaa commented Dec 29, 2021

Describe the bug
When trying to create extrusion e.g. like this:

tb.extrusion({
  coordinates: [[[]]]
});

following error is given:

materials is required
| _validate | @ | utils.js?93b5:403
| extrusion | @ | extrusion.js?4ab9:18
| extrusion | @ | Threebox.js?8949:699

This seems to be because in

materials: null,
the default for materials is set to null.

Expected to have materials attribute labelled as 'required' here: https://github.com/jscastro76/threebox/blob/master/docs/Threebox.md#extrusion

All the best and thank you for the great project!

@janhaa janhaa added the 🪲 bug Something isn't working label Dec 29, 2021
@jscastro76 jscastro76 added 📝 documentation Improvements or additions to documentation and removed 🪲 bug Something isn't working labels Dec 29, 2021
@jscastro76
Copy link
Owner

Thanks, yes it must be required in the documentation

@jscastro76 jscastro76 self-assigned this Jan 10, 2022
@jscastro76 jscastro76 added this to the v.2.2.6. milestone Jan 10, 2022
@jscastro76
Copy link
Owner

Added a new material by default and updated the sample 18 to don't send materials on the features painted.

jscastro76 added a commit that referenced this issue Jan 10, 2022
Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements and bugs.

#### ✨ Enhancements
- #310 extrusion.materials null by default, but not labelled as 'required' in documentation
  - THREE.MeshPhongMaterial({ color: 0x660000, side: THREE.DoubleSide }) added as default material to extrusions

#### 🪲 Bug fixes
- #319 dat.gui.module has changed in threejs
- #320 Cannot read properties of undefined (reading 'appendChild')

#### 📝 Documentation
- Updated [Threebox documentation](/docs/Threebox.md) (`tb.extrusion` param `materials`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📑 code improvement 📝 documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants