Fix for object depths and proper depths for rotated objects

This commit is contained in:
2025-03-20 15:17:34 -05:00
parent 632f2c9770
commit 661abd030f
2 changed files with 2 additions and 12 deletions

View File

@ -14,10 +14,7 @@ export class BaseMapObject extends BaseEntity {
tags: string[] = []
@Property({ type: 'json' })
depthOffsets = [0]
@Property({ type: 'json' })
pivotPoints: { x: number; y: number }[] = []
depthOffsets: number[] = [0]
@Property({ type: 'decimal', precision: 10, scale: 2 })
originX = 0
@ -67,15 +64,10 @@ export class BaseMapObject extends BaseEntity {
return this.tags
}
setDepthOffsets(offsets: any) {
setDepthOffsets(offsets: number[]) {
this.depthOffsets = offsets
}
setPivotPoints(pivotPoints: { x: number; y: number }[]) {
this.pivotPoints = pivotPoints
return this
}
getDepthOffsets() {
return this.depthOffsets;
}