Added pivot point logic
This commit is contained in:
@ -10,8 +10,11 @@ export class BaseMapObject extends BaseEntity {
|
||||
@Property()
|
||||
name!: string
|
||||
|
||||
@Property({ type: 'json', nullable: true })
|
||||
tags?: any
|
||||
@Property({ type: 'json' })
|
||||
tags: string[] = []
|
||||
|
||||
@Property({ type: 'json' })
|
||||
pivotPoints: { x: number; y: number; }[] = []
|
||||
|
||||
@Property({ type: 'decimal', precision: 10, scale: 2 })
|
||||
originX = 0
|
||||
@ -61,6 +64,15 @@ export class BaseMapObject extends BaseEntity {
|
||||
return this.tags
|
||||
}
|
||||
|
||||
setPivotPoints(pivotPoints: { x: number; y: number; }[]) {
|
||||
this.pivotPoints = pivotPoints
|
||||
return this
|
||||
}
|
||||
|
||||
getPivotPoints() {
|
||||
return this.pivotPoints
|
||||
}
|
||||
|
||||
setOriginX(originX: number) {
|
||||
this.originX = originX
|
||||
return this
|
||||
|
Reference in New Issue
Block a user