diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/Assets/LayoutOverlay.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/Assets/LayoutOverlay.meta new file mode 100644 index 0000000000000000000000000000000000000000..1d3813f75f58529775c9d1b8e90b96b4170ed4bd --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/Assets/LayoutOverlay.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4817dc4ea8764f74298414d8ac0bb8d5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/Assets/SkinningModule.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/Assets/SkinningModule.meta new file mode 100644 index 0000000000000000000000000000000000000000..6f7676825a93d68d3116b3a9fab147ff8a95bda1 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/Assets/SkinningModule.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4fccdb4aa9dd0db43becdec2eea211af +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/BoneDrawingUtility.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/BoneDrawingUtility.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..31796a85d4bdc005458681056c13d8e7ffd115b2 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/BoneDrawingUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4e0025ed472de854692946726304a452 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache.meta new file mode 100644 index 0000000000000000000000000000000000000000..61555774ae8a449b40a3b7566ac915c4a636ee47 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/Cache.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d59ac20961f9b95419fd53d6c9663903 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CharacterModeTool.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CharacterModeTool.meta new file mode 100644 index 0000000000000000000000000000000000000000..f61b4d915f9ec849743e13442d3edee30c53ad74 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CharacterModeTool.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6735c3e859fb15b4191b28f225534760 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ColorExtensions.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ColorExtensions.cs new file mode 100644 index 0000000000000000000000000000000000000000..8b15667715cc2afde9941ea491c4bdbd3ddec20d --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ColorExtensions.cs @@ -0,0 +1,13 @@ +using System; +using UnityEngine; + +namespace UnityEditor.U2D.Animation +{ + internal static class ColorExtensions + { + public static Color AlphaMultiplied(this Color c, float multiplier) + { + return new Color(c.r, c.g, c.b, c.a * multiplier); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ColorExtensions.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ColorExtensions.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0f11b6ed32c3a759b5102613be06240d0094dc7d --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ColorExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 10889aecec5b6ee41a2a1626c4cfc07c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CopyTool.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CopyTool.cs new file mode 100644 index 0000000000000000000000000000000000000000..8e19875c0f5692be830035791dfd13cb8822b97c --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CopyTool.cs @@ -0,0 +1,661 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +using UnityEditor.U2D.Layout; +using UnityEngine.U2D; + +namespace UnityEditor.U2D.Animation +{ + internal interface ICopyToolStringStore + { + string stringStore + { + get; + set; + } + } + + internal class SystemCopyBufferStringStore : ICopyToolStringStore + { + public string stringStore + { + get { return EditorGUIUtility.systemCopyBuffer; } + set { EditorGUIUtility.systemCopyBuffer = value; } + } + } + + internal class CopyTool : MeshToolWrapper + { + public class NewBonesStore + { + public BoneCache[] newBones; + public Dictionary newBoneNameDict; + public NewBonesStore() + { + newBones = null; + newBoneNameDict = new Dictionary(); + } + + public void MapAllExistingBones() + { + foreach (var bone in newBones) + newBoneNameDict.Add(bone.name, bone.name); + } + } + + private ICopyToolStringStore m_CopyToolStringStore; + private CopyToolView m_CopyToolView; + + public float pixelsPerUnit + { + private get; + set; + } + + public ICopyToolStringStore copyToolStringStore + { + set { m_CopyToolStringStore = value; } + } + + internal override void OnCreate() + { + m_CopyToolView = new CopyToolView(); + m_CopyToolView.onPasteActivated += OnPasteActivated; + m_CopyToolStringStore = new SystemCopyBufferStringStore(); + disableMeshEditor = true; + } + + public override void Initialize(LayoutOverlay layout) + { + m_CopyToolView.Initialize(layout); + } + + protected override void OnActivate() + { + base.OnActivate(); + m_CopyToolView.Show(); + } + + protected override void OnDeactivate() + { + base.OnDeactivate(); + m_CopyToolView.Hide(); + } + + private void CopyMeshFromSpriteCache(SpriteCache sprite, SkinningCopySpriteData skinningSpriteData) + { + if (meshTool == null) + return; + + meshTool.SetupSprite(sprite); + skinningSpriteData.vertices = meshTool.mesh.vertices; + skinningSpriteData.indices = meshTool.mesh.indices; + skinningSpriteData.edges = meshTool.mesh.edges; + skinningSpriteData.boneWeightNames = new List(); + foreach (var bone in meshTool.mesh.bones) + { + skinningSpriteData.boneWeightNames.Add(bone.name); + } + } + + public void OnCopyActivated() + { + SkinningCopyData skinningCopyData; + var selectedSprite = skinningCache.selectedSprite; + if (selectedSprite == null) + { + skinningCopyData = CopyAll(); + } + else + { + skinningCopyData = CopySingle(selectedSprite); + } + + if (skinningCopyData != null) + m_CopyToolStringStore.stringStore = SkinningCopyUtility.SerializeSkinningCopyDataToString(skinningCopyData); + skinningCache.events.copy.Invoke(); + } + + public SkinningCopyData CopyAll() + { + var skinningCopyData = new SkinningCopyData(); + skinningCopyData.pixelsPerUnit = pixelsPerUnit; + + var sprites = skinningCache.GetSprites(); + foreach (var sprite in sprites) + { + var skinningSpriteData = new SkinningCopySpriteData(); + skinningSpriteData.spriteName = sprite.name; + + var skeleton = skinningCache.GetEffectiveSkeleton(sprite); + if (skeleton != null && skeleton.BoneCount > 0) + { + if (skinningCache.hasCharacter) + { + // Order doesn't matter for character bones + skinningSpriteData.spriteBones = skeleton.bones.ToSpriteBone(Matrix4x4.identity).Select(x => new SpriteBoneCopyData() + { + spriteBone = x, + order = -1 + }).ToList(); + } + + else + { + skinningSpriteData.spriteBones = new List(); + var bones = skeleton.bones.FindRoots(); + foreach (var bone in bones) + GetSpriteBoneDataRecursively(skinningSpriteData.spriteBones, bone, skeleton.bones.ToList()); + } + } + if (meshTool != null) + { + CopyMeshFromSpriteCache(sprite, skinningSpriteData); + } + skinningCopyData.copyData.Add(skinningSpriteData); + } + + if (meshTool != null) + { + meshTool.SetupSprite(null); + } + + return skinningCopyData; + } + + public SkinningCopyData CopySingle(SpriteCache sprite) + { + var skinningCopyData = new SkinningCopyData(); + skinningCopyData.pixelsPerUnit = pixelsPerUnit; + + // Mesh + var skinningSpriteData = new SkinningCopySpriteData(); + skinningCopyData.copyData.Add(skinningSpriteData); + + CopyMeshFromSpriteCache(sprite, skinningSpriteData); + + // Bones + var rootBones = new List(); + BoneCache[] boneCache = null; + if (skinningCache.hasCharacter) + { + var characterPart = skinningCache.GetCharacterPart(sprite); + if (characterPart != null && characterPart.bones != null) + { + boneCache = characterPart.bones; + var bones = characterPart.bones.FindRoots(); + foreach (var bone in bones) + rootBones.Add(bone); + } + } + else + { + var skeleton = skinningCache.GetEffectiveSkeleton(sprite); + if (skeleton != null && skeleton.BoneCount > 0) + { + boneCache = skeleton.bones; + var bones = boneCache.FindRoots(); + foreach (var bone in bones) + rootBones.Add(bone); + } + } + + if (rootBones.Count > 0) + { + skinningSpriteData.spriteBones = new List(); + foreach (var rootBone in rootBones) + { + var rootBoneIndex = skinningSpriteData.spriteBones.Count; + GetSpriteBoneDataRecursively(skinningSpriteData.spriteBones, rootBone, boneCache.ToList()); + if (skinningCache.hasCharacter) + { + // Offset the bones based on the currently selected Sprite in Character mode + var characterPart = sprite.GetCharacterPart(); + if (characterPart != null) + { + var offset = characterPart.position; + var rootSpriteBone = skinningSpriteData.spriteBones[rootBoneIndex]; + rootSpriteBone.spriteBone.position = rootSpriteBone.spriteBone.position - offset; + skinningSpriteData.spriteBones[rootBoneIndex] = rootSpriteBone; + } + } + } + } + + return skinningCopyData; + } + + private void GetSpriteBoneDataRecursively(List bones, BoneCache rootBone, List boneCache) + { + AppendSpriteBoneDataRecursively(bones, rootBone, -1, boneCache); + } + + private void AppendSpriteBoneDataRecursively(List spriteBones, BoneCache bone, int parentIndex, List boneCache) + { + int currentParentIndex = spriteBones.Count; + + var boneCopyData = new SpriteBoneCopyData() + { + spriteBone = new SpriteBone() + { + name = bone.name, + parentId = parentIndex + }, + order = boneCache.FindIndex(x => x == bone) + }; + if (boneCopyData.order < 0) + { + boneCopyData.order = boneCache.Count; + boneCache.Add(bone); + } + + if (parentIndex == -1 && bone.parentBone != null) + { + boneCopyData.spriteBone.position = bone.position; + boneCopyData.spriteBone.rotation = bone.rotation; + } + else + { + boneCopyData.spriteBone.position = bone.localPosition; + boneCopyData.spriteBone.rotation = bone.localRotation; + } + boneCopyData.spriteBone.position = new Vector3(boneCopyData.spriteBone.position.x, boneCopyData.spriteBone.position.y, bone.depth); + + boneCopyData.spriteBone.length = bone.localLength; + spriteBones.Add(boneCopyData); + foreach (var child in bone) + { + var childBone = child as BoneCache; + if (childBone != null) + AppendSpriteBoneDataRecursively(spriteBones, childBone, currentParentIndex, boneCache); + } + } + + public void OnPasteActivated(bool bone, bool mesh, bool flipX, bool flipY) + { + var copyBuffer = m_CopyToolStringStore.stringStore; + if (!SkinningCopyUtility.CanDeserializeStringToSkinningCopyData(copyBuffer)) + { + Debug.LogError(TextContent.copyError1); + return; + } + + var skinningCopyData = SkinningCopyUtility.DeserializeStringToSkinningCopyData(copyBuffer); + if (skinningCopyData == null || skinningCopyData.copyData.Count == 0) + { + Debug.LogError(TextContent.copyError2); + return; + } + + var scale = 1f; + if (skinningCopyData.pixelsPerUnit > 0f) + scale = pixelsPerUnit / skinningCopyData.pixelsPerUnit; + + var sprites = skinningCache.GetSprites(); + var copyMultiple = skinningCopyData.copyData.Count > 1; + if (copyMultiple && skinningCopyData.copyData.Count != sprites.Length && mesh) + { + Debug.LogError(String.Format(TextContent.copyError3, sprites.Length, skinningCopyData.copyData.Count)); + return; + } + + using (skinningCache.UndoScope(TextContent.pasteData)) + { + NewBonesStore newBonesStore = null; + if (bone && copyMultiple && skinningCache.hasCharacter) + { + newBonesStore = new NewBonesStore(); + var skinningSpriteData = skinningCopyData.copyData[0]; + newBonesStore.newBones = skinningCache.CreateBoneCacheFromSpriteBones(skinningSpriteData.spriteBones.Select(y => y.spriteBone).ToArray(), scale); + if (flipX || flipY) + { + var characterRect = new Rect(Vector2.zero, skinningCache.character.dimension); + var newPositions = new Vector3[newBonesStore.newBones.Length]; + var newRotations = new Quaternion[newBonesStore.newBones.Length]; + for (var i = 0; i < newBonesStore.newBones.Length; ++i) + { + newPositions[i] = GetFlippedBonePosition(newBonesStore.newBones[i], Vector2.zero, characterRect, flipX, flipY); + newRotations[i] = GetFlippedBoneRotation(newBonesStore.newBones[i], flipX, flipY); + } + for (var i = 0; i < newBonesStore.newBones.Length; ++i) + { + newBonesStore.newBones[i].position = newPositions[i]; + newBonesStore.newBones[i].rotation = newRotations[i]; + } + } + newBonesStore.MapAllExistingBones(); + var skeleton = skinningCache.character.skeleton; + skeleton.SetBones(newBonesStore.newBones); + skinningCache.events.skeletonTopologyChanged.Invoke(skeleton); + } + + foreach (var skinningSpriteData in skinningCopyData.copyData) + { + SpriteCache sprite = null; + if (!String.IsNullOrEmpty(skinningSpriteData.spriteName)) + { + sprite = sprites.FirstOrDefault(x => x.name == skinningSpriteData.spriteName); + } + if (sprite == null && (skinningCopyData.copyData.Count == 1 || String.IsNullOrEmpty(skinningSpriteData.spriteName))) + { + sprite = skinningCache.selectedSprite; + } + if (sprite == null) + continue; + + if (bone && (!skinningCache.hasCharacter || !copyMultiple)) + { + var spriteBones = new SpriteBone[skinningSpriteData.spriteBones.Count]; + for (int i = 0; i < skinningSpriteData.spriteBones.Count; ++i) + { + var order = skinningSpriteData.spriteBones[i].order; + spriteBones[order] = skinningSpriteData.spriteBones[i].spriteBone; + var parentId = spriteBones[order].parentId; + if (parentId >= 0) + { + spriteBones[order].parentId = skinningSpriteData.spriteBones[parentId].order; + } + } + newBonesStore = PasteSkeletonBones(sprite, spriteBones.ToList(), flipX, flipY, scale); + } + + if (mesh && meshTool != null) + { + PasteMesh(sprite, skinningSpriteData, flipX, flipY, scale, newBonesStore); + } + } + + if (newBonesStore != null && newBonesStore.newBones != null) + { + skinningCache.skeletonSelection.elements = newBonesStore.newBones; + skinningCache.events.boneSelectionChanged.Invoke(); + } + } + skinningCache.events.paste.Invoke(bone, mesh, flipX, flipY); + } + + private Vector3 GetFlippedBonePosition(BoneCache bone, Vector2 startPosition, Rect spriteRect + , bool flipX, bool flipY) + { + Vector3 position = startPosition; + if (flipX) + { + position.x += spriteRect.width - bone.position.x; + } + else + { + position.x += bone.position.x; + } + + if (flipY) + { + position.y += spriteRect.height - bone.position.y; + } + else + { + position.y += bone.position.y; + } + + position.z = bone.position.z; + return position; + } + + private Quaternion GetFlippedBoneRotation(BoneCache bone, bool flipX, bool flipY) + { + var euler = bone.rotation.eulerAngles; + if (flipX) + { + if (euler.z <= 180) + { + euler.z = 180 - euler.z; + } + else + { + euler.z = 540 - euler.z; + } + } + if (flipY) + { + euler.z = 360 - euler.z; + } + return Quaternion.Euler(euler); + } + + void SetBonePositionAndRotation(BoneCache[] boneCache, TransformCache bone, Vector3[] position, Quaternion[] rotation) + { + var index = Array.FindIndex(boneCache, x => x == bone); + if (index >= 0) + { + bone.position = position[index]; + bone.rotation = rotation[index]; + } + foreach (var child in bone.children) + { + SetBonePositionAndRotation(boneCache, child, position, rotation); + } + } + + public NewBonesStore PasteSkeletonBones(SpriteCache sprite, List spriteBones, bool flipX, bool flipY, float scale = 1.0f) + { + NewBonesStore newBonesStore = new NewBonesStore(); + newBonesStore.newBones = skinningCache.CreateBoneCacheFromSpriteBones(spriteBones.ToArray(), scale); + if (newBonesStore.newBones.Length == 0) + return null; + + if (sprite == null || (skinningCache.mode == SkinningMode.SpriteSheet && skinningCache.hasCharacter)) + return null; + + var spriteRect = sprite.textureRect; + var skeleton = skinningCache.GetEffectiveSkeleton(sprite); + + var rectPosition = spriteRect.position; + if (skinningCache.mode == SkinningMode.Character) + { + var characterPart = sprite.GetCharacterPart(); + if (characterPart == null) + return null; + rectPosition = characterPart.position; + } + + var newPositions = new Vector3[newBonesStore.newBones.Length]; + var newRotations = new Quaternion[newBonesStore.newBones.Length]; + for (var i = 0; i < newBonesStore.newBones.Length; ++i) + { + newPositions[i] = GetFlippedBonePosition(newBonesStore.newBones[i], rectPosition, spriteRect, flipX, flipY); + newRotations[i] = GetFlippedBoneRotation(newBonesStore.newBones[i], flipX, flipY); + } + for (var i = 0; i < newBonesStore.newBones.Length; ++i) + { + if(newBonesStore.newBones[i].parent == null) + SetBonePositionAndRotation(newBonesStore.newBones, newBonesStore.newBones[i], newPositions, newRotations); + } + + if (skinningCache.mode == SkinningMode.SpriteSheet) + { + newBonesStore.MapAllExistingBones(); + skeleton.SetBones(newBonesStore.newBones); + } + else + { + var existingBoneNames = skeleton.bones.Select(x => x.name).ToList(); + + skeleton.AddBones(newBonesStore.newBones); + + var bones = skeleton.bones; + + // Update names of all newly pasted bones + foreach (var bone in newBonesStore.newBones) + { + if (existingBoneNames.Contains(bone.name)) + { + var oldBoneName = bone.name; + bone.name = SkeletonController.AutoBoneName(bone.parentBone, bones); + existingBoneNames.Add(bone.name); + newBonesStore.newBoneNameDict.Add(oldBoneName, bone.name); + } + else + { + newBonesStore.newBoneNameDict.Add(bone.name, bone.name); + } + } + + skeleton.SetDefaultPose(); + } + + skinningCache.events.skeletonTopologyChanged.Invoke(skeleton); + return newBonesStore; + } + + public void PasteMesh(SpriteCache sprite, SkinningCopySpriteData skinningSpriteData, bool flipX, bool flipY, float scale, NewBonesStore newBonesStore) + { + if (sprite == null) + return; + + meshTool.SetupSprite(sprite); + meshTool.mesh.vertices = skinningSpriteData.vertices; + if (!Mathf.Approximately(scale, 1f) || flipX || flipY) + { + var spriteRect = sprite.textureRect; + foreach (var vertex in meshTool.mesh.vertices) + { + var position = vertex.position; + if (!Mathf.Approximately(scale, 1f)) + position = position * scale; + if (flipX) + position.x = spriteRect.width - vertex.position.x; + if (flipY) + position.y = spriteRect.height - vertex.position.y; + vertex.position = position; + } + } + meshTool.mesh.indices = skinningSpriteData.indices; + meshTool.mesh.edges = skinningSpriteData.edges; + + int[] copyBoneToNewBones = new int[skinningSpriteData.boneWeightNames.Count]; + BoneCache[] setBones = null; + + if (newBonesStore != null && newBonesStore.newBones != null) + { + // Update bone weights with new bone indices + var setBonesList = new List(); + copyBoneToNewBones = new int[skinningSpriteData.boneWeightNames.Count]; + int index = 0; + for (int i = 0; i < skinningSpriteData.boneWeightNames.Count; ++i) + { + string oldBoneName = skinningSpriteData.boneWeightNames[i]; + string newBoneName; + newBonesStore.newBoneNameDict.TryGetValue(oldBoneName, out newBoneName); + var newBone = newBonesStore.newBones.FirstOrDefault(bone => bone.name == newBoneName); + copyBoneToNewBones[i] = -1; + if (newBone == null) + continue; + + for (int j = 0; j < skinningSpriteData.spriteBones.Count; ++j) + { + if (skinningSpriteData.spriteBones[j].spriteBone.name == oldBoneName) + { + copyBoneToNewBones[i] = index++; + setBonesList.Add(newBone); + break; + } + } + } + setBones = setBonesList.ToArray(); + } + else + { + // Attempt to link weights based on existing bone names + var skeleton = skinningCache.GetEffectiveSkeleton(sprite); + var characterBones = new List(); + for (int i = 0; i < skinningSpriteData.boneWeightNames.Count; ++i) + { + copyBoneToNewBones[i] = -1; + var boneName = skinningSpriteData.boneWeightNames[i]; + for (int j = 0; j < skeleton.bones.Length; ++j) + { + if (skeleton.bones[j].name == boneName) + { + copyBoneToNewBones[i] = characterBones.Count; + characterBones.Add(skeleton.bones[j]); + break; + } + } + } + setBones = characterBones.ToArray(); + } + + // Remap new bone indexes from copied bone indexes + foreach (var vertex in meshTool.mesh.vertices) + { + var editableBoneWeight = vertex.editableBoneWeight; + + for (var i = 0; i < editableBoneWeight.Count; ++i) + { + if (!editableBoneWeight[i].enabled) + continue; + + if (copyBoneToNewBones.Length > editableBoneWeight[i].boneIndex) + { + var boneIndex = copyBoneToNewBones[editableBoneWeight[i].boneIndex]; + if (boneIndex != -1) + editableBoneWeight[i].boneIndex = boneIndex; + } + } + } + + // Update associated bones for mesh + meshTool.mesh.SetCompatibleBoneSet(setBones); + meshTool.mesh.bones = setBones; // Fixes weights for bones that do not exist + + // Update associated bones for character + if (skinningCache.hasCharacter) + { + var characterPart = sprite.GetCharacterPart(); + if (characterPart != null) + { + characterPart.bones = setBones; + skinningCache.events.characterPartChanged.Invoke(characterPart); + } + } + + meshTool.UpdateMesh(); + } + } + + internal class CopyToolView + { + private PastePanel m_PastePanel; + + public event Action onPasteActivated = (bone, mesh, flipX, flipY) => {}; + + public void Show() + { + m_PastePanel.SetHiddenFromLayout(false); + } + + public void Hide() + { + m_PastePanel.SetHiddenFromLayout(true); + } + + public void Initialize(LayoutOverlay layoutOverlay) + { + m_PastePanel = PastePanel.GenerateFromUXML(); + BindElements(); + layoutOverlay.rightOverlay.Add(m_PastePanel); + m_PastePanel.SetHiddenFromLayout(true); + } + + void BindElements() + { + m_PastePanel.onPasteActivated += OnPasteActivated; + } + + void OnPasteActivated(bool bone, bool mesh, bool flipX, bool flipY) + { + onPasteActivated(bone, mesh, flipX, flipY); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CopyTool.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CopyTool.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..21b0e6d54309c0c5e31a72c7c85d2b4076f0d17e --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/CopyTool.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 311e00422db8e4949bf926b0d039e05e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/DefaultPoseScope.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/DefaultPoseScope.cs new file mode 100644 index 0000000000000000000000000000000000000000..a3df70692b2f42c906a07592c8c05cfceeeb4e1f --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/DefaultPoseScope.cs @@ -0,0 +1,55 @@ +using System; +using UnityEngine; + +namespace UnityEditor.U2D.Animation +{ + internal class DefaultPoseScope : IDisposable + { + private bool m_Disposed; + private SkeletonCache m_Skeleton; + private BonePose[] m_Pose; + private bool m_DoRestorePose = false; + private bool m_UseLocalPose; + + public DefaultPoseScope(SkeletonCache skeleton, bool useLocalPose = true) + { + Debug.Assert(skeleton != null); + + m_Skeleton = skeleton; + m_UseLocalPose = useLocalPose; + + if (m_Skeleton.isPosePreview) + { + m_DoRestorePose = true; + + if(useLocalPose) + m_Pose = m_Skeleton.GetLocalPose(); + else + m_Pose = m_Skeleton.GetWorldPose(); + + m_Skeleton.RestoreDefaultPose(); + } + } + + ~DefaultPoseScope() + { + if (!m_Disposed) + Debug.LogError("Scope was not disposed! You should use the 'using' keyword or manually call Dispose."); + } + + public void Dispose() + { + if (m_Disposed) + return; + + m_Disposed = true; + if (m_Skeleton != null && m_DoRestorePose) + { + if(m_UseLocalPose) + m_Skeleton.SetLocalPose(m_Pose); + else + m_Skeleton.SetWorldPose(m_Pose); + } + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/DefaultPoseScope.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/DefaultPoseScope.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3ca164b2e2ff86cca49021ab4b42313c0cc1552b --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/DefaultPoseScope.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bee8f4b5ba5b4ee46a3b10bad91b8c97 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/DrawingUtility.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/DrawingUtility.cs new file mode 100644 index 0000000000000000000000000000000000000000..9a363fc96ebbe6ae3038f3b4a0407f45e05d6795 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/DrawingUtility.cs @@ -0,0 +1,261 @@ +using UnityEditor.U2D.Common; +using UnityEngine; + +namespace UnityEditor.U2D.Animation +{ + internal class DrawingUtility + { + public static readonly Color kSpriteBorderColor = new Color(0.25f, 0.5f, 1f, 0.75f); + + public static void DrawLine(Vector3 p1, Vector3 p2, Vector3 normal, float width) + { + DrawLine(p1, p2, normal, width, width); + } + + public static void DrawLine(Vector3 p1, Vector3 p2, Vector3 normal, float widthP1, float widthP2) + { + DrawLine(p1, p2, normal, widthP1, widthP2, Handles.color); + } + + public static void DrawLine(Vector3 p1, Vector3 p2, Vector3 normal, float widthP1, float widthP2, Color color) + { + if (Event.current.type != EventType.Repaint) + return; + + Vector3 up = Vector3.Cross(normal, p2 - p1).normalized; + + Shader.SetGlobalFloat("_HandleSize", 1); + + InternalEditorBridge.ApplyWireMaterial(); + GL.PushMatrix(); + GL.MultMatrix(Handles.matrix); + GL.Begin(4); + GL.Color(color); + GL.Vertex(p1 + up * widthP1 * 0.5f); + GL.Vertex(p1 - up * widthP1 * 0.5f); + GL.Vertex(p2 - up * widthP2 * 0.5f); + GL.Vertex(p1 + up * widthP1 * 0.5f); + GL.Vertex(p2 - up * widthP2 * 0.5f); + GL.Vertex(p2 + up * widthP2 * 0.5f); + GL.End(); + GL.PopMatrix(); + } + + public static void BeginLines(Color color) + { + InternalEditorBridge.ApplyWireMaterial(); + GL.PushMatrix(); + GL.MultMatrix(Handles.matrix); + GL.Begin(GL.LINES); + GL.Color(color); + } + + public static void BeginSolidLines() + { + InternalEditorBridge.ApplyWireMaterial(); + GL.PushMatrix(); + GL.MultMatrix(Handles.matrix); + GL.Begin(GL.TRIANGLES); + } + + public static void EndLines() + { + GL.End(); + GL.PopMatrix(); + } + + public static void DrawLine(Vector3 p1, Vector3 p2) + { + GL.Vertex(p1); + GL.Vertex(p2); + } + + public static void DrawSolidLine(float width, Vector3 p1, Vector3 p2) + { + DrawSolidLine(p1, p2, Vector3.forward, width, width); + } + + public static void DrawSolidLine(Vector3 p1, Vector3 p2, Vector3 normal, float widthP1, float widthP2) + { + GL.Color(Handles.color); + + Vector3 right = Vector3.Cross(normal, p2 - p1).normalized; + + GL.Vertex(p1 + right * widthP1 * 0.5f); + GL.Vertex(p1 - right * widthP1 * 0.5f); + GL.Vertex(p2 - right * widthP2 * 0.5f); + GL.Vertex(p1 + right * widthP1 * 0.5f); + GL.Vertex(p2 - right * widthP2 * 0.5f); + GL.Vertex(p2 + right * widthP2 * 0.5f); + } + + public static void DrawBox(Rect position) + { + Vector3[] points = new Vector3[5]; + int i = 0; + points[i++] = new Vector3(position.xMin, position.yMin, 0f); + points[i++] = new Vector3(position.xMax, position.yMin, 0f); + points[i++] = new Vector3(position.xMax, position.yMax, 0f); + points[i++] = new Vector3(position.xMin, position.yMax, 0f); + + DrawLine(points[0], points[1]); + DrawLine(points[1], points[2]); + DrawLine(points[2], points[3]); + DrawLine(points[3], points[0]); + } + + public static void DrawMesh(Mesh mesh, Material material, Matrix4x4 matrix) + { + Debug.Assert(mesh != null); + Debug.Assert(material != null); + + if (Event.current.type != EventType.Repaint) + return; + + material.SetFloat("_AdjustLinearForGamma", PlayerSettings.colorSpace == ColorSpace.Linear ? 1.0f : 0.0f); + material.SetPass(0); + Graphics.DrawMeshNow(mesh, Handles.matrix * matrix); + } + + public static void DrawGUIStyleCap(int controlID, Vector3 position, Quaternion rotation, float size, GUIStyle guiStyle) + { + if (Event.current.type != EventType.Repaint) + return; + + if (Camera.current && Vector3.Dot(position - Camera.current.transform.position, Camera.current.transform.forward) < 0f) + return; + + Handles.BeginGUI(); + guiStyle.Draw(GetGUIStyleRect(guiStyle, position), GUIContent.none, controlID); + Handles.EndGUI(); + } + + private static Rect GetGUIStyleRect(GUIStyle style, Vector3 position) + { + Vector2 vector = HandleUtility.WorldToGUIPoint(position); + + float fixedWidth = style.fixedWidth; + float fixedHeight = style.fixedHeight; + + return new Rect(vector.x - fixedWidth / 2f, vector.y - fixedHeight / 2f, fixedWidth, fixedHeight); + } + + public static void DrawRect(Rect rect, Vector3 position, Quaternion rotation, Color color, float rectAlpha, float outlineAlpha) + { + if (Event.current.type != EventType.Repaint) + return; + + Vector3[] corners = new Vector3[4]; + for (int i = 0; i < 4; i++) + { + Vector3 point = GetLocalRectPoint(rect, i); + corners[i] = rotation * point + position; + } + + Vector3[] points = new Vector3[] + { + corners[0], + corners[1], + corners[2], + corners[3], + corners[0] + }; + + Color l_color = Handles.color; + Handles.color = color; + + Vector2 offset = new Vector2(1f, 1f); + + if (!Camera.current) + { + offset.y *= -1; + } + + Handles.DrawSolidRectangleWithOutline(points, new Color(1f, 1f, 1f, rectAlpha), new Color(1f, 1f, 1f, outlineAlpha)); + + Handles.color = l_color; + } + + private static Vector2 GetLocalRectPoint(Rect rect, int index) + { + switch (index) + { + case (0): return new Vector2(rect.xMin, rect.yMax); + case (1): return new Vector2(rect.xMax, rect.yMax); + case (2): return new Vector2(rect.xMax, rect.yMin); + case (3): return new Vector2(rect.xMin, rect.yMin); + } + return Vector3.zero; + } + + private static void SetDiscSectionPoints(Vector3[] dest, int count, Vector3 normal, Vector3 from, float angle) + { + from.Normalize(); + Quaternion rotation = Quaternion.AngleAxis(angle / (float)(count - 1), normal); + Vector3 vector = from; + for (int i = 0; i < count; i++) + { + dest[i] = vector; + vector = rotation * vector; + } + } + + static Vector3[] s_array; + public static void DrawSolidArc(Vector3 center, Vector3 normal, Vector3 from, float angle, float radius, int numSamples = 60) + { + if (Event.current.type != EventType.Repaint) + return; + + numSamples = Mathf.Clamp(numSamples, 3, 60); + + if (s_array == null) + s_array = new Vector3[60]; + + Color color = Handles.color; + SetDiscSectionPoints(s_array, numSamples, normal, from, angle); + InternalEditorBridge.ApplyWireMaterial(); + GL.PushMatrix(); + GL.MultMatrix(Handles.matrix); + GL.Begin(GL.TRIANGLES); + for (int i = 1; i < numSamples; i++) + { + GL.Color(color); + GL.Vertex(center); + GL.Vertex(center + s_array[i - 1] * radius); + GL.Vertex(center + s_array[i] * radius); + } + GL.End(); + GL.PopMatrix(); + } + + public static void DrawSolidArc(Vector3 center, Vector3 normal, Vector3 from, float angle, float radius, float outlineScale, int numSamples = 60) + { + if (Event.current.type != EventType.Repaint) + return; + + numSamples = Mathf.Clamp(numSamples, 3, 60); + + if(s_array == null) + s_array = new Vector3[60]; + + Color color = Handles.color; + SetDiscSectionPoints(s_array, numSamples, normal, from, angle); + InternalEditorBridge.ApplyWireMaterial(); + GL.PushMatrix(); + GL.MultMatrix(Handles.matrix); + GL.Begin(4); + for (int i = 1; i < numSamples; i++) + { + GL.Color(color); + GL.Vertex(center + s_array[i - 1] * radius * outlineScale); + GL.Vertex(center + s_array[i - 1] * radius); + GL.Vertex(center + s_array[i] * radius); + GL.Vertex(center + s_array[i - 1] * radius * outlineScale); + GL.Vertex(center + s_array[i] * radius); + GL.Vertex(center + s_array[i] * radius * outlineScale); + } + GL.End(); + GL.PopMatrix(); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/DrawingUtility.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/DrawingUtility.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0243f063dfca7c9e27e859551cc4e07020dcc8a6 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/DrawingUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9b3f77b5965944b8ba5c1beefa1eb533 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/GenerateGeometryTool.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/GenerateGeometryTool.cs new file mode 100644 index 0000000000000000000000000000000000000000..1093e9ca69848a0977f79c83d311dcac62d1c5b2 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/GenerateGeometryTool.cs @@ -0,0 +1,215 @@ +using System; +using UnityEditor.U2D.Layout; +using UnityEngine; + +namespace UnityEditor.U2D.Animation +{ + internal class GenerateGeometryTool : MeshToolWrapper + { + private const float kWeightTolerance = 0.1f; + private SpriteMeshDataController m_SpriteMeshDataController = new SpriteMeshDataController(); + private ITriangulator m_Triangulator; + private IOutlineGenerator m_OutlineGenerator; + private IWeightsGenerator m_WeightGenerator; + private GenerateGeometryPanel m_GenerateGeometryPanel; + + internal override void OnCreate() + { + m_Triangulator = new Triangulator(); + m_OutlineGenerator = new OutlineGenerator(); + m_WeightGenerator = new BoundedBiharmonicWeightsGenerator(); + } + + public override void Initialize(LayoutOverlay layout) + { + base.Initialize(layout); + + m_GenerateGeometryPanel = GenerateGeometryPanel.GenerateFromUXML(); + m_GenerateGeometryPanel.skinningCache = skinningCache; + + layout.rightOverlay.Add(m_GenerateGeometryPanel); + + BindElements(); + Hide(); + } + + private void BindElements() + { + Debug.Assert(m_GenerateGeometryPanel != null); + + m_GenerateGeometryPanel.onAutoGenerateGeometry += (float d, byte a, float s) => + { + var selectedSprite = skinningCache.selectedSprite; + + if (selectedSprite != null) + { + EditorUtility.DisplayProgressBar(TextContent.generatingGeometry, selectedSprite.name, 0f); + + using (skinningCache.UndoScope(TextContent.generateGeometry)) + { + GenerateGeometry(selectedSprite, d / 100f, a, s); + + if (m_GenerateGeometryPanel.generateWeights) + { + EditorUtility.DisplayProgressBar(TextContent.generatingWeights, selectedSprite.name, 1f); + GenerateWeights(selectedSprite); + } + + skinningCache.vertexSelection.Clear(); + skinningCache.events.meshChanged.Invoke(selectedSprite.GetMesh()); + } + + EditorUtility.ClearProgressBar(); + } + }; + + m_GenerateGeometryPanel.onAutoGenerateGeometryAll += (float d, byte a, float s) => + { + var sprites = skinningCache.GetSprites(); + + using (skinningCache.UndoScope(TextContent.generateGeometry)) + { + for (var i = 0; i < sprites.Length; ++i) + { + var sprite = sprites[i]; + + if (!sprite.IsVisible()) + continue; + + EditorUtility.DisplayProgressBar(TextContent.generateGeometry, sprite.name, i * 2f / (sprites.Length * 2f)); + + GenerateGeometry(sprite, d / 100f, a, s); + + if (m_GenerateGeometryPanel.generateWeights) + { + EditorUtility.DisplayProgressBar(TextContent.generatingWeights, sprite.name, (i * 2f + 1) / (sprites.Length * 2f)); + GenerateWeights(sprite); + } + } + + foreach(var sprite in sprites) + skinningCache.events.meshChanged.Invoke(sprite.GetMesh()); + + EditorUtility.ClearProgressBar(); + } + }; + } + + protected override void OnActivate() + { + base.OnActivate(); + UpdateButton(); + Show(); + skinningCache.events.selectedSpriteChanged.AddListener(OnSelectedSpriteChanged); + } + + protected override void OnDeactivate() + { + base.OnDeactivate(); + Hide(); + skinningCache.events.selectedSpriteChanged.RemoveListener(OnSelectedSpriteChanged); + } + + private void Show() + { + m_GenerateGeometryPanel.SetHiddenFromLayout(false); + } + + private void Hide() + { + m_GenerateGeometryPanel.SetHiddenFromLayout(true); + } + + private void UpdateButton() + { + var selectedSprite = skinningCache.selectedSprite; + + if (selectedSprite == null) + m_GenerateGeometryPanel.SetMode(GenerateGeometryPanel.GenerateMode.Multiple); + else + m_GenerateGeometryPanel.SetMode(GenerateGeometryPanel.GenerateMode.Single); + } + + private void OnSelectedSpriteChanged(SpriteCache sprite) + { + UpdateButton(); + } + + private void GenerateGeometry(SpriteCache sprite, float outlineDetail, byte alphaTolerance, float subdivide) + { + Debug.Assert(sprite != null); + + var mesh = sprite.GetMesh(); + + Debug.Assert(mesh != null); + + m_SpriteMeshDataController.spriteMeshData = mesh; + m_SpriteMeshDataController.OutlineFromAlpha(m_OutlineGenerator, mesh.textureDataProvider, outlineDetail, alphaTolerance); + m_SpriteMeshDataController.Triangulate(m_Triangulator); + + if (subdivide > 0f) + { + var largestAreaFactor = Mathf.Lerp(0.5f, 0.05f, Math.Min(subdivide, 100f) / 100f); + m_SpriteMeshDataController.Subdivide(m_Triangulator, largestAreaFactor); + } + + foreach (var vertex in mesh.vertices) + vertex.position -= sprite.textureRect.position; + } + + private void GenerateWeights(SpriteCache sprite) + { + Debug.Assert(sprite != null); + + var mesh = sprite.GetMesh(); + + Debug.Assert(mesh != null); + + using (new DefaultPoseScope(skinningCache.GetEffectiveSkeleton(sprite))) + { + if (NeedsAssociateBones(sprite.GetCharacterPart())) + { + using (new AssociateBonesScope(sprite)) + { + GenerateWeights(mesh); + } + } + else + GenerateWeights(mesh); + } + } + + private bool NeedsAssociateBones(CharacterPartCache characterPart) + { + if (characterPart == null) + return false; + + var skeleton = characterPart.skinningCache.character.skeleton; + + return characterPart.BoneCount == 0 || + (characterPart.BoneCount == 1 && characterPart.GetBone(0) == skeleton.GetBone(0)); + } + + private void GenerateWeights(MeshCache mesh) + { + Debug.Assert(mesh != null); + + m_SpriteMeshDataController.spriteMeshData = mesh; + m_SpriteMeshDataController.CalculateWeights(m_WeightGenerator, null, kWeightTolerance); + m_SpriteMeshDataController.SortTrianglesByDepth(); + } + + protected override void OnGUI() + { + m_MeshPreviewBehaviour.showWeightMap = m_GenerateGeometryPanel.generateWeights; + m_MeshPreviewBehaviour.overlaySelected = m_GenerateGeometryPanel.generateWeights; + + skeletonTool.skeletonStyle = SkeletonStyles.Default; + + if (m_GenerateGeometryPanel.generateWeights) + skeletonTool.skeletonStyle = SkeletonStyles.WeightMap; + + DoSkeletonGUI(); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/GenerateGeometryTool.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/GenerateGeometryTool.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..53eec37398809becd7b3a065a696c5c2f78e1760 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/GenerateGeometryTool.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 237f0a0a8eeab0d46873db954d4abded +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/GenerateWeightsTool.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/GenerateWeightsTool.cs new file mode 100644 index 0000000000000000000000000000000000000000..0bd2bb53cb044f58c485e40f104726a4a69a428e --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/GenerateWeightsTool.cs @@ -0,0 +1,147 @@ +using System; +using UnityEditor.U2D.Layout; +using UnityEngine; + +namespace UnityEditor.U2D.Animation +{ + internal class GenerateWeightsTool : MeshToolWrapper + { + private const float kWeightTolerance = 0.01f; + private SpriteMeshDataController m_SpriteMeshDataController = new SpriteMeshDataController(); + private IWeightsGenerator m_WeightGenerator; + private GenerateWeightsPanel m_GenerateWeightsPanel; + + internal override void OnCreate() + { + m_WeightGenerator = new BoundedBiharmonicWeightsGenerator(); + } + + public override void Initialize(LayoutOverlay layout) + { + base.Initialize(layout); + + m_GenerateWeightsPanel = GenerateWeightsPanel.GenerateFromUXML(); + + layout.rightOverlay.Add(m_GenerateWeightsPanel); + + BindElements(); + m_GenerateWeightsPanel.SetHiddenFromLayout(true); + } + + private void BindElements() + { + Debug.Assert(m_GenerateWeightsPanel != null); + + m_GenerateWeightsPanel.onGenerateWeights += () => + { + HandleWeights(GenerateWeights, TextContent.generateWeights); + }; + + m_GenerateWeightsPanel.onNormalizeWeights += () => + { + HandleWeights(NormalizeWeights, TextContent.normalizeWeights); + }; + + m_GenerateWeightsPanel.onClearWeights += () => + { + HandleWeights(ClearWeights, TextContent.clearWeights); + }; + } + + protected override void OnActivate() + { + base.OnActivate(); + m_GenerateWeightsPanel.SetHiddenFromLayout(false); + skinningCache.events.skinningModeChanged.AddListener(OnModeChanged); + skinningCache.events.selectedSpriteChanged.AddListener(OnSpriteSelectionChanged); + m_GenerateWeightsPanel.Update(skinningCache.mode == SkinningMode.Character); + OnSpriteSelectionChanged(skinningCache.selectedSprite); + } + + protected override void OnDeactivate() + { + base.OnDeactivate(); + skinningCache.events.skinningModeChanged.RemoveListener(OnModeChanged); + skinningCache.events.selectedSpriteChanged.RemoveListener(OnSpriteSelectionChanged); + m_GenerateWeightsPanel.SetHiddenFromLayout(true); + } + + void OnModeChanged(SkinningMode mode) + { + m_GenerateWeightsPanel.Update(mode == SkinningMode.Character); + } + + void OnSpriteSelectionChanged(SpriteCache sprite) + { + m_GenerateWeightsPanel.generateButtonText = sprite != null ? TextContent.generate : TextContent.generateAll; + } + + private void HandleWeights(Action action, string undoName) + { + using (skinningCache.UndoScope(undoName)) + { + var selectedSprite = skinningCache.selectedSprite; + if (selectedSprite != null) + HandleWeightsForSprite(selectedSprite, action); + else + { + var sprites = skinningCache.GetSprites(); + + foreach (var sprite in sprites) + { + if (sprite.IsVisible()) + HandleWeightsForSprite(sprite, action); + } + } + } + } + + private void HandleWeightsForSprite(SpriteCache sprite, Action action) + { + Debug.Assert(sprite != null); + + using (new DefaultPoseScope(skinningCache.GetEffectiveSkeleton(sprite))) + { + action(sprite); + } + + skinningCache.events.meshChanged.Invoke(sprite.GetMesh()); + } + + private void GenerateWeights(SpriteCache sprite) + { + using (m_GenerateWeightsPanel.associateBones ? new AssociateBonesScope(sprite) : null) + { + m_SpriteMeshDataController.spriteMeshData = sprite.GetMesh(); + m_SpriteMeshDataController.CalculateWeights(m_WeightGenerator, skinningCache.vertexSelection, kWeightTolerance); + m_SpriteMeshDataController.SortTrianglesByDepth(); + } + } + + private void NormalizeWeights(SpriteCache sprite) + { + m_SpriteMeshDataController.spriteMeshData = sprite.GetMesh(); + m_SpriteMeshDataController.NormalizeWeights(skinningCache.vertexSelection); + m_SpriteMeshDataController.SortTrianglesByDepth(); + } + + private void ClearWeights(SpriteCache sprite) + { + m_SpriteMeshDataController.spriteMeshData = sprite.GetMesh(); + m_SpriteMeshDataController.ClearWeights(skinningCache.vertexSelection); + } + + protected override void OnGUI() + { + m_MeshPreviewBehaviour.showWeightMap = true; + m_MeshPreviewBehaviour.overlaySelected = true; + skeletonMode = SkeletonMode.EditPose; + meshMode = SpriteMeshViewMode.EditGeometry; + disableMeshEditor = true; + skeletonTool.skeletonStyle = SkeletonStyles.WeightMap; + + DoSkeletonGUI(); + DoMeshGUI(); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/GenerateWeightsTool.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/GenerateWeightsTool.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..158c516a5a6be02e44ffebd3136072e88099fb59 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/GenerateWeightsTool.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 497003cbd9cf35349bb7a01db4d94b26 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/HorizontalToggleTools.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/HorizontalToggleTools.cs new file mode 100644 index 0000000000000000000000000000000000000000..cad4a6f7594e989460381c6c9e2d4d10eae01bd0 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/HorizontalToggleTools.cs @@ -0,0 +1,166 @@ +using System; +using UnityEngine; + +namespace UnityEditor.U2D.Animation +{ + internal class HorizontalToggleTools + { + private static class Styles + { + public static GUIContent visibilityCollapseIcon = new GUIContent(IconUtility.LoadIconResource("Visibility_Tool", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath), L10n.Tr(TextContent.visibilityIconTooltip)); + public static GUIContent visibilityIcon = new GUIContent(L10n.Tr(TextContent.visibilityIconText), IconUtility.LoadIconResource("Visibility_Tool", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath), L10n.Tr(TextContent.visibilityIconTooltip)); + public static GUIContent characterCollapseIcon = new GUIContent(IconUtility.LoadIconResource("character_Mode", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath), L10n.Tr(TextContent.restorePose)); + public static GUIContent characterIcon = new GUIContent(L10n.Tr(TextContent.characterIconText), IconUtility.LoadIconResource("character_Mode", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath), L10n.Tr(TextContent.restorePose)); + public static GUIContent spriteSheetIcon = new GUIContent(L10n.Tr(TextContent.spriteSheetIconText), IconUtility.LoadIconResource("Sprite_Mode", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath), L10n.Tr(TextContent.spriteSheetIconTooltip)); + public static GUIContent spriteSheetCollapseIcon = new GUIContent(IconUtility.LoadIconResource("Sprite_Mode", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath), L10n.Tr(TextContent.spriteSheetIconTooltip)); + public static GUIContent copyIcon = new GUIContent(L10n.Tr(TextContent.copyText), IconUtility.LoadIconResource("Copy", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath), L10n.Tr(TextContent.copyTooltip)); + public static GUIContent copyCollapseIcon = new GUIContent(IconUtility.LoadIconResource("Copy", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath), L10n.Tr(TextContent.copyTooltip)); + public static GUIContent pasteIcon = new GUIContent(L10n.Tr(TextContent.pasteText), IconUtility.LoadIconResource("Paste", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath), L10n.Tr(TextContent.pasteTooltip)); + public static GUIContent pasteCollapseIcon = new GUIContent(IconUtility.LoadIconResource("Paste", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath), L10n.Tr(TextContent.pasteTooltip)); + } + + private SkinningCache skinningCache { get; set; } + + private CopyTool copyTool + { + get { return skinningCache.GetTool(Tools.CopyPaste) as CopyTool; } + } + + private VisibilityTool visibilityTool + { + get { return skinningCache.GetTool(Tools.Visibility) as VisibilityTool; } + } + + private SwitchModeTool switchmodeTool + { + get { return skinningCache.GetTool(Tools.SwitchMode) as SwitchModeTool; } + } + + private GUIContent spriteSheetIcon + { + get { return collapseToolbar ? Styles.spriteSheetCollapseIcon : Styles.spriteSheetIcon; } + } + + private GUIContent copyIcon + { + get { return collapseToolbar ? Styles.copyCollapseIcon : Styles.copyIcon; } + } + private GUIContent pasteIcon + { + get { return collapseToolbar ? Styles.pasteCollapseIcon : Styles.pasteIcon; } + } + + internal Action onActivateTool = (b) => {}; + private BaseTool m_PreviousTool; + + public bool collapseToolbar { get; set; } + + internal HorizontalToggleTools(SkinningCache s) + { + skinningCache = s; + } + + internal void DoGUI(Rect drawArea, BaseTool currentTool, bool isDisabled) + { + using (new EditorGUI.DisabledScope(isDisabled)) + { + GUILayout.BeginArea(drawArea); + EditorGUILayout.BeginHorizontal(); + + DoPreviewToggle(); + DoModeToggle(); + DoCopyToggle(currentTool); + GUILayout.FlexibleSpace(); + DoVisibilityToggle(currentTool); + + EditorGUILayout.EndHorizontal(); + GUILayout.EndArea(); + } + } + + private void StorePreviousTool(BaseTool currentTool) + { + if(currentTool != copyTool && currentTool != visibilityTool) + m_PreviousTool = currentTool; + } + + private void DoModeToggle() + { + if (skinningCache.hasCharacter) + { + EditorGUI.BeginChangeCheck(); + var isActive = GUILayout.Toggle(switchmodeTool.isActive , spriteSheetIcon, EditorStyles.toolbarButton); + if (EditorGUI.EndChangeCheck()) + { + using (skinningCache.UndoScope(TextContent.setMode)) + { + if (isActive) + switchmodeTool.Activate(); + else + switchmodeTool.Deactivate(); + } + } + } + } + + private void DoCopyToggle(BaseTool currentTool) + { + if (GUILayout.Button(copyIcon, EditorStyles.toolbarButton)) + { + copyTool.OnCopyActivated(); + } + EditorGUI.BeginChangeCheck(); + GUILayout.Toggle(copyTool.isActive, pasteIcon, EditorStyles.toolbarButton); + if (EditorGUI.EndChangeCheck()) + TogglePasteTool(currentTool); + } + + internal void TogglePasteTool(BaseTool currentTool) + { + if (!copyTool.isActive) + { + onActivateTool(copyTool); + StorePreviousTool(currentTool); + } + else if (m_PreviousTool != null) + { + onActivateTool(m_PreviousTool); + } + } + + void DoVisibilityToggle(BaseTool currentTool) + { + EditorGUI.BeginChangeCheck(); + GUILayout.Toggle(visibilityTool.isActive, visbilityIcon, EditorStyles.toolbarButton); + if (EditorGUI.EndChangeCheck()) + ToggleVisibilityTool(currentTool); + } + + GUIContent visbilityIcon { get { return collapseToolbar ? Styles.visibilityCollapseIcon : Styles.visibilityIcon; } } + + internal void ToggleVisibilityTool(BaseTool currentTool) + { + onActivateTool(visibilityTool); + } + + private void DoPreviewToggle() + { + var skeleton = skinningCache.GetEffectiveSkeleton(skinningCache.selectedSprite); + + EditorGUI.BeginDisabledGroup(skeleton == null || skeleton.isPosePreview == false); + EditorGUI.BeginChangeCheck(); + GUILayout.Button(characterIcon, EditorStyles.toolbarButton); + if (EditorGUI.EndChangeCheck()) + { + using (skinningCache.UndoScope("Restore Pose")) + { + skinningCache.RestoreBindPose(); + skinningCache.events.restoreBindPose.Invoke(); + } + } + EditorGUI.EndDisabledGroup(); + } + + GUIContent characterIcon { get { return collapseToolbar ? Styles.characterCollapseIcon : Styles.characterIcon; } } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/HorizontalToggleTools.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/HorizontalToggleTools.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3a9e2758679472cc63aad072bbcd85a7bc70b87b --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/HorizontalToggleTools.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 28c640dd2a903f0498148ed21c25a97f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/IconUtility.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/IconUtility.cs new file mode 100644 index 0000000000000000000000000000000000000000..b3f130611c4f4c5476b5fffabc901efcb36affc2 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/IconUtility.cs @@ -0,0 +1,30 @@ +using System.IO; +using UnityEngine; + +namespace UnityEditor.U2D.Animation +{ + internal static class IconUtility + { + static public readonly string k_LightIconResourcePath = "SkinningModule/Icons/Light"; + static public readonly string k_DarkIconResourcePath = "SkinningModule/Icons/Dark"; + static public readonly string k_SelectedResourceIconPath = "SkinningModule/Icons/Selected"; + + public static Texture2D LoadIconResource(string name, string personalPath, string proPath) + { + string iconPath = ""; + + if (EditorGUIUtility.isProSkin && !string.IsNullOrEmpty(proPath)) + iconPath = Path.Combine(proPath, "d_" + name); + else + iconPath = Path.Combine(personalPath, name); + if (EditorGUIUtility.pixelsPerPoint > 1.0f) + { + var icon2x = ResourceLoader.Load(iconPath + "@2x.png"); + if (icon2x != null) + return icon2x; + } + + return ResourceLoader.Load(iconPath+".png"); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/MathUtility.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/MathUtility.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0ea36e746b74ea3145d3d86f57aa92909fd3268d --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/MathUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5e4f2af0145cfe44797338834d0b013a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/MeshPreviewTool.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/MeshPreviewTool.meta new file mode 100644 index 0000000000000000000000000000000000000000..7b2e97693305321f5f7eac522d52e204ef45fdc5 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/MeshPreviewTool.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9aa898c2e4f1cbc4ba5d122fc7b47317 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/MeshTool.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/MeshTool.meta new file mode 100644 index 0000000000000000000000000000000000000000..7388d58b8b851efa52ea4c75b0339fb397b2b218 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/MeshTool.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9ee4e8d7932896548ab9dd0fa6efebc5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ModuleToolGroup.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ModuleToolGroup.cs new file mode 100644 index 0000000000000000000000000000000000000000..a54612d93772bd91d6e2db0f3bdac32601b2aca9 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ModuleToolGroup.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UnityEditor.U2D.Animation +{ + internal class ModuleToolGroup + { + class ToolGroupEntry + { + public BaseTool tool; + public Action activateCallback; + } + + class ToolGroup + { + public int groupId; + public List tools = new List(); + public int previousToolIndex; + } + List m_ToolGroups = new List(); + + public void AddToolToGroup(int groupId, BaseTool tool, Action toolActivatedCallback) + { + List tools = null; + for (int i = 0; i < m_ToolGroups.Count; ++i) + { + if (m_ToolGroups[i].groupId == groupId) + { + tools = m_ToolGroups[i].tools; + } + + var toolIndex = m_ToolGroups[i].tools.FindIndex(x => x.tool == tool); + if (toolIndex != -1) + { + Debug.LogError(string.Format("{0} already exist in group.", tool.name)); + return; + } + } + + if (tools == null) + { + var toolGroup = new ToolGroup() + { + groupId = groupId + }; + tools = toolGroup.tools; + m_ToolGroups.Add(toolGroup); + } + + tools.Add(new ToolGroupEntry() + { + tool = tool, + activateCallback = toolActivatedCallback + }); + } + + public void ActivateTool(BaseTool tool) + { + var toolGroupIndex = -1; + var groupTool = m_ToolGroups.FirstOrDefault(x => + { + toolGroupIndex = x.tools.FindIndex(y => y.tool == tool); + return toolGroupIndex >= 0; + }); + + if (groupTool != null && toolGroupIndex >= 0) + { + var previousTool = groupTool.previousToolIndex >= 0 ? groupTool.tools[groupTool.previousToolIndex] : null; + if (tool.isActive) // we want to deactivate the tool and switch to original + { + tool.Deactivate(); + if (previousTool != null && previousTool.tool != tool && previousTool.tool != null) + { + previousTool.tool.Activate(); + groupTool.previousToolIndex = toolGroupIndex; + } + } + else + { + for (int i = 0; i < groupTool.tools.Count; ++i) + { + var gt = groupTool.tools[i]; + if (gt.tool.isActive) + { + groupTool.previousToolIndex = i; + gt.tool.Deactivate(); + } + } + tool.Activate(); + if (groupTool.tools[toolGroupIndex].activateCallback != null) + groupTool.tools[toolGroupIndex].activateCallback(); + } + } + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ModuleToolGroup.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ModuleToolGroup.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..57a0b7359f3ebcbf9f07ecd1b0366099d13037a1 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ModuleToolGroup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ebefc406fa7f065458cfccf8e07be2f9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ModuleUtility.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ModuleUtility.cs new file mode 100644 index 0000000000000000000000000000000000000000..b21b2e0695e72f4a91089ba0e164fdb06df49966 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/ModuleUtility.cs @@ -0,0 +1,128 @@ +using UnityEngine; +using System; +using System.Collections.Generic; + + +namespace UnityEditor.U2D.Animation +{ + internal static class ModuleUtility + { + public static Vector3 GUIToWorld(Vector3 guiPosition) + { + return GUIToWorld(guiPosition, Vector3.forward, Vector3.zero); + } + + public static Vector3 GUIToWorld(Vector3 guiPosition, Vector3 planeNormal, Vector3 planePos) + { + Vector3 worldPos = Handles.inverseMatrix.MultiplyPoint(guiPosition); + + if (Camera.current) + { + Ray ray = HandleUtility.GUIPointToWorldRay(guiPosition); + + planeNormal = Handles.matrix.MultiplyVector(planeNormal); + + planePos = Handles.matrix.MultiplyPoint(planePos); + + Plane plane = new Plane(planeNormal, planePos); + + float distance = 0f; + + if (plane.Raycast(ray, out distance)) + { + worldPos = Handles.inverseMatrix.MultiplyPoint(ray.GetPoint(distance)); + } + } + + return worldPos; + } + + public static GUIContent[] ToGUIContentArray(string[] names) + { + return Array.ConvertAll(names, n => new GUIContent(n)); + } + + public static Color CalculateNiceColor(int index, int numColors) + { + numColors = Mathf.Clamp(numColors, 1, int.MaxValue); + + int loops = index / numColors; + index = index % 360; + + int hueAngleStep = 360 / numColors; + float hueLoopOffset = hueAngleStep * 0.5f; + float hue = index * hueAngleStep + loops * hueLoopOffset; + + return Color.HSVToRGB(Mathf.Repeat(hue, 360f) / 360f, 1f, 1f); + } + + public static void UpdateLocalToWorldMatrices(List spriteBoneDataList, Matrix4x4 rootMatrix, ref Matrix4x4[] localToWorldMatrices) + { + if (localToWorldMatrices == null || localToWorldMatrices.Length != spriteBoneDataList.Count) + localToWorldMatrices = new Matrix4x4[spriteBoneDataList.Count]; + + bool[] calculatedMatrix = new bool[spriteBoneDataList.Count]; + + var processedBoneCount = 0; + while (processedBoneCount < spriteBoneDataList.Count) + { + int oldCount = processedBoneCount; + + for (var i = 0; i < spriteBoneDataList.Count; ++i) + { + if (calculatedMatrix[i]) + continue; + + var sourceBone = spriteBoneDataList[i]; + if (sourceBone.parentId != -1 && !calculatedMatrix[sourceBone.parentId]) + continue; + + var localToWorldMatrix = Matrix4x4.identity; + localToWorldMatrix.SetTRS(sourceBone.localPosition, sourceBone.localRotation, Vector3.one); + + if (sourceBone.parentId == -1) + localToWorldMatrix = rootMatrix * localToWorldMatrix; + else if (calculatedMatrix[sourceBone.parentId]) + localToWorldMatrix = localToWorldMatrices[sourceBone.parentId] * localToWorldMatrix; + + localToWorldMatrices[i] = localToWorldMatrix; + calculatedMatrix[i] = true; + processedBoneCount++; + } + + if (oldCount == processedBoneCount) + throw new ArgumentException("Invalid hierarchy detected"); + } + } + + public static List CreateSpriteBoneData(UnityEngine.U2D.SpriteBone[] spriteBoneList, Matrix4x4 rootMatrix) + { + List spriteBoneDataList = new List(spriteBoneList.Length); + + foreach (var spriteBone in spriteBoneList) + { + spriteBoneDataList.Add(new SpriteBoneData() + { + name = spriteBone.name, + parentId = spriteBone.parentId, + localPosition = spriteBone.position, + localRotation = spriteBone.rotation, + depth = spriteBone.position.z, + length = spriteBone.length + }); + } + + Matrix4x4[] localToWorldMatrices = null; + UpdateLocalToWorldMatrices(spriteBoneDataList, rootMatrix, ref localToWorldMatrices); + + for (int i = 0; i < spriteBoneDataList.Count; ++i) + { + var spriteBoneData = spriteBoneDataList[i]; + spriteBoneData.position = localToWorldMatrices[i].MultiplyPoint(Vector2.zero); + spriteBoneData.endPosition = localToWorldMatrices[i].MultiplyPoint(Vector2.right * spriteBoneData.length); + } + + return spriteBoneDataList; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningModule.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningModule.cs new file mode 100644 index 0000000000000000000000000000000000000000..0db56fd2cb53fb78a3a25df1de3f2aed83b7f307 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningModule.cs @@ -0,0 +1,570 @@ +using UnityEngine; +using System; +using System.Linq; +using System.Collections.Generic; +using UnityEditor.U2D.Sprites; + +namespace UnityEditor.U2D.Animation +{ + [RequireSpriteDataProvider(typeof(ISpriteMeshDataProvider), typeof(ISpriteBoneDataProvider))] + internal partial class SkinningModule : SpriteEditorModuleBase + { + private static class Styles + { + public static string moduleName = L10n.Tr("Skinning Editor"); + } + + private SkinningCache m_SkinningCache; + private int m_PrevNearestControl = -1; + private SpriteOutlineRenderer m_SpriteOutlineRenderer; + private MeshPreviewTool m_MeshPreviewTool; + private SkinningMode m_PreviousSkinningMode; + private SpriteBoneInfluenceTool m_CharacterSpriteTool; + private HorizontalToggleTools m_HorizontalToggleTools; + private AnimationAnalytics m_Analytics; + private ModuleToolGroup m_ModuleToolGroup; + IMeshPreviewBehaviour m_MeshPreviewBehaviourOverride = null; + bool m_CollapseToolbar; + + internal SkinningCache skinningCache + { + get { return m_SkinningCache; } + } + + private BaseTool currentTool + { + get { return skinningCache.selectedTool; } + set { skinningCache.selectedTool = value; } + } + + public override string moduleName + { + get { return Styles.moduleName; } + } + + public override void OnModuleActivate() + { + m_SkinningCache = Cache.Create(); + + AddMainUI(spriteEditor.GetMainVisualContainer()); + + using (skinningCache.DisableUndoScope()) + { + skinningCache.Create(spriteEditor, SkinningCachePersistentState.instance); + skinningCache.CreateToolCache(spriteEditor, m_LayoutOverlay); + m_CharacterSpriteTool = skinningCache.CreateTool(); + m_CharacterSpriteTool.Initialize(m_LayoutOverlay); + m_MeshPreviewTool = skinningCache.CreateTool(); + SetupModuleToolGroup(); + m_MeshPreviewTool.Activate(); + + m_SpriteOutlineRenderer = new SpriteOutlineRenderer(spriteEditor, skinningCache.events); + + spriteEditor.enableMouseMoveEvent = true; + + Undo.undoRedoPerformed += UndoRedoPerformed; + skinningCache.events.skeletonTopologyChanged.AddListener(SkeletonTopologyChanged); + skinningCache.events.skeletonPreviewPoseChanged.AddListener(SkeletonPreviewPoseChanged); + skinningCache.events.skeletonBindPoseChanged.AddListener(SkeletonBindPoseChanged); + skinningCache.events.characterPartChanged.AddListener(CharacterPartChanged); + skinningCache.events.skinningModeChanged.AddListener(OnViewModeChanged); + skinningCache.events.meshChanged.AddListener(OnMeshChanged); + skinningCache.events.boneNameChanged.AddListener(OnBoneNameChanged); + skinningCache.events.boneDepthChanged.AddListener(OnBoneDepthChanged); + skinningCache.events.spriteLibraryChanged.AddListener(OnSpriteLibraryChanged); + skinningCache.events.meshPreviewBehaviourChange.AddListener(OnMeshPreviewBehaviourChange); + + skinningCache.RestoreFromPersistentState(); + ActivateTool(skinningCache.selectedTool); + skinningCache.RestoreToolStateFromPersistentState(); + + // Set state for Switch Mode tool + m_PreviousSkinningMode = skinningCache.mode; + if (skinningCache.mode == SkinningMode.Character) + { + skinningCache.GetTool(Tools.SwitchMode).Deactivate(); + } + else + { + skinningCache.GetTool(Tools.SwitchMode).Activate(); + } + SetupSpriteEditor(true); + + m_HorizontalToggleTools = new HorizontalToggleTools(skinningCache) + { + onActivateTool = (b) => + { + using (skinningCache.UndoScope(TextContent.setTool)) + { + ActivateTool(b); + } + } + }; + + var ai = spriteEditor.GetDataProvider() as AssetImporter; + m_Analytics = new AnimationAnalytics(new UnityAnalyticsStorage(), + skinningCache.events, + new SkinningModuleAnalyticsModel(skinningCache), + ai == null ? -1 : ai.GetInstanceID()); + + UpdateCollapseToolbar(); + } + } + + public override void OnModuleDeactivate() + { + if (m_SpriteOutlineRenderer != null) + m_SpriteOutlineRenderer.Dispose(); + + spriteEditor.enableMouseMoveEvent = false; + + Undo.undoRedoPerformed -= UndoRedoPerformed; + skinningCache.events.skeletonTopologyChanged.RemoveListener(SkeletonTopologyChanged); + skinningCache.events.skeletonPreviewPoseChanged.RemoveListener(SkeletonPreviewPoseChanged); + skinningCache.events.skeletonBindPoseChanged.RemoveListener(SkeletonBindPoseChanged); + skinningCache.events.characterPartChanged.RemoveListener(CharacterPartChanged); + skinningCache.events.skinningModeChanged.RemoveListener(OnViewModeChanged); + skinningCache.events.meshChanged.RemoveListener(OnMeshChanged); + skinningCache.events.boneNameChanged.RemoveListener(OnBoneNameChanged); + skinningCache.events.boneDepthChanged.RemoveListener(OnBoneDepthChanged); + skinningCache.events.spriteLibraryChanged.RemoveListener(OnSpriteLibraryChanged); + skinningCache.events.meshPreviewBehaviourChange.RemoveListener(OnMeshPreviewBehaviourChange); + + RemoveMainUI(spriteEditor.GetMainVisualContainer()); + RestoreSpriteEditor(); + m_Analytics.Dispose(); + m_Analytics = null; + + Cache.Destroy(m_SkinningCache); + } + + private void UpdateCollapseToolbar() + { + m_CollapseToolbar = SkinningModuleSettings.compactToolBar; + m_WeightToolbar.CollapseToolBar(m_CollapseToolbar); + m_MeshToolbar.CollapseToolBar(m_CollapseToolbar); + m_BoneToolbar.CollapseToolBar(m_CollapseToolbar); + m_LayoutOverlay.verticalToolbar.Collapse(m_CollapseToolbar); + m_HorizontalToggleTools.collapseToolbar = m_CollapseToolbar; + } + + private void OnBoneNameChanged(BoneCache bone) + { + var character = skinningCache.character; + + if (character != null && character.skeleton == bone.skeleton) + skinningCache.SyncSpriteSheetSkeletons(); + DataModified(); + } + + private void OnBoneDepthChanged(BoneCache bone) + { + var sprites = skinningCache.GetSprites(); + var controller = new SpriteMeshDataController(); + + foreach (var sprite in sprites) + { + var mesh = sprite.GetMesh(); + + if (mesh.ContainsBone(bone)) + { + controller.spriteMeshData = mesh; + controller.SortTrianglesByDepth(); + skinningCache.events.meshChanged.Invoke(mesh); + } + } + + DataModified(); + } + + private void OnMeshChanged(MeshCache mesh) + { + DataModified(); + } + + private void DataModified() + { + spriteEditor.SetDataModified(); + } + + private void OnViewModeChanged(SkinningMode mode) + { + SetupSpriteEditor(); + } + + private void SetupSpriteEditor(bool setPreviewTexture = false) + { + var textureProvider = spriteEditor.GetDataProvider(); + if (textureProvider == null) + return; + + var emptyTexture = new Texture2D(1, 1, TextureFormat.RGBAHalf, false, true); + emptyTexture.hideFlags = HideFlags.HideAndDontSave; + emptyTexture.SetPixel(1, 1, new Color(0, 0, 0, 0)); + emptyTexture.Apply(); + + int width = 0, height = 0; + if (skinningCache.mode == SkinningMode.SpriteSheet) + { + textureProvider.GetTextureActualWidthAndHeight(out width, out height); + } + else + { + width = skinningCache.character.dimension.x; + height = skinningCache.character.dimension.y; + } + + if (m_PreviousSkinningMode != skinningCache.mode || setPreviewTexture) + { + spriteEditor.SetPreviewTexture(emptyTexture, width, height); + if (m_PreviousSkinningMode != skinningCache.mode) + { + m_PreviousSkinningMode = skinningCache.mode; + spriteEditor.ResetZoomAndScroll(); + } + } + + spriteEditor.spriteRects = new List(); + } + + private void RestoreSpriteEditor() + { + var textureProvider = spriteEditor.GetDataProvider(); + + if (textureProvider != null) + { + int width, height; + textureProvider.GetTextureActualWidthAndHeight(out width, out height); + + var texture = textureProvider.previewTexture; + spriteEditor.SetPreviewTexture(texture, width, height); + } + + var spriteRectProvider = spriteEditor.GetDataProvider(); + + if (spriteRectProvider != null) + spriteEditor.spriteRects = new List(spriteRectProvider.GetSpriteRects()); + } + + public override bool CanBeActivated() + { + var dataProvider = spriteEditor.GetDataProvider(); + return dataProvider == null ? false : dataProvider.spriteImportMode != SpriteImportMode.None; + } + + public override void DoPostGUI() + { + if (!spriteEditor.windowDimension.Contains(Event.current.mousePosition)) + HandleUtility.nearestControl = 0; + + if (Event.current.type == EventType.Layout && m_PrevNearestControl != HandleUtility.nearestControl) + { + m_PrevNearestControl = HandleUtility.nearestControl; + spriteEditor.RequestRepaint(); + } + + skinningCache.EndUndoOperation(); + } + + public override void DoMainGUI() + { + Debug.Assert(currentTool != null); + + DoViewGUI(); + + if (!spriteEditor.editingDisabled) + skinningCache.selectionTool.DoGUI(); + + m_MeshPreviewTool.previewBehaviourOverride = m_MeshPreviewBehaviourOverride != null ? m_MeshPreviewBehaviourOverride : currentTool.previewBehaviour; + m_MeshPreviewTool.DoGUI(); + m_MeshPreviewTool.DrawOverlay(); + + m_SpriteOutlineRenderer.RenderSpriteOutline(spriteEditor, skinningCache.selectedSprite); + + m_MeshPreviewTool.OverlayWireframe(); + + if (!spriteEditor.editingDisabled) + { + currentTool.DoGUI(); + DoCopyPasteKeyboardEventHandling(); + } + + DrawRectGizmos(); + + if (SkinningModuleSettings.compactToolBar != m_CollapseToolbar) + UpdateCollapseToolbar(); + } + + public override void DoToolbarGUI(Rect drawArea) + { + m_HorizontalToggleTools.DoGUI(drawArea, currentTool, spriteEditor.editingDisabled); + } + + void DoCopyPasteKeyboardEventHandling() + { + var evt = Event.current; + if (evt.type == EventType.ValidateCommand) + { + if (evt.commandName == "Copy" || evt.commandName == "Paste") + evt.Use(); + return; + } + + if (evt.type == EventType.ExecuteCommand) + { + var copyTool = skinningCache.GetTool(Tools.CopyPaste) as CopyTool; + if (copyTool != null && evt.commandName == "Copy") + { + copyTool.OnCopyActivated(); + evt.Use(); + } + else if (copyTool != null && evt.commandName == "Paste") + { + copyTool.OnPasteActivated(true, true, false, false); + evt.Use(); + } + } + } + + private void DrawRectGizmos() + { + if (Event.current.type == EventType.Repaint) + { + var selectedSprite = skinningCache.selectedSprite; + var sprites = skinningCache.GetSprites(); + var unselectedRectColor = new Color(1f, 1f, 1f, 0.5f); + + foreach (var sprite in sprites) + { + var skeleton = skinningCache.GetEffectiveSkeleton(sprite); + + Debug.Assert(skeleton != null); + + if (skeleton.isPosePreview) + continue; + + var color = unselectedRectColor; + + if (sprite == selectedSprite) + color = DrawingUtility.kSpriteBorderColor; + + if (skinningCache.mode == SkinningMode.Character + && sprite != selectedSprite) + continue; + + var matrix = sprite.GetLocalToWorldMatrixFromMode(); + var rect = new Rect(matrix.MultiplyPoint3x4(Vector3.zero), sprite.textureRect.size); + + DrawingUtility.BeginLines(color); + DrawingUtility.DrawBox(rect); + DrawingUtility.EndLines(); + } + } + } + + private void UndoRedoPerformed() + { + using (new DisableUndoScope(skinningCache)) + { + UpdateToggleState(); + skinningCache.UndoRedoPerformed(); + SetupSpriteEditor(); + } + } + + #region CharacterConsistency + //TODO: Bring this to a better place, maybe CharacterController + private void SkeletonPreviewPoseChanged(SkeletonCache skeleton) + { + var character = skinningCache.character; + + if (character != null && character.skeleton == skeleton) + skinningCache.SyncSpriteSheetSkeletons(); + } + + private void SkeletonBindPoseChanged(SkeletonCache skeleton) + { + var character = skinningCache.character; + + if (character != null && character.skeleton == skeleton) + skinningCache.SyncSpriteSheetSkeletons(); + DataModified(); + } + + private void SkeletonTopologyChanged(SkeletonCache skeleton) + { + var character = skinningCache.character; + + if (character == null) + { + var sprite = FindSpriteFromSkeleton(skeleton); + + Debug.Assert(sprite != null); + + sprite.UpdateMesh(skeleton.bones); + + DataModified(); + } + else if (character.skeleton == skeleton) + { + skinningCache.CreateSpriteSheetSkeletons(); + DataModified(); + } + } + + private void CharacterPartChanged(CharacterPartCache characterPart) + { + var character = skinningCache.character; + + Debug.Assert(character != null); + + using (new DefaultPoseScope(character.skeleton)) + { + skinningCache.CreateSpriteSheetSkeleton(characterPart); + DataModified(); + } + + if (skinningCache.mode == SkinningMode.Character) + characterPart.SyncSpriteSheetSkeleton(); + } + + private SpriteCache FindSpriteFromSkeleton(SkeletonCache skeleton) + { + var sprites = skinningCache.GetSprites(); + return sprites.FirstOrDefault(sprite => sprite.GetSkeleton() == skeleton); + } + + #endregion + + public override bool ApplyRevert(bool apply) + { + if (apply) + { + m_Analytics.FlushEvent(); + skinningCache.applyingChanges = true; + skinningCache.RestoreBindPose(); + ApplyBone(); + ApplyMesh(); + ApplyCharacter(); + skinningCache.applyingChanges = false; + DoApplyAnalytics(); + } + else + skinningCache.Revert(); + return true; + } + + private void DoApplyAnalytics() + { + var sprites = skinningCache.GetSprites(); + var spriteBoneCount = sprites.Select(s => s.GetSkeleton().BoneCount).ToArray(); + BoneCache[] bones = null; + + if (skinningCache.hasCharacter) + bones = skinningCache.character.skeleton.bones; + else + bones = sprites.SelectMany(s => s.GetSkeleton().bones).ToArray(); + + m_Analytics.SendApplyEvent(sprites.Length, spriteBoneCount, bones); + } + + private void ApplyBone() + { + var boneDataProvider = spriteEditor.GetDataProvider(); + if (boneDataProvider != null) + { + var sprites = skinningCache.GetSprites(); + foreach (var sprite in sprites) + { + var bones = sprite.GetSkeleton().bones; + boneDataProvider.SetBones(new GUID(sprite.id), bones.ToSpriteBone(sprite.localToWorldMatrix).ToList()); + } + } + } + + private void ApplyMesh() + { + var meshDataProvider = spriteEditor.GetDataProvider(); + if (meshDataProvider != null) + { + var sprites = skinningCache.GetSprites(); + foreach (var sprite in sprites) + { + var mesh = sprite.GetMesh(); + var guid = new GUID(sprite.id); + meshDataProvider.SetVertices(guid, mesh.vertices.Select(x => + new Vertex2DMetaData() + { + boneWeight = x.editableBoneWeight.ToBoneWeight(false), + position = x.position + } + ).ToArray()); + meshDataProvider.SetIndices(guid, mesh.indices.ToArray()); + meshDataProvider.SetEdges(guid, mesh.edges.Select(x => new Vector2Int(x.index1, x.index2)).ToArray()); + } + } + } + + private void ApplyCharacter() + { + var characterDataProvider = spriteEditor.GetDataProvider(); + var character = skinningCache.character; + if (characterDataProvider != null && character != null) + { + var data = new CharacterData(); + var characterBones = character.skeleton.bones; + data.bones = characterBones.ToSpriteBone(Matrix4x4.identity); + + var parts = character.parts; + data.parts = parts.Select(x => + new CharacterPart() + { + spriteId = x.sprite.id, + spritePosition = new RectInt((int)x.position.x, (int)x.position.y, (int)x.sprite.textureRect.width, (int)x.sprite.textureRect.height), + bones = x.bones.Select(bone => Array.IndexOf(characterBones, bone)).ToArray() + } + ).ToArray(); + + characterDataProvider.SetCharacterData(data); + } + + var spriteLibDataProvider = spriteEditor.GetDataProvider(); + if (spriteLibDataProvider != null) + { + spriteLibDataProvider.SetSpriteCategoryList(skinningCache.spriteCategoryList.ToSpriteLibrary()); + } + } + + void OnSpriteLibraryChanged() + { + DataModified(); + } + + + void OnMeshPreviewBehaviourChange(IMeshPreviewBehaviour meshPreviewBehaviour) + { + m_MeshPreviewBehaviourOverride = meshPreviewBehaviour; + } + + private void SetupModuleToolGroup() + { + m_ModuleToolGroup = new ModuleToolGroup(); + m_ModuleToolGroup.AddToolToGroup(0, skinningCache.GetTool(Tools.Visibility), null); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.EditGeometry), () => currentTool = skinningCache.GetTool(Tools.EditGeometry)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.CreateVertex), () => currentTool = skinningCache.GetTool(Tools.CreateVertex)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.CreateEdge), () => currentTool = skinningCache.GetTool(Tools.CreateEdge)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.SplitEdge), () => currentTool = skinningCache.GetTool(Tools.SplitEdge)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.GenerateGeometry), () => currentTool = skinningCache.GetTool(Tools.GenerateGeometry)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.EditPose), () => currentTool = skinningCache.GetTool(Tools.EditPose)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.EditJoints), () => currentTool = skinningCache.GetTool(Tools.EditJoints)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.CreateBone), () => currentTool = skinningCache.GetTool(Tools.CreateBone)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.SplitBone), () => currentTool = skinningCache.GetTool(Tools.SplitBone)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.WeightSlider), () => currentTool = skinningCache.GetTool(Tools.WeightSlider)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.WeightBrush), () => currentTool = skinningCache.GetTool(Tools.WeightBrush)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.GenerateWeights), () => currentTool = skinningCache.GetTool(Tools.GenerateWeights)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.BoneInfluence), () => currentTool = skinningCache.GetTool(Tools.BoneInfluence)); + m_ModuleToolGroup.AddToolToGroup(1, skinningCache.GetTool(Tools.CopyPaste), () => currentTool = skinningCache.GetTool(Tools.CopyPaste)); + } + } +} + diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningModule.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningModule.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..30f7558ecec4634b1eb75d319f3be381c4311873 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningModule.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 92be5a949cc9a014dbcb41d98e5aec03 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningModuleView.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningModuleView.cs new file mode 100644 index 0000000000000000000000000000000000000000..6385ef7cfdb859c0b33a9a6e5d36633aebe564f8 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningModuleView.cs @@ -0,0 +1,394 @@ +using System; +using UnityEditor.U2D.Common; +using UnityEditor.U2D.Layout; +using UnityEngine; +using UnityEditor.ShortcutManagement; +using UnityEngine.UIElements; + +namespace UnityEditor.U2D.Animation +{ + internal partial class SkinningModule + { + private LayoutOverlay m_LayoutOverlay; + private BoneToolbar m_BoneToolbar; + private MeshToolbar m_MeshToolbar; + private WeightToolbar m_WeightToolbar; + + private InternalEditorBridge.ShortcutContext m_ShortcutContext; + + private static SkinningModule GetModuleFromContext(ShortcutArguments args) + { + var sc = args.context as InternalEditorBridge.ShortcutContext; + if (sc == null) + return null; + + return sc.context as SkinningModule; + } + + [Shortcut("2D/Animation/Toggle Tool Text", typeof(InternalEditorBridge.ShortcutContext), KeyCode.BackQuote, ShortcutModifiers.Shift)] + private static void CollapseToolbar(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null) + { + SkinningModuleSettings.compactToolBar = !SkinningModuleSettings.compactToolBar; + } + } + + [Shortcut("2D/Animation/Restore Bind Pose", typeof(InternalEditorBridge.ShortcutContext), KeyCode.Alpha1, ShortcutModifiers.Shift)] + private static void DisablePoseModeKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + var effectiveSkeleton = sm.skinningCache.GetEffectiveSkeleton(sm.skinningCache.selectedSprite); + if (effectiveSkeleton != null && effectiveSkeleton.isPosePreview) + { + using (sm.skinningCache.UndoScope(TextContent.restorePose)) + { + sm.skinningCache.RestoreBindPose(); + sm.skinningCache.events.shortcut.Invoke("#1"); + } + } + } + } + + [Shortcut("2D/Animation/Toggle Character Mode", typeof(InternalEditorBridge.ShortcutContext), KeyCode.Alpha2, ShortcutModifiers.Shift)] + private static void ToggleCharacterModeKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled && sm.skinningCache.hasCharacter) + { + var tool = sm.skinningCache.GetTool(Tools.SwitchMode); + + using (sm.skinningCache.UndoScope(TextContent.setMode)) + { + if (tool.isActive) + tool.Deactivate(); + else + tool.Activate(); + } + + sm.skinningCache.events.shortcut.Invoke("#2"); + } + } + + [Shortcut("2D/Animation/Preview Pose", typeof(InternalEditorBridge.ShortcutContext), KeyCode.Q, ShortcutModifiers.Shift)] + private static void EditPoseKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.SetSkeletonTool(Tools.EditPose); + sm.skinningCache.events.shortcut.Invoke("#q"); + } + } + + [Shortcut("2D/Animation/Edit Bone", typeof(InternalEditorBridge.ShortcutContext), KeyCode.W, ShortcutModifiers.Shift)] + private static void EditJointsKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.SetSkeletonTool(Tools.EditJoints); + sm.skinningCache.events.shortcut.Invoke("#w"); + } + } + + [Shortcut("2D/Animation/Create Bone", typeof(InternalEditorBridge.ShortcutContext), KeyCode.E, ShortcutModifiers.Shift)] + private static void CreateBoneKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.SetSkeletonTool(Tools.CreateBone); + sm.skinningCache.events.shortcut.Invoke("#e"); + } + } + + [Shortcut("2D/Animation/Split Bone", typeof(InternalEditorBridge.ShortcutContext), KeyCode.R, ShortcutModifiers.Shift)] + private static void SplitBoneKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.SetSkeletonTool(Tools.SplitBone); + sm.skinningCache.events.shortcut.Invoke("#r"); + } + } + + [Shortcut("2D/Animation/Auto Geometry", typeof(InternalEditorBridge.ShortcutContext), KeyCode.A, ShortcutModifiers.Shift)] + private static void GenerateGeometryKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.SetMeshTool(Tools.GenerateGeometry); + sm.skinningCache.events.shortcut.Invoke("#a"); + } + } + + [Shortcut("2D/Animation/Edit Geometry", typeof(InternalEditorBridge.ShortcutContext), KeyCode.S, ShortcutModifiers.Shift)] + private static void MeshSelectionKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.SetMeshTool(Tools.EditGeometry); + sm.skinningCache.events.shortcut.Invoke("#s"); + } + } + + [Shortcut("2D/Animation/Create Vertex", typeof(InternalEditorBridge.ShortcutContext), KeyCode.J, ShortcutModifiers.Shift)] + private static void CreateVertex(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.SetMeshTool(Tools.CreateVertex); + sm.skinningCache.events.shortcut.Invoke("#d"); + } + } + + [Shortcut("2D/Animation/Create Edge", typeof(InternalEditorBridge.ShortcutContext), KeyCode.G, ShortcutModifiers.Shift)] + private static void CreateEdgeKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.SetMeshTool(Tools.CreateEdge); + sm.skinningCache.events.shortcut.Invoke("#g"); + } + } + + [Shortcut("2D/Animation/Split Edge", typeof(InternalEditorBridge.ShortcutContext), KeyCode.H, ShortcutModifiers.Shift)] + private static void SplitEdge(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.SetMeshTool(Tools.SplitEdge); + sm.skinningCache.events.shortcut.Invoke("#h"); + } + } + + [Shortcut("2D/Animation/Auto Weights", typeof(InternalEditorBridge.ShortcutContext), KeyCode.Z, ShortcutModifiers.Shift)] + private static void GenerateWeightsKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.SetWeightTool(Tools.GenerateWeights); + sm.skinningCache.events.shortcut.Invoke("#z"); + } + } + + [Shortcut("2D/Animation/Weight Slider", typeof(InternalEditorBridge.ShortcutContext), KeyCode.X, ShortcutModifiers.Shift)] + private static void WeightSliderKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.SetWeightTool(Tools.WeightSlider); + sm.skinningCache.events.shortcut.Invoke("#x"); + } + } + + [Shortcut("2D/Animation/Weight Brush", typeof(InternalEditorBridge.ShortcutContext), KeyCode.N, ShortcutModifiers.Shift)] + private static void WeightBrushKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.SetWeightTool(Tools.WeightBrush); + sm.skinningCache.events.shortcut.Invoke("#c"); + } + } + + [Shortcut("2D/Animation/Bone Influence", typeof(InternalEditorBridge.ShortcutContext), KeyCode.V, ShortcutModifiers.Shift)] + private static void BoneInfluenceKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled && sm.skinningCache.mode == SkinningMode.Character) + { + sm.SetWeightTool(Tools.BoneInfluence); + sm.skinningCache.events.shortcut.Invoke("#v"); + } + } + + [Shortcut("2D/Animation/Paste Panel Weights", typeof(InternalEditorBridge.ShortcutContext), KeyCode.B, ShortcutModifiers.Shift)] + private static void PastePanelKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.m_HorizontalToggleTools.TogglePasteTool(sm.currentTool); + sm.skinningCache.events.shortcut.Invoke("#b"); + } + } + + [Shortcut("2D/Animation/Visibility Panel", typeof(InternalEditorBridge.ShortcutContext), KeyCode.P, ShortcutModifiers.Shift)] + private static void VisibilityPanelKey(ShortcutArguments args) + { + var sm = GetModuleFromContext(args); + if (sm != null && !sm.spriteEditor.editingDisabled) + { + sm.m_HorizontalToggleTools.ToggleVisibilityTool(sm.currentTool); + sm.skinningCache.events.shortcut.Invoke("#p"); + } + } + + private void AddMainUI(VisualElement mainView) + { + var visualTree = ResourceLoader.Load("LayoutOverlay/LayoutOverlay.uxml"); + VisualElement clone = visualTree.CloneTree(); + m_LayoutOverlay = clone.Q("LayoutOverlay"); + + mainView.Add(m_LayoutOverlay); + m_LayoutOverlay.hasScrollbar = true; + m_LayoutOverlay.StretchToParentSize(); + + CreateBoneToolbar(); + CreateMeshToolbar(); + CreateWeightToolbar(); + + m_ShortcutContext = new InternalEditorBridge.ShortcutContext() + { + isActive = isFocused, + context = this + }; + InternalEditorBridge.RegisterShortcutContext(m_ShortcutContext); + InternalEditorBridge.AddEditorApplicationProjectLoadedCallback(OnProjectLoaded); + } + + private void OnProjectLoaded() + { + if (m_ShortcutContext != null) + InternalEditorBridge.RegisterShortcutContext(m_ShortcutContext); + } + + private void DoViewGUI() + { + if (spriteEditor.editingDisabled == m_BoneToolbar.enabledSelf) + { + m_BoneToolbar.SetEnabled(!spriteEditor.editingDisabled); + m_MeshToolbar.SetEnabled(!spriteEditor.editingDisabled); + m_WeightToolbar.SetEnabled(!spriteEditor.editingDisabled); + } + + if (spriteEditor.editingDisabled == m_LayoutOverlay.rightOverlay.enabledSelf) + { + m_LayoutOverlay.rightOverlay.SetEnabled(!spriteEditor.editingDisabled); + m_LayoutOverlay.rightOverlay.visible = !spriteEditor.editingDisabled; + } + } + + private bool isFocused() + { + return spriteEditor != null && (EditorWindow.focusedWindow == spriteEditor as EditorWindow); + } + + private void CreateBoneToolbar() + { + m_BoneToolbar = BoneToolbar.GenerateFromUXML(); + m_BoneToolbar.Setup(skinningCache); + m_LayoutOverlay.verticalToolbar.AddToContainer(m_BoneToolbar); + + m_BoneToolbar.SetSkeletonTool += SetSkeletonTool; + m_BoneToolbar.SetEnabled(!spriteEditor.editingDisabled); + } + + private void CreateMeshToolbar() + { + m_MeshToolbar = MeshToolbar.GenerateFromUXML(); + m_MeshToolbar.skinningCache = skinningCache; + m_LayoutOverlay.verticalToolbar.AddToContainer(m_MeshToolbar); + + m_MeshToolbar.SetMeshTool += SetMeshTool; + m_MeshToolbar.SetEnabled(!spriteEditor.editingDisabled); + } + + private void CreateWeightToolbar() + { + m_WeightToolbar = WeightToolbar.GenerateFromUXML(); + m_WeightToolbar.skinningCache = skinningCache; + m_LayoutOverlay.verticalToolbar.AddToContainer(m_WeightToolbar); + m_WeightToolbar.SetWeightTool += SetWeightTool; + m_WeightToolbar.SetEnabled(!spriteEditor.editingDisabled); + } + + private void SetSkeletonTool(Tools toolType) + { + var tool = skinningCache.GetTool(toolType) as SkeletonToolWrapper; + + if (currentTool == tool) + return; + + using (skinningCache.UndoScope(TextContent.setTool)) + { + ActivateTool(tool); + + if (tool.editBindPose) + skinningCache.RestoreBindPose(); + } + } + + private void SetMeshTool(Tools toolType) + { + var tool = skinningCache.GetTool(toolType); + + if (currentTool == tool) + return; + + using (skinningCache.UndoScope(TextContent.setTool)) + { + ActivateTool(tool); + skinningCache.RestoreBindPose(); + UnselectBones(); + } + } + + private void SetWeightTool(Tools toolType) + { + var tool = skinningCache.GetTool(toolType); + + if (currentTool == tool) + return; + + using (skinningCache.UndoScope(TextContent.setTool)) + { + ActivateTool(tool); + } + } + + private void ActivateTool(BaseTool tool) + { + m_ModuleToolGroup.ActivateTool(tool); + UpdateToggleState(); + skinningCache.events.toolChanged.Invoke(tool); + } + + private void UnselectBones() + { + skinningCache.skeletonSelection.Clear(); + skinningCache.events.boneSelectionChanged.Invoke(); + } + + private void UpdateToggleState() + { + Debug.Assert(m_BoneToolbar != null); + Debug.Assert(m_MeshToolbar != null); + Debug.Assert(m_WeightToolbar != null); + + m_BoneToolbar.UpdateToggleState(); + m_MeshToolbar.UpdateToggleState(); + m_WeightToolbar.UpdateToggleState(); + } + + private void RemoveMainUI(VisualElement mainView) + { + InternalEditorBridge.RemoveEditorApplicationProjectLoadedCallback(OnProjectLoaded); + InternalEditorBridge.UnregisterShortcutContext(m_ShortcutContext); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningModuleView.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningModuleView.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..40efd6e66ebe1ae0249789acc9e1138aac03c305 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningModuleView.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4ddf280179469e548a5aff8e5eec973c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningSerializer.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningSerializer.meta new file mode 100644 index 0000000000000000000000000000000000000000..acc85cec0759e862b0c7f5cb95d1e51a1cc748a3 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SkinningSerializer.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6a526b93b1b26d040a197bb4ffe84ba1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SpriteBoneInfluence.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SpriteBoneInfluence.meta new file mode 100644 index 0000000000000000000000000000000000000000..9448087901cdfe3c69648980fe4b9457318bbcae --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SpriteBoneInfluence.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ae8222a77d2168b45b8a300c2ae1300b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SpriteMeshData.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SpriteMeshData.meta new file mode 100644 index 0000000000000000000000000000000000000000..f3a2677fca5eccbad4aea9e021c81cf55ce5039b --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/SpriteMeshData.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 100c104341c6bfd4e824d8347fff1f87 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/TextContent.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/TextContent.cs new file mode 100644 index 0000000000000000000000000000000000000000..0ff96b113c2e06cbabde85d1d9a80e33ae5997ff --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Editor/SkinningModule/TextContent.cs @@ -0,0 +1,107 @@ +using UnityEngine; + +namespace UnityEditor.U2D.Animation +{ + internal static class TextContent + { + // Undo + public static string setMode = "Set Mode"; + public static string setTool = "Set Tool"; + public static string pasteData = "Paste Data"; + public static string generateGeometry = "Generate Geometry"; + public static string generateWeights = "Generate Weights"; + public static string normalizeWeights = "Normalize Weights"; + public static string clearWeights = "Clear Weights"; + public static string restorePose = "Restore Pose"; + public static string selection = "Selection"; + public static string clearSelection = "Clear Selection"; + public static string editWeights = "Edit Weights"; + public static string boneName = "Bone Name"; + public static string boneDepth = "Bone Depth"; + public static string rotateBone = "Rotate Bone"; + public static string moveBone = "Move Bone"; + public static string freeMoveBone = "Free Move Bone"; + public static string moveJoint = "Move Joint"; + public static string moveEndPoint = "Move End Point"; + public static string boneLength = "Bone Length"; + public static string createBone = "Create Bone"; + public static string splitBone = "Split Bone"; + public static string removeBone = "Remove Bone"; + public static string moveVertices = "Move Vertices"; + public static string createVertex = "Create Vertex"; + public static string createEdge = "Create Edge"; + public static string splitEdge = "Split Edge"; + public static string removeEdge = "Remove Edge"; + public static string removeVertices = "Remove Vertices"; + public static string selectionChange = "Selection Change"; + public static string boneVisibility = "Bone Visibility"; + public static string setParentBone = "Set Parent Bone"; + public static string visibilityChange = "VisibilityChange"; + public static string boneSelection = "Bone Selection"; + public static string expandBones = "Expand Bones"; + public static string meshVisibility = "Mesh Visibility"; + public static string meshOpacity = "Mesh Opacity"; + public static string opacityChange = "Opacity Change"; + + // Tooltips + public static string visibilityIconTooltip = "Visibility tool"; + public static string characterIconTooltip = "Restore bind pose"; + public static string spriteSheetIconTooltip = "Switch between Sprite sheet and Character mode"; + public static string copyTooltip = "Copy"; + public static string pasteTooltip = "Paste"; + public static string onTooltip = "On"; + public static string offTooltip = "Off"; + + // Horizontal tool bar button txt + public static string visibilityIconText = "Visibility"; + public static string characterIconText = "Reset Pose"; + public static string spriteSheetIconText = "Sprite Sheet"; + public static string copyText = "Copy"; + public static string pasteText = "Paste"; + + // Settings + public static string selectedOutlineColor = "Selected Outline Color"; + public static string spriteOutlineSize = "Sprite Outline Size"; + public static string boneOutlineSize = "Bone Outline Size"; + + // Sprite Library + public static string convertGroupToCategory = "Convert Group to Category"; + public static string newTrailingDots = "New..."; + public static string removeEmptyCategory = "Remove Empty Category"; + public static string convertLayerToCategory = "Convert Layer to Category"; + public static string clearAllCategory = "Clear All Category"; + public static string spriteCategoryChanged = "Sprite Category Changed"; + public static string spriteCategoryIndexChanged = "Sprite Category Index Changed"; + public static string category = "Category"; + public static string label = "Label"; + + // Other + public static string generatingGeometry = "Generating Geometry"; + public static string generatingWeights = "Generating Weights"; + public static string vertexWeight = "Vertex Weight"; + public static string vertexWeightToolTip = "Adjust bone weights for selected vertex"; + public static string bone = "Bone"; + public static string depth = "Depth"; + public static string sprite = "Sprite"; + public static string spriteVisibility = "SpriteVisibility"; + public static string name = "Name"; + public static string none = "None"; + public static string size = "Size"; + public static string visibilityTab = "Visibility Tab"; + public static string addBoneInfluence = "Add Bone Influence"; + public static string removeBoneInfluence = "Remove Bone Influence"; + public static string reorderBoneInfluence = "Reorder Bone Influence"; + public static string noSpriteSelected = "No sprite selected"; + public static string weightSlider = "Weight Slider"; + public static string weightBrush = "Weight Brush"; + public static string generateAll = "Generate All"; + public static string generate = "Generate"; + public static string smoothMeshError = "Generated mesh could not be smoothed. Please try using different parameters"; + public static string copyError1 = "Unable to convert copied data to Skinning Module paste data."; + public static string copyError2 = "There is no copied data to paste."; + public static string copyError3 = "Target has a different number of Sprites ({0}) compared to copied source ({1}) for Mesh copy."; + public static string mode = "Mode"; + public static string modeTooltip = "Different operation mode for weight adjustment"; + public static string boneToolTip = "The bone that is affecting"; + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/CCDSolver2DEditor.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/CCDSolver2DEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..87fbc727c3ea7374ba3908716f8efebc0678912c --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/CCDSolver2DEditor.cs @@ -0,0 +1,63 @@ +using UnityEngine; +using UnityEngine.U2D.IK; + +namespace UnityEditor.U2D.IK +{ + /// + /// Custom Inspector for CCDSolver2D. + /// + [CustomEditor(typeof(CCDSolver2D))] + [CanEditMultipleObjects] + public class CCDSolver2DEditor : Solver2DEditor + { + private static class Contents + { + public static readonly GUIContent effectorLabel = new GUIContent("Effector", "The last Transform of a hierarchy constrained by the target"); + public static readonly GUIContent targetLabel = new GUIContent("Target", "Transfrom which the effector will follow"); + public static readonly GUIContent chainLengthLabel = new GUIContent("Chain Length", "Number of Transforms handled by the IK"); + public static readonly GUIContent iterationsLabel = new GUIContent("Iterations", "Number of iterations the IK solver is run per frame"); + public static readonly GUIContent toleranceLabel = new GUIContent("Tolerance", "How close the target is to the goal to be considered as successful"); + public static readonly GUIContent velocityLabel = new GUIContent("Velocity", "How fast the chain elements rotate to the effector per iteration"); + } + + private SerializedProperty m_TargetProperty; + private SerializedProperty m_EffectorProperty; + private SerializedProperty m_TransformCountProperty; + + private SerializedProperty m_IterationsProperty; + private SerializedProperty m_ToleranceProperty; + private SerializedProperty m_VelocityProperty; + private CCDSolver2D m_Solver; + + private void OnEnable() + { + m_Solver = target as CCDSolver2D; + var chainProperty = serializedObject.FindProperty("m_Chain"); + m_TargetProperty = chainProperty.FindPropertyRelative("m_TargetTransform"); + m_EffectorProperty = chainProperty.FindPropertyRelative("m_EffectorTransform"); + m_TransformCountProperty = chainProperty.FindPropertyRelative("m_TransformCount"); + m_IterationsProperty = serializedObject.FindProperty("m_Iterations"); + m_ToleranceProperty = serializedObject.FindProperty("m_Tolerance"); + m_VelocityProperty = serializedObject.FindProperty("m_Velocity"); + } + + /// + /// Custom Inspector OnInspectorGUI override. + /// + public override void OnInspectorGUI() + { + IKChain2D chain = m_Solver.GetChain(0); + + serializedObject.Update(); + EditorGUILayout.PropertyField(m_EffectorProperty, Contents.effectorLabel); + EditorGUILayout.PropertyField(m_TargetProperty, Contents.targetLabel); + EditorGUILayout.IntSlider(m_TransformCountProperty, 0, IKUtility.GetMaxChainCount(chain), Contents.chainLengthLabel); + EditorGUILayout.PropertyField(m_IterationsProperty, Contents.iterationsLabel); + EditorGUILayout.PropertyField(m_ToleranceProperty, Contents.toleranceLabel); + EditorGUILayout.PropertyField(m_VelocityProperty, Contents.velocityLabel); + + DrawCommonSolverInspector(); + serializedObject.ApplyModifiedProperties(); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/CCDSolver2DEditor.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/CCDSolver2DEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..7e9f6e69a8456e7a7b2b90c3b6e982ac08a05a80 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/CCDSolver2DEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 089ed0d19d5c8124da97c7dc15838b97 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/FabrikSolver2DEditor.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/FabrikSolver2DEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..db3ed2191a5e6a53a82eac83a332711a8f341c42 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/FabrikSolver2DEditor.cs @@ -0,0 +1,59 @@ +using UnityEngine; +using UnityEngine.U2D.IK; + +namespace UnityEditor.U2D.IK +{ + /// + /// Custom Inspector for FabrikSolver2D. + /// + [CustomEditor(typeof(FabrikSolver2D))] + [CanEditMultipleObjects] + public class FabrikSolver2DEditor : Solver2DEditor + { + private static class Contents + { + public static readonly GUIContent effectorLabel = new GUIContent("Effector", "The last Transform of a hierarchy constrained by the target"); + public static readonly GUIContent targetLabel = new GUIContent("Target", "Transfrom which the effector will follow"); + public static readonly GUIContent chainLengthLabel = new GUIContent("Chain Length", "Number of Transforms handled by the IK"); + public static readonly GUIContent iterationsLabel = new GUIContent("Iterations", "Number of iterations the IK solver is run per frame"); + public static readonly GUIContent toleranceLabel = new GUIContent("Tolerance", "How close the target is to the goal to be considered as successful"); + } + + private SerializedProperty m_TargetProperty; + private SerializedProperty m_EffectorProperty; + private SerializedProperty m_TransformCountProperty; + private SerializedProperty m_IterationsProperty; + private SerializedProperty m_ToleranceProperty; + private FabrikSolver2D m_Solver; + + private void OnEnable() + { + m_Solver = target as FabrikSolver2D; + var chainProperty = serializedObject.FindProperty("m_Chain"); + m_TargetProperty = chainProperty.FindPropertyRelative("m_TargetTransform"); + m_EffectorProperty = chainProperty.FindPropertyRelative("m_EffectorTransform"); + m_TransformCountProperty = chainProperty.FindPropertyRelative("m_TransformCount"); + m_IterationsProperty = serializedObject.FindProperty("m_Iterations"); + m_ToleranceProperty = serializedObject.FindProperty("m_Tolerance"); + } + + /// + /// Custom Inspector OnInspectorGUI override. + /// + public override void OnInspectorGUI() + { + IKChain2D chain = m_Solver.GetChain(0); + + serializedObject.Update(); + EditorGUILayout.PropertyField(m_EffectorProperty, Contents.effectorLabel); + EditorGUILayout.PropertyField(m_TargetProperty, Contents.targetLabel); + EditorGUILayout.IntSlider(m_TransformCountProperty, 0, IKUtility.GetMaxChainCount(chain), Contents.chainLengthLabel); + EditorGUILayout.PropertyField(m_IterationsProperty, Contents.iterationsLabel); + EditorGUILayout.PropertyField(m_ToleranceProperty, Contents.toleranceLabel); + + DrawCommonSolverInspector(); + + serializedObject.ApplyModifiedProperties(); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/FabrikSolver2DEditor.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/FabrikSolver2DEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5e373572fd38f9cf910d6731357bfd4e9a47474b --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/FabrikSolver2DEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1bbf7e9905b18064197948bb9710c04d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/IKManager2DEditor.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/IKManager2DEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..1fcba39e865393941f51faf47e2c861fa5a12491 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/IKManager2DEditor.cs @@ -0,0 +1,219 @@ +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.U2D.IK; +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Linq; +using UnityEditor.U2D.Animation; + +namespace UnityEditor.U2D.IK +{ + /// + /// Custom Inspector for IKManager2D. + /// + [CustomEditor(typeof(IKManager2D))] + [CanEditMultipleObjects] + class IKManager2DEditor : Editor + { + private class Contents + { + public static readonly GUIContent findAllSolversLabel = new GUIContent("Find Solvers", "Find all applicable solvers handled by this manager"); + public static readonly GUIContent weightLabel = new GUIContent("Weight", "Blend between Forward and Inverse Kinematics"); + public static readonly string listHeaderLabel = "IK Solvers"; + public static readonly string createSolverString = "Create Solver"; + public static readonly string restoreDefaultPoseString = "Restore Default Pose"; + public static readonly GUIContent gizmoColorTooltip = new GUIContent("","Customizes the IK Chain's Gizmo color"); + public static int showGizmoPropertyWidth = 20; + public static int solverPropertyWidth = 100; + public static int solverColorPropertyWidth = 40; + public static readonly GUIContent gizmoVisibilityToolTip = new GUIContent("",L10n.Tr("Show/Hide Gizmo")); + public readonly GUIStyle visibilityToggleStyle; + + public Contents() + { + visibilityToggleStyle = new GUIStyle(); + visibilityToggleStyle.fixedWidth = EditorGUIUtility.singleLineHeight; + visibilityToggleStyle.onNormal.background = IconUtility.LoadIconResource("Visibility_Tool", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath); + visibilityToggleStyle.normal.background = IconUtility.LoadIconResource("Visibility_Hidded", IconUtility.k_LightIconResourcePath, IconUtility.k_DarkIconResourcePath); + } + } + + static Contents k_Contents; + private ReorderableList m_ReorderableList; + private Solver2D m_SelectedSolver; + private Editor m_SelectedSolverEditor; + + SerializedProperty m_SolversProperty; + SerializedProperty m_SolverEditorDataProperty; + SerializedProperty m_WeightProperty; + List m_SolverTypes; + IKManager2D m_Manager; + + private void OnEnable() + { + m_Manager = target as IKManager2D; + m_SolverTypes = GetDerivedTypes(); + m_SolversProperty = serializedObject.FindProperty("m_Solvers"); + m_SolverEditorDataProperty = serializedObject.FindProperty("m_SolverEditorData"); + m_WeightProperty = serializedObject.FindProperty("m_Weight"); + SetupReordeableList(); + } + + void SetupReordeableList() + { + m_ReorderableList = new ReorderableList(serializedObject, m_SolversProperty, true, true, true, true); + m_ReorderableList.drawHeaderCallback = (Rect rect) => + { + GUI.Label(rect, Contents.listHeaderLabel); + }; + m_ReorderableList.elementHeightCallback = (int index) => + { + return EditorGUIUtility.singleLineHeight + 6; + }; + m_ReorderableList.drawElementCallback = (Rect rect, int index, bool isactive, bool isfocused) => + { + rect.y += 2f; + rect.height = EditorGUIUtility.singleLineHeight; + SerializedProperty element = m_SolversProperty.GetArrayElementAtIndex(index); + SerializedProperty elementData = m_SolverEditorDataProperty.GetArrayElementAtIndex(index); + var width = rect.width; + rect.width = width > Contents.showGizmoPropertyWidth ? Contents.showGizmoPropertyWidth : width; + var showGizmoProperty = elementData.FindPropertyRelative("showGizmo"); + showGizmoProperty.boolValue = GUI.Toggle(rect, showGizmoProperty.boolValue, Contents.gizmoVisibilityToolTip, k_Contents.visibilityToggleStyle); + rect.x += rect.width; + width -= rect.width; + rect.width = width > Contents.solverPropertyWidth ? width - Contents.solverColorPropertyWidth : Contents.solverPropertyWidth; + EditorGUI.PropertyField(rect, element, GUIContent.none); + rect.x += rect.width; + width -= 100; + rect.width = width > Contents.solverColorPropertyWidth ? Contents.solverColorPropertyWidth : width; + EditorGUI.PropertyField(rect, elementData.FindPropertyRelative("color"), Contents.gizmoColorTooltip); + }; + m_ReorderableList.onAddCallback = (ReorderableList list) => + { + var menu = new GenericMenu(); + + foreach (Type type in m_SolverTypes) + { + Solver2DMenuAttribute attribute = Attribute.GetCustomAttribute(type, typeof(Solver2DMenuAttribute)) as Solver2DMenuAttribute; + + if (attribute != null) + menu.AddItem(new GUIContent(attribute.menuPath), false, OnSelectMenu, type); + else + menu.AddItem(new GUIContent(type.Name), false, OnSelectMenu, type); + } + + menu.ShowAsContext(); + }; + m_ReorderableList.onRemoveCallback = (ReorderableList list) => + { + Solver2D solver = m_Manager.solvers[list.index]; + if (solver) + { + Undo.RegisterCompleteObjectUndo(m_Manager, Undo.GetCurrentGroupName()); + + m_Manager.RemoveSolver(solver); + + GameObject solverGO = solver.gameObject; + + if (solverGO.transform.childCount == 0) + Undo.DestroyObjectImmediate(solverGO); + else + Undo.DestroyObjectImmediate(solver); + + EditorUtility.SetDirty(m_Manager); + } + else + { + ReorderableList.defaultBehaviours.DoRemoveButton(list); + } + }; + } + + private void OnSelectMenu(object param) + { + Type solverType = param as Type; + + GameObject solverGO = new GameObject(GameObjectUtility.GetUniqueNameForSibling(m_Manager.transform, "New " + solverType.Name)); + solverGO.transform.SetParent(m_Manager.transform); + solverGO.transform.localPosition = Vector3.zero; + solverGO.transform.rotation = Quaternion.identity; + solverGO.transform.localScale = Vector3.one; + + Solver2D solver = solverGO.AddComponent(solverType) as Solver2D; + + Undo.RegisterCreatedObjectUndo(solverGO, Contents.createSolverString); + Undo.RegisterCompleteObjectUndo(m_Manager, Contents.createSolverString); + m_Manager.AddSolver(solver); + EditorUtility.SetDirty(m_Manager); + + Selection.activeGameObject = solverGO; + } + + /// + /// Custom Inspector OnInspectorGUI override. + /// + public override void OnInspectorGUI() + { + if(k_Contents == null) + k_Contents = new Contents(); + + serializedObject.Update(); + + EditorGUILayout.Space(); + + m_ReorderableList.DoLayoutList(); + + EditorGUILayout.Space(); + + EditorGUILayout.PropertyField(m_WeightProperty, Contents.weightLabel); + + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + + DoRestoreDefaultPoseButton(); + + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); + + serializedObject.ApplyModifiedProperties(); + } + + private void DoRestoreDefaultPoseButton() + { + if (GUILayout.Button(Contents.restoreDefaultPoseString, GUILayout.MaxWidth(150f))) + { + foreach (var l_target in targets) + { + var manager = l_target as IKManager2D; + + IKEditorManager.instance.Record(manager, Contents.restoreDefaultPoseString); + + foreach(var solver in manager.solvers) + { + for(int i = 0; i < solver.chainCount; ++i) + { + var chain = solver.GetChain(i); + chain.RestoreDefaultPose(solver.constrainRotation); + + if(chain.target) + { + chain.target.position = chain.effector.position; + chain.target.rotation = chain.effector.rotation; + } + } + } + + IKEditorManager.instance.UpdateManagerImmediate(manager, true); + } + } + } + + List GetDerivedTypes() where T : class + { + List types = Assembly.GetAssembly(typeof(T)).GetTypes().Where(myType => myType.IsClass && !myType.IsAbstract && myType.IsSubclassOf(typeof(T))).ToList(); + return types; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/IKManager2DEditor.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/IKManager2DEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6d1c17392aaa0217deab148451d13cfa53dd66bc --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/IKManager2DEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 774c00e683b6094459a1ed557b35694b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/LimbSolver2DEditor.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/LimbSolver2DEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..5dc2823c952b9712379b589b931e3ed4e9a72bb3 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/LimbSolver2DEditor.cs @@ -0,0 +1,44 @@ +using UnityEngine; +using UnityEngine.U2D.IK; + +namespace UnityEditor.U2D.IK +{ + /// + /// Custom Inspector for LimbSolver2D. + /// + [CustomEditor(typeof(LimbSolver2D))] + [CanEditMultipleObjects] + public class LimbSolver2DEditor : Solver2DEditor + { + private static class Contents + { + public static readonly GUIContent effectorLabel = new GUIContent("Effector", "The last Transform of a hierarchy constrained by the target"); + public static readonly GUIContent targetLabel = new GUIContent("Target", "Transfrom which the effector will follow"); + public static readonly GUIContent flipLabel = new GUIContent("Flip", "Select between the two possible solutions of the solver"); + } + + private SerializedProperty m_ChainProperty; + private SerializedProperty m_FlipProperty; + + private void OnEnable() + { + m_ChainProperty = serializedObject.FindProperty("m_Chain"); + m_FlipProperty = serializedObject.FindProperty("m_Flip"); + } + + /// + /// Custom Inspector OnInspectorGUI override. + /// + public override void OnInspectorGUI() + { + serializedObject.Update(); + EditorGUILayout.PropertyField(m_ChainProperty.FindPropertyRelative("m_EffectorTransform"), Contents.effectorLabel); + EditorGUILayout.PropertyField(m_ChainProperty.FindPropertyRelative("m_TargetTransform"), Contents.targetLabel); + EditorGUILayout.PropertyField(m_FlipProperty, Contents.flipLabel); + + DrawCommonSolverInspector(); + + serializedObject.ApplyModifiedProperties(); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/LimbSolver2DEditor.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/LimbSolver2DEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9b473e89415306968bf6e2172503d6c2ecccca60 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/LimbSolver2DEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 03bd69c1b56e1114794712e23f86f554 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/Solver2DEditor.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/Solver2DEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..88b5eda8129f81f83947c178bb721b2ce756621c --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/Solver2DEditor.cs @@ -0,0 +1,164 @@ +using UnityEngine; +using UnityEngine.U2D.IK; + +namespace UnityEditor.U2D.IK +{ + /// + /// Custom Inspector for Solver2D. + /// + [CustomEditor(typeof(Solver2D))] + [CanEditMultipleObjects] + public class Solver2DEditor : Editor + { + private static class Contents + { + public static readonly GUIContent constrainRotationLabel = new GUIContent("Constrain Rotation", "Set Effector's rotation to Target"); + public static readonly GUIContent solveFromDefaultPoseLabel = new GUIContent("Solve from Default Pose", "Restore transform's rotation to default value before solving the IK"); + public static readonly GUIContent weightLabel = new GUIContent("Weight", "Blend between Forward and Inverse Kinematics"); + public static readonly string restoreDefaultPoseString = "Restore Default Pose"; + public static readonly string createTargetString = "Create Target"; + } + + private SerializedProperty m_ConstrainRotationProperty; + private SerializedProperty m_SolveFromDefaultPoseProperty; + private SerializedProperty m_WeightProperty; + private SerializedProperty m_SolverColorProperty; + + private void SetupProperties() + { + if(m_ConstrainRotationProperty == null || m_SolveFromDefaultPoseProperty == null || m_WeightProperty == null) + { + m_ConstrainRotationProperty = serializedObject.FindProperty("m_ConstrainRotation"); + m_SolveFromDefaultPoseProperty = serializedObject.FindProperty("m_SolveFromDefaultPose"); + m_WeightProperty = serializedObject.FindProperty("m_Weight"); + } + } + + /// + /// Custom Inspector GUI for Solver2D. + /// + protected void DrawCommonSolverInspector() + { + SetupProperties(); + + EditorGUILayout.PropertyField(m_ConstrainRotationProperty, Contents.constrainRotationLabel); + EditorGUILayout.PropertyField(m_SolveFromDefaultPoseProperty, Contents.solveFromDefaultPoseLabel); + EditorGUILayout.PropertyField(m_WeightProperty, Contents.weightLabel); + + EditorGUILayout.Space(); + + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + + EditorGUI.BeginDisabledGroup(!EnableCreateTarget()); + DoCreateTargetButton(); + EditorGUI.EndDisabledGroup(); + + EditorGUI.BeginDisabledGroup(!EnableRestoreDefaultPose()); + DoRestoreDefaultPoseButton(); + EditorGUI.EndDisabledGroup(); + + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.Space(); + } + + private bool EnableRestoreDefaultPose() + { + foreach (var l_target in targets) + { + var solver = l_target as Solver2D; + + if (!solver.isValid || IKEditorManager.instance.FindManager(solver) == null) + continue; + + return true; + } + + return false; + } + + private bool EnableCreateTarget() + { + foreach (var l_target in targets) + { + var solver = l_target as Solver2D; + + if (!solver.isValid) + continue; + + for(int i = 0; i < solver.chainCount; ++i) + { + var chain = solver.GetChain(i); + + if(chain.target == null) + return true; + } + } + + return false; + } + + private void DoRestoreDefaultPoseButton() + { + if (GUILayout.Button(Contents.restoreDefaultPoseString, GUILayout.MaxWidth(150f))) + { + foreach (var l_target in targets) + { + var solver = l_target as Solver2D; + + if (!solver.isValid) + continue; + + IKEditorManager.instance.Record(solver, Contents.restoreDefaultPoseString); + + for(int i = 0; i < solver.chainCount; ++i) + { + var chain = solver.GetChain(i); + chain.RestoreDefaultPose(solver.constrainRotation); + + if(chain.target) + { + chain.target.position = chain.effector.position; + chain.target.rotation = chain.effector.rotation; + } + } + + IKEditorManager.instance.UpdateSolverImmediate(solver, true); + } + } + } + + private void DoCreateTargetButton() + { + if (GUILayout.Button(Contents.createTargetString, GUILayout.MaxWidth(125f))) + { + foreach (var l_target in targets) + { + var solver = l_target as Solver2D; + + if (!solver.isValid) + continue; + + for(int i = 0; i < solver.chainCount; ++i) + { + var chain = solver.GetChain(i); + + if(chain.target == null) + { + Undo.RegisterCompleteObjectUndo(solver, Contents.createTargetString); + + chain.target = new GameObject(GameObjectUtility.GetUniqueNameForSibling(solver.transform, solver.name + "_Target")).transform; + chain.target.SetParent(solver.transform); + chain.target.position = chain.effector.position; + chain.target.rotation = chain.effector.rotation; + + Undo.RegisterCreatedObjectUndo(chain.target.gameObject, Contents.createTargetString); + } + } + } + } + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/Solver2DEditor.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/Solver2DEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..69c0778df0e7096857f7eb4f1667fda2e0d8137f --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Editor/Inspectors/Solver2DEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4a4d0d0740dce7045a9925d5be120303 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/IKUtility.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/IKUtility.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..21b81e983c3b757d375caadb166d5833d6ab1549 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/IKUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b5fde14964733764c8c198a418b2eaaf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/LimbSolver2D.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/LimbSolver2D.cs new file mode 100644 index 0000000000000000000000000000000000000000..c63852814ec1be9980b46f6c5bc767e221f6818d --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/LimbSolver2D.cs @@ -0,0 +1,91 @@ +using System.Collections.Generic; +using UnityEngine.Scripting.APIUpdating; + +namespace UnityEngine.U2D.IK +{ + /// + /// Component for 2D Limb IK. + /// + [MovedFrom("UnityEngine.Experimental.U2D.IK")] + [Solver2DMenuAttribute("Limb")] + public class LimbSolver2D : Solver2D + { + [SerializeField] + private IKChain2D m_Chain = new IKChain2D(); + + [SerializeField] + private bool m_Flip; + private Vector3[] m_Positions = new Vector3[3]; + private float[] m_Lengths = new float[2]; + private float[] m_Angles = new float[2]; + + /// + /// Get Set for flip property. + /// + public bool flip + { + get { return m_Flip; } + set { m_Flip = value; } + } + + /// + /// Override base class DoInitialize. + /// + protected override void DoInitialize() + { + m_Chain.transformCount = m_Chain.effector == null || IKUtility.GetAncestorCount(m_Chain.effector) < 2 ? 0 : 3; + base.DoInitialize(); + } + + /// + /// Override base class GetChainCount. + /// + /// Always returns 1. + protected override int GetChainCount() + { + return 1; + } + + /// + /// Override base class GetChain. + /// + /// Index to query. + /// Returns IKChain2D for the Solver. + public override IKChain2D GetChain(int index) + { + return m_Chain; + } + + /// + /// Override base class DoPrepare. + /// + protected override void DoPrepare() + { + var lengths = m_Chain.lengths; + m_Positions[0] = m_Chain.transforms[0].position; + m_Positions[1] = m_Chain.transforms[1].position; + m_Positions[2] = m_Chain.transforms[2].position; + m_Lengths[0] = lengths[0]; + m_Lengths[1] = lengths[1]; + } + + /// + /// OVerride base class DoUpdateIK. + /// + /// List of effector positions. + protected override void DoUpdateIK(List effectorPositions) + { + Vector3 effectorPosition = effectorPositions[0]; + Vector2 effectorLocalPosition2D = m_Chain.transforms[0].InverseTransformPoint(effectorPosition); + effectorPosition = m_Chain.transforms[0].TransformPoint(effectorLocalPosition2D); + + if (effectorLocalPosition2D.sqrMagnitude > 0f && Limb.Solve(effectorPosition, m_Lengths, m_Positions, ref m_Angles)) + { + float flipSign = flip ? -1f : 1f; + m_Chain.transforms[0].localRotation *= Quaternion.FromToRotation(Vector3.right, effectorLocalPosition2D) * Quaternion.FromToRotation(m_Chain.transforms[1].localPosition, Vector3.right); + m_Chain.transforms[0].localRotation *= Quaternion.AngleAxis(flipSign * m_Angles[0], Vector3.forward); + m_Chain.transforms[1].localRotation *= Quaternion.FromToRotation(Vector3.right, m_Chain.transforms[1].InverseTransformPoint(effectorPosition)) * Quaternion.FromToRotation(m_Chain.transforms[2].localPosition, Vector3.right); + } + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/LimbSolver2D.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/LimbSolver2D.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6a880f28c90146bdc11475e1b5c27958dc5787d3 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/LimbSolver2D.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 30ae93fb156fc6d4c828c64571fc3edd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solver2D.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solver2D.cs new file mode 100644 index 0000000000000000000000000000000000000000..d4ea6052e489e981ffe5b1b9c6eb70b55082b8d8 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solver2D.cs @@ -0,0 +1,297 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Scripting.APIUpdating; +using UnityEngine.Serialization; + +namespace UnityEngine.U2D.IK +{ + /// + /// Abstract class for implementing a 2D IK Solver. + /// + [MovedFrom("UnityEngine.Experimental.U2D.IK")] + public abstract class Solver2D : MonoBehaviour + { + [SerializeField] + private bool m_ConstrainRotation = true; + [FormerlySerializedAs("m_RestoreDefaultPose")] + [SerializeField] + private bool m_SolveFromDefaultPose = true; + [SerializeField][Range(0f, 1f)] + private float m_Weight = 1f; + + private Plane m_Plane; + private List m_TargetPositions = new List(); + + /// + /// Returns the number of IKChain2D in the solver. + /// + public int chainCount + { + get { return GetChainCount(); } + } + + /// + /// Get Set for rotation constrain property. + /// + public bool constrainRotation + { + get { return m_ConstrainRotation; } + set { m_ConstrainRotation = value; } + } + + /// + /// Get Set for restoring default pose. + /// + public bool solveFromDefaultPose + { + get { return m_SolveFromDefaultPose; } + set { m_SolveFromDefaultPose = value; } + } + + /// + /// Returns true if the Solver2D is in a valid state. + /// + public bool isValid + { + get { return Validate(); } + } + + /// + /// Returns true if all chains in the Solver has a target. + /// + public bool allChainsHaveTargets + { + get { return HasTargets(); } + } + + /// + /// Get and Set Solver weights. + /// + public float weight + { + get { return m_Weight; } + set { m_Weight = Mathf.Clamp01(value); } + } + + private void OnEnable() {} + + /// + /// Validate and initialize the Solver. + /// + protected virtual void OnValidate() + { + m_Weight = Mathf.Clamp01(m_Weight); + + if (!isValid) + Initialize(); + } + + private bool Validate() + { + for (int i = 0; i < GetChainCount(); ++i) + { + var chain = GetChain(i); + if (!chain.isValid) + return false; + } + return DoValidate(); + } + + private bool HasTargets() + { + for (int i = 0; i < GetChainCount(); ++i) + { + var chain = GetChain(i); + if (chain.target == null) + return false; + } + return true; + } + + /// + /// Initializes the solver. + /// + public void Initialize() + { + DoInitialize(); + + for (int i = 0; i < GetChainCount(); ++i) + { + var chain = GetChain(i); + chain.Initialize(); + } + } + + private void Prepare() + { + var rootTransform = GetPlaneRootTransform(); + if (rootTransform != null) + { + m_Plane.normal = rootTransform.forward; + m_Plane.distance = -Vector3.Dot(m_Plane.normal, rootTransform.position); + } + + for (int i = 0; i < GetChainCount(); ++i) + { + var chain = GetChain(i); + var constrainTargetRotation = constrainRotation && chain.target != null; + + if (m_SolveFromDefaultPose) + chain.RestoreDefaultPose(constrainTargetRotation); + } + + DoPrepare(); + } + + private void PrepareEffectorPositions() + { + m_TargetPositions.Clear(); + + for (int i = 0; i < GetChainCount(); ++i) + { + var chain = GetChain(i); + + if (chain.target) + m_TargetPositions.Add(chain.target.position); + } + } + + /// + /// Perfom Solver IK update. + /// + /// Weight for position solving. + public void UpdateIK(float globalWeight) + { + if(allChainsHaveTargets) + { + PrepareEffectorPositions(); + UpdateIK(m_TargetPositions, globalWeight); + } + } + + /// + /// Perform Solver IK update. + /// + /// Positions of chain. + /// Weight for position solving. + public void UpdateIK(List positions, float globalWeight) + { + if(positions.Count != chainCount) + return; + + float finalWeight = globalWeight * weight; + if (finalWeight == 0f) + return; + + if (!isValid) + return; + + Prepare(); + + if (finalWeight < 1f) + StoreLocalRotations(); + + DoUpdateIK(positions); + + if (constrainRotation) + { + for (int i = 0; i < GetChainCount(); ++i) + { + var chain = GetChain(i); + + if (chain.target) + chain.effector.rotation = chain.target.rotation; + } + } + + if (finalWeight < 1f) + BlendFkToIk(finalWeight); + } + + private void StoreLocalRotations() + { + for (int i = 0; i < GetChainCount(); ++i) + { + var chain = GetChain(i); + chain.StoreLocalRotations(); + } + } + + private void BlendFkToIk(float finalWeight) + { + for (int i = 0; i < GetChainCount(); ++i) + { + var chain = GetChain(i); + var constrainTargetRotation = constrainRotation && chain.target != null; + chain.BlendFkToIk(finalWeight, constrainTargetRotation); + } + } + + /// + /// Override to return the IKChain2D at the given index. + /// + /// Index for IKChain2D. + /// + public abstract IKChain2D GetChain(int index); + + /// + /// OVerride to return the number of chains in the Solver + /// + /// Integer represents IKChain2D count. + protected abstract int GetChainCount(); + + /// + /// Override to perform Solver IK update + /// + /// Position of the effectors. + protected abstract void DoUpdateIK(List effectorPositions); + + /// + /// Override to perform custom validation. + /// + /// Returns true if the Solver is in a valid state. False otherwise. + protected virtual bool DoValidate() { return true; } + + /// + /// Override to perform initialize the solver + /// + protected virtual void DoInitialize() {} + + /// + /// Override to prepare the solver for update + /// + protected virtual void DoPrepare() {} + + /// + /// Override to return the root Unity Transform of the Solver. The default implementation returns the root + /// transform of the first chain. + /// + /// Unity Transform that represents the root. + protected virtual Transform GetPlaneRootTransform() + { + if (chainCount > 0) + return GetChain(0).rootTransform; + return null; + } + + /// + /// Convert a world position coordinate to the solver's plane space + /// + /// Vector3 representing world position + /// Converted position in solver's plane + protected Vector3 GetPointOnSolverPlane(Vector3 worldPosition) + { + return GetPlaneRootTransform().InverseTransformPoint(m_Plane.ClosestPointOnPlane(worldPosition)); + } + + /// + /// Convert a position from solver's plane to world coordinate + /// + /// Vector3 representing a position in the Solver's plane. + /// Converted position to world coordinate. + protected Vector3 GetWorldPositionFromSolverPlanePoint(Vector2 planePoint) + { + return GetPlaneRootTransform().TransformPoint(planePoint); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solver2D.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solver2D.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..848c96019ab0a7713ea87adbdc2c4d4ab109b775 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solver2D.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fd469cc9c7a046649b08db54fa8e1cca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solver2DMenuAttribute.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solver2DMenuAttribute.cs new file mode 100644 index 0000000000000000000000000000000000000000..6135c10a0726a713aac5b6f38518644fb371a425 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solver2DMenuAttribute.cs @@ -0,0 +1,33 @@ +using System; +using UnityEngine; +using UnityEngine.Scripting.APIUpdating; + +namespace UnityEngine.U2D.IK +{ + /// + /// Attribute to add a menu item in IKManager2D to create the Solver. + /// + [MovedFrom("UnityEngine.Experimental.U2D.IK")] + [AttributeUsage(AttributeTargets.Class)] + public sealed class Solver2DMenuAttribute : Attribute + { + string m_MenuPath; + + /// + /// Menu path. + /// + public string menuPath + { + get { return m_MenuPath; } + } + + /// + /// Constructor + /// + /// Menu item path. + public Solver2DMenuAttribute(string _menuPath) + { + m_MenuPath = _menuPath; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solver2DMenuAttribute.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solver2DMenuAttribute.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..39c94323553ad1ea458be9e2ee145ee386aed216 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solver2DMenuAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 36c1c6da648bfa14fb09e548b0f27446 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers.meta new file mode 100644 index 0000000000000000000000000000000000000000..8d6143b7dea07614619a1a48ca6a03783eb70018 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cb2349a660db25e4baf8732ed3668959 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/CCD2D.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/CCD2D.cs new file mode 100644 index 0000000000000000000000000000000000000000..837d6da22258e31342139ec84e5a8e7f8792e4ce --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/CCD2D.cs @@ -0,0 +1,60 @@ +using UnityEngine.Scripting.APIUpdating; + +namespace UnityEngine.U2D.IK +{ + /// + /// Utility for 2D based Cyclic Coordinate Descent (CCD) IK Solver. + /// + [MovedFrom("UnityEngine.Experimental.U2D.IK")] + public static class CCD2D + { + /// + /// Solve IK Chain based on CCD. + /// + /// Target position. + /// Forward vector for solver. + /// Solver iteration count. + /// Target position's tolerance. + /// Velocity towards target position. + /// Chain positions. + /// Returns true if solver successfully completes within iteration limit. False otherwise. + public static bool Solve(Vector3 targetPosition, Vector3 forward, int solverLimit, float tolerance, float velocity, ref Vector3[] positions) + { + int last = positions.Length - 1; + int iterations = 0; + float sqrTolerance = tolerance * tolerance; + float sqrDistanceToTarget = (targetPosition - positions[last]).sqrMagnitude; + while (sqrDistanceToTarget > sqrTolerance) + { + DoIteration(targetPosition, forward, last, velocity, ref positions); + sqrDistanceToTarget = (targetPosition - positions[last]).sqrMagnitude; + if (++iterations >= solverLimit) + break; + } + return iterations != 0; + } + + static void DoIteration(Vector3 targetPosition, Vector3 forward, int last, float velocity, ref Vector3[] positions) + { + for (int i = last - 1; i >= 0; --i) + { + Vector3 toTarget = targetPosition - positions[i]; + Vector3 toLast = positions[last] - positions[i]; + + float angle = Vector3.SignedAngle(toLast, toTarget, forward); + angle = Mathf.Lerp(0f, angle, velocity); + + Quaternion deltaRotation = Quaternion.AngleAxis(angle, forward); + for (int j = last; j > i; --j) + positions[j] = RotatePositionFrom(positions[j], positions[i], deltaRotation); + } + } + + static Vector3 RotatePositionFrom(Vector3 position, Vector3 pivot, Quaternion rotation) + { + Vector3 v = position - pivot; + v = rotation * v; + return pivot + v; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/CCD2D.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/CCD2D.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4b4254ea4d1f317c4ffb56ba4dd4d81717920bc7 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/CCD2D.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8016d85182d14704da1cf959d18ac860 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/FABRIK2D.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/FABRIK2D.cs new file mode 100644 index 0000000000000000000000000000000000000000..9f25808684a2b483081b5aa3bcfaf4e0fd7dd5d0 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/FABRIK2D.cs @@ -0,0 +1,171 @@ +using UnityEngine.Scripting.APIUpdating; + +namespace UnityEngine.U2D.IK +{ + /// + /// Structure to store FABRIK Chain data. + /// + [MovedFrom("UnityEngine.Experimental.U2D.IK")] + public struct FABRIKChain2D + { + public Vector2 first + { + get { return positions[0]; } + } + + public Vector2 last + { + get { return positions[positions.Length - 1]; } + } + + public Vector2 origin; + public Vector2 target; + public float sqrTolerance; + public Vector2[] positions; + public float[] lengths; + public int[] subChainIndices; + public Vector3[] worldPositions; + } + + /// + /// Utility for 2D Forward And Backward Reaching Inverse Kinematics (FABRIK) IK Solver. + /// + public static class FABRIK2D + { + /// + /// Solve IK based on FABRIK + /// + /// Target position. + /// Solver iteration count. + /// Target position's tolerance. + /// Length of the chains. + /// Chain positions. + /// Returns true if solver successfully completes within iteration limit. False otherwise. + public static bool Solve(Vector2 targetPosition, int solverLimit, float tolerance, float[] lengths, ref Vector2[] positions) + { + int last = positions.Length - 1; + int iterations = 0; + float sqrTolerance = tolerance * tolerance; + float sqrDistanceToTarget = (targetPosition - positions[last]).sqrMagnitude; + Vector2 originPosition = positions[0]; + while (sqrDistanceToTarget > sqrTolerance) + { + Forward(targetPosition, lengths, ref positions); + Backward(originPosition, lengths, ref positions); + sqrDistanceToTarget = (targetPosition - positions[last]).sqrMagnitude; + if (++iterations >= solverLimit) + break; + } + + // Return whether positions have changed + return iterations != 0; + } + + public static bool SolveChain(int solverLimit, ref FABRIKChain2D[] chains) + { + // Do a quick validation of the end points that it has not been solved + if (ValidateChain(chains)) + return false; + + // Validation failed, solve chain + for (int iterations = 0; iterations < solverLimit; ++iterations) + { + SolveForwardsChain(0, ref chains); + // Break if solution is solved + if (!SolveBackwardsChain(0, ref chains)) + break; + } + return true; + } + + static bool ValidateChain(FABRIKChain2D[] chains) + { + foreach (var chain in chains) + { + if (chain.subChainIndices.Length == 0 && (chain.target - chain.last).sqrMagnitude > chain.sqrTolerance) + return false; + } + return true; + } + + static void SolveForwardsChain(int idx, ref FABRIKChain2D[] chains) + { + var target = chains[idx].target; + if (chains[idx].subChainIndices.Length > 0) + { + target = Vector2.zero; + for (int i = 0; i < chains[idx].subChainIndices.Length; ++i) + { + var childIdx = chains[idx].subChainIndices[i]; + SolveForwardsChain(childIdx, ref chains); + target += chains[childIdx].first; + } + target = target / chains[idx].subChainIndices.Length; + } + Forward(target, chains[idx].lengths, ref chains[idx].positions); + } + + static bool SolveBackwardsChain(int idx, ref FABRIKChain2D[] chains) + { + bool notSolved = false; + Backward(chains[idx].origin, chains[idx].lengths, ref chains[idx].positions); + for (int i = 0; i < chains[idx].subChainIndices.Length; ++i) + { + var childIdx = chains[idx].subChainIndices[i]; + chains[childIdx].origin = chains[idx].last; + notSolved |= SolveBackwardsChain(childIdx, ref chains); + } + // Check if end point has reached the target + if (chains[idx].subChainIndices.Length == 0) + { + notSolved |= (chains[idx].target - chains[idx].last).sqrMagnitude > chains[idx].sqrTolerance; + } + return notSolved; + } + + static void Forward(Vector2 targetPosition, float[] lengths, ref Vector2[] positions) + { + var last = positions.Length - 1; + positions[last] = targetPosition; + for (int i = last - 1; i >= 0; --i) + { + var r = positions[i + 1] - positions[i]; + var l = lengths[i] / r.magnitude; + var position = (1f - l) * positions[i + 1] + l * positions[i]; + positions[i] = position; + } + } + + static void Backward(Vector2 originPosition, float[] lengths, ref Vector2[] positions) + { + positions[0] = originPosition; + var last = positions.Length - 1; + for (int i = 0; i < last; ++i) + { + var r = positions[i + 1] - positions[i]; + var l = lengths[i] / r.magnitude; + var position = (1f - l) * positions[i] + l * positions[i + 1]; + positions[i + 1] = position; + } + } + + // For constraints + static Vector2 ValidateJoint(Vector2 endPosition, Vector2 startPosition, Vector2 right, float min, float max) + { + var localDifference = endPosition - startPosition; + var angle = Vector2.SignedAngle(right, localDifference); + var validatedPosition = endPosition; + if (angle < min) + { + var minRotation = Quaternion.Euler(0f, 0f, min); + validatedPosition = startPosition + (Vector2)(minRotation * right * localDifference.magnitude); + } + else if (angle > max) + { + var maxRotation = Quaternion.Euler(0f, 0f, max); + validatedPosition = startPosition + (Vector2)(maxRotation * right * localDifference.magnitude); + } + return validatedPosition; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/FABRIK2D.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/FABRIK2D.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..26cf06debfc4bd4d7c094622b8c2e355b552330f --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/FABRIK2D.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6bd5cf21232960a4b846e6cba1798aee +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/Limb.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/Limb.cs new file mode 100644 index 0000000000000000000000000000000000000000..8fc404fcf5b1b142fa5607b91e13d706305bf7cd --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/Limb.cs @@ -0,0 +1,46 @@ +using UnityEngine.Scripting.APIUpdating; + +namespace UnityEngine.U2D.IK +{ + /// + /// Utility for 2D Limb IK Solver. + /// + [MovedFrom("UnityEngine.Experimental.U2D.IK")] + public static class Limb + { + /// + /// Solve based on Limb IK + /// + /// Target position. + /// Length of the chains. + /// Chain positions. + /// Output angles for the chain's position. + /// Always returns true. + public static bool Solve(Vector3 targetPosition, float[] lengths, Vector3[] positions, ref float[] outAngles) + { + outAngles[0] = 0f; + outAngles[1] = 0f; + + if (lengths[0] == 0f || lengths[1] == 0f) + return false; + + Vector3 startToEnd = targetPosition - positions[0]; + float distanceMagnitude = startToEnd.magnitude; + float sqrDistance = startToEnd.sqrMagnitude; + + float sqrParentLength = (lengths[0] * lengths[0]); + float sqrTargetLength = (lengths[1] * lengths[1]); + + float angle0Cos = (sqrDistance + sqrParentLength - sqrTargetLength) / (2f * lengths[0] * distanceMagnitude); + float angle1Cos = (sqrDistance - sqrParentLength - sqrTargetLength) / (2f * lengths[0] * lengths[1]); + + if ((angle0Cos >= -1f && angle0Cos <= 1f) && (angle1Cos >= -1f && angle1Cos <= 1f)) + { + outAngles[0] = Mathf.Acos(angle0Cos) * Mathf.Rad2Deg; + outAngles[1] = Mathf.Acos(angle1Cos) * Mathf.Rad2Deg; + } + + return true; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/Limb.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/Limb.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..37ea9f28a55be5c1ea0e9fe5ae83dc4dc5d29181 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Solvers/Limb.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 225c4acd316f96e48803d330638d757e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Unity.2D.IK.Runtime.asmdef b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Unity.2D.IK.Runtime.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..f9f7bc2615b25261a58dfbf2735203b273b422b2 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Unity.2D.IK.Runtime.asmdef @@ -0,0 +1,7 @@ +{ + "name": "Unity.2D.IK.Runtime", + "references": [], + "optionalUnityReferences": [], + "includePlatforms": [], + "excludePlatforms": [] +} \ No newline at end of file diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Unity.2D.IK.Runtime.asmdef.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Unity.2D.IK.Runtime.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..ccbf37dc398b0ec1969845f1ffbb57701c46cf8a --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/IK/Runtime/Unity.2D.IK.Runtime.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 88f14d179e7c91c4eac28302d69f32e1 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Geometry/Rectangle.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Geometry/Rectangle.cs new file mode 100644 index 0000000000000000000000000000000000000000..e40b4069d5c7051e3e351da09cfd709b1d3b0d1c --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Geometry/Rectangle.cs @@ -0,0 +1,190 @@ +// ----------------------------------------------------------------------- +// +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ +// +// ----------------------------------------------------------------------- + +namespace UnityEngine.U2D.Animation.TriangleNet + .Geometry +{ + using System; + using System.Collections.Generic; + + /// + /// A simple rectangle class. + /// + internal class Rectangle + { + double xmin, ymin, xmax, ymax; + + /// + /// Initializes a new instance of the class. + /// + public Rectangle() + { + this.xmin = this.ymin = double.MaxValue; + this.xmax = this.ymax = -double.MaxValue; + } + + public Rectangle(Rectangle other) + : this(other.Left, other.Bottom, other.Right, other.Top) + { + } + + /// + /// Initializes a new instance of the class + /// with predefined bounds. + /// + /// Minimum x value (left). + /// Minimum y value (bottom). + /// Width of the rectangle. + /// Height of the rectangle. + public Rectangle(double x, double y, double width, double height) + { + this.xmin = x; + this.ymin = y; + this.xmax = x + width; + this.ymax = y + height; + } + + /// + /// Gets the minimum x value (left boundary). + /// + public double Left + { + get { return xmin; } + } + + /// + /// Gets the maximum x value (right boundary). + /// + public double Right + { + get { return xmax; } + } + + /// + /// Gets the minimum y value (bottom boundary). + /// + public double Bottom + { + get { return ymin; } + } + + /// + /// Gets the maximum y value (top boundary). + /// + public double Top + { + get { return ymax; } + } + + /// + /// Gets the width of the rectangle. + /// + public double Width + { + get { return xmax - xmin; } + } + + /// + /// Gets the height of the rectangle. + /// + public double Height + { + get { return ymax - ymin; } + } + + /// + /// Update bounds. + /// + /// Add dx to left and right bounds. + /// Add dy to top and bottom bounds. + public void Resize(double dx, double dy) + { + xmin -= dx; + xmax += dx; + ymin -= dy; + ymax += dy; + } + + /// + /// Expand rectangle to include given point. + /// + /// Point. + public void Expand(Point p) + { + xmin = Math.Min(xmin, p.x); + ymin = Math.Min(ymin, p.y); + xmax = Math.Max(xmax, p.x); + ymax = Math.Max(ymax, p.y); + } + + /// + /// Expand rectangle to include a list of points. + /// + public void Expand(IEnumerable points) + { + foreach (var p in points) + { + Expand(p); + } + } + + /// + /// Expand rectangle to include given rectangle. + /// + /// X coordinate. + /// Y coordinate. + public void Expand(Rectangle other) + { + xmin = Math.Min(xmin, other.xmin); + ymin = Math.Min(ymin, other.ymin); + xmax = Math.Max(xmax, other.xmax); + ymax = Math.Max(ymax, other.ymax); + } + + /// + /// Check if given point is inside rectangle. + /// + /// Point to check. + /// Point to check. + /// Return true, if rectangle contains given point. + public bool Contains(double x, double y) + { + return ((x >= xmin) && (x <= xmax) && (y >= ymin) && (y <= ymax)); + } + + /// + /// Check if given point is inside rectangle. + /// + /// Point to check. + /// Return true, if rectangle contains given point. + public bool Contains(Point pt) + { + return Contains(pt.x, pt.y); + } + + /// + /// Check if this rectangle contains other rectangle. + /// + /// Rectangle to check. + /// Return true, if this rectangle contains given rectangle. + public bool Contains(Rectangle other) + { + return (xmin <= other.Left && other.Right <= xmax + && ymin <= other.Bottom && other.Top <= ymax); + } + + /// + /// Check if this rectangle intersects other rectangle. + /// + /// Rectangle to check. + /// Return true, if given rectangle intersects this rectangle. + public bool Intersects(Rectangle other) + { + return (other.Left < xmax && xmin < other.Right + && other.Bottom < ymax && ymin < other.Top); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Geometry/Rectangle.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Geometry/Rectangle.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..be1d72237007a80fe15a4ba95ac925e11438885a --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Geometry/Rectangle.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e6dab3a6b0e864d71a92072b3d3224c3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Geometry/RegionPointer.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Geometry/RegionPointer.cs new file mode 100644 index 0000000000000000000000000000000000000000..cc88ddf7628b58b9b0bd2c41a2a515ff1888f0bd --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Geometry/RegionPointer.cs @@ -0,0 +1,64 @@ +// ----------------------------------------------------------------------- +// +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ +// +// ----------------------------------------------------------------------- + +namespace UnityEngine.U2D.Animation.TriangleNet + .Geometry +{ + using System; + using System.Collections.Generic; + + /// + /// Pointer to a region in the mesh geometry. A region is a well-defined + /// subset of the geomerty (enclosed by subsegments). + /// + internal class RegionPointer + { + internal Point point; + internal int id; + internal double area; + + /// + /// Gets or sets a region area constraint. + /// + public double Area + { + get { return area; } + set + { + if (value < 0.0) + { + throw new ArgumentException("Area constraints must not be negative."); + } + area = value; + } + } + + /// + /// Initializes a new instance of the class. + /// + /// X coordinate of the region. + /// Y coordinate of the region. + /// Region id. + public RegionPointer(double x, double y, int id) + : this(x, y, id, 0.0) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// X coordinate of the region. + /// Y coordinate of the region. + /// Region id. + /// Area constraint. + public RegionPointer(double x, double y, int id, double area) + { + this.point = new Point(x, y); + this.id = id; + this.area = area; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/IO/IMeshFormat.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/IO/IMeshFormat.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d6264f0e8712cf60eb5284ee250fc05e623ad2b1 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/IO/IMeshFormat.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6376b9aaff8504ac697cd831a610f1e8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Logging/LogItem.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Logging/LogItem.cs new file mode 100644 index 0000000000000000000000000000000000000000..d012011be4d92c41240f665a5b01f25c49c5a7cd --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Logging/LogItem.cs @@ -0,0 +1,54 @@ +// ----------------------------------------------------------------------- +// +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ +// +// ----------------------------------------------------------------------- + +namespace UnityEngine.U2D.Animation.TriangleNet + .Logging +{ + using System; + + /// + /// Represents an item stored in the log. + /// + internal class LogItem : ILogItem + { + DateTime time; + LogLevel level; + string message; + string info; + + public DateTime Time + { + get { return time; } + } + + public LogLevel Level + { + get { return level; } + } + + public string Message + { + get { return message; } + } + + public string Info + { + get { return info; } + } + + public LogItem(LogLevel level, string message) + : this(level, message, "") + {} + + public LogItem(LogLevel level, string message, string info) + { + this.time = DateTime.Now; + this.level = level; + this.message = message; + this.info = info; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/ISmoother.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/ISmoother.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..70df6780ac001344e5b60edcbf796cda966221ba --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/ISmoother.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 35740bedfbcef470ab44b7b96930602b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/SimpleSmoother.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/SimpleSmoother.cs new file mode 100644 index 0000000000000000000000000000000000000000..208a4b4bd89d09831c51e998118ff951ef96193a --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/SimpleSmoother.cs @@ -0,0 +1,175 @@ +// ----------------------------------------------------------------------- +// +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ +// +// ----------------------------------------------------------------------- + +namespace UnityEngine.U2D.Animation.TriangleNet + .Smoothing +{ + using System.Linq; + using Animation.TriangleNet.Geometry; + using Animation.TriangleNet.Meshing; + using Animation.TriangleNet.Topology.DCEL; + using Animation.TriangleNet.Voronoi; + + /// + /// Simple mesh smoother implementation. + /// + /// + /// Vertices wich should not move (e.g. segment vertices) MUST have a + /// boundary mark greater than 0. + /// + internal class SimpleSmoother : ISmoother + { + TrianglePool pool; + Configuration config; + + IVoronoiFactory factory; + + ConstraintOptions options; + + /// + /// Initializes a new instance of the class. + /// + public SimpleSmoother() + : this(new VoronoiFactory()) + { + } + + /// + /// Initializes a new instance of the class. + /// + public SimpleSmoother(IVoronoiFactory factory) + { + this.factory = factory; + this.pool = new TrianglePool(); + + this.config = new Configuration( + () => RobustPredicates.Default, + () => pool.Restart()); + + this.options = new ConstraintOptions() { ConformingDelaunay = true }; + } + + /// + /// Initializes a new instance of the class. + /// + /// Voronoi object factory. + /// Configuration. + public SimpleSmoother(IVoronoiFactory factory, Configuration config) + { + this.factory = factory; + this.config = config; + + this.options = new ConstraintOptions() { ConformingDelaunay = true }; + } + + public void Smooth(IMesh mesh) + { + Smooth(mesh, 10); + } + + public void Smooth(IMesh mesh, int limit) + { + var smoothedMesh = (Mesh)mesh; + + var mesher = new GenericMesher(config); + var predicates = config.Predicates(); + + // The smoother should respect the mesh segment splitting behavior. + this.options.SegmentSplitting = smoothedMesh.behavior.NoBisect; + + // Take a few smoothing rounds (Lloyd's algorithm). + for (int i = 0; i < limit; i++) + { + Step(smoothedMesh, factory, predicates); + + // Actually, we only want to rebuild, if the mesh is no longer + // Delaunay. Flipping edges could be the right choice instead + // of re-triangulating... + smoothedMesh = (Mesh)mesher.Triangulate(Rebuild(smoothedMesh), options); + + factory.Reset(); + } + + smoothedMesh.CopyTo((Mesh)mesh); + } + + private void Step(Mesh mesh, IVoronoiFactory factory, IPredicates predicates) + { + var voronoi = new BoundedVoronoi(mesh, factory, predicates); + + if (!voronoi.IsConsistent()) + return; + + double x, y; + + foreach (var face in voronoi.Faces) + { + if (face.generator.label == 0) + { + Centroid(face, out x, out y); + + face.generator.x = x; + face.generator.y = y; + } + } + } + + /// + /// Calculate the centroid of a polygon. + /// + private void Centroid(Face face, out double x, out double y) + { + double ai, atmp = 0, xtmp = 0, ytmp = 0; + + var edge = face.Edge; + var first = edge.Next.ID; + + Point p, q; + + do + { + p = edge.Origin; + q = edge.Twin.Origin; + + ai = p.x * q.y - q.x * p.y; + atmp += ai; + xtmp += (q.x + p.x) * ai; + ytmp += (q.y + p.y) * ai; + + edge = edge.Next; + } + while (edge.Next.ID != first); + + x = xtmp / (3 * atmp); + y = ytmp / (3 * atmp); + + //area = atmp / 2; + } + + /// + /// Rebuild the input geometry. + /// + private Polygon Rebuild(Mesh mesh) + { + var data = new Polygon(mesh.vertices.Count); + + foreach (var v in mesh.vertices.Values) + { + // Reset to input vertex. + v.type = VertexType.InputVertex; + + data.Points.Add(v); + } + + data.Segments.AddRange(mesh.subsegs.Values.Cast()); + + data.Holes.AddRange(mesh.holes); + data.Regions.AddRange(mesh.regions); + + return data; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/SimpleSmoother.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/SimpleSmoother.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f2bde5e7514766ab361ad2a9a0e671eb5ef301f4 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/SimpleSmoother.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d0481896be8a94a678efd967e5309d04 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/VoronoiFactory.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/VoronoiFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..2920fc433def4da17d77e0db7a6b2bdb848ffdb2 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/VoronoiFactory.cs @@ -0,0 +1,201 @@ +namespace UnityEngine.U2D.Animation.TriangleNet + .Smoothing +{ + using System; + using Animation.TriangleNet.Topology.DCEL; + using Animation.TriangleNet.Voronoi; + + /// + /// Factory which re-uses objects in the smoothing loop to enhance performance. + /// + /// + /// See . + /// + class VoronoiFactory : IVoronoiFactory + { + ObjectPool vertices; + ObjectPool edges; + ObjectPool faces; + + public VoronoiFactory() + { + vertices = new ObjectPool(); + edges = new ObjectPool(); + faces = new ObjectPool(); + } + + public void Initialize(int vertexCount, int edgeCount, int faceCount) + { + vertices.Capacity = vertexCount; + edges.Capacity = edgeCount; + faces.Capacity = faceCount; + + for (int i = vertices.Count; i < vertexCount; i++) + { + vertices.Put(new Vertex(0, 0)); + } + + + for (int i = edges.Count; i < edgeCount; i++) + { + edges.Put(new HalfEdge(null)); + } + + for (int i = faces.Count; i < faceCount; i++) + { + faces.Put(new Face(null)); + } + + Reset(); + } + + public void Reset() + { + vertices.Release(); + edges.Release(); + faces.Release(); + } + + public Vertex CreateVertex(double x, double y) + { + Vertex vertex; + + if (vertices.TryGet(out vertex)) + { + vertex.x = x; + vertex.y = y; + vertex.leaving = null; + + return vertex; + } + + vertex = new Vertex(x, y); + + vertices.Put(vertex); + + return vertex; + } + + public HalfEdge CreateHalfEdge(Vertex origin, Face face) + { + HalfEdge edge; + + if (edges.TryGet(out edge)) + { + edge.origin = origin; + edge.face = face; + edge.next = null; + edge.twin = null; + + if (face != null && face.edge == null) + { + face.edge = edge; + } + + return edge; + } + + edge = new HalfEdge(origin, face); + + edges.Put(edge); + + return edge; + } + + public Face CreateFace(Geometry.Vertex vertex) + { + Face face; + + if (faces.TryGet(out face)) + { + face.id = vertex.id; + face.generator = vertex; + face.edge = null; + + return face; + } + + face = new Face(vertex); + + faces.Put(face); + + return face; + } + + class ObjectPool where T : class + { + int index, count; + + T[] pool; + + public int Count + { + get { return count; } + } + + + public int Capacity + { + get { return this.pool.Length; } + set { Resize(value); } + } + + public ObjectPool(int capacity = 3) + { + this.index = 0; + this.count = 0; + + this.pool = new T[capacity]; + } + + public ObjectPool(T[] pool) + { + this.index = 0; + this.count = 0; + + this.pool = pool; + } + + public bool TryGet(out T obj) + { + if (this.index < this.count) + { + obj = this.pool[this.index++]; + + return true; + } + + obj = null; + + return false; + } + + public void Put(T obj) + { + var capacity = this.pool.Length; + + if (capacity <= this.count) + { + Resize(2 * capacity); + } + + this.pool[this.count++] = obj; + + this.index++; + } + + public void Release() + { + this.index = 0; + } + + private void Resize(int size) + { + if (size > this.count) + { + Array.Resize(ref this.pool, size); + } + } + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/VoronoiFactory.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/VoronoiFactory.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..44d8453cacc16540da7c4a78846d2aa80c795b71 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Smoothing/VoronoiFactory.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fc487a3a8092e46c0879d9e74ba443aa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/AdjacencyMatrix.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/AdjacencyMatrix.cs new file mode 100644 index 0000000000000000000000000000000000000000..c05611a4e15785b06933b41c6c18d0128b216a45 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/AdjacencyMatrix.cs @@ -0,0 +1,286 @@ +// ----------------------------------------------------------------------- +// +// Original Matlab code by John Burkardt, Florida State University +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ +// +// ----------------------------------------------------------------------- + +namespace UnityEngine.U2D.Animation.TriangleNet + .Tools +{ + using System; + + /// + /// The adjacency matrix of the mesh. + /// + internal class AdjacencyMatrix + { + // Number of adjacency entries. + int nnz; + + // Pointers into the actual adjacency structure adj. Information about row k is + // stored in entries pcol(k) through pcol(k+1)-1 of adj. Size: N + 1 + int[] pcol; + + // The adjacency structure. For each row, it contains the column indices + // of the nonzero entries. Size: nnz + int[] irow; + + /// + /// Gets the number of columns (nodes of the mesh). + /// + public readonly int N; + + /// + /// Gets the column pointers. + /// + public int[] ColumnPointers + { + get { return pcol; } + } + + /// + /// Gets the row indices. + /// + public int[] RowIndices + { + get { return irow; } + } + + public AdjacencyMatrix(Mesh mesh) + { + this.N = mesh.vertices.Count; + + // Set up the adj_row adjacency pointer array. + this.pcol = AdjacencyCount(mesh); + this.nnz = pcol[N]; + + // Set up the adj adjacency array. + this.irow = AdjacencySet(mesh, this.pcol); + + SortIndices(); + } + + public AdjacencyMatrix(int[] pcol, int[] irow) + { + this.N = pcol.Length - 1; + + this.nnz = pcol[N]; + + this.pcol = pcol; + this.irow = irow; + + if (pcol[0] != 0) + { + throw new ArgumentException("Expected 0-based indexing.", "pcol"); + } + + if (irow.Length < nnz) + { + throw new ArgumentException(); + } + } + + /// + /// Computes the bandwidth of an adjacency matrix. + /// + /// Bandwidth of the adjacency matrix. + public int Bandwidth() + { + int band_hi; + int band_lo; + int col; + int i, j; + + band_lo = 0; + band_hi = 0; + + for (i = 0; i < N; i++) + { + for (j = pcol[i]; j < pcol[i + 1]; j++) + { + col = irow[j]; + band_lo = Math.Max(band_lo, i - col); + band_hi = Math.Max(band_hi, col - i); + } + } + + return band_lo + 1 + band_hi; + } + + #region Adjacency matrix + + /// + /// Counts adjacencies in a triangulation. + /// + /// + /// This routine is called to count the adjacencies, so that the + /// appropriate amount of memory can be set aside for storage when + /// the adjacency structure is created. + /// + /// The triangulation is assumed to involve 3-node triangles. + /// + /// Two nodes are "adjacent" if they are both nodes in some triangle. + /// Also, a node is considered to be adjacent to itself. + /// + int[] AdjacencyCount(Mesh mesh) + { + int n = N; + int n1, n2, n3; + int tid, nid; + + int[] pcol = new int[n + 1]; + + // Set every node to be adjacent to itself. + for (int i = 0; i < n; i++) + { + pcol[i] = 1; + } + + // Examine each triangle. + foreach (var tri in mesh.triangles) + { + tid = tri.id; + + n1 = tri.vertices[0].id; + n2 = tri.vertices[1].id; + n3 = tri.vertices[2].id; + + // Add edge (1,2) if this is the first occurrence, that is, if + // the edge (1,2) is on a boundary (nid <= 0) or if this triangle + // is the first of the pair in which the edge occurs (tid < nid). + nid = tri.neighbors[2].tri.id; + + if (nid < 0 || tid < nid) + { + pcol[n1] += 1; + pcol[n2] += 1; + } + + // Add edge (2,3). + nid = tri.neighbors[0].tri.id; + + if (nid < 0 || tid < nid) + { + pcol[n2] += 1; + pcol[n3] += 1; + } + + // Add edge (3,1). + nid = tri.neighbors[1].tri.id; + + if (nid < 0 || tid < nid) + { + pcol[n3] += 1; + pcol[n1] += 1; + } + } + + // We used PCOL to count the number of entries in each column. + // Convert it to pointers into the ADJ array. + for (int i = n; i > 0; i--) + { + pcol[i] = pcol[i - 1]; + } + + pcol[0] = 0; + for (int i = 1; i <= n; i++) + { + pcol[i] = pcol[i - 1] + pcol[i]; + } + + return pcol; + } + + /// + /// Sets adjacencies in a triangulation. + /// + /// + /// This routine can be used to create the compressed column storage + /// for a linear triangle finite element discretization of Poisson's + /// equation in two dimensions. + /// + int[] AdjacencySet(Mesh mesh, int[] pcol) + { + int n = this.N; + + int[] col = new int[n]; + + // Copy of the adjacency rows input. + Array.Copy(pcol, col, n); + + int i, nnz = pcol[n]; + + // Output list, stores the actual adjacency information. + int[] list = new int[nnz]; + + // Set every node to be adjacent to itself. + for (i = 0; i < n; i++) + { + list[col[i]] = i; + col[i] += 1; + } + + int n1, n2, n3; // Vertex numbers. + int tid, nid; // Triangle and neighbor id. + + // Examine each triangle. + foreach (var tri in mesh.triangles) + { + tid = tri.id; + + n1 = tri.vertices[0].id; + n2 = tri.vertices[1].id; + n3 = tri.vertices[2].id; + + // Add edge (1,2) if this is the first occurrence, that is, if + // the edge (1,2) is on a boundary (nid <= 0) or if this triangle + // is the first of the pair in which the edge occurs (tid < nid). + nid = tri.neighbors[2].tri.id; + + if (nid < 0 || tid < nid) + { + list[col[n1]++] = n2; + list[col[n2]++] = n1; + } + + // Add edge (2,3). + nid = tri.neighbors[0].tri.id; + + if (nid < 0 || tid < nid) + { + list[col[n2]++] = n3; + list[col[n3]++] = n2; + } + + // Add edge (3,1). + nid = tri.neighbors[1].tri.id; + + if (nid < 0 || tid < nid) + { + list[col[n1]++] = n3; + list[col[n3]++] = n1; + } + } + + return list; + } + + public void SortIndices() + { + int k1, k2, n = N; + + int[] list = this.irow; + + // Ascending sort the entries for each column. + for (int i = 0; i < n; i++) + { + k1 = pcol[i]; + k2 = pcol[i + 1]; + Array.Sort(list, k1, k2 - k1); + } + } + + #endregion + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/AdjacencyMatrix.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/AdjacencyMatrix.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ecd7ac52f64c60f17f1e144ab99531d35aa9d0ec --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/AdjacencyMatrix.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 826e5298bd8f8498a9a2f3a04a3b2fa9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/CuthillMcKee.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/CuthillMcKee.cs new file mode 100644 index 0000000000000000000000000000000000000000..41b5f10c3e40da072e74c5bcfd62b393147710af --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/CuthillMcKee.cs @@ -0,0 +1,676 @@ +// ----------------------------------------------------------------------- +// +// Original Matlab code by John Burkardt, Florida State University +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ +// +// ----------------------------------------------------------------------- + +namespace UnityEngine.U2D.Animation.TriangleNet + .Tools +{ + using System; + + /// + /// Applies the Cuthill and McKee renumbering algorithm to reduce the bandwidth of + /// the adjacency matrix associated with the mesh. + /// + internal class CuthillMcKee + { + // The adjacency matrix of the mesh. + AdjacencyMatrix matrix; + + /// + /// Gets the permutation vector for the Reverse Cuthill-McKee numbering. + /// + /// The mesh. + /// Permutation vector. + public int[] Renumber(Mesh mesh) + { + // Algorithm needs linear numbering of the nodes. + mesh.Renumber(NodeNumbering.Linear); + + return Renumber(new AdjacencyMatrix(mesh)); + } + + /// + /// Gets the permutation vector for the Reverse Cuthill-McKee numbering. + /// + /// The mesh. + /// Permutation vector. + public int[] Renumber(AdjacencyMatrix matrix) + { + this.matrix = matrix; + + int bandwidth1 = matrix.Bandwidth(); + + var pcol = matrix.ColumnPointers; + + // Adjust column pointers (1-based indexing). + Shift(pcol, true); + + // TODO: Make RCM work with 0-based matrix. + + // Compute the RCM permutation. + int[] perm = GenerateRcm(); + + int[] perm_inv = PermInverse(perm); + + int bandwidth2 = PermBandwidth(perm, perm_inv); + + if (Log.Verbose) + { + Log.Instance.Info(String.Format("Reverse Cuthill-McKee (Bandwidth: {0} > {1})", + bandwidth1, bandwidth2)); + } + + // Adjust column pointers (0-based indexing). + Shift(pcol, false); + + return perm_inv; + } + + #region RCM + + /// + /// Finds the reverse Cuthill-Mckee ordering for a general graph. + /// + /// The RCM ordering. + /// + /// For each connected component in the graph, the routine obtains + /// an ordering by calling RCM. + /// + int[] GenerateRcm() + { + // Number of nodes in the mesh. + int n = matrix.N; + + int[] perm = new int[n]; + + int i, num, root; + int iccsze = 0; + int level_num = 0; + + /// Index vector for a level structure. The level structure is stored in the + /// currently unused spaces in the permutation vector PERM. + int[] level_row = new int[n + 1]; + + /// Marks variables that have been numbered. + int[] mask = new int[n]; + + for (i = 0; i < n; i++) + { + mask[i] = 1; + } + + num = 1; + + for (i = 0; i < n; i++) + { + // For each masked connected component... + if (mask[i] != 0) + { + root = i; + + // Find a pseudo-peripheral node ROOT. The level structure found by + // ROOT_FIND is stored starting at PERM(NUM). + FindRoot(ref root, mask, ref level_num, level_row, perm, num - 1); + + // RCM orders the component using ROOT as the starting node. + Rcm(root, mask, perm, num - 1, ref iccsze); + + num += iccsze; + + // We can stop once every node is in one of the connected components. + if (n < num) + { + return perm; + } + } + } + + return perm; + } + + /// + /// RCM renumbers a connected component by the reverse Cuthill McKee algorithm. + /// + /// the node that defines the connected component. It is used as the starting + /// point for the RCM ordering. + /// Input/output, int MASK(NODE_NUM), a mask for the nodes. Only those nodes with + /// nonzero input mask values are considered by the routine. The nodes numbered by RCM will have + /// their mask values set to zero. + /// Output, int PERM(NODE_NUM), the RCM ordering. + /// Output, int ICCSZE, the size of the connected component that has been numbered. + /// the number of nodes. + /// + /// The connected component is specified by a node ROOT and a mask. + /// The numbering starts at the root node. + /// + /// An outline of the algorithm is as follows: + /// + /// X(1) = ROOT. + /// + /// for ( I = 1 to N-1) + /// Find all unlabeled neighbors of X(I), + /// assign them the next available labels, in order of increasing degree. + /// + /// When done, reverse the ordering. + /// + void Rcm(int root, int[] mask, int[] perm, int offset, ref int iccsze) + { + int[] pcol = matrix.ColumnPointers; + int[] irow = matrix.RowIndices; + + int fnbr; + int i, j, k, l; + int jstop, jstrt; + int lbegin, lnbr, lperm, lvlend; + int nbr, node; + + // Number of nodes in the mesh. + int n = matrix.N; + + /// Workspace, int DEG[NODE_NUM], a temporary vector used to hold + /// the degree of the nodes in the section graph specified by mask and root. + int[] deg = new int[n]; + + // Find the degrees of the nodes in the component specified by MASK and ROOT. + Degree(root, mask, deg, ref iccsze, perm, offset); + + mask[root] = 0; + + if (iccsze <= 1) + { + return; + } + + lvlend = 0; + lnbr = 1; + + // LBEGIN and LVLEND point to the beginning and + // the end of the current level respectively. + while (lvlend < lnbr) + { + lbegin = lvlend + 1; + lvlend = lnbr; + + for (i = lbegin; i <= lvlend; i++) + { + // For each node in the current level... + node = perm[offset + i - 1]; + jstrt = pcol[node]; + jstop = pcol[node + 1] - 1; + + // Find the unnumbered neighbors of NODE. + + // FNBR and LNBR point to the first and last neighbors + // of the current node in PERM. + fnbr = lnbr + 1; + + for (j = jstrt; j <= jstop; j++) + { + nbr = irow[j - 1]; + + if (mask[nbr] != 0) + { + lnbr += 1; + mask[nbr] = 0; + perm[offset + lnbr - 1] = nbr; + } + } + + // Node has neighbors + if (lnbr > fnbr) + { + // Sort the neighbors of NODE in increasing order by degree. + // Linear insertion is used. + k = fnbr; + + while (k < lnbr) + { + l = k; + k = k + 1; + nbr = perm[offset + k - 1]; + + while (fnbr < l) + { + lperm = perm[offset + l - 1]; + + if (deg[lperm - 1] <= deg[nbr - 1]) + { + break; + } + + perm[offset + l] = lperm; + l = l - 1; + } + perm[offset + l] = nbr; + } + } + } + } + + // We now have the Cuthill-McKee ordering. Reverse it. + ReverseVector(perm, offset, iccsze); + } + + /// + /// Finds a pseudo-peripheral node. + /// + /// On input, ROOT is a node in the the component of the graph for + /// which a pseudo-peripheral node is sought. On output, ROOT is the pseudo-peripheral + /// node obtained. + /// MASK[NODE_NUM], specifies a section subgraph. Nodes for which MASK + /// is zero are ignored by FNROOT. + /// Output, int LEVEL_NUM, is the number of levels in the level + /// structure rooted at the node ROOT. + /// Output, int LEVEL_ROW(NODE_NUM+1), the level structure array pair + /// containing the level structure found. + /// Output, int LEVEL(NODE_NUM), the level structure array pair + /// containing the level structure found. + /// the number of nodes. + /// + /// The diameter of a graph is the maximum distance (number of edges) + /// between any two nodes of the graph. + /// + /// The eccentricity of a node is the maximum distance between that + /// node and any other node of the graph. + /// + /// A peripheral node is a node whose eccentricity equals the + /// diameter of the graph. + /// + /// A pseudo-peripheral node is an approximation to a peripheral node; + /// it may be a peripheral node, but all we know is that we tried our + /// best. + /// + /// The routine is given a graph, and seeks pseudo-peripheral nodes, + /// using a modified version of the scheme of Gibbs, Poole and + /// Stockmeyer. It determines such a node for the section subgraph + /// specified by MASK and ROOT. + /// + /// The routine also determines the level structure associated with + /// the given pseudo-peripheral node; that is, how far each node + /// is from the pseudo-peripheral node. The level structure is + /// returned as a list of nodes LS, and pointers to the beginning + /// of the list of nodes that are at a distance of 0, 1, 2, ..., + /// NODE_NUM-1 from the pseudo-peripheral node. + /// + /// Reference: + /// Alan George, Joseph Liu, + /// Computer Solution of Large Sparse Positive Definite Systems, + /// Prentice Hall, 1981. + /// + /// Norman Gibbs, William Poole, Paul Stockmeyer, + /// An Algorithm for Reducing the Bandwidth and Profile of a Sparse Matrix, + /// SIAM Journal on Numerical Analysis, + /// Volume 13, pages 236-250, 1976. + /// + /// Norman Gibbs, + /// Algorithm 509: A Hybrid Profile Reduction Algorithm, + /// ACM Transactions on Mathematical Software, + /// Volume 2, pages 378-387, 1976. + /// + void FindRoot(ref int root, int[] mask, ref int level_num, int[] level_row, + int[] level, int offset) + { + int[] pcol = matrix.ColumnPointers; + int[] irow = matrix.RowIndices; + + int iccsze; + int j, jstrt; + int k, kstop, kstrt; + int mindeg; + int nghbor, ndeg; + int node; + int level_num2 = 0; + + // Determine the level structure rooted at ROOT. + GetLevelSet(ref root, mask, ref level_num, level_row, level, offset); + + // Count the number of nodes in this level structure. + iccsze = level_row[level_num] - 1; + + // Extreme cases: + // A complete graph has a level set of only a single level. + // Every node is equally good (or bad). + // or + // A "line graph" 0--0--0--0--0 has every node in its only level. + // By chance, we've stumbled on the ideal root. + if (level_num == 1 || level_num == iccsze) + { + return; + } + + // Pick any node from the last level that has minimum degree + // as the starting point to generate a new level set. + for (;;) + { + mindeg = iccsze; + + jstrt = level_row[level_num - 1]; + root = level[offset + jstrt - 1]; + + if (jstrt < iccsze) + { + for (j = jstrt; j <= iccsze; j++) + { + node = level[offset + j - 1]; + ndeg = 0; + kstrt = pcol[node - 1]; + kstop = pcol[node] - 1; + + for (k = kstrt; k <= kstop; k++) + { + nghbor = irow[k - 1]; + if (mask[nghbor] > 0) + { + ndeg += 1; + } + } + + if (ndeg < mindeg) + { + root = node; + mindeg = ndeg; + } + } + } + + // Generate the rooted level structure associated with this node. + GetLevelSet(ref root, mask, ref level_num2, level_row, level, offset); + + // If the number of levels did not increase, accept the new ROOT. + if (level_num2 <= level_num) + { + break; + } + + level_num = level_num2; + + // In the unlikely case that ROOT is one endpoint of a line graph, + // we can exit now. + if (iccsze <= level_num) + { + break; + } + } + } + + /// + /// Generates the connected level structure rooted at a given node. + /// + /// the node at which the level structure is to be rooted. + /// MASK[NODE_NUM]. On input, only nodes with nonzero MASK are to be processed. + /// On output, those nodes which were included in the level set have MASK set to 1. + /// Output, int LEVEL_NUM, the number of levels in the level structure. ROOT is + /// in level 1. The neighbors of ROOT are in level 2, and so on. + /// Output, int LEVEL_ROW[NODE_NUM+1], the rooted level structure. + /// Output, int LEVEL[NODE_NUM], the rooted level structure. + /// the number of nodes. + /// + /// Only nodes for which MASK is nonzero will be considered. + /// + /// The root node chosen by the user is assigned level 1, and masked. + /// All (unmasked) nodes reachable from a node in level 1 are + /// assigned level 2 and masked. The process continues until there + /// are no unmasked nodes adjacent to any node in the current level. + /// The number of levels may vary between 2 and NODE_NUM. + /// + /// Reference: + /// Alan George, Joseph Liu, + /// Computer Solution of Large Sparse Positive Definite Systems, + /// Prentice Hall, 1981. + /// + void GetLevelSet(ref int root, int[] mask, ref int level_num, int[] level_row, + int[] level, int offset) + { + int[] pcol = matrix.ColumnPointers; + int[] irow = matrix.RowIndices; + + int i, iccsze; + int j, jstop, jstrt; + int lbegin, lvlend, lvsize; + int nbr; + int node; + + mask[root] = 0; + level[offset] = root; + level_num = 0; + lvlend = 0; + iccsze = 1; + + // LBEGIN is the pointer to the beginning of the current level, and + // LVLEND points to the end of this level. + for (;;) + { + lbegin = lvlend + 1; + lvlend = iccsze; + level_num += 1; + level_row[level_num - 1] = lbegin; + + // Generate the next level by finding all the masked neighbors of nodes + // in the current level. + for (i = lbegin; i <= lvlend; i++) + { + node = level[offset + i - 1]; + jstrt = pcol[node]; + jstop = pcol[node + 1] - 1; + + for (j = jstrt; j <= jstop; j++) + { + nbr = irow[j - 1]; + + if (mask[nbr] != 0) + { + iccsze += 1; + level[offset + iccsze - 1] = nbr; + mask[nbr] = 0; + } + } + } + + // Compute the current level width (the number of nodes encountered.) + // If it is positive, generate the next level. + lvsize = iccsze - lvlend; + + if (lvsize <= 0) + { + break; + } + } + + level_row[level_num] = lvlend + 1; + + // Reset MASK to 1 for the nodes in the level structure. + for (i = 0; i < iccsze; i++) + { + mask[level[offset + i]] = 1; + } + } + + /// + /// Computes the degrees of the nodes in the connected component. + /// + /// the node that defines the connected component. + /// MASK[NODE_NUM], is nonzero for those nodes which are to be considered. + /// Output, int DEG[NODE_NUM], contains, for each node in the connected component, its degree. + /// Output, int ICCSIZE, the number of nodes in the connected component. + /// Output, int LS[NODE_NUM], stores in entries 1 through ICCSIZE the nodes in the + /// connected component, starting with ROOT, and proceeding by levels. + /// the number of nodes. + /// + /// The connected component is specified by MASK and ROOT. + /// Nodes for which MASK is zero are ignored. + /// + /// Reference: + /// Alan George, Joseph Liu, + /// Computer Solution of Large Sparse Positive Definite Systems, + /// Prentice Hall, 1981. + /// + void Degree(int root, int[] mask, int[] deg, ref int iccsze, int[] ls, int offset) + { + int[] pcol = matrix.ColumnPointers; + int[] irow = matrix.RowIndices; + + int i, ideg; + int j, jstop, jstrt; + int lbegin, lvlend; + int lvsize = 1; + int nbr, node; + + // The sign of ADJ_ROW(I) is used to indicate if node I has been considered. + ls[offset] = root; + pcol[root] = -pcol[root]; + lvlend = 0; + iccsze = 1; + + // If the current level width is nonzero, generate another level. + while (lvsize > 0) + { + // LBEGIN is the pointer to the beginning of the current level, and + // LVLEND points to the end of this level. + lbegin = lvlend + 1; + lvlend = iccsze; + + // Find the degrees of nodes in the current level, + // and at the same time, generate the next level. + for (i = lbegin; i <= lvlend; i++) + { + node = ls[offset + i - 1]; + jstrt = -pcol[node]; + jstop = Math.Abs(pcol[node + 1]) - 1; + ideg = 0; + + for (j = jstrt; j <= jstop; j++) + { + nbr = irow[j - 1]; + + if (mask[nbr] != 0) // EDIT: [nbr - 1] + { + ideg = ideg + 1; + + if (0 <= pcol[nbr]) // EDIT: [nbr - 1] + { + pcol[nbr] = -pcol[nbr]; // EDIT: [nbr - 1] + iccsze = iccsze + 1; + ls[offset + iccsze - 1] = nbr; + } + } + } + deg[node] = ideg; + } + + // Compute the current level width. + lvsize = iccsze - lvlend; + } + + // Reset ADJ_ROW to its correct sign and return. + for (i = 0; i < iccsze; i++) + { + node = ls[offset + i]; + pcol[node] = -pcol[node]; + } + } + + #endregion + + #region Tools + + /// + /// Computes the bandwidth of a permuted adjacency matrix. + /// + /// The permutation. + /// The inverse permutation. + /// Bandwidth of the permuted adjacency matrix. + /// + /// The matrix is defined by the adjacency information and a permutation. + /// The routine also computes the bandwidth and the size of the envelope. + /// + int PermBandwidth(int[] perm, int[] perm_inv) + { + int[] pcol = matrix.ColumnPointers; + int[] irow = matrix.RowIndices; + + int col, i, j; + + int band_lo = 0; + int band_hi = 0; + + int n = matrix.N; + + for (i = 0; i < n; i++) + { + for (j = pcol[perm[i]]; j < pcol[perm[i] + 1]; j++) + { + col = perm_inv[irow[j - 1]]; + band_lo = Math.Max(band_lo, i - col); + band_hi = Math.Max(band_hi, col - i); + } + } + + return band_lo + 1 + band_hi; + } + + /// + /// Produces the inverse of a given permutation. + /// + /// Number of items permuted. + /// PERM[N], a permutation. + /// The inverse permutation. + int[] PermInverse(int[] perm) + { + int n = matrix.N; + + int[] perm_inv = new int[n]; + + for (int i = 0; i < n; i++) + { + perm_inv[perm[i]] = i; + } + + return perm_inv; + } + + /// + /// Reverses the elements of an integer vector. + /// + /// number of entries in the array. + /// the array to be reversed. + /// + /// Input: + /// N = 5, + /// A = ( 11, 12, 13, 14, 15 ). + /// + /// Output: + /// A = ( 15, 14, 13, 12, 11 ). + /// + void ReverseVector(int[] a, int offset, int size) + { + int i; + int j; + + for (i = 0; i < size / 2; i++) + { + j = a[offset + i]; + a[offset + i] = a[offset + size - 1 - i]; + a[offset + size - 1 - i] = j; + } + } + + void Shift(int[] a, bool up) + { + int length = a.Length; + + if (up) + { + for (int i = 0; i < length; a[i]++, i++) ; + } + else + { + for (int i = 0; i < length; a[i]--, i++) ; + } + } + + #endregion + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/CuthillMcKee.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/CuthillMcKee.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f5b34e428238a0b90bf7b885560b9a2f52eb3ef6 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/CuthillMcKee.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0115a1541423b477a94d872384667321 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/Interpolation.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/Interpolation.cs new file mode 100644 index 0000000000000000000000000000000000000000..9fed7c57b573b2ac5d23dc660f4e2712e5975aef --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/Interpolation.cs @@ -0,0 +1,107 @@ +namespace UnityEngine.U2D.Animation.TriangleNet + .Tools +{ + using Animation.TriangleNet.Geometry; + + internal static class Interpolation + { +#if USE_ATTRIBS + /// + /// Linear interpolation of vertex attributes. + /// + /// The interpolation vertex. + /// The triangle containing the vertex. + /// The number of vertex attributes. + /// + /// The vertex is expected to lie inside the triangle. + /// + internal static void InterpolateAttributes(Vertex vertex, ITriangle triangle, int n) + { + Vertex org = triangle.GetVertex(0); + Vertex dest = triangle.GetVertex(1); + Vertex apex = triangle.GetVertex(2); + + double xdo, ydo, xao, yao; + double denominator; + double dx, dy; + double xi, eta; + + // Compute the circumcenter of the triangle. + xdo = dest.x - org.x; + ydo = dest.y - org.y; + xao = apex.x - org.x; + yao = apex.y - org.y; + + denominator = 0.5 / (xdo * yao - xao * ydo); + + //dx = (yao * dodist - ydo * aodist) * denominator; + //dy = (xdo * aodist - xao * dodist) * denominator; + + dx = vertex.x - org.x; + dy = vertex.y - org.y; + + // To interpolate vertex attributes for the new vertex, define a + // coordinate system with a xi-axis directed from the triangle's + // origin to its destination, and an eta-axis, directed from its + // origin to its apex. + xi = (yao * dx - xao * dy) * (2.0 * denominator); + eta = (xdo * dy - ydo * dx) * (2.0 * denominator); + + for (int i = 0; i < n; i++) + { + // Interpolate the vertex attributes. + vertex.attributes[i] = org.attributes[i] + + xi * (dest.attributes[i] - org.attributes[i]) + + eta * (apex.attributes[i] - org.attributes[i]); + } + } + +#endif + +#if USE_Z + /// + /// Linear interpolation of a scalar value. + /// + /// The interpolation point. + /// The triangle containing the point. + /// + /// The point is expected to lie inside the triangle. + /// + internal static void InterpolateZ(Point p, ITriangle triangle) + { + Vertex org = triangle.GetVertex(0); + Vertex dest = triangle.GetVertex(1); + Vertex apex = triangle.GetVertex(2); + + double xdo, ydo, xao, yao; + double denominator; + double dx, dy; + double xi, eta; + + // Compute the circumcenter of the triangle. + xdo = dest.x - org.x; + ydo = dest.y - org.y; + xao = apex.x - org.x; + yao = apex.y - org.y; + + denominator = 0.5 / (xdo * yao - xao * ydo); + + //dx = (yao * dodist - ydo * aodist) * denominator; + //dy = (xdo * aodist - xao * dodist) * denominator; + + dx = p.x - org.x; + dy = p.y - org.y; + + // To interpolate z value for the given point inserted, define a + // coordinate system with a xi-axis, directed from the triangle's + // origin to its destination, and an eta-axis, directed from its + // origin to its apex. + xi = (yao * dx - xao * dy) * (2.0 * denominator); + eta = (xdo * dy - ydo * dx) * (2.0 * denominator); + + p.z = org.z + xi * (dest.z - org.z) + eta * (apex.z - org.z); + } + +#endif + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/IntersectionHelper.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/IntersectionHelper.cs new file mode 100644 index 0000000000000000000000000000000000000000..3dd65da1c915160af897deea8965985fdc6860ee --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/IntersectionHelper.cs @@ -0,0 +1,226 @@ +// ----------------------------------------------------------------------- +// +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ +// +// ----------------------------------------------------------------------- + +namespace UnityEngine.U2D.Animation.TriangleNet + .Tools +{ + using Animation.TriangleNet.Geometry; + + internal static class IntersectionHelper + { + /// + /// Compute intersection of two segments. + /// + /// Segment 1 start point. + /// Segment 1 end point. + /// Segment 2 start point. + /// Segment 2 end point. + /// The intersection point. + /// + /// This is a special case of segment intersection. Since the calling algorithm assures + /// that a valid intersection exists, there's no need to check for any special cases. + /// + internal static void IntersectSegments(Point p0, Point p1, Point q0, Point q1, ref Point c0) + { + double ux = p1.x - p0.x; + double uy = p1.y - p0.y; + double vx = q1.x - q0.x; + double vy = q1.y - q0.y; + double wx = p0.x - q0.x; + double wy = p0.y - q0.y; + + double d = (ux * vy - uy * vx); + double s = (vx * wy - vy * wx) / d; + + // Intersection point + c0.x = p0.X + s * ux; + c0.y = p0.Y + s * uy; + } + + /// + /// Intersect segment with a bounding box. + /// + /// The clip rectangle. + /// Segment endpoint. + /// Segment endpoint. + /// The new location of p0. + /// The new location of p1. + /// Returns true, if segment is clipped. + /// + /// Based on Liang-Barsky function by Daniel White: + /// http://www.skytopia.com/project/articles/compsci/clipping.html + /// + internal static bool LiangBarsky(Rectangle rect, Point p0, Point p1, ref Point c0, ref Point c1) + { + // Define the x/y clipping values for the border. + double xmin = rect.Left; + double xmax = rect.Right; + double ymin = rect.Bottom; + double ymax = rect.Top; + + // Define the start and end points of the line. + double x0 = p0.X; + double y0 = p0.Y; + double x1 = p1.X; + double y1 = p1.Y; + + double t0 = 0.0; + double t1 = 1.0; + + double dx = x1 - x0; + double dy = y1 - y0; + + double p = 0.0, q = 0.0, r; + + for (int edge = 0; edge < 4; edge++) + { + // Traverse through left, right, bottom, top edges. + if (edge == 0) { p = -dx; q = -(xmin - x0); } + if (edge == 1) { p = dx; q = (xmax - x0); } + if (edge == 2) { p = -dy; q = -(ymin - y0); } + if (edge == 3) { p = dy; q = (ymax - y0); } + r = q / p; + if (p == 0 && q < 0) return false; // Don't draw line at all. (parallel line outside) + if (p < 0) + { + if (r > t1) return false; // Don't draw line at all. + else if (r > t0) t0 = r; // Line is clipped! + } + else if (p > 0) + { + if (r < t0) return false; // Don't draw line at all. + else if (r < t1) t1 = r; // Line is clipped! + } + } + + c0.X = x0 + t0 * dx; + c0.Y = y0 + t0 * dy; + c1.X = x0 + t1 * dx; + c1.Y = y0 + t1 * dy; + + return true; // (clipped) line is drawn + } + + /// + /// Intersect a ray with a bounding box. + /// + /// The clip rectangle. + /// The ray startpoint (inside the box). + /// Any point in ray direction (NOT the direction vector). + /// The intersection point. + /// Returns false, if startpoint is outside the box. + internal static bool BoxRayIntersection(Rectangle rect, Point p0, Point p1, ref Point c1) + { + return BoxRayIntersection(rect, p0, p1.x - p0.x, p1.y - p0.y, ref c1); + } + + /// + /// Intersect a ray with a bounding box. + /// + /// The clip rectangle. + /// The ray startpoint (inside the box). + /// X direction. + /// Y direction. + /// Returns false, if startpoint is outside the box. + internal static Point BoxRayIntersection(Rectangle rect, Point p, double dx, double dy) + { + var intersection = new Point(); + + if (BoxRayIntersection(rect, p, dx, dy, ref intersection)) + { + return intersection; + } + + return null; + } + + /// + /// Intersect a ray with a bounding box. + /// + /// The clip rectangle. + /// The ray startpoint (inside the box). + /// X direction. + /// Y direction. + /// The intersection point. + /// Returns false, if startpoint is outside the box. + internal static bool BoxRayIntersection(Rectangle rect, Point p, double dx, double dy, ref Point c) + { + double x = p.X; + double y = p.Y; + + double t1, x1, y1, t2, x2, y2; + + // Bounding box + double xmin = rect.Left; + double xmax = rect.Right; + double ymin = rect.Bottom; + double ymax = rect.Top; + + // Check if point is inside the bounds + if (x < xmin || x > xmax || y < ymin || y > ymax) + { + return false; + } + + // Calculate the cut through the vertical boundaries + if (dx < 0) + { + // Line going to the left: intersect with x = minX + t1 = (xmin - x) / dx; + x1 = xmin; + y1 = y + t1 * dy; + } + else if (dx > 0) + { + // Line going to the right: intersect with x = maxX + t1 = (xmax - x) / dx; + x1 = xmax; + y1 = y + t1 * dy; + } + else + { + // Line going straight up or down: no intersection possible + t1 = double.MaxValue; + x1 = y1 = 0; + } + + // Calculate the cut through upper and lower boundaries + if (dy < 0) + { + // Line going downwards: intersect with y = minY + t2 = (ymin - y) / dy; + x2 = x + t2 * dx; + y2 = ymin; + } + else if (dy > 0) + { + // Line going upwards: intersect with y = maxY + t2 = (ymax - y) / dy; + x2 = x + t2 * dx; + y2 = ymax; + } + else + { + // Horizontal line: no intersection possible + t2 = double.MaxValue; + x2 = y2 = 0; + } + + if (t1 < t2) + { + c.x = x1; + c.y = y1; + } + else + { + c.x = x2; + c.y = y2; + } + + return true; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/IntersectionHelper.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/IntersectionHelper.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..12aff2129c59d4f612c2200a0cd1726ca34d98e3 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/IntersectionHelper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5427b508fe0244b63ac33dac16710613 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/PolygonValidator.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/PolygonValidator.cs new file mode 100644 index 0000000000000000000000000000000000000000..d659f91aba2c8e357111e6416268312ec586d2e2 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/PolygonValidator.cs @@ -0,0 +1,246 @@ +// ----------------------------------------------------------------------- +// +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ +// +// ----------------------------------------------------------------------- + +namespace UnityEngine.U2D.Animation.TriangleNet + .Tools +{ + using System; + using System.Collections.Generic; + using Animation.TriangleNet.Geometry; + + internal static class PolygonValidator + { + /// + /// Test the polygon for consistency. + /// + internal static bool IsConsistent(IPolygon poly) + { + var logger = Log.Instance; + + var points = poly.Points; + + int horrors = 0; + + int i = 0; + int count = points.Count; + + if (count < 3) + { + logger.Warning("Polygon must have at least 3 vertices.", "PolygonValidator.IsConsistent()"); + return false; + } + + foreach (var p in points) + { + if (p == null) + { + horrors++; + logger.Warning(String.Format("Point {0} is null.", i), "PolygonValidator.IsConsistent()"); + } + else if (double.IsNaN(p.x) || double.IsNaN(p.y)) + { + horrors++; + logger.Warning(String.Format("Point {0} has invalid coordinates.", i), "PolygonValidator.IsConsistent()"); + } + else if (double.IsInfinity(p.x) || double.IsInfinity(p.y)) + { + horrors++; + logger.Warning(String.Format("Point {0} has invalid coordinates.", i), "PolygonValidator.IsConsistent()"); + } + + i++; + } + + i = 0; + + foreach (var seg in poly.Segments) + { + if (seg == null) + { + horrors++; + logger.Warning(String.Format("Segment {0} is null.", i), "PolygonValidator.IsConsistent()"); + + // Always abort if a NULL-segment is found. + return false; + } + + var p = seg.GetVertex(0); + var q = seg.GetVertex(1); + + if ((p.x == q.x) && (p.y == q.y)) + { + horrors++; + logger.Warning(String.Format("Endpoints of segment {0} are coincident (IDs {1} / {2}).", i, p.id, q.id), + "PolygonValidator.IsConsistent()"); + } + + i++; + } + + if (points[0].id == points[1].id) + { + horrors += CheckVertexIDs(poly, count); + } + else + { + horrors += CheckDuplicateIDs(poly); + } + + return horrors == 0; + } + + /// + /// Test the polygon for duplicate vertices. + /// + internal static bool HasDuplicateVertices(IPolygon poly) + { + var logger = Log.Instance; + + int horrors = 0; + + var points = poly.Points.ToArray(); + + VertexSorter.Sort(points); + + for (int i = 1; i < points.Length; i++) + { + if (points[i - 1] == points[i]) + { + horrors++; + logger.Warning(String.Format("Found duplicate point {0}.", points[i]), + "PolygonValidator.HasDuplicateVertices()"); + } + } + + return horrors > 0; + } + + /// + /// Test the polygon for 360 degree angles. + /// + /// The polygon. + /// The angle threshold. + internal static bool HasBadAngles(IPolygon poly, double threshold = 2e-12) + { + var logger = Log.Instance; + + int horrors = 0; + int i = 0; + + Point p0 = null, p1 = null; + Point q0, q1; + + int count = poly.Points.Count; + + foreach (var seg in poly.Segments) + { + q0 = p0; // Previous segment start point. + q1 = p1; // Previous segment end point. + + p0 = seg.GetVertex(0); // Current segment start point. + p1 = seg.GetVertex(1); // Current segment end point. + + if (p0 == p1 || q0 == q1) + { + // Ignore zero-length segments. + continue; + } + + if (q0 != null && q1 != null) + { + // The two segments are connected. + if (p0 == q1 && p1 != null) + { + if (IsBadAngle(q0, p0, p1, threshold)) + { + horrors++; + logger.Warning(String.Format("Bad segment angle found at index {0}.", i), + "PolygonValidator.HasBadAngles()"); + } + } + } + + i++; + } + + return horrors > 0; + } + + private static bool IsBadAngle(Point a, Point b, Point c, double threshold = 0.0) + { + double x = DotProduct(a, b, c); + double y = CrossProductLength(a, b, c); + + return Math.Abs(Math.Atan2(y, x)) <= threshold; + } + + // Returns the dot product . + private static double DotProduct(Point a, Point b, Point c) + { + // Calculate the dot product. + return (a.x - b.x) * (c.x - b.x) + (a.y - b.y) * (c.y - b.y); + } + + // Returns the length of cross product AB x BC. + private static double CrossProductLength(Point a, Point b, Point c) + { + // Calculate the Z coordinate of the cross product. + return (a.x - b.x) * (c.y - b.y) - (a.y - b.y) * (c.x - b.x); + } + + private static int CheckVertexIDs(IPolygon poly, int count) + { + var logger = Log.Instance; + + int horrors = 0; + + int i = 0; + + Vertex p, q; + + foreach (var seg in poly.Segments) + { + p = seg.GetVertex(0); + q = seg.GetVertex(1); + + if (p.id < 0 || p.id >= count) + { + horrors++; + logger.Warning(String.Format("Segment {0} has invalid startpoint.", i), + "PolygonValidator.IsConsistent()"); + } + + if (q.id < 0 || q.id >= count) + { + horrors++; + logger.Warning(String.Format("Segment {0} has invalid endpoint.", i), + "PolygonValidator.IsConsistent()"); + } + + i++; + } + + return horrors; + } + + private static int CheckDuplicateIDs(IPolygon poly) + { + var ids = new HashSet(); + + // Check for duplicate ids. + foreach (var p in poly.Points) + { + if (!ids.Add(p.id)) + { + Log.Instance.Warning("Found duplicate vertex ids.", "PolygonValidator.IsConsistent()"); + return 1; + } + } + + return 0; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/PolygonValidator.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/PolygonValidator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ec7c9f7b02daf08d1f04cd58ee68da7da34ea9e7 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/PolygonValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e7ad5906e3c5748eaa55d2843a8c129e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/QualityMeasure.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/QualityMeasure.cs new file mode 100644 index 0000000000000000000000000000000000000000..74ee32b1464edb282838bc4a07503f705e194f1c --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/QualityMeasure.cs @@ -0,0 +1,542 @@ +// ----------------------------------------------------------------------- +// +// Original Matlab code by John Burkardt, Florida State University +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ +// +// ----------------------------------------------------------------------- + +namespace UnityEngine.U2D.Animation.TriangleNet + .Tools +{ + using System; + using Animation.TriangleNet.Geometry; + + /// + /// Provides mesh quality information. + /// + /// + /// Given a triangle abc with points A (ax, ay), B (bx, by), C (cx, cy). + /// + /// The side lengths are given as + /// a = sqrt((cx - bx)^2 + (cy - by)^2) -- side BC opposite of A + /// b = sqrt((cx - ax)^2 + (cy - ay)^2) -- side CA opposite of B + /// c = sqrt((ax - bx)^2 + (ay - by)^2) -- side AB opposite of C + /// + /// The angles are given as + /// ang_a = acos((b^2 + c^2 - a^2) / (2 * b * c)) -- angle at A + /// ang_b = acos((c^2 + a^2 - b^2) / (2 * c * a)) -- angle at B + /// ang_c = acos((a^2 + b^2 - c^2) / (2 * a * b)) -- angle at C + /// + /// The semiperimeter is given as + /// s = (a + b + c) / 2 + /// + /// The area is given as + /// D = abs(ax * (by - cy) + bx * (cy - ay) + cx * (ay - by)) / 2 + /// = sqrt(s * (s - a) * (s - b) * (s - c)) + /// + /// The inradius is given as + /// r = D / s + /// + /// The circumradius is given as + /// R = a * b * c / (4 * D) + /// + /// The altitudes are given as + /// alt_a = 2 * D / a -- altitude above side a + /// alt_b = 2 * D / b -- altitude above side b + /// alt_c = 2 * D / c -- altitude above side c + /// + /// The aspect ratio may be given as the ratio of the longest to the + /// shortest edge or, more commonly as the ratio of the circumradius + /// to twice the inradius + /// ar = R / (2 * r) + /// = a * b * c / (8 * (s - a) * (s - b) * (s - c)) + /// = a * b * c / ((b + c - a) * (c + a - b) * (a + b - c)) + /// + internal class QualityMeasure + { + AreaMeasure areaMeasure; + AlphaMeasure alphaMeasure; + Q_Measure qMeasure; + + Mesh mesh; + + public QualityMeasure() + { + areaMeasure = new AreaMeasure(); + alphaMeasure = new AlphaMeasure(); + qMeasure = new Q_Measure(); + } + + #region Public properties + + /// + /// Minimum triangle area. + /// + public double AreaMinimum + { + get { return areaMeasure.area_min; } + } + + /// + /// Maximum triangle area. + /// + public double AreaMaximum + { + get { return areaMeasure.area_max; } + } + + /// + /// Ratio of maximum and minimum triangle area. + /// + public double AreaRatio + { + get { return areaMeasure.area_max / areaMeasure.area_min; } + } + + /// + /// Smallest angle. + /// + public double AlphaMinimum + { + get { return alphaMeasure.alpha_min; } + } + + /// + /// Maximum smallest angle. + /// + public double AlphaMaximum + { + get { return alphaMeasure.alpha_max; } + } + + /// + /// Average angle. + /// + public double AlphaAverage + { + get { return alphaMeasure.alpha_ave; } + } + + /// + /// Average angle weighted by area. + /// + public double AlphaArea + { + get { return alphaMeasure.alpha_area; } + } + + /// + /// Smallest aspect ratio. + /// + public double Q_Minimum + { + get { return qMeasure.q_min; } + } + + /// + /// Largest aspect ratio. + /// + public double Q_Maximum + { + get { return qMeasure.q_max; } + } + + /// + /// Average aspect ratio. + /// + public double Q_Average + { + get { return qMeasure.q_ave; } + } + + /// + /// Average aspect ratio weighted by area. + /// + public double Q_Area + { + get { return qMeasure.q_area; } + } + + #endregion + + public void Update(Mesh mesh) + { + this.mesh = mesh; + + // Reset all measures. + areaMeasure.Reset(); + alphaMeasure.Reset(); + qMeasure.Reset(); + + Compute(); + } + + private void Compute() + { + Point a, b, c; + double ab, bc, ca; + double lx, ly; + double area; + + int n = 0; + + foreach (var tri in mesh.triangles) + { + n++; + + a = tri.vertices[0]; + b = tri.vertices[1]; + c = tri.vertices[2]; + + lx = a.x - b.x; + ly = a.y - b.y; + ab = Math.Sqrt(lx * lx + ly * ly); + lx = b.x - c.x; + ly = b.y - c.y; + bc = Math.Sqrt(lx * lx + ly * ly); + lx = c.x - a.x; + ly = c.y - a.y; + ca = Math.Sqrt(lx * lx + ly * ly); + + area = areaMeasure.Measure(a, b, c); + alphaMeasure.Measure(ab, bc, ca, area); + qMeasure.Measure(ab, bc, ca, area); + } + + // Normalize measures + alphaMeasure.Normalize(n, areaMeasure.area_total); + qMeasure.Normalize(n, areaMeasure.area_total); + } + + /// + /// Determines the bandwidth of the coefficient matrix. + /// + /// Bandwidth of the coefficient matrix. + /// + /// The quantity computed here is the "geometric" bandwidth determined + /// by the finite element mesh alone. + /// + /// If a single finite element variable is associated with each node + /// of the mesh, and if the nodes and variables are numbered in the + /// same way, then the geometric bandwidth is the same as the bandwidth + /// of a typical finite element matrix. + /// + /// The bandwidth M is defined in terms of the lower and upper bandwidths: + /// + /// M = ML + 1 + MU + /// + /// where + /// + /// ML = maximum distance from any diagonal label to a nonzero + /// label in the same row, but earlier column, + /// + /// MU = maximum distance from any diagonal label to a nonzero + /// label in the same row, but later column. + /// + /// Because the finite element node adjacency relationship is symmetric, + /// we are guaranteed that ML = MU. + /// + public int Bandwidth() + { + if (mesh == null) return 0; + + // Lower and upper bandwidth of the matrix + int ml = 0, mu = 0; + + int gi, gj; + + foreach (var tri in mesh.triangles) + { + for (int j = 0; j < 3; j++) + { + gi = tri.GetVertex(j).id; + + for (int k = 0; k < 3; k++) + { + gj = tri.GetVertex(k).id; + + mu = Math.Max(mu, gj - gi); + ml = Math.Max(ml, gi - gj); + } + } + } + + return ml + 1 + mu; + } + + class AreaMeasure + { + // Minimum area + public double area_min = double.MaxValue; + // Maximum area + public double area_max = -double.MaxValue; + // Total area of geometry + public double area_total = 0; + // Nmber of triangles with zero area + public int area_zero = 0; + + /// + /// Reset all values. + /// + public void Reset() + { + area_min = double.MaxValue; + area_max = -double.MaxValue; + area_total = 0; + area_zero = 0; + } + + /// + /// Compute the area of given triangle. + /// + /// Triangle corner a. + /// Triangle corner b. + /// Triangle corner c. + /// Triangle area. + public double Measure(Point a, Point b, Point c) + { + double area = 0.5 * Math.Abs(a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y)); + + area_min = Math.Min(area_min, area); + area_max = Math.Max(area_max, area); + area_total += area; + + if (area == 0.0) + { + area_zero = area_zero + 1; + } + + return area; + } + } + + /// + /// The alpha measure determines the triangulated pointset quality. + /// + /// + /// The alpha measure evaluates the uniformity of the shapes of the triangles + /// defined by a triangulated pointset. + /// + /// We compute the minimum angle among all the triangles in the triangulated + /// dataset and divide by the maximum possible value (which, in degrees, + /// is 60). The best possible value is 1, and the worst 0. A good + /// triangulation should have an alpha score close to 1. + /// + class AlphaMeasure + { + // Minimum value over all triangles + public double alpha_min; + // Maximum value over all triangles + public double alpha_max; + // Value averaged over all triangles + public double alpha_ave; + // Value averaged over all triangles and weighted by area + public double alpha_area; + + /// + /// Reset all values. + /// + public void Reset() + { + alpha_min = double.MaxValue; + alpha_max = -double.MaxValue; + alpha_ave = 0; + alpha_area = 0; + } + + double acos(double c) + { + if (c <= -1.0) + { + return Math.PI; + } + else if (1.0 <= c) + { + return 0.0; + } + else + { + return Math.Acos(c); + } + } + + /// + /// Compute q value of given triangle. + /// + /// Side length ab. + /// Side length bc. + /// Side length ca. + /// Triangle area. + /// + public double Measure(double ab, double bc, double ca, double area) + { + double alpha = double.MaxValue; + + double ab2 = ab * ab; + double bc2 = bc * bc; + double ca2 = ca * ca; + + double a_angle; + double b_angle; + double c_angle; + + // Take care of a ridiculous special case. + if (ab == 0.0 && bc == 0.0 && ca == 0.0) + { + a_angle = 2.0 * Math.PI / 3.0; + b_angle = 2.0 * Math.PI / 3.0; + c_angle = 2.0 * Math.PI / 3.0; + } + else + { + if (ca == 0.0 || ab == 0.0) + { + a_angle = Math.PI; + } + else + { + a_angle = acos((ca2 + ab2 - bc2) / (2.0 * ca * ab)); + } + + if (ab == 0.0 || bc == 0.0) + { + b_angle = Math.PI; + } + else + { + b_angle = acos((ab2 + bc2 - ca2) / (2.0 * ab * bc)); + } + + if (bc == 0.0 || ca == 0.0) + { + c_angle = Math.PI; + } + else + { + c_angle = acos((bc2 + ca2 - ab2) / (2.0 * bc * ca)); + } + } + + alpha = Math.Min(alpha, a_angle); + alpha = Math.Min(alpha, b_angle); + alpha = Math.Min(alpha, c_angle); + + // Normalize angle from [0,pi/3] radians into qualities in [0,1]. + alpha = alpha * 3.0 / Math.PI; + + alpha_ave += alpha; + alpha_area += area * alpha; + + alpha_min = Math.Min(alpha, alpha_min); + alpha_max = Math.Max(alpha, alpha_max); + + return alpha; + } + + /// + /// Normalize values. + /// + public void Normalize(int n, double area_total) + { + if (n > 0) + { + alpha_ave /= n; + } + else + { + alpha_ave = 0.0; + } + + if (0.0 < area_total) + { + alpha_area /= area_total; + } + else + { + alpha_area = 0.0; + } + } + } + + /// + /// The Q measure determines the triangulated pointset quality. + /// + /// + /// The Q measure evaluates the uniformity of the shapes of the triangles + /// defined by a triangulated pointset. It uses the aspect ratio + /// + /// 2 * (incircle radius) / (circumcircle radius) + /// + /// In an ideally regular mesh, all triangles would have the same + /// equilateral shape, for which Q = 1. A good mesh would have + /// 0.5 < Q. + /// + class Q_Measure + { + // Minimum value over all triangles + public double q_min; + // Maximum value over all triangles + public double q_max; + // Average value + public double q_ave; + // Average value weighted by the area of each triangle + public double q_area; + + /// + /// Reset all values. + /// + public void Reset() + { + q_min = double.MaxValue; + q_max = -double.MaxValue; + q_ave = 0; + q_area = 0; + } + + /// + /// Compute q value of given triangle. + /// + /// Side length ab. + /// Side length bc. + /// Side length ca. + /// Triangle area. + /// + public double Measure(double ab, double bc, double ca, double area) + { + double q = (bc + ca - ab) * (ca + ab - bc) * (ab + bc - ca) / (ab * bc * ca); + + q_min = Math.Min(q_min, q); + q_max = Math.Max(q_max, q); + + q_ave += q; + q_area += q * area; + + return q; + } + + /// + /// Normalize values. + /// + public void Normalize(int n, double area_total) + { + if (n > 0) + { + q_ave /= n; + } + else + { + q_ave = 0.0; + } + + if (area_total > 0.0) + { + q_area /= area_total; + } + else + { + q_area = 0.0; + } + } + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/QualityMeasure.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/QualityMeasure.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a4947df18d4c93ef02bbc6bbb9e3dc4d36e0bbfe --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/QualityMeasure.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 187a6ce7f29024eab88bfc87e4b5312c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/Statistic.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/Statistic.cs new file mode 100644 index 0000000000000000000000000000000000000000..7329e5cca2e5e8f21a1012b06bda6add4b6aba18 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/Statistic.cs @@ -0,0 +1,539 @@ +// ----------------------------------------------------------------------- +// +// Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ +// +// ----------------------------------------------------------------------- + +namespace UnityEngine.U2D.Animation.TriangleNet + .Tools +{ + using System; + using Animation.TriangleNet.Topology; + using Animation.TriangleNet.Geometry; + + /// + /// Gather mesh statistics. + /// + internal class Statistic + { + #region Static members + + /// + /// Number of incircle tests performed. + /// + internal static long InCircleCount = 0; + internal static long InCircleAdaptCount = 0; + + /// + /// Number of counterclockwise tests performed. + /// + internal static long CounterClockwiseCount = 0; + internal static long CounterClockwiseAdaptCount = 0; + + /// + /// Number of 3D orientation tests performed. + /// + internal static long Orient3dCount = 0; + + /// + /// Number of right-of-hyperbola tests performed. + /// + internal static long HyperbolaCount = 0; + + /// + /// // Number of circumcenter calculations performed. + /// + internal static long CircumcenterCount = 0; + + /// + /// Number of circle top calculations performed. + /// + internal static long CircleTopCount = 0; + + /// + /// Number of vertex relocations. + /// + internal static long RelocationCount = 0; + + #endregion + + #region Properties + + double minEdge = 0; + /// + /// Gets the shortest edge. + /// + public double ShortestEdge { get { return minEdge; } } + + double maxEdge = 0; + /// + /// Gets the longest edge. + /// + public double LongestEdge { get { return maxEdge; } } + + // + double minAspect = 0; + /// + /// Gets the shortest altitude. + /// + public double ShortestAltitude { get { return minAspect; } } + + double maxAspect = 0; + /// + /// Gets the largest aspect ratio. + /// + public double LargestAspectRatio { get { return maxAspect; } } + + double minArea = 0; + /// + /// Gets the smallest area. + /// + public double SmallestArea { get { return minArea; } } + + double maxArea = 0; + /// + /// Gets the largest area. + /// + public double LargestArea { get { return maxArea; } } + + double minAngle = 0; + /// + /// Gets the smallest angle. + /// + public double SmallestAngle { get { return minAngle; } } + + double maxAngle = 0; + /// + /// Gets the largest angle. + /// + public double LargestAngle { get { return maxAngle; } } + + int[] angleTable; + /// + /// Gets the angle histogram. + /// + public int[] AngleHistogram { get { return angleTable; } } + + int[] minAngles; + /// + /// Gets the min angles histogram. + /// + public int[] MinAngleHistogram { get { return minAngles; } } + + int[] maxAngles; + /// + /// Gets the max angles histogram. + /// + public int[] MaxAngleHistogram { get { return maxAngles; } } + + double meshArea = 0; + /// + /// Gets the total mesh area. + /// + public double MeshArea { get { return meshArea; } } + #endregion + + #region Private methods + + private void GetAspectHistogram(Mesh mesh) + { + int[] aspecttable; + double[] ratiotable; + + aspecttable = new int[16]; + ratiotable = new double[] + { + 1.5, 2.0, 2.5, 3.0, 4.0, 6.0, 10.0, 15.0, 25.0, 50.0, + 100.0, 300.0, 1000.0, 10000.0, 100000.0, 0.0 + }; + + + Otri tri = default(Otri); + Vertex[] p = new Vertex[3]; + double[] dx = new double[3], dy = new double[3]; + double[] edgelength = new double[3]; + double triarea; + double trilongest2; + double triminaltitude2; + double triaspect2; + + int aspectindex; + int i, j, k; + + tri.orient = 0; + foreach (var t in mesh.triangles) + { + tri.tri = t; + p[0] = tri.Org(); + p[1] = tri.Dest(); + p[2] = tri.Apex(); + trilongest2 = 0.0; + + for (i = 0; i < 3; i++) + { + j = plus1Mod3[i]; + k = minus1Mod3[i]; + dx[i] = p[j].x - p[k].x; + dy[i] = p[j].y - p[k].y; + edgelength[i] = dx[i] * dx[i] + dy[i] * dy[i]; + if (edgelength[i] > trilongest2) + { + trilongest2 = edgelength[i]; + } + } + + //triarea = Primitives.CounterClockwise(p[0], p[1], p[2]); + triarea = Math.Abs((p[2].x - p[0].x) * (p[1].y - p[0].y) - + (p[1].x - p[0].x) * (p[2].y - p[0].y)) / 2.0; + + triminaltitude2 = triarea * triarea / trilongest2; + + triaspect2 = trilongest2 / triminaltitude2; + + aspectindex = 0; + while ((triaspect2 > ratiotable[aspectindex] * ratiotable[aspectindex]) && (aspectindex < 15)) + { + aspectindex++; + } + aspecttable[aspectindex]++; + } + } + + #endregion + + static readonly int[] plus1Mod3 = { 1, 2, 0 }; + static readonly int[] minus1Mod3 = { 2, 0, 1 }; + + /// + /// Update statistics about the quality of the mesh. + /// + /// + public void Update(Mesh mesh, int sampleDegrees) + { + Point[] p = new Point[3]; + + int k1, k2; + int degreeStep; + + //sampleDegrees = 36; // sample every 5 degrees + //sampleDegrees = 45; // sample every 4 degrees + sampleDegrees = 60; // sample every 3 degrees + + double[] cosSquareTable = new double[sampleDegrees / 2 - 1]; + double[] dx = new double[3]; + double[] dy = new double[3]; + double[] edgeLength = new double[3]; + double dotProduct; + double cosSquare; + double triArea; + double triLongest2; + double triMinAltitude2; + double triAspect2; + + double radconst = Math.PI / sampleDegrees; + double degconst = 180.0 / Math.PI; + + // New angle table + angleTable = new int[sampleDegrees]; + minAngles = new int[sampleDegrees]; + maxAngles = new int[sampleDegrees]; + + for (int i = 0; i < sampleDegrees / 2 - 1; i++) + { + cosSquareTable[i] = Math.Cos(radconst * (i + 1)); + cosSquareTable[i] = cosSquareTable[i] * cosSquareTable[i]; + } + for (int i = 0; i < sampleDegrees; i++) + { + angleTable[i] = 0; + } + + minAspect = mesh.bounds.Width + mesh.bounds.Height; + minAspect = minAspect * minAspect; + maxAspect = 0.0; + minEdge = minAspect; + maxEdge = 0.0; + minArea = minAspect; + maxArea = 0.0; + minAngle = 0.0; + maxAngle = 2.0; + meshArea = 0.0; + + bool acuteBiggest = true; + bool acuteBiggestTri = true; + + double triMinAngle, triMaxAngle = 1; + + foreach (var tri in mesh.triangles) + { + triMinAngle = 0; // Min angle: 0 < a < 60 degress + triMaxAngle = 1; // Max angle: 60 < a < 180 degress + + p[0] = tri.vertices[0]; + p[1] = tri.vertices[1]; + p[2] = tri.vertices[2]; + + triLongest2 = 0.0; + + for (int i = 0; i < 3; i++) + { + k1 = plus1Mod3[i]; + k2 = minus1Mod3[i]; + + dx[i] = p[k1].x - p[k2].x; + dy[i] = p[k1].y - p[k2].y; + + edgeLength[i] = dx[i] * dx[i] + dy[i] * dy[i]; + + if (edgeLength[i] > triLongest2) + { + triLongest2 = edgeLength[i]; + } + + if (edgeLength[i] > maxEdge) + { + maxEdge = edgeLength[i]; + } + + if (edgeLength[i] < minEdge) + { + minEdge = edgeLength[i]; + } + } + + //triarea = Primitives.CounterClockwise(p[0], p[1], p[2]); + triArea = Math.Abs((p[2].x - p[0].x) * (p[1].y - p[0].y) - + (p[1].x - p[0].x) * (p[2].y - p[0].y)); + + meshArea += triArea; + + if (triArea < minArea) + { + minArea = triArea; + } + + if (triArea > maxArea) + { + maxArea = triArea; + } + + triMinAltitude2 = triArea * triArea / triLongest2; + if (triMinAltitude2 < minAspect) + { + minAspect = triMinAltitude2; + } + + triAspect2 = triLongest2 / triMinAltitude2; + if (triAspect2 > maxAspect) + { + maxAspect = triAspect2; + } + + for (int i = 0; i < 3; i++) + { + k1 = plus1Mod3[i]; + k2 = minus1Mod3[i]; + + dotProduct = dx[k1] * dx[k2] + dy[k1] * dy[k2]; + cosSquare = dotProduct * dotProduct / (edgeLength[k1] * edgeLength[k2]); + degreeStep = sampleDegrees / 2 - 1; + + for (int j = degreeStep - 1; j >= 0; j--) + { + if (cosSquare > cosSquareTable[j]) + { + degreeStep = j; + } + } + + if (dotProduct <= 0.0) + { + angleTable[degreeStep]++; + if (cosSquare > minAngle) + { + minAngle = cosSquare; + } + if (acuteBiggest && (cosSquare < maxAngle)) + { + maxAngle = cosSquare; + } + + // Update min/max angle per triangle + if (cosSquare > triMinAngle) + { + triMinAngle = cosSquare; + } + if (acuteBiggestTri && (cosSquare < triMaxAngle)) + { + triMaxAngle = cosSquare; + } + } + else + { + angleTable[sampleDegrees - degreeStep - 1]++; + if (acuteBiggest || (cosSquare > maxAngle)) + { + maxAngle = cosSquare; + acuteBiggest = false; + } + + // Update max angle for (possibly non-acute) triangle + if (acuteBiggestTri || (cosSquare > triMaxAngle)) + { + triMaxAngle = cosSquare; + acuteBiggestTri = false; + } + } + } + + // Update min angle histogram + degreeStep = sampleDegrees / 2 - 1; + + for (int j = degreeStep - 1; j >= 0; j--) + { + if (triMinAngle > cosSquareTable[j]) + { + degreeStep = j; + } + } + minAngles[degreeStep]++; + + // Update max angle histogram + degreeStep = sampleDegrees / 2 - 1; + + for (int j = degreeStep - 1; j >= 0; j--) + { + if (triMaxAngle > cosSquareTable[j]) + { + degreeStep = j; + } + } + + if (acuteBiggestTri) + { + maxAngles[degreeStep]++; + } + else + { + maxAngles[sampleDegrees - degreeStep - 1]++; + } + + acuteBiggestTri = true; + } + + minEdge = Math.Sqrt(minEdge); + maxEdge = Math.Sqrt(maxEdge); + minAspect = Math.Sqrt(minAspect); + maxAspect = Math.Sqrt(maxAspect); + minArea *= 0.5; + maxArea *= 0.5; + if (minAngle >= 1.0) + { + minAngle = 0.0; + } + else + { + minAngle = degconst * Math.Acos(Math.Sqrt(minAngle)); + } + + if (maxAngle >= 1.0) + { + maxAngle = 180.0; + } + else + { + if (acuteBiggest) + { + maxAngle = degconst * Math.Acos(Math.Sqrt(maxAngle)); + } + else + { + maxAngle = 180.0 - degconst * Math.Acos(Math.Sqrt(maxAngle)); + } + } + } + + /// + /// Compute angle information for given triangle. + /// + /// The triangle to check. + /// Array of doubles (length 6). + /// + /// On return, the squared cosines of the minimum and maximum angle will + /// be stored at position data[0] and data[1] respectively. + /// If the triangle was obtuse, data[2] will be set to -1 and maximum angle + /// is computed as (pi - acos(sqrt(data[1]))). + /// + internal static void ComputeAngles(ITriangle triangle, double[] data) + { + double min = 0.0; + double max = 1.0; + + var va = triangle.GetVertex(0); + var vb = triangle.GetVertex(1); + var vc = triangle.GetVertex(2); + + double dxa = vb.x - vc.x; + double dya = vb.y - vc.y; + double lena = dxa * dxa + dya * dya; + + double dxb = vc.x - va.x; + double dyb = vc.y - va.y; + double lenb = dxb * dxb + dyb * dyb; + + double dxc = va.x - vb.x; + double dyc = va.y - vb.y; + double lenc = dxc * dxc + dyc * dyc; + + // Dot products. + double dota = data[0] = dxb * dxc + dyb * dyc; + double dotb = data[1] = dxc * dxa + dyc * dya; + double dotc = data[2] = dxa * dxb + dya * dyb; + + // Squared cosines. + data[3] = (dota * dota) / (lenb * lenc); + data[4] = (dotb * dotb) / (lenc * lena); + data[5] = (dotc * dotc) / (lena * lenb); + + // The sign of the dot product will tell us, if the angle is + // acute (value < 0) or obtuse (value > 0). + + bool acute = true; + + double cos, dot; + + for (int i = 0; i < 3; i++) + { + dot = data[i]; + cos = data[3 + i]; + + if (dot <= 0.0) + { + if (cos > min) + { + min = cos; + } + + if (acute && (cos < max)) + { + max = cos; + } + } + else + { + // Update max angle for (possibly non-acute) triangle + if (acute || (cos > max)) + { + max = cos; + acute = false; + } + } + } + + data[0] = min; + data[1] = max; + data[2] = acute ? 1.0 : -1.0; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/Statistic.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/Statistic.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3a0b9b1ea626d0bd3d0309d9625789911500ac99 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Runtime/Triangle/Tools/Statistic.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1af64e13882d6445bb141ef2f2810b17 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Samples~/AnimationSamples/Extras/Attachment Points/Animation/Animators/Fei.controller b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Samples~/AnimationSamples/Extras/Attachment Points/Animation/Animators/Fei.controller new file mode 100644 index 0000000000000000000000000000000000000000..a47b58c99003778dd9f0a9b639415b907fe89320 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Samples~/AnimationSamples/Extras/Attachment Points/Animation/Animators/Fei.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Fei + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 1107841084384880356} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &1102187081673533360 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Idle + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: b439db7d3d1cb447eaafb70df281c322, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &1107841084384880356 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 1102187081673533360} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 1102187081673533360} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Samples~/AnimationSamples/Extras/Attachment Points/Animation/Animators/Fei.controller.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Samples~/AnimationSamples/Extras/Attachment Points/Animation/Animators/Fei.controller.meta new file mode 100644 index 0000000000000000000000000000000000000000..78d06557e6d2b36f6dcf175a8d1d3586f0f18fb1 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Samples~/AnimationSamples/Extras/Attachment Points/Animation/Animators/Fei.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 948bdd5e35d6d4f84be7a921cbbb7a8d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Samples~/AnimationSamples/Extras/Attachment Points/Sprites/Fei.psb.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Samples~/AnimationSamples/Extras/Attachment Points/Sprites/Fei.psb.meta new file mode 100644 index 0000000000000000000000000000000000000000..3344f787203c2138f7c097e723a8675b2c43d616 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.animation@5.0.4/Samples~/AnimationSamples/Extras/Attachment Points/Sprites/Fei.psb.meta @@ -0,0 +1,5842 @@ +fileFormatVersion: 2 +guid: 11f8561e37dc241a2a5e29f925d39c10 +ScriptedImporter: + internalIDToNameTable: + - first: + 1: 100000 + second: Fei_GO/Fei_GO + - first: + 1: 100002 + second: Fei_GO/Fei_GO/amulet + - first: + 1: 100004 + second: Fei_GO/Fei_GO/body + - first: + 1: 100006 + second: Fei_GO/Fei_GO/bone_1 + - first: + 1: 100008 + second: Fei_GO/Fei_GO/bone_1/bone_2 + - first: + 1: 100010 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3 + - first: + 1: 100012 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/bone_4 + - first: + 1: 100014 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/bone_4/bone_5 + - first: + 1: 100016 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/bone_4/bone_5/bone_6 + - first: + 1: 100018 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/bone_4/bone_5/bone_6/bone_7 + - first: + 1: 100020 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/bone_8 + - first: + 1: 100022 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/bone_8/bone_9 + - first: + 1: 100024 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_10 + - first: + 1: 100026 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_10/bone_11 + - first: + 1: 100028 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_10/bone_11/bone_12 + - first: + 1: 100030 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_13 + - first: + 1: 100032 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_13/bone_14 + - first: + 1: 100034 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_13/bone_14/bone_15 + - first: + 1: 100036 + second: Fei_GO/Fei_GO/bone_1/bone_16 + - first: + 1: 100038 + second: Fei_GO/Fei_GO/bone_1/bone_16/bone_17 + - first: + 1: 100040 + second: Fei_GO/Fei_GO/bone_1/bone_16/bone_17/bone_18 + - first: + 1: 100042 + second: Fei_GO/Fei_GO/bone_1/bone_19 + - first: + 1: 100044 + second: Fei_GO/Fei_GO/bone_1/bone_19/bone_20 + - first: + 1: 100046 + second: Fei_GO/Fei_GO/bone_1/bone_19/bone_20/bone_21 + - first: + 1: 100048 + second: Fei_GO/Fei_GO/hair + - first: + 1: 100050 + second: Fei_GO/Fei_GO/head + - first: + 1: 100052 + second: Fei_GO/Fei_GO/left_arm + - first: + 1: 100054 + second: Fei_GO/Fei_GO/left_leg + - first: + 1: 100056 + second: Fei_GO/Fei_GO/right_arm + - first: + 1: 100058 + second: Fei_GO/Fei_GO/right_leg + - first: + 1: 100060 + second: Fei_GO/Fei_GO/scarf + - first: + 1: 100062 + second: Fei_GO/Fei_GO/staff + - first: + 4: 400000 + second: Fei_GO/Fei_GO/Transform + - first: + 4: 400002 + second: Fei_GO/Fei_GO/amulet/Transform + - first: + 4: 400004 + second: Fei_GO/Fei_GO/body/Transform + - first: + 4: 400006 + second: Fei_GO/Fei_GO/bone_1/Transform + - first: + 4: 400008 + second: Fei_GO/Fei_GO/bone_1/bone_2/Transform + - first: + 4: 400010 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/Transform + - first: + 4: 400012 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/bone_4/Transform + - first: + 4: 400014 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/bone_4/bone_5/Transform + - first: + 4: 400016 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/bone_4/bone_5/bone_6/Transform + - first: + 4: 400018 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/bone_4/bone_5/bone_6/bone_7/Transform + - first: + 4: 400020 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/bone_8/Transform + - first: + 4: 400022 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_3/bone_8/bone_9/Transform + - first: + 4: 400024 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_10/Transform + - first: + 4: 400026 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_10/bone_11/Transform + - first: + 4: 400028 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_10/bone_11/bone_12/Transform + - first: + 4: 400030 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_13/Transform + - first: + 4: 400032 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_13/bone_14/Transform + - first: + 4: 400034 + second: Fei_GO/Fei_GO/bone_1/bone_2/bone_13/bone_14/bone_15/Transform + - first: + 4: 400036 + second: Fei_GO/Fei_GO/bone_1/bone_16/Transform + - first: + 4: 400038 + second: Fei_GO/Fei_GO/bone_1/bone_16/bone_17/Transform + - first: + 4: 400040 + second: Fei_GO/Fei_GO/bone_1/bone_16/bone_17/bone_18/Transform + - first: + 4: 400042 + second: Fei_GO/Fei_GO/bone_1/bone_19/Transform + - first: + 4: 400044 + second: Fei_GO/Fei_GO/bone_1/bone_19/bone_20/Transform + - first: + 4: 400046 + second: Fei_GO/Fei_GO/bone_1/bone_19/bone_20/bone_21/Transform + - first: + 4: 400048 + second: Fei_GO/Fei_GO/hair/Transform + - first: + 4: 400050 + second: Fei_GO/Fei_GO/head/Transform + - first: + 4: 400052 + second: Fei_GO/Fei_GO/left_arm/Transform + - first: + 4: 400054 + second: Fei_GO/Fei_GO/left_leg/Transform + - first: + 4: 400056 + second: Fei_GO/Fei_GO/right_arm/Transform + - first: + 4: 400058 + second: Fei_GO/Fei_GO/right_leg/Transform + - first: + 4: 400060 + second: Fei_GO/Fei_GO/scarf/Transform + - first: + 4: 400062 + second: Fei_GO/Fei_GO/staff/Transform + - first: + 28: 2800000 + second: Fei + - first: + 114: 11400000 + second: Fei_GO/Fei_GO/amulet/MonoBehaviour-UnityEngine.Experimental.U2D.Animation.SpriteSkin + - first: + 114: 11400002 + second: Fei_GO/Fei_GO/body/MonoBehaviour-UnityEngine.Experimental.U2D.Animation.SpriteSkin + - first: + 114: 11400004 + second: Fei_GO/Fei_GO/hair/MonoBehaviour-UnityEngine.Experimental.U2D.Animation.SpriteSkin + - first: + 114: 11400006 + second: Fei_GO/Fei_GO/head/MonoBehaviour-UnityEngine.Experimental.U2D.Animation.SpriteSkin + - first: + 114: 11400008 + second: Fei_GO/Fei_GO/left_arm/MonoBehaviour-UnityEngine.Experimental.U2D.Animation.SpriteSkin + - first: + 114: 11400010 + second: Fei_GO/Fei_GO/left_leg/MonoBehaviour-UnityEngine.Experimental.U2D.Animation.SpriteSkin + - first: + 114: 11400012 + second: Fei_GO/Fei_GO/right_arm/MonoBehaviour-UnityEngine.Experimental.U2D.Animation.SpriteSkin + - first: + 114: 11400014 + second: Fei_GO/Fei_GO/right_leg/MonoBehaviour-UnityEngine.Experimental.U2D.Animation.SpriteSkin + - first: + 114: 11400016 + second: Fei_GO/Fei_GO/scarf/MonoBehaviour-UnityEngine.Experimental.U2D.Animation.SpriteSkin + - first: + 212: 21200000 + second: Fei_GO/Fei_GO/amulet/SpriteRenderer + - first: + 212: 21200002 + second: Fei_GO/Fei_GO/body/SpriteRenderer + - first: + 212: 21200004 + second: Fei_GO/Fei_GO/hair/SpriteRenderer + - first: + 212: 21200006 + second: Fei_GO/Fei_GO/head/SpriteRenderer + - first: + 212: 21200008 + second: Fei_GO/Fei_GO/left_arm/SpriteRenderer + - first: + 212: 21200010 + second: Fei_GO/Fei_GO/left_leg/SpriteRenderer + - first: + 212: 21200012 + second: Fei_GO/Fei_GO/right_arm/SpriteRenderer + - first: + 212: 21200014 + second: Fei_GO/Fei_GO/right_leg/SpriteRenderer + - first: + 212: 21200016 + second: Fei_GO/Fei_GO/scarf/SpriteRenderer + - first: + 212: 21200018 + second: Fei_GO/Fei_GO/staff/SpriteRenderer + - first: + 213: 21300020 + second: cf44d545c95fd45ebbe99184aaac0a39 + - first: + 213: 21300022 + second: 57b9ecaa719814f029e4e4686fd4d555 + - first: + 213: 21300024 + second: 7e863db180b2541e3b7950b0d141b30e + - first: + 213: 21300026 + second: 962cb5a157b5742efa2b3a947d434e51 + - first: + 213: 21300028 + second: 83f7e88a1e4f942b9abe24d6df284375 + - first: + 213: 21300030 + second: 703d679467bb24490b735f5a5f7eab8d + - first: + 213: 21300032 + second: 12cc9c394e45346cab5b6d41032eb97e + - first: + 213: 21300034 + second: 84650b44e56734f278c2bc42a1aa93b9 + - first: + 213: 21300036 + second: cf5beff8c01624c13a6de90188ee464b + - first: + 213: 21300038 + second: 38ccfbb4211824cda99aa288cb29f63e + - first: + 1001: 100100000 + second: Fei_GO + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: b2a9591990af98743ba3ff7cf1000886, type: 3} + textureImporterSettings: + alphaSource: 1 + mipMapMode: 0 + enableMipMap: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + convertToNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 1 + streamingMipmapsPriority: 0 + nPOTScale: 1 + sRGBTexture: 1 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + normalMap: 0 + textureFormat: 0 + maxTextureSize: 0 + lightmap: 0 + compressionQuality: 0 + linearTexture: 0 + grayScaleToAlpha: 0 + rGBM: 0 + cubemapConvolutionSteps: 0 + cubemapConvolutionExponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + spriteImportData: + - name: + originalName: + pivot: {x: 0, y: 0} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + spriteID: + internalID: 0 + spriteBone: [] + spriteOutline: [] + vertices: [] + spritePhysicsOutline: [] + indices: + edges: [] + tessellationDetail: 0 + parentGroupIndex: -1 + uvTransform: {x: 0, y: 0} + mosaicSpriteImportData: [] + rigSpriteImportData: + - name: staff + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 574 + y: 1220 + width: 145 + height: 1291 + spriteID: cf44d545c95fd45ebbe99184aaac0a39 + internalID: 0 + spriteBone: [] + spriteOutline: [] + vertices: [] + spritePhysicsOutline: [] + indices: + edges: [] + tessellationDetail: 0 + parentGroupIndex: -1 + uvTransform: {x: -1227, y: 839} + - name: head + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 4 + y: 4 + width: 1300 + height: 1208 + spriteID: 57b9ecaa719814f029e4e4686fd4d555 + internalID: 0 + spriteBone: + - name: bone_7 + position: {x: 149.02687, y: 0.0008187924, z: 0} + rotation: {x: 0, y: 0, z: 0.043436058, w: 0.9990563} + length: 372.56857 + parentId: 1 + - name: bone_6 + position: {x: 470.42276, y: 0.0000090985095, z: 0} + rotation: {x: 0, y: 0, z: 0.0002990523, w: 1} + length: 149.02692 + parentId: 2 + - name: bone_5 + position: {x: 410.07397, y: 0.00002944949, z: 0} + rotation: {x: 0, y: 0, z: 0.8314915, w: 0.55553764} + length: 470.42276 + parentId: 4 + - name: bone_3 + position: {x: 723.8313, y: 258.05676, z: 0} + rotation: {x: 0, y: 0, z: 0.802766, w: 0.5962942} + length: 554.6178 + parentId: -1 + - name: bone_4 + position: {x: 554.61774, y: -0.00007467513, z: 0} + rotation: {x: 0, y: 0, z: 0.34244314, w: 0.9395386} + length: 410.07382 + parentId: 3 + spriteOutline: [] + vertices: + - position: {x: 72.18799, y: 0.710022} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 77.90802, y: 6.0960083} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 118, y: 46.630005} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 163.996, y: 139.996} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 176, y: 234.014} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 160.48401, y: 340.458} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 152.57199, y: 444.194} + boneWeight: + weight0: 0.98273975 + weight1: 0.017260257 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 167.448, y: 474.318} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 216.59, y: 553.60803} + boneWeight: + weight0: 0.83349586 + weight1: 0.13544628 + weight2: 0.03105791 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 3 + boneIndex3: 0 + - position: {x: 285.402, y: 614.8} + boneWeight: + weight0: 0.61109173 + weight1: 0.3075798 + weight2: 0.08132852 + weight3: 0 + boneIndex0: 2 + boneIndex1: 3 + boneIndex2: 4 + boneIndex3: 0 + - position: {x: 232.33801, y: 518.562} + boneWeight: + weight0: 0.5569008 + weight1: 0.4206496 + weight2: 0.022449698 + weight3: 0 + boneIndex0: 3 + boneIndex1: 2 + boneIndex2: 4 + boneIndex3: 0 + - position: {x: 200.768, y: 414.412} + boneWeight: + weight0: 0.6637722 + weight1: 0.33622783 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 190.776, y: 337.194} + boneWeight: + weight0: 0.6893485 + weight1: 0.31065154 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 196.75, y: 312.064} + boneWeight: + weight0: 0.69043136 + weight1: 0.30956864 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 213.612, y: 306.756} + boneWeight: + weight0: 0.69170195 + weight1: 0.30829805 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 301.344, y: 313.014} + boneWeight: + weight0: 0.7284121 + weight1: 0.27158788 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 377.782, y: 296.88} + boneWeight: + weight0: 0.8113766 + weight1: 0.18862341 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 416.524, y: 206.956} + boneWeight: + weight0: 0.8678636 + weight1: 0.13213643 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 430.19202, y: 198.19199} + boneWeight: + weight0: 0.8683456 + weight1: 0.13165438 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 489.014, y: 260.988} + boneWeight: + weight0: 0.90467966 + weight1: 0.095320396 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 531.71, y: 228.29199} + boneWeight: + weight0: 0.9469932 + weight1: 0.05300685 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 633.558, y: 192.68399} + boneWeight: + weight0: 0.99999994 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 738.522, y: 164} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 806.376, y: 164.91199} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 897.83, y: 210.91599} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 981.17004, y: 287.938} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1029.652, y: 352.876} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1068.254, y: 395.746} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1115.796, y: 352.20398} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1126, y: 362.80402} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1125.402, y: 477.764} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1115.198, y: 586} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1148.9299, y: 594.87} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1213.134, y: 658.036} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1271.0139, y: 716.96} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1300, y: 774.106} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1289.332, y: 794.67} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1187.536, y: 839.4} + boneWeight: + weight0: 0.9702841 + weight1: 0.029715912 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 4 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1085.888, y: 882.174} + boneWeight: + weight0: 0.90413684 + weight1: 0.095863186 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 4 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 987.26, y: 930.416} + boneWeight: + weight0: 0.7639325 + weight1: 0.23606746 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 4 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 908.57996, y: 1001.386} + boneWeight: + weight0: 0.536738 + weight1: 0.46326205 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 4 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 844.21204, y: 1081.786} + boneWeight: + weight0: 0.67082494 + weight1: 0.32917508 + weight2: 0 + weight3: 0 + boneIndex0: 4 + boneIndex1: 3 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 756.422, y: 1139.098} + boneWeight: + weight0: 0.83546746 + weight1: 0.16453256 + weight2: 0 + weight3: 0 + boneIndex0: 4 + boneIndex1: 3 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 639.06, y: 1181.312} + boneWeight: + weight0: 0.9652347 + weight1: 0.034765325 + weight2: 0 + weight3: 0 + boneIndex0: 4 + boneIndex1: 3 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 534.274, y: 1208} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 4 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 438.35602, y: 1204} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 4 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 338.03, y: 1163.0139} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 4 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 246.332, y: 1096.33} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 4 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 172.31201, y: 1012.372} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 118.72998, y: 914.546} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 84.914, y: 810.45} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 64.471985, y: 705.534} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 64.94397, y: 613.762} + boneWeight: + weight0: 0.9855823 + weight1: 0.014417688 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 69.54797, y: 511.654} + boneWeight: + weight0: 0.98601395 + weight1: 0.013986048 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 66.57599, y: 480.008} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 54.236023, y: 393.56} + boneWeight: + weight0: 0.9012617 + weight1: 0.09873831 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 16.633972, y: 328.814} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 0, y: 269.298} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 0.84802246, y: 181.88599} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 16.71399, y: 88.69397} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 36.46997, y: 25.85199} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 56.486023, y: 0} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 768.54175, y: 772.35913} + boneWeight: + weight0: 0.8447156 + weight1: 0.15528437 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 4 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 800.75824, y: 491.54504} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 3 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 479.15353, y: 880.7092} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 4 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 545.5846, y: 564.69037} + boneWeight: + weight0: 0.937891 + weight1: 0.050322454 + weight2: 0.01178663 + weight3: 0 + boneIndex0: 3 + boneIndex1: 2 + boneIndex2: 4 + boneIndex3: 0 + spritePhysicsOutline: [] + indices: 010000003d0000003c0000003f00000015000000140000001300000010000000410000003f00000017000000160000000900000040000000410000003f00000019000000180000003f0000001a000000190000001f0000001b0000003f0000001b0000001e0000001d0000001b0000001d0000001c0000001b0000001a0000003f0000003f00000018000000170000001b0000001f0000001e0000003e000000400000002a0000003f000000410000003e00000014000000410000003f0000003e00000041000000400000003e00000029000000280000001f0000003e000000260000002300000022000000240000001f000000260000002500000025000000240000002200000027000000260000003e00000040000000310000003000000022000000210000002500000021000000200000001f000000400000002e0000002d0000002b0000002a000000400000002b000000400000002c0000002c000000400000002d000000290000003e0000002a00000028000000270000003e0000004100000014000000130000003f0000001600000015000000120000001100000013000000020000003c0000003b0000000400000039000000380000003a00000039000000040000003a000000030000003b0000003c00000002000000010000003a00000004000000030000003800000005000000040000000e0000000d0000000c0000000c0000000f0000000e0000000f0000000c0000000b0000000a000000100000000f00000003000000020000003b0000000600000037000000360000000800000035000000340000003d0000000100000000000000350000000700000036000000100000000a0000004100000006000000050000003700000008000000340000003300000009000000330000003200000031000000090000003200000006000000360000000700000007000000350000000800000025000000210000001f0000000a0000000f0000000b0000003e0000001f0000003f000000400000002f0000002e0000002f000000400000003000000009000000310000004000000009000000410000000a000000050000003800000037000000090000000800000033000000100000001300000011000000 + edges: + - {x: 0, y: 1} + - {x: 1, y: 2} + - {x: 2, y: 3} + - {x: 3, y: 4} + - {x: 4, y: 5} + - {x: 6, y: 5} + - {x: 6, y: 7} + - {x: 7, y: 8} + - {x: 8, y: 9} + - {x: 10, y: 9} + - {x: 11, y: 10} + - {x: 11, y: 12} + - {x: 12, y: 13} + - {x: 13, y: 14} + - {x: 15, y: 14} + - {x: 16, y: 15} + - {x: 17, y: 16} + - {x: 18, y: 17} + - {x: 19, y: 18} + - {x: 19, y: 20} + - {x: 21, y: 20} + - {x: 22, y: 21} + - {x: 22, y: 23} + - {x: 24, y: 23} + - {x: 25, y: 24} + - {x: 26, y: 25} + - {x: 27, y: 26} + - {x: 28, y: 27} + - {x: 29, y: 28} + - {x: 29, y: 30} + - {x: 30, y: 31} + - {x: 32, y: 31} + - {x: 32, y: 33} + - {x: 34, y: 33} + - {x: 34, y: 35} + - {x: 36, y: 35} + - {x: 36, y: 37} + - {x: 37, y: 38} + - {x: 39, y: 38} + - {x: 39, y: 40} + - {x: 40, y: 41} + - {x: 41, y: 42} + - {x: 43, y: 42} + - {x: 44, y: 43} + - {x: 45, y: 44} + - {x: 46, y: 45} + - {x: 47, y: 46} + - {x: 48, y: 47} + - {x: 49, y: 48} + - {x: 50, y: 49} + - {x: 51, y: 50} + - {x: 52, y: 51} + - {x: 52, y: 53} + - {x: 54, y: 53} + - {x: 54, y: 55} + - {x: 56, y: 55} + - {x: 57, y: 56} + - {x: 58, y: 57} + - {x: 59, y: 58} + - {x: 60, y: 59} + - {x: 61, y: 60} + - {x: 0, y: 61} + tessellationDetail: 0 + parentGroupIndex: -1 + uvTransform: {x: -356, y: -1189} + - name: scarf + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 4 + y: 2566 + width: 412 + height: 481 + spriteID: 7e863db180b2541e3b7950b0d141b30e + internalID: 0 + spriteBone: + - name: bone_2 + position: {x: 234.17157, y: 167.6482, z: 0} + rotation: {x: 0, y: 0, z: 0.6286766, w: 0.77766687} + length: 327.68246 + parentId: -1 + spriteOutline: [] + vertices: + - position: {x: 62.022003, y: 1} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 67.962006, y: 1.7519531} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 106.64, y: 8.966064} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 147.03, y: 13.5} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 168.454, y: 22.555908} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 179.502, y: 75.13403} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 181.242, y: 116.81201} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 179.944, y: 157.98389} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 178.386, y: 199.16797} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 177.818, y: 241.1521} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 177.136, y: 282.08398} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 178, y: 323.49805} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 205.852, y: 328.74805} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 244.578, y: 319.12793} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 283.734, y: 307.156} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 324.436, y: 305.438} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 363.84802, y: 311.28198} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 395.264, y: 336.17798} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 412, y: 372.19995} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 407.638, y: 412.58594} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 392.4, y: 419.8999} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 351.936, y: 412.6421} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 312.05, y: 414.886} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 272.688, y: 422.61206} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 234.886, y: 434.3059} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 199.696, y: 451.8921} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 163.666, y: 472.0381} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 124.06601, y: 479.6919} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 98.76, y: 480.25806} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 68.384, y: 437.60205} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 49.082, y: 401.12793} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 34.544006, y: 363.562} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 25.022003, y: 325.38208} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 19.231995, y: 285.81396} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 16.238007, y: 244.88403} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 14.444, y: 203.71802} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 14.014008, y: 161.72803} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 13.462006, y: 119.74609} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 10.729996, y: 78.70801} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 4.529999, y: 39.075928} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 0.8919983, y: 6.5180664} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 2.2180023, y: -0.5} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 94.20836, y: 148.97021} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 97.60257, y: 278.45337} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 139.04593, y: 401.8252} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 104.27282, y: 344.59668} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 68.281075, y: 75.15576} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 123.361694, y: 87.10718} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 96.93663, y: 213.25122} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 212.78677, y: 382.78394} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 302.96637, y: 362.39526} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + spritePhysicsOutline: [] + indices: 0000000028000000270000002e00000026000000250000002a000000250000002400000029000000280000000000000001000000000000002e00000002000000010000002e0000002a0000002f0000002e000000020000002e0000002f000000080000002a00000030000000250000002a0000002e0000002f0000000300000002000000270000002e00000000000000320000001100000010000000230000002a00000024000000210000002b000000220000001e0000002d0000001f0000001f0000002d000000200000003000000023000000220000002c0000000b0000002d0000002d0000000b0000002b0000002d0000001e0000002c0000002b000000200000002d0000001b0000001d0000001c0000001a0000002c0000001b0000001d0000001b0000002c0000001d0000002c0000001e0000002e0000002700000026000000300000002b0000000900000030000000220000002b000000300000002a0000002300000008000000070000002a00000005000000040000002f000000300000000900000008000000090000002b0000000a0000000a0000002b0000000b0000002c000000310000000b000000060000002a0000000700000006000000050000002f0000000e0000000d000000320000000f0000000e00000032000000100000000f000000320000001700000032000000310000002b00000021000000200000000d0000000c0000003100000019000000310000002c000000190000002c0000001a0000003100000019000000180000000c0000000b00000031000000110000003200000015000000320000000d000000310000001200000011000000150000003200000016000000150000001200000015000000140000001400000013000000120000001700000016000000320000002f0000002a00000006000000180000001700000031000000030000002f00000004000000 + edges: + - {x: 1, y: 0} + - {x: 2, y: 1} + - {x: 3, y: 2} + - {x: 4, y: 3} + - {x: 4, y: 5} + - {x: 5, y: 6} + - {x: 6, y: 7} + - {x: 7, y: 8} + - {x: 8, y: 9} + - {x: 9, y: 10} + - {x: 10, y: 11} + - {x: 12, y: 11} + - {x: 13, y: 12} + - {x: 14, y: 13} + - {x: 14, y: 15} + - {x: 16, y: 15} + - {x: 17, y: 16} + - {x: 18, y: 17} + - {x: 19, y: 18} + - {x: 20, y: 19} + - {x: 20, y: 21} + - {x: 22, y: 21} + - {x: 23, y: 22} + - {x: 23, y: 24} + - {x: 25, y: 24} + - {x: 25, y: 26} + - {x: 27, y: 26} + - {x: 28, y: 27} + - {x: 29, y: 28} + - {x: 30, y: 29} + - {x: 31, y: 30} + - {x: 32, y: 31} + - {x: 33, y: 32} + - {x: 34, y: 33} + - {x: 35, y: 34} + - {x: 36, y: 35} + - {x: 37, y: 36} + - {x: 38, y: 37} + - {x: 39, y: 38} + - {x: 39, y: 40} + - {x: 41, y: 40} + - {x: 0, y: 41} + tessellationDetail: 0 + parentGroupIndex: -1 + uvTransform: {x: -777, y: 1603} + - name: hair + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 265 + y: 3605 + width: 236 + height: 302 + spriteID: 962cb5a157b5742efa2b3a947d434e51 + internalID: 0 + spriteBone: + - name: bone_9 + position: {x: 120.84829, y: 0.00010224788, z: 0} + rotation: {x: 0, y: 0, z: 0.04436305, w: 0.9990155} + length: 150.56613 + parentId: 1 + - name: bone_8 + position: {x: 200.49622, y: 275.91333, z: 0} + rotation: {x: 0, y: 0, z: 0.84161294, w: -0.5400813} + length: 120.84797 + parentId: -1 + spriteOutline: [] + vertices: + - position: {x: 109.24399, y: 9.174072} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 129.93399, y: 25.523926} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 142.42801, y: 8.768066} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 151.39401, y: 0} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 165.336, y: 8.805908} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 181.58801, y: 37.018066} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 194.57, y: 59.988037} + boneWeight: + weight0: 0.986467 + weight1: 0.013532996 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 205.48999, y: 84.191895} + boneWeight: + weight0: 0.92198896 + weight1: 0.078011036 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 215.284, y: 108.42407} + boneWeight: + weight0: 0.7611464 + weight1: 0.23885357 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 223.818, y: 132.52588} + boneWeight: + weight0: 0.50039005 + weight1: 0.49960995 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 230.79001, y: 157.12598} + boneWeight: + weight0: 0.74875104 + weight1: 0.25124896 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 235.324, y: 182.62598} + boneWeight: + weight0: 0.91606486 + weight1: 0.08393517 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 237.23999, y: 208.72412} + boneWeight: + weight0: 0.9858362 + weight1: 0.014163777 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 235.258, y: 235.02197} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 224.09799, y: 257.73608} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 205.452, y: 275.47607} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 184.41, y: 290.6421} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 161.104, y: 302.30396} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 136.586, y: 298.58594} + boneWeight: + weight0: 0.99999994 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 119.09799, y: 278.75} + boneWeight: + weight0: 0.98033214 + weight1: 0.019667841 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 102.25601, y: 259.0061} + boneWeight: + weight0: 0.9105034 + weight1: 0.08949661 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 84.04599, y: 240.55005} + boneWeight: + weight0: 0.7464309 + weight1: 0.2535691 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 63.742004, y: 223.88403} + boneWeight: + weight0: 0.51374304 + weight1: 0.48625693 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 41.93799, y: 209.21802} + boneWeight: + weight0: 0.6681648 + weight1: 0.3318352 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 19.87201, y: 194.9939} + boneWeight: + weight0: 0.7717798 + weight1: 0.22822022 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 0, y: 179.40796} + boneWeight: + weight0: 0.8049247 + weight1: 0.19507527 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 0, y: 174} + boneWeight: + weight0: 0.8033101 + weight1: 0.1966899 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 21.617981, y: 159.81006} + boneWeight: + weight0: 0.8127287 + weight1: 0.1872713 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 45.307983, y: 149.77808} + boneWeight: + weight0: 0.8475637 + weight1: 0.15243632 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 57.619995, y: 137.62012} + boneWeight: + weight0: 0.9122541 + weight1: 0.087745905 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 54.798004, y: 112.068115} + boneWeight: + weight0: 0.9871385 + weight1: 0.01286149 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 54.45999, y: 85.13599} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 56.135986, y: 58.771973} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 60.48999, y: 33.71411} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 66.93799, y: 8.469971} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 72.007996, y: 0} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 92, y: 0} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 131.01498, y: 97.58716} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 131.89215, y: 163.54688} + boneWeight: + weight0: 0.7772639 + weight1: 0.22273612 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 164.45505, y: 215.49268} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + spritePhysicsOutline: [] + indices: 200000001f00000025000000250000001e0000001d000000250000001f0000001e000000210000002000000001000000220000002400000023000000210000000100000000000000000000002400000021000000240000002200000021000000260000001d0000001c000000190000001b0000001a00000019000000180000001b0000001c00000018000000170000001c0000001b0000001800000017000000160000001c000000260000001c000000160000002600000016000000150000002700000015000000140000001300000027000000140000000100000020000000250000000400000003000000020000000100000025000000050000000500000004000000010000000600000005000000250000000400000002000000010000000700000025000000080000000900000008000000260000000800000025000000260000000600000025000000070000000a0000000900000026000000270000001300000010000000270000000a00000026000000120000001100000013000000110000001000000013000000100000000f000000270000002600000015000000270000000d0000000c00000027000000270000000f0000000e0000000e0000000d000000270000000b000000270000000c000000270000000b0000000a0000001d0000002600000025000000 + edges: + - {x: 0, y: 1} + - {x: 2, y: 1} + - {x: 2, y: 3} + - {x: 4, y: 3} + - {x: 5, y: 4} + - {x: 6, y: 5} + - {x: 7, y: 6} + - {x: 8, y: 7} + - {x: 9, y: 8} + - {x: 10, y: 9} + - {x: 11, y: 10} + - {x: 12, y: 11} + - {x: 13, y: 12} + - {x: 14, y: 13} + - {x: 15, y: 14} + - {x: 16, y: 15} + - {x: 17, y: 16} + - {x: 18, y: 17} + - {x: 19, y: 18} + - {x: 19, y: 20} + - {x: 21, y: 20} + - {x: 22, y: 21} + - {x: 22, y: 23} + - {x: 23, y: 24} + - {x: 24, y: 25} + - {x: 26, y: 25} + - {x: 26, y: 27} + - {x: 27, y: 28} + - {x: 29, y: 28} + - {x: 30, y: 29} + - {x: 30, y: 31} + - {x: 31, y: 32} + - {x: 33, y: 32} + - {x: 33, y: 34} + - {x: 35, y: 34} + - {x: 36, y: 35} + - {x: 36, y: 0} + tessellationDetail: 0 + parentGroupIndex: -1 + uvTransform: {x: -362, y: 2320} + - name: right_arm + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 4 + y: 1960 + width: 361 + height: 598 + spriteID: 83f7e88a1e4f942b9abe24d6df284375 + internalID: 0 + spriteBone: + - name: bone_12 + position: {x: 186.32207, y: -0.00009783102, z: 0} + rotation: {x: 0, y: 0, z: 0.026598651, w: 0.99964625} + length: 131.07518 + parentId: 1 + - name: bone_11 + position: {x: 221.0878, y: -0.000058741003, z: 0} + rotation: {x: 0, y: 0, z: -0.006349933, w: 0.9999799} + length: 186.32204 + parentId: 2 + - name: bone_10 + position: {x: 297.27374, y: 526.8501, z: 0} + rotation: {x: 0, y: 0, z: 0.8530779, w: -0.5217836} + length: 221.08772 + parentId: -1 + spriteOutline: [] + vertices: + - position: {x: 99.256, y: 3.8640137} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 110.148, y: 15.082031} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 134.318, y: 51.333984} + boneWeight: + weight0: 0.98302203 + weight1: 0.016977966 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 165.524, y: 81.854004} + boneWeight: + weight0: 0.82329655 + weight1: 0.17670345 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 191.018, y: 107.18408} + boneWeight: + weight0: 0.56963116 + weight1: 0.43036884 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 204.53, y: 121.9021} + boneWeight: + weight0: 0.57101476 + weight1: 0.42898524 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 217.662, y: 163.01001} + boneWeight: + weight0: 0.84148574 + weight1: 0.15851429 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 231.466, y: 203.63794} + boneWeight: + weight0: 0.97702 + weight1: 0.022979997 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 247.772, y: 245.44409} + boneWeight: + weight0: 0.9235548 + weight1: 0.07644522 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 266.242, y: 286.52393} + boneWeight: + weight0: 0.5588474 + weight1: 0.44115257 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 287.964, y: 326.58398} + boneWeight: + weight0: 0.8687818 + weight1: 0.13121827 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 311.818, y: 365.21802} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 334.738, y: 402.2439} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 351.872, y: 442.67993} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 359.616, y: 481.67798} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 359.66998, y: 531.16406} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 348.36798, y: 573.0659} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 337.03, y: 598} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 302.704, y: 590.53394} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 269.094, y: 561.29395} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 237.33, y: 528.2981} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 209.758, y: 494.2561} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 183.118, y: 458.61597} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 158.086, y: 421.9319} + boneWeight: + weight0: 0.97096676 + weight1: 0.029033255 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 133.594, y: 383.312} + boneWeight: + weight0: 0.68394953 + weight1: 0.3160505 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 109.36, y: 345.07788} + boneWeight: + weight0: 0.76420516 + weight1: 0.23579481 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 85.568, y: 306.7959} + boneWeight: + weight0: 0.9731834 + weight1: 0.0268166 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 60.241997, y: 270.14795} + boneWeight: + weight0: 0.97219664 + weight1: 0.027803382 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 35.804, y: 232.76611} + boneWeight: + weight0: 0.80966824 + weight1: 0.19033174 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 24.598007, y: 209.4419} + boneWeight: + weight0: 0.66481966 + weight1: 0.33518034 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 33.955994, y: 172.45605} + boneWeight: + weight0: 0.7102467 + weight1: 0.28975332 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 7.472, y: 136.99805} + boneWeight: + weight0: 0.98847574 + weight1: 0.01152426 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1.1199951, y: 113.11792} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 2.923996, y: 69.73401} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 33.003998, y: 37.25} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 59.684, y: 7.817993} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 82.356, y: 0} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 143.30875, y: 158.58154} + boneWeight: + weight0: 0.6965958 + weight1: 0.30340418 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 82.39135, y: 107.12695} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 156.25517, y: 241.40137} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 96.86223, y: 202.77197} + boneWeight: + weight0: 0.95560205 + weight1: 0.044397935 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 180.6329, y: 305.89355} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 218.31154, y: 366.0254} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 257.11667, y: 425.67334} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 292.35138, y: 488.71094} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + spritePhysicsOutline: [] + indices: 21000000260000002200000026000000210000002000000026000000200000001f0000000100000023000000220000000100000000000000240000002200000026000000010000000300000002000000260000000100000026000000020000001e000000260000001f000000240000002300000001000000030000002600000025000000280000002500000026000000030000002500000004000000270000001b0000001a0000001d000000280000001e000000270000002500000028000000260000001e0000002800000025000000270000000600000019000000290000001a0000001800000029000000190000002a000000180000001700000029000000270000001a000000280000001b00000027000000280000001d0000001c0000001b000000280000001c0000002500000006000000050000002a000000160000002b00000007000000060000002700000008000000070000002700000017000000160000002a0000000500000004000000250000002900000009000000080000002700000029000000080000002b0000000b0000002a0000002a0000000b0000000a0000002a0000000a000000090000000c0000000b0000002b0000000d0000000c0000002b00000009000000290000002a0000000d0000002b0000002c0000002c0000002b0000001500000015000000140000002c000000130000002c00000014000000130000000f0000002c0000002c0000000f0000000e00000013000000100000000f0000001100000010000000120000001000000013000000120000000d0000002c0000000e0000002b000000160000001500000029000000180000002a000000 + edges: + - {x: 1, y: 0} + - {x: 1, y: 2} + - {x: 3, y: 2} + - {x: 4, y: 3} + - {x: 5, y: 4} + - {x: 5, y: 6} + - {x: 6, y: 7} + - {x: 7, y: 8} + - {x: 9, y: 8} + - {x: 10, y: 9} + - {x: 11, y: 10} + - {x: 12, y: 11} + - {x: 13, y: 12} + - {x: 14, y: 13} + - {x: 15, y: 14} + - {x: 16, y: 15} + - {x: 17, y: 16} + - {x: 18, y: 17} + - {x: 19, y: 18} + - {x: 20, y: 19} + - {x: 21, y: 20} + - {x: 22, y: 21} + - {x: 23, y: 22} + - {x: 24, y: 23} + - {x: 24, y: 25} + - {x: 26, y: 25} + - {x: 27, y: 26} + - {x: 28, y: 27} + - {x: 29, y: 28} + - {x: 30, y: 29} + - {x: 31, y: 30} + - {x: 31, y: 32} + - {x: 33, y: 32} + - {x: 34, y: 33} + - {x: 35, y: 34} + - {x: 36, y: 35} + - {x: 0, y: 36} + tessellationDetail: 0 + parentGroupIndex: -1 + uvTransform: {x: -572, y: 1196} + - name: amulet + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 4 + y: 3606 + width: 223 + height: 402 + spriteID: 703d679467bb24490b735f5a5f7eab8d + internalID: 0 + spriteBone: + - name: bone_2 + position: {x: 62.17157, y: 201.6482, z: 0} + rotation: {x: 0, y: 0, z: 0.6286766, w: 0.77766687} + length: 327.68246 + parentId: -1 + spriteOutline: [] + vertices: + - position: {x: 187.288, y: 14.083984} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 197.59799, y: 42.63794} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 205.54199, y: 71.28198} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 203.37201, y: 94.38403} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 205.366, y: 127.023926} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 199.78601, y: 155.55591} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 192.51001, y: 184.81812} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 184.008, y: 200} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 148.95801, y: 193.35205} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 153.124, y: 202.75} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 167.62201, y: 229.37012} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 180.634, y: 252.89209} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 191.442, y: 276.39404} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 201.368, y: 301.1101} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 211.058, y: 327.35205} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 218.53, y: 351.57593} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 223.5, y: 373.896} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 210.828, y: 388} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 188.04001, y: 373.62012} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 183.636, y: 348.4441} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 176.07, y: 320.5581} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 164.74, y: 295.38403} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 153.9, y: 271.66992} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 145.386, y: 247.73193} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 127.916, y: 225.81396} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 116.442, y: 221.16992} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 97.704, y: 242.61401} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 83.432, y: 264.7461} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 70.188, y: 282.24805} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 58.516, y: 309.58203} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 48.28, y: 332.48804} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 38.783997, y: 360.8999} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 32.533997, y: 386.61597} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 21.283997, y: 402} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 2.2279968, y: 400.72607} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 0.47799683, y: 384.344} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 9.956001, y: 352.03003} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 19.674004, y: 323.6399} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 28.744003, y: 297.95605} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 43.792, y: 274.41797} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 56.29, y: 247.48804} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 74.196, y: 225.71191} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 90.292, y: 201.08398} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 105.128, y: 184} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 84.928, y: 169.87207} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 59.666, y: 160} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 37.440002, y: 137.63403} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 16.18, y: 114.701904} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 10.033997, y: 99.40796} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 37.414, y: 66.81006} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 58.802, y: 43.8479} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 84.729996, y: 31.815918} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 106.106, y: 14.580078} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 135.576, y: 6.555908} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 165.658, y: 1.2080078} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 181.98401, y: 1.1320801} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 123.924126, y: 100.57544} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + spritePhysicsOutline: [] + indices: 31000000300000002f0000002e000000310000002f0000002d000000380000002e00000038000000310000002e000000380000002c0000002b000000380000003300000032000000380000003200000031000000290000001a0000002a000000190000002a0000001a0000002a000000190000002b0000002b00000019000000080000003400000033000000380000002d0000002c000000380000001b0000001a00000029000000240000001f000000250000002100000023000000220000002300000021000000200000002000000024000000230000001e000000260000002500000028000000270000001c00000029000000280000001b0000001b000000280000001c0000001e000000250000001f0000001d000000260000001e0000001d0000001c0000002700000024000000200000001f0000001d0000002700000026000000350000003800000001000000350000000000000036000000060000000800000007000000380000000800000005000000180000000900000008000000370000003600000000000000340000003800000035000000380000000200000001000000030000000200000038000000050000000800000006000000380000000500000004000000030000003800000004000000010000000000000035000000190000001800000008000000170000000a000000180000000b0000000a0000001700000016000000150000000c000000160000000c0000000b000000140000000d000000150000000b0000001700000016000000140000000e0000000d0000000c000000150000000d00000014000000130000000e0000000f0000000e0000001300000010000000120000001100000012000000100000000f00000009000000180000000a0000000f0000001300000012000000380000002b00000008000000 + edges: + - {x: 1, y: 0} + - {x: 2, y: 1} + - {x: 2, y: 3} + - {x: 4, y: 3} + - {x: 4, y: 5} + - {x: 5, y: 6} + - {x: 6, y: 7} + - {x: 7, y: 8} + - {x: 8, y: 9} + - {x: 9, y: 10} + - {x: 10, y: 11} + - {x: 11, y: 12} + - {x: 12, y: 13} + - {x: 14, y: 13} + - {x: 14, y: 15} + - {x: 15, y: 16} + - {x: 17, y: 16} + - {x: 18, y: 17} + - {x: 18, y: 19} + - {x: 19, y: 20} + - {x: 21, y: 20} + - {x: 22, y: 21} + - {x: 22, y: 23} + - {x: 23, y: 24} + - {x: 24, y: 25} + - {x: 25, y: 26} + - {x: 26, y: 27} + - {x: 27, y: 28} + - {x: 28, y: 29} + - {x: 29, y: 30} + - {x: 30, y: 31} + - {x: 31, y: 32} + - {x: 32, y: 33} + - {x: 34, y: 33} + - {x: 35, y: 34} + - {x: 35, y: 36} + - {x: 36, y: 37} + - {x: 38, y: 37} + - {x: 39, y: 38} + - {x: 39, y: 40} + - {x: 40, y: 41} + - {x: 41, y: 42} + - {x: 42, y: 43} + - {x: 44, y: 43} + - {x: 44, y: 45} + - {x: 45, y: 46} + - {x: 46, y: 47} + - {x: 47, y: 48} + - {x: 49, y: 48} + - {x: 50, y: 49} + - {x: 51, y: 50} + - {x: 52, y: 51} + - {x: 53, y: 52} + - {x: 54, y: 53} + - {x: 55, y: 54} + - {x: 0, y: 55} + tessellationDetail: 0 + parentGroupIndex: -1 + uvTransform: {x: -949, y: 2677} + - name: body + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 4 + y: 1220 + width: 562 + height: 732 + spriteID: 12cc9c394e45346cab5b6d41032eb97e + internalID: 0 + spriteBone: + - name: bone_1 + position: {x: 319.59357, y: 150.23083, z: 0} + rotation: {x: 0, y: 0, z: 0.70203775, w: 0.7121397} + length: 320.45007 + parentId: -1 + - name: bone_2 + position: {x: 320.45007, y: -0.000069972055, z: 0} + rotation: {x: 0, y: 0, z: -0.09824592, w: 0.9951622} + length: 327.68246 + parentId: 0 + spriteOutline: [] + vertices: + - position: {x: 332.58398, y: 0.7780762} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 369.908, y: 2.8759766} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 427.042, y: 11.291992} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 482.836, y: 19.946045} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 540.226, y: 26.984009} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 561.492, y: 31.494019} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 558.192, y: 75.80798} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 546.234, y: 130.16003} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 535.63403, y: 185.66602} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 528.732, y: 242.23206} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 524.558, y: 299.906} + boneWeight: + weight0: 0.96879613 + weight1: 0.031203866 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 522.49, y: 358.42798} + boneWeight: + weight0: 0.8820831 + weight1: 0.11791688 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 522.062, y: 417.78796} + boneWeight: + weight0: 0.6928787 + weight1: 0.30712128 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 521.954, y: 477.16003} + boneWeight: + weight0: 0.5698503 + weight1: 0.43014964 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 521.372, y: 536.516} + boneWeight: + weight0: 0.7853758 + weight1: 0.21462423 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 517.876, y: 594.822} + boneWeight: + weight0: 0.92281526 + weight1: 0.077184714 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 508.188, y: 650.86597} + boneWeight: + weight0: 0.97885835 + weight1: 0.02114167 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 478.55402, y: 699.2739} + boneWeight: + weight0: 0.99999994 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 431.544, y: 726.04004} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 371.858, y: 730.57007} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 312.736, y: 729.68994} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 257.004, y: 720.78394} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 201.762, y: 705.07007} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 158.916, y: 667.886} + boneWeight: + weight0: 0.9600812 + weight1: 0.039918758 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 140.804, y: 615.84204} + boneWeight: + weight0: 0.89237267 + weight1: 0.107627355 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 124.378006, y: 561.15} + boneWeight: + weight0: 0.7528016 + weight1: 0.24719839 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 109.399994, y: 505.51807} + boneWeight: + weight0: 0.5359279 + weight1: 0.46407208 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 96.71001, y: 451.162} + boneWeight: + weight0: 0.6741358 + weight1: 0.3258642 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 86.06799, y: 395.33203} + boneWeight: + weight0: 0.83382255 + weight1: 0.16617745 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 75.923996, y: 340.13196} + boneWeight: + weight0: 0.9315053 + weight1: 0.06849468 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 65.118, y: 285.08203} + boneWeight: + weight0: 0.9792013 + weight1: 0.020798683 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 50.845993, y: 229.49194} + boneWeight: + weight0: 0.99999994 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 32.095993, y: 174.58997} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 7.7319946, y: 121.422} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1.0960083, y: 101.89404} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1.1220093, y: 95.25403} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 54.766006, y: 62.79602} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 108.466, y: 40.53601} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 162.544, y: 21.575928} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 216.706, y: 8.726074} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 273.286, y: 0.75} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 324.8032, y: 533.155} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 291.22998, y: 190.41858} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 300.92154, y: 359.44666} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + spritePhysicsOutline: [] + indices: 2400000022000000210000002100000020000000240000002a000000200000001f00000023000000220000002400000027000000260000002a00000028000000270000002a000000200000002a0000002500000026000000250000002a0000002400000020000000250000002a00000000000000280000001e0000002a0000001f0000001d0000001c0000002b0000001a0000002b0000001b0000001b0000002b0000001c0000002b0000001e0000001d00000029000000190000001800000019000000290000001a0000001700000029000000180000001600000029000000170000002900000016000000150000001a000000290000002b0000002b0000002a0000001e0000002b0000000a0000002a0000000a000000090000002a00000008000000020000002a00000003000000020000000700000002000000010000002a0000000a0000002b0000000b00000006000000050000000400000003000000070000000600000009000000080000002a0000000700000002000000080000000300000006000000040000001100000010000000120000002900000012000000100000001400000013000000290000001200000029000000130000002900000015000000140000000d000000290000000e0000000c000000290000000d000000100000000f000000290000000f0000000e000000290000000c0000002b000000290000002b0000000c0000000b000000000000002a00000001000000 + edges: + - {x: 1, y: 0} + - {x: 2, y: 1} + - {x: 3, y: 2} + - {x: 4, y: 3} + - {x: 5, y: 4} + - {x: 6, y: 5} + - {x: 6, y: 7} + - {x: 7, y: 8} + - {x: 8, y: 9} + - {x: 9, y: 10} + - {x: 11, y: 10} + - {x: 12, y: 11} + - {x: 13, y: 12} + - {x: 13, y: 14} + - {x: 14, y: 15} + - {x: 16, y: 15} + - {x: 17, y: 16} + - {x: 18, y: 17} + - {x: 19, y: 18} + - {x: 20, y: 19} + - {x: 21, y: 20} + - {x: 22, y: 21} + - {x: 23, y: 22} + - {x: 24, y: 23} + - {x: 25, y: 24} + - {x: 26, y: 25} + - {x: 27, y: 26} + - {x: 27, y: 28} + - {x: 28, y: 29} + - {x: 30, y: 29} + - {x: 31, y: 30} + - {x: 32, y: 31} + - {x: 33, y: 32} + - {x: 33, y: 34} + - {x: 35, y: 34} + - {x: 36, y: 35} + - {x: 37, y: 36} + - {x: 38, y: 37} + - {x: 39, y: 38} + - {x: 40, y: 39} + - {x: 0, y: 40} + tessellationDetail: 0 + parentGroupIndex: -1 + uvTransform: {x: -687, y: 560} + - name: left_arm + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 4 + y: 3055 + width: 253 + height: 543 + spriteID: 84650b44e56734f278c2bc42a1aa93b9 + internalID: 0 + spriteBone: + - name: bone_15 + position: {x: 163.5672, y: -0.00004000004, z: 0} + rotation: {x: 0, y: 0, z: 0.010912044, w: 0.99994045} + length: 111.46557 + parentId: 1 + - name: bone_14 + position: {x: 214.40881, y: 0.00017337242, z: 0} + rotation: {x: 0, y: 0, z: 0.0158475, w: 0.9998745} + length: 163.56706 + parentId: 2 + - name: bone_13 + position: {x: 55.91443, y: 498.27246, z: 0} + rotation: {x: 0, y: 0, z: -0.60103077, w: 0.799226} + length: 214.40869 + parentId: -1 + spriteOutline: [] + vertices: + - position: {x: 175.87, y: 3.2861328} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 209.438, y: 6.4799805} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 238.302, y: 20.5} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 253.5, y: 36.11206} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 248.16, y: 68.95996} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 227.5, y: 95.27197} + boneWeight: + weight0: 0.9678919 + weight1: 0.032108128 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 233.95, y: 115.1521} + boneWeight: + weight0: 0.8636634 + weight1: 0.13633662 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 222.544, y: 150.6001} + boneWeight: + weight0: 0.5461239 + weight1: 0.45387608 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 207.76999, y: 186.4939} + boneWeight: + weight0: 0.9601728 + weight1: 0.039827257 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 192.688, y: 222.4541} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 181.032, y: 257.73193} + boneWeight: + weight0: 0.9814441 + weight1: 0.018555943 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 169.778, y: 294.66602} + boneWeight: + weight0: 0.6604292 + weight1: 0.33957088 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 159.364, y: 332.12793} + boneWeight: + weight0: 0.9245701 + weight1: 0.07542998 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 148.668, y: 369.07007} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 137.226, y: 405.69995} + boneWeight: + weight0: 0.99999994 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 125.201996, y: 440.66992} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 110.895996, y: 477.22607} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 91.806, y: 511.448} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 67.532, y: 542.2639} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 43.434, y: 542.4321} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 14.802002, y: 498.614} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1.4820023, y: 463.14404} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: -0.5, y: 423.7539} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: -0.5, y: 383.812} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 12.353996, y: 347.14404} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 26.208, y: 312.2981} + boneWeight: + weight0: 0.9264203 + weight1: 0.07357977 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 36.526, y: 275.64795} + boneWeight: + weight0: 0.5879447 + weight1: 0.4120553 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 43.657997, y: 238.44409} + boneWeight: + weight0: 0.81361824 + weight1: 0.18638176 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 50.83, y: 200.83789} + boneWeight: + weight0: 0.9754041 + weight1: 0.024595916 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 57.012, y: 162.78589} + boneWeight: + weight0: 0.9117744 + weight1: 0.088225625 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 61.836, y: 124.61206} + boneWeight: + weight0: 0.6836796 + weight1: 0.31632045 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 67.5, y: 86.343994} + boneWeight: + weight0: 0.5846444 + weight1: 0.41535562 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 86.706, y: 63.518066} + boneWeight: + weight0: 0.7772119 + weight1: 0.2227881 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 105.492004, y: 35.345947} + boneWeight: + weight0: 0.9337856 + weight1: 0.06621438 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 131.686, y: 4.4260254} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 150.874, y: 0.5} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 169.5, y: 0.5} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 125.09616, y: 280.1609} + boneWeight: + weight0: 0.9709509 + weight1: 0.02904915 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 104.99711, y: 352.49414} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 158.86632, y: 161.78271} + boneWeight: + weight0: 0.99999994 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 69.65868, y: 411.11133} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 177.04105, y: 112.39844} + boneWeight: + weight0: 0.9891168 + weight1: 0.010883212 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 123.30358, y: 105.93799} + boneWeight: + weight0: 0.6668145 + weight1: 0.3331855 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 171.30406, y: 58.31836} + boneWeight: + weight0: 0.99999994 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 81.00322, y: 303.41284} + boneWeight: + weight0: 0.9016764 + weight1: 0.09832359 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 56.311485, y: 362.09888} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 140.01096, y: 216.87329} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 92.72444, y: 236.86914} + boneWeight: + weight0: 0.9618422 + weight1: 0.038157795 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 106.40282, y: 169.02832} + boneWeight: + weight0: 0.95253295 + weight1: 0.047467068 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 57.11963, y: 462.82178} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + spritePhysicsOutline: [] + indices: 300000001e0000001d000000300000001d0000001c0000002f0000001b0000001a0000002c0000001a000000190000001b0000002f0000001c000000200000001f0000002a0000001f0000001e0000002a0000002c00000026000000250000002f0000001a0000002c000000300000001c0000002f0000002c000000250000002f000000300000002f0000002e0000002a0000001e000000300000002d0000002c0000001900000028000000170000001600000015000000310000001600000014000000310000001500000011000000140000001300000018000000170000002d00000028000000260000002d00000019000000180000002d00000028000000310000000f0000001600000031000000280000003100000014000000110000001200000011000000130000003100000011000000100000000f000000310000001000000026000000280000000e0000002d00000017000000280000002d000000260000002c00000021000000200000002a00000024000000230000002b00000000000000240000002b0000002a0000002b0000002100000022000000210000002b00000023000000220000002b000000290000002b0000002a0000002b000000010000000000000004000000020000002b0000000300000002000000040000002b000000290000000500000005000000040000002b0000000600000005000000290000002b000000020000000100000027000000290000002a0000000c000000260000000d0000002e0000002f0000002500000027000000300000002e000000250000000a0000002e000000280000000f0000000e0000000e0000000d0000002600000009000000270000002e00000025000000260000000c000000080000000700000027000000270000000900000008000000250000000c0000000b0000002e0000000a000000090000000a000000250000000b00000027000000070000002900000007000000060000002900000030000000270000002a000000 + edges: + - {x: 1, y: 0} + - {x: 2, y: 1} + - {x: 3, y: 2} + - {x: 4, y: 3} + - {x: 5, y: 4} + - {x: 6, y: 5} + - {x: 7, y: 6} + - {x: 8, y: 7} + - {x: 9, y: 8} + - {x: 10, y: 9} + - {x: 11, y: 10} + - {x: 11, y: 12} + - {x: 12, y: 13} + - {x: 13, y: 14} + - {x: 15, y: 14} + - {x: 16, y: 15} + - {x: 17, y: 16} + - {x: 18, y: 17} + - {x: 19, y: 18} + - {x: 20, y: 19} + - {x: 21, y: 20} + - {x: 22, y: 21} + - {x: 23, y: 22} + - {x: 24, y: 23} + - {x: 25, y: 24} + - {x: 25, y: 26} + - {x: 26, y: 27} + - {x: 28, y: 27} + - {x: 29, y: 28} + - {x: 29, y: 30} + - {x: 31, y: 30} + - {x: 32, y: 31} + - {x: 33, y: 32} + - {x: 34, y: 33} + - {x: 35, y: 34} + - {x: 36, y: 35} + - {x: 0, y: 36} + tessellationDetail: 0 + parentGroupIndex: -1 + uvTransform: {x: -1088, y: 2267} + - name: right_leg + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 727 + y: 1220 + width: 210 + height: 549 + spriteID: cf5beff8c01624c13a6de90188ee464b + internalID: 0 + spriteBone: + - name: bone_18 + position: {x: 165.79729, y: -0.00012855207, z: 0} + rotation: {x: 0, y: 0, z: 0.40078795, w: 0.91617084} + length: 90.85789 + parentId: 1 + - name: bone_17 + position: {x: 201.87204, y: -0.00022257103, z: 0} + rotation: {x: 0, y: 0, z: -0.021290049, w: 0.9997734} + length: 165.79697 + parentId: 2 + - name: bone_16 + position: {x: 121.00714, y: 459.88306, z: 0} + rotation: {x: 0, y: 0, z: 0.73076254, w: -0.68263185} + length: 201.87233 + parentId: -1 + spriteOutline: [] + vertices: + - position: {x: 147.57397, y: 3.1760254} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 183.14801, y: 17.092041} + boneWeight: + weight0: 0.99999994 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 208.77197, y: 42.44397} + boneWeight: + weight0: 0.9537409 + weight1: 0.046259105 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 208.42798, y: 79.80603} + boneWeight: + weight0: 0.8482071 + weight1: 0.15179288 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 196.76202, y: 114.33203} + boneWeight: + weight0: 0.62252516 + weight1: 0.37747484 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 180.61401, y: 144.50598} + boneWeight: + weight0: 0.6891825 + weight1: 0.31081748 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 179.10199, y: 180.24194} + boneWeight: + weight0: 0.8797953 + weight1: 0.0764734 + weight2: 0.043731257 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 2 + boneIndex3: 0 + - position: {x: 192.37402, y: 212.47998} + boneWeight: + weight0: 0.766791 + weight1: 0.21981718 + weight2: 0.013391823 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 199.448, y: 248.77405} + boneWeight: + weight0: 0.5259782 + weight1: 0.47402176 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 198.84802, y: 286.21594} + boneWeight: + weight0: 0.8154876 + weight1: 0.18451238 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 200.242, y: 323.70203} + boneWeight: + weight0: 0.96556723 + weight1: 0.034432776 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 203.95203, y: 361.34998} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 207.47803, y: 398.99402} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 208.95801, y: 437.39} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 206.37, y: 475.59998} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 198.79602, y: 511.20203} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 169.20203, y: 533.52} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 134.88599, y: 548.098} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 96.05603, y: 547.60596} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 58.606018, y: 541.62} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 28, y: 522.996} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 26, y: 482.55603} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 25.619995, y: 443.29797} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 24.276001, y: 404.84204} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 23.054016, y: 365.64197} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 18.117981, y: 328.37} + boneWeight: + weight0: 0.9604116 + weight1: 0.03958846 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 7.6900024, y: 296.224} + boneWeight: + weight0: 0.8091332 + weight1: 0.1908669 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1.8439941, y: 271.13794} + boneWeight: + weight0: 0.6384861 + weight1: 0.36151397 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1.8779907, y: 226.23999} + boneWeight: + weight0: 0.6701324 + weight1: 0.3298676 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 16.55603, y: 197.10803} + boneWeight: + weight0: 0.8737424 + weight1: 0.1262576 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 17.650024, y: 158.03601} + boneWeight: + weight0: 0.9880515 + weight1: 0.011948519 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 5.5620117, y: 123.26599} + boneWeight: + weight0: 0.8927766 + weight1: 0.10722336 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 1.7199707, y: 105.74402} + boneWeight: + weight0: 0.80821 + weight1: 0.19178995 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 2, y: 69.49194} + boneWeight: + weight0: 0.5440725 + weight1: 0.45592746 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 21.95398, y: 36.96997} + boneWeight: + weight0: 0.7508544 + weight1: 0.24914563 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 52.460022, y: 15.439941} + boneWeight: + weight0: 0.9331513 + weight1: 0.066848695 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 88.14203, y: 3.0679932} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 126.252014, y: -0.5} + boneWeight: + weight0: 0.99999994 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 99.24591, y: 240.73315} + boneWeight: + weight0: 0.9766362 + weight1: 0.023363888 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 96.37036, y: 160.83594} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 115.359375, y: 464.92737} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 107.85272, y: 314.31335} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 116.3819, y: 389.93445} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 105.69922, y: 84.46594} + boneWeight: + weight0: 0.8641976 + weight1: 0.13580239 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + spritePhysicsOutline: [] + indices: 2b000000200000001f00000021000000200000002b00000023000000220000002b00000024000000230000002b0000001e000000270000001f000000270000002b0000001f0000000600000027000000260000001d000000270000001e0000002b000000250000002400000022000000210000002b0000001d0000001c00000026000000270000001d0000002600000019000000180000002900000018000000170000002a000000260000001b0000001a000000150000001300000028000000160000002a00000017000000160000001500000028000000140000001300000015000000280000001300000012000000260000001a000000290000001a0000001900000029000000260000001c0000001b0000002b000000270000000500000005000000040000002b0000002b000000010000000000000003000000010000002b0000000700000006000000260000002b000000040000000300000002000000010000000300000026000000090000000800000007000000260000000800000026000000290000000900000016000000280000002a0000002700000006000000050000002a000000280000000d00000028000000100000000f0000001200000011000000280000000b000000290000002a00000029000000180000002a0000002a0000000c0000000b0000002a0000000d0000000c0000000f0000000e000000280000000e0000000d000000280000000a000000290000000b0000001100000010000000280000000a00000009000000290000002b0000000000000025000000 + edges: + - {x: 1, y: 0} + - {x: 2, y: 1} + - {x: 2, y: 3} + - {x: 3, y: 4} + - {x: 4, y: 5} + - {x: 5, y: 6} + - {x: 6, y: 7} + - {x: 8, y: 7} + - {x: 8, y: 9} + - {x: 10, y: 9} + - {x: 11, y: 10} + - {x: 12, y: 11} + - {x: 12, y: 13} + - {x: 14, y: 13} + - {x: 15, y: 14} + - {x: 16, y: 15} + - {x: 17, y: 16} + - {x: 18, y: 17} + - {x: 19, y: 18} + - {x: 20, y: 19} + - {x: 20, y: 21} + - {x: 21, y: 22} + - {x: 23, y: 22} + - {x: 24, y: 23} + - {x: 24, y: 25} + - {x: 25, y: 26} + - {x: 27, y: 26} + - {x: 28, y: 27} + - {x: 29, y: 28} + - {x: 30, y: 29} + - {x: 31, y: 30} + - {x: 31, y: 32} + - {x: 33, y: 32} + - {x: 34, y: 33} + - {x: 35, y: 34} + - {x: 36, y: 35} + - {x: 37, y: 36} + - {x: 0, y: 37} + tessellationDetail: 0 + parentGroupIndex: -1 + uvTransform: {x: -39, y: 920} + - name: left_leg + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 265 + y: 3055 + width: 214 + height: 542 + spriteID: 38ccfbb4211824cda99aa288cb29f63e + internalID: 0 + spriteBone: + - name: bone_21 + position: {x: 137.39673, y: -0.00015928171, z: 0} + rotation: {x: 0, y: 0, z: 0.3625177, w: 0.931977} + length: 84.40187 + parentId: 1 + - name: bone_20 + position: {x: 224.71107, y: -0.00032917075, z: 0} + rotation: {x: 0, y: 0, z: 0.013917062, w: 0.9999032} + length: 137.3967 + parentId: 2 + - name: bone_19 + position: {x: 109.14014, y: 459.76953, z: 0} + rotation: {x: 0, y: 0, z: 0.72839195, w: -0.6851607} + length: 224.71086 + parentId: -1 + spriteOutline: [] + vertices: + - position: {x: 146.432, y: 1.0581055} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 148.112, y: 1.7958984} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 177.608, y: 13.763916} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 212.99799, y: 39} + boneWeight: + weight0: 0.97089106 + weight1: 0.029108942 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 212.47198, y: 76.42407} + boneWeight: + weight0: 0.8834742 + weight1: 0.11652583 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 200.71802, y: 109.54199} + boneWeight: + weight0: 0.7086811 + weight1: 0.2913189 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 182.288, y: 139.3081} + boneWeight: + weight0: 0.58964556 + weight1: 0.3965106 + weight2: 0.013843836 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 2 + boneIndex3: 0 + - position: {x: 178.396, y: 175.37793} + boneWeight: + weight0: 0.75902766 + weight1: 0.12810479 + weight2: 0.11286756 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 189.5, y: 205.88208} + boneWeight: + weight0: 0.6024015 + weight1: 0.3734592 + weight2: 0.024139328 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 202, y: 239.82788} + boneWeight: + weight0: 0.6306973 + weight1: 0.36930275 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 197.336, y: 277.74194} + boneWeight: + weight0: 0.827907 + weight1: 0.17209299 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 191.94, y: 314.09204} + boneWeight: + weight0: 0.95904446 + weight1: 0.04095553 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 191.814, y: 352.07593} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 191.466, y: 391.02197} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 189.082, y: 429.07593} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 183.738, y: 465.60205} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 176.32, y: 501.17188} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 150.236, y: 526.3081} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 116.04001, y: 539.0581} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 78.71799, y: 542.2261} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 43.14801, y: 532.23193} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 10.890015, y: 514.1821} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 0, y: 498.54395} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 3.8659973, y: 443.22803} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 6.3980103, y: 405.136} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 9.9339905, y: 367.79004} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 12.609985, y: 332.31006} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 10.528015, y: 294.36597} + boneWeight: + weight0: 0.9432591 + weight1: 0.056740854 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 0, y: 268.49} + boneWeight: + weight0: 0.8063597 + weight1: 0.19364022 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 0, y: 224} + boneWeight: + weight0: 0.5256956 + weight1: 0.47430435 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 13.64801, y: 193.96606} + boneWeight: + weight0: 0.80464 + weight1: 0.19536003 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 21.497986, y: 157.66797} + boneWeight: + weight0: 0.98641104 + weight1: 0.013589026 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 2 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 15.726013, y: 123.778076} + boneWeight: + weight0: 0.8943065 + weight1: 0.10569353 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 11.593994, y: 98.32593} + boneWeight: + weight0: 0.6894989 + weight1: 0.3105011 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 11.778015, y: 68.22412} + boneWeight: + weight0: 0.58649266 + weight1: 0.41350734 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 21.694, y: 43.77002} + boneWeight: + weight0: 0.77564603 + weight1: 0.22435397 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 59.839996, y: 13.266113} + boneWeight: + weight0: 0.97405994 + weight1: 0.02594006 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 92.89401, y: 3.761963} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 114.747986, y: 0} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 98.75171, y: 237.03052} + boneWeight: + weight0: 0.80208683 + weight1: 0.1979132 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 91.41589, y: 458.5349} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 111.052704, y: 82.90015} + boneWeight: + weight0: 0.9355804 + weight1: 0.06441963 + weight2: 0 + weight3: 0 + boneIndex0: 0 + boneIndex1: 1 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 98.003204, y: 158.90283} + boneWeight: + weight0: 0.99999994 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 1 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 103.70468, y: 310.0415} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + - position: {x: 101.013, y: 384.9038} + boneWeight: + weight0: 1 + weight1: 0 + weight2: 0 + weight3: 0 + boneIndex0: 2 + boneIndex1: 0 + boneIndex2: 0 + boneIndex3: 0 + spritePhysicsOutline: [] + indices: 29000000200000002a000000270000001e0000001d0000002200000021000000290000002100000020000000290000002400000023000000290000001e000000270000002a0000002a000000200000001f000000070000002a000000270000001f0000001e0000002a0000002900000025000000240000002300000022000000290000001c000000270000001d00000018000000170000002800000017000000160000002800000018000000280000002c0000001a0000002b0000001b000000270000001c0000001b000000160000001500000028000000180000002c00000019000000150000001400000028000000130000002800000014000000130000001200000028000000190000002c0000001a000000270000001b0000002b000000290000000000000026000000020000000100000029000000000000002900000001000000040000000200000029000000250000002900000026000000050000000400000029000000290000000600000005000000060000002a000000070000000700000027000000080000000400000003000000020000002700000009000000080000000f0000000e000000280000002b0000001a0000002c0000002b0000002c0000000c000000100000000f000000280000002800000012000000110000001100000010000000280000000e0000002c000000280000000b0000000a0000002b0000000a000000270000002b0000000e0000000d0000002c0000000d0000000c0000002c0000000b0000002b0000000c000000270000000a000000090000002a0000000600000029000000 + edges: + - {x: 0, y: 1} + - {x: 2, y: 1} + - {x: 3, y: 2} + - {x: 4, y: 3} + - {x: 5, y: 4} + - {x: 5, y: 6} + - {x: 7, y: 6} + - {x: 8, y: 7} + - {x: 9, y: 8} + - {x: 10, y: 9} + - {x: 11, y: 10} + - {x: 12, y: 11} + - {x: 13, y: 12} + - {x: 13, y: 14} + - {x: 15, y: 14} + - {x: 16, y: 15} + - {x: 17, y: 16} + - {x: 18, y: 17} + - {x: 19, y: 18} + - {x: 20, y: 19} + - {x: 21, y: 20} + - {x: 22, y: 21} + - {x: 23, y: 22} + - {x: 24, y: 23} + - {x: 25, y: 24} + - {x: 26, y: 25} + - {x: 27, y: 26} + - {x: 28, y: 27} + - {x: 29, y: 28} + - {x: 30, y: 29} + - {x: 31, y: 30} + - {x: 31, y: 32} + - {x: 33, y: 32} + - {x: 34, y: 33} + - {x: 35, y: 34} + - {x: 36, y: 35} + - {x: 37, y: 36} + - {x: 38, y: 37} + - {x: 0, y: 38} + tessellationDetail: 0 + parentGroupIndex: -1 + uvTransform: {x: -728, y: 2732} + platformSettings: [] + mosaicLayers: 1 + documentPivot: {x: 37.88, y: 0.15} + documentAlignment: 7 + importHiddenLayers: 0 + importedTextureWidth: 1024 + importedTextureHeight: 2048 + documentSize: {x: 2141, y: 2705} + paperDollMode: 0 + spriteCategoryList: + categories: [] + textureActualWidth: 2048 + textureActualHeight: 4096 + spritePackingTag: + resliceFromLayer: 0 + characterMode: 1 + mosaicPSDLayers: [] + rigPSDLayers: + - name: staff + spriteName: staff + isGroup: 0 + parentIndex: -1 + spriteID: cf44d545c95fd45ebbe99184aaac0a39 + layerID: 12 + mosaicPosition: {x: 574, y: 1220} + - name: head + spriteName: head + isGroup: 0 + parentIndex: -1 + spriteID: 57b9ecaa719814f029e4e4686fd4d555 + layerID: 10 + mosaicPosition: {x: 4, y: 4} + - name: scarf + spriteName: scarf + isGroup: 0 + parentIndex: -1 + spriteID: 7e863db180b2541e3b7950b0d141b30e + layerID: 7 + mosaicPosition: {x: 4, y: 2566} + - name: hair + spriteName: hair + isGroup: 0 + parentIndex: -1 + spriteID: 962cb5a157b5742efa2b3a947d434e51 + layerID: 9 + mosaicPosition: {x: 265, y: 3605} + - name: right_arm + spriteName: right_arm + isGroup: 0 + parentIndex: -1 + spriteID: 83f7e88a1e4f942b9abe24d6df284375 + layerID: 18 + mosaicPosition: {x: 4, y: 1960} + - name: amulet + spriteName: amulet + isGroup: 0 + parentIndex: -1 + spriteID: 703d679467bb24490b735f5a5f7eab8d + layerID: 11 + mosaicPosition: {x: 4, y: 3606} + - name: body + spriteName: body + isGroup: 0 + parentIndex: -1 + spriteID: 12cc9c394e45346cab5b6d41032eb97e + layerID: 17 + mosaicPosition: {x: 4, y: 1220} + - name: left_arm + spriteName: left_arm + isGroup: 0 + parentIndex: -1 + spriteID: 84650b44e56734f278c2bc42a1aa93b9 + layerID: 16 + mosaicPosition: {x: 4, y: 3055} + - name: right_leg + spriteName: right_leg + isGroup: 0 + parentIndex: -1 + spriteID: cf5beff8c01624c13a6de90188ee464b + layerID: 13 + mosaicPosition: {x: 727, y: 1220} + - name: left_leg + spriteName: left_leg + isGroup: 0 + parentIndex: -1 + spriteID: 38ccfbb4211824cda99aa288cb29f63e + layerID: 14 + mosaicPosition: {x: 265, y: 3055} + characterData: + bones: + - name: bone_1 + position: {x: 1010.59357, y: 810.23083, z: 0} + rotation: {x: 0, y: 0, z: 0.70203775, w: 0.7121397} + length: 320.45007 + parentId: -1 + - name: bone_2 + position: {x: 320.4501, y: -0.000031825082, z: 0} + rotation: {x: 0, y: 0, z: -0.09824591, w: 0.9951622} + length: 327.6825 + parentId: 0 + - name: bone_3 + position: {x: 327.6825, y: 0.000062960375, z: 0} + rotation: {x: 0, y: 0, z: 0.24940832, w: 0.96839845} + length: 554.6178 + parentId: 1 + - name: bone_4 + position: {x: 554.6178, y: 0.0000017327948, z: 0} + rotation: {x: 0, y: 0, z: 0.34244308, w: 0.9395386} + length: 410.07385 + parentId: 2 + - name: bone_5 + position: {x: 410.07382, y: 0.00013790904, z: 0} + rotation: {x: 0, y: -0, z: 0.8314914, w: 0.5555376} + length: 470.42282 + parentId: 3 + - name: bone_6 + position: {x: 470.42273, y: -0.0000069890284, z: 0} + rotation: {x: 0, y: 0, z: 0.00029901, w: 0.99999994} + length: 149.02693 + parentId: 4 + - name: bone_7 + position: {x: 149.02698, y: 0.0008164094, z: 0} + rotation: {x: 0, y: 0, z: 0.043435983, w: 0.9990562} + length: 372.5686 + parentId: 5 + - name: bone_8 + position: {x: 179.21994, y: 213.67345, z: 0} + rotation: {x: 0, y: -0, z: 0.93540776, w: 0.35357088} + length: 120.848 + parentId: 2 + - name: bone_9 + position: {x: 120.8481, y: 0.0000354397, z: 0} + rotation: {x: 0, y: 0, z: 0.044363085, w: 0.9990155} + length: 150.56612 + parentId: 7 + - name: bone_10 + position: {x: 126.91362, y: 172.31529, z: 0} + rotation: {x: 0, y: -0, z: 0.9914436, w: 0.13053629} + length: 221.08769 + parentId: 1 + - name: bone_11 + position: {x: 221.08766, y: -0.000038338134, z: 0} + rotation: {x: 0, y: 0, z: -0.0063500036, w: 0.99997985} + length: 186.32204 + parentId: 9 + - name: bone_12 + position: {x: 186.32205, y: -0.0001605275, z: 0} + rotation: {x: 0, y: 0, z: 0.026598668, w: 0.99964625} + length: 131.07516 + parentId: 10 + - name: bone_13 + position: {x: 179.98344, y: -97.188065, z: 0} + rotation: {x: 0, y: -0, z: -0.9698563, w: 0.24367757} + length: 214.40872 + parentId: 1 + - name: bone_14 + position: {x: 214.40878, y: 0.00007070038, z: 0} + rotation: {x: 0, y: 0, z: 0.01584753, w: 0.9998744} + length: 163.56706 + parentId: 12 + - name: bone_15 + position: {x: 163.56705, y: -0.00005085426, z: 0} + rotation: {x: 0, y: 0, z: 0.010911991, w: 0.99994045} + length: 111.46555 + parentId: 13 + - name: bone_16 + position: {x: -52.108173, y: 122.85457, z: 0} + rotation: {x: 0, y: -0, z: 0.9996384, w: 0.026893666} + length: 201.87228 + parentId: 0 + - name: bone_17 + position: {x: 201.87222, y: -0.00020598111, z: 0} + rotation: {x: 0, y: 0, z: -0.021289987, w: 0.9997734} + length: 165.79692 + parentId: 15 + - name: bone_18 + position: {x: 165.79694, y: -0.0001759842, z: 0} + rotation: {x: 0, y: 0, z: 0.40078795, w: 0.9161709} + length: 90.85786 + parentId: 16 + - name: bone_19 + position: {x: -26.150799, y: -91.9295, z: 0} + rotation: {x: 0, y: -0, z: 0.9997255, w: 0.023428518} + length: 224.71088 + parentId: 0 + - name: bone_20 + position: {x: 224.71088, y: -0.0002302377, z: 0} + rotation: {x: 0, y: 0, z: 0.013917087, w: 0.99990314} + length: 137.39671 + parentId: 18 + - name: bone_21 + position: {x: 137.39668, y: -0.0001551812, z: 0} + rotation: {x: 0, y: 0, z: 0.36251768, w: 0.931977} + length: 84.40186 + parentId: 19 + parts: + - spritePosition: + x: 1801 + y: 381 + width: 145 + height: 1291 + spriteId: cf44d545c95fd45ebbe99184aaac0a39 + bones: + parentGroup: 0 + - spritePosition: + x: 360 + y: 1193 + width: 1300 + height: 1208 + spriteId: 57b9ecaa719814f029e4e4686fd4d555 + bones: 0600000005000000040000000200000003000000 + parentGroup: 0 + - spritePosition: + x: 781 + y: 963 + width: 412 + height: 481 + spriteId: 7e863db180b2541e3b7950b0d141b30e + bones: 01000000 + parentGroup: 0 + - spritePosition: + x: 627 + y: 1285 + width: 236 + height: 302 + spriteId: 962cb5a157b5742efa2b3a947d434e51 + bones: 0800000007000000 + parentGroup: 0 + - spritePosition: + x: 576 + y: 764 + width: 361 + height: 598 + spriteId: 83f7e88a1e4f942b9abe24d6df284375 + bones: 0b0000000a00000009000000 + parentGroup: 0 + - spritePosition: + x: 953 + y: 929 + width: 223 + height: 402 + spriteId: 703d679467bb24490b735f5a5f7eab8d + bones: 01000000 + parentGroup: 0 + - spritePosition: + x: 691 + y: 660 + width: 562 + height: 732 + spriteId: 12cc9c394e45346cab5b6d41032eb97e + bones: 0000000001000000 + parentGroup: 0 + - spritePosition: + x: 1092 + y: 788 + width: 253 + height: 543 + spriteId: 84650b44e56734f278c2bc42a1aa93b9 + bones: 0e0000000d0000000c000000 + parentGroup: 0 + - spritePosition: + x: 766 + y: 300 + width: 210 + height: 549 + spriteId: cf5beff8c01624c13a6de90188ee464b + bones: 11000000100000000f000000 + parentGroup: 0 + - spritePosition: + x: 993 + y: 323 + width: 214 + height: 542 + spriteId: 38ccfbb4211824cda99aa288cb29f63e + bones: 140000001300000012000000 + parentGroup: 0 + dimension: {x: 0, y: 0} + characterGroups: [] + boneGOs: + - go: {fileID: 100006, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 0 + - go: {fileID: 100008, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 1 + - go: {fileID: 100010, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 2 + - go: {fileID: 100012, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 3 + - go: {fileID: 100014, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 4 + - go: {fileID: 100016, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 5 + - go: {fileID: 100018, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 6 + - go: {fileID: 100020, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 7 + - go: {fileID: 100022, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 8 + - go: {fileID: 100024, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 9 + - go: {fileID: 100026, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 10 + - go: {fileID: 100028, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 11 + - go: {fileID: 100030, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 12 + - go: {fileID: 100032, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 13 + - go: {fileID: 100034, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 14 + - go: {fileID: 100036, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 15 + - go: {fileID: 100038, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 16 + - go: {fileID: 100040, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 17 + - go: {fileID: 100042, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 18 + - go: {fileID: 100044, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 19 + - go: {fileID: 100046, guid: 11f8561e37dc241a2a5e29f925d39c10, type: 3} + index: 20 + generateGOHierarchy: 0 + textureAssetName: Fei + prefabAssetName: Fei_GO + spriteLibAssetName: Sprite Lib diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.path@4.0.1/Editor/IMGUI/GUIFramework/CommandAction.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.path@4.0.1/Editor/IMGUI/GUIFramework/CommandAction.cs new file mode 100644 index 0000000000000000000000000000000000000000..9de95d73ff7b7907a4a4df9f3b3e283b3c9a394e --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.path@4.0.1/Editor/IMGUI/GUIFramework/CommandAction.cs @@ -0,0 +1,46 @@ +using System; +using UnityEngine; + +namespace UnityEditor.U2D.Path.GUIFramework +{ + public class CommandAction : GUIAction + { + private string m_CommandName; + + public Action onCommand; + + public CommandAction(string commandName) + { + m_CommandName = commandName; + } + + protected override bool GetTriggerContidtion(IGUIState guiState) + { + if (guiState.eventType == EventType.ValidateCommand && guiState.commandName == m_CommandName) + { + guiState.UseEvent(); + return true; + } + + return false; + } + + protected override bool GetFinishContidtion(IGUIState guiState) + { + if (guiState.eventType == EventType.ExecuteCommand && guiState.commandName == m_CommandName) + { + guiState.UseEvent(); + + return true; + } + + return false; + } + + protected override void OnFinish(IGUIState guiState) + { + if (onCommand != null) + onCommand(guiState); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.path@4.0.1/Editor/IMGUI/GUIFramework/CommandAction.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.path@4.0.1/Editor/IMGUI/GUIFramework/CommandAction.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f172c2697a1212ec1477b9684f579906605b32fb --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.path@4.0.1/Editor/IMGUI/GUIFramework/CommandAction.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d8d8b17ba93dfad489ee2c2ff2546fb0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.path@4.0.1/Editor/IMGUI/GUIFramework/Control.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.path@4.0.1/Editor/IMGUI/GUIFramework/Control.cs new file mode 100644 index 0000000000000000000000000000000000000000..2183cf8d6eb66b19e553c6bfda6d1662ce2a2c5b --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.path@4.0.1/Editor/IMGUI/GUIFramework/Control.cs @@ -0,0 +1,152 @@ +using System; +using UnityEngine; + +namespace UnityEditor.U2D.Path.GUIFramework +{ + public abstract class Control + { + private string m_Name; + private int m_NameHashCode; + private int m_ID; + private LayoutData m_LayoutData; + private int m_ActionID = -1; + private LayoutData m_HotLayoutData; + + public string name + { + get { return m_Name; } + } + + public int ID + { + get { return m_ID; } + } + + public int actionID + { + get { return m_ActionID; } + } + + public LayoutData layoutData + { + get { return m_LayoutData; } + set { m_LayoutData = value; } + } + + public LayoutData hotLayoutData + { + get { return m_HotLayoutData; } + } + + public Control(string name) + { + m_Name = name; + m_NameHashCode = name.GetHashCode(); + } + + public void GetControl(IGUIState guiState) + { + m_ID = guiState.GetControlID(m_NameHashCode, FocusType.Passive); + } + + internal void SetActionID(int actionID) + { + m_ActionID = actionID; + m_HotLayoutData = m_LayoutData; + } + + public void BeginLayout(IGUIState guiState) + { + Debug.Assert(guiState.eventType == EventType.Layout); + + m_LayoutData = OnBeginLayout(LayoutData.zero, guiState); + } + + public void Layout(IGUIState guiState) + { + Debug.Assert(guiState.eventType == EventType.Layout); + + for (var i = 0; i < GetCount(); ++i) + { + if (guiState.hotControl == actionID && hotLayoutData.index == i) + continue; + + var layoutData = new LayoutData() + { + index = i, + position = GetPosition(guiState, i), + distance = GetDistance(guiState, i), + forward = GetForward(guiState, i), + up = GetUp(guiState, i), + right = GetRight(guiState, i), + userData = GetUserData(guiState, i) + }; + + m_LayoutData = LayoutData.Nearest(m_LayoutData, layoutData); + } + } + + public void EndLayout(IGUIState guiState) + { + Debug.Assert(guiState.eventType == EventType.Layout); + + OnEndLayout(guiState); + } + + public void Repaint(IGUIState guiState) + { + for (var i = 0; i < GetCount(); ++i) + OnRepaint(guiState, i); + } + + protected virtual LayoutData OnBeginLayout(LayoutData data, IGUIState guiState) + { + return data; + } + + protected virtual void OnEndLayout(IGUIState guiState) + { + + } + + protected virtual void OnRepaint(IGUIState guiState, int index) + { + + } + + protected virtual int GetCount() + { + return 1; + } + + protected virtual Vector3 GetPosition(IGUIState guiState, int index) + { + return Vector3.zero; + } + + protected virtual Vector3 GetForward(IGUIState guiState, int index) + { + return Vector3.forward; + } + + protected virtual Vector3 GetUp(IGUIState guiState, int index) + { + return Vector3.up; + } + + protected virtual Vector3 GetRight(IGUIState guiState, int index) + { + return Vector3.right; + } + + protected virtual float GetDistance(IGUIState guiState, int index) + { + return layoutData.distance; + } + + protected virtual object GetUserData(IGUIState guiState, int index) + { + return null; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs new file mode 100644 index 0000000000000000000000000000000000000000..d7926873e07660ea760d739cf2d38cc3fdbfb887 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs @@ -0,0 +1,47 @@ +using NUnit.Framework; +using NUnit.Framework.Interfaces; + +namespace UnityEngine.TestTools.TestRunner.Callbacks +{ + [AddComponentMenu("")] + internal class PlayModeRunnerCallback : MonoBehaviour, ITestRunnerListener + { + private TestResultRenderer m_ResultRenderer; + + public void RunFinished(ITestResult testResults) + { + Application.logMessageReceivedThreaded -= LogRecieved; + if (Camera.main == null) + { + gameObject.AddComponent(); + } + m_ResultRenderer = new TestResultRenderer(testResults); + m_ResultRenderer.ShowResults(); + } + + public void TestFinished(ITestResult result) + { + } + + public void OnGUI() + { + if (m_ResultRenderer != null) + m_ResultRenderer.Draw(); + } + + public void RunStarted(ITest testsToRun) + { + Application.logMessageReceivedThreaded += LogRecieved; + } + + public void TestStarted(ITest test) + { + } + + private void LogRecieved(string message, string stacktrace, LogType type) + { + if (TestContext.Out != null) + TestContext.Out.WriteLine(message); + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..15706d5842018657ca3d1c2971c3f0c26f432102 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3cf5cb9e1ef590c48b1f919f2a7bd895 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/PlayerQuitHandler.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/PlayerQuitHandler.cs new file mode 100644 index 0000000000000000000000000000000000000000..267048ce5d0145f513ead48e8fdb5abb81dd684c --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/PlayerQuitHandler.cs @@ -0,0 +1,43 @@ +using NUnit.Framework.Interfaces; +using UnityEngine.Networking.PlayerConnection; +using UnityEngine.TestRunner.TestLaunchers; + +namespace UnityEngine.TestTools.TestRunner.Callbacks +{ + internal class PlayerQuitHandler : MonoBehaviour, ITestRunnerListener + { + public void Start() + { + PlayerConnection.instance.Register(PlayerConnectionMessageIds.quitPlayerMessageId, ProcessPlayerQuiteMessage); + } + + private void ProcessPlayerQuiteMessage(MessageEventArgs arg0) + { + //Some platforms don't quit, so we need to disconnect to make sure they will not connect to another editor instance automatically. + PlayerConnection.instance.DisconnectAll(); + + //XBOX has an error when quitting + if (Application.platform == RuntimePlatform.XboxOne) + { + return; + } + Application.Quit(); + } + + public void RunStarted(ITest testsToRun) + { + } + + public void RunFinished(ITestResult testResults) + { + } + + public void TestStarted(ITest test) + { + } + + public void TestFinished(ITestResult result) + { + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/PlayerQuitHandler.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/PlayerQuitHandler.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9d849901570c2e113106d094576014f2db2278b8 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/PlayerQuitHandler.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f8ed0b11850145c4995dd76170bb2500 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs new file mode 100644 index 0000000000000000000000000000000000000000..755ac83fd1f9d2715a75ecf8ec90a2d0053d7508 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NUnit.Framework.Interfaces; +using UnityEngine.Networking.PlayerConnection; +using UnityEngine.TestRunner.TestLaunchers; + +namespace UnityEngine.TestTools.TestRunner.Callbacks +{ + [AddComponentMenu("")] + internal class RemoteTestResultSender : MonoBehaviour, ITestRunnerListener + { + private class QueueData + { + public Guid id { get; set; } + public byte[] data { get; set; } + } + + private const int k_aliveMessageFrequency = 120; + private float m_NextliveMessage = k_aliveMessageFrequency; + private readonly Queue m_SendQueue = new Queue(); + private readonly object m_LockQueue = new object(); + private readonly IRemoteTestResultDataFactory m_TestResultDataFactory = new RemoteTestResultDataFactory(); + + public void Start() + { + StartCoroutine(SendDataRoutine()); + } + + private byte[] SerializeObject(object objectToSerialize) + { + return Encoding.UTF8.GetBytes(JsonUtility.ToJson(objectToSerialize)); + } + + public void RunStarted(ITest testsToRun) + { + var data = SerializeObject(m_TestResultDataFactory.CreateFromTest(testsToRun)); + lock (m_LockQueue) + { + m_SendQueue.Enqueue(new QueueData + { + id = PlayerConnectionMessageIds.runStartedMessageId, + data = data + }); + } + } + + public void RunFinished(ITestResult testResults) + { + var data = SerializeObject(m_TestResultDataFactory.CreateFromTestResult(testResults)); + lock (m_LockQueue) + { + m_SendQueue.Enqueue(new QueueData { id = PlayerConnectionMessageIds.runFinishedMessageId, data = data, }); + } + } + + public void TestStarted(ITest test) + { + var data = SerializeObject(m_TestResultDataFactory.CreateFromTest(test)); + lock (m_LockQueue) + { + m_SendQueue.Enqueue(new QueueData + { + id = PlayerConnectionMessageIds.testStartedMessageId, + data = data + }); + } + } + + public void TestFinished(ITestResult result) + { + var testRunnerResultForApi = m_TestResultDataFactory.CreateFromTestResult(result); + var resultData = SerializeObject(testRunnerResultForApi); + lock (m_LockQueue) + { + m_SendQueue.Enqueue(new QueueData + { + id = PlayerConnectionMessageIds.testFinishedMessageId, + data = resultData, + }); + } + } + + public IEnumerator SendDataRoutine() + { + while (!PlayerConnection.instance.isConnected) + { + yield return new WaitForSeconds(1); + } + + while (true) + { + lock (m_LockQueue) + { + if (PlayerConnection.instance.isConnected && m_SendQueue.Count > 0) + { + ResetNextPlayerAliveMessageTime(); + var queueData = m_SendQueue.Dequeue(); + PlayerConnection.instance.Send(queueData.id, queueData.data); + yield return null; + } + + //This is needed so we dont stall the player totally + if (!m_SendQueue.Any()) + { + SendAliveMessageIfNeeded(); + yield return new WaitForSeconds(0.02f); + } + } + } + } + + private void SendAliveMessageIfNeeded() + { + if (Time.timeSinceLevelLoad < m_NextliveMessage) + { + return; + } + + Debug.Log("Sending player alive message back to editor."); + ResetNextPlayerAliveMessageTime(); + PlayerConnection.instance.Send(PlayerConnectionMessageIds.playerAliveHeartbeat, new byte[0]); + } + + private void ResetNextPlayerAliveMessageTime() + { + m_NextliveMessage = Time.timeSinceLevelLoad + k_aliveMessageFrequency; + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..cbb4d4063afcd24dd05643876037f6bb4b3dbd33 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 20793418366caf14293b29c55df5e9ec +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..7b16cb9f6181addb7bcccddd8a5bfcc472c37f0c --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f3a361a6ad1aff14ba8f48976e94ad76 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs new file mode 100644 index 0000000000000000000000000000000000000000..38502c9bb995f4f0be966359244efa1210de1d6f --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs @@ -0,0 +1,11 @@ +namespace UnityEngine.TestTools +{ + /// + /// An interface implemented by a MonoBehaviour test. + /// + public interface IMonoBehaviourTest + { + /// True when the test is considered finished. + bool IsTestFinished {get; } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9af400427f2b043c91057213f3389de842cde189 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a002d3737b873954395b7cf862873ab8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs new file mode 100644 index 0000000000000000000000000000000000000000..565717931290a57f9b0d01f69b726e96856b7a4d --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs @@ -0,0 +1,60 @@ +namespace UnityEngine.TestTools +{ + /// + /// This is a wrapper that allows running tests on MonoBehaviour scripts. Inherits from . + /// + /// A MonoBehaviour component created for the test and attached to the tests [GameObject](https://docs.unity3d.com/ScriptReference/GameObject.html). + public class MonoBehaviourTest : CustomYieldInstruction where T : MonoBehaviour, IMonoBehaviourTest + { + /// A MonoBehaviour component created for the test and attached to the tests [GameObject](https://docs.unity3d.com/ScriptReference/GameObject.html). + public T component { get; } + /// + /// A `GameObject` created as a container for the test component. + /// + public GameObject gameObject { get { return component.gameObject; } } + /// + /// `MonoBehaviourTest` is a [coroutine](https://docs.unity3d.com/ScriptReference/Coroutine.html) and a helper for writing MonoBehaviour tests. + /// Yield a `MonoBehaviour`Test when using the `UnityTest` attribute to instantiate the `MonoBehaviour` you wish to test and wait for it to finish running. Implement the `IMonoBehaviourTest` interface on the `MonoBehaviour` to state when the test completes. + /// + /// + /// + /// + /// [UnityTest] + /// public IEnumerator MonoBehaviourTest_Works() + /// { + /// yield return new MonoBehaviourTest<MyMonoBehaviourTest>(); + /// } + /// + /// public class MyMonoBehaviourTest : MonoBehaviour, IMonoBehaviourTest + /// { + /// private int frameCount; + /// public bool IsTestFinished + /// { + /// get { return frameCount > 10; } + /// } + /// + /// void Update() + /// { + /// frameCount++; + /// } + /// } + /// + /// + public MonoBehaviourTest(bool dontDestroyOnLoad = true) + { + var go = new GameObject("MonoBehaviourTest: " + typeof(T).FullName); + component = go.AddComponent(); + if (dontDestroyOnLoad) + { + Object.DontDestroyOnLoad(go); + } + } + /// + /// (Inherited) Returns `true`` if the test is not finished yet, which keeps the coroutine suspended + /// + public override bool keepWaiting + { + get { return !component.IsTestFinished; } + } + } +} diff --git a/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs.meta b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c727f85aaaf5ccdeb2dbffd252405105856f1626 --- /dev/null +++ b/benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 164c9b1458eaab743a4b45c37a4d720d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: