From c7fc377a2b8a692859356f177598352399279155 Mon Sep 17 00:00:00 2001 From: genxium Date: Sat, 31 Dec 2022 15:47:45 +0800 Subject: [PATCH] A temp broken commit except for OfflineMap - refactoring jumping. --- MULTIHIT_ROADMAP.md | 7 + battle_srv/models/pb_type_convert.go | 4 +- battle_srv/models/room.go | 11 +- battle_srv/protos/room_downsync_frame.pb.go | 521 +- collider_visualizer/README.md | 1 + frontend/assets/plugin_scripts/jsexport.js | 6126 ++++++++++++++++- .../assets/resources/animation/MonkGirl.meta | 7 + .../resources/animation/MonkGirl/Atk1.anim | 49 + .../animation/MonkGirl/Atk1.anim.meta | 5 + .../resources/animation/MonkGirl/Atked1.anim | 37 + .../animation/MonkGirl/Atked1.anim.meta | 5 + .../animation/MonkGirl/BlownUp1.anim | 43 + .../animation/MonkGirl/BlownUp1.anim.meta | 5 + .../resources/animation/MonkGirl/GetUp1.anim | 79 + .../animation/MonkGirl/GetUp1.anim.meta | 5 + .../resources/animation/MonkGirl/Idle1.anim | 85 + .../animation/MonkGirl/Idle1.anim.meta | 5 + .../animation/MonkGirl/InAirAtk1.anim | 97 + .../animation/MonkGirl/InAirAtk1.anim.meta | 5 + .../animation/MonkGirl/InAirAtked1.anim | 31 + .../animation/MonkGirl/InAirAtked1.anim.meta | 5 + .../animation/MonkGirl/InAirIdle1ByJump.anim | 91 + .../MonkGirl/InAirIdle1ByJump.anim.meta | 5 + .../animation/MonkGirl/InAirIdle1NoJump.anim | 25 + .../MonkGirl/InAirIdle1NoJump.anim.meta | 5 + .../animation/MonkGirl/LayDown1.anim | 49 + .../animation/MonkGirl/LayDown1.anim.meta | 5 + .../animation/MonkGirl/MonkGirl.plist | 1211 ++++ .../animation/MonkGirl/MonkGirl.plist.meta | 1750 +++++ .../resources/animation/MonkGirl/MonkGirl.png | Bin 0 -> 76232 bytes .../animation/MonkGirl/MonkGirl.png.meta | 12 + .../resources/animation/MonkGirl/Walking.anim | 115 + .../animation/MonkGirl/Walking.anim.meta | 5 + .../pbfiles/room_downsync_frame.proto | 7 +- .../prefabs/ControlledCharacter.prefab | 168 +- frontend/assets/scenes/login.fire | 2 +- frontend/assets/scripts/AttackingCharacter.js | 72 +- frontend/assets/scripts/Map.js | 33 +- frontend/assets/scripts/OfflineMap.js | 75 +- frontend/assets/scripts/modules/Collisions.js | 197 - .../assets/scripts/modules/Collisions.js.meta | 9 - ...om_downsync_frame_proto_bundle.forcemsg.js | 33 +- jsexport/battle/battle.go | 126 +- jsexport/battle/characterConfig.go | 74 + jsexport/battle/room_downsync_frame.go | 26 + jsexport/main.go | 40 +- resolv_tailored/object.go | 28 +- 47 files changed, 10636 insertions(+), 660 deletions(-) create mode 100644 MULTIHIT_ROADMAP.md create mode 100644 collider_visualizer/README.md create mode 100644 frontend/assets/resources/animation/MonkGirl.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/Atk1.anim create mode 100644 frontend/assets/resources/animation/MonkGirl/Atk1.anim.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/Atked1.anim create mode 100644 frontend/assets/resources/animation/MonkGirl/Atked1.anim.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/BlownUp1.anim create mode 100644 frontend/assets/resources/animation/MonkGirl/BlownUp1.anim.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/GetUp1.anim create mode 100644 frontend/assets/resources/animation/MonkGirl/GetUp1.anim.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/Idle1.anim create mode 100644 frontend/assets/resources/animation/MonkGirl/Idle1.anim.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/InAirAtk1.anim create mode 100644 frontend/assets/resources/animation/MonkGirl/InAirAtk1.anim.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/InAirAtked1.anim create mode 100644 frontend/assets/resources/animation/MonkGirl/InAirAtked1.anim.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/InAirIdle1ByJump.anim create mode 100644 frontend/assets/resources/animation/MonkGirl/InAirIdle1ByJump.anim.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/InAirIdle1NoJump.anim create mode 100644 frontend/assets/resources/animation/MonkGirl/InAirIdle1NoJump.anim.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/LayDown1.anim create mode 100644 frontend/assets/resources/animation/MonkGirl/LayDown1.anim.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/MonkGirl.plist create mode 100644 frontend/assets/resources/animation/MonkGirl/MonkGirl.plist.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/MonkGirl.png create mode 100644 frontend/assets/resources/animation/MonkGirl/MonkGirl.png.meta create mode 100644 frontend/assets/resources/animation/MonkGirl/Walking.anim create mode 100644 frontend/assets/resources/animation/MonkGirl/Walking.anim.meta delete mode 100644 frontend/assets/scripts/modules/Collisions.js delete mode 100644 frontend/assets/scripts/modules/Collisions.js.meta create mode 100644 jsexport/battle/characterConfig.go diff --git a/MULTIHIT_ROADMAP.md b/MULTIHIT_ROADMAP.md new file mode 100644 index 0000000..890fac0 --- /dev/null +++ b/MULTIHIT_ROADMAP.md @@ -0,0 +1,7 @@ +Major goals +- Create several skills that can be chained by pressing "btnA" 3 times, while the 2nd skill cancels the last hit of 1st skill before the latters' FramesToRecover is over, same goes with 2nd->3rd transition. +- Note that each skill can contain "multihit". + +Minor goals +- Split jumping anim into "once" part and "keep" part, depending on "character.framesElapsedInChState" we should play the corresponding part +- Add new "chState = STUNNED", which is applicable to both on ground and in air, while "inAir && STUNNED", "character.FramesToRecover" is regarded as infinite. If implemented, make the last hit of the aforementioned 3rd skill "pushback opponent to air". diff --git a/battle_srv/models/pb_type_convert.go b/battle_srv/models/pb_type_convert.go index b24bb48..a1a03dc 100644 --- a/battle_srv/models/pb_type_convert.go +++ b/battle_srv/models/pb_type_convert.go @@ -35,10 +35,11 @@ func toPbRoomDownsyncFrame(rdf *battle.RoomDownsyncFrame) *pb.RoomDownsyncFrame JoinIndex: last.JoinIndex, ColliderRadius: last.ColliderRadius, Score: last.Score, - FramesToRecover: last.FramesToRecover, Hp: last.Hp, MaxHp: last.MaxHp, Removed: last.Removed, + FramesToRecover: last.FramesToRecover, + FramesInChState: last.FramesInChState, } ret.PlayersArr[i] = pbPlayer } @@ -100,6 +101,7 @@ func toPbPlayers(modelInstances map[int32]*Player, withMetaInfo bool) []*pb.Play Score: last.Score, Removed: last.Removed, FramesToRecover: last.FramesToRecover, + FramesInChState: last.FramesInChState, } if withMetaInfo { pbPlayer.Name = last.Name diff --git a/battle_srv/models/room.go b/battle_srv/models/room.go index 8370e58..68c9cd0 100644 --- a/battle_srv/models/room.go +++ b/battle_srv/models/room.go @@ -353,7 +353,7 @@ func (pR *Room) playerDownsyncStr(player *battle.PlayerDownsync) string { if player.InAir { inAirInt = 1 } - s := fmt.Sprintf("{%d,%d,%d,%d,%d,%d,%d}", player.JoinIndex, player.VirtualGridX, player.VirtualGridY, player.VelX, player.VelY, player.FramesToRecover,inAirInt) + s := fmt.Sprintf("{%d,%d,%d,%d,%d,%d,%d}", player.JoinIndex, player.VirtualGridX, player.VirtualGridY, player.VelX, player.VelY, player.FramesToRecover, inAirInt) return s } @@ -744,7 +744,7 @@ func (pR *Room) OnDismissed() { // Always instantiates new HeapRAM blocks and let the old blocks die out due to not being retained by any root reference. pR.BulletBattleLocalIdCounter = 0 - pR.WorldToVirtualGridRatio = float64(100) + pR.WorldToVirtualGridRatio = battle.WORLD_TO_VIRTUAL_GRID_RATIO pR.VirtualGridToWorldRatio = float64(1.0) / pR.WorldToVirtualGridRatio // this is a one-off computation, should avoid division in iterations pR.SpAtkLookupFrames = 5 pR.PlayerDefaultSpeed = int32(float64(1) * pR.WorldToVirtualGridRatio) // in virtual grids per frame @@ -791,11 +791,6 @@ func (pR *Room) OnDismissed() { pR.BackendDynamicsEnabled = true // [WARNING] When "false", recovery upon reconnection wouldn't work! pR.ForceAllResyncOnAnyActiveSlowTicker = true // See tradeoff discussion in "downsyncToAllPlayers" - pR.SnapIntoPlatformOverlap = float64(0.1) - pR.SnapIntoPlatformThreshold = float64(0.5) - pR.JumpingInitVelY = int32(float64(7) * pR.WorldToVirtualGridRatio) - pR.GravityX = 0 - pR.GravityY = -int32(float64(0.5) * pR.WorldToVirtualGridRatio) // makes all "playerCollider.Y" a multiple of 0.5 in all cases pR.FrameDataLoggingEnabled = false // [WARNING] DON'T ENABLE ON LONG BATTLE DURATION! It consumes A LOT OF MEMORY! @@ -1275,7 +1270,7 @@ func (pR *Room) applyInputFrameDownsyncDynamics(fromRenderFrameId int32, toRende } } - nextRenderFrame := battle.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(pR.InputsBuffer, currRenderFrame, pR.Space, pR.CollisionSysMap, pR.GravityX, pR.GravityY, pR.JumpingInitVelY, pR.InputDelayFrames, pR.InputScaleFrames, pR.collisionSpaceOffsetX, pR.collisionSpaceOffsetY, pR.SnapIntoPlatformOverlap, pR.SnapIntoPlatformThreshold, pR.WorldToVirtualGridRatio, pR.VirtualGridToWorldRatio, pR.playerOpPatternToSkillId) + nextRenderFrame := battle.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(pR.InputsBuffer, currRenderFrame, pR.Space, pR.CollisionSysMap, pR.InputDelayFrames, pR.InputScaleFrames, pR.collisionSpaceOffsetX, pR.collisionSpaceOffsetY, pR.SnapIntoPlatformOverlap, pR.SnapIntoPlatformThreshold, pR.WorldToVirtualGridRatio, pR.VirtualGridToWorldRatio, pR.playerOpPatternToSkillId) pR.RenderFrameBuffer.Put(nextRenderFrame) pR.CurDynamicsRenderFrameId++ } diff --git a/battle_srv/protos/room_downsync_frame.pb.go b/battle_srv/protos/room_downsync_frame.pb.go index bab51dc..238161a 100644 --- a/battle_srv/protos/room_downsync_frame.pb.go +++ b/battle_srv/protos/room_downsync_frame.pb.go @@ -44,10 +44,11 @@ type PlayerDownsync struct { Hp int32 `protobuf:"varint,16,opt,name=hp,proto3" json:"hp,omitempty"` MaxHp int32 `protobuf:"varint,17,opt,name=maxHp,proto3" json:"maxHp,omitempty"` CharacterState int32 `protobuf:"varint,18,opt,name=characterState,proto3" json:"characterState,omitempty"` - InAir bool `protobuf:"varint,19,opt,name=inAir,proto3" json:"inAir,omitempty"` // by design a standalone field only inferred by the collision result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState", because we need check the transition for "characterState" from this field, i.e. "inAir (prev -> curr)" - Name string `protobuf:"bytes,20,opt,name=name,proto3" json:"name,omitempty"` - DisplayName string `protobuf:"bytes,21,opt,name=displayName,proto3" json:"displayName,omitempty"` - Avatar string `protobuf:"bytes,22,opt,name=avatar,proto3" json:"avatar,omitempty"` + InAir bool `protobuf:"varint,19,opt,name=inAir,proto3" json:"inAir,omitempty"` // by design a standalone field only inferred by the collision result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState", because we need check the transition for "characterState" from this field, i.e. "inAir (prev -> curr)" + FramesInChState int32 `protobuf:"varint,20,opt,name=framesInChState,proto3" json:"framesInChState,omitempty"` // number of frames elapsed in the current character state + Name string `protobuf:"bytes,997,opt,name=name,proto3" json:"name,omitempty"` + DisplayName string `protobuf:"bytes,998,opt,name=displayName,proto3" json:"displayName,omitempty"` + Avatar string `protobuf:"bytes,999,opt,name=avatar,proto3" json:"avatar,omitempty"` } func (x *PlayerDownsync) Reset() { @@ -215,6 +216,13 @@ func (x *PlayerDownsync) GetInAir() bool { return false } +func (x *PlayerDownsync) GetFramesInChState() int32 { + if x != nil { + return x.FramesInChState + } + return 0 +} + func (x *PlayerDownsync) GetName() string { if x != nil { return x.Name @@ -1306,7 +1314,7 @@ var file_room_downsync_frame_proto_rawDesc = []byte{ 0x0a, 0x19, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x1a, 0x0e, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x04, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, + 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x05, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x76, 0x69, @@ -1340,258 +1348,261 @@ var file_room_downsync_frame_proto_rawDesc = []byte{ 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x41, 0x69, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x69, 0x6e, 0x41, 0x69, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x6f, 0x0a, 0x11, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, - 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x64, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x64, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x64, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x62, - 0x74, 0x6e, 0x41, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, - 0x62, 0x74, 0x6e, 0x41, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x74, 0x6e, - 0x42, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x74, - 0x6e, 0x42, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x22, 0x7c, 0x0a, 0x12, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x12, - 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x73, 0x74, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4c, 0x69, - 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x0f, 0x48, 0x65, 0x61, 0x72, 0x74, - 0x62, 0x65, 0x61, 0x74, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0xb8, 0x02, 0x0a, 0x05, 0x57, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, - 0x0a, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, - 0x73, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, - 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x12, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, - 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, - 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x27, 0x0a, 0x02, 0x68, 0x62, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x72, - 0x74, 0x62, 0x65, 0x61, 0x74, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62, 0x22, - 0x89, 0x02, 0x0a, 0x06, 0x57, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, - 0x65, 0x63, 0x68, 0x6f, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0b, 0x65, 0x63, 0x68, 0x6f, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x10, - 0x0a, 0x03, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, - 0x12, 0x2b, 0x0a, 0x03, 0x72, 0x64, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, - 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x03, 0x72, 0x64, 0x66, 0x12, 0x54, 0x0a, - 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, - 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x17, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x08, 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x14, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, - 0x72, 0x65, 0x66, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, - 0x12, 0x28, 0x0a, 0x0f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, - 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x58, 0x0a, 0x19, 0x74, 0x6f, - 0x53, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, - 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x19, 0x74, 0x6f, 0x53, 0x65, 0x6e, + 0x08, 0x52, 0x05, 0x69, 0x6e, 0x41, 0x69, 0x72, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x73, 0x49, 0x6e, 0x43, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x49, 0x6e, 0x43, 0x68, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0xe5, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0xe6, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x06, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x18, 0xe7, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x22, 0x6f, 0x0a, 0x11, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, + 0x65, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x64, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x64, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x74, 0x6e, 0x41, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x74, 0x6e, + 0x41, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x74, 0x6e, 0x42, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x74, 0x6e, 0x42, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, + 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x22, 0x7c, 0x0a, 0x12, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, + 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x0f, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, + 0x74, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x22, 0xb8, 0x02, 0x0a, 0x05, 0x57, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6d, + 0x73, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, + 0x03, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, + 0x0d, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x61, 0x6d, + 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x12, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, + 0x65, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, + 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, + 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x15, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x27, 0x0a, 0x02, 0x68, 0x62, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, + 0x61, 0x74, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62, 0x22, 0x89, 0x02, 0x0a, + 0x06, 0x57, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x63, 0x68, + 0x6f, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, + 0x65, 0x63, 0x68, 0x6f, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, + 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, 0x12, 0x2b, 0x0a, + 0x03, 0x72, 0x64, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, + 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x03, 0x72, 0x64, 0x66, 0x12, 0x54, 0x0a, 0x17, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, + 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, + 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x36, 0x0a, 0x08, 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, + 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x14, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x73, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, + 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x72, 0x65, 0x66, + 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x28, 0x0a, + 0x0f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x58, 0x0a, 0x19, 0x74, 0x6f, 0x53, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, - 0x79, 0x6e, 0x63, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, - 0x6e, 0x63, 0x22, 0x95, 0x06, 0x0a, 0x0b, 0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, - 0x65, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, - 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x22, - 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x72, 0x65, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x72, 0x65, 0x63, 0x6f, 0x76, + 0x79, 0x6e, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, + 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x19, 0x74, 0x6f, 0x53, 0x65, 0x6e, 0x64, 0x49, 0x6e, + 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, + 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x68, + 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x22, + 0x95, 0x06, 0x0a, 0x0b, 0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x12, + 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, + 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, + 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x12, 0x30, 0x0a, 0x13, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x4f, 0x6e, 0x48, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x72, - 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x48, - 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, - 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, - 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x65, 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, - 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, - 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, - 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, - 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x08, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x2e, 0x0a, 0x12, - 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, - 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x61, - 0x6d, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x10, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6f, 0x66, - 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, - 0x0a, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58, 0x18, 0x10, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58, - 0x12, 0x20, 0x0a, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x59, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, - 0x65, 0x59, 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x65, 0x6c, 0x66, 0x4d, 0x6f, 0x76, 0x65, 0x66, 0x6f, - 0x72, 0x77, 0x61, 0x72, 0x64, 0x58, 0x18, 0x12, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x73, 0x65, - 0x6c, 0x66, 0x4d, 0x6f, 0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x58, 0x12, 0x2a, - 0x0a, 0x10, 0x73, 0x65, 0x6c, 0x66, 0x4d, 0x6f, 0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, - 0x64, 0x59, 0x18, 0x13, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x73, 0x65, 0x6c, 0x66, 0x4d, 0x6f, - 0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x59, 0x22, 0x8d, 0x0b, 0x0a, 0x12, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x26, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, - 0x57, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, - 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x57, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x67, 0x65, - 0x44, 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x48, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x48, 0x12, - 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6c, 0x65, 0x57, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6c, 0x65, 0x57, 0x12, - 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6c, 0x65, 0x48, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6c, 0x65, 0x48, 0x12, - 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x50, 0x69, 0x6e, - 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x54, 0x6f, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x0a, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, - 0x69, 0x63, 0x6b, 0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b, - 0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x20, 0x0a, - 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, - 0x32, 0x0a, 0x14, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x62, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x13, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, - 0x70, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x46, 0x70, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x44, 0x65, 0x6c, 0x61, - 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, - 0x2a, 0x0a, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x53, 0x63, 0x61, 0x6c, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x6e, - 0x73, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6e, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x1e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, 0x6f, 0x6c, 0x65, - 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1e, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x6c, - 0x61, 0x79, 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x1f, 0x6d, - 0x61, 0x78, 0x43, 0x68, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x1f, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x73, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x11, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, - 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, - 0x18, 0x12, 0x20, 0x01, 0x28, 0x01, 0x52, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, - 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, - 0x73, 0x12, 0x3a, 0x0a, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, - 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x13, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, - 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x38, 0x0a, - 0x17, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x54, 0x6f, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, - 0x72, 0x69, 0x64, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x14, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, - 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x54, 0x6f, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, - 0x69, 0x64, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x38, 0x0a, 0x17, 0x76, 0x69, 0x72, 0x74, 0x75, - 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x54, 0x6f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x52, 0x61, 0x74, - 0x69, 0x6f, 0x18, 0x15, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, - 0x6c, 0x47, 0x72, 0x69, 0x64, 0x54, 0x6f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x52, 0x61, 0x74, 0x69, - 0x6f, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x70, 0x41, 0x74, 0x6b, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x73, 0x70, - 0x41, 0x74, 0x6b, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, - 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, - 0x7a, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x73, 0x6e, 0x61, - 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4f, 0x76, 0x65, - 0x72, 0x6c, 0x61, 0x70, 0x18, 0x18, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, 0x73, 0x6e, 0x61, 0x70, - 0x49, 0x6e, 0x74, 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4f, 0x76, 0x65, 0x72, - 0x6c, 0x61, 0x70, 0x12, 0x3c, 0x0a, 0x19, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x50, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x18, 0x19, 0x20, 0x01, 0x28, 0x01, 0x52, 0x19, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x6f, - 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x6a, 0x75, 0x6d, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x69, 0x74, - 0x56, 0x65, 0x6c, 0x59, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x6a, 0x75, 0x6d, 0x70, - 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x56, 0x65, 0x6c, 0x59, 0x12, 0x1a, 0x0a, 0x08, 0x67, - 0x72, 0x61, 0x76, 0x69, 0x74, 0x79, 0x58, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, - 0x72, 0x61, 0x76, 0x69, 0x74, 0x79, 0x58, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x76, 0x69, - 0x74, 0x79, 0x59, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x61, 0x76, 0x69, - 0x74, 0x79, 0x59, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, - 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x12, - 0x39, 0x0a, 0x17, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, - 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0xe7, 0x07, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x17, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, - 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xe4, 0x03, 0x0a, 0x11, 0x52, - 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x0a, 0x70, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, - 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, - 0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x0c, 0x6d, 0x65, 0x6c, - 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x16, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, - 0x61, 0x73, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, - 0x6b, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x68, - 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x12, - 0x73, 0x0a, 0x18, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x54, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x37, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, - 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x50, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x4f, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x54, 0x6f, 0x53, 0x6b, - 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, 0x70, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x4f, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x54, 0x6f, 0x53, 0x6b, 0x69, - 0x6c, 0x6c, 0x49, 0x64, 0x1a, 0x4b, 0x0a, 0x1d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x54, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x64, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x42, 0x13, 0x5a, 0x11, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x72, 0x76, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x30, 0x0a, + 0x13, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x4f, + 0x6e, 0x48, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x72, 0x65, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x48, 0x69, 0x74, 0x12, + 0x22, 0x0a, 0x0c, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x64, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, + 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, + 0x0d, 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, + 0x6d, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, + 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x08, 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x2e, 0x0a, 0x12, 0x72, 0x65, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x61, 0x6d, + 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, + 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, + 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6f, 0x66, + 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x2a, 0x0a, 0x10, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6f, 0x66, 0x66, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x68, + 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58, 0x18, 0x10, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x58, 0x12, 0x20, 0x0a, + 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x59, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x0b, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x59, 0x12, + 0x2a, 0x0a, 0x10, 0x73, 0x65, 0x6c, 0x66, 0x4d, 0x6f, 0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, + 0x72, 0x64, 0x58, 0x18, 0x12, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x73, 0x65, 0x6c, 0x66, 0x4d, + 0x6f, 0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x58, 0x12, 0x2a, 0x0a, 0x10, 0x73, + 0x65, 0x6c, 0x66, 0x4d, 0x6f, 0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x59, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x73, 0x65, 0x6c, 0x66, 0x4d, 0x6f, 0x76, 0x65, 0x66, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x59, 0x22, 0x8d, 0x0b, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, + 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x57, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x63, 0x72, + 0x65, 0x74, 0x65, 0x57, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, + 0x63, 0x72, 0x65, 0x74, 0x65, 0x48, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x74, + 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x48, 0x12, 0x1e, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6c, 0x65, 0x57, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6c, 0x65, 0x57, 0x12, 0x1e, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6c, 0x65, 0x48, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6c, 0x65, 0x48, 0x12, 0x26, 0x0a, 0x0e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x50, 0x69, 0x6e, 0x67, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, + 0x50, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x0a, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b, + 0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b, 0x49, 0x66, 0x49, + 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x14, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x62, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x30, 0x0a, 0x13, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x62, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6e, + 0x6f, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x70, 0x73, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x70, 0x73, + 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x63, 0x61, + 0x6c, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x73, 0x74, 0x44, + 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0e, 0x6e, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x46, 0x0a, 0x1e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, + 0x73, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, + 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, + 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x1f, 0x6d, 0x61, 0x78, 0x43, + 0x68, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, + 0x65, 0x73, 0x50, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x1f, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x70, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x3c, 0x0a, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69, + 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x12, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, + 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x3a, + 0x0a, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, + 0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, + 0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x38, 0x0a, 0x17, 0x77, 0x6f, + 0x72, 0x6c, 0x64, 0x54, 0x6f, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, + 0x52, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x14, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, 0x77, 0x6f, 0x72, + 0x6c, 0x64, 0x54, 0x6f, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x52, + 0x61, 0x74, 0x69, 0x6f, 0x12, 0x38, 0x0a, 0x17, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, + 0x72, 0x69, 0x64, 0x54, 0x6f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, + 0x69, 0x64, 0x54, 0x6f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x2c, + 0x0a, 0x11, 0x73, 0x70, 0x41, 0x74, 0x6b, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x72, 0x61, + 0x6d, 0x65, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x73, 0x70, 0x41, 0x74, 0x6b, + 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, + 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, + 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, + 0x74, 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x61, + 0x70, 0x18, 0x18, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, + 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x70, + 0x12, 0x3c, 0x0a, 0x19, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x19, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x19, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x50, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x28, + 0x0a, 0x0f, 0x6a, 0x75, 0x6d, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x56, 0x65, 0x6c, + 0x59, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x6a, 0x75, 0x6d, 0x70, 0x69, 0x6e, 0x67, + 0x49, 0x6e, 0x69, 0x74, 0x56, 0x65, 0x6c, 0x59, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x76, + 0x69, 0x74, 0x79, 0x58, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x61, 0x76, + 0x69, 0x74, 0x79, 0x58, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x79, 0x59, + 0x18, 0x1c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x79, 0x59, + 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, + 0x53, 0x74, 0x65, 0x70, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x12, 0x39, 0x0a, 0x17, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0xe7, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xe4, 0x03, 0x0a, 0x11, 0x52, 0x6f, 0x6f, 0x6d, + 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, + 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x73, 0x41, 0x72, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, + 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x37, 0x0a, + 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x6c, + 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, + 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, + 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x2c, + 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x79, 0x6e, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, + 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x73, 0x0a, 0x18, + 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x54, + 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, + 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x4f, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x54, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, + 0x49, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, + 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x54, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, + 0x64, 0x1a, 0x4b, 0x0a, 0x1d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x54, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x13, + 0x5a, 0x11, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/collider_visualizer/README.md b/collider_visualizer/README.md new file mode 100644 index 0000000..bdb3a91 --- /dev/null +++ b/collider_visualizer/README.md @@ -0,0 +1 @@ +This module is no longer useful, as we can now use GopherJs+OfflineMap to visualize experimental game dynamics. diff --git a/frontend/assets/plugin_scripts/jsexport.js b/frontend/assets/plugin_scripts/jsexport.js index 5b4e520..887f469 100644 --- a/frontend/assets/plugin_scripts/jsexport.js +++ b/frontend/assets/plugin_scripts/jsexport.js @@ -2,15 +2,6125 @@ (function() { var $goVersion = "go1.18.6"; -Error.stackTraceLimit=1/0;var $global,$module,$NaN=NaN;if("undefined"!=typeof window?$global=window:"undefined"!=typeof self?$global=self:"undefined"!=typeof global?($global=global).require=require:$global=this,void 0===$global||void 0===$global.Array)throw new Error("no global object found");if("undefined"!=typeof module&&($module=module),!$global.fs&&$global.require)try{var fs=$global.require("fs");"object"==typeof fs&&null!==fs&&0!==Object.keys(fs).length&&($global.fs=fs)}catch(e){}if(!$global.fs){var outputBuf="",decoder=new TextDecoder("utf-8");$global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync:function(e,n){var r=(outputBuf+=decoder.decode(n)).lastIndexOf("\n");return-1!=r&&(console.log(outputBuf.substr(0,r)),outputBuf=outputBuf.substr(r+1)),n.length},write:function(e,n,r,t,i,a){0===r&&t===n.length&&null===i?a(null,this.writeSync(e,n)):a(enosys())}}}var $throwRuntimeError,$linknames={},$packages={},$idCounter=0,$keys=function(e){return e?Object.keys(e):[]},$flushConsole=function(){},$throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference")},$call=function(e,n,r){return e.apply(n,r)},$makeFunc=function(e){return function(){return $externalize(e(this,new($sliceType($jsObjectPtr))($global.Array.prototype.slice.call(arguments,[]))),$emptyInterface)}},$unused=function(e){},$print=console.log;if(void 0!==$global.process&&$global.require)try{var util=$global.require("util");$print=function(){$global.process.stderr.write(util.format.apply(this,arguments))}}catch(e){}var $println=console.log,$initAllLinknames=function(){for(var e=$keys($packages),n=0;ne.$capacity||t>e.$capacity)&&$throwRuntimeError("slice bounds out of range"),e===e.constructor.nil)return e;var i=new e.constructor(e.$array);return i.$offset=e.$offset+n,i.$length=r-n,i.$capacity=t-n,i},$substring=function(e,n,r){return(n<0||re.length)&&$throwRuntimeError("slice bounds out of range"),e.substring(n,r)},$sliceToNativeArray=function(e){return e.$array.constructor!==Array?e.$array.subarray(e.$offset,e.$offset+e.$length):e.$array.slice(e.$offset,e.$offset+e.$length)},$sliceToGoArray=function(e,n){var r=n.elem;return void 0!==r&&e.$length1114111||55296<=e&&e<=57343)&&(e=65533),e<=127?String.fromCharCode(e):e<=2047?String.fromCharCode(192|e>>6,128|63&e):e<=65535?String.fromCharCode(224|e>>12,128|e>>6&63,128|63&e):String.fromCharCode(240|e>>18,128|e>>12&63,128|e>>6&63,128|63&e)},$stringToBytes=function(e){for(var n=new Uint8Array(e.length),r=0;rt){for(var o=i-1;o>=0;o--)a.copy(e[r+o],n[t+o]);return}for(o=0;ot)for(o=i-1;o>=0;o--)e[r+o]=n[t+o];else for(o=0;oc)if(a=0,c=Math.max(o,e.$capacity<1024?2*e.$capacity:Math.floor(5*e.$capacity/4)),e.$array.constructor===Array){(i=e.$array.slice(e.$offset,e.$offset+e.$length)).length=c;for(var $=e.constructor.elem.zero,u=e.$length;u>>16&65535)*t+r*(n>>>16&65535)<<16>>>0)>>0},$floatKey=function(e){return e!=e?"NaN$"+ ++$idCounter:String(e)},$flatten64=function(e){return 4294967296*e.$high+e.$low},$shiftLeft64=function(e,n){return 0===n?e:n<32?new e.constructor(e.$high<>>32-n,e.$low<>>0):n<64?new e.constructor(e.$low<>n,(e.$low>>>n|e.$high<<32-n)>>>0):n<64?new e.constructor(e.$high>>31,e.$high>>n-32>>>0):e.$high<0?new e.constructor(-1,4294967295):new e.constructor(0,0)},$shiftRightUint64=function(e,n){return 0===n?e:n<32?new e.constructor(e.$high>>>n,(e.$low>>>n|e.$high<<32-n)>>>0):n<64?new e.constructor(0,e.$high>>>n-32):new e.constructor(0,0)},$mul64=function(e,n){var r=e.$high>>>16,t=65535&e.$high,i=e.$low>>>16,a=65535&e.$low,o=n.$high>>>16,c=65535&n.$high,$=n.$low>>>16,u=65535&n.$low,l=0,s=0,f=0,d=0;f+=(d+=a*u)>>>16,s+=(f+=i*u)>>>16,f&=65535,s+=(f+=a*$)>>>16,l+=(s+=t*u)>>>16,s&=65535,l+=(s+=i*$)>>>16,s&=65535,l+=(s+=a*c)>>>16,l+=r*u+t*$+i*c+a*o;var p=((l&=65535)<<16|(s&=65535))>>>0,h=((f&=65535)<<16|(d&=65535))>>>0;return new e.constructor(p,h)},$div64=function(e,n,r){0===n.$high&&0===n.$low&&$throwRuntimeError("integer divide by zero");var t=1,i=1,a=e.$high,o=e.$low;a<0&&(t=-1,i=-1,a=-a,0!==o&&(a--,o=4294967296-o));var c=n.$high,$=n.$low;n.$high<0&&(t*=-1,c=-c,0!==$&&(c--,$=4294967296-$));for(var u=0,l=0,s=0;c<2147483648&&(a>c||a===c&&o>$);)c=(c<<1|$>>>31)>>>0,$=$<<1>>>0,s++;for(var f=0;f<=s;f++)u=u<<1|l>>>31,l=l<<1>>>0,(a>c||a===c&&o>=$)&&(a-=c,(o-=$)<0&&(a--,o+=4294967296),4294967296===++l&&(u++,l=0)),$=($>>>1|c<<31)>>>0,c>>>=1;return r?new e.constructor(a*i,o*i):new e.constructor(u*t,l*t)},$divComplex=function(e,n){var r=e.$real===1/0||e.$real===-1/0||e.$imag===1/0||e.$imag===-1/0,t=n.$real===1/0||n.$real===-1/0||n.$imag===1/0||n.$imag===-1/0,i=!r&&(e.$real!=e.$real||e.$imag!=e.$imag),a=!t&&(n.$real!=n.$real||n.$imag!=n.$imag);if(i||a)return new e.constructor(NaN,NaN);if(r&&!t)return new e.constructor(1/0,1/0);if(!r&&t)return new e.constructor(0,0);if(0===n.$real&&0===n.$imag)return 0===e.$real&&0===e.$imag?new e.constructor(NaN,NaN):new e.constructor(1/0,1/0);if(Math.abs(n.$real)<=Math.abs(n.$imag)){var o=n.$real/n.$imag,c=n.$real*o+n.$imag;return new e.constructor((e.$real*o+e.$imag)/c,(e.$imag*o-e.$real)/c)}o=n.$imag/n.$real,c=n.$imag*o+n.$real;return new e.constructor((e.$imag*o+e.$real)/c,(e.$imag-e.$real*o)/c)},$kindBool=1,$kindInt=2,$kindInt8=3,$kindInt16=4,$kindInt32=5,$kindInt64=6,$kindUint=7,$kindUint8=8,$kindUint16=9,$kindUint32=10,$kindUint64=11,$kindUintptr=12,$kindFloat32=13,$kindFloat64=14,$kindComplex64=15,$kindComplex128=16,$kindArray=17,$kindChan=18,$kindFunc=19,$kindInterface=20,$kindMap=21,$kindPtr=22,$kindSlice=23,$kindString=24,$kindStruct=25,$kindUnsafePointer=26,$methodSynthesizers=[],$addMethodSynthesizer=function(e){null!==$methodSynthesizers?$methodSynthesizers.push(e):e()},$synthesizeMethods=function(){$methodSynthesizers.forEach(function(e){e()}),$methodSynthesizers=null},$ifaceKeyFor=function(e){if(e===$ifaceNil)return"nil";var n=e.constructor;return n.string+"$"+n.keyFor(e.$val)},$identity=function(e){return e},$typeIDCounter=0,$idKey=function(e){return void 0===e.$id&&($idCounter++,e.$id=$idCounter),String(e.$id)},$arrayPtrCtor=function(){return function(e){this.$get=function(){return e},this.$set=function(e){typ.copy(this,e)},this.$val=e}},$newType=function(e,n,r,t,i,a,o){var c;switch(n){case $kindBool:case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindUnsafePointer:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=$identity;break;case $kindString:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=function(e){return"$"+e};break;case $kindFloat32:case $kindFloat64:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=function(e){return $floatKey(e)};break;case $kindInt64:(c=function(e,n){this.$high=e+Math.floor(Math.ceil(n)/4294967296)>>0,this.$low=n>>>0,this.$val=this}).keyFor=function(e){return e.$high+"$"+e.$low};break;case $kindUint64:(c=function(e,n){this.$high=e+Math.floor(Math.ceil(n)/4294967296)>>>0,this.$low=n>>>0,this.$val=this}).keyFor=function(e){return e.$high+"$"+e.$low};break;case $kindComplex64:(c=function(e,n){this.$real=$fround(e),this.$imag=$fround(n),this.$val=this}).keyFor=function(e){return e.$real+"$"+e.$imag};break;case $kindComplex128:(c=function(e,n){this.$real=e,this.$imag=n,this.$val=this}).keyFor=function(e){return e.$real+"$"+e.$imag};break;case $kindArray:(c=function(e){this.$val=e}).wrapped=!0,c.ptr=$newType(4,$kindPtr,"*"+r,!1,"",!1,$arrayPtrCtor()),c.init=function(e,n){c.elem=e,c.len=n,c.comparable=e.comparable,c.keyFor=function(n){return Array.prototype.join.call($mapArray(n,function(n){return String(e.keyFor(n)).replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}),"$")},c.copy=function(n,r){$copyArray(n,r,0,0,r.length,e)},c.ptr.init(c),Object.defineProperty(c.ptr.nil,"nilCheck",{get:$throwNilPointerError})};break;case $kindChan:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=$idKey,c.init=function(e,n,r){c.elem=e,c.sendOnly=n,c.recvOnly=r};break;case $kindFunc:(c=function(e){this.$val=e}).wrapped=!0,c.init=function(e,n,r){c.params=e,c.results=n,c.variadic=r,c.comparable=!1};break;case $kindInterface:(c={implementedBy:{},missingMethodFor:{}}).keyFor=$ifaceKeyFor,c.init=function(e){c.methods=e,e.forEach(function(e){$ifaceNil[e.prop]=$throwNilPointerError})};break;case $kindMap:(c=function(e){this.$val=e}).wrapped=!0,c.init=function(e,n){c.key=e,c.elem=n,c.comparable=!1};break;case $kindPtr:(c=o||function(e,n,r){this.$get=e,this.$set=n,this.$target=r,this.$val=this}).keyFor=$idKey,c.init=function(e){c.elem=e,c.wrapped=e.kind===$kindArray,c.nil=new c($throwNilPointerError,$throwNilPointerError)};break;case $kindSlice:(c=function(e){e.constructor!==c.nativeArray&&(e=new c.nativeArray(e)),this.$array=e,this.$offset=0,this.$length=e.length,this.$capacity=e.length,this.$val=this}).init=function(e){c.elem=e,c.comparable=!1,c.nativeArray=$nativeArray(e.kind),c.nil=new c([])};break;case $kindStruct:(c=function(e){this.$val=e}).wrapped=!0,c.ptr=$newType(4,$kindPtr,"*"+r,!1,i,a,o),c.ptr.elem=c,c.ptr.prototype.$get=function(){return this},c.ptr.prototype.$set=function(e){c.copy(this,e)},c.init=function(e,n){c.pkgPath=e,c.fields=n,n.forEach(function(e){e.typ.comparable||(c.comparable=!1)}),c.keyFor=function(e){var r=e.$val;return $mapArray(n,function(e){return String(e.typ.keyFor(r[e.prop])).replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}).join("$")},c.copy=function(e,r){for(var t=0;t0;){var a=[],o=[];t.forEach(function(e){if(!i[e.typ.string])switch(i[e.typ.string]=!0,e.typ.named&&(o=o.concat(e.typ.methods),e.indirect&&(o=o.concat($ptrType(e.typ).methods))),e.typ.kind){case $kindStruct:e.typ.fields.forEach(function(n){if(n.embedded){var r=n.typ,t=r.kind===$kindPtr;a.push({typ:t?r.elem:r,indirect:e.indirect||t})}});break;case $kindInterface:o=o.concat(e.typ.methods)}}),o.forEach(function(e){void 0===n[e.name]&&(n[e.name]=e)}),t=a}return e.methodSetCache=[],Object.keys(n).sort().forEach(function(r){e.methodSetCache.push(n[r])}),e.methodSetCache},$Bool=$newType(1,$kindBool,"bool",!0,"",!1,null),$Int=$newType(4,$kindInt,"int",!0,"",!1,null),$Int8=$newType(1,$kindInt8,"int8",!0,"",!1,null),$Int16=$newType(2,$kindInt16,"int16",!0,"",!1,null),$Int32=$newType(4,$kindInt32,"int32",!0,"",!1,null),$Int64=$newType(8,$kindInt64,"int64",!0,"",!1,null),$Uint=$newType(4,$kindUint,"uint",!0,"",!1,null),$Uint8=$newType(1,$kindUint8,"uint8",!0,"",!1,null),$Uint16=$newType(2,$kindUint16,"uint16",!0,"",!1,null),$Uint32=$newType(4,$kindUint32,"uint32",!0,"",!1,null),$Uint64=$newType(8,$kindUint64,"uint64",!0,"",!1,null),$Uintptr=$newType(4,$kindUintptr,"uintptr",!0,"",!1,null),$Float32=$newType(4,$kindFloat32,"float32",!0,"",!1,null),$Float64=$newType(8,$kindFloat64,"float64",!0,"",!1,null),$Complex64=$newType(8,$kindComplex64,"complex64",!0,"",!1,null),$Complex128=$newType(16,$kindComplex128,"complex128",!0,"",!1,null),$String=$newType(8,$kindString,"string",!0,"",!1,null),$UnsafePointer=$newType(4,$kindUnsafePointer,"unsafe.Pointer",!0,"unsafe",!1,null),$nativeArray=function(e){switch(e){case $kindInt:return Int32Array;case $kindInt8:return Int8Array;case $kindInt16:return Int16Array;case $kindInt32:return Int32Array;case $kindUint:return Uint32Array;case $kindUint8:return Uint8Array;case $kindUint16:return Uint16Array;case $kindUint32:case $kindUintptr:return Uint32Array;case $kindFloat32:return Float32Array;case $kindFloat64:return Float64Array;default:return Array}},$toNativeArray=function(e,n){var r=$nativeArray(e);return r===Array?n:new r(n)},$arrayTypes={},$arrayType=function(e,n){var r=e.id+"$"+n,t=$arrayTypes[r];return void 0===t&&(t=$newType(12,$kindArray,"["+n+"]"+e.string,!1,"",!1,null),$arrayTypes[r]=t,t.init(e,n)),t},$chanType=function(e,n,r){var t=(r?"<-":"")+"chan"+(n?"<- ":" ");n||r||"<"!=e.string[0]?t+=e.string:t+="("+e.string+")";var i=n?"SendChan":r?"RecvChan":"Chan",a=e[i];return void 0===a&&(a=$newType(4,$kindChan,t,!1,"",!1,null),e[i]=a,a.init(e,n,r)),a},$Chan=function(e,n){(n<0||n>2147483647)&&$throwRuntimeError("makechan: size out of range"),this.$elem=e,this.$capacity=n,this.$buffer=[],this.$sendQueue=[],this.$recvQueue=[],this.$closed=!1},$chanNil=new $Chan(null,0);$chanNil.$sendQueue=$chanNil.$recvQueue={length:0,push:function(){},shift:function(){},indexOf:function(){return-1}};var $funcTypes={},$funcType=function(e,n,r){var t=$mapArray(e,function(e){return e.id}).join(",")+"$"+$mapArray(n,function(e){return e.id}).join(",")+"$"+r,i=$funcTypes[t];if(void 0===i){var a=$mapArray(e,function(e){return e.string});r&&(a[a.length-1]="..."+a[a.length-1].substr(2));var o="func("+a.join(", ")+")";1===n.length?o+=" "+n[0].string:n.length>1&&(o+=" ("+$mapArray(n,function(e){return e.string}).join(", ")+")"),i=$newType(4,$kindFunc,o,!1,"",!1,null),$funcTypes[t]=i,i.init(e,n,r)}return i},$interfaceTypes={},$interfaceType=function(e){var n=$mapArray(e,function(e){return e.pkg+","+e.name+","+e.typ.id}).join("$"),r=$interfaceTypes[n];if(void 0===r){var t="interface {}";0!==e.length&&(t="interface { "+$mapArray(e,function(e){return(""!==e.pkg?e.pkg+".":"")+e.name+e.typ.string.substr(4)}).join("; ")+" }"),r=$newType(8,$kindInterface,t,!1,"",!1,null),$interfaceTypes[n]=r,r.init(e)}return r},$emptyInterface=$interfaceType([]),$ifaceNil={},$error=$newType(8,$kindInterface,"error",!0,"",!1,null);$error.init([{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],!1)}]);var $panicValue,$jsObjectPtr,$jsErrorPtr,$mapTypes={},$mapType=function(e,n){var r=e.id+"$"+n.id,t=$mapTypes[r];return void 0===t&&(t=$newType(4,$kindMap,"map["+e.string+"]"+n.string,!1,"",!1,null),$mapTypes[r]=t,t.init(e,n)),t},$makeMap=function(e,n){for(var r={},t=0;t2147483647)&&$throwRuntimeError("makeslice: len out of range"),(r<0||r2147483647)&&$throwRuntimeError("makeslice: cap out of range");var t=new e.nativeArray(r);if(e.nativeArray===Array)for(var i=0;i4||t<0)break}}finally{0==$scheduled.length&&clearTimeout(e)}},$schedule=function(e){e.asleep&&(e.asleep=!1,$awakeGoroutines++),$scheduled.push(e),$curGoroutine===$noGoroutine&&$runScheduled()},$setTimeout=function(e,n){return $awakeGoroutines++,setTimeout(function(){$awakeGoroutines--,e()},n)},$block=function(){$curGoroutine===$noGoroutine&&$throwRuntimeError("cannot block in JavaScript callback, fix by wrapping code in goroutine"),$curGoroutine.asleep=!0},$restore=function(e,n){return void 0!==e&&void 0!==e.$blk?e:n},$send=function(e,n){e.$closed&&$throwRuntimeError("send on closed channel");var r=e.$recvQueue.shift();if(void 0===r){if(!(e.$buffer.length65535){var l=Math.floor((u-65536)/1024)+55296,s=(u-65536)%1024+56320;$+=String.fromCharCode(l,s)}else $+=String.fromCharCode(u)}return $;case $kindStruct:var f=$packages.time;if(void 0!==f&&e.constructor===f.Time.ptr){var d=$div64(e.UnixNano(),new $Int64(0,1e6));return new Date($flatten64(d))}var p={},h=function(e,n){if(n===$jsObjectPtr)return e;switch(n.kind){case $kindPtr:return e===n.nil?p:h(e.$get(),n.elem);case $kindStruct:var r=n.fields[0];return h(e[r.prop],r.typ);case $kindInterface:return h(e.$val,e.constructor);default:return p}},k=h(e,n);if(k!==p)return k;if(void 0!==r)return r(e);k={};for(a=0;a>24;case $kindInt16:return parseInt(e)<<16>>16;case $kindInt32:return parseInt(e)>>0;case $kindUint:return parseInt(e);case $kindUint8:return parseInt(e)<<24>>>24;case $kindUint16:return parseInt(e)<<16>>>16;case $kindUint32:case $kindUintptr:return parseInt(e)>>>0;case $kindInt64:case $kindUint64:return new n(0,e);case $kindFloat32:case $kindFloat64:return parseFloat(e);case $kindArray:return e.length!==n.len&&$throwRuntimeError("got array with wrong size from JavaScript native"),$mapArray(e,function(e){return $internalize(e,n.elem,i)});case $kindFunc:return function(){for(var t=[],a=0;a=128)return!1;return!0}; +Error.stackTraceLimit = Infinity; -$packages["github.com/gopherjs/gopherjs/js"]=(function(){var $pkg={},$init,A,B,J,K,M,O,P,Q,R,S,T,G,H,L;A=$pkg.Object=$newType(0,$kindStruct,"js.Object",true,"github.com/gopherjs/gopherjs/js",true,function(object_){this.$val=this;if(arguments.length===0){this.object=null;return;}this.object=object_;});B=$pkg.Error=$newType(0,$kindStruct,"js.Error",true,"github.com/gopherjs/gopherjs/js",true,function(Object_){this.$val=this;if(arguments.length===0){this.Object=null;return;}this.Object=Object_;});J=$pkg.M=$newType(4,$kindMap,"js.M",true,"github.com/gopherjs/gopherjs/js",true,null);K=$pkg.S=$newType(12,$kindSlice,"js.S",true,"github.com/gopherjs/gopherjs/js",true,null);M=$sliceType($emptyInterface);O=$ptrType(A);P=$sliceType(O);Q=$funcType([P],[O],true);R=$funcType([],[O],false);S=$funcType([O],[],false);T=$ptrType(B);A.ptr.prototype.Get=function(a){var a,b;b=this;return b.object[$externalize(a,$String)];};A.prototype.Get=function(a){return this.$val.Get(a);};A.ptr.prototype.Set=function(a,b){var a,b,c;c=this;c.object[$externalize(a,$String)]=$externalize(b,$emptyInterface);};A.prototype.Set=function(a,b){return this.$val.Set(a,b);};A.ptr.prototype.Delete=function(a){var a,b;b=this;delete b.object[$externalize(a,$String)];};A.prototype.Delete=function(a){return this.$val.Delete(a);};A.ptr.prototype.Length=function(){var a;a=this;return $parseInt(a.object.length);};A.prototype.Length=function(){return this.$val.Length();};A.ptr.prototype.Index=function(a){var a,b;b=this;return b.object[a];};A.prototype.Index=function(a){return this.$val.Index(a);};A.ptr.prototype.SetIndex=function(a,b){var a,b,c;c=this;c.object[a]=$externalize(b,$emptyInterface);};A.prototype.SetIndex=function(a,b){return this.$val.SetIndex(a,b);};A.ptr.prototype.Call=function(a,b){var a,b,c,d;c=this;return(d=c.object,d[$externalize(a,$String)].apply(d,$externalize(b,M)));};A.prototype.Call=function(a,b){return this.$val.Call(a,b);};A.ptr.prototype.Invoke=function(a){var a,b;b=this;return b.object.apply(undefined,$externalize(a,M));};A.prototype.Invoke=function(a){return this.$val.Invoke(a);};A.ptr.prototype.New=function(a){var a,b;b=this;return new($global.Function.prototype.bind.apply(b.object,[undefined].concat($externalize(a,M))));};A.prototype.New=function(a){return this.$val.New(a);};A.ptr.prototype.Bool=function(){var a;a=this;return!!(a.object);};A.prototype.Bool=function(){return this.$val.Bool();};A.ptr.prototype.String=function(){var a;a=this;return $internalize(a.object,$String);};A.prototype.String=function(){return this.$val.String();};A.ptr.prototype.Int=function(){var a;a=this;return $parseInt(a.object)>>0;};A.prototype.Int=function(){return this.$val.Int();};A.ptr.prototype.Int64=function(){var a;a=this;return $internalize(a.object,$Int64);};A.prototype.Int64=function(){return this.$val.Int64();};A.ptr.prototype.Uint64=function(){var a;a=this;return $internalize(a.object,$Uint64);};A.prototype.Uint64=function(){return this.$val.Uint64();};A.ptr.prototype.Float=function(){var a;a=this;return $parseFloat(a.object);};A.prototype.Float=function(){return this.$val.Float();};A.ptr.prototype.Interface=function(){var a;a=this;return $internalize(a.object,$emptyInterface);};A.prototype.Interface=function(){return this.$val.Interface();};A.ptr.prototype.Unsafe=function(){var a;a=this;return a.object;};A.prototype.Unsafe=function(){return this.$val.Unsafe();};B.ptr.prototype.Error=function(){var a;a=this;return"JavaScript error: "+$internalize(a.Object.message,$String);};B.prototype.Error=function(){return this.$val.Error();};B.ptr.prototype.Stack=function(){var a;a=this;return $internalize(a.Object.stack,$String);};B.prototype.Stack=function(){return this.$val.Stack();};G=function(a){var a,b,c,d,e,f;b=a;c=new($global.Object)();c.__internal_object__=b;d=b.constructor.methods;e=0;while(true){if(!(e<$parseInt(d.length))){break;}f=[f];f[0]=d[e];if(!($internalize(f[0].pkg,$String)==="")){e=e+(1)>>0;continue;}c[$externalize($internalize(f[0].name,$String),$String)]=$externalize((function(f){return function(g){var g;return $externalizeFunction(b[$externalize($internalize(f[0].prop,$String),$String)],f[0].typ,$externalize(true,$Bool)).apply(b,$externalize(g,P));};})(f),Q);e=e+(1)>>0;}return c;};$pkg.MakeWrapper=G;H=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=[b];c=[c];b[0]=a;d=b[0].constructor;c[0]=new($global.Object)();e=(function(b,c){return function(e,f){var e,f;$global.Object.defineProperty(c[0],$externalize(e,$String),$externalize(f,J));};})(b,c);$r=e("__internal_object__",$makeMap($String.keyFor,[{k:"value",v:new $jsObjectPtr(b[0])}]));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=$internalize(d.string,$String);g=$internalize(d.pkg,$String);h="";if(f.charCodeAt(0)===42){h="*";}i=0;while(true){if(!(i>0));break;}i=i+(1)>>0;}j=g+"."+h+f;$r=e("$type",$makeMap($String.keyFor,[{k:"value",v:new $String(j)}]));$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k=null;l=new($global.Array)();m=d.methods;if(!(m===undefined)){l=l.concat(m);}n=d.elem;if(!(n===undefined)){k=n.fields;l=l.concat(n.methods);}else{k=d.fields;}o=0;case 3:if(!(o<$parseInt(l.length))){$s=4;continue;}p=[p];p[0]=l[o];if(!($internalize(p[0].pkg,$String)==="")){o=o+(1)>>0;$s=3;continue;}$r=e($internalize(p[0].prop,$String),$makeMap($String.keyFor,[{k:"value",v:new Q((function(b,c,p){return function(q){var q;return $externalizeFunction(b[0][$externalize($internalize(p[0].prop,$String),$String)],p[0].typ,$externalize(true,$Bool),H).apply(b[0],$externalize(q,P));};})(b,c,p))}]));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}o=o+(1)>>0;$s=3;continue;case 4:if(!(k===undefined)){$s=6;continue;}$s=7;continue;case 6:q=0;case 8:if(!(q<$parseInt(k.length))){$s=9;continue;}r=[r];r[0]=k[q];if(!!!(r[0].exported)){q=q+(1)>>0;$s=8;continue;}$r=e($internalize(r[0].prop,$String),$makeMap($String.keyFor,[{k:"get",v:new R((function(b,c,r){return function(){var s;s=$copyIfRequired(b[0].$val[$externalize($internalize(r[0].prop,$String),$String)],r[0].typ);return $externalize(s,r[0].typ,H);};})(b,c,r))},{k:"set",v:new S((function(b,c,r){return function(s){var s,t;t=$internalize(s,r[0].typ,H);b[0].$val[$externalize($internalize(r[0].prop,$String),$String)]=t;};})(b,c,r))}]));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}q=q+(1)>>0;$s=8;continue;case 9:case 7:$s=-1;return c[0];}return;}var $f={$blk:H,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s};return $f;};$pkg.MakeFullWrapper=H;L=function(){var a;a=new B.ptr(null);$unused(a);};O.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[O],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[O],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,M],[O],true)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([M],[O],true)},{prop:"New",name:"New",pkg:"",typ:$funcType([M],[O],true)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}];T.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Stack",name:"Stack",pkg:"",typ:$funcType([],[$String],false)}];A.init("github.com/gopherjs/gopherjs/js",[{prop:"object",name:"object",embedded:false,exported:false,typ:O,tag:""}]);B.init("",[{prop:"Object",name:"Object",embedded:true,exported:true,typ:O,tag:""}]);J.init($String,$emptyInterface);K.init($emptyInterface);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:L();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["runtime"]=(function(){var $pkg={},$init,A,C,D,AT,AZ,BD,AM,E,AU;A=$packages["github.com/gopherjs/gopherjs/js"];C=$pkg._type=$newType(0,$kindStruct,"runtime._type",true,"runtime",false,function(str_){this.$val=this;if(arguments.length===0){this.str="";return;}this.str=str_;});D=$pkg.TypeAssertionError=$newType(0,$kindStruct,"runtime.TypeAssertionError",true,"runtime",true,function(_interface_,concrete_,asserted_,missingMethod_){this.$val=this;if(arguments.length===0){this._interface=AZ.nil;this.concrete=AZ.nil;this.asserted=AZ.nil;this.missingMethod="";return;}this._interface=_interface_;this.concrete=concrete_;this.asserted=asserted_;this.missingMethod=missingMethod_;});AT=$pkg.errorString=$newType(8,$kindString,"runtime.errorString",true,"runtime",false,null);AZ=$ptrType(C);BD=$ptrType(D);C.ptr.prototype.string=function(){var a;a=this;return a.str;};C.prototype.string=function(){return this.$val.string();};C.ptr.prototype.pkgpath=function(){var a;a=this;return"";};C.prototype.pkgpath=function(){return this.$val.pkgpath();};D.ptr.prototype.RuntimeError=function(){};D.prototype.RuntimeError=function(){return this.$val.RuntimeError();};D.ptr.prototype.Error=function(){var a,b,c,d,e;a=this;b="interface";if(!(a._interface===AZ.nil)){b=a._interface.string();}c=a.asserted.string();if(a.concrete===AZ.nil){return"interface conversion: "+b+" is nil, not "+c;}d=a.concrete.string();if(a.missingMethod===""){e="interface conversion: "+b+" is "+d+", not "+c;if(d===c){if(!(a.concrete.pkgpath()===a.asserted.pkgpath())){e=e+(" (types from different packages)");}else{e=e+(" (types from different scopes)");}}return e;}return"interface conversion: "+d+" is not "+c+": missing method "+a.missingMethod;};D.prototype.Error=function(){return this.$val.Error();};E=function(){var a,b;a=$packages[$externalize("github.com/gopherjs/gopherjs/js",$String)];$jsObjectPtr=a.Object.ptr;$jsErrorPtr=a.Error.ptr;$throwRuntimeError=AU;AM=$internalize($goVersion,$String);b=$ifaceNil;b=new D.ptr(AZ.nil,AZ.nil,AZ.nil,"");$unused(b);};AT.prototype.RuntimeError=function(){var a;a=this.$val;};$ptrType(AT).prototype.RuntimeError=function(){return new AT(this.$get()).RuntimeError();};AT.prototype.Error=function(){var a;a=this.$val;return"runtime error: "+(a);};$ptrType(AT).prototype.Error=function(){return new AT(this.$get()).Error();};AU=function(a){var a;$panic(new AT((a)));};AZ.methods=[{prop:"string",name:"string",pkg:"runtime",typ:$funcType([],[$String],false)},{prop:"pkgpath",name:"pkgpath",pkg:"runtime",typ:$funcType([],[$String],false)}];BD.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AT.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];C.init("runtime",[{prop:"str",name:"str",embedded:false,exported:false,typ:$String,tag:""}]);D.init("runtime",[{prop:"_interface",name:"_interface",embedded:false,exported:false,typ:AZ,tag:""},{prop:"concrete",name:"concrete",embedded:false,exported:false,typ:AZ,tag:""},{prop:"asserted",name:"asserted",embedded:false,exported:false,typ:AZ,tag:""},{prop:"missingMethod",name:"missingMethod",embedded:false,exported:false,typ:$String,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}AM="";E();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["math/bits"]=(function(){var $pkg={},$init;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["math"]=(function(){var $pkg={},$init,B,A,IT,IU,IV,IW,FL,FM,FN,FO,FP,HH,EX,EY,FK,GA,GH,GK,GL,GM,GS,GT,GW,GX,GZ,HA,HD,HI,HL,HM;B=$packages["github.com/gopherjs/gopherjs/js"];A=$packages["math/bits"];IT=$arrayType($Uint32,2);IU=$arrayType($Float32,2);IV=$arrayType($Float64,1);IW=$structType("math",[{prop:"uint32array",name:"uint32array",embedded:false,exported:false,typ:IT,tag:""},{prop:"float32array",name:"float32array",embedded:false,exported:false,typ:IU,tag:""},{prop:"float64array",name:"float64array",embedded:false,exported:false,typ:IV,tag:""}]);EX=function(av,aw){var av,aw;if(GL(av,1)||GL(aw,1)){return GK(1);}else if(GM(av)||GM(aw)){return GW();}else if((av===0)&&(av===aw)){if(GZ(av)){return aw;}return av;}if(av>aw){return av;}return aw;};EY=function(av,aw){var av,aw;if(GL(av,-1)||GL(aw,-1)){return GK(-1);}else if(GM(av)||GM(aw)){return GW();}else if((av===0)&&(av===aw)){if(GZ(av)){return av;}return aw;}if(av>>0)));};$pkg.Abs=FK;GA=function(av){var av;return $parseFloat(FL.cos(av));};$pkg.Cos=GA;GH=function(av){var av;return $parseFloat(FL.floor(av));};$pkg.Floor=GH;GK=function(av){var av;if(av>=0){return FN;}else{return FO;}};$pkg.Inf=GK;GL=function(av,aw){var av,aw;if(av===FN){return aw>=0;}if(av===FO){return aw<=0;}return false;};$pkg.IsInf=GL;GM=function(av){var av,aw;aw=false;aw=!((av===av));return aw;};$pkg.IsNaN=GM;GS=function(av,aw){var av,aw;return EX(av,aw);};$pkg.Max=GS;GT=function(av,aw){var av,aw;return EY(av,aw);};$pkg.Min=GT;GW=function(){return FP;};$pkg.NaN=GW;GX=function(av,aw){var av,aw;if((av===1)||((av===-1)&&((aw===FN)||(aw===FO)))){return 1;}return $parseFloat(FL.pow(av,aw));};$pkg.Pow=GX;GZ=function(av){var av;return av<0||(1/av===FO);};$pkg.Signbit=GZ;HA=function(av){var av;return $parseFloat(FL.sin(av));};$pkg.Sin=HA;HD=function(av){var av;return $parseFloat(FL.sqrt(av));};$pkg.Sqrt=HD;HI=function(){var av;av=new($global.ArrayBuffer)(8);HH.uint32array=new($global.Uint32Array)(av);HH.float32array=new($global.Float32Array)(av);HH.float64array=new($global.Float64Array)(av);};HL=function(av){var av,aw,ax;HH.float64array[0]=av;return(aw=$shiftLeft64((new $Uint64(0,HH.uint32array[1])),32),ax=(new $Uint64(0,HH.uint32array[0])),new $Uint64(aw.$high+ax.$high,aw.$low+ax.$low));};$pkg.Float64bits=HL;HM=function(av){var av;HH.uint32array[0]=((av.$low>>>0));HH.uint32array[1]=(($shiftRightUint64(av,32).$low>>>0));return HH.float64array[0];};$pkg.Float64frombits=HM;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}HH=new IW.ptr(IT.zero(),IU.zero(),IV.zero());FL=$global.Math;FM=0;FN=1/FM;FO=-1/FM;FP=$parseFloat($NaN);HI();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["resolv"]=(function(){var $pkg={},$init,A,B,C,N,P,Q,S,U,X,Z,AA,AE,AG,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,K,O,R,T,V,W,Y,AB,AC,AD,AF,AH;A=$packages["math"];B=$pkg.Vector=$newType(12,$kindSlice,"resolv.Vector",true,"resolv",true,null);C=$pkg.Axis=$newType(4,$kindInt,"resolv.Axis",true,"resolv",true,null);N=$pkg.Space=$newType(0,$kindStruct,"resolv.Space",true,"resolv",true,function(Cells_,CellWidth_,CellHeight_){this.$val=this;if(arguments.length===0){this.Cells=AL.nil;this.CellWidth=0;this.CellHeight=0;return;}this.Cells=Cells_;this.CellWidth=CellWidth_;this.CellHeight=CellHeight_;});P=$pkg.Shape=$newType(8,$kindInterface,"resolv.Shape",true,"resolv",true,null);Q=$pkg.Line=$newType(0,$kindStruct,"resolv.Line",true,"resolv",true,function(Start_,End_){this.$val=this;if(arguments.length===0){this.Start=B.nil;this.End=B.nil;return;}this.Start=Start_;this.End=End_;});S=$pkg.ConvexPolygon=$newType(0,$kindStruct,"resolv.ConvexPolygon",true,"resolv",true,function(Points_,X_,Y_,Closed_){this.$val=this;if(arguments.length===0){this.Points=AP.nil;this.X=0;this.Y=0;this.Closed=false;return;}this.Points=Points_;this.X=X_;this.Y=Y_;this.Closed=Closed_;});U=$pkg.ContactSet=$newType(0,$kindStruct,"resolv.ContactSet",true,"resolv",true,function(Points_,MTV_,Center_){this.$val=this;if(arguments.length===0){this.Points=AP.nil;this.MTV=B.nil;this.Center=B.nil;return;}this.Points=Points_;this.MTV=MTV_;this.Center=Center_;});X=$pkg.Circle=$newType(0,$kindStruct,"resolv.Circle",true,"resolv",true,function(X_,Y_,Radius_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;this.Radius=0;return;}this.X=X_;this.Y=Y_;this.Radius=Radius_;});Z=$pkg.Projection=$newType(0,$kindStruct,"resolv.Projection",true,"resolv",true,function(Min_,Max_){this.$val=this;if(arguments.length===0){this.Min=0;this.Max=0;return;}this.Min=Min_;this.Max=Max_;});AA=$pkg.Object=$newType(0,$kindStruct,"resolv.Object",true,"resolv",true,function(Shape_,Space_,X_,Y_,W_,H_,TouchingCells_,Data_,ignoreList_,tags_){this.$val=this;if(arguments.length===0){this.Shape=$ifaceNil;this.Space=AM.nil;this.X=0;this.Y=0;this.W=0;this.H=0;this.TouchingCells=AK.nil;this.Data=$ifaceNil;this.ignoreList=false;this.tags=AV.nil;return;}this.Shape=Shape_;this.Space=Space_;this.X=X_;this.Y=Y_;this.W=W_;this.H=H_;this.TouchingCells=TouchingCells_;this.Data=Data_;this.ignoreList=ignoreList_;this.tags=tags_;});AE=$pkg.Collision=$newType(0,$kindStruct,"resolv.Collision",true,"resolv",true,function(checkingObject_,dx_,dy_,Objects_,Cells_){this.$val=this;if(arguments.length===0){this.checkingObject=AN.nil;this.dx=0;this.dy=0;this.Objects=AO.nil;this.Cells=AK.nil;return;}this.checkingObject=checkingObject_;this.dx=dx_;this.dy=dy_;this.Objects=Objects_;this.Cells=Cells_;});AG=$pkg.Cell=$newType(0,$kindStruct,"resolv.Cell",true,"resolv",true,function(X_,Y_,Objects_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;this.Objects=AO.nil;return;}this.X=X_;this.Y=Y_;this.Objects=Objects_;});AI=$sliceType($Float64);AJ=$ptrType(AG);AK=$sliceType(AJ);AL=$sliceType(AK);AM=$ptrType(N);AN=$ptrType(AA);AO=$sliceType(AN);AP=$sliceType(B);AQ=$ptrType(Q);AR=$sliceType(AQ);AS=$ptrType(X);AT=$ptrType(S);AU=$ptrType(U);AV=$sliceType($String);AW=$ptrType(AE);AX=$sliceType(C);AY=$mapType(AN,$Bool);B.prototype.Clone=function(){var a,b;a=this;b=$makeSlice(B,a.$length);$copySlice(b,a);return b;};$ptrType(B).prototype.Clone=function(){return this.$get().Clone();};B.prototype.Add=function(a){var a,b,c,d,e,f;b=this;c=b.$length;d=a;e=0;while(true){if(!(e=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]).$length>c){AC($convertSliceType(b,AI),1,$convertSliceType(b,AI),$convertSliceType($subslice(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),0,c),AI));}else{AC($convertSliceType(b,AI),1,$convertSliceType(b,AI),$convertSliceType(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),AI));}e++;}return b;};$ptrType(B).prototype.Add=function(a){return this.$get().Add(a);};B.prototype.Sub=function(a){var a,b,c,d,e,f;b=this;c=b.$length;d=a;e=0;while(true){if(!(e=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]).$length>c){AC($convertSliceType(b,AI),-1,$convertSliceType($subslice(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),0,c),AI),$convertSliceType(b,AI));}else{AC($convertSliceType(b,AI),-1,$convertSliceType(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),AI),$convertSliceType(b,AI));}e++;}return b;};$ptrType(B).prototype.Sub=function(a){return this.$get().Sub(a);};B.prototype.Scale=function(a){var a,b;b=this;AD($convertSliceType(b,AI),a,$convertSliceType(b,AI));return b;};$ptrType(B).prototype.Scale=function(a){return this.$get().Scale(a);};B.prototype.Equal=function(a){var a,b,c,d,e;b=this;if(!((b.$length===a.$length))){return false;}c=b;d=0;while(true){if(!(d=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e])-((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]))>1e-08){return false;}d++;}return true;};$ptrType(B).prototype.Equal=function(a){return this.$get().Equal(a);};B.prototype.Magnitude=function(){var a;a=this;return A.Sqrt(a.Magnitude2());};$ptrType(B).prototype.Magnitude=function(){return this.$get().Magnitude();};B.prototype.Magnitude2=function(){var a,b,c,d,e;a=this;b=0;c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=b+(e*e);d++;}return b;};$ptrType(B).prototype.Magnitude2=function(){return this.$get().Magnitude2();};B.prototype.Unit=function(){var a,b,c,d,e;a=this;b=a.Magnitude();if(b<1e-08){return a;}c=a;d=0;while(true){if(!(d=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]=((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e])/b);d++;}return a;};$ptrType(B).prototype.Unit=function(){return this.$get().Unit();};K=function(a,b){var a,b,c,d,e,f,g,h,i,j,k;c=0;d=a.$length;e=b.$length;f=c;g=d;h=e;if(g>h){b=$appendSlice(b,$convertSliceType($makeSlice(B,(g-h>>0)),AI));}if(g>0)),AI));}i=a;j=0;while(true){if(!(j=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+k])*((k<0||k>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+k]));j++;}return f;};$pkg.Dot=K;B.prototype.Dot=function(a){var a,b;b=this;return K(b,a);};$ptrType(B).prototype.Dot=function(a){return this.$get().Dot(a);};B.prototype.Cross=function(a){var a,b;b=this;if(!((b.$length===3))||!((a.$length===3))){return B.nil;}return new B([(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2])-(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]),(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])-(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]),(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2])-(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])]);};$ptrType(B).prototype.Cross=function(a){return this.$get().Cross(a);};B.prototype.Rotate=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;c=this;d=2;e=c.$length;f=d;g=e;if(g===0){return c;}if(b.$length>0){f=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]);}if((g===1)&&!((f===2))){c=$append(c,0,0);}if((g<2&&(f===2))||((g===2)&&!((f===2)))){c=$append(c,0);}h=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]);i=(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);j=h;k=i;l=A.Cos(a);m=A.Sin(a);n=l;o=m;p=f;if(p===(0)){q=(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]);(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=k*n-q*o);(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]=k*o+q*n);}else if(p===(1)){r=(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]);(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=j*n+r*o);(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]=-j*o+r*n);}else if(p===(2)){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=j*n-k*o);(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=j*o+k*n);}if(g>3){return $subslice(c,0,3);}return c;};$ptrType(B).prototype.Rotate=function(a,b){return this.$get().Rotate(a,b);};B.prototype.X=function(){var a;a=this;if(a.$length<1){return 0;}return(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]);};$ptrType(B).prototype.X=function(){return this.$get().X();};B.prototype.Y=function(){var a;a=this;if(a.$length<2){return 0;}return(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]);};$ptrType(B).prototype.Y=function(){return this.$get().Y();};B.prototype.Z=function(){var a;a=this;if(a.$length<3){return 0;}return(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]);};$ptrType(B).prototype.Z=function(){return this.$get().Z();};O=function(a,b,c,d){var a,b,c,d,e,f,g;e=new N.ptr(AL.nil,c,d);e.Resize((f=a/c,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero")),(g=b/d,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero")));return e;};$pkg.NewSpace=O;N.ptr.prototype.Add=function(a){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(b===AM.nil){$panic(new $String("ERROR: space is nil"));}c=a;d=0;case 1:if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);e.Space=b;$r=e.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d++;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:N.ptr.prototype.Add,$c:true,$r,a,b,c,d,e,$s};return $f;};N.prototype.Add=function(a){return this.$val.Add(a);};N.ptr.prototype.Remove=function(a){var a,b,c,d,e,f,g,h;b=this;if(b===AM.nil){$panic(new $String("ERROR: space is nil"));}c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=e.TouchingCells;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);h.unregister(e);g++;}e.TouchingCells=new AK([]);e.Space=AM.nil;d++;}};N.prototype.Remove=function(a){return this.$val.Remove(a);};N.ptr.prototype.Objects=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;a=this;b=$makeMap(AN.keyFor,[]);c=new AO([]);d=a.Cells;e=0;while(true){if(!(e=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+f]));i=0;while(true){if(!(i=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+f])),((j<0||j>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+j])).Objects;n=0;while(true){if(!(n=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+n]);p=(q=b[AN.keyFor(o)],q!==undefined?[q.v,true]:[false,false]);r=p[1];if(!r){c=$append(c,o);s=o;(b||$throwRuntimeError("assignment to entry in nil map"))[AN.keyFor(s)]={k:s,v:true};}n++;}i++;}e++;}return c;};N.prototype.Objects=function(){return this.$val.Objects();};N.ptr.prototype.Resize=function(a,b){var a,b,c,d,e,f,g;c=this;c.Cells=new AL([]);d=0;while(true){if(!(d=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+d]=$append((f=c.Cells,((d<0||d>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+d])),AH(e,d))));e=e+(1)>>0;}d=d+(1)>>0;}};N.prototype.Resize=function(a,b){return this.$val.Resize(a,b);};N.ptr.prototype.Cell=function(a,b){var a,b,c,d,e,f;c=this;if(b>=0&&b=0&&a<(d=c.Cells,((b<0||b>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b])).$length){return(e=(f=c.Cells,((b<0||b>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+b])),((a<0||a>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+a]));}return AJ.nil;};N.prototype.Cell=function(a,b){return this.$val.Cell(a,b);};N.ptr.prototype.CheckCells=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m;f=this;g=a;while(true){if(!(g<(a+c>>0))){break;}h=b;while(true){if(!(h<(b+d>>0))){break;}i=f.Cell(g,h);if(!(i===AJ.nil)){if(e.$length>0){if(i.ContainsTags(e)){j=i.Objects;k=0;while(true){if(!(k=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]);if(l.HasTags(e)){return l;}k++;}}}else if(i.Occupied()){return(m=i.Objects,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0]));}}h=h+(1)>>0;}g=g+(1)>>0;}return AN.nil;};N.prototype.CheckCells=function(a,b,c,d,e){return this.$val.CheckCells(a,b,c,d,e);};N.ptr.prototype.CheckCellsWorld=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l;f=this;g=f.WorldToSpace(a,b);h=g[0];i=g[1];j=f.WorldToSpace(c,d);k=j[0];l=j[1];return f.CheckCells(h,i,k,l,e);};N.prototype.CheckCellsWorld=function(a,b,c,d,e){return this.$val.CheckCellsWorld(a,b,c,d,e);};N.ptr.prototype.UnregisterAllObjects=function(){var a,b,c,d,e,f,g;a=this;b=0;while(true){if(!(b=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b])).$length)){break;}g=(e=(f=a.Cells,((b<0||b>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+b])),((c<0||c>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+c]));a.Remove(g.Objects);c=c+(1)>>0;}b=b+(1)>>0;}};N.prototype.UnregisterAllObjects=function(){return this.$val.UnregisterAllObjects();};N.ptr.prototype.WorldToSpace=function(a,b){var a,b,c,d,e;c=this;d=((A.Floor(a/(c.CellWidth))>>0));e=((A.Floor(b/(c.CellHeight))>>0));return[d,e];};N.prototype.WorldToSpace=function(a,b){return this.$val.WorldToSpace(a,b);};N.ptr.prototype.SpaceToWorld=function(a,b){var a,b,c,d,e;c=this;d=(($imul(a,c.CellWidth)));e=(($imul(b,c.CellHeight)));return[d,e];};N.prototype.SpaceToWorld=function(a,b){return this.$val.SpaceToWorld(a,b);};N.ptr.prototype.Height=function(){var a;a=this;return a.Cells.$length;};N.prototype.Height=function(){return this.$val.Height();};N.ptr.prototype.Width=function(){var a,b;a=this;if(a.Cells.$length>0){return(b=a.Cells,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])).$length;}return 0;};N.prototype.Width=function(){return this.$val.Width();};N.ptr.prototype.CellsInLine=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;e=this;f=new AK([]);g=e.Cell(a,b);h=e.Cell(c,d);if(!(g===AJ.nil)&&!(h===AJ.nil)){i=new B([((c-a>>0)),((d-b>>0))]).Unit();(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0]=(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])*(((j=e.CellWidth/2,(j===j&&j!==1/0&&j!==-1/0)?j>>0:$throwRuntimeError("integer divide by zero")))));(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]=(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1])*(((k=e.CellHeight/2,(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero")))));l=e.SpaceToWorld(a,b);m=l[0];n=l[1];q=new B([m+((o=e.CellWidth/2,(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"))),n+((p=e.CellHeight/2,(p===p&&p!==1/0&&p!==-1/0)?p>>0:$throwRuntimeError("integer divide by zero")))]);r=false;while(true){if(!(!(g===AJ.nil))){break;}if(g===h){f=$append(f,g);break;}f=$append(f,g);if(r){(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]=(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1])+((1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1])));}else{(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]=(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0])+((0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])));}s=e.WorldToSpace((0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]),(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]));t=s[0];u=s[1];v=e.Cell(t,u);if(!(v===g)){g=v;}r=!r;}}return f;};N.prototype.CellsInLine=function(a,b,c,d){return this.$val.CellsInLine(a,b,c,d);};R=function(a,b,c,d){var a,b,c,d;return new Q.ptr(new B([a,b]),new B([c,d]));};$pkg.NewLine=R;Q.ptr.prototype.Project=function(a){var a,b;b=this;return b.Vector().Scale(a.Dot(b.Start.Sub(new AP([b.End]))));};Q.prototype.Project=function(a){return this.$val.Project(a);};Q.ptr.prototype.Normal=function(){var a,b;a=this;b=a.Vector();return new B([(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]),-(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])]).Unit();};Q.prototype.Normal=function(){return this.$val.Normal();};Q.ptr.prototype.Vector=function(){var a;a=this;return a.End.Clone().Sub(new AP([a.Start])).Unit();};Q.prototype.Vector=function(){return this.$val.Vector();};Q.ptr.prototype.IntersectionPointsLine=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=this;k=((c=b.End,(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]))-(d=b.Start,(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])))*((e=a.End,(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))-(f=a.Start,(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])))-((g=a.End,(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]))-(h=a.Start,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])))*((i=b.End,(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]))-(j=b.Start,(1>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+1])));if(!((k===0))){t=((((l=b.Start,(1>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+1]))-(m=a.Start,(1>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+1])))*((n=a.End,(0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0]))-(o=a.Start,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0]))))-(((p=b.Start,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]))-(q=a.Start,(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0])))*((r=a.End,(1>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+1]))-(s=a.Start,(1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1]))))+1)/k;ac=((((u=b.Start,(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]))-(v=a.Start,(1>=v.$length?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+1])))*((w=b.End,(0>=w.$length?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+0]))-(x=b.Start,(0>=x.$length?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+0]))))-(((y=b.Start,(0>=y.$length?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+0]))-(z=a.Start,(0>=z.$length?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+0])))*((aa=b.End,(1>=aa.$length?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+1]))-(ab=b.Start,(1>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+1]))))+1)/k;if((0=ad.$length?($throwRuntimeError("index out of range"),undefined):ad.$array[ad.$offset+0]))-(ae=b.Start,(0>=ae.$length?($throwRuntimeError("index out of range"),undefined):ae.$array[ae.$offset+0]));ai=(ag=b.End,(1>=ag.$length?($throwRuntimeError("index out of range"),undefined):ag.$array[ag.$offset+1]))-(ah=b.Start,(1>=ah.$length?($throwRuntimeError("index out of range"),undefined):ah.$array[ah.$offset+1]));return new B([(aj=b.Start,(0>=aj.$length?($throwRuntimeError("index out of range"),undefined):aj.$array[aj.$offset+0]))+(t*af),(ak=b.Start,(1>=ak.$length?($throwRuntimeError("index out of range"),undefined):ak.$array[ak.$offset+1]))+(t*ai)]);}}return B.nil;};Q.prototype.IntersectionPointsLine=function(a){return this.$val.IntersectionPointsLine(a);};Q.ptr.prototype.IntersectionPointsCircle=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;b=this;c=new AP([]);d=new B([a.X,a.Y]);e=b.Start.Sub(new AP([d]));f=b.End.Sub(new AP([d]));g=f.Sub(new AP([e]));h=(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])+(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]);i=2*(((0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])*(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]))+((1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])*(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])));j=((0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])*(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]))+((1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])*(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))-(a.Radius*a.Radius);k=i*i-(4*h*j);if(k<0){}else if(k===0){l=-i/(2*h);if(l>=0&&l<=1){c=$append(c,new B([(m=b.Start,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0]))+l*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(n=b.Start,(1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1]))+l*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])]));}}else{o=(-i+A.Sqrt(k))/(2*h);if(o>=0&&o<=1){c=$append(c,new B([(p=b.Start,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]))+o*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(q=b.Start,(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]))+o*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])]));}o=(-i-A.Sqrt(k))/(2*h);if(o>=0&&o<=1){c=$append(c,new B([(r=b.Start,(0>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+0]))+o*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(s=b.Start,(1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1]))+o*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])]));}}return c;};Q.prototype.IntersectionPointsCircle=function(a){return this.$val.IntersectionPointsCircle(a);};T=function(a){var a,b;b=new S.ptr(new AP([]),0,0,true);b.AddPoints(a);return b;};$pkg.NewConvexPolygon=T;S.ptr.prototype.Clone=function(){var a,b,c,d,e,f;a=this;b=new AP([]);c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=$append(b,e.Clone());d++;}f=T(AI.nil);f.X=a.X;f.Y=a.Y;f.AddPointsVec(b);f.Closed=a.Closed;return f;};S.prototype.Clone=function(){return this.$val.Clone();};S.ptr.prototype.AddPointsVec=function(a){var a,b;b=this;b.Points=$appendSlice(b.Points,a);};S.prototype.AddPointsVec=function(a){return this.$val.AddPointsVec(a);};S.ptr.prototype.AddPoints=function(a){var a,b,c,d;b=this;c=0;while(true){if(!(c=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c]),(d=c+1>>0,((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d]))]));c=c+(2)>>0;}};S.prototype.AddPoints=function(a){return this.$val.AddPoints(a);};S.ptr.prototype.Lines=function(){var a,b,c,d,e,f,g,h,i,j;a=this;b=new AR([]);c=a.Transformed();d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]);g=e;h=f;if(d<(c.$length-1>>0)){h=(i=d+1>>0,((i<0||i>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+i]));}else if(!a.Closed){break;}j=R((0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]),(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]),(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));b=$append(b,j);d=d+(1)>>0;}return b;};S.prototype.Lines=function(){return this.$val.Lines();};S.ptr.prototype.Transformed=function(){var a,b,c,d,e;a=this;b=new AP([]);c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=$append(b,new B([(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])+a.X,(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])+a.Y]));d++;}return b;};S.prototype.Transformed=function(){return this.$val.Transformed();};S.ptr.prototype.Bounds=function(){var a,b,c,d,e,f,g,h;a=this;b=a.Transformed();e=new B([(c=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]),(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])),(d=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]),(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]))]);f=e.Clone();g=0;while(true){if(!(g=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+g]);if((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])<(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])){(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]=(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]));}else if((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])>(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0])){(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]=(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]));}if((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])<(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])){(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]=(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));}else if((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])>(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])){(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1]=(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));}g=g+(1)>>0;}return[e,f];};S.prototype.Bounds=function(){return this.$val.Bounds();};S.ptr.prototype.Position=function(){var a;a=this;return[a.X,a.Y];};S.prototype.Position=function(){return this.$val.Position();};S.ptr.prototype.SetPosition=function(a,b){var a,b,c;c=this;c.X=a;c.Y=b;};S.prototype.SetPosition=function(a,b){return this.$val.SetPosition(a,b);};S.ptr.prototype.SetPositionVec=function(a){var a,b;b=this;b.X=a.X();b.Y=a.Y();};S.prototype.SetPositionVec=function(a){return this.$val.SetPositionVec(a);};S.ptr.prototype.Move=function(a,b){var a,b,c;c=this;c.X=c.X+(a);c.Y=c.Y+(b);};S.prototype.Move=function(a,b){return this.$val.Move(a,b);};S.ptr.prototype.MoveVec=function(a){var a,b;b=this;b.X=b.X+(a.X());b.Y=b.Y+(a.Y());};S.prototype.MoveVec=function(a){return this.$val.MoveVec(a);};S.ptr.prototype.Center=function(){var a,b,c,d,e;a=this;b=new B([0,0]);c=a.Transformed();d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b.Add(new AP([e]));d++;}(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])/((a.Transformed().$length)));(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]=(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])/((a.Transformed().$length)));return b;};S.prototype.Center=function(){return this.$val.Center();};S.ptr.prototype.Project=function(a){var a,b,c,d,e,f,g,h,i,j,k;b=this;a=a.Unit();c=b.Transformed();f=a.Dot(new B([(d=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]),(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])),(e=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]),(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))]));g=f;h=1;while(true){if(!(h=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+h]),(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])),(j=((h<0||h>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+h]),(1>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+1]))]));if(kg){g=k;}h=h+(1)>>0;}return new Z.ptr(f,g);};S.prototype.Project=function(a){return this.$val.Project(a);};S.ptr.prototype.SATAxes=function(){var a,b,c,d,e;a=this;b=new AP([]);c=a.Lines();d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=$append(b,e.Normal());d++;}return b;};S.prototype.SATAxes=function(){return this.$val.SATAxes();};S.ptr.prototype.PointInside=function(a){var a,b,c,d,e,f,g;b=this;c=R((0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]),(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]),(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])+9.99999999999e+11,(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]));d=0;e=b.Lines();f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(!(g.IntersectionPointsLine(c)===B.nil)){d=d+(1)>>0;}f++;}return d===1;};S.prototype.PointInside=function(a){return this.$val.PointInside(a);};V=function(){return new U.ptr(new AP([]),new B([0,0]),new B([0,0]));};$pkg.NewContactSet=V;U.ptr.prototype.LeftmostPoint=function(){var a,b,c,d,e;a=this;b=B.nil;c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.nil||(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])<(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])){b=e;}d++;}return b;};U.prototype.LeftmostPoint=function(){return this.$val.LeftmostPoint();};U.ptr.prototype.RightmostPoint=function(){var a,b,c,d,e;a=this;b=B.nil;c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.nil||(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])>(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])){b=e;}d++;}return b;};U.prototype.RightmostPoint=function(){return this.$val.RightmostPoint();};U.ptr.prototype.TopmostPoint=function(){var a,b,c,d,e;a=this;b=B.nil;c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.nil||(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])<(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])){b=e;}d++;}return b;};U.prototype.TopmostPoint=function(){return this.$val.TopmostPoint();};U.ptr.prototype.BottommostPoint=function(){var a,b,c,d,e;a=this;b=B.nil;c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.nil||(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])>(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])){b=e;}d++;}return b;};U.prototype.BottommostPoint=function(){return this.$val.BottommostPoint();};S.ptr.prototype.Intersection=function(a,b,c){var a,aa,ab,ac,ad,ae,af,ag,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=this;e=V();f=d.X;g=d.Y;d.X=d.X+(a);d.Y=d.Y+(b);h=$assertType(c,AS,true);i=h[0];j=h[1];if(j){k=d.Lines();l=0;while(true){if(!(l=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+l]);e.Points=$appendSlice(e.Points,m.IntersectionPointsCircle(i));l++;}}else{n=$assertType(c,AT,true);o=n[0];p=n[1];if(p){q=d.Lines();r=0;while(true){if(!(r=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+r]);t=o.Lines();u=0;while(true){if(!(u=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+u]);w=s.IntersectionPointsLine(v);if(!(w===B.nil)){e.Points=$append(e.Points,w);}u++;}r++;}}}if(e.Points.$length>0){x=e.Points;y=0;while(true){if(!(y=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+y]);e.Center=e.Center.Add(new AP([z]));y++;}(ab=e.Center,(0>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0]=(aa=e.Center,(0>=aa.$length?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+0]))/((e.Points.$length))));(ad=e.Center,(1>=ad.$length?($throwRuntimeError("index out of range"),undefined):ad.$array[ad.$offset+1]=(ac=e.Center,(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]))/((e.Points.$length))));ae=d.calculateMTV(e,c);if(!(ae===B.nil)){e.MTV=ae;}}else{e=AU.nil;}if(!(e===AU.nil)&&(!((a===0))||!((b===0)))){af=new B([a,b]).Magnitude();ag=e.MTV.Magnitude();e.MTV=e.MTV.Unit().Scale(ag-af);}d.X=f;d.Y=g;return e;};S.prototype.Intersection=function(a,b,c){return this.$val.Intersection(a,b,c);};S.ptr.prototype.calculateMTV=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;c=this;d=new B([0,0]);e=new B([1.7976931348623157e+308,0]);f=b;if($assertType(f,AT,true)[1]){g=f.$val;h=c.SATAxes();i=0;while(true){if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);if(!$clone(c.Project(j),Z).Overlapping($clone(g.Project(j),Z))){return B.nil;}k=$clone(c.Project(j),Z).Overlap($clone(g.Project(j),Z));if(e.Magnitude()>k){e=j.Scale(k);}i++;}l=g.SATAxes();m=0;while(true){if(!(m=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);if(!$clone(c.Project(n),Z).Overlapping($clone(g.Project(n),Z))){return B.nil;}o=$clone(c.Project(n),Z).Overlap($clone(g.Project(n),Z));if(e.Magnitude()>o){e=n.Scale(o);}m++;}}(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0]=(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]));(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]=(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]));return d;};S.prototype.calculateMTV=function(a,b){return this.$val.calculateMTV(a,b);};S.ptr.prototype.ContainedBy=function(a){var a,b,c,d,e,f,g,h,i,j;b=this;c=a;if($assertType(c,AT,true)[1]){d=c.$val;e=b.SATAxes();f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(!$clone(b.Project(g),Z).IsInside($clone(d.Project(g),Z))){return false;}f++;}h=d.SATAxes();i=0;while(true){if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);if(!$clone(b.Project(j),Z).IsInside($clone(d.Project(j),Z))){return false;}i++;}}return true;};S.prototype.ContainedBy=function(a){return this.$val.ContainedBy(a);};S.ptr.prototype.FlipH=function(){var a,b,c,d;a=this;b=a.Points;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0]=-(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0]));c++;}a.ReverseVertexOrder();};S.prototype.FlipH=function(){return this.$val.FlipH();};S.ptr.prototype.FlipV=function(){var a,b,c,d;a=this;b=a.Points;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]=-(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]));c++;}a.ReverseVertexOrder();};S.prototype.FlipV=function(){return this.$val.FlipV();};S.ptr.prototype.ReverseVertexOrder=function(){var a,b,c,d,e;a=this;c=new AP([(b=a.Points,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]))]);d=a.Points.$length-1>>0;while(true){if(!(d>=1)){break;}c=$append(c,(e=a.Points,((d<0||d>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+d])));d=d-(1)>>0;}a.Points=c;};S.prototype.ReverseVertexOrder=function(){return this.$val.ReverseVertexOrder();};W=function(a,b,c,d){var a,b,c,d;return T(new AI([a,b,a+c,b,a+c,b+d,a,b+d]));};$pkg.NewRectangle=W;Y=function(a,b,c){var a,b,c,d;d=new X.ptr(a,b,c);return d;};$pkg.NewCircle=Y;X.ptr.prototype.Clone=function(){var a;a=this;return Y(a.X,a.Y,a.Radius);};X.prototype.Clone=function(){return this.$val.Clone();};X.ptr.prototype.Bounds=function(){var a;a=this;return[new B([a.X-a.Radius,a.Y-a.Radius]),new B([a.X+a.Radius,a.Y+a.Radius])];};X.prototype.Bounds=function(){return this.$val.Bounds();};X.ptr.prototype.Intersection=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;d=this;e=AU.nil;f=d.X;g=d.Y;d.X=d.X+(a);d.Y=d.Y+(b);h=c;if($assertType(h,AT,true)[1]){i=h.$val;e=i.Intersection(-a,-b,d);if(!(e===AU.nil)){e.MTV=e.MTV.Scale(-1);}}else if($assertType(h,AS,true)[1]){j=h.$val;e=V();e.Points=d.IntersectionPointsCircle(j);if(e.Points.$length===0){return AU.nil;}e.MTV=new B([d.X-j.X,d.Y-j.Y]);k=e.MTV.Magnitude();e.MTV=e.MTV.Unit().Scale(d.Radius+j.Radius-k);l=e.Points;m=0;while(true){if(!(m=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);e.Center=e.Center.Add(new AP([n]));m++;}(p=e.Center,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]=(o=e.Center,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0]))/((e.Points.$length))));(r=e.Center,(1>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+1]=(q=e.Center,(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]))/((e.Points.$length))));}d.X=f;d.Y=g;return e;};X.prototype.Intersection=function(a,b,c){return this.$val.Intersection(a,b,c);};X.ptr.prototype.Move=function(a,b){var a,b,c;c=this;c.X=c.X+(a);c.Y=c.Y+(b);};X.prototype.Move=function(a,b){return this.$val.Move(a,b);};X.ptr.prototype.MoveVec=function(a){var a,b;b=this;b.X=b.X+(a.X());b.Y=b.Y+(a.Y());};X.prototype.MoveVec=function(a){return this.$val.MoveVec(a);};X.ptr.prototype.SetPosition=function(a,b){var a,b,c;c=this;c.X=a;c.Y=b;};X.prototype.SetPosition=function(a,b){return this.$val.SetPosition(a,b);};X.ptr.prototype.SetPositionVec=function(a){var a,b;b=this;b.X=a.X();b.Y=a.Y();};X.prototype.SetPositionVec=function(a){return this.$val.SetPositionVec(a);};X.ptr.prototype.Position=function(){var a;a=this;return[a.X,a.Y];};X.prototype.Position=function(){return this.$val.Position();};X.ptr.prototype.PointInside=function(a){var a,b;b=this;return a.Sub(new AP([new B([b.X,b.Y])])).Magnitude()<=b.Radius;};X.prototype.PointInside=function(a){return this.$val.PointInside(a);};X.ptr.prototype.IntersectionPointsCircle=function(a){var a,b,c,d,e,f,g;b=this;c=A.Sqrt(A.Pow(a.X-b.X,2)+A.Pow(a.Y-b.Y,2));if(c>b.Radius+a.Radius||c0;};Z.prototype.Overlapping=function(a){return this.$val.Overlapping(a);};Z.ptr.prototype.Overlap=function(a){var a,b;b=this;return A.Min(b.Max,a.Max)-A.Max(b.Min,a.Min);};Z.prototype.Overlap=function(a){return this.$val.Overlap(a);};Z.ptr.prototype.IsInside=function(a){var a,b;b=this;return b.Min>=a.Min&&b.Max<=a.Max;};Z.prototype.IsInside=function(a){return this.$val.IsInside(a);};AB=function(a,b,c,d,e){var a,b,c,d,e,f;f=new AA.ptr($ifaceNil,AM.nil,a,b,c,d,AK.nil,$ifaceNil,$makeMap(AN.keyFor,[]),new AV([]));if(e.$length>0){f.AddTags(e);}return f;};$pkg.NewObject=AB;AA.ptr.prototype.Clone=function(){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=AB(a.X,a.Y,a.W,a.H,a.Tags());b.Data=a.Data;if(!($interfaceIsEqual(a.Shape,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:c=a.Shape.Clone();$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}$r=b.SetShape(c);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:d=a.ignoreList;e=0;f=$keys(d);while(true){if(!(e>0;}h=h+(1)>>0;}}if(!($interfaceIsEqual(a.Shape,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:$r=a.Shape.SetPosition(a.X,a.Y);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:AA.ptr.prototype.Update,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};AA.prototype.Update=function(){return this.$val.Update();};AA.ptr.prototype.AddTags=function(a){var a,b;b=this;b.tags=$appendSlice(b.tags,a);};AA.prototype.AddTags=function(a){return this.$val.AddTags(a);};AA.ptr.prototype.RemoveTags=function(a){var a,b,c,d,e,f,g,h,i;b=this;c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=b.tags;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(i===e){b.tags=$appendSlice($subslice(b.tags,0,h),$subslice(b.tags,(h+1>>0)));break;}g++;}d++;}};AA.prototype.RemoveTags=function(a){return this.$val.RemoveTags(a);};AA.ptr.prototype.HasTags=function(a){var a,b,c,d,e,f,g,h;b=this;c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=b.tags;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(h===e){return true;}g++;}d++;}return false;};AA.prototype.HasTags=function(a){return this.$val.HasTags(a);};AA.ptr.prototype.Tags=function(){var a;a=this;return $appendSlice(new AV([]),a.tags);};AA.prototype.Tags=function(){return this.$val.Tags();};AA.ptr.prototype.SetShape=function(a){var{a,b,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(!($interfaceIsEqual(b.Shape,a))){$s=1;continue;}$s=2;continue;case 1:b.Shape=a;$r=b.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:AA.ptr.prototype.SetShape,$c:true,$r,a,b,$s};return $f;};AA.prototype.SetShape=function(a){return this.$val.SetShape(a);};AA.ptr.prototype.BoundsToSpace=function(a,b){var a,b,c,d,e,f,g,h,i;c=this;d=c.Space.WorldToSpace(c.X+a,c.Y+b);e=d[0];f=d[1];g=c.Space.WorldToSpace(c.X+c.W+a-1,c.Y+c.H+b-1);h=g[0];i=g[1];return[e,f,h,i];};AA.prototype.BoundsToSpace=function(a,b){return this.$val.BoundsToSpace(a,b);};AA.ptr.prototype.SharesCells=function(a){var a,b,c,d,e;b=this;c=b.TouchingCells;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.Contains(a)){return true;}d++;}return false;};AA.prototype.SharesCells=function(a){return this.$val.SharesCells(a);};AA.ptr.prototype.SharesCellsTags=function(a){var a,b,c,d,e;b=this;c=b.TouchingCells;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.ContainsTags(a)){return true;}d++;}return false;};AA.prototype.SharesCellsTags=function(a){return this.$val.SharesCellsTags(a);};AA.ptr.prototype.Center=function(){var a;a=this;return[a.X+(a.W/2),a.Y+(a.H/2)];};AA.prototype.Center=function(){return this.$val.Center();};AA.ptr.prototype.SetCenter=function(a,b){var a,b,c;c=this;c.X=a-(c.W/2);c.Y=b-(c.H/2);};AA.prototype.SetCenter=function(a,b){return this.$val.SetCenter(a,b);};AA.ptr.prototype.CellPosition=function(){var a,b;a=this;b=a.Center();return a.Space.WorldToSpace(b[0],b[1]);};AA.prototype.CellPosition=function(){return this.$val.CellPosition();};AA.ptr.prototype.SetRight=function(a){var a,b;b=this;b.X=a-b.W;};AA.prototype.SetRight=function(a){return this.$val.SetRight(a);};AA.ptr.prototype.SetBottom=function(a){var a,b;b=this;b.Y=a-b.H;};AA.prototype.SetBottom=function(a){return this.$val.SetBottom(a);};AA.ptr.prototype.Bottom=function(){var a;a=this;return a.Y+a.H;};AA.prototype.Bottom=function(){return this.$val.Bottom();};AA.ptr.prototype.Right=function(){var a;a=this;return a.X+a.W;};AA.prototype.Right=function(){return this.$val.Right();};AA.ptr.prototype.SetBounds=function(a,b){var a,b,c;c=this;c.X=(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]);c.Y=(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]);c.W=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])-c.X;c.H=(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])-c.Y;};AA.prototype.SetBounds=function(a,b){return this.$val.SetBounds(a,b);};AA.ptr.prototype.Check=function(a,b,c){var a,aa,ab,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=this;if(d.Space===AM.nil){return AW.nil;}e=AF();e.checkingObject=d;if(a<0){a=A.Min(a,-1);}else if(a>0){a=A.Max(a,1);}if(b<0){b=A.Min(b,-1);}else if(b>0){b=A.Max(b,1);}e.dx=a;e.dy=b;f=d.BoundsToSpace(a,b);g=f[0];h=f[1];i=f[2];j=f[3];k=$makeMap(AN.keyFor,[]);l=$makeMap(AJ.keyFor,[]);m=h;while(true){if(!(m<=j)){break;}n=g;while(true){if(!(n<=i)){break;}o=d.Space.Cell(n,m);if(!(o===AJ.nil)){p=o.Objects;q=0;while(true){if(!(q=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);t=(s=d.ignoreList[AN.keyFor(r)],s!==undefined?s.v:false);if(r===d||t){q++;continue;}u=(v=k[AN.keyFor(r)],v!==undefined?[v.v,true]:[false,false]);w=u[1];if(((c.$length===0)||r.HasTags(c))&&!w){e.Objects=$append(e.Objects,r);x=r;(k||$throwRuntimeError("assignment to entry in nil map"))[AN.keyFor(x)]={k:x,v:true};y=(z=l[AJ.keyFor(o)],z!==undefined?[z.v,true]:[false,false]);aa=y[1];if(!aa){e.Cells=$append(e.Cells,o);ab=o;(l||$throwRuntimeError("assignment to entry in nil map"))[AJ.keyFor(ab)]={k:ab,v:true};}q++;continue;}q++;}}n=n+(1)>>0;}m=m+(1)>>0;}if(e.Objects.$length===0){return AW.nil;}return e;};AA.prototype.Check=function(a,b,c){return this.$val.Check(a,b,c);};AA.ptr.prototype.Overlaps=function(a){var a,b;b=this;return a.X<=b.X+b.W&&a.X+a.W>=b.X&&a.Y<=b.Y+b.H&&a.Y+a.H>=b.Y;};AA.prototype.Overlaps=function(a){return this.$val.Overlaps(a);};AA.ptr.prototype.AddToIgnoreList=function(a){var a,b,c;b=this;c=a;(b.ignoreList||$throwRuntimeError("assignment to entry in nil map"))[AN.keyFor(c)]={k:c,v:true};};AA.prototype.AddToIgnoreList=function(a){return this.$val.AddToIgnoreList(a);};AA.ptr.prototype.RemoveFromIgnoreList=function(a){var a,b;b=this;delete b.ignoreList[AN.keyFor(a)];};AA.prototype.RemoveFromIgnoreList=function(a){return this.$val.RemoveFromIgnoreList(a);};AC=function(a,b,c,d){var a,b,c,d,e,f,g,h,i;e=d.$length;f=c;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(h===e){return;}((h<0||h>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+h]=b*i+((h<0||h>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+h]));g++;}};AD=function(a,b,c){var a,b,c,d,e,f;d=c;e=0;while(true){if(!(e=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]=((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f])*(b));e++;}};AF=function(){return new AE.ptr(AN.nil,0,0,new AO([]),AK.nil);};$pkg.NewCollision=AF;AE.ptr.prototype.HasTags=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e===b.checkingObject){d++;continue;}if(e.HasTags(a)){return true;}d++;}return false;};AE.prototype.HasTags=function(a){return this.$val.HasTags(a);};AE.ptr.prototype.ObjectsByTags=function(a){var a,b,c,d,e,f;b=this;c=new AO([]);d=b.Objects;e=0;while(true){if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);if(f===b.checkingObject){e++;continue;}if(f.HasTags(a)){c=$append(c,f);}e++;}return c;};AE.prototype.ObjectsByTags=function(a){return this.$val.ObjectsByTags(a);};AE.ptr.prototype.ContactWithObject=function(a){var a,b,c;b=this;c=new B([0,0]);if(b.dx<0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=a.X+a.W-b.checkingObject.X);}else if(b.dx>0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=a.X-b.checkingObject.W-b.checkingObject.X);}if(b.dy<0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=a.Y+a.H-b.checkingObject.Y);}else if(b.dy>0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=a.Y-b.checkingObject.H-b.checkingObject.Y);}return c;};AE.prototype.ContactWithObject=function(a){return this.$val.ContactWithObject(a);};AE.ptr.prototype.ContactWithCell=function(a){var a,b,c,d,e;b=this;c=new B([0,0]);d=(($imul(a.X,b.checkingObject.Space.CellWidth)));e=(($imul(a.Y,b.checkingObject.Space.CellHeight)));if(b.dx<0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=d+(b.checkingObject.Space.CellWidth)-b.checkingObject.X);}else if(b.dx>0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=d-b.checkingObject.W-b.checkingObject.X);}if(b.dy<0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=e+(b.checkingObject.Space.CellHeight)-b.checkingObject.Y);}else if(b.dy>0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=e-b.checkingObject.H-b.checkingObject.Y);}return c;};AE.prototype.ContactWithCell=function(a){return this.$val.ContactWithCell(a);};AE.ptr.prototype.SlideAgainstCell=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;c=this;d=c.checkingObject.Space;f=(e=c.Cells,(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]));g=d.SpaceToWorld(f.X,f.Y);h=g[0];i=g[1];j=(d.CellWidth)/2;k=(d.CellHeight)/2;h=h+(j);i=i+(k);l=c.checkingObject.Center();m=l[0];n=l[1];o=m-h;p=n-i;q=d.Cell(f.X-1>>0,f.Y);r=d.Cell(f.X+1>>0,f.Y);s=d.Cell(f.X,f.Y-1>>0);t=d.Cell(f.X,f.Y+1>>0);u=new B([0,0]);if(!((c.dy===0))){if(o>0&&(r===AJ.nil||!r.ContainsTags(b))){(0>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+0]=h+j-c.checkingObject.X);}else if(o<0&&(q===AJ.nil||!q.ContainsTags(b))){(0>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+0]=h-j-(c.checkingObject.X+c.checkingObject.W));}else{return B.nil;}}if(!((c.dx===0))){if(p>0&&(t===AJ.nil||!t.ContainsTags(b))){(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]=i+k-c.checkingObject.Y);}else if(p<0&&(s===AJ.nil||!s.ContainsTags(b))){(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]=i-k-(c.checkingObject.Y+c.checkingObject.H));}else{return B.nil;}}return u;};AE.prototype.SlideAgainstCell=function(a,b){return this.$val.SlideAgainstCell(a,b);};AH=function(a,b){var a,b;return new AG.ptr(a,b,new AO([]));};AG.ptr.prototype.register=function(a){var a,b;b=this;if(!b.Contains(a)){b.Objects=$append(b.Objects,a);}};AG.prototype.register=function(a){return this.$val.register(a);};AG.ptr.prototype.unregister=function(a){var a,b,c,d,e,f,g,h,i;b=this;c=b.Objects;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(f===a){(i=b.Objects,((e<0||e>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+e]=(g=b.Objects,h=b.Objects.$length-1>>0,((h<0||h>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]))));b.Objects=$subslice(b.Objects,0,(b.Objects.$length-1>>0));break;}d++;}};AG.prototype.unregister=function(a){return this.$val.unregister(a);};AG.ptr.prototype.Contains=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e===a){return true;}d++;}return false;};AG.prototype.Contains=function(a){return this.$val.Contains(a);};AG.ptr.prototype.ContainsTags=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.HasTags(a)){return true;}d++;}return false;};AG.prototype.ContainsTags=function(a){return this.$val.ContainsTags(a);};AG.ptr.prototype.Occupied=function(){var a;a=this;return a.Objects.$length>0;};AG.prototype.Occupied=function(){return this.$val.Occupied();};B.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[B],false)},{prop:"Add",name:"Add",pkg:"",typ:$funcType([AP],[B],true)},{prop:"Sub",name:"Sub",pkg:"",typ:$funcType([AP],[B],true)},{prop:"Scale",name:"Scale",pkg:"",typ:$funcType([$Float64],[B],false)},{prop:"Equal",name:"Equal",pkg:"",typ:$funcType([B],[$Bool],false)},{prop:"Magnitude",name:"Magnitude",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Magnitude2",name:"Magnitude2",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Unit",name:"Unit",pkg:"",typ:$funcType([],[B],false)},{prop:"Dot",name:"Dot",pkg:"",typ:$funcType([B],[$Float64],false)},{prop:"Cross",name:"Cross",pkg:"",typ:$funcType([B],[B],false)},{prop:"Rotate",name:"Rotate",pkg:"",typ:$funcType([$Float64,AX],[B],true)},{prop:"X",name:"X",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Y",name:"Y",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Z",name:"Z",pkg:"",typ:$funcType([],[$Float64],false)}];AM.methods=[{prop:"Add",name:"Add",pkg:"",typ:$funcType([AO],[],true)},{prop:"Remove",name:"Remove",pkg:"",typ:$funcType([AO],[],true)},{prop:"Objects",name:"Objects",pkg:"",typ:$funcType([],[AO],false)},{prop:"Resize",name:"Resize",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Cell",name:"Cell",pkg:"",typ:$funcType([$Int,$Int],[AJ],false)},{prop:"CheckCells",name:"CheckCells",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int,AV],[AN],true)},{prop:"CheckCellsWorld",name:"CheckCellsWorld",pkg:"",typ:$funcType([$Float64,$Float64,$Float64,$Float64,AV],[AN],true)},{prop:"UnregisterAllObjects",name:"UnregisterAllObjects",pkg:"",typ:$funcType([],[],false)},{prop:"WorldToSpace",name:"WorldToSpace",pkg:"",typ:$funcType([$Float64,$Float64],[$Int,$Int],false)},{prop:"SpaceToWorld",name:"SpaceToWorld",pkg:"",typ:$funcType([$Int,$Int],[$Float64,$Float64],false)},{prop:"Height",name:"Height",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int],false)},{prop:"CellsInLine",name:"CellsInLine",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int],[AK],false)}];AQ.methods=[{prop:"Project",name:"Project",pkg:"",typ:$funcType([B],[B],false)},{prop:"Normal",name:"Normal",pkg:"",typ:$funcType([],[B],false)},{prop:"Vector",name:"Vector",pkg:"",typ:$funcType([],[B],false)},{prop:"IntersectionPointsLine",name:"IntersectionPointsLine",pkg:"",typ:$funcType([AQ],[B],false)},{prop:"IntersectionPointsCircle",name:"IntersectionPointsCircle",pkg:"",typ:$funcType([AS],[AP],false)}];AT.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[P],false)},{prop:"AddPointsVec",name:"AddPointsVec",pkg:"",typ:$funcType([AP],[],true)},{prop:"AddPoints",name:"AddPoints",pkg:"",typ:$funcType([AI],[],true)},{prop:"Lines",name:"Lines",pkg:"",typ:$funcType([],[AR],false)},{prop:"Transformed",name:"Transformed",pkg:"",typ:$funcType([],[AP],false)},{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[B,B],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"SetPositionVec",name:"SetPositionVec",pkg:"",typ:$funcType([B],[],false)},{prop:"Move",name:"Move",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"MoveVec",name:"MoveVec",pkg:"",typ:$funcType([B],[],false)},{prop:"Center",name:"Center",pkg:"",typ:$funcType([],[B],false)},{prop:"Project",name:"Project",pkg:"",typ:$funcType([B],[Z],false)},{prop:"SATAxes",name:"SATAxes",pkg:"",typ:$funcType([],[AP],false)},{prop:"PointInside",name:"PointInside",pkg:"",typ:$funcType([B],[$Bool],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,P],[AU],false)},{prop:"calculateMTV",name:"calculateMTV",pkg:"resolv",typ:$funcType([AU,P],[B],false)},{prop:"ContainedBy",name:"ContainedBy",pkg:"",typ:$funcType([P],[$Bool],false)},{prop:"FlipH",name:"FlipH",pkg:"",typ:$funcType([],[],false)},{prop:"FlipV",name:"FlipV",pkg:"",typ:$funcType([],[],false)},{prop:"ReverseVertexOrder",name:"ReverseVertexOrder",pkg:"",typ:$funcType([],[],false)}];AU.methods=[{prop:"LeftmostPoint",name:"LeftmostPoint",pkg:"",typ:$funcType([],[B],false)},{prop:"RightmostPoint",name:"RightmostPoint",pkg:"",typ:$funcType([],[B],false)},{prop:"TopmostPoint",name:"TopmostPoint",pkg:"",typ:$funcType([],[B],false)},{prop:"BottommostPoint",name:"BottommostPoint",pkg:"",typ:$funcType([],[B],false)}];AS.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[P],false)},{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[B,B],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,P],[AU],false)},{prop:"Move",name:"Move",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"MoveVec",name:"MoveVec",pkg:"",typ:$funcType([B],[],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"SetPositionVec",name:"SetPositionVec",pkg:"",typ:$funcType([B],[],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"PointInside",name:"PointInside",pkg:"",typ:$funcType([B],[$Bool],false)},{prop:"IntersectionPointsCircle",name:"IntersectionPointsCircle",pkg:"",typ:$funcType([AS],[AP],false)}];Z.methods=[{prop:"Overlapping",name:"Overlapping",pkg:"",typ:$funcType([Z],[$Bool],false)},{prop:"Overlap",name:"Overlap",pkg:"",typ:$funcType([Z],[$Float64],false)},{prop:"IsInside",name:"IsInside",pkg:"",typ:$funcType([Z],[$Bool],false)}];AN.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[AN],false)},{prop:"Update",name:"Update",pkg:"",typ:$funcType([],[],false)},{prop:"AddTags",name:"AddTags",pkg:"",typ:$funcType([AV],[],true)},{prop:"RemoveTags",name:"RemoveTags",pkg:"",typ:$funcType([AV],[],true)},{prop:"HasTags",name:"HasTags",pkg:"",typ:$funcType([AV],[$Bool],true)},{prop:"Tags",name:"Tags",pkg:"",typ:$funcType([],[AV],false)},{prop:"SetShape",name:"SetShape",pkg:"",typ:$funcType([P],[],false)},{prop:"BoundsToSpace",name:"BoundsToSpace",pkg:"",typ:$funcType([$Float64,$Float64],[$Int,$Int,$Int,$Int],false)},{prop:"SharesCells",name:"SharesCells",pkg:"",typ:$funcType([AN],[$Bool],false)},{prop:"SharesCellsTags",name:"SharesCellsTags",pkg:"",typ:$funcType([AV],[$Bool],true)},{prop:"Center",name:"Center",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetCenter",name:"SetCenter",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"CellPosition",name:"CellPosition",pkg:"",typ:$funcType([],[$Int,$Int],false)},{prop:"SetRight",name:"SetRight",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"SetBottom",name:"SetBottom",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"Bottom",name:"Bottom",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Right",name:"Right",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"SetBounds",name:"SetBounds",pkg:"",typ:$funcType([B,B],[],false)},{prop:"Check",name:"Check",pkg:"",typ:$funcType([$Float64,$Float64,AV],[AW],true)},{prop:"Overlaps",name:"Overlaps",pkg:"",typ:$funcType([AN],[$Bool],false)},{prop:"AddToIgnoreList",name:"AddToIgnoreList",pkg:"",typ:$funcType([AN],[],false)},{prop:"RemoveFromIgnoreList",name:"RemoveFromIgnoreList",pkg:"",typ:$funcType([AN],[],false)}];AW.methods=[{prop:"HasTags",name:"HasTags",pkg:"",typ:$funcType([AV],[$Bool],true)},{prop:"ObjectsByTags",name:"ObjectsByTags",pkg:"",typ:$funcType([AV],[AO],true)},{prop:"ContactWithObject",name:"ContactWithObject",pkg:"",typ:$funcType([AN],[B],false)},{prop:"ContactWithCell",name:"ContactWithCell",pkg:"",typ:$funcType([AJ],[B],false)},{prop:"SlideAgainstCell",name:"SlideAgainstCell",pkg:"",typ:$funcType([AJ,AV],[B],true)}];AJ.methods=[{prop:"register",name:"register",pkg:"resolv",typ:$funcType([AN],[],false)},{prop:"unregister",name:"unregister",pkg:"resolv",typ:$funcType([AN],[],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([AN],[$Bool],false)},{prop:"ContainsTags",name:"ContainsTags",pkg:"",typ:$funcType([AV],[$Bool],true)},{prop:"Occupied",name:"Occupied",pkg:"",typ:$funcType([],[$Bool],false)}];B.init($Float64);N.init("",[{prop:"Cells",name:"Cells",embedded:false,exported:true,typ:AL,tag:""},{prop:"CellWidth",name:"CellWidth",embedded:false,exported:true,typ:$Int,tag:""},{prop:"CellHeight",name:"CellHeight",embedded:false,exported:true,typ:$Int,tag:""}]);P.init([{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[B,B],false)},{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[P],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,P],[AU],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)}]);Q.init("",[{prop:"Start",name:"Start",embedded:false,exported:true,typ:B,tag:""},{prop:"End",name:"End",embedded:false,exported:true,typ:B,tag:""}]);S.init("",[{prop:"Points",name:"Points",embedded:false,exported:true,typ:AP,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Closed",name:"Closed",embedded:false,exported:true,typ:$Bool,tag:""}]);U.init("",[{prop:"Points",name:"Points",embedded:false,exported:true,typ:AP,tag:""},{prop:"MTV",name:"MTV",embedded:false,exported:true,typ:B,tag:""},{prop:"Center",name:"Center",embedded:false,exported:true,typ:B,tag:""}]);X.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Radius",name:"Radius",embedded:false,exported:true,typ:$Float64,tag:""}]);Z.init("",[{prop:"Min",name:"Min",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Max",name:"Max",embedded:false,exported:true,typ:$Float64,tag:""}]);AA.init("resolv",[{prop:"Shape",name:"Shape",embedded:false,exported:true,typ:P,tag:""},{prop:"Space",name:"Space",embedded:false,exported:true,typ:AM,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"W",name:"W",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"H",name:"H",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"TouchingCells",name:"TouchingCells",embedded:false,exported:true,typ:AK,tag:""},{prop:"Data",name:"Data",embedded:false,exported:true,typ:$emptyInterface,tag:""},{prop:"ignoreList",name:"ignoreList",embedded:false,exported:false,typ:AY,tag:""},{prop:"tags",name:"tags",embedded:false,exported:false,typ:AV,tag:""}]);AE.init("resolv",[{prop:"checkingObject",name:"checkingObject",embedded:false,exported:false,typ:AN,tag:""},{prop:"dx",name:"dx",embedded:false,exported:false,typ:$Float64,tag:""},{prop:"dy",name:"dy",embedded:false,exported:false,typ:$Float64,tag:""},{prop:"Objects",name:"Objects",embedded:false,exported:true,typ:AO,tag:""},{prop:"Cells",name:"Cells",embedded:false,exported:true,typ:AK,tag:""}]);AG.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Objects",name:"Objects",embedded:false,exported:true,typ:AO,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["jsexport/battle"]=(function(){var $pkg={},$init,A,B,C,D,E,F,H,I,J,K,L,M,N,S,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,P,O,Q,R,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI;A=$packages["math"];B=$packages["resolv"];C=$pkg.Vec2D=$newType(0,$kindStruct,"battle.Vec2D",true,"jsexport/battle",true,function(X_,Y_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;return;}this.X=X_;this.Y=Y_;});D=$pkg.Polygon2D=$newType(0,$kindStruct,"battle.Polygon2D",true,"jsexport/battle",true,function(Anchor_,Points_){this.$val=this;if(arguments.length===0){this.Anchor=BE.nil;this.Points=BF.nil;return;}this.Anchor=Anchor_;this.Points=Points_;});E=$pkg.PlayerDownsync=$newType(0,$kindStruct,"battle.PlayerDownsync",true,"jsexport/battle",true,function(Id_,VirtualGridX_,VirtualGridY_,DirX_,DirY_,VelX_,VelY_,Speed_,BattleState_,JoinIndex_,ColliderRadius_,Removed_,Score_,LastMoveGmtMillis_,FramesToRecover_,Hp_,MaxHp_,CharacterState_,InAir_){this.$val=this;if(arguments.length===0){this.Id=0;this.VirtualGridX=0;this.VirtualGridY=0;this.DirX=0;this.DirY=0;this.VelX=0;this.VelY=0;this.Speed=0;this.BattleState=0;this.JoinIndex=0;this.ColliderRadius=0;this.Removed=false;this.Score=0;this.LastMoveGmtMillis=0;this.FramesToRecover=0;this.Hp=0;this.MaxHp=0;this.CharacterState=0;this.InAir=false;return;}this.Id=Id_;this.VirtualGridX=VirtualGridX_;this.VirtualGridY=VirtualGridY_;this.DirX=DirX_;this.DirY=DirY_;this.VelX=VelX_;this.VelY=VelY_;this.Speed=Speed_;this.BattleState=BattleState_;this.JoinIndex=JoinIndex_;this.ColliderRadius=ColliderRadius_;this.Removed=Removed_;this.Score=Score_;this.LastMoveGmtMillis=LastMoveGmtMillis_;this.FramesToRecover=FramesToRecover_;this.Hp=Hp_;this.MaxHp=MaxHp_;this.CharacterState=CharacterState_;this.InAir=InAir_;});F=$pkg.InputFrameDecoded=$newType(0,$kindStruct,"battle.InputFrameDecoded",true,"jsexport/battle",true,function(Dx_,Dy_,BtnALevel_,BtnBLevel_){this.$val=this;if(arguments.length===0){this.Dx=0;this.Dy=0;this.BtnALevel=0;this.BtnBLevel=0;return;}this.Dx=Dx_;this.Dy=Dy_;this.BtnALevel=BtnALevel_;this.BtnBLevel=BtnBLevel_;});H=$pkg.Barrier=$newType(0,$kindStruct,"battle.Barrier",true,"jsexport/battle",true,function(Boundary_){this.$val=this;if(arguments.length===0){this.Boundary=BG.nil;return;}this.Boundary=Boundary_;});I=$pkg.Bullet=$newType(0,$kindStruct,"battle.Bullet",true,"jsexport/battle",true,function(BattleLocalId_,StartupFrames_,ActiveFrames_,RecoveryFrames_,RecoveryFramesOnBlock_,RecoveryFramesOnHit_,HitboxOffset_,OriginatedRenderFrameId_,HitStunFrames_,BlockStunFrames_,Pushback_,ReleaseTriggerType_,Damage_,OffenderJoinIndex_,OffenderPlayerId_,SelfMoveforwardX_,SelfMoveforwardY_,HitboxSizeX_,HitboxSizeY_){this.$val=this;if(arguments.length===0){this.BattleLocalId=0;this.StartupFrames=0;this.ActiveFrames=0;this.RecoveryFrames=0;this.RecoveryFramesOnBlock=0;this.RecoveryFramesOnHit=0;this.HitboxOffset=0;this.OriginatedRenderFrameId=0;this.HitStunFrames=0;this.BlockStunFrames=0;this.Pushback=0;this.ReleaseTriggerType=0;this.Damage=0;this.OffenderJoinIndex=0;this.OffenderPlayerId=0;this.SelfMoveforwardX=0;this.SelfMoveforwardY=0;this.HitboxSizeX=0;this.HitboxSizeY=0;return;}this.BattleLocalId=BattleLocalId_;this.StartupFrames=StartupFrames_;this.ActiveFrames=ActiveFrames_;this.RecoveryFrames=RecoveryFrames_;this.RecoveryFramesOnBlock=RecoveryFramesOnBlock_;this.RecoveryFramesOnHit=RecoveryFramesOnHit_;this.HitboxOffset=HitboxOffset_;this.OriginatedRenderFrameId=OriginatedRenderFrameId_;this.HitStunFrames=HitStunFrames_;this.BlockStunFrames=BlockStunFrames_;this.Pushback=Pushback_;this.ReleaseTriggerType=ReleaseTriggerType_;this.Damage=Damage_;this.OffenderJoinIndex=OffenderJoinIndex_;this.OffenderPlayerId=OffenderPlayerId_;this.SelfMoveforwardX=SelfMoveforwardX_;this.SelfMoveforwardY=SelfMoveforwardY_;this.HitboxSizeX=HitboxSizeX_;this.HitboxSizeY=HitboxSizeY_;});J=$pkg.MeleeBullet=$newType(0,$kindStruct,"battle.MeleeBullet",true,"jsexport/battle",true,function(Bullet_){this.$val=this;if(arguments.length===0){this.Bullet=new I.ptr(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return;}this.Bullet=Bullet_;});K=$pkg.FireballBullet=$newType(0,$kindStruct,"battle.FireballBullet",true,"jsexport/battle",true,function(VirtualGridX_,VirtualGridY_,DirX_,DirY_,VelX_,VelY_,Speed_,Bullet_){this.$val=this;if(arguments.length===0){this.VirtualGridX=0;this.VirtualGridY=0;this.DirX=0;this.DirY=0;this.VelX=0;this.VelY=0;this.Speed=0;this.Bullet=new I.ptr(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return;}this.VirtualGridX=VirtualGridX_;this.VirtualGridY=VirtualGridY_;this.DirX=DirX_;this.DirY=DirY_;this.VelX=VelX_;this.VelY=VelY_;this.Speed=Speed_;this.Bullet=Bullet_;});L=$pkg.RoomDownsyncFrame=$newType(0,$kindStruct,"battle.RoomDownsyncFrame",true,"jsexport/battle",true,function(Id_,PlayersArr_,CountdownNanos_,MeleeBullets_,FireballBullets_,BackendUnconfirmedMask_,ShouldForceResync_,PlayerOpPatternToSkillId_){this.$val=this;if(arguments.length===0){this.Id=0;this.PlayersArr=AW.nil;this.CountdownNanos=new $Int64(0,0);this.MeleeBullets=AX.nil;this.FireballBullets=BC.nil;this.BackendUnconfirmedMask=new $Uint64(0,0);this.ShouldForceResync=false;this.PlayerOpPatternToSkillId=false;return;}this.Id=Id_;this.PlayersArr=PlayersArr_;this.CountdownNanos=CountdownNanos_;this.MeleeBullets=MeleeBullets_;this.FireballBullets=FireballBullets_;this.BackendUnconfirmedMask=BackendUnconfirmedMask_;this.ShouldForceResync=ShouldForceResync_;this.PlayerOpPatternToSkillId=PlayerOpPatternToSkillId_;});M=$pkg.InputFrameDownsync=$newType(0,$kindStruct,"battle.InputFrameDownsync",true,"jsexport/battle",true,function(InputFrameId_,InputList_,ConfirmedList_){this.$val=this;if(arguments.length===0){this.InputFrameId=0;this.InputList=AV.nil;this.ConfirmedList=new $Uint64(0,0);return;}this.InputFrameId=InputFrameId_;this.InputList=InputList_;this.ConfirmedList=ConfirmedList_;});N=$pkg.RingBuffer=$newType(0,$kindStruct,"battle.RingBuffer",true,"jsexport/battle",true,function(Ed_,St_,EdFrameId_,StFrameId_,N_,Cnt_,Eles_){this.$val=this;if(arguments.length===0){this.Ed=0;this.St=0;this.EdFrameId=0;this.StFrameId=0;this.N=0;this.Cnt=0;this.Eles=AL.nil;return;}this.Ed=Ed_;this.St=St_;this.EdFrameId=EdFrameId_;this.StFrameId=StFrameId_;this.N=N_;this.Cnt=Cnt_;this.Eles=Eles_;});S=$pkg.SatResult=$newType(0,$kindStruct,"battle.SatResult",true,"jsexport/battle",true,function(Overlap_,OverlapX_,OverlapY_,AContainedInB_,BContainedInA_,Axis_){this.$val=this;if(arguments.length===0){this.Overlap=0;this.OverlapX=0;this.OverlapY=0;this.AContainedInB=false;this.BContainedInA=false;this.Axis=B.Vector.nil;return;}this.Overlap=Overlap_;this.OverlapX=OverlapX_;this.OverlapY=OverlapY_;this.AContainedInB=AContainedInB_;this.BContainedInA=BContainedInA_;this.Axis=Axis_;});AJ=$sliceType($Int32);AK=$sliceType(AJ);AL=$sliceType($emptyInterface);AM=$ptrType(S);AN=$sliceType(C);AO=$sliceType($String);AP=$ptrType(B.Collision);AQ=$ptrType(AN);AR=$ptrType(E);AS=$ptrType(J);AT=$ptrType(B.ConvexPolygon);AU=$ptrType(M);AV=$sliceType($Uint64);AW=$sliceType(AR);AX=$sliceType(AS);AY=$sliceType(AQ);AZ=$ptrType(B.Object);BA=$sliceType(AZ);BB=$ptrType(K);BC=$sliceType(BB);BD=$sliceType($Float64);BE=$ptrType(C);BF=$sliceType(BE);BG=$ptrType(D);BH=$mapType($Int,$Int);BI=$ptrType(N);O=function(a){var a;return new N.ptr(0,0,0,0,a,0,$makeSlice(AL,a));};$pkg.NewRingBuffer=O;N.ptr.prototype.Put=function(a){var a,b,c,d;b=this;while(true){if(!(0=b.N)){break;}b.Pop();}(c=b.Eles,d=b.Ed,((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]=a));b.EdFrameId=b.EdFrameId+(1)>>0;b.Cnt=b.Cnt+(1)>>0;b.Ed=b.Ed+(1)>>0;if(b.Ed>=b.N){b.Ed=b.Ed-(b.N)>>0;}};N.prototype.Put=function(a){return this.$val.Put(a);};N.ptr.prototype.Pop=function(){var a,b,c,d;a=this;if(0===a.Cnt){return $ifaceNil;}d=(b=a.Eles,c=a.St,((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]));a.StFrameId=a.StFrameId+(1)>>0;a.Cnt=a.Cnt-(1)>>0;a.St=a.St+(1)>>0;if(a.St>=a.N){a.St=a.St-(a.N)>>0;}return d;};N.prototype.Pop=function(){return this.$val.Pop();};N.ptr.prototype.GetArrIdxByOffset=function(a){var a,b,c;b=this;if((0===b.Cnt)||0>a){return-1;}c=b.St+a>>0;if(b.St=b.N){c=c-(b.N)>>0;}if(c>=b.St||c=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+c]));};N.prototype.GetByOffset=function(a){return this.$val.GetByOffset(a);};N.ptr.prototype.GetByFrameId=function(a){var a,b;b=this;if(a>=b.EdFrameId||a>0);};N.prototype.GetByFrameId=function(a){return this.$val.GetByFrameId(a);};N.ptr.prototype.SetByFrameId=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;c=this;d=c.StFrameId;e=c.EdFrameId;f=d;g=e;if(bb){h=c.GetArrIdxByOffset(b-c.StFrameId>>0);if(!((-1===h))){(i=c.Eles,((h<0||h>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+h]=a));return[0,f,g];}}j=0;if(g>0))>>$min(c,31))>>0);};$pkg.ConvertToInputFrameId=Q;R=function(a){var a,b,c,d,e,f,g,h;b=new $Uint64(a.$high&0,(a.$low&15)>>>0);d=(((c=$shiftRightUint64(a,4),new $Uint64(c.$high&0,(c.$low&1)>>>0)).$low>>0));f=(((e=$shiftRightUint64(a,5),new $Uint64(e.$high&0,(e.$low&1)>>>0)).$low>>0));return new F.ptr((g=(($flatten64(b)<0||$flatten64(b)>=$pkg.DIRECTION_DECODER.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset+$flatten64(b)]),(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])),(h=(($flatten64(b)<0||$flatten64(b)>=$pkg.DIRECTION_DECODER.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset+$flatten64(b)]),(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])),d,f);};T=function(a,b,c,d){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=[c];e=[e];f=[f];g=c[0].Position();e[0]=g[0];f[0]=g[1];$deferred.push([(function(c,e,f){return function(){c[0].SetPosition(e[0],f[0]);};})(c,e,f),[]]);c[0].SetPosition(e[0]+a,f[0]+b);h=new S.ptr(0,0,0,true,true,new B.Vector([0,0]));i=U(c[0],d,h);if(i){$s=1;continue;}$s=2;continue;case 1:j=h.Overlap*h.OverlapX;k=h.Overlap*h.OverlapY;l=j;m=k;n=[true,l,m,h];$s=4;case 4:return n;case 2:o=[false,0,0,h];$s=5;case 5:return o;case 3:$s=-1;return[false,0,0,AM.nil];}return;}}catch(err){$err=err;$s=-1;return[false,0,0,AM.nil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:T,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred};return $f;}}};$pkg.CalcPushbacks=T;U=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;d=a.Points.$length;e=b.Points.$length;f=d;g=e;if((1===f)&&(1===g)){if(!(AM.nil===c)){c.Overlap=0;}return((h=(i=a.Points,(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])),(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))===(j=(k=b.Points,(0>=k.$length?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+0])),(0>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+0])))&&((l=(m=a.Points,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0])),(1>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+1]))===(n=(o=b.Points,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0])),(1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1])));}if(1=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);if(V(a,b,r.Unit(),c)){return false;}q++;}}if(1=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+t]);if(V(a,b,u.Unit(),c)){return false;}t++;}}return true;};V=function(a,b,c,d){var a,aa,ab,ac,ad,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=1.7e+308;f=-1.7e+308;g=1.7e+308;h=-1.7e+308;i=e;j=f;k=g;l=h;m=a.Points;n=0;while(true){if(!(n=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n]);p=((0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0])+a.X)*(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])+((1>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+1])+a.Y)*(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(i>p){i=p;}if(j=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+r]);t=((0>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+0])+b.X)*(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])+((1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1])+b.Y)*(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(k>t){k=t;}if(ll||jl){u=i-l;d.AContainedInB=false;}else{x=j-k;y=l-i;if(x=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0])))&&(0===(ac=d.Axis,(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]))))||z>aa){ad=1;if(u<0){ad=-1;}d.Overlap=aa;d.OverlapX=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])*ad;d.OverlapY=(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1])*ad;}d.Axis=c;}return false;};W=function(a,b,c){var a,b,c,d,e;d=((A.Floor(a*c)>>0));e=((A.Floor(b*c)>>0));return[d,e];};$pkg.WorldToVirtualGridPos=W;X=function(a,b,c){var a,b,c,d,e;d=(a)*c;e=(b)*c;return[d,e];};$pkg.VirtualGridToWorldPos=X;Y=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j;return[a-c-g+i,b-d-f+j];};$pkg.WorldToPolygonColliderBLPos=Y;Z=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j;return[a+c+g-i,b+d+f-j];};$pkg.PolygonColliderBLToWorldPos=Z;AA=function(a,b,c,d,e,f,g,h,i,j,k){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;l=Z(a,b,c,d,e,f,g,h,i,j);m=l[0];n=l[1];return W(m,n,k);};$pkg.PolygonColliderBLToVirtualGridPos=AA;AB=function(a,b,c,d,e,f,g,h,i,j,k){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;l=X(a,b,k);m=l[0];n=l[1];return Y(m,n,c,d,e,f,g,h,i,j);};$pkg.VirtualGridToPolygonColliderBLPos=AB;AC=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=[f];f[0]=$makeSlice(AN,0,10);g=b.Check(0,0,new AO([]));if(AP.nil===g){$s=-1;return(f.$ptr||(f.$ptr=new AQ(function(){return this.$target[0];},function($v){this.$target[0]=$v;},f)));}h=g.Objects;i=0;case 1:if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);k=false;l=j.Data;if($assertType(l,AR,true)[1]){}else if($assertType(l,AS,true)[1]){}else{k=true;}if(!k){i++;$s=1;continue;}m=$assertType(j.Shape,AT);o=T(0,0,c,m);$s=3;case 3:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=o;p=n[0];q=n[1];r=n[2];s=n[3];if(!p){i++;$s=1;continue;}t=(s.Overlap-d)*s.OverlapX;u=(s.Overlap-d)*s.OverlapY;q=t;r=u;f[0]=$append(f[0],new C.ptr(s.OverlapX,s.OverlapY));e.X=e.X+(q);e.Y=e.Y+(r);i++;$s=1;continue;case 2:$s=-1;return(f.$ptr||(f.$ptr=new AQ(function(){return this.$target[0];},function($v){this.$target[0]=$v;},f)));}return;}var $f={$blk:AC,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s};return $f;};AD=function(a,b,c,d,e,f){var a,aa,ab,ac,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;g=Q(c.Id,e,f);h=Q(c.Id-1>>0,e,f);if(0>=g){return[-2,false,0,0];}i=$assertType(d.GetByFrameId(g),AU).InputList;j=AV.nil;if(0>0,((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m])));o=n.Dx;p=n.Dy;q=o;r=p;s=0;t=0;u=s;v=t;if(!(AV.nil===j)){x=R((w=l-1>>0,((w<0||w>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+w])));u=x.BtnALevel;v=x.BtnBLevel;}if(n.BtnBLevel>v){y=false;if((4===a.CharacterState)||(5===a.CharacterState)||(6===a.CharacterState)){y=true;}z=false;if((0===a.CharacterState)||(1===a.CharacterState)||(4===a.CharacterState)){z=true;}if(!y&&z){k=true;}}aa=-1;if(n.BtnALevel>u){aa=0;ab=0;ac=0;q=ab;r=ac;}return[aa,k,q,r];};AE=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var{a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,c,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,d,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,e,ea,eb,ec,ed,ee,ef,eg,eh,ei,ej,ek,el,em,en,eo,ep,eq,er,es,et,eu,ev,ew,ex,ey,ez,f,fa,fb,fc,fd,fe,ff,fg,fh,fi,fj,fk,fl,fm,fn,fo,fp,fq,fr,fs,ft,fu,fv,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p});$s=$s||0;s:while(true){switch($s){case 0:q=b.PlayersArr.$length;r=$makeSlice(AW,q);s=b.PlayersArr;t=0;while(true){if(!(t=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+t]);((u<0||u>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+u]=new E.ptr(v.Id,v.VirtualGridX,v.VirtualGridY,v.DirX,v.DirY,v.VelX,v.VelY,v.Speed,v.BattleState,v.JoinIndex,0,v.Removed,v.Score,0,v.FramesToRecover-1>>0,v.Hp,v.MaxHp,v.CharacterState,true));if(((u<0||u>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+u]).FramesToRecover<0){((u<0||u>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+u]).FramesToRecover=0;}t++;}w=$makeSlice(AX,0,b.MeleeBullets.$length);x=$makeSlice(AN,q);y=$makeSlice(AY,q);z=b.PlayersArr;aa=0;while(true){if(!(aa=z.$length)?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+aa]);ae=((ac<0||ac>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+ac]);af=AD(ad,ae,b,a,h,i);ag=af[0];ah=af[1];ai=af[2];aj=af[3];if(-2===ag){aa++;continue;}if(ah){ae.VelY=g;ae.VirtualGridY=ae.VirtualGridY+(g)>>0;}ak=ad.JoinIndex;if(!((-1===ag))){al=(am=p[$Int.keyFor(((((ak>>0))<<8>>0))+ag>>0)],am!==undefined?[am.v,true]:[0,false]);an=al[0];ao=al[1];if(ao){aq=$assertType((ap=P[$Int.keyFor(an)],ap!==undefined?ap.v:$ifaceNil),AS);ab[0]=$clone(aq,J);ab[0].Bullet.OffenderJoinIndex=ak;ab[0].Bullet.OffenderPlayerId=ad.Id;ab[0].Bullet.OriginatedRenderFrameId=b.Id;w=$append(w,ab[0]);ae.FramesToRecover=ab[0].Bullet.RecoveryFrames;ae.CharacterState=2;if(false===ad.InAir){ae.VelX=0;}}aa++;continue;}if(!((0===ai))||!((0===aj))){ar=ai;as=aj;ae.DirX=ar;ae.DirY=as;ae.VelX=$imul(ai,ad.Speed);ae.CharacterState=1;}else{ae.CharacterState=0;ae.VelX=0;}aa++;}at=b.PlayersArr;au=0;case 1:if(!(au=at.$length)?($throwRuntimeError("index out of range"),undefined):at.$array[at.$offset+au]);ax=aw.JoinIndex;ay=0;az=0;(ba=ax-1>>0,((ba<0||ba>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+ba])).X=ay;(bb=ax-1>>0,((bb<0||bb>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+bb])).Y=az;bc=131072+ax>>0;be=(bd=d[$Int32.keyFor(bc)],bd!==undefined?bd.v:AZ.nil);bf=((av<0||av>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+av]);bg=aw.VirtualGridX+aw.VelX>>0;bh=aw.VirtualGridY+aw.VelY>>0;bi=bg;bj=bh;bk=AB(bi,bj,be.W*0.5,be.H*0.5,0,0,0,0,j,k,o);be.X=bk[0];be.Y=bk[1];$r=be.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(aw.InAir){bf.VelX=bf.VelX+(e)>>0;bf.VelY=bf.VelY+(f)>>0;}au++;$s=1;continue;case 2:bl=$makeSlice(BA,0,b.MeleeBullets.$length);bm=b.MeleeBullets;bn=0;case 4:if(!(bn=bm.$length)?($throwRuntimeError("index out of range"),undefined):bm.$array[bm.$offset+bn]);if(((bo.Bullet.OriginatedRenderFrameId+bo.Bullet.StartupFrames>>0)<=b.Id)&&(((bo.Bullet.OriginatedRenderFrameId+bo.Bullet.StartupFrames>>0)+bo.Bullet.ActiveFrames>>0)>b.Id)){$s=6;continue;}$s=7;continue;case 6:br=(bp=b.PlayersArr,bq=bo.Bullet.OffenderJoinIndex-1>>0,((bq<0||bq>=bp.$length)?($throwRuntimeError("index out of range"),undefined):bp.$array[bp.$offset+bq]));bs=1;if(0>br.DirX){bs=-1;}bt=X(br.VirtualGridX,br.VirtualGridY,o);bu=bt[0];bv=bt[1];bw=bu+bs*bo.Bullet.HitboxOffset;bx=bv;by=bw;bz=bx;ca=AF(by,bz,bo.Bullet.HitboxSizeX,bo.Bullet.HitboxSizeY,l,l,l,l,j,k,bo,"MeleeBullet");$s=9;case 9:if($c){$c=false;ca=ca.$blk();}if(ca&&ca.$blk!==undefined){break s;}cb=ca;$r=c.Add(new BA([cb]));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}bl=$append(bl,cb);$s=8;continue;case 7:w=$append(w,bo);case 8:bn++;$s=4;continue;case 5:cc=b.PlayersArr;cd=0;case 11:if(!(cd=cc.$length)?($throwRuntimeError("index out of range"),undefined):cc.$array[cc.$offset+cd]);cg=cf.JoinIndex;ch=131072+cg>>0;cj=(ci=d[$Int32.keyFor(ch)],ci!==undefined?ci.v:AZ.nil);ck=$assertType(cj.Shape,AT);cm=AC(cg,cj,ck,l,(cl=cg-1>>0,((cl<0||cl>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+cl])));$s=13;case 13:if($c){$c=false;cm=cm.$blk();}if(cm&&cm.$blk!==undefined){break s;}(cn=cg-1>>0,((cn<0||cn>=y.$length)?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+cn]=cm));co=((ce<0||ce>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+ce]);cp=false;cq=cj.Check(0,0,new AO([]));if(!(AP.nil===cq)){$s=14;continue;}$s=15;continue;case 14:cr=cq.Objects;cs=0;case 16:if(!(cs=cr.$length)?($throwRuntimeError("index out of range"),undefined):cr.$array[cr.$offset+cs]);cu=false;cv=false;cw=false;cx=cu;cy=cv;cz=cw;da=ct.Data;if($assertType(da,AR,true)[1]){cy=true;}else if($assertType(da,AS,true)[1]){cz=true;}else{cx=true;}if(cz){cs++;$s=16;continue;}db=$assertType(ct.Shape,AT);dd=T(0,0,ck,db);$s=18;case 18:if($c){$c=false;dd=dd.$blk();}if(dd&&dd.$blk!==undefined){break s;}dc=dd;de=dc[0];df=dc[1];dg=dc[2];dh=dc[3];if(!de){cs++;$s=16;continue;}di=dh.OverlapX*0+dh.OverlapY*-1;if(cy){dj=(dh.Overlap-l*2)*dh.OverlapX;dk=(dh.Overlap-l*2)*dh.OverlapY;df=dj;dg=dk;}dl=(dm=cg-1>>0,((dm<0||dm>=y.$length)?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+dm])).$get();dn=0;while(true){if(!(dn=dl.$length)?($throwRuntimeError("index out of range"),undefined):dl.$array[dl.$offset+dn]),C);dq=df*dp.X+dg*dp.Y;if(cx||(cy&&0>dq)){df=df-(dq*dp.X);dg=dg-(dq*dp.Y);}dn++;}dr=cg-1>>0;((dr<0||dr>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+dr]).X=((dr<0||dr>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+dr]).X+(df);ds=cg-1>>0;((ds<0||ds>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+ds]).Y=((ds<0||ds>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+ds]).Y+(dg);if(m=cf.VelY){co.VelX=0;co.VelY=0;co.CharacterState=0;co.FramesToRecover=0;}}if(cf.InAir){dt=co.CharacterState;du=dt;if((du===(0))||(du===(1))){co.CharacterState=4;}else if(du===(2)){co.CharacterState=5;}else if(du===(3)){co.CharacterState=6;}}cd++;$s=11;continue;case 12:dv=bl;dw=0;case 19:if(!(dw=dv.$length)?($throwRuntimeError("index out of range"),undefined):dv.$array[dv.$offset+dw]);dy=$assertType(dx.Data,AS);dz=$assertType(dx.Shape,AT);ea=dx.Check(0,0,new AO([]));dx.Space.Remove(new BA([dx]));if(AP.nil===ea){w=$append(w,dy);dw++;$s=19;continue;}ed=(eb=b.PlayersArr,ec=dy.Bullet.OffenderJoinIndex-1>>0,((ec<0||ec>=eb.$length)?($throwRuntimeError("index out of range"),undefined):eb.$array[eb.$offset+ec]));ee=ea.Objects;ef=0;case 21:if(!(ef=ee.$length)?($throwRuntimeError("index out of range"),undefined):ee.$array[ee.$offset+ef]);eh=$assertType(eg.Shape,AT);ei=eg.Data;if($assertType(ei,AR,true)[1]){$s=23;continue;}$s=24;continue;case 23:ej=ei.$val;if(dy.Bullet.OffenderPlayerId===ej.Id){ef++;$s=21;continue;}em=T(0,0,dz,eh);$s=26;case 26:if($c){$c=false;em=em.$blk();}if(em&&em.$blk!==undefined){break s;}el=em;en=el[0];if(!en){ef++;$s=21;continue;}eo=ej.JoinIndex;ep=1;if(0>ed.DirX){ep=-1;}eq=-ep*dy.Bullet.Pushback;er=0;es=eq;et=er;eu=(ev=eo-1>>0,((ev<0||ev>=y.$length)?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+ev])).$get();ew=0;while(true){if(!(ew=eu.$length)?($throwRuntimeError("index out of range"),undefined):eu.$array[eu.$offset+ew]),C);ey=es*ex.X+et*ex.Y;if(0>ey){es=es-(ey*ex.X);et=et-(ey*ex.Y);}ew++;}ez=eo-1>>0;((ez<0||ez>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+ez]).X=((ez<0||ez>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+ez]).X+(es);fa=eo-1>>0;((fa<0||fa>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+fa]).Y=((fa<0||fa>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+fa]).Y+(et);fb=(fc=b.PlayersArr,fd=ej.JoinIndex-1>>0,((fd<0||fd>=fc.$length)?($throwRuntimeError("index out of range"),undefined):fc.$array[fc.$offset+fd]));fe=(ff=ej.JoinIndex-1>>0,((ff<0||ff>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+ff]));fg=fb;fh=fe;fh.CharacterState=3;if(fg.InAir){fh.CharacterState=6;}fj=(fi=ej.JoinIndex-1>>0,((fi<0||fi>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+fi])).FramesToRecover;if(dy.Bullet.HitStunFrames>fj){fh.FramesToRecover=dy.Bullet.HitStunFrames;}$s=25;continue;case 24:ek=ei;case 25:ef++;$s=21;continue;case 22:dw++;$s=19;continue;case 20:fk=b.PlayersArr;fl=0;while(true){if(!(fl=fk.$length)?($throwRuntimeError("index out of range"),undefined):fk.$array[fk.$offset+fl]);fo=fn.JoinIndex;fp=131072+fo>>0;fr=(fq=d[$Int32.keyFor(fp)],fq!==undefined?fq.v:AZ.nil);fs=((fm<0||fm>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+fm]);ft=AA(fr.X-(fu=fo-1>>0,((fu<0||fu>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+fu])).X,fr.Y-(fv=fo-1>>0,((fv<0||fv>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+fv])).Y,fr.W*0.5,fr.H*0.5,0,0,0,0,j,k,n);fs.VirtualGridX=ft[0];fs.VirtualGridY=ft[1];fl++;}$s=-1;return new L.ptr(b.Id+1>>0,r,new $Int64(0,0),w,BC.nil,new $Uint64(0,0),false,false);}return;}var $f={$blk:AE,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,c,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,d,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,e,ea,eb,ec,ed,ee,ef,eg,eh,ei,ej,ek,el,em,en,eo,ep,eq,er,es,et,eu,ev,ew,ex,ey,ez,f,fa,fb,fc,fd,fe,ff,fg,fh,fi,fj,fk,fl,fm,fn,fo,fp,fq,fr,fs,ft,fu,fv,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame=AE;AF=function(a,b,c,d,e,f,g,h,i,j,k,l){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l});$s=$s||0;s:while(true){switch($s){case 0:m=Y(a,b,c*0.5,d*0.5,e,f,g,h,i,j);n=m[0];o=m[1];p=AG(n,o,g+c+h,f+d+e,k,l);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;$s=2;case 2:return q;}return;}var $f={$blk:AF,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s};return $f;};$pkg.GenerateRectCollider=AF;AG=function(a,b,c,d,e,f){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c,d,e,f});$s=$s||0;s:while(true){switch($s){case 0:g=B.NewObject(a,b,c,d,new AO([f]));h=B.NewRectangle(0,0,c,d);$r=g.SetShape(h);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g.Data=e;$s=-1;return g;}return;}var $f={$blk:AG,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};AH=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=AI(a);g=0;h=0;i=g;j=h;k=B.NewConvexPolygon(BD.nil);l=f.Points;m=0;while(true){if(!(m=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);p=f.Points;q=0;while(true){if(!(q=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);if(n===r){q++;continue;}if(A.Abs(s.X-o.X)>i){i=A.Abs(s.X-o.X);}if(A.Abs(s.Y-o.Y)>j){j=A.Abs(s.Y-o.Y);}q++;}m++;}t=0;while(true){if(!(t=u.$length)?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+t]));k.AddPoints(new BD([v.X,v.Y]));t=t+(1)>>0;}w=B.NewObject(f.Anchor.X+b,f.Anchor.Y+c,i,j,new AO([e]));$r=w.SetShape(k);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}w.Data=d;$s=-1;return w;}return;}var $f={$blk:AH,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s};return $f;};$pkg.GenerateConvexPolygonCollider=AH;AI=function(a){var a,b,c,d,e,f,g,h,i,j,k;b=new C.ptr(1.7e+308,1.7e+308);c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.X=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]);(k=f.Points,((i<0||i>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+i]=new C.ptr(j.X-b.X,j.Y-b.Y)));h++;}return f;};$pkg.AlignPolygon2DToBoundingBox=AI;BI.methods=[{prop:"Put",name:"Put",pkg:"",typ:$funcType([$emptyInterface],[],false)},{prop:"Pop",name:"Pop",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"GetArrIdxByOffset",name:"GetArrIdxByOffset",pkg:"",typ:$funcType([$Int32],[$Int32],false)},{prop:"GetByOffset",name:"GetByOffset",pkg:"",typ:$funcType([$Int32],[$emptyInterface],false)},{prop:"GetByFrameId",name:"GetByFrameId",pkg:"",typ:$funcType([$Int32],[$emptyInterface],false)},{prop:"SetByFrameId",name:"SetByFrameId",pkg:"",typ:$funcType([$emptyInterface,$Int32],[$Int32,$Int32,$Int32],false)}];C.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""}]);D.init("",[{prop:"Anchor",name:"Anchor",embedded:false,exported:true,typ:BE,tag:""},{prop:"Points",name:"Points",embedded:false,exported:true,typ:BF,tag:""}]);E.init("",[{prop:"Id",name:"Id",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridX",name:"VirtualGridX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridY",name:"VirtualGridY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirX",name:"DirX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirY",name:"DirY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelX",name:"VelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelY",name:"VelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BattleState",name:"BattleState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"JoinIndex",name:"JoinIndex",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ColliderRadius",name:"ColliderRadius",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Removed",name:"Removed",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Score",name:"Score",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"LastMoveGmtMillis",name:"LastMoveGmtMillis",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesToRecover",name:"FramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Hp",name:"Hp",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"MaxHp",name:"MaxHp",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CharacterState",name:"CharacterState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"InAir",name:"InAir",embedded:false,exported:true,typ:$Bool,tag:""}]);F.init("",[{prop:"Dx",name:"Dx",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Dy",name:"Dy",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BtnALevel",name:"BtnALevel",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BtnBLevel",name:"BtnBLevel",embedded:false,exported:true,typ:$Int32,tag:""}]);H.init("",[{prop:"Boundary",name:"Boundary",embedded:false,exported:true,typ:BG,tag:""}]);I.init("",[{prop:"BattleLocalId",name:"BattleLocalId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"StartupFrames",name:"StartupFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ActiveFrames",name:"ActiveFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFrames",name:"RecoveryFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFramesOnBlock",name:"RecoveryFramesOnBlock",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFramesOnHit",name:"RecoveryFramesOnHit",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxOffset",name:"HitboxOffset",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OriginatedRenderFrameId",name:"OriginatedRenderFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitStunFrames",name:"HitStunFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BlockStunFrames",name:"BlockStunFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Pushback",name:"Pushback",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"ReleaseTriggerType",name:"ReleaseTriggerType",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Damage",name:"Damage",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OffenderJoinIndex",name:"OffenderJoinIndex",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OffenderPlayerId",name:"OffenderPlayerId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SelfMoveforwardX",name:"SelfMoveforwardX",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"SelfMoveforwardY",name:"SelfMoveforwardY",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"HitboxSizeX",name:"HitboxSizeX",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"HitboxSizeY",name:"HitboxSizeY",embedded:false,exported:true,typ:$Float64,tag:""}]);J.init("",[{prop:"Bullet",name:"Bullet",embedded:true,exported:true,typ:I,tag:""}]);K.init("",[{prop:"VirtualGridX",name:"VirtualGridX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridY",name:"VirtualGridY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirX",name:"DirX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirY",name:"DirY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelX",name:"VelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelY",name:"VelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Bullet",name:"Bullet",embedded:true,exported:true,typ:I,tag:""}]);L.init("",[{prop:"Id",name:"Id",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"PlayersArr",name:"PlayersArr",embedded:false,exported:true,typ:AW,tag:""},{prop:"CountdownNanos",name:"CountdownNanos",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"MeleeBullets",name:"MeleeBullets",embedded:false,exported:true,typ:AX,tag:""},{prop:"FireballBullets",name:"FireballBullets",embedded:false,exported:true,typ:BC,tag:""},{prop:"BackendUnconfirmedMask",name:"BackendUnconfirmedMask",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"ShouldForceResync",name:"ShouldForceResync",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"PlayerOpPatternToSkillId",name:"PlayerOpPatternToSkillId",embedded:false,exported:true,typ:BH,tag:""}]);M.init("",[{prop:"InputFrameId",name:"InputFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"InputList",name:"InputList",embedded:false,exported:true,typ:AV,tag:""},{prop:"ConfirmedList",name:"ConfirmedList",embedded:false,exported:true,typ:$Uint64,tag:""}]);N.init("",[{prop:"Ed",name:"Ed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"St",name:"St",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"EdFrameId",name:"EdFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"StFrameId",name:"StFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"N",name:"N",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Cnt",name:"Cnt",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Eles",name:"Eles",embedded:false,exported:true,typ:AL,tag:""}]);S.init("",[{prop:"Overlap",name:"Overlap",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OverlapX",name:"OverlapX",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OverlapY",name:"OverlapY",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"AContainedInB",name:"AContainedInB",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"BContainedInA",name:"BContainedInA",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Axis",name:"Axis",embedded:false,exported:true,typ:B.Vector,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.DIRECTION_DECODER=new AK([new AJ([0,0]),new AJ([0,2]),new AJ([0,-2]),new AJ([2,0]),new AJ([-2,0]),new AJ([1,1]),new AJ([-1,-1]),new AJ([1,-1]),new AJ([-1,1])]);P=$makeMap($Int.keyFor,[{k:1,v:new J.ptr(new I.ptr(0,5,10,34,34,34,12,0,18,9,8,1,5,0,0,0,0,24,32))}]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["jsexport"]=(function(){var $pkg={},$init,A,B,C,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,D,E,F,G,H,I,J,K,L,M,N,O,P,Q;A=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["jsexport/battle"];C=$packages["resolv"];R=$sliceType($Uint64);S=$ptrType(B.Vec2D);T=$sliceType(S);U=$ptrType(B.Polygon2D);V=$ptrType(B.PlayerDownsync);W=$sliceType(V);X=$ptrType(B.MeleeBullet);Y=$sliceType(X);Z=$ptrType(B.FireballBullet);AA=$sliceType(Z);AB=$ptrType(A.Object);AC=$sliceType(AB);AD=$funcType([$Float64,$Float64],[AB],false);AE=$funcType([S,T],[AB],false);AF=$funcType([U],[AB],false);AG=$funcType([$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Bool,$Float64],[AB],false);AH=$funcType([$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64],[AB],false);AI=$funcType([$Int32,W,Y],[AB],false);AJ=$funcType([$Int,$Int,$Int,$Int],[AB],false);AK=$funcType([$Int32,R,$Uint64],[AB],false);AL=$funcType([$Int32],[AB],false);AM=$funcType([$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$emptyInterface,$String],[AB],false);AN=$funcType([U,$Float64,$Float64,$emptyInterface,$String],[AB],false);AO=$ptrType(C.Space);AP=$funcType([AO],[AC],false);AQ=$ptrType(B.RingBuffer);AR=$ptrType(B.RoomDownsyncFrame);AS=$ptrType(C.Object);AT=$mapType($Int32,AS);AU=$mapType($Int,$Int);AV=$funcType([AQ,AR,AO,AT,$Int32,$Int32,$Int32,$Int32,$Uint32,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,AU],[AB],false);AW=$funcType([$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64],[$Float64,$Float64],false);AX=$mapType($String,$emptyInterface);D=function(a,b,c){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=A.MakeFullWrapper(new B.InputFrameDownsync.ptr(a,b,c));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=2;case 2:return e;}return;}var $f={$blk:D,$c:true,$r,a,b,c,d,e,$s};return $f;};$pkg.NewInputFrameDownsync=D;E=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=A.MakeFullWrapper(B.NewRingBuffer(a));$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;$s=2;case 2:return c;}return;}var $f={$blk:E,$c:true,$r,a,b,c,$s};return $f;};$pkg.NewRingBufferJs=E;F=function(a,b,c,d){var a,b,c,d;return A.MakeWrapper(C.NewSpace(a,b,c,d));};$pkg.NewCollisionSpaceJs=F;G=function(a,b){var{a,b,c,d,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=A.MakeFullWrapper(new B.Vec2D.ptr(a,b));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;$s=2;case 2:return d;}return;}var $f={$blk:G,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.NewVec2DJs=G;H=function(a,b){var{a,b,c,d,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=A.MakeFullWrapper(new B.Polygon2D.ptr(a,b));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;$s=2;case 2:return d;}return;}var $f={$blk:H,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.NewPolygon2DJs=H;I=function(a){var a;return A.MakeWrapper(new B.Barrier.ptr(a));};$pkg.NewBarrierJs=I;J=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;return A.MakeWrapper(new B.PlayerDownsync.ptr(a,b,c,d,e,f,g,i,j,l,p,false,0,0,h,m,n,k,o));};$pkg.NewPlayerDownsyncJs=J;K=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;return A.MakeWrapper(new B.MeleeBullet.ptr(new B.Bullet.ptr(a,b,c,d,e,f,n,0,g,h,m,i,j,k,l,o,p,q,r)));};$pkg.NewMeleeBulletJs=K;L=function(a,b,c){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=A.MakeFullWrapper(new B.RoomDownsyncFrame.ptr(a,b,new $Int64(0,0),c,AA.nil,new $Uint64(0,0),false,false));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=2;case 2:return e;}return;}var $f={$blk:L,$c:true,$r,a,b,c,d,e,$s};return $f;};$pkg.NewRoomDownsyncFrameJs=L;M=function(a){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.Objects();c=$makeSlice(AC,0,b.$length);d=b;e=0;case 1:if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);g=A.MakeFullWrapper(f);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}c=$append(c,g);e++;$s=1;continue;case 2:$s=-1;return c;}return;}var $f={$blk:M,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};$pkg.GetCollisionSpaceObjsJs=M;N=function(a,b,c,d,e,f,g,h,i,j,k,l){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l});$s=$s||0;s:while(true){switch($s){case 0:m=B.GenerateRectCollider(a,b,c,d,e,f,g,h,i,j,k,l);$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=A.MakeFullWrapper(m);$s=2;case 2:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;$s=3;case 3:return o;}return;}var $f={$blk:N,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s};return $f;};$pkg.GenerateRectColliderJs=N;O=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=B.GenerateConvexPolygonCollider(a,b,c,d,e);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=A.MakeFullWrapper(f);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=3;case 3:return h;}return;}var $f={$blk:O,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};$pkg.GenerateConvexPolygonColliderJs=O;P=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p});$s=$s||0;s:while(true){switch($s){case 0:q=B.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=A.MakeFullWrapper(q);$s=2;case 2:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=r;$s=3;case 3:return s;}return;}var $f={$blk:P,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs=P;Q=function(){$global.gopkgs=$externalize($makeMap($String.keyFor,[{k:"NewVec2DJs",v:new AD(G)},{k:"NewPolygon2DJs",v:new AE(H)},{k:"NewBarrierJs",v:new AF(I)},{k:"NewPlayerDownsyncJs",v:new AG(J)},{k:"NewMeleeBulletJs",v:new AH(K)},{k:"NewRoomDownsyncFrameJs",v:new AI(L)},{k:"NewCollisionSpaceJs",v:new AJ(F)},{k:"NewInputFrameDownsync",v:new AK(D)},{k:"NewRingBufferJs",v:new AL(E)},{k:"GenerateRectColliderJs",v:new AM(N)},{k:"GenerateConvexPolygonColliderJs",v:new AN(O)},{k:"GetCollisionSpaceObjsJs",v:new AP(M)},{k:"ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs",v:new AV(P)},{k:"WorldToPolygonColliderBLPos",v:new AW(B.WorldToPolygonColliderBLPos)},{k:"PolygonColliderBLToWorldPos",v:new AW(B.PolygonColliderBLToWorldPos)}]),AX);};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if($pkg===$mainPkg){Q();$mainFinished=true;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +var $NaN = NaN; +var $global, $module; +if (typeof window !== "undefined") { /* web page */ + $global = window; +} else if (typeof self !== "undefined") { /* web worker */ + $global = self; +} else if (typeof global !== "undefined") { /* Node.js */ + $global = global; + $global.require = require; +} else { /* others (e.g. Nashorn) */ + $global = this; +} + +if ($global === undefined || $global.Array === undefined) { + throw new Error("no global object found"); +} +if (typeof module !== "undefined") { + $module = module; +} + +if (!$global.fs && $global.require) { + try { + var fs = $global.require('fs'); + if (typeof fs === "object" && fs !== null && Object.keys(fs).length !== 0) { + $global.fs = fs; + } + } catch(e) { /* Ignore if the module couldn't be loaded. */ } +} + +if (!$global.fs) { + var outputBuf = ""; + var decoder = new TextDecoder("utf-8"); + $global.fs = { + constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused + writeSync: function writeSync(fd, buf) { + outputBuf += decoder.decode(buf); + var nl = outputBuf.lastIndexOf("\n"); + if (nl != -1) { + console.log(outputBuf.substr(0, nl)); + outputBuf = outputBuf.substr(nl + 1); + } + return buf.length; + }, + write: function write(fd, buf, offset, length, position, callback) { + if (offset !== 0 || length !== buf.length || position !== null) { + callback(enosys()); + return; + } + var n = this.writeSync(fd, buf); + callback(null, n); + } + }; +} + +var $linknames = {} // Collection of functions referenced by a go:linkname directive. +var $packages = {}, $idCounter = 0; +var $keys = function(m) { return m ? Object.keys(m) : []; }; +var $flushConsole = function() {}; +var $throwRuntimeError; /* set by package "runtime" */ +var $throwNilPointerError = function() { $throwRuntimeError("invalid memory address or nil pointer dereference"); }; +var $call = function(fn, rcvr, args) { return fn.apply(rcvr, args); }; +var $makeFunc = function(fn) { return function() { return $externalize(fn(this, new ($sliceType($jsObjectPtr))($global.Array.prototype.slice.call(arguments, []))), $emptyInterface); }; }; +var $unused = function(v) {}; +var $print = console.log; +// Under Node we can emulate print() more closely by avoiding a newline. +if (($global.process !== undefined) && $global.require) { + try { + var util = $global.require('util'); + $print = function() { $global.process.stderr.write(util.format.apply(this, arguments)); }; + } catch (e) { + // Failed to require util module, keep using console.log(). + } +} +var $println = console.log + +var $initAllLinknames = function() { + var names = $keys($packages); + for (var i = 0; i < names.length; i++) { + var f = $packages[names[i]]["$initLinknames"]; + if (typeof f == 'function') { + f(); + } + } +} + +var $mapArray = function(array, f) { + var newArray = new array.constructor(array.length); + for (var i = 0; i < array.length; i++) { + newArray[i] = f(array[i]); + } + return newArray; +}; + +// Returns a method bound to the receiver instance, safe to invoke as a +// standalone function. Bound function is cached for later reuse. +var $methodVal = function(recv, name) { + var vals = recv.$methodVals || {}; + recv.$methodVals = vals; /* noop for primitives */ + var f = vals[name]; + if (f !== undefined) { + return f; + } + var method = recv[name]; + f = method.bind(recv); + vals[name] = f; + return f; +}; + +var $methodExpr = function(typ, name) { + var method = typ.prototype[name]; + if (method.$expr === undefined) { + method.$expr = function() { + $stackDepthOffset--; + try { + if (typ.wrapped) { + arguments[0] = new typ(arguments[0]); + } + return Function.call.apply(method, arguments); + } finally { + $stackDepthOffset++; + } + }; + } + return method.$expr; +}; + +var $ifaceMethodExprs = {}; +var $ifaceMethodExpr = function(name) { + var expr = $ifaceMethodExprs["$" + name]; + if (expr === undefined) { + expr = $ifaceMethodExprs["$" + name] = function() { + $stackDepthOffset--; + try { + return Function.call.apply(arguments[0][name], arguments); + } finally { + $stackDepthOffset++; + } + }; + } + return expr; +}; + +var $subslice = function(slice, low, high, max) { + if (high === undefined) { + high = slice.$length; + } + if (max === undefined) { + max = slice.$capacity; + } + if (low < 0 || high < low || max < high || high > slice.$capacity || max > slice.$capacity) { + $throwRuntimeError("slice bounds out of range"); + } + if (slice === slice.constructor.nil) { + return slice; + } + var s = new slice.constructor(slice.$array); + s.$offset = slice.$offset + low; + s.$length = high - low; + s.$capacity = max - low; + return s; +}; + +var $substring = function(str, low, high) { + if (low < 0 || high < low || high > str.length) { + $throwRuntimeError("slice bounds out of range"); + } + return str.substring(low, high); +}; + +// Convert Go slice to an equivalent JS array type. +var $sliceToNativeArray = function(slice) { + if (slice.$array.constructor !== Array) { + return slice.$array.subarray(slice.$offset, slice.$offset + slice.$length); + } + return slice.$array.slice(slice.$offset, slice.$offset + slice.$length); +}; + +// Convert Go slice to a pointer to an underlying Go array. +// +// Note that an array pointer can be represented by an "unwrapped" native array +// type, and it will be wrapped back into its Go type when necessary. +var $sliceToGoArray = function(slice, arrayPtrType) { + var arrayType = arrayPtrType.elem; + if (arrayType !== undefined && slice.$length < arrayType.len) { + $throwRuntimeError("cannot convert slice with length " + slice.$length + " to pointer to array with length " + arrayType.len); + } + if (slice == slice.constructor.nil) { + return arrayPtrType.nil; // Nil slice converts to nil array pointer. + } + if (slice.$array.constructor !== Array) { + return slice.$array.subarray(slice.$offset, slice.$offset + arrayType.len); + } + if (slice.$offset == 0 && slice.$length == slice.$capacity && slice.$length == arrayType.len) { + return slice.$array; + } + if (arrayType.len == 0) { + return new arrayType([]); + } + + // Array.slice (unlike TypedArray.subarray) returns a copy of an array range, + // which is not sharing memory with the original one, which violates the spec + // for slice to array conversion. This is incompatible with the Go spec, in + // particular that the assignments to the array elements would be visible in + // the slice. Prefer to fail explicitly instead of creating subtle bugs. + $throwRuntimeError("gopherjs: non-numeric slice to underlying array conversion is not supported for subslices"); +}; + +// Convert between compatible slice types (e.g. native and names). +var $convertSliceType = function(slice, desiredType) { + if (slice == slice.constructor.nil) { + return desiredType.nil; // Preserve nil value. + } + + return $subslice(new desiredType(slice.$array), slice.$offset, slice.$offset + slice.$length); +} + +var $decodeRune = function(str, pos) { + var c0 = str.charCodeAt(pos); + + if (c0 < 0x80) { + return [c0, 1]; + } + + if (c0 !== c0 || c0 < 0xC0) { + return [0xFFFD, 1]; + } + + var c1 = str.charCodeAt(pos + 1); + if (c1 !== c1 || c1 < 0x80 || 0xC0 <= c1) { + return [0xFFFD, 1]; + } + + if (c0 < 0xE0) { + var r = (c0 & 0x1F) << 6 | (c1 & 0x3F); + if (r <= 0x7F) { + return [0xFFFD, 1]; + } + return [r, 2]; + } + + var c2 = str.charCodeAt(pos + 2); + if (c2 !== c2 || c2 < 0x80 || 0xC0 <= c2) { + return [0xFFFD, 1]; + } + + if (c0 < 0xF0) { + var r = (c0 & 0x0F) << 12 | (c1 & 0x3F) << 6 | (c2 & 0x3F); + if (r <= 0x7FF) { + return [0xFFFD, 1]; + } + if (0xD800 <= r && r <= 0xDFFF) { + return [0xFFFD, 1]; + } + return [r, 3]; + } + + var c3 = str.charCodeAt(pos + 3); + if (c3 !== c3 || c3 < 0x80 || 0xC0 <= c3) { + return [0xFFFD, 1]; + } + + if (c0 < 0xF8) { + var r = (c0 & 0x07) << 18 | (c1 & 0x3F) << 12 | (c2 & 0x3F) << 6 | (c3 & 0x3F); + if (r <= 0xFFFF || 0x10FFFF < r) { + return [0xFFFD, 1]; + } + return [r, 4]; + } + + return [0xFFFD, 1]; +}; + +var $encodeRune = function(r) { + if (r < 0 || r > 0x10FFFF || (0xD800 <= r && r <= 0xDFFF)) { + r = 0xFFFD; + } + if (r <= 0x7F) { + return String.fromCharCode(r); + } + if (r <= 0x7FF) { + return String.fromCharCode(0xC0 | r >> 6, 0x80 | (r & 0x3F)); + } + if (r <= 0xFFFF) { + return String.fromCharCode(0xE0 | r >> 12, 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F)); + } + return String.fromCharCode(0xF0 | r >> 18, 0x80 | (r >> 12 & 0x3F), 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F)); +}; + +var $stringToBytes = function(str) { + var array = new Uint8Array(str.length); + for (var i = 0; i < str.length; i++) { + array[i] = str.charCodeAt(i); + } + return array; +}; + +var $bytesToString = function(slice) { + if (slice.$length === 0) { + return ""; + } + var str = ""; + for (var i = 0; i < slice.$length; i += 10000) { + str += String.fromCharCode.apply(undefined, slice.$array.subarray(slice.$offset + i, slice.$offset + Math.min(slice.$length, i + 10000))); + } + return str; +}; + +var $stringToRunes = function(str) { + var array = new Int32Array(str.length); + var rune, j = 0; + for (var i = 0; i < str.length; i += rune[1], j++) { + rune = $decodeRune(str, i); + array[j] = rune[0]; + } + return array.subarray(0, j); +}; + +var $runesToString = function(slice) { + if (slice.$length === 0) { + return ""; + } + var str = ""; + for (var i = 0; i < slice.$length; i++) { + str += $encodeRune(slice.$array[slice.$offset + i]); + } + return str; +}; + +var $copyString = function(dst, src) { + var n = Math.min(src.length, dst.$length); + for (var i = 0; i < n; i++) { + dst.$array[dst.$offset + i] = src.charCodeAt(i); + } + return n; +}; + +var $copySlice = function(dst, src) { + var n = Math.min(src.$length, dst.$length); + $copyArray(dst.$array, src.$array, dst.$offset, src.$offset, n, dst.constructor.elem); + return n; +}; + +var $copyArray = function(dst, src, dstOffset, srcOffset, n, elem) { + if (n === 0 || (dst === src && dstOffset === srcOffset)) { + return; + } + + if (src.subarray) { + dst.set(src.subarray(srcOffset, srcOffset + n), dstOffset); + return; + } + + switch (elem.kind) { + case $kindArray: + case $kindStruct: + if (dst === src && dstOffset > srcOffset) { + for (var i = n - 1; i >= 0; i--) { + elem.copy(dst[dstOffset + i], src[srcOffset + i]); + } + return; + } + for (var i = 0; i < n; i++) { + elem.copy(dst[dstOffset + i], src[srcOffset + i]); + } + return; + } + + if (dst === src && dstOffset > srcOffset) { + for (var i = n - 1; i >= 0; i--) { + dst[dstOffset + i] = src[srcOffset + i]; + } + return; + } + for (var i = 0; i < n; i++) { + dst[dstOffset + i] = src[srcOffset + i]; + } +}; + +var $clone = function(src, type) { + var clone = type.zero(); + type.copy(clone, src); + return clone; +}; + +var $pointerOfStructConversion = function(obj, type) { + if(obj.$proxies === undefined) { + obj.$proxies = {}; + obj.$proxies[obj.constructor.string] = obj; + } + var proxy = obj.$proxies[type.string]; + if (proxy === undefined) { + var properties = {}; + for (var i = 0; i < type.elem.fields.length; i++) { + (function(fieldProp) { + properties[fieldProp] = { + get: function() { return obj[fieldProp]; }, + set: function(value) { obj[fieldProp] = value; } + }; + })(type.elem.fields[i].prop); + } + proxy = Object.create(type.prototype, properties); + proxy.$val = proxy; + obj.$proxies[type.string] = proxy; + proxy.$proxies = obj.$proxies; + } + return proxy; +}; + +var $append = function(slice) { + return $internalAppend(slice, arguments, 1, arguments.length - 1); +}; + +var $appendSlice = function(slice, toAppend) { + if (toAppend.constructor === String) { + var bytes = $stringToBytes(toAppend); + return $internalAppend(slice, bytes, 0, bytes.length); + } + return $internalAppend(slice, toAppend.$array, toAppend.$offset, toAppend.$length); +}; + +var $internalAppend = function(slice, array, offset, length) { + if (length === 0) { + return slice; + } + + var newArray = slice.$array; + var newOffset = slice.$offset; + var newLength = slice.$length + length; + var newCapacity = slice.$capacity; + + if (newLength > newCapacity) { + newOffset = 0; + newCapacity = Math.max(newLength, slice.$capacity < 1024 ? slice.$capacity * 2 : Math.floor(slice.$capacity * 5 / 4)); + + if (slice.$array.constructor === Array) { + newArray = slice.$array.slice(slice.$offset, slice.$offset + slice.$length); + newArray.length = newCapacity; + var zero = slice.constructor.elem.zero; + for (var i = slice.$length; i < newCapacity; i++) { + newArray[i] = zero(); + } + } else { + newArray = new slice.$array.constructor(newCapacity); + newArray.set(slice.$array.subarray(slice.$offset, slice.$offset + slice.$length)); + } + } + + $copyArray(newArray, array, newOffset + slice.$length, offset, length, slice.constructor.elem); + + var newSlice = new slice.constructor(newArray); + newSlice.$offset = newOffset; + newSlice.$length = newLength; + newSlice.$capacity = newCapacity; + return newSlice; +}; + +var $equal = function(a, b, type) { + if (type === $jsObjectPtr) { + return a === b; + } + switch (type.kind) { + case $kindComplex64: + case $kindComplex128: + return a.$real === b.$real && a.$imag === b.$imag; + case $kindInt64: + case $kindUint64: + return a.$high === b.$high && a.$low === b.$low; + case $kindArray: + if (a.length !== b.length) { + return false; + } + for (var i = 0; i < a.length; i++) { + if (!$equal(a[i], b[i], type.elem)) { + return false; + } + } + return true; + case $kindStruct: + for (var i = 0; i < type.fields.length; i++) { + var f = type.fields[i]; + if (!$equal(a[f.prop], b[f.prop], f.typ)) { + return false; + } + } + return true; + case $kindInterface: + return $interfaceIsEqual(a, b); + default: + return a === b; + } +}; + +var $interfaceIsEqual = function(a, b) { + if (a === $ifaceNil || b === $ifaceNil) { + return a === b; + } + if (a.constructor !== b.constructor) { + return false; + } + if (a.constructor === $jsObjectPtr) { + return a.object === b.object; + } + if (!a.constructor.comparable) { + $throwRuntimeError("comparing uncomparable type " + a.constructor.string); + } + return $equal(a.$val, b.$val, a.constructor); +}; + +var $min = Math.min; +var $mod = function(x, y) { return x % y; }; +var $parseInt = parseInt; +var $parseFloat = function(f) { + if (f !== undefined && f !== null && f.constructor === Number) { + return f; + } + return parseFloat(f); +}; + +var $froundBuf = new Float32Array(1); +var $fround = Math.fround || function(f) { + $froundBuf[0] = f; + return $froundBuf[0]; +}; + +var $imul = Math.imul || function(a, b) { + var ah = (a >>> 16) & 0xffff; + var al = a & 0xffff; + var bh = (b >>> 16) & 0xffff; + var bl = b & 0xffff; + return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0) >> 0); +}; + +var $floatKey = function(f) { + if (f !== f) { + $idCounter++; + return "NaN$" + $idCounter; + } + return String(f); +}; + +var $flatten64 = function(x) { + return x.$high * 4294967296 + x.$low; +}; + +var $shiftLeft64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high << y | x.$low >>> (32 - y), (x.$low << y) >>> 0); + } + if (y < 64) { + return new x.constructor(x.$low << (y - 32), 0); + } + return new x.constructor(0, 0); +}; + +var $shiftRightInt64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high >> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0); + } + if (y < 64) { + return new x.constructor(x.$high >> 31, (x.$high >> (y - 32)) >>> 0); + } + if (x.$high < 0) { + return new x.constructor(-1, 4294967295); + } + return new x.constructor(0, 0); +}; + +var $shiftRightUint64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high >>> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0); + } + if (y < 64) { + return new x.constructor(0, x.$high >>> (y - 32)); + } + return new x.constructor(0, 0); +}; + +var $mul64 = function(x, y) { + var x48 = x.$high >>> 16; + var x32 = x.$high & 0xFFFF; + var x16 = x.$low >>> 16; + var x00 = x.$low & 0xFFFF; + + var y48 = y.$high >>> 16; + var y32 = y.$high & 0xFFFF; + var y16 = y.$low >>> 16; + var y00 = y.$low & 0xFFFF; + + var z48 = 0, z32 = 0, z16 = 0, z00 = 0; + z00 += x00 * y00; + z16 += z00 >>> 16; + z00 &= 0xFFFF; + z16 += x16 * y00; + z32 += z16 >>> 16; + z16 &= 0xFFFF; + z16 += x00 * y16; + z32 += z16 >>> 16; + z16 &= 0xFFFF; + z32 += x32 * y00; + z48 += z32 >>> 16; + z32 &= 0xFFFF; + z32 += x16 * y16; + z48 += z32 >>> 16; + z32 &= 0xFFFF; + z32 += x00 * y32; + z48 += z32 >>> 16; + z32 &= 0xFFFF; + z48 += x48 * y00 + x32 * y16 + x16 * y32 + x00 * y48; + z48 &= 0xFFFF; + + var hi = ((z48 << 16) | z32) >>> 0; + var lo = ((z16 << 16) | z00) >>> 0; + + var r = new x.constructor(hi, lo); + return r; +}; + +var $div64 = function(x, y, returnRemainder) { + if (y.$high === 0 && y.$low === 0) { + $throwRuntimeError("integer divide by zero"); + } + + var s = 1; + var rs = 1; + + var xHigh = x.$high; + var xLow = x.$low; + if (xHigh < 0) { + s = -1; + rs = -1; + xHigh = -xHigh; + if (xLow !== 0) { + xHigh--; + xLow = 4294967296 - xLow; + } + } + + var yHigh = y.$high; + var yLow = y.$low; + if (y.$high < 0) { + s *= -1; + yHigh = -yHigh; + if (yLow !== 0) { + yHigh--; + yLow = 4294967296 - yLow; + } + } + + var high = 0, low = 0, n = 0; + while (yHigh < 2147483648 && ((xHigh > yHigh) || (xHigh === yHigh && xLow > yLow))) { + yHigh = (yHigh << 1 | yLow >>> 31) >>> 0; + yLow = (yLow << 1) >>> 0; + n++; + } + for (var i = 0; i <= n; i++) { + high = high << 1 | low >>> 31; + low = (low << 1) >>> 0; + if ((xHigh > yHigh) || (xHigh === yHigh && xLow >= yLow)) { + xHigh = xHigh - yHigh; + xLow = xLow - yLow; + if (xLow < 0) { + xHigh--; + xLow += 4294967296; + } + low++; + if (low === 4294967296) { + high++; + low = 0; + } + } + yLow = (yLow >>> 1 | yHigh << (32 - 1)) >>> 0; + yHigh = yHigh >>> 1; + } + + if (returnRemainder) { + return new x.constructor(xHigh * rs, xLow * rs); + } + return new x.constructor(high * s, low * s); +}; + +var $divComplex = function(n, d) { + var ninf = n.$real === Infinity || n.$real === -Infinity || n.$imag === Infinity || n.$imag === -Infinity; + var dinf = d.$real === Infinity || d.$real === -Infinity || d.$imag === Infinity || d.$imag === -Infinity; + var nnan = !ninf && (n.$real !== n.$real || n.$imag !== n.$imag); + var dnan = !dinf && (d.$real !== d.$real || d.$imag !== d.$imag); + if(nnan || dnan) { + return new n.constructor(NaN, NaN); + } + if (ninf && !dinf) { + return new n.constructor(Infinity, Infinity); + } + if (!ninf && dinf) { + return new n.constructor(0, 0); + } + if (d.$real === 0 && d.$imag === 0) { + if (n.$real === 0 && n.$imag === 0) { + return new n.constructor(NaN, NaN); + } + return new n.constructor(Infinity, Infinity); + } + var a = Math.abs(d.$real); + var b = Math.abs(d.$imag); + if (a <= b) { + var ratio = d.$real / d.$imag; + var denom = d.$real * ratio + d.$imag; + return new n.constructor((n.$real * ratio + n.$imag) / denom, (n.$imag * ratio - n.$real) / denom); + } + var ratio = d.$imag / d.$real; + var denom = d.$imag * ratio + d.$real; + return new n.constructor((n.$imag * ratio + n.$real) / denom, (n.$imag - n.$real * ratio) / denom); +}; + +var $kindBool = 1; +var $kindInt = 2; +var $kindInt8 = 3; +var $kindInt16 = 4; +var $kindInt32 = 5; +var $kindInt64 = 6; +var $kindUint = 7; +var $kindUint8 = 8; +var $kindUint16 = 9; +var $kindUint32 = 10; +var $kindUint64 = 11; +var $kindUintptr = 12; +var $kindFloat32 = 13; +var $kindFloat64 = 14; +var $kindComplex64 = 15; +var $kindComplex128 = 16; +var $kindArray = 17; +var $kindChan = 18; +var $kindFunc = 19; +var $kindInterface = 20; +var $kindMap = 21; +var $kindPtr = 22; +var $kindSlice = 23; +var $kindString = 24; +var $kindStruct = 25; +var $kindUnsafePointer = 26; + +var $methodSynthesizers = []; +var $addMethodSynthesizer = function(f) { + if ($methodSynthesizers === null) { + f(); + return; + } + $methodSynthesizers.push(f); +}; +var $synthesizeMethods = function() { + $methodSynthesizers.forEach(function(f) { f(); }); + $methodSynthesizers = null; +}; + +var $ifaceKeyFor = function(x) { + if (x === $ifaceNil) { + return 'nil'; + } + var c = x.constructor; + return c.string + '$' + c.keyFor(x.$val); +}; + +var $identity = function(x) { return x; }; + +var $typeIDCounter = 0; + +var $idKey = function(x) { + if (x.$id === undefined) { + $idCounter++; + x.$id = $idCounter; + } + return String(x.$id); +}; + +// Creates constructor functions for array pointer types. Returns a new function +// instace each time to make sure each type is independent of the other. +var $arrayPtrCtor = function() { + return function(array) { + this.$get = function() { return array; }; + this.$set = function(v) { typ.copy(this, v); }; + this.$val = array; + } +} + +var $newType = function(size, kind, string, named, pkg, exported, constructor) { + var typ; + switch(kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindUnsafePointer: + typ = function(v) { this.$val = v; }; + typ.wrapped = true; + typ.keyFor = $identity; + break; + + case $kindString: + typ = function(v) { this.$val = v; }; + typ.wrapped = true; + typ.keyFor = function(x) { return "$" + x; }; + break; + + case $kindFloat32: + case $kindFloat64: + typ = function(v) { this.$val = v; }; + typ.wrapped = true; + typ.keyFor = function(x) { return $floatKey(x); }; + break; + + case $kindInt64: + typ = function(high, low) { + this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >> 0; + this.$low = low >>> 0; + this.$val = this; + }; + typ.keyFor = function(x) { return x.$high + "$" + x.$low; }; + break; + + case $kindUint64: + typ = function(high, low) { + this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >>> 0; + this.$low = low >>> 0; + this.$val = this; + }; + typ.keyFor = function(x) { return x.$high + "$" + x.$low; }; + break; + + case $kindComplex64: + typ = function(real, imag) { + this.$real = $fround(real); + this.$imag = $fround(imag); + this.$val = this; + }; + typ.keyFor = function(x) { return x.$real + "$" + x.$imag; }; + break; + + case $kindComplex128: + typ = function(real, imag) { + this.$real = real; + this.$imag = imag; + this.$val = this; + }; + typ.keyFor = function(x) { return x.$real + "$" + x.$imag; }; + break; + + case $kindArray: + typ = function(v) { this.$val = v; }; + typ.wrapped = true; + typ.ptr = $newType(4, $kindPtr, "*" + string, false, "", false, $arrayPtrCtor()); + typ.init = function(elem, len) { + typ.elem = elem; + typ.len = len; + typ.comparable = elem.comparable; + typ.keyFor = function(x) { + return Array.prototype.join.call($mapArray(x, function(e) { + return String(elem.keyFor(e)).replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); + }), "$"); + }; + typ.copy = function(dst, src) { + $copyArray(dst, src, 0, 0, src.length, elem); + }; + typ.ptr.init(typ); + Object.defineProperty(typ.ptr.nil, "nilCheck", { get: $throwNilPointerError }); + }; + break; + + case $kindChan: + typ = function(v) { this.$val = v; }; + typ.wrapped = true; + typ.keyFor = $idKey; + typ.init = function(elem, sendOnly, recvOnly) { + typ.elem = elem; + typ.sendOnly = sendOnly; + typ.recvOnly = recvOnly; + }; + break; + + case $kindFunc: + typ = function(v) { this.$val = v; }; + typ.wrapped = true; + typ.init = function(params, results, variadic) { + typ.params = params; + typ.results = results; + typ.variadic = variadic; + typ.comparable = false; + }; + break; + + case $kindInterface: + typ = { implementedBy: {}, missingMethodFor: {} }; + typ.keyFor = $ifaceKeyFor; + typ.init = function(methods) { + typ.methods = methods; + methods.forEach(function(m) { + $ifaceNil[m.prop] = $throwNilPointerError; + }); + }; + break; + + case $kindMap: + typ = function(v) { this.$val = v; }; + typ.wrapped = true; + typ.init = function(key, elem) { + typ.key = key; + typ.elem = elem; + typ.comparable = false; + }; + break; + + case $kindPtr: + typ = constructor || function(getter, setter, target) { + this.$get = getter; + this.$set = setter; + this.$target = target; + this.$val = this; + }; + typ.keyFor = $idKey; + typ.init = function(elem) { + typ.elem = elem; + typ.wrapped = (elem.kind === $kindArray); + typ.nil = new typ($throwNilPointerError, $throwNilPointerError); + }; + break; + + case $kindSlice: + typ = function(array) { + if (array.constructor !== typ.nativeArray) { + array = new typ.nativeArray(array); + } + this.$array = array; + this.$offset = 0; + this.$length = array.length; + this.$capacity = array.length; + this.$val = this; + }; + typ.init = function(elem) { + typ.elem = elem; + typ.comparable = false; + typ.nativeArray = $nativeArray(elem.kind); + typ.nil = new typ([]); + }; + break; + + case $kindStruct: + typ = function(v) { this.$val = v; }; + typ.wrapped = true; + typ.ptr = $newType(4, $kindPtr, "*" + string, false, pkg, exported, constructor); + typ.ptr.elem = typ; + typ.ptr.prototype.$get = function() { return this; }; + typ.ptr.prototype.$set = function(v) { typ.copy(this, v); }; + typ.init = function(pkgPath, fields) { + typ.pkgPath = pkgPath; + typ.fields = fields; + fields.forEach(function(f) { + if (!f.typ.comparable) { + typ.comparable = false; + } + }); + typ.keyFor = function(x) { + var val = x.$val; + return $mapArray(fields, function(f) { + return String(f.typ.keyFor(val[f.prop])).replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); + }).join("$"); + }; + typ.copy = function(dst, src) { + for (var i = 0; i < fields.length; i++) { + var f = fields[i]; + switch (f.typ.kind) { + case $kindArray: + case $kindStruct: + f.typ.copy(dst[f.prop], src[f.prop]); + continue; + default: + dst[f.prop] = src[f.prop]; + continue; + } + } + }; + /* nil value */ + var properties = {}; + fields.forEach(function(f) { + properties[f.prop] = { get: $throwNilPointerError, set: $throwNilPointerError }; + }); + typ.ptr.nil = Object.create(constructor.prototype, properties); + typ.ptr.nil.$val = typ.ptr.nil; + /* methods for embedded fields */ + $addMethodSynthesizer(function() { + var synthesizeMethod = function(target, m, f) { + if (target.prototype[m.prop] !== undefined) { return; } + target.prototype[m.prop] = function() { + var v = this.$val[f.prop]; + if (f.typ === $jsObjectPtr) { + v = new $jsObjectPtr(v); + } + if (v.$val === undefined) { + v = new f.typ(v); + } + return v[m.prop].apply(v, arguments); + }; + }; + fields.forEach(function(f) { + if (f.embedded) { + $methodSet(f.typ).forEach(function(m) { + synthesizeMethod(typ, m, f); + synthesizeMethod(typ.ptr, m, f); + }); + $methodSet($ptrType(f.typ)).forEach(function(m) { + synthesizeMethod(typ.ptr, m, f); + }); + } + }); + }); + }; + break; + + default: + $panic(new $String("invalid kind: " + kind)); + } + + switch (kind) { + case $kindBool: + case $kindMap: + typ.zero = function() { return false; }; + break; + + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8 : + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindUnsafePointer: + case $kindFloat32: + case $kindFloat64: + typ.zero = function() { return 0; }; + break; + + case $kindString: + typ.zero = function() { return ""; }; + break; + + case $kindInt64: + case $kindUint64: + case $kindComplex64: + case $kindComplex128: + var zero = new typ(0, 0); + typ.zero = function() { return zero; }; + break; + + case $kindPtr: + case $kindSlice: + typ.zero = function() { return typ.nil; }; + break; + + case $kindChan: + typ.zero = function() { return $chanNil; }; + break; + + case $kindFunc: + typ.zero = function() { return $throwNilPointerError; }; + break; + + case $kindInterface: + typ.zero = function() { return $ifaceNil; }; + break; + + case $kindArray: + typ.zero = function() { + var arrayClass = $nativeArray(typ.elem.kind); + if (arrayClass !== Array) { + return new arrayClass(typ.len); + } + var array = new Array(typ.len); + for (var i = 0; i < typ.len; i++) { + array[i] = typ.elem.zero(); + } + return array; + }; + break; + + case $kindStruct: + typ.zero = function() { return new typ.ptr(); }; + break; + + default: + $panic(new $String("invalid kind: " + kind)); + } + + typ.id = $typeIDCounter; + $typeIDCounter++; + typ.size = size; + typ.kind = kind; + typ.string = string; + typ.named = named; + typ.pkg = pkg; + typ.exported = exported; + typ.methods = []; + typ.methodSetCache = null; + typ.comparable = true; + return typ; +}; + +var $methodSet = function(typ) { + if (typ.methodSetCache !== null) { + return typ.methodSetCache; + } + var base = {}; + + var isPtr = (typ.kind === $kindPtr); + if (isPtr && typ.elem.kind === $kindInterface) { + typ.methodSetCache = []; + return []; + } + + var current = [{typ: isPtr ? typ.elem : typ, indirect: isPtr}]; + + var seen = {}; + + while (current.length > 0) { + var next = []; + var mset = []; + + current.forEach(function(e) { + if (seen[e.typ.string]) { + return; + } + seen[e.typ.string] = true; + + if (e.typ.named) { + mset = mset.concat(e.typ.methods); + if (e.indirect) { + mset = mset.concat($ptrType(e.typ).methods); + } + } + + switch (e.typ.kind) { + case $kindStruct: + e.typ.fields.forEach(function(f) { + if (f.embedded) { + var fTyp = f.typ; + var fIsPtr = (fTyp.kind === $kindPtr); + next.push({typ: fIsPtr ? fTyp.elem : fTyp, indirect: e.indirect || fIsPtr}); + } + }); + break; + + case $kindInterface: + mset = mset.concat(e.typ.methods); + break; + } + }); + + mset.forEach(function(m) { + if (base[m.name] === undefined) { + base[m.name] = m; + } + }); + + current = next; + } + + typ.methodSetCache = []; + Object.keys(base).sort().forEach(function(name) { + typ.methodSetCache.push(base[name]); + }); + return typ.methodSetCache; +}; + +var $Bool = $newType( 1, $kindBool, "bool", true, "", false, null); +var $Int = $newType( 4, $kindInt, "int", true, "", false, null); +var $Int8 = $newType( 1, $kindInt8, "int8", true, "", false, null); +var $Int16 = $newType( 2, $kindInt16, "int16", true, "", false, null); +var $Int32 = $newType( 4, $kindInt32, "int32", true, "", false, null); +var $Int64 = $newType( 8, $kindInt64, "int64", true, "", false, null); +var $Uint = $newType( 4, $kindUint, "uint", true, "", false, null); +var $Uint8 = $newType( 1, $kindUint8, "uint8", true, "", false, null); +var $Uint16 = $newType( 2, $kindUint16, "uint16", true, "", false, null); +var $Uint32 = $newType( 4, $kindUint32, "uint32", true, "", false, null); +var $Uint64 = $newType( 8, $kindUint64, "uint64", true, "", false, null); +var $Uintptr = $newType( 4, $kindUintptr, "uintptr", true, "", false, null); +var $Float32 = $newType( 4, $kindFloat32, "float32", true, "", false, null); +var $Float64 = $newType( 8, $kindFloat64, "float64", true, "", false, null); +var $Complex64 = $newType( 8, $kindComplex64, "complex64", true, "", false, null); +var $Complex128 = $newType(16, $kindComplex128, "complex128", true, "", false, null); +var $String = $newType( 8, $kindString, "string", true, "", false, null); +var $UnsafePointer = $newType( 4, $kindUnsafePointer, "unsafe.Pointer", true, "unsafe", false, null); + +var $nativeArray = function(elemKind) { + switch (elemKind) { + case $kindInt: + return Int32Array; + case $kindInt8: + return Int8Array; + case $kindInt16: + return Int16Array; + case $kindInt32: + return Int32Array; + case $kindUint: + return Uint32Array; + case $kindUint8: + return Uint8Array; + case $kindUint16: + return Uint16Array; + case $kindUint32: + return Uint32Array; + case $kindUintptr: + return Uint32Array; + case $kindFloat32: + return Float32Array; + case $kindFloat64: + return Float64Array; + default: + return Array; + } +}; +var $toNativeArray = function(elemKind, array) { + var nativeArray = $nativeArray(elemKind); + if (nativeArray === Array) { + return array; + } + return new nativeArray(array); +}; +var $arrayTypes = {}; +var $arrayType = function(elem, len) { + var typeKey = elem.id + "$" + len; + var typ = $arrayTypes[typeKey]; + if (typ === undefined) { + typ = $newType(12, $kindArray, "[" + len + "]" + elem.string, false, "", false, null); + $arrayTypes[typeKey] = typ; + typ.init(elem, len); + } + return typ; +}; + +var $chanType = function(elem, sendOnly, recvOnly) { + var string = (recvOnly ? "<-" : "") + "chan" + (sendOnly ? "<- " : " "); + if (!sendOnly && !recvOnly && (elem.string[0] == "<")) { + string += "(" + elem.string + ")"; + } else { + string += elem.string; + } + var field = sendOnly ? "SendChan" : (recvOnly ? "RecvChan" : "Chan"); + var typ = elem[field]; + if (typ === undefined) { + typ = $newType(4, $kindChan, string, false, "", false, null); + elem[field] = typ; + typ.init(elem, sendOnly, recvOnly); + } + return typ; +}; +var $Chan = function(elem, capacity) { + if (capacity < 0 || capacity > 2147483647) { + $throwRuntimeError("makechan: size out of range"); + } + this.$elem = elem; + this.$capacity = capacity; + this.$buffer = []; + this.$sendQueue = []; + this.$recvQueue = []; + this.$closed = false; +}; +var $chanNil = new $Chan(null, 0); +$chanNil.$sendQueue = $chanNil.$recvQueue = { length: 0, push: function() {}, shift: function() { return undefined; }, indexOf: function() { return -1; } }; + +var $funcTypes = {}; +var $funcType = function(params, results, variadic) { + var typeKey = $mapArray(params, function(p) { return p.id; }).join(",") + "$" + $mapArray(results, function(r) { return r.id; }).join(",") + "$" + variadic; + var typ = $funcTypes[typeKey]; + if (typ === undefined) { + var paramTypes = $mapArray(params, function(p) { return p.string; }); + if (variadic) { + paramTypes[paramTypes.length - 1] = "..." + paramTypes[paramTypes.length - 1].substr(2); + } + var string = "func(" + paramTypes.join(", ") + ")"; + if (results.length === 1) { + string += " " + results[0].string; + } else if (results.length > 1) { + string += " (" + $mapArray(results, function(r) { return r.string; }).join(", ") + ")"; + } + typ = $newType(4, $kindFunc, string, false, "", false, null); + $funcTypes[typeKey] = typ; + typ.init(params, results, variadic); + } + return typ; +}; + +var $interfaceTypes = {}; +var $interfaceType = function(methods) { + var typeKey = $mapArray(methods, function(m) { return m.pkg + "," + m.name + "," + m.typ.id; }).join("$"); + var typ = $interfaceTypes[typeKey]; + if (typ === undefined) { + var string = "interface {}"; + if (methods.length !== 0) { + string = "interface { " + $mapArray(methods, function(m) { + return (m.pkg !== "" ? m.pkg + "." : "") + m.name + m.typ.string.substr(4); + }).join("; ") + " }"; + } + typ = $newType(8, $kindInterface, string, false, "", false, null); + $interfaceTypes[typeKey] = typ; + typ.init(methods); + } + return typ; +}; +var $emptyInterface = $interfaceType([]); +var $ifaceNil = {}; +var $error = $newType(8, $kindInterface, "error", true, "", false, null); +$error.init([{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]); + +var $mapTypes = {}; +var $mapType = function(key, elem) { + var typeKey = key.id + "$" + elem.id; + var typ = $mapTypes[typeKey]; + if (typ === undefined) { + typ = $newType(4, $kindMap, "map[" + key.string + "]" + elem.string, false, "", false, null); + $mapTypes[typeKey] = typ; + typ.init(key, elem); + } + return typ; +}; +var $makeMap = function(keyForFunc, entries) { + var m = {}; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + m[keyForFunc(e.k)] = e; + } + return m; +}; + +var $ptrType = function(elem) { + var typ = elem.ptr; + if (typ === undefined) { + typ = $newType(4, $kindPtr, "*" + elem.string, false, "", elem.exported, null); + elem.ptr = typ; + typ.init(elem); + } + return typ; +}; + +var $newDataPointer = function(data, constructor) { + if (constructor.elem.kind === $kindStruct) { + return data; + } + return new constructor(function() { return data; }, function(v) { data = v; }); +}; + +var $indexPtr = function(array, index, constructor) { + if (array.buffer) { + // Pointers to the same underlying ArrayBuffer share cache. + var cache = array.buffer.$ptr = array.buffer.$ptr || {}; + // Pointers of different primitive types are non-comparable and stored in different caches. + var typeCache = cache[array.name] = cache[array.name] || {}; + var cacheIdx = array.BYTES_PER_ELEMENT * index + array.byteOffset; + return typeCache[cacheIdx] || (typeCache[cacheIdx] = new constructor(function() { return array[index]; }, function(v) { array[index] = v; })); + } else { + array.$ptr = array.$ptr || {}; + return array.$ptr[index] || (array.$ptr[index] = new constructor(function() { return array[index]; }, function(v) { array[index] = v; })); + } +}; + +var $sliceType = function(elem) { + var typ = elem.slice; + if (typ === undefined) { + typ = $newType(12, $kindSlice, "[]" + elem.string, false, "", false, null); + elem.slice = typ; + typ.init(elem); + } + return typ; +}; +var $makeSlice = function(typ, length, capacity) { + capacity = capacity || length; + if (length < 0 || length > 2147483647) { + $throwRuntimeError("makeslice: len out of range"); + } + if (capacity < 0 || capacity < length || capacity > 2147483647) { + $throwRuntimeError("makeslice: cap out of range"); + } + var array = new typ.nativeArray(capacity); + if (typ.nativeArray === Array) { + for (var i = 0; i < capacity; i++) { + array[i] = typ.elem.zero(); + } + } + var slice = new typ(array); + slice.$length = length; + return slice; +}; + +var $structTypes = {}; +var $structType = function(pkgPath, fields) { + var typeKey = $mapArray(fields, function(f) { return f.name + "," + f.typ.id + "," + f.tag; }).join("$"); + var typ = $structTypes[typeKey]; + if (typ === undefined) { + var string = "struct { " + $mapArray(fields, function(f) { + var str = f.typ.string + (f.tag !== "" ? (" \"" + f.tag.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"") : ""); + if (f.embedded) { + return str; + } + return f.name + " " + str; + }).join("; ") + " }"; + if (fields.length === 0) { + string = "struct {}"; + } + typ = $newType(0, $kindStruct, string, false, "", false, function() { + this.$val = this; + for (var i = 0; i < fields.length; i++) { + var f = fields[i]; + if (f.name == '_') { + continue; + } + var arg = arguments[i]; + this[f.prop] = arg !== undefined ? arg : f.typ.zero(); + } + }); + $structTypes[typeKey] = typ; + typ.init(pkgPath, fields); + } + return typ; +}; + +var $assertType = function(value, type, returnTuple) { + var isInterface = (type.kind === $kindInterface), ok, missingMethod = ""; + if (value === $ifaceNil) { + ok = false; + } else if (!isInterface) { + ok = value.constructor === type; + } else { + var valueTypeString = value.constructor.string; + ok = type.implementedBy[valueTypeString]; + if (ok === undefined) { + ok = true; + var valueMethodSet = $methodSet(value.constructor); + var interfaceMethods = type.methods; + for (var i = 0; i < interfaceMethods.length; i++) { + var tm = interfaceMethods[i]; + var found = false; + for (var j = 0; j < valueMethodSet.length; j++) { + var vm = valueMethodSet[j]; + if (vm.name === tm.name && vm.pkg === tm.pkg && vm.typ === tm.typ) { + found = true; + break; + } + } + if (!found) { + ok = false; + type.missingMethodFor[valueTypeString] = tm.name; + break; + } + } + type.implementedBy[valueTypeString] = ok; + } + if (!ok) { + missingMethod = type.missingMethodFor[valueTypeString]; + } + } + + if (!ok) { + if (returnTuple) { + return [type.zero(), false]; + } + $panic(new $packages["runtime"].TypeAssertionError.ptr( + $packages["runtime"]._type.ptr.nil, + (value === $ifaceNil ? $packages["runtime"]._type.ptr.nil : new $packages["runtime"]._type.ptr(value.constructor.string)), + new $packages["runtime"]._type.ptr(type.string), + missingMethod)); + } + + if (!isInterface) { + value = value.$val; + } + if (type === $jsObjectPtr) { + value = value.object; + } + return returnTuple ? [value, true] : value; +}; + +var $stackDepthOffset = 0; +var $getStackDepth = function() { + var err = new Error(); + if (err.stack === undefined) { + return undefined; + } + return $stackDepthOffset + err.stack.split("\n").length; +}; + +var $panicStackDepth = null, $panicValue; +var $callDeferred = function(deferred, jsErr, fromPanic) { + if (!fromPanic && deferred !== null && $curGoroutine.deferStack.indexOf(deferred) == -1) { + throw jsErr; + } + if (jsErr !== null) { + var newErr = null; + try { + $panic(new $jsErrorPtr(jsErr)); + } catch (err) { + newErr = err; + } + $callDeferred(deferred, newErr); + return; + } + if ($curGoroutine.asleep) { + return; + } + + $stackDepthOffset--; + var outerPanicStackDepth = $panicStackDepth; + var outerPanicValue = $panicValue; + + var localPanicValue = $curGoroutine.panicStack.pop(); + if (localPanicValue !== undefined) { + $panicStackDepth = $getStackDepth(); + $panicValue = localPanicValue; + } + + try { + while (true) { + if (deferred === null) { + deferred = $curGoroutine.deferStack[$curGoroutine.deferStack.length - 1]; + if (deferred === undefined) { + /* The panic reached the top of the stack. Clear it and throw it as a JavaScript error. */ + $panicStackDepth = null; + if (localPanicValue.Object instanceof Error) { + throw localPanicValue.Object; + } + var msg; + if (localPanicValue.constructor === $String) { + msg = localPanicValue.$val; + } else if (localPanicValue.Error !== undefined) { + msg = localPanicValue.Error(); + } else if (localPanicValue.String !== undefined) { + msg = localPanicValue.String(); + } else { + msg = localPanicValue; + } + throw new Error(msg); + } + } + var call = deferred.pop(); + if (call === undefined) { + $curGoroutine.deferStack.pop(); + if (localPanicValue !== undefined) { + deferred = null; + continue; + } + return; + } + var r = call[0].apply(call[2], call[1]); + if (r && r.$blk !== undefined) { + deferred.push([r.$blk, [], r]); + if (fromPanic) { + throw null; + } + return; + } + + if (localPanicValue !== undefined && $panicStackDepth === null) { + /* error was recovered */ + if (fromPanic) { + throw null; + } + return; + } + } + } catch(e) { + // Deferred function threw a JavaScript exception or tries to unwind stack + // to the point where a panic was handled. + if (fromPanic) { + // Re-throw the exception to reach deferral execution call at the end + // of the function. + throw e; + } + // We are at the end of the function, handle the error or re-throw to + // continue unwinding if necessary, or simply stop unwinding if we got far + // enough. + $callDeferred(deferred, e, fromPanic); + } finally { + if (localPanicValue !== undefined) { + if ($panicStackDepth !== null) { + $curGoroutine.panicStack.push(localPanicValue); + } + $panicStackDepth = outerPanicStackDepth; + $panicValue = outerPanicValue; + } + $stackDepthOffset++; + } +}; + +var $panic = function(value) { + $curGoroutine.panicStack.push(value); + $callDeferred(null, null, true); +}; +var $recover = function() { + if ($panicStackDepth === null || ($panicStackDepth !== undefined && $panicStackDepth !== $getStackDepth() - 2)) { + return $ifaceNil; + } + $panicStackDepth = null; + return $panicValue; +}; +var $throw = function(err) { throw err; }; + +var $noGoroutine = { asleep: false, exit: false, deferStack: [], panicStack: [] }; +var $curGoroutine = $noGoroutine, $totalGoroutines = 0, $awakeGoroutines = 0, $checkForDeadlock = true, $exportedFunctions = 0; +var $mainFinished = false; +var $go = function(fun, args) { + $totalGoroutines++; + $awakeGoroutines++; + var $goroutine = function() { + try { + $curGoroutine = $goroutine; + var r = fun.apply(undefined, args); + if (r && r.$blk !== undefined) { + fun = function() { return r.$blk(); }; + args = []; + return; + } + $goroutine.exit = true; + } catch (err) { + if (!$goroutine.exit) { + throw err; + } + } finally { + $curGoroutine = $noGoroutine; + if ($goroutine.exit) { /* also set by runtime.Goexit() */ + $totalGoroutines--; + $goroutine.asleep = true; + } + if ($goroutine.asleep) { + $awakeGoroutines--; + if (!$mainFinished && $awakeGoroutines === 0 && $checkForDeadlock && $exportedFunctions === 0) { + console.error("fatal error: all goroutines are asleep - deadlock!"); + if ($global.process !== undefined) { + $global.process.exit(2); + } + } + } + } + }; + $goroutine.asleep = false; + $goroutine.exit = false; + $goroutine.deferStack = []; + $goroutine.panicStack = []; + $schedule($goroutine); +}; + +var $scheduled = []; +var $runScheduled = function() { + // For nested setTimeout calls browsers enforce 4ms minimum delay. We minimize + // the effect of this penalty by queueing the timer preemptively before we run + // the goroutines, and later cancelling it if it turns out unneeded. See: + // https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#nested_timeouts + var nextRun = setTimeout($runScheduled); + try { + var start = Date.now(); + var r; + while ((r = $scheduled.shift()) !== undefined) { + r(); + // We need to interrupt this loop in order to allow the event loop to + // process timers, IO, etc. However, invoking scheduling through + // setTimeout is ~1000 times more expensive, so we amortize this cost by + // looping until the 4ms minimal delay has elapsed (assuming there are + // scheduled goroutines to run), and then yield to the event loop. + var elapsed = Date.now() - start; + if (elapsed > 4 || elapsed < 0) { break; } + } + } finally { + if ($scheduled.length == 0) { + // Cancel scheduling pass if there's nothing to run. + clearTimeout(nextRun); + } + } +}; + +var $schedule = function(goroutine) { + if (goroutine.asleep) { + goroutine.asleep = false; + $awakeGoroutines++; + } + $scheduled.push(goroutine); + if ($curGoroutine === $noGoroutine) { + $runScheduled(); + } +}; + +var $setTimeout = function(f, t) { + $awakeGoroutines++; + return setTimeout(function() { + $awakeGoroutines--; + f(); + }, t); +}; + +var $block = function() { + if ($curGoroutine === $noGoroutine) { + $throwRuntimeError("cannot block in JavaScript callback, fix by wrapping code in goroutine"); + } + $curGoroutine.asleep = true; +}; + +var $restore = function(context, params) { + if (context !== undefined && context.$blk !== undefined) { + return context; + } + return params; +} + +var $send = function(chan, value) { + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + var queuedRecv = chan.$recvQueue.shift(); + if (queuedRecv !== undefined) { + queuedRecv([value, true]); + return; + } + if (chan.$buffer.length < chan.$capacity) { + chan.$buffer.push(value); + return; + } + + var thisGoroutine = $curGoroutine; + var closedDuringSend; + chan.$sendQueue.push(function(closed) { + closedDuringSend = closed; + $schedule(thisGoroutine); + return value; + }); + $block(); + return { + $blk: function() { + if (closedDuringSend) { + $throwRuntimeError("send on closed channel"); + } + } + }; +}; +var $recv = function(chan) { + var queuedSend = chan.$sendQueue.shift(); + if (queuedSend !== undefined) { + chan.$buffer.push(queuedSend(false)); + } + var bufferedValue = chan.$buffer.shift(); + if (bufferedValue !== undefined) { + return [bufferedValue, true]; + } + if (chan.$closed) { + return [chan.$elem.zero(), false]; + } + + var thisGoroutine = $curGoroutine; + var f = { $blk: function() { return this.value; } }; + var queueEntry = function(v) { + f.value = v; + $schedule(thisGoroutine); + }; + chan.$recvQueue.push(queueEntry); + $block(); + return f; +}; +var $close = function(chan) { + if (chan.$closed) { + $throwRuntimeError("close of closed channel"); + } + chan.$closed = true; + while (true) { + var queuedSend = chan.$sendQueue.shift(); + if (queuedSend === undefined) { + break; + } + queuedSend(true); /* will panic */ + } + while (true) { + var queuedRecv = chan.$recvQueue.shift(); + if (queuedRecv === undefined) { + break; + } + queuedRecv([chan.$elem.zero(), false]); + } +}; +var $select = function(comms) { + var ready = []; + var selection = -1; + for (var i = 0; i < comms.length; i++) { + var comm = comms[i]; + var chan = comm[0]; + switch (comm.length) { + case 0: /* default */ + selection = i; + break; + case 1: /* recv */ + if (chan.$sendQueue.length !== 0 || chan.$buffer.length !== 0 || chan.$closed) { + ready.push(i); + } + break; + case 2: /* send */ + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + if (chan.$recvQueue.length !== 0 || chan.$buffer.length < chan.$capacity) { + ready.push(i); + } + break; + } + } + + if (ready.length !== 0) { + selection = ready[Math.floor(Math.random() * ready.length)]; + } + if (selection !== -1) { + var comm = comms[selection]; + switch (comm.length) { + case 0: /* default */ + return [selection]; + case 1: /* recv */ + return [selection, $recv(comm[0])]; + case 2: /* send */ + $send(comm[0], comm[1]); + return [selection]; + } + } + + var entries = []; + var thisGoroutine = $curGoroutine; + var f = { $blk: function() { return this.selection; } }; + var removeFromQueues = function() { + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + var queue = entry[0]; + var index = queue.indexOf(entry[1]); + if (index !== -1) { + queue.splice(index, 1); + } + } + }; + for (var i = 0; i < comms.length; i++) { + (function(i) { + var comm = comms[i]; + switch (comm.length) { + case 1: /* recv */ + var queueEntry = function(value) { + f.selection = [i, value]; + removeFromQueues(); + $schedule(thisGoroutine); + }; + entries.push([comm[0].$recvQueue, queueEntry]); + comm[0].$recvQueue.push(queueEntry); + break; + case 2: /* send */ + var queueEntry = function() { + if (comm[0].$closed) { + $throwRuntimeError("send on closed channel"); + } + f.selection = [i]; + removeFromQueues(); + $schedule(thisGoroutine); + return comm[1]; + }; + entries.push([comm[0].$sendQueue, queueEntry]); + comm[0].$sendQueue.push(queueEntry); + break; + } + })(i); + } + $block(); + return f; +}; + +var $jsObjectPtr, $jsErrorPtr; + +var $needsExternalization = function(t) { + switch (t.kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindFloat32: + case $kindFloat64: + return false; + default: + return t !== $jsObjectPtr; + } +}; + +var $externalize = function(v, t, makeWrapper) { + if (t === $jsObjectPtr) { + return v; + } + switch (t.kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindFloat32: + case $kindFloat64: + return v; + case $kindInt64: + case $kindUint64: + return $flatten64(v); + case $kindArray: + if ($needsExternalization(t.elem)) { + return $mapArray(v, function(e) { return $externalize(e, t.elem, makeWrapper); }); + } + return v; + case $kindFunc: + return $externalizeFunction(v, t, false, makeWrapper); + case $kindInterface: + if (v === $ifaceNil) { + return null; + } + if (v.constructor === $jsObjectPtr) { + return v.$val.object; + } + return $externalize(v.$val, v.constructor, makeWrapper); + case $kindMap: + var m = {}; + var keys = $keys(v); + for (var i = 0; i < keys.length; i++) { + var entry = v[keys[i]]; + m[$externalize(entry.k, t.key, makeWrapper)] = $externalize(entry.v, t.elem, makeWrapper); + } + return m; + case $kindPtr: + if (v === t.nil) { + return null; + } + return $externalize(v.$get(), t.elem, makeWrapper); + case $kindSlice: + if ($needsExternalization(t.elem)) { + return $mapArray($sliceToNativeArray(v), function(e) { return $externalize(e, t.elem, makeWrapper); }); + } + return $sliceToNativeArray(v); + case $kindString: + if ($isASCII(v)) { + return v; + } + var s = "", r; + for (var i = 0; i < v.length; i += r[1]) { + r = $decodeRune(v, i); + var c = r[0]; + if (c > 0xFFFF) { + var h = Math.floor((c - 0x10000) / 0x400) + 0xD800; + var l = (c - 0x10000) % 0x400 + 0xDC00; + s += String.fromCharCode(h, l); + continue; + } + s += String.fromCharCode(c); + } + return s; + case $kindStruct: + var timePkg = $packages["time"]; + if (timePkg !== undefined && v.constructor === timePkg.Time.ptr) { + var milli = $div64(v.UnixNano(), new $Int64(0, 1000000)); + return new Date($flatten64(milli)); + } + + var noJsObject = {}; + var searchJsObject = function(v, t) { + if (t === $jsObjectPtr) { + return v; + } + switch (t.kind) { + case $kindPtr: + if (v === t.nil) { + return noJsObject; + } + return searchJsObject(v.$get(), t.elem); + case $kindStruct: + var f = t.fields[0]; + return searchJsObject(v[f.prop], f.typ); + case $kindInterface: + return searchJsObject(v.$val, v.constructor); + default: + return noJsObject; + } + }; + var o = searchJsObject(v, t); + if (o !== noJsObject) { + return o; + } + + if (makeWrapper !== undefined) { + return makeWrapper(v); + } + + o = {}; + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + if (!f.exported) { + continue; + } + o[f.name] = $externalize(v[f.prop], f.typ, makeWrapper); + } + return o; + } + $throwRuntimeError("cannot externalize " + t.string); +}; + +var $externalizeFunction = function(v, t, passThis, makeWrapper) { + if (v === $throwNilPointerError) { + return null; + } + if (v.$externalizeWrapper === undefined) { + $checkForDeadlock = false; + v.$externalizeWrapper = function() { + var args = []; + for (var i = 0; i < t.params.length; i++) { + if (t.variadic && i === t.params.length - 1) { + var vt = t.params[i].elem, varargs = []; + for (var j = i; j < arguments.length; j++) { + varargs.push($internalize(arguments[j], vt, makeWrapper)); + } + args.push(new (t.params[i])(varargs)); + break; + } + args.push($internalize(arguments[i], t.params[i], makeWrapper)); + } + var result = v.apply(passThis ? this : undefined, args); + switch (t.results.length) { + case 0: + return; + case 1: + return $externalize($copyIfRequired(result, t.results[0]), t.results[0], makeWrapper); + default: + for (var i = 0; i < t.results.length; i++) { + result[i] = $externalize($copyIfRequired(result[i], t.results[i]), t.results[i], makeWrapper); + } + return result; + } + }; + } + return v.$externalizeWrapper; +}; + +var $internalize = function(v, t, recv, seen, makeWrapper) { + if (t === $jsObjectPtr) { + return v; + } + if (t === $jsObjectPtr.elem) { + $throwRuntimeError("cannot internalize js.Object, use *js.Object instead"); + } + if (v && v.__internal_object__ !== undefined) { + return $assertType(v.__internal_object__, t, false); + } + var timePkg = $packages["time"]; + if (timePkg !== undefined && t === timePkg.Time) { + if (!(v !== null && v !== undefined && v.constructor === Date)) { + $throwRuntimeError("cannot internalize time.Time from " + typeof v + ", must be Date"); + } + return timePkg.Unix(new $Int64(0, 0), new $Int64(0, v.getTime() * 1000000)); + } + + // Cache for values we've already internalized in order to deal with circular + // references. + if (seen === undefined) { seen = new Map(); } + if (!seen.has(t)) { seen.set(t, new Map()); } + if (seen.get(t).has(v)) { return seen.get(t).get(v); } + + switch (t.kind) { + case $kindBool: + return !!v; + case $kindInt: + return parseInt(v); + case $kindInt8: + return parseInt(v) << 24 >> 24; + case $kindInt16: + return parseInt(v) << 16 >> 16; + case $kindInt32: + return parseInt(v) >> 0; + case $kindUint: + return parseInt(v); + case $kindUint8: + return parseInt(v) << 24 >>> 24; + case $kindUint16: + return parseInt(v) << 16 >>> 16; + case $kindUint32: + case $kindUintptr: + return parseInt(v) >>> 0; + case $kindInt64: + case $kindUint64: + return new t(0, v); + case $kindFloat32: + case $kindFloat64: + return parseFloat(v); + case $kindArray: + if (v.length !== t.len) { + $throwRuntimeError("got array with wrong size from JavaScript native"); + } + return $mapArray(v, function(e) { return $internalize(e, t.elem, makeWrapper); }); + case $kindFunc: + return function() { + var args = []; + for (var i = 0; i < t.params.length; i++) { + if (t.variadic && i === t.params.length - 1) { + var vt = t.params[i].elem, varargs = arguments[i]; + for (var j = 0; j < varargs.$length; j++) { + args.push($externalize(varargs.$array[varargs.$offset + j], vt, makeWrapper)); + } + break; + } + args.push($externalize(arguments[i], t.params[i], makeWrapper)); + } + var result = v.apply(recv, args); + switch (t.results.length) { + case 0: + return; + case 1: + return $internalize(result, t.results[0], makeWrapper); + default: + for (var i = 0; i < t.results.length; i++) { + result[i] = $internalize(result[i], t.results[i], makeWrapper); + } + return result; + } + }; + case $kindInterface: + if (t.methods.length !== 0) { + $throwRuntimeError("cannot internalize " + t.string); + } + if (v === null) { + return $ifaceNil; + } + if (v === undefined) { + return new $jsObjectPtr(undefined); + } + switch (v.constructor) { + case Int8Array: + return new ($sliceType($Int8))(v); + case Int16Array: + return new ($sliceType($Int16))(v); + case Int32Array: + return new ($sliceType($Int))(v); + case Uint8Array: + return new ($sliceType($Uint8))(v); + case Uint16Array: + return new ($sliceType($Uint16))(v); + case Uint32Array: + return new ($sliceType($Uint))(v); + case Float32Array: + return new ($sliceType($Float32))(v); + case Float64Array: + return new ($sliceType($Float64))(v); + case Array: + return $internalize(v, $sliceType($emptyInterface), makeWrapper); + case Boolean: + return new $Bool(!!v); + case Date: + if (timePkg === undefined) { + /* time package is not present, internalize as &js.Object{Date} so it can be externalized into original Date. */ + return new $jsObjectPtr(v); + } + return new timePkg.Time($internalize(v, timePkg.Time, makeWrapper)); + case (function () { }).constructor: // is usually Function, but in Chrome extensions it is something else + var funcType = $funcType([$sliceType($emptyInterface)], [$jsObjectPtr], true); + return new funcType($internalize(v, funcType, makeWrapper)); + case Number: + return new $Float64(parseFloat(v)); + case String: + return new $String($internalize(v, $String, makeWrapper)); + default: + if ($global.Node && v instanceof $global.Node) { + return new $jsObjectPtr(v); + } + var mapType = $mapType($String, $emptyInterface); + return new mapType($internalize(v, mapType, recv, seen, makeWrapper)); + } + case $kindMap: + var m = {}; + seen.get(t).set(v, m); + var keys = $keys(v); + for (var i = 0; i < keys.length; i++) { + var k = $internalize(keys[i], t.key, recv, seen, makeWrapper); + m[t.key.keyFor(k)] = { k: k, v: $internalize(v[keys[i]], t.elem, recv, seen, makeWrapper) }; + } + return m; + case $kindPtr: + if (t.elem.kind === $kindStruct) { + return $internalize(v, t.elem, makeWrapper); + } + case $kindSlice: + return new t($mapArray(v, function(e) { return $internalize(e, t.elem, makeWrapper); })); + case $kindString: + v = String(v); + if ($isASCII(v)) { + return v; + } + var s = ""; + var i = 0; + while (i < v.length) { + var h = v.charCodeAt(i); + if (0xD800 <= h && h <= 0xDBFF) { + var l = v.charCodeAt(i + 1); + var c = (h - 0xD800) * 0x400 + l - 0xDC00 + 0x10000; + s += $encodeRune(c); + i += 2; + continue; + } + s += $encodeRune(h); + i++; + } + return s; + case $kindStruct: + var noJsObject = {}; + var searchJsObject = function(t) { + if (t === $jsObjectPtr) { + return v; + } + if (t === $jsObjectPtr.elem) { + $throwRuntimeError("cannot internalize js.Object, use *js.Object instead"); + } + switch (t.kind) { + case $kindPtr: + return searchJsObject(t.elem); + case $kindStruct: + var f = t.fields[0]; + var o = searchJsObject(f.typ); + if (o !== noJsObject) { + var n = new t.ptr(); + n[f.prop] = o; + return n; + } + return noJsObject; + default: + return noJsObject; + } + }; + var o = searchJsObject(t); + if (o !== noJsObject) { + return o; + } + } + $throwRuntimeError("cannot internalize " + t.string); +}; + +var $copyIfRequired = function(v, typ) { + // interface values + if (v && v.constructor && v.constructor.copy) { + return new v.constructor($clone(v.$val, v.constructor)) + } + // array and struct values + if (typ.copy) { + var clone = typ.zero(); + typ.copy(clone, v); + return clone; + } + return v; +} + +/* $isASCII reports whether string s contains only ASCII characters. */ +var $isASCII = function(s) { + for (var i = 0; i < s.length; i++) { + if (s.charCodeAt(i) >= 128) { + return false; + } + } + return true; +}; + +$packages["github.com/gopherjs/gopherjs/js"] = (function() { + var $pkg = {}, $init, Object, Error, M, sliceType, ptrType, sliceType$2, funcType, funcType$1, funcType$2, ptrType$1, MakeWrapper, MakeFullWrapper, init; + Object = $pkg.Object = $newType(0, $kindStruct, "js.Object", true, "github.com/gopherjs/gopherjs/js", true, function(object_) { + this.$val = this; + if (arguments.length === 0) { + this.object = null; + return; + } + this.object = object_; + }); + Error = $pkg.Error = $newType(0, $kindStruct, "js.Error", true, "github.com/gopherjs/gopherjs/js", true, function(Object_) { + this.$val = this; + if (arguments.length === 0) { + this.Object = null; + return; + } + this.Object = Object_; + }); + M = $pkg.M = $newType(4, $kindMap, "js.M", true, "github.com/gopherjs/gopherjs/js", true, null); + sliceType = $sliceType($emptyInterface); + ptrType = $ptrType(Object); + sliceType$2 = $sliceType(ptrType); + funcType = $funcType([sliceType$2], [ptrType], true); + funcType$1 = $funcType([], [ptrType], false); + funcType$2 = $funcType([ptrType], [], false); + ptrType$1 = $ptrType(Error); + Object.ptr.prototype.Get = function(key) { + var key, o; + o = this; + return o.object[$externalize(key, $String)]; + }; + Object.prototype.Get = function(key) { return this.$val.Get(key); }; + Object.ptr.prototype.Set = function(key, value) { + var key, o, value; + o = this; + o.object[$externalize(key, $String)] = $externalize(value, $emptyInterface); + }; + Object.prototype.Set = function(key, value) { return this.$val.Set(key, value); }; + Object.ptr.prototype.Delete = function(key) { + var key, o; + o = this; + delete o.object[$externalize(key, $String)]; + }; + Object.prototype.Delete = function(key) { return this.$val.Delete(key); }; + Object.ptr.prototype.Length = function() { + var o; + o = this; + return $parseInt(o.object.length); + }; + Object.prototype.Length = function() { return this.$val.Length(); }; + Object.ptr.prototype.Index = function(i) { + var i, o; + o = this; + return o.object[i]; + }; + Object.prototype.Index = function(i) { return this.$val.Index(i); }; + Object.ptr.prototype.SetIndex = function(i, value) { + var i, o, value; + o = this; + o.object[i] = $externalize(value, $emptyInterface); + }; + Object.prototype.SetIndex = function(i, value) { return this.$val.SetIndex(i, value); }; + Object.ptr.prototype.Call = function(name, args) { + var args, name, o, obj; + o = this; + return (obj = o.object, obj[$externalize(name, $String)].apply(obj, $externalize(args, sliceType))); + }; + Object.prototype.Call = function(name, args) { return this.$val.Call(name, args); }; + Object.ptr.prototype.Invoke = function(args) { + var args, o; + o = this; + return o.object.apply(undefined, $externalize(args, sliceType)); + }; + Object.prototype.Invoke = function(args) { return this.$val.Invoke(args); }; + Object.ptr.prototype.New = function(args) { + var args, o; + o = this; + return new ($global.Function.prototype.bind.apply(o.object, [undefined].concat($externalize(args, sliceType)))); + }; + Object.prototype.New = function(args) { return this.$val.New(args); }; + Object.ptr.prototype.Bool = function() { + var o; + o = this; + return !!(o.object); + }; + Object.prototype.Bool = function() { return this.$val.Bool(); }; + Object.ptr.prototype.String = function() { + var o; + o = this; + return $internalize(o.object, $String); + }; + Object.prototype.String = function() { return this.$val.String(); }; + Object.ptr.prototype.Int = function() { + var o; + o = this; + return $parseInt(o.object) >> 0; + }; + Object.prototype.Int = function() { return this.$val.Int(); }; + Object.ptr.prototype.Int64 = function() { + var o; + o = this; + return $internalize(o.object, $Int64); + }; + Object.prototype.Int64 = function() { return this.$val.Int64(); }; + Object.ptr.prototype.Uint64 = function() { + var o; + o = this; + return $internalize(o.object, $Uint64); + }; + Object.prototype.Uint64 = function() { return this.$val.Uint64(); }; + Object.ptr.prototype.Float = function() { + var o; + o = this; + return $parseFloat(o.object); + }; + Object.prototype.Float = function() { return this.$val.Float(); }; + Object.ptr.prototype.Interface = function() { + var o; + o = this; + return $internalize(o.object, $emptyInterface); + }; + Object.prototype.Interface = function() { return this.$val.Interface(); }; + Object.ptr.prototype.Unsafe = function() { + var o; + o = this; + return o.object; + }; + Object.prototype.Unsafe = function() { return this.$val.Unsafe(); }; + Error.ptr.prototype.Error = function() { + var err; + err = this; + return "JavaScript error: " + $internalize(err.Object.message, $String); + }; + Error.prototype.Error = function() { return this.$val.Error(); }; + Error.ptr.prototype.Stack = function() { + var err; + err = this; + return $internalize(err.Object.stack, $String); + }; + Error.prototype.Stack = function() { return this.$val.Stack(); }; + MakeWrapper = function(i) { + var i, i$1, m, methods, o, v; + v = i; + o = new ($global.Object)(); + o.__internal_object__ = v; + methods = v.constructor.methods; + i$1 = 0; + while (true) { + if (!(i$1 < $parseInt(methods.length))) { break; } + m = [m]; + m[0] = methods[i$1]; + if (!($internalize(m[0].pkg, $String) === "")) { + i$1 = i$1 + (1) >> 0; + continue; + } + o[$externalize($internalize(m[0].name, $String), $String)] = $externalize((function(m) { return function(args) { + var args; + return $externalizeFunction(v[$externalize($internalize(m[0].prop, $String), $String)], m[0].typ, $externalize(true, $Bool)).apply(v, $externalize(args, sliceType$2)); + }; })(m), funcType); + i$1 = i$1 + (1) >> 0; + } + return o; + }; + $pkg.MakeWrapper = MakeWrapper; + MakeFullWrapper = function(i) { + var {constructor, defineProperty, e, f, fields, i, i$1, i$2, i$3, internalObj, m, methods, ms, pkg, pkgTyp, ptr, typ, wrapperObj, $s, $r, $c} = $restore(this, {i}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + internalObj = [internalObj]; + wrapperObj = [wrapperObj]; + internalObj[0] = i; + constructor = internalObj[0].constructor; + wrapperObj[0] = new ($global.Object)(); + defineProperty = (function(internalObj, wrapperObj) { return function(key, descriptor) { + var descriptor, key; + $global.Object.defineProperty(wrapperObj[0], $externalize(key, $String), $externalize(descriptor, M)); + }; })(internalObj, wrapperObj); + $r = defineProperty("__internal_object__", $makeMap($String.keyFor, [{ k: "value", v: new $jsObjectPtr(internalObj[0]) }])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + typ = $internalize(constructor.string, $String); + pkg = $internalize(constructor.pkg, $String); + ptr = ""; + if (typ.charCodeAt(0) === 42) { + ptr = "*"; + } + i$1 = 0; + while (true) { + if (!(i$1 < typ.length)) { break; } + if (typ.charCodeAt(i$1) === 46) { + typ = $substring(typ, (i$1 + 1 >> 0)); + break; + } + i$1 = i$1 + (1) >> 0; + } + pkgTyp = pkg + "." + ptr + typ; + $r = defineProperty("$type", $makeMap($String.keyFor, [{ k: "value", v: new $String(pkgTyp) }])); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + fields = null; + methods = new ($global.Array)(); + ms = constructor.methods; + if (!(ms === undefined)) { + methods = methods.concat(ms); + } + e = constructor.elem; + if (!(e === undefined)) { + fields = e.fields; + methods = methods.concat(e.methods); + } else { + fields = constructor.fields; + } + i$2 = 0; + /* while (true) { */ case 3: + /* if (!(i$2 < $parseInt(methods.length))) { break; } */ if(!(i$2 < $parseInt(methods.length))) { $s = 4; continue; } + m = [m]; + m[0] = methods[i$2]; + if (!($internalize(m[0].pkg, $String) === "")) { + i$2 = i$2 + (1) >> 0; + /* continue; */ $s = 3; continue; + } + $r = defineProperty($internalize(m[0].prop, $String), $makeMap($String.keyFor, [{ k: "value", v: new funcType((function(internalObj, m, wrapperObj) { return function(args) { + var args; + return $externalizeFunction(internalObj[0][$externalize($internalize(m[0].prop, $String), $String)], m[0].typ, $externalize(true, $Bool), MakeFullWrapper).apply(internalObj[0], $externalize(args, sliceType$2)); + }; })(internalObj, m, wrapperObj)) }])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i$2 = i$2 + (1) >> 0; + $s = 3; continue; + case 4: + /* */ if (!(fields === undefined)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (!(fields === undefined)) { */ case 6: + i$3 = 0; + /* while (true) { */ case 8: + /* if (!(i$3 < $parseInt(fields.length))) { break; } */ if(!(i$3 < $parseInt(fields.length))) { $s = 9; continue; } + f = [f]; + f[0] = fields[i$3]; + if (!!!(f[0].exported)) { + i$3 = i$3 + (1) >> 0; + /* continue; */ $s = 8; continue; + } + $r = defineProperty($internalize(f[0].prop, $String), $makeMap($String.keyFor, [{ k: "get", v: new funcType$1((function(f, internalObj, wrapperObj) { return function() { + var vc; + vc = $copyIfRequired(internalObj[0].$val[$externalize($internalize(f[0].prop, $String), $String)], f[0].typ); + return $externalize(vc, f[0].typ, MakeFullWrapper); + }; })(f, internalObj, wrapperObj)) }, { k: "set", v: new funcType$2((function(f, internalObj, wrapperObj) { return function(jv) { + var gv, jv; + gv = $internalize(jv, f[0].typ, MakeFullWrapper); + internalObj[0].$val[$externalize($internalize(f[0].prop, $String), $String)] = gv; + }; })(f, internalObj, wrapperObj)) }])); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + i$3 = i$3 + (1) >> 0; + $s = 8; continue; + case 9: + /* } */ case 7: + $s = -1; return wrapperObj[0]; + /* */ } return; } var $f = {$blk: MakeFullWrapper, $c: true, $r, constructor, defineProperty, e, f, fields, i, i$1, i$2, i$3, internalObj, m, methods, ms, pkg, pkgTyp, ptr, typ, wrapperObj, $s};return $f; + }; + $pkg.MakeFullWrapper = MakeFullWrapper; + init = function() { + var e; + e = new Error.ptr(null); + $unused(e); + }; + ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [ptrType], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $emptyInterface], [], false)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Length", name: "Length", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [ptrType], false)}, {prop: "SetIndex", name: "SetIndex", pkg: "", typ: $funcType([$Int, $emptyInterface], [], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([$String, sliceType], [ptrType], true)}, {prop: "Invoke", name: "Invoke", pkg: "", typ: $funcType([sliceType], [ptrType], true)}, {prop: "New", name: "New", pkg: "", typ: $funcType([sliceType], [ptrType], true)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Unsafe", name: "Unsafe", pkg: "", typ: $funcType([], [$Uintptr], false)}]; + ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Stack", name: "Stack", pkg: "", typ: $funcType([], [$String], false)}]; + Object.init("github.com/gopherjs/gopherjs/js", [{prop: "object", name: "object", embedded: false, exported: false, typ: ptrType, tag: ""}]); + Error.init("", [{prop: "Object", name: "Object", embedded: true, exported: true, typ: ptrType, tag: ""}]); + M.init($String, $emptyInterface); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["runtime"] = (function() { + var $pkg = {}, $init, js, _type, TypeAssertionError, errorString, ptrType$1, ptrType$2, buildVersion, init, throw$1; + js = $packages["github.com/gopherjs/gopherjs/js"]; + _type = $pkg._type = $newType(0, $kindStruct, "runtime._type", true, "runtime", false, function(str_) { + this.$val = this; + if (arguments.length === 0) { + this.str = ""; + return; + } + this.str = str_; + }); + TypeAssertionError = $pkg.TypeAssertionError = $newType(0, $kindStruct, "runtime.TypeAssertionError", true, "runtime", true, function(_interface_, concrete_, asserted_, missingMethod_) { + this.$val = this; + if (arguments.length === 0) { + this._interface = ptrType$1.nil; + this.concrete = ptrType$1.nil; + this.asserted = ptrType$1.nil; + this.missingMethod = ""; + return; + } + this._interface = _interface_; + this.concrete = concrete_; + this.asserted = asserted_; + this.missingMethod = missingMethod_; + }); + errorString = $pkg.errorString = $newType(8, $kindString, "runtime.errorString", true, "runtime", false, null); + ptrType$1 = $ptrType(_type); + ptrType$2 = $ptrType(TypeAssertionError); + _type.ptr.prototype.string = function() { + var t; + t = this; + return t.str; + }; + _type.prototype.string = function() { return this.$val.string(); }; + _type.ptr.prototype.pkgpath = function() { + var t; + t = this; + return ""; + }; + _type.prototype.pkgpath = function() { return this.$val.pkgpath(); }; + TypeAssertionError.ptr.prototype.RuntimeError = function() { + }; + TypeAssertionError.prototype.RuntimeError = function() { return this.$val.RuntimeError(); }; + TypeAssertionError.ptr.prototype.Error = function() { + var as, cs, e, inter, msg; + e = this; + inter = "interface"; + if (!(e._interface === ptrType$1.nil)) { + inter = e._interface.string(); + } + as = e.asserted.string(); + if (e.concrete === ptrType$1.nil) { + return "interface conversion: " + inter + " is nil, not " + as; + } + cs = e.concrete.string(); + if (e.missingMethod === "") { + msg = "interface conversion: " + inter + " is " + cs + ", not " + as; + if (cs === as) { + if (!(e.concrete.pkgpath() === e.asserted.pkgpath())) { + msg = msg + (" (types from different packages)"); + } else { + msg = msg + (" (types from different scopes)"); + } + } + return msg; + } + return "interface conversion: " + cs + " is not " + as + ": missing method " + e.missingMethod; + }; + TypeAssertionError.prototype.Error = function() { return this.$val.Error(); }; + init = function() { + var e, jsPkg; + jsPkg = $packages[$externalize("github.com/gopherjs/gopherjs/js", $String)]; + $jsObjectPtr = jsPkg.Object.ptr; + $jsErrorPtr = jsPkg.Error.ptr; + $throwRuntimeError = throw$1; + buildVersion = $internalize($goVersion, $String); + e = $ifaceNil; + e = new TypeAssertionError.ptr(ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ""); + $unused(e); + }; + errorString.prototype.RuntimeError = function() { + var e; + e = this.$val; + }; + $ptrType(errorString).prototype.RuntimeError = function() { return new errorString(this.$get()).RuntimeError(); }; + errorString.prototype.Error = function() { + var e; + e = this.$val; + return "runtime error: " + (e); + }; + $ptrType(errorString).prototype.Error = function() { return new errorString(this.$get()).Error(); }; + throw$1 = function(s) { + var s; + $panic(new errorString((s))); + }; + ptrType$1.methods = [{prop: "string", name: "string", pkg: "runtime", typ: $funcType([], [$String], false)}, {prop: "pkgpath", name: "pkgpath", pkg: "runtime", typ: $funcType([], [$String], false)}]; + ptrType$2.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + errorString.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + _type.init("runtime", [{prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}]); + TypeAssertionError.init("runtime", [{prop: "_interface", name: "_interface", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "concrete", name: "concrete", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "asserted", name: "asserted", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "missingMethod", name: "missingMethod", embedded: false, exported: false, typ: $String, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + buildVersion = ""; + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["math/bits"] = (function() { + var $pkg = {}, $init; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["math"] = (function() { + var $pkg = {}, $init, js, bits, arrayType, arrayType$1, arrayType$2, structType, math, _zero, posInf, negInf, nan, buf, max, min, Abs, Cos, Floor, Inf, IsInf, IsNaN, Max, Min, NaN, Pow, Signbit, Sin, Sqrt, init, Float64bits, Float64frombits; + js = $packages["github.com/gopherjs/gopherjs/js"]; + bits = $packages["math/bits"]; + arrayType = $arrayType($Uint32, 2); + arrayType$1 = $arrayType($Float32, 2); + arrayType$2 = $arrayType($Float64, 1); + structType = $structType("math", [{prop: "uint32array", name: "uint32array", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "float32array", name: "float32array", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "float64array", name: "float64array", embedded: false, exported: false, typ: arrayType$2, tag: ""}]); + max = function(x, y) { + var x, y; + if (IsInf(x, 1) || IsInf(y, 1)) { + return Inf(1); + } else if (IsNaN(x) || IsNaN(y)) { + return NaN(); + } else if ((x === 0) && (x === y)) { + if (Signbit(x)) { + return y; + } + return x; + } + if (x > y) { + return x; + } + return y; + }; + min = function(x, y) { + var x, y; + if (IsInf(x, -1) || IsInf(y, -1)) { + return Inf(-1); + } else if (IsNaN(x) || IsNaN(y)) { + return NaN(); + } else if ((x === 0) && (x === y)) { + if (Signbit(x)) { + return x; + } + return y; + } + if (x < y) { + return x; + } + return y; + }; + Abs = function(x) { + var x, x$1; + return Float64frombits((x$1 = Float64bits(x), new $Uint64(x$1.$high & ~2147483648, (x$1.$low & ~0) >>> 0))); + }; + $pkg.Abs = Abs; + Cos = function(x) { + var x; + return $parseFloat(math.cos(x)); + }; + $pkg.Cos = Cos; + Floor = function(x) { + var x; + return $parseFloat(math.floor(x)); + }; + $pkg.Floor = Floor; + Inf = function(sign) { + var sign; + if (sign >= 0) { + return posInf; + } else { + return negInf; + } + }; + $pkg.Inf = Inf; + IsInf = function(f, sign) { + var f, sign; + if (f === posInf) { + return sign >= 0; + } + if (f === negInf) { + return sign <= 0; + } + return false; + }; + $pkg.IsInf = IsInf; + IsNaN = function(f) { + var f, is; + is = false; + is = !((f === f)); + return is; + }; + $pkg.IsNaN = IsNaN; + Max = function(x, y) { + var x, y; + return max(x, y); + }; + $pkg.Max = Max; + Min = function(x, y) { + var x, y; + return min(x, y); + }; + $pkg.Min = Min; + NaN = function() { + return nan; + }; + $pkg.NaN = NaN; + Pow = function(x, y) { + var x, y; + if ((x === 1) || ((x === -1) && ((y === posInf) || (y === negInf)))) { + return 1; + } + return $parseFloat(math.pow(x, y)); + }; + $pkg.Pow = Pow; + Signbit = function(x) { + var x; + return x < 0 || (1 / x === negInf); + }; + $pkg.Signbit = Signbit; + Sin = function(x) { + var x; + return $parseFloat(math.sin(x)); + }; + $pkg.Sin = Sin; + Sqrt = function(x) { + var x; + return $parseFloat(math.sqrt(x)); + }; + $pkg.Sqrt = Sqrt; + init = function() { + var ab; + ab = new ($global.ArrayBuffer)(8); + buf.uint32array = new ($global.Uint32Array)(ab); + buf.float32array = new ($global.Float32Array)(ab); + buf.float64array = new ($global.Float64Array)(ab); + }; + Float64bits = function(f) { + var f, x, x$1; + buf.float64array[0] = f; + return (x = $shiftLeft64((new $Uint64(0, buf.uint32array[1])), 32), x$1 = (new $Uint64(0, buf.uint32array[0])), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); + }; + $pkg.Float64bits = Float64bits; + Float64frombits = function(b) { + var b; + buf.uint32array[0] = ((b.$low >>> 0)); + buf.uint32array[1] = (($shiftRightUint64(b, 32).$low >>> 0)); + return buf.float64array[0]; + }; + $pkg.Float64frombits = Float64frombits; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = bits.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + buf = new structType.ptr(arrayType.zero(), arrayType$1.zero(), arrayType$2.zero()); + math = $global.Math; + _zero = 0; + posInf = 1 / _zero; + negInf = -1 / _zero; + nan = $parseFloat($NaN); + init(); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["resolv"] = (function() { + var $pkg = {}, $init, math, Vector, Axis, Space, Shape, Line, ConvexPolygon, ContactSet, Circle, Projection, Object, Collision, Cell, sliceType, ptrType, sliceType$1, sliceType$2, ptrType$1, ptrType$2, sliceType$3, sliceType$4, ptrType$3, sliceType$5, ptrType$4, ptrType$5, ptrType$6, sliceType$6, ptrType$7, sliceType$7, mapType, Dot, NewSpace, NewLine, NewConvexPolygon, NewContactSet, NewRectangle, NewCircle, NewObject, axpyUnitaryTo, scalUnitaryTo, NewCollision, newCell; + math = $packages["math"]; + Vector = $pkg.Vector = $newType(12, $kindSlice, "resolv.Vector", true, "resolv", true, null); + Axis = $pkg.Axis = $newType(4, $kindInt, "resolv.Axis", true, "resolv", true, null); + Space = $pkg.Space = $newType(0, $kindStruct, "resolv.Space", true, "resolv", true, function(Cells_, CellWidth_, CellHeight_) { + this.$val = this; + if (arguments.length === 0) { + this.Cells = sliceType$2.nil; + this.CellWidth = 0; + this.CellHeight = 0; + return; + } + this.Cells = Cells_; + this.CellWidth = CellWidth_; + this.CellHeight = CellHeight_; + }); + Shape = $pkg.Shape = $newType(8, $kindInterface, "resolv.Shape", true, "resolv", true, null); + Line = $pkg.Line = $newType(0, $kindStruct, "resolv.Line", true, "resolv", true, function(Start_, End_) { + this.$val = this; + if (arguments.length === 0) { + this.Start = Vector.nil; + this.End = Vector.nil; + return; + } + this.Start = Start_; + this.End = End_; + }); + ConvexPolygon = $pkg.ConvexPolygon = $newType(0, $kindStruct, "resolv.ConvexPolygon", true, "resolv", true, function(Points_, X_, Y_, Closed_) { + this.$val = this; + if (arguments.length === 0) { + this.Points = sliceType$4.nil; + this.X = 0; + this.Y = 0; + this.Closed = false; + return; + } + this.Points = Points_; + this.X = X_; + this.Y = Y_; + this.Closed = Closed_; + }); + ContactSet = $pkg.ContactSet = $newType(0, $kindStruct, "resolv.ContactSet", true, "resolv", true, function(Points_, MTV_, Center_) { + this.$val = this; + if (arguments.length === 0) { + this.Points = sliceType$4.nil; + this.MTV = Vector.nil; + this.Center = Vector.nil; + return; + } + this.Points = Points_; + this.MTV = MTV_; + this.Center = Center_; + }); + Circle = $pkg.Circle = $newType(0, $kindStruct, "resolv.Circle", true, "resolv", true, function(X_, Y_, Radius_) { + this.$val = this; + if (arguments.length === 0) { + this.X = 0; + this.Y = 0; + this.Radius = 0; + return; + } + this.X = X_; + this.Y = Y_; + this.Radius = Radius_; + }); + Projection = $pkg.Projection = $newType(0, $kindStruct, "resolv.Projection", true, "resolv", true, function(Min_, Max_) { + this.$val = this; + if (arguments.length === 0) { + this.Min = 0; + this.Max = 0; + return; + } + this.Min = Min_; + this.Max = Max_; + }); + Object = $pkg.Object = $newType(0, $kindStruct, "resolv.Object", true, "resolv", true, function(Shape_, Space_, X_, Y_, W_, H_, TouchingCells_, Data_, ignoreList_, tags_) { + this.$val = this; + if (arguments.length === 0) { + this.Shape = $ifaceNil; + this.Space = ptrType$1.nil; + this.X = 0; + this.Y = 0; + this.W = 0; + this.H = 0; + this.TouchingCells = sliceType$1.nil; + this.Data = $ifaceNil; + this.ignoreList = false; + this.tags = sliceType$6.nil; + return; + } + this.Shape = Shape_; + this.Space = Space_; + this.X = X_; + this.Y = Y_; + this.W = W_; + this.H = H_; + this.TouchingCells = TouchingCells_; + this.Data = Data_; + this.ignoreList = ignoreList_; + this.tags = tags_; + }); + Collision = $pkg.Collision = $newType(0, $kindStruct, "resolv.Collision", true, "resolv", true, function(checkingObject_, dx_, dy_, Objects_, Cells_) { + this.$val = this; + if (arguments.length === 0) { + this.checkingObject = ptrType$2.nil; + this.dx = 0; + this.dy = 0; + this.Objects = sliceType$3.nil; + this.Cells = sliceType$1.nil; + return; + } + this.checkingObject = checkingObject_; + this.dx = dx_; + this.dy = dy_; + this.Objects = Objects_; + this.Cells = Cells_; + }); + Cell = $pkg.Cell = $newType(0, $kindStruct, "resolv.Cell", true, "resolv", true, function(X_, Y_, Objects_) { + this.$val = this; + if (arguments.length === 0) { + this.X = 0; + this.Y = 0; + this.Objects = sliceType$3.nil; + return; + } + this.X = X_; + this.Y = Y_; + this.Objects = Objects_; + }); + sliceType = $sliceType($Float64); + ptrType = $ptrType(Cell); + sliceType$1 = $sliceType(ptrType); + sliceType$2 = $sliceType(sliceType$1); + ptrType$1 = $ptrType(Space); + ptrType$2 = $ptrType(Object); + sliceType$3 = $sliceType(ptrType$2); + sliceType$4 = $sliceType(Vector); + ptrType$3 = $ptrType(Line); + sliceType$5 = $sliceType(ptrType$3); + ptrType$4 = $ptrType(Circle); + ptrType$5 = $ptrType(ConvexPolygon); + ptrType$6 = $ptrType(ContactSet); + sliceType$6 = $sliceType($String); + ptrType$7 = $ptrType(Collision); + sliceType$7 = $sliceType(Axis); + mapType = $mapType(ptrType$2, $Bool); + Vector.prototype.Clone = function() { + var clone, v; + v = this; + clone = $makeSlice(Vector, v.$length); + $copySlice(clone, v); + return clone; + }; + $ptrType(Vector).prototype.Clone = function() { return this.$get().Clone(); }; + Vector.prototype.Add = function(vs) { + var _i, _ref, dim, i, v, vs; + v = this; + dim = v.$length; + _ref = vs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + if (((i < 0 || i >= vs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + i]).$length > dim) { + axpyUnitaryTo($convertSliceType(v, sliceType), 1, $convertSliceType(v, sliceType), $convertSliceType($subslice(((i < 0 || i >= vs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + i]), 0, dim), sliceType)); + } else { + axpyUnitaryTo($convertSliceType(v, sliceType), 1, $convertSliceType(v, sliceType), $convertSliceType(((i < 0 || i >= vs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + i]), sliceType)); + } + _i++; + } + return v; + }; + $ptrType(Vector).prototype.Add = function(vs) { return this.$get().Add(vs); }; + Vector.prototype.Sub = function(vs) { + var _i, _ref, dim, i, v, vs; + v = this; + dim = v.$length; + _ref = vs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + if (((i < 0 || i >= vs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + i]).$length > dim) { + axpyUnitaryTo($convertSliceType(v, sliceType), -1, $convertSliceType($subslice(((i < 0 || i >= vs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + i]), 0, dim), sliceType), $convertSliceType(v, sliceType)); + } else { + axpyUnitaryTo($convertSliceType(v, sliceType), -1, $convertSliceType(((i < 0 || i >= vs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + i]), sliceType), $convertSliceType(v, sliceType)); + } + _i++; + } + return v; + }; + $ptrType(Vector).prototype.Sub = function(vs) { return this.$get().Sub(vs); }; + Vector.prototype.Scale = function(size) { + var size, v; + v = this; + scalUnitaryTo($convertSliceType(v, sliceType), size, $convertSliceType(v, sliceType)); + return v; + }; + $ptrType(Vector).prototype.Scale = function(size) { return this.$get().Scale(size); }; + Vector.prototype.Equal = function(v2) { + var _i, _ref, i, v, v2; + v = this; + if (!((v.$length === v2.$length))) { + return false; + } + _ref = v; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + if (math.Abs(((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) - ((i < 0 || i >= v2.$length) ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + i])) > 1e-08) { + return false; + } + _i++; + } + return true; + }; + $ptrType(Vector).prototype.Equal = function(v2) { return this.$get().Equal(v2); }; + Vector.prototype.Magnitude = function() { + var v; + v = this; + return math.Sqrt(v.Magnitude2()); + }; + $ptrType(Vector).prototype.Magnitude = function() { return this.$get().Magnitude(); }; + Vector.prototype.Magnitude2 = function() { + var _i, _ref, result, scalar, v; + v = this; + result = 0; + _ref = v; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + scalar = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + result = result + (scalar * scalar); + _i++; + } + return result; + }; + $ptrType(Vector).prototype.Magnitude2 = function() { return this.$get().Magnitude2(); }; + Vector.prototype.Unit = function() { + var _i, _ref, i, l, v; + v = this; + l = v.Magnitude(); + if (l < 1e-08) { + return v; + } + _ref = v; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + ((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i] = ((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) / l); + _i++; + } + return v; + }; + $ptrType(Vector).prototype.Unit = function() { return this.$get().Unit(); }; + Dot = function(v1, v2) { + var _i, _ref, _tmp, _tmp$1, _tmp$2, dim1, dim2, i, result, v1, v2; + _tmp = 0; + _tmp$1 = v1.$length; + _tmp$2 = v2.$length; + result = _tmp; + dim1 = _tmp$1; + dim2 = _tmp$2; + if (dim1 > dim2) { + v2 = $appendSlice(v2, $convertSliceType($makeSlice(Vector, (dim1 - dim2 >> 0)), sliceType)); + } + if (dim1 < dim2) { + v1 = $appendSlice(v1, $convertSliceType($makeSlice(Vector, (dim2 - dim1 >> 0)), sliceType)); + } + _ref = v1; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + result = result + (((i < 0 || i >= v1.$length) ? ($throwRuntimeError("index out of range"), undefined) : v1.$array[v1.$offset + i]) * ((i < 0 || i >= v2.$length) ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + i])); + _i++; + } + return result; + }; + $pkg.Dot = Dot; + Vector.prototype.Dot = function(v2) { + var v, v2; + v = this; + return Dot(v, v2); + }; + $ptrType(Vector).prototype.Dot = function(v2) { return this.$get().Dot(v2); }; + Vector.prototype.Cross = function(v2) { + var v, v2; + v = this; + if (!((v.$length === 3)) || !((v2.$length === 3))) { + return Vector.nil; + } + return new Vector([(1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]) * (2 >= v2.$length ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + 2]) - (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]) * (1 >= v2.$length ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + 1]), (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]) * (0 >= v2.$length ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + 0]) - (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]) * (2 >= v2.$length ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + 2]), (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]) * (2 >= v2.$length ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + 2]) - (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]) * (0 >= v2.$length ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + 0])]); + }; + $ptrType(Vector).prototype.Cross = function(v2) { return this.$get().Cross(v2); }; + Vector.prototype.Rotate = function(angle, as) { + var _1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, angle, as, axis, cos, dim, sin, v, x, y, z, z$1; + v = this; + _tmp = 2; + _tmp$1 = v.$length; + axis = _tmp; + dim = _tmp$1; + if (dim === 0) { + return v; + } + if (as.$length > 0) { + axis = (0 >= as.$length ? ($throwRuntimeError("index out of range"), undefined) : as.$array[as.$offset + 0]); + } + if ((dim === 1) && !((axis === 2))) { + v = $append(v, 0, 0); + } + if ((dim < 2 && (axis === 2)) || ((dim === 2) && !((axis === 2)))) { + v = $append(v, 0); + } + _tmp$2 = (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]); + _tmp$3 = (1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]); + x = _tmp$2; + y = _tmp$3; + _tmp$4 = math.Cos(angle); + _tmp$5 = math.Sin(angle); + cos = _tmp$4; + sin = _tmp$5; + _1 = axis; + if (_1 === (0)) { + z = (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]); + (1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1] = y * cos - z * sin); + (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2] = y * sin + z * cos); + } else if (_1 === (1)) { + z$1 = (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]); + (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0] = x * cos + z$1 * sin); + (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2] = -x * sin + z$1 * cos); + } else if (_1 === (2)) { + (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0] = x * cos - y * sin); + (1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1] = x * sin + y * cos); + } + if (dim > 3) { + return $subslice(v, 0, 3); + } + return v; + }; + $ptrType(Vector).prototype.Rotate = function(angle, as) { return this.$get().Rotate(angle, as); }; + Vector.prototype.X = function() { + var v; + v = this; + if (v.$length < 1) { + return 0; + } + return (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]); + }; + $ptrType(Vector).prototype.X = function() { return this.$get().X(); }; + Vector.prototype.Y = function() { + var v; + v = this; + if (v.$length < 2) { + return 0; + } + return (1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]); + }; + $ptrType(Vector).prototype.Y = function() { return this.$get().Y(); }; + Vector.prototype.Z = function() { + var v; + v = this; + if (v.$length < 3) { + return 0; + } + return (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]); + }; + $ptrType(Vector).prototype.Z = function() { return this.$get().Z(); }; + NewSpace = function(spaceWidth, spaceHeight, cellWidth, cellHeight) { + var _q, _q$1, cellHeight, cellWidth, sp, spaceHeight, spaceWidth; + sp = new Space.ptr(sliceType$2.nil, cellWidth, cellHeight); + sp.Resize((_q = spaceWidth / cellWidth, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), (_q$1 = spaceHeight / cellHeight, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))); + return sp; + }; + $pkg.NewSpace = NewSpace; + Space.ptr.prototype.Add = function(objects) { + var {_i, _ref, obj, objects, sp, $s, $r, $c} = $restore(this, {objects}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + sp = this; + if (sp === ptrType$1.nil) { + $panic(new $String("ERROR: space is nil")); + } + _ref = objects; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + obj = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + obj.Space = sp; + $r = obj.Update(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + _i++; + $s = 1; continue; + case 2: + $s = -1; return; + /* */ } return; } var $f = {$blk: Space.ptr.prototype.Add, $c: true, $r, _i, _ref, obj, objects, sp, $s};return $f; + }; + Space.prototype.Add = function(objects) { return this.$val.Add(objects); }; + Space.ptr.prototype.Remove = function(objects) { + var _i, _i$1, _ref, _ref$1, cell, obj, objects, sp; + sp = this; + if (sp === ptrType$1.nil) { + $panic(new $String("ERROR: space is nil")); + } + _ref = objects; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + obj = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = obj.TouchingCells; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + cell = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + cell.unregister(obj); + _i$1++; + } + obj.TouchingCells = new sliceType$1([]); + obj.Space = ptrType$1.nil; + _i++; + } + }; + Space.prototype.Remove = function(objects) { return this.$val.Remove(objects); }; + Space.ptr.prototype.Objects = function() { + var _entry, _i, _i$1, _i$2, _key, _ref, _ref$1, _ref$2, _tuple, added, cx, cy, o, objects, objectsAdded, sp, x, x$1, x$2; + sp = this; + objectsAdded = $makeMap(ptrType$2.keyFor, []); + objects = new sliceType$3([]); + _ref = sp.Cells; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + cy = _i; + _ref$1 = (x = sp.Cells, ((cy < 0 || cy >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + cy])); + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + cx = _i$1; + _ref$2 = (x$1 = (x$2 = sp.Cells, ((cy < 0 || cy >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + cy])), ((cx < 0 || cx >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + cx])).Objects; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + o = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + _tuple = (_entry = objectsAdded[ptrType$2.keyFor(o)], _entry !== undefined ? [_entry.v, true] : [false, false]); + added = _tuple[1]; + if (!added) { + objects = $append(objects, o); + _key = o; (objectsAdded || $throwRuntimeError("assignment to entry in nil map"))[ptrType$2.keyFor(_key)] = { k: _key, v: true }; + } + _i$2++; + } + _i$1++; + } + _i++; + } + return objects; + }; + Space.prototype.Objects = function() { return this.$val.Objects(); }; + Space.ptr.prototype.Resize = function(width, height) { + var height, sp, width, x, x$1, x$2, y; + sp = this; + sp.Cells = new sliceType$2([]); + y = 0; + while (true) { + if (!(y < height)) { break; } + sp.Cells = $append(sp.Cells, new sliceType$1([])); + x = 0; + while (true) { + if (!(x < width)) { break; } + (x$2 = sp.Cells, ((y < 0 || y >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + y] = $append((x$1 = sp.Cells, ((y < 0 || y >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + y])), newCell(x, y)))); + x = x + (1) >> 0; + } + y = y + (1) >> 0; + } + }; + Space.prototype.Resize = function(width, height) { return this.$val.Resize(width, height); }; + Space.ptr.prototype.Cell = function(x, y) { + var sp, x, x$1, x$2, x$3, y; + sp = this; + if (y >= 0 && y < sp.Cells.$length && x >= 0 && x < (x$1 = sp.Cells, ((y < 0 || y >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + y])).$length) { + return (x$2 = (x$3 = sp.Cells, ((y < 0 || y >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + y])), ((x < 0 || x >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x])); + } + return ptrType.nil; + }; + Space.prototype.Cell = function(x, y) { return this.$val.Cell(x, y); }; + Space.ptr.prototype.CheckCells = function(x, y, w, h, tags) { + var _i, _ref, cell, h, ix, iy, obj, sp, tags, w, x, x$1, y; + sp = this; + ix = x; + while (true) { + if (!(ix < (x + w >> 0))) { break; } + iy = y; + while (true) { + if (!(iy < (y + h >> 0))) { break; } + cell = sp.Cell(ix, iy); + if (!(cell === ptrType.nil)) { + if (tags.$length > 0) { + if (cell.ContainsTags(tags)) { + _ref = cell.Objects; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + obj = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (obj.HasTags(tags)) { + return obj; + } + _i++; + } + } + } else if (cell.Occupied()) { + return (x$1 = cell.Objects, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); + } + } + iy = iy + (1) >> 0; + } + ix = ix + (1) >> 0; + } + return ptrType$2.nil; + }; + Space.prototype.CheckCells = function(x, y, w, h, tags) { return this.$val.CheckCells(x, y, w, h, tags); }; + Space.ptr.prototype.CheckCellsWorld = function(x, y, w, h, tags) { + var _tuple, _tuple$1, ch, cw, h, sp, sx, sy, tags, w, x, y; + sp = this; + _tuple = sp.WorldToSpace(x, y); + sx = _tuple[0]; + sy = _tuple[1]; + _tuple$1 = sp.WorldToSpace(w, h); + cw = _tuple$1[0]; + ch = _tuple$1[1]; + return sp.CheckCells(sx, sy, cw, ch, tags); + }; + Space.prototype.CheckCellsWorld = function(x, y, w, h, tags) { return this.$val.CheckCellsWorld(x, y, w, h, tags); }; + Space.ptr.prototype.UnregisterAllObjects = function() { + var cell, sp, x, x$1, x$2, x$3, y; + sp = this; + y = 0; + while (true) { + if (!(y < sp.Cells.$length)) { break; } + x = 0; + while (true) { + if (!(x < (x$1 = sp.Cells, ((y < 0 || y >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + y])).$length)) { break; } + cell = (x$2 = (x$3 = sp.Cells, ((y < 0 || y >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + y])), ((x < 0 || x >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x])); + sp.Remove(cell.Objects); + x = x + (1) >> 0; + } + y = y + (1) >> 0; + } + }; + Space.prototype.UnregisterAllObjects = function() { return this.$val.UnregisterAllObjects(); }; + Space.ptr.prototype.WorldToSpace = function(x, y) { + var fx, fy, sp, x, y; + sp = this; + fx = ((math.Floor(x / (sp.CellWidth)) >> 0)); + fy = ((math.Floor(y / (sp.CellHeight)) >> 0)); + return [fx, fy]; + }; + Space.prototype.WorldToSpace = function(x, y) { return this.$val.WorldToSpace(x, y); }; + Space.ptr.prototype.SpaceToWorld = function(x, y) { + var fx, fy, sp, x, y; + sp = this; + fx = (($imul(x, sp.CellWidth))); + fy = (($imul(y, sp.CellHeight))); + return [fx, fy]; + }; + Space.prototype.SpaceToWorld = function(x, y) { return this.$val.SpaceToWorld(x, y); }; + Space.ptr.prototype.Height = function() { + var sp; + sp = this; + return sp.Cells.$length; + }; + Space.prototype.Height = function() { return this.$val.Height(); }; + Space.ptr.prototype.Width = function() { + var sp, x; + sp = this; + if (sp.Cells.$length > 0) { + return (x = sp.Cells, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).$length; + } + return 0; + }; + Space.prototype.Width = function() { return this.$val.Width(); }; + Space.ptr.prototype.CellsInLine = function(startX, startY, endX, endY) { + var _q, _q$1, _q$2, _q$3, _tuple, _tuple$1, alternate, c, cell, cells, cx, cy, dv, endCell, endX, endY, p, pX, pY, sp, startX, startY; + sp = this; + cells = new sliceType$1([]); + cell = sp.Cell(startX, startY); + endCell = sp.Cell(endX, endY); + if (!(cell === ptrType.nil) && !(endCell === ptrType.nil)) { + dv = new Vector([((endX - startX >> 0)), ((endY - startY >> 0))]).Unit(); + (0 >= dv.$length ? ($throwRuntimeError("index out of range"), undefined) : dv.$array[dv.$offset + 0] = (0 >= dv.$length ? ($throwRuntimeError("index out of range"), undefined) : dv.$array[dv.$offset + 0]) * (((_q = sp.CellWidth / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))))); + (1 >= dv.$length ? ($throwRuntimeError("index out of range"), undefined) : dv.$array[dv.$offset + 1] = (1 >= dv.$length ? ($throwRuntimeError("index out of range"), undefined) : dv.$array[dv.$offset + 1]) * (((_q$1 = sp.CellHeight / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))))); + _tuple = sp.SpaceToWorld(startX, startY); + pX = _tuple[0]; + pY = _tuple[1]; + p = new Vector([pX + ((_q$2 = sp.CellWidth / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))), pY + ((_q$3 = sp.CellHeight / 2, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")))]); + alternate = false; + while (true) { + if (!(!(cell === ptrType.nil))) { break; } + if (cell === endCell) { + cells = $append(cells, cell); + break; + } + cells = $append(cells, cell); + if (alternate) { + (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1] = (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]) + ((1 >= dv.$length ? ($throwRuntimeError("index out of range"), undefined) : dv.$array[dv.$offset + 1]))); + } else { + (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]) + ((0 >= dv.$length ? ($throwRuntimeError("index out of range"), undefined) : dv.$array[dv.$offset + 0]))); + } + _tuple$1 = sp.WorldToSpace((0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]), (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1])); + cx = _tuple$1[0]; + cy = _tuple$1[1]; + c = sp.Cell(cx, cy); + if (!(c === cell)) { + cell = c; + } + alternate = !alternate; + } + } + return cells; + }; + Space.prototype.CellsInLine = function(startX, startY, endX, endY) { return this.$val.CellsInLine(startX, startY, endX, endY); }; + NewLine = function(x, y, x2, y2) { + var x, x2, y, y2; + return new Line.ptr(new Vector([x, y]), new Vector([x2, y2])); + }; + $pkg.NewLine = NewLine; + Line.ptr.prototype.Project = function(axis) { + var axis, line; + line = this; + return line.Vector().Scale(axis.Dot(line.Start.Sub(new sliceType$4([line.End])))); + }; + Line.prototype.Project = function(axis) { return this.$val.Project(axis); }; + Line.ptr.prototype.Normal = function() { + var line, v; + line = this; + v = line.Vector(); + return new Vector([(1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]), -(0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0])]).Unit(); + }; + Line.prototype.Normal = function() { return this.$val.Normal(); }; + Line.ptr.prototype.Vector = function() { + var line; + line = this; + return line.End.Clone().Sub(new sliceType$4([line.Start])).Unit(); + }; + Line.prototype.Vector = function() { return this.$val.Vector(); }; + Line.ptr.prototype.IntersectionPointsLine = function(other) { + var det, dx, dy, gamma, lambda, line, other, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + line = this; + det = ((x = line.End, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) - (x$1 = line.Start, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0]))) * ((x$2 = other.End, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1])) - (x$3 = other.Start, (1 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 1]))) - ((x$4 = other.End, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])) - (x$5 = other.Start, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0]))) * ((x$6 = line.End, (1 >= x$6.$length ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + 1])) - (x$7 = line.Start, (1 >= x$7.$length ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + 1]))); + if (!((det === 0))) { + lambda = ((((x$8 = line.Start, (1 >= x$8.$length ? ($throwRuntimeError("index out of range"), undefined) : x$8.$array[x$8.$offset + 1])) - (x$9 = other.Start, (1 >= x$9.$length ? ($throwRuntimeError("index out of range"), undefined) : x$9.$array[x$9.$offset + 1]))) * ((x$10 = other.End, (0 >= x$10.$length ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + 0])) - (x$11 = other.Start, (0 >= x$11.$length ? ($throwRuntimeError("index out of range"), undefined) : x$11.$array[x$11.$offset + 0])))) - (((x$12 = line.Start, (0 >= x$12.$length ? ($throwRuntimeError("index out of range"), undefined) : x$12.$array[x$12.$offset + 0])) - (x$13 = other.Start, (0 >= x$13.$length ? ($throwRuntimeError("index out of range"), undefined) : x$13.$array[x$13.$offset + 0]))) * ((x$14 = other.End, (1 >= x$14.$length ? ($throwRuntimeError("index out of range"), undefined) : x$14.$array[x$14.$offset + 1])) - (x$15 = other.Start, (1 >= x$15.$length ? ($throwRuntimeError("index out of range"), undefined) : x$15.$array[x$15.$offset + 1])))) + 1) / det; + gamma = ((((x$16 = line.Start, (1 >= x$16.$length ? ($throwRuntimeError("index out of range"), undefined) : x$16.$array[x$16.$offset + 1])) - (x$17 = other.Start, (1 >= x$17.$length ? ($throwRuntimeError("index out of range"), undefined) : x$17.$array[x$17.$offset + 1]))) * ((x$18 = line.End, (0 >= x$18.$length ? ($throwRuntimeError("index out of range"), undefined) : x$18.$array[x$18.$offset + 0])) - (x$19 = line.Start, (0 >= x$19.$length ? ($throwRuntimeError("index out of range"), undefined) : x$19.$array[x$19.$offset + 0])))) - (((x$20 = line.Start, (0 >= x$20.$length ? ($throwRuntimeError("index out of range"), undefined) : x$20.$array[x$20.$offset + 0])) - (x$21 = other.Start, (0 >= x$21.$length ? ($throwRuntimeError("index out of range"), undefined) : x$21.$array[x$21.$offset + 0]))) * ((x$22 = line.End, (1 >= x$22.$length ? ($throwRuntimeError("index out of range"), undefined) : x$22.$array[x$22.$offset + 1])) - (x$23 = line.Start, (1 >= x$23.$length ? ($throwRuntimeError("index out of range"), undefined) : x$23.$array[x$23.$offset + 1])))) + 1) / det; + if ((0 < lambda && lambda < 1) && (0 < gamma && gamma < 1)) { + dx = (x$24 = line.End, (0 >= x$24.$length ? ($throwRuntimeError("index out of range"), undefined) : x$24.$array[x$24.$offset + 0])) - (x$25 = line.Start, (0 >= x$25.$length ? ($throwRuntimeError("index out of range"), undefined) : x$25.$array[x$25.$offset + 0])); + dy = (x$26 = line.End, (1 >= x$26.$length ? ($throwRuntimeError("index out of range"), undefined) : x$26.$array[x$26.$offset + 1])) - (x$27 = line.Start, (1 >= x$27.$length ? ($throwRuntimeError("index out of range"), undefined) : x$27.$array[x$27.$offset + 1])); + return new Vector([(x$28 = line.Start, (0 >= x$28.$length ? ($throwRuntimeError("index out of range"), undefined) : x$28.$array[x$28.$offset + 0])) + (lambda * dx), (x$29 = line.Start, (1 >= x$29.$length ? ($throwRuntimeError("index out of range"), undefined) : x$29.$array[x$29.$offset + 1])) + (lambda * dy)]); + } + } + return Vector.nil; + }; + Line.prototype.IntersectionPointsLine = function(other) { return this.$val.IntersectionPointsLine(other); }; + Line.ptr.prototype.IntersectionPointsCircle = function(circle) { + var a, b, c, circle, cp, det, diff, lEnd, lStart, line, points, t, t$1, x, x$1, x$2, x$3, x$4, x$5; + line = this; + points = new sliceType$4([]); + cp = new Vector([circle.X, circle.Y]); + lStart = line.Start.Sub(new sliceType$4([cp])); + lEnd = line.End.Sub(new sliceType$4([cp])); + diff = lEnd.Sub(new sliceType$4([lStart])); + a = (0 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 0]) * (0 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 0]) + (1 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 1]) * (1 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 1]); + b = 2 * (((0 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 0]) * (0 >= lStart.$length ? ($throwRuntimeError("index out of range"), undefined) : lStart.$array[lStart.$offset + 0])) + ((1 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 1]) * (1 >= lStart.$length ? ($throwRuntimeError("index out of range"), undefined) : lStart.$array[lStart.$offset + 1]))); + c = ((0 >= lStart.$length ? ($throwRuntimeError("index out of range"), undefined) : lStart.$array[lStart.$offset + 0]) * (0 >= lStart.$length ? ($throwRuntimeError("index out of range"), undefined) : lStart.$array[lStart.$offset + 0])) + ((1 >= lStart.$length ? ($throwRuntimeError("index out of range"), undefined) : lStart.$array[lStart.$offset + 1]) * (1 >= lStart.$length ? ($throwRuntimeError("index out of range"), undefined) : lStart.$array[lStart.$offset + 1])) - (circle.Radius * circle.Radius); + det = b * b - (4 * a * c); + if (det < 0) { + } else if (det === 0) { + t = -b / (2 * a); + if (t >= 0 && t <= 1) { + points = $append(points, new Vector([(x = line.Start, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) + t * (0 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 0]), (x$1 = line.Start, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])) + t * (1 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 1])])); + } + } else { + t$1 = (-b + math.Sqrt(det)) / (2 * a); + if (t$1 >= 0 && t$1 <= 1) { + points = $append(points, new Vector([(x$2 = line.Start, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])) + t$1 * (0 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 0]), (x$3 = line.Start, (1 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 1])) + t$1 * (1 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 1])])); + } + t$1 = (-b - math.Sqrt(det)) / (2 * a); + if (t$1 >= 0 && t$1 <= 1) { + points = $append(points, new Vector([(x$4 = line.Start, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])) + t$1 * (0 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 0]), (x$5 = line.Start, (1 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 1])) + t$1 * (1 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 1])])); + } + } + return points; + }; + Line.prototype.IntersectionPointsCircle = function(circle) { return this.$val.IntersectionPointsCircle(circle); }; + NewConvexPolygon = function(points) { + var cp, points; + cp = new ConvexPolygon.ptr(new sliceType$4([]), 0, 0, true); + cp.AddPoints(points); + return cp; + }; + $pkg.NewConvexPolygon = NewConvexPolygon; + ConvexPolygon.ptr.prototype.Clone = function() { + var _i, _ref, cp, newPoly, point, points; + cp = this; + points = new sliceType$4([]); + _ref = cp.Points; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + point = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + points = $append(points, point.Clone()); + _i++; + } + newPoly = NewConvexPolygon(sliceType.nil); + newPoly.X = cp.X; + newPoly.Y = cp.Y; + newPoly.AddPointsVec(points); + newPoly.Closed = cp.Closed; + return newPoly; + }; + ConvexPolygon.prototype.Clone = function() { return this.$val.Clone(); }; + ConvexPolygon.ptr.prototype.AddPointsVec = function(points) { + var cp, points; + cp = this; + cp.Points = $appendSlice(cp.Points, points); + }; + ConvexPolygon.prototype.AddPointsVec = function(points) { return this.$val.AddPointsVec(points); }; + ConvexPolygon.ptr.prototype.AddPoints = function(vertexPositions) { + var cp, v, vertexPositions, x; + cp = this; + v = 0; + while (true) { + if (!(v < vertexPositions.$length)) { break; } + cp.Points = $append(cp.Points, new Vector([((v < 0 || v >= vertexPositions.$length) ? ($throwRuntimeError("index out of range"), undefined) : vertexPositions.$array[vertexPositions.$offset + v]), (x = v + 1 >> 0, ((x < 0 || x >= vertexPositions.$length) ? ($throwRuntimeError("index out of range"), undefined) : vertexPositions.$array[vertexPositions.$offset + x]))])); + v = v + (2) >> 0; + } + }; + ConvexPolygon.prototype.AddPoints = function(vertexPositions) { return this.$val.AddPoints(vertexPositions); }; + ConvexPolygon.ptr.prototype.Lines = function() { + var _tmp, _tmp$1, cp, end, i, line, lines, start, vertices, x; + cp = this; + lines = new sliceType$5([]); + vertices = cp.Transformed(); + i = 0; + while (true) { + if (!(i < vertices.$length)) { break; } + _tmp = ((i < 0 || i >= vertices.$length) ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + i]); + _tmp$1 = (0 >= vertices.$length ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + 0]); + start = _tmp; + end = _tmp$1; + if (i < (vertices.$length - 1 >> 0)) { + end = (x = i + 1 >> 0, ((x < 0 || x >= vertices.$length) ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + x])); + } else if (!cp.Closed) { + break; + } + line = NewLine((0 >= start.$length ? ($throwRuntimeError("index out of range"), undefined) : start.$array[start.$offset + 0]), (1 >= start.$length ? ($throwRuntimeError("index out of range"), undefined) : start.$array[start.$offset + 1]), (0 >= end.$length ? ($throwRuntimeError("index out of range"), undefined) : end.$array[end.$offset + 0]), (1 >= end.$length ? ($throwRuntimeError("index out of range"), undefined) : end.$array[end.$offset + 1])); + lines = $append(lines, line); + i = i + (1) >> 0; + } + return lines; + }; + ConvexPolygon.prototype.Lines = function() { return this.$val.Lines(); }; + ConvexPolygon.ptr.prototype.Transformed = function() { + var _i, _ref, cp, point, transformed; + cp = this; + transformed = new sliceType$4([]); + _ref = cp.Points; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + point = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + transformed = $append(transformed, new Vector([(0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]) + cp.X, (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1]) + cp.Y])); + _i++; + } + return transformed; + }; + ConvexPolygon.prototype.Transformed = function() { return this.$val.Transformed(); }; + ConvexPolygon.ptr.prototype.Bounds = function() { + var bottomRight, cp, i, point, topLeft, transformed, x, x$1; + cp = this; + transformed = cp.Transformed(); + topLeft = new Vector([(x = (0 >= transformed.$length ? ($throwRuntimeError("index out of range"), undefined) : transformed.$array[transformed.$offset + 0]), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), (x$1 = (0 >= transformed.$length ? ($throwRuntimeError("index out of range"), undefined) : transformed.$array[transformed.$offset + 0]), (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1]))]); + bottomRight = topLeft.Clone(); + i = 0; + while (true) { + if (!(i < transformed.$length)) { break; } + point = ((i < 0 || i >= transformed.$length) ? ($throwRuntimeError("index out of range"), undefined) : transformed.$array[transformed.$offset + i]); + if ((0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]) < (0 >= topLeft.$length ? ($throwRuntimeError("index out of range"), undefined) : topLeft.$array[topLeft.$offset + 0])) { + (0 >= topLeft.$length ? ($throwRuntimeError("index out of range"), undefined) : topLeft.$array[topLeft.$offset + 0] = (0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0])); + } else if ((0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]) > (0 >= bottomRight.$length ? ($throwRuntimeError("index out of range"), undefined) : bottomRight.$array[bottomRight.$offset + 0])) { + (0 >= bottomRight.$length ? ($throwRuntimeError("index out of range"), undefined) : bottomRight.$array[bottomRight.$offset + 0] = (0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0])); + } + if ((1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1]) < (1 >= topLeft.$length ? ($throwRuntimeError("index out of range"), undefined) : topLeft.$array[topLeft.$offset + 1])) { + (1 >= topLeft.$length ? ($throwRuntimeError("index out of range"), undefined) : topLeft.$array[topLeft.$offset + 1] = (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1])); + } else if ((1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1]) > (1 >= bottomRight.$length ? ($throwRuntimeError("index out of range"), undefined) : bottomRight.$array[bottomRight.$offset + 1])) { + (1 >= bottomRight.$length ? ($throwRuntimeError("index out of range"), undefined) : bottomRight.$array[bottomRight.$offset + 1] = (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1])); + } + i = i + (1) >> 0; + } + return [topLeft, bottomRight]; + }; + ConvexPolygon.prototype.Bounds = function() { return this.$val.Bounds(); }; + ConvexPolygon.ptr.prototype.Position = function() { + var cp; + cp = this; + return [cp.X, cp.Y]; + }; + ConvexPolygon.prototype.Position = function() { return this.$val.Position(); }; + ConvexPolygon.ptr.prototype.SetPosition = function(x, y) { + var cp, x, y; + cp = this; + cp.X = x; + cp.Y = y; + }; + ConvexPolygon.prototype.SetPosition = function(x, y) { return this.$val.SetPosition(x, y); }; + ConvexPolygon.ptr.prototype.SetPositionVec = function(vec) { + var cp, vec; + cp = this; + cp.X = vec.X(); + cp.Y = vec.Y(); + }; + ConvexPolygon.prototype.SetPositionVec = function(vec) { return this.$val.SetPositionVec(vec); }; + ConvexPolygon.ptr.prototype.Move = function(x, y) { + var cp, x, y; + cp = this; + cp.X = cp.X + (x); + cp.Y = cp.Y + (y); + }; + ConvexPolygon.prototype.Move = function(x, y) { return this.$val.Move(x, y); }; + ConvexPolygon.ptr.prototype.MoveVec = function(vec) { + var cp, vec; + cp = this; + cp.X = cp.X + (vec.X()); + cp.Y = cp.Y + (vec.Y()); + }; + ConvexPolygon.prototype.MoveVec = function(vec) { return this.$val.MoveVec(vec); }; + ConvexPolygon.ptr.prototype.Center = function() { + var _i, _ref, cp, pos, v; + cp = this; + pos = new Vector([0, 0]); + _ref = cp.Transformed(); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + pos.Add(new sliceType$4([v])); + _i++; + } + (0 >= pos.$length ? ($throwRuntimeError("index out of range"), undefined) : pos.$array[pos.$offset + 0] = (0 >= pos.$length ? ($throwRuntimeError("index out of range"), undefined) : pos.$array[pos.$offset + 0]) / ((cp.Transformed().$length))); + (1 >= pos.$length ? ($throwRuntimeError("index out of range"), undefined) : pos.$array[pos.$offset + 1] = (1 >= pos.$length ? ($throwRuntimeError("index out of range"), undefined) : pos.$array[pos.$offset + 1]) / ((cp.Transformed().$length))); + return pos; + }; + ConvexPolygon.prototype.Center = function() { return this.$val.Center(); }; + ConvexPolygon.ptr.prototype.Project = function(axis) { + var axis, cp, i, max, min, p, vertices, x, x$1, x$2, x$3; + cp = this; + axis = axis.Unit(); + vertices = cp.Transformed(); + min = axis.Dot(new Vector([(x = (0 >= vertices.$length ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + 0]), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), (x$1 = (0 >= vertices.$length ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + 0]), (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1]))])); + max = min; + i = 1; + while (true) { + if (!(i < vertices.$length)) { break; } + p = axis.Dot(new Vector([(x$2 = ((i < 0 || i >= vertices.$length) ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + i]), (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])), (x$3 = ((i < 0 || i >= vertices.$length) ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + i]), (1 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 1]))])); + if (p < min) { + min = p; + } else if (p > max) { + max = p; + } + i = i + (1) >> 0; + } + return new Projection.ptr(min, max); + }; + ConvexPolygon.prototype.Project = function(axis) { return this.$val.Project(axis); }; + ConvexPolygon.ptr.prototype.SATAxes = function() { + var _i, _ref, axes, cp, line; + cp = this; + axes = new sliceType$4([]); + _ref = cp.Lines(); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + line = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + axes = $append(axes, line.Normal()); + _i++; + } + return axes; + }; + ConvexPolygon.prototype.SATAxes = function() { return this.$val.SATAxes(); }; + ConvexPolygon.ptr.prototype.PointInside = function(point) { + var _i, _ref, contactCount, line, point, pointLine, polygon; + polygon = this; + pointLine = NewLine((0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]), (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1]), (0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]) + 9.99999999999e+11, (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1])); + contactCount = 0; + _ref = polygon.Lines(); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + line = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (!(line.IntersectionPointsLine(pointLine) === Vector.nil)) { + contactCount = contactCount + (1) >> 0; + } + _i++; + } + return contactCount === 1; + }; + ConvexPolygon.prototype.PointInside = function(point) { return this.$val.PointInside(point); }; + NewContactSet = function() { + return new ContactSet.ptr(new sliceType$4([]), new Vector([0, 0]), new Vector([0, 0])); + }; + $pkg.NewContactSet = NewContactSet; + ContactSet.ptr.prototype.LeftmostPoint = function() { + var _i, _ref, cs, left, point; + cs = this; + left = Vector.nil; + _ref = cs.Points; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + point = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (left === Vector.nil || (0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]) < (0 >= left.$length ? ($throwRuntimeError("index out of range"), undefined) : left.$array[left.$offset + 0])) { + left = point; + } + _i++; + } + return left; + }; + ContactSet.prototype.LeftmostPoint = function() { return this.$val.LeftmostPoint(); }; + ContactSet.ptr.prototype.RightmostPoint = function() { + var _i, _ref, cs, point, right; + cs = this; + right = Vector.nil; + _ref = cs.Points; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + point = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (right === Vector.nil || (0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]) > (0 >= right.$length ? ($throwRuntimeError("index out of range"), undefined) : right.$array[right.$offset + 0])) { + right = point; + } + _i++; + } + return right; + }; + ContactSet.prototype.RightmostPoint = function() { return this.$val.RightmostPoint(); }; + ContactSet.ptr.prototype.TopmostPoint = function() { + var _i, _ref, cs, point, top; + cs = this; + top = Vector.nil; + _ref = cs.Points; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + point = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (top === Vector.nil || (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1]) < (1 >= top.$length ? ($throwRuntimeError("index out of range"), undefined) : top.$array[top.$offset + 1])) { + top = point; + } + _i++; + } + return top; + }; + ContactSet.prototype.TopmostPoint = function() { return this.$val.TopmostPoint(); }; + ContactSet.ptr.prototype.BottommostPoint = function() { + var _i, _ref, bottom, cs, point; + cs = this; + bottom = Vector.nil; + _ref = cs.Points; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + point = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (bottom === Vector.nil || (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1]) > (1 >= bottom.$length ? ($throwRuntimeError("index out of range"), undefined) : bottom.$array[bottom.$offset + 1])) { + bottom = point; + } + _i++; + } + return bottom; + }; + ContactSet.prototype.BottommostPoint = function() { return this.$val.BottommostPoint(); }; + ConvexPolygon.ptr.prototype.Intersection = function(dx, dy, other) { + var _i, _i$1, _i$2, _i$3, _ref, _ref$1, _ref$2, _ref$3, _tuple, _tuple$1, circle, contactSet, cp, deltaMagnitude, dx, dy, isCircle, isPoly, line, line$1, mtv, ogMagnitude, ogX, ogY, other, otherLine, point, point$1, poly, x, x$1, x$2, x$3; + cp = this; + contactSet = NewContactSet(); + ogX = cp.X; + ogY = cp.Y; + cp.X = cp.X + (dx); + cp.Y = cp.Y + (dy); + _tuple = $assertType(other, ptrType$4, true); + circle = _tuple[0]; + isCircle = _tuple[1]; + if (isCircle) { + _ref = cp.Lines(); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + line = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + contactSet.Points = $appendSlice(contactSet.Points, line.IntersectionPointsCircle(circle)); + _i++; + } + } else { + _tuple$1 = $assertType(other, ptrType$5, true); + poly = _tuple$1[0]; + isPoly = _tuple$1[1]; + if (isPoly) { + _ref$1 = cp.Lines(); + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + line$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + _ref$2 = poly.Lines(); + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + otherLine = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + point = line$1.IntersectionPointsLine(otherLine); + if (!(point === Vector.nil)) { + contactSet.Points = $append(contactSet.Points, point); + } + _i$2++; + } + _i$1++; + } + } + } + if (contactSet.Points.$length > 0) { + _ref$3 = contactSet.Points; + _i$3 = 0; + while (true) { + if (!(_i$3 < _ref$3.$length)) { break; } + point$1 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); + contactSet.Center = contactSet.Center.Add(new sliceType$4([point$1])); + _i$3++; + } + (x$1 = contactSet.Center, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0] = (x = contactSet.Center, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) / ((contactSet.Points.$length)))); + (x$3 = contactSet.Center, (1 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 1] = (x$2 = contactSet.Center, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1])) / ((contactSet.Points.$length)))); + mtv = cp.calculateMTV(contactSet, other); + if (!(mtv === Vector.nil)) { + contactSet.MTV = mtv; + } + } else { + contactSet = ptrType$6.nil; + } + if (!(contactSet === ptrType$6.nil) && (!((dx === 0)) || !((dy === 0)))) { + deltaMagnitude = new Vector([dx, dy]).Magnitude(); + ogMagnitude = contactSet.MTV.Magnitude(); + contactSet.MTV = contactSet.MTV.Unit().Scale(ogMagnitude - deltaMagnitude); + } + cp.X = ogX; + cp.Y = ogY; + return contactSet; + }; + ConvexPolygon.prototype.Intersection = function(dx, dy, other) { return this.$val.Intersection(dx, dy, other); }; + ConvexPolygon.ptr.prototype.calculateMTV = function(contactSet, otherShape) { + var _i, _i$1, _ref, _ref$1, _ref$2, axis, axis$1, contactSet, cp, delta, other, otherShape, overlap, overlap$1, smallest; + cp = this; + delta = new Vector([0, 0]); + smallest = new Vector([1.7976931348623157e+308, 0]); + _ref = otherShape; + if ($assertType(_ref, ptrType$5, true)[1]) { + other = _ref.$val; + _ref$1 = cp.SATAxes(); + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + axis = ((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]); + if (!$clone(cp.Project(axis), Projection).Overlapping($clone(other.Project(axis), Projection))) { + return Vector.nil; + } + overlap = $clone(cp.Project(axis), Projection).Overlap($clone(other.Project(axis), Projection)); + if (smallest.Magnitude() > overlap) { + smallest = axis.Scale(overlap); + } + _i++; + } + _ref$2 = other.SATAxes(); + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + axis$1 = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$1]); + if (!$clone(cp.Project(axis$1), Projection).Overlapping($clone(other.Project(axis$1), Projection))) { + return Vector.nil; + } + overlap$1 = $clone(cp.Project(axis$1), Projection).Overlap($clone(other.Project(axis$1), Projection)); + if (smallest.Magnitude() > overlap$1) { + smallest = axis$1.Scale(overlap$1); + } + _i$1++; + } + } + (0 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 0] = (0 >= smallest.$length ? ($throwRuntimeError("index out of range"), undefined) : smallest.$array[smallest.$offset + 0])); + (1 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 1] = (1 >= smallest.$length ? ($throwRuntimeError("index out of range"), undefined) : smallest.$array[smallest.$offset + 1])); + return delta; + }; + ConvexPolygon.prototype.calculateMTV = function(contactSet, otherShape) { return this.$val.calculateMTV(contactSet, otherShape); }; + ConvexPolygon.ptr.prototype.ContainedBy = function(otherShape) { + var _i, _i$1, _ref, _ref$1, _ref$2, axis, axis$1, cp, other, otherShape; + cp = this; + _ref = otherShape; + if ($assertType(_ref, ptrType$5, true)[1]) { + other = _ref.$val; + _ref$1 = cp.SATAxes(); + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + axis = ((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]); + if (!$clone(cp.Project(axis), Projection).IsInside($clone(other.Project(axis), Projection))) { + return false; + } + _i++; + } + _ref$2 = other.SATAxes(); + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + axis$1 = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$1]); + if (!$clone(cp.Project(axis$1), Projection).IsInside($clone(other.Project(axis$1), Projection))) { + return false; + } + _i$1++; + } + } + return true; + }; + ConvexPolygon.prototype.ContainedBy = function(otherShape) { return this.$val.ContainedBy(otherShape); }; + ConvexPolygon.ptr.prototype.FlipH = function() { + var _i, _ref, cp, v; + cp = this; + _ref = cp.Points; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0] = -(0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0])); + _i++; + } + cp.ReverseVertexOrder(); + }; + ConvexPolygon.prototype.FlipH = function() { return this.$val.FlipH(); }; + ConvexPolygon.ptr.prototype.FlipV = function() { + var _i, _ref, cp, v; + cp = this; + _ref = cp.Points; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + (1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1] = -(1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1])); + _i++; + } + cp.ReverseVertexOrder(); + }; + ConvexPolygon.prototype.FlipV = function() { return this.$val.FlipV(); }; + ConvexPolygon.ptr.prototype.ReverseVertexOrder = function() { + var cp, i, verts, x, x$1; + cp = this; + verts = new sliceType$4([(x = cp.Points, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]))]); + i = cp.Points.$length - 1 >> 0; + while (true) { + if (!(i >= 1)) { break; } + verts = $append(verts, (x$1 = cp.Points, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i]))); + i = i - (1) >> 0; + } + cp.Points = verts; + }; + ConvexPolygon.prototype.ReverseVertexOrder = function() { return this.$val.ReverseVertexOrder(); }; + NewRectangle = function(x, y, w, h) { + var h, w, x, y; + return NewConvexPolygon(new sliceType([x, y, x + w, y, x + w, y + h, x, y + h])); + }; + $pkg.NewRectangle = NewRectangle; + NewCircle = function(x, y, radius) { + var circle, radius, x, y; + circle = new Circle.ptr(x, y, radius); + return circle; + }; + $pkg.NewCircle = NewCircle; + Circle.ptr.prototype.Clone = function() { + var circle; + circle = this; + return NewCircle(circle.X, circle.Y, circle.Radius); + }; + Circle.prototype.Clone = function() { return this.$val.Clone(); }; + Circle.ptr.prototype.Bounds = function() { + var circle; + circle = this; + return [new Vector([circle.X - circle.Radius, circle.Y - circle.Radius]), new Vector([circle.X + circle.Radius, circle.Y + circle.Radius])]; + }; + Circle.prototype.Bounds = function() { return this.$val.Bounds(); }; + Circle.ptr.prototype.Intersection = function(dx, dy, other) { + var _i, _ref, _ref$1, circle, contactSet, dist, dx, dy, other, ox, oy, point, shape, shape$1, x, x$1, x$2, x$3; + circle = this; + contactSet = ptrType$6.nil; + ox = circle.X; + oy = circle.Y; + circle.X = circle.X + (dx); + circle.Y = circle.Y + (dy); + _ref = other; + if ($assertType(_ref, ptrType$5, true)[1]) { + shape = _ref.$val; + contactSet = shape.Intersection(-dx, -dy, circle); + if (!(contactSet === ptrType$6.nil)) { + contactSet.MTV = contactSet.MTV.Scale(-1); + } + } else if ($assertType(_ref, ptrType$4, true)[1]) { + shape$1 = _ref.$val; + contactSet = NewContactSet(); + contactSet.Points = circle.IntersectionPointsCircle(shape$1); + if (contactSet.Points.$length === 0) { + return ptrType$6.nil; + } + contactSet.MTV = new Vector([circle.X - shape$1.X, circle.Y - shape$1.Y]); + dist = contactSet.MTV.Magnitude(); + contactSet.MTV = contactSet.MTV.Unit().Scale(circle.Radius + shape$1.Radius - dist); + _ref$1 = contactSet.Points; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + point = ((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]); + contactSet.Center = contactSet.Center.Add(new sliceType$4([point])); + _i++; + } + (x$1 = contactSet.Center, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0] = (x = contactSet.Center, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) / ((contactSet.Points.$length)))); + (x$3 = contactSet.Center, (1 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 1] = (x$2 = contactSet.Center, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1])) / ((contactSet.Points.$length)))); + } + circle.X = ox; + circle.Y = oy; + return contactSet; + }; + Circle.prototype.Intersection = function(dx, dy, other) { return this.$val.Intersection(dx, dy, other); }; + Circle.ptr.prototype.Move = function(x, y) { + var circle, x, y; + circle = this; + circle.X = circle.X + (x); + circle.Y = circle.Y + (y); + }; + Circle.prototype.Move = function(x, y) { return this.$val.Move(x, y); }; + Circle.ptr.prototype.MoveVec = function(vec) { + var circle, vec; + circle = this; + circle.X = circle.X + (vec.X()); + circle.Y = circle.Y + (vec.Y()); + }; + Circle.prototype.MoveVec = function(vec) { return this.$val.MoveVec(vec); }; + Circle.ptr.prototype.SetPosition = function(x, y) { + var circle, x, y; + circle = this; + circle.X = x; + circle.Y = y; + }; + Circle.prototype.SetPosition = function(x, y) { return this.$val.SetPosition(x, y); }; + Circle.ptr.prototype.SetPositionVec = function(vec) { + var circle, vec; + circle = this; + circle.X = vec.X(); + circle.Y = vec.Y(); + }; + Circle.prototype.SetPositionVec = function(vec) { return this.$val.SetPositionVec(vec); }; + Circle.ptr.prototype.Position = function() { + var circle; + circle = this; + return [circle.X, circle.Y]; + }; + Circle.prototype.Position = function() { return this.$val.Position(); }; + Circle.ptr.prototype.PointInside = function(point) { + var circle, point; + circle = this; + return point.Sub(new sliceType$4([new Vector([circle.X, circle.Y])])).Magnitude() <= circle.Radius; + }; + Circle.prototype.PointInside = function(point) { return this.$val.PointInside(point); }; + Circle.ptr.prototype.IntersectionPointsCircle = function(other) { + var a, circle, d, h, other, x2, y2; + circle = this; + d = math.Sqrt(math.Pow(other.X - circle.X, 2) + math.Pow(other.Y - circle.Y, 2)); + if (d > circle.Radius + other.Radius || d < math.Abs(circle.Radius - other.Radius) || (d === 0) && (circle.Radius === other.Radius)) { + return sliceType$4.nil; + } + a = (math.Pow(circle.Radius, 2) - math.Pow(other.Radius, 2) + math.Pow(d, 2)) / (2 * d); + h = math.Sqrt(math.Pow(circle.Radius, 2) - math.Pow(a, 2)); + x2 = circle.X + a * (other.X - circle.X) / d; + y2 = circle.Y + a * (other.Y - circle.Y) / d; + return new sliceType$4([new Vector([x2 + h * (other.Y - circle.Y) / d, y2 - h * (other.X - circle.X) / d]), new Vector([x2 - h * (other.Y - circle.Y) / d, y2 + h * (other.X - circle.X) / d])]); + }; + Circle.prototype.IntersectionPointsCircle = function(other) { return this.$val.IntersectionPointsCircle(other); }; + Projection.ptr.prototype.Overlapping = function(other) { + var other, projection; + projection = this; + return $clone(projection, Projection).Overlap($clone(other, Projection)) > 0; + }; + Projection.prototype.Overlapping = function(other) { return this.$val.Overlapping(other); }; + Projection.ptr.prototype.Overlap = function(other) { + var other, projection; + projection = this; + return math.Min(projection.Max, other.Max) - math.Max(projection.Min, other.Min); + }; + Projection.prototype.Overlap = function(other) { return this.$val.Overlap(other); }; + Projection.ptr.prototype.IsInside = function(other) { + var other, projection; + projection = this; + return projection.Min >= other.Min && projection.Max <= other.Max; + }; + Projection.prototype.IsInside = function(other) { return this.$val.IsInside(other); }; + NewObject = function(x, y, w, h, tags) { + var h, o, tags, w, x, y; + o = new Object.ptr($ifaceNil, ptrType$1.nil, x, y, w, h, sliceType$1.nil, $ifaceNil, $makeMap(ptrType$2.keyFor, []), new sliceType$6([])); + if (tags.$length > 0) { + o.AddTags(tags); + } + return o; + }; + $pkg.NewObject = NewObject; + Object.ptr.prototype.Clone = function() { + var {_entry, _i, _keys, _r, _ref, k, newObj, obj, $s, $r, $c} = $restore(this, {}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + obj = this; + newObj = NewObject(obj.X, obj.Y, obj.W, obj.H, obj.Tags()); + newObj.Data = obj.Data; + /* */ if (!($interfaceIsEqual(obj.Shape, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(obj.Shape, $ifaceNil))) { */ case 1: + _r = obj.Shape.Clone(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $r = newObj.SetShape(_r); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + _ref = obj.ignoreList; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + k = _entry.k; + newObj.AddToIgnoreList(k); + _i++; + } + $s = -1; return newObj; + /* */ } return; } var $f = {$blk: Object.ptr.prototype.Clone, $c: true, $r, _entry, _i, _keys, _r, _ref, k, newObj, obj, $s};return $f; + }; + Object.prototype.Clone = function() { return this.$val.Clone(); }; + Object.ptr.prototype.Update = function() { + var {_tuple, c, cx, cy, ex, ey, obj, space, x, y, $s, $r, $c} = $restore(this, {}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + obj = this; + if (!(obj.Space === ptrType$1.nil)) { + space = obj.Space; + obj.Space.Remove(new sliceType$3([obj])); + obj.Space = space; + _tuple = obj.BoundsToSpace(0, 0); + cx = _tuple[0]; + cy = _tuple[1]; + ex = _tuple[2]; + ey = _tuple[3]; + y = cy; + while (true) { + if (!(y <= ey)) { break; } + x = cx; + while (true) { + if (!(x <= ex)) { break; } + c = obj.Space.Cell(x, y); + if (!(c === ptrType.nil)) { + c.register(obj); + obj.TouchingCells = $append(obj.TouchingCells, c); + } + x = x + (1) >> 0; + } + y = y + (1) >> 0; + } + } + /* */ if (!($interfaceIsEqual(obj.Shape, $ifaceNil))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(obj.Shape, $ifaceNil))) { */ case 1: + $r = obj.Shape.SetPosition(obj.X, obj.Y); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } var $f = {$blk: Object.ptr.prototype.Update, $c: true, $r, _tuple, c, cx, cy, ex, ey, obj, space, x, y, $s};return $f; + }; + Object.prototype.Update = function() { return this.$val.Update(); }; + Object.ptr.prototype.AddTags = function(tags) { + var obj, tags; + obj = this; + obj.tags = $appendSlice(obj.tags, tags); + }; + Object.prototype.AddTags = function(tags) { return this.$val.AddTags(tags); }; + Object.ptr.prototype.RemoveTags = function(tags) { + var _i, _i$1, _ref, _ref$1, i, obj, t, tag, tags; + obj = this; + _ref = tags; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + tag = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = obj.tags; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i = _i$1; + t = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (t === tag) { + obj.tags = $appendSlice($subslice(obj.tags, 0, i), $subslice(obj.tags, (i + 1 >> 0))); + break; + } + _i$1++; + } + _i++; + } + }; + Object.prototype.RemoveTags = function(tags) { return this.$val.RemoveTags(tags); }; + Object.ptr.prototype.HasTags = function(tags) { + var _i, _i$1, _ref, _ref$1, obj, t, tag, tags; + obj = this; + _ref = tags; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + tag = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = obj.tags; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + t = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (t === tag) { + return true; + } + _i$1++; + } + _i++; + } + return false; + }; + Object.prototype.HasTags = function(tags) { return this.$val.HasTags(tags); }; + Object.ptr.prototype.Tags = function() { + var obj; + obj = this; + return $appendSlice(new sliceType$6([]), obj.tags); + }; + Object.prototype.Tags = function() { return this.$val.Tags(); }; + Object.ptr.prototype.SetShape = function(shape) { + var {obj, shape, $s, $r, $c} = $restore(this, {shape}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + obj = this; + /* */ if (!($interfaceIsEqual(obj.Shape, shape))) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (!($interfaceIsEqual(obj.Shape, shape))) { */ case 1: + obj.Shape = shape; + $r = obj.Update(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* } */ case 2: + $s = -1; return; + /* */ } return; } var $f = {$blk: Object.ptr.prototype.SetShape, $c: true, $r, obj, shape, $s};return $f; + }; + Object.prototype.SetShape = function(shape) { return this.$val.SetShape(shape); }; + Object.ptr.prototype.BoundsToSpace = function(dx, dy) { + var _tuple, _tuple$1, cx, cy, dx, dy, ex, ey, obj; + obj = this; + _tuple = obj.Space.WorldToSpace(obj.X + dx, obj.Y + dy); + cx = _tuple[0]; + cy = _tuple[1]; + _tuple$1 = obj.Space.WorldToSpace(obj.X + obj.W + dx - 1, obj.Y + obj.H + dy - 1); + ex = _tuple$1[0]; + ey = _tuple$1[1]; + return [cx, cy, ex, ey]; + }; + Object.prototype.BoundsToSpace = function(dx, dy) { return this.$val.BoundsToSpace(dx, dy); }; + Object.ptr.prototype.SharesCells = function(other) { + var _i, _ref, cell, obj, other; + obj = this; + _ref = obj.TouchingCells; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + cell = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (cell.Contains(other)) { + return true; + } + _i++; + } + return false; + }; + Object.prototype.SharesCells = function(other) { return this.$val.SharesCells(other); }; + Object.ptr.prototype.SharesCellsTags = function(tags) { + var _i, _ref, cell, obj, tags; + obj = this; + _ref = obj.TouchingCells; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + cell = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (cell.ContainsTags(tags)) { + return true; + } + _i++; + } + return false; + }; + Object.prototype.SharesCellsTags = function(tags) { return this.$val.SharesCellsTags(tags); }; + Object.ptr.prototype.Center = function() { + var obj; + obj = this; + return [obj.X + (obj.W / 2), obj.Y + (obj.H / 2)]; + }; + Object.prototype.Center = function() { return this.$val.Center(); }; + Object.ptr.prototype.SetCenter = function(x, y) { + var obj, x, y; + obj = this; + obj.X = x - (obj.W / 2); + obj.Y = y - (obj.H / 2); + }; + Object.prototype.SetCenter = function(x, y) { return this.$val.SetCenter(x, y); }; + Object.ptr.prototype.CellPosition = function() { + var _tuple, obj; + obj = this; + _tuple = obj.Center(); + return obj.Space.WorldToSpace(_tuple[0], _tuple[1]); + }; + Object.prototype.CellPosition = function() { return this.$val.CellPosition(); }; + Object.ptr.prototype.SetRight = function(x) { + var obj, x; + obj = this; + obj.X = x - obj.W; + }; + Object.prototype.SetRight = function(x) { return this.$val.SetRight(x); }; + Object.ptr.prototype.SetBottom = function(y) { + var obj, y; + obj = this; + obj.Y = y - obj.H; + }; + Object.prototype.SetBottom = function(y) { return this.$val.SetBottom(y); }; + Object.ptr.prototype.Bottom = function() { + var obj; + obj = this; + return obj.Y + obj.H; + }; + Object.prototype.Bottom = function() { return this.$val.Bottom(); }; + Object.ptr.prototype.Right = function() { + var obj; + obj = this; + return obj.X + obj.W; + }; + Object.prototype.Right = function() { return this.$val.Right(); }; + Object.ptr.prototype.SetBounds = function(topLeft, bottomRight) { + var bottomRight, obj, topLeft; + obj = this; + obj.X = (0 >= topLeft.$length ? ($throwRuntimeError("index out of range"), undefined) : topLeft.$array[topLeft.$offset + 0]); + obj.Y = (1 >= topLeft.$length ? ($throwRuntimeError("index out of range"), undefined) : topLeft.$array[topLeft.$offset + 1]); + obj.W = (0 >= bottomRight.$length ? ($throwRuntimeError("index out of range"), undefined) : bottomRight.$array[bottomRight.$offset + 0]) - obj.X; + obj.H = (1 >= bottomRight.$length ? ($throwRuntimeError("index out of range"), undefined) : bottomRight.$array[bottomRight.$offset + 1]) - obj.Y; + }; + Object.prototype.SetBounds = function(topLeft, bottomRight) { return this.$val.SetBounds(topLeft, bottomRight); }; + Object.ptr.prototype.Check = function(dx, dy, tags) { + var _entry, _entry$1, _entry$2, _i, _key, _key$1, _ref, _tuple, _tuple$1, _tuple$2, added, added$1, c, cc, cellsAdded, cx, cy, dx, dy, ex, ey, ignored, o, obj, objectsAdded, tags, x, y; + obj = this; + if (obj.Space === ptrType$1.nil) { + return ptrType$7.nil; + } + cc = NewCollision(); + cc.checkingObject = obj; + if (dx < 0) { + dx = math.Min(dx, -1); + } else if (dx > 0) { + dx = math.Max(dx, 1); + } + if (dy < 0) { + dy = math.Min(dy, -1); + } else if (dy > 0) { + dy = math.Max(dy, 1); + } + cc.dx = dx; + cc.dy = dy; + _tuple = obj.BoundsToSpace(dx, dy); + cx = _tuple[0]; + cy = _tuple[1]; + ex = _tuple[2]; + ey = _tuple[3]; + objectsAdded = $makeMap(ptrType$2.keyFor, []); + cellsAdded = $makeMap(ptrType.keyFor, []); + y = cy; + while (true) { + if (!(y <= ey)) { break; } + x = cx; + while (true) { + if (!(x <= ex)) { break; } + c = obj.Space.Cell(x, y); + if (!(c === ptrType.nil)) { + _ref = c.Objects; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + o = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + ignored = (_entry = obj.ignoreList[ptrType$2.keyFor(o)], _entry !== undefined ? _entry.v : false); + if (o === obj || ignored) { + _i++; + continue; + } + _tuple$1 = (_entry$1 = objectsAdded[ptrType$2.keyFor(o)], _entry$1 !== undefined ? [_entry$1.v, true] : [false, false]); + added = _tuple$1[1]; + if (((tags.$length === 0) || o.HasTags(tags)) && !added) { + cc.Objects = $append(cc.Objects, o); + _key = o; (objectsAdded || $throwRuntimeError("assignment to entry in nil map"))[ptrType$2.keyFor(_key)] = { k: _key, v: true }; + _tuple$2 = (_entry$2 = cellsAdded[ptrType.keyFor(c)], _entry$2 !== undefined ? [_entry$2.v, true] : [false, false]); + added$1 = _tuple$2[1]; + if (!added$1) { + cc.Cells = $append(cc.Cells, c); + _key$1 = c; (cellsAdded || $throwRuntimeError("assignment to entry in nil map"))[ptrType.keyFor(_key$1)] = { k: _key$1, v: true }; + } + _i++; + continue; + } + _i++; + } + } + x = x + (1) >> 0; + } + y = y + (1) >> 0; + } + if (cc.Objects.$length === 0) { + return ptrType$7.nil; + } + return cc; + }; + Object.prototype.Check = function(dx, dy, tags) { return this.$val.Check(dx, dy, tags); }; + Object.ptr.prototype.Overlaps = function(other) { + var obj, other; + obj = this; + return other.X <= obj.X + obj.W && other.X + other.W >= obj.X && other.Y <= obj.Y + obj.H && other.Y + other.H >= obj.Y; + }; + Object.prototype.Overlaps = function(other) { return this.$val.Overlaps(other); }; + Object.ptr.prototype.AddToIgnoreList = function(ignoreObj) { + var _key, ignoreObj, obj; + obj = this; + _key = ignoreObj; (obj.ignoreList || $throwRuntimeError("assignment to entry in nil map"))[ptrType$2.keyFor(_key)] = { k: _key, v: true }; + }; + Object.prototype.AddToIgnoreList = function(ignoreObj) { return this.$val.AddToIgnoreList(ignoreObj); }; + Object.ptr.prototype.RemoveFromIgnoreList = function(ignoreObj) { + var ignoreObj, obj; + obj = this; + delete obj.ignoreList[ptrType$2.keyFor(ignoreObj)]; + }; + Object.prototype.RemoveFromIgnoreList = function(ignoreObj) { return this.$val.RemoveFromIgnoreList(ignoreObj); }; + axpyUnitaryTo = function(dst, alpha, x, y) { + var _i, _ref, alpha, dim, dst, i, v, x, y; + dim = y.$length; + _ref = x; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (i === dim) { + return; + } + ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i] = alpha * v + ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])); + _i++; + } + }; + scalUnitaryTo = function(dst, alpha, x) { + var _i, _ref, alpha, dst, i, x; + _ref = x; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i] = ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i]) * (alpha)); + _i++; + } + }; + NewCollision = function() { + return new Collision.ptr(ptrType$2.nil, 0, 0, new sliceType$3([]), sliceType$1.nil); + }; + $pkg.NewCollision = NewCollision; + Collision.ptr.prototype.HasTags = function(tags) { + var _i, _ref, cc, o, tags; + cc = this; + _ref = cc.Objects; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + o = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (o === cc.checkingObject) { + _i++; + continue; + } + if (o.HasTags(tags)) { + return true; + } + _i++; + } + return false; + }; + Collision.prototype.HasTags = function(tags) { return this.$val.HasTags(tags); }; + Collision.ptr.prototype.ObjectsByTags = function(tags) { + var _i, _ref, cc, o, objects, tags; + cc = this; + objects = new sliceType$3([]); + _ref = cc.Objects; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + o = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (o === cc.checkingObject) { + _i++; + continue; + } + if (o.HasTags(tags)) { + objects = $append(objects, o); + } + _i++; + } + return objects; + }; + Collision.prototype.ObjectsByTags = function(tags) { return this.$val.ObjectsByTags(tags); }; + Collision.ptr.prototype.ContactWithObject = function(object) { + var cc, delta, object; + cc = this; + delta = new Vector([0, 0]); + if (cc.dx < 0) { + (0 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 0] = object.X + object.W - cc.checkingObject.X); + } else if (cc.dx > 0) { + (0 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 0] = object.X - cc.checkingObject.W - cc.checkingObject.X); + } + if (cc.dy < 0) { + (1 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 1] = object.Y + object.H - cc.checkingObject.Y); + } else if (cc.dy > 0) { + (1 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 1] = object.Y - cc.checkingObject.H - cc.checkingObject.Y); + } + return delta; + }; + Collision.prototype.ContactWithObject = function(object) { return this.$val.ContactWithObject(object); }; + Collision.ptr.prototype.ContactWithCell = function(cell) { + var cc, cell, cx, cy, delta; + cc = this; + delta = new Vector([0, 0]); + cx = (($imul(cell.X, cc.checkingObject.Space.CellWidth))); + cy = (($imul(cell.Y, cc.checkingObject.Space.CellHeight))); + if (cc.dx < 0) { + (0 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 0] = cx + (cc.checkingObject.Space.CellWidth) - cc.checkingObject.X); + } else if (cc.dx > 0) { + (0 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 0] = cx - cc.checkingObject.W - cc.checkingObject.X); + } + if (cc.dy < 0) { + (1 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 1] = cy + (cc.checkingObject.Space.CellHeight) - cc.checkingObject.Y); + } else if (cc.dy > 0) { + (1 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 1] = cy - cc.checkingObject.H - cc.checkingObject.Y); + } + return delta; + }; + Collision.prototype.ContactWithCell = function(cell) { return this.$val.ContactWithCell(cell); }; + Collision.ptr.prototype.SlideAgainstCell = function(cell, avoidTags) { + var _tuple, _tuple$1, avoidTags, cc, ccX, ccY, cell, collidingCell, diffX, diffY, down, hX, hY, left, oX, oY, right, slide, sp, up, x; + cc = this; + sp = cc.checkingObject.Space; + collidingCell = (x = cc.Cells, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); + _tuple = sp.SpaceToWorld(collidingCell.X, collidingCell.Y); + ccX = _tuple[0]; + ccY = _tuple[1]; + hX = (sp.CellWidth) / 2; + hY = (sp.CellHeight) / 2; + ccX = ccX + (hX); + ccY = ccY + (hY); + _tuple$1 = cc.checkingObject.Center(); + oX = _tuple$1[0]; + oY = _tuple$1[1]; + diffX = oX - ccX; + diffY = oY - ccY; + left = sp.Cell(collidingCell.X - 1 >> 0, collidingCell.Y); + right = sp.Cell(collidingCell.X + 1 >> 0, collidingCell.Y); + up = sp.Cell(collidingCell.X, collidingCell.Y - 1 >> 0); + down = sp.Cell(collidingCell.X, collidingCell.Y + 1 >> 0); + slide = new Vector([0, 0]); + if (!((cc.dy === 0))) { + if (diffX > 0 && (right === ptrType.nil || !right.ContainsTags(avoidTags))) { + (0 >= slide.$length ? ($throwRuntimeError("index out of range"), undefined) : slide.$array[slide.$offset + 0] = ccX + hX - cc.checkingObject.X); + } else if (diffX < 0 && (left === ptrType.nil || !left.ContainsTags(avoidTags))) { + (0 >= slide.$length ? ($throwRuntimeError("index out of range"), undefined) : slide.$array[slide.$offset + 0] = ccX - hX - (cc.checkingObject.X + cc.checkingObject.W)); + } else { + return Vector.nil; + } + } + if (!((cc.dx === 0))) { + if (diffY > 0 && (down === ptrType.nil || !down.ContainsTags(avoidTags))) { + (1 >= slide.$length ? ($throwRuntimeError("index out of range"), undefined) : slide.$array[slide.$offset + 1] = ccY + hY - cc.checkingObject.Y); + } else if (diffY < 0 && (up === ptrType.nil || !up.ContainsTags(avoidTags))) { + (1 >= slide.$length ? ($throwRuntimeError("index out of range"), undefined) : slide.$array[slide.$offset + 1] = ccY - hY - (cc.checkingObject.Y + cc.checkingObject.H)); + } else { + return Vector.nil; + } + } + return slide; + }; + Collision.prototype.SlideAgainstCell = function(cell, avoidTags) { return this.$val.SlideAgainstCell(cell, avoidTags); }; + newCell = function(x, y) { + var x, y; + return new Cell.ptr(x, y, new sliceType$3([])); + }; + Cell.ptr.prototype.register = function(obj) { + var cell, obj; + cell = this; + if (!cell.Contains(obj)) { + cell.Objects = $append(cell.Objects, obj); + } + }; + Cell.prototype.register = function(obj) { return this.$val.register(obj); }; + Cell.ptr.prototype.unregister = function(obj) { + var _i, _ref, cell, i, o, obj, x, x$1, x$2; + cell = this; + _ref = cell.Objects; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + o = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (o === obj) { + (x$2 = cell.Objects, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i] = (x = cell.Objects, x$1 = cell.Objects.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])))); + cell.Objects = $subslice(cell.Objects, 0, (cell.Objects.$length - 1 >> 0)); + break; + } + _i++; + } + }; + Cell.prototype.unregister = function(obj) { return this.$val.unregister(obj); }; + Cell.ptr.prototype.Contains = function(obj) { + var _i, _ref, cell, o, obj; + cell = this; + _ref = cell.Objects; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + o = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (o === obj) { + return true; + } + _i++; + } + return false; + }; + Cell.prototype.Contains = function(obj) { return this.$val.Contains(obj); }; + Cell.ptr.prototype.ContainsTags = function(tags) { + var _i, _ref, cell, o, tags; + cell = this; + _ref = cell.Objects; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + o = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (o.HasTags(tags)) { + return true; + } + _i++; + } + return false; + }; + Cell.prototype.ContainsTags = function(tags) { return this.$val.ContainsTags(tags); }; + Cell.ptr.prototype.Occupied = function() { + var cell; + cell = this; + return cell.Objects.$length > 0; + }; + Cell.prototype.Occupied = function() { return this.$val.Occupied(); }; + Vector.methods = [{prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Vector], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([sliceType$4], [Vector], true)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([sliceType$4], [Vector], true)}, {prop: "Scale", name: "Scale", pkg: "", typ: $funcType([$Float64], [Vector], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([Vector], [$Bool], false)}, {prop: "Magnitude", name: "Magnitude", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Magnitude2", name: "Magnitude2", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Unit", name: "Unit", pkg: "", typ: $funcType([], [Vector], false)}, {prop: "Dot", name: "Dot", pkg: "", typ: $funcType([Vector], [$Float64], false)}, {prop: "Cross", name: "Cross", pkg: "", typ: $funcType([Vector], [Vector], false)}, {prop: "Rotate", name: "Rotate", pkg: "", typ: $funcType([$Float64, sliceType$7], [Vector], true)}, {prop: "X", name: "X", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Y", name: "Y", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Z", name: "Z", pkg: "", typ: $funcType([], [$Float64], false)}]; + ptrType$1.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([sliceType$3], [], true)}, {prop: "Remove", name: "Remove", pkg: "", typ: $funcType([sliceType$3], [], true)}, {prop: "Objects", name: "Objects", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "Resize", name: "Resize", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Cell", name: "Cell", pkg: "", typ: $funcType([$Int, $Int], [ptrType], false)}, {prop: "CheckCells", name: "CheckCells", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int, sliceType$6], [ptrType$2], true)}, {prop: "CheckCellsWorld", name: "CheckCellsWorld", pkg: "", typ: $funcType([$Float64, $Float64, $Float64, $Float64, sliceType$6], [ptrType$2], true)}, {prop: "UnregisterAllObjects", name: "UnregisterAllObjects", pkg: "", typ: $funcType([], [], false)}, {prop: "WorldToSpace", name: "WorldToSpace", pkg: "", typ: $funcType([$Float64, $Float64], [$Int, $Int], false)}, {prop: "SpaceToWorld", name: "SpaceToWorld", pkg: "", typ: $funcType([$Int, $Int], [$Float64, $Float64], false)}, {prop: "Height", name: "Height", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CellsInLine", name: "CellsInLine", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int], [sliceType$1], false)}]; + ptrType$3.methods = [{prop: "Project", name: "Project", pkg: "", typ: $funcType([Vector], [Vector], false)}, {prop: "Normal", name: "Normal", pkg: "", typ: $funcType([], [Vector], false)}, {prop: "Vector", name: "Vector", pkg: "", typ: $funcType([], [Vector], false)}, {prop: "IntersectionPointsLine", name: "IntersectionPointsLine", pkg: "", typ: $funcType([ptrType$3], [Vector], false)}, {prop: "IntersectionPointsCircle", name: "IntersectionPointsCircle", pkg: "", typ: $funcType([ptrType$4], [sliceType$4], false)}]; + ptrType$5.methods = [{prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Shape], false)}, {prop: "AddPointsVec", name: "AddPointsVec", pkg: "", typ: $funcType([sliceType$4], [], true)}, {prop: "AddPoints", name: "AddPoints", pkg: "", typ: $funcType([sliceType], [], true)}, {prop: "Lines", name: "Lines", pkg: "", typ: $funcType([], [sliceType$5], false)}, {prop: "Transformed", name: "Transformed", pkg: "", typ: $funcType([], [sliceType$4], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Vector, Vector], false)}, {prop: "Position", name: "Position", pkg: "", typ: $funcType([], [$Float64, $Float64], false)}, {prop: "SetPosition", name: "SetPosition", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}, {prop: "SetPositionVec", name: "SetPositionVec", pkg: "", typ: $funcType([Vector], [], false)}, {prop: "Move", name: "Move", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}, {prop: "MoveVec", name: "MoveVec", pkg: "", typ: $funcType([Vector], [], false)}, {prop: "Center", name: "Center", pkg: "", typ: $funcType([], [Vector], false)}, {prop: "Project", name: "Project", pkg: "", typ: $funcType([Vector], [Projection], false)}, {prop: "SATAxes", name: "SATAxes", pkg: "", typ: $funcType([], [sliceType$4], false)}, {prop: "PointInside", name: "PointInside", pkg: "", typ: $funcType([Vector], [$Bool], false)}, {prop: "Intersection", name: "Intersection", pkg: "", typ: $funcType([$Float64, $Float64, Shape], [ptrType$6], false)}, {prop: "calculateMTV", name: "calculateMTV", pkg: "resolv", typ: $funcType([ptrType$6, Shape], [Vector], false)}, {prop: "ContainedBy", name: "ContainedBy", pkg: "", typ: $funcType([Shape], [$Bool], false)}, {prop: "FlipH", name: "FlipH", pkg: "", typ: $funcType([], [], false)}, {prop: "FlipV", name: "FlipV", pkg: "", typ: $funcType([], [], false)}, {prop: "ReverseVertexOrder", name: "ReverseVertexOrder", pkg: "", typ: $funcType([], [], false)}]; + ptrType$6.methods = [{prop: "LeftmostPoint", name: "LeftmostPoint", pkg: "", typ: $funcType([], [Vector], false)}, {prop: "RightmostPoint", name: "RightmostPoint", pkg: "", typ: $funcType([], [Vector], false)}, {prop: "TopmostPoint", name: "TopmostPoint", pkg: "", typ: $funcType([], [Vector], false)}, {prop: "BottommostPoint", name: "BottommostPoint", pkg: "", typ: $funcType([], [Vector], false)}]; + ptrType$4.methods = [{prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Shape], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Vector, Vector], false)}, {prop: "Intersection", name: "Intersection", pkg: "", typ: $funcType([$Float64, $Float64, Shape], [ptrType$6], false)}, {prop: "Move", name: "Move", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}, {prop: "MoveVec", name: "MoveVec", pkg: "", typ: $funcType([Vector], [], false)}, {prop: "SetPosition", name: "SetPosition", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}, {prop: "SetPositionVec", name: "SetPositionVec", pkg: "", typ: $funcType([Vector], [], false)}, {prop: "Position", name: "Position", pkg: "", typ: $funcType([], [$Float64, $Float64], false)}, {prop: "PointInside", name: "PointInside", pkg: "", typ: $funcType([Vector], [$Bool], false)}, {prop: "IntersectionPointsCircle", name: "IntersectionPointsCircle", pkg: "", typ: $funcType([ptrType$4], [sliceType$4], false)}]; + Projection.methods = [{prop: "Overlapping", name: "Overlapping", pkg: "", typ: $funcType([Projection], [$Bool], false)}, {prop: "Overlap", name: "Overlap", pkg: "", typ: $funcType([Projection], [$Float64], false)}, {prop: "IsInside", name: "IsInside", pkg: "", typ: $funcType([Projection], [$Bool], false)}]; + ptrType$2.methods = [{prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "Update", name: "Update", pkg: "", typ: $funcType([], [], false)}, {prop: "AddTags", name: "AddTags", pkg: "", typ: $funcType([sliceType$6], [], true)}, {prop: "RemoveTags", name: "RemoveTags", pkg: "", typ: $funcType([sliceType$6], [], true)}, {prop: "HasTags", name: "HasTags", pkg: "", typ: $funcType([sliceType$6], [$Bool], true)}, {prop: "Tags", name: "Tags", pkg: "", typ: $funcType([], [sliceType$6], false)}, {prop: "SetShape", name: "SetShape", pkg: "", typ: $funcType([Shape], [], false)}, {prop: "BoundsToSpace", name: "BoundsToSpace", pkg: "", typ: $funcType([$Float64, $Float64], [$Int, $Int, $Int, $Int], false)}, {prop: "SharesCells", name: "SharesCells", pkg: "", typ: $funcType([ptrType$2], [$Bool], false)}, {prop: "SharesCellsTags", name: "SharesCellsTags", pkg: "", typ: $funcType([sliceType$6], [$Bool], true)}, {prop: "Center", name: "Center", pkg: "", typ: $funcType([], [$Float64, $Float64], false)}, {prop: "SetCenter", name: "SetCenter", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}, {prop: "CellPosition", name: "CellPosition", pkg: "", typ: $funcType([], [$Int, $Int], false)}, {prop: "SetRight", name: "SetRight", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "SetBottom", name: "SetBottom", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "Bottom", name: "Bottom", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Right", name: "Right", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "SetBounds", name: "SetBounds", pkg: "", typ: $funcType([Vector, Vector], [], false)}, {prop: "Check", name: "Check", pkg: "", typ: $funcType([$Float64, $Float64, sliceType$6], [ptrType$7], true)}, {prop: "Overlaps", name: "Overlaps", pkg: "", typ: $funcType([ptrType$2], [$Bool], false)}, {prop: "AddToIgnoreList", name: "AddToIgnoreList", pkg: "", typ: $funcType([ptrType$2], [], false)}, {prop: "RemoveFromIgnoreList", name: "RemoveFromIgnoreList", pkg: "", typ: $funcType([ptrType$2], [], false)}]; + ptrType$7.methods = [{prop: "HasTags", name: "HasTags", pkg: "", typ: $funcType([sliceType$6], [$Bool], true)}, {prop: "ObjectsByTags", name: "ObjectsByTags", pkg: "", typ: $funcType([sliceType$6], [sliceType$3], true)}, {prop: "ContactWithObject", name: "ContactWithObject", pkg: "", typ: $funcType([ptrType$2], [Vector], false)}, {prop: "ContactWithCell", name: "ContactWithCell", pkg: "", typ: $funcType([ptrType], [Vector], false)}, {prop: "SlideAgainstCell", name: "SlideAgainstCell", pkg: "", typ: $funcType([ptrType, sliceType$6], [Vector], true)}]; + ptrType.methods = [{prop: "register", name: "register", pkg: "resolv", typ: $funcType([ptrType$2], [], false)}, {prop: "unregister", name: "unregister", pkg: "resolv", typ: $funcType([ptrType$2], [], false)}, {prop: "Contains", name: "Contains", pkg: "", typ: $funcType([ptrType$2], [$Bool], false)}, {prop: "ContainsTags", name: "ContainsTags", pkg: "", typ: $funcType([sliceType$6], [$Bool], true)}, {prop: "Occupied", name: "Occupied", pkg: "", typ: $funcType([], [$Bool], false)}]; + Vector.init($Float64); + Space.init("", [{prop: "Cells", name: "Cells", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "CellWidth", name: "CellWidth", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "CellHeight", name: "CellHeight", embedded: false, exported: true, typ: $Int, tag: ""}]); + Shape.init([{prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [Vector, Vector], false)}, {prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Shape], false)}, {prop: "Intersection", name: "Intersection", pkg: "", typ: $funcType([$Float64, $Float64, Shape], [ptrType$6], false)}, {prop: "Position", name: "Position", pkg: "", typ: $funcType([], [$Float64, $Float64], false)}, {prop: "SetPosition", name: "SetPosition", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}]); + Line.init("", [{prop: "Start", name: "Start", embedded: false, exported: true, typ: Vector, tag: ""}, {prop: "End", name: "End", embedded: false, exported: true, typ: Vector, tag: ""}]); + ConvexPolygon.init("", [{prop: "Points", name: "Points", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "X", name: "X", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Closed", name: "Closed", embedded: false, exported: true, typ: $Bool, tag: ""}]); + ContactSet.init("", [{prop: "Points", name: "Points", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "MTV", name: "MTV", embedded: false, exported: true, typ: Vector, tag: ""}, {prop: "Center", name: "Center", embedded: false, exported: true, typ: Vector, tag: ""}]); + Circle.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Radius", name: "Radius", embedded: false, exported: true, typ: $Float64, tag: ""}]); + Projection.init("", [{prop: "Min", name: "Min", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Max", name: "Max", embedded: false, exported: true, typ: $Float64, tag: ""}]); + Object.init("resolv", [{prop: "Shape", name: "Shape", embedded: false, exported: true, typ: Shape, tag: ""}, {prop: "Space", name: "Space", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "X", name: "X", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "W", name: "W", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "H", name: "H", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "TouchingCells", name: "TouchingCells", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Data", name: "Data", embedded: false, exported: true, typ: $emptyInterface, tag: ""}, {prop: "ignoreList", name: "ignoreList", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "tags", name: "tags", embedded: false, exported: false, typ: sliceType$6, tag: ""}]); + Collision.init("resolv", [{prop: "checkingObject", name: "checkingObject", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "dx", name: "dx", embedded: false, exported: false, typ: $Float64, tag: ""}, {prop: "dy", name: "dy", embedded: false, exported: false, typ: $Float64, tag: ""}, {prop: "Objects", name: "Objects", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "Cells", name: "Cells", embedded: false, exported: true, typ: sliceType$1, tag: ""}]); + Cell.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Objects", name: "Objects", embedded: false, exported: true, typ: sliceType$3, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = math.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["jsexport/battle"] = (function() { + var $pkg = {}, $init, math, resolv, Vec2D, Polygon2D, PlayerDownsync, InputFrameDecoded, Barrier, Bullet, MeleeBullet, FireballBullet, RoomDownsyncFrame, InputFrameDownsync, CharacterConfig, RingBuffer, SatResult, sliceType, sliceType$1, sliceType$2, ptrType, sliceType$3, sliceType$4, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, sliceType$5, sliceType$6, sliceType$7, sliceType$8, sliceType$9, ptrType$7, sliceType$10, ptrType$8, sliceType$11, sliceType$12, ptrType$9, sliceType$13, ptrType$10, mapType, ptrType$11, skillIdToBullet, inAirSet, NewRingBuffer, ConvertToInputFrameId, decodeInput, CalcPushbacks, isPolygonPairOverlapped, isPolygonPairSeparatedByDir, WorldToVirtualGridPos, VirtualGridToWorldPos, WorldToPolygonColliderBLPos, PolygonColliderBLToWorldPos, PolygonColliderBLToVirtualGridPos, VirtualGridToPolygonColliderBLPos, calcHardPushbacksNorms, deriveOpPattern, ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame, GenerateRectCollider, generateRectColliderInCollisionSpace, GenerateConvexPolygonCollider, AlignPolygon2DToBoundingBox; + math = $packages["math"]; + resolv = $packages["resolv"]; + Vec2D = $pkg.Vec2D = $newType(0, $kindStruct, "battle.Vec2D", true, "jsexport/battle", true, function(X_, Y_) { + this.$val = this; + if (arguments.length === 0) { + this.X = 0; + this.Y = 0; + return; + } + this.X = X_; + this.Y = Y_; + }); + Polygon2D = $pkg.Polygon2D = $newType(0, $kindStruct, "battle.Polygon2D", true, "jsexport/battle", true, function(Anchor_, Points_) { + this.$val = this; + if (arguments.length === 0) { + this.Anchor = ptrType$9.nil; + this.Points = sliceType$13.nil; + return; + } + this.Anchor = Anchor_; + this.Points = Points_; + }); + PlayerDownsync = $pkg.PlayerDownsync = $newType(0, $kindStruct, "battle.PlayerDownsync", true, "jsexport/battle", true, function(Id_, VirtualGridX_, VirtualGridY_, DirX_, DirY_, VelX_, VelY_, Speed_, BattleState_, JoinIndex_, ColliderRadius_, Removed_, Score_, LastMoveGmtMillis_, FramesToRecover_, FramesInChState_, Hp_, MaxHp_, CharacterState_, InAir_) { + this.$val = this; + if (arguments.length === 0) { + this.Id = 0; + this.VirtualGridX = 0; + this.VirtualGridY = 0; + this.DirX = 0; + this.DirY = 0; + this.VelX = 0; + this.VelY = 0; + this.Speed = 0; + this.BattleState = 0; + this.JoinIndex = 0; + this.ColliderRadius = 0; + this.Removed = false; + this.Score = 0; + this.LastMoveGmtMillis = 0; + this.FramesToRecover = 0; + this.FramesInChState = 0; + this.Hp = 0; + this.MaxHp = 0; + this.CharacterState = 0; + this.InAir = false; + return; + } + this.Id = Id_; + this.VirtualGridX = VirtualGridX_; + this.VirtualGridY = VirtualGridY_; + this.DirX = DirX_; + this.DirY = DirY_; + this.VelX = VelX_; + this.VelY = VelY_; + this.Speed = Speed_; + this.BattleState = BattleState_; + this.JoinIndex = JoinIndex_; + this.ColliderRadius = ColliderRadius_; + this.Removed = Removed_; + this.Score = Score_; + this.LastMoveGmtMillis = LastMoveGmtMillis_; + this.FramesToRecover = FramesToRecover_; + this.FramesInChState = FramesInChState_; + this.Hp = Hp_; + this.MaxHp = MaxHp_; + this.CharacterState = CharacterState_; + this.InAir = InAir_; + }); + InputFrameDecoded = $pkg.InputFrameDecoded = $newType(0, $kindStruct, "battle.InputFrameDecoded", true, "jsexport/battle", true, function(Dx_, Dy_, BtnALevel_, BtnBLevel_) { + this.$val = this; + if (arguments.length === 0) { + this.Dx = 0; + this.Dy = 0; + this.BtnALevel = 0; + this.BtnBLevel = 0; + return; + } + this.Dx = Dx_; + this.Dy = Dy_; + this.BtnALevel = BtnALevel_; + this.BtnBLevel = BtnBLevel_; + }); + Barrier = $pkg.Barrier = $newType(0, $kindStruct, "battle.Barrier", true, "jsexport/battle", true, function(Boundary_) { + this.$val = this; + if (arguments.length === 0) { + this.Boundary = ptrType$10.nil; + return; + } + this.Boundary = Boundary_; + }); + Bullet = $pkg.Bullet = $newType(0, $kindStruct, "battle.Bullet", true, "jsexport/battle", true, function(BattleLocalId_, StartupFrames_, ActiveFrames_, RecoveryFrames_, RecoveryFramesOnBlock_, RecoveryFramesOnHit_, HitboxOffset_, OriginatedRenderFrameId_, HitStunFrames_, BlockStunFrames_, Pushback_, ReleaseTriggerType_, Damage_, OffenderJoinIndex_, OffenderPlayerId_, SelfMoveforwardX_, SelfMoveforwardY_, HitboxSizeX_, HitboxSizeY_, BlowUpVelY_) { + this.$val = this; + if (arguments.length === 0) { + this.BattleLocalId = 0; + this.StartupFrames = 0; + this.ActiveFrames = 0; + this.RecoveryFrames = 0; + this.RecoveryFramesOnBlock = 0; + this.RecoveryFramesOnHit = 0; + this.HitboxOffset = 0; + this.OriginatedRenderFrameId = 0; + this.HitStunFrames = 0; + this.BlockStunFrames = 0; + this.Pushback = 0; + this.ReleaseTriggerType = 0; + this.Damage = 0; + this.OffenderJoinIndex = 0; + this.OffenderPlayerId = 0; + this.SelfMoveforwardX = 0; + this.SelfMoveforwardY = 0; + this.HitboxSizeX = 0; + this.HitboxSizeY = 0; + this.BlowUpVelY = 0; + return; + } + this.BattleLocalId = BattleLocalId_; + this.StartupFrames = StartupFrames_; + this.ActiveFrames = ActiveFrames_; + this.RecoveryFrames = RecoveryFrames_; + this.RecoveryFramesOnBlock = RecoveryFramesOnBlock_; + this.RecoveryFramesOnHit = RecoveryFramesOnHit_; + this.HitboxOffset = HitboxOffset_; + this.OriginatedRenderFrameId = OriginatedRenderFrameId_; + this.HitStunFrames = HitStunFrames_; + this.BlockStunFrames = BlockStunFrames_; + this.Pushback = Pushback_; + this.ReleaseTriggerType = ReleaseTriggerType_; + this.Damage = Damage_; + this.OffenderJoinIndex = OffenderJoinIndex_; + this.OffenderPlayerId = OffenderPlayerId_; + this.SelfMoveforwardX = SelfMoveforwardX_; + this.SelfMoveforwardY = SelfMoveforwardY_; + this.HitboxSizeX = HitboxSizeX_; + this.HitboxSizeY = HitboxSizeY_; + this.BlowUpVelY = BlowUpVelY_; + }); + MeleeBullet = $pkg.MeleeBullet = $newType(0, $kindStruct, "battle.MeleeBullet", true, "jsexport/battle", true, function(Bullet_) { + this.$val = this; + if (arguments.length === 0) { + this.Bullet = new Bullet.ptr(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + return; + } + this.Bullet = Bullet_; + }); + FireballBullet = $pkg.FireballBullet = $newType(0, $kindStruct, "battle.FireballBullet", true, "jsexport/battle", true, function(VirtualGridX_, VirtualGridY_, DirX_, DirY_, VelX_, VelY_, Speed_, Bullet_) { + this.$val = this; + if (arguments.length === 0) { + this.VirtualGridX = 0; + this.VirtualGridY = 0; + this.DirX = 0; + this.DirY = 0; + this.VelX = 0; + this.VelY = 0; + this.Speed = 0; + this.Bullet = new Bullet.ptr(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + return; + } + this.VirtualGridX = VirtualGridX_; + this.VirtualGridY = VirtualGridY_; + this.DirX = DirX_; + this.DirY = DirY_; + this.VelX = VelX_; + this.VelY = VelY_; + this.Speed = Speed_; + this.Bullet = Bullet_; + }); + RoomDownsyncFrame = $pkg.RoomDownsyncFrame = $newType(0, $kindStruct, "battle.RoomDownsyncFrame", true, "jsexport/battle", true, function(Id_, PlayersArr_, CountdownNanos_, MeleeBullets_, FireballBullets_, BackendUnconfirmedMask_, ShouldForceResync_, PlayerOpPatternToSkillId_) { + this.$val = this; + if (arguments.length === 0) { + this.Id = 0; + this.PlayersArr = sliceType$6.nil; + this.CountdownNanos = new $Int64(0, 0); + this.MeleeBullets = sliceType$7.nil; + this.FireballBullets = sliceType$11.nil; + this.BackendUnconfirmedMask = new $Uint64(0, 0); + this.ShouldForceResync = false; + this.PlayerOpPatternToSkillId = false; + return; + } + this.Id = Id_; + this.PlayersArr = PlayersArr_; + this.CountdownNanos = CountdownNanos_; + this.MeleeBullets = MeleeBullets_; + this.FireballBullets = FireballBullets_; + this.BackendUnconfirmedMask = BackendUnconfirmedMask_; + this.ShouldForceResync = ShouldForceResync_; + this.PlayerOpPatternToSkillId = PlayerOpPatternToSkillId_; + }); + InputFrameDownsync = $pkg.InputFrameDownsync = $newType(0, $kindStruct, "battle.InputFrameDownsync", true, "jsexport/battle", true, function(InputFrameId_, InputList_, ConfirmedList_) { + this.$val = this; + if (arguments.length === 0) { + this.InputFrameId = 0; + this.InputList = sliceType$5.nil; + this.ConfirmedList = new $Uint64(0, 0); + return; + } + this.InputFrameId = InputFrameId_; + this.InputList = InputList_; + this.ConfirmedList = ConfirmedList_; + }); + CharacterConfig = $pkg.CharacterConfig = $newType(0, $kindStruct, "battle.CharacterConfig", true, "jsexport/battle", true, function(SpeciesId_, SpeciesName_, InAirIdleFrameIdxTurningPoint_, InAirIdleFrameIdxTurnedCycle_, LayDownFrames_, LayDownFramesToRecover_, GetUpFrames_, GetUpFramesToRecover_, JumpingInitVelY_, PatternIdToSkillId_) { + this.$val = this; + if (arguments.length === 0) { + this.SpeciesId = 0; + this.SpeciesName = ""; + this.InAirIdleFrameIdxTurningPoint = 0; + this.InAirIdleFrameIdxTurnedCycle = 0; + this.LayDownFrames = 0; + this.LayDownFramesToRecover = 0; + this.GetUpFrames = 0; + this.GetUpFramesToRecover = 0; + this.JumpingInitVelY = 0; + this.PatternIdToSkillId = false; + return; + } + this.SpeciesId = SpeciesId_; + this.SpeciesName = SpeciesName_; + this.InAirIdleFrameIdxTurningPoint = InAirIdleFrameIdxTurningPoint_; + this.InAirIdleFrameIdxTurnedCycle = InAirIdleFrameIdxTurnedCycle_; + this.LayDownFrames = LayDownFrames_; + this.LayDownFramesToRecover = LayDownFramesToRecover_; + this.GetUpFrames = GetUpFrames_; + this.GetUpFramesToRecover = GetUpFramesToRecover_; + this.JumpingInitVelY = JumpingInitVelY_; + this.PatternIdToSkillId = PatternIdToSkillId_; + }); + RingBuffer = $pkg.RingBuffer = $newType(0, $kindStruct, "battle.RingBuffer", true, "jsexport/battle", true, function(Ed_, St_, EdFrameId_, StFrameId_, N_, Cnt_, Eles_) { + this.$val = this; + if (arguments.length === 0) { + this.Ed = 0; + this.St = 0; + this.EdFrameId = 0; + this.StFrameId = 0; + this.N = 0; + this.Cnt = 0; + this.Eles = sliceType$2.nil; + return; + } + this.Ed = Ed_; + this.St = St_; + this.EdFrameId = EdFrameId_; + this.StFrameId = StFrameId_; + this.N = N_; + this.Cnt = Cnt_; + this.Eles = Eles_; + }); + SatResult = $pkg.SatResult = $newType(0, $kindStruct, "battle.SatResult", true, "jsexport/battle", true, function(Overlap_, OverlapX_, OverlapY_, AContainedInB_, BContainedInA_, Axis_) { + this.$val = this; + if (arguments.length === 0) { + this.Overlap = 0; + this.OverlapX = 0; + this.OverlapY = 0; + this.AContainedInB = false; + this.BContainedInA = false; + this.Axis = resolv.Vector.nil; + return; + } + this.Overlap = Overlap_; + this.OverlapX = OverlapX_; + this.OverlapY = OverlapY_; + this.AContainedInB = AContainedInB_; + this.BContainedInA = BContainedInA_; + this.Axis = Axis_; + }); + sliceType = $sliceType($Int32); + sliceType$1 = $sliceType(sliceType); + sliceType$2 = $sliceType($emptyInterface); + ptrType = $ptrType(SatResult); + sliceType$3 = $sliceType(Vec2D); + sliceType$4 = $sliceType($String); + ptrType$1 = $ptrType(resolv.Collision); + ptrType$2 = $ptrType(sliceType$3); + ptrType$3 = $ptrType(PlayerDownsync); + ptrType$4 = $ptrType(MeleeBullet); + ptrType$5 = $ptrType(resolv.ConvexPolygon); + ptrType$6 = $ptrType(InputFrameDownsync); + sliceType$5 = $sliceType($Uint64); + sliceType$6 = $sliceType(ptrType$3); + sliceType$7 = $sliceType(ptrType$4); + sliceType$8 = $sliceType(ptrType$2); + sliceType$9 = $sliceType($Bool); + ptrType$7 = $ptrType(resolv.Object); + sliceType$10 = $sliceType(ptrType$7); + ptrType$8 = $ptrType(FireballBullet); + sliceType$11 = $sliceType(ptrType$8); + sliceType$12 = $sliceType($Float64); + ptrType$9 = $ptrType(Vec2D); + sliceType$13 = $sliceType(ptrType$9); + ptrType$10 = $ptrType(Polygon2D); + mapType = $mapType($Int, $Int); + ptrType$11 = $ptrType(RingBuffer); + NewRingBuffer = function(n) { + var n; + return new RingBuffer.ptr(0, 0, 0, 0, n, 0, $makeSlice(sliceType$2, n)); + }; + $pkg.NewRingBuffer = NewRingBuffer; + RingBuffer.ptr.prototype.Put = function(pItem) { + var pItem, rb, x, x$1; + rb = this; + while (true) { + if (!(0 < rb.Cnt && rb.Cnt >= rb.N)) { break; } + rb.Pop(); + } + (x = rb.Eles, x$1 = rb.Ed, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = pItem)); + rb.EdFrameId = rb.EdFrameId + (1) >> 0; + rb.Cnt = rb.Cnt + (1) >> 0; + rb.Ed = rb.Ed + (1) >> 0; + if (rb.Ed >= rb.N) { + rb.Ed = rb.Ed - (rb.N) >> 0; + } + }; + RingBuffer.prototype.Put = function(pItem) { return this.$val.Put(pItem); }; + RingBuffer.ptr.prototype.Pop = function() { + var pItem, rb, x, x$1; + rb = this; + if (0 === rb.Cnt) { + return $ifaceNil; + } + pItem = (x = rb.Eles, x$1 = rb.St, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); + rb.StFrameId = rb.StFrameId + (1) >> 0; + rb.Cnt = rb.Cnt - (1) >> 0; + rb.St = rb.St + (1) >> 0; + if (rb.St >= rb.N) { + rb.St = rb.St - (rb.N) >> 0; + } + return pItem; + }; + RingBuffer.prototype.Pop = function() { return this.$val.Pop(); }; + RingBuffer.ptr.prototype.GetArrIdxByOffset = function(offsetFromSt) { + var arrIdx, offsetFromSt, rb; + rb = this; + if ((0 === rb.Cnt) || 0 > offsetFromSt) { + return -1; + } + arrIdx = rb.St + offsetFromSt >> 0; + if (rb.St < rb.Ed) { + if (rb.St <= arrIdx && arrIdx < rb.Ed) { + return arrIdx; + } + } else { + if (arrIdx >= rb.N) { + arrIdx = arrIdx - (rb.N) >> 0; + } + if (arrIdx >= rb.St || arrIdx < rb.Ed) { + return arrIdx; + } + } + return -1; + }; + RingBuffer.prototype.GetArrIdxByOffset = function(offsetFromSt) { return this.$val.GetArrIdxByOffset(offsetFromSt); }; + RingBuffer.ptr.prototype.GetByOffset = function(offsetFromSt) { + var arrIdx, offsetFromSt, rb, x; + rb = this; + arrIdx = rb.GetArrIdxByOffset(offsetFromSt); + if (-1 === arrIdx) { + return $ifaceNil; + } + return (x = rb.Eles, ((arrIdx < 0 || arrIdx >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + arrIdx])); + }; + RingBuffer.prototype.GetByOffset = function(offsetFromSt) { return this.$val.GetByOffset(offsetFromSt); }; + RingBuffer.ptr.prototype.GetByFrameId = function(frameId) { + var frameId, rb; + rb = this; + if (frameId >= rb.EdFrameId || frameId < rb.StFrameId) { + return $ifaceNil; + } + return rb.GetByOffset(frameId - rb.StFrameId >> 0); + }; + RingBuffer.prototype.GetByFrameId = function(frameId) { return this.$val.GetByFrameId(frameId); }; + RingBuffer.ptr.prototype.SetByFrameId = function(pItem, frameId) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, arrIdx, frameId, oldEdFrameId, oldStFrameId, pItem, rb, ret, x; + rb = this; + _tmp = rb.StFrameId; + _tmp$1 = rb.EdFrameId; + oldStFrameId = _tmp; + oldEdFrameId = _tmp$1; + if (frameId < oldStFrameId) { + return [2, oldStFrameId, oldEdFrameId]; + } + if (oldEdFrameId > frameId) { + arrIdx = rb.GetArrIdxByOffset(frameId - rb.StFrameId >> 0); + if (!((-1 === arrIdx))) { + (x = rb.Eles, ((arrIdx < 0 || arrIdx >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + arrIdx] = pItem)); + return [0, oldStFrameId, oldEdFrameId]; + } + } + ret = 0; + if (oldEdFrameId < frameId) { + _tmp$2 = 0; + _tmp$3 = 0; + rb.St = _tmp$2; + rb.Ed = _tmp$3; + _tmp$4 = frameId; + _tmp$5 = frameId; + rb.StFrameId = _tmp$4; + rb.EdFrameId = _tmp$5; + rb.Cnt = 0; + ret = 1; + } + rb.Put(pItem); + return [ret, oldStFrameId, oldEdFrameId]; + }; + RingBuffer.prototype.SetByFrameId = function(pItem, frameId) { return this.$val.SetByFrameId(pItem, frameId); }; + ConvertToInputFrameId = function(renderFrameId, inputDelayFrames, inputScaleFrames) { + var inputDelayFrames, inputScaleFrames, renderFrameId; + if (renderFrameId < inputDelayFrames) { + return 0; + } + return ((((renderFrameId - inputDelayFrames >> 0)) >> $min(inputScaleFrames, 31)) >> 0); + }; + $pkg.ConvertToInputFrameId = ConvertToInputFrameId; + decodeInput = function(encodedInput) { + var btnALevel, btnBLevel, encodedDirection, encodedInput, x, x$1, x$2, x$3; + encodedDirection = new $Uint64(encodedInput.$high & 0, (encodedInput.$low & 15) >>> 0); + btnALevel = (((x = $shiftRightUint64(encodedInput, 4), new $Uint64(x.$high & 0, (x.$low & 1) >>> 0)).$low >> 0)); + btnBLevel = (((x$1 = $shiftRightUint64(encodedInput, 5), new $Uint64(x$1.$high & 0, (x$1.$low & 1) >>> 0)).$low >> 0)); + return new InputFrameDecoded.ptr((x$2 = (($flatten64(encodedDirection) < 0 || $flatten64(encodedDirection) >= $pkg.DIRECTION_DECODER.$length) ? ($throwRuntimeError("index out of range"), undefined) : $pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset + $flatten64(encodedDirection)]), (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])), (x$3 = (($flatten64(encodedDirection) < 0 || $flatten64(encodedDirection) >= $pkg.DIRECTION_DECODER.$length) ? ($throwRuntimeError("index out of range"), undefined) : $pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset + $flatten64(encodedDirection)]), (1 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 1])), btnALevel, btnBLevel); + }; + CalcPushbacks = function(oldDx, oldDy, playerShape, barrierShape) { + var {$24r, $24r$1, _tmp, _tmp$1, _tuple, barrierShape, oldDx, oldDy, origX, origY, overlapResult, overlapped, playerShape, pushbackX, pushbackY, $s, $deferred, $r, $c} = $restore(this, {oldDx, oldDy, playerShape, barrierShape}); + /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); + origX = [origX]; + origY = [origY]; + playerShape = [playerShape]; + _tuple = playerShape[0].Position(); + origX[0] = _tuple[0]; + origY[0] = _tuple[1]; + $deferred.push([(function(origX, origY, playerShape) { return function() { + playerShape[0].SetPosition(origX[0], origY[0]); + }; })(origX, origY, playerShape), []]); + playerShape[0].SetPosition(origX[0] + oldDx, origY[0] + oldDy); + overlapResult = new SatResult.ptr(0, 0, 0, true, true, new resolv.Vector([0, 0])); + overlapped = isPolygonPairOverlapped(playerShape[0], barrierShape, overlapResult); + /* */ if (overlapped) { $s = 1; continue; } + /* */ $s = 2; continue; + /* if (overlapped) { */ case 1: + _tmp = overlapResult.Overlap * overlapResult.OverlapX; + _tmp$1 = overlapResult.Overlap * overlapResult.OverlapY; + pushbackX = _tmp; + pushbackY = _tmp$1; + $24r = [true, pushbackX, pushbackY, overlapResult]; + $s = 4; case 4: return $24r; + /* } else { */ case 2: + $24r$1 = [false, 0, 0, overlapResult]; + $s = 5; case 5: return $24r$1; + /* } */ case 3: + $s = -1; return [false, 0, 0, ptrType.nil]; + /* */ } return; } } catch(err) { $err = err; $s = -1; return [false, 0, 0, ptrType.nil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: CalcPushbacks, $c: true, $r, $24r, $24r$1, _tmp, _tmp$1, _tuple, barrierShape, oldDx, oldDy, origX, origY, overlapResult, overlapped, playerShape, pushbackX, pushbackY, $s, $deferred};return $f; } } + }; + $pkg.CalcPushbacks = CalcPushbacks; + isPolygonPairOverlapped = function(a, b, result) { + var _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, a, aCnt, axis, axis$1, b, bCnt, result, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; + _tmp = a.Points.$length; + _tmp$1 = b.Points.$length; + aCnt = _tmp; + bCnt = _tmp$1; + if ((1 === aCnt) && (1 === bCnt)) { + if (!(ptrType.nil === result)) { + result.Overlap = 0; + } + return ((x = (x$1 = a.Points, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === (x$2 = (x$3 = b.Points, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])), (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0]))) && ((x$4 = (x$5 = a.Points, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0])), (1 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 1])) === (x$6 = (x$7 = b.Points, (0 >= x$7.$length ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + 0])), (1 >= x$6.$length ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + 1]))); + } + if (1 < aCnt) { + _ref = a.SATAxes(); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + axis = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (isPolygonPairSeparatedByDir(a, b, axis.Unit(), result)) { + return false; + } + _i++; + } + } + if (1 < bCnt) { + _ref$1 = b.SATAxes(); + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + axis$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (isPolygonPairSeparatedByDir(a, b, axis$1.Unit(), result)) { + return false; + } + _i$1++; + } + } + return true; + }; + isPolygonPairSeparatedByDir = function(a, b, e, result) { + var _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, a, aEnd, aStart, absoluteOverlap, b, bEnd, bStart, currentOverlap, dot, dot$1, e, option1, option1$1, option2, option2$1, overlap, p, p$1, result, sign, x, x$1; + _tmp = 1.7e+308; + _tmp$1 = -1.7e+308; + _tmp$2 = 1.7e+308; + _tmp$3 = -1.7e+308; + aStart = _tmp; + aEnd = _tmp$1; + bStart = _tmp$2; + bEnd = _tmp$3; + _ref = a.Points; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + p = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + dot = ((0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]) + a.X) * (0 >= e.$length ? ($throwRuntimeError("index out of range"), undefined) : e.$array[e.$offset + 0]) + ((1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]) + a.Y) * (1 >= e.$length ? ($throwRuntimeError("index out of range"), undefined) : e.$array[e.$offset + 1]); + if (aStart > dot) { + aStart = dot; + } + if (aEnd < dot) { + aEnd = dot; + } + _i++; + } + _ref$1 = b.Points; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + p$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + dot$1 = ((0 >= p$1.$length ? ($throwRuntimeError("index out of range"), undefined) : p$1.$array[p$1.$offset + 0]) + b.X) * (0 >= e.$length ? ($throwRuntimeError("index out of range"), undefined) : e.$array[e.$offset + 0]) + ((1 >= p$1.$length ? ($throwRuntimeError("index out of range"), undefined) : p$1.$array[p$1.$offset + 1]) + b.Y) * (1 >= e.$length ? ($throwRuntimeError("index out of range"), undefined) : e.$array[e.$offset + 1]); + if (bStart > dot$1) { + bStart = dot$1; + } + if (bEnd < dot$1) { + bEnd = dot$1; + } + _i$1++; + } + if (aStart > bEnd || aEnd < bStart) { + return true; + } + if (!(ptrType.nil === result)) { + overlap = 0; + if (aStart < bStart) { + result.AContainedInB = false; + if (aEnd < bEnd) { + overlap = aEnd - bStart; + result.BContainedInA = false; + } else { + option1 = aEnd - bStart; + option2 = bEnd - aStart; + if (option1 < option2) { + overlap = option1; + } else { + overlap = -option2; + } + } + } else { + result.BContainedInA = false; + if (aEnd > bEnd) { + overlap = aStart - bEnd; + result.AContainedInB = false; + } else { + option1$1 = aEnd - bStart; + option2$1 = bEnd - aStart; + if (option1$1 < option2$1) { + overlap = option1$1; + } else { + overlap = -option2$1; + } + } + } + currentOverlap = result.Overlap; + absoluteOverlap = overlap; + if (overlap < 0) { + absoluteOverlap = -overlap; + } + if (((0 === (x = result.Axis, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]))) && (0 === (x$1 = result.Axis, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])))) || currentOverlap > absoluteOverlap) { + sign = 1; + if (overlap < 0) { + sign = -1; + } + result.Overlap = absoluteOverlap; + result.OverlapX = (0 >= e.$length ? ($throwRuntimeError("index out of range"), undefined) : e.$array[e.$offset + 0]) * sign; + result.OverlapY = (1 >= e.$length ? ($throwRuntimeError("index out of range"), undefined) : e.$array[e.$offset + 1]) * sign; + } + result.Axis = e; + } + return false; + }; + WorldToVirtualGridPos = function(wx, wy, worldToVirtualGridRatio) { + var virtualGridX, virtualGridY, worldToVirtualGridRatio, wx, wy; + virtualGridX = ((math.Floor(wx * worldToVirtualGridRatio) >> 0)); + virtualGridY = ((math.Floor(wy * worldToVirtualGridRatio) >> 0)); + return [virtualGridX, virtualGridY]; + }; + $pkg.WorldToVirtualGridPos = WorldToVirtualGridPos; + VirtualGridToWorldPos = function(vx, vy, virtualGridToWorldRatio) { + var virtualGridToWorldRatio, vx, vy, wx, wy; + wx = (vx) * virtualGridToWorldRatio; + wy = (vy) * virtualGridToWorldRatio; + return [wx, wy]; + }; + $pkg.VirtualGridToWorldPos = VirtualGridToWorldPos; + WorldToPolygonColliderBLPos = function(wx, wy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY) { + var bottomPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, halfBoundingH, halfBoundingW, leftPadding, rightPadding, topPadding, wx, wy; + return [wx - halfBoundingW - leftPadding + collisionSpaceOffsetX, wy - halfBoundingH - bottomPadding + collisionSpaceOffsetY]; + }; + $pkg.WorldToPolygonColliderBLPos = WorldToPolygonColliderBLPos; + PolygonColliderBLToWorldPos = function(cx, cy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY) { + var bottomPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, cx, cy, halfBoundingH, halfBoundingW, leftPadding, rightPadding, topPadding; + return [cx + halfBoundingW + leftPadding - collisionSpaceOffsetX, cy + halfBoundingH + bottomPadding - collisionSpaceOffsetY]; + }; + $pkg.PolygonColliderBLToWorldPos = PolygonColliderBLToWorldPos; + PolygonColliderBLToVirtualGridPos = function(cx, cy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, worldToVirtualGridRatio) { + var _tuple, bottomPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, cx, cy, halfBoundingH, halfBoundingW, leftPadding, rightPadding, topPadding, worldToVirtualGridRatio, wx, wy; + _tuple = PolygonColliderBLToWorldPos(cx, cy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY); + wx = _tuple[0]; + wy = _tuple[1]; + return WorldToVirtualGridPos(wx, wy, worldToVirtualGridRatio); + }; + $pkg.PolygonColliderBLToVirtualGridPos = PolygonColliderBLToVirtualGridPos; + VirtualGridToPolygonColliderBLPos = function(vx, vy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, virtualGridToWorldRatio) { + var _tuple, bottomPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, halfBoundingH, halfBoundingW, leftPadding, rightPadding, topPadding, virtualGridToWorldRatio, vx, vy, wx, wy; + _tuple = VirtualGridToWorldPos(vx, vy, virtualGridToWorldRatio); + wx = _tuple[0]; + wy = _tuple[1]; + return WorldToPolygonColliderBLPos(wx, wy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY); + }; + $pkg.VirtualGridToPolygonColliderBLPos = VirtualGridToPolygonColliderBLPos; + calcHardPushbacksNorms = function(joinIndex, playerCollider, playerShape, snapIntoPlatformOverlap, pEffPushback) { + var {_i, _r, _ref, _ref$1, _tmp, _tmp$1, _tuple, barrierShape, collision, isBarrier, joinIndex, obj, overlapResult, overlapped, pEffPushback, playerCollider, playerShape, pushbackX, pushbackY, ret, snapIntoPlatformOverlap, $s, $r, $c} = $restore(this, {joinIndex, playerCollider, playerShape, snapIntoPlatformOverlap, pEffPushback}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + ret = [ret]; + ret[0] = $makeSlice(sliceType$3, 0, 10); + collision = playerCollider.Check(0, 0, new sliceType$4([])); + if (ptrType$1.nil === collision) { + $s = -1; return (ret.$ptr || (ret.$ptr = new ptrType$2(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, ret))); + } + _ref = collision.Objects; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + obj = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + isBarrier = false; + _ref$1 = obj.Data; + if ($assertType(_ref$1, ptrType$3, true)[1]) { + } else if ($assertType(_ref$1, ptrType$4, true)[1]) { + } else { + isBarrier = true; + } + if (!isBarrier) { + _i++; + /* continue; */ $s = 1; continue; + } + barrierShape = $assertType(obj.Shape, ptrType$5); + _r = CalcPushbacks(0, 0, playerShape, barrierShape); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _tuple = _r; + overlapped = _tuple[0]; + pushbackX = _tuple[1]; + pushbackY = _tuple[2]; + overlapResult = _tuple[3]; + if (!overlapped) { + _i++; + /* continue; */ $s = 1; continue; + } + _tmp = (overlapResult.Overlap - snapIntoPlatformOverlap) * overlapResult.OverlapX; + _tmp$1 = (overlapResult.Overlap - snapIntoPlatformOverlap) * overlapResult.OverlapY; + pushbackX = _tmp; + pushbackY = _tmp$1; + ret[0] = $append(ret[0], new Vec2D.ptr(overlapResult.OverlapX, overlapResult.OverlapY)); + pEffPushback.X = pEffPushback.X + (pushbackX); + pEffPushback.Y = pEffPushback.Y + (pushbackY); + _i++; + $s = 1; continue; + case 2: + $s = -1; return (ret.$ptr || (ret.$ptr = new ptrType$2(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, ret))); + /* */ } return; } var $f = {$blk: calcHardPushbacksNorms, $c: true, $r, _i, _r, _ref, _ref$1, _tmp, _tmp$1, _tuple, barrierShape, collision, isBarrier, joinIndex, obj, overlapResult, overlapped, pEffPushback, playerCollider, playerShape, pushbackX, pushbackY, ret, snapIntoPlatformOverlap, $s};return $f; + }; + deriveOpPattern = function(currPlayerDownsync, thatPlayerInNextFrame, currRenderFrame, inputsBuffer, inputDelayFrames, inputScaleFrames) { + var _entry, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, currPlayerDownsync, currRenderFrame, decodedInput, delayedInputFrameId, delayedInputFrameIdForPrevRdf, delayedInputList, delayedInputListForPrevRdf, effDx, effDy, existent, inputDelayFrames, inputScaleFrames, inputsBuffer, joinIndex, jumpedOrNot, patternId, prevBtnALevel, prevBtnBLevel, prevDecodedInput, thatPlayerInNextFrame, x, x$1; + delayedInputFrameId = ConvertToInputFrameId(currRenderFrame.Id, inputDelayFrames, inputScaleFrames); + delayedInputFrameIdForPrevRdf = ConvertToInputFrameId(currRenderFrame.Id - 1 >> 0, inputDelayFrames, inputScaleFrames); + if (0 >= delayedInputFrameId) { + return [-2, false, 0, 0]; + } + delayedInputList = $assertType(inputsBuffer.GetByFrameId(delayedInputFrameId), ptrType$6).InputList; + delayedInputListForPrevRdf = sliceType$5.nil; + if (0 < delayedInputFrameIdForPrevRdf) { + delayedInputListForPrevRdf = $assertType(inputsBuffer.GetByFrameId(delayedInputFrameIdForPrevRdf), ptrType$6).InputList; + } + jumpedOrNot = false; + joinIndex = currPlayerDownsync.JoinIndex; + if (0 < currPlayerDownsync.FramesToRecover) { + return [-2, false, 0, 0]; + } + decodedInput = decodeInput((x = joinIndex - 1 >> 0, ((x < 0 || x >= delayedInputList.$length) ? ($throwRuntimeError("index out of range"), undefined) : delayedInputList.$array[delayedInputList.$offset + x]))); + _tmp = decodedInput.Dx; + _tmp$1 = decodedInput.Dy; + effDx = _tmp; + effDy = _tmp$1; + _tmp$2 = 0; + _tmp$3 = 0; + prevBtnALevel = _tmp$2; + prevBtnBLevel = _tmp$3; + if (!(sliceType$5.nil === delayedInputListForPrevRdf)) { + prevDecodedInput = decodeInput((x$1 = joinIndex - 1 >> 0, ((x$1 < 0 || x$1 >= delayedInputListForPrevRdf.$length) ? ($throwRuntimeError("index out of range"), undefined) : delayedInputListForPrevRdf.$array[delayedInputListForPrevRdf.$offset + x$1]))); + prevBtnALevel = prevDecodedInput.BtnALevel; + prevBtnBLevel = prevDecodedInput.BtnBLevel; + } + if (decodedInput.BtnBLevel > prevBtnBLevel) { + _tuple = (_entry = inAirSet[$Int32.keyFor(currPlayerDownsync.CharacterState)], _entry !== undefined ? [_entry.v, true] : [false, false]); + existent = _tuple[1]; + if (!existent) { + jumpedOrNot = true; + } + } + patternId = -1; + if (decodedInput.BtnALevel > prevBtnALevel) { + if (currPlayerDownsync.InAir) { + patternId = 1; + } else { + patternId = 0; + } + _tmp$4 = 0; + _tmp$5 = 0; + effDx = _tmp$4; + effDy = _tmp$5; + } + return [patternId, jumpedOrNot, effDx, effDy]; + }; + ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame = function(inputsBuffer, currRenderFrame, collisionSys, collisionSysMap, collisionSpaceOffsetX, collisionSpaceOffsetY, playerOpPatternToSkillId, chConfigsOrderedByJoinIndex) { + var {_1, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _i, _i$1, _i$10, _i$2, _i$3, _i$4, _i$5, _i$6, _i$7, _i$8, _i$9, _index, _index$1, _index$2, _index$3, _r, _r$1, _r$2, _r$3, _ref, _ref$1, _ref$10, _ref$11, _ref$12, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, _ref$7, _ref$8, _ref$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, atkedPlayerInCurFrame, atkedPlayerInNextFrame, bShape, bulletCollider, bulletColliders, bulletShape, bulletWx, bulletWy, chConfigsOrderedByJoinIndex, collision, collision$1, collisionPlayerIndex, collisionPlayerIndex$1, collisionPlayerIndex$2, collisionSpaceOffsetX, collisionSpaceOffsetY, collisionSys, collisionSysMap, currPlayerDownsync, currPlayerDownsync$1, currPlayerDownsync$2, currPlayerDownsync$3, currPlayerDownsync$4, currRenderFrame, defenderShape, effDx, effDy, effPushbacks, existent, hardPushbackNorm, hardPushbackNorm$1, hardPushbackNorms, i, i$1, i$2, i$3, i$4, inputsBuffer, isAnotherPlayer, isBarrier, isBullet, joinIndex, joinIndex$1, joinIndex$2, joinIndex$3, joinIndex$4, jumpedOrNot, jumpedOrNotList, landedOnGravityPushback, meleeBullet, meleeBullet$1, newBulletCollider, newMeleeBullet, newVx, newVy, nextRenderFrameMeleeBullets, nextRenderFramePlayers, normAlignmentWithGravity, obj, obj$1, offender, offender$1, offenderWx, offenderWy, oldFramesToRecover, oldNextCharacterState, overlapResult, overlapped, overlapped$1, patternId, playerCollider, playerCollider$1, playerCollider$2, playerOpPatternToSkillId, playerShape, projectedMagnitude, projectedMagnitude$1, pushbackX, pushbackX$1, pushbackY, pushbackY$1, roomCapacity, skillConfig, skillId, t, t$1, thatPlayerInNextFrame, thatPlayerInNextFrame$1, thatPlayerInNextFrame$2, thatPlayerInNextFrame$3, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xfac, xfac$1, $s, $r, $c} = $restore(this, {inputsBuffer, currRenderFrame, collisionSys, collisionSysMap, collisionSpaceOffsetX, collisionSpaceOffsetY, playerOpPatternToSkillId, chConfigsOrderedByJoinIndex}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + roomCapacity = currRenderFrame.PlayersArr.$length; + nextRenderFramePlayers = $makeSlice(sliceType$6, roomCapacity); + _ref = currRenderFrame.PlayersArr; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + currPlayerDownsync = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + ((i < 0 || i >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i] = new PlayerDownsync.ptr(currPlayerDownsync.Id, currPlayerDownsync.VirtualGridX, currPlayerDownsync.VirtualGridY, currPlayerDownsync.DirX, currPlayerDownsync.DirY, currPlayerDownsync.VelX, currPlayerDownsync.VelY, currPlayerDownsync.Speed, currPlayerDownsync.BattleState, currPlayerDownsync.JoinIndex, 0, currPlayerDownsync.Removed, currPlayerDownsync.Score, 0, currPlayerDownsync.FramesToRecover - 1 >> 0, currPlayerDownsync.FramesInChState + 1 >> 0, currPlayerDownsync.Hp, currPlayerDownsync.MaxHp, currPlayerDownsync.CharacterState, true)); + if (((i < 0 || i >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i]).FramesToRecover < 0) { + ((i < 0 || i >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i]).FramesToRecover = 0; + } + _i++; + } + nextRenderFrameMeleeBullets = $makeSlice(sliceType$7, 0, currRenderFrame.MeleeBullets.$length); + effPushbacks = $makeSlice(sliceType$3, roomCapacity); + hardPushbackNorms = $makeSlice(sliceType$8, roomCapacity); + jumpedOrNotList = $makeSlice(sliceType$9, roomCapacity); + _ref$1 = currRenderFrame.PlayersArr; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + newMeleeBullet = [newMeleeBullet]; + i$1 = _i$1; + currPlayerDownsync$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + ((i$1 < 0 || i$1 >= jumpedOrNotList.$length) ? ($throwRuntimeError("index out of range"), undefined) : jumpedOrNotList.$array[jumpedOrNotList.$offset + i$1] = false); + thatPlayerInNextFrame = ((i$1 < 0 || i$1 >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i$1]); + _tuple = deriveOpPattern(currPlayerDownsync$1, thatPlayerInNextFrame, currRenderFrame, inputsBuffer, 8, 2); + patternId = _tuple[0]; + jumpedOrNot = _tuple[1]; + effDx = _tuple[2]; + effDy = _tuple[3]; + if (-2 === patternId) { + _i$1++; + continue; + } + if (jumpedOrNot) { + thatPlayerInNextFrame.VelY = ((((i$1 < 0 || i$1 >= chConfigsOrderedByJoinIndex.$length) ? ($throwRuntimeError("index out of range"), undefined) : chConfigsOrderedByJoinIndex.$array[chConfigsOrderedByJoinIndex.$offset + i$1]).JumpingInitVelY >> 0)); + ((i$1 < 0 || i$1 >= jumpedOrNotList.$length) ? ($throwRuntimeError("index out of range"), undefined) : jumpedOrNotList.$array[jumpedOrNotList.$offset + i$1] = true); + } + joinIndex = currPlayerDownsync$1.JoinIndex; + if (!((-1 === patternId))) { + _tuple$1 = (_entry = playerOpPatternToSkillId[$Int.keyFor(((((joinIndex >> 0)) << 8 >> 0)) + patternId >> 0)], _entry !== undefined ? [_entry.v, true] : [0, false]); + skillId = _tuple$1[0]; + existent = _tuple$1[1]; + if (existent) { + skillConfig = $assertType((_entry$1 = skillIdToBullet[$Int.keyFor(skillId)], _entry$1 !== undefined ? _entry$1.v : $ifaceNil), ptrType$4); + newMeleeBullet[0] = $clone(skillConfig, MeleeBullet); + newMeleeBullet[0].Bullet.OffenderJoinIndex = joinIndex; + newMeleeBullet[0].Bullet.OffenderPlayerId = currPlayerDownsync$1.Id; + newMeleeBullet[0].Bullet.OriginatedRenderFrameId = currRenderFrame.Id; + nextRenderFrameMeleeBullets = $append(nextRenderFrameMeleeBullets, newMeleeBullet[0]); + thatPlayerInNextFrame.FramesToRecover = newMeleeBullet[0].Bullet.RecoveryFrames; + thatPlayerInNextFrame.CharacterState = 2; + if (false === currPlayerDownsync$1.InAir) { + thatPlayerInNextFrame.VelX = 0; + } + } + _i$1++; + continue; + } + if (!((0 === effDx)) || !((0 === effDy))) { + _tmp = effDx; + _tmp$1 = effDy; + thatPlayerInNextFrame.DirX = _tmp; + thatPlayerInNextFrame.DirY = _tmp$1; + thatPlayerInNextFrame.VelX = $imul(effDx, currPlayerDownsync$1.Speed); + thatPlayerInNextFrame.CharacterState = 1; + } else { + thatPlayerInNextFrame.CharacterState = 0; + thatPlayerInNextFrame.VelX = 0; + } + _i$1++; + } + _ref$2 = currRenderFrame.PlayersArr; + _i$2 = 0; + /* while (true) { */ case 1: + /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 2; continue; } + i$2 = _i$2; + currPlayerDownsync$2 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); + joinIndex$1 = currPlayerDownsync$2.JoinIndex; + _tmp$2 = 0; + _tmp$3 = 0; + (x = joinIndex$1 - 1 >> 0, ((x < 0 || x >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + x])).X = _tmp$2; + (x$1 = joinIndex$1 - 1 >> 0, ((x$1 < 0 || x$1 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + x$1])).Y = _tmp$3; + collisionPlayerIndex = 131072 + joinIndex$1 >> 0; + playerCollider = (_entry$2 = collisionSysMap[$Int32.keyFor(collisionPlayerIndex)], _entry$2 !== undefined ? _entry$2.v : ptrType$7.nil); + thatPlayerInNextFrame$1 = ((i$2 < 0 || i$2 >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i$2]); + _tmp$4 = currPlayerDownsync$2.VirtualGridX + currPlayerDownsync$2.VelX >> 0; + _tmp$5 = currPlayerDownsync$2.VirtualGridY + currPlayerDownsync$2.VelY >> 0; + newVx = _tmp$4; + newVy = _tmp$5; + if (((i$2 < 0 || i$2 >= jumpedOrNotList.$length) ? ($throwRuntimeError("index out of range"), undefined) : jumpedOrNotList.$array[jumpedOrNotList.$offset + i$2])) { + newVy = newVy + (((((i$2 < 0 || i$2 >= chConfigsOrderedByJoinIndex.$length) ? ($throwRuntimeError("index out of range"), undefined) : chConfigsOrderedByJoinIndex.$array[chConfigsOrderedByJoinIndex.$offset + i$2]).JumpingInitVelY >> 0))) >> 0; + } + _tuple$2 = VirtualGridToPolygonColliderBLPos(newVx, newVy, playerCollider.W * 0.5, playerCollider.H * 0.5, 0, 0, 0, 0, collisionSpaceOffsetX, collisionSpaceOffsetY, 0.01); + playerCollider.X = _tuple$2[0]; + playerCollider.Y = _tuple$2[1]; + $r = playerCollider.Update(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if (currPlayerDownsync$2.InAir) { + thatPlayerInNextFrame$1.VelX = thatPlayerInNextFrame$1.VelX + (0) >> 0; + thatPlayerInNextFrame$1.VelY = thatPlayerInNextFrame$1.VelY + (-50) >> 0; + } + _i$2++; + $s = 1; continue; + case 2: + bulletColliders = $makeSlice(sliceType$10, 0, currRenderFrame.MeleeBullets.$length); + _ref$3 = currRenderFrame.MeleeBullets; + _i$3 = 0; + /* while (true) { */ case 4: + /* if (!(_i$3 < _ref$3.$length)) { break; } */ if(!(_i$3 < _ref$3.$length)) { $s = 5; continue; } + meleeBullet = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); + /* */ if (((meleeBullet.Bullet.OriginatedRenderFrameId + meleeBullet.Bullet.StartupFrames >> 0) <= currRenderFrame.Id) && (((meleeBullet.Bullet.OriginatedRenderFrameId + meleeBullet.Bullet.StartupFrames >> 0) + meleeBullet.Bullet.ActiveFrames >> 0) > currRenderFrame.Id)) { $s = 6; continue; } + /* */ $s = 7; continue; + /* if (((meleeBullet.Bullet.OriginatedRenderFrameId + meleeBullet.Bullet.StartupFrames >> 0) <= currRenderFrame.Id) && (((meleeBullet.Bullet.OriginatedRenderFrameId + meleeBullet.Bullet.StartupFrames >> 0) + meleeBullet.Bullet.ActiveFrames >> 0) > currRenderFrame.Id)) { */ case 6: + offender = (x$2 = currRenderFrame.PlayersArr, x$3 = meleeBullet.Bullet.OffenderJoinIndex - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])); + xfac = 1; + if (0 > offender.DirX) { + xfac = -1; + } + _tuple$3 = VirtualGridToWorldPos(offender.VirtualGridX, offender.VirtualGridY, 0.01); + offenderWx = _tuple$3[0]; + offenderWy = _tuple$3[1]; + _tmp$6 = offenderWx + xfac * meleeBullet.Bullet.HitboxOffset; + _tmp$7 = offenderWy; + bulletWx = _tmp$6; + bulletWy = _tmp$7; + _r = GenerateRectCollider(bulletWx, bulletWy, meleeBullet.Bullet.HitboxSizeX, meleeBullet.Bullet.HitboxSizeY, 0.1, 0.1, 0.1, 0.1, collisionSpaceOffsetX, collisionSpaceOffsetY, meleeBullet, "MeleeBullet"); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + newBulletCollider = _r; + $r = collisionSys.Add(new sliceType$10([newBulletCollider])); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + bulletColliders = $append(bulletColliders, newBulletCollider); + $s = 8; continue; + /* } else { */ case 7: + nextRenderFrameMeleeBullets = $append(nextRenderFrameMeleeBullets, meleeBullet); + /* } */ case 8: + _i$3++; + $s = 4; continue; + case 5: + _ref$4 = currRenderFrame.PlayersArr; + _i$4 = 0; + /* while (true) { */ case 11: + /* if (!(_i$4 < _ref$4.$length)) { break; } */ if(!(_i$4 < _ref$4.$length)) { $s = 12; continue; } + i$3 = _i$4; + currPlayerDownsync$3 = ((_i$4 < 0 || _i$4 >= _ref$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$4.$array[_ref$4.$offset + _i$4]); + joinIndex$2 = currPlayerDownsync$3.JoinIndex; + collisionPlayerIndex$1 = 131072 + joinIndex$2 >> 0; + playerCollider$1 = (_entry$3 = collisionSysMap[$Int32.keyFor(collisionPlayerIndex$1)], _entry$3 !== undefined ? _entry$3.v : ptrType$7.nil); + playerShape = $assertType(playerCollider$1.Shape, ptrType$5); + _r$1 = calcHardPushbacksNorms(joinIndex$2, playerCollider$1, playerShape, 0.1, (x$4 = joinIndex$2 - 1 >> 0, ((x$4 < 0 || x$4 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + x$4]))); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + (x$5 = joinIndex$2 - 1 >> 0, ((x$5 < 0 || x$5 >= hardPushbackNorms.$length) ? ($throwRuntimeError("index out of range"), undefined) : hardPushbackNorms.$array[hardPushbackNorms.$offset + x$5] = _r$1)); + thatPlayerInNextFrame$2 = ((i$3 < 0 || i$3 >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i$3]); + landedOnGravityPushback = false; + collision = playerCollider$1.Check(0, 0, new sliceType$4([])); + /* */ if (!(ptrType$1.nil === collision)) { $s = 14; continue; } + /* */ $s = 15; continue; + /* if (!(ptrType$1.nil === collision)) { */ case 14: + _ref$5 = collision.Objects; + _i$5 = 0; + /* while (true) { */ case 16: + /* if (!(_i$5 < _ref$5.$length)) { break; } */ if(!(_i$5 < _ref$5.$length)) { $s = 17; continue; } + obj = ((_i$5 < 0 || _i$5 >= _ref$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$5.$array[_ref$5.$offset + _i$5]); + _tmp$8 = false; + _tmp$9 = false; + _tmp$10 = false; + isBarrier = _tmp$8; + isAnotherPlayer = _tmp$9; + isBullet = _tmp$10; + _ref$6 = obj.Data; + if ($assertType(_ref$6, ptrType$3, true)[1]) { + isAnotherPlayer = true; + } else if ($assertType(_ref$6, ptrType$4, true)[1]) { + isBullet = true; + } else { + isBarrier = true; + } + if (isBullet) { + _i$5++; + /* continue; */ $s = 16; continue; + } + bShape = $assertType(obj.Shape, ptrType$5); + _r$2 = CalcPushbacks(0, 0, playerShape, bShape); /* */ $s = 18; case 18: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } + _tuple$4 = _r$2; + overlapped = _tuple$4[0]; + pushbackX = _tuple$4[1]; + pushbackY = _tuple$4[2]; + overlapResult = _tuple$4[3]; + if (!overlapped) { + _i$5++; + /* continue; */ $s = 16; continue; + } + normAlignmentWithGravity = overlapResult.OverlapX * 0 + overlapResult.OverlapY * -1; + if (isAnotherPlayer) { + _tmp$11 = (overlapResult.Overlap - 0.2) * overlapResult.OverlapX; + _tmp$12 = (overlapResult.Overlap - 0.2) * overlapResult.OverlapY; + pushbackX = _tmp$11; + pushbackY = _tmp$12; + } + _ref$7 = (x$6 = joinIndex$2 - 1 >> 0, ((x$6 < 0 || x$6 >= hardPushbackNorms.$length) ? ($throwRuntimeError("index out of range"), undefined) : hardPushbackNorms.$array[hardPushbackNorms.$offset + x$6])).$get(); + _i$6 = 0; + while (true) { + if (!(_i$6 < _ref$7.$length)) { break; } + hardPushbackNorm = $clone(((_i$6 < 0 || _i$6 >= _ref$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$7.$array[_ref$7.$offset + _i$6]), Vec2D); + projectedMagnitude = pushbackX * hardPushbackNorm.X + pushbackY * hardPushbackNorm.Y; + if (isBarrier || (isAnotherPlayer && 0 > projectedMagnitude)) { + pushbackX = pushbackX - (projectedMagnitude * hardPushbackNorm.X); + pushbackY = pushbackY - (projectedMagnitude * hardPushbackNorm.Y); + } + _i$6++; + } + _index = joinIndex$2 - 1 >> 0; + ((_index < 0 || _index >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + _index]).X = ((_index < 0 || _index >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + _index]).X + (pushbackX); + _index$1 = joinIndex$2 - 1 >> 0; + ((_index$1 < 0 || _index$1 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + _index$1]).Y = ((_index$1 < 0 || _index$1 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + _index$1]).Y + (pushbackY); + if (0.5 < normAlignmentWithGravity) { + landedOnGravityPushback = true; + } + _i$5++; + $s = 16; continue; + case 17: + /* } */ case 15: + if (landedOnGravityPushback) { + thatPlayerInNextFrame$2.InAir = false; + if (currPlayerDownsync$3.InAir && 0 >= currPlayerDownsync$3.VelY) { + thatPlayerInNextFrame$2.VelX = 0; + thatPlayerInNextFrame$2.VelY = 0; + thatPlayerInNextFrame$2.CharacterState = 0; + thatPlayerInNextFrame$2.FramesToRecover = 0; + } + } + if (thatPlayerInNextFrame$2.InAir) { + oldNextCharacterState = thatPlayerInNextFrame$2.CharacterState; + _1 = oldNextCharacterState; + if ((_1 === (0)) || (_1 === (1))) { + if (((i$3 < 0 || i$3 >= jumpedOrNotList.$length) ? ($throwRuntimeError("index out of range"), undefined) : jumpedOrNotList.$array[jumpedOrNotList.$offset + i$3]) || (5 === currPlayerDownsync$3.CharacterState)) { + thatPlayerInNextFrame$2.CharacterState = 5; + } else { + thatPlayerInNextFrame$2.CharacterState = 4; + } + } else if (_1 === (2)) { + thatPlayerInNextFrame$2.CharacterState = 6; + } else if (_1 === (3)) { + thatPlayerInNextFrame$2.CharacterState = 7; + } + } + _i$4++; + $s = 11; continue; + case 12: + _ref$8 = bulletColliders; + _i$7 = 0; + /* while (true) { */ case 19: + /* if (!(_i$7 < _ref$8.$length)) { break; } */ if(!(_i$7 < _ref$8.$length)) { $s = 20; continue; } + bulletCollider = ((_i$7 < 0 || _i$7 >= _ref$8.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$8.$array[_ref$8.$offset + _i$7]); + meleeBullet$1 = $assertType(bulletCollider.Data, ptrType$4); + bulletShape = $assertType(bulletCollider.Shape, ptrType$5); + collision$1 = bulletCollider.Check(0, 0, new sliceType$4([])); + bulletCollider.Space.Remove(new sliceType$10([bulletCollider])); + if (ptrType$1.nil === collision$1) { + nextRenderFrameMeleeBullets = $append(nextRenderFrameMeleeBullets, meleeBullet$1); + _i$7++; + /* continue; */ $s = 19; continue; + } + offender$1 = (x$7 = currRenderFrame.PlayersArr, x$8 = meleeBullet$1.Bullet.OffenderJoinIndex - 1 >> 0, ((x$8 < 0 || x$8 >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + x$8])); + _ref$9 = collision$1.Objects; + _i$8 = 0; + /* while (true) { */ case 21: + /* if (!(_i$8 < _ref$9.$length)) { break; } */ if(!(_i$8 < _ref$9.$length)) { $s = 22; continue; } + obj$1 = ((_i$8 < 0 || _i$8 >= _ref$9.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$9.$array[_ref$9.$offset + _i$8]); + defenderShape = $assertType(obj$1.Shape, ptrType$5); + _ref$10 = obj$1.Data; + /* */ if ($assertType(_ref$10, ptrType$3, true)[1]) { $s = 23; continue; } + /* */ $s = 24; continue; + /* if ($assertType(_ref$10, ptrType$3, true)[1]) { */ case 23: + t = _ref$10.$val; + if (meleeBullet$1.Bullet.OffenderPlayerId === t.Id) { + _i$8++; + /* continue; */ $s = 21; continue; + } + _r$3 = CalcPushbacks(0, 0, bulletShape, defenderShape); /* */ $s = 26; case 26: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } + _tuple$5 = _r$3; + overlapped$1 = _tuple$5[0]; + if (!overlapped$1) { + _i$8++; + /* continue; */ $s = 21; continue; + } + joinIndex$3 = t.JoinIndex; + xfac$1 = 1; + if (0 > offender$1.DirX) { + xfac$1 = -1; + } + _tmp$13 = -xfac$1 * meleeBullet$1.Bullet.Pushback; + _tmp$14 = 0; + pushbackX$1 = _tmp$13; + pushbackY$1 = _tmp$14; + _ref$11 = (x$9 = joinIndex$3 - 1 >> 0, ((x$9 < 0 || x$9 >= hardPushbackNorms.$length) ? ($throwRuntimeError("index out of range"), undefined) : hardPushbackNorms.$array[hardPushbackNorms.$offset + x$9])).$get(); + _i$9 = 0; + while (true) { + if (!(_i$9 < _ref$11.$length)) { break; } + hardPushbackNorm$1 = $clone(((_i$9 < 0 || _i$9 >= _ref$11.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$11.$array[_ref$11.$offset + _i$9]), Vec2D); + projectedMagnitude$1 = pushbackX$1 * hardPushbackNorm$1.X + pushbackY$1 * hardPushbackNorm$1.Y; + if (0 > projectedMagnitude$1) { + pushbackX$1 = pushbackX$1 - (projectedMagnitude$1 * hardPushbackNorm$1.X); + pushbackY$1 = pushbackY$1 - (projectedMagnitude$1 * hardPushbackNorm$1.Y); + } + _i$9++; + } + _index$2 = joinIndex$3 - 1 >> 0; + ((_index$2 < 0 || _index$2 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + _index$2]).X = ((_index$2 < 0 || _index$2 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + _index$2]).X + (pushbackX$1); + _index$3 = joinIndex$3 - 1 >> 0; + ((_index$3 < 0 || _index$3 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + _index$3]).Y = ((_index$3 < 0 || _index$3 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + _index$3]).Y + (pushbackY$1); + _tmp$15 = (x$10 = currRenderFrame.PlayersArr, x$11 = t.JoinIndex - 1 >> 0, ((x$11 < 0 || x$11 >= x$10.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + x$11])); + _tmp$16 = (x$12 = t.JoinIndex - 1 >> 0, ((x$12 < 0 || x$12 >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + x$12])); + atkedPlayerInCurFrame = _tmp$15; + atkedPlayerInNextFrame = _tmp$16; + atkedPlayerInNextFrame.CharacterState = 3; + if (atkedPlayerInCurFrame.InAir) { + atkedPlayerInNextFrame.CharacterState = 7; + } + oldFramesToRecover = (x$13 = t.JoinIndex - 1 >> 0, ((x$13 < 0 || x$13 >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + x$13])).FramesToRecover; + if (meleeBullet$1.Bullet.HitStunFrames > oldFramesToRecover) { + atkedPlayerInNextFrame.FramesToRecover = meleeBullet$1.Bullet.HitStunFrames; + } + $s = 25; continue; + /* } else { */ case 24: + t$1 = _ref$10; + /* } */ case 25: + _i$8++; + $s = 21; continue; + case 22: + _i$7++; + $s = 19; continue; + case 20: + _ref$12 = currRenderFrame.PlayersArr; + _i$10 = 0; + while (true) { + if (!(_i$10 < _ref$12.$length)) { break; } + i$4 = _i$10; + currPlayerDownsync$4 = ((_i$10 < 0 || _i$10 >= _ref$12.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$12.$array[_ref$12.$offset + _i$10]); + joinIndex$4 = currPlayerDownsync$4.JoinIndex; + collisionPlayerIndex$2 = 131072 + joinIndex$4 >> 0; + playerCollider$2 = (_entry$4 = collisionSysMap[$Int32.keyFor(collisionPlayerIndex$2)], _entry$4 !== undefined ? _entry$4.v : ptrType$7.nil); + thatPlayerInNextFrame$3 = ((i$4 < 0 || i$4 >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i$4]); + _tuple$6 = PolygonColliderBLToVirtualGridPos(playerCollider$2.X - (x$14 = joinIndex$4 - 1 >> 0, ((x$14 < 0 || x$14 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + x$14])).X, playerCollider$2.Y - (x$15 = joinIndex$4 - 1 >> 0, ((x$15 < 0 || x$15 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + x$15])).Y, playerCollider$2.W * 0.5, playerCollider$2.H * 0.5, 0, 0, 0, 0, collisionSpaceOffsetX, collisionSpaceOffsetY, 100); + thatPlayerInNextFrame$3.VirtualGridX = _tuple$6[0]; + thatPlayerInNextFrame$3.VirtualGridY = _tuple$6[1]; + if (!((thatPlayerInNextFrame$3.CharacterState === currPlayerDownsync$4.CharacterState))) { + thatPlayerInNextFrame$3.FramesInChState = 0; + } + _i$10++; + } + $s = -1; return new RoomDownsyncFrame.ptr(currRenderFrame.Id + 1 >> 0, nextRenderFramePlayers, new $Int64(0, 0), nextRenderFrameMeleeBullets, sliceType$11.nil, new $Uint64(0, 0), false, false); + /* */ } return; } var $f = {$blk: ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame, $c: true, $r, _1, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _i, _i$1, _i$10, _i$2, _i$3, _i$4, _i$5, _i$6, _i$7, _i$8, _i$9, _index, _index$1, _index$2, _index$3, _r, _r$1, _r$2, _r$3, _ref, _ref$1, _ref$10, _ref$11, _ref$12, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, _ref$7, _ref$8, _ref$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, atkedPlayerInCurFrame, atkedPlayerInNextFrame, bShape, bulletCollider, bulletColliders, bulletShape, bulletWx, bulletWy, chConfigsOrderedByJoinIndex, collision, collision$1, collisionPlayerIndex, collisionPlayerIndex$1, collisionPlayerIndex$2, collisionSpaceOffsetX, collisionSpaceOffsetY, collisionSys, collisionSysMap, currPlayerDownsync, currPlayerDownsync$1, currPlayerDownsync$2, currPlayerDownsync$3, currPlayerDownsync$4, currRenderFrame, defenderShape, effDx, effDy, effPushbacks, existent, hardPushbackNorm, hardPushbackNorm$1, hardPushbackNorms, i, i$1, i$2, i$3, i$4, inputsBuffer, isAnotherPlayer, isBarrier, isBullet, joinIndex, joinIndex$1, joinIndex$2, joinIndex$3, joinIndex$4, jumpedOrNot, jumpedOrNotList, landedOnGravityPushback, meleeBullet, meleeBullet$1, newBulletCollider, newMeleeBullet, newVx, newVy, nextRenderFrameMeleeBullets, nextRenderFramePlayers, normAlignmentWithGravity, obj, obj$1, offender, offender$1, offenderWx, offenderWy, oldFramesToRecover, oldNextCharacterState, overlapResult, overlapped, overlapped$1, patternId, playerCollider, playerCollider$1, playerCollider$2, playerOpPatternToSkillId, playerShape, projectedMagnitude, projectedMagnitude$1, pushbackX, pushbackX$1, pushbackY, pushbackY$1, roomCapacity, skillConfig, skillId, t, t$1, thatPlayerInNextFrame, thatPlayerInNextFrame$1, thatPlayerInNextFrame$2, thatPlayerInNextFrame$3, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xfac, xfac$1, $s};return $f; + }; + $pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame = ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame; + GenerateRectCollider = function(wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag) { + var {$24r, _r, _tuple, blX, blY, bottomPadding, data, h, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, tag, topPadding, w, wx, wy, $s, $r, $c} = $restore(this, {wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + _tuple = WorldToPolygonColliderBLPos(wx, wy, w * 0.5, h * 0.5, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY); + blX = _tuple[0]; + blY = _tuple[1]; + _r = generateRectColliderInCollisionSpace(blX, blY, leftPadding + w + rightPadding, bottomPadding + h + topPadding, data, tag); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $24r = _r; + $s = 2; case 2: return $24r; + /* */ } return; } var $f = {$blk: GenerateRectCollider, $c: true, $r, $24r, _r, _tuple, blX, blY, bottomPadding, data, h, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, tag, topPadding, w, wx, wy, $s};return $f; + }; + $pkg.GenerateRectCollider = GenerateRectCollider; + generateRectColliderInCollisionSpace = function(blX, blY, w, h, data, tag) { + var {blX, blY, collider, data, h, shape, tag, w, $s, $r, $c} = $restore(this, {blX, blY, w, h, data, tag}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + collider = resolv.NewObject(blX, blY, w, h, new sliceType$4([tag])); + shape = resolv.NewRectangle(0, 0, w, h); + $r = collider.SetShape(shape); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + collider.Data = data; + $s = -1; return collider; + /* */ } return; } var $f = {$blk: generateRectColliderInCollisionSpace, $c: true, $r, blX, blY, collider, data, h, shape, tag, w, $s};return $f; + }; + GenerateConvexPolygonCollider = function(unalignedSrc, spaceOffsetX, spaceOffsetY, data, tag) { + var {_i, _i$1, _ref, _ref$1, _tmp, _tmp$1, aligned, collider, data, h, i, i$1, j, p, pi, pj, shape, spaceOffsetX, spaceOffsetY, tag, unalignedSrc, w, x, $s, $r, $c} = $restore(this, {unalignedSrc, spaceOffsetX, spaceOffsetY, data, tag}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + aligned = AlignPolygon2DToBoundingBox(unalignedSrc); + _tmp = 0; + _tmp$1 = 0; + w = _tmp; + h = _tmp$1; + shape = resolv.NewConvexPolygon(sliceType$12.nil); + _ref = aligned.Points; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + pi = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _ref$1 = aligned.Points; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + j = _i$1; + pj = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + if (i === j) { + _i$1++; + continue; + } + if (math.Abs(pj.X - pi.X) > w) { + w = math.Abs(pj.X - pi.X); + } + if (math.Abs(pj.Y - pi.Y) > h) { + h = math.Abs(pj.Y - pi.Y); + } + _i$1++; + } + _i++; + } + i$1 = 0; + while (true) { + if (!(i$1 < aligned.Points.$length)) { break; } + p = (x = aligned.Points, ((i$1 < 0 || i$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i$1])); + shape.AddPoints(new sliceType$12([p.X, p.Y])); + i$1 = i$1 + (1) >> 0; + } + collider = resolv.NewObject(aligned.Anchor.X + spaceOffsetX, aligned.Anchor.Y + spaceOffsetY, w, h, new sliceType$4([tag])); + $r = collider.SetShape(shape); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + collider.Data = data; + $s = -1; return collider; + /* */ } return; } var $f = {$blk: GenerateConvexPolygonCollider, $c: true, $r, _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, aligned, collider, data, h, i, i$1, j, p, pi, pj, shape, spaceOffsetX, spaceOffsetY, tag, unalignedSrc, w, x, $s};return $f; + }; + $pkg.GenerateConvexPolygonCollider = GenerateConvexPolygonCollider; + AlignPolygon2DToBoundingBox = function(input) { + var _i, _i$1, _ref, _ref$1, boundingBoxBL, i, input, output, p, p$1, x; + boundingBoxBL = new Vec2D.ptr(1.7e+308, 1.7e+308); + _ref = input.Points; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + p = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + if (p.X < boundingBoxBL.X) { + boundingBoxBL.X = p.X; + } + if (p.Y < boundingBoxBL.Y) { + boundingBoxBL.Y = p.Y; + } + _i++; + } + output = new Polygon2D.ptr(new Vec2D.ptr(input.Anchor.X + boundingBoxBL.X, input.Anchor.Y + boundingBoxBL.Y), $makeSlice(sliceType$13, input.Points.$length)); + _ref$1 = input.Points; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i = _i$1; + p$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); + (x = output.Points, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = new Vec2D.ptr(p$1.X - boundingBoxBL.X, p$1.Y - boundingBoxBL.Y))); + _i$1++; + } + return output; + }; + $pkg.AlignPolygon2DToBoundingBox = AlignPolygon2DToBoundingBox; + ptrType$11.methods = [{prop: "Put", name: "Put", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "Pop", name: "Pop", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "GetArrIdxByOffset", name: "GetArrIdxByOffset", pkg: "", typ: $funcType([$Int32], [$Int32], false)}, {prop: "GetByOffset", name: "GetByOffset", pkg: "", typ: $funcType([$Int32], [$emptyInterface], false)}, {prop: "GetByFrameId", name: "GetByFrameId", pkg: "", typ: $funcType([$Int32], [$emptyInterface], false)}, {prop: "SetByFrameId", name: "SetByFrameId", pkg: "", typ: $funcType([$emptyInterface, $Int32], [$Int32, $Int32, $Int32], false)}]; + Vec2D.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Float64, tag: ""}]); + Polygon2D.init("", [{prop: "Anchor", name: "Anchor", embedded: false, exported: true, typ: ptrType$9, tag: ""}, {prop: "Points", name: "Points", embedded: false, exported: true, typ: sliceType$13, tag: ""}]); + PlayerDownsync.init("", [{prop: "Id", name: "Id", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VirtualGridX", name: "VirtualGridX", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VirtualGridY", name: "VirtualGridY", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "DirX", name: "DirX", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "DirY", name: "DirY", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VelX", name: "VelX", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VelY", name: "VelY", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Speed", name: "Speed", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "BattleState", name: "BattleState", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "JoinIndex", name: "JoinIndex", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "ColliderRadius", name: "ColliderRadius", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Removed", name: "Removed", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Score", name: "Score", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "LastMoveGmtMillis", name: "LastMoveGmtMillis", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "FramesToRecover", name: "FramesToRecover", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "FramesInChState", name: "FramesInChState", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Hp", name: "Hp", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "MaxHp", name: "MaxHp", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "CharacterState", name: "CharacterState", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "InAir", name: "InAir", embedded: false, exported: true, typ: $Bool, tag: ""}]); + InputFrameDecoded.init("", [{prop: "Dx", name: "Dx", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Dy", name: "Dy", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "BtnALevel", name: "BtnALevel", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "BtnBLevel", name: "BtnBLevel", embedded: false, exported: true, typ: $Int32, tag: ""}]); + Barrier.init("", [{prop: "Boundary", name: "Boundary", embedded: false, exported: true, typ: ptrType$10, tag: ""}]); + Bullet.init("", [{prop: "BattleLocalId", name: "BattleLocalId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "StartupFrames", name: "StartupFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "ActiveFrames", name: "ActiveFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "RecoveryFrames", name: "RecoveryFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "RecoveryFramesOnBlock", name: "RecoveryFramesOnBlock", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "RecoveryFramesOnHit", name: "RecoveryFramesOnHit", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "HitboxOffset", name: "HitboxOffset", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "OriginatedRenderFrameId", name: "OriginatedRenderFrameId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "HitStunFrames", name: "HitStunFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "BlockStunFrames", name: "BlockStunFrames", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Pushback", name: "Pushback", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "ReleaseTriggerType", name: "ReleaseTriggerType", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Damage", name: "Damage", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "OffenderJoinIndex", name: "OffenderJoinIndex", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "OffenderPlayerId", name: "OffenderPlayerId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "SelfMoveforwardX", name: "SelfMoveforwardX", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "SelfMoveforwardY", name: "SelfMoveforwardY", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "HitboxSizeX", name: "HitboxSizeX", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "HitboxSizeY", name: "HitboxSizeY", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "BlowUpVelY", name: "BlowUpVelY", embedded: false, exported: true, typ: $Int32, tag: ""}]); + MeleeBullet.init("", [{prop: "Bullet", name: "Bullet", embedded: true, exported: true, typ: Bullet, tag: ""}]); + FireballBullet.init("", [{prop: "VirtualGridX", name: "VirtualGridX", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VirtualGridY", name: "VirtualGridY", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "DirX", name: "DirX", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "DirY", name: "DirY", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VelX", name: "VelX", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "VelY", name: "VelY", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Speed", name: "Speed", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Bullet", name: "Bullet", embedded: true, exported: true, typ: Bullet, tag: ""}]); + RoomDownsyncFrame.init("", [{prop: "Id", name: "Id", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "PlayersArr", name: "PlayersArr", embedded: false, exported: true, typ: sliceType$6, tag: ""}, {prop: "CountdownNanos", name: "CountdownNanos", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "MeleeBullets", name: "MeleeBullets", embedded: false, exported: true, typ: sliceType$7, tag: ""}, {prop: "FireballBullets", name: "FireballBullets", embedded: false, exported: true, typ: sliceType$11, tag: ""}, {prop: "BackendUnconfirmedMask", name: "BackendUnconfirmedMask", embedded: false, exported: true, typ: $Uint64, tag: ""}, {prop: "ShouldForceResync", name: "ShouldForceResync", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "PlayerOpPatternToSkillId", name: "PlayerOpPatternToSkillId", embedded: false, exported: true, typ: mapType, tag: ""}]); + InputFrameDownsync.init("", [{prop: "InputFrameId", name: "InputFrameId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "InputList", name: "InputList", embedded: false, exported: true, typ: sliceType$5, tag: ""}, {prop: "ConfirmedList", name: "ConfirmedList", embedded: false, exported: true, typ: $Uint64, tag: ""}]); + CharacterConfig.init("", [{prop: "SpeciesId", name: "SpeciesId", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "SpeciesName", name: "SpeciesName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "InAirIdleFrameIdxTurningPoint", name: "InAirIdleFrameIdxTurningPoint", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "InAirIdleFrameIdxTurnedCycle", name: "InAirIdleFrameIdxTurnedCycle", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "LayDownFrames", name: "LayDownFrames", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "LayDownFramesToRecover", name: "LayDownFramesToRecover", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "GetUpFrames", name: "GetUpFrames", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "GetUpFramesToRecover", name: "GetUpFramesToRecover", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "JumpingInitVelY", name: "JumpingInitVelY", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "PatternIdToSkillId", name: "PatternIdToSkillId", embedded: false, exported: true, typ: mapType, tag: ""}]); + RingBuffer.init("", [{prop: "Ed", name: "Ed", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "St", name: "St", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "EdFrameId", name: "EdFrameId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "StFrameId", name: "StFrameId", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "N", name: "N", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Cnt", name: "Cnt", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Eles", name: "Eles", embedded: false, exported: true, typ: sliceType$2, tag: ""}]); + SatResult.init("", [{prop: "Overlap", name: "Overlap", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "OverlapX", name: "OverlapX", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "OverlapY", name: "OverlapY", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "AContainedInB", name: "AContainedInB", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "BContainedInA", name: "BContainedInA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Axis", name: "Axis", embedded: false, exported: true, typ: resolv.Vector, tag: ""}]); + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = math.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = resolv.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $pkg.Characters = $makeMap($Int.keyFor, [{ k: 0, v: new CharacterConfig.ptr(0, "MonkGirl", 11, 1, 16, 16, 33, 30, 800, $makeMap($Int.keyFor, [{ k: 0, v: 1 }, { k: 1, v: 2 }])) }]); + skillIdToBullet = $makeMap($Int.keyFor, [{ k: 1, v: new MeleeBullet.ptr(new Bullet.ptr(0, 5, 10, 34, 34, 34, 12, 0, 18, 9, 8, 1, 5, 0, 0, 0, 0, 24, 32, 0)) }, { k: 2, v: new MeleeBullet.ptr(new Bullet.ptr(0, 3, 20, 34, 34, 34, 16, 0, 18, 9, 6, 1, 5, 0, 0, 0, 0, 32, 24, 300)) }]); + $pkg.DIRECTION_DECODER = new sliceType$1([new sliceType([0, 0]), new sliceType([0, 2]), new sliceType([0, -2]), new sliceType([2, 0]), new sliceType([-2, 0]), new sliceType([1, 1]), new sliceType([-1, -1]), new sliceType([1, -1]), new sliceType([-1, 1])]); + inAirSet = $makeMap($Int32.keyFor, [{ k: 4, v: true }, { k: 5, v: true }, { k: 6, v: true }, { k: 7, v: true }, { k: 8, v: true }]); + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); +$packages["jsexport"] = (function() { + var $pkg = {}, $init, js, battle, resolv, sliceType, ptrType, sliceType$1, ptrType$1, ptrType$2, sliceType$2, ptrType$3, sliceType$3, ptrType$4, sliceType$4, ptrType$5, sliceType$5, ptrType$6, funcType, funcType$1, funcType$2, funcType$3, funcType$4, funcType$5, funcType$6, funcType$7, funcType$8, funcType$9, funcType$10, ptrType$7, funcType$11, sliceType$6, funcType$12, ptrType$8, ptrType$9, ptrType$10, mapType, mapType$1, sliceType$7, funcType$13, funcType$14, mapType$2, NewInputFrameDownsync, NewRingBufferJs, NewCollisionSpaceJs, NewVec2DJs, NewPolygon2DJs, NewBarrierJs, NewPlayerDownsyncJs, NewMeleeBulletJs, NewRoomDownsyncFrameJs, GetCollisionSpaceObjsJs, GenerateRectColliderJs, GenerateConvexPolygonColliderJs, GetCharacterConfigsOrderedByJoinIndex, ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs, main; + js = $packages["github.com/gopherjs/gopherjs/js"]; + battle = $packages["jsexport/battle"]; + resolv = $packages["resolv"]; + sliceType = $sliceType($Uint64); + ptrType = $ptrType(battle.Vec2D); + sliceType$1 = $sliceType(ptrType); + ptrType$1 = $ptrType(battle.Polygon2D); + ptrType$2 = $ptrType(battle.PlayerDownsync); + sliceType$2 = $sliceType(ptrType$2); + ptrType$3 = $ptrType(battle.MeleeBullet); + sliceType$3 = $sliceType(ptrType$3); + ptrType$4 = $ptrType(battle.FireballBullet); + sliceType$4 = $sliceType(ptrType$4); + ptrType$5 = $ptrType(js.Object); + sliceType$5 = $sliceType(ptrType$5); + ptrType$6 = $ptrType(battle.CharacterConfig); + funcType = $funcType([$Float64, $Float64], [ptrType$5], false); + funcType$1 = $funcType([ptrType, sliceType$1], [ptrType$5], false); + funcType$2 = $funcType([ptrType$1], [ptrType$5], false); + funcType$3 = $funcType([$Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Bool, $Float64], [ptrType$5], false); + funcType$4 = $funcType([$Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64], [ptrType$5], false); + funcType$5 = $funcType([$Int32, sliceType$2, sliceType$3], [ptrType$5], false); + funcType$6 = $funcType([$Int, $Int, $Int, $Int], [ptrType$5], false); + funcType$7 = $funcType([$Int32, sliceType, $Uint64], [ptrType$5], false); + funcType$8 = $funcType([$Int32], [ptrType$5], false); + funcType$9 = $funcType([$Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $emptyInterface, $String], [ptrType$5], false); + funcType$10 = $funcType([ptrType$1, $Float64, $Float64, $emptyInterface, $String], [ptrType$5], false); + ptrType$7 = $ptrType(resolv.Space); + funcType$11 = $funcType([ptrType$7], [sliceType$5], false); + sliceType$6 = $sliceType($Int); + funcType$12 = $funcType([sliceType$6], [sliceType$5], false); + ptrType$8 = $ptrType(battle.RingBuffer); + ptrType$9 = $ptrType(battle.RoomDownsyncFrame); + ptrType$10 = $ptrType(resolv.Object); + mapType = $mapType($Int32, ptrType$10); + mapType$1 = $mapType($Int, $Int); + sliceType$7 = $sliceType(ptrType$6); + funcType$13 = $funcType([ptrType$8, ptrType$9, ptrType$7, mapType, $Float64, $Float64, mapType$1, sliceType$7], [ptrType$5], false); + funcType$14 = $funcType([$Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64], [$Float64, $Float64], false); + mapType$2 = $mapType($String, $emptyInterface); + NewInputFrameDownsync = function(inputFrameId, inputList, confirmedList) { + var {$24r, _r, confirmedList, inputFrameId, inputList, $s, $r, $c} = $restore(this, {inputFrameId, inputList, confirmedList}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + _r = js.MakeFullWrapper(new battle.InputFrameDownsync.ptr(inputFrameId, inputList, confirmedList)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $24r = _r; + $s = 2; case 2: return $24r; + /* */ } return; } var $f = {$blk: NewInputFrameDownsync, $c: true, $r, $24r, _r, confirmedList, inputFrameId, inputList, $s};return $f; + }; + $pkg.NewInputFrameDownsync = NewInputFrameDownsync; + NewRingBufferJs = function(n) { + var {$24r, _r, n, $s, $r, $c} = $restore(this, {n}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + _r = js.MakeFullWrapper(battle.NewRingBuffer(n)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $24r = _r; + $s = 2; case 2: return $24r; + /* */ } return; } var $f = {$blk: NewRingBufferJs, $c: true, $r, $24r, _r, n, $s};return $f; + }; + $pkg.NewRingBufferJs = NewRingBufferJs; + NewCollisionSpaceJs = function(spaceW, spaceH, minStepW, minStepH) { + var minStepH, minStepW, spaceH, spaceW; + return js.MakeWrapper(resolv.NewSpace(spaceW, spaceH, minStepW, minStepH)); + }; + $pkg.NewCollisionSpaceJs = NewCollisionSpaceJs; + NewVec2DJs = function(x, y) { + var {$24r, _r, x, y, $s, $r, $c} = $restore(this, {x, y}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + _r = js.MakeFullWrapper(new battle.Vec2D.ptr(x, y)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $24r = _r; + $s = 2; case 2: return $24r; + /* */ } return; } var $f = {$blk: NewVec2DJs, $c: true, $r, $24r, _r, x, y, $s};return $f; + }; + $pkg.NewVec2DJs = NewVec2DJs; + NewPolygon2DJs = function(anchor, points) { + var {$24r, _r, anchor, points, $s, $r, $c} = $restore(this, {anchor, points}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + _r = js.MakeFullWrapper(new battle.Polygon2D.ptr(anchor, points)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $24r = _r; + $s = 2; case 2: return $24r; + /* */ } return; } var $f = {$blk: NewPolygon2DJs, $c: true, $r, $24r, _r, anchor, points, $s};return $f; + }; + $pkg.NewPolygon2DJs = NewPolygon2DJs; + NewBarrierJs = function(boundary) { + var boundary; + return js.MakeWrapper(new battle.Barrier.ptr(boundary)); + }; + $pkg.NewBarrierJs = NewBarrierJs; + NewPlayerDownsyncJs = function(id, virtualGridX, virtualGridY, dirX, dirY, velX, velY, framesToRecover, framesInChState, speed, battleState, characterState, joinIndex, hp, maxHp, inAir, colliderRadius) { + var battleState, characterState, colliderRadius, dirX, dirY, framesInChState, framesToRecover, hp, id, inAir, joinIndex, maxHp, speed, velX, velY, virtualGridX, virtualGridY; + return js.MakeWrapper(new battle.PlayerDownsync.ptr(id, virtualGridX, virtualGridY, dirX, dirY, velX, velY, speed, battleState, joinIndex, colliderRadius, false, 0, 0, framesToRecover, framesInChState, hp, maxHp, characterState, inAir)); + }; + $pkg.NewPlayerDownsyncJs = NewPlayerDownsyncJs; + NewMeleeBulletJs = function(battleLocalId, startupFrames, activeFrames, recoveryFrames, recoveryFramesOnBlock, recoveryFramesOnHit, hitStunFrames, blockStunFrames, releaseTriggerType, damage, offenderJoinIndex, offenderPlayerId, pushback, hitboxOffset, selfMoveforwardX, selfMoveforwardY, hitboxSizeX, hitboxSizeY) { + var activeFrames, battleLocalId, blockStunFrames, damage, hitStunFrames, hitboxOffset, hitboxSizeX, hitboxSizeY, offenderJoinIndex, offenderPlayerId, pushback, recoveryFrames, recoveryFramesOnBlock, recoveryFramesOnHit, releaseTriggerType, selfMoveforwardX, selfMoveforwardY, startupFrames; + return js.MakeWrapper(new battle.MeleeBullet.ptr(new battle.Bullet.ptr(battleLocalId, startupFrames, activeFrames, recoveryFrames, recoveryFramesOnBlock, recoveryFramesOnHit, hitboxOffset, 0, hitStunFrames, blockStunFrames, pushback, releaseTriggerType, damage, offenderJoinIndex, offenderPlayerId, selfMoveforwardX, selfMoveforwardY, hitboxSizeX, hitboxSizeY, 0))); + }; + $pkg.NewMeleeBulletJs = NewMeleeBulletJs; + NewRoomDownsyncFrameJs = function(id, playersArr, meleeBullets) { + var {$24r, _r, id, meleeBullets, playersArr, $s, $r, $c} = $restore(this, {id, playersArr, meleeBullets}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + _r = js.MakeFullWrapper(new battle.RoomDownsyncFrame.ptr(id, playersArr, new $Int64(0, 0), meleeBullets, sliceType$4.nil, new $Uint64(0, 0), false, false)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + $24r = _r; + $s = 2; case 2: return $24r; + /* */ } return; } var $f = {$blk: NewRoomDownsyncFrameJs, $c: true, $r, $24r, _r, id, meleeBullets, playersArr, $s};return $f; + }; + $pkg.NewRoomDownsyncFrameJs = NewRoomDownsyncFrameJs; + GetCollisionSpaceObjsJs = function(space) { + var {_i, _r, _ref, obj, objs, ret, space, $s, $r, $c} = $restore(this, {space}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + objs = space.Objects(); + ret = $makeSlice(sliceType$5, 0, objs.$length); + _ref = objs; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + obj = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r = js.MakeFullWrapper(obj); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + ret = $append(ret, _r); + _i++; + $s = 1; continue; + case 2: + $s = -1; return ret; + /* */ } return; } var $f = {$blk: GetCollisionSpaceObjsJs, $c: true, $r, _i, _r, _ref, obj, objs, ret, space, $s};return $f; + }; + $pkg.GetCollisionSpaceObjsJs = GetCollisionSpaceObjsJs; + GenerateRectColliderJs = function(wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag) { + var {$24r, _r, _r$1, bottomPadding, data, h, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, tag, topPadding, w, wx, wy, $s, $r, $c} = $restore(this, {wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + _r = battle.GenerateRectCollider(wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = js.MakeFullWrapper(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $24r = _r$1; + $s = 3; case 3: return $24r; + /* */ } return; } var $f = {$blk: GenerateRectColliderJs, $c: true, $r, $24r, _r, _r$1, bottomPadding, data, h, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, tag, topPadding, w, wx, wy, $s};return $f; + }; + $pkg.GenerateRectColliderJs = GenerateRectColliderJs; + GenerateConvexPolygonColliderJs = function(unalignedSrc, spaceOffsetX, spaceOffsetY, data, tag) { + var {$24r, _r, _r$1, data, spaceOffsetX, spaceOffsetY, tag, unalignedSrc, $s, $r, $c} = $restore(this, {unalignedSrc, spaceOffsetX, spaceOffsetY, data, tag}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + _r = battle.GenerateConvexPolygonCollider(unalignedSrc, spaceOffsetX, spaceOffsetY, data, tag); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = js.MakeFullWrapper(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $24r = _r$1; + $s = 3; case 3: return $24r; + /* */ } return; } var $f = {$blk: GenerateConvexPolygonColliderJs, $c: true, $r, $24r, _r, _r$1, data, spaceOffsetX, spaceOffsetY, tag, unalignedSrc, $s};return $f; + }; + $pkg.GenerateConvexPolygonColliderJs = GenerateConvexPolygonColliderJs; + GetCharacterConfigsOrderedByJoinIndex = function(speciesIdList) { + var {_entry, _i, _r, _ref, i, ret, speciesId, speciesIdList, $s, $r, $c} = $restore(this, {speciesIdList}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + ret = $makeSlice(sliceType$5, speciesIdList.$length, speciesIdList.$length); + _ref = speciesIdList; + _i = 0; + /* while (true) { */ case 1: + /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } + i = _i; + speciesId = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); + _r = js.MakeFullWrapper((_entry = battle.Characters[$Int.keyFor(speciesId)], _entry !== undefined ? _entry.v : ptrType$6.nil)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + ((i < 0 || i >= ret.$length) ? ($throwRuntimeError("index out of range"), undefined) : ret.$array[ret.$offset + i] = _r); + _i++; + $s = 1; continue; + case 2: + $s = -1; return ret; + /* */ } return; } var $f = {$blk: GetCharacterConfigsOrderedByJoinIndex, $c: true, $r, _entry, _i, _r, _ref, i, ret, speciesId, speciesIdList, $s};return $f; + }; + $pkg.GetCharacterConfigsOrderedByJoinIndex = GetCharacterConfigsOrderedByJoinIndex; + ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs = function(inputsBuffer, currRenderFrame, collisionSys, collisionSysMap, collisionSpaceOffsetX, collisionSpaceOffsetY, playerOpPatternToSkillId, chConfigsOrderedByJoinIndex) { + var {$24r, _r, _r$1, chConfigsOrderedByJoinIndex, collisionSpaceOffsetX, collisionSpaceOffsetY, collisionSys, collisionSysMap, currRenderFrame, inputsBuffer, playerOpPatternToSkillId, $s, $r, $c} = $restore(this, {inputsBuffer, currRenderFrame, collisionSys, collisionSysMap, collisionSpaceOffsetX, collisionSpaceOffsetY, playerOpPatternToSkillId, chConfigsOrderedByJoinIndex}); + /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: + _r = battle.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer, currRenderFrame, collisionSys, collisionSysMap, collisionSpaceOffsetX, collisionSpaceOffsetY, playerOpPatternToSkillId, chConfigsOrderedByJoinIndex); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } + _r$1 = js.MakeFullWrapper(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } + $24r = _r$1; + $s = 3; case 3: return $24r; + /* */ } return; } var $f = {$blk: ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs, $c: true, $r, $24r, _r, _r$1, chConfigsOrderedByJoinIndex, collisionSpaceOffsetX, collisionSpaceOffsetY, collisionSys, collisionSysMap, currRenderFrame, inputsBuffer, playerOpPatternToSkillId, $s};return $f; + }; + $pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs = ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs; + main = function() { + $global.gopkgs = $externalize($makeMap($String.keyFor, [{ k: "NewVec2DJs", v: new funcType(NewVec2DJs) }, { k: "NewPolygon2DJs", v: new funcType$1(NewPolygon2DJs) }, { k: "NewBarrierJs", v: new funcType$2(NewBarrierJs) }, { k: "NewPlayerDownsyncJs", v: new funcType$3(NewPlayerDownsyncJs) }, { k: "NewMeleeBulletJs", v: new funcType$4(NewMeleeBulletJs) }, { k: "NewRoomDownsyncFrameJs", v: new funcType$5(NewRoomDownsyncFrameJs) }, { k: "NewCollisionSpaceJs", v: new funcType$6(NewCollisionSpaceJs) }, { k: "NewInputFrameDownsync", v: new funcType$7(NewInputFrameDownsync) }, { k: "NewRingBufferJs", v: new funcType$8(NewRingBufferJs) }, { k: "GenerateRectColliderJs", v: new funcType$9(GenerateRectColliderJs) }, { k: "GenerateConvexPolygonColliderJs", v: new funcType$10(GenerateConvexPolygonColliderJs) }, { k: "GetCollisionSpaceObjsJs", v: new funcType$11(GetCollisionSpaceObjsJs) }, { k: "GetCharacterConfigsOrderedByJoinIndex", v: new funcType$12(GetCharacterConfigsOrderedByJoinIndex) }, { k: "ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs", v: new funcType$13(ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs) }, { k: "WorldToPolygonColliderBLPos", v: new funcType$14(battle.WorldToPolygonColliderBLPos) }, { k: "PolygonColliderBLToWorldPos", v: new funcType$14(battle.PolygonColliderBLToWorldPos) }]), mapType$2); + }; + $init = function() { + $pkg.$init = function() {}; + /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: + $r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = battle.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + $r = resolv.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } + if ($pkg === $mainPkg) { + main(); + $mainFinished = true; + } + /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; + }; + $pkg.$init = $init; + return $pkg; +})(); $synthesizeMethods(); $initAllLinknames(); var $mainPkg = $packages["jsexport"]; diff --git a/frontend/assets/resources/animation/MonkGirl.meta b/frontend/assets/resources/animation/MonkGirl.meta new file mode 100644 index 0000000..aeea793 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl.meta @@ -0,0 +1,7 @@ +{ + "ver": "1.0.1", + "uuid": "a0021cb4-2c2e-49ca-8699-7acf4f7a531b", + "isSubpackage": false, + "subpackageName": "", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/Atk1.anim b/frontend/assets/resources/animation/MonkGirl/Atk1.anim new file mode 100644 index 0000000..06ab839 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/Atk1.anim @@ -0,0 +1,49 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "Atk1", + "_objFlags": 0, + "_native": "", + "_duration": 0.36666666666666664, + "sample": 60, + "speed": 1, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "a5615ed4-d055-4db5-b924-4c8d8b2d926f" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "12b90556-58b9-4311-b5d9-820fb76d659b" + } + }, + { + "frame": 0.11666666666666667, + "value": { + "__uuid__": "72bc74a1-6e8c-48bb-9ab2-9b8f502ceffb" + } + }, + { + "frame": 0.31666666666666665, + "value": { + "__uuid__": "7e619896-100d-4903-b256-e30ddb5ad397" + } + }, + { + "frame": 0.35, + "value": { + "__uuid__": "4a35e0f5-95c4-445b-8f9b-6514a060a72d" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/Atk1.anim.meta b/frontend/assets/resources/animation/MonkGirl/Atk1.anim.meta new file mode 100644 index 0000000..620afbf --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/Atk1.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "c3d4f508-b3a9-4deb-b2d1-8ddc7bf22e0c", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/Atked1.anim b/frontend/assets/resources/animation/MonkGirl/Atked1.anim new file mode 100644 index 0000000..505dba0 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/Atked1.anim @@ -0,0 +1,37 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "Atked1", + "_objFlags": 0, + "_native": "", + "_duration": 0.05, + "sample": 60, + "speed": 0.4, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "df446561-abb9-4d91-aa79-636bdf3d9335" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "852471cd-6270-47d2-b40b-e33a93910240" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "7d08ee55-243c-4bb0-b614-1cd09cabf13f" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/Atked1.anim.meta b/frontend/assets/resources/animation/MonkGirl/Atked1.anim.meta new file mode 100644 index 0000000..7df34d0 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/Atked1.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "1ec27664-cd2a-4c7a-838f-953a7713ceca", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/BlownUp1.anim b/frontend/assets/resources/animation/MonkGirl/BlownUp1.anim new file mode 100644 index 0000000..edfc5bb --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/BlownUp1.anim @@ -0,0 +1,43 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "BlownUp1", + "_objFlags": 0, + "_native": "", + "_duration": 0.06666666666666667, + "sample": 60, + "speed": 0.2, + "wrapMode": 2, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "9d16c119-8ead-4d9e-90b3-5bbf749f71ef" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "f2629502-5c62-4df2-9741-58fe94bfab53" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "d6a81e68-5f14-45d1-82e2-fabf2853685a" + } + }, + { + "frame": 0.05, + "value": { + "__uuid__": "9f7382dd-4da6-485c-8064-78ec031a2c0a" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/BlownUp1.anim.meta b/frontend/assets/resources/animation/MonkGirl/BlownUp1.anim.meta new file mode 100644 index 0000000..b0fc7f6 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/BlownUp1.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "f87054fd-328f-4001-a8ff-b4c049cc1e6d", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/GetUp1.anim b/frontend/assets/resources/animation/MonkGirl/GetUp1.anim new file mode 100644 index 0000000..078be81 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/GetUp1.anim @@ -0,0 +1,79 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "GetUp1", + "_objFlags": 0, + "_native": "", + "_duration": 0.16666666666666666, + "sample": 60, + "speed": 0.3, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "4b1219ad-ef64-47f6-87ca-16188343c47a" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "49e7f092-85c2-4eb3-a62a-965e9e0d9c12" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "73023874-a74c-4e9f-8389-d4280d7be452" + } + }, + { + "frame": 0.05, + "value": { + "__uuid__": "ed62daef-540c-4b34-81d3-99c4296d6ca9" + } + }, + { + "frame": 0.06666666666666667, + "value": { + "__uuid__": "cdbcadf6-4e4f-4673-8044-51b40c58da96" + } + }, + { + "frame": 0.08333333333333333, + "value": { + "__uuid__": "7ae337de-a63f-41ef-9627-84f9ced77d6f" + } + }, + { + "frame": 0.1, + "value": { + "__uuid__": "931626d5-01ad-4329-a8f7-9a00bd64fdff" + } + }, + { + "frame": 0.11666666666666667, + "value": { + "__uuid__": "d4c2dae6-8ff6-4976-8e50-cb0b698d93d4" + } + }, + { + "frame": 0.13333333333333333, + "value": { + "__uuid__": "b328d317-3721-4402-89db-34910c31a48a" + } + }, + { + "frame": 0.15, + "value": { + "__uuid__": "a51ca0c2-3e3b-4b7b-b636-1cac791c2511" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/GetUp1.anim.meta b/frontend/assets/resources/animation/MonkGirl/GetUp1.anim.meta new file mode 100644 index 0000000..f08078f --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/GetUp1.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "7cb4d395-c68f-4643-9e2e-8cb8e200d3a5", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/Idle1.anim b/frontend/assets/resources/animation/MonkGirl/Idle1.anim new file mode 100644 index 0000000..9078bff --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/Idle1.anim @@ -0,0 +1,85 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "Idle1", + "_objFlags": 0, + "_native": "", + "_duration": 0.45, + "sample": 60, + "speed": 1, + "wrapMode": 2, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "104ab450-fec3-4ea8-b6c0-aca74a826f5a" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "4bad7430-7b43-47ae-9d65-ef3a2b88f450" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "c3675bd6-4aa6-4ec5-80d5-ef35862d15b9" + } + }, + { + "frame": 0.08333333333333333, + "value": { + "__uuid__": "23446a26-dadf-4d7d-9dd3-4ca3f8f6b7a5" + } + }, + { + "frame": 0.13333333333333333, + "value": { + "__uuid__": "47628469-7775-4daf-b321-74fac947ce60" + } + }, + { + "frame": 0.18333333333333332, + "value": { + "__uuid__": "1c37ea82-6700-4bea-9265-c70a16d2187c" + } + }, + { + "frame": 0.23333333333333334, + "value": { + "__uuid__": "c4fb2fc2-7a04-4219-b129-77249f33426b" + } + }, + { + "frame": 0.2833333333333333, + "value": { + "__uuid__": "0ecf4a0c-0f13-42fa-a214-b4826acd8556" + } + }, + { + "frame": 0.3333333333333333, + "value": { + "__uuid__": "cabf9cb6-99ca-426d-9a23-95cdec6f06b9" + } + }, + { + "frame": 0.38333333333333336, + "value": { + "__uuid__": "94d073e8-f17f-4a66-be72-2b8cf3347ea4" + } + }, + { + "frame": 0.43333333333333335, + "value": { + "__uuid__": "3a435737-51d0-4f31-ad2b-838d9d98bad3" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/Idle1.anim.meta b/frontend/assets/resources/animation/MonkGirl/Idle1.anim.meta new file mode 100644 index 0000000..acb8e34 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/Idle1.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "a0d8b9a6-7bf7-4cf5-aecb-54b2908cbfb3", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/InAirAtk1.anim b/frontend/assets/resources/animation/MonkGirl/InAirAtk1.anim new file mode 100644 index 0000000..6036717 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/InAirAtk1.anim @@ -0,0 +1,97 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "InAirAtk1", + "_objFlags": 0, + "_native": "", + "_duration": 0.4166666666666667, + "sample": 60, + "speed": 1, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "3631c1af-5426-420e-9c81-47d8dc4790f7" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "f10683b4-2dd8-48d9-b11d-3e7fd12e2dee" + } + }, + { + "frame": 0.06666666666666667, + "value": { + "__uuid__": "6134b002-58ed-4d78-af23-5f574661b04b" + } + }, + { + "frame": 0.1, + "value": { + "__uuid__": "5db472a6-3371-4a5b-860d-e6ea6a9eaba0" + } + }, + { + "frame": 0.13333333333333333, + "value": { + "__uuid__": "769179e3-d0bb-4bd0-a084-ce5ad5b57d47" + } + }, + { + "frame": 0.16666666666666666, + "value": { + "__uuid__": "8f09ba68-066c-4240-84be-390cdbb2d59c" + } + }, + { + "frame": 0.2, + "value": { + "__uuid__": "e8ce0f1e-6af0-423b-9448-2a72c944127d" + } + }, + { + "frame": 0.23333333333333334, + "value": { + "__uuid__": "1da322c5-98b8-49d0-8f96-33fdc68a23cb" + } + }, + { + "frame": 0.26666666666666666, + "value": { + "__uuid__": "1e4bf242-5d08-4220-a5d9-2a2524b0e3c7" + } + }, + { + "frame": 0.3, + "value": { + "__uuid__": "6de218a1-5a97-405d-b7d0-68cc9cf076f9" + } + }, + { + "frame": 0.3333333333333333, + "value": { + "__uuid__": "4c16e710-abfe-4030-bd42-fded0f41f665" + } + }, + { + "frame": 0.36666666666666664, + "value": { + "__uuid__": "1753c533-3a31-46b6-ab01-15b778702237" + } + }, + { + "frame": 0.4, + "value": { + "__uuid__": "923cfcea-2c3e-493f-826a-0b08b447ebde" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/InAirAtk1.anim.meta b/frontend/assets/resources/animation/MonkGirl/InAirAtk1.anim.meta new file mode 100644 index 0000000..15b2b5c --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/InAirAtk1.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "555d837b-4a68-4a28-b9ff-e97e393d1a05", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/InAirAtked1.anim b/frontend/assets/resources/animation/MonkGirl/InAirAtked1.anim new file mode 100644 index 0000000..77dde40 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/InAirAtked1.anim @@ -0,0 +1,31 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "InAirAtked1", + "_objFlags": 0, + "_native": "", + "_duration": 0.03333333333333333, + "sample": 60, + "speed": 0.2, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "852471cd-6270-47d2-b40b-e33a93910240" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "7d08ee55-243c-4bb0-b614-1cd09cabf13f" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/InAirAtked1.anim.meta b/frontend/assets/resources/animation/MonkGirl/InAirAtked1.anim.meta new file mode 100644 index 0000000..a56bece --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/InAirAtked1.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "ee0b89e9-89f0-451e-a6ef-d41d64d3d67a", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/InAirIdle1ByJump.anim b/frontend/assets/resources/animation/MonkGirl/InAirIdle1ByJump.anim new file mode 100644 index 0000000..f887f69 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/InAirIdle1ByJump.anim @@ -0,0 +1,91 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "InAirIdle1ByJump", + "_objFlags": 0, + "_native": "", + "_duration": 0.2, + "sample": 60, + "speed": 0.6, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "21c7f1b2-77c7-4f9a-b5c6-b79d99553432" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "9106d51d-808b-4cec-b03c-1a0e9de3dd13" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "23199f52-ded0-4271-b426-17c6037989a4" + } + }, + { + "frame": 0.05, + "value": { + "__uuid__": "293367f0-6557-40d2-aff5-4f6b9faa3b14" + } + }, + { + "frame": 0.06666666666666667, + "value": { + "__uuid__": "f9029e1e-91f8-4ae2-a3ef-b811c409f41a" + } + }, + { + "frame": 0.08333333333333333, + "value": { + "__uuid__": "de0e3195-e56e-4bba-82f6-72635f453eea" + } + }, + { + "frame": 0.1, + "value": { + "__uuid__": "93e7fb75-b42d-4da9-860d-2e7dd0930d8d" + } + }, + { + "frame": 0.11666666666666667, + "value": { + "__uuid__": "1a789615-1580-4342-b739-7ef94c80b34a" + } + }, + { + "frame": 0.13333333333333333, + "value": { + "__uuid__": "5331bbb0-fad4-402c-8788-cb070cc8fb7c" + } + }, + { + "frame": 0.15, + "value": { + "__uuid__": "2f2bce67-0e39-45ee-aebf-b15e0d0c341f" + } + }, + { + "frame": 0.16666666666666666, + "value": { + "__uuid__": "77a2f890-6627-4699-9278-21d7365bd2c8" + } + }, + { + "frame": 0.18333333333333332, + "value": { + "__uuid__": "ce3e8e33-4420-478b-a084-5a7f77d584b8" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/InAirIdle1ByJump.anim.meta b/frontend/assets/resources/animation/MonkGirl/InAirIdle1ByJump.anim.meta new file mode 100644 index 0000000..ad1f6ed --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/InAirIdle1ByJump.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "170bbc56-3cff-4a81-b48f-a037b9418758", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/InAirIdle1NoJump.anim b/frontend/assets/resources/animation/MonkGirl/InAirIdle1NoJump.anim new file mode 100644 index 0000000..396cc34 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/InAirIdle1NoJump.anim @@ -0,0 +1,25 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "InAirIdle1NoJump", + "_objFlags": 0, + "_native": "", + "_duration": 0.016666666666666666, + "sample": 60, + "speed": 1, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "ce3e8e33-4420-478b-a084-5a7f77d584b8" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/InAirIdle1NoJump.anim.meta b/frontend/assets/resources/animation/MonkGirl/InAirIdle1NoJump.anim.meta new file mode 100644 index 0000000..d911250 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/InAirIdle1NoJump.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "996c218a-9e18-441e-b0f8-e61c5c991b9e", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/LayDown1.anim b/frontend/assets/resources/animation/MonkGirl/LayDown1.anim new file mode 100644 index 0000000..8affc52 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/LayDown1.anim @@ -0,0 +1,49 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "LayDown1", + "_objFlags": 0, + "_native": "", + "_duration": 0.08333333333333333, + "sample": 60, + "speed": 0.3, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "e1f19129-8517-47fa-814d-b79c8abcd549" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "b4127445-a13e-4244-9656-92033a5abcca" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "64a8e39c-95ed-4181-b777-b05434d1fa6d" + } + }, + { + "frame": 0.05, + "value": { + "__uuid__": "5d1458ae-8812-4c4a-a01f-0a2b901ed3f3" + } + }, + { + "frame": 0.06666666666666667, + "value": { + "__uuid__": "ac0b9039-5caf-4bc1-bf29-2a733fbb7898" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/LayDown1.anim.meta b/frontend/assets/resources/animation/MonkGirl/LayDown1.anim.meta new file mode 100644 index 0000000..d5d0a44 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/LayDown1.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "0978395c-8947-4830-9f68-58fadcbe5c63", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/MonkGirl.plist b/frontend/assets/resources/animation/MonkGirl/MonkGirl.plist new file mode 100644 index 0000000..771e272 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/MonkGirl.plist @@ -0,0 +1,1211 @@ + + + + + frames + + Atk1_0.png + + aliases + + spriteOffset + {0,0} + spriteSize + {62,92} + spriteSourceSize + {62,92} + textureRect + {{777,282},{62,92}} + textureRotated + + + Atk1_1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {77,99} + spriteSourceSize + {77,99} + textureRect + {{409,214},{77,99}} + textureRotated + + + Atk1_2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {112,99} + spriteSourceSize + {112,99} + textureRect + {{184,114},{112,99}} + textureRotated + + + Atk1_3.png + + aliases + + spriteOffset + {0,0} + spriteSize + {96,100} + spriteSourceSize + {96,100} + textureRect + {{388,327},{96,100}} + textureRotated + + + Atk1_4.png + + aliases + + spriteOffset + {0,0} + spriteSize + {62,92} + spriteSourceSize + {62,92} + textureRect + {{777,282},{62,92}} + textureRotated + + + Atked1_0.png + + aliases + + spriteOffset + {0,0} + spriteSize + {62,97} + spriteSourceSize + {62,97} + textureRect + {{419,106},{62,97}} + textureRotated + + + Atked1_1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {73,95} + spriteSourceSize + {73,95} + textureRect + {{727,478},{73,95}} + textureRotated + + + Atked1_2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {90,89} + spriteSourceSize + {90,89} + textureRect + {{800,472},{90,89}} + textureRotated + + + BlownUp1_0.png + + aliases + + spriteOffset + {0,0} + spriteSize + {95,80} + spriteSourceSize + {95,80} + textureRect + {{555,193},{95,80}} + textureRotated + + + BlownUp1_1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {80,95} + spriteSourceSize + {80,95} + textureRect + {{554,290},{80,95}} + textureRotated + + + BlownUp1_2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {83,92} + spriteSourceSize + {83,92} + textureRect + {{748,378},{83,92}} + textureRotated + + + BlownUp1_3.png + + aliases + + spriteOffset + {0,0} + spriteSize + {92,83} + spriteSourceSize + {92,83} + textureRect + {{900,58},{92,83}} + textureRotated + + + GetUp1_0.png + + aliases + + spriteOffset + {0,0} + spriteSize + {112,45} + spriteSourceSize + {112,45} + textureRect + {{259,0},{112,45}} + textureRotated + + + GetUp1_1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {88,69} + spriteSourceSize + {88,69} + textureRect + {{919,318},{88,69}} + textureRotated + + + GetUp1_2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {91,90} + spriteSourceSize + {91,90} + textureRect + {{832,188},{91,90}} + textureRotated + + + GetUp1_3.png + + aliases + + spriteOffset + {0,0} + spriteSize + {120,93} + spriteSourceSize + {120,93} + textureRect + {{62,248},{120,93}} + textureRotated + + + GetUp1_4.png + + aliases + + spriteOffset + {0,0} + spriteSize + {100,112} + spriteSourceSize + {100,112} + textureRect + {{155,233},{100,112}} + textureRotated + + + GetUp1_5.png + + aliases + + spriteOffset + {0,0} + spriteSize + {106,93} + spriteSourceSize + {106,93} + textureRect + {{316,221},{106,93}} + textureRotated + + + GetUp1_6.png + + aliases + + spriteOffset + {0,0} + spriteSize + {106,79} + spriteSourceSize + {106,79} + textureRect + {{340,108},{106,79}} + textureRotated + + + GetUp1_7.png + + aliases + + spriteOffset + {0,0} + spriteSize + {73,87} + spriteSourceSize + {73,87} + textureRect + {{922,231},{73,87}} + textureRotated + + + GetUp1_8.png + + aliases + + spriteOffset + {0,0} + spriteSize + {67,90} + spriteSourceSize + {67,90} + textureRect + {{889,472},{67,90}} + textureRotated + + + GetUp1_9.png + + aliases + + spriteOffset + {0,0} + spriteSize + {58,97} + spriteSourceSize + {58,97} + textureRect + {{433,0},{58,97}} + textureRotated + + + Idle1_0.png + + aliases + + spriteOffset + {0,0} + spriteSize + {58,95} + spriteSourceSize + {58,95} + textureRect + {{685,95},{58,95}} + textureRotated + + + Idle1_1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {58,97} + spriteSourceSize + {58,97} + textureRect + {{481,97},{58,97}} + textureRotated + + + Idle1_10.png + + aliases + + spriteOffset + {0,0} + spriteSize + {60,94} + spriteSourceSize + {60,94} + textureRect + {{772,188},{60,94}} + textureRotated + + + Idle1_2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {58,97} + spriteSourceSize + {58,97} + textureRect + {{491,0},{58,97}} + textureRotated + + + Idle1_3.png + + aliases + + spriteOffset + {0,0} + spriteSize + {58,97} + spriteSourceSize + {58,97} + textureRect + {{399,427},{58,97}} + textureRotated + + + Idle1_4.png + + aliases + + spriteOffset + {0,0} + spriteSize + {60,95} + spriteSourceSize + {60,95} + textureRect + {{635,191},{60,95}} + textureRotated + + + Idle1_5.png + + aliases + + spriteOffset + {0,0} + spriteSize + {60,94} + spriteSourceSize + {60,94} + textureRect + {{818,94},{60,94}} + textureRotated + + + Idle1_6.png + + aliases + + spriteOffset + {0,0} + spriteSize + {59,93} + spriteSourceSize + {59,93} + textureRect + {{609,480},{59,93}} + textureRotated + + + Idle1_7.png + + aliases + + spriteOffset + {0,0} + spriteSize + {58,93} + spriteSourceSize + {58,93} + textureRect + {{900,0},{58,93}} + textureRotated + + + Idle1_8.png + + aliases + + spriteOffset + {0,0} + spriteSize + {59,93} + spriteSourceSize + {59,93} + textureRect + {{668,480},{59,93}} + textureRotated + + + Idle1_9.png + + aliases + + spriteOffset + {0,0} + spriteSize + {60,94} + spriteSourceSize + {60,94} + textureRect + {{840,0},{60,94}} + textureRotated + + + InAirAtk1_0.png + + aliases + + spriteOffset + {0,0} + spriteSize + {77,68} + spriteSourceSize + {77,68} + textureRect + {{532,505},{77,68}} + textureRotated + + + InAirAtk1_1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {118,76} + spriteSourceSize + {118,76} + textureRect + {{64,0},{118,76}} + textureRotated + + + InAirAtk1_10.png + + aliases + + spriteOffset + {0,0} + spriteSize + {104,65} + spriteSourceSize + {104,65} + textureRect + {{267,442},{104,65}} + textureRotated + + + InAirAtk1_11.png + + aliases + + spriteOffset + {0,0} + spriteSize + {80,66} + spriteSourceSize + {80,66} + textureRect + {{839,279},{80,66}} + textureRotated + + + InAirAtk1_12.png + + aliases + + spriteOffset + {0,0} + spriteSize + {102,67} + spriteSourceSize + {102,67} + textureRect + {{332,431},{102,67}} + textureRotated + + + InAirAtk1_2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {79,66} + spriteSourceSize + {79,66} + textureRect + {{839,345},{79,66}} + textureRotated + + + InAirAtk1_3.png + + aliases + + spriteOffset + {0,0} + spriteSize + {124,64} + spriteSourceSize + {124,64} + textureRect + {{0,0},{124,64}} + textureRotated + + + InAirAtk1_4.png + + aliases + + spriteOffset + {0,0} + spriteSize + {104,64} + spriteSourceSize + {104,64} + textureRect + {{324,327},{104,64}} + textureRotated + + + InAirAtk1_5.png + + aliases + + spriteOffset + {0,0} + spriteSize + {79,61} + spriteSourceSize + {79,61} + textureRect + {{831,411},{79,61}} + textureRotated + + + InAirAtk1_6.png + + aliases + + spriteOffset + {0,0} + spriteSize + {124,64} + spriteSourceSize + {124,64} + textureRect + {{0,124},{124,64}} + textureRotated + + + InAirAtk1_7.png + + aliases + + spriteOffset + {0,0} + spriteSize + {106,67} + spriteSourceSize + {106,67} + textureRect + {{366,0},{106,67}} + textureRotated + + + InAirAtk1_8.png + + aliases + + spriteOffset + {0,0} + spriteSize + {79,66} + spriteSourceSize + {79,66} + textureRect + {{918,406},{79,66}} + textureRotated + + + InAirAtk1_9.png + + aliases + + spriteOffset + {0,0} + spriteSize + {118,64} + spriteSourceSize + {118,64} + textureRect + {{64,118},{118,64}} + textureRotated + + + InAirIdle1_0.png + + aliases + + spriteOffset + {0,0} + spriteSize + {71,119} + spriteSourceSize + {71,119} + textureRect + {{66,368},{71,119}} + textureRotated + + + InAirIdle1_1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {71,119} + spriteSourceSize + {71,119} + textureRect + {{137,368},{71,119}} + textureRotated + + + InAirIdle1_10.png + + aliases + + spriteOffset + {0,0} + spriteSize + {55,114} + spriteSourceSize + {55,114} + textureRect + {{140,0},{55,114}} + textureRotated + + + InAirIdle1_11.png + + aliases + + spriteOffset + {0,0} + spriteSize + {62,124} + spriteSourceSize + {62,124} + textureRect + {{0,248},{62,124}} + textureRotated + + + InAirIdle1_2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {74,90} + spriteSourceSize + {74,90} + textureRect + {{922,141},{74,90}} + textureRotated + + + InAirIdle1_3.png + + aliases + + spriteOffset + {0,0} + spriteSize + {110,54} + spriteSourceSize + {110,54} + textureRect + {{208,345},{110,54}} + textureRotated + + + InAirIdle1_4.png + + aliases + + spriteOffset + {0,0} + spriteSize + {85,88} + spriteSourceSize + {85,88} + textureRect + {{95,487},{85,88}} + textureRotated + + + InAirIdle1_5.png + + aliases + + spriteOffset + {0,0} + spriteSize + {64,112} + spriteSourceSize + {64,112} + textureRect + {{195,0},{64,112}} + textureRotated + + + InAirIdle1_6.png + + aliases + + spriteOffset + {0,0} + spriteSize + {62,107} + spriteSourceSize + {62,107} + textureRect + {{262,335},{62,107}} + textureRotated + + + InAirIdle1_7.png + + aliases + + spriteOffset + {0,0} + spriteSize + {85,84} + spriteSourceSize + {85,84} + textureRect + {{183,487},{85,84}} + textureRotated + + + InAirIdle1_8.png + + aliases + + spriteOffset + {0,0} + spriteSize + {109,61} + spriteSourceSize + {109,61} + textureRect + {{255,226},{109,61}} + textureRotated + + + InAirIdle1_9.png + + aliases + + spriteOffset + {0,0} + spriteSize + {78,95} + spriteSourceSize + {78,95} + textureRect + {{0,495},{78,95}} + textureRotated + + + LayDown1_0.png + + aliases + + spriteOffset + {0,0} + spriteSize + {115,56} + spriteSourceSize + {115,56} + textureRect + {{128,118},{115,56}} + textureRotated + + + LayDown1_1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {109,57} + spriteSourceSize + {109,57} + textureRect + {{283,112},{109,57}} + textureRotated + + + LayDown1_2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {108,62} + spriteSourceSize + {108,62} + textureRect + {{304,0},{108,62}} + textureRotated + + + LayDown1_3.png + + aliases + + spriteOffset + {0,0} + spriteSize + {123,36} + spriteSourceSize + {123,36} + textureRect + {{0,372},{123,36}} + textureRotated + + + LayDown1_4.png + + aliases + + spriteOffset + {0,0} + spriteSize + {123,30} + spriteSourceSize + {123,30} + textureRect + {{36,372},{123,30}} + textureRotated + + + Walking_0.png + + aliases + + spriteOffset + {0,0} + spriteSize + {78,95} + spriteSourceSize + {78,95} + textureRect + {{607,96},{78,95}} + textureRotated + + + Walking_1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {75,96} + spriteSourceSize + {75,96} + textureRect + {{457,427},{75,96}} + textureRotated + + + Walking_10.png + + aliases + + spriteOffset + {0,0} + spriteSize + {65,96} + spriteSourceSize + {65,96} + textureRect + {{549,0},{65,96}} + textureRotated + + + Walking_11.png + + aliases + + spriteOffset + {0,0} + spriteSize + {65,96} + spriteSourceSize + {65,96} + textureRect + {{532,409},{65,96}} + textureRotated + + + Walking_12.png + + aliases + + spriteOffset + {0,0} + spriteSize + {74,95} + spriteSourceSize + {74,95} + textureRect + {{634,288},{74,95}} + textureRotated + + + Walking_13.png + + aliases + + spriteOffset + {0,0} + spriteSize + {75,94} + spriteSourceSize + {75,94} + textureRect + {{743,94},{75,94}} + textureRotated + + + Walking_14.png + + aliases + + spriteOffset + {0,0} + spriteSize + {70,94} + spriteSourceSize + {70,94} + textureRect + {{770,0},{70,94}} + textureRotated + + + Walking_15.png + + aliases + + spriteOffset + {0,0} + spriteSize + {78,94} + spriteSourceSize + {78,94} + textureRect + {{692,0},{78,94}} + textureRotated + + + Walking_2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {69,96} + spriteSourceSize + {69,96} + textureRect + {{486,194},{69,96}} + textureRotated + + + Walking_3.png + + aliases + + spriteOffset + {0,0} + spriteSize + {70,96} + spriteSourceSize + {70,96} + textureRect + {{484,313},{70,96}} + textureRotated + + + Walking_4.png + + aliases + + spriteOffset + {0,0} + spriteSize + {78,95} + spriteSourceSize + {78,95} + textureRect + {{614,0},{78,95}} + textureRotated + + + Walking_5.png + + aliases + + spriteOffset + {0,0} + spriteSize + {77,95} + spriteSourceSize + {77,95} + textureRect + {{597,385},{77,95}} + textureRotated + + + Walking_6.png + + aliases + + spriteOffset + {0,0} + spriteSize + {69,94} + spriteSourceSize + {69,94} + textureRect + {{708,284},{69,94}} + textureRotated + + + Walking_7.png + + aliases + + spriteOffset + {0,0} + spriteSize + {77,94} + spriteSourceSize + {77,94} + textureRect + {{695,190},{77,94}} + textureRotated + + + Walking_8.png + + aliases + + spriteOffset + {0,0} + spriteSize + {74,95} + spriteSourceSize + {74,95} + textureRect + {{674,383},{74,95}} + textureRotated + + + Walking_9.png + + aliases + + spriteOffset + {0,0} + spriteSize + {68,96} + spriteSourceSize + {68,96} + textureRect + {{539,97},{68,96}} + textureRotated + + + + metadata + + format + 3 + pixelFormat + RGBA8888 + premultiplyAlpha + + realTextureFileName + MonkGirl.png + size + {997,573} + smartupdate + $TexturePacker:SmartUpdate:6bd11d0c92774f15794781ac24a65022:8606ee60ad6f31ae3d83c8f9fd35f0b6:7b088363a1f16e4f4ff313aecc52227b$ + textureFileName + MonkGirl.png + + + diff --git a/frontend/assets/resources/animation/MonkGirl/MonkGirl.plist.meta b/frontend/assets/resources/animation/MonkGirl/MonkGirl.plist.meta new file mode 100644 index 0000000..1ee2958 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/MonkGirl.plist.meta @@ -0,0 +1,1750 @@ +{ + "ver": "1.2.4", + "uuid": "725c90f9-56f8-48ea-9159-4d2949cd3ce0", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "size": { + "width": 997, + "height": 573 + }, + "type": "Texture Packer", + "subMetas": { + "Atk1_0.png": { + "ver": "1.0.4", + "uuid": "a5615ed4-d055-4db5-b924-4c8d8b2d926f", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 777, + "trimY": 282, + "width": 62, + "height": 92, + "rawWidth": 62, + "rawHeight": 92, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Atk1_1.png": { + "ver": "1.0.4", + "uuid": "12b90556-58b9-4311-b5d9-820fb76d659b", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 409, + "trimY": 214, + "width": 77, + "height": 99, + "rawWidth": 77, + "rawHeight": 99, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Atk1_2.png": { + "ver": "1.0.4", + "uuid": "72bc74a1-6e8c-48bb-9ab2-9b8f502ceffb", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 184, + "trimY": 114, + "width": 112, + "height": 99, + "rawWidth": 112, + "rawHeight": 99, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Atk1_3.png": { + "ver": "1.0.4", + "uuid": "7e619896-100d-4903-b256-e30ddb5ad397", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 388, + "trimY": 327, + "width": 96, + "height": 100, + "rawWidth": 96, + "rawHeight": 100, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Atk1_4.png": { + "ver": "1.0.4", + "uuid": "4a35e0f5-95c4-445b-8f9b-6514a060a72d", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 777, + "trimY": 282, + "width": 62, + "height": 92, + "rawWidth": 62, + "rawHeight": 92, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Atked1_0.png": { + "ver": "1.0.4", + "uuid": "df446561-abb9-4d91-aa79-636bdf3d9335", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 419, + "trimY": 106, + "width": 62, + "height": 97, + "rawWidth": 62, + "rawHeight": 97, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Atked1_1.png": { + "ver": "1.0.4", + "uuid": "852471cd-6270-47d2-b40b-e33a93910240", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 727, + "trimY": 478, + "width": 73, + "height": 95, + "rawWidth": 73, + "rawHeight": 95, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Atked1_2.png": { + "ver": "1.0.4", + "uuid": "7d08ee55-243c-4bb0-b614-1cd09cabf13f", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 800, + "trimY": 472, + "width": 90, + "height": 89, + "rawWidth": 90, + "rawHeight": 89, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "BlownUp1_0.png": { + "ver": "1.0.4", + "uuid": "9d16c119-8ead-4d9e-90b3-5bbf749f71ef", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 555, + "trimY": 193, + "width": 95, + "height": 80, + "rawWidth": 95, + "rawHeight": 80, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "BlownUp1_1.png": { + "ver": "1.0.4", + "uuid": "f2629502-5c62-4df2-9741-58fe94bfab53", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 554, + "trimY": 290, + "width": 80, + "height": 95, + "rawWidth": 80, + "rawHeight": 95, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "BlownUp1_2.png": { + "ver": "1.0.4", + "uuid": "d6a81e68-5f14-45d1-82e2-fabf2853685a", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 748, + "trimY": 378, + "width": 83, + "height": 92, + "rawWidth": 83, + "rawHeight": 92, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "BlownUp1_3.png": { + "ver": "1.0.4", + "uuid": "9f7382dd-4da6-485c-8064-78ec031a2c0a", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 900, + "trimY": 58, + "width": 92, + "height": 83, + "rawWidth": 92, + "rawHeight": 83, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "GetUp1_0.png": { + "ver": "1.0.4", + "uuid": "4b1219ad-ef64-47f6-87ca-16188343c47a", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 259, + "trimY": 0, + "width": 112, + "height": 45, + "rawWidth": 112, + "rawHeight": 45, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "GetUp1_1.png": { + "ver": "1.0.4", + "uuid": "49e7f092-85c2-4eb3-a62a-965e9e0d9c12", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 919, + "trimY": 318, + "width": 88, + "height": 69, + "rawWidth": 88, + "rawHeight": 69, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "GetUp1_2.png": { + "ver": "1.0.4", + "uuid": "73023874-a74c-4e9f-8389-d4280d7be452", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 832, + "trimY": 188, + "width": 91, + "height": 90, + "rawWidth": 91, + "rawHeight": 90, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "GetUp1_3.png": { + "ver": "1.0.4", + "uuid": "ed62daef-540c-4b34-81d3-99c4296d6ca9", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 62, + "trimY": 248, + "width": 120, + "height": 93, + "rawWidth": 120, + "rawHeight": 93, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "GetUp1_4.png": { + "ver": "1.0.4", + "uuid": "cdbcadf6-4e4f-4673-8044-51b40c58da96", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 155, + "trimY": 233, + "width": 100, + "height": 112, + "rawWidth": 100, + "rawHeight": 112, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "GetUp1_5.png": { + "ver": "1.0.4", + "uuid": "7ae337de-a63f-41ef-9627-84f9ced77d6f", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 316, + "trimY": 221, + "width": 106, + "height": 93, + "rawWidth": 106, + "rawHeight": 93, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "GetUp1_6.png": { + "ver": "1.0.4", + "uuid": "931626d5-01ad-4329-a8f7-9a00bd64fdff", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 340, + "trimY": 108, + "width": 106, + "height": 79, + "rawWidth": 106, + "rawHeight": 79, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "GetUp1_7.png": { + "ver": "1.0.4", + "uuid": "d4c2dae6-8ff6-4976-8e50-cb0b698d93d4", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 922, + "trimY": 231, + "width": 73, + "height": 87, + "rawWidth": 73, + "rawHeight": 87, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "GetUp1_8.png": { + "ver": "1.0.4", + "uuid": "b328d317-3721-4402-89db-34910c31a48a", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 889, + "trimY": 472, + "width": 67, + "height": 90, + "rawWidth": 67, + "rawHeight": 90, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "GetUp1_9.png": { + "ver": "1.0.4", + "uuid": "a51ca0c2-3e3b-4b7b-b636-1cac791c2511", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 433, + "trimY": 0, + "width": 58, + "height": 97, + "rawWidth": 58, + "rawHeight": 97, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Idle1_0.png": { + "ver": "1.0.4", + "uuid": "104ab450-fec3-4ea8-b6c0-aca74a826f5a", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 685, + "trimY": 95, + "width": 58, + "height": 95, + "rawWidth": 58, + "rawHeight": 95, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Idle1_1.png": { + "ver": "1.0.4", + "uuid": "4bad7430-7b43-47ae-9d65-ef3a2b88f450", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 481, + "trimY": 97, + "width": 58, + "height": 97, + "rawWidth": 58, + "rawHeight": 97, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Idle1_10.png": { + "ver": "1.0.4", + "uuid": "3a435737-51d0-4f31-ad2b-838d9d98bad3", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 772, + "trimY": 188, + "width": 60, + "height": 94, + "rawWidth": 60, + "rawHeight": 94, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Idle1_2.png": { + "ver": "1.0.4", + "uuid": "c3675bd6-4aa6-4ec5-80d5-ef35862d15b9", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 491, + "trimY": 0, + "width": 58, + "height": 97, + "rawWidth": 58, + "rawHeight": 97, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Idle1_3.png": { + "ver": "1.0.4", + "uuid": "23446a26-dadf-4d7d-9dd3-4ca3f8f6b7a5", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 399, + "trimY": 427, + "width": 58, + "height": 97, + "rawWidth": 58, + "rawHeight": 97, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Idle1_4.png": { + "ver": "1.0.4", + "uuid": "47628469-7775-4daf-b321-74fac947ce60", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 635, + "trimY": 191, + "width": 60, + "height": 95, + "rawWidth": 60, + "rawHeight": 95, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Idle1_5.png": { + "ver": "1.0.4", + "uuid": "1c37ea82-6700-4bea-9265-c70a16d2187c", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 818, + "trimY": 94, + "width": 60, + "height": 94, + "rawWidth": 60, + "rawHeight": 94, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Idle1_6.png": { + "ver": "1.0.4", + "uuid": "c4fb2fc2-7a04-4219-b129-77249f33426b", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 609, + "trimY": 480, + "width": 59, + "height": 93, + "rawWidth": 59, + "rawHeight": 93, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Idle1_7.png": { + "ver": "1.0.4", + "uuid": "0ecf4a0c-0f13-42fa-a214-b4826acd8556", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 900, + "trimY": 0, + "width": 58, + "height": 93, + "rawWidth": 58, + "rawHeight": 93, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Idle1_8.png": { + "ver": "1.0.4", + "uuid": "cabf9cb6-99ca-426d-9a23-95cdec6f06b9", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 668, + "trimY": 480, + "width": 59, + "height": 93, + "rawWidth": 59, + "rawHeight": 93, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Idle1_9.png": { + "ver": "1.0.4", + "uuid": "94d073e8-f17f-4a66-be72-2b8cf3347ea4", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 840, + "trimY": 0, + "width": 60, + "height": 94, + "rawWidth": 60, + "rawHeight": 94, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_0.png": { + "ver": "1.0.4", + "uuid": "f10683b4-2dd8-48d9-b11d-3e7fd12e2dee", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 532, + "trimY": 505, + "width": 77, + "height": 68, + "rawWidth": 77, + "rawHeight": 68, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_1.png": { + "ver": "1.0.4", + "uuid": "6134b002-58ed-4d78-af23-5f574661b04b", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 64, + "trimY": 0, + "width": 118, + "height": 76, + "rawWidth": 118, + "rawHeight": 76, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_10.png": { + "ver": "1.0.4", + "uuid": "1753c533-3a31-46b6-ab01-15b778702237", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 267, + "trimY": 442, + "width": 104, + "height": 65, + "rawWidth": 104, + "rawHeight": 65, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_11.png": { + "ver": "1.0.4", + "uuid": "923cfcea-2c3e-493f-826a-0b08b447ebde", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 839, + "trimY": 279, + "width": 80, + "height": 66, + "rawWidth": 80, + "rawHeight": 66, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_12.png": { + "ver": "1.0.4", + "uuid": "3631c1af-5426-420e-9c81-47d8dc4790f7", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 332, + "trimY": 431, + "width": 102, + "height": 67, + "rawWidth": 102, + "rawHeight": 67, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_2.png": { + "ver": "1.0.4", + "uuid": "5db472a6-3371-4a5b-860d-e6ea6a9eaba0", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 839, + "trimY": 345, + "width": 79, + "height": 66, + "rawWidth": 79, + "rawHeight": 66, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_3.png": { + "ver": "1.0.4", + "uuid": "769179e3-d0bb-4bd0-a084-ce5ad5b57d47", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 124, + "height": 64, + "rawWidth": 124, + "rawHeight": 64, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_4.png": { + "ver": "1.0.4", + "uuid": "8f09ba68-066c-4240-84be-390cdbb2d59c", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 324, + "trimY": 327, + "width": 104, + "height": 64, + "rawWidth": 104, + "rawHeight": 64, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_5.png": { + "ver": "1.0.4", + "uuid": "e8ce0f1e-6af0-423b-9448-2a72c944127d", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 831, + "trimY": 411, + "width": 79, + "height": 61, + "rawWidth": 79, + "rawHeight": 61, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_6.png": { + "ver": "1.0.4", + "uuid": "1da322c5-98b8-49d0-8f96-33fdc68a23cb", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 124, + "width": 124, + "height": 64, + "rawWidth": 124, + "rawHeight": 64, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_7.png": { + "ver": "1.0.4", + "uuid": "1e4bf242-5d08-4220-a5d9-2a2524b0e3c7", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 366, + "trimY": 0, + "width": 106, + "height": 67, + "rawWidth": 106, + "rawHeight": 67, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_8.png": { + "ver": "1.0.4", + "uuid": "6de218a1-5a97-405d-b7d0-68cc9cf076f9", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 918, + "trimY": 406, + "width": 79, + "height": 66, + "rawWidth": 79, + "rawHeight": 66, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirAtk1_9.png": { + "ver": "1.0.4", + "uuid": "4c16e710-abfe-4030-bd42-fded0f41f665", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 64, + "trimY": 118, + "width": 118, + "height": 64, + "rawWidth": 118, + "rawHeight": 64, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirIdle1_0.png": { + "ver": "1.0.4", + "uuid": "9106d51d-808b-4cec-b03c-1a0e9de3dd13", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 66, + "trimY": 368, + "width": 71, + "height": 119, + "rawWidth": 71, + "rawHeight": 119, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirIdle1_1.png": { + "ver": "1.0.4", + "uuid": "21c7f1b2-77c7-4f9a-b5c6-b79d99553432", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 137, + "trimY": 368, + "width": 71, + "height": 119, + "rawWidth": 71, + "rawHeight": 119, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirIdle1_10.png": { + "ver": "1.0.4", + "uuid": "77a2f890-6627-4699-9278-21d7365bd2c8", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 140, + "trimY": 0, + "width": 55, + "height": 114, + "rawWidth": 55, + "rawHeight": 114, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirIdle1_11.png": { + "ver": "1.0.4", + "uuid": "ce3e8e33-4420-478b-a084-5a7f77d584b8", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 248, + "width": 62, + "height": 124, + "rawWidth": 62, + "rawHeight": 124, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirIdle1_2.png": { + "ver": "1.0.4", + "uuid": "23199f52-ded0-4271-b426-17c6037989a4", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 922, + "trimY": 141, + "width": 74, + "height": 90, + "rawWidth": 74, + "rawHeight": 90, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirIdle1_3.png": { + "ver": "1.0.4", + "uuid": "293367f0-6557-40d2-aff5-4f6b9faa3b14", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 208, + "trimY": 345, + "width": 110, + "height": 54, + "rawWidth": 110, + "rawHeight": 54, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirIdle1_4.png": { + "ver": "1.0.4", + "uuid": "f9029e1e-91f8-4ae2-a3ef-b811c409f41a", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 95, + "trimY": 487, + "width": 85, + "height": 88, + "rawWidth": 85, + "rawHeight": 88, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirIdle1_5.png": { + "ver": "1.0.4", + "uuid": "de0e3195-e56e-4bba-82f6-72635f453eea", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 195, + "trimY": 0, + "width": 64, + "height": 112, + "rawWidth": 64, + "rawHeight": 112, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirIdle1_6.png": { + "ver": "1.0.4", + "uuid": "93e7fb75-b42d-4da9-860d-2e7dd0930d8d", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 262, + "trimY": 335, + "width": 62, + "height": 107, + "rawWidth": 62, + "rawHeight": 107, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirIdle1_7.png": { + "ver": "1.0.4", + "uuid": "1a789615-1580-4342-b739-7ef94c80b34a", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 183, + "trimY": 487, + "width": 85, + "height": 84, + "rawWidth": 85, + "rawHeight": 84, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirIdle1_8.png": { + "ver": "1.0.4", + "uuid": "5331bbb0-fad4-402c-8788-cb070cc8fb7c", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 255, + "trimY": 226, + "width": 109, + "height": 61, + "rawWidth": 109, + "rawHeight": 61, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "InAirIdle1_9.png": { + "ver": "1.0.4", + "uuid": "2f2bce67-0e39-45ee-aebf-b15e0d0c341f", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 495, + "width": 78, + "height": 95, + "rawWidth": 78, + "rawHeight": 95, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "LayDown1_0.png": { + "ver": "1.0.4", + "uuid": "e1f19129-8517-47fa-814d-b79c8abcd549", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 128, + "trimY": 118, + "width": 115, + "height": 56, + "rawWidth": 115, + "rawHeight": 56, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "LayDown1_1.png": { + "ver": "1.0.4", + "uuid": "b4127445-a13e-4244-9656-92033a5abcca", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 283, + "trimY": 112, + "width": 109, + "height": 57, + "rawWidth": 109, + "rawHeight": 57, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "LayDown1_2.png": { + "ver": "1.0.4", + "uuid": "64a8e39c-95ed-4181-b777-b05434d1fa6d", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 304, + "trimY": 0, + "width": 108, + "height": 62, + "rawWidth": 108, + "rawHeight": 62, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "LayDown1_3.png": { + "ver": "1.0.4", + "uuid": "5d1458ae-8812-4c4a-a01f-0a2b901ed3f3", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 372, + "width": 123, + "height": 36, + "rawWidth": 123, + "rawHeight": 36, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "LayDown1_4.png": { + "ver": "1.0.4", + "uuid": "ac0b9039-5caf-4bc1-bf29-2a733fbb7898", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 36, + "trimY": 372, + "width": 123, + "height": 30, + "rawWidth": 123, + "rawHeight": 30, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_0.png": { + "ver": "1.0.4", + "uuid": "95e3dc3c-ee98-4ae8-899f-3d6539a649cb", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 607, + "trimY": 96, + "width": 78, + "height": 95, + "rawWidth": 78, + "rawHeight": 95, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_1.png": { + "ver": "1.0.4", + "uuid": "7515ef50-3a14-4e58-8811-a0c890fc40f3", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 457, + "trimY": 427, + "width": 75, + "height": 96, + "rawWidth": 75, + "rawHeight": 96, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_10.png": { + "ver": "1.0.4", + "uuid": "650b8ccb-2a82-4972-bb5b-79a2cb4a3503", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 549, + "trimY": 0, + "width": 65, + "height": 96, + "rawWidth": 65, + "rawHeight": 96, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_11.png": { + "ver": "1.0.4", + "uuid": "b264bcc2-71c7-45a6-8c94-be049bb0d163", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 532, + "trimY": 409, + "width": 65, + "height": 96, + "rawWidth": 65, + "rawHeight": 96, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_12.png": { + "ver": "1.0.4", + "uuid": "a75af05e-3b54-45d8-b7ad-cbcf2b65b2a9", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 634, + "trimY": 288, + "width": 74, + "height": 95, + "rawWidth": 74, + "rawHeight": 95, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_13.png": { + "ver": "1.0.4", + "uuid": "3e2e26f7-007a-4130-8d90-154dfcde96d3", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 743, + "trimY": 94, + "width": 75, + "height": 94, + "rawWidth": 75, + "rawHeight": 94, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_14.png": { + "ver": "1.0.4", + "uuid": "275387d0-70fd-47f5-b82e-14165a14c45a", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 770, + "trimY": 0, + "width": 70, + "height": 94, + "rawWidth": 70, + "rawHeight": 94, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_15.png": { + "ver": "1.0.4", + "uuid": "9cf71d99-7262-4a6c-8c27-06167d841a24", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 692, + "trimY": 0, + "width": 78, + "height": 94, + "rawWidth": 78, + "rawHeight": 94, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_2.png": { + "ver": "1.0.4", + "uuid": "fa3d6703-1cfc-4f40-b61e-7ebf0fdac56a", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 486, + "trimY": 194, + "width": 69, + "height": 96, + "rawWidth": 69, + "rawHeight": 96, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_3.png": { + "ver": "1.0.4", + "uuid": "37eea7f3-5a1d-4172-be38-9b492399ef44", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 484, + "trimY": 313, + "width": 70, + "height": 96, + "rawWidth": 70, + "rawHeight": 96, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_4.png": { + "ver": "1.0.4", + "uuid": "0e2ad2ed-2b21-4e14-9607-5a341d9ed7e4", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 614, + "trimY": 0, + "width": 78, + "height": 95, + "rawWidth": 78, + "rawHeight": 95, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_5.png": { + "ver": "1.0.4", + "uuid": "e1625aba-a6fc-4883-a696-2d9d56d3050d", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 597, + "trimY": 385, + "width": 77, + "height": 95, + "rawWidth": 77, + "rawHeight": 95, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_6.png": { + "ver": "1.0.4", + "uuid": "86f805a2-a27c-4c96-8e11-acc448b0bdd0", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 708, + "trimY": 284, + "width": 69, + "height": 94, + "rawWidth": 69, + "rawHeight": 94, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_7.png": { + "ver": "1.0.4", + "uuid": "63bcaa39-1cc5-461f-a175-0d7a0abd3510", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 695, + "trimY": 190, + "width": 77, + "height": 94, + "rawWidth": 77, + "rawHeight": 94, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_8.png": { + "ver": "1.0.4", + "uuid": "691383d5-9199-4bd5-9803-403216331d7f", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 674, + "trimY": 383, + "width": 74, + "height": 95, + "rawWidth": 74, + "rawHeight": 95, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Walking_9.png": { + "ver": "1.0.4", + "uuid": "602818c2-1242-4a24-87ba-77f6accccbc3", + "rawTextureUuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 539, + "trimY": 97, + "width": 68, + "height": 96, + "rawWidth": 68, + "rawHeight": 96, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/MonkGirl.png b/frontend/assets/resources/animation/MonkGirl/MonkGirl.png new file mode 100644 index 0000000000000000000000000000000000000000..4a3db48cd0f0e6ac106a2832b73a180e8cf6dcea GIT binary patch literal 76232 zcmV)eK&HQmP)P#0000{P)t-sOlffn z6buLe07_ahrBN^_84(yM8284L)^kDUlViN5k1;tQ=9K{c`q__pY)dR3Sx!{;#sJ1~ z0N$JcqhSE{)d0=ClRzj4YI{m^AOQdW|Hy%ZOB;UmET=mX@{;Pw% ze|{h1@)$R(^hKXueXf~~d3P<-NBx^x&TqOtHsotru7dpIBa8XbwO~*`$oYH$=l9Rg z&-!(USJ8F!2zkq&d7gX!GfmS`%nLZ}b{6y5>oqG3L-;qt#W*s)=%=9eLt zLI~JGZb)|@3X6Y7%DKQMaa8Tr!K!>k3kCVS8Z7TrNIsjQ#Zdz`G}As=lofgcKre1ZwMs)Am?+N z$8>ispS@mxhCzZD27#Q9%OJ%CqI?`blv0$zwky}*W01cA^D=YaEW&Oe%qx~|$5-9Y zVBVR5@E@O7=*I6Etoz-2s+-^O!II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0(JRx1j(#Cd|F%8M8#mwmal43;K9Nr7@_^fVsw& zaxJrV{Q?pqP{v{ZYRX-9!Sq$AJ=ssD`a0;g#cuVC88?)J+Gz4ta#j?jcO4j74!OOJ zhcpM+-*&-H$D8@yxk6KWRKbV(M9=A%$raVt@De$`w z42^$(=A0da{@h9n;i?cj{L_RN$nRFwtxZ9GaFY^JUVj7S26HMk;$DY8SN5Ze zO*vA&{sgmaDH)d_`gLGv{QI-18@>CyJv`fu_IhMuYOY<3%h?H_d_n^6Xq_C*NtzU8f0bo8p{Th zQ;t^L1f#k+%M(RHZ`6#QHAnsf5ll7A&tF``i%I)U-{$tF`Dc6?rEoVB{ zl#X^1YR=)@H+10>WK!N4&i`{VBM);-KB};X<#vklK2u)*Az$3b{D<-~%rha!luVpQ zk1WKDP3D4(eM6VlnOw}}PWrz^IUS)PUeBuNO@5Wx83FccS@5Vj5wbub?>v_o++>Yuvt6)RHhYOUXOsB ziSlsSS~&~pXgu%k(9qzo@1^--c9;Jjd1WIKP7(Gm>eBtEL0)kqkRQqmyq}^xXF9}S z#PU3EgIITDX!w4MvqDWY`ad!)OeW2UA&ReP`d9ynPvIw*y$o}u%A(dKDV!8Y;|$IN zLnCC%ZsXml`tM-=vnl<#iaCdp8CI5)DI*RIjX3X;f4_aF|HSM1Kj-qv6eI2|R{#J2 M07*qoM6N<$f_Ba+f&c&j literal 0 HcmV?d00001 diff --git a/frontend/assets/resources/animation/MonkGirl/MonkGirl.png.meta b/frontend/assets/resources/animation/MonkGirl/MonkGirl.png.meta new file mode 100644 index 0000000..3acb665 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/MonkGirl.png.meta @@ -0,0 +1,12 @@ +{ + "ver": "2.3.3", + "uuid": "8d4cf214-f71c-4237-bdc1-ca0069909248", + "type": "raw", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "platformSettings": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/Walking.anim b/frontend/assets/resources/animation/MonkGirl/Walking.anim new file mode 100644 index 0000000..4b11534 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/Walking.anim @@ -0,0 +1,115 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "Walking", + "_objFlags": 0, + "_native": "", + "_duration": 0.26666666666666666, + "sample": 60, + "speed": 0.25, + "wrapMode": 2, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "275387d0-70fd-47f5-b82e-14165a14c45a" + } + }, + { + "frame": 0.016666666666666666, + "value": { + "__uuid__": "95e3dc3c-ee98-4ae8-899f-3d6539a649cb" + } + }, + { + "frame": 0.03333333333333333, + "value": { + "__uuid__": "7515ef50-3a14-4e58-8811-a0c890fc40f3" + } + }, + { + "frame": 0.05, + "value": { + "__uuid__": "fa3d6703-1cfc-4f40-b61e-7ebf0fdac56a" + } + }, + { + "frame": 0.06666666666666667, + "value": { + "__uuid__": "37eea7f3-5a1d-4172-be38-9b492399ef44" + } + }, + { + "frame": 0.08333333333333333, + "value": { + "__uuid__": "0e2ad2ed-2b21-4e14-9607-5a341d9ed7e4" + } + }, + { + "frame": 0.1, + "value": { + "__uuid__": "e1625aba-a6fc-4883-a696-2d9d56d3050d" + } + }, + { + "frame": 0.11666666666666667, + "value": { + "__uuid__": "86f805a2-a27c-4c96-8e11-acc448b0bdd0" + } + }, + { + "frame": 0.13333333333333333, + "value": { + "__uuid__": "63bcaa39-1cc5-461f-a175-0d7a0abd3510" + } + }, + { + "frame": 0.15, + "value": { + "__uuid__": "691383d5-9199-4bd5-9803-403216331d7f" + } + }, + { + "frame": 0.16666666666666666, + "value": { + "__uuid__": "602818c2-1242-4a24-87ba-77f6accccbc3" + } + }, + { + "frame": 0.18333333333333332, + "value": { + "__uuid__": "650b8ccb-2a82-4972-bb5b-79a2cb4a3503" + } + }, + { + "frame": 0.2, + "value": { + "__uuid__": "b264bcc2-71c7-45a6-8c94-be049bb0d163" + } + }, + { + "frame": 0.21666666666666667, + "value": { + "__uuid__": "a75af05e-3b54-45d8-b7ad-cbcf2b65b2a9" + } + }, + { + "frame": 0.23333333333333334, + "value": { + "__uuid__": "3e2e26f7-007a-4130-8d90-154dfcde96d3" + } + }, + { + "frame": 0.25, + "value": { + "__uuid__": "9cf71d99-7262-4a6c-8c27-06167d841a24" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/frontend/assets/resources/animation/MonkGirl/Walking.anim.meta b/frontend/assets/resources/animation/MonkGirl/Walking.anim.meta new file mode 100644 index 0000000..1f66a37 --- /dev/null +++ b/frontend/assets/resources/animation/MonkGirl/Walking.anim.meta @@ -0,0 +1,5 @@ +{ + "ver": "2.1.0", + "uuid": "768d591b-4467-4a8f-95bf-4f7fcc3835b6", + "subMetas": {} +} \ No newline at end of file diff --git a/frontend/assets/resources/pbfiles/room_downsync_frame.proto b/frontend/assets/resources/pbfiles/room_downsync_frame.proto index f8cc68c..83df929 100644 --- a/frontend/assets/resources/pbfiles/room_downsync_frame.proto +++ b/frontend/assets/resources/pbfiles/room_downsync_frame.proto @@ -24,10 +24,11 @@ message PlayerDownsync { int32 maxHp = 17; int32 characterState = 18; bool inAir = 19; // by design a standalone field only inferred by the collision result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState", because we need check the transition for "characterState" from this field, i.e. "inAir (prev -> curr)" + int32 framesInChState = 20; // number of frames elapsed in the current character state - string name = 20; - string displayName = 21; - string avatar = 22; + string name = 997; + string displayName = 998; + string avatar = 999; } message InputFrameDecoded { diff --git a/frontend/assets/resources/prefabs/ControlledCharacter.prefab b/frontend/assets/resources/prefabs/ControlledCharacter.prefab index 07979d3..861ecbe 100644 --- a/frontend/assets/resources/prefabs/ControlledCharacter.prefab +++ b/frontend/assets/resources/prefabs/ControlledCharacter.prefab @@ -33,14 +33,14 @@ "_active": true, "_components": [ { - "__id__": 23 + "__id__": 27 }, { - "__id__": 24 + "__id__": 28 } ], "_prefab": { - "__id__": 25 + "__id__": 29 }, "_opacity": 255, "_color": { @@ -493,12 +493,15 @@ }, { "__id__": 18 + }, + { + "__id__": 22 } ], "_active": true, "_components": [], "_prefab": { - "__id__": 22 + "__id__": 26 }, "_opacity": 255, "_color": { @@ -922,6 +925,163 @@ "fileId": "17JdhftghBYr81MfV9i6cy", "sync": false }, + { + "__type__": "cc.Node", + "_name": "MonkGirl", + "_objFlags": 0, + "_parent": { + "__id__": 11 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 23 + }, + { + "__id__": 24 + } + ], + "_prefab": { + "__id__": 25 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1425, + "height": 1024 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0.7, + 0.7, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "_defaultClip": null, + "_clips": [ + { + "__uuid__": "a0d8b9a6-7bf7-4cf5-aecb-54b2908cbfb3" + }, + { + "__uuid__": "768d591b-4467-4a8f-95bf-4f7fcc3835b6" + }, + { + "__uuid__": "c3d4f508-b3a9-4deb-b2d1-8ddc7bf22e0c" + }, + { + "__uuid__": "1ec27664-cd2a-4c7a-838f-953a7713ceca" + }, + { + "__uuid__": "996c218a-9e18-441e-b0f8-e61c5c991b9e" + }, + { + "__uuid__": "170bbc56-3cff-4a81-b48f-a037b9418758" + }, + { + "__uuid__": "555d837b-4a68-4a28-b9ff-e97e393d1a05" + }, + { + "__uuid__": "ee0b89e9-89f0-451e-a6ef-d41d64d3d67a" + }, + { + "__uuid__": "f87054fd-328f-4001-a8ff-b4c049cc1e6d" + }, + { + "__uuid__": "0978395c-8947-4830-9f68-58fadcbe5c63" + }, + { + "__uuid__": "7cb4d395-c68f-4643-9e2e-8cb8e200d3a5" + } + ], + "playOnLoad": false, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "725c90f9-56f8-48ea-9159-4d2949cd3ce0" + }, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "59bff7a2-23e1-4d69-bce7-afb37eae196a" + }, + "fileId": "6cGpRwF5ZPjpJdtoqbrnta", + "sync": false + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/frontend/assets/scenes/login.fire b/frontend/assets/scenes/login.fire index 9d76136..d408e2a 100644 --- a/frontend/assets/scenes/login.fire +++ b/frontend/assets/scenes/login.fire @@ -440,7 +440,7 @@ "array": [ 0, 0, - 216.6771387800957, + 216.50135522089343, 0, 0, 0, diff --git a/frontend/assets/scripts/AttackingCharacter.js b/frontend/assets/scripts/AttackingCharacter.js index 04290eb..4d432e6 100644 --- a/frontend/assets/scripts/AttackingCharacter.js +++ b/frontend/assets/scripts/AttackingCharacter.js @@ -5,33 +5,15 @@ window.ATK_CHARACTER_STATE = { Walking: [1, "Walking"], Atk1: [2, "Atk1"], Atked1: [3, "Atked1"], - InAirIdle1: [4, "InAirIdle1"], - InAirAtk1: [5, "Atk1"], - InAirAtked1: [6, "Atked1"], + InAirIdle1NoJump: [4, "InAirIdle1NoJump"], + InAirIdle1ByJump: [5, "InAirIdle1ByJump"], // The cycling part of it would be exactly "InAirIdle1NoJump" + InAirAtk1: [6, "InAirAtk1"], + InAirAtked1: [7, "InAirAtked1"], + BlownUp1: [8, "BlownUp1"], + LayDown1: [9, "LayDown1"], + GetUp1: [10, "GetUp1"], }; -window.toInAirConjugate = function(foo) { - switch (foo) { - case window.ATK_CHARACTER_STATE.Idle1[0]: - case window.ATK_CHARACTER_STATE.Walking[0]: - return window.ATK_CHARACTER_STATE.InAirIdle1[0]; - case window.ATK_CHARACTER_STATE.Atk1[0]: - return window.ATK_CHARACTER_STATE.InAirAtk1[0]; - case window.ATK_CHARACTER_STATE.Atked1[0]: - return window.ATK_CHARACTER_STATE.InAirAtked1[0]; - - case window.ATK_CHARACTER_STATE.InAirIdle1[0]: - return window.ATK_CHARACTER_STATE.Idle1[0]; - case window.ATK_CHARACTER_STATE.InAirAtk1[0]: - return window.ATK_CHARACTER_STATE.Atk1[0]; - case window.ATK_CHARACTER_STATE.InAirAtked1[0]: - return window.ATK_CHARACTER_STATE.Atked1[0]; - default: - console.warn(`Invalid characterState ${foo} received, no in air conjugate is available!`); - return null; - } -} - window.ATK_CHARACTER_STATE_ARR = []; for (let k in window.ATK_CHARACTER_STATE) { window.ATK_CHARACTER_STATE_ARR.push(window.ATK_CHARACTER_STATE[k]); @@ -40,12 +22,18 @@ for (let k in window.ATK_CHARACTER_STATE) { window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET = new Set(); window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.Idle1[0]); window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.Walking[0]); -window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.InAirIdle1[0]); +window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.InAirIdle1NoJump[0]); +window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.InAirIdle1ByJump[0]); +window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.BlownUp1[0]); +window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.LayDown1[0]); +window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.add(window.ATK_CHARACTER_STATE.GetUp1[0]); window.ATK_CHARACTER_STATE_IN_AIR_SET = new Set(); -window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.InAirIdle1[0]); +window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.InAirIdle1NoJump[0]); +window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.InAirIdle1ByJump[0]); window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.InAirAtk1[0]); window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.InAirAtked1[0]); +window.ATK_CHARACTER_STATE_IN_AIR_SET.add(window.ATK_CHARACTER_STATE.BlownUp1[0]); /* Kindly note that the use of dragonBones anim is an informed choice for the feasibility of "gotoAndPlayByFrame", which is a required feature by "Map.rollbackAndChase". You might find that "cc.Animation" -- the traditional frame anim -- can also suffice this requirement, yet if we want to develop 3D frontend in the future, working with skeletal anim will make a smoother transition. @@ -80,11 +68,11 @@ cc.Class({ this.animComp = this.effAnimNode.getComponent(dragonBones.ArmatureDisplay); if (!this.animComp) { this.animComp = this.effAnimNode.getComponent(cc.Animation); - } + } this.effAnimNode.active = true; }, - updateCharacterAnim(rdfPlayer, prevRdfPlayer, forceAnimSwitch) { + updateCharacterAnim(rdfPlayer, prevRdfPlayer, forceAnimSwitch, chConfig) { // As this function might be called after many frames of a rollback, it's possible that the playing animation was predicted, different from "prevRdfPlayer.CharacterState" but same as "newCharacterState". More granular checks are needed to determine whether we should interrupt the playing animation. // Update directions @@ -117,29 +105,25 @@ cc.Class({ } if (this.animComp instanceof dragonBones.ArmatureDisplay) { - this._interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName); + this._interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig); } else { - this._interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName); + this._interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName, chConfig); } }, - _interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName) { + _interruptPlayingAnimAndPlayNewAnimDragonBones(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, underlyingAnimationCtrl, playingAnimName, chConfig) { if (window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(newCharacterState)) { // No "framesToRecover" // console.warn(`#DragonBones JoinIndex=${rdfPlayer.joinIndex}, ${playingAnimName} -> ${newAnimName}`); underlyingAnimationCtrl.gotoAndPlayByFrame(newAnimName, 0, -1); } else { const animationData = underlyingAnimationCtrl._animations[newAnimName]; - let fromAnimFrame = (animationData.frameCount - rdfPlayer.FramesToRecover); - if (fromAnimFrame < 0) { - // For Atk1 or Atk2, it's possible that the "meleeBullet.recoveryFrames" is configured to be slightly larger than corresponding animation duration frames - fromAnimFrame = 0; - } - underlyingAnimationCtrl.gotoAndPlayByFrame(newAnimName, fromAnimFrame, 1); + let frameIdxInAnim = rdfPlayer.FramesInChState; + underlyingAnimationCtrl.gotoAndPlayByFrame(newAnimName, frameIdxInAnim, 1); } }, - _interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName) { + _interruptPlayingAnimAndPlayNewAnimFrameAnim(rdfPlayer, prevRdfPlayer, newCharacterState, newAnimName, playingAnimName, chConfig) { if (window.ATK_CHARACTER_STATE_INTERRUPT_WAIVE_SET.has(newCharacterState)) { // No "framesToRecover" //console.warn(`#FrameAnim JoinIndex=${rdfPlayer.joinIndex}, ${playingAnimName} -> ${newAnimName}`); @@ -148,11 +132,11 @@ cc.Class({ } // The "playTimes" counterpart is managed by each "cc.AnimationClip.wrapMode", already preset in the editor. const targetClip = this.animComp.getClips()[newCharacterState]; // The clips follow the exact order in ATK_CHARACTER_STATE - let fromTime = (targetClip.duration - rdfPlayer.FramesToRecover / targetClip.sample); // TODO: Anyway to avoid using division here? - if (fromTime < 0) { - // For Atk1 or Atk2, it's possible that the "meleeBullet.recoveryFrames" is configured to be slightly larger than corresponding animation duration frames - fromTime = 0; - } + let frameIdxInAnim = rdfPlayer.FramesInChState; + if (window.ATK_CHARACTER_STATE.InAirIdle1ByJump == newCharacterState && null != chConfig) { + frameIdxInAnim = chConfig.InAirIdleFrameIdxTurningPoint + (frameIdxInAnim - chConfig.InAirIdleFrameIdxTurningPoint) % chConfig.InAirIdleFrameIdxTurnedCycle; // TODO: Anyway to avoid using division here? + } + let fromTime = (frameIdxInAnim / targetClip.sample); // TODO: Anyway to avoid using division here? this.animComp.play(newAnimName, fromTime); }, diff --git a/frontend/assets/scripts/Map.js b/frontend/assets/scripts/Map.js index e06ac04..e962c68 100644 --- a/frontend/assets/scripts/Map.js +++ b/frontend/assets/scripts/Map.js @@ -590,7 +590,7 @@ cc.Class({ const jsPlayersArr = new Array().fill(null); for (let k in pbRdf.playersArr) { const pbPlayer = pbRdf.playersArr[k]; - const jsPlayer = gopkgs.NewPlayerDownsyncJs(pbPlayer.id, pbPlayer.virtualGridX, pbPlayer.virtualGridY, pbPlayer.dirX, pbPlayer.dirY, pbPlayer.velX, pbPlayer.velY, pbPlayer.framesToRecover, pbPlayer.speed, pbPlayer.battleState, pbPlayer.characterState, pbPlayer.joinIndex, pbPlayer.hp, pbPlayer.maxHp, pbPlayer.inAir, pbPlayer.colliderRadius); + const jsPlayer = gopkgs.NewPlayerDownsyncJs(pbPlayer.id, pbPlayer.virtualGridX, pbPlayer.virtualGridY, pbPlayer.dirX, pbPlayer.dirY, pbPlayer.velX, pbPlayer.velY, pbPlayer.framesToRecover, pbPlayer.framesInChState, pbPlayer.speed, pbPlayer.battleState, pbPlayer.characterState, pbPlayer.joinIndex, pbPlayer.hp, pbPlayer.maxHp, pbPlayer.inAir, pbPlayer.colliderRadius); jsPlayersArr[k] = jsPlayer; } const jsMeleeBulletsArr = []; @@ -638,6 +638,7 @@ cc.Class({ } // The logic below applies to (window.MAGIC_ROOM_DOWNSYNC_FRAME_ID.BATTLE_START == rdf.id || window.RING_BUFF_NON_CONSECUTIVE_SET == dumpRenderCacheRet) + self.chConfigsOrderedByJoinIndex = gopkgs.GetCharacterConfigsOrderedByJoinIndex(pbRdf.speciesIdList); self.playerOpPatternToSkillId = pbRdf.playerOpPatternToSkillId; self._initPlayerRichInfoDict(rdf.PlayersArr); @@ -694,18 +695,19 @@ cc.Class({ equalPlayers(lhs, rhs) { if (null == lhs || null == rhs) return false; - if (lhs.virtualGridX != rhs.virtualGridX) return false; - if (lhs.virtualGridY != rhs.virtualGridY) return false; - if (lhs.dirX != rhs.dirX) return false; - if (lhs.dirY != rhs.dirY) return false; - if (lhs.velX != rhs.velX) return false; - if (lhs.velY != rhs.velY) return false; - if (lhs.speed != rhs.speed) return false; - if (lhs.framesToRecover != rhs.framesToRecover) return false; - if (lhs.hp != rhs.hp) return false; - if (lhs.maxHp != rhs.maxHp) return false; - if (lhs.characterState != rhs.characterState) return false; - if (lhs.inAir != rhs.inAir) return false; + if (lhs.VirtualGridX != rhs.VirtualGridX) return false; + if (lhs.VirtualGridY != rhs.VirtualGridY) return false; + if (lhs.DirX != rhs.DirX) return false; + if (lhs.DirY != rhs.DirY) return false; + if (lhs.VelX != rhs.VelX) return false; + if (lhs.VelY != rhs.VelY) return false; + if (lhs.Speed != rhs.Speed) return false; + if (lhs.Hp != rhs.Hp) return false; + if (lhs.MaxHp != rhs.MaxHp) return false; + if (lhs.CharacterState != rhs.CharacterState) return false; + if (lhs.InAir != rhs.InAir) return false; + if (lhs.FramesToRecover != rhs.FramesToRecover) return false; + if (lhs.FramesInChState != rhs.FramesInChState) return false; return true; }, @@ -1063,12 +1065,13 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame const playersArr = rdf.PlayersArr; for (let k in playersArr) { const currPlayerDownsync = playersArr[k]; + const chConfig = self.chConfigsOrderedByJoinIndex[k]; const prevRdfPlayer = (null == prevRdf ? null : prevRdf.PlayersArr[k]); const [wx, wy] = self.virtualGridToWorldPos(currPlayerDownsync.VirtualGridX, currPlayerDownsync.VirtualGridY); const playerRichInfo = self.playerRichInfoArr[k]; playerRichInfo.node.setPosition(wx, wy); playerRichInfo.scriptIns.updateSpeed(currPlayerDownsync.Speed); - playerRichInfo.scriptIns.updateCharacterAnim(currPlayerDownsync, prevRdfPlayer, false); + playerRichInfo.scriptIns.updateCharacterAnim(currPlayerDownsync, prevRdfPlayer, false, chConfig); } // Update countdown @@ -1104,7 +1107,7 @@ othersForcedDownsyncRenderFrame=${JSON.stringify(othersForcedDownsyncRenderFrame }; self.rdfIdToActuallyUsedInput.set(currRdf.Id, inputFrameDownsyncClone); } - const nextRdf = gopkgs.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs(self.recentInputCache, currRdf, collisionSys, collisionSysMap, self.gravityX, self.gravityY, self.jumpingInitVelY, self.inputDelayFrames, self.inputScaleFrames, self.spaceOffsetX, self.spaceOffsetY, self.snapIntoPlatformOverlap, self.snapIntoPlatformThreshold, self.worldToVirtualGridRatio, self.virtualGridToWorldRatio, self.playerOpPatternToSkillId); + const nextRdf = gopkgs.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs(self.recentInputCache, currRdf, collisionSys, collisionSysMap, self.spaceOffsetX, self.spaceOffsetY, self.playerOpPatternToSkillId, self.chConfigsOrderedByJoinIndex); if (true == isChasing) { // [WARNING] Move the cursor "self.chaserRenderFrameId" when "true == isChasing", keep in mind that "self.chaserRenderFrameId" is not monotonic! diff --git a/frontend/assets/scripts/OfflineMap.js b/frontend/assets/scripts/OfflineMap.js index 1959b32..3e9f9da 100644 --- a/frontend/assets/scripts/OfflineMap.js +++ b/frontend/assets/scripts/OfflineMap.js @@ -40,13 +40,13 @@ cc.Class({ self.rollbackEstimatedDtNanos = 16666666; self.tooFastDtIntervalMillis = 0.5 * self.rollbackEstimatedDtMillis; - self.worldToVirtualGridRatio = 1000; + self.worldToVirtualGridRatio = 100; self.virtualGridToWorldRatio = 1.0 / self.worldToVirtualGridRatio; + const opJoinIndexPrefix1 = (1 << 8); - const opJoinIndexPrefix2 = (2 << 8); - self.playerOpPatternToSkillId = {}; - self.playerOpPatternToSkillId[opJoinIndexPrefix1 + 0] = 1; - self.playerOpPatternToSkillId[opJoinIndexPrefix2 + 0] = 1; + const playerOpPatternToSkillId = {}; + playerOpPatternToSkillId[opJoinIndexPrefix1 + 0] = 1; + playerOpPatternToSkillId[opJoinIndexPrefix1 + 1] = 2; /* [WARNING] As when a character is standing on a barrier, if not carefully curated there MIGHT BE a bouncing sequence of "[(inAir -> dropIntoBarrier ->), (notInAir -> pushedOutOfBarrier ->)], [(inAir -> ..." @@ -152,7 +152,7 @@ cc.Class({ virtualGridY: boundaryObjs.playerStartingPositions[0].y * self.worldToVirtualGridRatio, speed: 1 * self.worldToVirtualGridRatio, colliderRadius: 12, - characterState: window.ATK_CHARACTER_STATE.InAirIdle1[0], + characterState: window.ATK_CHARACTER_STATE.InAirIdle1NoJump[0], framesToRecover: 0, dirX: 0, dirY: 0, @@ -160,22 +160,9 @@ cc.Class({ velY: 0, inAir: true, }), - window.pb.protos.PlayerDownsync.create({ - id: 11, - joinIndex: 2, - virtualGridX: boundaryObjs.playerStartingPositions[1].x * self.worldToVirtualGridRatio, - virtualGridY: boundaryObjs.playerStartingPositions[1].y * self.worldToVirtualGridRatio, - speed: 1 * self.worldToVirtualGridRatio, - colliderRadius: 12, - characterState: window.ATK_CHARACTER_STATE.InAirIdle1[0], - framesToRecover: 0, - dirX: 0, - dirY: 0, - velX: 0, - velY: 0, - inAir: true, - }), - ] + ], + speciesIdList: [0], + playerOpPatternToSkillId: playerOpPatternToSkillId, }); self.selfPlayerInfo = { @@ -221,4 +208,48 @@ cc.Class({ } }, + spawnPlayerNode(joinIndex, vx, vy, playerDownsyncInfo) { + const self = this; + const newPlayerNode = cc.instantiate(self.controlledCharacterPrefab) + const playerScriptIns = newPlayerNode.getComponent("ControlledCharacter"); + if (1 == joinIndex) { + playerScriptIns.setSpecies("MonkGirl"); + } else if (2 == joinIndex) { + playerScriptIns.setSpecies("UltramanTiga"); + } + + const [wx, wy] = self.virtualGridToWorldPos(vx, vy); + newPlayerNode.setPosition(wx, wy); + playerScriptIns.mapNode = self.node; + const colliderRadius = playerDownsyncInfo.ColliderRadius; + const halfColliderWidth = colliderRadius, + halfColliderHeight = colliderRadius + colliderRadius; // avoid multiplying + const colliderWidth = halfColliderWidth + halfColliderWidth, + colliderHeight = halfColliderHeight + halfColliderHeight; // avoid multiplying + + const [cx, cy] = gopkgs.WorldToPolygonColliderBLPos(wx, wy, halfColliderWidth, halfColliderHeight, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.spaceOffsetX, self.spaceOffsetY); + const gopkgsBoundaryAnchor = gopkgs.NewVec2DJs(cx, cy); + const gopkgsBoundaryPts = [ + gopkgs.NewVec2DJs(0, 0), + gopkgs.NewVec2DJs(self.snapIntoPlatformOverlap + colliderWidth + self.snapIntoPlatformOverlap, 0), + gopkgs.NewVec2DJs(self.snapIntoPlatformOverlap + colliderWidth + self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap + colliderHeight + self.snapIntoPlatformOverlap), + gopkgs.NewVec2DJs(0, self.snapIntoPlatformOverlap + colliderHeight + self.snapIntoPlatformOverlap) + ]; + const gopkgsBoundary = gopkgs.NewPolygon2DJs(gopkgsBoundaryAnchor, gopkgsBoundaryPts); + const newPlayerCollider = gopkgs.GenerateConvexPolygonColliderJs(gopkgsBoundary, self.spaceOffsetX, self.spaceOffsetY, playerDownsyncInfo, "Player"); + //const newPlayerCollider = gopkgs.GenerateRectColliderJs(wx, wy, colliderWidth, colliderHeight, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.spaceOffsetX, self.spaceOffsetY, playerDownsyncInfo, "Player"); + self.gopkgsCollisionSys.Add(newPlayerCollider); + const collisionPlayerIndex = self.collisionPlayerIndexPrefix + joinIndex; + self.gopkgsCollisionSysMap[collisionPlayerIndex] = newPlayerCollider; + + console.log(`Created new player collider: joinIndex=${joinIndex}, colliderRadius=${playerDownsyncInfo.ColliderRadius}`); + + safelyAddChild(self.node, newPlayerNode); + setLocalZOrder(newPlayerNode, 5); + + newPlayerNode.active = true; + playerScriptIns.updateCharacterAnim(playerDownsyncInfo, null, true); + + return [newPlayerNode, playerScriptIns]; + }, }); diff --git a/frontend/assets/scripts/modules/Collisions.js b/frontend/assets/scripts/modules/Collisions.js deleted file mode 100644 index a1e8477..0000000 --- a/frontend/assets/scripts/modules/Collisions.js +++ /dev/null @@ -1,197 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./src/Collisions.mjs"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./src/Collisions.mjs": -/*!****************************!*\ - !*** ./src/Collisions.mjs ***! - \****************************/ -/*! no exports provided */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _modules_BVH_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/BVH.mjs */ \"./src/modules/BVH.mjs\");\n/* harmony import */ var _modules_Circle_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/Circle.mjs */ \"./src/modules/Circle.mjs\");\n/* harmony import */ var _modules_Polygon_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/Polygon.mjs */ \"./src/modules/Polygon.mjs\");\n/* harmony import */ var _modules_Point_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/Point.mjs */ \"./src/modules/Point.mjs\");\n/* harmony import */ var _modules_Result_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/Result.mjs */ \"./src/modules/Result.mjs\");\n/* harmony import */ var _modules_SAT_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/SAT.mjs */ \"./src/modules/SAT.mjs\");\n\n\n\n\n\n\n\n/**\n * A collision system used to track bodies in order to improve collision detection performance\n * @class\n */\nclass Collisions {\n\t/**\n\t * @constructor\n\t */\n\tconstructor() {\n\t\t/** @private */\n\t\tthis._bvh = new _modules_BVH_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n\t}\n\n\t/**\n\t * Creates a {@link Circle} and inserts it into the collision system\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Number} [radius = 0] The radius\n\t * @param {Number} [scale = 1] The scale\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t * @returns {Circle}\n\t */\n\tcreateCircle(x = 0, y = 0, radius = 0, scale = 1, padding = 0) {\n\t\tconst body = new _modules_Circle_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"](x, y, radius, scale, padding);\n\n\t\tthis._bvh.insert(body);\n\n\t\treturn body;\n\t}\n\n\t/**\n\t * Creates a {@link Polygon} and inserts it into the collision system\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Array} [points = []] An array of coordinate pairs making up the polygon - [[x1, y1], [x2, y2], ...]\n\t * @param {Number} [angle = 0] The starting rotation in radians\n\t * @param {Number} [scale_x = 1] The starting scale along the X axis\n\t * @param {Number} [scale_y = 1] The starting scale long the Y axis\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t * @returns {Polygon}\n\t */\n\tcreatePolygon(x = 0, y = 0, points = [[0, 0]], angle = 0, scale_x = 1, scale_y = 1, padding = 0) {\n\t\tconst body = new _modules_Polygon_mjs__WEBPACK_IMPORTED_MODULE_2__[\"default\"](x, y, points, angle, scale_x, scale_y, padding);\n\n\t\tthis._bvh.insert(body);\n\n\t\treturn body;\n\t}\n\n\t/**\n\t * Creates a {@link Point} and inserts it into the collision system\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t * @returns {Point}\n\t */\n\tcreatePoint(x = 0, y = 0, padding = 0) {\n\t\tconst body = new _modules_Point_mjs__WEBPACK_IMPORTED_MODULE_3__[\"default\"](x, y, padding);\n\n\t\tthis._bvh.insert(body);\n\n\t\treturn body;\n\t}\n\n\t/**\n\t * Creates a {@link Result} used to collect the detailed results of a collision test\n\t */\n\tcreateResult() {\n\t\treturn new _modules_Result_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"]();\n\t}\n\n\t/**\n\t * Creates a Result used to collect the detailed results of a collision test\n\t */\n\tstatic createResult() {\n\t\treturn new _modules_Result_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"]();\n\t}\n\n\t/**\n\t * Inserts bodies into the collision system\n\t * @param {...Circle|...Polygon|...Point} bodies\n\t */\n\tinsert(...bodies) {\n\t\tfor(const body of bodies) {\n\t\t\tthis._bvh.insert(body, false);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes bodies from the collision system\n\t * @param {...Circle|...Polygon|...Point} bodies\n\t */\n\tremove(...bodies) {\n\t\tfor(const body of bodies) {\n\t\t\tthis._bvh.remove(body, false);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Updates the collision system. This should be called before any collisions are tested.\n\t */\n\tupdate() {\n\t\tthis._bvh.update();\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Draws the bodies within the system to a CanvasRenderingContext2D's current path\n\t * @param {CanvasRenderingContext2D} context The context to draw to\n\t */\n\tdraw(context) {\n\t\treturn this._bvh.draw(context);\n\t}\n\n\t/**\n\t * Draws the system's BVH to a CanvasRenderingContext2D's current path. This is useful for testing out different padding values for bodies.\n\t * @param {CanvasRenderingContext2D} context The context to draw to\n\t */\n\tdrawBVH(context) {\n\t\treturn this._bvh.drawBVH(context);\n\t}\n\n\t/**\n\t * Returns a list of potential collisions for a body\n\t * @param {Circle|Polygon|Point} body The body to test for potential collisions against\n\t * @returns {Array}\n\t */\n\tpotentials(body) {\n\t\treturn this._bvh.potentials(body);\n\t}\n\n\t/**\n\t * Determines if two bodies are colliding\n\t * @param {Circle|Polygon|Point} target The target body to test against\n\t * @param {Result} [result = null] A Result object on which to store information about the collision\n\t * @param {Boolean} [aabb = true] Set to false to skip the AABB test (useful if you use your own potential collision heuristic)\n\t * @returns {Boolean}\n\t */\n\tcollides(source, target, result = null, aabb = true) {\n\t\treturn Object(_modules_SAT_mjs__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(source, target, result, aabb);\n\t}\n};\n\nconst toExport = {\n\tCollisions,\n\tResult: _modules_Result_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n\tCircle: _modules_Circle_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n\tPolygon: _modules_Polygon_mjs__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n\tPoint: _modules_Point_mjs__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n};\n\nmodule.exports = toExport; \n\n\n//# sourceURL=webpack:///./src/Collisions.mjs?"); - -/***/ }), - -/***/ "./src/modules/BVH.mjs": -/*!*****************************!*\ - !*** ./src/modules/BVH.mjs ***! - \*****************************/ -/*! exports provided: default */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return BVH; });\n/* harmony import */ var _BVHBranch_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BVHBranch.mjs */ \"./src/modules/BVHBranch.mjs\");\n\n\n/**\n * A Bounding Volume Hierarchy (BVH) used to find potential collisions quickly\n * @class\n * @private\n */\nclass BVH {\n\t/**\n\t * @constructor\n\t */\n\tconstructor() {\n\t\t/** @private */\n\t\tthis._hierarchy = null;\n\n\t\t/** @private */\n\t\tthis._bodies = [];\n\n\t\t/** @private */\n\t\tthis._dirty_branches = [];\n\t}\n\n\t/**\n\t * Inserts a body into the BVH\n\t * @param {Circle|Polygon|Point} body The body to insert\n\t * @param {Boolean} [updating = false] Set to true if the body already exists in the BVH (used internally when updating the body's position)\n\t */\n\tinsert(body, updating = false) {\n\t\tif(!updating) {\n\t\t\tconst bvh = body._bvh;\n\n\t\t\tif(bvh && bvh !== this) {\n\t\t\t\tthrow new Error('Body belongs to another collision system');\n\t\t\t}\n\n\t\t\tbody._bvh = this;\n\t\t\tthis._bodies.push(body);\n\t\t}\n\n\t\tconst polygon = body._polygon;\n\t\tconst body_x = body.x;\n\t\tconst body_y = body.y;\n\n\t\tif(polygon) {\n\t\t\tif(\n\t\t\t\tbody._dirty_coords ||\n\t\t\t\tbody.x !== body._x ||\n\t\t\t\tbody.y !== body._y ||\n\t\t\t\tbody.angle !== body._angle ||\n\t\t\t\tbody.scale_x !== body._scale_x ||\n\t\t\t\tbody.scale_y !== body._scale_y\n\t\t\t) {\n\t\t\t\tbody._calculateCoords();\n\t\t\t}\n\t\t}\n\n\t\tconst padding = body._bvh_padding;\n\t\tconst radius = polygon ? 0 : body.radius * body.scale;\n\t\tconst body_min_x = (polygon ? body._min_x : body_x - radius) - padding;\n\t\tconst body_min_y = (polygon ? body._min_y : body_y - radius) - padding;\n\t\tconst body_max_x = (polygon ? body._max_x : body_x + radius) + padding;\n\t\tconst body_max_y = (polygon ? body._max_y : body_y + radius) + padding;\n\n\t\tbody._bvh_min_x = body_min_x;\n\t\tbody._bvh_min_y = body_min_y;\n\t\tbody._bvh_max_x = body_max_x;\n\t\tbody._bvh_max_y = body_max_y;\n\n\t\tlet current = this._hierarchy;\n\t\tlet sort = 0;\n\n\t\tif(!current) {\n\t\t\tthis._hierarchy = body;\n\t\t}\n\t\telse {\n\t\t\twhile(true) {\n\t\t\t\t// Branch\n\t\t\t\tif(current._bvh_branch) {\n\t\t\t\t\tconst left = current._bvh_left;\n\t\t\t\t\tconst left_min_y = left._bvh_min_y;\n\t\t\t\t\tconst left_max_x = left._bvh_max_x;\n\t\t\t\t\tconst left_max_y = left._bvh_max_y;\n\t\t\t\t\tconst left_new_min_x = body_min_x < left._bvh_min_x ? body_min_x : left._bvh_min_x;\n\t\t\t\t\tconst left_new_min_y = body_min_y < left_min_y ? body_min_y : left_min_y;\n\t\t\t\t\tconst left_new_max_x = body_max_x > left_max_x ? body_max_x : left_max_x;\n\t\t\t\t\tconst left_new_max_y = body_max_y > left_max_y ? body_max_y : left_max_y;\n\t\t\t\t\tconst left_volume = (left_max_x - left._bvh_min_x) * (left_max_y - left_min_y);\n\t\t\t\t\tconst left_new_volume = (left_new_max_x - left_new_min_x) * (left_new_max_y - left_new_min_y);\n\t\t\t\t\tconst left_difference = left_new_volume - left_volume;\n\n\t\t\t\t\tconst right = current._bvh_right;\n\t\t\t\t\tconst right_min_x = right._bvh_min_x;\n\t\t\t\t\tconst right_min_y = right._bvh_min_y;\n\t\t\t\t\tconst right_max_x = right._bvh_max_x;\n\t\t\t\t\tconst right_max_y = right._bvh_max_y;\n\t\t\t\t\tconst right_new_min_x = body_min_x < right_min_x ? body_min_x : right_min_x;\n\t\t\t\t\tconst right_new_min_y = body_min_y < right_min_y ? body_min_y : right_min_y;\n\t\t\t\t\tconst right_new_max_x = body_max_x > right_max_x ? body_max_x : right_max_x;\n\t\t\t\t\tconst right_new_max_y = body_max_y > right_max_y ? body_max_y : right_max_y;\n\t\t\t\t\tconst right_volume = (right_max_x - right_min_x) * (right_max_y - right_min_y);\n\t\t\t\t\tconst right_new_volume = (right_new_max_x - right_new_min_x) * (right_new_max_y - right_new_min_y);\n\t\t\t\t\tconst right_difference = right_new_volume - right_volume;\n\n\t\t\t\t\tcurrent._bvh_sort = sort++;\n\t\t\t\t\tcurrent._bvh_min_x = left_new_min_x < right_new_min_x ? left_new_min_x : right_new_min_x;\n\t\t\t\t\tcurrent._bvh_min_y = left_new_min_y < right_new_min_y ? left_new_min_y : right_new_min_y;\n\t\t\t\t\tcurrent._bvh_max_x = left_new_max_x > right_new_max_x ? left_new_max_x : right_new_max_x;\n\t\t\t\t\tcurrent._bvh_max_y = left_new_max_y > right_new_max_y ? left_new_max_y : right_new_max_y;\n\n\t\t\t\t\tcurrent = left_difference <= right_difference ? left : right;\n\t\t\t\t}\n\t\t\t\t// Leaf\n\t\t\t\telse {\n\t\t\t\t\tconst grandparent = current._bvh_parent;\n\t\t\t\t\tconst parent_min_x = current._bvh_min_x;\n\t\t\t\t\tconst parent_min_y = current._bvh_min_y;\n\t\t\t\t\tconst parent_max_x = current._bvh_max_x;\n\t\t\t\t\tconst parent_max_y = current._bvh_max_y;\n\t\t\t\t\tconst new_parent = current._bvh_parent = body._bvh_parent = _BVHBranch_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getBranch();\n\n\t\t\t\t\tnew_parent._bvh_parent = grandparent;\n\t\t\t\t\tnew_parent._bvh_left = current;\n\t\t\t\t\tnew_parent._bvh_right = body;\n\t\t\t\t\tnew_parent._bvh_sort = sort++;\n\t\t\t\t\tnew_parent._bvh_min_x = body_min_x < parent_min_x ? body_min_x : parent_min_x;\n\t\t\t\t\tnew_parent._bvh_min_y = body_min_y < parent_min_y ? body_min_y : parent_min_y;\n\t\t\t\t\tnew_parent._bvh_max_x = body_max_x > parent_max_x ? body_max_x : parent_max_x;\n\t\t\t\t\tnew_parent._bvh_max_y = body_max_y > parent_max_y ? body_max_y : parent_max_y;\n\n\t\t\t\t\tif(!grandparent) {\n\t\t\t\t\t\tthis._hierarchy = new_parent;\n\t\t\t\t\t}\n\t\t\t\t\telse if(grandparent._bvh_left === current) {\n\t\t\t\t\t\tgrandparent._bvh_left = new_parent;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgrandparent._bvh_right = new_parent;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Removes a body from the BVH\n\t * @param {Circle|Polygon|Point} body The body to remove\n\t * @param {Boolean} [updating = false] Set to true if this is a temporary removal (used internally when updating the body's position)\n\t */\n\tremove(body, updating = false) {\n\t\tif(!updating) {\n\t\t\tconst bvh = body._bvh;\n\n\t\t\tif(bvh && bvh !== this) {\n\t\t\t\tthrow new Error('Body belongs to another collision system');\n\t\t\t}\n\n\t\t\tbody._bvh = null;\n\t\t\tthis._bodies.splice(this._bodies.indexOf(body), 1);\n\t\t}\n\n\t\tif(this._hierarchy === body) {\n\t\t\tthis._hierarchy = null;\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst parent = body._bvh_parent;\n\t\tconst grandparent = parent._bvh_parent;\n\t\tconst parent_left = parent._bvh_left;\n\t\tconst sibling = parent_left === body ? parent._bvh_right : parent_left;\n\n\t\tsibling._bvh_parent = grandparent;\n\n\t\tif(sibling._bvh_branch) {\n\t\t\tsibling._bvh_sort = parent._bvh_sort;\n\t\t}\n\n\t\tif(grandparent) {\n\t\t\tif(grandparent._bvh_left === parent) {\n\t\t\t\tgrandparent._bvh_left = sibling;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgrandparent._bvh_right = sibling;\n\t\t\t}\n\n\t\t\tlet branch = grandparent;\n\n\t\t\twhile(branch) {\n\t\t\t\tconst left = branch._bvh_left;\n\t\t\t\tconst left_min_x = left._bvh_min_x;\n\t\t\t\tconst left_min_y = left._bvh_min_y;\n\t\t\t\tconst left_max_x = left._bvh_max_x;\n\t\t\t\tconst left_max_y = left._bvh_max_y;\n\n\t\t\t\tconst right = branch._bvh_right;\n\t\t\t\tconst right_min_x = right._bvh_min_x;\n\t\t\t\tconst right_min_y = right._bvh_min_y;\n\t\t\t\tconst right_max_x = right._bvh_max_x;\n\t\t\t\tconst right_max_y = right._bvh_max_y;\n\n\t\t\t\tbranch._bvh_min_x = left_min_x < right_min_x ? left_min_x : right_min_x;\n\t\t\t\tbranch._bvh_min_y = left_min_y < right_min_y ? left_min_y : right_min_y;\n\t\t\t\tbranch._bvh_max_x = left_max_x > right_max_x ? left_max_x : right_max_x;\n\t\t\t\tbranch._bvh_max_y = left_max_y > right_max_y ? left_max_y : right_max_y;\n\n\t\t\t\tbranch = branch._bvh_parent;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis._hierarchy = sibling;\n\t\t}\n\n\t\t_BVHBranch_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"].releaseBranch(parent);\n\t}\n\n\t/**\n\t * Updates the BVH. Moved bodies are removed/inserted.\n\t */\n\tupdate() {\n\t\tconst bodies = this._bodies;\n\t\tconst count = bodies.length;\n\n\t\tfor(let i = 0; i < count; ++i) {\n\t\t\tconst body = bodies[i];\n\n\t\t\tlet update = false;\n\n\t\t\tif(!update && body.padding !== body._bvh_padding) {\n\t\t\t\tbody._bvh_padding = body.padding;\n\t\t\t\tupdate = true;\n\t\t\t}\n\n\t\t\tif(!update) {\n\t\t\t\tconst polygon = body._polygon;\n\n\t\t\t\tif(polygon) {\n\t\t\t\t\tif(\n\t\t\t\t\t\tbody._dirty_coords ||\n\t\t\t\t\t\tbody.x !== body._x ||\n\t\t\t\t\t\tbody.y !== body._y ||\n\t\t\t\t\t\tbody.angle !== body._angle ||\n\t\t\t\t\t\tbody.scale_x !== body._scale_x ||\n\t\t\t\t\t\tbody.scale_y !== body._scale_y\n\t\t\t\t\t) {\n\t\t\t\t\t\tbody._calculateCoords();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst x = body.x;\n\t\t\t\tconst y = body.y;\n\t\t\t\tconst radius = polygon ? 0 : body.radius * body.scale;\n\t\t\t\tconst min_x = polygon ? body._min_x : x - radius;\n\t\t\t\tconst min_y = polygon ? body._min_y : y - radius;\n\t\t\t\tconst max_x = polygon ? body._max_x : x + radius;\n\t\t\t\tconst max_y = polygon ? body._max_y : y + radius;\n\n\t\t\t\tupdate = min_x < body._bvh_min_x || min_y < body._bvh_min_y || max_x > body._bvh_max_x || max_y > body._bvh_max_y;\n\t\t\t}\n\n\t\t\tif(update) {\n\t\t\t\tthis.remove(body, true);\n\t\t\t\tthis.insert(body, true);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns a list of potential collisions for a body\n\t * @param {Circle|Polygon|Point} body The body to test\n\t * @returns {Array}\n\t */\n\tpotentials(body) {\n\t\tconst results = [];\n\t\tconst min_x = body._bvh_min_x;\n\t\tconst min_y = body._bvh_min_y;\n\t\tconst max_x = body._bvh_max_x;\n\t\tconst max_y = body._bvh_max_y;\n\n\t\tlet current = this._hierarchy;\n\t\tlet traverse_left = true;\n\n\t\tif(!current || !current._bvh_branch) {\n\t\t\treturn results;\n\t\t}\n\n\t\twhile(current) {\n\t\t\tif(traverse_left) {\n\t\t\t\ttraverse_left = false;\n\n\t\t\t\tlet left = current._bvh_branch ? current._bvh_left : null;\n\n\t\t\t\twhile(\n\t\t\t\t\tleft &&\n\t\t\t\t\tleft._bvh_max_x >= min_x &&\n\t\t\t\t\tleft._bvh_max_y >= min_y &&\n\t\t\t\t\tleft._bvh_min_x <= max_x &&\n\t\t\t\t\tleft._bvh_min_y <= max_y\n\t\t\t\t) {\n\t\t\t\t\tcurrent = left;\n\t\t\t\t\tleft = current._bvh_branch ? current._bvh_left : null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst branch = current._bvh_branch;\n\t\t\tconst right = branch ? current._bvh_right : null;\n\n\t\t\tif(\n\t\t\t\tright &&\n\t\t\t\tright._bvh_max_x > min_x &&\n\t\t\t\tright._bvh_max_y > min_y &&\n\t\t\t\tright._bvh_min_x < max_x &&\n\t\t\t\tright._bvh_min_y < max_y\n\t\t\t) {\n\t\t\t\tcurrent = right;\n\t\t\t\ttraverse_left = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(!branch && current !== body) {\n\t\t\t\t\tresults.push(current);\n\t\t\t\t}\n\n\t\t\t\tlet parent = current._bvh_parent;\n\n\t\t\t\tif(parent) {\n\t\t\t\t\twhile(parent && parent._bvh_right === current) {\n\t\t\t\t\t\tcurrent = parent;\n\t\t\t\t\t\tparent = current._bvh_parent;\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrent = parent;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn results;\n\t}\n\n\t/**\n\t * Draws the bodies within the BVH to a CanvasRenderingContext2D's current path\n\t * @param {CanvasRenderingContext2D} context The context to draw to\n\t */\n\tdraw(context) {\n\t\tconst bodies = this._bodies;\n\t\tconst count = bodies.length;\n\n\t\tfor(let i = 0; i < count; ++i) {\n\t\t\tbodies[i].draw(context);\n\t\t}\n\t}\n\n\t/**\n\t * Draws the BVH to a CanvasRenderingContext2D's current path. This is useful for testing out different padding values for bodies.\n\t * @param {CanvasRenderingContext2D} context The context to draw to\n\t */\n\tdrawBVH(context) {\n\t\tlet current = this._hierarchy;\n\t\tlet traverse_left = true;\n\n\t\twhile(current) {\n\t\t\tif(traverse_left) {\n\t\t\t\ttraverse_left = false;\n\n\t\t\t\tlet left = current._bvh_branch ? current._bvh_left : null;\n\n\t\t\t\twhile(left) {\n\t\t\t\t\tcurrent = left;\n\t\t\t\t\tleft = current._bvh_branch ? current._bvh_left : null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst branch = current._bvh_branch;\n\t\t\tconst min_x = current._bvh_min_x;\n\t\t\tconst min_y = current._bvh_min_y;\n\t\t\tconst max_x = current._bvh_max_x;\n\t\t\tconst max_y = current._bvh_max_y;\n\t\t\tconst right = branch ? current._bvh_right : null;\n\n\t\t\tcontext.moveTo(min_x, min_y);\n\t\t\tcontext.lineTo(max_x, min_y);\n\t\t\tcontext.lineTo(max_x, max_y);\n\t\t\tcontext.lineTo(min_x, max_y);\n\t\t\tcontext.lineTo(min_x, min_y);\n\n\t\t\tif(right) {\n\t\t\t\tcurrent = right;\n\t\t\t\ttraverse_left = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet parent = current._bvh_parent;\n\n\t\t\t\tif(parent) {\n\t\t\t\t\twhile(parent && parent._bvh_right === current) {\n\t\t\t\t\t\tcurrent = parent;\n\t\t\t\t\t\tparent = current._bvh_parent;\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrent = parent;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n\n//# sourceURL=webpack:///./src/modules/BVH.mjs?"); - -/***/ }), - -/***/ "./src/modules/BVHBranch.mjs": -/*!***********************************!*\ - !*** ./src/modules/BVHBranch.mjs ***! - \***********************************/ -/*! exports provided: default */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return BVHBranch; });\n/**\n * @private\n */\nconst branch_pool = [];\n\n/**\n * A branch within a BVH\n * @class\n * @private\n */\nclass BVHBranch {\n\t/**\n\t * @constructor\n\t */\n\tconstructor() {\n\t\t/** @private */\n\t\tthis._bvh_parent = null;\n\n\t\t/** @private */\n\t\tthis._bvh_branch = true;\n\n\t\t/** @private */\n\t\tthis._bvh_left = null;\n\n\t\t/** @private */\n\t\tthis._bvh_right = null;\n\n\t\t/** @private */\n\t\tthis._bvh_sort = 0;\n\n\t\t/** @private */\n\t\tthis._bvh_min_x = 0;\n\n\t\t/** @private */\n\t\tthis._bvh_min_y = 0;\n\n\t\t/** @private */\n\t\tthis._bvh_max_x = 0;\n\n\t\t/** @private */\n\t\tthis._bvh_max_y = 0;\n\t}\n\n\t/**\n\t * Returns a branch from the branch pool or creates a new branch\n\t * @returns {BVHBranch}\n\t */\n\tstatic getBranch() {\n\t\tif(branch_pool.length) {\n\t\t\treturn branch_pool.pop();\n\t\t}\n\n\t\treturn new BVHBranch();\n\t}\n\n\t/**\n\t * Releases a branch back into the branch pool\n\t * @param {BVHBranch} branch The branch to release\n\t */\n\tstatic releaseBranch(branch) {\n\t\tbranch_pool.push(branch);\n\t}\n\n\t/**\n\t * Sorting callback used to sort branches by deepest first\n\t * @param {BVHBranch} a The first branch\n\t * @param {BVHBranch} b The second branch\n\t * @returns {Number}\n\t */\n\tstatic sortBranches(a, b) {\n\t\treturn a.sort > b.sort ? -1 : 1;\n\t}\n};\n\n\n//# sourceURL=webpack:///./src/modules/BVHBranch.mjs?"); - -/***/ }), - -/***/ "./src/modules/Body.mjs": -/*!******************************!*\ - !*** ./src/modules/Body.mjs ***! - \******************************/ -/*! exports provided: default */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Body; });\n/* harmony import */ var _Result_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Result.mjs */ \"./src/modules/Result.mjs\");\n/* harmony import */ var _SAT_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SAT.mjs */ \"./src/modules/SAT.mjs\");\n\n\n\n/**\n * The base class for bodies used to detect collisions\n * @class\n * @protected\n */\nclass Body {\n\t/**\n\t * @constructor\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t */\n\tconstructor(x = 0, y = 0, padding = 0) {\n\t\t/**\n\t\t * @desc The X coordinate of the body\n\t\t * @type {Number}\n\t\t */\n\t\tthis.x = x;\n\n\t\t/**\n\t\t * @desc The Y coordinate of the body\n\t\t * @type {Number}\n\t\t */\n\t\tthis.y = y;\n\n\t\t/**\n\t\t * @desc The amount to pad the bounding volume when testing for potential collisions\n\t\t * @type {Number}\n\t\t */\n\t\tthis.padding = padding;\n\n\t\t/** @private */\n\t\tthis._circle = false;\n\n\t\t/** @private */\n\t\tthis._polygon = false;\n\n\t\t/** @private */\n\t\tthis._point = false;\n\n\t\t/** @private */\n\t\tthis._bvh = null;\n\n\t\t/** @private */\n\t\tthis._bvh_parent = null;\n\n\t\t/** @private */\n\t\tthis._bvh_branch = false;\n\n\t\t/** @private */\n\t\tthis._bvh_padding = padding;\n\n\t\t/** @private */\n\t\tthis._bvh_min_x = 0;\n\n\t\t/** @private */\n\t\tthis._bvh_min_y = 0;\n\n\t\t/** @private */\n\t\tthis._bvh_max_x = 0;\n\n\t\t/** @private */\n\t\tthis._bvh_max_y = 0;\n\t}\n\n\t/**\n\t * Determines if the body is colliding with another body\n\t * @param {Circle|Polygon|Point} target The target body to test against\n\t * @param {Result} [result = null] A Result object on which to store information about the collision\n\t * @param {Boolean} [aabb = true] Set to false to skip the AABB test (useful if you use your own potential collision heuristic)\n\t * @returns {Boolean}\n\t */\n\tcollides(target, result = null, aabb = true) {\n\t\treturn Object(_SAT_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, target, result, aabb);\n\t}\n\n\t/**\n\t * Returns a list of potential collisions\n\t * @returns {Array}\n\t */\n\tpotentials() {\n\t\tconst bvh = this._bvh;\n\n\t\tif(bvh === null) {\n\t\t\tthrow new Error('Body does not belong to a collision system');\n\t\t}\n\n\t\treturn bvh.potentials(this);\n\t}\n\n\t/**\n\t * Removes the body from its current collision system\n\t */\n\tremove() {\n\t\tconst bvh = this._bvh;\n\n\t\tif(bvh) {\n\t\t\tbvh.remove(this, false);\n\t\t}\n\t}\n\n\t/**\n\t * Creates a {@link Result} used to collect the detailed results of a collision test\n\t */\n\tcreateResult() {\n\t\treturn new _Result_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n\t}\n\n\t/**\n\t * Creates a Result used to collect the detailed results of a collision test\n\t */\n\tstatic createResult() {\n\t\treturn new _Result_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n\t}\n};\n\n\n//# sourceURL=webpack:///./src/modules/Body.mjs?"); - -/***/ }), - -/***/ "./src/modules/Circle.mjs": -/*!********************************!*\ - !*** ./src/modules/Circle.mjs ***! - \********************************/ -/*! exports provided: default */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Circle; });\n/* harmony import */ var _Body_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Body.mjs */ \"./src/modules/Body.mjs\");\n\n\n/**\n * A circle used to detect collisions\n * @class\n */\nclass Circle extends _Body_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n\t/**\n\t * @constructor\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Number} [radius = 0] The radius\n\t * @param {Number} [scale = 1] The scale\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t */\n\tconstructor(x = 0, y = 0, radius = 0, scale = 1, padding = 0) {\n\t\tsuper(x, y, padding);\n\n\t\t/**\n\t\t * @desc\n\t\t * @type {Number}\n\t\t */\n\t\tthis.radius = radius;\n\n\t\t/**\n\t\t * @desc\n\t\t * @type {Number}\n\t\t */\n\t\tthis.scale = scale;\n\t}\n\n\t/**\n\t * Draws the circle to a CanvasRenderingContext2D's current path\n\t * @param {CanvasRenderingContext2D} context The context to add the arc to\n\t */\n\tdraw(context) {\n\t\tconst x = this.x;\n\t\tconst y = this.y;\n\t\tconst radius = this.radius * this.scale;\n\n\t\tcontext.moveTo(x + radius, y);\n\t\tcontext.arc(x, y, radius, 0, Math.PI * 2);\n\t}\n};\n\n\n//# sourceURL=webpack:///./src/modules/Circle.mjs?"); - -/***/ }), - -/***/ "./src/modules/Point.mjs": -/*!*******************************!*\ - !*** ./src/modules/Point.mjs ***! - \*******************************/ -/*! exports provided: default */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Point; });\n/* harmony import */ var _Polygon_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Polygon.mjs */ \"./src/modules/Polygon.mjs\");\n\n\n/**\n * A point used to detect collisions\n * @class\n */\nclass Point extends _Polygon_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n\t/**\n\t * @constructor\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t */\n\tconstructor(x = 0, y = 0, padding = 0) {\n\t\tsuper(x, y, [[0, 0]], 0, 1, 1, padding);\n\n\t\t/** @private */\n\t\tthis._point = true;\n\t}\n};\n\nPoint.prototype.setPoints = undefined;\n\n\n//# sourceURL=webpack:///./src/modules/Point.mjs?"); - -/***/ }), - -/***/ "./src/modules/Polygon.mjs": -/*!*********************************!*\ - !*** ./src/modules/Polygon.mjs ***! - \*********************************/ -/*! exports provided: default */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Polygon; });\n/* harmony import */ var _Body_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Body.mjs */ \"./src/modules/Body.mjs\");\n\n\n/**\n * A polygon used to detect collisions\n * @class\n */\nclass Polygon extends _Body_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n\t/**\n\t * @constructor\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Array} [points = []] An array of coordinate pairs making up the polygon - [[x1, y1], [x2, y2], ...]\n\t * @param {Number} [angle = 0] The starting rotation in radians\n\t * @param {Number} [scale_x = 1] The starting scale along the X axis\n\t * @param {Number} [scale_y = 1] The starting scale long the Y axis\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t */\n\tconstructor(x = 0, y = 0, points = [], angle = 0, scale_x = 1, scale_y = 1, padding = 0) {\n\t\tsuper(x, y, padding);\n\n\t\t/**\n\t\t * @desc The angle of the body in radians\n\t\t * @type {Number}\n\t\t */\n\t\tthis.angle = angle;\n\n\t\t/**\n\t\t * @desc The scale of the body along the X axis\n\t\t * @type {Number}\n\t\t */\n\t\tthis.scale_x = scale_x;\n\n\t\t/**\n\t\t * @desc The scale of the body along the Y axis\n\t\t * @type {Number}\n\t\t */\n\t\tthis.scale_y = scale_y;\n\n\n\t\t/** @private */\n\t\tthis._polygon = true;\n\n\t\t/** @private */\n\t\tthis._x = x;\n\n\t\t/** @private */\n\t\tthis._y = y;\n\n\t\t/** @private */\n\t\tthis._angle = angle;\n\n\t\t/** @private */\n\t\tthis._scale_x = scale_x;\n\n\t\t/** @private */\n\t\tthis._scale_y = scale_y;\n\n\t\t/** @private */\n\t\tthis._min_x = 0;\n\n\t\t/** @private */\n\t\tthis._min_y = 0;\n\n\t\t/** @private */\n\t\tthis._max_x = 0;\n\n\t\t/** @private */\n\t\tthis._max_y = 0;\n\n\t\t/** @private */\n\t\tthis._points = null;\n\n\t\t/** @private */\n\t\tthis._coords = null;\n\n\t\t/** @private */\n\t\tthis._edges = null;\n\n\t\t/** @private */\n\t\tthis._normals = null;\n\n\t\t/** @private */\n\t\tthis._dirty_coords = true;\n\n\t\t/** @private */\n\t\tthis._dirty_normals = true;\n\n\t\tPolygon.prototype.setPoints.call(this, points);\n\t}\n\n\t/**\n\t * Draws the polygon to a CanvasRenderingContext2D's current path\n\t * @param {CanvasRenderingContext2D} context The context to add the shape to\n\t */\n\tdraw(context) {\n\t\tif(\n\t\t\tthis._dirty_coords ||\n\t\t\tthis.x !== this._x ||\n\t\t\tthis.y !== this._y ||\n\t\t\tthis.angle !== this._angle ||\n\t\t\tthis.scale_x !== this._scale_x ||\n\t\t\tthis.scale_y !== this._scale_y\n\t\t) {\n\t\t\tthis._calculateCoords();\n\t\t}\n\n\t\tconst coords = this._coords;\n\n\t\tif(coords.length === 2) {\n\t\t\tcontext.moveTo(coords[0], coords[1]);\n\t\t\tcontext.arc(coords[0], coords[1], 1, 0, Math.PI * 2);\n\t\t}\n\t\telse {\n\t\t\tcontext.moveTo(coords[0], coords[1]);\n\n\t\t\tfor(let i = 2; i < coords.length; i += 2) {\n\t\t\t\tcontext.lineTo(coords[i], coords[i + 1]);\n\t\t\t}\n\n\t\t\tif(coords.length > 4) {\n\t\t\t\tcontext.lineTo(coords[0], coords[1]);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Sets the points making up the polygon. It's important to use this function when changing the polygon's shape to ensure internal data is also updated.\n\t * @param {Array} new_points An array of coordinate pairs making up the polygon - [[x1, y1], [x2, y2], ...]\n\t */\n\tsetPoints(new_points) {\n\t\tconst count = new_points.length;\n\n\t\tthis._points = new Float64Array(count * 2);\n\t\tthis._coords = new Float64Array(count * 2);\n\t\tthis._edges = new Float64Array(count * 2);\n\t\tthis._normals = new Float64Array(count * 2);\n\n\t\tconst points = this._points;\n\n\t\tfor(let i = 0, ix = 0, iy = 1; i < count; ++i, ix += 2, iy += 2) {\n\t\t\tconst new_point = new_points[i];\n\n\t\t\tpoints[ix] = new_point[0];\n\t\t\tpoints[iy] = new_point[1];\n\t\t}\n\n\t\tthis._dirty_coords = true;\n\t}\n\n\t/**\n\t * Calculates and caches the polygon's world coordinates based on its points, angle, and scale\n\t */\n\t_calculateCoords() {\n\t\tconst x = this.x;\n\t\tconst y = this.y;\n\t\tconst angle = this.angle;\n\t\tconst scale_x = this.scale_x;\n\t\tconst scale_y = this.scale_y;\n\t\tconst points = this._points;\n\t\tconst coords = this._coords;\n\t\tconst count = points.length;\n\n\t\tlet min_x;\n\t\tlet max_x;\n\t\tlet min_y;\n\t\tlet max_y;\n\n\t\tfor(let ix = 0, iy = 1; ix < count; ix += 2, iy += 2) {\n\t\t\tlet coord_x = points[ix] * scale_x;\n\t\t\tlet coord_y = points[iy] * scale_y;\n\n\t\t\tif(angle) {\n\t\t\t\tconst cos = Math.cos(angle);\n\t\t\t\tconst sin = Math.sin(angle);\n\t\t\t\tconst tmp_x = coord_x;\n\t\t\t\tconst tmp_y = coord_y;\n\n\t\t\t\tcoord_x = tmp_x * cos - tmp_y * sin;\n\t\t\t\tcoord_y = tmp_x * sin + tmp_y * cos;\n\t\t\t}\n\n\t\t\tcoord_x += x;\n\t\t\tcoord_y += y;\n\n\t\t\tcoords[ix] = coord_x;\n\t\t\tcoords[iy] = coord_y;\n\n\t\t\tif(ix === 0) {\n\t\t\t\tmin_x = max_x = coord_x;\n\t\t\t\tmin_y = max_y = coord_y;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(coord_x < min_x) {\n\t\t\t\t\tmin_x = coord_x;\n\t\t\t\t}\n\t\t\t\telse if(coord_x > max_x) {\n\t\t\t\t\tmax_x = coord_x;\n\t\t\t\t}\n\n\t\t\t\tif(coord_y < min_y) {\n\t\t\t\t\tmin_y = coord_y;\n\t\t\t\t}\n\t\t\t\telse if(coord_y > max_y) {\n\t\t\t\t\tmax_y = coord_y;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._angle = angle;\n\t\tthis._scale_x = scale_x;\n\t\tthis._scale_y = scale_y;\n\t\tthis._min_x = min_x;\n\t\tthis._min_y = min_y;\n\t\tthis._max_x = max_x;\n\t\tthis._max_y = max_y;\n\t\tthis._dirty_coords = false;\n\t\tthis._dirty_normals = true;\n\t}\n\n\t/**\n\t * Calculates the normals and edges of the polygon's sides\n\t */\n\t_calculateNormals() {\n\t\tconst coords = this._coords;\n\t\tconst edges = this._edges;\n\t\tconst normals = this._normals;\n\t\tconst count = coords.length;\n\n\t\tfor(let ix = 0, iy = 1; ix < count; ix += 2, iy += 2) {\n\t\t\tconst next = ix + 2 < count ? ix + 2 : 0;\n\t\t\tconst x = coords[next] - coords[ix];\n\t\t\tconst y = coords[next + 1] - coords[iy];\n\t\t\tconst length = x || y ? Math.sqrt(x * x + y * y) : 0;\n\n\t\t\tedges[ix] = x;\n\t\t\tedges[iy] = y;\n\t\t\tnormals[ix] = length ? y / length : 0;\n\t\t\tnormals[iy] = length ? -x / length : 0;\n\t\t}\n\n\t\tthis._dirty_normals = false;\n\t}\n};\n\n\n//# sourceURL=webpack:///./src/modules/Polygon.mjs?"); - -/***/ }), - -/***/ "./src/modules/Result.mjs": -/*!********************************!*\ - !*** ./src/modules/Result.mjs ***! - \********************************/ -/*! exports provided: default */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Result; });\n/**\n * An object used to collect the detailed results of a collision test\n *\n * > **Note:** It is highly recommended you recycle the same Result object if possible in order to avoid wasting memory\n * @class\n */\nclass Result {\n\t/**\n\t * @constructor\n\t */\n\tconstructor() {\n\t\t/**\n\t\t * @desc True if a collision was detected\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis.collision = false;\n\n\t\t/**\n\t\t * @desc The source body tested\n\t\t * @type {Circle|Polygon|Point}\n\t\t */\n\t\tthis.a = null;\n\n\t\t/**\n\t\t * @desc The target body tested against\n\t\t * @type {Circle|Polygon|Point}\n\t\t */\n\t\tthis.b = null;\n\n\t\t/**\n\t\t * @desc True if A is completely contained within B\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis.a_in_b = false;\n\n\t\t/**\n\t\t * @desc True if B is completely contained within A\n\t\t * @type {Boolean}\n\t\t */\n\t\tthis.b_in_a = false;\n\n\t\t/**\n\t\t * @desc The magnitude of the shortest axis of overlap\n\t\t * @type {Number}\n\t\t */\n\t\tthis.overlap = 0;\n\n\t\t/**\n\t\t * @desc The X direction of the shortest axis of overlap\n\t\t * @type {Number}\n\t\t */\n\t\tthis.overlap_x = 0;\n\n\t\t/**\n\t\t * @desc The Y direction of the shortest axis of overlap\n\t\t * @type {Number}\n\t\t */\n\t\tthis.overlap_y = 0;\n\t}\n};\n\n\n//# sourceURL=webpack:///./src/modules/Result.mjs?"); - -/***/ }), - -/***/ "./src/modules/SAT.mjs": -/*!*****************************!*\ - !*** ./src/modules/SAT.mjs ***! - \*****************************/ -/*! exports provided: default */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return SAT; });\n/**\n * Determines if two bodies are colliding using the Separating Axis Theorem\n * @private\n * @param {Circle|Polygon|Point} a The source body to test\n * @param {Circle|Polygon|Point} b The target body to test against\n * @param {Result} [result = null] A Result object on which to store information about the collision\n * @param {Boolean} [aabb = true] Set to false to skip the AABB test (useful if you use your own collision heuristic)\n * @returns {Boolean}\n */\nfunction SAT(a, b, result = null, aabb = true) {\n\tconst a_polygon = a._polygon;\n\tconst b_polygon = b._polygon;\n\n\tlet collision = false;\n\n\tif(result) {\n\t\tresult.a = a;\n\t\tresult.b = b;\n\t\tresult.a_in_b = true;\n\t\tresult.b_in_a = true;\n\t\tresult.overlap = null;\n\t\tresult.overlap_x = 0;\n\t\tresult.overlap_y = 0;\n\t}\n\n\tif(a_polygon) {\n\t\tif(\n\t\t\ta._dirty_coords ||\n\t\t\ta.x !== a._x ||\n\t\t\ta.y !== a._y ||\n\t\t\ta.angle !== a._angle ||\n\t\t\ta.scale_x !== a._scale_x ||\n\t\t\ta.scale_y !== a._scale_y\n\t\t) {\n\t\t\ta._calculateCoords();\n\t\t}\n\t}\n\n\tif(b_polygon) {\n\t\tif(\n\t\t\tb._dirty_coords ||\n\t\t\tb.x !== b._x ||\n\t\t\tb.y !== b._y ||\n\t\t\tb.angle !== b._angle ||\n\t\t\tb.scale_x !== b._scale_x ||\n\t\t\tb.scale_y !== b._scale_y\n\t\t) {\n\t\t\tb._calculateCoords();\n\t\t}\n\t}\n\n\tif(!aabb || aabbAABB(a, b)) {\n\t\tif(a_polygon && a._dirty_normals) {\n\t\t\ta._calculateNormals();\n\t\t}\n\n\t\tif(b_polygon && b._dirty_normals) {\n\t\t\tb._calculateNormals();\n\t\t}\n\n\t\tcollision = (\n\t\t\ta_polygon && b_polygon ? polygonPolygon(a, b, result) :\n\t\t\ta_polygon ? polygonCircle(a, b, result, false) :\n\t\t\tb_polygon ? polygonCircle(b, a, result, true) :\n\t\t\tcircleCircle(a, b, result)\n\t\t);\n\t}\n\n\tif(result) {\n\t\tresult.collision = collision;\n\t}\n\n\treturn collision;\n};\n\n/**\n * Determines if two bodies' axis aligned bounding boxes are colliding\n * @param {Circle|Polygon|Point} a The source body to test\n * @param {Circle|Polygon|Point} b The target body to test against\n */\nfunction aabbAABB(a, b) {\n\tconst a_polygon = a._polygon;\n\tconst a_x = a_polygon ? 0 : a.x;\n\tconst a_y = a_polygon ? 0 : a.y;\n\tconst a_radius = a_polygon ? 0 : a.radius * a.scale;\n\tconst a_min_x = a_polygon ? a._min_x : a_x - a_radius;\n\tconst a_min_y = a_polygon ? a._min_y : a_y - a_radius;\n\tconst a_max_x = a_polygon ? a._max_x : a_x + a_radius;\n\tconst a_max_y = a_polygon ? a._max_y : a_y + a_radius;\n\n\tconst b_polygon = b._polygon;\n\tconst b_x = b_polygon ? 0 : b.x;\n\tconst b_y = b_polygon ? 0 : b.y;\n\tconst b_radius = b_polygon ? 0 : b.radius * b.scale;\n\tconst b_min_x = b_polygon ? b._min_x : b_x - b_radius;\n\tconst b_min_y = b_polygon ? b._min_y : b_y - b_radius;\n\tconst b_max_x = b_polygon ? b._max_x : b_x + b_radius;\n\tconst b_max_y = b_polygon ? b._max_y : b_y + b_radius;\n\n\treturn a_min_x < b_max_x && a_min_y < b_max_y && a_max_x > b_min_x && a_max_y > b_min_y;\n}\n\n/**\n * Determines if two polygons are colliding\n * @param {Polygon} a The source polygon to test\n * @param {Polygon} b The target polygon to test against\n * @param {Result} [result = null] A Result object on which to store information about the collision\n * @returns {Boolean}\n */\nfunction polygonPolygon(a, b, result = null) {\n\tconst a_count = a._coords.length;\n\tconst b_count = b._coords.length;\n\n\t// Handle points specially\n\tif(a_count === 2 && b_count === 2) {\n\t\tconst a_coords = a._coords;\n\t\tconst b_coords = b._coords;\n\n\t\tif(result) {\n\t\t\tresult.overlap = 0;\n\t\t}\n\n\t\treturn a_coords[0] === b_coords[0] && a_coords[1] === b_coords[1];\n\t}\n\n\tconst a_coords = a._coords;\n\tconst b_coords = b._coords;\n\tconst a_normals = a._normals;\n\tconst b_normals = b._normals;\n\n\tif(a_count > 2) {\n\t\tfor(let ix = 0, iy = 1; ix < a_count; ix += 2, iy += 2) {\n\t\t\tif(separatingAxis(a_coords, b_coords, a_normals[ix], a_normals[iy], result)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\tif(b_count > 2) {\n\t\tfor(let ix = 0, iy = 1; ix < b_count; ix += 2, iy += 2) {\n\t\t\tif(separatingAxis(a_coords, b_coords, b_normals[ix], b_normals[iy], result)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Determines if a polygon and a circle are colliding\n * @param {Polygon} a The source polygon to test\n * @param {Circle} b The target circle to test against\n * @param {Result} [result = null] A Result object on which to store information about the collision\n * @param {Boolean} [reverse = false] Set to true to reverse a and b in the result parameter when testing circle->polygon instead of polygon->circle\n * @returns {Boolean}\n */\nfunction polygonCircle(a, b, result = null, reverse = false) {\n\tconst a_coords = a._coords;\n\tconst a_edges = a._edges;\n\tconst a_normals = a._normals;\n\tconst b_x = b.x;\n\tconst b_y = b.y;\n\tconst b_radius = b.radius * b.scale;\n\tconst b_radius2 = b_radius * 2;\n\tconst radius_squared = b_radius * b_radius;\n\tconst count = a_coords.length;\n\n\tlet a_in_b = true;\n\tlet b_in_a = true;\n\tlet overlap = null;\n\tlet overlap_x = 0;\n\tlet overlap_y = 0;\n\n\t// Handle points specially\n\tif(count === 2) {\n\t\tconst coord_x = b_x - a_coords[0];\n\t\tconst coord_y = b_y - a_coords[1];\n\t\tconst length_squared = coord_x * coord_x + coord_y * coord_y;\n\n\t\tif(length_squared > radius_squared) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif(result) {\n\t\t\tconst length = Math.sqrt(length_squared);\n\n\t\t\toverlap = b_radius - length;\n\t\t\toverlap_x = coord_x / length;\n\t\t\toverlap_y = coord_y / length;\n\t\t\tb_in_a = false;\n\t\t}\n\t}\n\telse {\n\t\tfor(let ix = 0, iy = 1; ix < count; ix += 2, iy += 2) {\n\t\t\tconst coord_x = b_x - a_coords[ix];\n\t\t\tconst coord_y = b_y - a_coords[iy];\n\t\t\tconst edge_x = a_edges[ix];\n\t\t\tconst edge_y = a_edges[iy];\n\t\t\tconst dot = coord_x * edge_x + coord_y * edge_y;\n\t\t\tconst region = dot < 0 ? -1 : dot > edge_x * edge_x + edge_y * edge_y ? 1 : 0;\n\n\t\t\tlet tmp_overlapping = false;\n\t\t\tlet tmp_overlap = 0;\n\t\t\tlet tmp_overlap_x = 0;\n\t\t\tlet tmp_overlap_y = 0;\n\n\t\t\tif(result && a_in_b && coord_x * coord_x + coord_y * coord_y > radius_squared) {\n\t\t\t\ta_in_b = false;\n\t\t\t}\n\n\t\t\tif(region) {\n\t\t\t\tconst left = region === -1;\n\t\t\t\tconst other_x = left ? (ix === 0 ? count - 2 : ix - 2) : (ix === count - 2 ? 0 : ix + 2);\n\t\t\t\tconst other_y = other_x + 1;\n\t\t\t\tconst coord2_x = b_x - a_coords[other_x];\n\t\t\t\tconst coord2_y = b_y - a_coords[other_y];\n\t\t\t\tconst edge2_x = a_edges[other_x];\n\t\t\t\tconst edge2_y = a_edges[other_y];\n\t\t\t\tconst dot2 = coord2_x * edge2_x + coord2_y * edge2_y;\n\t\t\t\tconst region2 = dot2 < 0 ? -1 : dot2 > edge2_x * edge2_x + edge2_y * edge2_y ? 1 : 0;\n\n\t\t\t\tif(region2 === -region) {\n\t\t\t\t\tconst target_x = left ? coord_x : coord2_x;\n\t\t\t\t\tconst target_y = left ? coord_y : coord2_y;\n\t\t\t\t\tconst length_squared = target_x * target_x + target_y * target_y;\n\n\t\t\t\t\tif(length_squared > radius_squared) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(result) {\n\t\t\t\t\t\tconst length = Math.sqrt(length_squared);\n\n\t\t\t\t\t\ttmp_overlapping = true;\n\t\t\t\t\t\ttmp_overlap = b_radius - length;\n\t\t\t\t\t\ttmp_overlap_x = target_x / length;\n\t\t\t\t\t\ttmp_overlap_y = target_y / length;\n\t\t\t\t\t\tb_in_a = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst normal_x = a_normals[ix];\n\t\t\t\tconst normal_y = a_normals[iy];\n\t\t\t\tconst length = coord_x * normal_x + coord_y * normal_y;\n\t\t\t\tconst absolute_length = length < 0 ? -length : length;\n\n\t\t\t\tif(length > 0 && absolute_length > b_radius) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif(result) {\n\t\t\t\t\ttmp_overlapping = true;\n\t\t\t\t\ttmp_overlap = b_radius - length;\n\t\t\t\t\ttmp_overlap_x = normal_x;\n\t\t\t\t\ttmp_overlap_y = normal_y;\n\n\t\t\t\t\tif(b_in_a && length >= 0 || tmp_overlap < b_radius2) {\n\t\t\t\t\t\tb_in_a = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(tmp_overlapping && (overlap === null || overlap > tmp_overlap)) {\n\t\t\t\toverlap = tmp_overlap;\n\t\t\t\toverlap_x = tmp_overlap_x;\n\t\t\t\toverlap_y = tmp_overlap_y;\n\t\t\t}\n\t\t}\n\t}\n\n\tif(result) {\n\t\tresult.a_in_b = reverse ? b_in_a : a_in_b;\n\t\tresult.b_in_a = reverse ? a_in_b : b_in_a;\n\t\tresult.overlap = overlap;\n\t\tresult.overlap_x = reverse ? -overlap_x : overlap_x;\n\t\tresult.overlap_y = reverse ? -overlap_y : overlap_y;\n\t}\n\n\treturn true;\n}\n\n/**\n * Determines if two circles are colliding\n * @param {Circle} a The source circle to test\n * @param {Circle} b The target circle to test against\n * @param {Result} [result = null] A Result object on which to store information about the collision\n * @returns {Boolean}\n */\nfunction circleCircle(a, b, result = null) {\n\tconst a_radius = a.radius * a.scale;\n\tconst b_radius = b.radius * b.scale;\n\tconst difference_x = b.x - a.x;\n\tconst difference_y = b.y - a.y;\n\tconst radius_sum = a_radius + b_radius;\n\tconst length_squared = difference_x * difference_x + difference_y * difference_y;\n\n\tif(length_squared > radius_sum * radius_sum) {\n\t\treturn false;\n\t}\n\n\tif(result) {\n\t\tconst length = Math.sqrt(length_squared);\n\n\t\tresult.a_in_b = a_radius <= b_radius && length <= b_radius - a_radius;\n\t\tresult.b_in_a = b_radius <= a_radius && length <= a_radius - b_radius;\n\t\tresult.overlap = radius_sum - length;\n\t\tresult.overlap_x = difference_x / length;\n\t\tresult.overlap_y = difference_y / length;\n\t}\n\n\treturn true;\n}\n\n/**\n * Determines if two polygons are separated by an axis\n * @param {Array} a_coords The coordinates of the polygon to test\n * @param {Array} b_coords The coordinates of the polygon to test against\n * @param {Number} x The X direction of the axis\n * @param {Number} y The Y direction of the axis\n * @param {Result} [result = null] A Result object on which to store information about the collision\n * @returns {Boolean}\n */\nfunction separatingAxis(a_coords, b_coords, x, y, result = null) {\n\tconst a_count = a_coords.length;\n\tconst b_count = b_coords.length;\n\n\tif(!a_count || !b_count) {\n\t\treturn true;\n\t}\n\n\tlet a_start = null;\n\tlet a_end = null;\n\tlet b_start = null;\n\tlet b_end = null;\n\n\tfor(let ix = 0, iy = 1; ix < a_count; ix += 2, iy += 2) {\n\t\tconst dot = a_coords[ix] * x + a_coords[iy] * y;\n\n\t\tif(a_start === null || a_start > dot) {\n\t\t\ta_start = dot;\n\t\t}\n\n\t\tif(a_end === null || a_end < dot) {\n\t\t\ta_end = dot;\n\t\t}\n\t}\n\n\tfor(let ix = 0, iy = 1; ix < b_count; ix += 2, iy += 2) {\n\t\tconst dot = b_coords[ix] * x + b_coords[iy] * y;\n\n\t\tif(b_start === null || b_start > dot) {\n\t\t\tb_start = dot;\n\t\t}\n\n\t\tif(b_end === null || b_end < dot) {\n\t\t\tb_end = dot;\n\t\t}\n\t}\n\n\tif(a_start > b_end || a_end < b_start) {\n\t\treturn true;\n\t}\n\n\tif(result) {\n\t\tlet overlap = 0;\n\n\t\tif(a_start < b_start) {\n\t\t\tresult.a_in_b = false;\n\n\t\t\tif(a_end < b_end) {\n\t\t\t\toverlap = a_end - b_start;\n\t\t\t\tresult.b_in_a = false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst option1 = a_end - b_start;\n\t\t\t\tconst option2 = b_end - a_start;\n\n\t\t\t\toverlap = option1 < option2 ? option1 : -option2;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tresult.b_in_a = false;\n\n\t\t\tif(a_end > b_end) {\n\t\t\t\toverlap = a_start - b_end;\n\t\t\t\tresult.a_in_b = false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst option1 = a_end - b_start;\n\t\t\t\tconst option2 = b_end - a_start;\n\n\t\t\t\toverlap = option1 < option2 ? option1 : -option2;\n\t\t\t}\n\t\t}\n\n\t\tconst current_overlap = result.overlap;\n\t\tconst absolute_overlap = overlap < 0 ? -overlap : overlap;\n\n\t\tif(current_overlap === null || current_overlap > absolute_overlap) {\n\t\t\tconst sign = overlap < 0 ? -1 : 1;\n\n\t\t\tresult.overlap = absolute_overlap;\n\t\t\tresult.overlap_x = x * sign;\n\t\t\tresult.overlap_y = y * sign;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n\n//# sourceURL=webpack:///./src/modules/SAT.mjs?"); - -/***/ }) - -/******/ }); \ No newline at end of file diff --git a/frontend/assets/scripts/modules/Collisions.js.meta b/frontend/assets/scripts/modules/Collisions.js.meta deleted file mode 100644 index 657c759..0000000 --- a/frontend/assets/scripts/modules/Collisions.js.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "1.0.5", - "uuid": "da0a517f-5c74-4fc0-ba89-dbcee184b13e", - "isPlugin": false, - "loadPluginInWeb": true, - "loadPluginInNative": true, - "loadPluginInEditor": false, - "subMetas": {} -} \ No newline at end of file diff --git a/frontend/assets/scripts/modules/room_downsync_frame_proto_bundle.forcemsg.js b/frontend/assets/scripts/modules/room_downsync_frame_proto_bundle.forcemsg.js index 80d2474..3ee05c7 100644 --- a/frontend/assets/scripts/modules/room_downsync_frame_proto_bundle.forcemsg.js +++ b/frontend/assets/scripts/modules/room_downsync_frame_proto_bundle.forcemsg.js @@ -1210,6 +1210,7 @@ $root.protos = (function() { * @property {number|null} [maxHp] PlayerDownsync maxHp * @property {number|null} [characterState] PlayerDownsync characterState * @property {boolean|null} [inAir] PlayerDownsync inAir + * @property {number|null} [framesInChState] PlayerDownsync framesInChState * @property {string|null} [name] PlayerDownsync name * @property {string|null} [displayName] PlayerDownsync displayName * @property {string|null} [avatar] PlayerDownsync avatar @@ -1382,6 +1383,14 @@ $root.protos = (function() { */ PlayerDownsync.prototype.inAir = false; + /** + * PlayerDownsync framesInChState. + * @member {number} framesInChState + * @memberof protos.PlayerDownsync + * @instance + */ + PlayerDownsync.prototype.framesInChState = 0; + /** * PlayerDownsync name. * @member {string} name @@ -1468,12 +1477,14 @@ $root.protos = (function() { writer.uint32(/* id 18, wireType 0 =*/144).int32(message.characterState); if (message.inAir != null && Object.hasOwnProperty.call(message, "inAir")) writer.uint32(/* id 19, wireType 0 =*/152).bool(message.inAir); + if (message.framesInChState != null && Object.hasOwnProperty.call(message, "framesInChState")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.framesInChState); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 20, wireType 2 =*/162).string(message.name); + writer.uint32(/* id 997, wireType 2 =*/7978).string(message.name); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.displayName); + writer.uint32(/* id 998, wireType 2 =*/7986).string(message.displayName); if (message.avatar != null && Object.hasOwnProperty.call(message, "avatar")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.avatar); + writer.uint32(/* id 999, wireType 2 =*/7994).string(message.avatar); return writer; }; @@ -1585,14 +1596,18 @@ $root.protos = (function() { break; } case 20: { + message.framesInChState = reader.int32(); + break; + } + case 997: { message.name = reader.string(); break; } - case 21: { + case 998: { message.displayName = reader.string(); break; } - case 22: { + case 999: { message.avatar = reader.string(); break; } @@ -1688,6 +1703,9 @@ $root.protos = (function() { if (message.inAir != null && message.hasOwnProperty("inAir")) if (typeof message.inAir !== "boolean") return "inAir: boolean expected"; + if (message.framesInChState != null && message.hasOwnProperty("framesInChState")) + if (!$util.isInteger(message.framesInChState)) + return "framesInChState: integer expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; @@ -1750,6 +1768,8 @@ $root.protos = (function() { message.characterState = object.characterState | 0; if (object.inAir != null) message.inAir = Boolean(object.inAir); + if (object.framesInChState != null) + message.framesInChState = object.framesInChState | 0; if (object.name != null) message.name = String(object.name); if (object.displayName != null) @@ -1792,6 +1812,7 @@ $root.protos = (function() { object.maxHp = 0; object.characterState = 0; object.inAir = false; + object.framesInChState = 0; object.name = ""; object.displayName = ""; object.avatar = ""; @@ -1834,6 +1855,8 @@ $root.protos = (function() { object.characterState = message.characterState; if (message.inAir != null && message.hasOwnProperty("inAir")) object.inAir = message.inAir; + if (message.framesInChState != null && message.hasOwnProperty("framesInChState")) + object.framesInChState = message.framesInChState; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.displayName != null && message.hasOwnProperty("displayName")) diff --git a/jsexport/battle/battle.go b/jsexport/battle/battle.go index 8d9aee4..f26d8c1 100644 --- a/jsexport/battle/battle.go +++ b/jsexport/battle/battle.go @@ -13,6 +13,19 @@ const ( PATTERN_ID_UNABLE_TO_OP = -2 PATTERN_ID_NO_OP = -1 + + WORLD_TO_VIRTUAL_GRID_RATIO = float64(100) + VIRTUAL_GRID_TO_WORLD_RATIO = float64(1.0) / WORLD_TO_VIRTUAL_GRID_RATIO + + GRAVITY_X = int32(0) + GRAVITY_Y = -int32(float64(0.5) * WORLD_TO_VIRTUAL_GRID_RATIO) // makes all "playerCollider.Y" a multiple of 0.5 in all cases + + INPUT_DELAY_FRAMES = int32(8) + NST_DELAY_FRAMES = int32(16) + INPUT_SCALE_FRAMES = uint32(2) + + SNAP_INTO_PLATFORM_OVERLAP = float64(0.1) + SNAP_INTO_PLATFORM_THRESHOLD = float64(0.5) ) // These directions are chosen such that when speed is changed to "(speedX+delta, speedY+delta)" for any of them, the direction is unchanged. @@ -28,42 +41,28 @@ var DIRECTION_DECODER = [][]int32{ {-1, +1}, } -var skillIdToBullet = map[int]interface{}{ - 1: &MeleeBullet{ - Bullet: Bullet{ - // for offender - StartupFrames: int32(5), - ActiveFrames: int32(10), - RecoveryFrames: int32(34), - RecoveryFramesOnBlock: int32(34), - RecoveryFramesOnHit: int32(34), - HitboxOffset: float64(12.0), // should be about the radius of the PlayerCollider - - // for defender - HitStunFrames: int32(18), - BlockStunFrames: int32(9), - Pushback: float64(8.0), - ReleaseTriggerType: int32(1), // 1: rising-edge, 2: falling-edge - Damage: int32(5), - - SelfMoveforwardX: 0, - SelfMoveforwardY: 0, - HitboxSizeX: 24.0, - HitboxSizeY: 32.0, - }, - }, -} - const ( - ATK_CHARACTER_STATE_IDLE1 = int32(0) - ATK_CHARACTER_STATE_WALKING = int32(1) - ATK_CHARACTER_STATE_ATK1 = int32(2) - ATK_CHARACTER_STATE_ATKED1 = int32(3) - ATK_CHARACTER_STATE_INAIR_IDLE1 = int32(4) - ATK_CHARACTER_STATE_INAIR_ATK1 = int32(5) - ATK_CHARACTER_STATE_INAIR_ATKED1 = int32(6) + ATK_CHARACTER_STATE_IDLE1 = int32(0) + ATK_CHARACTER_STATE_WALKING = int32(1) + ATK_CHARACTER_STATE_ATK1 = int32(2) + ATK_CHARACTER_STATE_ATKED1 = int32(3) + ATK_CHARACTER_STATE_INAIR_IDLE1_NO_JUMP = int32(4) + ATK_CHARACTER_STATE_INAIR_IDLE1_BY_JUMP = int32(5) + ATK_CHARACTER_STATE_INAIR_ATK1 = int32(6) + ATK_CHARACTER_STATE_INAIR_ATKED1 = int32(7) + ATK_CHARACTER_STATE_BLOWN_UP1 = int32(8) + ATK_CHARACTER_STATE_LAY_DOWN1 = int32(9) + ATK_CHARACTER_STATE_GET_UP1 = int32(10) ) +var inAirSet = map[int32]bool{ + ATK_CHARACTER_STATE_INAIR_IDLE1_NO_JUMP: true, + ATK_CHARACTER_STATE_INAIR_IDLE1_BY_JUMP: true, + ATK_CHARACTER_STATE_INAIR_ATK1: true, + ATK_CHARACTER_STATE_INAIR_ATKED1: true, + ATK_CHARACTER_STATE_BLOWN_UP1: true, +} + func ConvertToInputFrameId(renderFrameId int32, inputDelayFrames int32, inputScaleFrames uint32) int32 { if renderFrameId < inputDelayFrames { return 0 @@ -351,22 +350,18 @@ func deriveOpPattern(currPlayerDownsync, thatPlayerInNextFrame *PlayerDownsync, } if decodedInput.BtnBLevel > prevBtnBLevel { - characStateAlreadyInAir := false - if ATK_CHARACTER_STATE_INAIR_IDLE1 == currPlayerDownsync.CharacterState || ATK_CHARACTER_STATE_INAIR_ATK1 == currPlayerDownsync.CharacterState || ATK_CHARACTER_STATE_INAIR_ATKED1 == currPlayerDownsync.CharacterState { - characStateAlreadyInAir = true - } - characStateIsInterruptWaivable := false - if ATK_CHARACTER_STATE_IDLE1 == currPlayerDownsync.CharacterState || ATK_CHARACTER_STATE_WALKING == currPlayerDownsync.CharacterState || ATK_CHARACTER_STATE_INAIR_IDLE1 == currPlayerDownsync.CharacterState { - characStateIsInterruptWaivable = true - } - if !characStateAlreadyInAir && characStateIsInterruptWaivable { + if _, existent := inAirSet[currPlayerDownsync.CharacterState]; !existent { jumpedOrNot = true } } patternId := PATTERN_ID_NO_OP if decodedInput.BtnALevel > prevBtnALevel { - patternId = 0 + if currPlayerDownsync.InAir { + patternId = 1 + } else { + patternId = 0 + } effDx, effDy = 0, 0 // Most patterns/skills should not allow simultaneous movement } @@ -374,7 +369,7 @@ func deriveOpPattern(currPlayerDownsync, thatPlayerInNextFrame *PlayerDownsync, } // [WARNING] The params of this method is carefully tuned such that only "battle.RoomDownsyncFrame" is a necessary custom struct. -func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer, currRenderFrame *RoomDownsyncFrame, collisionSys *resolv.Space, collisionSysMap map[int32]*resolv.Object, gravityX, gravityY, jumpingInitVelY, inputDelayFrames int32, inputScaleFrames uint32, collisionSpaceOffsetX, collisionSpaceOffsetY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, worldToVirtualGridRatio, virtualGridToWorldRatio float64, playerOpPatternToSkillId map[int]int) *RoomDownsyncFrame { +func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer, currRenderFrame *RoomDownsyncFrame, collisionSys *resolv.Space, collisionSysMap map[int32]*resolv.Object, collisionSpaceOffsetX, collisionSpaceOffsetY float64, playerOpPatternToSkillId map[int]int, chConfigsOrderedByJoinIndex []*CharacterConfig) *RoomDownsyncFrame { // [WARNING] On backend this function MUST BE called while "InputsBufferLock" is locked! roomCapacity := len(currRenderFrame.PlayersArr) nextRenderFramePlayers := make([]*PlayerDownsync, roomCapacity) @@ -395,9 +390,10 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer Score: currPlayerDownsync.Score, Removed: currPlayerDownsync.Removed, JoinIndex: currPlayerDownsync.JoinIndex, - FramesToRecover: currPlayerDownsync.FramesToRecover - 1, Hp: currPlayerDownsync.Hp, MaxHp: currPlayerDownsync.MaxHp, + FramesToRecover: currPlayerDownsync.FramesToRecover - 1, + FramesInChState: currPlayerDownsync.FramesInChState + 1, } if nextRenderFramePlayers[i].FramesToRecover < 0 { nextRenderFramePlayers[i].FramesToRecover = 0 @@ -407,18 +403,20 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer nextRenderFrameMeleeBullets := make([]*MeleeBullet, 0, len(currRenderFrame.MeleeBullets)) // Is there any better way to reduce malloc/free impact, e.g. smart prediction for fixed memory allocation? effPushbacks := make([]Vec2D, roomCapacity) hardPushbackNorms := make([]*[]Vec2D, roomCapacity) + jumpedOrNotList := make([]bool, roomCapacity) // 1. Process player inputs for i, currPlayerDownsync := range currRenderFrame.PlayersArr { + jumpedOrNotList[i] = false thatPlayerInNextFrame := nextRenderFramePlayers[i] - patternId, jumpedOrNot, effDx, effDy := deriveOpPattern(currPlayerDownsync, thatPlayerInNextFrame, currRenderFrame, inputsBuffer, inputDelayFrames, inputScaleFrames) + patternId, jumpedOrNot, effDx, effDy := deriveOpPattern(currPlayerDownsync, thatPlayerInNextFrame, currRenderFrame, inputsBuffer, INPUT_DELAY_FRAMES, INPUT_SCALE_FRAMES) if PATTERN_ID_UNABLE_TO_OP == patternId { continue } if jumpedOrNot { - thatPlayerInNextFrame.VelY = jumpingInitVelY - thatPlayerInNextFrame.VirtualGridY += jumpingInitVelY // Immediately gets out of any snapping + thatPlayerInNextFrame.VelY = int32(chConfigsOrderedByJoinIndex[i].JumpingInitVelY) + jumpedOrNotList[i] = true } joinIndex := currPlayerDownsync.JoinIndex if PATTERN_ID_NO_OP != patternId { @@ -457,14 +455,17 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer thatPlayerInNextFrame := nextRenderFramePlayers[i] // Reset playerCollider position from the "virtual grid position" newVx, newVy := currPlayerDownsync.VirtualGridX+currPlayerDownsync.VelX, currPlayerDownsync.VirtualGridY+currPlayerDownsync.VelY + if jumpedOrNotList[i] { + newVy += int32(chConfigsOrderedByJoinIndex[i].JumpingInitVelY) // Immediately gets out of any snapping + } - playerCollider.X, playerCollider.Y = VirtualGridToPolygonColliderBLPos(newVx, newVy, playerCollider.W*0.5, playerCollider.H*0.5, 0, 0, 0, 0, collisionSpaceOffsetX, collisionSpaceOffsetY, virtualGridToWorldRatio) + playerCollider.X, playerCollider.Y = VirtualGridToPolygonColliderBLPos(newVx, newVy, playerCollider.W*0.5, playerCollider.H*0.5, 0, 0, 0, 0, collisionSpaceOffsetX, collisionSpaceOffsetY, VIRTUAL_GRID_TO_WORLD_RATIO) // Update in the collision system playerCollider.Update() if currPlayerDownsync.InAir { - thatPlayerInNextFrame.VelX += gravityX - thatPlayerInNextFrame.VelY += gravityY + thatPlayerInNextFrame.VelX += GRAVITY_X + thatPlayerInNextFrame.VelY += GRAVITY_Y } } @@ -478,9 +479,9 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer if 0 > offender.DirX { xfac = float64(-1.0) } - offenderWx, offenderWy := VirtualGridToWorldPos(offender.VirtualGridX, offender.VirtualGridY, virtualGridToWorldRatio) + offenderWx, offenderWy := VirtualGridToWorldPos(offender.VirtualGridX, offender.VirtualGridY, VIRTUAL_GRID_TO_WORLD_RATIO) bulletWx, bulletWy := offenderWx+xfac*meleeBullet.HitboxOffset, offenderWy - newBulletCollider := GenerateRectCollider(bulletWx, bulletWy, meleeBullet.HitboxSizeX, meleeBullet.HitboxSizeY, snapIntoPlatformOverlap, snapIntoPlatformOverlap, snapIntoPlatformOverlap, snapIntoPlatformOverlap, collisionSpaceOffsetX, collisionSpaceOffsetY, meleeBullet, "MeleeBullet") + newBulletCollider := GenerateRectCollider(bulletWx, bulletWy, meleeBullet.HitboxSizeX, meleeBullet.HitboxSizeY, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, SNAP_INTO_PLATFORM_OVERLAP, collisionSpaceOffsetX, collisionSpaceOffsetY, meleeBullet, "MeleeBullet") collisionSys.Add(newBulletCollider) bulletColliders = append(bulletColliders, newBulletCollider) } else { @@ -494,7 +495,7 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer collisionPlayerIndex := COLLISION_PLAYER_INDEX_PREFIX + joinIndex playerCollider := collisionSysMap[collisionPlayerIndex] playerShape := playerCollider.Shape.(*resolv.ConvexPolygon) - hardPushbackNorms[joinIndex-1] = calcHardPushbacksNorms(joinIndex, playerCollider, playerShape, snapIntoPlatformOverlap, &(effPushbacks[joinIndex-1])) + hardPushbackNorms[joinIndex-1] = calcHardPushbacksNorms(joinIndex, playerCollider, playerShape, SNAP_INTO_PLATFORM_OVERLAP, &(effPushbacks[joinIndex-1])) thatPlayerInNextFrame := nextRenderFramePlayers[i] landedOnGravityPushback := false if collision := playerCollider.Check(0, 0); nil != collision { @@ -521,7 +522,7 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer normAlignmentWithGravity := (overlapResult.OverlapX*float64(0) + overlapResult.OverlapY*float64(-1.0)) if isAnotherPlayer { // [WARNING] The "zero overlap collision" might be randomly detected/missed on either frontend or backend, to have deterministic result we added paddings to all sides of a playerCollider. As each velocity component of (velX, velY) being a multiple of 0.5 at any renderFrame, each position component of (x, y) can only be a multiple of 0.5 too, thus whenever a 1-dimensional collision happens between players from [player#1: i*0.5, player#2: j*0.5, not collided yet] to [player#1: (i+k)*0.5, player#2: j*0.5, collided], the overlap becomes (i+k-j)*0.5+2*s, and after snapping subtraction the effPushback magnitude for each player is (i+k-j)*0.5, resulting in 0.5-multiples-position for the next renderFrame. - pushbackX, pushbackY = (overlapResult.Overlap-snapIntoPlatformOverlap*2)*overlapResult.OverlapX, (overlapResult.Overlap-snapIntoPlatformOverlap*2)*overlapResult.OverlapY + pushbackX, pushbackY = (overlapResult.Overlap-SNAP_INTO_PLATFORM_OVERLAP*2)*overlapResult.OverlapX, (overlapResult.Overlap-SNAP_INTO_PLATFORM_OVERLAP*2)*overlapResult.OverlapY } for _, hardPushbackNorm := range *hardPushbackNorms[joinIndex-1] { projectedMagnitude := pushbackX*hardPushbackNorm.X + pushbackY*hardPushbackNorm.Y @@ -533,7 +534,7 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer effPushbacks[joinIndex-1].X += pushbackX effPushbacks[joinIndex-1].Y += pushbackY - if snapIntoPlatformThreshold < normAlignmentWithGravity { + if SNAP_INTO_PLATFORM_THRESHOLD < normAlignmentWithGravity { landedOnGravityPushback = true //playerColliderCenterX, playerColliderCenterY := playerCollider.Center() //fmt.Printf("joinIndex=%d landedOnGravityPushback\n{renderFrame.id: %d, isBarrier: %v, isAnotherPlayer: %v}\nhardPushbackNormsOfThisPlayer=%v, playerColliderPos=(%.2f,%.2f), immediatePushback={%.3f, %.3f}, effPushback={%.3f, %.3f}, overlapMag=%.4f\n", joinIndex, currRenderFrame.Id, isBarrier, isAnotherPlayer, *hardPushbackNorms[joinIndex-1], playerColliderCenterX, playerColliderCenterY, pushbackX, pushbackY, effPushbacks[joinIndex-1].X, effPushbacks[joinIndex-1].Y, overlapResult.Overlap) @@ -550,11 +551,15 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer thatPlayerInNextFrame.FramesToRecover = 0 } } - if currPlayerDownsync.InAir { + if thatPlayerInNextFrame.InAir { oldNextCharacterState := thatPlayerInNextFrame.CharacterState switch oldNextCharacterState { case ATK_CHARACTER_STATE_IDLE1, ATK_CHARACTER_STATE_WALKING: - thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_INAIR_IDLE1 + if jumpedOrNotList[i] || ATK_CHARACTER_STATE_INAIR_IDLE1_BY_JUMP == currPlayerDownsync.CharacterState { + thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_INAIR_IDLE1_BY_JUMP + } else { + thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_INAIR_IDLE1_NO_JUMP + } case ATK_CHARACTER_STATE_ATK1: thatPlayerInNextFrame.CharacterState = ATK_CHARACTER_STATE_INAIR_ATK1 case ATK_CHARACTER_STATE_ATKED1: @@ -624,7 +629,10 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *RingBuffer playerCollider := collisionSysMap[collisionPlayerIndex] // Update "virtual grid position" thatPlayerInNextFrame := nextRenderFramePlayers[i] - thatPlayerInNextFrame.VirtualGridX, thatPlayerInNextFrame.VirtualGridY = PolygonColliderBLToVirtualGridPos(playerCollider.X-effPushbacks[joinIndex-1].X, playerCollider.Y-effPushbacks[joinIndex-1].Y, playerCollider.W*0.5, playerCollider.H*0.5, 0, 0, 0, 0, collisionSpaceOffsetX, collisionSpaceOffsetY, worldToVirtualGridRatio) + thatPlayerInNextFrame.VirtualGridX, thatPlayerInNextFrame.VirtualGridY = PolygonColliderBLToVirtualGridPos(playerCollider.X-effPushbacks[joinIndex-1].X, playerCollider.Y-effPushbacks[joinIndex-1].Y, playerCollider.W*0.5, playerCollider.H*0.5, 0, 0, 0, 0, collisionSpaceOffsetX, collisionSpaceOffsetY, WORLD_TO_VIRTUAL_GRID_RATIO) + if thatPlayerInNextFrame.CharacterState != currPlayerDownsync.CharacterState { + thatPlayerInNextFrame.FramesInChState = 0 + } } return &RoomDownsyncFrame{ diff --git a/jsexport/battle/characterConfig.go b/jsexport/battle/characterConfig.go new file mode 100644 index 0000000..631a575 --- /dev/null +++ b/jsexport/battle/characterConfig.go @@ -0,0 +1,74 @@ +package battle + +var Characters = map[int]*CharacterConfig{ + 0: &CharacterConfig{ + SpeciesId: 0, + SpeciesName: "MonkGirl", + + InAirIdleFrameIdxTurningPoint: 11, + InAirIdleFrameIdxTurnedCycle: 1, + + LayDownFrames: 16, + LayDownFramesToRecover: 16, + + GetUpFrames: 33, + GetUpFramesToRecover: 30, // 3 invinsible frames for just-blown-up character to make a comeback + + JumpingInitVelY: int(float64(8) * WORLD_TO_VIRTUAL_GRID_RATIO), + + PatternIdToSkillId: map[int]int{ + 0: 1, // Atk1 + 1: 2, // InAirAtk1 + }, + }, +} + +var skillIdToBullet = map[int]interface{}{ + 1: &MeleeBullet{ + Bullet: Bullet{ + // for offender + StartupFrames: int32(5), + ActiveFrames: int32(10), + RecoveryFrames: int32(34), + RecoveryFramesOnBlock: int32(34), + RecoveryFramesOnHit: int32(34), + HitboxOffset: float64(12.0), // should be about the radius of the PlayerCollider + + // for defender + HitStunFrames: int32(18), + BlockStunFrames: int32(9), + Pushback: float64(8.0), + ReleaseTriggerType: int32(1), // 1: rising-edge, 2: falling-edge + Damage: int32(5), + + SelfMoveforwardX: 0, + SelfMoveforwardY: 0, + HitboxSizeX: 24.0, + HitboxSizeY: 32.0, + }, + }, + 2: &MeleeBullet{ + Bullet: Bullet{ + // for offender + StartupFrames: int32(3), + ActiveFrames: int32(20), + RecoveryFrames: int32(34), + RecoveryFramesOnBlock: int32(34), + RecoveryFramesOnHit: int32(34), + HitboxOffset: float64(16.0), // should be about the radius of the PlayerCollider + + // for defender + HitStunFrames: int32(18), + BlockStunFrames: int32(9), + Pushback: float64(6.0), + BlowUpVelY: int32(float64(3) * WORLD_TO_VIRTUAL_GRID_RATIO), + ReleaseTriggerType: int32(1), // 1: rising-edge, 2: falling-edge + Damage: int32(5), + + SelfMoveforwardX: 0, + SelfMoveforwardY: 0, + HitboxSizeX: 32.0, + HitboxSizeY: 24.0, + }, + }, +} diff --git a/jsexport/battle/room_downsync_frame.go b/jsexport/battle/room_downsync_frame.go index 3bc65a7..ca047cd 100644 --- a/jsexport/battle/room_downsync_frame.go +++ b/jsexport/battle/room_downsync_frame.go @@ -28,6 +28,7 @@ type PlayerDownsync struct { Score int32 LastMoveGmtMillis int32 FramesToRecover int32 + FramesInChState int32 Hp int32 MaxHp int32 CharacterState int32 @@ -60,6 +61,7 @@ type Bullet struct { RecoveryFramesOnHit int32 HitboxOffset float64 OriginatedRenderFrameId int32 + // for defender HitStunFrames int32 BlockStunFrames int32 @@ -73,6 +75,8 @@ type Bullet struct { SelfMoveforwardY float64 HitboxSizeX float64 HitboxSizeY float64 + + BlowUpVelY int32 } type MeleeBullet struct { @@ -90,6 +94,10 @@ type FireballBullet struct { Bullet } +type Skill struct { + Hits []Bullet // Hits within a "Skill" are automatically triggered +} + type RoomDownsyncFrame struct { Id int32 PlayersArr []*PlayerDownsync @@ -106,3 +114,21 @@ type InputFrameDownsync struct { InputList []uint64 ConfirmedList uint64 } + +type CharacterConfig struct { + SpeciesId int + SpeciesName string + + InAirIdleFrameIdxTurningPoint int + InAirIdleFrameIdxTurnedCycle int + + LayDownFrames int + LayDownFramesToRecover int + + GetUpFrames int + GetUpFramesToRecover int + + JumpingInitVelY int + + PatternIdToSkillId map[int]int +} diff --git a/jsexport/main.go b/jsexport/main.go index 6f6cf68..c8770eb 100644 --- a/jsexport/main.go +++ b/jsexport/main.go @@ -42,7 +42,7 @@ func NewBarrierJs(boundary *Polygon2D) *js.Object { }) } -func NewPlayerDownsyncJs(id, virtualGridX, virtualGridY, dirX, dirY, velX, velY, framesToRecover, speed, battleState, characterState, joinIndex, hp, maxHp int32, inAir bool, colliderRadius float64) *js.Object { +func NewPlayerDownsyncJs(id, virtualGridX, virtualGridY, dirX, dirY, velX, velY, framesToRecover, framesInChState, speed, battleState, characterState, joinIndex, hp, maxHp int32, inAir bool, colliderRadius float64) *js.Object { return js.MakeWrapper(&PlayerDownsync{ Id: id, VirtualGridX: virtualGridX, @@ -52,6 +52,7 @@ func NewPlayerDownsyncJs(id, virtualGridX, virtualGridY, dirX, dirY, velX, velY, VelX: velX, VelY: velY, FramesToRecover: framesToRecover, + FramesInChState: framesInChState, Speed: speed, BattleState: battleState, JoinIndex: joinIndex, @@ -129,25 +130,34 @@ func GenerateConvexPolygonColliderJs(unalignedSrc *Polygon2D, spaceOffsetX, spac return js.MakeFullWrapper(GenerateConvexPolygonCollider(unalignedSrc, spaceOffsetX, spaceOffsetY, data, tag)) } -func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs(inputsBuffer *RingBuffer, currRenderFrame *RoomDownsyncFrame, collisionSys *resolv.Space, collisionSysMap map[int32]*resolv.Object, gravityX, gravityY, jumpingInitVelY, inputDelayFrames int32, inputScaleFrames uint32, collisionSpaceOffsetX, collisionSpaceOffsetY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, worldToVirtualGridRatio, virtualGridToWorldRatio float64, playerOpPatternToSkillId map[int]int) *js.Object { +func GetCharacterConfigsOrderedByJoinIndex(speciesIdList []int) []*js.Object { + ret := make([]*js.Object, len(speciesIdList), len(speciesIdList)) + for i, speciesId := range speciesIdList { + ret[i] = js.MakeFullWrapper(Characters[speciesId]) + } + return ret +} + +func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs(inputsBuffer *RingBuffer, currRenderFrame *RoomDownsyncFrame, collisionSys *resolv.Space, collisionSysMap map[int32]*resolv.Object, collisionSpaceOffsetX, collisionSpaceOffsetY float64, playerOpPatternToSkillId map[int]int, chConfigsOrderedByJoinIndex []*CharacterConfig) *js.Object { // We need access to all fields of RoomDownsyncFrame for displaying in frontend - return js.MakeFullWrapper(ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer, currRenderFrame, collisionSys, collisionSysMap, gravityX, gravityY, jumpingInitVelY, inputDelayFrames, inputScaleFrames, collisionSpaceOffsetX, collisionSpaceOffsetY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, worldToVirtualGridRatio, virtualGridToWorldRatio, playerOpPatternToSkillId)) + return js.MakeFullWrapper(ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer, currRenderFrame, collisionSys, collisionSysMap, collisionSpaceOffsetX, collisionSpaceOffsetY, playerOpPatternToSkillId, chConfigsOrderedByJoinIndex)) } func main() { js.Global.Set("gopkgs", map[string]interface{}{ - "NewVec2DJs": NewVec2DJs, - "NewPolygon2DJs": NewPolygon2DJs, - "NewBarrierJs": NewBarrierJs, - "NewPlayerDownsyncJs": NewPlayerDownsyncJs, - "NewMeleeBulletJs": NewMeleeBulletJs, - "NewRoomDownsyncFrameJs": NewRoomDownsyncFrameJs, - "NewCollisionSpaceJs": NewCollisionSpaceJs, - "NewInputFrameDownsync": NewInputFrameDownsync, - "NewRingBufferJs": NewRingBufferJs, - "GenerateRectColliderJs": GenerateRectColliderJs, - "GenerateConvexPolygonColliderJs": GenerateConvexPolygonColliderJs, - "GetCollisionSpaceObjsJs": GetCollisionSpaceObjsJs, + "NewVec2DJs": NewVec2DJs, + "NewPolygon2DJs": NewPolygon2DJs, + "NewBarrierJs": NewBarrierJs, + "NewPlayerDownsyncJs": NewPlayerDownsyncJs, + "NewMeleeBulletJs": NewMeleeBulletJs, + "NewRoomDownsyncFrameJs": NewRoomDownsyncFrameJs, + "NewCollisionSpaceJs": NewCollisionSpaceJs, + "NewInputFrameDownsync": NewInputFrameDownsync, + "NewRingBufferJs": NewRingBufferJs, + "GenerateRectColliderJs": GenerateRectColliderJs, + "GenerateConvexPolygonColliderJs": GenerateConvexPolygonColliderJs, + "GetCollisionSpaceObjsJs": GetCollisionSpaceObjsJs, + "GetCharacterConfigsOrderedByJoinIndex": GetCharacterConfigsOrderedByJoinIndex, "ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs": ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs, "WorldToPolygonColliderBLPos": WorldToPolygonColliderBLPos, // No need to wrap primitive return types "PolygonColliderBLToWorldPos": PolygonColliderBLToWorldPos, diff --git a/resolv_tailored/object.go b/resolv_tailored/object.go index e990d44..918917f 100644 --- a/resolv_tailored/object.go +++ b/resolv_tailored/object.go @@ -285,27 +285,27 @@ func (obj *Object) Check(dx, dy float64, tags ...string) *Collision { } /* - // In my use case, order of objects within a collision instance is not needed, and this also favors both runtime performance & size reduction of `jsexport.js`. + // In my use case, order of objects within a collision instance is not needed, and this also favors both runtime performance & size reduction of `jsexport.js`. - ox, oy := cc.checkingObject.Center() - oc := Vector{ox, oy} - sort.Slice(cc.Objects, func(i, j int) bool { + ox, oy := cc.checkingObject.Center() + oc := Vector{ox, oy} + sort.Slice(cc.Objects, func(i, j int) bool { - ix, iy := cc.Objects[i].Center() - jx, jy := cc.Objects[j].Center() - return Vector{ix, iy}.Sub(oc).Magnitude2() < Vector{jx, jy}.Sub(oc).Magnitude2() + ix, iy := cc.Objects[i].Center() + jx, jy := cc.Objects[j].Center() + return Vector{ix, iy}.Sub(oc).Magnitude2() < Vector{jx, jy}.Sub(oc).Magnitude2() - }) + }) - cw := cc.checkingObject.Space.CellWidth - ch := cc.checkingObject.Space.CellHeight + cw := cc.checkingObject.Space.CellWidth + ch := cc.checkingObject.Space.CellHeight - sort.Slice(cc.Cells, func(i, j int) bool { + sort.Slice(cc.Cells, func(i, j int) bool { - return Vector{float64(cc.Cells[i].X*cw + (cw / 2)), float64(cc.Cells[i].Y*ch + (ch / 2))}.Sub(oc).Magnitude2() < - Vector{float64(cc.Cells[j].X*cw + (cw / 2)), float64(cc.Cells[j].Y*ch + (ch / 2))}.Sub(oc).Magnitude2() + return Vector{float64(cc.Cells[i].X*cw + (cw / 2)), float64(cc.Cells[i].Y*ch + (ch / 2))}.Sub(oc).Magnitude2() < + Vector{float64(cc.Cells[j].X*cw + (cw / 2)), float64(cc.Cells[j].Y*ch + (ch / 2))}.Sub(oc).Magnitude2() - }) + }) */ return cc