diff --git a/Runtime/SplineImporter.cs b/Runtime/SplineImporter.cs index 6920002..41931e1 100644 --- a/Runtime/SplineImporter.cs +++ b/Runtime/SplineImporter.cs @@ -136,7 +136,7 @@ namespace FrameJosh.SplineImporter { public TextAsset splineData; - public float scale = 1; + public float3 scale = new (1f, 1f, 1f); public static Vector3 PositionToVector(Position position) { diff --git a/Runtime/SplinePlus.cs b/Runtime/SplinePlus.cs deleted file mode 100644 index 90753d1..0000000 --- a/Runtime/SplinePlus.cs +++ /dev/null @@ -1,151 +0,0 @@ -using Unity.Mathematics; -using UnityEngine; -using UnityEngine.Splines; - -namespace FrameJosh.SplineImporter -{ - public class SplinePlus : MonoBehaviour - { - public SplineContainer splineContainer; - - public SplineContainer deformContainer; - - public float resolution = 1; - - public void Evaluate(int splineIndex, float anchor, float distance, out Vector3 position, out Quaternion rotation) - { - EvaluateSpline(splineContainer.Splines[splineIndex], deformContainer ? deformContainer.Spline : null, anchor, distance, resolution, out float3 position1, out float3 tangent, out float3 upVector); - - position = splineContainer.transform.TransformPoint(position1); - - rotation = splineContainer.transform.rotation - * Quaternion.LookRotation(tangent, upVector); - } - - public void GetNearestPoint(int splineIndex, Vector3 point, out Vector3 position, out Quaternion rotation, out float t) - { - if (deformContainer) - { - SplineUtility.GetNearestPoint(deformContainer.Spline, point, out _, out float t1); - - deformContainer.Spline.Evaluate(t1, out float3 nearest, out float3 tangent, out float3 upVector); - - float3 difference = (float3)point - nearest; - - float3x3 matrix = new() - { - c0 = math.normalize(math.cross(upVector, tangent)), - c1 = math.normalize(upVector), - c2 = math.normalize(tangent), - }; - - float3 offset = new(math.dot(difference, matrix.c2), - math.dot(difference, matrix.c1), - -math.dot(difference, matrix.c0)); - - float distance = math.clamp(t1, 0, 1) * deformContainer.Spline.GetLength(); - - point = new float3(distance, 0, 0) + offset; - - SplineUtility.GetNearestPoint(splineContainer.Splines[splineIndex], point, out _, out t); - - DeformSpline(splineContainer.Spline, deformContainer.Spline, t, resolution, out float3 position1, out float3 tangent1, out float3 upVector1); - - position = position1; - - rotation = Quaternion.LookRotation(tangent1, upVector1); - } - else - { - SplineUtility.GetNearestPoint(splineContainer.Splines[splineIndex], point, out float3 position1, out t); - - position = position1; - - SplineUtility.Evaluate(splineContainer.Splines[splineIndex], t, out _, out float3 tangent, out float3 upVector); - - rotation = Quaternion.LookRotation(tangent, upVector); - } - - t = math.clamp(t, 0, 1); - } - - static void EvaluateSpline(ISpline spline, ISpline deform, float anchor, float distance, float resolution, out float3 position, out float3 tangent, out float3 upVector) - { - float t = anchor + (distance / spline.GetLength()); - - if (deform != null) - DeformSpline(spline, deform, t, resolution, out position, out tangent, out upVector); - else - spline.Evaluate(t, out position, out tangent, out upVector); - } - - static void DeformSpline(ISpline spline, ISpline deform, float t, float resolution, out float3 position, out float3 tangent, out float3 upVector) - { - float resolutionScale = math.ceil(spline.GetLength() * resolution); - - spline.Evaluate(t, out float3 position1, out _, out _); - - position = EvaluatePoint(deform, position1); - - float t1 = math.clamp(t, 0, 1 - (1 / (float)resolutionScale)); - - spline.Evaluate(t1, out float3 position2, out _, out _); - - float3 point0 = EvaluatePoint(deform, position2); - - spline.Evaluate(t1 + (1 / resolutionScale), out float3 position3, out _, out _); - - float3 point1 = EvaluatePoint(deform, position3); - - tangent = point1 - point0; - - upVector = math.up(); - } - - static float3 EvaluatePoint(ISpline deform, float3 point) - { - deform.Evaluate(point.x / deform.GetLength(), out float3 deformPosition, out float3 deformTangent, out float3 deformUpVector); - - float3 right = math.normalize(math.cross(deformTangent, deformUpVector)); - - float3 up = math.normalize(deformUpVector); - - float3 forward = math.normalize(deformTangent); - - return deformPosition - + (forward * (math.max(point.x - deform.GetLength(), 0) + math.min(point.x, 0))) - + (right * point.z) - + (up * point.y); - } - - void OnDrawGizmosSelected() - { - if (!splineContainer || !deformContainer) return; - - Gizmos.color = Color.green; - - for (int i = 0; i < splineContainer.Splines.Count; i++) - { - Evaluate(0, 0, 0, out Vector3 position, out _); - - float3 oldPosition = position; - - int gizmoResolution = (int)math.ceil(splineContainer.Splines[i].GetLength()); - - for (float j = 1; j <= gizmoResolution; j++) - { - Evaluate(0, j / gizmoResolution, 0, out position, out _); - - Gizmos.DrawLine(oldPosition, position); - - oldPosition = position; - } - } - } - - void Reset() - { - splineContainer = GetComponentInChildren(); - } - } -} diff --git a/Runtime/SplinePlus.cs.meta b/Runtime/SplinePlus.cs.meta deleted file mode 100644 index b63859f..0000000 --- a/Runtime/SplinePlus.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 41eeb6f8f41efdb4eb29d6db19d12b6c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples.meta b/Samples.meta deleted file mode 100644 index 334ef9c..0000000 --- a/Samples.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dad66e5ce81d3da46a6f24be534d3c90 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples/README.txt b/Samples/README.txt deleted file mode 100644 index 221579d..0000000 --- a/Samples/README.txt +++ /dev/null @@ -1,21 +0,0 @@ -In the Spline Debug scene, there are 6 important objects: - -1. Spline -- A curved spline going from (0, 0, 0) to (10, 0, -5) - -2. Deform -- A curved spline used to deform Spline - -3. Spline Plus -- An object with the SplinePlus component -- This object is used to deform spline Spline along spline Deform -- The resulting spline is rendered in green with Gizmos enabled - -4. Evaluate -- Renders a cube gizmo along each of the above splines at a given distance from a given anchor point - -5. Nearest Point -- Renders a cube gizmo at the nearest point along the deformed spline from the Spline Plus object - -6. Spline Debug -- An instantiated Blender file including a tube warped around the deformed spline using Blender's Curve modifier \ No newline at end of file diff --git a/Samples/README.txt.meta b/Samples/README.txt.meta deleted file mode 100644 index 0296842..0000000 --- a/Samples/README.txt.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 4f23fad103e2d8548be04a5c255ce66b -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples/Spline Debug.blend b/Samples/Spline Debug.blend deleted file mode 100644 index 94faaa1..0000000 Binary files a/Samples/Spline Debug.blend and /dev/null differ diff --git a/Samples/Spline Debug.blend.meta b/Samples/Spline Debug.blend.meta deleted file mode 100644 index 5647de3..0000000 --- a/Samples/Spline Debug.blend.meta +++ /dev/null @@ -1,109 +0,0 @@ -fileFormatVersion: 2 -guid: b93c3e7374b43344ca6fa176d935f2bd -ModelImporter: - serializedVersion: 22200 - internalIDToNameTable: [] - externalObjects: {} - materials: - materialImportMode: 2 - materialName: 0 - materialSearch: 1 - materialLocation: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - resampleCurves: 1 - optimizeGameObjects: 0 - removeConstantScaleCurves: 0 - motionNodeName: - rigImportErrors: - rigImportWarnings: - animationImportErrors: - animationImportWarnings: - animationRetargetingWarnings: - animationDoRetargetingWarnings: 0 - importAnimatedCustomProperties: 0 - importConstraints: 0 - animationCompression: 1 - animationRotationError: 0.5 - animationPositionError: 0.5 - animationScaleError: 0.5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - extraUserProperties: [] - clipAnimations: [] - isReadable: 0 - meshes: - lODScreenPercentages: [] - globalScale: 1 - meshCompression: 0 - addColliders: 0 - useSRGBMaterialColor: 1 - sortHierarchyByName: 1 - importPhysicalCameras: 1 - importVisibility: 1 - importBlendShapes: 1 - importCameras: 1 - importLights: 1 - nodeNameCollisionStrategy: 1 - fileIdsGeneration: 2 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - keepQuads: 0 - weldVertices: 1 - bakeAxisConversion: 1 - preserveHierarchy: 0 - skinWeightsMode: 0 - maxBonesPerVertex: 4 - minBoneWeight: 0.001 - optimizeBones: 1 - meshOptimizationFlags: -1 - indexFormat: 0 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVMarginMethod: 1 - secondaryUVMinLightmapResolution: 40 - secondaryUVMinObjectScale: 1 - secondaryUVPackMargin: 4 - useFileScale: 1 - strictVertexDataChecks: 0 - tangentSpace: - normalSmoothAngle: 60 - normalImportMode: 0 - tangentImportMode: 3 - normalCalculationMode: 4 - legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 - blendShapeNormalImportMode: 1 - normalSmoothingSource: 0 - referencedClips: [] - importAnimation: 1 - humanDescription: - serializedVersion: 3 - human: [] - skeleton: [] - armTwist: 0.5 - foreArmTwist: 0.5 - upperLegTwist: 0.5 - legTwist: 0.5 - armStretch: 0.05 - legStretch: 0.05 - feetSpacing: 0 - globalScale: 1 - rootMotionBoneName: - hasTranslationDoF: 0 - hasExtraRoot: 0 - skeletonHasParents: 1 - lastHumanDescriptionAvatarSource: {instanceID: 0} - autoGenerateAvatarMappingIfUnspecified: 1 - animationType: 2 - humanoidOversampling: 1 - avatarSetup: 0 - addHumanoidExtraRootOnlyWhenUsingAvatar: 1 - importBlendShapeDeformPercent: 1 - remapMaterialsIfMaterialImportModeIsNone: 0 - additionalBone: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples/Spline Debug.blend1 b/Samples/Spline Debug.blend1 deleted file mode 100644 index f42c8df..0000000 Binary files a/Samples/Spline Debug.blend1 and /dev/null differ diff --git a/Samples/Spline Debug.blend1.meta b/Samples/Spline Debug.blend1.meta deleted file mode 100644 index 6573224..0000000 --- a/Samples/Spline Debug.blend1.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d3d151e577ee0984bbf49dac54834606 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples/Spline Debug.unity b/Samples/Spline Debug.unity deleted file mode 100644 index 02c6249..0000000 --- a/Samples/Spline Debug.unity +++ /dev/null @@ -1,1021 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 3 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - buildHeightMesh: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &52903581 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 52903583} - - component: {fileID: 52903582} - - component: {fileID: 52903584} - m_Layer: 0 - m_Name: Spline - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &52903582 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 52903581} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dab5c7d4c32e743048dfca98e2d5914f, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Spline: - m_EditModeType: 1 - m_Knots: [] - m_MetaData: [] - m_Closed: 0 - m_IntData: - m_Data: [] - m_FloatData: - m_Data: [] - m_Float4Data: - m_Data: [] - m_ObjectData: - m_Data: [] - m_Splines: - - m_EditModeType: 1 - m_Knots: - - Position: - x: 0 - y: 0 - z: 0 - TangentIn: - x: -0.000000091391165 - y: 0 - z: -0.99999994 - TangentOut: - x: 0.000000091391165 - y: 0 - z: 0.99999994 - Rotation: - value: - x: 0 - y: 0.7071067 - z: 0 - w: 0.7071068 - - Position: - x: 10 - y: 0 - z: -5 - TangentIn: - x: 0.00000011920929 - y: 0 - z: -1.0000001 - TangentOut: - x: -0.00000011920929 - y: 0 - z: 1.0000001 - Rotation: - value: - x: 0 - y: 0.7071068 - z: 0 - w: 0.7071068 - m_MetaData: - - Mode: 4 - Tension: 0.5 - DistanceToInterpolation: - - Distance: 0 - T: 0 - - Distance: 0.12902667 - T: 0.03448276 - - Distance: 0.31057253 - T: 0.06896552 - - Distance: 0.5427017 - T: 0.10344828 - - Distance: 0.82212853 - T: 0.13793103 - - Distance: 1.145098 - T: 0.1724138 - - Distance: 1.5076509 - T: 0.20689656 - - Distance: 1.9057269 - T: 0.2413793 - - Distance: 2.3352098 - T: 0.27586207 - - Distance: 2.7919493 - T: 0.31034482 - - Distance: 3.271776 - T: 0.3448276 - - Distance: 3.7705038 - T: 0.37931034 - - Distance: 4.2839413 - T: 0.41379312 - - Distance: 4.8078885 - T: 0.44827586 - - Distance: 5.3381433 - T: 0.4827586 - - Distance: 5.870501 - T: 0.51724136 - - Distance: 6.400756 - T: 0.55172414 - - Distance: 6.9247036 - T: 0.5862069 - - Distance: 7.4381394 - T: 0.62068963 - - Distance: 7.9368687 - T: 0.6551724 - - Distance: 8.416695 - T: 0.6896552 - - Distance: 8.873434 - T: 0.7241379 - - Distance: 9.3029175 - T: 0.7586207 - - Distance: 9.7009945 - T: 0.79310346 - - Distance: 10.063548 - T: 0.82758623 - - Distance: 10.386517 - T: 0.86206895 - - Distance: 10.665943 - T: 0.8965517 - - Distance: 10.898072 - T: 0.9310345 - - Distance: 11.079619 - T: 0.9655172 - - Distance: 11.208646 - T: 1 - - Mode: 4 - Tension: 0.5 - DistanceToInterpolation: - - Distance: -1 - T: -1 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - m_Closed: 0 - m_IntData: - m_Data: [] - m_FloatData: - m_Data: [] - m_Float4Data: - m_Data: [] - m_ObjectData: - m_Data: [] - m_Knots: - m_KnotsLink: [] ---- !u!4 &52903583 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 52903581} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &52903584 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 52903581} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d91b840f8503aaf409d992f7c89e93ed, type: 3} - m_Name: - m_EditorClassIdentifier: - splineData: {fileID: 4900000, guid: f3719dd04e0fe40438bb9578e9d53804, type: 3} - scale: 1 ---- !u!1 &304474437 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 304474439} - - component: {fileID: 304474438} - m_Layer: 0 - m_Name: Evaluate - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &304474438 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 304474437} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b96504a617d74094faa656840a73e7a9, type: 3} - m_Name: - m_EditorClassIdentifier: - splinePlus: {fileID: 1797524873} - anchor: 0.5 - distance: 0 - cubeSize: 0.5 - matrixSize: 1 ---- !u!4 &304474439 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 304474437} - m_LocalRotation: {x: 0, y: 0.90936726, z: 0, w: -0.41599432} - m_LocalPosition: {x: 2.3040967, y: 0, z: -2.9640856} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &438121372 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: -8679921383154817045, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_RootOrder - value: 7 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 919132149155446097, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_Name - value: Spline Debug - objectReference: {fileID: 0} - - target: {fileID: 1437708352211787324, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 9164955242613472826, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: b93c3e7374b43344ca6fa176d935f2bd, type: 3} ---- !u!1 &1015321711 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1015321713} - - component: {fileID: 1015321712} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &1015321712 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1015321711} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &1015321713 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1015321711} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &1024458826 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1024458828} - - component: {fileID: 1024458827} - - component: {fileID: 1024458829} - m_Layer: 0 - m_Name: Deform - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1024458827 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1024458826} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dab5c7d4c32e743048dfca98e2d5914f, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Spline: - m_EditModeType: 1 - m_Knots: [] - m_MetaData: [] - m_Closed: 0 - m_IntData: - m_Data: [] - m_FloatData: - m_Data: [] - m_Float4Data: - m_Data: [] - m_ObjectData: - m_Data: [] - m_Splines: - - m_EditModeType: 1 - m_Knots: - - Position: - x: 0 - y: 0 - z: 0 - TangentIn: - x: -0.00000027818137 - y: 0 - z: -9.999998 - TangentOut: - x: 0.00000027818137 - y: 0 - z: 9.999998 - Rotation: - value: - x: 0 - y: 0.7071067 - z: 0 - w: 0.7071068 - - Position: - x: 10.000002 - y: 0 - z: -9.999998 - TangentIn: - x: 0.00000023841835 - y: 0 - z: -9.999999 - TangentOut: - x: -0.00000023841835 - y: 0 - z: 9.999999 - Rotation: - value: - x: 0 - y: 0.70710665 - z: 0 - w: 0.7071069 - m_MetaData: - - Mode: 4 - Tension: 0.5 - DistanceToInterpolation: - - Distance: 0 - T: 0 - - Distance: 0.9654083 - T: 0.03448276 - - Distance: 1.8034823 - T: 0.06896552 - - Distance: 2.5308564 - T: 0.10344828 - - Distance: 3.1657183 - T: 0.13793103 - - Distance: 3.7278092 - T: 0.1724138 - - Distance: 4.2378454 - T: 0.20689656 - - Distance: 4.716094 - T: 0.2413793 - - Distance: 5.1803436 - T: 0.27586207 - - Distance: 5.6441407 - T: 0.31034482 - - Distance: 6.116097 - T: 0.3448276 - - Distance: 6.6002817 - T: 0.37931034 - - Distance: 7.097192 - T: 0.41379312 - - Distance: 7.604785 - T: 0.44827586 - - Distance: 8.119389 - T: 0.4827586 - - Distance: 8.636425 - T: 0.51724136 - - Distance: 9.151029 - T: 0.55172414 - - Distance: 9.658623 - T: 0.5862069 - - Distance: 10.155531 - T: 0.62068963 - - Distance: 10.639717 - T: 0.6551724 - - Distance: 11.111672 - T: 0.6896552 - - Distance: 11.575469 - T: 0.7241379 - - Distance: 12.03972 - T: 0.7586207 - - Distance: 12.517968 - T: 0.79310346 - - Distance: 13.028005 - T: 0.82758623 - - Distance: 13.590096 - T: 0.86206895 - - Distance: 14.224958 - T: 0.8965517 - - Distance: 14.952333 - T: 0.9310345 - - Distance: 15.790405 - T: 0.9655172 - - Distance: 16.755814 - T: 1 - - Mode: 4 - Tension: 0.5 - DistanceToInterpolation: - - Distance: -1 - T: -1 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - - Distance: 0 - T: 0 - m_Closed: 0 - m_IntData: - m_Data: [] - m_FloatData: - m_Data: [] - m_Float4Data: - m_Data: [] - m_ObjectData: - m_Data: [] - m_Knots: - m_KnotsLink: [] ---- !u!4 &1024458828 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1024458826} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1024458829 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1024458826} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d91b840f8503aaf409d992f7c89e93ed, type: 3} - m_Name: - m_EditorClassIdentifier: - splineData: {fileID: 4900000, guid: 22decb6838ce8a34a883a7ad6c7c3335, type: 3} - scale: 1 ---- !u!1 &1220459424 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1220459428} - - component: {fileID: 1220459425} - m_Layer: 0 - m_Name: Nearest Point - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1220459425 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1220459424} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0760258fbb4f0b5418d9a88014403d0e, type: 3} - m_Name: - m_EditorClassIdentifier: - splinePlus: {fileID: 1797524873} - cubeSize: 0.5 - matrixSize: 1 ---- !u!4 &1220459428 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1220459424} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 2, y: 0, z: -5} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1797524872 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1797524874} - - component: {fileID: 1797524873} - m_Layer: 0 - m_Name: Spline Plus - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1797524873 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1797524872} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 41eeb6f8f41efdb4eb29d6db19d12b6c, type: 3} - m_Name: - m_EditorClassIdentifier: - splineContainer: {fileID: 52903582} - deformContainer: {fileID: 1024458827} - resolution: 4 ---- !u!4 &1797524874 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1797524872} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1801355766 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1801355769} - - component: {fileID: 1801355768} - - component: {fileID: 1801355767} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1801355767 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1801355766} - m_Enabled: 1 ---- !u!20 &1801355768 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1801355766} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1801355769 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1801355766} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Samples/Spline Debug.unity.meta b/Samples/Spline Debug.unity.meta deleted file mode 100644 index c925405..0000000 --- a/Samples/Spline Debug.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 44ea138cdbdb30745b195f3459bdf8c9 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples/SplineEvaluateDebug.cs b/Samples/SplineEvaluateDebug.cs deleted file mode 100644 index 123b8a4..0000000 --- a/Samples/SplineEvaluateDebug.cs +++ /dev/null @@ -1,51 +0,0 @@ -using Unity.Mathematics; -using UnityEngine; - -namespace FrameJosh.SplineImporter.Samples -{ - public class SplineEvaluateDebug : MonoBehaviour - { - [SerializeField] SplinePlus splinePlus; - - [SerializeField] float anchor; - - [SerializeField] float distance; - - [SerializeField] float cubeSize; - - [SerializeField] float matrixSize; - - void OnDrawGizmos() - { - if (!splinePlus) return; - - splinePlus.Evaluate(0, anchor, distance, out Vector3 position, out Quaternion rotation); - - transform.position = position; - - transform.rotation = rotation; - - Gizmos.DrawCube(position, Vector3.one * cubeSize); - - splinePlus.splineContainer.Evaluate(anchor + (distance / splinePlus.splineContainer.Spline.GetLength()), out float3 position1, out _, out _); - - Gizmos.DrawCube(position1, Vector3.one * cubeSize); - - splinePlus.deformContainer.Evaluate(position1.x / splinePlus.deformContainer.Spline.GetLength(), out float3 deformPosition, out _, out _); - - Gizmos.DrawCube(deformPosition, Vector3.one * cubeSize); - - Gizmos.color = Color.green; - - Gizmos.DrawRay(position, transform.up * matrixSize); - - Gizmos.color = Color.red; - - Gizmos.DrawRay(position, transform.right * matrixSize); - - Gizmos.color = Color.blue; - - Gizmos.DrawRay(position, transform.forward * matrixSize); - } - } -} diff --git a/Samples/SplineEvaluateDebug.cs.meta b/Samples/SplineEvaluateDebug.cs.meta deleted file mode 100644 index cd1c12b..0000000 --- a/Samples/SplineEvaluateDebug.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b96504a617d74094faa656840a73e7a9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples/SplineNearestPointDebug.cs b/Samples/SplineNearestPointDebug.cs deleted file mode 100644 index 739b463..0000000 --- a/Samples/SplineNearestPointDebug.cs +++ /dev/null @@ -1,34 +0,0 @@ -using UnityEngine; - -namespace FrameJosh.SplineImporter.Samples -{ - public class SplineNearestPointDebug : MonoBehaviour - { - [SerializeField] SplinePlus splinePlus; - - [SerializeField] float cubeSize; - - [SerializeField] float matrixSize; - - void OnDrawGizmos() - { - if (!splinePlus) return; - - splinePlus.GetNearestPoint(0, transform.position, out Vector3 position, out Quaternion rotation, out _); - - Gizmos.DrawCube(position, Vector3.one * cubeSize); - - Gizmos.color = Color.green; - - Gizmos.DrawRay(position, (Quaternion)rotation * Vector3.up * matrixSize); - - Gizmos.color = Color.red; - - Gizmos.DrawRay(position, (Quaternion)rotation * Vector3.right * matrixSize); - - Gizmos.color = Color.blue; - - Gizmos.DrawRay(position, (Quaternion)rotation * Vector3.forward * matrixSize); - } - } -} diff --git a/Samples/SplineNearestPointDebug.cs.meta b/Samples/SplineNearestPointDebug.cs.meta deleted file mode 100644 index f144129..0000000 --- a/Samples/SplineNearestPointDebug.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0760258fbb4f0b5418d9a88014403d0e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples/Splines.meta b/Samples/Splines.meta deleted file mode 100644 index d804883..0000000 --- a/Samples/Splines.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8b9cd3cbddbe4e44abf819fdd6da81ee -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples/Splines/Deform.json b/Samples/Splines/Deform.json deleted file mode 100644 index 4d5d45a..0000000 --- a/Samples/Splines/Deform.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "splines": [ - { - "controlPoints": [ - { - "position": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "handleL": { - "x": -9.999999046325684, - "y": -1.5099578831723193e-06, - "z": 0.0 - }, - "handleR": { - "x": 9.999999046325684, - "y": 1.5099578831723193e-06, - "z": 0.0 - }, - "tilt": 0.0 - }, - { - "position": { - "x": 10.000001907348633, - "y": -9.999998092651367, - "z": 0.0 - }, - "handleL": { - "x": 1.9073486328125e-06, - "y": -10.000001907348633, - "z": 0.0 - }, - "handleR": { - "x": 20.000001907348633, - "y": -9.999994277954102, - "z": 0.0 - }, - "tilt": 0.0 - } - ], - "closed": false - } - ] -} \ No newline at end of file diff --git a/Samples/Splines/Deform.json.meta b/Samples/Splines/Deform.json.meta deleted file mode 100644 index 84810c9..0000000 --- a/Samples/Splines/Deform.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 22decb6838ce8a34a883a7ad6c7c3335 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples/Splines/Spline.json b/Samples/Splines/Spline.json deleted file mode 100644 index 8ab1d86..0000000 --- a/Samples/Splines/Spline.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "splines": [ - { - "controlPoints": [ - { - "position": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "handleL": { - "x": -1.0, - "y": -8.742277657347586e-08, - "z": 0.0 - }, - "handleR": { - "x": 1.0, - "y": 8.742277657347586e-08, - "z": 0.0 - }, - "tilt": -0.0 - }, - { - "position": { - "x": 10.0, - "y": -5.0, - "z": 0.0 - }, - "handleL": { - "x": 9.0, - "y": -5.0, - "z": 0.0 - }, - "handleR": { - "x": 11.0, - "y": -5.0, - "z": 0.0 - }, - "tilt": -0.0 - } - ], - "closed": false - } - ] -} \ No newline at end of file diff --git a/Samples/Splines/Spline.json.meta b/Samples/Splines/Spline.json.meta deleted file mode 100644 index b014092..0000000 --- a/Samples/Splines/Spline.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: f3719dd04e0fe40438bb9578e9d53804 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/package.json b/package.json index c53c8d1..a7b86e2 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "com.josh.spline-importer", - "version": "1.0.0", + "name": "ru.shazbot.spline-importer", + "version": "2.0.0", "displayName": "Spline Importer", - "description": "Import and export splines between Blender and Unity", - "unity": "2022.1", + "description": "Import and export splines between Blender and Unity.", + "unity": "2021.3", "dependencies": { - "com.unity.mathematics": "1.0.0", - "com.unity.splines": "1.0.0" + "com.unity.mathematics": "1.2.6", + "com.unity.splines": "2.5.1" }, "author": { "name": "Josh",