scax-engine 0.1.8 → 0.2.0-beta.2
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.
- package/README.md +16 -29
- package/dist/scax-engine.cjs +1584 -1557
- package/dist/scax-engine.js +1583 -1558
- package/dist/scax-engine.umd.js +1584 -1557
- package/dist/types/index.d.ts +4 -6
- package/dist/types/light-sources/light-source.d.ts +23 -2
- package/dist/types/optics/prism-on-ray.d.ts +19 -0
- package/dist/types/parameters/eye/eye-rigid-pose.d.ts +32 -0
- package/dist/types/parameters/eye/eyemodel-parameter.d.ts +24 -1
- package/dist/types/scax-engine.d.ts +68 -344
- package/dist/types/surfaces/st-surface.d.ts +8 -1
- package/dist/types/surfaces/surface.d.ts +7 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vector3 } from "three";
|
|
1
|
+
import { Quaternion, Vector3 } from "three";
|
|
2
2
|
import { RefractiveIndexSpec } from "../optics/refractive-index";
|
|
3
3
|
import Ray from "../ray/ray";
|
|
4
4
|
import Surface from "./surface";
|
|
@@ -28,6 +28,10 @@ export type STSurfaceProps = {
|
|
|
28
28
|
z: number;
|
|
29
29
|
};
|
|
30
30
|
thickness?: number;
|
|
31
|
+
/** 임상 프리즘(Δ). 있으면 굴절 직후 광선에 적용합니다. */
|
|
32
|
+
p?: number;
|
|
33
|
+
/** 프리즘 Base 축(°, 렌즈→각막 시점). */
|
|
34
|
+
p_ax?: number;
|
|
31
35
|
};
|
|
32
36
|
export default class STSurface extends Surface {
|
|
33
37
|
private static readonly POWER_EPS_D;
|
|
@@ -44,7 +48,9 @@ export default class STSurface extends Surface {
|
|
|
44
48
|
private toricSurface;
|
|
45
49
|
private sphericalRadiusMm;
|
|
46
50
|
private toricRadiusPerpMm;
|
|
51
|
+
private readonly prismVector;
|
|
47
52
|
constructor(props: STSurfaceProps);
|
|
53
|
+
private pushRefractedWithPrism;
|
|
48
54
|
/**
|
|
49
55
|
* 디옵터(D)로부터 반경(mm)을 계산합니다.
|
|
50
56
|
*
|
|
@@ -88,5 +94,6 @@ export default class STSurface extends Surface {
|
|
|
88
94
|
refract(ray: Ray): Ray | null;
|
|
89
95
|
incident(ray: Ray): Vector3 | null;
|
|
90
96
|
getOptimizedThicknessMm(): number;
|
|
97
|
+
applyRigidRotationAboutPivot(pivot: Vector3, rotation: Quaternion): void;
|
|
91
98
|
}
|
|
92
99
|
//# sourceMappingURL=st-surface.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vector2, Vector3 } from "three";
|
|
1
|
+
import { Quaternion, Vector2, Vector3 } from "three";
|
|
2
2
|
import Ray from "../ray/ray";
|
|
3
3
|
export type SurfaceProps = {
|
|
4
4
|
type: string;
|
|
@@ -28,5 +28,11 @@ export default abstract class Surface {
|
|
|
28
28
|
abstract incident(ray: Ray): Vector3 | null;
|
|
29
29
|
abstract refract(ray: Ray): Ray | null;
|
|
30
30
|
clearTraceHistory(): void;
|
|
31
|
+
getWorldPosition(): Vector3;
|
|
32
|
+
setPositionAndTilt(position: Vector3, tiltXDeg: number, tiltYDeg: number): void;
|
|
33
|
+
/**
|
|
34
|
+
* 안질 tilt가 0인 표면을 전제로, pivot 기준 강체 회전 후 동일 Euler(XYZ) tilt를 부여합니다.
|
|
35
|
+
*/
|
|
36
|
+
applyRigidRotationAboutPivot(pivot: Vector3, rotation: Quaternion): void;
|
|
31
37
|
}
|
|
32
38
|
//# sourceMappingURL=surface.d.ts.map
|
package/package.json
CHANGED