@motionscript/math 0.1.0-alpha.6 → 0.1.0-alpha.7
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/CHANGELOG.md +6 -0
- package/dist/annotate/angle-mark.d.ts +28 -3
- package/dist/annotate/angle-mark.d.ts.map +1 -1
- package/dist/annotate/curly-brace.d.ts +38 -3
- package/dist/annotate/curly-brace.d.ts.map +1 -1
- package/dist/annotate/emphasis-mark.d.ts +29 -3
- package/dist/annotate/emphasis-mark.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +3 -3
- package/dist/browser/manifest.json +1 -1
- package/dist/kit/component.d.ts.map +1 -1
- package/dist/kit/field-mark.d.ts +1 -3
- package/dist/kit/field-mark.d.ts.map +1 -1
- package/dist/kit/follow.d.ts +2 -2
- package/dist/kit/follow.d.ts.map +1 -1
- package/dist/marks/curve-area.d.ts +14 -1
- package/dist/marks/curve-area.d.ts.map +1 -1
- package/dist/marks/drop-lines.d.ts +20 -3
- package/dist/marks/drop-lines.d.ts.map +1 -1
- package/dist/marks/plot-point.d.ts +20 -1
- package/dist/marks/plot-point.d.ts.map +1 -1
- package/dist/marks/riemann-sum.d.ts +18 -1
- package/dist/marks/riemann-sum.d.ts.map +1 -1
- package/dist/marks/tangent-line.d.ts +23 -3
- package/dist/marks/tangent-line.d.ts.map +1 -1
- package/dist/marks/vector-arrow.d.ts +21 -3
- package/dist/marks/vector-arrow.d.ts.map +1 -1
- package/dist/plots/function-plot.d.ts +33 -5
- package/dist/plots/function-plot.d.ts.map +1 -1
- package/dist/plots/points-plot.d.ts +22 -1
- package/dist/plots/points-plot.d.ts.map +1 -1
- package/dist/plots/stream-lines.d.ts +23 -1
- package/dist/plots/stream-lines.d.ts.map +1 -1
- package/dist/plots/traced-path.d.ts +21 -1
- package/dist/plots/traced-path.d.ts.map +1 -1
- package/dist/plots/vector-field.d.ts +18 -1
- package/dist/plots/vector-field.d.ts.map +1 -1
- package/dist/structures/network-graph.d.ts +42 -1
- package/dist/structures/network-graph.d.ts.map +1 -1
- package/dist/structures/sample-space.d.ts +22 -1
- package/dist/structures/sample-space.d.ts.map +1 -1
- package/dist/systems/axes2d.d.ts +34 -1
- package/dist/systems/axes2d.d.ts.map +1 -1
- package/dist/systems/number-line.d.ts +30 -1
- package/dist/systems/number-line.d.ts.map +1 -1
- package/dist/systems/number-plane.d.ts +49 -1
- package/dist/systems/number-plane.d.ts.map +1 -1
- package/dist/systems/polar-plane.d.ts +30 -1
- package/dist/systems/polar-plane.d.ts.map +1 -1
- package/dist/tex/matrix.d.ts +34 -2
- package/dist/tex/matrix.d.ts.map +1 -1
- package/dist/tex/node.d.ts +31 -2
- package/dist/tex/node.d.ts.map +1 -1
- package/dist/tex/typeset.d.ts +4 -4
- package/dist/tex/typeset.d.ts.map +1 -1
- package/dist/three/axes3d.d.ts +75 -1
- package/dist/three/axes3d.d.ts.map +1 -1
- package/dist/three/axes3d.js +6 -2
- package/dist/three/axes3d.js.map +1 -1
- package/dist/three/curve-plot3d.d.ts +53 -15
- package/dist/three/curve-plot3d.d.ts.map +1 -1
- package/dist/three/plot-point3d.d.ts +43 -15
- package/dist/three/plot-point3d.d.ts.map +1 -1
- package/dist/three/surface-plot3d.d.ts +68 -23
- package/dist/three/surface-plot3d.d.ts.map +1 -1
- package/dist/three/vector-arrow3d.d.ts +44 -15
- package/dist/three/vector-arrow3d.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/three/axes3d.ts +8 -2
|
@@ -13,25 +13,25 @@ export declare const VectorArrow3d: import("@motionscript/sdk").Component<"vecto
|
|
|
13
13
|
thickness: import("@motionscript/sdk").Type<number, number, false>;
|
|
14
14
|
tip: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
15
15
|
graph: import("@motionscript/sdk").Type<import("./space.js").Graph3D | null, import("./space.js").Graph3D | null, true>;
|
|
16
|
-
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
17
16
|
opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
18
17
|
blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
18
|
+
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
19
|
+
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
20
|
+
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
21
|
+
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
22
|
+
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
23
|
+
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
24
|
+
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
25
|
+
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
19
26
|
geometry: import("@motionscript/sdk").Type<_Geometry3D | undefined, _Geometry3D | undefined, false>;
|
|
20
27
|
material: import("@motionscript/sdk").Type<_Material3D | readonly _Material3D[] | undefined, _Material3D | readonly _Material3D[] | undefined, false>;
|
|
21
28
|
roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
22
29
|
metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
23
30
|
emission: import("@motionscript/sdk").Type<_Color | undefined, _NormalizedColor | undefined, false>;
|
|
24
31
|
emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
25
|
-
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
26
32
|
roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
27
33
|
metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
28
|
-
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
29
|
-
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
30
|
-
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
31
|
-
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
32
34
|
shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
33
|
-
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
34
|
-
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
35
35
|
unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
36
36
|
}>, {
|
|
37
37
|
readonly endpointsTo: readonly ["tail", "head"];
|
|
@@ -42,26 +42,55 @@ export declare const VectorArrow3d: import("@motionscript/sdk").Component<"vecto
|
|
|
42
42
|
thickness: import("@motionscript/sdk").Type<number, number, false>;
|
|
43
43
|
tip: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
44
44
|
graph: import("@motionscript/sdk").Type<import("./space.js").Graph3D | null, import("./space.js").Graph3D | null, true>;
|
|
45
|
-
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
46
45
|
opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
47
46
|
blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
47
|
+
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
48
|
+
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
49
|
+
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
50
|
+
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
51
|
+
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
52
|
+
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
53
|
+
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
54
|
+
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
48
55
|
geometry: import("@motionscript/sdk").Type<_Geometry3D | undefined, _Geometry3D | undefined, false>;
|
|
49
56
|
material: import("@motionscript/sdk").Type<_Material3D | readonly _Material3D[] | undefined, _Material3D | readonly _Material3D[] | undefined, false>;
|
|
50
57
|
roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
51
58
|
metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
52
59
|
emission: import("@motionscript/sdk").Type<_Color | undefined, _NormalizedColor | undefined, false>;
|
|
53
60
|
emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
54
|
-
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
55
61
|
roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
56
62
|
metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
57
|
-
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
58
|
-
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
59
|
-
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
60
|
-
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
61
63
|
shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
64
|
+
unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
65
|
+
}>, import("@motionscript/sdk").BuiltNode<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Transform3DState, {
|
|
66
|
+
tail: import("@motionscript/sdk").Type<Vector3Input, Vector3, false>;
|
|
67
|
+
head: import("@motionscript/sdk").Type<Vector3Input, Vector3, false>;
|
|
68
|
+
/** The radius of the shaft, in scene units; the tip is sized from it. */
|
|
69
|
+
thickness: import("@motionscript/sdk").Type<number, number, false>;
|
|
70
|
+
tip: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
71
|
+
graph: import("@motionscript/sdk").Type<import("./space.js").Graph3D | null, import("./space.js").Graph3D | null, true>;
|
|
72
|
+
opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
73
|
+
blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
74
|
+
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
62
75
|
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
76
|
+
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
63
77
|
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
78
|
+
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
79
|
+
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
80
|
+
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
81
|
+
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
82
|
+
geometry: import("@motionscript/sdk").Type<_Geometry3D | undefined, _Geometry3D | undefined, false>;
|
|
83
|
+
material: import("@motionscript/sdk").Type<_Material3D | readonly _Material3D[] | undefined, _Material3D | readonly _Material3D[] | undefined, false>;
|
|
84
|
+
roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
85
|
+
metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
86
|
+
emission: import("@motionscript/sdk").Type<_Color | undefined, _NormalizedColor | undefined, false>;
|
|
87
|
+
emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
88
|
+
roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
89
|
+
metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
90
|
+
shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
64
91
|
unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
65
|
-
}
|
|
92
|
+
}>, {
|
|
93
|
+
readonly endpointsTo: readonly ["tail", "head"];
|
|
94
|
+
}, _Node3D<_Node3DProps>>>>;
|
|
66
95
|
export type VectorArrow3d = NodeOf<typeof VectorArrow3d>;
|
|
67
96
|
//# sourceMappingURL=vector-arrow3d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector-arrow3d.d.ts","sourceRoot":"","sources":["../../src/three/vector-arrow3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAOH,KAAK,WAAW,EAChB,KAAK,MAAM,EAEX,KAAK,OAAO,EACZ,KAAK,YAAY,EAEjB,KAAK,OAAO,IAAI,QAAQ,EACxB,KAAK,KAAK,IAAI,MAAM,EACpB,KAAK,OAAO,IAAI,QAAQ,EACxB,KAAK,MAAM,IAAI,OAAO,EACtB,KAAK,UAAU,IAAI,WAAW,EAC9B,KAAK,UAAU,IAAI,WAAW,EAC9B,KAAK,MAAM,IAAI,OAAO,EACtB,KAAK,WAAW,IAAI,YAAY,EAChC,KAAK,eAAe,IAAI,gBAAgB,EACxC,KAAK,SAAS,IAAI,UAAU,EAC5B,KAAK,SAAS,IAAI,UAAU,EAC/B,MAAM,mBAAmB,CAAC;AAI3B,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACnD,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,IAAI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
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motionscript/math",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Math for Motion Script: coordinate systems, function and vector-field plots, 3D graphs and surfaces, network graphs, and LaTeX formulas typeset to glyph paths that morph token by token.",
|
|
6
6
|
"repository": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"license": "Apache-2.0",
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@motionscript/sdk": "^0.1.0-alpha.
|
|
56
|
+
"@motionscript/sdk": "^0.1.0-alpha.7"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@mathjax/mathjax-newcm-font": "^4.1.1",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"typescript": "^6.0.3",
|
|
69
69
|
"typescript-eslint": "^8.48.0",
|
|
70
70
|
"vitest": "^4.1.5",
|
|
71
|
-
"@motionscript/sdk": "0.1.0-alpha.
|
|
72
|
-
"@motionscript/core": "0.1.0-alpha.
|
|
71
|
+
"@motionscript/sdk": "0.1.0-alpha.7",
|
|
72
|
+
"@motionscript/core": "0.1.0-alpha.7"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
75
|
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json --resolve-full-paths && node ../../../scripts/build-browser.mjs",
|
package/src/three/axes3d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
type Canvas3DProps,
|
|
13
13
|
type Color,
|
|
14
14
|
type NodeOf,
|
|
15
|
+
type Scene3D,
|
|
15
16
|
type Transform3D,
|
|
16
17
|
type Values,
|
|
17
18
|
type Vector3,
|
|
@@ -142,18 +143,23 @@ export const Axes3d = component2d({
|
|
|
142
143
|
},
|
|
143
144
|
allowedChildren: ["2d", "3d"],
|
|
144
145
|
load: (loader, s) => {
|
|
145
|
-
View3D.load(loader);
|
|
146
|
+
View3D.load(loader, furnish(s));
|
|
146
147
|
if (s.fontFamily !== "") loader.font(s.fontFamily);
|
|
147
148
|
},
|
|
148
149
|
provide: (s) => [provides(GRAPH_3D, graphOfAxes(s))],
|
|
149
150
|
space: (s) => axesSpace(s),
|
|
150
151
|
measure: (measurer, s, children) => Flow.measure(measurer, s, children, Paint.inset(s)),
|
|
151
152
|
layout: (box, s, children) => Flow.layout(box, s, children, Paint.inset(s)),
|
|
152
|
-
render: (ctx, s) => View3D.draw(ctx, s, (
|
|
153
|
+
render: (ctx, s) => View3D.draw(ctx, s, furnish(s)),
|
|
153
154
|
});
|
|
154
155
|
|
|
155
156
|
export type Axes3d = NodeOf<typeof Axes3d>;
|
|
156
157
|
|
|
158
|
+
/** The axes' own drawing, added to the scene: what `render` draws and `load` declares. */
|
|
159
|
+
function furnish(s: AxesValues): (scene: Scene3D) => void {
|
|
160
|
+
return (scene) => scene.draw(furniture(s));
|
|
161
|
+
}
|
|
162
|
+
|
|
157
163
|
/** The last space worked out for each axes, kept while its ranges and lengths are unchanged. */
|
|
158
164
|
const spaces = new WeakMap<object, { readonly key: string; readonly space: GraphSpace }>();
|
|
159
165
|
|