Skip to content

Commit

Permalink
[Chore]: Technical: Translate deckgl-layers/line-layer (#1792)
Browse files Browse the repository at this point in the history
Renamed js file

Signed-off-by: Maksim Suslov <maksim.suslov@actionengine.com>
  • Loading branch information
HeimEndyd committed Apr 21, 2022
1 parent 013b987 commit 0de32be
Showing 1 changed file with 8 additions and 5 deletions.
Expand Up @@ -18,9 +18,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import {LineLayer} from '@deck.gl/layers';
import {LineLayer, LineLayerProps} from '@deck.gl/layers';
import GL from '@luma.gl/constants';
import {editShader} from 'deckgl-layers/layer-utils/shader-utils';
import {editShader} from '../../deckgl-layers/layer-utils/shader-utils';

const defaultProps = {
...LineLayer.defaultProps,
Expand Down Expand Up @@ -62,7 +62,7 @@ function addElevationScale(vs) {
vec3 targetPosAdjusted = instanceTargetPositions;
sourcePosAdjusted.z *= elevationScale;
targetPosAdjusted.z *= elevationScale;
geometry.worldPosition = sourcePosAdjusted;
geometry.worldPositionAlt = sourcePosAdjusted;`
);
Expand All @@ -84,7 +84,10 @@ function addElevationScale(vs) {
return elevationVs;
}

export default class EnhancedLineLayer extends LineLayer {
export default class EnhancedLineLayer extends LineLayer<
any,
LineLayerProps<any> & {elevationScale: number}
> {
getShaders() {
const shaders = super.getShaders();

Expand All @@ -103,7 +106,7 @@ export default class EnhancedLineLayer extends LineLayer {
}

initializeState() {
super.initializeState();
super.initializeState(undefined);
const {attributeManager} = this.state;
attributeManager.addInstanced({
instanceTargetColors: {
Expand Down

0 comments on commit 0de32be

Please sign in to comment.