abstract-3d 2.6.7 → 2.6.9
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg-text.d.ts","sourceRoot":"","sources":["../../../../src/renderers/svg/svg-geometries/svg-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"svg-text.d.ts","sourceRoot":"","sources":["../../../../src/renderers/svg/svg-geometries/svg-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAsF,MAAM,yBAAyB,CAAC;AAC/I,OAAO,EAAgB,UAAU,EAAS,aAAa,EAAE,MAAM,aAAa,CAAC;AAI7E,wBAAgB,IAAI,CAClB,CAAC,EAAE,IAAI,EACP,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,EACrC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,IAAI,EACf,SAAS,EAAE,IAAI,GACd,aAAa,CAAC,aAAa,CAAC,CAe9B"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { vec3TransRot, vec3RotCombine, vec3Zero } from "../../../abstract-3d.js";
|
|
1
|
+
import { vec3TransRot, vec3RotCombine, vec3Zero, vec3Flip, rotationForCameraPos } from "../../../abstract-3d.js";
|
|
2
2
|
import { svgTrsMatrix, zElem } from "./shared.js";
|
|
3
3
|
import { svgText } from "../svg-encoding.js";
|
|
4
4
|
// dummy
|
|
5
5
|
export function text(t, point, fill, opts, parentPos, parentRot) {
|
|
6
6
|
const pos = vec3TransRot(t.pos, parentPos, parentRot);
|
|
7
|
-
const
|
|
7
|
+
const flippedViewRot = vec3Flip(rotationForCameraPos(opts.view));
|
|
8
|
+
const rot = vec3RotCombine(vec3RotCombine(parentRot, t.rot ?? vec3Zero), flippedViewRot);
|
|
8
9
|
const texts = Array();
|
|
9
10
|
const fontSize = t.fontSize;
|
|
10
11
|
const strings = t.text.split("\n");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg-text.js","sourceRoot":"","sources":["../../../../src/renderers/svg/svg-geometries/svg-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"svg-text.js","sourceRoot":"","sources":["../../../../src/renderers/svg/svg-geometries/svg-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAc,QAAQ,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/I,OAAO,EAAE,YAAY,EAAc,KAAK,EAAiB,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,QAAQ;AACR,MAAM,UAAU,IAAI,CAClB,CAAO,EACP,KAAqC,EACrC,IAAY,EACZ,IAAgB,EAChB,SAAe,EACf,SAAe;IAEf,MAAM,GAAG,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACtD,MAAM,cAAc,GAAG,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,MAAM,GAAG,GAAG,cAAc,CAAC,cAAc,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,IAAI,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC;IACzF,MAAM,KAAK,GAAG,KAAK,EAAiB,CAAC;IACrC,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;IAC5B,MAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,IAAI,GAAG,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IACjF,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QAC7D,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,IAAI,IAAI,QAAQ,GAAG,GAAG,CAAC;IACzB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "abstract-3d",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.9",
|
|
4
4
|
"description": "Abstract 3D",
|
|
5
5
|
"author": "Divid AB <info@divid.se>",
|
|
6
6
|
"repository": "https://github.com/dividab/abstract-visuals/tree/master/packages/abstract-3d",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"@types/three": "^0.180.0",
|
|
66
66
|
"react": "^19.2.6"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "86d0201499fa6fb608adf2d557ade9481d7103bd"
|
|
69
69
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Text, Vec2, Vec3, vec3TransRot, vec3RotCombine, vec3Zero } from "../../../abstract-3d.js";
|
|
1
|
+
import { Text, Vec2, Vec3, vec3TransRot, vec3RotCombine, vec3Zero, vec3, View, vec3Flip, rotationForCameraPos } from "../../../abstract-3d.js";
|
|
2
2
|
import { svgTrsMatrix, SvgOptions, zElem, zOrderElement } from "./shared.js";
|
|
3
3
|
import { svgText } from "../svg-encoding.js";
|
|
4
4
|
|
|
@@ -12,7 +12,8 @@ export function text(
|
|
|
12
12
|
parentRot: Vec3
|
|
13
13
|
): ReadonlyArray<zOrderElement> {
|
|
14
14
|
const pos = vec3TransRot(t.pos, parentPos, parentRot);
|
|
15
|
-
const
|
|
15
|
+
const flippedViewRot = vec3Flip(rotationForCameraPos(opts.view));
|
|
16
|
+
const rot = vec3RotCombine(vec3RotCombine(parentRot, t.rot ?? vec3Zero), flippedViewRot);
|
|
16
17
|
const texts = Array<zOrderElement>();
|
|
17
18
|
const fontSize = t.fontSize;
|
|
18
19
|
const strings = t.text.split("\n");
|