diff --git a/docs/code/emoji.js b/docs/code/emoji.js
new file mode 100644
index 0000000..663da1a
--- /dev/null
+++ b/docs/code/emoji.js
@@ -0,0 +1,4 @@
+// draw a row of emojis with various faces
+let tags = ['grinning', 'neutral_face', 'confused', 'scream', 'joy', 'heart_eyes'];
+let row = HStack(tags.map(Emoji), {spacing: 0.1});
+return Frame(row, {padding: 0.1});
diff --git a/docs/code/path.js b/docs/code/path.js
deleted file mode 100644
index d053e3d..0000000
--- a/docs/code/path.js
+++ /dev/null
@@ -1,117 +0,0 @@
-// make the OpenAI logo
-let logo = Path([
- MoveTo([37.5324, 16.8707]),
- Bezier3([37.9886, 12.6859], [38.1363, 14.0974], [37.9808, 15.5241]),
- Bezier3([36.676, 8.68622], [37.3934, 9.91076], [37.8409, 11.2744]),
- Bezier3([32.0373, 4.4985], [33.9882, 5.3676], [35.6126, 6.83404]),
- Bezier3([25.8215, 3.85078], [27.9098, 3.40259], [30.0864, 3.62941]),
- Bezier3([22.4257, 1.36341], [23.7219, 1.94125], [24.8796, 2.7893]),
- Bezier3([18.3058, 0.500197], [19.7249, 0.491269], [21.1295, 0.785575]),
- Bezier3([12.3614, 2.42214], [14.0893, 1.16803], [16.1708, 0.495044]),
- Bezier3([8.6917, 7.47815], [9.34853, 5.44666], [10.6335, 3.67624]),
- Bezier3([4.8377, 9.17505], [5.98686, 8.3414], [7.30085, 7.76286]),
- Bezier3([2.02839, 12.312], [2.73073, 11.0782], [3.68854, 10.0087]),
- Bezier3([0.721698, 18.4228], [0.498905, 16.2988], [0.956464, 14.1591]),
- Bezier3([3.268, 24.1293], [1.83612, 22.5449], [0.944492, 20.5467]),
- Bezier3([2.81182, 28.3141], [2.66413, 26.9026], [2.81966, 25.4759]),
- Bezier3([4.12437, 32.3138], [3.40701, 31.0892], [2.95951, 29.7256]),
- Bezier3([8.76321, 36.5013], [6.8123, 35.6322], [5.18791, 34.1659]),
- Bezier3([14.9789, 37.1492], [12.8907, 37.5973], [10.7141, 37.3704]),
- Bezier3([18.3747, 39.6366], [17.0786, 39.0587], [15.9208, 38.2107]),
- Bezier3([22.4946, 40.4998], [21.0755, 40.5087], [19.6709, 40.2144]),
- Bezier3([28.4418, 38.5772], [26.7133, 39.8321], [24.6307, 40.5054]),
- Bezier3([32.1119, 33.5179], [31.4556, 35.5506], [30.1704, 37.3223]),
- Bezier3([35.9659, 31.821], [34.8167, 32.6547], [33.5027, 33.2332]),
- Bezier3([38.7752, 28.684], [38.0728, 29.9178], [37.115, 30.9874]),
- Bezier3([40.0789, 22.5748], [40.3023, 24.6979], [39.8458, 26.8371]),
- Bezier3([37.5324, 16.8707], [38.9639, 18.4544], [39.8556, 20.4517]),
- MoveTo([22.4978, 37.8849]),
- Bezier3([17.6994, 36.1501], [19.0459, 37.2733], [20.7443, 37.8874]),
- Bezier3([17.936, 36.0161], [17.8666, 36.0586], [17.7601, 36.117]),
- LineTo([25.9004, 31.4156]),
- Bezier3([26.3813, 30.9378], [26.2663, 31.137], [26.1003, 31.3019]),
- Bezier3([26.5549, 30.2825], [26.5563, 30.5124], [26.4964, 30.7386]),
- VerticalTo(19.0542),
- LineTo([29.9213, 20.998]),
- Bezier3([29.9656, 21.0359], [29.9541, 21.0198], [29.9389, 21.0068]),
- Bezier3([29.9867, 21.0902], [29.9842, 21.0707], [29.977, 21.052]),
- VerticalTo(30.3889),
- Bezier3([27.7909, 35.6841], [29.1946, 34.2791], [29.9842, 32.375]),
- Bezier3([22.4978, 37.8849], [24.4838, 37.8806], [26.3872, 37.0892]),
- MoveTo([6.39227, 31.0064]),
- Bezier3([5.49804, 25.9832], [5.19742, 27.7107], [5.51397, 29.4888]),
- Bezier3([5.73461, 26.1244], [5.66048, 26.0818], [5.55718, 26.0187]),
- LineTo([13.699, 30.7248]),
- Bezier3([14.3532, 30.902], [14.1233, 30.902], [13.8975, 30.8408]),
- Bezier3([15.0073, 30.7248], [14.8088, 30.8408], [14.583, 30.902]),
- LineTo([24.731, 25.1103]),
- VerticalTo(28.9979),
- Bezier3([24.7199, 29.0556], [24.7283, 29.0376], [24.7321, 29.0177]),
- Bezier3([24.6829, 29.1012], [24.6988, 29.0893], [24.7115, 29.0736]),
- LineTo([16.6317, 33.7497]),
- Bezier3([10.9447, 34.4954], [12.8643, 35.0097], [14.9096, 34.7416]),
- Bezier3([6.39227, 31.0064], [7.38785, 32.7263], [9.02506, 33.9811]),
- MoveTo([4.29707, 13.6194]),
- Bezier3([8.19885, 10.3327], [6.55279, 10.9364], [5.17156, 12.0998]),
- Bezier3([8.19491, 10.6071], [8.19491, 10.5228], [8.19885, 10.4013]),
- VerticalTo(19.808),
- Bezier3([8.36823, 20.4629], [8.25334, 20.2638], [8.19351, 20.0378]),
- Bezier3([8.84863, 20.9404], [8.64893, 20.8267], [8.48312, 20.6619]),
- LineTo([18.5723, 26.5542]),
- LineTo([15.206, 28.4979]),
- Bezier3([15.1505, 28.5173], [15.1703, 28.5155], [15.1894, 28.5089]),
- Bezier3([15.0924, 28.5082], [15.1107, 28.516], [15.1307, 28.5191]),
- LineTo([7.04046, 23.8557]),
- Bezier3([3.55289, 19.3046], [4.06716, 21.2235], [5.32135, 22.8601]),
- Bezier3([4.29707, 13.6194], [3.30624, 15.3413], [3.03862, 17.3858]),
- MoveTo([31.955, 20.0556]),
- LineTo([22.2312, 14.4411]),
- LineTo([25.5976, 12.4981]),
- Bezier3([25.6531, 12.4787], [25.6333, 12.4805], [25.6142, 12.4872]),
- Bezier3([25.7111, 12.4879], [25.6928, 12.4801], [25.6729, 12.4769]),
- LineTo([33.7631, 17.1364]),
- Bezier3([36.6606, 20.1613], [36.0017, 18.8982], [34.9967, 17.849]),
- Bezier3([37.4832, 24.2684], [37.6047, 22.849], [37.3194, 21.4244]),
- Bezier3([35.9743, 28.1759], [36.8382, 27.0432], [37.3617, 25.6878]),
- Bezier3([32.6047, 30.6641], [33.9415, 30.1717], [35.1103, 29.3086]),
- Bezier3([32.6047, 30.3889], [32.6047, 30.4733], [32.6047, 30.5947]),
- VerticalTo(21.188),
- Bezier3([32.4332, 20.5338], [32.5474, 20.7328], [32.6066, 20.9586]),
- Bezier3([31.955, 20.0556], [32.154, 20.1698], [32.319, 20.3348]),
- MoveTo([35.3055, 15.0128]),
- Bezier3([35.069, 14.8717], [35.1431, 14.9142], [35.2464, 14.9765]),
- LineTo([27.1045, 10.2712]),
- Bezier3([26.4504, 10.0943], [26.6803, 10.0943], [26.906, 10.1554]),
- Bezier3([25.7963, 10.2712], [25.9948, 10.1554], [26.2206, 10.0943]),
- LineTo([16.0726, 15.8858]),
- VerticalTo(11.9982),
- Bezier3([16.0837, 11.9405], [16.0753, 11.9585], [16.0715, 11.9783]),
- Bezier3([16.1207, 11.8949], [16.1048, 11.9068], [16.0921, 11.9225]),
- LineTo([24.1719, 7.25025]),
- Bezier3([28.2383, 6.25482], [26.8158, 6.19376], [25.4053, 6.53903]),
- Bezier3([32.2044, 7.59508], [31.0364, 6.78077], [29.6608, 6.31589]),
- Bezier3([34.8334, 10.8531], [34.2842, 9.53945], [33.3723, 8.40939]),
- Bezier3([35.3055, 15.0128], [35.5464, 13.6095], [35.3826, 12.1667]),
- MoveTo([14.2424, 21.9419]),
- LineTo([10.8752, 19.9981]),
- Bezier3([10.8309, 19.9602], [10.8423, 19.9763], [10.8576, 19.9893]),
- Bezier3([10.8098, 19.9058], [10.8122, 19.9254], [10.8195, 19.9441]),
- VerticalTo(10.6071),
- Bezier3([11.9819, 6.58696], [11.2173, 7.78848], [10.8107, 9.18295]),
- Bezier3([15.1275, 3.82264], [13.8377, 4.42659], [12.7466, 5.38544]),
- Bezier3([19.2649, 3.1767], [17.8524, 2.99464], [16.4173, 3.21869]),
- Bezier3([23.1034, 4.85067], [22.0089, 3.93941], [20.6775, 3.35876]),
- Bezier3([22.8668, 4.98473], [22.937, 4.94215], [23.0427, 4.88379]),
- LineTo([14.9024, 9.58517]),
- Bezier3([14.4215, 10.0626], [14.5366, 9.86356], [14.7025, 9.69878]),
- Bezier3([14.2479, 10.7175], [14.2466, 10.4877], [14.3065, 10.2616]),
- LineTo([14.2424, 21.9419]),
- MoveTo([16.071, 17.9991]),
- LineTo([20.4018, 15.4978]),
- LineTo([24.7325, 17.9975]),
- VerticalTo(22.9985),
- LineTo([20.4018, 25.4983]),
- LineTo([16.071, 22.9985]),
- VerticalTo(17.9991),
-]);
-return Container(logo, {coord: [0, 0, 41, 41], fill: '#eee'});
diff --git a/docs/code/textframe.js b/docs/code/textframe.js
new file mode 100644
index 0000000..54bb96d
--- /dev/null
+++ b/docs/code/textframe.js
@@ -0,0 +1,2 @@
+// textframe
+return TextFrame('hello', {padding: 0.1, margin: 0.1});
\ No newline at end of file
diff --git a/docs/gen/prompt.md b/docs/gen/prompt.md
index 2927f8e..392912f 100644
--- a/docs/gen/prompt.md
+++ b/docs/gen/prompt.md
@@ -70,7 +70,7 @@ type range = number[2];
type rect = number[4];
type frame = number | number[2] | rect;
type spec = {pos?: point, rad?: size, rect?: rect, expand?: boolean, align?: string, rotate?: number, pivot?: string | number | number[2], invar?: boolean};
-type child = Element | [Element, spec];
+type child = Element | [Element, rect | spec];
type valign = 'top' | 'bottom' | 'center' | number;
type halign = 'left' | 'right' | 'center' | number;
type aspect = number | 'auto';
@@ -78,18 +78,21 @@ type align = valign | halign;
type label = string | Element;
type ticks = number | number[] | [number, label][];
type grid = number | number[];
-type bars = [number, number | Bar][];
+type bars = [string, number | Bar][];
type edge_pos = point | [point, string];
type node = [string, string, point] | [string, string, point, size];
type edge = [string, string];
type func1d = (x: number) => number;
+type path_spec = {fx: func1d, fy: func1d, xlim: range, ylim: range, tlim: range, xvals: number[], yvals: number[], tvals: number[], N: number, size: size};
type sizefunc = (x: number, y: number, t: number, i: number) => size;
type shapefunc = (x: number, y: number, t: number, i: number) => Element;
```
Here are the generic utility functions used in the library. Many of them mimic the functionality of core Python and numpy and are used for array operations and aggregations. They are also for constructing arrays that can be mapped into series of `Element` objects.
```typescript
-function zip(arr1: any[], arr2: any[]): any[];
+function zip(...arrs: any[]): any[];
+function min(...vals: number[]): number;
+function max(...vals: number[]): number;
function sum(arr: number[]): number;
function all(arr: boolean[]): boolean;
function any(arr: boolean[]): boolean;
@@ -110,26 +113,33 @@ function interpolateHex(c1: string, c2: string, alpha: number): string;
Next are the constructors used to create the various types of `Element` objects that can be used in the library. For convenience, one does not have to use the `new` keyword, you can simply call them as functions, but they are functions that return the specified object of the same name. The two most important types of elements are `Element`, which represents a single element and `Group`, which represents a container that can hold multiple elements. All other elements are derived from one or both of these.
```typescript
function Element(tag: string, unary: boolean, args?: {aspect: number}): Element;
-function Container(children: child[], args?: {tag: string, clip: boolean, coord: rect}): Container;
+function Container(children: child[], args?: {tag: string, clip: boolean, inherit: boolean, coord: rect}): Container;
function Frame(child: Element, args?: {padding: frame, margin: frame, border: number, adjust: boolean, flex: boolean, shape: Element}): Frame;
function Stack(direc: string, children: child[], args?: {expand: boolean, align: align, spacing: number, aspect: aspect, debug: boolean}): Stack;
function Place(child: Element, args?: spec): Place;
function Points(children: child[], args?: {size: size, shape: Element}): Points;
function Rect(args?: {rect: rect, radius: number | number[2]}): Rect;
-function Circle(args?: {c: point, r: size}): Circle;
+function Circle(args?: {pos: point, rad: size}): Circle;
+function Line(p1: point, p2: point): Line;
+function UnitLine(direc: string, pos: number, args?: {lim: range}): UnitLine;
function Polyline(points: point[]): Polyline;
-function Path(commands: Command[]): Path;
-function SymPath(args?: {fx: func1d, fy: func1d, xlim: range, ylim: range, tlim: range, xvals: number[], yvals: number[], tvals: number[], N: number}): SymPath;
-function SymPoints(args?: {fx: func1d, fy: func1d, xlim: range, ylim: range, tlim: range, xvals: number[], yvals: number[], tvals: number[], N: number, size: size, shape: Element, fr: sizefunc, fs: shapefunc}): SymPoints;
+function SymPath(args?: path_spec): SymPath;
+function SymPoints(args?: {...path_spec, shape: Element, fr: sizefunc, fs: shapefunc}): SymPoints;
+function SymFill(args?: {...path_spec, fill: string, stroke: string, stroke_width: number}): SymFill;
+function SymPoly(args?: {...path_spec, fill: string, stroke: string, stroke_width: number}): SymPoly;
function Axis(dirc: string, ticks: ticks, args?: {label_size: number, lim: range, tick_pos: string}): Axis;
function Graph(elems: Element[], args?: {xlim: range, ylim: range, padding: frame}): Graph;
function Plot(elems: Element[], args?: {xlim: range, ylim: range, xanchor: number, yanchor: number, xticks: ticks, yticks: ticks, xgrid: grid, ygrid: grid, xlabel: label, ylabel: label, title: label}): Plot;
function BarPlot(bars: bars, args?: {direc: string, shrink: number, color: string}): BarPlot;
-function Note(text: string, args?: {pos: point, rad: size, latex: boolean}): Note;
function Text(text: string, args?: {size: size, hshift: number, vshift: number}): Text;
-function Node(text: string, args?: {padding: frame, border: number, spacing: number, align: string}): Node;
-function Edge(beg: edge_pos, end: edge_pos, args?: {arrow: boolean, arrow_beg: boolean, arrow_end: boolean, arrow_size: number, curve: number}): Edge;
-function Network(nodes: node[], edges: edge[], args?: {size: size, directed: boolean}): Network;
+function MultiText(texts: label | label[], args?: {spacing: number}): MultiText;
+function Emoji(tag: string): Emoji;
+function Latex(text: string): Latex;
+function Note(text: string, args?: {pos: point, rad: size, latex: boolean}): Note;
+function TextFrame(text: label | label[] | Element, args?: {latex: boolean, emoji: boolean}): TextFrame;
+function TitleFrame(child: Element, title: label, args?: {title_size: number, title_fill: string, title_offset: point, title_radius: size, adjust: boolean}): TitleFrame;
+function Node(text: string, pos: point, args?: {size: size}): Node;
+function Edge(beg: edge_pos, end: edge_pos, args?: {arrow: boolean, arrow_beg: boolean, arrow_end: boolean, arrow_size: number}): Edge;
```
You will typically use one of the higher level constructors to create the elements you need, but you can also create your own custom elements by using the `Element` or `Container`constructor. Note that for ease of use, `Group` is an alias for `Container`. Additionally, elements with a direction notion such as `Stack` and `Axis` have specialized versions denoted by the prefixes `V` and `H`, for example `VStack` and `HStack` and `VAxis` and `HAxis`.
diff --git a/docs/meta.json b/docs/meta.json
index 9285bcd..ba9be78 100644
--- a/docs/meta.json
+++ b/docs/meta.json
@@ -18,8 +18,7 @@
"Circle",
"Line",
"UnitLine",
- "Polyline",
- "Path"
+ "Polyline"
],
"symbolic": [
"SymPoints",
diff --git a/docs/text/emoji.md b/docs/text/emoji.md
new file mode 100644
index 0000000..486a14a
--- /dev/null
+++ b/docs/text/emoji.md
@@ -0,0 +1,9 @@
+# Emoji
+
+[Text](#Text) > [Element](#Element)
+
+Creates a new `Emoji` element. This is a specialized version of `Text` that accepts the name of an emoji as a tag. You can find a list of the Github emoji names [here](https://github.com/ikatyang/emoji-cheat-sheet). If the emoji is not found, it will display the text `":tag:"` in red.
+
+Arguments:
+
+- `tag`: the name of the emoji
diff --git a/docs/text/networks.md b/docs/text/networks.md
new file mode 100644
index 0000000..89f10eb
--- /dev/null
+++ b/docs/text/networks.md
@@ -0,0 +1,3 @@
+# Networks
+
+Network diagrams can be created using the `Node` and `Edge` classes. There is no overarching `Network` class. One will usually wrap elements in a `Group` or `Graph` object to create a final product.
diff --git a/docs/text/path.md b/docs/text/path.md
deleted file mode 100644
index 2914efc..0000000
--- a/docs/text/path.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Path
-
-[Element](#Element)
-
-Create a path either using constructs (commands) analogous to those in an SVG `` string.
-
-Positional arguments:
-- `commands` — list of [Command](#Command)s to execute
diff --git a/docs/text/textframe.md b/docs/text/textframe.md
new file mode 100644
index 0000000..346f579
--- /dev/null
+++ b/docs/text/textframe.md
@@ -0,0 +1,14 @@
+# TextFrame
+
+[Frame](#Frame) > [Element](#Element)
+
+Creates a new `TextFrame` element. This is a specialized version of `Text` that adds a border and background to the text.
+
+Arguments:
+
+- `text`: the text to display
+
+Keyword arguments:
+
+- `latex`: whether to render LaTeX
+- `emoji`: whether to render emoji
diff --git a/js/gum.js b/js/gum.js
index d4f3b37..43c80c6 100644
--- a/js/gum.js
+++ b/js/gum.js
@@ -1501,221 +1501,6 @@ class Triangle extends Polygon {
}
}
-function arg(s, d, ctx) {
- if (s == 'xy') {
- let [x, y] = ctx.coord_to_pixel(d);
- return `${rounder(x, ctx.prec)},${rounder(y, ctx.prec)}`;
- } else if (s == 'x') {
- let [x, _] = ctx.coord_to_pixel([d, 0]);
- return `${rounder(x, ctx.prec)}`;
- } else if (s == 'y') {
- let [_, y] = ctx.coord_to_pixel([0, d]);
- return `${rounder(y, ctx.prec)}`;
- } else if (s == 'wh') {
- let [w, h] = ctx.coord_to_pixel_size(d);
- return `${rounder(w, ctx.prec)},${rounder(h, ctx.prec)}`;
- } else if (s == 'w') {
- let [w, _] = ctx.coord_to_pixel_size([d, 0]);
- return `${rounder(w, ctx.prec)}`;
- } else if (s == 'h') {
- let [_, h] = ctx.coord_to_pixel_size([0, d]);
- return `${rounder(h, ctx.prec)}`;
- } else {
- return `${d}`;
- }
-}
-
-class Command {
- constructor(cmd, spec, data) {
- this.cmd = cmd;
- this.spec = spec;
- this.data = data;
- }
-
- string(ctx) {
- let args = zip(this.spec, this.data)
- .map(([s, d]) => arg(s, d, ctx))
- .join(' ');
- return `${this.cmd} ${args}`;
- }
-}
-
-class MoveTo extends Command {
- constructor(p) {
- super('M', ['xy'], [p]);
- this.point = p;
- }
-}
-
-class MoveDel extends Command {
- constructor(p) {
- super('m', ['wh'], [p]);
- }
-}
-
-class LineTo extends Command {
- constructor(p) {
- super('L', ['xy'], [p]);
- this.point = p;
- }
-}
-
-class LineDel extends Command {
- constructor(p) {
- super('l', ['wh'], [p]);
- }
-}
-
-class VerticalTo extends Command {
- constructor(y) {
- super('V', ['y'], [y]);
- this.point = [null, y];
- }
-}
-
-class VerticalDel extends Command {
- constructor(y) {
- super('v', ['h'], [y]);
- }
-}
-
-class HorizontalTo extends Command {
- constructor(x) {
- super('H', ['x'], [x]);
- this.point = [x, null];
- }
-}
-
-class HorizontalDel extends Command {
- constructor(x) {
- super('h', ['w'], [x]);
- }
-}
-
-class Bezier2 extends Command {
- constructor(p, p1) {
- if (p1 == null) {
- super('T', ['xy'], [p]);
- } else {
- super('Q', ['xy', 'xy'], [p1, p]);
- }
- this.point = p;
- }
-}
-
-class Bezier3 extends Command {
- constructor(p, p2, p1) {
- if (p1 == null) {
- super('S', ['xy', 'xy'], [p2, p]);
- } else {
- super('C', ['xy', 'xy', 'xy'], [p1, p2, p]);
- }
- this.point = p;
- }
-}
-
-class ArcTo extends Command {
- constructor(p, r, args) {
- let {angle, large, sweep} = args ?? {};
- angle = angle ?? 0;
- large = large ?? true;
- sweep = sweep ?? true;
-
- large = large ? 1 : 0;
- sweep = sweep ? 1 : 0;
- super('A', ['wh', '', '', '', 'xy'], [r, angle, large, sweep, p]);
- }
-}
-
-class ArcDel extends Command {
- constructor(p, r, args) {
- let {angle, large, sweep} = args ?? {};
- angle = angle ?? 0;
- large = large ?? true;
- sweep = sweep ?? true;
-
- large = large ? 1 : 0;
- sweep = sweep ? 1 : 0;
- super('a', ['wh', '', '', '', 'wh'], [r, angle, large, sweep, p]);
- }
-}
-
-class ClosePath extends Command {
- constructor() {
- super('Z', [], []);
- }
-}
-
-class Path extends Element {
- constructor(commands, args) {
- super('path', true, args);
- this.commands = commands;
- let [pxs, pys] = zip(
- ...commands.map(c => c.point).filter(p => p != null)
- );
- this.xlim = [min(...pxs), max(...pxs)];
- this.ylim = [min(...pys), max(...pys)];
- }
-
- props(ctx) {
- let cmd = this.commands.map(c => c.string(ctx)).join(' ');
- return {d: cmd, ...this.attr};
- }
-}
-
-function make_bezier2(d) {
- let [d0, ..._] = d;
- if (is_scalar(d0)) {
- return new Bezier2(d);
- } else if (is_array(d0)) {
- return new Bezier2(...d);
- } else {
- return d;
- }
-}
-
-class Bezier2Path extends Path {
- constructor(start, bezs, args) {
- start = new MoveTo(start);
- bezs = bezs.map(make_bezier2);
- super([start, ...bezs], args);
- }
-}
-
-// draws little vectors for path
-class Bezier2PathDebug extends Container {
- constructor(start, bezs, args) {
- let bezo = new Bezier2Path(start, bezs, args);
- let [nodes, arrows] = zip(...bezs);
- nodes.unshift(start);
-
- let red = new Dot({color: 'red'});
- let points1 = new Points(nodes, {size: 0.01});
- let points2 = new Points(arrows, {size: 0.007, shape: red});
- let lines = zip(nodes.slice(0, -1), arrows).map(([n, a]) =>
- new Line(n, a, {stroke: 'blue', stroke_dasharray: 2, opacity: 0.7})
- );
-
- super([bezo, ...lines, points1, points2]);
- }
-}
-
-class Bezier2Line extends Path {
- constructor(p0, p1, px, args) {
- let start = new MoveTo(p0);
- let bezer = new Bezier2(p1, px);
- super([start, bezer], args);
- }
-}
-
-class Bezier3Line extends Path {
- constructor(p0, p1, px0, px1, args) {
- let start = new MoveTo(p0);
- let bezer = new Bezier3(p1, px0, px1);
- super([start, bezer], args);
- }
-}
-
/**
** filters and effects
**/
@@ -3461,7 +3246,7 @@ class Animation {
**/
let Gum = [
- Context, Element, Container, Group, SVG, Frame, Stack, VStack, HStack, Grid, Place, Rotate, Anchor, Attach, Points, Spacer, Ray, Line, UnitLine, HLine, VLine, Rect, Square, Ellipse, Circle, Dot, Polyline, Polygon, Triangle, Path, Text, MultiText, Emoji, Latex, TextFrame, TitleFrame, MoveTo, LineTo, VerticalTo, VerticalDel, HorizontalTo, HorizontalDel, Bezier2, Bezier3, ArcTo, ArcDel, Bezier2Path, Bezier2Line, Bezier3Line, Arrow, Field, SymField, Arrowhead, ArrowPath, Node, Edge, ClosePath, SymPath, SymFill, SymPoly, SymPoints, PointPath, PointFill, Bar, VMultiBar, HMultiBar, Bars, VBars, HBars, Scale, VScale, HScale, Labels, VLabels, HLabels, Axis, HAxis, VAxis, XLabel, YLabel, Mesh, Graph, Plot, BarPlot, Legend, Note, Interactive, Variable, Slider, Toggle, List, Animation, Continuous, Discrete, range, linspace, enumerate, repeat, meshgrid, lingrid, hex2rgb, rgb2hex, rgb2hsl, interpolateVectors, interpolateHex, interpolateVectorsPallet, gzip, zip, reshape, split, concat, pos_rect, pad_rect, rad_rect, sum, prod, exp, log, sin, cos, min, max, abs, pow, sqrt, floor, ceil, round, atan, norm, add, mul, clamp, mask, rescale, sigmoid, logit, smoothstep,pi, phi, r2d, d2r, rounder, make_ticklabel, aspect_invariant, random, uniform, normal, cumsum, blue, red, green, Filter, Effect, DropShadow
+ Context, Element, Container, Group, SVG, Frame, Stack, VStack, HStack, Grid, Place, Rotate, Anchor, Attach, Points, Spacer, Ray, Line, UnitLine, HLine, VLine, Rect, Square, Ellipse, Circle, Dot, Polyline, Polygon, Triangle, Text, MultiText, Emoji, Latex, TextFrame, TitleFrame, Arrow, Field, SymField, Arrowhead, ArrowPath, Node, Edge, SymPath, SymFill, SymPoly, SymPoints, PointPath, PointFill, Bar, VMultiBar, HMultiBar, Bars, VBars, HBars, Scale, VScale, HScale, Labels, VLabels, HLabels, Axis, HAxis, VAxis, XLabel, YLabel, Mesh, Graph, Plot, BarPlot, Legend, Note, Interactive, Variable, Slider, Toggle, List, Animation, Continuous, Discrete, range, linspace, enumerate, repeat, meshgrid, lingrid, hex2rgb, rgb2hex, rgb2hsl, interpolateVectors, interpolateHex, interpolateVectorsPallet, gzip, zip, reshape, split, concat, pos_rect, pad_rect, rad_rect, sum, prod, exp, log, sin, cos, min, max, abs, pow, sqrt, floor, ceil, round, atan, norm, add, mul, clamp, mask, rescale, sigmoid, logit, smoothstep,pi, phi, r2d, d2r, rounder, make_ticklabel, aspect_invariant, random, uniform, normal, cumsum, blue, red, green, Filter, Effect, DropShadow
];
// detect object types
@@ -3604,5 +3389,5 @@ function injectImages(elem) {
**/
export {
- Gum, Context, Element, Container, Group, SVG, Frame, Stack, VStack, HStack, Grid, Place, Rotate, Anchor, Attach, Points, Spacer, Ray, Line, UnitLine, HLine, VLine, Rect, Square, Ellipse, Circle, Dot, Polyline, Polygon, Triangle, Path, Text, MultiText, Emoji, Latex, TextFrame, TitleFrame, MoveTo, LineTo, VerticalTo, VerticalDel, HorizontalTo, HorizontalDel, Bezier2, Bezier3, ArcTo, ArcDel, Bezier2Path, Bezier2Line, Bezier3Line, Arrow, Field, SymField, Arrowhead, ArrowPath, Node, Edge, ClosePath, SymPath, SymFill, SymPoly, SymPoints, PointPath, PointFill, Bar, VMultiBar, HMultiBar, Bars, VBars, HBars, Scale, VScale, HScale, Labels, VLabels, HLabels, Axis, HAxis, VAxis, Mesh, Graph, Plot, BarPlot, Legend, Note, Interactive, Variable, Slider, Toggle, List, Animation, Continuous, Discrete, gzip, zip, reshape, split, concat, pos_rect, pad_rect, rad_rect, demangle, props_repr, range, linspace, enumerate, repeat, meshgrid, lingrid, hex2rgb, rgb2hex, rgb2hsl, interpolateVectors, interpolateHex, interpolateVectorsPallet, exp, log, sin, cos, min, max, abs, pow, sqrt, floor, ceil, round, atan, norm, add, mul, clamp, mask, rescale, sigmoid, logit, smoothstep, e, pi, phi, r2d, d2r, rounder, make_ticklabel, mapper, parseGum, renderElem, renderGum, renderGumSafe, parseHTML, injectImage, injectImages, injectScripts, aspect_invariant, random, uniform, normal, cumsum, Filter, Effect, DropShadow, sum, prod, normalize, is_string, is_array, is_element
+ Gum, Context, Element, Container, Group, SVG, Frame, Stack, VStack, HStack, Grid, Place, Rotate, Anchor, Attach, Points, Spacer, Ray, Line, UnitLine, HLine, VLine, Rect, Square, Ellipse, Circle, Dot, Polyline, Polygon, Triangle, Text, MultiText, Emoji, Latex, TextFrame, TitleFrame, Arrow, Field, SymField, Arrowhead, ArrowPath, Node, Edge, SymPath, SymFill, SymPoly, SymPoints, PointPath, PointFill, Bar, VMultiBar, HMultiBar, Bars, VBars, HBars, Scale, VScale, HScale, Labels, VLabels, HLabels, Axis, HAxis, VAxis, Mesh, Graph, Plot, BarPlot, Legend, Note, Interactive, Variable, Slider, Toggle, List, Animation, Continuous, Discrete, gzip, zip, reshape, split, concat, pos_rect, pad_rect, rad_rect, demangle, props_repr, range, linspace, enumerate, repeat, meshgrid, lingrid, hex2rgb, rgb2hex, rgb2hsl, interpolateVectors, interpolateHex, interpolateVectorsPallet, exp, log, sin, cos, min, max, abs, pow, sqrt, floor, ceil, round, atan, norm, add, mul, clamp, mask, rescale, sigmoid, logit, smoothstep, e, pi, phi, r2d, d2r, rounder, make_ticklabel, mapper, parseGum, renderElem, renderGum, renderGumSafe, parseHTML, injectImage, injectImages, injectScripts, aspect_invariant, random, uniform, normal, cumsum, Filter, Effect, DropShadow, sum, prod, normalize, is_string, is_array, is_element
};