Skip to content
Merged

Dev #19

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public final class SchematicPreviewTransform {
private static final float MAX_PITCH = 89.0F;
private static final float SCROLL_ZOOM_SPEED = 0.12F;
private static final float MIN_ZOOM = 0.5F;
private static final float MAX_ZOOM = 4.0F;
private static final float MAX_ZOOM = 8.0F;

private float yaw = DEFAULT_YAW;
private float pitch = DEFAULT_PITCH;
Expand Down Expand Up @@ -35,7 +35,7 @@ public float panY() {
// 最小距离 4.0 防止模型过小时相机穿透
public float distance(float sizeX, float sizeY, float sizeZ) {
float radius = (float) Math.sqrt(sizeX * sizeX + sizeY * sizeY + sizeZ * sizeZ) * 0.5F;
return Math.max(4.0F, radius * 2.4F) / this.zoom;
return Math.max(4.0F, radius * 2.0F) / this.zoom; //TODO: 此处为缩放因子,但是固定到一个数值在预览过大或者过小的原理图时并不是太好用。之后考虑换成动态的缩放因子
}

public void reset() {
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
],
"contact": {
"homepage": "https://github.com/Fenad2/ListMore",
"sources": "https://github.com/Fenad2/ListMore"
"sources": "https://github.com/Fenad2/ListMore",
"issues": "https://github.com/Fenad2/ListMore/issues"
},
"license": "LGPL-3.0",
"icon": "assets/listmore/icon.png",
Expand Down