Skip to content

Commit

Permalink
Revert hack in SolidPolygonLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Mar 6, 2024
1 parent 54d7f3c commit 3779efb
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions modules/layers/src/solid-polygon-layer/solid-polygon-layer.ts
Expand Up @@ -456,31 +456,28 @@ export default class SolidPolygonLayer<DataT = any, ExtraPropsT extends {} = {}>
}
});

const geometry = new Geometry({
topology: 'line-strip',
attributes: {
// top right - top left - bottom left - bottom right
positions: {
size: 2,
value: new Float32Array([1, 0, 0, 0, 0, 1, 1, 1])
}
}
});
wireframeModel = new Model(this.context.device, {
...this.getShaders('side'),
id: `${id}-wireframe`,
bufferLayout,
topology: 'line-strip',
uniforms: {
isWireframe: true
},
// geometry, // TODO(v9) investigate why `setGeometry()` is needed
geometry: new Geometry({
topology: 'line-strip',
attributes: {
// top right - top left - bottom left - bottom right
positions: {
size: 2,
value: new Float32Array([1, 0, 0, 0, 0, 1, 1, 1])
}
}
}),
isInstanced: 1,
userData: {
excludeAttributes: {indices: true}
}
});
wireframeModel.setGeometry(geometry);
}

return {
Expand Down

0 comments on commit 3779efb

Please sign in to comment.