@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
package/dist/three/axes3d.js.map
CHANGED
|
@@ -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,GA8BT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EA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C;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 {\r\n component2d,\r\n Flow,\r\n Geo,\r\n Graphics3D,\r\n Mat,\r\n Paint,\r\n provides,\r\n Shapes,\r\n Types,\r\n View3D,\r\n type Canvas3DProps,\r\n type Color,\r\n type NodeOf,\r\n type Transform3D,\r\n type Values,\r\n type Vector3,\r\n type Vector3Input,\r\n // Named so the emitted declaration reaches these through the sdk, not core.\r\n type Alignment as _Alignment,\r\n type CornerRadiusResolved as _CornerRadiusResolved,\r\n type CornerStyleResolved as _CornerStyleResolved,\r\n type Fill as _Fill,\r\n type FillResolved as _FillResolved,\r\n type FlowMode as _FlowMode,\r\n type FlowResolved as _FlowResolved,\r\n type GapSize as _GapSize,\r\n type Node2D as _Node2D,\r\n type Node2DProps as _Node2DProps,\r\n type NormalizedColor as _NormalizedColor,\r\n type PostEffect3D as _PostEffect3D,\r\n type RectCornerRadius as _RectCornerRadius,\r\n type RectCornerStyle as _RectCornerStyle,\r\n type Shadow as _Shadow,\r\n type ShadowResolved as _ShadowResolved,\r\n type Shadows3D as _Shadows3D,\r\n type Stroke as _Stroke,\r\n type StrokeResolved as _StrokeResolved,\r\n type ToneMapping3D as _ToneMapping3D,\r\n type Vector2 as _Vector2,\r\n} from \"@motionscript/sdk\";\r\nimport type { Interval } from \"../kit/coords\";\r\nimport { AXIS_COLOR, lerpInterval, readInterval } from \"../kit/furniture\";\r\nimport { clamp } from \"../kit/geometry\";\r\nimport { formatTick, ticksFor } from \"../kit/ticks\";\r\nimport { drawLabel3D, type LabelStyle3D } from \"./label3d\";\r\nimport { GRAPH_3D, graphSpace, type Graph3D, type GraphSpace } from \"./space\";\r\n\r\nexport interface Axes3dProps extends Canvas3DProps {\r\n xRange?: Interval;\r\n yRange?: Interval;\r\n zRange?: Interval;\r\n xLength?: number;\r\n yLength?: number;\r\n zLength?: number;\r\n xStep?: number;\r\n yStep?: number;\r\n zStep?: number;\r\n color?: Color;\r\n thickness?: number;\r\n tips?: boolean;\r\n ticks?: boolean;\r\n tickSize?: number;\r\n grid?: boolean;\r\n gridLineColor?: Color;\r\n labels?: boolean;\r\n labelSize?: number;\r\n labelColor?: Color;\r\n fontFamily?: string;\r\n xLabel?: string;\r\n yLabel?: string;\r\n zLabel?: string;\r\n}\r\n\r\n/** How many pixels of a 2D axis one scene unit counts as, when an axis picks its own tick spacing. */\r\nconst UNIT_AS_PIXELS = 64;\r\n\r\ntype AxisName = \"x\" | \"y\" | \"z\";\r\n\r\n/** The turn that lays a shape built along the scene's +y along each graph axis. */\r\nconst ALONG: Record<AxisName, Vector3Input> = { x: [90, 0, 0], y: [0, 0, -90], z: [0, 0, 0] };\r\n\r\n/** The graph axis each axis's tick marks lie along. */\r\nconst TICK_ALONG: Record<AxisName, AxisName> = { x: \"y\", y: \"x\", z: \"y\" };\r\n\r\nfunction range(initial: Interval) {\r\n return Types.custom<Interval>(initial, { resolve: readInterval, lerp: lerpInterval });\r\n}\r\n\r\n/** The axes' own entries, beside a 3D canvas's. */\r\nconst own = {\r\n xRange: range([-3, 3]),\r\n yRange: range([-3, 3]),\r\n zRange: range([-2, 2]),\r\n /** How long each axis is drawn, in scene units. */\r\n xLength: Types.number(6, { min: 0.01, step: 0.1 }),\r\n yLength: Types.number(6, { min: 0.01, step: 0.1 }),\r\n zLength: Types.number(4, { min: 0.01, step: 0.1 }),\r\n /** The spacing of each axis's ticks; zero picks a tidy one for the axis's length. */\r\n xStep: Types.number(0, { min: 0 }),\r\n yStep: Types.number(0, { min: 0 }),\r\n zStep: Types.number(0, { min: 0 }),\r\n color: Types.color(AXIS_COLOR),\r\n /** The radius of an axis line, in scene units. */\r\n thickness: Types.number(0.02, { min: 0, step: 0.005 }),\r\n tips: Types.boolean(true, { animatable: false }),\r\n ticks: Types.boolean(true, { animatable: false }),\r\n tickSize: Types.number(0.16, { min: 0, step: 0.01 }),\r\n /** Lines across the plane the x and y axes lie in, at each of their ticks. */\r\n grid: Types.boolean(false, { animatable: false }),\r\n /** (`gridColor` is the viewport's own reference grid.) */\r\n gridLineColor: Types.color(\"#374151\"),\r\n /** A number at each tick. */\r\n labels: Types.boolean(false, { animatable: false }),\r\n /** The height of a label's text, in scene units. */\r\n labelSize: Types.number(0.26, { min: 0.01, step: 0.01 }),\r\n labelColor: Types.color(AXIS_COLOR),\r\n fontFamily: Types.text(\"\", { animatable: false }),\r\n /** A title at the positive end of each axis. */\r\n xLabel: Types.text(\"x\", { animatable: false }),\r\n yLabel: Types.text(\"y\", { animatable: false }),\r\n zLabel: Types.text(\"z\", { animatable: false }),\r\n};\r\n\r\ntype AxesValues = Values<typeof own>;\r\n\r\n/**\r\n * A 3D graph: three axes through a box of graph coordinates, z up, seen through\r\n * a camera of its own, so it stands on a 2D stage as it is, the way `axes2d`\r\n * does. Its 3D children sit in its graph coordinates: a surface, a space curve,\r\n * a point, an arrow, or any 3D node. `orbitTo` swings the camera round it.\r\n */\r\nexport const Axes3d = component2d({\r\n key: \"axes3d\",\r\n state: { ...Paint.state, ...Flow.state, ...Shapes.corners, ...View3D.state, ...own },\r\n defaults: { width: \"fill\", height: \"fill\" },\r\n commands: {\r\n ...Paint.commands,\r\n ...View3D.commands,\r\n /** Animate the window of values the axes show; everything drawn in them follows. */\r\n rangeTo: { args: [\"xRange\", \"yRange\", \"zRange\"] },\r\n },\r\n allowedChildren: [\"2d\", \"3d\"],\r\n load: (loader, s) => {\r\n View3D.load(loader);\r\n if (s.fontFamily !== \"\") loader.font(s.fontFamily);\r\n },\r\n provide: (s) => [provides(GRAPH_3D, graphOfAxes(s))],\r\n space: (s) => axesSpace(s),\r\n measure: (measurer, s, children) => Flow.measure(measurer, s, children, Paint.inset(s)),\r\n layout: (box, s, children) => Flow.layout(box, s, children, Paint.inset(s)),\r\n render: (ctx, s) => View3D.draw(ctx, s, (scene) => scene.draw(furniture(s))),\r\n});\r\n\r\nexport type Axes3d = NodeOf<typeof Axes3d>;\r\n\r\n/** The last space worked out for each axes, kept while its ranges and lengths are unchanged. */\r\nconst spaces = new WeakMap<object, { readonly key: string; readonly space: GraphSpace }>();\r\n\r\n/** The coordinates of a 3D graph: what its children's `x`, `y` and `z` are in. */\r\nfunction axesSpace(s: AxesValues): GraphSpace {\r\n const { xRange, yRange, zRange, xLength, yLength, zLength } = s;\r\n const key = [xRange, yRange, zRange, xLength, yLength, zLength].join(\"|\");\r\n let kept = spaces.get(s);\r\n if (kept?.key !== key) spaces.set(s, (kept = { key, space: graphSpace(xRange, yRange, zRange, { x: xLength, y: yLength, z: zLength }) }));\r\n return kept.space;\r\n}\r\n\r\n// One per axes, so the context its subtree holds is the same from frame to frame.\r\nconst graphs = new WeakMap<object, Graph3D>();\r\n\r\nfunction graphOfAxes(s: AxesValues): Graph3D {\r\n let graph = graphs.get(s);\r\n if (!graph) graphs.set(s, (graph = { space: () => axesSpace(s) }));\r\n return graph;\r\n}\r\n\r\n/** The axes, their ticks, numbers and titles, and the grid, in the scene's units. */\r\nfunction furniture(s: AxesValues): Graphics3D {\r\n const space = axesSpace(s);\r\n const g3 = new Graphics3D();\r\n const ranges: Record<AxisName, Interval> = { x: space.xRange, y: space.yRange, z: space.zRange };\r\n const lengths: Record<AxisName, number> = { x: s.xLength, y: s.yLength, z: s.zLength };\r\n const steps: Record<AxisName, number> = { x: s.xStep, y: s.yStep, z: s.zStep };\r\n const titles: Record<AxisName, string> = { x: s.xLabel, y: s.yLabel, z: s.zLabel };\r\n // Where each axis is crossed by the other two: their zero, or the nearest end of a range without one.\r\n const cross: Record<AxisName, number> = {\r\n x: clamp(0, ranges.x[0], ranges.x[1]),\r\n y: clamp(0, ranges.y[0], ranges.y[1]),\r\n z: clamp(0, ranges.z[0], ranges.z[1]),\r\n };\r\n const at = (axis: AxisName, value: number, shift: Partial<Record<AxisName, number>> = {}): Vector3 => {\r\n const point = { ...cross, [axis]: value };\r\n const local = space.toLocal(point.x, point.y, point.z);\r\n const moved = space.offset(0, 0, 0);\r\n for (const key of [\"x\", \"y\", \"z\"] as const) {\r\n const by = shift[key];\r\n if (by === undefined) continue;\r\n // A shift is in scene units, along the graph axis it names.\r\n if (key === \"x\") moved.z += by;\r\n else if (key === \"y\") moved.x += by;\r\n else moved.y += by;\r\n }\r\n return { x: local.x + moved.x, y: local.y + moved.y, z: local.z + moved.z };\r\n };\r\n\r\n const { thickness, tickSize } = s;\r\n const paint = Mat.basic({ color: s.color });\r\n const style: LabelStyle3D = { size: s.labelSize, color: s.labelColor, fontFamily: s.fontFamily };\r\n const tipLength = s.tips ? thickness * 9 : 0;\r\n const marks: Transform3D[] = [];\r\n const plane: Vector3[] = [];\r\n\r\n for (const axis of [\"x\", \"y\", \"z\"] as const) {\r\n const [min, max] = ranges[axis];\r\n const length = lengths[axis];\r\n if (!(max > min) || !(length > 0)) continue;\r\n\r\n if (thickness > 0) {\r\n const from = at(axis, min);\r\n const to = at(axis, max);\r\n g3.mesh(Geo.cylinder({ radius: thickness, height: length, segments: [12, 1] }), paint, {\r\n position: { x: (from.x + to.x) / 2, y: (from.y + to.y) / 2, z: (from.z + to.z) / 2 },\r\n rotation: ALONG[axis],\r\n });\r\n if (s.tips) {\r\n g3.mesh(Geo.cone({ radius: thickness * 3.2, height: tipLength, segments: [16, 1] }), paint, {\r\n position: at(axis, max, { [axis]: tipLength / 2 }),\r\n rotation: ALONG[axis],\r\n });\r\n }\r\n }\r\n\r\n const ticks = ticksFor(ranges[axis], steps[axis], length * UNIT_AS_PIXELS);\r\n const side = TICK_ALONG[axis];\r\n for (const value of ticks.values) {\r\n // The crossing is marked by the other axes, and the far end by the tip.\r\n if (Math.abs(value - cross[axis]) < 1e-9 || (s.tips && Math.abs(value - max) < 1e-9)) continue;\r\n if (s.ticks && tickSize > 0) marks.push({ position: at(axis, value), rotation: ALONG[side] });\r\n if (s.labels) {\r\n drawLabel3D(g3, formatTick(value, ticks.step), at(axis, value, { [side]: -(tickSize / 2 + style.size * 0.8) }), style);\r\n }\r\n }\r\n drawLabel3D(g3, titles[axis], at(axis, max, { [axis]: tipLength + style.size * 0.9 }), style);\r\n\r\n if (s.grid && axis !== \"z\") {\r\n const other = axis === \"x\" ? \"y\" : \"x\";\r\n for (const value of ticks.values) {\r\n const a = { x: 0, y: 0, z: cross.z, [axis]: value, [other]: ranges[other][0] };\r\n const b = { ...a, [other]: ranges[other][1] };\r\n plane.push(space.toLocal(a.x, a.y, a.z), space.toLocal(b.x, b.y, b.z));\r\n }\r\n }\r\n }\r\n\r\n if (marks.length > 0) {\r\n g3.instances(Geo.cylinder({ radius: Math.max(thickness * 0.7, 0.008), height: tickSize, segments: [8, 1] }), paint, marks);\r\n }\r\n if (plane.length > 0) g3.line({ points: plane, segments: true, stroke: { fill: s.gridLineColor } });\r\n return g3;\r\n}\r\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,GA+BT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC1E,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;AA4B9E,sGAAsG;AACtG,MAAM,cAAc,GAAG,EAAE,CAAC;AAI1B,mFAAmF;AACnF,MAAM,KAAK,GAAmC,EAAE,CAAC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\n Paint,\r\n provides,\r\n Shapes,\r\n Types,\r\n View3D,\r\n type Canvas3DProps,\r\n type Color,\r\n type NodeOf,\r\n type Scene3D,\r\n type Transform3D,\r\n type Values,\r\n type Vector3,\r\n type Vector3Input,\r\n // Named so the emitted declaration reaches these through the sdk, not core.\r\n type Alignment as _Alignment,\r\n type CornerRadiusResolved as _CornerRadiusResolved,\r\n type CornerStyleResolved as _CornerStyleResolved,\r\n type Fill as _Fill,\r\n type FillResolved as _FillResolved,\r\n type FlowMode as _FlowMode,\r\n type FlowResolved as _FlowResolved,\r\n type GapSize as _GapSize,\r\n type Node2D as _Node2D,\r\n type Node2DProps as _Node2DProps,\r\n type NormalizedColor as _NormalizedColor,\r\n type PostEffect3D as _PostEffect3D,\r\n type RectCornerRadius as _RectCornerRadius,\r\n type RectCornerStyle as _RectCornerStyle,\r\n type Shadow as _Shadow,\r\n type ShadowResolved as _ShadowResolved,\r\n type Shadows3D as _Shadows3D,\r\n type Stroke as _Stroke,\r\n type StrokeResolved as _StrokeResolved,\r\n type ToneMapping3D as _ToneMapping3D,\r\n type Vector2 as _Vector2,\r\n} from \"@motionscript/sdk\";\r\nimport type { Interval } from \"../kit/coords\";\r\nimport { AXIS_COLOR, lerpInterval, readInterval } from \"../kit/furniture\";\r\nimport { clamp } from \"../kit/geometry\";\r\nimport { formatTick, ticksFor } from \"../kit/ticks\";\r\nimport { drawLabel3D, type LabelStyle3D } from \"./label3d\";\r\nimport { GRAPH_3D, graphSpace, type Graph3D, type GraphSpace } from \"./space\";\r\n\r\nexport interface Axes3dProps extends Canvas3DProps {\r\n xRange?: Interval;\r\n yRange?: Interval;\r\n zRange?: Interval;\r\n xLength?: number;\r\n yLength?: number;\r\n zLength?: number;\r\n xStep?: number;\r\n yStep?: number;\r\n zStep?: number;\r\n color?: Color;\r\n thickness?: number;\r\n tips?: boolean;\r\n ticks?: boolean;\r\n tickSize?: number;\r\n grid?: boolean;\r\n gridLineColor?: Color;\r\n labels?: boolean;\r\n labelSize?: number;\r\n labelColor?: Color;\r\n fontFamily?: string;\r\n xLabel?: string;\r\n yLabel?: string;\r\n zLabel?: string;\r\n}\r\n\r\n/** How many pixels of a 2D axis one scene unit counts as, when an axis picks its own tick spacing. */\r\nconst UNIT_AS_PIXELS = 64;\r\n\r\ntype AxisName = \"x\" | \"y\" | \"z\";\r\n\r\n/** The turn that lays a shape built along the scene's +y along each graph axis. */\r\nconst ALONG: Record<AxisName, Vector3Input> = { x: [90, 0, 0], y: [0, 0, -90], z: [0, 0, 0] };\r\n\r\n/** The graph axis each axis's tick marks lie along. */\r\nconst TICK_ALONG: Record<AxisName, AxisName> = { x: \"y\", y: \"x\", z: \"y\" };\r\n\r\nfunction range(initial: Interval) {\r\n return Types.custom<Interval>(initial, { resolve: readInterval, lerp: lerpInterval });\r\n}\r\n\r\n/** The axes' own entries, beside a 3D canvas's. */\r\nconst own = {\r\n xRange: range([-3, 3]),\r\n yRange: range([-3, 3]),\r\n zRange: range([-2, 2]),\r\n /** How long each axis is drawn, in scene units. */\r\n xLength: Types.number(6, { min: 0.01, step: 0.1 }),\r\n yLength: Types.number(6, { min: 0.01, step: 0.1 }),\r\n zLength: Types.number(4, { min: 0.01, step: 0.1 }),\r\n /** The spacing of each axis's ticks; zero picks a tidy one for the axis's length. */\r\n xStep: Types.number(0, { min: 0 }),\r\n yStep: Types.number(0, { min: 0 }),\r\n zStep: Types.number(0, { min: 0 }),\r\n color: Types.color(AXIS_COLOR),\r\n /** The radius of an axis line, in scene units. */\r\n thickness: Types.number(0.02, { min: 0, step: 0.005 }),\r\n tips: Types.boolean(true, { animatable: false }),\r\n ticks: Types.boolean(true, { animatable: false }),\r\n tickSize: Types.number(0.16, { min: 0, step: 0.01 }),\r\n /** Lines across the plane the x and y axes lie in, at each of their ticks. */\r\n grid: Types.boolean(false, { animatable: false }),\r\n /** (`gridColor` is the viewport's own reference grid.) */\r\n gridLineColor: Types.color(\"#374151\"),\r\n /** A number at each tick. */\r\n labels: Types.boolean(false, { animatable: false }),\r\n /** The height of a label's text, in scene units. */\r\n labelSize: Types.number(0.26, { min: 0.01, step: 0.01 }),\r\n labelColor: Types.color(AXIS_COLOR),\r\n fontFamily: Types.text(\"\", { animatable: false }),\r\n /** A title at the positive end of each axis. */\r\n xLabel: Types.text(\"x\", { animatable: false }),\r\n yLabel: Types.text(\"y\", { animatable: false }),\r\n zLabel: Types.text(\"z\", { animatable: false }),\r\n};\r\n\r\ntype AxesValues = Values<typeof own>;\r\n\r\n/**\r\n * A 3D graph: three axes through a box of graph coordinates, z up, seen through\r\n * a camera of its own, so it stands on a 2D stage as it is, the way `axes2d`\r\n * does. Its 3D children sit in its graph coordinates: a surface, a space curve,\r\n * a point, an arrow, or any 3D node. `orbitTo` swings the camera round it.\r\n */\r\nexport const Axes3d = component2d({\r\n key: \"axes3d\",\r\n state: { ...Paint.state, ...Flow.state, ...Shapes.corners, ...View3D.state, ...own },\r\n defaults: { width: \"fill\", height: \"fill\" },\r\n commands: {\r\n ...Paint.commands,\r\n ...View3D.commands,\r\n /** Animate the window of values the axes show; everything drawn in them follows. */\r\n rangeTo: { args: [\"xRange\", \"yRange\", \"zRange\"] },\r\n },\r\n allowedChildren: [\"2d\", \"3d\"],\r\n load: (loader, s) => {\r\n View3D.load(loader, furnish(s));\r\n if (s.fontFamily !== \"\") loader.font(s.fontFamily);\r\n },\r\n provide: (s) => [provides(GRAPH_3D, graphOfAxes(s))],\r\n space: (s) => axesSpace(s),\r\n measure: (measurer, s, children) => Flow.measure(measurer, s, children, Paint.inset(s)),\r\n layout: (box, s, children) => Flow.layout(box, s, children, Paint.inset(s)),\r\n render: (ctx, s) => View3D.draw(ctx, s, furnish(s)),\r\n});\r\n\r\nexport type Axes3d = NodeOf<typeof Axes3d>;\r\n\r\n/** The axes' own drawing, added to the scene: what `render` draws and `load` declares. */\r\nfunction furnish(s: AxesValues): (scene: Scene3D) => void {\r\n return (scene) => scene.draw(furniture(s));\r\n}\r\n\r\n/** The last space worked out for each axes, kept while its ranges and lengths are unchanged. */\r\nconst spaces = new WeakMap<object, { readonly key: string; readonly space: GraphSpace }>();\r\n\r\n/** The coordinates of a 3D graph: what its children's `x`, `y` and `z` are in. */\r\nfunction axesSpace(s: AxesValues): GraphSpace {\r\n const { xRange, yRange, zRange, xLength, yLength, zLength } = s;\r\n const key = [xRange, yRange, zRange, xLength, yLength, zLength].join(\"|\");\r\n let kept = spaces.get(s);\r\n if (kept?.key !== key) spaces.set(s, (kept = { key, space: graphSpace(xRange, yRange, zRange, { x: xLength, y: yLength, z: zLength }) }));\r\n return kept.space;\r\n}\r\n\r\n// One per axes, so the context its subtree holds is the same from frame to frame.\r\nconst graphs = new WeakMap<object, Graph3D>();\r\n\r\nfunction graphOfAxes(s: AxesValues): Graph3D {\r\n let graph = graphs.get(s);\r\n if (!graph) graphs.set(s, (graph = { space: () => axesSpace(s) }));\r\n return graph;\r\n}\r\n\r\n/** The axes, their ticks, numbers and titles, and the grid, in the scene's units. */\r\nfunction furniture(s: AxesValues): Graphics3D {\r\n const space = axesSpace(s);\r\n const g3 = new Graphics3D();\r\n const ranges: Record<AxisName, Interval> = { x: space.xRange, y: space.yRange, z: space.zRange };\r\n const lengths: Record<AxisName, number> = { x: s.xLength, y: s.yLength, z: s.zLength };\r\n const steps: Record<AxisName, number> = { x: s.xStep, y: s.yStep, z: s.zStep };\r\n const titles: Record<AxisName, string> = { x: s.xLabel, y: s.yLabel, z: s.zLabel };\r\n // Where each axis is crossed by the other two: their zero, or the nearest end of a range without one.\r\n const cross: Record<AxisName, number> = {\r\n x: clamp(0, ranges.x[0], ranges.x[1]),\r\n y: clamp(0, ranges.y[0], ranges.y[1]),\r\n z: clamp(0, ranges.z[0], ranges.z[1]),\r\n };\r\n const at = (axis: AxisName, value: number, shift: Partial<Record<AxisName, number>> = {}): Vector3 => {\r\n const point = { ...cross, [axis]: value };\r\n const local = space.toLocal(point.x, point.y, point.z);\r\n const moved = space.offset(0, 0, 0);\r\n for (const key of [\"x\", \"y\", \"z\"] as const) {\r\n const by = shift[key];\r\n if (by === undefined) continue;\r\n // A shift is in scene units, along the graph axis it names.\r\n if (key === \"x\") moved.z += by;\r\n else if (key === \"y\") moved.x += by;\r\n else moved.y += by;\r\n }\r\n return { x: local.x + moved.x, y: local.y + moved.y, z: local.z + moved.z };\r\n };\r\n\r\n const { thickness, tickSize } = s;\r\n const paint = Mat.basic({ color: s.color });\r\n const style: LabelStyle3D = { size: s.labelSize, color: s.labelColor, fontFamily: s.fontFamily };\r\n const tipLength = s.tips ? thickness * 9 : 0;\r\n const marks: Transform3D[] = [];\r\n const plane: Vector3[] = [];\r\n\r\n for (const axis of [\"x\", \"y\", \"z\"] as const) {\r\n const [min, max] = ranges[axis];\r\n const length = lengths[axis];\r\n if (!(max > min) || !(length > 0)) continue;\r\n\r\n if (thickness > 0) {\r\n const from = at(axis, min);\r\n const to = at(axis, max);\r\n g3.mesh(Geo.cylinder({ radius: thickness, height: length, segments: [12, 1] }), paint, {\r\n position: { x: (from.x + to.x) / 2, y: (from.y + to.y) / 2, z: (from.z + to.z) / 2 },\r\n rotation: ALONG[axis],\r\n });\r\n if (s.tips) {\r\n g3.mesh(Geo.cone({ radius: thickness * 3.2, height: tipLength, segments: [16, 1] }), paint, {\r\n position: at(axis, max, { [axis]: tipLength / 2 }),\r\n rotation: ALONG[axis],\r\n });\r\n }\r\n }\r\n\r\n const ticks = ticksFor(ranges[axis], steps[axis], length * UNIT_AS_PIXELS);\r\n const side = TICK_ALONG[axis];\r\n for (const value of ticks.values) {\r\n // The crossing is marked by the other axes, and the far end by the tip.\r\n if (Math.abs(value - cross[axis]) < 1e-9 || (s.tips && Math.abs(value - max) < 1e-9)) continue;\r\n if (s.ticks && tickSize > 0) marks.push({ position: at(axis, value), rotation: ALONG[side] });\r\n if (s.labels) {\r\n drawLabel3D(g3, formatTick(value, ticks.step), at(axis, value, { [side]: -(tickSize / 2 + style.size * 0.8) }), style);\r\n }\r\n }\r\n drawLabel3D(g3, titles[axis], at(axis, max, { [axis]: tipLength + style.size * 0.9 }), style);\r\n\r\n if (s.grid && axis !== \"z\") {\r\n const other = axis === \"x\" ? \"y\" : \"x\";\r\n for (const value of ticks.values) {\r\n const a = { x: 0, y: 0, z: cross.z, [axis]: value, [other]: ranges[other][0] };\r\n const b = { ...a, [other]: ranges[other][1] };\r\n plane.push(space.toLocal(a.x, a.y, a.z), space.toLocal(b.x, b.y, b.z));\r\n }\r\n }\r\n }\r\n\r\n if (marks.length > 0) {\r\n g3.instances(Geo.cylinder({ radius: Math.max(thickness * 0.7, 0.008), height: tickSize, segments: [8, 1] }), paint, marks);\r\n }\r\n if (plane.length > 0) g3.line({ points: plane, segments: true, stroke: { fill: s.gridLineColor } });\r\n return g3;\r\n}\r\n"]}
|
|
@@ -25,25 +25,25 @@ export declare const CurvePlot3d: import("@motionscript/sdk").Component<"curvePl
|
|
|
25
25
|
start: import("@motionscript/sdk").Type<number, number, false>;
|
|
26
26
|
end: import("@motionscript/sdk").Type<number, number, false>;
|
|
27
27
|
graph: import("@motionscript/sdk").Type<import("./space.js").Graph3D | null, import("./space.js").Graph3D | null, true>;
|
|
28
|
-
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
29
28
|
opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
30
29
|
blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
30
|
+
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
31
|
+
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
32
|
+
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
33
|
+
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
34
|
+
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
35
|
+
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
36
|
+
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
37
|
+
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
31
38
|
geometry: import("@motionscript/sdk").Type<Geometry3D | undefined, Geometry3D | undefined, false>;
|
|
32
39
|
material: import("@motionscript/sdk").Type<_Material3D | readonly _Material3D[] | undefined, _Material3D | readonly _Material3D[] | undefined, false>;
|
|
33
40
|
roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
34
41
|
metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
35
42
|
emission: import("@motionscript/sdk").Type<_Color | undefined, _NormalizedColor | undefined, false>;
|
|
36
43
|
emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
37
|
-
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
38
44
|
roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
39
45
|
metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
40
|
-
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
41
|
-
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
42
|
-
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
43
|
-
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
44
46
|
shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
45
|
-
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
46
|
-
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
47
47
|
unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
48
48
|
}>, {
|
|
49
49
|
readonly morphTo: readonly ["expression"];
|
|
@@ -63,26 +63,64 @@ export declare const CurvePlot3d: import("@motionscript/sdk").Component<"curvePl
|
|
|
63
63
|
start: import("@motionscript/sdk").Type<number, number, false>;
|
|
64
64
|
end: import("@motionscript/sdk").Type<number, number, false>;
|
|
65
65
|
graph: import("@motionscript/sdk").Type<import("./space.js").Graph3D | null, import("./space.js").Graph3D | null, true>;
|
|
66
|
-
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
67
66
|
opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
68
67
|
blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
68
|
+
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
69
|
+
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
70
|
+
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
71
|
+
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
72
|
+
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
73
|
+
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
74
|
+
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
75
|
+
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
69
76
|
geometry: import("@motionscript/sdk").Type<Geometry3D | undefined, Geometry3D | undefined, false>;
|
|
70
77
|
material: import("@motionscript/sdk").Type<_Material3D | readonly _Material3D[] | undefined, _Material3D | readonly _Material3D[] | undefined, false>;
|
|
71
78
|
roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
72
79
|
metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
73
80
|
emission: import("@motionscript/sdk").Type<_Color | undefined, _NormalizedColor | undefined, false>;
|
|
74
81
|
emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
75
|
-
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
76
82
|
roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
77
83
|
metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
78
|
-
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
79
|
-
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
80
|
-
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
81
|
-
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
82
84
|
shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
85
|
+
unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
86
|
+
}>, import("@motionscript/sdk").BuiltNode<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Transform3DState, {
|
|
87
|
+
expression: import("@motionscript/sdk").Type<string | PlotSource, PlotSource, false>;
|
|
88
|
+
/** The span of `t` that is drawn; 0 to 1 when left out. */
|
|
89
|
+
domain: import("@motionscript/sdk").Type<Interval | null, Interval | null, false>;
|
|
90
|
+
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
91
|
+
/** How many points the curve is drawn through. */
|
|
92
|
+
samples: import("@motionscript/sdk").Type<number, number, false>;
|
|
93
|
+
/** The radius of the line, in scene units. */
|
|
94
|
+
thickness: import("@motionscript/sdk").Type<number, number, false>;
|
|
95
|
+
/** The part of the curve that is drawn, as shares of its length in `t`. */
|
|
96
|
+
start: import("@motionscript/sdk").Type<number, number, false>;
|
|
97
|
+
end: import("@motionscript/sdk").Type<number, number, false>;
|
|
98
|
+
graph: import("@motionscript/sdk").Type<import("./space.js").Graph3D | null, import("./space.js").Graph3D | null, true>;
|
|
99
|
+
opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
100
|
+
blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
101
|
+
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
83
102
|
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
103
|
+
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
84
104
|
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
105
|
+
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
106
|
+
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
107
|
+
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
108
|
+
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
109
|
+
geometry: import("@motionscript/sdk").Type<Geometry3D | undefined, Geometry3D | undefined, false>;
|
|
110
|
+
material: import("@motionscript/sdk").Type<_Material3D | readonly _Material3D[] | undefined, _Material3D | readonly _Material3D[] | undefined, false>;
|
|
111
|
+
roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
112
|
+
metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
113
|
+
emission: import("@motionscript/sdk").Type<_Color | undefined, _NormalizedColor | undefined, false>;
|
|
114
|
+
emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
115
|
+
roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
116
|
+
metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
117
|
+
shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
85
118
|
unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
86
|
-
}
|
|
119
|
+
}>, {
|
|
120
|
+
readonly morphTo: readonly ["expression"];
|
|
121
|
+
readonly paramsTo: readonly ["params"];
|
|
122
|
+
readonly domainTo: readonly ["domain"];
|
|
123
|
+
readonly progressTo: readonly ["start", "end"];
|
|
124
|
+
}, _Node3D<_Node3DProps>>>>;
|
|
87
125
|
export type CurvePlot3d = NodeOf<typeof CurvePlot3d>;
|
|
88
126
|
//# sourceMappingURL=curve-plot3d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curve-plot3d.d.ts","sourceRoot":"","sources":["../../src/three/curve-plot3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,MAAM,EAIX,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,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;AAC3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,OAAO,EAAgD,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAI9F,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACjD,UAAU,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACjC,MAAM,CAAC,EAAE,QAAQ,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EAAE,eAAe,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAwBD,iFAAiF;AACjF,eAAO,MAAM,WAAW;;IAhBpB,2DAA2D;;;IAG3D,kDAAkD;;IAElD,8CAA8C;;IAE9C,2EAA2E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAP3E,2DAA2D;;;IAG3D,kDAAkD;;IAElD,8CAA8C;;IAE9C,2EAA2E;;;;;;;;;;;;;;;;;;;;;;;;;;IAP3E,2DAA2D;;;IAG3D,kDAAkD;;IAElD,8CAA8C;;IAE9C,2EAA2E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAwB7E,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -18,25 +18,25 @@ export declare const PlotPoint3d: import("@motionscript/sdk").Component<"plotPoi
|
|
|
18
18
|
readonly labelSize: import("@motionscript/sdk").Type<number, number, false>;
|
|
19
19
|
readonly labelColor: import("@motionscript/sdk").Type<Color, _NormalizedColor, false>;
|
|
20
20
|
readonly fontFamily: import("@motionscript/sdk").Type<string, string, false>;
|
|
21
|
-
readonly fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
22
21
|
readonly opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
23
22
|
readonly blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
23
|
+
readonly fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
24
|
+
readonly faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
25
|
+
readonly wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
26
|
+
readonly vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
27
|
+
readonly alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
28
|
+
readonly aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
29
|
+
readonly normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
30
|
+
readonly envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
24
31
|
readonly geometry: import("@motionscript/sdk").Type<_Geometry3D | undefined, _Geometry3D | undefined, false>;
|
|
25
32
|
readonly material: import("@motionscript/sdk").Type<_Material3D | readonly _Material3D[] | undefined, _Material3D | readonly _Material3D[] | undefined, false>;
|
|
26
33
|
readonly roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
27
34
|
readonly metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
28
35
|
readonly emission: import("@motionscript/sdk").Type<Color | undefined, _NormalizedColor | undefined, false>;
|
|
29
36
|
readonly emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
30
|
-
readonly normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
31
37
|
readonly roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
32
38
|
readonly metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
33
|
-
readonly aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
34
|
-
readonly alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
35
|
-
readonly envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
36
|
-
readonly wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
37
39
|
readonly shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
38
|
-
readonly faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
39
|
-
readonly vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
40
40
|
readonly unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
41
41
|
}>, {}, null, _Node3D<_Node3DProps>, import("@motionscript/sdk").CallProps3D<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Transform3DState, {
|
|
42
42
|
/** In scene units, so a point is the same size whatever the axes show. */
|
|
@@ -46,26 +46,54 @@ export declare const PlotPoint3d: import("@motionscript/sdk").Component<"plotPoi
|
|
|
46
46
|
readonly labelSize: import("@motionscript/sdk").Type<number, number, false>;
|
|
47
47
|
readonly labelColor: import("@motionscript/sdk").Type<Color, _NormalizedColor, false>;
|
|
48
48
|
readonly fontFamily: import("@motionscript/sdk").Type<string, string, false>;
|
|
49
|
-
readonly fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
50
49
|
readonly opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
51
50
|
readonly blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
51
|
+
readonly fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
52
|
+
readonly faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
53
|
+
readonly wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
54
|
+
readonly vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
55
|
+
readonly alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
56
|
+
readonly aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
57
|
+
readonly normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
58
|
+
readonly envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
52
59
|
readonly geometry: import("@motionscript/sdk").Type<_Geometry3D | undefined, _Geometry3D | undefined, false>;
|
|
53
60
|
readonly material: import("@motionscript/sdk").Type<_Material3D | readonly _Material3D[] | undefined, _Material3D | readonly _Material3D[] | undefined, false>;
|
|
54
61
|
readonly roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
55
62
|
readonly metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
56
63
|
readonly emission: import("@motionscript/sdk").Type<Color | undefined, _NormalizedColor | undefined, false>;
|
|
57
64
|
readonly emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
58
|
-
readonly normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
59
65
|
readonly roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
60
66
|
readonly metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
61
|
-
readonly aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
62
|
-
readonly alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
63
|
-
readonly envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
64
|
-
readonly wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
65
67
|
readonly shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
68
|
+
readonly unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
69
|
+
}>, import("@motionscript/sdk").BuiltNode<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Transform3DState, {
|
|
70
|
+
/** In scene units, so a point is the same size whatever the axes show. */
|
|
71
|
+
readonly radius: import("@motionscript/sdk").Type<number, number, false>;
|
|
72
|
+
readonly label: import("@motionscript/sdk").Type<string, string, false>;
|
|
73
|
+
/** The height of the label's text, in scene units. */
|
|
74
|
+
readonly labelSize: import("@motionscript/sdk").Type<number, number, false>;
|
|
75
|
+
readonly labelColor: import("@motionscript/sdk").Type<Color, _NormalizedColor, false>;
|
|
76
|
+
readonly fontFamily: import("@motionscript/sdk").Type<string, string, false>;
|
|
77
|
+
readonly opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
78
|
+
readonly blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
79
|
+
readonly fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
66
80
|
readonly faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
81
|
+
readonly wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
67
82
|
readonly vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
83
|
+
readonly alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
84
|
+
readonly aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
85
|
+
readonly normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
86
|
+
readonly envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
87
|
+
readonly geometry: import("@motionscript/sdk").Type<_Geometry3D | undefined, _Geometry3D | undefined, false>;
|
|
88
|
+
readonly material: import("@motionscript/sdk").Type<_Material3D | readonly _Material3D[] | undefined, _Material3D | readonly _Material3D[] | undefined, false>;
|
|
89
|
+
readonly roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
90
|
+
readonly metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
91
|
+
readonly emission: import("@motionscript/sdk").Type<Color | undefined, _NormalizedColor | undefined, false>;
|
|
92
|
+
readonly emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
93
|
+
readonly roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
94
|
+
readonly metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
95
|
+
readonly shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
68
96
|
readonly unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
69
|
-
}
|
|
97
|
+
}>, {}, _Node3D<_Node3DProps>>>>;
|
|
70
98
|
export type PlotPoint3d = NodeOf<typeof PlotPoint3d>;
|
|
71
99
|
//# sourceMappingURL=plot-point3d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plot-point3d.d.ts","sourceRoot":"","sources":["../../src/three/plot-point3d.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,MAAM,EAEX,KAAK,OAAO,IAAI,QAAQ,EAExB,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,gBAAiB,SAAQ,WAAW;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,UAAU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,25 @@ declare const state: {
|
|
|
34
34
|
/** The opacity of the surface's shadow, laid flat on the floor of the axes and coloured by height; zero draws none. */
|
|
35
35
|
floorShadow: import("@motionscript/sdk").Type<number, number, false>;
|
|
36
36
|
graph: import("@motionscript/sdk").Type<import("./space.js").Graph3D | null, import("./space.js").Graph3D | null, true>;
|
|
37
|
-
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
38
37
|
opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
39
38
|
blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
39
|
+
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
40
|
+
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
41
|
+
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
42
|
+
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
43
|
+
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
44
|
+
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
45
|
+
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
46
|
+
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
40
47
|
geometry: import("@motionscript/sdk").Type<Geometry3D | undefined, Geometry3D | undefined, false>;
|
|
41
48
|
material: import("@motionscript/sdk").Type<Material3D | readonly Material3D[] | undefined, Material3D | readonly Material3D[] | undefined, false>;
|
|
42
49
|
roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
43
50
|
metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
44
51
|
emission: import("@motionscript/sdk").Type<Color | undefined, NormalizedColor | undefined, false>;
|
|
45
52
|
emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
46
|
-
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
47
53
|
roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
48
54
|
metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
49
|
-
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
50
|
-
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
51
|
-
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
52
|
-
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
53
55
|
shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
54
|
-
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
55
|
-
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
56
56
|
unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
57
57
|
};
|
|
58
58
|
/** What a surface is drawn from: its own entries, as its node and its helpers read them. */
|
|
@@ -86,25 +86,25 @@ export declare const SurfacePlot3d: import("@motionscript/sdk").Component<"surfa
|
|
|
86
86
|
/** The opacity of the surface's shadow, laid flat on the floor of the axes and coloured by height; zero draws none. */
|
|
87
87
|
floorShadow: import("@motionscript/sdk").Type<number, number, false>;
|
|
88
88
|
graph: import("@motionscript/sdk").Type<import("./space.js").Graph3D | null, import("./space.js").Graph3D | null, true>;
|
|
89
|
-
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
90
89
|
opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
91
90
|
blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
91
|
+
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
92
|
+
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
93
|
+
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
94
|
+
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
95
|
+
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
96
|
+
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
97
|
+
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
98
|
+
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
92
99
|
geometry: import("@motionscript/sdk").Type<Geometry3D | undefined, Geometry3D | undefined, false>;
|
|
93
100
|
material: import("@motionscript/sdk").Type<Material3D | readonly Material3D[] | undefined, Material3D | readonly Material3D[] | undefined, false>;
|
|
94
101
|
roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
95
102
|
metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
96
103
|
emission: import("@motionscript/sdk").Type<Color | undefined, NormalizedColor | undefined, false>;
|
|
97
104
|
emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
98
|
-
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
99
105
|
roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
100
106
|
metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
101
|
-
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
102
|
-
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
103
|
-
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
104
|
-
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
105
107
|
shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
106
|
-
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
107
|
-
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
108
108
|
unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
109
109
|
}>, {
|
|
110
110
|
readonly morphTo: readonly ["expression"];
|
|
@@ -131,27 +131,72 @@ export declare const SurfacePlot3d: import("@motionscript/sdk").Component<"surfa
|
|
|
131
131
|
/** The opacity of the surface's shadow, laid flat on the floor of the axes and coloured by height; zero draws none. */
|
|
132
132
|
floorShadow: import("@motionscript/sdk").Type<number, number, false>;
|
|
133
133
|
graph: import("@motionscript/sdk").Type<import("./space.js").Graph3D | null, import("./space.js").Graph3D | null, true>;
|
|
134
|
-
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
135
134
|
opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
136
135
|
blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
136
|
+
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
137
|
+
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
138
|
+
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
139
|
+
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
140
|
+
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
141
|
+
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
142
|
+
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
143
|
+
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
137
144
|
geometry: import("@motionscript/sdk").Type<Geometry3D | undefined, Geometry3D | undefined, false>;
|
|
138
145
|
material: import("@motionscript/sdk").Type<Material3D | readonly Material3D[] | undefined, Material3D | readonly Material3D[] | undefined, false>;
|
|
139
146
|
roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
140
147
|
metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
141
148
|
emission: import("@motionscript/sdk").Type<Color | undefined, NormalizedColor | undefined, false>;
|
|
142
149
|
emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
143
|
-
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
144
150
|
roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
145
151
|
metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
146
|
-
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
147
|
-
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
148
|
-
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
149
|
-
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
150
152
|
shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
153
|
+
unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
154
|
+
}>, import("@motionscript/sdk").BuiltNode<import("@motionscript/sdk").Merge<import("@motionscript/sdk").Transform3DState, {
|
|
155
|
+
expression: import("@motionscript/sdk").Type<string | PlotSource, PlotSource, false>;
|
|
156
|
+
/**
|
|
157
|
+
* The span of each variable that is drawn: x and y for a height, which run
|
|
158
|
+
* the width of the axes when left out, u and v for a parametric surface,
|
|
159
|
+
* which run from 0 to 1.
|
|
160
|
+
*/
|
|
161
|
+
uDomain: import("@motionscript/sdk").Type<Interval | null, Interval | null, false>;
|
|
162
|
+
vDomain: import("@motionscript/sdk").Type<Interval | null, Interval | null, false>;
|
|
163
|
+
/** The equation's named values: any name in it that is not a variable, a function or a constant. */
|
|
164
|
+
params: import("@motionscript/sdk").Type<Readonly<Record<string, number>>, Readonly<Record<string, number>>, false>;
|
|
165
|
+
/** How finely the surface is sampled, each way. */
|
|
166
|
+
segments: import("@motionscript/sdk").Type<number, number, false>;
|
|
167
|
+
/** Colours by height, lowest first, over the axes' z range. Empty paints the surface in its fill. */
|
|
168
|
+
colorScale: import("@motionscript/sdk").Type<Color[], NormalizedColor[], false>;
|
|
169
|
+
/** How many lines are drawn across the surface each way; zero leaves it bare. */
|
|
170
|
+
meshLines: import("@motionscript/sdk").Type<number, number, false>;
|
|
171
|
+
meshColor: import("@motionscript/sdk").Type<Color, Color, false>;
|
|
172
|
+
/** The opacity of the surface's shadow, laid flat on the floor of the axes and coloured by height; zero draws none. */
|
|
173
|
+
floorShadow: import("@motionscript/sdk").Type<number, number, false>;
|
|
174
|
+
graph: import("@motionscript/sdk").Type<import("./space.js").Graph3D | null, import("./space.js").Graph3D | null, true>;
|
|
175
|
+
opacity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
176
|
+
blend: import("@motionscript/sdk").Type<_Blend3D | undefined, _Blend3D | undefined, false>;
|
|
177
|
+
fill: import("@motionscript/sdk").Type<_Fill3D, _Fill3D, false>;
|
|
151
178
|
faces: import("@motionscript/sdk").Type<_Faces3D | undefined, _Faces3D | undefined, false>;
|
|
179
|
+
wireframe: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
152
180
|
vertexColors: import("@motionscript/sdk").Type<boolean | undefined, boolean | undefined, false>;
|
|
181
|
+
alphaMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
182
|
+
aoMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
183
|
+
normalMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
184
|
+
envMapIntensity: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
185
|
+
geometry: import("@motionscript/sdk").Type<Geometry3D | undefined, Geometry3D | undefined, false>;
|
|
186
|
+
material: import("@motionscript/sdk").Type<Material3D | readonly Material3D[] | undefined, Material3D | readonly Material3D[] | undefined, false>;
|
|
187
|
+
roughness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
188
|
+
metalness: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
189
|
+
emission: import("@motionscript/sdk").Type<Color | undefined, NormalizedColor | undefined, false>;
|
|
190
|
+
emissionStrength: import("@motionscript/sdk").Type<number | undefined, number | undefined, false>;
|
|
191
|
+
roughnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
192
|
+
metalnessMap: import("@motionscript/sdk").Type<_Texture3D | undefined, _Texture3D | undefined, false>;
|
|
193
|
+
shading: import("@motionscript/sdk").Type<_Shading3D | undefined, _Shading3D | undefined, false>;
|
|
153
194
|
unlit: import("@motionscript/sdk").Type<boolean, boolean, false>;
|
|
154
|
-
}
|
|
195
|
+
}>, {
|
|
196
|
+
readonly morphTo: readonly ["expression"];
|
|
197
|
+
readonly paramsTo: readonly ["params"];
|
|
198
|
+
readonly domainTo: readonly ["uDomain", "vDomain"];
|
|
199
|
+
}, _Node3D<_Node3DProps>>>>;
|
|
155
200
|
export type SurfacePlot3d = NodeOf<typeof SurfacePlot3d>;
|
|
156
201
|
/**
|
|
157
202
|
* The surface's height above its own origin at graph `(x, y)`, or `NaN`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface-plot3d.d.ts","sourceRoot":"","sources":["../../src/three/surface-plot3d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