Skip to content

Commit

Permalink
bug: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Pejosonic authored Aug 7, 2024
1 parent 1ae6b7e commit a70695c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/gameConfig/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export let SCENE_PARENT: Entity

export function init() {
const { config, engine, Transform } = getSDK()

GAME_ID = config.gameId
let _env = config.environment

Expand All @@ -29,7 +29,7 @@ export function init() {
SCENE_PARENT = engine.addEntity()
Transform.create(SCENE_PARENT, {
position: Vector3.create(8, 0, 8),
rotation: Quaternion.fromEulerDegrees(0, config.sceneRotation ? config.sceneRotation : 0, 0),
rotation: Quaternion.fromEulerDegrees(0, config.sceneRotation ? config.sceneRotation : 0, 0),
scale: Vector3.One()
})
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { initEnvironment } from './environment'
export type IConfig = {
gameId: string
environment: string
gameTimeoutMs?: number,
gameTimeoutMs?: number
sceneRotation?: number
}

Expand Down
2 changes: 1 addition & 1 deletion src/ui/instructions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class InstructionsBoard {
height: number = 3.65
width: number = 6.3

constructor(transform: TransformTypeWithOptionals, width: number, height: number, texturePath:string) {
constructor(transform: TransformTypeWithOptionals, width: number, height: number, texturePath: string) {
const { engine, Transform, MeshRenderer, Material } = getSDK()
this.width = width
this.height = height
Expand Down
22 changes: 11 additions & 11 deletions src/utilities/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { Quaternion, Vector3 } from '@dcl/sdk/math'

export function rotateVectorAroundCenter(vec: Vector3, vecCenter: Vector3, rot: Quaternion){
let vecResult = Vector3.subtract(vec, vecCenter)
vecResult = Vector3.rotate(vecResult, rot)
vecResult = Vector3.add(vecResult, vecCenter)
export function rotateVectorAroundCenter(vec: Vector3, vecCenter: Vector3, rot: Quaternion) {
let vecResult = Vector3.subtract(vec, vecCenter)
vecResult = Vector3.rotate(vecResult, rot)
vecResult = Vector3.add(vecResult, vecCenter)

return vecResult
return vecResult
}

export function isVectorInsideArea(vec: Vector3, areaPt1: Vector3, areaPt2: Vector3){
let minX = Math.min(areaPt1.x, areaPt2.x)
let maxX = Math.max(areaPt1.x, areaPt2.x)
export function isVectorInsideArea(vec: Vector3, areaPt1: Vector3, areaPt2: Vector3) {
const minX = Math.min(areaPt1.x, areaPt2.x)
const maxX = Math.max(areaPt1.x, areaPt2.x)

let minZ = Math.min(areaPt1.z, areaPt2.z)
let maxZ = Math.max(areaPt1.z, areaPt2.z)
const minZ = Math.min(areaPt1.z, areaPt2.z)
const maxZ = Math.max(areaPt1.z, areaPt2.z)

return vec.x > minX && vec.x < maxX && vec.z > minZ && vec.z < maxZ
return vec.x > minX && vec.x < maxX && vec.z > minZ && vec.z < maxZ
}

0 comments on commit a70695c

Please sign in to comment.