diff options
author | vkalev <50213748+vkalev@users.noreply.github.com> | 2021-06-21 17:44:19 -0500 |
---|---|---|
committer | vkalev <50213748+vkalev@users.noreply.github.com> | 2021-06-21 17:44:19 -0500 |
commit | 441a3dab4ada425d28a55435be51339e3d28c892 (patch) | |
tree | 252313e2e304b582ba0031db082b43d06b817c9f /src/fields/InkField.ts | |
parent | 4c1fc6bcfdf603bb8c620f9288da09ed69587bfb (diff) |
adding comments
Diffstat (limited to 'src/fields/InkField.ts')
-rw-r--r-- | src/fields/InkField.ts | 4 |
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))) |