aboutsummaryrefslogtreecommitdiff
path: root/src/fields/InkField.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/fields/InkField.ts')
-rw-r--r--src/fields/InkField.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fields/InkField.ts b/src/fields/InkField.ts
index dbe51b24a..b79a03146 100644
--- a/src/fields/InkField.ts
+++ b/src/fields/InkField.ts
@@ -4,6 +4,7 @@ import { ObjectField } from "./ObjectField";
import { Copy, ToScriptString, ToString, Update } from "./FieldSymbols";
import { Scripting } from "../client/util/Scripting";
+// Helps keep track of the current ink tool in use.
export enum InkTool {
None = "none",
Pen = "pen",
@@ -12,11 +13,13 @@ export enum InkTool {
Stamp = "stamp"
}
+// Defines a point in an ink as a pair of x- and y-coordinates.
export interface PointData {
X: number;
Y: number;
}
+// Defines an ink as an array of points.
export type InkData = Array<PointData>;
const pointSchema = createSimpleSchema({
@@ -28,6 +31,7 @@ const strokeDataSchema = createSimpleSchema({
"*": true
});
+// Holistic class representing the store of an ink.
@Deserializable("ink")
export class InkField extends ObjectField {
@serializable(list(object(strokeDataSchema)))