Skip to content

Commit

Permalink
fix: not projecting on all screens introduced by #13
Browse files Browse the repository at this point in the history
  • Loading branch information
fidelthomet committed Jan 30, 2025
1 parent 48f799e commit cf1204d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Projection.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ export default class Projection {

set index (index) {
this.#index = index
for (const layer in this.material) {
Object.keys(this.material).forEach(layer => {
if (layer === 'vantage-renderer') return
this.#layers[layer].material[this.index] = this.material[layer]
}
})
}

get index () {
Expand Down Expand Up @@ -300,7 +301,11 @@ export default class Projection {
})

this.#layers[layer].geometry.addGroup(0, Infinity, this.#layers[layer].geometry.groups.length)
this.#layers[layer].material[this.index] = this.material[layer]
if (layer === 'vantage:screen') {
this.#layers[layer].material.push(this.material[layer])
} else {
this.#layers[layer].material[this.index] = this.material[layer]
}
}

this.updateLayers()
Expand Down

0 comments on commit cf1204d

Please sign in to comment.