refactor(animation):优化动画系统字段不可变性与getter方法格式- 将AnimationClip中的creationTime字段设为final
- 将AnimationLayer中的parameterOverrides字段设为final - 将AnimationParameter中的id、defaultValue、minValue、maxValue字段设为final - 将LightSource中的position、color、intensity字段设为final - 统一所有getter方法的代码格式,增加换行与大括号 - 优化Mesh2D中部分条件判断逻辑与字段final声明- 调整部分JavaDoc注释格式与空行位置提升可读性
This commit is contained in:
@@ -6,8 +6,6 @@ import com.chuangzhou.vivid2D.render.model.ModelPart;
|
||||
import com.chuangzhou.vivid2D.render.model.util.Mesh2D;
|
||||
import com.chuangzhou.vivid2D.render.model.util.Texture;
|
||||
import com.chuangzhou.vivid2D.render.systems.RenderSystem;
|
||||
import org.joml.Matrix3f;
|
||||
import org.joml.Vector2f;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import org.lwjgl.glfw.GLFWErrorCallback;
|
||||
import org.lwjgl.glfw.GLFWVidMode;
|
||||
@@ -18,6 +16,7 @@ import java.nio.ByteBuffer;
|
||||
|
||||
/**
|
||||
* 用于测试中心点旋转
|
||||
*
|
||||
* @author tzdwindows 7
|
||||
*/
|
||||
public class ModelRenderTest2 {
|
||||
@@ -32,6 +31,7 @@ public class ModelRenderTest2 {
|
||||
private float rotationAngle = 0f;
|
||||
private int testCase = 0;
|
||||
private Mesh2D squareMesh;
|
||||
|
||||
public static void main(String[] args) {
|
||||
new ModelRenderTest2().run();
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class ModelRenderTest2 {
|
||||
|
||||
ModelPart square = testModel.createPart("square");
|
||||
square.setPosition(0, 0); // center of window
|
||||
square.setPivot(0,0);
|
||||
square.setPivot(0, 0);
|
||||
// Create 80x80 quad centered at origin
|
||||
squareMesh = Mesh2D.createQuad("square_mesh", 80, 80);
|
||||
// Shift vertices so center is at (0,0)
|
||||
|
||||
Reference in New Issue
Block a user