13 public static string fName =
"FurnitureDesignWidget";
48 Vector3 vector =
new(0.5f, 0.5f, 0.5f);
56 for (
int i = 0; i <=
Design.Resolution; i++) {
57 float num = i / (float)
Design.Resolution;
58 Color color = i % 2 == 0 ?
new Color(56, 56, 56, 56) :
new Color(28, 28, 28, 28);
72 0.004f *
new Vector3(-1f, 0f, 0f),
73 0.004f *
new Vector3(0f, 0f, -1f),
80 0.004f *
new Vector3(0f, 0f, -1f),
81 0.004f *
new Vector3(1f, 0f, 0f),
93 position =
new Vector3(1f, 0f, 0f);
97 position =
new Vector3(0f, 0f, -10f);
101 position =
new Vector3(0f, 1f, 0f);
114 for (
int j = 1; j <
Design.Resolution; j++) {
115 float num3 = j / (float)
Design.Resolution;
116 Vector2 v =
new(ActualSize.X * num3, 0f);
118 Vector2 v3 =
new(0f, ActualSize.Y * num3);
124 Color color3 = j % 2 == 0 ?
new Color(0, 0, 0, 56) :
new Color(0, 0, 0, 28);
125 Color color4 = j % 2 == 0 ?
new Color(56, 56, 56, 56) :
new Color(28, 28, 28, 28);
128 flatBatch2D.
QueueLine(v, v2, 0f, j % 2 == 0 ? color3 : color3 * 0.75f);
130 flatBatch2D.
QueueLine(v3, v4, 0f, color3);
136 for (
int k = 0; k < 6; k++) {
140 globalColorTransform *=
new Color(num4, num4, num4);
149 globalColorTransform,
164 if (
Input.Tap.HasValue
168 if (
Input.Press.HasValue) {
172 vector2.Y = -0.01f * vector.
X;
173 vector2.X = 0.01f * vector.
Y;
199 angles.X = MathF.
Min(angles.
X, num2 - num);
200 angles.X = MathF.
Max(angles.
X, 0f - (num3 - num));
static readonly DepthStencilState DepthRead
void QueueLine(Vector2 p1, Vector2 p2, float depth, Color color)
void QueueLine(Vector3 p1, Vector3 p2, Color color)
void QueueText(string text, Vector3 position, Vector3 right, Vector3 down, Color color, TextAnchor anchor=TextAnchor.Default)
static int Min(int x1, int x2)
static float DegToRad(float degrees)
static float FrameDuration
static void DrawMeshBlock(PrimitivesRenderer3D primitivesRenderer, BlockMesh blockMesh, float size, ref Matrix matrix, DrawBlockEnvironmentData environmentData)
BlockMesh[] SubsetOpaqueByFace
BlockMesh[] SubsetAlphaTestByFace
static string Get(string className, int key)
获取在当前语言类名键对应的字符串
static readonly float[] LightIntensityByLightValueAndFace
static Matrix CreateScaleTranslation(float sx, float sy, float tx, float ty)
static Matrix CreateTranslation(float x, float y, float z)
static Matrix CreatePerspectiveFieldOfView(float fieldOfViewY, float aspectRatio, float nearPlane, float farPlane)
static readonly Matrix Identity
static Matrix CreateLookAt(Vector3 position, Vector3 target, Vector3 up)
static Matrix CreateFromAxisAngle(Vector3 axis, float angle)
static Matrix CreateRotationY(float radians)
static Matrix CreateOrthographic(float width, float height, float nearPlane, float farPlane)
static Vector2 Transform(Vector2 v, Matrix m)
static Vector3 TransformNormal(Vector3 v, Matrix m)
static Vector3 Cross(Vector3 v1, Vector3 v2)
static Vector3 Normalize(Vector3 v)
static Vector3 Max(Vector3 v, float f)
static Vector3 Min(Vector3 v, float f)
static readonly Vector3 UnitY
static float Dot(Vector3 v1, Vector3 v2)
static int OppositeFace(int face)