soiz1 commited on
Commit
c265fe0
·
verified ·
1 Parent(s): a05bd91

Update src/compiler/irgen.js

Browse files
Files changed (1) hide show
  1. src/compiler/irgen.js +6 -1
src/compiler/irgen.js CHANGED
@@ -212,6 +212,11 @@ class ScriptTreeGenerator {
212
  kind: 'constant',
213
  value: block.fields.TEXT.value
214
  };
 
 
 
 
 
215
  case 'polygon':
216
  const points = [];
217
  for (let point = 1; point <= block.mutation.points; point++) {
@@ -221,7 +226,7 @@ class ScriptTreeGenerator {
221
  x: this.descendInputOfBlock(block, xn),
222
  y: this.descendInputOfBlock(block, yn)
223
  });
224
- }
225
  return {
226
  kind: 'math.polygon',
227
  points
 
212
  kind: 'constant',
213
  value: block.fields.TEXT.value
214
  };
215
+ case 'checkbox':
216
+ return {
217
+ kind: 'constant',
218
+ value: block.fields.CHECKBOX.value == "TRUE"
219
+ };
220
  case 'polygon':
221
  const points = [];
222
  for (let point = 1; point <= block.mutation.points; point++) {
 
226
  x: this.descendInputOfBlock(block, xn),
227
  y: this.descendInputOfBlock(block, yn)
228
  });
229
+ };
230
  return {
231
  kind: 'math.polygon',
232
  points