Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b5ff2f0
[NEW]: created modal component to add blocks to the toolbox dynamically
jcasben Apr 5, 2025
78440f8
[UPDATE]: added new toolbox attribute to keep record of the blocks ad…
jcasben Apr 5, 2025
f3ebec5
[NEW]: created JSON with custom definition of blocks
jcasben Apr 5, 2025
31ef5b3
[UPDATE]: updated tests to match new activity model definition
jcasben Apr 5, 2025
3cfc21f
[UPDATE]: changed the way of creating and importing tasks to match ne…
jcasben Apr 5, 2025
805517d
[UPDATE]: added toolbox max number of instances each type
jcasben Apr 5, 2025
bd8c2a2
[UPDATE]: updated tests to match new activity model definition
jcasben Apr 5, 2025
4456c21
[UPDATE]: adapted creation of tasks to new toolboxInfo
jcasben Apr 5, 2025
49a45bf
[UPDATE]: added disability of custom button
jcasben Apr 6, 2025
5c903fe
[UPDATE]: added option to see the limit number of each block and add …
jcasben Apr 6, 2025
29f676b
[UPDATE]: loaded custom blocks when app loads
jcasben Apr 6, 2025
9261132
[UPDATE]: added provisional activity detail, need refactor
jcasben Apr 6, 2025
1bf10f5
[UPDATE]: refactored provisional code into his own component
jcasben Apr 6, 2025
6d33d41
[UPDATE]: remove unnecessary code from activity detail
jcasben Apr 6, 2025
288cf89
[FIX]: fixed some test with wrong definition of activity
jcasben Apr 6, 2025
e7c8e9a
[NEW]: created modal component to interact with activity description …
jcasben Apr 7, 2025
3b5ad74
[UPDATE]: moved all styles to ngClass
jcasben Apr 7, 2025
b623983
[NEW]: implemented autosave
jcasben Apr 7, 2025
1ea7b20
[UPDATE]: modified toolbox button message
jcasben Apr 7, 2025
796ab99
[UPDATE]: refactor some code and added description modal call
jcasben Apr 7, 2025
2527793
[FIX]: fixed bug in the disabling button option
jcasben Apr 8, 2025
d6c7d9f
[UPDATE]: added dependency js-interpreter
jcasben Apr 8, 2025
fbb1de0
[UPDATE]: corrected disabling button bug
jcasben Apr 8, 2025
da68964
[UPDATE]: renamed movement_forward block field
jcasben Apr 8, 2025
58a7f19
[NEW]: created service to initialize and generate the code for custom…
jcasben Apr 8, 2025
4eeffe1
[NEW]: created custom module to avoid typescript errors when using js…
jcasben Apr 8, 2025
bcbe2c7
[NEW]: created new component where the task work will be represented
jcasben Apr 8, 2025
034ef64
[NEW]: created new model to represent objects in a scene
jcasben Apr 8, 2025
74c47f4
[UPDATE]: added Scene component
jcasben Apr 8, 2025
48bcfcc
[UPDATE]: implemented js-interpreter to execute the generated code
jcasben Apr 8, 2025
26c08bc
[UPDATE]: moved type declaration to types folder
jcasben Apr 8, 2025
e2ef927
[UPDATE]: removed npm package js-interpreter
jcasben Apr 8, 2025
8535179
[NEW]: manually added js-interpreter library
jcasben Apr 8, 2025
3e173fd
[UPDATE]: changed some angular configurations no prevent some warning…
jcasben Apr 8, 2025
ec11534
[UPDATE]: deleted js-interpreter import
jcasben Apr 8, 2025
5f0ce0f
[UPDATE]: set running status to false when finished executing code
jcasben Apr 8, 2025
8fdd204
[UPDATE]: refactor file name to match with conventions
jcasben Apr 15, 2025
21d4840
[UPDATE]: added button to add new objects to the scene
jcasben Apr 15, 2025
fb338d4
[UPDATE]: refactor imports
jcasben Apr 15, 2025
2993cfb
[UPDATE]: deleted unimplemented test
jcasben Apr 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,23 @@
"styles": [
"src/styles.css"
],
"scripts": []
"scripts": [
"assets/libs/js-interpreter.js"
],
"allowedCommonJsDependencies": [
"blockly",
"blockly/core",
"blockly/msg/en",
"blockly/blocks"
]
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kB",
"maximumError": "1MB"
"maximumWarning": "2MB",
"maximumError": "5MB"
},
{
"type": "anyComponentStyle",
Expand Down
184 changes: 184 additions & 0 deletions assets/blocks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
[
{
"type": "event_start",
"message0": "Start program %1 %2",
"style": {
"hat": "cap"
},
"args0": [
{
"type": "field_image",
"src": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWZsYWctaWNvbiBsdWNpZGUtZmxhZyI+PHBhdGggZD0iTTQgMTVzMS0xIDQtMSA1IDIgOCAyIDQtMSA0LTFWM3MtMSAxLTQgMS01LTItOC0yLTQgMS00IDF6Ii8+PGxpbmUgeDE9IjQiIHgyPSI0IiB5MT0iMjIiIHkyPSIxNSIvPjwvc3ZnPg==",
"width": 20,
"height": 20,
"alt": "*",
"flipRtl": "FALSE"
},
{
"type": "input_dummy",
"name": "jump"
}
],
"nextStatement": null,
"colour": "#ffb309"
},
{
"type": "movement_jump",
"tooltip": "",
"helpUrl": "",
"message0": "jump to x: %1 y: %2 %3",
"args0": [
{
"type": "field_number",
"name": "x",
"value": 0
},
{
"type": "field_number",
"name": "y",
"value": 0
},
{
"type": "input_dummy",
"name": "jump"
}
],
"previousStatement": null,
"nextStatement": null,
"colour": 285,
"inputsInline": true
},
{
"type": "movement_turn_left",
"tooltip": "",
"helpUrl": "",
"message0": "turn left %1 %2 %3º",
"args0": [
{
"type": "field_image",
"src": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXJvdGF0ZS1jY3ctaWNvbiBsdWNpZGUtcm90YXRlLWNjdyI+PHBhdGggZD0iTTMgMTJhOSA5IDAgMSAwIDktOSA5Ljc1IDkuNzUgMCAwIDAtNi43NCAyLjc0TDMgOCIvPjxwYXRoIGQ9Ik0zIDN2NWg1Ii8+PC9zdmc+",
"width": 20,
"height": 20,
"alt": "*",
"flipRtl": "FALSE"
},
{
"type": "field_number",
"name": "angle",
"value": 0
},
{
"type": "input_dummy"
}
],
"previousStatement": null,
"nextStatement": null,
"colour": 285,
"inputsInline": true
},
{
"type": "movement_turn_right",
"tooltip": "",
"helpUrl": "",
"message0": "turn right %1 %2 %3º",
"args0": [
{
"type": "field_image",
"src": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXJvdGF0ZS1jdy1pY29uIGx1Y2lkZS1yb3RhdGUtY3ciPjxwYXRoIGQ9Ik0yMSAxMmE5IDkgMCAxIDEtOS05YzIuNTIgMCA0LjkzIDEgNi43NCAyLjc0TDIxIDgiLz48cGF0aCBkPSJNMjEgM3Y1aC01Ii8+PC9zdmc+",
"width": 20,
"height": 20,
"alt": "*",
"flipRtl": "FALSE"
},
{
"type": "field_number",
"name": "angle",
"value": 0
},
{
"type": "input_dummy"
}
],
"previousStatement": null,
"nextStatement": null,
"colour": 285,
"inputsInline": true
},
{
"type": "movement_forward",
"tooltip": "",
"helpUrl": "",
"message0": "forward %1 %2",
"args0": [
{
"type": "field_number",
"name": "steps",
"value": 0
},
{
"type": "input_dummy",
"name": "forward"
}
],
"previousStatement": null,
"nextStatement": null,
"colour": 285
},
{
"type": "controls_wait",
"tooltip": "",
"helpUrl": "",
"message0": "wait %1 seconds %2",
"args0": [
{
"type": "field_number",
"name": "seconds",
"value": 0
},
{
"type": "input_dummy",
"name": "NAME"
}
],
"previousStatement": null,
"nextStatement": null,
"colour": 210
},
{
"type": "movement_set_direction",
"tooltip": "",
"helpUrl": "",
"message0": "set direction %1 %2",
"args0": [
{
"type": "field_number",
"name": "angle",
"value": 0
},
{
"type": "input_dummy",
"name": "direction"
}
],
"previousStatement": null,
"nextStatement": null,
"colour": 285
},
{
"type": "controls_repeat_forever",
"tooltip": "",
"helpUrl": "",
"message0": "repeat forever %1 do %2",
"args0": [
{
"type": "input_dummy"
},
{
"type": "input_statement",
"name": "statement"
}
],
"previousStatement": null,
"colour": 120
}
]
Loading