Skip to content

Commit

Permalink
fix: eslinter
Browse files Browse the repository at this point in the history
  • Loading branch information
agustincarriso committed Jan 16, 2025
1 parent 1a4d43b commit a331ec8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/coinshop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export class CoinShop {

ts.width = 80
ts.height = 40

ts.textAlign = TextAlignMode.TAM_TOP_CENTER
// ts.fontWeight = "bold";

Expand Down
18 changes: 11 additions & 7 deletions src/ui/colorplane.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Billboard, BillboardMode, engine, Material, MeshCollider, MeshRenderer, Transform } from '@dcl/sdk/ecs'
import { Color4, Quaternion, Vector3 } from '@dcl/sdk/math'
import { Color4, Quaternion, Vector3 } from '@dcl/sdk/math'

/**
* A simple PlaneShape with a solid color texture.
Expand Down Expand Up @@ -31,7 +31,11 @@ export class ColorPlane {
MeshRenderer.setPlane(this.entity)
MeshCollider.setPlane(this.entity)

Transform.createOrReplace(this.entity,{position: _pos,scale: _scale, rotation: Quaternion.fromEulerDegrees(_angles.x,_angles.y,_angles.z)})
Transform.createOrReplace(this.entity, {
position: _pos,
scale: _scale,
rotation: Quaternion.fromEulerDegrees(_angles.x, _angles.y, _angles.z)
})

this.changeHexColor(_hexColor)

Expand All @@ -41,13 +45,13 @@ export class ColorPlane {
}

changeColor(_color: Color4): void {
if (Material.getMutableOrNull(this.entity)!= null){
if (Material.getMutableOrNull(this.entity) != null) {
Material.deleteFrom(this.entity)
}
Material.setPbrMaterial(this.entity, {
albedoColor: _color,
roughness: 0.9,
specularIntensity: 0,
specularIntensity: 0
})
}

Expand All @@ -56,14 +60,14 @@ export class ColorPlane {
}

hide(): void {
if (Material.getMutableOrNull(this.entity)!= null){
if (Material.getMutableOrNull(this.entity) != null) {
// add hide logics
}
}

show(): void {
if (Material.getMutableOrNull(this.entity)!= null){
// add show logics
if (Material.getMutableOrNull(this.entity) != null) {
// add show logics
}
}
}

0 comments on commit a331ec8

Please sign in to comment.