Skip to content

Commit

Permalink
fix: Indices attribute workaround (#1776)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen authored Aug 8, 2023
1 parent e748267 commit 423627e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/engine/src/model/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ export class Model {
}

setAttributes(attributes: Record<string, Buffer>): this {
// Temporary HACK since deck.gl v9 sets indices as part of attributes
if (attributes.indices) {
this.setIndexBuffer(attributes.indices);
attributes = {...attributes};
delete attributes.indices;
console.warn('luma.gl: indices should not be part of attributes')

Check warning on line 149 in modules/engine/src/model/model.ts

View workflow job for this annotation

GitHub Actions / test (16)

Unexpected console statement
}
this.pipeline.setAttributes(attributes);
Object.assign(this.props.attributes, attributes);
return this;
Expand Down

0 comments on commit 423627e

Please sign in to comment.