forked from noxious/server
#91 : Zone editor: allow objects to be rotated
This commit is contained in:
parent
ab649b9fa1
commit
297d4742a4
@ -0,0 +1,2 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `ZoneObject` ADD COLUMN `isRotated` BOOLEAN NOT NULL DEFAULT false;
|
@ -54,6 +54,7 @@ model ZoneObject {
|
|||||||
objectId String
|
objectId String
|
||||||
object Object @relation(fields: [objectId], references: [id], onDelete: Cascade)
|
object Object @relation(fields: [objectId], references: [id], onDelete: Cascade)
|
||||||
depth Int @default(0)
|
depth Int @default(0)
|
||||||
|
isRotated Boolean @default(false)
|
||||||
positionX Int @default(0)
|
positionX Int @default(0)
|
||||||
positionY Int @default(0)
|
positionY Int @default(0)
|
||||||
}
|
}
|
||||||
|
@ -102,6 +102,7 @@ export default class ZoneUpdateEvent {
|
|||||||
create: data.zoneObjects.map((zoneObject) => ({
|
create: data.zoneObjects.map((zoneObject) => ({
|
||||||
objectId: zoneObject.objectId,
|
objectId: zoneObject.objectId,
|
||||||
depth: zoneObject.depth,
|
depth: zoneObject.depth,
|
||||||
|
isRotated: zoneObject.isRotated,
|
||||||
positionX: zoneObject.positionX,
|
positionX: zoneObject.positionX,
|
||||||
positionY: zoneObject.positionY
|
positionY: zoneObject.positionY
|
||||||
}))
|
}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user