microboard-temp 0.4.14 → 0.4.16

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.
@@ -744,6 +744,7 @@ __export(exports_browser, {
744
744
  EditorContainer: () => EditorContainer,
745
745
  DrawingContext: () => DrawingContext,
746
746
  Drawing: () => Drawing,
747
+ Dice: () => Dice,
747
748
  DefaultTransformationData: () => DefaultTransformationData,
748
749
  DefaultShapeData: () => DefaultShapeData,
749
750
  Deck: () => Deck,
@@ -46221,6 +46222,211 @@ registerItem({
46221
46222
  item: Deck,
46222
46223
  defaultData: defaultDeckData
46223
46224
  });
46225
+ // src/Items/Examples/CardGame/Dice/Dice.ts
46226
+ var TIMEOUT = 3000;
46227
+ var defaultDiceData = {
46228
+ itemType: "Dice",
46229
+ backgroundColor: "#000207",
46230
+ backgroundOpacity: 1,
46231
+ borderColor: "#000207",
46232
+ borderOpacity: 1,
46233
+ borderStyle: "solid",
46234
+ borderWidth: 1,
46235
+ value: 1,
46236
+ range: { min: 1, max: 6 }
46237
+ };
46238
+
46239
+ class Dice extends BaseItem {
46240
+ itemType = "Dice";
46241
+ path;
46242
+ subject = new Subject;
46243
+ borderWidth = 1;
46244
+ isRotating = false;
46245
+ value = 1;
46246
+ range = { min: 1, max: 6 };
46247
+ constructor(board, id = "") {
46248
+ super(board, id, defaultDiceData);
46249
+ this.transformPath();
46250
+ this.transformation.subject.subscribe(() => {
46251
+ this.transformPath();
46252
+ this.updateMbr();
46253
+ this.subject.publish(this);
46254
+ });
46255
+ this.updateMbr();
46256
+ }
46257
+ transformPath() {
46258
+ this.path = createRoundedRectanglePath(this).copy();
46259
+ this.path.transform(this.transformation.matrix);
46260
+ this.path.setBackgroundColor(this.backgroundColor);
46261
+ this.path.setBorderColor(this.borderColor);
46262
+ this.path.setBorderWidth(this.borderWidth);
46263
+ }
46264
+ render(context) {
46265
+ if (this.transformationRenderBlock) {
46266
+ return;
46267
+ }
46268
+ context.ctx.save();
46269
+ if (this.isRotating) {
46270
+ const now = Date.now();
46271
+ const angle = now % 1000 / 1000 * 2 * Math.PI;
46272
+ const mbr2 = this.getMbr();
46273
+ const centerX2 = (mbr2.left + mbr2.right) / 2;
46274
+ const centerY2 = (mbr2.top + mbr2.bottom) / 2;
46275
+ context.ctx.translate(centerX2, centerY2);
46276
+ context.ctx.rotate(angle);
46277
+ context.ctx.translate(-centerX2, -centerY2);
46278
+ }
46279
+ this.path.render(context);
46280
+ const mbr = this.getMbr();
46281
+ const centerX = (mbr.left + mbr.right) / 2;
46282
+ const centerY = (mbr.top + mbr.bottom) / 2;
46283
+ context.ctx.fillStyle = "black";
46284
+ context.ctx.font = `bold ${this.getHeight() / 3}px sans-serif`;
46285
+ context.ctx.textAlign = "center";
46286
+ context.ctx.textBaseline = "middle";
46287
+ context.ctx.fillText(String(this.value), centerX, centerY);
46288
+ if (this.getLinkTo()) {
46289
+ const { top, right } = this.getMbr();
46290
+ this.linkTo.render(context, top, right, this.board.camera.getScale());
46291
+ }
46292
+ context.ctx.restore();
46293
+ }
46294
+ updateMbr() {
46295
+ const { left, top, right, bottom } = this.path.getMbr();
46296
+ this.left = left;
46297
+ this.right = right;
46298
+ this.top = top;
46299
+ this.bottom = bottom;
46300
+ }
46301
+ getPath() {
46302
+ return this.path.copy();
46303
+ }
46304
+ renderHTML(documentFactory) {
46305
+ const div = documentFactory.createElement("dice-item");
46306
+ return div;
46307
+ }
46308
+ deserialize(data) {
46309
+ super.deserialize(data);
46310
+ this.transformPath();
46311
+ this.subject.publish(this);
46312
+ return this;
46313
+ }
46314
+ isClosed() {
46315
+ return true;
46316
+ }
46317
+ applyBackgroundColor(backgroundColor) {
46318
+ this.backgroundColor = backgroundColor;
46319
+ this.path.setBackgroundColor(backgroundColor);
46320
+ }
46321
+ setBackgroundColor(backgroundColor) {
46322
+ this.emit({
46323
+ class: "Dice",
46324
+ method: "setBackgroundColor",
46325
+ item: [this.getId()],
46326
+ newData: { backgroundColor },
46327
+ prevData: { backgroundColor: this.backgroundColor }
46328
+ });
46329
+ }
46330
+ applyBorderWidth(borderWidth) {
46331
+ this.borderWidth = borderWidth;
46332
+ this.path.setBorderWidth(borderWidth);
46333
+ }
46334
+ setBorderWidth(borderWidth) {
46335
+ this.emit({
46336
+ class: "Dice",
46337
+ method: "setBorderWidth",
46338
+ item: [this.getId()],
46339
+ newData: { borderWidth },
46340
+ prevData: { borderWidth: this.borderWidth }
46341
+ });
46342
+ }
46343
+ applyBorderColor(borderColor) {
46344
+ this.borderColor = borderColor;
46345
+ this.path.setBorderColor(borderColor);
46346
+ }
46347
+ setBorderColor(borderColor) {
46348
+ this.emit({
46349
+ class: "Dice",
46350
+ method: "setBorderColor",
46351
+ item: [this.getId()],
46352
+ newData: { borderColor },
46353
+ prevData: { borderColor: this.borderColor }
46354
+ });
46355
+ }
46356
+ setIsRotating(isRotating) {
46357
+ this.emit({
46358
+ class: "Dice",
46359
+ method: "setIsRotating",
46360
+ item: [this.getId()],
46361
+ newData: { isRotating },
46362
+ prevData: { isRotating: false }
46363
+ });
46364
+ }
46365
+ setValuesRange(range) {
46366
+ this.emit({
46367
+ class: "Dice",
46368
+ method: "changeValuesRange",
46369
+ item: [this.getId()],
46370
+ newData: range,
46371
+ prevData: this.range
46372
+ });
46373
+ }
46374
+ setValue(value) {
46375
+ this.emit({
46376
+ class: "Dice",
46377
+ method: "changeValue",
46378
+ item: [this.getId()],
46379
+ newData: { value },
46380
+ prevData: { value: this.value }
46381
+ });
46382
+ }
46383
+ throwDice() {
46384
+ this.setIsRotating(true);
46385
+ setTimeout(() => {
46386
+ this.setValue(Math.ceil(Math.random() * (this.range.max - this.range.min)) + this.range.min);
46387
+ this.isRotating = false;
46388
+ }, TIMEOUT);
46389
+ }
46390
+ apply(op) {
46391
+ super.apply(op);
46392
+ switch (op.class) {
46393
+ case "Dice":
46394
+ switch (op.method) {
46395
+ case "setBorderWidth":
46396
+ this.applyBorderWidth(op.newData.borderWidth);
46397
+ break;
46398
+ case "setBackgroundColor":
46399
+ this.applyBackgroundColor(op.newData.backgroundColor);
46400
+ break;
46401
+ case "setBorderColor":
46402
+ this.applyBorderColor(op.newData.borderColor);
46403
+ break;
46404
+ case "setIsRotating":
46405
+ this.isRotating = op.newData.isRotating;
46406
+ if (op.newData.isRotating) {
46407
+ setTimeout(() => {
46408
+ this.isRotating = false;
46409
+ }, TIMEOUT);
46410
+ }
46411
+ break;
46412
+ case "changeValue":
46413
+ this.value = op.newData.value;
46414
+ this.isRotating = false;
46415
+ break;
46416
+ case "changeValuesRange":
46417
+ this.range = op.newData;
46418
+ break;
46419
+ }
46420
+ break;
46421
+ }
46422
+ this.subject.publish(this);
46423
+ }
46424
+ }
46425
+ registerItem({
46426
+ item: Dice,
46427
+ defaultData: defaultDiceData,
46428
+ toolData: { name: "AddDice", tool: ShapeTool }
46429
+ });
46224
46430
  // src/Pointer/Cursor.ts
46225
46431
  var defaultCursors = [
46226
46432
  "default",
package/dist/cjs/index.js CHANGED
@@ -744,6 +744,7 @@ __export(exports_src, {
744
744
  EditorContainer: () => EditorContainer,
745
745
  DrawingContext: () => DrawingContext,
746
746
  Drawing: () => Drawing,
747
+ Dice: () => Dice,
747
748
  DefaultTransformationData: () => DefaultTransformationData,
748
749
  DefaultShapeData: () => DefaultShapeData,
749
750
  Deck: () => Deck,
@@ -46221,6 +46222,211 @@ registerItem({
46221
46222
  item: Deck,
46222
46223
  defaultData: defaultDeckData
46223
46224
  });
46225
+ // src/Items/Examples/CardGame/Dice/Dice.ts
46226
+ var TIMEOUT = 3000;
46227
+ var defaultDiceData = {
46228
+ itemType: "Dice",
46229
+ backgroundColor: "#000207",
46230
+ backgroundOpacity: 1,
46231
+ borderColor: "#000207",
46232
+ borderOpacity: 1,
46233
+ borderStyle: "solid",
46234
+ borderWidth: 1,
46235
+ value: 1,
46236
+ range: { min: 1, max: 6 }
46237
+ };
46238
+
46239
+ class Dice extends BaseItem {
46240
+ itemType = "Dice";
46241
+ path;
46242
+ subject = new Subject;
46243
+ borderWidth = 1;
46244
+ isRotating = false;
46245
+ value = 1;
46246
+ range = { min: 1, max: 6 };
46247
+ constructor(board, id = "") {
46248
+ super(board, id, defaultDiceData);
46249
+ this.transformPath();
46250
+ this.transformation.subject.subscribe(() => {
46251
+ this.transformPath();
46252
+ this.updateMbr();
46253
+ this.subject.publish(this);
46254
+ });
46255
+ this.updateMbr();
46256
+ }
46257
+ transformPath() {
46258
+ this.path = createRoundedRectanglePath(this).copy();
46259
+ this.path.transform(this.transformation.matrix);
46260
+ this.path.setBackgroundColor(this.backgroundColor);
46261
+ this.path.setBorderColor(this.borderColor);
46262
+ this.path.setBorderWidth(this.borderWidth);
46263
+ }
46264
+ render(context) {
46265
+ if (this.transformationRenderBlock) {
46266
+ return;
46267
+ }
46268
+ context.ctx.save();
46269
+ if (this.isRotating) {
46270
+ const now = Date.now();
46271
+ const angle = now % 1000 / 1000 * 2 * Math.PI;
46272
+ const mbr2 = this.getMbr();
46273
+ const centerX2 = (mbr2.left + mbr2.right) / 2;
46274
+ const centerY2 = (mbr2.top + mbr2.bottom) / 2;
46275
+ context.ctx.translate(centerX2, centerY2);
46276
+ context.ctx.rotate(angle);
46277
+ context.ctx.translate(-centerX2, -centerY2);
46278
+ }
46279
+ this.path.render(context);
46280
+ const mbr = this.getMbr();
46281
+ const centerX = (mbr.left + mbr.right) / 2;
46282
+ const centerY = (mbr.top + mbr.bottom) / 2;
46283
+ context.ctx.fillStyle = "black";
46284
+ context.ctx.font = `bold ${this.getHeight() / 3}px sans-serif`;
46285
+ context.ctx.textAlign = "center";
46286
+ context.ctx.textBaseline = "middle";
46287
+ context.ctx.fillText(String(this.value), centerX, centerY);
46288
+ if (this.getLinkTo()) {
46289
+ const { top, right } = this.getMbr();
46290
+ this.linkTo.render(context, top, right, this.board.camera.getScale());
46291
+ }
46292
+ context.ctx.restore();
46293
+ }
46294
+ updateMbr() {
46295
+ const { left, top, right, bottom } = this.path.getMbr();
46296
+ this.left = left;
46297
+ this.right = right;
46298
+ this.top = top;
46299
+ this.bottom = bottom;
46300
+ }
46301
+ getPath() {
46302
+ return this.path.copy();
46303
+ }
46304
+ renderHTML(documentFactory) {
46305
+ const div = documentFactory.createElement("dice-item");
46306
+ return div;
46307
+ }
46308
+ deserialize(data) {
46309
+ super.deserialize(data);
46310
+ this.transformPath();
46311
+ this.subject.publish(this);
46312
+ return this;
46313
+ }
46314
+ isClosed() {
46315
+ return true;
46316
+ }
46317
+ applyBackgroundColor(backgroundColor) {
46318
+ this.backgroundColor = backgroundColor;
46319
+ this.path.setBackgroundColor(backgroundColor);
46320
+ }
46321
+ setBackgroundColor(backgroundColor) {
46322
+ this.emit({
46323
+ class: "Dice",
46324
+ method: "setBackgroundColor",
46325
+ item: [this.getId()],
46326
+ newData: { backgroundColor },
46327
+ prevData: { backgroundColor: this.backgroundColor }
46328
+ });
46329
+ }
46330
+ applyBorderWidth(borderWidth) {
46331
+ this.borderWidth = borderWidth;
46332
+ this.path.setBorderWidth(borderWidth);
46333
+ }
46334
+ setBorderWidth(borderWidth) {
46335
+ this.emit({
46336
+ class: "Dice",
46337
+ method: "setBorderWidth",
46338
+ item: [this.getId()],
46339
+ newData: { borderWidth },
46340
+ prevData: { borderWidth: this.borderWidth }
46341
+ });
46342
+ }
46343
+ applyBorderColor(borderColor) {
46344
+ this.borderColor = borderColor;
46345
+ this.path.setBorderColor(borderColor);
46346
+ }
46347
+ setBorderColor(borderColor) {
46348
+ this.emit({
46349
+ class: "Dice",
46350
+ method: "setBorderColor",
46351
+ item: [this.getId()],
46352
+ newData: { borderColor },
46353
+ prevData: { borderColor: this.borderColor }
46354
+ });
46355
+ }
46356
+ setIsRotating(isRotating) {
46357
+ this.emit({
46358
+ class: "Dice",
46359
+ method: "setIsRotating",
46360
+ item: [this.getId()],
46361
+ newData: { isRotating },
46362
+ prevData: { isRotating: false }
46363
+ });
46364
+ }
46365
+ setValuesRange(range) {
46366
+ this.emit({
46367
+ class: "Dice",
46368
+ method: "changeValuesRange",
46369
+ item: [this.getId()],
46370
+ newData: range,
46371
+ prevData: this.range
46372
+ });
46373
+ }
46374
+ setValue(value) {
46375
+ this.emit({
46376
+ class: "Dice",
46377
+ method: "changeValue",
46378
+ item: [this.getId()],
46379
+ newData: { value },
46380
+ prevData: { value: this.value }
46381
+ });
46382
+ }
46383
+ throwDice() {
46384
+ this.setIsRotating(true);
46385
+ setTimeout(() => {
46386
+ this.setValue(Math.ceil(Math.random() * (this.range.max - this.range.min)) + this.range.min);
46387
+ this.isRotating = false;
46388
+ }, TIMEOUT);
46389
+ }
46390
+ apply(op) {
46391
+ super.apply(op);
46392
+ switch (op.class) {
46393
+ case "Dice":
46394
+ switch (op.method) {
46395
+ case "setBorderWidth":
46396
+ this.applyBorderWidth(op.newData.borderWidth);
46397
+ break;
46398
+ case "setBackgroundColor":
46399
+ this.applyBackgroundColor(op.newData.backgroundColor);
46400
+ break;
46401
+ case "setBorderColor":
46402
+ this.applyBorderColor(op.newData.borderColor);
46403
+ break;
46404
+ case "setIsRotating":
46405
+ this.isRotating = op.newData.isRotating;
46406
+ if (op.newData.isRotating) {
46407
+ setTimeout(() => {
46408
+ this.isRotating = false;
46409
+ }, TIMEOUT);
46410
+ }
46411
+ break;
46412
+ case "changeValue":
46413
+ this.value = op.newData.value;
46414
+ this.isRotating = false;
46415
+ break;
46416
+ case "changeValuesRange":
46417
+ this.range = op.newData;
46418
+ break;
46419
+ }
46420
+ break;
46421
+ }
46422
+ this.subject.publish(this);
46423
+ }
46424
+ }
46425
+ registerItem({
46426
+ item: Dice,
46427
+ defaultData: defaultDiceData,
46428
+ toolData: { name: "AddDice", tool: ShapeTool }
46429
+ });
46224
46430
  // src/Pointer/Cursor.ts
46225
46431
  var defaultCursors = [
46226
46432
  "default",
package/dist/cjs/node.js CHANGED
@@ -1781,6 +1781,7 @@ __export(exports_node, {
1781
1781
  EditorContainer: () => EditorContainer,
1782
1782
  DrawingContext: () => DrawingContext,
1783
1783
  Drawing: () => Drawing,
1784
+ Dice: () => Dice,
1784
1785
  DefaultTransformationData: () => DefaultTransformationData,
1785
1786
  DefaultShapeData: () => DefaultShapeData,
1786
1787
  Deck: () => Deck,
@@ -48761,6 +48762,211 @@ registerItem({
48761
48762
  item: Deck,
48762
48763
  defaultData: defaultDeckData
48763
48764
  });
48765
+ // src/Items/Examples/CardGame/Dice/Dice.ts
48766
+ var TIMEOUT = 3000;
48767
+ var defaultDiceData = {
48768
+ itemType: "Dice",
48769
+ backgroundColor: "#000207",
48770
+ backgroundOpacity: 1,
48771
+ borderColor: "#000207",
48772
+ borderOpacity: 1,
48773
+ borderStyle: "solid",
48774
+ borderWidth: 1,
48775
+ value: 1,
48776
+ range: { min: 1, max: 6 }
48777
+ };
48778
+
48779
+ class Dice extends BaseItem {
48780
+ itemType = "Dice";
48781
+ path;
48782
+ subject = new Subject;
48783
+ borderWidth = 1;
48784
+ isRotating = false;
48785
+ value = 1;
48786
+ range = { min: 1, max: 6 };
48787
+ constructor(board, id = "") {
48788
+ super(board, id, defaultDiceData);
48789
+ this.transformPath();
48790
+ this.transformation.subject.subscribe(() => {
48791
+ this.transformPath();
48792
+ this.updateMbr();
48793
+ this.subject.publish(this);
48794
+ });
48795
+ this.updateMbr();
48796
+ }
48797
+ transformPath() {
48798
+ this.path = createRoundedRectanglePath(this).copy();
48799
+ this.path.transform(this.transformation.matrix);
48800
+ this.path.setBackgroundColor(this.backgroundColor);
48801
+ this.path.setBorderColor(this.borderColor);
48802
+ this.path.setBorderWidth(this.borderWidth);
48803
+ }
48804
+ render(context) {
48805
+ if (this.transformationRenderBlock) {
48806
+ return;
48807
+ }
48808
+ context.ctx.save();
48809
+ if (this.isRotating) {
48810
+ const now = Date.now();
48811
+ const angle = now % 1000 / 1000 * 2 * Math.PI;
48812
+ const mbr2 = this.getMbr();
48813
+ const centerX2 = (mbr2.left + mbr2.right) / 2;
48814
+ const centerY2 = (mbr2.top + mbr2.bottom) / 2;
48815
+ context.ctx.translate(centerX2, centerY2);
48816
+ context.ctx.rotate(angle);
48817
+ context.ctx.translate(-centerX2, -centerY2);
48818
+ }
48819
+ this.path.render(context);
48820
+ const mbr = this.getMbr();
48821
+ const centerX = (mbr.left + mbr.right) / 2;
48822
+ const centerY = (mbr.top + mbr.bottom) / 2;
48823
+ context.ctx.fillStyle = "black";
48824
+ context.ctx.font = `bold ${this.getHeight() / 3}px sans-serif`;
48825
+ context.ctx.textAlign = "center";
48826
+ context.ctx.textBaseline = "middle";
48827
+ context.ctx.fillText(String(this.value), centerX, centerY);
48828
+ if (this.getLinkTo()) {
48829
+ const { top, right } = this.getMbr();
48830
+ this.linkTo.render(context, top, right, this.board.camera.getScale());
48831
+ }
48832
+ context.ctx.restore();
48833
+ }
48834
+ updateMbr() {
48835
+ const { left, top, right, bottom } = this.path.getMbr();
48836
+ this.left = left;
48837
+ this.right = right;
48838
+ this.top = top;
48839
+ this.bottom = bottom;
48840
+ }
48841
+ getPath() {
48842
+ return this.path.copy();
48843
+ }
48844
+ renderHTML(documentFactory) {
48845
+ const div = documentFactory.createElement("dice-item");
48846
+ return div;
48847
+ }
48848
+ deserialize(data) {
48849
+ super.deserialize(data);
48850
+ this.transformPath();
48851
+ this.subject.publish(this);
48852
+ return this;
48853
+ }
48854
+ isClosed() {
48855
+ return true;
48856
+ }
48857
+ applyBackgroundColor(backgroundColor) {
48858
+ this.backgroundColor = backgroundColor;
48859
+ this.path.setBackgroundColor(backgroundColor);
48860
+ }
48861
+ setBackgroundColor(backgroundColor) {
48862
+ this.emit({
48863
+ class: "Dice",
48864
+ method: "setBackgroundColor",
48865
+ item: [this.getId()],
48866
+ newData: { backgroundColor },
48867
+ prevData: { backgroundColor: this.backgroundColor }
48868
+ });
48869
+ }
48870
+ applyBorderWidth(borderWidth) {
48871
+ this.borderWidth = borderWidth;
48872
+ this.path.setBorderWidth(borderWidth);
48873
+ }
48874
+ setBorderWidth(borderWidth) {
48875
+ this.emit({
48876
+ class: "Dice",
48877
+ method: "setBorderWidth",
48878
+ item: [this.getId()],
48879
+ newData: { borderWidth },
48880
+ prevData: { borderWidth: this.borderWidth }
48881
+ });
48882
+ }
48883
+ applyBorderColor(borderColor) {
48884
+ this.borderColor = borderColor;
48885
+ this.path.setBorderColor(borderColor);
48886
+ }
48887
+ setBorderColor(borderColor) {
48888
+ this.emit({
48889
+ class: "Dice",
48890
+ method: "setBorderColor",
48891
+ item: [this.getId()],
48892
+ newData: { borderColor },
48893
+ prevData: { borderColor: this.borderColor }
48894
+ });
48895
+ }
48896
+ setIsRotating(isRotating) {
48897
+ this.emit({
48898
+ class: "Dice",
48899
+ method: "setIsRotating",
48900
+ item: [this.getId()],
48901
+ newData: { isRotating },
48902
+ prevData: { isRotating: false }
48903
+ });
48904
+ }
48905
+ setValuesRange(range) {
48906
+ this.emit({
48907
+ class: "Dice",
48908
+ method: "changeValuesRange",
48909
+ item: [this.getId()],
48910
+ newData: range,
48911
+ prevData: this.range
48912
+ });
48913
+ }
48914
+ setValue(value) {
48915
+ this.emit({
48916
+ class: "Dice",
48917
+ method: "changeValue",
48918
+ item: [this.getId()],
48919
+ newData: { value },
48920
+ prevData: { value: this.value }
48921
+ });
48922
+ }
48923
+ throwDice() {
48924
+ this.setIsRotating(true);
48925
+ setTimeout(() => {
48926
+ this.setValue(Math.ceil(Math.random() * (this.range.max - this.range.min)) + this.range.min);
48927
+ this.isRotating = false;
48928
+ }, TIMEOUT);
48929
+ }
48930
+ apply(op) {
48931
+ super.apply(op);
48932
+ switch (op.class) {
48933
+ case "Dice":
48934
+ switch (op.method) {
48935
+ case "setBorderWidth":
48936
+ this.applyBorderWidth(op.newData.borderWidth);
48937
+ break;
48938
+ case "setBackgroundColor":
48939
+ this.applyBackgroundColor(op.newData.backgroundColor);
48940
+ break;
48941
+ case "setBorderColor":
48942
+ this.applyBorderColor(op.newData.borderColor);
48943
+ break;
48944
+ case "setIsRotating":
48945
+ this.isRotating = op.newData.isRotating;
48946
+ if (op.newData.isRotating) {
48947
+ setTimeout(() => {
48948
+ this.isRotating = false;
48949
+ }, TIMEOUT);
48950
+ }
48951
+ break;
48952
+ case "changeValue":
48953
+ this.value = op.newData.value;
48954
+ this.isRotating = false;
48955
+ break;
48956
+ case "changeValuesRange":
48957
+ this.range = op.newData;
48958
+ break;
48959
+ }
48960
+ break;
48961
+ }
48962
+ this.subject.publish(this);
48963
+ }
48964
+ }
48965
+ registerItem({
48966
+ item: Dice,
48967
+ defaultData: defaultDiceData,
48968
+ toolData: { name: "AddDice", tool: ShapeTool }
48969
+ });
48764
48970
  // src/Pointer/Cursor.ts
48765
48971
  var defaultCursors = [
48766
48972
  "default",