@motionscript/math 0.4.0-alpha.0 → 0.4.1-alpha.0

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,2 +1,2 @@
1
- import{Ab as A,Bb as L,Db as S,Ga as m,Kb as N,La as e,Na as p,Ta as f,Va as i,Vb as h,Xb as M,Yb as k,Zb as w,ac as C,cc as V,eb as a,fb as x,gb as n,hb as l,ib as P,jb as c,kb as d,lb as u,nb as s,za as t}from"./chunk-347RSDIW.js";import{M as r,O as o}from"./chunk-T42HWKBC.js";var b=[r,o,t,m,e,f,i,l,P,c,d,u,s,A,L,S,N,h,M,k,w,p,a,x,n,C,V];export{b as a};
2
- //# sourceMappingURL=chunk-BIUAHFF7.js.map
1
+ import{Ab as A,Bb as L,Db as S,Ga as m,Kb as N,La as e,Na as p,Ta as f,Va as i,Vb as h,Xb as M,Yb as k,Zb as w,ac as C,cc as V,eb as a,fb as x,gb as n,hb as l,ib as P,jb as c,kb as d,lb as u,nb as s,za as t}from"./chunk-DMBE5JEI.js";import{M as r,O as o}from"./chunk-T42HWKBC.js";var b=[r,o,t,m,e,f,i,l,P,c,d,u,s,A,L,S,N,h,M,k,w,p,a,x,n,C,V];export{b as a};
2
+ //# sourceMappingURL=chunk-L6U74DM4.js.map
@@ -1,2 +1,2 @@
1
- import{a as C}from"./chunks/chunk-BIUAHFF7.js";import{Ab as s,Bb as t,Db as u,Ga as e,Kb as v,La as f,Na as g,Ta as h,Va as i,Vb as w,Xb as x,Yb as y,Zb as z,ac as A,cc as B,eb as j,fb as k,gb as l,hb as m,ib as n,jb as o,kb as p,lb as q,nb as r,za as d}from"./chunks/chunk-347RSDIW.js";import{M as b,O as c,e as a}from"./chunks/chunk-T42HWKBC.js";export{t as AngleMark,e as Axes2d,v as Axes3d,s as CurlyBrace,o as CurveArea,x as CurvePlot3d,r as DropLines,u as EmphasisMark,h as FunctionPlot,b as Latex,c as LatexMatrix,C as NODES,A as NetworkGraph,d as NumberLine,f as NumberPlane,m as PlotPoint,y as PlotPoint3d,i as PointsPlot,g as PolarPlane,p as RiemannSum,B as SampleSpace,k as StreamLines,w as SurfacePlot3d,q as TangentLine,l as TracedPath,n as VectorArrow,z as VectorArrow3d,j as VectorField,a as loadMathJax};
1
+ import{a as C}from"./chunks/chunk-L6U74DM4.js";import{Ab as s,Bb as t,Db as u,Ga as e,Kb as v,La as f,Na as g,Ta as h,Va as i,Vb as w,Xb as x,Yb as y,Zb as z,ac as A,cc as B,eb as j,fb as k,gb as l,hb as m,ib as n,jb as o,kb as p,lb as q,nb as r,za as d}from"./chunks/chunk-DMBE5JEI.js";import{M as b,O as c,e as a}from"./chunks/chunk-T42HWKBC.js";export{t as AngleMark,e as Axes2d,v as Axes3d,s as CurlyBrace,o as CurveArea,x as CurvePlot3d,r as DropLines,u as EmphasisMark,h as FunctionPlot,b as Latex,c as LatexMatrix,C as NODES,A as NetworkGraph,d as NumberLine,f as NumberPlane,m as PlotPoint,y as PlotPoint3d,i as PointsPlot,g as PolarPlane,p as RiemannSum,B as SampleSpace,k as StreamLines,w as SurfacePlot3d,q as TangentLine,l as TracedPath,n as VectorArrow,z as VectorArrow3d,j as VectorField,a as loadMathJax};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{$ as gr,$a as ce,$b as Ze,A as xr,Aa as ao,Ab as Ro,B as fr,Ba as to,Bb as Do,C as sr,Ca as po,Cb as wo,D as nr,Da as mo,Db as yo,E as ir,Ea as lo,Eb as ge,F as dr,Fa as xo,Fb as ke,G as ur,Ga as fo,Gb as Ye,H as Er,Ha as le,Hb as be,I as Ar,Ia as xe,Ib as Be,J as Sr,Ja as fe,Jb as Ue,K as cr,Ka as se,Kb as vo,L as Pr,La as so,Lb as Ve,M as Tr,Ma as no,Mb as Xe,N as Or,Na as io,Nb as He,O as Lr,Oa as ne,Ob as Qe,P as Mr,Pa as ie,Pb as qe,Q as _r,Qa as uo,Qb as Je,R as Fr,Ra as Eo,Rb as Ke,S as hr,Sa as Ao,Sb as We,T as Ir,Ta as So,Tb as ze,U as Nr,Ua as co,Ub as Ge,V as Cr,Va as Po,Vb as go,W as Rr,Wa as de,Wb as ko,X as Dr,Xa as ue,Xb as Yo,Y as wr,Ya as Ee,Yb as bo,Z as yr,Za as Ae,Zb as Bo,_ as vr,_a as Se,_b as je,a as k,aa as kr,ab as Pe,ac as Uo,b as Y,ba as Yr,bb as Te,bc as Vo,c as b,ca as br,cb as Oe,cc as Xo,d as B,da as Br,db as Le,dc as Ho,e as U,ea as Ur,eb as To,f as V,fa as Vr,fb as Oo,g as X,ga as Xr,gb as Lo,h as H,ha as Hr,hb as Mo,i as Q,ia as Qr,ib as _o,j as q,ja as qr,jb as Fo,k as J,ka as Jr,kb as ho,l as K,la as Kr,lb as Io,m as W,ma as Wr,mb as No,n as z,na as zr,nb as Co,o as G,oa as Gr,ob as Me,p as j,pa as jr,pb as _e,q as Z,qa as Zr,qb as Fe,r as $,ra as $r,rb as he,s as rr,sa as re,sb as Ie,t as er,ta as ee,tb as Ne,u as or,ua as oe,ub as Ce,v as ar,va as ae,vb as Re,w as tr,wa as te,wb as De,x as pr,xa as pe,xb as we,y as mr,ya as me,yb as ye,z as lr,za as oo,zb as ve}from"./chunks/chunk-347RSDIW.js";import{A as _,B as F,C as h,D as I,E as N,F as C,G as R,H as D,I as w,J as y,K as v,L as g,M as $e,N as ro,O as eo,a as r,d as e,e as o,f as a,g as t,h as p,i as m,j as l,k as x,l as f,m as s,n,o as i,p as d,q as u,r as E,s as A,t as S,u as c,v as P,w as T,x as O,y as L,z as M}from"./chunks/chunk-T42HWKBC.js";export{ao as AXES,to as AXES_COMMANDS,K as AXIS_COLOR,Do as AngleMark,fo as Axes2d,vo as Axes3d,Pr as CURVE_KEYS,Ro as CurlyBrace,Fo as CurveArea,Yo as CurvePlot3d,Co as DropLines,We as EQUATION_KINDS,xr as EQUATION_VARIABLES,Ve as EQUATION_VARIABLES_3D,yo as EmphasisMark,Te as FIELD_COMMANDS,Pe as FIELD_STATE,le as FIELD_VARIABLES,_e as FOLLOW_COMMANDS,Me as FOLLOW_STATE,So as FunctionPlot,Ye as GRAPH_3D,je as GRAPH_LAYOUTS,U as IDENTITY_MATRIX,$e as Latex,m as LatexError,eo as LatexMatrix,p as LatexNotLoaded,e as MATHJAX_LOADER,tr as MATH_DIALECT,T as Morph,Uo as NetworkGraph,oo as NumberLine,so as NumberPlane,Ce as OWN_FRAME,n as PAINT,i as PAINT_COMMANDS,B as PIXEL_MAP,Fr as PLANE_ENTRY,Mr as PLOT,W as PLOT_COLOR,Eo as PLOT_COMMANDS,hr as PLOT_REF,uo as PLOT_STATE,Ao as PLOT_STROKE,Mo as PlotPoint,bo as PlotPoint3d,Po as PointsPlot,io as PolarPlane,ho as RiemannSum,Lr as SYSTEM,_r as SYSTEM_ENTRY,Xo as SampleSpace,Oo as StreamLines,go as SurfacePlot3d,_ as TYPESET,F as TYPESET_COMMANDS,Io as TangentLine,Lo as TracedPath,Er as UNSET_PARAM,_o as VectorArrow,Bo as VectorArrow3d,To as VectorField,Re as add,Ue as aim,rr as along,zr as anchored,wo as angleOf,xo as axesFurniture,mo as axesMap,lo as axesOf,Y as axisScale,De as between,t as blankLatex,yr as boundsOfRuns,ve as braceOutline,l as buildLatexPath,b as cartesianMap,Wr as castsShadow,kr as clamp,Ee as colorAt,mr as compileExpression,lr as compileExpressionCached,Fe as container,r as createBoundedCache,Rr as curveFor,Tr as curveValue,G as declareFormulas,s as defaultLatexMorph,Ge as domainEntry,Le as drawField,R as drawFormula,ge as drawLabel3D,Z as drawLabels,Jr as drawMark,te as drawSystem,$ as drawn,sr as equationError,nr as equationParams,pr as expressionVocabulary,se as fieldError,xe as fieldParams,ce as fillAt,f as findLatexParts,Ie as followedQuad,me as formatTick,w as formula,h as formulaFrame,v as formulaOf,be as graphEntry,Be as graphOf,Qr as graphPoint,ke as graphSpace,ye as grown,we as heading,vr as inflate,Xr as inkCentre,Vr as inkSize,or as intervalEntry,Or as isCurve,y as isFormula,H as isIdentityMatrix,g as latexPartBounds,x as latexPartNames,Ze as layOut,N as layoutFormula,ur as lerpDomain,Se as lerpFillScale,er as lerpInterval,X as lerpMatrix,L as lerpMorph,Ar as lerpParams,S as lerpPartFills,ue as lerpScale,dr as lerpSource,J as lineThrough,d as listed,po as loadAxes,C as loadFormula,j as loadFormulas,o as loadMathJax,Br as markRuns,qr as markShape,a as mathJaxLoaded,ro as matrixSource,I as measureFormula,ze as meshEntries,M as morphOf,u as omit,jr as openPlane,Ne as outlineBounds,Hr as ownPoint,E as painted,fr as parseEquation,fe as parseField,qe as parseSpaceCurve,Qe as parseSurface,D as partBoundsIn,P as partPaint,Gr as placeOnMap,no as planeMap,Zr as plotArea,Cr as plotPlane,gr as radians,Ae as readFillScale,ar as readInterval,V as readMatrix,A as readPartFills,de as readScale,ir as readSource,Ur as reading,Dr as refId,k as resolveInterval,he as resting,cr as revisionOf,wr as runsToPath,ie as sampleCurve,Ho as sampleParts,Sr as scopeFor,Nr as settle,O as settled,Ke as spaceCurveError,He as spaceCurveParams,Yr as stated,Kr as strokeShape,Je as surfaceError,Xe as surfaceParams,ko as surfaceValueAt,oe as systemLayout,$r as systemMap,ae as systemOpenPlane,Ir as systemPlane,ee as systemProvides,re as systemSize,No as tangentSlope,pe as ticksFor,ne as traceContour,Oe as traceField,co as tracePlot,br as traced,Q as transformedMap,Vo as vertexPoints,q as warpedMap,c as withPartFill,z as withoutTips};
1
+ import{$ as gr,$a as ce,$b as Ze,A as xr,Aa as ao,Ab as Ro,B as fr,Ba as to,Bb as Do,C as sr,Ca as po,Cb as wo,D as nr,Da as mo,Db as yo,E as ir,Ea as lo,Eb as ge,F as dr,Fa as xo,Fb as ke,G as ur,Ga as fo,Gb as Ye,H as Er,Ha as le,Hb as be,I as Ar,Ia as xe,Ib as Be,J as Sr,Ja as fe,Jb as Ue,K as cr,Ka as se,Kb as vo,L as Pr,La as so,Lb as Ve,M as Tr,Ma as no,Mb as Xe,N as Or,Na as io,Nb as He,O as Lr,Oa as ne,Ob as Qe,P as Mr,Pa as ie,Pb as qe,Q as _r,Qa as uo,Qb as Je,R as Fr,Ra as Eo,Rb as Ke,S as hr,Sa as Ao,Sb as We,T as Ir,Ta as So,Tb as ze,U as Nr,Ua as co,Ub as Ge,V as Cr,Va as Po,Vb as go,W as Rr,Wa as de,Wb as ko,X as Dr,Xa as ue,Xb as Yo,Y as wr,Ya as Ee,Yb as bo,Z as yr,Za as Ae,Zb as Bo,_ as vr,_a as Se,_b as je,a as k,aa as kr,ab as Pe,ac as Uo,b as Y,ba as Yr,bb as Te,bc as Vo,c as b,ca as br,cb as Oe,cc as Xo,d as B,da as Br,db as Le,dc as Ho,e as U,ea as Ur,eb as To,f as V,fa as Vr,fb as Oo,g as X,ga as Xr,gb as Lo,h as H,ha as Hr,hb as Mo,i as Q,ia as Qr,ib as _o,j as q,ja as qr,jb as Fo,k as J,ka as Jr,kb as ho,l as K,la as Kr,lb as Io,m as W,ma as Wr,mb as No,n as z,na as zr,nb as Co,o as G,oa as Gr,ob as Me,p as j,pa as jr,pb as _e,q as Z,qa as Zr,qb as Fe,r as $,ra as $r,rb as he,s as rr,sa as re,sb as Ie,t as er,ta as ee,tb as Ne,u as or,ua as oe,ub as Ce,v as ar,va as ae,vb as Re,w as tr,wa as te,wb as De,x as pr,xa as pe,xb as we,y as mr,ya as me,yb as ye,z as lr,za as oo,zb as ve}from"./chunks/chunk-DMBE5JEI.js";import{A as _,B as F,C as h,D as I,E as N,F as C,G as R,H as D,I as w,J as y,K as v,L as g,M as $e,N as ro,O as eo,a as r,d as e,e as o,f as a,g as t,h as p,i as m,j as l,k as x,l as f,m as s,n,o as i,p as d,q as u,r as E,s as A,t as S,u as c,v as P,w as T,x as O,y as L,z as M}from"./chunks/chunk-T42HWKBC.js";export{ao as AXES,to as AXES_COMMANDS,K as AXIS_COLOR,Do as AngleMark,fo as Axes2d,vo as Axes3d,Pr as CURVE_KEYS,Ro as CurlyBrace,Fo as CurveArea,Yo as CurvePlot3d,Co as DropLines,We as EQUATION_KINDS,xr as EQUATION_VARIABLES,Ve as EQUATION_VARIABLES_3D,yo as EmphasisMark,Te as FIELD_COMMANDS,Pe as FIELD_STATE,le as FIELD_VARIABLES,_e as FOLLOW_COMMANDS,Me as FOLLOW_STATE,So as FunctionPlot,Ye as GRAPH_3D,je as GRAPH_LAYOUTS,U as IDENTITY_MATRIX,$e as Latex,m as LatexError,eo as LatexMatrix,p as LatexNotLoaded,e as MATHJAX_LOADER,tr as MATH_DIALECT,T as Morph,Uo as NetworkGraph,oo as NumberLine,so as NumberPlane,Ce as OWN_FRAME,n as PAINT,i as PAINT_COMMANDS,B as PIXEL_MAP,Fr as PLANE_ENTRY,Mr as PLOT,W as PLOT_COLOR,Eo as PLOT_COMMANDS,hr as PLOT_REF,uo as PLOT_STATE,Ao as PLOT_STROKE,Mo as PlotPoint,bo as PlotPoint3d,Po as PointsPlot,io as PolarPlane,ho as RiemannSum,Lr as SYSTEM,_r as SYSTEM_ENTRY,Xo as SampleSpace,Oo as StreamLines,go as SurfacePlot3d,_ as TYPESET,F as TYPESET_COMMANDS,Io as TangentLine,Lo as TracedPath,Er as UNSET_PARAM,_o as VectorArrow,Bo as VectorArrow3d,To as VectorField,Re as add,Ue as aim,rr as along,zr as anchored,wo as angleOf,xo as axesFurniture,mo as axesMap,lo as axesOf,Y as axisScale,De as between,t as blankLatex,yr as boundsOfRuns,ve as braceOutline,l as buildLatexPath,b as cartesianMap,Wr as castsShadow,kr as clamp,Ee as colorAt,mr as compileExpression,lr as compileExpressionCached,Fe as container,r as createBoundedCache,Rr as curveFor,Tr as curveValue,G as declareFormulas,s as defaultLatexMorph,Ge as domainEntry,Le as drawField,R as drawFormula,ge as drawLabel3D,Z as drawLabels,Jr as drawMark,te as drawSystem,$ as drawn,sr as equationError,nr as equationParams,pr as expressionVocabulary,se as fieldError,xe as fieldParams,ce as fillAt,f as findLatexParts,Ie as followedQuad,me as formatTick,w as formula,h as formulaFrame,v as formulaOf,be as graphEntry,Be as graphOf,Qr as graphPoint,ke as graphSpace,ye as grown,we as heading,vr as inflate,Xr as inkCentre,Vr as inkSize,or as intervalEntry,Or as isCurve,y as isFormula,H as isIdentityMatrix,g as latexPartBounds,x as latexPartNames,Ze as layOut,N as layoutFormula,ur as lerpDomain,Se as lerpFillScale,er as lerpInterval,X as lerpMatrix,L as lerpMorph,Ar as lerpParams,S as lerpPartFills,ue as lerpScale,dr as lerpSource,J as lineThrough,d as listed,po as loadAxes,C as loadFormula,j as loadFormulas,o as loadMathJax,Br as markRuns,qr as markShape,a as mathJaxLoaded,ro as matrixSource,I as measureFormula,ze as meshEntries,M as morphOf,u as omit,jr as openPlane,Ne as outlineBounds,Hr as ownPoint,E as painted,fr as parseEquation,fe as parseField,qe as parseSpaceCurve,Qe as parseSurface,D as partBoundsIn,P as partPaint,Gr as placeOnMap,no as planeMap,Zr as plotArea,Cr as plotPlane,gr as radians,Ae as readFillScale,ar as readInterval,V as readMatrix,A as readPartFills,de as readScale,ir as readSource,Ur as reading,Dr as refId,k as resolveInterval,he as resting,cr as revisionOf,wr as runsToPath,ie as sampleCurve,Ho as sampleParts,Sr as scopeFor,Nr as settle,O as settled,Ke as spaceCurveError,He as spaceCurveParams,Yr as stated,Kr as strokeShape,Je as surfaceError,Xe as surfaceParams,ko as surfaceValueAt,oe as systemLayout,$r as systemMap,ae as systemOpenPlane,Ir as systemPlane,ee as systemProvides,re as systemSize,No as tangentSlope,pe as ticksFor,ne as traceContour,Oe as traceField,co as tracePlot,br as traced,Q as transformedMap,Vo as vertexPoints,q as warpedMap,c as withPartFill,z as withoutTips};
2
2
  //# sourceMappingURL=kit.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/math",
3
- "version": "0.4.0-alpha.0",
3
+ "version": "0.4.1-alpha.0",
4
4
  "exports": {
5
5
  ".": "dist/browser/index.js",
6
6
  "./v1": "dist/browser/v1.js",
@@ -1,2 +1,2 @@
1
- import{a as C}from"./chunks/chunk-BIUAHFF7.js";import{Ab as n,Bb as q,Db as s,Ga as m,Kb as u,La as p,Na as t,Ta as x,Va as a,Vb as v,Xb as w,Yb as y,Zb as z,ac as A,cc as B,eb as b,fb as c,gb as d,hb as g,ib as h,jb as i,kb as j,lb as k,nb as l,za as f}from"./chunks/chunk-347RSDIW.js";import{M as r,O as e,e as o}from"./chunks/chunk-T42HWKBC.js";export{q as AngleMark,m as Axes2d,u as Axes3d,n as CurlyBrace,i as CurveArea,w as CurvePlot3d,l as DropLines,s as EmphasisMark,x as FunctionPlot,r as Latex,e as LatexMatrix,C as NODES,A as NetworkGraph,f as NumberLine,p as NumberPlane,g as PlotPoint,y as PlotPoint3d,a as PointsPlot,t as PolarPlane,j as RiemannSum,B as SampleSpace,c as StreamLines,v as SurfacePlot3d,k as TangentLine,d as TracedPath,h as VectorArrow,z as VectorArrow3d,b as VectorField,o as loadMathJax};
1
+ import{a as C}from"./chunks/chunk-L6U74DM4.js";import{Ab as n,Bb as q,Db as s,Ga as m,Kb as u,La as p,Na as t,Ta as x,Va as a,Vb as v,Xb as w,Yb as y,Zb as z,ac as A,cc as B,eb as b,fb as c,gb as d,hb as g,ib as h,jb as i,kb as j,lb as k,nb as l,za as f}from"./chunks/chunk-DMBE5JEI.js";import{M as r,O as e,e as o}from"./chunks/chunk-T42HWKBC.js";export{q as AngleMark,m as Axes2d,u as Axes3d,n as CurlyBrace,i as CurveArea,w as CurvePlot3d,l as DropLines,s as EmphasisMark,x as FunctionPlot,r as Latex,e as LatexMatrix,C as NODES,A as NetworkGraph,f as NumberLine,p as NumberPlane,g as PlotPoint,y as PlotPoint3d,a as PointsPlot,t as PolarPlane,j as RiemannSum,B as SampleSpace,c as StreamLines,v as SurfacePlot3d,k as TangentLine,d as TracedPath,h as VectorArrow,z as VectorArrow3d,b as VectorField,o as loadMathJax};
2
2
  //# sourceMappingURL=v1.js.map
@@ -1,4 +1,4 @@
1
- import { type NodeOf, type Alignment as _Alignment, type CornerRadiusResolved as _CornerRadiusResolved, type CornerStyleResolved as _CornerStyleResolved, type Fill as _Fill, type FillResolved as _FillResolved, type FlowMode as _FlowMode, type FlowResolved as _FlowResolved, type GapSize as _GapSize, type Node2D as _Node2D, type Node2DProps as _Node2DProps, type Color as _Color, type NormalizedColor as _NormalizedColor, type PostEffect3D as _PostEffect3D, type RectCornerRadius as _RectCornerRadius, type RectCornerStyle as _RectCornerStyle, type Shadow as _Shadow, type ShadowResolved as _ShadowResolved, type Shadows3D as _Shadows3D, type Stroke as _Stroke, type StrokeResolved as _StrokeResolved, type ToneMapping3D as _ToneMapping3D, type Vector2 as _Vector2 } from "@motionscript/sdk";
1
+ import { type NodeOf, type Vector3, type Vector3Input, type Alignment as _Alignment, type CornerRadiusResolved as _CornerRadiusResolved, type CornerStyleResolved as _CornerStyleResolved, type Fill as _Fill, type FillResolved as _FillResolved, type FlowMode as _FlowMode, type FlowResolved as _FlowResolved, type GapSize as _GapSize, type Node2D as _Node2D, type Node2DProps as _Node2DProps, type Color as _Color, type NormalizedColor as _NormalizedColor, type PostEffect3D as _PostEffect3D, type RectCornerRadius as _RectCornerRadius, type RectCornerStyle as _RectCornerStyle, type Shadow as _Shadow, type ShadowResolved as _ShadowResolved, type Shadows3D as _Shadows3D, type StageLight3D as _StageLight3D, type StageLightResolved3D as _StageLightResolved3D, type Stroke as _Stroke, type StrokeResolved as _StrokeResolved, type ToneMapping3D as _ToneMapping3D, type Vector2 as _Vector2 } from "@motionscript/sdk";
2
2
  import type { Interval } from "../kit/coords.js";
3
3
  /** A 3D graph: three axes through a box of graph coordinates, z up, seen through its own camera. Its 3D children sit in graph coordinates. */
4
4
  export declare const Axes3d: import("@motionscript/sdk").Component<"axes3d", import("@motionscript/sdk").Merge<import("@motionscript/sdk").Box2DState, {
@@ -29,10 +29,14 @@ export declare const Axes3d: import("@motionscript/sdk").Component<"axes3d", imp
29
29
  readonly elevation: import("@motionscript/sdk").Type<number, number, false>;
30
30
  readonly zoom: import("@motionscript/sdk").Type<number, number, false>;
31
31
  readonly fov: import("@motionscript/sdk").Type<number, number, false>;
32
- readonly ambientIntensity: import("@motionscript/sdk").Type<number, number, false>;
33
- readonly ambientColor: import("@motionscript/sdk").Type<_Color, _NormalizedColor, false>;
34
- readonly keyIntensity: import("@motionscript/sdk").Type<number, number, false>;
35
- readonly keyColor: import("@motionscript/sdk").Type<_Color, _NormalizedColor, false>;
32
+ readonly projection: import("@motionscript/sdk").Type<"perspective" | "orthographic", "perspective" | "orthographic", false>;
33
+ readonly frustumHeight: import("@motionscript/sdk").Type<number, number, false>;
34
+ readonly target: import("@motionscript/sdk").Type<import("@motionscript/core").Vector3Input | undefined, import("@motionscript/core").Vector3 | undefined, false>;
35
+ readonly lights: import("@motionscript/sdk").Type<_StageLight3D[], _StageLightResolved3D[], false>;
36
+ readonly fog: import("@motionscript/sdk").Attribute<_Fill, _FillResolved[]>;
37
+ readonly fogNear: import("@motionscript/sdk").Type<number, number, false>;
38
+ readonly fogFar: import("@motionscript/sdk").Type<number, number, false>;
39
+ readonly environment: import("@motionscript/sdk").Attribute<_Fill, _FillResolved[]>;
36
40
  readonly showGrid: import("@motionscript/sdk").Type<boolean, boolean, false>;
37
41
  readonly gridSize: import("@motionscript/sdk").Type<number, number, false>;
38
42
  readonly gridDivisions: import("@motionscript/sdk").Type<number, number, false>;
@@ -67,6 +71,15 @@ export declare const Axes3d: import("@motionscript/sdk").Component<"axes3d", imp
67
71
  }>, {
68
72
  readonly rangeTo: readonly ["xRange", "yRange", "zRange"];
69
73
  readonly orbitTo: readonly ["orbit", "elevation", "zoom"];
74
+ readonly lookTo: readonly ["target"];
75
+ readonly lightTo: {
76
+ readonly light: import("@motionscript/sdk").Type<number, number, false>;
77
+ readonly color: import("@motionscript/sdk").Type<_Color | undefined, _NormalizedColor | undefined, false>;
78
+ readonly intensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
79
+ readonly orbit: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
80
+ readonly elevation: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
81
+ readonly position: import("@motionscript/sdk").Type<import("@motionscript/core").Vector3Input | undefined, import("@motionscript/core").Vector3 | undefined, false>;
82
+ };
70
83
  readonly fillTo: readonly ["fill"];
71
84
  readonly strokeTo: readonly ["stroke"];
72
85
  readonly shadowTo: readonly ["shadow"];
@@ -103,10 +116,14 @@ export declare const Axes3d: import("@motionscript/sdk").Component<"axes3d", imp
103
116
  readonly elevation: import("@motionscript/sdk").Type<number, number, false>;
104
117
  readonly zoom: import("@motionscript/sdk").Type<number, number, false>;
105
118
  readonly fov: import("@motionscript/sdk").Type<number, number, false>;
106
- readonly ambientIntensity: import("@motionscript/sdk").Type<number, number, false>;
107
- readonly ambientColor: import("@motionscript/sdk").Type<_Color, _NormalizedColor, false>;
108
- readonly keyIntensity: import("@motionscript/sdk").Type<number, number, false>;
109
- readonly keyColor: import("@motionscript/sdk").Type<_Color, _NormalizedColor, false>;
119
+ readonly projection: import("@motionscript/sdk").Type<"perspective" | "orthographic", "perspective" | "orthographic", false>;
120
+ readonly frustumHeight: import("@motionscript/sdk").Type<number, number, false>;
121
+ readonly target: import("@motionscript/sdk").Type<import("@motionscript/core").Vector3Input | undefined, import("@motionscript/core").Vector3 | undefined, false>;
122
+ readonly lights: import("@motionscript/sdk").Type<_StageLight3D[], _StageLightResolved3D[], false>;
123
+ readonly fog: import("@motionscript/sdk").Attribute<_Fill, _FillResolved[]>;
124
+ readonly fogNear: import("@motionscript/sdk").Type<number, number, false>;
125
+ readonly fogFar: import("@motionscript/sdk").Type<number, number, false>;
126
+ readonly environment: import("@motionscript/sdk").Attribute<_Fill, _FillResolved[]>;
110
127
  readonly showGrid: import("@motionscript/sdk").Type<boolean, boolean, false>;
111
128
  readonly gridSize: import("@motionscript/sdk").Type<number, number, false>;
112
129
  readonly gridDivisions: import("@motionscript/sdk").Type<number, number, false>;
@@ -166,10 +183,14 @@ export declare const Axes3d: import("@motionscript/sdk").Component<"axes3d", imp
166
183
  readonly elevation: import("@motionscript/sdk").Type<number, number, false>;
167
184
  readonly zoom: import("@motionscript/sdk").Type<number, number, false>;
168
185
  readonly fov: import("@motionscript/sdk").Type<number, number, false>;
169
- readonly ambientIntensity: import("@motionscript/sdk").Type<number, number, false>;
170
- readonly ambientColor: import("@motionscript/sdk").Type<_Color, _NormalizedColor, false>;
171
- readonly keyIntensity: import("@motionscript/sdk").Type<number, number, false>;
172
- readonly keyColor: import("@motionscript/sdk").Type<_Color, _NormalizedColor, false>;
186
+ readonly projection: import("@motionscript/sdk").Type<"perspective" | "orthographic", "perspective" | "orthographic", false>;
187
+ readonly frustumHeight: import("@motionscript/sdk").Type<number, number, false>;
188
+ readonly target: import("@motionscript/sdk").Type<import("@motionscript/core").Vector3Input | undefined, import("@motionscript/core").Vector3 | undefined, false>;
189
+ readonly lights: import("@motionscript/sdk").Type<_StageLight3D[], _StageLightResolved3D[], false>;
190
+ readonly fog: import("@motionscript/sdk").Attribute<_Fill, _FillResolved[]>;
191
+ readonly fogNear: import("@motionscript/sdk").Type<number, number, false>;
192
+ readonly fogFar: import("@motionscript/sdk").Type<number, number, false>;
193
+ readonly environment: import("@motionscript/sdk").Attribute<_Fill, _FillResolved[]>;
173
194
  readonly showGrid: import("@motionscript/sdk").Type<boolean, boolean, false>;
174
195
  readonly gridSize: import("@motionscript/sdk").Type<number, number, false>;
175
196
  readonly gridDivisions: import("@motionscript/sdk").Type<number, number, false>;
@@ -204,6 +225,15 @@ export declare const Axes3d: import("@motionscript/sdk").Component<"axes3d", imp
204
225
  }>, {
205
226
  readonly rangeTo: readonly ["xRange", "yRange", "zRange"];
206
227
  readonly orbitTo: readonly ["orbit", "elevation", "zoom"];
228
+ readonly lookTo: readonly ["target"];
229
+ readonly lightTo: {
230
+ readonly light: import("@motionscript/sdk").Type<number, number, false>;
231
+ readonly color: import("@motionscript/sdk").Type<_Color | undefined, _NormalizedColor | undefined, false>;
232
+ readonly intensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
233
+ readonly orbit: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
234
+ readonly elevation: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
235
+ readonly position: import("@motionscript/sdk").Type<import("@motionscript/core").Vector3Input | undefined, import("@motionscript/core").Vector3 | undefined, false>;
236
+ };
207
237
  readonly fillTo: readonly ["fill"];
208
238
  readonly strokeTo: readonly ["stroke"];
209
239
  readonly shadowTo: readonly ["shadow"];
@@ -1 +1 @@
1
- {"version":3,"file":"axes3d.d.ts","sourceRoot":"","sources":["../../src/three/axes3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAWH,KAAK,MAAM,EAOX,KAAK,SAAS,IAAI,UAAU,EAC5B,KAAK,oBAAoB,IAAI,qBAAqB,EAClD,KAAK,mBAAmB,IAAI,oBAAoB,EAChD,KAAK,IAAI,IAAI,KAAK,EAClB,KAAK,YAAY,IAAI,aAAa,EAClC,KAAK,QAAQ,IAAI,SAAS,EAC1B,KAAK,YAAY,IAAI,aAAa,EAClC,KAAK,OAAO,IAAI,QAAQ,EACxB,KAAK,MAAM,IAAI,OAAO,EACtB,KAAK,WAAW,IAAI,YAAY,EAChC,KAAK,KAAK,IAAI,MAAM,EAEpB,KAAK,eAAe,IAAI,gBAAgB,EACxC,KAAK,YAAY,IAAI,aAAa,EAClC,KAAK,gBAAgB,IAAI,iBAAiB,EAC1C,KAAK,eAAe,IAAI,gBAAgB,EACxC,KAAK,MAAM,IAAI,OAAO,EACtB,KAAK,cAAc,IAAI,eAAe,EACtC,KAAK,SAAS,IAAI,UAAU,EAC5B,KAAK,MAAM,IAAI,OAAO,EACtB,KAAK,cAAc,IAAI,eAAe,EACtC,KAAK,aAAa,IAAI,cAAc,EACpC,KAAK,OAAO,IAAI,QAAQ,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAuD9C,8IAA8I;AAC9I,eAAO,MAAM,MAAM;;;;;;;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3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAuD9C,8IAA8I;AAC9I,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAsBjB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -49,6 +49,8 @@ export const Axes3d = component2d({
49
49
  key: "axes3d",
50
50
  state: { ...Paint.state, ...Flow.state, ...Shapes.corners, ...View3D.state, ...own },
51
51
  defaults: { width: "fill", height: "fill" },
52
+ renamed: View3D.renamed,
53
+ migrate: View3D.migrate,
52
54
  commands: {
53
55
  ...Paint.commands,
54
56
  ...View3D.commands,
@@ -1 +1 @@
1
- {"version":3,"file":"axes3d.js","sourceRoot":"","sources":["../../src/three/axes3d.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,IAAI,EACJ,GAAG,EACH,UAAU,EACV,GAAG,EACH,KAAK,EACL,QAAQ,EACR,MAAM,EACN,KAAK,EACL,MAAM,GA+BT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,WAAW,EAAqB,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAiC,MA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scene3D,\n type Transform3D,\n type Values,\n type Vector3,\n type Vector3Input,\n // Named so the emitted declaration reaches these through the sdk, not core.\n type Alignment as _Alignment,\n type CornerRadiusResolved as _CornerRadiusResolved,\n type CornerStyleResolved as _CornerStyleResolved,\n type Fill as _Fill,\n type FillResolved as _FillResolved,\n type FlowMode as _FlowMode,\n type FlowResolved as _FlowResolved,\n type GapSize as _GapSize,\n type Node2D as _Node2D,\n type Node2DProps as _Node2DProps,\n type Color as _Color,\n\n type NormalizedColor as _NormalizedColor,\n type PostEffect3D as _PostEffect3D,\n type RectCornerRadius as _RectCornerRadius,\n type RectCornerStyle as _RectCornerStyle,\n type Shadow as _Shadow,\n type ShadowResolved as _ShadowResolved,\n type Shadows3D as _Shadows3D,\n type Stroke as _Stroke,\n type StrokeResolved as _StrokeResolved,\n type ToneMapping3D as _ToneMapping3D,\n type Vector2 as _Vector2,\n} from \"@motionscript/sdk\";\nimport type { Interval } from \"../kit/coords\";\nimport { AXIS_COLOR, intervalEntry } from \"../kit/furniture\";\nimport { clamp } from \"../kit/geometry\";\nimport { formatTick, ticksFor } from \"../kit/ticks\";\nimport { drawLabel3D, type LabelStyle3D } from \"./label3d\";\nimport { GRAPH_3D, graphSpace, type Graph3D, type GraphSpace } from \"./space\";\n\n/** How many pixels of a 2D axis one scene unit counts as, when an axis picks its own tick spacing. */\nconst UNIT_AS_PIXELS = 64;\n\ntype AxisName = \"x\" | \"y\" | \"z\";\n\n/** The turn that lays a shape built along the scene's +y along each graph axis. */\nconst ALONG: Record<AxisName, Vector3Input> = { x: [90, 0, 0], y: [0, 0, -90], z: [0, 0, 0] };\n\n/** The graph axis each axis's tick marks lie along. */\nconst TICK_ALONG: Record<AxisName, AxisName> = { x: \"y\", y: \"x\", z: \"y\" };\n\n/** The axes' own entries, beside a 3D canvas's. */\nconst own = {\n xRange: intervalEntry([-3, 3]),\n yRange: intervalEntry([-3, 3]),\n zRange: intervalEntry([-2, 2]),\n /** How long each axis is drawn, in scene units. */\n xLength: Types.number(6, { min: 0.01, step: 0.1 }),\n yLength: Types.number(6, { min: 0.01, step: 0.1 }),\n zLength: Types.number(4, { min: 0.01, step: 0.1 }),\n /** The spacing of each axis's ticks; zero picks a tidy one for the axis's length. */\n xStep: Types.number(0, { min: 0 }),\n yStep: Types.number(0, { min: 0 }),\n zStep: Types.number(0, { min: 0 }),\n color: Types.color(AXIS_COLOR),\n /** The radius of an axis line, in scene units. */\n thickness: Types.number(0.02, { min: 0, step: 0.005 }),\n tips: Types.boolean(true, { animatable: false }),\n ticks: Types.boolean(true, { animatable: false }),\n tickSize: Types.number(0.16, { min: 0, step: 0.01 }),\n /** Lines across the plane the x and y axes lie in, at each of their ticks. */\n grid: Types.boolean(false, { animatable: false }),\n /** (`gridColor` is the viewport's own reference grid.) */\n gridLineColor: Types.color(\"#374151\"),\n /** A number at each tick. */\n labels: Types.boolean(false, { animatable: false }),\n /** The height of a label's text, in scene units. */\n labelSize: Types.number(0.26, { min: 0.01, step: 0.01 }),\n labelColor: Types.color(AXIS_COLOR),\n fontFamily: Types.text(\"\", { animatable: false }),\n /** A title at the positive end of each axis. */\n xLabel: Types.text(\"x\", { animatable: false }),\n yLabel: Types.text(\"y\", { animatable: false }),\n zLabel: Types.text(\"z\", { animatable: false }),\n};\n\ntype AxesValues = Values<typeof own>;\n\n/** A 3D graph: three axes through a box of graph coordinates, z up, seen through its own camera. Its 3D children sit in graph coordinates. */\nexport const Axes3d = component2d({\n key: \"axes3d\",\n state: { ...Paint.state, ...Flow.state, ...Shapes.corners, ...View3D.state, ...own },\n defaults: { width: \"fill\", height: \"fill\" },\n commands: {\n ...Paint.commands,\n ...View3D.commands,\n /** Animate the window of values the axes show; everything drawn in them follows. */\n rangeTo: { args: [\"xRange\", \"yRange\", \"zRange\"] },\n },\n allowedChildren: [\"2d\", \"3d\"],\n load: (loader, s) => {\n View3D.load(loader, furnish(s));\n if (s.fontFamily !== \"\") loader.font(s.fontFamily);\n },\n provide: (s) => [provides(GRAPH_3D, graphOfAxes(s))],\n space: (s) => axesSpace(s),\n measure: (measurer, s, children) => Flow.measure(measurer, s, children, Paint.inset(s)),\n layout: (box, s, children) => Flow.layout(box, s, children, Paint.inset(s)),\n render: (ctx, s) => View3D.draw(ctx, s, furnish(s)),\n});\n\nexport type Axes3d = NodeOf<typeof Axes3d>;\n\n/** The axes' own drawing, added to the scene: what `render` draws and `load` declares. */\nfunction furnish(s: AxesValues): (scene: Scene3D) => void {\n return (scene) => scene.draw(furniture(s));\n}\n\n/** The last space worked out for each axes, kept while its ranges and lengths are unchanged. */\nconst spaces = new WeakMap<object, { readonly key: string; readonly space: GraphSpace }>();\n\n/** The coordinates of a 3D graph: what its children's `x`, `y` and `z` are in. */\nfunction axesSpace(s: AxesValues): GraphSpace {\n const { xRange, yRange, zRange, xLength, yLength, zLength } = s;\n const key = [xRange, yRange, zRange, xLength, yLength, zLength].join(\"|\");\n let kept = spaces.get(s);\n if (kept?.key !== key) spaces.set(s, (kept = { key, space: graphSpace(xRange, yRange, zRange, { x: xLength, y: yLength, z: zLength }) }));\n return kept.space;\n}\n\n// One per axes, so the context its subtree holds is the same from frame to frame.\nconst graphs = new WeakMap<object, Graph3D>();\n\nfunction graphOfAxes(s: AxesValues): Graph3D {\n let graph = graphs.get(s);\n if (!graph) graphs.set(s, (graph = { space: () => axesSpace(s) }));\n return graph;\n}\n\n/** The axes, their ticks, numbers and titles, and the grid, in the scene's units. */\nfunction furniture(s: AxesValues): Graphics3D {\n const space = axesSpace(s);\n const g3 = new Graphics3D();\n const ranges: Record<AxisName, Interval> = { x: space.xRange, y: space.yRange, z: space.zRange };\n const lengths: Record<AxisName, number> = { x: s.xLength, y: s.yLength, z: s.zLength };\n const steps: Record<AxisName, number> = { x: s.xStep, y: s.yStep, z: s.zStep };\n const titles: Record<AxisName, string> = { x: s.xLabel, y: s.yLabel, z: s.zLabel };\n // Where each axis is crossed by the other two: their zero, or the nearest end of a range without one.\n const cross: Record<AxisName, number> = {\n x: clamp(0, ranges.x[0], ranges.x[1]),\n y: clamp(0, ranges.y[0], ranges.y[1]),\n z: clamp(0, ranges.z[0], ranges.z[1]),\n };\n const at = (axis: AxisName, value: number, shift: Partial<Record<AxisName, number>> = {}): Vector3 => {\n const point = { ...cross, [axis]: value };\n const local = space.toLocal(point.x, point.y, point.z);\n const moved = space.offset(0, 0, 0);\n for (const key of [\"x\", \"y\", \"z\"] as const) {\n const by = shift[key];\n if (by === undefined) continue;\n // A shift is in scene units, along the graph axis it names.\n if (key === \"x\") moved.z += by;\n else if (key === \"y\") moved.x += by;\n else moved.y += by;\n }\n return { x: local.x + moved.x, y: local.y + moved.y, z: local.z + moved.z };\n };\n\n const { thickness, tickSize } = s;\n const paint = Mat.basic({ color: s.color });\n const style: LabelStyle3D = { size: s.labelSize, color: s.labelColor, fontFamily: s.fontFamily };\n const tipLength = s.tips ? thickness * 9 : 0;\n const marks: Transform3D[] = [];\n const plane: Vector3[] = [];\n\n for (const axis of [\"x\", \"y\", \"z\"] as const) {\n const [min, max] = ranges[axis];\n const length = lengths[axis];\n if (!(max > min) || !(length > 0)) continue;\n\n if (thickness > 0) {\n const from = at(axis, min);\n const to = at(axis, max);\n g3.mesh(Geo.cylinder({ radius: thickness, height: length, segments: [12, 1] }), paint, {\n position: { x: (from.x + to.x) / 2, y: (from.y + to.y) / 2, z: (from.z + to.z) / 2 },\n rotation: ALONG[axis],\n });\n if (s.tips) {\n g3.mesh(Geo.cone({ radius: thickness * 3.2, height: tipLength, segments: [16, 1] }), paint, {\n position: at(axis, max, { [axis]: tipLength / 2 }),\n rotation: ALONG[axis],\n });\n }\n }\n\n const ticks = ticksFor(ranges[axis], steps[axis], length * UNIT_AS_PIXELS);\n const side = TICK_ALONG[axis];\n for (const value of ticks.values) {\n // The crossing is marked by the other axes, and the far end by the tip.\n if (Math.abs(value - cross[axis]) < 1e-9 || (s.tips && Math.abs(value - max) < 1e-9)) continue;\n if (s.ticks && tickSize > 0) marks.push({ position: at(axis, value), rotation: ALONG[side] });\n if (s.labels) {\n drawLabel3D(g3, formatTick(value, ticks.step), at(axis, value, { [side]: -(tickSize / 2 + style.size * 0.8) }), style);\n }\n }\n drawLabel3D(g3, titles[axis], at(axis, max, { [axis]: tipLength + style.size * 0.9 }), style);\n\n if (s.grid && axis !== \"z\") {\n const other = axis === \"x\" ? \"y\" : \"x\";\n for (const value of ticks.values) {\n const a = { x: 0, y: 0, z: cross.z, [axis]: value, [other]: ranges[other][0] };\n const b = { ...a, [other]: ranges[other][1] };\n plane.push(space.toLocal(a.x, a.y, a.z), space.toLocal(b.x, b.y, b.z));\n }\n }\n }\n\n if (marks.length > 0) {\n g3.instances(Geo.cylinder({ radius: Math.max(thickness * 0.7, 0.008), height: tickSize, segments: [8, 1] }), paint, marks);\n }\n if (plane.length > 0) g3.line({ points: plane, segments: true, stroke: { fill: s.gridLineColor } });\n return g3;\n}\n"]}
1
+ {"version":3,"file":"axes3d.js","sourceRoot":"","sources":["../../src/three/axes3d.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,IAAI,EACJ,GAAG,EACH,UAAU,EACV,GAAG,EACH,KAAK,EACL,QAAQ,EACR,MAAM,EACN,KAAK,EACL,MAAM,GAiCT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,WAAW,EAAqB,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAiC,MAAM,SAAS,CAAC;AAE9E,sGAAsG;AACtG,MAAM,cAAc,GAAG,EAAE,CAAC;AAI1B,mFAAmF;AACnF,MAAM,KAAK,GAAmC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAA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,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC/E,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC9C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3E,CAAC;QACL,CAAC;IACL,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnB,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC/H,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IACpG,OAAO,EAAE,CAAC;AACd,CAAC","sourcesContent":["import {\n component2d,\n Flow,\n Geo,\n Graphics3D,\n Mat,\n Paint,\n provides,\n Shapes,\n Types,\n View3D,\n type NodeOf,\n type Scene3D,\n type Transform3D,\n type Values,\n type Vector3,\n type Vector3Input,\n // Named so the emitted declaration reaches these through the sdk, not core.\n type Alignment as _Alignment,\n type CornerRadiusResolved as _CornerRadiusResolved,\n type CornerStyleResolved as _CornerStyleResolved,\n type Fill as _Fill,\n type FillResolved as _FillResolved,\n type FlowMode as _FlowMode,\n type FlowResolved as _FlowResolved,\n type GapSize as _GapSize,\n type Node2D as _Node2D,\n type Node2DProps as _Node2DProps,\n type Color as _Color,\n\n type NormalizedColor as _NormalizedColor,\n type PostEffect3D as _PostEffect3D,\n type RectCornerRadius as _RectCornerRadius,\n type RectCornerStyle as _RectCornerStyle,\n type Shadow as _Shadow,\n type ShadowResolved as _ShadowResolved,\n type Shadows3D as _Shadows3D,\n type StageLight3D as _StageLight3D,\n type StageLightResolved3D as _StageLightResolved3D,\n type Stroke as _Stroke,\n type StrokeResolved as _StrokeResolved,\n type ToneMapping3D as _ToneMapping3D,\n type Vector2 as _Vector2,\n} from \"@motionscript/sdk\";\nimport type { Interval } from \"../kit/coords\";\nimport { AXIS_COLOR, intervalEntry } from \"../kit/furniture\";\nimport { clamp } from \"../kit/geometry\";\nimport { formatTick, ticksFor } from \"../kit/ticks\";\nimport { drawLabel3D, type LabelStyle3D } from \"./label3d\";\nimport { GRAPH_3D, graphSpace, type Graph3D, type GraphSpace } from \"./space\";\n\n/** How many pixels of a 2D axis one scene unit counts as, when an axis picks its own tick spacing. */\nconst UNIT_AS_PIXELS = 64;\n\ntype AxisName = \"x\" | \"y\" | \"z\";\n\n/** The turn that lays a shape built along the scene's +y along each graph axis. */\nconst ALONG: Record<AxisName, Vector3Input> = { x: [90, 0, 0], y: [0, 0, -90], z: [0, 0, 0] };\n\n/** The graph axis each axis's tick marks lie along. */\nconst TICK_ALONG: Record<AxisName, AxisName> = { x: \"y\", y: \"x\", z: \"y\" };\n\n/** The axes' own entries, beside a 3D canvas's. */\nconst own = {\n xRange: intervalEntry([-3, 3]),\n yRange: intervalEntry([-3, 3]),\n zRange: intervalEntry([-2, 2]),\n /** How long each axis is drawn, in scene units. */\n xLength: Types.number(6, { min: 0.01, step: 0.1 }),\n yLength: Types.number(6, { min: 0.01, step: 0.1 }),\n zLength: Types.number(4, { min: 0.01, step: 0.1 }),\n /** The spacing of each axis's ticks; zero picks a tidy one for the axis's length. */\n xStep: Types.number(0, { min: 0 }),\n yStep: Types.number(0, { min: 0 }),\n zStep: Types.number(0, { min: 0 }),\n color: Types.color(AXIS_COLOR),\n /** The radius of an axis line, in scene units. */\n thickness: Types.number(0.02, { min: 0, step: 0.005 }),\n tips: Types.boolean(true, { animatable: false }),\n ticks: Types.boolean(true, { animatable: false }),\n tickSize: Types.number(0.16, { min: 0, step: 0.01 }),\n /** Lines across the plane the x and y axes lie in, at each of their ticks. */\n grid: Types.boolean(false, { animatable: false }),\n /** (`gridColor` is the viewport's own reference grid.) */\n gridLineColor: Types.color(\"#374151\"),\n /** A number at each tick. */\n labels: Types.boolean(false, { animatable: false }),\n /** The height of a label's text, in scene units. */\n labelSize: Types.number(0.26, { min: 0.01, step: 0.01 }),\n labelColor: Types.color(AXIS_COLOR),\n fontFamily: Types.text(\"\", { animatable: false }),\n /** A title at the positive end of each axis. */\n xLabel: Types.text(\"x\", { animatable: false }),\n yLabel: Types.text(\"y\", { animatable: false }),\n zLabel: Types.text(\"z\", { animatable: false }),\n};\n\ntype AxesValues = Values<typeof own>;\n\n/** A 3D graph: three axes through a box of graph coordinates, z up, seen through its own camera. Its 3D children sit in graph coordinates. */\nexport const Axes3d = component2d({\n key: \"axes3d\",\n state: { ...Paint.state, ...Flow.state, ...Shapes.corners, ...View3D.state, ...own },\n defaults: { width: \"fill\", height: \"fill\" },\n renamed: View3D.renamed,\n migrate: View3D.migrate,\n commands: {\n ...Paint.commands,\n ...View3D.commands,\n /** Animate the window of values the axes show; everything drawn in them follows. */\n rangeTo: { args: [\"xRange\", \"yRange\", \"zRange\"] },\n },\n allowedChildren: [\"2d\", \"3d\"],\n load: (loader, s) => {\n View3D.load(loader, furnish(s));\n if (s.fontFamily !== \"\") loader.font(s.fontFamily);\n },\n provide: (s) => [provides(GRAPH_3D, graphOfAxes(s))],\n space: (s) => axesSpace(s),\n measure: (measurer, s, children) => Flow.measure(measurer, s, children, Paint.inset(s)),\n layout: (box, s, children) => Flow.layout(box, s, children, Paint.inset(s)),\n render: (ctx, s) => View3D.draw(ctx, s, furnish(s)),\n});\n\nexport type Axes3d = NodeOf<typeof Axes3d>;\n\n/** The axes' own drawing, added to the scene: what `render` draws and `load` declares. */\nfunction furnish(s: AxesValues): (scene: Scene3D) => void {\n return (scene) => scene.draw(furniture(s));\n}\n\n/** The last space worked out for each axes, kept while its ranges and lengths are unchanged. */\nconst spaces = new WeakMap<object, { readonly key: string; readonly space: GraphSpace }>();\n\n/** The coordinates of a 3D graph: what its children's `x`, `y` and `z` are in. */\nfunction axesSpace(s: AxesValues): GraphSpace {\n const { xRange, yRange, zRange, xLength, yLength, zLength } = s;\n const key = [xRange, yRange, zRange, xLength, yLength, zLength].join(\"|\");\n let kept = spaces.get(s);\n if (kept?.key !== key) spaces.set(s, (kept = { key, space: graphSpace(xRange, yRange, zRange, { x: xLength, y: yLength, z: zLength }) }));\n return kept.space;\n}\n\n// One per axes, so the context its subtree holds is the same from frame to frame.\nconst graphs = new WeakMap<object, Graph3D>();\n\nfunction graphOfAxes(s: AxesValues): Graph3D {\n let graph = graphs.get(s);\n if (!graph) graphs.set(s, (graph = { space: () => axesSpace(s) }));\n return graph;\n}\n\n/** The axes, their ticks, numbers and titles, and the grid, in the scene's units. */\nfunction furniture(s: AxesValues): Graphics3D {\n const space = axesSpace(s);\n const g3 = new Graphics3D();\n const ranges: Record<AxisName, Interval> = { x: space.xRange, y: space.yRange, z: space.zRange };\n const lengths: Record<AxisName, number> = { x: s.xLength, y: s.yLength, z: s.zLength };\n const steps: Record<AxisName, number> = { x: s.xStep, y: s.yStep, z: s.zStep };\n const titles: Record<AxisName, string> = { x: s.xLabel, y: s.yLabel, z: s.zLabel };\n // Where each axis is crossed by the other two: their zero, or the nearest end of a range without one.\n const cross: Record<AxisName, number> = {\n x: clamp(0, ranges.x[0], ranges.x[1]),\n y: clamp(0, ranges.y[0], ranges.y[1]),\n z: clamp(0, ranges.z[0], ranges.z[1]),\n };\n const at = (axis: AxisName, value: number, shift: Partial<Record<AxisName, number>> = {}): Vector3 => {\n const point = { ...cross, [axis]: value };\n const local = space.toLocal(point.x, point.y, point.z);\n const moved = space.offset(0, 0, 0);\n for (const key of [\"x\", \"y\", \"z\"] as const) {\n const by = shift[key];\n if (by === undefined) continue;\n // A shift is in scene units, along the graph axis it names.\n if (key === \"x\") moved.z += by;\n else if (key === \"y\") moved.x += by;\n else moved.y += by;\n }\n return { x: local.x + moved.x, y: local.y + moved.y, z: local.z + moved.z };\n };\n\n const { thickness, tickSize } = s;\n const paint = Mat.basic({ color: s.color });\n const style: LabelStyle3D = { size: s.labelSize, color: s.labelColor, fontFamily: s.fontFamily };\n const tipLength = s.tips ? thickness * 9 : 0;\n const marks: Transform3D[] = [];\n const plane: Vector3[] = [];\n\n for (const axis of [\"x\", \"y\", \"z\"] as const) {\n const [min, max] = ranges[axis];\n const length = lengths[axis];\n if (!(max > min) || !(length > 0)) continue;\n\n if (thickness > 0) {\n const from = at(axis, min);\n const to = at(axis, max);\n g3.mesh(Geo.cylinder({ radius: thickness, height: length, segments: [12, 1] }), paint, {\n position: { x: (from.x + to.x) / 2, y: (from.y + to.y) / 2, z: (from.z + to.z) / 2 },\n rotation: ALONG[axis],\n });\n if (s.tips) {\n g3.mesh(Geo.cone({ radius: thickness * 3.2, height: tipLength, segments: [16, 1] }), paint, {\n position: at(axis, max, { [axis]: tipLength / 2 }),\n rotation: ALONG[axis],\n });\n }\n }\n\n const ticks = ticksFor(ranges[axis], steps[axis], length * UNIT_AS_PIXELS);\n const side = TICK_ALONG[axis];\n for (const value of ticks.values) {\n // The crossing is marked by the other axes, and the far end by the tip.\n if (Math.abs(value - cross[axis]) < 1e-9 || (s.tips && Math.abs(value - max) < 1e-9)) continue;\n if (s.ticks && tickSize > 0) marks.push({ position: at(axis, value), rotation: ALONG[side] });\n if (s.labels) {\n drawLabel3D(g3, formatTick(value, ticks.step), at(axis, value, { [side]: -(tickSize / 2 + style.size * 0.8) }), style);\n }\n }\n drawLabel3D(g3, titles[axis], at(axis, max, { [axis]: tipLength + style.size * 0.9 }), style);\n\n if (s.grid && axis !== \"z\") {\n const other = axis === \"x\" ? \"y\" : \"x\";\n for (const value of ticks.values) {\n const a = { x: 0, y: 0, z: cross.z, [axis]: value, [other]: ranges[other][0] };\n const b = { ...a, [other]: ranges[other][1] };\n plane.push(space.toLocal(a.x, a.y, a.z), space.toLocal(b.x, b.y, b.z));\n }\n }\n }\n\n if (marks.length > 0) {\n g3.instances(Geo.cylinder({ radius: Math.max(thickness * 0.7, 0.008), height: tickSize, segments: [8, 1] }), paint, marks);\n }\n if (plane.length > 0) g3.line({ points: plane, segments: true, stroke: { fill: s.gridLineColor } });\n return g3;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/math",
3
- "version": "0.4.0-alpha.0",
3
+ "version": "0.4.1-alpha.0",
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": {
@@ -58,7 +58,7 @@
58
58
  "license": "Apache-2.0",
59
59
  "author": "Motionscript",
60
60
  "peerDependencies": {
61
- "@motionscript/sdk": "^0.4.0-alpha.0"
61
+ "@motionscript/sdk": "^0.4.1-alpha.0"
62
62
  },
63
63
  "dependencies": {
64
64
  "@mathjax/mathjax-newcm-font": "^4.1.1",
@@ -73,8 +73,8 @@
73
73
  "typescript": "^6.0.3",
74
74
  "typescript-eslint": "^8.48.0",
75
75
  "vitest": "^4.1.5",
76
- "@motionscript/core": "0.4.0-alpha.0",
77
- "@motionscript/sdk": "0.4.0-alpha.0"
76
+ "@motionscript/core": "0.4.1-alpha.0",
77
+ "@motionscript/sdk": "0.4.1-alpha.0"
78
78
  },
79
79
  "scripts": {
80
80
  "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json --resolve-full-paths && node ../../../scripts/build-browser.mjs",
@@ -35,6 +35,8 @@ import {
35
35
  type Shadow as _Shadow,
36
36
  type ShadowResolved as _ShadowResolved,
37
37
  type Shadows3D as _Shadows3D,
38
+ type StageLight3D as _StageLight3D,
39
+ type StageLightResolved3D as _StageLightResolved3D,
38
40
  type Stroke as _Stroke,
39
41
  type StrokeResolved as _StrokeResolved,
40
42
  type ToneMapping3D as _ToneMapping3D,
@@ -100,6 +102,8 @@ export const Axes3d = component2d({
100
102
  key: "axes3d",
101
103
  state: { ...Paint.state, ...Flow.state, ...Shapes.corners, ...View3D.state, ...own },
102
104
  defaults: { width: "fill", height: "fill" },
105
+ renamed: View3D.renamed,
106
+ migrate: View3D.migrate,
103
107
  commands: {
104
108
  ...Paint.commands,
105
109
  ...View3D.commands,