modify zoomin
This commit is contained in:
Binary file not shown.
Binary file not shown.
58
.vs/3d-fengji/v17/DocumentLayout.backup.json
Normal file
58
.vs/3d-fengji/v17/DocumentLayout.backup.json
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "D:\\unityData\\Git\u7248\u672C\\3d-fengji\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{E01BD8B3-55E8-74DB-B103-CC292D26A5E4}|Assembly-CSharp.csproj|d:\\unitydata\\git\u7248\u672C\\3d-fengji\\assets\\scripts\\icons\\askforwebinfomation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{E01BD8B3-55E8-74DB-B103-CC292D26A5E4}|Assembly-CSharp.csproj|solutionrelative:assets\\scripts\\icons\\askforwebinfomation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{E01BD8B3-55E8-74DB-B103-CC292D26A5E4}|Assembly-CSharp.csproj|d:\\unitydata\\git\u7248\u672C\\3d-fengji\\assets\\scripts\\icons\\fastslowanimationandzoomin.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{E01BD8B3-55E8-74DB-B103-CC292D26A5E4}|Assembly-CSharp.csproj|solutionrelative:assets\\scripts\\icons\\fastslowanimationandzoomin.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "AskForWEBInfomation.cs",
|
||||
"DocumentMoniker": "D:\\unityData\\Git\u7248\u672C\\3d-fengji\\Assets\\Scripts\\ICONS\\AskForWEBInfomation.cs",
|
||||
"RelativeDocumentMoniker": "Assets\\Scripts\\ICONS\\AskForWEBInfomation.cs",
|
||||
"ToolTip": "D:\\unityData\\Git\u7248\u672C\\3d-fengji\\Assets\\Scripts\\ICONS\\AskForWEBInfomation.cs",
|
||||
"RelativeToolTip": "Assets\\Scripts\\ICONS\\AskForWEBInfomation.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAANgBAAABAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2026-07-10T06:56:30.878Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "FastSlowAnimationANDZoomIN.cs",
|
||||
"DocumentMoniker": "D:\\unityData\\Git\u7248\u672C\\3d-fengji\\Assets\\Scripts\\ICONS\\FastSlowAnimationANDZoomIN.cs",
|
||||
"RelativeDocumentMoniker": "Assets\\Scripts\\ICONS\\FastSlowAnimationANDZoomIN.cs",
|
||||
"ToolTip": "D:\\unityData\\Git\u7248\u672C\\3d-fengji\\Assets\\Scripts\\ICONS\\FastSlowAnimationANDZoomIN.cs",
|
||||
"RelativeToolTip": "Assets\\Scripts\\ICONS\\FastSlowAnimationANDZoomIN.cs",
|
||||
"ViewState": "AgIAABEAAAAAAAAAAADwvx4AAAAVAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2026-07-10T06:54:03.181Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -3,12 +3,12 @@
|
||||
"WorkspaceRootPath": "D:\\unityData\\Git\u7248\u672C\\3d-fengji\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{E01BD8B3-55E8-74DB-B103-CC292D26A5E4}|Assembly-CSharp.csproj|d:\\unitydata\\git\u7248\u672C\\3d-fengji\\assets\\scripts\\icons\\askforwebinfomation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{E01BD8B3-55E8-74DB-B103-CC292D26A5E4}|Assembly-CSharp.csproj|solutionrelative:assets\\scripts\\icons\\askforwebinfomation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
"AbsoluteMoniker": "D:0:0:{E01BD8B3-55E8-74DB-B103-CC292D26A5E4}|Assembly-CSharp.csproj|D:\\unityData\\Git\u7248\u672C\\3d-fengji\\assets\\scripts\\icons\\fastslowanimationandzoomin.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{E01BD8B3-55E8-74DB-B103-CC292D26A5E4}|Assembly-CSharp.csproj|solutionrelative:assets\\scripts\\icons\\fastslowanimationandzoomin.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{E01BD8B3-55E8-74DB-B103-CC292D26A5E4}|Assembly-CSharp.csproj|d:\\unitydata\\git\u7248\u672C\\3d-fengji\\assets\\scripts\\icons\\fastslowanimationandzoomin.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{E01BD8B3-55E8-74DB-B103-CC292D26A5E4}|Assembly-CSharp.csproj|solutionrelative:assets\\scripts\\icons\\fastslowanimationandzoomin.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
"AbsoluteMoniker": "D:0:0:{E01BD8B3-55E8-74DB-B103-CC292D26A5E4}|Assembly-CSharp.csproj|d:\\unitydata\\git\u7248\u672C\\3d-fengji\\assets\\scripts\\icons\\askforwebinfomation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{E01BD8B3-55E8-74DB-B103-CC292D26A5E4}|Assembly-CSharp.csproj|solutionrelative:assets\\scripts\\icons\\askforwebinfomation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
@@ -18,7 +18,7 @@
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"SelectedChildIndex": 2,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
@@ -26,26 +26,26 @@
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"DocumentIndex": 1,
|
||||
"Title": "AskForWEBInfomation.cs",
|
||||
"DocumentMoniker": "D:\\unityData\\Git\u7248\u672C\\3d-fengji\\Assets\\Scripts\\ICONS\\AskForWEBInfomation.cs",
|
||||
"RelativeDocumentMoniker": "Assets\\Scripts\\ICONS\\AskForWEBInfomation.cs",
|
||||
"ToolTip": "D:\\unityData\\Git\u7248\u672C\\3d-fengji\\Assets\\Scripts\\ICONS\\AskForWEBInfomation.cs",
|
||||
"RelativeToolTip": "Assets\\Scripts\\ICONS\\AskForWEBInfomation.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAANgBAAABAAAAAAAAAA==",
|
||||
"ViewState": "AgIAACkAAAAAAAAAAAAQwNgBAAABAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2026-07-10T06:56:30.878Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"DocumentIndex": 0,
|
||||
"Title": "FastSlowAnimationANDZoomIN.cs",
|
||||
"DocumentMoniker": "D:\\unityData\\Git\u7248\u672C\\3d-fengji\\Assets\\Scripts\\ICONS\\FastSlowAnimationANDZoomIN.cs",
|
||||
"RelativeDocumentMoniker": "Assets\\Scripts\\ICONS\\FastSlowAnimationANDZoomIN.cs",
|
||||
"ToolTip": "D:\\unityData\\Git\u7248\u672C\\3d-fengji\\Assets\\Scripts\\ICONS\\FastSlowAnimationANDZoomIN.cs",
|
||||
"RelativeToolTip": "Assets\\Scripts\\ICONS\\FastSlowAnimationANDZoomIN.cs",
|
||||
"ViewState": "AgIAABEAAAAAAAAAAADwvx4AAAAVAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAA4AAAAAAAAAAADwv0UAAAABAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2026-07-10T06:54:03.181Z",
|
||||
"EditorCaption": ""
|
||||
|
||||
@@ -10,7 +10,7 @@ public class FastSlowAnimationANDZoomIN : MonoBehaviour
|
||||
//Animator anim;
|
||||
|
||||
public float maxHeight = 2f; // 最大上升高度(米)
|
||||
float scaleRation = 0.5f;//默认缩放系数
|
||||
// float scaleRation = 0.5f;//默认缩放系数
|
||||
public float upTime = 1.5f;// 上升到最高点所需时间(秒)
|
||||
|
||||
private Dictionary<Transform, Vector3> childrenStartPos = new Dictionary<Transform, Vector3>();
|
||||
@@ -23,7 +23,7 @@ public class FastSlowAnimationANDZoomIN : MonoBehaviour
|
||||
foreach (Transform child in transform)
|
||||
{
|
||||
childrenStartPos[child] = child.position;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ public class FastSlowAnimationANDZoomIN : MonoBehaviour
|
||||
{
|
||||
//通过遍历每个子物体,每个物体的大小是独立计算的,不能取最小值
|
||||
float dist = Vector3.Distance(child.position, cam.transform.position);
|
||||
float scale = scaleRation * dist / 30f;
|
||||
scale = Mathf.Clamp(scale, 0.0333f, 10f);
|
||||
float scale = dist / 60f;
|
||||
scale = Mathf.Clamp(scale, 0.001f, 10f);
|
||||
|
||||
maxHeight = 0.05f + (dist - 1f) * 0.9f / 49f;
|
||||
maxHeight = Mathf.Clamp(maxHeight, 0.05f, 2f);
|
||||
|
||||
Reference in New Issue
Block a user