Skip to content

Commit

Permalink
fix: no property in non-meshes should be called "material"
Browse files Browse the repository at this point in the history
  • Loading branch information
bbohlender committed Mar 26, 2024
1 parent 85a1e68 commit 6b331c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/uikit/src/panel/instanced-panel-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class InstancedPanelGroup extends Group {
}

constructor(
private readonly material: Material,
private readonly instanceMaterial: Material,
public readonly pixelSize: number,
private readonly cameraDistance: CameraDistanceRef,
private readonly orderInfo: OrderInfo,
Expand Down Expand Up @@ -159,7 +159,7 @@ export class InstancedPanelGroup extends Group {
this.instanceClipping.setUsage(DynamicDrawUsage)
this.mesh = new InstancedPanelMesh(this.instanceMatrix, this.instanceData, this.instanceClipping)
setupRenderOrder(this.mesh, this.cameraDistance, this.orderInfo)
this.mesh.material = this.material
this.mesh.material = this.instanceMaterial
this.mesh.receiveShadow = this.meshReceiveShadow
this.mesh.castShadow = this.meshCastShadow
this.add(this.mesh)
Expand Down
6 changes: 3 additions & 3 deletions packages/uikit/src/text/render/instanced-glyph-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class InstancedGlyphGroup extends Group {
private holeIndicies: Array<number> = []
private mesh?: InstancedGlyphMesh

private material: Material
private instanceMaterial: Material

private timeTillDecimate?: number

Expand All @@ -27,7 +27,7 @@ export class InstancedGlyphGroup extends Group {
private orderInfo: OrderInfo,
) {
super()
this.material = new InstancedGlyphMaterial(font)
this.instanceMaterial = new InstancedGlyphMaterial(font)
}

requestActivate(glyph: InstancedGlyph): void {
Expand Down Expand Up @@ -148,7 +148,7 @@ export class InstancedGlyphGroup extends Group {
this.instanceRGBA,
this.instanceUV,
this.instanceClipping,
this.material,
this.instanceMaterial,
)

//copy over old arrays and merging the holes
Expand Down

0 comments on commit 6b331c9

Please sign in to comment.