[Doc] Plan for updating documentation for 9.1?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 14.6k
- Forks
- 2.3k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Description
Link
https://deck.gl/docs/developer-guide/custom-layers/subclassed-layers
Description
Hi.
It seems that some parts of the documentation has not been updated to reflect the changes in 9.0/9.1. For example this example of adding additional uniforms:
/// rounded-rectangle-layer.js
// Example to draw rounded rectangles instead of circles in ScatterplotLayer
import {ScatterplotLayer} from '@deck.gl/layers';
import customFragmentShader from './rounded-rectangle-layer-fragment';
export default RoundedRectangleLayer extends ScatterplotLayer {
draw({uniforms}) {
super.draw({
uniforms:
{
...uniforms,
cornerRadius: this.props.cornerRadius
}
})
}
getShaders() {
// use object.assign to make sure we don't overwrite existing fields like `vs`, `modules`...
return Object.assign({}, super.getShaders(), {
fs: customFragmentShader
});
}
}
RoundedRectangleLayer.defaultProps = {
// cornerRadius: the amount of rounding at the rectangle corners
// 0 - rectangle. 1 - circle.
cornerRadius: 0.1
}
From quickly looking around the source code, it seems that uniforms are no longer passed like that to the parent class draw call. Or am i missing something?
Is there anything in the works for updating it? Currently it is difficult to update custom subclassed layers from 8.9 to 9.1, due to all the changes in deck.gl 9.1 and luma.gl, and missing / not up to date documentation.
Contributor guide
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.
Research direction
Start with the linked custom subclassed layers documentation and compare its uniform-passing example with the current deck.gl 9.1 and luma.gl behavior described in the issue. Identify the outdated 8.9-era guidance and update the relevant documentation and migration notes so subclassed-layer users can follow the 9.1 approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100