blacktrigram 0.7.27 → 0.7.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -21,7 +21,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
|
21
21
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
22
|
import { Canvas } from "@react-three/fiber";
|
|
23
23
|
//#region src/components/screens/intro/IntroScreen3D.tsx
|
|
24
|
-
var APP_VERSION = "0.7.
|
|
24
|
+
var APP_VERSION = "0.7.28";
|
|
25
25
|
var MENU_ITEMS = [
|
|
26
26
|
{
|
|
27
27
|
mode: GameMode.VERSUS,
|
|
@@ -183,7 +183,7 @@ var SplashScreen = ({ onStart, width, height }) => {
|
|
|
183
183
|
}),
|
|
184
184
|
/* @__PURE__ */ jsxs("div", {
|
|
185
185
|
role: "contentinfo",
|
|
186
|
-
"aria-label": `Application version 0.7.
|
|
186
|
+
"aria-label": `Application version 0.7.28`,
|
|
187
187
|
style: {
|
|
188
188
|
position: "absolute",
|
|
189
189
|
bottom: "20px",
|
|
@@ -192,7 +192,7 @@ var SplashScreen = ({ onStart, width, height }) => {
|
|
|
192
192
|
fontSize: "10px",
|
|
193
193
|
zIndex: 1
|
|
194
194
|
},
|
|
195
|
-
children: ["v", "0.7.
|
|
195
|
+
children: ["v", "0.7.28"]
|
|
196
196
|
})
|
|
197
197
|
]
|
|
198
198
|
});
|
package/lib/utils/math.d.ts
CHANGED
|
@@ -77,4 +77,14 @@ export declare function calculateDistance3DSquared(pos1: [number, number, number
|
|
|
77
77
|
* @korean 각도변환
|
|
78
78
|
*/
|
|
79
79
|
export declare function toRadians(degrees: number): number;
|
|
80
|
+
/**
|
|
81
|
+
* Calculate the angle between two 3D vectors
|
|
82
|
+
*
|
|
83
|
+
* Uses the dot product formula: dot(v1, v2) = |v1| * |v2| * cos(θ)
|
|
84
|
+
*
|
|
85
|
+
* @param v1 - First vector [x, y, z]
|
|
86
|
+
* @param v2 - Second vector [x, y, z]
|
|
87
|
+
* @returns The angle in radians
|
|
88
|
+
*/
|
|
89
|
+
export declare function calculateAngle3D(v1: [number, number, number], v2: [number, number, number]): number;
|
|
80
90
|
//# sourceMappingURL=math.d.ts.map
|
package/lib/utils/math.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/utils/math.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAC9B,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAC7B,MAAM,CAKR;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAC9B,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAC7B,MAAM,CAKR;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjD"}
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/utils/math.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAC9B,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAC7B,MAAM,CAKR;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAC9B,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAC7B,MAAM,CAKR;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAC5B,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAC3B,MAAM,CAUR"}
|
package/lib/utils/math.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.js","names":[],"sources":["../../src/utils/math.ts"],"sourcesContent":["/**\n * Mathematical utility functions for Black Trigram\n * \n * Provides shared mathematical operations used across combat, training,\n * and physics systems to ensure consistency and follow DRY principles.\n * \n * **Korean**: 수학 유틸리티 함수\n * \n * @module utils/math\n * @korean 수학유틸리티\n */\n\n/**\n * Calculate 3D Euclidean distance between two positions\n * \n * Uses the standard 3D distance formula: √(dx² + dy² + dz²)\n * This is used throughout the combat and training systems to calculate\n * distance between combatants, ensuring consistent distance calculations.\n * \n * **Korean**: 3D 유클리드 거리 계산\n * \n * @param pos1 - First position as [x, y, z] tuple\n * @param pos2 - Second position as [x, y, z] tuple\n * @returns The 3D Euclidean distance in meters\n * \n * @example\n * const distance = calculateDistance3D([0, 0, 0], [3, 4, 0]);\n * // Returns: 5.0 (3-4-5 triangle)\n * \n * @public\n * @category Math Utilities\n * @korean 3D거리계산\n */\nexport function calculateDistance3D(\n pos1: [number, number, number],\n pos2: [number, number, number]\n): number {\n const dx = pos1[0] - pos2[0];\n const dy = pos1[1] - pos2[1];\n const dz = pos1[2] - pos2[2];\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\n}\n\n/**\n * Calculate squared 3D distance between two positions\n * \n * Optimized version that avoids the expensive square root operation.\n * Useful when comparing distances (A > B) where the square root is unnecessary.\n * \n * **Korean**: 3D 거리 제곱 계산\n * \n * @param pos1 - First position as [x, y, z] tuple\n * @param pos2 - Second position as [x, y, z] tuple\n * @returns The squared 3D distance in meters²\n * \n * @example\n * const distSq = calculateDistance3DSquared([0, 0, 0], [3, 4, 0]);\n * // Returns: 25.0\n * \n * @public\n * @category Math Utilities\n * @korean 3D거리제곱계산\n */\nexport function calculateDistance3DSquared(\n pos1: [number, number, number],\n pos2: [number, number, number]\n): number {\n const dx = pos1[0] - pos2[0];\n const dy = pos1[1] - pos2[1];\n const dz = pos1[2] - pos2[2];\n return dx * dx + dy * dy + dz * dz;\n}\n\n/**\n * Convert degrees to radians\n * \n * Used throughout animation systems for bone rotations where angles are\n * specified in degrees for readability but need to be converted to radians\n * for Three.js rendering.\n * \n * **Korean**: 각도를 라디안으로 변환\n * \n * @param degrees - Angle in degrees (0-360)\n * @returns Angle in radians (0-2π)\n * \n * @example\n * const rightAngle = toRadians(90);\n * // Returns: approximately 1.5708 (π/2)\n * \n * @example\n * const straightAngle = toRadians(180);\n * // Returns: approximately 3.1416 (π)\n * \n * @public\n * @category Math Utilities\n * @korean 각도변환\n */\nexport function toRadians(degrees: number): number {\n return degrees * (Math.PI / 180);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,SAAgB,oBACd,MACA,MACQ;CACR,MAAM,KAAK,KAAK,KAAK,KAAK;CAC1B,MAAM,KAAK,KAAK,KAAK,KAAK;CAC1B,MAAM,KAAK,KAAK,KAAK,KAAK;AAC1B,QAAO,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;AAyD/C,SAAgB,UAAU,SAAyB;AACjD,QAAO,WAAW,KAAK,KAAK"}
|
|
1
|
+
{"version":3,"file":"math.js","names":[],"sources":["../../src/utils/math.ts"],"sourcesContent":["/**\n * Mathematical utility functions for Black Trigram\n * \n * Provides shared mathematical operations used across combat, training,\n * and physics systems to ensure consistency and follow DRY principles.\n * \n * **Korean**: 수학 유틸리티 함수\n * \n * @module utils/math\n * @korean 수학유틸리티\n */\n\n/**\n * Calculate 3D Euclidean distance between two positions\n * \n * Uses the standard 3D distance formula: √(dx² + dy² + dz²)\n * This is used throughout the combat and training systems to calculate\n * distance between combatants, ensuring consistent distance calculations.\n * \n * **Korean**: 3D 유클리드 거리 계산\n * \n * @param pos1 - First position as [x, y, z] tuple\n * @param pos2 - Second position as [x, y, z] tuple\n * @returns The 3D Euclidean distance in meters\n * \n * @example\n * const distance = calculateDistance3D([0, 0, 0], [3, 4, 0]);\n * // Returns: 5.0 (3-4-5 triangle)\n * \n * @public\n * @category Math Utilities\n * @korean 3D거리계산\n */\nexport function calculateDistance3D(\n pos1: [number, number, number],\n pos2: [number, number, number]\n): number {\n const dx = pos1[0] - pos2[0];\n const dy = pos1[1] - pos2[1];\n const dz = pos1[2] - pos2[2];\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\n}\n\n/**\n * Calculate squared 3D distance between two positions\n * \n * Optimized version that avoids the expensive square root operation.\n * Useful when comparing distances (A > B) where the square root is unnecessary.\n * \n * **Korean**: 3D 거리 제곱 계산\n * \n * @param pos1 - First position as [x, y, z] tuple\n * @param pos2 - Second position as [x, y, z] tuple\n * @returns The squared 3D distance in meters²\n * \n * @example\n * const distSq = calculateDistance3DSquared([0, 0, 0], [3, 4, 0]);\n * // Returns: 25.0\n * \n * @public\n * @category Math Utilities\n * @korean 3D거리제곱계산\n */\nexport function calculateDistance3DSquared(\n pos1: [number, number, number],\n pos2: [number, number, number]\n): number {\n const dx = pos1[0] - pos2[0];\n const dy = pos1[1] - pos2[1];\n const dz = pos1[2] - pos2[2];\n return dx * dx + dy * dy + dz * dz;\n}\n\n/**\n * Convert degrees to radians\n * \n * Used throughout animation systems for bone rotations where angles are\n * specified in degrees for readability but need to be converted to radians\n * for Three.js rendering.\n * \n * **Korean**: 각도를 라디안으로 변환\n * \n * @param degrees - Angle in degrees (0-360)\n * @returns Angle in radians (0-2π)\n * \n * @example\n * const rightAngle = toRadians(90);\n * // Returns: approximately 1.5708 (π/2)\n * \n * @example\n * const straightAngle = toRadians(180);\n * // Returns: approximately 3.1416 (π)\n * \n * @public\n * @category Math Utilities\n * @korean 각도변환\n */\nexport function toRadians(degrees: number): number {\n return degrees * (Math.PI / 180);\n}\n\n/**\n * Calculate the angle between two 3D vectors\n * \n * Uses the dot product formula: dot(v1, v2) = |v1| * |v2| * cos(θ)\n * \n * @param v1 - First vector [x, y, z]\n * @param v2 - Second vector [x, y, z]\n * @returns The angle in radians\n */\nexport function calculateAngle3D(\n v1: [number, number, number],\n v2: [number, number, number]\n): number {\n const dot = v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];\n const mag1 = Math.sqrt(v1[0] * v1[0] + v1[1] * v1[1] + v1[2] * v1[2]);\n const mag2 = Math.sqrt(v2[0] * v2[0] + v2[1] * v2[1] + v2[2] * v2[2]);\n \n const EPSILON = 1e-10;\n if (mag1 < EPSILON || mag2 < EPSILON) return 0;\n \n const cosTheta = Math.max(-1, Math.min(1, dot / (mag1 * mag2)));\n return Math.acos(cosTheta);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,SAAgB,oBACd,MACA,MACQ;CACR,MAAM,KAAK,KAAK,KAAK,KAAK;CAC1B,MAAM,KAAK,KAAK,KAAK,KAAK;CAC1B,MAAM,KAAK,KAAK,KAAK,KAAK;AAC1B,QAAO,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;AAyD/C,SAAgB,UAAU,SAAyB;AACjD,QAAO,WAAW,KAAK,KAAK"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blacktrigram",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.28",
|
|
4
4
|
"description": "Black Trigram (흑괘) - Korean Martial Arts Combat Simulator. Reusable game systems, combat mechanics, animation framework, and Korean martial arts data built with React, Three.js, and TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
"globals": "17.5.0",
|
|
215
215
|
"jest-axe": "10.0.0",
|
|
216
216
|
"jsdom": "29.0.2",
|
|
217
|
-
"knip": "6.6.
|
|
217
|
+
"knip": "6.6.2",
|
|
218
218
|
"license-compliance": "3.0.1",
|
|
219
219
|
"mocha-junit-reporter": "2.2.1",
|
|
220
220
|
"mochawesome": "7.1.4",
|