reze-engine 0.29.0 → 0.29.1
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/dist/camera.d.ts +4 -0
- package/dist/camera.d.ts.map +1 -1
- package/dist/camera.js +5 -1
- package/package.json +1 -1
- package/src/camera.ts +5 -1
package/dist/camera.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ export declare class Camera {
|
|
|
7
7
|
target: Vec3;
|
|
8
8
|
fov: number;
|
|
9
9
|
aspect: number;
|
|
10
|
+
/** Depth precision scales with the near plane: at 0.05 the 24-bit buffer wasted
|
|
11
|
+
* nearly all of it within a hand's reach and coplanar cloth/body layers z-fought
|
|
12
|
+
* (white crack flashes, worse the further the camera). 0.5 MMD units ≈ 4 cm —
|
|
13
|
+
* closer than any real framing — and buys 10× precision at character range. */
|
|
10
14
|
near: number;
|
|
11
15
|
far: number;
|
|
12
16
|
private canvas;
|
package/dist/camera.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../src/camera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAQ,IAAI,EAAE,MAAM,QAAQ,CAAA;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAMpD,qBAAa,MAAM;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,IAAI,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAI;IAClB,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../src/camera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAQ,IAAI,EAAE,MAAM,QAAQ,CAAA;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,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AE,IAAI,EAAE,GAAG,GAAE,MAAoB;IAmBhG,WAAW,IAAI,IAAI;IAQnB;wFACoF;IACpF,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAOpC,0FAA0F;IAC1F,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAelC,OAAO,CAAC,MAAM;IAUd;;;;;;;;;;;OAWG;IACH,cAAc,IAAI,IAAI;IAItB,aAAa,IAAI,IAAI;IAgBrB,OAAO,CAAC,gBAAgB;IA0CxB,OAAO,CAAC,SAAS;IAiBjB,kFAAkF;IAClF,OAAO,CAAC,mBAAmB;IAK3B,mBAAmB,IAAI,IAAI;IAM3B,aAAa,CAAC,MAAM,EAAE,iBAAiB;IAiBvC,aAAa;IAkBb,cAAc,CAAC,MAAM,EAAE,OAAO;IAS9B,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,WAAW;IAsBnB,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,OAAO;IAYf,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,YAAY;IA8BpB,OAAO,CAAC,WAAW;IAuFnB,OAAO,CAAC,UAAU;CA+BnB"}
|
package/dist/camera.js
CHANGED
|
@@ -5,7 +5,11 @@ const FAR_MIN = 200;
|
|
|
5
5
|
export class Camera {
|
|
6
6
|
constructor(alpha, beta, radius, target, fov = Math.PI / 4) {
|
|
7
7
|
this.aspect = 1;
|
|
8
|
-
|
|
8
|
+
/** Depth precision scales with the near plane: at 0.05 the 24-bit buffer wasted
|
|
9
|
+
* nearly all of it within a hand's reach and coplanar cloth/body layers z-fought
|
|
10
|
+
* (white crack flashes, worse the further the camera). 0.5 MMD units ≈ 4 cm —
|
|
11
|
+
* closer than any real framing — and buys 10× precision at character range. */
|
|
12
|
+
this.near = 0.5;
|
|
9
13
|
this.far = FAR_CAP;
|
|
10
14
|
// Input state
|
|
11
15
|
this.canvas = null;
|
package/package.json
CHANGED
package/src/camera.ts
CHANGED
|
@@ -12,7 +12,11 @@ export class Camera {
|
|
|
12
12
|
target: Vec3
|
|
13
13
|
fov: number
|
|
14
14
|
aspect: number = 1
|
|
15
|
-
near:
|
|
15
|
+
/** Depth precision scales with the near plane: at 0.05 the 24-bit buffer wasted
|
|
16
|
+
* nearly all of it within a hand's reach and coplanar cloth/body layers z-fought
|
|
17
|
+
* (white crack flashes, worse the further the camera). 0.5 MMD units ≈ 4 cm —
|
|
18
|
+
* closer than any real framing — and buys 10× precision at character range. */
|
|
19
|
+
near: number = 0.5
|
|
16
20
|
far: number = FAR_CAP
|
|
17
21
|
|
|
18
22
|
// Input state
|