diff --git a/.gitignore b/.gitignore index 3fac4adb91..e16f38cee7 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,9 @@ node_modules # external libraries extern/closure-library + +.DS_Store + +*.map + +.vscode/* \ No newline at end of file diff --git a/.jshintrc b/.jshintrc index 9cb478b690..eae0b49c5f 100644 --- a/.jshintrc +++ b/.jshintrc @@ -9,6 +9,7 @@ "validthis": true, "globals": { "goog": true, + "acorn": true, "createjs": true, "Entry": true, "Blockly": true, @@ -25,6 +26,7 @@ "mina": true, "Touch": true, "io": true, - "ActiveXObject": true + "ActiveXObject": true, + "CodeMirror": true } } diff --git a/Gruntfile.js b/Gruntfile.js index ea717e0252..b8f85c7184 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -67,6 +67,7 @@ module.exports = function(grunt) { compilerFile: 'node_modules/closurecompiler/compiler/compiler.jar', checkModified: true, compilerOpts: { + create_source_map: 'entry.js.map', compilation_level: 'SIMPLE_OPTIMIZATIONS', language_in: 'ECMASCRIPT5', language_out: 'ECMASCRIPT5', @@ -74,7 +75,7 @@ module.exports = function(grunt) { } }, targetName: { - src: ['src/entry.js', 'src/**/*.js'], + src: ['src/entry.js', 'src/**/*.js', '!src/workspace/block_entry.js'], dest: 'dist/entry.js' }, dist: { diff --git a/dist/entry.css b/dist/entry.css index 68d9da50d4..baacfc0c6a 100644 --- a/dist/entry.css +++ b/dist/entry.css @@ -1,4443 +1,5907 @@ - -.dragNone { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; +/* BASICS */ +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: 'Nanum Gothic Coding' !important; + height: 100%; + color: black; } -.entryHidden { - visibility: hidden; +.CodeMirror * { + font-family: 'Nanum Gothic Coding' !important; } -.entryRemove { - display: none !important; +/* PADDING */ +.CodeMirror-sizer { + padding-top: 7px; } -.entryRemoveElement { - display: none !important; +.CodeMirror-lines { + padding: 5px 0; + /* Vertical padding around content */ } -.entryNoDeco { - text-decoration: none !important; +.CodeMirror pre { + padding: 0 5px; + /* Horizontal padding of content */ } -.entryBtn { - border: none; - margin: 0; - background-color: transparent; +.CodeMirror-scrollbar-filler, +.CodeMirror-gutter-filler { + background-color: white; + /* The little square between H and V scrollbars */ } -.entrySceneWorkspace { - height: 40px; - width: 100%; - background-color: #5096f5; - position: fixed; - overflow: hidden; +/* GUTTER */ +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; } -.entrySceneListWorkspace { - margin: 0px; - padding: 0px 5px 0px 55px; +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #A0A0A0; + white-space: nowrap; } -.entrySceneElementWorkspace { - float: left; - display: inline-block; - list-style-type: none; - color: white; - font-size: 10pt; - cursor: move; - border-radius: 20px; - margin-left: -40px; - position: relative; - margin-right: -2px; +.CodeMirror-guttermarker { + color: black; } -.entrySceneElementWorkspace.selectedScene { - z-index: 888; +.CodeMirror-guttermarker-subtle { + color: #999; } -.entrySceneAddButtonWorkspace:hover { - background-color: #A3CAF5; +/* CURSOR */ +.CodeMirror-cursor { + border-left: 1px solid black; + border-right: none; + width: 0; } -.entrySceneAddButtonWorkspace { - float: left; - margin-left: -23px; - margin-top: 8px; - width: 23px; - height: 23px; - position: relative; - z-index: 999; - cursor: pointer; - background-image: url("../../images/top_icon_add_b_nor.png"); +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; } -.selectedScene .entrySceneLeftWorkspace { - background-image: url("../../images/top_tab_b_sel_left.png"); +.cm-fat-cursor .CodeMirror-cursor { + width: auto; + border: 0; + background: #7e7; } -.entrySceneLeftWorkspace { - display: inline-block; - float: left; - width: 15px; - height: 40px; - background-image: url("../../images/top_tab_b_nor_left_blue.png"); +.cm-fat-cursor div.CodeMirror-cursors { + z-index: 1; } -.entrySceneInputCover { - margin-left: -1px; - display: inline-block; - float: left; - height: 40px; - width: 76px; - padding-top: 11px; - padding-right: 2px; - background-color: #0e68e3; +.cm-animate-fat-cursor { + width: auto; + border: 0; + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; + background-color: #7e7; +} +@-moz-keyframes blink { + 50% { + background-color: transparent; + } } -.minValue .entrySceneInputCover { - min-width: 70px; +@-webkit-keyframes blink { + 50% { + background-color: transparent; + } } -.entrySceneFieldWorkspace { - cursor: text !important; +@keyframes blink { + 50% { + background-color: transparent; + } +} +/* Can style cursor different in overwrite (non-insert) mode */ +.cm-tab { display: inline-block; - margin: 0px; - height: 20px; - width: 100%; - color: white; - border: 1px solid transparent; - background-color: #0e68e3; - padding: 0px 0px 0px 5px; + text-decoration: inherit; } -.entrySceneFieldWorkspace:focus { - background-color: #eee; - color: #000; +.CodeMirror-ruler { + border-left: 1px solid #ccc; + position: absolute; } -.selectedScene .entrySceneInputCover { - background-color: white; - min-width: 70px; +/* DEFAULT THEME */ +.cm-s-default .cm-header { + color: blue; } -.selectedScene .entrySceneFieldWorkspace { - background-color: white; - color: black; +.cm-s-default .cm-quote { + color: #090; } -.entrySceneFieldWorkspace:hover, -.entrySceneFieldWorkspace:focus, -.entrySceneFieldWorkspace:active { - outline: none; - border: 1px solid gray; +.cm-negative { + color: #d44; } -.entrySceneRemoveButtonCoverWorkspace { - border: 0; - padding: 0; - width: 55px; - background-color: transparent; - display: inline-block; - float: left; - height: 40px; - position: relative; - background-image: url("../../images/top_tab_b_nor_right_blue.png"); +.cm-positive { + color: #292; } -.selectedScene .entrySceneRemoveButtonCoverWorkspace { - display: inline-block; - background: url("../../images/top_tab_b_sel_right.png"); +.cm-header, +.cm-strong { + font-weight: bold; } -.entrySceneRemoveButtonWorkspace { - border: 0; - padding: 0; - width: 12px; - background-color: #0e68e3; - height: 14px; - position: absolute; - right: 45px; - top: 12px; - display: none; +.cm-em { + font-style: italic; } -.selectedScene .entrySceneRemoveButtonWorkspace { - background-color: white; - color: black; +.cm-link { + text-decoration: underline; } -.minValue .entrySceneRemoveButtonWorkspace { - display: inline-block; +.cm-strikethrough { + text-decoration: line-through; } -.entrySceneRemoveButtonWorkspace:hover { - color: #FF3E24; +.cm-s-default .cm-keyword { + color: #2BBFED ; } -.entryStateManagerWorkspace { - float: right; - height: 40px; - margin-right: 10px; +.cm-s-default .cm-atom { + color: #FF9E00; } -.entryStateManagerButtonWorkspace { - border: 0; - margin: 3px; - padding-left: 26px; - height: 32px; - border-radius: 4px; - background-color: #BDC4C9; - color: #E2EBFA; - font-size: 10pt; - background-repeat: no-repeat; - background-position: 7px 8px; - border-bottom: 2pt solid #A0ACB2; - border-right: 2pt solid #A0ACB2; +.cm-s-default .cm-number { + color: #E22C0B; } -.entryStateManagerButtonWorkspace.active:hover { - background-color: #7CC2EE; +.cm-s-default .cm-def { + color: #4F39DB; } -.entryStateManagerButtonWorkspace.active { - background-color: #6AAFDA; - border-bottom: 2pt solid #639FBD; - border-right: 2pt solid #639FBD; +.cm-s-default .cm-variable, +.cm-s-default .cm-punctuation, +.cm-s-default .cm-property, +.cm-s-default .cm-operator { + color: #E22C0B; } -.entryUndoButtonWorkspace { - background-image: url("/img/assets/undo.png"); +.cm-s-default .cm-variable-2 { + color: #0FC764; } -.entryRedoButtonWorkspace { - background-image: url("/img/assets/redo.png"); +.cm-s-default .cm-variable-3 { + color: #085; } -.entryCanvasWrapper { - position: absolute; +.cm-s-default .cm-comment { + color: #a50; } -.entryCanvasWorkspace { - width: 480px; - height: 270px; - background-color: white; - display: block; - position: absolute; - top: 24px; +.cm-s-default .cm-string { + color: #4F39DB; } -.entryPopupWindow .entryCanvasWorkspace { - top: -11px !important; +.cm-s-default .cm-string-2 { + color: #f50; } -.entryCanvasPhone { - width: 100%; - background-color: white; - display: block; +.cm-s-default .cm-meta { + color: #555; } -.entryPopupWindow > .entryCanvasWorkspace { - width: 100% !important; - height: 100% !important; - position: relative; - border-bottom: 1px solid #ccc; - border-top: 0px; +.cm-s-default .cm-qualifier { + color: #555; } -.entryPopupWindow > .entryEngine_w { - width: 100% !important; - height: 100% !important; +.cm-s-default .cm-builtin { + color: #30a; } -.entryEngine_w > .entryCanvasWorkspace { - border-top: 1px solid #ccc; +.cm-s-default .cm-bracket { + color: #997; } -.entryPopupWindow > div > .entryCanvasWorkspace { - bottom: 24px; - border-bottom: 1px solid #ccc; - width: 100% !important; - height: 100% !important; - top: -25px !important; +.cm-s-default .cm-tag { + color: #170; } -.entryEngineWorkspace { - height: 35px; - width: 480px; - background-color: white; - border-top: 1pt solid #ebeff1; +.cm-s-default .cm-attribute { + color: #00c; } -.entryEngineMinimize { - height: 35px; - width: 100%; - background-color: white; - border-top: 1pt solid #ebeff1; +.cm-s-default .cm-hr { + color: #999; } -.entryEngineWorkspace_w { - height: 225px; - width: 400px; - background-color: white; - border-top: 1pt solid #ebeff1; - position: absolute; +.cm-s-default .cm-link { + color: #00c; } -.entryPopupWindow > .entryEngineWorkspace { - position: absolute; - top: auto !important; - width: 100% !important; - bottom: 0px; +.cm-s-default .cm-error { + color: #f00; } -.entryPopupWindow > .entryEngineWorkspace_w { - position: absolute; - width: 100% !important; - top: 0px !important; +.cm-invalidchar { + color: #f00; } -.entryPopupWindow > .entryEngineWorkspace_w > .entryRunButtonWorkspace_w { - display: none; - top: 37%; - left: 46%; +.CodeMirror-composing { + border-bottom: 2px solid; } -.entryPopupWindow > .entryEngineWorkspace_w > .entryRunButtonWorkspace_w2 { - display: block; - width: 111px; - height: 111px; - background-image: url("../../images/play_btn.png"); - background-position: 40px center; - background-color: rgba(0, 0, 0, 0.5); - border-radius: 55px; - background-repeat: no-repeat; - right: 5px; - /*bottom: 5px;*/ - bottom: -10px; - left: 44%; - top: 35%; +/* Default styles for common addons */ +div.CodeMirror span.CodeMirror-matchingbracket { + color: #0f0; } -.entryPopupWindow > .entryEngineWorkspace_w > .entryStopButtonWorkspace_w2 { - display: block; - background-image: url("../../images/stop_btn.png"); - background-repeat: no-repeat; - left: 20px; - color: transparent; - bottom: -10px; - width: 90px; - background-position: left; - color: #4b37a0; +div.CodeMirror span.CodeMirror-nonmatchingbracket { + color: #f22; } -.entryPopupWindow > .entryEngineWorkspace_w > .entryStopButtonWorkspace_w { - display: none; +.CodeMirror-matchingtag { + background: rgba(255, 150, 0, 0.3); } -.entryPopupWindow > .entryEngineWorkspace_w > .entryCoordinateButtonWorkspace_w { - background-image: url("../../images/grid.png") !important; - right: 34px; - color: #4b37a0; +.CodeMirror-activeline-background { + background: #E7F1FD; } -.entryPopupWindow > .entryEngineWorkspace_w > .entryMaximizeButtonWorkspace_w { - background-image: url("../../images/zoom_out_btn.png"); - background-repeat: no-repeat; - right: 5px; +/* STOP */ +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ +.CodeMirror { + position: relative; + overflow: hidden; + background: white; } -.entryPopupWindow > .entryEngineWorkspace_w > .entryEngineButtonWorkspace_w { - position: absolute; - bottom: 1px; +.CodeMirror-scroll { + overflow: scroll !important; + /* Things will break if this is overridden */ + /* 30px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -30px; + margin-right: -30px; + padding-bottom: 30px; + height: 100%; + outline: none; + /* Prevent dragging from highlighting the element */ + position: relative; } -.entryPopupWindow > .entryEngineWorkspace_w > .entryAddButtonWorkspace_w { +.CodeMirror-sizer { + position: relative; + border-right: 30px solid transparent; +} +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actuall scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, +.CodeMirror-hscrollbar, +.CodeMirror-scrollbar-filler, +.CodeMirror-gutter-filler { + position: absolute; + z-index: 6; display: none; } -.entryEngineBlueWorkspace { - background-color: #61abdb; +.CodeMirror-vscrollbar { + right: 0; + top: 0; + overflow-x: hidden; + overflow-y: scroll; } -.entryEngineButtonWorkspace { - border: none; - outline: none; - width: 25px; - height: 35px; - background-color: transparent; - background-repeat: no-repeat; - background-position: center; +.CodeMirror-hscrollbar { + bottom: 0; + left: 0; + overflow-y: hidden; + overflow-x: scroll; } -.entryEngineButtonMinimize { - border: none; - outline: none; - width: 25px; - height: 35px; - background-color: transparent; - background-repeat: no-repeat; - background-position: center; +.CodeMirror-scrollbar-filler { + right: 0; + bottom: 0; } -.entryEngineButtonWorkspace_w { - border: none; - outline: none; - width: 25px; - height: 24px; - background-color: transparent; - background-repeat: no-repeat; - background-position: center; +.CodeMirror-gutter-filler { + left: 0; + bottom: 0; } -.entryRunButtonPhone { - width: 100%; - height: 100%; - border: none; - background-color: transparent; - font-size: 12pt; - border-bottom: 2px solid #89c0d5; - background-image: url("../../images/layers_icon_button_play_nor.png"); - background-position: 10px 50%; - background-repeat: no-repeat; +.CodeMirror-gutters { + position: absolute; + left: 0; + top: 0; + z-index: 3; } -.entryStopButtonPhone { - width: 100%; +.CodeMirror-gutter { + white-space: normal; height: 100%; - border: none; - background-color: transparent; - font-size: 12pt; - border-bottom: 2px solid #89c0d5; - background-image: url("../../images/layers_icon_button_stop_nor.png"); - background-position: 10px 50%; - background-repeat: no-repeat; + display: inline-block; + margin-bottom: -30px; + /* Hack to make IE7 behave */ + *zoom: 1; + *display: inline; } -.entryEnginePhone { - width: 100%; +.CodeMirror-gutter-wrapper { + position: absolute; + z-index: 4; + background: none !important; + border: none !important; } -.entryEngineHeaderPhone { - border-bottom: 1px solid #ccc; - width: 100%; - background-color: #fff; - height: 34px; +.CodeMirror-gutter-background { + position: absolute; + top: 0; + bottom: 0; + z-index: 4; } -.entryEngineFooterPhone { - border-top: 1px solid #ccc; - width: 100%; - background-color: #fff; - height: 38px; +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; } -.entryMouseViewWorkspace { - position: relative; - font-size: 9pt; - margin: 0 auto; - width: 40%; - color: #61abdb; - line-height: 35px; - text-align: center; +.CodeMirror-gutter-wrapper { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } -.entryMouseViewMinimize { - font-size: 9pt; - margin: 0 auto; - width: 40%; - color: #6c5af2; - line-height: 35px; - text-align: center; +.CodeMirror-lines { + cursor: text; + min-height: 1px; + /* prevents collapsing before first draw */ } -.entryMouseViewWorkspace_w { - font-size: 9pt; - margin: 0 auto; - width: 40%; - color: #61abdb; - line-height: 24px; - text-align: center; +.CodeMirror pre { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; + -webkit-tap-highlight-color: transparent; } -.entryEngineBlueWorkspace > .entryMouseViewWorkspace { - color: white; +.CodeMirror-wrap pre { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; } -.entryMaximizeButtonWorkspace { - float: left; - margin-left: 5px; - background-image: url("../../images/fullscreen_edit.png"); +.CodeMirror-linebackground { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 0; } -.entryMaximizeButtonMinimize { - float: right; - margin-right: 5px; - background-image: url("../../images/zoom_in_btn.png"); +.CodeMirror-linewidget { + position: relative; + z-index: 2; + overflow: auto; } -.entryPopupWindow > .entryEngineMinimize > .entryMaximizeButtonMinimize { - float: right; - margin-right: 5px; - background-image: url("../../images/zoom_out_btn.png"); +.CodeMirror-code { + outline: none; } -.entryMaximizeButtonPhone { - width: 20px; - height: 100%; - border: none; - float: right; - margin-right: 9px; - background-repeat: no-repeat; - background-position: center; - background-color: transparent; - background-image: url("../../images/layers_icon_fullmode01_nor.png"); +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { + -moz-box-sizing: content-box; + box-sizing: content-box; } -.entryMaximizeButtonWorkspace_w { - float: right; - margin-right: 5px; - background-image: url("../../images/layers_icon_fullmode01_nor_1.png"); - background-repeat: no-repeat; +.CodeMirror-measure { + position: absolute; + width: 100%; + height: 0; + overflow: hidden; + visibility: hidden; } -.entryEngineBlueWorkspace > .entryMaximizeButtonWorkspace { - background-image: url("../../images/fullscreen_play.png"); +.CodeMirror-cursor { + position: absolute; } -#entrySpeedPanelWorkspace { - width: 100%; - height: 0px; - background-color: #0e0; +.CodeMirror-measure pre { + position: static; } -.entrySpeedButtonWorkspace { - float: left; - background-size: contain; - width: 22px; - height: 15px; - margin-top: 5px; - margin-left: 10px; - background-image: url("../../images/speed_edit.png"); +div.CodeMirror-cursors { + visibility: hidden; + position: relative; + z-index: 3; } -.entryPopupWindow > div > .entrySpeedButtonWorkspace { - display: none; +div.CodeMirror-dragcursors { + visibility: visible; } -.entryPopupWindow .entryMouseViewWorkspace_w { - font-size: 9pt; - margin: 0 auto; - width: 100%; - color: #4b37a0; - line-height: 24px; - bottom: 1px; - position: absolute; - text-align: center; +.CodeMirror-focused div.CodeMirror-cursors { + visibility: visible; } -#entrySpeedProgressWorkspace { - position: absolute; - display: block; - left: 80px; - top: 23px; - right: 4px; - height: 13px; +.CodeMirror-selected { + background: #d9d9d9; } -#entrySpeedProgressWorkspace > tr { - width: 100%; +.CodeMirror-focused .CodeMirror-selected { + background: #E4F9ED; } -#entrySpeedProgressWorkspace > tr > td { - position: absolute; - height: 14px; - width: 20%; - cursor: pointer; +.CodeMirror-crosshair { + cursor: crosshair; } -#progressCell0 { - border-top-left-radius: 6.5px; - border-bottom-left-radius: 6.5px; - left: 0%; - background-color: #bee8f4; +.CodeMirror-line::selection, +.CodeMirror-line > span::selection, +.CodeMirror-line > span > span::selection { + background: #d7d4f0; } -#progressCell1 { - left: 20%; - background-color: #96cfe7; +.CodeMirror-line::-moz-selection, +.CodeMirror-line > span::-moz-selection, +.CodeMirror-line > span > span::-moz-selection { + background: #d7d4f0; } -#progressCell2 { - left: 40%; - background-color: #83b8e1; +.cm-searching { + background: #ffa; + background: rgba(255, 255, 0, 0.4); } -#progressCell3 { - left: 60%; - background-color: #67a9c9; +/* IE7 hack to prevent it from returning funny offsetTops on the spans */ +.CodeMirror span { + *vertical-align: text-bottom; } -#progressCell4 { - border-top-right-radius: 6.5px; - border-bottom-right-radius: 6.5px; - left: 80%; - background-color: #5099b5; +/* Used to force a border model for a node */ +.cm-force-border { + padding-right: .1px; } -#entrySpeedLabelWorkspace { - clear: both; - display: block; - font-family: ng; - padding-top: 2px; - padding-left: 10px; - font-size: 11px; +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursors { + visibility: hidden; + } } -#entrySpeedHandleWorkspace { - position: absolute !important; - cursor: pointer; - width: 18px; - height: 16px; - top: 21px; - z-index: 100; - background-image: url("../../images/speed_handle.png"); +/* See issue #2901 */ +.cm-tab-wrap-hack:after { + content: ''; } -.entryCoordinateButtonWorkspace { - float: right; - background-image: url("../../images/coordinates_edit.png"); +/* Help users use markselection to safely style text background */ +span.CodeMirror-selectedtext { + background: none; } -.entryCoordinateButtonMinimize { - float: right; - background-image: url("../../images/grid.png"); + +.dragNone { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } -.entryCoordinateButtonWorkspace_w { - float: right; - background-image: url("../../images/layers_icon_grid_nor.png"); +.entryHidden { + visibility: hidden; } -.entryCoordinateButtonWorkspace.toggleOn { - background-image: url("../../images/coordinates_edit_on.png"); +.entryRemove { + display: none !important; } -.entryCoordinateButtonWorkspace_w.toggleOn { - background-image: url("../../images/layers_icon_grid_nor_1.png"); +.entryRemoveElement { + display: none !important; } -.entryEngineBlueWorkspace > .entryCoordinateButtonWorkspace { - background-image: url("../../images/coordinates_play.png"); +.entryNoDeco { + text-decoration: none !important; } -.entryRunButtonWorkspace { - float: right; - width: 80px; - background-position: 7px 50%; - padding-right: 10px; - text-align: right; - font-size: 9pt; - color: #61abdb; - background-image: url("../../images/playbutton_edit.png"); +.entryBtn { + border: none; + margin: 0; + background-color: transparent; } -.entryRunButtonMinimize { - display: none; - float: left; - width: 65px; - font-size: 9pt; - color: #6c5af2; + +.dragNone { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } -.entryAddButtonWorkspace_w { - top: 289px; - left: 0px; - width: 236px; - height: 38px; - font-size: 12pt; - background-color: #fff; - color: #666666; - text-align: center; - position: absolute; - border-top: 1px solid #ccc; - padding-left: 50px; - background-repeat: no-repeat; - background-position: 10% 43%; - font-family: nanumBarunBold !important; - background-image: url("../../images/layers_icon_button_plus_nor.png"); +.entryHidden { + visibility: hidden; } -.collapsed > .entryAddButtonWorkspace_w { - color: transparent; - background-position: 50% 43%; +.entryRemove { + display: none !important; } -.entryRunButtonWorkspace_w { - top: 289px; - left: 272px; - width: 156px; - height: 38px; - font-size: 12pt; - border-left: 1px solid #ccc; - border-top: 1px solid #ccc; - background-color: #fff; - padding-left: 28px; - color: #666666; - text-align: center; - position: absolute; - background-repeat: no-repeat; - background-position: 10% 43%; - font-family: nanumBarunBold !important; - background-image: url("../../images/layers_icon_button_play_nor_1.png"); +.entryRemoveElement { + display: none !important; } -.collapsed > .entryRunButtonWorkspace_w { - color: transparent; - background-position: 50% 43%; +.entryNoDeco { + text-decoration: none !important; } -.entryRunButtonWorkspace_w2 { - display: none; +.entryBtn { + border: none; + margin: 0; + background-color: transparent; } -.entryEngineBlueWorkspace > .entryRunButtonWorkspace { - background-image: url("../../images/playbutton_play.png"); - color: white; +.block.selected > g > .blockPath { + stroke-width: 3px; + stroke: #798EB1; } -.entryStopButtonWorkspace { - float: right; - width: 80px; - background-position: 7px 50%; - border-top: 1px solid #ccc; - padding-right: 10px; - text-align: right; - font-size: 9pt; - color: #61abdb; - background-image: url("../../images/stopbutton_pause.png"); +.block.outputHighlight > g > .blockPath { + stroke-width: 2px; + stroke: white; } -.entryStopButtonMinimize { - float: left; - width: 80px; - background-position: 7px 50%; - padding-right: 10px; - text-align: right; - font-size: 9pt; - color: #6c5af2; - background-image: url("../../images/stop_btn.png"); +.block.basicButtonView { + cursor: pointer; } -.entryStopButtonWorkspace_w { - top: 289px; - left: 272px; - width: 156px; - height: 38px; - font-size: 12pt; - border-top: 1px solid #ccc; - border-left: 1px solid #ccc; - background-color: #fff; - color: #666666; - padding-left: 28px; - text-align: center; - position: absolute; - background-repeat: no-repeat; - background-position: 10% center; - font-weight: 600; - background-image: url("../../images/layers_icon_button_stop_nor_1.png"); +.block.basicButtonView:hover > g > path { + fill: #f4f4f4; } -.collapsed > .entryStopButtonWorkspace_w { - color: transparent; - background-position: 50% 43%; +.block { + cursor: url('../images/handopen.cur') 8 5, auto; + -ms-touch-action: none; } -.entryStopButtonWorkspace_w2 { - display: none; +.block.dragging { + cursor: url('../images/handclosed.cur') 8 5, auto; } -.entryPauseButtonWorkspace_w { - display: none; +.block.selected > path { + stroke-width: 3px; + stroke: #798EB1; } -.entryEngineBlueWorkspace > .entryStopButtonWorkspace { - background-image: url("../../images/stopbutton_play.png"); - color: white; +.block.activated > g > path { + stroke-width: 3px; + stroke: red; + /*stroke-dasharray: 20;*/ + /*stroke-dashoffset: 1000;*/ + /*-webkit-animation: activationDash 15s forwards linear;*/ + /*-webkit-animation-iteration-count: infinite;*/ + /*-moz-animation: activationDash 15s forwards linear;*/ + /*-moz-animation-iteration-count: infinite;*/ + /*animation: activationDash 15s forwards linear;*/ + /*animation-iteration-count: infinite;*/ + /*-o-animation: activationDash 15s forwards linear;*/ + /*-o-animation-iteration-count: infinite;*/ + /*-ms-animation: activationDash 15s forwards linear;*/ + /*-ms-animation-iteration-count: infinite;*/ +} +@keyframes activationDash { + to { + stroke-dashoffset: 0; + } } -.entryPauseButtonWorkspace { - float: right; - background-image: url("../../images/pausebutton_edit.png"); +@-o-keyframes activationDash { + to { + stroke-dashoffset: 0; + } } -.entryPauseButtonMinimize { - float: left; - background-image: url("../../images/pause_btn.png"); - width: auto; - background-position: left; - padding-left: 17px; - color: #6c5af2; - font-size: 9pt; +@-ms-keyframes activationDash { + to { + stroke-dashoffset: 0; + } } -.entryEngineBlueWorkspace > .entryPauseButtonWorkspace { - background-image: url("../../images/pausebutton_play.png"); - color: white; +@-moz-keyframes activationDash { + to { + stroke-dashoffset: 0; + } } -.propertyPanel { - position: absolute; - top: 326px; - bottom: 0px; - width: 400px; - background-color: #e7e7e7; - border-top: 2px solid #5096f5; +@-webkit-keyframes activationDash { + to { + stroke-dashoffset: 0; + } } -.propertyTab { - width: 50px; - height: 100%; - background-color: #f5f5f5; +.block g text, +.block g image { + pointer-events: none; } -.collapsed .propertyTab { - width: 30px; +svg .svgBlockGroup text { + white-space: pre; } -.propertyTabElement { - width: 100%; - height: 40px; - background-color: #dbdcdc; - background-repeat: no-repeat; - background-position: 50% 6px; - color: #9e9e9f; - font-size: 11px; - padding-top: 24px; +.entry-field-color { cursor: pointer; - text-align: center; -} -.collapsed .propertyTabElement { - background-position: 50% 9px; - height: 36px; - font-size: 0; } -.propertyTabElement.selected { - background-color: #5096f5; - color: #fff; -} -.propertyTabobject { - background-image: url("../../images/property/container_off.png"); -} -.propertyTabobject.selected { - background-image: url("../../images/property/container_on.png"); -} -.propertyTabhw { - background-image: url("../../images/property/hw_off.png"); -} -.propertyTabhw.selected { - background-image: url("../../images/property/hw_on.png"); -} -.propertyTabtvCast { - background-image: url("../../images/property/vedio_off.png"); +.entry-input-field { + cursor: text; } -.propertyTabtvCast.selected { - background-image: url("../../images/property/vedio_on.png"); +.entry-input-field:hover rect { + stroke-width: 1.5px; + stroke: white; } -.propertyTabyoutube { - background-image: url("../../images/property/vedio_off.png"); +.entry-widget-input-field { + position: fixed; + font-family: ng; + font-size: 9pt; + border: none; + outline: none; + line-height: normal; } -.propertyTabyoutube.selected { - background-image: url("../../images/property/vedio_on.png"); +.entry-field-angle { + cursor: default; } -.propertyTabgoal { - background-image: url("../../images/property/doneproject.png"); +.entry-field-angle-circle { + stroke: #444; + stroke-width: 1; + fill: #ddd; + fill-opacity: 0.8; } -.propertyTabgoal.selected { - background-image: url("../../images/property/doneproject_on.png"); +.entry-angle-divider { + stroke: #444; + stroke-width: 1; } -.propertyContent { - position: absolute; - top: 0; - bottom: 0; - left: 50px; - right: 0; - background-color: #363C46; +.entry-angle-indicator { + stroke: #f00; + stroke-width: 2; + stroke-linecap: round; } -.collapsed .propertyContent { - left: 30px; +.entry-angle-fill-area { + fill: #f88; + fill-opacity: 0.8; } -.hwMonitor { - background-color: #363c46; +.entryWorkspaceFilters { position: absolute; + left: -100px; + top: -100px; } -.hwComponent text { - font-size: 12px; -} -.entryContainerWorkspace { - background-color: #e7e7e7; -} -.entryContainerPhone { - width: 100%; - background-color: #e7e7e7; +.entry-widget-keyboard-input { + position: fixed; } -.entryAddObjectWorkspace { - display: block; - height: 48px; - background-color: #e7e7e7; - color: #757575; - text-align: center; - font-size: 11pt; - line-height: 44px; - margin: 10px; - border: 2px dashed #979797; +.entry-widget-dropdown { + position: fixed; cursor: pointer; -} -.entryContainerListWorkspaceWrapper { - position: absolute; - bottom: 0; - padding: 0; + list-style: none; + background-color: white; + border: 1px gray solid; margin: 0; + padding: 0; + text-align: left; + font-size: 9pt; + color: #000; + z-index: 1001; overflow: auto; - width: 100%; - top: 0; - background-color: #363C46; } -.entryContainerListWorkspace { - position: relative; - margin: 0px; - padding: 0px; +.entry-widget-dropdown .rect { + height: 20px; + padding: 3px 19px 3px 6px; width: 100%; - background-color: #363C46; - list-style-type: none; - border-top: 1pt solid #ebeff1; } -.entryContainerListPhone { - position: relative; +.entry-widget-dropdown .rect .left { + display: inline-block; + width: 13px; +} +.entry-widget-dropdown .rect .right { + display: inline-block; +} +.entry-widget-dropdown .rect:hover { + background-color: #127cdb; + color: white; +} +.blockHoverPattern .pattern1 { + opacity: 0; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -ms-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + -webkit-animation-direction: alternate; + -moz-animation-direction: alternate; + -ms-animation-direction: alternate; + -o-animation-direction: alternate; + -webkit-animation-name: blockPatternAnimation; + -moz-animation-name: blockPatternAnimation; + -ms-animation-name: blockPatternAnimation; + -o-animation-name: blockPatternAnimation; + animation-name: blockPatternAnimation; + -webkit-animation-iteration-count: infinite; + -moz-animation-iteration-count: infinite; + -ms-animation-iteration-count: infinite; + -o-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} +.blockHoverPattern .pattern2 { + opacity: 0; + -webkit-animation-delay: 0.33s; + -moz-animation-delay: 0.33s; + -ms-animation-delay: 0.33s; + -o-animation-delay: 0.33s; + animation-delay: 0.33s; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -ms-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + -webkit-animation-direction: alternate; + -moz-animation-direction: alternate; + -ms-animation-direction: alternate; + -o-animation-direction: alternate; + -webkit-animation-name: blockPatternAnimation; + -moz-animation-name: blockPatternAnimation; + -ms-animation-name: blockPatternAnimation; + -o-animation-name: blockPatternAnimation; + animation-name: blockPatternAnimation; + -webkit-animation-iteration-count: infinite; + -moz-animation-iteration-count: infinite; + -ms-animation-iteration-count: infinite; + -o-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} +.blockHoverPattern .pattern3 { + opacity: 0; + -webkit-animation-delay: 0.67s; + -moz-animation-delay: 0.67s; + -ms-animation-delay: 0.67s; + -o-animation-delay: 0.67s; + animation-delay: 0.67s; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -ms-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + -webkit-animation-direction: alternate; + -moz-animation-direction: alternate; + -ms-animation-direction: alternate; + -o-animation-direction: alternate; + -webkit-animation-name: blockPatternAnimation; + -moz-animation-name: blockPatternAnimation; + -ms-animation-name: blockPatternAnimation; + -o-animation-name: blockPatternAnimation; + animation-name: blockPatternAnimation; + -webkit-animation-iteration-count: infinite; + -moz-animation-iteration-count: infinite; + -ms-animation-iteration-count: infinite; + -o-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} +.blockHoverPattern .pattern4 { + opacity: 0; + -webkit-animation-delay: 1s; + -moz-animation-delay: 1s; + -ms-animation-delay: 1s; + -o-animation-delay: 1s; + animation-delay: 1s; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -ms-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + -webkit-animation-direction: alternate; + -moz-animation-direction: alternate; + -ms-animation-direction: alternate; + -o-animation-direction: alternate; + -webkit-animation-name: blockPatternAnimation; + -moz-animation-name: blockPatternAnimation; + -ms-animation-name: blockPatternAnimation; + -o-animation-name: blockPatternAnimation; + animation-name: blockPatternAnimation; + -webkit-animation-iteration-count: infinite; + -moz-animation-iteration-count: infinite; + -ms-animation-iteration-count: infinite; + -o-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} +@keyframes blockPatternAnimation { + from { + opacity: 0; + } + to { + opacity: 0.2; + } +} +@-o-keyframes blockPatternAnimation { + from { + opacity: 0; + } + to { + opacity: 0.2; + } +} +@-ms-keyframes blockPatternAnimation { + from { + opacity: 0; + } + to { + opacity: 0.2; + } +} +@-moz-keyframes blockPatternAnimation { + from { + opacity: 0; + } + to { + opacity: 0.2; + } +} +@-webkit-keyframes blockPatternAnimation { + from { + opacity: 0; + } + to { + opacity: 0.2; + } +} +.entry-field-dropdown { + cursor: default; +} +.entryWorkspaceBlockMenu { + background-color: #e5e5e5; + position: absolute; + top: 45px; + bottom: 0px; +} +.entryCategoryListWorkspace { + width: 64px; + height: 100%; + display: inline-block; + background-color: #f5f5f5; + list-style-type: none; + margin: 0; + padding: 0; +} +.blockMenuContainer { + display: inline-block; + vertical-align: top; + width: 200px; + height: 100%; +} +.blockMenu { + height: 100%; + width: 100%; +} +.entryCategoryListPhone { + padding: 0; + margin: 0; + list-style-type: none; +} +.entryCategoryElementWorkspace { + clear: both; + padding-top: 38px; + width: 64px; + text-align: center; + background-color: #edf5f7; + font-size: 13px; + color: #474747; + float: left; + border-bottom: 1px solid #a6cafb; + cursor: pointer; + font-family: nanumBarunBold !important; +} +@media screen and (max-height: 10000px) { + .entryCategoryElementWorkspace { + height: 61px; + background-position: 50% 6px; + padding-top: 38px; + } +} +@media screen and (max-height: 880px) { + .entryCategoryElementWorkspace { + height: 56px; + background-position: 50% 4px; + padding-top: 34px; + } +} +@media screen and (max-height: 810px) { + .entryCategoryElementWorkspace { + height: 50px; + background-position: 50% 2px; + padding-top: 30px; + } +} +@media screen and (max-height: 740px) { + .entryCategoryElementWorkspace { + height: 42px; + background-position: 50% 1px; + background-size: 35px; + padding-top: 23px; + } +} +@media screen and (max-height: 640px) { + .entryCategoryElementWorkspace { + height: 36px; + background-position: 50% 1px; + background-size: 30px; + padding-top: 18px; + } +} +.entryCategoryElementPhone { + height: 50px; + clear: both; + width: 56px; + padding-top: 30px; + text-align: center; + background-color: #E2E9F0; + font-size: 13px; + color: #474747; + float: left; + border-bottom: 1px solid #B7C4CC; + background-position: 5px 2px; + cursor: pointer; +} +.entryCategoryElementEndWorkspace { + clear: both; + width: 3px; + margin-left: 56px; + background-color: #515B7C; + height: 4000px; +} +.entrySelectedCategory { + margin: 0; + background-color: #e5e5e5; +} +.entryCategoryWorkspace { + width: 74px; + height: 100%; + display: block; +} +.entryBlockMenuWorkspace { + background-color: #e5e5e5; + position: absolute; + left: 64px; + top: 45px; + width: 186px; + bottom: 0px; + z-index: 100; +} +#entryCategorymoving { + /*border-right: 4px solid #A751E3;*/ + background-image: url("../images/movement.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategorymoving { + /*border-left: 4px solid #A751E3;*/ + border-right: none; +} +#entryCategorylooks { + /*border-right: 4px solid #EC4466;*/ + background-image: url("../images/looks.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategorylooks { + /*border-left: 4px solid #EC4466;*/ + border-right: none; +} +#entryCategorybrush { + /*border-right: 4px solid #FF9E20;*/ + background-image: url("../images/brush.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategorybrush { + border-right: none; +} +#entryCategorytext { + background-image: url("../images/postbox_new.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategorytext { + border-right: none; +} +#entryCategorysound { + background-image: url("../images/sound.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategorysound { + border-right: none; +} +#entryCategorystart { + background-image: url("../images/start.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategorystart { + border-right: none; +} +#entryCategoryflow { + background-image: url("../images/flow.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategoryflow { + border-right: none; +} +#entryCategoryjudgement { + background-image: url("../images/judgement.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategoryjudgement { + border-right: none; +} +#entryCategorycalc { + background-image: url("../images/calc.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategorycalc { + border-right: none; +} +#entryCategoryvariable { + background-image: url("../images/variable.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategoryvariable { + border-right: none; +} +#entryCategoryfunc { + background-image: url("../images/function.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategoryfunc { + border-right: none; +} +#entryCategoryscene { + border-right: none; + background-image: url("../images/scene.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategoryscene { + border-left: none; + border-right: none; +} +#entryCategoryarduino { + background-image: url("../images/arduino.png"); + background-repeat: no-repeat; +} +.entrySelectedCategory#entryCategoryarduino { + border-right: none; +} +.entryBlocklyWorkspace { + position: absolute; + left: 250px; + top: 8px; + bottom: 0px; + right: 0px; + overflow: hidden; + border: solid 1px #C4C4B9; + border-top-left-radius: 10px; + background-image: url("../images/entry_bg.png"); +} +.entryBlocklyWorkspace.folding { + z-index: 300; + border-left: solid 1px #C4C4B9; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -ms-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + -webkit-animation-name: foldBlockly; + -moz-animation-name: foldBlockly; + -ms-animation-name: foldBlockly; + -o-animation-name: foldBlockly; + animation-name: foldBlockly; + -webkit-animation-fill-mode: forwards; + -moz-animation-fill-mode: forwards; + -ms-animation-fill-mode: forwards; + -o-animation-fill-mode: forwards; + animation-fill-mode: forwards; +} +@keyframes foldBlockly { + to { + left: 64px; + } +} +@-ot-keyframes foldBlockly { + to { + left: 64px; + } +} +@-ms-keyframes foldBlockly { + to { + left: 64px; + } +} +@-moz-keyframes foldBlockly { + to { + left: 64px; + } +} +@-webkit-keyframes foldBlockly { + to { + left: 64px; + } +} +.entryBlocklyWorkspace.foldOut { + z-index: 300; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -ms-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + -webkit-animation-name: foldOutBlockly; + -moz-animation-name: foldOutBlockly; + -ms-animation-name: foldOutBlockly; + -o-animation-name: foldOutBlockly; + animation-name: foldOutBlockly; + -webkit-animation-fill-mode: forwards; + -moz-animation-fill-mode: forwards; + -ms-animation-fill-mode: forwards; + -o-animation-fill-mode: forwards; + animation-fill-mode: forwards; +} +@keyframes foldOutBlockly { + from { + left: 64px; + } +} +@-o-keyframes foldOutBlockly { + from { + left: 64px; + } +} +@-ms-keyframes foldOutBlockly { + from { + left: 64px; + } +} +@-moz-keyframes foldOutBlockly { + from { + left: 64px; + } +} +@-webkit-keyframes foldOutBlockly { + from { + left: 64px; + } +} +.entryBlocklyPhone { + position: absolute; + top: 0px; + left: 56px; + right: 0px; + bottom: 0px; + overflow: hidden; + border: solid 1px #C4C4B9; + border-left: 0; + background-image: url("../images/entry_bg_1.png"); +} +.entryBoard { + cursor: move; + position: absolute; + -ms-touch-action: none; +} +.entryOverlayBoard { + background: rgba(180, 180, 180, 0.4); +} +.boardScrollbar { + opacity: 0.4; + cursor: move; + -ms-touch-action: none; +} +.boardScrollbar:hover { + opacity: 0.6; +} +.entry-widget-color-table { + border: 1px solid #666; + border-collapse: collapse; + z-index: 1001; + position: fixed; +} +.entry-widget-color-table .entry-widget-color-row { + border-bottom: 2px solid #666; +} +.entry-widget-color-table .entry-widget-color-cell { + height: 13px; + width: 15px; + margin: 0; + border: 0; + text-align: center; + vertical-align: middle; + border-right: 2px solid #666; + font-size: 1px; + cursor: pointer; +} +.entryBoardWrapper { + position: absolute; + top: 0; + left: 0; + right: 0; + height: 100%; +} +.entryVimBoard { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; +} +.entryFunctionButton { + stroke: #555; + stroke-width: 3; + fill: transparent; + cursor: pointer; +} +.entryFunctionButton:hover { + stroke: #000; +} +.entryFunctionButtonText { + font-family: ng !important; + font-size: 13 !important; + text-anchor: middle; + fill: black; + cursor: pointer !important; +} +.entryWorkspaceBoard { + position: absolute; + left: 250px; + top: 8px; + bottom: 0px; + right: 0px; + overflow: hidden; + border: solid 1px #C4C4B9; + border-top-left-radius: 10px; + background-image: url("../images/entry_bg.png"); +} +.entryWorkspaceBoard.folding { + z-index: 300; + border-left: solid 1px #C4C4B9; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -ms-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + -webkit-animation-name: foldBoard; + -moz-animation-name: foldBoard; + -ms-animation-name: foldBoard; + -o-animation-name: foldBoard; + animation-name: foldBoard; + -webkit-animation-fill-mode: forwards; + -moz-animation-fill-mode: forwards; + -ms-animation-fill-mode: forwards; + -o-animation-fill-mode: forwards; + animation-fill-mode: forwards; +} +@keyframes foldBoard { + to { + left: 64px; + } +} +@-ot-keyframes foldBoard { + to { + left: 64px; + } +} +@-ms-keyframes foldBoard { + to { + left: 64px; + } +} +@-moz-keyframes foldBoard { + to { + left: 64px; + } +} +@-webkit-keyframes foldBoard { + to { + left: 64px; + } +} +.entryWorkspaceBoard.foldOut { + z-index: 300; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -ms-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + -webkit-animation-name: foldOutBoard; + -moz-animation-name: foldOutBoard; + -ms-animation-name: foldOutBoard; + -o-animation-name: foldOutBoard; + animation-name: foldOutBoard; + -webkit-animation-fill-mode: forwards; + -moz-animation-fill-mode: forwards; + -ms-animation-fill-mode: forwards; + -o-animation-fill-mode: forwards; + animation-fill-mode: forwards; +} +@keyframes foldOutBoard { + from { + left: 64px; + } +} +@-o-keyframes foldOutBoard { + from { + left: 64px; + } +} +@-ms-keyframes foldOutBoard { + from { + left: 64px; + } +} +@-moz-keyframes foldOutBoard { + from { + left: 64px; + } +} +@-webkit-keyframes foldOutBoard { + from { + left: 64px; + } +} +.entryContainerWorkspace { + background-color: #e7e7e7; +} +.entryContainerPhone { + width: 100%; + background-color: #e7e7e7; +} +.entryAddObjectWorkspace { + display: block; + height: 48px; + background-color: #e7e7e7; + color: #757575; + text-align: center; + font-size: 11pt; + line-height: 44px; + margin: 10px; + border: 2px dashed #979797; + cursor: pointer; +} +.entryContainerListWorkspaceWrapper { + position: absolute; + bottom: 0; + padding: 0; + margin: 0; + overflow: auto; + width: 100%; + top: 0; + background-color: #363C46; +} +.entryContainerListWorkspace { + position: relative; + margin: 0px; + padding: 0px; + width: 100%; + background-color: #363C46; + list-style-type: none; + border-top: 1pt solid #ebeff1; +} +.entryContainerListPhone { + position: relative; margin: 0px; padding: 0px; width: 100%; - background-color: #363C46; - list-style-type: none; - border-top: 1pt solid #ebeff1; + background-color: #363C46; + list-style-type: none; + border-top: 1pt solid #ebeff1; +} +.entryContainerListWorkspace::-webkit-scrollbar { + display: none; +} +.entryContainerListElementWorkspace { + background-color: white; + display: block; + padding: 0; + margin: 0; + border-bottom: 1pt solid #ebeff1; + position: relative; + overflow: hidden; + cursor: move; + min-height: 59px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.entryContainerListElementWorkspace.selectedObject { + background-color: #f4f4f4; + height: 118px; + border-top: 1px solid #aaaaaa; + border-bottom: 1px solid #aaaaaa; +} +.collapsed .selectedObject { + height: 149px; +} +.entryContainerListElementWorkspace:first-child, +.entryContainerListElementWorkspace.selectedObject + .entryContainerListElementWorkspace { + border-top: 0; +} +.objectInfoView { + list-style: none; + padding: 0; + height: 59px; + width: 19px; + position: relative; + margin-left: 10px; + float: left; +} +.objectInfo_visible { + display: inline-block; + position: absolute; + top: 10px; + left: 0; + height: 18px; + width: 18px; + background-image: url("../images/layers_icon_visible.png"); + border-bottom: 1px solid rgba(159, 159, 159, 0.3); + cursor: pointer; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.objectInfo_unvisible { + background-image: url("../images/layers_icon_unvisible.png"); +} +.objectInfo_unlock { + display: inline-block; + position: absolute; + top: 33px; + left: 0; + height: 18px; + width: 18px; + background-image: url("../images/layers_icon_unlock.png"); + cursor: pointer; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.objectInfo_lock { + background-image: url("../images/layers_icon_lock.png"); +} +.entryObjectThumbnailWorkspace { + float: left; + position: absolute; + height: 49px; + width: 49px; + top: 5px; + left: 41px; + border: 1px solid #bcc2c8; + background-color: #ccc; + background-size: contain; + background-repeat: no-repeat; + background-position: center; +} +.entryObjectWrapperWorkspace { + float: left; + position: relative; + top: 10px; + left: 72px; + width: 135px; + height: 43px; + overflow: hidden; +} +.entryObjectNameWorkspace { + float: left; + width: 112px; + top: 8px; + left: 20px; + position: absolute; + background-color: transparent; + border: none; + color: #000000; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + border: 1px solid transparent; +} +.editButtonToggle { + display: block; +} +.editButtonToggle_ { + display: none; +} +.selectedEditingObject { + background-color: white !important; + border-radius: 3px; + border: 1px solid #878787 !important; + outline: none; + background-color: transparent; +} +.selectedNotEditionObject { + background-color: transparent; +} +.selectedNotEditionObject:hover { + background-color: transparent; +} +.selectedNotEditionObject:focus { + background-color: transparent !important; +} +/*sj*/ +.selectedObject .entryObjectNameWorkspace { + color: #474747; +} +.selectedObject > .entryObjectWrapperWorkspace > .entryObjectNameWorkspace { + color: black; + font-family: nanumBarunRegular !important; +} +.entryObjectNameWorkspace:disabled { + background-color: transparent; +} +.entryObjectEditWorkspace { + float: left; + position: absolute; + width: 19px; + height: 19px; + right: 43px; + top: 22px; + cursor: pointer; + background-image: url("../images/layers_icon_edit_nor_new.png"); +} +.entryObjectDeleteWorkspace { + float: left; + position: absolute; + width: 19px; + height: 19px; + right: 21px; + top: 22px; + cursor: pointer; + background-image: url("../images/layers_icon_close_nor_new.png"); +} +.entryObjectDeletePhone { + float: left; + position: absolute; + width: 16px; + height: 16px; + right: 57px; + top: 25px; + cursor: pointer; + background-image: url("../images/layers_icon_close_nor.png"); +} +.entryObjectEditPhone { + float: left; + position: absolute; + width: 24px; + background-repeat: no-repeat; + height: 21px; + right: 17px; + background-color: transparent; + border: none; + top: 21px; + cursor: pointer; + background-image: url("../images/glyphicons_150_edit.png"); +} +.entryObjectSelectedImgWorkspace { + float: left; + position: absolute; + width: 14px; + height: 26px; + right: 0; + top: 20px; + cursor: col-resize; + background-image: url("../images/entry_scroll.png"); +} +.selectedObject .entryObjectSelectedImgWorkspace { + float: left; + position: absolute; + width: 14px; + height: 26px; + right: 0; + top: 20px; + cursor: col-resize; + background-image: url("../images/entry_scroll.png"); +} +.entryObjectCoordinateWorkspace { + float: left; + width: 100%; + position: relative; + font-size: 9pt; + color: #000000; + top: 12px; + left: 28px; + width: 150px; +} +.selectedObject > .entryObjectWrapperWorkspace > .entryObjectCoordinateWorkspace { + color: black; +} +.entryObjectInformationWorkspace { + position: absolute; + cursor: pointer; + margin: 12px 0 0 0; + width: 13px; + height: 13px; + background-image: url("../images/layers_arrow_up_nor.png"); +} +.selectedObject .entryObjectInformationWorkspace { + background-image: url("../images/layers_arrow_down_nor.png"); +} +.informationToggle > .entryObjectWrapperWorkspace > .entryObjectInformationWorkspace { + background-image: url("../images/layers_arrow_down_nor_1.png"); +} +.entryObjectButtonWorkspace { + display: none; + float: right; + position: relative; + width: 40px; + height: 40px; + background-color: #bcc3c9; + border-radius: 50%; + margin: 10px 10px 10px 5px; + background-position: center; + background-repeat: no-repeat; + background-position: 50% 35%; + color: white; + font-size: 7.5pt; + padding: 23px 0 0 0; + text-align: center; + outline: none; + border: none; +} +.informationToggle > .entryObjectButtonWorkspace { + display: none; +} +.entryObjectSoundWorkspace { + background-image: url("../images/icon_sound.png"); + background-color: #6a9a1f; +} +.entryObjectSoundWorkspace:hover { + background-color: #83AF3D; +} +.entryObjectPictureWorkspace { + background-image: url("../images/icon_picture.png"); + background-color: #f26724; +} +.entryObjectPictureWorkspace:hover { + background-color: #F3783C; +} +.entryObjectCodeWorkspace { + background-image: url("../images/icon_code.png"); + background-color: #00ace9; +} +.entryObjectCodeWorkspace:hover { + background-color: #5FC8EE; +} +.entryObjectTextWorkspace { + background-image: url("../images/text_icon_white.png"); + background-color: #F3BB1D; + background-position: 50% 20%; + background-size: 75%; +} +.entryObjectRotationWrapperWorkspace { + display: none; + width: 100%; + height: 59px; + padding: 0 0px 10px 10px; + border-top: 1px solid #e1e1e1; + background-color: #e5e5e5; +} +.collapsed .entryObjectRotationWrapperWorkspace { + height: 90px; +} +.selectedObject .entryObjectRotationWrapperWorkspace { + display: inline-block; +} +.informationToggle > .entryObjectRotationWrapperWorkspace { + display: inline-block; +} +.rotationMethodWrapper { + float: right; + width: 180px; + position: relative; +} +.collapsed .rotationMethodWrapper { + float: left; + top: 39px; +} +.entryObjectRotateMethodLabelWorkspace { + display: inline-block; + line-height: 20px; + font-size: 9pt; + color: #000000; + position: absolute; + padding-left: 20px; + padding-top: 20px; +} +/*.entryObjectRotateLabelWorkspace { + display: block; + font-size: 9pt; + color: #000000; + left: 38px; + margin-top: 31px; +} +*/ +.entryObjectRotateLabelWrapperWorkspace { + position: absolute; + top: 90px; + margin-left: 37px; + font-size: 9pt; + color: #000000; +} +.entryObjectRotateInputWorkspace, +.entryObjectDirectionInputWorkspace { + width: 40px; + background-color: #e5e5e5; + border: none; + outline: none; + border: 1px solid transparent; +} +.entryObjectDirectionSpanWorkspace { + margin-left: 12px; +} +.entryObjectRotateModeWorkspace { + cursor: pointer; + display: inline-block; + vertical-align: middle; + float: left; + margin-left: 8px; + margin-top: 18px; + width: 22px; + height: 22px; +} +.propertyTabhelper { + background-image: url("../images/property/helper_off.png"); +} +.propertyTabhelper.selected { + background-image: url("../images/property/helper_on.png"); +} +.propertyTabContainer { + background-image: url("../images/property/container_off.png"); +} +.propertyTabContainer.selected { + background-image: url("../images/property/container_on.png"); +} +.entryObjectRotateModeAWorkspace { + margin-left: 80px; + background-image: url("../images/layers_icon_rotate01_nor.png"); +} +.entryObjectRotateModeAWorkspace.selected { + background-image: url("../images/layers_icon_rotate01_sel.png"); +} +.entryObjectRotateModeBWorkspace { + background-image: url("../images/layers_icon_rotate02_nor.png"); +} +.entryObjectRotateModeBWorkspace.selected { + background-image: url("../images/layers_icon_rotate02_sel.png"); +} +.entryObjectRotateModeCWorkspace { + background-image: url("../images/layers_icon_rotate03_nor.png"); +} +.entryObjectRotateModeCWorkspace.selected { + background-image: url("../images/layers_icon_rotate03_sel.png"); +} +.entryContainerTabViewWorkspace { + width: 100%; + height: 45px; + border-bottom: 2px solid #1bafea; +} +.entryContainerTabItemWorkspace { + vertical-align: top; + height: 100%; + width: 25%; + text-align: center; + display: inline-block; + background-color: #e5e5e5; + color: #9e9f9f; + font-size: 13px; + cursor: pointer; + padding-top: 13px; +} +.entryContainerTabItemWorkspace:nth-child(2) { + border-left: 2px solid white; + border-right: 2px solid white; +} +.entryContainerTabItemWorkspace:nth-child(3) { + border-right: 2px solid white; +} +.entryContainerTabItemWorkspace.selected { + background-color: #1bafea; + color: white; +} +.entryContainerMovieWorkspace { + /* + position: absolute; + width: 100%; + top: 45px; + bottom: 0px; + + z-index: 1000; +*/ + position: absolute; + background-color: #363C46; + top: 0px; + width: 100%; + overflow: scroll; +} +.entryContainerMovieWorkspace::-webkit-scrollbar { + display: none; +} +.entryContainerDoneWorkspace { + position: absolute; + width: 100%; + top: 0px; + background-color: #363C46; + overflow: hidden; + text-align: center; +} +.entryContainerHelperWorkspace { + position: absolute; + width: 100%; + top: 45px; + bottom: 0; + background-color: #fff; + z-index: 1000; + background: gray; +} +#entry-contextmenu { + position: fixed; + background-color: white; + display: inline-block; + list-style: none; + padding: 4px 0; + border-color: #ccc #666 #666 #ccc; + border-style: solid; + border-width: 1px; + outline: none; + font-size: 13px; + z-index: 300; +} +#entry-contextmenu .menuAble { + cursor: pointer; + padding: 3px 20px; +} +#entry-contextmenu .menuAble:hover { + color: white; + background-color: #57e; +} +#entry-contextmenu .menuDisable { + color: #ccc; + padding: 3px 20px; +} +#entry-contextmenu.workspace-contextmenu { + position: fixed; + background-color: white; + display: inline-block; + list-style: none; + padding: 4px 0; + border-color: #ccc #666 #666 #ccc; + border-style: solid; + border-width: 1px; + outline: none; + font-size: 14px; + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + min-width: 160px; + border-radius: 4px; + background-clip: padding-box; + color: #262626; +} +#entry-contextmenu.workspace-contextmenu .menuAble { + padding: 3px 20px; +} +#entry-contextmenu.workspace-contextmenu .menuAble:hover { + color: white; + background-color: #57e; +} +#entry-contextmenu.workspace-contextmenu .menuDisable { + color: #ccc; + padding: 3px 20px; +} +.entryEngineWorkspace { + height: 35px; + width: 480px; + background-color: white; + border-top: 1pt solid #ebeff1; +} +.entryEngineMinimize { + height: 35px; + width: 100%; + background-color: white; + border-top: 1pt solid #ebeff1; +} +.entryEngineWorkspace_w { + height: 225px; + width: 400px; + background-color: white; + border-top: 1pt solid #ebeff1; + position: absolute; +} +.entryPopupWindow > .entryEngineWorkspace { + position: absolute; + top: auto !important; + width: 100% !important; + bottom: 0px; +} +.entryPopupWindow > .entryEngineWorkspace_w { + position: absolute; + width: 100% !important; + top: 0px !important; +} +.entryPopupWindow > .entryEngineWorkspace_w > .entryRunButtonWorkspace_w { + display: none; + top: 37%; + left: 46%; +} +.entryPopupWindow > .entryEngineWorkspace_w > .entryRunButtonWorkspace_w2 { + display: block; + width: 111px; + height: 111px; + background-image: url("../images/play_btn.png"); + background-position: 40px center; + background-color: rgba(0, 0, 0, 0.5); + border-radius: 55px; + background-repeat: no-repeat; + right: 5px; + /*bottom: 5px;*/ + bottom: -10px; + left: 44%; + top: 35%; +} +.entryPopupWindow > .entryEngineWorkspace_w > .entryStopButtonWorkspace_w2 { + display: block; + background-image: url("../images/stop_btn.png"); + background-repeat: no-repeat; + left: 20px; + color: transparent; + bottom: -10px; + width: 90px; + background-position: left; + color: #4b37a0; +} +.entryPopupWindow > .entryEngineWorkspace_w > .entryStopButtonWorkspace_w { + display: none; +} +.entryPopupWindow > .entryEngineWorkspace_w > .entryCoordinateButtonWorkspace_w { + background-image: url("../images/grid.png") !important; + right: 34px; + color: #4b37a0; +} +.entryPopupWindow > .entryEngineWorkspace_w > .entryMaximizeButtonWorkspace_w { + background-image: url("../images/zoom_out_btn.png"); + background-repeat: no-repeat; + right: 5px; +} +.entryPopupWindow > .entryEngineWorkspace_w > .entryEngineButtonWorkspace_w { + position: absolute; + bottom: 1px; +} +.entryPopupWindow > .entryEngineWorkspace_w > .entryAddButtonWorkspace_w { + display: none; +} +.entryEngineBlueWorkspace { + background-color: #61abdb; +} +.entryEngineButtonWorkspace { + border: none; + outline: none; + width: 25px; + height: 35px; + background-color: transparent; + background-repeat: no-repeat; + background-position: center; +} +.entryEngineButtonMinimize { + border: none; + outline: none; + width: 25px; + height: 35px; + background-color: transparent; + background-repeat: no-repeat; + background-position: center; +} +.entryEngineButtonWorkspace_w { + border: none; + outline: none; + width: 25px; + height: 24px; + background-color: transparent; + background-repeat: no-repeat; + background-position: center; +} +.entryRunButtonPhone { + width: 100%; + height: 100%; + border: none; + background-color: transparent; + font-size: 12pt; + border-bottom: 2px solid #89c0d5; + background-image: url("../images/layers_icon_button_play_nor.png"); + background-position: 10px 50%; + background-repeat: no-repeat; } -.entryContainerListWorkspace::-webkit-scrollbar { - display: none; +.entryStopButtonPhone { + width: 100%; + height: 100%; + border: none; + background-color: transparent; + font-size: 12pt; + border-bottom: 2px solid #89c0d5; + background-image: url("../images/layers_icon_button_stop_nor.png"); + background-position: 10px 50%; + background-repeat: no-repeat; } -.entryContainerListElementWorkspace { - background-color: white; - display: block; - padding: 0; - margin: 0; - border-bottom: 1pt solid #ebeff1; +.entryEnginePhone { + width: 100%; +} +.entryEngineHeaderPhone { + border-bottom: 1px solid #ccc; + width: 100%; + background-color: #fff; + height: 34px; +} +.entryEngineFooterPhone { + border-top: 1px solid #ccc; + width: 100%; + background-color: #fff; + height: 38px; +} +.entryMouseViewWorkspace { position: relative; - overflow: hidden; - cursor: move; - min-height: 59px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + font-size: 9pt; + margin: 0 auto; + width: 40%; + color: #61abdb; + line-height: 35px; + text-align: center; } -.entryContainerListElementWorkspace.selectedObject { - background-color: #f4f4f4; - height: 118px; - border-top: 1px solid #aaaaaa; - border-bottom: 1px solid #aaaaaa; +.entryMouseViewMinimize { + font-size: 9pt; + margin: 0 auto; + width: 40%; + color: #6c5af2; + line-height: 35px; + text-align: center; } -.collapsed .selectedObject { - height: 149px; +.entryMouseViewWorkspace_w { + font-size: 9pt; + margin: 0 auto; + width: 40%; + color: #61abdb; + line-height: 24px; + text-align: center; } -.entryContainerListElementWorkspace:first-child, -.entryContainerListElementWorkspace.selectedObject + .entryContainerListElementWorkspace { - border-top: 0; +.entryEngineBlueWorkspace > .entryMouseViewWorkspace { + color: white; } -.objectInfoView { - list-style: none; - padding: 0; - height: 59px; - width: 19px; - position: relative; - margin-left: 10px; +.entryMaximizeButtonWorkspace { float: left; + margin-left: 5px; + background-image: url("../images/fullscreen_edit.png"); } -.objectInfo_visible { - display: inline-block; - position: absolute; - top: 10px; - left: 0; - height: 18px; - width: 18px; - background-image: url("../../images/layers_icon_visible.png"); - border-bottom: 1px solid rgba(159, 159, 159, 0.3); - cursor: pointer; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; +.entryMaximizeButtonMinimize { + float: right; + margin-right: 5px; + background-image: url("../images/zoom_in_btn.png"); } -.objectInfo_unvisible { - background-image: url("../../images/layers_icon_unvisible.png"); +.entryPopupWindow > .entryEngineMinimize > .entryMaximizeButtonMinimize { + float: right; + margin-right: 5px; + background-image: url("../images/zoom_out_btn.png"); } -.objectInfo_unlock { - display: inline-block; - position: absolute; - top: 33px; - left: 0; - height: 18px; - width: 18px; - background-image: url("../../images/layers_icon_unlock.png"); - cursor: pointer; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; +.entryMaximizeButtonPhone { + width: 20px; + height: 100%; + border: none; + float: right; + margin-right: 9px; + background-repeat: no-repeat; + background-position: center; + background-color: transparent; + background-image: url("../images/layers_icon_fullmode01_nor.png"); } -.objectInfo_lock { - background-image: url("../../images/layers_icon_lock.png"); +.entryMaximizeButtonWorkspace_w { + float: right; + margin-right: 5px; + background-image: url("../images/layers_icon_fullmode01_nor_1.png"); + background-repeat: no-repeat; } -.entryObjectThumbnailWorkspace { +.entryEngineBlueWorkspace > .entryMaximizeButtonWorkspace { + background-image: url("../images/fullscreen_play.png"); +} +#entrySpeedPanelWorkspace { + width: 100%; + height: 0px; + background-color: #0e0; +} +.entrySpeedButtonWorkspace { float: left; - position: absolute; - height: 49px; - width: 49px; - top: 5px; - left: 41px; - border: 1px solid #bcc2c8; - background-color: #ccc; background-size: contain; - background-repeat: no-repeat; - background-position: center; + width: 22px; + height: 15px; + margin-top: 5px; + margin-left: 10px; + background-image: url("../images/speed_edit.png"); } -.entryObjectWrapperWorkspace { - float: left; - position: relative; - top: 10px; - left: 72px; - width: 135px; - height: 43px; - overflow: hidden; +.entryPopupWindow > div > .entrySpeedButtonWorkspace { + display: none; } -.entryObjectNameWorkspace { - float: left; - width: 112px; - top: 8px; - left: 20px; +.entryPopupWindow .entryMouseViewWorkspace_w { + font-size: 9pt; + margin: 0 auto; + width: 100%; + color: #4b37a0; + line-height: 24px; + bottom: 1px; position: absolute; - background-color: transparent; - border: none; - color: #000000; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - border: 1px solid transparent; + text-align: center; } -.editButtonToggle { +#entrySpeedProgressWorkspace { + position: absolute; display: block; + left: 80px; + top: 23px; + right: 4px; + height: 13px; } -.editButtonToggle_ { - display: none; +#entrySpeedProgressWorkspace > tr { + width: 100%; } -.selectedEditingObject { - background-color: white !important; - border-radius: 3px; - border: 1px solid #878787 !important; - outline: none; - background-color: transparent; +#entrySpeedProgressWorkspace > tr > td { + position: absolute; + height: 14px; + width: 20%; + cursor: pointer; +} +#progressCell0 { + border-top-left-radius: 6.5px; + border-bottom-left-radius: 6.5px; + left: 0%; + background-color: #bee8f4; +} +#progressCell1 { + left: 20%; + background-color: #96cfe7; +} +#progressCell2 { + left: 40%; + background-color: #83b8e1; +} +#progressCell3 { + left: 60%; + background-color: #67a9c9; +} +#progressCell4 { + border-top-right-radius: 6.5px; + border-bottom-right-radius: 6.5px; + left: 80%; + background-color: #5099b5; +} +#entrySpeedLabelWorkspace { + clear: both; + display: block; + font-family: ng; + padding-top: 2px; + padding-left: 10px; + font-size: 11px; +} +#entrySpeedHandleWorkspace { + position: absolute !important; + cursor: pointer; + width: 18px; + height: 16px; + top: 21px; + z-index: 100; + background-image: url("../images/speed_handle.png"); } -.selectedNotEditionObject { - background-color: transparent; +.entryCoordinateButtonWorkspace { + float: right; + background-image: url("../images/coordinates_edit.png"); } -.selectedNotEditionObject:hover { - background-color: transparent; +.entryCoordinateButtonMinimize { + float: right; + background-image: url("../images/grid.png"); } -.selectedNotEditionObject:focus { - background-color: transparent !important; +.entryCoordinateButtonWorkspace_w { + float: right; + background-image: url("../images/layers_icon_grid_nor.png"); } -/*sj*/ -.selectedObject .entryObjectNameWorkspace { - color: #474747; +.entryCoordinateButtonWorkspace.toggleOn { + background-image: url("../images/coordinates_edit_on.png"); } -.selectedObject > .entryObjectWrapperWorkspace > .entryObjectNameWorkspace { - color: black; - font-family: nanumBarunRegular !important; +.entryCoordinateButtonWorkspace_w.toggleOn { + background-image: url("../images/layers_icon_grid_nor_1.png"); } -.entryObjectNameWorkspace:disabled { - background-color: transparent; +.entryEngineBlueWorkspace > .entryCoordinateButtonWorkspace { + background-image: url("../images/coordinates_play.png"); } -.entryObjectEditWorkspace { - float: left; - position: absolute; - width: 19px; - height: 19px; - right: 43px; - top: 22px; - cursor: pointer; - background-image: url("../../images/layers_icon_edit_nor_new.png"); +.entryRunButtonWorkspace { + float: right; + width: 80px; + background-position: 7px 50%; + padding-right: 10px; + text-align: right; + font-size: 9pt; + color: #61abdb; + background-image: url("../images/playbutton_edit.png"); } -.entryObjectDeleteWorkspace { +.entryRunButtonMinimize { + display: none; float: left; - position: absolute; - width: 19px; - height: 19px; - right: 21px; - top: 22px; - cursor: pointer; - background-image: url("../../images/layers_icon_close_nor_new.png"); + width: 65px; + font-size: 9pt; + color: #6c5af2; } -.entryObjectDeletePhone { - float: left; +.entryAddButtonWorkspace_w { + top: 289px; + left: 0px; + width: 236px; + height: 38px; + font-size: 12pt; + background-color: #fff; + color: #666666; + text-align: center; position: absolute; - width: 16px; - height: 16px; - right: 57px; - top: 25px; - cursor: pointer; - background-image: url("../../images/layers_icon_close_nor.png"); + border-top: 1px solid #ccc; + padding-left: 50px; + background-repeat: no-repeat; + background-position: 10% 43%; + font-family: nanumBarunBold !important; + background-image: url("../images/layers_icon_button_plus_nor.png"); } -.entryObjectEditPhone { - float: left; +.collapsed > .entryAddButtonWorkspace_w { + color: transparent; + background-position: 50% 43%; +} +.entryRunButtonWorkspace_w { + top: 289px; + left: 272px; + width: 156px; + height: 38px; + font-size: 12pt; + border-left: 1px solid #ccc; + border-top: 1px solid #ccc; + background-color: #fff; + padding-left: 28px; + color: #666666; + text-align: center; position: absolute; - width: 24px; background-repeat: no-repeat; - height: 21px; - right: 17px; - background-color: transparent; - border: none; - top: 21px; - cursor: pointer; - background-image: url("../../images/glyphicons_150_edit.png"); + background-position: 10% 43%; + font-family: nanumBarunBold !important; + background-image: url("../images/layers_icon_button_play_nor_1.png"); } -.entryObjectSelectedImgWorkspace { - float: left; - position: absolute; - width: 14px; - height: 26px; - right: 0; - top: 20px; - cursor: col-resize; - background-image: url("../../images/entry_scroll.png"); +.collapsed > .entryRunButtonWorkspace_w { + color: transparent; + background-position: 50% 43%; } -.selectedObject .entryObjectSelectedImgWorkspace { - float: left; - position: absolute; - width: 14px; - height: 26px; - right: 0; - top: 20px; - cursor: col-resize; - background-image: url("../../images/entry_scroll.png"); +.entryRunButtonWorkspace_w2 { + display: none; } -.entryObjectCoordinateWorkspace { - float: left; - width: 100%; - position: relative; +.entryEngineBlueWorkspace > .entryRunButtonWorkspace { + background-image: url("../images/playbutton_play.png"); + color: white; +} +.entryStopButtonWorkspace { + float: right; + width: 80px; + background-position: 7px 50%; + border-top: 1px solid #ccc; + padding-right: 10px; + text-align: right; font-size: 9pt; - color: #000000; - top: 12px; - left: 28px; - width: 150px; + color: #61abdb; + background-image: url("../images/stopbutton_pause.png"); } -.selectedObject > .entryObjectWrapperWorkspace > .entryObjectCoordinateWorkspace { - color: black; +.entryStopButtonMinimize { + float: left; + width: 80px; + background-position: 7px 50%; + padding-right: 10px; + text-align: right; + font-size: 9pt; + color: #6c5af2; + background-image: url("../images/stop_btn.png"); } -.entryObjectInformationWorkspace { +.entryStopButtonWorkspace_w { + top: 289px; + left: 272px; + width: 156px; + height: 38px; + font-size: 12pt; + border-top: 1px solid #ccc; + border-left: 1px solid #ccc; + background-color: #fff; + color: #666666; + padding-left: 28px; + text-align: center; position: absolute; - cursor: pointer; - margin: 12px 0 0 0; - width: 13px; - height: 13px; - background-image: url("../../images/layers_arrow_up_nor.png"); -} -.selectedObject .entryObjectInformationWorkspace { - background-image: url("../../images/layers_arrow_down_nor.png"); + background-repeat: no-repeat; + background-position: 10% center; + font-weight: 600; + background-image: url("../images/layers_icon_button_stop_nor_1.png"); } -.informationToggle > .entryObjectWrapperWorkspace > .entryObjectInformationWorkspace { - background-image: url("../../images/layers_arrow_down_nor_1.png"); +.collapsed > .entryStopButtonWorkspace_w { + color: transparent; + background-position: 50% 43%; } -.entryObjectButtonWorkspace { +.entryStopButtonWorkspace_w2 { display: none; - float: right; - position: relative; - width: 40px; - height: 40px; - background-color: #bcc3c9; - border-radius: 50%; - margin: 10px 10px 10px 5px; - background-position: center; - background-repeat: no-repeat; - background-position: 50% 35%; - color: white; - font-size: 7.5pt; - padding: 23px 0 0 0; - text-align: center; - outline: none; - border: none; } -.informationToggle > .entryObjectButtonWorkspace { +.entryPauseButtonWorkspace_w { display: none; } -.entryObjectSoundWorkspace { - background-image: url("../../images/icon_sound.png"); - background-color: #6a9a1f; +.entryEngineBigButtonMinimize_popup { + border: none; + display: none; + margin: 0; + padding: 0; + position: absolute; + left: 50%; + width: 111px; + height: 111px; + margin-left: -55.5px; + top: 50%; + margin-top: -55.5px; + background-repeat: no-repeat; + background-position: 40px center; + background-color: rgba(0, 0, 0, 0.5); + border-radius: 55px; } -.entryObjectSoundWorkspace:hover { - background-color: #83AF3D; +.entryEngineBigButtonMinimize_popup:hover { + opacity: 0.8; } -.entryObjectPictureWorkspace { - background-image: url("../../images/icon_picture.png"); - background-color: #f26724; +.entryEngineBigButtonMinimize_popup:focus { + outline: none; } -.entryObjectPictureWorkspace:hover { - background-color: #F3783C; +.entryEngineBigButtonMinimize_popup.entryEngineBigButtonMinimize_popup_run { + background-image: url("../images/play_btn.png"); } -.entryObjectCodeWorkspace { - background-image: url("../../images/icon_code.png"); - background-color: #00ace9; +.entryPopupWindow .entryEngineBigButtonMinimize_popup { + display: block; } -.entryObjectCodeWorkspace:hover { - background-color: #5FC8EE; +.entryPauseButtonWorkspace_w { + display: none; } -.entryObjectTextWorkspace { - background-image: url("../../images/text_icon_white.png"); - background-color: #F3BB1D; - background-position: 50% 20%; - background-size: 75%; +.entryPopupWindow .entryPauseButtonWorkspace_w { + display: inline-block; + background: url("../images/pause_btn.png"); + background-repeat: no-repeat; + color: transparent; + width: 90px; + left: 103px; + color: #4b37a0; + background-position: center left; } -.entryObjectRotationWrapperWorkspace { - display: none; - width: 100%; - height: 59px; - padding: 0 0px 10px 10px; - border-top: 1px solid #e1e1e1; - background-color: #e5e5e5; +.nav_right_wrapper { + right: 0; } -.collapsed .entryObjectRotationWrapperWorkspace { - height: 90px; +.navbar-default { + background-color: #89c1e4; + border-color: #89c1e4; + /*background-color: #4accaa; + border-color: #4accaa;*/ } -.selectedObject .entryObjectRotationWrapperWorkspace { - display: inline-block; +#project_name.normal { + background-color: #89c1e4; + /*background-color: #4accaa;*/ } -.informationToggle > .entryObjectRotationWrapperWorkspace { - display: inline-block; +.btn-group > .btn { + background-color: transparent; + border-color: transparent; + /*background-color: #4accaa; + border-color: #4accaa;*/ } -.rotationMethodWrapper { - float: right; - width: 180px; - position: relative; +.art_project_name { + background-color: white !important; } -.collapsed .rotationMethodWrapper { - float: left; - top: 39px; +.art_project_name:hover { + border: 1px solid #b4b4b4 !important; } -.entryObjectRotateMethodLabelWorkspace { - display: inline-block; - line-height: 20px; +.entryPauseButtonMinimize { + float: left; + background-image: url("../images/pause_btn.png"); + width: auto; + background-position: left; + padding-left: 17px; + color: #6c5af2; font-size: 9pt; - color: #000000; +} +.entryFunctionEdit { position: absolute; - padding-left: 20px; - padding-top: 20px; + width: 100%; + height: 100%; + background-color: rgba(180, 180, 180, 0.4) !important; + z-index: 50; } -/*.entryObjectRotateLabelWorkspace { - display: block; - font-size: 9pt; - color: #000000; - left: 38px; - margin-top: 31px; +.entryFunctionEdit { + position: absolute; + width: 100%; + height: 100%; + background-color: rgba(180, 180, 180, 0.4) !important; + z-index: 50; } -*/ -.entryObjectRotateLabelWrapperWorkspace { +#entryFunctionBtnWrapper { position: absolute; - top: 90px; - margin-left: 37px; - font-size: 9pt; - color: #000000; + z-index: 100; + bottom: 90px; + margin: 0 auto; + left: 50%; } -.entryObjectRotateInputWorkspace, -.entryObjectDirectionInputWorkspace { - width: 40px; - background-color: #e5e5e5; - border: none; - outline: none; - border: 1px solid transparent; +.entryFunctionBtn { + position: relative; + display: inline-block; + cursor: pointer; + border: solid 3px #888; + color: #666; + width: 55px; + height: 55px; + border-radius: 27.5px; + text-align: center; + line-height: 48px; + left: -50%; } -.entryObjectDirectionSpanWorkspace { - margin-left: 12px; +.entryFunctionBtn:hover { + border: solid 3px #555; + color: #222; } -.entryObjectRotateModeWorkspace { - cursor: pointer; - display: inline-block; - vertical-align: middle; - float: left; - margin-left: 8px; - margin-top: 18px; - width: 22px; - height: 22px; +#entryFunctionSave { + margin-right: 20px; } -.propertyTabhelper { - background-image: url("../../images/property/helper_off.png"); +.globalSvgSurface { + position: fixed; + width: 100%; + height: 100%; + z-index: 1111; + top: 0; + left: 0; } -.propertyTabhelper.selected { - background-image: url("../../images/property/helper_on.png"); +#globalSvg { + position: fixed; + width: 1px; + height: 1px; + overflow: visible; + z-index: 1111; + opacity: 0.8; + display: none; } -.propertyTabContainer { - background-image: url("../../images/property/container_off.png"); +/* helper */ +@keyframes blockHelperUp { + 0% { + top: 100%; + } + 100% { + top: 0%; + } } -.propertyTabContainer.selected { - background-image: url("../../images/property/container_on.png"); +@-o-keyframes blockHelperUp { + 0% { + top: 100%; + } + 100% { + top: 0%; + } } -.entryObjectRotateModeAWorkspace { - margin-left: 80px; - background-image: url("../../images/layers_icon_rotate01_nor.png"); +@-ms-keyframes blockHelperUp { + 0% { + top: 100%; + } + 100% { + top: 0%; + } } -.entryObjectRotateModeAWorkspace.selected { - background-image: url("../../images/layers_icon_rotate01_sel.png"); +@-moz-keyframes blockHelperUp { + 0% { + top: 100%; + } + 100% { + top: 0%; + } } -.entryObjectRotateModeBWorkspace { - background-image: url("../../images/layers_icon_rotate02_nor.png"); +@-webkit-keyframes blockHelperUp { + 0% { + top: 100%; + } + 100% { + top: 0%; + } } -.entryObjectRotateModeBWorkspace.selected { - background-image: url("../../images/layers_icon_rotate02_sel.png"); +@keyframes blockHelperDown { + 0% { + top: 0%; + } + 100% { + top: 100%; + } } -.entryObjectRotateModeCWorkspace { - background-image: url("../../images/layers_icon_rotate03_nor.png"); +@-o-keyframes blockHelperDown { + 0% { + top: 0%; + } + 100% { + top: 100%; + } } -.entryObjectRotateModeCWorkspace.selected { - background-image: url("../../images/layers_icon_rotate03_sel.png"); +@-ms-keyframes blockHelperDown { + 0% { + top: 0%; + } + 100% { + top: 100%; + } } -.entryPlaygroundWorkspace { - position: absolute; - top: 40px; - bottom: 0px; - left: 400.5px; - right: 0px; - background-color: #F5F5F5; - overflow: hidden; +@-moz-keyframes blockHelperDown { + 0% { + top: 0%; + } + 100% { + top: 100%; + } } -.entryPlaygroundPhone { - width: 100%; - height: 500px; - background-color: #F5F5F5; +@-webkit-keyframes blockHelperDown { + 0% { + top: 0%; + } + 100% { + top: 100%; + } } -.entryPlaygroundResizeWorkspace { +#entryBlockHelperWorkspace { position: absolute; - top: 45%; - height: 28px; - width: 11px; - left: 272px; - cursor: ew-resize; - border: solid 1px #afafaf; - border-left: none; - z-index: 250; - background-image: url("../../images/entry_scroll_02.png"); + bottom: 0; + width: 100%; + height: 100%; + background-color: #fff; + z-index: 1000; + /*.animation-name(blockHelperUp);*/ + /*.animation-duration(0.6s);*/ } -.entryPlaygroundTabWorkspace { +#entryBlockHelperWorkspace.lecture { + -webkit-animation-duration: 0s; + -moz-animation-duration: 0s; + -ms-animation-duration: 0s; + -o-animation-duration: 0s; +} +#entryBlockHelperWorkspace.dispose { + display: none; + /*.animation-name(blockHelperDown);*/ +} +#entryBlockHelperHeaderWorkspace { position: absolute; - /*margin-top: 1px;*/ - top: 0; - height: 43px; width: 100%; - background-color: #f1f1f1; + height: 40px; + background-color: #1bafea; + font-size: 16px; + line-height: 38px; + padding-left: 28px; + color: #fff; } -.entryPlaygroundTabWorkspace.entryRemove { - display: block !important; +#entryBlockHelperDisposeWorkspace { + float: right; + background-image: url("../images/block_helper_dispose.png"); + background-repeat: no-repeat; + background-position: center; + padding: 15px; + margin-top: 4px; + margin-right: 5px; } -.entryPlaygroundTabPhone { +#entryBlockHelperContentWorkspace { + position: absolute; width: 100%; - height: 43px; - position: relative; - background-color: #f1f1f1; + top: 40px; + bottom: 0px; + overflow-y: auto; + overflow-x: hidden; } -.entryTabListWorkspace { - list-style: none; - height: 44px; - padding: 0; - margin: 1px 0 0 0; - border-bottom: 2px solid #643cd9; +#entryBlockHelperContentWorkspace.lecture { + top: 0px; } -.entryTabListItemWorkspace { - float: left; - width: 59px; - height: 42px; - margin: 0 1px 0 1px; - cursor: pointer; - display: block; - padding: 10px 0 0 0; +.entryBlockHelperIntro { + background-image: url("../images/block_help_icon.png"); + background-repeat: no-repeat; + background-position: center top; + margin-top: 28px; + padding-top: 100px; text-align: center; - font-family: nanumBarunBold !important; - color: gray; - background-color: #e5e5e5; - border-top-right-radius: 7px; - border-top-left-radius: 7px; -} -.entryTabSelected { - color: white; - background-color: #6e5ae6; + color: #707070; + font-size: 12px; } -#entrySoundTab { - -webkit-animation-delay: 0.1s; - -moz-animation-delay: 0.1s; - -ms-animation-delay: 0.1s; - -o-animation-delay: 0.1s; - animation-delay: 0.1s; +#entryBlockHelpBtn { + position: absolute; + background-image: url("../images/block_help.png"); + background-repeat: no-repeat; + background-position: center; + padding: 15px; + margin-top: 3px; + margin-left: 6px; + z-index: 100; } -#entryPictureTab.hideTab, -#entryTextTab.hideTab { - -webkit-animation-delay: 0.2s; - -moz-animation-delay: 0.2s; - -ms-animation-delay: 0.2s; - -o-animation-delay: 0.2s; - animation-delay: 0.2s; +#entryBlockHelperBlockWorkspace { + width: 400px; + height: 160px; + top: 16px; + overflow: hidden; } -#entrySoundTab.hideTab { - -webkit-animation-delay: 0.1s; - -moz-animation-delay: 0.1s; - -ms-animation-delay: 0.1s; - -o-animation-delay: 0.1s; - animation-delay: 0.1s; +#entryBlockHelperBlockWorkspace > .renderViewContainer { + width: 100%; } -#entryVariableTab.showTab { - -webkit-animation-delay: 0.2s; - -moz-animation-delay: 0.2s; - -ms-animation-delay: 0.2s; - -o-animation-delay: 0.2s; - animation-delay: 0.2s; +#entryBlockHelperBlockWorkspace > .renderViewContainer > svg { + position: absolute; + overflow: visible; + left: 50%; } -.hideTab { - -webkit-animation-duration: 0.7s; - -moz-animation-duration: 0.7s; - -ms-animation-duration: 0.7s; - -o-animation-duration: 0.7s; - -webkit-animation-name: hideTab; - -moz-animation-name: hideTab; - -ms-animation-name: hideTab; - -o-animation-name: hideTab; - animation-name: hideTab; - -webkit-animation-fill-mode: forwards; - -moz-animation-fill-mode: forwards; - -ms-animation-fill-mode: forwards; - -o-animation-fill-mode: forwards; - animation-fill-mode: forwards; +#entryBlockHelperDescriptionWorkspace { + position: absolute; + line-height: 20px; + width: 100%; + top: 100px; + font-size: 13px; + color: #707074; + padding: 0 50px; } -@keyframes hideTab { - to { - margin-top: 44px; - opacity: 0; +/* helper */ +@keyframes blockHelperUp { + 0% { + top: 100%; } -} -@-o-keyframes hideTab { - to { - margin-top: 44px; - opacity: 0; + 100% { + top: 0%; } } -@-ms-keyframes hideTab { - to { - margin-top: 44px; - opacity: 0; +@-o-keyframes blockHelperUp { + 0% { + top: 100%; } -} -@-moz-keyframes hideTab { - to { - margin-top: 44px; - opacity: 0; + 100% { + top: 0%; } } -@-webkit-keyframes hideTab { - to { - margin-top: 44px; - opacity: 0; +@-ms-keyframes blockHelperUp { + 0% { + top: 100%; + } + 100% { + top: 0%; } } -.showTab { - opacity: 0; - -webkit-animation-duration: 0.7s; - -moz-animation-duration: 0.7s; - -ms-animation-duration: 0.7s; - -o-animation-duration: 0.7s; - -webkit-animation-name: showTab; - -moz-animation-name: showTab; - -ms-animation-name: showTab; - -o-animation-name: showTab; - animation-name: showTab; - -webkit-animation-fill-mode: forwards; - -moz-animation-fill-mode: forwards; - -ms-animation-fill-mode: forwards; - -o-animation-fill-mode: forwards; - animation-fill-mode: forwards; -} -@keyframes showTab { - from { - margin-top: 44px; - opacity: 0; +@-moz-keyframes blockHelperUp { + 0% { + top: 100%; } - to { - opacity: 1; + 100% { + top: 0%; } } -@-o-keyframes showTab { - from { - margin-top: 44px; - opacity: 0; +@-webkit-keyframes blockHelperUp { + 0% { + top: 100%; } - to { - opacity: 1; + 100% { + top: 0%; } } -@-ms-keyframes showTab { - from { - margin-top: 44px; - opacity: 0; +@keyframes blockHelperDown { + 0% { + top: 0%; } - to { - opacity: 1; + 100% { + top: 100%; } } -@-moz-keyframes showTab { - from { - margin-top: 44px; - opacity: 0; +@-o-keyframes blockHelperDown { + 0% { + top: 0%; } - to { - opacity: 1; + 100% { + top: 100%; } } -@-webkit-keyframes showTab { - from { - margin-top: 44px; - opacity: 0; +@-ms-keyframes blockHelperDown { + 0% { + top: 0%; } - to { - opacity: 1; + 100% { + top: 100%; } } -.entryPlaygroundCurtainWorkspace { - position: absolute; - background-color: black; - color: white; - padding-top: 270px; - text-align: center; - font-size: 40px; - height: 100%; - top: 0; - left: 0; - right: 0; - bottom: 0; - opacity: 0.5; - z-index: 5000; - cursor: pointer; +@-moz-keyframes blockHelperDown { + 0% { + top: 0%; + } + 100% { + top: 100%; + } } -.entryPlaygroundCurtainPhone { - position: absolute; - background-color: rgba(0, 0, 0, 0.8); - color: white; - padding-top: 100px; - text-align: center; - font-size: 17px; - height: 110%; - width: 100%; - opacity: 0.5; - z-index: 5000; - cursor: pointer; +@-webkit-keyframes blockHelperDown { + 0% { + top: 0%; + } + 100% { + top: 100%; + } } -.entryPlaygroundCodeWorkspace { +#entryBlockHelperWorkspace { + position: absolute; + bottom: 0; + width: 100%; height: 100%; - background-color: #F5F5F5; -} -.entryPlaygroundCodeWorkspace.entryRemove { - display: block !important; - visibility: hidden; + background-color: #fff; + -webkit-animation-name: blockHelperUp; + -moz-animation-name: blockHelperUp; + -ms-animation-name: blockHelperUp; + -o-animation-name: blockHelperUp; + animation-name: blockHelperUp; + -webkit-animation-duration: 0.6s; + -moz-animation-duration: 0.6s; + -ms-animation-duration: 0.6s; + -o-animation-duration: 0.6s; } -.entryPlaygroundCodePhone { - position: relative; - height: 100%; - background-color: #F5F5F5; +#entryBlockHelperWorkspace.lecture { + -webkit-animation-duration: 0s; + -moz-animation-duration: 0s; + -ms-animation-duration: 0s; + -o-animation-duration: 0s; } -.entryPlaygroundCodePhone.entryRemove { - display: block !important; - visibility: hidden; +#entryBlockHelperWorkspace.dispose { + -webkit-animation-name: blockHelperDown; + -moz-animation-name: blockHelperDown; + -ms-animation-name: blockHelperDown; + -o-animation-name: blockHelperDown; + animation-name: blockHelperDown; } -.entryVariablePanelWorkspace { +#entryBlockHelperHeaderWorkspace { position: absolute; - width: 250px; - top: 47px; - bottom: 0px; - padding: 6px 4px 0px 4px; + width: 100%; + height: 40px; + background-color: #1bafea; + font-size: 16px; + line-height: 38px; + padding-left: 28px; + color: #fff; } -.entryVariablePanelPhone { - width: 250px; - top: 47px; - bottom: 0px; - padding: 6px 4px 0px 4px; +#entryBlockHelperDisposeWorkspace { + float: right; + background-image: url("../images/block_helper_dispose.png"); + background-repeat: no-repeat; + background-position: center; + padding: 15px; + margin-top: 4px; + margin-right: 5px; } -.entryVariableSelectorWorkspace { +#entryBlockHelperContentWorkspace { + position: absolute; width: 100%; - border-collapse: separate; - border-spacing: 0; + top: 40px; + bottom: 0px; + overflow-y: auto; + overflow-x: hidden; } -.entryVariableSelectButtonWorkspace { - font-family: nanumBarunBold !important; - width: 25%; - border-collapse: collapse; +.entryBlockHelperIntro { + background-image: url("../images/block_help_icon.png"); + background-repeat: no-repeat; + background-position: center top; + margin-top: 28px; + padding-top: 100px; text-align: center; - vertical-align: center; - background-color: #EDEDED; - height: 38px; - border: solid 1px #bdbdbd; - border-left: none; - color: #535353; - padding-top: 4px; - cursor: pointer; -} -.entryVariableSelectButtonWorkspace.selected { - color: #ffffff; - background-color: #0e68e3; -} -.entryVariableSelectButtonWorkspace.allButton { - border-radius: 6px 0 0 6px; - border-left: solid 1px #bdbdbd; -} -.entryVariableSelectButtonWorkspace.message { - border-radius: 0 6px 0px 0; -} -.entryVariableSelectButtonWorkspace.list { - border-top: none; -} -.entryVariableSelectButtonWorkspace.func { - border-top: none; - border-radius: 0 0px 6px 0; + color: #707070; + font-size: 12px; } -.entryVariableSelectButtonWorkspace.disable { - color: #bdbdbd; - cursor: default; +#entryBlockHelpBtn { + position: absolute; + background-image: url("../images/block_help.png"); + background-repeat: no-repeat; + background-position: center; + padding: 15px; + margin-top: 3px; + margin-left: 6px; + z-index: 100; } -.entryVariableListWorkspace { +#entryBlockHelperBlockWorkspace { position: absolute; - top: 88px; + width: 100%; bottom: 0px; - right: 4px; - left: 4px; - padding: 0; - margin: 0; - list-style: none; - overflow: auto; -} -.entryVariableListElementWorkspace { - background-repeat: no-repeat; - background-position: 14px 10px; - background-color: #efefef; - border: solid 1px #a8a8a8; - margin-bottom: -1px; - min-height: 50px; + overflow-y: auto; + overflow-x: hidden; } -.entryVariableAddWorkspace { - padding: 0; - font-size: 13pt; - color: #717171; - cursor: pointer; - line-height: 49px; +#entryBlockHelperBlockWorkspace > svg { position: relative; - text-align: center; -} -.entryVariableAddWorkspace:hover { - background-color: #d3d3d3; - color: #333; + left: -50%; } -.entryVariableListElementWorkspace.selected { - background-color: #d3d3d3; +#entryBlockHelperDescriptionWorkspace { + position: absolute; + line-height: 20px; + width: 100%; + top: 100px; + font-size: 13px; + color: #707074; + padding: 0 50px; + text-align: center; } -.entryVariableListElementNameWorkspace { +.hwMonitor { + background-color: #363c46; position: absolute; - left: 47px; - margin-top: 12px; - background-color: #efefef; - width: 55%; - border: 1px solid transparent; - padding-left: 5px; } -.selected .entryVariableListElementNameWorkspace { - background-color: #d3d3d3; +.hwComponent text { + font-size: 12px; } -.entryVariableListElementNameWorkspace:focus { - background-color: white; - border: 1px solid gray; +.objectInfoView { + list-style: none; + padding: 0; + height: 59px; + width: 19px; + position: relative; + margin-left: 10px; + float: left; } -.entryVariableFunctionElementNameWorkspace { - border: none; +.objectInfo_visible { + display: inline-block; position: absolute; - left: 55px; - margin-top: 12px; - background-color: transparent; - width: 60%; - overflow: hidden; - height: 20px; - text-overflow: ellipsis; - white-space: nowrap; + top: 10px; + left: 0; + height: 18px; + width: 18px; + background-image: url("../images/layers_icon_visible.png"); + border-bottom: 1px solid rgba(159, 159, 159, 0.3); + cursor: pointer; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } -.entryVariableListElementDeleteWorkspace { +.objectInfo_unvisible { + background-image: url("../images/layers_icon_unvisible.png"); +} +.objectInfo_unlock { + display: inline-block; position: absolute; - margin-top: 5px; - padding-right: 5px; - right: 3px; - border: 0; - outline: 0; - width: 22px; - height: 40px; - opacity: 0; - background-color: transparent; - background-image: url("../../images/layers_icon_close_nor_new_1.png"); - background-repeat: no-repeat; - background-position: center; + top: 33px; + left: 0; + height: 18px; + width: 18px; + background-image: url("../images/layers_icon_unlock.png"); + cursor: pointer; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } -.entryVariableListElementWorkspace:hover .entryVariableListElementDeleteWorkspace { - opacity: 1; +.objectInfo_lock { + background-image: url("../images/layers_icon_lock.png"); } -.entryVariableListElementEditWorkspace { - display: inline-block; - float: right; - border: 0; - outline: 0; - width: 20px; - height: 40px; - margin-top: 5px; - margin-right: 25px; - background-color: transparent; - background-image: url("../../images/layers_icon_edit_nor_new_1.png"); +.entryObjectThumbnailWorkspace { + float: left; + position: absolute; + height: 49px; + width: 49px; + top: 5px; + left: 41px; + border: 1px solid #bcc2c8; + background-color: #ccc; + background-size: contain; background-repeat: no-repeat; background-position: center; - opacity: 0; -} -.entryVariableListElementWorkspace:hover .entryVariableListElementEditWorkspace { - opacity: 1; -} -.entryVariableListCallerListWorkspace { - list-style: none; - padding: 0; } -.entryVariableListCallerWorkspace { - border: solid 1px #c8c8c8; - border-top: none; - height: 50px; - cursor: pointer; +.entryObjectWrapperWorkspace { + float: left; + position: relative; + top: 10px; + left: 72px; + width: 135px; + height: 43px; overflow: hidden; } -.entryVariableListCallerWorkspace:hover { - background-color: #e0e0e0; -} -.entryVariableListCallerWorkspace:first-child { - border-top: none; -} -.entryVariableListCallerWorkspace > .entryObjectThumbnailWorkspace { - position: inherit; - display: block; +.entryObjectNameWorkspace { float: left; - top: 0; - left: 0; - margin: 5px 0 0 5px; - height: 40px; - width: 40px; -} -.entryVariableListCallerNameWorkspace { + width: 112px; + top: 8px; + left: 20px; position: absolute; - overflow: hidden; - text-overflow: ellipsis; + background-color: transparent; + border: none; + color: #000000; white-space: nowrap; - float: left; - height: 49px; - line-height: 49px; - left: 60px; - right: 0; - padding-right: 7px; -} -.entryVariableListCallerNoneWorkspace { - color: #C16B6B; - cursor: default; - line-height: 48px; - padding-left: 50px; + text-overflow: ellipsis; + overflow: hidden; + border: 1px solid transparent; } -.entryVariableLocalElementWorkspace { - background-image: url("../../images/local_question_icon.png"); +.editButtonToggle { + display: block; } -.entryVariableCloudElementWorkspace { - background-image: url("../../images/cloud_question_icon.png"); +.editButtonToggle_ { + display: none; } -.entryVariableGlobalElementWorkspace { - background-image: url("../../images/list_icon_question.png"); +.selectedEditingObject { + background-color: white !important; + border-radius: 3px; + border: 1px solid #878787 !important; + outline: none; + background-color: transparent; } -.entryMessageElementWorkspace { - background-image: url("../../images/list_icon_signal.png"); +/*sj*/ +.selectedObject .entryObjectNameWorkspace { + color: #474747; } -.entryListCloudElementWorkspace { - background-image: url("../../images/cloud_list_icon.png"); +.selectedObject > .entryObjectWrapperWorkspace > .entryObjectNameWorkspace { + color: black; + font-family: nanumBarunRegular !important; } -.entryListGlobalElementWorkspace { - background-image: url("../../images/list_icon_list.png"); +.entryObjectNameWorkspace:focus { + background-color: white; + color: black; } -.entryListLocalElementWorkspace { - background-image: url("../../images/local_list_icon.png"); +.entryObjectNameWorkspace:disabled { + background-color: transparent; } -.entryFunctionElementWorkspace { - background-image: url("../../images/list_icon_function_v1.png"); +.entryObjectEditWorkspace { + float: left; + position: absolute; + width: 19px; + height: 19px; + right: 43px; + top: 22px; + cursor: pointer; + background-image: url("../images/layers_icon_edit_nor_new.png"); } -.entryPlaygroundPictureWorkspace { +.entryObjectDeleteWorkspace { + float: left; position: absolute; - top: 47px; - margin-left: 0; - height: 100%; - background-color: #ececec; + width: 19px; + height: 19px; + right: 21px; + top: 22px; + cursor: pointer; + background-image: url("../images/layers_icon_close_nor_new.png"); } -.entryPlaygroundPicturePhone { - margin-left: 0; - height: 100%; - background-color: #ececec; +.entryObjectDeletePhone { + float: left; + position: absolute; + width: 16px; + height: 16px; + right: 57px; + top: 25px; + cursor: pointer; + background-image: url("../images/layers_icon_close_nor.png"); } -.entryPlaygroundAddPicture { +.entryObjectEditPhone { + float: left; position: absolute; - width: 240px; - height: 60px; - background-color: #e5e5e5; + width: 24px; + background-repeat: no-repeat; + height: 21px; + right: 17px; + background-color: transparent; + border: none; + top: 21px; cursor: pointer; - border-bottom: 1pt solid #ebeff1; + background-image: url("../images/glyphicons_150_edit.png"); } -.entryPlaygroundAddPicturePhone { +.entryObjectSelectedImgWorkspace { + float: left; + position: absolute; + width: 14px; + height: 26px; + right: 0; + top: 20px; + cursor: col-resize; + background-image: url("../images/entry_scroll.png"); +} +.selectedObject .entryObjectSelectedImgWorkspace { + float: left; + position: absolute; + width: 14px; + height: 26px; + right: 0; + top: 20px; + cursor: col-resize; + background-image: url("../images/entry_scroll.png"); +} +.entryObjectCoordinateWorkspace { + float: left; + width: 100%; position: relative; - padding: 0; - margin: 0; - height: 50px; - cursor: pointer; - border-bottom: 1pt solid #ebeff1; + font-size: 9pt; + color: #000000; + top: 12px; + left: 28px; + width: 150px; } -.entryPlaygroundAddPictureInner { - display: block; - width: 141px; - height: 30px; - background-color: #eeeeee; +.selectedObject > .entryObjectWrapperWorkspace > .entryObjectCoordinateWorkspace { color: black; - text-align: center; - font-size: 11px; - line-height: 28px; - border: 1px solid #cccccc; - border-radius: 7px; - margin-top: 15px; - margin-left: 49.5px; -} -.entryPlaygroundAddPictureInnerPhone { - display: block; - height: 50px; - background-color: #CDCFC9; - color: #656565; - text-align: center; - font-size: 10.5pt; - line-height: 36px; - border: 2px dashed #737373; - width: 240px; - padding: 8px 10px 12px 10px; } -.entryPlaygroundPictureList { +.entryObjectInformationWorkspace { position: absolute; - padding: 0px; - margin: 0px; - width: 240px; - top: 60px; - margin-bottom: 47px; - bottom: 0px; - overflow: auto; - list-style: none; - background-color: #Cfcfcf; + cursor: pointer; + margin: 12px 0 0 0; + width: 13px; + height: 13px; + background-image: url("../images/layers_arrow_up_nor.png"); } -.entryPlaygroundPictureListPhone { +.selectedObject .entryObjectInformationWorkspace { + background-image: url("../images/layers_arrow_down_nor.png"); +} +.informationToggle > .entryObjectWrapperWorkspace > .entryObjectInformationWorkspace { + background-image: url("../images/layers_arrow_down_nor_1.png"); +} +.entryObjectButtonWorkspace { + display: none; + float: right; position: relative; - padding: 0px; - margin: 0px; - width: 240px; - bottom: 0px; - overflow: auto; - list-style: none; - background-color: #Cfcfcf; + width: 40px; + height: 40px; + background-color: #bcc3c9; + border-radius: 50%; + margin: 10px 10px 10px 5px; + background-position: center; + background-repeat: no-repeat; + background-position: 50% 35%; + color: white; + font-size: 7.5pt; + padding: 23px 0 0 0; + text-align: center; + outline: none; + border: none; } -.entryPlaygroundPictureElement { - display: block; - background-color: #f4f4f4; - border-bottom: 1pt solid #ebeff1; - height: 60px; - color: #294117; - cursor: pointer; +.informationToggle > .entryObjectButtonWorkspace { + display: none; +} +.entryObjectSoundWorkspace { + background-image: url("../images/icon_sound.png"); + background-color: #6a9a1f; +} +.entryObjectSoundWorkspace:hover { + background-color: #83AF3D; +} +.entryObjectPictureWorkspace { + background-image: url("../images/icon_picture.png"); + background-color: #f26724; +} +.entryObjectPictureWorkspace:hover { + background-color: #F3783C; } -.entryPlaygroundPictureElement:hover { - background-color: #C0C0C0; - cursor: move; +.entryObjectCodeWorkspace { + background-image: url("../images/icon_code.png"); + background-color: #00ace9; } -.entryPlaygroundPictureElement:hover .entryPlaygroundPictureOrder, -.entryPlaygroundSoundElement:hover .entryPlaygroundSoundOrder { - background-color: #634cd9; - color: white; +.entryObjectCodeWorkspace:hover { + background-color: #5FC8EE; } -.entryPictureSelected { - background-color: #c1c1c1; +.entryObjectTextWorkspace { + background-image: url("../images/text_icon_white.png"); + background-color: #F3BB1D; + background-position: 50% 20%; + background-size: 75%; } -.entryPlaygroundPictureThumbnail { - float: left; - position: relative; - height: 49px; - width: 49px; - top: 5px; - left: 10px; - border: 1px solid #bcc2c8; - background-color: #ccc; - background-size: contain; - background-repeat: no-repeat; - background-position: center; +.entryObjectRotationWrapperWorkspace { + display: none; + width: 100%; + height: 59px; + padding: 0 0px 10px 10px; + border-top: 1px solid #e1e1e1; + background-color: #e5e5e5; } -.entryPlaygroundPictureName { - float: left; - position: relative; - top: 17px; - left: 17px; - width: 78px; - background-color: transparent; - font-size: 10pt; - text-overflow: ellipsis; - color: #294117; - cursor: text; - border: 1px solid transparent; +.collapsed .entryObjectRotationWrapperWorkspace { + height: 90px; } -.entryPlaygroundPictureName:focus, -.entryPlaygroundSoundName:focus { - border: 1px solid gray; - background-color: white; +.selectedObject .entryObjectRotationWrapperWorkspace { + display: inline-block; } -.entryPlaygroundPictureName:hover, -.entryPlaygroundSoundName:hover { - border: 1px solid gray; +.informationToggle > .entryObjectRotationWrapperWorkspace { + display: inline-block; } -.entryPlaygroundPictureSize { +.rotationMethodWrapper { float: right; + width: 180px; position: relative; - top: 21px; - right: 10px; - font-size: 8pt; } -.entryPlaygroundTextWorkspace { +.collapsed .rotationMethodWrapper { + float: left; + top: 39px; +} +.entryObjectRotateMethodLabelWorkspace { + display: inline-block; + line-height: 20px; + font-size: 9pt; + color: #000000; position: absolute; - top: 45px; - height: 100%; - width: 100%; - background-color: #ececec; padding-left: 20px; padding-top: 20px; } -.entryTextHead { - font-size: 18px; +/*.entryObjectRotateLabelWorkspace { + display: block; + font-size: 9pt; + color: #000000; + left: 38px; + margin-top: 31px; } -.entryTextEdit { - font-size: 17px; - width: 220px; - height: 30px; - border: 1px solid #808080; - border-radius: 3px; +*/ +.entryObjectRotateLabelWrapperWorkspace { + position: absolute; + top: 90px; + margin-left: 37px; + font-size: 9pt; + color: #000000; } -#entryTextProperty { - width: 220px; - height: 32px; - margin-top: 12px; +.entryObjectRotateInputWorkspace, +.entryObjectDirectionInputWorkspace { + width: 40px; + background-color: #e5e5e5; + border: none; + outline: none; + border: 1px solid transparent; } -.entryTextFontSelect { +.entryObjectDirectionSpanWorkspace { + margin-left: 12px; +} +.entryObjectRotateModeWorkspace { + cursor: pointer; display: inline-block; - width: 96px; - height: 32px; - border: 1px solid #808080; - border-radius: 4px; - background-color: white; + vertical-align: middle; float: left; + margin-left: 8px; + margin-top: 18px; + width: 22px; + height: 22px; } -.entryTextFontSelecter { - margin-top: 5px; - margin-left: 2px; +.entryObjectRotateModeAWorkspace { + margin-left: 80px; + background-image: url("../images/layers_icon_rotate01_nor.png"); } -.entryFontToggle { - display: inline-block; - width: 96px; - width: 32px; - height: 32px; - float: right; +.entryObjectRotateModeAWorkspace.selected { + background-image: url("../images/layers_icon_rotate01_sel.png"); } -#entryFontColorToggle { - background-image: url("../../images/text_in_off.png"); +.entryObjectRotateModeBWorkspace { + background-image: url("../images/layers_icon_rotate02_nor.png"); } -#entryFontColorToggle.selected { - background-image: url("../../images/text_in_on.png"); +.entryObjectRotateModeBWorkspace.selected { + background-image: url("../images/layers_icon_rotate02_sel.png"); } -#entryFontBGToggle { - margin-left: 6px; - background-image: url("../../images/text_out_off.png"); +.entryObjectRotateModeCWorkspace { + background-image: url("../images/layers_icon_rotate03_nor.png"); } -#entryFontBGToggle.selected { - background-image: url("../../images/text_out_on.png"); +.entryObjectRotateModeCWorkspace.selected { + background-image: url("../images/layers_icon_rotate03_sel.png"); } -.entryPlaygroundSoundWorkspace { +.entryObjectCoordinateSpanWorkspace { + float: left; position: absolute; - top: 47px; - margin-left: 0; - height: 100%; - background-color: #ececec; } -.entryPlaygroundAddSound { - position: absolute; - height: 60px; - width: 240px; - background-color: #e5e5e5; - cursor: pointer; - border-bottom: 1pt solid #ebeff1; +.entryObjectCoordinateSpanWorkspace:nth-child(3) { + float: left; + margin-left: 57px; } -.entryPlaygroundAddSoundPhone { - position: relative; - height: 50px; - cursor: pointer; - border-bottom: 1pt solid #ebeff1; +.entryObjectCoordinateSizeWorkspace { + float: left; + margin-left: 113px; + position: absolute; } -.entryPlaygroundAddSoundInner { - display: block; - width: 141px; - height: 30px; - background-color: #eeeeee; - color: black; - text-align: center; - font-size: 11px; - line-height: 28px; - border: 1px solid #cccccc; - border-radius: 7px; - margin-top: 15px; - margin-left: 49.5px; +.entryObjectCoordinateInputWorkspace { + width: 40px; + height: 20px; + position: absolute; + float: left; + margin: -2px 5px 0px 15px; + background-color: #e5e5e5; + border: none; + border: 1px solid transparent; } -.entryPlaygroundAddSoundInnerPhone { - display: block; - height: 40px; - background-color: #CDCFC9; - color: #656565; - text-align: center; - font-size: 10.5pt; - line-height: 36px; - margin: 10px; - border: 2px dashed #737373; - width: 220px; +.entryObjectCoordinateInputWorkspace_right { + margin-left: 70px; } -.entryPlaygroundSoundList { +.entryObjectCoordinateInputWorkspace_size { + float: left; position: absolute; - padding: 0px; - margin: 0px; - width: 240px; - top: 60px; - margin-bottom: 47px; - bottom: 0px; - overflow: auto; - list-style: none; - background-color: #cfcfcf; + margin-left: 145px; } -.entryPlaygroundSoundListPhone { - position: relative; - padding: 0px; - margin: 0px; - width: 240px; - bottom: 0px; - overflow: auto; - list-style: none; - background-color: #cfcfcf; +.entryObjectCoordinateInputWorkspace:disabled, +.entryObjectRotateInputWorkspace:disabled, +.entryObjectDirectionInputWorkspace:disabled { + background-color: transparent; } -.entryPlaygroundSoundElement { - display: block; - background-color: #f4f4f4; - border-bottom: 1pt solid #ebeff1; - height: 60px; - color: #294117; - cursor: pointer; +.entryObjectCoordinateInputWorkspace:focus, +.entryObjectRotateInputWorkspace:focus, +.entryObjectDirectionInputWorkspace:focus { + background-color: transparent; } -.entryPlaygroundSoundElement:hover { - background-color: #c1c1c1; - cursor: move; +/* Painter css start */ +.entryPlaygroundPainter { + position: absolute; + left: 240px; + top: 0; + bottom: 0; + right: 0; + overflow: hidden; + border-left: 2px solid #c4c4b9; + background-color: #fff; } -.entryPlaygroundSoundThumbnail { - float: left; - position: relative; - height: 49px; - width: 49px; - top: 5px; - left: 10px; - border: 1px solid #bcc2c8; - background-color: #ccc; - background-size: 32px 32px; - background-repeat: no-repeat; - background-position: center; - cursor: pointer; +.entryPlaygroundPainterTop { + position: absolute; + display: block; + width: 100%; + left: 55px; + background-color: #634cd9; + height: 29px; } -.entryPlaygroundSoundThumbnail.entryPlaygroundSoundPlay { - background-image: url("../../images/workspace_sound_play.png"); +.entryPlaygroundPainterTopMenu ul ul { + display: none; + margin-top: 5px; + margin-left: -8px; } -.entryPlaygroundSoundThumbnail.entryPlaygroundSoundStop { - background-image: url("../../images/workspace_sound_stop.png"); +/*.entryPlaygroundPainterTopMenu ul ul { + background: #5f6975; + border-radius: 0px; + padding: 0; + position: absolute; + top: 100%; + width: 120px; +}*/ +.entryPlaygroundPainterTopMenu > li { + list-style-type: none; + top: 100%; + width: 120px; } -.entryPlaygroundSoundName { - float: left; - position: relative; - top: 18px; - left: 17px; - width: 95px; - background-color: transparent; - font-size: 10pt; - border: 1px solid transparent; - text-overflow: ellipsis; - color: #294117; +/*.entryPlaygroundPainterTopMenu ul ul ul { + position: absolute; + color:black; + left: 100%; + top:0; +}*/ +/*.entryPlaygroundPainterTopMenu ul ul li { + float: none; + border-top: 1px solid #6b727c; + border-bottom: 1px solid #575f6a; + position: relative; + cursor: pointer; + color:black; +}*/ +.entryPlaygroundPainterTopMenu ul ul li a { + padding: 10px; + /*color: #fff;*/ + color: black; } -.entryPlaygroundSoundLength { - float: right; - position: relative; - top: 20px; - right: 10px; - font-size: 9pt; +.entryPlaygroundPainterTopMenu ul ul li a:hover { + background: white; + color: black; } -.entryPlaygroundDefaultWorkspace { - height: 100%; - background-color: #363C46; +.entryPlaygroundPainterTopMenu li a:hover { + background: #4b545f; color: white; } -.entryCategoryWorkspace { - width: 74px; - height: 100%; +.entryPlaygroundPainterTopMenu ul li:hover > ul { display: block; } -.entryCategoryListWorkspace { - padding: 44px 0 0 0; - margin: 0; - list-style-type: none; +.entryPlaygroundPainterTopMenu ul li a:hover { + background-color: #3b329e; } -.entryCategoryListPhone { +.entryPlaygroundPainterTopMenu ul { padding: 0; - margin: 0; - list-style-type: none; + border-radius: 0; + height: 50px; + list-style: none; + position: relative; + display: inline-table; + z-index: 100; } -.entryCategoryElementWorkspace { +.entryPlaygroundPainterTopMenu ul:after { + content: ""; clear: both; - padding-top: 38px; - width: 64px; - text-align: center; - background-color: #edf5f7; - font-size: 13px; - color: #474747; - float: left; - border-bottom: 1px solid #a6cafb; - cursor: pointer; - font-family: nanumBarunBold !important; + display: block; } -@media screen and (max-height: 10000px) { - .entryCategoryElementWorkspace { - height: 61px; - background-position: 50% 6px; - padding-top: 38px; - } +.entryPlaygroundPainterTopMenuEdit:hover { + background-color: #3b329e; } -@media screen and (max-height: 880px) { - .entryCategoryElementWorkspace { - height: 56px; - background-position: 50% 4px; - padding-top: 34px; - } +/*.entryPlaygroundPainterTopMenu ul li { + float: left; +}*/ +/*.entryPlaygroundPainterTopMenu ul li:hover { + background: #4b545f; +}*/ +/*.entryPlaygroundPainterTopMenu ul li:hover { + background-color: #3b329e !important; + font:bold; +}*/ +.entryPlaygroundPainterTopMenu ul li a { + display: block; + padding: 5px 10px; + color: white; + text-decoration: none; } -@media screen and (max-height: 810px) { - .entryCategoryElementWorkspace { - height: 50px; - background-position: 50% 2px; - padding-top: 30px; - } +#entryPainterTopMenuEdit > ul > li { + border-bottom: solid 1px #643cd9; + border-left: solid 1px #643cd9; + border-right: solid 1px #643cd9; + background-color: white; + font-family: nanumBarunRegular !important; } -@media screen and (max-height: 740px) { - .entryCategoryElementWorkspace { - height: 42px; - background-position: 50% 1px; - background-size: 35px; - padding-top: 23px; - } +#entryPainterTopMenuEdit > ul > li { + background-color: white; + border-bottom: solid 1px #643cd9; } -@media screen and (max-height: 640px) { - .entryCategoryElementWorkspace { - height: 36px; - background-position: 50% 1px; - background-size: 30px; - padding-top: 18px; - } +#entryPainterTopMenuEdit > ul > li > :hover { + background-color: #643cd9; + color: white; } -.entryCategoryElementPhone { - height: 50px; - clear: both; - width: 56px; - padding-top: 30px; - text-align: center; - background-color: #E2E9F0; - font-size: 13px; - color: #474747; - float: left; - border-bottom: 1px solid #B7C4CC; - background-position: 5px 2px; - cursor: pointer; +#entryPainterTopMenuEdit { + color: white; } -.entryCategoryElementEndWorkspace { - clear: both; - width: 3px; - margin-left: 56px; - background-color: #515B7C; - height: 4000px; +#entryPainterTopMenuFile > ul > li { + border-bottom: solid 1px #643cd9; + border-left: solid 1px #643cd9; + border-right: solid 1px #643cd9; + background-color: white; + font-family: nanumBarunRegular !important; } -.entrySelectedCategory { - margin: 0; - background-color: #e5e5e5; +#entryPainterTopMenuFile > ul > li { + background-color: white; + border-bottom: solid 1px #643cd9; } -.entryBlockMenuWorkspace { - background-color: #e5e5e5; - position: absolute; - left: 64px; - top: 45px; - width: 186px; - bottom: 0px; - z-index: 100; +#entryPainterTopMenuFile > ul > li > :hover { + background-color: #643cd9; + color: white; } -.entryBlocklyWorkspace { +#entryPainterTopMenuFile { + color: white; +} +.entryPlaygroundPainterTopStageXY { position: absolute; - left: 250px; - top: 8px; - bottom: 0px; - right: 0px; - overflow: hidden; - border: solid 1px #C4C4B9; - border-top-left-radius: 10px; - background-image: url("../../images/entry_bg.png"); + width: 150px; + height: 30px; + top: 5px; + left: 280px; + font-size: 10pt; + color: white; } -.entryBlocklyWorkspace.folding { - z-index: 300; - border-left: solid 1px #C4C4B9; - -webkit-animation-duration: 0.7s; - -moz-animation-duration: 0.7s; - -ms-animation-duration: 0.7s; - -o-animation-duration: 0.7s; - -webkit-animation-name: foldBlockly; - -moz-animation-name: foldBlockly; - -ms-animation-name: foldBlockly; - -o-animation-name: foldBlockly; - animation-name: foldBlockly; - -webkit-animation-fill-mode: forwards; - -moz-animation-fill-mode: forwards; - -ms-animation-fill-mode: forwards; - -o-animation-fill-mode: forwards; - animation-fill-mode: forwards; +.entryPlaygroundPainterTopToolbar { + position: absolute; + top: 0; + list-style-type: none; + margin: 0; + padding: 0; + right: 170px; + width: 100px; + height: 30px; } -@keyframes foldBlockly { - to { - left: 64px; - } +.entryPlaygroundPainterFlip { + width: 200px; } -@-ot-keyframes foldBlockly { - to { - left: 64px; - } +.entryPlaygroundPainterFlipY { + position: absolute; + top: 90px; + left: 90px; + background-image: url("../images/horizontal.png"); + background-repeat: no-repeat; + border-radius: 3px; + width: 28px; + height: 28px; } -@-ms-keyframes foldBlockly { - to { - left: 64px; - } +.entryPlaygroundPainterFlipX { + position: absolute; + top: 90px; + left: 60px; + background-image: url("../images/vertical.png"); + background-repeat: no-repeat; + border-radius: 3px; + width: 28px; + height: 28px; } -@-moz-keyframes foldBlockly { - to { - left: 64px; - } +.entryPlaygroundPainterTopToolbar > li { + float: left; + position: relative; + left: 0; + margin: 2px 5px; + width: 35px; + height: 25px; + text-align: center; + line-height: 30px; + cursor: pointer; } -@-webkit-keyframes foldBlockly { - to { - left: 64px; - } +.entryPlaygroundPainterToolbox { + position: absolute; + height: 100%; + width: 54px; + background-color: #f5f5f5; } -.entryBlocklyWorkspace.foldOut { - z-index: 300; - -webkit-animation-duration: 0.7s; - -moz-animation-duration: 0.7s; - -ms-animation-duration: 0.7s; - -o-animation-duration: 0.7s; - -webkit-animation-name: foldOutBlockly; - -moz-animation-name: foldOutBlockly; - -ms-animation-name: foldOutBlockly; - -o-animation-name: foldOutBlockly; - animation-name: foldOutBlockly; - -webkit-animation-fill-mode: forwards; - -moz-animation-fill-mode: forwards; - -ms-animation-fill-mode: forwards; - -o-animation-fill-mode: forwards; - animation-fill-mode: forwards; +.entryPlaygroundPainterToolboxContainer li { + cursor: pointer; + top: 16px; } -@keyframes foldOutBlockly { - from { - left: 64px; - } +.entryPlaygroundPainterToolboxSelected { + background-color: #ccc; } -@-o-keyframes foldOutBlockly { - from { - left: 64px; - } +.entryPlaygroundPainterContainer { + position: absolute; + top: 30px; + left: 56px; + background-color: transparent; + overflow: scroll; } -@-ms-keyframes foldOutBlockly { - from { - left: 64px; - } +.entryPlaygroundPainterCanvas { + position: absolute; + top: 0; + left: 0; + width: 960px; + height: 540px; } -@-moz-keyframes foldOutBlockly { - from { - left: 64px; - } +.entryPlaygroundPainterAttr { + position: absolute; + top: 342px; + width: 100%; + height: 192px; + background-color: #f5f5f5; + padding-left: 6px; + left: 54px; } -@-webkit-keyframes foldOutBlockly { - from { - left: 64px; - } +.entryPlaygroundPainterToolboxContainer { + list-style-type: none; + margin: 0; + padding: 0; } -.entryBlocklyPhone { +.entryPlaygroundPainterToolboxContainer > li { + float: left; + position: relative; + left: 8px; + margin: 5px 5px; + width: 27px; + height: 27px; + background-color: #fff; + font-size: 9pt; + color: #000; + text-align: center; + line-height: 40px; +} +.entryPlaygroundPainterAttrResize { position: absolute; - top: 0px; - left: 56px; - right: 0px; - bottom: 0px; - overflow: hidden; - border: solid 1px #C4C4B9; - border-left: 0; - background-image: url("../../images/entry_bg_1.png"); + top: 4px; + left: 5px; + padding: 4px; } -#entryCategorymoving { - /*border-right: 4px solid #A751E3;*/ - background-image: url("../../images/movement.png"); - background-repeat: no-repeat; +.entryPlaygroundPainterAttrResize > legend { + background-color: transparent; + padding: 2px; + width: 30px; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; } -.entrySelectedCategory#entryCategorymoving { - /*border-left: 4px solid #A751E3;*/ - border-right: none; +.entryPlaygroundPainterAttrResize > span { + font-size: 9pt; + padding: 2px; + margin: 0; } -#entryCategorylooks { - /*border-right: 4px solid #EC4466;*/ - background-image: url("../../images/looks.png"); - background-repeat: no-repeat; +.painterAttrRotateTop { + padding-left: 28px; + color: white; } -.entrySelectedCategory#entryCategorylooks { - /*border-left: 4px solid #EC4466;*/ - border-right: none; +.entryPlaygroundPainterAttrRotate { + position: absolute; + top: 77px; + left: 10px; + width: 40px; + height: 40px; + background-color: #643cd9; + border-radius: 3px; } -#entryCategorybrush { - /*border-right: 4px solid #FF9E20;*/ - background-image: url("../../images/brush.png"); - background-repeat: no-repeat; +.entryPlaygroundPainterSizeText { + position: absolute; + left: 48px; + width: 10px; + color: black; } -.entrySelectedCategory#entryCategorybrush { - border-right: none; +.painterAttrRotateTop { + width: 40px; + height: 10px; } -#entryCategorytext { - background-image: url("../../images/postbox_new.png"); - background-repeat: no-repeat; +.entryPlaygroundPainterNumberInput { + width: 30px; + font-size: 9pt; + color: white; + padding-left: 3px; + padding-right: 3px; } -.entrySelectedCategory#entryCategorytext { - border-right: none; +.entryPlaygroundPainterAttrOpacity { + position: absolute; + top: 77px; + left: 65px; + border-radius: 3px; + background-color: #643cd9; } -#entryCategorysound { - background-image: url("../../images/sound.png"); - background-repeat: no-repeat; +.entryPlaygroundPainterAttrOpacity > legend { + background-color: transparent; + padding: 2px; + width: 45px; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; } -.entrySelectedCategory#entryCategorysound { - border-right: none; +.entryPlaygroundPainterAttrOpacity > span { + font-size: 9pt; + padding: 2px; + margin: 0; } -#entryCategorystart { - background-image: url("../../images/start.png"); - background-repeat: no-repeat; +.entryPlaygroundPainterNumberInput { + width: 30px; + font-size: 9pt; } -.entrySelectedCategory#entryCategorystart { - border-right: none; +.entryPlaygroundPainterAttrColor { + position: absolute; + left: 210px; + top: 20px; + width: 160px; + padding: 4px; } -#entryCategoryflow { - background-image: url("../../images/flow.png"); - background-repeat: no-repeat; +.entryPlaygroundPainterAttrColor > legend { + background-color: transparent; + padding: 2px; + width: 35px; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; } -.entrySelectedCategory#entryCategoryflow { - border-right: none; +.entryPlaygroundPainterAttrColorElement { + float: left; + width: 15px; + height: 15px; } -#entryCategoryjudgement { - background-image: url("../../images/judgement.png"); - background-repeat: no-repeat; +.entryPlaygroundPainterAttrThick { + position: absolute; + top: 20px; + left: 2px; + background-color: #643cd9; + border-radius: 3px; } -.entrySelectedCategory#entryCategoryjudgement { - border-right: none; +.entryPlaygroundPainterAttrThick > legend { + position: absolute; + top: -30pxpx; + background-color: transparent; + padding: 2px; + width: 60px; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; } -#entryCategorycalc { - background-image: url("../../images/calc.png"); - background-repeat: no-repeat; +.entryPlaygroundPainterAttrThickInput { + font-size: 9pt; } -.entrySelectedCategory#entryCategorycalc { - border-right: none; +.entryPlaygroundPainterAttrRect { + position: absolute; + top: 40px; + left: 490px; + padding: 4px; + border: 1px solid #000; } -#entryCategoryvariable { - background-image: url("../../images/variable.png"); - background-repeat: no-repeat; +.entryPlaygroundPainterAttrRect > legend { + background-color: transparent; + padding: 2px; + width: 60px; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; } -.entrySelectedCategory#entryCategoryvariable { - border-right: none; +.entryPlaygroundPainterAttrRectFilled { + width: 15px; + height: 15px; + background-color: #000; + border: 1px solid #000; + float: left; } -#entryCategoryfunc { - background-image: url("../../images/function.png"); - background-repeat: no-repeat; +.entryPlaygroundPainterAttrRectEmpty { + width: 15px; + height: 15px; + background-color: #fff; + border: 1px solid #000; + float: right; } -.entrySelectedCategory#entryCategoryfunc { - border-right: none; +.entryPlaygroundPainterAttrFont { + position: absolute; + left: 0px; + padding: 4px; + width: 100px; + height: 40px; } -#entryCategoryscene { - border-right: none; - background-image: url("../../images/scene.png"); - background-repeat: no-repeat; +.entryPlaygroundPainterAttrTop { + position: absolute; + top: 20px; + width: 93px; + height: 40px; + border-radius: 3px; + color: white; + background-color: #643cd9; } -.entrySelectedCategory#entryCategoryscene { - border-left: none; - border-right: none; +.entryPlaygroundPaintAttrTop_ { + width: 93px; + height: 10px; } -#entryCategoryarduino { - background-image: url("../../images/arduino.png"); - background-repeat: no-repeat; +.entryPlaygroundPainterAttrFont > legend { + background-color: transparent; + width: 60px; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; } -.entrySelectedCategory#entryCategoryarduino { - border-right: none; +.painterAttrFontSizeArea { + position: absolute; + top: 70px; + background-color: #643cd9; + width: 44px; + height: 40px; + color: white; + border-radius: 3px; } -.entryToastContainer { - position: fixed; - right: 0px; - bottom: 0px; - margin: 0px; - padding: 10px; - width: 300px; - max-height: 100%; - overflow: auto; - z-index: 9000; +.painterAttrFontSizeTop { + width: 40px; + height: 10px; } -.entryToast { - padding: 7px 16px; - margin-top: 8px; - width: 100%; - background-color: #eee; - box-shadow: #999 0 0 8px; - border: 2px solid; - -webkit-border-radius: 4px; - border-radius: 4px; - background-clip: padding-box; - -webkit-transition: opacity 0.25s ease-in-out; - -moz-transition: opacity 0.25s ease-in-out; - -o-transition: opacity 0.25s ease-in-out; - -ms-transition: opacity 0.25s ease-in-out; - transition: opacity 0.25s ease-in-out; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - cursor: pointer; - opacity: 1; +.entryPlaygroundPainterAttrFontName, +.entryPlaygroundPainterAttrFontSize, +.entryPlaygroundPainterAttrFontStyle { + background: transparent; + border: 0px; } -.entryToastSuccess { - border-color: #d6e9c6; - background-color: #e5f3df; - color: #468847; +.entryPlaygroundPainterAttrFontStyleArea { + position: absolute; + background-color: #643cd9 ; + top: 120px; + width: 67px; + height: 40px; + border-radius: 3px; + color: white; } -.entryToastWarning { - border-color: #7e719; - background-color: #fff9ab; - color: #e07000; +.entryPlaygroundPainterAttrFontStyle option { + color: black; } -.entryToastAlert { - color: #b94a48; - background-color: #f2dede; - border-color: #eed3d7; +.entryPlaygroundPainterAttrFontSize option { + color: black; } -.entryToastTitle { - font-size: 12pt; - font-weight: bold; +.entryPlaygroundPainterAttrFontName option { + color: black; } -.entryToastMessage { - font-size: 9pt; - margin-top: 4px; - margin-bottom: 2px; +.entryPlaygroundPainterAttrFontTop { + width: 67px; + height: 10px; } -.entryPopup { +.entryPlaygroundPainterTopMenuFileNew { position: absolute; - margin: 0; - padding: 0; - top: 0; - left: 0; - height: 100%; - width: 100%; - z-index: 7000; - background-color: rgba(0, 0, 0, 0.2); + color: white; + left: 20px; + top: 0px; + padding: 4px; + height: 28px; + cursor: pointer; + list-style: none; + font-family: nanumBarunBold !important; } -.entryPopupWindow { - width: 80%; - height: 80%; +.entryPlaygroundPainterTopMenuFileSave { position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - margin: auto; - max-width: 100%; - max-height: 100%; - /*overflow: hidden;*/ - z-index: 8000; - background-color: white; + color: white; + padding-left: 8px; + left: 95px; + top: 0px; + padding-top: 4px; + height: 28px; + width: 70px; + cursor: pointer; + font-family: nanumBarunBold !important; } -#entryTextColourTable { - margin-top: 12px; +.entryPlaygroundPainterTopMenuFileSave:hover, +.entryPlaygroundPainterTopMenuFileNew:hover { + background-color: #3b329e !important; +} +.entryPlaygroundPainterTopMenuEdit, +.entryPlaygroundPainterTopMenuFile { + position: absolute; + color: white; + padding-left: 8px; + left: 158px; + height: 28px; + width: 55px; cursor: pointer; - border-collapse: collapse; + margin-top: -4px; + padding-top: 3px; + font-family: nanumBarunBold !important; } -.entryTd { - width: 22px; - height: 22px; +.entryPlaygroundPainterTopMenuEdit > li { + list-style-type: none; } -.entryTdTransparent { - width: 20px; - height: 20px; - background-color: white; - background-image: -webkit-linear-gradient(135deg, transparent 11.5px, #ff0000 13px, rgba(255, 255, 255, 0.5) 14.5px); - border: 1px solid; +.entryPlaygroundPainterTopMenuFile { + left: 100px; } -.nav_right_wrapper { - right: 0; +.entryPlaygroundPainterTopMenuFile > li { + list-style-type: none; +} +.entryPlaygroundPainterToolboxPen { + background-image: url("../images/off_pen.png"); + background-repeat: no-repeat; +} +.entryPlaygroundPainterToolboxPen:hover { + background-image: url("../images/on_pen.png"); +} +.entryPlaygroundPainterToolboxLine { + background-image: url("../images/off_line.png"); } -.navbar-default { - background-color: #89c1e4; - border-color: #89c1e4; - /*background-color: #4accaa; - border-color: #4accaa;*/ +.entryPlaygroundPainterToolboxLine:hover { + background-image: url("../images/on_line.png"); } -#project_name.normal { - background-color: #89c1e4; - /*background-color: #4accaa;*/ +.entryPlaygroundPainterToolboxRect { + background-image: url("../images/off_square.png"); } -.btn-group > .btn { - background-color: transparent; - border-color: transparent; - /*background-color: #4accaa; - border-color: #4accaa;*/ +.entryPlaygroundPainterToolboxRect:hover { + background-image: url("../images/on_square.png"); } -.art_project_name { - background-color: white !important; +.entryPlaygroundPainterToolboxCircle { + background-image: url("../images/off_circle.png"); } -.art_project_name:hover { - border: 1px solid #b4b4b4 !important; +.entryPlaygroundPainterToolboxCircle:hover { + background-image: url("../images/on_circle.png"); } -.entryObjectCoordinateSpanWorkspace { - float: left; - position: absolute; +.entryPlaygroundPainterToolboxSelect:hover { + background-image: url("../images/on_choice.png"); } -.entryObjectCoordinateSpanWorkspace:nth-child(3) { - float: left; - margin-left: 57px; +.entryPlaygroundPainterToolboxText { + background-image: url("../images/off_text.png"); } -.entryObjectCoordinateSizeWorkspace { - float: left; - margin-left: 113px; - position: absolute; +.entryPlaygroundPainterToolboxText:hover { + background-image: url("../images/on_text.png"); } -.entryObjectCoordinateInputWorkspace { - width: 40px; - height: 20px; - position: absolute; - float: left; - margin: -2px 5px 0px 15px; - background-color: #e5e5e5; - border: none; - border: 1px solid transparent; +.entryPlaygroundPainterToolboxFill { + background-image: url("../images/off_paint.png"); } -.entryObjectCoordinateInputWorkspace_right { - margin-left: 70px; +.entryPlaygroundPainterToolboxFill:hover { + background-image: url("../images/on_paint.png"); } -.entryObjectCoordinateInputWorkspace_size { - float: left; - position: absolute; - margin-left: 145px; +.entryPlaygroundPainterToolboxErase { + background-image: url("../images/off_eraser.png"); } -.entryObjectCoordinateInputWorkspace:focus, -.entryObjectRotateInputWorkspace:focus, -.entryObjectDirectionInputWorkspace:focus { - background-color: transparent; +.entryPlaygroundPainterToolboxErase:hover { + background-image: url("../images/on_eraser.png"); } -.entryFunctionEdit { - position: absolute; - width: 100%; - height: 100%; - background-color: rgba(180, 180, 180, 0.4) !important; - z-index: 50; +.entryPlaygroundPainterToolboxSelect { + background-image: url("../images/off_choice.png"); } -#entryFunctionBtnWrapper { - position: absolute; - z-index: 100; - bottom: 90px; - margin: 0 auto; - left: 50%; +.entryPlaygroundPainterToolboxCoordinate { + background-image: url("../images/off_center.png"); } -.entryFunctionBtn { - position: relative; - display: inline-block; - cursor: pointer; - border: solid 3px #888; - color: #666; - width: 55px; - height: 55px; - border-radius: 27.5px; - text-align: center; - line-height: 48px; - left: -50%; +.entryPlaygroundPainterToolboxCoordinate:hover { + background-image: url("../images/on_center.png"); } -.entryFunctionBtn:hover { - border: solid 3px #555; - color: #222; +.entryPlaygroundPainterToolboxGlasses { + background-image: url("../images/off_zoom.png"); } -#entryFunctionSave { - margin-right: 20px; +.entryPlaygroundPainterToolboxGlasses:hover { + background-image: url("../images/on_zoom.png"); } -/* Painter css start */ -.entryPlaygroundPainter { - position: absolute; - left: 240px; - top: 0; - bottom: 0; - right: 0; - overflow: hidden; - border-left: 2px solid #c4c4b9; - background-color: #fff; +.entryPlaygroundPainterToolboxCursor { + background-image: url("../images/off_hand.png"); } -.entryPlaygroundPainterTop { - position: absolute; - display: block; - width: 100%; - left: 55px; - background-color: #634cd9; - height: 29px; +.entryPlaygroundPainterToolboxCursor:hover { + background-image: url("../images/on_hand.png"); } -.entryPlaygroundPainterTopMenu ul ul { - display: none; - margin-top: 5px; - margin-left: -8px; +.entryPlaygroundPainterAttrResizeX { + position: absolute; + top: 17px; + background-color: transparent; + width: 40px; + height: 40px; + background-color: #643cd9; + border-radius: 3px 3px 3px 3px; } -/*.entryPlaygroundPainterTopMenu ul ul { - background: #5f6975; - border-radius: 0px; - padding: 0; - position: absolute; - top: 100%; - width: 120px; -}*/ -.entryPlaygroundPainterTopMenu > li { - list-style-type: none; - top: 100%; - width: 120px; +.entryPlaygroundPainterAttrResizeXTop { + width: 40px; + height: 10px; + border-radius: 3px 3px 0 0; + background-color: #643cd9; + padding: 0 0 0 3px ; + font-size: 11px; + color: white; } -/*.entryPlaygroundPainterTopMenu ul ul ul { - position: absolute; - color:black; - left: 100%; - top:0; -}*/ -/*.entryPlaygroundPainterTopMenu ul ul li { - float: none; - border-top: 1px solid #6b727c; - border-bottom: 1px solid #575f6a; - position: relative; - cursor: pointer; - color:black; -}*/ -.entryPlaygroundPainterTopMenu ul ul li a { - padding: 10px; - /*color: #fff;*/ - color: black; +.entryPlaygroundPainterAttrResizeXBottom { + width: 40px; + height: 10px; + border-radius: 0 0 3px 3px; + background-color: #aaa; } -.entryPlaygroundPainterTopMenu ul ul li a:hover { - background: white; - color: black; +.entryPlaygroundPainterNumberInput { + width: 40px; + height: 20px; + background-color: transparent; + border: 0px; } -.entryPlaygroundPainterTopMenu li a:hover { - background: #4b545f; +.entryPlaygroundPainterAttrResizeYTop { + width: 40px; + height: 10px; + border-radius: 3px 3px 0 0; + background-color: #643cd9; + padding: 0 0 0 3px ; + font-size: 11px; color: white; } -.entryPlaygroundPainterTopMenu ul li:hover > ul { - display: block; +.entryPlaygroundPainterAttrResizeYBottom { + width: 40px; + height: 10px; + border-radius: 0 0 3px 3px; + background-color: #643cd9; } -.entryPlaygroundPainterTopMenu ul li a:hover { - background-color: #3b329e; +.entryPlaygroundPainterAttrResize { + float: left; + width: 100px; } -.entryPlaygroundPainterTopMenu ul { - padding: 0; - border-radius: 0; - height: 50px; - list-style: none; - position: relative; - display: inline-table; - z-index: 100; +.entryPlaygroundAttrReiszeY { + position: absolute; + top: 17px; + left: 60px; + width: 40px; + height: 40px; + background-color: #643cd9; + border-radius: 3px; } -.entryPlaygroundPainterTopMenu ul:after { - content: ""; - clear: both; - display: block; +.entryPlaygroundPainterspace { + position: absolute; + left: 50px; + top: 35px; + width: 20px; } -.entryPlaygroundPainterTopMenuEdit:hover { - background-color: #3b329e; +.entryPlaygroundPainterRotateArea { + position: absolute; + top: 90px; + left: 19px; + width: 40px; + height: 40px; + background-color: #643cd9; + border-radius: 3px; } -/*.entryPlaygroundPainterTopMenu ul li { - float: left; -}*/ -/*.entryPlaygroundPainterTopMenu ul li:hover { - background: #4b545f; -}*/ -/*.entryPlaygroundPainterTopMenu ul li:hover { - background-color: #3b329e !important; - font:bold; -}*/ -.entryPlaygroundPainterTopMenu ul li a { - display: block; - padding: 5px 10px; - color: white; - text-decoration: none; +.entryPlaygroundPainterRotateAreaTop { + height: 10px; + width: 20px; } -#entryPainterTopMenuEdit > ul > li { - border-bottom: solid 1px #643cd9; - border-left: solid 1px #643cd9; - border-right: solid 1px #643cd9; - background-color: white; - font-family: nanumBarunRegular !important; +.entryPlaygroundPainterRotateArea_ { + height: 10px; + width: 40px; } -#entryPainterTopMenuEdit > ul > li { - background-color: white; - border-bottom: solid 1px #643cd9; +.entryPlaygroundPainterNumberInput { + height: 20px; } -#entryPainterTopMenuEdit > ul > li > :hover { - background-color: #643cd9; - color: white; +.entryPlaygroundPainterAttrOpacity { + width: 40px; + height: 40px; } -#entryPainterTopMenuEdit { +.entryPlaygroundPainterAttyOpacityTop { + width: 40px; + height: 10px; color: white; + padding-left: 25px; } -#entryPainterTopMenuFile > ul > li { - border-bottom: solid 1px #643cd9; - border-left: solid 1px #643cd9; - border-right: solid 1px #643cd9; - background-color: white; - font-family: nanumBarunRegular !important; +.entryPlaygroundPainterNumberInput { + width: 40px; + height: 20px; } -#entryPainterTopMenuFile > ul > li { - background-color: white; - border-bottom: solid 1px #643cd9; +.entryPlaygroundPainterRotateName { + position: absolute; + top: 70px; + left: 20px; } -#entryPainterTopMenuFile > ul > li > :hover { - background-color: #643cd9; - color: white; +.entryPlaygroundPainterOpacityName { + position: absolute; + top: 70px; + left: 80px; } -#entryPainterTopMenuFile { - color: white; +.paintAttrThickTop { + width: 40px; + height: 10px; } -.entryPlaygroundPainterTopStageXY { - position: absolute; - width: 150px; - height: 30px; - top: 5px; - left: 280px; - font-size: 10pt; +.entryPlaygroundPainterAttrThickInput { + width: 45px; + height: 20px; + background-color: transparent; + border: 0px; color: white; } -.entryPlaygroundPainterTopToolbar { - position: absolute; - top: 0; - list-style-type: none; - margin: 0; - padding: 0; - right: 170px; - width: 100px; - height: 30px; +.entryPlaygroundPainterAttrThickInput option { + color: black; + border: 1px solid; } -.entryPlaygroundPainterFlip { - width: 200px; +.entryPlaygroundPainterAttrThick { + width: 45px; + height: 40px; } -.entryPlaygroundPainterFlipY { +.painterAttrBackgroundName { + width: 45px; + height: 20px; + background-color: transparent; + color: black; + border: 0px; position: absolute; - top: 90px; - left: 90px; - background-image: url("../../images/horizontal.png"); - background-repeat: no-repeat; + top: 60px; + font-size: 9pt; +} +.paintAttrBackgroundTop { + position: absolute; + top: 77px; + left: 2px; + background-color: #643cd9; border-radius: 3px; - width: 28px; - height: 28px; + font-size: 11pt; } -.entryPlaygroundPainterFlipX { +.painterAttrShapeLineColor { position: absolute; - top: 90px; - left: 60px; - background-image: url("../../images/vertical.png"); + top: 18px; + left: 154px; + width: 40px; + height: 40px; + background-color: #000; +} +.painterAttrShapeBackgroundColor { + position: absolute; + top: -57px; + left: 140px; + width: 40px; + height: 40px; + background-color: #000; +} +.entryPlaygroundPainterAttrFGButton { + background-image: url("../images/square_on_in.png"); background-repeat: no-repeat; - border-radius: 3px; - width: 28px; - height: 28px; + width: 42px; + height: 42px; + cursor: pointer; } -.entryPlaygroundPainterTopToolbar > li { - float: left; - position: relative; - left: 0; - margin: 2px 5px; - width: 35px; - height: 25px; - text-align: center; - line-height: 30px; +.painterAttrShapeInnerBackground { + width: 20px; + height: 20px; + background: #f5f5f5; + margin: 10px; +} +.entryPlaygroundPainterAttrBGButton { + background-image: url("../images/square_off_out.png"); + background-repeat: no-repeat; + width: 42px; + height: 42px; cursor: pointer; } -.entryPlaygroundPainterToolbox { +.painterAttrColorSpoid { position: absolute; - height: 100%; - width: 54px; - background-color: #f5f5f5; + top: 150px; + left: 330px; + width: 27px; + height: 27px; + background-repeat: no-repeat; + background-image: url("../images/color_off_spoid.png"); } -.entryPlaygroundPainterToolboxContainer li { - cursor: pointer; - top: 16px; +.painterAttrColorSpoidClicked { + position: absolute; + top: 150px; + left: 330px; + width: 27px; + height: 27px; + background-repeat: no-repeat; + background-image: url("../images/color_on_spoid.png"); } -.entryPlaygroundPainterToolboxSelected { - background-color: #ccc; +.painterAttrColorTransparent { + position: absolute; + top: 150px; + left: 300px; + width: 27px; + height: 27px; + background-repeat: no-repeat; + background-image: url("../images/color_off_spoid_1.png"); } -.entryPlaygroundPainterContainer { +.painterAttrRotateName, +.painterAttrOpacityName { position: absolute; - top: 30px; - left: 56px; background-color: transparent; - overflow: scroll; + margin-bottom: 0; + border-bottom: 0; + left: 2px; + padding: 2px; + font-size: 9pt; } -.entryPlaygroundPainterCanvas { +.painterAttrThickName { position: absolute; - top: 0; - left: 0; - width: 960px; - height: 540px; + background-color: transparent; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; + padding-top: 2px ; } -.entryPlaygroundPainterAttr { +.painterAttrRotateName { + top: 60px; + left: 9px; + width: 30px; +} +.painterAttrOpacityName { + top: 60px; + left: 65px; + width: 50px; +} +/* +.painterAttrThickName { + top:115px; + left:10px; +} +*/ +.painterAttrCircleArea { position: absolute; - top: 342px; - width: 100%; - height: 192px; - background-color: #f5f5f5; - padding-left: 6px; - left: 54px; + left: 150px; + top: 20px; } -.entryPlaygroundPainterToolboxContainer { - list-style-type: none; - margin: 0; - padding: 0; +/*.painterInnerCircle { + width: 20px; + height: 20px; + background: #000000; + margin: 9px; +}*/ +.painterAttrCircle { + width: 40px; + height: 40px; + top: 13px; + position: absolute; + left: 5px; + background-color: black; } -.entryPlaygroundPainterToolboxContainer > li { - float: left; - position: relative; - left: 8px; - margin: 5px 5px; - width: 27px; - height: 27px; - background-color: #fff; - font-size: 9pt; - color: #000; - text-align: center; - line-height: 40px; +.painterAttrCircleInput { + position: absolute; + top: 65px; + width: 50px; + height: 15px; + font-size: 5pt; +} +.entryPlaygroundPainterAttrButtonGroup > div { + position: absolute; + top: 70px; + width: 42px; + height: 42px; + background-color: #fff; } -.entryPlaygroundPainterAttrResize { - position: absolute; - top: 4px; - left: 5px; - padding: 4px; +.entryPlaygroundPainterAttrFGButton { + left: 0px; } -.entryPlaygroundPainterAttrResize > legend { - background-color: transparent; - padding: 2px; - width: 30px; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; +.entryPlaygroundPainterAttrBGButton { + left: 55px; } -.entryPlaygroundPainterAttrResize > span { - font-size: 9pt; - padding: 2px; - margin: 0; +.entryPlaygroundPainterAttrAddButton { + background-image: url("../images/fill_in.png"); } -.painterAttrRotateTop { - padding-left: 28px; - color: white; +.entryPlaygroundPainterAttrRemoveButton { + background-image: url("../images/fill_out.png"); } -.entryPlaygroundPainterAttrRotate { +.painterAttrColorSpoid:hover { + background-image: url("../images/color_on_spoid_1.png"); + background-repeat: no-repeat; +} +.displayPaintArea { + display: none !important; + position: absolute !important; +} +.displayOpacityArea { position: absolute; - top: 77px; - left: 10px; - width: 40px; - height: 40px; - background-color: #643cd9; - border-radius: 3px; + top: -56px; + left: 0px; } -.entryPlaygroundPainterSizeText { +.displayThickArea { position: absolute; - left: 48px; - width: 10px; - color: black; + top: -112px; + width: 50px; + left: 0px; } -.painterAttrRotateTop { - width: 40px; - height: 10px; +.displayFontArea { + position: absolute; + top: 0px; + left: 0px; + font: 9px; } -.entryPlaygroundPainterNumberInput { - width: 30px; - font-size: 9pt; - color: white; - padding-left: 3px; - padding-right: 3px; +.displayRotateArea { + position: absolute; + top: -56px; + left: 0px; } -.entryPlaygroundPainterAttrOpacity { +.entryPlaygroundPainterAttrLineStyle { position: absolute; - top: 77px; - left: 65px; - border-radius: 3px; - background-color: #643cd9; + top: 140px; + left: 230px; + background-repeat: no-repeat; } -.entryPlaygroundPainterAttrOpacity > legend { - background-color: transparent; - padding: 2px; - width: 45px; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; +.entryPlaygroundPainterAttrLineStyle:hover { + background-repeat: no-repeat; } -.entryPlaygroundPainterAttrOpacity > span { - font-size: 9pt; - padding: 2px; - margin: 0; +.entryPlaygroundPainterAttrLineStyleLine { + position: absolute; + top: 10px; + background-image: url("../images/line1_category_off.png"); + background-repeat: no-repeat; + background-color: #f5f5f5; + width: 76px; + height: 24px; } -.entryPlaygroundPainterNumberInput { - width: 30px; - font-size: 9pt; +.entryPlaygroundPainterAttrLineStyleLine:hover { + background-image: url("../images/line1_category_on.png"); + background-repeat: no-repeat; } -.entryPlaygroundPainterAttrColor { +.entryPlaygroundPainterAttrLineStyleDot1 { position: absolute; - left: 210px; - top: 20px; - width: 160px; - padding: 4px; + top: -9px; + left: 1px; + background-image: url("../images/line2_off.png"); + background-repeat: no-repeat; + background-color: #f5f5f5; + width: 75px; + height: 20px; } -.entryPlaygroundPainterAttrColor > legend { - background-color: transparent; - padding: 2px; - width: 35px; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; +.entryPlaygroundPainterAttrLineStyleDot1:hover { + background-image: url("../images/line2_on.png"); + background-repeat: no-repeat; } -.entryPlaygroundPainterAttrColorElement { - float: left; - width: 15px; - height: 15px; +.entryPlaygroundPainterAttrLineStyleDot2 { + position: absolute; + top: -29px; + left: 1px; + background-image: url("../images/line3_off.png"); + background-repeat: no-repeat; + background-color: #f5f5f5; + width: 75px; + height: 20px; } -.entryPlaygroundPainterAttrThick { +.entryPlaygroundPainterAttrLineStyleDot2:hover { + background-image: url("../images/line3_on.png"); + background-repeat: no-repeat; +} +.entryPlaygroundPainterAttrLineStyleDot3 { position: absolute; - top: 20px; - left: 2px; - background-color: #643cd9; - border-radius: 3px; + top: -48px; + left: 1px; + background-image: url("../images/line4_off.png"); + background-repeat: no-repeat; + background-color: #f5f5f5; + width: 75px; + height: 19px; } -.entryPlaygroundPainterAttrThick > legend { +.entryPlaygroundPainterAttrLineStyleDot3:hover { + background-image: url("../images/line4_on.png"); + background-repeat: no-repeat; +} +.entryPlaygroundPainterAttrLineStyleLine1 { position: absolute; - top: -30pxpx; - background-color: transparent; - padding: 2px; - width: 60px; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; + top: -67px; + left: 1px; + background-image: url("../images/line1_off.png"); + background-repeat: no-repeat; + background-color: #f5f5f5; + width: 75px; + height: 19px; + border-radius: 4px; } -.entryPlaygroundPainterAttrThickInput { - font-size: 9pt; +.entryPlaygroundPainterAttrLineStyleLine1:hover { + background-image: url("../images/line1_on.png"); + background-repeat: no-repeat; } -.entryPlaygroundPainterAttrRect { +.painterAttrLineStyleBackgroundDot1, +.painterAttrLineStyleBackgroundDot2, +.painterAttrLineStyleBackgroundDot3, +.painterAttrLineStyleBackgroundLine { position: absolute; - top: 40px; - left: 490px; - padding: 4px; - border: 1px solid #000; + top: 10px; + background-repeat: no-repeat; + background-color: #f5f5f5; + width: 76px; + height: 21px; } -.entryPlaygroundPainterAttrRect > legend { - background-color: transparent; - padding: 2px; - width: 60px; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; +.painterAttrLineStyleBackgroundDot1 { + background-image: url("../images/line2_category_off.png"); } -.entryPlaygroundPainterAttrRectFilled { - width: 15px; - height: 15px; - background-color: #000; - border: 1px solid #000; - float: left; +.painterAttrLineStyleBackgroundDot2 { + background-image: url("../images/line3_category_off.png"); } -.entryPlaygroundPainterAttrRectEmpty { - width: 15px; - height: 15px; - background-color: #fff; - border: 1px solid #000; - float: right; +.painterAttrLineStyleBackgroundDot3 { + background-image: url("../images/line4_category_off.png"); } -.entryPlaygroundPainterAttrFont { - position: absolute; - left: 0px; - padding: 4px; - width: 100px; - height: 40px; +.painterAttrLineStyleBackgroundLine { + background-image: url("../images/line1_category_off_1.png"); } -.entryPlaygroundPainterAttrTop { - position: absolute; - top: 20px; - width: 93px; - height: 40px; - border-radius: 3px; - color: white; - background-color: #643cd9; +.painterAttrLineStyleBackgroundDot1:hover { + background-image: url("../images/line2_category_on.png"); + background-repeat: no-repeat; } -.entryPlaygroundPaintAttrTop_ { - width: 93px; - height: 10px; +.painterAttrLineStyleBackgroundDot2:hover { + background-image: url("../images/line3_category_on.png"); + background-repeat: no-repeat; } -.entryPlaygroundPainterAttrFont > legend { - background-color: transparent; - width: 60px; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; +.painterAttrLineStyleBackgroundDot3:hover { + background-image: url("../images/line4_category_on.png"); + background-repeat: no-repeat; +} +.painterAttrLineStyleBackgroundLine:hover { + background-image: url("../images/line1_category_on_1.png"); + background-repeat: no-repeat; +} +.entryToolboxCursorClicked { + background-image: url("../images/on_hand_1.png"); +} +.entryToolboxSelectClicked { + background-image: url("../images/on_choice_1.png"); +} +.entryToolboxPenClicked { + background-image: url("../images/on_pen_1.png"); +} +.entryToolboxLineClicked { + background-image: url("../images/on_line_1.png"); +} +.entryToolboxRectClicked { + background-image: url("../images/on_square_1.png"); +} +.entryToolBoxCircleClicked { + background-image: url("../images/on_circle_1.png"); } -.painterAttrFontSizeArea { - position: absolute; - top: 70px; - background-color: #643cd9; - width: 44px; - height: 40px; - color: white; - border-radius: 3px; +.entryToolBoxTextClicked { + background-image: url("../images/on_text_1.png"); } -.painterAttrFontSizeTop { - width: 40px; - height: 10px; +.entryToolBoxFillClicked { + background-image: url("../images/on_paint_1.png"); } -.entryPlaygroundPainterAttrFontName, -.entryPlaygroundPainterAttrFontSize, -.entryPlaygroundPainterAttrFontStyle { - background: transparent; - border: 0px; +.entryToolBoxEraseClicked { + background-image: url("../images/on_eraser_1.png"); } -.entryPlaygroundPainterAttrFontStyleArea { +.dd { + cursor: url("../images/cursor_eraser.cur"); +} +.entryPlaygroundPainterTopMenuEdit > ul > li { + list-style-type: none; + width: 120px; +} +.entryPlaygroundPainterTopMenuFile > ul > li { + list-style-type: none; + width: 120px; +} +.entryPlaygroundPainterTopMenu > ul { position: absolute; - background-color: #643cd9 ; - top: 120px; - width: 67px; + top: 5px; +} +.entryPainterTopMenuEditImport { height: 40px; - border-radius: 3px; - color: white; } -.entryPlaygroundPainterAttrFontStyle option { - color: black; +.entryPlayground_text_buttons { + display: inline-block; + list-style-type: none; + margin: 0; + padding: 0; } -.entryPlaygroundPainterAttrFontSize option { - color: black; +.entryPlayground_text_buttons > li { + float: left; + width: 32px; + height: 32px; + margin-left: 2px; + cursor: pointer; } -.entryPlaygroundPainterAttrFontName option { - color: black; +.entryPlaygroundTextAlignLeft { + background-image: url("../images/text_align_left_off.png"); } -.entryPlaygroundPainterAttrFontTop { - width: 67px; - height: 10px; +.entryPlaygroundTextAlignLeft.toggle { + background-image: url("../images/text_align_left_on.png"); } -/* Painter css finish */ -.temp-element { - visibility: hidden; - white-space: pre; +.entryPlaygroundTextAlignCenter { + background-image: url("../images/text_align_center_off.png"); } -.highlight { - margin: 0; - color: white; - width: 120px; - float: left; - list-style: none; - display: block; +.entryPlaygroundTextAlignCenter.toggle { + background-image: url("../images/text_align_center_on.png"); } -.entryVariableAddSpaceWorkspace { - padding: 0; - padding-left: 16px; - padding-right: 16px; - margin: 0; - /*height: 215px;*/ - height: 200px; - background-color: white; - border: 1px solid #a8a8a8; +.entryPlaygroundTextAlignRight { + background-image: url("../images/text_align_right_off.png"); } -.entryVariableAddSpaceNameWrapperWorkspace { - height: 28px; - margin-top: 16px; - background-image: url("../../images/list_icon_question_1.png"); - background-repeat: no-repeat; +.entryPlaygroundTextAlignRight.toggle { + background-image: url("../images/text_align_right_on.png"); } -.entryVariableAddSpaceNameWrapperWorkspace.entryListAddSpaceNameWrapperWorkspace { - background-image: url("../../images/list_icon_list_1.png"); +.entryPlayground_fgColorDiv { + position: absolute; + width: 15px; + height: 4px; + margin-top: -15px; + margin-left: 345px; } -.entryVariableAddSpaceInputWorkspace { - width: 80%; - margin-left: 42px; - margin-top: 2px; +.entryPlayground_bgColorDiv { + position: absolute; + width: 15px; + height: 4px; + margin-top: -15px; + margin-left: 379px; } -.entryVariableAddSpaceGlobalWrapperWorkspace { - margin-top: 16px; - color: #5e5e5e; - font-size: 11px; - position: relative; - cursor: pointer; +.entryPlayground_textBox { + margin-top: 5px; + height: 33px; + width: 400px; } -.entryVariableAddSpaceCheckWorkspace { +.entryPlayground_textArea { + margin-top: 5px; + height: 120px; + width: 400px; + resize: none; +} +.entryPlaygroundFontSizeWrapper { + width: 400px; + height: 39px; +} +.entryPlaygroundFontSizeLabel { display: inline-block; - width: 10px; - height: 10px; - border-radius: 2px; - margin-top: 2px; - position: absolute; - right: 17px; - border: 1px solid gray; + float: right; + font-size: 9px; + font-family: notoSansMedium; + color: #444; + line-height: 39px; } -.entryVariableAddSpaceCheckWorkspace.entryVariableAddChecked { - /*background-color: gray;*/ - background-image: url("../../images/check_on.png"); - background-repeat: no-repeat; +.entryPlaygroundFontSizeSlider { + display: inline-block; + float: right; + width: 96px; + height: 3px; + margin: 18px 0px 18px 4px; + background-color: #cfcfcf; + border-radius: 1.5px; } -.entryVariableAddSpaceLocalWrapperWorkspace { - color: #5e5e5e; - font-size: 11px; - position: relative; +#entryTextColourTable { margin-top: 12px; cursor: pointer; - padding-bottom: 10px; - border-bottom: 1px solid #a8a8a8; + border-collapse: collapse; } -.entryVariableAddSpaceCloudWrapperWorkspace { - padding-top: 8px; +.entryTd { + width: 22px; + height: 22px; } -.entryVariableAddSpaceCloudWrapperWorkspace { - cursor: pointer; - color: #5e5e5e; - font-size: 11px; - position: relative; +.entryTdTransparent { + width: 20px; + height: 20px; + background-color: white; + background-image: -webkit-linear-gradient(135deg, transparent 11.5px, #ff0000 13px, rgba(255, 255, 255, 0.5) 14.5px); + border: 1px solid; } -.entryVariableAddSpaceUnCheckedWorkspace { - color: #afafaf; +.entryPlaygroundPainterTopMenuEdit > ul > li { + list-style-type: none; + width: 120px; } -.entryVariableAddSpaceCloudCheckWorkspace { - margin-top: -12px; +.entryPlaygroundPainterTopMenuFile > ul > li { + list-style-type: none; + width: 120px; } -.entryVariableAddSpaceButtonWrapperWorkspace { - margin-top: 12px; +.entryPlaygroundPainterTopMenu > ul { + position: absolute; + top: 5px; } -.entryVariableAddSpaceButtonWorkspace { - font-size: 11px; - display: inline-block; - width: 48px; - height: 24px; - border: 2px solid gray; - text-align: center; - line-height: 22px; - cursor: pointer; +.entryPainterTopMenuEditImport { + height: 40px; +} +.entryPlaygroundSoundLength { float: right; + position: relative; + top: 20px; + right: 10px; + font-size: 9pt; } -.entryVariableAddSpaceCancelWorkspace { - margin-left: 7px; +.entryPlaygroundDefaultWorkspace { + height: 100%; + background-color: #363C46; + color: white; } -.entryVariableSplitterWorkspace { - height: 25px; - font-size: 11px; - border: 1px solid #a8a8a8; - border-top: none; - line-height: 25px; - padding-left: 9px; +.entryPlaygroundWorkspace { + position: absolute; + top: 40px; + bottom: 0px; + left: 400.5px; + right: 0px; + background-color: #F5F5F5; + overflow: hidden; } -/*first element after splitter should not have border-top*/ -.entryVariableSplitterWorkspace + .entryVariableListElementWorkspace { - border-top: none; +.entryPlaygroundPhone { + width: 100%; + height: 500px; + background-color: #F5F5F5; +} +.entryPlaygroundResizeWorkspace { + position: absolute; + top: 45%; + height: 28px; + width: 11px; + left: 272px; + cursor: ew-resize; + border: solid 1px #afafaf; + border-left: none; + z-index: 250; + background-image: url("../images/entry_scroll_02.png"); +} +.entryPlaygroundTabWorkspace { + position: absolute; + /*margin-top: 1px;*/ + top: 0; + height: 43px; + width: 100%; + background-color: #f1f1f1; +} +.entryPlaygroundTabWorkspace.entryRemove { + display: block !important; +} +.entryPlaygroundTabPhone { + width: 100%; + height: 43px; + position: relative; + background-color: #f1f1f1; } -.entryVariableListCallerListWorkspace + .entryVariableListElementWorkspace { - border-top: none; +.entryTabListWorkspace { + list-style: none; + height: 44px; + padding: 0; + margin: 1px 0 0 0; + border-bottom: 2px solid #643cd9; } -.entryPlaygroundPainterTopMenuFileNew { - position: absolute; - color: white; - left: 20px; - top: 0px; - padding: 4px; - height: 28px; +.entryTabListItemWorkspace { + float: left; + width: 59px; + height: 42px; + margin: 0 1px 0 1px; cursor: pointer; - list-style: none; + display: block; + padding: 10px 0 0 0; + text-align: center; font-family: nanumBarunBold !important; + color: gray; + background-color: #e5e5e5; + border-top-right-radius: 7px; + border-top-left-radius: 7px; } -.entryPlaygroundPainterTopMenuFileSave { - position: absolute; +.entryTabSelected { color: white; - padding-left: 8px; - left: 95px; - top: 0px; - padding-top: 4px; - height: 28px; - width: 70px; - cursor: pointer; - font-family: nanumBarunBold !important; + background-color: #6e5ae6; } -.entryPlaygroundPainterTopMenuFileSave:hover, -.entryPlaygroundPainterTopMenuFileNew:hover { - background-color: #3b329e !important; +#entrySoundTab { + -webkit-animation-delay: 0.1s; + -moz-animation-delay: 0.1s; + -ms-animation-delay: 0.1s; + -o-animation-delay: 0.1s; + animation-delay: 0.1s; } -.entryPlaygroundPainterTopMenuEdit, -.entryPlaygroundPainterTopMenuFile { - position: absolute; - color: white; - padding-left: 8px; - left: 158px; - height: 28px; - width: 55px; - cursor: pointer; - margin-top: -4px; - padding-top: 3px; - font-family: nanumBarunBold !important; +#entryPictureTab.hideTab, +#entryTextTab.hideTab { + -webkit-animation-delay: 0.2s; + -moz-animation-delay: 0.2s; + -ms-animation-delay: 0.2s; + -o-animation-delay: 0.2s; + animation-delay: 0.2s; } -.entryPlaygroundPainterTopMenuEdit > li { - list-style-type: none; +#entrySoundTab.hideTab { + -webkit-animation-delay: 0.1s; + -moz-animation-delay: 0.1s; + -ms-animation-delay: 0.1s; + -o-animation-delay: 0.1s; + animation-delay: 0.1s; } -.entryPlaygroundPainterTopMenuFile { - left: 100px; +#entryVariableTab.showTab { + -webkit-animation-delay: 0.2s; + -moz-animation-delay: 0.2s; + -ms-animation-delay: 0.2s; + -o-animation-delay: 0.2s; + animation-delay: 0.2s; } -.entryPlaygroundPainterTopMenuFile > li { - list-style-type: none; +.hideTab { + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -ms-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + -webkit-animation-name: hideTab; + -moz-animation-name: hideTab; + -ms-animation-name: hideTab; + -o-animation-name: hideTab; + animation-name: hideTab; + -webkit-animation-fill-mode: forwards; + -moz-animation-fill-mode: forwards; + -ms-animation-fill-mode: forwards; + -o-animation-fill-mode: forwards; + animation-fill-mode: forwards; } -.entryPlaygroundPainterToolboxPen { - background-image: url("../../images/off_pen.png"); - background-repeat: no-repeat; +@keyframes hideTab { + to { + margin-top: 44px; + opacity: 0; + } } -.entryPlaygroundPainterToolboxPen:hover { - background-image: url("../../images/on_pen.png"); +@-o-keyframes hideTab { + to { + margin-top: 44px; + opacity: 0; + } } -.entryPlaygroundPainterToolboxLine { - background-image: url("../../images/off_line.png"); +@-ms-keyframes hideTab { + to { + margin-top: 44px; + opacity: 0; + } } -.entryPlaygroundPainterToolboxLine:hover { - background-image: url("../../images/on_line.png"); +@-moz-keyframes hideTab { + to { + margin-top: 44px; + opacity: 0; + } } -.entryPlaygroundPainterToolboxRect { - background-image: url("../../images/off_square.png"); +@-webkit-keyframes hideTab { + to { + margin-top: 44px; + opacity: 0; + } } -.entryPlaygroundPainterToolboxRect:hover { - background-image: url("../../images/on_square.png"); +.showTab { + opacity: 0; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -ms-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + -webkit-animation-name: showTab; + -moz-animation-name: showTab; + -ms-animation-name: showTab; + -o-animation-name: showTab; + animation-name: showTab; + -webkit-animation-fill-mode: forwards; + -moz-animation-fill-mode: forwards; + -ms-animation-fill-mode: forwards; + -o-animation-fill-mode: forwards; + animation-fill-mode: forwards; } -.entryPlaygroundPainterToolboxCircle { - background-image: url("../../images/off_circle.png"); +@keyframes showTab { + from { + margin-top: 44px; + opacity: 0; + } + to { + opacity: 1; + } } -.entryPlaygroundPainterToolboxCircle:hover { - background-image: url("../../images/on_circle.png"); +@-o-keyframes showTab { + from { + margin-top: 44px; + opacity: 0; + } + to { + opacity: 1; + } } -.entryPlaygroundPainterToolboxSelect:hover { - background-image: url("../../images/on_choice.png"); +@-ms-keyframes showTab { + from { + margin-top: 44px; + opacity: 0; + } + to { + opacity: 1; + } } -.entryPlaygroundPainterToolboxText { - background-image: url("../../images/off_text.png"); +@-moz-keyframes showTab { + from { + margin-top: 44px; + opacity: 0; + } + to { + opacity: 1; + } } -.entryPlaygroundPainterToolboxText:hover { - background-image: url("../../images/on_text.png"); +@-webkit-keyframes showTab { + from { + margin-top: 44px; + opacity: 0; + } + to { + opacity: 1; + } } -.entryPlaygroundPainterToolboxFill { - background-image: url("../../images/off_paint.png"); +.entryPlaygroundCurtainWorkspace { + position: absolute; + background-color: black; + color: white; + padding-top: 270px; + text-align: center; + font-size: 40px; + height: 100%; + top: 0; + left: 0; + right: 0; + bottom: 0; + opacity: 0.5; + z-index: 5000; + cursor: pointer; } -.entryPlaygroundPainterToolboxFill:hover { - background-image: url("../../images/on_paint.png"); +.entryPlaygroundCurtainPhone { + position: absolute; + background-color: rgba(0, 0, 0, 0.8); + color: white; + padding-top: 100px; + text-align: center; + font-size: 17px; + height: 110%; + width: 100%; + opacity: 0.5; + z-index: 5000; + cursor: pointer; } -.entryPlaygroundPainterToolboxErase { - background-image: url("../../images/off_eraser.png"); +.entryPlaygroundCodeWorkspace { + height: 100%; + background-color: #F5F5F5; } -.entryPlaygroundPainterToolboxErase:hover { - background-image: url("../../images/on_eraser.png"); +.entryPlaygroundCodeWorkspace.entryRemove { + display: block !important; + visibility: hidden; } -.entryPlaygroundPainterToolboxSelect { - background-image: url("../../images/off_choice.png"); +.entryPlaygroundCodePhone { + position: relative; + height: 100%; + background-color: #F5F5F5; } -.entryPlaygroundPainterToolboxCoordinate { - background-image: url("../../images/off_center.png"); +.entryPlaygroundCodePhone.entryRemove { + display: block !important; + visibility: hidden; } -.entryPlaygroundPainterToolboxCoordinate:hover { - background-image: url("../../images/on_center.png"); +.entryPlaygroundPictureWorkspace { + position: absolute; + top: 47px; + margin-left: 0; + height: 100%; + background-color: #ececec; } -.entryPlaygroundPainterToolboxGlasses { - background-image: url("../../images/off_zoom.png"); +.entryPlaygroundPicturePhone { + margin-left: 0; + height: 100%; + background-color: #ececec; +} +.entryPlaygroundAddPicture { + position: absolute; + width: 240px; + height: 60px; + background-color: #e5e5e5; + cursor: pointer; + border-bottom: 1pt solid #ebeff1; } -.entryPlaygroundPainterToolboxGlasses:hover { - background-image: url("../../images/on_zoom.png"); +.entryPlaygroundAddPicturePhone { + position: relative; + padding: 0; + margin: 0; + height: 50px; + cursor: pointer; + border-bottom: 1pt solid #ebeff1; } -.entryPlaygroundPainterToolboxCursor { - background-image: url("../../images/off_hand.png"); +.entryPlaygroundAddPictureInner { + display: block; + width: 141px; + height: 30px; + background-color: #eeeeee; + color: black; + text-align: center; + font-size: 11px; + line-height: 28px; + border: 1px solid #cccccc; + border-radius: 7px; + margin-top: 15px; + margin-left: 49.5px; } -.entryPlaygroundPainterToolboxCursor:hover { - background-image: url("../../images/on_hand.png"); +.entryPlaygroundAddPictureInnerPhone { + display: block; + height: 50px; + background-color: #CDCFC9; + color: #656565; + text-align: center; + font-size: 10.5pt; + line-height: 36px; + border: 2px dashed #737373; + width: 240px; + padding: 8px 10px 12px 10px; } -.entryPlaygroundPainterAttrResizeX { +.entryPlaygroundPictureList { position: absolute; - top: 17px; - background-color: transparent; - width: 40px; - height: 40px; - background-color: #643cd9; - border-radius: 3px 3px 3px 3px; + padding: 0px; + margin: 0px; + width: 240px; + top: 60px; + margin-bottom: 47px; + bottom: 0px; + overflow: auto; + list-style: none; + background-color: #Cfcfcf; } -.entryPlaygroundPainterAttrResizeXTop { - width: 40px; - height: 10px; - border-radius: 3px 3px 0 0; - background-color: #643cd9; - padding: 0 0 0 3px ; - font-size: 11px; - color: white; +.entryPlaygroundPictureListPhone { + position: relative; + padding: 0px; + margin: 0px; + width: 240px; + bottom: 0px; + overflow: auto; + list-style: none; + background-color: #Cfcfcf; } -.entryPlaygroundPainterAttrResizeXBottom { - width: 40px; - height: 10px; - border-radius: 0 0 3px 3px; - background-color: #aaa; +.entryPlaygroundPictureElement { + display: block; + background-color: #f4f4f4; + border-bottom: 1pt solid #ebeff1; + height: 60px; + color: #294117; + cursor: pointer; } -.entryPlaygroundPainterNumberInput { - width: 40px; - height: 20px; - background-color: transparent; - border: 0px; +.entryPlaygroundPictureElement:hover { + background-color: #C0C0C0; + cursor: move; } -.entryPlaygroundPainterAttrResizeYTop { - width: 40px; - height: 10px; - border-radius: 3px 3px 0 0; - background-color: #643cd9; - padding: 0 0 0 3px ; - font-size: 11px; +.entryPlaygroundPictureOrder, +.entryPlaygroundSoundOrder { + width: 15px; + height: 100%; + float: left; + line-height: 57px; + font-size: 10px; + text-align: center; + background-color: #d8d8d8; +} +.entryPlaygroundPictureElement:hover .entryPlaygroundPictureOrder, +.entryPlaygroundSoundElement:hover .entryPlaygroundSoundOrder { + background-color: #634cd9; color: white; } -.entryPlaygroundPainterAttrResizeYBottom { - width: 40px; - height: 10px; - border-radius: 0 0 3px 3px; - background-color: #643cd9; +.entryPictureSelected { + background-color: #c1c1c1; } -.entryPlaygroundPainterAttrResize { +.entryPlaygroundPictureThumbnail { float: left; - width: 100px; + position: relative; + height: 49px; + width: 49px; + top: 5px; + left: 10px; + border: 1px solid #bcc2c8; + background-color: #ccc; + background-size: contain; + background-repeat: no-repeat; + background-position: center; } -.entryPlaygroundAttrReiszeY { - position: absolute; +.entryPlaygroundPictureName { + float: left; + position: relative; top: 17px; - left: 60px; - width: 40px; - height: 40px; - background-color: #643cd9; - border-radius: 3px; -} -.entryPlaygroundPainterspace { - position: absolute; - left: 50px; - top: 35px; - width: 20px; -} -.entryPlaygroundPainterRotateArea { - position: absolute; - top: 90px; - left: 19px; - width: 40px; - height: 40px; - background-color: #643cd9; - border-radius: 3px; + left: 17px; + width: 78px; + background-color: transparent; + font-size: 10pt; + text-overflow: ellipsis; + color: #294117; + cursor: text; + border: 1px solid transparent; } -.entryPlaygroundPainterRotateAreaTop { - height: 10px; - width: 20px; +.entryPlaygroundPictureName:focus, +.entryPlaygroundSoundName:focus { + border: 1px solid gray; + background-color: white; } -.entryPlaygroundPainterRotateArea_ { - height: 10px; - width: 40px; +.entryPlaygroundPictureName:hover, +.entryPlaygroundSoundName:hover { + border: 1px solid gray; } -.entryPlaygroundPainterNumberInput { - height: 20px; +.entryPlaygroundPictureSize { + float: right; + position: relative; + top: 21px; + right: 10px; + font-size: 8pt; } -.entryPlaygroundPainterAttrOpacity { - width: 40px; - height: 40px; +.entryPlaygroundTextWorkspace { + position: absolute; + top: 45px; + height: 100%; + width: 100%; + background-color: #ececec; + padding-left: 20px; + padding-top: 20px; } -.entryPlaygroundPainterAttyOpacityTop { - width: 40px; - height: 10px; - color: white; - padding-left: 25px; +.entryTextHead { + font-size: 18px; } -.entryPlaygroundPainterNumberInput { - width: 40px; - height: 20px; +.entryTextEdit { + font-size: 17px; + width: 220px; + height: 30px; + border: 1px solid #808080; + border-radius: 3px; } -.entryPlaygroundPainterRotateName { - position: absolute; - top: 70px; - left: 20px; +#entryTextProperty { + width: 220px; + height: 32px; + margin-top: 12px; } -.entryPlaygroundPainterOpacityName { - position: absolute; - top: 70px; - left: 80px; +.entryTextFontSelect { + display: inline-block; + width: 96px; + height: 32px; + border: 1px solid #808080; + border-radius: 4px; + background-color: white; + float: left; } -.paintAttrThickTop { - width: 40px; - height: 10px; +.entryTextFontSelecter { + margin-top: 5px; + margin-left: 2px; } -.entryPlaygroundPainterAttrThickInput { - width: 45px; - height: 20px; - background-color: transparent; - border: 0px; - color: white; +.entryFontToggle { + display: inline-block; + width: 96px; + width: 32px; + height: 32px; + float: right; } -.entryPlaygroundPainterAttrThickInput option { - color: black; - border: 1px solid; +#entryFontColorToggle { + background-image: url("../images/text_in_off.png"); } -.entryPlaygroundPainterAttrThick { - width: 45px; - height: 40px; +#entryFontColorToggle.selected { + background-image: url("../images/text_in_on.png"); } -.painterAttrBackgroundName { - width: 45px; - height: 20px; - background-color: transparent; - color: black; - border: 0px; - position: absolute; - top: 60px; - font-size: 9pt; +#entryFontBGToggle { + margin-left: 6px; + background-image: url("../images/text_out_off.png"); } -.paintAttrBackgroundTop { - position: absolute; - top: 77px; - left: 2px; - background-color: #643cd9; - border-radius: 3px; - font-size: 11pt; +#entryFontBGToggle.selected { + background-image: url("../images/text_out_on.png"); } -.painterAttrShapeLineColor { +.entryPlaygroundSoundWorkspace { position: absolute; - top: 18px; - left: 154px; - width: 40px; - height: 40px; - background-color: #000; + top: 47px; + margin-left: 0; + height: 100%; + background-color: #ececec; } -.painterAttrShapeBackgroundColor { +.entryPlaygroundAddSound { position: absolute; - top: -57px; - left: 140px; - width: 40px; - height: 40px; - background-color: #000; + height: 60px; + width: 240px; + background-color: #e5e5e5; + cursor: pointer; + border-bottom: 1pt solid #ebeff1; } -.entryPlaygroundPainterAttrFGButton { - background-image: url("../../images/square_on_in.png"); - background-repeat: no-repeat; - width: 42px; - height: 42px; +.entryPlaygroundAddSoundPhone { + position: relative; + height: 50px; cursor: pointer; + border-bottom: 1pt solid #ebeff1; } -.painterAttrShapeInnerBackground { - width: 20px; - height: 20px; - background: #f5f5f5; - margin: 10px; +.entryPlaygroundAddSoundInner { + display: block; + width: 141px; + height: 30px; + background-color: #eeeeee; + color: black; + text-align: center; + font-size: 11px; + line-height: 28px; + border: 1px solid #cccccc; + border-radius: 7px; + margin-top: 15px; + margin-left: 49.5px; } -.entryPlaygroundPainterAttrBGButton { - background-image: url("../../images/square_off_out.png"); - background-repeat: no-repeat; - width: 42px; - height: 42px; - cursor: pointer; +.entryPlaygroundAddSoundInnerPhone { + display: block; + height: 40px; + background-color: #CDCFC9; + color: #656565; + text-align: center; + font-size: 10.5pt; + line-height: 36px; + margin: 10px; + border: 2px dashed #737373; + width: 220px; } -.painterAttrColorSpoid { +.entryPlaygroundSoundList { position: absolute; - top: 150px; - left: 330px; - width: 27px; - height: 27px; - background-repeat: no-repeat; - background-image: url("../../images/color_off_spoid.png"); + padding: 0px; + margin: 0px; + width: 240px; + top: 60px; + margin-bottom: 47px; + bottom: 0px; + overflow: auto; + list-style: none; + background-color: #cfcfcf; } -.painterAttrColorSpoidClicked { - position: absolute; - top: 150px; - left: 330px; - width: 27px; - height: 27px; - background-repeat: no-repeat; - background-image: url("../../images/color_on_spoid.png"); +.entryPlaygroundSoundListPhone { + position: relative; + padding: 0px; + margin: 0px; + width: 240px; + bottom: 0px; + overflow: auto; + list-style: none; + background-color: #cfcfcf; } -.painterAttrColorTransparent { - position: absolute; - top: 150px; - left: 300px; - width: 27px; - height: 27px; - background-repeat: no-repeat; - background-image: url("../../images/color_off_spoid_1.png"); +.entryPlaygroundSoundElement { + display: block; + background-color: #f4f4f4; + border-bottom: 1pt solid #ebeff1; + height: 60px; + color: #294117; + cursor: pointer; } -.painterAttrRotateName, -.painterAttrOpacityName { - position: absolute; - background-color: transparent; - margin-bottom: 0; - border-bottom: 0; - left: 2px; - padding: 2px; - font-size: 9pt; +.entryPlaygroundSoundElement:hover { + background-color: #c1c1c1; + cursor: move; } -.painterAttrThickName { - position: absolute; - background-color: transparent; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; - padding-top: 2px ; +.entryPlaygroundSoundThumbnail { + float: left; + position: relative; + height: 49px; + width: 49px; + top: 5px; + left: 10px; + border: 1px solid #bcc2c8; + background-color: #ccc; + background-size: 32px 32px; + background-repeat: no-repeat; + background-position: center; + cursor: pointer; } -.painterAttrRotateName { - top: 60px; - left: 9px; - width: 30px; +.entryPlaygroundSoundThumbnail.entryPlaygroundSoundPlay { + background-image: url("../images/workspace_sound_play.png"); } -.painterAttrOpacityName { - top: 60px; - left: 65px; - width: 50px; +.entryPlaygroundSoundThumbnail.entryPlaygroundSoundStop { + background-image: url("../images/workspace_sound_stop.png"); } -/* -.painterAttrThickName { - top:115px; - left:10px; +.entryPlaygroundSoundName { + float: left; + position: relative; + top: 18px; + left: 17px; + width: 95px; + background-color: transparent; + font-size: 10pt; + border: 1px solid transparent; + text-overflow: ellipsis; + color: #294117; } -*/ -.painterAttrCircleArea { - position: absolute; - left: 150px; - top: 20px; +.entryPlayground_text_buttons { + display: inline-block; + list-style-type: none; + margin: 0; + padding: 0; } -/*.painterInnerCircle { - width: 20px; - height: 20px; - background: #000000; - margin: 9px; -}*/ -.painterAttrCircle { - width: 40px; - height: 40px; - top: 13px; - position: absolute; - left: 5px; - background-color: black; +.entryPlayground_text_buttons > li { + float: left; + width: 32px; + height: 32px; + margin-left: 2px; + cursor: pointer; } -.painterAttrCircleInput { - position: absolute; - top: 65px; - width: 50px; - height: 15px; - font-size: 5pt; +.entryPlaygroundTextAlignLeft { + background-image: url("../images/text_align_left_off.png"); } -.entryPlaygroundPainterAttrButtonGroup > div { - position: absolute; - top: 70px; - width: 42px; - height: 42px; - background-color: #fff; +.entryPlaygroundTextAlignLeft.toggle { + background-image: url("../images/text_align_left_on.png"); } -.entryPlaygroundPainterAttrFGButton { - left: 0px; +.entryPlaygroundTextAlignCenter { + background-image: url("../images/text_align_center_off.png"); } -.entryPlaygroundPainterAttrBGButton { - left: 55px; +.entryPlaygroundTextAlignCenter.toggle { + background-image: url("../images/text_align_center_on.png"); } -.btn_code, -.btn_undo_workspace { - margin-left: 15px; +.entryPlaygroundTextAlignRight { + background-image: url("../images/text_align_right_off.png"); } -.entryPlaygroundPictureOrder, -.entryPlaygroundSoundOrder { - width: 15px; - height: 100%; - float: left; - line-height: 57px; - font-size: 10px; - text-align: center; - background-color: #d8d8d8; +.entryPlaygroundTextAlignRight.toggle { + background-image: url("../images/text_align_right_on.png"); } -.entryPictureSelected .entryPlaygroundPictureOrder { - background-color: #634cd9; - color: white; +.entryPlayground_fgColorDiv { + position: absolute; + width: 15px; + height: 4px; + margin-top: -15px; + margin-left: 345px; } -.deleteChild > * { - display: none; +.entryPlayground_bgColorDiv { + position: absolute; + width: 15px; + height: 4px; + margin-top: -15px; + margin-left: 379px; } -.entryPlaygroundPainterAttrAddButton { - background-image: url("../../images/fill_in.png"); +.entryPlayground_textBox { + margin-top: 5px; + height: 33px; + width: 400px; } -.entryPlaygroundPainterAttrRemoveButton { - background-image: url("../../images/fill_out.png"); +.entryPlayground_textArea { + margin-top: 5px; + height: 120px; + width: 400px; + resize: none; } -.painterAttrColorSpoid:hover { - background-image: url("../../images/color_on_spoid_1.png"); - background-repeat: no-repeat; +.entryPlaygroundFontSizeWrapper { + width: 400px; + height: 39px; } -.displayPaintArea { - display: none !important; - position: absolute !important; +.entryPlaygroundFontSizeLabel { + display: inline-block; + float: right; + font-size: 9px; + font-family: notoSansMedium; + color: #444; + line-height: 39px; } -.displayOpacityArea { - position: absolute; - top: -56px; - left: 0px; +.entryPlaygroundFontSizeSlider { + display: inline-block; + float: right; + width: 96px; + height: 3px; + margin: 18px 0px 18px 4px; + background-color: #cfcfcf; + border-radius: 1.5px; } -.displayThickArea { - position: absolute; - top: -112px; - width: 50px; - left: 0px; +.entryPlaygroundFontSizeIndicator { + height: 100%; + width: 45%; + background-color: #643cd9; } -.displayFontArea { - position: absolute; - top: 0px; - left: 0px; - font: 9px; +.entryPlaygroundFontSizeKnob { + width: 16px; + height: 16px; + position: relative; + margin-top: -10px; + margin-left: -7px; + background-image: url("../images/text_size_knob.png"); + cursor: pointer; } -.displayRotateArea { +.entryPlaygroundTextColoursWrapper { + width: 260px; + height: 226px; + z-index: 10; + cursor: pointer; + margin-top: -5px; + margin-left: 335px; + padding: 20px 5px; position: absolute; - top: -56px; - left: 0px; + background-image: url("../images/text_color_bg.png"); + background-repeat: no-repeat; + background-size: 260px 226px; } -.entryPlaygroundPainterAttrLineStyle { +.entryPlaygroundTextBackgroundsWrapper { + width: 260px; + height: 226px; + z-index: 10; + cursor: pointer; + margin-top: -5px; + margin-left: 369px; + padding: 20px 5px; position: absolute; - top: 140px; - left: 230px; + background-image: url("../images/text_color_bg_1.png"); background-repeat: no-repeat; + background-size: 260px 226px; } -.entryPlaygroundPainterAttrLineStyle:hover { - background-repeat: no-repeat; +.entryPlaygroundLinebreakWrapper { + position: fixed; + top: 351px; } -.entryPlaygroundPainterAttrLineStyleLine { - position: absolute; - top: 10px; - background-image: url("../../images/line1_category_off.png"); - background-repeat: no-repeat; - background-color: #f5f5f5; - width: 76px; - height: 24px; +.entryPlaygroundLinebreakButtons { + display: inline; + font-size: 0; } -.entryPlaygroundPainterAttrLineStyleLine:hover { - background-image: url("../../images/line1_category_on.png"); - background-repeat: no-repeat; +.entryPlaygroundLinebreakButtons img { + cursor: pointer; } -.entryPlaygroundPainterAttrLineStyleDot1 { - position: absolute; - top: -9px; - left: 1px; - background-image: url("../../images/line2_off.png"); - background-repeat: no-repeat; - background-color: #f5f5f5; - width: 75px; - height: 20px; +.entryPlaygroundLinebreakHorizontal { + display: block; + border-top: 1px solid #808080; + margin: 0 0 12px 0; + padding: 0; + width: 260px; } -.entryPlaygroundPainterAttrLineStyleDot1:hover { - background-image: url("../../images/line2_on.png"); - background-repeat: no-repeat; +.entryPlaygroundLinebreakDescription { + margin-top: 12px; } -.entryPlaygroundPainterAttrLineStyleDot2 { - position: absolute; - top: -29px; - left: 1px; - background-image: url("../../images/line3_off.png"); - background-repeat: no-repeat; - background-color: #f5f5f5; - width: 75px; - height: 20px; +.entryPlaygroundLinebreakDescription p { + color: #8888; + font-size: 11px; + margin-bottom: 5px; } -.entryPlaygroundPainterAttrLineStyleDot2:hover { - background-image: url("../../images/line3_on.png"); - background-repeat: no-repeat; +.entryPlaygroundLinebreakDescription ul { + padding-left: 20px; } -.entryPlaygroundPainterAttrLineStyleDot3 { +.entryPlaygroundLinebreakDescription ul li { + color: #B4B4B5; + font-size: 11px; +} +.entryPopup { + overflow: hidden; position: absolute; - top: -48px; - left: 1px; - background-image: url("../../images/line4_off.png"); - background-repeat: no-repeat; - background-color: #f5f5f5; - width: 75px; - height: 19px; + margin: 0; + padding: 0; + top: 0; + left: 0; + height: 100%; + width: 100%; + z-index: 7000; + background-color: rgba(0, 0, 0, 0.2); } -.entryPlaygroundPainterAttrLineStyleDot3:hover { - background-image: url("../../images/line4_on.png"); - background-repeat: no-repeat; +.entryPopup.popupHelper { + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; } -.entryPlaygroundPainterAttrLineStyleLine1 { +.entryPopupWindow { + width: 80%; + height: 80%; position: absolute; - top: -67px; - left: 1px; - background-image: url("../../images/line1_off.png"); - background-repeat: no-repeat; - background-color: #f5f5f5; - width: 75px; - height: 19px; - border-radius: 4px; + left: 0; + right: 0; + top: 0; + bottom: 0; + margin: auto; + max-width: 100%; + max-height: 100%; + /*overflow: hidden;*/ + z-index: 8000; + background-color: #ffffff; } -.entryPlaygroundPainterAttrLineStyleLine1:hover { - background-image: url("../../images/line1_on.png"); - background-repeat: no-repeat; +.entryPopup.hiddenPopup { + display: none; } -.painterAttrLineStyleBackgroundDot1, -.painterAttrLineStyleBackgroundDot2, -.painterAttrLineStyleBackgroundDot3, -.painterAttrLineStyleBackgroundLine { - position: absolute; - top: 10px; - background-repeat: no-repeat; - background-color: #f5f5f5; - width: 76px; - height: 21px; +.entryPopupHelperTopSpan, +.entryPopupHelperBottomSpan { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -ms-flex: 1; + flex: 1; } -.painterAttrLineStyleBackgroundDot1 { - background-image: url("../../images/line2_category_off.png"); +.entryPopupHelperMiddleSpan { + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; } -.painterAttrLineStyleBackgroundDot2 { - background-image: url("../../images/line3_category_off.png"); +.entryPopupHelperMiddleSpan .entryPopupHelperLeftSpan, +.entryPopupHelperMiddleSpan .entryPopupHelperRightSpan { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -ms-flex: 1; + flex: 1; } -.painterAttrLineStyleBackgroundDot3 { - background-image: url("../../images/line4_category_off.png"); +.propertyPanel { + position: absolute; + top: 326px; + bottom: 0px; + width: 400px; + background-color: #e7e7e7; + border-top: 2px solid #5096f5; +} +.propertyTab { + width: 50px; + height: 100%; + background-color: #f5f5f5; } -.painterAttrLineStyleBackgroundLine { - background-image: url("../../images/line1_category_off_1.png"); +.collapsed .propertyTab { + width: 30px; } -.painterAttrLineStyleBackgroundDot1:hover { - background-image: url("../../images/line2_category_on.png"); +.propertyTabElement { + width: 100%; + height: 40px; + background-color: #dbdcdc; background-repeat: no-repeat; + background-position: 50% 6px; + color: #9e9e9f; + font-size: 11px; + padding-top: 24px; + cursor: pointer; + text-align: center; } -.painterAttrLineStyleBackgroundDot2:hover { - background-image: url("../../images/line3_category_on.png"); - background-repeat: no-repeat; +.collapsed .propertyTabElement { + background-position: 50% 9px; + height: 36px; + font-size: 0; } -.painterAttrLineStyleBackgroundDot3:hover { - background-image: url("../../images/line4_category_on.png"); - background-repeat: no-repeat; +.propertyTabElement.selected { + background-color: #5096f5; + color: #fff; } -.painterAttrLineStyleBackgroundLine:hover { - background-image: url("../../images/line1_category_on_1.png"); - background-repeat: no-repeat; +.propertyTabobject { + background-image: url("../images/property/container_off.png"); } -.entryToolboxCursorClicked { - background-image: url("../../images/on_hand_1.png"); +.propertyTabobject.selected { + background-image: url("../images/property/container_on.png"); } -.entryToolboxSelectClicked { - background-image: url("../../images/on_choice_1.png"); +.propertyTabhw { + background-image: url("../images/property/hw_off.png"); } -.entryToolboxPenClicked { - background-image: url("../../images/on_pen_1.png"); +.propertyTabhw.selected { + background-image: url("../images/property/hw_on.png"); } -.entryToolboxLineClicked { - background-image: url("../../images/on_line_1.png"); +.propertyTabtvCast { + background-image: url("../images/property/vedio_off.png"); } -.entryToolboxRectClicked { - background-image: url("../../images/on_square_1.png"); +.propertyTabtvCast.selected { + background-image: url("../images/property/vedio_on.png"); } -.entryToolBoxCircleClicked { - background-image: url("../../images/on_circle_1.png"); +.propertyTabyoutube { + background-image: url("../images/property/vedio_off.png"); } -.entryToolBoxTextClicked { - background-image: url("../../images/on_text_1.png"); +.propertyTabyoutube.selected { + background-image: url("../images/property/vedio_on.png"); } -.entryToolBoxFillClicked { - background-image: url("../../images/on_paint_1.png"); +.propertyTabgoal { + background-image: url("../images/property/doneproject.png"); } -.entryToolBoxEraseClicked { - background-image: url("../../images/on_eraser_1.png"); +.propertyTabgoal.selected { + background-image: url("../images/property/doneproject_on.png"); } -.dd { - cursor: url("../../images/cursor_eraser.cur"); +.propertyContent { + position: absolute; + top: 0; + bottom: 0; + left: 50px; + right: 0; + background-color: #363C46; } -/* helper */ -@keyframes blockHelperUp { - 0% { - top: 100%; - } - 100% { - top: 0%; - } +.collapsed .propertyContent { + left: 30px; } -@-o-keyframes blockHelperUp { - 0% { - top: 100%; - } - 100% { - top: 0%; - } +.entrySceneWorkspace { + height: 40px; + width: 100%; + background-color: #5096f5; + position: fixed; + overflow: hidden; } -@-ms-keyframes blockHelperUp { - 0% { - top: 100%; - } - 100% { - top: 0%; - } +.entrySceneListWorkspace { + margin: 0px; + padding: 0px 5px 0px 55px; } -@-moz-keyframes blockHelperUp { - 0% { - top: 100%; - } - 100% { - top: 0%; - } +.entrySceneElementWorkspace { + float: left; + display: inline-block; + list-style-type: none; + color: white; + font-size: 10pt; + cursor: move; + border-radius: 20px; + margin-left: -40px; + position: relative; + margin-right: -2px; } -@-webkit-keyframes blockHelperUp { - 0% { - top: 100%; - } - 100% { - top: 0%; - } +.entrySceneElementWorkspace.selectedScene { + z-index: 888; } -@keyframes blockHelperDown { - 0% { - top: 0%; - } - 100% { - top: 100%; - } +.entrySceneAddButtonWorkspace:hover { + background-color: #A3CAF5; } -@-o-keyframes blockHelperDown { - 0% { - top: 0%; - } - 100% { - top: 100%; - } +.entrySceneAddButtonWorkspace { + float: left; + margin-left: -23px; + margin-top: 8px; + width: 23px; + height: 23px; + position: relative; + z-index: 999; + cursor: pointer; + background-image: url("../images/top_icon_add_b_nor.png"); } -@-ms-keyframes blockHelperDown { - 0% { - top: 0%; - } - 100% { - top: 100%; - } +.selectedScene .entrySceneLeftWorkspace { + background-image: url("../images/top_tab_b_sel_left.png"); } -@-moz-keyframes blockHelperDown { - 0% { - top: 0%; - } - 100% { - top: 100%; - } +.entrySceneLeftWorkspace { + display: inline-block; + float: left; + width: 15px; + height: 40px; + background-image: url("../images/top_tab_b_nor_left_blue.png"); } -@-webkit-keyframes blockHelperDown { - 0% { - top: 0%; - } - 100% { - top: 100%; - } +.entrySceneInputCover { + margin-left: -1px; + display: inline-block; + float: left; + height: 40px; + width: 76px; + padding-top: 11px; + padding-right: 2px; + background-color: #0e68e3; } -#entryBlockHelperWorkspace { - position: absolute; - bottom: 0; +.minValue .entrySceneInputCover { + min-width: 70px; +} +.entrySceneFieldWorkspace { + cursor: text !important; + display: inline-block; + margin: 0px; + height: 20px; width: 100%; - height: 100%; - background-color: #fff; - -webkit-animation-name: blockHelperUp; - -moz-animation-name: blockHelperUp; - -ms-animation-name: blockHelperUp; - -o-animation-name: blockHelperUp; - animation-name: blockHelperUp; - -webkit-animation-duration: 0.6s; - -moz-animation-duration: 0.6s; - -ms-animation-duration: 0.6s; - -o-animation-duration: 0.6s; + color: white; + border: 1px solid transparent; + background-color: #0e68e3; + padding: 0px 0px 0px 5px; } -#entryBlockHelperWorkspace.lecture { - -webkit-animation-duration: 0s; - -moz-animation-duration: 0s; - -ms-animation-duration: 0s; - -o-animation-duration: 0s; +.entrySceneFieldWorkspace:focus { + background-color: #eee; + color: #000; } -#entryBlockHelperWorkspace.dispose { - -webkit-animation-name: blockHelperDown; - -moz-animation-name: blockHelperDown; - -ms-animation-name: blockHelperDown; - -o-animation-name: blockHelperDown; - animation-name: blockHelperDown; +.selectedScene .entrySceneInputCover { + background-color: white; + min-width: 70px; } -#entryBlockHelperHeaderWorkspace { - position: absolute; - width: 100%; +.selectedScene .entrySceneFieldWorkspace { + background-color: white; + color: black; +} +.entrySceneFieldWorkspace:hover, +.entrySceneFieldWorkspace:focus, +.entrySceneFieldWorkspace:active { + outline: none; + border: 1px solid gray; +} +.entrySceneRemoveButtonCoverWorkspace { + border: 0; + padding: 0; + width: 55px; + background-color: transparent; + display: inline-block; + float: left; height: 40px; - background-color: #1bafea; - font-size: 16px; - line-height: 38px; - padding-left: 28px; - color: #fff; + position: relative; + background-image: url("../images/top_tab_b_nor_right_blue.png"); } -#entryBlockHelperDisposeWorkspace { - float: right; - background-image: url("../../images/block_helper_dispose.png"); - background-repeat: no-repeat; - background-position: center; - padding: 15px; - margin-top: 4px; - margin-right: 5px; +.selectedScene .entrySceneRemoveButtonCoverWorkspace { + display: inline-block; + background: url("../images/top_tab_b_sel_right.png"); } -#entryBlockHelperContentWorkspace { +.entrySceneRemoveButtonWorkspace { + border: 0; + padding: 0; + width: 12px; + background-color: #0e68e3; + height: 14px; position: absolute; - width: 100%; - top: 40px; - bottom: 0px; - overflow-y: auto; - overflow-x: hidden; + right: 45px; + top: 12px; + display: none; } -#entryBlockHelperContentWorkspace.lecture { - top: 40px; +.selectedScene .entrySceneRemoveButtonWorkspace { + background-color: white; + color: black; } -.entryBlockHelperIntro { - background-image: url("../../images/block_help_icon.png"); - background-repeat: no-repeat; - background-position: center top; - margin-top: 28px; - padding-top: 100px; - text-align: center; - color: #707070; - font-size: 12px; +.minValue .entrySceneRemoveButtonWorkspace { + display: inline-block; } -#entryBlockHelpBtn { - position: absolute; - background-image: url("../../images/block_help.png"); - background-repeat: no-repeat; - background-position: center; - padding: 15px; - margin-top: 3px; - margin-left: 6px; - z-index: 100; +.entrySceneRemoveButtonWorkspace:hover { + color: #FF3E24; } -#entryBlockHelperBlockWorkspace { +.entrySceneDummyView { + width: 55px; + height: 40px; + background-color: orange; + display: inline-block; + opacity: 0.3; position: absolute; - width: 400px; - height: 160px; - top: 16px; - left: 50%; -} -#entryBlockHelperBlockWorkspace > svg { - position: relative; - left: -50%; + left: 0; + top: 0; + z-index: 889; + left: 100px; } -#entryBlockHelperDescriptionWorkspace { +.entryCanvasWrapper { position: absolute; - line-height: 20px; - width: 100%; - top: 100px; - font-size: 13px; - color: #707074; - padding: 0 50px; - text-align: center; -} -.entryPlaygroundPainterTopMenuEdit > ul > li { - list-style-type: none; - width: 120px; } -.entryPlaygroundPainterTopMenuFile > ul > li { - list-style-type: none; - width: 120px; -} -.entryPlaygroundPainterTopMenu > ul { +.entryCanvasWorkspace { + width: 480px; + height: 270px; + background-color: white; + display: block; position: absolute; - top: 5px; + top: 24px; } -.entryPainterTopMenuEditImport { - height: 40px; +.entryPopupWindow .entryCanvasWorkspace { + top: -11px !important; } -.entryVariableSettingWorkspace { +.entryCanvasPhone { width: 100%; - height: 165px; - border-top: 1px solid #a8a8a8; - padding-left: 16px; - padding-right: 16px; - font-size: 11px; - background-color: #efefef; -} -.entryVariableSettingVisibleWrapperWorkspace { - padding-top: 22px; - cursor: pointer; -} -.entryVariableSettingCheckWorkspace { - display: inline-block; - position: absolute; - width: 10px; - height: 10px; - border-radius: 2px; - left: 90px; - margin-top: 2px; - border: 1px solid gray; - color: #5e5e5e; + background-color: white; + display: block; } -.entryVariableAddSpaceCheckWorkspace.entryVariableAddChecked, -.entryVariableSettingCheckWorkspace.entryVariableSettingChecked { - /*background-color: gray;*/ - background-image: url("../../images/check_on.png"); - background-repeat: no-repeat; +.entryPopupWindow > .entryCanvasWorkspace { + width: 100% !important; + height: 100% !important; + position: relative; + border-bottom: 1px solid #ccc; + border-top: 0px; } -.entryVariableSettingInitValueWrapperWorkspace, -.entryVariableSettingSlideWrapperWorkspace, -.entryVariableSettingMinMaxWrapperWorkspace { - margin-top: 12px; +.entryPopupWindow > .entryEngine_w { + width: 100% !important; + height: 100% !important; } -.entryVariableSettingSlideWrapperWorkspace { - cursor: pointer; +.entryEngine_w > .entryCanvasWorkspace { + border-top: 1px solid #ccc; } -.entryVariableMinMaxDisabledWorkspace.entryVariableSettingMinMaxWrapperWorkspace { - color: #a8a8a8; +.entryPopupWindow > div > .entryCanvasWorkspace { + bottom: 24px; + border-bottom: 1px solid #ccc; + width: 100% !important; + height: 100% !important; + top: -25px !important; } -.entryVariableSettingInitValueInputWorkspace { - margin-left: 33px; - border: 2px solid #a8a8a8; - padding-left: 5px; - width: 65%; +.entryStateManagerWorkspace { + float: right; + height: 40px; + margin-right: 10px; } -.entryVariableSettingSplitterWorkspace { - width: 100%; - height: 1px; - background-color: #a8a8a8; - margin-top: 16px; +.entryStateManagerButtonWorkspace { + border: 0; + margin: 3px; + padding-left: 26px; + height: 32px; + border-radius: 4px; + background-color: #BDC4C9; + color: #E2EBFA; + font-size: 10pt; + background-repeat: no-repeat; + background-position: 7px 8px; + border-bottom: 2pt solid #A0ACB2; + border-right: 2pt solid #A0ACB2; } -.entryVariableSettingMinValueInputWorkspace, -.entryVariableSettingMaxValueInputWorkspace { - margin-left: 3px; - width: 22%; - border: 1px solid #afafaf; - padding-left: 5px; +.entryStateManagerButtonWorkspace.active:hover { + background-color: #7CC2EE; } -.entryVariableSettingMinValueInputWorkspace:disabled, -.entryVariableSettingMaxValueInputWorkspace:disabled { - background-color: #d3d3d3; +.entryStateManagerButtonWorkspace.active { + background-color: #6AAFDA; + border-bottom: 2pt solid #639FBD; + border-right: 2pt solid #639FBD; } -.entryVariableSettingMaxValueSpanWorkspace { - margin-left: 5px; +.entryUndoButtonWorkspace { + background-image: url("/img/assets/undo.png"); } -.entryVariableSettingButtonWrapperWorkspace { - margin-top: 18px; +.entryRedoButtonWorkspace { + background-image: url("/img/assets/redo.png"); } -.entryVariableListElementWrapperWorkspace { - width: 100%; - height: 50px; +.entryToastContainer { + position: fixed; + right: 0px; + bottom: 0px; + margin: 0px; + padding: 10px; + width: 300px; + max-height: 100%; + overflow: auto; + z-index: 9000; } -.entryListSettingWorkspace { +.entryToast { + padding: 7px 16px; + margin-top: 8px; width: 100%; - padding-top: 24px; - padding-bottom: 5px; - border-top: 1px solid #a8a8a8; - padding-left: 16px; - padding-right: 16px; - font-size: 13px; - background-color: #efefef; -} -.entryListSettingVisibleWrapperWorkspace { + background-color: #eee; + box-shadow: #999 0 0 8px; + border: 2px solid; + -webkit-border-radius: 4px; + border-radius: 4px; + background-clip: padding-box; + -webkit-transition: opacity 0.25s ease-in-out; + -moz-transition: opacity 0.25s ease-in-out; + -o-transition: opacity 0.25s ease-in-out; + -ms-transition: opacity 0.25s ease-in-out; + transition: opacity 0.25s ease-in-out; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); cursor: pointer; + opacity: 1; } -.entryListSettingCheckWorkspace { - display: inline-block; - position: absolute; - width: 10px; - height: 10px; - border-radius: 2px; - left: 103px; - margin-top: 4px; - border: 1px solid gray; - color: #5e5e5e; +.entryToastSuccess { + border-color: #d6e9c6; + background-color: #e5f3df; + color: #468847; } -.entryListSettingCheckedWorkspace { - /*background-color: gray;*/ - background-image: url("../../images/check_on.png"); - background-repeat: no-repeat; +.entryToastWarning { + border-color: #7e719; + background-color: #fff9ab; + color: #e07000; } -.entryListSettingLengthWrapperWorkspace { - margin-top: 15px; - overflow: hidden; +.entryToastAlert { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; } -.entryListSettingLengthControllerWorkspace { - margin-left: 5px; - height: 23px; - display: inline-block; - position: relative; +.entryToastTitle { + font-size: 12pt; + font-weight: bold; } -.entryListSettingLengthSpanWorkspace { - float: left; - margin-top: 2px; +.entryToastMessage { + font-size: 9pt; + margin-top: 4px; + margin-bottom: 2px; } -.entryListSettingMinusWorkspace { - width: 23px; - height: 23px; - float: left; - background-image: url("../../images/list_minus.png"); - cursor: pointer; +.entryVariablePanelWorkspace { + position: absolute; + width: 250px; + top: 47px; + bottom: 0px; + padding: 6px 4px 0px 4px; } -.entryListSettingLengthInputWorkspace { - float: left; - height: 23px; - margin-left: 5px; - margin-right: 5px; - padding-left: 5px; - border: 2px solid #a8a8a8; - width: 60px; +.entryVariablePanelPhone { + width: 250px; + top: 47px; + bottom: 0px; + padding: 6px 4px 0px 4px; } -.entryListSettingLengthInputWorkspace:focus { - border: 2px solid #1bafea; - outline: none; +.entryVariableSelectorWorkspace { + width: 100%; + border-collapse: separate; + border-spacing: 0; } -.entryListSettingPlusWorkspace { - width: 23px; - height: 23px; - float: left; - background-image: url("../../images/list_plus.png"); +.entryVariableSelectButtonWorkspace { + font-family: nanumBarunBold !important; + width: 25%; + border-collapse: collapse; + text-align: center; + vertical-align: center; + background-color: #EDEDED; + height: 38px; + border: solid 1px #bdbdbd; + border-left: none; + color: #535353; + padding-top: 4px; cursor: pointer; } -.entryListSettingSeperatorWorkspace { - height: 1px; - background-color: gray; - margin-top: 10px; - margin-bottom: 10px; -} -.entryListSettingListValuesWorkspace { - padding-left: 15px; - color: #a8a8a8; +.entryVariableSelectButtonWorkspace.selected { + color: #ffffff; + background-color: #0e68e3; } -.entryListSettingValueWrapperWorkspace { - margin-bottom: 10px; - overflow: hidden; +.entryVariableSelectButtonWorkspace.allButton { + border-radius: 6px 0 0 6px; + border-left: solid 1px #bdbdbd; } -.entryListSettingEachInputWorkspace { - border: 2px solid #a8a8a8; - width: 130px; - float: left; - padding-left: 5px; +.entryVariableSelectButtonWorkspace.message { + border-radius: 0 6px 0px 0; } -.entryListSettingEachInputWorkspace:focus { - border: 2px solid #1baefa; - outline: none; +.entryVariableSelectButtonWorkspace.list { + border-top: none; } -.entryListSettingValueNumberSpanWorkspace { - width: 20px; - display: inline-block; - float: left; - margin-top: 3px; +.entryVariableSelectButtonWorkspace.func { + border-top: none; + border-radius: 0 0px 6px 0; } -.entryListSettingValueRemoveWorkspace { - display: inline-block; - width: 16px; - height: 16px; - float: right; - margin-right: 10px; - margin-top: 4px; - cursor: pointer; - background-image: url("../../images/list_remove_button.png"); +.entryVariableSelectButtonWorkspace.disable { + color: #bdbdbd; + cursor: default; } -.entryEngineBigButtonMinimize_popup { - border: none; - display: none; - margin: 0; - padding: 0; +.entryVariableListWorkspace { position: absolute; - left: 50%; - width: 111px; - height: 111px; - margin-left: -55.5px; - top: 50%; - margin-top: -55.5px; + top: 88px; + bottom: 0px; + right: 4px; + left: 4px; + padding: 0; + margin: 0; + list-style: none; + overflow: auto; +} +.entryVariableListElementWorkspace { background-repeat: no-repeat; - background-position: 40px center; - background-color: rgba(0, 0, 0, 0.5); - border-radius: 55px; + background-position: 14px 10px; + background-color: #efefef; + border: solid 1px #a8a8a8; + margin-bottom: -1px; + min-height: 50px; } -.entryEngineBigButtonMinimize_popup:hover { - opacity: 0.8; +.entryVariableAddWorkspace { + padding: 0; + font-size: 13pt; + color: #717171; + cursor: pointer; + line-height: 49px; + position: relative; + text-align: center; } -.entryEngineBigButtonMinimize_popup:focus { - outline: none; +.entryVariableAddWorkspace:hover { + background-color: #d3d3d3; + color: #333; } -.entryEngineBigButtonMinimize_popup.entryEngineBigButtonMinimize_popup_run { - background-image: url("../../images/play_btn.png"); +.entryVariableListElementWorkspace.selected { + background-color: #d3d3d3; } -.entryPopupWindow .entryEngineBigButtonMinimize_popup { - display: block; +.entryVariableListElementNameWorkspace { + position: absolute; + left: 47px; + margin-top: 12px; + background-color: #efefef; + width: 55%; + border: 1px solid transparent; + padding-left: 5px; } -.entryContainerTabViewWorkspace { - width: 100%; - height: 45px; - border-bottom: 2px solid #1bafea; +.selected .entryVariableListElementNameWorkspace { + background-color: #d3d3d3; } -.entryContainerTabItemWorkspace { - vertical-align: top; - height: 100%; - width: 25%; - text-align: center; - display: inline-block; - background-color: #e5e5e5; - color: #9e9f9f; - font-size: 13px; - cursor: pointer; - padding-top: 13px; +.entryVariableListElementNameWorkspace:focus { + background-color: white; + border: 1px solid gray; } -.entryContainerTabItemWorkspace:nth-child(2) { - border-left: 2px solid white; - border-right: 2px solid white; +.entryVariableFunctionElementNameWorkspace { + border: none; + position: absolute; + left: 55px; + margin-top: 12px; + background-color: transparent; + width: 60%; + overflow: hidden; + height: 20px; + text-overflow: ellipsis; + white-space: nowrap; } -.entryContainerTabItemWorkspace:nth-child(3) { - border-right: 2px solid white; +.entryVariableListElementDeleteWorkspace { + position: absolute; + margin-top: 5px; + padding-right: 5px; + right: 3px; + border: 0; + outline: 0; + width: 22px; + height: 40px; + opacity: 0; + background-color: transparent; + background-image: url("../images/layers_icon_close_nor_new_1.png"); + background-repeat: no-repeat; + background-position: center; } -.entryContainerTabItemWorkspace.selected { - background-color: #1bafea; - color: white; +.entryVariableListElementWorkspace:hover .entryVariableListElementDeleteWorkspace { + opacity: 1; } -.entryContainerMovieWorkspace { - /* - position: absolute; - width: 100%; - top: 45px; - bottom: 0px; - - z-index: 1000; -*/ - position: absolute; - background-color: #363C46; - top: 0px; - width: 100%; - overflow: scroll; +.entryVariableListElementEditWorkspace { + display: inline-block; + float: right; + border: 0; + outline: 0; + width: 20px; + height: 40px; + margin-top: 5px; + margin-right: 25px; + background-color: transparent; + background-image: url("../images/layers_icon_edit_nor_new_1.png"); + background-repeat: no-repeat; + background-position: center; + opacity: 0; } -.entryContainerMovieWorkspace::-webkit-scrollbar { - display: none; +.entryVariableListElementWorkspace:hover .entryVariableListElementEditWorkspace { + opacity: 1; +} +.entryVariableListCallerListWorkspace { + list-style: none; + padding: 0; } -.entryContainerDoneWorkspace { - position: absolute; - width: 100%; - top: 0px; - background-color: #363C46; +.entryVariableListCallerWorkspace { + border: solid 1px #c8c8c8; + border-top: none; + height: 50px; + cursor: pointer; overflow: hidden; - text-align: center; } -.entryContainerHelperWorkspace { - position: absolute; - width: 100%; - top: 45px; - bottom: 0; - background-color: #fff; - z-index: 1000; - background: gray; +.entryVariableListCallerWorkspace:hover { + background-color: #e0e0e0; } -.entryPlayground_text_buttons { - display: inline-block; - list-style-type: none; - margin: 0; - padding: 0; +.entryVariableListCallerWorkspace:first-child { + border-top: none; } -.entryPlayground_text_buttons > li { +.entryVariableListCallerWorkspace > .entryObjectThumbnailWorkspace { + position: inherit; + display: block; float: left; - width: 32px; - height: 32px; - margin-left: 2px; - cursor: pointer; + top: 0; + left: 0; + margin: 5px 0 0 5px; + height: 40px; + width: 40px; } -.entryPlaygroundTextAlignLeft { - background-image: url("../../images/text_align_left_off.png"); +.entryVariableListCallerNameWorkspace { + position: absolute; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + float: left; + height: 49px; + line-height: 49px; + left: 60px; + right: 0; + padding-right: 7px; } -.entryPlaygroundTextAlignLeft.toggle { - background-image: url("../../images/text_align_left_on.png"); +.entryVariableListCallerNoneWorkspace { + color: #C16B6B; + cursor: default; + line-height: 48px; + padding-left: 50px; } -.entryPlaygroundTextAlignCenter { - background-image: url("../../images/text_align_center_off.png"); +.entryVariableLocalElementWorkspace { + background-image: url("../images/local_question_icon.png"); } -.entryPlaygroundTextAlignCenter.toggle { - background-image: url("../../images/text_align_center_on.png"); +.entryVariableCloudElementWorkspace { + background-image: url("../images/cloud_question_icon.png"); } -.entryPlaygroundTextAlignRight { - background-image: url("../../images/text_align_right_off.png"); +.entryVariableGlobalElementWorkspace { + background-image: url("../images/list_icon_question.png"); } -.entryPlaygroundTextAlignRight.toggle { - background-image: url("../../images/text_align_right_on.png"); +.entryMessageElementWorkspace { + background-image: url("../images/list_icon_signal.png"); } -.entryPlayground_fgColorDiv { - position: absolute; - width: 15px; - height: 4px; - margin-top: -15px; - margin-left: 345px; +.entryListCloudElementWorkspace { + background-image: url("../images/cloud_list_icon.png"); } -.entryPlayground_bgColorDiv { - position: absolute; - width: 15px; - height: 4px; - margin-top: -15px; - margin-left: 379px; +.entryListGlobalElementWorkspace { + background-image: url("../images/list_icon_list.png"); } -.entryPlayground_textBox { - margin-top: 5px; - height: 33px; - width: 400px; +.entryListLocalElementWorkspace { + background-image: url("../images/local_list_icon.png"); } -.entryPlayground_textArea { - margin-top: 5px; - height: 120px; - width: 400px; - resize: none; +.entryFunctionElementWorkspace { + background-image: url("../images/list_icon_function_v1.png"); } -.entryPlaygroundFontSizeWrapper { - width: 400px; - height: 39px; +.entryVariableAddSpaceWorkspace { + padding: 0; + padding-left: 16px; + padding-right: 16px; + margin: 0; + /*height: 215px;*/ + height: 200px; + background-color: white; + border: 1px solid #a8a8a8; } -.entryPlaygroundFontSizeLabel { - display: inline-block; - float: right; - font-size: 9px; - font-family: notoSansMedium; - color: #444; - line-height: 39px; +.entryVariableAddSpaceNameWrapperWorkspace { + height: 28px; + margin-top: 16px; + background-image: url("../images/list_icon_question_1.png"); + background-repeat: no-repeat; } -.entryPlaygroundFontSizeSlider { - display: inline-block; - float: right; - width: 96px; - height: 3px; - margin: 18px 0px 18px 4px; - background-color: #cfcfcf; - border-radius: 1.5px; +.entryVariableAddSpaceNameWrapperWorkspace.entryListAddSpaceNameWrapperWorkspace { + background-image: url("../images/list_icon_list_1.png"); } -.entryPlaygroundFontSizeIndicator { - height: 100%; - width: 45%; - background-color: #643cd9; +.entryVariableAddSpaceInputWorkspace { + width: 80%; + margin-left: 42px; + margin-top: 2px; } -.entryPlaygroundFontSizeKnob { - width: 16px; - height: 16px; +.entryVariableAddSpaceGlobalWrapperWorkspace { + margin-top: 16px; + color: #5e5e5e; + font-size: 11px; position: relative; - margin-top: -10px; - margin-left: -7px; - background-image: url("../../images/text_size_knob.png"); cursor: pointer; } -.entryPlaygroundTextColoursWrapper { - width: 260px; - height: 226px; - z-index: 10; - cursor: pointer; - margin-top: -5px; - margin-left: 335px; - padding: 20px 5px; +.entryVariableAddSpaceCheckWorkspace { + display: inline-block; + width: 10px; + height: 10px; + border-radius: 2px; + margin-top: 2px; position: absolute; - background-image: url("../../images/text_color_bg.png"); - background-repeat: no-repeat; - background-size: 260px 226px; + right: 17px; + border: 1px solid gray; } -.entryPlaygroundTextBackgroundsWrapper { - width: 260px; - height: 226px; - z-index: 10; +.entryVariableAddSpaceLocalWrapperWorkspace { + color: #5e5e5e; + font-size: 11px; + position: relative; + margin-top: 12px; cursor: pointer; - margin-top: -5px; - margin-left: 369px; - padding: 20px 5px; - position: absolute; - background-image: url("../../images/text_color_bg_1.png"); - background-repeat: no-repeat; - background-size: 260px 226px; + padding-bottom: 10px; + border-bottom: 1px solid #a8a8a8; } -.entryPlaygroundLinebreakWrapper { - position: fixed; - top: 351px; +.entryVariableAddSpaceCloudWrapperWorkspace { + padding-top: 8px; } -.entryPlaygroundLinebreakButtons { - display: inline; - font-size: 0; +.entryVariableAddSpaceCloudWrapperWorkspace { + cursor: pointer; + color: #5e5e5e; + font-size: 11px; + position: relative; } -.entryPlaygroundLinebreakButtons img { +.entryVariableAddSpaceUnCheckedWorkspace { + color: #afafaf; +} +.entryVariableAddSpaceCloudCheckWorkspace { + margin-top: -12px; +} +.entryVariableAddSpaceButtonWrapperWorkspace { + margin-top: 12px; +} +.entryVariableAddSpaceButtonWorkspace { + font-size: 11px; + display: inline-block; + width: 48px; + height: 24px; + border: 2px solid gray; + text-align: center; + line-height: 22px; cursor: pointer; + float: right; } -.entryPlaygroundLinebreakHorizontal { - display: block; - border-top: 1px solid #808080; - margin: 0 0 12px 0; - padding: 0; - width: 260px; +.entryVariableAddSpaceCancelWorkspace { + margin-left: 7px; +} +.entryVariableSplitterWorkspace { + height: 25px; + font-size: 11px; + border: 1px solid #a8a8a8; + border-top: none; + line-height: 25px; + padding-left: 9px; +} +/*first element after splitter should not have border-top*/ +.entryVariableSplitterWorkspace + .entryVariableListElementWorkspace { + border-top: none; +} +.entryVariableListCallerListWorkspace + .entryVariableListElementWorkspace { + border-top: none; +} +.entryVariableSettingWorkspace { + width: 100%; + height: 165px; + border-top: 1px solid #a8a8a8; + padding-left: 16px; + padding-right: 16px; + font-size: 11px; + background-color: #efefef; +} +.entryVariableSettingVisibleWrapperWorkspace { + padding-top: 22px; + cursor: pointer; +} +.entryVariableSettingCheckWorkspace { + display: inline-block; + position: absolute; + width: 10px; + height: 10px; + border-radius: 2px; + left: 90px; + margin-top: 2px; + border: 1px solid gray; + color: #5e5e5e; } -.entryPlaygroundLinebreakDescription { - margin-top: 12px; +.entryVariableAddSpaceCheckWorkspace.entryVariableAddChecked, +.entryVariableSettingCheckWorkspace.entryVariableSettingChecked { + background-image: url("../images/check_on.png"); + background-repeat: no-repeat; } -.entryPlaygroundLinebreakDescription p { - color: #8888; - font-size: 11px; - margin-bottom: 5px; +.entryVariableSettingInitValueWrapperWorkspace, +.entryVariableSettingSlideWrapperWorkspace, +.entryVariableSettingMinMaxWrapperWorkspace { + margin-top: 12px; } -.entryPlaygroundLinebreakDescription ul { - padding-left: 20px; +.entryVariableSettingSlideWrapperWorkspace { + cursor: pointer; } -.entryPlaygroundLinebreakDescription ul li { - color: #B4B4B5; - font-size: 11px; +.entryVariableMinMaxDisabledWorkspace.entryVariableSettingMinMaxWrapperWorkspace { + color: #a8a8a8; } -#entry-contextmenu.workspace-contextmenu { - position: fixed; - background-color: white; - display: inline-block; - list-style: none; - padding: 4px 0; - border-color: #ccc #666 #666 #ccc; - border-style: solid; - border-width: 1px; - outline: none; - font-size: 14px; - box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); - min-width: 160px; - border-radius: 4px; - background-clip: padding-box; - color: #262626; +.entryVariableSettingInitValueInputWorkspace { + margin-left: 33px; + border: 2px solid #a8a8a8; + padding-left: 5px; + width: 65%; } -#entry-contextmenu.workspace-contextmenu .menuAble { - padding: 3px 20px; +.entryVariableSettingSplitterWorkspace { + width: 100%; + height: 1px; + background-color: #a8a8a8; + margin-top: 16px; } -#entry-contextmenu.workspace-contextmenu .menuAble:hover { - color: white; - background-color: #57e; +.entryVariableSettingMinValueInputWorkspace, +.entryVariableSettingMaxValueInputWorkspace { + margin-left: 3px; + width: 22%; + border: 1px solid #afafaf; + padding-left: 5px; } -#entry-contextmenu.workspace-contextmenu .menuDisable { - color: #ccc; - padding: 3px 20px; +.entryVariableSettingMinValueInputWorkspace:disabled, +.entryVariableSettingMaxValueInputWorkspace:disabled { + background-color: #d3d3d3; } -.entryPauseButtonWorkspace_w { - display: none; +.entryVariableSettingMaxValueSpanWorkspace { + margin-left: 5px; } -.entryPopupWindow .entryPauseButtonWorkspace_w { - display: inline-block; - background: url("../../images/pause_btn.png"); - background-repeat: no-repeat; - color: transparent; - width: 90px; - left: 103px; - color: #4b37a0; - background-position: center left; +.entryVariableSettingButtonWrapperWorkspace { + margin-top: 18px; } -.entrySceneDummyView { - width: 55px; - height: 40px; - background-color: orange; - display: inline-block; - opacity: 0.3; - position: absolute; - left: 0; - top: 0; - z-index: 889; - left: 100px; +.entryVariableListElementWrapperWorkspace { + width: 100%; + height: 50px; } -.entryPopup { - overflow: hidden; - position: absolute; - margin: 0; - padding: 0; - top: 0; - left: 0; - height: 100%; +.entryListSettingWorkspace { width: 100%; - z-index: 7000; - background-color: rgba(0, 0, 0, 0.2); + padding-top: 24px; + padding-bottom: 5px; + border-top: 1px solid #a8a8a8; + padding-left: 16px; + padding-right: 16px; + font-size: 13px; + background-color: #efefef; } -.entryPopup.popupHelper { - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; - display: -webkit-flex; - display: flex; - -webkit-box-direction: normal; - -moz-box-direction: normal; - -webkit-box-orient: vertical; - -moz-box-orient: vertical; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; +.entryListSettingVisibleWrapperWorkspace { + cursor: pointer; } -.entryPopupWindow { - width: 80%; - height: 80%; +.entryListSettingCheckWorkspace { + display: inline-block; position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - margin: auto; - max-width: 100%; - max-height: 100%; - /*overflow: hidden;*/ - z-index: 8000; - background-color: #ffffff; + width: 10px; + height: 10px; + border-radius: 2px; + left: 103px; + margin-top: 4px; + border: 1px solid gray; + color: #5e5e5e; } -.entryPopup.hiddenPopup { - display: none; +.entryListSettingCheckWorkspace.entryListSettingCheckedWorkspace { + background-image: url("../images/check_on.png"); + background-repeat: no-repeat; } -.entryPopupHelperTopSpan, -.entryPopupHelperBottomSpan { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -ms-flex: 1; - flex: 1; +.entryListSettingLengthWrapperWorkspace { + margin-top: 15px; + overflow: hidden; } -.entryPopupHelperMiddleSpan { - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; - display: -webkit-flex; - display: flex; - -webkit-box-direction: normal; - -moz-box-direction: normal; - -webkit-box-orient: horizontal; - -moz-box-orient: horizontal; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; +.entryListSettingLengthControllerWorkspace { + margin-left: 5px; + height: 23px; + display: inline-block; + position: relative; } -.entryPopupHelperMiddleSpan .entryPopupHelperLeftSpan, -.entryPopupHelperMiddleSpan .entryPopupHelperRightSpan { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -ms-flex: 1; - flex: 1; +.entryListSettingLengthSpanWorkspace { + float: left; + margin-top: 2px; } - -.block { - cursor: url('../../images/handopen.cur') 8 5, auto; +.entryListSettingMinusWorkspace { + width: 23px; + height: 23px; + float: left; + background-image: url("../images/list_minus.png"); + cursor: pointer; } -.block.dragging { - cursor: url('../../images/handclosed.cur') 8 5, auto; +.entryListSettingLengthInputWorkspace { + float: left; + height: 23px; + margin-left: 5px; + margin-right: 5px; + padding-left: 5px; + border: 2px solid #a8a8a8; + width: 60px; } -.block.selected > path { - stroke-width: 3px; - stroke: #798EB1; +.entryListSettingLengthInputWorkspace:focus { + border: 2px solid #1bafea; + outline: none; } -.entry-field-dropdown { +.entryListSettingPlusWorkspace { + width: 23px; + height: 23px; + float: left; + background-image: url("../images/list_plus.png"); cursor: pointer; } -.entry-field-dropdown .rect { - fill: white; +.entryListSettingSeperatorWorkspace { + height: 1px; + background-color: gray; + margin-top: 10px; + margin-bottom: 10px; } -.entry-field-dropdown .rect text { - fill: black; +.entryListSettingListValuesWorkspace { + padding-left: 15px; + color: #a8a8a8; } -.entry-field-dropdown .rect:hover { - fill: #127cdb; +.entryListSettingValueWrapperWorkspace { + margin-bottom: 10px; + overflow: hidden; } -.entry-field-dropdown .rect:hover text { - fill: white; +.entryListSettingEachInputWorkspace { + border: 2px solid #a8a8a8; + width: 130px; + float: left; + padding-left: 5px; } -.entryBoard { - cursor: move; +.entryListSettingEachInputWorkspace:focus { + border: 2px solid #1baefa; + outline: none; } -.boardScrollbar { - opacity: 0.4; - cursor: move; +.entryListSettingValueNumberSpanWorkspace { + width: 20px; + display: inline-block; + float: left; + margin-top: 3px; } -.boardScrollbar:hover { - opacity: 0.6; +.entryListSettingValueRemoveWorkspace { + display: inline-block; + width: 16px; + height: 16px; + float: right; + margin-right: 10px; + margin-top: 4px; + cursor: pointer; + background-image: url("../images/list_remove_button.png"); } - diff --git a/dist/entry.js b/dist/entry.js index 5436169d3c..519d238bdb 100644 --- a/dist/entry.js +++ b/dist/entry.js @@ -1,34 +1,34 @@ -var Entry = {block:{}, TEXT_ALIGN_CENTER:0, TEXT_ALIGN_LEFT:1, TEXT_ALIGN_RIGHT:2, TEXT_ALIGNS:["center", "left", "right"], loadProject:function(a) { - a || (a = Entry.getStartProject(Entry.mediaFilePath)); +var Entry = {block:{}, TEXT_ALIGN_CENTER:0, TEXT_ALIGN_LEFT:1, TEXT_ALIGN_RIGHT:2, TEXT_ALIGNS:["center", "left", "right"], clipboard:null, loadProject:function(b) { + b || (b = Entry.getStartProject(Entry.mediaFilePath)); "workspace" == this.type && Entry.stateManager.startIgnore(); - Entry.projectId = a._id; - Entry.variableContainer.setVariables(a.variables); - Entry.variableContainer.setMessages(a.messages); - Entry.variableContainer.setFunctions(a.functions); - Entry.scene.addScenes(a.scenes); + Entry.projectId = b._id; + Entry.variableContainer.setVariables(b.variables); + Entry.variableContainer.setMessages(b.messages); + Entry.scene.addScenes(b.scenes); Entry.stage.initObjectContainers(); - Entry.container.setObjects(a.objects); - Entry.FPS = a.speed ? a.speed : 60; + Entry.variableContainer.setFunctions(b.functions); + Entry.container.setObjects(b.objects); + Entry.FPS = b.speed ? b.speed : 60; createjs.Ticker.setFPS(Entry.FPS); "workspace" == this.type && Entry.stateManager.endIgnore(); Entry.engine.projectTimer || Entry.variableContainer.generateTimer(); 0 === Object.keys(Entry.container.inputValue).length && Entry.variableContainer.generateAnswer(); Entry.start(); - return a; -}, exportProject:function(a) { - a || (a = {}); + return b; +}, exportProject:function(b) { + b || (b = {}); Entry.engine.isState("stop") || Entry.engine.toggleStop(); Entry.Func && Entry.Func.workspace && Entry.Func.workspace.visible && Entry.Func.cancelEdit(); - a.objects = Entry.container.toJSON(); - a.scenes = Entry.scene.toJSON(); - a.variables = Entry.variableContainer.getVariableJSON(); - a.messages = Entry.variableContainer.getMessageJSON(); - a.functions = Entry.variableContainer.getFunctionJSON(); - a.scenes = Entry.scene.toJSON(); - a.speed = Entry.FPS; - return a; -}, setBlockByText:function(a, b) { - for (var c = [], d = jQuery.parseXML(b).getElementsByTagName("category"), e = 0;e < d.length;e++) { + b.objects = Entry.container.toJSON(); + b.scenes = Entry.scene.toJSON(); + b.variables = Entry.variableContainer.getVariableJSON(); + b.messages = Entry.variableContainer.getMessageJSON(); + b.functions = Entry.variableContainer.getFunctionJSON(); + b.scenes = Entry.scene.toJSON(); + b.speed = Entry.FPS; + return b; +}, setBlockByText:function(b, a) { + for (var c = [], d = jQuery.parseXML(a).getElementsByTagName("category"), e = 0;e < d.length;e++) { for (var f = d[e], g = {category:f.getAttribute("id"), blocks:[]}, f = f.childNodes, h = 0;h < f.length;h++) { var k = f[h]; !k.tagName || "BLOCK" != k.tagName.toUpperCase() && "BTN" != k.tagName.toUpperCase() || g.blocks.push(k.getAttribute("type")); @@ -36,13 +36,13 @@ var Entry = {block:{}, TEXT_ALIGN_CENTER:0, TEXT_ALIGN_LEFT:1, TEXT_ALIGN_RIGHT: c.push(g); } Entry.playground.setBlockMenu(c); -}, setBlock:function(a, b) { - Entry.playground.setMenuBlock(a, b); +}, setBlock:function(b, a) { + Entry.playground.setMenuBlock(b, a); }, enableArduino:function() { -}, initSound:function(a) { - a.path = a.fileurl ? a.fileurl : Entry.defaultPath + "/uploads/" + a.filename.substring(0, 2) + "/" + a.filename.substring(2, 4) + "/" + a.filename + a.ext; - Entry.soundQueue.loadFile({id:a.id, src:a.path, type:createjs.LoadQueue.SOUND}); -}, beforeUnload:function(a) { +}, initSound:function(b) { + b.path = b.fileurl ? b.fileurl : Entry.defaultPath + "/uploads/" + b.filename.substring(0, 2) + "/" + b.filename.substring(2, 4) + "/" + b.filename + b.ext; + Entry.soundQueue.loadFile({id:b.id, src:b.path, type:createjs.LoadQueue.SOUND}); +}, beforeUnload:function(b) { Entry.hw.closeConnection(); Entry.variableContainer.updateCloudVariables(); if ("workspace" == Entry.type && (localStorage && Entry.interfaceState && localStorage.setItem("workspace-interface", JSON.stringify(Entry.interfaceState)), !Entry.stateManager.isSaved())) { @@ -51,87 +51,88 @@ var Entry = {block:{}, TEXT_ALIGN_CENTER:0, TEXT_ALIGN_LEFT:1, TEXT_ALIGN_RIGHT: }, loadInterfaceState:function() { if ("workspace" == Entry.type) { if (localStorage && localStorage.getItem("workspace-interface")) { - var a = localStorage.getItem("workspace-interface"); - this.resizeElement(JSON.parse(a)); + var b = localStorage.getItem("workspace-interface"); + this.resizeElement(JSON.parse(b)); } else { this.resizeElement({menuWidth:280, canvasWidth:480}); } } -}, resizeElement:function(a) { +}, resizeElement:function(b) { if ("workspace" == Entry.type) { - var b = this.interfaceState; - !a.canvasWidth && b.canvasWidth && (a.canvasWidth = b.canvasWidth); - !a.menuWidth && this.interfaceState.menuWidth && (a.menuWidth = b.menuWidth); + var a = this.interfaceState; + !b.canvasWidth && a.canvasWidth && (b.canvasWidth = a.canvasWidth); + !b.menuWidth && this.interfaceState.menuWidth && (b.menuWidth = a.menuWidth); Entry.engine.speedPanelOn && Entry.engine.toggleSpeedPanel(); - (b = a.canvasWidth) ? 325 > b ? b = 325 : 720 < b && (b = 720) : b = 400; - a.canvasWidth = b; - var c = 9 * b / 16; - Entry.engine.view_.style.width = b + "px"; + (a = b.canvasWidth) ? 325 > a ? a = 325 : 720 < a && (a = 720) : a = 400; + b.canvasWidth = a; + var c = 9 * a / 16; + Entry.engine.view_.style.width = a + "px"; Entry.engine.view_.style.height = c + "px"; Entry.engine.view_.style.top = "40px"; Entry.stage.canvas.canvas.style.height = c + "px"; - Entry.stage.canvas.canvas.style.width = b + "px"; - 400 <= b ? Entry.engine.view_.removeClass("collapsed") : Entry.engine.view_.addClass("collapsed"); - Entry.playground.view_.style.left = b + .5 + "px"; - Entry.propertyPanel.resize(b); + Entry.stage.canvas.canvas.style.width = a + "px"; + 400 <= a ? Entry.engine.view_.removeClass("collapsed") : Entry.engine.view_.addClass("collapsed"); + Entry.playground.view_.style.left = a + .5 + "px"; + Entry.propertyPanel.resize(a); var d = Entry.engine.view_.getElementsByClassName("entryAddButtonWorkspace_w")[0]; - d && (Entry.objectAddable ? (d.style.top = c + 24 + "px", d.style.width = .7 * b + "px") : d.style.display = "none"); + d && (Entry.objectAddable ? (d.style.top = c + 24 + "px", d.style.width = .7 * a + "px") : d.style.display = "none"); if (d = Entry.engine.view_.getElementsByClassName("entryRunButtonWorkspace_w")[0]) { - Entry.objectAddable ? (d.style.top = c + 24 + "px", d.style.left = .7 * b + "px", d.style.width = .3 * b + "px") : (d.style.left = "2px", d.style.top = c + 24 + "px", d.style.width = b - 4 + "px"); + Entry.objectAddable ? (d.style.top = c + 24 + "px", d.style.left = .7 * a + "px", d.style.width = .3 * a + "px") : (d.style.left = "2px", d.style.top = c + 24 + "px", d.style.width = a - 4 + "px"); } if (d = Entry.engine.view_.getElementsByClassName("entryStopButtonWorkspace_w")[0]) { - Entry.objectAddable ? (d.style.top = c + 24 + "px", d.style.left = .7 * b + "px", d.style.width = .3 * b + "px") : (d.style.left = "2px", d.style.top = c + 24 + "px", d.style.width = b + "px"); - } - (b = a.menuWidth) ? 244 > b ? b = 244 : 400 < b && (b = 400) : b = 264; - a.menuWidth = b; - Entry.playground.blockMenuView_.style.width = b - 64 + "px"; - $(".entryBlockMenuWorkspace>svg").css({width:b - 64 + "px"}); - $(".entryBlocklyWorkspace").css({left:b + "px"}); - Entry.playground.resizeHandle_.style.left = b + "px"; - Entry.playground.variableViewWrapper_.style.width = b + "px"; - this.interfaceState = a; - } - Blockly.fireUiEvent(window, "resize"); + Entry.objectAddable ? (d.style.top = c + 24 + "px", d.style.left = .7 * a + "px", d.style.width = .3 * a + "px") : (d.style.left = "2px", d.style.top = c + 24 + "px", d.style.width = a + "px"); + } + (a = b.menuWidth) ? 244 > a ? a = 244 : 400 < a && (a = 400) : a = 264; + b.menuWidth = a; + $(".blockMenuContainer").css({width:a - 64 + "px"}); + $(".blockMenuContainer>svg").css({width:a - 64 + "px"}); + Entry.playground.mainWorkspace.blockMenu.setWidth(); + $(".entryWorkspaceBoard").css({left:a + "px"}); + Entry.playground.resizeHandle_.style.left = a + "px"; + Entry.playground.variableViewWrapper_.style.width = a + "px"; + this.interfaceState = b; + } + Entry.windowResized.notify(); }, getUpTime:function() { return (new Date).getTime() - this.startTime; -}, addActivity:function(a) { - Entry.stateManager && Entry.stateManager.addActivity(a); +}, addActivity:function(b) { + Entry.stateManager && Entry.stateManager.addActivity(b); }, startActivityLogging:function() { Entry.reporter && Entry.reporter.start(Entry.projectId, window.user ? window.user._id : null, Entry.startTime); }, getActivityLog:function() { - var a = {}; - Entry.stateManager && (a.activityLog = Entry.stateManager.activityLog_); - return a; -}, DRAG_MODE_NONE:0, DRAG_MODE_MOUSEDOWN:1, DRAG_MODE_DRAG:2, cancelObjectEdit:function(a) { - var b = Entry.playground.object; - if (b) { - var c = a.target; - a = 0 !== $(b.view_).find(c).length; + var b = {}; + Entry.stateManager && (b.activityLog = Entry.stateManager.activityLog_); + return b; +}, DRAG_MODE_NONE:0, DRAG_MODE_MOUSEDOWN:1, DRAG_MODE_DRAG:2, cancelObjectEdit:function(b) { + var a = Entry.playground.object; + if (a) { + var c = b.target; + b = 0 !== $(a.view_).find(c).length; c = c.tagName.toUpperCase(); - !b.isEditing || "INPUT" === c && a || b.editObjectValues(!1); + !a.isEditing || "INPUT" === c && b || a.editObjectValues(!1); } }}; window.Entry = Entry; Entry.Albert = {PORT_MAP:{leftWheel:0, rightWheel:0, buzzer:0, leftEye:0, rightEye:0, note:0, bodyLed:0, frontLed:0, padWidth:0, padHeight:0}, setZero:function() { - var a = Entry.Albert.PORT_MAP, b = Entry.hw.sendQueue, c; - for (c in a) { - b[c] = a[c]; + var b = Entry.Albert.PORT_MAP, a = Entry.hw.sendQueue, c; + for (c in b) { + a[c] = b[c]; } Entry.hw.update(); - a = Entry.Albert; - a.tempo = 60; - a.removeAllTimeouts(); + b = Entry.Albert; + b.tempo = 60; + b.removeAllTimeouts(); }, monitorTemplate:{imgPath:"hw/albert.png", width:387, height:503, listPorts:{oid:{name:"OID", type:"input", pos:{x:0, y:0}}, buzzer:{name:Lang.Hw.buzzer, type:"output", pos:{x:0, y:0}}, note:{name:Lang.Hw.note, type:"output", pos:{x:0, y:0}}}, ports:{leftProximity:{name:Lang.Blocks.ALBERT_sensor_leftProximity, type:"input", pos:{x:178, y:401}}, rightProximity:{name:Lang.Blocks.ALBERT_sensor_rightProximity, type:"input", pos:{x:66, y:359}}, battery:{name:Lang.Blocks.ALBERT_sensor_battery, type:"input", pos:{x:88, y:368}}, light:{name:Lang.Blocks.ALBERT_sensor_light, type:"input", pos:{x:127, y:391}}, leftWheel:{name:Lang.Hw.leftWheel, type:"output", pos:{x:299, y:406}}, rightWheel:{name:Lang.Hw.rightWheel, type:"output", pos:{x:22, y:325}}, leftEye:{name:Lang.Hw.leftEye, type:"output", pos:{x:260, y:26}}, rightEye:{name:Lang.Hw.rightEye, type:"output", pos:{x:164, y:13}}, bodyLed:{name:Lang.Hw.body + " " + Lang.Hw.led, type:"output", pos:{x:367, y:308}}, frontLed:{name:Lang.Hw.front + " " + Lang.Hw.led, -pos:{x:117, y:410}}}, mode:"both"}, tempo:60, timeouts:[], removeTimeout:function(a) { - clearTimeout(a); - var b = this.timeouts; - a = b.indexOf(a); - 0 <= a && b.splice(a, 1); +pos:{x:117, y:410}}}, mode:"both"}, tempo:60, timeouts:[], removeTimeout:function(b) { + clearTimeout(b); + var a = this.timeouts; + b = a.indexOf(b); + 0 <= b && a.splice(b, 1); }, removeAllTimeouts:function() { - var a = this.timeouts, b; - for (b in a) { - clearTimeout(a[b]); + var b = this.timeouts, a; + for (a in b) { + clearTimeout(b[a]); } this.timeouts = []; }, name:"albert"}; @@ -141,7 +142,7 @@ Blockly.Blocks.albert_hand_found = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.albert_hand_found = function(a, b) { +Entry.block.albert_hand_found = function(b, a) { var c = Entry.hw.portData; return 40 < c.leftProximity || 40 < c.rightProximity; }; @@ -152,8 +153,8 @@ Blockly.Blocks.albert_value = {init:function() { this.setInputsInline(!0); this.setOutput(!0, "Number"); }}; -Entry.block.albert_value = function(a, b) { - var c = Entry.hw.portData, d = b.getField("DEVICE"); +Entry.block.albert_value = function(b, a) { + var c = Entry.hw.portData, d = a.getField("DEVICE"); return c[d]; }; Blockly.Blocks.albert_move_forward_for_secs = {init:function() { @@ -165,29 +166,29 @@ Blockly.Blocks.albert_move_forward_for_secs = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_move_forward_for_secs = function(a, b) { +Entry.block.albert_move_forward_for_secs = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.isStart; - delete b.timeFlag; + delete a.isStart; + delete a.timeFlag; Entry.engine.isContinue = !1; c.leftWheel = 0; c.rightWheel = 0; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; + a.isStart = !0; + a.timeFlag = 1; c.leftWheel = 30; c.rightWheel = 30; - var c = 1E3 * b.getNumberValue("VALUE"), d = setTimeout(function() { - b.timeFlag = 0; + var c = 1E3 * a.getNumberValue("VALUE"), d = setTimeout(function() { + a.timeFlag = 0; Entry.Albert.removeTimeout(d); }, c); Entry.Albert.timeouts.push(d); - return b; + return a; }; Blockly.Blocks.albert_move_backward_for_secs = {init:function() { this.setColour("#00979D"); @@ -198,29 +199,29 @@ Blockly.Blocks.albert_move_backward_for_secs = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_move_backward_for_secs = function(a, b) { +Entry.block.albert_move_backward_for_secs = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.isStart; - delete b.timeFlag; + delete a.isStart; + delete a.timeFlag; Entry.engine.isContinue = !1; c.leftWheel = 0; c.rightWheel = 0; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; + a.isStart = !0; + a.timeFlag = 1; c.leftWheel = -30; c.rightWheel = -30; - var c = 1E3 * b.getNumberValue("VALUE"), d = setTimeout(function() { - b.timeFlag = 0; + var c = 1E3 * a.getNumberValue("VALUE"), d = setTimeout(function() { + a.timeFlag = 0; Entry.Albert.removeTimeout(d); }, c); Entry.Albert.timeouts.push(d); - return b; + return a; }; Blockly.Blocks.albert_turn_for_secs = {init:function() { this.setColour("#00979D"); @@ -231,28 +232,28 @@ Blockly.Blocks.albert_turn_for_secs = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_turn_for_secs = function(a, b) { +Entry.block.albert_turn_for_secs = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.isStart; - delete b.timeFlag; + delete a.isStart; + delete a.timeFlag; Entry.engine.isContinue = !1; c.leftWheel = 0; c.rightWheel = 0; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; - "LEFT" == b.getField("DIRECTION", b) ? (c.leftWheel = -30, c.rightWheel = 30) : (c.leftWheel = 30, c.rightWheel = -30); - var c = 1E3 * b.getNumberValue("VALUE"), d = setTimeout(function() { - b.timeFlag = 0; + a.isStart = !0; + a.timeFlag = 1; + "LEFT" == a.getField("DIRECTION", a) ? (c.leftWheel = -30, c.rightWheel = 30) : (c.leftWheel = 30, c.rightWheel = -30); + var c = 1E3 * a.getNumberValue("VALUE"), d = setTimeout(function() { + a.timeFlag = 0; Entry.Albert.removeTimeout(d); }, c); Entry.Albert.timeouts.push(d); - return b; + return a; }; Blockly.Blocks.albert_change_both_wheels_by = {init:function() { this.setColour("#00979D"); @@ -265,11 +266,11 @@ Blockly.Blocks.albert_change_both_wheels_by = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_change_both_wheels_by = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getNumberValue("LEFT"), e = b.getNumberValue("RIGHT"); +Entry.block.albert_change_both_wheels_by = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getNumberValue("LEFT"), e = a.getNumberValue("RIGHT"); c.leftWheel = void 0 != c.leftWheel ? c.leftWheel + d : d; c.rightWheel = void 0 != c.rightWheel ? c.rightWheel + e : e; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_set_both_wheels_to = {init:function() { this.setColour("#00979D"); @@ -282,11 +283,11 @@ Blockly.Blocks.albert_set_both_wheels_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_set_both_wheels_to = function(a, b) { +Entry.block.albert_set_both_wheels_to = function(b, a) { var c = Entry.hw.sendQueue; - c.leftWheel = b.getNumberValue("LEFT"); - c.rightWheel = b.getNumberValue("RIGHT"); - return b.callReturn(); + c.leftWheel = a.getNumberValue("LEFT"); + c.rightWheel = a.getNumberValue("RIGHT"); + return a.callReturn(); }; Blockly.Blocks.albert_change_wheel_by = {init:function() { this.setColour("#00979D"); @@ -297,10 +298,10 @@ Blockly.Blocks.albert_change_wheel_by = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_change_wheel_by = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("DIRECTION"), e = b.getNumberValue("VALUE"); +Entry.block.albert_change_wheel_by = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("DIRECTION"), e = a.getNumberValue("VALUE"); "LEFT" == d ? c.leftWheel = void 0 != c.leftWheel ? c.leftWheel + e : e : ("RIGHT" != d && (c.leftWheel = void 0 != c.leftWheel ? c.leftWheel + e : e), c.rightWheel = void 0 != c.rightWheel ? c.rightWheel + e : e); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_set_wheel_to = {init:function() { this.setColour("#00979D"); @@ -311,10 +312,10 @@ Blockly.Blocks.albert_set_wheel_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_set_wheel_to = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("DIRECTION"), e = b.getNumberValue("VALUE"); +Entry.block.albert_set_wheel_to = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("DIRECTION"), e = a.getNumberValue("VALUE"); "LEFT" == d ? c.leftWheel = e : ("RIGHT" != d && (c.leftWheel = e), c.rightWheel = e); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_stop = {init:function() { this.setColour("#00979D"); @@ -323,11 +324,11 @@ Blockly.Blocks.albert_stop = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_stop = function(a, b) { +Entry.block.albert_stop = function(b, a) { var c = Entry.hw.sendQueue; c.leftWheel = 0; c.rightWheel = 0; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_set_pad_size_to = {init:function() { this.setColour("#00979D"); @@ -340,11 +341,11 @@ Blockly.Blocks.albert_set_pad_size_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_set_pad_size_to = function(a, b) { +Entry.block.albert_set_pad_size_to = function(b, a) { var c = Entry.hw.sendQueue; - c.padWidth = b.getNumberValue("WIDTH"); - c.padHeight = b.getNumberValue("HEIGHT"); - return b.callReturn(); + c.padWidth = a.getNumberValue("WIDTH"); + c.padHeight = a.getNumberValue("HEIGHT"); + return a.callReturn(); }; Blockly.Blocks.albert_set_eye_to = {init:function() { this.setColour("#00979D"); @@ -354,10 +355,10 @@ Blockly.Blocks.albert_set_eye_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_set_eye_to = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("DIRECTION", b), e = +b.getField("COLOR", b); +Entry.block.albert_set_eye_to = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("DIRECTION", a), e = Number(a.getField("COLOR", a)); "LEFT" == d ? c.leftEye = e : ("RIGHT" != d && (c.leftEye = e), c.rightEye = e); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_clear_eye = {init:function() { this.setColour("#00979D"); @@ -366,10 +367,10 @@ Blockly.Blocks.albert_clear_eye = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_clear_eye = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("DIRECTION", b); +Entry.block.albert_clear_eye = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("DIRECTION", a); "LEFT" == d ? c.leftEye = 0 : ("RIGHT" != d && (c.leftEye = 0), c.rightEye = 0); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_body_led = {init:function() { this.setColour("#00979D"); @@ -378,10 +379,10 @@ Blockly.Blocks.albert_body_led = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_body_led = function(a, b) { +Entry.block.albert_body_led = function(b, a) { var c = Entry.hw.sendQueue; - "ON" == b.getField("STATE", b) ? c.bodyLed = 1 : c.bodyLed = 0; - return b.callReturn(); + "ON" == a.getField("STATE", a) ? c.bodyLed = 1 : c.bodyLed = 0; + return a.callReturn(); }; Blockly.Blocks.albert_front_led = {init:function() { this.setColour("#00979D"); @@ -390,10 +391,10 @@ Blockly.Blocks.albert_front_led = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_front_led = function(a, b) { +Entry.block.albert_front_led = function(b, a) { var c = Entry.hw.sendQueue; - "ON" == b.getField("STATE", b) ? c.frontLed = 1 : c.frontLed = 0; - return b.callReturn(); + "ON" == a.getField("STATE", a) ? c.frontLed = 1 : c.frontLed = 0; + return a.callReturn(); }; Blockly.Blocks.albert_beep = {init:function() { this.setColour("#00979D"); @@ -402,28 +403,28 @@ Blockly.Blocks.albert_beep = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_beep = function(a, b) { +Entry.block.albert_beep = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.isStart; - delete b.timeFlag; + delete a.isStart; + delete a.timeFlag; Entry.engine.isContinue = !1; c.buzzer = 0; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; + a.isStart = !0; + a.timeFlag = 1; c.buzzer = 440; c.note = 0; var d = setTimeout(function() { - b.timeFlag = 0; + a.timeFlag = 0; Entry.Albert.removeTimeout(d); }, 200); Entry.Albert.timeouts.push(d); - return b; + return a; }; Blockly.Blocks.albert_change_buzzer_by = {init:function() { this.setColour("#00979D"); @@ -434,11 +435,11 @@ Blockly.Blocks.albert_change_buzzer_by = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_change_buzzer_by = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getNumberValue("VALUE"); +Entry.block.albert_change_buzzer_by = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getNumberValue("VALUE"); c.buzzer = void 0 != c.buzzer ? c.buzzer + d : d; c.note = 0; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_set_buzzer_to = {init:function() { this.setColour("#00979D"); @@ -449,11 +450,11 @@ Blockly.Blocks.albert_set_buzzer_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_set_buzzer_to = function(a, b) { +Entry.block.albert_set_buzzer_to = function(b, a) { var c = Entry.hw.sendQueue; - c.buzzer = b.getNumberValue("VALUE"); + c.buzzer = a.getNumberValue("VALUE"); c.note = 0; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_clear_buzzer = {init:function() { this.setColour("#00979D"); @@ -462,11 +463,11 @@ Blockly.Blocks.albert_clear_buzzer = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_clear_buzzer = function(a, b) { +Entry.block.albert_clear_buzzer = function(b, a) { var c = Entry.hw.sendQueue; c.buzzer = 0; c.note = 0; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_play_note_for = {init:function() { this.setColour("#00979D"); @@ -478,21 +479,21 @@ Blockly.Blocks.albert_play_note_for = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_play_note_for = function(a, b) { +Entry.block.albert_play_note_for = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.isStart; - delete b.timeFlag; + delete a.isStart; + delete a.timeFlag; Entry.engine.isContinue = !1; c.note = 0; - return b.callReturn(); + return a.callReturn(); } - var d = b.getNumberField("NOTE", b), e = b.getNumberField("OCTAVE", b), f = b.getNumberValue("VALUE", b), g = Entry.Albert.tempo, f = 6E4 * f / g; - b.isStart = !0; - b.timeFlag = 1; + var d = a.getNumberField("NOTE", a), e = a.getNumberField("OCTAVE", a), f = a.getNumberValue("VALUE", a), g = Entry.Albert.tempo, f = 6E4 * f / g; + a.isStart = !0; + a.timeFlag = 1; c.buzzer = 0; c.note = d + 12 * (e - 1); if (100 < f) { @@ -503,11 +504,11 @@ Entry.block.albert_play_note_for = function(a, b) { Entry.Albert.timeouts.push(h); } var k = setTimeout(function() { - b.timeFlag = 0; + a.timeFlag = 0; Entry.Albert.removeTimeout(k); }, f); Entry.Albert.timeouts.push(k); - return b; + return a; }; Blockly.Blocks.albert_rest_for = {init:function() { this.setColour("#00979D"); @@ -518,28 +519,28 @@ Blockly.Blocks.albert_rest_for = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_rest_for = function(a, b) { +Entry.block.albert_rest_for = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.isStart; - delete b.timeFlag; + delete a.isStart; + delete a.timeFlag; Entry.engine.isContinue = !1; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; - var d = b.getNumberValue("VALUE"), d = 6E4 * d / Entry.Albert.tempo; + a.isStart = !0; + a.timeFlag = 1; + var d = a.getNumberValue("VALUE"), d = 6E4 * d / Entry.Albert.tempo; c.buzzer = 0; c.note = 0; var e = setTimeout(function() { - b.timeFlag = 0; + a.timeFlag = 0; Entry.Albert.removeTimeout(e); }, d); Entry.Albert.timeouts.push(e); - return b; + return a; }; Blockly.Blocks.albert_change_tempo_by = {init:function() { this.setColour("#00979D"); @@ -550,10 +551,10 @@ Blockly.Blocks.albert_change_tempo_by = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_change_tempo_by = function(a, b) { - Entry.Albert.tempo += b.getNumberValue("VALUE"); +Entry.block.albert_change_tempo_by = function(b, a) { + Entry.Albert.tempo += a.getNumberValue("VALUE"); 1 > Entry.Albert.tempo && (Entry.Albert.tempo = 1); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_set_tempo_to = {init:function() { this.setColour("#00979D"); @@ -564,10 +565,10 @@ Blockly.Blocks.albert_set_tempo_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_set_tempo_to = function(a, b) { - Entry.Albert.tempo = b.getNumberValue("VALUE"); +Entry.block.albert_set_tempo_to = function(b, a) { + Entry.Albert.tempo = a.getNumberValue("VALUE"); 1 > Entry.Albert.tempo && (Entry.Albert.tempo = 1); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_move_forward = {init:function() { this.setColour("#00979D"); @@ -576,27 +577,27 @@ Blockly.Blocks.albert_move_forward = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_move_forward = function(a, b) { +Entry.block.albert_move_forward = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.timeFlag; - delete b.isStart; + delete a.timeFlag; + delete a.isStart; Entry.engine.isContinue = !1; c.leftWheel = 0; c.rightWheel = 0; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; + a.isStart = !0; + a.timeFlag = 1; c.leftWheel = 30; c.rightWheel = 30; setTimeout(function() { - b.timeFlag = 0; + a.timeFlag = 0; }, 1E3); - return b; + return a; }; Blockly.Blocks.albert_move_backward = {init:function() { this.setColour("#00979D"); @@ -605,25 +606,25 @@ Blockly.Blocks.albert_move_backward = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_move_backward = function(a, b) { +Entry.block.albert_move_backward = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return c.leftWheel = -30, c.rightWheel = -30, b; + if (a.isStart) { + if (1 == a.timeFlag) { + return c.leftWheel = -30, c.rightWheel = -30, a; } - delete b.timeFlag; - delete b.isStart; + delete a.timeFlag; + delete a.isStart; Entry.engine.isContinue = !1; c.leftWheel = 0; c.rightWheel = 0; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; + a.isStart = !0; + a.timeFlag = 1; setTimeout(function() { - b.timeFlag = 0; + a.timeFlag = 0; }, 1E3); - return b; + return a; }; Blockly.Blocks.albert_turn_around = {init:function() { this.setColour("#00979D"); @@ -632,30 +633,30 @@ Blockly.Blocks.albert_turn_around = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_turn_around = function(a, b) { +Entry.block.albert_turn_around = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return c.leftWheel = b.leftValue, c.rightWheel = b.rightValue, b; + if (a.isStart) { + if (1 == a.timeFlag) { + return c.leftWheel = a.leftValue, c.rightWheel = a.rightValue, a; } - delete b.timeFlag; - delete b.isStart; - delete b.leftValue; - delete b.rightValue; + delete a.timeFlag; + delete a.isStart; + delete a.leftValue; + delete a.rightValue; Entry.engine.isContinue = !1; c.leftWheel = 0; c.rightWheel = 0; - return b.callReturn(); + return a.callReturn(); } - c = "LEFT" == b.getField("DIRECTION", b); - b.leftValue = c ? -30 : 30; - b.rightValue = c ? 30 : -30; - b.isStart = !0; - b.timeFlag = 1; + c = "LEFT" == a.getField("DIRECTION", a); + a.leftValue = c ? -30 : 30; + a.rightValue = c ? 30 : -30; + a.isStart = !0; + a.timeFlag = 1; setTimeout(function() { - b.timeFlag = 0; + a.timeFlag = 0; }, 1E3); - return b; + return a; }; Blockly.Blocks.albert_set_led_to = {init:function() { this.setColour("#00979D"); @@ -665,10 +666,10 @@ Blockly.Blocks.albert_set_led_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_set_led_to = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("DIRECTION", b), e = +b.getField("COLOR", b); +Entry.block.albert_set_led_to = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("DIRECTION", a), e = Number(a.getField("COLOR", a)); "FRONT" == d ? (c.leftEye = e, c.rightEye = e) : "LEFT" == d ? c.leftEye = e : c.rightEye = e; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_clear_led = {init:function() { this.setColour("#00979D"); @@ -677,10 +678,10 @@ Blockly.Blocks.albert_clear_led = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_clear_led = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("DIRECTION", b); +Entry.block.albert_clear_led = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("DIRECTION", a); "FRONT" == d ? (c.leftEye = 0, c.rightEye = 0) : "LEFT" == d ? c.leftEye = 0 : c.rightEye = 0; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_change_wheels_by = {init:function() { this.setColour("#00979D"); @@ -691,10 +692,10 @@ Blockly.Blocks.albert_change_wheels_by = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_change_wheels_by = function(a, b) { - var c = Entry.hw.sendQueue, d = Entry.hw.portData, e = b.getField("DIRECTION"), f = b.getNumberValue("VALUE"); +Entry.block.albert_change_wheels_by = function(b, a) { + var c = Entry.hw.sendQueue, d = Entry.hw.portData, e = a.getField("DIRECTION"), f = a.getNumberValue("VALUE"); "LEFT" == e ? c.leftWheel = void 0 != c.leftWheel ? c.leftWheel + f : d.leftWheel + f : ("RIGHT" != e && (c.leftWheel = void 0 != c.leftWheel ? c.leftWheel + f : d.leftWheel + f), c.rightWheel = void 0 != c.rightWheel ? c.rightWheel + f : d.rightWheel + f); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.albert_set_wheels_to = {init:function() { this.setColour("#00979D"); @@ -705,15 +706,15 @@ Blockly.Blocks.albert_set_wheels_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.albert_set_wheels_to = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("DIRECTION"), e = b.getNumberValue("VALUE"); +Entry.block.albert_set_wheels_to = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("DIRECTION"), e = a.getNumberValue("VALUE"); "LEFT" == d ? c.leftWheel = e : ("RIGHT" != d && (c.leftWheel = e), c.rightWheel = e); - return b.callReturn(); + return a.callReturn(); }; Entry.Arduino = {name:"arduino", setZero:function() { Entry.hw.sendQueue.readablePorts = []; - for (var a = 0;20 > a;a++) { - Entry.hw.sendQueue[a] = 0, Entry.hw.sendQueue.readablePorts.push(a); + for (var b = 0;20 > b;b++) { + Entry.hw.sendQueue[b] = 0, Entry.hw.sendQueue.readablePorts.push(b); } Entry.hw.update(); }, monitorTemplate:{imgPath:"hw/arduino.png", width:605, height:434, listPorts:{2:{name:Lang.Hw.port_en + " 2 " + Lang.Hw.port_ko, type:"input", pos:{x:0, y:0}}, 3:{name:Lang.Hw.port_en + " 3 " + Lang.Hw.port_ko, type:"input", pos:{x:0, y:0}}, 4:{name:Lang.Hw.port_en + " 4 " + Lang.Hw.port_ko, type:"input", pos:{x:0, y:0}}, 5:{name:Lang.Hw.port_en + " 5 " + Lang.Hw.port_ko, type:"input", pos:{x:0, y:0}}, 6:{name:Lang.Hw.port_en + " 6 " + Lang.Hw.port_ko, type:"input", pos:{x:0, y:0}}, 7:{name:Lang.Hw.port_en + @@ -733,8 +734,8 @@ Blockly.Blocks.arduino_text = {init:function() { this.setOutput(!0, "String"); this.setInputsInline(!0); }}; -Entry.block.arduino_text = function(a, b) { - return b.getStringField("NAME"); +Entry.block.arduino_text = function(b, a) { + return a.getStringField("NAME"); }; Blockly.Blocks.arduino_send = {init:function() { this.setColour("#00979D"); @@ -745,12 +746,12 @@ Blockly.Blocks.arduino_send = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.arduino_send = function(a, b) { - var c = b.getValue("VALUE", b), d = new XMLHttpRequest; +Entry.block.arduino_send = function(b, a) { + var c = a.getValue("VALUE", a), d = new XMLHttpRequest; d.open("POST", "http://localhost:23518/arduino/", !1); d.send(String(c)); Entry.assert(200 == d.status, "arduino is not connected"); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.arduino_get_string = {init:function() { this.setColour("#00979D"); @@ -760,12 +761,12 @@ Blockly.Blocks.arduino_get_string = {init:function() { this.setOutput(!0, "String"); this.setInputsInline(!0); }}; -Entry.block.arduino_get_number = function(a, b) { - var c = b.getValue("VALUE", b), d = new XMLHttpRequest; +Entry.block.arduino_get_number = function(b, a) { + var c = a.getValue("VALUE", a), d = new XMLHttpRequest; d.open("POST", "http://localhost:23518/arduino/", !1); d.send(String(c)); Entry.assert(200 == d.status, "arduino is not connected"); - return +d.responseText; + return Number(d.responseText); }; Blockly.Blocks.arduino_get_number = {init:function() { this.setColour("#00979D"); @@ -775,8 +776,8 @@ Blockly.Blocks.arduino_get_number = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.arduino_get_string = function(a, b) { - var c = b.getValue("VALUE", b), d = new XMLHttpRequest; +Entry.block.arduino_get_string = function(b, a) { + var c = a.getValue("VALUE", a), d = new XMLHttpRequest; d.open("POST", "http://localhost:23518/arduino/", !1); d.send(String(c)); Entry.assert(200 == d.status, "arduino is not connected"); @@ -789,8 +790,8 @@ Blockly.Blocks.arduino_get_sensor_number = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.arduino_get_sensor_number = function(a, b) { - return b.getStringField("PORT"); +Entry.block.arduino_get_sensor_number = function(b, a) { + return a.getStringField("PORT"); }; Blockly.Blocks.arduino_get_port_number = {init:function() { this.setColour("#00979D"); @@ -799,8 +800,8 @@ Blockly.Blocks.arduino_get_port_number = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.arduino_get_port_number = function(a, b) { - return b.getStringField("PORT"); +Entry.block.arduino_get_port_number = function(b, a) { + return a.getStringField("PORT"); }; Blockly.Blocks.arduino_get_pwm_port_number = {init:function() { this.setColour("#00979D"); @@ -809,8 +810,8 @@ Blockly.Blocks.arduino_get_pwm_port_number = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.arduino_get_pwm_port_number = function(a, b) { - return b.getStringField("PORT"); +Entry.block.arduino_get_pwm_port_number = function(b, a) { + return a.getStringField("PORT"); }; Blockly.Blocks.arduino_get_number_sensor_value = {init:function() { this.setColour("#00979D"); @@ -820,8 +821,8 @@ Blockly.Blocks.arduino_get_number_sensor_value = {init:function() { this.setInputsInline(!0); this.setOutput(!0, "Number"); }}; -Entry.block.arduino_get_number_sensor_value = function(a, b) { - var c = b.getValue("VALUE", b); +Entry.block.arduino_get_number_sensor_value = function(b, a) { + var c = a.getValue("VALUE", a); return Entry.hw.getAnalogPortValue(c[1]); }; Blockly.Blocks.arduino_get_digital_value = {init:function() { @@ -832,8 +833,8 @@ Blockly.Blocks.arduino_get_digital_value = {init:function() { this.setInputsInline(!0); this.setOutput(!0, "Boolean"); }}; -Entry.block.arduino_get_digital_value = function(a, b) { - var c = b.getNumberValue("VALUE", b); +Entry.block.arduino_get_digital_value = function(b, a) { + var c = a.getNumberValue("VALUE", a); return Entry.hw.getDigitalPortValue(c); }; Blockly.Blocks.arduino_toggle_led = {init:function() { @@ -846,10 +847,10 @@ Blockly.Blocks.arduino_toggle_led = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.arduino_toggle_led = function(a, b) { - var c = b.getNumberValue("VALUE"), d = "on" == b.getField("OPERATOR") ? 255 : 0; - Entry.hw.setDigitalPortValue(c, d); - return b.callReturn(); +Entry.block.arduino_toggle_led = function(b, a) { + var c = a.getNumberValue("VALUE"), d = a.getField("OPERATOR"); + Entry.hw.setDigitalPortValue(c, "on" == d ? 255 : 0); + return a.callReturn(); }; Blockly.Blocks.arduino_toggle_pwm = {init:function() { this.setColour("#00979D"); @@ -863,10 +864,10 @@ Blockly.Blocks.arduino_toggle_pwm = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.arduino_toggle_pwm = function(a, b) { - var c = b.getNumberValue("PORT"), d = b.getNumberValue("VALUE"), d = Math.round(d), d = Math.max(d, 0), d = Math.min(d, 255); +Entry.block.arduino_toggle_pwm = function(b, a) { + var c = a.getNumberValue("PORT"), d = a.getNumberValue("VALUE"), d = Math.round(d), d = Math.max(d, 0), d = Math.min(d, 255); Entry.hw.setDigitalPortValue(c, d); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.arduino_convert_scale = {init:function() { this.setColour("#00979D"); @@ -885,8 +886,8 @@ Blockly.Blocks.arduino_convert_scale = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.arduino_convert_scale = function(a, b) { - var c = b.getNumberValue("VALUE1", b), d = b.getNumberValue("VALUE2", b), e = b.getNumberValue("VALUE3", b), f = b.getNumberValue("VALUE4", b), g = b.getNumberValue("VALUE5", b); +Entry.block.arduino_convert_scale = function(b, a) { + var c = a.getNumberValue("VALUE1", a), d = a.getNumberValue("VALUE2", a), e = a.getNumberValue("VALUE3", a), f = a.getNumberValue("VALUE4", a), g = a.getNumberValue("VALUE5", a); if (d > e) { var h = d, d = e, e = h } @@ -904,8 +905,8 @@ Blockly.Blocks.sensorBoard_get_named_sensor_value = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.sensorBoard_get_named_sensor_value = function(a, b) { - return Entry.hw.getAnalogPortValue(b.getField("PORT", b)); +Entry.block.sensorBoard_get_named_sensor_value = function(b, a) { + return Entry.hw.getAnalogPortValue(a.getField("PORT", a)); }; Blockly.Blocks.sensorBoard_is_button_pressed = {init:function() { this.setColour("#00979D"); @@ -914,8 +915,8 @@ Blockly.Blocks.sensorBoard_is_button_pressed = {init:function() { this.setInputsInline(!0); this.setOutput(!0, "Boolean"); }}; -Entry.block.sensorBoard_is_button_pressed = function(a, b) { - return Entry.hw.getDigitalPortValue(b.getNumberField("PORT", b)); +Entry.block.sensorBoard_is_button_pressed = function(b, a) { + return Entry.hw.getDigitalPortValue(a.getNumberField("PORT", a)); }; Blockly.Blocks.sensorBoard_led = {init:function() { this.setColour("#00979D"); @@ -924,10 +925,26 @@ Blockly.Blocks.sensorBoard_led = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.sensorBoard_led = function(a, b) { - Entry.hw.setDigitalPortValue(b.getField("PORT"), b.getNumberField("OPERATOR")); - return b.callReturn(); -}; +Entry.block.sensorBoard_led = function(b, a) { + Entry.hw.setDigitalPortValue(a.getField("PORT"), a.getNumberField("OPERATOR")); + return a.callReturn(); +}; +Entry.block.arduino_download_connector = {skeleton:"basic_button", color:"#eee", template:"%1", params:[{type:"Text", text:"\uc5f0\uacb0 \ud504\ub85c\uadf8\ub7a8 \ub2e4\uc6b4\ub85c\ub4dc", color:"#333", align:"center"}], func:function() { +}, events:{mousedown:[function() { + console.log("download connector"); +}]}}; +Entry.block.arduino_download_source = {skeleton:"basic_button", color:"#eee", template:"%1", params:[{type:"Text", text:"\uc5d4\ud2b8\ub9ac \uc544\ub450\uc774\ub178 \uc18c\uc2a4", color:"#333", align:"center"}], func:function() { +}, events:{mousedown:[function() { + console.log("download source"); +}]}}; +Entry.block.arduino_connected = {skeleton:"basic_button", color:"#eee", template:"%1", params:[{type:"Text", text:"\uc5f0\uacb0 \ub428", color:"#333", align:"center"}], func:function() { +}, events:{mousedown:[function() { + console.log("download source"); +}]}}; +Entry.block.arduino_reconnect = {skeleton:"basic_button", color:"#eee", template:"%1", params:[{type:"Text", text:"\ub2e4\uc2dc \uc5f0\uacb0\ud558\uae30", color:"#333", align:"center"}], func:function() { +}, events:{mousedown:[function() { + console.log("download source"); +}]}}; Blockly.Blocks.CODEino_get_sensor_number = {init:function() { this.setColour("#00979D"); this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.CODEino_get_sensor_number_0, "A0"], [Lang.Blocks.CODEino_get_sensor_number_1, "A1"], [Lang.Blocks.CODEino_get_sensor_number_2, "A2"], [Lang.Blocks.CODEino_get_sensor_number_3, "A3"], [Lang.Blocks.CODEino_get_sensor_number_4, "A4"], [Lang.Blocks.CODEino_get_sensor_number_5, "A5"], [Lang.Blocks.CODEino_get_sensor_number_6, "A6"]]), "PORT"); @@ -935,8 +952,8 @@ Blockly.Blocks.CODEino_get_sensor_number = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.CODEino_get_sensor_number = function(a, b) { - return b.getStringField("PORT"); +Entry.block.CODEino_get_sensor_number = function(b, a) { + return a.getStringField("PORT"); }; Blockly.Blocks.CODEino_get_named_sensor_value = {init:function() { this.setColour("#00979D"); @@ -944,8 +961,8 @@ Blockly.Blocks.CODEino_get_named_sensor_value = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.CODEino_get_named_sensor_value = function(a, b) { - return Entry.hw.getAnalogPortValue(b.getField("PORT", b)); +Entry.block.CODEino_get_named_sensor_value = function(b, a) { + return Entry.hw.getAnalogPortValue(a.getField("PORT", a)); }; Blockly.Blocks.CODEino_get_sound_status = {init:function() { this.setColour("#00979D"); @@ -953,8 +970,8 @@ Blockly.Blocks.CODEino_get_sound_status = {init:function() { this.setInputsInline(!0); this.setOutput(!0, "Boolean"); }}; -Entry.block.CODEino_get_sound_status = function(a, b) { - return "GREAT" == b.getField("STATUS", b) ? 600 < Entry.hw.getAnalogPortValue(0) ? 1 : 0 : 600 > Entry.hw.getAnalogPortValue(0) ? 1 : 0; +Entry.block.CODEino_get_sound_status = function(b, a) { + return "GREAT" == a.getField("STATUS", a) ? 600 < Entry.hw.getAnalogPortValue(0) ? 1 : 0 : 600 > Entry.hw.getAnalogPortValue(0) ? 1 : 0; }; Blockly.Blocks.CODEino_get_light_status = {init:function() { this.setColour("#00979D"); @@ -962,8 +979,8 @@ Blockly.Blocks.CODEino_get_light_status = {init:function() { this.setInputsInline(!0); this.setOutput(!0, "Boolean"); }}; -Entry.block.CODEino_get_light_status = function(a, b) { - return "DARK" == b.getField("STATUS", b) ? 800 < Entry.hw.getAnalogPortValue(1) ? 1 : 0 : 800 > Entry.hw.getAnalogPortValue(1) ? 1 : 0; +Entry.block.CODEino_get_light_status = function(b, a) { + return "DARK" == a.getField("STATUS", a) ? 800 < Entry.hw.getAnalogPortValue(1) ? 1 : 0 : 800 > Entry.hw.getAnalogPortValue(1) ? 1 : 0; }; Blockly.Blocks.CODEino_is_button_pressed = {init:function() { this.setColour("#00979D"); @@ -971,8 +988,8 @@ Blockly.Blocks.CODEino_is_button_pressed = {init:function() { this.setInputsInline(!0); this.setOutput(!0, "Boolean"); }}; -Entry.block.CODEino_is_button_pressed = function(a, b) { - var c = b.getNumberField("PORT", b); +Entry.block.CODEino_is_button_pressed = function(b, a) { + var c = a.getNumberField("PORT", a); return 14 < c ? !Entry.hw.getAnalogPortValue(c - 14) : !Entry.hw.getDigitalPortValue(c); }; Blockly.Blocks.CODEino_get_accelerometer_direction = {init:function() { @@ -982,8 +999,8 @@ Blockly.Blocks.CODEino_get_accelerometer_direction = {init:function() { this.setInputsInline(!0); this.setOutput(!0, "Boolean"); }}; -Entry.block.CODEino_get_accelerometer_direction = function(a, b) { - var c = b.getField("DIRECTION", b), d = 0; +Entry.block.CODEino_get_accelerometer_direction = function(b, a) { + var c = a.getField("DIRECTION", a), d = 0; "LEFT" == c || "RIGHT" == c ? d = 3 : "FRONT" == c || "REAR" == c ? d = 4 : "REVERSE" == c && (d = 5); d = Entry.hw.getAnalogPortValue(d); d = 180 / 137 * (d - 265); @@ -1007,8 +1024,8 @@ Blockly.Blocks.CODEino_get_accelerometer_value = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.CODEino_get_accelerometer_value = function(a, b) { - var c = 265, d = 402, e = -90, f = 90, g = Entry.hw.getAnalogPortValue(b.getField("PORT", b)); +Entry.block.CODEino_get_accelerometer_value = function(b, a) { + var c = 265, d = 402, e = -90, f = 90, g = Entry.hw.getAnalogPortValue(a.getField("PORT", a)); if (c > d) { var h = c, c = d, d = h } @@ -1019,34 +1036,151 @@ Entry.block.CODEino_get_accelerometer_value = function(a, b) { g = Math.max(e, g); return Math.round(g); }; +Blockly.Blocks.dplay_select_led = {init:function() { + this.setColour("#00979D"); + this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_num_pin_1); + this.appendDummyInput().appendField(new Blockly.FieldDropdown([["7", "7"], ["8", "8"], ["9", "9"], ["10", "10"]]), "PORT"); + this.appendDummyInput().appendField(Lang.Blocks.dplay_num_pin_1); + this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.ARDUINO_on, "on"], [Lang.Blocks.ARDUINO_off, "off"]]), "OPERATOR").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.setInputsInline(!0); + this.setPreviousStatement(!0); + this.setNextStatement(!0); +}}; +Entry.block.dplay_select_led = function(b, a) { + var c = a.getField("PORT"), d = 7; + "7" == c ? d = 7 : "8" == c ? d = 8 : "9" == c ? d = 9 : "10" == c && (d = 10); + c = a.getField("OPERATOR"); + Entry.hw.setDigitalPortValue(d, "on" == c ? 255 : 0); + return a.callReturn(); +}; +Blockly.Blocks.dplay_get_switch_status = {init:function() { + this.setColour("#00979D"); + this.appendDummyInput().appendField("\ub514\uc9c0\ud138 "); + this.appendDummyInput().appendField(new Blockly.FieldDropdown([["2", "2"], ["4", "4"]]), "PORT"); + this.appendDummyInput().appendField(Lang.Blocks.dplay_num_pin_2).appendField(new Blockly.FieldDropdown([[Lang.Blocks.dplay_string_5, "ON"], [Lang.Blocks.dplay_string_6, "OFF"]]), "STATUS").appendField(" "); + this.setInputsInline(!0); + this.setOutput(!0, "Boolean"); +}}; +Entry.block.dplay_get_switch_status = function(b, a) { + var c = a.getField("PORT"), d = 2; + "2" == c ? d = 2 : "4" == c && (d = 4); + return "OFF" == a.getField("STATUS") ? 1 == Entry.hw.getDigitalPortValue(d) ? 1 : 0 : 0 == Entry.hw.getDigitalPortValue(d) ? 1 : 0; +}; +Blockly.Blocks.dplay_get_light_status = {init:function() { + this.setColour("#00979D"); + this.appendDummyInput().appendField(Lang.Blocks.dplay_light).appendField(new Blockly.FieldDropdown([[Lang.Blocks.dplay_string_3, "BRIGHT"], [Lang.Blocks.dplay_string_4, "DARK"]]), "STATUS").appendField(" "); + this.setInputsInline(!0); + this.setOutput(!0, "Boolean"); +}}; +Entry.block.dplay_get_light_status = function(b, a) { + return "DARK" == a.getField("STATUS", a) ? 800 < Entry.hw.getAnalogPortValue(1) ? 1 : 0 : 800 > Entry.hw.getAnalogPortValue(1) ? 1 : 0; +}; +Blockly.Blocks.dplay_get_value = {init:function() { + this.setColour("#00979D"); + this.appendDummyInput().appendField(Lang.Blocks.dplay_num_pin_3); + this.appendValueInput("VALUE").setCheck(["Number", "String", null]); + this.appendDummyInput().appendField("\ubc88 "); + this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\uac00\ubcc0\uc800\ud56d", "ADJU"], ["\ube5b\uc13c\uc11c", "LIGHT"], ["\uc628\ub3c4\uc13c\uc11c", "TEMP"], ["\uc870\uc774\uc2a4\ud2f1 X", "JOYS"], ["\uc870\uc774\uc2a4\ud2f1 Y", "JOYS"], ["\uc801\uc678\uc120", "INFR"]]), "OPERATOR"); + this.appendDummyInput().appendField(Lang.Blocks.dplay_num_pin_5); + this.setInputsInline(!0); + this.setOutput(!0, "Number"); +}}; +Entry.block.dplay_get_value = function(b, a) { + var c = a.getValue("VALUE", a); + return Entry.hw.getAnalogPortValue(c[1]); +}; +Blockly.Blocks.dplay_get_tilt = {init:function() { + this.setColour("#00979D"); + this.appendDummyInput().appendField(Lang.Blocks.dplay_tilt).appendField(new Blockly.FieldDropdown([["\uc67c\ucabd \uae30\uc6b8\uc784", "LEFT"], ["\uc624\ub978\ucabd \uae30\uc6b8\uc784", "LIGHT"]]), "STATUS").appendField(" "); + this.setInputsInline(!0); + this.setOutput(!0, "Boolean"); +}}; +Entry.block.dplay_get_tilt = function(b, a) { + return "LIGHT" == a.getField("STATUS", a) ? 1 == Entry.hw.getDigitalPortValue(12) ? 1 : 0 : 0 == Entry.hw.getDigitalPortValue(12) ? 1 : 0; +}; +Blockly.Blocks.dplay_DCmotor = {init:function() { + this.setColour("#00979D"); + this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\uc67c\ucabd", "3"], ["\uc624\ub978\ucabd", "6"]]), "PORT"); + this.appendDummyInput().appendField(" DC\ubaa8\ud130 \uc0c1\ud0dc\ub97c"); + this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\uc815\ubc29\ud5a5", "FRONT"], ["\uc5ed\ubc29\ud5a5", "REAR"], ["\uc815\uc9c0", "OFF"]]), "OPERATOR").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.setInputsInline(!0); + this.setPreviousStatement(!0); + this.setNextStatement(!0); +}}; +Entry.block.dplay_DCmotor = function(b, a) { + var c = a.getField("PORT"), d = 0; + "3" == c && (d = 5); + var e = a.getField("OPERATOR"), f = 0, g = 0; + "FRONT" == e ? (f = 255, g = 0) : "REAR" == e ? (f = 0, g = 255) : "OFF" == e && (g = f = 0); + Entry.hw.setDigitalPortValue(c, f); + Entry.hw.setDigitalPortValue(d, g); + return a.callReturn(); +}; +Blockly.Blocks.dplay_buzzer = {init:function() { + this.setColour("#00979D"); + this.appendDummyInput().appendField("\ubd80\uc800\ub97c "); + this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\ub3c4", "1"], ["\ub808", "2"], ["\ubbf8", "3"]]), "PORT"); + this.appendDummyInput().appendField("\ub85c"); + this.appendValueInput("VALUE").setCheck(["Number", "String", null]); + this.appendDummyInput().appendField("\ubc15\uc790\ub85c \uc5f0\uc8fc\ud558\uae30"); + this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.setInputsInline(!0); + this.setPreviousStatement(!0); + this.setNextStatement(!0); +}}; +Entry.block.dplay_buzzer = function(b, a) { + var c = a.getField("PORT"), d = 2; + "1" == c ? d = 2 : "2" == c ? d = 4 : "3" == c && (d = 7); + c = a.getNumberValue("VALUE"); + c = Math.round(c); + c = Math.max(c, 0); + c = Math.min(c, 100); + Entry.hw.setDigitalPortValue(d, c); + return a.callReturn(); +}; +Blockly.Blocks.dplay_servo = {init:function() { + this.setColour("#00979D"); + this.appendDummyInput().appendField("\uc11c\ubcf4\ubaa8\ud130 \uac01\ub3c4\ub97c"); + this.appendValueInput("VALUE").setCheck(["Number", "String"]); + this.appendDummyInput().appendField("\ub85c \uc774\ub3d9"); + this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.setInputsInline(!0); + this.setPreviousStatement(!0); + this.setNextStatement(!0); +}}; +Entry.block.dplay_servo = function(b, a) { + var c = a.getNumberValue("VALUE"), c = Math.round(c), c = Math.max(c, 0), c = Math.min(c, 180); + Entry.hw.setDigitalPortValue(9, c); + return a.callReturn(); +}; Entry.Bitbrick = {SENSOR_MAP:{1:"light", 2:"IR", 3:"touch", 4:"potentiometer", 5:"MIC", 21:"UserSensor", 11:"USER INPUT", 20:"LED", 19:"SERVO", 18:"DC"}, PORT_MAP:{buzzer:2, 5:4, 6:6, 7:8, 8:10, LEDR:12, LEDG:14, LEDB:16}, sensorList:function() { - for (var a = [], b = Entry.hw.portData, c = 1;5 > c;c++) { - var d = b[c]; - d && (d.value || 0 === d.value) && a.push([c + " - " + Lang.Blocks["BITBRICK_" + d.type], c.toString()]); + for (var b = [], a = Entry.hw.portData, c = 1;5 > c;c++) { + var d = a[c]; + d && (d.value || 0 === d.value) && b.push([c + " - " + Lang.Blocks["BITBRICK_" + d.type], c.toString()]); } - return 0 == a.length ? [[Lang.Blocks.no_target, "null"]] : a; + return 0 == b.length ? [[Lang.Blocks.no_target, "null"]] : b; }, touchList:function() { - for (var a = [], b = Entry.hw.portData, c = 1;5 > c;c++) { - var d = b[c]; - d && "touch" === d.type && a.push([c.toString(), c.toString()]); + for (var b = [], a = Entry.hw.portData, c = 1;5 > c;c++) { + var d = a[c]; + d && "touch" === d.type && b.push([c.toString(), c.toString()]); } - return 0 == a.length ? [[Lang.Blocks.no_target, "null"]] : a; + return 0 == b.length ? [[Lang.Blocks.no_target, "null"]] : b; }, servoList:function() { - for (var a = [], b = Entry.hw.portData, c = 5;9 > c;c++) { - var d = b[c]; - d && "SERVO" === d.type && a.push(["ABCD"[c - 5], c.toString()]); + for (var b = [], a = Entry.hw.portData, c = 5;9 > c;c++) { + var d = a[c]; + d && "SERVO" === d.type && b.push(["ABCD"[c - 5], c.toString()]); } - return 0 == a.length ? [[Lang.Blocks.no_target, "null"]] : a; + return 0 == b.length ? [[Lang.Blocks.no_target, "null"]] : b; }, dcList:function() { - for (var a = [], b = Entry.hw.portData, c = 5;9 > c;c++) { - var d = b[c]; - d && "DC" === d.type && a.push(["ABCD"[c - 5], c.toString()]); + for (var b = [], a = Entry.hw.portData, c = 5;9 > c;c++) { + var d = a[c]; + d && "DC" === d.type && b.push(["ABCD"[c - 5], c.toString()]); } - return 0 == a.length ? [[Lang.Blocks.no_target, "null"]] : a; + return 0 == b.length ? [[Lang.Blocks.no_target, "null"]] : b; }, setZero:function() { - var a = Entry.hw.sendQueue, b; - for (b in Entry.Bitbrick.PORT_MAP) { - a[b] = 0; + var b = Entry.hw.sendQueue, a; + for (a in Entry.Bitbrick.PORT_MAP) { + b[a] = 0; } Entry.hw.update(); }, name:"bitbrick", servoMaxValue:181, servoMinValue:1, dcMaxValue:100, dcMinValue:-100, monitorTemplate:{imgPath:"hw/bitbrick.png", width:400, height:400, listPorts:{1:{name:Lang.Hw.port_en + " 1 " + Lang.Hw.port_ko, type:"input", pos:{x:0, y:0}}, 2:{name:Lang.Hw.port_en + " 2 " + Lang.Hw.port_ko, type:"input", pos:{x:0, y:0}}, 3:{name:Lang.Hw.port_en + " 3 " + Lang.Hw.port_ko, type:"input", pos:{x:0, y:0}}, 4:{name:Lang.Hw.port_en + " 4 " + Lang.Hw.port_ko, type:"input", pos:{x:0, y:0}}, A:{name:Lang.Hw.port_en + @@ -1057,8 +1191,8 @@ Blockly.Blocks.bitbrick_sensor_value = {init:function() { this.setOutput(!0, "String"); this.setInputsInline(!0); }}; -Entry.block.bitbrick_sensor_value = function(a, b) { - var c = b.getStringField("PORT"); +Entry.block.bitbrick_sensor_value = function(b, a) { + var c = a.getStringField("PORT"); return Entry.hw.portData[c].value; }; Blockly.Blocks.bitbrick_is_touch_pressed = {init:function() { @@ -1067,8 +1201,8 @@ Blockly.Blocks.bitbrick_is_touch_pressed = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.bitbrick_is_touch_pressed = function(a, b) { - return 0 === Entry.hw.portData[b.getStringField("PORT")].value; +Entry.block.bitbrick_is_touch_pressed = function(b, a) { + return 0 === Entry.hw.portData[a.getStringField("PORT")].value; }; Blockly.Blocks.bitbrick_turn_off_color_led = {init:function() { this.setColour("#00979D"); @@ -1077,11 +1211,11 @@ Blockly.Blocks.bitbrick_turn_off_color_led = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.bitbrick_turn_off_color_led = function(a, b) { +Entry.block.bitbrick_turn_off_color_led = function(b, a) { Entry.hw.sendQueue.LEDR = 0; Entry.hw.sendQueue.LEDG = 0; Entry.hw.sendQueue.LEDB = 0; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.bitbrick_turn_on_color_led_by_rgb = {init:function() { this.setColour("#00979D"); @@ -1096,12 +1230,12 @@ Blockly.Blocks.bitbrick_turn_on_color_led_by_rgb = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.bitbrick_turn_on_color_led_by_rgb = function(a, b) { - var c = b.getNumberValue("rValue"), d = b.getNumberValue("gValue"), e = b.getNumberValue("bValue"), f = Entry.adjustValueWithMaxMin, g = Entry.hw.sendQueue; +Entry.block.bitbrick_turn_on_color_led_by_rgb = function(b, a) { + var c = a.getNumberValue("rValue"), d = a.getNumberValue("gValue"), e = a.getNumberValue("bValue"), f = Entry.adjustValueWithMaxMin, g = Entry.hw.sendQueue; g.LEDR = f(c, 0, 255); g.LEDG = f(d, 0, 255); g.LEDB = f(e, 0, 255); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.bitbrick_turn_on_color_led_by_picker = {init:function() { this.setColour("#00979D"); @@ -1110,12 +1244,12 @@ Blockly.Blocks.bitbrick_turn_on_color_led_by_picker = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.bitbrick_turn_on_color_led_by_picker = function(a, b) { - var c = b.getStringField("VALUE"); +Entry.block.bitbrick_turn_on_color_led_by_picker = function(b, a) { + var c = a.getStringField("VALUE"); Entry.hw.sendQueue.LEDR = parseInt(c.substr(1, 2), 16); Entry.hw.sendQueue.LEDG = parseInt(c.substr(3, 2), 16); Entry.hw.sendQueue.LEDB = parseInt(c.substr(5, 2), 16); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.bitbrick_turn_on_color_led_by_value = {init:function() { this.setColour("#00979D"); @@ -1126,13 +1260,13 @@ Blockly.Blocks.bitbrick_turn_on_color_led_by_value = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.bitbrick_turn_on_color_led_by_value = function(a, b) { - var c = b.getNumberValue("VALUE"), d, e, f, c = c % 200; +Entry.block.bitbrick_turn_on_color_led_by_value = function(b, a) { + var c = a.getNumberValue("VALUE"), d, e, f, c = c % 200; 67 > c ? (d = 200 - 3 * c, e = 3 * c, f = 0) : 134 > c ? (c -= 67, d = 0, e = 200 - 3 * c, f = 3 * c) : 201 > c && (c -= 134, d = 3 * c, e = 0, f = 200 - 3 * c); Entry.hw.sendQueue.LEDR = d; Entry.hw.sendQueue.LEDG = e; Entry.hw.sendQueue.LEDB = f; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.bitbrick_buzzer = {init:function() { this.setColour("#00979D"); @@ -1143,14 +1277,14 @@ Blockly.Blocks.bitbrick_buzzer = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.bitbrick_buzzer = function(a, b) { - if (b.isStart) { - return Entry.hw.sendQueue.buzzer = 0, delete b.isStart, b.callReturn(); +Entry.block.bitbrick_buzzer = function(b, a) { + if (a.isStart) { + return Entry.hw.sendQueue.buzzer = 0, delete a.isStart, a.callReturn(); } - var c = b.getNumberValue("VALUE"); + var c = a.getNumberValue("VALUE"); Entry.hw.sendQueue.buzzer = c; - b.isStart = !0; - return b; + a.isStart = !0; + return a; }; Blockly.Blocks.bitbrick_turn_off_all_motors = {init:function() { this.setColour("#00979D"); @@ -1159,15 +1293,15 @@ Blockly.Blocks.bitbrick_turn_off_all_motors = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.bitbrick_turn_off_all_motors = function(a, b) { +Entry.block.bitbrick_turn_off_all_motors = function(b, a) { var c = Entry.hw.sendQueue, d = Entry.Bitbrick; - d.servoList().map(function(b) { - c[b[1]] = 0; + d.servoList().map(function(a) { + c[a[1]] = 0; }); - d.dcList().map(function(b) { - c[b[1]] = 128; + d.dcList().map(function(a) { + c[a[1]] = 128; }); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.bitbrick_dc_speed = {init:function() { this.setColour("#00979D"); @@ -1178,10 +1312,10 @@ Blockly.Blocks.bitbrick_dc_speed = {init:function() { this.setNextStatement(!0); this.setInputsInline(!0); }}; -Entry.block.bitbrick_dc_speed = function(a, b) { - var c = b.getNumberValue("VALUE"), c = Math.min(c, Entry.Bitbrick.dcMaxValue), c = Math.max(c, Entry.Bitbrick.dcMinValue); - Entry.hw.sendQueue[b.getStringField("PORT")] = c + 128; - return b.callReturn(); +Entry.block.bitbrick_dc_speed = function(b, a) { + var c = a.getNumberValue("VALUE"), c = Math.min(c, Entry.Bitbrick.dcMaxValue), c = Math.max(c, Entry.Bitbrick.dcMinValue); + Entry.hw.sendQueue[a.getStringField("PORT")] = c + 128; + return a.callReturn(); }; Blockly.Blocks.bitbrick_dc_direction_speed = {init:function() { this.setColour("#00979D"); @@ -1192,10 +1326,10 @@ Blockly.Blocks.bitbrick_dc_direction_speed = {init:function() { this.setNextStatement(!0); this.setInputsInline(!0); }}; -Entry.block.bitbrick_dc_direction_speed = function(a, b) { - var c = "CW" === b.getStringField("DIRECTION"), d = b.getNumberValue("VALUE"), d = Math.min(d, Entry.Bitbrick.dcMaxValue), d = Math.max(d, 0); - Entry.hw.sendQueue[b.getStringField("PORT")] = c ? d + 128 : 128 - d; - return b.callReturn(); +Entry.block.bitbrick_dc_direction_speed = function(b, a) { + var c = "CW" === a.getStringField("DIRECTION"), d = a.getNumberValue("VALUE"), d = Math.min(d, Entry.Bitbrick.dcMaxValue), d = Math.max(d, 0); + Entry.hw.sendQueue[a.getStringField("PORT")] = c ? d + 128 : 128 - d; + return a.callReturn(); }; Blockly.Blocks.bitbrick_servomotor_angle = {init:function() { this.setColour("#00979D"); @@ -1206,10 +1340,10 @@ Blockly.Blocks.bitbrick_servomotor_angle = {init:function() { this.setNextStatement(!0); this.setInputsInline(!0); }}; -Entry.block.bitbrick_servomotor_angle = function(a, b) { - var c = b.getNumberValue("VALUE") + 1, c = Math.min(c, Entry.Bitbrick.servoMaxValue), c = Math.max(c, Entry.Bitbrick.servoMinValue); - Entry.hw.sendQueue[b.getStringField("PORT")] = c; - return b.callReturn(); +Entry.block.bitbrick_servomotor_angle = function(b, a) { + var c = a.getNumberValue("VALUE") + 1, c = Math.min(c, Entry.Bitbrick.servoMaxValue), c = Math.max(c, Entry.Bitbrick.servoMinValue); + Entry.hw.sendQueue[a.getStringField("PORT")] = c; + return a.callReturn(); }; Blockly.Blocks.bitbrick_convert_scale = {init:function() { this.setColour("#00979D"); @@ -1226,8 +1360,8 @@ Blockly.Blocks.bitbrick_convert_scale = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.bitbrick_convert_scale = function(a, b) { - var c = b.getNumberField("PORT"), d = Entry.hw.portData[c].value, c = b.getNumberValue("VALUE2", b), e = b.getNumberValue("VALUE3", b), f = b.getNumberValue("VALUE4", b), g = b.getNumberValue("VALUE5", b); +Entry.block.bitbrick_convert_scale = function(b, a) { + var c = a.getNumberField("PORT"), d = Entry.hw.portData[c].value, c = a.getNumberValue("VALUE2", a), e = a.getNumberValue("VALUE3", a), f = a.getNumberValue("VALUE4", a), g = a.getNumberValue("VALUE5", a); if (f > g) { var h = f, f = g, g = h } @@ -1246,11 +1380,11 @@ Blockly.Blocks.start_drawing = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.start_drawing = function(a, b) { - a.brush ? a.brush.stop = !1 : Entry.setBasicBrush(a); +Entry.block.start_drawing = function(b, a) { + b.brush ? b.brush.stop = !1 : Entry.setBasicBrush(b); Entry.stage.sortZorder(); - a.brush.moveTo(a.getX(), -1 * a.getY()); - return b.callReturn(); + b.brush.moveTo(b.getX(), -1 * b.getY()); + return a.callReturn(); }; Blockly.Blocks.stop_drawing = {init:function() { this.setColour(categoryColor); @@ -1259,9 +1393,9 @@ Blockly.Blocks.stop_drawing = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.stop_drawing = function(a, b) { - a.brush && a.shape && (a.brush.stop = !0); - return b.callReturn(); +Entry.block.stop_drawing = function(b, a) { + b.brush && b.shape && (b.brush.stop = !0); + return a.callReturn(); }; Blockly.Blocks.set_color = {init:function() { this.setColour(categoryColor); @@ -1272,11 +1406,11 @@ Blockly.Blocks.set_color = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.set_color = function(a, b) { - var c = b.getField("VALUE", b); - a.brush || (Entry.setBasicBrush(a), a.brush.stop = !0); - a.brush && (c = Entry.hex2rgb(c), a.brush.rgb = c, a.brush.endStroke(), a.brush.beginStroke("rgba(" + c.r + "," + c.g + "," + c.b + "," + a.brush.opacity / 100 + ")"), a.brush.moveTo(a.getX(), -1 * a.getY())); - return b.callReturn(); +Entry.block.set_color = function(b, a) { + var c = a.getField("VALUE", a); + b.brush || (Entry.setBasicBrush(b), b.brush.stop = !0); + b.brush && (c = Entry.hex2rgb(c), b.brush.rgb = c, b.brush.endStroke(), b.brush.beginStroke("rgba(" + c.r + "," + c.g + "," + c.b + "," + b.brush.opacity / 100 + ")"), b.brush.moveTo(b.getX(), -1 * b.getY())); + return a.callReturn(); }; Blockly.Blocks.set_random_color = {init:function() { this.setColour(categoryColor); @@ -1285,16 +1419,16 @@ Blockly.Blocks.set_random_color = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.set_random_color = function(a, b) { - a.brush || (Entry.setBasicBrush(a), a.brush.stop = !0); - if (a.brush) { +Entry.block.set_random_color = function(b, a) { + b.brush || (Entry.setBasicBrush(b), b.brush.stop = !0); + if (b.brush) { var c = Entry.generateRgb(); - a.brush.rgb = c; - a.brush.endStroke(); - a.brush.beginStroke("rgba(" + c.r + "," + c.g + "," + c.b + "," + a.brush.opacity / 100 + ")"); - a.brush.moveTo(a.getX(), -1 * a.getY()); + b.brush.rgb = c; + b.brush.endStroke(); + b.brush.beginStroke("rgba(" + c.r + "," + c.g + "," + c.b + "," + b.brush.opacity / 100 + ")"); + b.brush.moveTo(b.getX(), -1 * b.getY()); } - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.change_thickness = {init:function() { this.setColour(categoryColor); @@ -1305,11 +1439,11 @@ Blockly.Blocks.change_thickness = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.change_thickness = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.brush || (Entry.setBasicBrush(a), a.brush.stop = !0); - a.brush && (a.brush.thickness += c, 1 > a.brush.thickness && (a.brush.thickness = 1), a.brush.setStrokeStyle(a.brush.thickness), a.brush.moveTo(a.getX(), -1 * a.getY())); - return b.callReturn(); +Entry.block.change_thickness = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.brush || (Entry.setBasicBrush(b), b.brush.stop = !0); + b.brush && (b.brush.thickness += c, 1 > b.brush.thickness && (b.brush.thickness = 1), b.brush.setStrokeStyle(b.brush.thickness), b.brush.moveTo(b.getX(), -1 * b.getY())); + return a.callReturn(); }; Blockly.Blocks.set_thickness = {init:function() { this.setColour(categoryColor); @@ -1320,11 +1454,11 @@ Blockly.Blocks.set_thickness = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.set_thickness = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.brush || (Entry.setBasicBrush(a), a.brush.stop = !0); - a.brush && (a.brush.thickness = c, a.brush.setStrokeStyle(a.brush.thickness), a.brush.moveTo(a.getX(), -1 * a.getY())); - return b.callReturn(); +Entry.block.set_thickness = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.brush || (Entry.setBasicBrush(b), b.brush.stop = !0); + b.brush && (b.brush.thickness = c, b.brush.setStrokeStyle(b.brush.thickness), b.brush.moveTo(b.getX(), -1 * b.getY())); + return a.callReturn(); }; Blockly.Blocks.change_opacity = {init:function() { this.setColour(categoryColor); @@ -1335,12 +1469,12 @@ Blockly.Blocks.change_opacity = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.change_opacity = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.brush || (Entry.setBasicBrush(a), a.brush.stop = !0); - c = Entry.adjustValueWithMaxMin(a.brush.opacity + c, 0, 100); - a.brush && (a.brush.opacity = c, a.brush.endStroke(), c = a.brush.rgb, a.brush.beginStroke("rgba(" + c.r + "," + c.g + "," + c.b + "," + a.brush.opacity / 100 + ")"), a.brush.moveTo(a.getX(), -1 * a.getY())); - return b.callReturn(); +Entry.block.change_opacity = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.brush || (Entry.setBasicBrush(b), b.brush.stop = !0); + c = Entry.adjustValueWithMaxMin(b.brush.opacity + c, 0, 100); + b.brush && (b.brush.opacity = c, b.brush.endStroke(), c = b.brush.rgb, b.brush.beginStroke("rgba(" + c.r + "," + c.g + "," + c.b + "," + b.brush.opacity / 100 + ")"), b.brush.moveTo(b.getX(), -1 * b.getY())); + return a.callReturn(); }; Blockly.Blocks.set_opacity = {init:function() { this.setColour(categoryColor); @@ -1351,11 +1485,11 @@ Blockly.Blocks.set_opacity = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.set_opacity = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.brush || (Entry.setBasicBrush(a), a.brush.stop = !0); - a.brush && (a.brush.opacity = Entry.adjustValueWithMaxMin(c, 0, 100), a.brush.endStroke(), c = a.brush.rgb, a.brush.beginStroke("rgba(" + c.r + "," + c.g + "," + c.b + "," + a.brush.opacity / 100 + ")"), a.brush.moveTo(a.getX(), -1 * a.getY())); - return b.callReturn(); +Entry.block.set_opacity = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.brush || (Entry.setBasicBrush(b), b.brush.stop = !0); + b.brush && (b.brush.opacity = Entry.adjustValueWithMaxMin(c, 0, 100), b.brush.endStroke(), c = b.brush.rgb, b.brush.beginStroke("rgba(" + c.r + "," + c.g + "," + c.b + "," + b.brush.opacity / 100 + ")"), b.brush.moveTo(b.getX(), -1 * b.getY())); + return a.callReturn(); }; Blockly.Blocks.brush_erase_all = {init:function() { this.setColour(categoryColor); @@ -1364,19 +1498,19 @@ Blockly.Blocks.brush_erase_all = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.brush_erase_all = function(a, b) { - var c = a.brush; +Entry.block.brush_erase_all = function(b, a) { + var c = b.brush; if (c) { var d = c._stroke.style, e = c._strokeStyle.width; c.clear().setStrokeStyle(e).beginStroke(d); - c.moveTo(a.getX(), -1 * a.getY()); + c.moveTo(b.getX(), -1 * b.getY()); } - c = a.parent.getStampEntities(); - c.map(function(b) { - b.removeClone(); + c = b.parent.getStampEntities(); + c.map(function(a) { + a.removeClone(); }); c = null; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.brush_stamp = {init:function() { this.setColour(categoryColor); @@ -1385,9 +1519,9 @@ Blockly.Blocks.brush_stamp = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.brush_stamp = function(a, b) { - a.parent.addStampEntity(a); - return b.callReturn(); +Entry.block.brush_stamp = function(b, a) { + b.parent.addStampEntity(b); + return a.callReturn(); }; Blockly.Blocks.change_brush_transparency = {init:function() { this.setColour(categoryColor); @@ -1398,12 +1532,12 @@ Blockly.Blocks.change_brush_transparency = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.change_brush_transparency = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.brush || (Entry.setBasicBrush(a), a.brush.stop = !0); - c = Entry.adjustValueWithMaxMin(a.brush.opacity - c, 0, 100); - a.brush && (a.brush.opacity = c, a.brush.endStroke(), c = a.brush.rgb, a.brush.beginStroke("rgba(" + c.r + "," + c.g + "," + c.b + "," + a.brush.opacity / 100 + ")"), a.brush.moveTo(a.getX(), -1 * a.getY())); - return b.callReturn(); +Entry.block.change_brush_transparency = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.brush || (Entry.setBasicBrush(b), b.brush.stop = !0); + c = Entry.adjustValueWithMaxMin(b.brush.opacity - c, 0, 100); + b.brush && (b.brush.opacity = c, b.brush.endStroke(), c = b.brush.rgb, b.brush.beginStroke("rgba(" + c.r + "," + c.g + "," + c.b + "," + b.brush.opacity / 100 + ")"), b.brush.moveTo(b.getX(), -1 * b.getY())); + return a.callReturn(); }; Blockly.Blocks.set_brush_tranparency = {init:function() { this.setColour(categoryColor); @@ -1414,11 +1548,11 @@ Blockly.Blocks.set_brush_tranparency = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.set_brush_tranparency = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.brush || (Entry.setBasicBrush(a), a.brush.stop = !0); - a.brush && (a.brush.opacity = Entry.adjustValueWithMaxMin(c, 0, 100), a.brush.endStroke(), c = a.brush.rgb, a.brush.beginStroke("rgba(" + c.r + "," + c.g + "," + c.b + "," + (1 - a.brush.opacity / 100) + ")"), a.brush.moveTo(a.getX(), -1 * a.getY())); - return b.callReturn(); +Entry.block.set_brush_tranparency = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.brush || (Entry.setBasicBrush(b), b.brush.stop = !0); + b.brush && (b.brush.opacity = Entry.adjustValueWithMaxMin(c, 0, 100), b.brush.endStroke(), c = b.brush.rgb, b.brush.beginStroke("rgba(" + c.r + "," + c.g + "," + c.b + "," + (1 - b.brush.opacity / 100) + ")"), b.brush.moveTo(b.getX(), -1 * b.getY())); + return a.callReturn(); }; var calcArrowColor = "#e8b349", calcBlockColor = "#FFD974", calcFontColor = "#3D3D3D"; Blockly.Blocks.number = {init:function() { @@ -1427,8 +1561,8 @@ Blockly.Blocks.number = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.number = function(a, b) { - return b.fields.NUM; +Entry.block.number = function(b, a) { + return a.getField("NUM", a); }; Blockly.Blocks.angle = {init:function() { this.setColour(calcBlockColor); @@ -1436,8 +1570,8 @@ Blockly.Blocks.angle = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.angle = function(a, b) { - return b.getNumberField("ANGLE"); +Entry.block.angle = function(b, a) { + return a.getNumberField("ANGLE"); }; Blockly.Blocks.get_x_coordinate = {init:function() { this.setColour(calcBlockColor); @@ -1445,8 +1579,8 @@ Blockly.Blocks.get_x_coordinate = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.get_x_coordinate = function(a, b) { - return a.getX(); +Entry.block.get_x_coordinate = function(b, a) { + return b.getX(); }; Blockly.Blocks.get_y_coordinate = {init:function() { this.setColour(calcBlockColor); @@ -1454,8 +1588,8 @@ Blockly.Blocks.get_y_coordinate = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.get_y_coordinate = function(a, b) { - return a.getY(); +Entry.block.get_y_coordinate = function(b, a) { + return b.getY(); }; Blockly.Blocks.get_angle = {init:function() { this.setColour(calcBlockColor); @@ -1463,8 +1597,8 @@ Blockly.Blocks.get_angle = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.get_angle = function(a, b) { - return parseFloat(a.getRotation().toFixed(1)); +Entry.block.get_angle = function(b, a) { + return parseFloat(b.getRotation().toFixed(1)); }; Blockly.Blocks.get_rotation_direction = {init:function() { this.setColour(calcBlockColor); @@ -1473,8 +1607,8 @@ Blockly.Blocks.get_rotation_direction = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.get_rotation_direction = function(a, b) { - return "DIRECTION" == b.getField("OPERATOR", b).toUpperCase() ? parseFloat(a.getDirection().toFixed(1)) : parseFloat(a.getRotation().toFixed(1)); +Entry.block.get_rotation_direction = function(b, a) { + return "DIRECTION" == a.getField("OPERATOR", a).toUpperCase() ? parseFloat(b.getDirection().toFixed(1)) : parseFloat(b.getRotation().toFixed(1)); }; Blockly.Blocks.distance_something = {init:function() { this.setColour(calcBlockColor); @@ -1482,13 +1616,13 @@ Blockly.Blocks.distance_something = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.distance_something = function(a, b) { - var c = b.getField("VALUE", b); +Entry.block.distance_something = function(b, a) { + var c = a.getField("VALUE", a); if ("mouse" == c) { - return c = Entry.stage.mouseCoordinate, Math.sqrt(Math.pow(a.getX() - c.x, 2) + Math.pow(a.getY() - c.y, 2)); + return c = Entry.stage.mouseCoordinate, Math.sqrt(Math.pow(b.getX() - c.x, 2) + Math.pow(b.getY() - c.y, 2)); } c = Entry.container.getEntity(c); - return Math.sqrt(Math.pow(a.getX() - c.getX(), 2) + Math.pow(a.getY() - c.getY(), 2)); + return Math.sqrt(Math.pow(b.getX() - c.getX(), 2) + Math.pow(b.getY() - c.getY(), 2)); }; Blockly.Blocks.coordinate_mouse = {init:function() { this.setColour(calcBlockColor); @@ -1496,8 +1630,8 @@ Blockly.Blocks.coordinate_mouse = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.coordinate_mouse = function(a, b) { - return "x" === b.getField("VALUE", b) ? +Entry.stage.mouseCoordinate.x : +Entry.stage.mouseCoordinate.y; +Entry.block.coordinate_mouse = function(b, a) { + return "x" === a.getField("VALUE", a) ? Number(Entry.stage.mouseCoordinate.x) : Number(Entry.stage.mouseCoordinate.y); }; Blockly.Blocks.coordinate_object = {init:function() { this.setColour(calcBlockColor); @@ -1506,9 +1640,9 @@ Blockly.Blocks.coordinate_object = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.coordinate_object = function(a, b) { - var c = b.getField("VALUE", b), c = "self" == c ? a : Entry.container.getEntity(c); - switch(b.getField("COORDINATE", b)) { +Entry.block.coordinate_object = function(b, a) { + var c = a.getField("VALUE", a), c = "self" == c ? b : Entry.container.getEntity(c); + switch(a.getField("COORDINATE", a)) { case "x": return c.getX(); case "y": @@ -1521,7 +1655,7 @@ Entry.block.coordinate_object = function(a, b) { var d = c.parent, d = d.pictures; return d.indexOf(c.picture) + 1; case "size": - return +c.getSize().toFixed(1); + return Number(c.getSize().toFixed(1)); case "picture_name": return d = c.parent, d = d.pictures, d[d.indexOf(c.picture)].name; } @@ -1534,8 +1668,8 @@ Blockly.Blocks.calc_basic = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.calc_basic = function(a, b) { - var c = b.getField("OPERATOR", b), d = b.getNumberValue("LEFTHAND", b), e = b.getNumberValue("RIGHTHAND", b); +Entry.block.calc_basic = function(b, a) { + var c = a.getField("OPERATOR", a), d = a.getNumberValue("LEFTHAND", a), e = a.getNumberValue("RIGHTHAND", a); return "PLUS" == c ? d + e : "MINUS" == c ? d - e : "MULTI" == c ? d * e : d / e; }; Blockly.Blocks.calc_plus = {init:function() { @@ -1546,8 +1680,8 @@ Blockly.Blocks.calc_plus = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.calc_plus = function(a, b) { - var c = b.getNumberValue("LEFTHAND", b), d = b.getNumberValue("RIGHTHAND", b); +Entry.block.calc_plus = function(b, a) { + var c = a.getNumberValue("LEFTHAND", a), d = a.getNumberValue("RIGHTHAND", a); return c + d; }; Blockly.Blocks.calc_minus = {init:function() { @@ -1558,8 +1692,8 @@ Blockly.Blocks.calc_minus = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.calc_minus = function(a, b) { - var c = b.getNumberValue("LEFTHAND", b), d = b.getNumberValue("RIGHTHAND", b); +Entry.block.calc_minus = function(b, a) { + var c = a.getNumberValue("LEFTHAND", a), d = a.getNumberValue("RIGHTHAND", a); return c - d; }; Blockly.Blocks.calc_times = {init:function() { @@ -1570,8 +1704,8 @@ Blockly.Blocks.calc_times = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.calc_times = function(a, b) { - var c = b.getNumberValue("LEFTHAND", b), d = b.getNumberValue("RIGHTHAND", b); +Entry.block.calc_times = function(b, a) { + var c = a.getNumberValue("LEFTHAND", a), d = a.getNumberValue("RIGHTHAND", a); return c * d; }; Blockly.Blocks.calc_divide = {init:function() { @@ -1582,8 +1716,8 @@ Blockly.Blocks.calc_divide = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.calc_divide = function(a, b) { - var c = b.getNumberValue("LEFTHAND", b), d = b.getNumberValue("RIGHTHAND", b); +Entry.block.calc_divide = function(b, a) { + var c = a.getNumberValue("LEFTHAND", a), d = a.getNumberValue("RIGHTHAND", a); return c / d; }; Blockly.Blocks.calc_mod = {init:function() { @@ -1596,8 +1730,8 @@ Blockly.Blocks.calc_mod = {init:function() { this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_calc_mod_3, calcFontColor); this.setInputsInline(!0); }}; -Entry.block.calc_mod = function(a, b) { - var c = b.getNumberValue("LEFTHAND", b), d = b.getNumberValue("RIGHTHAND", b); +Entry.block.calc_mod = function(b, a) { + var c = a.getNumberValue("LEFTHAND", a), d = a.getNumberValue("RIGHTHAND", a); return c % d; }; Blockly.Blocks.calc_share = {init:function() { @@ -1610,8 +1744,8 @@ Blockly.Blocks.calc_share = {init:function() { this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_calc_share_3, calcFontColor); this.setInputsInline(!0); }}; -Entry.block.calc_share = function(a, b) { - var c = b.getNumberValue("LEFTHAND", b), d = b.getNumberValue("RIGHTHAND", b); +Entry.block.calc_share = function(b, a) { + var c = a.getNumberValue("LEFTHAND", a), d = a.getNumberValue("RIGHTHAND", a); return Math.floor(c / d); }; Blockly.Blocks.calc_operation = {init:function() { @@ -1625,8 +1759,8 @@ Blockly.Blocks.calc_operation = {init:function() { this.appendDummyInput().appendField(" "); this.setInputsInline(!0); }}; -Entry.block.calc_operation = function(a, b) { - var c = b.getNumberValue("LEFTHAND", b), d = b.getField("VALUE", b); +Entry.block.calc_operation = function(b, a) { + var c = a.getNumberValue("LEFTHAND", a), d = a.getField("VALUE", a); if (-1 < ["asin_radian", "acos_radian"].indexOf(d) && (1 < c || -1 > c)) { throw Error("x range exceeded"); } @@ -1675,8 +1809,8 @@ Blockly.Blocks.calc_rand = {init:function() { this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_calc_rand_3, calcFontColor); this.setInputsInline(!0); }}; -Entry.block.calc_rand = function(a, b) { - var c = b.getStringValue("LEFTHAND", b), d = b.getStringValue("RIGHTHAND", b), e = Math.min(c, d), f = Math.max(c, d), c = Entry.isFloat(c); +Entry.block.calc_rand = function(b, a) { + var c = a.getStringValue("LEFTHAND", a), d = a.getStringValue("RIGHTHAND", a), e = Math.min(c, d), f = Math.max(c, d), c = Entry.isFloat(c); return Entry.isFloat(d) || c ? (Math.random() * (f - e) + e).toFixed(2) : Math.floor(Math.random() * (f - e + 1) + e); }; Blockly.Blocks.get_date = {init:function() { @@ -1686,8 +1820,8 @@ Blockly.Blocks.get_date = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.get_date = function(a, b) { - var c = b.getField("VALUE", b), d = new Date; +Entry.block.get_date = function(b, a) { + var c = a.getField("VALUE", a), d = new Date; return "YEAR" == c ? d.getFullYear() : "MONTH" == c ? d.getMonth() + 1 : "DAY" == c ? d.getDate() : "HOUR" == c ? d.getHours() : "MINUTE" == c ? d.getMinutes() : d.getSeconds(); }; Blockly.Blocks.get_sound_duration = {init:function() { @@ -1698,8 +1832,8 @@ Blockly.Blocks.get_sound_duration = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.get_sound_duration = function(a, b) { - for (var c = b.getField("VALUE", b), d = a.parent.sounds, e = 0;e < d.length;e++) { +Entry.block.get_sound_duration = function(b, a) { + for (var c = a.getField("VALUE", a), d = b.parent.sounds, e = 0;e < d.length;e++) { if (d[e].id == c) { return d[e].duration; } @@ -1712,13 +1846,13 @@ Blockly.Blocks.reset_project_timer = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }, whenAdd:function() { - Entry.engine.showProjectTimer(); -}, whenRemove:function(a) { - Entry.engine.hideProjectTimer(a); + Entry.engine && Entry.engine.showProjectTimer(); +}, whenRemove:function(b) { + Entry.engine && Entry.engine.hideProjectTimer(b); }}; -Entry.block.reset_project_timer = function(a, b) { +Entry.block.reset_project_timer = function(b, a) { Entry.engine.updateProjectTimer(0); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.set_visible_project_timer = {init:function() { this.setColour(calcBlockColor); @@ -1729,14 +1863,14 @@ Blockly.Blocks.set_visible_project_timer = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }, whenAdd:function() { - Entry.engine.showProjectTimer(); -}, whenRemove:function(a) { - Entry.engine.hideProjectTimer(a); + Entry.engine && Entry.engine.showProjectTimer(); +}, whenRemove:function(b) { + Entry.engine && Entry.engine.hideProjectTimer(b); }}; -Entry.block.set_visible_project_timer = function(a, b) { - var c = b.getField("ACTION", b), d = Entry.engine.projectTimer; +Entry.block.set_visible_project_timer = function(b, a) { + var c = a.getField("ACTION", a), d = Entry.engine.projectTimer; "SHOW" == c ? d.setVisible(!0) : d.setVisible(!1); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.timer_variable = {init:function() { this.setColour(calcBlockColor); @@ -1744,7 +1878,7 @@ Blockly.Blocks.timer_variable = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.timer_variable = function(a, b) { +Entry.block.timer_variable = function(b, a) { return Entry.container.inputValue.getValue(); }; Blockly.Blocks.get_project_timer_value = {init:function() { @@ -1753,11 +1887,11 @@ Blockly.Blocks.get_project_timer_value = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }, whenAdd:function() { - Entry.engine.showProjectTimer(); -}, whenRemove:function(a) { - Entry.engine.hideProjectTimer(a); + Entry.engine && Entry.engine.showProjectTimer(); +}, whenRemove:function(b) { + Entry.engine && Entry.engine.hideProjectTimer(b); }}; -Entry.block.get_project_timer_value = function(a, b) { +Entry.block.get_project_timer_value = function(b, a) { return Entry.engine.projectTimer.getValue(); }; Blockly.Blocks.char_at = {init:function() { @@ -1770,8 +1904,8 @@ Blockly.Blocks.char_at = {init:function() { this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_char_at_3, calcFontColor); this.setInputsInline(!0); }}; -Entry.block.char_at = function(a, b) { - var c = b.getStringValue("LEFTHAND", b), d = b.getNumberValue("RIGHTHAND", b) - 1; +Entry.block.char_at = function(b, a) { + var c = a.getStringValue("LEFTHAND", a), d = a.getNumberValue("RIGHTHAND", a) - 1; if (0 > d || d > c.length - 1) { throw Error(); } @@ -1785,8 +1919,8 @@ Blockly.Blocks.length_of_string = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.length_of_string = function(a, b) { - return b.getStringValue("STRING", b).length; +Entry.block.length_of_string = function(b, a) { + return a.getStringValue("STRING", a).length; }; Blockly.Blocks.substring = {init:function() { this.setColour(calcBlockColor); @@ -1800,8 +1934,8 @@ Blockly.Blocks.substring = {init:function() { this.setOutput(!0, "String"); this.setInputsInline(!0); }}; -Entry.block.substring = function(a, b) { - var c = b.getStringValue("STRING", b), d = b.getNumberValue("START", b) - 1, e = b.getNumberValue("END", b) - 1, f = c.length - 1; +Entry.block.substring = function(b, a) { + var c = a.getStringValue("STRING", a), d = a.getNumberValue("START", a) - 1, e = a.getNumberValue("END", a) - 1, f = c.length - 1; if (0 > d || 0 > e || d > f || e > f) { throw Error(); } @@ -1819,8 +1953,8 @@ Blockly.Blocks.replace_string = {init:function() { this.setOutput(!0, "String"); this.setInputsInline(!0); }}; -Entry.block.replace_string = function(a, b) { - return b.getStringValue("STRING", b).replace(new RegExp(b.getStringValue("OLD_WORD", b), "gm"), b.getStringValue("NEW_WORD", b)); +Entry.block.replace_string = function(b, a) { + return a.getStringValue("STRING", a).replace(new RegExp(a.getStringValue("OLD_WORD", a), "gm"), a.getStringValue("NEW_WORD", a)); }; Blockly.Blocks.change_string_case = {init:function() { this.setColour(calcBlockColor); @@ -1832,8 +1966,8 @@ Blockly.Blocks.change_string_case = {init:function() { this.setOutput(!0, "String"); this.setInputsInline(!0); }}; -Entry.block.change_string_case = function(a, b) { - return b.getStringValue("STRING", b)[b.getField("CASE", b)](); +Entry.block.change_string_case = function(b, a) { + return a.getStringValue("STRING", a)[a.getField("CASE", a)](); }; Blockly.Blocks.index_of_string = {init:function() { this.setColour(calcBlockColor); @@ -1845,8 +1979,8 @@ Blockly.Blocks.index_of_string = {init:function() { this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_index_of_string_3, calcFontColor); this.setInputsInline(!0); }}; -Entry.block.index_of_string = function(a, b) { - var c = b.getStringValue("LEFTHAND", b), d = b.getStringValue("RIGHTHAND", b), c = c.indexOf(d); +Entry.block.index_of_string = function(b, a) { + var c = a.getStringValue("LEFTHAND", a), d = a.getStringValue("RIGHTHAND", a), c = c.indexOf(d); return -1 < c ? c + 1 : 0; }; Blockly.Blocks.combine_something = {init:function() { @@ -1859,8 +1993,8 @@ Blockly.Blocks.combine_something = {init:function() { this.setInputsInline(!0); this.setOutput(!0, "String"); }}; -Entry.block.combine_something = function(a, b) { - var c = b.getStringValue("VALUE1", b), d = b.getStringValue("VALUE2", b); +Entry.block.combine_something = function(b, a) { + var c = a.getStringValue("VALUE1", a), d = a.getStringValue("VALUE2", a); return c + d; }; Blockly.Blocks.get_sound_volume = {init:function() { @@ -1869,7 +2003,7 @@ Blockly.Blocks.get_sound_volume = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.get_sound_volume = function(a, b) { +Entry.block.get_sound_volume = function(b, a) { return 100 * createjs.Sound.getVolume(); }; Blockly.Blocks.quotient_and_mod = {init:function() { @@ -1881,12 +2015,12 @@ Blockly.Blocks.quotient_and_mod = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.quotient_and_mod = function(a, b) { - var c = b.getNumberValue("LEFTHAND", b), d = b.getNumberValue("RIGHTHAND", b); +Entry.block.quotient_and_mod = function(b, a) { + var c = a.getNumberValue("LEFTHAND", a), d = a.getNumberValue("RIGHTHAND", a); if (isNaN(c) || isNaN(d)) { throw Error(); } - return "QUOTIENT" == b.getField("OPERATOR", b) ? Math.floor(c / d) : c % d; + return "QUOTIENT" == a.getField("OPERATOR", a) ? Math.floor(c / d) : c % d; }; Blockly.Blocks.choose_project_timer_action = {init:function() { this.setColour(calcBlockColor); @@ -1896,14 +2030,14 @@ Blockly.Blocks.choose_project_timer_action = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }, whenAdd:function() { - Entry.engine.showProjectTimer(); -}, whenRemove:function(a) { - Entry.engine.hideProjectTimer(a); + Entry.engine && Entry.engine.showProjectTimer(); +}, whenRemove:function(b) { + Entry.engine && Entry.engine.hideProjectTimer(b); }}; -Entry.block.choose_project_timer_action = function(a, b) { - var c = b.getField("ACTION"), d = Entry.engine, e = d.projectTimer; +Entry.block.choose_project_timer_action = function(b, a) { + var c = a.getField("ACTION"), d = Entry.engine, e = d.projectTimer; "START" == c ? e.isInit ? e.isInit && e.isPaused && (e.pauseStart && (e.pausedTime += (new Date).getTime() - e.pauseStart), delete e.pauseStart, e.isPaused = !1) : d.startProjectTimer() : "STOP" == c ? e.isInit && !e.isPaused && (e.isPaused = !0, e.pauseStart = (new Date).getTime()) : "RESET" == c && e.isInit && (e.setValue(0), e.start = (new Date).getTime(), e.pausedTime = 0, delete e.pauseStart); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.wait_second = {init:function() { this.setColour("#498deb"); @@ -1914,23 +2048,23 @@ Blockly.Blocks.wait_second = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.wait_second = function(a, b) { - if (b.isStart) { - if (1 == b.timeFlag) { - return b; +Entry.block.wait_second = function(b, a) { + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.timeFlag; - delete b.isStart; + delete a.timeFlag; + delete a.isStart; Entry.engine.isContinue = !1; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; - var c = b.getNumberValue("SECOND", b), c = 60 / (Entry.FPS || 60) * c * 1E3; + a.isStart = !0; + a.timeFlag = 1; + var c = a.getNumberValue("SECOND", a); setTimeout(function() { - b.timeFlag = 0; - }, c); - return b; + a.timeFlag = 0; + }, 60 / (Entry.FPS || 60) * c * 1E3); + return a; }; Blockly.Blocks.repeat_basic = {init:function() { this.setColour("#498deb"); @@ -1942,21 +2076,21 @@ Blockly.Blocks.repeat_basic = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.repeat_basic = function(a, b) { +Entry.block.repeat_basic = function(b, a) { var c; - if (!b.isLooped) { - b.isLooped = !0; - c = b.getNumberValue("VALUE", b); + if (!a.isLooped) { + a.isLooped = !0; + c = a.getNumberValue("VALUE", a); if (0 > c) { throw Error(Lang.Blocks.FLOW_repeat_basic_errorMsg); } - b.iterCount = Math.floor(c); + a.iterCount = Math.floor(c); } - if (0 == b.iterCount || 0 > b.iterCount) { - return delete b.isLooped, delete b.iterCount, b.callReturn(); + if (0 == a.iterCount || 0 > a.iterCount) { + return delete a.isLooped, delete a.iterCount, a.callReturn(); } - b.iterCount--; - return b.getStatement("DO", b); + a.iterCount--; + return a.getStatement("DO", a); }; Blockly.Blocks.repeat_inf = {init:function() { this.setColour("#498deb"); @@ -1966,9 +2100,9 @@ Blockly.Blocks.repeat_inf = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.repeat_inf = function(a, b) { - b.isLooped = !0; - return b.getStatement("DO"); +Entry.block.repeat_inf = function(b, a) { + a.isLooped = !0; + return a.getStatement("DO"); }; Blockly.Blocks.stop_repeat = {init:function() { this.setColour("#498deb"); @@ -1977,12 +2111,8 @@ Blockly.Blocks.stop_repeat = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.stop_repeat = function(a, b) { - for (var c = b;"REPEAT" != c.type.substr(0, 6).toUpperCase() && c.parentScript;) { - c = c.parentScript, delete c.isLooped, delete c.iterCount; - } - var d = c.callReturn(); - return c.statements && d ? d : c ? null : b.callReturn(); +Entry.block.stop_repeat = function(b, a) { + return this.executor.break(); }; Blockly.Blocks.wait_until_true = {init:function() { this.setColour("#498deb"); @@ -1993,8 +2123,8 @@ Blockly.Blocks.wait_until_true = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.wait_until_true = function(a, b) { - return b.getBooleanValue("BOOL", b) ? b.callReturn() : b; +Entry.block.wait_until_true = function(b, a) { + return a.getBooleanValue("BOOL", a) ? a.callReturn() : a; }; Blockly.Blocks._if = {init:function() { this.setColour("#498deb"); @@ -2006,8 +2136,8 @@ Blockly.Blocks._if = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block._if = function(a, b) { - return b.isLooped ? (delete b.isLooped, b.callReturn()) : b.getBooleanValue("BOOL", b) ? (b.isLooped = !0, b.getStatement("STACK", b)) : b.callReturn(); +Entry.block._if = function(b, a) { + return a.isLooped ? (delete a.isLooped, a.callReturn()) : a.getBooleanValue("BOOL", a) ? (a.isLooped = !0, a.getStatement("STACK", a)) : a.callReturn(); }; Blockly.Blocks.if_else = {init:function() { this.setColour("#498deb"); @@ -2021,13 +2151,13 @@ Blockly.Blocks.if_else = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.if_else = function(a, b) { - if (b.isLooped) { - return delete b.isLooped, b.callReturn(); +Entry.block.if_else = function(b, a) { + if (a.isLooped) { + return delete a.isLooped, a.callReturn(); } - var c = b.getBooleanValue("BOOL", b); - b.isLooped = !0; - return c ? b.getStatement("STACK_IF", b) : b.getStatement("STACK_ELSE", b); + var c = a.getBooleanValue("BOOL", a); + a.isLooped = !0; + return c ? a.getStatement("STACK_IF", a) : a.getStatement("STACK_ELSE", a); }; Blockly.Blocks.create_clone = {init:function() { this.setColour("#498deb"); @@ -2038,9 +2168,9 @@ Blockly.Blocks.create_clone = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.create_clone = function(a, b) { - var c = b.getField("VALUE", b), d = b.callReturn(); - "self" == c ? a.parent.addCloneEntity(a.parent, a, null) : Entry.container.getObject(c).addCloneEntity(a.parent, null, null); +Entry.block.create_clone = function(b, a) { + var c = a.getField("VALUE", a), d = a.callReturn(); + "self" == c ? b.parent.addCloneEntity(b.parent, b, null) : Entry.container.getObject(c).addCloneEntity(b.parent, null, null); return d; }; Blockly.Blocks.delete_clone = {init:function() { @@ -2049,11 +2179,11 @@ Blockly.Blocks.delete_clone = {init:function() { this.setInputsInline(!0); this.setPreviousStatement(!0); }}; -Entry.block.delete_clone = function(a, b) { - if (!a.isClone) { - return b.callReturn(); +Entry.block.delete_clone = function(b, a) { + if (!b.isClone) { + return a.callReturn(); } - a.removeClone(); + b.removeClone(); }; Blockly.Blocks.when_clone_start = {init:function() { this.setColour("#498deb"); @@ -2061,8 +2191,8 @@ Blockly.Blocks.when_clone_start = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); }}; -Entry.block.when_clone_start = function(a, b) { - return b.callReturn(); +Entry.block.when_clone_start = function(b, a) { + return a.callReturn(); }; Blockly.Blocks.stop_run = {init:function() { this.setColour("#498deb"); @@ -2071,7 +2201,7 @@ Blockly.Blocks.stop_run = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.stop_run = function(a, b) { +Entry.block.stop_run = function(b, a) { return Entry.engine.toggleStop(); }; Blockly.Blocks.repeat_while_true = {init:function() { @@ -2083,10 +2213,10 @@ Blockly.Blocks.repeat_while_true = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.repeat_while_true = function(a, b) { - var c = b.getBooleanValue("BOOL", b); - "until" == b.getField("OPTION", b) && (c = !c); - return (b.isLooped = c) ? b.getStatement("DO", b) : b.callReturn(); +Entry.block.repeat_while_true = function(b, a) { + var c = a.getBooleanValue("BOOL", a); + "until" == a.getField("OPTION", a) && (c = !c); + return (a.isLooped = c) ? a.getStatement("DO", a) : a.callReturn(); }; Blockly.Blocks.stop_object = {init:function() { this.setColour("#498deb"); @@ -2097,30 +2227,18 @@ Blockly.Blocks.stop_object = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.stop_object = function(a, b) { - var c = b.getField("TARGET", b), d = Entry.container; +Entry.block.stop_object = function(b, a) { + var c = a.getField("TARGET", a), d = Entry.container; switch(c) { case "all": - d.mapEntityIncludeCloneOnScene(function(b) { - b.clearScript(); - }); - break; - case "thisObject": - a.clearScript(); - c = a.parent.clonedEntities; - c.map(function(b) { - b.clearScript(); - }); - break; + return d.clearRunningState(), this.die(); case "thisOnly": - a.clearScript(); - break; + return b.parent.script.clearExecutorsByEntity(b), this.die(); + case "thisThread": + return this.die(); case "otherThread": - return a.clearScript(), c = a.parent.clonedEntities, c.map(function(b) { - b.clearScript(); - }), b.callReturn(); + b.parent.script.clearExecutors(), b.parent.script.addExecutor(this.executor); } - return null; }; Blockly.Blocks.restart_project = {init:function() { this.setColour("#498deb"); @@ -2128,7 +2246,7 @@ Blockly.Blocks.restart_project = {init:function() { this.setInputsInline(!0); this.setPreviousStatement(!0); }}; -Entry.block.restart_project = function(a, b) { +Entry.block.restart_project = function(b, a) { Entry.engine.toggleStop(); Entry.engine.toggleRun(); }; @@ -2139,14 +2257,17 @@ Blockly.Blocks.remove_all_clones = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.remove_all_clones = function(a, b) { - var c = a.parent.getClonedEntities(); - c.map(function(b) { - b.removeClone(); +Entry.block.remove_all_clones = function(b, a) { + var c = b.parent.getClonedEntities(); + c.map(function(a) { + a.removeClone(); }); c = null; - return b.callReturn(); + return a.callReturn(); }; +Entry.block.functionAddButton = {skeleton:"basic_button", color:"#eee", isNotFor:["functionInit"], template:"%1", params:[{type:"Text", text:"\ud568\uc218 \ucd94\uac00", color:"#333", align:"center"}], events:{mousedown:[function() { + Entry.variableContainer.createFunction(); +}]}}; Blockly.Blocks.function_field_label = {init:function() { this.setColour("#f9c535"); this.appendDummyInput().appendField(new Blockly.FieldTextInput(Lang.Blocks.FUNCTION_explanation_1), "NAME"); @@ -2154,6 +2275,7 @@ Blockly.Blocks.function_field_label = {init:function() { this.setOutput(!0, "Param"); this.setInputsInline(!0); }}; +Entry.block.function_field_label = {skeleton:"basic_param", isNotFor:["functionEdit"], color:"#f9c535", template:"%1%2", params:[{type:"TextInput", value:"\ud568\uc218"}, {type:"Output", accept:"paramMagnet"}]}; Blockly.Blocks.function_field_string = {init:function() { this.setColour("#FFD974"); this.appendValueInput("PARAM").setCheck(["String"]); @@ -2161,6 +2283,7 @@ Blockly.Blocks.function_field_string = {init:function() { this.setOutput(!0, "Param"); this.setInputsInline(!0); }}; +Entry.block.function_field_string = {skeleton:"basic_param", isNotFor:["functionEdit"], color:"#ffd974", template:"%1%2", params:[{type:"Block", accept:"stringMagnet", restore:!0}, {type:"Output", accept:"paramMagnet"}]}; Blockly.Blocks.function_field_boolean = {init:function() { this.setColour("#AEB8FF"); this.appendValueInput("PARAM").setCheck(["Boolean"]); @@ -2168,42 +2291,49 @@ Blockly.Blocks.function_field_boolean = {init:function() { this.setOutput(!0, "Param"); this.setInputsInline(!0); }}; +Entry.block.function_field_boolean = {skeleton:"basic_param", isNotFor:["functionEdit"], color:"#aeb8ff", template:"%1%2", params:[{type:"Block", accept:"booleanMagnet", restore:!0}, {type:"Output", accept:"paramMagnet"}]}; Blockly.Blocks.function_param_string = {init:function() { this.setEditable(!1); this.setColour("#FFD974"); this.setOutput(!0, ["String", "Number"]); this.setInputsInline(!0); -}, domToMutation:function(a) { - a.getElementsByTagName("field"); - this.hashId = a.getAttribute("hashid"); - (a = Entry.Func.targetFunc.stringHash[this.hashId]) || (a = ""); - this.appendDummyInput().appendField(new Blockly.FieldTextInput(Lang.Blocks.FUNCTION_character_variable + a), ""); +}, domToMutation:function(b) { + b.getElementsByTagName("field"); + this.hashId = b.getAttribute("hashid"); + (b = Entry.Func.targetFunc.stringHash[this.hashId]) || (b = ""); + this.appendDummyInput().appendField(new Blockly.FieldTextInput(Lang.Blocks.FUNCTION_character_variable + b), ""); }, mutationToDom:function() { - var a = document.createElement("mutation"); - a.setAttribute("hashid", this.hashId); - return a; + var b = document.createElement("mutation"); + b.setAttribute("hashid", this.hashId); + return b; }}; -Entry.block.function_param_string = function(a, b, c) { - return b.register[b.hashId].run(); +Entry.block.function_param_string = function(b, a, c) { + return a.register[a.hashId].run(); }; +Entry.block.function_param_string = {skeleton:"basic_string_field", color:"#ffd974", template:"\ubb38\uc790/\uc22b\uc790\uac12", func:function() { + return this.executor.register.params[this.executor.register.paramMap[this.block.type]]; +}}; Blockly.Blocks.function_param_boolean = {init:function() { this.setEditable(!1); this.setColour("#AEB8FF"); this.setOutput(!0, "Boolean"); this.setInputsInline(!0); -}, domToMutation:function(a) { - a.getElementsByTagName("field"); - this.hashId = a.getAttribute("hashid"); - (a = Entry.Func.targetFunc.booleanHash[this.hashId]) || (a = ""); - this.appendDummyInput().appendField(new Blockly.FieldTextInput(Lang.Blocks.FUNCTION_logical_variable + a), ""); +}, domToMutation:function(b) { + b.getElementsByTagName("field"); + this.hashId = b.getAttribute("hashid"); + (b = Entry.Func.targetFunc.booleanHash[this.hashId]) || (b = ""); + this.appendDummyInput().appendField(new Blockly.FieldTextInput(Lang.Blocks.FUNCTION_logical_variable + b), ""); }, mutationToDom:function() { - var a = document.createElement("mutation"); - a.setAttribute("hashid", this.hashId); - return a; + var b = document.createElement("mutation"); + b.setAttribute("hashid", this.hashId); + return b; }}; -Entry.block.function_param_boolean = function(a, b, c) { - return b.register[b.hashId].run(); +Entry.block.function_param_boolean = function(b, a, c) { + return a.register[a.hashId].run(); }; +Entry.block.function_param_boolean = {skeleton:"basic_boolean_field", color:"#aeb8ff", template:"\ud310\ub2e8\uac12", func:function() { + return this.executor.register.params[this.executor.register.paramMap[this.block.type]]; +}}; Blockly.Blocks.function_create = {init:function() { this.appendDummyInput().appendField(Lang.Blocks.FUNCTION_define); this.setColour("#cc7337"); @@ -2212,20 +2342,22 @@ Blockly.Blocks.function_create = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); }}; -Entry.block.function_create = function(a, b) { - return b.callReturn(); +Entry.block.function_create = function(b, a) { + return a.callReturn(); }; +Entry.block.function_create = {skeleton:"basic", color:"#cc7337", event:"funcDef", template:"\ud568\uc218 \uc815\uc758\ud558\uae30 %1 %2", params:[{type:"Block", accept:"paramMagnet", value:{type:"function_field_label"}}, {type:"Indicator", img:"/lib/entryjs/images/block_icon/function_03.png", size:12}], func:function() { +}}; Blockly.Blocks.function_general = {init:function() { this.setColour("#cc7337"); this.setInputsInline(!0); this.setNextStatement(!0); this.setPreviousStatement(!0); -}, domToMutation:function(a) { - var b = a.getElementsByTagName("field"); +}, domToMutation:function(b) { + var a = b.getElementsByTagName("field"); this.appendDummyInput().appendField(""); - b.length || this.appendDummyInput().appendField(Lang.Blocks.FUNCTION_function); - for (var c = 0;c < b.length;c++) { - var d = b[c], e = d.getAttribute("hashid"); + a.length || this.appendDummyInput().appendField(Lang.Blocks.FUNCTION_function); + for (var c = 0;c < a.length;c++) { + var d = a[c], e = d.getAttribute("hashid"); switch(d.getAttribute("type").toLowerCase()) { case "label": this.appendDummyInput().appendField(d.getAttribute("content")); @@ -2237,11 +2369,11 @@ Blockly.Blocks.function_general = {init:function() { this.appendValueInput(e).setCheck(["Boolean"]); } } - this.hashId = a.getAttribute("hashid"); + this.hashId = b.getAttribute("hashid"); this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/function_03.png", "*")); }, mutationToDom:function() { - for (var a = document.createElement("mutation"), b = 1;b < this.inputList.length;b++) { - var c = this.inputList[b]; + for (var b = document.createElement("mutation"), a = 1;a < this.inputList.length;a++) { + var c = this.inputList[a]; if (c.fieldRow[0] && c.fieldRow[0] instanceof Blockly.FieldLabel) { var c = c.fieldRow[0], d = document.createElement("field"); d.setAttribute("type", "label"); @@ -2249,52 +2381,66 @@ Blockly.Blocks.function_general = {init:function() { } else { c.connection && "String" == c.connection.check_[0] ? (d = document.createElement("field"), d.setAttribute("type", "string"), d.setAttribute("hashid", c.name)) : c.connection && "Boolean" == c.connection.check_[0] && (d = document.createElement("field"), d.setAttribute("type", "boolean"), d.setAttribute("hashid", c.name)); } - a.appendChild(d); + b.appendChild(d); } - a.setAttribute("hashid", this.hashId); - return a; + b.setAttribute("hashid", this.hashId); + return b; }}; -Entry.block.function_general = function(a, b) { - if (!b.thread) { - var c = Entry.variableContainer.getFunction(b.hashId); - b.thread = new Entry.Script(a); - b.thread.register = b.values; +Entry.block.function_general = function(b, a) { + if (!a.thread) { + var c = Entry.variableContainer.getFunction(a.hashId); + a.thread = new Entry.Script(b); + a.thread.register = a.values; for (var d = 0;d < c.content.childNodes.length;d++) { - "function_create" == c.content.childNodes[d].getAttribute("type") && b.thread.init(c.content.childNodes[d]); + "function_create" == c.content.childNodes[d].getAttribute("type") && a.thread.init(c.content.childNodes[d]); } } - if (c = Entry.Engine.computeThread(a, b.thread)) { - return b.thread = c, b; + if (c = Entry.Engine.computeThread(b, a.thread)) { + return a.thread = c, a; } - delete b.thread; - return b.callReturn(); + delete a.thread; + return a.callReturn(); }; +Entry.block.function_general = {skeleton:"basic", color:"#cc7337", template:"\ud568\uc218", params:[], func:function(b) { + if (!this.initiated) { + this.initiated = !0; + var a = Entry.variableContainer.getFunction(this.block.type.substr(5, 9)); + this.funcCode = a.content; + this.funcExecutor = this.funcCode.raiseEvent("funcDef", b)[0]; + this.funcExecutor.register.params = this.getParams(); + this.funcExecutor.register.paramMap = a.paramMap; + } + this.funcExecutor.execute(); + if (!this.funcExecutor.isEnd()) { + return this.funcCode.removeExecutor(this.funcExecutor), Entry.STATIC.BREAK; + } +}}; Entry.Hamster = {PORT_MAP:{leftWheel:0, rightWheel:0, buzzer:0, outputA:0, outputB:0, leftLed:0, rightLed:0, note:0, lineTracerMode:0, lineTracerModeId:0, lineTracerSpeed:5, ioModeA:0, ioModeB:0}, setZero:function() { - var a = Entry.Hamster.PORT_MAP, b = Entry.hw.sendQueue, c; - for (c in a) { - b[c] = a[c]; + var b = Entry.Hamster.PORT_MAP, a = Entry.hw.sendQueue, c; + for (c in b) { + a[c] = b[c]; } Entry.hw.update(); - a = Entry.Hamster; - a.lineTracerModeId = 0; - a.lineTracerStateId = -1; - a.tempo = 60; - a.removeAllTimeouts(); -}, lineTracerModeId:0, lineTracerStateId:-1, tempo:60, timeouts:[], removeTimeout:function(a) { - clearTimeout(a); - var b = this.timeouts; - a = b.indexOf(a); - 0 <= a && b.splice(a, 1); + b = Entry.Hamster; + b.lineTracerModeId = 0; + b.lineTracerStateId = -1; + b.tempo = 60; + b.removeAllTimeouts(); +}, lineTracerModeId:0, lineTracerStateId:-1, tempo:60, timeouts:[], removeTimeout:function(b) { + clearTimeout(b); + var a = this.timeouts; + b = a.indexOf(b); + 0 <= b && a.splice(b, 1); }, removeAllTimeouts:function() { - var a = this.timeouts, b; - for (b in a) { - clearTimeout(a[b]); + var b = this.timeouts, a; + for (a in b) { + clearTimeout(b[a]); } this.timeouts = []; -}, setLineTracerMode:function(a, b) { +}, setLineTracerMode:function(b, a) { this.lineTracerModeId = this.lineTracerModeId + 1 & 255; - a.lineTracerMode = b; - a.lineTracerModeId = this.lineTracerModeId; + b.lineTracerMode = a; + b.lineTracerModeId = this.lineTracerModeId; }, name:"hamster", monitorTemplate:{imgPath:"hw/hamster.png", width:256, height:256, listPorts:{temperature:{name:Lang.Blocks.HAMSTER_sensor_temperature, type:"input", pos:{x:0, y:0}}, accelerationX:{name:Lang.Blocks.HAMSTER_sensor_accelerationX, type:"input", pos:{x:0, y:0}}, accelerationY:{name:Lang.Blocks.HAMSTER_sensor_accelerationY, type:"input", pos:{x:0, y:0}}, accelerationZ:{name:Lang.Blocks.HAMSTER_sensor_accelerationZ, type:"input", pos:{x:0, y:0}}, buzzer:{name:Lang.Hw.buzzer, type:"output", pos:{x:0, y:0}}, note:{name:Lang.Hw.buzzer + "2", type:"output", pos:{x:0, y:0}}, outputA:{name:Lang.Hw.output + "A", type:"output", pos:{x:0, y:0}}, outputB:{name:Lang.Hw.output + "B", type:"output", pos:{x:0, y:0}}}, ports:{leftProximity:{name:Lang.Blocks.HAMSTER_sensor_leftProximity, type:"input", pos:{x:122, y:156}}, rightProximity:{name:Lang.Blocks.HAMSTER_sensor_rightProximity, type:"input", pos:{x:10, y:108}}, leftFloor:{name:Lang.Blocks.HAMSTER_sensor_leftFloor, type:"input", pos:{x:100, y:234}}, rightFloor:{name:Lang.Blocks.HAMSTER_sensor_rightFloor, type:"input", pos:{x:13, y:180}}, lightsensor:{name:Lang.Hw.light + Lang.Hw.sensor, type:"input", pos:{x:56, y:189}}, leftWheel:{name:Lang.Hw.leftWheel, type:"output", pos:{x:209, y:115}}, rightWheel:{name:Lang.Hw.rightWheel, type:"output", pos:{x:98, y:30}}, leftLed:{name:Lang.Hw.left + " " + Lang.Hw.led, type:"output", pos:{x:87, y:210}}, rightLed:{name:Lang.Hw.right + " " + Lang.Hw.led, type:"output", pos:{x:24, y:168}}}, mode:"both"}}; @@ -2304,7 +2450,7 @@ Blockly.Blocks.hamster_hand_found = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.hamster_hand_found = function(a, b) { +Entry.block.hamster_hand_found = function(b, a) { var c = Entry.hw.portData; return 50 < c.leftProximity || 50 < c.rightProximity; }; @@ -2315,8 +2461,8 @@ Blockly.Blocks.hamster_value = {init:function() { this.setInputsInline(!0); this.setOutput(!0, "Number"); }}; -Entry.block.hamster_value = function(a, b) { - var c = Entry.hw.portData, d = b.getField("DEVICE"); +Entry.block.hamster_value = function(b, a) { + var c = Entry.hw.portData, d = a.getField("DEVICE"); return c[d]; }; Blockly.Blocks.hamster_move_forward_once = {init:function() { @@ -2326,21 +2472,21 @@ Blockly.Blocks.hamster_move_forward_once = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_move_forward_once = function(a, b) { +Entry.block.hamster_move_forward_once = function(b, a) { var c = Entry.hw.sendQueue, d = Entry.hw.portData; - if (b.isStart) { - if (b.isMoving) { - switch(b.boardState) { + if (a.isStart) { + if (a.isMoving) { + switch(a.boardState) { case 1: - 2 > b.count ? (50 > d.leftFloor && 50 > d.rightFloor ? b.count++ : b.count = 0, d = d.leftFloor - d.rightFloor, c.leftWheel = 45 + .25 * d, c.rightWheel = 45 - .25 * d) : (b.count = 0, b.boardState = 2); + 2 > a.count ? (50 > d.leftFloor && 50 > d.rightFloor ? a.count++ : a.count = 0, d = d.leftFloor - d.rightFloor, c.leftWheel = 45 + .25 * d, c.rightWheel = 45 - .25 * d) : (a.count = 0, a.boardState = 2); break; case 2: d = d.leftFloor - d.rightFloor; c.leftWheel = 45 + .25 * d; c.rightWheel = 45 - .25 * d; - b.boardState = 3; + a.boardState = 3; var e = setTimeout(function() { - b.boardState = 4; + a.boardState = 4; Entry.Hamster.removeTimeout(e); }, 250); Entry.Hamster.timeouts.push(e); @@ -2351,27 +2497,27 @@ Entry.block.hamster_move_forward_once = function(a, b) { c.rightWheel = 45 - .25 * d; break; case 4: - c.leftWheel = 0, c.rightWheel = 0, b.boardState = 0, b.isMoving = !1; + c.leftWheel = 0, c.rightWheel = 0, a.boardState = 0, a.isMoving = !1; } - return b; + return a; } - delete b.isStart; - delete b.isMoving; - delete b.count; - delete b.boardState; + delete a.isStart; + delete a.isMoving; + delete a.count; + delete a.boardState; Entry.engine.isContinue = !1; c.leftWheel = 0; c.rightWheel = 0; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.isMoving = !0; - b.count = 0; - b.boardState = 1; + a.isStart = !0; + a.isMoving = !0; + a.count = 0; + a.boardState = 1; c.leftWheel = 45; c.rightWheel = 45; Entry.Hamster.setLineTracerMode(c, 0); - return b; + return a; }; Blockly.Blocks.hamster_turn_once = {init:function() { this.setColour("#00979D"); @@ -2380,64 +2526,64 @@ Blockly.Blocks.hamster_turn_once = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_turn_once = function(a, b) { +Entry.block.hamster_turn_once = function(b, a) { var c = Entry.hw.sendQueue, d = Entry.hw.portData; - if (b.isStart) { - if (b.isMoving) { - if (b.isLeft) { - switch(b.boardState) { + if (a.isStart) { + if (a.isMoving) { + if (a.isLeft) { + switch(a.boardState) { case 1: - 2 > b.count ? 50 < d.leftFloor && b.count++ : (b.count = 0, b.boardState = 2); + 2 > a.count ? 50 < d.leftFloor && a.count++ : (a.count = 0, a.boardState = 2); break; case 2: - 20 > d.leftFloor && (b.boardState = 3); + 20 > d.leftFloor && (a.boardState = 3); break; case 3: - 2 > b.count ? 20 > d.leftFloor && b.count++ : (b.count = 0, b.boardState = 4); + 2 > a.count ? 20 > d.leftFloor && a.count++ : (a.count = 0, a.boardState = 4); break; case 4: - 50 < d.leftFloor && (b.boardState = 5); + 50 < d.leftFloor && (a.boardState = 5); break; case 5: - d = d.leftFloor - d.rightFloor, -15 < d ? (c.leftWheel = 0, c.rightWheel = 0, b.boardState = 0, b.isMoving = !1) : (c.leftWheel = .5 * d, c.rightWheel = .5 * -d); + d = d.leftFloor - d.rightFloor, -15 < d ? (c.leftWheel = 0, c.rightWheel = 0, a.boardState = 0, a.isMoving = !1) : (c.leftWheel = .5 * d, c.rightWheel = .5 * -d); } } else { - switch(b.boardState) { + switch(a.boardState) { case 1: - 2 > b.count ? 50 < d.rightFloor && b.count++ : (b.count = 0, b.boardState = 2); + 2 > a.count ? 50 < d.rightFloor && a.count++ : (a.count = 0, a.boardState = 2); break; case 2: - 20 > d.rightFloor && (b.boardState = 3); + 20 > d.rightFloor && (a.boardState = 3); break; case 3: - 2 > b.count ? 20 > d.rightFloor && b.count++ : (b.count = 0, b.boardState = 4); + 2 > a.count ? 20 > d.rightFloor && a.count++ : (a.count = 0, a.boardState = 4); break; case 4: - 50 < d.rightFloor && (b.boardState = 5); + 50 < d.rightFloor && (a.boardState = 5); break; case 5: - d = d.rightFloor - d.leftFloor, -15 < d ? (c.leftWheel = 0, c.rightWheel = 0, b.boardState = 0, b.isMoving = !1) : (c.leftWheel = .5 * -d, c.rightWheel = .5 * d); + d = d.rightFloor - d.leftFloor, -15 < d ? (c.leftWheel = 0, c.rightWheel = 0, a.boardState = 0, a.isMoving = !1) : (c.leftWheel = .5 * -d, c.rightWheel = .5 * d); } } - return b; + return a; } - delete b.isStart; - delete b.isMoving; - delete b.count; - delete b.boardState; - delete b.isLeft; + delete a.isStart; + delete a.isMoving; + delete a.count; + delete a.boardState; + delete a.isLeft; Entry.engine.isContinue = !1; c.leftWheel = 0; c.rightWheel = 0; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.isMoving = !0; - b.count = 0; - b.boardState = 1; - "LEFT" == b.getField("DIRECTION", b) ? (b.isLeft = !0, c.leftWheel = -45, c.rightWheel = 45) : (b.isLeft = !1, c.leftWheel = 45, c.rightWheel = -45); + a.isStart = !0; + a.isMoving = !0; + a.count = 0; + a.boardState = 1; + "LEFT" == a.getField("DIRECTION", a) ? (a.isLeft = !0, c.leftWheel = -45, c.rightWheel = 45) : (a.isLeft = !1, c.leftWheel = 45, c.rightWheel = -45); Entry.Hamster.setLineTracerMode(c, 0); - return b; + return a; }; Blockly.Blocks.hamster_move_forward_for_secs = {init:function() { this.setColour("#00979D"); @@ -2448,30 +2594,30 @@ Blockly.Blocks.hamster_move_forward_for_secs = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_move_forward_for_secs = function(a, b) { +Entry.block.hamster_move_forward_for_secs = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.isStart; - delete b.timeFlag; + delete a.isStart; + delete a.timeFlag; Entry.engine.isContinue = !1; c.leftWheel = 0; c.rightWheel = 0; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; + a.isStart = !0; + a.timeFlag = 1; c.leftWheel = 30; c.rightWheel = 30; Entry.Hamster.setLineTracerMode(c, 0); - var c = 1E3 * b.getNumberValue("VALUE"), d = setTimeout(function() { - b.timeFlag = 0; + var c = 1E3 * a.getNumberValue("VALUE"), d = setTimeout(function() { + a.timeFlag = 0; Entry.Hamster.removeTimeout(d); }, c); Entry.Hamster.timeouts.push(d); - return b; + return a; }; Blockly.Blocks.hamster_move_backward_for_secs = {init:function() { this.setColour("#00979D"); @@ -2482,30 +2628,30 @@ Blockly.Blocks.hamster_move_backward_for_secs = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_move_backward_for_secs = function(a, b) { +Entry.block.hamster_move_backward_for_secs = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.isStart; - delete b.timeFlag; + delete a.isStart; + delete a.timeFlag; Entry.engine.isContinue = !1; c.leftWheel = 0; c.rightWheel = 0; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; + a.isStart = !0; + a.timeFlag = 1; c.leftWheel = -30; c.rightWheel = -30; Entry.Hamster.setLineTracerMode(c, 0); - var c = 1E3 * b.getNumberValue("VALUE"), d = setTimeout(function() { - b.timeFlag = 0; + var c = 1E3 * a.getNumberValue("VALUE"), d = setTimeout(function() { + a.timeFlag = 0; Entry.Hamster.removeTimeout(d); }, c); Entry.Hamster.timeouts.push(d); - return b; + return a; }; Blockly.Blocks.hamster_turn_for_secs = {init:function() { this.setColour("#00979D"); @@ -2516,29 +2662,29 @@ Blockly.Blocks.hamster_turn_for_secs = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_turn_for_secs = function(a, b) { +Entry.block.hamster_turn_for_secs = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.isStart; - delete b.timeFlag; + delete a.isStart; + delete a.timeFlag; Entry.engine.isContinue = !1; c.leftWheel = 0; c.rightWheel = 0; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; - "LEFT" == b.getField("DIRECTION", b) ? (c.leftWheel = -30, c.rightWheel = 30) : (c.leftWheel = 30, c.rightWheel = -30); + a.isStart = !0; + a.timeFlag = 1; + "LEFT" == a.getField("DIRECTION", a) ? (c.leftWheel = -30, c.rightWheel = 30) : (c.leftWheel = 30, c.rightWheel = -30); Entry.Hamster.setLineTracerMode(c, 0); - var c = 1E3 * b.getNumberValue("VALUE"), d = setTimeout(function() { - b.timeFlag = 0; + var c = 1E3 * a.getNumberValue("VALUE"), d = setTimeout(function() { + a.timeFlag = 0; Entry.Hamster.removeTimeout(d); }, c); Entry.Hamster.timeouts.push(d); - return b; + return a; }; Blockly.Blocks.hamster_change_both_wheels_by = {init:function() { this.setColour("#00979D"); @@ -2551,12 +2697,12 @@ Blockly.Blocks.hamster_change_both_wheels_by = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_change_both_wheels_by = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getNumberValue("LEFT"), e = b.getNumberValue("RIGHT"); +Entry.block.hamster_change_both_wheels_by = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getNumberValue("LEFT"), e = a.getNumberValue("RIGHT"); c.leftWheel = void 0 != c.leftWheel ? c.leftWheel + d : d; c.rightWheel = void 0 != c.rightWheel ? c.rightWheel + e : e; Entry.Hamster.setLineTracerMode(c, 0); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_set_both_wheels_to = {init:function() { this.setColour("#00979D"); @@ -2569,12 +2715,12 @@ Blockly.Blocks.hamster_set_both_wheels_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_set_both_wheels_to = function(a, b) { +Entry.block.hamster_set_both_wheels_to = function(b, a) { var c = Entry.hw.sendQueue; - c.leftWheel = b.getNumberValue("LEFT"); - c.rightWheel = b.getNumberValue("RIGHT"); + c.leftWheel = a.getNumberValue("LEFT"); + c.rightWheel = a.getNumberValue("RIGHT"); Entry.Hamster.setLineTracerMode(c, 0); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_change_wheel_by = {init:function() { this.setColour("#00979D"); @@ -2585,11 +2731,11 @@ Blockly.Blocks.hamster_change_wheel_by = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_change_wheel_by = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("DIRECTION"), e = b.getNumberValue("VALUE"); +Entry.block.hamster_change_wheel_by = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("DIRECTION"), e = a.getNumberValue("VALUE"); "LEFT" == d ? c.leftWheel = void 0 != c.leftWheel ? c.leftWheel + e : e : ("RIGHT" != d && (c.leftWheel = void 0 != c.leftWheel ? c.leftWheel + e : e), c.rightWheel = void 0 != c.rightWheel ? c.rightWheel + e : e); Entry.Hamster.setLineTracerMode(c, 0); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_set_wheel_to = {init:function() { this.setColour("#00979D"); @@ -2600,11 +2746,11 @@ Blockly.Blocks.hamster_set_wheel_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_set_wheel_to = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("DIRECTION"), e = b.getNumberValue("VALUE"); +Entry.block.hamster_set_wheel_to = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("DIRECTION"), e = a.getNumberValue("VALUE"); "LEFT" == d ? c.leftWheel = e : ("RIGHT" != d && (c.leftWheel = e), c.rightWheel = e); Entry.Hamster.setLineTracerMode(c, 0); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_follow_line_using = {init:function() { this.setColour("#00979D"); @@ -2614,14 +2760,14 @@ Blockly.Blocks.hamster_follow_line_using = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_follow_line_using = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("COLOR"), e = b.getField("DIRECTION"), f = 1; +Entry.block.hamster_follow_line_using = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("COLOR"), e = a.getField("DIRECTION"), f = 1; "RIGHT" == e ? f = 2 : "BOTH" == e && (f = 3); "WHITE" == d && (f += 7); c.leftWheel = 0; c.rightWheel = 0; Entry.Hamster.setLineTracerMode(c, f); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_follow_line_until = {init:function() { this.setColour("#00979D"); @@ -2631,18 +2777,18 @@ Blockly.Blocks.hamster_follow_line_until = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_follow_line_until = function(a, b) { - var c = Entry.hw.sendQueue, d = Entry.hw.portData, e = b.getField("COLOR"), f = b.getField("DIRECTION"), g = 4; +Entry.block.hamster_follow_line_until = function(b, a) { + var c = Entry.hw.sendQueue, d = Entry.hw.portData, e = a.getField("COLOR"), f = a.getField("DIRECTION"), g = 4; "RIGHT" == f ? g = 5 : "FRONT" == f ? g = 6 : "REAR" == f && (g = 7); "WHITE" == e && (g += 7); - if (b.isStart) { + if (a.isStart) { if (e = Entry.Hamster, d.lineTracerStateId != e.lineTracerStateId && (e.lineTracerStateId = d.lineTracerStateId, 64 == d.lineTracerState)) { - return delete b.isStart, Entry.engine.isContinue = !1, e.setLineTracerMode(c, 0), b.callReturn(); + return delete a.isStart, Entry.engine.isContinue = !1, e.setLineTracerMode(c, 0), a.callReturn(); } } else { - b.isStart = !0, c.leftWheel = 0, c.rightWheel = 0, Entry.Hamster.setLineTracerMode(c, g); + a.isStart = !0, c.leftWheel = 0, c.rightWheel = 0, Entry.Hamster.setLineTracerMode(c, g); } - return b; + return a; }; Blockly.Blocks.hamster_set_following_speed_to = {init:function() { this.setColour("#00979D"); @@ -2651,9 +2797,9 @@ Blockly.Blocks.hamster_set_following_speed_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_set_following_speed_to = function(a, b) { - Entry.hw.sendQueue.lineTracerSpeed = +b.getField("SPEED", b); - return b.callReturn(); +Entry.block.hamster_set_following_speed_to = function(b, a) { + Entry.hw.sendQueue.lineTracerSpeed = Number(a.getField("SPEED", a)); + return a.callReturn(); }; Blockly.Blocks.hamster_stop = {init:function() { this.setColour("#00979D"); @@ -2662,12 +2808,12 @@ Blockly.Blocks.hamster_stop = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_stop = function(a, b) { +Entry.block.hamster_stop = function(b, a) { var c = Entry.hw.sendQueue; c.leftWheel = 0; c.rightWheel = 0; Entry.Hamster.setLineTracerMode(c, 0); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_set_led_to = {init:function() { this.setColour("#00979D"); @@ -2677,10 +2823,10 @@ Blockly.Blocks.hamster_set_led_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_set_led_to = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("DIRECTION", b), e = +b.getField("COLOR", b); +Entry.block.hamster_set_led_to = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("DIRECTION", a), e = Number(a.getField("COLOR", a)); "LEFT" == d ? c.leftLed = e : ("RIGHT" != d && (c.leftLed = e), c.rightLed = e); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_clear_led = {init:function() { this.setColour("#00979D"); @@ -2689,10 +2835,10 @@ Blockly.Blocks.hamster_clear_led = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_clear_led = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("DIRECTION", b); +Entry.block.hamster_clear_led = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("DIRECTION", a); "LEFT" == d ? c.leftLed = 0 : ("RIGHT" != d && (c.leftLed = 0), c.rightLed = 0); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_beep = {init:function() { this.setColour("#00979D"); @@ -2701,28 +2847,28 @@ Blockly.Blocks.hamster_beep = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_beep = function(a, b) { +Entry.block.hamster_beep = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.isStart; - delete b.timeFlag; + delete a.isStart; + delete a.timeFlag; Entry.engine.isContinue = !1; c.buzzer = 0; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; + a.isStart = !0; + a.timeFlag = 1; c.buzzer = 440; c.note = 0; var d = setTimeout(function() { - b.timeFlag = 0; + a.timeFlag = 0; Entry.Hamster.removeTimeout(d); }, 200); Entry.Hamster.timeouts.push(d); - return b; + return a; }; Blockly.Blocks.hamster_change_buzzer_by = {init:function() { this.setColour("#00979D"); @@ -2733,11 +2879,11 @@ Blockly.Blocks.hamster_change_buzzer_by = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_change_buzzer_by = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getNumberValue("VALUE"); +Entry.block.hamster_change_buzzer_by = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getNumberValue("VALUE"); c.buzzer = void 0 != c.buzzer ? c.buzzer + d : d; c.note = 0; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_set_buzzer_to = {init:function() { this.setColour("#00979D"); @@ -2748,11 +2894,11 @@ Blockly.Blocks.hamster_set_buzzer_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_set_buzzer_to = function(a, b) { +Entry.block.hamster_set_buzzer_to = function(b, a) { var c = Entry.hw.sendQueue; - c.buzzer = b.getNumberValue("VALUE"); + c.buzzer = a.getNumberValue("VALUE"); c.note = 0; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_clear_buzzer = {init:function() { this.setColour("#00979D"); @@ -2761,11 +2907,11 @@ Blockly.Blocks.hamster_clear_buzzer = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_clear_buzzer = function(a, b) { +Entry.block.hamster_clear_buzzer = function(b, a) { var c = Entry.hw.sendQueue; c.buzzer = 0; c.note = 0; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_play_note_for = {init:function() { this.setColour("#00979D"); @@ -2777,21 +2923,21 @@ Blockly.Blocks.hamster_play_note_for = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_play_note_for = function(a, b) { +Entry.block.hamster_play_note_for = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.isStart; - delete b.timeFlag; + delete a.isStart; + delete a.timeFlag; Entry.engine.isContinue = !1; c.note = 0; - return b.callReturn(); + return a.callReturn(); } - var d = b.getNumberField("NOTE", b), e = b.getNumberField("OCTAVE", b), f = b.getNumberValue("VALUE", b), g = Entry.Hamster.tempo, f = 6E4 * f / g; - b.isStart = !0; - b.timeFlag = 1; + var d = a.getNumberField("NOTE", a), e = a.getNumberField("OCTAVE", a), f = a.getNumberValue("VALUE", a), g = Entry.Hamster.tempo, f = 6E4 * f / g; + a.isStart = !0; + a.timeFlag = 1; c.buzzer = 0; c.note = d + 12 * (e - 1); if (100 < f) { @@ -2802,11 +2948,11 @@ Entry.block.hamster_play_note_for = function(a, b) { Entry.Hamster.timeouts.push(h); } var k = setTimeout(function() { - b.timeFlag = 0; + a.timeFlag = 0; Entry.Hamster.removeTimeout(k); }, f); Entry.Hamster.timeouts.push(k); - return b; + return a; }; Blockly.Blocks.hamster_rest_for = {init:function() { this.setColour("#00979D"); @@ -2817,28 +2963,28 @@ Blockly.Blocks.hamster_rest_for = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_rest_for = function(a, b) { +Entry.block.hamster_rest_for = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.isStart; - delete b.timeFlag; + delete a.isStart; + delete a.timeFlag; Entry.engine.isContinue = !1; - return b.callReturn(); + return a.callReturn(); } - b.isStart = !0; - b.timeFlag = 1; - var d = b.getNumberValue("VALUE"), d = 6E4 * d / Entry.Hamster.tempo; + a.isStart = !0; + a.timeFlag = 1; + var d = a.getNumberValue("VALUE"), d = 6E4 * d / Entry.Hamster.tempo; c.buzzer = 0; c.note = 0; var e = setTimeout(function() { - b.timeFlag = 0; + a.timeFlag = 0; Entry.Hamster.removeTimeout(e); }, d); Entry.Hamster.timeouts.push(e); - return b; + return a; }; Blockly.Blocks.hamster_change_tempo_by = {init:function() { this.setColour("#00979D"); @@ -2849,10 +2995,10 @@ Blockly.Blocks.hamster_change_tempo_by = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_change_tempo_by = function(a, b) { - Entry.Hamster.tempo += b.getNumberValue("VALUE"); +Entry.block.hamster_change_tempo_by = function(b, a) { + Entry.Hamster.tempo += a.getNumberValue("VALUE"); 1 > Entry.Hamster.tempo && (Entry.Hamster.tempo = 1); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_set_tempo_to = {init:function() { this.setColour("#00979D"); @@ -2863,10 +3009,10 @@ Blockly.Blocks.hamster_set_tempo_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_set_tempo_to = function(a, b) { - Entry.Hamster.tempo = b.getNumberValue("VALUE"); +Entry.block.hamster_set_tempo_to = function(b, a) { + Entry.Hamster.tempo = a.getNumberValue("VALUE"); 1 > Entry.Hamster.tempo && (Entry.Hamster.tempo = 1); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_set_port_to = {init:function() { this.setColour("#00979D"); @@ -2876,10 +3022,10 @@ Blockly.Blocks.hamster_set_port_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_set_port_to = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("PORT", b), e = +b.getField("MODE", b); +Entry.block.hamster_set_port_to = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("PORT", a), e = Number(a.getField("MODE", a)); "A" == d ? c.ioModeA = e : ("B" != d && (c.ioModeA = e), c.ioModeB = e); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_change_output_by = {init:function() { this.setColour("#00979D"); @@ -2890,10 +3036,10 @@ Blockly.Blocks.hamster_change_output_by = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_change_output_by = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("PORT"), e = b.getNumberValue("VALUE"); +Entry.block.hamster_change_output_by = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("PORT"), e = a.getNumberValue("VALUE"); "A" == d ? c.outputA = void 0 != c.outputA ? c.outputA + e : e : ("B" != d && (c.outputA = void 0 != c.outputA ? c.outputA + e : e), c.outputB = void 0 != c.outputB ? c.outputB + e : e); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hamster_set_output_to = {init:function() { this.setColour("#00979D"); @@ -2904,10 +3050,10 @@ Blockly.Blocks.hamster_set_output_to = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hamster_set_output_to = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getField("PORT"), e = b.getNumberValue("VALUE"); +Entry.block.hamster_set_output_to = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getField("PORT"), e = a.getNumberValue("VALUE"); "A" == d ? c.outputA = e : ("B" != d && (c.outputA = e), c.outputB = e); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.is_clicked = {init:function() { this.setColour("#AEB8FF"); @@ -2915,7 +3061,7 @@ Blockly.Blocks.is_clicked = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.is_clicked = function(a, b) { +Entry.block.is_clicked = function(b, a) { return Entry.stage.isClick; }; Blockly.Blocks.is_press_some_key = {init:function() { @@ -2925,9 +3071,9 @@ Blockly.Blocks.is_press_some_key = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.is_press_some_key = function(a, b) { - var c = +b.getField("VALUE", b); - return 0 <= Entry.engine.pressedKeys.indexOf(c); +Entry.block.is_press_some_key = function(b, a) { + var c = Number(a.getField("VALUE", a)); + return 0 <= Entry.pressedKeys.indexOf(c); }; Blockly.Blocks.reach_something = {init:function() { this.setColour("#AEB8FF"); @@ -2937,11 +3083,11 @@ Blockly.Blocks.reach_something = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.reach_something = function(a, b) { - if (!a.getVisible()) { +Entry.block.reach_something = function(b, a) { + if (!b.getVisible()) { return !1; } - var c = b.getField("VALUE", b), d = a.object, e = /wall/.test(c), f = ndgmr.checkPixelCollision; + var c = a.getField("VALUE", a), d = b.object, e = /wall/.test(c), f = ndgmr.checkPixelCollision; if (e) { switch(e = Entry.stage.wall, c) { case "wall": @@ -2975,7 +3121,7 @@ Entry.block.reach_something = function(a, b) { return f = Entry.stage.canvas, f = d.globalToLocal(f.mouseX, f.mouseY), d.hitTest(f.x, f.y); } c = Entry.container.getEntity(c); - if ("textBox" == c.type || "textBox" == a.type) { + if ("textBox" == c.type || "textBox" == b.type) { f = c.object.getTransformedBounds(); d = d.getTransformedBounds(); if (Entry.checkCollisionRect(d, f)) { @@ -3010,8 +3156,8 @@ Blockly.Blocks.boolean_comparison = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.boolean_comparison = function(a, b) { - var c = b.getField("OPERATOR", b), d = b.getNumberValue("LEFTHAND", b), e = b.getNumberValue("RIGHTHAND", b); +Entry.block.boolean_comparison = function(b, a) { + var c = a.getField("OPERATOR", a), d = a.getNumberValue("LEFTHAND", a), e = a.getNumberValue("RIGHTHAND", a); return "EQUAL" == c ? d == e : "BIGGER" == c ? d > e : d < e; }; Blockly.Blocks.boolean_equal = {init:function() { @@ -3022,8 +3168,8 @@ Blockly.Blocks.boolean_equal = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.boolean_equal = function(a, b) { - var c = b.getStringValue("LEFTHAND", b), d = b.getStringValue("RIGHTHAND", b); +Entry.block.boolean_equal = function(b, a) { + var c = a.getStringValue("LEFTHAND", a), d = a.getStringValue("RIGHTHAND", a); return c == d; }; Blockly.Blocks.boolean_bigger = {init:function() { @@ -3034,8 +3180,8 @@ Blockly.Blocks.boolean_bigger = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.boolean_bigger = function(a, b) { - var c = b.getNumberValue("LEFTHAND", b), d = b.getNumberValue("RIGHTHAND", b); +Entry.block.boolean_bigger = function(b, a) { + var c = a.getNumberValue("LEFTHAND", a), d = a.getNumberValue("RIGHTHAND", a); return c > d; }; Blockly.Blocks.boolean_smaller = {init:function() { @@ -3046,8 +3192,8 @@ Blockly.Blocks.boolean_smaller = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.boolean_smaller = function(a, b) { - var c = b.getNumberValue("LEFTHAND", b), d = b.getNumberValue("RIGHTHAND", b); +Entry.block.boolean_smaller = function(b, a) { + var c = a.getNumberValue("LEFTHAND", a), d = a.getNumberValue("RIGHTHAND", a); return c < d; }; Blockly.Blocks.boolean_and_or = {init:function() { @@ -3058,8 +3204,8 @@ Blockly.Blocks.boolean_and_or = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.boolean_and_or = function(a, b) { - var c = b.getField("OPERATOR", b), d = b.getBooleanValue("LEFTHAND", b), e = b.getBooleanValue("RIGHTHAND", b); +Entry.block.boolean_and_or = function(b, a) { + var c = a.getField("OPERATOR", a), d = a.getBooleanValue("LEFTHAND", a), e = a.getBooleanValue("RIGHTHAND", a); return "AND" == c ? d && e : d || e; }; Blockly.Blocks.boolean_and = {init:function() { @@ -3070,8 +3216,8 @@ Blockly.Blocks.boolean_and = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.boolean_and = function(a, b) { - var c = b.getBooleanValue("LEFTHAND", b), d = b.getBooleanValue("RIGHTHAND", b); +Entry.block.boolean_and = function(b, a) { + var c = a.getBooleanValue("LEFTHAND", a), d = a.getBooleanValue("RIGHTHAND", a); return c && d; }; Blockly.Blocks.boolean_or = {init:function() { @@ -3082,8 +3228,8 @@ Blockly.Blocks.boolean_or = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.boolean_or = function(a, b) { - var c = b.getBooleanValue("LEFTHAND", b), d = b.getBooleanValue("RIGHTHAND", b); +Entry.block.boolean_or = function(b, a) { + var c = a.getBooleanValue("LEFTHAND", a), d = a.getBooleanValue("RIGHTHAND", a); return c || d; }; Blockly.Blocks.boolean_not = {init:function() { @@ -3095,8 +3241,8 @@ Blockly.Blocks.boolean_not = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.boolean_not = function(a, b) { - return !b.getBooleanValue("VALUE"); +Entry.block.boolean_not = function(b, a) { + return !a.getBooleanValue("VALUE"); }; Blockly.Blocks.true_or_false = {init:function() { this.setColour("#AEB8FF"); @@ -3105,8 +3251,8 @@ Blockly.Blocks.true_or_false = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.true_or_false = function(a, b) { - return "true" == b.children[0].textContent; +Entry.block.true_or_false = function(b, a) { + return "true" == a.children[0].textContent; }; Blockly.Blocks.True = {init:function() { this.setColour("#AEB8FF"); @@ -3114,7 +3260,7 @@ Blockly.Blocks.True = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.True = function(a, b) { +Entry.block.True = function(b, a) { return !0; }; Blockly.Blocks.False = {init:function() { @@ -3123,7 +3269,7 @@ Blockly.Blocks.False = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.False = function(a, b) { +Entry.block.False = function(b, a) { return !1; }; Blockly.Blocks.boolean_basic_operator = {init:function() { @@ -3134,19 +3280,19 @@ Blockly.Blocks.boolean_basic_operator = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.boolean_basic_operator = function(a, b) { - var c = b.getField("OPERATOR", b), d = b.getStringValue("LEFTHAND", b), e = b.getStringValue("RIGHTHAND", b); +Entry.block.boolean_basic_operator = function(b, a) { + var c = a.getField("OPERATOR", a), d = a.getStringValue("LEFTHAND", a), e = a.getStringValue("RIGHTHAND", a); switch(c) { case "EQUAL": return d == e; case "GREATER": - return +d > +e; + return Number(d) > Number(e); case "LESS": - return +d < +e; + return Number(d) < Number(e); case "GREATER_OR_EQUAL": - return +d >= +e; + return Number(d) >= Number(e); case "LESS_OR_EQUAL": - return +d <= +e; + return Number(d) <= Number(e); } }; Blockly.Blocks.show = {init:function() { @@ -3156,9 +3302,9 @@ Blockly.Blocks.show = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.show = function(a, b) { - a.setVisible(!0); - return b.callReturn(); +Entry.block.show = function(b, a) { + b.setVisible(!0); + return a.callReturn(); }; Blockly.Blocks.hide = {init:function() { this.setColour("#EC4466"); @@ -3167,9 +3313,9 @@ Blockly.Blocks.hide = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hide = function(a, b) { - a.setVisible(!1); - return b.callReturn(); +Entry.block.hide = function(b, a) { + b.setVisible(!1); + return a.callReturn(); }; Blockly.Blocks.dialog_time = {init:function() { this.setColour("#EC4466"); @@ -3184,20 +3330,20 @@ Blockly.Blocks.dialog_time = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.dialog_time = function(a, b) { - if (!b.isStart) { - var c = b.getNumberValue("SECOND", b), d = b.getStringValue("VALUE", b), e = b.getField("OPTION", b); - b.isStart = !0; - b.timeFlag = 1; +Entry.block.dialog_time = function(b, a) { + if (!a.isStart) { + var c = a.getNumberValue("SECOND", a), d = a.getStringValue("VALUE", a), e = a.getField("OPTION", a); + a.isStart = !0; + a.timeFlag = 1; d || "number" == typeof d || (d = " "); d = Entry.convertToRoundedDecimals(d, 3); - new Entry.Dialog(a, d, e); - a.syncDialogVisible(a.getVisible()); + new Entry.Dialog(b, d, e); + b.syncDialogVisible(b.getVisible()); setTimeout(function() { - b.timeFlag = 0; + a.timeFlag = 0; }, 1E3 * c); } - return 0 == b.timeFlag ? (delete b.timeFlag, delete b.isStart, a.dialog && a.dialog.remove(), b.callReturn()) : b; + return 0 == a.timeFlag ? (delete a.timeFlag, delete a.isStart, b.dialog && b.dialog.remove(), a.callReturn()) : a; }; Blockly.Blocks.dialog = {init:function() { this.setColour("#EC4466"); @@ -3210,13 +3356,13 @@ Blockly.Blocks.dialog = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.dialog = function(a, b) { - var c = b.getStringValue("VALUE", b); +Entry.block.dialog = function(b, a) { + var c = a.getStringValue("VALUE", a); c || "number" == typeof c || (c = " "); - var d = b.getField("OPTION", b), c = Entry.convertToRoundedDecimals(c, 3); - new Entry.Dialog(a, c, d); - a.syncDialogVisible(a.getVisible()); - return b.callReturn(); + var d = a.getField("OPTION", a), c = Entry.convertToRoundedDecimals(c, 3); + new Entry.Dialog(b, c, d); + b.syncDialogVisible(b.getVisible()); + return a.callReturn(); }; Blockly.Blocks.remove_dialog = {init:function() { this.setColour("#EC4466"); @@ -3225,9 +3371,9 @@ Blockly.Blocks.remove_dialog = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.remove_dialog = function(a, b) { - a.dialog && a.dialog.remove(); - return b.callReturn(); +Entry.block.remove_dialog = function(b, a) { + b.dialog && b.dialog.remove(); + return a.callReturn(); }; Blockly.Blocks.change_to_nth_shape = {init:function() { this.setColour("#EC4466"); @@ -3238,10 +3384,10 @@ Blockly.Blocks.change_to_nth_shape = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.change_to_nth_shape = function(a, b) { - var c = b.getField("VALUE", b), c = a.parent.getPicture(c); - a.setImage(c); - return b.callReturn(); +Entry.block.change_to_nth_shape = function(b, a) { + var c = a.getField("VALUE", a), c = b.parent.getPicture(c); + b.setImage(c); + return a.callReturn(); }; Blockly.Blocks.change_to_next_shape = {init:function() { this.setColour("#EC4466"); @@ -3250,11 +3396,11 @@ Blockly.Blocks.change_to_next_shape = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.change_to_next_shape = function(a, b) { +Entry.block.change_to_next_shape = function(b, a) { var c; - c = b.fields && "prev" === b.getStringField("DRIECTION") ? a.parent.getPrevPicture(a.picture.id) : a.parent.getNextPicture(a.picture.id); - a.setImage(c); - return b.callReturn(); + c = a.fields && "prev" === a.getStringField("DRIECTION") ? b.parent.getPrevPicture(b.picture.id) : b.parent.getNextPicture(b.picture.id); + b.setImage(c); + return a.callReturn(); }; Blockly.Blocks.set_effect_volume = {init:function() { this.setColour("#EC4466"); @@ -3267,11 +3413,11 @@ Blockly.Blocks.set_effect_volume = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.set_effect_volume = function(a, b) { - var c = b.getField("EFFECT", b), d = b.getNumberValue("VALUE", b); - "color" == c ? a.effect.hue = d + a.effect.hue : "lens" != c && "swriling" != c && "pixel" != c && "mosaic" != c && ("brightness" == c ? a.effect.brightness = d + a.effect.brightness : "blur" != c && "opacity" == c && (a.effect.alpha += d / 100)); - a.applyFilter(); - return b.callReturn(); +Entry.block.set_effect_volume = function(b, a) { + var c = a.getField("EFFECT", a), d = a.getNumberValue("VALUE", a); + "color" == c ? b.effect.hue = d + b.effect.hue : "lens" != c && "swriling" != c && "pixel" != c && "mosaic" != c && ("brightness" == c ? b.effect.brightness = d + b.effect.brightness : "blur" != c && "opacity" == c && (b.effect.alpha += d / 100)); + b.applyFilter(); + return a.callReturn(); }; Blockly.Blocks.set_effect = {init:function() { this.setColour("#EC4466"); @@ -3284,11 +3430,11 @@ Blockly.Blocks.set_effect = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.set_effect = function(a, b) { - var c = b.getField("EFFECT", b), d = b.getNumberValue("VALUE", b); - "color" == c ? a.effect.hue = d : "lens" != c && "swriling" != c && "pixel" != c && "mosaic" != c && ("brightness" == c ? a.effect.brightness = d : "blur" != c && "opacity" == c && (a.effect.alpha = d / 100)); - a.applyFilter(); - return b.callReturn(); +Entry.block.set_effect = function(b, a) { + var c = a.getField("EFFECT", a), d = a.getNumberValue("VALUE", a); + "color" == c ? b.effect.hue = d : "lens" != c && "swriling" != c && "pixel" != c && "mosaic" != c && ("brightness" == c ? b.effect.brightness = d : "blur" != c && "opacity" == c && (b.effect.alpha = d / 100)); + b.applyFilter(); + return a.callReturn(); }; Blockly.Blocks.erase_all_effects = {init:function() { this.setColour("#EC4466"); @@ -3297,9 +3443,9 @@ Blockly.Blocks.erase_all_effects = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.erase_all_effects = function(a, b) { - a.resetFilter(); - return b.callReturn(); +Entry.block.erase_all_effects = function(b, a) { + b.resetFilter(); + return a.callReturn(); }; Blockly.Blocks.change_scale_percent = {init:function() { this.setColour("#EC4466"); @@ -3310,11 +3456,11 @@ Blockly.Blocks.change_scale_percent = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.change_scale_percent = function(a, b) { - var c = (b.getNumberValue("VALUE", b) + 100) / 100; - a.setScaleX(a.getScaleX() * c); - a.setScaleY(a.getScaleY() * c); - return b.callReturn(); +Entry.block.change_scale_percent = function(b, a) { + var c = (a.getNumberValue("VALUE", a) + 100) / 100; + b.setScaleX(b.getScaleX() * c); + b.setScaleY(b.getScaleY() * c); + return a.callReturn(); }; Blockly.Blocks.set_scale_percent = {init:function() { this.setColour("#EC4466"); @@ -3325,11 +3471,11 @@ Blockly.Blocks.set_scale_percent = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.set_scale_percent = function(a, b) { - var c = b.getNumberValue("VALUE", b) / 100, d = a.snapshot_; - a.setScaleX(c * d.scaleX); - a.setScaleY(c * d.scaleY); - return b.callReturn(); +Entry.block.set_scale_percent = function(b, a) { + var c = a.getNumberValue("VALUE", a) / 100, d = b.snapshot_; + b.setScaleX(c * d.scaleX); + b.setScaleY(c * d.scaleY); + return a.callReturn(); }; Blockly.Blocks.change_scale_size = {init:function() { this.setColour("#EC4466"); @@ -3340,10 +3486,10 @@ Blockly.Blocks.change_scale_size = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.change_scale_size = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setSize(a.getSize() + c); - return b.callReturn(); +Entry.block.change_scale_size = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setSize(b.getSize() + c); + return a.callReturn(); }; Blockly.Blocks.set_scale_size = {init:function() { this.setColour("#EC4466"); @@ -3354,10 +3500,10 @@ Blockly.Blocks.set_scale_size = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.set_scale_size = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setSize(c); - return b.callReturn(); +Entry.block.set_scale_size = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setSize(c); + return a.callReturn(); }; Blockly.Blocks.flip_y = {init:function() { this.setColour("#EC4466"); @@ -3366,9 +3512,9 @@ Blockly.Blocks.flip_y = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.flip_y = function(a, b) { - a.setScaleX(-1 * a.getScaleX()); - return b.callReturn(); +Entry.block.flip_y = function(b, a) { + b.setScaleX(-1 * b.getScaleX()); + return a.callReturn(); }; Blockly.Blocks.flip_x = {init:function() { this.setColour("#EC4466"); @@ -3377,9 +3523,9 @@ Blockly.Blocks.flip_x = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.flip_x = function(a, b) { - a.setScaleY(-1 * a.getScaleY()); - return b.callReturn(); +Entry.block.flip_x = function(b, a) { + b.setScaleY(-1 * b.getScaleY()); + return a.callReturn(); }; Blockly.Blocks.set_object_order = {init:function() { this.setColour("#EC4466"); @@ -3390,10 +3536,10 @@ Blockly.Blocks.set_object_order = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.set_object_order = function(a, b) { - var c = b.getField("VALUE", b), d = Entry.container.getCurrentObjects().indexOf(a.parent); +Entry.block.set_object_order = function(b, a) { + var c = a.getField("VALUE", a), d = Entry.container.getCurrentObjects().indexOf(b.parent); if (-1 < d) { - return Entry.container.moveElementByBlock(d, c), b.callReturn(); + return Entry.container.moveElementByBlock(d, c), a.callReturn(); } throw Error("object is not available"); }; @@ -3405,8 +3551,8 @@ Blockly.Blocks.get_pictures = {init:function() { this.setOutput(!0, "String"); this.setInputsInline(!0); }}; -Entry.block.get_pictures = function(a, b) { - return b.getStringField("VALUE"); +Entry.block.get_pictures = function(b, a) { + return a.getStringField("VALUE"); }; Blockly.Blocks.change_to_some_shape = {init:function() { this.setColour("#EC4466"); @@ -3417,12 +3563,12 @@ Blockly.Blocks.change_to_some_shape = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.change_to_some_shape = function(a, b) { - var c = b.getStringValue("VALUE"); +Entry.block.change_to_some_shape = function(b, a) { + var c = a.getStringValue("VALUE"); Entry.parseNumber(c); - c = a.parent.getPicture(c); - a.setImage(c); - return b.callReturn(); + c = b.parent.getPicture(c); + b.setImage(c); + return a.callReturn(); }; Blockly.Blocks.add_effect_amount = {init:function() { this.setColour("#EC4466"); @@ -3435,11 +3581,11 @@ Blockly.Blocks.add_effect_amount = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.add_effect_amount = function(a, b) { - var c = b.getField("EFFECT", b), d = b.getNumberValue("VALUE", b); - "color" == c ? a.effect.hsv = d + a.effect.hsv : "brightness" == c ? a.effect.brightness = d + a.effect.brightness : "transparency" == c && (a.effect.alpha -= d / 100); - a.applyFilter(); - return b.callReturn(); +Entry.block.add_effect_amount = function(b, a) { + var c = a.getField("EFFECT", a), d = a.getNumberValue("VALUE", a); + "color" == c ? b.effect.hsv = d + b.effect.hsv : "brightness" == c ? b.effect.brightness = d + b.effect.brightness : "transparency" == c && (b.effect.alpha -= d / 100); + b.applyFilter(); + return a.callReturn(); }; Blockly.Blocks.change_effect_amount = {init:function() { this.setColour("#EC4466"); @@ -3452,11 +3598,11 @@ Blockly.Blocks.change_effect_amount = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.change_effect_amount = function(a, b) { - var c = b.getField("EFFECT", b), d = b.getNumberValue("VALUE", b); - "color" == c ? a.effect.hsv = d : "brightness" == c ? a.effect.brightness = d : "transparency" == c && (a.effect.alpha = 1 - d / 100); - a.applyFilter(); - return b.callReturn(); +Entry.block.change_effect_amount = function(b, a) { + var c = a.getField("EFFECT", a), d = a.getNumberValue("VALUE", a); + "color" == c ? b.effect.hsv = d : "brightness" == c ? b.effect.brightness = d : "transparency" == c && (b.effect.alpha = 1 - d / 100); + b.applyFilter(); + return a.callReturn(); }; Blockly.Blocks.set_effect_amount = {init:function() { this.setColour("#EC4466"); @@ -3469,11 +3615,11 @@ Blockly.Blocks.set_effect_amount = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.set_effect_amount = function(a, b) { - var c = b.getField("EFFECT", b), d = b.getNumberValue("VALUE", b); - "color" == c ? a.effect.hue = d + a.effect.hue : "brightness" == c ? a.effect.brightness = d + a.effect.brightness : "transparency" == c && (a.effect.alpha -= d / 100); - a.applyFilter(); - return b.callReturn(); +Entry.block.set_effect_amount = function(b, a) { + var c = a.getField("EFFECT", a), d = a.getNumberValue("VALUE", a); + "color" == c ? b.effect.hue = d + b.effect.hue : "brightness" == c ? b.effect.brightness = d + b.effect.brightness : "transparency" == c && (b.effect.alpha -= d / 100); + b.applyFilter(); + return a.callReturn(); }; Blockly.Blocks.set_entity_effect = {init:function() { this.setColour("#EC4466"); @@ -3486,11 +3632,11 @@ Blockly.Blocks.set_entity_effect = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.set_entity_effect = function(a, b) { - var c = b.getField("EFFECT", b), d = b.getNumberValue("VALUE", b); - "color" == c ? a.effect.hue = d : "brightness" == c ? a.effect.brightness = d : "transparency" == c && (a.effect.alpha = 1 - d / 100); - a.applyFilter(); - return b.callReturn(); +Entry.block.set_entity_effect = function(b, a) { + var c = a.getField("EFFECT", a), d = a.getNumberValue("VALUE", a); + "color" == c ? b.effect.hue = d : "brightness" == c ? b.effect.brightness = d : "transparency" == c && (b.effect.alpha = 1 - d / 100); + b.applyFilter(); + return a.callReturn(); }; Blockly.Blocks.change_object_index = {init:function() { this.setColour("#EC4466"); @@ -3500,8 +3646,8 @@ Blockly.Blocks.change_object_index = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.change_object_index = function(a, b) { - var c, d = b.getField("LOCATION", b), e = Entry.container.getCurrentObjects(), f = e.indexOf(a.parent), e = e.length - 1; +Entry.block.change_object_index = function(b, a) { + var c, d = a.getField("LOCATION", a), e = Entry.container.getCurrentObjects(), f = e.indexOf(b.parent), e = e.length - 1; if (0 > f) { throw Error("object is not available for current scene"); } @@ -3519,7 +3665,7 @@ Entry.block.change_object_index = function(a, b) { c = e; } Entry.container.moveElementByBlock(f, c); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.move_direction = {init:function() { this.setColour("#A751E3"); @@ -3530,12 +3676,12 @@ Blockly.Blocks.move_direction = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.move_direction = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setX(a.getX() + c * Math.cos((a.getRotation() + a.getDirection() - 90) / 180 * Math.PI)); - a.setY(a.getY() - c * Math.sin((a.getRotation() + a.getDirection() - 90) / 180 * Math.PI)); - a.brush && !a.brush.stop && a.brush.lineTo(a.getX(), -1 * a.getY()); - return b.callReturn(); +Entry.block.move_direction = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setX(b.getX() + c * Math.cos((b.getRotation() + b.getDirection() - 90) / 180 * Math.PI)); + b.setY(b.getY() - c * Math.sin((b.getRotation() + b.getDirection() - 90) / 180 * Math.PI)); + b.brush && !b.brush.stop && b.brush.lineTo(b.getX(), -1 * b.getY()); + return a.callReturn(); }; Blockly.Blocks.move_x = {init:function() { this.setColour("#A751E3"); @@ -3546,11 +3692,11 @@ Blockly.Blocks.move_x = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.move_x = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setX(a.getX() + c); - a.brush && !a.brush.stop && a.brush.lineTo(a.getX(), -1 * a.getY()); - return b.callReturn(); +Entry.block.move_x = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setX(b.getX() + c); + b.brush && !b.brush.stop && b.brush.lineTo(b.getX(), -1 * b.getY()); + return a.callReturn(); }; Blockly.Blocks.move_y = {init:function() { this.setColour("#A751E3"); @@ -3561,11 +3707,11 @@ Blockly.Blocks.move_y = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.move_y = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setY(a.getY() + c); - a.brush && !a.brush.stop && a.brush.lineTo(a.getX(), -1 * a.getY()); - return b.callReturn(); +Entry.block.move_y = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setY(b.getY() + c); + b.brush && !b.brush.stop && b.brush.lineTo(b.getX(), -1 * b.getY()); + return a.callReturn(); }; Blockly.Blocks.locate_xy_time = {init:function() { this.setColour("#A751E3"); @@ -3580,29 +3726,29 @@ Blockly.Blocks.locate_xy_time = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.locate_xy_time = function(a, b) { - if (!b.isStart) { +Entry.block.locate_xy_time = function(b, a) { + if (!a.isStart) { var c; - c = b.getNumberValue("VALUE1", b); - b.isStart = !0; - b.frameCount = Math.floor(c * Entry.FPS); - b.x = b.getNumberValue("VALUE2", b); - b.y = b.getNumberValue("VALUE3", b); - } - if (0 != b.frameCount) { - c = b.x - a.getX(); - var d = b.y - a.getY(); - c /= b.frameCount; - d /= b.frameCount; - a.setX(a.getX() + c); - a.setY(a.getY() + d); - b.frameCount--; - a.brush && !a.brush.stop && a.brush.lineTo(a.getX(), -1 * a.getY()); - return b; + c = a.getNumberValue("VALUE1", a); + a.isStart = !0; + a.frameCount = Math.floor(c * Entry.FPS); + a.x = a.getNumberValue("VALUE2", a); + a.y = a.getNumberValue("VALUE3", a); + } + if (0 != a.frameCount) { + c = a.x - b.getX(); + var d = a.y - b.getY(); + c /= a.frameCount; + d /= a.frameCount; + b.setX(b.getX() + c); + b.setY(b.getY() + d); + a.frameCount--; + b.brush && !b.brush.stop && b.brush.lineTo(b.getX(), -1 * b.getY()); + return a; } - delete b.isStart; - delete b.frameCount; - return b.callReturn(); + delete a.isStart; + delete a.frameCount; + return a.callReturn(); }; Blockly.Blocks.rotate_by_angle = {init:function() { this.setColour("#A751E3"); @@ -3613,10 +3759,10 @@ Blockly.Blocks.rotate_by_angle = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.rotate_by_angle = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setRotation(a.getRotation() + c); - return b.callReturn(); +Entry.block.rotate_by_angle = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setRotation(b.getRotation() + c); + return a.callReturn(); }; Blockly.Blocks.rotate_by_angle_dropdown = {init:function() { this.setColour("#A751E3"); @@ -3626,10 +3772,10 @@ Blockly.Blocks.rotate_by_angle_dropdown = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.rotate_by_angle_dropdown = function(a, b) { - var c = b.getField("VALUE", b); - a.setRotation(a.getRotation() + +c); - return b.callReturn(); +Entry.block.rotate_by_angle_dropdown = function(b, a) { + var c = a.getField("VALUE", a); + b.setRotation(b.getRotation() + Number(c)); + return a.callReturn(); }; Blockly.Blocks.see_angle = {init:function() { this.setColour("#A751E3"); @@ -3640,10 +3786,10 @@ Blockly.Blocks.see_angle = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.see_angle = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setDirection(c); - return b.callReturn(); +Entry.block.see_angle = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setDirection(c); + return a.callReturn(); }; Blockly.Blocks.see_direction = {init:function() { this.setColour("#A751E3"); @@ -3654,10 +3800,10 @@ Blockly.Blocks.see_direction = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.see_direction = function(a, b) { - var c = b.getField("VALUE", b), d = Entry.container.getEntity(c), c = d.getX() - a.getX(), d = d.getY() - a.getY(); - 0 <= c ? a.setRotation(Math.atan(d / c) / Math.PI * 180 + 90) : a.setRotation(Math.atan(d / c) / Math.PI * 180 + 270); - return b.callReturn(); +Entry.block.see_direction = function(b, a) { + var c = a.getField("VALUE", a), d = Entry.container.getEntity(c), c = d.getX() - b.getX(), d = d.getY() - b.getY(); + 0 <= c ? b.setRotation(Math.atan(d / c) / Math.PI * 180 + 90) : b.setRotation(Math.atan(d / c) / Math.PI * 180 + 270); + return a.callReturn(); }; Blockly.Blocks.locate_xy = {init:function() { this.setColour("#A751E3"); @@ -3670,13 +3816,13 @@ Blockly.Blocks.locate_xy = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.locate_xy = function(a, b) { - var c = b.getNumberValue("VALUE1", b); - a.setX(c); - c = b.getNumberValue("VALUE2", b); - a.setY(c); - a.brush && !a.brush.stop && a.brush.lineTo(a.getX(), -1 * a.getY()); - return b.callReturn(); +Entry.block.locate_xy = function(b, a) { + var c = a.getNumberValue("VALUE1", a); + b.setX(c); + c = a.getNumberValue("VALUE2", a); + b.setY(c); + b.brush && !b.brush.stop && b.brush.lineTo(b.getX(), -1 * b.getY()); + return a.callReturn(); }; Blockly.Blocks.locate_x = {init:function() { this.setColour("#A751E3"); @@ -3687,11 +3833,11 @@ Blockly.Blocks.locate_x = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.locate_x = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setX(c); - a.brush && !a.brush.stop && a.brush.lineTo(a.getX(), -1 * a.getY()); - return b.callReturn(); +Entry.block.locate_x = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setX(c); + b.brush && !b.brush.stop && b.brush.lineTo(b.getX(), -1 * b.getY()); + return a.callReturn(); }; Blockly.Blocks.locate_y = {init:function() { this.setColour("#A751E3"); @@ -3702,11 +3848,11 @@ Blockly.Blocks.locate_y = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.locate_y = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setY(c); - a.brush && !a.brush.stop && a.brush.lineTo(a.getX(), -1 * a.getY()); - return b.callReturn(); +Entry.block.locate_y = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setY(c); + b.brush && !b.brush.stop && b.brush.lineTo(b.getX(), -1 * b.getY()); + return a.callReturn(); }; Blockly.Blocks.locate = {init:function() { this.setColour("#A751E3"); @@ -3717,13 +3863,13 @@ Blockly.Blocks.locate = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.locate = function(a, b) { - var c = b.getField("VALUE", b), d; +Entry.block.locate = function(b, a) { + var c = a.getField("VALUE", a), d; "mouse" == c ? (c = Entry.stage.mouseCoordinate.x, d = Entry.stage.mouseCoordinate.y) : (d = Entry.container.getEntity(c), c = d.getX(), d = d.getY()); - a.setX(+c); - a.setY(+d); - a.brush && !a.brush.stop && a.brush.lineTo(c, -1 * d); - return b.callReturn(); + b.setX(Number(c)); + b.setY(Number(d)); + b.brush && !b.brush.stop && b.brush.lineTo(c, -1 * d); + return a.callReturn(); }; Blockly.Blocks.move_xy_time = {init:function() { this.setColour("#A751E3"); @@ -3738,22 +3884,22 @@ Blockly.Blocks.move_xy_time = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.move_xy_time = function(a, b) { - if (!b.isStart) { +Entry.block.move_xy_time = function(b, a) { + if (!a.isStart) { var c; - c = b.getNumberValue("VALUE1", b); - var d = b.getNumberValue("VALUE2", b), e = b.getNumberValue("VALUE3", b); - b.isStart = !0; - b.frameCount = Math.floor(c * Entry.FPS); - b.dX = d / b.frameCount; - b.dY = e / b.frameCount; + c = a.getNumberValue("VALUE1", a); + var d = a.getNumberValue("VALUE2", a), e = a.getNumberValue("VALUE3", a); + a.isStart = !0; + a.frameCount = Math.floor(c * Entry.FPS); + a.dX = d / a.frameCount; + a.dY = e / a.frameCount; } - if (0 != b.frameCount) { - return a.setX(a.getX() + b.dX), a.setY(a.getY() + b.dY), b.frameCount--, a.brush && !a.brush.stop && a.brush.lineTo(a.getX(), -1 * a.getY()), b; + if (0 != a.frameCount) { + return b.setX(b.getX() + a.dX), b.setY(b.getY() + a.dY), a.frameCount--, b.brush && !b.brush.stop && b.brush.lineTo(b.getX(), -1 * b.getY()), a; } - delete b.isStart; - delete b.frameCount; - return b.callReturn(); + delete a.isStart; + delete a.frameCount; + return a.callReturn(); }; Blockly.Blocks.locate_time = {init:function() { this.setColour("#A751E3"); @@ -3777,21 +3923,21 @@ Blockly.Blocks.rotate_by_angle_time = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.rotate_by_angle_time = function(a, b) { - if (!b.isStart) { +Entry.block.rotate_by_angle_time = function(b, a) { + if (!a.isStart) { var c; - c = b.getNumberValue("VALUE", b); - var d = b.getNumberField("VALUE", b); - b.isStart = !0; - b.frameCount = Math.floor(c * Entry.FPS); - b.dAngle = d / b.frameCount; + c = a.getNumberValue("VALUE", a); + var d = a.getNumberField("VALUE", a); + a.isStart = !0; + a.frameCount = Math.floor(c * Entry.FPS); + a.dAngle = d / a.frameCount; } - if (0 != b.frameCount) { - return a.setRotation(a.getRotation() + b.dAngle), b.frameCount--, b; + if (0 != a.frameCount) { + return b.setRotation(b.getRotation() + a.dAngle), a.frameCount--, a; } - delete b.isStart; - delete b.frameCount; - return b.callReturn(); + delete a.isStart; + delete a.frameCount; + return a.callReturn(); }; Blockly.Blocks.bounce_when = {init:function() { this.setColour("#A751E3"); @@ -3809,22 +3955,22 @@ Blockly.Blocks.bounce_wall = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.bounce_wall = function(a, b) { - var c = a.parent.getRotateMethod(), d = "free" == c ? (a.getRotation() + a.getDirection()).mod(360) : a.getDirection(), e = Entry.Utils.COLLISION.NONE; +Entry.block.bounce_wall = function(b, a) { + var c = b.parent.getRotateMethod(), d = "free" == c ? (b.getRotation() + b.getDirection()).mod(360) : b.getDirection(), e = Entry.Utils.COLLISION.NONE; if (90 > d && 0 <= d || 360 > d && 270 <= d) { - var e = a.collision == Entry.Utils.COLLISION.UP, f = ndgmr.checkPixelCollision(Entry.stage.wall.up, a.object, 0, !1); - !f && e && (a.collision = Entry.Utils.COLLISION.NONE); + var e = b.collision == Entry.Utils.COLLISION.UP, f = ndgmr.checkPixelCollision(Entry.stage.wall.up, b.object, 0, !1); + !f && e && (b.collision = Entry.Utils.COLLISION.NONE); f && e && (f = !1); - f ? ("free" == c ? a.setRotation(-a.getRotation() - 2 * a.getDirection() + 180) : a.setDirection(-a.getDirection() + 180), a.collision = Entry.Utils.COLLISION.UP) : (e = a.collision == Entry.Utils.COLLISION.DOWN, f = ndgmr.checkPixelCollision(Entry.stage.wall.down, a.object, 0, !1), !f && e && (a.collision = Entry.Utils.COLLISION.NONE), f && e && (f = !1), f && ("free" == c ? a.setRotation(-a.getRotation() - 2 * a.getDirection() + 180) : a.setDirection(-a.getDirection() + 180), a.collision = + f ? ("free" == c ? b.setRotation(-b.getRotation() - 2 * b.getDirection() + 180) : b.setDirection(-b.getDirection() + 180), b.collision = Entry.Utils.COLLISION.UP) : (e = b.collision == Entry.Utils.COLLISION.DOWN, f = ndgmr.checkPixelCollision(Entry.stage.wall.down, b.object, 0, !1), !f && e && (b.collision = Entry.Utils.COLLISION.NONE), f && e && (f = !1), f && ("free" == c ? b.setRotation(-b.getRotation() - 2 * b.getDirection() + 180) : b.setDirection(-b.getDirection() + 180), b.collision = Entry.Utils.COLLISION.DOWN)); } else { - 270 > d && 90 <= d && (e = a.collision == Entry.Utils.COLLISION.DOWN, f = ndgmr.checkPixelCollision(Entry.stage.wall.down, a.object, 0, !1), !f && e && (a.collision = Entry.Utils.COLLISION.NONE), f && e && (f = !1), f ? ("free" == c ? a.setRotation(-a.getRotation() - 2 * a.getDirection() + 180) : a.setDirection(-a.getDirection() + 180), a.collision = Entry.Utils.COLLISION.DOWN) : (e = a.collision == Entry.Utils.COLLISION.UP, f = ndgmr.checkPixelCollision(Entry.stage.wall.up, a.object, 0, !1), - !f && e && (a.collision = Entry.Utils.COLLISION.NONE), f && e && (f = !1), f && ("free" == c ? a.setRotation(-a.getRotation() - 2 * a.getDirection() + 180) : a.setDirection(-a.getDirection() + 180), a.collision = Entry.Utils.COLLISION.UP))); + 270 > d && 90 <= d && (e = b.collision == Entry.Utils.COLLISION.DOWN, f = ndgmr.checkPixelCollision(Entry.stage.wall.down, b.object, 0, !1), !f && e && (b.collision = Entry.Utils.COLLISION.NONE), f && e && (f = !1), f ? ("free" == c ? b.setRotation(-b.getRotation() - 2 * b.getDirection() + 180) : b.setDirection(-b.getDirection() + 180), b.collision = Entry.Utils.COLLISION.DOWN) : (e = b.collision == Entry.Utils.COLLISION.UP, f = ndgmr.checkPixelCollision(Entry.stage.wall.up, b.object, 0, !1), + !f && e && (b.collision = Entry.Utils.COLLISION.NONE), f && e && (f = !1), f && ("free" == c ? b.setRotation(-b.getRotation() - 2 * b.getDirection() + 180) : b.setDirection(-b.getDirection() + 180), b.collision = Entry.Utils.COLLISION.UP))); } - 360 > d && 180 <= d ? (e = a.collision == Entry.Utils.COLLISION.LEFT, d = ndgmr.checkPixelCollision(Entry.stage.wall.left, a.object, 0, !1), !d && e && (a.collision = Entry.Utils.COLLISION.NONE), d && e && (d = !1), d ? ("free" == c ? a.setRotation(-a.getRotation() - 2 * a.getDirection()) : a.setDirection(-a.getDirection() + 360), a.collision = Entry.Utils.COLLISION.LEFT) : (e = a.collision == Entry.Utils.COLLISION.RIGHT, d = ndgmr.checkPixelCollision(Entry.stage.wall.right, a.object, 0, !1), !d && - e && (a.collision = Entry.Utils.COLLISION.NONE), d && e && (d = !1), d && ("free" == c ? a.setRotation(-a.getRotation() - 2 * a.getDirection()) : a.setDirection(-a.getDirection() + 360), a.collision = Entry.Utils.COLLISION.RIGHT))) : 180 > d && 0 <= d && (e = a.collision == Entry.Utils.COLLISION.RIGHT, d = ndgmr.checkPixelCollision(Entry.stage.wall.right, a.object, 0, !1), !d && e && (a.collision = Entry.Utils.COLLISION.NONE), d && e && (d = !1), d ? ("free" == c ? a.setRotation(-a.getRotation() - - 2 * a.getDirection()) : a.setDirection(-a.getDirection() + 360), a.collision = Entry.Utils.COLLISION.RIGHT) : (e = a.collision == Entry.Utils.COLLISION.LEFT, d = ndgmr.checkPixelCollision(Entry.stage.wall.left, a.object, 0, !1), !d && e && (a.collision = Entry.Utils.COLLISION.NONE), d && e && (d = !1), d && ("free" == c ? a.setRotation(-a.getRotation() - 2 * a.getDirection()) : a.setDirection(-a.getDirection() + 360), a.collision = Entry.Utils.COLLISION.LEFT))); - return b.callReturn(); + 360 > d && 180 <= d ? (e = b.collision == Entry.Utils.COLLISION.LEFT, d = ndgmr.checkPixelCollision(Entry.stage.wall.left, b.object, 0, !1), !d && e && (b.collision = Entry.Utils.COLLISION.NONE), d && e && (d = !1), d ? ("free" == c ? b.setRotation(-b.getRotation() - 2 * b.getDirection()) : b.setDirection(-b.getDirection() + 360), b.collision = Entry.Utils.COLLISION.LEFT) : (e = b.collision == Entry.Utils.COLLISION.RIGHT, d = ndgmr.checkPixelCollision(Entry.stage.wall.right, b.object, 0, !1), !d && + e && (b.collision = Entry.Utils.COLLISION.NONE), d && e && (d = !1), d && ("free" == c ? b.setRotation(-b.getRotation() - 2 * b.getDirection()) : b.setDirection(-b.getDirection() + 360), b.collision = Entry.Utils.COLLISION.RIGHT))) : 180 > d && 0 <= d && (e = b.collision == Entry.Utils.COLLISION.RIGHT, d = ndgmr.checkPixelCollision(Entry.stage.wall.right, b.object, 0, !1), !d && e && (b.collision = Entry.Utils.COLLISION.NONE), d && e && (d = !1), d ? ("free" == c ? b.setRotation(-b.getRotation() - + 2 * b.getDirection()) : b.setDirection(-b.getDirection() + 360), b.collision = Entry.Utils.COLLISION.RIGHT) : (e = b.collision == Entry.Utils.COLLISION.LEFT, d = ndgmr.checkPixelCollision(Entry.stage.wall.left, b.object, 0, !1), !d && e && (b.collision = Entry.Utils.COLLISION.NONE), d && e && (d = !1), d && ("free" == c ? b.setRotation(-b.getRotation() - 2 * b.getDirection()) : b.setDirection(-b.getDirection() + 360), b.collision = Entry.Utils.COLLISION.LEFT))); + return a.callReturn(); }; Blockly.Blocks.flip_arrow_horizontal = {init:function() { this.setColour("#A751E3"); @@ -3833,9 +3979,9 @@ Blockly.Blocks.flip_arrow_horizontal = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.flip_arrow_horizontal = function(a, b) { - a.setDirection(a.getDirection() + 180); - return b.callReturn(); +Entry.block.flip_arrow_horizontal = function(b, a) { + b.setDirection(b.getDirection() + 180); + return a.callReturn(); }; Blockly.Blocks.flip_arrow_vertical = {init:function() { this.setColour("#A751E3"); @@ -3844,9 +3990,9 @@ Blockly.Blocks.flip_arrow_vertical = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.flip_arrow_vertical = function(a, b) { - a.setDirection(a.getDirection() + 180); - return b.callReturn(); +Entry.block.flip_arrow_vertical = function(b, a) { + b.setDirection(b.getDirection() + 180); + return a.callReturn(); }; Blockly.Blocks.see_angle_object = {init:function() { this.setColour("#A751E3"); @@ -3857,16 +4003,16 @@ Blockly.Blocks.see_angle_object = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.see_angle_object = function(a, b) { - var c = b.getField("VALUE", b), d = a.getX(), e = a.getY(); - if (a.parent.id == c) { - return b.callReturn(); +Entry.block.see_angle_object = function(b, a) { + var c = a.getField("VALUE", a), d = b.getX(), e = b.getY(); + if (b.parent.id == c) { + return a.callReturn(); } "mouse" == c ? (c = Entry.stage.mouseCoordinate.y, d = Entry.stage.mouseCoordinate.x - d, e = c - e) : (c = Entry.container.getEntity(c), d = c.getX() - d, e = c.getY() - e); - e = 0 === d && 0 === e ? a.getDirection() + a.getRotation() : 0 <= d ? -Math.atan(e / d) / Math.PI * 180 + 90 : -Math.atan(e / d) / Math.PI * 180 + 270; - d = a.getDirection() + a.getRotation(); - a.setRotation(a.getRotation() + e - d); - return b.callReturn(); + e = 0 === d && 0 === e ? b.getDirection() + b.getRotation() : 0 <= d ? -Math.atan(e / d) / Math.PI * 180 + 90 : -Math.atan(e / d) / Math.PI * 180 + 270; + d = b.getDirection() + b.getRotation(); + b.setRotation(b.getRotation() + e - d); + return a.callReturn(); }; Blockly.Blocks.see_angle_direction = {init:function() { this.setColour("#A751E3"); @@ -3877,10 +4023,10 @@ Blockly.Blocks.see_angle_direction = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.see_angle_direction = function(a, b) { - var c = b.getNumberValue("VALUE", b), d = a.getDirection() + a.getRotation(); - a.setRotation(a.getRotation() + c - d); - return b.callReturn(); +Entry.block.see_angle_direction = function(b, a) { + var c = a.getNumberValue("VALUE", a), d = b.getDirection() + b.getRotation(); + b.setRotation(b.getRotation() + c - d); + return a.callReturn(); }; Blockly.Blocks.rotate_direction = {init:function() { this.setColour("#A751E3"); @@ -3891,10 +4037,10 @@ Blockly.Blocks.rotate_direction = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.rotate_direction = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setDirection(c + a.getDirection()); - return b.callReturn(); +Entry.block.rotate_direction = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setDirection(c + b.getDirection()); + return a.callReturn(); }; Blockly.Blocks.locate_object_time = {init:function() { this.setColour("#A751E3"); @@ -3907,25 +4053,25 @@ Blockly.Blocks.locate_object_time = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.locate_object_time = function(a, b) { - if (!b.isStart) { +Entry.block.locate_object_time = function(b, a) { + if (!a.isStart) { var c, d, e; - d = b.getField("TARGET", b); - c = b.getNumberValue("VALUE", b); + d = a.getField("TARGET", a); + c = a.getNumberValue("VALUE", a); c = Math.floor(c * Entry.FPS); e = Entry.stage.mouseCoordinate; if (0 != c) { - "mouse" == d ? (d = e.x - a.getX(), e = e.y - a.getY()) : (e = Entry.container.getEntity(d), d = e.getX() - a.getX(), e = e.getY() - a.getY()), b.isStart = !0, b.frameCount = c, b.dX = d / b.frameCount, b.dY = e / b.frameCount; + "mouse" == d ? (d = e.x - b.getX(), e = e.y - b.getY()) : (e = Entry.container.getEntity(d), d = e.getX() - b.getX(), e = e.getY() - b.getY()), a.isStart = !0, a.frameCount = c, a.dX = d / a.frameCount, a.dY = e / a.frameCount; } else { - return "mouse" == d ? (d = +e.x, e = +e.y) : (e = Entry.container.getEntity(d), d = e.getX(), e = e.getY()), a.setX(d), a.setY(e), a.brush && !a.brush.stop && a.brush.lineTo(a.getX(), -1 * a.getY()), b.callReturn(); + return "mouse" == d ? (d = Number(e.x), e = Number(e.y)) : (e = Entry.container.getEntity(d), d = e.getX(), e = e.getY()), b.setX(d), b.setY(e), b.brush && !b.brush.stop && b.brush.lineTo(b.getX(), -1 * b.getY()), a.callReturn(); } } - if (0 != b.frameCount) { - return a.setX(a.getX() + b.dX), a.setY(a.getY() + b.dY), b.frameCount--, a.brush && !a.brush.stop && a.brush.lineTo(a.getX(), -1 * a.getY()), b; + if (0 != a.frameCount) { + return b.setX(b.getX() + a.dX), b.setY(b.getY() + a.dY), a.frameCount--, b.brush && !b.brush.stop && b.brush.lineTo(b.getX(), -1 * b.getY()), a; } - delete b.isStart; - delete b.frameCount; - return b.callReturn(); + delete a.isStart; + delete a.frameCount; + return a.callReturn(); }; Blockly.Blocks.rotate_absolute = {init:function() { this.setColour("#A751E3"); @@ -3936,10 +4082,10 @@ Blockly.Blocks.rotate_absolute = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.rotate_absolute = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setRotation(c); - return b.callReturn(); +Entry.block.rotate_absolute = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setRotation(c); + return a.callReturn(); }; Blockly.Blocks.rotate_relative = {init:function() { this.setColour("#A751E3"); @@ -3950,10 +4096,10 @@ Blockly.Blocks.rotate_relative = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.rotate_relative = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setRotation(c + a.getRotation()); - return b.callReturn(); +Entry.block.rotate_relative = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setRotation(c + b.getRotation()); + return a.callReturn(); }; Blockly.Blocks.direction_absolute = {init:function() { this.setColour("#A751E3"); @@ -3964,10 +4110,10 @@ Blockly.Blocks.direction_absolute = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.direction_absolute = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setDirection(c); - return b.callReturn(); +Entry.block.direction_absolute = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setDirection(c); + return a.callReturn(); }; Blockly.Blocks.direction_relative = {init:function() { this.setColour("#A751E3"); @@ -3978,10 +4124,10 @@ Blockly.Blocks.direction_relative = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.direction_relative = function(a, b) { - var c = b.getNumberValue("VALUE", b); - a.setDirection(c + a.getDirection()); - return b.callReturn(); +Entry.block.direction_relative = function(b, a) { + var c = a.getNumberValue("VALUE", a); + b.setDirection(c + b.getDirection()); + return a.callReturn(); }; Blockly.Blocks.move_to_angle = {init:function() { this.setColour("#A751E3"); @@ -3994,12 +4140,12 @@ Blockly.Blocks.move_to_angle = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.move_to_angle = function(a, b) { - var c = b.getNumberValue("VALUE", b), d = b.getNumberValue("ANGLE", b); - a.setX(a.getX() + c * Math.cos((d - 90) / 180 * Math.PI)); - a.setY(a.getY() - c * Math.sin((d - 90) / 180 * Math.PI)); - a.brush && !a.brush.stop && a.brush.lineTo(a.getX(), -1 * a.getY()); - return b.callReturn(); +Entry.block.move_to_angle = function(b, a) { + var c = a.getNumberValue("VALUE", a), d = a.getNumberValue("ANGLE", a); + b.setX(b.getX() + c * Math.cos((d - 90) / 180 * Math.PI)); + b.setY(b.getY() - c * Math.sin((d - 90) / 180 * Math.PI)); + b.brush && !b.brush.stop && b.brush.lineTo(b.getX(), -1 * b.getY()); + return a.callReturn(); }; Blockly.Blocks.rotate_by_time = {init:function() { this.setColour("#A751E3"); @@ -4013,21 +4159,21 @@ Blockly.Blocks.rotate_by_time = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.rotate_by_time = function(a, b) { - if (!b.isStart) { +Entry.block.rotate_by_time = function(b, a) { + if (!a.isStart) { var c; - c = b.getNumberValue("VALUE", b); - var d = b.getNumberValue("ANGLE", b); - b.isStart = !0; - b.frameCount = Math.floor(c * Entry.FPS); - b.dAngle = d / b.frameCount; + c = a.getNumberValue("VALUE", a); + var d = a.getNumberValue("ANGLE", a); + a.isStart = !0; + a.frameCount = Math.floor(c * Entry.FPS); + a.dAngle = d / a.frameCount; } - if (0 != b.frameCount) { - return a.setRotation(a.getRotation() + b.dAngle), b.frameCount--, b; + if (0 != a.frameCount) { + return b.setRotation(b.getRotation() + a.dAngle), a.frameCount--, a; } - delete b.isStart; - delete b.frameCount; - return b.callReturn(); + delete a.isStart; + delete a.frameCount; + return a.callReturn(); }; Blockly.Blocks.direction_relative_duration = {init:function() { this.setColour("#A751E3"); @@ -4040,206 +4186,203 @@ Blockly.Blocks.direction_relative_duration = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.direction_relative_duration = function(a, b) { - if (!b.isStart) { +Entry.block.direction_relative_duration = function(b, a) { + if (!a.isStart) { var c; - c = b.getNumberValue("DURATION", b); - var d = b.getNumberValue("AMOUNT", b); - b.isStart = !0; - b.frameCount = Math.floor(c * Entry.FPS); - b.dDirection = d / b.frameCount; + c = a.getNumberValue("DURATION", a); + var d = a.getNumberValue("AMOUNT", a); + a.isStart = !0; + a.frameCount = Math.floor(c * Entry.FPS); + a.dDirection = d / a.frameCount; } - if (0 != b.frameCount) { - return a.setDirection(a.getDirection() + b.dDirection), b.frameCount--, b; + if (0 != a.frameCount) { + return b.setDirection(b.getDirection() + a.dDirection), a.frameCount--, a; } - delete b.isStart; - delete b.frameCount; - delete b.dDirection; - return b.callReturn(); + delete a.isStart; + delete a.frameCount; + delete a.dDirection; + return a.callReturn(); }; -Entry.Neobot = {name:"neobot", PORT_MAP:{1:0, 2:0, 3:0, SERVO1:0, SERVO2:0, SERVO1_SPEED:3, SERVO2_SPEED:3, LMOT:0, RMOT:0, note:0, octave:0, duration:0, sound_check:0, O_1:0, O_2:0}, setZero:function() { - for (var a in Entry.Neobot.PORT_MAP) { - Entry.hw.sendQueue[a] = Entry.Neobot.PORT_MAP[a]; +Entry.Neobot = {name:"neobot", LOCAL_MAP:["IN1", "IN2", "IN3", "IR", "BAT"], REMOTE_MAP:"OUT1 OUT2 OUT3 DCR DCL SND FND OPT".split(" "), setZero:function() { + for (var b in Entry.Neobot.REMOTE_MAP) { + Entry.hw.sendQueue[Entry.Neobot.REMOTE_MAP[b]] = 0; } Entry.hw.update(); -}, name:"neobot", monitorTemplate:{imgPath:"hw/neobot.png", width:268, height:270, ports:{1:{name:Lang.Hw.port_en + " 1 " + Lang.Hw.port_ko, type:"input", pos:{x:78, y:9}}, 2:{name:Lang.Hw.port_en + " 2 " + Lang.Hw.port_ko, type:"input", pos:{x:115, y:9}}, 3:{name:Lang.Hw.port_en + " 3 " + Lang.Hw.port_ko, type:"input", pos:{x:153, y:9}}, LMOT:{name:Lang.Hw.left + " " + Lang.Hw.motor, type:"output", pos:{x:78, y:259}}, RMOT:{name:Lang.Hw.right + " " + Lang.Hw.motor, type:"output", pos:{x:191, y:259}}, -note:{name:Lang.Hw.buzzer, type:"output", pos:{x:98, y:184}}, SERVO1:{name:Lang.Hw.sub + " " + Lang.Hw.motor + " 1", type:"output", pos:{x:115, y:259}}, SERVO2:{name:Lang.Hw.sub + " " + Lang.Hw.motor + " 2", type:"output", pos:{x:191, y:9}}}}}; +}, name:"neobot", monitorTemplate:{imgPath:"hw/neobot.png", width:700, height:700, listPorts:{IR:{name:"\ub9ac\ubaa8\ucee8", type:"input", pos:{x:0, y:0}}, BAT:{name:"\ubca0\ud130\ub9ac", type:"input", pos:{x:0, y:0}}, SND:{name:Lang.Hw.buzzer, type:"output", pos:{x:0, y:0}}, FND:{name:"FND", type:"output", pos:{x:0, y:0}}}, ports:{IN1:{name:"IN1", type:"input", pos:{x:270, y:200}}, IN2:{name:"IN2", type:"input", pos:{x:325, y:200}}, IN3:{name:"IN3", type:"input", pos:{x:325, y:500}}, DCL:{name:"L-Motor", +type:"output", pos:{x:270, y:500}}, DCR:{name:"R-Motor", type:"output", pos:{x:435, y:500}}, OUT1:{name:"OUT1", type:"output", pos:{x:380, y:200}}, OUT2:{name:"OUT2", type:"output", pos:{x:435, y:200}}, OUT3:{name:"OUT3", type:"output", pos:{x:380, y:500}}}, mode:"both"}}; Blockly.Blocks.neobot_sensor_value = {init:function() { this.setColour("#00979D"); - this.appendDummyInput().appendField("").appendField(new Blockly.FieldDropdown([["1\ubc88 \ud3ec\ud2b8", "1"], ["2\ubc88 \ud3ec\ud2b8", "2"], ["3\ubc88 \ud3ec\ud2b8", "3"], ["\ub9ac\ubaa8\ucee8", "4"]]), "PORT").appendField(" \uac12"); + this.appendDummyInput().appendField("").appendField(new Blockly.FieldDropdown([["1\ubc88 \ud3ec\ud2b8", "IN1"], ["2\ubc88 \ud3ec\ud2b8", "IN2"], ["3\ubc88 \ud3ec\ud2b8", "IN3"], ["\ub9ac\ubaa8\ucee8", "IR"], ["\ubc30\ud130\ub9ac", "BAT"]]), "PORT").appendField(" \uac12"); this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.neobot_sensor_value = function(a, b) { - var c = b.getStringField("PORT"); +Entry.block.neobot_sensor_value = function(b, a) { + var c = a.getStringField("PORT"); return Entry.hw.portData[c]; }; -Blockly.Blocks.neobot_turn_left = {init:function() { +Blockly.Blocks.neobot_left_motor = {init:function() { this.setColour("#00979D"); - this.appendDummyInput().appendField("\uc67c\ucabd\ubaa8\ud130\ub97c").appendField(new Blockly.FieldDropdown([["\uc55e\uc73c\ub85c", "1"], ["\ub4a4\ub85c", "-1"]]), "DIRECTION").appendField(new Blockly.FieldDropdown([["\ub290\ub9ac\uac8c", "1"], ["\ubcf4\ud1b5", "2"], ["\ube60\ub974\uac8c", "3"]]), "VALUE").appendField("\ud68c\uc804").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.appendDummyInput().appendField("\uc67c\ucabd\ubaa8\ud130\ub97c").appendField(new Blockly.FieldDropdown([["\uc55e\uc73c\ub85c", "16"], ["\ub4a4\ub85c", "32"]]), "DIRECTION").appendField(new Blockly.FieldDropdown([["0", "0"], ["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["10", "10"], ["11", "11"], ["12", "12"], ["13", "13"], ["14", "14"], ["15", "15"]]), "SPEED").appendField("\uc758 \uc18d\ub3c4\ub85c \ud68c\uc804").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + + "block_icon/hardware_03.png", "*")); this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.neobot_turn_left = function(a, b) { - var c = b.getNumberField("VALUE"), d = b.getNumberField("DIRECTION"); - Entry.hw.sendQueue.LMOT = c * d; - return b.callReturn(); +Entry.block.neobot_left_motor = function(b, a) { + var c = a.getNumberField("SPEED"), d = a.getNumberField("DIRECTION"); + Entry.hw.sendQueue.DCL = c + d; + return a.callReturn(); }; -Blockly.Blocks.neobot_stop_left = {init:function() { +Blockly.Blocks.neobot_stop_left_motor = {init:function() { this.setColour("#00979D"); this.appendDummyInput().appendField("\uc67c\ucabd\ubaa8\ud130 \uc815\uc9c0").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.neobot_stop_left = function(a, b) { - Entry.hw.sendQueue.LMOT = 0; - return b.callReturn(); +Entry.block.neobot_stop_left_motor = function(b, a) { + Entry.hw.sendQueue.DCL = 0; + return a.callReturn(); }; -Blockly.Blocks.neobot_turn_right = {init:function() { +Blockly.Blocks.neobot_right_motor = {init:function() { this.setColour("#00979D"); - this.appendDummyInput().appendField("\uc624\ub978\ucabd\ubaa8\ud130\ub97c").appendField(new Blockly.FieldDropdown([["\uc55e\uc73c\ub85c", "1"], ["\ub4a4\ub85c", "-1"]]), "DIRECTION").appendField(new Blockly.FieldDropdown([["\ub290\ub9ac\uac8c", "1"], ["\ubcf4\ud1b5", "2"], ["\ube60\ub974\uac8c", "3"]]), "VALUE").appendField("\ud68c\uc804").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.appendDummyInput().appendField("\uc624\ub978\ucabd\ubaa8\ud130\ub97c").appendField(new Blockly.FieldDropdown([["\uc55e\uc73c\ub85c", "16"], ["\ub4a4\ub85c", "32"]]), "DIRECTION").appendField(new Blockly.FieldDropdown([["0", "0"], ["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["10", "10"], ["11", "11"], ["12", "12"], ["13", "13"], ["14", "14"], ["15", "15"]]), "SPEED").appendField("\uc758 \uc18d\ub3c4\ub85c \ud68c\uc804").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + + "block_icon/hardware_03.png", "*")); this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.neobot_turn_right = function(a, b) { - var c = b.getNumberField("VALUE"), d = b.getNumberField("DIRECTION"); - Entry.hw.sendQueue.RMOT = c * d; - return b.callReturn(); +Entry.block.neobot_right_motor = function(b, a) { + var c = a.getNumberField("SPEED"), d = a.getNumberField("DIRECTION"); + Entry.hw.sendQueue.DCR = c + d; + return a.callReturn(); }; -Blockly.Blocks.neobot_stop_right = {init:function() { +Blockly.Blocks.neobot_stop_right_motor = {init:function() { this.setColour("#00979D"); this.appendDummyInput().appendField("\uc624\ub978\ucabd\ubaa8\ud130 \uc815\uc9c0").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.neobot_stop_right = function(a, b) { - Entry.hw.sendQueue.RMOT = 0; - return b.callReturn(); +Entry.block.neobot_stop_right_motor = function(b, a) { + Entry.hw.sendQueue.DCR = 0; + return a.callReturn(); }; -Blockly.Blocks.neobot_run_motor = {init:function() { +Blockly.Blocks.neobot_all_motor = {init:function() { this.setColour("#00979D"); - this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\uc591\ucabd", "1"], ["\uc67c\ucabd", "2"], ["\uc624\ub978\ucabd", "3"]]), "TYPE").appendField("\ubaa8\ud130\ub97c "); - this.appendValueInput("DURATION").setCheck(["Number", "String"]); - this.appendDummyInput().appendField("\ucd08\uac04").appendField(new Blockly.FieldDropdown([["\ub290\ub9ac\uac8c", "1"], ["\ubcf4\ud1b5", "2"], ["\ube60\ub974\uac8c", "3"]]), "VALUE").appendField(new Blockly.FieldDropdown([["\uc804\uc9c4", "1"], ["\ud6c4\uc9c4", "2"], ["\uc88c\ud68c\uc804", "3"], ["\uc6b0\ud68c\uc804", "4"]]), "DIRECTION").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.appendDummyInput().appendField("\uc591\ucabd \ubaa8\ud130\ub97c "); + this.appendDummyInput().appendField(new Blockly.FieldDropdown([["0", "0"], ["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["10", "10"], ["11", "11"], ["12", "12"], ["13", "13"], ["14", "14"], ["15", "15"]]), "SPEED").appendField(" \uc758 \uc18d\ub3c4\ub85c ").appendField(new Blockly.FieldDropdown([["\uc804\uc9c4", "1"], ["\ud6c4\uc9c4", "2"], ["\uc81c\uc790\ub9ac \uc88c\ud68c\uc804", "3"], ["\uc81c\uc790\ub9ac \uc6b0\ud68c\uc804", "4"], + ["\uc88c\ud68c\uc804", "5"], ["\uc6b0\ud68c\uc804", "6"]]), "DIRECTION").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.neobot_run_motor = function(a, b) { - if (b.isStart) { - if (1 == b.timeFlag) { - var c = b.getNumberField("TYPE"), d = b.getNumberField("VALUE"); - switch(b.getNumberField("DIRECTION")) { - case 1: - Entry.hw.sendQueue.LMOT = d; - Entry.hw.sendQueue.RMOT = d; - break; - case 2: - Entry.hw.sendQueue.LMOT = -1 * d; - Entry.hw.sendQueue.RMOT = -1 * d; - break; - case 3: - Entry.hw.sendQueue.LMOT = d; - Entry.hw.sendQueue.RMOT = -1 * d; - break; - case 4: - Entry.hw.sendQueue.LMOT = -1 * d, Entry.hw.sendQueue.RMOT = d; - } - 2 === c ? Entry.hw.sendQueue.RMOT = 0 : 3 === c && (Entry.hw.sendQueue.LMOT = 0); - return b; - } - delete b.timeFlag; - delete b.isStart; - Entry.engine.isContinue = !1; - Entry.hw.sendQueue.LMOT = 0; - Entry.hw.sendQueue.RMOT = 0; - return b.callReturn(); +Entry.block.neobot_all_motor = function(b, a) { + a.getNumberField("TYPE"); + var c = a.getNumberField("SPEED"); + switch(a.getNumberField("DIRECTION")) { + case 1: + Entry.hw.sendQueue.DCL = 16 + c; + Entry.hw.sendQueue.DCR = 16 + c; + break; + case 2: + Entry.hw.sendQueue.DCL = 32 + c; + Entry.hw.sendQueue.DCR = 32 + c; + break; + case 3: + Entry.hw.sendQueue.DCL = 32 + c; + Entry.hw.sendQueue.DCR = 16 + c; + break; + case 4: + Entry.hw.sendQueue.DCL = 16 + c; + Entry.hw.sendQueue.DCR = 32 + c; + break; + case 5: + Entry.hw.sendQueue.DCL = 0; + Entry.hw.sendQueue.DCR = 16 + c; + break; + case 6: + Entry.hw.sendQueue.DCL = 16 + c, Entry.hw.sendQueue.DCR = 0; } - b.isStart = !0; - b.timeFlag = 1; - c = 1E3 * b.getNumberValue("DURATION"); - setTimeout(function() { - b.timeFlag = 0; - }, c); - return b; + return a.callReturn(); +}; +Blockly.Blocks.neobot_set_servo = {init:function() { + this.setColour("#00979D"); + this.appendDummyInput().appendField(new Blockly.FieldDropdown([["OUT1", "1"], ["OUT2", "2"], ["OUT3", "3"]]), "PORT").appendField("\ud3ec\ud2b8\uc758 \uc11c\ubcf4\ubaa8\ud130\ub97c").appendField(new Blockly.FieldDropdown([["0\ub3c4", "0"], ["10\ub3c4", "10"], ["20\ub3c4", "20"], ["30\ub3c4", "30"], ["40\ub3c4", "40"], ["50\ub3c4", "50"], ["60\ub3c4", "60"], ["70\ub3c4", "70"], ["80\ub3c4", "80"], ["90\ub3c4", "90"], ["100\ub3c4", "100"], ["110\ub3c4", "110"], ["120\ub3c4", "120"], ["130\ub3c4", + "130"], ["140\ub3c4", "140"], ["150\ub3c4", "150"], ["160\ub3c4", "160"], ["170\ub3c4", "170"], ["180\ub3c4", "180"]]), "DEGREE").appendField(" \uc774\ub3d9").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.setInputsInline(!0); + this.setPreviousStatement(!0); + this.setNextStatement(!0); +}}; +Entry.block.neobot_set_servo = function(b, a) { + var c = a.getNumberField("PORT"), d = a.getNumberField("DEGREE"); + Entry.hw.sendQueue["OUT" + c] = d; + 3 === c && (c = 4); + Entry.hw.sendQueue.OPT |= c; + return a.callReturn(); }; -Blockly.Blocks.neobot_servo_1 = {init:function() { +Blockly.Blocks.neobot_set_output = {init:function() { this.setColour("#00979D"); - this.appendDummyInput().appendField("SERVO1\uc5d0 \uc5f0\uacb0\ub41c \uc11c\ubcf4\ubaa8\ud130\ub97c").appendField(new Blockly.FieldDropdown([["\ube60\ub978", "3"], ["\ubcf4\ud1b5", "2"], ["\ub290\ub9b0", "1"]]), "SPEED").appendField("\uc18d\ub3c4\ub85c").appendField(new Blockly.FieldDropdown([["0\ub3c4", "0"], ["10\ub3c4", "1"], ["20\ub3c4", "2"], ["30\ub3c4", "3"], ["40\ub3c4", "4"], ["50\ub3c4", "5"], ["60\ub3c4", "6"], ["70\ub3c4", "7"], ["80\ub3c4", "8"], ["90\ub3c4", "9"], ["100\ub3c4", "10"], - ["110\ub3c4", "11"], ["120\ub3c4", "12"], ["130\ub3c4", "13"], ["140\ub3c4", "14"], ["150\ub3c4", "15"], ["160\ub3c4", "16"]]), "VALUE").appendField("\ub85c \uc774\ub3d9").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.appendDummyInput().appendField(new Blockly.FieldDropdown([["OUT1", "1"], ["OUT2", "2"], ["OUT3", "3"]]), "PORT").appendField("\ubc88 \ud3ec\ud2b8\uc758 \uac12\uc744"); + this.appendValueInput("VALUE").setCheck(["Number"]); + this.appendDummyInput().appendField("\ub9cc\ud07c \ucd9c\ub825").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.neobot_servo_1 = function(a, b) { - var c = b.getNumberField("VALUE"), d = b.getNumberField("SPEED"); - Entry.hw.sendQueue.SERVO1 = c; - Entry.hw.sendQueue.SERVO1_SPEED = d; - return b.callReturn(); +Entry.block.neobot_set_output = function(b, a) { + var c = a.getStringField("PORT", a), d = a.getNumberValue("VALUE", a), e = c; + 0 > d ? d = 0 : 255 < d && (d = 255); + 3 === e && (e = 4); + Entry.hw.sendQueue["OUT" + c] = d; + Entry.hw.sendQueue.OPT &= ~e; + return a.callReturn(); }; -Blockly.Blocks.neobot_servo_2 = {init:function() { +Blockly.Blocks.neobot_set_fnd = {init:function() { this.setColour("#00979D"); - this.appendDummyInput().appendField("SERVO2\uc5d0 \uc5f0\uacb0\ub41c \uc11c\ubcf4\ubaa8\ud130\ub97c").appendField(new Blockly.FieldDropdown([["\ube60\ub978", "3"], ["\ubcf4\ud1b5", "2"], ["\ub290\ub9b0", "1"]]), "SPEED").appendField("\uc18d\ub3c4\ub85c").appendField(new Blockly.FieldDropdown([["0\ub3c4", "0"], ["10\ub3c4", "1"], ["20\ub3c4", "2"], ["30\ub3c4", "3"], ["40\ub3c4", "4"], ["50\ub3c4", "5"], ["60\ub3c4", "6"], ["70\ub3c4", "7"], ["80\ub3c4", "8"], ["90\ub3c4", "9"], ["100\ub3c4", "10"], - ["110\ub3c4", "11"], ["120\ub3c4", "12"], ["130\ub3c4", "13"], ["140\ub3c4", "14"], ["150\ub3c4", "15"], ["160\ub3c4", "16"]]), "VALUE").appendField("\ub85c \uc774\ub3d9").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.appendDummyInput().appendField("FND\uc5d0"); + this.appendValueInput("VALUE").setCheck(["Number"]); + this.appendDummyInput().appendField("\ucd9c\ub825").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.neobot_servo_2 = function(a, b) { - var c = b.getNumberField("VALUE"), d = b.getNumberField("SPEED"); - Entry.hw.sendQueue.SERVO2 = c; - Entry.hw.sendQueue.SERVO2_SPEED = d; - return b.callReturn(); +Entry.block.neobot_set_fnd = function(b, a) { + var c = a.getNumberValue("VALUE", a); + 255 < c ? c = 255 : 0 > c && (c = 0); + Entry.hw.sendQueue.FND = c; + return a.callReturn(); }; Blockly.Blocks.neobot_play_note_for = {init:function() { this.setColour("#00979D"); - this.appendDummyInput().appendField("\uba5c\ub85c\ub514").appendField(new Blockly.FieldDropdown([[Lang.General.note_c + "", "1"], [Lang.General.note_d + "", "2"], [Lang.General.note_e + "", "3"], [Lang.General.note_f + "", "4"], [Lang.General.note_g + "", "5"], [Lang.General.note_a + "", "6"], [Lang.General.note_b + "", "7"], [Lang.General.note_c + "", "8"]]), "NOTE").appendField("\uc744(\ub97c)").appendField(new Blockly.FieldDropdown([["1", "0"], ["2", "1"], ["3", "2"]]), "OCTAVE").appendField("\uc625\ud0c0\ube0c\ub85c").appendField(new Blockly.FieldDropdown([["2\ubd84\uc74c\ud45c", - "2"], ["4\ubd84\uc74c\ud45c", "4"], ["8\ubd84\uc74c\ud45c", "8"]]), "DURATION"); + this.appendDummyInput().appendField("\uba5c\ub85c\ub514").appendField(new Blockly.FieldDropdown([["\ubb34\uc74c", "0"], [Lang.General.note_c, "1"], [Lang.General.note_c + "#", "2"], [Lang.General.note_d, "3"], [Lang.General.note_d + "#", "4"], [Lang.General.note_e, "5"], [Lang.General.note_f, "6"], [Lang.General.note_f + "#", "7"], [Lang.General.note_g, "8"], [Lang.General.note_g + "#", "9"], [Lang.General.note_a, "10"], [Lang.General.note_a + "#", "11"], [Lang.General.note_b, "12"]]), "NOTE").appendField("\uc744(\ub97c)").appendField(new Blockly.FieldDropdown([["1", + "0"], ["2", "1"], ["3", "2"], ["4", "3"], ["5", "4"], ["6", "5"]]), "OCTAVE").appendField("\uc625\ud0c0\ube0c\ub85c").appendField(new Blockly.FieldDropdown([["2\ubd84\uc74c\ud45c", "2"], ["4\ubd84\uc74c\ud45c", "4"], ["8\ubd84\uc74c\ud45c", "8"], ["16\ubd84\uc74c\ud45c", "16"]]), "DURATION"); this.appendDummyInput().appendField("\uae38\uc774\ub9cc\ud07c \uc18c\ub9ac\ub0b4\uae30").appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.neobot_play_note_for = function(a, b) { +Entry.block.neobot_play_note_for = function(b, a) { var c = Entry.hw.sendQueue; - if (b.isStart) { - if (1 == b.timeFlag) { - return b; + if (a.isStart) { + if (1 == a.timeFlag) { + return a; } - delete b.timeFlag; - delete b.isStart; + delete a.timeFlag; + delete a.isStart; + Entry.hw.sendQueue.SND = 0; Entry.engine.isContinue = !1; - return b.callReturn(); + return a.callReturn(); } - var d = b.getNumberField("NOTE", b), e = b.getNumberField("OCTAVE", b), f = b.getNumberField("DURATION", b); - b.note = d; - b.isStart = !0; - b.timeFlag = 1; - c.note = d; - c.octave = e; - c.duration = f; - c.sound_check = (1E5 * Math.random()).toFixed(0); + var d = a.getNumberField("NOTE", a), e = a.getNumberField("OCTAVE", a), f = a.getNumberField("DURATION", a), d = d + 12 * e; + a.isStart = !0; + a.timeFlag = 1; + 65 < d && (d = 65); + c.SND = d; setTimeout(function() { - b.timeFlag = 0; + a.timeFlag = 0; }, 1 / f * 2E3); - return b; -}; -Blockly.Blocks.neobot_set_sensor_value = {init:function() { - this.setColour("#00979D"); - this.appendDummyInput().appendField(new Blockly.FieldDropdown([["1", "O_1"], ["2", "O_2"]]), "PORT").appendField("\ubc88 \ud3ec\ud2b8\uc758 \uac12\uc744").appendField(new Blockly.FieldDropdown([["\ucf1c\uae30", "1"], ["\ub044\uae30", "0"]]), "VALUE"); - this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); - this.setInputsInline(!0); - this.setPreviousStatement(!0); - this.setNextStatement(!0); -}}; -Entry.block.neobot_set_sensor_value = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getStringField("PORT", b), e = b.getNumberField("VALUE", b); - c[d] = e; - return b.callReturn(); + return a; }; Entry.Robotis_carCont = {INSTRUCTION:{NONE:0, WRITE:3, READ:2}, CONTROL_TABLE:{CM_LED:[67, 1], CM_SPRING_RIGHT:[69, 1, 69, 2], CM_SPRING_LEFT:[70, 1, 69, 2], CM_SWITCH:[71, 1], CM_SOUND_DETECTED:[86, 1], CM_SOUND_DETECTING:[87, 1], CM_IR_LEFT:[91, 2, 91, 4], CM_IR_RIGHT:[93, 2, 91, 4], CM_CALIBRATION_LEFT:[95, 2], CM_CALIBRATION_RIGHT:[97, 2], AUX_MOTOR_SPEED_LEFT:[152, 2], AUX_MOTOR_SPEED_RIGHT:[154, 2]}, setZero:function() { this.setRobotisData([[Entry.Robotis_carCont.INSTRUCTION.WRITE, 152, 2, 0], [Entry.Robotis_carCont.INSTRUCTION.WRITE, 154, 2, 0]]); @@ -4248,37 +4391,37 @@ Entry.Robotis_carCont = {INSTRUCTION:{NONE:0, WRITE:3, READ:2}, CONTROL_TABLE:{C this.setRobotisData(null); Entry.hw.sendQueue.setZero = null; this.update(); -}, name:"robotis_carCont", delay:40, postCallReturn:function(a, b, c) { +}, name:"robotis_carCont", delay:40, postCallReturn:function(b, a, c) { if (0 >= c) { - return this.setRobotisData(b), this.update(), a.callReturn(); + return this.setRobotisData(a), this.update(), b.callReturn(); } - if (a.isStart) { - if (1 == a.timeFlag) { - return this.setRobotisData(null), a; + if (b.isStart) { + if (1 == b.timeFlag) { + return this.setRobotisData(null), b; } - delete a.timeFlag; - delete a.isStart; + delete b.timeFlag; + delete b.isStart; Entry.engine.isContinue = !1; this.update(); - return a.callReturn(); + return b.callReturn(); } - a.isStart = !0; - a.timeFlag = 1; - this.setRobotisData(b); + b.isStart = !0; + b.timeFlag = 1; + this.setRobotisData(a); setTimeout(function() { - a.timeFlag = 0; + b.timeFlag = 0; }, c); - return a; -}, wait:function(a, b) { - Entry.hw.socket.send(JSON.stringify(a)); - for (var c = (new Date).getTime(), d = c;d < c + b;) { + return b; +}, wait:function(b, a) { + Entry.hw.socket.send(JSON.stringify(b)); + for (var c = (new Date).getTime(), d = c;d < c + a;) { d = (new Date).getTime(); } }, update:function() { Entry.hw.update(); this.setRobotisData(null); -}, setRobotisData:function(a) { - Entry.hw.sendQueue.ROBOTIS_DATA = null == a ? null : Entry.hw.sendQueue.ROBOTIS_DATA ? Entry.hw.sendQueue.ROBOTIS_DATA.concat(a) : a; +}, setRobotisData:function(b) { + Entry.hw.sendQueue.ROBOTIS_DATA = null == b ? null : Entry.hw.sendQueue.ROBOTIS_DATA ? Entry.hw.sendQueue.ROBOTIS_DATA.concat(b) : b; }}; Entry.Robotis_openCM70 = {INSTRUCTION:{NONE:0, WRITE:3, READ:2}, CONTROL_TABLE:{CM_LED_R:[79, 1], CM_LED_G:[80, 1], CM_LED_B:[81, 1], CM_BUZZER_INDEX:[84, 1], CM_BUZZER_TIME:[85, 1], CM_SOUND_DETECTED:[86, 1], CM_SOUND_DETECTING:[87, 1], CM_USER_BUTTON:[26, 1], CM_MOTION:[66, 1], AUX_SERVO_POSITION:[152, 2], AUX_IR:[168, 2], AUX_TOUCH:[202, 1], AUX_TEMPERATURE:[234, 1], AUX_ULTRASONIC:[242, 1], AUX_MAGNETIC:[250, 1], AUX_MOTION_DETECTION:[258, 1], AUX_COLOR:[266, 1], AUX_CUSTOM:[216, 2], AUX_BRIGHTNESS:[288, 2], AUX_HYDRO_THEMO_HUMIDITY:[274, 1], AUX_HYDRO_THEMO_TEMPER:[282, 1], AUX_SERVO_MODE:[126, 1], AUX_SERVO_SPEED:[136, 2], AUX_MOTOR_SPEED:[136, 2], AUX_LED_MODULE:[210, 1]}, setZero:function() { @@ -4301,10 +4444,10 @@ Blockly.Blocks.robotis_openCM70_cm_custom_value = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.robotis_openCM70_cm_custom_value = function(a, b) { - var c = Entry.Robotis_openCM70.INSTRUCTION.READ, d = 0, e = 0, f = 0, d = b.getStringField("SIZE"); +Entry.block.robotis_openCM70_cm_custom_value = function(b, a) { + var c = Entry.Robotis_openCM70.INSTRUCTION.READ, d = 0, e = 0, f = 0, d = a.getStringField("SIZE"); "BYTE" == d ? e = 1 : "WORD" == d ? e = 2 : "DWORD" == d && (e = 4); - f = d = b.getNumberValue("VALUE"); + f = d = a.getNumberValue("VALUE"); Entry.Robotis_carCont.setRobotisData([[c, d, e, 0, e]]); Entry.Robotis_carCont.update(); return Entry.hw.portData[f]; @@ -4317,14 +4460,14 @@ Blockly.Blocks.robotis_openCM70_sensor_value = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }, sensorList:function() { - var a = []; - a.push([Lang.Blocks.robotis_cm_sound_detected, "CM_SOUND_DETECTED"]); - a.push([Lang.Blocks.robotis_cm_sound_detecting, "CM_SOUND_DETECTING"]); - a.push([Lang.Blocks.robotis_cm_user_button, "CM_USER_BUTTON"]); - return a; + var b = []; + b.push([Lang.Blocks.robotis_cm_sound_detected, "CM_SOUND_DETECTED"]); + b.push([Lang.Blocks.robotis_cm_sound_detecting, "CM_SOUND_DETECTING"]); + b.push([Lang.Blocks.robotis_cm_user_button, "CM_USER_BUTTON"]); + return b; }}; -Entry.block.robotis_openCM70_sensor_value = function(a, b) { - var c = Entry.Robotis_openCM70.INSTRUCTION.READ, d = 0, e = 0, f = 0, g = 0, h = b.getStringField("SENSOR"); +Entry.block.robotis_openCM70_sensor_value = function(b, a) { + var c = Entry.Robotis_openCM70.INSTRUCTION.READ, d = 0, e = 0, f = 0, g = 0, h = a.getStringField("SENSOR"); "CM_SOUND_DETECTED" == h ? (f = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[1], d = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[0], e = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[1]) : "CM_SOUND_DETECTING" == h ? (f = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTING[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTING[1], d = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTING[0], e = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTING[1]) : "CM_USER_BUTTON" == h && (f = Entry.Robotis_openCM70.CONTROL_TABLE.CM_USER_BUTTON[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.CM_USER_BUTTON[1], d = Entry.Robotis_openCM70.CONTROL_TABLE.CM_USER_BUTTON[0], e = Entry.Robotis_openCM70.CONTROL_TABLE.CM_USER_BUTTON[1]); f += 0 * g; @@ -4342,30 +4485,30 @@ Blockly.Blocks.robotis_openCM70_aux_sensor_value = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }, portList:function() { - var a = []; - a.push([Lang.Blocks.robotis_common_port_3, "PORT_3"]); - a.push([Lang.Blocks.robotis_common_port_4, "PORT_4"]); - a.push([Lang.Blocks.robotis_common_port_5, "PORT_5"]); - a.push([Lang.Blocks.robotis_common_port_6, "PORT_6"]); - return a; + var b = []; + b.push([Lang.Blocks.robotis_common_port_3, "PORT_3"]); + b.push([Lang.Blocks.robotis_common_port_4, "PORT_4"]); + b.push([Lang.Blocks.robotis_common_port_5, "PORT_5"]); + b.push([Lang.Blocks.robotis_common_port_6, "PORT_6"]); + return b; }, sensorList:function() { - var a = []; - a.push([Lang.Blocks.robotis_aux_servo_position, "AUX_SERVO_POSITION"]); - a.push([Lang.Blocks.robotis_aux_ir, "AUX_IR"]); - a.push([Lang.Blocks.robotis_aux_touch, "AUX_TOUCH"]); - a.push([Lang.Blocks.robotis_aux_brightness, "AUX_BRIGHTNESS"]); - a.push([Lang.Blocks.robotis_aux_hydro_themo_humidity, "AUX_HYDRO_THEMO_HUMIDITY"]); - a.push([Lang.Blocks.robotis_aux_hydro_themo_temper, "AUX_HYDRO_THEMO_TEMPER"]); - a.push([Lang.Blocks.robotis_aux_temperature, "AUX_TEMPERATURE"]); - a.push([Lang.Blocks.robotis_aux_ultrasonic, "AUX_ULTRASONIC"]); - a.push([Lang.Blocks.robotis_aux_magnetic, "AUX_MAGNETIC"]); - a.push([Lang.Blocks.robotis_aux_motion_detection, "AUX_MOTION_DETECTION"]); - a.push([Lang.Blocks.robotis_aux_color, "AUX_COLOR"]); - a.push([Lang.Blocks.robotis_aux_custom, "AUX_CUSTOM"]); - return a; + var b = []; + b.push([Lang.Blocks.robotis_aux_servo_position, "AUX_SERVO_POSITION"]); + b.push([Lang.Blocks.robotis_aux_ir, "AUX_IR"]); + b.push([Lang.Blocks.robotis_aux_touch, "AUX_TOUCH"]); + b.push([Lang.Blocks.robotis_aux_brightness, "AUX_BRIGHTNESS"]); + b.push([Lang.Blocks.robotis_aux_hydro_themo_humidity, "AUX_HYDRO_THEMO_HUMIDITY"]); + b.push([Lang.Blocks.robotis_aux_hydro_themo_temper, "AUX_HYDRO_THEMO_TEMPER"]); + b.push([Lang.Blocks.robotis_aux_temperature, "AUX_TEMPERATURE"]); + b.push([Lang.Blocks.robotis_aux_ultrasonic, "AUX_ULTRASONIC"]); + b.push([Lang.Blocks.robotis_aux_magnetic, "AUX_MAGNETIC"]); + b.push([Lang.Blocks.robotis_aux_motion_detection, "AUX_MOTION_DETECTION"]); + b.push([Lang.Blocks.robotis_aux_color, "AUX_COLOR"]); + b.push([Lang.Blocks.robotis_aux_custom, "AUX_CUSTOM"]); + return b; }}; -Entry.block.robotis_openCM70_aux_sensor_value = function(a, b) { - var c = Entry.Robotis_openCM70.INSTRUCTION.READ, d = 0, e = 0, f = 0, g = 0, h = b.getStringField("PORT"), k = b.getStringField("SENSOR"), l = 0; +Entry.block.robotis_openCM70_aux_sensor_value = function(b, a) { + var c = Entry.Robotis_openCM70.INSTRUCTION.READ, d = 0, e = 0, f = 0, g = 0, h = a.getStringField("PORT"), k = a.getStringField("SENSOR"), l = 0; "PORT_3" == h ? l = 2 : "PORT_4" == h ? l = 3 : "PORT_5" == h ? l = 4 : "PORT_6" == h && (l = 5); "AUX_SERVO_POSITION" == k ? (f = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[1], d = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[0], e = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[1]) : "AUX_IR" == k ? (f = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_IR[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_IR[1], d = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_IR[0], e = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_IR[1]) : "AUX_TOUCH" == k ? (f = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TOUCH[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TOUCH[1], d = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TOUCH[0], e = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TOUCH[1]) : "AUX_TEMPERATURE" == k ? (f = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TEMPERATURE[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TEMPERATURE[1], d = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TEMPERATURE[0], e = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TEMPERATURE[1]) : @@ -4395,12 +4538,12 @@ Blockly.Blocks.robotis_openCM70_cm_buzzer_index = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_openCM70_cm_buzzer_index = function(a, b) { - var c = b.getField("CM_BUZZER_INDEX", b), d = b.getNumberValue("CM_BUZZER_TIME", b), e = Entry.Robotis_openCM70.INSTRUCTION.WRITE, f = 0, g = 0, h = 0, k = 0, l = 0, f = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[1], h = parseInt(10 * d); +Entry.block.robotis_openCM70_cm_buzzer_index = function(b, a) { + var c = a.getField("CM_BUZZER_INDEX", a), d = a.getNumberValue("CM_BUZZER_TIME", a), e = Entry.Robotis_openCM70.INSTRUCTION.WRITE, f = 0, g = 0, h = 0, k = 0, l = 0, f = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[1], h = parseInt(10 * d); 50 < h && (h = 50); k = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[0]; l = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[1]; - return Entry.Robotis_carCont.postCallReturn(b, [[e, f, g, h], [e, k, l, c]], 1E3 * d); + return Entry.Robotis_carCont.postCallReturn(a, [[e, f, g, h], [e, k, l, c]], 1E3 * d); }; Blockly.Blocks.robotis_openCM70_cm_buzzer_melody = {init:function() { this.setColour("#00979D"); @@ -4413,9 +4556,9 @@ Blockly.Blocks.robotis_openCM70_cm_buzzer_melody = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_openCM70_cm_buzzer_melody = function(a, b) { - var c = b.getField("CM_BUZZER_MELODY", b), d = Entry.Robotis_openCM70.INSTRUCTION.WRITE, e = 0, f = 0, g = 0, h = 0, e = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[0], f = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[1], g = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[0], h = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[1]; - return Entry.Robotis_carCont.postCallReturn(b, [[d, e, f, 255], [d, g, h, c]], 1E3); +Entry.block.robotis_openCM70_cm_buzzer_melody = function(b, a) { + var c = a.getField("CM_BUZZER_MELODY", a), d = Entry.Robotis_openCM70.INSTRUCTION.WRITE, e = 0, f = 0, g = 0, h = 0, e = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[0], f = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[1], g = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[0], h = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[1]; + return Entry.Robotis_carCont.postCallReturn(a, [[d, e, f, 255], [d, g, h, c]], 1E3); }; Blockly.Blocks.robotis_openCM70_cm_sound_detected_clear = {init:function() { this.setColour("#00979D"); @@ -4424,9 +4567,9 @@ Blockly.Blocks.robotis_openCM70_cm_sound_detected_clear = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_openCM70_cm_sound_detected_clear = function(a, b) { +Entry.block.robotis_openCM70_cm_sound_detected_clear = function(b, a) { var c = Entry.Robotis_openCM70.INSTRUCTION.WRITE, d = 0, e = 0, d = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[0], e = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[1]; - return Entry.Robotis_carCont.postCallReturn(b, [[c, d, e, 0]], Entry.Robotis_openCM70.delay); + return Entry.Robotis_carCont.postCallReturn(a, [[c, d, e, 0]], Entry.Robotis_openCM70.delay); }; Blockly.Blocks.robotis_openCM70_cm_led = {init:function() { this.setColour("#00979D"); @@ -4436,10 +4579,10 @@ Blockly.Blocks.robotis_openCM70_cm_led = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_openCM70_cm_led = function(a, b) { - var c = b.getField("CM_LED", b), d = b.getField("VALUE", b), e = Entry.Robotis_openCM70.INSTRUCTION.WRITE, f = 0, g = 0; +Entry.block.robotis_openCM70_cm_led = function(b, a) { + var c = a.getField("CM_LED", a), d = a.getField("VALUE", a), e = Entry.Robotis_openCM70.INSTRUCTION.WRITE, f = 0, g = 0; "CM_LED_R" == c ? (f = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_R[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_R[1]) : "CM_LED_G" == c ? (f = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_G[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_G[1]) : "CM_LED_B" == c && (f = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_B[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_B[1]); - return Entry.Robotis_carCont.postCallReturn(b, [[e, f, g, d]], Entry.Robotis_openCM70.delay); + return Entry.Robotis_carCont.postCallReturn(a, [[e, f, g, d]], Entry.Robotis_openCM70.delay); }; Blockly.Blocks.robotis_openCM70_cm_motion = {init:function() { this.setColour("#00979D"); @@ -4451,9 +4594,9 @@ Blockly.Blocks.robotis_openCM70_cm_motion = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_openCM70_cm_motion = function(a, b) { - var c = Entry.Robotis_openCM70.INSTRUCTION.WRITE, d = 0, e = 0, f = 0, d = Entry.Robotis_openCM70.CONTROL_TABLE.CM_MOTION[0], e = Entry.Robotis_openCM70.CONTROL_TABLE.CM_MOTION[1], f = b.getNumberValue("VALUE", b); - return Entry.Robotis_carCont.postCallReturn(b, [[c, d, e, f]], Entry.Robotis_openCM70.delay); +Entry.block.robotis_openCM70_cm_motion = function(b, a) { + var c = Entry.Robotis_openCM70.INSTRUCTION.WRITE, d = 0, e = 0, f = 0, d = Entry.Robotis_openCM70.CONTROL_TABLE.CM_MOTION[0], e = Entry.Robotis_openCM70.CONTROL_TABLE.CM_MOTION[1], f = a.getNumberValue("VALUE", a); + return Entry.Robotis_carCont.postCallReturn(a, [[c, d, e, f]], Entry.Robotis_openCM70.delay); }; Blockly.Blocks.robotis_openCM70_aux_motor_speed = {init:function() { this.setColour("#00979D"); @@ -4464,10 +4607,10 @@ Blockly.Blocks.robotis_openCM70_aux_motor_speed = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_openCM70_aux_motor_speed = function(a, b) { - var c = b.getField("PORT", b), d = b.getField("DIRECTION_ANGLE", b), e = b.getNumberValue("VALUE"), f = Entry.Robotis_openCM70.INSTRUCTION.WRITE, g = 0, h = 0, g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MOTOR_SPEED[0], h = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MOTOR_SPEED[1]; +Entry.block.robotis_openCM70_aux_motor_speed = function(b, a) { + var c = a.getField("PORT", a), d = a.getField("DIRECTION_ANGLE", a), e = a.getNumberValue("VALUE"), f = Entry.Robotis_openCM70.INSTRUCTION.WRITE, g = 0, h = 0, g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MOTOR_SPEED[0], h = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MOTOR_SPEED[1]; "CW" == d ? (e += 1024, 2047 < e && (e = 2047)) : 1023 < e && (e = 1023); - return Entry.Robotis_carCont.postCallReturn(b, [[f, g + (c - 1) * h, h, e]], Entry.Robotis_openCM70.delay); + return Entry.Robotis_carCont.postCallReturn(a, [[f, g + (c - 1) * h, h, e]], Entry.Robotis_openCM70.delay); }; Blockly.Blocks.robotis_openCM70_aux_servo_mode = {init:function() { this.setColour("#00979D"); @@ -4477,9 +4620,9 @@ Blockly.Blocks.robotis_openCM70_aux_servo_mode = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_openCM70_aux_servo_mode = function(a, b) { - var c = b.getField("PORT", b), d = b.getField("MODE", b), e = Entry.Robotis_openCM70.INSTRUCTION.WRITE, f = 0, g = 0, f = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_MODE[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_MODE[1]; - return Entry.Robotis_carCont.postCallReturn(b, [[e, f + (c - 1) * g, g, d]], Entry.Robotis_openCM70.delay); +Entry.block.robotis_openCM70_aux_servo_mode = function(b, a) { + var c = a.getField("PORT", a), d = a.getField("MODE", a), e = Entry.Robotis_openCM70.INSTRUCTION.WRITE, f = 0, g = 0, f = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_MODE[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_MODE[1]; + return Entry.Robotis_carCont.postCallReturn(a, [[e, f + (c - 1) * g, g, d]], Entry.Robotis_openCM70.delay); }; Blockly.Blocks.robotis_openCM70_aux_servo_speed = {init:function() { this.setColour("#00979D"); @@ -4490,10 +4633,10 @@ Blockly.Blocks.robotis_openCM70_aux_servo_speed = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_openCM70_aux_servo_speed = function(a, b) { - var c = b.getField("PORT", b), d = b.getField("DIRECTION_ANGLE", b), e = b.getNumberValue("VALUE"), f = Entry.Robotis_openCM70.INSTRUCTION.WRITE, g = 0, h = 0, g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_SPEED[0], h = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_SPEED[1]; +Entry.block.robotis_openCM70_aux_servo_speed = function(b, a) { + var c = a.getField("PORT", a), d = a.getField("DIRECTION_ANGLE", a), e = a.getNumberValue("VALUE"), f = Entry.Robotis_openCM70.INSTRUCTION.WRITE, g = 0, h = 0, g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_SPEED[0], h = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_SPEED[1]; "CW" == d ? (e += 1024, 2047 < e && (e = 2047)) : 1023 < e && (e = 1023); - return Entry.Robotis_carCont.postCallReturn(b, [[f, g + (c - 1) * h, h, e]], Entry.Robotis_openCM70.delay); + return Entry.Robotis_carCont.postCallReturn(a, [[f, g + (c - 1) * h, h, e]], Entry.Robotis_openCM70.delay); }; Blockly.Blocks.robotis_openCM70_aux_servo_position = {init:function() { this.setColour("#00979D"); @@ -4504,10 +4647,10 @@ Blockly.Blocks.robotis_openCM70_aux_servo_position = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_openCM70_aux_servo_position = function(a, b) { - var c = b.getField("PORT", b), d = b.getNumberValue("VALUE"), e = Entry.Robotis_openCM70.INSTRUCTION.WRITE, f = 0, g = 0, f = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[1]; +Entry.block.robotis_openCM70_aux_servo_position = function(b, a) { + var c = a.getField("PORT", a), d = a.getNumberValue("VALUE"), e = Entry.Robotis_openCM70.INSTRUCTION.WRITE, f = 0, g = 0, f = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[1]; 1023 < d ? d = 1023 : 0 > d && (d = 0); - return Entry.Robotis_carCont.postCallReturn(b, [[e, f + (c - 1) * g, g, d]], Entry.Robotis_openCM70.delay); + return Entry.Robotis_carCont.postCallReturn(a, [[e, f + (c - 1) * g, g, d]], Entry.Robotis_openCM70.delay); }; Blockly.Blocks.robotis_openCM70_aux_led_module = {init:function() { this.setColour("#00979D"); @@ -4518,9 +4661,9 @@ Blockly.Blocks.robotis_openCM70_aux_led_module = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_openCM70_aux_led_module = function(a, b) { - var c = b.getField("PORT", b), d = b.getField("LED_MODULE", b), e = Entry.Robotis_openCM70.INSTRUCTION.WRITE, f = 0, g = 0, f = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[1]; - return Entry.Robotis_carCont.postCallReturn(b, [[e, f + (c - 1) * g, g, d]], Entry.Robotis_openCM70.delay); +Entry.block.robotis_openCM70_aux_led_module = function(b, a) { + var c = a.getField("PORT", a), d = a.getField("LED_MODULE", a), e = Entry.Robotis_openCM70.INSTRUCTION.WRITE, f = 0, g = 0, f = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[1]; + return Entry.Robotis_carCont.postCallReturn(a, [[e, f + (c - 1) * g, g, d]], Entry.Robotis_openCM70.delay); }; Blockly.Blocks.robotis_openCM70_aux_custom = {init:function() { this.setColour("#00979D"); @@ -4531,9 +4674,9 @@ Blockly.Blocks.robotis_openCM70_aux_custom = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_openCM70_aux_custom = function(a, b) { - var c = b.getField("PORT", b), d = b.getNumberValue("VALUE"), e = Entry.Robotis_openCM70.INSTRUCTION.WRITE, f = 0, g = 0, f = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[1]; - return Entry.Robotis_carCont.postCallReturn(b, [[e, f + (c - 1) * g, g, d]], Entry.Robotis_openCM70.delay); +Entry.block.robotis_openCM70_aux_custom = function(b, a) { + var c = a.getField("PORT", a), d = a.getNumberValue("VALUE"), e = Entry.Robotis_openCM70.INSTRUCTION.WRITE, f = 0, g = 0, f = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[0], g = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[1]; + return Entry.Robotis_carCont.postCallReturn(a, [[e, f + (c - 1) * g, g, d]], Entry.Robotis_openCM70.delay); }; Blockly.Blocks.robotis_openCM70_cm_custom = {init:function() { this.setColour("#00979D"); @@ -4548,9 +4691,9 @@ Blockly.Blocks.robotis_openCM70_cm_custom = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_openCM70_cm_custom = function(a, b) { - var c = Entry.Robotis_openCM70.INSTRUCTION.WRITE, d = 0, e = 0, d = b.getNumberValue("ADDRESS"), e = b.getNumberValue("VALUE"); - return Entry.Robotis_carCont.postCallReturn(b, [[c, d, 65535 < e ? 4 : 255 < e ? 2 : 1, e]], Entry.Robotis_openCM70.delay); +Entry.block.robotis_openCM70_cm_custom = function(b, a) { + var c = Entry.Robotis_openCM70.INSTRUCTION.WRITE, d = 0, e = 0, d = a.getNumberValue("ADDRESS"), e = a.getNumberValue("VALUE"); + return Entry.Robotis_carCont.postCallReturn(a, [[c, d, 65535 < e ? 4 : 255 < e ? 2 : 1, e]], Entry.Robotis_openCM70.delay); }; Blockly.Blocks.robotis_carCont_sensor_value = {init:function() { this.setColour("#00979D"); @@ -4559,8 +4702,8 @@ Blockly.Blocks.robotis_carCont_sensor_value = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.robotis_carCont_sensor_value = function(a, b) { - var c = Entry.Robotis_carCont.INSTRUCTION.READ, d = 0, e = 0, f = 0, g = 0, h = b.getStringField("SENSOR"); +Entry.block.robotis_carCont_sensor_value = function(b, a) { + var c = Entry.Robotis_carCont.INSTRUCTION.READ, d = 0, e = 0, f = 0, g = 0, h = a.getStringField("SENSOR"); "CM_SPRING_LEFT" == h ? (f = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_LEFT[0], g = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_LEFT[1], d = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_LEFT[2], e = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_LEFT[3]) : "CM_SPRING_RIGHT" == h ? (f = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_RIGHT[0], g = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_RIGHT[1], d = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_RIGHT[2], e = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_RIGHT[3]) : "CM_SWITCH" == h ? (f = Entry.Robotis_carCont.CONTROL_TABLE.CM_SWITCH[0], g = Entry.Robotis_carCont.CONTROL_TABLE.CM_SWITCH[1], d = Entry.Robotis_carCont.CONTROL_TABLE.CM_SWITCH[0], e = Entry.Robotis_carCont.CONTROL_TABLE.CM_SWITCH[1]) : "CM_SOUND_DETECTED" == h ? (f = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[0], g = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[1], d = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[0], e = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[1]) : "CM_SOUND_DETECTING" == h ? (f = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTING[0], g = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTING[1], d = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTING[0], e = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTING[1]) : "CM_IR_LEFT" == h ? (f = Entry.Robotis_carCont.CONTROL_TABLE.CM_IR_LEFT[0], g = Entry.Robotis_carCont.CONTROL_TABLE.CM_IR_LEFT[1], d = Entry.Robotis_carCont.CONTROL_TABLE.CM_IR_LEFT[2], e = Entry.Robotis_carCont.CONTROL_TABLE.CM_IR_LEFT[3]) : @@ -4578,11 +4721,11 @@ Blockly.Blocks.robotis_carCont_cm_led = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_carCont_cm_led = function(a, b) { - var c = b.getField("VALUE_LEFT", b), d = b.getField("VALUE_RIGHT", b), e = Entry.Robotis_carCont.INSTRUCTION.WRITE, f = 0, g = 0, h = 0, f = Entry.Robotis_carCont.CONTROL_TABLE.CM_LED[0], g = Entry.Robotis_carCont.CONTROL_TABLE.CM_LED[1]; +Entry.block.robotis_carCont_cm_led = function(b, a) { + var c = a.getField("VALUE_LEFT", a), d = a.getField("VALUE_RIGHT", a), e = Entry.Robotis_carCont.INSTRUCTION.WRITE, f = 0, g = 0, h = 0, f = Entry.Robotis_carCont.CONTROL_TABLE.CM_LED[0], g = Entry.Robotis_carCont.CONTROL_TABLE.CM_LED[1]; 1 == c && 1 == d ? h = 9 : 1 == c && 0 == d && (h = 8); 0 == c && 1 == d && (h = 1); - return Entry.Robotis_carCont.postCallReturn(b, [[e, f, g, h]], Entry.Robotis_carCont.delay); + return Entry.Robotis_carCont.postCallReturn(a, [[e, f, g, h]], Entry.Robotis_carCont.delay); }; Blockly.Blocks.robotis_carCont_cm_sound_detected_clear = {init:function() { this.setColour("#00979D"); @@ -4591,9 +4734,9 @@ Blockly.Blocks.robotis_carCont_cm_sound_detected_clear = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_carCont_cm_sound_detected_clear = function(a, b) { +Entry.block.robotis_carCont_cm_sound_detected_clear = function(b, a) { var c = Entry.Robotis_carCont.INSTRUCTION.WRITE, d = 0, e = 0, d = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[0], e = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[1]; - return Entry.Robotis_carCont.postCallReturn(b, [[c, d, e, 0]], Entry.Robotis_carCont.delay); + return Entry.Robotis_carCont.postCallReturn(a, [[c, d, e, 0]], Entry.Robotis_carCont.delay); }; Blockly.Blocks.robotis_carCont_aux_motor_speed = {init:function() { this.setColour("#00979D"); @@ -4604,11 +4747,11 @@ Blockly.Blocks.robotis_carCont_aux_motor_speed = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_carCont_aux_motor_speed = function(a, b) { - var c = b.getField("DIRECTION", b), d = b.getField("DIRECTION_ANGLE", b), e = b.getNumberValue("VALUE"), f = Entry.Robotis_carCont.INSTRUCTION.WRITE, g = 0, h = 0; +Entry.block.robotis_carCont_aux_motor_speed = function(b, a) { + var c = a.getField("DIRECTION", a), d = a.getField("DIRECTION_ANGLE", a), e = a.getNumberValue("VALUE"), f = Entry.Robotis_carCont.INSTRUCTION.WRITE, g = 0, h = 0; "LEFT" == c ? (g = Entry.Robotis_carCont.CONTROL_TABLE.AUX_MOTOR_SPEED_LEFT[0], h = Entry.Robotis_carCont.CONTROL_TABLE.AUX_MOTOR_SPEED_LEFT[1]) : (g = Entry.Robotis_carCont.CONTROL_TABLE.AUX_MOTOR_SPEED_RIGHT[0], h = Entry.Robotis_carCont.CONTROL_TABLE.AUX_MOTOR_SPEED_RIGHT[1]); "CW" == d ? (e += 1024, 2047 < e && (e = 2047)) : 1023 < e && (e = 1023); - return Entry.Robotis_carCont.postCallReturn(b, [[f, g, h, e]], Entry.Robotis_carCont.delay); + return Entry.Robotis_carCont.postCallReturn(a, [[f, g, h, e]], Entry.Robotis_carCont.delay); }; Blockly.Blocks.robotis_carCont_cm_calibration = {init:function() { this.setColour("#00979D"); @@ -4619,10 +4762,10 @@ Blockly.Blocks.robotis_carCont_cm_calibration = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.robotis_carCont_cm_calibration = function(a, b) { - var c = b.getField("DIRECTION", b), d = b.getNumberValue("VALUE"), e = Entry.Robotis_carCont.INSTRUCTION.WRITE, f = 0, g = 0; +Entry.block.robotis_carCont_cm_calibration = function(b, a) { + var c = a.getField("DIRECTION", a), d = a.getNumberValue("VALUE"), e = Entry.Robotis_carCont.INSTRUCTION.WRITE, f = 0, g = 0; "LEFT" == c ? (f = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_LEFT[0], g = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_LEFT[1]) : (f = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_RIGHT[0], g = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_RIGHT[1]); - return Entry.Robotis_carCont.postCallReturn(b, [[e, f, g, d]], Entry.Robotis_carCont.delay); + return Entry.Robotis_carCont.postCallReturn(a, [[e, f, g, d]], Entry.Robotis_carCont.delay); }; Blockly.Blocks.when_scene_start = {init:function() { this.setColour("#3BBD70"); @@ -4630,8 +4773,8 @@ Blockly.Blocks.when_scene_start = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); }}; -Entry.block.when_scene_start = function(a, b) { - return b.callReturn(); +Entry.block.when_scene_start = function(b, a) { + return a.callReturn(); }; Blockly.Blocks.start_scene = {init:function() { this.setColour("#3BBD70"); @@ -4640,8 +4783,8 @@ Blockly.Blocks.start_scene = {init:function() { this.setInputsInline(!0); this.setPreviousStatement(!0); }}; -Entry.block.start_scene = function(a, b) { - var c = b.getField("VALUE", b); +Entry.block.start_scene = function(b, a) { + var c = a.getField("VALUE", a); if (c = Entry.scene.getSceneById(c)) { Entry.scene.selectScene(c), Entry.engine.fireEvent("when_scene_start"); } @@ -4654,9 +4797,9 @@ Blockly.Blocks.start_neighbor_scene = {init:function() { this.setInputsInline(!0); this.setPreviousStatement(!0); }}; -Entry.block.start_neighbor_scene = function(a, b) { +Entry.block.start_neighbor_scene = function(b, a) { var c = Entry.scene.selectedScene, d = Entry.scene.getScenes(), c = d.indexOf(c); - "next" == b.getField("OPERATOR", b) ? c + 1 < d.length && (d = Entry.scene.getSceneById(d[c + 1].id)) && (Entry.scene.selectScene(d), Entry.engine.fireEvent("when_scene_start")) : 0 < c && (d = Entry.scene.getSceneById(d[c - 1].id)) && (Entry.scene.selectScene(d), Entry.engine.fireEvent("when_scene_start")); + "next" == a.getField("OPERATOR", a) ? c + 1 < d.length && (d = Entry.scene.getSceneById(d[c + 1].id)) && (Entry.scene.selectScene(d), Entry.engine.fireEvent("when_scene_start")) : 0 < c && (d = Entry.scene.getSceneById(d[c - 1].id)) && (Entry.scene.selectScene(d), Entry.engine.fireEvent("when_scene_start")); return null; }; Blockly.Blocks.sound_something = {init:function() { @@ -4668,10 +4811,10 @@ Blockly.Blocks.sound_something = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_something = function(a, b) { - var c = b.getField("VALUE", b); - Entry.isExist(c, "id", a.parent.sounds) && createjs.Sound.play(c); - return b.callReturn(); +Entry.block.sound_something = function(b, a) { + var c = a.getField("VALUE", a); + Entry.isExist(c, "id", b.parent.sounds) && createjs.Sound.play(c); + return a.callReturn(); }; Blockly.Blocks.sound_something_second = {init:function() { this.setColour("#A4D01D"); @@ -4684,15 +4827,15 @@ Blockly.Blocks.sound_something_second = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_something_second = function(a, b) { - var c = b.getField("VALUE", b), d = b.getNumberValue("SECOND", b); - if (Entry.isExist(c, "id", a.parent.sounds)) { +Entry.block.sound_something_second = function(b, a) { + var c = a.getField("VALUE", a), d = a.getNumberValue("SECOND", a); + if (Entry.isExist(c, "id", b.parent.sounds)) { var e = createjs.Sound.play(c); setTimeout(function() { e.stop(); }, 1E3 * d); } - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.sound_something_wait = {init:function() { this.setColour("#A4D01D"); @@ -4703,22 +4846,22 @@ Blockly.Blocks.sound_something_wait = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_something_wait = function(a, b) { - if (b.isPlay) { - if (1 == b.playState) { - return b; +Entry.block.sound_something_wait = function(b, a) { + if (a.isPlay) { + if (1 == a.playState) { + return a; } - delete b.playState; - delete b.isPlay; - return b.callReturn(); + delete a.playState; + delete a.isPlay; + return a.callReturn(); } - b.isPlay = !0; - b.playState = 1; - var c = b.getField("VALUE", b), d = a.parent.getSound(c); - Entry.isExist(c, "id", a.parent.sounds) && (createjs.Sound.play(c), setTimeout(function() { - b.playState = 0; + a.isPlay = !0; + a.playState = 1; + var c = a.getField("VALUE", a), d = b.parent.getSound(c); + Entry.isExist(c, "id", b.parent.sounds) && (createjs.Sound.play(c), setTimeout(function() { + a.playState = 0; }, 1E3 * d.duration)); - return b; + return a; }; Blockly.Blocks.sound_something_second_wait = {init:function() { this.setColour("#A4D01D"); @@ -4731,28 +4874,28 @@ Blockly.Blocks.sound_something_second_wait = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_something_second_wait = function(a, b) { - if (b.isPlay) { - if (1 == b.playState) { - return b; +Entry.block.sound_something_second_wait = function(b, a) { + if (a.isPlay) { + if (1 == a.playState) { + return a; } - delete b.isPlay; - delete b.playState; - return b.callReturn(); + delete a.isPlay; + delete a.playState; + return a.callReturn(); } - b.isPlay = !0; - b.playState = 1; - var c = b.getField("VALUE", b); - if (Entry.isExist(c, "id", a.parent.sounds)) { - var d = createjs.Sound.play(c), c = b.getNumberValue("SECOND", b); + a.isPlay = !0; + a.playState = 1; + var c = a.getField("VALUE", a); + if (Entry.isExist(c, "id", b.parent.sounds)) { + var d = createjs.Sound.play(c), c = a.getNumberValue("SECOND", a); setTimeout(function() { d.stop(); - b.playState = 0; + a.playState = 0; }, 1E3 * c); - d.addEventListener("complete", function(b) { + d.addEventListener("complete", function(a) { }); } - return b; + return a; }; Blockly.Blocks.sound_volume_change = {init:function() { this.setColour("#A4D01D"); @@ -4763,12 +4906,12 @@ Blockly.Blocks.sound_volume_change = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_volume_change = function(a, b) { - var c = b.getNumberValue("VALUE", b) / 100, c = c + createjs.Sound.getVolume(); +Entry.block.sound_volume_change = function(b, a) { + var c = a.getNumberValue("VALUE", a) / 100, c = c + createjs.Sound.getVolume(); 1 < c && (c = 1); 0 > c && (c = 0); createjs.Sound.setVolume(c); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.sound_volume_set = {init:function() { this.setColour("#A4D01D"); @@ -4779,12 +4922,12 @@ Blockly.Blocks.sound_volume_set = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_volume_set = function(a, b) { - var c = b.getNumberValue("VALUE", b) / 100; +Entry.block.sound_volume_set = function(b, a) { + var c = a.getNumberValue("VALUE", a) / 100; 1 < c && (c = 1); 0 > c && (c = 0); createjs.Sound.setVolume(c); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.sound_silent_all = {init:function() { this.setColour("#A4D01D"); @@ -4793,9 +4936,9 @@ Blockly.Blocks.sound_silent_all = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_silent_all = function(a, b) { +Entry.block.sound_silent_all = function(b, a) { createjs.Sound.stop(); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.get_sounds = {init:function() { this.setColour("#A4D01D"); @@ -4805,8 +4948,8 @@ Blockly.Blocks.get_sounds = {init:function() { this.setOutput(!0, "String"); this.setInputsInline(!0); }}; -Entry.block.get_sounds = function(a, b) { - return b.getStringField("VALUE"); +Entry.block.get_sounds = function(b, a) { + return a.getStringField("VALUE"); }; Blockly.Blocks.sound_something_with_block = {init:function() { this.setColour("#A4D01D"); @@ -4817,10 +4960,10 @@ Blockly.Blocks.sound_something_with_block = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_something_with_block = function(a, b) { - var c = b.getStringValue("VALUE", b); - (c = a.parent.getSound(c)) && createjs.Sound.play(c.id); - return b.callReturn(); +Entry.block.sound_something_with_block = function(b, a) { + var c = a.getStringValue("VALUE", a); + (c = b.parent.getSound(c)) && createjs.Sound.play(c.id); + return a.callReturn(); }; Blockly.Blocks.sound_something_second_with_block = {init:function() { this.setColour("#A4D01D"); @@ -4833,10 +4976,10 @@ Blockly.Blocks.sound_something_second_with_block = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_something_second_with_block = function(a, b) { - var c = b.getStringValue("VALUE", b), d = b.getNumberValue("SECOND", b); - (c = a.parent.getSound(c)) && createjs.Sound.play(c.id, {startTime:0, duration:1E3 * d}); - return b.callReturn(); +Entry.block.sound_something_second_with_block = function(b, a) { + var c = a.getStringValue("VALUE", a), d = a.getNumberValue("SECOND", a); + (c = b.parent.getSound(c)) && createjs.Sound.play(c.id, {startTime:0, duration:1E3 * d}); + return a.callReturn(); }; Blockly.Blocks.sound_something_wait_with_block = {init:function() { this.setColour("#A4D01D"); @@ -4847,24 +4990,24 @@ Blockly.Blocks.sound_something_wait_with_block = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_something_wait_with_block = function(a, b) { - if (b.isPlay) { - if (1 == b.playState) { - return b; +Entry.block.sound_something_wait_with_block = function(b, a) { + if (a.isPlay) { + if (1 == a.playState) { + return a; } - delete b.playState; - delete b.isPlay; - return b.callReturn(); + delete a.playState; + delete a.isPlay; + return a.callReturn(); } - b.isPlay = !0; - b.playState = 1; - var c = b.getStringValue("VALUE", b); - if (c = a.parent.getSound(c)) { + a.isPlay = !0; + a.playState = 1; + var c = a.getStringValue("VALUE", a); + if (c = b.parent.getSound(c)) { createjs.Sound.play(c.id), setTimeout(function() { - b.playState = 0; + a.playState = 0; }, 1E3 * c.duration); } - return b; + return a; }; Blockly.Blocks.sound_something_second_wait_with_block = {init:function() { this.setColour("#A4D01D"); @@ -4877,28 +5020,28 @@ Blockly.Blocks.sound_something_second_wait_with_block = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_something_second_wait_with_block = function(a, b) { - if (b.isPlay) { - if (1 == b.playState) { - return b; +Entry.block.sound_something_second_wait_with_block = function(b, a) { + if (a.isPlay) { + if (1 == a.playState) { + return a; } - delete b.isPlay; - delete b.playState; - return b.callReturn(); + delete a.isPlay; + delete a.playState; + return a.callReturn(); } - b.isPlay = !0; - b.playState = 1; - var c = b.getStringValue("VALUE", b); - if (c = a.parent.getSound(c)) { - var d = createjs.Sound.play(c.id), c = b.getNumberValue("SECOND", b); + a.isPlay = !0; + a.playState = 1; + var c = a.getStringValue("VALUE", a); + if (c = b.parent.getSound(c)) { + var d = createjs.Sound.play(c.id), c = a.getNumberValue("SECOND", a); setTimeout(function() { d.stop(); - b.playState = 0; + a.playState = 0; }, 1E3 * c); - d.addEventListener("complete", function(b) { + d.addEventListener("complete", function(a) { }); } - return b; + return a; }; Blockly.Blocks.sound_from_to = {init:function() { this.setColour("#A4D01D"); @@ -4913,13 +5056,13 @@ Blockly.Blocks.sound_from_to = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_from_to = function(a, b) { - var c = b.getStringValue("VALUE", b); - if (c = a.parent.getSound(c)) { - var d = 1E3 * b.getNumberValue("START", b), e = 1E3 * b.getNumberValue("END", b); +Entry.block.sound_from_to = function(b, a) { + var c = a.getStringValue("VALUE", a); + if (c = b.parent.getSound(c)) { + var d = 1E3 * a.getNumberValue("START", a), e = 1E3 * a.getNumberValue("END", a); createjs.Sound.play(c.id, {startTime:Math.min(d, e), duration:Math.max(d, e) - Math.min(d, e)}); } - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.sound_from_to_and_wait = {init:function() { this.setColour("#A4D01D"); @@ -4934,26 +5077,26 @@ Blockly.Blocks.sound_from_to_and_wait = {init:function() { this.setNextStatement(!0); this.setPreviousStatement(!0); }}; -Entry.block.sound_from_to_and_wait = function(a, b) { - if (b.isPlay) { - if (1 == b.playState) { - return b; +Entry.block.sound_from_to_and_wait = function(b, a) { + if (a.isPlay) { + if (1 == a.playState) { + return a; } - delete b.isPlay; - delete b.playState; - return b.callReturn(); + delete a.isPlay; + delete a.playState; + return a.callReturn(); } - b.isPlay = !0; - b.playState = 1; - var c = b.getStringValue("VALUE", b); - if (c = a.parent.getSound(c)) { - var d = 1E3 * b.getNumberValue("START", b), e = 1E3 * b.getNumberValue("END", b), f = Math.min(d, e), d = Math.max(d, e) - f; + a.isPlay = !0; + a.playState = 1; + var c = a.getStringValue("VALUE", a); + if (c = b.parent.getSound(c)) { + var d = 1E3 * a.getNumberValue("START", a), e = 1E3 * a.getNumberValue("END", a), f = Math.min(d, e), d = Math.max(d, e) - f; createjs.Sound.play(c.id, {startTime:f, duration:d}); setTimeout(function() { - b.playState = 0; + a.playState = 0; }, d); } - return b; + return a; }; Blockly.Blocks.when_run_button_click = {init:function() { this.setColour("#3BBD70"); @@ -4961,8 +5104,8 @@ Blockly.Blocks.when_run_button_click = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); }}; -Entry.block.when_run_button_click = function(a, b) { - return b.callReturn(); +Entry.block.when_run_button_click = function(b, a) { + return a.callReturn(); }; Blockly.Blocks.press_some_key = {init:function() { this.setColour("#3BBD70"); @@ -4971,8 +5114,8 @@ Blockly.Blocks.press_some_key = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); }}; -Entry.block.press_some_key = function(a, b) { - return b.callReturn(); +Entry.block.press_some_key = function(b, a) { + return a.callReturn(); }; Blockly.Blocks.when_some_key_pressed = {init:function() { this.setColour("#3BBD70"); @@ -4980,8 +5123,8 @@ Blockly.Blocks.when_some_key_pressed = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); }}; -Entry.block.when_some_key_pressed = function(a, b) { - return b.callReturn(); +Entry.block.when_some_key_pressed = function(b, a) { + return a.callReturn(); }; Blockly.Blocks.mouse_clicked = {init:function() { this.setColour("#3BBD70"); @@ -4989,8 +5132,8 @@ Blockly.Blocks.mouse_clicked = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); }}; -Entry.block.mouse_clicked = function(a, b) { - return b.callReturn(); +Entry.block.mouse_clicked = function(b, a) { + return a.callReturn(); }; Blockly.Blocks.mouse_click_cancled = {init:function() { this.setColour("#3BBD70"); @@ -4998,8 +5141,8 @@ Blockly.Blocks.mouse_click_cancled = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); }}; -Entry.block.mouse_click_cancled = function(a, b) { - return b.callReturn(); +Entry.block.mouse_click_cancled = function(b, a) { + return a.callReturn(); }; Blockly.Blocks.when_object_click = {init:function() { this.setColour("#3BBD70"); @@ -5007,8 +5150,8 @@ Blockly.Blocks.when_object_click = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); }}; -Entry.block.when_object_click = function(a, b) { - return b.callReturn(); +Entry.block.when_object_click = function(b, a) { + return a.callReturn(); }; Blockly.Blocks.when_object_click_canceled = {init:function() { this.setColour("#3BBD70"); @@ -5016,8 +5159,8 @@ Blockly.Blocks.when_object_click_canceled = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); }}; -Entry.block.when_object_click_canceled = function(a, b) { - return b.callReturn(); +Entry.block.when_object_click_canceled = function(b, a) { + return a.callReturn(); }; Blockly.Blocks.when_some_key_click = {init:function() { this.setColour("#3BBD70"); @@ -5025,17 +5168,23 @@ Blockly.Blocks.when_some_key_click = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); }}; -Entry.block.when_some_key_click = function(a, b) { - return b.callReturn(); +Entry.block.when_some_key_click = function(b, a) { + return a.callReturn(); }; Blockly.Blocks.when_message_cast = {init:function() { this.setColour("#3BBD70"); this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/start_icon_signal.png", "*", "start")).appendField(Lang.Blocks.START_when_message_cast_1).appendField(new Blockly.FieldDropdownDynamic("messages"), "VALUE").appendField(Lang.Blocks.START_when_message_cast_2); this.setInputsInline(!0); this.setNextStatement(!0); +}, whenAdd:function(b) { + var a = Entry.variableContainer; + a && a.addRef("_messageRefs", b); +}, whenRemove:function(b) { + var a = Entry.variableContainer; + a && a.removeRef("_messageRefs", b); }}; -Entry.block.when_message_cast = function(a, b) { - return b.callReturn(); +Entry.block.when_message_cast = function(b, a) { + return a.callReturn(); }; Blockly.Blocks.message_cast = {init:function() { this.setColour("#3BBD70"); @@ -5044,22 +5193,20 @@ Blockly.Blocks.message_cast = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); this.setPreviousStatement(!0); -}}; -Entry.block.message_cast = function(a, b) { - var c = b.getField("VALUE", b), d = Entry.isExist(c, "id", Entry.variableContainer.messages_); +}, whenAdd:function(b) { + var a = Entry.variableContainer; + a && a.addRef("_messageRefs", b); +}, whenRemove:function(b) { + var a = Entry.variableContainer; + a && a.removeRef("_messageRefs", b); +}}; +Entry.block.message_cast = function(b, a) { + var c = a.getField("VALUE", a), d = Entry.isExist(c, "id", Entry.variableContainer.messages_); if ("null" == c || !d) { throw Error("value can not be null or undefined"); } Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent, ["when_message_cast", c]); - return b.callReturn(); -}; -Blockly.Blocks.add_message = {init:function() { - this.setColour("#3BBD70"); - this.appendDummyInput().appendField(Lang.Blocks.START_add_message).appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/start_03.png", "*")); - this.setInputsInline(!0); -}}; -Entry.block.add_massage = function(a, b) { - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.message_cast_wait = {init:function() { this.setColour("#3BBD70"); @@ -5067,28 +5214,32 @@ Blockly.Blocks.message_cast_wait = {init:function() { this.setInputsInline(!0); this.setNextStatement(!0); this.setPreviousStatement(!0); -}}; -Entry.block.message_cast_wait = function(a, b) { - if (b.runningScript) { - if (b.runningScript.length) { - return Entry.engine.computeFunction(b), b; - } - delete b.runningScript; - return b.callReturn(); - } - var c = b.getField("VALUE", b), d = Entry.isExist(c, "id", Entry.variableContainer.messages_); - if ("null" == c || !d) { +}, whenAdd:function(b) { + var a = Entry.variableContainer; + a && a.addRef("_messageRefs", b); +}, whenRemove:function(b) { + var a = Entry.variableContainer; + a && a.removeRef("_messageRefs", b); +}}; +Entry.block.message_cast_wait = function(b, a) { + if (a.runningScript) { + for (var c = a.runningScript, d = c.length, e = 0;e < d;e++) { + var f = c.shift(); + f && !f.isEnd() && c.push(f); + } + return c.length ? a : a.callReturn(); + } + c = a.getField("VALUE", a); + f = Entry.isExist(c, "id", Entry.variableContainer.messages_); + if ("null" == c || !f) { throw Error("value can not be null or undefined"); } - var e = []; - Entry.container.mapEntityIncludeCloneOnScene(function(b, a) { - for (var c = a[0], d = a[1], l = b.parent.script.childNodes, q = 0;q < l.length;q++) { - var n = l[q], m = Entry.Xml.getField("VALUE", n); - Entry.Xml.isTypeOf(c, n) && m == d && (m = new Entry.Script(b), m.init(n), e.push(m)); - } - }, ["when_message_cast", c]); - b.runningScript = e; - return b; + d = Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent, ["when_message_cast", c]); + for (c = [];d.length;) { + (f = d.shift()) && (c = c.concat(f)); + } + a.runningScript = c; + return a; }; var colour = "#FFCA36"; Blockly.Blocks.text = {init:function() { @@ -5097,8 +5248,8 @@ Blockly.Blocks.text = {init:function() { this.setOutput(!0, "String"); this.setInputsInline(!0); }}; -Entry.block.text = function(a, b) { - return b.getField("NAME"); +Entry.block.text = function(b, a) { + return a.getField("NAME", a); }; Blockly.Blocks.text_write = {init:function() { this.setColour(colour); @@ -5109,10 +5260,10 @@ Blockly.Blocks.text_write = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.text_write = function(a, b) { - var c = b.getStringValue("VALUE", b), c = Entry.convertToRoundedDecimals(c, 3); - a.setText(c); - return b.callReturn(); +Entry.block.text_write = function(b, a) { + var c = a.getStringValue("VALUE", a), c = Entry.convertToRoundedDecimals(c, 3); + b.setText(c); + return a.callReturn(); }; Blockly.Blocks.text_append = {init:function() { this.setColour(colour); @@ -5123,10 +5274,10 @@ Blockly.Blocks.text_append = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.text_append = function(a, b) { - var c = b.getStringValue("VALUE", b); - a.setText(Entry.convertToRoundedDecimals(a.getText(), 3) + Entry.convertToRoundedDecimals(c, 3)); - return b.callReturn(); +Entry.block.text_append = function(b, a) { + var c = a.getStringValue("VALUE", a); + b.setText(Entry.convertToRoundedDecimals(b.getText(), 3) + Entry.convertToRoundedDecimals(c, 3)); + return a.callReturn(); }; Blockly.Blocks.text_prepend = {init:function() { this.setColour(colour); @@ -5137,10 +5288,10 @@ Blockly.Blocks.text_prepend = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.text_prepend = function(a, b) { - var c = b.getStringValue("VALUE", b); - a.setText(Entry.convertToRoundedDecimals(c, 3) + Entry.convertToRoundedDecimals(a.getText(), 3)); - return b.callReturn(); +Entry.block.text_prepend = function(b, a) { + var c = a.getStringValue("VALUE", a); + b.setText(Entry.convertToRoundedDecimals(c, 3) + Entry.convertToRoundedDecimals(b.getText(), 3)); + return a.callReturn(); }; Blockly.Blocks.text_flush = {init:function() { this.setColour(colour); @@ -5149,10 +5300,18 @@ Blockly.Blocks.text_flush = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.text_flush = function(a, b) { - a.setText(""); - return b.callReturn(); -}; +Entry.block.text_flush = function(b, a) { + b.setText(""); + return a.callReturn(); +}; +Entry.block.variableAddButton = {skeleton:"basic_button", color:"#eee", template:"%1", params:[{type:"Text", text:"\ubcc0\uc218 \ucd94\uac00", color:"#333", align:"center"}], func:function() { +}, events:{mousedown:[function() { + Entry.variableContainer.openVariableAddPanel("variable"); +}]}}; +Entry.block.listAddButton = {skeleton:"basic_button", color:"#eee", template:"%1", params:[{type:"Text", text:"\ub9ac\uc2a4\ud2b8 \ucd94\uac00", color:"#333", align:"center"}], func:function() { +}, events:{mousedown:[function() { + Entry.variableContainer.openVariableAddPanel("list"); +}]}}; Blockly.Blocks.change_variable = {init:function() { this.setColour("#E457DC"); this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_change_variable_1); @@ -5163,16 +5322,22 @@ Blockly.Blocks.change_variable = {init:function() { this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); -}}; -Entry.block.change_variable = function(a, b) { - var c = b.getField("VARIABLE", b), d = b.getNumberValue("VALUE", b), e = 0, d = Entry.parseNumber(d); +}, whenAdd:function(b) { + var a = Entry.variableContainer; + a && a.addRef("_variableRefs", b); +}, whenRemove:function(b) { + var a = Entry.variableContainer; + a && a.removeRef("_variableRefs", b); +}}; +Entry.block.change_variable = function(b, a) { + var c = a.getField("VARIABLE", a), d = a.getNumberValue("VALUE", a), e = 0, d = Entry.parseNumber(d); if (0 == d && "boolean" == typeof d) { throw Error("Type is not correct"); } - c = Entry.variableContainer.getVariable(c, a); + c = Entry.variableContainer.getVariable(c, b); e = Entry.getMaxFloatPoint([d, c.getValue()]); c.setValue((d + c.getValue()).toFixed(e)); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.set_variable = {init:function() { this.setColour("#E457DC"); @@ -5184,11 +5349,17 @@ Blockly.Blocks.set_variable = {init:function() { this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); -}}; -Entry.block.set_variable = function(a, b) { - var c = b.getField("VARIABLE", b), d = b.getValue("VALUE", b); - Entry.variableContainer.getVariable(c, a).setValue(d); - return b.callReturn(); +}, whenAdd:function(b) { + var a = Entry.variableContainer; + a && a.addRef("_variableRefs", b); +}, whenRemove:function(b) { + var a = Entry.variableContainer; + a && a.removeRef("_variableRefs", b); +}}; +Entry.block.set_variable = function(b, a) { + var c = a.getField("VARIABLE", a), d = a.getValue("VALUE", a); + Entry.variableContainer.getVariable(c, b).setValue(d); + return a.callReturn(); }; Blockly.Blocks.show_variable = {init:function() { this.setColour("#E457DC"); @@ -5197,12 +5368,18 @@ Blockly.Blocks.show_variable = {init:function() { this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); -}}; -Entry.block.show_variable = function(a, b) { - var c = b.getField("VARIABLE", b), c = Entry.variableContainer.getVariable(c, a); +}, whenAdd:function(b) { + var a = Entry.variableContainer; + a && a.addRef("_variableRefs", b); +}, whenRemove:function(b) { + var a = Entry.variableContainer; + a && a.removeRef("_variableRefs", b); +}}; +Entry.block.show_variable = function(b, a) { + var c = a.getField("VARIABLE", a), c = Entry.variableContainer.getVariable(c, b); c.setVisible(!0); c.updateView(); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hide_variable = {init:function() { this.setColour("#E457DC"); @@ -5211,11 +5388,17 @@ Blockly.Blocks.hide_variable = {init:function() { this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); -}}; -Entry.block.hide_variable = function(a, b) { - var c = b.getField("VARIABLE", b); - Entry.variableContainer.getVariable(c, a).setVisible(!1); - return b.callReturn(); +}, whenAdd:function(b) { + var a = Entry.variableContainer; + a && a.addRef("_variableRefs", b); +}, whenRemove:function(b) { + var a = Entry.variableContainer; + a && a.removeRef("_variableRefs", b); +}}; +Entry.block.hide_variable = function(b, a) { + var c = a.getField("VARIABLE", a); + Entry.variableContainer.getVariable(c, b).setVisible(!1); + return a.callReturn(); }; Blockly.Blocks.get_y = {init:function() { this.setColour(230); @@ -5228,10 +5411,16 @@ Blockly.Blocks.get_variable = {init:function() { this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("variables"), "VARIABLE").appendField(Lang.Blocks.VARIABLE_get_variable_2); this.setOutput(!0, "Number"); this.setInputsInline(!0); +}, whenAdd:function(b) { + var a = Entry.variableContainer; + a && a.addRef("_variableRefs", b); +}, whenRemove:function(b) { + var a = Entry.variableContainer; + a && a.removeRef("_variableRefs", b); }}; -Entry.block.get_variable = function(a, b) { - var c = b.getField("VARIABLE", b); - return Entry.variableContainer.getVariable(c, a).getValue(); +Entry.block.get_variable = function(b, a) { + var c = a.getField("VARIABLE", a); + return Entry.variableContainer.getVariable(c, b).getValue(); }; Blockly.Blocks.ask_and_wait = {init:function() { this.setColour("#E457DC"); @@ -5242,44 +5431,44 @@ Blockly.Blocks.ask_and_wait = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }, whenAdd:function() { - Entry.container.showProjectAnswer(); -}, whenRemove:function(a) { - Entry.container.hideProjectAnswer(a); + Entry.container && Entry.container.showProjectAnswer(); +}, whenRemove:function(b) { + Entry.container && Entry.container.hideProjectAnswer(b); }}; -Entry.block.ask_and_wait = function(a, b) { - var c = Entry.container.inputValue, d = Entry.stage.inputField, e = b.getValue("VALUE", b); +Entry.block.ask_and_wait = function(b, a) { + var c = Entry.container.inputValue, d = Entry.stage.inputField, e = a.getValue("VALUE", a); if (!e) { throw Error("message can not be empty"); } - if (c.sprite == a && d && !d._isHidden) { - return b; + if (c.sprite == b && d && !d._isHidden) { + return a; } - if (c.sprite != a && b.isInit) { - return a.dialog && a.dialog.remove(), delete b.isInit, b.callReturn(); + if (c.sprite != b && a.isInit) { + return b.dialog && b.dialog.remove(), delete a.isInit, a.callReturn(); } - if (c.complete && c.sprite == a && d._isHidden && b.isInit) { - return a.dialog && a.dialog.remove(), delete c.complete, delete b.isInit, b.callReturn(); + if (c.complete && c.sprite == b && d._isHidden && a.isInit) { + return b.dialog && b.dialog.remove(), delete c.complete, delete a.isInit, a.callReturn(); } e = Entry.convertToRoundedDecimals(e, 3); - new Entry.Dialog(a, e, "speak"); + new Entry.Dialog(b, e, "speak"); Entry.stage.showInputField(); - c.script = b; - c.sprite = a; - b.isInit = !0; - return b; + c.script = a; + c.sprite = b; + a.isInit = !0; + return a; }; Blockly.Blocks.get_canvas_input_value = {init:function() { this.setColour("#E457DC"); - this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_get_canvas_input_value); + this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_get_canvas_input_value, "#fff"); this.appendDummyInput().appendField(" "); this.setOutput(!0, "Number"); this.setInputsInline(!0); }, whenAdd:function() { - Entry.container.showProjectAnswer(); -}, whenRemove:function(a) { - Entry.container.hideProjectAnswer(a); + Entry.container && Entry.container.showProjectAnswer(); +}, whenRemove:function(b) { + Entry.container && Entry.container.hideProjectAnswer(b); }}; -Entry.block.get_canvas_input_value = function(a, b) { +Entry.block.get_canvas_input_value = function(b, a) { return Entry.container.getInputValue(); }; Blockly.Blocks.add_value_to_list = {init:function() { @@ -5292,13 +5481,19 @@ Blockly.Blocks.add_value_to_list = {init:function() { this.setInputsInline(!0); this.setPreviousStatement(!0); this.setNextStatement(!0); -}}; -Entry.block.add_value_to_list = function(a, b) { - var c = b.getField("LIST", b), d = b.getValue("VALUE", b), c = Entry.variableContainer.getList(c, a); +}, whenAdd:function(b) { + var a = Entry.variableContainer; + a && a.addRef("_variableRefs", b); +}, whenRemove:function(b) { + var a = Entry.variableContainer; + a && a.removeRef("_variableRefs", b); +}}; +Entry.block.add_value_to_list = function(b, a) { + var c = a.getField("LIST", a), d = a.getValue("VALUE", a), c = Entry.variableContainer.getList(c, b); c.array_ || (c.array_ = []); c.array_.push({data:d}); c.updateView(); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.remove_value_from_list = {init:function() { this.setColour("#E457DC"); @@ -5311,14 +5506,14 @@ Blockly.Blocks.remove_value_from_list = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.remove_value_from_list = function(a, b) { - var c = b.getField("LIST", b), d = b.getValue("VALUE", b), c = Entry.variableContainer.getList(c, a); +Entry.block.remove_value_from_list = function(b, a) { + var c = a.getField("LIST", a), d = a.getValue("VALUE", a), c = Entry.variableContainer.getList(c, b); if (!c.array_ || isNaN(d) || d > c.array_.length) { throw Error("can not remove value from array"); } c.array_.splice(d - 1, 1); c.updateView(); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.insert_value_to_list = {init:function() { this.setColour("#E457DC"); @@ -5333,14 +5528,14 @@ Blockly.Blocks.insert_value_to_list = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.insert_value_to_list = function(a, b) { - var c = b.getField("LIST", b), d = b.getValue("DATA", b), e = b.getValue("INDEX", b), c = Entry.variableContainer.getList(c, a); +Entry.block.insert_value_to_list = function(b, a) { + var c = a.getField("LIST", a), d = a.getValue("DATA", a), e = a.getValue("INDEX", a), c = Entry.variableContainer.getList(c, b); if (!c.array_ || isNaN(e) || 0 == e || e > c.array_.length + 1) { throw Error("can not insert value to array"); } c.array_.splice(e - 1, 0, {data:d}); c.updateView(); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.change_value_list_index = {init:function() { this.setColour("#E457DC"); @@ -5355,14 +5550,14 @@ Blockly.Blocks.change_value_list_index = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.change_value_list_index = function(a, b) { - var c = b.getField("LIST", b), d = b.getValue("DATA", b), e = b.getValue("INDEX", b), c = Entry.variableContainer.getList(c, a); +Entry.block.change_value_list_index = function(b, a) { + var c = a.getField("LIST", a), d = a.getValue("DATA", a), e = a.getValue("INDEX", a), c = Entry.variableContainer.getList(c, b); if (!c.array_ || isNaN(e) || e > c.array_.length) { throw Error("can not insert value to array"); } c.array_[e - 1].data = d; c.updateView(); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.value_of_index_from_list = {init:function() { this.setColour("#E457DC"); @@ -5374,8 +5569,8 @@ Blockly.Blocks.value_of_index_from_list = {init:function() { this.setOutput(!0, "String"); this.setInputsInline(!0); }}; -Entry.block.value_of_index_from_list = function(a, b) { - var c = b.getField("LIST", b), d = b.getValue("INDEX", b), c = Entry.variableContainer.getList(c, a), d = Entry.getListRealIndex(d, c); +Entry.block.value_of_index_from_list = function(b, a) { + var c = a.getField("LIST", a), d = a.getValue("INDEX", a), c = Entry.variableContainer.getList(c, b), d = Entry.getListRealIndex(d, c); if (!c.array_ || isNaN(d) || d > c.array_.length) { throw Error("can not insert value to array"); } @@ -5389,8 +5584,8 @@ Blockly.Blocks.length_of_list = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.length_of_list = function(a, b) { - var c = b.getField("LIST", b); +Entry.block.length_of_list = function(b, a) { + var c = a.getField("LIST", a); return Entry.variableContainer.getList(c).array_.length; }; Blockly.Blocks.show_list = {init:function() { @@ -5401,10 +5596,10 @@ Blockly.Blocks.show_list = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.show_list = function(a, b) { - var c = b.getField("LIST", b); +Entry.block.show_list = function(b, a) { + var c = a.getField("LIST", a); Entry.variableContainer.getList(c).setVisible(!0); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.hide_list = {init:function() { this.setColour("#E457DC"); @@ -5414,10 +5609,10 @@ Blockly.Blocks.hide_list = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.hide_list = function(a, b) { - var c = b.getField("LIST", b); +Entry.block.hide_list = function(b, a) { + var c = a.getField("LIST", a); Entry.variableContainer.getList(c).setVisible(!1); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.options_for_list = {init:function() { this.setColour("#E457DC"); @@ -5427,8 +5622,8 @@ Blockly.Blocks.options_for_list = {init:function() { this.setOutput(!0, "Number"); this.setInputsInline(!0); }}; -Entry.block.options_for_list = function(a, b) { - return b.getField("OPERATOR", b); +Entry.block.options_for_list = function(b, a) { + return a.getField("OPERATOR", a); }; Blockly.Blocks.set_visible_answer = {init:function() { this.setColour("#E457DC"); @@ -5439,13 +5634,13 @@ Blockly.Blocks.set_visible_answer = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }, whenAdd:function() { - Entry.container.showProjectAnswer(); -}, whenRemove:function(a) { - Entry.container.hideProjectAnswer(a); + Entry.container && Entry.container.showProjectAnswer(); +}, whenRemove:function(b) { + Entry.container && Entry.container.hideProjectAnswer(b); }}; -Entry.block.set_visible_answer = function(a, b) { - "HIDE" == b.getField("BOOL", b) ? Entry.container.inputValue.setVisible(!1) : Entry.container.inputValue.setVisible(!0); - return b.callReturn(); +Entry.block.set_visible_answer = function(b, a) { + "HIDE" == a.getField("BOOL", a) ? Entry.container.inputValue.setVisible(!1) : Entry.container.inputValue.setVisible(!0); + return a.callReturn(); }; Blockly.Blocks.is_included_in_list = {init:function() { this.setColour("#E457DC"); @@ -5457,8 +5652,8 @@ Blockly.Blocks.is_included_in_list = {init:function() { this.setOutput(!0, "Boolean"); this.setInputsInline(!0); }}; -Entry.block.is_included_in_list = function(a, b) { - var c = b.getField("LIST", b), d = b.getStringValue("DATA", b), c = Entry.variableContainer.getList(c); +Entry.block.is_included_in_list = function(b, a) { + var c = a.getField("LIST", a), d = a.getStringValue("DATA", a), c = Entry.variableContainer.getList(c); if (!c) { return !1; } @@ -5470,21 +5665,21 @@ Entry.block.is_included_in_list = function(a, b) { return !1; }; Entry.Xbot = {PORT_MAP:{rightWheel:0, leftWheel:0, head:90, armR:90, armL:90, analogD5:127, analogD6:127, D4:0, D7:0, D12:0, D13:0, ledR:0, ledG:0, ledB:0, lcdNum:0, lcdTxt:" ", note:262, duration:0}, setZero:function() { - var a = Entry.Xbot.PORT_MAP, b = Entry.hw.sendQueue, c; - for (c in a) { - b[c] = a[c]; + var b = Entry.Xbot.PORT_MAP, a = Entry.hw.sendQueue, c; + for (c in b) { + a[c] = b[c]; } Entry.hw.update(); Entry.Xbot.removeAllTimeouts(); -}, timeouts:[], removeTimeout:function(a) { - clearTimeout(a); - var b = this.timeouts; - a = b.indexOf(a); - 0 <= a && b.splice(a, 1); +}, timeouts:[], removeTimeout:function(b) { + clearTimeout(b); + var a = this.timeouts; + b = a.indexOf(b); + 0 <= b && a.splice(b, 1); }, removeAllTimeouts:function() { - var a = this.timeouts, b; - for (b in a) { - clearTimeout(a[b]); + var b = this.timeouts, a; + for (a in b) { + clearTimeout(b[a]); } this.timeouts = []; }, name:"xbot_epor_edge"}; @@ -5494,8 +5689,8 @@ Blockly.Blocks.xbot_digitalInput = {init:function() { this.setInputsInline(!0); this.setOutput(!0, "Boolean"); }}; -Entry.block.xbot_digitalInput = function(a, b) { - var c = Entry.hw.portData, d = b.getField("DEVICE"); +Entry.block.xbot_digitalInput = function(b, a) { + var c = Entry.hw.portData, d = a.getField("DEVICE"); return c[d]; }; Blockly.Blocks.xbot_analogValue = {init:function() { @@ -5504,8 +5699,8 @@ Blockly.Blocks.xbot_analogValue = {init:function() { this.setInputsInline(!0); this.setOutput(!0, "Number"); }}; -Entry.block.xbot_analogValue = function(a, b) { - var c = Entry.hw.portData, d = b.getField("DEVICE"); +Entry.block.xbot_analogValue = function(b, a) { + var c = Entry.hw.portData, d = a.getField("DEVICE"); return c[d]; }; Blockly.Blocks.xbot_digitalOutput = {init:function() { @@ -5516,13 +5711,13 @@ Blockly.Blocks.xbot_digitalOutput = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.xbot_digitalOutput = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getStringField("DEVICE", b), e = b.getStringField("VALUE", b); +Entry.block.xbot_digitalOutput = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getStringField("DEVICE", a), e = a.getStringField("VALUE", a); c.D13 = "D13" == d && "HIGH" == e ? 1 : 0; c.D4 = "D4" == d && "HIGH" == e ? 1 : 0; c.D7 = "D7" == d && "HIGH" == e ? 1 : 0; c.D12 = "D12" == d && "HIGH" == e ? 1 : 0; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.xbot_analogOutput = {init:function() { this.setColour("#00979D"); @@ -5533,10 +5728,10 @@ Blockly.Blocks.xbot_analogOutput = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.xbot_analogOutput = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getStringField("DEVICE", b), e = b.getNumberValue("VALUE", b); +Entry.block.xbot_analogOutput = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getStringField("DEVICE", a), e = a.getNumberValue("VALUE", a); "analogD5" == d ? c.analogD5 = e : "analogD6" == d && (c.analogD6 = e); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.xbot_servo = {init:function() { this.setColour("#00979D"); @@ -5547,10 +5742,10 @@ Blockly.Blocks.xbot_servo = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.xbot_servo = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getStringField("DEVICE", b), e = b.getNumberValue("VALUE", b); +Entry.block.xbot_servo = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getStringField("DEVICE", a), e = a.getNumberValue("VALUE", a); "head" == d ? c.head = e : "right" == d ? c.armR = e : "left" == d && (c.armL = e); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.xbot_oneWheel = {init:function() { this.setColour("#00979D"); @@ -5561,10 +5756,10 @@ Blockly.Blocks.xbot_oneWheel = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.xbot_oneWheel = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getStringField("DEVICE", b), e = b.getNumberValue("VALUE", b); +Entry.block.xbot_oneWheel = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getStringField("DEVICE", a), e = a.getNumberValue("VALUE", a); "rightWheel" == d ? c.rightWheel = e : "leftWheel" == d ? c.leftWheel = e : c.rightWheel = c.leftWheel = e; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.xbot_twoWheel = {init:function() { this.setColour("#00979D"); @@ -5577,11 +5772,11 @@ Blockly.Blocks.xbot_twoWheel = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.xbot_twoWheel = function(a, b) { +Entry.block.xbot_twoWheel = function(b, a) { var c = Entry.hw.sendQueue; - c.rightWheel = b.getNumberValue("rightWheel"); - c.leftWheel = b.getNumberValue("leftWheel"); - return b.callReturn(); + c.rightWheel = a.getNumberValue("rightWheel"); + c.leftWheel = a.getNumberValue("leftWheel"); + return a.callReturn(); }; Blockly.Blocks.xbot_rgb = {init:function() { this.setColour("#00979D"); @@ -5596,12 +5791,12 @@ Blockly.Blocks.xbot_rgb = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.xbot_rgb = function(a, b) { +Entry.block.xbot_rgb = function(b, a) { var c = Entry.hw.sendQueue; - c.ledR = b.getNumberValue("ledR"); - c.ledG = b.getNumberValue("ledG"); - c.ledB = b.getNumberValue("ledB"); - return b.callReturn(); + c.ledR = a.getNumberValue("ledR"); + c.ledG = a.getNumberValue("ledG"); + c.ledB = a.getNumberValue("ledB"); + return a.callReturn(); }; Blockly.Blocks.xbot_rgb_picker = {init:function() { this.setColour("#00979D"); @@ -5610,12 +5805,12 @@ Blockly.Blocks.xbot_rgb_picker = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.xbot_rgb_picker = function(a, b) { - var c = b.getStringField("VALUE"), d = Entry.hw.sendQueue; +Entry.block.xbot_rgb_picker = function(b, a) { + var c = a.getStringField("VALUE"), d = Entry.hw.sendQueue; d.ledR = parseInt(.3 * parseInt(c.substr(1, 2), 16)); d.ledG = parseInt(.3 * parseInt(c.substr(3, 2), 16)); d.ledB = parseInt(.3 * parseInt(c.substr(5, 2), 16)); - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.xbot_buzzer = {init:function() { this.setColour("#00979D"); @@ -5626,12 +5821,12 @@ Blockly.Blocks.xbot_buzzer = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.xbot_buzzer = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getStringField("NOTE", b), e = b.getStringField("OCTAVE", b), f = b.getNumberValue("VALUE", b), d = d + e; +Entry.block.xbot_buzzer = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getStringField("NOTE", a), e = a.getStringField("OCTAVE", a), f = a.getNumberValue("VALUE", a), d = d + e; c.note = "C2" == d ? 65 : "D2" == d ? 73 : "E2" == d ? 82 : "F2" == d ? 87 : "G2" == d ? 98 : "A2" == d ? 110 : "B2" == d ? 123 : "C3" == d ? 131 : "D3" == d ? 147 : "E3" == d ? 165 : "F3" == d ? 175 : "G3" == d ? 196 : "A3" == d ? 220 : "B3" == d ? 247 : "C4" == d ? 262 : "D4" == d ? 294 : "E4" == d ? 330 : "F4" == d ? 349 : "G4" == d ? 392 : "A4" == d ? 440 : "B4" == d ? 494 : "C5" == d ? 523 : "D5" == d ? 587 : "E5" == d ? 659 : "F5" == d ? 698 : "G5" == d ? 784 : "A5" == d ? 880 : "B5" == d ? 988 : "C6" == d ? 1047 : "D6" == d ? 1175 : "E6" == d ? 1319 : "F6" == d ? 1397 : "G6" == d ? 1568 : "A6" == d ? 1760 : "B6" == d ? 1976 : "C7" == d ? 2093 : "D7" == d ? 2349 : "E7" == d ? 2637 : "F7" == d ? 2794 : "G7" == d ? 3136 : "A7" == d ? 3520 : "B7" == d ? 3951 : 262; c.duration = 40 * f; - return b.callReturn(); + return a.callReturn(); }; Blockly.Blocks.xbot_lcd = {init:function() { this.setColour("#00979D"); @@ -5642,203 +5837,348 @@ Blockly.Blocks.xbot_lcd = {init:function() { this.setPreviousStatement(!0); this.setNextStatement(!0); }}; -Entry.block.xbot_lcd = function(a, b) { - var c = Entry.hw.sendQueue, d = b.getNumberField("LINE", b), e = b.getStringValue("VALUE", b); +Entry.block.xbot_lcd = function(b, a) { + var c = Entry.hw.sendQueue, d = a.getNumberField("LINE", a), e = a.getStringValue("VALUE", a); 0 == d ? (c.lcdNum = 0, c.lcdTxt = e) : 1 == d && (c.lcdNum = 1, c.lcdTxt = e); - return b.callReturn(); + return a.callReturn(); }; -Entry.Collection = function(a) { +Entry.Collection = function(b) { this.length = 0; this._hashMap = {}; this._observers = []; - this.set(a); + this.set(b); }; -(function(a, b) { - a.set = function(a) { +(function(b, a) { + b.set = function(b) { for (;this.length;) { - b.pop.call(this); + a.pop.call(this); } var d = this._hashMap, e; for (e in d) { delete d[e]; } - if (void 0 !== a) { + if (void 0 !== b) { e = 0; - for (var f = a.length;e < f;e++) { - var g = a[e]; + for (var f = b.length;e < f;e++) { + var g = b[e]; d[g.id] = g; - b.push.call(this, g); + a.push.call(this, g); } } }; - a.push = function(a) { - this._hashMap[a.id] = a; - b.push.call(this, a); + b.push = function(b) { + this._hashMap[b.id] = b; + a.push.call(this, b); }; - a.unshift = function() { - for (var a = Array.prototype.slice.call(arguments, 0), d = this._hashMap, e = a.length - 1;0 <= e;e--) { - var f = a[e]; - b.unshift.call(this, f); + b.unshift = function() { + for (var b = Array.prototype.slice.call(arguments, 0), d = this._hashMap, e = b.length - 1;0 <= e;e--) { + var f = b[e]; + a.unshift.call(this, f); d[f.id] = f; } }; - a.insert = function(a, d) { - b.splice.call(this, d, 0, a); - this._hashMap[a.id] = a; + b.insert = function(b, d) { + a.splice.call(this, d, 0, b); + this._hashMap[b.id] = b; }; - a.has = function(b) { - return !!this._hashMap[b]; + b.has = function(a) { + return !!this._hashMap[a]; }; - a.get = function(b) { - return this._hashMap[b]; + b.get = function(a) { + return this._hashMap[a]; }; - a.at = function(b) { - return this[b]; + b.at = function(a) { + return this[a]; }; - a.getAll = function() { - for (var b = this.length, a = [], e = 0;e < b;e++) { - a.push(this[e]); + b.getAll = function() { + for (var a = this.length, b = [], e = 0;e < a;e++) { + b.push(this[e]); } - return a; + return b; }; - a.indexOf = function(a) { - return b.indexOf.call(this, a); + b.indexOf = function(b) { + return a.indexOf.call(this, b); }; - a.find = function(b) { - for (var a = [], e, f = 0, g = this.length;f < g;f++) { + b.find = function(a) { + for (var b = [], e, f = 0, g = this.length;f < g;f++) { e = !0; var h = this[f], k; - for (k in b) { - if (b[k] != h[k]) { + for (k in a) { + if (a[k] != h[k]) { e = !1; break; } } - e && a.push(h); + e && b.push(h); } - return a; + return b; }; - a.pop = function() { - var a = b.pop.call(this); - delete this._hashMap[a.id]; - return a; + b.pop = function() { + var b = a.pop.call(this); + delete this._hashMap[b.id]; + return b; }; - a.shift = function() { - var a = b.shift.call(this); - delete this._hashMap[a.id]; - return a; + b.shift = function() { + var b = a.shift.call(this); + delete this._hashMap[b.id]; + return b; }; - a.slice = function(a, d) { - var e = b.slice.call(this, a, d), f = this._hashMap, g; + b.slice = function(b, d) { + var e = a.slice.call(this, b, d), f = this._hashMap, g; for (g in e) { delete f[e[g].id]; } return e; }; - a.remove = function(b) { - var a = this.indexOf(b); - -1 < a && (delete this._hashMap[b.id], this.splice(a, 1)); + b.remove = function(a) { + var b = this.indexOf(a); + -1 < b && (delete this._hashMap[a.id], this.splice(b, 1)); }; - a.splice = function(a, d) { - var e = b.slice.call(arguments, 2), f = this._hashMap; - d = void 0 === d ? this.length - a : d; - for (var g = b.splice.call(this, a, d), h = 0, k = g.length;h < k;h++) { + b.splice = function(b, d) { + var e = a.slice.call(arguments, 2), f = this._hashMap; + d = void 0 === d ? this.length - b : d; + for (var g = a.splice.call(this, b, d), h = 0, k = g.length;h < k;h++) { delete f[g[h].id]; } h = 0; for (k = e.length;h < k;h++) { - f = e[h], b.splice.call(this, a++, 0, f), this._hashMap[f.id] = f; + f = e[h], a.splice.call(this, b++, 0, f), this._hashMap[f.id] = f; } return g; }; - a.clear = function() { + b.clear = function() { for (;this.length;) { - b.pop.call(this); + a.pop.call(this); } this._hashMap = {}; }; - a.map = function(b, a) { - for (var e = 0, f = this.length;e < f;e++) { - b(this[e], a); + b.map = function(a, b) { + for (var e = [], f = 0, g = this.length;f < g;f++) { + e.push(a(this[f], b)); } + return e; }; - a.moveFromTo = function(a, d) { + b.moveFromTo = function(b, d) { var e = this.length - 1; - 0 > a || 0 > d || a > e || d > e || b.splice.call(this, d, 0, b.splice.call(this, a, 1)[0]); + 0 > b || 0 > d || b > e || d > e || a.splice.call(this, d, 0, a.splice.call(this, b, 1)[0]); }; - a.sort = function() { + b.sort = function() { }; - a.fromJSON = function() { + b.fromJSON = function() { }; - a.toJSON = function() { - for (var b = [], a = 0, e = this.length;a < e;a++) { - b.push(this[a].toJSON()); + b.toJSON = function() { + for (var a = [], b = 0, e = this.length;b < e;b++) { + a.push(this[b].toJSON()); } - return b; + return a; }; - a.observe = function() { + b.observe = function() { }; - a.unobserve = function() { + b.unobserve = function() { }; - a.notify = function() { + b.notify = function() { }; - a.destroy = function() { + b.destroy = function() { }; })(Entry.Collection.prototype, Array.prototype); -Entry.Event = function(a) { - this._sender = a; +Entry.Event = function(b) { + this._sender = b; this._listeners = []; }; -(function(a) { - a.attach = function(b, a) { - var d = {obj:b, fn:a}; - this._listeners.push(d); - return d; +(function(b) { + b.attach = function(a, b) { + var d = this, e = {obj:a, fn:b, destroy:function() { + d.detach(this); + }}; + this._listeners.push(e); + return e; }; - a.detach = function(b) { - var a = this._listeners; - b = a.indexOf(b); - if (-1 < b) { - return a.splice(b, 1); + b.detach = function(a) { + var b = this._listeners; + a = b.indexOf(a); + if (-1 < a) { + return b.splice(a, 1); } }; - a.clear = function() { - for (var b = this._listeners;b.length;) { - b.pop(); + b.clear = function() { + for (var a = this._listeners;a.length;) { + a.pop(); } }; - a.notify = function() { - var b = arguments; - this._listeners.slice().forEach(function(a) { - a.fn.apply(a.obj, b); + b.notify = function() { + var a = arguments; + this._listeners.slice().forEach(function(b) { + b.fn.apply(b.obj, a); }); }; })(Entry.Event.prototype); -Entry.Observer = function(a, b, c, d) { - this.parent = a; - this.object = b; +Entry.Observer = function(b, a, c, d) { + this.parent = b; + this.object = a; this.funcName = c; this.attrs = d; - a.push(this); + b.push(this); }; -(function(a) { - a.destroy = function() { - var b = this.parent, a = b.indexOf(this); - -1 < a && b.splice(a, 1); +(function(b) { + b.destroy = function() { + var a = this.parent, b = a.indexOf(this); + -1 < b && a.splice(b, 1); return this; }; })(Entry.Observer.prototype); +Entry.Command = {}; +Entry.Commander = function(b) { + if ("workspace" == b || "phone" == b) { + Entry.stateManager = new Entry.StateManager; + } + Entry.do = this.do.bind(this); + Entry.undo = this.undo.bind(this); + this.editor = {}; + Entry.Command.editor = this.editor; +}; +(function(b) { + b.do = function(a) { + var b = Array.prototype.slice.call(arguments); + b.shift(); + var d = Entry.Command[a]; + Entry.stateManager && Entry.stateManager.addCommand.apply(Entry.stateManager, [a, this, this.do, d.undo].concat(d.state.apply(this, b))); + return {value:Entry.Command[a].do.apply(this, b), isPass:this.isPass.bind(this)}; + }; + b.undo = function() { + var a = Array.prototype.slice.call(arguments), b = a.shift(), d = Entry.Command[b]; + Entry.stateManager && Entry.stateManager.addCommand.apply(Entry.stateManager, [b, this, this.do, d.undo].concat(d.state.apply(this, a))); + return {value:Entry.Command[b].do.apply(this, a), isPass:this.isPass.bind(this)}; + }; + b.redo = function() { + var a = Array.prototype.slice.call(arguments), b = a.shift(), d = Entry.Command[b]; + Entry.stateManager && Entry.stateManager.addCommand.apply(Entry.stateManager, [b, this, this.undo, b].concat(d.state.apply(null, a))); + d.undo.apply(this, a); + }; + b.setCurrentEditor = function(a, b) { + this.editor[a] = b; + }; + b.isPass = function(a) { + a = void 0 === a ? !0 : a; + if (Entry.stateManager) { + var b = Entry.stateManager.getLastCommand(); + b && (b.isPass = a); + } + }; +})(Entry.Commander.prototype); +(function(b) { + b.addThread = {type:101, do:function(a) { + return this.editor.board.code.createThread(a); + }, state:function(a) { + 0 < a.length && (a[0].id = Entry.Utils.generateId()); + return [a]; + }, log:function(a) { + return [a.id, a.toJSON()]; + }, undo:"destroyThread"}; + b.destroyThread = {type:106, do:function(a) { + this.editor.board.findById(a[0].id).destroy(!0, !0); + }, state:function(a) { + return [this.editor.board.findById(a[0].id).thread.toJSON()]; + }, log:function(a) { + }, undo:"addThread"}; + b.destroyBlock = {type:106, do:function(a) { + "string" === typeof a && (a = this.editor.board.findById(a)); + a.doDestroy(!0); + }, state:function(a) { + "string" === typeof a && (a = this.editor.board.findById(a)); + return [a.toJSON(), a.pointer()]; + }, log:function(a) { + }, undo:"recoverBlock"}; + b.recoverBlock = {type:106, do:function(a, b) { + var d = this.editor.board.code.createThread([a]).getFirstBlock(); + "string" === typeof d && (d = this.editor.board.findById(d)); + this.editor.board.insert(d, b); + }, state:function(a) { + "string" !== typeof a && (a = a.id); + return [a]; + }, log:function(a) { + }, undo:"destroyBlock"}; + b.insertBlock = {type:102, do:function(a, b, d) { + "string" === typeof a && (a = this.editor.board.findById(a)); + this.editor.board.insert(a, b, d); + }, state:function(a, b) { + "string" === typeof a && (a = this.editor.board.findById(a)); + var d = [a.id], e = a.targetPointer(); + d.push(e); + "string" !== typeof a && "basic" === a.getBlockType() && d.push(a.thread.getCount(a)); + return d; + }, log:function(a) { + }, undo:"insertBlock"}; + b.separateBlock = {type:103, do:function(a) { + a.view && a.view._toGlobalCoordinate(Entry.DRAG_MODE_DRAG); + a.doSeparate(); + }, state:function(a) { + var b = [a.id], d = a.targetPointer(); + b.push(d); + "basic" === a.getBlockType() && b.push(a.thread.getCount(a)); + return b; + }, log:function(a) { + }, undo:"insertBlock"}; + b.moveBlock = {type:104, do:function(a, b, d) { + void 0 !== b ? (a = this.editor.board.findById(a), a.moveTo(b, d)) : a._updatePos(); + }, state:function(a) { + "string" === typeof a && (a = this.editor.board.findById(a)); + return [a.id, a.x, a.y]; + }, log:function(a) { + return [a.id, a.toJSON()]; + }, undo:"moveBlock"}; + b.cloneBlock = {type:105, do:function(a) { + "string" === typeof a && (a = this.editor.board.findById(a)); + this.editor.board.code.createThread(a.copy()); + }, state:function(a) { + "string" !== typeof a && (a = a.id); + return [a]; + }, log:function(a) { + return [a.id, a.toJSON()]; + }, undo:"uncloneBlock"}; + b.uncloneBlock = {type:105, do:function(a) { + this.editor.board.code.getThreads().pop().getFirstBlock().destroy(!0, !0); + }, state:function(a) { + return [a]; + }, log:function(a) { + return [a.id, a.toJSON()]; + }, undo:"cloneBlock"}; + b.scrollBoard = {type:105, do:function(a, b) { + this.editor.board.scroller._scroll(a, b); + }, state:function(a, b) { + return [-a, -b]; + }, log:function(a) { + return [a.id, a.toJSON()]; + }, undo:"scrollBoard"}; + b.setFieldValue = {type:106, do:function(a, b, d, e, f) { + b.setValue(f, !0); + }, state:function(a, b, d, e, f) { + return [a, b, d, f, e]; + }, log:function(a, b) { + return [a.id, b]; + }, undo:"setFieldValue"}; +})(Entry.Command); +(function(b) { + b.selectObject = {type:201, do:function(a) { + return Entry.container.selectObject(a); + }, state:function(a) { + if ((a = Entry.playground) && a.object) { + return [a.object.id]; + } + }, log:function(a) { + return [a]; + }, undo:"selectObject"}; +})(Entry.Command); Entry.Container = function() { this.objects_ = []; this.cachedPicture = {}; this.inputValue = {}; this.currentObjects_ = this.copiedObject = null; }; -Entry.Container.prototype.generateView = function(a, b) { - this._view = a; +Entry.Container.prototype.generateView = function(b, a) { + this._view = b; this._view.addClass("entryContainer"); - if (b && "workspace" != b) { - "phone" == b && (this._view.addClass("entryContainerPhone"), c = Entry.createElement("div"), c.addClass("entryAddObjectWorkspace"), c.innerHTML = Lang.Workspace.add_object, c.bindOnClick(function(b) { + if (a && "workspace" != a) { + "phone" == a && (this._view.addClass("entryContainerPhone"), c = Entry.createElement("div"), c.addClass("entryAddObjectWorkspace"), c.innerHTML = Lang.Workspace.add_object, c.bindOnClick(function(a) { Entry.dispatchEvent("openSpriteManager"); }), c = Entry.createElement("div"), c.addClass("entryContainerListPhoneWrapper"), this._view.appendChild(c), d = Entry.createElement("ul"), d.addClass("entryContainerListPhone"), c.appendChild(d), this.listView_ = d); } else { @@ -5847,14 +6187,14 @@ Entry.Container.prototype.generateView = function(a, b) { var c = Entry.createElement("div"); c.addClass("entryAddObjectWorkspace"); c.innerHTML = Lang.Workspace.add_object; - c.bindOnClick(function(b) { + c.bindOnClick(function(a) { Entry.dispatchEvent("openSpriteManager"); }); c = Entry.createElement("div"); c.addClass("entryContainerListWorkspaceWrapper"); Entry.isForLecture && (this.generateTabView(), c.addClass("lecture")); Entry.Utils.disableContextmenu(c); - $(c).on("contextmenu", function(b) { + $(c).on("contextmenu", function(a) { Entry.ContextMenu.show([{text:Lang.Blocks.Paste_blocks, callback:function() { Entry.container.copiedObject ? Entry.container.addCloneObject(Entry.container.copiedObject) : Entry.toast.alert(Lang.Workspace.add_object_alert, Lang.Workspace.object_not_found_for_paste); }}], "workspace-contextmenu"); @@ -5868,10 +6208,10 @@ Entry.Container.prototype.generateView = function(a, b) { } }; Entry.Container.prototype.enableSort = function() { - $ && $(this.listView_).sortable({start:function(a, b) { - b.item.data("start_pos", b.item.index()); - }, stop:function(a, b) { - var c = b.item.data("start_pos"), d = b.item.index(); + $ && $(this.listView_).sortable({start:function(b, a) { + a.item.data("start_pos", a.item.index()); + }, stop:function(b, a) { + var c = a.item.data("start_pos"), d = a.item.index(); Entry.container.moveElement(c, d); }, axis:"y"}); }; @@ -5880,90 +6220,90 @@ Entry.Container.prototype.disableSort = function() { }; Entry.Container.prototype.updateListView = function() { if (this.listView_) { - for (var a = this.listView_;a.hasChildNodes();) { - a.removeChild(a.lastChild); + for (var b = this.listView_;b.hasChildNodes();) { + b.removeChild(b.lastChild); } - var b = this.getCurrentObjects(), c; - for (c in b) { - a.appendChild(b[c].view_); + var a = this.getCurrentObjects(), c; + for (c in a) { + b.appendChild(a[c].view_); } Entry.stage.sortZorder(); } }; -Entry.Container.prototype.setObjects = function(a) { - for (var b in a) { - var c = new Entry.EntryObject(a[b]); +Entry.Container.prototype.setObjects = function(b) { + for (var a in b) { + var c = new Entry.EntryObject(b[a]); this.objects_.push(c); c.generateView(); - c.pictures.map(function(b) { - Entry.playground.generatePictureElement(b); + c.pictures.map(function(a) { + Entry.playground.generatePictureElement(a); }); - c.sounds.map(function(b) { - Entry.playground.generateSoundElement(b); + c.sounds.map(function(a) { + Entry.playground.generateSoundElement(a); }); } this.updateObjectsOrder(); this.updateListView(); Entry.stage.sortZorder(); Entry.variableContainer.updateViews(); - a = Entry.type; - ("workspace" == a || "phone" == a) && (a = this.getCurrentObjects()[0]) && this.selectObject(a.id); + b = Entry.type; + ("workspace" == b || "phone" == b) && (b = this.getCurrentObjects()[0]) && this.selectObject(b.id); }; -Entry.Container.prototype.getPictureElement = function(a) { - for (var b in this.objects_) { - var c = this.objects_[b], d; +Entry.Container.prototype.getPictureElement = function(b) { + for (var a in this.objects_) { + var c = this.objects_[a], d; for (d in c.pictures) { - if (a === c.pictures[d].id) { + if (b === c.pictures[d].id) { return c.pictures[d].view; } } } throw Error("No picture found"); }; -Entry.Container.prototype.setPicture = function(a) { - for (var b in this.objects_) { - var c = this.objects_[b], d; +Entry.Container.prototype.setPicture = function(b) { + for (var a in this.objects_) { + var c = this.objects_[a], d; for (d in c.pictures) { - if (a.id === c.pictures[d].id) { - b = {}; - b.dimension = a.dimension; - b.id = a.id; - b.filename = a.filename; - b.fileurl = a.fileurl; - b.name = a.name; - b.view = c.pictures[d].view; - c.pictures[d] = b; + if (b.id === c.pictures[d].id) { + a = {}; + a.dimension = b.dimension; + a.id = b.id; + a.filename = b.filename; + a.fileurl = b.fileurl; + a.name = b.name; + a.view = c.pictures[d].view; + c.pictures[d] = a; return; } } } throw Error("No picture found"); }; -Entry.Container.prototype.selectPicture = function(a) { - for (var b in this.objects_) { - var c = this.objects_[b], d; +Entry.Container.prototype.selectPicture = function(b) { + for (var a in this.objects_) { + var c = this.objects_[a], d; for (d in c.pictures) { var e = c.pictures[d]; - if (a === e.id) { + if (b === e.id) { return c.selectedPicture = e, c.entity.setImage(e), c.updateThumbnailView(), c.id; } } } throw Error("No picture found"); }; -Entry.Container.prototype.addObject = function(a, b) { - var c = new Entry.EntryObject(a); +Entry.Container.prototype.addObject = function(b, a) { + var c = new Entry.EntryObject(b); c.name = Entry.getOrderedName(c.name, this.objects_); Entry.stateManager && Entry.stateManager.addCommand("add object", this, this.removeObject, c); c.scene || (c.scene = Entry.scene.selectedScene); - "number" == typeof b ? a.sprite.category && "background" == a.sprite.category.main ? (c.setLock(!0), this.objects_.push(c)) : this.objects_.splice(b, 0, c) : a.sprite.category && "background" == a.sprite.category.main ? this.objects_.push(c) : this.objects_.unshift(c); + "number" == typeof a ? b.sprite.category && "background" == b.sprite.category.main ? (c.setLock(!0), this.objects_.push(c)) : this.objects_.splice(a, 0, c) : b.sprite.category && "background" == b.sprite.category.main ? this.objects_.push(c) : this.objects_.unshift(c); c.generateView(); - c.pictures.map(function(b) { - b.id = Entry.generateHash(); - Entry.playground.generatePictureElement(b); + c.pictures.map(function(a) { + a.id = Entry.generateHash(); + Entry.playground.generatePictureElement(a); }); - c.sounds.map(function(b) { - Entry.playground.generateSoundElement(b); + c.sounds.map(function(a) { + Entry.playground.generateSoundElement(a); }); this.setCurrentObjects(); this.updateObjectsOrder(); @@ -5972,33 +6312,33 @@ Entry.Container.prototype.addObject = function(a, b) { Entry.variableContainer.updateViews(); return new Entry.State(this, this.removeObject, c); }; -Entry.Container.prototype.addCloneObject = function(a, b) { - var c = a.toJSON(), d = Entry.generateHash(); +Entry.Container.prototype.addCloneObject = function(b, a) { + var c = b.toJSON(), d = Entry.generateHash(); Entry.variableContainer.addCloneLocalVariables({objectId:c.id, newObjectId:d, json:c}); c.id = d; - c.scene = b || Entry.scene.selectedScene; + c.scene = a || Entry.scene.selectedScene; this.addObject(c); }; -Entry.Container.prototype.removeObject = function(a) { - var b = this.objects_.indexOf(a), c = a.toJSON(); - Entry.stateManager && Entry.stateManager.addCommand("remove object", this, this.addObject, c, b); - c = new Entry.State(this.addObject, c, b); - a.destroy(); - this.objects_.splice(b, 1); +Entry.Container.prototype.removeObject = function(b) { + var a = this.objects_.indexOf(b), c = b.toJSON(); + Entry.stateManager && Entry.stateManager.addCommand("remove object", this, this.addObject, c, a); + c = new Entry.State(this.addObject, c, a); + b.destroy(); + this.objects_.splice(a, 1); this.setCurrentObjects(); Entry.stage.sortZorder(); - this.objects_.length && 0 !== b ? 0 < this.getCurrentObjects().length ? Entry.container.selectObject(this.getCurrentObjects()[0].id) : Entry.container.selectObject() : this.objects_.length && 0 === b ? Entry.container.selectObject(this.getCurrentObjects()[0].id) : (Entry.container.selectObject(), Entry.playground.flushPlayground()); - Entry.toast.success(Lang.Workspace.remove_object, a.name + " " + Lang.Workspace.remove_object_msg); - Entry.variableContainer.removeLocalVariables(a.id); + this.objects_.length && 0 !== a ? 0 < this.getCurrentObjects().length ? Entry.container.selectObject(this.getCurrentObjects()[0].id) : Entry.container.selectObject() : this.objects_.length && 0 === a ? Entry.container.selectObject(this.getCurrentObjects()[0].id) : (Entry.container.selectObject(), Entry.playground.flushPlayground()); + Entry.toast.success(Lang.Workspace.remove_object, b.name + " " + Lang.Workspace.remove_object_msg); + Entry.variableContainer.removeLocalVariables(b.id); Entry.playground.reloadPlayground(); return c; }; -Entry.Container.prototype.selectObject = function(a, b) { - var c = this.getObject(a); - b && c && Entry.scene.selectScene(c.scene); - this.mapObjectOnScene(function(b) { - b.view_ && b.view_.removeClass("selectedObject"); - b.isSelected_ = !1; +Entry.Container.prototype.selectObject = function(b, a) { + var c = this.getObject(b); + a && c && Entry.scene.selectScene(c.scene); + this.mapObjectOnScene(function(a) { + a.view_ && a.view_.removeClass("selectedObject"); + a.isSelected_ = !1; }); c && (c.view_ && c.view_.addClass("selectedObject"), c.isSelected_ = !0); Entry.playground && Entry.playground.injectObject(c); @@ -6007,221 +6347,233 @@ Entry.Container.prototype.selectObject = function(a, b) { Entry.Container.prototype.getAllObjects = function() { return this.objects_; }; -Entry.Container.prototype.getObject = function(a) { - for (var b = this.objects_.length, c = 0;c < b;c++) { +Entry.Container.prototype.getObject = function(b) { + for (var a = this.objects_.length, c = 0;c < a;c++) { var d = this.objects_[c]; - if (d.id == a) { + if (d.id == b) { return d; } } }; -Entry.Container.prototype.getEntity = function(a) { - if (a = this.getObject(a)) { - return a.entity; +Entry.Container.prototype.getEntity = function(b) { + if (b = this.getObject(b)) { + return b.entity; } Entry.toast.alert(Lang.Msgs.runtime_error, Lang.Workspace.object_not_found, !0); }; -Entry.Container.prototype.getVariable = function(a) { - for (var b = 0;b < this.variables_.length;b++) { - var c = this.variables_[b]; - if (c.getId() == a || c.getName() == a) { +Entry.Container.prototype.getVariable = function(b) { + for (var a = 0;a < this.variables_.length;a++) { + var c = this.variables_[a]; + if (c.getId() == b || c.getName() == b) { return c; } } }; -Entry.Container.prototype.moveElement = function(a, b, c) { +Entry.Container.prototype.moveElement = function(b, a, c) { var d; d = this.getCurrentObjects(); - a = this.getAllObjects().indexOf(d[a]); b = this.getAllObjects().indexOf(d[b]); - !c && Entry.stateManager && Entry.stateManager.addCommand("reorder object", Entry.container, Entry.container.moveElement, b, a, !0); - this.objects_.splice(b, 0, this.objects_.splice(a, 1)[0]); + a = this.getAllObjects().indexOf(d[a]); + !c && Entry.stateManager && Entry.stateManager.addCommand("reorder object", Entry.container, Entry.container.moveElement, a, b, !0); + this.objects_.splice(a, 0, this.objects_.splice(b, 1)[0]); this.setCurrentObjects(); Entry.container.updateListView(); - return new Entry.State(Entry.container, Entry.container.moveElement, b, a, !0); + return new Entry.State(Entry.container, Entry.container.moveElement, a, b, !0); }; -Entry.Container.prototype.moveElementByBlock = function(a, b) { - var c = this.getCurrentObjects().splice(a, 1)[0]; - this.getCurrentObjects().splice(b, 0, c); +Entry.Container.prototype.moveElementByBlock = function(b, a) { + var c = this.getCurrentObjects().splice(b, 1)[0]; + this.getCurrentObjects().splice(a, 0, c); Entry.stage.sortZorder(); this.updateListView(); }; -Entry.Container.prototype.getDropdownList = function(a) { - var b = []; - switch(a) { +Entry.Container.prototype.getDropdownList = function(b) { + var a = []; + switch(b) { case "sprites": var c = this.getCurrentObjects(), d = c.length; - for (a = 0;a < d;a++) { - var e = c[a]; - b.push([e.name, e.id]); + for (b = 0;b < d;b++) { + var e = c[b]; + a.push([e.name, e.id]); } break; case "spritesWithMouse": c = this.getCurrentObjects(); d = c.length; - for (a = 0;a < d;a++) { - e = c[a], b.push([e.name, e.id]); + for (b = 0;b < d;b++) { + e = c[b], a.push([e.name, e.id]); } - b.push([Lang.Blocks.mouse_pointer, "mouse"]); + a.push([Lang.Blocks.mouse_pointer, "mouse"]); break; case "spritesWithSelf": c = this.getCurrentObjects(); d = c.length; - for (a = 0;a < d;a++) { - e = c[a], b.push([e.name, e.id]); + for (b = 0;b < d;b++) { + e = c[b], a.push([e.name, e.id]); } - b.push([Lang.Blocks.self, "self"]); + a.push([Lang.Blocks.self, "self"]); break; case "collision": - b.push([Lang.Blocks.mouse_pointer, "mouse"]); + a.push([Lang.Blocks.mouse_pointer, "mouse"]); c = this.getCurrentObjects(); d = c.length; - for (a = 0;a < d;a++) { - e = c[a], b.push([e.name, e.id]); + for (b = 0;b < d;b++) { + e = c[b], a.push([e.name, e.id]); } - b.push([Lang.Blocks.wall, "wall"]); - b.push([Lang.Blocks.wall_up, "wall_up"]); - b.push([Lang.Blocks.wall_down, "wall_down"]); - b.push([Lang.Blocks.wall_right, "wall_right"]); - b.push([Lang.Blocks.wall_left, "wall_left"]); + a.push([Lang.Blocks.wall, "wall"]); + a.push([Lang.Blocks.wall_up, "wall_up"]); + a.push([Lang.Blocks.wall_down, "wall_down"]); + a.push([Lang.Blocks.wall_right, "wall_right"]); + a.push([Lang.Blocks.wall_left, "wall_left"]); break; case "pictures": + if (!Entry.playground.object) { + break; + } c = Entry.playground.object.pictures; - for (a = 0;a < c.length;a++) { - d = c[a], b.push([d.name, d.id]); + for (b = 0;b < c.length;b++) { + d = c[b], a.push([d.name, d.id]); } break; case "messages": c = Entry.variableContainer.messages_; - for (a = 0;a < c.length;a++) { - d = c[a], b.push([d.name, d.id]); + for (b = 0;b < c.length;b++) { + d = c[b], a.push([d.name, d.id]); } break; case "variables": c = Entry.variableContainer.variables_; - for (a = 0;a < c.length;a++) { - d = c[a], d.object_ && d.object_ != Entry.playground.object.id || b.push([d.getName(), d.getId()]); + for (b = 0;b < c.length;b++) { + d = c[b], d.object_ && d.object_ != Entry.playground.object.id || a.push([d.getName(), d.getId()]); } - b && 0 !== b.length || b.push([Lang.Blocks.VARIABLE_variable, "null"]); + a && 0 !== a.length || a.push([Lang.Blocks.VARIABLE_variable, "null"]); break; case "lists": c = Entry.variableContainer.lists_; - for (a = 0;a < c.length;a++) { - d = c[a], b.push([d.getName(), d.getId()]); + for (b = 0;b < c.length;b++) { + d = c[b], a.push([d.getName(), d.getId()]); } - b && 0 !== b.length || b.push([Lang.Blocks.VARIABLE_list, "null"]); + a && 0 !== a.length || a.push([Lang.Blocks.VARIABLE_list, "null"]); break; case "scenes": c = Entry.scene.scenes_; - for (a = 0;a < c.length;a++) { - d = c[a], b.push([d.name, d.id]); + for (b = 0;b < c.length;b++) { + d = c[b], a.push([d.name, d.id]); } break; case "sounds": + if (!Entry.playground.object) { + break; + } c = Entry.playground.object.sounds; - for (a = 0;a < c.length;a++) { - d = c[a], b.push([d.name, d.id]); + for (b = 0;b < c.length;b++) { + d = c[b], a.push([d.name, d.id]); } break; case "clone": - b.push([Lang.Blocks.oneself, "self"]); + a.push([Lang.Blocks.oneself, "self"]); d = this.objects_.length; - for (a = 0;a < d;a++) { - e = this.objects_[a], b.push([e.name, e.id]); + for (b = 0;b < d;b++) { + e = this.objects_[b], a.push([e.name, e.id]); } break; case "objectSequence": - for (d = this.getCurrentObjects().length, a = 0;a < d;a++) { - b.push([(a + 1).toString(), a.toString()]); + for (d = this.getCurrentObjects().length, b = 0;b < d;b++) { + a.push([(b + 1).toString(), b.toString()]); } ; } - b.length || (b = [[Lang.Blocks.no_target, "null"]]); - return b; + a.length || (a = [[Lang.Blocks.no_target, "null"]]); + return a; }; Entry.Container.prototype.clearRunningState = function() { - this.mapObject(function(a) { - a.entity.clearScript(); - for (var b = a.clonedEntities.length;0 < b;b--) { - a.clonedEntities[b - 1].removeClone(); + this.mapObject(function(b) { + b.clearExecutor(); + for (var a = b.clonedEntities.length;0 < a;a--) { + b.clonedEntities[a - 1].removeClone(); } - a.clonedEntities = []; + b.clonedEntities = []; }); }; -Entry.Container.prototype.mapObject = function(a, b) { - for (var c = this.objects_.length, d = 0;d < c;d++) { - a(this.objects_[d], b); +Entry.Container.prototype.mapObject = function(b, a) { + for (var c = this.objects_.length, d = [], e = 0;e < c;e++) { + d.push(b(this.objects_[e], a)); } + return d; }; -Entry.Container.prototype.mapObjectOnScene = function(a, b) { - for (var c = this.getCurrentObjects(), d = c.length, e = 0;e < d;e++) { - a(c[e], b); +Entry.Container.prototype.mapObjectOnScene = function(b, a) { + for (var c = this.getCurrentObjects(), d = c.length, e = [], f = 0;f < d;f++) { + e.push(b(c[f], a)); } + return e; }; Entry.Container.prototype.clearRunningStateOnScene = function() { - this.mapObjectOnScene(function(a) { - a.entity.clearScript(); - for (var b = a.clonedEntities.length;0 < b;b--) { - a.clonedEntities[b - 1].removeClone(); + this.mapObjectOnScene(function(b) { + b.clearExecutor(); + for (var a = b.clonedEntities.length;0 < a;a--) { + b.clonedEntities[a - 1].removeClone(); } - a.clonedEntities = []; + b.clonedEntities = []; }); }; -Entry.Container.prototype.mapEntity = function(a, b) { - for (var c = this.objects_.length, d = 0;d < c;d++) { - a(this.objects_[d].entity, b); +Entry.Container.prototype.mapEntity = function(b, a) { + for (var c = this.objects_.length, d = [], e = 0;e < c;e++) { + d.push(b(this.objects_[e].entity, a)); } + return d; }; -Entry.Container.prototype.mapEntityOnScene = function(a, b) { - for (var c = this.getCurrentObjects(), d = c.length, e = 0;e < d;e++) { - a(c[e].entity, b); +Entry.Container.prototype.mapEntityOnScene = function(b, a) { + for (var c = this.getCurrentObjects(), d = c.length, e = [], f = 0;f < d;f++) { + e.push(b(c[f].entity, a)); } + return e; }; -Entry.Container.prototype.mapEntityIncludeClone = function(a, b) { - for (var c = this.objects_, d = c.length, e = 0;e < d;e++) { - var f = c[e], g = f.clonedEntities.length; - a(f.entity, b); - for (var h = 0;h < g;h++) { - var k = f.clonedEntities[h]; - k && !k.isStamp && a(k, b); +Entry.Container.prototype.mapEntityIncludeClone = function(b, a) { + for (var c = this.objects_, d = c.length, e = [], f = 0;f < d;f++) { + var g = c[f], h = g.clonedEntities.length; + e.push(b(g.entity, a)); + for (var k = 0;k < h;k++) { + var l = g.clonedEntities[k]; + l && !l.isStamp && e.push(b(l, a)); } } + return e; }; -Entry.Container.prototype.mapEntityIncludeCloneOnScene = function(a, b) { - for (var c = this.getCurrentObjects(), d = c.length, e = 0;e < d;e++) { - var f = c[e], g = f.clonedEntities.length; - a(f.entity, b); - for (var h = 0;h < g;h++) { - var k = f.clonedEntities[h]; - k && !k.isStamp && a(k, b); +Entry.Container.prototype.mapEntityIncludeCloneOnScene = function(b, a) { + for (var c = this.getCurrentObjects(), d = c.length, e = [], f = 0;f < d;f++) { + var g = c[f], h = g.clonedEntities.length; + e.push(b(g.entity, a)); + for (var k = 0;k < h;k++) { + var l = g.clonedEntities[k]; + l && !l.isStamp && e.push(b(l, a)); } } + return e; }; -Entry.Container.prototype.getCachedPicture = function(a) { - Entry.assert("string" == typeof a, "pictureId must be string"); - return this.cachedPicture[a]; +Entry.Container.prototype.getCachedPicture = function(b) { + Entry.assert("string" == typeof b, "pictureId must be string"); + return this.cachedPicture[b]; }; -Entry.Container.prototype.cachePicture = function(a, b) { - this.cachedPicture[a] = b; +Entry.Container.prototype.cachePicture = function(b, a) { + this.cachedPicture[b] = a; }; Entry.Container.prototype.toJSON = function() { - for (var a = [], b = this.objects_.length, c = 0;c < b;c++) { - a.push(this.objects_[c].toJSON()); + for (var b = [], a = this.objects_.length, c = 0;c < a;c++) { + b.push(this.objects_[c].toJSON()); } - return a; + return b; }; Entry.Container.prototype.takeSequenceSnapshot = function() { - for (var a = this.objects_.length, b = this.objects_, c = 0;c < a;c++) { - b[c].index = c; + for (var b = this.objects_.length, a = this.objects_, c = 0;c < b;c++) { + a[c].index = c; } }; Entry.Container.prototype.loadSequenceSnapshot = function() { - for (var a = this.objects_.length, b = Array(a), c = 0;c < a;c++) { + for (var b = this.objects_.length, a = Array(b), c = 0;c < b;c++) { var d = this.objects_[c]; - b[d.index] = d; + a[d.index] = d; delete d.index; } - this.objects_ = b; + this.objects_ = a; this.setCurrentObjects(); Entry.stage.sortZorder(); this.updateListView(); @@ -6229,64 +6581,64 @@ Entry.Container.prototype.loadSequenceSnapshot = function() { Entry.Container.prototype.getInputValue = function() { return this.inputValue.getValue(); }; -Entry.Container.prototype.setInputValue = function(a) { - a ? this.inputValue.setValue(a) : this.inputValue.setValue(0); +Entry.Container.prototype.setInputValue = function(b) { + b ? this.inputValue.setValue(b) : this.inputValue.setValue(0); }; Entry.Container.prototype.resetSceneDuringRun = function() { - this.mapEntityOnScene(function(a) { - a.loadSnapshot(); - a.object.filters = []; - a.resetFilter(); - a.dialog && a.dialog.remove(); - a.shape && a.removeBrush(); + this.mapEntityOnScene(function(b) { + b.loadSnapshot(); + b.object.filters = []; + b.resetFilter(); + b.dialog && b.dialog.remove(); + b.shape && b.removeBrush(); }); this.clearRunningStateOnScene(); }; -Entry.Container.prototype.setCopiedObject = function(a) { - this.copiedObject = a; +Entry.Container.prototype.setCopiedObject = function(b) { + this.copiedObject = b; }; Entry.Container.prototype.updateObjectsOrder = function() { - for (var a = Entry.scene.getScenes(), b = [], c = 0;c < a.length;c++) { - for (var d = this.getSceneObjects(a[c]), e = 0;e < d.length;e++) { - b.push(d[e]); + for (var b = Entry.scene.getScenes(), a = [], c = 0;c < b.length;c++) { + for (var d = this.getSceneObjects(b[c]), e = 0;e < d.length;e++) { + a.push(d[e]); } } - this.objects_ = b; + this.objects_ = a; }; -Entry.Container.prototype.getSceneObjects = function(a) { - a = a || Entry.scene.selectedScene; - for (var b = [], c = this.getAllObjects(), d = 0;d < c.length;d++) { - a.id == c[d].scene.id && b.push(c[d]); +Entry.Container.prototype.getSceneObjects = function(b) { + b = b || Entry.scene.selectedScene; + for (var a = [], c = this.getAllObjects(), d = 0;d < c.length;d++) { + b.id == c[d].scene.id && a.push(c[d]); } - return b; + return a; }; Entry.Container.prototype.setCurrentObjects = function() { this.currentObjects_ = this.getSceneObjects(); }; Entry.Container.prototype.getCurrentObjects = function() { - var a = this.currentObjects_; - a && 0 !== a.length || this.setCurrentObjects(); + var b = this.currentObjects_; + b && 0 !== b.length || this.setCurrentObjects(); return this.currentObjects_; }; -Entry.Container.prototype.getProjectWithJSON = function(a) { - a.objects = Entry.container.toJSON(); - a.variables = Entry.variableContainer.getVariableJSON(); - a.messages = Entry.variableContainer.getMessageJSON(); - a.scenes = Entry.scene.toJSON(); - return a; +Entry.Container.prototype.getProjectWithJSON = function(b) { + b.objects = Entry.container.toJSON(); + b.variables = Entry.variableContainer.getVariableJSON(); + b.messages = Entry.variableContainer.getMessageJSON(); + b.scenes = Entry.scene.toJSON(); + return b; }; Entry.Container.prototype.generateTabView = function() { - var a = this._view, b = this; + var b = this._view, a = this; this.tabViews = []; var c = Entry.createElement("div"); c.addClass("entryContainerTabViewWorkspace"); - a.appendChild(c); + b.appendChild(c); var d = Entry.createElement("span"); d.addClass("entryContainerTabItemWorkspace"); d.addClass("entryEllipsis"); d.innerHTML = Lang.Menus.lecture_container_tab_object; d.bindOnClick(function() { - b.changeTabView("object"); + a.changeTabView("object"); }); this.tabViews.push(d); c.appendChild(d); @@ -6295,7 +6647,7 @@ Entry.Container.prototype.generateTabView = function() { e.addClass("entryEllipsis"); e.innerHTML = Lang.Menus.lecture_container_tab_video; e.bindOnClick(function() { - b.changeTabView("movie"); + a.changeTabView("movie"); }); this.tabViews.push(e); c.appendChild(e); @@ -6305,7 +6657,7 @@ Entry.Container.prototype.generateTabView = function() { e.addClass("entryEllipsis"); e.innerHTML = Lang.Menus.lecture_container_tab_project; e.bindOnClick(function() { - b.changeTabView("done"); + a.changeTabView("done"); }); this.tabViews.push(e); c.appendChild(e); @@ -6315,96 +6667,95 @@ Entry.Container.prototype.generateTabView = function() { e.addClass("entryEllipsis"); e.innerHTML = Lang.Menus.lecture_container_tab_help; e.bindOnClick(function() { - b.changeTabView("helper"); + a.changeTabView("helper"); }); this.tabViews.push(e); c.appendChild(e); c = Entry.createElement("div"); c.addClass("entryContainerMovieWorkspace"); c.addClass("entryHide"); - a.appendChild(c); + b.appendChild(c); this.movieContainer = c; c = Entry.createElement("div"); c.addClass("entryContainerDoneWorkspace"); c.addClass("entryHide"); - a.appendChild(c); + b.appendChild(c); this.doneContainer = c; c = Entry.createElement("div"); c.addClass("entryContainerHelperWorkspace"); c.addClass("entryHide"); - a.appendChild(c); + b.appendChild(c); this.helperContainer = c; d.addClass("selected"); }; -Entry.Container.prototype.changeTabView = function(a) { - for (var b = this.tabViews, c = 0, d = b.length;c < d;c++) { - b[c].removeClass("selected"); +Entry.Container.prototype.changeTabView = function(b) { + for (var a = this.tabViews, c = 0, d = a.length;c < d;c++) { + a[c].removeClass("selected"); } this.movieContainer.addClass("entryHide"); this.doneContainer.addClass("entryHide"); this.helperContainer.addClass("entryHide"); - "object" == a ? b[0].addClass("selected") : "movie" == a ? (a = this._view, a = a.style.width.substring(0, a.style.width.length - 2), this.movieFrame.setAttribute("width", a), this.movieFrame.setAttribute("height", 9 * a / 16), this.movieContainer.removeClass("entryHide"), b[1].addClass("selected")) : "done" == a ? (c = $(this.doneContainer).height(), a = $(this.doneContainer).width(), 9 * a / 16 + 35 < c ? c = 9 * a / 16 + 35 : a = (c - 35) / 9 * 16, this.doneProjectFrame.setAttribute("width", - a), this.doneProjectFrame.setAttribute("height", c), this.doneContainer.removeClass("entryHide"), b[2].addClass("selected")) : "helper" == a && (Entry.helper.blockHelperOn(), this.helperContainer.removeClass("entryHide"), b[3].addClass("selected")); + "object" == b ? a[0].addClass("selected") : "movie" == b ? (b = this._view, b = b.style.width.substring(0, b.style.width.length - 2), this.movieFrame.setAttribute("width", b), this.movieFrame.setAttribute("height", 9 * b / 16), this.movieContainer.removeClass("entryHide"), a[1].addClass("selected")) : "done" == b ? (c = $(this.doneContainer).height(), b = $(this.doneContainer).width(), 9 * b / 16 + 35 < c ? c = 9 * b / 16 + 35 : b = (c - 35) / 9 * 16, this.doneProjectFrame.setAttribute("width", + b), this.doneProjectFrame.setAttribute("height", c), this.doneContainer.removeClass("entryHide"), a[2].addClass("selected")) : "helper" == b && (Entry.helper.blockHelperOn(), this.helperContainer.removeClass("entryHide"), a[3].addClass("selected")); }; -Entry.Container.prototype.initYoutube = function(a) { - this.youtubeHash = a; +Entry.Container.prototype.initYoutube = function(b) { + this.youtubeHash = b; this.youtubeTab.removeClass("entryRemove"); - a = this._view; - a = a.style.width.substring(0, a.style.width.length - 2); - var b = this.movieContainer, c = Entry.createElement("iframe"); - c.setAttribute("width", a); - c.setAttribute("height", 9 * a / 16); + b = this._view; + b = b.style.width.substring(0, b.style.width.length - 2); + var a = this.movieContainer, c = Entry.createElement("iframe"); + c.setAttribute("width", b); + c.setAttribute("height", 9 * b / 16); c.setAttribute("allowfullscreen", ""); c.setAttribute("frameborder", 0); c.setAttribute("src", "https://www.youtube.com/embed/" + this.youtubeHash); this.movieFrame = c; - b.appendChild(c); + a.appendChild(c); }; -Entry.Container.prototype.initTvcast = function(a) { - this.tvcast = a; +Entry.Container.prototype.initTvcast = function(b) { + this.tvcast = b; this.youtubeTab.removeClass("entryRemove"); - a = this._view; - a = a.style.width.substring(0, a.style.width.length - 2); - var b = this.movieContainer, c = Entry.createElement("iframe"); - c.setAttribute("width", a); - c.setAttribute("height", 9 * a / 16); + b = this._view; + b = b.style.width.substring(0, b.style.width.length - 2); + var a = this.movieContainer, c = Entry.createElement("iframe"); + c.setAttribute("width", b); + c.setAttribute("height", 9 * b / 16); c.setAttribute("allowfullscreen", ""); c.setAttribute("frameborder", 0); c.setAttribute("src", this.tvcast); this.movieFrame = c; - b.appendChild(c); + a.appendChild(c); }; -Entry.Container.prototype.initDoneProject = function(a) { - this.doneProject = a; +Entry.Container.prototype.initDoneProject = function(b) { + this.doneProject = b; this.iframeTab.removeClass("entryRemove"); - a = this._view; - a = a.style.width.substring(0, a.style.width.length - 2); - var b = Entry.createElement("iframe"); - b.setAttribute("width", a); - b.setAttribute("height", 9 * a / 16 + 35); - b.setAttribute("frameborder", 0); - b.setAttribute("src", "/api/iframe/project/" + this.doneProject); - this.doneProjectFrame = b; - this.doneContainer.appendChild(b); + b = this._view; + b = b.style.width.substring(0, b.style.width.length - 2); + var a = Entry.createElement("iframe"); + a.setAttribute("width", b); + a.setAttribute("height", 9 * b / 16 + 35); + a.setAttribute("frameborder", 0); + a.setAttribute("src", "/api/iframe/project/" + this.doneProject); + this.doneProjectFrame = a; + this.doneContainer.appendChild(a); }; Entry.Container.prototype.blurAllInputs = function() { - this.getSceneObjects().map(function(a) { - a = a.view_.getElementsByTagName("input"); - for (var b = 0, c = a.length;b < c;b++) { - a[b].blur(); + this.getSceneObjects().map(function(b) { + b = b.view_.getElementsByTagName("input"); + for (var a = 0, c = b.length;a < c;a++) { + b[a].blur(); } }); }; Entry.Container.prototype.showProjectAnswer = function() { - var a = this.inputValue; - a && a.setVisible(!0); -}; -Entry.Container.prototype.hideProjectAnswer = function(a) { var b = this.inputValue; - if (b && b.isVisible() && !Entry.engine.isState("run")) { - for (var c = Entry.container.getAllObjects(), d = ["ask_and_wait", "get_canvas_input_value", "set_visible_answer"], e = 0, f = c.length;e < f;e++) { - for (var g = c[e].script.getElementsByTagName("block"), h = 0, k = g.length;h < k;h++) { - if (-1 < d.indexOf(g[h].getAttribute("type")) && g[h].getAttribute("id") != a.getAttribute("id")) { + b && b.setVisible(!0); +}; +Entry.Container.prototype.hideProjectAnswer = function(b) { + if ((b = this.inputValue) && b.isVisible() && !Entry.engine.isState("run")) { + for (var a = Entry.container.getAllObjects(), c = ["ask_and_wait", "get_canvas_input_value", "set_visible_answer"], d = 0, e = a.length;d < e;d++) { + for (var f = a[d].script, g = 0;g < c.length;g++) { + if (f.hasBlockType(c[g])) { return; } } @@ -6418,70 +6769,71 @@ Entry.Container.prototype.getView = function() { Entry.Container.prototype.resize = function() { }; Entry.db = {data:{}, typeMap:{}}; -(function(a) { - a.add = function(b) { - this.data[b.id] = b; - var a = b.type; - void 0 === this.typeMap[a] && (this.typeMap[a] = {}); - this.typeMap[a][b.id] = b; +(function(b) { + b.add = function(a) { + this.data[a.id] = a; + var b = a.type; + void 0 === this.typeMap[b] && (this.typeMap[b] = {}); + this.typeMap[b][a.id] = a; }; - a.has = function(b) { - return this.data.hasOwnProperty(b); + b.has = function(a) { + return this.data.hasOwnProperty(a); }; - a.remove = function(b) { - this.has(b) && (delete this.typeMap[this.data[b].type][b], delete this.data[b]); + b.remove = function(a) { + this.has(a) && (delete this.typeMap[this.data[a].type][a], delete this.data[a]); }; - a.get = function(b) { - return this.data[b]; + b.get = function(a) { + return this.data[a]; }; - a.find = function() { + b.find = function() { }; - a.clear = function() { + b.clear = function() { this.data = {}; this.typeMap = {}; }; })(Entry.db); -Entry.Dom = function(a, b) { +Entry.Dom = function(b, a) { var c = /<(\w+)>/, d; - d = a instanceof HTMLElement ? $(a) : a instanceof jQuery ? a : c.test(a) ? $(a) : $("<" + a + ">"); - if (void 0 === b) { + d = b instanceof HTMLElement ? $(b) : b instanceof jQuery ? b : c.test(b) ? $(b) : $("<" + b + ">"); + if (void 0 === a) { return d; } - b.id && d.attr("id", b.id); - b.class && d.addClass(b.class); - b.classes && b.classes.map(function(b) { - d.addClass(b); + a.id && d.attr("id", a.id); + a.class && d.addClass(a.class); + a.classes && a.classes.map(function(a) { + d.addClass(a); }); - b.parent && b.parent.append(d); + a.src && d.attr("src", a.src); + a.parent && a.parent.append(d); d.bindOnClick = function() { - var b, a, c = function(b) { - b.stopImmediatePropagation(); - b.handled || (b.handled = !0, a.call(this, b)); + var a, b, c = function(a) { + a.stopImmediatePropagation(); + a.handled || (a.handled = !0, b.call(this, a)); }; - 1 < arguments.length ? (a = arguments[1] instanceof Function ? arguments[1] : function() { - }, b = "string" === typeof arguments[0] ? arguments[0] : "") : a = arguments[0] instanceof Function ? arguments[0] : function() { + 1 < arguments.length ? (b = arguments[1] instanceof Function ? arguments[1] : function() { + }, a = "string" === typeof arguments[0] ? arguments[0] : "") : b = arguments[0] instanceof Function ? arguments[0] : function() { }; - if (b) { - $(this).on("click touchstart", b, c); + if (a) { + $(this).on("click tab", a, c); } else { - $(this).on("click touchstart", c); + $(this).on("click tab", c); } }; return d; }; -Entry.SVG = function(a) { - a = document.getElementById(a); - return Entry.SVG.createElement(a); +Entry.SVG = function(b) { + b = document.getElementById(b); + return Entry.SVG.createElement(b); }; Entry.SVG.NS = "http://www.w3.org/2000/svg"; Entry.SVG.NS_XLINK = "http://www.w3.org/1999/xlink"; -Entry.SVG.createElement = function(a, b) { +Entry.SVG.createElement = function(b, a) { var c; - c = "string" === typeof a ? document.createElementNS(Entry.SVG.NS, a) : a; - if (b) { - b.href && (c.setAttributeNS(Entry.SVG.NS_XLINK, "href", b.href), delete b.href); - for (var d in b) { - c.setAttribute(d, b[d]); + c = "string" === typeof b ? document.createElementNS(Entry.SVG.NS, b) : b; + if (a) { + a.href && (c.setAttributeNS(Entry.SVG.NS_XLINK, "href", a.href), delete a.href); + for (var d in a) { + c.setAttribute(d, a[d]); } } this instanceof SVGElement && this.appendChild(c); @@ -6491,217 +6843,213 @@ Entry.SVG.createElement = function(a, b) { c.removeClass = Entry.SVG.removeClass; c.hasClass = Entry.SVG.hasClass; c.remove = Entry.SVG.remove; + c.removeAttr = Entry.SVG.removeAttr; return c; }; -Entry.SVG.attr = function(a, b) { - if ("string" === typeof a) { +Entry.SVG.attr = function(b, a) { + if ("string" === typeof b) { var c = {}; - c[a] = b; - a = c; + c[b] = a; + b = c; } - if (a) { - a.href && (this.setAttributeNS(Entry.SVG.NS_XLINK, "href", a.href), delete a.href); - for (var d in a) { - this.setAttribute(d, a[d]); + if (b) { + b.href && (this.setAttributeNS(Entry.SVG.NS_XLINK, "href", b.href), delete b.href); + for (var d in b) { + this.setAttribute(d, b[d]); } } return this; }; -Entry.SVG.addClass = function(a) { - for (var b = this.getAttribute("class"), c = 0;c < arguments.length;c++) { - a = arguments[c], this.hasClass(a) || (b += " " + a); +Entry.SVG.addClass = function(b) { + for (var a = this.getAttribute("class"), c = 0;c < arguments.length;c++) { + b = arguments[c], this.hasClass(b) || (a += " " + b); } - this.setAttribute("class", b); + this.setAttribute("class", a); return this; }; -Entry.SVG.removeClass = function(a) { - for (var b = this.getAttribute("class"), c = 0;c < arguments.length;c++) { - a = arguments[c], this.hasClass(a) && (b = b.replace(new RegExp("(\\s|^)" + a + "(\\s|$)"), " ")); +Entry.SVG.removeClass = function(b) { + for (var a = this.getAttribute("class"), c = 0;c < arguments.length;c++) { + b = arguments[c], this.hasClass(b) && (a = a.replace(new RegExp("(\\s|^)" + b + "(\\s|$)"), " ")); } - this.setAttribute("class", b); + this.setAttribute("class", a); return this; }; -Entry.SVG.hasClass = function(a) { - var b = this.getAttribute("class"); - return b ? b.match(new RegExp("(\\s|^)" + a + "(\\s|$)")) : !1; +Entry.SVG.hasClass = function(b) { + var a = this.getAttribute("class"); + return a ? a.match(new RegExp("(\\s|^)" + b + "(\\s|$)")) : !1; }; Entry.SVG.remove = function() { this.parentNode && this.parentNode.removeChild(this); }; -Entry.Dialog = function(a, b, c, d) { - a.dialog && a.dialog.remove(); - a.dialog = this; - this.parent = a; +Entry.SVG.removeAttr = function(b) { + this.removeAttribute(b); +}; +Entry.Dialog = function(b, a, c, d) { + b.dialog && b.dialog.remove(); + b.dialog = this; + this.parent = b; this.padding = 10; this.border = 2; - "number" == typeof b && (b = String(b)); - this.message_ = b = b.match(/.{1,15}/g).join("\n"); + "number" == typeof a && (a = String(a)); + this.message_ = a = a.match(/.{1,15}/g).join("\n"); this.mode_ = c; "speak" == c && this.generateSpeak(); d || Entry.stage.loadDialog(this); }; Entry.Dialog.prototype.generateSpeak = function() { this.object = new createjs.Container; - var a = new createjs.Text; - a.font = "15px NanumGothic"; - a.textBaseline = "top"; - a.textAlign = "left"; - a.text = this.message_; - var b = a.getTransformedBounds(), c = b.height, b = 10 <= b.width ? b.width : 17, d = new createjs.Shape; - d.graphics.f("#f5f5f5").ss(2, "round").s("#6FC0DD").rr(-this.padding, -this.padding, b + 2 * this.padding, c + 2 * this.padding, this.padding); + var b = new createjs.Text; + b.font = "15px NanumGothic"; + b.textBaseline = "top"; + b.textAlign = "left"; + b.text = this.message_; + var a = b.getTransformedBounds(), c = a.height, a = 10 <= a.width ? a.width : 17, d = new createjs.Shape; + d.graphics.f("#f5f5f5").ss(2, "round").s("#6FC0DD").rr(-this.padding, -this.padding, a + 2 * this.padding, c + 2 * this.padding, this.padding); this.object.addChild(d); - this.object.regX = b / 2; + this.object.regX = a / 2; this.object.regY = c / 2; - this.width = b; + this.width = a; this.height = c; this.notch = this.createSpeakNotch("ne"); this.update(); this.object.addChild(this.notch); - this.object.addChild(a); + this.object.addChild(b); }; Entry.Dialog.prototype.update = function() { - var a = this.parent.object.getTransformedBounds(), b = ""; - -135 < a.y - this.height - 20 - this.border ? (this.object.y = a.y - this.height / 2 - 20 - this.padding, b += "n") : (this.object.y = a.y + a.height + this.height / 2 + 20 + this.padding, b += "s"); - 240 > a.x + a.width + this.width ? (this.object.x = a.x + a.width + this.width / 2, b += "e") : (this.object.x = a.x - this.width / 2, b += "w"); - this.notch.type != b && (this.object.removeChild(this.notch), this.notch = this.createSpeakNotch(b), this.object.addChild(this.notch)); + var b = this.parent.object.getTransformedBounds(), a = ""; + -135 < b.y - this.height - 20 - this.border ? (this.object.y = b.y - this.height / 2 - 20 - this.padding, a += "n") : (this.object.y = b.y + b.height + this.height / 2 + 20 + this.padding, a += "s"); + 240 > b.x + b.width + this.width ? (this.object.x = b.x + b.width + this.width / 2, a += "e") : (this.object.x = b.x - this.width / 2, a += "w"); + this.notch.type != a && (this.object.removeChild(this.notch), this.notch = this.createSpeakNotch(a), this.object.addChild(this.notch)); }; -Entry.Dialog.prototype.createSpeakNotch = function(a) { - var b = new createjs.Shape; - b.type = a; - "ne" == a ? b.graphics.f("#f5f5f5").ss(2, "round").s("#6FC0DD").mt(0, this.height + this.padding - 1.5).lt(-10, this.height + this.padding + 20).lt(20, this.height + this.padding - 1.5) : "nw" == a ? b.graphics.f("#f5f5f5").ss(2, "round").s("#6FC0DD").mt(this.width, this.height + this.padding - 1.5).lt(this.width + 10, this.height + this.padding + 20).lt(this.width - 20, this.height + this.padding - 1.5) : "se" == a ? b.graphics.f("#f5f5f5").ss(2, "round").s("#6FC0DD").mt(0, -this.padding + 1.5).lt(-10, - -this.padding - 20).lt(20, -this.padding + 1.5) : "sw" == a && b.graphics.f("#f5f5f5").ss(2, "round").s("#6FC0DD").mt(this.width, -this.padding + 1.5).lt(this.width + 10, -this.padding - 20).lt(this.width - 20, -this.padding + 1.5); - return b; +Entry.Dialog.prototype.createSpeakNotch = function(b) { + var a = new createjs.Shape; + a.type = b; + "ne" == b ? a.graphics.f("#f5f5f5").ss(2, "round").s("#6FC0DD").mt(0, this.height + this.padding - 1.5).lt(-10, this.height + this.padding + 20).lt(20, this.height + this.padding - 1.5) : "nw" == b ? a.graphics.f("#f5f5f5").ss(2, "round").s("#6FC0DD").mt(this.width, this.height + this.padding - 1.5).lt(this.width + 10, this.height + this.padding + 20).lt(this.width - 20, this.height + this.padding - 1.5) : "se" == b ? a.graphics.f("#f5f5f5").ss(2, "round").s("#6FC0DD").mt(0, -this.padding + 1.5).lt(-10, + -this.padding - 20).lt(20, -this.padding + 1.5) : "sw" == b && a.graphics.f("#f5f5f5").ss(2, "round").s("#6FC0DD").mt(this.width, -this.padding + 1.5).lt(this.width + 10, -this.padding - 20).lt(this.width - 20, -this.padding + 1.5); + return a; }; Entry.Dialog.prototype.remove = function() { Entry.stage.unloadDialog(this); this.parent.dialog = null; }; -Entry.DoneProject = function(a) { - this.generateView(a); +Entry.DoneProject = function(b) { + this.generateView(b); }; var p = Entry.DoneProject.prototype; -p.init = function(a) { - this.projectId = a; +p.init = function(b) { + this.projectId = b; }; -p.generateView = function(a) { - var b = Entry.createElement("div"); - b.addClass("entryContainerDoneWorkspace"); - b.addClass("entryHidden"); - this.doneContainer = b; - b = Entry.createElement("iframe"); - b.setAttribute("id", "doneProjectframe"); - b.setAttribute("frameborder", 0); - b.setAttribute("src", "/api/iframe/project/" + a); - this.doneProjectFrame = b; - this.doneContainer.appendChild(b); +p.generateView = function(b) { + var a = Entry.createElement("div"); + a.addClass("entryContainerDoneWorkspace"); + a.addClass("entryHidden"); + this.doneContainer = a; + a = Entry.createElement("iframe"); + a.setAttribute("id", "doneProjectframe"); + a.setAttribute("frameborder", 0); + a.setAttribute("src", "/api/iframe/project/" + b); + this.doneProjectFrame = a; + this.doneContainer.appendChild(a); }; p.getView = function() { return this.doneContainer; }; p.resize = function() { - var a = document.getElementById("entryContainerWorkspaceId"), b = document.getElementById("doneProjectframe"); - w = a.offsetWidth; - b.width = w + "px"; - b.height = 9 * w / 16 + "px"; + var b = document.getElementById("entryContainerWorkspaceId"), a = document.getElementById("doneProjectframe"); + w = b.offsetWidth; + a.width = w + "px"; + a.height = 9 * w / 16 + "px"; }; Entry.Engine = function() { - function a(b) { - var a = [37, 38, 39, 40, 32], d = b.keyCode || b.which, e = Entry.stage.inputField; - 32 == d && e && e.hasFocus() || -1 < a.indexOf(d) && b.preventDefault(); + function b(a) { + var b = [37, 38, 39, 40, 32], d = a.keyCode || a.which, e = Entry.stage.inputField; + 32 == d && e && e.hasFocus() || -1 < b.indexOf(d) && a.preventDefault(); } this.state = "stop"; this.popup = null; this.isUpdating = !0; this.speeds = [1, 15, 30, 45, 60]; - this.pressedKeys = []; - Entry.addEventListener("keyPressed", this.captureKeyEvent); - Entry.addEventListener("keyUpped", this.captureKeyUpEvent); - Entry.addEventListener("canvasClick", function(b) { + Entry.keyPressed && Entry.keyPressed.attach(this, this.captureKeyEvent); + Entry.addEventListener("canvasClick", function(a) { Entry.engine.fireEvent("mouse_clicked"); }); - Entry.addEventListener("canvasClickCanceled", function(b) { + Entry.addEventListener("canvasClickCanceled", function(a) { Entry.engine.fireEvent("mouse_click_cancled"); }); - Entry.addEventListener("entityClick", function(b) { - Entry.engine.fireEventOnEntity("when_object_click", b); + Entry.addEventListener("entityClick", function(a) { + Entry.engine.fireEventOnEntity("when_object_click", a); }); - Entry.addEventListener("entityClickCanceled", function(b) { - Entry.engine.fireEventOnEntity("when_object_click_canceled", b); + Entry.addEventListener("entityClickCanceled", function(a) { + Entry.engine.fireEventOnEntity("when_object_click_canceled", a); }); - "phone" != Entry.type && (Entry.addEventListener("stageMouseMove", function(b) { + "phone" != Entry.type && (Entry.addEventListener("stageMouseMove", function(a) { Entry.engine.updateMouseView(); - }), Entry.addEventListener("stageMouseOut", function(b) { + }), Entry.addEventListener("stageMouseOut", function(a) { Entry.engine.hideMouseView(); })); Entry.addEventListener("run", function() { - $(window).bind("keydown", a); + $(window).bind("keydown", b); }); Entry.addEventListener("stop", function() { - $(window).unbind("keydown", a); + $(window).unbind("keydown", b); }); }; -Entry.Engine.prototype.generateView = function(a, b) { - if (b && "workspace" != b) { - "minimize" == b ? (this.view_ = a, this.view_.addClass("entryEngine"), this.view_.addClass("entryEngineMinimize"), this.maximizeButton = Entry.createElement("button"), this.maximizeButton.addClass("entryEngineButtonMinimize"), this.maximizeButton.addClass("entryMaximizeButtonMinimize"), this.view_.appendChild(this.maximizeButton), this.maximizeButton.bindOnClick(function(b) { +Entry.Engine.prototype.generateView = function(b, a) { + if (a && "workspace" != a) { + "minimize" == a ? (this.view_ = b, this.view_.addClass("entryEngine"), this.view_.addClass("entryEngineMinimize"), this.maximizeButton = Entry.createElement("button"), this.maximizeButton.addClass("entryEngineButtonMinimize"), this.maximizeButton.addClass("entryMaximizeButtonMinimize"), this.view_.appendChild(this.maximizeButton), this.maximizeButton.bindOnClick(function(a) { Entry.engine.toggleFullscreen(); - }), this.coordinateButton = Entry.createElement("button"), this.coordinateButton.addClass("entryEngineButtonMinimize"), this.coordinateButton.addClass("entryCoordinateButtonMinimize"), this.view_.appendChild(this.coordinateButton), this.coordinateButton.bindOnClick(function(b) { + }), this.coordinateButton = Entry.createElement("button"), this.coordinateButton.addClass("entryEngineButtonMinimize"), this.coordinateButton.addClass("entryCoordinateButtonMinimize"), this.view_.appendChild(this.coordinateButton), this.coordinateButton.bindOnClick(function(a) { this.hasClass("toggleOn") ? this.removeClass("toggleOn") : this.addClass("toggleOn"); Entry.stage.toggleCoordinator(); - }), this.runButton = Entry.createElement("button"), this.runButton.addClass("entryEngineButtonMinimize"), this.runButton.addClass("entryRunButtonMinimize"), this.runButton.innerHTML = Lang.Blocks.START, this.view_.appendChild(this.runButton), this.runButton.bindOnClick(function(b) { - b.preventDefault(); + }), this.runButton = Entry.createElement("button"), this.runButton.addClass("entryEngineButtonMinimize"), this.runButton.addClass("entryRunButtonMinimize"), this.runButton.innerHTML = Lang.Blocks.START, this.view_.appendChild(this.runButton), this.runButton.bindOnClick(function(a) { Entry.engine.toggleRun(); - }), this.runButton2 = Entry.createElement("button"), this.runButton2.addClass("entryEngineBigButtonMinimize_popup"), this.runButton2.addClass("entryEngineBigButtonMinimize_popup_run"), this.view_.appendChild(this.runButton2), this.runButton2.bindOnClick(function(b) { - b.preventDefault(); + }), this.runButton2 = Entry.createElement("button"), this.runButton2.addClass("entryEngineBigButtonMinimize_popup"), this.runButton2.addClass("entryEngineBigButtonMinimize_popup_run"), this.view_.appendChild(this.runButton2), this.runButton2.bindOnClick(function(a) { Entry.engine.toggleRun(); - }), this.stopButton = Entry.createElement("button"), this.stopButton.addClass("entryEngineButtonMinimize"), this.stopButton.addClass("entryStopButtonMinimize"), this.stopButton.addClass("entryRemove"), this.stopButton.innerHTML = Lang.Workspace.stop, this.view_.appendChild(this.stopButton), this.stopButton.bindOnClick(function(b) { + }), this.stopButton = Entry.createElement("button"), this.stopButton.addClass("entryEngineButtonMinimize"), this.stopButton.addClass("entryStopButtonMinimize"), this.stopButton.addClass("entryRemove"), this.stopButton.innerHTML = Lang.Workspace.stop, this.view_.appendChild(this.stopButton), this.stopButton.bindOnClick(function(a) { this.blur(); - b.preventDefault(); Entry.engine.toggleStop(); - }), this.pauseButton = Entry.createElement("button"), this.pauseButton.innerHTML = Lang.Workspace.pause, this.pauseButton.addClass("entryEngineButtonMinimize"), this.pauseButton.addClass("entryPauseButtonMinimize"), this.pauseButton.addClass("entryRemove"), this.view_.appendChild(this.pauseButton), this.pauseButton.bindOnClick(function(b) { + }), this.pauseButton = Entry.createElement("button"), this.pauseButton.innerHTML = Lang.Workspace.pause, this.pauseButton.addClass("entryEngineButtonMinimize"), this.pauseButton.addClass("entryPauseButtonMinimize"), this.pauseButton.addClass("entryRemove"), this.view_.appendChild(this.pauseButton), this.pauseButton.bindOnClick(function(a) { this.blur(); - b.preventDefault(); Entry.engine.togglePause(); - }), this.mouseView = Entry.createElement("div"), this.mouseView.addClass("entryMouseViewMinimize"), this.mouseView.addClass("entryRemove"), this.view_.appendChild(this.mouseView)) : "phone" == b && (this.view_ = a, this.view_.addClass("entryEngine", "entryEnginePhone"), this.headerView_ = Entry.createElement("div", "entryEngineHeader"), this.headerView_.addClass("entryEngineHeaderPhone"), this.view_.appendChild(this.headerView_), this.maximizeButton = Entry.createElement("button"), this.maximizeButton.addClass("entryEngineButtonPhone", - "entryMaximizeButtonPhone"), this.headerView_.appendChild(this.maximizeButton), this.maximizeButton.bindOnClick(function(b) { + }), this.mouseView = Entry.createElement("div"), this.mouseView.addClass("entryMouseViewMinimize"), this.mouseView.addClass("entryRemove"), this.view_.appendChild(this.mouseView)) : "phone" == a && (this.view_ = b, this.view_.addClass("entryEngine", "entryEnginePhone"), this.headerView_ = Entry.createElement("div", "entryEngineHeader"), this.headerView_.addClass("entryEngineHeaderPhone"), this.view_.appendChild(this.headerView_), this.maximizeButton = Entry.createElement("button"), this.maximizeButton.addClass("entryEngineButtonPhone", + "entryMaximizeButtonPhone"), this.headerView_.appendChild(this.maximizeButton), this.maximizeButton.bindOnClick(function(a) { Entry.engine.footerView_.addClass("entryRemove"); Entry.engine.headerView_.addClass("entryRemove"); Entry.launchFullScreen(Entry.engine.view_); - }), document.addEventListener("fullscreenchange", function(b) { + }), document.addEventListener("fullscreenchange", function(a) { Entry.engine.exitFullScreen(); - }), document.addEventListener("webkitfullscreenchange", function(b) { + }), document.addEventListener("webkitfullscreenchange", function(a) { Entry.engine.exitFullScreen(); - }), document.addEventListener("mozfullscreenchange", function(b) { + }), document.addEventListener("mozfullscreenchange", function(a) { Entry.engine.exitFullScreen(); - }), this.footerView_ = Entry.createElement("div", "entryEngineFooter"), this.footerView_.addClass("entryEngineFooterPhone"), this.view_.appendChild(this.footerView_), this.runButton = Entry.createElement("button"), this.runButton.addClass("entryEngineButtonPhone", "entryRunButtonPhone"), Entry.objectAddable && this.runButton.addClass("small"), this.runButton.innerHTML = Lang.Workspace.run, this.footerView_.appendChild(this.runButton), this.runButton.bindOnClick(function(b) { - b.preventDefault(); + }), this.footerView_ = Entry.createElement("div", "entryEngineFooter"), this.footerView_.addClass("entryEngineFooterPhone"), this.view_.appendChild(this.footerView_), this.runButton = Entry.createElement("button"), this.runButton.addClass("entryEngineButtonPhone", "entryRunButtonPhone"), Entry.objectAddable && this.runButton.addClass("small"), this.runButton.innerHTML = Lang.Workspace.run, this.footerView_.appendChild(this.runButton), this.runButton.bindOnClick(function(a) { Entry.engine.toggleRun(); - }), this.stopButton = Entry.createElement("button"), this.stopButton.addClass("entryEngineButtonPhone", "entryStopButtonPhone", "entryRemove"), Entry.objectAddable && this.stopButton.addClass("small"), this.stopButton.innerHTML = Lang.Workspace.stop, this.footerView_.appendChild(this.stopButton), this.stopButton.bindOnClick(function(b) { - b.preventDefault(); + }), this.stopButton = Entry.createElement("button"), this.stopButton.addClass("entryEngineButtonPhone", "entryStopButtonPhone", "entryRemove"), Entry.objectAddable && this.stopButton.addClass("small"), this.stopButton.innerHTML = Lang.Workspace.stop, this.footerView_.appendChild(this.stopButton), this.stopButton.bindOnClick(function(a) { Entry.engine.toggleStop(); })); } else { - this.view_ = a; + this.view_ = b; this.view_.addClass("entryEngine_w"); this.view_.addClass("entryEngineWorkspace_w"); var c = Entry.createElement("button"); this.speedButton = c; this.speedButton.addClass("entrySpeedButtonWorkspace", "entryEngineTopWorkspace", "entryEngineButtonWorkspace_w"); this.view_.appendChild(this.speedButton); - this.speedButton.bindOnClick(function(b) { + this.speedButton.bindOnClick(function(a) { Entry.engine.toggleSpeedPanel(); c.blur(); }); this.maximizeButton = Entry.createElement("button"); this.maximizeButton.addClass("entryEngineButtonWorkspace_w", "entryEngineTopWorkspace", "entryMaximizeButtonWorkspace_w"); this.view_.appendChild(this.maximizeButton); - this.maximizeButton.bindOnClick(function(b) { + this.maximizeButton.bindOnClick(function(a) { Entry.engine.toggleFullscreen(); }); var d = Entry.createElement("button"); this.coordinateButton = d; this.coordinateButton.addClass("entryEngineButtonWorkspace_w", "entryEngineTopWorkspace", "entryCoordinateButtonWorkspace_w"); this.view_.appendChild(this.coordinateButton); - this.coordinateButton.bindOnClick(function(b) { + this.coordinateButton.bindOnClick(function(a) { this.hasClass("toggleOn") ? this.removeClass("toggleOn") : this.addClass("toggleOn"); d.blur(); Entry.stage.toggleCoordinator(); @@ -6710,7 +7058,7 @@ Entry.Engine.prototype.generateView = function(a, b) { this.addButton.addClass("entryEngineButtonWorkspace_w"); this.addButton.addClass("entryAddButtonWorkspace_w"); this.addButton.innerHTML = Lang.Workspace.add_object; - this.addButton.bindOnClick(function(b) { + this.addButton.bindOnClick(function(a) { Entry.dispatchEvent("openSpriteManager"); }); this.view_.appendChild(this.addButton); @@ -6719,16 +7067,14 @@ Entry.Engine.prototype.generateView = function(a, b) { this.runButton.addClass("entryRunButtonWorkspace_w"); this.runButton.innerHTML = Lang.Workspace.run; this.view_.appendChild(this.runButton); - this.runButton.bindOnClick(function(b) { - b.preventDefault(); + this.runButton.bindOnClick(function(a) { Entry.engine.toggleRun(); }); this.runButton2 = Entry.createElement("button"); this.runButton2.addClass("entryEngineButtonWorkspace_w"); this.runButton2.addClass("entryRunButtonWorkspace_w2"); this.view_.appendChild(this.runButton2); - this.runButton2.bindOnClick(function(b) { - b.preventDefault(); + this.runButton2.bindOnClick(function(a) { Entry.engine.toggleRun(); }); this.stopButton = Entry.createElement("button"); @@ -6737,8 +7083,7 @@ Entry.Engine.prototype.generateView = function(a, b) { this.stopButton.addClass("entryRemove"); this.stopButton.innerHTML = Lang.Workspace.stop; this.view_.appendChild(this.stopButton); - this.stopButton.bindOnClick(function(b) { - b.preventDefault(); + this.stopButton.bindOnClick(function(a) { Entry.engine.toggleStop(); }); this.stopButton2 = Entry.createElement("button"); @@ -6747,8 +7092,7 @@ Entry.Engine.prototype.generateView = function(a, b) { this.stopButton2.addClass("entryRemove"); this.stopButton2.innerHTML = Lang.Workspace.stop; this.view_.appendChild(this.stopButton2); - this.stopButton2.bindOnClick(function(b) { - b.preventDefault(); + this.stopButton2.bindOnClick(function(a) { Entry.engine.toggleStop(); }); this.pauseButton = Entry.createElement("button"); @@ -6756,8 +7100,7 @@ Entry.Engine.prototype.generateView = function(a, b) { this.pauseButton.addClass("entryPauseButtonWorkspace_w"); this.pauseButton.addClass("entryRemove"); this.view_.appendChild(this.pauseButton); - this.pauseButton.bindOnClick(function(b) { - b.preventDefault(); + this.pauseButton.bindOnClick(function(a) { Entry.engine.togglePause(); }); this.mouseView = Entry.createElement("div"); @@ -6768,7 +7111,7 @@ Entry.Engine.prototype.generateView = function(a, b) { }; Entry.Engine.prototype.toggleSpeedPanel = function() { if (this.speedPanelOn) { - this.speedPanelOn = !1, $(Entry.stage.canvas.canvas).animate({top:"24px"}), this.coordinateButton.removeClass("entryRemove"), this.maximizeButton.removeClass("entryRemove"), this.mouseView.removeClass("entryRemoveElement"), $(this.speedLabel_).remove(), delete this.speedLabel_, $(this.speedProgress_).fadeOut(null, function(b) { + this.speedPanelOn = !1, $(Entry.stage.canvas.canvas).animate({top:"24px"}), this.coordinateButton.removeClass("entryRemove"), this.maximizeButton.removeClass("entryRemove"), this.mouseView.removeClass("entryRemoveElement"), $(this.speedLabel_).remove(), delete this.speedLabel_, $(this.speedProgress_).fadeOut(null, function(a) { $(this).remove(); delete this.speedProgress_; }), $(this.speedHandle_).remove(), delete this.speedHandle_; @@ -6782,32 +7125,32 @@ Entry.Engine.prototype.toggleSpeedPanel = function() { this.speedLabel_.innerHTML = Lang.Workspace.speed; this.view_.insertBefore(this.speedLabel_, this.maximizeButton); this.speedProgress_ = Entry.createElement("table", "entrySpeedProgressWorkspace"); - for (var a = Entry.createElement("tr"), b = this.speeds, c = 0;5 > c;c++) { + for (var b = Entry.createElement("tr"), a = this.speeds, c = 0;5 > c;c++) { (function(c) { var e = Entry.createElement("td", "progressCell" + c); e.bindOnClick(function() { - Entry.engine.setSpeedMeter(b[c]); + Entry.engine.setSpeedMeter(a[c]); }); - a.appendChild(e); + b.appendChild(e); })(c); } this.view_.insertBefore(this.speedProgress_, this.maximizeButton); - this.speedProgress_.appendChild(a); + this.speedProgress_.appendChild(b); this.speedHandle_ = Entry.createElement("div", "entrySpeedHandleWorkspace"); c = (Entry.interfaceState.canvasWidth - 84) / 5; - $(this.speedHandle_).draggable({axis:"x", grid:[c, c], containment:[80, 0, 4 * c + 80, 0], drag:function(b, a) { - var c = (a.position.left - 80) / (Entry.interfaceState.canvasWidth - 84) * 5, c = Math.floor(c); + $(this.speedHandle_).draggable({axis:"x", grid:[c, c], containment:[80, 0, 4 * c + 80, 0], drag:function(a, b) { + var c = (b.position.left - 80) / (Entry.interfaceState.canvasWidth - 84) * 5, c = Math.floor(c); 0 > c || Entry.engine.setSpeedMeter(Entry.engine.speeds[c]); }}); this.view_.insertBefore(this.speedHandle_, this.maximizeButton); this.setSpeedMeter(Entry.FPS); } }; -Entry.Engine.prototype.setSpeedMeter = function(a) { - var b = this.speeds.indexOf(a); - 0 > b || (b = Math.min(4, b), b = Math.max(0, b), this.speedPanelOn && (this.speedHandle_.style.left = (Entry.interfaceState.canvasWidth - 80) / 10 * (2 * b + 1) + 80 - 9 + "px"), Entry.FPS != a && (clearInterval(this.ticker), this.ticker = setInterval(this.update, Math.floor(1E3 / a)), Entry.FPS = a)); +Entry.Engine.prototype.setSpeedMeter = function(b) { + var a = this.speeds.indexOf(b); + 0 > a || (a = Math.min(4, a), a = Math.max(0, a), this.speedPanelOn && (this.speedHandle_.style.left = (Entry.interfaceState.canvasWidth - 80) / 10 * (2 * a + 1) + 80 - 9 + "px"), Entry.FPS != b && (clearInterval(this.ticker), this.ticker = setInterval(this.update, Math.floor(1E3 / b)), Entry.FPS = b)); }; -Entry.Engine.prototype.start = function(a) { +Entry.Engine.prototype.start = function(b) { createjs.Ticker.setFPS(Entry.FPS); this.ticker = setInterval(this.update, Math.floor(1E3 / Entry.FPS)); }; @@ -6819,45 +7162,35 @@ Entry.Engine.prototype.update = function() { Entry.engine.isState("run") && (Entry.engine.computeObjects(), Entry.hw.update()); }; Entry.Engine.prototype.computeObjects = function() { - Entry.container.mapEntityIncludeCloneOnScene(this.computeFunction); -}; -Entry.Engine.prototype.computeFunction = function(a) { - a = a.runningScript; - for (var b = 0;b < a.length;b++) { - for (var c = a.shift(), d = !0, e = !1;c && d && !e;) { - try { - var d = !c.isLooped, f = c.run(), e = f && f === c, c = f; - } catch (g) { - throw Entry.engine.toggleStop(), Entry.engine.isUpdating = !1, "workspace" == Entry.type && (Entry.container.selectObject(), Entry.container.selectObject(c.entity.parent.id, !0), Entry.playground.changeViewMode("code"), Blockly.mainWorkspace.activatePreviousBlock(c.id)), Entry.toast.alert(Lang.Msgs.runtime_error, Lang.Workspace.check_runtime_error, !0), g; - } - } - c && a.push(c); - } + Entry.container.mapObjectOnScene(this.computeFunction); }; -Entry.Engine.computeThread = function(a, b) { +Entry.Engine.prototype.computeFunction = function(b) { + b.script.tick(); +}; +Entry.Engine.computeThread = function(b, a) { Entry.engine.isContinue = !0; - for (var c = !1;b && Entry.engine.isContinue && !c;) { - Entry.engine.isContinue = !b.isRepeat; - var d = b.run(), c = d && d === b; - b = d; + for (var c = !1;a && Entry.engine.isContinue && !c;) { + Entry.engine.isContinue = !a.isRepeat; + var d = a.run(), c = d && d === a; + a = d; } - return b; + return a; }; -Entry.Engine.prototype.isState = function(a) { - return -1 < this.state.indexOf(a); +Entry.Engine.prototype.isState = function(b) { + return -1 < this.state.indexOf(b); }; Entry.Engine.prototype.run = function() { this.isState("run") ? this.toggleStop() : (this.isState("stop") || this.isState("pause")) && this.toggleRun(); }; Entry.Engine.prototype.toggleRun = function() { Entry.addActivity("run"); - "stop" == this.state && (Entry.playground.syncObject(), Entry.container.mapEntity(function(a) { - a.takeSnapshot(); - }), Entry.variableContainer.mapVariable(function(a) { - a.takeSnapshot(); - }), Entry.variableContainer.mapList(function(a) { - a.takeSnapshot(); - }), Entry.container.takeSequenceSnapshot(), Entry.scene.takeStartSceneSnapshot(), this.state = "run", this.fireEvent("when_run_button_click")); + "stop" == this.state && (Entry.container.mapEntity(function(b) { + b.takeSnapshot(); + }), Entry.variableContainer.mapVariable(function(b) { + b.takeSnapshot(); + }), Entry.variableContainer.mapList(function(b) { + b.takeSnapshot(); + }), Entry.container.takeSequenceSnapshot(), Entry.scene.takeStartSceneSnapshot(), this.state = "run", this.fireEvent("start")); this.state = "run"; "mobile" == Entry.type && this.view_.addClass("entryEngineBlueWorkspace"); this.pauseButton.innerHTML = Lang.Workspace.pause; @@ -6873,25 +7206,25 @@ Entry.Engine.prototype.toggleRun = function() { }; Entry.Engine.prototype.toggleStop = function() { Entry.addActivity("stop"); - var a = Entry.container, b = Entry.variableContainer; - a.mapEntity(function(b) { - b.loadSnapshot(); - b.object.filters = []; - b.resetFilter(); - b.dialog && b.dialog.remove(); - b.brush && b.removeBrush(); + var b = Entry.container, a = Entry.variableContainer; + b.mapEntity(function(a) { + a.loadSnapshot(); + a.object.filters = []; + a.resetFilter(); + a.dialog && a.dialog.remove(); + a.brush && a.removeBrush(); }); - b.mapVariable(function(b) { - b.loadSnapshot(); + a.mapVariable(function(a) { + a.loadSnapshot(); }); - b.mapList(function(b) { - b.loadSnapshot(); - b.updateView(); + a.mapList(function(a) { + a.loadSnapshot(); + a.updateView(); }); this.stopProjectTimer(); - a.clearRunningState(); - a.loadSequenceSnapshot(); - a.setInputValue(); + b.clearRunningState(); + b.loadSequenceSnapshot(); + b.setInputValue(); Entry.scene.loadStartSceneSnapshot(); Entry.Func.clearThreads(); createjs.Sound.setVolume(1); @@ -6909,54 +7242,29 @@ Entry.Engine.prototype.toggleStop = function() { Entry.Engine.prototype.togglePause = function() { "pause" == this.state ? (this.state = "run", this.pauseButton.innerHTML = Lang.Workspace.pause) : (this.state = "pause", this.pauseButton.innerHTML = Lang.Workspace.restart, this.runButton.removeClass("entryRemove"), this.stopButton.removeClass("entryRemove")); }; -Entry.Engine.prototype.fireEvent = function(a) { - "run" == this.state && Entry.container.mapEntityIncludeCloneOnScene(this.raiseEvent, a); -}; -Entry.Engine.prototype.raiseEvent = function(a, b) { - for (var c = a.parent.script.childNodes, d = 0;d < c.length;d++) { - var e = c[d]; - if (Entry.Xml.isTypeOf(b, e)) { - var f = new Entry.Script(a); - f.init(e); - a.runningScript.push(f); - } - } +Entry.Engine.prototype.fireEvent = function(b) { + "run" == this.state && Entry.container.mapEntityIncludeCloneOnScene(this.raiseEvent, b); }; -Entry.Engine.prototype.fireEventOnEntity = function(a, b) { - "run" == this.state && Entry.container.mapEntityIncludeCloneOnScene(this.raiseEventOnEntity, [b, a]); +Entry.Engine.prototype.raiseEvent = function(b, a) { + b.parent.script.raiseEvent(a, b); }; -Entry.Engine.prototype.raiseEventOnEntity = function(a, b) { - if (a === b[0]) { - for (var c = b[1], d = a.parent.script.childNodes, e = 0;e < d.length;e++) { - var f = d[e]; - if (Entry.Xml.isTypeOf(c, f)) { - var g = new Entry.Script(a); - g.init(f); - a.runningScript.push(g); - } - } - } +Entry.Engine.prototype.fireEventOnEntity = function(b, a) { + "run" == this.state && Entry.container.mapEntityIncludeCloneOnScene(this.raiseEventOnEntity, [a, b]); }; -Entry.Engine.prototype.captureKeyEvent = function(a) { - var b = a.keyCode, c = Entry.type; - 0 > Entry.engine.pressedKeys.indexOf(b) && Entry.engine.pressedKeys.push(b); - a.ctrlKey && "workspace" == c ? 83 == b ? (a.preventDefault(), Entry.dispatchEvent("saveWorkspace")) : 82 == b ? (a.preventDefault(), Entry.engine.run()) : 90 == b ? (a.preventDefault(), Entry.dispatchEvent(a.shiftKey ? "redo" : "undo")) : 48 < b && 58 > b && (a.preventDefault(), Entry.playground.selectMenu(b - 49)) : Entry.engine.isState("run") && (Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent, ["press_some_key", b]), Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent, - ["when_some_key_pressed", b])); - Entry.engine.isState("stop") && "workspace" === c && 37 <= b && 40 >= b && Entry.stage.moveSprite(a); +Entry.Engine.prototype.raiseEventOnEntity = function(b, a) { + b === a[0] && b.parent.script.raiseEvent(a[1], b); }; -Entry.Engine.prototype.captureKeyUpEvent = function(a) { - a = a.keyCode; - 0 <= Entry.engine.pressedKeys.indexOf(a) && Entry.engine.pressedKeys.splice(Entry.engine.pressedKeys.indexOf(a), 1); +Entry.Engine.prototype.captureKeyEvent = function(b) { + var a = b.keyCode, c = Entry.type; + b.ctrlKey && "workspace" == c ? 83 == a ? (b.preventDefault(), Entry.dispatchEvent("saveWorkspace")) : 82 == a ? (b.preventDefault(), Entry.engine.run()) : 90 == a && (b.preventDefault(), console.log("engine"), Entry.dispatchEvent(b.shiftKey ? "redo" : "undo")) : Entry.engine.isState("run") && Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent, ["keyPress", a]); + Entry.engine.isState("stop") && "workspace" === c && 37 <= a && 40 >= a && Entry.stage.moveSprite(b); }; -Entry.Engine.prototype.raiseKeyEvent = function(a, b) { - for (var c = b[0], d = b[1], e = a.parent.script.childNodes, f = 0;f < e.length;f++) { - var g = e[f], h = Entry.Xml.getField("VALUE", g); - Entry.Xml.isTypeOf(c, g) && h == d && (h = new Entry.Script(a), h.init(g), a.runningScript.push(h)); - } +Entry.Engine.prototype.raiseKeyEvent = function(b, a) { + return b.parent.script.raiseEvent(a[0], b, String(a[1])); }; Entry.Engine.prototype.updateMouseView = function() { - var a = Entry.stage.mouseCoordinate; - this.mouseView.innerHTML = "X : " + a.x + ", Y : " + a.y; + var b = Entry.stage.mouseCoordinate; + this.mouseView.innerHTML = "X : " + b.x + ", Y : " + b.y; this.mouseView.removeClass("entryRemove"); }; Entry.Engine.prototype.hideMouseView = function() { @@ -6968,8 +7276,8 @@ Entry.Engine.prototype.toggleFullscreen = function() { } else { this.popup = new Entry.Popup; if ("workspace" != Entry.type) { - var a = $(document); - $(this.popup.body_).css("top", a.scrollTop()); + var b = $(document); + $(this.popup.body_).css("top", b.scrollTop()); $("body").css("overflow", "hidden"); popup.window_.appendChild(Entry.stage.canvas.canvas); } @@ -6982,12 +7290,12 @@ Entry.Engine.prototype.exitFullScreen = function() { Entry.Engine.prototype.showProjectTimer = function() { Entry.engine.projectTimer && this.projectTimer.setVisible(!0); }; -Entry.Engine.prototype.hideProjectTimer = function(a) { +Entry.Engine.prototype.hideProjectTimer = function() { var b = this.projectTimer; if (b && b.isVisible() && !this.isState("run")) { - for (var c = Entry.container.getAllObjects(), d = ["get_project_timer_value", "reset_project_timer", "set_visible_project_timer"], e = 0, f = c.length;e < f;e++) { - for (var g = c[e].script.getElementsByTagName("block"), h = 0, k = g.length;h < k;h++) { - if (-1 < d.indexOf(g[h].getAttribute("type")) && g[h].getAttribute("id") != a.getAttribute("id")) { + for (var a = Entry.container.getAllObjects(), c = ["get_project_timer_value", "reset_project_timer", "set_visible_project_timer", "choose_project_timer_action"], d = 0, e = a.length;d < e;d++) { + for (var f = a[d].script, g = 0;g < c.length;g++) { + if (f.hasBlockType(c[g])) { return; } } @@ -7000,23 +7308,22 @@ Entry.Engine.prototype.clearTimer = function() { clearInterval(this.projectTimer.tick); }; Entry.Engine.prototype.startProjectTimer = function() { - var a = this.projectTimer; - a && (a.start = (new Date).getTime(), a.isInit = !0, a.pausedTime = 0, a.tick = setInterval(function(b) { + var b = this.projectTimer; + b && (b.start = (new Date).getTime(), b.isInit = !0, b.pausedTime = 0, b.tick = setInterval(function(a) { Entry.engine.updateProjectTimer(); }, 1E3 / 60)); }; Entry.Engine.prototype.stopProjectTimer = function() { - var a = this.projectTimer; - a && (this.updateProjectTimer(0), a.isPaused = !1, a.isInit = !1, a.pausedTime = 0, clearInterval(a.tick)); + var b = this.projectTimer; + b && (this.updateProjectTimer(0), b.isPaused = !1, b.isInit = !1, b.pausedTime = 0, clearInterval(b.tick)); }; -Entry.Engine.prototype.updateProjectTimer = function(a) { - var b = Entry.engine.projectTimer, c = (new Date).getTime(); - b && ("undefined" == typeof a ? b.isPaused || b.setValue((c - b.start - b.pausedTime) / 1E3) : (b.setValue(a), b.pausedTime = 0, b.start = c)); +Entry.Engine.prototype.updateProjectTimer = function(b) { + var a = Entry.engine.projectTimer, c = (new Date).getTime(); + a && ("undefined" == typeof b ? a.isPaused || a.setValue((c - a.start - a.pausedTime) / 1E3) : (a.setValue(b), a.pausedTime = 0, a.start = c)); }; -Entry.EntityObject = function(a) { - this.parent = a; - this.type = a.objectType; - this.runningScript = []; +Entry.EntityObject = function(b) { + this.parent = b; + this.type = b.objectType; this.flip = !1; this.collision = Entry.Utils.COLLISION.NONE; this.id = Entry.generateHash(); @@ -7024,54 +7331,54 @@ Entry.EntityObject = function(a) { this.fontType = "Nanum Gothic", this.fontSize = 20, this.strike = this.underLine = this.fontItalic = this.fontBold = !1); this.object.entity = this; this.object.cursor = "pointer"; - this.object.on("mousedown", function(b) { - var a = this.entity.parent.id; + this.object.on("mousedown", function(a) { + var b = this.entity.parent.id; Entry.dispatchEvent("entityClick", this.entity); Entry.stage.isObjectClick = !0; - "minimize" != Entry.type && Entry.engine.isState("stop") && (this.offset = {x:-this.parent.x + this.entity.getX() - (.75 * b.stageX - 240), y:-this.parent.y - this.entity.getY() - (.75 * b.stageY - 135)}, this.cursor = "move", this.entity.initCommand(), Entry.container.selectObject(a)); + "minimize" != Entry.type && Entry.engine.isState("stop") && (this.offset = {x:-this.parent.x + this.entity.getX() - (.75 * a.stageX - 240), y:-this.parent.y - this.entity.getY() - (.75 * a.stageY - 135)}, this.cursor = "move", this.entity.initCommand(), Entry.container.selectObject(b)); }); - this.object.on("pressup", function(b) { + this.object.on("pressup", function(a) { Entry.dispatchEvent("entityClickCanceled", this.entity); this.cursor = "pointer"; this.entity.checkCommand(); }); - this.object.on("pressmove", function(b) { - "minimize" != Entry.type && Entry.engine.isState("stop") && !this.entity.parent.getLock() && (this.entity.doCommand(), this.entity.setX(.75 * b.stageX - 240 + this.offset.x), this.entity.setY(-(.75 * b.stageY - 135) - this.offset.y), Entry.stage.updateObject()); + this.object.on("pressmove", function(a) { + "minimize" != Entry.type && Entry.engine.isState("stop") && !this.entity.parent.getLock() && (this.entity.doCommand(), this.entity.setX(.75 * a.stageX - 240 + this.offset.x), this.entity.setY(-(.75 * a.stageY - 135) - this.offset.y), Entry.stage.updateObject()); }); }; -Entry.EntityObject.prototype.injectModel = function(a, b) { +Entry.EntityObject.prototype.injectModel = function(b, a) { if ("sprite" == this.type) { - this.setImage(a); + this.setImage(b); } else { if ("textBox" == this.type) { var c = this.parent; - b.text = b.text || c.text || c.name; - this.setFont(b.font); - this.setBGColour(b.bgColor); - this.setColour(b.colour); - this.setUnderLine(b.underLine); - this.setStrike(b.strike); - this.setText(b.text); - } - } - b && this.syncModel_(b); -}; -Entry.EntityObject.prototype.syncModel_ = function(a) { - this.setX(a.x); - this.setY(a.y); - this.setRegX(a.regX); - this.setRegY(a.regY); - this.setScaleX(a.scaleX); - this.setScaleY(a.scaleY); - this.setRotation(a.rotation); - this.setDirection(a.direction, !0); - this.setLineBreak(a.lineBreak); - this.setWidth(a.width); - this.setHeight(a.height); - this.setText(a.text); - this.setTextAlign(a.textAlign); - this.setFontSize(a.fontSize || this.getFontSize()); - this.setVisible(a.visible); + a.text = a.text || c.text || c.name; + this.setFont(a.font); + this.setBGColour(a.bgColor); + this.setColour(a.colour); + this.setUnderLine(a.underLine); + this.setStrike(a.strike); + this.setText(a.text); + } + } + a && this.syncModel_(a); +}; +Entry.EntityObject.prototype.syncModel_ = function(b) { + this.setX(b.x); + this.setY(b.y); + this.setRegX(b.regX); + this.setRegY(b.regY); + this.setScaleX(b.scaleX); + this.setScaleY(b.scaleY); + this.setRotation(b.rotation); + this.setDirection(b.direction, !0); + this.setLineBreak(b.lineBreak); + this.setWidth(b.width); + this.setHeight(b.height); + this.setText(b.text); + this.setTextAlign(b.textAlign); + this.setFontSize(b.fontSize || this.getFontSize()); + this.setVisible(b.visible); }; Entry.EntityObject.prototype.initCommand = function() { Entry.engine.isState("stop") && (this.isCommandValid = !1, Entry.stateManager && Entry.stateManager.addCommand("edit entity", this, this.restoreEntity, this.toJSON())); @@ -7082,25 +7389,20 @@ Entry.EntityObject.prototype.doCommand = function() { Entry.EntityObject.prototype.checkCommand = function() { Entry.engine.isState("stop") && !this.isCommandValid && Entry.dispatchEvent("cancelLastCommand"); }; -Entry.EntityObject.prototype.restoreEntity = function(a) { - var b = this.toJSON(); - this.syncModel_(a); +Entry.EntityObject.prototype.restoreEntity = function(b) { + var a = this.toJSON(); + this.syncModel_(b); Entry.dispatchEvent("updateObject"); - Entry.stateManager && Entry.stateManager.addCommand("restore object", this, this.restoreEntity, b); -}; -Entry.EntityObject.prototype.clearScript = function(a) { - for (;this.runningScript.length;) { - this.runningScript.pop(); - } + Entry.stateManager && Entry.stateManager.addCommand("restore object", this, this.restoreEntity, a); }; -Entry.EntityObject.prototype.setX = function(a) { - "number" == typeof a && (this.x = a, this.object.x = this.x, this.isClone || this.parent.updateCoordinateView(), this.updateDialog()); +Entry.EntityObject.prototype.setX = function(b) { + "number" == typeof b && (this.x = b, this.object.x = this.x, this.isClone || this.parent.updateCoordinateView(), this.updateDialog()); }; Entry.EntityObject.prototype.getX = function() { return this.x; }; -Entry.EntityObject.prototype.setY = function(a) { - "number" == typeof a && (this.y = a, this.object.y = -this.y, this.isClone || this.parent.updateCoordinateView(), this.updateDialog()); +Entry.EntityObject.prototype.setY = function(b) { + "number" == typeof b && (this.y = b, this.object.y = -this.y, this.isClone || this.parent.updateCoordinateView(), this.updateDialog()); }; Entry.EntityObject.prototype.getY = function() { return this.y; @@ -7108,17 +7410,17 @@ Entry.EntityObject.prototype.getY = function() { Entry.EntityObject.prototype.getDirection = function() { return this.direction; }; -Entry.EntityObject.prototype.setDirection = function(a, b) { - a || (a = 0); - "vertical" != this.parent.getRotateMethod() || b || (0 <= this.direction && 180 > this.direction) == (0 <= a && 180 > a) || (this.setScaleX(-this.getScaleX()), Entry.stage.updateObject(), this.flip = !this.flip); - this.direction = a.mod(360); +Entry.EntityObject.prototype.setDirection = function(b, a) { + b || (b = 0); + "vertical" != this.parent.getRotateMethod() || a || (0 <= this.direction && 180 > this.direction) == (0 <= b && 180 > b) || (this.setScaleX(-this.getScaleX()), Entry.stage.updateObject(), this.flip = !this.flip); + this.direction = b.mod(360); this.object.direction = this.direction; this.isClone || this.parent.updateRotationView(); Entry.dispatchEvent("updateObject"); }; -Entry.EntityObject.prototype.setRotation = function(a) { - "free" != this.parent.getRotateMethod() && (a = 0); - this.rotation = a.mod(360); +Entry.EntityObject.prototype.setRotation = function(b) { + "free" != this.parent.getRotateMethod() && (b = 0); + this.rotation = b.mod(360); this.object.rotation = this.rotation; this.updateDialog(); this.isClone || this.parent.updateRotationView(); @@ -7127,24 +7429,24 @@ Entry.EntityObject.prototype.setRotation = function(a) { Entry.EntityObject.prototype.getRotation = function() { return this.rotation; }; -Entry.EntityObject.prototype.setRegX = function(a) { - "textBox" == this.type && (a = 0); - this.regX = a; +Entry.EntityObject.prototype.setRegX = function(b) { + "textBox" == this.type && (b = 0); + this.regX = b; this.object.regX = this.regX; }; Entry.EntityObject.prototype.getRegX = function() { return this.regX; }; -Entry.EntityObject.prototype.setRegY = function(a) { - "textBox" == this.type && (a = 0); - this.regY = a; +Entry.EntityObject.prototype.setRegY = function(b) { + "textBox" == this.type && (b = 0); + this.regY = b; this.object.regY = this.regY; }; Entry.EntityObject.prototype.getRegY = function() { return this.regY; }; -Entry.EntityObject.prototype.setScaleX = function(a) { - this.scaleX = a; +Entry.EntityObject.prototype.setScaleX = function(b) { + this.scaleX = b; this.object.scaleX = this.scaleX; this.parent.updateCoordinateView(); this.updateDialog(); @@ -7152,8 +7454,8 @@ Entry.EntityObject.prototype.setScaleX = function(a) { Entry.EntityObject.prototype.getScaleX = function() { return this.scaleX; }; -Entry.EntityObject.prototype.setScaleY = function(a) { - this.scaleY = a; +Entry.EntityObject.prototype.setScaleY = function(b) { + this.scaleY = b; this.object.scaleY = this.scaleY; this.parent.updateCoordinateView(); this.updateDialog(); @@ -7161,18 +7463,18 @@ Entry.EntityObject.prototype.setScaleY = function(a) { Entry.EntityObject.prototype.getScaleY = function() { return this.scaleY; }; -Entry.EntityObject.prototype.setSize = function(a) { - 1 > a && (a = 1); - a /= this.getSize(); - this.setScaleX(this.getScaleX() * a); - this.setScaleY(this.getScaleY() * a); +Entry.EntityObject.prototype.setSize = function(b) { + 1 > b && (b = 1); + b /= this.getSize(); + this.setScaleX(this.getScaleX() * b); + this.setScaleY(this.getScaleY() * b); this.isClone || this.parent.updateCoordinateView(); }; Entry.EntityObject.prototype.getSize = function() { return (this.getWidth() * Math.abs(this.getScaleX()) + this.getHeight() * Math.abs(this.getScaleY())) / 2; }; -Entry.EntityObject.prototype.setWidth = function(a) { - this.width = a; +Entry.EntityObject.prototype.setWidth = function(b) { + this.width = b; this.object.width = this.width; this.textObject && this.getLineBreak() && (this.textObject.lineWidth = this.width); this.updateDialog(); @@ -7181,8 +7483,8 @@ Entry.EntityObject.prototype.setWidth = function(a) { Entry.EntityObject.prototype.getWidth = function() { return this.width; }; -Entry.EntityObject.prototype.setHeight = function(a) { - this.height = a; +Entry.EntityObject.prototype.setHeight = function(b) { + this.height = b; this.textObject && (this.object.height = this.height, this.alignTextBox()); this.updateDialog(); this.updateBG(); @@ -7190,61 +7492,61 @@ Entry.EntityObject.prototype.setHeight = function(a) { Entry.EntityObject.prototype.getHeight = function() { return this.height; }; -Entry.EntityObject.prototype.setColour = function(a) { - a || (a = "#000000"); - this.colour = a; +Entry.EntityObject.prototype.setColour = function(b) { + b || (b = "#000000"); + this.colour = b; this.textObject && (this.textObject.color = this.colour); }; Entry.EntityObject.prototype.getColour = function() { return this.colour; }; -Entry.EntityObject.prototype.setBGColour = function(a) { - a || (a = "transparent"); - this.bgColor = a; +Entry.EntityObject.prototype.setBGColour = function(b) { + b || (b = "transparent"); + this.bgColor = b; this.updateBG(); }; Entry.EntityObject.prototype.getBGColour = function() { return this.bgColor; }; -Entry.EntityObject.prototype.setUnderLine = function(a) { - void 0 === a && (a = !1); - this.underLine = a; - this.textObject.underLine = a; +Entry.EntityObject.prototype.setUnderLine = function(b) { + void 0 === b && (b = !1); + this.underLine = b; + this.textObject.underLine = b; }; Entry.EntityObject.prototype.getUnderLine = function() { return this.underLine; }; -Entry.EntityObject.prototype.setStrike = function(a) { - void 0 === a && (a = !1); - this.strike = a; - this.textObject.strike = a; +Entry.EntityObject.prototype.setStrike = function(b) { + void 0 === b && (b = !1); + this.strike = b; + this.textObject.strike = b; }; Entry.EntityObject.prototype.getStrike = function() { return this.strike; }; Entry.EntityObject.prototype.getFont = function() { - var a = []; - this.fontBold && a.push("bold"); - this.fontItalic && a.push("italic"); - a.push(this.getFontSize() + "px"); - a.push(this.fontType); - return a.join(" "); -}; -Entry.EntityObject.prototype.setFont = function(a) { - if ("textBox" == this.parent.objectType && this.font !== a) { - a || (a = "20px Nanum Gothic"); - var b = a.split(" "), c = 0; - if (c = -1 < b.indexOf("bold")) { - b.splice(c - 1, 1), this.setFontBold(!0); - } - if (c = -1 < b.indexOf("italic")) { - b.splice(c - 1, 1), this.setFontItalic(!0); - } - c = parseInt(b.shift()); + var b = []; + this.fontBold && b.push("bold"); + this.fontItalic && b.push("italic"); + b.push(this.getFontSize() + "px"); + b.push(this.fontType); + return b.join(" "); +}; +Entry.EntityObject.prototype.setFont = function(b) { + if ("textBox" == this.parent.objectType && this.font !== b) { + b || (b = "20px Nanum Gothic"); + var a = b.split(" "), c = 0; + if (c = -1 < a.indexOf("bold")) { + a.splice(c - 1, 1), this.setFontBold(!0); + } + if (c = -1 < a.indexOf("italic")) { + a.splice(c - 1, 1), this.setFontItalic(!0); + } + c = parseInt(a.shift()); this.setFontSize(c); - this.setFontType(b.join(" ")); + this.setFontType(a.join(" ")); this.font = this.getFont(); - this.textObject.font = a; + this.textObject.font = b; Entry.stage.update(); this.setWidth(this.textObject.getMeasuredWidth()); this.updateBG(); @@ -7260,75 +7562,75 @@ Entry.EntityObject.prototype.syncFont = function() { Entry.EntityObject.prototype.getFontType = function() { return this.fontType; }; -Entry.EntityObject.prototype.setFontType = function(a) { - "textBox" == this.parent.objectType && (this.fontType = a ? a : "Nanum Gothic", this.syncFont()); +Entry.EntityObject.prototype.setFontType = function(b) { + "textBox" == this.parent.objectType && (this.fontType = b ? b : "Nanum Gothic", this.syncFont()); }; -Entry.EntityObject.prototype.getFontSize = function(a) { +Entry.EntityObject.prototype.getFontSize = function(b) { return this.fontSize; }; -Entry.EntityObject.prototype.setFontSize = function(a) { - "textBox" == this.parent.objectType && this.fontSize != a && (this.fontSize = a ? a : 20, this.syncFont(), this.alignTextBox()); +Entry.EntityObject.prototype.setFontSize = function(b) { + "textBox" == this.parent.objectType && this.fontSize != b && (this.fontSize = b ? b : 20, this.syncFont(), this.alignTextBox()); }; -Entry.EntityObject.prototype.setFontBold = function(a) { - this.fontBold = a; +Entry.EntityObject.prototype.setFontBold = function(b) { + this.fontBold = b; }; Entry.EntityObject.prototype.toggleFontBold = function() { this.fontBold = !this.fontBold; this.syncFont(); return this.fontBold; }; -Entry.EntityObject.prototype.setFontItalic = function(a) { - this.fontItalic = a; +Entry.EntityObject.prototype.setFontItalic = function(b) { + this.fontItalic = b; }; Entry.EntityObject.prototype.toggleFontItalic = function() { this.fontItalic = !this.fontItalic; this.syncFont(); return this.fontItalic; }; -Entry.EntityObject.prototype.setFontName = function(a) { - for (var b = this.font.split(" "), c = [], d = 0, e = b.length;d < e;d++) { - ("bold" === b[d] || "italic" === b[d] || -1 < b[d].indexOf("px")) && c.push(b[d]); +Entry.EntityObject.prototype.setFontName = function(b) { + for (var a = this.font.split(" "), c = [], d = 0, e = a.length;d < e;d++) { + ("bold" === a[d] || "italic" === a[d] || -1 < a[d].indexOf("px")) && c.push(a[d]); } - this.setFont(c.join(" ") + " " + a); + this.setFont(c.join(" ") + " " + b); }; Entry.EntityObject.prototype.getFontName = function() { if ("textBox" == this.type) { if (!this.font) { return ""; } - for (var a = this.font.split(" "), b = [], c = 0, d = a.length;c < d;c++) { - "bold" !== a[c] && "italic" !== a[c] && -1 === a[c].indexOf("px") && b.push(a[c]); + for (var b = this.font.split(" "), a = [], c = 0, d = b.length;c < d;c++) { + "bold" !== b[c] && "italic" !== b[c] && -1 === b[c].indexOf("px") && a.push(b[c]); } - return b.join(" ").trim(); + return a.join(" ").trim(); } }; -Entry.EntityObject.prototype.setText = function(a) { - "textBox" == this.parent.objectType && (void 0 === a && (a = ""), this.text = a, this.textObject.text = this.text, this.lineBreak || (this.setWidth(this.textObject.getMeasuredWidth()), this.parent.updateCoordinateView()), this.updateBG(), Entry.stage.updateObject()); +Entry.EntityObject.prototype.setText = function(b) { + "textBox" == this.parent.objectType && (void 0 === b && (b = ""), this.text = b, this.textObject.text = this.text, this.lineBreak || (this.setWidth(this.textObject.getMeasuredWidth()), this.parent.updateCoordinateView()), this.updateBG(), Entry.stage.updateObject()); }; Entry.EntityObject.prototype.getText = function() { return this.text; }; -Entry.EntityObject.prototype.setTextAlign = function(a) { - "textBox" == this.parent.objectType && (void 0 === a && (a = Entry.TEXT_ALIGN_CENTER), this.textAlign = a, this.textObject.textAlign = Entry.TEXT_ALIGNS[this.textAlign], this.alignTextBox(), this.updateBG(), Entry.stage.updateObject()); +Entry.EntityObject.prototype.setTextAlign = function(b) { + "textBox" == this.parent.objectType && (void 0 === b && (b = Entry.TEXT_ALIGN_CENTER), this.textAlign = b, this.textObject.textAlign = Entry.TEXT_ALIGNS[this.textAlign], this.alignTextBox(), this.updateBG(), Entry.stage.updateObject()); }; Entry.EntityObject.prototype.getTextAlign = function() { return this.textAlign; }; -Entry.EntityObject.prototype.setLineBreak = function(a) { +Entry.EntityObject.prototype.setLineBreak = function(b) { if ("textBox" == this.parent.objectType) { - void 0 === a && (a = !1); - var b = this.lineBreak; - this.lineBreak = a; - b && !this.lineBreak ? (this.textObject.lineWidth = null, this.setHeight(this.textObject.getMeasuredLineHeight()), this.setText(this.getText().replace(/\n/g, ""))) : !b && this.lineBreak && (this.setFontSize(this.getFontSize() * this.getScaleX()), this.setHeight(3 * this.textObject.getMeasuredLineHeight()), this.setWidth(this.getWidth() * this.getScaleX()), this.setScaleX(1), this.setScaleY(1), this.textObject.lineWidth = this.getWidth(), this.alignTextBox()); + void 0 === b && (b = !1); + var a = this.lineBreak; + this.lineBreak = b; + a && !this.lineBreak ? (this.textObject.lineWidth = null, this.setHeight(this.textObject.getMeasuredLineHeight()), this.setText(this.getText().replace(/\n/g, ""))) : !a && this.lineBreak && (this.setFontSize(this.getFontSize() * this.getScaleX()), this.setHeight(3 * this.textObject.getMeasuredLineHeight()), this.setWidth(this.getWidth() * this.getScaleX()), this.setScaleX(1), this.setScaleY(1), this.textObject.lineWidth = this.getWidth(), this.alignTextBox()); Entry.stage.updateObject(); } }; Entry.EntityObject.prototype.getLineBreak = function() { return this.lineBreak; }; -Entry.EntityObject.prototype.setVisible = function(a) { - void 0 === a && (a = !0); - this.visible = a; +Entry.EntityObject.prototype.setVisible = function(b) { + void 0 === b && (b = !0); + this.visible = b; this.object.visible = this.visible; this.dialog && this.syncDialogVisible(); return this.visible; @@ -7336,28 +7638,28 @@ Entry.EntityObject.prototype.setVisible = function(a) { Entry.EntityObject.prototype.getVisible = function() { return this.visible; }; -Entry.EntityObject.prototype.setImage = function(a) { - delete a._id; +Entry.EntityObject.prototype.setImage = function(b) { + delete b._id; Entry.assert("sprite" == this.type, "Set image is only for sprite object"); - a.id || (a.id = Entry.generateHash()); - this.picture = a; - var b = this.picture.dimension, c = this.getRegX() - this.getWidth() / 2, d = this.getRegY() - this.getHeight() / 2; - this.setWidth(b.width); - this.setHeight(b.height); - b.scaleX || (b.scaleX = this.getScaleX(), b.scaleY = this.getScaleY()); + b.id || (b.id = Entry.generateHash()); + this.picture = b; + var a = this.picture.dimension, c = this.getRegX() - this.getWidth() / 2, d = this.getRegY() - this.getHeight() / 2; + this.setWidth(a.width); + this.setHeight(a.height); + a.scaleX || (a.scaleX = this.getScaleX(), a.scaleY = this.getScaleY()); this.setScaleX(this.scaleX); this.setScaleY(this.scaleY); this.setRegX(this.width / 2 + c); this.setRegY(this.height / 2 + d); - var e = Entry.container.getCachedPicture(a.id); + var e = Entry.container.getCachedPicture(b.id); if (e) { Entry.image = e, this.object.image = e, this.object.cache(0, 0, this.getWidth(), this.getHeight()); } else { e = new Image; - a.fileurl ? e.src = a.fileurl : (b = a.filename, e.src = Entry.defaultPath + "/uploads/" + b.substring(0, 2) + "/" + b.substring(2, 4) + "/image/" + b + ".png"); + b.fileurl ? e.src = b.fileurl : (a = b.filename, e.src = Entry.defaultPath + "/uploads/" + a.substring(0, 2) + "/" + a.substring(2, 4) + "/image/" + a + ".png"); var f = this; - e.onload = function(b) { - Entry.container.cachePicture(a.id, e); + e.onload = function(a) { + Entry.container.cachePicture(b.id, e); Entry.image = e; f.object.image = e; f.object.cache(0, 0, f.getWidth(), f.getHeight()); @@ -7367,26 +7669,26 @@ Entry.EntityObject.prototype.setImage = function(a) { Entry.dispatchEvent("updateObject"); }; Entry.EntityObject.prototype.applyFilter = function() { - var a = this.object, b = this.effect, c = [], d = Entry.adjustValueWithMaxMin; - b.brightness = b.brightness; + var b = this.object, a = this.effect, c = [], d = Entry.adjustValueWithMaxMin; + a.brightness = a.brightness; var e = new createjs.ColorMatrix; - e.adjustColor(d(b.brightness, -100, 100), 0, 0, 0); + e.adjustColor(d(a.brightness, -100, 100), 0, 0, 0); e = new createjs.ColorMatrixFilter(e); c.push(e); - b.hue = b.hue.mod(360); + a.hue = a.hue.mod(360); e = new createjs.ColorMatrix; - e.adjustColor(0, 0, 0, b.hue); + e.adjustColor(0, 0, 0, a.hue); e = new createjs.ColorMatrixFilter(e); c.push(e); - var e = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], f = 10.8 * b.hsv * Math.PI / 180, g = Math.cos(f), f = Math.sin(f), h = Math.abs(b.hsv / 100); + var e = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], f = 10.8 * a.hsv * Math.PI / 180, g = Math.cos(f), f = Math.sin(f), h = Math.abs(a.hsv / 100); 1 < h && (h -= Math.floor(h)); 0 < h && .33 >= h ? e = [1, 0, 0, 0, 0, 0, g, f, 0, 0, 0, -1 * f, g, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1] : .66 >= h ? e = [g, 0, f, 0, 0, 0, 1, 0, 0, 0, f, 0, g, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1] : .99 >= h && (e = [g, f, 0, 0, 0, -1 * f, g, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]); e = (new createjs.ColorMatrix).concat(e); e = new createjs.ColorMatrixFilter(e); c.push(e); - a.alpha = b.alpha = d(b.alpha, 0, 1); - a.filters = c; - a.cache(0, 0, this.getWidth(), this.getHeight()); + b.alpha = a.alpha = d(a.alpha, 0, 1); + b.filters = c; + b.cache(0, 0, this.getWidth(), this.getHeight()); }; Entry.EntityObject.prototype.resetFilter = function() { "sprite" == this.parent.objectType && (this.object.filters = [], this.setInitialEffectValue(), this.object.alpha = this.effect.alpha, this.object.cache(0, 0, this.getWidth(), this.getHeight())); @@ -7407,26 +7709,30 @@ Entry.EntityObject.prototype.removeClone = function() { this.dialog && this.dialog.remove(); this.brush && this.removeBrush(); Entry.stage.unloadEntity(this); - var a = this.parent.clonedEntities.indexOf(this); - this.parent.clonedEntities.splice(a, 1); + var b = this.parent.clonedEntities.indexOf(this); + this.parent.clonedEntities.splice(b, 1); + Entry.Utils.isFunction(this.clearExecutor) && this.clearExecutor(); } }; +Entry.EntityObject.prototype.clearExecutor = function() { + this.parent.script.clearExecutorsByEntity(this); +}; Entry.EntityObject.prototype.toJSON = function() { - var a = {}; - a.x = Entry.cutDecimal(this.getX()); - a.y = Entry.cutDecimal(this.getY()); - a.regX = Entry.cutDecimal(this.getRegX()); - a.regY = Entry.cutDecimal(this.getRegY()); - a.scaleX = this.getScaleX(); - a.scaleY = this.getScaleY(); - a.rotation = Entry.cutDecimal(this.getRotation()); - a.direction = Entry.cutDecimal(this.getDirection()); - a.width = Entry.cutDecimal(this.getWidth()); - a.height = Entry.cutDecimal(this.getHeight()); - a.font = this.getFont(); - a.visible = this.getVisible(); - "textBox" == this.parent.objectType && (a.colour = this.getColour(), a.text = this.getText(), a.textAlign = this.getTextAlign(), a.lineBreak = this.getLineBreak(), a.bgColor = this.getBGColour(), a.underLine = this.getUnderLine(), a.strike = this.getStrike(), a.fontSize = this.getFontSize()); - return a; + var b = {}; + b.x = Entry.cutDecimal(this.getX()); + b.y = Entry.cutDecimal(this.getY()); + b.regX = Entry.cutDecimal(this.getRegX()); + b.regY = Entry.cutDecimal(this.getRegY()); + b.scaleX = this.getScaleX(); + b.scaleY = this.getScaleY(); + b.rotation = Entry.cutDecimal(this.getRotation()); + b.direction = Entry.cutDecimal(this.getDirection()); + b.width = Entry.cutDecimal(this.getWidth()); + b.height = Entry.cutDecimal(this.getHeight()); + b.font = this.getFont(); + b.visible = this.getVisible(); + "textBox" == this.parent.objectType && (b.colour = this.getColour(), b.text = this.getText(), b.textAlign = this.getTextAlign(), b.lineBreak = this.getLineBreak(), b.bgColor = this.getBGColour(), b.underLine = this.getUnderLine(), b.strike = this.getStrike(), b.fontSize = this.getFontSize()); + return b; }; Entry.EntityObject.prototype.setInitialEffectValue = function() { this.effect = {blur:0, hue:0, hsv:0, brightness:0, contrast:0, saturation:0, alpha:1}; @@ -7438,43 +7744,43 @@ Entry.EntityObject.prototype.removeBrush = function() { Entry.EntityObject.prototype.updateBG = function() { if (this.bgObject) { this.bgObject.graphics.clear(); - var a = this.getWidth(), b = this.getHeight(); - this.bgObject.graphics.setStrokeStyle(1).beginStroke().beginFill(this.getBGColour()).drawRect(-a / 2, -b / 2, a, b); + var b = this.getWidth(), a = this.getHeight(); + this.bgObject.graphics.setStrokeStyle(1).beginStroke().beginFill(this.getBGColour()).drawRect(-b / 2, -a / 2, b, a); if (this.getLineBreak()) { this.bgObject.x = 0; } else { switch(this.getTextAlign()) { case Entry.TEXT_ALIGN_LEFT: - this.bgObject.x = a / 2; + this.bgObject.x = b / 2; break; case Entry.TEXT_ALIGN_CENTER: this.bgObject.x = 0; break; case Entry.TEXT_ALIGN_RIGHT: - this.bgObject.x = -a / 2; + this.bgObject.x = -b / 2; } } } }; Entry.EntityObject.prototype.alignTextBox = function() { if ("textBox" == this.type) { - var a = this.textObject; + var b = this.textObject; if (this.lineBreak) { - var b = a.getMeasuredLineHeight(); - a.y = b / 2 - this.getHeight() / 2; + var a = b.getMeasuredLineHeight(); + b.y = a / 2 - this.getHeight() / 2; switch(this.textAlign) { case Entry.TEXT_ALIGN_CENTER: - a.x = 0; + b.x = 0; break; case Entry.TEXT_ALIGN_LEFT: - a.x = -this.getWidth() / 2; + b.x = -this.getWidth() / 2; break; case Entry.TEXT_ALIGN_RIGHT: - a.x = this.getWidth() / 2; + b.x = this.getWidth() / 2; } - a.maxHeight = this.getHeight(); + b.maxHeight = this.getHeight(); } else { - a.x = 0, a.y = 0; + b.x = 0, b.y = 0; } } }; @@ -7482,55 +7788,83 @@ Entry.EntityObject.prototype.syncDialogVisible = function() { this.dialog && (this.dialog.object.visible = this.visible); }; Entry.Helper = function() { - this.generateView(); + this.visible = !1; }; p = Entry.Helper.prototype; -p.generateView = function() { - this.blockHelpData = EntryStatic.blockInfo; - var a = Entry.createElement("div", "entryBlockHelperWorkspace"); - this._view = a; - Entry.isForLecture && a.addClass("lecture"); - var b = Entry.createElement("div", "entryBlockHelperHeaderWorkspace"); - b.innerHTML = Lang.Helper.Block_info; - a.appendChild(b); - b = Entry.createElement("div", "entryBlockHelperContentWorkspace"); - b.addClass("entryBlockHelperIntro"); - Entry.isForLecture && b.addClass("lecture"); - a.appendChild(b); - this.blockHelperContent_ = b; - this.blockHelperView_ = a; - a = Entry.createElement("div", "entryBlockHelperBlockWorkspace"); - this.blockMenu_ = new Blockly.BlockMenu(a); - this.blockMenu_.isViewOnly = !0; - this.blockMenu_.isCenterAlign = !0; - this.blockHelperContent_.appendChild(a); - a = Entry.createElement("div", "entryBlockHelperDescriptionWorkspace"); - this.blockHelperContent_.appendChild(a); - a.innerHTML = Lang.Helper.Block_click_msg; - this.blockHelperDescription_ = a; - this.first = !0; +p.generateView = function(b, a) { + if (!this.parentView_) { + this.parentView_ = b; + this.blockHelpData = EntryStatic.blockInfo; + var c = Entry.createElement("div", "entryBlockHelperWorkspace"); + this.view = c; + Entry.isForLecture && c.addClass("lecture"); + this.parentView_.appendChild(c); + if (!Entry.isForLecture) { + var d = Entry.createElement("div", "entryBlockHelperHeaderWorkspace"); + d.innerHTML = Lang.Helper.Block_info; + c.appendChild(d); + } + d = Entry.createElement("div", "entryBlockHelperContentWorkspace"); + d.addClass("entryBlockHelperIntro"); + Entry.isForLecture && d.addClass("lecture"); + c.appendChild(d); + this.blockHelperContent_ = d; + this.blockHelperView_ = c; + c = Entry.createElement("div", "entryBlockHelperBlockWorkspace"); + this.blockHelperContent_.appendChild(c); + d = Entry.createElement("div", "entryBlockHelperDescriptionWorkspace"); + this.blockHelperContent_.appendChild(d); + d.innerHTML = Lang.Helper.Block_click_msg; + this.blockHelperDescription_ = d; + this._renderView = new Entry.RenderView($(c), "LEFT"); + this.code = new Entry.Code([]); + this._renderView.changeCode(this.code); + this.first = !0; + } +}; +p.bindWorkspace = function(b) { + b && (this._blockViewObserver && this._blockViewObserver.destroy(), this.workspace = b, this._blockViewObserver = b.observe(this, "_updateSelectedBlock", ["selectedBlockView"])); +}; +p._updateSelectedBlock = function() { + var b = this.workspace.selectedBlockView; + if (b && this.visible && b != this._blockView) { + var a = b.block.type; + this._blockView = b; + this.renderBlock(a); + } +}; +p.renderBlock = function(b) { + var a = Lang.Helper[b]; + if (b && this.visible && a && !Entry.block[b].isPrimitive) { + this.first && (this.blockHelperContent_.removeClass("entryBlockHelperIntro"), this.first = !1); + this.code.clear(); + var c = Entry.block[b].def, c = c || {type:b}; + this.code.createThread([c]); + this.code.board.align(); + this.code.board.resize(); + var c = this.code.getThreads()[0].getFirstBlock().view, d = c.svgGroup.getBBox(); + b = d.width; + d = d.height; + c = c.getSkeleton().box(c).offsetX; + isNaN(c) && (c = 0); + this.blockHelperDescription_.innerHTML = a; + this._renderView.align(); + $(this.blockHelperDescription_).css({top:d + 30}); + this._renderView.svgDom.css({"margin-left":-(b / 2) - 20 - c}); + } }; p.getView = function() { - this.bindEvent(); - return this._view; -}; -p.bindEvent = function() { - this.blockChangeEvent || (this.blockChangeEvent = Blockly.bindEvent_(Blockly.mainWorkspace.getCanvas(), "blocklySelectChange", this, this.updateSelectedBlock), Entry.playground.blockMenu && (this.menuBlockChangeEvent = Blockly.bindEvent_(Entry.playground.blockMenu.workspace_.getCanvas(), "blocklySelectChange", this, this.updateSelectedBlock))); -}; -p.updateSelectedBlock = function() { - Blockly.selected && (this.first && (this.blockHelperContent_.removeClass("entryBlockHelperIntro"), this.first = !1), this.renderBlock(Blockly.selected.type)); + return this.view; }; -p.renderBlock = function(a) { - var b = this.blockHelpData[a]; - b && (b = jQuery.parseXML(b.xml), b = this.blockMenu_.show(b.childNodes), this.blockHelperDescription_.innerHTML = Entry.makeAutolink(Lang.Helper[a]), $(this.blockHelperDescription_).css({top:b + 40})); +p.resize = function() { }; -Entry.Activity = function(a, b) { - this.name = a; +Entry.Activity = function(b, a) { + this.name = b; this.timestamp = new Date; var c = []; - if (void 0 !== b) { - for (var d = 0, e = b.length;d < e;d++) { - var f = b[d]; + if (void 0 !== a) { + for (var d = 0, e = a.length;d < e;d++) { + var f = a[d]; c.push({key:f[0], value:f[1]}); } } @@ -7539,124 +7873,239 @@ Entry.Activity = function(a, b) { Entry.ActivityReporter = function() { this._activities = []; }; -(function(a) { - a.add = function(b) { - if (!(b instanceof Entry.Activity)) { +(function(b) { + b.add = function(a) { + if (!(a instanceof Entry.Activity)) { return console.error("Activity must be an instanceof Entry.MazeActivity"); } - this._activities.push(b); + this._activities.push(a); }; - a.clear = function() { + b.clear = function() { this._activities = []; }; - a.get = function() { + b.get = function() { return this._activities; }; })(Entry.ActivityReporter.prototype); -Entry.EntryObject = function(a) { - if (a) { - this.id = a.id; - this.name = a.name || a.sprite.name; - this.text = a.text || this.name; - this.objectType = a.objectType; - this.objectType || (this.objectType = "sprite"); - this.script = a.script ? Blockly.Xml.textToDom(a.script) : Blockly.Xml.textToDom(""); - this.pictures = a.sprite.pictures; - this.sounds = []; - this.sounds = a.sprite.sounds; - for (var b = 0;b < this.sounds.length;b++) { - this.sounds[b].id || (this.sounds[b].id = Entry.generateHash()), Entry.initSound(this.sounds[b]); - } - this.lock = a.lock ? a.lock : !1; - this.isEditing = !1; - "sprite" == this.objectType && (this.selectedPicture = a.selectedPictureId ? this.getPicture(a.selectedPictureId) : this.pictures[0]); - this.scene = Entry.scene.getSceneById(a.scene) || Entry.scene.selectedScene; - this.setRotateMethod(a.rotateMethod); - this.entity = new Entry.EntityObject(this); - this.entity.injectModel(this.selectedPicture ? this.selectedPicture : null, a.entity ? a.entity : this.initEntity(a)); - this.clonedEntities = []; - Entry.stage.loadObject(this); - for (b in this.pictures) { - var c = this.pictures[b]; - c.id || (c.id = Entry.generateHash()); - var d = new Image; - c.fileurl ? d.src = c.fileurl : c.fileurl ? d.src = c.fileurl : (a = c.filename, d.src = Entry.defaultPath + "/uploads/" + a.substring(0, 2) + "/" + a.substring(2, 4) + "/image/" + a + ".png"); - d.onload = function(b) { - Entry.container.cachePicture(c.id, d); - }; - } - } +Entry.State = function(b, a, c, d) { + this.caller = a; + this.func = c; + 3 < arguments.length && (this.params = Array.prototype.slice.call(arguments).slice(3)); + this.message = b; + this.time = Entry.getUpTime(); + this.isPass = Entry.Command[b] ? Entry.Command[b].isPass : !1; +}; +Entry.State.prototype.generateMessage = function() { +}; +Entry.StateManager = function() { + this.undoStack_ = []; + this.redoStack_ = []; + this.isIgnore = this.isRestore = !1; + Entry.addEventListener("cancelLastCommand", function(b) { + Entry.stateManager.cancelLastCommand(); + }); + Entry.addEventListener("run", function(b) { + Entry.stateManager.updateView(); + }); + Entry.addEventListener("stop", function(b) { + Entry.stateManager.updateView(); + }); + Entry.addEventListener("saveWorkspace", function(b) { + Entry.stateManager.addStamp(); + }); + Entry.addEventListener("undo", function(b) { + Entry.stateManager.undo(); + }); + Entry.addEventListener("redo", function(b) { + Entry.stateManager.redo(); + }); +}; +Entry.StateManager.prototype.generateView = function(b, a) { +}; +Entry.StateManager.prototype.addCommand = function(b, a, c, d) { + if (!this.isIgnoring()) { + if (this.isRestoring()) { + var e = new Entry.State, f = Array.prototype.slice.call(arguments); + Entry.State.prototype.constructor.apply(e, f); + this.redoStack_.push(e); + Entry.reporter && Entry.reporter.report(e); + } else { + e = new Entry.State, f = Array.prototype.slice.call(arguments), Entry.State.prototype.constructor.apply(e, f), this.undoStack_.push(e), Entry.reporter && Entry.reporter.report(e), this.updateView(); + } + Entry.creationChangedEvent && Entry.creationChangedEvent.notify(); + } +}; +Entry.StateManager.prototype.cancelLastCommand = function() { + this.canUndo() && (this.undoStack_.pop(), this.updateView(), Entry.creationChangedEvent && Entry.creationChangedEvent.notify()); +}; +Entry.StateManager.prototype.getLastCommand = function() { + return this.undoStack_[this.undoStack_.length - 1]; +}; +Entry.StateManager.prototype.undo = function() { + if (this.canUndo() && !this.isRestoring()) { + this.addActivity("undo"); + for (this.startRestore();this.undoStack_.length;) { + var b = this.undoStack_.pop(); + b.func.apply(b.caller, b.params); + if (!0 !== b.isPass) { + break; + } + } + this.updateView(); + this.endRestore(); + Entry.creationChangedEvent && Entry.creationChangedEvent.notify(); + } +}; +Entry.StateManager.prototype.redo = function() { + if (this.canRedo() && !this.isRestoring()) { + this.addActivity("redo"); + var b = this.redoStack_.pop(); + b.func.apply(b.caller, b.params); + this.updateView(); + Entry.creationChangedEvent && Entry.creationChangedEvent.notify(); + } +}; +Entry.StateManager.prototype.updateView = function() { + this.undoButton && this.redoButton && (this.canUndo() ? this.undoButton.addClass("active") : this.undoButton.removeClass("active"), this.canRedo() ? this.redoButton.addClass("active") : this.redoButton.removeClass("active")); +}; +Entry.StateManager.prototype.startRestore = function() { + this.isRestore = !0; +}; +Entry.StateManager.prototype.endRestore = function() { + this.isRestore = !1; +}; +Entry.StateManager.prototype.isRestoring = function() { + return this.isRestore; +}; +Entry.StateManager.prototype.startIgnore = function() { + this.isIgnore = !0; +}; +Entry.StateManager.prototype.endIgnore = function() { + this.isIgnore = !1; +}; +Entry.StateManager.prototype.isIgnoring = function() { + return this.isIgnore; +}; +Entry.StateManager.prototype.canUndo = function() { + return 0 < this.undoStack_.length && Entry.engine.isState("stop"); +}; +Entry.StateManager.prototype.canRedo = function() { + return 0 < this.redoStack_.length && Entry.engine.isState("stop"); +}; +Entry.StateManager.prototype.addStamp = function() { + this.stamp = Entry.generateHash(); + this.undoStack_.length && (this.undoStack_[this.undoStack_.length - 1].stamp = this.stamp); +}; +Entry.StateManager.prototype.isSaved = function() { + return 0 === this.undoStack_.length || this.undoStack_[this.undoStack_.length - 1].stamp == this.stamp && "string" == typeof this.stamp; +}; +Entry.StateManager.prototype.addActivity = function(b) { + Entry.reporter && Entry.reporter.report(new Entry.State(b)); +}; +Entry.EntryObject = function(b) { + if (b) { + this.id = b.id; + this.name = b.name || b.sprite.name; + this.text = b.text || this.name; + this.objectType = b.objectType; + this.objectType || (this.objectType = "sprite"); + this.script = new Entry.Code(b.script ? b.script : [], this); + this.pictures = b.sprite.pictures; + this.sounds = []; + this.sounds = b.sprite.sounds; + for (var a = 0;a < this.sounds.length;a++) { + this.sounds[a].id || (this.sounds[a].id = Entry.generateHash()), Entry.initSound(this.sounds[a]); + } + this.lock = b.lock ? b.lock : !1; + this.isEditing = !1; + "sprite" == this.objectType && (this.selectedPicture = b.selectedPictureId ? this.getPicture(b.selectedPictureId) : this.pictures[0]); + this.scene = Entry.scene.getSceneById(b.scene) || Entry.scene.selectedScene; + this.setRotateMethod(b.rotateMethod); + this.entity = new Entry.EntityObject(this); + this.entity.injectModel(this.selectedPicture ? this.selectedPicture : null, b.entity ? b.entity : this.initEntity(b)); + this.clonedEntities = []; + Entry.stage.loadObject(this); + for (a in this.pictures) { + var c = this.pictures[a]; + c.id || (c.id = Entry.generateHash()); + var d = new Image; + c.fileurl ? d.src = c.fileurl : c.fileurl ? d.src = c.fileurl : (b = c.filename, d.src = Entry.defaultPath + "/uploads/" + b.substring(0, 2) + "/" + b.substring(2, 4) + "/image/" + b + ".png"); + d.onload = function(a) { + Entry.container.cachePicture(c.id, d); + }; + } + } }; Entry.EntryObject.prototype.generateView = function() { if ("workspace" == Entry.type) { - var a = Entry.createElement("li", this.id); - a.addClass("entryContainerListElementWorkspace"); - a.object = this; - a.bindOnClick(function(b) { + var b = Entry.createElement("li", this.id); + b.addClass("entryContainerListElementWorkspace"); + b.object = this; + b.bindOnClick(function(a) { Entry.container.getObject(this.id) && Entry.container.selectObject(this.id); }); - Entry.Utils.disableContextmenu(a); - var b = this; - $(a).on("contextmenu", function(a) { - Entry.ContextMenu.show([{text:Lang.Workspace.context_rename, callback:function(a) { - a.stopPropagation(); - a = b; - a.setLock(!1); - a.editObjectValues(!0); - a.nameView_.select(); + Entry.Utils.disableContextmenu(b); + var a = this; + $(b).on("contextmenu", function(b) { + Entry.ContextMenu.show([{text:Lang.Workspace.context_rename, callback:function(b) { + b.stopPropagation(); + b = a; + b.setLock(!1); + b.editObjectValues(!0); + b.nameView_.select(); }}, {text:Lang.Workspace.context_duplicate, callback:function() { - Entry.container.addCloneObject(b); + Entry.container.addCloneObject(a); }}, {text:Lang.Workspace.context_remove, callback:function() { - Entry.container.removeObject(b); + Entry.container.removeObject(a); }}, {text:Lang.Workspace.copy_file, callback:function() { - Entry.container.setCopiedObject(b); + Entry.container.setCopiedObject(a); }}, {text:Lang.Blocks.Paste_blocks, callback:function() { Entry.container.copiedObject ? Entry.container.addCloneObject(Entry.container.copiedObject) : Entry.toast.alert(Lang.Workspace.add_object_alert, Lang.Workspace.object_not_found_for_paste); }}], "workspace-contextmenu"); }); - this.view_ = a; - var c = this, a = Entry.createElement("ul"); - a.addClass("objectInfoView"); - Entry.objectEditable || a.addClass("entryHide"); + this.view_ = b; + var c = this, b = Entry.createElement("ul"); + b.addClass("objectInfoView"); + Entry.objectEditable || b.addClass("entryHide"); var d = Entry.createElement("li"); d.addClass("objectInfo_visible"); this.entity.getVisible() || d.addClass("objectInfo_unvisible"); - d.bindOnClick(function(b) { - Entry.engine.isState("run") || (b = c.entity, b.setVisible(!b.getVisible()) ? this.removeClass("objectInfo_unvisible") : this.addClass("objectInfo_unvisible")); + d.bindOnClick(function(a) { + Entry.engine.isState("run") || (a = c.entity, a.setVisible(!a.getVisible()) ? this.removeClass("objectInfo_unvisible") : this.addClass("objectInfo_unvisible")); }); var e = Entry.createElement("li"); e.addClass("objectInfo_unlock"); this.getLock() && e.addClass("objectInfo_lock"); - e.bindOnClick(function(b) { - Entry.engine.isState("run") || (b = c, b.setLock(!b.getLock()) ? this.addClass("objectInfo_lock") : this.removeClass("objectInfo_lock"), b.updateInputViews(b.getLock())); + e.bindOnClick(function(a) { + Entry.engine.isState("run") || (a = c, a.setLock(!a.getLock()) ? this.addClass("objectInfo_lock") : this.removeClass("objectInfo_lock"), a.updateInputViews(a.getLock())); }); - a.appendChild(d); - a.appendChild(e); - this.view_.appendChild(a); - a = Entry.createElement("div"); - a.addClass("entryObjectThumbnailWorkspace"); - this.view_.appendChild(a); - this.thumbnailView_ = a; - a = Entry.createElement("div"); - a.addClass("entryObjectWrapperWorkspace"); - this.view_.appendChild(a); + b.appendChild(d); + b.appendChild(e); + this.view_.appendChild(b); + b = Entry.createElement("div"); + b.addClass("entryObjectThumbnailWorkspace"); + this.view_.appendChild(b); + this.thumbnailView_ = b; + b = Entry.createElement("div"); + b.addClass("entryObjectWrapperWorkspace"); + this.view_.appendChild(b); d = Entry.createElement("input"); - d.bindOnClick(function(b) { - b.stopPropagation(); + d.bindOnClick(function(a) { + a.stopPropagation(); this.select(); }); d.addClass("entryObjectNameWorkspace"); - a.appendChild(d); + b.appendChild(d); this.nameView_ = d; this.nameView_.entryObject = this; d.setAttribute("readonly", !0); var f = this; - this.nameView_.onblur = function(b) { + this.nameView_.onblur = function(a) { this.entryObject.name = this.value; Entry.playground.reloadPlayground(); }; - this.nameView_.onkeypress = function(b) { - 13 == b.keyCode && f.editObjectValues(!1); + this.nameView_.onkeypress = function(a) { + 13 == a.keyCode && f.editObjectValues(!1); }; this.nameView_.value = this.name; d = Entry.createElement("div"); @@ -7664,38 +8113,38 @@ Entry.EntryObject.prototype.generateView = function() { d.object = this; this.editView_ = d; this.view_.appendChild(d); - Entry.objectEditable ? ($(d).mousedown(function(a) { - var c = b.isEditing; - a.stopPropagation(); - Entry.documentMousedown.notify(a); - Entry.engine.isState("run") || !1 !== c || (b.editObjectValues(!c), Entry.playground.object !== b && Entry.container.selectObject(b.id), b.nameView_.select()); - }), d.blur = function(a) { - b.editObjectComplete(); + Entry.objectEditable ? ($(d).mousedown(function(b) { + var c = a.isEditing; + b.stopPropagation(); + Entry.documentMousedown.notify(b); + Entry.engine.isState("run") || !1 !== c || (a.editObjectValues(!c), Entry.playground.object !== a && Entry.container.selectObject(a.id), a.nameView_.select()); + }), d.blur = function(b) { + a.editObjectComplete(); }) : d.addClass("entryRemove"); - Entry.objectEditable && Entry.objectDeletable && (d = Entry.createElement("div"), d.addClass("entryObjectDeleteWorkspace"), d.object = this, this.deleteView_ = d, this.view_.appendChild(d), d.bindOnClick(function(b) { + Entry.objectEditable && Entry.objectDeletable && (d = Entry.createElement("div"), d.addClass("entryObjectDeleteWorkspace"), d.object = this, this.deleteView_ = d, this.view_.appendChild(d), d.bindOnClick(function(a) { Entry.engine.isState("run") || Entry.container.removeObject(this.object); })); d = Entry.createElement("div"); d.addClass("entryObjectInformationWorkspace"); d.object = this; this.isInformationToggle = !1; - a.appendChild(d); + b.appendChild(d); this.informationView_ = d; - a = Entry.createElement("div"); - a.addClass("entryObjectRotationWrapperWorkspace"); - a.object = this; - this.view_.appendChild(a); + b = Entry.createElement("div"); + b.addClass("entryObjectRotationWrapperWorkspace"); + b.object = this; + this.view_.appendChild(b); d = Entry.createElement("span"); d.addClass("entryObjectCoordinateWorkspace"); - a.appendChild(d); + b.appendChild(d); e = Entry.createElement("span"); e.addClass("entryObjectCoordinateSpanWorkspace"); e.innerHTML = "X:"; var g = Entry.createElement("input"); g.addClass("entryObjectCoordinateInputWorkspace"); g.setAttribute("readonly", !0); - g.bindOnClick(function(b) { - b.stopPropagation(); + g.bindOnClick(function(a) { + a.stopPropagation(); this.select(); }); var h = Entry.createElement("span"); @@ -7703,53 +8152,53 @@ Entry.EntryObject.prototype.generateView = function() { h.innerHTML = "Y:"; var k = Entry.createElement("input"); k.addClass("entryObjectCoordinateInputWorkspace entryObjectCoordinateInputWorkspace_right"); - k.bindOnClick(function(b) { - b.stopPropagation(); + k.bindOnClick(function(a) { + a.stopPropagation(); this.select(); }); k.setAttribute("readonly", !0); var l = Entry.createElement("span"); l.addClass("entryObjectCoordinateSizeWorkspace"); l.innerHTML = Lang.Workspace.Size + " : "; - var q = Entry.createElement("input"); - q.addClass("entryObjectCoordinateInputWorkspace", "entryObjectCoordinateInputWorkspace_size"); - q.bindOnClick(function(b) { - b.stopPropagation(); + var n = Entry.createElement("input"); + n.addClass("entryObjectCoordinateInputWorkspace", "entryObjectCoordinateInputWorkspace_size"); + n.bindOnClick(function(a) { + a.stopPropagation(); this.select(); }); - q.setAttribute("readonly", !0); + n.setAttribute("readonly", !0); d.appendChild(e); d.appendChild(g); d.appendChild(h); d.appendChild(k); d.appendChild(l); - d.appendChild(q); + d.appendChild(n); d.xInput_ = g; d.yInput_ = k; - d.sizeInput_ = q; + d.sizeInput_ = n; this.coordinateView_ = d; c = this; - g.onkeypress = function(b) { - 13 == b.keyCode && c.editObjectValues(!1); + g.onkeypress = function(a) { + 13 == a.keyCode && c.editObjectValues(!1); }; - g.onblur = function(b) { - isNaN(g.value) || c.entity.setX(+g.value); + g.onblur = function(a) { + isNaN(g.value) || c.entity.setX(Number(g.value)); c.updateCoordinateView(); Entry.stage.updateObject(); }; - k.onkeypress = function(b) { - 13 == b.keyCode && c.editObjectValues(!1); + k.onkeypress = function(a) { + 13 == a.keyCode && c.editObjectValues(!1); }; - k.onblur = function(b) { - isNaN(k.value) || c.entity.setY(+k.value); + k.onblur = function(a) { + isNaN(k.value) || c.entity.setY(Number(k.value)); c.updateCoordinateView(); Entry.stage.updateObject(); }; - q.onkeypress = function(b) { - 13 == b.keyCode && c.editObjectValues(!1); + n.onkeypress = function(a) { + 13 == a.keyCode && c.editObjectValues(!1); }; - q.onblur = function(b) { - isNaN(q.value) || c.entity.setSize(+q.value); + n.onblur = function(a) { + isNaN(n.value) || c.entity.setSize(Number(n.value)); c.updateCoordinateView(); Entry.stage.updateObject(); }; @@ -7760,86 +8209,86 @@ Entry.EntryObject.prototype.generateView = function() { e = Entry.createElement("span"); e.addClass("entryObjectRotateSpanWorkspace"); e.innerHTML = Lang.Workspace.rotation + " : "; - var n = Entry.createElement("input"); - n.addClass("entryObjectRotateInputWorkspace"); - n.setAttribute("readonly", !0); - n.bindOnClick(function(b) { - b.stopPropagation(); + var m = Entry.createElement("input"); + m.addClass("entryObjectRotateInputWorkspace"); + m.setAttribute("readonly", !0); + m.bindOnClick(function(a) { + a.stopPropagation(); this.select(); }); this.rotateSpan_ = e; - this.rotateInput_ = n; + this.rotateInput_ = m; h = Entry.createElement("span"); h.addClass("entryObjectDirectionSpanWorkspace"); h.innerHTML = Lang.Workspace.direction + " : "; - var m = Entry.createElement("input"); - m.addClass("entryObjectDirectionInputWorkspace"); - m.setAttribute("readonly", !0); - m.bindOnClick(function(b) { - b.stopPropagation(); + var q = Entry.createElement("input"); + q.addClass("entryObjectDirectionInputWorkspace"); + q.setAttribute("readonly", !0); + q.bindOnClick(function(a) { + a.stopPropagation(); this.select(); }); - this.directionInput_ = m; + this.directionInput_ = q; d.appendChild(e); - d.appendChild(n); - d.appendChild(h); d.appendChild(m); - d.rotateInput_ = n; - d.directionInput_ = m; + d.appendChild(h); + d.appendChild(q); + d.rotateInput_ = m; + d.directionInput_ = q; c = this; - n.onkeypress = function(b) { - 13 == b.keyCode && c.editObjectValues(!1); + m.onkeypress = function(a) { + 13 == a.keyCode && c.editObjectValues(!1); }; - n.onblur = function(b) { - b = n.value; - -1 != b.indexOf("\u02da") && (b = b.substring(0, b.indexOf("\u02da"))); - isNaN(b) || c.entity.setRotation(+b); + m.onblur = function(a) { + a = m.value; + -1 != a.indexOf("\u02da") && (a = a.substring(0, a.indexOf("\u02da"))); + isNaN(a) || c.entity.setRotation(Number(a)); c.updateRotationView(); Entry.stage.updateObject(); }; - m.onkeypress = function(b) { - 13 == b.keyCode && c.editObjectValues(!1); + q.onkeypress = function(a) { + 13 == a.keyCode && c.editObjectValues(!1); }; - m.onblur = function(b) { - b = m.value; - -1 != b.indexOf("\u02da") && (b = b.substring(0, b.indexOf("\u02da"))); - isNaN(b) || c.entity.setDirection(+b); + q.onblur = function(a) { + a = q.value; + -1 != a.indexOf("\u02da") && (a = a.substring(0, a.indexOf("\u02da"))); + isNaN(a) || c.entity.setDirection(Number(a)); c.updateRotationView(); Entry.stage.updateObject(); }; d = Entry.createElement("div"); d.addClass("rotationMethodWrapper"); - a.appendChild(d); + b.appendChild(d); this.rotationMethodWrapper_ = d; - a = Entry.createElement("span"); - a.addClass("entryObjectRotateMethodLabelWorkspace"); - d.appendChild(a); - a.innerHTML = Lang.Workspace.rotate_method + " : "; - a = Entry.createElement("div"); - a.addClass("entryObjectRotateModeWorkspace"); - a.addClass("entryObjectRotateModeAWorkspace"); - a.object = this; - this.rotateModeAView_ = a; - d.appendChild(a); - a.bindOnClick(function(b) { + b = Entry.createElement("span"); + b.addClass("entryObjectRotateMethodLabelWorkspace"); + d.appendChild(b); + b.innerHTML = Lang.Workspace.rotate_method + " : "; + b = Entry.createElement("div"); + b.addClass("entryObjectRotateModeWorkspace"); + b.addClass("entryObjectRotateModeAWorkspace"); + b.object = this; + this.rotateModeAView_ = b; + d.appendChild(b); + b.bindOnClick(function(a) { Entry.engine.isState("run") || this.object.getLock() || (this.object.initRotateValue("free"), this.object.setRotateMethod("free")); }); - a = Entry.createElement("div"); - a.addClass("entryObjectRotateModeWorkspace"); - a.addClass("entryObjectRotateModeBWorkspace"); - a.object = this; - this.rotateModeBView_ = a; - d.appendChild(a); - a.bindOnClick(function(b) { + b = Entry.createElement("div"); + b.addClass("entryObjectRotateModeWorkspace"); + b.addClass("entryObjectRotateModeBWorkspace"); + b.object = this; + this.rotateModeBView_ = b; + d.appendChild(b); + b.bindOnClick(function(a) { Entry.engine.isState("run") || this.object.getLock() || (this.object.initRotateValue("vertical"), this.object.setRotateMethod("vertical")); }); - a = Entry.createElement("div"); - a.addClass("entryObjectRotateModeWorkspace"); - a.addClass("entryObjectRotateModeCWorkspace"); - a.object = this; - this.rotateModeCView_ = a; - d.appendChild(a); - a.bindOnClick(function(b) { + b = Entry.createElement("div"); + b.addClass("entryObjectRotateModeWorkspace"); + b.addClass("entryObjectRotateModeCWorkspace"); + b.object = this; + this.rotateModeCView_ = b; + d.appendChild(b); + b.bindOnClick(function(a) { Entry.engine.isState("run") || this.object.getLock() || (this.object.initRotateValue("none"), this.object.setRotateMethod("none")); }); this.updateThumbnailView(); @@ -7851,255 +8300,251 @@ Entry.EntryObject.prototype.generateView = function() { return this.view_; } if ("phone" == Entry.type) { - return a = Entry.createElement("li", this.id), a.addClass("entryContainerListElementWorkspace"), a.object = this, a.bindOnClick(function(b) { + return b = Entry.createElement("li", this.id), b.addClass("entryContainerListElementWorkspace"), b.object = this, b.bindOnClick(function(a) { Entry.container.getObject(this.id) && Entry.container.selectObject(this.id); - }), $ && (b = this, context.attach("#" + this.id, [{text:Lang.Workspace.context_rename, href:"/", action:function(b) { - b.preventDefault(); - }}, {text:Lang.Workspace.context_duplicate, href:"/", action:function(a) { - a.preventDefault(); - Entry.container.addCloneObject(b); - }}, {text:Lang.Workspace.context_remove, href:"/", action:function(a) { + }), $ && (a = this, context.attach("#" + this.id, [{text:Lang.Workspace.context_rename, href:"/", action:function(a) { a.preventDefault(); - Entry.container.removeObject(b); - }}])), this.view_ = a, a = Entry.createElement("ul"), a.addClass("objectInfoView"), d = Entry.createElement("li"), d.addClass("objectInfo_visible"), e = Entry.createElement("li"), e.addClass("objectInfo_lock"), a.appendChild(d), a.appendChild(e), this.view_.appendChild(a), a = Entry.createElement("div"), a.addClass("entryObjectThumbnailWorkspace"), this.view_.appendChild(a), this.thumbnailView_ = a, a = Entry.createElement("div"), a.addClass("entryObjectWrapperWorkspace"), this.view_.appendChild(a), - d = Entry.createElement("input"), d.addClass("entryObjectNameWorkspace"), a.appendChild(d), this.nameView_ = d, this.nameView_.entryObject = this, this.nameView_.onblur = function() { + }}, {text:Lang.Workspace.context_duplicate, href:"/", action:function(b) { + b.preventDefault(); + Entry.container.addCloneObject(a); + }}, {text:Lang.Workspace.context_remove, href:"/", action:function(b) { + b.preventDefault(); + Entry.container.removeObject(a); + }}])), this.view_ = b, b = Entry.createElement("ul"), b.addClass("objectInfoView"), d = Entry.createElement("li"), d.addClass("objectInfo_visible"), e = Entry.createElement("li"), e.addClass("objectInfo_lock"), b.appendChild(d), b.appendChild(e), this.view_.appendChild(b), b = Entry.createElement("div"), b.addClass("entryObjectThumbnailWorkspace"), this.view_.appendChild(b), this.thumbnailView_ = b, b = Entry.createElement("div"), b.addClass("entryObjectWrapperWorkspace"), this.view_.appendChild(b), + d = Entry.createElement("input"), d.addClass("entryObjectNameWorkspace"), b.appendChild(d), this.nameView_ = d, this.nameView_.entryObject = this, this.nameView_.onblur = function() { this.entryObject.name = this.value; Entry.playground.reloadPlayground(); - }, this.nameView_.onkeypress = function(b) { - 13 == b.keyCode && c.editObjectValues(!1); - }, this.nameView_.value = this.name, Entry.objectEditable && Entry.objectDeletable && (d = Entry.createElement("div"), d.addClass("entryObjectDeletePhone"), d.object = this, this.deleteView_ = d, this.view_.appendChild(d), d.bindOnClick(function(b) { + }, this.nameView_.onkeypress = function(a) { + 13 == a.keyCode && c.editObjectValues(!1); + }, this.nameView_.value = this.name, Entry.objectEditable && Entry.objectDeletable && (d = Entry.createElement("div"), d.addClass("entryObjectDeletePhone"), d.object = this, this.deleteView_ = d, this.view_.appendChild(d), d.bindOnClick(function(a) { Entry.engine.isState("run") || Entry.container.removeObject(this.object); - })), d = Entry.createElement("button"), d.addClass("entryObjectEditPhone"), d.object = this, d.bindOnClick(function(b) { - if (b = Entry.container.getObject(this.id)) { - Entry.container.selectObject(b.id), Entry.playground.injectObject(b); + })), d = Entry.createElement("button"), d.addClass("entryObjectEditPhone"), d.object = this, d.bindOnClick(function(a) { + if (a = Entry.container.getObject(this.id)) { + Entry.container.selectObject(a.id), Entry.playground.injectObject(a); } - }), this.view_.appendChild(d), d = Entry.createElement("div"), d.addClass("entryObjectInformationWorkspace"), d.object = this, this.isInformationToggle = !1, a.appendChild(d), this.informationView_ = d, d = Entry.createElement("div"), d.addClass("entryObjectRotateLabelWrapperWorkspace"), this.view_.appendChild(d), this.rotateLabelWrapperView_ = d, e = Entry.createElement("span"), e.addClass("entryObjectRotateSpanWorkspace"), e.innerHTML = Lang.Workspace.rotation + " : ", n = Entry.createElement("input"), - n.addClass("entryObjectRotateInputWorkspace"), this.rotateSpan_ = e, this.rotateInput_ = n, h = Entry.createElement("span"), h.addClass("entryObjectDirectionSpanWorkspace"), h.innerHTML = Lang.Workspace.direction + " : ", m = Entry.createElement("input"), m.addClass("entryObjectDirectionInputWorkspace"), this.directionInput_ = m, d.appendChild(e), d.appendChild(n), d.appendChild(h), d.appendChild(m), d.rotateInput_ = n, d.directionInput_ = m, c = this, n.onkeypress = function(b) { - 13 == b.keyCode && (b = n.value, -1 != b.indexOf("\u02da") && (b = b.substring(0, b.indexOf("\u02da"))), isNaN(b) || c.entity.setRotation(+b), c.updateRotationView(), n.blur()); - }, n.onblur = function(b) { + }), this.view_.appendChild(d), d = Entry.createElement("div"), d.addClass("entryObjectInformationWorkspace"), d.object = this, this.isInformationToggle = !1, b.appendChild(d), this.informationView_ = d, d = Entry.createElement("div"), d.addClass("entryObjectRotateLabelWrapperWorkspace"), this.view_.appendChild(d), this.rotateLabelWrapperView_ = d, e = Entry.createElement("span"), e.addClass("entryObjectRotateSpanWorkspace"), e.innerHTML = Lang.Workspace.rotation + " : ", m = Entry.createElement("input"), + m.addClass("entryObjectRotateInputWorkspace"), this.rotateSpan_ = e, this.rotateInput_ = m, h = Entry.createElement("span"), h.addClass("entryObjectDirectionSpanWorkspace"), h.innerHTML = Lang.Workspace.direction + " : ", q = Entry.createElement("input"), q.addClass("entryObjectDirectionInputWorkspace"), this.directionInput_ = q, d.appendChild(e), d.appendChild(m), d.appendChild(h), d.appendChild(q), d.rotateInput_ = m, d.directionInput_ = q, c = this, m.onkeypress = function(a) { + 13 == a.keyCode && (a = m.value, -1 != a.indexOf("\u02da") && (a = a.substring(0, a.indexOf("\u02da"))), isNaN(a) || c.entity.setRotation(Number(a)), c.updateRotationView(), m.blur()); + }, m.onblur = function(a) { c.entity.setRotation(c.entity.getRotation()); Entry.stage.updateObject(); - }, m.onkeypress = function(b) { - 13 == b.keyCode && (b = m.value, -1 != b.indexOf("\u02da") && (b = b.substring(0, b.indexOf("\u02da"))), isNaN(b) || c.entity.setDirection(+b), c.updateRotationView(), m.blur()); - }, m.onblur = function(b) { + }, q.onkeypress = function(a) { + 13 == a.keyCode && (a = q.value, -1 != a.indexOf("\u02da") && (a = a.substring(0, a.indexOf("\u02da"))), isNaN(a) || c.entity.setDirection(Number(a)), c.updateRotationView(), q.blur()); + }, q.onblur = function(a) { c.entity.setDirection(c.entity.getDirection()); Entry.stage.updateObject(); - }, a = Entry.createElement("div"), a.addClass("entryObjectRotationWrapperWorkspace"), a.object = this, this.view_.appendChild(a), d = Entry.createElement("span"), d.addClass("entryObjectCoordinateWorkspace"), a.appendChild(d), e = Entry.createElement("span"), e.addClass("entryObjectCoordinateSpanWorkspace"), e.innerHTML = "X:", g = Entry.createElement("input"), g.addClass("entryObjectCoordinateInputWorkspace"), h = Entry.createElement("span"), h.addClass("entryObjectCoordinateSpanWorkspace"), - h.innerHTML = "Y:", k = Entry.createElement("input"), k.addClass("entryObjectCoordinateInputWorkspace entryObjectCoordinateInputWorkspace_right"), l = Entry.createElement("span"), l.addClass("entryObjectCoordinateSpanWorkspace"), l.innerHTML = Lang.Workspace.Size, q = Entry.createElement("input"), q.addClass("entryObjectCoordinateInputWorkspace", "entryObjectCoordinateInputWorkspace_size"), d.appendChild(e), d.appendChild(g), d.appendChild(h), d.appendChild(k), d.appendChild(l), d.appendChild(q), - d.xInput_ = g, d.yInput_ = k, d.sizeInput_ = q, this.coordinateView_ = d, c = this, g.onkeypress = function(b) { - 13 == b.keyCode && (isNaN(g.value) || c.entity.setX(+g.value), c.updateCoordinateView(), c.blur()); - }, g.onblur = function(b) { + }, b = Entry.createElement("div"), b.addClass("entryObjectRotationWrapperWorkspace"), b.object = this, this.view_.appendChild(b), d = Entry.createElement("span"), d.addClass("entryObjectCoordinateWorkspace"), b.appendChild(d), e = Entry.createElement("span"), e.addClass("entryObjectCoordinateSpanWorkspace"), e.innerHTML = "X:", g = Entry.createElement("input"), g.addClass("entryObjectCoordinateInputWorkspace"), h = Entry.createElement("span"), h.addClass("entryObjectCoordinateSpanWorkspace"), + h.innerHTML = "Y:", k = Entry.createElement("input"), k.addClass("entryObjectCoordinateInputWorkspace entryObjectCoordinateInputWorkspace_right"), l = Entry.createElement("span"), l.addClass("entryObjectCoordinateSpanWorkspace"), l.innerHTML = Lang.Workspace.Size, n = Entry.createElement("input"), n.addClass("entryObjectCoordinateInputWorkspace", "entryObjectCoordinateInputWorkspace_size"), d.appendChild(e), d.appendChild(g), d.appendChild(h), d.appendChild(k), d.appendChild(l), d.appendChild(n), + d.xInput_ = g, d.yInput_ = k, d.sizeInput_ = n, this.coordinateView_ = d, c = this, g.onkeypress = function(a) { + 13 == a.keyCode && (isNaN(g.value) || c.entity.setX(Number(g.value)), c.updateCoordinateView(), c.blur()); + }, g.onblur = function(a) { c.entity.setX(c.entity.getX()); Entry.stage.updateObject(); - }, k.onkeypress = function(b) { - 13 == b.keyCode && (isNaN(k.value) || c.entity.setY(+k.value), c.updateCoordinateView(), c.blur()); - }, k.onblur = function(b) { + }, k.onkeypress = function(a) { + 13 == a.keyCode && (isNaN(k.value) || c.entity.setY(Number(k.value)), c.updateCoordinateView(), c.blur()); + }, k.onblur = function(a) { c.entity.setY(c.entity.getY()); Entry.stage.updateObject(); - }, d = Entry.createElement("div"), d.addClass("rotationMethodWrapper"), a.appendChild(d), this.rotationMethodWrapper_ = d, a = Entry.createElement("span"), a.addClass("entryObjectRotateMethodLabelWorkspace"), d.appendChild(a), a.innerHTML = Lang.Workspace.rotate_method + " : ", a = Entry.createElement("div"), a.addClass("entryObjectRotateModeWorkspace"), a.addClass("entryObjectRotateModeAWorkspace"), a.object = this, this.rotateModeAView_ = a, d.appendChild(a), a.bindOnClick(function(b) { + }, d = Entry.createElement("div"), d.addClass("rotationMethodWrapper"), b.appendChild(d), this.rotationMethodWrapper_ = d, b = Entry.createElement("span"), b.addClass("entryObjectRotateMethodLabelWorkspace"), d.appendChild(b), b.innerHTML = Lang.Workspace.rotate_method + " : ", b = Entry.createElement("div"), b.addClass("entryObjectRotateModeWorkspace"), b.addClass("entryObjectRotateModeAWorkspace"), b.object = this, this.rotateModeAView_ = b, d.appendChild(b), b.bindOnClick(function(a) { Entry.engine.isState("run") || this.object.setRotateMethod("free"); - }), a = Entry.createElement("div"), a.addClass("entryObjectRotateModeWorkspace"), a.addClass("entryObjectRotateModeBWorkspace"), a.object = this, this.rotateModeBView_ = a, d.appendChild(a), a.bindOnClick(function(b) { + }), b = Entry.createElement("div"), b.addClass("entryObjectRotateModeWorkspace"), b.addClass("entryObjectRotateModeBWorkspace"), b.object = this, this.rotateModeBView_ = b, d.appendChild(b), b.bindOnClick(function(a) { Entry.engine.isState("run") || this.object.setRotateMethod("vertical"); - }), a = Entry.createElement("div"), a.addClass("entryObjectRotateModeWorkspace"), a.addClass("entryObjectRotateModeCWorkspace"), a.object = this, this.rotateModeCView_ = a, d.appendChild(a), a.bindOnClick(function(b) { + }), b = Entry.createElement("div"), b.addClass("entryObjectRotateModeWorkspace"), b.addClass("entryObjectRotateModeCWorkspace"), b.object = this, this.rotateModeCView_ = b, d.appendChild(b), b.bindOnClick(function(a) { Entry.engine.isState("run") || this.object.setRotateMethod("none"); }), this.updateThumbnailView(), this.updateCoordinateView(), this.updateRotateMethodView(), this.updateInputViews(), this.view_; } }; -Entry.EntryObject.prototype.setName = function(a) { - Entry.assert("string" == typeof a, "object name must be string"); - this.name = a; - this.nameView_.value = a; +Entry.EntryObject.prototype.setName = function(b) { + Entry.assert("string" == typeof b, "object name must be string"); + this.name = b; + this.nameView_.value = b; }; -Entry.EntryObject.prototype.setText = function(a) { - Entry.assert("string" == typeof a, "object text must be string"); - this.text = a; +Entry.EntryObject.prototype.setText = function(b) { + Entry.assert("string" == typeof b, "object text must be string"); + this.text = b; }; -Entry.EntryObject.prototype.setScript = function(a) { - this.script = a; +Entry.EntryObject.prototype.setScript = function(b) { + this.script = b; }; -Entry.EntryObject.prototype.getScriptText = function(a) { - a = Blockly.Xml.domToText(this.script); - a = a.replace(/\sxmlns=\"(.*?)\"/, ""); - a = a.replace(/\sclass=\"(.*?)\"/g, ""); - a = a.replace(/\sid=\"(.*?)\"/g, ""); - return a = a.replace(/\sinline=\"(.*?)\"/g, ""); +Entry.EntryObject.prototype.getScriptText = function() { + return JSON.stringify(this.script.toJSON()); }; -Entry.EntryObject.prototype.initEntity = function(a) { - var b = {}; - b.x = b.y = 0; - b.rotation = 0; - b.direction = 90; +Entry.EntryObject.prototype.initEntity = function(b) { + var a = {}; + a.x = a.y = 0; + a.rotation = 0; + a.direction = 90; if ("sprite" == this.objectType) { - var c = a.sprite.pictures[0].dimension; - b.regX = c.width / 2; - b.regY = c.height / 2; - b.scaleX = b.scaleY = "background" == a.sprite.category.main ? Math.max(270 / c.height, 480 / c.width) : "new" == a.sprite.category.main ? 1 : 200 / (c.width + c.height); - b.width = c.width; - b.height = c.height; + var c = b.sprite.pictures[0].dimension; + a.regX = c.width / 2; + a.regY = c.height / 2; + a.scaleX = a.scaleY = "background" == b.sprite.category.main ? Math.max(270 / c.height, 480 / c.width) : "new" == b.sprite.category.main ? 1 : 200 / (c.width + c.height); + a.width = c.width; + a.height = c.height; } else { if ("textBox" == this.objectType) { - if (b.regX = 25, b.regY = 12, b.scaleX = b.scaleY = 1.5, b.width = 50, b.height = 24, b.text = a.text, a.options) { - if (a = a.options, c = "", a.bold && (c += "bold "), a.italic && (c += "italic "), b.underline = a.underline, b.strike = a.strike, b.font = c + "20px " + a.font.family, b.colour = a.colour, b.bgColor = a.background, b.lineBreak = a.lineBreak) { - b.width = 256, b.height = .5625 * b.width, b.regX = b.width / 2, b.regY = b.height / 2; + if (a.regX = 25, a.regY = 12, a.scaleX = a.scaleY = 1.5, a.width = 50, a.height = 24, a.text = b.text, b.options) { + if (b = b.options, c = "", b.bold && (c += "bold "), b.italic && (c += "italic "), a.underline = b.underline, a.strike = b.strike, a.font = c + "20px " + b.font.family, a.colour = b.colour, a.bgColor = b.background, a.lineBreak = b.lineBreak) { + a.width = 256, a.height = .5625 * a.width, a.regX = a.width / 2, a.regY = a.height / 2; } } else { - b.underline = !1, b.strike = !1, b.font = "20px Nanum Gothic", b.colour = "#000000", b.bgColor = "#ffffff"; + a.underline = !1, a.strike = !1, a.font = "20px Nanum Gothic", a.colour = "#000000", a.bgColor = "#ffffff"; } } } - return b; + return a; }; Entry.EntryObject.prototype.updateThumbnailView = function() { if ("sprite" == this.objectType) { if (this.entity.picture.fileurl) { this.thumbnailView_.style.backgroundImage = 'url("' + this.entity.picture.fileurl + '")'; } else { - var a = this.entity.picture.filename; - this.thumbnailView_.style.backgroundImage = 'url("' + Entry.defaultPath + "/uploads/" + a.substring(0, 2) + "/" + a.substring(2, 4) + "/thumb/" + a + '.png")'; + var b = this.entity.picture.filename; + this.thumbnailView_.style.backgroundImage = 'url("' + Entry.defaultPath + "/uploads/" + b.substring(0, 2) + "/" + b.substring(2, 4) + "/thumb/" + b + '.png")'; } } else { "textBox" == this.objectType && (this.thumbnailView_.style.backgroundImage = "url(" + (Entry.mediaFilePath + "/text_icon.png") + ")"); } }; -Entry.EntryObject.prototype.updateCoordinateView = function(a) { - if ((this.isSelected() || a) && this.coordinateView_ && this.coordinateView_.xInput_ && this.coordinateView_.yInput_) { - a = this.coordinateView_.xInput_.value; - var b = this.coordinateView_.yInput_.value, c = this.coordinateView_.sizeInput_.value, d = this.entity.getX().toFixed(1), e = this.entity.getY().toFixed(1), f = this.entity.getSize().toFixed(1); - a != d && (this.coordinateView_.xInput_.value = d); - b != e && (this.coordinateView_.yInput_.value = e); +Entry.EntryObject.prototype.updateCoordinateView = function(b) { + if ((this.isSelected() || b) && this.coordinateView_ && this.coordinateView_.xInput_ && this.coordinateView_.yInput_) { + b = this.coordinateView_.xInput_.value; + var a = this.coordinateView_.yInput_.value, c = this.coordinateView_.sizeInput_.value, d = this.entity.getX().toFixed(1), e = this.entity.getY().toFixed(1), f = this.entity.getSize().toFixed(1); + b != d && (this.coordinateView_.xInput_.value = d); + a != e && (this.coordinateView_.yInput_.value = e); c != f && (this.coordinateView_.sizeInput_.value = f); } }; -Entry.EntryObject.prototype.updateRotationView = function(a) { - if (this.isSelected() && this.view_ || a) { - a = "", "free" == this.getRotateMethod() ? (this.rotateSpan_.removeClass("entryRemove"), this.rotateInput_.removeClass("entryRemove"), a += this.entity.getRotation().toFixed(1), this.rotateInput_.value = a + "\u02da") : (this.rotateSpan_.addClass("entryRemove"), this.rotateInput_.addClass("entryRemove")), a = "" + this.entity.getDirection().toFixed(1), a += "\u02da", this.directionInput_.value = a; +Entry.EntryObject.prototype.updateRotationView = function(b) { + if (this.isSelected() && this.view_ || b) { + b = "", "free" == this.getRotateMethod() ? (this.rotateSpan_.removeClass("entryRemove"), this.rotateInput_.removeClass("entryRemove"), b += this.entity.getRotation().toFixed(1), this.rotateInput_.value = b + "\u02da") : (this.rotateSpan_.addClass("entryRemove"), this.rotateInput_.addClass("entryRemove")), b = "" + this.entity.getDirection().toFixed(1), b += "\u02da", this.directionInput_.value = b; } }; -Entry.EntryObject.prototype.select = function(a) { +Entry.EntryObject.prototype.select = function(b) { console.log(this); }; -Entry.EntryObject.prototype.addPicture = function(a, b) { - Entry.stateManager && Entry.stateManager.addCommand("add sprite", this, this.removePicture, a.id); - b || 0 === b ? (this.pictures.splice(b, 0, a), Entry.playground.injectPicture(this)) : this.pictures.push(a); - return new Entry.State(this, this.removePicture, a.id); +Entry.EntryObject.prototype.addPicture = function(b, a) { + Entry.stateManager && Entry.stateManager.addCommand("add sprite", this, this.removePicture, b.id); + a || 0 === a ? (this.pictures.splice(a, 0, b), Entry.playground.injectPicture(this)) : this.pictures.push(b); + return new Entry.State(this, this.removePicture, b.id); }; -Entry.EntryObject.prototype.removePicture = function(a) { +Entry.EntryObject.prototype.removePicture = function(b) { if (2 > this.pictures.length) { return !1; } - a = this.getPicture(a); - var b = this.pictures.indexOf(a); - Entry.stateManager && Entry.stateManager.addCommand("remove sprite", this, this.addPicture, a, b); - this.pictures.splice(b, 1); - a === this.selectedPicture && Entry.playground.selectPicture(this.pictures[0]); + b = this.getPicture(b); + var a = this.pictures.indexOf(b); + Entry.stateManager && Entry.stateManager.addCommand("remove sprite", this, this.addPicture, b, a); + this.pictures.splice(a, 1); + b === this.selectedPicture && Entry.playground.selectPicture(this.pictures[0]); Entry.playground.injectPicture(this); Entry.playground.reloadPlayground(); - return new Entry.State(this, this.addPicture, a, b); + return new Entry.State(this, this.addPicture, b, a); }; -Entry.EntryObject.prototype.getPicture = function(a) { - if (!a) { +Entry.EntryObject.prototype.getPicture = function(b) { + if (!b) { return this.selectedPicture; } - a = a.trim(); - for (var b = this.pictures, c = b.length, d = 0;d < c;d++) { - if (b[d].id == a) { - return b[d]; + b = b.trim(); + for (var a = this.pictures, c = a.length, d = 0;d < c;d++) { + if (a[d].id == b) { + return a[d]; } } for (d = 0;d < c;d++) { - if (b[d].name == a) { - return b[d]; + if (a[d].name == b) { + return a[d]; } } - a = Entry.parseNumber(a); - if ((!1 !== a || "boolean" != typeof a) && c >= a && 0 < a) { - return b[a - 1]; + b = Entry.parseNumber(b); + if ((!1 !== b || "boolean" != typeof b) && c >= b && 0 < b) { + return a[b - 1]; } throw Error("No picture found"); }; -Entry.EntryObject.prototype.setPicture = function(a) { - for (var b in this.pictures) { - if (a.id === this.pictures[b].id) { - this.pictures[b] = a; +Entry.EntryObject.prototype.setPicture = function(b) { + for (var a in this.pictures) { + if (b.id === this.pictures[a].id) { + this.pictures[a] = b; return; } } throw Error("No picture found"); }; -Entry.EntryObject.prototype.getPrevPicture = function(a) { - for (var b = this.pictures, c = b.length, d = 0;d < c;d++) { - if (b[d].id == a) { - return b[0 == d ? c - 1 : d - 1]; +Entry.EntryObject.prototype.getPrevPicture = function(b) { + for (var a = this.pictures, c = a.length, d = 0;d < c;d++) { + if (a[d].id == b) { + return a[0 == d ? c - 1 : d - 1]; } } }; -Entry.EntryObject.prototype.getNextPicture = function(a) { - for (var b = this.pictures, c = b.length, d = 0;d < c;d++) { - if (b[d].id == a) { - return b[d == c - 1 ? 0 : d + 1]; +Entry.EntryObject.prototype.getNextPicture = function(b) { + for (var a = this.pictures, c = a.length, d = 0;d < c;d++) { + if (a[d].id == b) { + return a[d == c - 1 ? 0 : d + 1]; } } }; -Entry.EntryObject.prototype.selectPicture = function(a) { - var b = this.getPicture(a); - if (b) { - this.selectedPicture = b, this.entity.setImage(b), this.updateThumbnailView(); +Entry.EntryObject.prototype.selectPicture = function(b) { + var a = this.getPicture(b); + if (a) { + this.selectedPicture = a, this.entity.setImage(a), this.updateThumbnailView(); } else { - throw Error("No picture with pictureId : " + a); - } -}; -Entry.EntryObject.prototype.addSound = function(a, b) { - a.id || (a.id = Entry.generateHash()); - Entry.stateManager && Entry.stateManager.addCommand("add sound", this, this.removeSound, a.id); - Entry.initSound(a, b); - b || 0 === b ? (this.sounds.splice(b, 0, a), Entry.playground.injectSound(this)) : this.sounds.push(a); - return new Entry.State(this, this.removeSound, a.id); -}; -Entry.EntryObject.prototype.removeSound = function(a) { - var b; - b = this.getSound(a); - a = this.sounds.indexOf(b); - Entry.stateManager && Entry.stateManager.addCommand("remove sound", this, this.addSound, b, a); - this.sounds.splice(a, 1); + throw Error("No picture with pictureId : " + b); + } +}; +Entry.EntryObject.prototype.addSound = function(b, a) { + b.id || (b.id = Entry.generateHash()); + Entry.stateManager && Entry.stateManager.addCommand("add sound", this, this.removeSound, b.id); + Entry.initSound(b, a); + a || 0 === a ? (this.sounds.splice(a, 0, b), Entry.playground.injectSound(this)) : this.sounds.push(b); + return new Entry.State(this, this.removeSound, b.id); +}; +Entry.EntryObject.prototype.removeSound = function(b) { + var a; + a = this.getSound(b); + b = this.sounds.indexOf(a); + Entry.stateManager && Entry.stateManager.addCommand("remove sound", this, this.addSound, a, b); + this.sounds.splice(b, 1); Entry.playground.reloadPlayground(); Entry.playground.injectSound(this); - return new Entry.State(this, this.addSound, b, a); + return new Entry.State(this, this.addSound, a, b); }; Entry.EntryObject.prototype.getRotateMethod = function() { this.rotateMethod || (this.rotateMethod = "free"); return this.rotateMethod; }; -Entry.EntryObject.prototype.setRotateMethod = function(a) { - a || (a = "free"); - this.rotateMethod = a; +Entry.EntryObject.prototype.setRotateMethod = function(b) { + b || (b = "free"); + this.rotateMethod = b; this.updateRotateMethodView(); Entry.stage.selectedObject && Entry.stage.selectedObject.entity && (Entry.stage.updateObject(), Entry.stage.updateHandle()); }; -Entry.EntryObject.prototype.initRotateValue = function(a) { - this.rotateMethod != a && (this.entity.rotation = 0, this.entity.direction = 90); +Entry.EntryObject.prototype.initRotateValue = function(b) { + this.rotateMethod != b && (this.entity.rotation = 0, this.entity.direction = 90); }; Entry.EntryObject.prototype.updateRotateMethodView = function() { - var a = this.rotateMethod; - this.rotateModeAView_ && (this.rotateModeAView_.removeClass("selected"), this.rotateModeBView_.removeClass("selected"), this.rotateModeCView_.removeClass("selected"), "free" == a ? this.rotateModeAView_.addClass("selected") : "vertical" == a ? this.rotateModeBView_.addClass("selected") : this.rotateModeCView_.addClass("selected"), this.updateRotationView()); + var b = this.rotateMethod; + this.rotateModeAView_ && (this.rotateModeAView_.removeClass("selected"), this.rotateModeBView_.removeClass("selected"), this.rotateModeCView_.removeClass("selected"), "free" == b ? this.rotateModeAView_.addClass("selected") : "vertical" == b ? this.rotateModeBView_.addClass("selected") : this.rotateModeCView_.addClass("selected"), this.updateRotationView()); }; -Entry.EntryObject.prototype.toggleInformation = function(a) { +Entry.EntryObject.prototype.toggleInformation = function(b) { this.setRotateMethod(this.getRotateMethod()); - void 0 === a && (a = this.isInformationToggle = !this.isInformationToggle); - a ? this.view_.addClass("informationToggle") : this.view_.removeClass("informationToggle"); + void 0 === b && (b = this.isInformationToggle = !this.isInformationToggle); + b ? this.view_.addClass("informationToggle") : this.view_.removeClass("informationToggle"); }; -Entry.EntryObject.prototype.addCloneEntity = function(a, b, c) { - this.clonedEntities.length > Entry.maxCloneLimit || (a = new Entry.EntityObject(this), b ? (a.injectModel(b.picture ? b.picture : null, b.toJSON()), a.snapshot_ = b.snapshot_, b.effect && (a.effect = Entry.cloneSimpleObject(b.effect), a.applyFilter()), b.brush && Entry.setCloneBrush(a, b.brush)) : (a.injectModel(this.entity.picture ? this.entity.picture : null, this.entity.toJSON(a)), a.snapshot_ = this.entity.snapshot_, this.entity.effect && (a.effect = Entry.cloneSimpleObject(this.entity.effect), - a.applyFilter()), this.entity.brush && Entry.setCloneBrush(a, this.entity.brush)), Entry.engine.raiseEventOnEntity(a, [a, "when_clone_start"]), a.isClone = !0, a.isStarted = !0, this.addCloneVariables(this, a, b ? b.variables : null, b ? b.lists : null), this.clonedEntities.push(a), Entry.stage.loadEntity(a)); +Entry.EntryObject.prototype.addCloneEntity = function(b, a, c) { + this.clonedEntities.length > Entry.maxCloneLimit || (b = new Entry.EntityObject(this), a ? (b.injectModel(a.picture ? a.picture : null, a.toJSON()), b.snapshot_ = a.snapshot_, a.effect && (b.effect = Entry.cloneSimpleObject(a.effect), b.applyFilter()), a.brush && Entry.setCloneBrush(b, a.brush)) : (b.injectModel(this.entity.picture ? this.entity.picture : null, this.entity.toJSON(b)), b.snapshot_ = this.entity.snapshot_, this.entity.effect && (b.effect = Entry.cloneSimpleObject(this.entity.effect), + b.applyFilter()), this.entity.brush && Entry.setCloneBrush(b, this.entity.brush)), Entry.engine.raiseEventOnEntity(b, [b, "when_clone_start"]), b.isClone = !0, b.isStarted = !0, this.addCloneVariables(this, b, a ? a.variables : null, a ? a.lists : null), this.clonedEntities.push(b), Entry.stage.loadEntity(b)); }; -Entry.EntryObject.prototype.initializeSplitter = function(a) { - a.onmousedown = function(b) { +Entry.EntryObject.prototype.initializeSplitter = function(b) { + b.onmousedown = function(a) { Entry.container.disableSort(); Entry.container.splitterEnable = !0; }; - document.addEventListener("mousemove", function(b) { - Entry.container.splitterEnable && Entry.resizeElement({canvasWidth:b.x || b.clientX}); + document.addEventListener("mousemove", function(a) { + Entry.container.splitterEnable && Entry.resizeElement({canvasWidth:a.x || a.clientX}); }); - document.addEventListener("mouseup", function(b) { + document.addEventListener("mouseup", function(a) { Entry.container.splitterEnable = !1; Entry.container.enableSort(); }); @@ -8108,112 +8553,115 @@ Entry.EntryObject.prototype.isSelected = function() { return this.isSelected_; }; Entry.EntryObject.prototype.toJSON = function() { - var a = {}; - a.id = this.id; - a.name = this.name; - "textBox" == this.objectType && (a.text = this.text); - a.script = this.getScriptText(); - "sprite" == this.objectType && (a.selectedPictureId = this.selectedPicture.id); - a.objectType = this.objectType; - a.rotateMethod = this.getRotateMethod(); - a.scene = this.scene.id; - a.sprite = {pictures:Entry.getPicturesJSON(this.pictures), sounds:Entry.getSoundsJSON(this.sounds)}; - a.lock = this.lock; - a.entity = this.entity.toJSON(); - return a; + var b = {}; + b.id = this.id; + b.name = this.name; + "textBox" == this.objectType && (b.text = this.text); + b.script = this.getScriptText(); + "sprite" == this.objectType && (b.selectedPictureId = this.selectedPicture.id); + b.objectType = this.objectType; + b.rotateMethod = this.getRotateMethod(); + b.scene = this.scene.id; + b.sprite = {pictures:Entry.getPicturesJSON(this.pictures), sounds:Entry.getSoundsJSON(this.sounds)}; + b.lock = this.lock; + b.entity = this.entity.toJSON(); + return b; }; Entry.EntryObject.prototype.destroy = function() { Entry.stage.unloadEntity(this.entity); this.view_ && Entry.removeElement(this.view_); }; -Entry.EntryObject.prototype.getSound = function(a) { - a = a.trim(); - for (var b = this.sounds, c = b.length, d = 0;d < c;d++) { - if (b[d].id == a) { - return b[d]; +Entry.EntryObject.prototype.getSound = function(b) { + b = b.trim(); + for (var a = this.sounds, c = a.length, d = 0;d < c;d++) { + if (a[d].id == b) { + return a[d]; } } for (d = 0;d < c;d++) { - if (b[d].name == a) { - return b[d]; + if (a[d].name == b) { + return a[d]; } } - a = Entry.parseNumber(a); - if ((!1 !== a || "boolean" != typeof a) && c >= a && 0 < a) { - return b[a - 1]; + b = Entry.parseNumber(b); + if ((!1 !== b || "boolean" != typeof b) && c >= b && 0 < b) { + return a[b - 1]; } throw Error("No Sound"); }; -Entry.EntryObject.prototype.addCloneVariables = function(a, b, c, d) { - b.variables = []; - b.lists = []; - c || (c = Entry.findObjsByKey(Entry.variableContainer.variables_, "object_", a.id)); - d || (d = Entry.findObjsByKey(Entry.variableContainer.lists_, "object_", a.id)); - for (a = 0;a < c.length;a++) { - b.variables.push(c[a].clone()); +Entry.EntryObject.prototype.addCloneVariables = function(b, a, c, d) { + a.variables = []; + a.lists = []; + c || (c = Entry.findObjsByKey(Entry.variableContainer.variables_, "object_", b.id)); + d || (d = Entry.findObjsByKey(Entry.variableContainer.lists_, "object_", b.id)); + for (b = 0;b < c.length;b++) { + a.variables.push(c[b].clone()); } - for (a = 0;a < d.length;a++) { - b.lists.push(d[a].clone()); + for (b = 0;b < d.length;b++) { + a.lists.push(d[b].clone()); } }; Entry.EntryObject.prototype.getLock = function() { return this.lock; }; -Entry.EntryObject.prototype.setLock = function(a) { - return this.lock = a; +Entry.EntryObject.prototype.setLock = function(b) { + return this.lock = b; }; -Entry.EntryObject.prototype.updateInputViews = function(a) { - a = a || this.getLock(); - var b = [this.nameView_, this.coordinateView_.xInput_, this.coordinateView_.yInput_, this.rotateInput_, this.directionInput_, this.coordinateView_.sizeInput_]; - if (a && 1 != b[0].getAttribute("readonly")) { - for (a = 0;a < b.length;a++) { - b[a].removeClass("selectedEditingObject"), b[a].setAttribute("readonly", !1), this.isEditing = !1; +Entry.EntryObject.prototype.updateInputViews = function(b) { + b = b || this.getLock(); + var a = [this.nameView_, this.coordinateView_.xInput_, this.coordinateView_.yInput_, this.rotateInput_, this.directionInput_, this.coordinateView_.sizeInput_]; + if (b && 1 != a[0].getAttribute("readonly")) { + for (b = 0;b < a.length;b++) { + a[b].removeClass("selectedEditingObject"), a[b].setAttribute("readonly", !1), this.isEditing = !1; } } }; -Entry.EntryObject.prototype.editObjectValues = function(a) { - var b; - b = this.getLock() ? [this.nameView_] : [this.nameView_, this.coordinateView_.xInput_, this.coordinateView_.yInput_, this.rotateInput_, this.directionInput_, this.coordinateView_.sizeInput_]; - if (a) { - $(b).removeClass("selectedNotEditingObject"); - for (a = 0;a < b.length;a++) { - b[a].removeAttribute("readonly"), b[a].addClass("selectedEditingObject"); +Entry.EntryObject.prototype.editObjectValues = function(b) { + var a; + a = this.getLock() ? [this.nameView_] : [this.nameView_, this.coordinateView_.xInput_, this.coordinateView_.yInput_, this.rotateInput_, this.directionInput_, this.coordinateView_.sizeInput_]; + if (b) { + $(a).removeClass("selectedNotEditingObject"); + for (b = 0;b < a.length;b++) { + a[b].removeAttribute("readonly"), a[b].addClass("selectedEditingObject"); } this.isEditing = !0; } else { - for (a = 0;a < b.length;a++) { - b[a].blur(!0); + for (b = 0;b < a.length;b++) { + a[b].blur(!0); } this.blurAllInput(); this.isEditing = !1; } }; Entry.EntryObject.prototype.blurAllInput = function() { - var a = document.getElementsByClassName("selectedEditingObject"); - $(a).removeClass("selectedEditingObject"); - for (var a = [this.nameView_, this.coordinateView_.xInput_, this.coordinateView_.yInput_, this.rotateInput_, this.directionInput_, this.coordinateView_.sizeInput_], b = 0;b < a.length;b++) { - a[b].addClass("selectedNotEditingObject"), a[b].setAttribute("readonly", !0); + var b = document.getElementsByClassName("selectedEditingObject"); + $(b).removeClass("selectedEditingObject"); + for (var b = [this.nameView_, this.coordinateView_.xInput_, this.coordinateView_.yInput_, this.rotateInput_, this.directionInput_, this.coordinateView_.sizeInput_], a = 0;a < b.length;a++) { + b[a].addClass("selectedNotEditingObject"), b[a].setAttribute("readonly", !0); } }; -Entry.EntryObject.prototype.addStampEntity = function(a) { - a = new Entry.StampEntity(this, a); - Entry.stage.loadEntity(a); - this.clonedEntities.push(a); +Entry.EntryObject.prototype.addStampEntity = function(b) { + b = new Entry.StampEntity(this, b); + Entry.stage.loadEntity(b); + this.clonedEntities.push(b); Entry.stage.sortZorder(); }; Entry.EntryObject.prototype.getClonedEntities = function() { - var a = []; - this.clonedEntities.map(function(b) { - b.isStamp || a.push(b); + var b = []; + this.clonedEntities.map(function(a) { + a.isStamp || b.push(a); }); - return a; + return b; }; Entry.EntryObject.prototype.getStampEntities = function() { - var a = []; - this.clonedEntities.map(function(b) { - b.isStamp && a.push(b); + var b = []; + this.clonedEntities.map(function(a) { + a.isStamp && b.push(a); }); - return a; + return b; +}; +Entry.EntryObject.prototype.clearExecutor = function() { + this.script.clearExecutors(); }; Entry.Painter = function() { this.toolbox = {selected:"cursor"}; @@ -8223,8 +8671,8 @@ Entry.Painter = function() { this.selectArea = {}; this.firstStatement = !1; }; -Entry.Painter.prototype.initialize = function(a) { - this.generateView(a); +Entry.Painter.prototype.initialize = function(b) { + this.generateView(b); this.canvas = document.getElementById("entryPainterCanvas"); this.canvas_ = document.getElementById("entryPainterCanvas_"); this.stage = new createjs.Stage(this.canvas); @@ -8248,10 +8696,10 @@ Entry.Painter.prototype.initialize = function(a) { this.initCoordinator(); this.initHandle(); this.initDraw(); - var b = this; + var a = this; Entry.addEventListener("textUpdate", function() { - var a = b.inputField.value(); - "" === a ? (b.inputField.hide(), delete b.inputField) : (b.inputField.hide(), b.drawText(a), b.selectToolbox("cursor")); + var b = a.inputField.value(); + "" === b ? (a.inputField.hide(), delete a.inputField) : (a.inputField.hide(), a.drawText(b), a.selectToolbox("cursor")); }); this.selectToolbox("cursor"); }; @@ -8259,257 +8707,257 @@ Entry.Painter.prototype.initHandle = function() { this._handle = new createjs.Container; this._handle.rect = new createjs.Shape; this._handle.addChild(this._handle.rect); - var a = new createjs.Container; - a.name = "move"; - a.width = 90; - a.height = 90; - a.x = 90; - a.y = 90; - a.rect = new createjs.Shape; - var b = this; - a.rect.on("mousedown", function(c) { - "cursor" === b.toolbox.selected && (b.initCommand(), this.offset = {x:this.parent.x - this.x - c.stageX, y:this.parent.y - this.y - c.stageY}, this.parent.handleMode = "move", a.isSelectCenter = !1); + var b = new createjs.Container; + b.name = "move"; + b.width = 90; + b.height = 90; + b.x = 90; + b.y = 90; + b.rect = new createjs.Shape; + var a = this; + b.rect.on("mousedown", function(c) { + "cursor" === a.toolbox.selected && (a.initCommand(), this.offset = {x:this.parent.x - this.x - c.stageX, y:this.parent.y - this.y - c.stageY}, this.parent.handleMode = "move", b.isSelectCenter = !1); }); - a.rect.on("pressmove", function(c) { - "cursor" !== b.toolbox.selected || a.isSelectCenter || (b.doCommand(), this.parent.x = c.stageX + this.offset.x, this.parent.y = c.stageY + this.offset.y, b.updateImageHandle()); + b.rect.on("pressmove", function(c) { + "cursor" !== a.toolbox.selected || b.isSelectCenter || (a.doCommand(), this.parent.x = c.stageX + this.offset.x, this.parent.y = c.stageY + this.offset.y, a.updateImageHandle()); }); - a.on("mouseup", function(a) { - b.checkCommand(); + b.on("mouseup", function(b) { + a.checkCommand(); }); - a.rect.cursor = "move"; - a.addChild(a.rect); - a.notch = new createjs.Shape; - a.addChild(a.notch); - a.NEHandle = this.generateCornerHandle(); - a.addChild(a.NEHandle); - a.NWHandle = this.generateCornerHandle(); - a.addChild(a.NWHandle); - a.SWHandle = this.generateCornerHandle(); - a.addChild(a.SWHandle); - a.SEHandle = this.generateCornerHandle(); - a.addChild(a.SEHandle); - a.EHandle = this.generateXHandle(); - a.addChild(a.EHandle); - a.WHandle = this.generateXHandle(); - a.addChild(a.WHandle); - a.NHandle = this.generateYHandle(); - a.addChild(a.NHandle); - a.SHandle = this.generateYHandle(); - a.addChild(a.SHandle); - a.RHandle = new createjs.Shape; - a.RHandle.graphics.ss(2, 2, 0).beginFill("#888").s("#c1c7cd").f("#c1c7cd").dr(-2, -2, 8, 8); - a.RHandle.on("mousedown", function(a) { - b.initCommand(); + b.rect.cursor = "move"; + b.addChild(b.rect); + b.notch = new createjs.Shape; + b.addChild(b.notch); + b.NEHandle = this.generateCornerHandle(); + b.addChild(b.NEHandle); + b.NWHandle = this.generateCornerHandle(); + b.addChild(b.NWHandle); + b.SWHandle = this.generateCornerHandle(); + b.addChild(b.SWHandle); + b.SEHandle = this.generateCornerHandle(); + b.addChild(b.SEHandle); + b.EHandle = this.generateXHandle(); + b.addChild(b.EHandle); + b.WHandle = this.generateXHandle(); + b.addChild(b.WHandle); + b.NHandle = this.generateYHandle(); + b.addChild(b.NHandle); + b.SHandle = this.generateYHandle(); + b.addChild(b.SHandle); + b.RHandle = new createjs.Shape; + b.RHandle.graphics.ss(2, 2, 0).beginFill("#888").s("#c1c7cd").f("#c1c7cd").dr(-2, -2, 8, 8); + b.RHandle.on("mousedown", function(b) { + a.initCommand(); }); - a.RHandle.on("pressmove", function(a) { - b.doCommand(); - var d = a.stageX - this.parent.x; - a = a.stageY - this.parent.y; - this.parent.rotation = 0 <= d ? Math.atan(a / d) / Math.PI * 180 + 90 : Math.atan(a / d) / Math.PI * 180 + 270; - b.updateImageHandle(); + b.RHandle.on("pressmove", function(b) { + a.doCommand(); + var d = b.stageX - this.parent.x; + b = b.stageY - this.parent.y; + this.parent.rotation = 0 <= d ? Math.atan(b / d) / Math.PI * 180 + 90 : Math.atan(b / d) / Math.PI * 180 + 270; + a.updateImageHandle(); }); - a.RHandle.cursor = "crosshair"; - a.addChild(a.RHandle); - a.on("mouseup", function(a) { - b.checkCommand(); + b.RHandle.cursor = "crosshair"; + b.addChild(b.RHandle); + b.on("mouseup", function(b) { + a.checkCommand(); }); - a.visible = !1; - this.handle = a; - this.stage.addChild(a); + b.visible = !1; + this.handle = b; + this.stage.addChild(b); this.updateImageHandleCursor(); }; Entry.Painter.prototype.generateCornerHandle = function() { - var a = this, b = new createjs.Shape; - b.graphics.beginFill("#c1c7cd").ss(2, 2, 0).s("#c1c7cd").dr(-4, -4, 8, 8); - b.on("mousedown", function(b) { - a.initCommand(); - this.offset = {x:b.stageX - this.parent.x + this.parent.regX, y:b.stageY - this.parent.y + this.parent.regY}; + var b = this, a = new createjs.Shape; + a.graphics.beginFill("#c1c7cd").ss(2, 2, 0).s("#c1c7cd").dr(-4, -4, 8, 8); + a.on("mousedown", function(a) { + b.initCommand(); + this.offset = {x:a.stageX - this.parent.x + this.parent.regX, y:a.stageY - this.parent.y + this.parent.regY}; }); - b.on("pressmove", function(b) { - a.doCommand(); - var d = Math.sqrt(Math.abs((b.stageX - this.parent.x + this.parent.regX) / this.offset.x * (b.stageY - this.parent.y + this.parent.regY) / this.offset.y)); - 10 < this.parent.width * d && 10 < this.parent.height * d && (this.parent.width *= d, this.parent.height *= d, this.offset = {x:b.stageX - this.parent.x + this.parent.regX, y:b.stageY - this.parent.y + this.parent.regY}); - a.updateImageHandle(); + a.on("pressmove", function(a) { + b.doCommand(); + var d = Math.sqrt(Math.abs((a.stageX - this.parent.x + this.parent.regX) / this.offset.x * (a.stageY - this.parent.y + this.parent.regY) / this.offset.y)); + 10 < this.parent.width * d && 10 < this.parent.height * d && (this.parent.width *= d, this.parent.height *= d, this.offset = {x:a.stageX - this.parent.x + this.parent.regX, y:a.stageY - this.parent.y + this.parent.regY}); + b.updateImageHandle(); }); - b.on("mouseup", function(b) { - a.checkCommand(); + a.on("mouseup", function(a) { + b.checkCommand(); }); - return b; + return a; }; Entry.Painter.prototype.generateXHandle = function() { - var a = this, b = new createjs.Shape; - b.graphics.beginFill("#c1c7cd").ss(2, 2, 0).s("#c1c7cd").dr(-4, -4, 8, 8); - b.on("mousedown", function(b) { - a.initCommand(); - this.offset = {x:b.stageX - this.parent.x + this.parent.regX}; + var b = this, a = new createjs.Shape; + a.graphics.beginFill("#c1c7cd").ss(2, 2, 0).s("#c1c7cd").dr(-4, -4, 8, 8); + a.on("mousedown", function(a) { + b.initCommand(); + this.offset = {x:a.stageX - this.parent.x + this.parent.regX}; }); - b.on("pressmove", function(b) { - a.doCommand(); - var d = Math.abs((b.stageX - this.parent.x + this.parent.regX) / this.offset.x); - 10 < this.parent.width * d && (this.parent.width *= d, this.offset = {x:b.stageX - this.parent.x + this.parent.regX}); - a.updateImageHandle(); + a.on("pressmove", function(a) { + b.doCommand(); + var d = Math.abs((a.stageX - this.parent.x + this.parent.regX) / this.offset.x); + 10 < this.parent.width * d && (this.parent.width *= d, this.offset = {x:a.stageX - this.parent.x + this.parent.regX}); + b.updateImageHandle(); }); - b.on("mouseup", function(b) { - a.checkCommand(); + a.on("mouseup", function(a) { + b.checkCommand(); }); - return b; + return a; }; Entry.Painter.prototype.generateYHandle = function() { - var a = this, b = new createjs.Shape; - b.graphics.beginFill("#c1c7cd").ss(2, 2, 0).s("#c1c7cd").dr(-4, -4, 8, 8); - b.on("mousedown", function(b) { - a.initCommand(); - this.offset = {y:b.stageY - this.parent.y + this.parent.regY}; + var b = this, a = new createjs.Shape; + a.graphics.beginFill("#c1c7cd").ss(2, 2, 0).s("#c1c7cd").dr(-4, -4, 8, 8); + a.on("mousedown", function(a) { + b.initCommand(); + this.offset = {y:a.stageY - this.parent.y + this.parent.regY}; }); - b.on("pressmove", function(b) { - a.doCommand(); - var d = Math.abs((b.stageY - this.parent.y + this.parent.regY) / this.offset.y); - 10 < this.parent.height * d && (this.parent.height *= d, this.offset = {y:b.stageY - this.parent.y + this.parent.regY}); - a.updateImageHandle(); + a.on("pressmove", function(a) { + b.doCommand(); + var d = Math.abs((a.stageY - this.parent.y + this.parent.regY) / this.offset.y); + 10 < this.parent.height * d && (this.parent.height *= d, this.offset = {y:a.stageY - this.parent.y + this.parent.regY}); + b.updateImageHandle(); }); - b.on("mouseup", function(b) { - a.checkCommand(); + a.on("mouseup", function(a) { + b.checkCommand(); }); - return b; + return a; }; Entry.Painter.prototype.updateImageHandle = function() { if (this.handle.visible) { - var a = this.handle, b = a.direction, c = a.width, d = a.height, e = a.regX, f = a.regY; - a.rect.graphics.clear().f("rgba(0,0,1,0.01)").ss(2, 2, 0).s("#c1c7cd").lt(-c / 2, -d / 2).lt(0, -d / 2).lt(0, -d / 2).lt(+c / 2, -d / 2).lt(+c / 2, +d / 2).lt(-c / 2, +d / 2).cp(); - a.notch.graphics.clear().f("rgba(0,0,1,0.01)").ss(2, 2, 0).s("#c1c7cd").lt(0, -d / 2).lt(0, -d / 2 - 20).cp(); - a.NEHandle.x = +a.width / 2; - a.NEHandle.y = -a.height / 2; - a.NWHandle.x = -a.width / 2; - a.NWHandle.y = -a.height / 2; - a.SWHandle.x = -a.width / 2; - a.SWHandle.y = +a.height / 2; - a.SEHandle.x = +a.width / 2; - a.SEHandle.y = +a.height / 2; - a.EHandle.x = +a.width / 2; - a.EHandle.y = 0; - a.WHandle.x = -a.width / 2; - a.WHandle.y = 0; - a.NHandle.x = 0; - a.NHandle.y = -a.height / 2; - a.SHandle.x = 0; - a.SHandle.y = +a.height / 2; - a.RHandle.x = -2; - a.RHandle.y = -a.height / 2 - 20 - 2; - this.handle.visible && (c = this.selectedObject, this.selectedObject.text ? (c.width = this.selectedObject.width, c.height = this.selectedObject.height) : (c.width = c.image.width, c.height = c.image.height), c.scaleX = a.width / c.width, c.scaleY = a.height / c.height, c.x = a.x, c.y = a.y, c.regX = c.width / 2 + e / c.scaleX, c.regY = c.height / 2 + f / c.scaleY, c.rotation = a.rotation, c.direction = b, this.selectArea.x1 = a.x - a.width / 2, this.selectArea.y1 = a.y - a.height / 2, this.selectArea.x2 = - a.width, this.selectArea.y2 = a.height, this.objectWidthInput.value = Math.abs(c.width * c.scaleX).toFixed(0), this.objectHeightInput.value = Math.abs(c.height * c.scaleY).toFixed(0), this.objectRotateInput.value = (1 * c.rotation).toFixed(0)); + var b = this.handle, a = b.direction, c = b.width, d = b.height, e = b.regX, f = b.regY; + b.rect.graphics.clear().f("rgba(0,0,1,0.01)").ss(2, 2, 0).s("#c1c7cd").lt(-c / 2, -d / 2).lt(0, -d / 2).lt(0, -d / 2).lt(+c / 2, -d / 2).lt(+c / 2, +d / 2).lt(-c / 2, +d / 2).cp(); + b.notch.graphics.clear().f("rgba(0,0,1,0.01)").ss(2, 2, 0).s("#c1c7cd").lt(0, -d / 2).lt(0, -d / 2 - 20).cp(); + b.NEHandle.x = +b.width / 2; + b.NEHandle.y = -b.height / 2; + b.NWHandle.x = -b.width / 2; + b.NWHandle.y = -b.height / 2; + b.SWHandle.x = -b.width / 2; + b.SWHandle.y = +b.height / 2; + b.SEHandle.x = +b.width / 2; + b.SEHandle.y = +b.height / 2; + b.EHandle.x = +b.width / 2; + b.EHandle.y = 0; + b.WHandle.x = -b.width / 2; + b.WHandle.y = 0; + b.NHandle.x = 0; + b.NHandle.y = -b.height / 2; + b.SHandle.x = 0; + b.SHandle.y = +b.height / 2; + b.RHandle.x = -2; + b.RHandle.y = -b.height / 2 - 20 - 2; + this.handle.visible && (c = this.selectedObject, this.selectedObject.text ? (c.width = this.selectedObject.width, c.height = this.selectedObject.height) : (c.width = c.image.width, c.height = c.image.height), c.scaleX = b.width / c.width, c.scaleY = b.height / c.height, c.x = b.x, c.y = b.y, c.regX = c.width / 2 + e / c.scaleX, c.regY = c.height / 2 + f / c.scaleY, c.rotation = b.rotation, c.direction = a, this.selectArea.x1 = b.x - b.width / 2, this.selectArea.y1 = b.y - b.height / 2, this.selectArea.x2 = + b.width, this.selectArea.y2 = b.height, this.objectWidthInput.value = Math.abs(c.width * c.scaleX).toFixed(0), this.objectHeightInput.value = Math.abs(c.height * c.scaleY).toFixed(0), this.objectRotateInput.value = (1 * c.rotation).toFixed(0)); this.updateImageHandleCursor(); this.stage.update(); } }; Entry.Painter.prototype.updateImageHandleCursor = function() { - var a = this.handle; - a.rect.cursor = "move"; - a.RHandle.cursor = "crosshair"; - for (var b = ["nwse-resize", "ns-resize", "nesw-resize", "ew-resize"], c = Math.floor((a.rotation + 22.5) % 180 / 45), d = 0;d < c;d++) { - b.push(b.shift()); - } - a.NHandle.cursor = b[1]; - a.NEHandle.cursor = b[2]; - a.EHandle.cursor = b[3]; - a.SEHandle.cursor = b[0]; - a.SHandle.cursor = b[1]; - a.SWHandle.cursor = b[2]; - a.WHandle.cursor = b[3]; - a.NWHandle.cursor = b[0]; -}; -Entry.Painter.prototype.clearCanvas = function(a) { + var b = this.handle; + b.rect.cursor = "move"; + b.RHandle.cursor = "crosshair"; + for (var a = ["nwse-resize", "ns-resize", "nesw-resize", "ew-resize"], c = Math.floor((b.rotation + 22.5) % 180 / 45), d = 0;d < c;d++) { + a.push(a.shift()); + } + b.NHandle.cursor = a[1]; + b.NEHandle.cursor = a[2]; + b.EHandle.cursor = a[3]; + b.SEHandle.cursor = a[0]; + b.SHandle.cursor = a[1]; + b.SWHandle.cursor = a[2]; + b.WHandle.cursor = a[3]; + b.NWHandle.cursor = a[0]; +}; +Entry.Painter.prototype.clearCanvas = function(b) { this.clearHandle(); - a || this.initCommand(); + b || this.initCommand(); this.objectContainer.removeAllChildren(); this.stage.update(); this.colorLayerData = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height); - a = 0; - for (var b = this.colorLayerData.data.length;a < b;a++) { - this.colorLayerData.data[a] = 255, this.colorLayerData.data[a + 1] = 255, this.colorLayerData.data[a + 2] = 255, this.colorLayerData.data[a + 3] = 255; + b = 0; + for (var a = this.colorLayerData.data.length;b < a;b++) { + this.colorLayerData.data[b] = 255, this.colorLayerData.data[b + 1] = 255, this.colorLayerData.data[b + 2] = 255, this.colorLayerData.data[b + 3] = 255; } this.reloadContext(); }; Entry.Painter.prototype.newPicture = function() { - var a = {dimension:{height:1, width:1}, fileurl:Entry.mediaFilePath + "_1x1.png", name:Lang.Workspace.new_picture}; - a.id = Entry.generateHash(); - Entry.playground.addPicture(a, !0); + var b = {dimension:{height:1, width:1}, fileurl:Entry.mediaFilePath + "_1x1.png", name:Lang.Workspace.new_picture}; + b.id = Entry.generateHash(); + Entry.playground.addPicture(b, !0); }; Entry.Painter.prototype.initPicture = function() { - var a = this; - Entry.addEventListener("pictureSelected", function(b) { - a.selectToolbox("cursor"); - if (a.file.id !== b.id) { - a.file.modified && confirm("\uc218\uc815\ub41c \ub0b4\uc6a9\uc744 \uc800\uc7a5\ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?") && (a.file_ = JSON.parse(JSON.stringify(a.file)), a.file_save(!0)); - a.file.modified = !1; - a.clearCanvas(!0); + var b = this; + Entry.addEventListener("pictureSelected", function(a) { + b.selectToolbox("cursor"); + if (b.file.id !== a.id) { + b.file.modified && confirm("\uc218\uc815\ub41c \ub0b4\uc6a9\uc744 \uc800\uc7a5\ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?") && (b.file_ = JSON.parse(JSON.stringify(b.file)), b.file_save(!0)); + b.file.modified = !1; + b.clearCanvas(!0); var c = new Image; - c.id = b.id ? b.id : Entry.generateHash(); - a.file.id = c.id; - a.file.name = b.name; - a.file.mode = "edit"; - c.src = b.fileurl ? b.fileurl : Entry.defaultPath + "/uploads/" + b.filename.substring(0, 2) + "/" + b.filename.substring(2, 4) + "/image/" + b.filename + ".png"; - c.onload = function(b) { - a.addImage(b.target); + c.id = a.id ? a.id : Entry.generateHash(); + b.file.id = c.id; + b.file.name = a.name; + b.file.mode = "edit"; + c.src = a.fileurl ? a.fileurl : Entry.defaultPath + "/uploads/" + a.filename.substring(0, 2) + "/" + a.filename.substring(2, 4) + "/image/" + a.filename + ".png"; + c.onload = function(a) { + b.addImage(a.target); }; } }); - Entry.addEventListener("pictureImport", function(b) { - a.addPicture(b); + Entry.addEventListener("pictureImport", function(a) { + b.addPicture(a); }); - Entry.addEventListener("pictureNameChanged", function(b) { - a.file.name = b.name; + Entry.addEventListener("pictureNameChanged", function(a) { + b.file.name = a.name; }); - Entry.addEventListener("pictureClear", function(b) { - a.file.modified = !1; - a.file.id = ""; - a.file.name = ""; - a.clearCanvas(); + Entry.addEventListener("pictureClear", function(a) { + b.file.modified = !1; + b.file.id = ""; + b.file.name = ""; + b.clearCanvas(); }); }; Entry.Painter.prototype.initDraw = function() { - var a = this; - this.stage.on("stagemousedown", function(b) { - a.stagemousedown(b); + var b = this; + this.stage.on("stagemousedown", function(a) { + b.stagemousedown(a); }); - this.stage.on("stagemouseup", function(b) { - a.stagemouseup(b); + this.stage.on("stagemouseup", function(a) { + b.stagemouseup(a); }); - this.stage.on("stagemousemove", function(b) { - a.stagemousemove(b); + this.stage.on("stagemousemove", function(a) { + b.stagemousemove(a); }); }; -Entry.Painter.prototype.selectObject = function(a, b) { - this.selectedObject = a; - this.handle.visible = a.visible; - b ? (this.handle.width = this.copy.width, this.handle.height = this.copy.height, this.handle.x = this.selectArea.x1 + this.copy.width / 2, this.handle.y = this.selectArea.y1 + this.copy.height / 2) : (this.handle.width = a.scaleX * a.image.width, this.handle.height = a.scaleY * a.image.height, this.handle.x = a.x, this.handle.y = a.y, this.handle.regX = +(a.regX - a.image.width / 2) * a.scaleX, this.handle.regY = +(a.regY - a.image.height / 2) * a.scaleY); - this.handle.rotation = a.rotation; +Entry.Painter.prototype.selectObject = function(b, a) { + this.selectedObject = b; + this.handle.visible = b.visible; + a ? (this.handle.width = this.copy.width, this.handle.height = this.copy.height, this.handle.x = this.selectArea.x1 + this.copy.width / 2, this.handle.y = this.selectArea.y1 + this.copy.height / 2) : (this.handle.width = b.scaleX * b.image.width, this.handle.height = b.scaleY * b.image.height, this.handle.x = b.x, this.handle.y = b.y, this.handle.regX = +(b.regX - b.image.width / 2) * b.scaleX, this.handle.regY = +(b.regY - b.image.height / 2) * b.scaleY); + this.handle.rotation = b.rotation; this.handle.direction = 0; this.updateImageHandle(); }; -Entry.Painter.prototype.selectTextObject = function(a) { - this.selectedObject = a; - var b = a.getTransformedBounds(); - this.handle.visible = a.visible; - a.width || (this.selectedObject.width = b.width); - a.height || (this.selectedObject.height = b.height); - this.handle.width = a.scaleX * this.selectedObject.width; - this.handle.height = a.scaleY * this.selectedObject.height; - this.handle.x = a.x; - this.handle.y = a.y; - a.regX || (a.regX = a.width / 2); - a.regY || (a.regY = a.height / 2); - this.handle.regX = (a.regX - this.selectedObject.width / 2) * a.scaleX; - this.handle.regY = (a.regY - this.selectedObject.height / 2) * a.scaleY; - this.handle.rotation = a.rotation; +Entry.Painter.prototype.selectTextObject = function(b) { + this.selectedObject = b; + var a = b.getTransformedBounds(); + this.handle.visible = b.visible; + b.width || (this.selectedObject.width = a.width); + b.height || (this.selectedObject.height = a.height); + this.handle.width = b.scaleX * this.selectedObject.width; + this.handle.height = b.scaleY * this.selectedObject.height; + this.handle.x = b.x; + this.handle.y = b.y; + b.regX || (b.regX = b.width / 2); + b.regY || (b.regY = b.height / 2); + this.handle.regX = (b.regX - this.selectedObject.width / 2) * b.scaleX; + this.handle.regY = (b.regY - this.selectedObject.height / 2) * b.scaleY; + this.handle.rotation = b.rotation; this.handle.direction = 0; this.updateImageHandle(); }; Entry.Painter.prototype.updateHandle = function() { -1 < this.stage.getChildIndex(this._handle) && this.stage.removeChild(this._handle); -1 === this.stage.getChildIndex(this.handle) && this.stage.addChild(this.handle); - var a = new createjs.Shape; - a.graphics.clear().beginFill("#000").rect(this.selectArea.x1, this.selectArea.y1, this.selectArea.x2, this.selectArea.y2); - this.handle.rect.hitArea = a; + var b = new createjs.Shape; + b.graphics.clear().beginFill("#000").rect(this.selectArea.x1, this.selectArea.y1, this.selectArea.x2, this.selectArea.y2); + this.handle.rect.hitArea = b; this.handle.rect.graphics.clear().setStrokeStyle(1, "round").beginStroke("#000000").drawDashedRect(this.selectArea.x1, this.selectArea.y1, this.selectArea.x2, this.selectArea.y2, 4); this.stage.update(); }; @@ -8518,56 +8966,56 @@ Entry.Painter.prototype.updateHandle_ = function() { this._handle.rect.graphics.clear().setStrokeStyle(1, "round").beginStroke("#cccccc").drawDashedRect(this.selectArea.x1, this.selectArea.y1, this.selectArea.x2, this.selectArea.y2, 2); this.stage.update(); }; -Entry.Painter.prototype.matchTolerance = function(a, b, c, d, e) { - var f = this.colorLayerData.data[a], g = this.colorLayerData.data[a + 1]; - a = this.colorLayerData.data[a + 2]; - return f >= b - e / 100 * b && f <= b + e / 100 * b && g >= c - e / 100 * c && g <= c + e / 100 * c && a >= d - e / 100 * d && a <= d + e / 100 * d; +Entry.Painter.prototype.matchTolerance = function(b, a, c, d, e) { + var f = this.colorLayerData.data[b], g = this.colorLayerData.data[b + 1]; + b = this.colorLayerData.data[b + 2]; + return f >= a - e / 100 * a && f <= a + e / 100 * a && g >= c - e / 100 * c && g <= c + e / 100 * c && b >= d - e / 100 * d && b <= d + e / 100 * d; }; -Entry.Painter.prototype.matchColorOnly = function(a, b, c, d) { - return b === this.colorLayerData.data[a] && c === this.colorLayerData.data[a + 1] && d === this.colorLayerData.data[a + 2] ? !0 : !1; +Entry.Painter.prototype.matchColorOnly = function(b, a, c, d) { + return a === this.colorLayerData.data[b] && c === this.colorLayerData.data[b + 1] && d === this.colorLayerData.data[b + 2] ? !0 : !1; }; -Entry.Painter.prototype.matchColor = function(a, b, c, d, e) { - return b === this.colorLayerData.data[a] && c === this.colorLayerData.data[a + 1] && d === this.colorLayerData.data[a + 2] && e === this.colorLayerData.data[a + 3] ? !0 : !1; +Entry.Painter.prototype.matchColor = function(b, a, c, d, e) { + return a === this.colorLayerData.data[b] && c === this.colorLayerData.data[b + 1] && d === this.colorLayerData.data[b + 2] && e === this.colorLayerData.data[b + 3] ? !0 : !1; }; -Entry.Painter.prototype.colorPixel = function(a, b, c, d, e) { +Entry.Painter.prototype.colorPixel = function(b, a, c, d, e) { e || (e = 255); - this.stroke.transparent && (e = d = c = b = 0); - this.colorLayerData.data[a] = b; - this.colorLayerData.data[a + 1] = c; - this.colorLayerData.data[a + 2] = d; - this.colorLayerData.data[a + 3] = e; -}; -Entry.Painter.prototype.pickStrokeColor = function(a) { - a = 4 * (Math.round(a.stageY) * this.canvas.width + Math.round(a.stageX)); - this.stroke.lineColor = Entry.rgb2hex(this.colorLayerData.data[a], this.colorLayerData.data[a + 1], this.colorLayerData.data[a + 2]); + this.stroke.transparent && (e = d = c = a = 0); + this.colorLayerData.data[b] = a; + this.colorLayerData.data[b + 1] = c; + this.colorLayerData.data[b + 2] = d; + this.colorLayerData.data[b + 3] = e; +}; +Entry.Painter.prototype.pickStrokeColor = function(b) { + b = 4 * (Math.round(b.stageY) * this.canvas.width + Math.round(b.stageX)); + this.stroke.lineColor = Entry.rgb2hex(this.colorLayerData.data[b], this.colorLayerData.data[b + 1], this.colorLayerData.data[b + 2]); document.getElementById("entryPainterAttrCircle").style.backgroundColor = this.stroke.lineColor; document.getElementById("entryPainterAttrCircleInput").value = this.stroke.lineColor; }; -Entry.Painter.prototype.drawText = function(a) { - var b = document.getElementById("entryPainterAttrFontStyle").value, c = document.getElementById("entryPainterAttrFontName").value, d = document.getElementById("entryPainterAttrFontSize").value; - a = new createjs.Text(a, b + " " + d + 'px "' + c + '"', this.stroke.lineColor); - a.textBaseline = "top"; - a.x = this.oldPt.x; - a.y = this.oldPt.y; - this.objectContainer.addChild(a); - this.selectTextObject(a); +Entry.Painter.prototype.drawText = function(b) { + var a = document.getElementById("entryPainterAttrFontStyle").value, c = document.getElementById("entryPainterAttrFontName").value, d = document.getElementById("entryPainterAttrFontSize").value; + b = new createjs.Text(b, a + " " + d + 'px "' + c + '"', this.stroke.lineColor); + b.textBaseline = "top"; + b.x = this.oldPt.x; + b.y = this.oldPt.y; + this.objectContainer.addChild(b); + this.selectTextObject(b); this.file.modified = !0; }; -Entry.Painter.prototype.addImage = function(a) { - var b = new createjs.Bitmap(a); - this.objectContainer.addChild(b); - b.x = this.stage.canvas.width / 2; - b.y = this.stage.canvas.height / 2; - b.regX = b.image.width / 2 | 0; - b.regY = b.image.height / 2 | 0; - if (540 < b.image.height) { - var c = 540 / b.image.height; - b.scaleX = c; - b.scaleY = c; - } - b.name = a.id; - b.id = a.id; - this.selectObject(b); +Entry.Painter.prototype.addImage = function(b) { + var a = new createjs.Bitmap(b); + this.objectContainer.addChild(a); + a.x = this.stage.canvas.width / 2; + a.y = this.stage.canvas.height / 2; + a.regX = a.image.width / 2 | 0; + a.regY = a.image.height / 2 | 0; + if (540 < a.image.height) { + var c = 540 / a.image.height; + a.scaleX = c; + a.scaleY = c; + } + a.name = b.id; + a.id = b.id; + this.selectObject(a); this.stage.update(); }; Entry.Painter.prototype.createBrush = function() { @@ -8588,18 +9036,18 @@ Entry.Painter.prototype.clearHandle = function() { this.stage.update(); }; Entry.Painter.prototype.initCommand = function() { - var a = !1; - this.handle.visible && (a = !0, this.handle.visible = !1); var b = !1; - this.coordinator.visible && (b = !0, this.coordinator.visible = !1); - (a || b) && this.stage.update(); + this.handle.visible && (b = !0, this.handle.visible = !1); + var a = !1; + this.coordinator.visible && (a = !0, this.coordinator.visible = !1); + (b || a) && this.stage.update(); this.isCommandValid = !1; this.colorLayerModel = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height); Entry.stateManager && this.firstStatement && Entry.stateManager.addCommand("edit sprite", this, this.restorePainter, this.colorLayerModel); this.firstStatement = !0; - a && (this.handle.visible = !0); - b && (this.coordinator.visible = !0); - (a || b) && this.stage.update(); + b && (this.handle.visible = !0); + a && (this.coordinator.visible = !0); + (b || a) && this.stage.update(); }; Entry.Painter.prototype.doCommand = function() { this.isCommandValid = !0; @@ -8607,20 +9055,20 @@ Entry.Painter.prototype.doCommand = function() { Entry.Painter.prototype.checkCommand = function() { this.isCommandValid || Entry.dispatchEvent("cancelLastCommand"); }; -Entry.Painter.prototype.restorePainter = function(a) { +Entry.Painter.prototype.restorePainter = function(b) { this.clearHandle(); - var b = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height); + var a = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height); this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); - this.ctx.putImageData(a, 0, 0); - a = new Image; - a.src = this.canvas.toDataURL(); + this.ctx.putImageData(b, 0, 0); + b = new Image; + b.src = this.canvas.toDataURL(); var c = this; - a.onload = function(b) { - b = new createjs.Bitmap(b.target); + b.onload = function(a) { + a = new createjs.Bitmap(a.target); c.objectContainer.removeAllChildren(); - c.objectContainer.addChild(b); + c.objectContainer.addChild(a); }; - Entry.stateManager && Entry.stateManager.addCommand("restore sprite", this, this.restorePainter, b); + Entry.stateManager && Entry.stateManager.addCommand("restore sprite", this, this.restorePainter, a); }; Entry.Painter.prototype.platten = function() { this.colorLayerData = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height); @@ -8632,19 +9080,19 @@ Entry.Painter.prototype.fill = function() { this.initCommand(); this.doCommand(); this.clearHandle(); - var a = this.canvas.width, b = this.canvas.height; - this.colorLayerData = this.ctx.getImageData(0, 0, a, b); + var b = this.canvas.width, a = this.canvas.height; + this.colorLayerData = this.ctx.getImageData(0, 0, b, a); var c = new createjs.Point(this.stage.mouseX, this.stage.mouseY); c.x = Math.round(c.x); c.y = Math.round(c.y); - for (var d = 4 * (c.y * a + c.x), e = this.colorLayerData.data[d], f = this.colorLayerData.data[d + 1], g = this.colorLayerData.data[d + 2], h = this.colorLayerData.data[d + 3], k, l, c = [[c.x, c.y]], q = Entry.hex2rgb(this.stroke.lineColor);c.length;) { - for (var d = c.pop(), n = d[0], m = d[1], d = 4 * (m * a + n);0 <= m && this.matchColor(d, e, f, g, h);) { - --m, d -= 4 * a; + for (var d = 4 * (c.y * b + c.x), e = this.colorLayerData.data[d], f = this.colorLayerData.data[d + 1], g = this.colorLayerData.data[d + 2], h = this.colorLayerData.data[d + 3], k, l, c = [[c.x, c.y]], n = Entry.hex2rgb(this.stroke.lineColor);c.length;) { + for (var d = c.pop(), m = d[0], q = d[1], d = 4 * (q * b + m);0 <= q && this.matchColor(d, e, f, g, h);) { + --q, d -= 4 * b; } - d += 4 * a; - m += 1; - for (l = k = !1;m < b - 1 && this.matchColor(d, e, f, g, h);) { - m += 1, this.colorPixel(d, q.r, q.g, q.b), 0 < n && (this.matchColor(d - 4, e, f, g, h) ? k || (c.push([n - 1, m]), k = !0) : k && (k = !1)), n < a - 1 && (this.matchColor(d + 4, e, f, g, h) ? l || (c.push([n + 1, m]), l = !0) : l && (l = !1)), d += 4 * a; + d += 4 * b; + q += 1; + for (l = k = !1;q < a - 1 && this.matchColor(d, e, f, g, h);) { + q += 1, this.colorPixel(d, n.r, n.g, n.b), 0 < m && (this.matchColor(d - 4, e, f, g, h) ? k || (c.push([m - 1, q]), k = !0) : k && (k = !1)), m < b - 1 && (this.matchColor(d + 4, e, f, g, h) ? l || (c.push([m + 1, q]), l = !0) : l && (l = !1)), d += 4 * b; } if (1080 < c.length) { break; @@ -8658,23 +9106,23 @@ Entry.Painter.prototype.reloadContext = function() { delete this.selectedObject; this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); this.ctx.putImageData(this.colorLayerData, 0, 0); - var a = new Image; - a.src = this.canvas.toDataURL(); - var b = this; - a.onload = function(a) { - a = new createjs.Bitmap(a.target); - b.objectContainer.removeAllChildren(); - b.objectContainer.addChild(a); - b.stroke.locked = !1; + var b = new Image; + b.src = this.canvas.toDataURL(); + var a = this; + b.onload = function(b) { + b = new createjs.Bitmap(b.target); + a.objectContainer.removeAllChildren(); + a.objectContainer.addChild(b); + a.stroke.locked = !1; }; }; Entry.Painter.prototype.move_pen = function() { - var a = new createjs.Point(this.oldPt.x + this.stage.mouseX >> 1, this.oldPt.y + this.stage.mouseY >> 1); - this.brush.graphics.setStrokeStyle(this.stroke.thickness, "round").beginStroke(this.stroke.lineColor).moveTo(a.x, a.y).curveTo(this.oldPt.x, this.oldPt.y, this.oldMidPt.x, this.oldMidPt.y); + var b = new createjs.Point(this.oldPt.x + this.stage.mouseX >> 1, this.oldPt.y + this.stage.mouseY >> 1); + this.brush.graphics.setStrokeStyle(this.stroke.thickness, "round").beginStroke(this.stroke.lineColor).moveTo(b.x, b.y).curveTo(this.oldPt.x, this.oldPt.y, this.oldMidPt.x, this.oldMidPt.y); this.oldPt.x = this.stage.mouseX; this.oldPt.y = this.stage.mouseY; - this.oldMidPt.x = a.x; - this.oldMidPt.y = a.y; + this.oldMidPt.x = b.x; + this.oldMidPt.y = b.y; this.file.modified = !0; this.stage.update(); }; @@ -8684,18 +9132,18 @@ Entry.Painter.prototype.move_line = function() { this.stage.update(); }; Entry.Painter.prototype.move_rect = function() { - var a = this.stage.mouseX - this.oldPt.x, b = this.stage.mouseY - this.oldPt.y; - event.shiftKey && (b = a); - this.stroke.fill ? 0 === this.stroke.thickness ? this.brush.graphics.clear().setStrokeStyle(this.stroke.thickness, "round").beginFill(this.stroke.fillColor).drawRect(this.oldPt.x, this.oldPt.y, a, b) : this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness, "round").beginFill(this.stroke.fillColor).drawRect(this.oldPt.x, this.oldPt.y, a, b) : 0 === this.stroke.thickness ? this.brush.graphics.clear().setStrokeStyle(this.stroke.thickness, "round").drawRect(this.oldPt.x, - this.oldPt.y, a, b) : this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness, "round").drawRect(this.oldPt.x, this.oldPt.y, a, b); + var b = this.stage.mouseX - this.oldPt.x, a = this.stage.mouseY - this.oldPt.y; + event.shiftKey && (a = b); + this.stroke.fill ? 0 === this.stroke.thickness ? this.brush.graphics.clear().setStrokeStyle(this.stroke.thickness, "round").beginFill(this.stroke.fillColor).drawRect(this.oldPt.x, this.oldPt.y, b, a) : this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness, "round").beginFill(this.stroke.fillColor).drawRect(this.oldPt.x, this.oldPt.y, b, a) : 0 === this.stroke.thickness ? this.brush.graphics.clear().setStrokeStyle(this.stroke.thickness, "round").drawRect(this.oldPt.x, + this.oldPt.y, b, a) : this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness, "round").drawRect(this.oldPt.x, this.oldPt.y, b, a); this.file.modified = !0; this.stage.update(); }; Entry.Painter.prototype.move_circle = function() { - var a = this.stage.mouseX - this.oldPt.x, b = this.stage.mouseY - this.oldPt.y; - event.shiftKey && (b = a); - this.stroke.fill ? 0 === this.stroke.thickness ? this.brush.graphics.clear().beginStroke(this.stroke.fillColor).setStrokeStyle(this.stroke.thickness, "round").beginFill(this.stroke.fillColor).drawEllipse(this.oldPt.x, this.oldPt.y, a, b) : this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness, "round").beginFill(this.stroke.fillColor).drawEllipse(this.oldPt.x, this.oldPt.y, a, b) : this.stroke.fill || (0 === this.stroke.thickness ? this.brush.graphics.clear().drawEllipse(this.oldPt.x, - this.oldPt.y, a, b) : this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness, "round").drawEllipse(this.oldPt.x, this.oldPt.y, a, b)); + var b = this.stage.mouseX - this.oldPt.x, a = this.stage.mouseY - this.oldPt.y; + event.shiftKey && (a = b); + this.stroke.fill ? 0 === this.stroke.thickness ? this.brush.graphics.clear().beginStroke(this.stroke.fillColor).setStrokeStyle(this.stroke.thickness, "round").beginFill(this.stroke.fillColor).drawEllipse(this.oldPt.x, this.oldPt.y, b, a) : this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness, "round").beginFill(this.stroke.fillColor).drawEllipse(this.oldPt.x, this.oldPt.y, b, a) : this.stroke.fill || (0 === this.stroke.thickness ? this.brush.graphics.clear().drawEllipse(this.oldPt.x, + this.oldPt.y, b, a) : this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness, "round").drawEllipse(this.oldPt.x, this.oldPt.y, b, a)); this.file.modified = !0; this.stage.update(); }; @@ -8708,18 +9156,18 @@ Entry.Painter.prototype.edit_cut = function() { 0), this.ctx.clearRect(this.selectArea.x1, this.selectArea.y1, this.selectArea.x2, this.selectArea.y2), this.colorLayerData = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height), this.reloadContext(), this.file.modified = !0) : alert("\uc790\ub97c \uc601\uc5ed\uc744 \uc120\ud0dd\ud558\uc138\uc694."); }; Entry.Painter.prototype.edit_paste = function() { - var a = new Image; - a.src = this.canvas_.toDataURL(); - var b = this; - a.onload = function(a) { - a = new createjs.Bitmap(a.target); - a.x = b.canvas.width / 2; - a.y = b.canvas.height / 2; - a.regX = b.copy.width / 2 | 0; - a.regY = b.copy.height / 2 | 0; - a.id = Entry.generateHash(); - b.objectContainer.addChild(a); - b.selectObject(a, !0); + var b = new Image; + b.src = this.canvas_.toDataURL(); + var a = this; + b.onload = function(b) { + b = new createjs.Bitmap(b.target); + b.x = a.canvas.width / 2; + b.y = a.canvas.height / 2; + b.regX = a.copy.width / 2 | 0; + b.regY = a.copy.height / 2 | 0; + b.id = Entry.generateHash(); + a.objectContainer.addChild(b); + a.selectObject(b, !0); }; this.file.modified = !0; }; @@ -8738,35 +9186,35 @@ Entry.Painter.prototype.edit_select = function() { this.colorLayerData = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height); this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); this.ctx.putImageData(this.colorLayerData, 0, 0); - var a = new Image; - a.src = this.canvas.toDataURL(); - var b = this; - a.onload = function(a) { - a = new createjs.Bitmap(a.target); - b.objectContainer.removeAllChildren(); - b.objectContainer.addChild(a); - a = new Image; - a.src = b.canvas_.toDataURL(); - a.onload = function(a) { - a = new createjs.Bitmap(a.target); - a.x = b.selectArea.x1 + b.copy.width / 2; - a.y = b.selectArea.y1 + b.copy.height / 2; - a.regX = b.copy.width / 2 | 0; - a.regY = b.copy.height / 2 | 0; - a.id = Entry.generateHash(); - a.name = a.id; - b.objectContainer.addChild(a); - b.selectObject(a, !0); + var b = new Image; + b.src = this.canvas.toDataURL(); + var a = this; + b.onload = function(b) { + b = new createjs.Bitmap(b.target); + a.objectContainer.removeAllChildren(); + a.objectContainer.addChild(b); + b = new Image; + b.src = a.canvas_.toDataURL(); + b.onload = function(b) { + b = new createjs.Bitmap(b.target); + b.x = a.selectArea.x1 + a.copy.width / 2; + b.y = a.selectArea.y1 + a.copy.height / 2; + b.regX = a.copy.width / 2 | 0; + b.regY = a.copy.height / 2 | 0; + b.id = Entry.generateHash(); + b.name = b.id; + a.objectContainer.addChild(b); + a.selectObject(b, !0); }; }; }; -Entry.Painter.prototype.move_erase = function(a) { - a = new createjs.Point(this.oldPt.x + this.stage.mouseX >> 1, this.oldPt.y + this.stage.mouseY >> 1); - this.eraser.graphics.setStrokeStyle(this.stroke.thickness, "round").beginStroke("#ffffff").moveTo(a.x, a.y).curveTo(this.oldPt.x, this.oldPt.y, this.oldMidPt.x, this.oldMidPt.y); +Entry.Painter.prototype.move_erase = function(b) { + b = new createjs.Point(this.oldPt.x + this.stage.mouseX >> 1, this.oldPt.y + this.stage.mouseY >> 1); + this.eraser.graphics.setStrokeStyle(this.stroke.thickness, "round").beginStroke("#ffffff").moveTo(b.x, b.y).curveTo(this.oldPt.x, this.oldPt.y, this.oldMidPt.x, this.oldMidPt.y); this.oldPt.x = this.stage.mouseX; this.oldPt.y = this.stage.mouseY; - this.oldMidPt.x = a.x; - this.oldMidPt.y = a.y; + this.oldMidPt.x = b.x; + this.oldMidPt.y = b.y; this.file.modified = !0; this.stage.update(); }; @@ -8775,111 +9223,111 @@ Entry.Painter.prototype.settingShapeBlur = function() { this.objectHeightInput.blur(); this.objectRotateInput.blur(); }; -Entry.Painter.prototype.stagemousedown = function(a) { - "picture" == Entry.playground.getViewMode() && (this.settingShapeBlur(), this.oldPt = new createjs.Point(a.stageX, a.stageY), this.oldMidPt = this.oldPt.clone(), "select" === this.toolbox.selected ? this.stage.addChild(this._handle) : "spoid" === this.toolbox.selected ? this.pickStrokeColor(a) : "text" === this.toolbox.selected ? (this.showInputField(a), this.stage.update()) : "erase" === this.toolbox.selected ? (this.createEraser(), this.stroke.enabled = !0) : "fill" === this.toolbox.selected ? +Entry.Painter.prototype.stagemousedown = function(b) { + "picture" == Entry.playground.getViewMode() && (this.settingShapeBlur(), this.oldPt = new createjs.Point(b.stageX, b.stageY), this.oldMidPt = this.oldPt.clone(), "select" === this.toolbox.selected ? this.stage.addChild(this._handle) : "spoid" === this.toolbox.selected ? this.pickStrokeColor(b) : "text" === this.toolbox.selected ? (this.showInputField(b), this.stage.update()) : "erase" === this.toolbox.selected ? (this.createEraser(), this.stroke.enabled = !0) : "fill" === this.toolbox.selected ? this.fill() : "cursor" !== this.toolbox.selected && (this.createBrush(), this.stroke.enabled = !0)); }; -Entry.Painter.prototype.stagemousemove = function(a) { - "picture" == Entry.playground.getViewMode() && ("select" === this.toolbox.selected && -1 < this.stage.getChildIndex(this._handle) ? (this.selectArea.x1 = this.oldPt.x, this.selectArea.y1 = this.oldPt.y, this.selectArea.x2 = a.stageX - this.oldPt.x, this.selectArea.y2 = a.stageY - this.oldPt.y, this.updateHandle_()) : this.stroke.enabled && (this.doCommand(), "pen" === this.toolbox.selected ? this.move_pen(a) : "line" === this.toolbox.selected ? this.move_line(a) : "rect" === this.toolbox.selected ? - this.move_rect(a) : "circle" === this.toolbox.selected ? this.move_circle(a) : "erase" === this.toolbox.selected && this.move_erase(a)), this.painterTopStageXY.innerHTML = "x:" + a.stageX.toFixed(1) + ", y:" + a.stageY.toFixed(1)); +Entry.Painter.prototype.stagemousemove = function(b) { + "picture" == Entry.playground.getViewMode() && ("select" === this.toolbox.selected && -1 < this.stage.getChildIndex(this._handle) ? (this.selectArea.x1 = this.oldPt.x, this.selectArea.y1 = this.oldPt.y, this.selectArea.x2 = b.stageX - this.oldPt.x, this.selectArea.y2 = b.stageY - this.oldPt.y, this.updateHandle_()) : this.stroke.enabled && (this.doCommand(), "pen" === this.toolbox.selected ? this.move_pen(b) : "line" === this.toolbox.selected ? this.move_line(b) : "rect" === this.toolbox.selected ? + this.move_rect(b) : "circle" === this.toolbox.selected ? this.move_circle(b) : "erase" === this.toolbox.selected && this.move_erase(b)), this.painterTopStageXY.innerHTML = "x:" + b.stageX.toFixed(1) + ", y:" + b.stageY.toFixed(1)); }; -Entry.Painter.prototype.stagemouseup = function(a) { - "picture" == Entry.playground.getViewMode() && ("select" === this.toolbox.selected ? (this.selectArea.x1 = this.oldPt.x, this.selectArea.y1 = this.oldPt.y, this.selectArea.x2 = a.stageX - this.oldPt.x, this.selectArea.y2 = a.stageY - this.oldPt.y, this.stage.removeChild(this._handle), this.stage.update(), 0 < this.selectArea.x2 && 0 < this.selectArea.y2 && this.edit_select(), this.selectToolbox("cursor")) : "cursor" !== this.toolbox.selected && this.stroke.enabled && (-1 < this.objectContainer.getChildIndex(this.eraser) && +Entry.Painter.prototype.stagemouseup = function(b) { + "picture" == Entry.playground.getViewMode() && ("select" === this.toolbox.selected ? (this.selectArea.x1 = this.oldPt.x, this.selectArea.y1 = this.oldPt.y, this.selectArea.x2 = b.stageX - this.oldPt.x, this.selectArea.y2 = b.stageY - this.oldPt.y, this.stage.removeChild(this._handle), this.stage.update(), 0 < this.selectArea.x2 && 0 < this.selectArea.y2 && this.edit_select(), this.selectToolbox("cursor")) : "cursor" !== this.toolbox.selected && this.stroke.enabled && (-1 < this.objectContainer.getChildIndex(this.eraser) && this.eraser.graphics.endStroke(), -1 < this.objectContainer.getChildIndex(this.brush) && this.brush.graphics.endStroke(), this.clearHandle(), this.platten(), this.stroke.enabled = !1, this.checkCommand())); }; -Entry.Painter.prototype.file_save = function(a) { +Entry.Painter.prototype.file_save = function(b) { this.clearHandle(); this.transparent(); this.trim(); - var b = this.canvas_.toDataURL(); - Entry.dispatchEvent("saveCanvasImage", {file:a ? this.file_ : this.file, image:b}); + var a = this.canvas_.toDataURL(); + Entry.dispatchEvent("saveCanvasImage", {file:b ? this.file_ : this.file, image:a}); this.file.modified = !1; }; Entry.Painter.prototype.transparent = function() { - var a = this.canvas.width, b = this.canvas.height; - this.colorLayerData = this.ctx.getImageData(0, 0, a, b); - var c = a * (b - 1) * 4, d = 4 * (a - 1), e = 4 * (a * b - 1); - this.matchColorOnly(0, 255, 255, 255) ? this.fillTransparent(1, 1) : this.matchColorOnly(c, 255, 255, 255) ? this.fillTransparent(1, b) : this.matchColorOnly(d, 255, 255, 255) ? this.fillTransparent(a, 1) : this.matchColorOnly(e, 255, 255, 255) && this.fillTransparent(a, b); -}; -Entry.Painter.prototype.fillTransparent = function(a, b) { - this.stage.mouseX = a; - this.stage.mouseY = b; + var b = this.canvas.width, a = this.canvas.height; + this.colorLayerData = this.ctx.getImageData(0, 0, b, a); + var c = b * (a - 1) * 4, d = 4 * (b - 1), e = 4 * (b * a - 1); + this.matchColorOnly(0, 255, 255, 255) ? this.fillTransparent(1, 1) : this.matchColorOnly(c, 255, 255, 255) ? this.fillTransparent(1, a) : this.matchColorOnly(d, 255, 255, 255) ? this.fillTransparent(b, 1) : this.matchColorOnly(e, 255, 255, 255) && this.fillTransparent(b, a); +}; +Entry.Painter.prototype.fillTransparent = function(b, a) { + this.stage.mouseX = b; + this.stage.mouseY = a; this.stroke.transparent = !0; this.fill(); }; Entry.Painter.prototype.trim = function() { - var a = this.canvas.width, b = this.ctx.getImageData(0, 0, a, this.canvas.height), c = b.data.length, d, e = null, f = null, g = null, h = null, k; + var b = this.canvas.width, a = this.ctx.getImageData(0, 0, b, this.canvas.height), c = a.data.length, d, e = null, f = null, g = null, h = null, k; for (d = 0;d < c;d += 4) { - 0 !== b.data[d + 3] && (g = d / 4 % a, k = ~~(d / 4 / a), null === e && (e = k), null === f ? f = g : g < f && (f = g), null === h ? h = k : h < k && (h = k)); + 0 !== a.data[d + 3] && (g = d / 4 % b, k = ~~(d / 4 / b), null === e && (e = k), null === f ? f = g : g < f && (f = g), null === h ? h = k : h < k && (h = k)); } - a = h - e; - b = g - f; + b = h - e; + a = g - f; c = null; - 0 === a || 0 === b ? (c = this.ctx.getImageData(0, 0, 1, 1), c.data[0] = 255, c.data[1] = 255, c.data[2] = 255, c.data[3] = 255, this.canvas_.width = 1, this.canvas_.height = 1) : (c = this.ctx.getImageData(f, e, b, a), this.canvas_.width = b, this.canvas_.height = a); + 0 === b || 0 === a ? (c = this.ctx.getImageData(0, 0, 1, 1), c.data[0] = 255, c.data[1] = 255, c.data[2] = 255, c.data[3] = 255, this.canvas_.width = 1, this.canvas_.height = 1) : (c = this.ctx.getImageData(f, e, a, b), this.canvas_.width = a, this.canvas_.height = b); this.ctx_.putImageData(c, 0, 0); }; -Entry.Painter.prototype.showInputField = function(a) { - this.inputField ? (Entry.dispatchEvent("textUpdate"), delete this.inputField) : (this.initCommand(), this.doCommand(), this.inputField = new CanvasInput({canvas:document.getElementById("entryPainterCanvas"), fontSize:20, fontFamily:this.font.name, fontColor:"#000", width:650, padding:8, borderWidth:1, borderColor:"#000", borderRadius:3, boxShadow:"1px 1px 0px #fff", innerShadow:"0px 0px 5px rgba(0, 0, 0, 0.5)", x:a.stageX, y:a.stageY, onsubmit:function() { +Entry.Painter.prototype.showInputField = function(b) { + this.inputField ? (Entry.dispatchEvent("textUpdate"), delete this.inputField) : (this.initCommand(), this.doCommand(), this.inputField = new CanvasInput({canvas:document.getElementById("entryPainterCanvas"), fontSize:20, fontFamily:this.font.name, fontColor:"#000", width:650, padding:8, borderWidth:1, borderColor:"#000", borderRadius:3, boxShadow:"1px 1px 0px #fff", innerShadow:"0px 0px 5px rgba(0, 0, 0, 0.5)", x:b.stageX, y:b.stageY, onsubmit:function() { Entry.dispatchEvent("textUpdate"); }}), this.inputField.show()); }; -Entry.Painter.prototype.addPicture = function(a) { +Entry.Painter.prototype.addPicture = function(b) { this.initCommand(); - var b = new Image; - b.id = Entry.generateHash(); - b.src = a.fileurl ? a.fileurl : Entry.defaultPath + "/uploads/" + a.filename.substring(0, 2) + "/" + a.filename.substring(2, 4) + "/image/" + a.filename + ".png"; + var a = new Image; + a.id = Entry.generateHash(); + a.src = b.fileurl ? b.fileurl : Entry.defaultPath + "/uploads/" + b.filename.substring(0, 2) + "/" + b.filename.substring(2, 4) + "/image/" + b.filename + ".png"; var c = this; - b.onload = function(b) { - c.addImage(b.target); + a.onload = function(a) { + c.addImage(a.target); c.selectToolbox("cursor"); }; }; Entry.Painter.prototype.initCoordinator = function() { - var a = new createjs.Container, b = new createjs.Bitmap(Entry.mediaFilePath + "/workspace_coordinate.png"); - a.addChild(b); - this.stage.addChild(a); - a.visible = !1; - this.coordinator = a; + var b = new createjs.Container, a = new createjs.Bitmap(Entry.mediaFilePath + "/workspace_coordinate.png"); + b.addChild(a); + this.stage.addChild(b); + b.visible = !1; + this.coordinator = b; }; Entry.Painter.prototype.toggleCoordinator = function() { this.coordinator.visible = !this.coordinator.visible; this.stage.update(); }; Entry.Painter.prototype.initDashedLine = function() { - createjs.Graphics.prototype.dashedLineTo = function(a, b, c, d, e) { - this.moveTo(a, b); - var f = c - a, g = d - b; + createjs.Graphics.prototype.dashedLineTo = function(b, a, c, d, e) { + this.moveTo(b, a); + var f = c - b, g = d - a; e = Math.floor(Math.sqrt(f * f + g * g) / e); for (var f = f / e, g = g / e, h = 0;h++ < e;) { - a += f, b += g, this[0 === h % 2 ? "moveTo" : "lineTo"](a, b); + b += f, a += g, this[0 === h % 2 ? "moveTo" : "lineTo"](b, a); } this[0 === h % 2 ? "moveTo" : "lineTo"](c, d); return this; }; - createjs.Graphics.prototype.drawDashedRect = function(a, b, c, d, e) { - this.moveTo(a, b); - c = a + c; - d = b + d; - this.dashedLineTo(a, b, c, b, e); - this.dashedLineTo(c, b, c, d, e); - this.dashedLineTo(c, d, a, d, e); - this.dashedLineTo(a, d, a, b, e); + createjs.Graphics.prototype.drawDashedRect = function(b, a, c, d, e) { + this.moveTo(b, a); + c = b + c; + d = a + d; + this.dashedLineTo(b, a, c, a, e); + this.dashedLineTo(c, a, c, d, e); + this.dashedLineTo(c, d, b, d, e); + this.dashedLineTo(b, d, b, a, e); return this; }; - createjs.Graphics.prototype.drawResizableDashedRect = function(a, b, c, d, e, f) { - this.moveTo(a, b); - c = a + c; - d = b + d; - this.dashedLineTo(a + f, b, c - f, b, e); - this.dashedLineTo(c, b + f, c, d - f, e); - this.dashedLineTo(c - f, d, a + f, d, e); - this.dashedLineTo(a, d - f, a, b + f, e); + createjs.Graphics.prototype.drawResizableDashedRect = function(b, a, c, d, e, f) { + this.moveTo(b, a); + c = b + c; + d = a + d; + this.dashedLineTo(b + f, a, c - f, a, e); + this.dashedLineTo(c, a + f, c, d - f, e); + this.dashedLineTo(c - f, d, b + f, d, e); + this.dashedLineTo(b, d - f, b, a + f, e); return this; }; }; -Entry.Painter.prototype.generateView = function(a) { - var b = this; - this.view_ = a; +Entry.Painter.prototype.generateView = function(b) { + var a = this; + this.view_ = b; if (!Entry.type || "workspace" == Entry.type) { this.view_.addClass("entryPainterWorkspace"); var c = Entry.createElement("div", "entryPainterTop"); @@ -8913,26 +9361,26 @@ Entry.Painter.prototype.generateView = function(a) { e = Entry.createElement("div", "entryPictureFlipX"); e.title = "\uc88c\uc6b0\ub4a4\uc9d1\uae30"; e.bindOnClick(function() { - b.selectedObject && (b.selectedObject.scaleX *= -1, b.selectedObject.text ? b.selectTextObject(b.selectedObject) : b.selectObject(b.selectedObject), b.updateImageHandle(), b.stage.update()); + a.selectedObject && (a.selectedObject.scaleX *= -1, a.selectedObject.text ? a.selectTextObject(a.selectedObject) : a.selectObject(a.selectedObject), a.updateImageHandle(), a.stage.update()); }); e.addClass("entryPlaygroundPainterFlipX"); this.flipObject.appendChild(e); e = Entry.createElement("div", "entryPictureFlipY"); e.title = "\uc0c1\ud558\ub4a4\uc9d1\uae30"; e.bindOnClick(function() { - b.selectedObject && (b.selectedObject.scaleY *= -1, b.selectedObject.text ? b.selectTextObject(b.selectedObject) : b.selectObject(b.selectedObject), b.updateImageHandle(), b.stage.update()); + a.selectedObject && (a.selectedObject.scaleY *= -1, a.selectedObject.text ? a.selectTextObject(a.selectedObject) : a.selectObject(a.selectedObject), a.updateImageHandle(), a.stage.update()); }); e.addClass("entryPlaygroundPainterFlipY"); this.flipObject.appendChild(e); - Entry.addEventListener("windowResized", function(b) { + Entry.addEventListener("windowResized", function(a) { var c = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; - b = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; - var d = parseInt(document.getElementById("entryCanvas").style.width), c = c - (d + 240), d = b - 349; - a.style.width = c + "px"; + a = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; + var d = parseInt(document.getElementById("entryCanvas").style.width), c = c - (d + 240), d = a - 349; + b.style.width = c + "px"; f.style.width = c - 54 + "px"; f.style.height = d + "px"; g.style.top = d + 30 + "px"; - g.style.height = b - d + "px"; + g.style.height = a - d + "px"; }); var h = Entry.createElement("nav", "entryPainterTopMenu"); h.addClass("entryPlaygroundPainterTopMenu"); @@ -8943,7 +9391,7 @@ Entry.Painter.prototype.generateView = function(a) { h.appendChild(k); h = Entry.createElement("a", "entryPainterTopMenuFileNew"); h.bindOnClick(function() { - b.newPicture(); + a.newPicture(); }); h.addClass("entryPlaygroundPainterTopMenuFileNew"); h.innerHTML = Lang.Workspace.new_picture; @@ -8958,7 +9406,7 @@ Entry.Painter.prototype.generateView = function(a) { k.appendChild(h); var l = Entry.createElement("a", "entryPainterTopMenuFileSave"); l.bindOnClick(function() { - b.file_save(!1); + a.file_save(!1); }); l.addClass("entryPainterTopMenuFileSave"); l.innerHTML = Lang.Workspace.painter_file_save; @@ -8967,8 +9415,8 @@ Entry.Painter.prototype.generateView = function(a) { k.appendChild(h); k = Entry.createElement("a", "entryPainterTopMenuFileSaveAs"); k.bindOnClick(function() { - b.file.mode = "new"; - b.file_save(!1); + a.file.mode = "new"; + a.file_save(!1); }); k.addClass("entryPlaygroundPainterTopMenuFileSaveAs"); k.innerHTML = Lang.Workspace.painter_file_saveas; @@ -8992,7 +9440,7 @@ Entry.Painter.prototype.generateView = function(a) { e.appendChild(k); h = Entry.createElement("a", "entryPainterTopMenuEditCopy"); h.bindOnClick(function() { - b.edit_copy(); + a.edit_copy(); }); h.addClass("entryPlaygroundPainterTopMenuEditCopy"); h.innerHTML = Lang.Workspace.copy_file; @@ -9001,7 +9449,7 @@ Entry.Painter.prototype.generateView = function(a) { e.appendChild(k); h = Entry.createElement("a", "entryPainterTopMenuEditCut"); h.bindOnClick(function() { - b.edit_cut(); + a.edit_cut(); }); h.addClass("entryPlaygroundPainterTopMenuEditCut"); h.innerHTML = Lang.Workspace.cut_picture; @@ -9010,7 +9458,7 @@ Entry.Painter.prototype.generateView = function(a) { e.appendChild(k); h = Entry.createElement("a", "entryPainterTopMenuEditPaste"); h.bindOnClick(function() { - b.edit_paste(); + a.edit_paste(); }); h.addClass("entryPlaygroundPainterTopMenuEditPaste"); h.innerHTML = Lang.Workspace.paste_picture; @@ -9021,7 +9469,7 @@ Entry.Painter.prototype.generateView = function(a) { e.addClass("entryPlaygroundPainterTopMenuEditEraseAll"); e.innerHTML = Lang.Workspace.remove_all; e.bindOnClick(function() { - b.clearCanvas(); + a.clearCanvas(); }); k.appendChild(e); this.painterTopStageXY = e = Entry.createElement("div", "entryPainterTopStageXY"); @@ -9046,69 +9494,69 @@ Entry.Painter.prototype.generateView = function(a) { this.toolboxCursor = Entry.createElement("li", "entryPainterToolboxCursor"); this.toolboxCursor.title = "\uc774\ub3d9"; this.toolboxCursor.bindOnClick(function() { - b.selectToolbox("cursor"); + a.selectToolbox("cursor"); }); this.toolboxCursor.addClass("entryPlaygroundPainterToolboxCursor"); c.appendChild(this.toolboxCursor); this.toolboxSelect = Entry.createElement("li", "entryPainterToolboxSelect"); this.toolboxSelect.title = "\uc790\ub974\uae30"; this.toolboxSelect.bindOnClick(function() { - b.selectToolbox("select"); + a.selectToolbox("select"); }); this.toolboxSelect.addClass("entryPlaygroundPainterToolboxSelect"); c.appendChild(this.toolboxSelect); this.toolboxPen = Entry.createElement("li", "entryPainterToolboxPen"); this.toolboxPen.title = "\ud39c"; this.toolboxPen.bindOnClick(function() { - b.selectToolbox("pen"); + a.selectToolbox("pen"); }); this.toolboxPen.addClass("entryPlaygroundPainterToolboxPen"); c.appendChild(this.toolboxPen); this.toolboxLine = Entry.createElement("li", "entryPainterToolboxLine"); this.toolboxLine.title = "\uc9c1\uc120"; this.toolboxLine.bindOnClick(function() { - b.selectToolbox("line"); + a.selectToolbox("line"); }); this.toolboxLine.addClass("entryPlaygroundPainterToolboxLine"); c.appendChild(this.toolboxLine); this.toolboxRect = Entry.createElement("li", "entryPainterToolboxRect"); this.toolboxRect.title = "\uc0ac\uac01\ud615"; this.toolboxRect.bindOnClick(function() { - b.selectToolbox("rect"); + a.selectToolbox("rect"); }); this.toolboxRect.addClass("entryPlaygroundPainterToolboxRect"); c.appendChild(this.toolboxRect); this.toolboxCircle = Entry.createElement("li", "entryPainterToolboxCircle"); this.toolboxCircle.title = "\uc6d0"; this.toolboxCircle.bindOnClick(function() { - b.selectToolbox("circle"); + a.selectToolbox("circle"); }); this.toolboxCircle.addClass("entryPlaygroundPainterToolboxCircle"); c.appendChild(this.toolboxCircle); this.toolboxText = Entry.createElement("li", "entryPainterToolboxText"); this.toolboxText.title = "\uae00\uc0c1\uc790"; this.toolboxText.bindOnClick(function() { - b.selectToolbox("text"); + a.selectToolbox("text"); }); this.toolboxText.addClass("entryPlaygroundPainterToolboxText"); c.appendChild(this.toolboxText); this.toolboxFill = Entry.createElement("li", "entryPainterToolboxFill"); this.toolboxFill.bindOnClick(function() { - b.selectToolbox("fill"); + a.selectToolbox("fill"); }); this.toolboxFill.addClass("entryPlaygroundPainterToolboxFill"); c.appendChild(this.toolboxFill); this.toolboxErase = Entry.createElement("li", "entryPainterToolboxErase"); this.toolboxErase.title = "\uc9c0\uc6b0\uae30"; this.toolboxErase.bindOnClick(function() { - b.selectToolbox("erase"); + a.selectToolbox("erase"); }); this.toolboxErase.addClass("entryPlaygroundPainterToolboxErase"); c.appendChild(this.toolboxErase); d = Entry.createElement("li", "entryPainterToolboxCoordinate"); d.title = "\uc88c\ud45c"; d.bindOnClick(function() { - b.toggleCoordinator(); + a.toggleCoordinator(); }); d.addClass("entryPlaygroundPainterToolboxCoordinate"); c.appendChild(d); @@ -9130,8 +9578,8 @@ Entry.Painter.prototype.generateView = function(a) { if (isNaN(this.value)) { return alert("\uc22b\uc790\ub9cc \uc785\ub825 \uac00\ub2a5\ud569\ub2c8\ub2e4."), !1; } - b.handle.width = this.value; - b.updateImageHandle(); + a.handle.width = this.value; + a.updateImageHandle(); }; this.objectWidthInput.addClass("entryPlaygroundPainterNumberInput"); d.appendChild(this.objectWidthInput); @@ -9151,8 +9599,8 @@ Entry.Painter.prototype.generateView = function(a) { if (isNaN(this.value)) { return alert("\uc22b\uc790\ub9cc \uc785\ub825 \uac00\ub2a5\ud569\ub2c8\ub2e4."), !1; } - b.handle.height = this.value; - b.updateImageHandle(); + a.handle.height = this.value; + a.updateImageHandle(); }; this.objectHeightInput.addClass("entryPlaygroundPainterNumberInput"); d.appendChild(this.objectHeightInput); @@ -9176,8 +9624,8 @@ Entry.Painter.prototype.generateView = function(a) { return alert("\uc22b\uc790\ub9cc \uc785\ub825 \uac00\ub2a5\ud569\ub2c8\ub2e4."), !1; } 360 <= this.value ? this.value %= 360 : 0 > this.value && (this.value = 360 + this.value % 360); - b.handle.rotation = this.value; - b.updateImageHandle(); + a.handle.rotation = this.value; + a.updateImageHandle(); }; this.objectRotateInput.addClass("entryPlaygroundPainterNumberInput"); this.objectRotateInput.defaultValue = "0"; @@ -9185,9 +9633,9 @@ Entry.Painter.prototype.generateView = function(a) { this.attrColorArea = Entry.createElement("fieldset", "entryPainterAttrColor"); this.attrColorArea.addClass("entryPlaygroundPainterAttrColor"); g.appendChild(this.attrColorArea); - var q = Entry.createElement("div"); - q.addClass("entryPlaygroundPainterAttrColorContainer"); - this.attrColorArea.appendChild(q); + var n = Entry.createElement("div"); + n.addClass("entryPlaygroundPainterAttrColorContainer"); + this.attrColorArea.appendChild(n); this.attrCircleArea = Entry.createElement("div"); this.attrCircleArea.addClass("painterAttrCircleArea"); g.appendChild(this.attrCircleArea); @@ -9201,20 +9649,20 @@ Entry.Painter.prototype.generateView = function(a) { this.attrCircleArea.appendChild(d); this.attrColorSpoid = Entry.createElement("div"); this.attrColorSpoid.bindOnClick(function() { - b.selectToolbox("spoid"); + a.selectToolbox("spoid"); }); this.attrColorSpoid.addClass("painterAttrColorSpoid"); g.appendChild(this.attrColorSpoid); - Entry.getColourCodes().forEach(function(a) { + Entry.getColourCodes().forEach(function(b) { var c = Entry.createElement("div"); c.addClass("entryPlaygroundPainterAttrColorElement"); - "transparent" === a ? c.style.backgroundImage = "url(" + (Entry.mediaFilePath + "/transparent.png") + ")" : c.style.backgroundColor = a; + "transparent" === b ? c.style.backgroundImage = "url(" + (Entry.mediaFilePath + "/transparent.png") + ")" : c.style.backgroundColor = b; c.bindOnClick(function(c) { - "transparent" === a ? (b.stroke.transparent = !0, b.stroke.lineColor = "#ffffff") : (b.stroke.transparent = !1, r && (document.getElementById("entryPainterShapeBackgroundColor").style.backgroundColor = a, b.stroke.fillColor = a), r || (document.getElementById("entryPainterShapeLineColor").style.backgroundColor = a, b.stroke.lineColor = a)); - document.getElementById("entryPainterAttrCircle").style.backgroundColor = b.stroke.lineColor; - document.getElementById("entryPainterAttrCircleInput").value = a; + "transparent" === b ? (a.stroke.transparent = !0, a.stroke.lineColor = "#ffffff") : (a.stroke.transparent = !1, r && (document.getElementById("entryPainterShapeBackgroundColor").style.backgroundColor = b, a.stroke.fillColor = b), r || (document.getElementById("entryPainterShapeLineColor").style.backgroundColor = b, a.stroke.lineColor = b)); + document.getElementById("entryPainterAttrCircle").style.backgroundColor = a.stroke.lineColor; + document.getElementById("entryPainterAttrCircleInput").value = b; }); - q.appendChild(c); + n.appendChild(c); }); this.attrThickArea = Entry.createElement("div", "painterAttrThickArea"); this.attrThickArea.addClass("entryPlaygroundentryPlaygroundPainterAttrThickArea"); @@ -9223,31 +9671,31 @@ Entry.Painter.prototype.generateView = function(a) { d.addClass("painterAttrThickName"); d.innerHTML = Lang.Workspace.thickness; this.attrThickArea.appendChild(d); - var n = Entry.createElement("fieldset", "entryPainterAttrThick"); - n.addClass("entryPlaygroundPainterAttrThick"); - this.attrThickArea.appendChild(n); + var m = Entry.createElement("fieldset", "entryPainterAttrThick"); + m.addClass("entryPlaygroundPainterAttrThick"); + this.attrThickArea.appendChild(m); d = Entry.createElement("div"); d.addClass("paintAttrThickTop"); - n.appendChild(d); + m.appendChild(d); e = Entry.createElement("select", "entryPainterAttrThick"); e.addClass("entryPlaygroundPainterAttrThickInput"); e.size = "1"; - e.onchange = function(a) { - b.stroke.thickness = a.target.value; + e.onchange = function(b) { + a.stroke.thickness = b.target.value; }; for (d = 1;10 >= d;d++) { c = Entry.createElement("option"), c.value = d, c.innerHTML = d, e.appendChild(c); } - n.appendChild(e); + m.appendChild(e); d = Entry.createElement("div", "entryPainterShapeLineColor"); d.addClass("painterAttrShapeLineColor"); c = Entry.createElement("div", "entryPainterShapeInnerBackground"); c.addClass("painterAttrShapeInnerBackground"); d.appendChild(c); - n.appendChild(d); + m.appendChild(d); this.attrThickArea.painterAttrShapeLineColor = d; - n.bindOnClick(function() { - m.style.zIndex = "1"; + m.bindOnClick(function() { + q.style.zIndex = "1"; this.style.zIndex = "10"; r = !1; }); @@ -9260,13 +9708,13 @@ Entry.Painter.prototype.generateView = function(a) { c = Entry.createElement("div"); c.addClass("paintAttrBackgroundTop"); d.appendChild(c); - var m = Entry.createElement("div", "entryPainterShapeBackgroundColor"); - m.addClass("painterAttrShapeBackgroundColor"); - this.attrBackgroundArea.painterAttrShapeBackgroundColor = m; - c.appendChild(m); + var q = Entry.createElement("div", "entryPainterShapeBackgroundColor"); + q.addClass("painterAttrShapeBackgroundColor"); + this.attrBackgroundArea.painterAttrShapeBackgroundColor = q; + c.appendChild(q); var r = !1; - m.bindOnClick(function(b) { - n.style.zIndex = "1"; + q.bindOnClick(function(a) { + m.style.zIndex = "1"; this.style.zIndex = "10"; r = !0; }); @@ -9285,8 +9733,8 @@ Entry.Painter.prototype.generateView = function(a) { k = Entry.createElement("select", "entryPainterAttrFontName"); k.addClass("entryPlaygroundPainterAttrFontName"); k.size = "1"; - k.onchange = function(a) { - b.font.name = a.target.value; + k.onchange = function(b) { + a.font.name = b.target.value; }; for (d = 0;d < Entry.fonts.length;d++) { h = Entry.fonts[d], c = Entry.createElement("option"), c.value = h.family, c.innerHTML = h.name, k.appendChild(c); @@ -9301,8 +9749,8 @@ Entry.Painter.prototype.generateView = function(a) { k = Entry.createElement("select", "entryPainterAttrFontSize"); k.addClass("entryPlaygroundPainterAttrFontSize"); k.size = "1"; - k.onchange = function(a) { - b.font.size = a.target.value; + k.onchange = function(b) { + a.font.size = b.target.value; }; for (d = 20;72 >= d;d++) { c = Entry.createElement("option"), c.value = d, c.innerHTML = d, k.appendChild(c); @@ -9317,8 +9765,8 @@ Entry.Painter.prototype.generateView = function(a) { k = Entry.createElement("select", "entryPainterAttrFontStyle"); k.addClass("entryPlaygroundPainterAttrFontStyle"); k.size = "1"; - k.onchange = function(a) { - b.font.style = a.target.value; + k.onchange = function(b) { + a.font.style = b.target.value; }; h = [{label:"\ubcf4\ud1b5", value:"normal"}, {label:"\uad75\uac8c", value:"bold"}, {label:"\uae30\uc6b8\uc784", value:"italic"}]; for (d = 0;d < h.length;d++) { @@ -9328,40 +9776,40 @@ Entry.Painter.prototype.generateView = function(a) { this.attrLineArea = Entry.createElement("div", "painterAttrLineStyle"); this.attrLineArea.addClass("entryPlaygroundPainterAttrLineStyle"); g.appendChild(this.attrLineArea); - var t = Entry.createElement("div"); - t.addClass("entryPlaygroundPainterAttrLineStyleLine"); - this.attrLineArea.appendChild(t); var u = Entry.createElement("div"); - u.addClass("entryPlaygroundPaitnerAttrLineArea"); + u.addClass("entryPlaygroundPainterAttrLineStyleLine"); this.attrLineArea.appendChild(u); + var t = Entry.createElement("div"); + t.addClass("entryPlaygroundPaitnerAttrLineArea"); + this.attrLineArea.appendChild(t); d = Entry.createElement("div"); d.addClass("entryPlaygroundPainterAttrLineStyleLine1"); - u.appendChild(d); + t.appendChild(d); d.value = "line"; var v = Entry.createElement("div"); v.addClass("painterAttrLineStyleBackgroundLine"); - t.bindOnClick(function(b) { - u.removeClass("entryRemove"); + u.bindOnClick(function(a) { + t.removeClass("entryRemove"); }); - u.blur = function(b) { + t.blur = function(a) { this.addClass("entryRemove"); }; - u.onmouseleave = function(b) { + t.onmouseleave = function(a) { this.addClass("entryRemove"); }; - d.bindOnClick(function(b) { - this.attrLineArea.removeClass(t); + d.bindOnClick(function(a) { + this.attrLineArea.removeClass(u); this.attrLineArea.appendChild(v); - this.attrLineArea.onchange(b); - u.blur(); + this.attrLineArea.onchange(a); + t.blur(); }); - v.bindOnClick(function(b) { - u.removeClass("entryRemove"); + v.bindOnClick(function(a) { + t.removeClass("entryRemove"); }); - this.attrLineArea.onchange = function(a) { - b.stroke.style = a.target.value; + this.attrLineArea.onchange = function(b) { + a.stroke.style = b.target.value; }; - u.blur(); + t.blur(); } }; Entry.Painter.prototype.restoreHandle = function() { @@ -9405,13 +9853,13 @@ Entry.Painter.prototype.initDisplay = function() { this.attrCircleArea.painterAttrCircle.addClass("entryRemove"); this.inputField && !this.inputField._isHidden && (this.inputField.hide(), this.stage.update()); }; -Entry.Painter.prototype.selectToolbox = function(a) { - this.toolbox.selected = a; - "erase" != a && $(".entryPlaygroundPainterContainer").removeClass("dd"); +Entry.Painter.prototype.selectToolbox = function(b) { + this.toolbox.selected = b; + "erase" != b && $(".entryPlaygroundPainterContainer").removeClass("dd"); this.initDisplay(); - "cursor" !== a && this.clearHandle(); - "text" !== a && this.inputField && delete this.inputField; - switch(a) { + "cursor" !== b && this.clearHandle(); + "text" !== b && this.inputField && delete this.inputField; + switch(b) { case "cursor": this.restoreHandle(); this.toolboxCursor.addClass("entryToolboxCursorClicked"); @@ -9489,3305 +9937,2769 @@ Entry.Painter.prototype.selectToolbox = function(a) { this.toggleCoordinator(); } }; -Entry.Playground = function() { - this.menuBlocks_ = {}; - this.enableArduino = this.isTextBGMode_ = !1; - this.viewMode_ = "default"; - Entry.addEventListener("textEdited", this.injectText); - Entry.addEventListener("entryBlocklyChanged", this.editBlock); - Entry.addEventListener("entryBlocklyMouseUp", this.mouseupBlock); - Entry.addEventListener("hwChanged", this.updateHW); +Entry.BlockParser = function(b) { + this.syntax = b; + this._iterVariableCount = 0; + this._iterVariableChunk = ["i", "j", "k"]; }; -Entry.Playground.prototype.generateView = function(a, b) { - this.view_ = a; - this.view_.addClass("entryPlayground"); - if (b && "workspace" != b) { - "phone" == b && (this.view_.addClass("entryPlaygroundPhone"), c = Entry.createElement("div", "entryCategoryTab"), c.addClass("entryPlaygroundTabPhone"), Entry.view_.insertBefore(c, this.view_), this.generateTabView(c), this.tabView_ = c, c = Entry.createElement("div", "entryCurtain"), c.addClass("entryPlaygroundCurtainPhone"), c.addClass("entryRemove"), c.innerHTML = Lang.Workspace.cannot_edit_click_to_stop, c.bindOnClick(function() { - Entry.engine.toggleStop(); - }), this.view_.appendChild(c), this.curtainView_ = c, Entry.pictureEditable && (c = Entry.createElement("div", "entryPicture"), c.addClass("entryPlaygroundPicturePhone"), c.addClass("entryRemove"), this.view_.appendChild(c), this.generatePictureView(c), this.pictureView_ = c), c = Entry.createElement("div", "entryText"), c.addClass("entryRemove"), this.view_.appendChild(c), this.generateTextView(c), this.textView_ = c, Entry.soundEditable && (c = Entry.createElement("div", "entrySound"), c.addClass("entryPlaygroundSoundWorkspacePhone"), - c.addClass("entryRemove"), this.view_.appendChild(c), this.generateSoundView(c), this.soundView_ = c), c = Entry.createElement("div", "entryDefault"), this.view_.appendChild(c), this.generateDefaultView(c), this.defaultView_ = c, c = Entry.createElement("div", "entryCode"), c.addClass("entryPlaygroundCodePhone"), this.view_.appendChild(c), this.generateCodeView(c), this.codeView_ = this.codeView_ = c, Entry.addEventListener("run", function(b) { - Entry.playground.curtainView_.removeClass("entryRemove"); - }), Entry.addEventListener("stop", function(b) { - Entry.playground.curtainView_.addClass("entryRemove"); - })); - } else { - this.view_.addClass("entryPlaygroundWorkspace"); - var c = Entry.createElement("div", "entryCategoryTab"); - c.addClass("entryPlaygroundTabWorkspace"); - this.view_.appendChild(c); - this.generateTabView(c); - this.tabView_ = c; - c = Entry.createElement("div", "entryCurtain"); - c.addClass("entryPlaygroundCurtainWorkspace"); - c.addClass("entryRemove"); - var d = Lang.Workspace.cannot_edit_click_to_stop.split("."); - c.innerHTML = d[0] + ".
" + d[1]; - c.addEventListener("click", function() { - Entry.engine.toggleStop(); - }); - this.view_.appendChild(c); - this.curtainView_ = c; - Entry.pictureEditable && (c = Entry.createElement("div", "entryPicture"), c.addClass("entryPlaygroundPictureWorkspace"), c.addClass("entryRemove"), this.view_.appendChild(c), this.generatePictureView(c), this.pictureView_ = c); - c = Entry.createElement("div", "entryText"); - c.addClass("entryPlaygroundTextWorkspace"); - c.addClass("entryRemove"); - this.view_.appendChild(c); - this.generateTextView(c); - this.textView_ = c; - Entry.soundEditable && (c = Entry.createElement("div", "entrySound"), c.addClass("entryPlaygroundSoundWorkspace"), c.addClass("entryRemove"), this.view_.appendChild(c), this.generateSoundView(c), this.soundView_ = c); - c = Entry.createElement("div", "entryDefault"); - c.addClass("entryPlaygroundDefaultWorkspace"); - this.view_.appendChild(c); - this.generateDefaultView(c); - this.defaultView_ = c; - c = Entry.createElement("div", "entryCode"); - c.addClass("entryPlaygroundCodeWorkspace"); - c.addClass("entryRemove"); - this.view_.appendChild(c); - this.generateCodeView(c); - this.codeView_ = c; - d = Entry.createElement("div"); - d.addClass("entryPlaygroundResizeWorkspace", "entryRemove"); - this.resizeHandle_ = d; - this.view_.appendChild(d); - this.initializeResizeHandle(d); - this.codeView_ = c; - Entry.addEventListener("run", function(b) { - Entry.playground.curtainView_.removeClass("entryRemove"); +(function(b) { + b.Code = function(a) { + if (a instanceof Entry.Thread) { + return this.Thread(a); + } + if (a instanceof Entry.Block) { + return this.Block(a); + } + var b = ""; + a = a.getThreads(); + for (var d = 0;d < a.length;d++) { + b += this.Thread(a[d]); + } + return b; + }; + b.Thread = function(a) { + if (a instanceof Entry.Block) { + return this.Block(a); + } + var b = ""; + a = a.getBlocks(); + for (var d = 0;d < a.length;d++) { + b += this.Block(a[d]); + } + return b; + }; + b.Block = function(a) { + var b = a._schema.syntax; + return b ? this[b[0]](a) : ""; + }; + b.Program = function(a) { + return ""; + }; + b.Scope = function(a) { + a = a._schema.syntax.concat(); + return a.splice(1, a.length - 1).join(".") + "();\n"; + }; + b.BasicFunction = function(a) { + a = this.Thread(a.statements[0]); + return "function promise() {\n" + this.indent(a) + "}\n"; + }; + b.BasicIteration = function(a) { + var b = a.params[0], d = this.publishIterateVariable(); + a = this.Thread(a.statements[0]); + this.unpublishIterateVariable(); + return "for (var " + d + " = 0; " + d + " < " + b + "; " + d + "++){\n" + this.indent(a) + "}\n"; + }; + b.BasicIf = function(a) { + var b = this.Thread(a.statements[0]); + return "if (" + a._schema.syntax.concat()[1] + ") {\n" + this.indent(b) + "}\n"; + }; + b.BasicWhile = function(a) { + var b = this.Thread(a.statements[0]); + return "while (" + a._schema.syntax.concat()[1] + ") {\n" + this.indent(b) + "}\n"; + }; + b.indent = function(a) { + var b = " "; + a = a.split("\n"); + a.pop(); + return b += a.join("\n ") + "\n"; + }; + b.publishIterateVariable = function() { + var a = "", b = this._iterVariableCount; + do { + a = this._iterVariableChunk[b % 3] + a, b = parseInt(b / 3) - 1, 0 === b && (a = this._iterVariableChunk[0] + a); + } while (0 < b); + this._iterVariableCount++; + return a; + }; + b.unpublishIterateVariable = function() { + this._iterVariableCount && this._iterVariableCount--; + }; +})(Entry.BlockParser.prototype); +Entry.JSParser = function(b) { + this.syntax = b; + this.scopeChain = []; + this.scope = null; +}; +(function(b) { + b.Program = function(a) { + var b = [], d = []; + d.push({type:this.syntax.Program}); + var e = this.initScope(a), d = d.concat(this.BlockStatement(a)); + this.unloadScope(); + b.push(d); + return b = b.concat(e); + }; + b.Identifier = function(a, b) { + return b ? b[a.name] : this.scope[a.name]; + }; + b.ExpressionStatement = function(a) { + a = a.expression; + return this[a.type](a); + }; + b.ForStatement = function(a) { + var b = a.init, d = a.test, e = a.update, f = a.body; + if (this.syntax.ForStatement) { + throw {message:"\uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + } + var f = this[f.type](f), b = b.declarations[0].init.value, g = d.operator, d = d.right.value, h = 0; + "++" != e.operator && (e = b, b = d, d = e); + switch(g) { + case "<": + h = d - b; + break; + case "<=": + h = d + 1 - b; + break; + case ">": + h = b - d; + break; + case ">=": + h = b + 1 - d; + } + return this.BasicIteration(a, h, f); + }; + b.BlockStatement = function(a) { + var b = []; + a = a.body; + for (var d = 0;d < a.length;d++) { + var e = a[d], f = this[e.type](e); + if (f) { + if (void 0 === f.type) { + throw {message:"\ud574\ub2f9\ud558\ub294 \ube14\ub85d\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.", node:e}; + } + f && b.push(f); + } + } + return b; + }; + b.EmptyStatement = function(a) { + throw {message:"empty\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.DebuggerStatement = function(a) { + throw {message:"debugger\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.WithStatement = function(a) { + throw {message:"with\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.ReturnStaement = function(a) { + throw {message:"return\uc740 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.LabeledStatement = function(a) { + throw {message:"label\uc740 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.BreakStatement = function(a) { + throw {message:"break\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.ContinueStatement = function(a) { + throw {message:"continue\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.IfStatement = function(a) { + if (this.syntax.IfStatement) { + throw {message:"if\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + } + return this.BasicIf(a); + }; + b.SwitchStatement = function(a) { + throw {message:"switch\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.SwitchCase = function(a) { + throw {message:"switch ~ case\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.ThrowStatement = function(a) { + throw {message:"throw\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.TryStatement = function(a) { + throw {message:"try\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.CatchClause = function(a) { + throw {message:"catch\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.WhileStatement = function(a) { + var b = a.body, d = this.syntax.WhileStatement, b = this[b.type](b); + if (d) { + throw {message:"while\uc740 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + } + return this.BasicWhile(a, b); + }; + b.DoWhileStatement = function(a) { + throw {message:"do ~ while\uc740 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.ForInStatement = function(a) { + throw {message:"for ~ in\uc740 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.FunctionDeclaration = function(a) { + if (this.syntax.FunctionDeclaration) { + throw {message:"function\uc740 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + } + return null; + }; + b.VariableDeclaration = function(a) { + throw {message:"var\uc740 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.ThisExpression = function(a) { + return this.scope.this; + }; + b.ArrayExpression = function(a) { + throw {message:"array\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.ObjectExpression = function(a) { + throw {message:"object\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.Property = function(a) { + throw {message:"init, get, set\uc740 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.FunctionExpression = function(a) { + throw {message:"function\uc740 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.UnaryExpression = function(a) { + throw {message:a.operator + "\uc740(\ub294) \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uba85\ub839\uc5b4 \uc785\ub2c8\ub2e4.", node:a}; + }; + b.UnaryOperator = function() { + return "- + ! ~ typeof void delete".split(" "); + }; + b.updateOperator = function() { + return ["++", "--"]; + }; + b.BinaryOperator = function() { + return "== != === !== < <= > >= << >> >>> + - * / % , ^ & in instanceof".split(" "); + }; + b.AssignmentExpression = function(a) { + throw {message:a.operator + "\uc740(\ub294) \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uba85\ub839\uc5b4 \uc785\ub2c8\ub2e4.", node:a}; + }; + b.AssignmentOperator = function() { + return "= += -= *= /= %= <<= >>= >>>= ,= ^= &=".split(" "); + }; + b.LogicalExpression = function(a) { + throw {message:a.operator + "\uc740(\ub294) \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uba85\ub839\uc5b4 \uc785\ub2c8\ub2e4.", node:a}; + }; + b.LogicalOperator = function() { + return ["||", "&&"]; + }; + b.MemberExpression = function(a) { + var b = a.object, d = a.property; + console.log(b.type); + b = this[b.type](b); + console.log(b); + d = this[d.type](d, b); + if (Object(b) !== b || Object.getPrototypeOf(b) !== Object.prototype) { + throw {message:b + "\uc740(\ub294) \uc798\ubabb\ub41c \uba64\ubc84 \ubcc0\uc218\uc785\ub2c8\ub2e4.", node:a}; + } + b = d; + if (!b) { + throw {message:d + "\uc774(\uac00) \uc874\uc7ac\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.", node:a}; + } + return b; + }; + b.ConditionalExpression = function(a) { + throw {message:"\uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.UpdateExpression = function(a) { + throw {message:a.operator + "\uc740(\ub294) \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uba85\ub801\uc5b4 \uc785\ub2c8\ub2e4.", node:a}; + }; + b.CallExpression = function(a) { + a = a.callee; + return {type:this[a.type](a)}; + }; + b.NewExpression = function(a) { + throw {message:"new\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.SequenceExpression = function(a) { + throw {message:"\uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + }; + b.initScope = function(a) { + if (null === this.scope) { + var b = function() { + }; + b.prototype = this.syntax.Scope; + } else { + b = function() { + }, b.prototype = this.scope; + } + this.scope = new b; + this.scopeChain.push(this.scope); + return this.scanDefinition(a); + }; + b.unloadScope = function() { + this.scopeChain.pop(); + this.scope = this.scopeChain.length ? this.scopeChain[this.scopeChain.length - 1] : null; + }; + b.scanDefinition = function(a) { + a = a.body; + for (var b = [], d = 0;d < a.length;d++) { + var e = a[d]; + "FunctionDeclaration" === e.type && (this.scope[e.id.name] = this.scope.promise, this.syntax.BasicFunction && (e = e.body, b.push([{type:this.syntax.BasicFunction, statements:[this[e.type](e)]}]))); + } + return b; + }; + b.BasicFunction = function(a, b) { + return null; + }; + b.BasicIteration = function(a, b, d) { + var e = this.syntax.BasicIteration; + if (!e) { + throw {message:"\uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a}; + } + return {params:[b], type:e, statements:[d]}; + }; + b.BasicWhile = function(a, b) { + var d = a.test.raw; + if (this.syntax.BasicWhile[d]) { + return {type:this.syntax.BasicWhile[d], statements:[b]}; + } + throw {message:"\uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a.test}; + }; + b.BasicIf = function(a) { + var b = a.consequent, b = this[b.type](b); + try { + var d = "", e = "===" === a.test.operator ? "==" : a.test.operator; + if ("Identifier" === a.test.left.type && "Literal" === a.test.right.type) { + d = a.test.left.name + " " + e + " " + a.test.right.raw; + } else { + if ("Literal" === a.test.left.type && "Identifier" === a.test.right.type) { + d = a.test.right.name + " " + e + " " + a.test.left.raw; + } else { + throw Error(); + } + } + if (this.syntax.BasicIf[d]) { + return Array.isArray(b) || "object" !== typeof b || (b = [b]), {type:this.syntax.BasicIf[d], statements:[b]}; + } + throw Error(); + } catch (f) { + throw {message:"\uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", node:a.test}; + } + }; +})(Entry.JSParser.prototype); +Entry.Parser = function(b, a, c) { + this._mode = b; + this.syntax = {}; + this.codeMirror = c; + this._lang = a || "js"; + this.availableCode = []; + "maze" === b && (this._stageId = Number(Ntry.configManager.getConfig("stageId")), "object" == typeof NtryData && this.setAvailableCode(NtryData.config[this._stageId].availableCode, NtryData.player[this._stageId].code)); + this.mappingSyntax(b); + switch(this._lang) { + case "js": + this._parser = new Entry.JSParser(this.syntax); + a = this.syntax; + var d = {}, e; + for (e in a.Scope) { + d[e + "();\n"] = a.Scope[e]; + } + "BasicIf" in a && (d.front = "BasicIf"); + CodeMirror.commands.javascriptComplete = function(a) { + CodeMirror.showHint(a, null, {globalScope:d}); + }; + c.on("keyup", function(a, b) { + !a.state.completionActive && 65 <= b.keyCode && 95 >= b.keyCode && CodeMirror.showHint(a, null, {completeSingle:!1, globalScope:d}); + }); + break; + case "block": + this._parser = new Entry.BlockParser(this.syntax); + } +}; +(function(b) { + b.parse = function(a) { + var b = null; + switch(this._lang) { + case "js": + try { + var d = acorn.parse(a), b = this._parser.Program(d); + } catch (e) { + this.codeMirror && (e instanceof SyntaxError ? (a = {from:{line:e.loc.line - 1, ch:e.loc.column - 2}, to:{line:e.loc.line - 1, ch:e.loc.column + 1}}, e.message = "\ubb38\ubc95 \uc624\ub958\uc785\ub2c8\ub2e4.") : (a = this.getLineNumber(e.node.start, e.node.end), a.message = e.message, a.severity = "error", this.codeMirror.markText(a.from, a.to, {className:"CodeMirror-lint-mark-error", __annotation:a, clearOnEnter:!0})), Entry.toast.alert("Error", e.message)), b = []; + } + break; + case "block": + a = this._parser.Code(a).match(/(.*{.*[\S|\s]+?}|.+)/g), b = Array.isArray(a) ? a.reduce(function(a, b, c) { + var d = ""; + 1 === c && (a += "\n"); + d = -1 < b.indexOf("function") ? b + a : a + b; + return d + "\n"; + }) : ""; + } + return b; + }; + b.getLineNumber = function(a, b) { + var d = this.codeMirror.getValue(), e = {from:{}, to:{}}, f = d.substring(0, a).split(/\n/gi); + e.from.line = f.length - 1; + e.from.ch = f[f.length - 1].length; + d = d.substring(0, b).split(/\n/gi); + e.to.line = d.length - 1; + e.to.ch = d[d.length - 1].length; + return e; + }; + b.mappingSyntax = function(a) { + for (var b = Object.keys(Entry.block), d = 0;d < b.length;d++) { + var e = b[d], f = Entry.block[e]; + if (f.mode === a && -1 < this.availableCode.indexOf(e) && (f = f.syntax)) { + for (var g = this.syntax, h = 0;h < f.length;h++) { + var k = f[h]; + if (h === f.length - 2 && "function" === typeof f[h + 1]) { + g[k] = f[h + 1]; + break; + } + g[k] || (g[k] = {}); + h === f.length - 1 ? g[k] = e : g = g[k]; + } + } + } + }; + b.setAvailableCode = function(a, b) { + var d = []; + a.forEach(function(a, b) { + a.forEach(function(a, b) { + d.push(a.type); + }); }); - Entry.addEventListener("stop", function(b) { - Entry.playground.curtainView_.addClass("entryRemove"); + b instanceof Entry.Code ? b.getBlockList().forEach(function(a) { + a.type !== NtryData.START && -1 === d.indexOf(a.type) && d.push(a.type); + }) : b.forEach(function(a, b) { + a.forEach(function(a, b) { + a.type !== NtryData.START && -1 === d.indexOf(a.type) && d.push(a.type); + }); }); + this.availableCode = this.availableCode.concat(d); + }; +})(Entry.Parser.prototype); +Entry.Popup = function() { + Entry.assert(!window.popup, "Popup exist"); + this.body_ = Entry.createElement("div"); + this.body_.addClass("entryPopup"); + this.body_.bindOnClick(function(b) { + b.target == this && this.popup.remove(); + }); + this.body_.popup = this; + document.body.appendChild(this.body_); + this.window_ = Entry.createElement("div"); + this.window_.addClass("entryPopupWindow"); + this.window_.bindOnClick(function() { + }); + Entry.addEventListener("windowResized", this.resize); + window.popup = this; + this.resize(); + this.body_.appendChild(this.window_); +}; +Entry.Popup.prototype.remove = function() { + for (;this.window_.hasChildNodes();) { + "workspace" == Entry.type ? Entry.view_.insertBefore(this.window_.firstChild, Entry.container.view_) : Entry.view_.insertBefore(this.window_.lastChild, Entry.view_.firstChild); } + $("body").css("overflow", "auto"); + Entry.removeElement(this.body_); + window.popup = null; + Entry.removeEventListener("windowResized", this.resize); + Entry.engine.popup = null; }; -Entry.Playground.prototype.generateDefaultView = function(a) { - return a; +Entry.Popup.prototype.resize = function(b) { + b = window.popup.window_; + var a = .9 * window.innerWidth, c = .9 * window.innerHeight - 35; + 9 * a <= 16 * c ? c = a / 16 * 9 : a = 16 * c / 9; + b.style.width = String(a) + "px"; + b.style.height = String(c + 35) + "px"; }; -Entry.Playground.prototype.generateTabView = function(a) { - var b = Entry.createElement("ul"); - b.addClass("entryTabListWorkspace"); - this.tabList_ = b; - a.appendChild(b); - this.tabViewElements = {}; - a = Entry.createElement("li", "entryCodeTab"); - a.innerHTML = Lang.Workspace.tab_code; - a.addClass("entryTabListItemWorkspace"); - a.addClass("entryTabSelected"); - b.appendChild(a); - a.bindOnClick(function(b) { - Entry.playground.changeViewMode("code"); +Entry.popupHelper = function(b) { + this.popupList = {}; + this.nowContent; + b && (window.popupHelper = null); + Entry.assert(!window.popupHelper, "Popup exist"); + var a = ["confirm", "spinner"], c = ["entryPopupHelperTopSpan", "entryPopupHelperBottomSpan", "entryPopupHelperLeftSpan", "entryPopupHelperRightSpan"]; + this.body_ = Entry.Dom("div", {classes:["entryPopup", "hiddenPopup", "popupHelper"]}); + var d = this; + this.body_.bindOnClick(function(b) { + if (!(d.nowContent && -1 < a.indexOf(d.nowContent.prop("type")))) { + var f = $(b.target); + c.forEach(function(a) { + f.hasClass(a) && this.popup.hide(); + }.bind(this)); + b.target == this && this.popup.hide(); + } }); - this.tabViewElements.code = a; - Entry.pictureEditable && (a = Entry.createElement("li", "entryPictureTab"), a.innerHTML = Lang.Workspace.tab_picture, a.addClass("entryTabListItemWorkspace"), b.appendChild(a), a.bindOnClick(function(b) { - Entry.playground.changeViewMode("picture"); - }), this.tabViewElements.picture = a, a = Entry.createElement("li", "entryTextboxTab"), a.innerHTML = Lang.Workspace.tab_text, a.addClass("entryTabListItemWorkspace"), b.appendChild(a), a.bindOnClick(function(b) { - Entry.playground.changeViewMode("text"); - }), this.tabViewElements.text = a, a.addClass("entryRemove")); - Entry.soundEditable && (a = Entry.createElement("li", "entrySoundTab"), a.innerHTML = Lang.Workspace.tab_sound, a.addClass("entryTabListItemWorkspace"), b.appendChild(a), a.bindOnClick(function(b) { - Entry.playground.changeViewMode("sound"); - }), this.tabViewElements.sound = a); - Entry.hasVariableManager && (a = Entry.createElement("li", "entryVariableTab"), a.innerHTML = Lang.Workspace.tab_attribute, a.addClass("entryTabListItemWorkspace"), a.addClass("entryVariableTabWorkspace"), b.appendChild(a), a.bindOnClick(function(b) { - Entry.playground.toggleOnVariableView(); - Entry.playground.changeViewMode("variable"); - }), this.tabViewElements.variable = a); + window.popupHelper = this; + this.body_.prop("popup", this); + Entry.Dom("div", {class:"entryPopupHelperTopSpan", parent:this.body_}); + b = Entry.Dom("div", {class:"entryPopupHelperMiddleSpan", parent:this.body_}); + Entry.Dom("div", {class:"entryPopupHelperBottomSpan", parent:this.body_}); + Entry.Dom("div", {class:"entryPopupHelperLeftSpan", parent:b}); + this.window_ = Entry.Dom("div", {class:"entryPopupHelperWindow", parent:b}); + Entry.Dom("div", {class:"entryPopupHelperRightSpan", parent:b}); + $("body").append(this.body_); }; -Entry.Playground.prototype.generateCodeView = function(a) { - if (!Entry.type || "workspace" == Entry.type) { - var b = Entry.createElement("div", "entryCategory"); - b.addClass("entryCategoryWorkspace"); - a.appendChild(b); - this.categoryView_ = b; - var c = Entry.createElement("ul", "entryCategoryList"); - c.addClass("entryCategoryListWorkspace"); - b.appendChild(c); - this.categoryListView_ = c; - var d = Entry.createElement("div", "entryBlocklyWorkspace"); - d.addClass("entryBlockMenuWorkspace"); - a.appendChild(d); - $(d).mouseenter(function(b) { - Entry.playground.resizing || (Entry.playground.focusBlockMenu = !0, b = Blockly.mainWorkspace.blockMenu.blockMenuWidth + 84, b > Entry.interfaceState.menuWidth && (this.widthBackup = Entry.interfaceState.menuWidth, $(".entryBlockMenuWorkspace>svg").stop().animate({width:b - 64}, 200))); - }); - $(d).mouseleave(function(b) { - Entry.playground.resizing || (d.widthBackup && !Blockly.mainWorkspace.blockMenu.hasStalkerBlock && $(".entryBlockMenuWorkspace>svg").stop().animate({width:this.widthBackup - 64}, 200), delete this.widthBackup, delete Entry.playground.focusBlockMenu); - }); - Entry.addEventListener("entryBlocklyChanged", function(b) { - b = Entry.playground.blockMenuView_; - b.widthBackup && Entry.resizeElement({menuWidth:b.widthBackup}); - delete b.widthBackup; - delete Entry.playground.focusBlockMenu; - }); - this.blockMenuView_ = d; - b = this.createVariableView(); - a.appendChild(b); - this.variableView_ = b; - b = Entry.createElement("div", "entryBlockly"); - b.addClass("entryBlocklyWorkspace"); - this.blocklyView_ = b; - Entry.bindAnimationCallback(this.blocklyView_, function(b) { - Blockly.fireUiEvent(window, "resize"); - Entry.playground.blocklyView_.removeClass("foldOut"); - }); - a.appendChild(b); - c = Entry.parseTexttoXML(""); - Blockly.inject(b, {path:Entry.blockInjectPath || ".././", toolbox:c, trashcan:!0, blockmenu:this.blockMenuView_, mediaFilePath:Entry.mediaFilePath}); - Blockly.mainWorkspace.flyout_.hide(); - Blockly.mainWorkspace.blockMenu.hide(); - document.addEventListener("blocklyWorkspaceChange", this.syncObjectWithEvent, !1); - this.blockMenu = Blockly.mainWorkspace.blockMenu; - Entry.hw.banHW(); - return a; - } - if ("phone" == Entry.type) { - return b = Entry.createElement("div", "entryCategory"), b.addClass("entryCategoryPhone"), a.appendChild(b), this.categoryView_ = b, c = Entry.createElement("ul", "entryCategoryList"), c.addClass("entryCategoryListPhone"), b.appendChild(c), this.categoryListView_ = c, b = this.createVariableView(), a.appendChild(b), this.variableView_ = b, b = Entry.createElement("div", "entryBlockly"), b.addClass("entryBlocklyPhone"), this.blocklyView_ = b, a.appendChild(b), c = Entry.parseTexttoXML(""), - Blockly.inject(b, {path:Entry.blockInjectPath || ".././", toolbox:c, trashcan:!0, mediaFilePath:Entry.mediaFilePath}), Blockly.mainWorkspace.flyout_.autoClose = !0, Blockly.mainWorkspace.flyout_.hide(), document.addEventListener("blocklyWorkspaceChange", this.syncObjectWithEvent, !1), this.blockMenu = Blockly.mainWorkspace.flyout_, Entry.hw.banHW(), a; +Entry.popupHelper.prototype.clearPopup = function() { + for (var b = this.popupWrapper_.children.length - 1;2 < b;b--) { + this.popupWrapper_.removeChild(this.popupWrapper_.children[b]); } }; -Entry.Playground.prototype.generatePictureView = function(a) { - if ("workspace" == Entry.type) { - var b = Entry.createElement("div", "entryAddPicture"); - b.addClass("entryPlaygroundAddPicture"); - b.bindOnClick(function(b) { - Entry.dispatchEvent("openPictureManager"); - }); - var c = Entry.createElement("div", "entryAddPictureInner"); - c.addClass("entryPlaygroundAddPictureInner"); - c.innerHTML = Lang.Workspace.picture_add; - b.appendChild(c); - a.appendChild(b); - b = Entry.createElement("ul", "entryPictureList"); - b.addClass("entryPlaygroundPictureList"); - $ && $(b).sortable({start:function(b, a) { - a.item.data("start_pos", a.item.index()); - }, stop:function(b, a) { - var c = a.item.data("start_pos"), g = a.item.index(); - Entry.playground.movePicture(c, g); - }, axis:"y"}); - a.appendChild(b); - this.pictureListView_ = b; - b = Entry.createElement("div", "entryPainter"); - b.addClass("entryPlaygroundPainter"); - a.appendChild(b); - this.painter = new Entry.Painter; - this.painter.initialize(b); - } else { - "phone" == Entry.type && (b = Entry.createElement("div", "entryAddPicture"), b.addClass("entryPlaygroundAddPicturePhone"), b.bindOnClick(function(b) { - Entry.dispatchEvent("openPictureManager"); - }), c = Entry.createElement("div", "entryAddPictureInner"), c.addClass("entryPlaygroundAddPictureInnerPhone"), c.innerHTML = Lang.Workspace.picture_add, b.appendChild(c), a.appendChild(b), b = Entry.createElement("ul", "entryPictureList"), b.addClass("entryPlaygroundPictureListPhone"), $ && $(b).sortable({start:function(b, a) { - a.item.data("start_pos", a.item.index()); - }, stop:function(b, a) { - var c = a.item.data("start_pos"), g = a.item.index(); - Entry.playground.movePicture(c, g); - }, axis:"y"}), a.appendChild(b), this.pictureListView_ = b); - } -}; -Entry.Playground.prototype.generateTextView = function(a) { - var b = Entry.createElement("div"); - a.appendChild(b); - a = Entry.createElement("div"); - a.addClass("textProperties"); - b.appendChild(a); - var c = Entry.createElement("div"); - c.addClass("entryTextFontSelect"); - a.appendChild(c); - var d = Entry.createElement("select", "entryPainterAttrFontName"); - d.addClass("entryPlaygroundPainterAttrFontName", "entryTextFontSelecter"); - d.size = "1"; - d.onchange = function(b) { - Entry.playground.object.entity.setFontType(b.target.value); - }; - for (var e = 0;e < Entry.fonts.length;e++) { - var f = Entry.fonts[e], g = Entry.createElement("option"); - g.value = f.family; - g.innerHTML = f.name; - d.appendChild(g); - } - this.fontName_ = d; - c.appendChild(d); - e = Entry.createElement("ul"); - e.addClass("entryPlayground_text_buttons"); - a.appendChild(e); - c = Entry.createElement("li"); - c.addClass("entryPlaygroundTextAlignLeft"); - c.bindOnClick(function(b) { - Entry.playground.setFontAlign(Entry.TEXT_ALIGN_LEFT); - }); - e.appendChild(c); - this.alignLeftBtn = c; - c = Entry.createElement("li"); - c.addClass("entryPlaygroundTextAlignCenter"); - c.bindOnClick(function(b) { - Entry.playground.setFontAlign(Entry.TEXT_ALIGN_CENTER); - }); - e.appendChild(c); - this.alignCenterBtn = c; - c = Entry.createElement("li"); - c.addClass("entryPlaygroundTextAlignRight"); - c.bindOnClick(function(b) { - Entry.playground.setFontAlign(Entry.TEXT_ALIGN_RIGHT); - }); - e.appendChild(c); - this.alignRightBtn = c; - c = Entry.createElement("li"); - e.appendChild(c); - d = Entry.createElement("a"); - c.appendChild(d); - d.bindOnClick(function() { - Entry.playground.object.entity.toggleFontBold() ? h.src = Entry.mediaFilePath + "text_button_bold_true.png" : h.src = Entry.mediaFilePath + "text_button_bold_false.png"; - }); - var h = Entry.createElement("img", "entryPlaygroundText_boldImage"); - d.appendChild(h); - h.src = Entry.mediaFilePath + "text_button_bold_false.png"; - c = Entry.createElement("li"); - e.appendChild(c); - d = Entry.createElement("a"); - c.appendChild(d); - d.bindOnClick(function() { - var b = !Entry.playground.object.entity.getUnderLine() || !1; - k.src = Entry.mediaFilePath + "text_button_underline_" + b + ".png"; - Entry.playground.object.entity.setUnderLine(b); - }); - var k = Entry.createElement("img", "entryPlaygroundText_underlineImage"); - d.appendChild(k); - k.src = Entry.mediaFilePath + "text_button_underline_false.png"; - c = Entry.createElement("li"); - e.appendChild(c); - d = Entry.createElement("a"); - c.appendChild(d); - d.bindOnClick(function() { - Entry.playground.object.entity.toggleFontItalic() ? l.src = Entry.mediaFilePath + "text_button_italic_true.png" : l.src = Entry.mediaFilePath + "/text_button_italic_false.png"; - }); - var l = Entry.createElement("img", "entryPlaygroundText_italicImage"); - d.appendChild(l); - l.src = Entry.mediaFilePath + "text_button_italic_false.png"; - c = Entry.createElement("li"); - e.appendChild(c); - d = Entry.createElement("a"); - c.appendChild(d); +Entry.popupHelper.prototype.addPopup = function(b, a) { + var c = Entry.Dom("div"), d = Entry.Dom("div", {class:"entryPopupHelperCloseButton"}); d.bindOnClick(function() { - var b = !Entry.playground.object.entity.getStrike() || !1; - Entry.playground.object.entity.setStrike(b); - q.src = Entry.mediaFilePath + "text_button_strike_" + b + ".png"; - }); - var q = Entry.createElement("img", "entryPlaygroundText_strikeImage"); - d.appendChild(q); - q.src = Entry.mediaFilePath + "text_button_strike_false.png"; - d = Entry.createElement("li"); - e.appendChild(d); - c = Entry.createElement("a"); - d.appendChild(c); - c.bindOnClick(function() { - Entry.playground.toggleColourChooser("foreground"); - }); - d = Entry.createElement("img"); - c.appendChild(d); - d.src = Entry.mediaFilePath + "text_button_color_false.png"; - c = Entry.createElement("li"); - e.appendChild(c); - e = Entry.createElement("a"); - c.appendChild(e); - e.bindOnClick(function() { - Entry.playground.toggleColourChooser("background"); - }); - c = Entry.createElement("img"); - e.appendChild(c); - c.src = Entry.mediaFilePath + "text_button_background_false.png"; - e = Entry.createElement("div"); - e.addClass("entryPlayground_fgColorDiv"); - c = Entry.createElement("div"); - c.addClass("entryPlayground_bgColorDiv"); - a.appendChild(e); - a.appendChild(c); - d = Entry.createElement("div"); - d.addClass("entryPlaygroundTextColoursWrapper"); - this.coloursWrapper = d; - b.appendChild(d); - a = Entry.getColourCodes(); - for (e = 0;e < a.length;e++) { - c = Entry.createElement("div"), c.addClass("modal_colour"), c.setAttribute("colour", a[e]), c.style.backgroundColor = a[e], 0 === e && c.addClass("modalColourTrans"), c.bindOnClick(function(b) { - Entry.playground.setTextColour(b.target.getAttribute("colour")); - }), d.appendChild(c); - } - d.style.display = "none"; - d = Entry.createElement("div"); - d.addClass("entryPlaygroundTextBackgroundsWrapper"); - this.backgroundsWrapper = d; - b.appendChild(d); - for (e = 0;e < a.length;e++) { - c = Entry.createElement("div"), c.addClass("modal_colour"), c.setAttribute("colour", a[e]), c.style.backgroundColor = a[e], 0 === e && c.addClass("modalColourTrans"), c.bindOnClick(function(b) { - Entry.playground.setBackgroundColour(b.target.getAttribute("colour")); - }), d.appendChild(c); - } - d.style.display = "none"; - a = Entry.createElement("input"); - a.addClass("entryPlayground_textBox"); - a.onkeyup = function() { - Entry.playground.object.setText(this.value); - Entry.playground.object.entity.setText(this.value); - }; - a.onblur = function() { - Entry.dispatchEvent("textEdited"); - }; - this.textEditInput = a; - b.appendChild(a); - a = Entry.createElement("textarea"); - a.addClass("entryPlayground_textArea"); - a.style.display = "none"; - a.onkeyup = function() { - Entry.playground.object.setText(this.value); - Entry.playground.object.entity.setText(this.value); - }; - a.onblur = function() { - Entry.dispatchEvent("textEdited"); - }; - this.textEditArea = a; - b.appendChild(a); - a = Entry.createElement("div"); - a.addClass("entryPlaygroundFontSizeWrapper"); - b.appendChild(a); - this.fontSizeWrapper = a; - var n = Entry.createElement("div"); - n.addClass("entryPlaygroundFontSizeSlider"); - a.appendChild(n); - var m = Entry.createElement("div"); - m.addClass("entryPlaygroundFontSizeIndicator"); - n.appendChild(m); - this.fontSizeIndiciator = m; - var r = Entry.createElement("div"); - r.addClass("entryPlaygroundFontSizeKnob"); - n.appendChild(r); - this.fontSizeKnob = r; - e = Entry.createElement("div"); - e.addClass("entryPlaygroundFontSizeLabel"); - e.innerHTML = "\uae00\uc790 \ud06c\uae30"; - a.appendChild(e); - var t = !1, u = 0; - r.onmousedown = function(b) { - t = !0; - u = $(n).offset().left; - }; - document.addEventListener("mousemove", function(b) { - t && (b = b.pageX - u, b = Math.max(b, 5), b = Math.min(b, 88), r.style.left = b + "px", b /= .88, m.style.width = b + "%", Entry.playground.object.entity.setFontSize(b)); - }); - document.addEventListener("mouseup", function(b) { - t = !1; - }); - a = Entry.createElement("div"); - a.addClass("entryPlaygroundLinebreakWrapper"); - b.appendChild(a); - b = Entry.createElement("hr"); - b.addClass("entryPlaygroundLinebreakHorizontal"); - a.appendChild(b); - b = Entry.createElement("div"); - b.addClass("entryPlaygroundLinebreakButtons"); - a.appendChild(b); - e = Entry.createElement("img"); - e.bindOnClick(function() { - Entry.playground.toggleLineBreak(!1); - v.innerHTML = Lang.Menus.linebreak_off_desc_1; - x.innerHTML = Lang.Menus.linebreak_off_desc_2; - y.innerHTML = Lang.Menus.linebreak_off_desc_3; - }); - e.src = Entry.mediaFilePath + "text-linebreak-off-true.png"; - b.appendChild(e); - this.linebreakOffImage = e; - e = Entry.createElement("img"); - e.bindOnClick(function() { - Entry.playground.toggleLineBreak(!0); - v.innerHTML = Lang.Menus.linebreak_on_desc_1; - x.innerHTML = Lang.Menus.linebreak_on_desc_2; - y.innerHTML = Lang.Menus.linebreak_on_desc_3; - }); - e.src = Entry.mediaFilePath + "text-linebreak-on-false.png"; - b.appendChild(e); - this.linebreakOnImage = e; - b = Entry.createElement("div"); - b.addClass("entryPlaygroundLinebreakDescription"); - a.appendChild(b); - var v = Entry.createElement("p"); - v.innerHTML = Lang.Menus.linebreak_off_desc_1; - b.appendChild(v); - a = Entry.createElement("ul"); - b.appendChild(a); - var x = Entry.createElement("li"); - x.innerHTML = Lang.Menus.linebreak_off_desc_2; - a.appendChild(x); - var y = Entry.createElement("li"); - y.innerHTML = Lang.Menus.linebreak_off_desc_3; - a.appendChild(y); -}; -Entry.Playground.prototype.generateSoundView = function(a) { - if ("workspace" == Entry.type) { - var b = Entry.createElement("div", "entryAddSound"); - b.addClass("entryPlaygroundAddSound"); - b.bindOnClick(function(b) { - Entry.dispatchEvent("openSoundManager"); - }); - var c = Entry.createElement("div", "entryAddSoundInner"); - c.addClass("entryPlaygroundAddSoundInner"); - c.innerHTML = Lang.Workspace.sound_add; - b.appendChild(c); - a.appendChild(b); - b = Entry.createElement("ul", "entrySoundList"); - b.addClass("entryPlaygroundSoundList"); - $ && $(b).sortable({start:function(b, a) { - a.item.data("start_pos", a.item.index()); - }, stop:function(b, a) { - var c = a.item.data("start_pos"), g = a.item.index(); - Entry.playground.moveSound(c, g); - }, axis:"y"}); - a.appendChild(b); - this.soundListView_ = b; - } else { - "phone" == Entry.type && (b = Entry.createElement("div", "entryAddSound"), b.addClass("entryPlaygroundAddSoundPhone"), b.bindOnClick(function(b) { - Entry.dispatchEvent("openSoundManager"); - }), c = Entry.createElement("div", "entryAddSoundInner"), c.addClass("entryPlaygroundAddSoundInnerPhone"), c.innerHTML = Lang.Workspace.sound_add, b.appendChild(c), a.appendChild(b), b = Entry.createElement("ul", "entrySoundList"), b.addClass("entryPlaygroundSoundListPhone"), $ && $(b).sortable({start:function(b, a) { - a.item.data("start_pos", a.item.index()); - }, stop:function(b, a) { - var c = a.item.data("start_pos"), g = a.item.index(); - Entry.playground.moveSound(c, g); - }, axis:"y"}), a.appendChild(b), this.soundListView_ = b); - } + a.closeEvent ? a.closeEvent(this) : this.hide(); + }.bind(this)); + var e = Entry.Dom("div", {class:"entryPopupHelperWrapper"}); + e.append(d); + a.title && (d = Entry.Dom("div", {class:"entryPopupHelperTitle"}), e.append(d), d.text(a.title)); + c.addClass(b); + c.append(e); + c.popupWrapper_ = e; + c.prop("type", a.type); + "function" === typeof a.setPopupLayout && a.setPopupLayout(c); + this.popupList[b] = c; }; -Entry.Playground.prototype.injectObject = function(a) { - if (!a) { - this.changeViewMode("code"), this.object = null; - } else { - if (a !== this.object) { - this.object && (this.syncObject(this.object), this.object.toggleInformation(!1)); - this.object = a; - this.setMenu(a.objectType); - this.injectCode(); - "sprite" == a.objectType && Entry.pictureEditable ? (this.tabViewElements.text && this.tabViewElements.text.addClass("entryRemove"), this.tabViewElements.picture && this.tabViewElements.picture.removeClass("entryRemove")) : "textBox" == a.objectType && (this.tabViewElements.picture && this.tabViewElements.picture.addClass("entryRemove"), this.tabViewElements.text && this.tabViewElements.text.removeClass("entryRemove")); - var b = this.viewMode_; - "default" == b ? this.changeViewMode("code") : "picture" != b && "text" != b || "textBox" != a.objectType ? "text" != b && "picture" != b || "sprite" != a.objectType ? "sound" == b && this.changeViewMode("sound") : this.changeViewMode("picture") : this.changeViewMode("text"); - this.menuInjected || this.selectMenu(0); - } - } +Entry.popupHelper.prototype.hasPopup = function(b) { + return !!this.popupList[b]; }; -Entry.Playground.prototype.injectCode = function() { - var a = this.object; - Blockly.mainWorkspace.clear(); - Blockly.Xml.domToWorkspace(Blockly.mainWorkspace, a.script); - var b = 0, c = 0, d = null; - $(a.script).children("block").each(function(a) { - var e = +$(this).attr("x"), f = +$(this).attr("y"); - 0 == a && (b = e, c = f, d = this); - e < b && (b = e, d = this); - f < c && (varyTopY = f); - }); - if (null != d) { - var a = +$(d).attr("x"), e = +$(d).attr("y"), f = Blockly.mainWorkspace.getMetrics(), g = (.1 * f.viewWidth).toFixed(1), h = (.4 * f.viewHeight).toFixed(1); - e == c && (h = (.1 * f.viewHeight).toFixed(1)); - Blockly.mainWorkspace.scrollbar.set(a - f.contentLeft - g, e - f.contentTop - h); - } +Entry.popupHelper.prototype.setPopup = function(b) { }; -Entry.Playground.prototype.adjustScroll = function(a, b) { - var c = Blockly.mainWorkspace.scrollbar.vScroll; - Blockly.mainWorkspace.scrollbar.hScroll.svgGroup_.setAttribute("opacity", "1"); - c.svgGroup_.setAttribute("opacity", "1"); - if (Blockly.mainWorkspace.getMetrics()) { - Blockly.removeAllRanges(); - var c = Blockly.mainWorkspace.getMetrics(), d, e; - d = Math.min(a, -c.contentLeft); - e = Math.min(b, -c.contentTop); - d = Math.max(d, c.viewWidth - c.contentLeft - c.contentWidth); - e = Math.max(e, c.viewHeight - c.contentTop - c.contentHeight); - Blockly.mainWorkspace.scrollbar.set(-d - c.contentLeft, -e - c.contentTop); - } +Entry.popupHelper.prototype.remove = function(b) { + 0 < this.window_.children().length && this.window_.children().remove(); + this.window_.remove(); + delete this.popupList[b]; + this.nowContent = void 0; + this.body_.addClass("hiddenPopup"); }; -Entry.Playground.prototype.injectPicture = function() { - var a = this.pictureListView_; - if (a) { - for (;a.hasChildNodes();) { - a.removeChild(a.lastChild); - } - if (this.object) { - for (var b = this.object.pictures, c = 0, d = b.length;c < d;c++) { - var e = b[c].view; - e || console.log(e); - e.orderHolder.innerHTML = c + 1; - a.appendChild(e); - } - this.selectPicture(this.object.selectedPicture); - } else { - Entry.dispatchEvent("pictureClear"); - } - } +Entry.popupHelper.prototype.resize = function(b) { }; -Entry.Playground.prototype.addPicture = function(a, b) { - var c = Entry.cloneSimpleObject(a); - delete c.id; - delete c.view; - a = JSON.parse(JSON.stringify(c)); - a.id = Entry.generateHash(); - a.name = Entry.getOrderedName(a.name, this.object.pictures); - this.generatePictureElement(a); - this.object.addPicture(a); - this.injectPicture(); - this.selectPicture(a); +Entry.popupHelper.prototype.show = function(b) { + 0 < this.window_.children().length && this.window_.children().detach(); + this.window_.append(this.popupList[b]); + this.nowContent = this.popupList[b]; + this.body_.removeClass("hiddenPopup"); }; -Entry.Playground.prototype.setPicture = function(a) { - var b = Entry.container.getPictureElement(a.id), c = $(b); - if (b) { - a.view = b; - b.picture = a; - b = c.find("#t_" + a.id)[0]; - if (a.fileurl) { - b.style.backgroundImage = 'url("' + a.fileurl + '")'; - } else { - var d = a.filename; - b.style.backgroundImage = 'url("' + Entry.defaultPath + "/uploads/" + d.substring(0, 2) + "/" + d.substring(2, 4) + "/thumb/" + d + '.png")'; - } - c.find("#s_" + a.id)[0].innerHTML = a.dimension.width + " X " + a.dimension.height; - } - Entry.container.setPicture(a); +Entry.popupHelper.prototype.hide = function() { + this.nowContent = void 0; + this.body_.addClass("hiddenPopup"); }; -Entry.Playground.prototype.clonePicture = function(a) { - a = Entry.playground.object.getPicture(a); - this.addPicture(a, !0); +Entry.getStartProject = function(b) { + return {category:"\uae30\ud0c0", scenes:[{name:"\uc7a5\uba74 1", id:"7dwq"}], variables:[{name:"\ucd08\uc2dc\uacc4", id:"brih", visible:!1, value:"0", variableType:"timer", x:150, y:-70, array:[], object:null, isCloud:!1}, {name:"\ub300\ub2f5", id:"1vu8", visible:!1, value:"0", variableType:"answer", x:150, y:-100, array:[], object:null, isCloud:!1}], objects:[{id:"7y0y", name:"\uc5d4\ud2b8\ub9ac\ubd07", script:[[{type:"when_run_button_click", x:40, y:50}, {type:"repeat_basic", statements:[[{type:"move_direction"}]]}]], + selectedPictureId:"vx80", objectType:"sprite", rotateMethod:"free", scene:"7dwq", sprite:{sounds:[{duration:1.3, ext:".mp3", id:"8el5", fileurl:b + "media/bark.mp3", name:"\uac15\uc544\uc9c0 \uc9d6\ub294\uc18c\ub9ac"}], pictures:[{id:"vx80", fileurl:b + "media/entrybot1.png", name:Lang.Blocks.walking_entryBot + "1", scale:100, dimension:{width:284, height:350}}, {id:"4t48", fileurl:b + "media/entrybot2.png", name:Lang.Blocks.walking_entryBot + "2", scale:100, dimension:{width:284, height:350}}]}, + entity:{x:0, y:0, regX:142, regY:175, scaleX:.3154574132492113, scaleY:.3154574132492113, rotation:0, direction:90, width:284, height:350, visible:!0}, lock:!1, active:!0}], speed:60}; }; -Entry.Playground.prototype.selectPicture = function(a) { - for (var b = this.object.pictures, c = 0, d = b.length;c < d;c++) { - var e = b[c]; - e.id === a.id ? e.view.addClass("entryPictureSelected") : e.view.removeClass("entryPictureSelected"); - } - var f; - a && a.id && (f = Entry.container.selectPicture(a.id)); - this.object.id === f && Entry.dispatchEvent("pictureSelected", a); +Entry.PropertyPanel = function() { + this.modes = {}; + this.selected = null; }; -Entry.Playground.prototype.movePicture = function(a, b) { - this.object.pictures.splice(b, 0, this.object.pictures.splice(a, 1)[0]); - this.injectPicture(); - Entry.stage.sortZorder(); -}; -Entry.Playground.prototype.injectText = function() { - if (Entry.playground.object) { - Entry.playground.textEditInput.value = Entry.playground.object.entity.getText(); - Entry.playground.textEditArea.value = Entry.playground.object.entity.getText(); - Entry.playground.fontName_.value = Entry.playground.object.entity.getFontName(); - if (Entry.playground.object.entity.font) { - var a = -1 < Entry.playground.object.entity.font.indexOf("bold") || !1; - $("#entryPlaygroundText_boldImage").attr("src", Entry.mediaFilePath + "text_button_bold_" + a + ".png"); - a = -1 < Entry.playground.object.entity.font.indexOf("italic") || !1; - $("#entryPlaygroundText_italicImage").attr("src", Entry.mediaFilePath + "text_button_italic_" + a + ".png"); - } - a = Entry.playground.object.entity.getUnderLine() || !1; - $("#entryPlaygroundText_underlineImage").attr("src", Entry.mediaFilePath + "text_button_underline_" + a + ".png"); - a = Entry.playground.object.entity.getStrike() || !1; - $("#entryPlaygroundText_strikeImage").attr("src", Entry.mediaFilePath + "text_button_strike_" + a + ".png"); - $(".entryPlayground_fgColorDiv").css("backgroundColor", Entry.playground.object.entity.colour); - $(".entryPlayground_bgColorDiv").css("backgroundColor", Entry.playground.object.entity.bgColour); - Entry.playground.toggleLineBreak(Entry.playground.object.entity.getLineBreak()); - Entry.playground.object.entity.getLineBreak() && ($(".entryPlaygroundLinebreakDescription > p").html(Lang.Menus.linebreak_on_desc_1), $(".entryPlaygroundLinebreakDescription > ul > li").eq(0).html(Lang.Menus.linebreak_on_desc_2), $(".entryPlaygroundLinebreakDescription > ul > li").eq(1).html(Lang.Menus.linebreak_on_desc_3)); - Entry.playground.setFontAlign(Entry.playground.object.entity.getTextAlign()); - a = Entry.playground.object.entity.getFontSize(); - Entry.playground.fontSizeIndiciator.style.width = a + "%"; - Entry.playground.fontSizeKnob.style.left = .88 * a + "px"; - } -}; -Entry.Playground.prototype.injectSound = function() { - var a = this.soundListView_; - if (a) { - for (;a.hasChildNodes();) { - a.removeChild(a.lastChild); +(function(b) { + b.generateView = function(a, b) { + this._view = Entry.Dom("div", {class:"propertyPanel", parent:$(a)}); + this._tabView = Entry.Dom("div", {class:"propertyTab", parent:this._view}); + this._contentView = Entry.Dom("div", {class:"propertyContent", parent:this._view}); + var d = Entry.createElement("div"); + d.addClass("entryObjectSelectedImgWorkspace"); + this.selectedImgView_ = d; + this._view.append(d); + this.initializeSplitter(d); + this.splitter = d; + }; + b.addMode = function(a, b) { + var d = b.getView(), d = Entry.Dom(d, {parent:this._contentView}), e = Entry.Dom("
" + Lang.Menus[a] + "
", {classes:["propertyTabElement", "propertyTab" + a], parent:this._tabView}), f = this; + e.bind("click", function() { + f.select(a); + }); + this.modes[a] && (this.modes[a].tabDom.remove(), this.modes[a].contentDom.remove(), "hw" == a && ($(this.modes).removeClass(".propertyTabhw"), $(".propertyTabhw").unbind("dblclick"))); + this.modes[a] = {obj:b, tabDom:e, contentDom:d}; + "hw" == a && $(".propertyTabhw").bind("dblclick", function() { + Entry.dispatchEvent("hwModeChange"); + }); + }; + b.resize = function(a) { + this._view.css({width:a + "px", top:9 * a / 16 + 123 - 22 + "px"}); + 430 <= a ? this._view.removeClass("collapsed") : this._view.addClass("collapsed"); + Entry.dispatchEvent("windowResized"); + (a = this.modes[this.selected].obj.resize) && "hw" != this.selected ? a() : "hw" == this.selected && this.modes.hw.obj.listPorts ? this.modes[this.selected].obj.resizeList() : "hw" == this.selected && this.modes[this.selected].obj.resize(); + }; + b.select = function(a) { + for (var b in this.modes) { + var d = this.modes[b]; + d.tabDom.removeClass("selected"); + d.contentDom.addClass("entryHidden"); + d.obj.visible = !1; } - if (this.object) { - for (var b = this.object.sounds, c = 0, d = b.length;c < d;c++) { - var e = b[c].view; - e.orderHolder.innerHTML = c + 1; - a.appendChild(e); + b = this.modes[a]; + b.tabDom.addClass("selected"); + b.contentDom.removeClass("entryHidden"); + b.obj.resize && b.obj.resize(); + b.obj.visible = !0; + this.selected = a; + }; + b.initializeSplitter = function(a) { + a.onmousedown = function(a) { + Entry.container.disableSort(); + Entry.container.splitterEnable = !0; + Entry.documentMousemove && (Entry.container.resizeEvent = Entry.documentMousemove.attach(this, function(a) { + Entry.container.splitterEnable && Entry.resizeElement({canvasWidth:a.clientX || a.x}); + })); + }; + document.addEventListener("mouseup", function(a) { + if (a = Entry.container.resizeEvent) { + Entry.container.splitterEnable = !1, Entry.documentMousemove.detach(a), delete Entry.container.resizeEvent; } + Entry.container.enableSort(); + }); + }; +})(Entry.PropertyPanel.prototype); +Entry.init = function(b, a) { + Entry.assert("object" === typeof a, "Init option is not object"); + this.events_ = {}; + this.interfaceState = {menuWidth:264}; + Entry.Utils.bindGlobalEvent("resize mousedown mousemove keydown keyup dispose".split(" ")); + this.options = a; + this.parseOptions(a); + this.mediaFilePath = (a.libDir ? a.libDir : "/lib") + "/entryjs/images/"; + this.defaultPath = a.defaultDir || ""; + this.blockInjectPath = a.blockInjectDir || ""; + "workspace" == this.type && this.isPhone() && (this.type = "phone"); + this.initialize_(); + this.view_ = b; + this.view_.setAttribute("class", "entry"); + Entry.initFonts(a.fonts); + this.createDom(b, this.type); + this.loadInterfaceState(); + this.overridePrototype(); + this.maxCloneLimit = 302; + this.cloudSavable = !0; + this.startTime = (new Date).getTime(); + document.onkeydown = function(a) { + Entry.dispatchEvent("keyPressed", a); + }; + document.onkeyup = function(a) { + Entry.dispatchEvent("keyUpped", a); + }; + window.onresize = function(a) { + Entry.dispatchEvent("windowResized", a); + }; + window.onbeforeunload = this.beforeUnload; + Entry.addEventListener("saveWorkspace", function(a) { + Entry.addActivity("save"); + }); + "IE" != Entry.getBrowserType().substr(0, 2) || window.flashaudio ? createjs.Sound.registerPlugins([createjs.WebAudioPlugin]) : (createjs.FlashAudioPlugin.swfPath = this.mediaFilePath + "media/", createjs.Sound.registerPlugins([createjs.FlashAudioPlugin]), window.flashaudio = !0); + Entry.soundQueue = new createjs.LoadQueue; + Entry.soundQueue.installPlugin(createjs.Sound); + Entry.loadAudio_([Entry.mediaFilePath + "sounds/click.mp3", Entry.mediaFilePath + "sounds/click.wav", Entry.mediaFilePath + "sounds/click.ogg"], "entryMagneting"); + Entry.loadAudio_([Entry.mediaFilePath + "sounds/delete.mp3", Entry.mediaFilePath + "sounds/delete.ogg", Entry.mediaFilePath + "sounds/delete.wav"], "entryDelete"); + createjs.Sound.stop(); +}; +Entry.loadAudio_ = function(b, a) { + if (window.Audio && b.length) { + for (;0 < b.length;) { + var c = b[0]; + c.match(/\/([^.]+)./); + Entry.soundQueue.loadFile({id:a, src:c, type:createjs.LoadQueue.SOUND}); + break; } } }; -Entry.Playground.prototype.moveSound = function(a, b) { - this.object.sounds.splice(b, 0, this.object.sounds.splice(a, 1)[0]); - this.updateListViewOrder("sound"); - Entry.stage.sortZorder(); -}; -Entry.Playground.prototype.addSound = function(a, b) { - var c = Entry.cloneSimpleObject(a); - delete c.view; - delete c.id; - a = JSON.parse(JSON.stringify(c)); - a.id = Entry.generateHash(); - a.name = Entry.getOrderedName(a.name, this.object.sounds); - this.generateSoundElement(a); - this.object.addSound(a); - this.injectSound(); -}; -Entry.Playground.prototype.changeViewMode = function(a) { - for (var b in this.tabViewElements) { - this.tabViewElements[b].removeClass("entryTabSelected"); - } - "default" != a && this.tabViewElements[a].addClass("entryTabSelected"); - if ("variable" != a) { - var c = this.view_.children; - this.viewMode_ = a; - for (b = 0;b < c.length;b++) { - var d = c[b]; - -1 < d.id.toUpperCase().indexOf(a.toUpperCase()) ? d.removeClass("entryRemove") : d.addClass("entryRemove"); - } - if ("picture" == a && (!this.pictureView_.object || this.pictureView_.object != this.object)) { - this.pictureView_.object = this.object, this.injectPicture(); - } else { - if ("sound" == a && (!this.soundView_.object || this.soundView_.object != this.object)) { - this.soundView_.object = this.object, this.injectSound(); - } else { - if ("text" == a && "textBox" == this.object.objectType || this.textView_.object != this.object) { - this.textView_.object = this.object, this.injectText(); - } - } +Entry.initialize_ = function() { + this.stage = new Entry.Stage; + Entry.engine && Entry.engine.clearTimer(); + this.engine = new Entry.Engine; + this.propertyPanel = new Entry.PropertyPanel; + this.container = new Entry.Container; + this.helper = new Entry.Helper; + this.youtube = new Entry.Youtube; + this.variableContainer = new Entry.VariableContainer; + this.commander = new Entry.Commander(this.type); + this.scene = new Entry.Scene; + this.playground = new Entry.Playground; + this.toast = new Entry.Toast; + this.hw && this.hw.closeConnection(); + this.hw = new Entry.HW; + if (Entry.enableActivityLogging) { + this.reporter = new Entry.Reporter(!1); + } else { + if ("workspace" == this.type || "phone" == this.type) { + this.reporter = new Entry.Reporter(!0); } - "code" == a && this.resizeHandle_ && this.resizeHandle_.removeClass("entryRemove"); - Entry.engine.isState("run") && this.curtainView_.removeClass("entryRemove"); - this.viewMode_ = a; - this.toggleOffVariableView(); } }; -Entry.Playground.prototype.createVariableView = function() { - var a = Entry.createElement("div"); - Entry.type && "workspace" != Entry.type ? "phone" == Entry.type && a.addClass("entryVariablePanelPhone") : a.addClass("entryVariablePanelWorkspace"); - this.variableViewWrapper_ = a; - Entry.variableContainer.createDom(a); - return a; +Entry.createDom = function(b, a) { + if (a && "workspace" != a) { + "minimize" == a ? (c = Entry.createElement("canvas"), c.className = "entryCanvasWorkspace", c.id = "entryCanvas", c.width = 640, c.height = 360, d = Entry.createElement("div", "entryCanvasWrapper"), d.appendChild(c), b.appendChild(d), this.canvas_ = c, this.stage.initStage(this.canvas_), d = Entry.createElement("div"), b.appendChild(d), this.engineView = d, this.engine.generateView(this.engineView, a)) : "phone" == a && (this.stateManagerView = c = Entry.createElement("div"), this.stateManager.generateView(this.stateManagerView, + a), d = Entry.createElement("div"), b.appendChild(d), this.engineView = d, this.engine.generateView(this.engineView, a), c = Entry.createElement("canvas"), c.addClass("entryCanvasPhone"), c.id = "entryCanvas", c.width = 640, c.height = 360, d.insertBefore(c, this.engine.footerView_), this.canvas_ = c, this.stage.initStage(this.canvas_), c = Entry.createElement("div"), b.appendChild(c), this.containerView = c, this.container.generateView(this.containerView, a), c = Entry.createElement("div"), + b.appendChild(c), this.playgroundView = c, this.playground.generateView(this.playgroundView, a)); + } else { + Entry.documentMousedown.attach(this, this.cancelObjectEdit); + var c = Entry.createElement("div"); + b.appendChild(c); + this.sceneView = c; + this.scene.generateView(this.sceneView, a); + c = Entry.createElement("div"); + this.sceneView.appendChild(c); + this.stateManagerView = c; + this.stateManager.generateView(this.stateManagerView, a); + var d = Entry.createElement("div"); + b.appendChild(d); + this.engineView = d; + this.engine.generateView(this.engineView, a); + c = Entry.createElement("canvas"); + c.addClass("entryCanvasWorkspace"); + c.id = "entryCanvas"; + c.width = 640; + c.height = 360; + d.insertBefore(c, this.engine.addButton); + c.addEventListener("mousewheel", function(a) { + var b = Entry.variableContainer.getListById(Entry.stage.mouseCoordinate); + a = 0 < a.wheelDelta ? !0 : !1; + for (var c = 0;c < b.length;c++) { + var d = b[c]; + d.scrollButton_.y = a ? 46 <= d.scrollButton_.y ? d.scrollButton_.y - 23 : 23 : d.scrollButton_.y + 23; + d.updateView(); + } + }); + this.canvas_ = c; + this.stage.initStage(this.canvas_); + c = Entry.createElement("div"); + this.propertyPanel.generateView(b, a); + this.containerView = c; + this.container.generateView(this.containerView, a); + this.propertyPanel.addMode("object", this.container); + this.helper.generateView(this.containerView, a); + this.propertyPanel.addMode("helper", this.helper); + c = Entry.createElement("div"); + b.appendChild(c); + this.playgroundView = c; + this.playground.generateView(this.playgroundView, a); + this.propertyPanel.select("object"); + this.helper.bindWorkspace(this.playground.mainWorkspace); + } }; -Entry.Playground.prototype.toggleOnVariableView = function() { - Entry.playground.changeViewMode("code"); - this.categoryView_.addClass("entryRemove"); - this.blockMenuView_ && this.blockMenuView_.addClass("entryHidden"); - Entry.variableContainer.updateList(); - this.variableView_.removeClass("entryRemove"); - this.resizeHandle_.removeClass("entryRemove"); +Entry.start = function(b) { + this.FPS || (this.FPS = 60); + Entry.assert("number" == typeof this.FPS, "FPS must be number"); + Entry.engine.start(this.FPS); }; -Entry.Playground.prototype.toggleOffVariableView = function() { - this.categoryView_.removeClass("entryRemove"); - this.blockMenuView_ && this.blockMenuView_.removeClass("entryHidden"); - this.variableView_.addClass("entryRemove"); +Entry.parseOptions = function(b) { + this.type = b.type; + this.projectSaveable = b.projectsaveable; + void 0 === this.projectSaveable && (this.projectSaveable = !0); + this.objectAddable = b.objectaddable; + void 0 === this.objectAddable && (this.objectAddable = !0); + this.objectEditable = b.objectEditable; + void 0 === this.objectEditable && (this.objectEditable = !0); + this.objectEditable || (this.objectAddable = !1); + this.objectDeletable = b.objectdeletable; + void 0 === this.objectDeletable && (this.objectDeletable = !0); + this.soundEditable = b.soundeditable; + void 0 === this.soundEditable && (this.soundEditable = !0); + this.pictureEditable = b.pictureeditable; + void 0 === this.pictureEditable && (this.pictureEditable = !0); + this.sceneEditable = b.sceneEditable; + void 0 === this.sceneEditable && (this.sceneEditable = !0); + this.functionEnable = b.functionEnable; + void 0 === this.functionEnable && (this.functionEnable = !0); + this.messageEnable = b.messageEnable; + void 0 === this.messageEnable && (this.messageEnable = !0); + this.variableEnable = b.variableEnable; + void 0 === this.variableEnable && (this.variableEnable = !0); + this.listEnable = b.listEnable; + void 0 === this.listEnable && (this.listEnable = !0); + this.hasVariableManager = b.hasvariablemanager; + this.variableEnable || this.messageEnable || this.listEnable || this.functionEnable ? void 0 === this.hasVariableManager && (this.hasVariableManager = !0) : this.hasVariableManager = !1; + this.isForLecture = b.isForLecture; }; -Entry.Playground.prototype.syncObject = function(a) { - this.object && !a && (a = this.object); - a && a.setScript(Blockly.Xml.workspaceToDom(Blockly.mainWorkspace)); +Entry.initFonts = function(b) { + this.fonts = b; + b || (this.fonts = []); }; -Entry.Playground.prototype.editBlock = function() { - var a = Entry.playground; - Entry.stateManager && Entry.stateManager.addCommand("edit block", a, a.restoreBlock, a.object, a.object.getScriptText()); +Entry.Reporter = function(b) { + this.projectId = this.userId = null; + this.isRealTime = b; + this.activities = []; }; -Entry.Playground.prototype.mouseupBlock = function() { - if (Entry.reporter) { - var a = Entry.playground, b = a.object; - Entry.reporter.report(new Entry.State("edit block mouseup", a, a.restoreBlock, b, b.getScriptText())); - } +Entry.Reporter.prototype.start = function(b, a, c) { + this.isRealTime && (-1 < window.location.href.indexOf("localhost") ? this.io = io("localhost:7000") : this.io = io("play04.play-entry.com:7000"), this.io.emit("activity", {message:"start", userId:a, projectId:b, time:c})); + this.userId = a; + this.projectId = b; }; -Entry.Playground.prototype.restoreBlock = function(a, b) { - Entry.container.selectObject(a.id); - Entry.stateManager && Entry.stateManager.addCommand("restore block", this, this.restoreBlock, this.object, this.object.getScriptText()); - var c = Blockly.Xml.textToDom(b); - Blockly.mainWorkspace.clear(); - Blockly.Xml.domToWorkspace(Blockly.mainWorkspace, c); - this.syncObject(); -}; -Entry.Playground.prototype.syncObjectWithEvent = function(a) { - Entry.playground.syncObject(); -}; -Entry.Playground.prototype.setMenu = function(a) { - if (this.currentObjectType != a) { - this.categoryListView_.innerHTML = ""; - this.blockMenu.unbanClass(this.currentObjectType); - this.blockMenu.banClass(a); - for (var b in this.blockJSON) { - var c = this.blockJSON[b].category, d = Entry.createElement("li", "entryCategory" + c); - ("brush" == c && "textBox" == a || "text" == c && "sprite" == a || !("func" == c || this.blockJSON[b].blocks && this.blockJSON[b].blocks.length)) && d.addClass("entryRemove"); - d.innerHTML = Lang.Blocks[c.toUpperCase()]; - d.bindOnClick(function() { - Entry.playground.selectMenu(this.id.substring(13)); - }); - Entry.type && "workspace" != Entry.type ? "phone" == Entry.type && d.addClass("entryCategoryElementPhone") : d.addClass("entryCategoryElementWorkspace"); - this.categoryListView_.appendChild(d); - } - this.selectMenu(0); - this.currentObjectType = a; - } -}; -Entry.Playground.prototype.selectMenu = function(a, b) { - if (this.object) { - this.lastSelector = a; - var c = this.categoryListView_.children; - if (!Entry.type || "workspace" == Entry.type) { - for (var d in this.blockJSON) { - var e = this.blockJSON[d].category; - "string" == typeof a && e == a || "number" == typeof a && a == d ? c[d].hasClass("entrySelectedCategory") && !b ? (this.blocklyView_.addClass("folding"), this.blocklyView_.removeClass("foldOut"), this.hideTabs(), c[d].removeClass("entrySelectedCategory"), delete this.selectedMenu) : ("func" == e ? this.blockMenu.show(Entry.Func.getMenuXml()) : ("variable" == e && this.checkVariables(), this.blockMenu.showCategory(this.blockJSON[d])), this.menuInjected = !0, this.blocklyView_.hasClass("folding") && - (this.blocklyView_.addClass("foldOut"), this.blocklyView_.removeClass("folding")), this.showTabs(), c[d].addClass("entrySelectedCategory"), this.selectedMenu = e) : c[d].removeClass("entrySelectedCategory"); - } - } else { - if ("phone" == Entry.type) { - var f = []; - for (d = 0;d < f.length;d++) { - e = f[d].attributes[0].value, "string" == typeof a && e == a || "number" == typeof a && a == d ? c[d].hasClass("entrySelectedCategory") ? (this.blockMenu.hide(), c[d].removeClass("entrySelectedCategory"), this.menuInjected = !0, this.selectedMenu = e) : (c[d].addClass("entrySelectedCategory"), this.blockMenu.show(f[d].childNodes), this.menuInjected = !0, delete this.selctedMenu) : c[d].removeClass("entrySelectedCategory"); - } - } +Entry.Reporter.prototype.report = function(b) { + if (!this.isRealTime || this.io) { + var a = [], c; + for (c in b.params) { + var d = b.params[c]; + "object" !== typeof d ? a.push(d) : d.id && a.push(d.id); } - } else { - Entry.toast.alert(Lang.Workspace.add_object_alert, Lang.Workspace.add_object_alert_msg); + b = {message:b.message, userId:this.userId, projectId:this.projectId, time:b.time, params:a}; + this.isRealTime ? this.io.emit("activity", b) : this.activities.push(b); } }; -Entry.Playground.prototype.hideTabs = function() { - var a = ["picture", "text", "sound", "variable"], b; - for (b in a) { - this.hideTab([a[b]]); - } +Entry.Scene = function() { + var b = this; + this.scenes_ = []; + this.selectedScene = null; + this.maxCount = 20; + $(window).on("resize", function(a) { + b.resize(); + }); }; -Entry.Playground.prototype.hideTab = function(a) { - this.tabViewElements[a] && (this.tabViewElements[a].addClass("hideTab"), this.tabViewElements[a].removeClass("showTab")); +Entry.Scene.viewBasicWidth = 70; +Entry.Scene.prototype.generateView = function(b, a) { + var c = this; + this.view_ = b; + this.view_.addClass("entryScene"); + if (!a || "workspace" == a) { + this.view_.addClass("entrySceneWorkspace"); + $(this.view_).on("mousedown", function(a) { + var b = $(this).offset(), d = $(window), h = a.pageX - b.left + d.scrollLeft(); + a = a.pageY - b.top + d.scrollTop(); + a = 40 - a; + b = -40 / 55; + d = $(c.selectedScene.view).find(".entrySceneRemoveButtonCoverWorkspace").offset().left; + !(h < d || h > d + 55) && a > 40 + b * (h - d) && (h = c.getNextScene()) && (h = $(h.view), $(document).trigger("mouseup"), h.trigger("mousedown")); + }); + var d = Entry.createElement("ul"); + d.addClass("entrySceneListWorkspace"); + Entry.sceneEditable && $ && $(d).sortable({start:function(a, b) { + b.item.data("start_pos", b.item.index()); + $(b.item[0]).clone(!0); + }, stop:function(a, b) { + var c = b.item.data("start_pos"), d = b.item.index(); + Entry.scene.moveScene(c, d); + }, axis:"x", tolerance:"pointer"}); + this.view_.appendChild(d); + this.listView_ = d; + Entry.sceneEditable && (d = Entry.createElement("span"), d.addClass("entrySceneElementWorkspace"), d.addClass("entrySceneAddButtonWorkspace"), d.bindOnClick(function(a) { + Entry.engine.isState("run") || Entry.scene.addScene(); + }), this.view_.appendChild(d), this.addButton_ = d); + } }; -Entry.Playground.prototype.showTabs = function() { - var a = ["picture", "text", "sound", "variable"], b; - for (b in a) { - this.showTab(a[b]); +Entry.Scene.prototype.generateElement = function(b) { + var a = this, c = Entry.createElement("li", b.id); + c.addClass("entrySceneElementWorkspace"); + c.addClass("entrySceneButtonWorkspace"); + c.addClass("minValue"); + $(c).on("mousedown", function(a) { + Entry.engine.isState("run") ? a.preventDefault() : Entry.scene.selectScene(b); + }); + var d = Entry.createElement("input"); + d.addClass("entrySceneFieldWorkspace"); + d.value = b.name; + Entry.sceneEditable || (d.disabled = "disabled"); + var e = Entry.createElement("span"); + e.addClass("entrySceneLeftWorkspace"); + c.appendChild(e); + var f = Entry.createElement("span"); + f.addClass("entrySceneInputCover"); + f.style.width = Entry.computeInputWidth(b.name); + c.appendChild(f); + b.inputWrapper = f; + d.onkeyup = function(c) { + c = c.keyCode; + Entry.isArrowOrBackspace(c) || (b.name = this.value, f.style.width = Entry.computeInputWidth(b.name), a.resize(), 13 == c && this.blur(), 9 < this.value.length && (this.value = this.value.substring(0, 10), this.blur())); + }; + d.onblur = function(a) { + d.value = this.value; + b.name = this.value; + f.style.width = Entry.computeInputWidth(b.name); + }; + f.appendChild(d); + e = Entry.createElement("span"); + e.addClass("entrySceneRemoveButtonCoverWorkspace"); + c.appendChild(e); + if (Entry.sceneEditable) { + var g = Entry.createElement("button"); + g.addClass("entrySceneRemoveButtonWorkspace"); + g.innerHTML = "x"; + g.scene = b; + g.bindOnClick(function(a) { + a.stopPropagation(); + Entry.engine.isState("run") || confirm(Lang.Workspace.will_you_delete_scene) && Entry.scene.removeScene(this.scene); + }); + e.appendChild(g); } + Entry.Utils.disableContextmenu(c); + $(c).on("contextmenu", function() { + Entry.ContextMenu.show([{text:Lang.Workspace.duplicate_scene, callback:function() { + Entry.scene.cloneScene(b); + }}], "workspace-contextmenu"); + }); + return b.view = c; }; -Entry.Playground.prototype.showTab = function(a) { - this.tabViewElements[a] && (this.tabViewElements[a].addClass("showTab"), this.tabViewElements[a].removeClass("hideTab")); +Entry.Scene.prototype.updateView = function() { + if (!Entry.type || "workspace" == Entry.type) { + for (var b = this.listView_;b.hasChildNodes();) { + b.lastChild.removeClass("selectedScene"), b.removeChild(b.lastChild); + } + for (var a in this.getScenes()) { + var c = this.scenes_[a]; + b.appendChild(c.view); + this.selectedScene.id == c.id && c.view.addClass("selectedScene"); + } + this.addButton_ && (this.getScenes().length < this.maxCount ? this.addButton_.removeClass("entryRemove") : this.addButton_.addClass("entryRemove")); + } + this.resize(); }; -Entry.Playground.prototype.setBlockMenu = function(a) { - a || (a = EntryStatic.getAllBlocks()); - Entry.functionEnable && 1 < a.length && "arduino" == a[a.length - 1].category && a.splice(a.length - 1, 0, {category:"func"}); - Entry.messageEnable || this.blockMenu.banClass("message"); - Entry.variableEnable || this.blockMenu.banClass("variable"); - Entry.listEnable || this.blockMenu.banClass("list"); - this.updateHW(); - if (!Entry.sceneEditable) { - for (var b in a) { - "scene" == a[b].category && a.splice(b, 1); +Entry.Scene.prototype.addScenes = function(b) { + if ((this.scenes_ = b) && 0 !== b.length) { + for (var a = 0, c = b.length;a < c;a++) { + this.generateElement(b[a]); } + } else { + this.scenes_ = [], this.scenes_.push(this.createScene()); } - this.blockJSON = a; + this.selectScene(this.getScenes()[0]); + this.updateView(); }; -Entry.Playground.prototype.initializeResizeHandle = function(a) { - a.onmousedown = function(b) { - Entry.playground.resizing = !0; - }; - document.addEventListener("mousemove", function(b) { - Entry.playground.resizing && Entry.resizeElement({menuWidth:b.x - Entry.interfaceState.canvasWidth}); - }); - document.addEventListener("mouseup", function(b) { - Entry.playground.resizing = !1; - }); +Entry.Scene.prototype.addScene = function(b, a) { + void 0 === b && (b = this.createScene()); + b.view || this.generateElement(b); + a || "number" == typeof a ? this.getScenes().splice(a, 0, b) : this.getScenes().push(b); + Entry.stage.objectContainers.push(Entry.stage.createObjectContainer(b)); + Entry.playground.flushPlayground(); + this.selectScene(b); + this.updateView(); + return b; }; -Entry.Playground.prototype.reloadPlayground = function() { - var a, b; - document.getElementsByClassName("entrySelectedCategory")[0] && (a = document.getElementsByClassName("entrySelectedCategory")[0], b = a.getAttribute("id").substring(13), a.removeClass("entrySelectedCategory"), Entry.playground.selectMenu(b)); - Entry.stage.selectedObject && (Blockly.mainWorkspace.clear(), Blockly.Xml.domToWorkspace(Blockly.mainWorkspace, Entry.stage.selectedObject.script)); -}; -Entry.Playground.prototype.flushPlayground = function() { - this.object = null; - Entry.playground && Entry.playground.view_ && (Blockly.mainWorkspace.clear(), this.injectPicture(), this.injectSound()); +Entry.Scene.prototype.removeScene = function(b) { + if (1 >= this.getScenes().length) { + Entry.toast.alert(Lang.Msgs.runtime_error, Lang.Workspace.Scene_delete_error, !1); + } else { + var a = this.getScenes().indexOf(this.getSceneById(b.id)); + this.getScenes().splice(a, 1); + this.selectScene(); + for (var a = Entry.container.getSceneObjects(b), c = 0;c < a.length;c++) { + Entry.container.removeObject(a[c]); + } + Entry.stage.removeObjectContainer(b); + this.updateView(); + } }; -Entry.Playground.prototype.refreshPlayground = function() { - Entry.playground && Entry.playground.view_ && (this.injectPicture(), this.injectSound()); +Entry.Scene.prototype.selectScene = function(b) { + b = b || this.getScenes()[0]; + this.selectedScene && this.selectedScene.id == b.id || (Entry.engine.isState("run") && Entry.container.resetSceneDuringRun(), this.selectedScene = b, Entry.container.setCurrentObjects(), Entry.stage.objectContainers && 0 !== Entry.stage.objectContainers.length && Entry.stage.selectObjectContainer(b), (b = Entry.container.getCurrentObjects()[0]) && "minimize" != Entry.type ? (Entry.container.selectObject(b.id), Entry.playground.refreshPlayground()) : (Entry.stage.selectObject(null), Entry.playground.flushPlayground(), + Entry.variableContainer.updateList()), Entry.container.listView_ || Entry.stage.sortZorder(), Entry.container.updateListView(), this.updateView()); }; -Entry.Playground.prototype.updateListViewOrder = function(a) { - a = "picture" == a ? this.pictureListView_.childNodes : this.soundListView_.childNodes; - for (var b = 0, c = a.length;b < c;b++) { - a[b].orderHolder.innerHTML = b + 1; +Entry.Scene.prototype.toJSON = function() { + for (var b = [], a = this.getScenes().length, c = 0;c < a;c++) { + var d = this.getScenes()[c], e = d.view, f = d.inputWrapper; + delete d.view; + delete d.inputWrapper; + b.push(JSON.parse(JSON.stringify(d))); + d.view = e; + d.inputWrapper = f; } + return b; }; -Entry.Playground.prototype.generatePictureElement = function(a) { - function b() { - if ("" === this.value.trim()) { - Entry.deAttachEventListener(this, "blur", b), alert("\uc774\ub984\uc744 \uc785\ub825\ud558\uc5ec \uc8fc\uc138\uc694."), this.focus(), Entry.attachEventListener(this, "blur", b); - } else { - for (var a = $(".entryPlaygroundPictureName"), c = 0;c < a.length;c++) { - if (a.eq(c).val() == f.value && a[c] != this) { - Entry.deAttachEventListener(this, "blur", b); - alert("\uc774\ub984\uc774 \uc911\ubcf5 \ub418\uc5c8\uc2b5\ub2c8\ub2e4."); - this.focus(); - Entry.attachEventListener(this, "blur", b); - return; - } - } - this.picture.name = this.value; - Entry.playground.reloadPlayground(); - Entry.dispatchEvent("pictureNameChanged", this.picture); - } - } - var c = Entry.createElement("li", a.id); - a.view = c; - c.addClass("entryPlaygroundPictureElement"); - c.picture = a; - c.bindOnClick(function(b) { - Entry.playground.selectPicture(this.picture); - }); - Entry.Utils.disableContextmenu(a.view); - $(a.view).on("contextmenu", function() { - Entry.ContextMenu.show([{text:Lang.Workspace.context_rename, callback:function() { - f.focus(); - }}, {text:Lang.Workspace.context_duplicate, callback:function() { - Entry.playground.clonePicture(a.id); - }}, {text:Lang.Workspace.context_remove, callback:function() { - Entry.playground.object.removePicture(a.id) ? (Entry.removeElement(c), Entry.toast.success(Lang.Workspace.shape_remove_ok, a.name + " " + Lang.Workspace.shape_remove_ok_msg)) : Entry.toast.alert(Lang.Workspace.shape_remove_fail, Lang.Workspace.shape_remove_fail_msg); - }}, {divider:!0}, {text:Lang.Workspace.context_download, callback:function() { - a.fileurl ? window.open(a.fileurl) : window.open("/api/sprite/download/image/" + encodeURIComponent(a.filename) + "/" + encodeURIComponent(a.name) + ".png"); - }}], "workspace-contextmenu"); - }); - var d = Entry.createElement("div"); - d.addClass("entryPlaygroundPictureOrder"); - c.orderHolder = d; - c.appendChild(d); - d = Entry.createElement("div", "t_" + a.id); - d.addClass("entryPlaygroundPictureThumbnail"); - if (a.fileurl) { - d.style.backgroundImage = 'url("' + a.fileurl + '")'; - } else { - var e = a.filename; - d.style.backgroundImage = 'url("' + Entry.defaultPath + "/uploads/" + e.substring(0, 2) + "/" + e.substring(2, 4) + "/thumb/" + e + '.png")'; - } - c.appendChild(d); - var f = Entry.createElement("input"); - f.addClass("entryPlaygroundPictureName"); - f.addClass("entryEllipsis"); - f.picture = a; - f.value = a.name; - Entry.attachEventListener(f, "blur", b); - f.onkeypress = function(b) { - 13 == b.keyCode && this.blur(); - }; - c.appendChild(f); - d = Entry.createElement("div", "s_" + a.id); - d.addClass("entryPlaygroundPictureSize"); - d.innerHTML = a.dimension.width + " X " + a.dimension.height; - c.appendChild(d); +Entry.Scene.prototype.moveScene = function(b, a) { + this.getScenes().splice(a, 0, this.getScenes().splice(b, 1)[0]); + Entry.container.updateObjectsOrder(); + Entry.stage.sortZorder(); }; -Entry.Playground.prototype.generateSoundElement = function(a) { - var b = Entry.createElement("sound", a.id); - a.view = b; - b.addClass("entryPlaygroundSoundElement"); - b.sound = a; - Entry.Utils.disableContextmenu(a.view); - $(a.view).on("contextmenu", function() { - Entry.ContextMenu.show([{text:Lang.Workspace.context_rename, callback:function() { - g.focus(); - }}, {text:Lang.Workspace.context_duplicate, callback:function() { - Entry.playground.addSound(a, !0); - }}, {text:Lang.Workspace.context_remove, callback:function() { - Entry.playground.object.removeSound(a.id) ? (Entry.removeElement(b), Entry.toast.success(Lang.Workspace.sound_remove_ok, a.name + " " + Lang.Workspace.sound_remove_ok_msg)) : Entry.toast.alert(Lang.Workspace.sound_remove_fail, ""); - Entry.removeElement(b); - }}], "workspace-contextmenu"); - }); - var c = Entry.createElement("div"); - c.addClass("entryPlaygroundSoundOrder"); - b.orderHolder = c; - b.appendChild(c); - var d = Entry.createElement("div"); - d.addClass("entryPlaygroundSoundThumbnail"); - d.addClass("entryPlaygroundSoundPlay"); - var e = !1, f; - d.addEventListener("click", function() { - e ? (e = !1, d.removeClass("entryPlaygroundSoundStop"), d.addClass("entryPlaygroundSoundPlay"), f.stop()) : (e = !0, d.removeClass("entryPlaygroundSoundPlay"), d.addClass("entryPlaygroundSoundStop"), f = createjs.Sound.play(a.id), f.addEventListener("complete", function(b) { - d.removeClass("entryPlaygroundSoundStop"); - d.addClass("entryPlaygroundSoundPlay"); - e = !1; - }), f.addEventListener("loop", function(b) { - }), f.addEventListener("failed", function(b) { - })); - }); - b.appendChild(d); - var g = Entry.createElement("input"); - g.addClass("entryPlaygroundSoundName"); - g.sound = a; - g.value = a.name; - var h = document.getElementsByClassName("entryPlaygroundSoundName"); - g.onblur = function() { - if ("" === this.value) { - alert("\uc774\ub984\uc744 \uc785\ub825\ud558\uc5ec \uc8fc\uc138\uc694."), this.focus(); - } else { - for (var b = 0, a = 0;a < h.length;a++) { - if (h[a].value == g.value && (b += 1, 1 < b)) { - alert("\uc774\ub984\uc774 \uc911\ubcf5 \ub418\uc5c8\uc2b5\ub2c8\ub2e4."); - this.focus(); - return; - } - } - this.sound.name = this.value; +Entry.Scene.prototype.getSceneById = function(b) { + for (var a = this.getScenes(), c = 0;c < a.length;c++) { + if (a[c].id == b) { + return a[c]; } - }; - g.onkeypress = function(b) { - 13 == b.keyCode && this.blur(); - }; - b.appendChild(g); - c = Entry.createElement("div"); - c.addClass("entryPlaygroundSoundLength"); - c.innerHTML = a.duration + " \ucd08"; - b.appendChild(c); -}; -Entry.Playground.prototype.toggleColourChooser = function(a) { - "foreground" === a ? "none" === this.coloursWrapper.style.display ? (this.coloursWrapper.style.display = "block", this.backgroundsWrapper.style.display = "none") : this.coloursWrapper.style.display = "none" : "background" === a && ("none" === this.backgroundsWrapper.style.display ? (this.backgroundsWrapper.style.display = "block", this.coloursWrapper.style.display = "none") : this.backgroundsWrapper.style.display = "none"); -}; -Entry.Playground.prototype.setTextColour = function(a) { - Entry.playground.object.entity.setColour(a); - Entry.playground.toggleColourChooser("foreground"); - $(".entryPlayground_fgColorDiv").css("backgroundColor", a); + } + return !1; }; -Entry.Playground.prototype.setBackgroundColour = function(a) { - Entry.playground.object.entity.setBGColour(a); - Entry.playground.toggleColourChooser("background"); - $(".entryPlayground_bgColorDiv").css("backgroundColor", a); +Entry.Scene.prototype.getScenes = function() { + return this.scenes_; }; -Entry.Playground.prototype.isTextBGMode = function() { - return this.isTextBGMode_; +Entry.Scene.prototype.takeStartSceneSnapshot = function() { + this.sceneBeforeRun = this.selectedScene; }; -Entry.Playground.prototype.checkVariables = function() { - Entry.forEBS || (Entry.variableContainer.lists_.length ? this.blockMenu.unbanClass("listNotExist") : this.blockMenu.banClass("listNotExist"), Entry.variableContainer.variables_.length ? this.blockMenu.unbanClass("variableNotExist") : this.blockMenu.banClass("variableNotExist")); +Entry.Scene.prototype.loadStartSceneSnapshot = function() { + this.selectScene(this.sceneBeforeRun); + this.sceneBeforeRun = null; }; -Entry.Playground.prototype.getViewMode = function() { - return this.viewMode_; +Entry.Scene.prototype.createScene = function() { + var b = {name:Lang.Blocks.SCENE + " " + (this.getScenes().length + 1), id:Entry.generateHash()}; + this.generateElement(b); + return b; }; -Entry.Playground.prototype.updateHW = function() { - var a = Entry.playground; - if (a.blockMenu) { - var b = Entry.hw; - b && b.connected ? (a.blockMenu.unbanClass("arduinoConnected"), a.blockMenu.banClass("arduinoDisconnected"), b.banHW(), b.hwModule && a.blockMenu.unbanClass(b.hwModule.name)) : (a.blockMenu.banClass("arduinoConnected"), a.blockMenu.unbanClass("arduinoDisconnected"), Entry.hw.banHW()); - a.object && a.selectMenu(a.lastSelector, !0); +Entry.Scene.prototype.cloneScene = function(b) { + if (this.scenes_.length >= this.maxCount) { + Entry.toast.alert(Lang.Msgs.runtime_error, Lang.Workspace.Scene_add_error, !1); + } else { + var a = {name:b.name + Lang.Workspace.replica_of_object, id:Entry.generateHash()}; + this.generateElement(a); + this.addScene(a); + b = Entry.container.getSceneObjects(b); + for (var c = b.length - 1;0 <= c;c--) { + Entry.container.addCloneObject(b[c], a.id); + } } }; -Entry.Playground.prototype.toggleLineBreak = function(a) { - this.object && "textBox" == this.object.objectType && (a ? (Entry.playground.object.entity.setLineBreak(!0), $(".entryPlayground_textArea").css("display", "block"), $(".entryPlayground_textBox").css("display", "none"), this.linebreakOffImage.src = Entry.mediaFilePath + "text-linebreak-off-false.png", this.linebreakOnImage.src = Entry.mediaFilePath + "text-linebreak-on-true.png", this.fontSizeWrapper.removeClass("entryHide")) : (Entry.playground.object.entity.setLineBreak(!1), $(".entryPlayground_textArea").css("display", - "none"), $(".entryPlayground_textBox").css("display", "block"), this.linebreakOffImage.src = Entry.mediaFilePath + "text-linebreak-off-true.png", this.linebreakOnImage.src = Entry.mediaFilePath + "text-linebreak-on-false.png", this.fontSizeWrapper.addClass("entryHide"))); -}; -Entry.Playground.prototype.setFontAlign = function(a) { - if ("textBox" == this.object.objectType) { - this.alignLeftBtn.removeClass("toggle"); - this.alignCenterBtn.removeClass("toggle"); - this.alignRightBtn.removeClass("toggle"); - switch(a) { - case Entry.TEXT_ALIGN_LEFT: - this.alignLeftBtn.addClass("toggle"); - break; - case Entry.TEXT_ALIGN_CENTER: - this.alignCenterBtn.addClass("toggle"); - break; - case Entry.TEXT_ALIGN_RIGHT: - this.alignRightBtn.addClass("toggle"); +Entry.Scene.prototype.resize = function() { + var b = this.getScenes(), a = this.selectedScene, c = b[0]; + if (0 !== b.length && c) { + var d = $(c.view).offset().left, c = parseFloat($(a.view).css("margin-left")), e = $(this.view_).width() - d, f = 0, g; + for (g in b) { + var d = b[g], h = d.view; + h.addClass("minValue"); + $(h).removeProp("style"); + $(d.inputWrapper).width(Entry.computeInputWidth(d.name)); + h = $(h); + f = f + h.width() + c; + } + if (f > e) { + for (g in e -= $(a.view).width(), c = e / (b.length - 1) - (Entry.Scene.viewBasicWidth + c), b) { + d = b[g], a.id != d.id ? (d.view.removeClass("minValue"), $(d.inputWrapper).width(c)) : d.view.addClass("minValue"); + } } - this.object.entity.setTextAlign(a); } }; -Entry.Popup = function() { - Entry.assert(!window.popup, "Popup exist"); - this.body_ = Entry.createElement("div"); - this.body_.addClass("entryPopup"); - this.body_.bindOnClick(function(a) { - a.target == this && this.popup.remove(); - }); - this.body_.popup = this; - document.body.appendChild(this.body_); - this.window_ = Entry.createElement("div"); - this.window_.addClass("entryPopupWindow"); - this.window_.bindOnClick(function() { - }); - Entry.addEventListener("windowResized", this.resize); - window.popup = this; - this.resize(); - this.body_.appendChild(this.window_); -}; -Entry.Popup.prototype.remove = function() { - for (;this.window_.hasChildNodes();) { - "workspace" == Entry.type ? Entry.view_.insertBefore(this.window_.firstChild, Entry.container.view_) : Entry.view_.insertBefore(this.window_.lastChild, Entry.view_.firstChild); - } - $("body").css("overflow", "auto"); - Entry.removeElement(this.body_); - window.popup = null; - Entry.removeEventListener("windowResized", this.resize); - Entry.engine.popup = null; +Entry.Scene.prototype.getNextScene = function() { + var b = this.getScenes(); + return b[b.indexOf(this.selectedScene) + 1]; }; -Entry.Popup.prototype.resize = function(a) { - a = window.popup.window_; - var b = .9 * window.innerWidth, c = .9 * window.innerHeight - 35; - 9 * b <= 16 * c ? c = b / 16 * 9 : b = 16 * c / 9; - a.style.width = String(b) + "px"; - a.style.height = String(c + 35) + "px"; +Entry.Script = function(b) { + this.entity = b; }; -Entry.popupHelper = function(a) { - this.popupList = {}; - this.nowContent; - a && (window.popupHelper = null); - Entry.assert(!window.popupHelper, "Popup exist"); - var b = ["confirm", "spinner"], c = ["entryPopupHelperTopSpan", "entryPopupHelperBottomSpan", "entryPopupHelperLeftSpan", "entryPopupHelperRightSpan"]; - this.body_ = Entry.Dom("div", {classes:["entryPopup", "hiddenPopup", "popupHelper"]}); - var d = this; - this.body_.bindOnClick(function(a) { - if (!(d.nowContent && -1 < b.indexOf(d.nowContent.prop("type")))) { - var f = $(a.target); - c.forEach(function(b) { - f.hasClass(b) && this.popup.hide(); - }.bind(this)); - a.target == this && this.popup.hide(); +p = Entry.Script.prototype; +p.init = function(b, a, c) { + Entry.assert("BLOCK" == b.tagName.toUpperCase(), b.tagName); + this.type = b.getAttribute("type"); + this.id = Number(b.getAttribute("id")); + b.getElementsByTagName("mutation").length && b.getElementsByTagName("mutation")[0].hasAttribute("hashid") && (this.hashId = b.childNodes[0].getAttribute("hashid")); + "REPEAT" == this.type.substr(0, 6).toUpperCase() && (this.isRepeat = !0); + a instanceof Entry.Script && (this.previousScript = a, a.parentScript && (this.parentScript = a.parentScript)); + c instanceof Entry.Script && (this.parentScript = c); + b = b.childNodes; + for (a = 0;a < b.length;a++) { + if (c = b[a], "NEXT" == c.tagName.toUpperCase()) { + this.nextScript = new Entry.Script(this.entity), this.register && (this.nextScript.register = this.register), this.nextScript.init(b[a].childNodes[0], this); + } else { + if ("VALUE" == c.tagName.toUpperCase()) { + this.values || (this.values = {}); + var d = new Entry.Script(this.entity); + this.register && (d.register = this.register); + d.init(c.childNodes[0]); + this.values[c.getAttribute("name")] = d; + } else { + "FIELD" == c.tagName.toUpperCase() ? (this.fields || (this.fields = {}), this.fields[c.getAttribute("name")] = c.textContent) : "STATEMENT" == c.tagName.toUpperCase() && (this.statements || (this.statements = {}), d = new Entry.Script(this.entity), this.register && (d.register = this.register), d.init(c.childNodes[0], null, this), d.key = c.getAttribute("name"), this.statements[c.getAttribute("name")] = d); + } } - }); - window.popupHelper = this; - this.body_.prop("popup", this); - Entry.Dom("div", {class:"entryPopupHelperTopSpan", parent:this.body_}); - a = Entry.Dom("div", {class:"entryPopupHelperMiddleSpan", parent:this.body_}); - Entry.Dom("div", {class:"entryPopupHelperBottomSpan", parent:this.body_}); - Entry.Dom("div", {class:"entryPopupHelperLeftSpan", parent:a}); - this.window_ = Entry.Dom("div", {class:"entryPopupHelperWindow", parent:a}); - Entry.Dom("div", {class:"entryPopupHelperRightSpan", parent:a}); - $("body").append(this.body_); + } }; -Entry.popupHelper.prototype.clearPopup = function() { - for (var a = this.popupWrapper_.children.length - 1;2 < a;a--) { - this.popupWrapper_.removeChild(this.popupWrapper_.children[a]); +p.clone = function(b, a) { + var c = new Entry.Script(b); + c.id = this.id; + c.type = this.type; + c.isRepeat = this.isRepeat; + if (this.parentScript && !this.previousScript && 2 != a) { + c.parentScript = this.parentScript.clone(b); + for (var d = c.parentScript.statements[this.key] = c;d.nextScript;) { + d = d.nextScript, d.parentScript = c.parentScript; + } + } + this.nextScript && 1 != a && (c.nextScript = this.nextScript.clone(b, 0), c.nextScript.previousScript = this); + this.previousScript && 0 !== a && (c.previousScript = this.previousScript.clone(b, 1), c.previousScript.previousScript = this); + if (this.fields) { + c.fields = {}; + for (var e in this.fields) { + c.fields[e] = this.fields[e]; + } + } + if (this.values) { + for (e in c.values = {}, this.values) { + c.values[e] = this.values[e].clone(b); + } + } + if (this.statements) { + for (e in c.statements = {}, this.statements) { + for (c.statements[e] = this.statements[e].clone(b, 2), d = c.statements[e], d.parentScript = c;d.nextScript;) { + d = d.nextScript, d.parentScript = c; + } + } } + return c; }; -Entry.popupHelper.prototype.addPopup = function(a, b) { - var c = Entry.Dom("div"), d = Entry.Dom("div", {class:"entryPopupHelperCloseButton"}); - d.bindOnClick(function() { - b.closeEvent ? b.closeEvent(this) : this.hide(); - }.bind(this)); - var e = Entry.Dom("div", {class:"entryPopupHelperWrapper"}); - e.append(d); - b.title && (d = Entry.Dom("div", {class:"entryPopupHelperTitle"}), e.append(d), d.text(b.title)); - c.addClass(a); - c.append(e); - c.popupWrapper_ = e; - c.prop("type", b.type); - "function" === typeof b.setPopupLayout && b.setPopupLayout(c); - this.popupList[a] = c; +p.getStatement = function(b) { + return this.statements[b]; }; -Entry.popupHelper.prototype.hasPopup = function(a) { - return !!this.popupList[a]; +p.compute = function() { }; -Entry.popupHelper.prototype.setPopup = function(a) { +p.getValue = function(b) { + return this.values[b].run(); }; -Entry.popupHelper.prototype.remove = function(a) { - 0 < this.window_.children().length && this.window_.children().remove(); - this.window_.remove(); - delete this.popupList[a]; - this.nowContent = void 0; - this.body_.addClass("hiddenPopup"); +p.getNumberValue = function(b) { + return Number(this.values[b].run()); }; -Entry.popupHelper.prototype.resize = function(a) { +p.getStringValue = function(b) { + return String(this.values[b].run()); }; -Entry.popupHelper.prototype.show = function(a) { - 0 < this.window_.children().length && this.window_.children().detach(); - this.window_.append(this.popupList[a]); - this.nowContent = this.popupList[a]; - this.body_.removeClass("hiddenPopup"); +p.getBooleanValue = function(b) { + return this.values[b].run() ? !0 : !1; }; -Entry.popupHelper.prototype.hide = function() { - this.nowContent = void 0; - this.body_.addClass("hiddenPopup"); +p.getField = function(b) { + return this.fields[b]; }; -Entry.getStartProject = function(a) { - return {category:"\uae30\ud0c0", scenes:[{name:Lang.Blocks.SCENE + " 1", id:"7dwq"}], variables:[{name:Lang.Blocks.CALC_choose_project_timer_action_1, id:"brih", visible:!1, value:"0", variableType:"timer", x:150, y:-70, array:[], object:null, isCloud:!1}, {name:Lang.Blocks.VARIABLE_get_canvas_input_value, id:"1vu8", visible:!1, value:"0", variableType:"answer", x:150, y:-100, array:[], object:null, isCloud:!1}], objects:[{id:"7y0y", name:Lang.Blocks.entry_bot_name, script:'1010', - selectedPictureId:"vx80", objectType:"sprite", rotateMethod:"free", scene:"7dwq", sprite:{sounds:[{duration:1.3, ext:".mp3", id:"8el5", fileurl:a + "media/bark.mp3", name:Lang.Blocks.bark_dog}], pictures:[{id:"vx80", fileurl:a + "media/entrybot1.png", name:Lang.Blocks.walking_entryBot + "1", scale:100, dimension:{width:284, height:350}}, {id:"4t48", fileurl:a + "media/entrybot2.png", name:Lang.Blocks.walking_entryBot + "2", scale:100, dimension:{width:284, height:350}}]}, entity:{x:0, y:0, regX:142, - regY:175, scaleX:.3154574132492113, scaleY:.3154574132492113, rotation:0, direction:90, width:284, height:350, visible:!0}, lock:!1, active:!0}], speed:60}; +p.getStringField = function(b) { + return String(this.fields[b]); }; -Entry.PropertyPanel = function() { - this.modes = {}; - this.selected = null; +p.getNumberField = function(b) { + return Number(this.fields[b]); }; -(function(a) { - a.generateView = function(b, a) { - this._view = Entry.Dom("div", {class:"propertyPanel", parent:$(b)}); - this._tabView = Entry.Dom("div", {class:"propertyTab", parent:this._view}); - this._contentView = Entry.Dom("div", {class:"propertyContent", parent:this._view}); - var d = Entry.createElement("div"); - d.addClass("entryObjectSelectedImgWorkspace"); - this.selectedImgView_ = d; - this._view.append(d); - this.initializeSplitter(d); - this.splitter = d; - }; - a.addMode = function(b, a) { - var d = a.getView(), d = Entry.Dom(d, {parent:this._contentView}), e = Entry.Dom("
" + Lang.Menus[b] + "
", {classes:["propertyTabElement", "propertyTab" + b], parent:this._tabView}), f = this; - e.bind("click", function() { - f.select(b); - }); - this.modes[b] && (this.modes[b].tabDom.remove(), this.modes[b].contentDom.remove(), "hw" == b && ($(this.modes).removeClass(".propertyTabhw"), $(".propertyTabhw").unbind("dblclick"))); - this.modes[b] = {obj:a, tabDom:e, contentDom:d}; - "hw" == b && $(".propertyTabhw").bind("dblclick", function() { - Entry.dispatchEvent("hwModeChange"); - }); - }; - a.resize = function(b) { - this._view.css({width:b + "px", top:9 * b / 16 + 123 - 22 + "px"}); - 430 <= b ? this._view.removeClass("collapsed") : this._view.addClass("collapsed"); - Entry.dispatchEvent("windowResized"); - (b = this.modes[this.selected].obj.resize) && "hw" != this.selected ? b() : "hw" == this.selected && this.modes.hw.obj.listPorts ? this.modes[this.selected].obj.resizeList() : "hw" == this.selected && this.modes[this.selected].obj.resize(); - }; - a.select = function(b) { - for (var a in this.modes) { - var d = this.modes[a]; - d.tabDom.removeClass("selected"); - d.contentDom.addClass("entryHidden"); - } - a = this.modes[b]; - a.tabDom.addClass("selected"); - a.contentDom.removeClass("entryHidden"); - a.obj.resize && a.obj.resize(); - this.selected = b; - }; - a.initializeSplitter = function(b) { - b.onmousedown = function(b) { - Entry.container.disableSort(); - Entry.container.splitterEnable = !0; +p.callReturn = function() { + return this.nextScript ? this.nextScript : this.parentScript ? this.parentScript : null; +}; +p.run = function() { + return Entry.block[this.type](this.entity, this); +}; +Entry.Stage = function() { + this.variables = {}; + this.background = new createjs.Shape; + this.background.graphics.beginFill("#ffffff").drawRect(-480, -240, 960, 480); + this.objectContainers = []; + this.selectedObjectContainer = null; + this.variableContainer = new createjs.Container; + this.dialogContainer = new createjs.Container; + this.selectedObject = null; + this.isObjectClick = !1; +}; +Entry.Stage.prototype.initStage = function(b) { + this.canvas = new createjs.Stage(b.id); + this.canvas.x = 320; + this.canvas.y = 180; + this.canvas.scaleX = this.canvas.scaleY = 2 / 1.5; + createjs.Touch.enable(this.canvas); + this.canvas.enableMouseOver(10); + this.canvas.mouseMoveOutside = !0; + this.canvas.addChild(this.background); + this.canvas.addChild(this.variableContainer); + this.canvas.addChild(this.dialogContainer); + this.inputField = null; + this.initCoordinator(); + this.initHandle(); + this.mouseCoordinate = {x:0, y:0}; + if (Entry.isPhone()) { + b.ontouchstart = function(a) { + Entry.dispatchEvent("canvasClick", a); + Entry.stage.isClick = !0; + }, b.ontouchend = function(a) { + Entry.stage.isClick = !1; + Entry.dispatchEvent("canvasClickCanceled", a); }; - document.addEventListener("mousemove", function(b) { - Entry.container.splitterEnable && Entry.resizeElement({canvasWidth:b.x || b.clientX}); - }); - document.addEventListener("mouseup", function(b) { - Entry.container.splitterEnable = !1; - Entry.container.enableSort(); + } else { + var a = function(a) { + Entry.dispatchEvent("canvasClick", a); + Entry.stage.isClick = !0; + }; + b.onmousedown = a; + b.ontouchstart = a; + a = function(a) { + Entry.stage.isClick = !1; + Entry.dispatchEvent("canvasClickCanceled", a); + }; + b.onmouseup = a; + b.ontouchend = a; + $(document).click(function(a) { + Entry.stage.focused = "entryCanvas" === a.target.id ? !0 : !1; }); + } + Entry.addEventListener("canvasClick", function(a) { + Entry.stage.isObjectClick = !1; + }); + a = function(a) { + a.preventDefault(); + var b = this.getBoundingClientRect(), e; + -1 < Entry.getBrowserType().indexOf("IE") ? (e = 480 * ((a.pageX - b.left - document.documentElement.scrollLeft) / b.width - .5), a = -270 * ((a.pageY - b.top - document.documentElement.scrollTop) / b.height - .5)) : a.changedTouches ? (e = 480 * ((a.changedTouches[0].pageX - b.left - document.body.scrollLeft) / b.width - .5), a = -270 * ((a.changedTouches[0].pageY - b.top - document.body.scrollTop) / b.height - .5)) : (e = 480 * ((a.pageX - b.left - document.body.scrollLeft) / b.width - .5), + a = -270 * ((a.pageY - b.top - document.body.scrollTop) / b.height - .5)); + Entry.stage.mouseCoordinate = {x:e.toFixed(1), y:a.toFixed(1)}; + Entry.dispatchEvent("stageMouseMove"); }; -})(Entry.PropertyPanel.prototype); -Entry.init = function(a, b) { - Entry.assert("object" === typeof b, "Init option is not object"); - this.events_ = {}; - this.interfaceState = {menuWidth:264}; - Entry.Utils.bindGlobalEvent(["mousedown", "mousemove"]); - this.options = b; - this.parseOptions(b); - this.mediaFilePath = (b.libDir ? b.libDir : "/lib") + "/entryjs/images/"; - this.defaultPath = b.defaultDir || ""; - this.blockInjectPath = b.blockInjectDir || ""; - "workspace" == this.type && this.isPhone() && (this.type = "phone"); - this.initialize_(); - this.view_ = a; - this.view_.setAttribute("class", "entry"); - Entry.initFonts(b.fonts); - this.createDom(a, this.type); - this.loadInterfaceState(); - this.overridePrototype(); - this.maxCloneLimit = 302; - this.cloudSavable = !0; - this.startTime = (new Date).getTime(); - document.onkeydown = function(b) { - Entry.dispatchEvent("keyPressed", b); - }; - document.onkeyup = function(b) { - Entry.dispatchEvent("keyUpped", b); - }; - window.onresize = function(b) { - Entry.dispatchEvent("windowResized", b); + b.onmousemove = a; + b.ontouchmove = a; + b.onmouseout = function(a) { + Entry.dispatchEvent("stageMouseOut"); }; - window.onbeforeunload = this.beforeUnload; - Entry.addEventListener("saveWorkspace", function(b) { - Entry.addActivity("save"); + Entry.addEventListener("updateObject", function(a) { + Entry.engine.isState("stop") && Entry.stage.updateObject(); }); - "IE" != Entry.getBrowserType().substr(0, 2) || window.flashaudio ? createjs.Sound.registerPlugins([createjs.WebAudioPlugin]) : (createjs.FlashAudioPlugin.swfPath = this.mediaFilePath + "media/", createjs.Sound.registerPlugins([createjs.FlashAudioPlugin]), window.flashaudio = !0); - Entry.soundQueue = new createjs.LoadQueue; - Entry.soundQueue.installPlugin(createjs.Sound); - Entry.loadAudio_([Entry.mediaFilePath + "media/click.mp3", Entry.mediaFilePath + "media/click.wav", Entry.mediaFilePath + "media/click.ogg"], "click"); - Entry.loadAudio_([Entry.mediaFilePath + "media/delete.mp3", Entry.mediaFilePath + "media/delete.ogg", Entry.mediaFilePath + "media/delete.wav"], "delete"); + Entry.addEventListener("canvasInputComplete", function(a) { + try { + var b = Entry.stage.inputField.value(); + Entry.stage.hideInputField(); + if (b) { + var e = Entry.container; + e.setInputValue(b); + e.inputValue.complete = !0; + } + } catch (f) { + } + }); + this.initWall(); + this.render(); }; -Entry.loadAudio_ = function(a, b) { - if (window.Audio && a.length) { - for (;0 < a.length;) { - var c = a[0]; - c.match(/\/([^.]+)./); - Entry.soundQueue.loadFile({id:b, src:c, type:createjs.LoadQueue.SOUND}); - break; +Entry.Stage.prototype.render = function() { + Entry.stage.timer && clearTimeout(Entry.stage.timer); + var b = (new Date).getTime(); + Entry.stage.update(); + b = (new Date).getTime() - b; + Entry.stage.timer = setTimeout(Entry.stage.render, 16 - b % 16 + 16 * Math.floor(b / 16)); +}; +Entry.Stage.prototype.update = function() { + Entry.engine.isState("stop") && this.objectUpdated ? (this.canvas.update(), this.objectUpdated = !1) : this.canvas.update(); + this.inputField && !this.inputField._isHidden && this.inputField.render(); +}; +Entry.Stage.prototype.loadObject = function(b) { + var a = b.entity.object; + this.getObjectContainerByScene(b.scene).addChild(a); + this.canvas.update(); +}; +Entry.Stage.prototype.loadEntity = function(b) { + Entry.stage.getObjectContainerByScene(b.parent.scene).addChild(b.object); + this.sortZorder(); +}; +Entry.Stage.prototype.unloadEntity = function(b) { + Entry.stage.getObjectContainerByScene(b.parent.scene).removeChild(b.object); +}; +Entry.Stage.prototype.loadVariable = function(b) { + var a = b.view_; + this.variables[b.id] = a; + this.variableContainer.addChild(a); + this.canvas.update(); +}; +Entry.Stage.prototype.removeVariable = function(b) { + this.variableContainer.removeChild(b.view_); + this.canvas.update(); +}; +Entry.Stage.prototype.loadDialog = function(b) { + this.dialogContainer.addChild(b.object); +}; +Entry.Stage.prototype.unloadDialog = function(b) { + this.dialogContainer.removeChild(b.object); +}; +Entry.Stage.prototype.sortZorder = function() { + for (var b = Entry.container.getCurrentObjects(), a = this.selectedObjectContainer, c = 0, d = b.length - 1;0 <= d;d--) { + for (var e = b[d], f = e.entity, e = e.clonedEntities, g = 0, h = e.length;g < h;g++) { + e[g].shape && a.setChildIndex(e[g].shape, c++), a.setChildIndex(e[g].object, c++); } + f.shape && a.setChildIndex(f.shape, c++); + a.setChildIndex(f.object, c++); } }; -Entry.initialize_ = function() { - this.stage = new Entry.Stage; - Entry.engine && Entry.engine.clearTimer(); - this.engine = new Entry.Engine; - this.propertyPanel = new Entry.PropertyPanel; - this.container = new Entry.Container; - this.helper = new Entry.Helper; - this.youtube = new Entry.Youtube; - this.variableContainer = new Entry.VariableContainer; - if ("workspace" == this.type || "phone" == this.type) { - this.stateManager = new Entry.StateManager; - } - this.scene = new Entry.Scene; - this.playground = new Entry.Playground; - this.toast = new Entry.Toast; - this.hw && this.hw.closeConnection(); - this.hw = new Entry.HW; - if (Entry.enableActivityLogging) { - this.reporter = new Entry.Reporter(!1); - } else { - if ("workspace" == this.type || "phone" == this.type) { - this.reporter = new Entry.Reporter(!0); +Entry.Stage.prototype.initCoordinator = function() { + var b = new createjs.Container, a = new createjs.Bitmap(Entry.mediaFilePath + "workspace_coordinate.png"); + a.scaleX = .5; + a.scaleY = .5; + a.x = -240; + a.y = -135; + b.addChild(a); + this.canvas.addChild(b); + b.visible = !1; + this.coordinator = b; +}; +Entry.Stage.prototype.toggleCoordinator = function() { + this.coordinator.visible = !this.coordinator.visible; +}; +Entry.Stage.prototype.selectObject = function(b) { + this.selectedObject = b ? b : null; + this.updateObject(); +}; +Entry.Stage.prototype.initHandle = function() { + this.handle = new EaselHandle(this.canvas); + this.handle.setChangeListener(this, this.updateHandle); + this.handle.setEditStartListener(this, this.startEdit); + this.handle.setEditEndListener(this, this.endEdit); +}; +Entry.Stage.prototype.updateObject = function() { + this.handle.setDraggable(!0); + if (!this.editEntity) { + var b = this.selectedObject; + if (b) { + "textBox" == b.objectType ? this.handle.toggleCenter(!1) : this.handle.toggleCenter(!0); + "free" == b.getRotateMethod() ? this.handle.toggleRotation(!0) : this.handle.toggleRotation(!1); + this.handle.toggleDirection(!0); + b.getLock() ? (this.handle.toggleRotation(!1), this.handle.toggleDirection(!1), this.handle.toggleResize(!1), this.handle.toggleCenter(!1), this.handle.setDraggable(!1)) : this.handle.toggleResize(!0); + this.handle.setVisible(!0); + var a = b.entity; + this.handle.setWidth(a.getScaleX() * a.getWidth()); + this.handle.setHeight(a.getScaleY() * a.getHeight()); + var c, d; + if ("textBox" == a.type) { + if (a.getLineBreak()) { + c = a.regX * a.scaleX, d = -a.regY * a.scaleY; + } else { + var e = a.getTextAlign(); + d = -a.regY * a.scaleY; + switch(e) { + case Entry.TEXT_ALIGN_LEFT: + c = -a.getWidth() / 2 * a.scaleX; + break; + case Entry.TEXT_ALIGN_CENTER: + c = a.regX * a.scaleX; + break; + case Entry.TEXT_ALIGN_RIGHT: + c = a.getWidth() / 2 * a.scaleX; + } + } + } else { + c = (a.regX - a.width / 2) * a.scaleX, d = (a.height / 2 - a.regY) * a.scaleY; + } + e = a.getRotation() / 180 * Math.PI; + this.handle.setX(a.getX() - c * Math.cos(e) - d * Math.sin(e)); + this.handle.setY(-a.getY() - c * Math.sin(e) + d * Math.cos(e)); + this.handle.setRegX((a.regX - a.width / 2) * a.scaleX); + this.handle.setRegY((a.regY - a.height / 2) * a.scaleY); + this.handle.setRotation(a.getRotation()); + this.handle.setDirection(a.getDirection()); + this.objectUpdated = !0; + this.handle.setVisible(b.entity.getVisible()); + b.entity.getVisible() && this.handle.render(); + } else { + this.handle.setVisible(!1); } } }; -Entry.createDom = function(a, b) { - if (b && "workspace" != b) { - "minimize" == b ? (c = Entry.createElement("canvas"), c.className = "entryCanvasWorkspace", c.id = "entryCanvas", c.width = 640, c.height = 360, d = Entry.createElement("div", "entryCanvasWrapper"), d.appendChild(c), a.appendChild(d), this.canvas_ = c, this.stage.initStage(this.canvas_), d = Entry.createElement("div"), a.appendChild(d), this.engineView = d, this.engine.generateView(this.engineView, b)) : "phone" == b && (this.stateManagerView = c = Entry.createElement("div"), this.stateManager.generateView(this.stateManagerView, - b), d = Entry.createElement("div"), a.appendChild(d), this.engineView = d, this.engine.generateView(this.engineView, b), c = Entry.createElement("canvas"), c.addClass("entryCanvasPhone"), c.id = "entryCanvas", c.width = 640, c.height = 360, d.insertBefore(c, this.engine.footerView_), this.canvas_ = c, this.stage.initStage(this.canvas_), c = Entry.createElement("div"), a.appendChild(c), this.containerView = c, this.container.generateView(this.containerView, b), c = Entry.createElement("div"), - a.appendChild(c), this.playgroundView = c, this.playground.generateView(this.playgroundView, b)); - } else { - Entry.documentMousedown.attach(this, this.cancelObjectEdit); - var c = Entry.createElement("div"); - a.appendChild(c); - this.sceneView = c; - this.scene.generateView(this.sceneView, b); - c = Entry.createElement("div"); - this.sceneView.appendChild(c); - this.stateManagerView = c; - this.stateManager.generateView(this.stateManagerView, b); - var d = Entry.createElement("div"); - a.appendChild(d); - this.engineView = d; - this.engine.generateView(this.engineView, b); - c = Entry.createElement("canvas"); - c.addClass("entryCanvasWorkspace"); - c.id = "entryCanvas"; - c.width = 640; - c.height = 360; - d.insertBefore(c, this.engine.addButton); - c.addEventListener("mousewheel", function(b) { - var a = Entry.variableContainer.getListById(Entry.stage.mouseCoordinate); - b = 0 < b.wheelDelta ? !0 : !1; - for (var c = 0;c < a.length;c++) { - var d = a[c]; - d.scrollButton_.y = b ? 46 <= d.scrollButton_.y ? d.scrollButton_.y - 23 : 23 : d.scrollButton_.y + 23; - d.updateView(); +Entry.Stage.prototype.updateHandle = function() { + this.editEntity = !0; + var b = this.handle, a = this.selectedObject.entity; + a.lineBreak ? (a.setHeight(b.height / a.getScaleY()), a.setWidth(b.width / a.getScaleX())) : (0 !== a.width && (0 > a.getScaleX() ? a.setScaleX(-b.width / a.width) : a.setScaleX(b.width / a.width)), 0 !== a.height && a.setScaleY(b.height / a.height)); + var c = b.rotation / 180 * Math.PI; + if ("textBox" == a.type) { + var d = b.regX / a.scaleX, d = b.regY / a.scaleY; + if (a.getLineBreak()) { + a.setX(b.x), a.setY(-b.y); + } else { + switch(a.getTextAlign()) { + case Entry.TEXT_ALIGN_LEFT: + a.setX(b.x - b.width / 2 * Math.cos(c)); + a.setY(-b.y + b.width / 2 * Math.sin(c)); + break; + case Entry.TEXT_ALIGN_CENTER: + a.setX(b.x); + a.setY(-b.y); + break; + case Entry.TEXT_ALIGN_RIGHT: + a.setX(b.x + b.width / 2 * Math.cos(c)), a.setY(-b.y - b.width / 2 * Math.sin(c)); } - }); - this.canvas_ = c; - this.stage.initStage(this.canvas_); - c = Entry.createElement("div"); - this.propertyPanel.generateView(a, b); - this.containerView = c; - this.container.generateView(this.containerView, b); - c = Entry.createElement("div"); - a.appendChild(c); - this.playgroundView = c; - this.playground.generateView(this.playgroundView, b); - this.propertyPanel.addMode("object", this.container); - this.propertyPanel.addMode("helper", this.helper); - this.propertyPanel.select("object"); + } + } else { + d = a.width / 2 + b.regX / a.scaleX, a.setX(b.x + b.regX * Math.cos(c) - b.regY * Math.sin(c)), a.setRegX(d), d = a.height / 2 + b.regY / a.scaleY, a.setY(-b.y - b.regX * Math.sin(c) - b.regY * Math.cos(c)), a.setRegY(d); } + a.setDirection(b.direction); + a.setRotation(b.rotation); + this.selectedObject.entity.doCommand(); + this.editEntity = !1; }; -Entry.start = function(a) { - this.FPS || (this.FPS = 60); - Entry.assert("number" == typeof this.FPS, "FPS must be number"); - Entry.engine.start(this.FPS); +Entry.Stage.prototype.startEdit = function() { + this.selectedObject.entity.initCommand(); }; -Entry.parseOptions = function(a) { - this.type = a.type; - this.projectSaveable = a.projectsaveable; - void 0 === this.projectSaveable && (this.projectSaveable = !0); - this.objectAddable = a.objectaddable; - void 0 === this.objectAddable && (this.objectAddable = !0); - this.objectEditable = a.objectEditable; - void 0 === this.objectEditable && (this.objectEditable = !0); - this.objectEditable || (this.objectAddable = !1); - this.objectDeletable = a.objectdeletable; - void 0 === this.objectDeletable && (this.objectDeletable = !0); - this.soundEditable = a.soundeditable; - void 0 === this.soundEditable && (this.soundEditable = !0); - this.pictureEditable = a.pictureeditable; - void 0 === this.pictureEditable && (this.pictureEditable = !0); - this.sceneEditable = a.sceneEditable; - void 0 === this.sceneEditable && (this.sceneEditable = !0); - this.functionEnable = a.functionEnable; - void 0 === this.functionEnable && (this.functionEnable = !0); - this.messageEnable = a.messageEnable; - void 0 === this.messageEnable && (this.messageEnable = !0); - this.variableEnable = a.variableEnable; - void 0 === this.variableEnable && (this.variableEnable = !0); - this.listEnable = a.listEnable; - void 0 === this.listEnable && (this.listEnable = !0); - this.hasVariableManager = a.hasvariablemanager; - this.variableEnable || this.messageEnable || this.listEnable || this.functionEnable ? void 0 === this.hasVariableManager && (this.hasVariableManager = !0) : this.hasVariableManager = !1; - this.isForLecture = a.isForLecture; +Entry.Stage.prototype.endEdit = function() { + this.selectedObject.entity.checkCommand(); }; -Entry.initFonts = function(a) { - this.fonts = a; - a || (this.fonts = []); +Entry.Stage.prototype.initWall = function() { + var b = new createjs.Container, a = new Image; + a.src = Entry.mediaFilePath + "media/bound.png"; + b.up = new createjs.Bitmap; + b.up.scaleX = 16; + b.up.y = -165; + b.up.x = -240; + b.up.image = a; + b.addChild(b.up); + b.down = new createjs.Bitmap; + b.down.scaleX = 16; + b.down.y = 135; + b.down.x = -240; + b.down.image = a; + b.addChild(b.down); + b.right = new createjs.Bitmap; + b.right.scaleY = 9; + b.right.y = -135; + b.right.x = 240; + b.right.image = a; + b.addChild(b.right); + b.left = new createjs.Bitmap; + b.left.scaleY = 9; + b.left.y = -135; + b.left.x = -270; + b.left.image = a; + b.addChild(b.left); + this.canvas.addChild(b); + this.wall = b; +}; +Entry.Stage.prototype.showInputField = function(b) { + b = 1 / 1.5; + this.inputField || (this.inputField = new CanvasInput({canvas:document.getElementById("entryCanvas"), fontSize:30 * b, fontFamily:"NanumGothic", fontColor:"#212121", width:556 * b, height:26 * b, padding:8 * b, borderWidth:1 * b, borderColor:"#000", borderRadius:3 * b, boxShadow:"none", innerShadow:"0px 0px 5px rgba(0, 0, 0, 0.5)", x:202 * b, y:450 * b, topPosition:!0, onsubmit:function() { + Entry.dispatchEvent("canvasInputComplete"); + }})); + b = new createjs.Container; + var a = new Image; + a.src = Entry.mediaFilePath + "confirm_button.png"; + var c = new createjs.Bitmap; + c.scaleX = .23; + c.scaleY = .23; + c.x = 160; + c.y = 89; + c.cursor = "pointer"; + c.image = a; + b.addChild(c); + b.on("mousedown", function(a) { + Entry.dispatchEvent("canvasInputComplete"); + }); + this.inputSubmitButton || (this.inputField.value(""), this.canvas.addChild(b), this.inputSubmitButton = b); + this.inputField.show(); }; -Entry.Reporter = function(a) { - this.projectId = this.userId = null; - this.isRealTime = a; - this.activities = []; +Entry.Stage.prototype.hideInputField = function() { + this.inputField && this.inputField.value() && this.inputField.value(""); + this.inputSubmitButton && (this.canvas.removeChild(this.inputSubmitButton), this.inputSubmitButton = null); + this.inputField && this.inputField.hide(); }; -Entry.Reporter.prototype.start = function(a, b, c) { - this.isRealTime && (-1 < window.location.href.indexOf("localhost") ? this.io = io("localhost:7000") : this.io = io("play04.play-entry.com:7000"), this.io.emit("activity", {message:"start", userId:b, projectId:a, time:c})); - this.userId = b; - this.projectId = a; +Entry.Stage.prototype.initObjectContainers = function() { + var b = Entry.scene.scenes_; + if (b && 0 !== b.length) { + for (var a = 0;a < b.length;a++) { + this.objectContainers[a] = this.createObjectContainer(b[a]); + } + this.selectedObjectContainer = this.objectContainers[0]; + } else { + b = this.createObjectContainer(Entry.scene.selectedScene), this.objectContainers.push(b), this.selectedObjectContainer = b; + } + this.canvas.addChild(this.selectedObjectContainer); + this.selectObjectContainer(Entry.scene.selectedScene); }; -Entry.Reporter.prototype.report = function(a) { - if (!this.isRealTime || this.io) { - var b = [], c; - for (c in a.params) { - var d = a.params[c]; - "object" !== typeof d ? b.push(d) : d.id && b.push(d.id); +Entry.Stage.prototype.selectObjectContainer = function(b) { + if (this.canvas) { + for (var a = this.objectContainers, c = 0;c < a.length;c++) { + this.canvas.removeChild(a[c]); } - a = {message:a.message, userId:this.userId, projectId:this.projectId, time:a.time, params:b}; - this.isRealTime ? this.io.emit("activity", a) : this.activities.push(a); + this.selectedObjectContainer = this.getObjectContainerByScene(b); + this.canvas.addChildAt(this.selectedObjectContainer, 2); } }; -Entry.Scene = function() { - var a = this; - this.scenes_ = []; - this.selectedScene = null; - this.maxCount = 20; - $(window).on("resize", function(b) { - a.resize(); - }); -}; -Entry.Scene.viewBasicWidth = 70; -Entry.Scene.prototype.generateView = function(a, b) { - var c = this; - this.view_ = a; - this.view_.addClass("entryScene"); - if (!b || "workspace" == b) { - this.view_.addClass("entrySceneWorkspace"); - $(this.view_).on("mousedown", function(b) { - var a = $(this).offset(), d = $(window), h = b.pageX - a.left + d.scrollLeft(); - b = b.pageY - a.top + d.scrollTop(); - b = 40 - b; - a = -40 / 55; - d = $(c.selectedScene.view).find(".entrySceneRemoveButtonCoverWorkspace").offset().left; - !(h < d || h > d + 55) && b > 40 + a * (h - d) && (h = c.getNextScene()) && (h = $(h.view), $(document).trigger("mouseup"), h.trigger("mousedown")); - }); - var d = Entry.createElement("ul"); - d.addClass("entrySceneListWorkspace"); - Entry.sceneEditable && $ && $(d).sortable({start:function(b, a) { - a.item.data("start_pos", a.item.index()); - $(a.item[0]).clone(!0); - }, stop:function(b, a) { - var c = a.item.data("start_pos"), d = a.item.index(); - Entry.scene.moveScene(c, d); - }, axis:"x", tolerance:"pointer"}); - this.view_.appendChild(d); - this.listView_ = d; - Entry.sceneEditable && (d = Entry.createElement("span"), d.addClass("entrySceneElementWorkspace"), d.addClass("entrySceneAddButtonWorkspace"), d.bindOnClick(function(b) { - Entry.engine.isState("run") || Entry.scene.addScene(); - }), this.view_.appendChild(d), this.addButton_ = d); +Entry.Stage.prototype.reAttachToCanvas = function() { + for (var b = [this.selectedObjectContainer, this.variableContainer, this.coordinator, this.handle, this.dialogContainer], a = 0;a < b.length;a++) { + this.canvas.removeChild(b[a]), this.canvas.addChild(b[a]); } + console.log(this.canvas.getChildIndex(this.selectedObjectContainer)); }; -Entry.Scene.prototype.generateElement = function(a) { - var b = this, c = Entry.createElement("li", a.id); - c.addClass("entrySceneElementWorkspace"); - c.addClass("entrySceneButtonWorkspace"); - c.addClass("minValue"); - $(c).on("mousedown", function(b) { - Entry.engine.isState("run") ? b.preventDefault() : Entry.scene.selectScene(a); - }); - var d = Entry.createElement("input"); - d.addClass("entrySceneFieldWorkspace"); - d.value = a.name; - Entry.sceneEditable || (d.disabled = "disabled"); - var e = Entry.createElement("span"); - e.addClass("entrySceneLeftWorkspace"); - c.appendChild(e); - var f = Entry.createElement("span"); - f.addClass("entrySceneInputCover"); - f.style.width = Entry.computeInputWidth(a.name); - c.appendChild(f); - a.inputWrapper = f; - d.onkeyup = function(c) { - c = c.keyCode; - Entry.isArrowOrBackspace(c) || (a.name = this.value, f.style.width = Entry.computeInputWidth(a.name), b.resize(), 13 == c && this.blur(), 9 < this.value.length && (this.value = this.value.substring(0, 10), this.blur())); - }; - d.onblur = function(b) { - d.value = this.value; - a.name = this.value; - f.style.width = Entry.computeInputWidth(a.name); - }; - f.appendChild(d); - e = Entry.createElement("span"); - e.addClass("entrySceneRemoveButtonCoverWorkspace"); - c.appendChild(e); - if (Entry.sceneEditable) { - var g = Entry.createElement("button"); - g.addClass("entrySceneRemoveButtonWorkspace"); - g.innerHTML = "x"; - g.scene = a; - g.bindOnClick(function(b) { - b.stopPropagation(); - Entry.engine.isState("run") || confirm(Lang.Workspace.will_you_delete_scene) && Entry.scene.removeScene(this.scene); - }); - e.appendChild(g); - } - Entry.Utils.disableContextmenu(c); - $(c).on("contextmenu", function() { - Entry.ContextMenu.show([{text:Lang.Workspace.duplicate_scene, callback:function() { - Entry.scene.cloneScene(a); - }}], "workspace-contextmenu"); - }); - return a.view = c; +Entry.Stage.prototype.createObjectContainer = function(b) { + var a = new createjs.Container; + a.scene = b; + return a; }; -Entry.Scene.prototype.updateView = function() { - if (!Entry.type || "workspace" == Entry.type) { - for (var a = this.listView_;a.hasChildNodes();) { - a.lastChild.removeClass("selectedScene"), a.removeChild(a.lastChild); - } - for (var b in this.getScenes()) { - var c = this.scenes_[b]; - a.appendChild(c.view); - this.selectedScene.id == c.id && c.view.addClass("selectedScene"); - } - this.addButton_ && (this.getScenes().length < this.maxCount ? this.addButton_.removeClass("entryRemove") : this.addButton_.addClass("entryRemove")); - } - this.resize(); +Entry.Stage.prototype.removeObjectContainer = function(b) { + var a = this.objectContainers; + b = this.getObjectContainerByScene(b); + this.canvas.removeChild(b); + a.splice(this.objectContainers.indexOf(b), 1); }; -Entry.Scene.prototype.addScenes = function(a) { - if ((this.scenes_ = a) && 0 !== a.length) { - for (var b = 0, c = a.length;b < c;b++) { - this.generateElement(a[b]); +Entry.Stage.prototype.getObjectContainerByScene = function(b) { + for (var a = this.objectContainers, c = 0;c < a.length;c++) { + if (a[c].scene.id == b.id) { + return a[c]; } - } else { - this.scenes_ = [], this.scenes_.push(this.createScene()); } - this.selectScene(this.getScenes()[0]); - this.updateView(); }; -Entry.Scene.prototype.addScene = function(a, b) { - void 0 === a && (a = this.createScene()); - a.view || this.generateElement(a); - b || "number" == typeof b ? this.getScenes().splice(b, 0, a) : this.getScenes().push(a); - Entry.stage.objectContainers.push(Entry.stage.createObjectContainer(a)); - Entry.playground.flushPlayground(); - this.selectScene(a); - this.updateView(); - return a; -}; -Entry.Scene.prototype.removeScene = function(a) { - if (1 >= this.getScenes().length) { - Entry.toast.alert(Lang.Msgs.runtime_error, Lang.Workspace.Scene_delete_error, !1); - } else { - var b = this.getScenes().indexOf(this.getSceneById(a.id)); - this.getScenes().splice(b, 1); - this.selectScene(); - for (var b = Entry.container.getSceneObjects(a), c = 0;c < b.length;c++) { - Entry.container.removeObject(b[c]); +Entry.Stage.prototype.moveSprite = function(b) { + if (this.selectedObject && Entry.stage.focused && !this.selectedObject.getLock()) { + var a = 5; + b.shiftKey && (a = 1); + var c = this.selectedObject.entity; + switch(b.keyCode) { + case 38: + c.setY(c.getY() + a); + break; + case 40: + c.setY(c.getY() - a); + break; + case 37: + c.setX(c.getX() - a); + break; + case 39: + c.setX(c.getX() + a); } - Entry.stage.removeObjectContainer(a); - this.updateView(); - } -}; -Entry.Scene.prototype.selectScene = function(a) { - a = a || this.getScenes()[0]; - this.selectedScene && this.selectedScene.id == a.id || (Entry.engine.isState("run") && Entry.container.resetSceneDuringRun(), this.selectedScene = a, Entry.container.setCurrentObjects(), Entry.stage.objectContainers && 0 !== Entry.stage.objectContainers.length && Entry.stage.selectObjectContainer(a), (a = Entry.container.getCurrentObjects()[0]) && "minimize" != Entry.type ? (Entry.container.selectObject(a.id), Entry.playground.refreshPlayground()) : (Entry.stage.selectObject(null), Entry.playground.flushPlayground(), - Entry.variableContainer.updateList()), Entry.container.listView_ || Entry.stage.sortZorder(), Entry.container.updateListView(), this.updateView()); -}; -Entry.Scene.prototype.toJSON = function() { - for (var a = [], b = this.getScenes().length, c = 0;c < b;c++) { - var d = this.getScenes()[c], e = d.view, f = d.inputWrapper; - delete d.view; - delete d.inputWrapper; - a.push(JSON.parse(JSON.stringify(d))); - d.view = e; - d.inputWrapper = f; + this.updateObject(); } - return a; -}; -Entry.Scene.prototype.moveScene = function(a, b) { - this.getScenes().splice(b, 0, this.getScenes().splice(a, 1)[0]); - Entry.container.updateObjectsOrder(); - Entry.stage.sortZorder(); }; -Entry.Scene.prototype.getSceneById = function(a) { - for (var b = this.getScenes(), c = 0;c < b.length;c++) { - if (b[c].id == a) { - return b[c]; - } +Entry.StampEntity = function(b, a) { + this.parent = b; + this.type = b.objectType; + this.isStamp = this.isClone = !0; + this.width = a.getWidth(); + this.height = a.getHeight(); + "sprite" == this.type && (this.object = a.object.clone(!0), this.object.filters = null, a.effect && (this.effect = Entry.cloneSimpleObject(a.effect), this.applyFilter())); + this.object.entity = this; + if (a.dialog) { + var c = a.dialog; + new Entry.Dialog(this, c.message_, c.mode_, !0); + this.dialog.object = a.dialog.object.clone(!0); + Entry.stage.loadDialog(this.dialog); } - return !1; }; -Entry.Scene.prototype.getScenes = function() { - return this.scenes_; +var EntityPrototype = Entry.EntityObject.prototype; +Entry.StampEntity.prototype.applyFilter = EntityPrototype.applyFilter; +Entry.StampEntity.prototype.removeClone = EntityPrototype.removeClone; +Entry.StampEntity.prototype.getWidth = EntityPrototype.getWidth; +Entry.StampEntity.prototype.getHeight = EntityPrototype.getHeight; +Entry.Toast = function() { + this.toasts_ = []; + var b = document.getElementById("entryToastContainer"); + b && document.body.removeChild(b); + this.body_ = Entry.createElement("div", "entryToastContainer"); + this.body_.addClass("entryToastContainer"); + document.body.appendChild(this.body_); }; -Entry.Scene.prototype.takeStartSceneSnapshot = function() { - this.sceneBeforeRun = this.selectedScene; +Entry.Toast.prototype.warning = function(b, a, c) { + var d = Entry.createElement("div", "entryToast"); + d.addClass("entryToast"); + d.addClass("entryToastWarning"); + d.bindOnClick(function() { + Entry.toast.body_.removeChild(this); + }); + var e = Entry.createElement("div", "entryToast"); + e.addClass("entryToastTitle"); + e.innerHTML = b; + d.appendChild(e); + b = Entry.createElement("p", "entryToast"); + b.addClass("entryToastMessage"); + b.innerHTML = a; + d.appendChild(b); + this.toasts_.push(d); + this.body_.appendChild(d); + c || window.setTimeout(function() { + d.style.opacity = 1; + var a = setInterval(function() { + .05 > d.style.opacity && (clearInterval(a), d.style.display = "none", Entry.removeElement(d)); + d.style.opacity *= .9; + }, 20); + }, 1E3); }; -Entry.Scene.prototype.loadStartSceneSnapshot = function() { - this.selectScene(this.sceneBeforeRun); - this.sceneBeforeRun = null; +Entry.Toast.prototype.success = function(b, a, c) { + var d = Entry.createElement("div", "entryToast"); + d.addClass("entryToast"); + d.addClass("entryToastSuccess"); + d.bindOnClick(function() { + Entry.toast.body_.removeChild(this); + }); + var e = Entry.createElement("div", "entryToast"); + e.addClass("entryToastTitle"); + e.innerHTML = b; + d.appendChild(e); + b = Entry.createElement("p", "entryToast"); + b.addClass("entryToastMessage"); + b.innerHTML = a; + d.appendChild(b); + this.toasts_.push(d); + this.body_.appendChild(d); + c || window.setTimeout(function() { + d.style.opacity = 1; + var a = setInterval(function() { + .05 > d.style.opacity && (clearInterval(a), d.style.display = "none", Entry.removeElement(d)); + d.style.opacity *= .9; + }, 20); + }, 1E3); }; -Entry.Scene.prototype.createScene = function() { - var a = {name:Lang.Blocks.SCENE + " " + (this.getScenes().length + 1), id:Entry.generateHash()}; - this.generateElement(a); - return a; +Entry.Toast.prototype.alert = function(b, a, c) { + var d = Entry.createElement("div", "entryToast"); + d.addClass("entryToast"); + d.addClass("entryToastAlert"); + d.bindOnClick(function() { + Entry.toast.body_.removeChild(this); + }); + var e = Entry.createElement("div", "entryToast"); + e.addClass("entryToastTitle"); + e.innerHTML = b; + d.appendChild(e); + b = Entry.createElement("p", "entryToast"); + b.addClass("entryToastMessage"); + b.innerHTML = a; + d.appendChild(b); + this.toasts_.push(d); + this.body_.appendChild(d); + c || window.setTimeout(function() { + d.style.opacity = 1; + var a = setInterval(function() { + .05 > d.style.opacity && (clearInterval(a), d.style.display = "none", Entry.toast.body_.removeChild(d)); + d.style.opacity *= .9; + }, 20); + }, 5E3); }; -Entry.Scene.prototype.cloneScene = function(a) { - if (this.scenes_.length >= this.maxCount) { - Entry.toast.alert(Lang.Msgs.runtime_error, Lang.Workspace.Scene_add_error, !1); - } else { - var b = {name:a.name + Lang.Workspace.replica_of_object, id:Entry.generateHash()}; - this.generateElement(b); - this.addScene(b); - a = Entry.container.getSceneObjects(a); - for (var c = a.length - 1;0 <= c;c--) { - Entry.container.addCloneObject(a[c], b.id); - } - } +Entry.TvCast = function(b) { + this.generateView(b); }; -Entry.Scene.prototype.resize = function() { - var a = this.getScenes(), b = this.selectedScene, c = a[0]; - if (0 !== a.length && c) { - var d = $(c.view).offset().left, c = parseFloat($(b.view).css("margin-left")), e = $(this.view_).width() - d, f = 0, g; - for (g in a) { - var d = a[g], h = d.view; - h.addClass("minValue"); - $(h).removeProp("style"); - $(d.inputWrapper).width(Entry.computeInputWidth(d.name)); - h = $(h); - f = f + h.width() + c; - } - if (f > e) { - for (g in e -= $(b.view).width(), c = e / (a.length - 1) - (Entry.Scene.viewBasicWidth + c), a) { - d = a[g], b.id != d.id ? (d.view.removeClass("minValue"), $(d.inputWrapper).width(c)) : d.view.addClass("minValue"); - } - } - } +p = Entry.TvCast.prototype; +p.init = function(b) { + this.tvCastHash = b; }; -Entry.Scene.prototype.getNextScene = function() { - var a = this.getScenes(); - return a[a.indexOf(this.selectedScene) + 1]; +p.generateView = function(b) { + var a = Entry.createElement("div"); + a.addClass("entryContainerMovieWorkspace"); + a.addClass("entryHidden"); + this.movieContainer = a; + a = Entry.createElement("iframe"); + a.setAttribute("id", "tvCastIframe"); + a.setAttribute("allowfullscreen", ""); + a.setAttribute("frameborder", 0); + a.setAttribute("src", b); + this.movieFrame = a; + this.movieContainer.appendChild(this.movieFrame); }; -Entry.Script = function(a) { - this.entity = a; +p.getView = function() { + return this.movieContainer; }; -p = Entry.Script.prototype; -p.init = function(a, b, c) { - Entry.assert("BLOCK" == a.tagName.toUpperCase(), a.tagName); - this.type = a.getAttribute("type"); - this.id = +a.getAttribute("id"); - a.getElementsByTagName("mutation").length && a.getElementsByTagName("mutation")[0].hasAttribute("hashid") && (this.hashId = a.childNodes[0].getAttribute("hashid")); - "REPEAT" == this.type.substr(0, 6).toUpperCase() && (this.isRepeat = !0); - b instanceof Entry.Script && (this.previousScript = b, b.parentScript && (this.parentScript = b.parentScript)); - c instanceof Entry.Script && (this.parentScript = c); - a = a.childNodes; - for (b = 0;b < a.length;b++) { - if (c = a[b], "NEXT" == c.tagName.toUpperCase()) { - this.nextScript = new Entry.Script(this.entity), this.register && (this.nextScript.register = this.register), this.nextScript.init(a[b].childNodes[0], this); - } else { - if ("VALUE" == c.tagName.toUpperCase()) { - this.values || (this.values = {}); - var d = new Entry.Script(this.entity); - this.register && (d.register = this.register); - d.init(c.childNodes[0]); - this.values[c.getAttribute("name")] = d; - } else { - "FIELD" == c.tagName.toUpperCase() ? (this.fields || (this.fields = {}), this.fields[c.getAttribute("name")] = c.textContent) : "STATEMENT" == c.tagName.toUpperCase() && (this.statements || (this.statements = {}), d = new Entry.Script(this.entity), this.register && (d.register = this.register), d.init(c.childNodes[0], null, this), d.key = c.getAttribute("name"), this.statements[c.getAttribute("name")] = d); +p.resize = function() { + var b = document.getElementById("entryContainerWorkspaceId"), a = document.getElementById("tvCastIframe"); + w = b.offsetWidth; + a.width = w + "px"; + a.height = 9 * w / 16 + "px"; +}; +Entry.BlockDriver = function() { +}; +(function(b) { + b.convert = function() { + var a = new Date, b; + for (b in Entry.block) { + "function" === typeof Entry.block[b] && this._convertBlock(b); + } + console.log((new Date).getTime() - a.getTime()); + }; + b._convertBlock = function(a) { + function b(a) { + var d = {type:a.getAttribute("type"), index:{}}; + a = $(a).children(); + if (!a) { + return d; } + for (var e = 0;e < a.length;e++) { + var f = a[e], g = f.tagName, h = $(f).children()[0], u = f.getAttribute("name"); + "value" === g ? "block" == h.nodeName && (d.params || (d.params = []), d.params.push(b(h)), d.index[u] = d.params.length - 1) : "field" === g && (d.params || (d.params = []), d.params.push(f.textContent), d.index[u] = d.params.length - 1); + } + return d; } - } -}; -p.clone = function(a, b) { - var c = new Entry.Script(a); - c.id = this.id; - c.type = this.type; - c.isRepeat = this.isRepeat; - if (this.parentScript && !this.previousScript && 2 != b) { - c.parentScript = this.parentScript.clone(a); - for (var d = c.parentScript.statements[this.key] = c;d.nextScript;) { - d = d.nextScript, d.parentScript = c.parentScript; + var d = Blockly.Blocks[a], e = EntryStatic.blockInfo[a], f, g; + if (e && (f = e.class, g = e.isNotFor, e = e.xml)) { + var e = $.parseXML(e), h = b(e.childNodes[0]) + } + d = (new Entry.BlockMockup(d, h, a)).toJSON(); + d.class = f; + d.isNotFor = g; + _.isEmpty(d.paramsKeyMap) && delete d.paramsKeyMap; + _.isEmpty(d.statementsKeyMap) && delete d.statementsKeyMap; + d.func = Entry.block[a]; + -1 < "NUMBER TRUE FALSE TEXT FUNCTION_PARAM_BOOLEAN FUNCTION_PARAM_STRING TRUE_UN".split(" ").indexOf(a.toUpperCase()) && (d.isPrimitive = !0); + Entry.block[a] = d; + }; +})(Entry.BlockDriver.prototype); +Entry.BlockMockup = function(b, a, c) { + this.templates = []; + this.params = []; + this.statements = []; + this.color = ""; + this.output = this.isNext = this.isPrev = !1; + this.fieldCount = 0; + this.events = {}; + this.def = a || {}; + this.paramsKeyMap = {}; + this.statementsKeyMap = {}; + this.definition = {params:[], type:this.def.type}; + this.simulate(b); + this.def = this.definition; +}; +(function(b) { + b.simulate = function(a) { + a.sensorList && (this.sensorList = a.sensorList); + a.portList && (this.portList = a.portList); + a.init.call(this); + a.whenAdd && (this.events.blockViewAdd || (this.events.blockViewAdd = []), this.events.blockViewAdd.push(a.whenAdd)); + a.whenRemove && (this.events.blockViewDestroy || (this.events.blockViewDestroy = []), this.events.blockViewDestroy.push(a.whenRemove)); + }; + b.toJSON = function() { + function a(b) { + if (b && (b = b.params)) { + for (var c = 0;c < b.length;c++) { + var d = b[c]; + d && (delete d.index, a(d)); + } + } } - } - this.nextScript && 1 != b && (c.nextScript = this.nextScript.clone(a, 0), c.nextScript.previousScript = this); - this.previousScript && 0 !== b && (c.previousScript = this.previousScript.clone(a, 1), c.previousScript.previousScript = this); - if (this.fields) { - c.fields = {}; - for (var e in this.fields) { - c.fields[e] = this.fields[e]; + var b = ""; + this.output ? b = "Boolean" === this.output ? "basic_boolean_field" : "basic_string_field" : !this.isPrev && this.isNext ? b = "basic_event" : 1 == this.statements.length ? b = "basic_loop" : 2 == this.statements.length ? b = "basic_double_loop" : this.isPrev && this.isNext ? b = "basic" : this.isPrev && !this.isNext && (b = "basic_without_next"); + a(this.def); + var d = /dummy_/mi, e; + for (e in this.paramsKeyMap) { + d.test(e) && delete this.paramsKeyMap[e]; } - } - if (this.values) { - for (e in c.values = {}, this.values) { - c.values[e] = this.values[e].clone(a); + for (e in this.statementsKeyMap) { + d.test(e) && delete this.statementsKeyMap[e]; } - } - if (this.statements) { - for (e in c.statements = {}, this.statements) { - for (c.statements[e] = this.statements[e].clone(a, 2), d = c.statements[e], d.parentScript = c;d.nextScript;) { - d = d.nextScript, d.parentScript = c; - } + return {color:this.color, skeleton:b, statements:this.statements, template:this.templates.filter(function(a) { + return "string" === typeof a; + }).join(" "), params:this.params, events:this.events, def:this.def, paramsKeyMap:this.paramsKeyMap, statementsKeyMap:this.statementsKeyMap}; + }; + b.appendDummyInput = function() { + return this; + }; + b.appendValueInput = function(a) { + this.def && this.def.index && (void 0 !== this.def.index[a] ? this.definition.params.push(this.def.params[this.def.index[a]]) : this.definition.params.push(null)); + this.params.push({type:"Block", accept:"string"}); + this._addToParamsKeyMap(a); + this.templates.push(this.getFieldCount()); + return this; + }; + b.appendStatementInput = function(a) { + this._addToStatementsKeyMap(a); + this.statements.push({accept:"basic"}); + }; + b.setCheck = function(a) { + var b = this.params; + "Boolean" === a && (b[b.length - 1].accept = "boolean"); + }; + b.appendField = function(a, b) { + if (!a) { + return this; } - } - return c; -}; -p.getStatement = function(a) { - return this.statements[a]; -}; -p.compute = function() { -}; -p.getValue = function(a) { - return this.values[a].run(); -}; -p.getNumberValue = function(a) { - return +this.values[a].run(); -}; -p.getStringValue = function(a) { - return String(this.values[a].run()); -}; -p.getBooleanValue = function(a) { - return this.values[a].run() ? !0 : !1; -}; -p.getField = function(a) { - return this.fields[a]; -}; -p.getStringField = function(a) { - return String(this.fields[a]); -}; -p.getNumberField = function(a) { - return +this.fields[a]; -}; -p.callReturn = function() { - return this.nextScript ? this.nextScript : this.parentScript ? this.parentScript : null; -}; -p.run = function() { - return Entry.block[this.type](this.entity, this); -}; -Entry.Stage = function() { - this.variables = {}; - this.background = new createjs.Shape; - this.background.graphics.beginFill("#ffffff").drawRect(-480, -240, 960, 480); - this.objectContainers = []; - this.selectedObjectContainer = null; - this.variableContainer = new createjs.Container; - this.dialogContainer = new createjs.Container; - this.selectedObject = null; - this.isObjectClick = !1; -}; -Entry.Stage.prototype.initStage = function(a) { - this.canvas = new createjs.Stage(a.id); - this.canvas.x = 320; - this.canvas.y = 180; - this.canvas.scaleX = this.canvas.scaleY = 2 / 1.5; - createjs.Touch.enable(this.canvas); - this.canvas.enableMouseOver(10); - this.canvas.mouseMoveOutside = !0; - this.canvas.addChild(this.background); - this.canvas.addChild(this.variableContainer); - this.canvas.addChild(this.dialogContainer); - this.inputField = null; - this.initCoordinator(); - this.initHandle(); - this.mouseCoordinate = {x:0, y:0}; - if (Entry.isPhone()) { - a.ontouchstart = function(b) { - Entry.dispatchEvent("canvasClick", b); - Entry.stage.isClick = !0; - }, a.ontouchend = function(b) { - Entry.stage.isClick = !1; - Entry.dispatchEvent("canvasClickCanceled", b); - }; - } else { - var b = function(b) { - Entry.dispatchEvent("canvasClick", b); - Entry.stage.isClick = !0; - }; - a.onmousedown = b; - a.ontouchstart = b; - b = function(b) { - Entry.stage.isClick = !1; - Entry.dispatchEvent("canvasClickCanceled", b); - }; - a.onmouseup = b; - a.ontouchend = b; - $(document).click(function(b) { - Entry.stage.focused = "entryCanvas" === b.target.id ? !0 : !1; - }); - } - Entry.addEventListener("canvasClick", function(b) { - Entry.stage.isObjectClick = !1; - }); - b = function(b) { - b.preventDefault(); - var a = this.getBoundingClientRect(), e; - -1 < Entry.getBrowserType().indexOf("IE") ? (e = 480 * ((b.pageX - a.left - document.documentElement.scrollLeft) / a.width - .5), b = -270 * ((b.pageY - a.top - document.documentElement.scrollTop) / a.height - .5)) : b.changedTouches ? (e = 480 * ((b.changedTouches[0].pageX - a.left - document.body.scrollLeft) / a.width - .5), b = -270 * ((b.changedTouches[0].pageY - a.top - document.body.scrollTop) / a.height - .5)) : (e = 480 * ((b.pageX - a.left - document.body.scrollLeft) / a.width - .5), - b = -270 * ((b.pageY - a.top - document.body.scrollTop) / a.height - .5)); - Entry.stage.mouseCoordinate = {x:e.toFixed(1), y:b.toFixed(1)}; - Entry.dispatchEvent("stageMouseMove"); + "string" === typeof a && 0 < a.length ? b ? (a = {type:"Text", text:a, color:b}, this.params.push(a), this._addToParamsKeyMap(), this.templates.push(this.getFieldCount()), this.def && this.def.index && void 0 !== this.def.index[b] ? this.definition.params.push(this.def.params[this.def.index[b]]) : this.definition.params.push(void 0)) : this.templates.push(a) : a.constructor == Blockly.FieldIcon ? ("start" === a.type ? this.params.push({type:"Indicator", img:a.src_, size:17, position:{x:0, y:-2}}) : + this.params.push({type:"Indicator", img:a.src_, size:12}), this._addToParamsKeyMap(), this.templates.push(this.getFieldCount()), this.definition && this.definition.params.push(null)) : a.constructor == Blockly.FieldDropdown ? (this.params.push({type:"Dropdown", options:a.menuGenerator_, value:a.menuGenerator_[0][1], fontSize:11}), this._addToParamsKeyMap(b), this.templates.push(this.getFieldCount()), this.def && this.def.index && void 0 !== this.def.index[b] ? this.definition.params.push(this.def.params[this.def.index[b]]) : + this.definition.params.push(void 0)) : a.constructor == Blockly.FieldDropdownDynamic ? (this.params.push({type:"DropdownDynamic", value:null, menuName:a.menuName_, fontSize:11}), this.templates.push(this.getFieldCount()), this.def && this.def.index && void 0 !== this.def.index[b] ? this.definition.params.push(this.def.params[this.def.index[b]]) : this.definition.params.push(void 0), this._addToParamsKeyMap(b)) : a.constructor == Blockly.FieldTextInput ? (this.params.push({type:"TextInput", value:10}), + this.templates.push(this.getFieldCount()), this._addToParamsKeyMap(b)) : a.constructor == Blockly.FieldAngle ? (this.params.push({type:"Angle"}), this.templates.push(this.getFieldCount()), this.def && this.def.index && void 0 !== this.def.index[b] ? this.definition.params.push(this.def.params[this.def.index[b]]) : this.definition.params.push(null), this._addToParamsKeyMap(b)) : a.constructor == Blockly.FieldKeydownInput ? (this.params.push({type:"Keyboard", value:81}), this.templates.push(this.getFieldCount()), + void 0 !== this.def.index[b] ? this.definition.params.push(this.def.params[this.def.index[b]]) : this.definition.params.push(void 0), this._addToParamsKeyMap(b)) : a.constructor == Blockly.FieldColour ? (this.params.push({type:"Color"}), this.templates.push(this.getFieldCount()), this._addToParamsKeyMap(b)) : console.log("else", a); + return this; }; - a.onmousemove = b; - a.ontouchmove = b; - a.onmouseout = function(b) { - Entry.dispatchEvent("stageMouseOut"); + b.setColour = function(a) { + this.color = a; }; - Entry.addEventListener("updateObject", function(b) { - Entry.engine.isState("stop") && Entry.stage.updateObject(); - }); - Entry.addEventListener("canvasInputComplete", function(b) { - try { - var a = Entry.stage.inputField.value(); - Entry.stage.hideInputField(); - if (a) { - var e = Entry.container; - e.setInputValue(a); - e.inputValue.complete = !0; + b.setInputsInline = function() { + }; + b.setOutput = function(a, b) { + a && (this.output = b); + }; + b.setPreviousStatement = function(a) { + this.isPrev = a; + }; + b.setNextStatement = function(a) { + this.isNext = a; + }; + b.setEditable = function(a) { + }; + b.getFieldCount = function() { + this.fieldCount++; + return "%" + this.fieldCount; + }; + b._addToParamsKeyMap = function(a) { + a = a ? a : "dummy_" + Entry.Utils.generateId(); + var b = this.paramsKeyMap; + b[a] = Object.keys(b).length; + }; + b._addToStatementsKeyMap = function(a) { + a = a ? a : "dummy_" + Entry.Utils.generateId(); + var b = this.statementsKeyMap; + b[a] = Object.keys(b).length; + }; +})(Entry.BlockMockup.prototype); +Entry.ContextMenu = {}; +(function(b) { + b.createDom = function() { + this.dom = Entry.Dom("ul", {id:"entry-contextmenu", parent:$("body")}); + Entry.Utils.disableContextmenu(this.dom); + Entry.documentMousedown.attach(this, function() { + this.hide(); + }); + }; + b.show = function(a, b) { + this.dom || this.createDom(); + if (0 !== a.length) { + var d = this; + void 0 !== b && (this._className = b, this.dom.addClass(b)); + var e = this.dom; + e.empty(); + for (var f = 0, g = a.length;f < g;f++) { + var h = a[f], k = h.text, l = !1 !== h.enable, n = Entry.Dom("li", {class:l ? "menuAble" : "menuDisable", parent:e}); + n.text(k); + l && h.callback && function(a, b) { + a.mousedown(function(a) { + a.preventDefault(); + d.hide(); + b(a); + }); + }(n, h.callback); } - } catch (f) { + e.removeClass("entryRemove"); + this.position(Entry.mouseCoordinate); } - }); - this.initWall(); - this.render(); + }; + b.position = function(a) { + var b = this.dom; + b.css({left:0, top:0}); + var d = b.width(), e = b.height(), f = $(window), g = f.width(), f = f.height(); + a.x + d > g && (a.x -= d + 3); + a.y + e > f && (a.y -= e); + b.css({left:a.x, top:a.y}); + }; + b.hide = function() { + this.dom.empty(); + this.dom.addClass("entryRemove"); + this._className && (this.dom.removeClass(this._className), delete this._className); + }; +})(Entry.ContextMenu); +Entry.STATIC = {OBJECT:0, ENTITY:1, SPRITE:2, SOUND:3, VARIABLE:4, FUNCTION:5, SCENE:6, MESSAGE:7, BLOCK_MODEL:8, BLOCK_RENDER_MODEL:9, BOX_MODEL:10, THREAD_MODEL:11, DRAG_INSTANCE:12, BLOCK_STATIC:0, BLOCK_MOVE:1, BLOCK_FOLLOW:2, RETURN:0, CONTINUE:1, BREAK:2, PASS:3}; +Entry.Utils = {}; +Entry.overridePrototype = function() { + Number.prototype.mod = function(b) { + return (this % b + b) % b; + }; }; -Entry.Stage.prototype.render = function() { - Entry.stage.timer && clearTimeout(Entry.stage.timer); - var a = (new Date).getTime(); - Entry.stage.update(); - a = (new Date).getTime() - a; - Entry.stage.timer = setTimeout(Entry.stage.render, 16 - a % 16 + 16 * Math.floor(a / 16)); +Entry.Utils.generateId = function() { + return ("0000" + (Math.random() * Math.pow(36, 4) << 0).toString(36)).substr(-4); }; -Entry.Stage.prototype.update = function() { - Entry.engine.isState("stop") && this.objectUpdated ? (this.canvas.update(), this.objectUpdated = !1) : this.canvas.update(); - this.inputField && !this.inputField._isHidden && this.inputField.render(); +Entry.Utils.intersectArray = function(b, a) { + for (var c = [], d = 0;d < b.length;d++) { + for (var e = 0;e < a.length;e++) { + if (b[d] == a[e]) { + c.push(b[d]); + break; + } + } + } + return c; }; -Entry.Stage.prototype.loadObject = function(a) { - var b = a.entity.object; - this.getObjectContainerByScene(a.scene).addChild(b); - this.canvas.update(); +Entry.Utils.isPointInMatrix = function(b, a, c) { + c = void 0 === c ? 0 : c; + var d = b.offsetX ? b.x + b.offsetX : b.x, e = b.offsetY ? b.y + b.offsety : b.y; + return d - c <= a.x && d + b.width + c >= a.x && e - c <= a.y && e + b.height + c >= a.y; }; -Entry.Stage.prototype.loadEntity = function(a) { - Entry.stage.getObjectContainerByScene(a.parent.scene).addChild(a.object); - this.sortZorder(); +Entry.Utils.colorDarken = function(b, a) { + function c(a) { + 2 != a.length && (a = "0" + a); + return a; + } + var d, e, f; + 7 === b.length ? (d = parseInt(b.substr(1, 2), 16), e = parseInt(b.substr(3, 2), 16), f = parseInt(b.substr(5, 2), 16)) : (d = parseInt(b.substr(1, 2), 16), e = parseInt(b.substr(2, 2), 16), f = parseInt(b.substr(3, 2), 16)); + a = void 0 === a ? .7 : a; + d = c(Math.floor(d * a).toString(16)); + e = c(Math.floor(e * a).toString(16)); + f = c(Math.floor(f * a).toString(16)); + return "#" + d + e + f; +}; +Entry.Utils.colorLighten = function(b, a) { + a = 0 === a ? 0 : a || 20; + var c = Entry.Utils.hexToHsl(b); + c.l += a / 100; + c.l = Math.min(1, Math.max(0, c.l)); + return Entry.Utils.hslToHex(c); +}; +Entry.Utils.bound01 = function(b, a) { + var c = b; + "string" == typeof c && -1 != c.indexOf(".") && 1 === parseFloat(c) && (b = "100%"); + c = "string" === typeof b && -1 != b.indexOf("%"); + b = Math.min(a, Math.max(0, parseFloat(b))); + c && (b = parseInt(b * a, 10) / 100); + return 1E-6 > Math.abs(b - a) ? 1 : b % a / parseFloat(a); +}; +Entry.Utils.hexToHsl = function(b) { + var a, c; + 7 === b.length ? (a = parseInt(b.substr(1, 2), 16), c = parseInt(b.substr(3, 2), 16), b = parseInt(b.substr(5, 2), 16)) : (a = parseInt(b.substr(1, 2), 16), c = parseInt(b.substr(2, 2), 16), b = parseInt(b.substr(3, 2), 16)); + a = Entry.Utils.bound01(a, 255); + c = Entry.Utils.bound01(c, 255); + b = Entry.Utils.bound01(b, 255); + var d = Math.max(a, c, b), e = Math.min(a, c, b), f, g = (d + e) / 2; + if (d == e) { + f = e = 0; + } else { + var h = d - e, e = .5 < g ? h / (2 - d - e) : h / (d + e); + switch(d) { + case a: + f = (c - b) / h + (c < b ? 6 : 0); + break; + case c: + f = (b - a) / h + 2; + break; + case b: + f = (a - c) / h + 4; + } + f /= 6; + } + return {h:360 * f, s:e, l:g}; }; -Entry.Stage.prototype.unloadEntity = function(a) { - Entry.stage.getObjectContainerByScene(a.parent.scene).removeChild(a.object); +Entry.Utils.hslToHex = function(b) { + function a(a, b, c) { + 0 > c && (c += 1); + 1 < c && --c; + return c < 1 / 6 ? a + 6 * (b - a) * c : .5 > c ? b : c < 2 / 3 ? a + (b - a) * (2 / 3 - c) * 6 : a; + } + function c(a) { + return 1 == a.length ? "0" + a : "" + a; + } + var d, e; + e = Entry.Utils.bound01(b.h, 360); + d = Entry.Utils.bound01(b.s, 1); + b = Entry.Utils.bound01(b.l, 1); + if (0 === d) { + d = b = e = b; + } else { + var f = .5 > b ? b * (1 + d) : b + d - b * d, g = 2 * b - f; + d = a(g, f, e + 1 / 3); + b = a(g, f, e); + e = a(g, f, e - 1 / 3); + } + b *= 255; + e *= 255; + return "#" + [c(Math.round(255 * d).toString(16)), c(Math.round(b).toString(16)), c(Math.round(e).toString(16))].join(""); +}; +Entry.Utils.bindGlobalEvent = function(b) { + var a = $(document); + void 0 === b && (b = "resize mousedown mousemove keydown keyup dispose".split(" ")); + -1 < b.indexOf("resize") && (Entry.windowReszied && ($(window).off("resize"), Entry.windowReszied.clear()), Entry.windowResized = new Entry.Event(window), $(window).on("resize", function(a) { + Entry.windowResized.notify(a); + })); + -1 < b.indexOf("mousedown") && (Entry.documentMousedown && (a.off("mousedown"), Entry.documentMousedown.clear()), Entry.documentMousedown = new Entry.Event(window), a.on("mousedown", function(a) { + Entry.documentMousedown.notify(a); + })); + -1 < b.indexOf("mousemove") && (Entry.documentMousemove && (a.off("touchmove mousemove"), Entry.documentMousemove.clear()), Entry.mouseCoordinate = {}, Entry.documentMousemove = new Entry.Event(window), a.on("touchmove mousemove", function(a) { + a.originalEvent && a.originalEvent.touches && (a = a.originalEvent.touches[0]); + Entry.documentMousemove.notify(a); + Entry.mouseCoordinate.x = a.clientX; + Entry.mouseCoordinate.y = a.clientY; + })); + -1 < b.indexOf("keydown") && (Entry.keyPressed && (a.off("keydown"), Entry.keyPressed.clear()), Entry.pressedKeys = [], Entry.keyPressed = new Entry.Event(window), a.on("keydown", function(a) { + var b = a.keyCode; + 0 > Entry.pressedKeys.indexOf(b) && Entry.pressedKeys.push(b); + Entry.keyPressed.notify(a); + })); + -1 < b.indexOf("keyup") && (Entry.keyUpped && (a.off("keyup"), Entry.keyUpped.clear()), Entry.keyUpped = new Entry.Event(window), a.on("keyup", function(a) { + var b = Entry.pressedKeys.indexOf(a.keyCode); + -1 < b && Entry.pressedKeys.splice(b, 1); + Entry.keyUpped.notify(a); + })); + -1 < b.indexOf("dispose") && (Entry.disposeEvent && Entry.disposeEvent.clear(), Entry.disposeEvent = new Entry.Event(window), Entry.documentMousedown && Entry.documentMousedown.attach(this, function(a) { + Entry.disposeEvent.notify(a); + })); }; -Entry.Stage.prototype.loadVariable = function(a) { - var b = a.view_; - this.variables[a.id] = b; - this.variableContainer.addChild(b); - this.canvas.update(); +Entry.Utils.makeActivityReporter = function() { + Entry.activityReporter = new Entry.ActivityReporter; + return Entry.activityReporter; }; -Entry.Stage.prototype.removeVariable = function(a) { - this.variableContainer.removeChild(a.view_); - this.canvas.update(); +Entry.Utils.initEntryEvent_ = function() { + Entry.events_ || (Entry.events_ = []); }; -Entry.Stage.prototype.loadDialog = function(a) { - this.dialogContainer.addChild(a.object); +Entry.sampleColours = []; +Entry.assert = function(b, a) { + if (!b) { + throw Error(a || "Assert failed"); + } }; -Entry.Stage.prototype.unloadDialog = function(a) { - this.dialogContainer.removeChild(a.object); +Entry.parseTexttoXML = function(b) { + var a; + window.ActiveXObject ? (a = new ActiveXObject("Microsoft.XMLDOM"), a.async = "false", a.loadXML(b)) : a = (new DOMParser).parseFromString(b, "text/xml"); + return a; }; -Entry.Stage.prototype.sortZorder = function() { - for (var a = Entry.container.getCurrentObjects(), b = this.selectedObjectContainer, c = 0, d = a.length - 1;0 <= d;d--) { - for (var e = a[d], f = e.entity, e = e.clonedEntities, g = 0, h = e.length;g < h;g++) { - e[g].shape && b.setChildIndex(e[g].shape, c++), b.setChildIndex(e[g].object, c++); +Entry.createElement = function(b, a) { + var c = document.createElement(b); + a && (c.id = a); + c.hasClass = function(a) { + return this.className.match(new RegExp("(\\s|^)" + a + "(\\s|$)")); + }; + c.addClass = function(a) { + for (var b = 0;b < arguments.length;b++) { + a = arguments[b], this.hasClass(a) || (this.className += " " + a); } - f.shape && b.setChildIndex(f.shape, c++); - b.setChildIndex(f.object, c++); - } -}; -Entry.Stage.prototype.initCoordinator = function() { - var a = new createjs.Container, b = new createjs.Bitmap(Entry.mediaFilePath + "workspace_coordinate.png"); - b.scaleX = .5; - b.scaleY = .5; - b.x = -240; - b.y = -135; - a.addChild(b); - this.canvas.addChild(a); - a.visible = !1; - this.coordinator = a; + }; + c.removeClass = function(a) { + for (var b = 0;b < arguments.length;b++) { + a = arguments[b], this.hasClass(a) && (this.className = this.className.replace(new RegExp("(\\s|^)" + a + "(\\s|$)"), " ")); + } + }; + c.bindOnClick = function(a) { + $(this).on("click tab", function(b) { + b.stopImmediatePropagation(); + a.call(this, b); + }); + }; + return c; }; -Entry.Stage.prototype.toggleCoordinator = function() { - this.coordinator.visible = !this.coordinator.visible; +Entry.makeAutolink = function(b) { + return b ? b.replace(/(http|https|ftp|telnet|news|irc):\/\/([-/.a-zA-Z0-9_~#%$?&=:200-377()][^)\]}]+)/gi, "$1://$2").replace(/([xA1-xFEa-z0-9_-]+@[xA1-xFEa-z0-9-]+.[a-z0-9-]+)/gi, "$1") : ""; }; -Entry.Stage.prototype.selectObject = function(a) { - this.selectedObject = a ? a : null; - this.updateObject(); +Entry.generateHash = function() { + return ("0000" + (Math.random() * Math.pow(36, 4) << 0).toString(36)).substr(-4); }; -Entry.Stage.prototype.initHandle = function() { - this.handle = new EaselHandle(this.canvas); - this.handle.setChangeListener(this, this.updateHandle); - this.handle.setEditStartListener(this, this.startEdit); - this.handle.setEditEndListener(this, this.endEdit); +Entry.addEventListener = function(b, a) { + this.events_ || (this.events_ = {}); + this.events_[b] || (this.events_[b] = []); + a instanceof Function && this.events_[b].push(a); + return !0; }; -Entry.Stage.prototype.updateObject = function() { - this.handle.setDraggable(!0); - if (!this.editEntity) { - var a = this.selectedObject; - if (a) { - "textBox" == a.objectType ? this.handle.toggleCenter(!1) : this.handle.toggleCenter(!0); - "free" == a.getRotateMethod() ? this.handle.toggleRotation(!0) : this.handle.toggleRotation(!1); - this.handle.toggleDirection(!0); - a.getLock() ? (this.handle.toggleRotation(!1), this.handle.toggleDirection(!1), this.handle.toggleResize(!1), this.handle.toggleCenter(!1), this.handle.setDraggable(!1)) : this.handle.toggleResize(!0); - this.handle.setVisible(!0); - var b = a.entity; - this.handle.setWidth(b.getScaleX() * b.getWidth()); - this.handle.setHeight(b.getScaleY() * b.getHeight()); - var c, d; - if ("textBox" == b.type) { - if (b.getLineBreak()) { - c = b.regX * b.scaleX, d = -b.regY * b.scaleY; - } else { - var e = b.getTextAlign(); - d = -b.regY * b.scaleY; - switch(e) { - case Entry.TEXT_ALIGN_LEFT: - c = -b.getWidth() / 2 * b.scaleX; - break; - case Entry.TEXT_ALIGN_CENTER: - c = b.regX * b.scaleX; - break; - case Entry.TEXT_ALIGN_RIGHT: - c = b.getWidth() / 2 * b.scaleX; - } - } - } else { - c = (b.regX - b.width / 2) * b.scaleX, d = (b.height / 2 - b.regY) * b.scaleY; - } - e = b.getRotation() / 180 * Math.PI; - this.handle.setX(b.getX() - c * Math.cos(e) - d * Math.sin(e)); - this.handle.setY(-b.getY() - c * Math.sin(e) + d * Math.cos(e)); - this.handle.setRegX((b.regX - b.width / 2) * b.scaleX); - this.handle.setRegY((b.regY - b.height / 2) * b.scaleY); - this.handle.setRotation(b.getRotation()); - this.handle.setDirection(b.getDirection()); - this.objectUpdated = !0; - this.handle.setVisible(a.entity.getVisible()); - a.entity.getVisible() && this.handle.render(); - } else { - this.handle.setVisible(!1); +Entry.dispatchEvent = function(b, a) { + this.events_ || (this.events_ = {}); + if (this.events_[b]) { + for (var c = 0, d = this.events_[b].length;c < d;c++) { + this.events_[b][c].call(window, a); } } }; -Entry.Stage.prototype.updateHandle = function() { - this.editEntity = !0; - var a = this.handle, b = this.selectedObject.entity; - b.lineBreak ? (b.setHeight(a.height / b.getScaleY()), b.setWidth(a.width / b.getScaleX())) : (0 !== b.width && (0 > b.getScaleX() ? b.setScaleX(-a.width / b.width) : b.setScaleX(a.width / b.width)), 0 !== b.height && b.setScaleY(a.height / b.height)); - var c = a.rotation / 180 * Math.PI; - if ("textBox" == b.type) { - var d = a.regX / b.scaleX, d = a.regY / b.scaleY; - if (b.getLineBreak()) { - b.setX(a.x), b.setY(-a.y); - } else { - switch(b.getTextAlign()) { - case Entry.TEXT_ALIGN_LEFT: - b.setX(a.x - a.width / 2 * Math.cos(c)); - b.setY(-a.y + a.width / 2 * Math.sin(c)); - break; - case Entry.TEXT_ALIGN_CENTER: - b.setX(a.x); - b.setY(-a.y); - break; - case Entry.TEXT_ALIGN_RIGHT: - b.setX(a.x + a.width / 2 * Math.cos(c)), b.setY(-a.y - a.width / 2 * Math.sin(c)); +Entry.removeEventListener = function(b, a) { + if (this.events_[b]) { + for (var c = 0, d = this.events_[b].length;c < d;c++) { + if (this.events_[b][c] === a) { + this.events_[b].splice(c, 1); + break; } } - } else { - d = b.width / 2 + a.regX / b.scaleX, b.setX(a.x + a.regX * Math.cos(c) - a.regY * Math.sin(c)), b.setRegX(d), d = b.height / 2 + a.regY / b.scaleY, b.setY(-a.y - a.regX * Math.sin(c) - a.regY * Math.cos(c)), b.setRegY(d); } - b.setDirection(a.direction); - b.setRotation(a.rotation); - this.selectedObject.entity.doCommand(); - this.editEntity = !1; }; -Entry.Stage.prototype.startEdit = function() { - this.selectedObject.entity.initCommand(); +Entry.removeAllEventListener = function(b) { + this.events_ && this.events_[b] && delete this.events_[b]; }; -Entry.Stage.prototype.endEdit = function() { - this.selectedObject.entity.checkCommand(); +Entry.addTwoNumber = function(b, a) { + if (isNaN(b) || isNaN(a)) { + return b + a; + } + b += ""; + a += ""; + var c = b.indexOf("."), d = a.indexOf("."), e = 0, f = 0; + 0 < c && (e = b.length - c - 1); + 0 < d && (f = a.length - d - 1); + return 0 < e || 0 < f ? e >= f ? (parseFloat(b) + parseFloat(a)).toFixed(e) : (parseFloat(b) + parseFloat(a)).toFixed(f) : parseInt(b) + parseInt(a); }; -Entry.Stage.prototype.initWall = function() { - var a = new createjs.Container, b = new Image; - b.src = Entry.mediaFilePath + "media/bound.png"; - a.up = new createjs.Bitmap; - a.up.scaleX = 16; - a.up.y = -165; - a.up.x = -240; - a.up.image = b; - a.addChild(a.up); - a.down = new createjs.Bitmap; - a.down.scaleX = 16; - a.down.y = 135; - a.down.x = -240; - a.down.image = b; - a.addChild(a.down); - a.right = new createjs.Bitmap; - a.right.scaleY = 9; - a.right.y = -135; - a.right.x = 240; - a.right.image = b; - a.addChild(a.right); - a.left = new createjs.Bitmap; - a.left.scaleY = 9; - a.left.y = -135; - a.left.x = -270; - a.left.image = b; - a.addChild(a.left); - this.canvas.addChild(a); - this.wall = a; -}; -Entry.Stage.prototype.showInputField = function(a) { - a = 1 / 1.5; - this.inputField || (this.inputField = new CanvasInput({canvas:document.getElementById("entryCanvas"), fontSize:30 * a, fontFamily:"NanumGothic", fontColor:"#212121", width:556 * a, height:26 * a, padding:8 * a, borderWidth:1 * a, borderColor:"#000", borderRadius:3 * a, boxShadow:"none", innerShadow:"0px 0px 5px rgba(0, 0, 0, 0.5)", x:202 * a, y:450 * a, topPosition:!0, onsubmit:function() { - Entry.dispatchEvent("canvasInputComplete"); - }})); - a = new createjs.Container; - var b = new Image; - b.src = Entry.mediaFilePath + "confirm_button.png"; - var c = new createjs.Bitmap; - c.scaleX = .23; - c.scaleY = .23; - c.x = 160; - c.y = 89; - c.cursor = "pointer"; - c.image = b; - a.addChild(c); - a.on("mousedown", function(b) { - Entry.dispatchEvent("canvasInputComplete"); - }); - this.inputSubmitButton || (this.inputField.value(""), this.canvas.addChild(a), this.inputSubmitButton = a); - this.inputField.show(); +Entry.hex2rgb = function(b) { + return (b = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b)) ? {r:parseInt(b[1], 16), g:parseInt(b[2], 16), b:parseInt(b[3], 16)} : null; }; -Entry.Stage.prototype.hideInputField = function() { - this.inputField && this.inputField.value() && this.inputField.value(""); - this.inputSubmitButton && (this.canvas.removeChild(this.inputSubmitButton), this.inputSubmitButton = null); - this.inputField && this.inputField.hide(); +Entry.rgb2hex = function(b, a, c) { + return "#" + (16777216 + (b << 16) + (a << 8) + c).toString(16).slice(1); }; -Entry.Stage.prototype.initObjectContainers = function() { - var a = Entry.scene.scenes_; - if (a && 0 !== a.length) { - for (var b = 0;b < a.length;b++) { - this.objectContainers[b] = this.createObjectContainer(a[b]); - } - this.selectedObjectContainer = this.objectContainers[0]; - } else { - a = this.createObjectContainer(Entry.scene.selectedScene), this.objectContainers.push(a), this.selectedObjectContainer = a; - } - this.canvas.addChild(this.selectedObjectContainer); - this.selectObjectContainer(Entry.scene.selectedScene); +Entry.generateRgb = function() { + return {r:Math.floor(256 * Math.random()), g:Math.floor(256 * Math.random()), b:Math.floor(256 * Math.random())}; }; -Entry.Stage.prototype.selectObjectContainer = function(a) { - if (this.canvas) { - for (var b = this.objectContainers, c = 0;c < b.length;c++) { - this.canvas.removeChild(b[c]); +Entry.adjustValueWithMaxMin = function(b, a, c) { + return b > c ? c : b < a ? a : b; +}; +Entry.isExist = function(b, a, c) { + for (var d = 0;d < c.length;d++) { + if (c[d][a] == b) { + return c[d]; } - this.selectedObjectContainer = this.getObjectContainerByScene(a); - this.canvas.addChildAt(this.selectedObjectContainer, 2); } + return !1; }; -Entry.Stage.prototype.reAttachToCanvas = function() { - for (var a = [this.selectedObjectContainer, this.variableContainer, this.coordinator, this.handle, this.dialogContainer], b = 0;b < a.length;b++) { - this.canvas.removeChild(a[b]), this.canvas.addChild(a[b]); +Entry.getColourCodes = function() { + return "transparent #660000 #663300 #996633 #003300 #003333 #003399 #000066 #330066 #660066 #FFFFFF #990000 #993300 #CC9900 #006600 #336666 #0033FF #000099 #660099 #990066 #000000 #CC0000 #CC3300 #FFCC00 #009900 #006666 #0066FF #0000CC #663399 #CC0099 #333333 #FF0000 #FF3300 #FFFF00 #00CC00 #009999 #0099FF #0000FF #9900CC #FF0099 #666666 #CC3333 #FF6600 #FFFF33 #00FF00 #00CCCC #00CCFF #3366FF #9933FF #FF00FF #999999 #FF6666 #FF6633 #FFFF66 #66FF66 #66CCCC #00FFFF #3399FF #9966FF #FF66FF #BBBBBB #FF9999 #FF9966 #FFFF99 #99FF99 #66FFCC #99FFFF #66CCff #9999FF #FF99FF #CCCCCC #FFCCCC #FFCC99 #FFFFCC #CCFFCC #99FFCC #CCFFFF #99CCFF #CCCCFF #FFCCFF".split(" "); +}; +Entry.removeElement = function(b) { + b && b.parentNode && b.parentNode.removeChild(b); +}; +Entry.getElementsByClassName = function(b) { + for (var a = [], c = document.getElementsByTagName("*"), d = 0;d < c.length;d++) { + -1 < (" " + c[d].className + " ").indexOf(" " + b + " ") && a.push(c[d]); } - console.log(this.canvas.getChildIndex(this.selectedObjectContainer)); + return a; }; -Entry.Stage.prototype.createObjectContainer = function(a) { - var b = new createjs.Container; - b.scene = a; - return b; +Entry.parseNumber = function(b) { + return "string" != typeof b || isNaN(Number(b)) ? "number" != typeof b || isNaN(Number(b)) ? !1 : b : Number(b); +}; +Entry.countStringLength = function(b) { + var a, c = 0; + for (a = 0;a < b.length;a++) { + 255 < b.charCodeAt(a) ? c += 2 : c++; + } + return c; }; -Entry.Stage.prototype.removeObjectContainer = function(a) { - var b = this.objectContainers; - a = this.getObjectContainerByScene(a); - this.canvas.removeChild(a); - b.splice(this.objectContainers.indexOf(a), 1); +Entry.cutStringByLength = function(b, a) { + var c, d = 0; + for (c = 0;d < a && c < b.length;c++) { + 255 < b.charCodeAt(c) ? d += 2 : d++; + } + return b.substr(0, c); }; -Entry.Stage.prototype.getObjectContainerByScene = function(a) { - for (var b = this.objectContainers, c = 0;c < b.length;c++) { - if (b[c].scene.id == a.id) { - return b[c]; +Entry.isChild = function(b, a) { + if (!a) { + for (;a.parentNode;) { + if ((a = a.parentNode) == b) { + return !0; + } } } + return !1; }; -Entry.Stage.prototype.moveSprite = function(a) { - if (this.selectedObject && Entry.stage.focused && !this.selectedObject.getLock()) { - var b = 5; - a.shiftKey && (b = 1); - var c = this.selectedObject.entity; - switch(a.keyCode) { - case 38: - c.setY(c.getY() + b); - break; - case 40: - c.setY(c.getY() - b); - break; - case 37: - c.setX(c.getX() - b); - break; - case 39: - c.setX(c.getX() + b); - } - this.updateObject(); +Entry.launchFullScreen = function(b) { + b.requestFullscreen ? b.requestFullscreen() : b.mozRequestFulScreen ? b.mozRequestFulScreen() : b.webkitRequestFullscreen ? b.webkitRequestFullscreen() : b.msRequestFullScreen && b.msRequestFullScreen(); +}; +Entry.exitFullScreen = function() { + document.exitFullScreen ? document.exitFullScreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen(); +}; +Entry.isPhone = function() { + return !1; +}; +Entry.getKeyCodeMap = function() { + return {65:"a", 66:"b", 67:"c", 68:"d", 69:"e", 70:"f", 71:"g", 72:"h", 73:"i", 74:"j", 75:"k", 76:"l", 77:"m", 78:"n", 79:"o", 80:"p", 81:"q", 82:"r", 83:"s", 84:"t", 85:"u", 86:"v", 87:"w", 88:"x", 89:"y", 90:"z", 32:Lang.Blocks.START_press_some_key_space, 37:Lang.Blocks.START_press_some_key_left, 38:Lang.Blocks.START_press_some_key_up, 39:Lang.Blocks.START_press_some_key_right, 40:Lang.Blocks.START_press_some_key_down, 48:"0", 49:"1", 50:"2", 51:"3", 52:"4", 53:"5", 54:"6", 55:"7", 56:"8", 57:"9", + 13:Lang.Blocks.START_press_some_key_enter}; +}; +Entry.checkCollisionRect = function(b, a) { + return !(b.y + b.height < a.y || b.y > a.y + a.height || b.x + b.width < a.x || b.x > a.x + a.width); +}; +Entry.bindAnimationCallback = function(b, a) { + b.addEventListener("webkitAnimationEnd", a, !1); + b.addEventListener("animationend", a, !1); + b.addEventListener("oanimationend", a, !1); +}; +Entry.cloneSimpleObject = function(b) { + var a = {}, c; + for (c in b) { + a[c] = b[c]; } + return a; }; -Entry.StampEntity = function(a, b) { - this.parent = a; - this.type = a.objectType; - this.isStamp = this.isClone = !0; - this.width = b.getWidth(); - this.height = b.getHeight(); - "sprite" == this.type && (this.object = b.object.clone(!0), this.object.filters = null, b.effect && (this.effect = Entry.cloneSimpleObject(b.effect), this.applyFilter())); - this.object.entity = this; - if (b.dialog) { - var c = b.dialog; - new Entry.Dialog(this, c.message_, c.mode_, !0); - this.dialog.object = b.dialog.object.clone(!0); - Entry.stage.loadDialog(this.dialog); +Entry.nodeListToArray = function(b) { + for (var a = Array(b.length), c = -1, d = b.length;++c !== d;a[c] = b[c]) { } + return a; }; -var EntityPrototype = Entry.EntityObject.prototype; -Entry.StampEntity.prototype.applyFilter = EntityPrototype.applyFilter; -Entry.StampEntity.prototype.removeClone = EntityPrototype.removeClone; -Entry.StampEntity.prototype.getWidth = EntityPrototype.getWidth; -Entry.StampEntity.prototype.getHeight = EntityPrototype.getHeight; -Entry.State = function(a, b, c, d) { - this.caller = b; - this.func = c; - 3 < arguments.length && (this.params = Array.prototype.slice.call(arguments).slice(3)); - this.message = a; - this.time = Entry.getUpTime(); +Entry.computeInputWidth = function(b) { + var a = document.createElement("span"); + a.className = "tmp-element"; + a.innerHTML = b.replace(/&/g, "&").replace(//g, ">"); + document.body.appendChild(a); + b = a.offsetWidth; + document.body.removeChild(a); + return Number(b + 10) + "px"; }; -Entry.State.prototype.generateMessage = function() { +Entry.isArrowOrBackspace = function(b) { + return -1 < [37, 38, 39, 40, 8].indexOf(b); }; -Entry.StateManager = function() { - this.undoStack_ = []; - this.redoStack_ = []; - this.isIgnore = this.isRestore = !1; - Entry.addEventListener("cancelLastCommand", function(a) { - Entry.stateManager.cancelLastCommand(); - }); - Entry.addEventListener("run", function(a) { - Entry.stateManager.updateView(); - }); - Entry.addEventListener("stop", function(a) { - Entry.stateManager.updateView(); - }); - Entry.addEventListener("saveWorkspace", function(a) { - Entry.stateManager.addStamp(); - }); - Entry.addEventListener("undo", function(a) { - Entry.stateManager.undo(); - }); - Entry.addEventListener("redo", function(a) { - Entry.stateManager.redo(); - }); +Entry.hexStringToBin = function(b) { + for (var a = [], c = 0;c < b.length - 1;c += 2) { + a.push(parseInt(b.substr(c, 2), 16)); + } + return String.fromCharCode.apply(String, a); }; -Entry.StateManager.prototype.generateView = function(a, b) { +Entry.findObjsByKey = function(b, a, c) { + for (var d = [], e = 0;e < b.length;e++) { + b[e][a] == c && d.push(b[e]); + } + return d; }; -Entry.StateManager.prototype.addCommand = function(a, b, c, d) { - if (!this.isIgnoring()) { - if (this.isRestoring()) { - var e = new Entry.State, f = Array.prototype.slice.call(arguments); - Entry.State.prototype.constructor.apply(e, f); - this.redoStack_.push(e); - Entry.reporter && Entry.reporter.report(e); - } else { - e = new Entry.State, f = Array.prototype.slice.call(arguments), Entry.State.prototype.constructor.apply(e, f), this.undoStack_.push(e), Entry.reporter && Entry.reporter.report(e), this.updateView(); +Entry.factorials = []; +Entry.factorial = function(b) { + return 0 === b || 1 == b ? 1 : 0 < Entry.factorials[b] ? Entry.factorials[b] : Entry.factorials[b] = Entry.factorial(b - 1) * b; +}; +Entry.getListRealIndex = function(b, a) { + if (isNaN(b)) { + switch(b) { + case "FIRST": + b = 1; + break; + case "LAST": + b = a.array_.length; + break; + case "RANDOM": + b = Math.floor(Math.random() * a.array_.length) + 1; } - Entry.dispatchEvent("saveLocalStorageProject"); } + return b; }; -Entry.StateManager.prototype.cancelLastCommand = function() { - this.canUndo() && (this.undoStack_.pop(), this.updateView(), Entry.dispatchEvent("saveLocalStorageProject")); +Entry.toRadian = function(b) { + return b * Math.PI / 180; }; -Entry.StateManager.prototype.undo = function() { - if (this.canUndo() && !this.isRestoring()) { - this.addActivity("undo"); - this.startRestore(); - var a = this.undoStack_.pop(); - a.func.apply(a.caller, a.params); - this.updateView(); - this.endRestore(); - Entry.dispatchEvent("saveLocalStorageProject"); - } +Entry.toDegrees = function(b) { + return 180 * b / Math.PI; }; -Entry.StateManager.prototype.redo = function() { - if (this.canRedo() && !this.isRestoring()) { - this.addActivity("redo"); - var a = this.redoStack_.pop(); - a.func.apply(a.caller, a.params); - this.updateView(); - Entry.dispatchEvent("saveLocalStorageProject"); +Entry.getPicturesJSON = function(b) { + for (var a = [], c = 0, d = b.length;c < d;c++) { + var e = b[c], f = {}; + f._id = e._id; + f.id = e.id; + f.dimension = e.dimension; + f.filename = e.filename; + f.fileurl = e.fileurl; + f.name = e.name; + f.scale = e.scale; + a.push(f); } + return a; }; -Entry.StateManager.prototype.updateView = function() { - this.undoButton && this.redoButton && (this.canUndo() ? this.undoButton.addClass("active") : this.undoButton.removeClass("active"), this.canRedo() ? this.redoButton.addClass("active") : this.redoButton.removeClass("active")); -}; -Entry.StateManager.prototype.startRestore = function() { - this.isRestore = !0; +Entry.getSoundsJSON = function(b) { + for (var a = [], c = 0, d = b.length;c < d;c++) { + var e = b[c], f = {}; + f._id = e._id; + f.duration = e.duration; + f.ext = e.ext; + f.id = e.id; + f.filename = e.filename; + f.fileurl = e.fileurl; + f.name = e.name; + a.push(f); + } + return a; }; -Entry.StateManager.prototype.endRestore = function() { - this.isRestore = !1; +Entry.cutDecimal = function(b) { + return Math.round(100 * b) / 100; }; -Entry.StateManager.prototype.isRestoring = function() { - return this.isRestore; +Entry.getBrowserType = function() { + if (Entry.userAgent) { + return Entry.userAgent; + } + var b = navigator.userAgent, a, c = b.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; + if (/trident/i.test(c[1])) { + return a = /\brv[ :]+(\d+)/g.exec(b) || [], "IE " + (a[1] || ""); + } + if ("Chrome" === c[1] && (a = b.match(/\b(OPR|Edge)\/(\d+)/), null != a)) { + return a.slice(1).join(" ").replace("OPR", "Opera"); + } + c = c[2] ? [c[1], c[2]] : [navigator.appName, navigator.appVersion, "-?"]; + null != (a = b.match(/version\/(\d+)/i)) && c.splice(1, 1, a[1]); + b = c.join(" "); + return Entry.userAgent = b; +}; +Entry.setBasicBrush = function(b) { + var a = new createjs.Graphics; + a.thickness = 1; + a.rgb = Entry.hex2rgb("#ff0000"); + a.opacity = 100; + a.setStrokeStyle(1); + a.beginStroke("rgba(255,0,0,1)"); + var c = new createjs.Shape(a); + Entry.stage.selectedObjectContainer.addChild(c); + b.brush && (b.brush = null); + b.brush = a; + b.shape && (b.shape = null); + b.shape = c; }; -Entry.StateManager.prototype.startIgnore = function() { - this.isIgnore = !0; +Entry.setCloneBrush = function(b, a) { + var c = new createjs.Graphics; + c.thickness = a.thickness; + c.rgb = a.rgb; + c.opacity = a.opacity; + c.setStrokeStyle(c.thickness); + c.beginStroke("rgba(" + c.rgb.r + "," + c.rgb.g + "," + c.rgb.b + "," + c.opacity / 100 + ")"); + var d = new createjs.Shape(c); + Entry.stage.selectedObjectContainer.addChild(d); + b.brush && (b.brush = null); + b.brush = c; + b.shape && (b.shape = null); + b.shape = d; }; -Entry.StateManager.prototype.endIgnore = function() { - this.isIgnore = !1; +Entry.isFloat = function(b) { + return /\d+\.{1}\d+/.test(b); }; -Entry.StateManager.prototype.isIgnoring = function() { - return this.isIgnore; +Entry.getStringIndex = function(b) { + if (!b) { + return ""; + } + for (var a = {string:b, index:1}, c = 0, d = [], e = b.length - 1;0 < e;--e) { + var f = b.charAt(e); + if (isNaN(f)) { + break; + } else { + d.unshift(f), c = e; + } + } + 0 < c && (a.string = b.substring(0, c), a.index = parseInt(d.join("")) + 1); + return a; }; -Entry.StateManager.prototype.canUndo = function() { - return 0 < this.undoStack_.length && Entry.engine.isState("stop"); +Entry.getOrderedName = function(b, a, c) { + if (!b) { + return "untitled"; + } + if (!a || 0 === a.length) { + return b; + } + c || (c = "name"); + for (var d = 0, e = Entry.getStringIndex(b), f = 0, g = a.length;f < g;f++) { + var h = Entry.getStringIndex(a[f][c]); + e.string === h.string && h.index > d && (d = h.index); + } + return 0 < d ? e.string + d : b; }; -Entry.StateManager.prototype.canRedo = function() { - return 0 < this.redoStack_.length && Entry.engine.isState("stop"); +Entry.changeXmlHashId = function(b) { + if (/function_field/.test(b.getAttribute("type"))) { + for (var a = b.getElementsByTagName("mutation"), c = 0, d = a.length;c < d;c++) { + a[c].setAttribute("hashid", Entry.generateHash()); + } + } + return b; }; -Entry.StateManager.prototype.addStamp = function() { - this.stamp = Entry.generateHash(); - this.undoStack_.length && (this.undoStack_[this.undoStack_.length - 1].stamp = this.stamp); +Entry.getMaxFloatPoint = function(b) { + for (var a = 0, c = 0, d = b.length;c < d;c++) { + var e = String(b[c]), f = e.indexOf("."); + -1 !== f && (e = e.length - (f + 1), e > a && (a = e)); + } + return Math.min(a, 20); }; -Entry.StateManager.prototype.isSaved = function() { - return 0 === this.undoStack_.length || this.undoStack_[this.undoStack_.length - 1].stamp == this.stamp && "string" == typeof this.stamp; +Entry.convertToRoundedDecimals = function(b, a) { + return isNaN(b) || !this.isFloat(b) ? b : Number(Math.round(b + "e" + a) + "e-" + a); }; -Entry.StateManager.prototype.addActivity = function(a) { - Entry.reporter && Entry.reporter.report(new Entry.State(a)); +Entry.attachEventListener = function(b, a, c) { + setTimeout(function() { + b.addEventListener(a, c); + }, 0); }; -Entry.Toast = function() { - this.toasts_ = []; - var a = document.getElementById("entryToastContainer"); - a && document.body.removeChild(a); - this.body_ = Entry.createElement("div", "entryToastContainer"); - this.body_.addClass("entryToastContainer"); - document.body.appendChild(this.body_); +Entry.deAttachEventListener = function(b, a, c) { + b.removeEventListener(a, c); }; -Entry.Toast.prototype.warning = function(a, b, c) { - var d = Entry.createElement("div", "entryToast"); - d.addClass("entryToast"); - d.addClass("entryToastWarning"); - d.bindOnClick(function() { - Entry.toast.body_.removeChild(this); - }); - var e = Entry.createElement("div", "entryToast"); - e.addClass("entryToastTitle"); - e.innerHTML = a; - d.appendChild(e); - a = Entry.createElement("p", "entryToast"); - a.addClass("entryToastMessage"); - a.innerHTML = b; - d.appendChild(a); - this.toasts_.push(d); - this.body_.appendChild(d); - c || window.setTimeout(function() { - d.style.opacity = 1; - var b = setInterval(function() { - .05 > d.style.opacity && (clearInterval(b), d.style.display = "none", Entry.removeElement(d)); - d.style.opacity *= .9; - }, 20); - }, 1E3); +Entry.isEmpty = function(b) { + if (!b) { + return !0; + } + for (var a in b) { + if (b.hasOwnProperty(a)) { + return !1; + } + } + return !0; }; -Entry.Toast.prototype.success = function(a, b, c) { - var d = Entry.createElement("div", "entryToast"); - d.addClass("entryToast"); - d.addClass("entryToastSuccess"); - d.bindOnClick(function() { - Entry.toast.body_.removeChild(this); - }); - var e = Entry.createElement("div", "entryToast"); - e.addClass("entryToastTitle"); - e.innerHTML = a; - d.appendChild(e); - a = Entry.createElement("p", "entryToast"); - a.addClass("entryToastMessage"); - a.innerHTML = b; - d.appendChild(a); - this.toasts_.push(d); - this.body_.appendChild(d); - c || window.setTimeout(function() { - d.style.opacity = 1; - var b = setInterval(function() { - .05 > d.style.opacity && (clearInterval(b), d.style.display = "none", Entry.removeElement(d)); - d.style.opacity *= .9; - }, 20); - }, 1E3); +Entry.Utils.disableContextmenu = function(b) { + if (b) { + $(b).on("contextmenu", function(a) { + a.stopPropagation(); + a.preventDefault(); + return !1; + }); + } }; -Entry.Toast.prototype.alert = function(a, b, c) { - var d = Entry.createElement("div", "entryToast"); - d.addClass("entryToast"); - d.addClass("entryToastAlert"); - d.bindOnClick(function() { - Entry.toast.body_.removeChild(this); - }); - var e = Entry.createElement("div", "entryToast"); - e.addClass("entryToastTitle"); - e.innerHTML = a; - d.appendChild(e); - a = Entry.createElement("p", "entryToast"); - a.addClass("entryToastMessage"); - a.innerHTML = b; - d.appendChild(a); - this.toasts_.push(d); - this.body_.appendChild(d); - c || window.setTimeout(function() { - d.style.opacity = 1; - var b = setInterval(function() { - .05 > d.style.opacity && (clearInterval(b), d.style.display = "none", Entry.toast.body_.removeChild(d)); - d.style.opacity *= .9; - }, 20); - }, 5E3); +Entry.Utils.isRightButton = function(b) { + return 2 == b.button || b.ctrlKey; }; -Entry.TvCast = function(a) { - this.generateView(a); +Entry.Utils.isTouchEvent = function(b) { + return "mousedown" !== b.type.toLowerCase(); }; -p = Entry.TvCast.prototype; -p.init = function(a) { - this.tvCastHash = a; +Entry.Utils.inherit = function(b, a) { + function c() { + } + c.prototype = b.prototype; + a.prototype = new c; + return a; }; -p.generateView = function(a) { - var b = Entry.createElement("div"); - b.addClass("entryContainerMovieWorkspace"); - b.addClass("entryHidden"); - this.movieContainer = b; - b = Entry.createElement("iframe"); - b.setAttribute("id", "tvCastIframe"); - b.setAttribute("allowfullscreen", ""); - b.setAttribute("frameborder", 0); - b.setAttribute("src", a); - this.movieFrame = b; - this.movieContainer.appendChild(this.movieFrame); +Entry.bindAnimationCallbackOnce = function(b, a) { + b.one("webkitAnimationEnd animationendo animationend", a); +}; +Entry.Utils.isInInput = function(b) { + return "textarea" == b.target.type || "text" == b.target.type; +}; +Entry.Utils.isFunction = function(b) { + return "function" === typeof b; +}; +Entry.Utils.addFilters = function(b, a) { + var c = b.elem("defs"), d = c.elem("filter", {id:"entryTrashcanFilter_" + a}); + d.elem("feGaussianBlur", {"in":"SourceAlpha", stdDeviation:2, result:"blur"}); + d.elem("feOffset", {"in":"blur", dx:1, dy:1, result:"offsetBlur"}); + d = d.elem("feMerge"); + d.elem("feMergeNode", {"in":"offsetBlur"}); + d.elem("feMergeNode", {"in":"SourceGraphic"}, d); + d = c.elem("filter", {id:"entryBlockShadowFilter_" + a, height:"200%"}); + d.elem("feOffset", {result:"offOut", in:"SourceGraphic", dx:0, dy:1}); + d.elem("feColorMatrix", {result:"matrixOut", in:"offOut", type:"matrix", values:"0.7 0 0 0 0 0 0.7 0 0 0 0 0 0.7 0 0 0 0 0 1 0"}); + d.elem("feBlend", {in:"SourceGraphic", in1:"offOut", mode:"normal"}); + c = c.elem("filter", {id:"entryBlockHighlightFilter_" + a}); + c.elem("feOffset", {result:"offOut", in:"SourceGraphic", dx:0, dy:0}); + c.elem("feColorMatrix", {result:"matrixOut", in:"offOut", type:"matrix", values:"1.3 0 0 0 0 0 1.3 0 0 0 0 0 1.3 0 0 0 0 0 1 0"}); +}; +Entry.Utils.addBlockPattern = function(b, a) { + for (var c = b.elem("pattern", {id:"blockHoverPattern_" + a, class:"blockHoverPattern", patternUnits:"userSpaceOnUse", patternTransform:"translate(12, 0)", x:0, y:0, width:125, height:33}).elem("g"), d = c.elem("rect", {x:0, y:0, width:125, height:33}), e = Entry.mediaFilePath + "block_pattern_(order).png", f = 1;5 > f;f++) { + c.elem("image", {class:"pattern" + f, href:e.replace("(order)", f), x:0, y:0, width:125, height:33}); + } + return d; }; -p.getView = function() { - return this.movieContainer; +Entry.Utils.COLLISION = {NONE:0, UP:1, RIGHT:2, LEFT:3, DOWN:4}; +Entry.Utils.createMouseEvent = function(b, a) { + var c = document.createEvent("MouseEvent"); + c.initMouseEvent(b, !0, !0, window, 0, 0, 0, a.clientX, a.clientY, !1, !1, !1, !1, 0, null); + return c; }; -p.resize = function() { - var a = document.getElementById("entryContainerWorkspaceId"), b = document.getElementById("tvCastIframe"); - w = a.offsetWidth; - b.width = w + "px"; - b.height = 9 * w / 16 + "px"; +Entry.Model = function(b, a) { + var c = Entry.Model; + c.generateSchema(b); + c.generateSetter(b); + c.generateObserve(b); + (void 0 === a || a) && Object.seal(b); + return b; }; -Entry.ContextMenu = {}; -(function(a) { - a.createDom = function() { - this.dom = Entry.Dom("ul", {id:"entry-contextmenu", parent:$("body")}); - Entry.Utils.disableContextmenu(this.dom); - Entry.documentMousedown.attach(this, function() { - this.hide(); - }); +(function(b) { + b.generateSchema = function(a) { + var b = a.schema; + if (void 0 !== b) { + b = JSON.parse(JSON.stringify(b)); + a.data = {}; + for (var d in b) { + (function(d) { + a.data[d] = b[d]; + Object.defineProperty(a, d, {get:function() { + return a.data[d]; + }}); + })(d); + } + a._toJSON = this._toJSON; + } }; - a.show = function(b, a) { - this.dom || this.createDom(); - if (0 !== b.length) { - var d = this; - void 0 !== a && (this._className = a, this.dom.addClass(a)); - var e = this.dom; - e.empty(); - for (var f = 0, g = b.length;f < g;f++) { - var h = b[f], k = h.text, l = !1 !== h.enable, q = Entry.Dom("li", {class:l ? "menuAble" : "menuDisable", parent:e}); - q.text(k); - l && h.callback && function(b, a) { - b.mousedown(function(b) { - b.preventDefault(); - d.hide(); - a(b); - }); - }(q, h.callback); - } - e.removeClass("entryRemove"); - this.position(Entry.mouseCoordinate); - } - }; - a.position = function(b) { - var a = this.dom; - a.css({left:0, top:0}); - var d = a.width(), e = a.height(), f = $(window), g = f.width(), f = f.height(); - b.x + d > g && (b.x -= d + 3); - b.y + e > f && (b.y -= e); - a.css({left:b.x, top:b.y}); - }; - a.hide = function() { - this.dom.empty(); - this.dom.addClass("entryRemove"); - this._className && (this.dom.removeClass(this._className), delete this._className); - }; -})(Entry.ContextMenu); -Entry.STATIC = {OBJECT:0, ENTITY:1, SPRITE:2, SOUND:3, VARIABLE:4, FUNCTION:5, SCENE:6, MESSAGE:7, BLOCK_MODEL:8, BLOCK_RENDER_MODEL:9, BOX_MODEL:10, THREAD_MODEL:11, DRAG_INSTANCE:12, BLOCK_STATIC:0, BLOCK_MOVE:1, BLOCK_FOLLOW:2, RETURN:0, CONTINUE:1}; -Entry.Utils = {}; -Entry.overridePrototype = function() { - Number.prototype.mod = function(a) { - return (this % a + a) % a; + b.generateSetter = function(a) { + a.set = this.set; }; -}; -Entry.Utils.generateId = function() { - return ("0000" + (Math.random() * Math.pow(36, 4) << 0).toString(36)).substr(-4); -}; -Entry.Utils.intersectArray = function(a, b) { - for (var c = [], d = 0;d < a.length;d++) { - for (var e = 0;e < b.length;e++) { - if (a[d] == b[e]) { - c.push(a[d]); - break; - } + b.set = function(a, b) { + var d = {}, e; + for (e in this.data) { + void 0 !== a[e] && (a[e] === this.data[e] ? delete a[e] : (d[e] = this.data[e], this.data[e] = a[e] instanceof Array ? a[e].concat() : a[e])); } - } - return c; -}; -Entry.Utils.isPointInMatrix = function(a, b, c) { - c = void 0 === c ? 0 : c; - var d = a.offsetX ? a.x + a.offsetX : a.x, e = a.offsetY ? a.y + a.offsety : a.y; - return d - c <= b.x && d + a.width + c >= b.x && e - c <= b.y && e + a.height + c >= b.y; -}; -Entry.Utils.colorDarken = function(a, b) { - var c, d, e; - 7 === a.length ? (c = parseInt(a.substr(1, 2), 16), d = parseInt(a.substr(3, 2), 16), e = parseInt(a.substr(5, 2), 16)) : (c = parseInt(a.substr(1, 2), 16), d = parseInt(a.substr(2, 2), 16), e = parseInt(a.substr(3, 2), 16)); - b = void 0 === b ? .7 : b; - c = Math.floor(c * b).toString(16); - d = Math.floor(d * b).toString(16); - e = Math.floor(e * b).toString(16); - return "#" + c + d + e; -}; -Entry.Utils.bindGlobalEvent = function(a) { - void 0 === a && (a = ["resize", "mousedown", "mousemove", "keydown", "keyup"]); - !Entry.windowReszied && -1 < a.indexOf("resize") && (Entry.windowResized = new Entry.Event(window), $(window).on("resize", function(b) { - Entry.windowResized.notify(b); - })); - !Entry.documentMousedown && -1 < a.indexOf("mousedown") && (Entry.documentMousedown = new Entry.Event(window), $(document).on("mousedown", function(b) { - Entry.documentMousedown.notify(b); - })); - !Entry.documentMousemove && -1 < a.indexOf("mousemove") && (Entry.mouseCoordinate = {}, Entry.documentMousemove = new Entry.Event(window), $(document).on("mousemove", function(b) { - Entry.documentMousemove.notify(b); - Entry.mouseCoordinate.x = b.clientX; - Entry.mouseCoordinate.y = b.clientY; - })); - !Entry.keyPressed && -1 < a.indexOf("keydown") && (Entry.pressedKeys = [], Entry.keyPressed = new Entry.Event(window), $(document).on("keydown", function(b) { - var a = b.keyCode; - 0 > Entry.pressedKeys.indexOf(a) && Entry.pressedKeys.push(a); - Entry.keyPressed.notify(b); - })); - !Entry.keyUpped && -1 < a.indexOf("keyup") && (Entry.keyUpped = new Entry.Event(window), $(document).on("keyup", function(b) { - var a = Entry.pressedKeys.indexOf(b.keyCode); - -1 < a && Entry.pressedKeys.splice(a, 1); - Entry.keyUpped.notify(b); - })); -}; -Entry.Utils.makeActivityReporter = function() { - Entry.activityReporter = new Entry.ActivityReporter; - return Entry.activityReporter; -}; -Entry.Utils.initEntryEvent_ = function() { - Entry.events_ || (Entry.events_ = []); -}; -Entry.sampleColours = []; -Entry.assert = function(a, b) { - if (!a) { - throw Error(b || "Assert failed"); - } -}; -Entry.parseTexttoXML = function(a) { - var b; - window.ActiveXObject ? (b = new ActiveXObject("Microsoft.XMLDOM"), b.async = "false", b.loadXML(a)) : b = (new DOMParser).parseFromString(a, "text/xml"); - return b; -}; -Entry.createElement = function(a, b) { - var c = document.createElement(a); - b && (c.id = b); - c.hasClass = function(b) { - return this.className.match(new RegExp("(\\s|^)" + b + "(\\s|$)")); + b || this.notify(Object.keys(a), d); }; - c.addClass = function(b) { - for (var a = 0;a < arguments.length;a++) { - b = arguments[a], this.hasClass(b) || (this.className += " " + b); - } + b.generateObserve = function(a) { + a.observers = []; + a.observe = this.observe; + a.unobserve = this.unobserve; + a.notify = this.notify; }; - c.removeClass = function(b) { - for (var a = 0;a < arguments.length;a++) { - b = arguments[a], this.hasClass(b) && (this.className = this.className.replace(new RegExp("(\\s|^)" + b + "(\\s|$)"), " ")); + b.observe = function(a, b, d, e) { + d = new Entry.Observer(this.observers, a, b, d); + if (!1 !== e) { + a[b]([]); } + return d; }; - c.bindOnClick = function(b) { - $(this).on("click touchstart", function(a) { - a.stopImmediatePropagation(); - a.handled || (a.handled = !0, b.call(this, a)); + b.unobserve = function(a) { + a.destroy(); + }; + b.notify = function(a, b) { + "string" === typeof a && (a = [a]); + var d = this; + d.observers.map(function(e) { + var f = a; + void 0 !== e.attrs && (f = Entry.Utils.intersectArray(e.attrs, a)); + if (f.length) { + e.object[e.funcName](f.map(function(a) { + return {name:a, object:d, oldValue:b[a]}; + })); + } }); }; - return c; -}; -Entry.makeAutolink = function(a) { - return a ? a.replace(/(http|https|ftp|telnet|news|irc):\/\/([-/.a-zA-Z0-9_~#%$?&=:200-377()][^)\]}]+)/gi, "$1://$2").replace(/([xA1-xFEa-z0-9_-]+@[xA1-xFEa-z0-9-]+.[a-z0-9-]+)/gi, "$1") : ""; -}; -Entry.generateHash = function() { - return ("0000" + (Math.random() * Math.pow(36, 4) << 0).toString(36)).substr(-4); -}; -Entry.addEventListener = function(a, b) { - this.events_ || (this.events_ = {}); - this.events_[a] || (this.events_[a] = []); - b instanceof Function && this.events_[a].push(b); - return !0; -}; -Entry.dispatchEvent = function(a, b) { - this.events_ || (this.events_ = {}); - if (this.events_[a]) { - for (var c = 0, d = this.events_[a].length;c < d;c++) { - this.events_[a][c].call(window, b); + b._toJSON = function() { + var a = {}, b; + for (b in this.data) { + a[b] = this.data[b]; } - } -}; -Entry.removeEventListener = function(a, b) { - if (this.events_[a]) { - for (var c = 0, d = this.events_[a].length;c < d;c++) { - if (this.events_[a][c] === b) { - this.events_[a].splice(c, 1); - break; - } + return a; + }; +})(Entry.Model); +Entry.Func = function(b) { + this.id = b ? b.id : Entry.generateHash(); + this.content = b ? new Entry.Code(b.content) : new Entry.Code([[{type:"function_create", deletable:!1, x:40, y:40}]]); + this.block = null; + this.hashMap = {}; + this.paramMap = {}; + var a = function() { + }; + a.prototype = Entry.block.function_general; + a = new a; + a.changeEvent = new Entry.Event; + a.template = Lang.template.function_general; + Entry.block["func_" + this.id] = a; + if (b) { + b = this.content._blockMap; + for (var c in b) { + Entry.Func.registerParamBlock(b[c].type); } + Entry.Func.generateWsBlock(this); } + Entry.Func.registerFunction(this); + Entry.Func.updateMenu(); }; -Entry.removeAllEventListener = function(a) { - this.events_ && this.events_[a] && delete this.events_[a]; -}; -Entry.addTwoNumber = function(a, b) { - if (isNaN(a) || isNaN(b)) { - return a + b; - } - a += ""; - b += ""; - var c = a.indexOf("."), d = b.indexOf("."), e = 0, f = 0; - 0 < c && (e = a.length - c - 1); - 0 < d && (f = b.length - d - 1); - return 0 < e || 0 < f ? e >= f ? (parseFloat(a) + parseFloat(b)).toFixed(e) : (parseFloat(a) + parseFloat(b)).toFixed(f) : parseInt(a) + parseInt(b); -}; -Entry.hex2rgb = function(a) { - return (a = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a)) ? {r:parseInt(a[1], 16), g:parseInt(a[2], 16), b:parseInt(a[3], 16)} : null; -}; -Entry.rgb2hex = function(a, b, c) { - return "#" + (16777216 + (a << 16) + (b << 8) + c).toString(16).slice(1); -}; -Entry.generateRgb = function() { - return {r:Math.floor(256 * Math.random()), g:Math.floor(256 * Math.random()), b:Math.floor(256 * Math.random())}; -}; -Entry.adjustValueWithMaxMin = function(a, b, c) { - return a > c ? c : a < b ? b : a; +Entry.Func.threads = {}; +Entry.Func.registerFunction = function(b) { + var a = Entry.playground.mainWorkspace; + a && (this._targetFuncBlock = a.getBlockMenu().getCategoryCodes("func").createThread([{type:"func_" + b.id}])); }; -Entry.isExist = function(a, b, c) { - for (var d = 0;d < c.length;d++) { - if (c[d][b] == a) { - return c[d]; - } +Entry.Func.executeFunction = function(b) { + var a = this.threads[b]; + if (a = Entry.Engine.computeThread(a.entity, a)) { + return this.threads[b] = a, !0; } + delete this.threads[b]; return !1; }; -Entry.getColourCodes = function() { - return "transparent #660000 #663300 #996633 #003300 #003333 #003399 #000066 #330066 #660066 #FFFFFF #990000 #993300 #CC9900 #006600 #336666 #0033FF #000099 #660099 #990066 #000000 #CC0000 #CC3300 #FFCC00 #009900 #006666 #0066FF #0000CC #663399 #CC0099 #333333 #FF0000 #FF3300 #FFFF00 #00CC00 #009999 #0099FF #0000FF #9900CC #FF0099 #666666 #CC3333 #FF6600 #FFFF33 #00FF00 #00CCCC #00CCFF #3366FF #9933FF #FF00FF #999999 #FF6666 #FF6633 #FFFF66 #66FF66 #66CCCC #00FFFF #3399FF #9966FF #FF66FF #BBBBBB #FF9999 #FF9966 #FFFF99 #99FF99 #66FFCC #99FFFF #66CCff #9999FF #FF99FF #CCCCCC #FFCCCC #FFCC99 #FFFFCC #CCFFCC #99FFCC #CCFFFF #99CCFF #CCCCFF #FFCCFF".split(" "); +Entry.Func.clearThreads = function() { + this.threads = {}; }; -Entry.removeElement = function(a) { - a && a.parentNode && a.parentNode.removeChild(a); +Entry.Func.prototype.init = function(b) { + this.id = b.id; + this.content = Blockly.Xml.textToDom(b.content); + this.block = Blockly.Xml.textToDom("" + b.block + "").childNodes[0]; }; -Entry.getElementsByClassName = function(a) { - for (var b = [], c = document.getElementsByTagName("*"), d = 0;d < c.length;d++) { - -1 < (" " + c[d].className + " ").indexOf(" " + a + " ") && b.push(c[d]); - } - return b; +Entry.Func.edit = function(b) { + this.cancelEdit(); + this.targetFunc = b; + this.initEditView(b.content); + this.bindFuncChangeEvent(); + this.updateMenu(); }; -Entry.parseNumber = function(a) { - return "string" != typeof a || isNaN(+a) ? "number" != typeof a || isNaN(+a) ? !1 : a : +a; +Entry.Func.initEditView = function(b) { + this.menuCode || this.setupMenuCode(); + var a = Entry.playground.mainWorkspace; + a.setMode(Entry.Workspace.MODE_OVERLAYBOARD); + a.changeOverlayBoardCode(b); + this._workspaceStateEvent = a.changeEvent.attach(this, this.endEdit); }; -Entry.countStringLength = function(a) { - var b, c = 0; - for (b = 0;b < a.length;b++) { - 255 < a.charCodeAt(b) ? c += 2 : c++; +Entry.Func.endEdit = function(b) { + this.unbindFuncChangeEvent(); + this._workspaceStateEvent.destroy(); + delete this._workspaceStateEvent; + switch(b) { + case "save": + this.save(); + case "cancelEdit": + this.cancelEdit(); } - return c; }; -Entry.cutStringByLength = function(a, b) { - var c, d = 0; - for (c = 0;d < b && c < a.length;c++) { - 255 < a.charCodeAt(c) ? d += 2 : d++; - } - return a.substr(0, c); +Entry.Func.save = function() { + this.targetFunc.generateBlock(!0); + Entry.variableContainer.saveFunction(this.targetFunc); }; -Entry.isChild = function(a, b) { - if (!b) { - for (;b.parentNode;) { - if ((b = b.parentNode) == a) { - return !0; +Entry.Func.syncFuncName = function(b) { + var a = 0, c = [], c = b.split(" "), d = ""; + b = []; + b = Blockly.mainWorkspace.getAllBlocks(); + for (var e = 0;e < b.length;e++) { + var f = b[e]; + if ("function_general" === f.type) { + for (var g = [], g = f.inputList, h = 0;h < g.length;h++) { + f = g[h], 0 < f.fieldRow.length && f.fieldRow[0] instanceof Blockly.FieldLabel && void 0 != f.fieldRow[0].text_ && (d += f.fieldRow[0].text_, d += " "); + } + d = d.trim(); + if (d === this.srcFName && this.srcFName.split(" ").length == c.length) { + for (d = 0;d < g.length;d++) { + if (f = g[d], 0 < f.fieldRow.length && f.fieldRow[0] instanceof Blockly.FieldLabel && void 0 != f.fieldRow[0].text_) { + if (void 0 === c[a]) { + g.splice(d, 1); + break; + } else { + f.fieldRow[0].text_ = c[a]; + } + a++; + } + } } + d = ""; + a = 0; } } - return !1; -}; -Entry.launchFullScreen = function(a) { - a.requestFullscreen ? a.requestFullscreen() : a.mozRequestFulScreen ? a.mozRequestFulScreen() : a.webkitRequestFullscreen ? a.webkitRequestFullscreen() : a.msRequestFullScreen && a.msRequestFullScreen(); -}; -Entry.exitFullScreen = function() { - document.exitFullScreen ? document.exitFullScreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen(); -}; -Entry.isPhone = function() { - return !1; -}; -Entry.getKeyCodeMap = function() { - return {65:"a", 66:"b", 67:"c", 68:"d", 69:"e", 70:"f", 71:"g", 72:"h", 73:"i", 74:"j", 75:"k", 76:"l", 77:"m", 78:"n", 79:"o", 80:"p", 81:"q", 82:"r", 83:"s", 84:"t", 85:"u", 86:"v", 87:"w", 88:"x", 89:"y", 90:"z", 32:Lang.Blocks.START_press_some_key_space, 37:Lang.Blocks.START_press_some_key_left, 38:Lang.Blocks.START_press_some_key_up, 39:Lang.Blocks.START_press_some_key_right, 40:Lang.Blocks.START_press_some_key_down, 48:"0", 49:"1", 50:"2", 51:"3", 52:"4", 53:"5", 54:"6", 55:"7", 56:"8", 57:"9", - 13:Lang.Blocks.START_press_some_key_enter}; -}; -Entry.checkCollisionRect = function(a, b) { - return !(a.y + a.height < b.y || a.y > b.y + b.height || a.x + a.width < b.x || a.x > b.x + b.width); + a = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace); + Blockly.mainWorkspace.clear(); + Blockly.Xml.domToWorkspace(Blockly.mainWorkspace, a); }; -Entry.bindAnimationCallback = function(a, b) { - a.addEventListener("webkitAnimationEnd", b, !1); - a.addEventListener("animationend", b, !1); - a.addEventListener("oanimationend", b, !1); +Entry.Func.cancelEdit = function() { + this.targetFunc && (Entry.Func.isEdit = !1, this.targetFunc.block || (this._targetFuncBlock.destroy(), delete Entry.variableContainer.functions_[this.targetFunc.id], delete Entry.variableContainer.selected), delete this.targetFunc, this.updateMenu(), Entry.variableContainer.updateList(), Entry.playground.mainWorkspace.setMode(Entry.Workspace.MODE_BOARD)); }; -Entry.cloneSimpleObject = function(a) { - var b = {}, c; - for (c in a) { - b[c] = a[c]; +Entry.Func.getMenuXml = function() { + var b = []; + this.targetFunc || (b = b.concat(this.createBtn)); + if (this.targetFunc) { + var a = this.FIELD_BLOCK, a = a.replace("#1", Entry.generateHash()), a = a.replace("#2", Entry.generateHash()), a = Blockly.Xml.textToDom(a).childNodes, b = b.concat(Entry.nodeListToArray(a)) + } + for (var c in Entry.variableContainer.functions_) { + a = Entry.variableContainer.functions_[c], a === this.targetFunc ? (a = Entry.Func.generateBlock(this.targetFunc, Blockly.Xml.workspaceToDom(Entry.Func.workspace), a.id).block, b.push(a)) : b.push(a.block); } return b; }; -Entry.nodeListToArray = function(a) { - for (var b = Array(a.length), c = -1, d = a.length;++c !== d;b[c] = a[c]) { +Entry.Func.syncFunc = function() { + var b = Entry.Func; + if (b.targetFunc) { + var a = b.workspace.topBlocks_[0].toString(), c = b.workspace.topBlocks_.length; + (b.fieldText != a || b.workspaceLength != c) && 1 > Blockly.Block.dragMode_ && (b.updateMenu(), b.fieldText = a, b.workspaceLength = c); + } +}; +Entry.Func.setupMenuCode = function() { + var b = Entry.playground.mainWorkspace; + b && (b = b.getBlockMenu().getCategoryCodes("func"), this._fieldLabel = b.createThread([{type:"function_field_label"}]).getFirstBlock(), this._fieldString = b.createThread([{type:"function_field_string", params:[{type:this.requestParamBlock("string")}]}]).getFirstBlock(), this._fieldBoolean = b.createThread([{type:"function_field_boolean", params:[{type:this.requestParamBlock("boolean")}]}]).getFirstBlock(), this.menuCode = b); +}; +Entry.Func.refreshMenuCode = function() { + if (Entry.playground.mainWorkspace) { + this.menuCode || this.setupMenuCode(); + var b = Entry.block[this._fieldString.params[0].type].changeEvent._listeners.length; + 2 < b && this._fieldString.params[0].changeType(this.requestParamBlock("string")); + b = Entry.block[this._fieldBoolean.params[0].type].changeEvent._listeners.length; + 2 < b && this._fieldBoolean.params[0].changeType(this.requestParamBlock("boolean")); + } +}; +Entry.Func.requestParamBlock = function(b) { + var a = Entry.generateHash(), c; + switch(b) { + case "string": + c = Entry.block.function_param_string; + break; + case "boolean": + c = Entry.block.function_param_boolean; + break; + default: + return null; } - return b; + a = b + "Param_" + a; + b = Entry.Func.createParamBlock(a, c, b); + Entry.block[a] = b; + return a; }; -Entry.computeInputWidth = function(a) { - var b = document.createElement("span"); - b.className = "tmp-element"; - b.innerHTML = a.replace(/&/g, "&").replace(//g, ">"); - document.body.appendChild(b); - a = b.offsetWidth; - document.body.removeChild(b); - return +(a + 10) + "px"; +Entry.Func.registerParamBlock = function(b) { + "string" === b.substr(0, 6) ? Entry.Func.createParamBlock(b, Entry.block.function_param_string, b) : "boolean" === b.substr(0, 7) && Entry.Func.createParamBlock(b, Entry.block.function_param_boolean, b); }; -Entry.isArrowOrBackspace = function(a) { - return -1 < [37, 38, 39, 40, 8].indexOf(a); +Entry.Func.createParamBlock = function(b, a, c) { + var d = function() { + }; + c = "string" === c ? "function_param_string" : "function_param_boolean"; + d.prototype = a; + d = new d; + d.changeEvent = new Entry.Event; + d.template = Lang.template[c]; + return Entry.block[b] = d; }; -Entry.hexStringToBin = function(a) { - for (var b = [], c = 0;c < a.length - 1;c += 2) { - b.push(parseInt(a.substr(c, 2), 16)); - } - return String.fromCharCode.apply(String, b); +Entry.Func.updateMenu = function() { + var b = Entry.playground.mainWorkspace; + b && (b = b.getBlockMenu(), this.targetFunc ? (this.menuCode || this.setupMenuCode(), b.banClass("functionInit"), b.unbanClass("functionEdit")) : (b.unbanClass("functionInit"), b.banClass("functionEdit")), b.reDraw()); }; -Entry.findObjsByKey = function(a, b, c) { - for (var d = [], e = 0;e < a.length;e++) { - a[e][b] == c && d.push(a[e]); - } - return d; +Entry.Func.prototype.edit = function() { + Entry.Func.isEdit || (Entry.Func.isEdit = !0, Entry.Func.svg ? this.parentView.appendChild(this.svg) : Entry.Func.initEditView()); }; -Entry.factorials = []; -Entry.factorial = function(a) { - return 0 === a || 1 == a ? 1 : 0 < Entry.factorials[a] ? Entry.factorials[a] : Entry.factorials[a] = Entry.factorial(a - 1) * a; +Entry.Func.generateBlock = function(b) { + b = Entry.block["func_" + b.id]; + var a = {template:b.template, params:b.params}, c = /(%\d)/mi, d = b.template.split(c), e = "", f = 0, g = 0, h; + for (h in d) { + var k = d[h]; + c.test(k) ? (k = Number(k.split("%")[1]) - 1, k = b.params[k], "Indicator" !== k.type && ("boolean" === k.accept ? (e += Lang.template.function_param_boolean + (f ? f : ""), f++) : (e += Lang.General.param_string + (g ? g : ""), g++))) : e += k; + } + return {block:a, description:e}; }; -Entry.getListRealIndex = function(a, b) { - if (isNaN(a)) { - switch(a) { - case "FIRST": - a = 1; +Entry.Func.prototype.generateBlock = function(b) { + b = Entry.Func.generateBlock(this); + this.block = b.block; + this.description = b.description; +}; +Entry.Func.generateWsBlock = function(b) { + this.unbindFuncChangeEvent(); + b = b ? b : this.targetFunc; + for (var a = b.content.getEventMap("funcDef")[0].params[0], c = 0, d = 0, e = [], f = "", g = b.hashMap, h = b.paramMap;a;) { + var k = a.params[0]; + switch(a.type) { + case "function_field_label": + f = f + " " + k; break; - case "LAST": - a = b.array_.length; + case "function_field_boolean": + Entry.Mutator.mutate(k.type, {template:Lang.Blocks.FUNCTION_logical_variable + " " + (c ? c : "")}); + g[k.type] = !1; + h[k.type] = c + d; + c++; + e.push({type:"Block", accept:"boolean"}); + f += " %" + (c + d); break; - case "RANDOM": - a = Math.floor(Math.random() * b.array_.length) + 1; + case "function_field_string": + Entry.Mutator.mutate(k.type, {template:Lang.Blocks.FUNCTION_character_variable + " " + (d ? d : "")}), g[k.type] = !1, h[k.type] = c + d, d++, f += " %" + (c + d), e.push({type:"Block", accept:"string"}); } + a = a.getOutputBlock(); } - return a; -}; -Entry.toRadian = function(a) { - return a * Math.PI / 180; -}; -Entry.toDegrees = function(a) { - return 180 * a / Math.PI; -}; -Entry.getPicturesJSON = function(a) { - for (var b = [], c = 0, d = a.length;c < d;c++) { - var e = a[c], f = {}; - f._id = e._id; - f.id = e.id; - f.dimension = e.dimension; - f.filename = e.filename; - f.fileurl = e.fileurl; - f.name = e.name; - f.scale = e.scale; - b.push(f); - } - return b; -}; -Entry.getSoundsJSON = function(a) { - for (var b = [], c = 0, d = a.length;c < d;c++) { - var e = a[c], f = {}; - f._id = e._id; - f.duration = e.duration; - f.ext = e.ext; - f.id = e.id; - f.filename = e.filename; - f.fileurl = e.fileurl; - f.name = e.name; - b.push(f); + c++; + f += " %" + (c + d); + e.push({type:"Indicator", img:"/lib/entryjs/images/block_icon/function_03.png", size:12}); + Entry.Mutator.mutate("func_" + b.id, {params:e, template:f}); + for (var l in g) { + g[l] ? (a = -1 < l.indexOf("string") ? Lang.Blocks.FUNCTION_character_variable : Lang.Blocks.FUNCTION_logical_variable, Entry.Mutator.mutate(l, {template:a})) : g[l] = !0; } - return b; -}; -Entry.cutDecimal = function(a) { - return Math.round(100 * a) / 100; + this.bindFuncChangeEvent(b); }; -Entry.getBrowserType = function() { - if (Entry.userAgent) { - return Entry.userAgent; - } - var a = navigator.userAgent, b, c = a.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; - if (/trident/i.test(c[1])) { - return b = /\brv[ :]+(\d+)/g.exec(a) || [], "IE " + (b[1] || ""); - } - if ("Chrome" === c[1] && (b = a.match(/\b(OPR|Edge)\/(\d+)/), null != b)) { - return b.slice(1).join(" ").replace("OPR", "Opera"); - } - c = c[2] ? [c[1], c[2]] : [navigator.appName, navigator.appVersion, "-?"]; - null != (b = a.match(/version\/(\d+)/i)) && c.splice(1, 1, b[1]); - a = c.join(" "); - return Entry.userAgent = a; -}; -Entry.setBasicBrush = function(a) { - var b = new createjs.Graphics; - b.thickness = 1; - b.rgb = Entry.hex2rgb("#ff0000"); - b.opacity = 100; - b.setStrokeStyle(1); - b.beginStroke("rgba(255,0,0,1)"); - var c = new createjs.Shape(b); - Entry.stage.selectedObjectContainer.addChild(c); - a.brush && (a.brush = null); - a.brush = b; - a.shape && (a.shape = null); - a.shape = c; +Entry.Func.bindFuncChangeEvent = function(b) { + b = b ? b : this.targetFunc; + !this._funcChangeEvent && b.content.getEventMap("funcDef")[0].view && (this._funcChangeEvent = b.content.getEventMap("funcDef")[0].view._contents[1].changeEvent.attach(this, this.generateWsBlock)); }; -Entry.setCloneBrush = function(a, b) { - var c = new createjs.Graphics; - c.thickness = b.thickness; - c.rgb = b.rgb; - c.opacity = b.opacity; - c.setStrokeStyle(c.thickness); - c.beginStroke("rgba(" + c.rgb.r + "," + c.rgb.g + "," + c.rgb.b + "," + c.opacity / 100 + ")"); - var d = new createjs.Shape(c); - Entry.stage.selectedObjectContainer.addChild(d); - a.brush && (a.brush = null); - a.brush = c; - a.shape && (a.shape = null); - a.shape = d; +Entry.Func.unbindFuncChangeEvent = function() { + this._funcChangeEvent && this._funcChangeEvent.destroy(); + delete this._funcChangeEvent; }; -Entry.isFloat = function(a) { - return /\d+\.{1}\d+/.test(a); +Entry.HWMontior = {}; +Entry.HWMonitor = function(b) { + this.svgDom = Entry.Dom($('')); + this._hwModule = b; + var a = this; + Entry.addEventListener("windowResized", function() { + var b = a._hwModule.monitorTemplate.mode; + "both" == b && (a.resize(), a.resizeList()); + "list" == b ? a.resizeList() : a.resize(); + }); + Entry.addEventListener("hwModeChange", function() { + a.changeMode(); + }); + this.changeOffset = 0; + this.scale = .5; + this._listPortViews = {}; }; -Entry.getStringIndex = function(a) { - if (!a) { - return ""; - } - for (var b = {string:a, index:1}, c = 0, d = [], e = a.length - 1;0 < e;--e) { - var f = a.charAt(e); - if (isNaN(f)) { - break; - } else { - d.unshift(f), c = e; +(function(b) { + b.initView = function() { + this.svgDom = Entry.Dom($('')); + }; + b.generateView = function() { + this.snap = Entry.SVG("hwMonitor"); + this._svgGroup = this.snap.elem("g"); + this._portMap = {n:[], e:[], s:[], w:[]}; + var a = this._hwModule.monitorTemplate, b = {href:Entry.mediaFilePath + a.imgPath, x:-a.width / 2, y:-a.height / 2, width:a.width, height:a.height}; + this._portViews = {}; + this.hwView = this._svgGroup.elem("image"); + this.hwView = this.hwView.attr(b); + this._template = a; + a = a.ports; + this.pathGroup = null; + this.pathGroup = this._svgGroup.elem("g"); + var b = [], d; + for (d in a) { + var e = this.generatePortView(a[d], "_svgGroup"); + this._portViews[d] = e; + b.push(e); + } + b.sort(function(a, b) { + return a.box.x - b.box.x; + }); + var f = this._portMap; + b.map(function(a) { + (1 > (Math.atan2(-a.box.y, a.box.x) / Math.PI + 2) % 2 ? f.n : f.s).push(a); + }); + this.resize(); + }; + b.toggleMode = function(a) { + var b = this._hwModule.monitorTemplate; + "list" == a ? (b.TempPort = null, this._hwModule.monitorTemplate.ports && (this._hwModule.monitorTemplate.TempPort = this._hwModule.monitorTemplate.ports, this._hwModule.monitorTemplate.listPorts = this.addPortEle(this._hwModule.monitorTemplate.listPorts, this._hwModule.monitorTemplate.ports)), $(this._svglistGroup).remove(), this._svgGroup && $(this._svgGroup).remove(), $(this._pathGroup).remove(), this._hwModule.monitorTemplate.mode = "list", this.generateListView()) : (this._hwModule.monitorTemplate.TempPort && + (this._hwModule.monitorTemplate.ports = this._hwModule.monitorTemplate.TempPort, this._hwModule.monitorTemplate.listPorts = this.removePortEle(this._hwModule.monitorTemplate.listPorts, this._hwModule.monitorTemplate.ports)), $(this._svglistGroup).remove(), this._hwModule.monitorTemplate.mode = "both", this.generateListView(), this.generateView()); + }; + b.setHwmonitor = function(a) { + this._hwmodule = a; + }; + b.changeMode = function(a) { + "both" == this._hwModule.monitorTemplate.mode ? this.toggleMode("list") : "list" == this._hwModule.monitorTemplate.mode && this.toggleMode("both"); + }; + b.addPortEle = function(a, b) { + if ("object" != typeof b) { + return a; + } + for (var d in b) { + a[d] = b[d]; } - } - 0 < c && (b.string = a.substring(0, c), b.index = parseInt(d.join("")) + 1); - return b; -}; -Entry.getOrderedName = function(a, b, c) { - if (!a) { - return "untitled"; - } - if (!b || 0 === b.length) { return a; - } - c || (c = "name"); - for (var d = 0, e = Entry.getStringIndex(a), f = 0, g = b.length;f < g;f++) { - var h = Entry.getStringIndex(b[f][c]); - e.string === h.string && h.index > d && (d = h.index); - } - return 0 < d ? e.string + d : a; -}; -Entry.changeXmlHashId = function(a) { - if (/function_field/.test(a.getAttribute("type"))) { - for (var b = a.getElementsByTagName("mutation"), c = 0, d = b.length;c < d;c++) { - b[c].setAttribute("hashid", Entry.generateHash()); - } - } - return a; -}; -Entry.getMaxFloatPoint = function(a) { - for (var b = 0, c = 0, d = a.length;c < d;c++) { - var e = String(a[c]), f = e.indexOf("."); - -1 !== f && (e = e.length - (f + 1), e > b && (b = e)); - } - return Math.min(b, 20); -}; -Entry.convertToRoundedDecimals = function(a, b) { - return isNaN(a) || !this.isFloat(a) ? a : +(Math.round(a + "e" + b) + "e-" + b); -}; -Entry.attachEventListener = function(a, b, c) { - setTimeout(function() { - a.addEventListener(b, c); - }, 0); -}; -Entry.deAttachEventListener = function(a, b, c) { - a.removeEventListener(b, c); -}; -Entry.isEmpty = function(a) { - if (!a) { - return !0; - } - for (var b in a) { - if (a.hasOwnProperty(b)) { - return !1; - } - } - return !0; -}; -Entry.Utils.disableContextmenu = function(a) { - if (a) { - $(a).on("contextmenu", function(b) { - b.stopPropagation(); - b.preventDefault(); - return !1; - }); - } -}; -Entry.Utils.isRightButton = function(a) { - return 2 == a.button || a.ctrlKey; -}; -Entry.Utils.COLLISION = {NONE:0, UP:1, RIGHT:2, LEFT:3, DOWN:4}; -Entry.Model = function(a, b) { - var c = Entry.Model; - c.generateSchema(a); - c.generateSetter(a); - c.generateObserve(a); - (void 0 === b || b) && Object.seal(a); - return a; -}; -(function(a) { - a.generateSchema = function(b) { - var a = b.schema; - if (void 0 !== a) { - a = JSON.parse(JSON.stringify(a)); - b.data = {}; - for (var d in a) { - (function(d) { - b.data[d] = a[d]; - Object.defineProperty(b, d, {get:function() { - return b.data[d]; - }}); - })(d); - } - b._toJSON = this._toJSON; - } - }; - a.generateSetter = function(b) { - b.set = this.set; - }; - a.set = function(b, a) { - var d = {}, e; - for (e in this.data) { - void 0 !== b[e] && (b[e] === this.data[e] ? delete b[e] : (d[e] = this.data[e], this.data[e] = b[e])); - } - a || this.notify(Object.keys(b), d); - }; - a.generateObserve = function(b) { - b.observers = []; - b.observe = this.observe; - b.unobserve = this.unobserve; - b.notify = this.notify; - }; - a.observe = function(b, a, d, e) { - d = new Entry.Observer(this.observers, b, a, d); - if (!1 !== e) { - b[a]([]); - } - return d; - }; - a.unobserve = function(b) { - b.destroy(); - }; - a.notify = function(b, a) { - "string" === typeof b && (b = [b]); - var d = this; - d.observers.map(function(e) { - var f = b; - void 0 !== e.attrs && (f = Entry.Utils.intersectArray(e.attrs, b)); - if (f.length) { - e.object[e.funcName](f.map(function(b) { - return {name:b, object:d, oldValue:a[b]}; - })); - } - }); - }; - a._toJSON = function() { - var b = {}, a; - for (a in this.data) { - b[a] = this.data[a]; - } - return b; - }; -})(Entry.Model); -Entry.Func = function() { - this.id = Entry.generateHash(); - this.content = Blockly.Xml.textToDom(Entry.Func.CREATE_BLOCK); - this.block = null; - this.stringHash = {}; - this.booleanHash = {}; -}; -Entry.Func.threads = {}; -Entry.Func.registerFunction = function(a, b) { - var c = Entry.generateHash(), d = Entry.variableContainer.getFunction(a), e = new Entry.Script(b); - e.init(d.content.childNodes[0]); - this.threads[c] = e; - return c; -}; -Entry.Func.executeFunction = function(a) { - var b = this.threads[a]; - if (b = Entry.Engine.computeThread(b.entity, b)) { - return this.threads[a] = b, !0; - } - delete this.threads[a]; - return !1; -}; -Entry.Func.clearThreads = function() { - this.threads = {}; -}; -Entry.Func.prototype.init = function(a) { - this.id = a.id; - this.content = Blockly.Xml.textToDom(a.content); - this.block = Blockly.Xml.textToDom("" + a.block + "").childNodes[0]; -}; -Entry.Func.CREATE_BTN = ''; -Entry.Func.createBtn = Entry.nodeListToArray(Blockly.Xml.textToDom(Entry.Func.CREATE_BTN).childNodes); -Entry.Func.FIELD_BLOCK = ''; -Entry.Func.fieldBlocks = Entry.nodeListToArray(Blockly.Xml.textToDom(Entry.Func.FIELD_BLOCK).childNodes); -Entry.Func.CREATE_BLOCK = ''; -Entry.Func.edit = function(a) { - this.srcFName = ""; - for (var b = $(a.content.innerHTML).find("field"), c = 0;c < b.length;c++) { - "NAME" === $(b[c]).attr("name") && (this.srcFName += $(b[c]).text(), this.srcFName += " "); - } - this.srcFName = this.srcFName.trim(); - this.cancelEdit(); - this.workspace && (this.workspace.visible = !0); - this.initEditView(); - this.targetFunc = a; - this.workspace.clear(); - Blockly.Xml.domToWorkspace(this.workspace, a.content); - this.updateMenu(); - this.position_(); -}; -Entry.Func.initEditView = function() { - this.parentView = Entry.playground.blocklyView_; - if (!this.svg) { - this.svg = Blockly.createSvgElement("svg", {xmlns:"http://www.w3.org/2000/svg", "xmlns:html":"http://www.w3.org/1999/xhtml", "xmlns:xlink":"http://www.w3.org/1999/xlink", version:"1.1", "class":"blocklySvg entryFunctionEdit"}); - this.workspace = new Blockly.Workspace; - this.workspace.visible = !0; - this.generateButtons(); - this.svg.appendChild(this.workspace.createDom()); - this.workspace.scrollbar = new Blockly.ScrollbarPair(this.workspace); - var a = this.workspace.scrollbar; - a.resize(); - this.workspace.addTrashcan(); - Blockly.bindEvent_(window, "resize", a, a.resize); - document.addEventListener("blocklyWorkspaceChange", this.syncFunc, !1); - var b = this.workspace; - Blockly.bindEvent_(this.svg, "mousedown", null, function(a) { - b.dragMode = !0; - b.startDragMouseX = a.clientX; - b.startDragMouseY = a.clientY; - b.startDragMetrics = b.getMetrics(); - b.startScrollX = b.scrollX; - b.startScrollY = b.scrollY; - }); - Blockly.bindEvent_(this.svg, "mousemove", null, function(c) { - var d = a.hScroll; - a.hScroll.svgGroup_.setAttribute("opacity", "1"); - d.svgGroup_.setAttribute("opacity", "1"); - if (b.dragMode) { - Blockly.removeAllRanges(); - var d = b.startDragMetrics, e = b.startScrollX + (c.clientX - b.startDragMouseX); - c = b.startScrollY + (c.clientY - b.startDragMouseY); - e = Math.min(e, -d.contentLeft); - c = Math.min(c, -d.contentTop); - e = Math.max(e, d.viewWidth - d.contentLeft - d.contentWidth); - c = Math.max(c, d.viewHeight - d.contentTop - d.contentHeight); - a.set(-e - d.contentLeft, -c - d.contentTop); - } - }); - Blockly.bindEvent_(this.svg, "mouseup", null, function(a) { - b.dragMode = !1; - }); - } - Blockly.mainWorkspace.blockMenu.targetWorkspace = this.workspace; - this.doWhenInit(); - this.parentView.appendChild(this.svg); -}; -Entry.Func.save = function() { - var a = ""; - this.targetFunc.content = Blockly.Xml.workspaceToDom(this.workspace); - this.targetFunc.generateBlock(!0); - Entry.variableContainer.saveFunction(this.targetFunc); - for (var b = $(this.targetFunc.content.innerHTML).find("field"), c = 0;c < b.length;c++) { - "NAME" === $(b[c]).attr("name") && (a += $(b[c]).text(), a += " "); - } - a = a.trim(); - this.syncFuncName(a); - this.cancelEdit(); -}; -Entry.Func.syncFuncName = function(a) { - var b = 0, c = [], c = a.split(" "), d = ""; - a = []; - a = Blockly.mainWorkspace.getAllBlocks(); - for (var e = 0;e < a.length;e++) { - var f = a[e]; - if ("function_general" === f.type) { - for (var g = [], g = f.inputList, h = 0;h < g.length;h++) { - f = g[h], 0 < f.fieldRow.length && f.fieldRow[0] instanceof Blockly.FieldLabel && void 0 != f.fieldRow[0].text_ && (d += f.fieldRow[0].text_, d += " "); - } - d = d.trim(); - if (d === this.srcFName && this.srcFName.split(" ").length == c.length) { - for (d = 0;d < g.length;d++) { - if (f = g[d], 0 < f.fieldRow.length && f.fieldRow[0] instanceof Blockly.FieldLabel && void 0 != f.fieldRow[0].text_) { - if (void 0 === c[b]) { - g.splice(d, 1); - break; - } else { - f.fieldRow[0].text_ = c[b]; - } - b++; - } - } - } - d = ""; - b = 0; - } - } - b = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace); - Blockly.mainWorkspace.clear(); - Blockly.Xml.domToWorkspace(Blockly.mainWorkspace, b); -}; -Entry.Func.cancelEdit = function() { - this.svg && this.targetFunc && (this.workspace.visible = !1, this.parentView.removeChild(this.svg), Entry.Func.isEdit = !1, Blockly.mainWorkspace.blockMenu.targetWorkspace = Blockly.mainWorkspace, this.targetFunc.block || (delete Entry.variableContainer.functions_[this.targetFunc.id], delete Entry.variableContainer.selected), delete this.targetFunc, this.updateMenu(), this.doWhenCancel(), Entry.variableContainer.updateList()); -}; -Entry.Func.getMenuXml = function() { - var a = []; - this.targetFunc || (a = a.concat(this.createBtn)); - if (this.targetFunc) { - var b = this.FIELD_BLOCK, b = b.replace("#1", Entry.generateHash()), b = b.replace("#2", Entry.generateHash()), b = Blockly.Xml.textToDom(b).childNodes, a = a.concat(Entry.nodeListToArray(b)) - } - for (var c in Entry.variableContainer.functions_) { - b = Entry.variableContainer.functions_[c], b === this.targetFunc ? (b = Entry.Func.generateBlock(this.targetFunc, Blockly.Xml.workspaceToDom(Entry.Func.workspace), b.id).block, a.push(b)) : a.push(b.block); - } - return a; -}; -Entry.Func.syncFunc = function() { - var a = Entry.Func; - if (a.targetFunc) { - var b = a.workspace.topBlocks_[0].toString(), c = a.workspace.topBlocks_.length; - (a.fieldText != b || a.workspaceLength != c) && 1 > Blockly.Block.dragMode_ && (a.updateMenu(), a.fieldText = b, a.workspaceLength = c); - } -}; -Entry.Func.updateMenu = function() { - if ("func" == Entry.playground.selectedMenu && (Entry.playground.blockMenu.hide(), Entry.playground.blockMenu.show(Entry.Func.getMenuXml()), !Blockly.WidgetDiv.field_ && Entry.Func.targetFunc)) { - var a = Entry.Func.targetFunc, b = Blockly.Xml.workspaceToDom(Entry.Func.workspace), c = b.getElementsByClassName("function_general"), d = a.id, e, c = Entry.nodeListToArray(c), f = [], g = {}; - c.map(function(b) { - var a = b.getElementsByTagName("mutation")[0].getAttribute("hashid"); - a == d ? f.push(b) : (g[a] || (g[a] = []), g[a].push(b)); - }); - f.map(function(a) { - e = Entry.Func.generateWsBlock(b, Blockly.Xml.workspaceToDom(Entry.Func.workspace), d).block; - for (var c = [], f = !1;a.firstChild;) { - var g = a.firstChild, h = g.tagName; - if (f || "NEXT" == h) { - f = !0, c.push(g); - } - a.removeChild(g); - } - for (;e.firstChild;) { - a.appendChild(e.firstChild); - } - for (;c.length;) { - a.appendChild(c.shift()); - } - }); - for (var h in g) { - var a = g[h], k = Entry.variableContainer.getFunction(h).content; - a.map(function(a) { - e = Entry.Func.generateWsBlock(b, k, h).block; - for (var c = [], d = !1;a.firstChild;) { - var f = a.firstChild, g = f.tagName; - if (d || "NEXT" == g) { - d = !0, c.push(f); - } - a.removeChild(f); - } - for (;e.firstChild;) { - a.appendChild(e.firstChild); - } - for (;c.length;) { - a.appendChild(c.shift()); - } - }); - } - Entry.Func.workspace.clear(); - Blockly.Xml.domToWorkspace(Entry.Func.workspace, b); - } -}; -Entry.Func.prototype.edit = function() { - Entry.Func.isEdit || (Entry.Func.isEdit = !0, Entry.Func.svg ? this.parentView.appendChild(this.svg) : Entry.Func.initEditView()); -}; -Entry.Func.generateBlock = function(a, b, c) { - b = Entry.nodeListToArray(b.childNodes); - var d, e; - for (e in b) { - "function_create" == b[e].getAttribute("type") && (d = b[e]); - } - e = new Entry.Script; - e.init(d); - d = e; - d.values && (d = e.values.FIELD); - e = ''; - c = b = ""; - var f = 0, g = 0; - a.stringHash = {}; - for (a.booleanHash = {};;) { - switch(d.type) { - case "function_field_label": - e += '", ">") + '">'; - c += d.fields.NAME; - break; - case "function_field_boolean": - var h = d.values.PARAM.hashId; - e += ''; - b += ''; - a.booleanHash[h] = g; - g++; - c += "\ub17c\ub9ac\uac12" + g; - break; - case "function_field_string": - h = d.values.PARAM.hashId, e += '', b += '10', a.stringHash[h] = f, f++, c += "\ubb38\uc790\uac12" + f; - } - if (d.values && d.values.NEXT) { - d = d.values.NEXT; - } else { - break; - } - c += " "; - } - a = Blockly.Xml.textToDom('' + (e + "") + b + "").childNodes[0]; - c || (c = "\ud568\uc218"); - return {block:a, description:c}; -}; -Entry.Func.prototype.generateBlock = function(a) { - a = Entry.Func.generateBlock(this, this.content, this.id); - this.block = a.block; - this.description = a.description; -}; -Entry.Func.prototype.syncViewSize_ = function() { - var a = this.parentView.getBoundingClientRect(); - this.svg.style.width = a.width; - this.svg.style.height = a.height; -}; -Entry.Func.generateButtons = function() { - var a = this, b = Blockly.createSvgElement("g", {}, this.svg); - this.btnWrapper = b; - var c = Blockly.createSvgElement("text", {x:"27", y:"33", "class":"entryFunctionButtonText"}, b), d = document.createTextNode(Lang.Buttons.save); - c.appendChild(d); - var d = Blockly.createSvgElement("text", {x:"102.5", y:"33", "class":"entryFunctionButtonText"}, b), e = document.createTextNode(Lang.Buttons.cancel); - d.appendChild(e); - e = Blockly.createSvgElement("circle", {cx:"27.5", cy:"27.5", r:"27.5", "class":"entryFunctionButton"}, b); - b = Blockly.createSvgElement("circle", {cx:"102.5", cy:"27.5", r:"27.5", "class":"entryFunctionButton"}, b); - e.onclick = function(b) { - a.save(); - }; - c.onclick = function(b) { - a.save(); - }; - b.onclick = function(b) { - a.cancelEdit(); - }; - d.onclick = function(b) { - a.cancelEdit(); - }; -}; -Entry.Func.position_ = function() { - var a = this.workspace.getMetrics(); - if (a && this.workspace.visible) { - var b = this.btnWrapper; - b.setAttribute("transform", "translate(30, 501)"); - Blockly.RTL ? this.left_ = this.MARGIN_SIDE_ : b.left_ = a.viewWidth / 2 + a.absoluteLeft - 60; - b.top_ = a.viewHeight + a.absoluteTop - 200; - b.setAttribute("transform", "translate(" + b.left_ + "," + b.top_ + ")"); - } -}; -Entry.Func.positionBlock_ = function(a) { - var b = this.workspace.getMetrics(); - if (b && this.workspace.visible) { - var c = a.getSvgRoot(), c = Blockly.getSvgXY_(c); - a.getHeightWidth(); - a.moveBy(b.viewWidth / 2 - 80 - c.x, b.viewHeight / 2 - 50 - c.y); - } -}; -Entry.Func.doWhenInit = function() { - var a = this.svg; - a.appendChild(Blockly.fieldKeydownDom); - a.appendChild(Blockly.fieldDropdownDom); - a.appendChild(Blockly.contextMenu); - Blockly.bindEvent_(window, "resize", this, this.position_); - Blockly.bindEvent_(a, "mousedown", null, Blockly.onMouseDown_); - Blockly.bindEvent_(a, "contextmenu", null, Blockly.onContextMenu_); -}; -Entry.Func.doWhenCancel = function() { - Blockly.clipboard_ = null; - var a = Blockly.svg; - a.appendChild(Blockly.fieldKeydownDom); - a.appendChild(Blockly.fieldDropdownDom); - a.appendChild(Blockly.contextMenu); - Blockly.unbindEvent_(window, "resize", this, this.position_); - Blockly.unbindEvent_(a, "mousedown", null, Blockly.onMouseDown_); - Blockly.unbindEvent_(a, "contextmenu", null, Blockly.onContextMenu_); -}; -Entry.Func.generateWsBlock = function(a, b, c) { - b = b.childNodes; - var d, e; - for (e in b) { - if ("function_create" == b[e].getAttribute("type")) { - d = b[e]; - break; - } - } - e = new Entry.Script; - e.init(d); - d = e; - d.values && (d = e.values.FIELD); - e = ''; - c = b = ""; - var f = 0, g = 0; - a.stringHash = {}; - for (a.booleanHash = {};;) { - switch(d.type) { - case "function_field_label": - e += '", ">") + '">'; - c += d.fields.NAME; - break; - case "function_field_boolean": - var h = d.values.PARAM.hashId; - e += ''; - b += ''; - a.booleanHash[h] = g; - g++; - c += "\ub17c\ub9ac\uac12" + g; - break; - case "function_field_string": - h = d.values.PARAM.hashId, e += '', b += '', a.stringHash[h] = f, f++, c += "\ubb38\uc790\uac12" + f; - } - if (d.values && d.values.NEXT) { - d = d.values.NEXT; - } else { - break; - } - c += " "; - } - a = '' + (e + "") + b + ""; - c || (c = "\ud568\uc218"); - return {block:Blockly.Xml.textToDom(a).childNodes[0], description:c}; -}; -Entry.HWMontior = {}; -Entry.HWMonitor = function(a) { - this.svgDom = Entry.Dom($('')); - this._hwModule = a; - var b = this; - Entry.addEventListener("windowResized", function() { - var a = b._hwModule.monitorTemplate.mode; - "both" == a && (b.resize(), b.resizeList()); - "list" == a ? b.resizeList() : b.resize(); - }); - Entry.addEventListener("hwModeChange", function() { - b.changeMode(); - }); - this.changeOffset = 0; - this.scale = .5; - this._listPortViews = {}; -}; -(function(a) { - a.initView = function() { - this.svgDom = Entry.Dom($('')); - }; - a.generateView = function() { - this.snap = Entry.SVG("hwMonitor"); - this._svgGroup = this.snap.elem("g"); - this._portMap = {n:[], e:[], s:[], w:[]}; - var b = this._hwModule.monitorTemplate, a = {href:Entry.mediaFilePath + b.imgPath, x:-b.width / 2, y:-b.height / 2, width:b.width, height:b.height}; - this._portViews = {}; - this.hwView = this._svgGroup.elem("image"); - this.hwView = this.hwView.attr(a); - this._template = b; - b = b.ports; - this.pathGroup = null; - this.pathGroup = this._svgGroup.elem("g"); - var a = [], d; - for (d in b) { - var e = this.generatePortView(b[d], "_svgGroup"); - this._portViews[d] = e; - a.push(e); - } - a.sort(function(b, a) { - return b.box.x - a.box.x; - }); - var f = this._portMap; - a.map(function(b) { - (1 > (Math.atan2(-b.box.y, b.box.x) / Math.PI + 2) % 2 ? f.n : f.s).push(b); - }); - this.resize(); - }; - a.toggleMode = function(b) { - var a = this._hwModule.monitorTemplate; - "list" == b ? (a.TempPort = null, this._hwModule.monitorTemplate.ports && (this._hwModule.monitorTemplate.TempPort = this._hwModule.monitorTemplate.ports, this._hwModule.monitorTemplate.listPorts = this.addPortEle(this._hwModule.monitorTemplate.listPorts, this._hwModule.monitorTemplate.ports)), $(this._svglistGroup).remove(), this._svgGroup && $(this._svgGroup).remove(), $(this._pathGroup).remove(), this._hwModule.monitorTemplate.mode = "list", this.generateListView()) : (this._hwModule.monitorTemplate.TempPort && - (this._hwModule.monitorTemplate.ports = this._hwModule.monitorTemplate.TempPort, this._hwModule.monitorTemplate.listPorts = this.removePortEle(this._hwModule.monitorTemplate.listPorts, this._hwModule.monitorTemplate.ports)), $(this._svglistGroup).remove(), this._hwModule.monitorTemplate.mode = "both", this.generateListView(), this.generateView()); - }; - a.setHwmonitor = function(b) { - this._hwmodule = b; - }; - a.changeMode = function(b) { - "both" == this._hwModule.monitorTemplate.mode ? this.toggleMode("list") : "list" == this._hwModule.monitorTemplate.mode && this.toggleMode("both"); - }; - a.addPortEle = function(b, a) { - if ("object" != typeof a) { - return b; - } - for (var d in a) { - b[d] = a[d]; - } - return b; }; - a.removePortEle = function(b, a) { - if ("object" != typeof a) { - return b; + b.removePortEle = function(a, b) { + if ("object" != typeof b) { + return a; } - for (var d in a) { - delete b[d]; + for (var d in b) { + delete a[d]; } - return b; + return a; }; - a.generateListView = function() { + b.generateListView = function() { this._portMapList = {n:[]}; this._svglistGroup = null; this.listsnap = Entry.SVG("hwMonitor"); this._svglistGroup = this.listsnap.elem("g"); - var b = this._hwModule.monitorTemplate; - this._template = b; - b = b.listPorts; + var a = this._hwModule.monitorTemplate; + this._template = a; + a = a.listPorts; this.pathGroup = this._svglistGroup.elem("g"); - var a = [], d; - for (d in b) { - var e = this.generatePortView(b[d], "_svglistGroup"); + var b = [], d; + for (d in a) { + var e = this.generatePortView(a[d], "_svglistGroup"); this._listPortViews[d] = e; - a.push(e); + b.push(e); } var f = this._portMapList; - a.map(function(b) { - f.n.push(b); + b.map(function(a) { + f.n.push(a); }); this.resizeList(); }; - a.generatePortView = function(b, a) { - var d = this[a].elem("g"); + b.generatePortView = function(a, b) { + var d = this[b].elem("g"); d.addClass("hwComponent"); - var e = null, e = this.pathGroup.elem("path").attr({d:"m0,0", fill:"none", stroke:"input" === b.type ? "#00979d" : "#A751E3", "stroke-width":3}), f = d.elem("rect").attr({x:0, y:0, width:150, height:22, rx:4, ry:4, fill:"#fff", stroke:"#a0a1a1"}), g = d.elem("text").attr({x:4, y:12, fill:"#000", "class":"hwComponentName", "alignment-baseline":"central"}); - g.textContent = b.name; + var e = null, e = this.pathGroup.elem("path").attr({d:"m0,0", fill:"none", stroke:"input" === a.type ? "#00979d" : "#A751E3", "stroke-width":3}), f = d.elem("rect").attr({x:0, y:0, width:150, height:22, rx:4, ry:4, fill:"#fff", stroke:"#a0a1a1"}), g = d.elem("text").attr({x:4, y:12, fill:"#000", "class":"hwComponentName", "alignment-baseline":"central"}); + g.textContent = a.name; g = g.getComputedTextLength(); - d.elem("rect").attr({x:g + 8, y:2, width:30, height:18, rx:9, ry:9, fill:"input" === b.type ? "#00979d" : "#A751E3"}); + d.elem("rect").attr({x:g + 8, y:2, width:30, height:18, rx:9, ry:9, fill:"input" === a.type ? "#00979d" : "#A751E3"}); var h = d.elem("text").attr({x:g + 13, y:12, fill:"#fff", "class":"hwComponentValue", "alignment-baseline":"central"}); h.textContent = 0; g += 40; f.attr({width:g}); - return {group:d, value:h, type:b.type, path:e, box:{x:b.pos.x - this._template.width / 2, y:b.pos.y - this._template.height / 2, width:g}, width:g}; + return {group:d, value:h, type:a.type, path:e, box:{x:a.pos.x - this._template.width / 2, y:a.pos.y - this._template.height / 2, width:g}, width:g}; }; - a.getView = function() { + b.getView = function() { return this.svgDom; }; - a.update = function() { - var b = Entry.hw.portData, a = Entry.hw.sendQueue, d = this._hwModule.monitorTemplate.mode, e = []; + b.update = function() { + var a = Entry.hw.portData, b = Entry.hw.sendQueue, d = this._hwModule.monitorTemplate.mode, e = []; if ("list" == d) { e = this._listPortViews; } else { @@ -12801,98 +12713,98 @@ Entry.HWMonitor = function(a) { e = this._portViews; } } - if (a) { - for (f in a) { - 0 != a[f] && e[f] && (e[f].type = "output"); + if (b) { + for (f in b) { + 0 != b[f] && e[f] && (e[f].type = "output"); } } for (var g in e) { - d = e[g], "input" == d.type ? (f = b[g], d.value.textContent = f ? f : 0, d.group.getElementsByTagName("rect")[1].attr({fill:"#00979D"})) : (f = a[g], d.value.textContent = f ? f : 0, d.group.getElementsByTagName("rect")[1].attr({fill:"#A751E3"})); + d = e[g], "input" == d.type ? (f = a[g], d.value.textContent = f ? f : 0, d.group.getElementsByTagName("rect")[1].attr({fill:"#00979D"})) : (f = b[g], d.value.textContent = f ? f : 0, d.group.getElementsByTagName("rect")[1].attr({fill:"#A751E3"})); } }; - a.resize = function() { + b.resize = function() { this.hwView && this.hwView.attr({transform:"scale(" + this.scale + ")"}); if (this.svgDom) { - var b = this.svgDom.get(0).getBoundingClientRect() + var a = this.svgDom.get(0).getBoundingClientRect() } - this._svgGroup.attr({transform:"translate(" + b.width / 2 + "," + b.height / 1.8 + ")"}); - this._rect = b; - 0 >= this._template.height || 0 >= b.height || (this.scale = b.height / this._template.height * this._template.height / 1E3, this.align()); + this._svgGroup.attr({transform:"translate(" + a.width / 2 + "," + a.height / 1.8 + ")"}); + this._rect = a; + 0 >= this._template.height || 0 >= a.height || (this.scale = a.height / this._template.height * this._template.height / 1E3, this.align()); }; - a.resizeList = function() { - var b = this.svgDom.get(0).getBoundingClientRect(); - this._svglistGroup.attr({transform:"translate(" + b.width / 2 + "," + b.height / 2 + ")"}); - this._rect = b; + b.resizeList = function() { + var a = this.svgDom.get(0).getBoundingClientRect(); + this._svglistGroup.attr({transform:"translate(" + a.width / 2 + "," + a.height / 2 + ")"}); + this._rect = a; this.alignList(); }; - a.align = function() { - var b = [], b = this._portMap.s.concat(); - this._alignNS(b, this.scale / 3 * this._template.height + 5, 27); - b = this._portMap.n.concat(); - this._alignNS(b, -this._template.height * this.scale / 3 - 32, -27); - b = this._portMap.e.concat(); - this._alignEW(b, -this._template.width * this.scale / 3 - 5, -27); - b = this._portMap.w.concat(); - this._alignEW(b, this._template.width * this.scale / 3 - 32, -27); - }; - a.alignList = function() { - for (var b = {}, b = this._hwModule.monitorTemplate.listPorts, a = b.length, d = 0;d < b.length;d++) { - b[d].group.attr({transform:"translate(" + this._template.width * (d / a - .5) + "," + (-this._template.width / 2 - 30) + ")"}); - } - b = this._portMapList.n.concat(); - this._alignNSList(b, -this._template.width * this.scale / 2 - 32, -27); - }; - a._alignEW = function(b, a, d) { - var e = b.length, f = this._rect.height - 50; + b.align = function() { + var a = [], a = this._portMap.s.concat(); + this._alignNS(a, this.scale / 3 * this._template.height + 5, 27); + a = this._portMap.n.concat(); + this._alignNS(a, -this._template.height * this.scale / 3 - 32, -27); + a = this._portMap.e.concat(); + this._alignEW(a, -this._template.width * this.scale / 3 - 5, -27); + a = this._portMap.w.concat(); + this._alignEW(a, this._template.width * this.scale / 3 - 32, -27); + }; + b.alignList = function() { + for (var a = {}, a = this._hwModule.monitorTemplate.listPorts, b = a.length, d = 0;d < a.length;d++) { + a[d].group.attr({transform:"translate(" + this._template.width * (d / b - .5) + "," + (-this._template.width / 2 - 30) + ")"}); + } + a = this._portMapList.n.concat(); + this._alignNSList(a, -this._template.width * this.scale / 2 - 32, -27); + }; + b._alignEW = function(a, b, d) { + var e = a.length, f = this._rect.height - 50; tP = -f / 2; bP = f / 2; height = this._rect.height; listVLine = wholeHeight = 0; mode = this._hwModule.monitorTemplate; for (f = 0;f < e;f++) { - wholeHeight += b[f].height + 5; + wholeHeight += a[f].height + 5; } wholeHeight < bP - tP && (bP = wholeHeight / 2 + 3, tP = -wholeHeight / 2 - 3); for (;1 < e;) { - var g = b.shift(), f = b.pop(), h = tP, k = bP, l = d; - wholeWidth <= bP - tP ? (tP += g.width + 5, bP -= f.width + 5, l = 0) : 0 === b.length ? (tP = (tP + bP) / 2 - 3, bP = tP + 6) : (tP = Math.max(tP, -width / 2 + g.width) + 15, bP = Math.min(bP, width / 2 - f.width) - 15); + var g = a.shift(), f = a.pop(), h = tP, k = bP, l = d; + wholeWidth <= bP - tP ? (tP += g.width + 5, bP -= f.width + 5, l = 0) : 0 === a.length ? (tP = (tP + bP) / 2 - 3, bP = tP + 6) : (tP = Math.max(tP, -width / 2 + g.width) + 15, bP = Math.min(bP, width / 2 - f.width) - 15); wholeWidth -= g.width + f.width + 10; - a += l; + b += l; } - b.length && b[0].group.attr({transform:"translate(" + a + ",60)"}); - g && rPort && (this._movePort(g, a, tP, h), this._movePort(rPort, a, bP, k)); + a.length && a[0].group.attr({transform:"translate(" + b + ",60)"}); + g && rPort && (this._movePort(g, b, tP, h), this._movePort(rPort, b, bP, k)); }; - a._alignNS = function(b, a, d) { - for (var e = -this._rect.width / 2, f = this._rect.width / 2, g = this._rect.width, h = 0, k = 0;k < b.length;k++) { - h += b[k].width + 5; + b._alignNS = function(a, b, d) { + for (var e = -this._rect.width / 2, f = this._rect.width / 2, g = this._rect.width, h = 0, k = 0;k < a.length;k++) { + h += a[k].width + 5; } h < f - e && (f = h / 2 + 3, e = -h / 2 - 3); - for (;1 < b.length;) { - var k = b.shift(), l = b.pop(), q = e, n = f, m = d; - h <= f - e ? (e += k.width + 5, f -= l.width + 5, m = 0) : 0 === b.length ? (e = (e + f) / 2 - 3, f = e + 6) : (e = Math.max(e, -g / 2 + k.width) + 15, f = Math.min(f, g / 2 - l.width) - 15); - this._movePort(k, e, a, q); - this._movePort(l, f, a, n); + for (;1 < a.length;) { + var k = a.shift(), l = a.pop(), n = e, m = f, q = d; + h <= f - e ? (e += k.width + 5, f -= l.width + 5, q = 0) : 0 === a.length ? (e = (e + f) / 2 - 3, f = e + 6) : (e = Math.max(e, -g / 2 + k.width) + 15, f = Math.min(f, g / 2 - l.width) - 15); + this._movePort(k, e, b, n); + this._movePort(l, f, b, m); h -= k.width + l.width + 10; - a += m; + b += q; } - b.length && this._movePort(b[0], (f + e - b[0].width) / 2, a, 100); + a.length && this._movePort(a[0], (f + e - a[0].width) / 2, b, 100); }; - a._alignNSList = function(b, a) { + b._alignNSList = function(a, b) { var d = this._rect.width; initX = -this._rect.width / 2 + 10; initY = -this._rect.height / 2 + 10; - for (var e = listLine = wholeWidth = 0;e < b.length;e++) { - wholeWidth += b[e].width; + for (var e = listLine = wholeWidth = 0;e < a.length;e++) { + wholeWidth += a[e].width; } - for (var f = 0, g = 0, h = initX, k = 0, l = 0, q = 0, e = 0;e < b.length;e++) { - l = b[e], e != b.length - 1 && (q = b[e + 1]), g += l.width, lP = initX, k = initY + 30 * f, l.group.attr({transform:"translate(" + lP + "," + k + ")"}), initX += l.width + 10, g > d - (l.width + q.width / 2.2) && (f += 1, initX = h, g = 0); + for (var f = 0, g = 0, h = initX, k = 0, l = 0, n = 0, e = 0;e < a.length;e++) { + l = a[e], e != a.length - 1 && (n = a[e + 1]), g += l.width, lP = initX, k = initY + 30 * f, l.group.attr({transform:"translate(" + lP + "," + k + ")"}), initX += l.width + 10, g > d - (l.width + n.width / 2.2) && (f += 1, initX = h, g = 0); } }; - a._movePort = function(b, a, d, e) { - var f = a, g = b.box.x * this.scale, h = b.box.y * this.scale; - a > e ? (f = a - b.width, a = a > g && g > e ? "M" + g + "," + d + "L" + g + "," + h : "M" + (a + e) / 2 + "," + d + "l0," + (h > d ? 28 : -3) + "H" + g + "L" + g + "," + h) : a = a < g && g < e ? "m" + g + "," + d + "L" + g + "," + h : "m" + (e + a) / 2 + "," + d + "l0," + (h > d ? 28 : -3) + "H" + g + "L" + g + "," + h; - b.group.attr({transform:"translate(" + f + "," + d + ")"}); - b.path.attr({d:a}); + b._movePort = function(a, b, d, e) { + var f = b, g = a.box.x * this.scale, h = a.box.y * this.scale; + b > e ? (f = b - a.width, b = b > g && g > e ? "M" + g + "," + d + "L" + g + "," + h : "M" + (b + e) / 2 + "," + d + "l0," + (h > d ? 28 : -3) + "H" + g + "L" + g + "," + h) : b = b < g && g < e ? "m" + g + "," + d + "L" + g + "," + h : "m" + (e + b) / 2 + "," + d + "l0," + (h > d ? 28 : -3) + "H" + g + "L" + g + "," + h; + a.group.attr({transform:"translate(" + f + "," + d + ")"}); + a.path.attr({d:b}); }; })(Entry.HWMonitor.prototype); Entry.HW = function() { @@ -12915,12 +12827,12 @@ p.initSocket = function() { if (this.connectTrial >= Entry.HW.TRIAL_LIMIT) { this.isFirstConnect || Entry.toast.alert(Lang.Menus.connect_hw, Lang.Menus.connect_fail, !1), this.isFirstConnect = !1; } else { - var a = this, b, c; + var b = this, a, c; if (-1 < location.protocol.indexOf("https")) { c = new WebSocket("wss://hardware.play-entry.org:23518"); } else { try { - b = new WebSocket("ws://localhost:23518"); + a = new WebSocket("ws://localhost:23518"); } catch (d) { } try { @@ -12929,32 +12841,32 @@ p.initSocket = function() { } } this.connected = !1; - b.binaryType = "arraybuffer"; + a.binaryType = "arraybuffer"; c.binaryType = "arraybuffer"; this.connectTrial++; - b.onopen = function() { - a.socketType = "WebSocket"; - a.initHardware(b); + a.onopen = function() { + b.socketType = "WebSocket"; + b.initHardware(a); }; - b.onmessage = function(b) { - b = JSON.parse(b.data); - a.checkDevice(b); - a.updatePortData(b); + a.onmessage = function(a) { + a = JSON.parse(a.data); + b.checkDevice(a); + b.updatePortData(a); }; - b.onclose = function() { - "WebSocket" === a.socketType && (this.socket = null, a.initSocket()); + a.onclose = function() { + "WebSocket" === b.socketType && (this.socket = null, b.initSocket()); }; c.onopen = function() { - a.socketType = "WebSocketSecurity"; - a.initHardware(c); + b.socketType = "WebSocketSecurity"; + b.initHardware(c); }; - c.onmessage = function(b) { - b = JSON.parse(b.data); - a.checkDevice(b); - a.updatePortData(b); + c.onmessage = function(a) { + a = JSON.parse(a.data); + b.checkDevice(a); + b.updatePortData(a); }; c.onclose = function() { - "WebSocketSecurity" === a.socketType && (this.socket = null, a.initSocket()); + "WebSocketSecurity" === b.socketType && (this.socket = null, b.initSocket()); }; Entry.dispatchEvent("hwChanged"); } @@ -12965,55 +12877,55 @@ p.retryConnect = function() { this.connectTrial = 0; this.initSocket(); }; -p.initHardware = function(a) { - this.socket = a; +p.initHardware = function(b) { + this.socket = b; this.connectTrial = 0; this.connected = !0; Entry.dispatchEvent("hwChanged"); Entry.playground && Entry.playground.object && Entry.playground.setMenu(Entry.playground.object.objectType); }; -p.setDigitalPortValue = function(a, b) { - this.sendQueue[a] = b; - this.removePortReadable(a); +p.setDigitalPortValue = function(b, a) { + this.sendQueue[b] = a; + this.removePortReadable(b); }; -p.getAnalogPortValue = function(a) { - return this.connected ? this.portData["a" + a] : 0; +p.getAnalogPortValue = function(b) { + return this.connected ? this.portData["a" + b] : 0; }; -p.getDigitalPortValue = function(a) { +p.getDigitalPortValue = function(b) { if (!this.connected) { return 0; } - this.setPortReadable(a); - return void 0 !== this.portData[a] ? this.portData[a] : 0; + this.setPortReadable(b); + return void 0 !== this.portData[b] ? this.portData[b] : 0; }; -p.setPortReadable = function(a) { +p.setPortReadable = function(b) { this.sendQueue.readablePorts || (this.sendQueue.readablePorts = []); - var b = !1, c; + var a = !1, c; for (c in this.sendQueue.readablePorts) { - if (this.sendQueue.readablePorts[c] == a) { - b = !0; + if (this.sendQueue.readablePorts[c] == b) { + a = !0; break; } } - b || this.sendQueue.readablePorts.push(a); + a || this.sendQueue.readablePorts.push(b); }; -p.removePortReadable = function(a) { +p.removePortReadable = function(b) { if (this.sendQueue.readablePorts || Array.isArray(this.sendQueue.readablePorts)) { - var b, c; + var a, c; for (c in this.sendQueue.readablePorts) { - if (this.sendQueue.readablePorts[c] == a) { - b = +c; + if (this.sendQueue.readablePorts[c] == b) { + a = Number(c); break; } } - this.sendQueue.readablePorts = void 0 != b ? this.sendQueue.readablePorts.slice(0, b).concat(this.sendQueue.readablePorts.slice(b + 1, this.sendQueue.readablePorts.length)) : []; + this.sendQueue.readablePorts = void 0 != a ? this.sendQueue.readablePorts.slice(0, a).concat(this.sendQueue.readablePorts.slice(a + 1, this.sendQueue.readablePorts.length)) : []; } }; p.update = function() { this.socket && 1 == this.socket.readyState && this.socket.send(JSON.stringify(this.sendQueue)); }; -p.updatePortData = function(a) { - this.portData = a; +p.updatePortData = function(b) { + this.portData = b; this.hwMonitor && this.hwMonitor.update(); }; p.closeConnection = function() { @@ -13028,14 +12940,14 @@ p.downloadSource = function() { p.setZero = function() { Entry.hw.hwModule && Entry.hw.hwModule.setZero(); }; -p.checkDevice = function(a) { - void 0 !== a.company && (a = "" + a.company + a.model, a != this.selectedDevice && (this.selectedDevice = a, this.hwModule = this.hwInfo[a], Entry.dispatchEvent("hwChanged"), Entry.toast.success("\ud558\ub4dc\uc6e8\uc5b4 \uc5f0\uacb0 \uc131\uacf5", "\ud558\ub4dc\uc6e8\uc5b4 \uc544\uc774\ucf58\uc744 \ub354\ube14\ud074\ub9ad\ud558\uba74, \uc13c\uc11c\uac12\ub9cc \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.", !0), this.hwModule.monitorTemplate && (this.hwMonitor ? (this.hwMonitor._hwModule = - this.hwModule, this.hwMonitor.initView()) : this.hwMonitor = new Entry.HWMonitor(this.hwModule), Entry.propertyPanel.addMode("hw", this.hwMonitor), a = this.hwModule.monitorTemplate, "both" == a.mode ? (a.mode = "list", this.hwMonitor.generateListView(), a.mode = "general", this.hwMonitor.generateView(), a.mode = "both") : "list" == a.mode ? this.hwMonitor.generateListView() : this.hwMonitor.generateView()))); +p.checkDevice = function(b) { + void 0 !== b.company && (b = "" + b.company + b.model, b != this.selectedDevice && (this.selectedDevice = b, this.hwModule = this.hwInfo[b], Entry.dispatchEvent("hwChanged"), Entry.toast.success("\ud558\ub4dc\uc6e8\uc5b4 \uc5f0\uacb0 \uc131\uacf5", "\ud558\ub4dc\uc6e8\uc5b4 \uc544\uc774\ucf58\uc744 \ub354\ube14\ud074\ub9ad\ud558\uba74, \uc13c\uc11c\uac12\ub9cc \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.", !0), this.hwModule.monitorTemplate && (this.hwMonitor ? (this.hwMonitor._hwModule = + this.hwModule, this.hwMonitor.initView()) : this.hwMonitor = new Entry.HWMonitor(this.hwModule), Entry.propertyPanel.addMode("hw", this.hwMonitor), b = this.hwModule.monitorTemplate, "both" == b.mode ? (b.mode = "list", this.hwMonitor.generateListView(), b.mode = "general", this.hwMonitor.generateView(), b.mode = "both") : "list" == b.mode ? this.hwMonitor.generateListView() : this.hwMonitor.generateView()))); }; p.banHW = function() { - var a = this.hwInfo, b; - for (b in a) { - Entry.playground.blockMenu.banClass(a[b].name); + var b = this.hwInfo, a; + for (a in b) { + Entry.playground.mainWorkspace.blockMenu.banClass(b[a].name); } }; Entry.BlockModel = function() { @@ -13050,38 +12962,38 @@ Entry.BoxModel = function() { Entry.Model(this); }; Entry.BoxModel.prototype.schema = {id:0, type:Entry.STATIC.BOX_MODEL, x:0, y:0, width:0, height:0}; -Entry.DragInstance = function(a) { +Entry.DragInstance = function(b) { Entry.Model(this); - this.set(a); + this.set(b); }; -Entry.DragInstance.prototype.schema = {type:Entry.STATIC.DRAG_INSTANCE, startX:0, startY:0, offsetX:0, offsetY:0, prev:null, height:0, mode:0, isNew:!1}; +Entry.DragInstance.prototype.schema = {type:Entry.STATIC.DRAG_INSTANCE, startX:0, startY:0, offsetX:0, offsetY:0, absX:0, absY:0, prev:null, height:0, mode:0, isNew:!1}; Entry.ThreadModel = function() { Entry.Model(this); }; Entry.ThreadModel.prototype.schema = {id:0, type:Entry.STATIC.THREAD_MODEL, x:0, y:0, width:0, minWidth:0, height:0}; -Entry.Variable = function(a) { - Entry.assert("string" == typeof a.name, "Variable name must be given"); - this.name_ = a.name; - this.id_ = a.id ? a.id : Entry.generateHash(); - this.type = a.variableType ? a.variableType : "variable"; - this.object_ = a.object || null; - this.isCloud_ = a.isCloud || !1; - var b = Entry.parseNumber(a.value); - this.value_ = "number" == typeof b ? b : a.value ? a.value : 0; - "slide" == this.type && (this.minValue_ = a.minValue ? a.minValue : 0, this.maxValue_ = a.maxValue ? a.maxValue : 100); - a.isClone || (this.visible_ = a.visible || "boolean" == typeof a.visible ? a.visible : !0, this.x_ = a.x ? a.x : null, this.y_ = a.y ? a.y : null, "list" == this.type && (this.width_ = a.width ? a.width : 100, this.height_ = a.height ? a.height : 120, this.array_ = a.array ? a.array : [], this.scrollPosition = 0), this.BORDER = 6, this.FONT = "10pt NanumGothic"); -}; -Entry.Variable.prototype.generateView = function(a) { - var b = this.type; - if ("variable" == b || "timer" == b || "answer" == b) { +Entry.Variable = function(b) { + Entry.assert("string" == typeof b.name, "Variable name must be given"); + this.name_ = b.name; + this.id_ = b.id ? b.id : Entry.generateHash(); + this.type = b.variableType ? b.variableType : "variable"; + this.object_ = b.object || null; + this.isCloud_ = b.isCloud || !1; + var a = Entry.parseNumber(b.value); + this.value_ = "number" == typeof a ? a : b.value ? b.value : 0; + "slide" == this.type && (this.minValue_ = Number(b.minValue ? b.minValue : 0), this.maxValue_ = Number(b.maxValue ? b.maxValue : 100)); + b.isClone || (this.visible_ = b.visible || "boolean" == typeof b.visible ? b.visible : !0, this.x_ = b.x ? b.x : null, this.y_ = b.y ? b.y : null, "list" == this.type && (this.width_ = b.width ? b.width : 100, this.height_ = b.height ? b.height : 120, this.array_ = b.array ? b.array : [], this.scrollPosition = 0), this.BORDER = 6, this.FONT = "10pt NanumGothic"); +}; +Entry.Variable.prototype.generateView = function(b) { + var a = this.type; + if ("variable" == a || "timer" == a || "answer" == a) { this.view_ = new createjs.Container, this.rect_ = new createjs.Shape, this.view_.addChild(this.rect_), this.view_.variable = this, this.wrapper_ = new createjs.Shape, this.view_.addChild(this.wrapper_), this.textView_ = new createjs.Text("asdf", this.FONT, "#000000"), this.textView_.textBaseline = "alphabetic", this.textView_.x = 4, this.textView_.y = 1, this.view_.addChild(this.textView_), this.valueView_ = new createjs.Text("asdf", "10pt NanumGothic", "#ffffff"), this.valueView_.textBaseline = - "alphabetic", b = Entry.variableContainer.variables_.length, this.getX() && this.getY() ? (this.setX(this.getX()), this.setY(this.getY())) : (this.setX(-230 + 80 * Math.floor(b / 11)), this.setY(24 * a + 20 - 135 - 264 * Math.floor(b / 11))), this.view_.visible = this.visible_, this.view_.addChild(this.valueView_), this.view_.on("mousedown", function(b) { - "workspace" == Entry.type && (this.offset = {x:this.x - (.75 * b.stageX - 240), y:this.y - (.75 * b.stageY - 135)}, this.cursor = "move"); - }), this.view_.on("pressmove", function(b) { - "workspace" == Entry.type && (this.variable.setX(.75 * b.stageX - 240 + this.offset.x), this.variable.setY(.75 * b.stageY - 135 + this.offset.y), this.variable.updateView()); + "alphabetic", a = Entry.variableContainer.variables_.length, this.getX() && this.getY() ? (this.setX(this.getX()), this.setY(this.getY())) : (this.setX(-230 + 80 * Math.floor(a / 11)), this.setY(24 * b + 20 - 135 - 264 * Math.floor(a / 11))), this.view_.visible = this.visible_, this.view_.addChild(this.valueView_), this.view_.on("mousedown", function(a) { + "workspace" == Entry.type && (this.offset = {x:this.x - (.75 * a.stageX - 240), y:this.y - (.75 * a.stageY - 135)}, this.cursor = "move"); + }), this.view_.on("pressmove", function(a) { + "workspace" == Entry.type && (this.variable.setX(.75 * a.stageX - 240 + this.offset.x), this.variable.setY(.75 * a.stageY - 135 + this.offset.y), this.variable.updateView()); }); } else { - if ("slide" == b) { + if ("slide" == a) { var c = this; this.view_ = new createjs.Container; this.rect_ = new createjs.Shape; @@ -13096,74 +13008,74 @@ Entry.Variable.prototype.generateView = function(a) { this.view_.addChild(this.textView_); this.valueView_ = new createjs.Text("value", "10pt NanumGothic", "#ffffff"); this.valueView_.textBaseline = "alphabetic"; - this.view_.on("mousedown", function(b) { - "workspace" == Entry.type && (this.offset = {x:this.x - (.75 * b.stageX - 240), y:this.y - (.75 * b.stageY - 135)}); + this.view_.on("mousedown", function(a) { + "workspace" == Entry.type && (this.offset = {x:this.x - (.75 * a.stageX - 240), y:this.y - (.75 * a.stageY - 135)}); }); - this.view_.on("pressmove", function(b) { - "workspace" != Entry.type || c.isAdjusting || (this.variable.setX(.75 * b.stageX - 240 + this.offset.x), this.variable.setY(.75 * b.stageY - 135 + this.offset.y), this.variable.updateView()); + this.view_.on("pressmove", function(a) { + "workspace" != Entry.type || c.isAdjusting || (this.variable.setX(.75 * a.stageX - 240 + this.offset.x), this.variable.setY(.75 * a.stageY - 135 + this.offset.y), this.variable.updateView()); }); this.view_.visible = this.visible_; this.view_.addChild(this.valueView_); - b = this.textView_.getMeasuredWidth() + this.valueView_.getMeasuredWidth() + 26; - b = Math.max(b, 90); - this.maxWidth = b - 20; + a = this.textView_.getMeasuredWidth() + this.valueView_.getMeasuredWidth() + 26; + a = Math.max(a, 90); + this.maxWidth = a - 20; this.slideBar_ = new createjs.Shape; this.slideBar_.graphics.beginFill("#A0A1A1").s("#A0A1A1").ss(1).dr(10, 10, this.maxWidth, 1.5); this.view_.addChild(this.slideBar_); - b = this.getSlidePosition(this.maxWidth); + a = this.getSlidePosition(this.maxWidth); this.valueSetter_ = new createjs.Shape; - this.valueSetter_.graphics.beginFill("#1bafea").s("#A0A1A1").ss(1).dc(b, 10.5, 3); + this.valueSetter_.graphics.beginFill("#1bafea").s("#A0A1A1").ss(1).dc(a, 10.5, 3); this.valueSetter_.cursor = "pointer"; - this.valueSetter_.on("mousedown", function(b) { - Entry.engine.isState("run") && (c.isAdjusting = !0, this.offsetX = -(this.x - .75 * b.stageX + 240)); + this.valueSetter_.on("mousedown", function(a) { + Entry.engine.isState("run") && (c.isAdjusting = !0, this.offsetX = -(this.x - .75 * a.stageX + 240)); }); - this.valueSetter_.on("pressmove", function(b) { + this.valueSetter_.on("pressmove", function(a) { if (Entry.engine.isState("run")) { - var a = .75 * b.stageX - 240 - this.offsetX, f = this.graphics.command.x; - 0 >= a + f ? c.setSlideCommandX(0, !0) : a + f > c.maxWidth + 10 ? c.setSlideCommandX(c.maxWidth, !0) : (this.offsetX = -(this.x - .75 * b.stageX + 240), c.setSlideCommandX(a)); + var b = .75 * a.stageX - 240 - this.offsetX, f = this.graphics.command.x; + 0 >= b + f ? c.setSlideCommandX(0, !0) : b + f > c.maxWidth + 10 ? c.setSlideCommandX(c.maxWidth, !0) : (this.offsetX = -(this.x - .75 * a.stageX + 240), c.setSlideCommandX(b)); } }); - this.valueSetter_.on("pressup", function(b) { + this.valueSetter_.on("pressup", function(a) { c.isAdjusting = !1; delete c.viewValue_; }); this.view_.addChild(this.valueSetter_); - b = Entry.variableContainer.variables_.length; - this.getX() && this.getY() ? (this.setX(this.getX()), this.setY(this.getY())) : (this.setX(-230 + 80 * Math.floor(b / 11)), this.setY(24 * a + 20 - 135 - 264 * Math.floor(b / 11))); + a = Entry.variableContainer.variables_.length; + this.getX() && this.getY() ? (this.setX(this.getX()), this.setY(this.getY())) : (this.setX(-230 + 80 * Math.floor(a / 11)), this.setY(24 * b + 20 - 135 - 264 * Math.floor(a / 11))); } else { this.view_ = new createjs.Container, this.rect_ = new createjs.Shape, this.view_.addChild(this.rect_), this.view_.variable = this, this.titleView_ = new createjs.Text("asdf", this.FONT, "#000"), this.titleView_.textBaseline = "alphabetic", this.titleView_.textAlign = "center", this.titleView_.width = this.width_ - 2 * this.BORDER, this.titleView_.y = this.BORDER + 10, this.titleView_.x = this.width_ / 2, this.view_.addChild(this.titleView_), this.resizeHandle_ = new createjs.Shape, this.resizeHandle_.graphics.f("#1bafea").ss(1, - 0, 0).s("#1bafea").lt(0, -9).lt(-9, 0).lt(0, 0), this.view_.addChild(this.resizeHandle_), this.resizeHandle_.list = this, this.resizeHandle_.on("mouseover", function(b) { + 0, 0).s("#1bafea").lt(0, -9).lt(-9, 0).lt(0, 0), this.view_.addChild(this.resizeHandle_), this.resizeHandle_.list = this, this.resizeHandle_.on("mouseover", function(a) { this.cursor = "nwse-resize"; - }), this.resizeHandle_.on("mousedown", function(b) { + }), this.resizeHandle_.on("mousedown", function(a) { this.list.isResizing = !0; - this.offset = {x:.75 * b.stageX - this.list.getWidth(), y:.75 * b.stageY - this.list.getHeight()}; + this.offset = {x:.75 * a.stageX - this.list.getWidth(), y:.75 * a.stageY - this.list.getHeight()}; this.parent.cursor = "nwse-resize"; - }), this.resizeHandle_.on("pressmove", function(b) { - this.list.setWidth(.75 * b.stageX - this.offset.x); - this.list.setHeight(.75 * b.stageY - this.offset.y); + }), this.resizeHandle_.on("pressmove", function(a) { + this.list.setWidth(.75 * a.stageX - this.offset.x); + this.list.setHeight(.75 * a.stageY - this.offset.y); this.list.updateView(); - }), this.view_.on("mouseover", function(b) { + }), this.view_.on("mouseover", function(a) { this.cursor = "move"; - }), this.view_.on("mousedown", function(b) { - "workspace" != Entry.type || this.variable.isResizing || (this.offset = {x:this.x - (.75 * b.stageX - 240), y:this.y - (.75 * b.stageY - 135)}, this.cursor = "move"); - }), this.view_.on("pressup", function(b) { + }), this.view_.on("mousedown", function(a) { + "workspace" != Entry.type || this.variable.isResizing || (this.offset = {x:this.x - (.75 * a.stageX - 240), y:this.y - (.75 * a.stageY - 135)}, this.cursor = "move"); + }), this.view_.on("pressup", function(a) { this.cursor = "initial"; this.variable.isResizing = !1; - }), this.view_.on("pressmove", function(b) { - "workspace" != Entry.type || this.variable.isResizing || (this.variable.setX(.75 * b.stageX - 240 + this.offset.x), this.variable.setY(.75 * b.stageY - 135 + this.offset.y), this.variable.updateView()); - }), this.elementView = new createjs.Container, b = new createjs.Text("asdf", this.FONT, "#000"), b.textBaseline = "middle", b.y = 5, this.elementView.addChild(b), this.elementView.indexView = b, b = new createjs.Shape, this.elementView.addChild(b), this.elementView.valueWrapper = b, b = new createjs.Text("fdsa", this.FONT, "#eee"), b.x = 24, b.y = 6, b.textBaseline = "middle", this.elementView.addChild(b), this.elementView.valueView = b, this.elementView.x = this.BORDER, this.scrollButton_ = - new createjs.Shape, this.scrollButton_.graphics.f("#aaa").rr(0, 0, 7, 30, 3.5), this.view_.addChild(this.scrollButton_), this.scrollButton_.y = 23, this.scrollButton_.list = this, this.scrollButton_.on("mousedown", function(b) { + }), this.view_.on("pressmove", function(a) { + "workspace" != Entry.type || this.variable.isResizing || (this.variable.setX(.75 * a.stageX - 240 + this.offset.x), this.variable.setY(.75 * a.stageY - 135 + this.offset.y), this.variable.updateView()); + }), this.elementView = new createjs.Container, a = new createjs.Text("asdf", this.FONT, "#000"), a.textBaseline = "middle", a.y = 5, this.elementView.addChild(a), this.elementView.indexView = a, a = new createjs.Shape, this.elementView.addChild(a), this.elementView.valueWrapper = a, a = new createjs.Text("fdsa", this.FONT, "#eee"), a.x = 24, a.y = 6, a.textBaseline = "middle", this.elementView.addChild(a), this.elementView.valueView = a, this.elementView.x = this.BORDER, this.scrollButton_ = + new createjs.Shape, this.scrollButton_.graphics.f("#aaa").rr(0, 0, 7, 30, 3.5), this.view_.addChild(this.scrollButton_), this.scrollButton_.y = 23, this.scrollButton_.list = this, this.scrollButton_.on("mousedown", function(a) { this.list.isResizing = !0; this.cursor = "pointer"; - this.offsetY = isNaN(this.offsetY) || 0 > this.offsetY ? b.rawY / 2 : this.offsetY; - }), this.scrollButton_.on("pressmove", function(b) { - void 0 === this.moveAmount ? (this.y = b.target.y, this.moveAmount = !0) : this.y = b.rawY / 2 - this.offsetY + this.list.height_ / 100 * 23; + this.offsetY = isNaN(this.offsetY) || 0 > this.offsetY ? a.rawY / 2 : this.offsetY; + }), this.scrollButton_.on("pressmove", function(a) { + void 0 === this.moveAmount ? (this.y = a.target.y, this.moveAmount = !0) : this.y = a.rawY / 2 - this.offsetY + this.list.height_ / 100 * 23; 23 > this.y && (this.y = 23); this.y > this.list.getHeight() - 40 && (this.y = this.list.getHeight() - 40); this.list.updateView(); - }), this.scrollButton_.on("pressup", function(b) { + }), this.scrollButton_.on("pressup", function(a) { this.moveAmount = void 0; - }), this.getX() && this.getY() ? (this.setX(this.getX()), this.setY(this.getY())) : (b = Entry.variableContainer.lists_.length, this.setX(110 * -Math.floor(b / 6) + 120), this.setY(24 * a + 20 - 135 - 145 * Math.floor(b / 6))); + }), this.getX() && this.getY() ? (this.setX(this.getX()), this.setY(this.getY())) : (a = Entry.variableContainer.lists_.length, this.setX(110 * -Math.floor(a / 6) + 120), this.setY(24 * b + 20 - 135 - 145 * Math.floor(a / 6))); } } this.setVisible(this.isVisible()); @@ -13176,8 +13088,8 @@ Entry.Variable.prototype.updateView = function() { this.view_.x = this.getX(); this.view_.y = this.getY(); if (this.object_) { - var a = Entry.container.getObject(this.object_); - this.textView_.text = a ? a.name + ":" + this.getName() : this.getName(); + var b = Entry.container.getObject(this.object_); + this.textView_.text = b ? b.name + ":" + this.getName() : this.getName(); } else { this.textView_.text = this.getName(); } @@ -13188,32 +13100,32 @@ Entry.Variable.prototype.updateView = function() { this.wrapper_.graphics.clear().f("#1bafea").ss(1, 2, 0).s("#1bafea").rc(this.textView_.getMeasuredWidth() + 7, -11, this.valueView_.getMeasuredWidth() + 15, 14, 7, 7, 7, 7); } else { if ("slide" == this.type) { - this.view_.x = this.getX(), this.view_.y = this.getY(), this.object_ ? (a = Entry.container.getObject(this.object_), this.textView_.text = a ? a.name + ":" + this.getName() : this.getName()) : this.textView_.text = this.getName(), this.valueView_.x = this.textView_.getMeasuredWidth() + 14, this.valueView_.y = 1, this.isNumber() ? this.valueView_.text = this.getValue().toFixed(2).replace(".00", "") : this.valueView_.text = this.getValue(), a = this.textView_.getMeasuredWidth() + this.valueView_.getMeasuredWidth() + - 26, a = Math.max(a, 90), this.rect_.graphics.clear().f("#ffffff").ss(1, 2, 0).s("#A0A1A1").rc(0, -14, a, 33, 4, 4, 4, 4), this.wrapper_.graphics.clear().f("#1bafea").ss(1, 2, 0).s("#1bafea").rc(this.textView_.getMeasuredWidth() + 7, -11, this.valueView_.getMeasuredWidth() + 15, 14, 7, 7, 7, 7), a = this.textView_.getMeasuredWidth() + this.valueView_.getMeasuredWidth() + 26, a = Math.max(a, 90), this.maxWidth = a - 20, this.slideBar_.graphics.clear().beginFill("#A0A1A1").s("#A0A1A1").ss(1).dr(10, - 10, this.maxWidth, 1.5), a = this.getSlidePosition(this.maxWidth), this.valueSetter_.graphics.clear().beginFill("#1bafea").s("#A0A1A1").ss(1).dc(a, 10.5, 3); + this.view_.x = this.getX(), this.view_.y = this.getY(), this.object_ ? (b = Entry.container.getObject(this.object_), this.textView_.text = b ? b.name + ":" + this.getName() : this.getName()) : this.textView_.text = this.getName(), this.valueView_.x = this.textView_.getMeasuredWidth() + 14, this.valueView_.y = 1, this.isNumber() ? this.valueView_.text = this.getValue().toFixed(2).replace(".00", "") : this.valueView_.text = this.getValue(), b = this.textView_.getMeasuredWidth() + this.valueView_.getMeasuredWidth() + + 26, b = Math.max(b, 90), this.rect_.graphics.clear().f("#ffffff").ss(1, 2, 0).s("#A0A1A1").rc(0, -14, b, 33, 4, 4, 4, 4), this.wrapper_.graphics.clear().f("#1bafea").ss(1, 2, 0).s("#1bafea").rc(this.textView_.getMeasuredWidth() + 7, -11, this.valueView_.getMeasuredWidth() + 15, 14, 7, 7, 7, 7), b = this.textView_.getMeasuredWidth() + this.valueView_.getMeasuredWidth() + 26, b = Math.max(b, 90), this.maxWidth = b - 20, this.slideBar_.graphics.clear().beginFill("#A0A1A1").s("#A0A1A1").ss(1).dr(10, + 10, this.maxWidth, 1.5), b = this.getSlidePosition(this.maxWidth), this.valueSetter_.graphics.clear().beginFill("#1bafea").s("#A0A1A1").ss(1).dc(b, 10.5, 3); } else { if ("list" == this.type) { this.view_.x = this.getX(); this.view_.y = this.getY(); this.resizeHandle_.x = this.width_ - 2; this.resizeHandle_.y = this.height_ - 2; - var b = this.getName(); - this.object_ && (a = Entry.container.getObject(this.object_)) && (b = a.name + ":" + b); - b = 7 < b.length ? b.substr(0, 6) + ".." : b; - this.titleView_.text = b; + var a = this.getName(); + this.object_ && (b = Entry.container.getObject(this.object_)) && (a = b.name + ":" + a); + a = 7 < a.length ? a.substr(0, 6) + ".." : a; + this.titleView_.text = a; this.titleView_.x = this.width_ / 2; for (this.rect_.graphics.clear().f("#ffffff").ss(1, 2, 0).s("#A0A1A1").rect(0, 0, this.width_, this.height_);this.view_.children[4];) { this.view_.removeChild(this.view_.children[4]); } - a = Math.floor((this.getHeight() - 20) / 20); - a < this.array_.length ? (this.scrollButton_.y > this.getHeight() - 40 && (this.scrollButton_.y = this.getHeight() - 40), this.elementView.valueWrapper.graphics.clear().f("#1bafea").rr(20, -2, this.getWidth() - 20 - 10 - 2 * this.BORDER, 17, 2), this.scrollButton_.visible = !0, this.scrollButton_.x = this.getWidth() - 12, this.scrollPosition = Math.floor((this.scrollButton_.y - 23) / (this.getHeight() - 23 - 40) * (this.array_.length - a))) : (this.elementView.valueWrapper.graphics.clear().f("#1bafea").rr(20, + b = Math.floor((this.getHeight() - 20) / 20); + b < this.array_.length ? (this.scrollButton_.y > this.getHeight() - 40 && (this.scrollButton_.y = this.getHeight() - 40), this.elementView.valueWrapper.graphics.clear().f("#1bafea").rr(20, -2, this.getWidth() - 20 - 10 - 2 * this.BORDER, 17, 2), this.scrollButton_.visible = !0, this.scrollButton_.x = this.getWidth() - 12, this.scrollPosition = Math.floor((this.scrollButton_.y - 23) / (this.getHeight() - 23 - 40) * (this.array_.length - b))) : (this.elementView.valueWrapper.graphics.clear().f("#1bafea").rr(20, -2, this.getWidth() - 20 - 2 * this.BORDER, 17, 2), this.scrollButton_.visible = !1, this.scrollPosition = 0); - for (b = this.scrollPosition;b < this.scrollPosition + a && b < this.array_.length;b++) { - this.elementView.indexView.text = b + 1; - var c = String(this.array_[b].data), d = Math.floor((this.getWidth() - 50) / 7), c = Entry.cutStringByLength(c, d), c = String(this.array_[b].data).length > c.length ? c + ".." : c; + for (a = this.scrollPosition;a < this.scrollPosition + b && a < this.array_.length;a++) { + this.elementView.indexView.text = a + 1; + var c = String(this.array_[a].data), d = Math.floor((this.getWidth() - 50) / 7), c = Entry.cutStringByLength(c, d), c = String(this.array_[a].data).length > c.length ? c + ".." : c; this.elementView.valueView.text = c; c = this.elementView.clone(!0); - c.y = 20 * (b - this.scrollPosition) + 23; + c.y = 20 * (a - this.scrollPosition) + 23; this.view_.addChild(c); } } else { @@ -13228,65 +13140,59 @@ Entry.Variable.prototype.updateView = function() { Entry.Variable.prototype.getName = function() { return this.name_; }; -Entry.Variable.prototype.setName = function(a) { - Entry.assert("string" == typeof a, "Variable name must be string"); - this.name_ = a; +Entry.Variable.prototype.setName = function(b) { + Entry.assert("string" == typeof b, "Variable name must be string"); + this.name_ = b; this.updateView(); }; Entry.Variable.prototype.getId = function() { return this.id_; }; Entry.Variable.prototype.getValue = function() { - return this.isNumber() ? +this.value_ : this.value_; + return this.isNumber() ? Number(this.value_) : this.value_; }; Entry.Variable.prototype.isNumber = function() { return isNaN(this.value_) ? !1 : !0; }; -Entry.Variable.prototype.setValue = function(a) { - if ("slide" != this.type) { - this.value_ = a; - } else { - var b = Entry.isFloat(this.minValue_), c = Entry.isFloat(this.maxValue_); - this.value_ = a < this.minValue_ ? this.minValue_ : a > this.maxValue_ ? this.maxValue_ : a; - b || c || (this.viewValue_ = this.value_, this.value_ = Math.floor(this.value_)); - } +Entry.Variable.prototype.setValue = function(b) { + "slide" != this.type ? this.value_ = b : (b = Number(b), this.value_ = b < this.minValue_ ? this.minValue_ : b > this.maxValue_ ? this.maxValue_ : b, this.isFloatPoint() ? delete this.viewValue_ : this.viewValue_ = this.value_); this.isCloud_ && Entry.variableContainer.updateCloudVariables(); this.updateView(); }; Entry.Variable.prototype.isVisible = function() { return this.visible_; }; -Entry.Variable.prototype.setVisible = function(a) { - Entry.assert("boolean" == typeof a, "Variable visible state must be boolean"); - (this.visible_ = this.view_.visible = a) && this.updateView(); +Entry.Variable.prototype.setVisible = function(b) { + Entry.assert("boolean" == typeof b, "Variable visible state must be boolean"); + (this.visible_ = this.view_.visible = b) && this.updateView(); }; -Entry.Variable.prototype.setX = function(a) { - this.x_ = a; +Entry.Variable.prototype.setX = function(b) { + this.x_ = b; this.updateView(); }; Entry.Variable.prototype.getX = function() { return this.x_; }; -Entry.Variable.prototype.setY = function(a) { - this.y_ = a; +Entry.Variable.prototype.setY = function(b) { + this.y_ = b; this.updateView(); }; Entry.Variable.prototype.getY = function() { return this.y_; }; -Entry.Variable.prototype.setWidth = function(a) { - this.width_ = 100 > a ? 100 : a; +Entry.Variable.prototype.setWidth = function(b) { + this.width_ = 100 > b ? 100 : b; this.updateView(); }; Entry.Variable.prototype.getWidth = function() { return this.width_; }; -Entry.Variable.prototype.isInList = function(a, b) { +Entry.Variable.prototype.isInList = function(b, a) { this.getX(); this.getY(); }; -Entry.Variable.prototype.setHeight = function(a) { - this.height_ = 100 > a ? 100 : a; +Entry.Variable.prototype.setHeight = function(b) { + this.height_ = 100 > b ? 100 : b; this.updateView(); }; Entry.Variable.prototype.getHeight = function() { @@ -13298,76 +13204,83 @@ Entry.Variable.prototype.takeSnapshot = function() { Entry.Variable.prototype.loadSnapshot = function() { this.snapshot_ && !this.isCloud_ && this.syncModel_(this.snapshot_); }; -Entry.Variable.prototype.syncModel_ = function(a) { - this.setX(a.x); - this.setY(a.y); - this.id_ = a.id; - this.setVisible(a.visible); - this.setValue(a.value); - this.setName(a.name); - this.isCloud_ = a.isCloud; - "list" == this.type && (this.setWidth(a.width), this.setHeight(a.height), this.array_ = a.array); +Entry.Variable.prototype.syncModel_ = function(b) { + this.setX(b.x); + this.setY(b.y); + this.id_ = b.id; + this.setVisible(b.visible); + this.setValue(b.value); + this.setName(b.name); + this.isCloud_ = b.isCloud; + "list" == this.type && (this.setWidth(b.width), this.setHeight(b.height), this.array_ = b.array); }; Entry.Variable.prototype.toJSON = function() { - var a = {}; - a.name = this.name_; - a.id = this.id_; - a.visible = this.visible_; - a.value = this.value_; - a.variableType = this.type; - "list" == this.type ? (a.width = this.getWidth(), a.height = this.getHeight(), a.array = JSON.parse(JSON.stringify(this.array_))) : "slide" == this.type && (a.minValue = this.minValue_, a.maxValue = this.maxValue_); - a.isCloud = this.isCloud_; - a.object = this.object_; - a.x = this.x_; - a.y = this.y_; - return a; + var b = {}; + b.name = this.name_; + b.id = this.id_; + b.visible = this.visible_; + b.value = this.value_; + b.variableType = this.type; + "list" == this.type ? (b.width = this.getWidth(), b.height = this.getHeight(), b.array = JSON.parse(JSON.stringify(this.array_))) : "slide" == this.type && (b.minValue = this.minValue_, b.maxValue = this.maxValue_); + b.isCloud = this.isCloud_; + b.object = this.object_; + b.x = this.x_; + b.y = this.y_; + return b; }; Entry.Variable.prototype.remove = function() { Entry.stage.removeVariable(this); }; Entry.Variable.prototype.clone = function() { - var a = this.toJSON(); - a.isClone = !0; - return a = new Entry.Variable(a); + var b = this.toJSON(); + b.isClone = !0; + return b = new Entry.Variable(b); }; Entry.Variable.prototype.getType = function() { return this.type; }; -Entry.Variable.prototype.setType = function(a) { - this.type = a; +Entry.Variable.prototype.setType = function(b) { + this.type = b; }; -Entry.Variable.prototype.getSlidePosition = function(a) { - var b = this.minValue_; - return Math.abs((this.viewValue_ || this.value_) - b) / Math.abs(this.maxValue_ - b) * a + 10; +Entry.Variable.prototype.getSlidePosition = function(b) { + var a = this.minValue_; + return Math.abs((this.viewValue_ || this.value_) - a) / Math.abs(this.maxValue_ - a) * b + 10; }; -Entry.Variable.prototype.setSlideCommandX = function(a, b) { +Entry.Variable.prototype.setSlideCommandX = function(b, a) { var c = this.valueSetter_.graphics.command; - a = "undefined" == typeof a ? 10 : a; - c.x = b ? a + 10 : c.x + a; + b = "undefined" == typeof b ? 10 : b; + c.x = a ? b + 10 : c.x + b; this.updateSlideValueByView(); }; Entry.Variable.prototype.updateSlideValueByView = function() { - var a = Math.max(this.valueSetter_.graphics.command.x - 10, 0) / this.maxWidth; - 0 > a && (a = 0); - 1 < a && (a = 1); - var b = parseFloat(this.minValue_), c = parseFloat(this.maxValue_), a = (b + Math.abs(c - b) * a).toFixed(2), a = parseFloat(a); - a < b ? this.setValue(this.minValue_) : a > c ? this.setValue(this.maxValue_) : this.setValue(a); + var b = Math.max(this.valueSetter_.graphics.command.x - 10, 0) / this.maxWidth; + 0 > b && (b = 0); + 1 < b && (b = 1); + var a = parseFloat(this.minValue_), c = parseFloat(this.maxValue_), b = (a + Number(Math.abs(c - a) * b)).toFixed(2), b = parseFloat(b); + b < a ? b = this.minValue_ : b > c && (b = this.maxValue_); + this.isFloatPoint() || (this.viewValue_ = b, b = Math.round(b)); + this.setValue(b); }; Entry.Variable.prototype.getMinValue = function() { return this.minValue_; }; -Entry.Variable.prototype.setMinValue = function(a) { - this.minValue_ = a; - this.value_ < a && (this.value_ = a); +Entry.Variable.prototype.setMinValue = function(b) { + this.minValue_ = b; + this.value_ < b && (this.value_ = b); this.updateView(); + this.isMinFloat = Entry.isFloat(this.minValue_); }; Entry.Variable.prototype.getMaxValue = function() { return this.maxValue_; }; -Entry.Variable.prototype.setMaxValue = function(a) { - this.maxValue_ = a; - this.value_ > a && (this.value_ = a); +Entry.Variable.prototype.setMaxValue = function(b) { + this.maxValue_ = b; + this.value_ > b && (this.value_ = b); this.updateView(); + this.isMaxFloat = Entry.isFloat(this.maxValue_); +}; +Entry.Variable.prototype.isFloatPoint = function() { + return this.isMaxFloat || this.isMinFloat; }; Entry.VariableContainer = function() { this.variables_ = []; @@ -13379,10 +13292,13 @@ Entry.VariableContainer = function() { this.variableAddPanel = {isOpen:!1, info:{object:null, isCloud:!1}}; this.listAddPanel = {isOpen:!1, info:{object:null, isCloud:!1}}; this.selectedVariable = null; + this._variableRefs = []; + this._messageRefs = []; + this._functionRefs = []; }; -Entry.VariableContainer.prototype.createDom = function(a) { - var b = this; - this.view_ = a; +Entry.VariableContainer.prototype.createDom = function(b) { + var a = this; + this.view_ = b; var c = Entry.createElement("table"); c.addClass("entryVariableSelectorWorkspace"); this.view_.appendChild(c); @@ -13408,10 +13324,10 @@ Entry.VariableContainer.prototype.createDom = function(a) { c.innerHTML = "+ " + Lang.Workspace.variable_create; var f = this; this.variableAddButton_ = c; - c.bindOnClick(function(a) { - a = f.variableAddPanel; - var c = a.view.name.value.trim(); - a.isOpen ? c && 0 !== c.length ? b.addVariable() : (a.view.addClass("entryRemove"), a.isOpen = !1) : (a.view.removeClass("entryRemove"), a.view.name.focus(), a.isOpen = !0); + c.bindOnClick(function(b) { + b = f.variableAddPanel; + var c = b.view.name.value.trim(); + b.isOpen ? c && 0 !== c.length ? a.addVariable() : (b.view.addClass("entryRemove"), b.isOpen = !1) : (b.view.removeClass("entryRemove"), b.view.name.focus(), b.isOpen = !0); }); this.generateVariableAddView(); this.generateListAddView(); @@ -13423,165 +13339,156 @@ Entry.VariableContainer.prototype.createDom = function(a) { c.addClass("entryVariableListElementWorkspace"); c.innerHTML = "+ " + Lang.Workspace.message_create; this.messageAddButton_ = c; - c.bindOnClick(function(a) { - b.addMessage({name:Lang.Workspace.message + " " + (b.messages_.length + 1)}); + c.bindOnClick(function(b) { + a.addMessage({name:Lang.Workspace.message + " " + (a.messages_.length + 1)}); }); c = Entry.createElement("li"); c.addClass("entryVariableAddWorkspace"); c.addClass("entryVariableListElementWorkspace"); c.innerHTML = "+ " + Lang.Workspace.list_create; this.listAddButton_ = c; - c.bindOnClick(function(a) { - a = f.listAddPanel; - var c = a.view.name.value.trim(); - a.isOpen ? c && 0 !== c.length ? b.addList() : (a.view.addClass("entryRemove"), a.isOpen = !1) : (a.view.removeClass("entryRemove"), a.view.name.focus(), a.isOpen = !0); + c.bindOnClick(function(b) { + b = f.listAddPanel; + var c = b.view.name.value.trim(); + b.isOpen ? c && 0 !== c.length ? a.addList() : (b.view.addClass("entryRemove"), b.isOpen = !1) : (b.view.removeClass("entryRemove"), b.view.name.focus(), b.isOpen = !0); }); c = Entry.createElement("li"); c.addClass("entryVariableAddWorkspace"); c.addClass("entryVariableListElementWorkspace"); c.innerHTML = "+ " + Lang.Workspace.function_create; this.functionAddButton_ = c; - c.bindOnClick(function(a) { + c.bindOnClick(function(b) { + b = a._getBlockMenu(); Entry.playground.changeViewMode("code"); - "func" != Entry.playground.selectedMenu && Entry.playground.selectMenu("func"); - b.createFunction(); + "func" != b.lastSelector && b.selectMenu("func"); + a.createFunction(); }); - return a; + return b; }; -Entry.VariableContainer.prototype.createSelectButton = function(a, b) { +Entry.VariableContainer.prototype.createSelectButton = function(b, a) { var c = this; - void 0 === b && (b = !0); + void 0 === a && (a = !0); var d = Entry.createElement("td"); - d.addClass("entryVariableSelectButtonWorkspace", a); - d.innerHTML = Lang.Workspace[a]; - b ? d.bindOnClick(function(b) { - c.selectFilter(a); + d.addClass("entryVariableSelectButtonWorkspace", b); + d.innerHTML = Lang.Workspace[b]; + a ? d.bindOnClick(function(a) { + c.selectFilter(b); this.addClass("selected"); }) : d.addClass("disable"); return d; }; -Entry.VariableContainer.prototype.selectFilter = function(a) { - for (var b = this.view_.getElementsByTagName("td"), c = 0;c < b.length;c++) { - b[c].removeClass("selected"), b[c].hasClass(a) && b[c].addClass("selected"); +Entry.VariableContainer.prototype.selectFilter = function(b) { + for (var a = this.view_.getElementsByTagName("td"), c = 0;c < a.length;c++) { + a[c].removeClass("selected"), a[c].hasClass(b) && a[c].addClass("selected"); } - this.viewMode_ = a; + this.viewMode_ = b; this.select(); this.updateList(); }; -Entry.VariableContainer.prototype.updateVariableAddView = function(a) { - a = "variable" == (a ? a : "variable") ? this.variableAddPanel : this.listAddPanel; - var b = a.info, c = a.view; - a.view.addClass("entryRemove"); +Entry.VariableContainer.prototype.updateVariableAddView = function(b) { + b = "variable" == (b ? b : "variable") ? this.variableAddPanel : this.listAddPanel; + var a = b.info, c = b.view; + b.view.addClass("entryRemove"); c.cloudCheck.removeClass("entryVariableAddChecked"); c.localCheck.removeClass("entryVariableAddChecked"); c.globalCheck.removeClass("entryVariableAddChecked"); c.cloudWrapper.removeClass("entryVariableAddSpaceUnCheckedWorkspace"); - b.isCloud && c.cloudCheck.addClass("entryVariableAddChecked"); - a.isOpen && (c.removeClass("entryRemove"), c.name.focus()); - b.object ? (c.localCheck.addClass("entryVariableAddChecked"), c.cloudWrapper.addClass("entryVariableAddSpaceUnCheckedWorkspace")) : c.globalCheck.addClass("entryVariableAddChecked"); -}; -Entry.VariableContainer.prototype.select = function(a) { - a = this.selected == a ? null : a; - this.selected && (this.selected.listElement.removeClass("selected"), this.listView_.removeChild(this.selected.callerListElement), delete this.selected.callerListElement, this.selected = null); - a && (a.listElement.addClass("selected"), this.selected = a, a instanceof Entry.Variable ? (this.renderVariableReference(a), a.object_ && Entry.container.selectObject(a.object_, !0)) : a instanceof Entry.Func ? this.renderFunctionReference(a) : this.renderMessageReference(a)); -}; -Entry.VariableContainer.prototype.renderMessageReference = function(a) { - var b = this, c = Entry.container.objects_, d = ["when_message_cast", "message_cast", "message_cast_wait"], e = [], f = Entry.createElement("ul"); - f.addClass("entryVariableListCallerListWorkspace"); - for (var g in c) { - for (var h = c[g], k = h.script.getElementsByTagName("block"), l = 0;l < k.length;l++) { - var q = k[l], n = q.getAttribute("type"); - if (-1 < d.indexOf(n)) { - n = Entry.Xml.getField("VALUE", q), n == a.id && e.push({object:h, block:q}); - } else { - if ("function_general" == n) { - var m = q.getElementsByTagName("mutation")[0].getAttribute("hashid"); - if (m = Entry.variableContainer.getFunction(m)) { - for (var m = m.content, m = m.getElementsByTagName("block"), r = 0;r < m.length;r++) { - var t = m[r], n = t.getAttribute("type"); - -1 < d.indexOf(n) && (n = Entry.Xml.getField("VALUE", t), n == a.id && e.push({object:h, block:t, funcBlock:q})); - } - } - } - } - } + a.isCloud && c.cloudCheck.addClass("entryVariableAddChecked"); + b.isOpen && (c.removeClass("entryRemove"), c.name.focus()); + a.object ? (c.localCheck.addClass("entryVariableAddChecked"), c.cloudWrapper.addClass("entryVariableAddSpaceUnCheckedWorkspace")) : c.globalCheck.addClass("entryVariableAddChecked"); +}; +Entry.VariableContainer.prototype.select = function(b) { + b = this.selected == b ? null : b; + this.selected && (this.selected.listElement.removeClass("selected"), this.selected.callerListElement && (this.listView_.removeChild(this.selected.callerListElement), delete this.selected.callerListElement), this.selected = null); + b && (b.listElement.addClass("selected"), this.selected = b, b instanceof Entry.Variable ? (this.renderVariableReference(b), b.object_ && Entry.container.selectObject(b.object_, !0)) : b instanceof Entry.Func ? this.renderFunctionReference(b) : this.renderMessageReference(b)); +}; +Entry.VariableContainer.prototype.renderMessageReference = function(b) { + for (var a = this, c = this._messageRefs, d = b.id, e = [], f = 0;f < c.length;f++) { + -1 < c[f].block.params.indexOf(d) && e.push(c[f]); } - for (g in e) { - c = e[g], d = Entry.createElement("li"), d.addClass("entryVariableListCallerWorkspace"), d.appendChild(c.object.thumbnailView_.cloneNode()), h = Entry.createElement("div"), h.addClass("entryVariableListCallerNameWorkspace"), h.innerHTML = c.object.name + " : " + Lang.Blocks["START_" + c.block.getAttribute("type")], d.appendChild(h), d.caller = c, d.message = a, d.bindOnClick(function(a) { - Entry.playground.object != this.caller.object && (Entry.container.selectObject(), Entry.container.selectObject(this.caller.object.id, !0), b.select(null), b.select(this.message)); - a = this.caller; - a = a.funcBlock ? a.funcBlock.getAttribute("id") : a.block.getAttribute("id"); - Blockly.mainWorkspace.activatePreviousBlock(+a); + c = Entry.createElement("ul"); + c.addClass("entryVariableListCallerListWorkspace"); + for (f in e) { + var d = e[f], g = Entry.createElement("li"); + g.addClass("entryVariableListCallerWorkspace"); + g.appendChild(d.object.thumbnailView_.cloneNode()); + var h = Entry.createElement("div"); + h.addClass("entryVariableListCallerNameWorkspace"); + h.innerHTML = d.object.name + " : " + Lang.Blocks["START_" + d.block.type]; + g.appendChild(h); + g.caller = d; + g.message = b; + g.bindOnClick(function(b) { + Entry.playground.object != this.caller.object && (Entry.container.selectObject(), Entry.container.selectObject(this.caller.object.id, !0), a.select(null), a.select(this.message)); Entry.playground.toggleOnVariableView(); Entry.playground.changeViewMode("variable"); - }), f.appendChild(d); - } - 0 === e.length && (d = Entry.createElement("li"), d.addClass("entryVariableListCallerWorkspace"), d.addClass("entryVariableListCallerNoneWorkspace"), d.innerHTML = Lang.Workspace.no_use, f.appendChild(d)); - a.callerListElement = f; - this.listView_.insertBefore(f, a.listElement); - this.listView_.insertBefore(a.listElement, f); -}; -Entry.VariableContainer.prototype.renderVariableReference = function(a) { - var b = this, c = Entry.container.objects_, d = "get_variable change_variable hide_variable set_variable show_variable add_value_to_list remove_value_from_list insert_value_to_list change_value_list_index value_of_index_from_list length_of_list show_list hide_list is_included_in_list".split(" "), e = [], f = Entry.createElement("ul"); - f.addClass("entryVariableListCallerListWorkspace"); - var g, h; - for (h in c) { - for (var k = c[h], l = k.script.getElementsByTagName("block"), q = 0;q < l.length;q++) { - var n = l[q]; - g = n.getAttribute("type"); - if (-1 < d.indexOf(g)) { - g = Entry.Xml.getField("VARIABLE", n) || Entry.Xml.getField("LIST", n), g == a.id_ && e.push({object:k, block:n}); - } else { - if ("function_general" == g) { - var m = n.getElementsByTagName("mutation")[0].getAttribute("hashid"); - if (m = Entry.variableContainer.getFunction(m)) { - for (var m = m.content, m = m.getElementsByTagName("block"), r = 0;r < m.length;r++) { - var t = m[r]; - g = t.getAttribute("type"); - -1 < d.indexOf(g) && (g = Entry.Xml.getField("VARIABLE", t) || Entry.Xml.getField("LIST", t), g == a.id_ && e.push({object:k, block:t, funcBlock:n})); - } - } - } - } - } + }); + c.appendChild(g); + } + 0 === e.length && (g = Entry.createElement("li"), g.addClass("entryVariableListCallerWorkspace"), g.addClass("entryVariableListCallerNoneWorkspace"), g.innerHTML = Lang.Workspace.no_use, c.appendChild(g)); + b.callerListElement = c; + this.listView_.insertBefore(c, b.listElement); + this.listView_.insertBefore(b.listElement, c); +}; +Entry.VariableContainer.prototype.renderVariableReference = function(b) { + for (var a = this, c = this._variableRefs, d = b.id_, e = [], f = 0;f < c.length;f++) { + -1 < c[f].block.params.indexOf(d) && e.push(c[f]); } - for (h in e) { - c = e[h], d = Entry.createElement("li"), d.addClass("entryVariableListCallerWorkspace"), d.appendChild(c.object.thumbnailView_.cloneNode()), k = Entry.createElement("div"), k.addClass("entryVariableListCallerNameWorkspace"), k.innerHTML = c.object.name + " : " + Lang.Blocks["VARIABLE_" + c.block.getAttribute("type")], d.appendChild(k), d.caller = c, d.variable = a, d.bindOnClick(function(a) { - Entry.playground.object != this.caller.object && (Entry.container.selectObject(), Entry.container.selectObject(this.caller.object.id, !0), b.select(null)); - a = this.caller; - a = a.funcBlock ? a.funcBlock.getAttribute("id") : a.block.getAttribute("id"); - Blockly.mainWorkspace.activatePreviousBlock(+a); + c = Entry.createElement("ul"); + c.addClass("entryVariableListCallerListWorkspace"); + for (f in e) { + var d = e[f], g = Entry.createElement("li"); + g.addClass("entryVariableListCallerWorkspace"); + g.appendChild(d.object.thumbnailView_.cloneNode()); + var h = Entry.createElement("div"); + h.addClass("entryVariableListCallerNameWorkspace"); + h.innerHTML = d.object.name + " : " + Lang.Blocks["VARIABLE_" + d.block.type]; + g.appendChild(h); + g.caller = d; + g.variable = b; + g.bindOnClick(function(b) { + Entry.playground.object != this.caller.object && (Entry.container.selectObject(), Entry.container.selectObject(this.caller.object.id, !0), a.select(null)); + b = this.caller; + b = b.funcBlock || b.block; + b.view.getBoard().activateBlock(b); Entry.playground.toggleOnVariableView(); Entry.playground.changeViewMode("variable"); - }), f.appendChild(d); - } - 0 === e.length && (d = Entry.createElement("li"), d.addClass("entryVariableListCallerWorkspace"), d.addClass("entryVariableListCallerNoneWorkspace"), d.innerHTML = Lang.Workspace.no_use, f.appendChild(d)); - a.callerListElement = f; - this.listView_.insertBefore(f, a.listElement); - this.listView_.insertBefore(a.listElement, f); -}; -Entry.VariableContainer.prototype.renderFunctionReference = function(a) { - var b = this, c = Entry.container.objects_, d = [], e = Entry.createElement("ul"); - e.addClass("entryVariableListCallerListWorkspace"); - for (var f in c) { - for (var g = c[f], h = g.script.getElementsByTagName("block"), k = 0;k < h.length;k++) { - var l = h[k]; - "function_general" == l.getAttribute("type") && l.getElementsByTagName("mutation")[0].getAttribute("hashid") == a.id && d.push({object:g, block:l}); - } - } - for (f in d) { - c = d[f], g = Entry.createElement("li"), g.addClass("entryVariableListCallerWorkspace"), g.appendChild(c.object.thumbnailView_.cloneNode()), h = Entry.createElement("div"), h.addClass("entryVariableListCallerNameWorkspace"), h.innerHTML = c.object.name, g.appendChild(h), g.caller = c, g.bindOnClick(function(c) { - Entry.playground.object != this.caller.object && (Entry.container.selectObject(), Entry.container.selectObject(this.caller.object.id, !0), b.select(null), b.select(a)); - c = this.caller.block.getAttribute("id"); - Blockly.mainWorkspace.activatePreviousBlock(+c); + }); + c.appendChild(g); + } + 0 === e.length && (g = Entry.createElement("li"), g.addClass("entryVariableListCallerWorkspace"), g.addClass("entryVariableListCallerNoneWorkspace"), g.innerHTML = Lang.Workspace.no_use, c.appendChild(g)); + b.callerListElement = c; + this.listView_.insertBefore(c, b.listElement); + this.listView_.insertBefore(b.listElement, c); +}; +Entry.VariableContainer.prototype.renderFunctionReference = function(b) { + for (var a = this, c = this._functionRefs, d = [], e = 0;e < c.length;e++) { + d.push(c[e]); + } + c = Entry.createElement("ul"); + c.addClass("entryVariableListCallerListWorkspace"); + for (e in d) { + var f = d[e], g = Entry.createElement("li"); + g.addClass("entryVariableListCallerWorkspace"); + g.appendChild(f.object.thumbnailView_.cloneNode()); + var h = Entry.createElement("div"); + h.addClass("entryVariableListCallerNameWorkspace"); + h.innerHTML = f.object.name; + g.appendChild(h); + g.caller = f; + g.bindOnClick(function(c) { + Entry.playground.object != this.caller.object && (Entry.container.selectObject(), Entry.container.selectObject(this.caller.object.id, !0), a.select(null), a.select(b)); + c = this.caller.block; Entry.playground.toggleOnVariableView(); + c.view.getBoard().activateBlock(c); Entry.playground.changeViewMode("variable"); - }), e.appendChild(g); + }); + c.appendChild(g); } - 0 === d.length && (g = Entry.createElement("li"), g.addClass("entryVariableListCallerWorkspace"), g.addClass("entryVariableListCallerNoneWorkspace"), g.innerHTML = Lang.Workspace.no_use, e.appendChild(g)); - a.callerListElement = e; - this.listView_.insertBefore(e, a.listElement); - this.listView_.insertBefore(a.listElement, e); + 0 === d.length && (g = Entry.createElement("li"), g.addClass("entryVariableListCallerWorkspace"), g.addClass("entryVariableListCallerNoneWorkspace"), g.innerHTML = Lang.Workspace.no_use, c.appendChild(g)); + b.callerListElement = c; + this.listView_.insertBefore(c, b.listElement); + this.listView_.insertBefore(b.listElement, c); }; Entry.VariableContainer.prototype.updateList = function() { if (this.listView_) { @@ -13589,19 +13496,19 @@ Entry.VariableContainer.prototype.updateList = function() { for (this.listSettingView.addClass("entryRemove");this.listView_.firstChild;) { this.listView_.removeChild(this.listView_.firstChild); } - var a = this.viewMode_, b = []; - if ("all" == a || "message" == a) { - "message" == a && this.listView_.appendChild(this.messageAddButton_); + var b = this.viewMode_, a = []; + if ("all" == b || "message" == b) { + "message" == b && this.listView_.appendChild(this.messageAddButton_); for (var c in this.messages_) { var d = this.messages_[c]; - b.push(d); + a.push(d); var e = d.listElement; this.listView_.appendChild(e); d.callerListElement && this.listView_.appendChild(d.callerListElement); } } - if ("all" == a || "variable" == a) { - if ("variable" == a) { + if ("all" == b || "variable" == b) { + if ("variable" == b) { e = this.variableAddPanel.info; e.object && !Entry.playground.object && (e.object = null); this.listView_.appendChild(this.variableAddButton_); @@ -13609,22 +13516,22 @@ Entry.VariableContainer.prototype.updateList = function() { this.variableSplitters.top.innerHTML = Lang.Workspace.Variable_used_at_all_objects; this.listView_.appendChild(this.variableSplitters.top); for (c in this.variables_) { - d = this.variables_[c], d.object_ || (b.push(d), e = d.listElement, this.listView_.appendChild(e), d.callerListElement && this.listView_.appendChild(d.callerListElement)); + d = this.variables_[c], d.object_ || (a.push(d), e = d.listElement, this.listView_.appendChild(e), d.callerListElement && this.listView_.appendChild(d.callerListElement)); } this.variableSplitters.bottom.innerHTML = Lang.Workspace.Variable_used_at_special_object; this.listView_.appendChild(this.variableSplitters.bottom); for (c in this.variables_) { - d = this.variables_[c], d.object_ && (b.push(d), e = d.listElement, this.listView_.appendChild(e), d.callerListElement && this.listView_.appendChild(d.callerListElement)); + d = this.variables_[c], d.object_ && (a.push(d), e = d.listElement, this.listView_.appendChild(e), d.callerListElement && this.listView_.appendChild(d.callerListElement)); } this.updateVariableAddView("variable"); } else { for (c in this.variables_) { - d = this.variables_[c], b.push(d), e = d.listElement, this.listView_.appendChild(e), d.callerListElement && this.listView_.appendChild(d.callerListElement); + d = this.variables_[c], a.push(d), e = d.listElement, this.listView_.appendChild(e), d.callerListElement && this.listView_.appendChild(d.callerListElement); } } } - if ("all" == a || "list" == a) { - if ("list" == a) { + if ("all" == b || "list" == b) { + if ("list" == b) { e = this.listAddPanel.info; e.object && !Entry.playground.object && (e.object = null); this.listView_.appendChild(this.listAddButton_); @@ -13633,33 +13540,32 @@ Entry.VariableContainer.prototype.updateList = function() { this.listView_.appendChild(this.variableSplitters.top); this.updateVariableAddView("list"); for (c in this.lists_) { - d = this.lists_[c], d.object_ || (b.push(d), e = d.listElement, this.listView_.appendChild(e), d.callerListElement && this.listView_.appendChild(d.callerListElement)); + d = this.lists_[c], d.object_ || (a.push(d), e = d.listElement, this.listView_.appendChild(e), d.callerListElement && this.listView_.appendChild(d.callerListElement)); } this.variableSplitters.bottom.innerHTML = Lang.Workspace.list_used_specific_objects; this.listView_.appendChild(this.variableSplitters.bottom); for (c in this.lists_) { - d = this.lists_[c], d.object_ && (b.push(d), e = d.listElement, this.listView_.appendChild(e), d.callerListElement && this.listView_.appendChild(d.callerListElement)); + d = this.lists_[c], d.object_ && (a.push(d), e = d.listElement, this.listView_.appendChild(e), d.callerListElement && this.listView_.appendChild(d.callerListElement)); } this.updateVariableAddView("variable"); } else { for (c in this.lists_) { - d = this.lists_[c], b.push(d), e = d.listElement, this.listView_.appendChild(e), d.callerListElement && this.listView_.appendChild(d.callerListElement); + d = this.lists_[c], a.push(d), e = d.listElement, this.listView_.appendChild(e), d.callerListElement && this.listView_.appendChild(d.callerListElement); } } } - if ("all" == a || "func" == a) { - for (c in "func" == a && this.listView_.appendChild(this.functionAddButton_), this.functions_) { - a = this.functions_[c], b.push(a), e = a.listElement, this.listView_.appendChild(e), a.callerListElement && this.listView_.appendChild(a.callerListElement); + if ("all" == b || "func" == b) { + for (c in "func" == b && this.listView_.appendChild(this.functionAddButton_), this.functions_) { + b = this.functions_[c], a.push(b), e = b.listElement, this.listView_.appendChild(e), b.callerListElement && this.listView_.appendChild(b.callerListElement); } } this.listView_.appendChild(this.variableSettingView); this.listView_.appendChild(this.listSettingView); - 0 !== b.length && this.select(b[0]); } }; -Entry.VariableContainer.prototype.setMessages = function(a) { - for (var b in a) { - var c = a[b]; +Entry.VariableContainer.prototype.setMessages = function(b) { + for (var a in b) { + var c = b[a]; c.id || (c.id = Entry.generateHash()); this.createMessageView(c); this.messages_.push(c); @@ -13667,9 +13573,9 @@ Entry.VariableContainer.prototype.setMessages = function(a) { Entry.playground.reloadPlayground(); this.updateList(); }; -Entry.VariableContainer.prototype.setVariables = function(a) { - for (var b in a) { - var c = new Entry.Variable(a[b]), d = c.getType(); +Entry.VariableContainer.prototype.setVariables = function(b) { + for (var a in b) { + var c = new Entry.Variable(b[a]), d = c.getType(); "variable" == d || "slide" == d ? (c.generateView(this.variables_.length), this.createVariableView(c), this.variables_.push(c)) : "list" == d ? (c.generateView(this.lists_.length), this.createListView(c), this.lists_.push(c)) : "timer" == d ? this.generateTimer(c) : "answer" == d && this.generateAnswer(c); } Entry.isEmpty(Entry.engine.projectTimer) && Entry.variableContainer.generateTimer(); @@ -13677,166 +13583,168 @@ Entry.VariableContainer.prototype.setVariables = function(a) { Entry.playground.reloadPlayground(); this.updateList(); }; -Entry.VariableContainer.prototype.setFunctions = function(a) { - for (var b in a) { - var c = new Entry.Func; - c.init(a[b]); +Entry.VariableContainer.prototype.setFunctions = function(b) { + for (var a in b) { + var c = new Entry.Func(b[a]); c.generateBlock(); this.createFunctionView(c); this.functions_[c.id] = c; } this.updateList(); }; -Entry.VariableContainer.prototype.getFunction = function(a) { - return this.functions_[a]; +Entry.VariableContainer.prototype.getFunction = function(b) { + return this.functions_[b]; }; -Entry.VariableContainer.prototype.getVariable = function(a, b) { - var c = Entry.findObjsByKey(this.variables_, "id_", a)[0]; - b && b.isClone && c.object_ && (c = Entry.findObjsByKey(b.variables, "id_", a)[0]); +Entry.VariableContainer.prototype.getVariable = function(b, a) { + var c = Entry.findObjsByKey(this.variables_, "id_", b)[0]; + a && a.isClone && c.object_ && (c = Entry.findObjsByKey(a.variables, "id_", b)[0]); return c; }; -Entry.VariableContainer.prototype.getList = function(a, b) { - var c = Entry.findObjsByKey(this.lists_, "id_", a)[0]; - b && b.isClone && c.object_ && (c = Entry.findObjsByKey(b.lists, "id_", a)[0]); +Entry.VariableContainer.prototype.getList = function(b, a) { + var c = Entry.findObjsByKey(this.lists_, "id_", b)[0]; + a && a.isClone && c.object_ && (c = Entry.findObjsByKey(a.lists, "id_", b)[0]); return c; }; Entry.VariableContainer.prototype.createFunction = function() { if (!Entry.Func.isEdit) { - var a = new Entry.Func; - Entry.Func.edit(a); - this.saveFunction(a); + var b = new Entry.Func; + Entry.Func.edit(b); } }; -Entry.VariableContainer.prototype.addFunction = function(a) { +Entry.VariableContainer.prototype.addFunction = function(b) { }; -Entry.VariableContainer.prototype.removeFunction = function(a) { - delete this.functions_[a.id]; +Entry.VariableContainer.prototype.removeFunction = function(b) { + delete this.functions_[b.id]; this.updateList(); }; -Entry.VariableContainer.prototype.checkListPosition = function(a, b) { - var c = a.x_ + a.width_, d = -a.y_, e = -a.y_ + -a.height_; - return b.x > a.x_ && b.x < c && b.y < d && b.y > e ? !0 : !1; +Entry.VariableContainer.prototype.checkListPosition = function(b, a) { + var c = b.x_ + b.width_, d = -b.y_, e = -b.y_ + -b.height_; + return a.x > b.x_ && a.x < c && a.y < d && a.y > e ? !0 : !1; }; -Entry.VariableContainer.prototype.getListById = function(a) { - var b = this.lists_, c = []; - if (0 < b.length) { - for (var d = 0;d < b.length;d++) { - this.checkListPosition(b[d], a) && c.push(b[d]); +Entry.VariableContainer.prototype.getListById = function(b) { + var a = this.lists_, c = []; + if (0 < a.length) { + for (var d = 0;d < a.length;d++) { + this.checkListPosition(a[d], b) && c.push(a[d]); } return c; } return !1; }; -Entry.VariableContainer.prototype.editFunction = function(a, b) { +Entry.VariableContainer.prototype.editFunction = function(b, a) { }; -Entry.VariableContainer.prototype.saveFunction = function(a) { - this.functions_[a.id] || (this.functions_[a.id] = a, this.createFunctionView(a)); - a.listElement.nameField.innerHTML = a.description; +Entry.VariableContainer.prototype.saveFunction = function(b) { + this.functions_[b.id] || (this.functions_[b.id] = b, this.createFunctionView(b)); + b.listElement.nameField.innerHTML = b.description; this.updateList(); }; -Entry.VariableContainer.prototype.createFunctionView = function(a) { - var b = this, c = Entry.createElement("li"); - c.addClass("entryVariableListElementWorkspace"); - c.addClass("entryFunctionElementWorkspace"); - c.bindOnClick(function(c) { - c.stopPropagation(); - b.select(a); - }); - var d = Entry.createElement("button"); - d.addClass("entryVariableListElementDeleteWorkspace"); - d.bindOnClick(function(c) { - c.stopPropagation(); - b.removeFunction(a); - b.selected = null; - }); - var e = Entry.createElement("button"); - e.addClass("entryVariableListElementEditWorkspace"); - e.bindOnClick(function(b) { - b.stopPropagation(); - Entry.Func.edit(a); - Entry.playground && (Entry.playground.changeViewMode("code"), "func" != Entry.playground.selectedMenu && Entry.playground.selectMenu("func")); - }); - var f = Entry.createElement("div"); - f.addClass("entryVariableFunctionElementNameWorkspace"); - f.innerHTML = a.description; - c.nameField = f; - c.appendChild(f); - c.appendChild(e); - c.appendChild(d); - a.listElement = c; +Entry.VariableContainer.prototype.createFunctionView = function(b) { + var a = this; + if (this.view_) { + var c = Entry.createElement("li"); + c.addClass("entryVariableListElementWorkspace"); + c.addClass("entryFunctionElementWorkspace"); + c.bindOnClick(function(c) { + c.stopPropagation(); + a.select(b); + }); + var d = Entry.createElement("button"); + d.addClass("entryVariableListElementDeleteWorkspace"); + d.bindOnClick(function(c) { + c.stopPropagation(); + a.removeFunction(b); + a.selected = null; + }); + var e = Entry.createElement("button"); + e.addClass("entryVariableListElementEditWorkspace"); + var f = this._getBlockMenu(); + e.bindOnClick(function(a) { + a.stopPropagation(); + Entry.Func.edit(b); + Entry.playground && (Entry.playground.changeViewMode("code"), "func" != f.lastSelector && f.selectMenu("func")); + }); + var g = Entry.createElement("div"); + g.addClass("entryVariableFunctionElementNameWorkspace"); + g.innerHTML = b.description; + c.nameField = g; + c.appendChild(g); + c.appendChild(e); + c.appendChild(d); + b.listElement = c; + } }; -Entry.VariableContainer.prototype.checkAllVariableName = function(a, b) { - b = this[b]; - for (var c = 0;c < b.length;c++) { - if (b[c].name_ == a) { +Entry.VariableContainer.prototype.checkAllVariableName = function(b, a) { + a = this[a]; + for (var c = 0;c < a.length;c++) { + if (a[c].name_ == b) { return !0; } } return !1; }; -Entry.VariableContainer.prototype.addVariable = function(a) { - if (!a) { - var b = this.variableAddPanel; - a = b.view.name.value.trim(); - a && 0 !== a.length || (a = Lang.Workspace.variable); - a = this.checkAllVariableName(a, "variables_") ? Entry.getOrderedName(a, this.variables_, "name_") : a; - var c = b.info; - a = {name:a, isCloud:c.isCloud, object:c.object, variableType:"variable"}; - b.view.addClass("entryRemove"); +Entry.VariableContainer.prototype.addVariable = function(b) { + if (!b) { + var a = this.variableAddPanel; + b = a.view.name.value.trim(); + b && 0 !== b.length || (b = Lang.Workspace.variable); + b = this.checkAllVariableName(b, "variables_") ? Entry.getOrderedName(b, this.variables_, "name_") : b; + var c = a.info; + b = {name:b, isCloud:c.isCloud, object:c.object, variableType:"variable"}; + a.view.addClass("entryRemove"); this.resetVariableAddPanel("variable"); } - a = new Entry.Variable(a); - Entry.stateManager && Entry.stateManager.addCommand("add variable", this, this.removeVariable, a); - a.generateView(this.variables_.length); - this.createVariableView(a); - this.variables_.unshift(a); + b = new Entry.Variable(b); + Entry.stateManager && Entry.stateManager.addCommand("add variable", this, this.removeVariable, b); + b.generateView(this.variables_.length); + this.createVariableView(b); + this.variables_.unshift(b); Entry.playground.reloadPlayground(); this.updateList(); - a.listElement.nameField.focus(); - return new Entry.State(this, this.removeVariable, a); -}; -Entry.VariableContainer.prototype.removeVariable = function(a) { - var b = this.variables_.indexOf(a), c = a.toJSON(); - this.selected == a && this.select(null); - a.remove(); - this.variables_.splice(b, 1); + b.listElement.nameField.focus(); + return new Entry.State(this, this.removeVariable, b); +}; +Entry.VariableContainer.prototype.removeVariable = function(b) { + var a = this.variables_.indexOf(b), c = b.toJSON(); + this.selected == b && this.select(null); + b.remove(); + this.variables_.splice(a, 1); Entry.stateManager && Entry.stateManager.addCommand("remove variable", this, this.addVariable, c); Entry.playground.reloadPlayground(); this.updateList(); return new Entry.State(this, this.addVariable, c); }; -Entry.VariableContainer.prototype.changeVariableName = function(a, b) { - a.name_ != b && (Entry.isExist(b, "name_", this.variables_) ? (a.listElement.nameField.value = a.name_, Entry.toast.alert(Lang.Workspace.variable_rename_failed, Lang.Workspace.variable_dup)) : 10 < b.length ? (a.listElement.nameField.value = a.name_, Entry.toast.alert(Lang.Workspace.variable_rename_failed, Lang.Workspace.variable_too_long)) : (a.name_ = b, a.updateView(), Entry.playground.reloadPlayground(), Entry.toast.success(Lang.Workspace.variable_rename, Lang.Workspace.variable_rename_ok))); +Entry.VariableContainer.prototype.changeVariableName = function(b, a) { + b.name_ != a && (Entry.isExist(a, "name_", this.variables_) ? (b.listElement.nameField.value = b.name_, Entry.toast.alert(Lang.Workspace.variable_rename_failed, Lang.Workspace.variable_dup)) : 10 < a.length ? (b.listElement.nameField.value = b.name_, Entry.toast.alert(Lang.Workspace.variable_rename_failed, Lang.Workspace.variable_too_long)) : (b.name_ = a, b.updateView(), Entry.playground.reloadPlayground(), Entry.toast.success(Lang.Workspace.variable_rename, Lang.Workspace.variable_rename_ok))); }; -Entry.VariableContainer.prototype.changeListName = function(a, b) { - a.name_ != b && (Entry.isExist(b, "name_", this.lists_) ? (a.listElement.nameField.value = a.name_, Entry.toast.alert(Lang.Workspace.list_rename_failed, Lang.Workspace.list_dup)) : 10 < b.length ? (a.listElement.nameField.value = a.name_, Entry.toast.alert(Lang.Workspace.list_rename_failed, Lang.Workspace.list_too_long)) : (a.name_ = b, a.updateView(), Entry.playground.reloadPlayground(), Entry.toast.success(Lang.Workspace.list_rename, Lang.Workspace.list_rename_ok))); +Entry.VariableContainer.prototype.changeListName = function(b, a) { + b.name_ != a && (Entry.isExist(a, "name_", this.lists_) ? (b.listElement.nameField.value = b.name_, Entry.toast.alert(Lang.Workspace.list_rename_failed, Lang.Workspace.list_dup)) : 10 < a.length ? (b.listElement.nameField.value = b.name_, Entry.toast.alert(Lang.Workspace.list_rename_failed, Lang.Workspace.list_too_long)) : (b.name_ = a, b.updateView(), Entry.playground.reloadPlayground(), Entry.toast.success(Lang.Workspace.list_rename, Lang.Workspace.list_rename_ok))); }; -Entry.VariableContainer.prototype.removeList = function(a) { - var b = this.lists_.indexOf(a), c = a.toJSON(); +Entry.VariableContainer.prototype.removeList = function(b) { + var a = this.lists_.indexOf(b), c = b.toJSON(); Entry.stateManager && Entry.stateManager.addCommand("remove list", this, this.addList, c); - this.selected == a && this.select(null); - a.remove(); - this.lists_.splice(b, 1); + this.selected == b && this.select(null); + b.remove(); + this.lists_.splice(a, 1); Entry.playground.reloadPlayground(); this.updateList(); return new Entry.State(this, this.addList, c); }; -Entry.VariableContainer.prototype.createVariableView = function(a) { - var b = this, c = Entry.createElement("li"), d = Entry.createElement("div"); +Entry.VariableContainer.prototype.createVariableView = function(b) { + var a = this, c = Entry.createElement("li"), d = Entry.createElement("div"); d.addClass("entryVariableListElementWrapperWorkspace"); c.appendChild(d); c.addClass("entryVariableListElementWorkspace"); - a.object_ ? c.addClass("entryVariableLocalElementWorkspace") : a.isCloud_ ? c.addClass("entryVariableCloudElementWorkspace") : c.addClass("entryVariableGlobalElementWorkspace"); + b.object_ ? c.addClass("entryVariableLocalElementWorkspace") : b.isCloud_ ? c.addClass("entryVariableCloudElementWorkspace") : c.addClass("entryVariableGlobalElementWorkspace"); c.bindOnClick(function(c) { - b.select(a); + a.select(b); }); var e = Entry.createElement("button"); e.addClass("entryVariableListElementDeleteWorkspace"); e.bindOnClick(function(c) { c.stopPropagation(); - b.removeVariable(a); - b.selectedVariable = null; - b.variableSettingView.addClass("entryRemove"); + a.removeVariable(b); + a.selectedVariable = null; + a.variableSettingView.addClass("entryRemove"); }); var f = Entry.createElement("button"); f.addClass("entryVariableListElementEditWorkspace"); @@ -13845,81 +13753,81 @@ Entry.VariableContainer.prototype.createVariableView = function(a) { h.removeAttribute("disabled"); g.removeClass("entryRemove"); this.addClass("entryRemove"); - b.updateSelectedVariable(a); + a.updateSelectedVariable(b); h.focus(); }); c.editButton = f; var g = Entry.createElement("button"); g.addClass("entryVariableListElementEditWorkspace"); g.addClass("entryRemove"); - g.bindOnClick(function(a) { - a.stopPropagation(); + g.bindOnClick(function(b) { + b.stopPropagation(); h.blur(); h.setAttribute("disabled", "disabled"); f.removeClass("entryRemove"); this.addClass("entryRemove"); - b.updateSelectedVariable(null, "variable"); + a.updateSelectedVariable(null, "variable"); }); c.editSaveButton = g; var h = Entry.createElement("input"); h.addClass("entryVariableListElementNameWorkspace"); h.setAttribute("disabled", "disabled"); - h.value = a.name_; - h.bindOnClick(function(b) { - b.stopPropagation(); + h.value = b.name_; + h.bindOnClick(function(a) { + a.stopPropagation(); }); h.onblur = function(c) { - (c = this.value.trim()) && 0 !== c.length ? b.changeVariableName(a, this.value) : (Entry.toast.alert(Lang.Msgs.warn, Lang.Workspace.variable_can_not_space), this.value = a.getName()); + (c = this.value.trim()) && 0 !== c.length ? a.changeVariableName(b, this.value) : (Entry.toast.alert(Lang.Msgs.warn, Lang.Workspace.variable_can_not_space), this.value = b.getName()); }; - h.onkeydown = function(b) { - 13 == b.keyCode && this.blur(); + h.onkeydown = function(a) { + 13 == a.keyCode && this.blur(); }; c.nameField = h; d.appendChild(h); d.appendChild(f); d.appendChild(g); d.appendChild(e); - a.listElement = c; + b.listElement = c; }; -Entry.VariableContainer.prototype.addMessage = function(a) { - a.id || (a.id = Entry.generateHash()); - Entry.stateManager && Entry.stateManager.addCommand("add message", this, this.removeMessage, a); - this.createMessageView(a); - this.messages_.unshift(a); +Entry.VariableContainer.prototype.addMessage = function(b) { + b.id || (b.id = Entry.generateHash()); + Entry.stateManager && Entry.stateManager.addCommand("add message", this, this.removeMessage, b); + this.createMessageView(b); + this.messages_.unshift(b); Entry.playground.reloadPlayground(); this.updateList(); - a.listElement.nameField.focus(); - return new Entry.State(this, this.removeMessage, a); -}; -Entry.VariableContainer.prototype.removeMessage = function(a) { - this.selected == a && this.select(null); - Entry.stateManager && Entry.stateManager.addCommand("remove message", this, this.addMessage, a); - var b = this.messages_.indexOf(a); - this.messages_.splice(b, 1); + b.listElement.nameField.focus(); + return new Entry.State(this, this.removeMessage, b); +}; +Entry.VariableContainer.prototype.removeMessage = function(b) { + this.selected == b && this.select(null); + Entry.stateManager && Entry.stateManager.addCommand("remove message", this, this.addMessage, b); + var a = this.messages_.indexOf(b); + this.messages_.splice(a, 1); this.updateList(); Entry.playground.reloadPlayground(); - return new Entry.State(this, this.addMessage, a); + return new Entry.State(this, this.addMessage, b); }; -Entry.VariableContainer.prototype.changeMessageName = function(a, b) { - a.name != b && (Entry.isExist(b, "name", this.messages_) ? (a.listElement.nameField.value = a.name, Entry.toast.alert(Lang.Workspace.message_rename_failed, Lang.Workspace.message_dup)) : 10 < b.length ? (a.listElement.nameField.value = a.name, Entry.toast.alert(Lang.Workspace.message_rename_failed, Lang.Workspace.message_too_long)) : (a.name = b, Entry.playground.reloadPlayground(), Entry.toast.success(Lang.Workspace.message_rename, Lang.Workspace.message_rename_ok))); +Entry.VariableContainer.prototype.changeMessageName = function(b, a) { + b.name != a && (Entry.isExist(a, "name", this.messages_) ? (b.listElement.nameField.value = b.name, Entry.toast.alert(Lang.Workspace.message_rename_failed, Lang.Workspace.message_dup)) : 10 < a.length ? (b.listElement.nameField.value = b.name, Entry.toast.alert(Lang.Workspace.message_rename_failed, Lang.Workspace.message_too_long)) : (b.name = a, Entry.playground.reloadPlayground(), Entry.toast.success(Lang.Workspace.message_rename, Lang.Workspace.message_rename_ok))); }; -Entry.VariableContainer.prototype.createMessageView = function(a) { - var b = this, c = Entry.createElement("li"); +Entry.VariableContainer.prototype.createMessageView = function(b) { + var a = this, c = Entry.createElement("li"); c.addClass("entryVariableListElementWorkspace"); c.addClass("entryMessageElementWorkspace"); c.bindOnClick(function(c) { - b.select(a); + a.select(b); }); var d = Entry.createElement("button"); d.addClass("entryVariableListElementDeleteWorkspace"); d.bindOnClick(function(c) { c.stopPropagation(); - b.removeMessage(a); + a.removeMessage(b); }); var e = Entry.createElement("button"); e.addClass("entryVariableListElementEditWorkspace"); - e.bindOnClick(function(b) { - b.stopPropagation(); + e.bindOnClick(function(a) { + a.stopPropagation(); g.removeAttribute("disabled"); g.focus(); f.removeClass("entryRemove"); @@ -13928,68 +13836,68 @@ Entry.VariableContainer.prototype.createMessageView = function(a) { var f = Entry.createElement("button"); f.addClass("entryVariableListElementEditWorkspace"); f.addClass("entryRemove"); - f.bindOnClick(function(b) { - b.stopPropagation(); + f.bindOnClick(function(a) { + a.stopPropagation(); g.blur(); e.removeClass("entryRemove"); this.addClass("entryRemove"); }); var g = Entry.createElement("input"); g.addClass("entryVariableListElementNameWorkspace"); - g.value = a.name; - g.bindOnClick(function(b) { - b.stopPropagation(); + g.value = b.name; + g.bindOnClick(function(a) { + a.stopPropagation(); }); g.onblur = function(c) { - (c = this.value.trim()) && 0 !== c.length ? (b.changeMessageName(a, this.value), e.removeClass("entryRemove"), f.addClass("entryRemove"), g.setAttribute("disabled", "disabled")) : (Entry.toast.alert(Lang.Msgs.warn, Lang.Msgs.sign_can_not_space), this.value = a.name); + (c = this.value.trim()) && 0 !== c.length ? (a.changeMessageName(b, this.value), e.removeClass("entryRemove"), f.addClass("entryRemove"), g.setAttribute("disabled", "disabled")) : (Entry.toast.alert(Lang.Msgs.warn, Lang.Msgs.sign_can_not_space), this.value = b.name); }; - g.onkeydown = function(b) { - 13 == b.keyCode && this.blur(); + g.onkeydown = function(a) { + 13 == a.keyCode && this.blur(); }; c.nameField = g; c.appendChild(g); c.appendChild(e); c.appendChild(f); c.appendChild(d); - a.listElement = c; + b.listElement = c; }; -Entry.VariableContainer.prototype.addList = function(a) { - if (!a) { - var b = this.listAddPanel; - a = b.view.name.value.trim(); - a && 0 !== a.length || (a = Lang.Workspace.list); - var c = b.info; - a = this.checkAllVariableName(a, "lists_") ? Entry.getOrderedName(a, this.lists_, "name_") : a; - a = {name:a, isCloud:c.isCloud, object:c.object, variableType:"list"}; - b.view.addClass("entryRemove"); +Entry.VariableContainer.prototype.addList = function(b) { + if (!b) { + var a = this.listAddPanel; + b = a.view.name.value.trim(); + b && 0 !== b.length || (b = Lang.Workspace.list); + var c = a.info; + b = this.checkAllVariableName(b, "lists_") ? Entry.getOrderedName(b, this.lists_, "name_") : b; + b = {name:b, isCloud:c.isCloud, object:c.object, variableType:"list"}; + a.view.addClass("entryRemove"); this.resetVariableAddPanel("list"); } - a = new Entry.Variable(a); - Entry.stateManager && Entry.stateManager.addCommand("add list", this, this.removeList, a); - a.generateView(this.lists_.length); - this.createListView(a); - this.lists_.unshift(a); + b = new Entry.Variable(b); + Entry.stateManager && Entry.stateManager.addCommand("add list", this, this.removeList, b); + b.generateView(this.lists_.length); + this.createListView(b); + this.lists_.unshift(b); Entry.playground.reloadPlayground(); this.updateList(); - a.listElement.nameField.focus(); - return new Entry.State(this, this.removelist, a); + b.listElement.nameField.focus(); + return new Entry.State(this, this.removelist, b); }; -Entry.VariableContainer.prototype.createListView = function(a) { - var b = this, c = Entry.createElement("li"), d = Entry.createElement("div"); +Entry.VariableContainer.prototype.createListView = function(b) { + var a = this, c = Entry.createElement("li"), d = Entry.createElement("div"); d.addClass("entryVariableListElementWrapperWorkspace"); c.appendChild(d); c.addClass("entryVariableListElementWorkspace"); - a.object_ ? c.addClass("entryListLocalElementWorkspace") : a.isCloud_ ? c.addClass("entryListCloudElementWorkspace") : c.addClass("entryListGlobalElementWorkspace"); + b.object_ ? c.addClass("entryListLocalElementWorkspace") : b.isCloud_ ? c.addClass("entryListCloudElementWorkspace") : c.addClass("entryListGlobalElementWorkspace"); c.bindOnClick(function(c) { - b.select(a); + a.select(b); }); var e = Entry.createElement("button"); e.addClass("entryVariableListElementDeleteWorkspace"); e.bindOnClick(function(c) { c.stopPropagation(); - b.removeList(a); - b.selectedList = null; - b.listSettingView.addClass("entryRemove"); + a.removeList(b); + a.selectedList = null; + a.listSettingView.addClass("entryRemove"); }); var f = Entry.createElement("button"); f.addClass("entryVariableListElementEditWorkspace"); @@ -13998,7 +13906,7 @@ Entry.VariableContainer.prototype.createListView = function(a) { h.removeAttribute("disabled"); g.removeClass("entryRemove"); this.addClass("entryRemove"); - b.updateSelectedVariable(a); + a.updateSelectedVariable(b); h.focus(); }); c.editButton = f; @@ -14011,100 +13919,100 @@ Entry.VariableContainer.prototype.createListView = function(a) { h.setAttribute("disabled", "disabled"); f.removeClass("entryRemove"); this.addClass("entryRemove"); - b.select(a); - b.updateSelectedVariable(null, "list"); + a.select(b); + a.updateSelectedVariable(null, "list"); }); c.editSaveButton = g; var h = Entry.createElement("input"); h.setAttribute("disabled", "disabled"); h.addClass("entryVariableListElementNameWorkspace"); - h.value = a.name_; - h.bindOnClick(function(b) { - b.stopPropagation(); + h.value = b.name_; + h.bindOnClick(function(a) { + a.stopPropagation(); }); h.onblur = function(c) { - (c = this.value.trim()) && 0 !== c.length ? b.changeListName(a, this.value) : (Entry.toast.alert(Lang.Msgs.warn, Lang.Msgs.list_can_not_space), this.value = a.getName()); + (c = this.value.trim()) && 0 !== c.length ? a.changeListName(b, this.value) : (Entry.toast.alert(Lang.Msgs.warn, Lang.Msgs.list_can_not_space), this.value = b.getName()); }; - h.onkeydown = function(b) { - 13 == b.keyCode && this.blur(); + h.onkeydown = function(a) { + 13 == a.keyCode && this.blur(); }; c.nameField = h; d.appendChild(h); d.appendChild(f); d.appendChild(g); d.appendChild(e); - a.listElement = c; + b.listElement = c; }; -Entry.VariableContainer.prototype.mapVariable = function(a, b) { +Entry.VariableContainer.prototype.mapVariable = function(b, a) { for (var c = this.variables_.length, d = 0;d < c;d++) { - a(this.variables_[d], b); + b(this.variables_[d], a); } }; -Entry.VariableContainer.prototype.mapList = function(a, b) { +Entry.VariableContainer.prototype.mapList = function(b, a) { for (var c = this.lists_.length, d = 0;d < c;d++) { - a(this.lists_[d], b); + b(this.lists_[d], a); } }; Entry.VariableContainer.prototype.getVariableJSON = function() { - for (var a = [], b = 0;b < this.variables_.length;b++) { - a.push(this.variables_[b].toJSON()); + for (var b = [], a = 0;a < this.variables_.length;a++) { + b.push(this.variables_[a].toJSON()); } - for (b = 0;b < this.lists_.length;b++) { - a.push(this.lists_[b].toJSON()); + for (a = 0;a < this.lists_.length;a++) { + b.push(this.lists_[a].toJSON()); } - Entry.engine.projectTimer && a.push(Entry.engine.projectTimer); - b = Entry.container.inputValue; - Entry.isEmpty(b) || a.push(b); - return a; + Entry.engine.projectTimer && b.push(Entry.engine.projectTimer); + a = Entry.container.inputValue; + Entry.isEmpty(a) || b.push(a); + return b; }; Entry.VariableContainer.prototype.getMessageJSON = function() { - for (var a = [], b = 0;b < this.messages_.length;b++) { - a.push({id:this.messages_[b].id, name:this.messages_[b].name}); + for (var b = [], a = 0;a < this.messages_.length;a++) { + b.push({id:this.messages_[a].id, name:this.messages_[a].name}); } - return a; + return b; }; Entry.VariableContainer.prototype.getFunctionJSON = function() { - var a = [], b; - for (b in this.functions_) { - var c = this.functions_[b], c = {id:c.id, block:Blockly.Xml.domToText(c.block), content:Blockly.Xml.domToText(c.content)}; - a.push(c); + var b = [], a; + for (a in this.functions_) { + var c = this.functions_[a], c = {id:c.id, content:JSON.stringify(c.content.toJSON())}; + b.push(c); } - return a; + return b; }; -Entry.VariableContainer.prototype.resetVariableAddPanel = function(a) { - a = a || "variable"; - var b = "variable" == a ? this.variableAddPanel : this.listAddPanel, c = b.info; +Entry.VariableContainer.prototype.resetVariableAddPanel = function(b) { + b = b || "variable"; + var a = "variable" == b ? this.variableAddPanel : this.listAddPanel, c = a.info; c.isCloud = !1; c.object = null; - b.view.name.value = ""; - b.isOpen = !1; - this.updateVariableAddView(a); + a.view.name.value = ""; + a.isOpen = !1; + this.updateVariableAddView(b); }; Entry.VariableContainer.prototype.generateVariableAddView = function() { - var a = this, b = Entry.createElement("li"); - this.variableAddPanel.view = b; + var b = this, a = Entry.createElement("li"); + this.variableAddPanel.view = a; this.variableAddPanel.isOpen = !1; - b.addClass("entryVariableAddSpaceWorkspace"); - b.addClass("entryRemove"); + a.addClass("entryVariableAddSpaceWorkspace"); + a.addClass("entryRemove"); var c = Entry.createElement("div"); c.addClass("entryVariableAddSpaceNameWrapperWorkspace"); - b.appendChild(c); + a.appendChild(c); var d = Entry.createElement("input"); d.addClass("entryVariableAddSpaceInputWorkspace"); d.setAttribute("placeholder", Lang.Workspace.Variable_placeholder_name); d.variableContainer = this; - d.onkeypress = function(b) { - 13 == b.keyCode && (Entry.variableContainer.addVariable(), a.updateSelectedVariable(a.variables_[0]), b = a.variables_[0].listElement, b.editButton.addClass("entryRemove"), b.editSaveButton.removeClass("entryRemove"), b.nameField.removeAttribute("disabled"), b.nameField.focus()); + d.onkeypress = function(a) { + 13 == a.keyCode && (Entry.variableContainer.addVariable(), b.updateSelectedVariable(b.variables_[0]), a = b.variables_[0].listElement, a.editButton.addClass("entryRemove"), a.editSaveButton.removeClass("entryRemove"), a.nameField.removeAttribute("disabled"), a.nameField.focus()); }; this.variableAddPanel.view.name = d; c.appendChild(d); c = Entry.createElement("div"); c.addClass("entryVariableAddSpaceGlobalWrapperWorkspace"); - c.bindOnClick(function(b) { - a.variableAddPanel.info.object = null; - a.updateVariableAddView("variable"); + c.bindOnClick(function(a) { + b.variableAddPanel.info.object = null; + b.updateVariableAddView("variable"); }); - b.appendChild(c); + a.appendChild(c); d = Entry.createElement("span"); d.innerHTML = Lang.Workspace.Variable_use_all_objects; c.appendChild(d); @@ -14115,10 +14023,10 @@ Entry.VariableContainer.prototype.generateVariableAddView = function() { c.appendChild(d); c = Entry.createElement("div"); c.addClass("entryVariableAddSpaceLocalWrapperWorkspace"); - c.bindOnClick(function(b) { - Entry.playground.object && (b = a.variableAddPanel.info, b.object = Entry.playground.object.id, b.isCloud = !1, a.updateVariableAddView("variable")); + c.bindOnClick(function(a) { + Entry.playground.object && (a = b.variableAddPanel.info, a.object = Entry.playground.object.id, a.isCloud = !1, b.updateVariableAddView("variable")); }); - b.appendChild(c); + a.appendChild(c); d = Entry.createElement("span"); d.innerHTML = Lang.Workspace.Variable_use_this_object; c.appendChild(d); @@ -14128,13 +14036,13 @@ Entry.VariableContainer.prototype.generateVariableAddView = function() { this.variableAddPanel.info.object && d.addClass("entryVariableAddChecked"); c.appendChild(d); c = Entry.createElement("div"); - b.cloudWrapper = c; + a.cloudWrapper = c; c.addClass("entryVariableAddSpaceCloudWrapperWorkspace"); - c.bindOnClick(function(b) { - b = a.variableAddPanel.info; - b.object || (b.isCloud = !b.isCloud, a.updateVariableAddView("variable")); + c.bindOnClick(function(a) { + a = b.variableAddPanel.info; + a.object || (a.isCloud = !a.isCloud, b.updateVariableAddView("variable")); }); - b.appendChild(c); + a.appendChild(c); d = Entry.createElement("span"); d.addClass("entryVariableAddSpaceCloudSpanWorkspace"); d.innerHTML = Lang.Workspace.Variable_create_cloud; @@ -14147,58 +14055,58 @@ Entry.VariableContainer.prototype.generateVariableAddView = function() { c.appendChild(d); c = Entry.createElement("div"); c.addClass("entryVariableAddSpaceButtonWrapperWorkspace"); - b.appendChild(c); - b = Entry.createElement("span"); - b.addClass("entryVariableAddSpaceCancelWorkspace"); - b.addClass("entryVariableAddSpaceButtonWorkspace"); - b.innerHTML = Lang.Buttons.cancel; - b.bindOnClick(function(b) { - a.variableAddPanel.view.addClass("entryRemove"); - a.resetVariableAddPanel("variable"); + a.appendChild(c); + a = Entry.createElement("span"); + a.addClass("entryVariableAddSpaceCancelWorkspace"); + a.addClass("entryVariableAddSpaceButtonWorkspace"); + a.innerHTML = Lang.Buttons.cancel; + a.bindOnClick(function(a) { + b.variableAddPanel.view.addClass("entryRemove"); + b.resetVariableAddPanel("variable"); }); - c.appendChild(b); - b = Entry.createElement("span"); - b.addClass("entryVariableAddSpaceConfirmWorkspace"); - b.addClass("entryVariableAddSpaceButtonWorkspace"); - b.innerHTML = Lang.Buttons.save; - b.variableContainer = this; - b.bindOnClick(function(b) { + c.appendChild(a); + a = Entry.createElement("span"); + a.addClass("entryVariableAddSpaceConfirmWorkspace"); + a.addClass("entryVariableAddSpaceButtonWorkspace"); + a.innerHTML = Lang.Buttons.save; + a.variableContainer = this; + a.bindOnClick(function(a) { Entry.variableContainer.addVariable(); - a.updateSelectedVariable(a.variables_[0]); - b = a.variables_[0].listElement; - b.editButton.addClass("entryRemove"); - b.editSaveButton.removeClass("entryRemove"); - b.nameField.removeAttribute("disabled"); - b.nameField.focus(); + b.updateSelectedVariable(b.variables_[0]); + a = b.variables_[0].listElement; + a.editButton.addClass("entryRemove"); + a.editSaveButton.removeClass("entryRemove"); + a.nameField.removeAttribute("disabled"); + a.nameField.focus(); }); - c.appendChild(b); + c.appendChild(a); }; Entry.VariableContainer.prototype.generateListAddView = function() { - var a = this, b = Entry.createElement("li"); - this.listAddPanel.view = b; + var b = this, a = Entry.createElement("li"); + this.listAddPanel.view = a; this.listAddPanel.isOpen = !1; - b.addClass("entryVariableAddSpaceWorkspace"); - b.addClass("entryRemove"); + a.addClass("entryVariableAddSpaceWorkspace"); + a.addClass("entryRemove"); var c = Entry.createElement("div"); c.addClass("entryVariableAddSpaceNameWrapperWorkspace"); c.addClass("entryListAddSpaceNameWrapperWorkspace"); - b.appendChild(c); + a.appendChild(c); var d = Entry.createElement("input"); d.addClass("entryVariableAddSpaceInputWorkspace"); d.setAttribute("placeholder", Lang.Workspace.list_name); this.listAddPanel.view.name = d; d.variableContainer = this; - d.onkeypress = function(b) { - 13 == b.keyCode && (a.addList(), b = a.lists_[0], a.updateSelectedVariable(b), b = b.listElement, b.editButton.addClass("entryRemove"), b.editSaveButton.removeClass("entryRemove"), b.nameField.removeAttribute("disabled"), b.nameField.focus()); + d.onkeypress = function(a) { + 13 == a.keyCode && (b.addList(), a = b.lists_[0], b.updateSelectedVariable(a), a = a.listElement, a.editButton.addClass("entryRemove"), a.editSaveButton.removeClass("entryRemove"), a.nameField.removeAttribute("disabled"), a.nameField.focus()); }; c.appendChild(d); c = Entry.createElement("div"); c.addClass("entryVariableAddSpaceGlobalWrapperWorkspace"); - c.bindOnClick(function(b) { - a.listAddPanel.info.object = null; - a.updateVariableAddView("list"); + c.bindOnClick(function(a) { + b.listAddPanel.info.object = null; + b.updateVariableAddView("list"); }); - b.appendChild(c); + a.appendChild(c); d = Entry.createElement("span"); d.innerHTML = Lang.Workspace.use_all_objects; c.appendChild(d); @@ -14209,10 +14117,10 @@ Entry.VariableContainer.prototype.generateListAddView = function() { c.appendChild(d); c = Entry.createElement("div"); c.addClass("entryVariableAddSpaceLocalWrapperWorkspace"); - c.bindOnClick(function(b) { - Entry.playground.object && (b = a.listAddPanel.info, b.object = Entry.playground.object.id, b.isCloud = !1, a.updateVariableAddView("list")); + c.bindOnClick(function(a) { + Entry.playground.object && (a = b.listAddPanel.info, a.object = Entry.playground.object.id, a.isCloud = !1, b.updateVariableAddView("list")); }); - b.appendChild(c); + a.appendChild(c); d = Entry.createElement("span"); d.innerHTML = Lang.Workspace.Variable_use_this_object; c.appendChild(d); @@ -14222,13 +14130,13 @@ Entry.VariableContainer.prototype.generateListAddView = function() { this.variableAddPanel.info.object && addVariableLocalCheck.addClass("entryVariableAddChecked"); c.appendChild(d); c = Entry.createElement("div"); - b.cloudWrapper = c; + a.cloudWrapper = c; c.addClass("entryVariableAddSpaceCloudWrapperWorkspace"); - c.bindOnClick(function(b) { - b = a.listAddPanel.info; - b.object || (b.isCloud = !b.isCloud, a.updateVariableAddView("list")); + c.bindOnClick(function(a) { + a = b.listAddPanel.info; + a.object || (a.isCloud = !a.isCloud, b.updateVariableAddView("list")); }); - b.appendChild(c); + a.appendChild(c); d = Entry.createElement("span"); d.addClass("entryVariableAddSpaceCloudSpanWorkspace"); d.innerHTML = Lang.Workspace.List_create_cloud; @@ -14241,2359 +14149,5928 @@ Entry.VariableContainer.prototype.generateListAddView = function() { c.appendChild(d); c = Entry.createElement("div"); c.addClass("entryVariableAddSpaceButtonWrapperWorkspace"); - b.appendChild(c); - b = Entry.createElement("span"); - b.addClass("entryVariableAddSpaceCancelWorkspace"); - b.addClass("entryVariableAddSpaceButtonWorkspace"); - b.innerHTML = Lang.Buttons.cancel; - b.bindOnClick(function(b) { - a.listAddPanel.view.addClass("entryRemove"); - a.resetVariableAddPanel("list"); + a.appendChild(c); + a = Entry.createElement("span"); + a.addClass("entryVariableAddSpaceCancelWorkspace"); + a.addClass("entryVariableAddSpaceButtonWorkspace"); + a.innerHTML = Lang.Buttons.cancel; + a.bindOnClick(function(a) { + b.listAddPanel.view.addClass("entryRemove"); + b.resetVariableAddPanel("list"); }); - c.appendChild(b); - b = Entry.createElement("span"); - b.addClass("entryVariableAddSpaceConfirmWorkspace"); - b.addClass("entryVariableAddSpaceButtonWorkspace"); - b.innerHTML = Lang.Buttons.save; - b.variableContainer = this; - b.bindOnClick(function(b) { - a.addList(); - b = a.lists_[0]; - a.updateSelectedVariable(b); - b = b.listElement; - b.editButton.addClass("entryRemove"); - b.editSaveButton.removeClass("entryRemove"); - b.nameField.removeAttribute("disabled"); - b.nameField.focus(); + c.appendChild(a); + a = Entry.createElement("span"); + a.addClass("entryVariableAddSpaceConfirmWorkspace"); + a.addClass("entryVariableAddSpaceButtonWorkspace"); + a.innerHTML = Lang.Buttons.save; + a.variableContainer = this; + a.bindOnClick(function(a) { + b.addList(); + a = b.lists_[0]; + b.updateSelectedVariable(a); + a = a.listElement; + a.editButton.addClass("entryRemove"); + a.editSaveButton.removeClass("entryRemove"); + a.nameField.removeAttribute("disabled"); + a.nameField.focus(); }); - c.appendChild(b); + c.appendChild(a); }; Entry.VariableContainer.prototype.generateVariableSplitterView = function() { - var a = Entry.createElement("li"); - a.addClass("entryVariableSplitterWorkspace"); var b = Entry.createElement("li"); b.addClass("entryVariableSplitterWorkspace"); - this.variableSplitters = {top:a, bottom:b}; + var a = Entry.createElement("li"); + a.addClass("entryVariableSplitterWorkspace"); + this.variableSplitters = {top:b, bottom:a}; }; -Entry.VariableContainer.prototype.openVariableAddPanel = function(a) { - a = a ? a : "variable"; +Entry.VariableContainer.prototype.openVariableAddPanel = function(b) { + b = b ? b : "variable"; Entry.playground.toggleOnVariableView(); Entry.playground.changeViewMode("variable"); - "variable" == a ? this.variableAddPanel.isOpen = !0 : this.listAddPanel.isOpen = !0; - this.selectFilter(a); - this.updateVariableAddView(a); + "variable" == b ? this.variableAddPanel.isOpen = !0 : this.listAddPanel.isOpen = !0; + this.selectFilter(b); + this.updateVariableAddView(b); }; -Entry.VariableContainer.prototype.getMenuXml = function(a) { - for (var b = [], c = 0 !== this.variables_.length, d = 0 !== this.lists_.length, e, f = 0, g;g = a[f];f++) { +Entry.VariableContainer.prototype.getMenuXml = function(b) { + for (var a = [], c = 0 !== this.variables_.length, d = 0 !== this.lists_.length, e, f = 0, g;g = b[f];f++) { var h = g.tagName; - h && "BLOCK" == h.toUpperCase() ? (e = g.getAttribute("bCategory"), !c && "variable" == e || !d && "list" == e || b.push(g)) : !h || "SPLITTER" != h.toUpperCase() && "BTN" != h.toUpperCase() || !c && "variable" == e || (d || "list" != e) && b.push(g); + h && "BLOCK" == h.toUpperCase() ? (e = g.getAttribute("bCategory"), !c && "variable" == e || !d && "list" == e || a.push(g)) : !h || "SPLITTER" != h.toUpperCase() && "BTN" != h.toUpperCase() || !c && "variable" == e || (d || "list" != e) && a.push(g); } - return b; + return a; }; -Entry.VariableContainer.prototype.addCloneLocalVariables = function(a) { - var b = [], c = this; - this.mapVariable(function(a, c) { - if (a.object_ && a.object_ == c.objectId) { - var f = a.toJSON(); +Entry.VariableContainer.prototype.addCloneLocalVariables = function(b) { + var a = [], c = this; + this.mapVariable(function(b, c) { + if (b.object_ && b.object_ == c.objectId) { + var f = b.toJSON(); f.originId = f.id; f.id = Entry.generateHash(); f.object = c.newObjectId; delete f.x; delete f.y; - b.push(f); + a.push(f); c.json.script = c.json.script.replace(new RegExp(f.originId, "g"), f.id); } - }, a); - b.map(function(b) { - c.addVariable(b); - }); -}; -Entry.VariableContainer.prototype.generateTimer = function(a) { - a || (a = {}, a.id = Entry.generateHash(), a.name = Lang.Workspace.Variable_Timer, a.value = 0, a.variableType = "timer", a.visible = !1, a.x = 150, a.y = -70, a = new Entry.Variable(a)); - a.generateView(); - a.tick = null; - Entry.engine.projectTimer = a; - Entry.addEventListener("stop", function() { - Entry.engine.stopProjectTimer(); - }); + }, b); + a.map(function(a) { + c.addVariable(a); + }); +}; +Entry.VariableContainer.prototype.generateTimer = function(b) { + b || (b = {}, b.id = Entry.generateHash(), b.name = Lang.Workspace.Variable_Timer, b.value = 0, b.variableType = "timer", b.visible = !1, b.x = 150, b.y = -70, b = new Entry.Variable(b)); + b.generateView(); + b.tick = null; + Entry.engine.projectTimer = b; + Entry.addEventListener("stop", function() { + Entry.engine.stopProjectTimer(); + }); +}; +Entry.VariableContainer.prototype.generateAnswer = function(b) { + b || (b = new Entry.Variable({id:Entry.generateHash(), name:Lang.Blocks.VARIABLE_get_canvas_input_value, value:0, variableType:"answer", visible:!1, x:150, y:-100})); + b.generateView(); + Entry.container.inputValue = b; +}; +Entry.VariableContainer.prototype.generateVariableSettingView = function() { + var b = this, a = Entry.createElement("div"); + a.bindOnClick(function(a) { + a.stopPropagation(); + }); + this.variableSettingView = a; + a.addClass("entryVariableSettingWorkspace"); + this.listView_.appendChild(a); + a.addClass("entryRemove"); + var c = Entry.createElement("div"); + c.addClass("entryVariableSettingVisibleWrapperWorkspace"); + c.bindOnClick(function(a) { + a = b.selectedVariable; + var c = b.variableSettingView.visibleCheck; + a.setVisible(!a.isVisible()); + a.isVisible() ? c.addClass("entryVariableSettingChecked") : c.removeClass("entryVariableSettingChecked"); + }); + a.appendChild(c); + var d = Entry.createElement("span"); + d.innerHTML = Lang.Workspace.show_variable; + c.appendChild(d); + d = Entry.createElement("span"); + d.addClass("entryVariableSettingCheckWorkspace"); + a.visibleCheck = d; + c.appendChild(d); + c = Entry.createElement("div"); + c.addClass("entryVariableSettingInitValueWrapperWorkspace"); + a.appendChild(c); + d = Entry.createElement("span"); + d.innerHTML = Lang.Workspace.default_value; + c.appendChild(d); + d = Entry.createElement("input"); + d.addClass("entryVariableSettingInitValueInputWorkspace"); + a.initValueInput = d; + d.value = 0; + d.onkeyup = function(a) { + b.selectedVariable.setValue(this.value); + }; + d.onblur = function(a) { + b.selectedVariable.setValue(this.value); + }; + a.initValueInput = d; + c.appendChild(d); + c = Entry.createElement("div"); + c.addClass("entryVariableSettingSplitterWorkspace"); + a.appendChild(c); + c = Entry.createElement("div"); + c.addClass("entryVariableSettingSlideWrapperWorkspace"); + a.appendChild(c); + d = Entry.createElement("span"); + d.innerHTML = Lang.Workspace.slide; + c.appendChild(d); + d = Entry.createElement("span"); + d.addClass("entryVariableSettingCheckWorkspace"); + a.slideCheck = d; + c.appendChild(d); + c.bindOnClick(function(a) { + var c; + a = b.selectedVariable; + var d = b.variables_, f = a.getType(); + "variable" == f ? (c = a.toJSON(), c.variableType = "slide", c = new Entry.Variable(c), d.splice(d.indexOf(a), 0, c), 0 > c.getValue() && c.setValue(0), 100 < c.getValue() && c.setValue(100), e.removeAttribute("disabled"), g.removeAttribute("disabled")) : "slide" == f && (c = a.toJSON(), c.variableType = "variable", c = new Entry.Variable(c), d.splice(d.indexOf(a), 0, c), e.setAttribute("disabled", "disabled"), g.setAttribute("disabled", "disabled")); + b.createVariableView(c); + b.removeVariable(a); + b.updateSelectedVariable(c); + c.generateView(); + }); + c = Entry.createElement("div"); + a.minMaxWrapper = c; + c.addClass("entryVariableSettingMinMaxWrapperWorkspace"); + a.appendChild(c); + d = Entry.createElement("span"); + d.innerHTML = Lang.Workspace.min_value; + c.appendChild(d); + var e = Entry.createElement("input"); + e.addClass("entryVariableSettingMinValueInputWorkspace"); + d = b.selectedVariable; + e.value = d && "slide" == d.type ? d.minValue_ : 0; + e.onblur = function(a) { + isNaN(this.value) || (a = b.selectedVariable, a.setMinValue(this.value), b.updateVariableSettingView(a)); + }; + a.minValueInput = e; + c.appendChild(e); + var f = Entry.createElement("span"); + f.addClass("entryVariableSettingMaxValueSpanWorkspace"); + f.innerHTML = Lang.Workspace.max_value; + c.appendChild(f); + var g = Entry.createElement("input"); + g.addClass("entryVariableSettingMaxValueInputWorkspace"); + g.value = d && "slide" == d.type ? d.maxValue_ : 100; + g.onblur = function(a) { + isNaN(this.value) || (a = b.selectedVariable, a.setMaxValue(this.value), b.updateVariableSettingView(a)); + }; + a.maxValueInput = g; + c.appendChild(g); +}; +Entry.VariableContainer.prototype.updateVariableSettingView = function(b) { + var a = this.variableSettingView, c = a.visibleCheck, d = a.initValueInput, e = a.slideCheck, f = a.minValueInput, g = a.maxValueInput, h = a.minMaxWrapper; + c.removeClass("entryVariableSettingChecked"); + b.isVisible() && c.addClass("entryVariableSettingChecked"); + e.removeClass("entryVariableSettingChecked"); + "slide" == b.getType() ? (e.addClass("entryVariableSettingChecked"), f.removeAttribute("disabled"), g.removeAttribute("disabled"), f.value = b.getMinValue(), g.value = b.getMaxValue(), h.removeClass("entryVariableMinMaxDisabledWorkspace")) : (h.addClass("entryVariableMinMaxDisabledWorkspace"), f.setAttribute("disabled", "disabled"), g.setAttribute("disabled", "disabled")); + d.value = b.getValue(); + b.listElement.appendChild(a); + a.removeClass("entryRemove"); +}; +Entry.VariableContainer.prototype.generateListSettingView = function() { + var b = this, a = Entry.createElement("div"); + a.bindOnClick(function(a) { + a.stopPropagation(); + }); + this.listSettingView = a; + a.addClass("entryListSettingWorkspace"); + this.listView_.appendChild(a); + a.addClass("entryRemove"); + var c = Entry.createElement("div"); + c.addClass("entryListSettingVisibleWrapperWorkspace"); + c.bindOnClick(function(a) { + a = b.selectedList; + var c = b.listSettingView.visibleCheck; + a.setVisible(!a.isVisible()); + a.isVisible() ? c.addClass("entryListSettingCheckedWorkspace") : c.removeClass("entryListSettingCheckedWorkspace"); + }); + a.appendChild(c); + var d = Entry.createElement("span"); + d.innerHTML = Lang.Workspace.show_list_workspace; + c.appendChild(d); + d = Entry.createElement("span"); + d.addClass("entryListSettingCheckWorkspace"); + a.visibleCheck = d; + c.appendChild(d); + d = Entry.createElement("div"); + d.addClass("entryListSettingLengthWrapperWorkspace"); + c = Entry.createElement("span"); + c.addClass("entryListSettingLengthSpanWorkspace"); + c.innerHTML = Lang.Workspace.number_of_list; + d.appendChild(c); + a.appendChild(d); + c = Entry.createElement("div"); + c.addClass("entryListSettingLengthControllerWorkspace"); + d.appendChild(c); + d = Entry.createElement("span"); + d.addClass("entryListSettingMinusWorkspace"); + d.bindOnClick(function(a) { + b.selectedList.array_.pop(); + b.updateListSettingView(b.selectedList); + }); + c.appendChild(d); + d = Entry.createElement("input"); + d.addClass("entryListSettingLengthInputWorkspace"); + d.onblur = function() { + b.setListLength(this.value); + }; + d.onkeypress = function(a) { + 13 == a.keyCode && this.blur(); + }; + a.lengthInput = d; + c.appendChild(d); + d = Entry.createElement("span"); + d.addClass("entryListSettingPlusWorkspace"); + d.bindOnClick(function(a) { + b.selectedList.array_.push({data:0}); + b.updateListSettingView(b.selectedList); + }); + c.appendChild(d); + c = Entry.createElement("div"); + a.seperator = c; + a.appendChild(c); + c.addClass("entryListSettingSeperatorWorkspace"); + c = Entry.createElement("div"); + c.addClass("entryListSettingListValuesWorkspace"); + a.listValues = c; + a.appendChild(c); +}; +Entry.VariableContainer.prototype.updateListSettingView = function(b) { + var a = this; + b = b || this.selectedList; + var c = this.listSettingView, d = c.listValues, e = c.visibleCheck, f = c.lengthInput, g = c.seperator; + e.removeClass("entryListSettingCheckedWorkspace"); + b.isVisible() && e.addClass("entryListSettingCheckedWorkspace"); + f.value = b.array_.length; + for (b.listElement.appendChild(c);d.firstChild;) { + d.removeChild(d.firstChild); + } + var h = b.array_; + 0 === h.length ? g.addClass("entryRemove") : g.removeClass("entryRemove"); + for (e = 0;e < h.length;e++) { + (function(c) { + var e = Entry.createElement("div"); + e.addClass("entryListSettingValueWrapperWorkspace"); + var f = Entry.createElement("span"); + f.addClass("entryListSettingValueNumberSpanWorkspace"); + f.innerHTML = c + 1; + e.appendChild(f); + f = Entry.createElement("input"); + f.value = h[c].data; + f.onblur = function() { + h[c].data = this.value; + b.updateView(); + }; + f.onkeypress = function(a) { + 13 == a.keyCode && this.blur(); + }; + f.addClass("entryListSettingEachInputWorkspace"); + e.appendChild(f); + f = Entry.createElement("span"); + f.bindOnClick(function() { + h.splice(c, 1); + a.updateListSettingView(); + }); + f.addClass("entryListSettingValueRemoveWorkspace"); + e.appendChild(f); + d.appendChild(e); + })(e); + } + b.updateView(); + c.removeClass("entryRemove"); +}; +Entry.VariableContainer.prototype.setListLength = function(b) { + b = Number(b); + var a = this.selectedList.array_; + if (!isNaN(b)) { + var c = a.length; + if (c < b) { + for (b -= c, c = 0;c < b;c++) { + a.push({data:0}); + } + } else { + c > b && (a.length = b); + } + } + this.updateListSettingView(); +}; +Entry.VariableContainer.prototype.updateViews = function() { + var b = this.lists_; + this.variables_.map(function(a) { + a.updateView(); + }); + b.map(function(a) { + a.updateView(); + }); +}; +Entry.VariableContainer.prototype.updateSelectedVariable = function(b, a) { + b ? "variable" == b.type ? (this.selectedVariable = b, this.updateVariableSettingView(b)) : "slide" == b.type ? (this.selectedVariable = b, this.updateVariableSettingView(b)) : "list" == b.type && (this.selectedList = b, this.updateListSettingView(b)) : (this.selectedVariable = null, "variable" == (a || "variable") ? this.variableSettingView.addClass("entryRemove") : this.listSettingView.addClass("entryRemove")); +}; +Entry.VariableContainer.prototype.removeLocalVariables = function(b) { + var a = [], c = this; + this.mapVariable(function(b, c) { + b.object_ && b.object_ == c && a.push(b); + }, b); + a.map(function(a) { + c.removeVariable(a); + }); +}; +Entry.VariableContainer.prototype.updateCloudVariables = function() { + var b = Entry.projectId; + if (Entry.cloudSavable && b) { + var a = Entry.variableContainer, b = a.variables_.filter(function(a) { + return a.isCloud_; + }), b = b.map(function(a) { + return a.toJSON(); + }), a = a.lists_.filter(function(a) { + return a.isCloud_; + }), a = a.map(function(a) { + return a.toJSON(); + }); + $.ajax({url:"/api/project/variable/" + Entry.projectId, type:"PUT", data:{variables:b, lists:a}}).done(function() { + }); + } +}; +Entry.VariableContainer.prototype.addRef = function(b, a) { + if (this.view_ && Entry.playground.mainWorkspace.getMode() === Entry.Workspace.MODE_BOARD) { + var c = {object:a.getCode().object, block:a}; + a.funcBlock && (c.funcBlock = a.funcBlock, delete a.funcBlock); + this[b].push(c); + if ("_functionRefs" == b) { + for (var d = a.type.substr(5), e = Entry.variableContainer.functions_[d].content.getBlockList(), f = 0;f < e.length;f++) { + a = e[f]; + var g = a.events; + -1 < a.type.indexOf("func_") && a.type.substr(5) == d || (g && g.viewAdd && g.viewAdd.forEach(function(b) { + a.getCode().object = c.object; + b && (a.funcBlock = c.block, b(a)); + }), g && g.dataAdd && g.dataAdd.forEach(function(b) { + a.getCode().object = c.object; + b && (a.funcBlock = c.block, b(a)); + })); + } + } + return c; + } +}; +Entry.VariableContainer.prototype.removeRef = function(b, a) { + if (Entry.playground.mainWorkspace.getMode() === Entry.Workspace.MODE_BOARD) { + for (var c = this[b], d = 0;d < c.length;d++) { + if (c[d].block == a) { + c.splice(d, 1); + break; + } + } + if ("_functionRefs" == b) { + for (var c = a.type.substr(5), e = Entry.variableContainer.functions_[c].content.getBlockList(), d = 0;d < e.length;d++) { + a = e[d]; + var f = a.events; + -1 < a.type.indexOf("func_") && a.type.substr(5) == c || (f && f.viewDestroy && f.viewDestroy.forEach(function(b) { + b && b(a); + }), f && f.dataDestroy && f.dataDestroy.forEach(function(b) { + b && b(a); + })); + } + } + } +}; +Entry.VariableContainer.prototype._getBlockMenu = function() { + return Entry.playground.mainWorkspace.getBlockMenu(); +}; +Entry.block.run = {skeleton:"basic", color:"#3BBD70", contents:["this is", "basic block"], func:function() { +}}; +Entry.block.mutant = {skeleton:"basic", event:"start", color:"#3BBD70", template:"test mutant block", params:[], func:function() { +}, changeEvent:new Entry.Event}; +Entry.block.jr_start = {skeleton:"pebble_event", event:"start", color:"#3BBD70", template:"%1", params:[{type:"Indicator", img:"/img/assets/ntry/bitmap/jr/block_play_image.png", highlightColor:"#3BBD70", position:{x:0, y:0}, size:22}], func:function() { + var b = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), a; + for (a in b) { + this._unit = b[a]; + } + Ntry.unitComp = Ntry.entityManager.getComponent(this._unit.id, Ntry.STATIC.UNIT); +}}; +Entry.block.jr_repeat = {skeleton:"pebble_loop", color:"#127CDB", template:"%1 \ubc18\ubcf5", params:[{type:"Text", text:Lang.Menus.repeat_0}, {type:"Dropdown", options:[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]], value:3, fontSize:14, roundValue:3}, {type:"Text", text:Lang.Menus.repeat_1}], statements:[], func:function() { + if (void 0 === this.repeatCount) { + return this.repeatCount = this.block.params[0], Entry.STATIC.CONTINUE; + } + if (0 < this.repeatCount) { + this.repeatCount--; + var b = this.block.statements[0]; + if (0 !== b.getBlocks().length) { + return this.executor.stepInto(b), Entry.STATIC.CONTINUE; + } + } else { + delete this.repeatCount; + } +}}; +Entry.block.jr_item = {skeleton:"pebble_basic", color:"#F46C6C", template:"\uaf43 \ubaa8\uc73c\uae30 %1", params:[{type:"Indicator", img:"/img/assets/ntry/bitmap/jr/block_item_image.png", highlightColor:"#FFF", position:{x:83, y:0}, size:22}], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = this; + Ntry.dispatchEvent("unitAction", Ntry.STATIC.GET_ITEM, function() { + Ntry.dispatchEvent("getItem"); + b.isAction = !1; + }); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.cparty_jr_item = {skeleton:"pebble_basic", color:"#8ABC1D", template:"%1 %2", params:[{type:"Text", text:Lang.Menus.pick_up_pencil}, {type:"Indicator", img:"/img/assets/ntry/bitmap/cpartyjr/pen.png", highlightColor:"#FFF", position:{x:83, y:0}, size:22}], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = this; + Ntry.dispatchEvent("unitAction", Ntry.STATIC.GET_ITEM, function() { + Ntry.dispatchEvent("getItem"); + b.isAction = !1; + }); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.jr_north = {skeleton:"pebble_basic", color:"#A751E3", template:"%1 %2", params:[{type:"Text", text:Lang.Menus.go_up}, {type:"Indicator", img:"/img/assets/ntry/bitmap/jr/block_up_image.png", position:{x:83, y:0}, size:22}], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = Ntry.STATIC, a = this, c = function() { + window.setTimeout(function() { + Ntry.dispatchEvent("unitAction", Ntry.STATIC.WALK, function() { + a.isAction = !1; + }); + }, 3); + }, d; + switch(Ntry.unitComp.direction) { + case Ntry.STATIC.EAST: + d = b.TURN_LEFT; + break; + case Ntry.STATIC.SOUTH: + d = b.HALF_ROTATION; + break; + case Ntry.STATIC.WEST: + d = b.TURN_RIGHT; + break; + default: + c(); + } + d && Ntry.dispatchEvent("unitAction", d, c); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.jr_east = {skeleton:"pebble_basic", color:"#A751E3", template:"%1 %2", params:[{type:"Text", text:Lang.Menus.go_right}, {type:"Indicator", img:"/img/assets/ntry/bitmap/jr/block_right_image.png", position:{x:83, y:0}, size:22}], func:function() { + var b = Ntry.STATIC; + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var a = this, c = function() { + window.setTimeout(function() { + Ntry.dispatchEvent("unitAction", b.WALK, function() { + a.isAction = !1; + }); + }, 3); + }, d; + switch(Ntry.unitComp.direction) { + case b.SOUTH: + d = b.TURN_LEFT; + break; + case b.WEST: + d = b.HALF_ROTATION; + break; + case b.NORTH: + d = b.TURN_RIGHT; + break; + default: + c(); + } + d && Ntry.dispatchEvent("unitAction", d, c); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.jr_south = {skeleton:"pebble_basic", color:"#A751E3", template:"%1 %2", params:[{type:"Text", text:Lang.Menus.go_down}, {type:"Indicator", img:"/img/assets/ntry/bitmap/jr/block_down_image.png", position:{x:83, y:0}, size:22}], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = Ntry.STATIC, a = this, c = function() { + window.setTimeout(function() { + Ntry.dispatchEvent("unitAction", Ntry.STATIC.WALK, function() { + a.isAction = !1; + }); + }, 3); + }, d; + switch(Ntry.unitComp.direction) { + case b.EAST: + d = b.TURN_RIGHT; + break; + case b.NORTH: + d = b.HALF_ROTATION; + break; + case b.WEST: + d = b.TURN_LEFT; + break; + default: + c(); + } + d && Ntry.dispatchEvent("unitAction", d, c); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.jr_west = {skeleton:"pebble_basic", color:"#A751E3", template:"%1 %2", params:[{type:"Text", text:Lang.Menus.go_left}, {type:"Indicator", img:"/img/assets/ntry/bitmap/jr/block_left_image.png", position:{x:83, y:0}, size:22}], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = Ntry.STATIC, a = this, c = function() { + window.setTimeout(function() { + Ntry.dispatchEvent("unitAction", b.WALK, function() { + a.isAction = !1; + }); + }, 3); + }, d; + switch(Ntry.unitComp.direction) { + case b.SOUTH: + d = b.TURN_RIGHT; + break; + case b.EAST: + d = b.HALF_ROTATION; + break; + case b.NORTH: + d = b.TURN_LEFT; + break; + default: + c(); + } + d && Ntry.dispatchEvent("unitAction", d, c); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.jr_start_basic = {skeleton:"basic_event", event:"start", color:"#3BBD70", template:"%1 %2", params:[{type:"Indicator", boxMultiplier:2, img:"/img/assets/block_icon/start_icon_play.png", highlightColor:"#3BBD70", size:17, position:{x:0, y:-2}}, Lang.Menus.maze_when_run], func:function() { + var b = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), a; + for (a in b) { + this._unit = b[a]; + } + Ntry.unitComp = Ntry.entityManager.getComponent(this._unit.id, Ntry.STATIC.UNIT); +}}; +Entry.block.jr_go_straight = {skeleton:"basic", color:"#A751E3", template:"%1 %2", params:[Lang.Menus.go_forward, {type:"Image", img:"/img/assets/ntry/bitmap/jr/cparty_go_straight.png", size:24}], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = this; + Ntry.dispatchEvent("unitAction", Ntry.STATIC.WALK, function() { + b.isAction = !1; + }); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.jr_turn_left = {skeleton:"basic", color:"#A751E3", template:"%1 %2", params:[Lang.Menus.jr_turn_left, {type:"Image", img:"/img/assets/ntry/bitmap/jr/cparty_rotate_l.png", size:24}], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = this; + Ntry.dispatchEvent("unitAction", Ntry.STATIC.TURN_LEFT, function() { + b.isAction = !1; + }); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.jr_turn_right = {skeleton:"basic", color:"#A751E3", template:"%1 %2", params:[Lang.Menus.jr_turn_right, {type:"Image", img:"/img/assets/ntry/bitmap/jr/cparty_rotate_r.png", size:24}], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = this; + Ntry.dispatchEvent("unitAction", Ntry.STATIC.TURN_RIGHT, function() { + b.isAction = !1; + }); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.jr_go_slow = {skeleton:"basic", color:"#f46c6c", template:"%1 %2", params:[Lang.Menus.go_slow, {type:"Image", img:"/img/assets/ntry/bitmap/jr/cparty_go_slow.png", size:24}], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = this; + Ntry.dispatchEvent("unitAction", Ntry.STATIC.GO_SLOW, function() { + b.isAction = !1; + }); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.jr_repeat_until_dest = {skeleton:"basic_loop", color:"#498DEB", template:"%1 %2 %3 %4", syntax:["BasicWhile", "true"], params:[Lang.Menus.repeat_until_reach_2, {type:"Image", img:"/img/assets/ntry/bitmap/jr/jr_goal_image.png", size:18}, Lang.Menus.repeat_until_reach_1, {type:"Image", img:"/img/assets/week/blocks/for.png", size:24}], statements:[{accept:"basic"}], func:function() { + var b = this.block.statements[0]; + if (0 !== b.getBlocks().length) { + return this.executor.stepInto(b), Entry.STATIC.CONTINUE; + } +}}; +Entry.block.jr_if_construction = {skeleton:"basic_loop", color:"#498DEB", template:"%1 %2 %3 %4", params:[Lang.Menus.jr_if_1, {type:"Image", img:"/img/assets/ntry/bitmap/jr/jr_construction_image.png", size:18}, Lang.Menus.jr_if_2, {type:"Image", img:"/img/assets/week/blocks/for.png", size:24}], statements:[{accept:"basic"}], func:function() { + if (!this.isContinue) { + var b = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), a, c; + for (c in b) { + a = b[c]; + } + b = Ntry.entityManager.getComponent(a.id, Ntry.STATIC.UNIT); + a = Ntry.entityManager.getComponent(a.id, Ntry.STATIC.GRID); + a = {x:a.x, y:a.y}; + Ntry.addVectorByDirection(a, b.direction, 1); + a = Ntry.entityManager.find({type:Ntry.STATIC.GRID, x:a.x, y:a.y}, {type:Ntry.STATIC.TILE, tileType:Ntry.STATIC.OBSTACLE_REPAIR}); + this.isContinue = !0; + b = this.block.statements[0]; + if (0 !== a.length && 0 !== b.getBlocks().length) { + return this.executor.stepInto(b), Entry.STATIC.CONTINUE; + } + } +}}; +Entry.block.jr_if_speed = {skeleton:"basic_loop", color:"#498DEB", template:Lang.Menus.jr_if_1 + " %1 " + Lang.Menus.jr_if_2 + " %2", params:[{type:"Image", img:"/img/assets/ntry/bitmap/jr/jr_speed_image.png", size:18}, {type:"Image", img:"/img/assets/week/blocks/for.png", size:24}], statements:[{accept:"basic"}], func:function() { + if (!this.isContinue) { + var b = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), a, c; + for (c in b) { + a = b[c]; + } + b = Ntry.entityManager.getComponent(a.id, Ntry.STATIC.UNIT); + a = Ntry.entityManager.getComponent(a.id, Ntry.STATIC.GRID); + a = {x:a.x, y:a.y}; + Ntry.addVectorByDirection(a, b.direction, 1); + a = Ntry.entityManager.find({type:Ntry.STATIC.GRID, x:a.x, y:a.y}, {type:Ntry.STATIC.TILE, tileType:Ntry.STATIC.OBSTACLE_SLOW}); + this.isContinue = !0; + b = this.block.statements[0]; + if (0 !== a.length && 0 !== b.getBlocks().length) { + return this.executor.stepInto(b), Entry.STATIC.CONTINUE; + } + } +}}; +Entry.block.maze_step_start = {skeleton:"basic_event", mode:"maze", event:"start", color:"#3BBD70", template:"%1 \uc2dc\uc791\ud558\uae30\ub97c \ud074\ub9ad\ud588\uc744 \ub54c", syntax:["Program"], params:[{type:"Indicator", boxMultiplier:2, img:"/img/assets/block_icon/start_icon_play.png", highlightColor:"#3BBD70", size:17, position:{x:0, y:-2}}], func:function() { + var b = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), a; + for (a in b) { + this._unit = b[a]; + } + Ntry.unitComp = Ntry.entityManager.getComponent(this._unit.id, Ntry.STATIC.UNIT); +}}; +Entry.block.maze_step_jump = {skeleton:"basic", mode:"maze", color:"#FF6E4B", template:"\ub6f0\uc5b4\ub118\uae30%1", params:[{type:"Image", img:"/img/assets/week/blocks/jump.png", size:24}], syntax:["Scope", "jump"], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = this; + Ntry.dispatchEvent("unitAction", Ntry.STATIC.JUMP, function() { + b.isAction = !1; + }); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.maze_step_for = {skeleton:"basic_loop", mode:"maze", color:"#498DEB", template:"%1 \ubc88 \ubc18\ubcf5\ud558\uae30%2", syntax:["BasicIteration"], params:[{type:"Dropdown", key:"REPEAT", options:[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]], value:1}, {type:"Image", img:"/img/assets/week/blocks/for.png", size:24}], statements:[{accept:"basic"}], func:function() { + if (void 0 === this.repeatCount) { + return this.repeatCount = this.block.params[0], Entry.STATIC.CONTINUE; + } + if (0 < this.repeatCount) { + this.repeatCount--; + var b = this.block.statements[0]; + if (0 !== b.getBlocks().length) { + return this.executor.stepInto(b), Entry.STATIC.CONTINUE; + } + } else { + delete this.repeatCount; + } +}}; +Entry.block.test = {skeleton:"basic_boolean_field", mode:"maze", color:"#127CDB", template:"%1 this is test block %2", params:[{type:"Angle", value:"90"}, {type:"Dropdown", options:[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]], value:1}], func:function() { +}}; +Entry.block.maze_repeat_until_1 = {skeleton:"basic_loop", mode:"maze", color:"#498DEB", template:"%1 \ub9cc\ub0a0 \ub54c \uae4c\uc9c0 \ubc18\ubcf5%2", syntax:["BasicWhile", "true"], params:[{type:"Image", img:"/img/assets/ntry/block_inner/repeat_goal_1.png", size:18}, {type:"Image", img:"/img/assets/week/blocks/for.png", size:24}], statements:[{accept:"basic"}], func:function() { + var b = this.block.statements[0]; + if (0 !== b.getBlocks().length) { + return this.executor.stepInto(b), Entry.STATIC.CONTINUE; + } +}}; +Entry.block.maze_repeat_until_2 = {skeleton:"basic_loop", mode:"maze", color:"#498DEB", template:"\ubaa8\ub4e0 %1 \ub9cc\ub0a0 \ub54c \uae4c\uc9c0 \ubc18\ubcf5%2", syntax:["BasicWhile", "true"], params:[{type:"Image", img:"/img/assets/ntry/block_inner/repeat_goal_1.png", size:18}, {type:"Image", img:"/img/assets/week/blocks/for.png", size:24}], statements:[{accept:"basic"}], func:function() { + var b = this.block.statements[0]; + if (0 !== b.getBlocks().length) { + return this.executor.stepInto(b), Entry.STATIC.CONTINUE; + } +}}; +Entry.block.maze_step_if_1 = {skeleton:"basic_loop", mode:"maze", color:"#498DEB", template:"\ub9cc\uc57d \uc55e\uc5d0 %1 \uc788\ub2e4\uba74%2", syntax:["BasicIf", 'front == "wall"'], params:[{type:"Image", img:"/img/assets/ntry/block_inner/if_target_1.png", size:18}, {type:"Image", img:"/img/assets/week/blocks/if.png", size:24}], statements:[{accept:"basic"}], func:function() { + if (!this.isContinue) { + var b = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), a, c; + for (c in b) { + a = b[c]; + } + b = Ntry.entityManager.getComponent(a.id, Ntry.STATIC.UNIT); + a = Ntry.entityManager.getComponent(a.id, Ntry.STATIC.GRID); + a = {x:a.x, y:a.y}; + Ntry.addVectorByDirection(a, b.direction, 1); + c = Ntry.entityManager.find({type:Ntry.STATIC.GRID, x:a.x, y:a.y}); + b = this.block.statements[0]; + if (0 === c.length) { + return this.executor.stepInto(b), Entry.STATIC.CONTINUE; + } + a = Ntry.entityManager.find({type:Ntry.STATIC.GRID, x:a.x, y:a.y}, {type:Ntry.STATIC.TILE, tileType:Ntry.STATIC.WALL}); + this.isContinue = !0; + if (0 !== a.length && 0 !== b.getBlocks().length) { + return this.executor.stepInto(b), Entry.STATIC.CONTINUE; + } + } +}}; +Entry.block.maze_step_if_2 = {skeleton:"basic_loop", mode:"maze", color:"#498DEB", template:"\ub9cc\uc57d \uc55e\uc5d0 %1 \uc788\ub2e4\uba74%2", syntax:["BasicIf", 'front == "bee"'], params:[{type:"Image", img:"/img/assets/ntry/bitmap/maze2/obstacle_01.png", size:18}, {type:"Image", img:"/img/assets/week/blocks/if.png", size:24}], statements:[{accept:"basic"}], func:function() { + if (!this.isContinue) { + var b = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), a, c; + for (c in b) { + a = b[c]; + } + b = Ntry.entityManager.getComponent(a.id, Ntry.STATIC.UNIT); + a = Ntry.entityManager.getComponent(a.id, Ntry.STATIC.GRID); + a = {x:a.x, y:a.y}; + Ntry.addVectorByDirection(a, b.direction, 1); + a = Ntry.entityManager.find({type:Ntry.STATIC.GRID, x:a.x, y:a.y}, {type:Ntry.STATIC.TILE, tileType:Ntry.STATIC.OBSTACLE_BEE}); + this.isContinue = !0; + b = this.block.statements[0]; + if (0 !== a.length && 0 !== b.getBlocks().length) { + return this.executor.stepInto(b), Entry.STATIC.CONTINUE; + } + } +}}; +Entry.block.maze_call_function = {skeleton:"basic", mode:"maze", color:"#B57242", template:"\uc57d\uc18d \ubd88\ub7ec\uc624\uae30%1", syntax:["Scope", "promise"], params:[{type:"Image", img:"/img/assets/week/blocks/function.png", size:24}], func:function() { + if (!this.funcExecutor) { + var b = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.CODE), a; + for (a in b) { + this.funcExecutor = new Entry.Executor(b[a].components[Ntry.STATIC.CODE].code.getEventMap("define")[0]); + } + } + this.funcExecutor.execute(); + if (null !== this.funcExecutor.scope.block) { + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.maze_define_function = {skeleton:"basic_define", mode:"maze", color:"#B57242", event:"define", template:"\uc57d\uc18d\ud558\uae30%1", syntax:["BasicFunction"], params:[{type:"Image", img:"/img/assets/week/blocks/function.png", size:24}], statements:[{accept:"basic"}], func:function(b) { + if (!this.executed && (b = this.block.statements[0], 0 !== b.getBlocks().length)) { + return this.executor.stepInto(b), this.executed = !0, Entry.STATIC.CONTINUE; + } +}}; +Entry.block.maze_step_if_3 = {skeleton:"basic_loop", mode:"maze", color:"#498DEB", template:"\ub9cc\uc57d \uc55e\uc5d0 %1 \uc788\ub2e4\uba74%2", syntax:["BasicIf", 'front == "banana"'], params:[{type:"Image", img:"/img/assets/ntry/block_inner/if_target_3.png", size:18}, {type:"Image", img:"/img/assets/week/blocks/if.png", size:24}], statements:[{accept:"basic"}], func:function() { + if (!this.isContinue) { + var b = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), a, c; + for (c in b) { + a = b[c]; + } + b = Ntry.entityManager.getComponent(a.id, Ntry.STATIC.UNIT); + a = Ntry.entityManager.getComponent(a.id, Ntry.STATIC.GRID); + a = {x:a.x, y:a.y}; + Ntry.addVectorByDirection(a, b.direction, 1); + a = Ntry.entityManager.find({type:Ntry.STATIC.GRID, x:a.x, y:a.y}, {type:Ntry.STATIC.TILE, tileType:Ntry.STATIC.OBSTACLE_BANANA}); + this.isContinue = !0; + b = this.block.statements[0]; + if (0 !== a.length && 0 !== b.getBlocks().length) { + return this.executor.stepInto(b), Entry.STATIC.CONTINUE; + } + } +}}; +Entry.block.maze_step_if_4 = {skeleton:"basic_loop", mode:"maze", color:"#498DEB", template:"\ub9cc\uc57d \uc55e\uc5d0 %1 \uc788\ub2e4\uba74%2", syntax:["BasicIf", 'front == "wall"'], params:[{type:"Image", img:"/img/assets/ntry/block_inner/if_target_2.png", size:18}, {type:"Image", img:"/img/assets/week/blocks/if.png", size:24}], statements:[{accept:"basic"}], func:function() { + if (!this.isContinue) { + var b = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), a, c; + for (c in b) { + a = b[c]; + } + b = Ntry.entityManager.getComponent(a.id, Ntry.STATIC.UNIT); + a = Ntry.entityManager.getComponent(a.id, Ntry.STATIC.GRID); + a = {x:a.x, y:a.y}; + Ntry.addVectorByDirection(a, b.direction, 1); + a = Ntry.entityManager.find({type:Ntry.STATIC.GRID, x:a.x, y:a.y}, {type:Ntry.STATIC.TILE, tileType:Ntry.STATIC.WALL}); + this.isContinue = !0; + b = this.block.statements[0]; + if (0 !== a.length && 0 !== b.getBlocks().length) { + return this.executor.stepInto(b), Entry.STATIC.CONTINUE; + } + } +}}; +Entry.block.maze_step_move_step = {skeleton:"basic", mode:"maze", color:"#A751E3", template:"\uc55e\uc73c\ub85c \ud55c \uce78 \uc774\ub3d9%1", syntax:["Scope", "move"], params:[{type:"Image", img:"/img/assets/week/blocks/moveStep.png", size:24}], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = this; + Ntry.dispatchEvent("unitAction", Ntry.STATIC.WALK, function() { + b.isAction = !1; + }); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.maze_step_rotate_left = {skeleton:"basic", mode:"maze", color:"#A751E3", template:"\uc67c\ucabd\uc73c\ub85c \ud68c\uc804%1", syntax:["Scope", "left"], params:[{type:"Image", img:"/img/assets/week/blocks/turnL.png", size:24}], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = this; + Ntry.dispatchEvent("unitAction", Ntry.STATIC.TURN_LEFT, function() { + b.isAction = !1; + }); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.maze_step_rotate_right = {skeleton:"basic", mode:"maze", color:"#A751E3", template:"\uc624\ub978\ucabd\uc73c\ub85c \ud68c\uc804%1", syntax:["Scope", "right"], params:[{type:"Image", img:"/img/assets/week/blocks/turnR.png", size:24}], func:function() { + if (this.isContinue) { + if (this.isAction) { + return Entry.STATIC.CONTINUE; + } + delete this.isAction; + delete this.isContinue; + } else { + this.isAction = this.isContinue = !0; + var b = this; + Ntry.dispatchEvent("unitAction", Ntry.STATIC.TURN_RIGHT, function() { + b.isAction = !1; + }); + return Entry.STATIC.CONTINUE; + } +}}; +Entry.block.test_wrapper = {skeleton:"basic", mode:"maze", color:"#3BBD70", template:"%1 this is test block %2", params:[{type:"Block", accept:"basic_boolean_field", value:[{type:"test", params:[30, 50]}]}, {type:"Dropdown", options:[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]], value:1}], func:function() { +}}; +Entry.block.basic_button = {skeleton:"basic_button", color:"#eee", template:"%1", params:[{type:"Text", text:"basic button", color:"#333", align:"center"}], func:function() { +}}; +Entry.BlockMenu = function(b, a, c, d) { + Entry.Model(this, !1); + this._align = a || "CENTER"; + this._scroll = void 0 !== d ? d : !1; + this._bannedClass = []; + this._categories = []; + this.suffix = "blockMenu"; + b = "string" === typeof b ? $("#" + b) : $(b); + if ("DIV" !== b.prop("tagName")) { + return console.error("Dom is not div element"); + } + this.view = b; + this.visible = !0; + this._svgId = "blockMenu" + (new Date).getTime(); + this._clearCategory(); + this._generateView(c); + this._splitters = []; + this.setWidth(); + this.svg = Entry.SVG(this._svgId); + Entry.Utils.addFilters(this.svg, this.suffix); + this.patternRect = Entry.Utils.addBlockPattern(this.svg, this.suffix); + this.svgGroup = this.svg.elem("g"); + this.svgThreadGroup = this.svgGroup.elem("g"); + this.svgThreadGroup.board = this; + this.svgBlockGroup = this.svgGroup.elem("g"); + this.svgBlockGroup.board = this; + this.changeEvent = new Entry.Event(this); + c && this._generateCategoryCodes(c); + this.observe(this, "_handleDragBlock", ["dragBlock"]); + this._scroll && (this._scroller = new Entry.BlockMenuScroller(this), this._addControl(b)); + Entry.documentMousedown && Entry.documentMousedown.attach(this, this.setSelectedBlock); + this._categoryCodes && Entry.keyPressed && Entry.keyPressed.attach(this, this._captureKeyEvent); + Entry.windowResized && (b = _.debounce(this.updateOffset, 200), Entry.windowResized.attach(this, b)); +}; +(function(b) { + b.schema = {code:null, dragBlock:null, closeBlock:null, selectedBlockView:null}; + b._generateView = function(a) { + var b = this.view, d = this; + a && (this._categoryCol = Entry.Dom("ul", {class:"entryCategoryListWorkspace", parent:b}), this._generateCategoryView(a)); + this.blockMenuContainer = Entry.Dom("div", {"class":"blockMenuContainer", parent:b}); + this.svgDom = Entry.Dom($(''), {parent:this.blockMenuContainer}); + this.svgDom.mouseenter(function(a) { + d._scroller && d._scroller.setOpacity(1); + a = d.workspace.selectedBlockView; + !Entry.playground || Entry.playground.resizing || a && a.dragMode === Entry.DRAG_MODE_DRAG || (Entry.playground.focusBlockMenu = !0, a = d.svgGroup.getBBox(), a = a.width + a.x + 64, a > Entry.interfaceState.menuWidth && (this.widthBackup = Entry.interfaceState.menuWidth - 64, $(this).stop().animate({width:a - 62}, 200))); + }); + this.svgDom.mouseleave(function(a) { + Entry.playground && !Entry.playground.resizing && (d._scroller && d._scroller.setOpacity(0), (a = this.widthBackup) && $(this).stop().animate({width:a}, 200), delete this.widthBackup, delete Entry.playground.focusBlockMenu); + }); + $(window).scroll(function() { + d.updateOffset(); + }); + }; + b.changeCode = function(a) { + if (!(a instanceof Entry.Code)) { + return console.error("You must inject code instance"); + } + this.codeListener && this.code.changeEvent.detach(this.codeListener); + var b = this; + this.set({code:a}); + this.codeListener = this.code.changeEvent.attach(this, function() { + b.changeEvent.notify(); + }); + a.createView(this); + this.align(); + }; + b.bindCodeView = function(a) { + this.svgBlockGroup.remove(); + this.svgThreadGroup.remove(); + this.svgBlockGroup = a.svgBlockGroup; + this.svgThreadGroup = a.svgThreadGroup; + this.svgGroup.appendChild(this.svgThreadGroup); + this.svgGroup.appendChild(this.svgBlockGroup); + this._scroller && this.svgGroup.appendChild(this._scroller.svgGroup); + }; + b.align = function() { + if (this.code) { + this._clearSplitters(); + for (var a = this.code.getThreads(), b = 10, d = "LEFT" == this._align ? 10 : this.svgDom.width() / 2, e, f = 0, g = a.length;f < g;f++) { + var h = a[f].getFirstBlock(), k = h.view, h = Entry.block[h.type]; + this.checkBanClass(h) ? k.set({display:!1}) : (k.set({display:!0}), h = h.class, e && e !== h && (this._createSplitter(b), b += 15), e = h, h = d - k.offsetX, "CENTER" == this._align && (h -= k.width / 2), b -= k.offsetY, k._moveTo(h, b, !1), b += k.height + 15); + } + this.updateSplitters(); + this.changeEvent.notify(); + } + }; + b.cloneToGlobal = function(a) { + if (!this._boardBlockView && null !== this.dragBlock) { + var b = this.workspace, d = b.getMode(), e = this.dragBlock, f = this._svgWidth, g = b.selectedBoard; + !g || d != Entry.Workspace.MODE_BOARD && d != Entry.Workspace.MODE_OVERLAYBOARD ? Entry.GlobalSvg.setView(e, b.getMode()) && Entry.GlobalSvg.addControl(a) : g.code && (b = e.block, d = b.getThread(), b && d && (b = d.toJSON(!0), this._boardBlockView = Entry.do("addThread", b).value.getFirstBlock().view, g = this.offset().top - g.offset().top, this._boardBlockView._moveTo(e.x - f, e.y + g, !1), this._boardBlockView.onMouseDown.call(this._boardBlockView, a), this._boardBlockView.dragInstance.set({isNew:!0}))); + } + }; + b.terminateDrag = function() { + if (this._boardBlockView) { + var a = this._boardBlockView; + if (a) { + this.workspace.getBoard(); + this._boardBlockView = null; + var b = Entry.GlobalSvg.left, d = Entry.GlobalSvg.width / 2, a = a.getBoard().offset().left; + return b < a - d; + } + } + }; + b.getCode = function(a) { + return this._code; + }; + b.setSelectedBlock = function(a) { + var b = this.selectedBlockView; + b && b.removeSelected(); + a instanceof Entry.BlockView ? a.addSelected() : a = null; + this.set({selectedBlockView:a}); + }; + b.hide = function() { + this.view.addClass("entryRemove"); + }; + b.show = function() { + this.view.removeClass("entryRemove"); + }; + b.renderText = function() { + for (var a = this.code.getThreads(), b = 0;b < a.length;b++) { + a[b].view.renderText(); + } + }; + b.renderBlock = function() { + for (var a = this.code.getThreads(), b = 0;b < a.length;b++) { + a[b].view.renderBlock(); + } + }; + b._createSplitter = function(a) { + a = this.svgBlockGroup.elem("line", {x1:20, y1:a, x2:this._svgWidth - 20, y2:a, stroke:"#b5b5b5"}); + this._splitters.push(a); + }; + b.updateSplitters = function(a) { + a = void 0 === a ? 0 : a; + var b = this._svgWidth - 20, d; + this._splitters.forEach(function(e) { + d = parseFloat(e.getAttribute("y1")) + a; + e.attr({x2:b, y1:d, y2:d}); + }); + }; + b._clearSplitters = function() { + for (var a = this._splitters, b = a.length - 1;0 <= b;b--) { + a[b].remove(), a.pop(); + } + }; + b.setWidth = function() { + this._svgWidth = this.blockMenuContainer.width(); + this.updateSplitters(); + }; + b.setMenu = function() { + var a = this._categoryCodes, b = this._categoryElems, d; + for (d in a) { + var e = a[d]; + e instanceof Entry.Code || (e = a[d] = new Entry.Code(e)); + for (var e = e.getThreads(), f = e.length, g = 0;g < e.length;g++) { + var h = e[g].getFirstBlock(); + this.checkBanClass(Entry.block[h.type]) && f--; + } + 0 === f ? b[d].addClass("entryRemove") : b[d].removeClass("entryRemove"); + } + }; + b.getCategoryCodes = function(a) { + a = this._convertSelector(a); + var b = this._categoryCodes[a]; + b instanceof Entry.Code || (b = this._categoryCodes[a] = new Entry.Code(b)); + return b; + }; + b._convertSelector = function(a) { + if (isNaN(a)) { + return a; + } + a = Number(a); + for (var b = this._categories, d = this._categoryElems, e = 0;e < b.length;e++) { + var f = b[e]; + if (!d[f].hasClass("entryRemove") && 0 === a--) { + return f; + } + } + }; + b.selectMenu = function(a, b) { + var d = this._convertSelector(a); + if (d) { + "variable" == d && Entry.playground.checkVariables(); + var e = this._categoryElems[d], f = this._selectedCategoryView, g = !1, h = this.workspace.board, k = h.view; + f && f.removeClass("entrySelectedCategory"); + e != f || b ? f || (this.visible || (g = !0, k.addClass("foldOut"), Entry.playground.showTabs()), k.removeClass("folding"), this.visible = !0) : (k.addClass("folding"), this._selectedCategoryView = null, e.removeClass("entrySelectedCategory"), Entry.playground.hideTabs(), g = !0, this.visible = !1); + g && Entry.bindAnimationCallbackOnce(k, function() { + h.scroller.resizeScrollBar.call(h.scroller); + k.removeClass("foldOut"); + Entry.windowResized.notify(); + }); + this.visible && (f = this._categoryCodes[d], this._selectedCategoryView = e, e.addClass("entrySelectedCategory"), f.constructor !== Entry.Code && (f = this._categoryCodes[d] = new Entry.Code(f)), this.changeCode(f)); + this.lastSelector = d; + } + }; + b._generateCategoryCodes = function(a) { + this._categoryCodes = {}; + for (var b = 0;b < a.length;b++) { + var d = a[b], e = []; + d.blocks.forEach(function(a) { + var b = Entry.block[a]; + if (b && b.def) { + if (b.defs) { + for (a = 0;a < b.defs.length;a++) { + e.push([b.defs[a]]); + } + } else { + e.push([b.def]); + } + } else { + e.push([{type:a}]); + } + }); + d = d.category; + this._categories.push(d); + this._categoryCodes[d] = e; + } + }; + b.banClass = function(a) { + 0 > this._bannedClass.indexOf(a) && this._bannedClass.push(a); + this.align(); + }; + b.unbanClass = function(a) { + a = this._bannedClass.indexOf(a); + -1 < a && this._bannedClass.splice(a, 1); + this.align(); + }; + b.checkBanClass = function(a) { + if (a) { + a = a.isNotFor; + for (var b in this._bannedClass) { + if (a && -1 < a.indexOf(this._bannedClass[b])) { + return !0; + } + } + return !1; + } + }; + b._addControl = function(a) { + var b = this; + a.on("wheel", function() { + b._mouseWheel.apply(b, arguments); + }); + }; + b._mouseWheel = function(a) { + a = a.originalEvent; + a.preventDefault(); + var b = Entry.disposeEvent; + b && b.notify(a); + this._scroller.scroll(-a.wheelDeltaY || a.deltaY / 3); + }; + b.dominate = function(a) { + this.svgBlockGroup.appendChild(a.view.svgGroup); + }; + b.reDraw = function() { + this.selectMenu(this.lastSelector, !0); + var a = this.code && this.code.view ? this.code.view : null; + a && a.reDraw(); + }; + b._handleDragBlock = function() { + this._boardBlockView = null; + this._scroller && this._scroller.setOpacity(0); + }; + b._captureKeyEvent = function(a) { + var b = a.keyCode, d = Entry.type; + a.ctrlKey && "workspace" == d && 48 < b && 58 > b && (a.preventDefault(), this.selectMenu(b - 49)); + }; + b.setPatternRectFill = function(a) { + this.patternRect.attr({fill:a}); + }; + b._clearCategory = function() { + this._selectedCategoryView = null; + this._categories = []; + var a = this._categoryElems, b; + for (b in a) { + a[b].remove(); + } + this._categoryElems = {}; + a = this._categoryCodes; + for (b in a) { + var d = a[b]; + d.constructor == Entry.Code && d.clear(); + } + this._categoryCodes = null; + }; + b.setCategoryData = function(a) { + this._clearCategory(); + this._generateCategoryView(a); + this._generateCategoryCodes(a); + }; + b._generateCategoryView = function(a) { + if (a) { + for (var b = this, d = 0;d < a.length;d++) { + var e = a[d].category; + (function(a, d) { + a.text(Lang.Blocks[d.toUpperCase()]); + b._categoryElems[d] = a; + a.bindOnClick(function(a) { + b.selectMenu(d); + }); + })(Entry.Dom("li", {id:"entryCategory" + e, class:"entryCategoryElementWorkspace", parent:this._categoryCol}), e); + } + } + }; + b.updateOffset = function() { + this._offset = this.svgDom.offset(); + }; + b.offset = function() { + (!this._offset || 0 === this._offset.top && 0 === this._offset.left) && this.updateOffset(); + return this._offset; + }; +})(Entry.BlockMenu.prototype); +Entry.BlockMenuScroller = function(b) { + var a = this; + this.board = b; + this.board.changeEvent.attach(this, this._reset); + this.svgGroup = null; + this.vRatio = this.vY = this.vWidth = this.hX = 0; + this._visible = !0; + this._opacity = -1; + this.mouseHandler = function() { + a.onMouseDown.apply(a, arguments); + }; + this.createScrollBar(); + this.setOpacity(0); + this._addControl(); + Entry.windowResized && Entry.windowResized.attach(this, this.resizeScrollBar); +}; +Entry.BlockMenuScroller.RADIUS = 7; +(function(b) { + b.createScrollBar = function() { + this.svgGroup = this.board.svgGroup.elem("g", {class:"boardScrollbar"}); + this.vScrollbar = this.svgGroup.elem("rect", {rx:4, ry:4}); + this.resizeScrollBar(); + }; + b.resizeScrollBar = function() { + this._updateRatio(); + if (this._visible && 0 !== this.vRatio) { + var a = this.board.blockMenuContainer; + this.vScrollbar.attr({width:9, height:a.height() / this.vRatio, x:a.width() - 9}); + } + }; + b.updateScrollBar = function(a) { + this.vY += a; + this.vScrollbar.attr({y:this.vY}); + }; + b.scroll = function(a) { + this.isVisible() && (a = this._adjustValue(a) - this.vY, 0 !== a && (this.board.code.moveBy(0, -a * this.vRatio), this.updateScrollBar(a))); + }; + b._adjustValue = function(a) { + var b = this.board.svgDom.height(), b = b - b / this.vRatio; + a = this.vY + a; + a = Math.max(0, a); + return a = Math.min(b, a); + }; + b.setVisible = function(a) { + a != this.isVisible() && (this._visible = a, this.svgGroup.attr({display:!0 === a ? "block" : "none"})); + }; + b.setOpacity = function(a) { + this._opacity != a && (this.vScrollbar.attr({opacity:a}), this._opacity = a); + }; + b.isVisible = function() { + return this._visible; + }; + b._updateRatio = function() { + var a = this.board, b = a.svgBlockGroup.getBoundingClientRect(), d = a.blockMenuContainer.height(), a = a.offset(); + this.vRatio = b = (b.height + (b.top - a.top) + 10) / d; + 1 >= b ? this.setVisible(!1) : this.setVisible(!0); + }; + b._reset = function() { + this.vY = 0; + this.vScrollbar.attr({y:this.vY}); + this.resizeScrollBar(); + }; + b.onMouseDown = function(a) { + function b(a) { + a.stopPropagation && a.stopPropagation(); + a.preventDefault && a.preventDefault(); + a = a.originalEvent && a.originalEvent.touches ? a.originalEvent.touches[0] : a; + var c = e.dragInstance; + e.scroll(a.pageY - c.offsetY); + c.set({offsetY:a.pageY}); + } + function d(a) { + $(document).unbind(".scroll"); + delete e.dragInstance; + } + var e = this; + a.stopPropagation && a.stopPropagation(); + a.preventDefault && a.preventDefault(); + if (0 === a.button || a.originalEvent && a.originalEvent.touches) { + Entry.documentMousedown && Entry.documentMousedown.notify(a); + var f; + f = a.originalEvent && a.originalEvent.touches ? a.originalEvent.touches[0] : a; + var g = $(document); + g.bind("mousemove.scroll", b); + g.bind("mouseup.scroll", d); + g.bind("touchmove.scroll", b); + g.bind("touchend.scroll", d); + e.dragInstance = new Entry.DragInstance({startY:f.pageY, offsetY:f.pageY}); + } + a.stopPropagation(); + }; + b._addControl = function() { + $(this.vScrollbar).bind("mousedown touchstart", this.mouseHandler); + }; +})(Entry.BlockMenuScroller.prototype); +Entry.BlockView = function(b, a, c) { + Entry.Model(this, !1); + this.block = b; + this._board = a; + this._observers = []; + this.set(b); + this.svgGroup = a.svgBlockGroup.elem("g"); + this._schema = Entry.block[b.type]; + this._schema.changeEvent && (this._schemaChangeEvent = this._schema.changeEvent.attach(this, this._updateSchema)); + var d = this._skeleton = Entry.skeleton[this._schema.skeleton]; + this._contents = []; + this._statements = []; + this.magnet = {}; + this._paramMap = {}; + d.magnets && d.magnets(this).next && (this.svgGroup.nextMagnet = this.block, this._nextGroup = this.svgGroup.elem("g"), this._observers.push(this.observe(this, "_updateMagnet", ["contentHeight"]))); + this.isInBlockMenu = this.getBoard() instanceof Entry.BlockMenu; + var e = this; + this.mouseHandler = function() { + var a = e.block.events; + a && a.mousedown && a.mousedown.forEach(function(a) { + a(e); + }); + e.onMouseDown.apply(e, arguments); + }; + this._startRender(b, c); + this._observers.push(this.block.observe(this, "_setMovable", ["movable"])); + this._observers.push(this.block.observe(this, "_setReadOnly", ["movable"])); + this._observers.push(this.block.observe(this, "_setCopyable", ["copyable"])); + this._observers.push(this.block.observe(this, "_updateColor", ["deletable"], !1)); + this._observers.push(this.observe(this, "_updateBG", ["magneting"], !1)); + this._observers.push(this.observe(this, "_updateOpacity", ["visible"], !1)); + this._observers.push(this.observe(this, "_updateDisplay", ["display"], !1)); + this._observers.push(this.observe(this, "_updateShadow", ["shadow"])); + this._observers.push(this.observe(this, "_updateMagnet", ["offsetY"])); + this._observers.push(a.code.observe(this, "_setBoard", ["board"], !1)); + this.dragMode = Entry.DRAG_MODE_NONE; + Entry.Utils.disableContextmenu(this.svgGroup.node); + (a = b.events.viewAdd) && !this.isInBlockMenu && a.forEach(function(a) { + Entry.Utils.isFunction(a) && a(b); + }); + if ("function_general" == this.block.type) { + debugger; + } +}; +Entry.BlockView.PARAM_SPACE = 5; +Entry.BlockView.DRAG_RADIUS = 5; +(function(b) { + b.schema = {id:0, type:Entry.STATIC.BLOCK_RENDER_MODEL, x:0, y:0, offsetX:0, offsetY:0, width:0, height:0, contentWidth:0, contentHeight:0, magneting:!1, visible:!0, animating:!1, shadow:!0, display:!0}; + b._startRender = function(a, b) { + var d = this, e = this._skeleton; + this.svgGroup.attr({class:"block"}); + var f = e.classes; + f && 0 !== f.length && f.forEach(function(a) { + d.svgGroup.addClass(a); + }); + f = e.path(this); + this.pathGroup = this.svgGroup.elem("g"); + this._updateMagnet(); + this._path = this.pathGroup.elem("path"); + this.getBoard().patternRect && ($(this._path).mouseenter(function(a) { + d._mouseEnable && d._changeFill(!0); + }), $(this._path).mouseleave(function(a) { + d._mouseEnable && d._changeFill(!1); + })); + var g = this._schema.color; + this.block.deletable === Entry.Block.DELETABLE_FALSE_LIGHTEN && (g = Entry.Utils.colorLighten(g)); + this._fillColor = g; + f = {d:f, fill:g, class:"blockPath"}; + if (this.magnet.next || this._skeleton.nextShadow) { + g = this.getBoard().suffix, this.pathGroup.attr({filter:"url(#entryBlockShadowFilter_" + g + ")"}); + } else { + if (this.magnet.string || this.magnet.boolean) { + f.stroke = e.outerLine; + } + } + e.outerLine && (f["stroke-width"] = "0.6"); + this._path.attr(f); + this._moveTo(this.x, this.y, !1); + this._startContentRender(b); + !0 !== this._board.disableMouseEvent && this._addControl(); + this.bindPrev(); + }; + b._startContentRender = function(a) { + a = void 0 === a ? Entry.Workspace.MODE_BOARD : a; + this.contentSvgGroup && this.contentSvgGroup.remove(); + var b = this._schema; + b.statements && b.statements.length && this.statementSvgGroup && this.statementSvgGroup.remove(); + this._contents = []; + this.contentSvgGroup = this.svgGroup.elem("g"); + b.statements && b.statements.length && (this.statementSvgGroup = this.svgGroup.elem("g")); + switch(a) { + case Entry.Workspace.MODE_BOARD: + ; + case Entry.Workspace.MODE_OVERLAYBOARD: + for (var d = /(%\d)/mi, e = (b.template ? b.template : Lang.template[this.block.type]).split(d), f = b.params, g = 0;g < e.length;g++) { + var h = e[g].trim(); + if (0 !== h.length) { + if (d.test(h)) { + var k = Number(h.split("%")[1]) - 1, h = f[k], h = new Entry["Field" + h.type](h, this, k, a, g); + this._contents.push(h); + this._paramMap[k] = h; + } else { + this._contents.push(new Entry.FieldText({text:h}, this)); + } + } + } + if ((a = b.statements) && a.length) { + for (g = 0;g < a.length;g++) { + this._statements.push(new Entry.FieldStatement(a[g], this, g)); + } + } + break; + case Entry.Workspace.MODE_VIMBOARD: + g = this.getBoard().workspace.getCodeToText(this.block), this._contents.push(new Entry.FieldText({text:g, color:"white"}, this)); + } + this.alignContent(!1); + }; + b._updateSchema = function() { + this._startContentRender(); + }; + b.changeType = function(a) { + this._schemaChangeEvent && this._schemaChangeEvent.destroy(); + this._schema = Entry.block[a]; + this._schema.changeEvent && (this._schemaChangeEvent = this._schema.changeEvent.attach(this, this._updateSchema)); + this._updateSchema(); + }; + b.alignContent = function(a) { + !0 !== a && (a = !1); + for (var b = 0, d = 0, e = 0, f = 0, g = 0, h = 0, k = 0;k < this._contents.length;k++) { + var l = this._contents[k]; + l instanceof Entry.FieldLineBreak ? (this._alignStatement(a, f), l.align(f), f++, d = l.box.y, b = 8) : (l.align(b, d, a), k === this._contents.length - 1 || l instanceof Entry.FieldText && 0 == l._text.length || (b += Entry.BlockView.PARAM_SPACE)); + l = l.box; + 0 !== f ? h = Math.max(1E3 * Math.round(l.height), h) : e = Math.max(l.height, e); + b += l.width; + g = Math.max(g, b); + this.set({contentWidth:g, contentHeight:e}); + } + this.set({contentHeight:e + h}); + this._statements.length != f && this._alignStatement(a, f); + a = this.getContentPos(); + this.contentSvgGroup.attr("transform", "translate(" + a.x + "," + a.y + ")"); + this.contentPos = a; + this._render(); + this._updateMagnet(); + }; + b._alignStatement = function(a, b) { + var d = this._skeleton.statementPos ? this._skeleton.statementPos(this) : [], e = this._statements[b]; + e && (d = d[b]) && e.align(d.x, d.y, a); + }; + b._render = function() { + this._renderPath(); + this.set(this._skeleton.box(this)); + }; + b._renderPath = function() { + var a = this._skeleton.path(this); + this._path.attr({d:a}); + this.set({animating:!1}); + }; + b._setPosition = function(a) { + this.svgGroup.attr("transform", "translate(" + this.x + "," + this.y + ")"); + }; + b._toLocalCoordinate = function(a) { + this._moveTo(0, 0, !1); + a.appendChild(this.svgGroup); + }; + b._toGlobalCoordinate = function(a) { + a = this.getAbsoluteCoordinate(a); + this._moveTo(a.x, a.y, !1); + this.getBoard().svgBlockGroup.appendChild(this.svgGroup); + }; + b._moveTo = function(a, b, d) { + this.set({x:a, y:b}); + this.visible && this.display && this._setPosition(d); + }; + b._moveBy = function(a, b, d) { + return this._moveTo(this.x + a, this.y + b, d); + }; + b._addControl = function() { + var a = this; + this._mouseEnable = !0; + $(this.svgGroup).bind("mousedown.blockViewMousedown touchstart.blockViewMousedown", a.mouseHandler); + var b = a.block.events; + b && b.dblclick && $(this.svgGroup).dblclick(function() { + b.dblclick.forEach(function(b) { + b && b(a); + }); + }); + }; + b.removeControl = function() { + this._mouseEnable = !1; + $(this.svgGroup).unbind(".blockViewMousedown"); + }; + b.onMouseDown = function(a) { + function c(a) { + a.stopPropagation(); + var c = e.workspace.getMode(), d; + c === Entry.Workspace.MODE_VIMBOARD && b.vimBoardEvent(a, "dragOver"); + d = a.originalEvent && a.originalEvent.touches ? a.originalEvent.touches[0] : a; + var f = m.mouseDownCoordinate, f = Math.sqrt(Math.pow(d.pageX - f.x, 2) + Math.pow(d.pageY - f.y, 2)); + (m.dragMode == Entry.DRAG_MODE_DRAG || f > Entry.BlockView.DRAG_RADIUS) && m.movable && (m.isInBlockMenu ? e.cloneToGlobal(a) : (a = !1, m.dragMode != Entry.DRAG_MODE_DRAG && (m._toGlobalCoordinate(), m.dragMode = Entry.DRAG_MODE_DRAG, m.block.getThread().changeEvent.notify(), Entry.GlobalSvg.setView(m, c), a = !0), this.animating && this.set({animating:!1}), 0 === m.dragInstance.height && m.dragInstance.set({height:-1 + m.height}), c = m.dragInstance, m._moveBy(d.pageX - c.offsetX, d.pageY - + c.offsetY, !1), c.set({offsetX:d.pageX, offsetY:d.pageY}), Entry.GlobalSvg.position(), m._updateCloseBlock(), m.originPos || (m.originPos = {x:m.x, y:m.y}), a && e.generateCodeMagnetMap())); + } + function d(a) { + $(document).unbind(".block"); + m.terminateDrag(a); + e && e.set({dragBlock:null}); + m._changeFill(!1); + Entry.GlobalSvg.remove(); + delete this.mouseDownCoordinate; + delete m.dragInstance; + } + console.log(this.block.pointer()); + a.stopPropagation && a.stopPropagation(); + a.preventDefault && a.preventDefault(); + this._changeFill(!1); + var e = this.getBoard(); + Entry.documentMousedown && Entry.documentMousedown.notify(a); + if (!this.readOnly && !e.viewOnly) { + e.setSelectedBlock(this); + this.dominate(); + if (0 === a.button || a.originalEvent && a.originalEvent.touches) { + var f; + f = a.originalEvent && a.originalEvent.touches ? a.originalEvent.touches[0] : a; + this.mouseDownCoordinate = {x:f.pageX, y:f.pageY}; + var g = $(document); + g.bind("mousemove.block touchmove.block", c); + g.bind("mouseup.block touchend.block", d); + this.dragInstance = new Entry.DragInstance({startX:f.pageX, startY:f.pageY, offsetX:f.pageX, offsetY:f.pageY, height:0, mode:!0}); + e.set({dragBlock:this}); + this.addDragging(); + this.dragMode = Entry.DRAG_MODE_MOUSEDOWN; + } else { + if (Entry.Utils.isRightButton(a)) { + var h = this, k = h.block; + if (this.isInBlockMenu) { + return; + } + f = []; + var g = {text:"\ube14\ub85d \ubcf5\uc0ac & \ubd99\uc5ec\ub123\uae30", enable:this.copyable, callback:function() { + Entry.do("cloneBlock", k); + }}, l = {text:"\ube14\ub85d \ubcf5\uc0ac", enable:this.copyable, callback:function() { + h.block.copyToClipboard(); + }}, n = {text:"\ube14\ub85d \uc0ad\uc81c", enable:k.isDeletable(), callback:function() { + Entry.do("destroyBlock", h.block); + }}; + f.push(g); + f.push(l); + f.push(n); + Entry.ContextMenu.show(f); + } + } + var m = this; + e.workspace.getMode() === Entry.Workspace.MODE_VIMBOARD && a && document.getElementsByClassName("CodeMirror")[0].dispatchEvent(Entry.Utils.createMouseEvent("dragStart", event)); + } + }; + b.vimBoardEvent = function(a, b, d) { + a && (a = Entry.Utils.createMouseEvent(b, a), d && (a.block = d), document.getElementsByClassName("CodeMirror")[0].dispatchEvent(a)); + }; + b.terminateDrag = function(a) { + var b = this.getBoard(), d = this.dragMode, e = this.block, f = b.workspace.getMode(); + this.removeDragging(); + this.set({visible:!0}); + this.dragMode = Entry.DRAG_MODE_NONE; + if (f === Entry.Workspace.MODE_VIMBOARD) { + b instanceof Entry.BlockMenu ? (b.terminateDrag(), this.vimBoardEvent(a, "dragEnd", e)) : b.clear(); + } else { + if (d === Entry.DRAG_MODE_DRAG) { + (d = this.dragInstance && this.dragInstance.isNew) && (b.workspace.blockMenu.terminateDrag() || e._updatePos()); + var g = Entry.GlobalSvg; + a = !1; + f = this.block.getPrevBlock(this.block); + a = !1; + switch(Entry.GlobalSvg.terminateDrag(this)) { + case g.DONE: + g = b.magnetedBlockView; + g instanceof Entry.BlockView && (g = g.block); + f && !g ? Entry.do("separateBlock", e) : f || g || d ? g ? ("next" === g.view.magneting ? (a = e.getLastBlock(), Entry.do("insertBlock", g, a).isPass(d)) : Entry.do("insertBlock", e, g).isPass(d), createjs.Sound.play("entryMagneting"), a = !0) : Entry.do("moveBlock", e).isPass(d) : e.getThread().view.isGlobal() ? Entry.do("moveBlock", e) : Entry.do("separateBlock", e); + break; + case g.RETURN: + e = this.block; + d = this.originPos; + f ? (this.set({animating:!1}), createjs.Sound.play("entryMagneting"), this.bindPrev(f), e.insert(f)) : (f = e.getThread().view.getParent(), f instanceof Entry.Board ? this._moveTo(d.x, d.y, !1) : (createjs.Sound.play("entryMagneting"), Entry.do("insertBlock", e, f))); + break; + case g.REMOVE: + createjs.Sound.play("entryDelete"), d ? this.block.destroy(!1, !0) : this.block.doDestroyBelow(!1); + } + b.setMagnetedBlock(null); + a && Entry.ConnectionRipple.setView(e.view).dispose(); + } + } + this.destroyShadow(); + delete this.originPos; + this.dominate(); + }; + b._updateCloseBlock = function() { + var a = this.getBoard(), b; + if (this._skeleton.magnets) { + for (var d in this.magnet) { + if (b = "next" === d ? this.getBoard().getNearestMagnet(this.x, this.y + this.getBelowHeight(), d) : this.getBoard().getNearestMagnet(this.x, this.y, d)) { + return a.setMagnetedBlock(b.view, d); + } + } + a.setMagnetedBlock(null); + } + }; + b.dominate = function() { + this.block.getThread().view.dominate(); + }; + b.getSvgRoot = function() { + for (var a = this.getBoard().svgBlockGroup, b = this.svgGroup;b.parentNode !== a;) { + b = b.parentNode; + } + return b; + }; + b.getBoard = function() { + return this._board; + }; + b._setBoard = function() { + this._board = this._board.code.board; + }; + b.destroy = function(a) { + this._destroyObservers(); + var b = this.svgGroup; + a ? $(b).fadeOut(100, function() { + b.remove(); + }) : b.remove(); + this._contents.forEach(function(a) { + a.constructor !== Entry.Block && a.destroy(); + }); + var d = this.block; + (a = d.events.viewDestroy) && !this.isInBlockMenu && a.forEach(function(a) { + Entry.Utils.isFunction(a) && a(d); + }); + this._schemaChangeEvent && this._schemaChangeEvent.destroy(); + }; + b.getShadow = function() { + this._shadow || (this._shadow = Entry.SVG.createElement(this.svgGroup.cloneNode(!0), {opacity:.5}), this.getBoard().svgGroup.appendChild(this._shadow)); + return this._shadow; + }; + b.destroyShadow = function() { + this._shadow && (this._shadow.remove(), delete this._shadow); + }; + b._updateMagnet = function() { + if (this._skeleton.magnets) { + var a = this._skeleton.magnets(this); + a.next && this._nextGroup.attr("transform", "translate(" + a.next.x + "," + a.next.y + ")"); + this.magnet = a; + this.block.getThread().changeEvent.notify(); + } + }; + b._updateBG = function() { + if (this._board.dragBlock && this._board.dragBlock.dragInstance) { + var a = this.svgGroup; + if (this.magnet.next) { + if (a = this.magneting) { + var b = this._board.dragBlock.getShadow(), d = this.getAbsoluteCoordinate(), e; + if ("previous" === a) { + e = this.magnet.next, e = "translate(" + (d.x + e.x) + "," + (d.y + e.y) + ")"; + } else { + if ("next" === a) { + e = this.magnet.previous; + var f = this._board.dragBlock.getBelowHeight(); + e = "translate(" + (d.x + e.x) + "," + (d.y + e.y - f) + ")"; + } + } + $(b).attr({transform:e, display:"block"}); + this._clonedShadow = b; + this.background && (this.background.remove(), this.nextBackground.remove(), delete this.background, delete this.nextBackground); + "previous" === a && (a = this._board.dragBlock.getBelowHeight() + this.offsetY, this.originalHeight = this.offsetY, this.set({offsetY:a})); + } else { + this._clonedShadow && (this._clonedShadow.attr({display:"none"}), delete this._clonedShadow), a = this.originalHeight, void 0 !== a && (this.background && (this.background.remove(), this.nextBackground.remove(), delete this.background, delete this.nextBackground), this.set({offsetY:a}), delete this.originalHeight); + } + (a = this.block.thread.changeEvent) && a.notify(); + } else { + this.magneting ? (a.attr({filter:"url(#entryBlockHighlightFilter_" + this.getBoard().suffix + ")"}), a.addClass("outputHighlight")) : (a.removeClass("outputHighlight"), a.removeAttr("filter")); + } + } + }; + b.addDragging = function() { + this.svgGroup.addClass("dragging"); + }; + b.removeDragging = function() { + this.svgGroup.removeClass("dragging"); + }; + b.addSelected = function() { + this.svgGroup.addClass("selected"); + }; + b.removeSelected = function() { + this.svgGroup.removeClass("selected"); + }; + b.getSkeleton = function() { + return this._skeleton; + }; + b.getContentPos = function() { + return this._skeleton.contentPos(this); + }; + b.renderText = function() { + this._startContentRender(Entry.Workspace.MODE_VIMBOARD); + }; + b.renderBlock = function() { + this._startContentRender(Entry.Workspace.MODE_BOARD); + }; + b._updateOpacity = function() { + this.svgGroup.attr({opacity:!1 === this.visible ? 0 : 1}); + this.visible && this._setPosition(); + }; + b._updateShadow = function() { + this.shadow && Entry.Utils.colorDarken(this._schema.color, .7); + }; + b._setMovable = function() { + this.movable = null !== this.block.isMovable() ? this.block.isMovable() : void 0 !== this._skeleton.movable ? this._skeleton.movable : !0; + }; + b._setReadOnly = function() { + this.readOnly = null !== this.block.isReadOnly() ? this.block.isReadOnly() : void 0 !== this._skeleton.readOnly ? this._skeleton.readOnly : !1; + }; + b._setCopyable = function() { + this.copyable = null !== this.block.isCopyable() ? this.block.isCopyable() : void 0 !== this._skeleton.copyable ? this._skeleton.copyable : !0; + }; + b.bumpAway = function(a, b) { + var d = this; + a = a || 15; + b ? window.setTimeout(function() { + d._moveBy(a, a, !1); + }, b) : d._moveBy(a, a, !1); + }; + b.bindPrev = function(a) { + if (a) { + if (this._toLocalCoordinate(a.view._nextGroup), (a = a.getNextBlock()) && a !== this.block) { + var b = this.block.getLastBlock(); + b.view.magnet.next ? a.view._toLocalCoordinate(b.view._nextGroup) : (a.view._toGlobalCoordinate(), a.separate(), a.view.bumpAway(null, 100)); + } + } else { + if (a = this.block.getPrevBlock()) { + this._toLocalCoordinate(a.view._nextGroup), (a = this.block.getNextBlock()) && a.view && a.view._toLocalCoordinate(this._nextGroup); + } + } + }; + b.getAbsoluteCoordinate = function(a) { + a = void 0 !== a ? a : this.dragMode; + if (a === Entry.DRAG_MODE_DRAG) { + return {x:this.x, y:this.y}; + } + a = this.block.getThread().view.requestAbsoluteCoordinate(this); + a.x += this.x; + a.y += this.y; + return a; + }; + b.getBelowHeight = function() { + return this.block.getThread().view.requestPartHeight(this); + }; + b._updateDisplay = function() { + this.svgGroup.attr({display:!1 === this.display ? "none" : "block"}); + this.display && this._setPosition(); + }; + b._updateColor = function() { + var a = this._schema.color; + this.block.deletable === Entry.Block.DELETABLE_FALSE_LIGHTEN && (a = Entry.Utils.colorLighten(a)); + this._fillColor = a; + this._path.attr({fill:a}); + this._updateContents(); + }; + b._updateContents = function() { + for (var a = 0;a < this._contents.length;a++) { + this._contents[a].renderStart(); + } + this.alignContent(!1); + }; + b._destroyObservers = function() { + for (var a = this._observers;a.length;) { + a.pop().destroy(); + } + }; + b._changeFill = function(a) { + var b = this.getBoard(); + if (b.patternRect && !b.dragBlock) { + var d = this._path, e = this._fillColor; + a && (b = this.getBoard(), b.setPatternRectFill(e), e = "url(#blockHoverPattern_" + this.getBoard().suffix + ")"); + d.attr({fill:e}); + } + }; + b.addActivated = function() { + this.svgGroup.addClass("activated"); + }; + b.removeActivated = function() { + this.svgGroup.removeClass("activated"); + }; + b.reDraw = function() { + var a = this.block; + this._updateContents(); + var b = a.params; + if (b) { + for (var d = 0;d < b.length;d++) { + var e = b[d]; + e instanceof Entry.Block && e.view.reDraw(); + } + } + if (a = a.statements) { + for (d = 0;d < a.length;d++) { + a[d].view.reDraw(); + } + } + }; + b.getParam = function(a) { + return this._paramMap[a]; + }; +})(Entry.BlockView.prototype); +Entry.Code = function(b, a) { + Entry.Model(this, !1); + a && (this.object = a); + this._data = new Entry.Collection; + this._eventMap = {}; + this._blockMap = {}; + this.executors = []; + this.executeEndEvent = new Entry.Event(this); + this.changeEvent = new Entry.Event(this); + this.changeEvent.attach(this, this._handleChange); + this._maxZIndex = 0; + this.load(b); +}; +Entry.STATEMENT = 0; +Entry.PARAM = -1; +(function(b) { + b.schema = {view:null, board:null}; + b.load = function(a) { + a instanceof Array || (a = JSON.parse(a)); + this.clear(); + for (var b = 0;b < a.length;b++) { + this._data.push(new Entry.Thread(a[b], this)); + } + return this; + }; + b.clear = function() { + for (var a = this._data.length - 1;0 <= a;a--) { + this._data[a].destroy(!1); + } + this.clearExecutors(); + this._eventMap = {}; + }; + b.createView = function(a) { + null === this.view ? this.set({view:new Entry.CodeView(this, a), board:a}) : (this.set({board:a}), a.bindCodeView(this.view)); + }; + b.registerEvent = function(a, b) { + this._eventMap[b] || (this._eventMap[b] = []); + this._eventMap[b].push(a); + }; + b.unregisterEvent = function(a, b) { + var d = this._eventMap[b]; + if (d && 0 !== d.length) { + var e = d.indexOf(a); + 0 > e || d.splice(e, 1); + } + }; + b.raiseEvent = function(a, b, d) { + a = this._eventMap[a]; + var e = []; + if (void 0 !== a) { + for (var f = 0;f < a.length;f++) { + var g = a[f]; + if (void 0 === d || -1 < g.params.indexOf(d)) { + g = new Entry.Executor(a[f], b), this.executors.push(g), e.push(g); + } + } + return e; + } + }; + b.getEventMap = function(a) { + return this._eventMap[a]; + }; + b.map = function(a) { + this._data.map(a); + }; + b.tick = function() { + for (var a = this.executors, b = 0;b < a.length;b++) { + var d = a[b]; + d.isEnd() || d.execute(); + d.isEnd() && (a.splice(b, 1), b--, 0 === a.length && this.executeEndEvent.notify()); + } + }; + b.removeExecutor = function(a) { + a = this.executors.indexOf(a); + -1 < a && this.executors.splice(a, 1); + }; + b.clearExecutors = function() { + this.executors = []; + }; + b.clearExecutorsByEntity = function(a) { + for (var b = this.executors, d = 0;d < b.length;d++) { + var e = b[d]; + e.entity === a && e.end(); + } + }; + b.addExecutor = function(a) { + this.executors.push(a); + }; + b.createThread = function(a, b) { + if (!(a instanceof Array)) { + return console.error("blocks must be array"); + } + var d = new Entry.Thread(a, this); + void 0 === b ? this._data.push(d) : this._data.insert(d, b); + return d; + }; + b.cloneThread = function(a, b) { + var d = a.clone(this, b); + this._data.push(d); + return d; + }; + b.destroyThread = function(a, b) { + var d = this._data, e = d.indexOf(a); + 0 > e || d.splice(e, 1); + }; + b.doDestroyThread = function(a, b) { + var d = this._data, e = d.indexOf(a); + 0 > e || d.splice(e, 1); + }; + b.getThreads = function() { + return this._data.map(function(a) { + return a; + }); + }; + b.toJSON = function() { + for (var a = this.getThreads(), b = [], d = 0, e = a.length;d < e;d++) { + b.push(a[d].toJSON()); + } + return b; + }; + b.countBlock = function() { + for (var a = this.getThreads(), b = 0, d = 0;d < a.length;d++) { + b += a[d].countBlock(); + } + return b; + }; + b.moveBy = function(a, b) { + for (var d = this.getThreads(), e = 0, f = d.length;e < f;e++) { + var g = d[e].getFirstBlock(); + g && g.view._moveBy(a, b, !1); + } + d = this.board; + d instanceof Entry.BlockMenu && d.updateSplitters(b); + }; + b.stringify = function() { + return JSON.stringify(this.toJSON()); + }; + b.dominate = function(a) { + a.view.setZIndex(this._maxZIndex++); + }; + b.indexOf = function(a) { + return this._data.indexOf(a); + }; + b._handleChange = function() { + Entry.creationChangedEvent && Entry.creationChangedEvent.notify(); + }; + b.hasBlockType = function(a) { + for (var b = this.getThreads(), d = 0;d < b.length;d++) { + if (b[d].hasBlockType(a)) { + return !0; + } + } + return !1; + }; + b.findById = function(a) { + return this._blockMap[a]; + }; + b.registerBlock = function(a) { + this._blockMap[a.id] = a; + }; + b.unregisterBlock = function(a) { + delete this._blockMap[a.id]; + }; + b.getByPointer = function(a) { + a = a.concat(); + a.shift(); + a.shift(); + for (var b = this._data[a.shift()].getBlock(a.shift());a.length;) { + b instanceof Entry.Block || (b = b.getValueBlock()); + var d = a.shift(), e = a.shift(); + -1 < d ? b = b.statements[d].getBlock(e) : -1 === d && (b = b.view.getParam(e)); + } + return b; + }; + b.getTargetByPointer = function(a) { + a = a.concat(); + a.shift(); + a.shift(); + var b = this._data[a.shift()], d; + if (1 === a.length) { + d = b.getBlock(a.shift() - 1); + } else { + for (d = b.getBlock(a.shift());a.length;) { + d instanceof Entry.Block || (d = d.getValueBlock()); + var e = a.shift(), b = a.shift(); + -1 < e ? (d = d.statements[e], d = a.length ? d.getBlock(b) : 0 === b ? d.view.getParent() : d.getBlock(b - 1)) : -1 === e && (d = d.view.getParam(b)); + } + } + return d; + }; + b.getBlockList = function(a) { + for (var b = this.getThreads(), d = [], e = 0;e < b.length;e++) { + d = d.concat(b[e].getBlockList(a)); + } + return d; + }; +})(Entry.Code.prototype); +Entry.CodeView = function(b, a) { + Entry.Model(this, !1); + this.code = b; + this.set({board:a}); + this.svgThreadGroup = a.svgGroup.elem("g"); + this.svgThreadGroup.attr({class:"svgThreadGroup"}); + this.svgThreadGroup.board = a; + this.svgBlockGroup = a.svgGroup.elem("g"); + this.svgBlockGroup.attr({class:"svgBlockGroup"}); + this.svgBlockGroup.board = a; + a.bindCodeView(this); + this.code.map(function(b) { + b.createView(a); + }); + b.observe(this, "_setBoard", ["board"]); +}; +(function(b) { + b.schema = {board:null, scrollX:0, scrollY:0}; + b._setBoard = function() { + this.set({board:this.code.board}); + }; + b.reDraw = function() { + this.code.map(function(a) { + a.view.reDraw(); + }); + }; +})(Entry.CodeView.prototype); +Entry.ConnectionRipple = {}; +(function(b) { + b.createDom = function(a) { + this.svgDom || (this._ripple = a.getBoard().svgGroup.elem("circle", {cx:0, cy:0, r:0, stroke:"#888", "stroke-width":10})); + }; + b.setView = function(a) { + this._ripple || this.createDom(a); + var b = this._ripple, d = a.getBoard().svgGroup; + b.remove(); + a = a.getAbsoluteCoordinate(); + b.attr({cx:a.x, cy:a.y}); + d.appendChild(b); + b._startTime = new Date; + return this; + }; + b.dispose = function() { + var a = this, b = this._ripple, d = (new Date - b._startTime) / 150; + 1 < d ? b.remove() : (b.attr({r:25 * d, opacity:1 - d}), window.setTimeout(function() { + a.dispose(); + }, 10)); + }; +})(Entry.ConnectionRipple); +Entry.Executor = function(b, a) { + this.scope = new Entry.Scope(b, this); + this.entity = a; + this._callStack = []; + this.register = {}; +}; +(function(b) { + b.execute = function() { + if (!this.isEnd()) { + for (;;) { + var a = this.scope.block.getSchema().func.call(this.scope, this.entity, this.scope); + if (void 0 === a || null === a || a === Entry.STATIC.PASS) { + if (this.scope = new Entry.Scope(this.scope.block.getNextBlock(), this), null === this.scope.block) { + if (this._callStack.length) { + if (a = this.scope, this.scope = this._callStack.pop(), this.scope.isLooped !== a.isLooped) { + break; + } + } else { + break; + } + } + } else { + if (a !== Entry.STATIC.CONTINUE && (a === Entry.STATIC.BREAK || this.scope === a)) { + break; + } + } + } + } + }; + b.stepInto = function(a) { + a instanceof Entry.Thread || console.error("Must step in to thread"); + a = a.getFirstBlock(); + if (!a) { + return Entry.STATIC.BREAK; + } + this._callStack.push(this.scope); + this.scope = new Entry.Scope(a, this); + return Entry.STATIC.CONTINUE; + }; + b.break = function() { + this._callStack.length && (this.scope = this._callStack.pop()); + return Entry.STATIC.PASS; + }; + b.breakLoop = function() { + this._callStack.length && (this.scope = this._callStack.pop()); + for (;this._callStack.length && "repeat" !== Entry.block[this.scope.block.type].class;) { + this.scope = this._callStack.pop(); + } + return Entry.STATIC.PASS; + }; + b.end = function() { + this.scope.block = null; + }; + b.isEnd = function() { + return null === this.scope.block; + }; +})(Entry.Executor.prototype); +Entry.Scope = function(b, a) { + this.type = (this.block = b) ? b.type : null; + this.executor = a; + this.entity = a.entity; +}; +(function(b) { + b.callReturn = function() { + }; + b.getParam = function(a) { + a = this.block.params[a]; + var b = new Entry.Scope(a, this.executor); + return Entry.block[a.type].func.call(b, this.entity, b); + }; + b.getParams = function() { + var a = this; + return this.block.params.map(function(b) { + if (b instanceof Entry.Block) { + var d = new Entry.Scope(b, a.executor); + return Entry.block[b.type].func.call(d, a.entity, d); + } + return b; + }); + }; + b.getValue = function(a, b) { + var d = this.block.params[this._getParamIndex(a, b)], e = new Entry.Scope(d, this.executor); + return Entry.block[d.type].func.call(e, this.entity, e); + }; + b.getStringValue = function(a, b) { + return String(this.getValue(a, b)); + }; + b.getNumberValue = function(a, b) { + return Number(this.getValue(a)); + }; + b.getBooleanValue = function(a, b) { + return Number(this.getValue(a, b)) ? !0 : !1; + }; + b.getField = function(a, b) { + return this.block.params[this._getParamIndex(a)]; + }; + b.getStringField = function(a, b) { + return String(this.getField(a)); + }; + b.getNumberField = function(a) { + return Number(this.getField(a)); + }; + b.getStatement = function(a, b) { + return this.executor.stepInto(this.block.statements[this._getStatementIndex(a, b)]); + }; + b._getParamIndex = function(a) { + return Entry.block[this.type].paramsKeyMap[a]; + }; + b._getStatementIndex = function(a) { + return Entry.block[this.type].statementsKeyMap[a]; + }; + b.die = function() { + this.block = null; + return Entry.STATIC.BREAK; + }; +})(Entry.Scope.prototype); +Entry.Field = function() { +}; +(function(b) { + b.TEXT_LIMIT_LENGTH = 20; + b.destroy = function() { + this.destroyOption(); + }; + b.command = function() { + this._startValue && (this._startValue === this.getValue() || this._blockView.isInBlockMenu || Entry.do("setFieldValue", this._block, this, this.pointer(), this._startValue, this.getValue())); + delete this._startValue; + }; + b.destroyOption = function() { + this.documentDownEvent && (Entry.documentMousedown.detach(this.documentDownEvent), delete this.documentDownEvent); + this.disposeEvent && (Entry.disposeEvent.detach(this.disposeEvent), delete this.documentDownEvent); + this.optionGroup && (this.optionGroup.remove(), delete this.optionGroup); + this.command(); + }; + b._attachDisposeEvent = function(a) { + var b = this; + b.disposeEvent = Entry.disposeEvent.attach(b, a || function() { + b.destroyOption(); + }); + }; + b.align = function(a, b, d) { + var e = this.svgGroup; + this._position && (this._position.x && (a = this._position.x), this._position.y && (b = this._position.y)); + var f = "translate(" + a + "," + b + ")"; + void 0 === d || d ? e.animate({transform:f}, 300, mina.easeinout) : e.attr({transform:f}); + this.box.set({x:a, y:b}); + }; + b.getAbsolutePosFromBoard = function() { + var a = this._block.view, b = a.getContentPos(), a = a.getAbsoluteCoordinate(); + return {x:a.x + this.box.x + b.x, y:a.y + this.box.y + b.y}; + }; + b.getAbsolutePosFromDocument = function() { + var a = this._block.view, b = a.getContentPos(), d = a.getAbsoluteCoordinate(), a = a.getBoard().svgDom.offset(); + return {x:d.x + this.box.x + b.x + a.left, y:d.y + this.box.y + b.y + a.top}; + }; + b.getRelativePos = function() { + var a = this._block.view.getContentPos(), b = this.box; + return {x:b.x + a.x, y:b.y + a.y}; + }; + b.truncate = function() { + var a = String(this.getValue()), b = this.TEXT_LIMIT_LENGTH, d = a.substring(0, b); + a.length > b && (d += "..."); + return d; + }; + b.appendSvgOptionGroup = function() { + return this._block.view.getBoard().svgGroup.elem("g"); + }; + b.getValue = function() { + return this._block.params[this._index]; + }; + b.setValue = function(a, b) { + this.value != a && (this.value = a, this._block.params[this._index] = a, b && this._blockView.reDraw()); + }; + b._isEditable = function() { + if (this._block.view.dragMode == Entry.DRAG_MODE_DRAG) { + return !1; + } + var a = this._block.view, b = a.getBoard(); + if (!0 === b.disableMouseEvent) { + return !1; + } + var d = b.workspace.selectedBlockView; + if (!d || b != d.getBoard()) { + return !1; + } + b = a.getSvgRoot(); + return b == d.svgGroup || $(b).has($(a.svgGroup)); + }; + b._selectBlockView = function() { + var a = this._block.view; + a.getBoard().setSelectedBlock(a); + }; + b._bindRenderOptions = function() { + var a = this; + $(this.svgGroup).bind("mouseup touchend", function(b) { + a._isEditable() && (a.destroyOption(), a._startValue = a.getValue(), a.renderOptions()); + }); + }; + b.pointer = function(a) { + a = a || []; + a.unshift(this._index); + a.unshift(Entry.PARAM); + return this._block.pointer(a); + }; +})(Entry.Field.prototype); +Entry.FieldAngle = function(b, a, c) { + this._block = a.block; + this._blockView = a; + this.box = new Entry.BoxModel; + this.svgGroup = null; + this.position = b.position; + this._contents = b; + this._index = c; + b = this.getValue(); + this.setValue(this.modValue(void 0 !== b ? b : 90)); + this.renderStart(); +}; +Entry.Utils.inherit(Entry.Field, Entry.FieldAngle); +(function(b) { + b.renderStart = function() { + this.svgGroup && $(this.svgGroup).remove(); + this.svgGroup = this._blockView.contentSvgGroup.elem("g", {class:"entry-input-field"}); + this.textElement = this.svgGroup.elem("text", {x:4, y:4, "font-size":"9pt"}); + this.textElement.textContent = this.getText(); + var a = this.getTextWidth(), b = this.position && this.position.y ? this.position.y : 0; + this._header = this.svgGroup.elem("rect", {x:0, y:b - 8, rx:3, ry:3, width:a, height:16, rx:3, ry:3, fill:"#fff", "fill-opacity":.4}); + this.svgGroup.appendChild(this.textElement); + this._bindRenderOptions(); + this.box.set({x:0, y:0, width:a, height:16}); + }; + b.renderOptions = function() { + var a = this; + this._attachDisposeEvent(function() { + a.applyValue(); + a.destroyOption(); + }); + this.optionGroup = Entry.Dom("input", {class:"entry-widget-input-field", parent:$("body")}); + this.optionGroup.val(this.value); + this.optionGroup.on("mousedown", function(a) { + a.stopPropagation(); + }); + this.optionGroup.on("keyup", function(b) { + var c = b.keyCode || b.which; + a.applyValue(b); + -1 < [13, 27].indexOf(c) && a.destroyOption(); + }); + var b = this.getAbsolutePosFromDocument(); + b.y -= this.box.height / 2; + this.optionGroup.css({height:16, left:b.x, top:b.y, width:a.box.width}); + this.optionGroup.select(); + this.svgOptionGroup = this.appendSvgOptionGroup(); + this.svgOptionGroup.elem("circle", {x:0, y:0, r:49, class:"entry-field-angle-circle"}); + this._dividerGroup = this.svgOptionGroup.elem("g"); + for (b = 0;360 > b;b += 15) { + this._dividerGroup.elem("line", {x1:49, y1:0, x2:49 - (0 === b % 45 ? 10 : 5), y2:0, transform:"rotate(" + b + ", 0, 0)", class:"entry-angle-divider"}); + } + b = this.getAbsolutePosFromBoard(); + b.x += this.box.width / 2; + b.y = b.y + this.box.height / 2 + 49 + 1; + this.svgOptionGroup.attr({class:"entry-field-angle", transform:"translate(" + b.x + "," + b.y + ")"}); + var b = a.getAbsolutePosFromDocument(), d = [b.x + a.box.width / 2, b.y + a.box.height / 2 + 1]; + $(this.svgOptionGroup).mousemove(function(b) { + a.optionGroup.val(a.modValue(function(a, b) { + var c = b[0] - a[0], d = b[1] - a[1] - 49 - 1, e = Math.atan(-d / c), e = Entry.toDegrees(e), e = 90 - e; + 0 > c ? e += 180 : 0 < d && (e += 360); + return 15 * Math.round(e / 15); + }(d, [b.clientX, b.clientY]))); + a.applyValue(); + }); + this.updateGraph(); + }; + b.updateGraph = function() { + this._fillPath && this._fillPath.remove(); + var a = Entry.toRadian(this.getValue()), b = 49 * Math.sin(a), d = -49 * Math.cos(a), a = a > Math.PI ? 1 : 0; + this._fillPath = this.svgOptionGroup.elem("path", {d:"M 0,0 v -49 A 49,49 0 %LARGE 1 %X,%Y z".replace("%X", b).replace("%Y", d).replace("%LARGE", a), class:"entry-angle-fill-area"}); + this.svgOptionGroup.appendChild(this._dividerGroup); + this._indicator && this._indicator.remove(); + this._indicator = this.svgOptionGroup.elem("line", {x1:0, y1:0, x2:b, y2:d}); + this._indicator.attr({class:"entry-angle-indicator"}); + }; + b.applyValue = function() { + var a = this.optionGroup.val(); + isNaN(a) || (a = this.modValue(a), this.setValue(a), this.updateGraph(), this.textElement.textContent = this.getValue(), this.optionGroup && this.optionGroup.val(a), this.resize()); + }; + b.resize = function() { + var a = this.getTextWidth(); + this._header.attr({width:a}); + this.optionGroup && this.optionGroup.css({width:a}); + this.box.set({width:a}); + this._block.view.alignContent(); + }; + b.getTextWidth = function() { + return this.textElement ? this.textElement.getComputedTextLength() + 8 : 8; + }; + b.getText = function() { + return this.getValue() + "\u00b0"; + }; + b.modValue = function(a) { + return a % 360; + }; + b.destroyOption = function() { + this.disposeEvent && (Entry.disposeEvent.detach(this.disposeEvent), delete this.documentDownEvent); + this.optionGroup && (this.optionGroup.remove(), delete this.optionGroup); + this.svgOptionGroup && (this.svgOptionGroup.remove(), delete this.svgOptionGroup); + this.textElement.textContent = this.getText(); + this.command(); + }; +})(Entry.FieldAngle.prototype); +Entry.FieldBlock = function(b, a, c, d, e) { + Entry.Model(this, !1); + this._blockView = a; + this._block = a.block; + this._valueBlock = null; + this.box = new Entry.BoxModel; + this.changeEvent = new Entry.Event(this); + this._index = c; + this.contentIndex = e; + this._content = b; + this.acceptType = b.accept; + this._restoreCurrent = b.restore; + this.view = this; + this.svgGroup = null; + this._position = b.position; + this.box.observe(a, "alignContent", ["width", "height"]); + this.observe(this, "_updateBG", ["magneting"], !1); + this.renderStart(a.getBoard(), d); +}; +Entry.Utils.inherit(Entry.Field, Entry.FieldBlock); +(function(b) { + b.schema = {magneting:!1}; + b.renderStart = function(a, b) { + this.svgGroup = this._blockView.contentSvgGroup.elem("g"); + this.view = this; + this._nextGroup = this.svgGroup; + this.box.set({x:0, y:0, width:0, height:20}); + var d = this.getValue(); + d && !d.view && (d.setThread(this), d.createView(a, b), d.getThread().view.setParent(this)); + this.updateValueBlock(d); + this._blockView.getBoard().constructor !== Entry.Board && this._valueBlock.view.removeControl(); + }; + b.align = function(a, b, d) { + var e = this.svgGroup; + this._position && (this._position.x && (a = this._position.x), this._position.y && (b = this._position.y)); + var f = this._valueBlock; + f && (b = -.5 * f.view.height); + f = "translate(" + a + "," + b + ")"; + void 0 === d || d ? e.animate({transform:f}, 300, mina.easeinout) : e.attr({transform:f}); + this.box.set({x:a, y:b}); + }; + b.calcWH = function() { + var a = this._valueBlock; + a ? (a = a.view, this.box.set({width:a.width, height:a.height})) : this.box.set({width:15, height:20}); + }; + b.calcHeight = b.calcWH; + b.destroy = function() { + }; + b.inspectBlock = function() { + var a = null; + if (this._originBlock) { + a = this._originBlock.type, delete this._originBlock; + } else { + switch(this.acceptType) { + case "boolean": + a = "True"; + break; + case "string": + a = "text"; + break; + case "param": + a = "function_field_label"; + } + } + return this._createBlockByType(a); + }; + b._setValueBlock = function(a) { + this._restoreCurrent && (this._originBlock = this._valueBlock); + a || (a = this.inspectBlock()); + this._valueBlock = a; + this.setValue(a); + a.setThread(this); + a.getThread().view.setParent(this); + return this._valueBlock; + }; + b.getValueBlock = function() { + return this._valueBlock; + }; + b.updateValueBlock = function(a) { + a instanceof Entry.Block || (a = void 0); + this._destroyObservers(); + a = this._setValueBlock(a).view; + a.bindPrev(this); + this._blockView.alignContent(); + this._posObserver = a.observe(this, "updateValueBlock", ["x", "y"], !1); + this._sizeObserver = a.observe(this, "calcWH", ["width", "height"]); + a = this._blockView.getBoard(); + a.constructor === Entry.Board && a.generateCodeMagnetMap(); + }; + b._destroyObservers = function() { + this._sizeObserver && this._sizeObserver.destroy(); + this._posObserver && this._posObserver.destroy(); + }; + b.getPrevBlock = function(a) { + return this._valueBlock === a ? this : null; + }; + b.getNextBlock = function() { + return null; + }; + b.requestAbsoluteCoordinate = function(a) { + a = this._blockView; + var b = a.contentPos; + a = a.getAbsoluteCoordinate(); + a.x += this.box.x + b.x; + a.y += this.box.y + b.y; + return a; + }; + b.dominate = function() { + this._blockView.dominate(); + }; + b.isGlobal = function() { + return !1; + }; + b.separate = function(a) { + this.getCode().createThread([a]); + this.calcWH(); + this.changeEvent.notify(); + }; + b.getCode = function() { + return this._block.thread.getCode(); + }; + b.cut = function(a) { + return this._valueBlock === a ? [a] : null; + }; + b.replace = function(a) { + "string" === typeof a && (a = this._createBlockByType(a)); + var b = this._valueBlock; + Entry.block[b.type].isPrimitive ? (b.doNotSplice = !0, b.destroy()) : "param" === this.acceptType ? (this._destroyObservers(), b.view._toGlobalCoordinate(), a.getTerminateOutputBlock().view._contents[1].replace(b)) : (this._destroyObservers(), b.view._toGlobalCoordinate(), this.separate(b), b.view.bumpAway(30, 150)); + this.updateValueBlock(a); + a.view._toLocalCoordinate(this.svgGroup); + this.calcWH(); + this.changeEvent.notify(); + }; + b.setParent = function(a) { + this._parent = a; + }; + b.getParent = function() { + return this._parent; + }; + b._createBlockByType = function(a) { + this._block.getThread(); + var b = this._blockView.getBoard(); + a = new Entry.Block({type:a}, this); + var d = b.workspace, e; + d && (e = d.getMode()); + a.createView(b, e); + return a; + }; + b.spliceBlock = function() { + this.updateValueBlock(); + }; + b._updateBG = function() { + this.magneting ? this._bg = this.svgGroup.elem("path", {d:"m 8,12 l -4,0 -2,-2 0,-3 3,0 1,-1 0,-12 -1,-1 -3,0 0,-3 2,-2 l 4,0 z", fill:"#fff", stroke:"#fff", "fill-opacity":.7, transform:"translate(0,12)"}) : this._bg && (this._bg.remove(), delete this._bg); + }; + b.getThread = function() { + return this; + }; + b.pointer = function(a) { + a.unshift(this._index); + a.unshift(Entry.PARAM); + return this._block.pointer(a); + }; +})(Entry.FieldBlock.prototype); +Entry.FieldColor = function(b, a, c) { + this._block = a.block; + this._blockView = a; + this.box = new Entry.BoxModel; + this.svgGroup = null; + this._contents = b; + this._index = c; + this._position = b.position; + this.key = b.key; + this.setValue(this.getValue() || "#FF0000"); + this.renderStart(a); +}; +Entry.Utils.inherit(Entry.Field, Entry.FieldColor); +(function(b) { + b.renderStart = function() { + this.svgGroup && $(this.svgGroup).remove(); + this.svgGroup = this._blockView.contentSvgGroup.elem("g", {class:"entry-field-color"}); + var a = this._position, b; + a ? (b = a.x || 0, a = a.y || 0) : (b = 0, a = -8); + this._header = this.svgGroup.elem("rect", {x:b, y:a, width:14.5, height:16, fill:this.getValue()}); + this._bindRenderOptions(); + this.box.set({x:b, y:a, width:14.5, height:16}); + }; + b.renderOptions = function() { + var a = this; + this._attachDisposeEvent(); + var b = Entry.FieldColor.getWidgetColorList(); + this.optionGroup = Entry.Dom("table", {class:"entry-widget-color-table", parent:$("body")}); + for (var d = 0;d < b.length;d++) { + for (var e = Entry.Dom("tr", {class:"entry-widget-color-row", parent:this.optionGroup}), f = 0;f < b[d].length;f++) { + var g = Entry.Dom("td", {class:"entry-widget-color-cell", parent:e}), h = b[d][f]; + g.css({"background-color":h}); + g.attr({"data-color-value":h}); + (function(b, c) { + b.mousedown(function(a) { + a.stopPropagation(); + }); + b.mouseup(function(b) { + a.applyValue(c); + a.destroyOption(); + a._selectBlockView(); + }); + })(g, h); + } + } + b = this.getAbsolutePosFromDocument(); + b.y += this.box.height / 2 + 1; + this.optionGroup.css({left:b.x, top:b.y}); + }; + b.applyValue = function(a) { + this.value != a && (this.setValue(a), this._header.attr({fill:a})); + }; +})(Entry.FieldColor.prototype); +Entry.FieldColor.getWidgetColorList = function() { + return ["#FFFFFF #CCCCCC #C0C0C0 #999999 #666666 #333333 #000000".split(" "), "#FFCCCC #FF6666 #FF0000 #CC0000 #990000 #660000 #330000".split(" "), "#FFCC99 #FF9966 #FF9900 #FF6600 #CC6600 #993300 #663300".split(" "), "#FFFF99 #FFFF66 #FFCC66 #FFCC33 #CC9933 #996633 #663333".split(" "), "#FFFFCC #FFFF33 #FFFF00 #FFCC00 #999900 #666600 #333300".split(" "), "#99FF99 #66FF99 #33FF33 #33CC00 #009900 #006600 #003300".split(" "), "#99FFFF #33FFFF #66CCCC #00CCCC #339999 #336666 #003333".split(" "), "#CCFFFF #66FFFF #33CCFF #3366FF #3333FF #000099 #000066".split(" "), + "#CCCCFF #9999FF #6666CC #6633FF #6609CC #333399 #330099".split(" "), "#FFCCFF #FF99FF #CC66CC #CC33CC #993399 #663366 #330033".split(" ")]; }; -Entry.VariableContainer.prototype.generateAnswer = function(a) { - a || (a = new Entry.Variable({id:Entry.generateHash(), name:Lang.Blocks.VARIABLE_get_canvas_input_value, value:0, variableType:"answer", visible:!1, x:150, y:-100})); - a.generateView(); - Entry.container.inputValue = a; +Entry.FieldDropdown = function(b, a, c) { + this._block = a.block; + this._blockView = a; + this.box = new Entry.BoxModel; + this.svgGroup = null; + this._contents = b; + this._noArrow = b.noArrow; + this._arrowColor = b.arrowColor; + this._index = c; + this.setValue(this.getValue()); + this._CONTENT_HEIGHT = b.dropdownHeight || a.getSkeleton().dropdownHeight || 16; + this._FONT_SIZE = b.fontSize || a.getSkeleton().fontSize || 12; + this._ROUND = b.roundValue || 3; + this.renderStart(); }; -Entry.VariableContainer.prototype.generateVariableSettingView = function() { - var a = this, b = Entry.createElement("div"); - b.bindOnClick(function(b) { - b.stopPropagation(); - }); - this.variableSettingView = b; - b.addClass("entryVariableSettingWorkspace"); - this.listView_.appendChild(b); - b.addClass("entryRemove"); - var c = Entry.createElement("div"); - c.addClass("entryVariableSettingVisibleWrapperWorkspace"); - c.bindOnClick(function(b) { - b = a.selectedVariable; - var c = a.variableSettingView.visibleCheck; - b.setVisible(!b.isVisible()); - b.isVisible() ? c.addClass("entryVariableSettingChecked") : c.removeClass("entryVariableSettingChecked"); - }); - b.appendChild(c); - var d = Entry.createElement("span"); - d.innerHTML = Lang.Workspace.show_variable; - c.appendChild(d); - d = Entry.createElement("span"); - d.addClass("entryVariableSettingCheckWorkspace"); - b.visibleCheck = d; - c.appendChild(d); - c = Entry.createElement("div"); - c.addClass("entryVariableSettingInitValueWrapperWorkspace"); - b.appendChild(c); - d = Entry.createElement("span"); - d.innerHTML = Lang.Workspace.default_value; - c.appendChild(d); - d = Entry.createElement("input"); - d.addClass("entryVariableSettingInitValueInputWorkspace"); - b.initValueInput = d; - d.value = 0; - d.onkeyup = function(b) { - a.selectedVariable.setValue(this.value); +Entry.Utils.inherit(Entry.Field, Entry.FieldDropdown); +(function(b) { + b.renderStart = function() { + this.svgGroup && $(this.svgGroup).remove(); + this instanceof Entry.FieldDropdownDynamic && this._updateValue(); + var a = this._blockView; + this.svgGroup = a.contentSvgGroup.elem("g", {class:"entry-field-dropdown"}); + this.textElement = this.svgGroup.elem("text", {x:2}); + this.textElement.textContent = this.getTextByValue(this.getValue()); + var b = this.textElement.getBBox(); + this.textElement.attr({style:"white-space: pre; font-size:" + this._FONT_SIZE + "px", y:.25 * b.height}); + b = this.textElement.getComputedTextLength() + 16; + this._noArrow && (b -= 12); + var d = this._CONTENT_HEIGHT; + this._header = this.svgGroup.elem("rect", {width:b, height:d, y:-d / 2, rx:this._ROUND, ry:this._ROUND, fill:"#fff", "fill-opacity":.4}); + this.svgGroup.appendChild(this.textElement); + this._noArrow || (a = this._arrowColor || a._schema.color, this._arrow = this.svgGroup.elem("polygon", {points:"0,-2.1 6.4,-2.1 3.2,2.1", fill:a, stroke:a, transform:"translate(" + (b - 11) + ",0)"})); + this._bindRenderOptions(); + this.box.set({x:0, y:0, width:b, height:d}); + }; + b.resize = function() { + var a = this.textElement.getComputedTextLength() + 18; + this._noArrow ? a -= 14 : this._arrow.attr({transform:"translate(" + (a - 11) + ",0)"}); + this._header.attr({width:a}); + this.box.set({width:a}); + this._block.view.alignContent(); + }; + b.renderOptions = function() { + var a = this; + this._attachDisposeEvent(); + this.optionGroup = Entry.Dom("ul", {class:"entry-widget-dropdown", parent:$("body")}); + this.optionGroup.bind("mousedown touchstart", function(a) { + a.stopPropagation(); + }); + for (var b = this._contents.options, b = this._contents.options, d = 0, e = b.length;d < e;d++) { + var f = b[d], g = f[0], f = f[1], h = Entry.Dom("li", {class:"rect", parent:this.optionGroup}), k = Entry.Dom("span", {class:"left", parent:h}); + Entry.Dom("span", {class:"right", parent:h}).text(g); + this.getValue() == f && k.text("\u2713"); + (function(b, c) { + b.bind("mousedown touchstart", function(a) { + a.stopPropagation(); + }); + b.bind("mouseup touchend", function(b) { + b.stopPropagation(); + a.applyValue(c); + a.destroyOption(); + a._selectBlockView(); + }); + })(h, f); + } + this._position(); + }; + b._position = function() { + var a = this.getAbsolutePosFromDocument(); + a.y += this.box.height / 2; + var b = $(document).height(), d = this.optionGroup.height(); + if (b < a.y + d) { + a.x += this.box.width + 1; + var b = this.getAbsolutePosFromBoard(), e = this._blockView.getBoard().svgDom.height(), e = e - (e - b.y); + e - 20 < d && this.optionGroup.height(e - e % 20); + a.y -= this.optionGroup.height(); + } else { + a.x += this.box.width / 2 - this.optionGroup.width() / 2; + } + this.optionGroup.css({left:a.x, top:a.y}); }; - d.onblur = function(b) { - a.selectedVariable.setValue(this.value); + b.applyValue = function(a) { + this.value != a && this.setValue(a); + this.textElement.textContent = this.getTextByValue(a); + this.resize(); }; - b.initValueInput = d; - c.appendChild(d); - c = Entry.createElement("div"); - c.addClass("entryVariableSettingSplitterWorkspace"); - b.appendChild(c); - c = Entry.createElement("div"); - c.addClass("entryVariableSettingSlideWrapperWorkspace"); - b.appendChild(c); - d = Entry.createElement("span"); - d.innerHTML = Lang.Workspace.slide; - c.appendChild(d); - d = Entry.createElement("span"); - d.addClass("entryVariableSettingCheckWorkspace"); - b.slideCheck = d; - c.appendChild(d); - c.bindOnClick(function(b) { - var c; - b = a.selectedVariable; - var d = a.variables_, f = b.getType(); - "variable" == f ? (c = b.toJSON(), c.variableType = "slide", c = new Entry.Variable(c), d.splice(d.indexOf(b), 0, c), 0 > c.getValue() && c.setValue(0), 100 < c.getValue() && c.setValue(100), e.removeAttribute("disabled"), g.removeAttribute("disabled")) : "slide" == f && (c = b.toJSON(), c.variableType = "variable", c = new Entry.Variable(c), d.splice(d.indexOf(b), 0, c), e.setAttribute("disabled", "disabled"), g.setAttribute("disabled", "disabled")); - a.createVariableView(c); - a.removeVariable(b); - a.updateSelectedVariable(c); - c.generateView(); - }); - c = Entry.createElement("div"); - b.minMaxWrapper = c; - c.addClass("entryVariableSettingMinMaxWrapperWorkspace"); - b.appendChild(c); - d = Entry.createElement("span"); - d.innerHTML = Lang.Workspace.min_value; - c.appendChild(d); - var e = Entry.createElement("input"); - e.addClass("entryVariableSettingMinValueInputWorkspace"); - d = a.selectedVariable; - e.value = d && "slide" == d.type ? d.minValue_ : 0; - e.onblur = function(b) { - isNaN(this.value) || (b = a.selectedVariable, b.setMinValue(this.value), a.updateVariableSettingView(b)); + b.getTextByValue = function(a) { + if (!a || "null" === a) { + return Lang.Blocks.no_target; + } + for (var b = this._contents.options, d = 0, e = b.length;d < e;d++) { + var f = b[d]; + if (f[1] == a) { + return f[0]; + } + } + return Lang.Blocks.no_target; }; - b.minValueInput = e; - c.appendChild(e); - var f = Entry.createElement("span"); - f.addClass("entryVariableSettingMaxValueSpanWorkspace"); - f.innerHTML = Lang.Workspace.max_value; - c.appendChild(f); - var g = Entry.createElement("input"); - g.addClass("entryVariableSettingMaxValueInputWorkspace"); - g.value = d && "slide" == d.type ? d.maxValue_ : 100; - g.onblur = function(b) { - isNaN(this.value) || (b = a.selectedVariable, b.setMaxValue(this.value), a.updateVariableSettingView(b)); +})(Entry.FieldDropdown.prototype); +Entry.FieldDropdownDynamic = function(b, a, c) { + this._block = a.block; + this._blockView = a; + this.box = new Entry.BoxModel; + this.svgGroup = null; + this._contents = b; + this._index = c; + this._CONTENT_HEIGHT = b.dropdownHeight || a.getSkeleton().dropdownHeight || 16; + this._FONT_SIZE = b.fontSize || a.getSkeleton().fontSize || 12; + this._ROUND = b.roundValue || 3; + this.renderStart(a); +}; +Entry.Utils.inherit(Entry.FieldDropdown, Entry.FieldDropdownDynamic); +(function(b) { + b.constructor = Entry.FieldDropDownDynamic; + b._updateValue = function() { + var a = []; + Entry.container && (a = Entry.container.getDropdownList(this._contents.menuName)); + this._contents.options = a; + var a = this._contents.options, b = this.getValue(); + b && "null" != b || (b = 0 !== a.length ? a[0][1] : null); + this.setValue(b); + }; + b.renderOptions = function() { + var a = this; + this._attachDisposeEvent(); + this.optionGroup = Entry.Dom("ul", {class:"entry-widget-dropdown", parent:$("body")}); + this.optionGroup.bind("mousedown touchstart", function(a) { + a.stopPropagation(); + }); + var b = Entry.container.getDropdownList(this._contents.menuName); + this._contents.options = b; + for (var d = 0;d < b.length;d++) { + var e = b[d], f = e[0], e = e[1], g = Entry.Dom("li", {class:"rect", parent:this.optionGroup}), h = Entry.Dom("span", {class:"left", parent:g}); + Entry.Dom("span", {class:"right", parent:g}).text(f); + this.getValue() == e && h.text("\u2713"); + (function(b, c) { + b.mousedown(function(a) { + a.stopPropagation(); + }); + b.mouseup(function(b) { + b.stopPropagation(); + a.applyValue(c); + a.destroyOption(); + a._selectBlockView(); + }); + })(g, e); + } + this._position(); }; - b.maxValueInput = g; - c.appendChild(g); +})(Entry.FieldDropdownDynamic.prototype); +Entry.FieldImage = function(b, a, c) { + this._block = a.block; + this._blockView = a; + this._content = b; + this.box = new Entry.BoxModel; + this._size = b.size; + this._highlightColor = b.highlightColor ? b.highlightColor : "#F59900"; + this._position = b.position; + this._imgElement = this._path = this.svgGroup = null; + this._index = c; + this.setValue(null); + this.renderStart(); }; -Entry.VariableContainer.prototype.updateVariableSettingView = function(a) { - var b = this.variableSettingView, c = b.visibleCheck, d = b.initValueInput, e = b.slideCheck, f = b.minValueInput, g = b.maxValueInput, h = b.minMaxWrapper; - c.removeClass("entryVariableSettingChecked"); - a.isVisible() && c.addClass("entryVariableSettingChecked"); - e.removeClass("entryVariableSettingChecked"); - "slide" == a.getType() ? (e.addClass("entryVariableSettingChecked"), f.removeAttribute("disabled"), g.removeAttribute("disabled"), f.value = a.getMinValue(), g.value = a.getMaxValue(), h.removeClass("entryVariableMinMaxDisabledWorkspace")) : (h.addClass("entryVariableMinMaxDisabledWorkspace"), f.setAttribute("disabled", "disabled"), g.setAttribute("disabled", "disabled")); - d.value = a.getValue(); - a.listElement.appendChild(b); - b.removeClass("entryRemove"); +Entry.Utils.inherit(Entry.Field, Entry.FieldImage); +(function(b) { + b.renderStart = function() { + this.svgGroup && this.svgGroup.remove(); + this._imgUrl = this._block.deletable === Entry.Block.DELETABLE_FALSE_LIGHTEN ? this._content.img.replace(".png", "_un.png") : this._content.img; + this.svgGroup = this._blockView.contentSvgGroup.elem("g"); + this._imgElement = this.svgGroup.elem("image", {href:this._imgUrl, x:0, y:-.5 * this._size, width:this._size, height:this._size}); + this.box.set({x:this._size, y:0, width:this._size, height:this._size}); + }; +})(Entry.FieldImage.prototype); +Entry.FieldIndicator = function(b, a, c) { + this._block = a.block; + this._blockView = a; + this.box = new Entry.BoxModel; + this._size = b.size; + this._imgUrl = this._block.deletable === Entry.Block.DELETABLE_FALSE_LIGHTEN ? b.img.replace(".png", "_un.png") : b.img; + this._boxMultiplier = b.boxMultiplier || 2; + this._highlightColor = b.highlightColor ? b.highlightColor : "#F59900"; + this._position = b.position; + this._index = c; + this._imgElement = this._path = this.svgGroup = null; + this.setValue(null); + this.renderStart(); }; -Entry.VariableContainer.prototype.generateListSettingView = function() { - var a = this, b = Entry.createElement("div"); - b.bindOnClick(function(b) { - b.stopPropagation(); - }); - this.listSettingView = b; - b.addClass("entryListSettingWorkspace"); - this.listView_.appendChild(b); - b.addClass("entryRemove"); - var c = Entry.createElement("div"); - c.addClass("entryListSettingVisibleWrapperWorkspace"); - c.bindOnClick(function(b) { - b = a.selectedList; - var c = a.listSettingView.visibleCheck; - b.setVisible(!b.isVisible()); - b.isVisible() ? c.addClass("entryListSettingCheckedWorkspace") : c.removeClass("entryListSettingCheckedWorkspace"); - }); - b.appendChild(c); - var d = Entry.createElement("span"); - d.innerHTML = Lang.Workspace.show_list_workspace; - c.appendChild(d); - d = Entry.createElement("span"); - d.addClass("entryListSettingCheckWorkspace"); - b.visibleCheck = d; - c.appendChild(d); - d = Entry.createElement("div"); - d.addClass("entryListSettingLengthWrapperWorkspace"); - c = Entry.createElement("span"); - c.addClass("entryListSettingLengthSpanWorkspace"); - c.innerHTML = Lang.Workspace.number_of_list; - d.appendChild(c); - b.appendChild(d); - c = Entry.createElement("div"); - c.addClass("entryListSettingLengthControllerWorkspace"); - d.appendChild(c); - d = Entry.createElement("span"); - d.addClass("entryListSettingMinusWorkspace"); - d.bindOnClick(function(b) { - a.selectedList.array_.pop(); - a.updateListSettingView(a.selectedList); - }); - c.appendChild(d); - d = Entry.createElement("input"); - d.addClass("entryListSettingLengthInputWorkspace"); - d.onblur = function() { - a.setListLength(this.value); +Entry.Utils.inherit(Entry.Field, Entry.FieldIndicator); +(function(b) { + b.renderStart = function() { + this.svgGroup && this.svgGroup.remove(); + this.svgGroup = this._blockView.contentSvgGroup.elem("g"); + this._imgElement = this.svgGroup.elem("image", {href:this._imgUrl, x:this._position ? -1 * this._size : 0, y:-1 * this._size, width:2 * this._size, height:2 * this._size}); + var a = "m 0,-%s a %s,%s 0 1,1 -0.1,0 z".replace(/%s/gi, this._size); + this._path = this.svgGroup.elem("path", {d:a, stroke:"none", fill:"none"}); + this.box.set({width:this._size * this._boxMultiplier + (this._position ? -this._size : 0), height:this._size * this._boxMultiplier}); + }; + b.enableHighlight = function() { + var a = this._path.getTotalLength(), b = this._path; + this._path.attr({stroke:this._highlightColor, strokeWidth:2, "stroke-linecap":"round", "stroke-dasharray":a + " " + a, "stroke-dashoffset":a}); + setInterval(function() { + b.attr({"stroke-dashoffset":a}).animate({"stroke-dashoffset":0}, 300); + }, 1400, mina.easeout); + setTimeout(function() { + setInterval(function() { + b.animate({"stroke-dashoffset":-a}, 300); + }, 1400, mina.easeout); + }, 500); }; - d.onkeypress = function(b) { - 13 == b.keyCode && this.blur(); +})(Entry.FieldIndicator.prototype); +Entry.Keyboard = {}; +Entry.FieldKeyboard = function(b, a, c) { + this._block = a.block; + this._blockView = a; + this.box = new Entry.BoxModel; + this.svgGroup = null; + this.position = b.position; + this._contents = b; + this._index = c; + this.setValue(String(this.getValue())); + this._optionVisible = !1; + this.renderStart(a); +}; +Entry.Utils.inherit(Entry.Field, Entry.FieldKeyboard); +(function(b) { + b.renderStart = function() { + this.svgGroup && $(this.svgGroup).remove(); + this.svgGroup = this._blockView.contentSvgGroup.elem("g", {class:"entry-input-field"}); + this.textElement = this.svgGroup.elem("text").attr({x:4, y:4, "font-size":"9pt"}); + this.textElement.textContent = Entry.getKeyCodeMap()[this.getValue()]; + var a = this.getTextWidth(), b = this.position && this.position.y ? this.position.y : 0; + this._header = this.svgGroup.elem("rect", {x:0, y:b - 8, width:a, height:16, rx:3, ry:3, fill:"#fff", "fill-opacity":.4}); + this.svgGroup.appendChild(this.textElement); + this._bindRenderOptions(); + this.box.set({x:0, y:0, width:a, height:16}); + }; + b.renderOptions = function() { + Entry.keyPressed && (this.keyPressed = Entry.keyPressed.attach(this, this._keyboardControl)); + this._optionVisible = !0; + this._attachDisposeEvent(); + var a = this.getAbsolutePosFromDocument(); + a.x -= this.box.width / 2; + a.y += this.box.height / 2 + 1; + this.optionGroup = Entry.Dom("img", {class:"entry-widget-keyboard-input", src:Entry.mediaFilePath + "/media/keyboard_workspace.png", parent:$("body")}); + this.optionGroup.css({left:a.x, top:a.y}); + }; + b.destroyOption = function() { + this.disposeEvent && (Entry.disposeEvent.detach(this.disposeEvent), delete this.disposeEvent); + this.optionGroup && (this.optionGroup.remove(), delete this.optionGroup); + this._optionVisible = !1; + this.command(); + this.keyPressed && (Entry.keyPressed.detach(this.keyPressed), delete this.keyPressed); }; - b.lengthInput = d; - c.appendChild(d); - d = Entry.createElement("span"); - d.addClass("entryListSettingPlusWorkspace"); - d.bindOnClick(function(b) { - a.selectedList.array_.push({data:0}); - a.updateListSettingView(a.selectedList); - }); - c.appendChild(d); - c = Entry.createElement("div"); - b.seperator = c; - b.appendChild(c); - c.addClass("entryListSettingSeperatorWorkspace"); - c = Entry.createElement("div"); - c.addClass("entryListSettingListValuesWorkspace"); - b.listValues = c; - b.appendChild(c); -}; -Entry.VariableContainer.prototype.updateListSettingView = function(a) { - var b = this; - a = a || this.selectedList; - var c = this.listSettingView, d = c.listValues, e = c.visibleCheck, f = c.lengthInput, g = c.seperator; - e.removeClass("entryListSettingCheckedWorkspace"); - a.isVisible() && e.addClass("entryListSettingCheckedWorkspace"); - f.value = a.array_.length; - for (a.listElement.appendChild(c);d.firstChild;) { - d.removeChild(d.firstChild); - } - var h = a.array_; - 0 === h.length ? g.addClass("entryRemove") : g.removeClass("entryRemove"); - for (e = 0;e < h.length;e++) { - (function(c) { - var e = Entry.createElement("div"); - e.addClass("entryListSettingValueWrapperWorkspace"); - var f = Entry.createElement("span"); - f.addClass("entryListSettingValueNumberSpanWorkspace"); - f.innerHTML = c + 1; - e.appendChild(f); - f = Entry.createElement("input"); - f.value = h[c].data; - f.onblur = function() { - h[c].data = this.value; - a.updateView(); - }; - f.onkeypress = function(b) { - 13 == b.keyCode && this.blur(); - }; - f.addClass("entryListSettingEachInputWorkspace"); - e.appendChild(f); - f = Entry.createElement("span"); - f.bindOnClick(function() { - h.splice(c, 1); - b.updateListSettingView(); - }); - f.addClass("entryListSettingValueRemoveWorkspace"); - e.appendChild(f); - d.appendChild(e); - })(e); - } - a.updateView(); - c.removeClass("entryRemove"); + b._keyboardControl = function(a) { + a.stopPropagation(); + if (this._optionVisible) { + a = a.keyCode; + var b = Entry.getKeyCodeMap()[a]; + void 0 !== b && this.applyValue(b, a); + } + }; + b.applyValue = function(a, b) { + this.setValue(String(b)); + this.destroyOption(); + this.textElement.textContent = a; + this.resize(); + }; + b.resize = function() { + var a = this.getTextWidth(); + this._header.attr({width:a}); + this.box.set({width:a}); + this._blockView.alignContent(); + }; + b.getTextWidth = function() { + return this.textElement.getComputedTextLength() + 8; + }; + b.destroy = function() { + this.destroyOption(); + Entry.keyPressed && this.keyPressed && Entry.keyPressed.detach(this.keyPressed); + }; +})(Entry.FieldKeyboard.prototype); +Entry.FieldLineBreak = function(b, a, c) { + this._block = a.block; + this._blockView = a; + this._index = c; + this.box = new Entry.BoxModel; + this.setValue(null); + this.renderStart(); }; -Entry.VariableContainer.prototype.setListLength = function(a) { - a = +a; - var b = this.selectedList.array_; - if (!isNaN(a)) { - var c = b.length; - if (c < a) { - for (a -= c, c = 0;c < a;c++) { - b.push({data:0}); +Entry.Utils.inherit(Entry.Field, Entry.FieldLineBreak); +(function(b) { + b.renderStart = function() { + }; + b.align = function(a) { + var b = this._blockView; + 0 !== b._statements.length && this.box.set({y:(b._statements[a].height || 20) + Math.max(b.contentHeight % 1E3, 30)}); + }; +})(Entry.FieldLineBreak.prototype); +Entry.FieldOutput = function(b, a, c, d, e) { + Entry.Model(this, !1); + this._blockView = a; + this._block = a.block; + this._valueBlock = null; + this.box = new Entry.BoxModel; + this.changeEvent = new Entry.Event(this); + this._index = c; + this.contentIndex = e; + this._content = b; + this.acceptType = b.accept; + this.view = this; + this.svgGroup = null; + this._position = b.position; + this.box.observe(a, "alignContent", ["width", "height"]); + this.observe(this, "_updateBG", ["magneting"], !1); + this.renderStart(a.getBoard(), d); +}; +Entry.Utils.inherit(Entry.Field, Entry.FieldOutput); +(function(b) { + b.schema = {magneting:!1}; + b.renderStart = function(a, b) { + this.svgGroup = this._blockView.contentSvgGroup.elem("g"); + this.view = this; + this._nextGroup = this.svgGroup; + this.box.set({x:0, y:0, width:0, height:20}); + var d = this.getValue(); + d && !d.view && (d.setThread(this), d.createView(a, b)); + this._updateValueBlock(d); + this._blockView.getBoard().constructor == Entry.BlockMenu && this._valueBlock && this._valueBlock.view.removeControl(); + }; + b.align = function(a, b, d) { + var e = this.svgGroup; + this._position && (this._position.x && (a = this._position.x), this._position.y && (b = this._position.y)); + var f = this._valueBlock; + f && (b = -.5 * f.view.height); + f = "translate(" + a + "," + b + ")"; + void 0 === d || d ? e.animate({transform:f}, 300, mina.easeinout) : e.attr({transform:f}); + this.box.set({x:a, y:b}); + }; + b.calcWH = function() { + var a = this._valueBlock; + a ? (a = a.view, this.box.set({width:a.width, height:a.height})) : this.box.set({width:0, height:20}); + }; + b.calcHeight = b.calcWH; + b.destroy = function() { + }; + b._inspectBlock = function() { + }; + b._setValueBlock = function(a) { + if (a != this._valueBlock || !this._valueBlock) { + return this._valueBlock = a, this.setValue(a), a && a.setThread(this), this._valueBlock; + } + }; + b._updateValueBlock = function(a) { + a instanceof Entry.Block || (a = void 0); + this._sizeObserver && this._sizeObserver.destroy(); + this._posObserver && this._posObserver.destroy(); + (a = this._setValueBlock(a)) ? (a = a.view, a.bindPrev(), this._posObserver = a.observe(this, "_updateValueBlock", ["x", "y"], !1), this._sizeObserver = a.observe(this, "calcWH", ["width", "height"])) : this.calcWH(); + this._blockView.alignContent(); + a = this._blockView.getBoard(); + a.constructor === Entry.Board && a.generateCodeMagnetMap(); + }; + b.getPrevBlock = function(a) { + return this._valueBlock === a ? this : null; + }; + b.getNextBlock = function() { + return null; + }; + b.requestAbsoluteCoordinate = function(a) { + a = this._blockView; + var b = a.contentPos; + a = a.getAbsoluteCoordinate(); + a.x += this.box.x + b.x; + a.y += this.box.y + b.y; + return a; + }; + b.dominate = function() { + this._blockView.dominate(); + }; + b.isGlobal = function() { + return !1; + }; + b.separate = function(a) { + this.getCode().createThread([a]); + this.changeEvent.notify(); + }; + b.getCode = function() { + return this._block.thread.getCode(); + }; + b.cut = function(a) { + return this._valueBlock === a ? (delete this._valueBlock, [a]) : null; + }; + b._updateBG = function() { + this.magneting ? this._bg = this.svgGroup.elem("path", {d:"m -4,-12 h 3 l 2,2 0,3 3,0 1,1 0,12 -1,1 -3,0 0,3 -2,2 h -3 ", fill:"#fff", stroke:"#fff", "fill-opacity":.7, transform:"translate(0," + (this._valueBlock ? 12 : 0) + ")"}) : this._bg && (this._bg.remove(), delete this._bg); + }; + b.replace = function(a) { + var b = this._valueBlock; + b && (b.view._toGlobalCoordinate(), a.getTerminateOutputBlock().view._contents[1].replace(b)); + this._updateValueBlock(a); + a.view._toLocalCoordinate(this.svgGroup); + this.calcWH(); + }; + b.setParent = function(a) { + this._parent = a; + }; + b.getParent = function() { + return this._parent; + }; + b.getThread = function() { + return this; + }; + b.getValueBlock = function() { + return this._valueBlock; + }; + b.pointer = function(a) { + a.unshift(this._index); + a.unshift(Entry.PARAM); + return this._block.pointer(a); + }; +})(Entry.FieldOutput.prototype); +Entry.FieldStatement = function(b, a, c) { + Entry.Model(this, !1); + this._blockView = a; + this.block = a.block; + this.view = this; + this._index = c; + this.acceptType = b.accept; + this._thread = this.statementSvgGroup = this.svgGroup = null; + this._position = b.position; + this.observe(a, "alignContent", ["height"], !1); + this.observe(this, "_updateBG", ["magneting"], !1); + this.renderStart(a.getBoard()); +}; +(function(b) { + b.schema = {x:0, y:0, width:100, height:20, magneting:!1}; + b.magnet = {next:{x:0, y:0}}; + b.renderStart = function(a) { + this.svgGroup = this._blockView.statementSvgGroup.elem("g"); + this._nextGroup = this.statementSvgGroup = this.svgGroup.elem("g"); + this._initThread(a); + this._board = a; + }; + b._initThread = function(a) { + var b = this.getValue(); + this._thread = b; + b.createView(a); + b.view.setParent(this); + if (a = b.getFirstBlock()) { + a.view._toLocalCoordinate(this.statementSvgGroup), this.firstBlock = a; + } + b.changeEvent.attach(this, this.calcHeight); + b.changeEvent.attach(this, this.checkTopBlock); + this.calcHeight(); + }; + b.align = function(a, b, d) { + d = void 0 === d ? !0 : d; + var e = this.svgGroup; + this._position && (this._position.x && (a = this._position.x), this._position.y && (b = this._position.y)); + var f = "translate(" + a + "," + b + ")"; + this.set({x:a, y:b}); + d ? e.animate({transform:f}, 300, mina.easeinout) : e.attr({transform:f}); + }; + b.calcHeight = function() { + var a = this._thread.view.requestPartHeight(null); + this.set({height:a}); + }; + b.getValue = function() { + return this.block.statements[this._index]; + }; + b.requestAbsoluteCoordinate = function() { + var a = this._blockView.getAbsoluteCoordinate(); + a.x += this.x; + a.y += this.y; + return a; + }; + b.dominate = function() { + this._blockView.dominate(); + }; + b.destroy = function() { + }; + b._updateBG = function() { + if (this._board.dragBlock && this._board.dragBlock.dragInstance) { + if (this.magneting) { + var a = this._board.dragBlock.getShadow(), b = this.requestAbsoluteCoordinate(), b = "translate(" + b.x + "," + b.y + ")"; + $(a).attr({transform:b, display:"block"}); + this._clonedShadow = a; + this.background && (this.background.remove(), this.nextBackground.remove(), delete this.background, delete this.nextBackground); + a = this._board.dragBlock.getBelowHeight(); + this.statementSvgGroup.attr({transform:"translate(0," + a + ")"}); + this.set({height:this.height + a}); + } else { + this._clonedShadow && (this._clonedShadow.attr({display:"none"}), delete this._clonedShadow), a = this.originalHeight, void 0 !== a && (this.background && (this.background.remove(), this.nextBackground.remove(), delete this.background, delete this.nextBackground), delete this.originalHeight), this.statementSvgGroup.attr({transform:"translate(0,0)"}), this.calcHeight(); } - } else { - c > a && (b.length = a); + (a = this.block.thread.changeEvent) && a.notify(); } - } - this.updateListSettingView(); -}; -Entry.VariableContainer.prototype.updateViews = function() { - var a = this.lists_; - this.variables_.map(function(b) { - b.updateView(); - }); - a.map(function(b) { - b.updateView(); - }); -}; -Entry.VariableContainer.prototype.updateSelectedVariable = function(a, b) { - a ? "variable" == a.type ? (this.selectedVariable = a, this.updateVariableSettingView(a)) : "slide" == a.type ? (this.selectedVariable = a, this.updateVariableSettingView(a)) : "list" == a.type && (this.selectedList = a, this.updateListSettingView(a)) : (this.selectedVariable = null, "variable" == (b || "variable") ? this.variableSettingView.addClass("entryRemove") : this.listSettingView.addClass("entryRemove")); -}; -Entry.VariableContainer.prototype.removeLocalVariables = function(a) { - var b = [], c = this; - this.mapVariable(function(a, c) { - a.object_ && a.object_ == c && b.push(a); - }, a); - b.map(function(b) { - c.removeVariable(b); - }); + }; + b.insertTopBlock = function(a) { + this._posObserver && this._posObserver.destroy(); + var b = this.firstBlock; + (this.firstBlock = a) && a.doInsert(this._thread); + return b; + }; + b.getNextBlock = function() { + return this.firstBlock; + }; + b.checkTopBlock = function() { + var a = this._thread.getFirstBlock(); + a && this.firstBlock !== a ? (this.firstBlock = a, a.view.bindPrev(this), a._updatePos()) : a || (this.firstBlock = null); + }; +})(Entry.FieldStatement.prototype); +Entry.FieldText = function(b, a, c) { + this._block = a.block; + this._blockView = a; + this._index = c; + this.box = new Entry.BoxModel; + this._fontSize = b.fontSize || a.getSkeleton().fontSize || 12; + this._color = b.color || this._block.getSchema().fontColor || a.getSkeleton().color || "white"; + this._align = b.align || "left"; + this._text = this.getValue() || b.text; + this.setValue(null); + this.textElement = null; + this.renderStart(a); +}; +Entry.Utils.inherit(Entry.Field, Entry.FieldText); +(function(b) { + b.renderStart = function() { + this.svgGroup && $(this.svgGroup).remove(); + this.svgGroup = this._blockView.contentSvgGroup.elem("g"); + this._text = this._text.replace(/(\r\n|\n|\r)/gm, " "); + this.textElement = this.svgGroup.elem("text").attr({style:"white-space: pre; font-size:" + this._fontSize + "px", "class":"dragNone", fill:this._color}); + this.textElement.textContent = this._text; + var a = 0, b = this.textElement.getBoundingClientRect(); + "center" == this._align && (a = -b.width / 2); + this.textElement.attr({x:a, y:.25 * b.height}); + this.box.set({x:0, y:0, width:b.width, height:b.height}); + }; +})(Entry.FieldText.prototype); +Entry.FieldTextInput = function(b, a, c) { + this._blockView = a; + this._block = a.block; + this.box = new Entry.BoxModel; + this.svgGroup = null; + this.position = b.position; + this._contents = b; + this._index = c; + this.value = this.getValue() || ""; + this.renderStart(); }; -Entry.VariableContainer.prototype.updateCloudVariables = function() { - var a = Entry.projectId; - if (Entry.cloudSavable && a) { - var b = Entry.variableContainer, a = b.variables_.filter(function(b) { - return b.isCloud_; - }), a = a.map(function(b) { - return b.toJSON(); - }), b = b.lists_.filter(function(b) { - return b.isCloud_; - }), b = b.map(function(b) { - return b.toJSON(); +Entry.Utils.inherit(Entry.Field, Entry.FieldTextInput); +(function(b) { + b.renderStart = function() { + this.svgGroup && $(this.svgGroup).remove(); + this.svgGroup = this._blockView.contentSvgGroup.elem("g"); + this.svgGroup.attr({class:"entry-input-field"}); + this.textElement = this.svgGroup.elem("text", {x:3, y:4, "font-size":"9pt"}); + this.textElement.textContent = this.truncate(); + var a = this.getTextWidth(), b = this.position && this.position.y ? this.position.y : 0; + this._header = this.svgGroup.elem("rect", {width:a, height:16, y:b - 8, rx:3, ry:3, fill:"transparent"}); + this.svgGroup.appendChild(this.textElement); + this._bindRenderOptions(); + this.box.set({x:0, y:0, width:a, height:16}); + }; + b.renderOptions = function() { + var a = this; + this._attachDisposeEvent(function() { + a.applyValue(); + a.destroyOption(); }); - $.ajax({url:"/api/project/variable/" + Entry.projectId, type:"PUT", data:{variables:a, lists:b}}).done(function() { + this.optionGroup = Entry.Dom("input", {class:"entry-widget-input-field", parent:$("body")}); + this.optionGroup.val(this.getValue()); + this.optionGroup.on("mousedown", function(a) { + a.stopPropagation(); }); - } -}; -Entry.block.run = {skeleton:"basic", color:"#3BBD70", contents:["this is", "basic block"], func:function() { -}}; -Entry.block.jr_start = {skeleton:"pebble_event", event:"start", color:"#3BBD70", contents:[{type:"Indicator", img:"/img/assets/ntry/bitmap/jr/block_play_image.png", highlightColor:"#3BBD70", size:22}], func:function() { - var a = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), b; - for (b in a) { - this._unit = a[b]; - } - Ntry.unitComp = Ntry.entityManager.getComponent(this._unit.id, Ntry.STATIC.UNIT); -}}; -Entry.block.jr_repeat = {skeleton:"pebble_loop", color:"#127CDB", contents:[{type:"Text", text:Lang.Menus.repeat_0}, {type:"Dropdown", key:"REPEAT", options:[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]], value:1}, {type:"Text", text:Lang.Menus.repeat_1}, {type:"Statement", key:"STATEMENT", accept:"pebble_basic"}], func:function() { - if (void 0 === this.repeatCount) { - return this.repeatCount = this.block.values.REPEAT, Entry.STATIC.CONTINUE; - } - if (0 < this.repeatCount) { - return console.log(this.repeatCount), this.repeatCount--, this.executor.stepInto(this.block.values.STATEMENT), Entry.STATIC.CONTINUE; - } - delete this.repeatCount; -}}; -Entry.block.jr_item = {skeleton:"pebble_basic", color:"#F46C6C", contents:[{type:"Text", text:"\uaf43 \ubaa8\uc73c\uae30"}, {type:"Indicator", img:"/img/assets/ntry/bitmap/jr/block_item_image.png", highlightColor:"#FFF", position:{x:83, y:0}, size:22}], func:function() { - if (this.isContinue) { - if (this.isAction) { - return Entry.STATIC.CONTINUE; - } - delete this.isAction; - delete this.isContinue; - } else { - this.isAction = this.isContinue = !0; - var a = this; - Ntry.dispatchEvent("unitAction", Ntry.STATIC.GET_ITEM, function() { - Ntry.dispatchEvent("getItem"); - a.isAction = !1; + this.optionGroup.on("keyup", function(b) { + var c = b.keyCode || b.which; + a.applyValue(b); + -1 < [13, 27].indexOf(c) && a.destroyOption(); }); - return Entry.STATIC.CONTINUE; + var b = this.getAbsolutePosFromDocument(); + b.y -= this.box.height / 2; + this.optionGroup.css({height:16, left:b.x, top:b.y, width:a.box.width}); + this.optionGroup.focus(); + this.optionGroup.select(); + }; + b.applyValue = function(a) { + a = this.optionGroup.val(); + this.setValue(a); + this.textElement.textContent = this.truncate(); + this.resize(); + }; + b.resize = function() { + var a = this.getTextWidth(); + this._header.attr({width:a}); + this.optionGroup.css({width:a}); + this.box.set({width:a}); + this._blockView.alignContent(); + }; + b.getTextWidth = function() { + return this.textElement.getComputedTextLength() + 6 + 2; + }; +})(Entry.FieldTextInput.prototype); +Entry.GlobalSvg = {}; +(function(b) { + b.DONE = 0; + b._inited = !1; + b.REMOVE = 1; + b.RETURN = 2; + b.createDom = function() { + if (!this.inited) { + $("#globalSvgSurface").remove(); + $("#globalSvg").remove(); + var a = $("body"); + this._container = Entry.Dom("div", {classes:["globalSvgSurface", "entryRemove"], id:"globalSvgSurface", parent:a}); + this.svgDom = Entry.Dom($(''), {parent:a}); + this.svg = Entry.SVG("globalSvg"); + this.top = this.left = this.width = 0; + this._inited = !0; + } + }; + b.setView = function(a, b) { + if (a != this._view && !a.block.isReadOnly() && a.movable) { + return this._view = a, this._mode = b, b !== Entry.Workspace.MODE_VIMBOARD && a.set({visible:!1}), this.draw(), this.show(), this.align(), this.position(), !0; + } + }; + b.draw = function() { + var a = this._view; + this._svg && this.remove(); + var b = this._mode == Entry.Workspace.MODE_VIMBOARD; + this.svgGroup = Entry.SVG.createElement(a.svgGroup.cloneNode(!0), {opacity:1}); + this.svg.appendChild(this.svgGroup); + b && (a = $(this.svgGroup), a.find("g").css({filter:"none"}), a.find("path").velocity({opacity:0}, {duration:500}), a.find("text").velocity({fill:"#000000"}, {duration:530})); + }; + b.remove = function() { + this.svgGroup && (this.svgGroup.remove(), delete this.svgGroup, delete this._view, delete this._offsetX, delete this._offsetY, delete this._startX, delete this._startY, this.hide()); + }; + b.align = function() { + var a = this._view.getSkeleton().box(this._view).offsetX || 0, b = this._view.getSkeleton().box(this._view).offsetY || 0, a = -1 * a + 1, b = -1 * b + 1; + this._offsetX = a; + this._offsetY = b; + this.svgGroup.attr({transform:"translate(" + a + "," + b + ")"}); + }; + b.show = function() { + this._container.removeClass("entryRemove"); + this.svgDom.css("display", "block"); + }; + b.hide = function() { + this._container.addClass("entryRemove"); + this.svgDom.css("display", "none"); + }; + b.position = function() { + var a = this._view, b = a.getAbsoluteCoordinate(), a = a.getBoard().offset(); + this.left = b.x + a.left - this._offsetX; + this.top = b.y + a.top - this._offsetY; + b = this.svgDom[0]; + b.style.left = this.left + "px"; + b.style.top = this.top + "px"; + }; + b.terminateDrag = function(a) { + var b = Entry.mouseCoordinate; + a = a.getBoard().workspace.blockMenu; + var d = a.offset().left, e = a.offset().top, f = a.visible ? a.svgDom.width() : 0; + return b.y > e && b.x > d + f ? this.DONE : b.y > e && b.x > d && a.visible ? this.REMOVE : this.RETURN; + }; + b.addControl = function(a) { + this.onMouseDown.apply(this, arguments); + }; + b.onMouseDown = function(a) { + function b(a) { + var c = a.pageX; + a = a.pageY; + var d = e.left + (c - e._startX), f = e.top + (a - e._startY); + e.svgDom.css({left:d, top:f}); + e._startX = c; + e._startY = a; + e.left = d; + e.top = f; + } + function d(a) { + $(document).unbind(".block"); + } + this._startY = a.pageY; + var e = this; + a.stopPropagation(); + a.preventDefault(); + var f = $(document); + f.bind("mousemove.block", b); + f.bind("mouseup.block", d); + f.bind("touchmove.block", b); + f.bind("touchend.block", d); + this._startX = a.pageX; + this._startY = a.pageY; + }; +})(Entry.GlobalSvg); +Entry.Mutator = function() { +}; +(function(b) { + b.mutate = function(a, b) { + var d = Entry.block[a]; + void 0 === d.changeEvent && (d.changeEvent = new Entry.Event); + d.template = b.template; + d.params = b.params; + d.changeEvent.notify(1); + }; +})(Entry.Mutator); +(function(b) { +})(Entry.Mutator.prototype); +Entry.RenderView = function(b, a) { + this._align = a || "CENTER"; + b = "string" === typeof b ? $("#" + b) : $(b); + if ("DIV" !== b.prop("tagName")) { + return console.error("Dom is not div element"); } -}}; -Entry.block.cparty_jr_item = {skeleton:"pebble_basic", color:"#8ABC1D", contents:[{type:"Text", text:Lang.Menus.pick_up_pencil}, {type:"Indicator", img:"/img/assets/ntry/bitmap/cpartyjr/pen.png", highlightColor:"#FFF", position:{x:83, y:0}, size:22}], func:function() { - if (this.isContinue) { - if (this.isAction) { - return Entry.STATIC.CONTINUE; + this.view = b; + this.viewOnly = !0; + this.suffix = "renderView"; + this.disableMouseEvent = this.visible = !0; + this._svgId = "renderView_" + (new Date).getTime(); + this._generateView(); + this.offset = this.svgDom.offset(); + this.setWidth(); + this.svg = Entry.SVG(this._svgId); + Entry.Utils.addFilters(this.svg, this.suffix); + this.svg && (this.svgGroup = this.svg.elem("g"), this.svgThreadGroup = this.svgGroup.elem("g"), this.svgThreadGroup.board = this, this.svgBlockGroup = this.svgGroup.elem("g"), this.svgBlockGroup.board = this); +}; +(function(b) { + b.schema = {code:null, dragBlock:null, closeBlock:null, selectedBlockView:null}; + b._generateView = function() { + this.renderViewContainer = Entry.Dom("div", {"class":"renderViewContainer", parent:this.view}); + this.svgDom = Entry.Dom($(''), {parent:this.renderViewContainer}); + }; + b.changeCode = function(a) { + if (!(a instanceof Entry.Code)) { + return console.error("You must inject code instance"); } - delete this.isAction; - delete this.isContinue; - } else { - this.isAction = this.isContinue = !0; - var a = this; - Ntry.dispatchEvent("unitAction", Ntry.STATIC.GET_ITEM, function() { - Ntry.dispatchEvent("getItem"); - a.isAction = !1; + this.code = a; + this.svg || (this.svg = Entry.SVG(this._svgId), this.svgGroup = this.svg.elem("g"), this.svgThreadGroup = this.svgGroup.elem("g"), this.svgThreadGroup.board = this, this.svgBlockGroup = this.svgGroup.elem("g"), this.svgBlockGroup.board = this); + a.createView(this); + this.align(); + this.resize(); + }; + b.align = function() { + var a = this.code.getThreads(); + if (a && 0 !== a.length) { + for (var b = 0, d = "LEFT" == this._align ? 20 : this.svgDom.width() / 2, e = 0, f = a.length;e < f;e++) { + var g = a[e].getFirstBlock().view; + g._moveTo(d, b - g.offsetY, !1); + g = g.svgGroup.getBBox().height; + b += g + 15; + } + this._bBox = this.svgGroup.getBBox(); + this.height = this._bBox.height; + } + }; + b.hide = function() { + this.view.addClass("entryRemove"); + }; + b.show = function() { + this.view.removeClass("entryRemove"); + }; + b.setWidth = function() { + this._svgWidth = this.svgDom.width(); + this.offset = this.svgDom.offset(); + }; + b.bindCodeView = function(a) { + this.svgBlockGroup.remove(); + this.svgThreadGroup.remove(); + this.svgBlockGroup = a.svgBlockGroup; + this.svgThreadGroup = a.svgThreadGroup; + this.svgGroup.appendChild(this.svgThreadGroup); + this.svgGroup.appendChild(this.svgBlockGroup); + }; + b.resize = function() { + this.svg && this._bBox && $(this.svg).css("height", this._bBox.height + 10); + }; +})(Entry.RenderView.prototype); +Entry.Scroller = function(b, a, c) { + this._horizontal = void 0 === a ? !0 : a; + this._vertical = void 0 === c ? !0 : c; + this.board = b; + this.svgGroup = null; + this.vRatio = this.vY = this.vWidth = this.hRatio = this.hX = this.hWidth = 0; + this._visible = !0; + this._opacity = -1; + this.createScrollBar(); + this.setOpacity(0); + this._bindEvent(); +}; +Entry.Scroller.RADIUS = 7; +(function(b) { + b.createScrollBar = function() { + var a = Entry.Scroller.RADIUS, b = this; + this.svgGroup = this.board.svg.elem("g").attr({class:"boardScrollbar"}); + this._horizontal && (this.hScrollbar = this.svgGroup.elem("rect", {height:2 * a, rx:a, ry:a}), this.hScrollbar.mousedown = function(a) { + function e(a) { + a.stopPropagation(); + a.preventDefault(); + a.originalEvent.touches && (a = a.originalEvent.touches[0]); + var d = b.dragInstance; + b.scroll((a.pageX - d.offsetX) / b.hRatio, 0); + d.set({offsetX:a.pageX, offsetY:a.pageY}); + } + function f(a) { + $(document).unbind(".scroll"); + delete b.dragInstance; + } + if (0 === a.button || a instanceof Touch) { + Entry.documentMousedown && Entry.documentMousedown.notify(a); + var g = $(document); + g.bind("mousemove.scroll", e); + g.bind("mouseup.scroll", f); + g.bind("touchmove.scroll", e); + g.bind("touchend.scroll", f); + b.dragInstance = new Entry.DragInstance({startX:a.pageX, startY:a.pageY, offsetX:a.pageX, offsetY:a.pageY}); + } + a.stopPropagation(); }); - return Entry.STATIC.CONTINUE; - } -}}; -Entry.block.jr_north = {skeleton:"pebble_basic", color:"#A751E3", contents:[{type:"Text", text:Lang.Menus.go_up}, {type:"Indicator", img:"/img/assets/ntry/bitmap/jr/block_up_image.png", position:{x:83, y:0}, size:22}], func:function() { - if (this.isContinue) { - if (this.isAction) { - return Entry.STATIC.CONTINUE; + this._vertical && (this.vScrollbar = this.svgGroup.elem("rect", {width:2 * a, rx:a, ry:a}), this.vScrollbar.mousedown = function(a) { + function e(a) { + a.stopPropagation(); + a.preventDefault(); + a.originalEvent.touches && (a = a.originalEvent.touches[0]); + var d = b.dragInstance; + b.scroll(0, (a.pageY - d.offsetY) / b.vRatio); + d.set({offsetX:a.pageX, offsetY:a.pageY}); + } + function f(a) { + $(document).unbind(".scroll"); + delete b.dragInstance; + } + if (0 === a.button || a instanceof Touch) { + Entry.documentMousedown && Entry.documentMousedown.notify(a); + var g = $(document); + g.bind("mousemove.scroll", e); + g.bind("mouseup.scroll", f); + g.bind("touchmove.scroll", e); + g.bind("touchend.scroll", f); + b.dragInstance = new Entry.DragInstance({startX:a.pageX, startY:a.pageY, offsetX:a.pageX, offsetY:a.pageY}); + } + a.stopPropagation(); + }); + }; + b.updateScrollBar = function(a, b) { + this._horizontal && (this.hX += a * this.hRatio, this.hScrollbar.attr({x:this.hX})); + this._vertical && (this.vY += b * this.vRatio, this.vScrollbar.attr({y:this.vY})); + }; + b.scroll = function(a, b) { + if (this.board.code) { + var d = this.board.svgBlockGroup.getBoundingClientRect(), e = this.board.svgDom, f = d.left - this.board.offset().left, g = d.top - this.board.offset().top, h = d.height; + a = Math.max(-d.width + Entry.BOARD_PADDING - f, a); + b = Math.max(-h + Entry.BOARD_PADDING - g, b); + a = Math.min(e.width() - Entry.BOARD_PADDING - f, a); + b = Math.min(e.height() - Entry.BOARD_PADDING - g, b); + Entry.do("scrollBoard", a, b).isPass(); } - delete this.isAction; - delete this.isContinue; - } else { - this.isAction = this.isContinue = !0; - var a = Ntry.STATIC, b = this, c = function() { - window.setTimeout(function() { - Ntry.dispatchEvent("unitAction", Ntry.STATIC.WALK, function() { - b.isAction = !1; - }); - }, 3); - }, d; - switch(Ntry.unitComp.direction) { - case Ntry.STATIC.EAST: - d = a.TURN_LEFT; - break; - case Ntry.STATIC.SOUTH: - d = a.HALF_ROTATION; - break; - case Ntry.STATIC.WEST: - d = a.TURN_RIGHT; - break; - default: - c(); + }; + b._scroll = function(a, b) { + this.board.code.moveBy(a, b); + this.updateScrollBar(a, b); + }; + b.setVisible = function(a) { + a != this.isVisible() && (this._visible = a, this.svgGroup.attr({display:!0 === a ? "block" : "none"})); + }; + b.isVisible = function() { + return this._visible; + }; + b.setOpacity = function(a) { + this._opacity != a && (this.hScrollbar.attr({opacity:a}), this.vScrollbar.attr({opacity:a}), this._opacity = a); + }; + b.resizeScrollBar = function() { + if (this._visible) { + var a = this.board, b = a.svgBlockGroup.getBoundingClientRect(), d = a.svgDom, e = d.width(), d = d.height(), f = b.left - a.offset().left, a = b.top - a.offset().top, g = b.width, b = b.height; + if (this._horizontal) { + var h = -g + Entry.BOARD_PADDING, k = e - Entry.BOARD_PADDING, g = (e + 2 * Entry.Scroller.RADIUS) * g / (k - h + g); + isNaN(g) && (g = 0); + this.hX = (f - h) / (k - h) * (e - g - 2 * Entry.Scroller.RADIUS); + this.hScrollbar.attr({width:g, x:this.hX, y:d - 2 * Entry.Scroller.RADIUS}); + this.hRatio = (e - g - 2 * Entry.Scroller.RADIUS) / (k - h); + } + this._vertical && (f = -b + Entry.BOARD_PADDING, g = d - Entry.BOARD_PADDING, b = (d + 2 * Entry.Scroller.RADIUS) * b / (g - f + b), this.vY = (a - f) / (g - f) * (d - b - 2 * Entry.Scroller.RADIUS), this.vScrollbar.attr({height:b, y:this.vY, x:e - 2 * Entry.Scroller.RADIUS}), this.vRatio = (d - b - 2 * Entry.Scroller.RADIUS) / (g - f)); } - d && Ntry.dispatchEvent("unitAction", d, c); - return Entry.STATIC.CONTINUE; - } -}}; -Entry.block.jr_east = {skeleton:"pebble_basic", color:"#A751E3", contents:[{type:"Text", text:Lang.Menus.go_right}, {type:"Indicator", img:"/img/assets/ntry/bitmap/jr/block_right_image.png", position:{x:83, y:0}, size:22}], func:function() { - var a = Ntry.STATIC; - if (this.isContinue) { - if (this.isAction) { - return Entry.STATIC.CONTINUE; + }; + b._bindEvent = function() { + var a = _.debounce(this.resizeScrollBar, 200); + this.board.changeEvent.attach(this, a); + Entry.windowResized && Entry.windowResized.attach(this, a); + }; +})(Entry.Scroller.prototype); +Entry.Board = function(b) { + Entry.Model(this, !1); + this.changeEvent = new Entry.Event(this); + this.createView(b); + this.updateOffset(); + this.scroller = new Entry.Scroller(this, !0, !0); + this._magnetMap = {}; + Entry.ANIMATION_DURATION = 200; + Entry.BOARD_PADDING = 100; + this._initContextOptions(); + Entry.Utils.disableContextmenu(this.svgDom); + this._addControl(); + this._bindEvent(); +}; +Entry.Board.OPTION_PASTE = 0; +Entry.Board.OPTION_ALIGN = 1; +Entry.Board.OPTION_CLEAR = 2; +(function(b) { + b.schema = {code:null, dragBlock:null, magnetedBlockView:null, selectedBlockView:null}; + b.createView = function(a) { + var b = a.dom, b = "string" === typeof b ? $("#" + b) : $(b); + if ("DIV" !== b.prop("tagName")) { + return console.error("Dom is not div element"); + } + this.view = b; + this._svgId = "play" + (new Date).getTime(); + this.workspace = a.workspace; + this._activatedBlockView = null; + this.wrapper = Entry.Dom("div", {parent:b, class:"entryBoardWrapper"}); + this.svgDom = Entry.Dom($(''), {parent:this.wrapper}); + this.visible = !0; + var d = this; + this.svg = Entry.SVG(this._svgId); + $(window).scroll(function() { + d.updateOffset(); + }); + this.svgGroup = this.svg.elem("g"); + this.svgThreadGroup = this.svgGroup.elem("g"); + this.svgThreadGroup.board = this; + this.svgBlockGroup = this.svgGroup.elem("g"); + this.svgBlockGroup.board = this; + a.isOverlay ? (this.wrapper.addClass("entryOverlayBoard"), this.generateButtons(), this.suffix = "overlayBoard") : this.suffix = "board"; + Entry.Utils.addFilters(this.svg, this.suffix); + this.patternRect = Entry.Utils.addBlockPattern(this.svg, this.suffix); + }; + b.changeCode = function(a) { + this.code && this.codeListener && this.code.changeEvent.detach(this.codeListener); + this.set({code:a}); + var b = this; + a && (this.codeListener = this.code.changeEvent.attach(this, function() { + b.changeEvent.notify(); + }), a.createView(this), this.generateCodeMagnetMap(a)); + this.scroller.resizeScrollBar(); + }; + b.bindCodeView = function(a) { + this.svgBlockGroup.remove(); + this.svgThreadGroup.remove(); + this.svgBlockGroup = a.svgBlockGroup; + this.svgThreadGroup = a.svgThreadGroup; + this.svgGroup.appendChild(this.svgThreadGroup); + this.svgGroup.appendChild(this.svgBlockGroup); + }; + b.setMagnetedBlock = function(a, b) { + if (this.magnetedBlockView) { + if (this.magnetedBlockView === a) { + return; + } + this.magnetedBlockView.set({magneting:!1}); } - delete this.isAction; - delete this.isContinue; - } else { - this.isAction = this.isContinue = !0; - var b = this, c = function() { - window.setTimeout(function() { - Ntry.dispatchEvent("unitAction", a.WALK, function() { - b.isAction = !1; - }); - }, 3); - }, d; - switch(Ntry.unitComp.direction) { - case a.SOUTH: - d = a.TURN_LEFT; - break; - case a.WEST: - d = a.HALF_ROTATION; - break; - case a.NORTH: - d = a.TURN_RIGHT; - break; - default: - c(); + this.set({magnetedBlockView:a}); + a && (a.set({magneting:b}), a.dominate()); + }; + b.getCode = function() { + return this.code; + }; + b.findById = function(a) { + return this.code.findById(a); + }; + b._addControl = function() { + var a = this.svgDom, b = this; + a.mousedown(function() { + b.onMouseDown.apply(b, arguments); + }); + a.bind("touchstart", function() { + b.onMouseDown.apply(b, arguments); + }); + a.on("wheel", function() { + b.mouseWheel.apply(b, arguments); + }); + var d = b.scroller; + d && (a.mouseenter(function(a) { + d.setOpacity(1); + }), a.mouseleave(function(a) { + d.setOpacity(0); + })); + }; + b.onMouseDown = function(a) { + function b(a) { + a.stopPropagation && a.stopPropagation(); + a.preventDefault && a.preventDefault(); + a = a.originalEvent && a.originalEvent.touches ? a.originalEvent.touches[0] : a; + var c = f.dragInstance; + f.scroller.scroll(a.pageX - c.offsetX, a.pageY - c.offsetY); + c.set({offsetX:a.pageX, offsetY:a.pageY}); } - d && Ntry.dispatchEvent("unitAction", d, c); - return Entry.STATIC.CONTINUE; - } -}}; -Entry.block.jr_south = {skeleton:"pebble_basic", color:"#A751E3", contents:[{type:"Text", text:Lang.Menus.go_down}, {type:"Indicator", img:"/img/assets/ntry/bitmap/jr/block_down_image.png", position:{x:83, y:0}, size:22}], func:function() { - if (this.isContinue) { - if (this.isAction) { - return Entry.STATIC.CONTINUE; + function d(a) { + $(document).unbind(".entryBoard"); + delete f.dragInstance; } - delete this.isAction; - delete this.isContinue; - } else { - this.isAction = this.isContinue = !0; - var a = Ntry.STATIC, b = this, c = function() { - window.setTimeout(function() { - Ntry.dispatchEvent("unitAction", Ntry.STATIC.WALK, function() { - b.isAction = !1; - }); - }, 3); - }, d; - switch(Ntry.unitComp.direction) { - case a.EAST: - d = a.TURN_RIGHT; + if (this.workspace.getMode() != Entry.Workspace.MODE_VIMBOARD) { + a.stopPropagation && a.stopPropagation(); + a.preventDefault && a.preventDefault(); + if (0 === a.button || a.originalEvent && a.originalEvent.touches) { + a = a.originalEvent && a.originalEvent.touches ? a.originalEvent.touches[0] : a; + Entry.documentMousedown && Entry.documentMousedown.notify(a); + var e = $(document); + e.bind("mousemove.entryBoard", b); + e.bind("mouseup.entryBoard", d); + e.bind("touchmove.entryBoard", b); + e.bind("touchend.entryBoard", d); + this.dragInstance = new Entry.DragInstance({startX:a.pageX, startY:a.pageY, offsetX:a.pageX, offsetY:a.pageY}); + } else { + if (Entry.Utils.isRightButton(a)) { + if (!this.visible) { + return; + } + a = []; + this._contextOptions[Entry.Board.OPTION_PASTE].option.enable = !!Entry.clipboard; + for (e = 0;e < this._contextOptions.length;e++) { + this._contextOptions[e].activated && a.push(this._contextOptions[e].option); + } + Entry.ContextMenu.show(a); + } + } + var f = this; + } + }; + b.mouseWheel = function(a) { + a = a.originalEvent; + a.preventDefault(); + var b = Entry.disposeEvent; + b && b.notify(a); + this.scroller.scroll(a.wheelDeltaX || -a.deltaX, a.wheelDeltaY || -a.deltaY); + }; + b.setSelectedBlock = function(a) { + var b = this.selectedBlockView; + b && b.removeSelected(); + a instanceof Entry.BlockView ? a.addSelected() : a = null; + this.set({selectedBlockView:a}); + }; + b._keyboardControl = function(a) { + var b = this.selectedBlockView; + b && 46 == a.keyCode && b.block && (Entry.do("destroyBlock", b.block), this.set({selectedBlockView:null})); + }; + b.hide = function() { + this.wrapper.addClass("entryRemove"); + this.visible = !1; + }; + b.show = function() { + this.wrapper.removeClass("entryRemove"); + this.visible = !0; + }; + b.alignThreads = function() { + for (var a = this.svgDom.height(), b = this.code.getThreads(), d = 15, e = 0, a = a - 30, f = 50, g = 0;g < b.length;g++) { + var h = b[g].getFirstBlock(); + if (h) { + var h = h.view, k = h.svgGroup.getBBox(), l = d + 15; + l > a && (f = f + e + 10, e = 0, d = 15); + e = Math.max(e, k.width); + l = d + 15; + h._moveTo(f, l, !1); + d = d + k.height + 15; + } + } + this.scroller.resizeScrollBar(); + }; + b.clear = function() { + this.svgBlockGroup.remove(); + this.svgThreadGroup.remove(); + }; + b.updateOffset = function() { + this._offset = this.svg.getBoundingClientRect(); + var a = $(window), b = a.scrollTop(), a = a.scrollLeft(), d = this._offset; + this.relativeOffset = {top:d.top - b, left:d.left - a}; + this.btnWrapper && this.btnWrapper.attr({transform:"translate(" + (d.width / 2 - 65) + "," + (d.height - 200) + ")"}); + }; + b.generateButtons = function() { + var a = this, b = this.svgGroup.elem("g"); + this.btnWrapper = b; + var d = b.elem("text", {x:27, y:33, class:"entryFunctionButtonText"}); + d.textContent = Lang.Buttons.save; + var e = b.elem("text", {x:102.5, y:33, class:"entryFunctionButtonText"}); + e.textContent = Lang.Buttons.cancel; + var f = b.elem("circle", {cx:27.5, cy:27.5, r:27.5, class:"entryFunctionButton"}), b = b.elem("circle", {cx:102.5, cy:27.5, r:27.5, class:"entryFunctionButton"}); + f.onclick = function(b) { + a.save(); + }; + d.onclick = function(b) { + a.save(); + }; + b.onclick = function(b) { + a.cancelEdit(); + }; + e.onclick = function(b) { + a.cancelEdit(); + }; + }; + b.cancelEdit = function() { + this.workspace.setMode(Entry.Workspace.MODE_BOARD, "cancelEdit"); + }; + b.save = function() { + this.workspace.setMode(Entry.Workspace.MODE_BOARD, "save"); + }; + b.generateCodeMagnetMap = function() { + var a = this.code; + if (a && this.dragBlock) { + for (var b in this.dragBlock.magnet) { + var d = this._getCodeBlocks(a, b); + d.sort(function(a, b) { + return a.point - b.point; + }); + d.unshift({point:-Number.MAX_VALUE, blocks:[]}); + for (var e = 1;e < d.length;e++) { + var f = d[e], g = f, h = f.startBlock; + if (h) { + for (var k = f.endPoint, l = e;k > g.point && (g.blocks.push(h), l++, g = d[l], g);) { + } + delete f.startBlock; + } + f.endPoint = Number.MAX_VALUE; + d[e - 1].endPoint = f.point; + } + this._magnetMap[b] = d; + } + } + }; + b._getCodeBlocks = function(a, b) { + var d = a.getThreads(), e = [], f; + switch(b) { + case "previous": + f = this._getNextMagnets; break; - case a.NORTH: - d = a.HALF_ROTATION; + case "next": + f = this._getPreviousMagnets; break; - case a.WEST: - d = a.TURN_LEFT; + case "string": + f = this._getFieldMagnets; + break; + case "boolean": + f = this._getFieldMagnets; + break; + case "param": + f = this._getOutputMagnets; break; default: - c(); + return []; } - d && Ntry.dispatchEvent("unitAction", d, c); - return Entry.STATIC.CONTINUE; - } -}}; -Entry.block.jr_west = {skeleton:"pebble_basic", color:"#A751E3", contents:[{type:"Text", text:Lang.Menus.go_left}, {type:"Indicator", img:"/img/assets/ntry/bitmap/jr/block_left_image.png", position:{x:83, y:0}, size:22}], func:function() { - if (this.isContinue) { - if (this.isAction) { - return Entry.STATIC.CONTINUE; + for (var g = 0;g < d.length;g++) { + var h = d[g], e = e.concat(f.call(this, h, h.view.zIndex, null, b)) } - delete this.isAction; - delete this.isContinue; - } else { - this.isAction = this.isContinue = !0; - var a = Ntry.STATIC, b = this, c = function() { - window.setTimeout(function() { - Ntry.dispatchEvent("unitAction", a.WALK, function() { - b.isAction = !1; - }); - }, 3); - }, d; - switch(Ntry.unitComp.direction) { - case a.SOUTH: - d = a.TURN_RIGHT; + return e; + }; + b._getNextMagnets = function(a, b, d, e) { + var f = a.getBlocks(), g = [], h = []; + d || (d = {x:0, y:0}); + var k = d.x; + d = d.y; + for (var l = 0;l < f.length;l++) { + var n = f[l], m = n.view; + m.zIndex = b; + if (m.dragInstance) { break; - case a.EAST: - d = a.HALF_ROTATION; + } + d += m.y; + k += m.x; + a = d + 1; + m.magnet.next && (a += m.height, h.push({point:d, endPoint:a, startBlock:n, blocks:[]}), h.push({point:a, blocks:[]}), m.absX = k); + n.statements && (b += .01); + for (var q = 0;q < n.statements.length;q++) { + a = n.statements[q]; + var r = n.view._statements[q]; + r.zIndex = b; + r.absX = k + r.x; + h.push({point:r.y + d - 30, endPoint:r.y + d, startBlock:r, blocks:[]}); + h.push({point:r.y + d + r.height, blocks:[]}); + b += .01; + g = g.concat(this._getNextMagnets(a, b, {x:r.x + k, y:r.y + d}, e)); + } + m.magnet.next && (d += m.magnet.next.y, k += m.magnet.next.x); + } + return g.concat(h); + }; + b._getPreviousMagnets = function(a, b, d, e) { + var f = a.getBlocks(); + a = []; + d || (d = {x:0, y:0}); + e = d.x; + d = d.y; + var f = f[0], g = f.view; + g.zIndex = b; + if (g.dragInstance) { + return []; + } + d += g.y - 15; + e += g.x; + return g.magnet.previous ? (b = d + 1 + g.height, a.push({point:d, endPoint:b, startBlock:f, blocks:[]}), a.push({point:b, blocks:[]}), g.absX = e, a) : []; + }; + b._getFieldMagnets = function(a, b, d, e) { + var f = a.getBlocks(), g = [], h = []; + d || (d = {x:0, y:0}); + var k = d.x; + d = d.y; + for (var l = 0;l < f.length;l++) { + var n = f[l], m = n.view; + if (m.dragInstance) { break; - case a.NORTH: - d = a.TURN_LEFT; + } + m.zIndex = b; + d += m.y; + k += m.x; + h = h.concat(this._getFieldBlockMetaData(m, k, d, b, e)); + n.statements && (b += .01); + for (var q = 0;q < n.statements.length;q++) { + a = n.statements[q]; + var r = n.view._statements[q], g = g.concat(this._getFieldMagnets(a, b, {x:r.x + k, y:r.y + d}, e)); + } + m.magnet.next && (d += m.magnet.next.y, k += m.magnet.next.x); + } + return g.concat(h); + }; + b._getFieldBlockMetaData = function(a, b, d, e, f) { + var g = a._contents, h = []; + d += a.contentPos.y; + for (var k = 0;k < g.length;k++) { + var l = g[k]; + if (l instanceof Entry.FieldBlock) { + var n = l._valueBlock; + if (!n.view.dragInstance && (l.acceptType === f || "boolean" === l.acceptType)) { + var m = b + l.box.x, q = d + l.box.y + a.contentHeight % 1E3 * -.5, r = d + l.box.y + l.box.height; + l.acceptType === f && (h.push({point:q, endPoint:r, startBlock:n, blocks:[]}), h.push({point:r, blocks:[]})); + l = n.view; + l.absX = m; + l.zIndex = e; + h = h.concat(this._getFieldBlockMetaData(l, m + l.contentPos.x, q + l.contentPos.y, e + .01, f)); + } + } + } + return h; + }; + b._getOutputMagnets = function(a, b, d, e) { + var f = a.getBlocks(), g = [], h = []; + d || (d = {x:0, y:0}); + var k = d.x; + d = d.y; + for (var l = 0;l < f.length;l++) { + var n = f[l], m = n.view; + if (m.dragInstance) { break; - default: - c(); + } + m.zIndex = b; + d += m.y; + k += m.x; + h = h.concat(this._getOutputMetaData(m, k, d, b, e)); + n.statements && (b += .01); + for (var q = 0;q < n.statements.length;q++) { + a = n.statements[q]; + var r = n.view._statements[q], g = g.concat(this._getOutputMagnets(a, b, {x:r.x + k, y:r.y + d}, e)); + } + m.magnet.next && (d += m.magnet.next.y, k += m.magnet.next.x); + } + return g.concat(h); + }; + b._getOutputMetaData = function(a, b, d, e, f) { + var g = a._contents, h = []; + b += a.contentPos.x; + d += a.contentPos.y; + for (a = 0;a < g.length;a++) { + var k = g[a], l = b + k.box.x, n = d - 24, m = d; + k instanceof Entry.FieldBlock ? (k.acceptType === f && (h.push({point:n, endPoint:m, startBlock:k, blocks:[]}), h.push({point:m, blocks:[]}), k.absX = l, k.zIndex = e, k.width = 20), (n = k._valueBlock) && (h = h.concat(this._getOutputMetaData(n.view, l, d + k.box.y, e + .01, f)))) : k instanceof Entry.FieldOutput && k.acceptType === f && (h.push({point:n, endPoint:m, startBlock:k, blocks:[]}), h.push({point:m, blocks:[]}), k.absX = l, k.zIndex = e, k.width = 20, (n = k._valueBlock) && (n.view.dragInstance || + (h = h.concat(this._getOutputMetaData(n.view, b + k.box.x, d + k.box.y, e + .01, f))))); + } + return h; + }; + b.getNearestMagnet = function(a, b, d) { + var e = this._magnetMap[d]; + if (e && 0 !== e.length) { + var f = 0, g = e.length - 1, h, k = null, l = "previous" === d ? b - 15 : b; + for (b = -1 < ["previous", "next"].indexOf(d) ? 20 : 0;f <= g;) { + if (h = (f + g) / 2 | 0, d = e[h], l < d.point) { + g = h - 1; + } else { + if (l > d.endPoint) { + f = h + 1; + } else { + e = d.blocks; + for (f = 0;f < e.length;f++) { + if (g = e[f].view, g.absX - b < a && a < g.absX + g.width && (g = d.blocks[f], !k || k.view.zIndex < g.view.zIndex)) { + k = d.blocks[f]; + } + } + return k; + } + } + } + return null; } - d && Ntry.dispatchEvent("unitAction", d, c); - return Entry.STATIC.CONTINUE; - } + }; + b.dominate = function(a) { + a && (a = a.getFirstBlock()) && (this.svgBlockGroup.appendChild(a.view.svgGroup), this.code.dominate(a.thread)); + }; + b.setPatternRectFill = function(a) { + this.patternRect.attr({fill:a}); + }; + b._removeActivated = function() { + this._activatedBlockView && (this._activatedBlockView.removeActivated(), this._activatedBlockView = null); + }; + b.activateBlock = function(a) { + a = a.view; + var b = a.getAbsoluteCoordinate(), d = this.svgDom, e = b.x, b = b.y, e = d.width() / 2 - e, d = d.height() / 2 - b - 100; + this.scroller.scroll(e, d); + a.addActivated(); + this._activatedBlockView = a; + }; + b.reDraw = function() { + this.code.view.reDraw(); + }; + b.separate = function(a, b) { + "string" === typeof a && (a = this.findById(a)); + a.view && a.view._toGlobalCoordinate(); + var d = a.getPrevBlock(); + a.separate(b); + d && d.getNextBlock() && d.getNextBlock().view.bindPrev(); + }; + b.insert = function(a, b, d) { + "string" === typeof a && (a = this.findById(a)); + this.separate(a, d); + 3 === b.length ? a.moveTo(b[0], b[1]) : 4 === b.length && 0 === b[3] ? (b = this.code.getThreads()[b[2]], a.thread.cut(a), b.insertToTop(a), a.getNextBlock().view.bindPrev()) : (b = b instanceof Array ? this.code.getTargetByPointer(b) : b, b instanceof Entry.Block ? ("basic" === a.getBlockType() && a.view.bindPrev(b), a.doInsert(b)) : b instanceof Entry.FieldStatement ? (a.view.bindPrev(b), b.insertTopBlock(a)) : a.doInsert(b)); + }; + b.adjustThreadsPosition = function() { + }; + b._initContextOptions = function() { + var a = this; + this._contextOptions = [{activated:!0, option:{text:"\ubd99\uc5ec\ub123\uae30", enable:!!Entry.clipboard, callback:function() { + Entry.do("addThread", Entry.clipboard).value.getFirstBlock().copyToClipboard(); + }}}, {activated:!0, option:{text:"\ube14\ub85d \uc815\ub9ac\ud558\uae30", callback:function() { + a.alignThreads(); + }}}, {activated:!0, option:{text:"\ubaa8\ub4e0 \ucf54\ub4dc \uc0ad\uc81c\ud558\uae30", callback:function() { + a.code.clear(); + }}}]; + }; + b.activateContextOption = function(a) { + this._contextOptions[a].activated = !0; + }; + b.deActivateContextOption = function(a) { + this._contextOptions[a].activated = !1; + }; + b._bindEvent = function() { + Entry.documentMousedown && (Entry.documentMousedown.attach(this, this.setSelectedBlock), Entry.documentMousedown.attach(this, this._removeActivated)); + Entry.keyPressed && Entry.keyPressed.attach(this, this._keyboardControl); + if (Entry.windowResized) { + var a = _.debounce(this.updateOffset, 200); + Entry.windowResized.attach(this, a); + } + }; + b.offset = function() { + (!this._offset || 0 === this._offset.top && 0 === this._offset.left) && this.updateOffset(); + return this._offset; + }; +})(Entry.Board.prototype); +Entry.skeleton = function() { +}; +Entry.skeleton.basic = {path:function(b) { + var a = b.contentWidth; + b = b.contentHeight; + b = Math.max(30, b + 2); + a = Math.max(0, a + 9 - b / 2); + return "m -8,0 l 8,8 8,-8 h %w a %h,%h 0 0,1 0,%wh h -%w l -8,8 -8,-8 v -%wh z".replace(/%wh/gi, b).replace(/%w/gi, a).replace(/%h/gi, b / 2); +}, box:function(b) { + return {offsetX:-8, offsetY:0, width:(b ? b.contentWidth : 150) + 30, height:Math.max(30, (b ? b.contentHeight : 28) + 2), marginBottom:0}; +}, magnets:function(b) { + return {previous:{x:0, y:0}, next:{x:0, y:(b ? Math.max(b.height, 30) : 30) + 1 + b.offsetY}}; +}, contentPos:function(b) { + return {x:14, y:Math.max(b.contentHeight, 28) / 2 + 1}; +}}; +Entry.skeleton.basic_event = {path:function(b) { + b = b.contentWidth; + b = Math.max(0, b); + return "m -8,0 m 0,-5 a 19.5,19.5 0, 0,1 16,0 c 10,5 15,5 20,5 h %w a 15,15 0 0,1 0,30 H 8 l -8,8 -8,-8 l 0,0.5 a 19.5,19.5 0, 0,1 0,-35 z".replace(/%w/gi, b - 30); +}, box:function(b) { + return {offsetX:-19, offsetY:-7, width:b.contentWidth + 30, height:30, marginBottom:0}; +}, magnets:function(b) { + return {next:{x:0, y:(b ? Math.max(b.height + b.offsetY + 7, 30) : 30) + 1}}; +}, contentPos:function(b) { + return {x:1, y:15}; }}; -Entry.block.jr_start_basic = {skeleton:"basic_event", event:"start", color:"#3BBD70", contents:[{type:"Indicator", boxMultiplier:1, img:"/img/assets/block_icon/start_icon_play.png", highlightColor:"#3BBD70", size:17, position:{x:0, y:-2}}, Lang.Menus.maze_when_run], func:function() { - var a = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), b; - for (b in a) { - this._unit = a[b]; - } - Ntry.unitComp = Ntry.entityManager.getComponent(this._unit.id, Ntry.STATIC.UNIT); +Entry.skeleton.basic_loop = {path:function(b) { + var a = b.contentWidth, c = b.contentHeight, c = Math.max(30, c + 2), a = Math.max(0, a + 9 - c / 2); + b = b._statements[0] ? b._statements[0].height : 20; + b = Math.max(b, 20); + return "m -8,0 l 8,8 8,-8 h %w a %h,%h 0 0,1 0,%wh H 24 l -8,8 -8,-8 h -0.4 v %sh h 0.4 l 8,8 8,-8 h %bw a 8,8 0 0,1 0,16 H 8 l -8,8 -8,-8 z".replace(/%wh/gi, c).replace(/%w/gi, a).replace(/%bw/gi, a - 8).replace(/%h/gi, c / 2).replace(/%sh/gi, b + 1); +}, magnets:function(b) { + var a = Math.max(b.contentHeight + 2, 30), c = b._statements[0] ? b._statements[0].height : 20, c = Math.max(c, 20); + return {previous:{x:0, y:0}, next:{x:0, y:c + a + 18 + b.offsetY}}; +}, box:function(b) { + var a = b.contentWidth, c = Math.max(b.contentHeight + 2, 30); + b = b._statements[0] ? b._statements[0].height : 20; + b = Math.max(b, 20); + return {offsetX:-8, offsetY:0, width:a + 30, height:c + b + 17, marginBottom:0}; +}, statementPos:function(b) { + return [{x:16, y:Math.max(30, b.contentHeight + 2) + 1}]; +}, contentPos:function(b) { + return {x:14, y:Math.max(b.contentHeight, 28) / 2 + 1}; +}}; +Entry.skeleton.basic_define = {path:function(b) { + var a = b.contentWidth, c = b.contentHeight, c = Math.max(30, c + 2), a = Math.max(0, a + 9 - c / 2); + b = b._statements[0] ? b._statements[0].height : 30; + b = Math.max(b, 20); + return "m -8,0 l 16,0 h %w a %h,%h 0 0,1 0,%wh H 24 l -8,8 -8,-8 h -0.4 v %sh h 0.4 l 8,8 8,-8 h %bw a 8,8 0 0,1 0,16 H -8 z".replace(/%wh/gi, c).replace(/%w/gi, a).replace(/%h/gi, c / 2).replace(/%bw/gi, a - 8).replace(/%sh/gi, b + 1); +}, magnets:function() { + return {}; +}, box:function(b) { + return {offsetX:0, offsetY:0, width:b.contentWidth, height:Math.max(b.contentHeight, 25) + 46, marginBottom:0}; +}, statementPos:function(b) { + return [{x:16, y:Math.max(30, b.contentHeight + 2)}]; +}, contentPos:function() { + return {x:14, y:15}; }}; -Entry.block.jr_go_straight = {skeleton:"basic", color:"#A751E3", contents:[Lang.Menus.go_forward, {type:"Image", img:"/img/assets/ntry/bitmap/jr/cparty_go_straight.png", size:24}], func:function() { - if (this.isContinue) { - if (this.isAction) { - return Entry.STATIC.CONTINUE; - } - delete this.isAction; - delete this.isContinue; - } else { - this.isAction = this.isContinue = !0; - var a = this; - Ntry.dispatchEvent("unitAction", Ntry.STATIC.WALK, function() { - a.isAction = !1; - }); - return Entry.STATIC.CONTINUE; - } +Entry.skeleton.pebble_event = {path:function(b) { + return "m 0,0 a 25,25 0 0,1 9,48.3 a 9,9 0 0,1 -18,0 a 25,25 0 0,1 9,-48.3 z"; +}, box:function(b) { + return {offsetX:-25, offsetY:0, width:50, height:48.3, marginBottom:0}; +}, magnets:function(b) { + return {next:{x:0, y:(b ? Math.max(b.height, 49.3) : 49.3) + b.offsetY}}; +}, contentPos:function() { + return {x:0, y:25}; }}; -Entry.block.jr_turn_left = {skeleton:"basic", color:"#A751E3", contents:[Lang.Menus.jr_turn_left, {type:"Image", img:"/img/assets/ntry/bitmap/jr/cparty_rotate_l.png", size:24}], func:function() { - if (this.isContinue) { - if (this.isAction) { - return Entry.STATIC.CONTINUE; - } - delete this.isAction; - delete this.isContinue; - } else { - this.isAction = this.isContinue = !0; - var a = this; - Ntry.dispatchEvent("unitAction", Ntry.STATIC.TURN_LEFT, function() { - a.isAction = !1; - }); - return Entry.STATIC.CONTINUE; - } +Entry.skeleton.pebble_loop = {fontSize:16, dropdownHeight:23, path:function(b) { + b = Math.max(b._statements[0] ? b._statements[0].height : 50, 50); + return "M 0,9 a 9,9 0 0,0 9,-9 h %cw q 25,0 25,25 v %ch q 0,25 -25,25 h -%cw a 9,9 0 0,1 -18,0 h -%cw q -25,0 -25,-25 v -%ch q 0,-25 25,-25 h %cw a 9,9 0 0,0 9,9 M 0,49 a 9,9 0 0,1 -9,-9 h -28 a 25,25 0 0,0 -25,25 v %cih a 25,25 0 0,0 25,25 h 28 a 9,9 0 0,0 18,0 h 28 a 25,25 0 0,0 25,-25 v -%cih a 25,25 0 0,0 -25,-25 h -28 a 9,9 0 0,1 -9,9 z".replace(/%cw/gi, 41).replace(/%ch/gi, b + 4).replace(/%cih/gi, b - 50); +}, magnets:function(b) { + var a = Math.max(b.contentHeight + 2, 41), c = b._statements[0] ? b._statements[0].height : 20, c = Math.max(c, 51); + return {previous:{x:0, y:0}, next:{x:0, y:c + a + 13 + b.offsetY}}; +}, box:function(b) { + var a = b.contentWidth, c = Math.max(b.contentHeight + 2, 41); + b = b._statements[0] ? b._statements[0].height : 20; + b = Math.max(b, 51); + return {offsetX:-(a / 2 + 13), offsetY:0, width:a + 30, height:c + b + 13, marginBottom:0}; +}, statementPos:function(b) { + return [{x:0, y:Math.max(39, b.contentHeight + 2) + 1.5}]; +}, contentPos:function() { + return {x:-46, y:25}; }}; -Entry.block.jr_turn_right = {skeleton:"basic", color:"#A751E3", contents:[Lang.Menus.jr_turn_right, {type:"Image", img:"/img/assets/ntry/bitmap/jr/cparty_rotate_r.png", size:24}], func:function() { - if (this.isContinue) { - if (this.isAction) { - return Entry.STATIC.CONTINUE; +Entry.skeleton.pebble_basic = {fontSize:15, morph:["prev", "next"], path:function(b) { + return "m 0,9 a 9,9 0 0,0 9,-9 h 28 q 25,0 25,25q 0,25 -25,25h -28 a 9,9 0 0,1 -18,0 h -28 q -25,0 -25,-25q 0,-25 25,-25h 28 a 9,9 0 0,0 9,9 z"; +}, magnets:function(b) { + return {previous:{x:0, y:0}, next:{x:0, y:(b ? Math.max(b.height, 51) : 51) + b.offsetY}}; +}, box:function() { + return {offsetX:-62, offsetY:0, width:124, height:50, marginBottom:0}; +}, contentPos:function() { + return {x:-46, y:25}; +}}; +Entry.skeleton.basic_string_field = {path:function(b) { + var a = b.contentWidth; + b = b.contentHeight; + b = Math.max(18, b + 2); + a = Math.max(0, a - b + 12); + return "m %h,0 h %w a %h,%h 0 1,1 0,%wh H %h A %h,%h 0 1,1 %h,0 z".replace(/%wh/gi, b).replace(/%w/gi, a).replace(/%h/gi, b / 2); +}, color:"#000", outerLine:"#768dce", box:function(b) { + return {offsetX:0, offsetY:0, width:(b ? b.contentWidth : 5) + 12, height:Math.max((b ? b.contentHeight : 18) + 2, 18), marginBottom:0}; +}, magnets:function() { + return {string:{}}; +}, contentPos:function(b) { + return {x:6, y:Math.max(b.contentHeight, 16) / 2 + 1}; +}}; +Entry.skeleton.basic_boolean_field = {path:function(b) { + var a = b.contentWidth; + b = b.contentHeight; + b = Math.max(18, b + 2); + a = Math.max(0, a - b + 19); + return "m %h,0 h %w l %h,%h -%h,%h H %h l -%h,-%h %h,-%h z".replace(/%wh/gi, b).replace(/%w/gi, a).replace(/%h/gi, b / 2); +}, color:"#000", outerLine:"#768dce", box:function(b) { + return {offsetX:0, offsetY:0, width:(b ? b.contentWidth : 5) + 19, height:Math.max((b ? b.contentHeight : 18) + 2, 18), marginBottom:0}; +}, magnets:function() { + return {boolean:{}}; +}, contentPos:function(b) { + return {x:10, y:Math.max(b.contentHeight, 16) / 2 + 1}; +}}; +Entry.skeleton.basic_param = {path:function(b) { + var a = b.contentWidth; + (b = b._contents[b._contents.length - 1]) && (a -= b.box.width + Entry.BlockView.PARAM_SPACE - 2); + a = Math.max(0, a); + return "m 4,0 h 10 h %w l 2,2 0,3 3,0 1,1 0,12 -1,1 -3,0 0,3 -2,2h -%w h -10 l -2,-2 0,-3 3,0 1,-1 0,-12 -1,-1 -3,0 0,-3 2,-2".replace(/%w/gi, a); +}, outerLine:"#768dce", box:function(b) { + return {offsetX:0, offsetY:0, width:(b ? b.contentWidth : 5) + 11, height:24, marginBottom:0}; +}, magnets:function() { + return {param:{}}; +}, contentPos:function(b) { + return {x:11, y:12}; +}}; +Entry.skeleton.basic_button = {path:function() { + return "m -64,0 h 128 a 6,6 0, 0,1 6,6 v 18 a 6,6 0, 0,1 -6,6 h -128 a 6,6 0, 0,1 -6,-6 v -18 a 6,6 0, 0,1 6,-6 z"; +}, box:function() { + return {offsetX:-80, offsetY:0, width:140, height:30}; +}, contentPos:function() { + return {x:0, y:15}; +}, movable:!1, readOnly:!0, nextShadow:!0, classes:["basicButtonView"]}; +Entry.skeleton.basic_without_next = {box:Entry.skeleton.basic.box, contentPos:Entry.skeleton.basic.contentPos, path:function(b) { + var a = b.contentWidth; + b = b.contentHeight; + b = Math.max(30, b + 2); + a = Math.max(0, a + 9 - b / 2); + return "m -8,0 l 8,8 8,-8 h %w a %h,%h 0 0,1 0, %wh H -8 z".replace(/%wh/gi, b).replace(/%w/gi, a).replace(/%h/gi, b / 2); +}, magnets:function(b) { + return {previous:{x:0, y:0}}; +}}; +Entry.skeleton.basic_double_loop = {path:function(b) { + var a = b.contentWidth, c = b.contentHeight % 1E3, d = Math.floor(b.contentHeight / 1E3), c = Math.max(30, c + 2), d = Math.max(30, d + 2), a = Math.max(0, a + 5 - c / 2), e = b._statements; + b = e[0] ? e[0].height : 20; + e = e[1] ? e[1].height : 20; + b = Math.max(b, 20); + e = Math.max(e, 20); + return "m -8,0 l 8,8 8,-8 h %w a %h1,%h1 0 0,1 0,%wh1 H 24 l -8,8 -8,-8 h -0.4 v %sh1 h 0.4 l 8,8 8,-8 h %bw a %h2,%h2 0 0,1 0,%wh2 H 24 l -8,8 -8,-8 h -0.4 v %sh2 h 0.4 l 8,8 8,-8 h %bw a 8,8 0 0,1 0,16 H 8 l -8,8 -8,-8 z".replace(/%wh1/gi, c).replace(/%wh2/gi, d).replace(/%w/gi, a).replace(/%bw/gi, a - 8).replace(/%h1/gi, c / 2).replace(/%h2/gi, d / 2).replace(/%sh1/gi, b + 1).replace(/%sh2/gi, e + 1); +}, magnets:function(b) { + var a = Math.max(b.contentHeight % 1E3 + 2, 30), c = Math.max(Math.floor(b.contentHeight / 1E3) + 2, 30), d = b._statements[0] ? b._statements[0].height : 20, e = b._statements[1] ? b._statements[1].height : 20, d = Math.max(d, 20), e = Math.max(e, 20); + return {previous:{x:0, y:0}, next:{x:0, y:d + e + a + c + 19 + b.offsetY}}; +}, box:function(b) { + var a = b.contentWidth, c = Math.max(Math.floor(b.contentHeight / 1E3) + 2, 30), d = Math.max(b.contentHeight % 1E3 + 2, 30), e = b._statements[0] ? b._statements[0].height % 1E3 : 20; + b = b._statements[1] ? b._statements[1].height : 20; + b = Math.floor(b / 1E3); + e = Math.max(e, 20); + b = Math.max(b, 20); + return {offsetX:-8, offsetY:0, width:a + 30, height:c + d + e + b + 17, marginBottom:0}; +}, statementPos:function(b) { + var a = Math.max(30, b.contentHeight % 1E3 + 2) + 1; + return [{x:16, y:a}, {x:16, y:a + Math.max(b._statements[0] ? b._statements[0].height % 1E3 : 20, 20) + Math.max(Math.floor(b.contentHeight / 1E3) + 2, 30) + 1}]; +}, contentPos:function(b) { + return {x:14, y:Math.max(b.contentHeight % 1E3, 28) / 2 + 1}; +}}; +Entry.Thread = function(b, a, c) { + this._data = new Entry.Collection; + this._code = a; + this.changeEvent = new Entry.Event(this); + this.changeEvent.attach(this, this.handleChange); + this._event = null; + this.parent = c ? c : a; + this.load(b); +}; +(function(b) { + b.load = function(a, b) { + void 0 === a && (a = []); + if (!(a instanceof Array)) { + return console.error("thread must be array"); } - delete this.isAction; - delete this.isContinue; - } else { - this.isAction = this.isContinue = !0; - var a = this; - Ntry.dispatchEvent("unitAction", Ntry.STATIC.TURN_RIGHT, function() { - a.isAction = !1; + for (var d = 0;d < a.length;d++) { + var e = a[d]; + e instanceof Entry.Block || e.isDummy ? (e.setThread(this), this._data.push(e)) : this._data.push(new Entry.Block(e, this)); + } + (d = this._code.view) && this.createView(d.board, b); + }; + b.registerEvent = function(a, b) { + this._event = b; + this._code.registerEvent(a, b); + }; + b.unregisterEvent = function(a, b) { + this._code.unregisterEvent(a, b); + }; + b.createView = function(a, b) { + this.view || (this.view = new Entry.ThreadView(this, a)); + this._data.map(function(d) { + d.createView(a, b); }); - return Entry.STATIC.CONTINUE; - } -}}; -Entry.block.jr_go_slow = {skeleton:"basic", color:"#f46c6c", contents:[Lang.Menus.go_slow, {type:"Image", img:"/img/assets/ntry/bitmap/jr/cparty_go_slow.png", size:24}], func:function() { - if (this.isContinue) { - if (this.isAction) { - return Entry.STATIC.CONTINUE; + }; + b.separate = function(a, b) { + if (this._data.has(a.id)) { + var d = this._data.splice(this._data.indexOf(a), b); + this._code.createThread(d); + this.changeEvent.notify(); } - delete this.isAction; - delete this.isContinue; - } else { - this.isAction = this.isContinue = !0; - var a = this; - Ntry.dispatchEvent("unitAction", Ntry.STATIC.GO_SLOW, function() { - a.isAction = !1; + }; + b.cut = function(a) { + a = this._data.indexOf(a); + a = this._data.splice(a); + this.changeEvent.notify(); + return a; + }; + b.insertByBlock = function(a, b) { + for (var d = a ? this._data.indexOf(a) : -1, e = 0;e < b.length;e++) { + b[e].setThread(this); + } + this._data.splice.apply(this._data, [d + 1, 0].concat(b)); + this.changeEvent.notify(); + }; + b.insertToTop = function(a) { + a.setThread(this); + this._data.unshift.apply(this._data, [a]); + this.changeEvent.notify(); + }; + b.clone = function(a, b) { + a = a || this._code; + for (var d = new Entry.Thread([], a), e = this._data, f = [], g = 0, h = e.length;g < h;g++) { + f.push(e[g].clone(d)); + } + d.load(f, b); + return d; + }; + b.toJSON = function(a, b) { + for (var d = [], e = void 0 === b ? 0 : b;e < this._data.length;e++) { + this._data[e] instanceof Entry.Block && d.push(this._data[e].toJSON(a)); + } + return d; + }; + b.destroy = function(a) { + this._code.destroyThread(this, !1); + this.view && this.view.destroy(a); + for (var b = this._data, d = b.length - 1;0 <= d;d--) { + b[d].destroy(a); + } + }; + b.getBlock = function(a) { + return this._data[a]; + }; + b.getBlocks = function() { + return this._data.map(function(a) { + return a; }); - return Entry.STATIC.CONTINUE; - } -}}; -Entry.block.jr_repeat_until_dest = {skeleton:"basic_loop", color:"#498DEB", contents:[Lang.Menus.repeat_until_reach_2, {type:"Image", img:"/img/assets/ntry/bitmap/jr/jr_goal_image.png", size:18}, Lang.Menus.repeat_until_reach_1, {type:"Image", img:"/img/assets/week/blocks/for.png", size:24}, {type:"Statement", key:"STATEMENT", accept:"basic", alignY:15, alignX:2}], func:function() { - if (1 !== this.block.values.STATEMENT.getBlocks().length) { - return this.executor.stepInto(this.block.values.STATEMENT), Entry.STATIC.CONTINUE; - } -}}; -Entry.block.jr_if_construction = {skeleton:"basic_loop", color:"#498DEB", contents:[Lang.Menus.jr_if_1, {type:"Image", img:"/img/assets/ntry/bitmap/jr/jr_construction_image.png", size:18}, Lang.Menus.jr_if_2, {type:"Image", img:"/img/assets/week/blocks/for.png", size:24}, {type:"Statement", key:"STATEMENT", accept:"basic", alignY:15, alignX:2}], func:function() { - if (!this.isContinue) { - var a = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), b, c; - for (c in a) { - b = a[c]; + }; + b.countBlock = function() { + for (var a = 0, b = 0;b < this._data.length;b++) { + var d = this._data[b]; + if (d.type && (a++, d = d.statements)) { + for (var e = 0;e < d.length;e++) { + a += d[e].countBlock(); + } + } } - a = Ntry.entityManager.getComponent(b.id, Ntry.STATIC.UNIT); - b = Ntry.entityManager.getComponent(b.id, Ntry.STATIC.GRID); - b = {x:b.x, y:b.y}; - Ntry.addVectorByDirection(b, a.direction, 1); - b = Ntry.entityManager.find({type:Ntry.STATIC.GRID, x:b.x, y:b.y}, {type:Ntry.STATIC.TILE, tileType:Ntry.STATIC.OBSTACLE_REPAIR}); - this.isContinue = !0; - a = this.block.values.STATEMENT; - if (0 !== b.length && 1 !== a.getBlocks().length) { - return this.executor.stepInto(a), Entry.STATIC.CONTINUE; + return a; + }; + b.handleChange = function() { + 0 === this._data.length && this.destroy(); + }; + b.getCode = function() { + return this._code; + }; + b.setCode = function(a) { + this._code = a; + }; + b.spliceBlock = function(a) { + var b = this._data; + b.remove(a); + 0 === b.length && this.view.getParent().constructor !== Entry.FieldStatement && this.destroy(); + this.changeEvent.notify(); + }; + b.getFirstBlock = function() { + return this._data[0]; + }; + b.getPrevBlock = function(a) { + a = this._data.indexOf(a); + return this._data.at(a - 1); + }; + b.getNextBlock = function(a) { + a = this._data.indexOf(a); + return this._data.at(a + 1); + }; + b.getLastBlock = function() { + return this._data.at(this._data.length - 1); + }; + b.getRootBlock = function() { + return this._data.at(0); + }; + b.hasBlockType = function(a) { + function b(d) { + if (a == d.type) { + return !0; + } + for (var f = d.params, g = 0;g < f.length;g++) { + var h = f[g]; + if (h && h.constructor == Entry.Block && b(h)) { + return !0; + } + } + if (d = d.statements) { + for (f = 0;f < d.length;f++) { + if (d[f].hasBlockType(a)) { + return !0; + } + } + } + return !1; } - } -}}; -Entry.block.jr_if_speed = {skeleton:"basic_loop", color:"#498DEB", contents:[Lang.Menus.jr_if_1, {type:"Image", img:"/img/assets/ntry/bitmap/jr/jr_speed_image.png", size:18}, Lang.Menus.jr_if_2, {type:"Image", img:"/img/assets/week/blocks/for.png", size:24}, {type:"Statement", key:"STATEMENT", accept:"basic", alignY:15, alignX:2}], func:function() { - if (!this.isContinue) { - var a = Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT), b, c; - for (c in a) { - b = a[c]; + for (var d = 0;d < this._data.length;d++) { + if (b(this._data[d])) { + return !0; + } } - a = Ntry.entityManager.getComponent(b.id, Ntry.STATIC.UNIT); - b = Ntry.entityManager.getComponent(b.id, Ntry.STATIC.GRID); - b = {x:b.x, y:b.y}; - Ntry.addVectorByDirection(b, a.direction, 1); - b = Ntry.entityManager.find({type:Ntry.STATIC.GRID, x:b.x, y:b.y}, {type:Ntry.STATIC.TILE, tileType:Ntry.STATIC.OBSTACLE_SLOW}); - this.isContinue = !0; - a = this.block.values.STATEMENT; - if (0 !== b.length && 1 !== a.getBlocks().length) { - return this.executor.stepInto(a), Entry.STATIC.CONTINUE; + return !1; + }; + b.getCount = function(a) { + var b = this._data.length; + a && (b -= this._data.indexOf(a)); + return b; + }; + b.indexOf = function(a) { + return this._data.indexOf(a); + }; + b.pointer = function(a, b) { + var d = this.indexOf(b); + a.unshift(d); + this.parent instanceof Entry.Block && a.unshift(this.parent.indexOfStatements(this)); + return this._code === this.parent ? (a.unshift(this._code.indexOf(this)), d = this._data[0], a.unshift(d.y), a.unshift(d.x), a) : this.parent.pointer(a); + }; + b.getBlockList = function(a) { + for (var b = [], d = 0;d < this._data.length;d++) { + b = b.concat(this._data[d].getBlockList(a)); } - } -}}; -Entry.BlockMenu = function(a, b) { + return b; + }; +})(Entry.Thread.prototype); +Entry.Block = function(b, a) { + var c = this; Entry.Model(this, !1); - this._align = b || "CENTER"; - a = "string" === typeof a ? $("#" + a) : $(a); - if ("DIV" !== a.prop("tagName")) { - return console.error("Dom is not div element"); - } - if ("function" !== typeof window.Snap) { - return console.error("Snap library is required"); - } - this.svgDom = Entry.Dom($(''), {parent:a}); - this.offset = this.svgDom.offset(); - this._svgWidth = this.svgDom.width(); - this.snap = Snap("#blockMenu"); - this.svgGroup = this.snap.group(); - this.svgThreadGroup = this.svgGroup.group(); - this.svgThreadGroup.board = this; - this.svgBlockGroup = this.svgGroup.group(); - this.svgBlockGroup.board = this; - this.changeEvent = new Entry.Event(this); - this.observe(this, "generateDragBlockObserver", ["dragBlock"]); - Entry.documentMousedown && Entry.documentMousedown.attach(this, this.setSelectedBlock); + this._schema = null; + this.setThread(a); + this.load(b); + var d = this.getCode(); + d.registerBlock(this); + var e = this.events.dataAdd; + e && d.object && e.forEach(function(a) { + Entry.Utils.isFunction(a) && a(c); + }); }; -(function(a) { - a.schema = {code:null, dragBlock:null, closeBlock:null, selectedBlockView:null}; - a.changeCode = function(b) { - if (!(b instanceof Entry.Code)) { - return console.error("You must inject code instance"); +Entry.Block.MAGNET_RANGE = 10; +Entry.Block.MAGNET_OFFSET = .4; +Entry.Block.DELETABLE_TRUE = 1; +Entry.Block.DELETABLE_FALSE = 2; +Entry.Block.DELETABLE_FALSE_LIGHTEN = 3; +(function(b) { + b.schema = {id:null, x:0, y:0, type:null, params:[], statements:[], view:null, thread:null, movable:null, deletable:Entry.Block.DELETABLE_TRUE, readOnly:null, copyable:!0, events:{}}; + b.load = function(a) { + a.id || (a.id = Entry.Utils.generateId()); + this.set(a); + this.loadSchema(); + }; + b.changeSchema = function(a) { + this.set({params:[]}); + this.loadSchema(); + }; + b.getSchema = function() { + this._schema || this.loadSchema(); + return this._schema; + }; + b.loadSchema = function() { + if (this._schema = Entry.block[this.type]) { + !this._schemaChangeEvent && this._schema.changeEvent && (this._schemaChangeEvent = this._schema.changeEvent.attach(this, this.changeSchema)); + var a = this._schema.events; + if (a) { + for (var b in a) { + this.events[b] || (this.events[b] = []); + for (var d = a[b], e = 0;e < d.length;e++) { + var f = d[e]; + f && 0 > this.events[b].indexOf(f) && this.events[b].push(f); + } + } + } + this._schema.event && this.thread.registerEvent(this, this._schema.event); + a = this.params; + b = this._schema.params; + for (e = 0;b && e < b.length;e++) { + d = void 0 === a[e] || null === a[e] ? b[e].value : a[e], f = a[e] || e < a.length, !d || "Output" !== b[e].type && "Block" !== b[e].type || (d = new Entry.Block(d, this.thread)), f ? a.splice(e, 1, d) : a.push(d); + } + if (a = this._schema.statements) { + for (e = 0;e < a.length;e++) { + this.statements.splice(e, 1, new Entry.Thread(this.statements[e], this.getCode(), this)); + } + } } - this.codeListener && this.code.changeEvent.detach(this.codeListener); - this.set({code:b}); - var a = this; - this.codeListener = this.code.changeEvent.attach(this, function() { - a.changeEvent.notify(); + }; + b.changeType = function(a) { + this._schemaChangeEvent && this._schemaChangeEvent.destroy(); + this.set({type:a}); + this.loadSchema(); + this.view && this.view.changeType(a); + }; + b.setThread = function(a) { + this.set({thread:a}); + }; + b.getThread = function() { + return this.thread; + }; + b.insertAfter = function(a) { + this.thread.insertByBlock(this, a); + }; + b._updatePos = function() { + this.view && this.set({x:this.view.x, y:this.view.y}); + }; + b.moveTo = function(a, b) { + this.view && this.view._moveTo(a, b); + this._updatePos(); + this.getCode().changeEvent.notify(); + }; + b.createView = function(a, b) { + this.view || (this.set({view:new Entry.BlockView(this, a, b)}), this._updatePos()); + }; + b.clone = function(a) { + return new Entry.Block(this.toJSON(!0), a); + }; + b.toJSON = function(a) { + var b = this._toJSON(); + delete b.view; + delete b.thread; + delete b.events; + a && delete b.id; + b.params = b.params.map(function(b) { + b instanceof Entry.Block && (b = b.toJSON(a)); + return b; }); - b.createView(this); - this.align(); + b.statements = b.statements.map(function(b) { + return b.toJSON(a); + }); + b.x = this.x; + b.y = this.y; + b.movable = this.movable; + b.deletable = this.deletable; + b.readOnly = this.readOnly; + return b; }; - a.bindCodeView = function(b) { - this.svgBlockGroup.remove(); - this.svgThreadGroup.remove(); - this.svgBlockGroup = b.svgBlockGroup; - this.svgThreadGroup = b.svgThreadGroup; - this.svgGroup.append(this.svgThreadGroup); - this.svgGroup.append(this.svgBlockGroup); - }; - a.align = function() { - for (var b = this.code.getThreads(), a = 10, d = "LEFT" == this._align ? 20 : this.svgDom.width() / 2, e = 0, f = b.length;e < f;e++) { - var g = b[e].getFirstBlock(), h = g.view; - g.set({x:d, y:a}); - h._moveTo(d, a, !1); - a += h.height + 15; + b.destroy = function(a, b) { + var d = this, e = this.params; + if (e) { + for (var f = 0;f < e.length;f++) { + var g = e[f]; + g instanceof Entry.Block && (g.doNotSplice = !0, g.destroy(a)); + } } - this.changeEvent.notify(); - }; - a.generateDragBlockObserver = function() { - var b = this.dragBlock; - b && (this.dragBlockObserver && this.removeDragBlockObserver(), this.dragBlockObserver = b.observe(this, "cloneThread", ["x", "y"], !1)); - }; - a.removeDragBlockObserver = function() { - var b = this.dragBlockObserver; - null !== b && (b.destroy(), this.dragBlockObserver = null); - }; - a.cloneThread = function(b) { - b = void 0 === b ? !0 : b; - if (null !== this.dragBlock) { - this.dragBlockObserver && this.removeDragBlockObserver(); - var a = this._svgWidth, d = this.dragBlock, e = d.block, f = this.code, g = e.getThread(); - e && g && (f.cloneThread(g), b && d.observe(this, "moveBoardBlock", ["x", "y"], !1), d.dominate(), b = this.workspace.getBoard(), this._boardBlockView = b.code.cloneThread(g).getFirstBlock().view, this._boardBlockView.dragInstance = new Entry.DragInstance({height:0, isNew:!0}), b.set({dragBlock:this._boardBlockView}), b.setSelectedBlock(this._boardBlockView), this._boardBlockView.addDragging(), this._boardBlockView.dragMode = Entry.DRAG_MODE_MOUSEDOWN, this._boardBlockView._moveTo(d.x - a, - d.y - 0, !1)); - if (this._boardBlockView) { - return this._boardBlockView.block.id; + if (e = this.statements) { + for (f = 0;f < e.length;f++) { + e[f].destroy(a); } } + g = this.getPrevBlock(); + f = this.getNextBlock(); + this.getCode().unregisterBlock(this); + e = this.getThread(); + this._schema.event && e.unregisterEvent(this, this._schema.event); + f && (b ? f.destroy(a, b) : g ? f.view.bindPrev(g) : (g = this.getThread().view.getParent(), g.constructor === Entry.FieldStatement ? (f.view.bindPrev(g), g.insertTopBlock(f)) : g.constructor === Entry.FieldStatement ? f.replace(g._valueBlock) : f.view._toGlobalCoordinate())); + this.doNotSplice ? delete this.doNotSplice : e.spliceBlock(this); + this.view && this.view.destroy(a); + this._schemaChangeEvent && this._schemaChangeEvent.destroy(); + (f = this.events.dataDestroy) && this.getCode().object && f.forEach(function(a) { + Entry.Utils.isFunction(a) && a(d); + }); }; - a.terminateDrag = function() { - if (this._boardBlockView) { - var b = this._boardBlockView; - if (b) { - var a = b.block, d = this.dragBlock, e = d.block, f = this.code, g = this.workspace, h = g.getBoard().code, k = !1; - b.dragMode = 0; - b.removeDragging(); - d.x < this._svgWidth ? (k = !0, h.destroyThread(a.getThread(), k)) : a.view.terminateDrag(); - g.getBoard().set({dragBlock:null}); - f.destroyThread(e.getThread(), k); - delete b.dragInstance; - this._boardBlockView = null; + b.getView = function() { + return this.view; + }; + b.setMovable = function(a) { + this.movable != a && this.set({movable:a}); + }; + b.setCopyable = function(a) { + this.copyable != a && this.set({copyable:a}); + }; + b.isMovable = function() { + return this.movable; + }; + b.isCopyable = function() { + return this.copyable; + }; + b.setDeletable = function(a) { + this.deletable != a && this.set({deletable:a}); + }; + b.isDeletable = function() { + return this.deletable === Entry.Block.DELETABLE_TRUE; + }; + b.isReadOnly = function() { + return this.readOnly; + }; + b.getCode = function() { + return this.thread.getCode(); + }; + b.doAdd = function() { + this.getCode().changeEvent.notify(); + }; + b.doMove = function() { + this._updatePos(); + this.getCode().changeEvent.notify(); + }; + b.doSeparate = function() { + this.separate(); + }; + b.doInsert = function(a) { + "basic" === this.getBlockType() ? this.insert(a) : this.replace(a); + }; + b.doDestroy = function(a) { + this.destroy(a); + this.getCode().changeEvent.notify(); + return this; + }; + b.doDestroyBelow = function(a) { + console.log("destroyBelow", this.id, this.x, this.y); + this.destroy(a, !0); + this.getCode().changeEvent.notify(); + return this; + }; + b.copy = function() { + var a = this.getThread(), b = []; + if (a instanceof Entry.Thread) { + for (var d = a.getBlocks().indexOf(this), a = a.toJSON(!0, d), d = 0;d < a.length;d++) { + b.push(a[d]); } + } else { + b.push(this.toJSON(!0)); } + a = this.view.getAbsoluteCoordinate(); + d = b[0]; + d.x = a.x + 15; + d.y = a.y + 15; + d.id = Entry.Utils.generateId(); + return b; }; - a.dominate = function(b) { - this.snap.append(b.svgGroup); + b.copyToClipboard = function() { + Entry.clipboard = this.copy(); }; - a.getCode = function(b) { - return this._code; + b.separate = function(a) { + this.thread.separate(this, a); + this._updatePos(); + this.getCode().changeEvent.notify(); + }; + b.insert = function(a) { + var b = this.thread.cut(this); + a instanceof Entry.Thread ? a.insertByBlock(null, b) : a.insertAfter(b); + this._updatePos(); + this.getCode().changeEvent.notify(); + }; + b.replace = function(a) { + this.thread.cut(this); + a.getThread().replace(this); + this.getCode().changeEvent.notify(); + }; + b.getPrevBlock = function() { + return this.thread.getPrevBlock(this); + }; + b.getNextBlock = function() { + return this.thread.getNextBlock(this) || null; }; - a.moveBoardBlock = function() { - var b = this.workspace.getBoard().offset, a = this.offset, d = b.left - a.left, b = b.top - a.top, e = this.dragBlock, a = this._boardBlockView, f = a.dragInstance, g = Entry.mouseCoordinate; - f.set({offsetX:g.x, offsetY:g.y}); - if (0 === f.height) { - for (var g = a.block, h = 0;g;) { - h += g.view.height, g = g.next; + b.getLastBlock = function() { + return this.thread.getLastBlock(); + }; + b.getOutputBlock = function() { + for (var a = this._schema.params, b = 0;a && b < a.length;b++) { + if ("Output" === a[b].type) { + return this.params[b]; } - f.set({height:h}); } - e && a && (f = e.x, e = e.y, a.dragMode = 2, a._moveTo(f - d, e - b, !1)); - }; - a.setMagnetedBlock = function() { + return null; }; - a.findById = function(b) { - for (var a = this.code.getThreads(), d = 0, e = a.length;d < e;d++) { - var f = a[d]; - if (f && (f = f.getFirstBlock()) && f.id == b) { - return f; + b.getTerminateOutputBlock = function() { + for (var a = this;;) { + var b = a.getOutputBlock(); + if (!b) { + return a; } + a = b; } }; - a.setSelectedBlock = function(b) { - var a = this.selectedBlockView; - a && a.removeSelected(); - b instanceof Entry.BlockView ? b.addSelected() : b = null; - this.set({selectedBlockView:b}); + b.getBlockType = function() { + if (!this.view) { + return null; + } + var a = Entry.skeleton[this._schema.skeleton].magnets(this.view); + return a.next || a.previous ? "basic" : a.boolean || a.string ? "field" : a.output ? "output" : null; }; -})(Entry.BlockMenu.prototype); -Entry.BlockView = function(a, b) { + b.indexOfStatements = function(a) { + return this.statements.indexOf(a); + }; + b.pointer = function(a) { + a || (a = []); + return this.thread.pointer(a, this); + }; + b.targetPointer = function() { + var a = this.thread.pointer([], this); + 4 === a.length && 0 === a[3] && a.pop(); + return a; + }; + b.getBlockList = function(a) { + var b = []; + if (a && this._schema.isPrimitive) { + return b; + } + b.push(this); + for (var d = this.params, e = 0;e < d.length;e++) { + var f = d[e]; + f && f.constructor == Entry.Block && (b = b.concat(f.getBlockList(a))); + } + if (d = this.statements) { + for (e = 0;e < d.length;e++) { + b = b.concat(d[e].getBlockList(a)); + } + } + return b; + }; +})(Entry.Block.prototype); +Entry.ThreadView = function(b, a) { Entry.Model(this, !1); - this.block = a; - this._board = b; - this.set(a); - this.svgGroup = b.svgBlockGroup.group(); - this.svgGroup.block = this.block; - this._schema = Entry.block[a.type]; - this._skeleton = Entry.skeleton[this._schema.skeleton]; - this._contents = []; - this.isInBlockMenu = !(this.getBoard() instanceof Entry.Board); - this._skeleton.morph && this.block.observe(this, "_renderPath", this._skeleton.morph, !1); - this.prevObserver = null; - this._startRender(a); - this.block.observe(this, "_bindPrev", ["prev"]); - this.block.observe(this, "_createEmptyBG", ["next"]); - this.observe(this, "_updateBG", ["magneting"]); - b.code.observe(this, "_setBoard", ["board"], !1); - this.dragMode = Entry.DRAG_MODE_NONE; - Entry.Utils.disableContextmenu(this.svgGroup.node); + this.thread = b; + this.svgGroup = a.svgThreadGroup.elem("g"); + this.parent = a; }; -(function(a) { - a.schema = {id:0, type:Entry.STATIC.BLOCK_RENDER_MODEL, x:0, y:0, offsetX:0, offsetY:0, width:0, height:0, contentWidth:0, contentHeight:0, magneting:!1, animating:!1}; - a._startRender = function(b) { - this.svgGroup.attr({class:"block"}); - b = this._skeleton.path(this); - this._darkenPath = this.svgGroup.path(b); - this._darkenPath.attr({transform:"t0 1", fill:Entry.Utils.colorDarken(this._schema.color, .7)}); - this._path = this.svgGroup.path(b); - this._path.attr({strokeWidth:"2", fill:this._schema.color}); - this._moveTo(this.x, this.y, !1); - this._startContentRender(); - this._addControl(); +(function(b) { + b.schema = {height:0, zIndex:0}; + b.destroy = function() { + this.svgGroup.remove(); }; - a._startContentRender = function() { - this.contentSvgGroup && this.contentSvgGroup.remove(); - this.contentSvgGroup = this.svgGroup.group(); - var b = this._skeleton.contentPos(); - this.contentSvgGroup.transform("t" + b.x + " " + b.y); - for (var b = this._schema.contents, a = 0;a < b.length;a++) { - var d = b[a]; - "string" === typeof d ? this._contents.push(new Entry.FieldText({text:d}, this)) : this._contents.push(new Entry["Field" + d.type](d, this)); - } - this.alignContent(!1); + b.setParent = function(a) { + this.parent = a; }; - a.alignContent = function(b) { - !0 !== b && (b = !1); - for (var a = 0, d = 0, e = 0;e < this._contents.length;e++) { - d = this._contents[e]; - d.align(a, 0, b); - e !== this._contents.length - 1 && (a += 5); - var f = d.box, d = Math.max(f.y + f.height), a = a + f.width; - } - this.set({contentWidth:a, contentHeight:d}); - this._render(); + b.getParent = function() { + return this.parent; }; - a._bindPrev = function() { - this.prevObserver && this.prevObserver.destroy(); - this.block.prev ? (this._toLocalCoordinate(this.block.prev.view.svgGroup), this.prevObserver = this.block.prev.view.observe(this, "_align", ["height"])) : (this._toGlobalCoordinate(), delete this.prevObserver); + b.renderText = function() { + for (var a = this.thread.getBlocks(), b = 0;b < a.length;b++) { + a[b].view.renderText(); + } }; - a._render = function() { - this._renderPath(); - this.set(this._skeleton.box(this)); + b.renderBlock = function() { + for (var a = this.thread.getBlocks(), b = 0;b < a.length;b++) { + a[b].view.renderBlock(); + } }; - a._renderPath = function() { - var b = this._skeleton.path(this); - this._darkenPath.attr({d:b}); - this._path.attr({d:b}); - this.set({animating:!1}); + b.requestAbsoluteCoordinate = function(a) { + var b = this.thread.getBlocks(), d = b.shift(), e = {x:0, y:0}; + for (this.parent instanceof Entry.Board || this.parent instanceof Entry.BlockMenu || (e = this.parent.requestAbsoluteCoordinate());d && d.view !== a && d.view;) { + d = d.view, e.x += d.x + d.magnet.next.x, e.y += d.y + d.magnet.next.y, d = b.shift(); + } + return e; }; - a._align = function(b) { - if (null !== this.block.prev) { - var a = this.block.prev.view; - !0 === b && this.set({animating:!0}); - this.set({x:0, y:a.height + 1}); - this._setPosition(!0 === b || this.animating); + b.requestPartHeight = function(a, b) { + for (var d = this.thread.getBlocks(), e = d.pop(), f = a ? a.magnet.next ? a.magnet.next.y : a.height : 0;e && e.view !== a && e.view;) { + e = e.view, f = e.magnet.next ? f + e.magnet.next.y : f + e.height, e.dragMode === Entry.DRAG_MODE_DRAG && (f = 0), e = d.pop(); } + return f; }; - a._setPosition = function(b) { - b = void 0 === b ? !0 : b; - var a = "t" + this.x + " " + this.y; - this.svgGroup.stop(); - b && 0 !== Entry.ANIMATION_DURATION ? this.svgGroup.animate({transform:a}, Entry.ANIMATION_DURATION, mina.easeinout) : $(this.svgGroup.node).attr({transform:"translate(" + this.x + " " + this.y + ")"}); + b.dominate = function() { + this.parent.dominate(this.thread); }; - a._toLocalCoordinate = function(b) { - var a = b.transform().globalMatrix, d = this.svgGroup.transform().globalMatrix; - this._moveTo(d.e - a.e, d.f - a.f, !1); - b.append(this.svgGroup); + b.isGlobal = function() { + return this.parent instanceof Entry.Board; + }; + b.reDraw = function() { + for (var a = this.thread._data, b = a.length - 1;0 <= b;b--) { + a[b].view.reDraw(); + } }; - a._toGlobalCoordinate = function() { - var b = this.svgGroup.transform().globalMatrix; - this._moveTo(b.e, b.f, !1); - this._board.svgBlockGroup.append(this.svgGroup); + b.setZIndex = function(a) { + this.set({zIndex:a}); }; - a._moveTo = function(b, a, d) { - this.set({x:b, y:a}); - this._setPosition(d); +})(Entry.ThreadView.prototype); +Entry.FieldTrashcan = function(b) { + b && this.setBoard(b); + this.dragBlockObserver = this.dragBlock = null; + this.isOver = !1; + Entry.windowResized && Entry.windowResized.attach(this, this.setPosition); +}; +(function(b) { + b._generateView = function() { + this.svgGroup = this.board.svg.elem("g"); + this.renderStart(); + this._addControl(); }; - a._moveBy = function(b, a, d) { - return this._moveTo(this.x + b, this.y + a, d); + b.renderStart = function() { + var a = Entry.mediaFilePath + "delete_"; + this.trashcanTop = this.svgGroup.elem("image", {href:a + "cover.png", width:60, height:20}); + this.svgGroup.elem("image", {href:a + "body.png", y:20, width:60, height:60}); }; - a._addControl = function() { - var b = this; - this.svgGroup.mousedown(function() { - b.onMouseDown.apply(b, arguments); + b._addControl = function() { + $(this.svgGroup).bind("mousedown", function(a) { + Entry.Utils.isRightButton(a) && (a.stopPropagation(), $("#entryWorkspaceBoard").css("background", "white")); }); }; - a.onMouseDown = function(b) { - function a(b) { - var c = k.mouseDownCoordinate; - if ((k.dragMode == Entry.DRAG_MODE_DRAG || b.pageX !== c.x || b.pageY !== c.y) && k.block.isMovable()) { - k.block.prev && (k.block.prev.setNext(null), k.block.setPrev(null), k.block.thread.changeEvent.notify()); - this.animating && this.set({animating:!1}); - if (0 === k.dragInstance.height) { - for (var c = k.block, d = -1;c;) { - d += c.view.height + 1, c = c.next; - } - k.dragInstance.set({height:d}); - } - b.originalEvent.touches && (b = b.originalEvent.touches[0]); - c = k.dragInstance; - k._moveBy(b.pageX - c.offsetX, b.pageY - c.offsetY, !1); - c.set({offsetX:b.pageX, offsetY:b.pageY}); - k.dragMode = Entry.DRAG_MODE_DRAG; - (b = k._getCloseBlock()) ? (l = b.view.getBoard(), l.setMagnetedBlock(b.view)) : l.setMagnetedBlock(null); - } - } - function d(b) { - $(document).unbind(".block"); - delete this.mouseDownCoordinate; - k.terminateDrag(); - l && l.set({dragBlock:null}); - delete k.dragInstance; - } - b.stopPropagation(); - b.preventDefault(); - Entry.documentMousedown && Entry.documentMousedown.notify(); - this.getBoard().setSelectedBlock(this); - this.dominate(); - if (0 === b.button || b instanceof Touch) { - this.mouseDownCoordinate = {x:b.pageX, y:b.pageY}; - var e = $(document); - e.bind("mousemove.block", a); - e.bind("mouseup.block", d); - e.bind("touchmove.block", a); - e.bind("touchend.block", d); - this.getBoard().set({dragBlock:this}); - this.dragInstance = new Entry.DragInstance({startX:b.pageX, startY:b.pageY, offsetX:b.pageX, offsetY:b.pageY, prev:this.block.prev, height:0, mode:!0}); - this.addDragging(); - this.dragMode = Entry.DRAG_MODE_MOUSEDOWN; - } else { - if (Entry.Utils.isRightButton(b)) { - var f = this, g = f.block; - if (this.isInBlockMenu || g.isReadOnly()) { - return; - } - var e = [], h = {text:"\ube14\ub85d \uc0ad\uc81c", enable:g.isDeletable(), callback:function() { - f.block.doDestroyAlone(!0); - }}; - e.push({text:"\ube14\ub85d \ubcf5\uc0ac & \ubd99\uc5ec\ub123\uae30", callback:function() { - for (var b = g.getThread(), a = b.getBlocks().indexOf(g), c = b.toJSON(!0, a), a = [], d = new Entry.Thread([], g.getCode()), e = 0;e < c.length;e++) { - a.push(new Entry.Block(c[e], d)); - } - c = f.svgGroup.transform().globalMatrix; - a[0].set({x:c.e + 20, y:c.f + 20}); - a[0].doAdd(); - b.getCode().createThread(a); - }}); - e.push(h); - Entry.ContextMenu.show(e); + b.updateDragBlock = function() { + var a = this.board.dragBlock, b = this.dragBlockObserver; + b && (b.destroy(), this.dragBlockObserver = null); + a ? this.dragBlockObserver = a.observe(this, "checkBlock", ["x", "y"]) : (this.isOver && this.dragBlock && !this.dragBlock.block.getPrevBlock() && (this.dragBlock.block.doDestroyBelow(!0), createjs.Sound.play("entryDelete")), this.tAnimation(!1)); + this.dragBlock = a; + }; + b.checkBlock = function() { + var a = this.dragBlock; + if (a && a.block.isDeletable()) { + var b = this.board.offset(), d = this.getPosition(), e = d.x + b.left, b = d.y + b.top, f, g; + if (a = a.dragInstance) { + f = a.offsetX, g = a.offsetY; } + this.tAnimation(f >= e && g >= b); } - var k = this, l = this.getBoard(); - b.stopPropagation(); }; - a.terminateDrag = function() { - var b = this.getBoard(), a = this.dragMode, d = this.block; - this.removeDragging(); - if (b instanceof Entry.BlockMenu) { - b.terminateDrag(); - } else { - if (a !== Entry.DRAG_MODE_MOUSEDOWN) { - this.dragInstance && this.dragInstance.isNew && d.doAdd(); - var e = this.dragInstance && this.dragInstance.prev, f = this._getCloseBlock(); - e || f ? f ? (this.set({animating:!0}), f.next && f.next.view.set({animating:!0}), d.doInsert(f), createjs.Sound.play("entryMagneting")) : d.doSeparate() : a == Entry.DRAG_MODE_DRAG && d.doMove(); - b.setMagnetedBlock(null); - } - } - this.dragMode = Entry.DRAG_MODE_NONE; - this.destroyShadow(); + b.align = function() { + var a = this.getPosition(); + this.svgGroup.attr({transform:"translate(" + a.x + "," + a.y + ")"}); }; - a._getCloseBlock = function() { - var b = this.getBoard(), a = b instanceof Entry.BlockMenu, d = this.x, e = this.y; - a && (d -= b._svgWidth, b = b.workspace.getBoard()); - var f = b.relativeOffset, d = Snap.getElementByPoint(d + f.left, e + f.top); - if (null !== d) { - for (e = d.block;!e && d.parent() && "svg" !== d.type && "BODY" !== d.type;) { - d = d.parent(), e = d.block; - } - return void 0 === e || e === this.block ? null : a ? e : e.view.getBoard() == b ? e : null; + b.setPosition = function() { + if (this.board) { + var a = this.board.svgDom; + this._x = a.width() - 110; + this._y = a.height() - 110; + this.align(); } }; - a._inheritAnimate = function() { - var b = this.block.prev.view; - b && this.set({animating:b.animating}); + b.getPosition = function() { + return {x:this._x, y:this._y}; + }; + b.tAnimation = function(a) { + if (a !== this.isOver) { + a = void 0 === a ? !0 : a; + var b, d = this.trashcanTop; + b = a ? {translateX:15, translateY:-25, rotateZ:30} : {translateX:0, translateY:0, rotateZ:0}; + $(d).velocity(b, {duration:50}); + this.isOver = a; + } + }; + b.setBoard = function(a) { + this._dragBlockObserver && this._dragBlockObserver.destroy(); + this.board = a; + this.svgGroup || this._generateView(); + var b = a.svg, d = b.firstChild; + d ? b.insertBefore(this.svgGroup, d) : b.appendChild(this.svgGroup); + this._dragBlockObserver = a.observe(this, "updateDragBlock", ["dragBlock"]); + this.svgGroup.attr({filter:"url(#entryTrashcanFilter_" + a.suffix + ")"}); + this.setPosition(); }; - a.dominate = function() { - for (var b = this.getBoard().svgBlockGroup, a = this.svgGroup;a.parent() !== b;) { - a = a.parent(); +})(Entry.FieldTrashcan.prototype); +Entry.Vim = function(b) { + b = "string" === typeof b ? $("#" + b) : $(b); + if ("DIV" !== b.prop("tagName")) { + return console.error("Dom is not div element"); + } + this.createDom(b); + this._parser = new Entry.Parser("maze", "js", this.codeMirror); + this._blockParser = new Entry.Parser("maze", "block"); + Entry.Model(this, !1); + window.eventset = []; +}; +(function(b) { + b.createDom = function(a) { + function b(a) { + var c = e.getCodeToText(a.block); + e.codeMirror.display.dragFunctions.leave(a); + var d = Entry.Utils.createMouseEvent("mousedown", a); + e.codeMirror.display.scroller.dispatchEvent(d); + var c = c.split("\n"), k = c.length - 1, l = 0; + c.forEach(function(a, b) { + e.codeMirror.replaceSelection(a); + l = e.doc.getCursor().line; + e.codeMirror.indentLine(l); + 0 !== b && k === b || e.codeMirror.replaceSelection("\n"); + }); + a = Entry.Utils.createMouseEvent("mouseup", a); + e.codeMirror.display.scroller.dispatchEvent(a); + } + function d(a) { + e.codeMirror.display.dragFunctions.over(a); + } + var e; + this.view = Entry.Dom("div", {parent:a, class:"entryVimBoard"}); + this.codeMirror = CodeMirror(this.view[0], {lineNumbers:!0, value:"", mode:{name:"javascript", globalVars:!0}, theme:"default", indentUnit:4, styleActiveLine:!0, extraKeys:{"Ctrl-Space":"javascriptComplete", Tab:function(a) { + var b = Array(a.getOption("indentUnit") + 1).join(" "); + a.replaceSelection(b); + }}, lint:!0, viewportMargin:10}); + this.doc = this.codeMirror.getDoc(); + e = this; + a = this.view[0]; + a.removeEventListener("dragEnd", b); + a.removeEventListener("dragOver", d); + a.addEventListener("dragEnd", b); + a.addEventListener("dragOver", d); + }; + b.hide = function() { + this.view.addClass("entryRemove"); + }; + b.show = function() { + this.view.removeClass("entryRemove"); + }; + b.textToCode = function() { + var a = this.codeMirror.getValue(), a = this._parser.parse(a); + if (0 === a.length) { + throw "\ube14\ub85d \ud30c\uc2f1 \uc624\ub958"; } - b.append(a); + return a; }; - a.getBoard = function() { - return this._board; + b.codeToText = function(a) { + a = this._blockParser.parse(a); + this.codeMirror.setValue(a); }; - a._setBoard = function() { - this._board = this._board.code.board; + b.getCodeToText = function(a) { + return this._blockParser.parse(a); + }; +})(Entry.Vim.prototype); +Entry.Workspace = function(b) { + Entry.Model(this, !1); + this.observe(this, "_handleChangeBoard", ["selectedBoard"], !1); + this.trashcan = new Entry.FieldTrashcan; + var a = b.blockMenu; + a && (this.blockMenu = new Entry.BlockMenu(a.dom, a.align, a.categoryData, a.scroll), this.blockMenu.workspace = this, this.blockMenu.observe(this, "_setSelectedBlockView", ["selectedBlockView"], !1)); + if (a = b.board) { + a.workspace = this, this.board = new Entry.Board(a), this.board.observe(this, "_setSelectedBlockView", ["selectedBlockView"], !1), this.set({selectedBoard:this.board}); + } + if (a = b.vimBoard) { + this.vimBoard = new Entry.Vim(a.dom), this.vimBoard.workspace = this; + } + this.board && this.vimBoard && this.vimBoard.hide(); + Entry.GlobalSvg.createDom(); + this.mode = Entry.Workspace.MODE_BOARD; + Entry.keyPressed && Entry.keyPressed.attach(this, this._keyboardControl); + this.changeEvent = new Entry.Event(this); + Entry.commander.setCurrentEditor("board", this.board); +}; +Entry.Workspace.MODE_BOARD = 0; +Entry.Workspace.MODE_VIMBOARD = 1; +Entry.Workspace.MODE_OVERLAYBOARD = 2; +(function(b) { + b.schema = {selectedBlockView:null, selectedBoard:null}; + b.getBoard = function() { + return this.board; }; - a.destroy = function(b) { - var a = this.svgGroup; - b ? a.animate({opacity:0}, 100, null, function() { - this.remove(); - }) : a.remove(); + b.getSelectedBoard = function() { + return this.selectedBoard; }; - a.getShadow = function() { - this._shadow || (this._shadow = this.svgGroup.clone(), this._shadow.attr({opacity:.5})); - return this._shadow; + b.getBlockMenu = function() { + return this.blockMenu; }; - a.destroyShadow = function() { - delete this._shadow; + b.getVimBoard = function() { + return this.vimBoard; }; - a._updateBG = function() { - if (this._board.dragBlock && this._board.dragBlock.dragInstance) { - var b = this._board.dragBlock.dragInstance.height, a = this, d = a.svgGroup; - if (a.magneting) { - var e = this._board.dragBlock.getShadow(); - $(e.node).attr({transform:"translate(0 " + (this.height + 1) + ")"}); - this.svgGroup.prepend(e); - this._clonedShadow = e; - a.background && (a.background.remove(), a.nextBackground.remove(), delete a.background, delete a.nextBackground); - b = a.height + b; - e = d.rect(0 - a.width / 2, 1.5 * a.height + 1, a.width, Math.max(0, b - 1.5 * a.height)); - e.block = a.block.next; - a.nextBackground = e; - e.attr({fill:"transparent"}); - d.prepend(e); - e = d.rect(0 - a.width / 2, 0, a.width, b); - a.background = e; - e.attr({fill:"transparent"}); - d.prepend(e); - a.originalHeight = a.height; - a.set({height:b}); - } else { - if (this._clonedShadow && (this._clonedShadow.remove(), delete this._clonedShadow), b = a.originalHeight) { - setTimeout(function() { - a.background && (a.background.remove(), a.nextBackground.remove(), delete a.background, delete a.nextBackground); - }, Entry.ANIMATION_DURATION), a.set({height:b}), delete a.originalHeight; + b.getMode = function() { + return this.mode; + }; + b.setMode = function(a, b) { + a = Number(a); + var d = this.mode; + this.mode = a; + switch(a) { + case d: + return; + case Entry.Workspace.MODE_VIMBOARD: + this.board && this.board.hide(); + this.overlayBoard && this.overlayBoard.hide(); + this.set({selectedBoard:this.vimBoard}); + this.vimBoard.show(); + this.vimBoard.codeToText(this.board.code); + this.blockMenu.renderText(); + this.board.clear(); + break; + case Entry.Workspace.MODE_BOARD: + try { + this.board.show(), this.set({selectedBoard:this.board}), this.textToCode(d), this.vimBoard && this.vimBoard.hide(), this.overlayBoard && this.overlayBoard.hide(), this.blockMenu.renderBlock(); + } catch (e) { + throw this.board && this.board.hide(), this.set({selectedBoard:this.vimBoard}), Entry.dispatchEvent("setProgrammingMode", Entry.Workspace.MODE_VIMBOARD), e; } - } - a.block.thread.changeEvent.notify(); + Entry.commander.setCurrentEditor("board", this.board); + break; + case Entry.Workspace.MODE_OVERLAYBOARD: + this.overlayBoard || this.initOverlayBoard(), this.overlayBoard.show(), this.set({selectedBoard:this.overlayBoard}), Entry.commander.setCurrentEditor("board", this.overlayBoard); } + this.changeEvent.notify(b); }; - a._createEmptyBG = function() { - if (this.block.next) { - this.emptyBackground && (this.emptyBackground.remove(), delete this.emptyBackground); - } else { - var b = this.svgGroup.rect(0 + this.offsetX, this.height, this.width, 20); - this.emptyBackground = b; - b.attr({fill:"transparent"}); - this.svgGroup.prepend(b); + b.changeBoardCode = function(a) { + this.board.changeCode(a); + }; + b.changeOverlayBoardCode = function(a) { + this.overlayBoard && this.overlayBoard.changeCode(a); + }; + b.changeBlockMenuCode = function(a) { + this.blockMenu.changeCode(a); + }; + b.textToCode = function(a) { + if (a == Entry.Workspace.MODE_VIMBOARD) { + a = this.vimBoard.textToCode(); + var b = this.board, d = b.code; + d.load(a); + d.createView(b); + b.reDraw(); + this.board.alignThreads(); } }; - a.addDragging = function() { - this.svgGroup.addClass("dragging"); + b.codeToText = function(a) { + return this.vimBoard.codeToText(a); }; - a.removeDragging = function() { - this.svgGroup.removeClass("dragging"); + b.getCodeToText = function(a) { + return this.vimBoard.getCodeToText(a); }; - a.addSelected = function() { - this.svgGroup.addClass("selected"); + b._setSelectedBlockView = function() { + this.set({selectedBlockView:this.board.selectedBlockView || this.blockMenu.selectedBlockView || (this.overlayBoard ? this.overlayBoard.selectedBlockView : null)}); }; - a.removeSelected = function() { - this.svgGroup.removeClass("selected"); + b.initOverlayBoard = function() { + this.overlayBoard = new Entry.Board({dom:this.board.view, workspace:this, isOverlay:!0}); + this.overlayBoard.changeCode(new Entry.Code([])); + this.overlayBoard.workspace = this; + this.overlayBoard.observe(this, "_setSelectedBlockView", ["selectedBlockView"], !1); }; - a.getSkeleton = function() { - return this._skeleton; + b._keyboardControl = function(a) { + var b = a.keyCode || a.which, d = a.ctrlKey; + if (!Entry.Utils.isInInput(a)) { + var e = this.selectedBlockView; + e && !e.isInBlockMenu && e.block.isDeletable() && (8 == b || 46 == b ? (Entry.do("destroyBlock", e.block), a.preventDefault()) : d && (67 == b ? e.block.copyToClipboard() : 88 == b && (a = e.block, a.copyToClipboard(), a.destroy(!0, !0), e.getBoard().setSelectedBlock(null)))); + d && 86 == b && (b = this.selectedBoard) && b instanceof Entry.Board && Entry.clipboard && Entry.do("addThread", Entry.clipboard).value.getFirstBlock().copyToClipboard(); + } }; -})(Entry.BlockView.prototype); -Entry.Code = function(a) { - Entry.Model(this, !1); - this._data = new Entry.Collection; - this._eventMap = {}; - this.executors = []; - this.executeEndEvent = new Entry.Event(this); - this.changeEvent = new Entry.Event(this); - this.load(a); + b._handleChangeBoard = function() { + var a = this.selectedBoard; + a && a.constructor === Entry.Board && this.trashcan.setBoard(a); + }; +})(Entry.Workspace.prototype); +Entry.Playground = function() { + this.enableArduino = this.isTextBGMode_ = !1; + this.viewMode_ = "default"; + Entry.addEventListener("textEdited", this.injectText); + Entry.addEventListener("hwChanged", this.updateHW); +}; +Entry.Playground.prototype.generateView = function(b, a) { + this.view_ = b; + this.view_.addClass("entryPlayground"); + if (a && "workspace" != a) { + "phone" == a && (this.view_.addClass("entryPlaygroundPhone"), c = Entry.createElement("div", "entryCategoryTab"), c.addClass("entryPlaygroundTabPhone"), Entry.view_.insertBefore(c, this.view_), this.generateTabView(c), this.tabView_ = c, c = Entry.createElement("div", "entryCurtain"), c.addClass("entryPlaygroundCurtainPhone"), c.addClass("entryRemove"), c.innerHTML = Lang.Workspace.cannot_edit_click_to_stop, c.bindOnClick(function() { + Entry.engine.toggleStop(); + }), this.view_.appendChild(c), this.curtainView_ = c, Entry.pictureEditable && (c = Entry.createElement("div", "entryPicture"), c.addClass("entryPlaygroundPicturePhone"), c.addClass("entryRemove"), this.view_.appendChild(c), this.generatePictureView(c), this.pictureView_ = c), c = Entry.createElement("div", "entryText"), c.addClass("entryRemove"), this.view_.appendChild(c), this.generateTextView(c), this.textView_ = c, Entry.soundEditable && (c = Entry.createElement("div", "entrySound"), c.addClass("entryPlaygroundSoundWorkspacePhone"), + c.addClass("entryRemove"), this.view_.appendChild(c), this.generateSoundView(c), this.soundView_ = c), c = Entry.createElement("div", "entryDefault"), this.view_.appendChild(c), this.generateDefaultView(c), this.defaultView_ = c, c = Entry.createElement("div", "entryCode"), c.addClass("entryPlaygroundCodePhone"), this.view_.appendChild(c), this.generateCodeView(c), this.codeView_ = this.codeView_ = c, Entry.addEventListener("run", function(a) { + Entry.playground.curtainView_.removeClass("entryRemove"); + }), Entry.addEventListener("stop", function(a) { + Entry.playground.curtainView_.addClass("entryRemove"); + })); + } else { + this.view_.addClass("entryPlaygroundWorkspace"); + var c = Entry.createElement("div", "entryCategoryTab"); + c.addClass("entryPlaygroundTabWorkspace"); + this.view_.appendChild(c); + this.generateTabView(c); + this.tabView_ = c; + c = Entry.createElement("div", "entryCurtain"); + c.addClass("entryPlaygroundCurtainWorkspace"); + c.addClass("entryRemove"); + var d = Lang.Workspace.cannot_edit_click_to_stop.split("."); + c.innerHTML = d[0] + ".
" + d[1]; + c.addEventListener("click", function() { + Entry.engine.toggleStop(); + }); + this.view_.appendChild(c); + this.curtainView_ = c; + Entry.pictureEditable && (c = Entry.createElement("div", "entryPicture"), c.addClass("entryPlaygroundPictureWorkspace"), c.addClass("entryRemove"), this.view_.appendChild(c), this.generatePictureView(c), this.pictureView_ = c); + c = Entry.createElement("div", "entryText"); + c.addClass("entryPlaygroundTextWorkspace"); + c.addClass("entryRemove"); + this.view_.appendChild(c); + this.generateTextView(c); + this.textView_ = c; + Entry.soundEditable && (c = Entry.createElement("div", "entrySound"), c.addClass("entryPlaygroundSoundWorkspace"), c.addClass("entryRemove"), this.view_.appendChild(c), this.generateSoundView(c), this.soundView_ = c); + c = Entry.createElement("div", "entryDefault"); + c.addClass("entryPlaygroundDefaultWorkspace"); + this.view_.appendChild(c); + this.generateDefaultView(c); + this.defaultView_ = c; + c = Entry.createElement("div", "entryCode"); + c.addClass("entryPlaygroundCodeWorkspace"); + c.addClass("entryRemove"); + this.view_.appendChild(c); + this.generateCodeView(c); + this.codeView_ = c; + d = Entry.createElement("div"); + d.addClass("entryPlaygroundResizeWorkspace", "entryRemove"); + this.resizeHandle_ = d; + this.view_.appendChild(d); + this.initializeResizeHandle(d); + this.codeView_ = c; + Entry.addEventListener("run", function(a) { + Entry.playground.curtainView_.removeClass("entryRemove"); + }); + Entry.addEventListener("stop", function(a) { + Entry.playground.curtainView_.addClass("entryRemove"); + }); + } +}; +Entry.Playground.prototype.generateDefaultView = function(b) { + return b; +}; +Entry.Playground.prototype.generateTabView = function(b) { + var a = this, c = Entry.createElement("ul"); + c.addClass("entryTabListWorkspace"); + this.tabList_ = c; + b.appendChild(c); + this.tabViewElements = {}; + b = Entry.createElement("li", "entryCodeTab"); + b.innerHTML = Lang.Workspace.tab_code; + b.addClass("entryTabListItemWorkspace"); + b.addClass("entryTabSelected"); + c.appendChild(b); + b.bindOnClick(function(b) { + a.changeViewMode("code"); + a.blockMenu.reDraw(); + }); + this.tabViewElements.code = b; + Entry.pictureEditable && (b = Entry.createElement("li", "entryPictureTab"), b.innerHTML = Lang.Workspace.tab_picture, b.addClass("entryTabListItemWorkspace"), c.appendChild(b), b.bindOnClick(function(a) { + Entry.playground.changeViewMode("picture"); + }), this.tabViewElements.picture = b, b = Entry.createElement("li", "entryTextboxTab"), b.innerHTML = Lang.Workspace.tab_text, b.addClass("entryTabListItemWorkspace"), c.appendChild(b), b.bindOnClick(function(a) { + Entry.playground.changeViewMode("text"); + }), this.tabViewElements.text = b, b.addClass("entryRemove")); + Entry.soundEditable && (b = Entry.createElement("li", "entrySoundTab"), b.innerHTML = Lang.Workspace.tab_sound, b.addClass("entryTabListItemWorkspace"), c.appendChild(b), b.bindOnClick(function(a) { + Entry.playground.changeViewMode("sound"); + }), this.tabViewElements.sound = b); + Entry.hasVariableManager && (b = Entry.createElement("li", "entryVariableTab"), b.innerHTML = Lang.Workspace.tab_attribute, b.addClass("entryTabListItemWorkspace"), b.addClass("entryVariableTabWorkspace"), c.appendChild(b), b.bindOnClick(function(a) { + Entry.playground.toggleOnVariableView(); + Entry.playground.changeViewMode("variable"); + }), this.tabViewElements.variable = b); +}; +Entry.Playground.prototype.generateCodeView = function(b) { + var a = this.createVariableView(); + b.appendChild(a); + this.variableView_ = a; + b = Entry.Dom(b); + a = Entry.Dom("div", {parent:b, id:"entryWorkspaceBoard", class:"entryWorkspaceBoard"}); + b = Entry.Dom("div", {parent:b, id:"entryWorkspaceBlockMenu", class:"entryWorkspaceBlockMenu"}); + this.mainWorkspace = new Entry.Workspace({blockMenu:{dom:b, align:"LEFT", categoryData:EntryStatic.getAllBlocks(), scroll:!0}, board:{dom:a}}); + this.blockMenu = this.mainWorkspace.blockMenu; + this.board = this.mainWorkspace.board; + Entry.hw && this.updateHW(); +}; +Entry.Playground.prototype.generatePictureView = function(b) { + if ("workspace" == Entry.type) { + var a = Entry.createElement("div", "entryAddPicture"); + a.addClass("entryPlaygroundAddPicture"); + a.bindOnClick(function(a) { + Entry.dispatchEvent("openPictureManager"); + }); + var c = Entry.createElement("div", "entryAddPictureInner"); + c.addClass("entryPlaygroundAddPictureInner"); + c.innerHTML = Lang.Workspace.picture_add; + a.appendChild(c); + b.appendChild(a); + a = Entry.createElement("ul", "entryPictureList"); + a.addClass("entryPlaygroundPictureList"); + $ && $(a).sortable({start:function(a, b) { + b.item.data("start_pos", b.item.index()); + }, stop:function(a, b) { + var c = b.item.data("start_pos"), g = b.item.index(); + Entry.playground.movePicture(c, g); + }, axis:"y"}); + b.appendChild(a); + this.pictureListView_ = a; + a = Entry.createElement("div", "entryPainter"); + a.addClass("entryPlaygroundPainter"); + b.appendChild(a); + this.painter = new Entry.Painter; + this.painter.initialize(a); + } else { + "phone" == Entry.type && (a = Entry.createElement("div", "entryAddPicture"), a.addClass("entryPlaygroundAddPicturePhone"), a.bindOnClick(function(a) { + Entry.dispatchEvent("openPictureManager"); + }), c = Entry.createElement("div", "entryAddPictureInner"), c.addClass("entryPlaygroundAddPictureInnerPhone"), c.innerHTML = Lang.Workspace.picture_add, a.appendChild(c), b.appendChild(a), a = Entry.createElement("ul", "entryPictureList"), a.addClass("entryPlaygroundPictureListPhone"), $ && $(a).sortable({start:function(a, b) { + b.item.data("start_pos", b.item.index()); + }, stop:function(a, b) { + var c = b.item.data("start_pos"), g = b.item.index(); + Entry.playground.movePicture(c, g); + }, axis:"y"}), b.appendChild(a), this.pictureListView_ = a); + } }; -(function(a) { - a.schema = {view:null, board:null}; - a.load = function(b) { - if (!(b instanceof Array)) { - return console.error("code must be array"); - } - for (var a = 0;a < b.length;a++) { - this._data.push(new Entry.Thread(b[a], this)); - } - }; - a.createView = function(b) { - null === this.view ? this.set({view:new Entry.CodeView(this, b), board:b}) : (this.set({board:b}), b.bindCodeView(this.view)); - }; - a.registerEvent = function(b, a) { - this._eventMap[a] || (this._eventMap[a] = []); - this._eventMap[a].push(b); - }; - a.raiseEvent = function(b) { - b = this._eventMap[b]; - if (void 0 !== b) { - for (var a = 0;a < b.length;a++) { - this.executors.push(new Entry.Executor(b[a])); - } - } - }; - a.getEventMap = function(b) { - return this._eventMap; - }; - a.map = function(b) { - this._data.map(b); - }; - a.tick = function() { - for (var b = this.executors, a = 0;a < b.length;a++) { - var d = b[a]; - d.execute(); - null === d.scope.block && (b.splice(a, 1), a--, 0 === b.length && this.executeEndEvent.notify()); - } - }; - a.clearExecutors = function() { - this.executors = []; - }; - a.createThread = function(b) { - if (!(b instanceof Array)) { - return console.error("blocks must be array"); - } - this._data.push(new Entry.Thread(b, this)); - }; - a.cloneThread = function(b) { - b = b.clone(this); - this._data.push(b); - return b; - }; - a.destroyThread = function(b, a) { - var d = this._data, e = d.indexOf(b); - 0 > e || (d.splice(e, 1), (d = b.getFirstBlock()) && d.destroy(a)); - }; - a.doDestroyThread = function(b, a) { - var d = this._data, e = d.indexOf(b); - 0 > e || (d.splice(e, 1), (d = b.getFirstBlock()) && d.doDestroy(a)); +Entry.Playground.prototype.generateTextView = function(b) { + var a = Entry.createElement("div"); + b.appendChild(a); + b = Entry.createElement("div"); + b.addClass("textProperties"); + a.appendChild(b); + var c = Entry.createElement("div"); + c.addClass("entryTextFontSelect"); + b.appendChild(c); + var d = Entry.createElement("select", "entryPainterAttrFontName"); + d.addClass("entryPlaygroundPainterAttrFontName", "entryTextFontSelecter"); + d.size = "1"; + d.onchange = function(a) { + Entry.playground.object.entity.setFontType(a.target.value); }; - a.getThreads = function() { - return this._data; + for (var e = 0;e < Entry.fonts.length;e++) { + var f = Entry.fonts[e], g = Entry.createElement("option"); + g.value = f.family; + g.innerHTML = f.name; + d.appendChild(g); + } + this.fontName_ = d; + c.appendChild(d); + e = Entry.createElement("ul"); + e.addClass("entryPlayground_text_buttons"); + b.appendChild(e); + c = Entry.createElement("li"); + c.addClass("entryPlaygroundTextAlignLeft"); + c.bindOnClick(function(a) { + Entry.playground.setFontAlign(Entry.TEXT_ALIGN_LEFT); + }); + e.appendChild(c); + this.alignLeftBtn = c; + c = Entry.createElement("li"); + c.addClass("entryPlaygroundTextAlignCenter"); + c.bindOnClick(function(a) { + Entry.playground.setFontAlign(Entry.TEXT_ALIGN_CENTER); + }); + e.appendChild(c); + this.alignCenterBtn = c; + c = Entry.createElement("li"); + c.addClass("entryPlaygroundTextAlignRight"); + c.bindOnClick(function(a) { + Entry.playground.setFontAlign(Entry.TEXT_ALIGN_RIGHT); + }); + e.appendChild(c); + this.alignRightBtn = c; + c = Entry.createElement("li"); + e.appendChild(c); + d = Entry.createElement("a"); + c.appendChild(d); + d.bindOnClick(function() { + Entry.playground.object.entity.toggleFontBold() ? h.src = Entry.mediaFilePath + "text_button_bold_true.png" : h.src = Entry.mediaFilePath + "text_button_bold_false.png"; + }); + var h = Entry.createElement("img", "entryPlaygroundText_boldImage"); + d.appendChild(h); + h.src = Entry.mediaFilePath + "text_button_bold_false.png"; + c = Entry.createElement("li"); + e.appendChild(c); + d = Entry.createElement("a"); + c.appendChild(d); + d.bindOnClick(function() { + var a = !Entry.playground.object.entity.getUnderLine() || !1; + k.src = Entry.mediaFilePath + "text_button_underline_" + a + ".png"; + Entry.playground.object.entity.setUnderLine(a); + }); + var k = Entry.createElement("img", "entryPlaygroundText_underlineImage"); + d.appendChild(k); + k.src = Entry.mediaFilePath + "text_button_underline_false.png"; + c = Entry.createElement("li"); + e.appendChild(c); + d = Entry.createElement("a"); + c.appendChild(d); + d.bindOnClick(function() { + Entry.playground.object.entity.toggleFontItalic() ? l.src = Entry.mediaFilePath + "text_button_italic_true.png" : l.src = Entry.mediaFilePath + "/text_button_italic_false.png"; + }); + var l = Entry.createElement("img", "entryPlaygroundText_italicImage"); + d.appendChild(l); + l.src = Entry.mediaFilePath + "text_button_italic_false.png"; + c = Entry.createElement("li"); + e.appendChild(c); + d = Entry.createElement("a"); + c.appendChild(d); + d.bindOnClick(function() { + var a = !Entry.playground.object.entity.getStrike() || !1; + Entry.playground.object.entity.setStrike(a); + n.src = Entry.mediaFilePath + "text_button_strike_" + a + ".png"; + }); + var n = Entry.createElement("img", "entryPlaygroundText_strikeImage"); + d.appendChild(n); + n.src = Entry.mediaFilePath + "text_button_strike_false.png"; + d = Entry.createElement("li"); + e.appendChild(d); + c = Entry.createElement("a"); + d.appendChild(c); + c.bindOnClick(function() { + Entry.playground.toggleColourChooser("foreground"); + }); + d = Entry.createElement("img"); + c.appendChild(d); + d.src = Entry.mediaFilePath + "text_button_color_false.png"; + c = Entry.createElement("li"); + e.appendChild(c); + e = Entry.createElement("a"); + c.appendChild(e); + e.bindOnClick(function() { + Entry.playground.toggleColourChooser("background"); + }); + c = Entry.createElement("img"); + e.appendChild(c); + c.src = Entry.mediaFilePath + "text_button_background_false.png"; + e = Entry.createElement("div"); + e.addClass("entryPlayground_fgColorDiv"); + c = Entry.createElement("div"); + c.addClass("entryPlayground_bgColorDiv"); + b.appendChild(e); + b.appendChild(c); + d = Entry.createElement("div"); + d.addClass("entryPlaygroundTextColoursWrapper"); + this.coloursWrapper = d; + a.appendChild(d); + b = Entry.getColourCodes(); + for (e = 0;e < b.length;e++) { + c = Entry.createElement("div"), c.addClass("modal_colour"), c.setAttribute("colour", b[e]), c.style.backgroundColor = b[e], 0 === e && c.addClass("modalColourTrans"), c.bindOnClick(function(a) { + Entry.playground.setTextColour(a.target.getAttribute("colour")); + }), d.appendChild(c); + } + d.style.display = "none"; + d = Entry.createElement("div"); + d.addClass("entryPlaygroundTextBackgroundsWrapper"); + this.backgroundsWrapper = d; + a.appendChild(d); + for (e = 0;e < b.length;e++) { + c = Entry.createElement("div"), c.addClass("modal_colour"), c.setAttribute("colour", b[e]), c.style.backgroundColor = b[e], 0 === e && c.addClass("modalColourTrans"), c.bindOnClick(function(a) { + Entry.playground.setBackgroundColour(a.target.getAttribute("colour")); + }), d.appendChild(c); + } + d.style.display = "none"; + b = Entry.createElement("input"); + b.addClass("entryPlayground_textBox"); + b.onkeyup = function() { + Entry.playground.object.setText(this.value); + Entry.playground.object.entity.setText(this.value); }; - a.toJSON = function() { - for (var b = this.getThreads(), a = [], d = 0, e = b.length;d < e;d++) { - a.push(b[d].toJSON()); - } - return a; + b.onblur = function() { + Entry.dispatchEvent("textEdited"); }; - a.countBlock = function() { - for (var b = this.getThreads(), a = 0, d = 0;d < b.length;d++) { - a += b[d].countBlock(); - } - return a; + this.textEditInput = b; + a.appendChild(b); + b = Entry.createElement("textarea"); + b.addClass("entryPlayground_textArea"); + b.style.display = "none"; + b.onkeyup = function() { + Entry.playground.object.setText(this.value); + Entry.playground.object.entity.setText(this.value); }; - a.moveBy = function(b, a) { - for (var d = this.getThreads(), e = 0, f = d.length;e < f;e++) { - var g = d[e].getFirstBlock(); - g && g.view._moveBy(b, a, !1); - } + b.onblur = function() { + Entry.dispatchEvent("textEdited"); }; - a.stringify = function() { - return JSON.stringify(this.toJSON()); + this.textEditArea = b; + a.appendChild(b); + b = Entry.createElement("div"); + b.addClass("entryPlaygroundFontSizeWrapper"); + a.appendChild(b); + this.fontSizeWrapper = b; + var m = Entry.createElement("div"); + m.addClass("entryPlaygroundFontSizeSlider"); + b.appendChild(m); + var q = Entry.createElement("div"); + q.addClass("entryPlaygroundFontSizeIndicator"); + m.appendChild(q); + this.fontSizeIndiciator = q; + var r = Entry.createElement("div"); + r.addClass("entryPlaygroundFontSizeKnob"); + m.appendChild(r); + this.fontSizeKnob = r; + e = Entry.createElement("div"); + e.addClass("entryPlaygroundFontSizeLabel"); + e.innerHTML = "\uae00\uc790 \ud06c\uae30"; + b.appendChild(e); + var u = !1, t = 0; + r.onmousedown = function(a) { + u = !0; + t = $(m).offset().left; }; -})(Entry.Code.prototype); -Entry.CodeView = function(a, b) { - Entry.Model(this, !1); - this.code = a; - this.set({board:b}); - this.svgThreadGroup = b.svgGroup.group(); - this.svgThreadGroup.attr({class:"svgThreadGroup"}); - this.svgThreadGroup.board = b; - this.svgBlockGroup = b.svgGroup.group(); - this.svgBlockGroup.attr({class:"svgBlockGroup"}); - this.svgBlockGroup.board = b; - b.bindCodeView(this); - this.code.map(function(a) { - a.createView(b); + document.addEventListener("mousemove", function(a) { + u && (a = a.pageX - t, a = Math.max(a, 5), a = Math.min(a, 88), r.style.left = a + "px", a /= .88, q.style.width = a + "%", Entry.playground.object.entity.setFontSize(a)); + }); + document.addEventListener("mouseup", function(a) { + u = !1; + }); + b = Entry.createElement("div"); + b.addClass("entryPlaygroundLinebreakWrapper"); + a.appendChild(b); + a = Entry.createElement("hr"); + a.addClass("entryPlaygroundLinebreakHorizontal"); + b.appendChild(a); + a = Entry.createElement("div"); + a.addClass("entryPlaygroundLinebreakButtons"); + b.appendChild(a); + e = Entry.createElement("img"); + e.bindOnClick(function() { + Entry.playground.toggleLineBreak(!1); + v.innerHTML = Lang.Menus.linebreak_off_desc_1; + x.innerHTML = Lang.Menus.linebreak_off_desc_2; + y.innerHTML = Lang.Menus.linebreak_off_desc_3; + }); + e.src = Entry.mediaFilePath + "text-linebreak-off-true.png"; + a.appendChild(e); + this.linebreakOffImage = e; + e = Entry.createElement("img"); + e.bindOnClick(function() { + Entry.playground.toggleLineBreak(!0); + v.innerHTML = Lang.Menus.linebreak_on_desc_1; + x.innerHTML = Lang.Menus.linebreak_on_desc_2; + y.innerHTML = Lang.Menus.linebreak_on_desc_3; }); - a.observe(this, "_setBoard", ["board"]); + e.src = Entry.mediaFilePath + "text-linebreak-on-false.png"; + a.appendChild(e); + this.linebreakOnImage = e; + a = Entry.createElement("div"); + a.addClass("entryPlaygroundLinebreakDescription"); + b.appendChild(a); + var v = Entry.createElement("p"); + v.innerHTML = Lang.Menus.linebreak_off_desc_1; + a.appendChild(v); + b = Entry.createElement("ul"); + a.appendChild(b); + var x = Entry.createElement("li"); + x.innerHTML = Lang.Menus.linebreak_off_desc_2; + b.appendChild(x); + var y = Entry.createElement("li"); + y.innerHTML = Lang.Menus.linebreak_off_desc_3; + b.appendChild(y); }; -(function(a) { - a.schema = {board:null, scrollX:0, scrollY:0}; - a._setBoard = function() { - this.set({board:this.code.board}); - }; -})(Entry.CodeView.prototype); -Entry.Executor = function(a) { - this.scope = {block:a, executor:this}; - this._callStack = []; +Entry.Playground.prototype.generateSoundView = function(b) { + if ("workspace" == Entry.type) { + var a = Entry.createElement("div", "entryAddSound"); + a.addClass("entryPlaygroundAddSound"); + a.bindOnClick(function(a) { + Entry.dispatchEvent("openSoundManager"); + }); + var c = Entry.createElement("div", "entryAddSoundInner"); + c.addClass("entryPlaygroundAddSoundInner"); + c.innerHTML = Lang.Workspace.sound_add; + a.appendChild(c); + b.appendChild(a); + a = Entry.createElement("ul", "entrySoundList"); + a.addClass("entryPlaygroundSoundList"); + $ && $(a).sortable({start:function(a, b) { + b.item.data("start_pos", b.item.index()); + }, stop:function(a, b) { + var c = b.item.data("start_pos"), g = b.item.index(); + Entry.playground.moveSound(c, g); + }, axis:"y"}); + b.appendChild(a); + this.soundListView_ = a; + } else { + "phone" == Entry.type && (a = Entry.createElement("div", "entryAddSound"), a.addClass("entryPlaygroundAddSoundPhone"), a.bindOnClick(function(a) { + Entry.dispatchEvent("openSoundManager"); + }), c = Entry.createElement("div", "entryAddSoundInner"), c.addClass("entryPlaygroundAddSoundInnerPhone"), c.innerHTML = Lang.Workspace.sound_add, a.appendChild(c), b.appendChild(a), a = Entry.createElement("ul", "entrySoundList"), a.addClass("entryPlaygroundSoundListPhone"), $ && $(a).sortable({start:function(a, b) { + b.item.data("start_pos", b.item.index()); + }, stop:function(a, b) { + var c = b.item.data("start_pos"), g = b.item.index(); + Entry.playground.moveSound(c, g); + }, axis:"y"}), b.appendChild(a), this.soundListView_ = a); + } }; -(function(a) { - a.execute = function() { - void 0 === this.scope.block._schema.func.call(this.scope) && (this.scope = {block:this.scope.block.next, executor:this}); - null === this.scope.block && this._callStack.length && (this.scope = this._callStack.pop()); - }; - a.stepInto = function(b) { - b instanceof Entry.Thread || console.error("Must step in to thread"); - this._callStack.push(this.scope); - b = b.getFirstBlock(); - b instanceof Entry.DummyBlock && (b = b.next); - this.scope = {block:b, executor:this}; - }; -})(Entry.Executor.prototype); -Entry.FieldDropdown = function(a, b) { - this._block = b.block; - this._blockView = b; - this.box = new Entry.BoxModel; - this.svgGroup = null; - this._contents = a; - this.key = a.key; - this.value = this._block.values[this.key]; - this.renderStart(b); +Entry.Playground.prototype.injectObject = function(b) { + if (!b) { + this.changeViewMode("code"), this.object = null; + } else { + if (b !== this.object) { + this.object && this.object.toggleInformation(!1); + this.object = b; + this.setMenu(b.objectType); + this.injectCode(); + "sprite" == b.objectType && Entry.pictureEditable ? (this.tabViewElements.text && this.tabViewElements.text.addClass("entryRemove"), this.tabViewElements.picture && this.tabViewElements.picture.removeClass("entryRemove")) : "textBox" == b.objectType && (this.tabViewElements.picture && this.tabViewElements.picture.addClass("entryRemove"), this.tabViewElements.text && this.tabViewElements.text.removeClass("entryRemove")); + var a = this.viewMode_; + "default" == a ? this.changeViewMode("code") : "picture" != a && "text" != a || "textBox" != b.objectType ? "text" != a && "picture" != a || "sprite" != b.objectType ? "sound" == a && this.changeViewMode("sound") : this.changeViewMode("picture") : this.changeViewMode("text"); + this.reloadPlayground(); + } + } }; -(function(a) { - a.renderStart = function(b) { - var a = this; - this.svgGroup = b.contentSvgGroup.group(); - this.svgGroup.attr({class:"entry-field-dropdown"}); - this.textElement = this.svgGroup.text(2, 3, this.getTextByValue(this.value)); - b = this.textElement.node.getComputedTextLength() + 18; - this._header = this.svgGroup.rect(0, -12, b, 23, 3).attr({fill:"#80cbf8"}); - this.svgGroup.append(this.textElement); - this._arrow = this.svgGroup.polygon(0, -2, 6, -2, 3, 2).attr({fill:"#127cbd", stroke:"#127cbd", transform:"t" + (b - 11) + " 0"}); - this.svgGroup.mouseup(function(b) { - a._block.view.dragMode == Entry.DRAG_MODE_MOUSEDOWN && a.renderOptions(); - }); - this.box.set({x:0, y:0, width:b, height:23}); - }; - a.resize = function() { - var b = this.textElement.node.getComputedTextLength() + 18; - this._header.attr({width:b}); - this._arrow.attr({transform:"t" + (b - 11) + " 0"}); - this.box.set({width:b}); - this._block.view.alignContent(); - }; - a.renderOptions = function() { - var b = this; - this.destroyOption(); - var a = this._block.view; - this.documentDownEvent = Entry.documentMousedown.attach(this, function() { - Entry.documentMousedown.detach(this.documentDownEvent); - b.optionGroup.remove(); - }); - this.optionGroup = a.getBoard().svgGroup.group(); - var a = a.svgGroup.transform().globalMatrix, d = [], e = 0, f = this._contents.options; - d.push(this.optionGroup.rect(0, 0, 0, 23 * f.length).attr({fill:"white"})); - for (var g = 0, h = f.length;g < h;g++) { - var k = f[g], l = k[0], k = k[1], q = this.optionGroup.group().attr({class:"rect", transform:"t0 " + 23 * g}); - d.push(q.rect(0, 0, 0, 23)); - this.value == k && q.text(5, 13, "\u2713").attr({"alignment-baseline":"central"}); - l = q.text(20, 13, l).attr({"alignment-baseline":"central"}); - e = Math.max(l.node.getComputedTextLength() + 50, e); - (function(a, c) { - a.mousedown(function() { - b.applyValue(c); - b.destroyOption(); - }); - })(q, k); +Entry.Playground.prototype.injectCode = function() { + var b = this.object.script; + this.mainWorkspace.changeBoardCode(b); + b.board.adjustThreadsPosition(); +}; +Entry.Playground.prototype.adjustScroll = function(b, a) { + var c = Blockly.mainWorkspace.scrollbar.vScroll; + Blockly.mainWorkspace.scrollbar.hScroll.svgGroup_.setAttribute("opacity", "1"); + c.svgGroup_.setAttribute("opacity", "1"); + if (Blockly.mainWorkspace.getMetrics()) { + Blockly.removeAllRanges(); + var c = Blockly.mainWorkspace.getMetrics(), d, e; + d = Math.min(b, -c.contentLeft); + e = Math.min(a, -c.contentTop); + d = Math.max(d, c.viewWidth - c.contentLeft - c.contentWidth); + e = Math.max(e, c.viewHeight - c.contentTop - c.contentHeight); + Blockly.mainWorkspace.scrollbar.set(-d - c.contentLeft, -e - c.contentTop); + } +}; +Entry.Playground.prototype.injectPicture = function() { + var b = this.pictureListView_; + if (b) { + for (;b.hasChildNodes();) { + b.removeChild(b.lastChild); } - var n = {width:e}; - d.forEach(function(b) { - b.attr(n); - }); - d = this.box; - this.optionGroup.attr({class:"entry-field-dropdown", transform:"t" + (a.e + this._blockView.offsetX + d.x + 29 + d.width / 2 - e / 2) + " " + (a.f + 35)}); - }; - a.align = function(b, a, d) { - var e = this.svgGroup, f = "t" + b + " " + a; - void 0 === d || d ? e.animate({transform:f}, 300, mina.easeinout) : e.attr({transform:f}); - this.box.set({x:b, y:a}); - }; - a.applyValue = function(b) { - this.value != b && (this.value = this._block.values[this.key] = b, this.textElement.node.textContent = this.getTextByValue(b), this.resize()); - }; - a.destroyOption = function() { - this.documentDownEvent && (Entry.documentMousedown.detach(this.documentDownEvent), delete this.documentDownEvent); - this.optionGroup && (this.optionGroup.remove(), delete this.optionGroup); - }; - a.getTextByValue = function(b) { - for (var a = this._contents.options, d = 0, e = a.length;d < e;d++) { - var f = a[d]; - if (f[1] == b) { - return f[0]; + if (this.object) { + for (var a = this.object.pictures, c = 0, d = a.length;c < d;c++) { + var e = a[c].view; + e || console.log(e); + e.orderHolder.innerHTML = c + 1; + b.appendChild(e); } + this.selectPicture(this.object.selectedPicture); + } else { + Entry.dispatchEvent("pictureClear"); } - return b; - }; -})(Entry.FieldDropdown.prototype); -Entry.FieldImage = function(a, b) { - this._block = b; - this.box = new Entry.BoxModel; - this._size = a.size; - this._imgUrl = a.img; - this._highlightColor = a.highlightColor ? a.highlightColor : "#F59900"; - this._position = a.position; - this._imgElement = this._path = this.svgGroup = null; - this.renderStart(); + } }; -(function(a) { - a.renderStart = function() { - this.svgGroup = this._block.contentSvgGroup.group(); - this._imgElement = this.svgGroup.image(this._imgUrl, 0, -.5 * this._size, this._size, this._size); - this.box.set({x:this._size, y:0, width:this._size, height:this._size}); - }; - a.align = function(b, a, d) { - var e = this.svgGroup; - this._position && (b = this._position.x); - var f = "t" + b + " " + a; - void 0 === d || d ? e.animate({transform:f}, 300, mina.easeinout) : e.attr({transform:f}); - this.box.set({x:b, y:a}); - }; - a.enableHighlight = function() { - var b = this._path.getTotalLength(), a = this._path; - this._path.attr({stroke:this._highlightColor, strokeWidth:2, "stroke-linecap":"round", "stroke-dasharray":b + " " + b, "stroke-dashoffset":b}); - setInterval(function() { - a.attr({"stroke-dashoffset":b}).animate({"stroke-dashoffset":0}, 300); - }, 1400, mina.easeout); - setTimeout(function() { - setInterval(function() { - a.animate({"stroke-dashoffset":-b}, 300); - }, 1400, mina.easeout); - }, 500); - }; -})(Entry.FieldImage.prototype); -Entry.FieldIndicator = function(a, b) { - this._block = b; - this.box = new Entry.BoxModel; - this._size = a.size; - this._imgUrl = a.img; - this._boxMultiplier = a.boxMultiplier || 2; - this._highlightColor = a.highlightColor ? a.highlightColor : "#F59900"; - this._position = a.position; - this._imgElement = this._path = this.svgGroup = null; - this.renderStart(); +Entry.Playground.prototype.addPicture = function(b, a) { + var c = Entry.cloneSimpleObject(b); + delete c.id; + delete c.view; + b = JSON.parse(JSON.stringify(c)); + b.id = Entry.generateHash(); + b.name = Entry.getOrderedName(b.name, this.object.pictures); + this.generatePictureElement(b); + this.object.addPicture(b); + this.injectPicture(); + this.selectPicture(b); }; -(function(a) { - a.renderStart = function() { - this.svgGroup = this._block.contentSvgGroup.group(); - this._imgElement = this.svgGroup.image(this._imgUrl, -1 * this._size, -1 * this._size, 2 * this._size, 2 * this._size); - var b = "m 0,-%s a %s,%s 0 1,1 -0.1,0 z".replace(/%s/gi, this._size); - this._path = this.svgGroup.path(b); - this._path.attr({stroke:"none", fill:"none"}); - this.box.set({x:this._size, y:0, width:this._size * this._boxMultiplier, height:this._size * this._boxMultiplier}); - }; - a.align = function(b, a, d) { - var e = this.svgGroup; - this._position && (b = this._position.x, a = this._position.y); - var f = "t" + b + " " + a; - void 0 === d || d ? e.animate({transform:f}, 300, mina.easeinout) : e.attr({transform:f}); - this.box.set({x:b, y:a}); - }; - a.enableHighlight = function() { - var b = this._path.getTotalLength(), a = this._path; - this._path.attr({stroke:this._highlightColor, strokeWidth:2, "stroke-linecap":"round", "stroke-dasharray":b + " " + b, "stroke-dashoffset":b}); - setInterval(function() { - a.attr({"stroke-dashoffset":b}).animate({"stroke-dashoffset":0}, 300); - }, 1400, mina.easeout); - setTimeout(function() { - setInterval(function() { - a.animate({"stroke-dashoffset":-b}, 300); - }, 1400, mina.easeout); - }, 500); - }; -})(Entry.FieldIndicator.prototype); -Entry.FieldStatement = function(a, b) { - this._blockView = b; - this.block = b.block; - this.key = a.key; - this.box = new Entry.BoxModel; - this.acceptType = a.accept; - this.dummyBlock = this.svgGroup = null; - a.alignX && (this._alignX = a.alignX); - a.alignY && (this._alignY = a.alignY); - this.box.observe(b, "alignContent", ["height"]); - this.renderStart(b.getBoard()); - this.block.observe(this, "_updateThread", ["thread"]); -}; -(function(a) { - a.renderStart = function(b) { - this.svgGroup = this._blockView.contentSvgGroup.group(); - this.box.set({x:46, y:0, width:20, height:20}); - this._thread = this._blockView.block.values[this.key]; - this.dummyBlock = new Entry.DummyBlock(this, this._blockView); - this._thread.insertDummyBlock(this.dummyBlock); - this._thread.createView(b); - this._thread.changeEvent.attach(this, this.calcHeight); - this.calcHeight(); - }; - a.calcHeight = function() { - for (var b = this.dummyBlock, a = -1;b;) { - a += b.view.height + 1, b = b.next; - } - this.box.set({height:a}); - }; - a.align = function(b, a, d) { - var e = this.svgGroup; - b = this._alignX || 46; - a = this._alignY || 14; - b = "t" + b + " " + a; - void 0 === d || d ? e.animate({transform:b}, 300, mina.easeinout) : e.attr({transform:b}); - }; - a._updateThread = function() { - this._threadChangeEvent && this._thread.changeEvent.detach(this._threadChangeEvent); - var b = this.block.thread; - this._threadChangeEvent = this._thread.changeEvent.attach(this, function() { - b.changeEvent.notify(); - }); - }; -})(Entry.FieldStatement.prototype); -Entry.DummyBlock = function(a, b) { - Entry.Model(this, !1); - this.view = this; - this.originBlockView = b; - this._schema = {}; - this._thread = a._thread; - this.statementField = a; - this.svgGroup = a.svgGroup.group(); - this.svgGroup.block = this; - var c = Entry.skeleton[a.acceptType].box(); - this.path = this.svgGroup.rect(c.offsetX, c.offsetY - 10, c.width, c.height); - this.path.attr({fill:"transparent"}); - this.prevObserver = b.observe(this, "_align", ["x", "y"]); - this.prevAnimatingObserver = b.observe(this, "_inheritAnimate", ["animating"]); - this.observe(this, "_updateBG", ["magneting"]); - this._align(); -}; -(function(a) { - a.schema = {x:0, y:0, width:0, height:0, animating:!1, magneting:!1}; - a._align = function(b) { - this.set({x:this.originBlockView.x, y:this.originBlockView.y}); - }; - a.insertAfter = function(b) { - this._thread.insertByBlock(this, b); - this.statementField.calcHeight(); - }; - a.createView = function() { - }; - a.setThread = function() { - }; - a.setPrev = function() { - }; - a.setNext = function(b) { - this.next = b; - }; - a.getBoard = function() { - return this.originBlockView.getBoard(); - }; - a._inheritAnimate = function() { - this.set({animating:this.originBlockView.animating}); - }; - a._updateBG = function() { - if (this.magneting) { - var b = this.getBoard().dragBlock.dragInstance.height; - this.set({height:b}); - b = this.getBoard().dragBlock.getShadow(); - b.attr({transform:"t0 0"}); - this.svgGroup.prepend(b); - this._clonedShadow = b; +Entry.Playground.prototype.setPicture = function(b) { + var a = Entry.container.getPictureElement(b.id), c = $(a); + if (a) { + b.view = a; + a.picture = b; + a = c.find("#t_" + b.id)[0]; + if (b.fileurl) { + a.style.backgroundImage = 'url("' + b.fileurl + '")'; } else { - this._clonedShadow && (this._clonedShadow.remove(), delete this._clonedShadow), this.set({height:0}); + var d = b.filename; + a.style.backgroundImage = 'url("' + Entry.defaultPath + "/uploads/" + d.substring(0, 2) + "/" + d.substring(2, 4) + "/thumb/" + d + '.png")'; } - this._thread.changeEvent.notify(); - }; - a.dominate = function() { - this.originBlockView.dominate(); - }; -})(Entry.DummyBlock.prototype); -Entry.FieldText = function(a, b) { - this._block = b; - this.box = new Entry.BoxModel; - this._fontSize = a.fontSize || b.getSkeleton().fontSize || 12; - this._text = a.text; - this.textElement = null; - this.renderStart(); + c.find("#s_" + b.id)[0].innerHTML = b.dimension.width + " X " + b.dimension.height; + } + Entry.container.setPicture(b); }; -(function(a) { - a.renderStart = function() { - this.textElement = this._block.contentSvgGroup.text(0, 0, this._text); - this.textElement.attr({style:"white-space: pre; font-size:" + this._fontSize + "px", "class":"dragNone", fill:"white"}); - var b = this.textElement.getBBox(); - this.textElement.attr({y:.25 * b.height}); - this.box.set({x:0, y:0, width:this.textElement.node.getComputedTextLength(), height:b.height}); - }; - a.align = function(b, a, d) { - !0 !== d && (d = !1); - var e = this.textElement, f = {x:b}; - d ? e.animate(f, 300, mina.easeinout) : e.attr(f); - this.box.set({x:b, width:this.textElement.node.getComputedTextLength(), y:a}); - }; -})(Entry.FieldText.prototype); -Entry.Scroller = function(a, b, c) { - this._horizontal = void 0 === b ? !0 : b; - this._vertical = void 0 === c ? !0 : c; - this.board = a; - this.board.changeEvent.attach(this, this.resizeScrollBar); - this.svgGroup = null; - this.vRatio = this.vY = this.vWidth = this.hRatio = this.hX = this.hWidth = 0; - this._visible = !0; - this.createScrollBar(); - Entry.windowResized && Entry.windowResized.attach(this, this.resizeScrollBar); +Entry.Playground.prototype.clonePicture = function(b) { + b = Entry.playground.object.getPicture(b); + this.addPicture(b, !0); }; -Entry.Scroller.RADIUS = 7; -(function(a) { - a.createScrollBar = function() { - var b = Entry.Scroller.RADIUS, a = this; - this.svgGroup = this.board.snap.group().attr({class:"boardScrollbar"}); - this._horizontal && (this.hScrollbar = this.svgGroup.rect(0, 0, 0, 2 * b, b), this.hScrollbar.mousedown(function(b) { - function e(b) { - b.stopPropagation(); - b.preventDefault(); - b.originalEvent.touches && (b = b.originalEvent.touches[0]); - var d = a.dragInstance; - a.scroll((b.pageX - d.offsetX) / a.hRatio, 0); - d.set({offsetX:b.pageX, offsetY:b.pageY}); - } - function f(b) { - $(document).unbind(".scroll"); - delete a.dragInstance; - } - if (0 === b.button || b instanceof Touch) { - Entry.documentMousedown && Entry.documentMousedown.notify(b); - var g = $(document); - g.bind("mousemove.scroll", e); - g.bind("mouseup.scroll", f); - g.bind("touchmove.scroll", e); - g.bind("touchend.scroll", f); - a.dragInstance = new Entry.DragInstance({startX:b.pageX, startY:b.pageY, offsetX:b.pageX, offsetY:b.pageY}); - } - b.stopPropagation(); - })); - this._vertical && (this.vScrollbar = this.svgGroup.rect(0, 0, 2 * b, 0, b), this.vScrollbar.mousedown(function(b) { - function e(b) { - b.stopPropagation(); - b.preventDefault(); - b.originalEvent.touches && (b = b.originalEvent.touches[0]); - var d = a.dragInstance; - a.scroll(0, (b.pageY - d.offsetY) / a.vRatio); - d.set({offsetX:b.pageX, offsetY:b.pageY}); - } - function f(b) { - $(document).unbind(".scroll"); - delete a.dragInstance; - } - if (0 === b.button || b instanceof Touch) { - Entry.documentMousedown && Entry.documentMousedown.notify(b); - var g = $(document); - g.bind("mousemove.scroll", e); - g.bind("mouseup.scroll", f); - g.bind("touchmove.scroll", e); - g.bind("touchend.scroll", f); - a.dragInstance = new Entry.DragInstance({startX:b.pageX, startY:b.pageY, offsetX:b.pageX, offsetY:b.pageY}); - } - b.stopPropagation(); - })); - this.resizeScrollBar(); - }; - a.resizeScrollBar = function() { - var b = this.board.svgBlockGroup.getBBox(), a = this.board.svgDom, d = a.width(), a = a.height(); - this.setVisible(!0); - if (this._horizontal) { - var e = -b.width + Entry.BOARD_PADDING, f = d - Entry.BOARD_PADDING, g = (d + 2 * Entry.Scroller.RADIUS) * b.width / (f - e + b.width); - isNaN(g) && (g = 0); - this.hX = (b.x - e) / (f - e) * (d - g - 2 * Entry.Scroller.RADIUS); - this.hScrollbar.attr({width:g, x:this.hX, y:a - 2 * Entry.Scroller.RADIUS}); - this.hRatio = (d - g - 2 * Entry.Scroller.RADIUS) / (f - e); - } - this._vertical && (e = -b.height + Entry.BOARD_PADDING, f = a - Entry.BOARD_PADDING, g = (a + 2 * Entry.Scroller.RADIUS) * b.height / (f - e + b.height), this.vY = (b.y - e) / (f - e) * (a - g - 2 * Entry.Scroller.RADIUS), this.vScrollbar.attr({height:g, y:this.vY, x:d - 2 * Entry.Scroller.RADIUS}), this.vRatio = (a - g - 2 * Entry.Scroller.RADIUS) / (f - e)); - }; - a.updateScrollBar = function(b, a) { - this._horizontal && (this.hX += b * this.hRatio, this.hScrollbar.attr({x:this.hX})); - this._vertical && (this.vY += a * this.vRatio, this.vScrollbar.attr({y:this.vY})); - }; - a.scroll = function(b, a) { - var d = this.board.svgBlockGroup.getBBox(), e = this.board.svgDom; - b = Math.max(-d.width + Entry.BOARD_PADDING - d.x, b); - a = Math.max(-d.height + Entry.BOARD_PADDING - d.y, a); - b = Math.min(e.width() - Entry.BOARD_PADDING - d.x, b); - a = Math.min(e.height() - Entry.BOARD_PADDING - d.y, a); - this.board.code.moveBy(b, a); - this.updateScrollBar(b, a); - }; - a.setVisible = function(b) { - b != this.isVisible() && (this._visible = b, this.svgGroup.attr({display:!0 === b ? "block" : "none"})); - }; - a.isVisible = function() { - return this._visible; - }; -})(Entry.Scroller.prototype); -Entry.skeleton = function() { +Entry.Playground.prototype.selectPicture = function(b) { + for (var a = this.object.pictures, c = 0, d = a.length;c < d;c++) { + var e = a[c]; + e.id === b.id ? e.view.addClass("entryPictureSelected") : e.view.removeClass("entryPictureSelected"); + } + var f; + b && b.id && (f = Entry.container.selectPicture(b.id)); + this.object.id === f && Entry.dispatchEvent("pictureSelected", b); }; -Entry.skeleton.basic = {path:function(a) { - a = a.contentWidth; - a = Math.max(0, a - 6); - return "m -8,0 l 8,8 8,-8 h %w a 15,15 0 0,1 0,30 h -%w l -8,8 -8,-8 v -30 z".replace(/%w/gi, a); -}, box:function(a) { - return {offsetX:0, offsetY:0, width:(a ? a.contentWidth : 150) + 30, height:30, marginBottom:0}; -}, magnets:{previous:{}, next:{x:0, y:31}}, contentPos:function(a) { - return {x:14, y:15}; -}}; -Entry.skeleton.basic_event = {path:function(a) { - a = a.contentWidth; - a = Math.max(0, a); - return "m -8,0 m 0,-5 a 19.5,19.5 0, 0,1 16,0 c 10,5 15,5 20,5 h %w a 15,15 0 0,1 0,30 H 8 l -8,8 -8,-8 l 0,0.5 a 19.5,19.5 0, 0,1 0,-35 z".replace(/%w/gi, a - 30); -}, box:function(a) { - return {offsetX:0, offsetY:0, width:a.contentWidth + 30, height:30, marginBottom:0}; -}, magnets:{previous:{}, next:{x:0, y:31}}, contentPos:function(a) { - return {x:1, y:15}; -}}; -Entry.skeleton.basic_loop = {path:function(a) { - var b = Math.max(a.contentHeight, 25); - return "m -8,0 l 8,8 8,-8 h %cw a 15,15 0 0,1 0,30 H 24 l -8,8 -8,-8 h -0.4 v %ch h 0.4 l 8,8 8,-8 h %cw h -8 a 8,8 0 0,1 0,16 H 8 l -8,8 -8,-8 z".replace(/%cw/gi, Math.max(0, a.contentWidth - 31)).replace(/%ch/gi, b); -}, magnets:function() { - return {previous:{x:0, y:0}, next:{x:0, y:105}}; -}, box:function(a) { - return {offsetX:0, offsetY:0, width:a.contentWidth, height:Math.max(a.contentHeight, 25) + 46, marginBottom:0}; -}, contentPos:function() { - return {x:14, y:15}; -}}; -Entry.skeleton.pebble_event = {path:function(a) { - return "m 0,0 a 25,25 0 0,1 9,48.3 a 9,9 0 0,1 -18,0 a 25,25 0 0,1 9,-48.3 z"; -}, box:function(a) { - return {offsetX:-25, offsetY:0, width:50, height:48.3, marginBottom:0}; -}, magnets:function(a) { - return {next:{x:0, y:49.3}}; -}, contentPos:function() { - return {x:0, y:25}; -}}; -Entry.skeleton.pebble_loop = {fontSize:16, path:function(a) { - a = Math.max(a.contentHeight, 50); - return "M 0,9 a 9,9 0 0,0 9,-9 h %cw q 25,0 25,25 v %ch q 0,25 -25,25 h -%cw a 9,9 0 0,1 -18,0 h -%cw q -25,0 -25,-25 v -%ch q 0,-25 25,-25 h %cw a 9,9 0 0,0 9,9 M 0,49 a 9,9 0 0,1 -9,-9 h -28 a 25,25 0 0,0 -25,25 v %cih a 25,25 0 0,0 25,25 h 28 a 9,9 0 0,0 18,0 h 28 a 25,25 0 0,0 25,-25 v -%cih a 25,25 0 0,0 -25,-25 h -28 a 9,9 0 0,1 -9,9 z".replace(/%cw/gi, 41).replace(/%ch/gi, a + 4).replace(/%cih/gi, a - 50); -}, magnets:function() { - return {previous:{x:0, y:0}, next:{x:0, y:105}}; -}, box:function(a) { - return {offsetX:-75, offsetY:0, width:150, height:Math.max(a.contentHeight, 50) + 54, marginBottom:0}; -}, contentPos:function() { - return {x:-46, y:25}; -}}; -Entry.skeleton.pebble_basic = {fontSize:15, morph:["prev", "next"], path:function(a) { - var b = a.block; - a = b.prev && "pebble_basic" === b.prev._schema.skeleton; - b = b.next && "pebble_basic" === b.next._schema.skeleton; - return "m 0,9 a 9,9 0 0,0 9,-9 h 28 " + (a ? "l 25,0 0,25" : "q 25,0 25,25") + (b ? "l 0,25 -25,0" : "q 0,25 -25,25") + "h -28 a 9,9 0 0,1 -18,0 h -28 " + (b ? "l -25,0 0,-25" : "q -25,0 -25,-25") + (a ? "l 0,-25 25,0" : "q 0,-25 25,-25") + "h 28 a 9,9 0 0,0 9,9 z"; -}, magnets:function() { - return {previous:{x:0, y:0}, next:{x:0, y:51}}; -}, box:function() { - return {offsetX:-62, offsetY:0, width:124, height:50, marginBottom:0}; -}, contentPos:function() { - return {x:-46, y:25}; -}}; -Entry.Block = function(a, b) { - Entry.Model(this, !1); - this._schema = null; - this.setThread(b); - this.load(a); +Entry.Playground.prototype.movePicture = function(b, a) { + this.object.pictures.splice(a, 0, this.object.pictures.splice(b, 1)[0]); + this.injectPicture(); + Entry.stage.sortZorder(); }; -Entry.Block.MAGNET_RANGE = 10; -Entry.Block.MAGNET_OFFSET = .4; -(function(a) { - a.schema = {id:null, name:null, x:0, y:0, type:null, values:{}, prev:null, next:null, view:null, thread:null, movable:!0, deletable:!0, readOnly:!1}; - a.load = function(b) { - b.id || (b.id = Entry.Utils.generateId()); - this.set(b); - this.getSchema(); - }; - a.getSchema = function() { - this._schema = Entry.block[this.type]; - this._schema.event && this.thread.registerEvent(this, this._schema.event); - for (var b = this._schema.contents, a = 0;a < b.length;a++) { - var d = b[a]; - !this.values[d.key] && d.value && (this.values[d.key] = d.value); - "Statement" == d.type && (this.values[d.key] = new Entry.Thread(this.values[d.key], this.getCode())); - } - }; - a.setThread = function(b) { - this.set({thread:b}); - }; - a.getThread = function() { - return this.thread; - }; - a.setPrev = function(b) { - b !== this && this.set({prev:b}); - }; - a.setNext = function(b) { - b !== this && this.set({next:b}); - }; - a.next = function() { - return this.next; - }; - a.insertAfter = function(b) { - this.thread.insertByBlock(this, b); - }; - a._updatePos = function() { - this.view && this.set({x:this.view.x, y:this.view.y}); - this.next && this.next._updatePos(); - }; - a.createView = function(b) { - this.view || (this.set({view:new Entry.BlockView(this, b)}), this._updatePos()); - }; - a.clone = function(b) { - return new Entry.Block(this.toJSON(!0), b); - }; - a.toJSON = function(b) { - var a = this._toJSON(); - delete a.prev; - delete a.next; - delete a.view; - delete a.thread; - b && delete a.id; - var d = {}, e; - for (e in a.values) { - d[e] = a.values[e]; - } - a.values = d; - d = this._schema.contents; - for (e = 0;e < d.length;e++) { - var f = d[e]; - "Statement" == f.type && (a.values[f.key] = this.values[f.key].toJSON(b)); - } - return a; - }; - a.destroy = function(b) { - this.view && this.view.destroy(b); - (!this.prev || this.prev instanceof Entry.DummyBlock) && this.thread.destroy(); - var a = this.values.STATEMENT; - a && (a = a.getFirstBlock(), a instanceof Entry.DummyBlock && (a = a.next), a && a.destroy(b)); - this.next && this.next.destroy(b); - }; - a.destroyAlone = function(b) { - this.view && this.view.destroy(b); - this.getThread().spliceBlock(this); - }; - a.getView = function() { - return this.view; - }; - a.setMovable = function(b) { - this.movable != b && this.set({movable:b}); - }; - a.isMovable = function() { - return this.movable; - }; - a.setDeletable = function(b) { - this.deletable != b && this.set({deletable:b}); - }; - a.isDeletable = function() { - return this.deletable; - }; - a.isReadOnly = function() { - return this.readOnly; - }; - a.getCode = function() { - return this.thread.getCode(); - }; - a.doAdd = function() { - var b = this.id; - console.log("doAdd", b); - Entry.activityReporter && (b = [["blockId", b], ["code", this.getCode().stringify()]], Entry.activityReporter.add(new Entry.Activity("addBlock", b))); - this.getCode().changeEvent.notify(); - }; - a.doMove = function() { - var b = this.id, a = this.view.x - this.x, d = this.view.y - this.y; - console.log("doMove", b, a, d); - this._updatePos(); - this.getCode().changeEvent.notify(); - Entry.activityReporter && (b = [["blockId", b], ["moveX", a], ["moveY", d], ["code", this.getCode().stringify()]], Entry.activityReporter.add(new Entry.Activity("moveBlock", b))); - }; - a.doSeparate = function() { - var b = this.id, a = this.x, d = this.y; - console.log("separate", b, a, d); - this.thread.separate(this); - this._updatePos(); - this.getCode().changeEvent.notify(); - Entry.activityReporter && (b = [["blockId", b], ["positionX", a], ["positionY", d], ["code", this.getCode().stringify()]], Entry.activityReporter.add(new Entry.Activity("seperateBlock", b))); - }; - a.doInsert = function(b) { - var a = this.id, d = b.id, e = this.x, f = this.y; - console.log("insert", a, d, e, f); - var g = this.thread.cut(this); - b.insertAfter(g); - this._updatePos(); - this.getCode().changeEvent.notify(); - Entry.activityReporter && (b = [["targetBlockId", d], ["blockId", a], ["positionX", e], ["positionY", f], ["code", this.getCode().stringify()]], Entry.activityReporter.add(new Entry.Activity("insertBlock", b))); - }; - a.doDestroy = function(b) { - var a = this.id, d = this.x, e = this.y; - console.log("destroy", a, d, e); - this.destroy(b); - this.getCode().changeEvent.notify(); - Entry.activityReporter && (b = [["blockId", a], ["positionX", d], ["positionY", e], ["code", this.getCode().stringify()]], Entry.activityReporter.add(new Entry.Activity("destroyBlock", b))); - }; - a.doDestroyAlone = function(b) { - if (this.isDeletable()) { - var a = this.id, d = this.x, e = this.y; - console.log("destroy alone", a, d, e); - this.destroyAlone(b); - this.getCode().changeEvent.notify(); - Entry.activityReporter && (b = [["blockId", a], ["positionX", d], ["positionY", e], ["code", this.getCode().stringify()]], Entry.activityReporter.add(new Entry.Activity("destroyBlockAlone", b))); - return !0; - } - }; -})(Entry.Block.prototype); -Entry.Thread = function(a, b) { - this._data = new Entry.Collection; - this._code = b; - this.changeEvent = new Entry.Event(this); - this.changeEvent.attach(this, this.inspectExist); - this.load(a); +Entry.Playground.prototype.injectText = function() { + if (Entry.playground.object) { + Entry.playground.textEditInput.value = Entry.playground.object.entity.getText(); + Entry.playground.textEditArea.value = Entry.playground.object.entity.getText(); + Entry.playground.fontName_.value = Entry.playground.object.entity.getFontName(); + if (Entry.playground.object.entity.font) { + var b = -1 < Entry.playground.object.entity.font.indexOf("bold") || !1; + $("#entryPlaygroundText_boldImage").attr("src", Entry.mediaFilePath + "text_button_bold_" + b + ".png"); + b = -1 < Entry.playground.object.entity.font.indexOf("italic") || !1; + $("#entryPlaygroundText_italicImage").attr("src", Entry.mediaFilePath + "text_button_italic_" + b + ".png"); + } + b = Entry.playground.object.entity.getUnderLine() || !1; + $("#entryPlaygroundText_underlineImage").attr("src", Entry.mediaFilePath + "text_button_underline_" + b + ".png"); + b = Entry.playground.object.entity.getStrike() || !1; + $("#entryPlaygroundText_strikeImage").attr("src", Entry.mediaFilePath + "text_button_strike_" + b + ".png"); + $(".entryPlayground_fgColorDiv").css("backgroundColor", Entry.playground.object.entity.colour); + $(".entryPlayground_bgColorDiv").css("backgroundColor", Entry.playground.object.entity.bgColour); + Entry.playground.toggleLineBreak(Entry.playground.object.entity.getLineBreak()); + Entry.playground.object.entity.getLineBreak() && ($(".entryPlaygroundLinebreakDescription > p").html(Lang.Menus.linebreak_on_desc_1), $(".entryPlaygroundLinebreakDescription > ul > li").eq(0).html(Lang.Menus.linebreak_on_desc_2), $(".entryPlaygroundLinebreakDescription > ul > li").eq(1).html(Lang.Menus.linebreak_on_desc_3)); + Entry.playground.setFontAlign(Entry.playground.object.entity.getTextAlign()); + b = Entry.playground.object.entity.getFontSize(); + Entry.playground.fontSizeIndiciator.style.width = b + "%"; + Entry.playground.fontSizeKnob.style.left = .88 * b + "px"; + } }; -(function(a) { - a.load = function(b) { - void 0 === b && (b = []); - if (!(b instanceof Array)) { - return console.error("thread must be array"); +Entry.Playground.prototype.injectSound = function() { + var b = this.soundListView_; + if (b) { + for (;b.hasChildNodes();) { + b.removeChild(b.lastChild); } - for (var a = 0;a < b.length;a++) { - var d = b[a]; - d instanceof Entry.Block || d instanceof Entry.DummyBlock ? (d.setThread(this), this._data.push(d)) : this._data.push(new Entry.Block(d, this)); - } - this._setRelation(); - (b = this._code.view) && this.createView(b.board); - }; - a._setRelation = function() { - var b = this._data.getAll(); - if (0 !== b.length) { - var a = b[0]; - a.setPrev(null); - b[b.length - 1].setNext(null); - for (var d = 1;d < b.length;d++) { - var e = b[d]; - e.setPrev(a); - a.setNext(e); - a = e; + if (this.object) { + for (var a = this.object.sounds, c = 0, d = a.length;c < d;c++) { + var e = a[c].view; + e.orderHolder.innerHTML = c + 1; + b.appendChild(e); } } - }; - a.registerEvent = function(b, a) { - this._code.registerEvent(b, a); - }; - a.createView = function(b) { - this.view || (this.view = new Entry.ThreadView(this, b)); - this._data.map(function(a) { - a.createView(b); - }); - }; - a.separate = function(b) { - this._data.has(b.id) && (b.prev && (b.prev.setNext(null), b.setPrev(null)), b = this._data.splice(this._data.indexOf(b)), this._code.createThread(b), this.changeEvent.notify()); - }; - a.cut = function(b) { - b = this._data.indexOf(b); - var a = this._data.splice(b); - this._data[b - 1] && this._data[b - 1].setNext(null); - this.changeEvent.notify(); - return a; - }; - a.insertDummyBlock = function(b) { - this._data.unshift(b); - this._data[1] && (this._data[1].setPrev(b), b.setNext(this._data[1])); - }; - a.insertByBlock = function(b, a) { - var d = this._data.indexOf(b); - b.setNext(a[0]); - a[0].setPrev(b); - for (var e in a) { - a[e].setThread(this); - } - this._data.splice.apply(this._data, [d + 1, 0].concat(a)); - this._setRelation(); - this.changeEvent.notify(); - }; - a.clone = function(b) { - b = b || this._code; - b = new Entry.Thread([], b); - for (var a = this._data, d = [], e = 0, f = a.length;e < f;e++) { - d.push(a[e].clone(b)); - } - b.load(d); - return b; - }; - a.toJSON = function(b, a) { - for (var d = [], e = void 0 === a ? 0 : a;e < this._data.length;e++) { - this._data[e] instanceof Entry.Block && d.push(this._data[e].toJSON(b)); + } +}; +Entry.Playground.prototype.moveSound = function(b, a) { + this.object.sounds.splice(a, 0, this.object.sounds.splice(b, 1)[0]); + this.updateListViewOrder("sound"); + Entry.stage.sortZorder(); +}; +Entry.Playground.prototype.addSound = function(b, a) { + var c = Entry.cloneSimpleObject(b); + delete c.view; + delete c.id; + b = JSON.parse(JSON.stringify(c)); + b.id = Entry.generateHash(); + b.name = Entry.getOrderedName(b.name, this.object.sounds); + this.generateSoundElement(b); + this.object.addSound(b); + this.injectSound(); +}; +Entry.Playground.prototype.changeViewMode = function(b) { + for (var a in this.tabViewElements) { + this.tabViewElements[a].removeClass("entryTabSelected"); + } + "default" != b && this.tabViewElements[b].addClass("entryTabSelected"); + if ("variable" != b) { + var c = this.view_.children; + for (a = 0;a < c.length;a++) { + var d = c[a]; + -1 < d.id.toUpperCase().indexOf(b.toUpperCase()) ? d.removeClass("entryRemove") : d.addClass("entryRemove"); } - return d; - }; - a.destroy = function(b) { - this._code.destroyThread(this, !1); - this.view && this.view.destroy(b); - }; - a.getFirstBlock = function() { - return this._data[0]; - }; - a.getBlocks = function() { - return this._data; - }; - a.countBlock = function() { - for (var b = 0, a = 0;a < this._data.length;a++) { - var d = this._data[a]; - if (d.type) { - b++; - for (var e = Entry.block[d.type].contents, f = 0;f < e.length;f++) { - var g = e[f]; - "Statement" == g.type && (b += d.values[g.key].countBlock()); + if ("picture" == b && (!this.pictureView_.object || this.pictureView_.object != this.object)) { + this.pictureView_.object = this.object, this.injectPicture(); + } else { + if ("sound" == b && (!this.soundView_.object || this.soundView_.object != this.object)) { + this.soundView_.object = this.object, this.injectSound(); + } else { + if ("text" == b && "textBox" == this.object.objectType || this.textView_.object != this.object) { + this.textView_.object = this.object, this.injectText(); } } } - return b; - }; - a.inspectExist = function() { - }; - a.getCode = function() { - return this._code; - }; - a.setCode = function(b) { - this._code = b; - }; - a.spliceBlock = function(b) { - var a = this.getBlocks(); - a.remove(b); - 0 !== a.length ? (null === b.prev ? b.next.setPrev(null) : null === b.next ? b.prev.setNext(null) : (b.prev.setNext(b.next), b.next.setPrev(b.prev)), this._setRelation()) : this.destroy(); - this.changeEvent.notify(); - }; -})(Entry.Thread.prototype); -Entry.ThreadView = function(a, b) { - Entry.Model(this, !1); - this.thread = a; - this.svgGroup = b.svgThreadGroup.group(); + "code" == b && this.resizeHandle_ && this.resizeHandle_.removeClass("entryRemove"); + Entry.engine.isState("run") && this.curtainView_.removeClass("entryRemove"); + this.viewMode_ = b; + this.toggleOffVariableView(); + } }; -(function(a) { - a.schema = {scrollX:0, scrollY:0}; - a.destroy = function() { - this.svgGroup.remove(); - }; -})(Entry.ThreadView.prototype); -Entry.FieldTrashcan = function(a) { - this.board = a; - this.svgGroup = a.snap.group(); - this.renderStart(); - this.dragBlockObserver = this.dragBlock = null; - this.isOver = !1; - a.observe(this, "updateDragBlock", ["dragBlock"]); - this.setPosition(); - Entry.windowResized && Entry.windowResized.attach(this, this.setPosition); +Entry.Playground.prototype.createVariableView = function() { + var b = Entry.createElement("div"); + Entry.type && "workspace" != Entry.type ? "phone" == Entry.type && b.addClass("entryVariablePanelPhone") : b.addClass("entryVariablePanelWorkspace"); + this.variableViewWrapper_ = b; + Entry.variableContainer.createDom(b); + return b; }; -(function(a) { - a.renderStart = function() { - var b = Entry.mediaFilePath + "delete_"; - this.trashcanTop = this.svgGroup.image(b + "cover.png", 0, 0, 60, 20); - this.trashcan = this.svgGroup.image(b + "body.png", 0, 20, 60, 60); - b = this.svgGroup.filter(Snap.filter.shadow(1, 1, 2)); - this.svgGroup.attr({filter:b}); - }; - a.updateDragBlock = function() { - var b = this.board.dragBlock, a = this.dragBlockObserver; - b ? b.observe(this, "checkBlock", ["x", "y"]) : (a && a.destroy(), this.isOver && this.dragBlock && (this.dragBlock.block.doDestroy(!0), createjs.Sound.play("entryDelete")), this.tAnimation(!1)); - this.dragBlock = b; - }; - a.checkBlock = function() { - var b = this.dragBlock; - if (b && b.block.isDeletable()) { - var a = this.board.offset, d = this.getPosition(), e = d.x + a.left, a = d.y + a.top, f, g; - if (b = b.dragInstance) { - f = b.offsetX, g = b.offsetY; - } - this.tAnimation(f >= e && g >= a); - } - }; - a.align = function() { - var b = this.getPosition(); - this.svgGroup.attr({transform:"t" + b.x + " " + b.y}); - }; - a.setPosition = function() { - var b = this.board.svgDom; - this._x = b.width() - 110; - this._y = b.height() - 110; - this.align(); - }; - a.getPosition = function() { - return {x:this._x, y:this._y}; +Entry.Playground.prototype.toggleOnVariableView = function() { + Entry.playground.changeViewMode("code"); + this.hideBlockMenu(); + Entry.variableContainer.updateList(); + this.variableView_.removeClass("entryRemove"); + this.resizeHandle_.removeClass("entryRemove"); +}; +Entry.Playground.prototype.toggleOffVariableView = function() { + this.showBlockMenu(); + this.variableView_.addClass("entryRemove"); +}; +Entry.Playground.prototype.editBlock = function() { + var b = Entry.playground; + Entry.stateManager && Entry.stateManager.addCommand("edit block", b, b.restoreBlock, b.object, b.object.getScriptText()); +}; +Entry.Playground.prototype.mouseupBlock = function() { + if (Entry.reporter) { + var b = Entry.playground, a = b.object; + Entry.reporter.report(new Entry.State("edit block mouseup", b, b.restoreBlock, a, a.getScriptText())); + } +}; +Entry.Playground.prototype.restoreBlock = function(b, a) { + Entry.container.selectObject(b.id); + Entry.stateManager && Entry.stateManager.addCommand("restore block", this, this.restoreBlock, this.object, this.object.getScriptText()); + Blockly.Xml.textToDom(a); +}; +Entry.Playground.prototype.setMenu = function(b) { + if (this.currentObjectType != b) { + var a = this.blockMenu; + a.unbanClass(this.currentObjectType); + a.banClass(b); + a.setMenu(); + a.selectMenu(0, !0); + this.currentObjectType = b; + } +}; +Entry.Playground.prototype.hideTabs = function() { + var b = ["picture", "text", "sound", "variable"], a; + for (a in b) { + this.hideTab([b[a]]); + } +}; +Entry.Playground.prototype.hideTab = function(b) { + this.tabViewElements[b] && (this.tabViewElements[b].addClass("hideTab"), this.tabViewElements[b].removeClass("showTab")); +}; +Entry.Playground.prototype.showTabs = function() { + var b = ["picture", "text", "sound", "variable"], a; + for (a in b) { + this.showTab(b[a]); + } +}; +Entry.Playground.prototype.showTab = function(b) { + this.tabViewElements[b] && (this.tabViewElements[b].addClass("showTab"), this.tabViewElements[b].removeClass("hideTab")); +}; +Entry.Playground.prototype.initializeResizeHandle = function(b) { + b.onmousedown = function(a) { + Entry.playground.resizing = !0; + Entry.documentMousemove && (Entry.playground.resizeEvent = Entry.documentMousemove.attach(this, function(a) { + Entry.playground.resizing && Entry.resizeElement({menuWidth:a.clientX - Entry.interfaceState.canvasWidth}); + })); }; - a.tAnimation = function(b) { - if (b !== this.isOver) { - b = void 0 === b ? !0 : b; - var a = this.trashcanTop; - b ? a.animate({transform:"t5 -20 r30"}, 50) : a.animate({transform:"r0"}, 50); - this.isOver = b; + document.addEventListener("mouseup", function(a) { + if (a = Entry.playground.resizeEvent) { + Entry.playground.resizing = !1, Entry.documentMousemove.detach(a), delete Entry.playground.resizeEvent; } - }; -})(Entry.FieldTrashcan.prototype); -Entry.Board = function(a) { - function b(b) { - var a = $(window); - b = a.scrollTop(); - var a = a.scrollLeft(), f = c.offset; - c.relativeOffset = {top:f.top - b, left:f.left - a}; - console.log("update"); - } - a = "string" === typeof a ? $("#" + a) : $(a); - if ("DIV" !== a.prop("tagName")) { - return console.error("Dom is not div element"); + }); +}; +Entry.Playground.prototype.reloadPlayground = function() { + var b = this.mainWorkspace; + b && (b.getBlockMenu().reDraw(), this.object && this.object.script.view.reDraw()); +}; +Entry.Playground.prototype.flushPlayground = function() { + this.object = null; + if (Entry.playground && Entry.playground.view_) { + this.injectPicture(); + this.injectSound(); + var b = Entry.playground.mainWorkspace.getBoard(); + b.clear(); + b.changeCode(null); } - if ("function" !== typeof window.Snap) { - return console.error("Snap library is required"); +}; +Entry.Playground.prototype.refreshPlayground = function() { + Entry.playground && Entry.playground.view_ && (this.injectPicture(), this.injectSound()); +}; +Entry.Playground.prototype.updateListViewOrder = function(b) { + b = "picture" == b ? this.pictureListView_.childNodes : this.soundListView_.childNodes; + for (var a = 0, c = b.length;a < c;a++) { + b[a].orderHolder.innerHTML = a + 1; } - Entry.Model(this, !1); - this.svgDom = Entry.Dom($(''), {parent:a}); - this.offset = this.svgDom.offset(); - this.offset.top = 130; - this.offset.left -= $(window).scrollLeft(); - this.relativeOffset = this.offset; - var c = this; - $(window).scroll(b); - Entry.windowResized.attach(this, b); - this.snap = Snap("#play"); - this._blockViews = []; - this.trashcan = new Entry.FieldTrashcan(this); - this.svgGroup = this.snap.group(); - this.svgThreadGroup = this.svgGroup.group(); - this.svgThreadGroup.board = this; - this.svgBlockGroup = this.svgGroup.group(); - this.svgBlockGroup.board = this; - Entry.ANIMATION_DURATION = 200; - Entry.BOARD_PADDING = 100; - this.changeEvent = new Entry.Event(this); - this.scroller = new Entry.Scroller(this, !0, !0); - this._addControl(a); - Entry.documentMousedown && Entry.documentMousedown.attach(this, this.setSelectedBlock); - Entry.keyPressed && Entry.keyPressed.attach(this, this._keyboardControl); }; -(function(a) { - a.schema = {code:null, dragBlock:null, magnetedBlockView:null, selectedBlockView:null}; - a.changeCode = function(b) { - this.codeListener && this.code.changeEvent.detach(this.codeListener); - this.set({code:b}); - var a = this; - this.codeListener = this.code.changeEvent.attach(this, function() { - a.changeEvent.notify(); - }); - b.createView(this); - this.changeEvent.notify(); - }; - a.bindCodeView = function(b) { - this.svgBlockGroup.remove(); - this.svgThreadGroup.remove(); - this.svgBlockGroup = b.svgBlockGroup; - this.svgThreadGroup = b.svgThreadGroup; - this.svgGroup.append(this.svgThreadGroup); - this.svgGroup.append(this.svgBlockGroup); - }; - a.setMagnetedBlock = function(b) { - if (this.magnetedBlockView) { - if (this.magnetedBlockView === b) { - return; +Entry.Playground.prototype.generatePictureElement = function(b) { + function a() { + if ("" === this.value.trim()) { + Entry.deAttachEventListener(this, "blur", a), alert("\uc774\ub984\uc744 \uc785\ub825\ud558\uc5ec \uc8fc\uc138\uc694."), this.focus(), Entry.attachEventListener(this, "blur", a); + } else { + for (var b = $(".entryPlaygroundPictureName"), c = 0;c < b.length;c++) { + if (b.eq(c).val() == f.value && b[c] != this) { + Entry.deAttachEventListener(this, "blur", a); + alert("\uc774\ub984\uc774 \uc911\ubcf5 \ub418\uc5c8\uc2b5\ub2c8\ub2e4."); + this.focus(); + Entry.attachEventListener(this, "blur", a); + return; + } } - this.magnetedBlockView.set({magneting:!1}); + this.picture.name = this.value; + Entry.playground.reloadPlayground(); + Entry.dispatchEvent("pictureNameChanged", this.picture); } - this.set({magnetedBlockView:b}); - b && (b.set({magneting:!0, animating:!0}), b.dominate(), this.dragBlock.dominate()); - }; - a.getCode = function() { - return this.code; + } + var c = Entry.createElement("li", b.id); + b.view = c; + c.addClass("entryPlaygroundPictureElement"); + c.picture = b; + c.bindOnClick(function(a) { + Entry.playground.selectPicture(this.picture); + }); + Entry.Utils.disableContextmenu(b.view); + $(b.view).on("contextmenu", function() { + Entry.ContextMenu.show([{text:Lang.Workspace.context_rename, callback:function() { + f.focus(); + }}, {text:Lang.Workspace.context_duplicate, callback:function() { + Entry.playground.clonePicture(b.id); + }}, {text:Lang.Workspace.context_remove, callback:function() { + Entry.playground.object.removePicture(b.id) ? (Entry.removeElement(c), Entry.toast.success(Lang.Workspace.shape_remove_ok, b.name + " " + Lang.Workspace.shape_remove_ok_msg)) : Entry.toast.alert(Lang.Workspace.shape_remove_fail, Lang.Workspace.shape_remove_fail_msg); + }}, {divider:!0}, {text:Lang.Workspace.context_download, callback:function() { + b.fileurl ? window.open(b.fileurl) : window.open("/api/sprite/download/image/" + encodeURIComponent(b.filename) + "/" + encodeURIComponent(b.name) + ".png"); + }}], "workspace-contextmenu"); + }); + var d = Entry.createElement("div"); + d.addClass("entryPlaygroundPictureOrder"); + c.orderHolder = d; + c.appendChild(d); + d = Entry.createElement("div", "t_" + b.id); + d.addClass("entryPlaygroundPictureThumbnail"); + if (b.fileurl) { + d.style.backgroundImage = 'url("' + b.fileurl + '")'; + } else { + var e = b.filename; + d.style.backgroundImage = 'url("' + Entry.defaultPath + "/uploads/" + e.substring(0, 2) + "/" + e.substring(2, 4) + "/thumb/" + e + '.png")'; + } + c.appendChild(d); + var f = Entry.createElement("input"); + f.addClass("entryPlaygroundPictureName"); + f.addClass("entryEllipsis"); + f.picture = b; + f.value = b.name; + Entry.attachEventListener(f, "blur", a); + f.onkeypress = function(a) { + 13 == a.keyCode && this.blur(); }; - a.findById = function(b) { - for (var a = this.code.getThreads(), d = 0, e = a.length;d < e;d++) { - var f = a[d]; - if (f) { - for (var f = f.getBlocks(), g = 0, e = f.length;g < e;g++) { - if (f[g] && f[g].id == b) { - return f[g]; - } + c.appendChild(f); + d = Entry.createElement("div", "s_" + b.id); + d.addClass("entryPlaygroundPictureSize"); + d.innerHTML = b.dimension.width + " X " + b.dimension.height; + c.appendChild(d); +}; +Entry.Playground.prototype.generateSoundElement = function(b) { + var a = Entry.createElement("sound", b.id); + b.view = a; + a.addClass("entryPlaygroundSoundElement"); + a.sound = b; + Entry.Utils.disableContextmenu(b.view); + $(b.view).on("contextmenu", function() { + Entry.ContextMenu.show([{text:Lang.Workspace.context_rename, callback:function() { + g.focus(); + }}, {text:Lang.Workspace.context_duplicate, callback:function() { + Entry.playground.addSound(b, !0); + }}, {text:Lang.Workspace.context_remove, callback:function() { + Entry.playground.object.removeSound(b.id) ? (Entry.removeElement(a), Entry.toast.success(Lang.Workspace.sound_remove_ok, b.name + " " + Lang.Workspace.sound_remove_ok_msg)) : Entry.toast.alert(Lang.Workspace.sound_remove_fail, ""); + Entry.removeElement(a); + }}], "workspace-contextmenu"); + }); + var c = Entry.createElement("div"); + c.addClass("entryPlaygroundSoundOrder"); + a.orderHolder = c; + a.appendChild(c); + var d = Entry.createElement("div"); + d.addClass("entryPlaygroundSoundThumbnail"); + d.addClass("entryPlaygroundSoundPlay"); + var e = !1, f; + d.addEventListener("click", function() { + e ? (e = !1, d.removeClass("entryPlaygroundSoundStop"), d.addClass("entryPlaygroundSoundPlay"), f.stop()) : (e = !0, d.removeClass("entryPlaygroundSoundPlay"), d.addClass("entryPlaygroundSoundStop"), f = createjs.Sound.play(b.id), f.addEventListener("complete", function(a) { + d.removeClass("entryPlaygroundSoundStop"); + d.addClass("entryPlaygroundSoundPlay"); + e = !1; + }), f.addEventListener("loop", function(a) { + }), f.addEventListener("failed", function(a) { + })); + }); + a.appendChild(d); + var g = Entry.createElement("input"); + g.addClass("entryPlaygroundSoundName"); + g.sound = b; + g.value = b.name; + var h = document.getElementsByClassName("entryPlaygroundSoundName"); + g.onblur = function() { + if ("" === this.value) { + alert("\uc774\ub984\uc744 \uc785\ub825\ud558\uc5ec \uc8fc\uc138\uc694."), this.focus(); + } else { + for (var a = 0, b = 0;b < h.length;b++) { + if (h[b].value == g.value && (a += 1, 1 < a)) { + alert("\uc774\ub984\uc774 \uc911\ubcf5 \ub418\uc5c8\uc2b5\ub2c8\ub2e4."); + this.focus(); + return; } } + this.sound.name = this.value; } }; - a._addControl = function(b) { - var a = this; - b.mousedown(function() { - a.onMouseDown.apply(a, arguments); - }); - b.bind("touchstart", function() { - a.onMouseDown.apply(a, arguments); - }); - b.on("mousewheel", function() { - a.mouseWheel.apply(a, arguments); - }); + g.onkeypress = function(a) { + 13 == a.keyCode && this.blur(); }; - a.onMouseDown = function(b) { - function a(b) { - b.stopPropagation(); - b.preventDefault(); - b.originalEvent.touches && (b = b.originalEvent.touches[0]); - var c = f.dragInstance; - f.scroller.scroll(b.pageX - c.offsetX, b.pageY - c.offsetY); - c.set({offsetX:b.pageX, offsetY:b.pageY}); - } - function d(b) { - $(document).unbind(".entryBoard"); - delete f.dragInstance; - } - b.originalEvent.touches && (b = b.originalEvent.touches[0]); - if (0 === b.button || b instanceof Touch) { - Entry.documentMousedown && Entry.documentMousedown.notify(b); - var e = $(document); - e.bind("mousemove.entryBoard", a); - e.bind("mouseup.entryBoard", d); - e.bind("touchmove.entryBoard", a); - e.bind("touchend.entryBoard", d); - this.dragInstance = new Entry.DragInstance({startX:b.pageX, startY:b.pageY, offsetX:b.pageX, offsetY:b.pageY}); + a.appendChild(g); + c = Entry.createElement("div"); + c.addClass("entryPlaygroundSoundLength"); + c.innerHTML = b.duration + " \ucd08"; + a.appendChild(c); +}; +Entry.Playground.prototype.toggleColourChooser = function(b) { + "foreground" === b ? "none" === this.coloursWrapper.style.display ? (this.coloursWrapper.style.display = "block", this.backgroundsWrapper.style.display = "none") : this.coloursWrapper.style.display = "none" : "background" === b && ("none" === this.backgroundsWrapper.style.display ? (this.backgroundsWrapper.style.display = "block", this.coloursWrapper.style.display = "none") : this.backgroundsWrapper.style.display = "none"); +}; +Entry.Playground.prototype.setTextColour = function(b) { + Entry.playground.object.entity.setColour(b); + Entry.playground.toggleColourChooser("foreground"); + $(".entryPlayground_fgColorDiv").css("backgroundColor", b); +}; +Entry.Playground.prototype.setBackgroundColour = function(b) { + Entry.playground.object.entity.setBGColour(b); + Entry.playground.toggleColourChooser("background"); + $(".entryPlayground_bgColorDiv").css("backgroundColor", b); +}; +Entry.Playground.prototype.isTextBGMode = function() { + return this.isTextBGMode_; +}; +Entry.Playground.prototype.checkVariables = function() { + Entry.forEBS || (Entry.variableContainer.lists_.length ? this.blockMenu.unbanClass("listNotExist") : this.blockMenu.banClass("listNotExist"), Entry.variableContainer.variables_.length ? this.blockMenu.unbanClass("variableNotExist") : this.blockMenu.banClass("variableNotExist")); +}; +Entry.Playground.prototype.getViewMode = function() { + return this.viewMode_; +}; +Entry.Playground.prototype.updateHW = function() { + var b = Entry.playground, a = b.mainWorkspace.blockMenu; + if (a) { + var c = Entry.hw; + c && c.connected ? (a.unbanClass("arduinoConnected"), a.banClass("arduinoDisconnected"), c.banHW(), c.hwModule && a.unbanClass(c.hwModule.name)) : (a.banClass("arduinoConnected"), a.unbanClass("arduinoDisconnected"), Entry.hw.banHW()); + b.object && a.reDraw(); + } +}; +Entry.Playground.prototype.toggleLineBreak = function(b) { + this.object && "textBox" == this.object.objectType && (b ? (Entry.playground.object.entity.setLineBreak(!0), $(".entryPlayground_textArea").css("display", "block"), $(".entryPlayground_textBox").css("display", "none"), this.linebreakOffImage.src = Entry.mediaFilePath + "text-linebreak-off-false.png", this.linebreakOnImage.src = Entry.mediaFilePath + "text-linebreak-on-true.png", this.fontSizeWrapper.removeClass("entryHide")) : (Entry.playground.object.entity.setLineBreak(!1), $(".entryPlayground_textArea").css("display", + "none"), $(".entryPlayground_textBox").css("display", "block"), this.linebreakOffImage.src = Entry.mediaFilePath + "text-linebreak-off-true.png", this.linebreakOnImage.src = Entry.mediaFilePath + "text-linebreak-on-false.png", this.fontSizeWrapper.addClass("entryHide"))); +}; +Entry.Playground.prototype.setFontAlign = function(b) { + if ("textBox" == this.object.objectType) { + this.alignLeftBtn.removeClass("toggle"); + this.alignCenterBtn.removeClass("toggle"); + this.alignRightBtn.removeClass("toggle"); + switch(b) { + case Entry.TEXT_ALIGN_LEFT: + this.alignLeftBtn.addClass("toggle"); + break; + case Entry.TEXT_ALIGN_CENTER: + this.alignCenterBtn.addClass("toggle"); + break; + case Entry.TEXT_ALIGN_RIGHT: + this.alignRightBtn.addClass("toggle"); } - var f = this; - b.stopPropagation(); - }; - a.mouseWheel = function(b) { - b = b.originalEvent; - this.scroller.scroll(b.wheelDeltaX || -b.deltaX, b.wheelDeltaY || -b.deltaY); - }; - a.setSelectedBlock = function(b) { - var a = this.selectedBlockView; - a && a.removeSelected(); - b instanceof Entry.BlockView ? b.addSelected() : b = null; - this.set({selectedBlockView:b}); - }; - a._keyboardControl = function(b, a) { - var d = this.selectedBlockView; - d && 46 == a.keyCode && d.block.doDestroyAlone(!0) && this.set({selectedBlockView:null}); - }; -})(Entry.Board.prototype); -Entry.Workspace = function(a, b) { - Entry.Model(this, !1); - a.workspace = this; - b.workspace = this; - this._blockMenu = a; - this._board = b; - this.svgGroup = a.snap.group(); - this._stopEvent = new Entry.Event(this); -}; -(function(a) { - a.getBoard = function() { - return this._board; - }; - a.getBlockMenu = function() { - return this._blockMenu; - }; - a.playAddBlock = function(b) { - var a = this, d; - b.cloneId ? (d = this._blockMenu.findById(b.cloneId)) || (d = this._board.findById(b.cloneId)) : d = this._blockMenu.findById(b.target); - if (d) { - if (b.dest.id) { - var e = this._board.findById(b.dest.id); - b.dest.x = this.getBlockMenu()._svgWidth + e.view.x; - b.dest.y = e.view.y + e.view.height; - } - var f = d.view, g = f.getBoard(); - g.set({dragBlock:f}); - d = g.cloneThread(); - b.cloneId = d; - (d = f.moveBoardBlockObserver) && d.destroy(); - d = b.dest.x; - e = b.dest.y; - f._moveTo(d, e, !0, b.duration - 300); - var h = this.getBoard().offset, k = this.getBlockMenu().offset, l = h.left - k.left, h = h.top - k.top; - this.getBoard().dragBlock._moveTo(d - l, e - h, !0, b.duration - 300); - setTimeout(function() { - f._align(!0); - var d = f._getCloseBlock(); - d ? g.setMagnetedBlock(d.view) : g.setMagnetedBlock(null); - f.terminateDrag(); - g && g.set({dragBoard:null}); - a._stopEvent.notify(b); - }, b.duration - 300); - } - }; - a.playMoveBlock = function(b) { - var a = this, d; - console.log("cloneId=", b.cloneId); - d = b.cloneId ? this._board.findById(b.cloneId) : this._board.findById(b.target); - if (b.dest.id) { - var e = this._board.findById(b.dest.id); - b.dest.x = this.getBlockMenu()._svgWidth + e.view.x; - b.dest.y = e.view.y + e.view.height; - } - var f = d.view, g = f.getBoard(); - g.set({dragBlock:f}); - (d = f.moveBoardBlockObserver) && d.destroy(); - d = b.dest.x; - e = b.dest.y; - f._moveTo(d, e, !0, b.duration - 300); - var h = this.getBoard().offset, k = this.getBlockMenu().offset; - f._moveTo(d - (h.left - k.left), e - (h.top - k.top), !0, b.duration - 300); - setTimeout(function() { - f._align(!0); - var d = f._getCloseBlock(); - d ? g.setMagnetedBlock(d.view) : g.setMagnetedBlock(null); - f.terminateDrag(); - g && g.set({dragBoard:null}); - a._stopEvent.notify(b); - }, b.duration - 300); - }; - a.moveMouse = function(b, a) { - }; - a.generateImage = function(b) { - var a = this.getBoard().svgDom[0], d = a.clientWidth / 2, a = a.clientHeight / 2; - this.svgGroup = this._board.snap.group(); - this.image = this.svgGroup.image(b, d, a, 30, 30); - }; -})(Entry.Workspace.prototype); + this.object.entity.setTextAlign(b); + } +}; +Entry.Playground.prototype.hideBlockMenu = function() { + this.mainWorkspace.getBlockMenu().hide(); +}; +Entry.Playground.prototype.showBlockMenu = function() { + this.mainWorkspace.getBlockMenu().show(); +}; Entry.Xml = {}; -Entry.Xml.isTypeOf = function(a, b) { - return b.getAttribute("type") == a; +Entry.Xml.isTypeOf = function(b, a) { + return a.getAttribute("type") == b; }; -Entry.Xml.getNextBlock = function(a) { - a = a.childNodes; - for (var b = 0;b < a.length;b++) { - if ("NEXT" == a[b].tagName.toUpperCase()) { - return a[b].children[0]; +Entry.Xml.getNextBlock = function(b) { + b = b.childNodes; + for (var a = 0;a < b.length;a++) { + if ("NEXT" == b[a].tagName.toUpperCase()) { + return b[a].children[0]; } } return null; }; -Entry.Xml.getStatementBlock = function(a, b) { - var c = b.getElementsByTagName("statement"); +Entry.Xml.getStatementBlock = function(b, a) { + var c = a.getElementsByTagName("statement"); if (!c.length) { - return b; + return a; } for (var d in c) { - if (c[d].getAttribute("name") == a) { + if (c[d].getAttribute("name") == b) { return c[d].children[0]; } } return null; }; -Entry.Xml.getParentLoop = function(a) { +Entry.Xml.getParentLoop = function(b) { for (;;) { - if (!a) { + if (!b) { return null; } - if ((a = a.parentNode) && "STATEMENT" == a.tagName.toUpperCase()) { - return a.parentNode; + if ((b = b.parentNode) && "STATEMENT" == b.tagName.toUpperCase()) { + return b.parentNode; } - if (a) { - a = a.parentNode; + if (b) { + b = b.parentNode; } else { return null; } } }; -Entry.Xml.getParentIterateLoop = function(a) { +Entry.Xml.getParentIterateLoop = function(b) { for (;;) { - if (!a) { + if (!b) { return null; } - if ((a = a.parentNode) && a.getAttribute("type") && "REPEAT" == a.getAttribute("type").toUpperCase().substr(0, 6)) { - return a; + if ((b = b.parentNode) && b.getAttribute("type") && "REPEAT" == b.getAttribute("type").toUpperCase().substr(0, 6)) { + return b; } - if (!a) { + if (!b) { return null; } } }; -Entry.Xml.getParentBlock = function(a) { - return (a = a.parentNode) ? a.parentNode : null; +Entry.Xml.getParentBlock = function(b) { + return (b = b.parentNode) ? b.parentNode : null; }; -Entry.Xml.callReturn = function(a) { - var b = Entry.Xml.getNextBlock(a); - return b ? b : Entry.Xml.getParentLoop(a); +Entry.Xml.callReturn = function(b) { + var a = Entry.Xml.getNextBlock(b); + return a ? a : Entry.Xml.getParentLoop(b); }; -Entry.Xml.isRootBlock = function(a) { +Entry.Xml.isRootBlock = function(b) { }; -Entry.Xml.getValue = function(a, b) { - var c = b.childNodes; +Entry.Xml.getValue = function(b, a) { + var c = a.childNodes; if (!c.length) { return null; } for (var d in c) { - if ("VALUE" == c[d].tagName.toUpperCase() && c[d].getAttribute("name") == a) { + if ("VALUE" == c[d].tagName.toUpperCase() && c[d].getAttribute("name") == b) { return c[d].children[0]; } } return null; }; -Entry.Xml.getNumberValue = function(a, b, c) { +Entry.Xml.getNumberValue = function(b, a, c) { c = c.childNodes; if (!c.length) { return null; } for (var d in c) { - if (c[d].tagName && "VALUE" == c[d].tagName.toUpperCase() && c[d].getAttribute("name") == b) { - return +Entry.Xml.operate(a, c[d].children[0]); + if (c[d].tagName && "VALUE" == c[d].tagName.toUpperCase() && c[d].getAttribute("name") == a) { + return Number(Entry.Xml.operate(b, c[d].children[0])); } } return null; }; -Entry.Xml.getField = function(a, b) { - var c = b.childNodes; +Entry.Xml.getField = function(b, a) { + var c = a.childNodes; if (!c.length) { return null; } for (var d in c) { - if (c[d].tagName && "FIELD" == c[d].tagName.toUpperCase() && c[d].getAttribute("name") == a) { + if (c[d].tagName && "FIELD" == c[d].tagName.toUpperCase() && c[d].getAttribute("name") == b) { return c[d].textContent; } } }; -Entry.Xml.getNumberField = function(a, b) { - var c = b.childNodes; +Entry.Xml.getNumberField = function(b, a) { + var c = a.childNodes; if (!c.length) { return null; } for (var d in c) { - if ("FIELD" == c[d].tagName.toUpperCase() && c[d].getAttribute("name") == a) { - return +c[d].textContent; + if ("FIELD" == c[d].tagName.toUpperCase() && c[d].getAttribute("name") == b) { + return Number(c[d].textContent); } } }; -Entry.Xml.getBooleanValue = function(a, b, c) { +Entry.Xml.getBooleanValue = function(b, a, c) { c = c.getElementsByTagName("value"); if (!c.length) { return null; } for (var d in c) { - if (c[d].getAttribute("name") == b) { - return Entry.Xml.operate(a, c[d].children[0]); + if (c[d].getAttribute("name") == a) { + return Entry.Xml.operate(b, c[d].children[0]); } } return null; }; -Entry.Xml.operate = function(a, b) { - return Entry.block[b.getAttribute("type")](a, b); +Entry.Xml.operate = function(b, a) { + return Entry.block[a.getAttribute("type")](b, a); }; -Entry.Xml.cloneBlock = function(a, b, c) { - var d = a.cloneNode(); - a.parentNode && "xml" != a.parentNode.tagName && Entry.Xml.cloneBlock(a.parentNode, d, "parent"); - for (var e = 0;e < a.childNodes.length;e++) { - var f = a.childNodes[e]; - f instanceof Text ? d.textContent = f.textContent : "parent" == c ? d.appendChild(b) : d.appendChild(Entry.Xml.cloneBlock(f, d, "child")); +Entry.Xml.cloneBlock = function(b, a, c) { + var d = b.cloneNode(); + b.parentNode && "xml" != b.parentNode.tagName && Entry.Xml.cloneBlock(b.parentNode, d, "parent"); + for (var e = 0;e < b.childNodes.length;e++) { + var f = b.childNodes[e]; + f instanceof Text ? d.textContent = f.textContent : "parent" == c ? d.appendChild(a) : d.appendChild(Entry.Xml.cloneBlock(f, d, "child")); } return d; }; -Entry.Youtube = function(a) { - this.generateView(a); +Entry.Youtube = function(b) { + this.generateView(b); }; p = Entry.Youtube.prototype; -p.init = function(a) { - this.youtubeHash = a; +p.init = function(b) { + this.youtubeHash = b; this.generateView(); }; -p.generateView = function(a) { - var b = Entry.createElement("div"); - b.addClass("entryContainerMovieWorkspace"); - b.addClass("entryHidden"); - this.movieContainer = b; - b = Entry.createElement("iframe"); - b.setAttribute("id", "youtubeIframe"); - b.setAttribute("allowfullscreen", ""); - b.setAttribute("frameborder", 0); - b.setAttribute("src", "https://www.youtube.com/embed/" + a); - this.movieFrame = b; - this.movieContainer.appendChild(b); +p.generateView = function(b) { + var a = Entry.createElement("div"); + a.addClass("entryContainerMovieWorkspace"); + a.addClass("entryHidden"); + this.movieContainer = a; + a = Entry.createElement("iframe"); + a.setAttribute("id", "youtubeIframe"); + a.setAttribute("allowfullscreen", ""); + a.setAttribute("frameborder", 0); + a.setAttribute("src", "https://www.youtube.com/embed/" + b); + this.movieFrame = a; + this.movieContainer.appendChild(a); }; p.getView = function() { return this.movieContainer; }; p.resize = function() { - var a = document.getElementById("entryContainerWorkspaceId"), b = document.getElementById("youtubeIframe"); - w = a.offsetWidth; - b.width = w + "px"; - b.height = 9 * w / 16 + "px"; + var b = document.getElementById("entryContainerWorkspaceId"), a = document.getElementById("youtubeIframe"); + w = b.offsetWidth; + a.width = w + "px"; + a.height = 9 * w / 16 + "px"; }; diff --git a/dist/entry.min.js b/dist/entry.min.js index c314f02a82..ff1f00556a 100644 --- a/dist/entry.min.js +++ b/dist/entry.min.js @@ -1,74 +1,74 @@ -var Entry={block:{},TEXT_ALIGN_CENTER:0,TEXT_ALIGN_LEFT:1,TEXT_ALIGN_RIGHT:2,TEXT_ALIGNS:["center","left","right"],loadProject:function(a){a||(a=Entry.getStartProject(Entry.mediaFilePath));"workspace"==this.type&&Entry.stateManager.startIgnore();Entry.projectId=a._id;Entry.variableContainer.setVariables(a.variables);Entry.variableContainer.setMessages(a.messages);Entry.variableContainer.setFunctions(a.functions);Entry.scene.addScenes(a.scenes);Entry.stage.initObjectContainers();Entry.container.setObjects(a.objects); -Entry.FPS=a.speed?a.speed:60;createjs.Ticker.setFPS(Entry.FPS);"workspace"==this.type&&Entry.stateManager.endIgnore();Entry.engine.projectTimer||Entry.variableContainer.generateTimer();0===Object.keys(Entry.container.inputValue).length&&Entry.variableContainer.generateAnswer();Entry.start();return a},exportProject:function(a){a||(a={});Entry.engine.isState("stop")||Entry.engine.toggleStop();Entry.Func&&Entry.Func.workspace&&Entry.Func.workspace.visible&&Entry.Func.cancelEdit();a.objects=Entry.container.toJSON(); -a.scenes=Entry.scene.toJSON();a.variables=Entry.variableContainer.getVariableJSON();a.messages=Entry.variableContainer.getMessageJSON();a.functions=Entry.variableContainer.getFunctionJSON();a.scenes=Entry.scene.toJSON();a.speed=Entry.FPS;return a},setBlockByText:function(a,b){for(var c=[],d=jQuery.parseXML(b).getElementsByTagName("category"),e=0;eb?b=325:720b?b=244:400svg").css({width:b-64+"px"});$(".entryBlocklyWorkspace").css({left:b+ -"px"});Entry.playground.resizeHandle_.style.left=b+"px";Entry.playground.variableViewWrapper_.style.width=b+"px";this.interfaceState=a}Blockly.fireUiEvent(window,"resize")},getUpTime:function(){return(new Date).getTime()-this.startTime},addActivity:function(a){Entry.stateManager&&Entry.stateManager.addActivity(a)},startActivityLogging:function(){Entry.reporter&&Entry.reporter.start(Entry.projectId,window.user?window.user._id:null,Entry.startTime)},getActivityLog:function(){var a={};Entry.stateManager&& -(a.activityLog=Entry.stateManager.activityLog_);return a},DRAG_MODE_NONE:0,DRAG_MODE_MOUSEDOWN:1,DRAG_MODE_DRAG:2,cancelObjectEdit:function(a){var b=Entry.playground.object;if(b){var c=a.target;a=0!==$(b.view_).find(c).length;c=c.tagName.toUpperCase();!b.isEditing||"INPUT"===c&&a||b.editObjectValues(!1)}}};window.Entry=Entry;Entry.Albert={PORT_MAP:{leftWheel:0,rightWheel:0,buzzer:0,leftEye:0,rightEye:0,note:0,bodyLed:0,frontLed:0,padWidth:0,padHeight:0},setZero:function(){var a=Entry.Albert.PORT_MAP,b=Entry.hw.sendQueue,c;for(c in a)b[c]=a[c];Entry.hw.update();a=Entry.Albert;a.tempo=60;a.removeAllTimeouts()},monitorTemplate:{imgPath:"hw/albert.png",width:387,height:503,listPorts:{oid:{name:"OID",type:"input",pos:{x:0,y:0}},buzzer:{name:Lang.Hw.buzzer,type:"output",pos:{x:0,y:0}},note:{name:Lang.Hw.note,type:"output", +Entry={block:{},TEXT_ALIGN_CENTER:0,TEXT_ALIGN_LEFT:1,TEXT_ALIGN_RIGHT:2,TEXT_ALIGNS:["center","left","right"],clipboard:null,loadProject:function(b){b||(b=Entry.getStartProject(Entry.mediaFilePath));"workspace"==this.type&&Entry.stateManager.startIgnore();Entry.projectId=b._id;Entry.variableContainer.setVariables(b.variables);Entry.variableContainer.setMessages(b.messages);Entry.scene.addScenes(b.scenes);Entry.stage.initObjectContainers();Entry.variableContainer.setFunctions(b.functions);Entry.container.setObjects(b.objects); +Entry.FPS=b.speed?b.speed:60;createjs.Ticker.setFPS(Entry.FPS);"workspace"==this.type&&Entry.stateManager.endIgnore();Entry.engine.projectTimer||Entry.variableContainer.generateTimer();0===Object.keys(Entry.container.inputValue).length&&Entry.variableContainer.generateAnswer();Entry.start();return b},exportProject:function(b){b||(b={});Entry.engine.isState("stop")||Entry.engine.toggleStop();Entry.Func&&Entry.Func.workspace&&Entry.Func.workspace.visible&&Entry.Func.cancelEdit();b.objects=Entry.container.toJSON(); +b.scenes=Entry.scene.toJSON();b.variables=Entry.variableContainer.getVariableJSON();b.messages=Entry.variableContainer.getMessageJSON();b.functions=Entry.variableContainer.getFunctionJSON();b.scenes=Entry.scene.toJSON();b.speed=Entry.FPS;return b},setBlockByText:function(b,a){for(var c=[],d=jQuery.parseXML(a).getElementsByTagName("category"),e=0;ea?a=325:720a?a=244:400svg").css({width:a-64+"px"});Entry.playground.mainWorkspace.blockMenu.setWidth(); +$(".entryWorkspaceBoard").css({left:a+"px"});Entry.playground.resizeHandle_.style.left=a+"px";Entry.playground.variableViewWrapper_.style.width=a+"px";this.interfaceState=b}Entry.windowResized.notify()},getUpTime:function(){return(new Date).getTime()-this.startTime},addActivity:function(b){Entry.stateManager&&Entry.stateManager.addActivity(b)},startActivityLogging:function(){Entry.reporter&&Entry.reporter.start(Entry.projectId,window.user?window.user._id:null,Entry.startTime)},getActivityLog:function(){var b= +{};Entry.stateManager&&(b.activityLog=Entry.stateManager.activityLog_);return b},DRAG_MODE_NONE:0,DRAG_MODE_MOUSEDOWN:1,DRAG_MODE_DRAG:2,cancelObjectEdit:function(b){var a=Entry.playground.object;if(a){var c=b.target;b=0!==$(a.view_).find(c).length;c=c.tagName.toUpperCase();!a.isEditing||"INPUT"===c&&b||a.editObjectValues(!1)}}};window.Entry=Entry;Entry.Albert={PORT_MAP:{leftWheel:0,rightWheel:0,buzzer:0,leftEye:0,rightEye:0,note:0,bodyLed:0,frontLed:0,padWidth:0,padHeight:0},setZero:function(){var b=Entry.Albert.PORT_MAP,a=Entry.hw.sendQueue,c;for(c in b)a[c]=b[c];Entry.hw.update();b=Entry.Albert;b.tempo=60;b.removeAllTimeouts()},monitorTemplate:{imgPath:"hw/albert.png",width:387,height:503,listPorts:{oid:{name:"OID",type:"input",pos:{x:0,y:0}},buzzer:{name:Lang.Hw.buzzer,type:"output",pos:{x:0,y:0}},note:{name:Lang.Hw.note,type:"output", pos:{x:0,y:0}}},ports:{leftProximity:{name:Lang.Blocks.ALBERT_sensor_leftProximity,type:"input",pos:{x:178,y:401}},rightProximity:{name:Lang.Blocks.ALBERT_sensor_rightProximity,type:"input",pos:{x:66,y:359}},battery:{name:Lang.Blocks.ALBERT_sensor_battery,type:"input",pos:{x:88,y:368}},light:{name:Lang.Blocks.ALBERT_sensor_light,type:"input",pos:{x:127,y:391}},leftWheel:{name:Lang.Hw.leftWheel,type:"output",pos:{x:299,y:406}},rightWheel:{name:Lang.Hw.rightWheel,type:"output",pos:{x:22,y:325}},leftEye:{name:Lang.Hw.leftEye, -type:"output",pos:{x:260,y:26}},rightEye:{name:Lang.Hw.rightEye,type:"output",pos:{x:164,y:13}},bodyLed:{name:Lang.Hw.body+" "+Lang.Hw.led,type:"output",pos:{x:367,y:308}},frontLed:{name:Lang.Hw.front+" "+Lang.Hw.led,pos:{x:117,y:410}}},mode:"both"},tempo:60,timeouts:[],removeTimeout:function(a){clearTimeout(a);var b=this.timeouts;a=b.indexOf(a);0<=a&&b.splice(a,1)},removeAllTimeouts:function(){var a=this.timeouts,b;for(b in a)clearTimeout(a[b]);this.timeouts=[]},name:"albert"}; -Blockly.Blocks.albert_hand_found={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ALBERT_hand_found);this.setOutput(!0,"Boolean");this.setInputsInline(!0)}};Entry.block.albert_hand_found=function(a,b){var c=Entry.hw.portData;return 40Entry.Albert.tempo&&(Entry.Albert.tempo=1);return b.callReturn()}; +Entry.block.albert_change_tempo_by=function(b,a){Entry.Albert.tempo+=a.getNumberValue("VALUE");1>Entry.Albert.tempo&&(Entry.Albert.tempo=1);return a.callReturn()}; Blockly.Blocks.albert_set_tempo_to={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ALBERT_set_tempo_to_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.ALBERT_set_tempo_to_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.albert_set_tempo_to=function(a,b){Entry.Albert.tempo=b.getNumberValue("VALUE");1>Entry.Albert.tempo&&(Entry.Albert.tempo=1);return b.callReturn()};Blockly.Blocks.albert_move_forward={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_move_forward).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.albert_move_forward=function(a,b){var c=Entry.hw.sendQueue;if(b.isStart){if(1==b.timeFlag)return b;delete b.timeFlag;delete b.isStart;Entry.engine.isContinue=!1;c.leftWheel=0;c.rightWheel=0;return b.callReturn()}b.isStart=!0;b.timeFlag=1;c.leftWheel=30;c.rightWheel=30;setTimeout(function(){b.timeFlag=0},1E3);return b}; +Entry.block.albert_set_tempo_to=function(b,a){Entry.Albert.tempo=a.getNumberValue("VALUE");1>Entry.Albert.tempo&&(Entry.Albert.tempo=1);return a.callReturn()};Blockly.Blocks.albert_move_forward={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_move_forward).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; +Entry.block.albert_move_forward=function(b,a){var c=Entry.hw.sendQueue;if(a.isStart){if(1==a.timeFlag)return a;delete a.timeFlag;delete a.isStart;Entry.engine.isContinue=!1;c.leftWheel=0;c.rightWheel=0;return a.callReturn()}a.isStart=!0;a.timeFlag=1;c.leftWheel=30;c.rightWheel=30;setTimeout(function(){a.timeFlag=0},1E3);return a}; Blockly.Blocks.albert_move_backward={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_move_backward).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.albert_move_backward=function(a,b){var c=Entry.hw.sendQueue;if(b.isStart){if(1==b.timeFlag)return c.leftWheel=-30,c.rightWheel=-30,b;delete b.timeFlag;delete b.isStart;Entry.engine.isContinue=!1;c.leftWheel=0;c.rightWheel=0;return b.callReturn()}b.isStart=!0;b.timeFlag=1;setTimeout(function(){b.timeFlag=0},1E3);return b}; +Entry.block.albert_move_backward=function(b,a){var c=Entry.hw.sendQueue;if(a.isStart){if(1==a.timeFlag)return c.leftWheel=-30,c.rightWheel=-30,a;delete a.timeFlag;delete a.isStart;Entry.engine.isContinue=!1;c.leftWheel=0;c.rightWheel=0;return a.callReturn()}a.isStart=!0;a.timeFlag=1;setTimeout(function(){a.timeFlag=0},1E3);return a}; Blockly.Blocks.albert_turn_around={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_turn_around_1).appendField(new Blockly.FieldDropdown([[Lang.General.left,"LEFT"],[Lang.General.right,"RIGHT"]]),"DIRECTION").appendField(Lang.Blocks.HAMSTER_turn_around_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.albert_turn_around=function(a,b){var c=Entry.hw.sendQueue;if(b.isStart){if(1==b.timeFlag)return c.leftWheel=b.leftValue,c.rightWheel=b.rightValue,b;delete b.timeFlag;delete b.isStart;delete b.leftValue;delete b.rightValue;Entry.engine.isContinue=!1;c.leftWheel=0;c.rightWheel=0;return b.callReturn()}c="LEFT"==b.getField("DIRECTION",b);b.leftValue=c?-30:30;b.rightValue=c?30:-30;b.isStart=!0;b.timeFlag=1;setTimeout(function(){b.timeFlag=0},1E3);return b}; +Entry.block.albert_turn_around=function(b,a){var c=Entry.hw.sendQueue;if(a.isStart){if(1==a.timeFlag)return c.leftWheel=a.leftValue,c.rightWheel=a.rightValue,a;delete a.timeFlag;delete a.isStart;delete a.leftValue;delete a.rightValue;Entry.engine.isContinue=!1;c.leftWheel=0;c.rightWheel=0;return a.callReturn()}c="LEFT"==a.getField("DIRECTION",a);a.leftValue=c?-30:30;a.rightValue=c?30:-30;a.isStart=!0;a.timeFlag=1;setTimeout(function(){a.timeFlag=0},1E3);return a}; Blockly.Blocks.albert_set_led_to={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_set_led_to_1).appendField(new Blockly.FieldDropdown([[Lang.General.left,"LEFT"],[Lang.General.right,"RIGHT"],[Lang.General.both,"FRONT"]]),"DIRECTION").appendField(Lang.Blocks.ALBERT_set_led_to_2).appendField(new Blockly.FieldDropdown([[Lang.General.red,"4"],[Lang.General.yellow,"6"],[Lang.General.green,"2"],[Lang.General.skyblue,"3"],[Lang.General.blue,"1"],[Lang.General.purple, -"5"],[Lang.General.white,"7"]]),"COLOR").appendField(Lang.Blocks.HAMSTER_set_led_to_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.albert_set_led_to=function(a,b){var c=Entry.hw.sendQueue,d=b.getField("DIRECTION",b),e=+b.getField("COLOR",b);"FRONT"==d?(c.leftEye=e,c.rightEye=e):"LEFT"==d?c.leftEye=e:c.rightEye=e;return b.callReturn()}; +"5"],[Lang.General.white,"7"]]),"COLOR").appendField(Lang.Blocks.HAMSTER_set_led_to_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.albert_set_led_to=function(b,a){var c=Entry.hw.sendQueue,d=a.getField("DIRECTION",a),e=Number(a.getField("COLOR",a));"FRONT"==d?(c.leftEye=e,c.rightEye=e):"LEFT"==d?c.leftEye=e:c.rightEye=e;return a.callReturn()}; Blockly.Blocks.albert_clear_led={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_clear_led_1).appendField(new Blockly.FieldDropdown([[Lang.General.left,"LEFT"],[Lang.General.right,"RIGHT"],[Lang.General.both,"FRONT"]]),"DIRECTION").appendField(Lang.Blocks.ALBERT_clear_led_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.albert_clear_led=function(a,b){var c=Entry.hw.sendQueue,d=b.getField("DIRECTION",b);"FRONT"==d?(c.leftEye=0,c.rightEye=0):"LEFT"==d?c.leftEye=0:c.rightEye=0;return b.callReturn()}; +Entry.block.albert_clear_led=function(b,a){var c=Entry.hw.sendQueue,d=a.getField("DIRECTION",a);"FRONT"==d?(c.leftEye=0,c.rightEye=0):"LEFT"==d?c.leftEye=0:c.rightEye=0;return a.callReturn()}; Blockly.Blocks.albert_change_wheels_by={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_change_wheels_by_1).appendField(new Blockly.FieldDropdown([[Lang.General.left,"LEFT"],[Lang.General.right,"RIGHT"],[Lang.General.both,"FRONT"]]),"DIRECTION").appendField(Lang.Blocks.HAMSTER_change_wheels_by_2);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_change_wheels_by_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.albert_change_wheels_by=function(a,b){var c=Entry.hw.sendQueue,d=Entry.hw.portData,e=b.getField("DIRECTION"),f=b.getNumberValue("VALUE");"LEFT"==e?c.leftWheel=void 0!=c.leftWheel?c.leftWheel+f:d.leftWheel+f:("RIGHT"!=e&&(c.leftWheel=void 0!=c.leftWheel?c.leftWheel+f:d.leftWheel+f),c.rightWheel=void 0!=c.rightWheel?c.rightWheel+f:d.rightWheel+f);return b.callReturn()}; +"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.albert_change_wheels_by=function(b,a){var c=Entry.hw.sendQueue,d=Entry.hw.portData,e=a.getField("DIRECTION"),f=a.getNumberValue("VALUE");"LEFT"==e?c.leftWheel=void 0!=c.leftWheel?c.leftWheel+f:d.leftWheel+f:("RIGHT"!=e&&(c.leftWheel=void 0!=c.leftWheel?c.leftWheel+f:d.leftWheel+f),c.rightWheel=void 0!=c.rightWheel?c.rightWheel+f:d.rightWheel+f);return a.callReturn()}; Blockly.Blocks.albert_set_wheels_to={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_set_wheels_to_1).appendField(new Blockly.FieldDropdown([[Lang.General.left,"LEFT"],[Lang.General.right,"RIGHT"],[Lang.General.both,"FRONT"]]),"DIRECTION").appendField(Lang.Blocks.HAMSTER_set_wheels_to_2);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_set_wheels_to_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.albert_set_wheels_to=function(a,b){var c=Entry.hw.sendQueue,d=b.getField("DIRECTION"),e=b.getNumberValue("VALUE");"LEFT"==d?c.leftWheel=e:("RIGHT"!=d&&(c.leftWheel=e),c.rightWheel=e);return b.callReturn()};Entry.Arduino={name:"arduino",setZero:function(){Entry.hw.sendQueue.readablePorts=[];for(var a=0;20>a;a++)Entry.hw.sendQueue[a]=0,Entry.hw.sendQueue.readablePorts.push(a);Entry.hw.update()},monitorTemplate:{imgPath:"hw/arduino.png",width:605,height:434,listPorts:{2:{name:Lang.Hw.port_en+" 2 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},3:{name:Lang.Hw.port_en+" 3 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},4:{name:Lang.Hw.port_en+" 4 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},5:{name:Lang.Hw.port_en+ +"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.albert_set_wheels_to=function(b,a){var c=Entry.hw.sendQueue,d=a.getField("DIRECTION"),e=a.getNumberValue("VALUE");"LEFT"==d?c.leftWheel=e:("RIGHT"!=d&&(c.leftWheel=e),c.rightWheel=e);return a.callReturn()};Entry.Arduino={name:"arduino",setZero:function(){Entry.hw.sendQueue.readablePorts=[];for(var b=0;20>b;b++)Entry.hw.sendQueue[b]=0,Entry.hw.sendQueue.readablePorts.push(b);Entry.hw.update()},monitorTemplate:{imgPath:"hw/arduino.png",width:605,height:434,listPorts:{2:{name:Lang.Hw.port_en+" 2 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},3:{name:Lang.Hw.port_en+" 3 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},4:{name:Lang.Hw.port_en+" 4 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},5:{name:Lang.Hw.port_en+ " 5 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},6:{name:Lang.Hw.port_en+" 6 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},7:{name:Lang.Hw.port_en+" 7 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},8:{name:Lang.Hw.port_en+" 8 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},9:{name:Lang.Hw.port_en+" 9 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},10:{name:Lang.Hw.port_en+" 10 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},11:{name:Lang.Hw.port_en+" 11 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},12:{name:Lang.Hw.port_en+ " 12 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},13:{name:Lang.Hw.port_en+" 13 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},a0:{name:Lang.Hw.port_en+" A0 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},a1:{name:Lang.Hw.port_en+" A1 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},a2:{name:Lang.Hw.port_en+" A2 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},a3:{name:Lang.Hw.port_en+" A3 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},a4:{name:Lang.Hw.port_en+" A4 "+Lang.Hw.port_ko,type:"input",pos:{x:0, y:0}},a5:{name:Lang.Hw.port_en+" A5 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}}},mode:"both"}}; @@ -76,404 +76,425 @@ Entry.SensorBoard={name:"sensorBoard",setZero:Entry.Arduino.setZero,monitorTempl pos:{x:0,y:0}},a4:{name:Lang.Hw.port_en+" A4 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},a5:{name:Lang.Hw.port_en+" A5 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},6:{name:Lang.Hw.port_en+" 6 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},7:{name:Lang.Hw.port_en+" 7 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},12:{name:Lang.Hw.port_en+" 12 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},13:{name:Lang.Hw.port_en+" 13 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}}},ports:{0:{name:Lang.Hw.light+" "+ Lang.Hw.sensor+"2",type:"input",pos:{x:116,y:330}},slider:{name:Lang.Blocks.CODEino_sensor_name_2,type:"input",pos:{x:230,y:47}},1:{name:Lang.Hw.temp,type:"input",pos:{x:310,y:332}},8:{name:Lang.Hw.right_ko+Lang.Hw.switch_+Lang.Hw.right_en,type:"input",pos:{x:273,y:205}},9:{name:Lang.Hw.left_ko+Lang.Hw.switch_+Lang.Hw.left_en,type:"input",pos:{x:112,y:155}},10:{name:Lang.Hw.up_ko+Lang.Hw.switch_+Lang.Hw.up_en,type:"input",pos:{x:188,y:83}},11:{name:Lang.Hw.down_ko+Lang.Hw.switch_+Lang.Hw.down_en, type:"input",pos:{x:196,y:281}}},mode:"both"}};Entry.dplay={name:"dplay",setZero:Entry.Arduino.setZero};Entry.nemoino={name:"nemoino",setZero:Entry.Arduino.setZero};Entry.CODEino={name:"CODEino",setZero:Entry.Arduino.setZero,monitorTemplate:Entry.Arduino.monitorTemplate};Blockly.Blocks.arduino_text={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(new Blockly.FieldTextInput("Arduino"),"NAME");this.setOutput(!0,"String");this.setInputsInline(!0)}}; -Entry.block.arduino_text=function(a,b){return b.getStringField("NAME")};Blockly.Blocks.arduino_send={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_arduino_send_1);this.appendValueInput("VALUE").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_arduino_send_2);this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.arduino_send=function(a,b){var c=b.getValue("VALUE",b),d=new XMLHttpRequest;d.open("POST","http://localhost:23518/arduino/",!1);d.send(String(c));Entry.assert(200==d.status,"arduino is not connected");return b.callReturn()}; +Entry.block.arduino_text=function(b,a){return a.getStringField("NAME")};Blockly.Blocks.arduino_send={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_arduino_send_1);this.appendValueInput("VALUE").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_arduino_send_2);this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; +Entry.block.arduino_send=function(b,a){var c=a.getValue("VALUE",a),d=new XMLHttpRequest;d.open("POST","http://localhost:23518/arduino/",!1);d.send(String(c));Entry.assert(200==d.status,"arduino is not connected");return a.callReturn()}; Blockly.Blocks.arduino_get_string={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_arduino_get_string_1);this.appendValueInput("VALUE").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_arduino_get_string_2);this.setOutput(!0,"String");this.setInputsInline(!0)}}; -Entry.block.arduino_get_number=function(a,b){var c=b.getValue("VALUE",b),d=new XMLHttpRequest;d.open("POST","http://localhost:23518/arduino/",!1);d.send(String(c));Entry.assert(200==d.status,"arduino is not connected");return+d.responseText}; +Entry.block.arduino_get_number=function(b,a){var c=a.getValue("VALUE",a),d=new XMLHttpRequest;d.open("POST","http://localhost:23518/arduino/",!1);d.send(String(c));Entry.assert(200==d.status,"arduino is not connected");return Number(d.responseText)}; Blockly.Blocks.arduino_get_number={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_arduino_get_number_1);this.appendValueInput("VALUE").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_arduino_get_number_2);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.arduino_get_string=function(a,b){var c=b.getValue("VALUE",b),d=new XMLHttpRequest;d.open("POST","http://localhost:23518/arduino/",!1);d.send(String(c));Entry.assert(200==d.status,"arduino is not connected");return d.responseText}; +Entry.block.arduino_get_string=function(b,a){var c=a.getValue("VALUE",a),d=new XMLHttpRequest;d.open("POST","http://localhost:23518/arduino/",!1);d.send(String(c));Entry.assert(200==d.status,"arduino is not connected");return d.responseText}; Blockly.Blocks.arduino_get_sensor_number={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.ARDUINO_arduino_get_sensor_number_0,"A0"],[Lang.Blocks.ARDUINO_arduino_get_sensor_number_1,"A1"],[Lang.Blocks.ARDUINO_arduino_get_sensor_number_2,"A2"],[Lang.Blocks.ARDUINO_arduino_get_sensor_number_3,"A3"],[Lang.Blocks.ARDUINO_arduino_get_sensor_number_4,"A4"],[Lang.Blocks.ARDUINO_arduino_get_sensor_number_5,"A5"]]),"PORT");this.appendDummyInput().appendField(" "); -this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.arduino_get_sensor_number=function(a,b){return b.getStringField("PORT")}; -Blockly.Blocks.arduino_get_port_number={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"]]),"PORT");this.appendDummyInput().appendField(" ");this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.arduino_get_port_number=function(a,b){return b.getStringField("PORT")}; -Blockly.Blocks.arduino_get_pwm_port_number={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["3","3"],["5","5"],["6","6"],["9","9"],["10","10"],["11","11"]]),"PORT");this.appendDummyInput().appendField(" ");this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.arduino_get_pwm_port_number=function(a,b){return b.getStringField("PORT")}; -Blockly.Blocks.arduino_get_number_sensor_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_num_sensor_value_1);this.appendValueInput("VALUE").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_num_sensor_value_2).appendField(" ");this.setInputsInline(!0);this.setOutput(!0,"Number")}};Entry.block.arduino_get_number_sensor_value=function(a,b){var c=b.getValue("VALUE",b);return Entry.hw.getAnalogPortValue(c[1])}; -Blockly.Blocks.arduino_get_digital_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_get_digital_value_1);this.appendValueInput("VALUE").setCheck("Number");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_num_sensor_value_2).appendField(" ");this.setInputsInline(!0);this.setOutput(!0,"Boolean")}};Entry.block.arduino_get_digital_value=function(a,b){var c=b.getNumberValue("VALUE",b);return Entry.hw.getDigitalPortValue(c)}; +this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.arduino_get_sensor_number=function(b,a){return a.getStringField("PORT")}; +Blockly.Blocks.arduino_get_port_number={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"]]),"PORT");this.appendDummyInput().appendField(" ");this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.arduino_get_port_number=function(b,a){return a.getStringField("PORT")}; +Blockly.Blocks.arduino_get_pwm_port_number={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["3","3"],["5","5"],["6","6"],["9","9"],["10","10"],["11","11"]]),"PORT");this.appendDummyInput().appendField(" ");this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.arduino_get_pwm_port_number=function(b,a){return a.getStringField("PORT")}; +Blockly.Blocks.arduino_get_number_sensor_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_num_sensor_value_1);this.appendValueInput("VALUE").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_num_sensor_value_2).appendField(" ");this.setInputsInline(!0);this.setOutput(!0,"Number")}};Entry.block.arduino_get_number_sensor_value=function(b,a){var c=a.getValue("VALUE",a);return Entry.hw.getAnalogPortValue(c[1])}; +Blockly.Blocks.arduino_get_digital_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_get_digital_value_1);this.appendValueInput("VALUE").setCheck("Number");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_num_sensor_value_2).appendField(" ");this.setInputsInline(!0);this.setOutput(!0,"Boolean")}};Entry.block.arduino_get_digital_value=function(b,a){var c=a.getNumberValue("VALUE",a);return Entry.hw.getDigitalPortValue(c)}; Blockly.Blocks.arduino_toggle_led={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_num_pin_1);this.appendValueInput("VALUE").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_num_pin_2);this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.ARDUINO_on,"on"],[Lang.Blocks.ARDUINO_off,"off"]]),"OPERATOR").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*")); -this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.arduino_toggle_led=function(a,b){var c=b.getNumberValue("VALUE"),d="on"==b.getField("OPERATOR")?255:0;Entry.hw.setDigitalPortValue(c,d);return b.callReturn()}; +this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.arduino_toggle_led=function(b,a){var c=a.getNumberValue("VALUE"),d=a.getField("OPERATOR");Entry.hw.setDigitalPortValue(c,"on"==d?255:0);return a.callReturn()}; Blockly.Blocks.arduino_toggle_pwm={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_toggle_pwm_1);this.appendValueInput("PORT").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_toggle_pwm_2);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_toggle_pwm_3);this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png", -"*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.arduino_toggle_pwm=function(a,b){var c=b.getNumberValue("PORT"),d=b.getNumberValue("VALUE"),d=Math.round(d),d=Math.max(d,0),d=Math.min(d,255);Entry.hw.setDigitalPortValue(c,d);return b.callReturn()}; +"*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.arduino_toggle_pwm=function(b,a){var c=a.getNumberValue("PORT"),d=a.getNumberValue("VALUE"),d=Math.round(d),d=Math.max(d,0),d=Math.min(d,255);Entry.hw.setDigitalPortValue(c,d);return a.callReturn()}; Blockly.Blocks.arduino_convert_scale={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_convert_scale_1);this.appendValueInput("VALUE1").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_convert_scale_2);this.appendValueInput("VALUE2").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_convert_scale_3);this.appendValueInput("VALUE3").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_convert_scale_4); this.appendValueInput("VALUE4").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_convert_scale_5);this.appendValueInput("VALUE5").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_convert_scale_6);this.appendDummyInput().appendField(" ");this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.arduino_convert_scale=function(a,b){var c=b.getNumberValue("VALUE1",b),d=b.getNumberValue("VALUE2",b),e=b.getNumberValue("VALUE3",b),f=b.getNumberValue("VALUE4",b),g=b.getNumberValue("VALUE5",b);if(d>e)var h=d,d=e,e=h;f>g&&(h=f,f=g,g=h);c-=d;c*=(g-f)/(e-d);c+=f;c=Math.min(g,c);c=Math.max(f,c);return Math.round(c)}; -Blockly.Blocks.sensorBoard_get_named_sensor_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("").appendField(new Blockly.FieldDropdown([["\uc18c\ub9ac","0"],["\ube5b \uac10\uc9c0","1"],["\uc2ac\ub77c\uc774\ub354","2"],["\uc628\ub3c4","3"]]),"PORT").appendField(" \uc13c\uc11c\uac12");this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.sensorBoard_get_named_sensor_value=function(a,b){return Entry.hw.getAnalogPortValue(b.getField("PORT",b))}; +Entry.block.arduino_convert_scale=function(b,a){var c=a.getNumberValue("VALUE1",a),d=a.getNumberValue("VALUE2",a),e=a.getNumberValue("VALUE3",a),f=a.getNumberValue("VALUE4",a),g=a.getNumberValue("VALUE5",a);if(d>e)var h=d,d=e,e=h;f>g&&(h=f,f=g,g=h);c-=d;c*=(g-f)/(e-d);c+=f;c=Math.min(g,c);c=Math.max(f,c);return Math.round(c)}; +Blockly.Blocks.sensorBoard_get_named_sensor_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("").appendField(new Blockly.FieldDropdown([["\uc18c\ub9ac","0"],["\ube5b \uac10\uc9c0","1"],["\uc2ac\ub77c\uc774\ub354","2"],["\uc628\ub3c4","3"]]),"PORT").appendField(" \uc13c\uc11c\uac12");this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.sensorBoard_get_named_sensor_value=function(b,a){return Entry.hw.getAnalogPortValue(a.getField("PORT",a))}; Blockly.Blocks.sensorBoard_is_button_pressed={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("").appendField(new Blockly.FieldDropdown([["\ube68\uac04","8"],["\ud30c\ub780","9"],["\ub178\ub780","10"],["\ucd08\ub85d","11"]]),"PORT");this.appendDummyInput().appendField(" \ubc84\ud2bc\uc744 \ub20c\ub800\ub294\uac00?");this.setInputsInline(!0);this.setOutput(!0,"Boolean")}}; -Entry.block.sensorBoard_is_button_pressed=function(a,b){return Entry.hw.getDigitalPortValue(b.getNumberField("PORT",b))}; +Entry.block.sensorBoard_is_button_pressed=function(b,a){return Entry.hw.getDigitalPortValue(a.getNumberField("PORT",a))}; Blockly.Blocks.sensorBoard_led={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("").appendField(new Blockly.FieldDropdown([["\ube68\uac04","2"],["\ucd08\ub85d","3"],["\ud30c\ub780","4"],["\ud770\uc0c9","5"]]),"PORT").appendField(" LED").appendField(new Blockly.FieldDropdown([["\ucf1c\uae30","255"],["\ub044\uae30","0"]]),"OPERATOR").appendField(" ").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0); -this.setNextStatement(!0)}};Entry.block.sensorBoard_led=function(a,b){Entry.hw.setDigitalPortValue(b.getField("PORT"),b.getNumberField("OPERATOR"));return b.callReturn()}; +this.setNextStatement(!0)}};Entry.block.sensorBoard_led=function(b,a){Entry.hw.setDigitalPortValue(a.getField("PORT"),a.getNumberField("OPERATOR"));return a.callReturn()};Entry.block.arduino_download_connector={skeleton:"basic_button",color:"#eee",template:"%1",params:[{type:"Text",text:"\uc5f0\uacb0 \ud504\ub85c\uadf8\ub7a8 \ub2e4\uc6b4\ub85c\ub4dc",color:"#333",align:"center"}],func:function(){},events:{mousedown:[function(){console.log("download connector")}]}}; +Entry.block.arduino_download_source={skeleton:"basic_button",color:"#eee",template:"%1",params:[{type:"Text",text:"\uc5d4\ud2b8\ub9ac \uc544\ub450\uc774\ub178 \uc18c\uc2a4",color:"#333",align:"center"}],func:function(){},events:{mousedown:[function(){console.log("download source")}]}};Entry.block.arduino_connected={skeleton:"basic_button",color:"#eee",template:"%1",params:[{type:"Text",text:"\uc5f0\uacb0 \ub428",color:"#333",align:"center"}],func:function(){},events:{mousedown:[function(){console.log("download source")}]}}; +Entry.block.arduino_reconnect={skeleton:"basic_button",color:"#eee",template:"%1",params:[{type:"Text",text:"\ub2e4\uc2dc \uc5f0\uacb0\ud558\uae30",color:"#333",align:"center"}],func:function(){},events:{mousedown:[function(){console.log("download source")}]}}; Blockly.Blocks.CODEino_get_sensor_number={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.CODEino_get_sensor_number_0,"A0"],[Lang.Blocks.CODEino_get_sensor_number_1,"A1"],[Lang.Blocks.CODEino_get_sensor_number_2,"A2"],[Lang.Blocks.CODEino_get_sensor_number_3,"A3"],[Lang.Blocks.CODEino_get_sensor_number_4,"A4"],[Lang.Blocks.CODEino_get_sensor_number_5,"A5"],[Lang.Blocks.CODEino_get_sensor_number_6,"A6"]]),"PORT");this.appendDummyInput().appendField(" "); -this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.CODEino_get_sensor_number=function(a,b){return b.getStringField("PORT")}; +this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.CODEino_get_sensor_number=function(b,a){return a.getStringField("PORT")}; Blockly.Blocks.CODEino_get_named_sensor_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(" ").appendField(new Blockly.FieldDropdown([[Lang.Blocks.CODEino_sensor_name_0,"0"],[Lang.Blocks.CODEino_sensor_name_1,"1"],[Lang.Blocks.CODEino_sensor_name_2,"2"],[Lang.Blocks.CODEino_sensor_name_3,"3"],[Lang.Blocks.CODEino_sensor_name_4,"4"],[Lang.Blocks.CODEino_sensor_name_5,"5"],[Lang.Blocks.CODEino_sensor_name_6,"6"]]),"PORT").appendField(Lang.Blocks.CODEino_string_1); -this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.CODEino_get_named_sensor_value=function(a,b){return Entry.hw.getAnalogPortValue(b.getField("PORT",b))}; +this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.CODEino_get_named_sensor_value=function(b,a){return Entry.hw.getAnalogPortValue(a.getField("PORT",a))}; Blockly.Blocks.CODEino_get_sound_status={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.CODEino_string_10).appendField(new Blockly.FieldDropdown([[Lang.Blocks.CODEino_string_11,"GREAT"],[Lang.Blocks.CODEino_string_12,"SMALL"]]),"STATUS").appendField(" ");this.setInputsInline(!0);this.setOutput(!0,"Boolean")}}; -Entry.block.CODEino_get_sound_status=function(a,b){return"GREAT"==b.getField("STATUS",b)?600Entry.hw.getAnalogPortValue(0)?1:0}; +Entry.block.CODEino_get_sound_status=function(b,a){return"GREAT"==a.getField("STATUS",a)?600Entry.hw.getAnalogPortValue(0)?1:0}; Blockly.Blocks.CODEino_get_light_status={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.CODEino_string_13).appendField(new Blockly.FieldDropdown([[Lang.Blocks.CODEino_string_14,"BRIGHT"],[Lang.Blocks.CODEino_string_15,"DARK"]]),"STATUS").appendField(" ");this.setInputsInline(!0);this.setOutput(!0,"Boolean")}}; -Entry.block.CODEino_get_light_status=function(a,b){return"DARK"==b.getField("STATUS",b)?800Entry.hw.getAnalogPortValue(1)?1:0}; +Entry.block.CODEino_get_light_status=function(b,a){return"DARK"==a.getField("STATUS",a)?800Entry.hw.getAnalogPortValue(1)?1:0}; Blockly.Blocks.CODEino_is_button_pressed={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.CODEino_string_2).appendField(new Blockly.FieldDropdown([[Lang.Blocks.CODEino_string_3,"4"],[Lang.Blocks.CODEino_string_4,"17"],[Lang.Blocks.CODEino_string_5,"18"],[Lang.Blocks.CODEino_string_6,"19"],[Lang.Blocks.CODEino_string_7,"20"]]),"PORT").appendField(" ");this.setInputsInline(!0);this.setOutput(!0,"Boolean")}}; -Entry.block.CODEino_is_button_pressed=function(a,b){var c=b.getNumberField("PORT",b);return 14d?1:0;if("RIGHT"==c||"FRONT"==c)return 30d?1:0}; +Entry.block.CODEino_get_accelerometer_direction=function(b,a){var c=a.getField("DIRECTION",a),d=0;"LEFT"==c||"RIGHT"==c?d=3:"FRONT"==c||"REAR"==c?d=4:"REVERSE"==c&&(d=5);d=Entry.hw.getAnalogPortValue(d);d=180/137*(d-265);d+=-90;d=Math.min(90,d);d=Math.max(-90,d);d=Math.round(d);if("LEFT"==c||"REAR"==c)return-30>d?1:0;if("RIGHT"==c||"FRONT"==c)return 30d?1:0}; Blockly.Blocks.CODEino_get_accelerometer_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.CODEino_string_8).appendField(new Blockly.FieldDropdown([[Lang.Blocks.CODEino_accelerometer_X,"3"],[Lang.Blocks.CODEino_accelerometer_Y,"4"],[Lang.Blocks.CODEino_accelerometer_Z,"5"]]),"PORT").appendField(Lang.Blocks.CODEino_string_9);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.CODEino_get_accelerometer_value=function(a,b){var c=265,d=402,e=-90,f=90,g=Entry.hw.getAnalogPortValue(b.getField("PORT",b));if(c>d)var h=c,c=d,d=h;e>f&&(h=e,e=f,f=h);g=(f-e)/(d-c)*(g-c);g+=e;g=Math.min(f,g);g=Math.max(e,g);return Math.round(g)};Entry.Bitbrick={SENSOR_MAP:{1:"light",2:"IR",3:"touch",4:"potentiometer",5:"MIC",21:"UserSensor",11:"USER INPUT",20:"LED",19:"SERVO",18:"DC"},PORT_MAP:{buzzer:2,5:4,6:6,7:8,8:10,LEDR:12,LEDG:14,LEDB:16},sensorList:function(){for(var a=[],b=Entry.hw.portData,c=1;5>c;c++){var d=b[c];d&&(d.value||0===d.value)&&a.push([c+" - "+Lang.Blocks["BITBRICK_"+d.type],c.toString()])}return 0==a.length?[[Lang.Blocks.no_target,"null"]]:a},touchList:function(){for(var a=[],b=Entry.hw.portData,c=1;5>c;c++){var d=b[c]; -d&&"touch"===d.type&&a.push([c.toString(),c.toString()])}return 0==a.length?[[Lang.Blocks.no_target,"null"]]:a},servoList:function(){for(var a=[],b=Entry.hw.portData,c=5;9>c;c++){var d=b[c];d&&"SERVO"===d.type&&a.push(["ABCD"[c-5],c.toString()])}return 0==a.length?[[Lang.Blocks.no_target,"null"]]:a},dcList:function(){for(var a=[],b=Entry.hw.portData,c=5;9>c;c++){var d=b[c];d&&"DC"===d.type&&a.push(["ABCD"[c-5],c.toString()])}return 0==a.length?[[Lang.Blocks.no_target,"null"]]:a},setZero:function(){var a= -Entry.hw.sendQueue,b;for(b in Entry.Bitbrick.PORT_MAP)a[b]=0;Entry.hw.update()},name:"bitbrick",servoMaxValue:181,servoMinValue:1,dcMaxValue:100,dcMinValue:-100,monitorTemplate:{imgPath:"hw/bitbrick.png",width:400,height:400,listPorts:{1:{name:Lang.Hw.port_en+" 1 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},2:{name:Lang.Hw.port_en+" 2 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},3:{name:Lang.Hw.port_en+" 3 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},4:{name:Lang.Hw.port_en+" 4 "+Lang.Hw.port_ko, +Entry.block.CODEino_get_accelerometer_value=function(b,a){var c=265,d=402,e=-90,f=90,g=Entry.hw.getAnalogPortValue(a.getField("PORT",a));if(c>d)var h=c,c=d,d=h;e>f&&(h=e,e=f,f=h);g=(f-e)/(d-c)*(g-c);g+=e;g=Math.min(f,g);g=Math.max(e,g);return Math.round(g)}; +Blockly.Blocks.dplay_select_led={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_num_pin_1);this.appendDummyInput().appendField(new Blockly.FieldDropdown([["7","7"],["8","8"],["9","9"],["10","10"]]),"PORT");this.appendDummyInput().appendField(Lang.Blocks.dplay_num_pin_1);this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.ARDUINO_on,"on"],[Lang.Blocks.ARDUINO_off,"off"]]),"OPERATOR").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ +"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.dplay_select_led=function(b,a){var c=a.getField("PORT"),d=7;"7"==c?d=7:"8"==c?d=8:"9"==c?d=9:"10"==c&&(d=10);c=a.getField("OPERATOR");Entry.hw.setDigitalPortValue(d,"on"==c?255:0);return a.callReturn()}; +Blockly.Blocks.dplay_get_switch_status={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\ub514\uc9c0\ud138 ");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["2","2"],["4","4"]]),"PORT");this.appendDummyInput().appendField(Lang.Blocks.dplay_num_pin_2).appendField(new Blockly.FieldDropdown([[Lang.Blocks.dplay_string_5,"ON"],[Lang.Blocks.dplay_string_6,"OFF"]]),"STATUS").appendField(" ");this.setInputsInline(!0);this.setOutput(!0,"Boolean")}}; +Entry.block.dplay_get_switch_status=function(b,a){var c=a.getField("PORT"),d=2;"2"==c?d=2:"4"==c&&(d=4);return"OFF"==a.getField("STATUS")?1==Entry.hw.getDigitalPortValue(d)?1:0:0==Entry.hw.getDigitalPortValue(d)?1:0}; +Blockly.Blocks.dplay_get_light_status={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.dplay_light).appendField(new Blockly.FieldDropdown([[Lang.Blocks.dplay_string_3,"BRIGHT"],[Lang.Blocks.dplay_string_4,"DARK"]]),"STATUS").appendField(" ");this.setInputsInline(!0);this.setOutput(!0,"Boolean")}}; +Entry.block.dplay_get_light_status=function(b,a){return"DARK"==a.getField("STATUS",a)?800Entry.hw.getAnalogPortValue(1)?1:0}; +Blockly.Blocks.dplay_get_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.dplay_num_pin_3);this.appendValueInput("VALUE").setCheck(["Number","String",null]);this.appendDummyInput().appendField("\ubc88 ");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\uac00\ubcc0\uc800\ud56d","ADJU"],["\ube5b\uc13c\uc11c","LIGHT"],["\uc628\ub3c4\uc13c\uc11c","TEMP"],["\uc870\uc774\uc2a4\ud2f1 X","JOYS"],["\uc870\uc774\uc2a4\ud2f1 Y","JOYS"],["\uc801\uc678\uc120", +"INFR"]]),"OPERATOR");this.appendDummyInput().appendField(Lang.Blocks.dplay_num_pin_5);this.setInputsInline(!0);this.setOutput(!0,"Number")}};Entry.block.dplay_get_value=function(b,a){var c=a.getValue("VALUE",a);return Entry.hw.getAnalogPortValue(c[1])}; +Blockly.Blocks.dplay_get_tilt={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.dplay_tilt).appendField(new Blockly.FieldDropdown([["\uc67c\ucabd \uae30\uc6b8\uc784","LEFT"],["\uc624\ub978\ucabd \uae30\uc6b8\uc784","LIGHT"]]),"STATUS").appendField(" ");this.setInputsInline(!0);this.setOutput(!0,"Boolean")}}; +Entry.block.dplay_get_tilt=function(b,a){return"LIGHT"==a.getField("STATUS",a)?1==Entry.hw.getDigitalPortValue(12)?1:0:0==Entry.hw.getDigitalPortValue(12)?1:0}; +Blockly.Blocks.dplay_DCmotor={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\uc67c\ucabd","3"],["\uc624\ub978\ucabd","6"]]),"PORT");this.appendDummyInput().appendField(" DC\ubaa8\ud130 \uc0c1\ud0dc\ub97c");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\uc815\ubc29\ud5a5","FRONT"],["\uc5ed\ubc29\ud5a5","REAR"],["\uc815\uc9c0","OFF"]]),"OPERATOR").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png", +"*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.dplay_DCmotor=function(b,a){var c=a.getField("PORT"),d=0;"3"==c&&(d=5);var e=a.getField("OPERATOR"),f=0,g=0;"FRONT"==e?(f=255,g=0):"REAR"==e?(f=0,g=255):"OFF"==e&&(g=f=0);Entry.hw.setDigitalPortValue(c,f);Entry.hw.setDigitalPortValue(d,g);return a.callReturn()}; +Blockly.Blocks.dplay_buzzer={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\ubd80\uc800\ub97c ");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\ub3c4","1"],["\ub808","2"],["\ubbf8","3"]]),"PORT");this.appendDummyInput().appendField("\ub85c");this.appendValueInput("VALUE").setCheck(["Number","String",null]);this.appendDummyInput().appendField("\ubc15\uc790\ub85c \uc5f0\uc8fc\ud558\uae30");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ +"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.dplay_buzzer=function(b,a){var c=a.getField("PORT"),d=2;"1"==c?d=2:"2"==c?d=4:"3"==c&&(d=7);c=a.getNumberValue("VALUE");c=Math.round(c);c=Math.max(c,0);c=Math.min(c,100);Entry.hw.setDigitalPortValue(d,c);return a.callReturn()}; +Blockly.Blocks.dplay_servo={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uc11c\ubcf4\ubaa8\ud130 \uac01\ub3c4\ub97c");this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField("\ub85c \uc774\ub3d9");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; +Entry.block.dplay_servo=function(b,a){var c=a.getNumberValue("VALUE"),c=Math.round(c),c=Math.max(c,0),c=Math.min(c,180);Entry.hw.setDigitalPortValue(9,c);return a.callReturn()};Entry.Bitbrick={SENSOR_MAP:{1:"light",2:"IR",3:"touch",4:"potentiometer",5:"MIC",21:"UserSensor",11:"USER INPUT",20:"LED",19:"SERVO",18:"DC"},PORT_MAP:{buzzer:2,5:4,6:6,7:8,8:10,LEDR:12,LEDG:14,LEDB:16},sensorList:function(){for(var b=[],a=Entry.hw.portData,c=1;5>c;c++){var d=a[c];d&&(d.value||0===d.value)&&b.push([c+" - "+Lang.Blocks["BITBRICK_"+d.type],c.toString()])}return 0==b.length?[[Lang.Blocks.no_target,"null"]]:b},touchList:function(){for(var b=[],a=Entry.hw.portData,c=1;5>c;c++){var d=a[c]; +d&&"touch"===d.type&&b.push([c.toString(),c.toString()])}return 0==b.length?[[Lang.Blocks.no_target,"null"]]:b},servoList:function(){for(var b=[],a=Entry.hw.portData,c=5;9>c;c++){var d=a[c];d&&"SERVO"===d.type&&b.push(["ABCD"[c-5],c.toString()])}return 0==b.length?[[Lang.Blocks.no_target,"null"]]:b},dcList:function(){for(var b=[],a=Entry.hw.portData,c=5;9>c;c++){var d=a[c];d&&"DC"===d.type&&b.push(["ABCD"[c-5],c.toString()])}return 0==b.length?[[Lang.Blocks.no_target,"null"]]:b},setZero:function(){var b= +Entry.hw.sendQueue,a;for(a in Entry.Bitbrick.PORT_MAP)b[a]=0;Entry.hw.update()},name:"bitbrick",servoMaxValue:181,servoMinValue:1,dcMaxValue:100,dcMinValue:-100,monitorTemplate:{imgPath:"hw/bitbrick.png",width:400,height:400,listPorts:{1:{name:Lang.Hw.port_en+" 1 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},2:{name:Lang.Hw.port_en+" 2 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},3:{name:Lang.Hw.port_en+" 3 "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},4:{name:Lang.Hw.port_en+" 4 "+Lang.Hw.port_ko, type:"input",pos:{x:0,y:0}},A:{name:Lang.Hw.port_en+" A "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},B:{name:Lang.Hw.port_en+" B "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},C:{name:Lang.Hw.port_en+" C "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}},D:{name:Lang.Hw.port_en+" D "+Lang.Hw.port_ko,type:"input",pos:{x:0,y:0}}},mode:"both"}}; -Blockly.Blocks.bitbrick_sensor_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("").appendField(new Blockly.FieldDropdownDynamic(Entry.Bitbrick.sensorList),"PORT").appendField(" \uac12");this.setOutput(!0,"String");this.setInputsInline(!0)}};Entry.block.bitbrick_sensor_value=function(a,b){var c=b.getStringField("PORT");return Entry.hw.portData[c].value}; -Blockly.Blocks.bitbrick_is_touch_pressed={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.BITBRICK_touch).appendField(new Blockly.FieldDropdownDynamic(Entry.Bitbrick.touchList),"PORT").appendField("\uc774(\uac00) \ub20c\ub838\ub294\uac00?");this.setOutput(!0,"Boolean");this.setInputsInline(!0)}};Entry.block.bitbrick_is_touch_pressed=function(a,b){return 0===Entry.hw.portData[b.getStringField("PORT")].value}; -Blockly.Blocks.bitbrick_turn_off_color_led={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uceec\ub7ec LED \ub044\uae30").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.bitbrick_turn_off_color_led=function(a,b){Entry.hw.sendQueue.LEDR=0;Entry.hw.sendQueue.LEDG=0;Entry.hw.sendQueue.LEDB=0;return b.callReturn()}; +Blockly.Blocks.bitbrick_sensor_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("").appendField(new Blockly.FieldDropdownDynamic(Entry.Bitbrick.sensorList),"PORT").appendField(" \uac12");this.setOutput(!0,"String");this.setInputsInline(!0)}};Entry.block.bitbrick_sensor_value=function(b,a){var c=a.getStringField("PORT");return Entry.hw.portData[c].value}; +Blockly.Blocks.bitbrick_is_touch_pressed={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.BITBRICK_touch).appendField(new Blockly.FieldDropdownDynamic(Entry.Bitbrick.touchList),"PORT").appendField("\uc774(\uac00) \ub20c\ub838\ub294\uac00?");this.setOutput(!0,"Boolean");this.setInputsInline(!0)}};Entry.block.bitbrick_is_touch_pressed=function(b,a){return 0===Entry.hw.portData[a.getStringField("PORT")].value}; +Blockly.Blocks.bitbrick_turn_off_color_led={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uceec\ub7ec LED \ub044\uae30").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.bitbrick_turn_off_color_led=function(b,a){Entry.hw.sendQueue.LEDR=0;Entry.hw.sendQueue.LEDG=0;Entry.hw.sendQueue.LEDB=0;return a.callReturn()}; Blockly.Blocks.bitbrick_turn_on_color_led_by_rgb={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uceec\ub7ec LED \ucf1c\uae30 R");this.appendValueInput("rValue").setCheck(["Number","String"]);this.appendDummyInput().appendField("G");this.appendValueInput("gValue").setCheck(["Number","String"]);this.appendDummyInput().appendField("B");this.appendValueInput("bValue").setCheck(["Number","String"]);this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.bitbrick_turn_on_color_led_by_rgb=function(a,b){var c=b.getNumberValue("rValue"),d=b.getNumberValue("gValue"),e=b.getNumberValue("bValue"),f=Entry.adjustValueWithMaxMin,g=Entry.hw.sendQueue;g.LEDR=f(c,0,255);g.LEDG=f(d,0,255);g.LEDB=f(e,0,255);return b.callReturn()}; +"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.bitbrick_turn_on_color_led_by_rgb=function(b,a){var c=a.getNumberValue("rValue"),d=a.getNumberValue("gValue"),e=a.getNumberValue("bValue"),f=Entry.adjustValueWithMaxMin,g=Entry.hw.sendQueue;g.LEDR=f(c,0,255);g.LEDG=f(d,0,255);g.LEDB=f(e,0,255);return a.callReturn()}; Blockly.Blocks.bitbrick_turn_on_color_led_by_picker={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uceec\ub7ec LED \uc0c9 ").appendField(new Blockly.FieldColour("#ff0000"),"VALUE").appendField("\ub85c \uc815\ud558\uae30").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.bitbrick_turn_on_color_led_by_picker=function(a,b){var c=b.getStringField("VALUE");Entry.hw.sendQueue.LEDR=parseInt(c.substr(1,2),16);Entry.hw.sendQueue.LEDG=parseInt(c.substr(3,2),16);Entry.hw.sendQueue.LEDB=parseInt(c.substr(5,2),16);return b.callReturn()}; +Entry.block.bitbrick_turn_on_color_led_by_picker=function(b,a){var c=a.getStringField("VALUE");Entry.hw.sendQueue.LEDR=parseInt(c.substr(1,2),16);Entry.hw.sendQueue.LEDG=parseInt(c.substr(3,2),16);Entry.hw.sendQueue.LEDB=parseInt(c.substr(5,2),16);return a.callReturn()}; Blockly.Blocks.bitbrick_turn_on_color_led_by_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uceec\ub7ec LED \ucf1c\uae30 \uc0c9");this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField("\ub85c \uc815\ud558\uae30").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.bitbrick_turn_on_color_led_by_value=function(a,b){var c=b.getNumberValue("VALUE"),d,e,f,c=c%200;67>c?(d=200-3*c,e=3*c,f=0):134>c?(c-=67,d=0,e=200-3*c,f=3*c):201>c&&(c-=134,d=3*c,e=0,f=200-3*c);Entry.hw.sendQueue.LEDR=d;Entry.hw.sendQueue.LEDG=e;Entry.hw.sendQueue.LEDB=f;return b.callReturn()}; +Entry.block.bitbrick_turn_on_color_led_by_value=function(b,a){var c=a.getNumberValue("VALUE"),d,e,f,c=c%200;67>c?(d=200-3*c,e=3*c,f=0):134>c?(c-=67,d=0,e=200-3*c,f=3*c):201>c&&(c-=134,d=3*c,e=0,f=200-3*c);Entry.hw.sendQueue.LEDR=d;Entry.hw.sendQueue.LEDG=e;Entry.hw.sendQueue.LEDB=f;return a.callReturn()}; Blockly.Blocks.bitbrick_buzzer={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\ubc84\uc800\uc74c ");this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField("\ub0b4\uae30").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.bitbrick_buzzer=function(a,b){if(b.isStart)return Entry.hw.sendQueue.buzzer=0,delete b.isStart,b.callReturn();var c=b.getNumberValue("VALUE");Entry.hw.sendQueue.buzzer=c;b.isStart=!0;return b}; +Entry.block.bitbrick_buzzer=function(b,a){if(a.isStart)return Entry.hw.sendQueue.buzzer=0,delete a.isStart,a.callReturn();var c=a.getNumberValue("VALUE");Entry.hw.sendQueue.buzzer=c;a.isStart=!0;return a}; Blockly.Blocks.bitbrick_turn_off_all_motors={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\ubaa8\ub4e0 \ubaa8\ud130 \ub044\uae30").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.bitbrick_turn_off_all_motors=function(a,b){var c=Entry.hw.sendQueue,d=Entry.Bitbrick;d.servoList().map(function(b){c[b[1]]=0});d.dcList().map(function(b){c[b[1]]=128});return b.callReturn()}; +Entry.block.bitbrick_turn_off_all_motors=function(b,a){var c=Entry.hw.sendQueue,d=Entry.Bitbrick;d.servoList().map(function(a){c[a[1]]=0});d.dcList().map(function(a){c[a[1]]=128});return a.callReturn()}; Blockly.Blocks.bitbrick_dc_speed={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("DC \ubaa8\ud130").appendField(new Blockly.FieldDropdownDynamic(Entry.Bitbrick.dcList),"PORT").appendField(" \uc18d\ub3c4");this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField("").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setPreviousStatement(!0);this.setNextStatement(!0);this.setInputsInline(!0)}}; -Entry.block.bitbrick_dc_speed=function(a,b){var c=b.getNumberValue("VALUE"),c=Math.min(c,Entry.Bitbrick.dcMaxValue),c=Math.max(c,Entry.Bitbrick.dcMinValue);Entry.hw.sendQueue[b.getStringField("PORT")]=c+128;return b.callReturn()}; +Entry.block.bitbrick_dc_speed=function(b,a){var c=a.getNumberValue("VALUE"),c=Math.min(c,Entry.Bitbrick.dcMaxValue),c=Math.max(c,Entry.Bitbrick.dcMinValue);Entry.hw.sendQueue[a.getStringField("PORT")]=c+128;return a.callReturn()}; Blockly.Blocks.bitbrick_dc_direction_speed={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("DC \ubaa8\ud130").appendField(new Blockly.FieldDropdownDynamic(Entry.Bitbrick.dcList),"PORT").appendField(" ").appendField(new Blockly.FieldDropdown([[Lang.Blocks.BITBRICK_dc_direction_cw,"CW"],[Lang.Blocks.BITBRICK_dc_direction_ccw,"CCW"]]),"DIRECTION").appendField(" \ubc29\ud5a5").appendField(" \uc18d\ub825");this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField("").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/hardware_03.png","*"));this.setPreviousStatement(!0);this.setNextStatement(!0);this.setInputsInline(!0)}};Entry.block.bitbrick_dc_direction_speed=function(a,b){var c="CW"===b.getStringField("DIRECTION"),d=b.getNumberValue("VALUE"),d=Math.min(d,Entry.Bitbrick.dcMaxValue),d=Math.max(d,0);Entry.hw.sendQueue[b.getStringField("PORT")]=c?d+128:128-d;return b.callReturn()}; +"block_icon/hardware_03.png","*"));this.setPreviousStatement(!0);this.setNextStatement(!0);this.setInputsInline(!0)}};Entry.block.bitbrick_dc_direction_speed=function(b,a){var c="CW"===a.getStringField("DIRECTION"),d=a.getNumberValue("VALUE"),d=Math.min(d,Entry.Bitbrick.dcMaxValue),d=Math.max(d,0);Entry.hw.sendQueue[a.getStringField("PORT")]=c?d+128:128-d;return a.callReturn()}; Blockly.Blocks.bitbrick_servomotor_angle={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uc11c\ubcf4 \ubaa8\ud130").appendField(new Blockly.FieldDropdownDynamic(Entry.Bitbrick.servoList),"PORT").appendField(" \uac01\ub3c4");this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField("").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setPreviousStatement(!0);this.setNextStatement(!0); -this.setInputsInline(!0)}};Entry.block.bitbrick_servomotor_angle=function(a,b){var c=b.getNumberValue("VALUE")+1,c=Math.min(c,Entry.Bitbrick.servoMaxValue),c=Math.max(c,Entry.Bitbrick.servoMinValue);Entry.hw.sendQueue[b.getStringField("PORT")]=c;return b.callReturn()}; +this.setInputsInline(!0)}};Entry.block.bitbrick_servomotor_angle=function(b,a){var c=a.getNumberValue("VALUE")+1,c=Math.min(c,Entry.Bitbrick.servoMaxValue),c=Math.max(c,Entry.Bitbrick.servoMinValue);Entry.hw.sendQueue[a.getStringField("PORT")]=c;return a.callReturn()}; Blockly.Blocks.bitbrick_convert_scale={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\ubcc0\ud658");this.appendDummyInput().appendField("").appendField(new Blockly.FieldDropdownDynamic(Entry.Bitbrick.sensorList),"PORT");this.appendDummyInput().appendField("\uac12");this.appendValueInput("VALUE2").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_convert_scale_3);this.appendValueInput("VALUE3").setCheck(["Number","String",null]); this.appendDummyInput().appendField("\uc5d0\uc11c");this.appendValueInput("VALUE4").setCheck(["Number","String",null]);this.appendDummyInput().appendField(Lang.Blocks.ARDUINO_convert_scale_5);this.appendValueInput("VALUE5").setCheck(["Number","String",null]);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.bitbrick_convert_scale=function(a,b){var c=b.getNumberField("PORT"),d=Entry.hw.portData[c].value,c=b.getNumberValue("VALUE2",b),e=b.getNumberValue("VALUE3",b),f=b.getNumberValue("VALUE4",b),g=b.getNumberValue("VALUE5",b);if(f>g)var h=f,f=g,g=h;d-=c;d*=(g-f)/(e-c);d+=f;d=Math.min(g,d);d=Math.max(f,d);return Math.round(d)};var categoryColor="#FF9E20";Blockly.Blocks.start_drawing={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_start_drawing).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.start_drawing=function(a,b){a.brush?a.brush.stop=!1:Entry.setBasicBrush(a);Entry.stage.sortZorder();a.brush.moveTo(a.getX(),-1*a.getY());return b.callReturn()}; -Blockly.Blocks.stop_drawing={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_stop_drawing).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.stop_drawing=function(a,b){a.brush&&a.shape&&(a.brush.stop=!0);return b.callReturn()}; +Entry.block.bitbrick_convert_scale=function(b,a){var c=a.getNumberField("PORT"),d=Entry.hw.portData[c].value,c=a.getNumberValue("VALUE2",a),e=a.getNumberValue("VALUE3",a),f=a.getNumberValue("VALUE4",a),g=a.getNumberValue("VALUE5",a);if(f>g)var h=f,f=g,g=h;d-=c;d*=(g-f)/(e-c);d+=f;d=Math.min(g,d);d=Math.max(f,d);return Math.round(d)};var categoryColor="#FF9E20";Blockly.Blocks.start_drawing={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_start_drawing).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.start_drawing=function(b,a){b.brush?b.brush.stop=!1:Entry.setBasicBrush(b);Entry.stage.sortZorder();b.brush.moveTo(b.getX(),-1*b.getY());return a.callReturn()}; +Blockly.Blocks.stop_drawing={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_stop_drawing).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.stop_drawing=function(b,a){b.brush&&b.shape&&(b.brush.stop=!0);return a.callReturn()}; Blockly.Blocks.set_color={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_set_color_1);this.appendDummyInput().appendField(new Blockly.FieldColour("#ff0000"),"VALUE");this.appendDummyInput().appendField(Lang.Blocks.BRUSH_set_color_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.set_color=function(a,b){var c=b.getField("VALUE",b);a.brush||(Entry.setBasicBrush(a),a.brush.stop=!0);a.brush&&(c=Entry.hex2rgb(c),a.brush.rgb=c,a.brush.endStroke(),a.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+a.brush.opacity/100+")"),a.brush.moveTo(a.getX(),-1*a.getY()));return b.callReturn()}; +Entry.block.set_color=function(b,a){var c=a.getField("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);b.brush&&(c=Entry.hex2rgb(c),b.brush.rgb=c,b.brush.endStroke(),b.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+b.brush.opacity/100+")"),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()}; Blockly.Blocks.set_random_color={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_set_random_color).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.set_random_color=function(a,b){a.brush||(Entry.setBasicBrush(a),a.brush.stop=!0);if(a.brush){var c=Entry.generateRgb();a.brush.rgb=c;a.brush.endStroke();a.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+a.brush.opacity/100+")");a.brush.moveTo(a.getX(),-1*a.getY())}return b.callReturn()}; +Entry.block.set_random_color=function(b,a){b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);if(b.brush){var c=Entry.generateRgb();b.brush.rgb=c;b.brush.endStroke();b.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+b.brush.opacity/100+")");b.brush.moveTo(b.getX(),-1*b.getY())}return a.callReturn()}; Blockly.Blocks.change_thickness={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_change_thickness_1);this.appendValueInput("VALUE").setCheck(["Number","Boolean"]);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_change_thickness_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.change_thickness=function(a,b){var c=b.getNumberValue("VALUE",b);a.brush||(Entry.setBasicBrush(a),a.brush.stop=!0);a.brush&&(a.brush.thickness+=c,1>a.brush.thickness&&(a.brush.thickness=1),a.brush.setStrokeStyle(a.brush.thickness),a.brush.moveTo(a.getX(),-1*a.getY()));return b.callReturn()}; +Entry.block.change_thickness=function(b,a){var c=a.getNumberValue("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);b.brush&&(b.brush.thickness+=c,1>b.brush.thickness&&(b.brush.thickness=1),b.brush.setStrokeStyle(b.brush.thickness),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()}; Blockly.Blocks.set_thickness={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_set_thickness_1);this.appendValueInput("VALUE").setCheck(["Number","Boolean"]);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_set_thickness_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.set_thickness=function(a,b){var c=b.getNumberValue("VALUE",b);a.brush||(Entry.setBasicBrush(a),a.brush.stop=!0);a.brush&&(a.brush.thickness=c,a.brush.setStrokeStyle(a.brush.thickness),a.brush.moveTo(a.getX(),-1*a.getY()));return b.callReturn()}; +Entry.block.set_thickness=function(b,a){var c=a.getNumberValue("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);b.brush&&(b.brush.thickness=c,b.brush.setStrokeStyle(b.brush.thickness),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()}; Blockly.Blocks.change_opacity={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_change_opacity_1);this.appendValueInput("VALUE").setCheck(["Number","Boolean"]);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_change_opacity_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.change_opacity=function(a,b){var c=b.getNumberValue("VALUE",b);a.brush||(Entry.setBasicBrush(a),a.brush.stop=!0);c=Entry.adjustValueWithMaxMin(a.brush.opacity+c,0,100);a.brush&&(a.brush.opacity=c,a.brush.endStroke(),c=a.brush.rgb,a.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+a.brush.opacity/100+")"),a.brush.moveTo(a.getX(),-1*a.getY()));return b.callReturn()}; +Entry.block.change_opacity=function(b,a){var c=a.getNumberValue("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);c=Entry.adjustValueWithMaxMin(b.brush.opacity+c,0,100);b.brush&&(b.brush.opacity=c,b.brush.endStroke(),c=b.brush.rgb,b.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+b.brush.opacity/100+")"),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()}; Blockly.Blocks.set_opacity={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_set_opacity_1);this.appendValueInput("VALUE").setCheck(["Number","Boolean"]);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_set_opacity_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.set_opacity=function(a,b){var c=b.getNumberValue("VALUE",b);a.brush||(Entry.setBasicBrush(a),a.brush.stop=!0);a.brush&&(a.brush.opacity=Entry.adjustValueWithMaxMin(c,0,100),a.brush.endStroke(),c=a.brush.rgb,a.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+a.brush.opacity/100+")"),a.brush.moveTo(a.getX(),-1*a.getY()));return b.callReturn()}; +Entry.block.set_opacity=function(b,a){var c=a.getNumberValue("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);b.brush&&(b.brush.opacity=Entry.adjustValueWithMaxMin(c,0,100),b.brush.endStroke(),c=b.brush.rgb,b.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+b.brush.opacity/100+")"),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()}; Blockly.Blocks.brush_erase_all={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_brush_erase_all).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.brush_erase_all=function(a,b){var c=a.brush;if(c){var d=c._stroke.style,e=c._strokeStyle.width;c.clear().setStrokeStyle(e).beginStroke(d);c.moveTo(a.getX(),-1*a.getY())}c=a.parent.getStampEntities();c.map(function(b){b.removeClone()});c=null;return b.callReturn()}; -Blockly.Blocks.brush_stamp={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_stamp).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.brush_stamp=function(a,b){a.parent.addStampEntity(a);return b.callReturn()}; +Entry.block.brush_erase_all=function(b,a){var c=b.brush;if(c){var d=c._stroke.style,e=c._strokeStyle.width;c.clear().setStrokeStyle(e).beginStroke(d);c.moveTo(b.getX(),-1*b.getY())}c=b.parent.getStampEntities();c.map(function(a){a.removeClone()});c=null;return a.callReturn()}; +Blockly.Blocks.brush_stamp={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_stamp).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.brush_stamp=function(b,a){b.parent.addStampEntity(b);return a.callReturn()}; Blockly.Blocks.change_brush_transparency={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_change_brush_transparency_1);this.appendValueInput("VALUE").setCheck(["Number","Boolean"]);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_change_brush_transparency_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.change_brush_transparency=function(a,b){var c=b.getNumberValue("VALUE",b);a.brush||(Entry.setBasicBrush(a),a.brush.stop=!0);c=Entry.adjustValueWithMaxMin(a.brush.opacity-c,0,100);a.brush&&(a.brush.opacity=c,a.brush.endStroke(),c=a.brush.rgb,a.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+a.brush.opacity/100+")"),a.brush.moveTo(a.getX(),-1*a.getY()));return b.callReturn()}; +Entry.block.change_brush_transparency=function(b,a){var c=a.getNumberValue("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);c=Entry.adjustValueWithMaxMin(b.brush.opacity-c,0,100);b.brush&&(b.brush.opacity=c,b.brush.endStroke(),c=b.brush.rgb,b.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+b.brush.opacity/100+")"),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()}; Blockly.Blocks.set_brush_tranparency={init:function(){this.setColour(categoryColor);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_set_brush_transparency_1);this.appendValueInput("VALUE").setCheck(["Number","Boolean"]);this.appendDummyInput().appendField(Lang.Blocks.BRUSH_set_brush_transparency_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/brush_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.set_brush_tranparency=function(a,b){var c=b.getNumberValue("VALUE",b);a.brush||(Entry.setBasicBrush(a),a.brush.stop=!0);a.brush&&(a.brush.opacity=Entry.adjustValueWithMaxMin(c,0,100),a.brush.endStroke(),c=a.brush.rgb,a.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+(1-a.brush.opacity/100)+")"),a.brush.moveTo(a.getX(),-1*a.getY()));return b.callReturn()};var calcArrowColor="#e8b349",calcBlockColor="#FFD974",calcFontColor="#3D3D3D";Blockly.Blocks.number={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(new Blockly.FieldTextInput(""),"NUM");this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.number=function(a,b){return b.fields.NUM}; -Blockly.Blocks.angle={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(new Blockly.FieldAngle("90"),"ANGLE");this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.angle=function(a,b){return b.getNumberField("ANGLE")};Blockly.Blocks.get_x_coordinate={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_get_x_coordinate,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.get_x_coordinate=function(a,b){return a.getX()};Blockly.Blocks.get_y_coordinate={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_get_y_coordinate,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.get_y_coordinate=function(a,b){return a.getY()}; -Blockly.Blocks.get_angle={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_get_angle,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.get_angle=function(a,b){return parseFloat(a.getRotation().toFixed(1))}; +Entry.block.set_brush_tranparency=function(b,a){var c=a.getNumberValue("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);b.brush&&(b.brush.opacity=Entry.adjustValueWithMaxMin(c,0,100),b.brush.endStroke(),c=b.brush.rgb,b.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+(1-b.brush.opacity/100)+")"),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()};var calcArrowColor="#e8b349",calcBlockColor="#FFD974",calcFontColor="#3D3D3D";Blockly.Blocks.number={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(new Blockly.FieldTextInput(""),"NUM");this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.number=function(b,a){return a.getField("NUM",a)}; +Blockly.Blocks.angle={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(new Blockly.FieldAngle("90"),"ANGLE");this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.angle=function(b,a){return a.getNumberField("ANGLE")};Blockly.Blocks.get_x_coordinate={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_get_x_coordinate,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; +Entry.block.get_x_coordinate=function(b,a){return b.getX()};Blockly.Blocks.get_y_coordinate={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_get_y_coordinate,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.get_y_coordinate=function(b,a){return b.getY()}; +Blockly.Blocks.get_angle={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_get_angle,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.get_angle=function(b,a){return parseFloat(b.getRotation().toFixed(1))}; Blockly.Blocks.get_rotation_direction={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.CALC_rotation_value,"ROTATION"],[Lang.Blocks.CALC_direction_value,"DIRECTION"]],null,!0,calcArrowColor),"OPERATOR");this.appendDummyInput().appendField(" ");this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.get_rotation_direction=function(a,b){return"DIRECTION"==b.getField("OPERATOR",b).toUpperCase()?parseFloat(a.getDirection().toFixed(1)):parseFloat(a.getRotation().toFixed(1))}; +Entry.block.get_rotation_direction=function(b,a){return"DIRECTION"==a.getField("OPERATOR",a).toUpperCase()?parseFloat(b.getDirection().toFixed(1)):parseFloat(b.getRotation().toFixed(1))}; Blockly.Blocks.distance_something={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_distance_something_1,calcFontColor).appendField(new Blockly.FieldDropdownDynamic("spritesWithMouse",null,!0,calcArrowColor),"VALUE").appendField(Lang.Blocks.CALC_distance_something_2,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.distance_something=function(a,b){var c=b.getField("VALUE",b);if("mouse"==c)return c=Entry.stage.mouseCoordinate,Math.sqrt(Math.pow(a.getX()-c.x,2)+Math.pow(a.getY()-c.y,2));c=Entry.container.getEntity(c);return Math.sqrt(Math.pow(a.getX()-c.getX(),2)+Math.pow(a.getY()-c.getY(),2))}; -Blockly.Blocks.coordinate_mouse={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_coordinate_mouse_1,calcFontColor).appendField(new Blockly.FieldDropdown([["x","x"],["y","y"]],null,!0,calcArrowColor),"VALUE").appendField(Lang.Blocks.CALC_coordinate_mouse_2,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.coordinate_mouse=function(a,b){return"x"===b.getField("VALUE",b)?+Entry.stage.mouseCoordinate.x:+Entry.stage.mouseCoordinate.y}; +Entry.block.distance_something=function(b,a){var c=a.getField("VALUE",a);if("mouse"==c)return c=Entry.stage.mouseCoordinate,Math.sqrt(Math.pow(b.getX()-c.x,2)+Math.pow(b.getY()-c.y,2));c=Entry.container.getEntity(c);return Math.sqrt(Math.pow(b.getX()-c.getX(),2)+Math.pow(b.getY()-c.getY(),2))}; +Blockly.Blocks.coordinate_mouse={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_coordinate_mouse_1,calcFontColor).appendField(new Blockly.FieldDropdown([["x","x"],["y","y"]],null,!0,calcArrowColor),"VALUE").appendField(Lang.Blocks.CALC_coordinate_mouse_2,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.coordinate_mouse=function(b,a){return"x"===a.getField("VALUE",a)?Number(Entry.stage.mouseCoordinate.x):Number(Entry.stage.mouseCoordinate.y)}; Blockly.Blocks.coordinate_object={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_coordinate_object_1,calcFontColor).appendField(new Blockly.FieldDropdownDynamic("spritesWithSelf",null,!0,calcArrowColor),"VALUE").appendField(Lang.Blocks.CALC_coordinate_object_2,calcFontColor).appendField(new Blockly.FieldDropdown([[Lang.Blocks.CALC_coordinate_x_value,"x"],[Lang.Blocks.CALC_coordinate_y_value,"y"],[Lang.Blocks.CALC_coordinate_rotation_value,"rotation"], [Lang.Blocks.CALC_coordinate_direction_value,"direction"],[Lang.Blocks.CALC_coordinate_size_value,"size"],[Lang.Blocks.CALC_picture_index,"picture_index"],[Lang.Blocks.CALC_picture_name,"picture_name"]],null,!0,calcArrowColor),"COORDINATE").appendField(Lang.Blocks.CALC_coordinate_object_3,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.coordinate_object=function(a,b){var c=b.getField("VALUE",b),c="self"==c?a:Entry.container.getEntity(c);switch(b.getField("COORDINATE",b)){case "x":return c.getX();case "y":return c.getY();case "rotation":return c.getRotation();case "direction":return c.getDirection();case "picture_index":var d=c.parent,d=d.pictures;return d.indexOf(c.picture)+1;case "size":return+c.getSize().toFixed(1);case "picture_name":return d=c.parent,d=d.pictures,d[d.indexOf(c.picture)].name}}; +Entry.block.coordinate_object=function(b,a){var c=a.getField("VALUE",a),c="self"==c?b:Entry.container.getEntity(c);switch(a.getField("COORDINATE",a)){case "x":return c.getX();case "y":return c.getY();case "rotation":return c.getRotation();case "direction":return c.getDirection();case "picture_index":var d=c.parent,d=d.pictures;return d.indexOf(c.picture)+1;case "size":return Number(c.getSize().toFixed(1));case "picture_name":return d=c.parent,d=d.pictures,d[d.indexOf(c.picture)].name}}; Blockly.Blocks.calc_basic={init:function(){this.setColour(calcBlockColor);this.appendValueInput("LEFTHAND").setCheck(["String","Number"]);this.appendDummyInput("VALUE").appendField(new Blockly.FieldDropdown([["+","PLUS"],["-","MINUS"],["x","MULTI"],["/","DIVIDE"]],null,!1),"OPERATOR");this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.calc_basic=function(a,b){var c=b.getField("OPERATOR",b),d=b.getNumberValue("LEFTHAND",b),e=b.getNumberValue("RIGHTHAND",b);return"PLUS"==c?d+e:"MINUS"==c?d-e:"MULTI"==c?d*e:d/e};Blockly.Blocks.calc_plus={init:function(){this.setColour(calcBlockColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput().appendField("+",calcFontColor);this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.calc_plus=function(a,b){var c=b.getNumberValue("LEFTHAND",b),d=b.getNumberValue("RIGHTHAND",b);return c+d};Blockly.Blocks.calc_minus={init:function(){this.setColour(calcBlockColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput().appendField("-",calcFontColor);this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.calc_minus=function(a,b){var c=b.getNumberValue("LEFTHAND",b),d=b.getNumberValue("RIGHTHAND",b);return c-d};Blockly.Blocks.calc_times={init:function(){this.setColour(calcBlockColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput().appendField("x",calcFontColor);this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.calc_times=function(a,b){var c=b.getNumberValue("LEFTHAND",b),d=b.getNumberValue("RIGHTHAND",b);return c*d};Blockly.Blocks.calc_divide={init:function(){this.setColour(calcBlockColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput().appendField("/",calcFontColor);this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.calc_divide=function(a,b){var c=b.getNumberValue("LEFTHAND",b),d=b.getNumberValue("RIGHTHAND",b);return c/d}; +Entry.block.calc_basic=function(b,a){var c=a.getField("OPERATOR",a),d=a.getNumberValue("LEFTHAND",a),e=a.getNumberValue("RIGHTHAND",a);return"PLUS"==c?d+e:"MINUS"==c?d-e:"MULTI"==c?d*e:d/e};Blockly.Blocks.calc_plus={init:function(){this.setColour(calcBlockColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput().appendField("+",calcFontColor);this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; +Entry.block.calc_plus=function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return c+d};Blockly.Blocks.calc_minus={init:function(){this.setColour(calcBlockColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput().appendField("-",calcFontColor);this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; +Entry.block.calc_minus=function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return c-d};Blockly.Blocks.calc_times={init:function(){this.setColour(calcBlockColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput().appendField("x",calcFontColor);this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; +Entry.block.calc_times=function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return c*d};Blockly.Blocks.calc_divide={init:function(){this.setColour(calcBlockColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput().appendField("/",calcFontColor);this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; +Entry.block.calc_divide=function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return c/d}; Blockly.Blocks.calc_mod={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_calc_mod_1,calcFontColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_calc_mod_2,calcFontColor);this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_calc_mod_3,calcFontColor);this.setInputsInline(!0)}}; -Entry.block.calc_mod=function(a,b){var c=b.getNumberValue("LEFTHAND",b),d=b.getNumberValue("RIGHTHAND",b);return c%d}; +Entry.block.calc_mod=function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return c%d}; Blockly.Blocks.calc_share={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_calc_share_1,calcFontColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.CALC_calc_share_2,calcFontColor);this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_calc_share_3,calcFontColor);this.setInputsInline(!0)}}; -Entry.block.calc_share=function(a,b){var c=b.getNumberValue("LEFTHAND",b),d=b.getNumberValue("RIGHTHAND",b);return Math.floor(c/d)}; +Entry.block.calc_share=function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return Math.floor(c/d)}; Blockly.Blocks.calc_operation={init:function(){this.setColour(calcBlockColor);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_calc_operation_of_1,calcFontColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_calc_operation_of_2,calcFontColor);this.appendDummyInput("VALUE").appendField(new Blockly.FieldDropdown([[Lang.Blocks.CALC_calc_operation_square,"square"],[Lang.Blocks.CALC_calc_operation_root,"root"],[Lang.Blocks.CALC_calc_operation_sin, "sin"],[Lang.Blocks.CALC_calc_operation_cos,"cos"],[Lang.Blocks.CALC_calc_operation_tan,"tan"],[Lang.Blocks.CALC_calc_operation_asin,"asin_radian"],[Lang.Blocks.CALC_calc_operation_acos,"acos_radian"],[Lang.Blocks.CALC_calc_operation_atan,"atan_radian"],[Lang.Blocks.CALC_calc_operation_log,"log"],[Lang.Blocks.CALC_calc_operation_ln,"ln"],[Lang.Blocks.CALC_calc_operation_unnatural,"unnatural"],[Lang.Blocks.CALC_calc_operation_floor,"floor"],[Lang.Blocks.CALC_calc_operation_ceil,"ceil"],[Lang.Blocks.CALC_calc_operation_round, "round"],[Lang.Blocks.CALC_calc_operation_factorial,"factorial"],[Lang.Blocks.CALC_calc_operation_abs,"abs"]],null,!0,calcArrowColor),"VALUE");this.setOutput(!0,"Number");this.appendDummyInput().appendField(" ");this.setInputsInline(!0)}}; -Entry.block.calc_operation=function(a,b){var c=b.getNumberValue("LEFTHAND",b),d=b.getField("VALUE",b);if(-1<["asin_radian","acos_radian"].indexOf(d)&&(1c))throw Error("x range exceeded");d.indexOf("_")&&(d=d.split("_")[0]);-1<["sin","cos","tan"].indexOf(d)&&(c=Entry.toRadian(c));var e=0;switch(d){case "square":e=c*c;break;case "factorial":e=Entry.factorial(c);break;case "root":e=Math.sqrt(c);break;case "log":e=Math.log(c)/Math.LN10;break;case "ln":e=Math.log(c);break;case "asin":case "acos":case "atan":e= +Entry.block.calc_operation=function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getField("VALUE",a);if(-1<["asin_radian","acos_radian"].indexOf(d)&&(1c))throw Error("x range exceeded");d.indexOf("_")&&(d=d.split("_")[0]);-1<["sin","cos","tan"].indexOf(d)&&(c=Entry.toRadian(c));var e=0;switch(d){case "square":e=c*c;break;case "factorial":e=Entry.factorial(c);break;case "root":e=Math.sqrt(c);break;case "log":e=Math.log(c)/Math.LN10;break;case "ln":e=Math.log(c);break;case "asin":case "acos":case "atan":e= Entry.toDegrees(Math[d](c));break;case "unnatural":e=c-Math.floor(c);0>c&&(e=1-e);break;default:e=Math[d](c)}return Math.round(1E3*e)/1E3}; Blockly.Blocks.calc_rand={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_calc_rand_1,calcFontColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_calc_rand_2,calcFontColor);this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_calc_rand_3,calcFontColor);this.setInputsInline(!0)}}; -Entry.block.calc_rand=function(a,b){var c=b.getStringValue("LEFTHAND",b),d=b.getStringValue("RIGHTHAND",b),e=Math.min(c,d),f=Math.max(c,d),c=Entry.isFloat(c);return Entry.isFloat(d)||c?(Math.random()*(f-e)+e).toFixed(2):Math.floor(Math.random()*(f-e+1)+e)}; +Entry.block.calc_rand=function(b,a){var c=a.getStringValue("LEFTHAND",a),d=a.getStringValue("RIGHTHAND",a),e=Math.min(c,d),f=Math.max(c,d),c=Entry.isFloat(c);return Entry.isFloat(d)||c?(Math.random()*(f-e)+e).toFixed(2):Math.floor(Math.random()*(f-e+1)+e)}; Blockly.Blocks.get_date={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_get_date_1,calcFontColor).appendField(new Blockly.FieldDropdown([[Lang.Blocks.CALC_get_date_year,"YEAR"],[Lang.Blocks.CALC_get_date_month,"MONTH"],[Lang.Blocks.CALC_get_date_day,"DAY"],[Lang.Blocks.CALC_get_date_hour,"HOUR"],[Lang.Blocks.CALC_get_date_minute,"MINUTE"],[Lang.Blocks.CALC_get_date_second,"SECOND"]],null,!0,calcArrowColor),"VALUE");this.appendDummyInput().appendField(" ").appendField(Lang.Blocks.CALC_get_date_2, -calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.get_date=function(a,b){var c=b.getField("VALUE",b),d=new Date;return"YEAR"==c?d.getFullYear():"MONTH"==c?d.getMonth()+1:"DAY"==c?d.getDate():"HOUR"==c?d.getHours():"MINUTE"==c?d.getMinutes():d.getSeconds()}; +calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.get_date=function(b,a){var c=a.getField("VALUE",a),d=new Date;return"YEAR"==c?d.getFullYear():"MONTH"==c?d.getMonth()+1:"DAY"==c?d.getDate():"HOUR"==c?d.getHours():"MINUTE"==c?d.getMinutes():d.getSeconds()}; Blockly.Blocks.get_sound_duration={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_get_sound_duration_1,calcFontColor);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("sounds",null,!0,calcArrowColor),"VALUE");this.appendDummyInput().appendField(Lang.Blocks.CALC_get_sound_duration_2,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.get_sound_duration=function(a,b){for(var c=b.getField("VALUE",b),d=a.parent.sounds,e=0;ed||d>c.length-1)throw Error();return c[d]}; -Blockly.Blocks.length_of_string={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_length_of_string_1,calcFontColor);this.appendValueInput("STRING").setCheck(["Number","String"]);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_length_of_string_2,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.length_of_string=function(a,b){return b.getStringValue("STRING",b).length}; +Entry.block.char_at=function(b,a){var c=a.getStringValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a)-1;if(0>d||d>c.length-1)throw Error();return c[d]}; +Blockly.Blocks.length_of_string={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_length_of_string_1,calcFontColor);this.appendValueInput("STRING").setCheck(["Number","String"]);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_length_of_string_2,calcFontColor);this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.length_of_string=function(b,a){return a.getStringValue("STRING",a).length}; Blockly.Blocks.substring={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_substring_1,calcFontColor);this.appendValueInput("STRING").setCheck(["Number","String"]);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_substring_2,calcFontColor);this.appendValueInput("START").setCheck(["Number","String"]);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_substring_3,calcFontColor);this.appendValueInput("END").setCheck(["Number","String"]); -this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_substring_4,calcFontColor);this.setOutput(!0,"String");this.setInputsInline(!0)}};Entry.block.substring=function(a,b){var c=b.getStringValue("STRING",b),d=b.getNumberValue("START",b)-1,e=b.getNumberValue("END",b)-1,f=c.length-1;if(0>d||0>e||d>f||e>f)throw Error();return c.substring(Math.min(d,e),Math.max(d,e)+1)}; +this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_substring_4,calcFontColor);this.setOutput(!0,"String");this.setInputsInline(!0)}};Entry.block.substring=function(b,a){var c=a.getStringValue("STRING",a),d=a.getNumberValue("START",a)-1,e=a.getNumberValue("END",a)-1,f=c.length-1;if(0>d||0>e||d>f||e>f)throw Error();return c.substring(Math.min(d,e),Math.max(d,e)+1)}; Blockly.Blocks.replace_string={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_replace_string_1,calcFontColor);this.appendValueInput("STRING").setCheck(["Number","String"]);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_replace_string_2,calcFontColor);this.appendValueInput("OLD_WORD").setCheck(["Number","String"]);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_replace_string_3,calcFontColor);this.appendValueInput("NEW_WORD").setCheck(["Number", -"String"]);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_replace_string_4,calcFontColor);this.setOutput(!0,"String");this.setInputsInline(!0)}};Entry.block.replace_string=function(a,b){return b.getStringValue("STRING",b).replace(new RegExp(b.getStringValue("OLD_WORD",b),"gm"),b.getStringValue("NEW_WORD",b))}; +"String"]);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_replace_string_4,calcFontColor);this.setOutput(!0,"String");this.setInputsInline(!0)}};Entry.block.replace_string=function(b,a){return a.getStringValue("STRING",a).replace(new RegExp(a.getStringValue("OLD_WORD",a),"gm"),a.getStringValue("NEW_WORD",a))}; Blockly.Blocks.change_string_case={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_change_string_case_1,calcFontColor);this.appendValueInput("STRING").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.CALC_change_string_case_2,calcFontColor);this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.CALC_change_string_case_sub_1,"toUpperCase"],[Lang.Blocks.CALC_change_string_case_sub_2,"toLowerCase"]], -null,!0,calcArrowColor),"CASE");this.appendDummyInput().appendField(Lang.Blocks.CALC_change_string_case_3,calcFontColor);this.setOutput(!0,"String");this.setInputsInline(!0)}};Entry.block.change_string_case=function(a,b){return b.getStringValue("STRING",b)[b.getField("CASE",b)]()}; +null,!0,calcArrowColor),"CASE");this.appendDummyInput().appendField(Lang.Blocks.CALC_change_string_case_3,calcFontColor);this.setOutput(!0,"String");this.setInputsInline(!0)}};Entry.block.change_string_case=function(b,a){return a.getStringValue("STRING",a)[a.getField("CASE",a)]()}; Blockly.Blocks.index_of_string={init:function(){this.setColour(calcBlockColor);this.appendDummyInput().appendField(Lang.Blocks.CALC_index_of_string_1,calcFontColor);this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_index_of_string_2,calcFontColor);this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Number");this.appendDummyInput("VALUE").appendField(Lang.Blocks.CALC_index_of_string_3,calcFontColor); -this.setInputsInline(!0)}};Entry.block.index_of_string=function(a,b){var c=b.getStringValue("LEFTHAND",b),d=b.getStringValue("RIGHTHAND",b),c=c.indexOf(d);return-1c)throw Error(Lang.Blocks.FLOW_repeat_basic_errorMsg);b.iterCount=Math.floor(c)}if(0==b.iterCount||0>b.iterCount)return delete b.isLooped,delete b.iterCount,b.callReturn();b.iterCount--;return b.getStatement("DO",b)}; -Blockly.Blocks.repeat_inf={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_repeat_inf).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.appendStatementInput("DO");this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.repeat_inf=function(a,b){b.isLooped=!0;return b.getStatement("DO")}; -Blockly.Blocks.stop_repeat={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_stop_repeat).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.stop_repeat=function(a,b){for(var c=b;"REPEAT"!=c.type.substr(0,6).toUpperCase()&&c.parentScript;)c=c.parentScript,delete c.isLooped,delete c.iterCount;var d=c.callReturn();return c.statements&&d?d:c?null:b.callReturn()}; +Entry.block.repeat_basic=function(b,a){var c;if(!a.isLooped){a.isLooped=!0;c=a.getNumberValue("VALUE",a);if(0>c)throw Error(Lang.Blocks.FLOW_repeat_basic_errorMsg);a.iterCount=Math.floor(c)}if(0==a.iterCount||0>a.iterCount)return delete a.isLooped,delete a.iterCount,a.callReturn();a.iterCount--;return a.getStatement("DO",a)}; +Blockly.Blocks.repeat_inf={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_repeat_inf).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.appendStatementInput("DO");this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.repeat_inf=function(b,a){a.isLooped=!0;return a.getStatement("DO")}; +Blockly.Blocks.stop_repeat={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_stop_repeat).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.stop_repeat=function(b,a){return this.executor.break()}; Blockly.Blocks.wait_until_true={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_wait_until_true_1);this.appendValueInput("BOOL").setCheck("Boolean");this.appendDummyInput().appendField(Lang.Blocks.FLOW_wait_until_true_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.wait_until_true=function(a,b){return b.getBooleanValue("BOOL",b)?b.callReturn():b}; +Entry.block.wait_until_true=function(b,a){return a.getBooleanValue("BOOL",a)?a.callReturn():a}; Blockly.Blocks._if={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW__if_1);this.appendValueInput("BOOL").setCheck("Boolean");this.appendDummyInput().appendField(Lang.Blocks.FLOW__if_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.appendStatementInput("STACK");this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block._if=function(a,b){return b.isLooped?(delete b.isLooped,b.callReturn()):b.getBooleanValue("BOOL",b)?(b.isLooped=!0,b.getStatement("STACK",b)):b.callReturn()}; +Entry.block._if=function(b,a){return a.isLooped?(delete a.isLooped,a.callReturn()):a.getBooleanValue("BOOL",a)?(a.isLooped=!0,a.getStatement("STACK",a)):a.callReturn()}; Blockly.Blocks.if_else={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_if_else_1);this.appendValueInput("BOOL").setCheck("Boolean");this.appendDummyInput().appendField(Lang.Blocks.FLOW_if_else_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.appendStatementInput("STACK_IF");this.appendDummyInput().appendField(Lang.Blocks.FLOW_if_else_3);this.appendStatementInput("STACK_ELSE");this.setInputsInline(!0);this.setPreviousStatement(!0); -this.setNextStatement(!0)}};Entry.block.if_else=function(a,b){if(b.isLooped)return delete b.isLooped,b.callReturn();var c=b.getBooleanValue("BOOL",b);b.isLooped=!0;return c?b.getStatement("STACK_IF",b):b.getStatement("STACK_ELSE",b)}; +this.setNextStatement(!0)}};Entry.block.if_else=function(b,a){if(a.isLooped)return delete a.isLooped,a.callReturn();var c=a.getBooleanValue("BOOL",a);a.isLooped=!0;return c?a.getStatement("STACK_IF",a):a.getStatement("STACK_ELSE",a)}; Blockly.Blocks.create_clone={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_create_clone_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("clone"),"VALUE");this.appendDummyInput().appendField(Lang.Blocks.FLOW_create_clone_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.create_clone=function(a,b){var c=b.getField("VALUE",b),d=b.callReturn();"self"==c?a.parent.addCloneEntity(a.parent,a,null):Entry.container.getObject(c).addCloneEntity(a.parent,null,null);return d};Blockly.Blocks.delete_clone={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_delete_clone).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0)}}; -Entry.block.delete_clone=function(a,b){if(!a.isClone)return b.callReturn();a.removeClone()};Blockly.Blocks.when_clone_start={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_icon_clone.png","*","start")).appendField(Lang.Blocks.FLOW_when_clone_start);this.setInputsInline(!0);this.setNextStatement(!0)}};Entry.block.when_clone_start=function(a,b){return b.callReturn()}; -Blockly.Blocks.stop_run={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_stop_run).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.stop_run=function(a,b){return Entry.engine.toggleStop()}; +Entry.block.create_clone=function(b,a){var c=a.getField("VALUE",a),d=a.callReturn();"self"==c?b.parent.addCloneEntity(b.parent,b,null):Entry.container.getObject(c).addCloneEntity(b.parent,null,null);return d};Blockly.Blocks.delete_clone={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_delete_clone).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0)}}; +Entry.block.delete_clone=function(b,a){if(!b.isClone)return a.callReturn();b.removeClone()};Blockly.Blocks.when_clone_start={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_icon_clone.png","*","start")).appendField(Lang.Blocks.FLOW_when_clone_start);this.setInputsInline(!0);this.setNextStatement(!0)}};Entry.block.when_clone_start=function(b,a){return a.callReturn()}; +Blockly.Blocks.stop_run={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_stop_run).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.stop_run=function(b,a){return Entry.engine.toggleStop()}; Blockly.Blocks.repeat_while_true={init:function(){this.setColour("#498deb");"ko"==Lang.type?(this.appendDummyInput().appendField(Lang.Blocks.FLOW_repeat_while_true_1),this.appendValueInput("BOOL").setCheck("Boolean"),this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.FLOW_repeat_while_true_until,"until"],[Lang.Blocks.FLOW_repeat_while_true_while,"while"]]),"OPTION").appendField(Lang.Blocks.FLOW_repeat_while_true_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png", "*"))):(this.appendDummyInput().appendField(Lang.Blocks.FLOW_repeat_while_true_1),this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.FLOW_repeat_while_true_until,"until"],[Lang.Blocks.FLOW_repeat_while_true_while,"while"]]),"OPTION"),this.appendValueInput("BOOL").setCheck("Boolean"),this.appendDummyInput().appendField(Lang.Blocks.FLOW_repeat_while_true_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*")));this.appendStatementInput("DO"); -this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.repeat_while_true=function(a,b){var c=b.getBooleanValue("BOOL",b);"until"==b.getField("OPTION",b)&&(c=!c);return(b.isLooped=c)?b.getStatement("DO",b):b.callReturn()}; +this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.repeat_while_true=function(b,a){var c=a.getBooleanValue("BOOL",a);"until"==a.getField("OPTION",a)&&(c=!c);return(a.isLooped=c)?a.getStatement("DO",a):a.callReturn()}; Blockly.Blocks.stop_object={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_stop_object_1);this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.FLOW_stop_object_all,"all"],[Lang.Blocks.FLOW_stop_object_this_object,"thisOnly"],[Lang.Blocks.FLOW_stop_object_this_thread,"thisThread"],[Lang.Blocks.FLOW_stop_object_other_thread,"otherThread"]]),"TARGET");this.appendDummyInput().appendField(Lang.Blocks.FLOW_stop_object_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/flow_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.stop_object=function(a,b){var c=b.getField("TARGET",b),d=Entry.container;switch(c){case "all":d.mapEntityIncludeCloneOnScene(function(b){b.clearScript()});break;case "thisObject":a.clearScript();c=a.parent.clonedEntities;c.map(function(b){b.clearScript()});break;case "thisOnly":a.clearScript();break;case "otherThread":return a.clearScript(),c=a.parent.clonedEntities,c.map(function(b){b.clearScript()}),b.callReturn()}return null}; -Blockly.Blocks.restart_project={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_restart).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0)}};Entry.block.restart_project=function(a,b){Entry.engine.toggleStop();Entry.engine.toggleRun()}; -Blockly.Blocks.remove_all_clones={init:function(){this.setColour("#498deb");this.appendDummyInput().appendField(Lang.Blocks.FLOW_delete_clone_all).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/flow_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.remove_all_clones=function(a,b){var c=a.parent.getClonedEntities();c.map(function(b){b.removeClone()});c=null;return b.callReturn()};Blockly.Blocks.function_field_label={init:function(){this.setColour("#f9c535");this.appendDummyInput().appendField(new Blockly.FieldTextInput(Lang.Blocks.FUNCTION_explanation_1),"NAME");this.appendValueInput("NEXT").setCheck(["Param"]);this.setOutput(!0,"Param");this.setInputsInline(!0)}};Blockly.Blocks.function_field_string={init:function(){this.setColour("#FFD974");this.appendValueInput("PARAM").setCheck(["String"]);this.appendValueInput("NEXT").setCheck(["Param"]);this.setOutput(!0,"Param");this.setInputsInline(!0)}}; -Blockly.Blocks.function_field_boolean={init:function(){this.setColour("#AEB8FF");this.appendValueInput("PARAM").setCheck(["Boolean"]);this.appendValueInput("NEXT").setCheck(["Param"]);this.setOutput(!0,"Param");this.setInputsInline(!0)}}; -Blockly.Blocks.function_param_string={init:function(){this.setEditable(!1);this.setColour("#FFD974");this.setOutput(!0,["String","Number"]);this.setInputsInline(!0)},domToMutation:function(a){a.getElementsByTagName("field");this.hashId=a.getAttribute("hashid");(a=Entry.Func.targetFunc.stringHash[this.hashId])||(a="");this.appendDummyInput().appendField(new Blockly.FieldTextInput(Lang.Blocks.FUNCTION_character_variable+a),"")},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("hashid", -this.hashId);return a}};Entry.block.function_param_string=function(a,b,c){return b.register[b.hashId].run()}; -Blockly.Blocks.function_param_boolean={init:function(){this.setEditable(!1);this.setColour("#AEB8FF");this.setOutput(!0,"Boolean");this.setInputsInline(!0)},domToMutation:function(a){a.getElementsByTagName("field");this.hashId=a.getAttribute("hashid");(a=Entry.Func.targetFunc.booleanHash[this.hashId])||(a="");this.appendDummyInput().appendField(new Blockly.FieldTextInput(Lang.Blocks.FUNCTION_logical_variable+a),"")},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("hashid", -this.hashId);return a}};Entry.block.function_param_boolean=function(a,b,c){return b.register[b.hashId].run()};Blockly.Blocks.function_create={init:function(){this.appendDummyInput().appendField(Lang.Blocks.FUNCTION_define);this.setColour("#cc7337");this.appendValueInput("FIELD").setCheck(["Param"]);this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/function_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0)}}; -Entry.block.function_create=function(a,b){return b.callReturn()}; -Blockly.Blocks.function_general={init:function(){this.setColour("#cc7337");this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)},domToMutation:function(a){var b=a.getElementsByTagName("field");this.appendDummyInput().appendField("");b.length||this.appendDummyInput().appendField(Lang.Blocks.FUNCTION_function);for(var c=0;cb.count?(50>d.leftFloor&&50>d.rightFloor?b.count++:b.count=0,d=d.leftFloor-d.rightFloor,c.leftWheel=45+.25*d,c.rightWheel=45-.25*d):(b.count=0,b.boardState=2);break;case 2:d=d.leftFloor-d.rightFloor;c.leftWheel=45+.25*d;c.rightWheel=45-.25*d;b.boardState=3;var e=setTimeout(function(){b.boardState=4;Entry.Hamster.removeTimeout(e)},250);Entry.Hamster.timeouts.push(e); -break;case 3:d=d.leftFloor-d.rightFloor;c.leftWheel=45+.25*d;c.rightWheel=45-.25*d;break;case 4:c.leftWheel=0,c.rightWheel=0,b.boardState=0,b.isMoving=!1}return b}delete b.isStart;delete b.isMoving;delete b.count;delete b.boardState;Entry.engine.isContinue=!1;c.leftWheel=0;c.rightWheel=0;return b.callReturn()}b.isStart=!0;b.isMoving=!0;b.count=0;b.boardState=1;c.leftWheel=45;c.rightWheel=45;Entry.Hamster.setLineTracerMode(c,0);return b}; +Entry.block.hamster_move_forward_once=function(b,a){var c=Entry.hw.sendQueue,d=Entry.hw.portData;if(a.isStart){if(a.isMoving){switch(a.boardState){case 1:2>a.count?(50>d.leftFloor&&50>d.rightFloor?a.count++:a.count=0,d=d.leftFloor-d.rightFloor,c.leftWheel=45+.25*d,c.rightWheel=45-.25*d):(a.count=0,a.boardState=2);break;case 2:d=d.leftFloor-d.rightFloor;c.leftWheel=45+.25*d;c.rightWheel=45-.25*d;a.boardState=3;var e=setTimeout(function(){a.boardState=4;Entry.Hamster.removeTimeout(e)},250);Entry.Hamster.timeouts.push(e); +break;case 3:d=d.leftFloor-d.rightFloor;c.leftWheel=45+.25*d;c.rightWheel=45-.25*d;break;case 4:c.leftWheel=0,c.rightWheel=0,a.boardState=0,a.isMoving=!1}return a}delete a.isStart;delete a.isMoving;delete a.count;delete a.boardState;Entry.engine.isContinue=!1;c.leftWheel=0;c.rightWheel=0;return a.callReturn()}a.isStart=!0;a.isMoving=!0;a.count=0;a.boardState=1;c.leftWheel=45;c.rightWheel=45;Entry.Hamster.setLineTracerMode(c,0);return a}; Blockly.Blocks.hamster_turn_once={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_turn_once_1).appendField(new Blockly.FieldDropdown([[Lang.General.left,"LEFT"],[Lang.General.right,"RIGHT"]]),"DIRECTION").appendField(Lang.Blocks.HAMSTER_turn_once_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.hamster_turn_once=function(a,b){var c=Entry.hw.sendQueue,d=Entry.hw.portData;if(b.isStart){if(b.isMoving){if(b.isLeft)switch(b.boardState){case 1:2>b.count?50d.leftFloor&&(b.boardState=3);break;case 3:2>b.count?20>d.leftFloor&&b.count++:(b.count=0,b.boardState=4);break;case 4:50b.count?50d.rightFloor&&(b.boardState=3);break;case 3:2>b.count?20>d.rightFloor&&b.count++:(b.count=0,b.boardState=4);break;case 4:50a.count?50d.leftFloor&&(a.boardState=3);break;case 3:2>a.count?20>d.leftFloor&&a.count++:(a.count=0,a.boardState=4);break;case 4:50a.count?50d.rightFloor&&(a.boardState=3);break;case 3:2>a.count?20>d.rightFloor&&a.count++:(a.count=0,a.boardState=4);break;case 4:50Entry.Hamster.tempo&&(Entry.Hamster.tempo=1);return b.callReturn()}; +Entry.block.hamster_change_tempo_by=function(b,a){Entry.Hamster.tempo+=a.getNumberValue("VALUE");1>Entry.Hamster.tempo&&(Entry.Hamster.tempo=1);return a.callReturn()}; Blockly.Blocks.hamster_set_tempo_to={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_set_tempo_to_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_set_tempo_to_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.hamster_set_tempo_to=function(a,b){Entry.Hamster.tempo=b.getNumberValue("VALUE");1>Entry.Hamster.tempo&&(Entry.Hamster.tempo=1);return b.callReturn()}; +Entry.block.hamster_set_tempo_to=function(b,a){Entry.Hamster.tempo=a.getNumberValue("VALUE");1>Entry.Hamster.tempo&&(Entry.Hamster.tempo=1);return a.callReturn()}; Blockly.Blocks.hamster_set_port_to={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_set_port_to_1).appendField(new Blockly.FieldDropdown([[Lang.Blocks.HAMSTER_port_a,"A"],[Lang.Blocks.HAMSTER_port_b,"B"],[Lang.Blocks.HAMSTER_port_ab,"AB"]]),"PORT").appendField(Lang.Blocks.HAMSTER_set_port_to_2).appendField(new Blockly.FieldDropdown([[Lang.Blocks.HAMSTER_analog_input,"0"],[Lang.Blocks.HAMSTER_digital_input,"1"],[Lang.Blocks.HAMSTER_servo_output,"8"], -[Lang.Blocks.HAMSTER_pwm_output,"9"],[Lang.Blocks.HAMSTER_digital_output,"10"]]),"MODE").appendField(Lang.Blocks.HAMSTER_set_port_to_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.hamster_set_port_to=function(a,b){var c=Entry.hw.sendQueue,d=b.getField("PORT",b),e=+b.getField("MODE",b);"A"==d?c.ioModeA=e:("B"!=d&&(c.ioModeA=e),c.ioModeB=e);return b.callReturn()}; +[Lang.Blocks.HAMSTER_pwm_output,"9"],[Lang.Blocks.HAMSTER_digital_output,"10"]]),"MODE").appendField(Lang.Blocks.HAMSTER_set_port_to_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.hamster_set_port_to=function(b,a){var c=Entry.hw.sendQueue,d=a.getField("PORT",a),e=Number(a.getField("MODE",a));"A"==d?c.ioModeA=e:("B"!=d&&(c.ioModeA=e),c.ioModeB=e);return a.callReturn()}; Blockly.Blocks.hamster_change_output_by={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_change_output_by_1).appendField(new Blockly.FieldDropdown([[Lang.Blocks.HAMSTER_port_a,"A"],[Lang.Blocks.HAMSTER_port_b,"B"],[Lang.Blocks.HAMSTER_port_ab,"AB"]]),"PORT").appendField(Lang.Blocks.HAMSTER_change_output_by_2);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_change_output_by_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.hamster_change_output_by=function(a,b){var c=Entry.hw.sendQueue,d=b.getField("PORT"),e=b.getNumberValue("VALUE");"A"==d?c.outputA=void 0!=c.outputA?c.outputA+e:e:("B"!=d&&(c.outputA=void 0!=c.outputA?c.outputA+e:e),c.outputB=void 0!=c.outputB?c.outputB+e:e);return b.callReturn()}; +"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.hamster_change_output_by=function(b,a){var c=Entry.hw.sendQueue,d=a.getField("PORT"),e=a.getNumberValue("VALUE");"A"==d?c.outputA=void 0!=c.outputA?c.outputA+e:e:("B"!=d&&(c.outputA=void 0!=c.outputA?c.outputA+e:e),c.outputB=void 0!=c.outputB?c.outputB+e:e);return a.callReturn()}; Blockly.Blocks.hamster_set_output_to={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_set_output_to_1).appendField(new Blockly.FieldDropdown([[Lang.Blocks.HAMSTER_port_a,"A"],[Lang.Blocks.HAMSTER_port_b,"B"],[Lang.Blocks.HAMSTER_port_ab,"AB"]]),"PORT").appendField(Lang.Blocks.HAMSTER_set_output_to_2);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.HAMSTER_set_output_to_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.hamster_set_output_to=function(a,b){var c=Entry.hw.sendQueue,d=b.getField("PORT"),e=b.getNumberValue("VALUE");"A"==d?c.outputA=e:("B"!=d&&(c.outputA=e),c.outputB=e);return b.callReturn()};Blockly.Blocks.is_clicked={init:function(){this.setColour("#AEB8FF");this.appendDummyInput().appendField(Lang.Blocks.JUDGEMENT_is_clicked,"#3D3D3D");this.setOutput(!0,"Boolean");this.setInputsInline(!0)}};Entry.block.is_clicked=function(a,b){return Entry.stage.isClick}; -Blockly.Blocks.is_press_some_key={init:function(){this.setColour("#AEB8FF");this.appendDummyInput().appendField(Lang.Blocks.JUDGEMENT_is_press_some_key_1,"#3D3D3D");this.appendDummyInput().appendField(new Blockly.FieldKeydownInput("81"),"VALUE").appendField(Lang.Blocks.JUDGEMENT_is_press_some_key_2,"#3D3D3D");this.setOutput(!0,"Boolean");this.setInputsInline(!0)}};Entry.block.is_press_some_key=function(a,b){var c=+b.getField("VALUE",b);return 0<=Entry.engine.pressedKeys.indexOf(c)}; +"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.hamster_set_output_to=function(b,a){var c=Entry.hw.sendQueue,d=a.getField("PORT"),e=a.getNumberValue("VALUE");"A"==d?c.outputA=e:("B"!=d&&(c.outputA=e),c.outputB=e);return a.callReturn()};Blockly.Blocks.is_clicked={init:function(){this.setColour("#AEB8FF");this.appendDummyInput().appendField(Lang.Blocks.JUDGEMENT_is_clicked,"#3D3D3D");this.setOutput(!0,"Boolean");this.setInputsInline(!0)}};Entry.block.is_clicked=function(b,a){return Entry.stage.isClick}; +Blockly.Blocks.is_press_some_key={init:function(){this.setColour("#AEB8FF");this.appendDummyInput().appendField(Lang.Blocks.JUDGEMENT_is_press_some_key_1,"#3D3D3D");this.appendDummyInput().appendField(new Blockly.FieldKeydownInput("81"),"VALUE").appendField(Lang.Blocks.JUDGEMENT_is_press_some_key_2,"#3D3D3D");this.setOutput(!0,"Boolean");this.setInputsInline(!0)}};Entry.block.is_press_some_key=function(b,a){var c=Number(a.getField("VALUE",a));return 0<=Entry.pressedKeys.indexOf(c)}; Blockly.Blocks.reach_something={init:function(){this.setColour("#AEB8FF");this.appendDummyInput().appendField(Lang.Blocks.JUDGEMENT_reach_something_1,"#3D3D3D");this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("collision"),"VALUE");this.appendDummyInput().appendField(Lang.Blocks.JUDGEMENT_reach_something_2,"#3D3D3D");this.setOutput(!0,"Boolean");this.setInputsInline(!0)}}; -Entry.block.reach_something=function(a,b){if(!a.getVisible())return!1;var c=b.getField("VALUE",b),d=a.object,e=/wall/.test(c),f=ndgmr.checkPixelCollision;if(e)switch(e=Entry.stage.wall,c){case "wall":if(f(d,e.up,.2,!0)||f(d,e.down,.2,!0)||f(d,e.left,.2,!0)||f(d,e.right,.2,!0))return!0;break;case "wall_up":if(f(d,e.up,.2,!0))return!0;break;case "wall_down":if(f(d,e.down,.2,!0))return!0;break;case "wall_right":if(f(d,e.right,.2,!0))return!0;break;case "wall_left":if(f(d,e.left,.2,!0))return!0}else{if("mouse"== -c)return f=Entry.stage.canvas,f=d.globalToLocal(f.mouseX,f.mouseY),d.hitTest(f.x,f.y);c=Entry.container.getEntity(c);if("textBox"==c.type||"textBox"==a.type){f=c.object.getTransformedBounds();d=d.getTransformedBounds();if(Entry.checkCollisionRect(d,f))return!0;for(var c=c.parent.clonedEntities,e=0,g=c.length;e","BIGGER"]]),"OPERATOR");this.appendValueInput("RIGHTHAND").setCheck(["String","Number"]);this.setOutput(!0,"Boolean");this.setInputsInline(!0)}}; -Entry.block.boolean_comparison=function(a,b){var c=b.getField("OPERATOR",b),d=b.getNumberValue("LEFTHAND",b),e=b.getNumberValue("RIGHTHAND",b);return"EQUAL"==c?d==e:"BIGGER"==c?d>e:d","#3D3D3D");this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Boolean");this.setInputsInline(!0)}}; -Entry.block.boolean_bigger=function(a,b){var c=b.getNumberValue("LEFTHAND",b),d=b.getNumberValue("RIGHTHAND",b);return c>d};Blockly.Blocks.boolean_smaller={init:function(){this.setColour("#AEB8FF");this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput().appendField("<","#3D3D3D");this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Boolean");this.setInputsInline(!0)}}; -Entry.block.boolean_smaller=function(a,b){var c=b.getNumberValue("LEFTHAND",b),d=b.getNumberValue("RIGHTHAND",b);return ce:d","#3D3D3D");this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Boolean");this.setInputsInline(!0)}}; +Entry.block.boolean_bigger=function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return c>d};Blockly.Blocks.boolean_smaller={init:function(){this.setColour("#AEB8FF");this.appendValueInput("LEFTHAND").setCheck(["Number","String"]);this.appendDummyInput().appendField("<","#3D3D3D");this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Boolean");this.setInputsInline(!0)}}; +Entry.block.boolean_smaller=function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return c","GREATER"],["<","LESS"],["\u2265","GREATER_OR_EQUAL"],["\u2264","LESS_OR_EQUAL"]],null,!1),"OPERATOR");this.appendValueInput("RIGHTHAND").setCheck(["Number","String"]);this.setOutput(!0,"Boolean");this.setInputsInline(!0)}}; -Entry.block.boolean_basic_operator=function(a,b){var c=b.getField("OPERATOR",b),d=b.getStringValue("LEFTHAND",b),e=b.getStringValue("RIGHTHAND",b);switch(c){case "EQUAL":return d==e;case "GREATER":return+d>+e;case "LESS":return+d<+e;case "GREATER_OR_EQUAL":return+d>=+e;case "LESS_OR_EQUAL":return+d<=+e}};Blockly.Blocks.show={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_show).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.show=function(a,b){a.setVisible(!0);return b.callReturn()}; -Blockly.Blocks.hide={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_hide).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.hide=function(a,b){a.setVisible(!1);return b.callReturn()}; +Entry.block.boolean_basic_operator=function(b,a){var c=a.getField("OPERATOR",a),d=a.getStringValue("LEFTHAND",a),e=a.getStringValue("RIGHTHAND",a);switch(c){case "EQUAL":return d==e;case "GREATER":return Number(d)>Number(e);case "LESS":return Number(d)=Number(e);case "LESS_OR_EQUAL":return Number(d)<=Number(e)}};Blockly.Blocks.show={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_show).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.show=function(b,a){b.setVisible(!0);return a.callReturn()}; +Blockly.Blocks.hide={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_hide).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.hide=function(b,a){b.setVisible(!1);return a.callReturn()}; Blockly.Blocks.dialog_time={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_dialog_time_1);this.appendValueInput("VALUE").setCheck(["String","Number",null]);this.appendDummyInput().appendField(Lang.Blocks.LOOKS_dialog_time_2);this.appendValueInput("SECOND").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.LOOKS_dialog_time_3);this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.speak,"speak"]]),"OPTION"); this.appendDummyInput().appendField(Lang.Blocks.LOOKS_dialog_time_4).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.dialog_time=function(a,b){if(!b.isStart){var c=b.getNumberValue("SECOND",b),d=b.getStringValue("VALUE",b),e=b.getField("OPTION",b);b.isStart=!0;b.timeFlag=1;d||"number"==typeof d||(d=" ");d=Entry.convertToRoundedDecimals(d,3);new Entry.Dialog(a,d,e);a.syncDialogVisible(a.getVisible());setTimeout(function(){b.timeFlag=0},1E3*c)}return 0==b.timeFlag?(delete b.timeFlag,delete b.isStart,a.dialog&&a.dialog.remove(),b.callReturn()):b}; +Entry.block.dialog_time=function(b,a){if(!a.isStart){var c=a.getNumberValue("SECOND",a),d=a.getStringValue("VALUE",a),e=a.getField("OPTION",a);a.isStart=!0;a.timeFlag=1;d||"number"==typeof d||(d=" ");d=Entry.convertToRoundedDecimals(d,3);new Entry.Dialog(b,d,e);b.syncDialogVisible(b.getVisible());setTimeout(function(){a.timeFlag=0},1E3*c)}return 0==a.timeFlag?(delete a.timeFlag,delete a.isStart,b.dialog&&b.dialog.remove(),a.callReturn()):a}; Blockly.Blocks.dialog={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_dialog_1);this.appendValueInput("VALUE").setCheck(["String","Number",null]);this.appendDummyInput().appendField(Lang.Blocks.LOOKS_dialog_2);this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.speak,"speak"]]),"OPTION");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_dialog_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png", -"*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.dialog=function(a,b){var c=b.getStringValue("VALUE",b);c||"number"==typeof c||(c=" ");var d=b.getField("OPTION",b),c=Entry.convertToRoundedDecimals(c,3);new Entry.Dialog(a,c,d);a.syncDialogVisible(a.getVisible());return b.callReturn()}; -Blockly.Blocks.remove_dialog={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_remove_dialog).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.remove_dialog=function(a,b){a.dialog&&a.dialog.remove();return b.callReturn()}; +"*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.dialog=function(b,a){var c=a.getStringValue("VALUE",a);c||"number"==typeof c||(c=" ");var d=a.getField("OPTION",a),c=Entry.convertToRoundedDecimals(c,3);new Entry.Dialog(b,c,d);b.syncDialogVisible(b.getVisible());return a.callReturn()}; +Blockly.Blocks.remove_dialog={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_remove_dialog).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.remove_dialog=function(b,a){b.dialog&&b.dialog.remove();return a.callReturn()}; Blockly.Blocks.change_to_nth_shape={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_change_to_nth_shape_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("pictures"),"VALUE");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_change_to_nth_shape_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.change_to_nth_shape=function(a,b){var c=b.getField("VALUE",b),c=a.parent.getPicture(c);a.setImage(c);return b.callReturn()}; +Entry.block.change_to_nth_shape=function(b,a){var c=a.getField("VALUE",a),c=b.parent.getPicture(c);b.setImage(c);return a.callReturn()}; Blockly.Blocks.change_to_next_shape={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_change_to_near_shape_1).appendField(new Blockly.FieldDropdown([[Lang.Blocks.LOOKS_change_shape_next,"next"],[Lang.Blocks.LOOKS_change_shape_prev,"prev"]]),"DRIECTION").appendField(Lang.Blocks.LOOKS_change_to_near_shape_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.change_to_next_shape=function(a,b){var c;c=b.fields&&"prev"===b.getStringField("DRIECTION")?a.parent.getPrevPicture(a.picture.id):a.parent.getNextPicture(a.picture.id);a.setImage(c);return b.callReturn()}; +Entry.block.change_to_next_shape=function(b,a){var c;c=a.fields&&"prev"===a.getStringField("DRIECTION")?b.parent.getPrevPicture(b.picture.id):b.parent.getNextPicture(b.picture.id);b.setImage(c);return a.callReturn()}; Blockly.Blocks.set_effect_volume={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_set_effect_volume_1);this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.color,"color"],[Lang.Blocks.brightness,"brightness"],[Lang.Blocks.opacity,"opacity"]]),"EFFECT");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_set_effect_volume_2);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.LOOKS_set_effect_volume_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.set_effect_volume=function(a,b){var c=b.getField("EFFECT",b),d=b.getNumberValue("VALUE",b);"color"==c?a.effect.hue=d+a.effect.hue:"lens"!=c&&"swriling"!=c&&"pixel"!=c&&"mosaic"!=c&&("brightness"==c?a.effect.brightness=d+a.effect.brightness:"blur"!=c&&"opacity"==c&&(a.effect.alpha+=d/100));a.applyFilter();return b.callReturn()}; +"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.set_effect_volume=function(b,a){var c=a.getField("EFFECT",a),d=a.getNumberValue("VALUE",a);"color"==c?b.effect.hue=d+b.effect.hue:"lens"!=c&&"swriling"!=c&&"pixel"!=c&&"mosaic"!=c&&("brightness"==c?b.effect.brightness=d+b.effect.brightness:"blur"!=c&&"opacity"==c&&(b.effect.alpha+=d/100));b.applyFilter();return a.callReturn()}; Blockly.Blocks.set_effect={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_set_effect_1);this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.color,"color"],[Lang.Blocks.brightness,"brightness"],[Lang.Blocks.opacity,"opacity"]]),"EFFECT");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_set_effect_2);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.LOOKS_set_effect_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.set_effect=function(a,b){var c=b.getField("EFFECT",b),d=b.getNumberValue("VALUE",b);"color"==c?a.effect.hue=d:"lens"!=c&&"swriling"!=c&&"pixel"!=c&&"mosaic"!=c&&("brightness"==c?a.effect.brightness=d:"blur"!=c&&"opacity"==c&&(a.effect.alpha=d/100));a.applyFilter();return b.callReturn()}; -Blockly.Blocks.erase_all_effects={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_erase_all_effects).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.erase_all_effects=function(a,b){a.resetFilter();return b.callReturn()}; +"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.set_effect=function(b,a){var c=a.getField("EFFECT",a),d=a.getNumberValue("VALUE",a);"color"==c?b.effect.hue=d:"lens"!=c&&"swriling"!=c&&"pixel"!=c&&"mosaic"!=c&&("brightness"==c?b.effect.brightness=d:"blur"!=c&&"opacity"==c&&(b.effect.alpha=d/100));b.applyFilter();return a.callReturn()}; +Blockly.Blocks.erase_all_effects={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_erase_all_effects).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.erase_all_effects=function(b,a){b.resetFilter();return a.callReturn()}; Blockly.Blocks.change_scale_percent={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_change_scale_percent_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.LOOKS_change_scale_percent_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.change_scale_percent=function(a,b){var c=(b.getNumberValue("VALUE",b)+100)/100;a.setScaleX(a.getScaleX()*c);a.setScaleY(a.getScaleY()*c);return b.callReturn()}; +Entry.block.change_scale_percent=function(b,a){var c=(a.getNumberValue("VALUE",a)+100)/100;b.setScaleX(b.getScaleX()*c);b.setScaleY(b.getScaleY()*c);return a.callReturn()}; Blockly.Blocks.set_scale_percent={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_set_scale_percent_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.LOOKS_set_scale_percent_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.set_scale_percent=function(a,b){var c=b.getNumberValue("VALUE",b)/100,d=a.snapshot_;a.setScaleX(c*d.scaleX);a.setScaleY(c*d.scaleY);return b.callReturn()}; +Entry.block.set_scale_percent=function(b,a){var c=a.getNumberValue("VALUE",a)/100,d=b.snapshot_;b.setScaleX(c*d.scaleX);b.setScaleY(c*d.scaleY);return a.callReturn()}; Blockly.Blocks.change_scale_size={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_change_scale_percent_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.LOOKS_change_scale_percent_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.change_scale_size=function(a,b){var c=b.getNumberValue("VALUE",b);a.setSize(a.getSize()+c);return b.callReturn()}; +Entry.block.change_scale_size=function(b,a){var c=a.getNumberValue("VALUE",a);b.setSize(b.getSize()+c);return a.callReturn()}; Blockly.Blocks.set_scale_size={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_set_scale_percent_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.LOOKS_set_scale_percent_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.set_scale_size=function(a,b){var c=b.getNumberValue("VALUE",b);a.setSize(c);return b.callReturn()};Blockly.Blocks.flip_y={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_flip_y).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.flip_y=function(a,b){a.setScaleX(-1*a.getScaleX());return b.callReturn()}; -Blockly.Blocks.flip_x={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_flip_x).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.flip_x=function(a,b){a.setScaleY(-1*a.getScaleY());return b.callReturn()}; +Entry.block.set_scale_size=function(b,a){var c=a.getNumberValue("VALUE",a);b.setSize(c);return a.callReturn()};Blockly.Blocks.flip_y={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_flip_y).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.flip_y=function(b,a){b.setScaleX(-1*b.getScaleX());return a.callReturn()}; +Blockly.Blocks.flip_x={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_flip_x).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.flip_x=function(b,a){b.setScaleY(-1*b.getScaleY());return a.callReturn()}; Blockly.Blocks.set_object_order={init:function(){this.setColour("#EC4466");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_set_object_order_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("objectSequence"),"VALUE");this.appendDummyInput().appendField(Lang.Blocks.LOOKS_set_object_order_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.set_object_order=function(a,b){var c=b.getField("VALUE",b),d=Entry.container.getCurrentObjects().indexOf(a.parent);if(-1f)throw Error("object is not available for current scene");switch(d){case "FRONT":c=0;break;case "FORWARD":c=Math.max(0,f-1);break;case "BACKWARD":c=Math.min(e,f+1);break;case "BACK":c=e}Entry.container.moveElementByBlock(f,c);return b.callReturn()};Blockly.Blocks.move_direction={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_direction_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_direction_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.move_direction=function(a,b){var c=b.getNumberValue("VALUE",b);a.setX(a.getX()+c*Math.cos((a.getRotation()+a.getDirection()-90)/180*Math.PI));a.setY(a.getY()-c*Math.sin((a.getRotation()+a.getDirection()-90)/180*Math.PI));a.brush&&!a.brush.stop&&a.brush.lineTo(a.getX(),-1*a.getY());return b.callReturn()}; +"block_icon/looks_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.change_object_index=function(b,a){var c,d=a.getField("LOCATION",a),e=Entry.container.getCurrentObjects(),f=e.indexOf(b.parent),e=e.length-1;if(0>f)throw Error("object is not available for current scene");switch(d){case "FRONT":c=0;break;case "FORWARD":c=Math.max(0,f-1);break;case "BACKWARD":c=Math.min(e,f+1);break;case "BACK":c=e}Entry.container.moveElementByBlock(f,c);return a.callReturn()};Blockly.Blocks.move_direction={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_direction_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_direction_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; +Entry.block.move_direction=function(b,a){var c=a.getNumberValue("VALUE",a);b.setX(b.getX()+c*Math.cos((b.getRotation()+b.getDirection()-90)/180*Math.PI));b.setY(b.getY()-c*Math.sin((b.getRotation()+b.getDirection()-90)/180*Math.PI));b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}; Blockly.Blocks.move_x={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_x_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_x_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.move_x=function(a,b){var c=b.getNumberValue("VALUE",b);a.setX(a.getX()+c);a.brush&&!a.brush.stop&&a.brush.lineTo(a.getX(),-1*a.getY());return b.callReturn()}; +Entry.block.move_x=function(b,a){var c=a.getNumberValue("VALUE",a);b.setX(b.getX()+c);b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}; Blockly.Blocks.move_y={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_y_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_y_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.move_y=function(a,b){var c=b.getNumberValue("VALUE",b);a.setY(a.getY()+c);a.brush&&!a.brush.stop&&a.brush.lineTo(a.getX(),-1*a.getY());return b.callReturn()}; +Entry.block.move_y=function(b,a){var c=a.getNumberValue("VALUE",a);b.setY(b.getY()+c);b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}; Blockly.Blocks.locate_xy_time={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_xy_time_1);this.appendValueInput("VALUE1").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_xy_time_2);this.appendValueInput("VALUE2").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_xy_time_3);this.appendValueInput("VALUE3").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_xy_time_4).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ "block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.locate_xy_time=function(a,b){if(!b.isStart){var c;c=b.getNumberValue("VALUE1",b);b.isStart=!0;b.frameCount=Math.floor(c*Entry.FPS);b.x=b.getNumberValue("VALUE2",b);b.y=b.getNumberValue("VALUE3",b)}if(0!=b.frameCount){c=b.x-a.getX();var d=b.y-a.getY();c/=b.frameCount;d/=b.frameCount;a.setX(a.getX()+c);a.setY(a.getY()+d);b.frameCount--;a.brush&&!a.brush.stop&&a.brush.lineTo(a.getX(),-1*a.getY());return b}delete b.isStart;delete b.frameCount;return b.callReturn()}; +Entry.block.locate_xy_time=function(b,a){if(!a.isStart){var c;c=a.getNumberValue("VALUE1",a);a.isStart=!0;a.frameCount=Math.floor(c*Entry.FPS);a.x=a.getNumberValue("VALUE2",a);a.y=a.getNumberValue("VALUE3",a)}if(0!=a.frameCount){c=a.x-b.getX();var d=a.y-b.getY();c/=a.frameCount;d/=a.frameCount;b.setX(b.getX()+c);b.setY(b.getY()+d);a.frameCount--;b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a}delete a.isStart;delete a.frameCount;return a.callReturn()}; Blockly.Blocks.rotate_by_angle={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_rotate_by_angle_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_rotate_by_angle_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.rotate_by_angle=function(a,b){var c=b.getNumberValue("VALUE",b);a.setRotation(a.getRotation()+c);return b.callReturn()}; +Entry.block.rotate_by_angle=function(b,a){var c=a.getNumberValue("VALUE",a);b.setRotation(b.getRotation()+c);return a.callReturn()}; Blockly.Blocks.rotate_by_angle_dropdown={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_rotate_by_angle_dropdown_1);this.appendDummyInput().appendField(new Blockly.FieldDropdown([["45","45"],["90","90"],["135","135"],["180","180"]]),"VALUE").appendField(Lang.Blocks.MOVING_rotate_by_angle_dropdown_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.rotate_by_angle_dropdown=function(a,b){var c=b.getField("VALUE",b);a.setRotation(a.getRotation()+ +c);return b.callReturn()}; +Entry.block.rotate_by_angle_dropdown=function(b,a){var c=a.getField("VALUE",a);b.setRotation(b.getRotation()+Number(c));return a.callReturn()}; Blockly.Blocks.see_angle={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_see_angle_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_see_angle_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.see_angle=function(a,b){var c=b.getNumberValue("VALUE",b);a.setDirection(c);return b.callReturn()}; +Entry.block.see_angle=function(b,a){var c=a.getNumberValue("VALUE",a);b.setDirection(c);return a.callReturn()}; Blockly.Blocks.see_direction={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_see_direction_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("sprites"),"VALUE");this.appendDummyInput().appendField(Lang.Blocks.MOVING_see_direction_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.see_direction=function(a,b){var c=b.getField("VALUE",b),d=Entry.container.getEntity(c),c=d.getX()-a.getX(),d=d.getY()-a.getY();0<=c?a.setRotation(Math.atan(d/c)/Math.PI*180+90):a.setRotation(Math.atan(d/c)/Math.PI*180+270);return b.callReturn()}; +Entry.block.see_direction=function(b,a){var c=a.getField("VALUE",a),d=Entry.container.getEntity(c),c=d.getX()-b.getX(),d=d.getY()-b.getY();0<=c?b.setRotation(Math.atan(d/c)/Math.PI*180+90):b.setRotation(Math.atan(d/c)/Math.PI*180+270);return a.callReturn()}; Blockly.Blocks.locate_xy={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_xy_1);this.appendValueInput("VALUE1").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_xy_2);this.appendValueInput("VALUE2").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_xy_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0); -this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.locate_xy=function(a,b){var c=b.getNumberValue("VALUE1",b);a.setX(c);c=b.getNumberValue("VALUE2",b);a.setY(c);a.brush&&!a.brush.stop&&a.brush.lineTo(a.getX(),-1*a.getY());return b.callReturn()}; +this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.locate_xy=function(b,a){var c=a.getNumberValue("VALUE1",a);b.setX(c);c=a.getNumberValue("VALUE2",a);b.setY(c);b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}; Blockly.Blocks.locate_x={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_x_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_x_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.locate_x=function(a,b){var c=b.getNumberValue("VALUE",b);a.setX(c);a.brush&&!a.brush.stop&&a.brush.lineTo(a.getX(),-1*a.getY());return b.callReturn()}; +Entry.block.locate_x=function(b,a){var c=a.getNumberValue("VALUE",a);b.setX(c);b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}; Blockly.Blocks.locate_y={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_y_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_y_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.locate_y=function(a,b){var c=b.getNumberValue("VALUE",b);a.setY(c);a.brush&&!a.brush.stop&&a.brush.lineTo(a.getX(),-1*a.getY());return b.callReturn()}; +Entry.block.locate_y=function(b,a){var c=a.getNumberValue("VALUE",a);b.setY(c);b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}; Blockly.Blocks.locate={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("spritesWithMouse"),"VALUE");this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.locate=function(a,b){var c=b.getField("VALUE",b),d;"mouse"==c?(c=Entry.stage.mouseCoordinate.x,d=Entry.stage.mouseCoordinate.y):(d=Entry.container.getEntity(c),c=d.getX(),d=d.getY());a.setX(+c);a.setY(+d);a.brush&&!a.brush.stop&&a.brush.lineTo(c,-1*d);return b.callReturn()}; +Entry.block.locate=function(b,a){var c=a.getField("VALUE",a),d;"mouse"==c?(c=Entry.stage.mouseCoordinate.x,d=Entry.stage.mouseCoordinate.y):(d=Entry.container.getEntity(c),c=d.getX(),d=d.getY());b.setX(Number(c));b.setY(Number(d));b.brush&&!b.brush.stop&&b.brush.lineTo(c,-1*d);return a.callReturn()}; Blockly.Blocks.move_xy_time={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_xy_time_1);this.appendValueInput("VALUE1").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_xy_time_2);this.appendValueInput("VALUE2").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_xy_time_3);this.appendValueInput("VALUE3").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_xy_time_4).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ "block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.move_xy_time=function(a,b){if(!b.isStart){var c;c=b.getNumberValue("VALUE1",b);var d=b.getNumberValue("VALUE2",b),e=b.getNumberValue("VALUE3",b);b.isStart=!0;b.frameCount=Math.floor(c*Entry.FPS);b.dX=d/b.frameCount;b.dY=e/b.frameCount}if(0!=b.frameCount)return a.setX(a.getX()+b.dX),a.setY(a.getY()+b.dY),b.frameCount--,a.brush&&!a.brush.stop&&a.brush.lineTo(a.getX(),-1*a.getY()),b;delete b.isStart;delete b.frameCount;return b.callReturn()}; +Entry.block.move_xy_time=function(b,a){if(!a.isStart){var c;c=a.getNumberValue("VALUE1",a);var d=a.getNumberValue("VALUE2",a),e=a.getNumberValue("VALUE3",a);a.isStart=!0;a.frameCount=Math.floor(c*Entry.FPS);a.dX=d/a.frameCount;a.dY=e/a.frameCount}if(0!=a.frameCount)return b.setX(b.getX()+a.dX),b.setY(b.getY()+a.dY),a.frameCount--,b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY()),a;delete a.isStart;delete a.frameCount;return a.callReturn()}; Blockly.Blocks.locate_time={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_time_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_time_2);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("sprites"),"VALUE");this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_time_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png", "*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; Blockly.Blocks.rotate_by_angle_time={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_rotate_by_angle_time_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_rotate_by_angle_time_2);this.appendDummyInput().appendField(new Blockly.FieldAngle("90"),"VALUE");this.appendDummyInput().appendField(Lang.Blocks.MOVING_rotate_by_angle_time_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png", -"*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.rotate_by_angle_time=function(a,b){if(!b.isStart){var c;c=b.getNumberValue("VALUE",b);var d=b.getNumberField("VALUE",b);b.isStart=!0;b.frameCount=Math.floor(c*Entry.FPS);b.dAngle=d/b.frameCount}if(0!=b.frameCount)return a.setRotation(a.getRotation()+b.dAngle),b.frameCount--,b;delete b.isStart;delete b.frameCount;return b.callReturn()}; +"*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.rotate_by_angle_time=function(b,a){if(!a.isStart){var c;c=a.getNumberValue("VALUE",a);var d=a.getNumberField("VALUE",a);a.isStart=!0;a.frameCount=Math.floor(c*Entry.FPS);a.dAngle=d/a.frameCount}if(0!=a.frameCount)return b.setRotation(b.getRotation()+a.dAngle),a.frameCount--,a;delete a.isStart;delete a.frameCount;return a.callReturn()}; Blockly.Blocks.bounce_when={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_bounce_when_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("bounce"),"VALUE");this.appendDummyInput().appendField(Lang.Blocks.MOVING_bounce_when_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setPreviousStatement(!0);this.setInputsInline(!0);this.setNextStatement(!0)}}; Blockly.Blocks.bounce_wall={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_bounce_wall).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.bounce_wall=function(a,b){var c=a.parent.getRotateMethod(),d="free"==c?(a.getRotation()+a.getDirection()).mod(360):a.getDirection(),e=Entry.Utils.COLLISION.NONE;if(90>d&&0<=d||360>d&&270<=d){var e=a.collision==Entry.Utils.COLLISION.UP,f=ndgmr.checkPixelCollision(Entry.stage.wall.up,a.object,0,!1);!f&&e&&(a.collision=Entry.Utils.COLLISION.NONE);f&&e&&(f=!1);f?("free"==c?a.setRotation(-a.getRotation()-2*a.getDirection()+180):a.setDirection(-a.getDirection()+180),a.collision=Entry.Utils.COLLISION.UP): -(e=a.collision==Entry.Utils.COLLISION.DOWN,f=ndgmr.checkPixelCollision(Entry.stage.wall.down,a.object,0,!1),!f&&e&&(a.collision=Entry.Utils.COLLISION.NONE),f&&e&&(f=!1),f&&("free"==c?a.setRotation(-a.getRotation()-2*a.getDirection()+180):a.setDirection(-a.getDirection()+180),a.collision=Entry.Utils.COLLISION.DOWN))}else 270>d&&90<=d&&(e=a.collision==Entry.Utils.COLLISION.DOWN,f=ndgmr.checkPixelCollision(Entry.stage.wall.down,a.object,0,!1),!f&&e&&(a.collision=Entry.Utils.COLLISION.NONE),f&&e&&(f= -!1),f?("free"==c?a.setRotation(-a.getRotation()-2*a.getDirection()+180):a.setDirection(-a.getDirection()+180),a.collision=Entry.Utils.COLLISION.DOWN):(e=a.collision==Entry.Utils.COLLISION.UP,f=ndgmr.checkPixelCollision(Entry.stage.wall.up,a.object,0,!1),!f&&e&&(a.collision=Entry.Utils.COLLISION.NONE),f&&e&&(f=!1),f&&("free"==c?a.setRotation(-a.getRotation()-2*a.getDirection()+180):a.setDirection(-a.getDirection()+180),a.collision=Entry.Utils.COLLISION.UP)));360>d&&180<=d?(e=a.collision==Entry.Utils.COLLISION.LEFT, -d=ndgmr.checkPixelCollision(Entry.stage.wall.left,a.object,0,!1),!d&&e&&(a.collision=Entry.Utils.COLLISION.NONE),d&&e&&(d=!1),d?("free"==c?a.setRotation(-a.getRotation()-2*a.getDirection()):a.setDirection(-a.getDirection()+360),a.collision=Entry.Utils.COLLISION.LEFT):(e=a.collision==Entry.Utils.COLLISION.RIGHT,d=ndgmr.checkPixelCollision(Entry.stage.wall.right,a.object,0,!1),!d&&e&&(a.collision=Entry.Utils.COLLISION.NONE),d&&e&&(d=!1),d&&("free"==c?a.setRotation(-a.getRotation()-2*a.getDirection()): -a.setDirection(-a.getDirection()+360),a.collision=Entry.Utils.COLLISION.RIGHT))):180>d&&0<=d&&(e=a.collision==Entry.Utils.COLLISION.RIGHT,d=ndgmr.checkPixelCollision(Entry.stage.wall.right,a.object,0,!1),!d&&e&&(a.collision=Entry.Utils.COLLISION.NONE),d&&e&&(d=!1),d?("free"==c?a.setRotation(-a.getRotation()-2*a.getDirection()):a.setDirection(-a.getDirection()+360),a.collision=Entry.Utils.COLLISION.RIGHT):(e=a.collision==Entry.Utils.COLLISION.LEFT,d=ndgmr.checkPixelCollision(Entry.stage.wall.left, -a.object,0,!1),!d&&e&&(a.collision=Entry.Utils.COLLISION.NONE),d&&e&&(d=!1),d&&("free"==c?a.setRotation(-a.getRotation()-2*a.getDirection()):a.setDirection(-a.getDirection()+360),a.collision=Entry.Utils.COLLISION.LEFT)));return b.callReturn()}; -Blockly.Blocks.flip_arrow_horizontal={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_flip_arrow_horizontal).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.flip_arrow_horizontal=function(a,b){a.setDirection(a.getDirection()+180);return b.callReturn()}; -Blockly.Blocks.flip_arrow_vertical={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_flip_arrow_vertical).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.flip_arrow_vertical=function(a,b){a.setDirection(a.getDirection()+180);return b.callReturn()}; +Entry.block.bounce_wall=function(b,a){var c=b.parent.getRotateMethod(),d="free"==c?(b.getRotation()+b.getDirection()).mod(360):b.getDirection(),e=Entry.Utils.COLLISION.NONE;if(90>d&&0<=d||360>d&&270<=d){var e=b.collision==Entry.Utils.COLLISION.UP,f=ndgmr.checkPixelCollision(Entry.stage.wall.up,b.object,0,!1);!f&&e&&(b.collision=Entry.Utils.COLLISION.NONE);f&&e&&(f=!1);f?("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()+180):b.setDirection(-b.getDirection()+180),b.collision=Entry.Utils.COLLISION.UP): +(e=b.collision==Entry.Utils.COLLISION.DOWN,f=ndgmr.checkPixelCollision(Entry.stage.wall.down,b.object,0,!1),!f&&e&&(b.collision=Entry.Utils.COLLISION.NONE),f&&e&&(f=!1),f&&("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()+180):b.setDirection(-b.getDirection()+180),b.collision=Entry.Utils.COLLISION.DOWN))}else 270>d&&90<=d&&(e=b.collision==Entry.Utils.COLLISION.DOWN,f=ndgmr.checkPixelCollision(Entry.stage.wall.down,b.object,0,!1),!f&&e&&(b.collision=Entry.Utils.COLLISION.NONE),f&&e&&(f= +!1),f?("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()+180):b.setDirection(-b.getDirection()+180),b.collision=Entry.Utils.COLLISION.DOWN):(e=b.collision==Entry.Utils.COLLISION.UP,f=ndgmr.checkPixelCollision(Entry.stage.wall.up,b.object,0,!1),!f&&e&&(b.collision=Entry.Utils.COLLISION.NONE),f&&e&&(f=!1),f&&("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()+180):b.setDirection(-b.getDirection()+180),b.collision=Entry.Utils.COLLISION.UP)));360>d&&180<=d?(e=b.collision==Entry.Utils.COLLISION.LEFT, +d=ndgmr.checkPixelCollision(Entry.stage.wall.left,b.object,0,!1),!d&&e&&(b.collision=Entry.Utils.COLLISION.NONE),d&&e&&(d=!1),d?("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()):b.setDirection(-b.getDirection()+360),b.collision=Entry.Utils.COLLISION.LEFT):(e=b.collision==Entry.Utils.COLLISION.RIGHT,d=ndgmr.checkPixelCollision(Entry.stage.wall.right,b.object,0,!1),!d&&e&&(b.collision=Entry.Utils.COLLISION.NONE),d&&e&&(d=!1),d&&("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()): +b.setDirection(-b.getDirection()+360),b.collision=Entry.Utils.COLLISION.RIGHT))):180>d&&0<=d&&(e=b.collision==Entry.Utils.COLLISION.RIGHT,d=ndgmr.checkPixelCollision(Entry.stage.wall.right,b.object,0,!1),!d&&e&&(b.collision=Entry.Utils.COLLISION.NONE),d&&e&&(d=!1),d?("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()):b.setDirection(-b.getDirection()+360),b.collision=Entry.Utils.COLLISION.RIGHT):(e=b.collision==Entry.Utils.COLLISION.LEFT,d=ndgmr.checkPixelCollision(Entry.stage.wall.left, +b.object,0,!1),!d&&e&&(b.collision=Entry.Utils.COLLISION.NONE),d&&e&&(d=!1),d&&("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()):b.setDirection(-b.getDirection()+360),b.collision=Entry.Utils.COLLISION.LEFT)));return a.callReturn()}; +Blockly.Blocks.flip_arrow_horizontal={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_flip_arrow_horizontal).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.flip_arrow_horizontal=function(b,a){b.setDirection(b.getDirection()+180);return a.callReturn()}; +Blockly.Blocks.flip_arrow_vertical={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_flip_arrow_vertical).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.flip_arrow_vertical=function(b,a){b.setDirection(b.getDirection()+180);return a.callReturn()}; Blockly.Blocks.see_angle_object={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_see_angle_object_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("spritesWithMouse"),"VALUE");this.appendDummyInput().appendField(Lang.Blocks.MOVING_see_angle_object_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.see_angle_object=function(a,b){var c=b.getField("VALUE",b),d=a.getX(),e=a.getY();if(a.parent.id==c)return b.callReturn();"mouse"==c?(c=Entry.stage.mouseCoordinate.y,d=Entry.stage.mouseCoordinate.x-d,e=c-e):(c=Entry.container.getEntity(c),d=c.getX()-d,e=c.getY()-e);e=0===d&&0===e?a.getDirection()+a.getRotation():0<=d?-Math.atan(e/d)/Math.PI*180+90:-Math.atan(e/d)/Math.PI*180+270;d=a.getDirection()+a.getRotation();a.setRotation(a.getRotation()+e-d);return b.callReturn()}; +Entry.block.see_angle_object=function(b,a){var c=a.getField("VALUE",a),d=b.getX(),e=b.getY();if(b.parent.id==c)return a.callReturn();"mouse"==c?(c=Entry.stage.mouseCoordinate.y,d=Entry.stage.mouseCoordinate.x-d,e=c-e):(c=Entry.container.getEntity(c),d=c.getX()-d,e=c.getY()-e);e=0===d&&0===e?b.getDirection()+b.getRotation():0<=d?-Math.atan(e/d)/Math.PI*180+90:-Math.atan(e/d)/Math.PI*180+270;d=b.getDirection()+b.getRotation();b.setRotation(b.getRotation()+e-d);return a.callReturn()}; Blockly.Blocks.see_angle_direction={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_see_angle_direction_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_see_angle_direction_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.see_angle_direction=function(a,b){var c=b.getNumberValue("VALUE",b),d=a.getDirection()+a.getRotation();a.setRotation(a.getRotation()+c-d);return b.callReturn()}; +Entry.block.see_angle_direction=function(b,a){var c=a.getNumberValue("VALUE",a),d=b.getDirection()+b.getRotation();b.setRotation(b.getRotation()+c-d);return a.callReturn()}; Blockly.Blocks.rotate_direction={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_rotate_direction_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_rotate_direction_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.rotate_direction=function(a,b){var c=b.getNumberValue("VALUE",b);a.setDirection(c+a.getDirection());return b.callReturn()}; +Entry.block.rotate_direction=function(b,a){var c=a.getNumberValue("VALUE",a);b.setDirection(c+b.getDirection());return a.callReturn()}; Blockly.Blocks.locate_object_time={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_object_time_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_object_time_2);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("spritesWithMouse"),"TARGET");this.appendDummyInput().appendField(Lang.Blocks.MOVING_locate_object_time_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ "block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.locate_object_time=function(a,b){if(!b.isStart){var c,d,e;d=b.getField("TARGET",b);c=b.getNumberValue("VALUE",b);c=Math.floor(c*Entry.FPS);e=Entry.stage.mouseCoordinate;if(0!=c)"mouse"==d?(d=e.x-a.getX(),e=e.y-a.getY()):(e=Entry.container.getEntity(d),d=e.getX()-a.getX(),e=e.getY()-a.getY()),b.isStart=!0,b.frameCount=c,b.dX=d/b.frameCount,b.dY=e/b.frameCount;else return"mouse"==d?(d=+e.x,e=+e.y):(e=Entry.container.getEntity(d),d=e.getX(),e=e.getY()),a.setX(d),a.setY(e),a.brush&&!a.brush.stop&& -a.brush.lineTo(a.getX(),-1*a.getY()),b.callReturn()}if(0!=b.frameCount)return a.setX(a.getX()+b.dX),a.setY(a.getY()+b.dY),b.frameCount--,a.brush&&!a.brush.stop&&a.brush.lineTo(a.getX(),-1*a.getY()),b;delete b.isStart;delete b.frameCount;return b.callReturn()}; +Entry.block.locate_object_time=function(b,a){if(!a.isStart){var c,d,e;d=a.getField("TARGET",a);c=a.getNumberValue("VALUE",a);c=Math.floor(c*Entry.FPS);e=Entry.stage.mouseCoordinate;if(0!=c)"mouse"==d?(d=e.x-b.getX(),e=e.y-b.getY()):(e=Entry.container.getEntity(d),d=e.getX()-b.getX(),e=e.getY()-b.getY()),a.isStart=!0,a.frameCount=c,a.dX=d/a.frameCount,a.dY=e/a.frameCount;else return"mouse"==d?(d=Number(e.x),e=Number(e.y)):(e=Entry.container.getEntity(d),d=e.getX(),e=e.getY()),b.setX(d),b.setY(e),b.brush&& +!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY()),a.callReturn()}if(0!=a.frameCount)return b.setX(b.getX()+a.dX),b.setY(b.getY()+a.dY),a.frameCount--,b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY()),a;delete a.isStart;delete a.frameCount;return a.callReturn()}; Blockly.Blocks.rotate_absolute={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_set_direction_by_angle_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_set_direction_by_angle_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.rotate_absolute=function(a,b){var c=b.getNumberValue("VALUE",b);a.setRotation(c);return b.callReturn()}; +Entry.block.rotate_absolute=function(b,a){var c=a.getNumberValue("VALUE",a);b.setRotation(c);return a.callReturn()}; Blockly.Blocks.rotate_relative={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_add_direction_by_angle_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_add_direction_by_angle_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.rotate_relative=function(a,b){var c=b.getNumberValue("VALUE",b);a.setRotation(c+a.getRotation());return b.callReturn()}; +Entry.block.rotate_relative=function(b,a){var c=a.getNumberValue("VALUE",a);b.setRotation(c+b.getRotation());return a.callReturn()}; Blockly.Blocks.direction_absolute={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_see_angle_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_see_angle_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.direction_absolute=function(a,b){var c=b.getNumberValue("VALUE",b);a.setDirection(c);return b.callReturn()}; +Entry.block.direction_absolute=function(b,a){var c=a.getNumberValue("VALUE",a);b.setDirection(c);return a.callReturn()}; Blockly.Blocks.direction_relative={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_rotate_direction_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_rotate_direction_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.direction_relative=function(a,b){var c=b.getNumberValue("VALUE",b);a.setDirection(c+a.getDirection());return b.callReturn()}; +Entry.block.direction_relative=function(b,a){var c=a.getNumberValue("VALUE",a);b.setDirection(c+b.getDirection());return a.callReturn()}; Blockly.Blocks.move_to_angle={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_direction_angle_1);this.appendValueInput("ANGLE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_direction_angle_2);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_move_direction_angle_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/moving_03.png", -"*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.move_to_angle=function(a,b){var c=b.getNumberValue("VALUE",b),d=b.getNumberValue("ANGLE",b);a.setX(a.getX()+c*Math.cos((d-90)/180*Math.PI));a.setY(a.getY()-c*Math.sin((d-90)/180*Math.PI));a.brush&&!a.brush.stop&&a.brush.lineTo(a.getX(),-1*a.getY());return b.callReturn()}; +"*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.move_to_angle=function(b,a){var c=a.getNumberValue("VALUE",a),d=a.getNumberValue("ANGLE",a);b.setX(b.getX()+c*Math.cos((d-90)/180*Math.PI));b.setY(b.getY()-c*Math.sin((d-90)/180*Math.PI));b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}; Blockly.Blocks.rotate_by_time={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_add_direction_by_angle_time_explain_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_add_direction_by_angle_time_2);this.appendDummyInput().appendField(Lang.Blocks.MOVING_add_direction_by_angle_time_1);this.appendValueInput("ANGLE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_add_direction_by_angle_time_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.rotate_by_time=function(a,b){if(!b.isStart){var c;c=b.getNumberValue("VALUE",b);var d=b.getNumberValue("ANGLE",b);b.isStart=!0;b.frameCount=Math.floor(c*Entry.FPS);b.dAngle=d/b.frameCount}if(0!=b.frameCount)return a.setRotation(a.getRotation()+b.dAngle),b.frameCount--,b;delete b.isStart;delete b.frameCount;return b.callReturn()}; +"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.rotate_by_time=function(b,a){if(!a.isStart){var c;c=a.getNumberValue("VALUE",a);var d=a.getNumberValue("ANGLE",a);a.isStart=!0;a.frameCount=Math.floor(c*Entry.FPS);a.dAngle=d/a.frameCount}if(0!=a.frameCount)return b.setRotation(b.getRotation()+a.dAngle),a.frameCount--,a;delete a.isStart;delete a.frameCount;return a.callReturn()}; Blockly.Blocks.direction_relative_duration={init:function(){this.setColour("#A751E3");this.appendDummyInput().appendField(Lang.Blocks.MOVING_direction_relative_duration_1);this.appendValueInput("DURATION").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_direction_relative_duration_2);this.appendValueInput("AMOUNT").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.MOVING_direction_relative_duration_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/moving_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.direction_relative_duration=function(a,b){if(!b.isStart){var c;c=b.getNumberValue("DURATION",b);var d=b.getNumberValue("AMOUNT",b);b.isStart=!0;b.frameCount=Math.floor(c*Entry.FPS);b.dDirection=d/b.frameCount}if(0!=b.frameCount)return a.setDirection(a.getDirection()+b.dDirection),b.frameCount--,b;delete b.isStart;delete b.frameCount;delete b.dDirection;return b.callReturn()};Entry.Neobot={name:"neobot",PORT_MAP:{1:0,2:0,3:0,SERVO1:0,SERVO2:0,SERVO1_SPEED:3,SERVO2_SPEED:3,LMOT:0,RMOT:0,note:0,octave:0,duration:0,sound_check:0,O_1:0,O_2:0},setZero:function(){for(var a in Entry.Neobot.PORT_MAP)Entry.hw.sendQueue[a]=Entry.Neobot.PORT_MAP[a];Entry.hw.update()},name:"neobot",monitorTemplate:{imgPath:"hw/neobot.png",width:268,height:270,ports:{1:{name:Lang.Hw.port_en+" 1 "+Lang.Hw.port_ko,type:"input",pos:{x:78,y:9}},2:{name:Lang.Hw.port_en+" 2 "+Lang.Hw.port_ko,type:"input", -pos:{x:115,y:9}},3:{name:Lang.Hw.port_en+" 3 "+Lang.Hw.port_ko,type:"input",pos:{x:153,y:9}},LMOT:{name:Lang.Hw.left+" "+Lang.Hw.motor,type:"output",pos:{x:78,y:259}},RMOT:{name:Lang.Hw.right+" "+Lang.Hw.motor,type:"output",pos:{x:191,y:259}},note:{name:Lang.Hw.buzzer,type:"output",pos:{x:98,y:184}},SERVO1:{name:Lang.Hw.sub+" "+Lang.Hw.motor+" 1",type:"output",pos:{x:115,y:259}},SERVO2:{name:Lang.Hw.sub+" "+Lang.Hw.motor+" 2",type:"output",pos:{x:191,y:9}}}}}; -Blockly.Blocks.neobot_sensor_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("").appendField(new Blockly.FieldDropdown([["1\ubc88 \ud3ec\ud2b8","1"],["2\ubc88 \ud3ec\ud2b8","2"],["3\ubc88 \ud3ec\ud2b8","3"],["\ub9ac\ubaa8\ucee8","4"]]),"PORT").appendField(" \uac12");this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.neobot_sensor_value=function(a,b){var c=b.getStringField("PORT");return Entry.hw.portData[c]}; -Blockly.Blocks.neobot_turn_left={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uc67c\ucabd\ubaa8\ud130\ub97c").appendField(new Blockly.FieldDropdown([["\uc55e\uc73c\ub85c","1"],["\ub4a4\ub85c","-1"]]),"DIRECTION").appendField(new Blockly.FieldDropdown([["\ub290\ub9ac\uac8c","1"],["\ubcf4\ud1b5","2"],["\ube60\ub974\uac8c","3"]]),"VALUE").appendField("\ud68c\uc804").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0); -this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.neobot_turn_left=function(a,b){var c=b.getNumberField("VALUE"),d=b.getNumberField("DIRECTION");Entry.hw.sendQueue.LMOT=c*d;return b.callReturn()}; -Blockly.Blocks.neobot_stop_left={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uc67c\ucabd\ubaa8\ud130 \uc815\uc9c0").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.neobot_stop_left=function(a,b){Entry.hw.sendQueue.LMOT=0;return b.callReturn()}; -Blockly.Blocks.neobot_turn_right={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uc624\ub978\ucabd\ubaa8\ud130\ub97c").appendField(new Blockly.FieldDropdown([["\uc55e\uc73c\ub85c","1"],["\ub4a4\ub85c","-1"]]),"DIRECTION").appendField(new Blockly.FieldDropdown([["\ub290\ub9ac\uac8c","1"],["\ubcf4\ud1b5","2"],["\ube60\ub974\uac8c","3"]]),"VALUE").appendField("\ud68c\uc804").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0); -this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.neobot_turn_right=function(a,b){var c=b.getNumberField("VALUE"),d=b.getNumberField("DIRECTION");Entry.hw.sendQueue.RMOT=c*d;return b.callReturn()}; -Blockly.Blocks.neobot_stop_right={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uc624\ub978\ucabd\ubaa8\ud130 \uc815\uc9c0").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.neobot_stop_right=function(a,b){Entry.hw.sendQueue.RMOT=0;return b.callReturn()}; -Blockly.Blocks.neobot_run_motor={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\uc591\ucabd","1"],["\uc67c\ucabd","2"],["\uc624\ub978\ucabd","3"]]),"TYPE").appendField("\ubaa8\ud130\ub97c ");this.appendValueInput("DURATION").setCheck(["Number","String"]);this.appendDummyInput().appendField("\ucd08\uac04").appendField(new Blockly.FieldDropdown([["\ub290\ub9ac\uac8c","1"],["\ubcf4\ud1b5","2"],["\ube60\ub974\uac8c","3"]]),"VALUE").appendField(new Blockly.FieldDropdown([["\uc804\uc9c4", -"1"],["\ud6c4\uc9c4","2"],["\uc88c\ud68c\uc804","3"],["\uc6b0\ud68c\uc804","4"]]),"DIRECTION").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.neobot_run_motor=function(a,b){if(b.isStart){if(1==b.timeFlag){var c=b.getNumberField("TYPE"),d=b.getNumberField("VALUE");switch(b.getNumberField("DIRECTION")){case 1:Entry.hw.sendQueue.LMOT=d;Entry.hw.sendQueue.RMOT=d;break;case 2:Entry.hw.sendQueue.LMOT=-1*d;Entry.hw.sendQueue.RMOT=-1*d;break;case 3:Entry.hw.sendQueue.LMOT=d;Entry.hw.sendQueue.RMOT=-1*d;break;case 4:Entry.hw.sendQueue.LMOT=-1*d,Entry.hw.sendQueue.RMOT=d}2===c?Entry.hw.sendQueue.RMOT=0:3===c&&(Entry.hw.sendQueue.LMOT= -0);return b}delete b.timeFlag;delete b.isStart;Entry.engine.isContinue=!1;Entry.hw.sendQueue.LMOT=0;Entry.hw.sendQueue.RMOT=0;return b.callReturn()}b.isStart=!0;b.timeFlag=1;c=1E3*b.getNumberValue("DURATION");setTimeout(function(){b.timeFlag=0},c);return b}; -Blockly.Blocks.neobot_servo_1={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("SERVO1\uc5d0 \uc5f0\uacb0\ub41c \uc11c\ubcf4\ubaa8\ud130\ub97c").appendField(new Blockly.FieldDropdown([["\ube60\ub978","3"],["\ubcf4\ud1b5","2"],["\ub290\ub9b0","1"]]),"SPEED").appendField("\uc18d\ub3c4\ub85c").appendField(new Blockly.FieldDropdown([["0\ub3c4","0"],["10\ub3c4","1"],["20\ub3c4","2"],["30\ub3c4","3"],["40\ub3c4","4"],["50\ub3c4","5"],["60\ub3c4","6"],["70\ub3c4","7"],["80\ub3c4", -"8"],["90\ub3c4","9"],["100\ub3c4","10"],["110\ub3c4","11"],["120\ub3c4","12"],["130\ub3c4","13"],["140\ub3c4","14"],["150\ub3c4","15"],["160\ub3c4","16"]]),"VALUE").appendField("\ub85c \uc774\ub3d9").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.neobot_servo_1=function(a,b){var c=b.getNumberField("VALUE"),d=b.getNumberField("SPEED");Entry.hw.sendQueue.SERVO1=c;Entry.hw.sendQueue.SERVO1_SPEED=d;return b.callReturn()}; -Blockly.Blocks.neobot_servo_2={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("SERVO2\uc5d0 \uc5f0\uacb0\ub41c \uc11c\ubcf4\ubaa8\ud130\ub97c").appendField(new Blockly.FieldDropdown([["\ube60\ub978","3"],["\ubcf4\ud1b5","2"],["\ub290\ub9b0","1"]]),"SPEED").appendField("\uc18d\ub3c4\ub85c").appendField(new Blockly.FieldDropdown([["0\ub3c4","0"],["10\ub3c4","1"],["20\ub3c4","2"],["30\ub3c4","3"],["40\ub3c4","4"],["50\ub3c4","5"],["60\ub3c4","6"],["70\ub3c4","7"],["80\ub3c4", -"8"],["90\ub3c4","9"],["100\ub3c4","10"],["110\ub3c4","11"],["120\ub3c4","12"],["130\ub3c4","13"],["140\ub3c4","14"],["150\ub3c4","15"],["160\ub3c4","16"]]),"VALUE").appendField("\ub85c \uc774\ub3d9").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.neobot_servo_2=function(a,b){var c=b.getNumberField("VALUE"),d=b.getNumberField("SPEED");Entry.hw.sendQueue.SERVO2=c;Entry.hw.sendQueue.SERVO2_SPEED=d;return b.callReturn()}; -Blockly.Blocks.neobot_play_note_for={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uba5c\ub85c\ub514").appendField(new Blockly.FieldDropdown([[Lang.General.note_c+"","1"],[Lang.General.note_d+"","2"],[Lang.General.note_e+"","3"],[Lang.General.note_f+"","4"],[Lang.General.note_g+"","5"],[Lang.General.note_a+"","6"],[Lang.General.note_b+"","7"],[Lang.General.note_c+"","8"]]),"NOTE").appendField("\uc744(\ub97c)").appendField(new Blockly.FieldDropdown([["1","0"],["2", -"1"],["3","2"]]),"OCTAVE").appendField("\uc625\ud0c0\ube0c\ub85c").appendField(new Blockly.FieldDropdown([["2\ubd84\uc74c\ud45c","2"],["4\ubd84\uc74c\ud45c","4"],["8\ubd84\uc74c\ud45c","8"]]),"DURATION");this.appendDummyInput().appendField("\uae38\uc774\ub9cc\ud07c \uc18c\ub9ac\ub0b4\uae30").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.neobot_play_note_for=function(a,b){var c=Entry.hw.sendQueue;if(b.isStart){if(1==b.timeFlag)return b;delete b.timeFlag;delete b.isStart;Entry.engine.isContinue=!1;return b.callReturn()}var d=b.getNumberField("NOTE",b),e=b.getNumberField("OCTAVE",b),f=b.getNumberField("DURATION",b);b.note=d;b.isStart=!0;b.timeFlag=1;c.note=d;c.octave=e;c.duration=f;c.sound_check=(1E5*Math.random()).toFixed(0);setTimeout(function(){b.timeFlag=0},1/f*2E3);return b}; -Blockly.Blocks.neobot_set_sensor_value={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["1","O_1"],["2","O_2"]]),"PORT").appendField("\ubc88 \ud3ec\ud2b8\uc758 \uac12\uc744").appendField(new Blockly.FieldDropdown([["\ucf1c\uae30","1"],["\ub044\uae30","0"]]),"VALUE");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.neobot_set_sensor_value=function(a,b){var c=Entry.hw.sendQueue,d=b.getStringField("PORT",b),e=b.getNumberField("VALUE",b);c[d]=e;return b.callReturn()};Entry.Robotis_carCont={INSTRUCTION:{NONE:0,WRITE:3,READ:2},CONTROL_TABLE:{CM_LED:[67,1],CM_SPRING_RIGHT:[69,1,69,2],CM_SPRING_LEFT:[70,1,69,2],CM_SWITCH:[71,1],CM_SOUND_DETECTED:[86,1],CM_SOUND_DETECTING:[87,1],CM_IR_LEFT:[91,2,91,4],CM_IR_RIGHT:[93,2,91,4],CM_CALIBRATION_LEFT:[95,2],CM_CALIBRATION_RIGHT:[97,2],AUX_MOTOR_SPEED_LEFT:[152,2],AUX_MOTOR_SPEED_RIGHT:[154,2]},setZero:function(){this.setRobotisData([[Entry.Robotis_carCont.INSTRUCTION.WRITE,152,2,0],[Entry.Robotis_carCont.INSTRUCTION.WRITE, -154,2,0]]);Entry.hw.sendQueue.setZero=[1];this.update();this.setRobotisData(null);Entry.hw.sendQueue.setZero=null;this.update()},name:"robotis_carCont",delay:40,postCallReturn:function(a,b,c){if(0>=c)return this.setRobotisData(b),this.update(),a.callReturn();if(a.isStart){if(1==a.timeFlag)return this.setRobotisData(null),a;delete a.timeFlag;delete a.isStart;Entry.engine.isContinue=!1;this.update();return a.callReturn()}a.isStart=!0;a.timeFlag=1;this.setRobotisData(b);setTimeout(function(){a.timeFlag= -0},c);return a},wait:function(a,b){Entry.hw.socket.send(JSON.stringify(a));for(var c=(new Date).getTime(),d=c;dd?d=0:255c&&(c=0);Entry.hw.sendQueue.FND=c;return a.callReturn()}; +Blockly.Blocks.neobot_play_note_for={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField("\uba5c\ub85c\ub514").appendField(new Blockly.FieldDropdown([["\ubb34\uc74c","0"],[Lang.General.note_c,"1"],[Lang.General.note_c+"#","2"],[Lang.General.note_d,"3"],[Lang.General.note_d+"#","4"],[Lang.General.note_e,"5"],[Lang.General.note_f,"6"],[Lang.General.note_f+"#","7"],[Lang.General.note_g,"8"],[Lang.General.note_g+"#","9"],[Lang.General.note_a,"10"],[Lang.General.note_a+"#","11"], +[Lang.General.note_b,"12"]]),"NOTE").appendField("\uc744(\ub97c)").appendField(new Blockly.FieldDropdown([["1","0"],["2","1"],["3","2"],["4","3"],["5","4"],["6","5"]]),"OCTAVE").appendField("\uc625\ud0c0\ube0c\ub85c").appendField(new Blockly.FieldDropdown([["2\ubd84\uc74c\ud45c","2"],["4\ubd84\uc74c\ud45c","4"],["8\ubd84\uc74c\ud45c","8"],["16\ubd84\uc74c\ud45c","16"]]),"DURATION");this.appendDummyInput().appendField("\uae38\uc774\ub9cc\ud07c \uc18c\ub9ac\ub0b4\uae30").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ +"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; +Entry.block.neobot_play_note_for=function(b,a){var c=Entry.hw.sendQueue;if(a.isStart){if(1==a.timeFlag)return a;delete a.timeFlag;delete a.isStart;Entry.hw.sendQueue.SND=0;Entry.engine.isContinue=!1;return a.callReturn()}var d=a.getNumberField("NOTE",a),e=a.getNumberField("OCTAVE",a),f=a.getNumberField("DURATION",a),d=d+12*e;a.isStart=!0;a.timeFlag=1;65=c)return this.setRobotisData(a),this.update(),b.callReturn();if(b.isStart){if(1==b.timeFlag)return this.setRobotisData(null),b;delete b.timeFlag;delete b.isStart;Entry.engine.isContinue=!1;this.update();return b.callReturn()}b.isStart=!0;b.timeFlag=1;this.setRobotisData(a);setTimeout(function(){b.timeFlag= +0},c);return b},wait:function(b,a){Entry.hw.socket.send(JSON.stringify(b));for(var c=(new Date).getTime(),d=c;dd&&(d=0);return Entry.Robotis_carCont.postCallReturn(b,[[e,f+(c-1)*g,g,d]],Entry.Robotis_openCM70.delay)}; +"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.robotis_openCM70_aux_servo_position=function(b,a){var c=a.getField("PORT",a),d=a.getNumberValue("VALUE"),e=Entry.Robotis_openCM70.INSTRUCTION.WRITE,f=0,g=0,f=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[0],g=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[1];1023d&&(d=0);return Entry.Robotis_carCont.postCallReturn(a,[[e,f+(c-1)*g,g,d]],Entry.Robotis_openCM70.delay)}; Blockly.Blocks.robotis_openCM70_aux_led_module={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.robotis_common_port_3,"3"],[Lang.Blocks.robotis_common_port_4,"4"],[Lang.Blocks.robotis_common_port_5,"5"],[Lang.Blocks.robotis_common_port_6,"6"]]),"PORT").appendField(Lang.Blocks.robotis_openCM70_aux_led_module_1).appendField(new Blockly.FieldDropdown([[Lang.Blocks.robotis_cm_led_both+Lang.Blocks.robotis_common_off,"0"],[Lang.Blocks.robotis_cm_led_right+ Lang.Blocks.robotis_common_on,"1"],[Lang.Blocks.robotis_cm_led_left+Lang.Blocks.robotis_common_on,"2"],[Lang.Blocks.robotis_cm_led_both+Lang.Blocks.robotis_common_on,"3"]]),"LED_MODULE");this.appendDummyInput().appendField(Lang.Blocks.robotis_common_set).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.robotis_openCM70_aux_led_module=function(a,b){var c=b.getField("PORT",b),d=b.getField("LED_MODULE",b),e=Entry.Robotis_openCM70.INSTRUCTION.WRITE,f=0,g=0,f=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[0],g=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[1];return Entry.Robotis_carCont.postCallReturn(b,[[e,f+(c-1)*g,g,d]],Entry.Robotis_openCM70.delay)}; +Entry.block.robotis_openCM70_aux_led_module=function(b,a){var c=a.getField("PORT",a),d=a.getField("LED_MODULE",a),e=Entry.Robotis_openCM70.INSTRUCTION.WRITE,f=0,g=0,f=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[0],g=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[1];return Entry.Robotis_carCont.postCallReturn(a,[[e,f+(c-1)*g,g,d]],Entry.Robotis_openCM70.delay)}; Blockly.Blocks.robotis_openCM70_aux_custom={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.robotis_common_port_3,"3"],[Lang.Blocks.robotis_common_port_4,"4"],[Lang.Blocks.robotis_common_port_5,"5"],[Lang.Blocks.robotis_common_port_6,"6"]]),"PORT").appendField(Lang.Blocks.robotis_openCM70_aux_custom_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.robotis_common_set).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.robotis_openCM70_aux_custom=function(a,b){var c=b.getField("PORT",b),d=b.getNumberValue("VALUE"),e=Entry.Robotis_openCM70.INSTRUCTION.WRITE,f=0,g=0,f=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[0],g=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[1];return Entry.Robotis_carCont.postCallReturn(b,[[e,f+(c-1)*g,g,d]],Entry.Robotis_openCM70.delay)}; +"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.robotis_openCM70_aux_custom=function(b,a){var c=a.getField("PORT",a),d=a.getNumberValue("VALUE"),e=Entry.Robotis_openCM70.INSTRUCTION.WRITE,f=0,g=0,f=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[0],g=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[1];return Entry.Robotis_carCont.postCallReturn(a,[[e,f+(c-1)*g,g,d]],Entry.Robotis_openCM70.delay)}; Blockly.Blocks.robotis_openCM70_cm_custom={init:function(){this.setColour("#00979D");this.appendDummyInput().appendField(Lang.Blocks.robotis_cm_custom);this.appendDummyInput().appendField("(");this.appendValueInput("ADDRESS").setCheck(["Number","String"]);this.appendDummyInput().appendField(")");this.appendDummyInput().appendField(Lang.Blocks.robotis_common_case_01);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.robotis_common_set).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/hardware_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.robotis_openCM70_cm_custom=function(a,b){var c=Entry.Robotis_openCM70.INSTRUCTION.WRITE,d=0,e=0,d=b.getNumberValue("ADDRESS"),e=b.getNumberValue("VALUE");return Entry.Robotis_carCont.postCallReturn(b,[[c,d,65535c&&(c=0);createjs.Sound.setVolume(c);return b.callReturn()}; +Entry.block.sound_volume_change=function(b,a){var c=a.getNumberValue("VALUE",a)/100,c=c+createjs.Sound.getVolume();1c&&(c=0);createjs.Sound.setVolume(c);return a.callReturn()}; Blockly.Blocks.sound_volume_set={init:function(){this.setColour("#A4D01D");this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_volume_set_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_volume_set_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/sound_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}}; -Entry.block.sound_volume_set=function(a,b){var c=b.getNumberValue("VALUE",b)/100;1c&&(c=0);createjs.Sound.setVolume(c);return b.callReturn()};Blockly.Blocks.sound_silent_all={init:function(){this.setColour("#A4D01D");this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_silent_all).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/sound_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}}; -Entry.block.sound_silent_all=function(a,b){createjs.Sound.stop();return b.callReturn()};Blockly.Blocks.get_sounds={init:function(){this.setColour("#A4D01D");this.appendDummyInput().appendField("");this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("sounds"),"VALUE");this.appendDummyInput().appendField(" ");this.setOutput(!0,"String");this.setInputsInline(!0)}};Entry.block.get_sounds=function(a,b){return b.getStringField("VALUE")}; +Entry.block.sound_volume_set=function(b,a){var c=a.getNumberValue("VALUE",a)/100;1c&&(c=0);createjs.Sound.setVolume(c);return a.callReturn()};Blockly.Blocks.sound_silent_all={init:function(){this.setColour("#A4D01D");this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_silent_all).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/sound_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}}; +Entry.block.sound_silent_all=function(b,a){createjs.Sound.stop();return a.callReturn()};Blockly.Blocks.get_sounds={init:function(){this.setColour("#A4D01D");this.appendDummyInput().appendField("");this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("sounds"),"VALUE");this.appendDummyInput().appendField(" ");this.setOutput(!0,"String");this.setInputsInline(!0)}};Entry.block.get_sounds=function(b,a){return a.getStringField("VALUE")}; Blockly.Blocks.sound_something_with_block={init:function(){this.setColour("#A4D01D");this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_something_1);this.appendValueInput("VALUE").setCheck(["String","Number"]);this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_something_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/sound_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}}; -Entry.block.sound_something_with_block=function(a,b){var c=b.getStringValue("VALUE",b);(c=a.parent.getSound(c))&&createjs.Sound.play(c.id);return b.callReturn()}; +Entry.block.sound_something_with_block=function(b,a){var c=a.getStringValue("VALUE",a);(c=b.parent.getSound(c))&&createjs.Sound.play(c.id);return a.callReturn()}; Blockly.Blocks.sound_something_second_with_block={init:function(){this.setColour("#A4D01D");this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_something_second_1);this.appendValueInput("VALUE").setCheck(["String","Number"]);this.appendDummyInput().appendField(" ").appendField(Lang.Blocks.SOUND_sound_something_second_2);this.appendValueInput("SECOND").setCheck(["String","Number"]);this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_something_second_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/sound_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}};Entry.block.sound_something_second_with_block=function(a,b){var c=b.getStringValue("VALUE",b),d=b.getNumberValue("SECOND",b);(c=a.parent.getSound(c))&&createjs.Sound.play(c.id,{startTime:0,duration:1E3*d});return b.callReturn()}; +"block_icon/sound_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}};Entry.block.sound_something_second_with_block=function(b,a){var c=a.getStringValue("VALUE",a),d=a.getNumberValue("SECOND",a);(c=b.parent.getSound(c))&&createjs.Sound.play(c.id,{startTime:0,duration:1E3*d});return a.callReturn()}; Blockly.Blocks.sound_something_wait_with_block={init:function(){this.setColour("#A4D01D");this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_something_wait_1);this.appendValueInput("VALUE").setCheck(["String","Number"]);this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_something_wait_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/sound_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}}; -Entry.block.sound_something_wait_with_block=function(a,b){if(b.isPlay){if(1==b.playState)return b;delete b.playState;delete b.isPlay;return b.callReturn()}b.isPlay=!0;b.playState=1;var c=b.getStringValue("VALUE",b);if(c=a.parent.getSound(c))createjs.Sound.play(c.id),setTimeout(function(){b.playState=0},1E3*c.duration);return b}; +Entry.block.sound_something_wait_with_block=function(b,a){if(a.isPlay){if(1==a.playState)return a;delete a.playState;delete a.isPlay;return a.callReturn()}a.isPlay=!0;a.playState=1;var c=a.getStringValue("VALUE",a);if(c=b.parent.getSound(c))createjs.Sound.play(c.id),setTimeout(function(){a.playState=0},1E3*c.duration);return a}; Blockly.Blocks.sound_something_second_wait_with_block={init:function(){this.setColour("#A4D01D");this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_something_second_wait_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_something_second_wait_2).appendField(" ");this.appendValueInput("SECOND").setCheck(["String","Number"]);this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_something_second_wait_3).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ "block_icon/sound_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}}; -Entry.block.sound_something_second_wait_with_block=function(a,b){if(b.isPlay){if(1==b.playState)return b;delete b.isPlay;delete b.playState;return b.callReturn()}b.isPlay=!0;b.playState=1;var c=b.getStringValue("VALUE",b);if(c=a.parent.getSound(c)){var d=createjs.Sound.play(c.id),c=b.getNumberValue("SECOND",b);setTimeout(function(){d.stop();b.playState=0},1E3*c);d.addEventListener("complete",function(b){})}return b}; +Entry.block.sound_something_second_wait_with_block=function(b,a){if(a.isPlay){if(1==a.playState)return a;delete a.isPlay;delete a.playState;return a.callReturn()}a.isPlay=!0;a.playState=1;var c=a.getStringValue("VALUE",a);if(c=b.parent.getSound(c)){var d=createjs.Sound.play(c.id),c=a.getNumberValue("SECOND",a);setTimeout(function(){d.stop();a.playState=0},1E3*c);d.addEventListener("complete",function(a){})}return a}; Blockly.Blocks.sound_from_to={init:function(){this.setColour("#A4D01D");this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_from_to_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_from_to_2);this.appendValueInput("START").setCheck(["String","Number"]);this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_from_to_3);this.appendValueInput("END").setCheck(["String","Number"]);this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_from_to_4).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+ -"block_icon/sound_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}};Entry.block.sound_from_to=function(a,b){var c=b.getStringValue("VALUE",b);if(c=a.parent.getSound(c)){var d=1E3*b.getNumberValue("START",b),e=1E3*b.getNumberValue("END",b);createjs.Sound.play(c.id,{startTime:Math.min(d,e),duration:Math.max(d,e)-Math.min(d,e)})}return b.callReturn()}; +"block_icon/sound_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}};Entry.block.sound_from_to=function(b,a){var c=a.getStringValue("VALUE",a);if(c=b.parent.getSound(c)){var d=1E3*a.getNumberValue("START",a),e=1E3*a.getNumberValue("END",a);createjs.Sound.play(c.id,{startTime:Math.min(d,e),duration:Math.max(d,e)-Math.min(d,e)})}return a.callReturn()}; Blockly.Blocks.sound_from_to_and_wait={init:function(){this.setColour("#A4D01D");this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_from_to_and_wait_1);this.appendValueInput("VALUE").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_from_to_and_wait_2);this.appendValueInput("START").setCheck(["String","Number"]);this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_from_to_and_wait_3);this.appendValueInput("END").setCheck(["String","Number"]); this.appendDummyInput().appendField(Lang.Blocks.SOUND_sound_from_to_and_wait_4).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/sound_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}}; -Entry.block.sound_from_to_and_wait=function(a,b){if(b.isPlay){if(1==b.playState)return b;delete b.isPlay;delete b.playState;return b.callReturn()}b.isPlay=!0;b.playState=1;var c=b.getStringValue("VALUE",b);if(c=a.parent.getSound(c)){var d=1E3*b.getNumberValue("START",b),e=1E3*b.getNumberValue("END",b),f=Math.min(d,e),d=Math.max(d,e)-f;createjs.Sound.play(c.id,{startTime:f,duration:d});setTimeout(function(){b.playState=0},d)}return b};Blockly.Blocks.when_run_button_click={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_icon_play.png","*","start")).appendField(Lang.Blocks.START_when_run_button_click);this.setInputsInline(!0);this.setNextStatement(!0)}};Entry.block.when_run_button_click=function(a,b){return b.callReturn()}; +Entry.block.sound_from_to_and_wait=function(b,a){if(a.isPlay){if(1==a.playState)return a;delete a.isPlay;delete a.playState;return a.callReturn()}a.isPlay=!0;a.playState=1;var c=a.getStringValue("VALUE",a);if(c=b.parent.getSound(c)){var d=1E3*a.getNumberValue("START",a),e=1E3*a.getNumberValue("END",a),f=Math.min(d,e),d=Math.max(d,e)-f;createjs.Sound.play(c.id,{startTime:f,duration:d});setTimeout(function(){a.playState=0},d)}return a};Blockly.Blocks.when_run_button_click={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_icon_play.png","*","start")).appendField(Lang.Blocks.START_when_run_button_click);this.setInputsInline(!0);this.setNextStatement(!0)}};Entry.block.when_run_button_click=function(b,a){return a.callReturn()}; Blockly.Blocks.press_some_key={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_icon_keyboard.png","*","start")).appendField(Lang.Blocks.START_press_some_key_1).appendField(new Blockly.FieldDropdown([["q","81"],["w","87"],["e","69"],["r","82"],["a","65"],["s","83"],["d","68"],[Lang.Blocks.START_press_some_key_up,"38"],[Lang.Blocks.START_press_some_key_down,"40"],[Lang.Blocks.START_press_some_key_left,"37"],[Lang.Blocks.START_press_some_key_right, -"39"],[Lang.Blocks.START_press_some_key_enter,"13"],[Lang.Blocks.START_press_some_key_space,"32"]]),"VALUE").appendField(Lang.Blocks.START_press_some_key_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0)}};Entry.block.press_some_key=function(a,b){return b.callReturn()}; -Blockly.Blocks.when_some_key_pressed={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_icon_keyboard.png","*","start")).appendField(Lang.Blocks.START_press_some_key_1).appendField(new Blockly.FieldKeydownInput("81"),"VALUE").appendField(Lang.Blocks.START_press_some_key_2);this.setInputsInline(!0);this.setNextStatement(!0)}};Entry.block.when_some_key_pressed=function(a,b){return b.callReturn()}; -Blockly.Blocks.mouse_clicked={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_icon_mouse.png","*","start")).appendField(Lang.Blocks.START_mouse_clicked);this.setInputsInline(!0);this.setNextStatement(!0)}};Entry.block.mouse_clicked=function(a,b){return b.callReturn()}; -Blockly.Blocks.mouse_click_cancled={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_icon_mouse.png","*","start")).appendField(Lang.Blocks.START_mouse_click_cancled);this.setInputsInline(!0);this.setNextStatement(!0)}};Entry.block.mouse_click_cancled=function(a,b){return b.callReturn()}; -Blockly.Blocks.when_object_click={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_icon_mouse.png","*","start")).appendField(Lang.Blocks.START_when_object_click);this.setInputsInline(!0);this.setNextStatement(!0)}};Entry.block.when_object_click=function(a,b){return b.callReturn()}; -Blockly.Blocks.when_object_click_canceled={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_icon_mouse.png","*","start")).appendField(Lang.Blocks.START_when_object_click_canceled);this.setInputsInline(!0);this.setNextStatement(!0)}};Entry.block.when_object_click_canceled=function(a,b){return b.callReturn()}; -Blockly.Blocks.when_some_key_click={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_icon_keyboard.png","*","start")).appendField(Lang.Blocks.START_when_some_key_click);this.setInputsInline(!0);this.setNextStatement(!0)}};Entry.block.when_some_key_click=function(a,b){return b.callReturn()}; -Blockly.Blocks.when_message_cast={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_icon_signal.png","*","start")).appendField(Lang.Blocks.START_when_message_cast_1).appendField(new Blockly.FieldDropdownDynamic("messages"),"VALUE").appendField(Lang.Blocks.START_when_message_cast_2);this.setInputsInline(!0);this.setNextStatement(!0)}};Entry.block.when_message_cast=function(a,b){return b.callReturn()}; -Blockly.Blocks.message_cast={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(Lang.Blocks.START_message_cast_1).appendField(new Blockly.FieldDropdownDynamic("messages"),"VALUE").appendField(Lang.Blocks.START_message_cast_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_03.png","*"));this.setInputsInline(!0);this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}}; -Entry.block.message_cast=function(a,b){var c=b.getField("VALUE",b),d=Entry.isExist(c,"id",Entry.variableContainer.messages_);if("null"==c||!d)throw Error("value can not be null or undefined");Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent,["when_message_cast",c]);return b.callReturn()}; -Blockly.Blocks.add_message={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(Lang.Blocks.START_add_message).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_03.png","*"));this.setInputsInline(!0)}};Entry.block.add_massage=function(a,b){return b.callReturn()}; -Blockly.Blocks.message_cast_wait={init:function(){this.setColour("#3BBD70");this.appendDummyInput().appendField(Lang.Blocks.START_message_send_wait_1).appendField(new Blockly.FieldDropdownDynamic("messages"),"VALUE").appendField(Lang.Blocks.START_message_send_wait_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/start_03.png","*"));this.setInputsInline(!0);this.setNextStatement(!0);this.setPreviousStatement(!0)}}; -Entry.block.message_cast_wait=function(a,b){if(b.runningScript){if(b.runningScript.length)return Entry.engine.computeFunction(b),b;delete b.runningScript;return b.callReturn()}var c=b.getField("VALUE",b),d=Entry.isExist(c,"id",Entry.variableContainer.messages_);if("null"==c||!d)throw Error("value can not be null or undefined");var e=[];Entry.container.mapEntityIncludeCloneOnScene(function(b,a){for(var c=a[0],d=a[1],l=b.parent.script.childNodes,q=0;qc.array_.length)throw Error("can not remove value from array");c.array_.splice(d-1,1);c.updateView();return b.callReturn()}; +"block_icon/variable_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}};Entry.block.remove_value_from_list=function(b,a){var c=a.getField("LIST",a),d=a.getValue("VALUE",a),c=Entry.variableContainer.getList(c,b);if(!c.array_||isNaN(d)||d>c.array_.length)throw Error("can not remove value from array");c.array_.splice(d-1,1);c.updateView();return a.callReturn()}; Blockly.Blocks.insert_value_to_list={init:function(){this.setColour("#E457DC");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_insert_value_to_list_1);this.appendValueInput("DATA").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_insert_value_to_list_2);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("lists"),"LIST");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_insert_value_to_list_3);this.appendValueInput("INDEX").setCheck(["Number", "String"]);this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_insert_value_to_list_4).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/variable_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.insert_value_to_list=function(a,b){var c=b.getField("LIST",b),d=b.getValue("DATA",b),e=b.getValue("INDEX",b),c=Entry.variableContainer.getList(c,a);if(!c.array_||isNaN(e)||0==e||e>c.array_.length+1)throw Error("can not insert value to array");c.array_.splice(e-1,0,{data:d});c.updateView();return b.callReturn()}; +Entry.block.insert_value_to_list=function(b,a){var c=a.getField("LIST",a),d=a.getValue("DATA",a),e=a.getValue("INDEX",a),c=Entry.variableContainer.getList(c,b);if(!c.array_||isNaN(e)||0==e||e>c.array_.length+1)throw Error("can not insert value to array");c.array_.splice(e-1,0,{data:d});c.updateView();return a.callReturn()}; Blockly.Blocks.change_value_list_index={init:function(){this.setColour("#E457DC");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_change_value_list_index_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("lists"),"LIST");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_change_value_list_index_2);this.appendValueInput("INDEX").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_change_value_list_index_3);this.appendValueInput("DATA").setCheck(["Number", "String"]);this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_change_value_list_index_4).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/variable_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.change_value_list_index=function(a,b){var c=b.getField("LIST",b),d=b.getValue("DATA",b),e=b.getValue("INDEX",b),c=Entry.variableContainer.getList(c,a);if(!c.array_||isNaN(e)||e>c.array_.length)throw Error("can not insert value to array");c.array_[e-1].data=d;c.updateView();return b.callReturn()}; +Entry.block.change_value_list_index=function(b,a){var c=a.getField("LIST",a),d=a.getValue("DATA",a),e=a.getValue("INDEX",a),c=Entry.variableContainer.getList(c,b);if(!c.array_||isNaN(e)||e>c.array_.length)throw Error("can not insert value to array");c.array_[e-1].data=d;c.updateView();return a.callReturn()}; Blockly.Blocks.value_of_index_from_list={init:function(){this.setColour("#E457DC");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_value_of_index_from_list_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("lists"),"LIST");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_value_of_index_from_list_2);this.appendValueInput("INDEX").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_value_of_index_from_list_3);this.setOutput(!0, -"String");this.setInputsInline(!0)}};Entry.block.value_of_index_from_list=function(a,b){var c=b.getField("LIST",b),d=b.getValue("INDEX",b),c=Entry.variableContainer.getList(c,a),d=Entry.getListRealIndex(d,c);if(!c.array_||isNaN(d)||d>c.array_.length)throw Error("can not insert value to array");return c.array_[d-1].data}; -Blockly.Blocks.length_of_list={init:function(){this.setColour("#E457DC");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_length_of_list_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("lists"),"LIST");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_length_of_list_2);this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.length_of_list=function(a,b){var c=b.getField("LIST",b);return Entry.variableContainer.getList(c).array_.length}; +"String");this.setInputsInline(!0)}};Entry.block.value_of_index_from_list=function(b,a){var c=a.getField("LIST",a),d=a.getValue("INDEX",a),c=Entry.variableContainer.getList(c,b),d=Entry.getListRealIndex(d,c);if(!c.array_||isNaN(d)||d>c.array_.length)throw Error("can not insert value to array");return c.array_[d-1].data}; +Blockly.Blocks.length_of_list={init:function(){this.setColour("#E457DC");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_length_of_list_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("lists"),"LIST");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_length_of_list_2);this.setOutput(!0,"Number");this.setInputsInline(!0)}};Entry.block.length_of_list=function(b,a){var c=a.getField("LIST",a);return Entry.variableContainer.getList(c).array_.length}; Blockly.Blocks.show_list={init:function(){this.setColour("#E457DC");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_show_list_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("lists"),"LIST").appendField(Lang.Blocks.VARIABLE_show_list_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/variable_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.show_list=function(a,b){var c=b.getField("LIST",b);Entry.variableContainer.getList(c).setVisible(!0);return b.callReturn()}; +Entry.block.show_list=function(b,a){var c=a.getField("LIST",a);Entry.variableContainer.getList(c).setVisible(!0);return a.callReturn()}; Blockly.Blocks.hide_list={init:function(){this.setColour("#E457DC");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_hide_list_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("lists"),"LIST").appendField(Lang.Blocks.VARIABLE_hide_list_2).appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/variable_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0)}}; -Entry.block.hide_list=function(a,b){var c=b.getField("LIST",b);Entry.variableContainer.getList(c).setVisible(!1);return b.callReturn()}; +Entry.block.hide_list=function(b,a){var c=a.getField("LIST",a);Entry.variableContainer.getList(c).setVisible(!1);return a.callReturn()}; Blockly.Blocks.options_for_list={init:function(){this.setColour("#E457DC");this.appendDummyInput().appendField("");this.appendDummyInput("VALUE").appendField(new Blockly.FieldDropdown([[Lang.Blocks.VARIABLE_list_option_first,"FIRST"],[Lang.Blocks.VARIABLE_list_option_last,"LAST"],[Lang.Blocks.VARIABLE_list_option_random,"RANDOM"]]),"OPERATOR");this.appendDummyInput().appendField(" ");this.setOutput(!0,"Number");this.setInputsInline(!0)}}; -Entry.block.options_for_list=function(a,b){return b.getField("OPERATOR",b)}; +Entry.block.options_for_list=function(b,a){return a.getField("OPERATOR",a)}; Blockly.Blocks.set_visible_answer={init:function(){this.setColour("#E457DC");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_get_canvas_input_value);this.appendDummyInput().appendField(new Blockly.FieldDropdown([[Lang.Blocks.CALC_timer_visible_show,"SHOW"],[Lang.Blocks.CALC_timer_visible_hide,"HIDE"]]),"BOOL");this.appendDummyInput().appendField("").appendField(new Blockly.FieldIcon(Entry.mediaFilePath+"block_icon/variable_03.png","*"));this.setInputsInline(!0);this.setPreviousStatement(!0); -this.setNextStatement(!0)},whenAdd:function(){Entry.container.showProjectAnswer()},whenRemove:function(a){Entry.container.hideProjectAnswer(a)}};Entry.block.set_visible_answer=function(a,b){"HIDE"==b.getField("BOOL",b)?Entry.container.inputValue.setVisible(!1):Entry.container.inputValue.setVisible(!0);return b.callReturn()}; +this.setNextStatement(!0)},whenAdd:function(){Entry.container&&Entry.container.showProjectAnswer()},whenRemove:function(b){Entry.container&&Entry.container.hideProjectAnswer(b)}};Entry.block.set_visible_answer=function(b,a){"HIDE"==a.getField("BOOL",a)?Entry.container.inputValue.setVisible(!1):Entry.container.inputValue.setVisible(!0);return a.callReturn()}; Blockly.Blocks.is_included_in_list={init:function(){this.setColour("#E457DC");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_is_included_in_list_1);this.appendDummyInput().appendField(new Blockly.FieldDropdownDynamic("lists"),"LIST");this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_is_included_in_list_2);this.appendValueInput("DATA").setCheck(["Number","String"]);this.appendDummyInput().appendField(Lang.Blocks.VARIABLE_is_included_in_list_3);this.setOutput(!0,"Boolean");this.setInputsInline(!0)}}; -Entry.block.is_included_in_list=function(a,b){var c=b.getField("LIST",b),d=b.getStringValue("DATA",b),c=Entry.variableContainer.getList(c);if(!c)return!1;for(var c=c.array_,e=0,f=c.length;ea||0>d||a>e||d>e||b.splice.call(this,d,0,b.splice.call(this,a,1)[0])};a.sort=function(){};a.fromJSON=function(){};a.toJSON=function(){for(var b=[],a=0,e=this.length;a/,d;d=a instanceof HTMLElement?$(a):a instanceof jQuery?a:c.test(a)?$(a):$("<"+a+">");if(void 0===b)return d;b.id&&d.attr("id",b.id);b.class&&d.addClass(b.class);b.classes&&b.classes.map(function(b){d.addClass(b)});b.parent&&b.parent.append(d);d.bindOnClick=function(){var b,a,c=function(b){b.stopImmediatePropagation();b.handled||(b.handled=!0,a.call(this,b))};1a.x+a.width+this.width?(this.object.x=a.x+a.width+this.width/2,b+="e"):(this.object.x=a.x-this.width/2,b+="w");this.notch.type!=b&&(this.object.removeChild(this.notch),this.notch=this.createSpeakNotch(b),this.object.addChild(this.notch))}; -Entry.Dialog.prototype.createSpeakNotch=function(a){var b=new createjs.Shape;b.type=a;"ne"==a?b.graphics.f("#f5f5f5").ss(2,"round").s("#6FC0DD").mt(0,this.height+this.padding-1.5).lt(-10,this.height+this.padding+20).lt(20,this.height+this.padding-1.5):"nw"==a?b.graphics.f("#f5f5f5").ss(2,"round").s("#6FC0DD").mt(this.width,this.height+this.padding-1.5).lt(this.width+10,this.height+this.padding+20).lt(this.width-20,this.height+this.padding-1.5):"se"==a?b.graphics.f("#f5f5f5").ss(2,"round").s("#6FC0DD").mt(0, --this.padding+1.5).lt(-10,-this.padding-20).lt(20,-this.padding+1.5):"sw"==a&&b.graphics.f("#f5f5f5").ss(2,"round").s("#6FC0DD").mt(this.width,-this.padding+1.5).lt(this.width+10,-this.padding-20).lt(this.width-20,-this.padding+1.5);return b};Entry.Dialog.prototype.remove=function(){Entry.stage.unloadDialog(this);this.parent.dialog=null};Entry.DoneProject=function(a){this.generateView(a)};var p=Entry.DoneProject.prototype;p.init=function(a){this.projectId=a};p.generateView=function(a){var b=Entry.createElement("div");b.addClass("entryContainerDoneWorkspace");b.addClass("entryHidden");this.doneContainer=b;b=Entry.createElement("iframe");b.setAttribute("id","doneProjectframe");b.setAttribute("frameborder",0);b.setAttribute("src","/api/iframe/project/"+a);this.doneProjectFrame=b;this.doneContainer.appendChild(b)};p.getView=function(){return this.doneContainer}; -p.resize=function(){var a=document.getElementById("entryContainerWorkspaceId"),b=document.getElementById("doneProjectframe");w=a.offsetWidth;b.width=w+"px";b.height=9*w/16+"px"};Entry.Engine=function(){function a(b){var a=[37,38,39,40,32],d=b.keyCode||b.which,e=Entry.stage.inputField;32==d&&e&&e.hasFocus()||-1c;c++)(function(c){var e=Entry.createElement("td","progressCell"+c);e.bindOnClick(function(){Entry.engine.setSpeedMeter(b[c])});a.appendChild(e)})(c);this.view_.insertBefore(this.speedProgress_,this.maximizeButton);this.speedProgress_.appendChild(a);this.speedHandle_=Entry.createElement("div","entrySpeedHandleWorkspace");c=(Entry.interfaceState.canvasWidth-84)/5;$(this.speedHandle_).draggable({axis:"x",grid:[c,c],containment:[80,0,4*c+80,0],drag:function(b,a){var c=(a.position.left-80)/(Entry.interfaceState.canvasWidth- +this.setNextStatement(!0)}};Entry.block.xbot_lcd=function(b,a){var c=Entry.hw.sendQueue,d=a.getNumberField("LINE",a),e=a.getStringValue("VALUE",a);0==d?(c.lcdNum=0,c.lcdTxt=e):1==d&&(c.lcdNum=1,c.lcdTxt=e);return a.callReturn()};Entry.Collection=function(b){this.length=0;this._hashMap={};this._observers=[];this.set(b)}; +(function(b,a){b.set=function(b){for(;this.length;)a.pop.call(this);var d=this._hashMap,e;for(e in d)delete d[e];if(void 0!==b){e=0;for(var f=b.length;eb||0>d||b>e||d>e||a.splice.call(this,d,0,a.splice.call(this,b,1)[0])};b.sort=function(){};b.fromJSON=function(){};b.toJSON=function(){for(var a=[],b=0,e=this.length;b/,d;d=b instanceof HTMLElement?$(b):b instanceof jQuery?b:c.test(b)?$(b):$("<"+b+">");if(void 0===a)return d;a.id&&d.attr("id",a.id);a.class&&d.addClass(a.class);a.classes&&a.classes.map(function(a){d.addClass(a)});a.src&&d.attr("src",a.src);a.parent&&a.parent.append(d);d.bindOnClick=function(){var a,b,c=function(a){a.stopImmediatePropagation();a.handled||(a.handled=!0,b.call(this,a))};1b.x+b.width+this.width?(this.object.x=b.x+b.width+this.width/2,a+="e"):(this.object.x=b.x-this.width/2,a+="w");this.notch.type!=a&&(this.object.removeChild(this.notch),this.notch=this.createSpeakNotch(a),this.object.addChild(this.notch))}; +Entry.Dialog.prototype.createSpeakNotch=function(b){var a=new createjs.Shape;a.type=b;"ne"==b?a.graphics.f("#f5f5f5").ss(2,"round").s("#6FC0DD").mt(0,this.height+this.padding-1.5).lt(-10,this.height+this.padding+20).lt(20,this.height+this.padding-1.5):"nw"==b?a.graphics.f("#f5f5f5").ss(2,"round").s("#6FC0DD").mt(this.width,this.height+this.padding-1.5).lt(this.width+10,this.height+this.padding+20).lt(this.width-20,this.height+this.padding-1.5):"se"==b?a.graphics.f("#f5f5f5").ss(2,"round").s("#6FC0DD").mt(0, +-this.padding+1.5).lt(-10,-this.padding-20).lt(20,-this.padding+1.5):"sw"==b&&a.graphics.f("#f5f5f5").ss(2,"round").s("#6FC0DD").mt(this.width,-this.padding+1.5).lt(this.width+10,-this.padding-20).lt(this.width-20,-this.padding+1.5);return a};Entry.Dialog.prototype.remove=function(){Entry.stage.unloadDialog(this);this.parent.dialog=null};Entry.DoneProject=function(b){this.generateView(b)};var p=Entry.DoneProject.prototype;p.init=function(b){this.projectId=b};p.generateView=function(b){var a=Entry.createElement("div");a.addClass("entryContainerDoneWorkspace");a.addClass("entryHidden");this.doneContainer=a;a=Entry.createElement("iframe");a.setAttribute("id","doneProjectframe");a.setAttribute("frameborder",0);a.setAttribute("src","/api/iframe/project/"+b);this.doneProjectFrame=a;this.doneContainer.appendChild(a)};p.getView=function(){return this.doneContainer}; +p.resize=function(){var b=document.getElementById("entryContainerWorkspaceId"),a=document.getElementById("doneProjectframe");w=b.offsetWidth;a.width=w+"px";a.height=9*w/16+"px"};Entry.Engine=function(){function b(a){var b=[37,38,39,40,32],d=a.keyCode||a.which,e=Entry.stage.inputField;32==d&&e&&e.hasFocus()||-1c;c++)(function(c){var e=Entry.createElement("td","progressCell"+c);e.bindOnClick(function(){Entry.engine.setSpeedMeter(a[c])});b.appendChild(e)})(c);this.view_.insertBefore(this.speedProgress_,this.maximizeButton);this.speedProgress_.appendChild(b);this.speedHandle_=Entry.createElement("div","entrySpeedHandleWorkspace");c=(Entry.interfaceState.canvasWidth-84)/5;$(this.speedHandle_).draggable({axis:"x",grid:[c,c],containment:[80,0,4*c+80,0],drag:function(a,b){var c=(b.position.left-80)/(Entry.interfaceState.canvasWidth- 84)*5,c=Math.floor(c);0>c||Entry.engine.setSpeedMeter(Entry.engine.speeds[c])}});this.view_.insertBefore(this.speedHandle_,this.maximizeButton);this.setSpeedMeter(Entry.FPS)}}; -Entry.Engine.prototype.setSpeedMeter=function(a){var b=this.speeds.indexOf(a);0>b||(b=Math.min(4,b),b=Math.max(0,b),this.speedPanelOn&&(this.speedHandle_.style.left=(Entry.interfaceState.canvasWidth-80)/10*(2*b+1)+80-9+"px"),Entry.FPS!=a&&(clearInterval(this.ticker),this.ticker=setInterval(this.update,Math.floor(1E3/a)),Entry.FPS=a))};Entry.Engine.prototype.start=function(a){createjs.Ticker.setFPS(Entry.FPS);this.ticker=setInterval(this.update,Math.floor(1E3/Entry.FPS))}; -Entry.Engine.prototype.stop=function(){clearInterval(this.ticker);this.ticker=null};Entry.Engine.prototype.update=function(){Entry.engine.isState("run")&&(Entry.engine.computeObjects(),Entry.hw.update())};Entry.Engine.prototype.computeObjects=function(){Entry.container.mapEntityIncludeCloneOnScene(this.computeFunction)}; -Entry.Engine.prototype.computeFunction=function(a){a=a.runningScript;for(var b=0;ba||(a=Math.min(4,a),a=Math.max(0,a),this.speedPanelOn&&(this.speedHandle_.style.left=(Entry.interfaceState.canvasWidth-80)/10*(2*a+1)+80-9+"px"),Entry.FPS!=b&&(clearInterval(this.ticker),this.ticker=setInterval(this.update,Math.floor(1E3/b)),Entry.FPS=b))};Entry.Engine.prototype.start=function(b){createjs.Ticker.setFPS(Entry.FPS);this.ticker=setInterval(this.update,Math.floor(1E3/Entry.FPS))}; +Entry.Engine.prototype.stop=function(){clearInterval(this.ticker);this.ticker=null};Entry.Engine.prototype.update=function(){Entry.engine.isState("run")&&(Entry.engine.computeObjects(),Entry.hw.update())};Entry.Engine.prototype.computeObjects=function(){Entry.container.mapObjectOnScene(this.computeFunction)};Entry.Engine.prototype.computeFunction=function(b){b.script.tick()}; +Entry.Engine.computeThread=function(b,a){Entry.engine.isContinue=!0;for(var c=!1;a&&Entry.engine.isContinue&&!c;){Entry.engine.isContinue=!a.isRepeat;var d=a.run(),c=d&&d===a;a=d}return a};Entry.Engine.prototype.isState=function(b){return-1Entry.engine.pressedKeys.indexOf(b)&&Entry.engine.pressedKeys.push(b);a.ctrlKey&&"workspace"==c?83==b?(a.preventDefault(),Entry.dispatchEvent("saveWorkspace")):82==b?(a.preventDefault(),Entry.engine.run()):90==b?(a.preventDefault(),Entry.dispatchEvent(a.shiftKey?"redo":"undo")):48b&&(a.preventDefault(),Entry.playground.selectMenu(b-49)):Entry.engine.isState("run")&&(Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent, -["press_some_key",b]),Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent,["when_some_key_pressed",b]));Entry.engine.isState("stop")&&"workspace"===c&&37<=b&&40>=b&&Entry.stage.moveSprite(a)};Entry.Engine.prototype.captureKeyUpEvent=function(a){a=a.keyCode;0<=Entry.engine.pressedKeys.indexOf(a)&&Entry.engine.pressedKeys.splice(Entry.engine.pressedKeys.indexOf(a),1)}; -Entry.Engine.prototype.raiseKeyEvent=function(a,b){for(var c=b[0],d=b[1],e=a.parent.script.childNodes,f=0;f=a&&Entry.stage.moveSprite(b)}; +Entry.Engine.prototype.raiseKeyEvent=function(b,a){return b.parent.script.raiseEvent(a[0],b,String(a[1]))};Entry.Engine.prototype.updateMouseView=function(){var b=Entry.stage.mouseCoordinate;this.mouseView.innerHTML="X : "+b.x+", Y : "+b.y;this.mouseView.removeClass("entryRemove")};Entry.Engine.prototype.hideMouseView=function(){this.mouseView.addClass("entryRemove")}; +Entry.Engine.prototype.toggleFullscreen=function(){if(this.popup)this.popup.remove(),this.popup=null;else{this.popup=new Entry.Popup;if("workspace"!=Entry.type){var b=$(document);$(this.popup.body_).css("top",b.scrollTop());$("body").css("overflow","hidden");popup.window_.appendChild(Entry.stage.canvas.canvas)}popup.window_.appendChild(Entry.engine.view_)}}; Entry.Engine.prototype.exitFullScreen=function(){document.webkitIsFullScreen||document.mozIsFullScreen||document.isFullScreen||(Entry.engine.footerView_.removeClass("entryRemove"),Entry.engine.headerView_.removeClass("entryRemove"))};Entry.Engine.prototype.showProjectTimer=function(){Entry.engine.projectTimer&&this.projectTimer.setVisible(!0)}; -Entry.Engine.prototype.hideProjectTimer=function(a){var b=this.projectTimer;if(b&&b.isVisible()&&!this.isState("run")){for(var c=Entry.container.getAllObjects(),d=["get_project_timer_value","reset_project_timer","set_visible_project_timer"],e=0,f=c.length;ethis.direction)==(0<=a&&180>a)||(this.setScaleX(-this.getScaleX()),Entry.stage.updateObject(),this.flip=!this.flip);this.direction=a.mod(360);this.object.direction=this.direction;this.isClone||this.parent.updateRotationView();Entry.dispatchEvent("updateObject")}; -Entry.EntityObject.prototype.setRotation=function(a){"free"!=this.parent.getRotateMethod()&&(a=0);this.rotation=a.mod(360);this.object.rotation=this.rotation;this.updateDialog();this.isClone||this.parent.updateRotationView();Entry.dispatchEvent("updateObject")};Entry.EntityObject.prototype.getRotation=function(){return this.rotation};Entry.EntityObject.prototype.setRegX=function(a){"textBox"==this.type&&(a=0);this.regX=a;this.object.regX=this.regX};Entry.EntityObject.prototype.getRegX=function(){return this.regX}; -Entry.EntityObject.prototype.setRegY=function(a){"textBox"==this.type&&(a=0);this.regY=a;this.object.regY=this.regY};Entry.EntityObject.prototype.getRegY=function(){return this.regY};Entry.EntityObject.prototype.setScaleX=function(a){this.scaleX=a;this.object.scaleX=this.scaleX;this.parent.updateCoordinateView();this.updateDialog()};Entry.EntityObject.prototype.getScaleX=function(){return this.scaleX}; -Entry.EntityObject.prototype.setScaleY=function(a){this.scaleY=a;this.object.scaleY=this.scaleY;this.parent.updateCoordinateView();this.updateDialog()};Entry.EntityObject.prototype.getScaleY=function(){return this.scaleY};Entry.EntityObject.prototype.setSize=function(a){1>a&&(a=1);a/=this.getSize();this.setScaleX(this.getScaleX()*a);this.setScaleY(this.getScaleY()*a);this.isClone||this.parent.updateCoordinateView()}; -Entry.EntityObject.prototype.getSize=function(){return(this.getWidth()*Math.abs(this.getScaleX())+this.getHeight()*Math.abs(this.getScaleY()))/2};Entry.EntityObject.prototype.setWidth=function(a){this.width=a;this.object.width=this.width;this.textObject&&this.getLineBreak()&&(this.textObject.lineWidth=this.width);this.updateDialog();this.updateBG()};Entry.EntityObject.prototype.getWidth=function(){return this.width}; -Entry.EntityObject.prototype.setHeight=function(a){this.height=a;this.textObject&&(this.object.height=this.height,this.alignTextBox());this.updateDialog();this.updateBG()};Entry.EntityObject.prototype.getHeight=function(){return this.height};Entry.EntityObject.prototype.setColour=function(a){a||(a="#000000");this.colour=a;this.textObject&&(this.textObject.color=this.colour)};Entry.EntityObject.prototype.getColour=function(){return this.colour}; -Entry.EntityObject.prototype.setBGColour=function(a){a||(a="transparent");this.bgColor=a;this.updateBG()};Entry.EntityObject.prototype.getBGColour=function(){return this.bgColor};Entry.EntityObject.prototype.setUnderLine=function(a){void 0===a&&(a=!1);this.underLine=a;this.textObject.underLine=a};Entry.EntityObject.prototype.getUnderLine=function(){return this.underLine};Entry.EntityObject.prototype.setStrike=function(a){void 0===a&&(a=!1);this.strike=a;this.textObject.strike=a}; -Entry.EntityObject.prototype.getStrike=function(){return this.strike};Entry.EntityObject.prototype.getFont=function(){var a=[];this.fontBold&&a.push("bold");this.fontItalic&&a.push("italic");a.push(this.getFontSize()+"px");a.push(this.fontType);return a.join(" ")}; -Entry.EntityObject.prototype.setFont=function(a){if("textBox"==this.parent.objectType&&this.font!==a){a||(a="20px Nanum Gothic");var b=a.split(" "),c=0;if(c=-1=h?e=[1,0,0,0,0,0,g,f,0,0,0,-1*f,g,0,0,0,0,0,1,0,0,0,0,0,1]:.66>=h?e=[g,0,f,0,0,0,1,0,0,0,f,0,g,0,0,0,0,0,1,0,0,0,0,0,1]:.99>=h&&(e=[g,f,0,0,0,-1*f,g,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1]);e=(new createjs.ColorMatrix).concat(e);e=new createjs.ColorMatrixFilter(e);c.push(e);a.alpha=b.alpha=d(b.alpha,0,1);a.filters=c;a.cache(0,0,this.getWidth(),this.getHeight())}; +Entry.EntityObject.prototype.restoreEntity=function(b){var a=this.toJSON();this.syncModel_(b);Entry.dispatchEvent("updateObject");Entry.stateManager&&Entry.stateManager.addCommand("restore object",this,this.restoreEntity,a)};Entry.EntityObject.prototype.setX=function(b){"number"==typeof b&&(this.x=b,this.object.x=this.x,this.isClone||this.parent.updateCoordinateView(),this.updateDialog())};Entry.EntityObject.prototype.getX=function(){return this.x}; +Entry.EntityObject.prototype.setY=function(b){"number"==typeof b&&(this.y=b,this.object.y=-this.y,this.isClone||this.parent.updateCoordinateView(),this.updateDialog())};Entry.EntityObject.prototype.getY=function(){return this.y};Entry.EntityObject.prototype.getDirection=function(){return this.direction}; +Entry.EntityObject.prototype.setDirection=function(b,a){b||(b=0);"vertical"!=this.parent.getRotateMethod()||a||(0<=this.direction&&180>this.direction)==(0<=b&&180>b)||(this.setScaleX(-this.getScaleX()),Entry.stage.updateObject(),this.flip=!this.flip);this.direction=b.mod(360);this.object.direction=this.direction;this.isClone||this.parent.updateRotationView();Entry.dispatchEvent("updateObject")}; +Entry.EntityObject.prototype.setRotation=function(b){"free"!=this.parent.getRotateMethod()&&(b=0);this.rotation=b.mod(360);this.object.rotation=this.rotation;this.updateDialog();this.isClone||this.parent.updateRotationView();Entry.dispatchEvent("updateObject")};Entry.EntityObject.prototype.getRotation=function(){return this.rotation};Entry.EntityObject.prototype.setRegX=function(b){"textBox"==this.type&&(b=0);this.regX=b;this.object.regX=this.regX};Entry.EntityObject.prototype.getRegX=function(){return this.regX}; +Entry.EntityObject.prototype.setRegY=function(b){"textBox"==this.type&&(b=0);this.regY=b;this.object.regY=this.regY};Entry.EntityObject.prototype.getRegY=function(){return this.regY};Entry.EntityObject.prototype.setScaleX=function(b){this.scaleX=b;this.object.scaleX=this.scaleX;this.parent.updateCoordinateView();this.updateDialog()};Entry.EntityObject.prototype.getScaleX=function(){return this.scaleX}; +Entry.EntityObject.prototype.setScaleY=function(b){this.scaleY=b;this.object.scaleY=this.scaleY;this.parent.updateCoordinateView();this.updateDialog()};Entry.EntityObject.prototype.getScaleY=function(){return this.scaleY};Entry.EntityObject.prototype.setSize=function(b){1>b&&(b=1);b/=this.getSize();this.setScaleX(this.getScaleX()*b);this.setScaleY(this.getScaleY()*b);this.isClone||this.parent.updateCoordinateView()}; +Entry.EntityObject.prototype.getSize=function(){return(this.getWidth()*Math.abs(this.getScaleX())+this.getHeight()*Math.abs(this.getScaleY()))/2};Entry.EntityObject.prototype.setWidth=function(b){this.width=b;this.object.width=this.width;this.textObject&&this.getLineBreak()&&(this.textObject.lineWidth=this.width);this.updateDialog();this.updateBG()};Entry.EntityObject.prototype.getWidth=function(){return this.width}; +Entry.EntityObject.prototype.setHeight=function(b){this.height=b;this.textObject&&(this.object.height=this.height,this.alignTextBox());this.updateDialog();this.updateBG()};Entry.EntityObject.prototype.getHeight=function(){return this.height};Entry.EntityObject.prototype.setColour=function(b){b||(b="#000000");this.colour=b;this.textObject&&(this.textObject.color=this.colour)};Entry.EntityObject.prototype.getColour=function(){return this.colour}; +Entry.EntityObject.prototype.setBGColour=function(b){b||(b="transparent");this.bgColor=b;this.updateBG()};Entry.EntityObject.prototype.getBGColour=function(){return this.bgColor};Entry.EntityObject.prototype.setUnderLine=function(b){void 0===b&&(b=!1);this.underLine=b;this.textObject.underLine=b};Entry.EntityObject.prototype.getUnderLine=function(){return this.underLine};Entry.EntityObject.prototype.setStrike=function(b){void 0===b&&(b=!1);this.strike=b;this.textObject.strike=b}; +Entry.EntityObject.prototype.getStrike=function(){return this.strike};Entry.EntityObject.prototype.getFont=function(){var b=[];this.fontBold&&b.push("bold");this.fontItalic&&b.push("italic");b.push(this.getFontSize()+"px");b.push(this.fontType);return b.join(" ")}; +Entry.EntityObject.prototype.setFont=function(b){if("textBox"==this.parent.objectType&&this.font!==b){b||(b="20px Nanum Gothic");var a=b.split(" "),c=0;if(c=-1=h?e=[1,0,0,0,0,0,g,f,0,0,0,-1*f,g,0,0,0,0,0,1,0,0,0,0,0,1]:.66>=h?e=[g,0,f,0,0,0,1,0,0,0,f,0,g,0,0,0,0,0,1,0,0,0,0,0,1]:.99>=h&&(e=[g,f,0,0,0,-1*f,g,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1]);e=(new createjs.ColorMatrix).concat(e);e=new createjs.ColorMatrixFilter(e);c.push(e);b.alpha=a.alpha=d(a.alpha,0,1);b.filters=c;b.cache(0,0,this.getWidth(),this.getHeight())}; Entry.EntityObject.prototype.resetFilter=function(){"sprite"==this.parent.objectType&&(this.object.filters=[],this.setInitialEffectValue(),this.object.alpha=this.effect.alpha,this.object.cache(0,0,this.getWidth(),this.getHeight()))};Entry.EntityObject.prototype.updateDialog=function(){this.dialog&&this.dialog.update()};Entry.EntityObject.prototype.takeSnapshot=function(){this.snapshot_=this.toJSON();this.collision=Entry.Utils.COLLISION.NONE}; -Entry.EntityObject.prototype.loadSnapshot=function(){this.snapshot_&&this.syncModel_(this.snapshot_);"sprite"==this.parent.objectType&&this.setImage(this.parent.getPicture())};Entry.EntityObject.prototype.removeClone=function(){if(this.isClone){this.dialog&&this.dialog.remove();this.brush&&this.removeBrush();Entry.stage.unloadEntity(this);var a=this.parent.clonedEntities.indexOf(this);this.parent.clonedEntities.splice(a,1)}}; -Entry.EntityObject.prototype.toJSON=function(){var a={};a.x=Entry.cutDecimal(this.getX());a.y=Entry.cutDecimal(this.getY());a.regX=Entry.cutDecimal(this.getRegX());a.regY=Entry.cutDecimal(this.getRegY());a.scaleX=this.getScaleX();a.scaleY=this.getScaleY();a.rotation=Entry.cutDecimal(this.getRotation());a.direction=Entry.cutDecimal(this.getDirection());a.width=Entry.cutDecimal(this.getWidth());a.height=Entry.cutDecimal(this.getHeight());a.font=this.getFont();a.visible=this.getVisible();"textBox"== -this.parent.objectType&&(a.colour=this.getColour(),a.text=this.getText(),a.textAlign=this.getTextAlign(),a.lineBreak=this.getLineBreak(),a.bgColor=this.getBGColour(),a.underLine=this.getUnderLine(),a.strike=this.getStrike(),a.fontSize=this.getFontSize());return a};Entry.EntityObject.prototype.setInitialEffectValue=function(){this.effect={blur:0,hue:0,hsv:0,brightness:0,contrast:0,saturation:0,alpha:1}}; +Entry.EntityObject.prototype.loadSnapshot=function(){this.snapshot_&&this.syncModel_(this.snapshot_);"sprite"==this.parent.objectType&&this.setImage(this.parent.getPicture())};Entry.EntityObject.prototype.removeClone=function(){if(this.isClone){this.dialog&&this.dialog.remove();this.brush&&this.removeBrush();Entry.stage.unloadEntity(this);var b=this.parent.clonedEntities.indexOf(this);this.parent.clonedEntities.splice(b,1);Entry.Utils.isFunction(this.clearExecutor)&&this.clearExecutor()}}; +Entry.EntityObject.prototype.clearExecutor=function(){this.parent.script.clearExecutorsByEntity(this)}; +Entry.EntityObject.prototype.toJSON=function(){var b={};b.x=Entry.cutDecimal(this.getX());b.y=Entry.cutDecimal(this.getY());b.regX=Entry.cutDecimal(this.getRegX());b.regY=Entry.cutDecimal(this.getRegY());b.scaleX=this.getScaleX();b.scaleY=this.getScaleY();b.rotation=Entry.cutDecimal(this.getRotation());b.direction=Entry.cutDecimal(this.getDirection());b.width=Entry.cutDecimal(this.getWidth());b.height=Entry.cutDecimal(this.getHeight());b.font=this.getFont();b.visible=this.getVisible();"textBox"== +this.parent.objectType&&(b.colour=this.getColour(),b.text=this.getText(),b.textAlign=this.getTextAlign(),b.lineBreak=this.getLineBreak(),b.bgColor=this.getBGColour(),b.underLine=this.getUnderLine(),b.strike=this.getStrike(),b.fontSize=this.getFontSize());return b};Entry.EntityObject.prototype.setInitialEffectValue=function(){this.effect={blur:0,hue:0,hsv:0,brightness:0,contrast:0,saturation:0,alpha:1}}; Entry.EntityObject.prototype.removeBrush=function(){Entry.stage.selectedObjectContainer.removeChild(this.shape);this.shape=this.brush=null}; -Entry.EntityObject.prototype.updateBG=function(){if(this.bgObject){this.bgObject.graphics.clear();var a=this.getWidth(),b=this.getHeight();this.bgObject.graphics.setStrokeStyle(1).beginStroke().beginFill(this.getBGColour()).drawRect(-a/2,-b/2,a,b);if(this.getLineBreak())this.bgObject.x=0;else switch(this.getTextAlign()){case Entry.TEXT_ALIGN_LEFT:this.bgObject.x=a/2;break;case Entry.TEXT_ALIGN_CENTER:this.bgObject.x=0;break;case Entry.TEXT_ALIGN_RIGHT:this.bgObject.x=-a/2}}}; -Entry.EntityObject.prototype.alignTextBox=function(){if("textBox"==this.type){var a=this.textObject;if(this.lineBreak){var b=a.getMeasuredLineHeight();a.y=b/2-this.getHeight()/2;switch(this.textAlign){case Entry.TEXT_ALIGN_CENTER:a.x=0;break;case Entry.TEXT_ALIGN_LEFT:a.x=-this.getWidth()/2;break;case Entry.TEXT_ALIGN_RIGHT:a.x=this.getWidth()/2}a.maxHeight=this.getHeight()}else a.x=0,a.y=0}};Entry.EntityObject.prototype.syncDialogVisible=function(){this.dialog&&(this.dialog.object.visible=this.visible)};Entry.Helper=function(){this.generateView()};p=Entry.Helper.prototype; -p.generateView=function(){this.blockHelpData=EntryStatic.blockInfo;var a=Entry.createElement("div","entryBlockHelperWorkspace");this._view=a;Entry.isForLecture&&a.addClass("lecture");var b=Entry.createElement("div","entryBlockHelperHeaderWorkspace");b.innerHTML=Lang.Helper.Block_info;a.appendChild(b);b=Entry.createElement("div","entryBlockHelperContentWorkspace");b.addClass("entryBlockHelperIntro");Entry.isForLecture&&b.addClass("lecture");a.appendChild(b);this.blockHelperContent_=b;this.blockHelperView_= -a;a=Entry.createElement("div","entryBlockHelperBlockWorkspace");this.blockMenu_=new Blockly.BlockMenu(a);this.blockMenu_.isViewOnly=!0;this.blockMenu_.isCenterAlign=!0;this.blockHelperContent_.appendChild(a);a=Entry.createElement("div","entryBlockHelperDescriptionWorkspace");this.blockHelperContent_.appendChild(a);a.innerHTML=Lang.Helper.Block_click_msg;this.blockHelperDescription_=a;this.first=!0};p.getView=function(){this.bindEvent();return this._view}; -p.bindEvent=function(){this.blockChangeEvent||(this.blockChangeEvent=Blockly.bindEvent_(Blockly.mainWorkspace.getCanvas(),"blocklySelectChange",this,this.updateSelectedBlock),Entry.playground.blockMenu&&(this.menuBlockChangeEvent=Blockly.bindEvent_(Entry.playground.blockMenu.workspace_.getCanvas(),"blocklySelectChange",this,this.updateSelectedBlock)))};p.updateSelectedBlock=function(){Blockly.selected&&(this.first&&(this.blockHelperContent_.removeClass("entryBlockHelperIntro"),this.first=!1),this.renderBlock(Blockly.selected.type))}; -p.renderBlock=function(a){var b=this.blockHelpData[a];b&&(b=jQuery.parseXML(b.xml),b=this.blockMenu_.show(b.childNodes),this.blockHelperDescription_.innerHTML=Entry.makeAutolink(Lang.Helper[a]),$(this.blockHelperDescription_).css({top:b+40}))};Entry.Activity=function(a,b){this.name=a;this.timestamp=new Date;var c=[];if(void 0!==b)for(var d=0,e=b.length;d");this.pictures=a.sprite.pictures;this.sounds=[];this.sounds=a.sprite.sounds;for(var b=0;bthis.pictures.length)return!1;a=this.getPicture(a);var b=this.pictures.indexOf(a);Entry.stateManager&&Entry.stateManager.addCommand("remove sprite",this,this.addPicture,a,b);this.pictures.splice(b,1);a===this.selectedPicture&&Entry.playground.selectPicture(this.pictures[0]);Entry.playground.injectPicture(this);Entry.playground.reloadPlayground();return new Entry.State(this,this.addPicture,a,b)}; -Entry.EntryObject.prototype.getPicture=function(a){if(!a)return this.selectedPicture;a=a.trim();for(var b=this.pictures,c=b.length,d=0;d=a&&0Entry.maxCloneLimit||(a=new Entry.EntityObject(this),b?(a.injectModel(b.picture?b.picture:null,b.toJSON()),a.snapshot_=b.snapshot_,b.effect&&(a.effect=Entry.cloneSimpleObject(b.effect),a.applyFilter()),b.brush&&Entry.setCloneBrush(a,b.brush)):(a.injectModel(this.entity.picture?this.entity.picture:null,this.entity.toJSON(a)),a.snapshot_=this.entity.snapshot_,this.entity.effect&&(a.effect=Entry.cloneSimpleObject(this.entity.effect), -a.applyFilter()),this.entity.brush&&Entry.setCloneBrush(a,this.entity.brush)),Entry.engine.raiseEventOnEntity(a,[a,"when_clone_start"]),a.isClone=!0,a.isStarted=!0,this.addCloneVariables(this,a,b?b.variables:null,b?b.lists:null),this.clonedEntities.push(a),Entry.stage.loadEntity(a))}; -Entry.EntryObject.prototype.initializeSplitter=function(a){a.onmousedown=function(b){Entry.container.disableSort();Entry.container.splitterEnable=!0};document.addEventListener("mousemove",function(b){Entry.container.splitterEnable&&Entry.resizeElement({canvasWidth:b.x||b.clientX})});document.addEventListener("mouseup",function(b){Entry.container.splitterEnable=!1;Entry.container.enableSort()})};Entry.EntryObject.prototype.isSelected=function(){return this.isSelected_}; -Entry.EntryObject.prototype.toJSON=function(){var a={};a.id=this.id;a.name=this.name;"textBox"==this.objectType&&(a.text=this.text);a.script=this.getScriptText();"sprite"==this.objectType&&(a.selectedPictureId=this.selectedPicture.id);a.objectType=this.objectType;a.rotateMethod=this.getRotateMethod();a.scene=this.scene.id;a.sprite={pictures:Entry.getPicturesJSON(this.pictures),sounds:Entry.getSoundsJSON(this.sounds)};a.lock=this.lock;a.entity=this.entity.toJSON();return a}; -Entry.EntryObject.prototype.destroy=function(){Entry.stage.unloadEntity(this.entity);this.view_&&Entry.removeElement(this.view_)};Entry.EntryObject.prototype.getSound=function(a){a=a.trim();for(var b=this.sounds,c=b.length,d=0;d=a&&0this.pictures.length)return!1;b=this.getPicture(b);var a=this.pictures.indexOf(b);Entry.stateManager&&Entry.stateManager.addCommand("remove sprite",this,this.addPicture,b,a);this.pictures.splice(a,1);b===this.selectedPicture&&Entry.playground.selectPicture(this.pictures[0]);Entry.playground.injectPicture(this);Entry.playground.reloadPlayground();return new Entry.State(this,this.addPicture,b,a)}; +Entry.EntryObject.prototype.getPicture=function(b){if(!b)return this.selectedPicture;b=b.trim();for(var a=this.pictures,c=a.length,d=0;d=b&&0Entry.maxCloneLimit||(b=new Entry.EntityObject(this),a?(b.injectModel(a.picture?a.picture:null,a.toJSON()),b.snapshot_=a.snapshot_,a.effect&&(b.effect=Entry.cloneSimpleObject(a.effect),b.applyFilter()),a.brush&&Entry.setCloneBrush(b,a.brush)):(b.injectModel(this.entity.picture?this.entity.picture:null,this.entity.toJSON(b)),b.snapshot_=this.entity.snapshot_,this.entity.effect&&(b.effect=Entry.cloneSimpleObject(this.entity.effect), +b.applyFilter()),this.entity.brush&&Entry.setCloneBrush(b,this.entity.brush)),Entry.engine.raiseEventOnEntity(b,[b,"when_clone_start"]),b.isClone=!0,b.isStarted=!0,this.addCloneVariables(this,b,a?a.variables:null,a?a.lists:null),this.clonedEntities.push(b),Entry.stage.loadEntity(b))}; +Entry.EntryObject.prototype.initializeSplitter=function(b){b.onmousedown=function(a){Entry.container.disableSort();Entry.container.splitterEnable=!0};document.addEventListener("mousemove",function(a){Entry.container.splitterEnable&&Entry.resizeElement({canvasWidth:a.x||a.clientX})});document.addEventListener("mouseup",function(a){Entry.container.splitterEnable=!1;Entry.container.enableSort()})};Entry.EntryObject.prototype.isSelected=function(){return this.isSelected_}; +Entry.EntryObject.prototype.toJSON=function(){var b={};b.id=this.id;b.name=this.name;"textBox"==this.objectType&&(b.text=this.text);b.script=this.getScriptText();"sprite"==this.objectType&&(b.selectedPictureId=this.selectedPicture.id);b.objectType=this.objectType;b.rotateMethod=this.getRotateMethod();b.scene=this.scene.id;b.sprite={pictures:Entry.getPicturesJSON(this.pictures),sounds:Entry.getSoundsJSON(this.sounds)};b.lock=this.lock;b.entity=this.entity.toJSON();return b}; +Entry.EntryObject.prototype.destroy=function(){Entry.stage.unloadEntity(this.entity);this.view_&&Entry.removeElement(this.view_)};Entry.EntryObject.prototype.getSound=function(b){b=b.trim();for(var a=this.sounds,c=a.length,d=0;d=b&&0=b-e/100*b&&f<=b+e/100*b&&g>=c-e/100*c&&g<=c+e/100*c&&a>=d-e/100*d&&a<=d+e/100*d};Entry.Painter.prototype.matchColorOnly=function(a,b,c,d){return b===this.colorLayerData.data[a]&&c===this.colorLayerData.data[a+1]&&d===this.colorLayerData.data[a+2]?!0:!1}; -Entry.Painter.prototype.matchColor=function(a,b,c,d,e){return b===this.colorLayerData.data[a]&&c===this.colorLayerData.data[a+1]&&d===this.colorLayerData.data[a+2]&&e===this.colorLayerData.data[a+3]?!0:!1};Entry.Painter.prototype.colorPixel=function(a,b,c,d,e){e||(e=255);this.stroke.transparent&&(e=d=c=b=0);this.colorLayerData.data[a]=b;this.colorLayerData.data[a+1]=c;this.colorLayerData.data[a+2]=d;this.colorLayerData.data[a+3]=e}; -Entry.Painter.prototype.pickStrokeColor=function(a){a=4*(Math.round(a.stageY)*this.canvas.width+Math.round(a.stageX));this.stroke.lineColor=Entry.rgb2hex(this.colorLayerData.data[a],this.colorLayerData.data[a+1],this.colorLayerData.data[a+2]);document.getElementById("entryPainterAttrCircle").style.backgroundColor=this.stroke.lineColor;document.getElementById("entryPainterAttrCircleInput").value=this.stroke.lineColor}; -Entry.Painter.prototype.drawText=function(a){var b=document.getElementById("entryPainterAttrFontStyle").value,c=document.getElementById("entryPainterAttrFontName").value,d=document.getElementById("entryPainterAttrFontSize").value;a=new createjs.Text(a,b+" "+d+'px "'+c+'"',this.stroke.lineColor);a.textBaseline="top";a.x=this.oldPt.x;a.y=this.oldPt.y;this.objectContainer.addChild(a);this.selectTextObject(a);this.file.modified=!0}; -Entry.Painter.prototype.addImage=function(a){var b=new createjs.Bitmap(a);this.objectContainer.addChild(b);b.x=this.stage.canvas.width/2;b.y=this.stage.canvas.height/2;b.regX=b.image.width/2|0;b.regY=b.image.height/2|0;if(540=a-e/100*a&&f<=a+e/100*a&&g>=c-e/100*c&&g<=c+e/100*c&&b>=d-e/100*d&&b<=d+e/100*d};Entry.Painter.prototype.matchColorOnly=function(b,a,c,d){return a===this.colorLayerData.data[b]&&c===this.colorLayerData.data[b+1]&&d===this.colorLayerData.data[b+2]?!0:!1}; +Entry.Painter.prototype.matchColor=function(b,a,c,d,e){return a===this.colorLayerData.data[b]&&c===this.colorLayerData.data[b+1]&&d===this.colorLayerData.data[b+2]&&e===this.colorLayerData.data[b+3]?!0:!1};Entry.Painter.prototype.colorPixel=function(b,a,c,d,e){e||(e=255);this.stroke.transparent&&(e=d=c=a=0);this.colorLayerData.data[b]=a;this.colorLayerData.data[b+1]=c;this.colorLayerData.data[b+2]=d;this.colorLayerData.data[b+3]=e}; +Entry.Painter.prototype.pickStrokeColor=function(b){b=4*(Math.round(b.stageY)*this.canvas.width+Math.round(b.stageX));this.stroke.lineColor=Entry.rgb2hex(this.colorLayerData.data[b],this.colorLayerData.data[b+1],this.colorLayerData.data[b+2]);document.getElementById("entryPainterAttrCircle").style.backgroundColor=this.stroke.lineColor;document.getElementById("entryPainterAttrCircleInput").value=this.stroke.lineColor}; +Entry.Painter.prototype.drawText=function(b){var a=document.getElementById("entryPainterAttrFontStyle").value,c=document.getElementById("entryPainterAttrFontName").value,d=document.getElementById("entryPainterAttrFontSize").value;b=new createjs.Text(b,a+" "+d+'px "'+c+'"',this.stroke.lineColor);b.textBaseline="top";b.x=this.oldPt.x;b.y=this.oldPt.y;this.objectContainer.addChild(b);this.selectTextObject(b);this.file.modified=!0}; +Entry.Painter.prototype.addImage=function(b){var a=new createjs.Bitmap(b);this.objectContainer.addChild(a);a.x=this.stage.canvas.width/2;a.y=this.stage.canvas.height/2;a.regX=a.image.width/2|0;a.regY=a.image.height/2|0;if(540>1,this.oldPt.y+this.stage.mouseY>>1);this.brush.graphics.setStrokeStyle(this.stroke.thickness,"round").beginStroke(this.stroke.lineColor).moveTo(a.x,a.y).curveTo(this.oldPt.x,this.oldPt.y,this.oldMidPt.x,this.oldMidPt.y);this.oldPt.x=this.stage.mouseX;this.oldPt.y=this.stage.mouseY;this.oldMidPt.x=a.x;this.oldMidPt.y=a.y;this.file.modified=!0;this.stage.update()}; +Entry.Painter.prototype.fill=function(){if(!this.stroke.locked){this.stroke.locked=!0;this.initCommand();this.doCommand();this.clearHandle();var b=this.canvas.width,a=this.canvas.height;this.colorLayerData=this.ctx.getImageData(0,0,b,a);var c=new createjs.Point(this.stage.mouseX,this.stage.mouseY);c.x=Math.round(c.x);c.y=Math.round(c.y);for(var d=4*(c.y*b+c.x),e=this.colorLayerData.data[d],f=this.colorLayerData.data[d+1],g=this.colorLayerData.data[d+2],h=this.colorLayerData.data[d+3],k,l,c=[[c.x, +c.y]],n=Entry.hex2rgb(this.stroke.lineColor);c.length;){for(var d=c.pop(),m=d[0],q=d[1],d=4*(q*b+m);0<=q&&this.matchColor(d,e,f,g,h);)--q,d-=4*b;d+=4*b;q+=1;for(l=k=!1;q>1,this.oldPt.y+this.stage.mouseY>>1);this.brush.graphics.setStrokeStyle(this.stroke.thickness,"round").beginStroke(this.stroke.lineColor).moveTo(b.x,b.y).curveTo(this.oldPt.x,this.oldPt.y,this.oldMidPt.x,this.oldMidPt.y);this.oldPt.x=this.stage.mouseX;this.oldPt.y=this.stage.mouseY;this.oldMidPt.x=b.x;this.oldMidPt.y=b.y;this.file.modified=!0;this.stage.update()}; Entry.Painter.prototype.move_line=function(){this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness,"round").moveTo(this.oldPt.x,this.oldPt.y).lineTo(this.stage.mouseX,this.stage.mouseY);this.file.modified=!0;this.stage.update()}; -Entry.Painter.prototype.move_rect=function(){var a=this.stage.mouseX-this.oldPt.x,b=this.stage.mouseY-this.oldPt.y;event.shiftKey&&(b=a);this.stroke.fill?0===this.stroke.thickness?this.brush.graphics.clear().setStrokeStyle(this.stroke.thickness,"round").beginFill(this.stroke.fillColor).drawRect(this.oldPt.x,this.oldPt.y,a,b):this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness,"round").beginFill(this.stroke.fillColor).drawRect(this.oldPt.x,this.oldPt.y, -a,b):0===this.stroke.thickness?this.brush.graphics.clear().setStrokeStyle(this.stroke.thickness,"round").drawRect(this.oldPt.x,this.oldPt.y,a,b):this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness,"round").drawRect(this.oldPt.x,this.oldPt.y,a,b);this.file.modified=!0;this.stage.update()}; -Entry.Painter.prototype.move_circle=function(){var a=this.stage.mouseX-this.oldPt.x,b=this.stage.mouseY-this.oldPt.y;event.shiftKey&&(b=a);this.stroke.fill?0===this.stroke.thickness?this.brush.graphics.clear().beginStroke(this.stroke.fillColor).setStrokeStyle(this.stroke.thickness,"round").beginFill(this.stroke.fillColor).drawEllipse(this.oldPt.x,this.oldPt.y,a,b):this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness,"round").beginFill(this.stroke.fillColor).drawEllipse(this.oldPt.x, -this.oldPt.y,a,b):this.stroke.fill||(0===this.stroke.thickness?this.brush.graphics.clear().drawEllipse(this.oldPt.x,this.oldPt.y,a,b):this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness,"round").drawEllipse(this.oldPt.x,this.oldPt.y,a,b));this.file.modified=!0;this.stage.update()}; +Entry.Painter.prototype.move_rect=function(){var b=this.stage.mouseX-this.oldPt.x,a=this.stage.mouseY-this.oldPt.y;event.shiftKey&&(a=b);this.stroke.fill?0===this.stroke.thickness?this.brush.graphics.clear().setStrokeStyle(this.stroke.thickness,"round").beginFill(this.stroke.fillColor).drawRect(this.oldPt.x,this.oldPt.y,b,a):this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness,"round").beginFill(this.stroke.fillColor).drawRect(this.oldPt.x,this.oldPt.y, +b,a):0===this.stroke.thickness?this.brush.graphics.clear().setStrokeStyle(this.stroke.thickness,"round").drawRect(this.oldPt.x,this.oldPt.y,b,a):this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness,"round").drawRect(this.oldPt.x,this.oldPt.y,b,a);this.file.modified=!0;this.stage.update()}; +Entry.Painter.prototype.move_circle=function(){var b=this.stage.mouseX-this.oldPt.x,a=this.stage.mouseY-this.oldPt.y;event.shiftKey&&(a=b);this.stroke.fill?0===this.stroke.thickness?this.brush.graphics.clear().beginStroke(this.stroke.fillColor).setStrokeStyle(this.stroke.thickness,"round").beginFill(this.stroke.fillColor).drawEllipse(this.oldPt.x,this.oldPt.y,b,a):this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness,"round").beginFill(this.stroke.fillColor).drawEllipse(this.oldPt.x, +this.oldPt.y,b,a):this.stroke.fill||(0===this.stroke.thickness?this.brush.graphics.clear().drawEllipse(this.oldPt.x,this.oldPt.y,b,a):this.brush.graphics.clear().beginStroke(this.stroke.lineColor).setStrokeStyle(this.stroke.thickness,"round").drawEllipse(this.oldPt.x,this.oldPt.y,b,a));this.file.modified=!0;this.stage.update()}; Entry.Painter.prototype.edit_copy=function(){this.selectArea?(this.clearHandle(),this.selectedObject&&delete this.selectedObject,this.copyLayerData=this.ctx.getImageData(this.selectArea.x1,this.selectArea.y1,this.selectArea.x2,this.selectArea.y2),this.copy={},this.copy.width=this.selectArea.x2,this.copy.height=this.selectArea.y2,this.canvas_.width=this.copy.width,this.canvas_.height=this.copy.height,this.ctx_.clearRect(0,0,this.canvas_.width,this.canvas_.height),this.ctx_.putImageData(this.copyLayerData, 0,0)):alert("\ubcf5\uc0ac\ud560 \uc601\uc5ed\uc744 \uc120\ud0dd\ud558\uc138\uc694.")}; Entry.Painter.prototype.edit_cut=function(){this.selectArea?(this.clearHandle(),this.selectedObject&&delete this.selectedObject,this.copyLayerData=this.ctx.getImageData(this.selectArea.x1,this.selectArea.y1,this.selectArea.x2,this.selectArea.y2),this.copy={},this.copy.width=this.selectArea.x2,this.copy.height=this.selectArea.y2,this.canvas_.width=this.copy.width,this.canvas_.height=this.copy.height,this.ctx_.clearRect(0,0,this.canvas_.width,this.canvas_.height),this.ctx_.putImageData(this.copyLayerData, 0,0),this.ctx.clearRect(this.selectArea.x1,this.selectArea.y1,this.selectArea.x2,this.selectArea.y2),this.colorLayerData=this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height),this.reloadContext(),this.file.modified=!0):alert("\uc790\ub97c \uc601\uc5ed\uc744 \uc120\ud0dd\ud558\uc138\uc694.")}; -Entry.Painter.prototype.edit_paste=function(){var a=new Image;a.src=this.canvas_.toDataURL();var b=this;a.onload=function(a){a=new createjs.Bitmap(a.target);a.x=b.canvas.width/2;a.y=b.canvas.height/2;a.regX=b.copy.width/2|0;a.regY=b.copy.height/2|0;a.id=Entry.generateHash();b.objectContainer.addChild(a);b.selectObject(a,!0)};this.file.modified=!0}; +Entry.Painter.prototype.edit_paste=function(){var b=new Image;b.src=this.canvas_.toDataURL();var a=this;b.onload=function(b){b=new createjs.Bitmap(b.target);b.x=a.canvas.width/2;b.y=a.canvas.height/2;b.regX=a.copy.width/2|0;b.regY=a.copy.height/2|0;b.id=Entry.generateHash();a.objectContainer.addChild(b);a.selectObject(b,!0)};this.file.modified=!0}; Entry.Painter.prototype.edit_select=function(){this.clearHandle();this.selectedObject&&delete this.selectedObject;this.copyLayerData=this.ctx.getImageData(this.selectArea.x1,this.selectArea.y1,this.selectArea.x2,this.selectArea.y2);this.copy={};this.copy.width=this.selectArea.x2;this.copy.height=this.selectArea.y2;this.canvas_.width=this.copy.width;this.canvas_.height=this.copy.height;this.ctx_.clearRect(0,0,this.canvas_.width,this.canvas_.height);this.ctx_.putImageData(this.copyLayerData,0,0);this.ctx.clearRect(this.selectArea.x1, -this.selectArea.y1,this.selectArea.x2,this.selectArea.y2);this.colorLayerData=this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height);this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);this.ctx.putImageData(this.colorLayerData,0,0);var a=new Image;a.src=this.canvas.toDataURL();var b=this;a.onload=function(a){a=new createjs.Bitmap(a.target);b.objectContainer.removeAllChildren();b.objectContainer.addChild(a);a=new Image;a.src=b.canvas_.toDataURL();a.onload=function(a){a=new createjs.Bitmap(a.target); -a.x=b.selectArea.x1+b.copy.width/2;a.y=b.selectArea.y1+b.copy.height/2;a.regX=b.copy.width/2|0;a.regY=b.copy.height/2|0;a.id=Entry.generateHash();a.name=a.id;b.objectContainer.addChild(a);b.selectObject(a,!0)}}}; -Entry.Painter.prototype.move_erase=function(a){a=new createjs.Point(this.oldPt.x+this.stage.mouseX>>1,this.oldPt.y+this.stage.mouseY>>1);this.eraser.graphics.setStrokeStyle(this.stroke.thickness,"round").beginStroke("#ffffff").moveTo(a.x,a.y).curveTo(this.oldPt.x,this.oldPt.y,this.oldMidPt.x,this.oldMidPt.y);this.oldPt.x=this.stage.mouseX;this.oldPt.y=this.stage.mouseY;this.oldMidPt.x=a.x;this.oldMidPt.y=a.y;this.file.modified=!0;this.stage.update()}; +this.selectArea.y1,this.selectArea.x2,this.selectArea.y2);this.colorLayerData=this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height);this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);this.ctx.putImageData(this.colorLayerData,0,0);var b=new Image;b.src=this.canvas.toDataURL();var a=this;b.onload=function(b){b=new createjs.Bitmap(b.target);a.objectContainer.removeAllChildren();a.objectContainer.addChild(b);b=new Image;b.src=a.canvas_.toDataURL();b.onload=function(b){b=new createjs.Bitmap(b.target); +b.x=a.selectArea.x1+a.copy.width/2;b.y=a.selectArea.y1+a.copy.height/2;b.regX=a.copy.width/2|0;b.regY=a.copy.height/2|0;b.id=Entry.generateHash();b.name=b.id;a.objectContainer.addChild(b);a.selectObject(b,!0)}}}; +Entry.Painter.prototype.move_erase=function(b){b=new createjs.Point(this.oldPt.x+this.stage.mouseX>>1,this.oldPt.y+this.stage.mouseY>>1);this.eraser.graphics.setStrokeStyle(this.stroke.thickness,"round").beginStroke("#ffffff").moveTo(b.x,b.y).curveTo(this.oldPt.x,this.oldPt.y,this.oldMidPt.x,this.oldMidPt.y);this.oldPt.x=this.stage.mouseX;this.oldPt.y=this.stage.mouseY;this.oldMidPt.x=b.x;this.oldMidPt.y=b.y;this.file.modified=!0;this.stage.update()}; Entry.Painter.prototype.settingShapeBlur=function(){this.objectWidthInput.blur();this.objectHeightInput.blur();this.objectRotateInput.blur()}; -Entry.Painter.prototype.stagemousedown=function(a){"picture"==Entry.playground.getViewMode()&&(this.settingShapeBlur(),this.oldPt=new createjs.Point(a.stageX,a.stageY),this.oldMidPt=this.oldPt.clone(),"select"===this.toolbox.selected?this.stage.addChild(this._handle):"spoid"===this.toolbox.selected?this.pickStrokeColor(a):"text"===this.toolbox.selected?(this.showInputField(a),this.stage.update()):"erase"===this.toolbox.selected?(this.createEraser(),this.stroke.enabled=!0):"fill"===this.toolbox.selected? +Entry.Painter.prototype.stagemousedown=function(b){"picture"==Entry.playground.getViewMode()&&(this.settingShapeBlur(),this.oldPt=new createjs.Point(b.stageX,b.stageY),this.oldMidPt=this.oldPt.clone(),"select"===this.toolbox.selected?this.stage.addChild(this._handle):"spoid"===this.toolbox.selected?this.pickStrokeColor(b):"text"===this.toolbox.selected?(this.showInputField(b),this.stage.update()):"erase"===this.toolbox.selected?(this.createEraser(),this.stroke.enabled=!0):"fill"===this.toolbox.selected? this.fill():"cursor"!==this.toolbox.selected&&(this.createBrush(),this.stroke.enabled=!0))}; -Entry.Painter.prototype.stagemousemove=function(a){"picture"==Entry.playground.getViewMode()&&("select"===this.toolbox.selected&&-1this.value&&(this.value=360+this.value%360);b.handle.rotation=this.value;b.updateImageHandle()};this.objectRotateInput.addClass("entryPlaygroundPainterNumberInput");this.objectRotateInput.defaultValue= -"0";d.appendChild(this.objectRotateInput);this.attrColorArea=Entry.createElement("fieldset","entryPainterAttrColor");this.attrColorArea.addClass("entryPlaygroundPainterAttrColor");g.appendChild(this.attrColorArea);var q=Entry.createElement("div");q.addClass("entryPlaygroundPainterAttrColorContainer");this.attrColorArea.appendChild(q);this.attrCircleArea=Entry.createElement("div");this.attrCircleArea.addClass("painterAttrCircleArea");g.appendChild(this.attrCircleArea);d=Entry.createElement("div","entryPainterAttrCircle"); -d.addClass("painterAttrCircle");this.attrCircleArea.appendChild(d);this.attrCircleArea.painterAttrCircle=d;d=Entry.createElement("input","entryPainterAttrCircleInput");d.value="#000000";d.addClass("painterAttrCircleInput");this.attrCircleArea.appendChild(d);this.attrColorSpoid=Entry.createElement("div");this.attrColorSpoid.bindOnClick(function(){b.selectToolbox("spoid")});this.attrColorSpoid.addClass("painterAttrColorSpoid");g.appendChild(this.attrColorSpoid);Entry.getColourCodes().forEach(function(a){var c= -Entry.createElement("div");c.addClass("entryPlaygroundPainterAttrColorElement");"transparent"===a?c.style.backgroundImage="url("+(Entry.mediaFilePath+"/transparent.png")+")":c.style.backgroundColor=a;c.bindOnClick(function(c){"transparent"===a?(b.stroke.transparent=!0,b.stroke.lineColor="#ffffff"):(b.stroke.transparent=!1,r&&(document.getElementById("entryPainterShapeBackgroundColor").style.backgroundColor=a,b.stroke.fillColor=a),r||(document.getElementById("entryPainterShapeLineColor").style.backgroundColor= -a,b.stroke.lineColor=a));document.getElementById("entryPainterAttrCircle").style.backgroundColor=b.stroke.lineColor;document.getElementById("entryPainterAttrCircleInput").value=a});q.appendChild(c)});this.attrThickArea=Entry.createElement("div","painterAttrThickArea");this.attrThickArea.addClass("entryPlaygroundentryPlaygroundPainterAttrThickArea");g.appendChild(this.attrThickArea);d=Entry.createElement("legend");d.addClass("painterAttrThickName");d.innerHTML=Lang.Workspace.thickness;this.attrThickArea.appendChild(d); -var n=Entry.createElement("fieldset","entryPainterAttrThick");n.addClass("entryPlaygroundPainterAttrThick");this.attrThickArea.appendChild(n);d=Entry.createElement("div");d.addClass("paintAttrThickTop");n.appendChild(d);e=Entry.createElement("select","entryPainterAttrThick");e.addClass("entryPlaygroundPainterAttrThickInput");e.size="1";e.onchange=function(a){b.stroke.thickness=a.target.value};for(d=1;10>=d;d++)c=Entry.createElement("option"),c.value=d,c.innerHTML=d,e.appendChild(c);n.appendChild(e); -d=Entry.createElement("div","entryPainterShapeLineColor");d.addClass("painterAttrShapeLineColor");c=Entry.createElement("div","entryPainterShapeInnerBackground");c.addClass("painterAttrShapeInnerBackground");d.appendChild(c);n.appendChild(d);this.attrThickArea.painterAttrShapeLineColor=d;n.bindOnClick(function(){m.style.zIndex="1";this.style.zIndex="10";r=!1});this.attrBackgroundArea=Entry.createElement("div","painterAttrBackgroundArea");this.attrBackgroundArea.addClass("entryPlaygroundPainterBackgroundArea"); -g.appendChild(this.attrBackgroundArea);d=Entry.createElement("fieldset","entryPainterAttrbackground");d.addClass("entryPlaygroundPainterAttrBackground");this.attrBackgroundArea.appendChild(d);c=Entry.createElement("div");c.addClass("paintAttrBackgroundTop");d.appendChild(c);var m=Entry.createElement("div","entryPainterShapeBackgroundColor");m.addClass("painterAttrShapeBackgroundColor");this.attrBackgroundArea.painterAttrShapeBackgroundColor=m;c.appendChild(m);var r=!1;m.bindOnClick(function(b){n.style.zIndex= +c.addClass("painterAttrRotateTop");c.innerHTML="\u03bf";d.appendChild(c);this.objectRotateInput=Entry.createElement("input","entryPainterAttrDegree");this.objectRotateInput.onblur=function(){if(isNaN(this.value))return alert("\uc22b\uc790\ub9cc \uc785\ub825 \uac00\ub2a5\ud569\ub2c8\ub2e4."),!1;360<=this.value?this.value%=360:0>this.value&&(this.value=360+this.value%360);a.handle.rotation=this.value;a.updateImageHandle()};this.objectRotateInput.addClass("entryPlaygroundPainterNumberInput");this.objectRotateInput.defaultValue= +"0";d.appendChild(this.objectRotateInput);this.attrColorArea=Entry.createElement("fieldset","entryPainterAttrColor");this.attrColorArea.addClass("entryPlaygroundPainterAttrColor");g.appendChild(this.attrColorArea);var n=Entry.createElement("div");n.addClass("entryPlaygroundPainterAttrColorContainer");this.attrColorArea.appendChild(n);this.attrCircleArea=Entry.createElement("div");this.attrCircleArea.addClass("painterAttrCircleArea");g.appendChild(this.attrCircleArea);d=Entry.createElement("div","entryPainterAttrCircle"); +d.addClass("painterAttrCircle");this.attrCircleArea.appendChild(d);this.attrCircleArea.painterAttrCircle=d;d=Entry.createElement("input","entryPainterAttrCircleInput");d.value="#000000";d.addClass("painterAttrCircleInput");this.attrCircleArea.appendChild(d);this.attrColorSpoid=Entry.createElement("div");this.attrColorSpoid.bindOnClick(function(){a.selectToolbox("spoid")});this.attrColorSpoid.addClass("painterAttrColorSpoid");g.appendChild(this.attrColorSpoid);Entry.getColourCodes().forEach(function(b){var c= +Entry.createElement("div");c.addClass("entryPlaygroundPainterAttrColorElement");"transparent"===b?c.style.backgroundImage="url("+(Entry.mediaFilePath+"/transparent.png")+")":c.style.backgroundColor=b;c.bindOnClick(function(c){"transparent"===b?(a.stroke.transparent=!0,a.stroke.lineColor="#ffffff"):(a.stroke.transparent=!1,r&&(document.getElementById("entryPainterShapeBackgroundColor").style.backgroundColor=b,a.stroke.fillColor=b),r||(document.getElementById("entryPainterShapeLineColor").style.backgroundColor= +b,a.stroke.lineColor=b));document.getElementById("entryPainterAttrCircle").style.backgroundColor=a.stroke.lineColor;document.getElementById("entryPainterAttrCircleInput").value=b});n.appendChild(c)});this.attrThickArea=Entry.createElement("div","painterAttrThickArea");this.attrThickArea.addClass("entryPlaygroundentryPlaygroundPainterAttrThickArea");g.appendChild(this.attrThickArea);d=Entry.createElement("legend");d.addClass("painterAttrThickName");d.innerHTML=Lang.Workspace.thickness;this.attrThickArea.appendChild(d); +var m=Entry.createElement("fieldset","entryPainterAttrThick");m.addClass("entryPlaygroundPainterAttrThick");this.attrThickArea.appendChild(m);d=Entry.createElement("div");d.addClass("paintAttrThickTop");m.appendChild(d);e=Entry.createElement("select","entryPainterAttrThick");e.addClass("entryPlaygroundPainterAttrThickInput");e.size="1";e.onchange=function(b){a.stroke.thickness=b.target.value};for(d=1;10>=d;d++)c=Entry.createElement("option"),c.value=d,c.innerHTML=d,e.appendChild(c);m.appendChild(e); +d=Entry.createElement("div","entryPainterShapeLineColor");d.addClass("painterAttrShapeLineColor");c=Entry.createElement("div","entryPainterShapeInnerBackground");c.addClass("painterAttrShapeInnerBackground");d.appendChild(c);m.appendChild(d);this.attrThickArea.painterAttrShapeLineColor=d;m.bindOnClick(function(){q.style.zIndex="1";this.style.zIndex="10";r=!1});this.attrBackgroundArea=Entry.createElement("div","painterAttrBackgroundArea");this.attrBackgroundArea.addClass("entryPlaygroundPainterBackgroundArea"); +g.appendChild(this.attrBackgroundArea);d=Entry.createElement("fieldset","entryPainterAttrbackground");d.addClass("entryPlaygroundPainterAttrBackground");this.attrBackgroundArea.appendChild(d);c=Entry.createElement("div");c.addClass("paintAttrBackgroundTop");d.appendChild(c);var q=Entry.createElement("div","entryPainterShapeBackgroundColor");q.addClass("painterAttrShapeBackgroundColor");this.attrBackgroundArea.painterAttrShapeBackgroundColor=q;c.appendChild(q);var r=!1;q.bindOnClick(function(a){m.style.zIndex= "1";this.style.zIndex="10";r=!0});this.attrFontArea=Entry.createElement("div","painterAttrFont");this.attrFontArea.addClass("entryPlaygroundPainterAttrFont");g.appendChild(this.attrFontArea);e=Entry.createElement("div");e.addClass("entryPlaygroundPainterAttrTop");this.attrFontArea.appendChild(e);d=Entry.createElement("div");d.addClass("entryPlaygroundPaintAttrTop_");e.appendChild(d);d=Entry.createElement("legend");d.addClass("panterAttrFontTitle");d.innerHTML=Lang.Workspace.textStyle;k=Entry.createElement("select", -"entryPainterAttrFontName");k.addClass("entryPlaygroundPainterAttrFontName");k.size="1";k.onchange=function(a){b.font.name=a.target.value};for(d=0;d=d;d++)c=Entry.createElement("option"),c.value=d,c.innerHTML=d,k.appendChild(c);e.appendChild(k);e=Entry.createElement("div");e.addClass("entryPlaygroundPainterAttrFontStyleArea");this.attrFontArea.appendChild(e);d=Entry.createElement("div");d.addClass("entryPlaygroundPainterAttrFontTop");e.appendChild(d);k=Entry.createElement("select","entryPainterAttrFontStyle"); -k.addClass("entryPlaygroundPainterAttrFontStyle");k.size="1";k.onchange=function(a){b.font.style=a.target.value};h=[{label:"\ubcf4\ud1b5",value:"normal"},{label:"\uad75\uac8c",value:"bold"},{label:"\uae30\uc6b8\uc784",value:"italic"}];for(d=0;d=d;d++)c=Entry.createElement("option"),c.value=d,c.innerHTML=d,k.appendChild(c);e.appendChild(k);e=Entry.createElement("div");e.addClass("entryPlaygroundPainterAttrFontStyleArea");this.attrFontArea.appendChild(e);d=Entry.createElement("div");d.addClass("entryPlaygroundPainterAttrFontTop");e.appendChild(d);k=Entry.createElement("select","entryPainterAttrFontStyle"); +k.addClass("entryPlaygroundPainterAttrFontStyle");k.size="1";k.onchange=function(b){a.font.style=b.target.value};h=[{label:"\ubcf4\ud1b5",value:"normal"},{label:"\uad75\uac8c",value:"bold"},{label:"\uae30\uc6b8\uc784",value:"italic"}];for(d=0;d"+d[1];c.addEventListener("click",function(){Entry.engine.toggleStop()});this.view_.appendChild(c);this.curtainView_=c;Entry.pictureEditable&&(c=Entry.createElement("div","entryPicture"),c.addClass("entryPlaygroundPictureWorkspace"),c.addClass("entryRemove"),this.view_.appendChild(c),this.generatePictureView(c),this.pictureView_=c);c=Entry.createElement("div","entryText");c.addClass("entryPlaygroundTextWorkspace");c.addClass("entryRemove");this.view_.appendChild(c);this.generateTextView(c); -this.textView_=c;Entry.soundEditable&&(c=Entry.createElement("div","entrySound"),c.addClass("entryPlaygroundSoundWorkspace"),c.addClass("entryRemove"),this.view_.appendChild(c),this.generateSoundView(c),this.soundView_=c);c=Entry.createElement("div","entryDefault");c.addClass("entryPlaygroundDefaultWorkspace");this.view_.appendChild(c);this.generateDefaultView(c);this.defaultView_=c;c=Entry.createElement("div","entryCode");c.addClass("entryPlaygroundCodeWorkspace");c.addClass("entryRemove");this.view_.appendChild(c); -this.generateCodeView(c);this.codeView_=c;d=Entry.createElement("div");d.addClass("entryPlaygroundResizeWorkspace","entryRemove");this.resizeHandle_=d;this.view_.appendChild(d);this.initializeResizeHandle(d);this.codeView_=c;Entry.addEventListener("run",function(b){Entry.playground.curtainView_.removeClass("entryRemove")});Entry.addEventListener("stop",function(b){Entry.playground.curtainView_.addClass("entryRemove")})}};Entry.Playground.prototype.generateDefaultView=function(a){return a}; -Entry.Playground.prototype.generateTabView=function(a){var b=Entry.createElement("ul");b.addClass("entryTabListWorkspace");this.tabList_=b;a.appendChild(b);this.tabViewElements={};a=Entry.createElement("li","entryCodeTab");a.innerHTML=Lang.Workspace.tab_code;a.addClass("entryTabListItemWorkspace");a.addClass("entryTabSelected");b.appendChild(a);a.bindOnClick(function(b){Entry.playground.changeViewMode("code")});this.tabViewElements.code=a;Entry.pictureEditable&&(a=Entry.createElement("li","entryPictureTab"), -a.innerHTML=Lang.Workspace.tab_picture,a.addClass("entryTabListItemWorkspace"),b.appendChild(a),a.bindOnClick(function(b){Entry.playground.changeViewMode("picture")}),this.tabViewElements.picture=a,a=Entry.createElement("li","entryTextboxTab"),a.innerHTML=Lang.Workspace.tab_text,a.addClass("entryTabListItemWorkspace"),b.appendChild(a),a.bindOnClick(function(b){Entry.playground.changeViewMode("text")}),this.tabViewElements.text=a,a.addClass("entryRemove"));Entry.soundEditable&&(a=Entry.createElement("li", -"entrySoundTab"),a.innerHTML=Lang.Workspace.tab_sound,a.addClass("entryTabListItemWorkspace"),b.appendChild(a),a.bindOnClick(function(b){Entry.playground.changeViewMode("sound")}),this.tabViewElements.sound=a);Entry.hasVariableManager&&(a=Entry.createElement("li","entryVariableTab"),a.innerHTML=Lang.Workspace.tab_attribute,a.addClass("entryTabListItemWorkspace"),a.addClass("entryVariableTabWorkspace"),b.appendChild(a),a.bindOnClick(function(b){Entry.playground.toggleOnVariableView();Entry.playground.changeViewMode("variable")}), -this.tabViewElements.variable=a)}; -Entry.Playground.prototype.generateCodeView=function(a){if(!Entry.type||"workspace"==Entry.type){var b=Entry.createElement("div","entryCategory");b.addClass("entryCategoryWorkspace");a.appendChild(b);this.categoryView_=b;var c=Entry.createElement("ul","entryCategoryList");c.addClass("entryCategoryListWorkspace");b.appendChild(c);this.categoryListView_=c;var d=Entry.createElement("div","entryBlocklyWorkspace");d.addClass("entryBlockMenuWorkspace");a.appendChild(d);$(d).mouseenter(function(b){Entry.playground.resizing|| -(Entry.playground.focusBlockMenu=!0,b=Blockly.mainWorkspace.blockMenu.blockMenuWidth+84,b>Entry.interfaceState.menuWidth&&(this.widthBackup=Entry.interfaceState.menuWidth,$(".entryBlockMenuWorkspace>svg").stop().animate({width:b-64},200)))});$(d).mouseleave(function(b){Entry.playground.resizing||(d.widthBackup&&!Blockly.mainWorkspace.blockMenu.hasStalkerBlock&&$(".entryBlockMenuWorkspace>svg").stop().animate({width:this.widthBackup-64},200),delete this.widthBackup,delete Entry.playground.focusBlockMenu)}); -Entry.addEventListener("entryBlocklyChanged",function(b){b=Entry.playground.blockMenuView_;b.widthBackup&&Entry.resizeElement({menuWidth:b.widthBackup});delete b.widthBackup;delete Entry.playground.focusBlockMenu});this.blockMenuView_=d;b=this.createVariableView();a.appendChild(b);this.variableView_=b;b=Entry.createElement("div","entryBlockly");b.addClass("entryBlocklyWorkspace");this.blocklyView_=b;Entry.bindAnimationCallback(this.blocklyView_,function(b){Blockly.fireUiEvent(window,"resize");Entry.playground.blocklyView_.removeClass("foldOut")}); -a.appendChild(b);c=Entry.parseTexttoXML("");Blockly.inject(b,{path:Entry.blockInjectPath||".././",toolbox:c,trashcan:!0,blockmenu:this.blockMenuView_,mediaFilePath:Entry.mediaFilePath});Blockly.mainWorkspace.flyout_.hide();Blockly.mainWorkspace.blockMenu.hide();document.addEventListener("blocklyWorkspaceChange",this.syncObjectWithEvent,!1);this.blockMenu=Blockly.mainWorkspace.blockMenu;Entry.hw.banHW();return a}if("phone"==Entry.type)return b=Entry.createElement("div","entryCategory"), -b.addClass("entryCategoryPhone"),a.appendChild(b),this.categoryView_=b,c=Entry.createElement("ul","entryCategoryList"),c.addClass("entryCategoryListPhone"),b.appendChild(c),this.categoryListView_=c,b=this.createVariableView(),a.appendChild(b),this.variableView_=b,b=Entry.createElement("div","entryBlockly"),b.addClass("entryBlocklyPhone"),this.blocklyView_=b,a.appendChild(b),c=Entry.parseTexttoXML(""),Blockly.inject(b,{path:Entry.blockInjectPath||".././",toolbox:c,trashcan:!0,mediaFilePath:Entry.mediaFilePath}), -Blockly.mainWorkspace.flyout_.autoClose=!0,Blockly.mainWorkspace.flyout_.hide(),document.addEventListener("blocklyWorkspaceChange",this.syncObjectWithEvent,!1),this.blockMenu=Blockly.mainWorkspace.flyout_,Entry.hw.banHW(),a}; -Entry.Playground.prototype.generatePictureView=function(a){if("workspace"==Entry.type){var b=Entry.createElement("div","entryAddPicture");b.addClass("entryPlaygroundAddPicture");b.bindOnClick(function(b){Entry.dispatchEvent("openPictureManager")});var c=Entry.createElement("div","entryAddPictureInner");c.addClass("entryPlaygroundAddPictureInner");c.innerHTML=Lang.Workspace.picture_add;b.appendChild(c);a.appendChild(b);b=Entry.createElement("ul","entryPictureList");b.addClass("entryPlaygroundPictureList"); -$&&$(b).sortable({start:function(b,a){a.item.data("start_pos",a.item.index())},stop:function(b,a){var c=a.item.data("start_pos"),g=a.item.index();Entry.playground.movePicture(c,g)},axis:"y"});a.appendChild(b);this.pictureListView_=b;b=Entry.createElement("div","entryPainter");b.addClass("entryPlaygroundPainter");a.appendChild(b);this.painter=new Entry.Painter;this.painter.initialize(b)}else"phone"==Entry.type&&(b=Entry.createElement("div","entryAddPicture"),b.addClass("entryPlaygroundAddPicturePhone"), -b.bindOnClick(function(b){Entry.dispatchEvent("openPictureManager")}),c=Entry.createElement("div","entryAddPictureInner"),c.addClass("entryPlaygroundAddPictureInnerPhone"),c.innerHTML=Lang.Workspace.picture_add,b.appendChild(c),a.appendChild(b),b=Entry.createElement("ul","entryPictureList"),b.addClass("entryPlaygroundPictureListPhone"),$&&$(b).sortable({start:function(b,a){a.item.data("start_pos",a.item.index())},stop:function(b,a){var c=a.item.data("start_pos"),g=a.item.index();Entry.playground.movePicture(c, -g)},axis:"y"}),a.appendChild(b),this.pictureListView_=b)}; -Entry.Playground.prototype.generateTextView=function(a){var b=Entry.createElement("div");a.appendChild(b);a=Entry.createElement("div");a.addClass("textProperties");b.appendChild(a);var c=Entry.createElement("div");c.addClass("entryTextFontSelect");a.appendChild(c);var d=Entry.createElement("select","entryPainterAttrFontName");d.addClass("entryPlaygroundPainterAttrFontName","entryTextFontSelecter");d.size="1";d.onchange=function(b){Entry.playground.object.entity.setFontType(b.target.value)};for(var e= -0;e p").html(Lang.Menus.linebreak_on_desc_1),$(".entryPlaygroundLinebreakDescription > ul > li").eq(0).html(Lang.Menus.linebreak_on_desc_2),$(".entryPlaygroundLinebreakDescription > ul > li").eq(1).html(Lang.Menus.linebreak_on_desc_3)); -Entry.playground.setFontAlign(Entry.playground.object.entity.getTextAlign());a=Entry.playground.object.entity.getFontSize();Entry.playground.fontSizeIndiciator.style.width=a+"%";Entry.playground.fontSizeKnob.style.left=.88*a+"px"}};Entry.Playground.prototype.injectSound=function(){var a=this.soundListView_;if(a){for(;a.hasChildNodes();)a.removeChild(a.lastChild);if(this.object)for(var b=this.object.sounds,c=0,d=b.length;c":h=b-d;break;case ">=":h=b+1-d}return this.BasicIteration(a,h,f)};b.BlockStatement=function(a){var b=[];a=a.body;for(var d=0;d >= << >> >>> + - * / % , ^ & in instanceof".split(" ")}; +b.AssignmentExpression=function(a){throw{message:a.operator+"\uc740(\ub294) \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uba85\ub839\uc5b4 \uc785\ub2c8\ub2e4.",node:a};};b.AssignmentOperator=function(){return"= += -= *= /= %= <<= >>= >>>= ,= ^= &=".split(" ")};b.LogicalExpression=function(a){throw{message:a.operator+"\uc740(\ub294) \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uba85\ub839\uc5b4 \uc785\ub2c8\ub2e4.",node:a};};b.LogicalOperator=function(){return["||","&&"]};b.MemberExpression=function(a){var b= +a.object,d=a.property;console.log(b.type);b=this[b.type](b);console.log(b);d=this[d.type](d,b);if(Object(b)!==b||Object.getPrototypeOf(b)!==Object.prototype)throw{message:b+"\uc740(\ub294) \uc798\ubabb\ub41c \uba64\ubc84 \ubcc0\uc218\uc785\ub2c8\ub2e4.",node:a};b=d;if(!b)throw{message:d+"\uc774(\uac00) \uc874\uc7ac\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.",node:a};return b};b.ConditionalExpression=function(a){throw{message:"\uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", +node:a};};b.UpdateExpression=function(a){throw{message:a.operator+"\uc740(\ub294) \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uba85\ub801\uc5b4 \uc785\ub2c8\ub2e4.",node:a};};b.CallExpression=function(a){a=a.callee;return{type:this[a.type](a)}};b.NewExpression=function(a){throw{message:"new\ub294 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.",node:a};};b.SequenceExpression=function(a){throw{message:"\uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \ud45c\ud604\uc2dd \uc785\ub2c8\ub2e4.", +node:a};};b.initScope=function(a){if(null===this.scope){var b=function(){};b.prototype=this.syntax.Scope}else b=function(){},b.prototype=this.scope;this.scope=new b;this.scopeChain.push(this.scope);return this.scanDefinition(a)};b.unloadScope=function(){this.scopeChain.pop();this.scope=this.scopeChain.length?this.scopeChain[this.scopeChain.length-1]:null};b.scanDefinition=function(a){a=a.body;for(var b=[],d=0;d=b.keyCode&&CodeMirror.showHint(a,null,{completeSingle:!1,globalScope:d})});break;case "block":this._parser=new Entry.BlockParser(this.syntax)}}; +(function(b){b.parse=function(a){var b=null;switch(this._lang){case "js":try{var d=acorn.parse(a),b=this._parser.Program(d)}catch(e){this.codeMirror&&(e instanceof SyntaxError?(a={from:{line:e.loc.line-1,ch:e.loc.column-2},to:{line:e.loc.line-1,ch:e.loc.column+1}},e.message="\ubb38\ubc95 \uc624\ub958\uc785\ub2c8\ub2e4."):(a=this.getLineNumber(e.node.start,e.node.end),a.message=e.message,a.severity="error",this.codeMirror.markText(a.from,a.to,{className:"CodeMirror-lint-mark-error",__annotation:a, +clearOnEnter:!0})),Entry.toast.alert("Error",e.message)),b=[]}break;case "block":a=this._parser.Code(a).match(/(.*{.*[\S|\s]+?}|.+)/g),b=Array.isArray(a)?a.reduce(function(a,b,c){var d="";1===c&&(a+="\n");d=-11010', -selectedPictureId:"vx80",objectType:"sprite",rotateMethod:"free",scene:"7dwq",sprite:{sounds:[{duration:1.3,ext:".mp3",id:"8el5",fileurl:a+"media/bark.mp3",name:Lang.Blocks.bark_dog}],pictures:[{id:"vx80",fileurl:a+"media/entrybot1.png",name:Lang.Blocks.walking_entryBot+"1",scale:100,dimension:{width:284,height:350}},{id:"4t48",fileurl:a+"media/entrybot2.png",name:Lang.Blocks.walking_entryBot+"2",scale:100,dimension:{width:284,height:350}}]},entity:{x:0,y:0,regX:142,regY:175,scaleX:.3154574132492113, -scaleY:.3154574132492113,rotation:0,direction:90,width:284,height:350,visible:!0},lock:!1,active:!0}],speed:60}};Entry.PropertyPanel=function(){this.modes={};this.selected=null}; -(function(a){a.generateView=function(b,a){this._view=Entry.Dom("div",{class:"propertyPanel",parent:$(b)});this._tabView=Entry.Dom("div",{class:"propertyTab",parent:this._view});this._contentView=Entry.Dom("div",{class:"propertyContent",parent:this._view});var d=Entry.createElement("div");d.addClass("entryObjectSelectedImgWorkspace");this.selectedImgView_=d;this._view.append(d);this.initializeSplitter(d);this.splitter=d};a.addMode=function(b,a){var d=a.getView(),d=Entry.Dom(d,{parent:this._contentView}), -e=Entry.Dom("
"+Lang.Menus[b]+"
",{classes:["propertyTabElement","propertyTab"+b],parent:this._tabView}),f=this;e.bind("click",function(){f.select(b)});this.modes[b]&&(this.modes[b].tabDom.remove(),this.modes[b].contentDom.remove(),"hw"==b&&($(this.modes).removeClass(".propertyTabhw"),$(".propertyTabhw").unbind("dblclick")));this.modes[b]={obj:a,tabDom:e,contentDom:d};"hw"==b&&$(".propertyTabhw").bind("dblclick",function(){Entry.dispatchEvent("hwModeChange")})};a.resize=function(b){this._view.css({width:b+ -"px",top:9*b/16+123-22+"px"});430<=b?this._view.removeClass("collapsed"):this._view.addClass("collapsed");Entry.dispatchEvent("windowResized");(b=this.modes[this.selected].obj.resize)&&"hw"!=this.selected?b():"hw"==this.selected&&this.modes.hw.obj.listPorts?this.modes[this.selected].obj.resizeList():"hw"==this.selected&&this.modes[this.selected].obj.resize()};a.select=function(b){for(var a in this.modes){var d=this.modes[a];d.tabDom.removeClass("selected");d.contentDom.addClass("entryHidden")}a=this.modes[b]; -a.tabDom.addClass("selected");a.contentDom.removeClass("entryHidden");a.obj.resize&&a.obj.resize();this.selected=b};a.initializeSplitter=function(b){b.onmousedown=function(b){Entry.container.disableSort();Entry.container.splitterEnable=!0};document.addEventListener("mousemove",function(b){Entry.container.splitterEnable&&Entry.resizeElement({canvasWidth:b.x||b.clientX})});document.addEventListener("mouseup",function(b){Entry.container.splitterEnable=!1;Entry.container.enableSort()})}})(Entry.PropertyPanel.prototype);Entry.init=function(a,b){Entry.assert("object"===typeof b,"Init option is not object");this.events_={};this.interfaceState={menuWidth:264};Entry.Utils.bindGlobalEvent(["mousedown","mousemove"]);this.options=b;this.parseOptions(b);this.mediaFilePath=(b.libDir?b.libDir:"/lib")+"/entryjs/images/";this.defaultPath=b.defaultDir||"";this.blockInjectPath=b.blockInjectDir||"";"workspace"==this.type&&this.isPhone()&&(this.type="phone");this.initialize_();this.view_=a;this.view_.setAttribute("class","entry"); -Entry.initFonts(b.fonts);this.createDom(a,this.type);this.loadInterfaceState();this.overridePrototype();this.maxCloneLimit=302;this.cloudSavable=!0;this.startTime=(new Date).getTime();document.onkeydown=function(b){Entry.dispatchEvent("keyPressed",b)};document.onkeyup=function(b){Entry.dispatchEvent("keyUpped",b)};window.onresize=function(b){Entry.dispatchEvent("windowResized",b)};window.onbeforeunload=this.beforeUnload;Entry.addEventListener("saveWorkspace",function(b){Entry.addActivity("save")}); -"IE"!=Entry.getBrowserType().substr(0,2)||window.flashaudio?createjs.Sound.registerPlugins([createjs.WebAudioPlugin]):(createjs.FlashAudioPlugin.swfPath=this.mediaFilePath+"media/",createjs.Sound.registerPlugins([createjs.FlashAudioPlugin]),window.flashaudio=!0);Entry.soundQueue=new createjs.LoadQueue;Entry.soundQueue.installPlugin(createjs.Sound);Entry.loadAudio_([Entry.mediaFilePath+"media/click.mp3",Entry.mediaFilePath+"media/click.wav",Entry.mediaFilePath+"media/click.ogg"],"click");Entry.loadAudio_([Entry.mediaFilePath+ -"media/delete.mp3",Entry.mediaFilePath+"media/delete.ogg",Entry.mediaFilePath+"media/delete.wav"],"delete")};Entry.loadAudio_=function(a,b){if(window.Audio&&a.length)for(;0d+55)&&b>40+a*(h-d)&&(h=c.getNextScene())&&(h=$(h.view),$(document).trigger("mouseup"), -h.trigger("mousedown"))});var d=Entry.createElement("ul");d.addClass("entrySceneListWorkspace");Entry.sceneEditable&&$&&$(d).sortable({start:function(b,a){a.item.data("start_pos",a.item.index());$(a.item[0]).clone(!0)},stop:function(b,a){var c=a.item.data("start_pos"),d=a.item.index();Entry.scene.moveScene(c,d)},axis:"x",tolerance:"pointer"});this.view_.appendChild(d);this.listView_=d;Entry.sceneEditable&&(d=Entry.createElement("span"),d.addClass("entrySceneElementWorkspace"),d.addClass("entrySceneAddButtonWorkspace"), -d.bindOnClick(function(b){Entry.engine.isState("run")||Entry.scene.addScene()}),this.view_.appendChild(d),this.addButton_=d)}}; -Entry.Scene.prototype.generateElement=function(a){var b=this,c=Entry.createElement("li",a.id);c.addClass("entrySceneElementWorkspace");c.addClass("entrySceneButtonWorkspace");c.addClass("minValue");$(c).on("mousedown",function(b){Entry.engine.isState("run")?b.preventDefault():Entry.scene.selectScene(a)});var d=Entry.createElement("input");d.addClass("entrySceneFieldWorkspace");d.value=a.name;Entry.sceneEditable||(d.disabled="disabled");var e=Entry.createElement("span");e.addClass("entrySceneLeftWorkspace"); -c.appendChild(e);var f=Entry.createElement("span");f.addClass("entrySceneInputCover");f.style.width=Entry.computeInputWidth(a.name);c.appendChild(f);a.inputWrapper=f;d.onkeyup=function(c){c=c.keyCode;Entry.isArrowOrBackspace(c)||(a.name=this.value,f.style.width=Entry.computeInputWidth(a.name),b.resize(),13==c&&this.blur(),9=this.getScenes().length)Entry.toast.alert(Lang.Msgs.runtime_error,Lang.Workspace.Scene_delete_error,!1);else{var b=this.getScenes().indexOf(this.getSceneById(a.id));this.getScenes().splice(b,1);this.selectScene();for(var b=Entry.container.getSceneObjects(a),c=0;c=this.maxCount)Entry.toast.alert(Lang.Msgs.runtime_error,Lang.Workspace.Scene_add_error,!1);else{var b={name:a.name+Lang.Workspace.replica_of_object,id:Entry.generateHash()};this.generateElement(b);this.addScene(b);a=Entry.container.getSceneObjects(a);for(var c=a.length-1;0<=c;c--)Entry.container.addCloneObject(a[c],b.id)}}; -Entry.Scene.prototype.resize=function(){var a=this.getScenes(),b=this.selectedScene,c=a[0];if(0!==a.length&&c){var d=$(c.view).offset().left,c=parseFloat($(b.view).css("margin-left")),e=$(this.view_).width()-d,f=0,g;for(g in a){var d=a[g],h=d.view;h.addClass("minValue");$(h).removeProp("style");$(d.inputWrapper).width(Entry.computeInputWidth(d.name));h=$(h);f=f+h.width()+c}if(f>e)for(g in e-=$(b.view).width(),c=e/(a.length-1)-(Entry.Scene.viewBasicWidth+c),a)d=a[g],b.id!=d.id?(d.view.removeClass("minValue"), -$(d.inputWrapper).width(c)):d.view.addClass("minValue")}};Entry.Scene.prototype.getNextScene=function(){var a=this.getScenes();return a[a.indexOf(this.selectedScene)+1]};Entry.Script=function(a){this.entity=a};p=Entry.Script.prototype; -p.init=function(a,b,c){Entry.assert("BLOCK"==a.tagName.toUpperCase(),a.tagName);this.type=a.getAttribute("type");this.id=+a.getAttribute("id");a.getElementsByTagName("mutation").length&&a.getElementsByTagName("mutation")[0].hasAttribute("hashid")&&(this.hashId=a.childNodes[0].getAttribute("hashid"));"REPEAT"==this.type.substr(0,6).toUpperCase()&&(this.isRepeat=!0);b instanceof Entry.Script&&(this.previousScript=b,b.parentScript&&(this.parentScript=b.parentScript));c instanceof Entry.Script&&(this.parentScript= -c);a=a.childNodes;for(b=0;b"+Lang.Menus[a]+"",{classes:["propertyTabElement","propertyTab"+a],parent:this._tabView}),f=this;e.bind("click",function(){f.select(a)});this.modes[a]&&(this.modes[a].tabDom.remove(),this.modes[a].contentDom.remove(),"hw"==a&&($(this.modes).removeClass(".propertyTabhw"),$(".propertyTabhw").unbind("dblclick")));this.modes[a]={obj:b,tabDom:e,contentDom:d};"hw"==a&&$(".propertyTabhw").bind("dblclick",function(){Entry.dispatchEvent("hwModeChange")})};b.resize=function(a){this._view.css({width:a+ +"px",top:9*a/16+123-22+"px"});430<=a?this._view.removeClass("collapsed"):this._view.addClass("collapsed");Entry.dispatchEvent("windowResized");(a=this.modes[this.selected].obj.resize)&&"hw"!=this.selected?a():"hw"==this.selected&&this.modes.hw.obj.listPorts?this.modes[this.selected].obj.resizeList():"hw"==this.selected&&this.modes[this.selected].obj.resize()};b.select=function(a){for(var b in this.modes){var d=this.modes[b];d.tabDom.removeClass("selected");d.contentDom.addClass("entryHidden");d.obj.visible= +!1}b=this.modes[a];b.tabDom.addClass("selected");b.contentDom.removeClass("entryHidden");b.obj.resize&&b.obj.resize();b.obj.visible=!0;this.selected=a};b.initializeSplitter=function(a){a.onmousedown=function(a){Entry.container.disableSort();Entry.container.splitterEnable=!0;Entry.documentMousemove&&(Entry.container.resizeEvent=Entry.documentMousemove.attach(this,function(a){Entry.container.splitterEnable&&Entry.resizeElement({canvasWidth:a.clientX||a.x})}))};document.addEventListener("mouseup",function(a){if(a= +Entry.container.resizeEvent)Entry.container.splitterEnable=!1,Entry.documentMousemove.detach(a),delete Entry.container.resizeEvent;Entry.container.enableSort()})}})(Entry.PropertyPanel.prototype);Entry.init=function(b,a){Entry.assert("object"===typeof a,"Init option is not object");this.events_={};this.interfaceState={menuWidth:264};Entry.Utils.bindGlobalEvent("resize mousedown mousemove keydown keyup dispose".split(" "));this.options=a;this.parseOptions(a);this.mediaFilePath=(a.libDir?a.libDir:"/lib")+"/entryjs/images/";this.defaultPath=a.defaultDir||"";this.blockInjectPath=a.blockInjectDir||"";"workspace"==this.type&&this.isPhone()&&(this.type="phone");this.initialize_();this.view_=b;this.view_.setAttribute("class", +"entry");Entry.initFonts(a.fonts);this.createDom(b,this.type);this.loadInterfaceState();this.overridePrototype();this.maxCloneLimit=302;this.cloudSavable=!0;this.startTime=(new Date).getTime();document.onkeydown=function(a){Entry.dispatchEvent("keyPressed",a)};document.onkeyup=function(a){Entry.dispatchEvent("keyUpped",a)};window.onresize=function(a){Entry.dispatchEvent("windowResized",a)};window.onbeforeunload=this.beforeUnload;Entry.addEventListener("saveWorkspace",function(a){Entry.addActivity("save")}); +"IE"!=Entry.getBrowserType().substr(0,2)||window.flashaudio?createjs.Sound.registerPlugins([createjs.WebAudioPlugin]):(createjs.FlashAudioPlugin.swfPath=this.mediaFilePath+"media/",createjs.Sound.registerPlugins([createjs.FlashAudioPlugin]),window.flashaudio=!0);Entry.soundQueue=new createjs.LoadQueue;Entry.soundQueue.installPlugin(createjs.Sound);Entry.loadAudio_([Entry.mediaFilePath+"sounds/click.mp3",Entry.mediaFilePath+"sounds/click.wav",Entry.mediaFilePath+"sounds/click.ogg"],"entryMagneting"); +Entry.loadAudio_([Entry.mediaFilePath+"sounds/delete.mp3",Entry.mediaFilePath+"sounds/delete.ogg",Entry.mediaFilePath+"sounds/delete.wav"],"entryDelete");createjs.Sound.stop()};Entry.loadAudio_=function(b,a){if(window.Audio&&b.length)for(;0d+55)&&a>40+b*(h-d)&&(h=c.getNextScene())&&(h=$(h.view),$(document).trigger("mouseup"), +h.trigger("mousedown"))});var d=Entry.createElement("ul");d.addClass("entrySceneListWorkspace");Entry.sceneEditable&&$&&$(d).sortable({start:function(a,b){b.item.data("start_pos",b.item.index());$(b.item[0]).clone(!0)},stop:function(a,b){var c=b.item.data("start_pos"),d=b.item.index();Entry.scene.moveScene(c,d)},axis:"x",tolerance:"pointer"});this.view_.appendChild(d);this.listView_=d;Entry.sceneEditable&&(d=Entry.createElement("span"),d.addClass("entrySceneElementWorkspace"),d.addClass("entrySceneAddButtonWorkspace"), +d.bindOnClick(function(a){Entry.engine.isState("run")||Entry.scene.addScene()}),this.view_.appendChild(d),this.addButton_=d)}}; +Entry.Scene.prototype.generateElement=function(b){var a=this,c=Entry.createElement("li",b.id);c.addClass("entrySceneElementWorkspace");c.addClass("entrySceneButtonWorkspace");c.addClass("minValue");$(c).on("mousedown",function(a){Entry.engine.isState("run")?a.preventDefault():Entry.scene.selectScene(b)});var d=Entry.createElement("input");d.addClass("entrySceneFieldWorkspace");d.value=b.name;Entry.sceneEditable||(d.disabled="disabled");var e=Entry.createElement("span");e.addClass("entrySceneLeftWorkspace"); +c.appendChild(e);var f=Entry.createElement("span");f.addClass("entrySceneInputCover");f.style.width=Entry.computeInputWidth(b.name);c.appendChild(f);b.inputWrapper=f;d.onkeyup=function(c){c=c.keyCode;Entry.isArrowOrBackspace(c)||(b.name=this.value,f.style.width=Entry.computeInputWidth(b.name),a.resize(),13==c&&this.blur(),9=this.getScenes().length)Entry.toast.alert(Lang.Msgs.runtime_error,Lang.Workspace.Scene_delete_error,!1);else{var a=this.getScenes().indexOf(this.getSceneById(b.id));this.getScenes().splice(a,1);this.selectScene();for(var a=Entry.container.getSceneObjects(b),c=0;c=this.maxCount)Entry.toast.alert(Lang.Msgs.runtime_error,Lang.Workspace.Scene_add_error,!1);else{var a={name:b.name+Lang.Workspace.replica_of_object,id:Entry.generateHash()};this.generateElement(a);this.addScene(a);b=Entry.container.getSceneObjects(b);for(var c=b.length-1;0<=c;c--)Entry.container.addCloneObject(b[c],a.id)}}; +Entry.Scene.prototype.resize=function(){var b=this.getScenes(),a=this.selectedScene,c=b[0];if(0!==b.length&&c){var d=$(c.view).offset().left,c=parseFloat($(a.view).css("margin-left")),e=$(this.view_).width()-d,f=0,g;for(g in b){var d=b[g],h=d.view;h.addClass("minValue");$(h).removeProp("style");$(d.inputWrapper).width(Entry.computeInputWidth(d.name));h=$(h);f=f+h.width()+c}if(f>e)for(g in e-=$(a.view).width(),c=e/(b.length-1)-(Entry.Scene.viewBasicWidth+c),b)d=b[g],a.id!=d.id?(d.view.removeClass("minValue"), +$(d.inputWrapper).width(c)):d.view.addClass("minValue")}};Entry.Scene.prototype.getNextScene=function(){var b=this.getScenes();return b[b.indexOf(this.selectedScene)+1]};Entry.Script=function(b){this.entity=b};p=Entry.Script.prototype; +p.init=function(b,a,c){Entry.assert("BLOCK"==b.tagName.toUpperCase(),b.tagName);this.type=b.getAttribute("type");this.id=Number(b.getAttribute("id"));b.getElementsByTagName("mutation").length&&b.getElementsByTagName("mutation")[0].hasAttribute("hashid")&&(this.hashId=b.childNodes[0].getAttribute("hashid"));"REPEAT"==this.type.substr(0,6).toUpperCase()&&(this.isRepeat=!0);a instanceof Entry.Script&&(this.previousScript=a,a.parentScript&&(this.parentScript=a.parentScript));c instanceof Entry.Script&& +(this.parentScript=c);b=b.childNodes;for(a=0;ab.getScaleX()?b.setScaleX(-a.width/b.width):b.setScaleX(a.width/b.width)),0!==b.height&&b.setScaleY(a.height/b.height));var c=a.rotation/180*Math.PI;if("textBox"==b.type){var d=a.regX/b.scaleX,d=a.regY/b.scaleY;if(b.getLineBreak())b.setX(a.x),b.setY(-a.y);else switch(b.getTextAlign()){case Entry.TEXT_ALIGN_LEFT:b.setX(a.x- -a.width/2*Math.cos(c));b.setY(-a.y+a.width/2*Math.sin(c));break;case Entry.TEXT_ALIGN_CENTER:b.setX(a.x);b.setY(-a.y);break;case Entry.TEXT_ALIGN_RIGHT:b.setX(a.x+a.width/2*Math.cos(c)),b.setY(-a.y-a.width/2*Math.sin(c))}}else d=b.width/2+a.regX/b.scaleX,b.setX(a.x+a.regX*Math.cos(c)-a.regY*Math.sin(c)),b.setRegX(d),d=b.height/2+a.regY/b.scaleY,b.setY(-a.y-a.regX*Math.sin(c)-a.regY*Math.cos(c)),b.setRegY(d);b.setDirection(a.direction);b.setRotation(a.rotation);this.selectedObject.entity.doCommand(); +Entry.Stage.prototype.updateObject=function(){this.handle.setDraggable(!0);if(!this.editEntity){var b=this.selectedObject;if(b){"textBox"==b.objectType?this.handle.toggleCenter(!1):this.handle.toggleCenter(!0);"free"==b.getRotateMethod()?this.handle.toggleRotation(!0):this.handle.toggleRotation(!1);this.handle.toggleDirection(!0);b.getLock()?(this.handle.toggleRotation(!1),this.handle.toggleDirection(!1),this.handle.toggleResize(!1),this.handle.toggleCenter(!1),this.handle.setDraggable(!1)):this.handle.toggleResize(!0); +this.handle.setVisible(!0);var a=b.entity;this.handle.setWidth(a.getScaleX()*a.getWidth());this.handle.setHeight(a.getScaleY()*a.getHeight());var c,d;if("textBox"==a.type)if(a.getLineBreak())c=a.regX*a.scaleX,d=-a.regY*a.scaleY;else{var e=a.getTextAlign();d=-a.regY*a.scaleY;switch(e){case Entry.TEXT_ALIGN_LEFT:c=-a.getWidth()/2*a.scaleX;break;case Entry.TEXT_ALIGN_CENTER:c=a.regX*a.scaleX;break;case Entry.TEXT_ALIGN_RIGHT:c=a.getWidth()/2*a.scaleX}}else c=(a.regX-a.width/2)*a.scaleX,d=(a.height/2- +a.regY)*a.scaleY;e=a.getRotation()/180*Math.PI;this.handle.setX(a.getX()-c*Math.cos(e)-d*Math.sin(e));this.handle.setY(-a.getY()-c*Math.sin(e)+d*Math.cos(e));this.handle.setRegX((a.regX-a.width/2)*a.scaleX);this.handle.setRegY((a.regY-a.height/2)*a.scaleY);this.handle.setRotation(a.getRotation());this.handle.setDirection(a.getDirection());this.objectUpdated=!0;this.handle.setVisible(b.entity.getVisible());b.entity.getVisible()&&this.handle.render()}else this.handle.setVisible(!1)}}; +Entry.Stage.prototype.updateHandle=function(){this.editEntity=!0;var b=this.handle,a=this.selectedObject.entity;a.lineBreak?(a.setHeight(b.height/a.getScaleY()),a.setWidth(b.width/a.getScaleX())):(0!==a.width&&(0>a.getScaleX()?a.setScaleX(-b.width/a.width):a.setScaleX(b.width/a.width)),0!==a.height&&a.setScaleY(b.height/a.height));var c=b.rotation/180*Math.PI;if("textBox"==a.type){var d=b.regX/a.scaleX,d=b.regY/a.scaleY;if(a.getLineBreak())a.setX(b.x),a.setY(-b.y);else switch(a.getTextAlign()){case Entry.TEXT_ALIGN_LEFT:a.setX(b.x- +b.width/2*Math.cos(c));a.setY(-b.y+b.width/2*Math.sin(c));break;case Entry.TEXT_ALIGN_CENTER:a.setX(b.x);a.setY(-b.y);break;case Entry.TEXT_ALIGN_RIGHT:a.setX(b.x+b.width/2*Math.cos(c)),a.setY(-b.y-b.width/2*Math.sin(c))}}else d=a.width/2+b.regX/a.scaleX,a.setX(b.x+b.regX*Math.cos(c)-b.regY*Math.sin(c)),a.setRegX(d),d=a.height/2+b.regY/a.scaleY,a.setY(-b.y-b.regX*Math.sin(c)-b.regY*Math.cos(c)),a.setRegY(d);a.setDirection(b.direction);a.setRotation(b.rotation);this.selectedObject.entity.doCommand(); this.editEntity=!1};Entry.Stage.prototype.startEdit=function(){this.selectedObject.entity.initCommand()};Entry.Stage.prototype.endEdit=function(){this.selectedObject.entity.checkCommand()}; -Entry.Stage.prototype.initWall=function(){var a=new createjs.Container,b=new Image;b.src=Entry.mediaFilePath+"media/bound.png";a.up=new createjs.Bitmap;a.up.scaleX=16;a.up.y=-165;a.up.x=-240;a.up.image=b;a.addChild(a.up);a.down=new createjs.Bitmap;a.down.scaleX=16;a.down.y=135;a.down.x=-240;a.down.image=b;a.addChild(a.down);a.right=new createjs.Bitmap;a.right.scaleY=9;a.right.y=-135;a.right.x=240;a.right.image=b;a.addChild(a.right);a.left=new createjs.Bitmap;a.left.scaleY=9;a.left.y=-135;a.left.x= --270;a.left.image=b;a.addChild(a.left);this.canvas.addChild(a);this.wall=a}; -Entry.Stage.prototype.showInputField=function(a){a=1/1.5;this.inputField||(this.inputField=new CanvasInput({canvas:document.getElementById("entryCanvas"),fontSize:30*a,fontFamily:"NanumGothic",fontColor:"#212121",width:556*a,height:26*a,padding:8*a,borderWidth:1*a,borderColor:"#000",borderRadius:3*a,boxShadow:"none",innerShadow:"0px 0px 5px rgba(0, 0, 0, 0.5)",x:202*a,y:450*a,topPosition:!0,onsubmit:function(){Entry.dispatchEvent("canvasInputComplete")}}));a=new createjs.Container;var b=new Image; -b.src=Entry.mediaFilePath+"confirm_button.png";var c=new createjs.Bitmap;c.scaleX=.23;c.scaleY=.23;c.x=160;c.y=89;c.cursor="pointer";c.image=b;a.addChild(c);a.on("mousedown",function(b){Entry.dispatchEvent("canvasInputComplete")});this.inputSubmitButton||(this.inputField.value(""),this.canvas.addChild(a),this.inputSubmitButton=a);this.inputField.show()}; +Entry.Stage.prototype.initWall=function(){var b=new createjs.Container,a=new Image;a.src=Entry.mediaFilePath+"media/bound.png";b.up=new createjs.Bitmap;b.up.scaleX=16;b.up.y=-165;b.up.x=-240;b.up.image=a;b.addChild(b.up);b.down=new createjs.Bitmap;b.down.scaleX=16;b.down.y=135;b.down.x=-240;b.down.image=a;b.addChild(b.down);b.right=new createjs.Bitmap;b.right.scaleY=9;b.right.y=-135;b.right.x=240;b.right.image=a;b.addChild(b.right);b.left=new createjs.Bitmap;b.left.scaleY=9;b.left.y=-135;b.left.x= +-270;b.left.image=a;b.addChild(b.left);this.canvas.addChild(b);this.wall=b}; +Entry.Stage.prototype.showInputField=function(b){b=1/1.5;this.inputField||(this.inputField=new CanvasInput({canvas:document.getElementById("entryCanvas"),fontSize:30*b,fontFamily:"NanumGothic",fontColor:"#212121",width:556*b,height:26*b,padding:8*b,borderWidth:1*b,borderColor:"#000",borderRadius:3*b,boxShadow:"none",innerShadow:"0px 0px 5px rgba(0, 0, 0, 0.5)",x:202*b,y:450*b,topPosition:!0,onsubmit:function(){Entry.dispatchEvent("canvasInputComplete")}}));b=new createjs.Container;var a=new Image; +a.src=Entry.mediaFilePath+"confirm_button.png";var c=new createjs.Bitmap;c.scaleX=.23;c.scaleY=.23;c.x=160;c.y=89;c.cursor="pointer";c.image=a;b.addChild(c);b.on("mousedown",function(a){Entry.dispatchEvent("canvasInputComplete")});this.inputSubmitButton||(this.inputField.value(""),this.canvas.addChild(b),this.inputSubmitButton=b);this.inputField.show()}; Entry.Stage.prototype.hideInputField=function(){this.inputField&&this.inputField.value()&&this.inputField.value("");this.inputSubmitButton&&(this.canvas.removeChild(this.inputSubmitButton),this.inputSubmitButton=null);this.inputField&&this.inputField.hide()}; -Entry.Stage.prototype.initObjectContainers=function(){var a=Entry.scene.scenes_;if(a&&0!==a.length){for(var b=0;bd.style.opacity&&(clearInterval(b),d.style.display="none",Entry.removeElement(d));d.style.opacity*=.9},20)},1E3)}; -Entry.Toast.prototype.success=function(a,b,c){var d=Entry.createElement("div","entryToast");d.addClass("entryToast");d.addClass("entryToastSuccess");d.bindOnClick(function(){Entry.toast.body_.removeChild(this)});var e=Entry.createElement("div","entryToast");e.addClass("entryToastTitle");e.innerHTML=a;d.appendChild(e);a=Entry.createElement("p","entryToast");a.addClass("entryToastMessage");a.innerHTML=b;d.appendChild(a);this.toasts_.push(d);this.body_.appendChild(d);c||window.setTimeout(function(){d.style.opacity= -1;var b=setInterval(function(){.05>d.style.opacity&&(clearInterval(b),d.style.display="none",Entry.removeElement(d));d.style.opacity*=.9},20)},1E3)}; -Entry.Toast.prototype.alert=function(a,b,c){var d=Entry.createElement("div","entryToast");d.addClass("entryToast");d.addClass("entryToastAlert");d.bindOnClick(function(){Entry.toast.body_.removeChild(this)});var e=Entry.createElement("div","entryToast");e.addClass("entryToastTitle");e.innerHTML=a;d.appendChild(e);a=Entry.createElement("p","entryToast");a.addClass("entryToastMessage");a.innerHTML=b;d.appendChild(a);this.toasts_.push(d);this.body_.appendChild(d);c||window.setTimeout(function(){d.style.opacity= -1;var b=setInterval(function(){.05>d.style.opacity&&(clearInterval(b),d.style.display="none",Entry.toast.body_.removeChild(d));d.style.opacity*=.9},20)},5E3)};Entry.TvCast=function(a){this.generateView(a)};p=Entry.TvCast.prototype;p.init=function(a){this.tvCastHash=a};p.generateView=function(a){var b=Entry.createElement("div");b.addClass("entryContainerMovieWorkspace");b.addClass("entryHidden");this.movieContainer=b;b=Entry.createElement("iframe");b.setAttribute("id","tvCastIframe");b.setAttribute("allowfullscreen","");b.setAttribute("frameborder",0);b.setAttribute("src",a);this.movieFrame=b;this.movieContainer.appendChild(this.movieFrame)};p.getView=function(){return this.movieContainer}; -p.resize=function(){var a=document.getElementById("entryContainerWorkspaceId"),b=document.getElementById("tvCastIframe");w=a.offsetWidth;b.width=w+"px";b.height=9*w/16+"px"};Entry.ContextMenu={}; -(function(a){a.createDom=function(){this.dom=Entry.Dom("ul",{id:"entry-contextmenu",parent:$("body")});Entry.Utils.disableContextmenu(this.dom);Entry.documentMousedown.attach(this,function(){this.hide()})};a.show=function(b,a){this.dom||this.createDom();if(0!==b.length){var d=this;void 0!==a&&(this._className=a,this.dom.addClass(a));var e=this.dom;e.empty();for(var f=0,g=b.length;fg&&(b.x-=d+3);b.y+e>f&&(b.y-=e);a.css({left:b.x,top:b.y})};a.hide=function(){this.dom.empty();this.dom.addClass("entryRemove");this._className&&(this.dom.removeClass(this._className),delete this._className)}})(Entry.ContextMenu);Entry.STATIC={OBJECT:0,ENTITY:1,SPRITE:2,SOUND:3,VARIABLE:4,FUNCTION:5,SCENE:6,MESSAGE:7,BLOCK_MODEL:8,BLOCK_RENDER_MODEL:9,BOX_MODEL:10,THREAD_MODEL:11,DRAG_INSTANCE:12,BLOCK_STATIC:0,BLOCK_MOVE:1,BLOCK_FOLLOW:2,RETURN:0,CONTINUE:1};Entry.Utils={};Entry.overridePrototype=function(){Number.prototype.mod=function(a){return(this%a+a)%a}};Entry.Utils.generateId=function(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).substr(-4)};Entry.Utils.intersectArray=function(a,b){for(var c=[],d=0;d=b.x&&e-c<=b.y&&e+a.height+c>=b.y}; -Entry.Utils.colorDarken=function(a,b){var c,d,e;7===a.length?(c=parseInt(a.substr(1,2),16),d=parseInt(a.substr(3,2),16),e=parseInt(a.substr(5,2),16)):(c=parseInt(a.substr(1,2),16),d=parseInt(a.substr(2,2),16),e=parseInt(a.substr(3,2),16));b=void 0===b?.7:b;c=Math.floor(c*b).toString(16);d=Math.floor(d*b).toString(16);e=Math.floor(e*b).toString(16);return"#"+c+d+e}; -Entry.Utils.bindGlobalEvent=function(a){void 0===a&&(a=["resize","mousedown","mousemove","keydown","keyup"]);!Entry.windowReszied&&-1Entry.pressedKeys.indexOf(a)&&Entry.pressedKeys.push(a);Entry.keyPressed.notify(b)}));!Entry.keyUpped&&-1$1://$2").replace(/([xA1-xFEa-z0-9_-]+@[xA1-xFEa-z0-9-]+.[a-z0-9-]+)/gi,"$1"):""};Entry.generateHash=function(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).substr(-4)}; -Entry.addEventListener=function(a,b){this.events_||(this.events_={});this.events_[a]||(this.events_[a]=[]);b instanceof Function&&this.events_[a].push(b);return!0};Entry.dispatchEvent=function(a,b){this.events_||(this.events_={});if(this.events_[a])for(var c=0,d=this.events_[a].length;c=f?(parseFloat(a)+parseFloat(b)).toFixed(e):(parseFloat(a)+parseFloat(b)).toFixed(f):parseInt(a)+parseInt(b)}; -Entry.hex2rgb=function(a){return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};Entry.rgb2hex=function(a,b,c){return"#"+(16777216+(a<<16)+(b<<8)+c).toString(16).slice(1)};Entry.generateRgb=function(){return{r:Math.floor(256*Math.random()),g:Math.floor(256*Math.random()),b:Math.floor(256*Math.random())}};Entry.adjustValueWithMaxMin=function(a,b,c){return a>c?c:ad.style.opacity&&(clearInterval(a),d.style.display="none",Entry.removeElement(d));d.style.opacity*=.9},20)},1E3)}; +Entry.Toast.prototype.success=function(b,a,c){var d=Entry.createElement("div","entryToast");d.addClass("entryToast");d.addClass("entryToastSuccess");d.bindOnClick(function(){Entry.toast.body_.removeChild(this)});var e=Entry.createElement("div","entryToast");e.addClass("entryToastTitle");e.innerHTML=b;d.appendChild(e);b=Entry.createElement("p","entryToast");b.addClass("entryToastMessage");b.innerHTML=a;d.appendChild(b);this.toasts_.push(d);this.body_.appendChild(d);c||window.setTimeout(function(){d.style.opacity= +1;var a=setInterval(function(){.05>d.style.opacity&&(clearInterval(a),d.style.display="none",Entry.removeElement(d));d.style.opacity*=.9},20)},1E3)}; +Entry.Toast.prototype.alert=function(b,a,c){var d=Entry.createElement("div","entryToast");d.addClass("entryToast");d.addClass("entryToastAlert");d.bindOnClick(function(){Entry.toast.body_.removeChild(this)});var e=Entry.createElement("div","entryToast");e.addClass("entryToastTitle");e.innerHTML=b;d.appendChild(e);b=Entry.createElement("p","entryToast");b.addClass("entryToastMessage");b.innerHTML=a;d.appendChild(b);this.toasts_.push(d);this.body_.appendChild(d);c||window.setTimeout(function(){d.style.opacity= +1;var a=setInterval(function(){.05>d.style.opacity&&(clearInterval(a),d.style.display="none",Entry.toast.body_.removeChild(d));d.style.opacity*=.9},20)},5E3)};Entry.TvCast=function(b){this.generateView(b)};p=Entry.TvCast.prototype;p.init=function(b){this.tvCastHash=b};p.generateView=function(b){var a=Entry.createElement("div");a.addClass("entryContainerMovieWorkspace");a.addClass("entryHidden");this.movieContainer=a;a=Entry.createElement("iframe");a.setAttribute("id","tvCastIframe");a.setAttribute("allowfullscreen","");a.setAttribute("frameborder",0);a.setAttribute("src",b);this.movieFrame=a;this.movieContainer.appendChild(this.movieFrame)};p.getView=function(){return this.movieContainer}; +p.resize=function(){var b=document.getElementById("entryContainerWorkspaceId"),a=document.getElementById("tvCastIframe");w=b.offsetWidth;a.width=w+"px";a.height=9*w/16+"px"};Entry.BlockDriver=function(){}; +(function(b){b.convert=function(){var a=new Date,b;for(b in Entry.block)"function"===typeof Entry.block[b]&&this._convertBlock(b);console.log((new Date).getTime()-a.getTime())};b._convertBlock=function(a){function b(a){var d={type:a.getAttribute("type"),index:{}};a=$(a).children();if(!a)return d;for(var e=0;eg&&(a.x-=d+3);a.y+e>f&&(a.y-=e);b.css({left:a.x,top:a.y})};b.hide=function(){this.dom.empty();this.dom.addClass("entryRemove");this._className&&(this.dom.removeClass(this._className),delete this._className)}})(Entry.ContextMenu);Entry.STATIC={OBJECT:0,ENTITY:1,SPRITE:2,SOUND:3,VARIABLE:4,FUNCTION:5,SCENE:6,MESSAGE:7,BLOCK_MODEL:8,BLOCK_RENDER_MODEL:9,BOX_MODEL:10,THREAD_MODEL:11,DRAG_INSTANCE:12,BLOCK_STATIC:0,BLOCK_MOVE:1,BLOCK_FOLLOW:2,RETURN:0,CONTINUE:1,BREAK:2,PASS:3};Entry.Utils={};Entry.overridePrototype=function(){Number.prototype.mod=function(b){return(this%b+b)%b}};Entry.Utils.generateId=function(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).substr(-4)};Entry.Utils.intersectArray=function(b,a){for(var c=[],d=0;d=a.x&&e-c<=a.y&&e+b.height+c>=a.y}; +Entry.Utils.colorDarken=function(b,a){function c(a){2!=a.length&&(a="0"+a);return a}var d,e,f;7===b.length?(d=parseInt(b.substr(1,2),16),e=parseInt(b.substr(3,2),16),f=parseInt(b.substr(5,2),16)):(d=parseInt(b.substr(1,2),16),e=parseInt(b.substr(2,2),16),f=parseInt(b.substr(3,2),16));a=void 0===a?.7:a;d=c(Math.floor(d*a).toString(16));e=c(Math.floor(e*a).toString(16));f=c(Math.floor(f*a).toString(16));return"#"+d+e+f}; +Entry.Utils.colorLighten=function(b,a){a=0===a?0:a||20;var c=Entry.Utils.hexToHsl(b);c.l+=a/100;c.l=Math.min(1,Math.max(0,c.l));return Entry.Utils.hslToHex(c)};Entry.Utils.bound01=function(b,a){var c=b;"string"==typeof c&&-1!=c.indexOf(".")&&1===parseFloat(c)&&(b="100%");c="string"===typeof b&&-1!=b.indexOf("%");b=Math.min(a,Math.max(0,parseFloat(b)));c&&(b=parseInt(b*a,10)/100);return 1E-6>Math.abs(b-a)?1:b%a/parseFloat(a)}; +Entry.Utils.hexToHsl=function(b){var a,c;7===b.length?(a=parseInt(b.substr(1,2),16),c=parseInt(b.substr(3,2),16),b=parseInt(b.substr(5,2),16)):(a=parseInt(b.substr(1,2),16),c=parseInt(b.substr(2,2),16),b=parseInt(b.substr(3,2),16));a=Entry.Utils.bound01(a,255);c=Entry.Utils.bound01(c,255);b=Entry.Utils.bound01(b,255);var d=Math.max(a,c,b),e=Math.min(a,c,b),f,g=(d+e)/2;if(d==e)f=e=0;else{var h=d-e,e=.5c&&(c+=1);1c?b:c<2/3?a+(b-a)*(2/3-c)*6:a}function c(a){return 1==a.length?"0"+a:""+a}var d,e;e=Entry.Utils.bound01(b.h,360);d=Entry.Utils.bound01(b.s,1);b=Entry.Utils.bound01(b.l,1);if(0===d)d=b=e=b;else{var f=.5>b?b*(1+d):b+d-b*d,g=2*b-f;d=a(g,f,e+1/3);b=a(g,f,e);e=a(g,f,e-1/3)}b*=255;e*=255;return"#"+[c(Math.round(255*d).toString(16)),c(Math.round(b).toString(16)),c(Math.round(e).toString(16))].join("")}; +Entry.Utils.bindGlobalEvent=function(b){var a=$(document);void 0===b&&(b="resize mousedown mousemove keydown keyup dispose".split(" "));-1Entry.pressedKeys.indexOf(b)&&Entry.pressedKeys.push(b);Entry.keyPressed.notify(a)}));-1$1://$2").replace(/([xA1-xFEa-z0-9_-]+@[xA1-xFEa-z0-9-]+.[a-z0-9-]+)/gi,"$1"):""};Entry.generateHash=function(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).substr(-4)}; +Entry.addEventListener=function(b,a){this.events_||(this.events_={});this.events_[b]||(this.events_[b]=[]);a instanceof Function&&this.events_[b].push(a);return!0};Entry.dispatchEvent=function(b,a){this.events_||(this.events_={});if(this.events_[b])for(var c=0,d=this.events_[b].length;c=f?(parseFloat(b)+parseFloat(a)).toFixed(e):(parseFloat(b)+parseFloat(a)).toFixed(f):parseInt(b)+parseInt(a)}; +Entry.hex2rgb=function(b){return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};Entry.rgb2hex=function(b,a,c){return"#"+(16777216+(b<<16)+(a<<8)+c).toString(16).slice(1)};Entry.generateRgb=function(){return{r:Math.floor(256*Math.random()),g:Math.floor(256*Math.random()),b:Math.floor(256*Math.random())}};Entry.adjustValueWithMaxMin=function(b,a,c){return b>c?c:bb.y+b.height||a.x+a.widthb.x+b.width)};Entry.bindAnimationCallback=function(a,b){a.addEventListener("webkitAnimationEnd",b,!1);a.addEventListener("animationend",b,!1);a.addEventListener("oanimationend",b,!1)};Entry.cloneSimpleObject=function(a){var b={},c;for(c in a)b[c]=a[c];return b};Entry.nodeListToArray=function(a){for(var b=Array(a.length),c=-1,d=a.length;++c!==d;b[c]=a[c]);return b}; -Entry.computeInputWidth=function(a){var b=document.createElement("span");b.className="tmp-element";b.innerHTML=a.replace(/&/g,"&").replace(//g,">");document.body.appendChild(b);a=b.offsetWidth;document.body.removeChild(b);return+(a+10)+"px"};Entry.isArrowOrBackspace=function(a){return-1<[37,38,39,40,8].indexOf(a)};Entry.hexStringToBin=function(a){for(var b=[],c=0;cd&&(d=h.index)}return 0b&&(b=e))}return Math.min(b,20)};Entry.convertToRoundedDecimals=function(a,b){return isNaN(a)||!this.isFloat(a)?a:+(Math.round(a+"e"+b)+"e-"+b)};Entry.attachEventListener=function(a,b,c){setTimeout(function(){a.addEventListener(b,c)},0)};Entry.deAttachEventListener=function(a,b,c){a.removeEventListener(b,c)}; -Entry.isEmpty=function(a){if(!a)return!0;for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};Entry.Utils.disableContextmenu=function(a){if(a)$(a).on("contextmenu",function(b){b.stopPropagation();b.preventDefault();return!1})};Entry.Utils.isRightButton=function(a){return 2==a.button||a.ctrlKey};Entry.Utils.COLLISION={NONE:0,UP:1,RIGHT:2,LEFT:3,DOWN:4};Entry.Model=function(a,b){var c=Entry.Model;c.generateSchema(a);c.generateSetter(a);c.generateObserve(a);(void 0===b||b)&&Object.seal(a);return a}; -(function(a){a.generateSchema=function(b){var a=b.schema;if(void 0!==a){a=JSON.parse(JSON.stringify(a));b.data={};for(var d in a)(function(d){b.data[d]=a[d];Object.defineProperty(b,d,{get:function(){return b.data[d]}})})(d);b._toJSON=this._toJSON}};a.generateSetter=function(b){b.set=this.set};a.set=function(b,a){var d={},e;for(e in this.data)void 0!==b[e]&&(b[e]===this.data[e]?delete b[e]:(d[e]=this.data[e],this.data[e]=b[e]));a||this.notify(Object.keys(b),d)};a.generateObserve=function(b){b.observers= -[];b.observe=this.observe;b.unobserve=this.unobserve;b.notify=this.notify};a.observe=function(b,a,d,e){d=new Entry.Observer(this.observers,b,a,d);if(!1!==e)b[a]([]);return d};a.unobserve=function(b){b.destroy()};a.notify=function(b,a){"string"===typeof b&&(b=[b]);var d=this;d.observers.map(function(e){var f=b;void 0!==e.attrs&&(f=Entry.Utils.intersectArray(e.attrs,b));if(f.length)e.object[e.funcName](f.map(function(b){return{name:b,object:d,oldValue:a[b]}}))})};a._toJSON=function(){var b={},a;for(a in this.data)b[a]= -this.data[a];return b}})(Entry.Model);Entry.Func=function(){this.id=Entry.generateHash();this.content=Blockly.Xml.textToDom(Entry.Func.CREATE_BLOCK);this.block=null;this.stringHash={};this.booleanHash={}};Entry.Func.threads={};Entry.Func.registerFunction=function(a,b){var c=Entry.generateHash(),d=Entry.variableContainer.getFunction(a),e=new Entry.Script(b);e.init(d.content.childNodes[0]);this.threads[c]=e;return c}; -Entry.Func.executeFunction=function(a){var b=this.threads[a];if(b=Entry.Engine.computeThread(b.entity,b))return this.threads[a]=b,!0;delete this.threads[a];return!1};Entry.Func.clearThreads=function(){this.threads={}};Entry.Func.prototype.init=function(a){this.id=a.id;this.content=Blockly.Xml.textToDom(a.content);this.block=Blockly.Xml.textToDom(""+a.block+"").childNodes[0]};Entry.Func.CREATE_BTN=''; -Entry.Func.createBtn=Entry.nodeListToArray(Blockly.Xml.textToDom(Entry.Func.CREATE_BTN).childNodes);Entry.Func.FIELD_BLOCK='';Entry.Func.fieldBlocks=Entry.nodeListToArray(Blockly.Xml.textToDom(Entry.Func.FIELD_BLOCK).childNodes); -Entry.Func.CREATE_BLOCK=''; -Entry.Func.edit=function(a){this.srcFName="";for(var b=$(a.content.innerHTML).find("field"),c=0;cBlockly.Block.dragMode_&&(a.updateMenu(),a.fieldText=b,a.workspaceLength=c)}}; -Entry.Func.updateMenu=function(){if("func"==Entry.playground.selectedMenu&&(Entry.playground.blockMenu.hide(),Entry.playground.blockMenu.show(Entry.Func.getMenuXml()),!Blockly.WidgetDiv.field_&&Entry.Func.targetFunc)){var a=Entry.Func.targetFunc,b=Blockly.Xml.workspaceToDom(Entry.Func.workspace),c=b.getElementsByClassName("function_general"),d=a.id,e,c=Entry.nodeListToArray(c),f=[],g={};c.map(function(b){var a=b.getElementsByTagName("mutation")[0].getAttribute("hashid");a==d?f.push(b):(g[a]||(g[a]= -[]),g[a].push(b))});f.map(function(a){e=Entry.Func.generateWsBlock(b,Blockly.Xml.workspaceToDom(Entry.Func.workspace),d).block;for(var c=[],f=!1;a.firstChild;){var g=a.firstChild,h=g.tagName;if(f||"NEXT"==h)f=!0,c.push(g);a.removeChild(g)}for(;e.firstChild;)a.appendChild(e.firstChild);for(;c.length;)a.appendChild(c.shift())});for(var h in g){var a=g[h],k=Entry.variableContainer.getFunction(h).content;a.map(function(a){e=Entry.Func.generateWsBlock(b,k,h).block;for(var c=[],d=!1;a.firstChild;){var f= -a.firstChild,g=f.tagName;if(d||"NEXT"==g)d=!0,c.push(f);a.removeChild(f)}for(;e.firstChild;)a.appendChild(e.firstChild);for(;c.length;)a.appendChild(c.shift())})}Entry.Func.workspace.clear();Blockly.Xml.domToWorkspace(Entry.Func.workspace,b)}};Entry.Func.prototype.edit=function(){Entry.Func.isEdit||(Entry.Func.isEdit=!0,Entry.Func.svg?this.parentView.appendChild(this.svg):Entry.Func.initEditView())}; -Entry.Func.generateBlock=function(a,b,c){b=Entry.nodeListToArray(b.childNodes);var d,e;for(e in b)"function_create"==b[e].getAttribute("type")&&(d=b[e]);e=new Entry.Script;e.init(d);d=e;d.values&&(d=e.values.FIELD);e='';c=b="";var f=0,g=0;a.stringHash={};for(a.booleanHash={};;){switch(d.type){case "function_field_label":e+='",">")+'">';c+=d.fields.NAME;break;case "function_field_boolean":var h= -d.values.PARAM.hashId;e+='';b+='';a.booleanHash[h]=g;g++;c+="\ub17c\ub9ac\uac12"+g;break;case "function_field_string":h=d.values.PARAM.hashId,e+='',b+='10',a.stringHash[h]=f,f++,c+="\ubb38\uc790\uac12"+f}if(d.values&&d.values.NEXT)d=d.values.NEXT;else break;c+=" "}a=Blockly.Xml.textToDom(''+ -(e+"")+b+"").childNodes[0];c||(c="\ud568\uc218");return{block:a,description:c}};Entry.Func.prototype.generateBlock=function(a){a=Entry.Func.generateBlock(this,this.content,this.id);this.block=a.block;this.description=a.description};Entry.Func.prototype.syncViewSize_=function(){var a=this.parentView.getBoundingClientRect();this.svg.style.width=a.width;this.svg.style.height=a.height}; -Entry.Func.generateButtons=function(){var a=this,b=Blockly.createSvgElement("g",{},this.svg);this.btnWrapper=b;var c=Blockly.createSvgElement("text",{x:"27",y:"33","class":"entryFunctionButtonText"},b),d=document.createTextNode(Lang.Buttons.save);c.appendChild(d);var d=Blockly.createSvgElement("text",{x:"102.5",y:"33","class":"entryFunctionButtonText"},b),e=document.createTextNode(Lang.Buttons.cancel);d.appendChild(e);e=Blockly.createSvgElement("circle",{cx:"27.5",cy:"27.5",r:"27.5","class":"entryFunctionButton"}, -b);b=Blockly.createSvgElement("circle",{cx:"102.5",cy:"27.5",r:"27.5","class":"entryFunctionButton"},b);e.onclick=function(b){a.save()};c.onclick=function(b){a.save()};b.onclick=function(b){a.cancelEdit()};d.onclick=function(b){a.cancelEdit()}}; -Entry.Func.position_=function(){var a=this.workspace.getMetrics();if(a&&this.workspace.visible){var b=this.btnWrapper;b.setAttribute("transform","translate(30, 501)");Blockly.RTL?this.left_=this.MARGIN_SIDE_:b.left_=a.viewWidth/2+a.absoluteLeft-60;b.top_=a.viewHeight+a.absoluteTop-200;b.setAttribute("transform","translate("+b.left_+","+b.top_+")")}}; -Entry.Func.positionBlock_=function(a){var b=this.workspace.getMetrics();if(b&&this.workspace.visible){var c=a.getSvgRoot(),c=Blockly.getSvgXY_(c);a.getHeightWidth();a.moveBy(b.viewWidth/2-80-c.x,b.viewHeight/2-50-c.y)}}; -Entry.Func.doWhenInit=function(){var a=this.svg;a.appendChild(Blockly.fieldKeydownDom);a.appendChild(Blockly.fieldDropdownDom);a.appendChild(Blockly.contextMenu);Blockly.bindEvent_(window,"resize",this,this.position_);Blockly.bindEvent_(a,"mousedown",null,Blockly.onMouseDown_);Blockly.bindEvent_(a,"contextmenu",null,Blockly.onContextMenu_)}; -Entry.Func.doWhenCancel=function(){Blockly.clipboard_=null;var a=Blockly.svg;a.appendChild(Blockly.fieldKeydownDom);a.appendChild(Blockly.fieldDropdownDom);a.appendChild(Blockly.contextMenu);Blockly.unbindEvent_(window,"resize",this,this.position_);Blockly.unbindEvent_(a,"mousedown",null,Blockly.onMouseDown_);Blockly.unbindEvent_(a,"contextmenu",null,Blockly.onContextMenu_)}; -Entry.Func.generateWsBlock=function(a,b,c){b=b.childNodes;var d,e;for(e in b)if("function_create"==b[e].getAttribute("type")){d=b[e];break}e=new Entry.Script;e.init(d);d=e;d.values&&(d=e.values.FIELD);e='';c=b="";var f=0,g=0;a.stringHash={};for(a.booleanHash={};;){switch(d.type){case "function_field_label":e+='",">")+'">';c+=d.fields.NAME;break;case "function_field_boolean":var h=d.values.PARAM.hashId; -e+='';b+='';a.booleanHash[h]=g;g++;c+="\ub17c\ub9ac\uac12"+g;break;case "function_field_string":h=d.values.PARAM.hashId,e+='',b+='',a.stringHash[h]=f,f++,c+="\ubb38\uc790\uac12"+f}if(d.values&&d.values.NEXT)d= -d.values.NEXT;else break;c+=" "}a=''+(e+"")+b+"";c||(c="\ud568\uc218");return{block:Blockly.Xml.textToDom(a).childNodes[0],description:c}};Entry.HWMontior={};Entry.HWMonitor=function(a){this.svgDom=Entry.Dom($(''));this._hwModule=a;var b=this;Entry.addEventListener("windowResized",function(){var a=b._hwModule.monitorTemplate.mode;"both"==a&&(b.resize(),b.resizeList());"list"==a?b.resizeList():b.resize()});Entry.addEventListener("hwModeChange",function(){b.changeMode()});this.changeOffset=0;this.scale=.5;this._listPortViews={}}; -(function(a){a.initView=function(){this.svgDom=Entry.Dom($(''))};a.generateView=function(){this.snap=Entry.SVG("hwMonitor");this._svgGroup=this.snap.elem("g");this._portMap={n:[],e:[],s:[],w:[]};var b=this._hwModule.monitorTemplate,a={href:Entry.mediaFilePath+b.imgPath,x:-b.width/2,y:-b.height/2,width:b.width,height:b.height};this._portViews={};this.hwView=this._svgGroup.elem("image");this.hwView= -this.hwView.attr(a);this._template=b;b=b.ports;this.pathGroup=null;this.pathGroup=this._svgGroup.elem("g");var a=[],d;for(d in b){var e=this.generatePortView(b[d],"_svgGroup");this._portViews[d]=e;a.push(e)}a.sort(function(b,a){return b.box.x-a.box.x});var f=this._portMap;a.map(function(b){(1>(Math.atan2(-b.box.y,b.box.x)/Math.PI+2)%2?f.n:f.s).push(b)});this.resize()};a.toggleMode=function(b){var a=this._hwModule.monitorTemplate;"list"==b?(a.TempPort=null,this._hwModule.monitorTemplate.ports&&(this._hwModule.monitorTemplate.TempPort= +Entry.checkCollisionRect=function(b,a){return!(b.y+b.heighta.y+a.height||b.x+b.widtha.x+a.width)};Entry.bindAnimationCallback=function(b,a){b.addEventListener("webkitAnimationEnd",a,!1);b.addEventListener("animationend",a,!1);b.addEventListener("oanimationend",a,!1)};Entry.cloneSimpleObject=function(b){var a={},c;for(c in b)a[c]=b[c];return a};Entry.nodeListToArray=function(b){for(var a=Array(b.length),c=-1,d=b.length;++c!==d;a[c]=b[c]);return a}; +Entry.computeInputWidth=function(b){var a=document.createElement("span");a.className="tmp-element";a.innerHTML=b.replace(/&/g,"&").replace(//g,">");document.body.appendChild(a);b=a.offsetWidth;document.body.removeChild(a);return Number(b+10)+"px"};Entry.isArrowOrBackspace=function(b){return-1<[37,38,39,40,8].indexOf(b)};Entry.hexStringToBin=function(b){for(var a=[],c=0;cd&&(d=h.index)}return 0a&&(a=e))}return Math.min(a,20)};Entry.convertToRoundedDecimals=function(b,a){return isNaN(b)||!this.isFloat(b)?b:Number(Math.round(b+"e"+a)+"e-"+a)};Entry.attachEventListener=function(b,a,c){setTimeout(function(){b.addEventListener(a,c)},0)};Entry.deAttachEventListener=function(b,a,c){b.removeEventListener(a,c)}; +Entry.isEmpty=function(b){if(!b)return!0;for(var a in b)if(b.hasOwnProperty(a))return!1;return!0};Entry.Utils.disableContextmenu=function(b){if(b)$(b).on("contextmenu",function(a){a.stopPropagation();a.preventDefault();return!1})};Entry.Utils.isRightButton=function(b){return 2==b.button||b.ctrlKey};Entry.Utils.isTouchEvent=function(b){return"mousedown"!==b.type.toLowerCase()};Entry.Utils.inherit=function(b,a){function c(){}c.prototype=b.prototype;a.prototype=new c;return a}; +Entry.bindAnimationCallbackOnce=function(b,a){b.one("webkitAnimationEnd animationendo animationend",a)};Entry.Utils.isInInput=function(b){return"textarea"==b.target.type||"text"==b.target.type};Entry.Utils.isFunction=function(b){return"function"===typeof b}; +Entry.Utils.addFilters=function(b,a){var c=b.elem("defs"),d=c.elem("filter",{id:"entryTrashcanFilter_"+a});d.elem("feGaussianBlur",{"in":"SourceAlpha",stdDeviation:2,result:"blur"});d.elem("feOffset",{"in":"blur",dx:1,dy:1,result:"offsetBlur"});d=d.elem("feMerge");d.elem("feMergeNode",{"in":"offsetBlur"});d.elem("feMergeNode",{"in":"SourceGraphic"},d);d=c.elem("filter",{id:"entryBlockShadowFilter_"+a,height:"200%"});d.elem("feOffset",{result:"offOut",in:"SourceGraphic",dx:0,dy:1});d.elem("feColorMatrix", +{result:"matrixOut",in:"offOut",type:"matrix",values:"0.7 0 0 0 0 0 0.7 0 0 0 0 0 0.7 0 0 0 0 0 1 0"});d.elem("feBlend",{in:"SourceGraphic",in1:"offOut",mode:"normal"});c=c.elem("filter",{id:"entryBlockHighlightFilter_"+a});c.elem("feOffset",{result:"offOut",in:"SourceGraphic",dx:0,dy:0});c.elem("feColorMatrix",{result:"matrixOut",in:"offOut",type:"matrix",values:"1.3 0 0 0 0 0 1.3 0 0 0 0 0 1.3 0 0 0 0 0 1 0"})}; +Entry.Utils.addBlockPattern=function(b,a){for(var c=b.elem("pattern",{id:"blockHoverPattern_"+a,class:"blockHoverPattern",patternUnits:"userSpaceOnUse",patternTransform:"translate(12, 0)",x:0,y:0,width:125,height:33}).elem("g"),d=c.elem("rect",{x:0,y:0,width:125,height:33}),e=Entry.mediaFilePath+"block_pattern_(order).png",f=1;5>f;f++)c.elem("image",{class:"pattern"+f,href:e.replace("(order)",f),x:0,y:0,width:125,height:33});return d};Entry.Utils.COLLISION={NONE:0,UP:1,RIGHT:2,LEFT:3,DOWN:4}; +Entry.Utils.createMouseEvent=function(b,a){var c=document.createEvent("MouseEvent");c.initMouseEvent(b,!0,!0,window,0,0,0,a.clientX,a.clientY,!1,!1,!1,!1,0,null);return c};Entry.Model=function(b,a){var c=Entry.Model;c.generateSchema(b);c.generateSetter(b);c.generateObserve(b);(void 0===a||a)&&Object.seal(b);return b}; +(function(b){b.generateSchema=function(a){var b=a.schema;if(void 0!==b){b=JSON.parse(JSON.stringify(b));a.data={};for(var d in b)(function(d){a.data[d]=b[d];Object.defineProperty(a,d,{get:function(){return a.data[d]}})})(d);a._toJSON=this._toJSON}};b.generateSetter=function(a){a.set=this.set};b.set=function(a,b){var d={},e;for(e in this.data)void 0!==a[e]&&(a[e]===this.data[e]?delete a[e]:(d[e]=this.data[e],this.data[e]=a[e]instanceof Array?a[e].concat():a[e]));b||this.notify(Object.keys(a),d)};b.generateObserve= +function(a){a.observers=[];a.observe=this.observe;a.unobserve=this.unobserve;a.notify=this.notify};b.observe=function(a,b,d,e){d=new Entry.Observer(this.observers,a,b,d);if(!1!==e)a[b]([]);return d};b.unobserve=function(a){a.destroy()};b.notify=function(a,b){"string"===typeof a&&(a=[a]);var d=this;d.observers.map(function(e){var f=a;void 0!==e.attrs&&(f=Entry.Utils.intersectArray(e.attrs,a));if(f.length)e.object[e.funcName](f.map(function(a){return{name:a,object:d,oldValue:b[a]}}))})};b._toJSON=function(){var a= +{},b;for(b in this.data)a[b]=this.data[b];return a}})(Entry.Model);Entry.Func=function(b){this.id=b?b.id:Entry.generateHash();this.content=b?new Entry.Code(b.content):new Entry.Code([[{type:"function_create",deletable:!1,x:40,y:40}]]);this.block=null;this.hashMap={};this.paramMap={};var a=function(){};a.prototype=Entry.block.function_general;a=new a;a.changeEvent=new Entry.Event;a.template=Lang.template.function_general;Entry.block["func_"+this.id]=a;if(b){b=this.content._blockMap;for(var c in b)Entry.Func.registerParamBlock(b[c].type);Entry.Func.generateWsBlock(this)}Entry.Func.registerFunction(this); +Entry.Func.updateMenu()};Entry.Func.threads={};Entry.Func.registerFunction=function(b){var a=Entry.playground.mainWorkspace;a&&(this._targetFuncBlock=a.getBlockMenu().getCategoryCodes("func").createThread([{type:"func_"+b.id}]))};Entry.Func.executeFunction=function(b){var a=this.threads[b];if(a=Entry.Engine.computeThread(a.entity,a))return this.threads[b]=a,!0;delete this.threads[b];return!1};Entry.Func.clearThreads=function(){this.threads={}}; +Entry.Func.prototype.init=function(b){this.id=b.id;this.content=Blockly.Xml.textToDom(b.content);this.block=Blockly.Xml.textToDom(""+b.block+"").childNodes[0]};Entry.Func.edit=function(b){this.cancelEdit();this.targetFunc=b;this.initEditView(b.content);this.bindFuncChangeEvent();this.updateMenu()}; +Entry.Func.initEditView=function(b){this.menuCode||this.setupMenuCode();var a=Entry.playground.mainWorkspace;a.setMode(Entry.Workspace.MODE_OVERLAYBOARD);a.changeOverlayBoardCode(b);this._workspaceStateEvent=a.changeEvent.attach(this,this.endEdit)};Entry.Func.endEdit=function(b){this.unbindFuncChangeEvent();this._workspaceStateEvent.destroy();delete this._workspaceStateEvent;switch(b){case "save":this.save();case "cancelEdit":this.cancelEdit()}}; +Entry.Func.save=function(){this.targetFunc.generateBlock(!0);Entry.variableContainer.saveFunction(this.targetFunc)}; +Entry.Func.syncFuncName=function(b){var a=0,c=[],c=b.split(" "),d="";b=[];b=Blockly.mainWorkspace.getAllBlocks();for(var e=0;eBlockly.Block.dragMode_&&(b.updateMenu(),b.fieldText=a,b.workspaceLength=c)}}; +Entry.Func.setupMenuCode=function(){var b=Entry.playground.mainWorkspace;b&&(b=b.getBlockMenu().getCategoryCodes("func"),this._fieldLabel=b.createThread([{type:"function_field_label"}]).getFirstBlock(),this._fieldString=b.createThread([{type:"function_field_string",params:[{type:this.requestParamBlock("string")}]}]).getFirstBlock(),this._fieldBoolean=b.createThread([{type:"function_field_boolean",params:[{type:this.requestParamBlock("boolean")}]}]).getFirstBlock(),this.menuCode=b)}; +Entry.Func.refreshMenuCode=function(){if(Entry.playground.mainWorkspace){this.menuCode||this.setupMenuCode();var b=Entry.block[this._fieldString.params[0].type].changeEvent._listeners.length;2'));this._hwModule=b;var a=this;Entry.addEventListener("windowResized",function(){var b=a._hwModule.monitorTemplate.mode;"both"==b&&(a.resize(),a.resizeList());"list"==b?a.resizeList():a.resize()});Entry.addEventListener("hwModeChange",function(){a.changeMode()});this.changeOffset=0;this.scale=.5;this._listPortViews={}}; +(function(b){b.initView=function(){this.svgDom=Entry.Dom($(''))};b.generateView=function(){this.snap=Entry.SVG("hwMonitor");this._svgGroup=this.snap.elem("g");this._portMap={n:[],e:[],s:[],w:[]};var a=this._hwModule.monitorTemplate,b={href:Entry.mediaFilePath+a.imgPath,x:-a.width/2,y:-a.height/2,width:a.width,height:a.height};this._portViews={};this.hwView=this._svgGroup.elem("image");this.hwView= +this.hwView.attr(b);this._template=a;a=a.ports;this.pathGroup=null;this.pathGroup=this._svgGroup.elem("g");var b=[],d;for(d in a){var e=this.generatePortView(a[d],"_svgGroup");this._portViews[d]=e;b.push(e)}b.sort(function(a,b){return a.box.x-b.box.x});var f=this._portMap;b.map(function(a){(1>(Math.atan2(-a.box.y,a.box.x)/Math.PI+2)%2?f.n:f.s).push(a)});this.resize()};b.toggleMode=function(a){var b=this._hwModule.monitorTemplate;"list"==a?(b.TempPort=null,this._hwModule.monitorTemplate.ports&&(this._hwModule.monitorTemplate.TempPort= this._hwModule.monitorTemplate.ports,this._hwModule.monitorTemplate.listPorts=this.addPortEle(this._hwModule.monitorTemplate.listPorts,this._hwModule.monitorTemplate.ports)),$(this._svglistGroup).remove(),this._svgGroup&&$(this._svgGroup).remove(),$(this._pathGroup).remove(),this._hwModule.monitorTemplate.mode="list",this.generateListView()):(this._hwModule.monitorTemplate.TempPort&&(this._hwModule.monitorTemplate.ports=this._hwModule.monitorTemplate.TempPort,this._hwModule.monitorTemplate.listPorts= -this.removePortEle(this._hwModule.monitorTemplate.listPorts,this._hwModule.monitorTemplate.ports)),$(this._svglistGroup).remove(),this._hwModule.monitorTemplate.mode="both",this.generateListView(),this.generateView())};a.setHwmonitor=function(b){this._hwmodule=b};a.changeMode=function(b){"both"==this._hwModule.monitorTemplate.mode?this.toggleMode("list"):"list"==this._hwModule.monitorTemplate.mode&&this.toggleMode("both")};a.addPortEle=function(b,a){if("object"!=typeof a)return b;for(var d in a)b[d]= -a[d];return b};a.removePortEle=function(b,a){if("object"!=typeof a)return b;for(var d in a)delete b[d];return b};a.generateListView=function(){this._portMapList={n:[]};this._svglistGroup=null;this.listsnap=Entry.SVG("hwMonitor");this._svglistGroup=this.listsnap.elem("g");var b=this._hwModule.monitorTemplate;this._template=b;b=b.listPorts;this.pathGroup=this._svglistGroup.elem("g");var a=[],d;for(d in b){var e=this.generatePortView(b[d],"_svglistGroup");this._listPortViews[d]=e;a.push(e)}var f=this._portMapList; -a.map(function(b){f.n.push(b)});this.resizeList()};a.generatePortView=function(b,a){var d=this[a].elem("g");d.addClass("hwComponent");var e=null,e=this.pathGroup.elem("path").attr({d:"m0,0",fill:"none",stroke:"input"===b.type?"#00979d":"#A751E3","stroke-width":3}),f=d.elem("rect").attr({x:0,y:0,width:150,height:22,rx:4,ry:4,fill:"#fff",stroke:"#a0a1a1"}),g=d.elem("text").attr({x:4,y:12,fill:"#000","class":"hwComponentName","alignment-baseline":"central"});g.textContent=b.name;g=g.getComputedTextLength(); -d.elem("rect").attr({x:g+8,y:2,width:30,height:18,rx:9,ry:9,fill:"input"===b.type?"#00979d":"#A751E3"});var h=d.elem("text").attr({x:g+13,y:12,fill:"#fff","class":"hwComponentValue","alignment-baseline":"central"});h.textContent=0;g+=40;f.attr({width:g});return{group:d,value:h,type:b.type,path:e,box:{x:b.pos.x-this._template.width/2,y:b.pos.y-this._template.height/2,width:g},width:g}};a.getView=function(){return this.svgDom};a.update=function(){var b=Entry.hw.portData,a=Entry.hw.sendQueue,d=this._hwModule.monitorTemplate.mode, -e=[];if("list"==d)e=this._listPortViews;else if("both"==d){if(e=this._listPortViews,this._portViews)for(var f in this._portViews)e[f]=this._portViews[f]}else e=this._portViews;if(a)for(f in a)0!=a[f]&&e[f]&&(e[f].type="output");for(var g in e)d=e[g],"input"==d.type?(f=b[g],d.value.textContent=f?f:0,d.group.getElementsByTagName("rect")[1].attr({fill:"#00979D"})):(f=a[g],d.value.textContent=f?f:0,d.group.getElementsByTagName("rect")[1].attr({fill:"#A751E3"}))};a.resize=function(){this.hwView&&this.hwView.attr({transform:"scale("+ -this.scale+")"});if(this.svgDom)var b=this.svgDom.get(0).getBoundingClientRect();this._svgGroup.attr({transform:"translate("+b.width/2+","+b.height/1.8+")"});this._rect=b;0>=this._template.height||0>=b.height||(this.scale=b.height/this._template.height*this._template.height/1E3,this.align())};a.resizeList=function(){var b=this.svgDom.get(0).getBoundingClientRect();this._svglistGroup.attr({transform:"translate("+b.width/2+","+b.height/2+")"});this._rect=b;this.alignList()};a.align=function(){var b= -[],b=this._portMap.s.concat();this._alignNS(b,this.scale/3*this._template.height+5,27);b=this._portMap.n.concat();this._alignNS(b,-this._template.height*this.scale/3-32,-27);b=this._portMap.e.concat();this._alignEW(b,-this._template.width*this.scale/3-5,-27);b=this._portMap.w.concat();this._alignEW(b,this._template.width*this.scale/3-32,-27)};a.alignList=function(){for(var b={},b=this._hwModule.monitorTemplate.listPorts,a=b.length,d=0;dd-(l.width+q.width/2.2)&&(f+=1,initX=h,g=0)};a._movePort=function(b,a,d,e){var f=a,g=b.box.x*this.scale,h=b.box.y*this.scale;a>e?(f=a-b.width,a=a>g&&g>e?"M"+g+","+d+"L"+g+","+h:"M"+(a+e)/2+","+d+"l0,"+(h>d?28:-3)+"H"+g+"L"+g+","+h):a=ad?28:-3)+"H"+g+"L"+g+","+h;b.group.attr({transform:"translate("+f+","+d+")"}); -b.path.attr({d:a})}})(Entry.HWMonitor.prototype);Entry.HW=function(){this.connectTrial=0;this.isFirstConnect=!0;this.initSocket();this.connected=!1;this.portData={};this.sendQueue={};this.outputQueue={};this.settingQueue={};this.socketType=this.hwModule=this.selectedDevice=null;Entry.addEventListener("stop",this.setZero);this.hwInfo={11:Entry.Arduino,12:Entry.SensorBoard,13:Entry.CODEino,15:Entry.dplay,16:Entry.nemoino,17:Entry.Xbot,24:Entry.Hamster,25:Entry.Albert,31:Entry.Bitbrick,42:Entry.Arduino,51:Entry.Neobot,71:Entry.Robotis_carCont,72:Entry.Robotis_openCM70}}; +this.removePortEle(this._hwModule.monitorTemplate.listPorts,this._hwModule.monitorTemplate.ports)),$(this._svglistGroup).remove(),this._hwModule.monitorTemplate.mode="both",this.generateListView(),this.generateView())};b.setHwmonitor=function(a){this._hwmodule=a};b.changeMode=function(a){"both"==this._hwModule.monitorTemplate.mode?this.toggleMode("list"):"list"==this._hwModule.monitorTemplate.mode&&this.toggleMode("both")};b.addPortEle=function(a,b){if("object"!=typeof b)return a;for(var d in b)a[d]= +b[d];return a};b.removePortEle=function(a,b){if("object"!=typeof b)return a;for(var d in b)delete a[d];return a};b.generateListView=function(){this._portMapList={n:[]};this._svglistGroup=null;this.listsnap=Entry.SVG("hwMonitor");this._svglistGroup=this.listsnap.elem("g");var a=this._hwModule.monitorTemplate;this._template=a;a=a.listPorts;this.pathGroup=this._svglistGroup.elem("g");var b=[],d;for(d in a){var e=this.generatePortView(a[d],"_svglistGroup");this._listPortViews[d]=e;b.push(e)}var f=this._portMapList; +b.map(function(a){f.n.push(a)});this.resizeList()};b.generatePortView=function(a,b){var d=this[b].elem("g");d.addClass("hwComponent");var e=null,e=this.pathGroup.elem("path").attr({d:"m0,0",fill:"none",stroke:"input"===a.type?"#00979d":"#A751E3","stroke-width":3}),f=d.elem("rect").attr({x:0,y:0,width:150,height:22,rx:4,ry:4,fill:"#fff",stroke:"#a0a1a1"}),g=d.elem("text").attr({x:4,y:12,fill:"#000","class":"hwComponentName","alignment-baseline":"central"});g.textContent=a.name;g=g.getComputedTextLength(); +d.elem("rect").attr({x:g+8,y:2,width:30,height:18,rx:9,ry:9,fill:"input"===a.type?"#00979d":"#A751E3"});var h=d.elem("text").attr({x:g+13,y:12,fill:"#fff","class":"hwComponentValue","alignment-baseline":"central"});h.textContent=0;g+=40;f.attr({width:g});return{group:d,value:h,type:a.type,path:e,box:{x:a.pos.x-this._template.width/2,y:a.pos.y-this._template.height/2,width:g},width:g}};b.getView=function(){return this.svgDom};b.update=function(){var a=Entry.hw.portData,b=Entry.hw.sendQueue,d=this._hwModule.monitorTemplate.mode, +e=[];if("list"==d)e=this._listPortViews;else if("both"==d){if(e=this._listPortViews,this._portViews)for(var f in this._portViews)e[f]=this._portViews[f]}else e=this._portViews;if(b)for(f in b)0!=b[f]&&e[f]&&(e[f].type="output");for(var g in e)d=e[g],"input"==d.type?(f=a[g],d.value.textContent=f?f:0,d.group.getElementsByTagName("rect")[1].attr({fill:"#00979D"})):(f=b[g],d.value.textContent=f?f:0,d.group.getElementsByTagName("rect")[1].attr({fill:"#A751E3"}))};b.resize=function(){this.hwView&&this.hwView.attr({transform:"scale("+ +this.scale+")"});if(this.svgDom)var a=this.svgDom.get(0).getBoundingClientRect();this._svgGroup.attr({transform:"translate("+a.width/2+","+a.height/1.8+")"});this._rect=a;0>=this._template.height||0>=a.height||(this.scale=a.height/this._template.height*this._template.height/1E3,this.align())};b.resizeList=function(){var a=this.svgDom.get(0).getBoundingClientRect();this._svglistGroup.attr({transform:"translate("+a.width/2+","+a.height/2+")"});this._rect=a;this.alignList()};b.align=function(){var a= +[],a=this._portMap.s.concat();this._alignNS(a,this.scale/3*this._template.height+5,27);a=this._portMap.n.concat();this._alignNS(a,-this._template.height*this.scale/3-32,-27);a=this._portMap.e.concat();this._alignEW(a,-this._template.width*this.scale/3-5,-27);a=this._portMap.w.concat();this._alignEW(a,this._template.width*this.scale/3-32,-27)};b.alignList=function(){for(var a={},a=this._hwModule.monitorTemplate.listPorts,b=a.length,d=0;dd-(l.width+n.width/2.2)&&(f+=1,initX=h,g=0)};b._movePort=function(a,b,d,e){var f=b,g=a.box.x*this.scale,h=a.box.y*this.scale;b>e?(f=b-a.width,b=b>g&&g>e?"M"+g+","+d+"L"+g+","+h:"M"+(b+e)/2+","+d+"l0,"+(h>d?28:-3)+"H"+g+"L"+g+","+h):b=bd?28:-3)+"H"+g+"L"+g+","+h;a.group.attr({transform:"translate("+f+","+d+")"}); +a.path.attr({d:b})}})(Entry.HWMonitor.prototype);Entry.HW=function(){this.connectTrial=0;this.isFirstConnect=!0;this.initSocket();this.connected=!1;this.portData={};this.sendQueue={};this.outputQueue={};this.settingQueue={};this.socketType=this.hwModule=this.selectedDevice=null;Entry.addEventListener("stop",this.setZero);this.hwInfo={11:Entry.Arduino,12:Entry.SensorBoard,13:Entry.CODEino,15:Entry.dplay,16:Entry.nemoino,17:Entry.Xbot,24:Entry.Hamster,25:Entry.Albert,31:Entry.Bitbrick,42:Entry.Arduino,51:Entry.Neobot,71:Entry.Robotis_carCont,72:Entry.Robotis_openCM70}}; Entry.HW.TRIAL_LIMIT=1;p=Entry.HW.prototype; -p.initSocket=function(){try{if(this.connectTrial>=Entry.HW.TRIAL_LIMIT)this.isFirstConnect||Entry.toast.alert(Lang.Menus.connect_hw,Lang.Menus.connect_fail,!1),this.isFirstConnect=!1;else{var a=this,b,c;if(-1=a+f?c.setSlideCommandX(0,!0):a+f>c.maxWidth+10?c.setSlideCommandX(c.maxWidth,!0):(this.offsetX=-(this.x-.75*b.stageX+240),c.setSlideCommandX(a))}});this.valueSetter_.on("pressup",function(b){c.isAdjusting=!1;delete c.viewValue_}); -this.view_.addChild(this.valueSetter_);b=Entry.variableContainer.variables_.length;this.getX()&&this.getY()?(this.setX(this.getX()),this.setY(this.getY())):(this.setX(-230+80*Math.floor(b/11)),this.setY(24*a+20-135-264*Math.floor(b/11)))}else this.view_=new createjs.Container,this.rect_=new createjs.Shape,this.view_.addChild(this.rect_),this.view_.variable=this,this.titleView_=new createjs.Text("asdf",this.FONT,"#000"),this.titleView_.textBaseline="alphabetic",this.titleView_.textAlign="center",this.titleView_.width= -this.width_-2*this.BORDER,this.titleView_.y=this.BORDER+10,this.titleView_.x=this.width_/2,this.view_.addChild(this.titleView_),this.resizeHandle_=new createjs.Shape,this.resizeHandle_.graphics.f("#1bafea").ss(1,0,0).s("#1bafea").lt(0,-9).lt(-9,0).lt(0,0),this.view_.addChild(this.resizeHandle_),this.resizeHandle_.list=this,this.resizeHandle_.on("mouseover",function(b){this.cursor="nwse-resize"}),this.resizeHandle_.on("mousedown",function(b){this.list.isResizing=!0;this.offset={x:.75*b.stageX-this.list.getWidth(), -y:.75*b.stageY-this.list.getHeight()};this.parent.cursor="nwse-resize"}),this.resizeHandle_.on("pressmove",function(b){this.list.setWidth(.75*b.stageX-this.offset.x);this.list.setHeight(.75*b.stageY-this.offset.y);this.list.updateView()}),this.view_.on("mouseover",function(b){this.cursor="move"}),this.view_.on("mousedown",function(b){"workspace"!=Entry.type||this.variable.isResizing||(this.offset={x:this.x-(.75*b.stageX-240),y:this.y-(.75*b.stageY-135)},this.cursor="move")}),this.view_.on("pressup", -function(b){this.cursor="initial";this.variable.isResizing=!1}),this.view_.on("pressmove",function(b){"workspace"!=Entry.type||this.variable.isResizing||(this.variable.setX(.75*b.stageX-240+this.offset.x),this.variable.setY(.75*b.stageY-135+this.offset.y),this.variable.updateView())}),this.elementView=new createjs.Container,b=new createjs.Text("asdf",this.FONT,"#000"),b.textBaseline="middle",b.y=5,this.elementView.addChild(b),this.elementView.indexView=b,b=new createjs.Shape,this.elementView.addChild(b), -this.elementView.valueWrapper=b,b=new createjs.Text("fdsa",this.FONT,"#eee"),b.x=24,b.y=6,b.textBaseline="middle",this.elementView.addChild(b),this.elementView.valueView=b,this.elementView.x=this.BORDER,this.scrollButton_=new createjs.Shape,this.scrollButton_.graphics.f("#aaa").rr(0,0,7,30,3.5),this.view_.addChild(this.scrollButton_),this.scrollButton_.y=23,this.scrollButton_.list=this,this.scrollButton_.on("mousedown",function(b){this.list.isResizing=!0;this.cursor="pointer";this.offsetY=isNaN(this.offsetY)|| -0>this.offsetY?b.rawY/2:this.offsetY}),this.scrollButton_.on("pressmove",function(b){void 0===this.moveAmount?(this.y=b.target.y,this.moveAmount=!0):this.y=b.rawY/2-this.offsetY+this.list.height_/100*23;23>this.y&&(this.y=23);this.y>this.list.getHeight()-40&&(this.y=this.list.getHeight()-40);this.list.updateView()}),this.scrollButton_.on("pressup",function(b){this.moveAmount=void 0}),this.getX()&&this.getY()?(this.setX(this.getX()),this.setY(this.getY())):(b=Entry.variableContainer.lists_.length, -this.setX(110*-Math.floor(b/6)+120),this.setY(24*a+20-135-145*Math.floor(b/6)));this.setVisible(this.isVisible());this.updateView();Entry.stage.loadVariable(this)}; -Entry.Variable.prototype.updateView=function(){if(this.view_&&this.isVisible())if("variable"==this.type){this.view_.x=this.getX();this.view_.y=this.getY();if(this.object_){var a=Entry.container.getObject(this.object_);this.textView_.text=a?a.name+":"+this.getName():this.getName()}else this.textView_.text=this.getName();this.valueView_.x=this.textView_.getMeasuredWidth()+14;this.valueView_.y=1;this.isNumber()?this.valueView_.text=this.getValue().toFixed(2).replace(".00",""):this.valueView_.text=this.getValue(); -this.rect_.graphics.clear().f("#ffffff").ss(1,2,0).s("#A0A1A1").rc(0,-14,this.textView_.getMeasuredWidth()+this.valueView_.getMeasuredWidth()+26,20,4,4,4,4);this.wrapper_.graphics.clear().f("#1bafea").ss(1,2,0).s("#1bafea").rc(this.textView_.getMeasuredWidth()+7,-11,this.valueView_.getMeasuredWidth()+15,14,7,7,7,7)}else if("slide"==this.type)this.view_.x=this.getX(),this.view_.y=this.getY(),this.object_?(a=Entry.container.getObject(this.object_),this.textView_.text=a?a.name+":"+this.getName():this.getName()): -this.textView_.text=this.getName(),this.valueView_.x=this.textView_.getMeasuredWidth()+14,this.valueView_.y=1,this.isNumber()?this.valueView_.text=this.getValue().toFixed(2).replace(".00",""):this.valueView_.text=this.getValue(),a=this.textView_.getMeasuredWidth()+this.valueView_.getMeasuredWidth()+26,a=Math.max(a,90),this.rect_.graphics.clear().f("#ffffff").ss(1,2,0).s("#A0A1A1").rc(0,-14,a,33,4,4,4,4),this.wrapper_.graphics.clear().f("#1bafea").ss(1,2,0).s("#1bafea").rc(this.textView_.getMeasuredWidth()+ -7,-11,this.valueView_.getMeasuredWidth()+15,14,7,7,7,7),a=this.textView_.getMeasuredWidth()+this.valueView_.getMeasuredWidth()+26,a=Math.max(a,90),this.maxWidth=a-20,this.slideBar_.graphics.clear().beginFill("#A0A1A1").s("#A0A1A1").ss(1).dr(10,10,this.maxWidth,1.5),a=this.getSlidePosition(this.maxWidth),this.valueSetter_.graphics.clear().beginFill("#1bafea").s("#A0A1A1").ss(1).dc(a,10.5,3);else if("list"==this.type){this.view_.x=this.getX();this.view_.y=this.getY();this.resizeHandle_.x=this.width_- -2;this.resizeHandle_.y=this.height_-2;var b=this.getName();this.object_&&(a=Entry.container.getObject(this.object_))&&(b=a.name+":"+b);b=7this.getHeight()-40&& -(this.scrollButton_.y=this.getHeight()-40),this.elementView.valueWrapper.graphics.clear().f("#1bafea").rr(20,-2,this.getWidth()-20-10-2*this.BORDER,17,2),this.scrollButton_.visible=!0,this.scrollButton_.x=this.getWidth()-12,this.scrollPosition=Math.floor((this.scrollButton_.y-23)/(this.getHeight()-23-40)*(this.array_.length-a))):(this.elementView.valueWrapper.graphics.clear().f("#1bafea").rr(20,-2,this.getWidth()-20-2*this.BORDER,17,2),this.scrollButton_.visible=!1,this.scrollPosition=0);for(b=this.scrollPosition;b< -this.scrollPosition+a&&bc.length?c+"..":c;this.elementView.valueView.text=c;c=this.elementView.clone(!0);c.y=20*(b-this.scrollPosition)+23;this.view_.addChild(c)}}else"answer"==this.type?(this.view_.x=this.getX(),this.view_.y=this.getY(),this.textView_.text=this.getName(),this.valueView_.x=this.textView_.getMeasuredWidth()+ +p.initSocket=function(){try{if(this.connectTrial>=Entry.HW.TRIAL_LIMIT)this.isFirstConnect||Entry.toast.alert(Lang.Menus.connect_hw,Lang.Menus.connect_fail,!1),this.isFirstConnect=!1;else{var b=this,a,c;if(-1=b+f?c.setSlideCommandX(0,!0):b+f>c.maxWidth+10?c.setSlideCommandX(c.maxWidth,!0):(this.offsetX=-(this.x-.75*a.stageX+240),c.setSlideCommandX(b))}});this.valueSetter_.on("pressup",function(a){c.isAdjusting=!1;delete c.viewValue_}); +this.view_.addChild(this.valueSetter_);a=Entry.variableContainer.variables_.length;this.getX()&&this.getY()?(this.setX(this.getX()),this.setY(this.getY())):(this.setX(-230+80*Math.floor(a/11)),this.setY(24*b+20-135-264*Math.floor(a/11)))}else this.view_=new createjs.Container,this.rect_=new createjs.Shape,this.view_.addChild(this.rect_),this.view_.variable=this,this.titleView_=new createjs.Text("asdf",this.FONT,"#000"),this.titleView_.textBaseline="alphabetic",this.titleView_.textAlign="center",this.titleView_.width= +this.width_-2*this.BORDER,this.titleView_.y=this.BORDER+10,this.titleView_.x=this.width_/2,this.view_.addChild(this.titleView_),this.resizeHandle_=new createjs.Shape,this.resizeHandle_.graphics.f("#1bafea").ss(1,0,0).s("#1bafea").lt(0,-9).lt(-9,0).lt(0,0),this.view_.addChild(this.resizeHandle_),this.resizeHandle_.list=this,this.resizeHandle_.on("mouseover",function(a){this.cursor="nwse-resize"}),this.resizeHandle_.on("mousedown",function(a){this.list.isResizing=!0;this.offset={x:.75*a.stageX-this.list.getWidth(), +y:.75*a.stageY-this.list.getHeight()};this.parent.cursor="nwse-resize"}),this.resizeHandle_.on("pressmove",function(a){this.list.setWidth(.75*a.stageX-this.offset.x);this.list.setHeight(.75*a.stageY-this.offset.y);this.list.updateView()}),this.view_.on("mouseover",function(a){this.cursor="move"}),this.view_.on("mousedown",function(a){"workspace"!=Entry.type||this.variable.isResizing||(this.offset={x:this.x-(.75*a.stageX-240),y:this.y-(.75*a.stageY-135)},this.cursor="move")}),this.view_.on("pressup", +function(a){this.cursor="initial";this.variable.isResizing=!1}),this.view_.on("pressmove",function(a){"workspace"!=Entry.type||this.variable.isResizing||(this.variable.setX(.75*a.stageX-240+this.offset.x),this.variable.setY(.75*a.stageY-135+this.offset.y),this.variable.updateView())}),this.elementView=new createjs.Container,a=new createjs.Text("asdf",this.FONT,"#000"),a.textBaseline="middle",a.y=5,this.elementView.addChild(a),this.elementView.indexView=a,a=new createjs.Shape,this.elementView.addChild(a), +this.elementView.valueWrapper=a,a=new createjs.Text("fdsa",this.FONT,"#eee"),a.x=24,a.y=6,a.textBaseline="middle",this.elementView.addChild(a),this.elementView.valueView=a,this.elementView.x=this.BORDER,this.scrollButton_=new createjs.Shape,this.scrollButton_.graphics.f("#aaa").rr(0,0,7,30,3.5),this.view_.addChild(this.scrollButton_),this.scrollButton_.y=23,this.scrollButton_.list=this,this.scrollButton_.on("mousedown",function(a){this.list.isResizing=!0;this.cursor="pointer";this.offsetY=isNaN(this.offsetY)|| +0>this.offsetY?a.rawY/2:this.offsetY}),this.scrollButton_.on("pressmove",function(a){void 0===this.moveAmount?(this.y=a.target.y,this.moveAmount=!0):this.y=a.rawY/2-this.offsetY+this.list.height_/100*23;23>this.y&&(this.y=23);this.y>this.list.getHeight()-40&&(this.y=this.list.getHeight()-40);this.list.updateView()}),this.scrollButton_.on("pressup",function(a){this.moveAmount=void 0}),this.getX()&&this.getY()?(this.setX(this.getX()),this.setY(this.getY())):(a=Entry.variableContainer.lists_.length, +this.setX(110*-Math.floor(a/6)+120),this.setY(24*b+20-135-145*Math.floor(a/6)));this.setVisible(this.isVisible());this.updateView();Entry.stage.loadVariable(this)}; +Entry.Variable.prototype.updateView=function(){if(this.view_&&this.isVisible())if("variable"==this.type){this.view_.x=this.getX();this.view_.y=this.getY();if(this.object_){var b=Entry.container.getObject(this.object_);this.textView_.text=b?b.name+":"+this.getName():this.getName()}else this.textView_.text=this.getName();this.valueView_.x=this.textView_.getMeasuredWidth()+14;this.valueView_.y=1;this.isNumber()?this.valueView_.text=this.getValue().toFixed(2).replace(".00",""):this.valueView_.text=this.getValue(); +this.rect_.graphics.clear().f("#ffffff").ss(1,2,0).s("#A0A1A1").rc(0,-14,this.textView_.getMeasuredWidth()+this.valueView_.getMeasuredWidth()+26,20,4,4,4,4);this.wrapper_.graphics.clear().f("#1bafea").ss(1,2,0).s("#1bafea").rc(this.textView_.getMeasuredWidth()+7,-11,this.valueView_.getMeasuredWidth()+15,14,7,7,7,7)}else if("slide"==this.type)this.view_.x=this.getX(),this.view_.y=this.getY(),this.object_?(b=Entry.container.getObject(this.object_),this.textView_.text=b?b.name+":"+this.getName():this.getName()): +this.textView_.text=this.getName(),this.valueView_.x=this.textView_.getMeasuredWidth()+14,this.valueView_.y=1,this.isNumber()?this.valueView_.text=this.getValue().toFixed(2).replace(".00",""):this.valueView_.text=this.getValue(),b=this.textView_.getMeasuredWidth()+this.valueView_.getMeasuredWidth()+26,b=Math.max(b,90),this.rect_.graphics.clear().f("#ffffff").ss(1,2,0).s("#A0A1A1").rc(0,-14,b,33,4,4,4,4),this.wrapper_.graphics.clear().f("#1bafea").ss(1,2,0).s("#1bafea").rc(this.textView_.getMeasuredWidth()+ +7,-11,this.valueView_.getMeasuredWidth()+15,14,7,7,7,7),b=this.textView_.getMeasuredWidth()+this.valueView_.getMeasuredWidth()+26,b=Math.max(b,90),this.maxWidth=b-20,this.slideBar_.graphics.clear().beginFill("#A0A1A1").s("#A0A1A1").ss(1).dr(10,10,this.maxWidth,1.5),b=this.getSlidePosition(this.maxWidth),this.valueSetter_.graphics.clear().beginFill("#1bafea").s("#A0A1A1").ss(1).dc(b,10.5,3);else if("list"==this.type){this.view_.x=this.getX();this.view_.y=this.getY();this.resizeHandle_.x=this.width_- +2;this.resizeHandle_.y=this.height_-2;var a=this.getName();this.object_&&(b=Entry.container.getObject(this.object_))&&(a=b.name+":"+a);a=7this.getHeight()-40&& +(this.scrollButton_.y=this.getHeight()-40),this.elementView.valueWrapper.graphics.clear().f("#1bafea").rr(20,-2,this.getWidth()-20-10-2*this.BORDER,17,2),this.scrollButton_.visible=!0,this.scrollButton_.x=this.getWidth()-12,this.scrollPosition=Math.floor((this.scrollButton_.y-23)/(this.getHeight()-23-40)*(this.array_.length-b))):(this.elementView.valueWrapper.graphics.clear().f("#1bafea").rr(20,-2,this.getWidth()-20-2*this.BORDER,17,2),this.scrollButton_.visible=!1,this.scrollPosition=0);for(a=this.scrollPosition;a< +this.scrollPosition+b&&ac.length?c+"..":c;this.elementView.valueView.text=c;c=this.elementView.clone(!0);c.y=20*(a-this.scrollPosition)+23;this.view_.addChild(c)}}else"answer"==this.type?(this.view_.x=this.getX(),this.view_.y=this.getY(),this.textView_.text=this.getName(),this.valueView_.x=this.textView_.getMeasuredWidth()+ 14,this.valueView_.y=1,this.isNumber()?parseInt(this.getValue(),10)==this.getValue()?this.valueView_.text=this.getValue():this.valueView_.text=this.getValue().toFixed(1).replace(".00",""):this.valueView_.text=this.getValue(),this.rect_.graphics.clear().f("#ffffff").ss(1,2,0).s("#A0A1A1").rc(0,-14,this.textView_.getMeasuredWidth()+this.valueView_.getMeasuredWidth()+26,20,4,4,4,4),this.wrapper_.graphics.clear().f("#E457DC").ss(1,2,0).s("#E457DC").rc(this.textView_.getMeasuredWidth()+7,-11,this.valueView_.getMeasuredWidth()+ 15,14,7,7,7,7)):(this.view_.x=this.getX(),this.view_.y=this.getY(),this.textView_.text=this.getName(),this.valueView_.x=this.textView_.getMeasuredWidth()+14,this.valueView_.y=1,this.isNumber()?this.valueView_.text=this.getValue().toFixed(1).replace(".00",""):this.valueView_.text=this.getValue(),this.rect_.graphics.clear().f("#ffffff").ss(1,2,0).s("#A0A1A1").rc(0,-14,this.textView_.getMeasuredWidth()+this.valueView_.getMeasuredWidth()+26,20,4,4,4,4),this.wrapper_.graphics.clear().f("#ffbb14").ss(1, -2,0).s("orange").rc(this.textView_.getMeasuredWidth()+7,-11,this.valueView_.getMeasuredWidth()+15,14,7,7,7,7))};Entry.Variable.prototype.getName=function(){return this.name_};Entry.Variable.prototype.setName=function(a){Entry.assert("string"==typeof a,"Variable name must be string");this.name_=a;this.updateView()};Entry.Variable.prototype.getId=function(){return this.id_};Entry.Variable.prototype.getValue=function(){return this.isNumber()?+this.value_:this.value_}; -Entry.Variable.prototype.isNumber=function(){return isNaN(this.value_)?!1:!0};Entry.Variable.prototype.setValue=function(a){if("slide"!=this.type)this.value_=a;else{var b=Entry.isFloat(this.minValue_),c=Entry.isFloat(this.maxValue_);this.value_=athis.maxValue_?this.maxValue_:a;b||c||(this.viewValue_=this.value_,this.value_=Math.floor(this.value_))}this.isCloud_&&Entry.variableContainer.updateCloudVariables();this.updateView()};Entry.Variable.prototype.isVisible=function(){return this.visible_}; -Entry.Variable.prototype.setVisible=function(a){Entry.assert("boolean"==typeof a,"Variable visible state must be boolean");(this.visible_=this.view_.visible=a)&&this.updateView()};Entry.Variable.prototype.setX=function(a){this.x_=a;this.updateView()};Entry.Variable.prototype.getX=function(){return this.x_};Entry.Variable.prototype.setY=function(a){this.y_=a;this.updateView()};Entry.Variable.prototype.getY=function(){return this.y_}; -Entry.Variable.prototype.setWidth=function(a){this.width_=100>a?100:a;this.updateView()};Entry.Variable.prototype.getWidth=function(){return this.width_};Entry.Variable.prototype.isInList=function(a,b){this.getX();this.getY()};Entry.Variable.prototype.setHeight=function(a){this.height_=100>a?100:a;this.updateView()};Entry.Variable.prototype.getHeight=function(){return this.height_};Entry.Variable.prototype.takeSnapshot=function(){this.snapshot_=this.toJSON()}; -Entry.Variable.prototype.loadSnapshot=function(){this.snapshot_&&!this.isCloud_&&this.syncModel_(this.snapshot_)};Entry.Variable.prototype.syncModel_=function(a){this.setX(a.x);this.setY(a.y);this.id_=a.id;this.setVisible(a.visible);this.setValue(a.value);this.setName(a.name);this.isCloud_=a.isCloud;"list"==this.type&&(this.setWidth(a.width),this.setHeight(a.height),this.array_=a.array)}; -Entry.Variable.prototype.toJSON=function(){var a={};a.name=this.name_;a.id=this.id_;a.visible=this.visible_;a.value=this.value_;a.variableType=this.type;"list"==this.type?(a.width=this.getWidth(),a.height=this.getHeight(),a.array=JSON.parse(JSON.stringify(this.array_))):"slide"==this.type&&(a.minValue=this.minValue_,a.maxValue=this.maxValue_);a.isCloud=this.isCloud_;a.object=this.object_;a.x=this.x_;a.y=this.y_;return a};Entry.Variable.prototype.remove=function(){Entry.stage.removeVariable(this)}; -Entry.Variable.prototype.clone=function(){var a=this.toJSON();a.isClone=!0;return a=new Entry.Variable(a)};Entry.Variable.prototype.getType=function(){return this.type};Entry.Variable.prototype.setType=function(a){this.type=a};Entry.Variable.prototype.getSlidePosition=function(a){var b=this.minValue_;return Math.abs((this.viewValue_||this.value_)-b)/Math.abs(this.maxValue_-b)*a+10}; -Entry.Variable.prototype.setSlideCommandX=function(a,b){var c=this.valueSetter_.graphics.command;a="undefined"==typeof a?10:a;c.x=b?a+10:c.x+a;this.updateSlideValueByView()}; -Entry.Variable.prototype.updateSlideValueByView=function(){var a=Math.max(this.valueSetter_.graphics.command.x-10,0)/this.maxWidth;0>a&&(a=0);1c?this.setValue(this.maxValue_):this.setValue(a)};Entry.Variable.prototype.getMinValue=function(){return this.minValue_}; -Entry.Variable.prototype.setMinValue=function(a){this.minValue_=a;this.value_a&&(this.value_=a);this.updateView()};Entry.VariableContainer=function(){this.variables_=[];this.messages_=[];this.lists_=[];this.functions_={};this.viewMode_="all";this.selected=null;this.variableAddPanel={isOpen:!1,info:{object:null,isCloud:!1}};this.listAddPanel={isOpen:!1,info:{object:null,isCloud:!1}};this.selectedVariable=null}; -Entry.VariableContainer.prototype.createDom=function(a){var b=this;this.view_=a;var c=Entry.createElement("table");c.addClass("entryVariableSelectorWorkspace");this.view_.appendChild(c);var d=Entry.createElement("tr");c.appendChild(d);var e=this.createSelectButton("all");e.setAttribute("rowspan","2");e.addClass("selected","allButton");d.appendChild(e);d.appendChild(this.createSelectButton("variable",Entry.variableEnable));d.appendChild(this.createSelectButton("message",Entry.messageEnable));d=Entry.createElement("tr"); -d.appendChild(this.createSelectButton("list",Entry.listEnable));d.appendChild(this.createSelectButton("func",Entry.functionEnable));c.appendChild(d);c=Entry.createElement("ul");c.addClass("entryVariableListWorkspace");this.view_.appendChild(c);this.listView_=c;c=Entry.createElement("li");c.addClass("entryVariableAddWorkspace");c.addClass("entryVariableListElementWorkspace");c.innerHTML="+ "+Lang.Workspace.variable_create;var f=this;this.variableAddButton_=c;c.bindOnClick(function(a){a=f.variableAddPanel; -var c=a.view.name.value.trim();a.isOpen?c&&0!==c.length?b.addVariable():(a.view.addClass("entryRemove"),a.isOpen=!1):(a.view.removeClass("entryRemove"),a.view.name.focus(),a.isOpen=!0)});this.generateVariableAddView();this.generateListAddView();this.generateVariableSplitterView();this.generateVariableSettingView();this.generateListSettingView();c=Entry.createElement("li");c.addClass("entryVariableAddWorkspace");c.addClass("entryVariableListElementWorkspace");c.innerHTML="+ "+Lang.Workspace.message_create; -this.messageAddButton_=c;c.bindOnClick(function(a){b.addMessage({name:Lang.Workspace.message+" "+(b.messages_.length+1)})});c=Entry.createElement("li");c.addClass("entryVariableAddWorkspace");c.addClass("entryVariableListElementWorkspace");c.innerHTML="+ "+Lang.Workspace.list_create;this.listAddButton_=c;c.bindOnClick(function(a){a=f.listAddPanel;var c=a.view.name.value.trim();a.isOpen?c&&0!==c.length?b.addList():(a.view.addClass("entryRemove"),a.isOpen=!1):(a.view.removeClass("entryRemove"),a.view.name.focus(), -a.isOpen=!0)});c=Entry.createElement("li");c.addClass("entryVariableAddWorkspace");c.addClass("entryVariableListElementWorkspace");c.innerHTML="+ "+Lang.Workspace.function_create;this.functionAddButton_=c;c.bindOnClick(function(a){Entry.playground.changeViewMode("code");"func"!=Entry.playground.selectedMenu&&Entry.playground.selectMenu("func");b.createFunction()});return a}; -Entry.VariableContainer.prototype.createSelectButton=function(a,b){var c=this;void 0===b&&(b=!0);var d=Entry.createElement("td");d.addClass("entryVariableSelectButtonWorkspace",a);d.innerHTML=Lang.Workspace[a];b?d.bindOnClick(function(b){c.selectFilter(a);this.addClass("selected")}):d.addClass("disable");return d}; -Entry.VariableContainer.prototype.selectFilter=function(a){for(var b=this.view_.getElementsByTagName("td"),c=0;ca.x_&&b.xe?!0:!1}; -Entry.VariableContainer.prototype.getListById=function(a){var b=this.lists_,c=[];if(0this.maxValue_?this.maxValue_:b,this.isFloatPoint()?delete this.viewValue_:this.viewValue_=this.value_);this.isCloud_&&Entry.variableContainer.updateCloudVariables();this.updateView()};Entry.Variable.prototype.isVisible=function(){return this.visible_}; +Entry.Variable.prototype.setVisible=function(b){Entry.assert("boolean"==typeof b,"Variable visible state must be boolean");(this.visible_=this.view_.visible=b)&&this.updateView()};Entry.Variable.prototype.setX=function(b){this.x_=b;this.updateView()};Entry.Variable.prototype.getX=function(){return this.x_};Entry.Variable.prototype.setY=function(b){this.y_=b;this.updateView()};Entry.Variable.prototype.getY=function(){return this.y_}; +Entry.Variable.prototype.setWidth=function(b){this.width_=100>b?100:b;this.updateView()};Entry.Variable.prototype.getWidth=function(){return this.width_};Entry.Variable.prototype.isInList=function(b,a){this.getX();this.getY()};Entry.Variable.prototype.setHeight=function(b){this.height_=100>b?100:b;this.updateView()};Entry.Variable.prototype.getHeight=function(){return this.height_};Entry.Variable.prototype.takeSnapshot=function(){this.snapshot_=this.toJSON()}; +Entry.Variable.prototype.loadSnapshot=function(){this.snapshot_&&!this.isCloud_&&this.syncModel_(this.snapshot_)};Entry.Variable.prototype.syncModel_=function(b){this.setX(b.x);this.setY(b.y);this.id_=b.id;this.setVisible(b.visible);this.setValue(b.value);this.setName(b.name);this.isCloud_=b.isCloud;"list"==this.type&&(this.setWidth(b.width),this.setHeight(b.height),this.array_=b.array)}; +Entry.Variable.prototype.toJSON=function(){var b={};b.name=this.name_;b.id=this.id_;b.visible=this.visible_;b.value=this.value_;b.variableType=this.type;"list"==this.type?(b.width=this.getWidth(),b.height=this.getHeight(),b.array=JSON.parse(JSON.stringify(this.array_))):"slide"==this.type&&(b.minValue=this.minValue_,b.maxValue=this.maxValue_);b.isCloud=this.isCloud_;b.object=this.object_;b.x=this.x_;b.y=this.y_;return b};Entry.Variable.prototype.remove=function(){Entry.stage.removeVariable(this)}; +Entry.Variable.prototype.clone=function(){var b=this.toJSON();b.isClone=!0;return b=new Entry.Variable(b)};Entry.Variable.prototype.getType=function(){return this.type};Entry.Variable.prototype.setType=function(b){this.type=b};Entry.Variable.prototype.getSlidePosition=function(b){var a=this.minValue_;return Math.abs((this.viewValue_||this.value_)-a)/Math.abs(this.maxValue_-a)*b+10}; +Entry.Variable.prototype.setSlideCommandX=function(b,a){var c=this.valueSetter_.graphics.command;b="undefined"==typeof b?10:b;c.x=a?b+10:c.x+b;this.updateSlideValueByView()}; +Entry.Variable.prototype.updateSlideValueByView=function(){var b=Math.max(this.valueSetter_.graphics.command.x-10,0)/this.maxWidth;0>b&&(b=0);1c&&(b=this.maxValue_);this.isFloatPoint()||(this.viewValue_=b,b=Math.round(b));this.setValue(b)};Entry.Variable.prototype.getMinValue=function(){return this.minValue_}; +Entry.Variable.prototype.setMinValue=function(b){this.minValue_=b;this.value_b&&(this.value_=b);this.updateView();this.isMaxFloat=Entry.isFloat(this.maxValue_)};Entry.Variable.prototype.isFloatPoint=function(){return this.isMaxFloat||this.isMinFloat};Entry.VariableContainer=function(){this.variables_=[];this.messages_=[];this.lists_=[];this.functions_={};this.viewMode_="all";this.selected=null;this.variableAddPanel={isOpen:!1,info:{object:null,isCloud:!1}};this.listAddPanel={isOpen:!1,info:{object:null,isCloud:!1}};this.selectedVariable=null;this._variableRefs=[];this._messageRefs=[];this._functionRefs=[]}; +Entry.VariableContainer.prototype.createDom=function(b){var a=this;this.view_=b;var c=Entry.createElement("table");c.addClass("entryVariableSelectorWorkspace");this.view_.appendChild(c);var d=Entry.createElement("tr");c.appendChild(d);var e=this.createSelectButton("all");e.setAttribute("rowspan","2");e.addClass("selected","allButton");d.appendChild(e);d.appendChild(this.createSelectButton("variable",Entry.variableEnable));d.appendChild(this.createSelectButton("message",Entry.messageEnable));d=Entry.createElement("tr"); +d.appendChild(this.createSelectButton("list",Entry.listEnable));d.appendChild(this.createSelectButton("func",Entry.functionEnable));c.appendChild(d);c=Entry.createElement("ul");c.addClass("entryVariableListWorkspace");this.view_.appendChild(c);this.listView_=c;c=Entry.createElement("li");c.addClass("entryVariableAddWorkspace");c.addClass("entryVariableListElementWorkspace");c.innerHTML="+ "+Lang.Workspace.variable_create;var f=this;this.variableAddButton_=c;c.bindOnClick(function(b){b=f.variableAddPanel; +var c=b.view.name.value.trim();b.isOpen?c&&0!==c.length?a.addVariable():(b.view.addClass("entryRemove"),b.isOpen=!1):(b.view.removeClass("entryRemove"),b.view.name.focus(),b.isOpen=!0)});this.generateVariableAddView();this.generateListAddView();this.generateVariableSplitterView();this.generateVariableSettingView();this.generateListSettingView();c=Entry.createElement("li");c.addClass("entryVariableAddWorkspace");c.addClass("entryVariableListElementWorkspace");c.innerHTML="+ "+Lang.Workspace.message_create; +this.messageAddButton_=c;c.bindOnClick(function(b){a.addMessage({name:Lang.Workspace.message+" "+(a.messages_.length+1)})});c=Entry.createElement("li");c.addClass("entryVariableAddWorkspace");c.addClass("entryVariableListElementWorkspace");c.innerHTML="+ "+Lang.Workspace.list_create;this.listAddButton_=c;c.bindOnClick(function(b){b=f.listAddPanel;var c=b.view.name.value.trim();b.isOpen?c&&0!==c.length?a.addList():(b.view.addClass("entryRemove"),b.isOpen=!1):(b.view.removeClass("entryRemove"),b.view.name.focus(), +b.isOpen=!0)});c=Entry.createElement("li");c.addClass("entryVariableAddWorkspace");c.addClass("entryVariableListElementWorkspace");c.innerHTML="+ "+Lang.Workspace.function_create;this.functionAddButton_=c;c.bindOnClick(function(b){b=a._getBlockMenu();Entry.playground.changeViewMode("code");"func"!=b.lastSelector&&b.selectMenu("func");a.createFunction()});return b}; +Entry.VariableContainer.prototype.createSelectButton=function(b,a){var c=this;void 0===a&&(a=!0);var d=Entry.createElement("td");d.addClass("entryVariableSelectButtonWorkspace",b);d.innerHTML=Lang.Workspace[b];a?d.bindOnClick(function(a){c.selectFilter(b);this.addClass("selected")}):d.addClass("disable");return d}; +Entry.VariableContainer.prototype.selectFilter=function(b){for(var a=this.view_.getElementsByTagName("td"),c=0;cb.x_&&a.xe?!0:!1};Entry.VariableContainer.prototype.getListById=function(b){var a=this.lists_,c=[];if(0c.getValue()&&c.setValue(0),100a&&(b.length=a)}this.updateListSettingView()};Entry.VariableContainer.prototype.updateViews=function(){var a=this.lists_;this.variables_.map(function(b){b.updateView()});a.map(function(b){b.updateView()})}; -Entry.VariableContainer.prototype.updateSelectedVariable=function(a,b){a?"variable"==a.type?(this.selectedVariable=a,this.updateVariableSettingView(a)):"slide"==a.type?(this.selectedVariable=a,this.updateVariableSettingView(a)):"list"==a.type&&(this.selectedList=a,this.updateListSettingView(a)):(this.selectedVariable=null,"variable"==(b||"variable")?this.variableSettingView.addClass("entryRemove"):this.listSettingView.addClass("entryRemove"))}; -Entry.VariableContainer.prototype.removeLocalVariables=function(a){var b=[],c=this;this.mapVariable(function(a,c){a.object_&&a.object_==c&&b.push(a)},a);b.map(function(b){c.removeVariable(b)})}; -Entry.VariableContainer.prototype.updateCloudVariables=function(){var a=Entry.projectId;if(Entry.cloudSavable&&a){var b=Entry.variableContainer,a=b.variables_.filter(function(b){return b.isCloud_}),a=a.map(function(b){return b.toJSON()}),b=b.lists_.filter(function(b){return b.isCloud_}),b=b.map(function(b){return b.toJSON()});$.ajax({url:"/api/project/variable/"+Entry.projectId,type:"PUT",data:{variables:a,lists:b}}).done(function(){})}};Entry.block.run={skeleton:"basic",color:"#3BBD70",contents:["this is","basic block"],func:function(){}};Entry.block.jr_start={skeleton:"pebble_event",event:"start",color:"#3BBD70",contents:[{type:"Indicator",img:"/img/assets/ntry/bitmap/jr/block_play_image.png",highlightColor:"#3BBD70",size:22}],func:function(){var a=Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT),b;for(b in a)this._unit=a[b];Ntry.unitComp=Ntry.entityManager.getComponent(this._unit.id,Ntry.STATIC.UNIT)}}; -Entry.block.jr_repeat={skeleton:"pebble_loop",color:"#127CDB",contents:[{type:"Text",text:Lang.Menus.repeat_0},{type:"Dropdown",key:"REPEAT",options:[[1,1],[2,2],[3,3],[4,4],[5,5],[6,6],[7,7],[8,8],[9,9],[10,10]],value:1},{type:"Text",text:Lang.Menus.repeat_1},{type:"Statement",key:"STATEMENT",accept:"pebble_basic"}],func:function(){if(void 0===this.repeatCount)return this.repeatCount=this.block.values.REPEAT,Entry.STATIC.CONTINUE;if(0'),{parent:a});this.offset=this.svgDom.offset();this._svgWidth=this.svgDom.width();this.snap=Snap("#blockMenu"); -this.svgGroup=this.snap.group();this.svgThreadGroup=this.svgGroup.group();this.svgThreadGroup.board=this;this.svgBlockGroup=this.svgGroup.group();this.svgBlockGroup.board=this;this.changeEvent=new Entry.Event(this);this.observe(this,"generateDragBlockObserver",["dragBlock"]);Entry.documentMousedown&&Entry.documentMousedown.attach(this,this.setSelectedBlock)}; -(function(a){a.schema={code:null,dragBlock:null,closeBlock:null,selectedBlockView:null};a.changeCode=function(b){if(!(b instanceof Entry.Code))return console.error("You must inject code instance");this.codeListener&&this.code.changeEvent.detach(this.codeListener);this.set({code:b});var a=this;this.codeListener=this.code.changeEvent.attach(this,function(){a.changeEvent.notify()});b.createView(this);this.align()};a.bindCodeView=function(b){this.svgBlockGroup.remove();this.svgThreadGroup.remove();this.svgBlockGroup= -b.svgBlockGroup;this.svgThreadGroup=b.svgThreadGroup;this.svgGroup.append(this.svgThreadGroup);this.svgGroup.append(this.svgBlockGroup)};a.align=function(){for(var b=this.code.getThreads(),a=10,d="LEFT"==this._align?20:this.svgDom.width()/2,e=0,f=b.length;ee||(d.splice(e,1),(d=b.getFirstBlock())&&d.destroy(a))};a.doDestroyThread=function(b,a){var d=this._data,e=d.indexOf(b);0>e||(d.splice(e,1),(d=b.getFirstBlock())&&d.doDestroy(a))};a.getThreads=function(){return this._data};a.toJSON=function(){for(var b=this.getThreads(),a=[],d=0,e=b.length;d=e&&g>=a)}};a.align=function(){var b=this.getPosition();this.svgGroup.attr({transform:"t"+b.x+" "+b.y})};a.setPosition=function(){var b=this.board.svgDom;this._x=b.width()-110;this._y=b.height()-110;this.align()};a.getPosition=function(){return{x:this._x, -y:this._y}};a.tAnimation=function(b){if(b!==this.isOver){b=void 0===b?!0:b;var a=this.trashcanTop;b?a.animate({transform:"t5 -20 r30"},50):a.animate({transform:"r0"},50);this.isOver=b}}})(Entry.FieldTrashcan.prototype);Entry.Board=function(a){function b(b){var a=$(window);b=a.scrollTop();var a=a.scrollLeft(),f=c.offset;c.relativeOffset={top:f.top-b,left:f.left-a};console.log("update")}a="string"===typeof a?$("#"+a):$(a);if("DIV"!==a.prop("tagName"))return console.error("Dom is not div element");if("function"!==typeof window.Snap)return console.error("Snap library is required");Entry.Model(this,!1);this.svgDom=Entry.Dom($(''), -{parent:a});this.offset=this.svgDom.offset();this.offset.top=130;this.offset.left-=$(window).scrollLeft();this.relativeOffset=this.offset;var c=this;$(window).scroll(b);Entry.windowResized.attach(this,b);this.snap=Snap("#play");this._blockViews=[];this.trashcan=new Entry.FieldTrashcan(this);this.svgGroup=this.snap.group();this.svgThreadGroup=this.svgGroup.group();this.svgThreadGroup.board=this;this.svgBlockGroup=this.svgGroup.group();this.svgBlockGroup.board=this;Entry.ANIMATION_DURATION=200;Entry.BOARD_PADDING= -100;this.changeEvent=new Entry.Event(this);this.scroller=new Entry.Scroller(this,!0,!0);this._addControl(a);Entry.documentMousedown&&Entry.documentMousedown.attach(this,this.setSelectedBlock);Entry.keyPressed&&Entry.keyPressed.attach(this,this._keyboardControl)}; -(function(a){a.schema={code:null,dragBlock:null,magnetedBlockView:null,selectedBlockView:null};a.changeCode=function(b){this.codeListener&&this.code.changeEvent.detach(this.codeListener);this.set({code:b});var a=this;this.codeListener=this.code.changeEvent.attach(this,function(){a.changeEvent.notify()});b.createView(this);this.changeEvent.notify()};a.bindCodeView=function(b){this.svgBlockGroup.remove();this.svgThreadGroup.remove();this.svgBlockGroup=b.svgBlockGroup;this.svgThreadGroup=b.svgThreadGroup; -this.svgGroup.append(this.svgThreadGroup);this.svgGroup.append(this.svgBlockGroup)};a.setMagnetedBlock=function(b){if(this.magnetedBlockView){if(this.magnetedBlockView===b)return;this.magnetedBlockView.set({magneting:!1})}this.set({magnetedBlockView:b});b&&(b.set({magneting:!0,animating:!0}),b.dominate(),this.dragBlock.dominate())};a.getCode=function(){return this.code};a.findById=function(b){for(var a=this.code.getThreads(),d=0,e=a.length;dc.getValue()&&c.setValue(0),100b&&(a.length=b)}this.updateListSettingView()};Entry.VariableContainer.prototype.updateViews=function(){var b=this.lists_;this.variables_.map(function(a){a.updateView()});b.map(function(a){a.updateView()})}; +Entry.VariableContainer.prototype.updateSelectedVariable=function(b,a){b?"variable"==b.type?(this.selectedVariable=b,this.updateVariableSettingView(b)):"slide"==b.type?(this.selectedVariable=b,this.updateVariableSettingView(b)):"list"==b.type&&(this.selectedList=b,this.updateListSettingView(b)):(this.selectedVariable=null,"variable"==(a||"variable")?this.variableSettingView.addClass("entryRemove"):this.listSettingView.addClass("entryRemove"))}; +Entry.VariableContainer.prototype.removeLocalVariables=function(b){var a=[],c=this;this.mapVariable(function(b,c){b.object_&&b.object_==c&&a.push(b)},b);a.map(function(a){c.removeVariable(a)})}; +Entry.VariableContainer.prototype.updateCloudVariables=function(){var b=Entry.projectId;if(Entry.cloudSavable&&b){var a=Entry.variableContainer,b=a.variables_.filter(function(a){return a.isCloud_}),b=b.map(function(a){return a.toJSON()}),a=a.lists_.filter(function(a){return a.isCloud_}),a=a.map(function(a){return a.toJSON()});$.ajax({url:"/api/project/variable/"+Entry.projectId,type:"PUT",data:{variables:b,lists:a}}).done(function(){})}}; +Entry.VariableContainer.prototype.addRef=function(b,a){if(this.view_&&Entry.playground.mainWorkspace.getMode()===Entry.Workspace.MODE_BOARD){var c={object:a.getCode().object,block:a};a.funcBlock&&(c.funcBlock=a.funcBlock,delete a.funcBlock);this[b].push(c);if("_functionRefs"==b)for(var d=a.type.substr(5),e=Entry.variableContainer.functions_[d].content.getBlockList(),f=0;fEntry.Albert.tempo&&(Entry.Albert.tempo=1);return a.callReturn()}},albert_set_tempo_to:{color:"#00979D",skeleton:"basic",statements:[], +params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[{type:"text",params:["60"]},null],type:"albert_set_tempo_to"},paramsKeyMap:{VALUE:0},"class":"albert_buzzer",isNotFor:["albert"],func:function(b,a){Entry.Albert.tempo=a.getNumberValue("VALUE");1>Entry.Albert.tempo&&(Entry.Albert.tempo=1);return a.callReturn()}},albert_move_forward:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png", +size:12}],events:{},def:{params:[null]},func:function(b,a){var c=Entry.hw.sendQueue;if(a.isStart){if(1==a.timeFlag)return a;delete a.timeFlag;delete a.isStart;Entry.engine.isContinue=!1;c.leftWheel=0;c.rightWheel=0;return a.callReturn()}a.isStart=!0;a.timeFlag=1;c.leftWheel=30;c.rightWheel=30;setTimeout(function(){a.timeFlag=0},1E3);return a}},albert_move_backward:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}], +events:{},def:{params:[null]},func:function(b,a){var c=Entry.hw.sendQueue;if(a.isStart){if(1==a.timeFlag)return c.leftWheel=-30,c.rightWheel=-30,a;delete a.timeFlag;delete a.isStart;Entry.engine.isContinue=!1;c.leftWheel=0;c.rightWheel=0;return a.callReturn()}a.isStart=!0;a.timeFlag=1;setTimeout(function(){a.timeFlag=0},1E3);return a}},albert_turn_around:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[["\uc67c\ucabd","LEFT"],["\uc624\ub978\ucabd","RIGHT"]],value:"LEFT", +fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,null]},paramsKeyMap:{DIRECTION:0},func:function(b,a){var c=Entry.hw.sendQueue;if(a.isStart){if(1==a.timeFlag)return c.leftWheel=a.leftValue,c.rightWheel=a.rightValue,a;delete a.timeFlag;delete a.isStart;delete a.leftValue;delete a.rightValue;Entry.engine.isContinue=!1;c.leftWheel=0;c.rightWheel=0;return a.callReturn()}c="LEFT"==a.getField("DIRECTION",a);a.leftValue=c?-30:30;a.rightValue= +c?30:-30;a.isStart=!0;a.timeFlag=1;setTimeout(function(){a.timeFlag=0},1E3);return a}},albert_set_led_to:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[["\uc67c\ucabd","LEFT"],["\uc624\ub978\ucabd","RIGHT"],["\uc591\ucabd","FRONT"]],value:"LEFT",fontSize:11},{type:"Dropdown",options:[["\ube68\uac04\uc0c9","4"],["\ub178\ub780\uc0c9","6"],["\ucd08\ub85d\uc0c9","2"],["\ud558\ub298\uc0c9","3"],["\ud30c\ub780\uc0c9","1"],["\ubcf4\ub77c\uc0c9","5"],["\ud558\uc580\uc0c9", +"7"]],value:"4",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,null,null]},paramsKeyMap:{DIRECTION:0,COLOR:1},func:function(b,a){var c=Entry.hw.sendQueue,d=a.getField("DIRECTION",a),e=Number(a.getField("COLOR",a));"FRONT"==d?(c.leftEye=e,c.rightEye=e):"LEFT"==d?c.leftEye=e:c.rightEye=e;return a.callReturn()}},albert_clear_led:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[["\uc67c\ucabd", +"LEFT"],["\uc624\ub978\ucabd","RIGHT"],["\uc591\ucabd","FRONT"]],value:"LEFT",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,null]},paramsKeyMap:{DIRECTION:0},func:function(b,a){var c=Entry.hw.sendQueue,d=a.getField("DIRECTION",a);"FRONT"==d?(c.leftEye=0,c.rightEye=0):"LEFT"==d?c.leftEye=0:c.rightEye=0;return a.callReturn()}},albert_change_wheels_by:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[["\uc67c\ucabd", +"LEFT"],["\uc624\ub978\ucabd","RIGHT"],["\uc591\ucabd","FRONT"]],value:"LEFT",fontSize:11},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,null]},paramsKeyMap:{DIRECTION:0,VALUE:1},func:function(b,a){var c=Entry.hw.sendQueue,d=Entry.hw.portData,e=a.getField("DIRECTION"),f=a.getNumberValue("VALUE");"LEFT"==e?c.leftWheel=void 0!=c.leftWheel?c.leftWheel+f:d.leftWheel+f:("RIGHT"!=e&&(c.leftWheel=void 0!=c.leftWheel? +c.leftWheel+f:d.leftWheel+f),c.rightWheel=void 0!=c.rightWheel?c.rightWheel+f:d.rightWheel+f);return a.callReturn()}},albert_set_wheels_to:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[["\uc67c\ucabd","LEFT"],["\uc624\ub978\ucabd","RIGHT"],["\uc591\ucabd","FRONT"]],value:"LEFT",fontSize:11},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,null]},paramsKeyMap:{DIRECTION:0, +VALUE:1},func:function(b,a){var c=Entry.hw.sendQueue,d=a.getField("DIRECTION"),e=a.getNumberValue("VALUE");"LEFT"==d?c.leftWheel=e:("RIGHT"!=d&&(c.leftWheel=e),c.rightWheel=e);return a.callReturn()}},arduino_text:{color:"#00979D",skeleton:"basic_string_field",statements:[],params:[{type:"TextInput",value:10}],events:{},def:{params:[]},paramsKeyMap:{NAME:0},func:function(b,a){return a.getStringField("NAME")}},arduino_send:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"}], +events:{},def:{params:[]},paramsKeyMap:{VALUE:0},func:function(b,a){var c=a.getValue("VALUE",a),d=new XMLHttpRequest;d.open("POST","http://localhost:23518/arduino/",!1);d.send(String(c));Entry.assert(200==d.status,"arduino is not connected");return a.callReturn()}},arduino_get_number:{color:"#00979D",skeleton:"basic_string_field",statements:[],params:[{type:"Block",accept:"string"}],events:{},def:{params:[]},paramsKeyMap:{VALUE:0},func:function(b,a){var c=a.getValue("VALUE",a),d=new XMLHttpRequest; +d.open("POST","http://localhost:23518/arduino/",!1);d.send(String(c));Entry.assert(200==d.status,"arduino is not connected");return Number(d.responseText)}},arduino_get_string:{color:"#00979D",skeleton:"basic_string_field",statements:[],params:[{type:"Block",accept:"string"}],events:{},def:{params:[]},paramsKeyMap:{VALUE:0},func:function(b,a){var c=a.getValue("VALUE",a),d=new XMLHttpRequest;d.open("POST","http://localhost:23518/arduino/",!1);d.send(String(c));Entry.assert(200==d.status,"arduino is not connected"); +return d.responseText}},arduino_get_sensor_number:{color:"#00979D",skeleton:"basic_string_field",statements:[],params:[{type:"Dropdown",options:[["0","A0"],["1","A1"],["2","A2"],["3","A3"],["4","A4"],["5","A5"]],value:"A0",fontSize:11}],events:{},def:{params:[null]},paramsKeyMap:{PORT:0},func:function(b,a){return a.getStringField("PORT")}},arduino_get_port_number:{color:"#00979D",skeleton:"basic_string_field",statements:[],params:[{type:"Dropdown",options:[["0","0"],["1","1"],["2","2"],["3","3"], +["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"]],value:"0",fontSize:11}],events:{},def:{params:[null]},paramsKeyMap:{PORT:0},func:function(b,a){return a.getStringField("PORT")}},arduino_get_pwm_port_number:{color:"#00979D",skeleton:"basic_string_field",statements:[],params:[{type:"Dropdown",options:[["3","3"],["5","5"],["6","6"],["9","9"],["10","10"],["11","11"]],value:"3",fontSize:11}],events:{},def:{params:[null]},paramsKeyMap:{PORT:0}, +func:function(b,a){return a.getStringField("PORT")}},arduino_get_number_sensor_value:{color:"#00979D",fontColor:"#fff",skeleton:"basic_string_field",statements:[],params:[{type:"Block",accept:"string"}],events:{},def:{params:[{type:"arduino_get_sensor_number"}],type:"arduino_get_number_sensor_value"},paramsKeyMap:{VALUE:0},"class":"arduino_value",isNotFor:["arduino"],func:function(b,a){var c=a.getValue("VALUE",a);return Entry.hw.getAnalogPortValue(c[1])}},arduino_get_digital_value:{color:"#00979D", +fontColor:"#fff",skeleton:"basic_boolean_field",statements:[],params:[{type:"Block",accept:"string"}],events:{},def:{params:[{type:"arduino_get_port_number"}],type:"arduino_get_digital_value"},paramsKeyMap:{VALUE:0},"class":"arduino_value",isNotFor:["arduino"],func:function(b,a){var c=a.getNumberValue("VALUE",a);return Entry.hw.getDigitalPortValue(c)}},arduino_toggle_led:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Dropdown",options:[[Lang.Blocks.ARDUINO_on, +"on"],[Lang.Blocks.ARDUINO_off,"off"]],value:"on",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[{type:"arduino_get_port_number"},null,null],type:"arduino_toggle_led"},paramsKeyMap:{VALUE:0,OPERATOR:1},"class":"arduino_set",isNotFor:["arduino"],func:function(b,a){var c=a.getNumberValue("VALUE"),d=a.getField("OPERATOR");Entry.hw.setDigitalPortValue(c,"on"==d?255:0);return a.callReturn()}},arduino_toggle_pwm:{color:"#00979D",skeleton:"basic", +statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[{type:"arduino_get_pwm_port_number"},{type:"arduino_text",params:["255"]},null],type:"arduino_toggle_pwm"},paramsKeyMap:{PORT:0,VALUE:1},"class":"arduino_set",isNotFor:["arduino"],func:function(b,a){var c=a.getNumberValue("PORT"),d=a.getNumberValue("VALUE"),d=Math.round(d),d=Math.max(d,0),d=Math.min(d,255);Entry.hw.setDigitalPortValue(c, +d);return a.callReturn()}},arduino_convert_scale:{color:"#00979D",fontColor:"#fff",skeleton:"basic_string_field",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Block",accept:"string"}],events:{},def:{params:[{type:"arduino_get_number_sensor_value",params:[{type:"arduino_get_sensor_number",id:"bl5e"}]},{type:"number",params:["0"]},{type:"number",params:["1023"]},{type:"number",params:["0"]},{type:"number", +params:["100"]}],type:"arduino_convert_scale"},paramsKeyMap:{VALUE1:0,VALUE2:1,VALUE3:2,VALUE4:3,VALUE5:4},"class":"arduino",isNotFor:["arduino"],func:function(b,a){var c=a.getNumberValue("VALUE1",a),d=a.getNumberValue("VALUE2",a),e=a.getNumberValue("VALUE3",a),f=a.getNumberValue("VALUE4",a),g=a.getNumberValue("VALUE5",a);if(d>e)var h=d,d=e,e=h;f>g&&(h=f,f=g,g=h);c-=d;c*=(g-f)/(e-d);c+=f;c=Math.min(g,c);c=Math.max(f,c);return Math.round(c)}},sensorBoard_get_named_sensor_value:{color:"#00979D",fontColor:"#fff", +skeleton:"basic_string_field",statements:[],params:[{type:"Dropdown",options:[["\uc18c\ub9ac","0"],["\ube5b \uac10\uc9c0","1"],["\uc2ac\ub77c\uc774\ub354","2"],["\uc628\ub3c4","3"]],value:"0",fontSize:11}],events:{},def:{params:[null],type:"sensorBoard_get_named_sensor_value"},paramsKeyMap:{PORT:0},"class":"sensorBoard",isNotFor:["sensorBoard"],func:function(b,a){return Entry.hw.getAnalogPortValue(a.getField("PORT",a))}},sensorBoard_is_button_pressed:{color:"#00979D",fontColor:"#fff",skeleton:"basic_boolean_field", +statements:[],params:[{type:"Dropdown",options:[["\ube68\uac04","8"],["\ud30c\ub780","9"],["\ub178\ub780","10"],["\ucd08\ub85d","11"]],value:"8",fontSize:11}],events:{},def:{params:[null],type:"sensorBoard_is_button_pressed"},paramsKeyMap:{PORT:0},"class":"sensorBoard",isNotFor:["sensorBoard"],func:function(b,a){return Entry.hw.getDigitalPortValue(a.getNumberField("PORT",a))}},sensorBoard_led:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[["\ube68\uac04","2"],["\ucd08\ub85d", +"3"],["\ud30c\ub780","4"],["\ud770\uc0c9","5"]],value:"2",fontSize:11},{type:"Dropdown",options:[["\ucf1c\uae30","255"],["\ub044\uae30","0"]],value:"255",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,null,null],type:"sensorBoard_led"},paramsKeyMap:{PORT:0,OPERATOR:1},"class":"sensorBoard",isNotFor:["sensorBoard"],func:function(b,a){Entry.hw.setDigitalPortValue(a.getField("PORT"),a.getNumberField("OPERATOR"));return a.callReturn()}}, +arduino_download_connector:{skeleton:"basic_button",isNotFor:["arduinoDisconnected"],color:"#eee",params:[{type:"Text",text:Lang.Blocks.ARDUINO_download_connector,color:"#333",align:"center"}],events:{mousedown:[function(){Entry.hw.downloadConnector()}]}},arduino_download_source:{skeleton:"basic_button",isNotFor:["arduinoDisconnected"],color:"#eee",params:[{type:"Text",text:Lang.Blocks.ARDUINO_download_source,color:"#333",align:"center"}],events:{mousedown:[function(){Entry.hw.downloadSource()}]}}, +arduino_connected:{skeleton:"basic_button",color:"#eee",isNotFor:["arduinoConnected"],params:[{type:"Text",text:Lang.Blocks.ARDUINO_connected,color:"#333",align:"center"}],events:{}},arduino_reconnect:{skeleton:"basic_button",color:"#eee",isNotFor:["arduinoDisconnected"],params:[{type:"Text",text:Lang.Blocks.ARDUINO_reconnect,color:"#333",align:"center"}],events:{mousedown:[function(){Entry.hw.retryConnect()}]}},CODEino_get_sensor_number:{color:"#00979D",skeleton:"basic_string_field",statements:[], +params:[{type:"Dropdown",options:[["0","A0"],["1","A1"],["2","A2"],["3","A3"],["4","A4"],["5","A5"],["6","A6"]],value:"A0",fontSize:11}],events:{},def:{params:[null]},paramsKeyMap:{PORT:0},func:function(b,a){return a.getStringField("PORT")}},CODEino_get_named_sensor_value:{color:"#00979D",fontColor:"#fff",skeleton:"basic_string_field",statements:[],params:[{type:"Dropdown",options:[[Lang.Blocks.CODEino_sensor_name_0,"0"],[Lang.Blocks.CODEino_sensor_name_1,"1"],[Lang.Blocks.CODEino_sensor_name_2,"2"], +[Lang.Blocks.CODEino_sensor_name_3,"3"],[Lang.Blocks.CODEino_sensor_name_4,"4"],[Lang.Blocks.CODEino_sensor_name_5,"5"],[Lang.Blocks.CODEino_sensor_name_6,"6"]],value:"0",fontSize:11}],events:{},def:{params:[null],type:"CODEino_get_named_sensor_value"},paramsKeyMap:{PORT:0},"class":"CODEino",isNotFor:["CODEino"],func:function(b,a){return Entry.hw.getAnalogPortValue(a.getField("PORT",a))}},CODEino_get_sound_status:{color:"#00979D",fontColor:"#fff",skeleton:"basic_boolean_field",statements:[],params:[{type:"Dropdown", +options:[[Lang.Blocks.CODEino_string_11,"GREAT"],[Lang.Blocks.CODEino_string_12,"SMALL"]],value:"GREAT",fontSize:11}],events:{},def:{params:[null],type:"CODEino_get_sound_status"},paramsKeyMap:{STATUS:0},"class":"CODEino",isNotFor:["CODEino"],func:function(b,a){return"GREAT"==a.getField("STATUS",a)?600Entry.hw.getAnalogPortValue(0)?1:0}},CODEino_get_light_status:{color:"#00979D",fontColor:"#fff",skeleton:"basic_boolean_field",statements:[],params:[{type:"Dropdown", +options:[[Lang.Blocks.CODEino_string_14,"BRIGHT"],[Lang.Blocks.CODEino_string_15,"DARK"]],value:"BRIGHT",fontSize:11}],events:{},def:{params:[null],type:"CODEino_get_light_status"},paramsKeyMap:{STATUS:0},"class":"CODEino",isNotFor:["CODEino"],func:function(b,a){return"DARK"==a.getField("STATUS",a)?800Entry.hw.getAnalogPortValue(1)?1:0}},CODEino_is_button_pressed:{color:"#00979D",fontColor:"#fff",skeleton:"basic_boolean_field",statements:[],params:[{type:"Dropdown", +options:[[Lang.Blocks.CODEino_string_3,"4"],[Lang.Blocks.CODEino_string_4,"17"],[Lang.Blocks.CODEino_string_5,"18"],[Lang.Blocks.CODEino_string_6,"19"],[Lang.Blocks.CODEino_string_7,"20"]],value:"4",fontSize:11}],events:{},def:{params:[null],type:"CODEino_is_button_pressed"},paramsKeyMap:{PORT:0},"class":"CODEino",isNotFor:["CODEino"],func:function(b,a){var c=a.getNumberField("PORT",a);return 14d?1:0;if("RIGHT"==c||"FRONT"==c)return 30d?1:0}},CODEino_get_accelerometer_value:{color:"#00979D",fontColor:"#fff",skeleton:"basic_string_field",statements:[],params:[{type:"Dropdown",options:[["X","3"],["Y","4"],["Z","5"]],value:"3",fontSize:11}], +events:{},def:{params:[null],type:"CODEino_get_accelerometer_value"},paramsKeyMap:{PORT:0},"class":"CODEino",isNotFor:["CODEino"],func:function(b,a){var c=265,d=402,e=-90,f=90,g=Entry.hw.getAnalogPortValue(a.getField("PORT",a));if(c>d)var h=c,c=d,d=h;e>f&&(h=e,e=f,f=h);g=(f-e)/(d-c)*(g-c);g+=e;g=Math.min(f,g);g=Math.max(e,g);return Math.round(g)}},bitbrick_sensor_value:{color:"#00979D",fontColor:"#fff",skeleton:"basic_string_field",statements:[],params:[{type:"DropdownDynamic",value:null,fontSize:11}], +events:{},def:{params:[null],type:"bitbrick_sensor_value"},paramsKeyMap:{PORT:0},"class":"condition",isNotFor:["bitbrick"],func:function(b,a){var c=a.getStringField("PORT");return Entry.hw.portData[c].value}},bitbrick_is_touch_pressed:{color:"#00979D",fontColor:"#fff",skeleton:"basic_boolean_field",statements:[],params:[{type:"DropdownDynamic",value:null,fontSize:11}],events:{},def:{params:[null],type:"bitbrick_is_touch_pressed"},paramsKeyMap:{PORT:0},"class":"condition",isNotFor:["bitbrick"],func:function(b, +a){return 0===Entry.hw.portData[a.getStringField("PORT")].value}},bitbrick_turn_off_color_led:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null],type:"bitbrick_turn_off_color_led",id:"i3je"},"class":"condition",isNotFor:["bitbrick"],func:function(b,a){Entry.hw.sendQueue.LEDR=0;Entry.hw.sendQueue.LEDG=0;Entry.hw.sendQueue.LEDB=0;return a.callReturn()}},bitbrick_turn_on_color_led_by_rgb:{color:"#00979D", +skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[{type:"text",params:["255"]},{type:"text",params:["255"]},{type:"text",params:["255"]},null],type:"bitbrick_turn_on_color_led_by_rgb"},paramsKeyMap:{rValue:0,gValue:1,bValue:2},"class":"condition",isNotFor:["bitbrick"],func:function(b,a){var c=a.getNumberValue("rValue"), +d=a.getNumberValue("gValue"),e=a.getNumberValue("bValue"),f=Entry.adjustValueWithMaxMin,g=Entry.hw.sendQueue;g.LEDR=f(c,0,255);g.LEDG=f(d,0,255);g.LEDB=f(e,0,255);return a.callReturn()}},bitbrick_turn_on_color_led_by_picker:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Color"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null],type:"bitbrick_turn_on_color_led_by_picker"},paramsKeyMap:{VALUE:0},"class":"condition",isNotFor:["bitbrick"], +func:function(b,a){var c=a.getStringField("VALUE");Entry.hw.sendQueue.LEDR=parseInt(c.substr(1,2),16);Entry.hw.sendQueue.LEDG=parseInt(c.substr(3,2),16);Entry.hw.sendQueue.LEDB=parseInt(c.substr(5,2),16);return a.callReturn()}},bitbrick_turn_on_color_led_by_value:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[{type:"text",params:["0"]},null],type:"bitbrick_turn_on_color_led_by_value"}, +paramsKeyMap:{VALUE:0},"class":"condition",isNotFor:["bitbrick"],func:function(b,a){var c=a.getNumberValue("VALUE"),d,e,f,c=c%200;67>c?(d=200-3*c,e=3*c,f=0):134>c?(c-=67,d=0,e=200-3*c,f=3*c):201>c&&(c-=134,d=3*c,e=0,f=200-3*c);Entry.hw.sendQueue.LEDR=d;Entry.hw.sendQueue.LEDG=e;Entry.hw.sendQueue.LEDB=f;return a.callReturn()}},bitbrick_buzzer:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png", +size:12}],events:{},def:{params:[{type:"text",params:["60"]},null],type:"bitbrick_buzzer"},paramsKeyMap:{VALUE:0},"class":"condition",isNotFor:["bitbrick"],func:function(b,a){if(a.isStart)return Entry.hw.sendQueue.buzzer=0,delete a.isStart,a.callReturn();var c=a.getNumberValue("VALUE");Entry.hw.sendQueue.buzzer=c;a.isStart=!0;return a}},bitbrick_turn_off_all_motors:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}], +events:{},def:{params:[null],type:"bitbrick_turn_off_all_motors"},"class":"condition",isNotFor:["bitbrick"],func:function(b,a){var c=Entry.hw.sendQueue,d=Entry.Bitbrick;d.servoList().map(function(a){c[a[1]]=0});d.dcList().map(function(a){c[a[1]]=128});return a.callReturn()}},bitbrick_dc_speed:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,fontSize:11},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}], +events:{},def:{params:[null,{type:"text",params:["60"]},null],type:"bitbrick_dc_speed"},paramsKeyMap:{PORT:0,VALUE:1},"class":"condition",isNotFor:["bitbrick"],func:function(b,a){var c=a.getNumberValue("VALUE"),c=Math.min(c,Entry.Bitbrick.dcMaxValue),c=Math.max(c,Entry.Bitbrick.dcMinValue);Entry.hw.sendQueue[a.getStringField("PORT")]=c+128;return a.callReturn()}},bitbrick_dc_direction_speed:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,fontSize:11},{type:"Dropdown", +options:[[Lang.Blocks.BITBRICK_dc_direction_cw,"CW"],[Lang.Blocks.BITBRICK_dc_direction_ccw,"CCW"]],value:"CW",fontSize:11},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,null,{type:"text",params:["100"]},null],type:"bitbrick_dc_direction_speed"},paramsKeyMap:{PORT:0,DIRECTION:1,VALUE:2},"class":"condition",isNotFor:["bitbrick"],func:function(b,a){var c="CW"===a.getStringField("DIRECTION"),d=a.getNumberValue("VALUE"), +d=Math.min(d,Entry.Bitbrick.dcMaxValue),d=Math.max(d,0);Entry.hw.sendQueue[a.getStringField("PORT")]=c?d+128:128-d;return a.callReturn()}},bitbrick_servomotor_angle:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,fontSize:11},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,{type:"text",params:["100"]},null],type:"bitbrick_servomotor_angle"},paramsKeyMap:{PORT:0,VALUE:1}, +"class":"condition",isNotFor:["bitbrick"],func:function(b,a){var c=a.getNumberValue("VALUE")+1,c=Math.min(c,Entry.Bitbrick.servoMaxValue),c=Math.max(c,Entry.Bitbrick.servoMinValue);Entry.hw.sendQueue[a.getStringField("PORT")]=c;return a.callReturn()}},bitbrick_convert_scale:{color:"#00979D",fontColor:"#fff",skeleton:"basic_string_field",statements:[],params:[{type:"DropdownDynamic",value:null,fontSize:11},{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Block",accept:"string"}, +{type:"Block",accept:"string"}],events:{},def:{params:[null,{type:"number",params:["0"]},{type:"number",params:["1023"]},{type:"number",params:["-100"]},{type:"number",params:["100"]}],type:"bitbrick_convert_scale"},paramsKeyMap:{PORT:0,VALUE2:1,VALUE3:2,VALUE4:3,VALUE5:4},"class":"condition",isNotFor:["bitbrick"],func:function(b,a){var c=a.getNumberField("PORT"),d=Entry.hw.portData[c].value,c=a.getNumberValue("VALUE2",a),e=a.getNumberValue("VALUE3",a),f=a.getNumberValue("VALUE4",a),g=a.getNumberValue("VALUE5", +a);if(f>g)var h=f,f=g,g=h;d-=c;d*=(g-f)/(e-c);d+=f;d=Math.min(g,d);d=Math.max(f,d);return Math.round(d)}},start_drawing:{color:"#FF9E20",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/brush_03.png",size:12}],events:{},def:{params:[null],type:"start_drawing"},"class":"brush_control",isNotFor:["textBox"],func:function(b,a){b.brush?b.brush.stop=!1:Entry.setBasicBrush(b);Entry.stage.sortZorder();b.brush.moveTo(b.getX(),-1*b.getY());return a.callReturn()}}, +stop_drawing:{color:"#FF9E20",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/brush_03.png",size:12}],events:{},def:{params:[null],type:"stop_drawing"},"class":"brush_control",isNotFor:["textBox"],func:function(b,a){b.brush&&b.shape&&(b.brush.stop=!0);return a.callReturn()}},set_color:{color:"#FF9E20",skeleton:"basic",statements:[],params:[{type:"Color"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/brush_03.png",size:12}],events:{},def:{params:[null], +type:"set_color"},paramsKeyMap:{VALUE:0},"class":"brush_color",isNotFor:["textBox"],func:function(b,a){var c=a.getField("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);b.brush&&(c=Entry.hex2rgb(c),b.brush.rgb=c,b.brush.endStroke(),b.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+b.brush.opacity/100+")"),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()}},set_random_color:{color:"#FF9E20",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/brush_03.png", +size:12}],events:{},def:{params:[null],type:"set_random_color"},"class":"brush_color",isNotFor:["textBox"],func:function(b,a){b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);if(b.brush){var c=Entry.generateRgb();b.brush.rgb=c;b.brush.endStroke();b.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+b.brush.opacity/100+")");b.brush.moveTo(b.getX(),-1*b.getY())}return a.callReturn()}},change_thickness:{color:"#FF9E20",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator", +img:"/lib/entryjs/images/block_icon/brush_03.png",size:12}],events:{},def:{params:[{type:"number",params:["1"]},null],type:"change_thickness"},paramsKeyMap:{VALUE:0},"class":"brush_thickness",isNotFor:["textBox"],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);b.brush&&(b.brush.thickness+=c,1>b.brush.thickness&&(b.brush.thickness=1),b.brush.setStrokeStyle(b.brush.thickness),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()}},set_thickness:{color:"#FF9E20", +skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/brush_03.png",size:12}],events:{},def:{params:[{type:"number",params:["1"]},null],type:"set_thickness"},paramsKeyMap:{VALUE:0},"class":"brush_thickness",isNotFor:["textBox"],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);b.brush&&(b.brush.thickness=c,b.brush.setStrokeStyle(b.brush.thickness),b.brush.moveTo(b.getX(),-1*b.getY())); +return a.callReturn()}},change_opacity:{color:"#FF9E20",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/brush_03.png",size:12}],events:{},def:{params:[{type:"number",params:["10"]},null],type:"change_opacity"},paramsKeyMap:{VALUE:0},"class":"brush_opacity",isNotFor:["textBox"],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);c=Entry.adjustValueWithMaxMin(b.brush.opacity+ +c,0,100);b.brush&&(b.brush.opacity=c,b.brush.endStroke(),c=b.brush.rgb,b.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+b.brush.opacity/100+")"),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()}},set_opacity:{color:"#FF9E20",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/brush_03.png",size:12}],events:{},def:{params:[{type:"number",params:["50"]},null],type:"set_opacity"},paramsKeyMap:{VALUE:0},"class":"brush_opacity", +isNotFor:["textBox"],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);b.brush&&(b.brush.opacity=Entry.adjustValueWithMaxMin(c,0,100),b.brush.endStroke(),c=b.brush.rgb,b.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+b.brush.opacity/100+")"),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()}},brush_erase_all:{color:"#FF9E20",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/brush_03.png",size:12}], +events:{},def:{params:[null],type:"brush_erase_all"},"class":"brush_clear",isNotFor:["textBox"],func:function(b,a){var c=b.brush;if(c){var d=c._stroke.style,e=c._strokeStyle.width;c.clear().setStrokeStyle(e).beginStroke(d);c.moveTo(b.getX(),-1*b.getY())}c=b.parent.getStampEntities();c.map(function(a){a.removeClone()});c=null;return a.callReturn()}},brush_stamp:{color:"#FF9E20",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/brush_03.png",size:12}],events:{}, +def:{params:[null],type:"brush_stamp"},"class":"stamp",isNotFor:["textBox"],func:function(b,a){b.parent.addStampEntity(b);return a.callReturn()}},change_brush_transparency:{color:"#FF9E20",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/brush_03.png",size:12}],events:{},def:{params:[{type:"number",params:["10"]},null],type:"change_brush_transparency"},paramsKeyMap:{VALUE:0},"class":"brush_opacity",isNotFor:["textBox"],func:function(b, +a){var c=a.getNumberValue("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);c=Entry.adjustValueWithMaxMin(b.brush.opacity-c,0,100);b.brush&&(b.brush.opacity=c,b.brush.endStroke(),c=b.brush.rgb,b.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+b.brush.opacity/100+")"),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()}},set_brush_tranparency:{color:"#FF9E20",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/brush_03.png", +size:12}],events:{},def:{params:[{type:"number",params:["50"]},null],type:"set_brush_tranparency"},paramsKeyMap:{VALUE:0},"class":"brush_opacity",isNotFor:["textBox"],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.brush||(Entry.setBasicBrush(b),b.brush.stop=!0);b.brush&&(b.brush.opacity=Entry.adjustValueWithMaxMin(c,0,100),b.brush.endStroke(),c=b.brush.rgb,b.brush.beginStroke("rgba("+c.r+","+c.g+","+c.b+","+(1-b.brush.opacity/100)+")"),b.brush.moveTo(b.getX(),-1*b.getY()));return a.callReturn()}}, +number:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"TextInput",value:10}],events:{},def:{params:[]},paramsKeyMap:{NUM:0},func:function(b,a){return a.getField("NUM",a)},isPrimitive:!0},angle:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Angle"}],events:{},def:{params:[null],type:"angle"},paramsKeyMap:{ANGLE:0},func:function(b,a){return a.getNumberField("ANGLE")}},get_x_coordinate:{color:"#FFD974",skeleton:"basic_string_field",statements:[], +params:[{type:"Text",text:Lang.Blocks.CALC_get_x_coordinate,color:"#3D3D3D"}],events:{},def:{params:[null],type:"get_x_coordinate"},"class":"calc",isNotFor:[],func:function(b,a){return b.getX()}},get_y_coordinate:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_get_y_coordinate,color:"#3D3D3D"}],events:{},def:{params:[null],type:"get_y_coordinate"},"class":"calc",isNotFor:[],func:function(b,a){return b.getY()}},get_angle:{color:"#FFD974",skeleton:"basic_string_field", +statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_get_angle,color:"#3D3D3D"}],events:{},def:{params:[null]},func:function(b,a){return parseFloat(b.getRotation().toFixed(1))}},get_rotation_direction:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Dropdown",options:[[Lang.Blocks.CALC_rotation_value,"ROTATION"],[Lang.Blocks.CALC_direction_value,"DIRECTION"]],value:"ROTATION",fontSize:11}],events:{},def:{params:[null],type:"get_rotation_direction"},paramsKeyMap:{OPERATOR:0}, +"class":"calc",isNotFor:[],func:function(b,a){return"DIRECTION"==a.getField("OPERATOR",a).toUpperCase()?parseFloat(b.getDirection().toFixed(1)):parseFloat(b.getRotation().toFixed(1))}},distance_something:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_distance_something_1,color:"#3D3D3D"},{type:"DropdownDynamic",value:null,menuName:"spritesWithMouse",fontSize:11},{type:"Text",text:Lang.Blocks.CALC_distance_something_2,color:"#3D3D3D"}],events:{}, +def:{params:[null,null,null],type:"distance_something"},paramsKeyMap:{VALUE:1},"class":"calc_distance",isNotFor:[],func:function(b,a){var c=a.getField("VALUE",a);if("mouse"==c)return c=Entry.stage.mouseCoordinate,Math.sqrt(Math.pow(b.getX()-c.x,2)+Math.pow(b.getY()-c.y,2));c=Entry.container.getEntity(c);return Math.sqrt(Math.pow(b.getX()-c.getX(),2)+Math.pow(b.getY()-c.getY(),2))}},coordinate_mouse:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_coordinate_mouse_1, +color:"#3D3D3D"},{type:"Dropdown",options:[["x","x"],["y","y"]],value:"x",fontSize:11},{type:"Text",text:Lang.Blocks.CALC_coordinate_mouse_2,color:"#3D3D3D"}],events:{},def:{params:[null,null,null],type:"coordinate_mouse"},paramsKeyMap:{VALUE:1},"class":"calc",isNotFor:[],func:function(b,a){return"x"===a.getField("VALUE",a)?Number(Entry.stage.mouseCoordinate.x):Number(Entry.stage.mouseCoordinate.y)}},coordinate_object:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text", +text:Lang.Blocks.CALC_coordinate_object_1,color:"#3D3D3D"},{type:"DropdownDynamic",value:null,menuName:"spritesWithSelf",fontSize:11},{type:"Text",text:Lang.Blocks.CALC_coordinate_object_2,color:"#3D3D3D"},{type:"Dropdown",options:[[Lang.Blocks.CALC_coordinate_x_value,"x"],[Lang.Blocks.CALC_coordinate_y_value,"y"],[Lang.Blocks.CALC_coordinate_rotation_value,"rotation"],[Lang.Blocks.CALC_coordinate_direction_value,"direction"],[Lang.Blocks.CALC_coordinate_size_value,"size"],[Lang.Blocks.CALC_picture_index, +"picture_index"],[Lang.Blocks.CALC_picture_name,"picture_name"]],value:"x",fontSize:11}],events:{},def:{params:[null,null,null,null],type:"coordinate_object"},paramsKeyMap:{VALUE:1,COORDINATE:3},"class":"calc",isNotFor:[],func:function(b,a){var c=a.getField("VALUE",a),c="self"==c?b:Entry.container.getEntity(c);switch(a.getField("COORDINATE",a)){case "x":return c.getX();case "y":return c.getY();case "rotation":return c.getRotation();case "direction":return c.getDirection();case "picture_index":var d= +c.parent,d=d.pictures;return d.indexOf(c.picture)+1;case "size":return Number(c.getSize().toFixed(1));case "picture_name":return d=c.parent,d=d.pictures,d[d.indexOf(c.picture)].name}}},calc_basic:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Block",accept:"string"},{type:"Dropdown",options:[["+","PLUS"],["-","MINUS"],["x","MULTI"],["/","DIVIDE"]],value:"PLUS",fontSize:11,noArrow:!0},{type:"Block",accept:"string"}],events:{},def:{params:[{type:"number",params:["10"]}, +"PLUS",{type:"number",params:["10"]}],type:"calc_basic"},defs:[{params:[{type:"number",params:["10"]},"PLUS",{type:"number",params:["10"]}],type:"calc_basic"},{params:[{type:"number",params:["10"]},"MINUS",{type:"number",params:["10"]}],type:"calc_basic"},{params:[{type:"number",params:["10"]},"MULTI",{type:"number",params:["10"]}],type:"calc_basic"},{params:[{type:"number",params:["10"]},"DIVIDE",{type:"number",params:["10"]}],type:"calc_basic"}],paramsKeyMap:{LEFTHAND:0,OPERATOR:1,RIGHTHAND:2}, +"class":"calc",isNotFor:[],func:function(b,a){var c=a.getField("OPERATOR",a),d=a.getNumberValue("LEFTHAND",a),e=a.getNumberValue("RIGHTHAND",a);return"PLUS"==c?d+e:"MINUS"==c?d-e:"MULTI"==c?d*e:d/e}},calc_plus:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Block",accept:"string"},{type:"Text",text:"+",color:"#3D3D3D"},{type:"Block",accept:"string"}],events:{},def:{params:[null]},paramsKeyMap:{LEFTHAND:0,RIGHTHAND:2},func:function(b,a){var c=a.getNumberValue("LEFTHAND", +a),d=a.getNumberValue("RIGHTHAND",a);return c+d}},calc_minus:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Block",accept:"string"},{type:"Text",text:"-",color:"#3D3D3D"},{type:"Block",accept:"string"}],events:{},def:{params:[null]},paramsKeyMap:{LEFTHAND:0,RIGHTHAND:2},func:function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return c-d}},calc_times:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Block",accept:"string"}, +{type:"Text",text:"x",color:"#3D3D3D"},{type:"Block",accept:"string"}],events:{},def:{params:[null]},paramsKeyMap:{LEFTHAND:0,RIGHTHAND:2},func:function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return c*d}},calc_divide:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Block",accept:"string"},{type:"Text",text:"/",color:"#3D3D3D"},{type:"Block",accept:"string"}],events:{},def:{params:[null]},paramsKeyMap:{LEFTHAND:0,RIGHTHAND:2},func:function(b, +a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return c/d}},calc_mod:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Block",accept:"string"},{type:"Text",text:"/",color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_calc_mod_3,color:"#3D3D3D"}],events:{},def:{params:[{type:"number",params:["10"]},null,{type:"number",params:["10"]},null],type:"calc_mod"},paramsKeyMap:{LEFTHAND:0,RIGHTHAND:2},"class":"calc",isNotFor:[], +func:function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return c%d}},calc_share:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Block",accept:"string"},{type:"Text",text:"/",color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:"\uc758 \ubaab",color:"#3D3D3D"}],events:{},def:{params:[{type:"number",params:["10"]},null,{type:"number",params:["10"]},null],type:"calc_share"},paramsKeyMap:{LEFTHAND:0,RIGHTHAND:2},"class":"calc", +isNotFor:[],func:function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a);return Math.floor(c/d)}},calc_operation:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_calc_operation_of_1,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_calc_operation_of_2,color:"#3D3D3D"},{type:"Dropdown",options:[[Lang.Blocks.CALC_calc_operation_square,"square"],[Lang.Blocks.CALC_calc_operation_root,"root"], +[Lang.Blocks.CALC_calc_operation_sin,"sin"],[Lang.Blocks.CALC_calc_operation_cos,"cos"],[Lang.Blocks.CALC_calc_operation_tan,"tan"],[Lang.Blocks.CALC_calc_operation_asin,"asin_radian"],[Lang.Blocks.CALC_calc_operation_acos,"acos_radian"],[Lang.Blocks.CALC_calc_operation_atan,"atan_radian"],[Lang.Blocks.CALC_calc_operation_log,"log"],[Lang.Blocks.CALC_calc_operation_ln,"ln"],[Lang.Blocks.CALC_calc_operation_unnatural,"unnatural"],[Lang.Blocks.CALC_calc_operation_floor,"floor"],[Lang.Blocks.CALC_calc_operation_ceil, +"ceil"],[Lang.Blocks.CALC_calc_operation_round,"round"],[Lang.Blocks.CALC_calc_operation_factorial,"factorial"],[Lang.Blocks.CALC_calc_operation_abs,"abs"]],value:"square",fontSize:11}],events:{},def:{params:[null,{type:"number",params:["10"]},null,null],type:"calc_operation"},paramsKeyMap:{LEFTHAND:1,VALUE:3},"class":"calc",isNotFor:[],func:function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getField("VALUE",a);if(-1<["asin_radian","acos_radian"].indexOf(d)&&(1c))throw Error("x range exceeded"); +d.indexOf("_")&&(d=d.split("_")[0]);-1<["sin","cos","tan"].indexOf(d)&&(c=Entry.toRadian(c));var e=0;switch(d){case "square":e=c*c;break;case "factorial":e=Entry.factorial(c);break;case "root":e=Math.sqrt(c);break;case "log":e=Math.log(c)/Math.LN10;break;case "ln":e=Math.log(c);break;case "asin":case "acos":case "atan":e=Entry.toDegrees(Math[d](c));break;case "unnatural":e=c-Math.floor(c);0>c&&(e=1-e);break;default:e=Math[d](c)}return Math.round(1E3*e)/1E3}},calc_rand:{color:"#FFD974",skeleton:"basic_string_field", +statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_calc_rand_1,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_calc_rand_2,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_calc_rand_3,color:"#3D3D3D"}],events:{},def:{params:[null,{type:"number",params:["0"]},null,{type:"number",params:["10"]},null],type:"calc_rand"},paramsKeyMap:{LEFTHAND:1,RIGHTHAND:3},"class":"calc",isNotFor:[],func:function(b,a){var c=a.getStringValue("LEFTHAND", +a),d=a.getStringValue("RIGHTHAND",a),e=Math.min(c,d),f=Math.max(c,d),c=Entry.isFloat(c);return Entry.isFloat(d)||c?(Math.random()*(f-e)+e).toFixed(2):Math.floor(Math.random()*(f-e+1)+e)}},get_date:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_get_date_1,color:"#3D3D3D"},{type:"Dropdown",options:[[Lang.Blocks.CALC_get_date_year,"YEAR"],[Lang.Blocks.CALC_get_date_month,"MONTH"],[Lang.Blocks.CALC_get_date_day,"DAY"],[Lang.Blocks.CALC_get_date_hour, +"HOUR"],[Lang.Blocks.CALC_get_date_minute,"MINUTE"],[Lang.Blocks.CALC_get_date_second,"SECOND"]],value:"YEAR",fontSize:11},{type:"Text",text:Lang.Blocks.CALC_get_date_2,color:"#3D3D3D"}],events:{},def:{params:[null,"YEAR",null],type:"get_date"},paramsKeyMap:{VALUE:1},"class":"calc_date",isNotFor:[],func:function(b,a){var c=a.getField("VALUE",a),d=new Date;return"YEAR"==c?d.getFullYear():"MONTH"==c?d.getMonth()+1:"DAY"==c?d.getDate():"HOUR"==c?d.getHours():"MINUTE"==c?d.getMinutes():d.getSeconds()}}, +get_sound_duration:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_get_sound_duration_1,color:"#3D3D3D"},{type:"DropdownDynamic",value:null,menuName:"sounds",fontSize:11},{type:"Text",text:Lang.Blocks.CALC_get_sound_duration_2,color:"#3D3D3D"}],events:{},def:{params:[null,null,null],type:"get_sound_duration"},paramsKeyMap:{VALUE:1},"class":"calc_duration",isNotFor:[],func:function(b,a){for(var c=a.getField("VALUE",a),d=b.parent.sounds,e=0;e< +d.length;e++)if(d[e].id==c)return d[e].duration}},reset_project_timer:{color:"#FFD974",skeleton:"basic",statements:[],params:[{type:"Text",text:"\ucd08\uc2dc\uacc4 \ucd08\uae30\ud654",color:"#3D3D3D"}],events:{viewAdd:[function(){Entry.engine&&Entry.engine.showProjectTimer()}],viewDestroy:[function(b){Entry.engine&&Entry.engine.hideProjectTimer(b)}]},def:{params:[null],type:"reset_project_timer"},"class":"calc_timer",isNotFor:[],func:function(b,a){Entry.engine.updateProjectTimer(0);return a.callReturn()}}, +set_visible_project_timer:{color:"#FFD974",skeleton:"basic",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_timer_visible_1,color:"#3D3D3D"},{type:"Dropdown",options:[[Lang.Blocks.CALC_timer_visible_show,"SHOW"],[Lang.Blocks.CALC_timer_visible_hide,"HIDE"]],value:"SHOW",fontSize:11},{type:"Text",text:Lang.Blocks.CALC_timer_visible_2,color:"#3D3D3D"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/calc_01.png",size:12}],events:{viewAdd:[function(){Entry.engine&&Entry.engine.showProjectTimer()}], +viewDestroy:[function(b){Entry.engine&&Entry.engine.hideProjectTimer(b)}]},def:{params:[null,"HIDE",null,null],type:"set_visible_project_timer"},paramsKeyMap:{ACTION:1},"class":"calc_timer",isNotFor:[],func:function(b,a){var c=a.getField("ACTION",a),d=Entry.engine.projectTimer;"SHOW"==c?d.setVisible(!0):d.setVisible(!1);return a.callReturn()}},timer_variable:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:"\ucd08\uc2dc\uacc4 \uac12",color:"#3D3D3D"},{type:"Text", +text:" ",color:"#3D3D3D"}],events:{},def:{params:[null,null]},func:function(b,a){return Entry.container.inputValue.getValue()}},get_project_timer_value:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_get_timer_value,color:"#3D3D3D"},{type:"Text",text:"",color:"#3D3D3D"}],events:{viewAdd:[function(){Entry.engine&&Entry.engine.showProjectTimer()}],viewDestroy:[function(b){Entry.engine&&Entry.engine.hideProjectTimer(b)}]},def:{params:[null,null], +type:"get_project_timer_value"},"class":"calc_timer",isNotFor:[],func:function(b,a){return Entry.engine.projectTimer.getValue()}},char_at:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_char_at_1,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_char_at_2,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_char_at_3,color:"#3D3D3D"}],events:{},def:{params:[null,{type:"text",params:[Lang.Blocks.hi_entry]}, +null,{type:"number",params:["1"]},null],type:"char_at"},paramsKeyMap:{LEFTHAND:1,RIGHTHAND:3},"class":"calc_string",isNotFor:[],func:function(b,a){var c=a.getStringValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND",a)-1;if(0>d||d>c.length-1)throw Error();return c[d]}},length_of_string:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_length_of_string_1,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_length_of_string_2, +color:"#3D3D3D"}],events:{},def:{params:[null,{type:"text",params:[Lang.Blocks.entry]},null],type:"length_of_string"},paramsKeyMap:{STRING:1},"class":"calc_string",isNotFor:[],func:function(b,a){return a.getStringValue("STRING",a).length}},substring:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_substring_1,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_substring_2,color:"#3D3D3D"},{type:"Block",accept:"string"}, +{type:"Text",text:Lang.Blocks.CALC_substring_3,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_substring_4,color:"#3D3D3D"}],events:{},def:{params:[null,{type:"text",params:[Lang.Blocks.hi_entry]},null,{type:"number",params:["2"]},null,{type:"number",params:["5"]},null],type:"substring"},paramsKeyMap:{STRING:1,START:3,END:5},"class":"calc_string",isNotFor:[],func:function(b,a){var c=a.getStringValue("STRING",a),d=a.getNumberValue("START",a)-1,e=a.getNumberValue("END", +a)-1,f=c.length-1;if(0>d||0>e||d>f||e>f)throw Error();return c.substring(Math.min(d,e),Math.max(d,e)+1)}},replace_string:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_replace_string_1,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_replace_string_2,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_replace_string_3,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text", +text:Lang.Blocks.CALC_replace_string_4,color:"#3D3D3D"}],events:{},def:{params:[null,{type:"text",params:[Lang.Blocks.hi_entry]},null,{type:"text",params:[Lang.Blocks.hello]},null,{type:"text",params:[Lang.Blocks.nice]},null],type:"replace_string"},paramsKeyMap:{STRING:1,OLD_WORD:3,NEW_WORD:5},"class":"calc_string",isNotFor:[],func:function(b,a){return a.getStringValue("STRING",a).replace(new RegExp(a.getStringValue("OLD_WORD",a),"gm"),a.getStringValue("NEW_WORD",a))}},change_string_case:{color:"#FFD974", +skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_change_string_case_1,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_change_string_case_2,color:"#3D3D3D"},{type:"Dropdown",options:[[Lang.Blocks.CALC_change_string_case_sub_1,"toUpperCase"],[Lang.Blocks.CALC_change_string_case_sub_2,"toLowerCase"]],value:"toUpperCase",fontSize:11},{type:"Text",text:Lang.Blocks.CALC_change_string_case_3,color:"#3D3D3D"}],events:{},def:{params:[null, +{type:"text",params:["Hello Entry!"]},null,null,null],type:"change_string_case"},paramsKeyMap:{STRING:1,CASE:3},"class":"calc_string",isNotFor:[],func:function(b,a){return a.getStringValue("STRING",a)[a.getField("CASE",a)]()}},index_of_string:{color:"#FFD974",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.CALC_index_of_string_1,color:"#3D3D3D"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.CALC_index_of_string_2,color:"#3D3D3D"},{type:"Block",accept:"string"}, +{type:"Text",text:Lang.Blocks.CALC_index_of_string_3,color:"#3D3D3D"}],events:{},def:{params:[null,{type:"text",params:[Lang.Blocks.hi_entry]},null,{type:"text",params:[Lang.Blocks.entry]},null],type:"index_of_string"},paramsKeyMap:{LEFTHAND:1,RIGHTHAND:3},"class":"calc_string",isNotFor:[],func:function(b,a){var c=a.getStringValue("LEFTHAND",a),d=a.getStringValue("RIGHTHAND",a),c=c.indexOf(d);return-1c)throw Error(Lang.Blocks.FLOW_repeat_basic_errorMsg);a.iterCount=Math.floor(c)}if(0==a.iterCount||0>a.iterCount)return delete a.isLooped,delete a.iterCount,a.callReturn();a.iterCount--;return a.getStatement("DO",a)}},repeat_inf:{color:"#498deb",skeleton:"basic_loop",statements:[{accept:"basic"}],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/flow_03.png",size:12}],events:{},def:{params:[null],type:"repeat_inf"},statementsKeyMap:{DO:0}, +"class":"repeat",isNotFor:[],func:function(b,a){a.isLooped=!0;return a.getStatement("DO")}},stop_repeat:{color:"#498deb",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/flow_03.png",size:12}],events:{},def:{params:[null],type:"stop_repeat"},"class":"repeat",isNotFor:[],func:function(b,a){return this.executor.breakLoop()}},wait_until_true:{color:"#498deb",skeleton:"basic",statements:[],params:[{type:"Block",accept:"boolean"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/flow_03.png", +size:12}],events:{},def:{params:[{type:"True"},null],type:"wait_until_true"},paramsKeyMap:{BOOL:0},"class":"wait",isNotFor:[],func:function(b,a){return a.getBooleanValue("BOOL",a)?a.callReturn():a}},_if:{color:"#498deb",skeleton:"basic_loop",statements:[{accept:"basic"}],params:[{type:"Block",accept:"boolean"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/flow_03.png",size:12}],events:{},def:{params:[{type:"True"},null],type:"_if"},paramsKeyMap:{BOOL:0},statementsKeyMap:{STACK:0},"class":"condition", +isNotFor:[],func:function(b,a){return a.isCondition?(delete a.isCondition,a.callReturn()):a.getBooleanValue("BOOL",a)?(a.isCondition=!0,a.getStatement("STACK",a)):a.callReturn()}},if_else:{color:"#498deb",skeleton:"basic_double_loop",statements:[{accept:"basic"},{accept:"basic"}],params:[{type:"Block",accept:"boolean"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/flow_03.png",size:12},{type:"LineBreak"}],events:{},def:{params:[{type:"True"},null],type:"if_else"},paramsKeyMap:{BOOL:0},statementsKeyMap:{STACK_IF:0, +STACK_ELSE:1},"class":"condition",isNotFor:[],func:function(b,a){if(a.isCondition)return delete a.isCondition,a.callReturn();var c=a.getBooleanValue("BOOL",a);a.isCondition=!0;return c?a.getStatement("STACK_IF",a):a.getStatement("STACK_ELSE",a)}},create_clone:{color:"#498deb",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,menuName:"clone",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/flow_03.png",size:12}],events:{},def:{params:[null,null],type:"create_clone"}, +paramsKeyMap:{VALUE:0},"class":"clone",isNotFor:[],func:function(b,a){var c=a.getField("VALUE",a),d=a.callReturn();"self"==c?b.parent.addCloneEntity(b.parent,b,null):Entry.container.getObject(c).addCloneEntity(b.parent,null,null);return d}},delete_clone:{color:"#498deb",skeleton:"basic_without_next",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/flow_03.png",size:12}],events:{},def:{params:[null],type:"delete_clone"},"class":"clone",isNotFor:[],func:function(b,a){if(!b.isClone)return a.callReturn(); +b.removeClone();return this.die()}},when_clone_start:{color:"#498deb",skeleton:"basic_event",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/start_icon_clone.png",size:17,position:{x:0,y:-2}}],events:{},def:{params:[null],type:"when_clone_start"},"class":"clone",isNotFor:[],func:function(b,a){return a.callReturn()},event:"when_clone_start"},stop_run:{color:"#498deb",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/flow_03.png", +size:12}],events:{},def:{params:[null]},func:function(b,a){return Entry.engine.toggleStop()}},repeat_while_true:{color:"#498deb",skeleton:"basic_loop",statements:[{accept:"basic"}],params:[{type:"Block",accept:"boolean"},{type:"Dropdown",options:[[Lang.Blocks.FLOW_repeat_while_true_until,"until"],[Lang.Blocks.FLOW_repeat_while_true_while,"while"]],value:"until",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/flow_03.png",size:12}],events:{},def:{params:[{type:"True"},null,null], +type:"repeat_while_true"},paramsKeyMap:{BOOL:0,OPTION:1},statementsKeyMap:{DO:0},"class":"repeat",isNotFor:[],func:function(b,a){var c=a.getBooleanValue("BOOL",a);"until"==a.getField("OPTION",a)&&(c=!c);return(a.isLooped=c)?a.getStatement("DO",a):a.callReturn()}},stop_object:{color:"#498deb",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[[Lang.Blocks.FLOW_stop_object_all,"all"],[Lang.Blocks.FLOW_stop_object_this_object,"thisOnly"],[Lang.Blocks.FLOW_stop_object_this_thread,"thisThread"], +[Lang.Blocks.FLOW_stop_object_other_thread,"otherThread"]],value:"all",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/flow_03.png",size:12}],events:{},def:{params:[null,null],type:"stop_object"},paramsKeyMap:{TARGET:0},"class":"terminate",isNotFor:[],func:function(b,a){var c=a.getField("TARGET",a),d=Entry.container;switch(c){case "all":return d.clearRunningState(),this.die();case "thisOnly":return b.parent.script.clearExecutorsByEntity(b),this.die();case "thisObject":return b.parent.script.clearExecutors(), +this.die();case "thisThread":return this.die();case "otherThread":return b.parent.script.clearExecutors(),b.parent.script.addExecutor(this.executor),a.callReturn()}}},restart_project:{color:"#498deb",skeleton:"basic_without_next",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/flow_03.png",size:12}],events:{},def:{params:[null],type:"restart_project"},"class":"terminate",isNotFor:[],func:function(b,a){Entry.engine.toggleStop();Entry.engine.toggleRun()}},remove_all_clones:{color:"#498deb", +skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/flow_03.png",size:12}],events:{},def:{params:[null],type:"remove_all_clones"},"class":"clone",isNotFor:[],func:function(b,a){var c=b.parent.getClonedEntities();c.map(function(a){a.removeClone()});c=null;return a.callReturn()}},functionAddButton:{skeleton:"basic_button",color:"#eee",isNotFor:["functionInit"],params:[{type:"Text",text:Lang.Workspace.function_create,color:"#333",align:"center"}],events:{mousedown:[function(){Entry.variableContainer.createFunction()}]}}, +function_field_label:{skeleton:"basic_param",isNotFor:["functionEdit"],color:"#f9c535",params:[{type:"TextInput",value:Lang.Blocks.FUNCTION_explanation_1},{type:"Output",accept:"param"}],paramsKeyMap:{NAME:0,NEXT:1},def:{params:["\uc774\ub984"],type:"function_field_label"}},function_field_string:{skeleton:"basic_param",isNotFor:["functionEdit"],color:"#ffd974",params:[{type:"Block",accept:"string",restore:!0},{type:"Output",accept:"param"}],paramsKeyMap:{PARAM:0,NEXT:1},def:{params:[{type:"text", +params:["\ubb38\uc790/\uc22b\uc790\uac12"]}],type:"function_field_string"}},function_field_boolean:{skeleton:"basic_param",isNotFor:["functionEdit"],color:"#aeb8ff",params:[{type:"Block",accept:"boolean",restore:!0},{type:"Output",accept:"param"}],paramsKeyMap:{PARAM:0,NEXT:1},def:{params:[{type:"True",params:["\ud310\ub2e8\uac12"]}],type:"function_field_boolean"}},function_param_string:{skeleton:"basic_string_field",color:"#ffd974",template:"%1 %2",events:{viewAdd:[function(){Entry.Func.refreshMenuCode()}]}, +func:function(){return this.executor.register.params[this.executor.register.paramMap[this.block.type]]}},function_param_boolean:{skeleton:"basic_boolean_field",color:"#aeb8ff",template:"%1 %2",events:{viewAdd:[function(){Entry.Func.refreshMenuCode()}]},func:function(){return this.executor.register.params[this.executor.register.paramMap[this.block.type]]}},function_create:{skeleton:"basic",color:"#cc7337",event:"funcDef",params:[{type:"Block",accept:"param",value:{type:"function_field_label",params:[Lang.Blocks.FUNC]}}, +{type:"Indicator",img:"/lib/entryjs/images/block_icon/function_03.png",size:12}],paramsKeyMap:{FIELD:0},func:function(){}},function_general:{skeleton:"basic",color:"#cc7337",params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/function_03.png",size:12}],events:{dataAdd:[function(b){var a=Entry.variableContainer;a&&a.addRef("_functionRefs",b)}],dataDestroy:[function(b){var a=Entry.variableContainer;a&&a.removeRef("_functionRefs",b)}],dblclick:[function(b){b.getBoard().workspace.getMode()=== +Entry.Workspace.MODE_BOARD&&(b=b.block.type.substr(5),Entry.Func.edit(Entry.variableContainer.functions_[b]))}]},func:function(b){if(!this.initiated){this.initiated=!0;var a=Entry.variableContainer.getFunction(this.block.type.substr(5,9));this.funcCode=a.content;this.funcExecutor=this.funcCode.raiseEvent("funcDef",b)[0];this.funcExecutor.register.params=this.getParams();this.funcExecutor.register.paramMap=a.paramMap}this.funcExecutor.execute();if(!this.funcExecutor.isEnd())return this.funcCode.removeExecutor(this.funcExecutor), +Entry.STATIC.BREAK}},hamster_hand_found:{color:"#00979D",fontColor:"#fff",skeleton:"basic_boolean_field",statements:[],params:[],events:{},def:{params:[],type:"hamster_hand_found"},"class":"hamster_sensor",isNotFor:["hamster"],func:function(b,a){var c=Entry.hw.portData;return 50a.count?(50>d.leftFloor&&50>d.rightFloor?a.count++:a.count=0,d=d.leftFloor-d.rightFloor,c.leftWheel=45+.25*d,c.rightWheel=45-.25*d):(a.count=0,a.boardState=2);break;case 2:d=d.leftFloor-d.rightFloor;c.leftWheel=45+.25*d;c.rightWheel=45-.25*d;a.boardState=3;var e=setTimeout(function(){a.boardState=4;Entry.Hamster.removeTimeout(e)},250); +Entry.Hamster.timeouts.push(e);break;case 3:d=d.leftFloor-d.rightFloor;c.leftWheel=45+.25*d;c.rightWheel=45-.25*d;break;case 4:c.leftWheel=0,c.rightWheel=0,a.boardState=0,a.isMoving=!1}return a}delete a.isStart;delete a.isMoving;delete a.count;delete a.boardState;Entry.engine.isContinue=!1;c.leftWheel=0;c.rightWheel=0;return a.callReturn()}a.isStart=!0;a.isMoving=!0;a.count=0;a.boardState=1;c.leftWheel=45;c.rightWheel=45;Entry.Hamster.setLineTracerMode(c,0);return a}},hamster_turn_once:{color:"#00979D", +skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[[Lang.General.left,"LEFT"],[Lang.General.right,"RIGHT"]],value:"LEFT",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,null],type:"hamster_turn_once"},paramsKeyMap:{DIRECTION:0},"class":"hamster_board",isNotFor:["hamster"],func:function(b,a){var c=Entry.hw.sendQueue,d=Entry.hw.portData;if(a.isStart){if(a.isMoving){if(a.isLeft)switch(a.boardState){case 1:2>a.count? +50d.leftFloor&&(a.boardState=3);break;case 3:2>a.count?20>d.leftFloor&&a.count++:(a.count=0,a.boardState=4);break;case 4:50a.count?50d.rightFloor&&(a.boardState= +3);break;case 3:2>a.count?20>d.rightFloor&&a.count++:(a.count=0,a.boardState=4);break;case 4:50Entry.Hamster.tempo&&(Entry.Hamster.tempo=1);return a.callReturn()}},hamster_set_tempo_to:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[{type:"text",params:["60"]},null],type:"hamster_set_tempo_to"},paramsKeyMap:{VALUE:0},"class":"hamster_buzzer",isNotFor:["hamster"], +func:function(b,a){Entry.Hamster.tempo=a.getNumberValue("VALUE");1>Entry.Hamster.tempo&&(Entry.Hamster.tempo=1);return a.callReturn()}},hamster_set_port_to:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[[Lang.Blocks.HAMSTER_port_a,"A"],[Lang.Blocks.HAMSTER_port_b,"B"],[Lang.Blocks.HAMSTER_port_ab,"AB"]],value:"A",fontSize:11},{type:"Dropdown",options:[[Lang.Blocks.HAMSTER_analog_input,"0"],[Lang.Blocks.HAMSTER_digital_input,"1"],[Lang.Blocks.HAMSTER_servo_output, +"8"],[Lang.Blocks.HAMSTER_pwm_output,"9"],[Lang.Blocks.HAMSTER_digital_output,"10"]],value:"0",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,null,null],type:"hamster_set_port_to"},paramsKeyMap:{PORT:0,MODE:1},"class":"hamster_port",isNotFor:["hamster"],func:function(b,a){var c=Entry.hw.sendQueue,d=a.getField("PORT",a),e=Number(a.getField("MODE",a));"A"==d?c.ioModeA=e:("B"!=d&&(c.ioModeA=e),c.ioModeB=e);return a.callReturn()}}, +hamster_change_output_by:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[[Lang.Blocks.HAMSTER_port_a,"A"],[Lang.Blocks.HAMSTER_port_b,"B"],[Lang.Blocks.HAMSTER_port_ab,"AB"]],value:"A",fontSize:11},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,{type:"text",params:["10"]},null],type:"hamster_change_output_by"},paramsKeyMap:{PORT:0,VALUE:1},"class":"hamster_port",isNotFor:["hamster"], +func:function(b,a){var c=Entry.hw.sendQueue,d=a.getField("PORT"),e=a.getNumberValue("VALUE");"A"==d?c.outputA=void 0!=c.outputA?c.outputA+e:e:("B"!=d&&(c.outputA=void 0!=c.outputA?c.outputA+e:e),c.outputB=void 0!=c.outputB?c.outputB+e:e);return a.callReturn()}},hamster_set_output_to:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[[Lang.Blocks.HAMSTER_port_a,"A"],[Lang.Blocks.HAMSTER_port_b,"B"],[Lang.Blocks.HAMSTER_port_ab,"AB"]],value:"A",fontSize:11},{type:"Block", +accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,{type:"text",params:["100"]},null],type:"hamster_set_output_to"},paramsKeyMap:{PORT:0,VALUE:1},"class":"hamster_port",isNotFor:["hamster"],func:function(b,a){var c=Entry.hw.sendQueue,d=a.getField("PORT"),e=a.getNumberValue("VALUE");"A"==d?c.outputA=e:("B"!=d&&(c.outputA=e),c.outputB=e);return a.callReturn()}},is_clicked:{color:"#AEB8FF",skeleton:"basic_boolean_field",statements:[], +params:[{type:"Text",text:Lang.Blocks.JUDGEMENT_is_clicked,color:"#3D3D3D"}],events:{},def:{params:[null],type:"is_clicked"},"class":"boolean_input",isNotFor:[],func:function(b,a){return Entry.stage.isClick}},is_press_some_key:{color:"#AEB8FF",skeleton:"basic_boolean_field",statements:[],params:[{type:"Keyboard",value:81},{type:"Text",text:Lang.Blocks.JUDGEMENT_is_press_some_key_2,color:"#3D3D3D"}],events:{},def:{params:[null,null],type:"is_press_some_key"},paramsKeyMap:{VALUE:0},"class":"boolean_input", +isNotFor:[],func:function(b,a){var c=Number(a.getField("VALUE",a));return 0<=Entry.pressedKeys.indexOf(c)}},reach_something:{color:"#AEB8FF",skeleton:"basic_boolean_field",statements:[],params:[{type:"Text",text:Lang.Blocks.JUDGEMENT_reach_something_1,color:"#3D3D3D"},{type:"DropdownDynamic",value:null,menuName:"collision",fontSize:11},{type:"Text",text:Lang.Blocks.JUDGEMENT_reach_something_2,color:"#3D3D3D"}],events:{},def:{params:[null,null,null],type:"reach_something"},paramsKeyMap:{VALUE:1},"class":"boolean_collision", +isNotFor:[],func:function(b,a){if(!b.getVisible())return!1;var c=a.getField("VALUE",a),d=b.object,e=/wall/.test(c),f=ndgmr.checkPixelCollision;if(e)switch(e=Entry.stage.wall,c){case "wall":if(f(d,e.up,.2,!0)||f(d,e.down,.2,!0)||f(d,e.left,.2,!0)||f(d,e.right,.2,!0))return!0;break;case "wall_up":if(f(d,e.up,.2,!0))return!0;break;case "wall_down":if(f(d,e.down,.2,!0))return!0;break;case "wall_right":if(f(d,e.right,.2,!0))return!0;break;case "wall_left":if(f(d,e.left,.2,!0))return!0}else{if("mouse"== +c)return f=Entry.stage.canvas,f=d.globalToLocal(f.mouseX,f.mouseY),d.hitTest(f.x,f.y);c=Entry.container.getEntity(c);if("textBox"==c.type||"textBox"==b.type){f=c.object.getTransformedBounds();d=d.getTransformedBounds();if(Entry.checkCollisionRect(d,f))return!0;for(var c=c.parent.clonedEntities,e=0,g=c.length;e","BIGGER"]],value:"EQUAL",fontSize:11},{type:"Block",accept:"string"}],events:{},def:{params:[null],type:"boolean_comparison"},paramsKeyMap:{LEFTHAND:0,OPERATOR:1,RIGHTHAND:2},func:function(b,a){var c=a.getField("OPERATOR", +a),d=a.getNumberValue("LEFTHAND",a),e=a.getNumberValue("RIGHTHAND",a);return"EQUAL"==c?d==e:"BIGGER"==c?d>e:d",color:"#3D3D3D"},{type:"Block",accept:"string"}],events:{},def:{params:[{type:"number",params:["10"]},null,{type:"number",params:["10"]}],type:"boolean_bigger"},paramsKeyMap:{LEFTHAND:0,RIGHTHAND:2},"class":"boolean_compare",isNotFor:[],func:function(b,a){var c=a.getNumberValue("LEFTHAND", +a),d=a.getNumberValue("RIGHTHAND",a);return c>d}},boolean_smaller:{color:"#AEB8FF",skeleton:"basic_boolean_field",statements:[],params:[{type:"Block",accept:"string"},{type:"Text",text:"<",color:"#3D3D3D"},{type:"Block",accept:"string"}],events:{},def:{params:[{type:"number",params:["10"]},null,{type:"number",params:["10"]}],type:"boolean_smaller"},paramsKeyMap:{LEFTHAND:0,RIGHTHAND:2},"class":"boolean_compare",isNotFor:[],func:function(b,a){var c=a.getNumberValue("LEFTHAND",a),d=a.getNumberValue("RIGHTHAND", +a);return c","GREATER"],["<","LESS"],["\u2265","GREATER_OR_EQUAL"],["\u2264","LESS_OR_EQUAL"]],value:"EQUAL",fontSize:11,noArrow:!0},{type:"Block",accept:"string"}],events:{},def:{params:[{type:"text",params:["10"]},"EQUAL",{type:"text",params:["10"]}], +type:"boolean_basic_operator"},defs:[{params:[{type:"text",params:["10"]},"EQUAL",{type:"text",params:["10"]}],type:"boolean_basic_operator"},{params:[{type:"text",params:["10"]},"GREATER",{type:"text",params:["10"]}],type:"boolean_basic_operator"},{params:[{type:"text",params:["10"]},"LESS",{type:"text",params:["10"]}],type:"boolean_basic_operator"},{params:[{type:"text",params:["10"]},"GREATER_OR_EQUAL",{type:"text",params:["10"]}],type:"boolean_basic_operator"},{params:[{type:"text",params:["10"]}, +"LESS_OR_EQUAL",{type:"text",params:["10"]}],type:"boolean_basic_operator"}],paramsKeyMap:{LEFTHAND:0,OPERATOR:1,RIGHTHAND:2},"class":"boolean_compare",isNotFor:[],func:function(b,a){var c=a.getField("OPERATOR",a),d=a.getStringValue("LEFTHAND",a),e=a.getStringValue("RIGHTHAND",a);switch(c){case "EQUAL":return d==e;case "GREATER":return Number(d)>Number(e);case "LESS":return Number(d)=Number(e);case "LESS_OR_EQUAL":return Number(d)<=Number(e)}}}, +show:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[null],type:"show"},"class":"visibility",isNotFor:[],func:function(b,a){b.setVisible(!0);return a.callReturn()}},hide:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[null],type:"hide"},"class":"visibility",isNotFor:[],func:function(b, +a){b.setVisible(!1);return a.callReturn()}},dialog_time:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Dropdown",options:[[Lang.Blocks.speak,"speak"]],value:"speak",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[{type:"text",params:[Lang.Blocks.block_hi]},{type:"number",params:["4"]},null,null],type:"dialog_time"},paramsKeyMap:{VALUE:0,SECOND:1,OPTION:2}, +"class":"say",isNotFor:["textBox"],func:function(b,a){if(!a.isStart){var c=a.getNumberValue("SECOND",a),d=a.getStringValue("VALUE",a),e=a.getField("OPTION",a);a.isStart=!0;a.timeFlag=1;d||"number"==typeof d||(d=" ");d=Entry.convertToRoundedDecimals(d,3);new Entry.Dialog(b,d,e);b.syncDialogVisible(b.getVisible());setTimeout(function(){a.timeFlag=0},1E3*c)}return 0==a.timeFlag?(delete a.timeFlag,delete a.isStart,b.dialog&&b.dialog.remove(),a.callReturn()):a}},dialog:{color:"#EC4466",skeleton:"basic", +statements:[],params:[{type:"Block",accept:"string"},{type:"Dropdown",options:[[Lang.Blocks.speak,"speak"]],value:"speak",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[{type:"text",params:[Lang.Blocks.block_hi]},null,null],type:"dialog"},paramsKeyMap:{VALUE:0,OPTION:1},"class":"say",isNotFor:["textBox"],func:function(b,a){var c=a.getStringValue("VALUE",a);c||"number"==typeof c||(c=" ");var d=a.getField("OPTION",a),c=Entry.convertToRoundedDecimals(c, +3);new Entry.Dialog(b,c,d);b.syncDialogVisible(b.getVisible());return a.callReturn()}},remove_dialog:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[null],type:"remove_dialog"},"class":"say",isNotFor:["textBox"],func:function(b,a){b.dialog&&b.dialog.remove();return a.callReturn()}},change_to_nth_shape:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null, +menuName:"pictures",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[null,null],type:"change_to_nth_shape"},paramsKeyMap:{VALUE:0},"class":"shape",isNotFor:[],func:function(b,a){var c=a.getField("VALUE",a),c=b.parent.getPicture(c);b.setImage(c);return a.callReturn()}},change_to_next_shape:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[[Lang.Blocks.LOOKS_change_shape_next,"next"],[Lang.Blocks.LOOKS_change_shape_prev, +"prev"]],value:"next",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[null,null],type:"change_to_next_shape"},paramsKeyMap:{DRIECTION:0},"class":"shape",isNotFor:["textBox"],func:function(b,a){var c;c=a.fields&&"prev"===a.getStringField("DRIECTION")?b.parent.getPrevPicture(b.picture.id):b.parent.getNextPicture(b.picture.id);b.setImage(c);return a.callReturn()}},set_effect_volume:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"Dropdown", +options:[[Lang.Blocks.color,"color"],[Lang.Blocks.brightness,"brightness"],[Lang.Blocks.opacity,"opacity"]],value:"color",fontSize:11},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[null,{type:"number",params:["10"]},null],type:"set_effect_volume"},paramsKeyMap:{EFFECT:0,VALUE:1},"class":"effect",isNotFor:["textBox"],func:function(b,a){var c=a.getField("EFFECT",a),d=a.getNumberValue("VALUE",a);"color"==c?b.effect.hue= +d+b.effect.hue:"lens"!=c&&"swriling"!=c&&"pixel"!=c&&"mosaic"!=c&&("brightness"==c?b.effect.brightness=d+b.effect.brightness:"blur"!=c&&"opacity"==c&&(b.effect.alpha+=d/100));b.applyFilter();return a.callReturn()}},set_effect:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[[Lang.Blocks.color,"color"],[Lang.Blocks.brightness,"brightness"],[Lang.Blocks.opacity,"opacity"]],value:"color",fontSize:11},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png", +size:12}],events:{},def:{params:[null,{type:"number",params:["100"]},null],type:"set_effect"},paramsKeyMap:{EFFECT:0,VALUE:1},"class":"effect",isNotFor:["textBox"],func:function(b,a){var c=a.getField("EFFECT",a),d=a.getNumberValue("VALUE",a);"color"==c?b.effect.hue=d:"lens"!=c&&"swriling"!=c&&"pixel"!=c&&"mosaic"!=c&&("brightness"==c?b.effect.brightness=d:"blur"!=c&&"opacity"==c&&(b.effect.alpha=d/100));b.applyFilter();return a.callReturn()}},erase_all_effects:{color:"#EC4466",skeleton:"basic",statements:[], +params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[null],type:"erase_all_effects"},"class":"effect",isNotFor:["textBox"],func:function(b,a){b.resetFilter();return a.callReturn()}},change_scale_percent:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[{type:"number",params:["10"]},null],type:"change_scale_percent"}, +paramsKeyMap:{VALUE:0},"class":"scale",isNotFor:[],func:function(b,a){var c=(a.getNumberValue("VALUE",a)+100)/100;b.setScaleX(b.getScaleX()*c);b.setScaleY(b.getScaleY()*c);return a.callReturn()}},set_scale_percent:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[{type:"number",params:["100"]},null],type:"set_scale_percent"},paramsKeyMap:{VALUE:0},"class":"scale", +isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a)/100,d=b.snapshot_;b.setScaleX(c*d.scaleX);b.setScaleY(c*d.scaleY);return a.callReturn()}},change_scale_size:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[{type:"number",params:["10"]},null],type:"change_scale_size"},paramsKeyMap:{VALUE:0},"class":"scale",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE", +a);b.setSize(b.getSize()+c);return a.callReturn()}},set_scale_size:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[{type:"number",params:["100"]},null],type:"set_scale_size"},paramsKeyMap:{VALUE:0},"class":"scale",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setSize(c);return a.callReturn()}},flip_y:{color:"#EC4466",skeleton:"basic",statements:[], +params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[null],type:"flip_y"},"class":"flip",isNotFor:[],func:function(b,a){b.setScaleX(-1*b.getScaleX());return a.callReturn()}},flip_x:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[null],type:"flip_x"},"class":"flip",isNotFor:[],func:function(b,a){b.setScaleY(-1*b.getScaleY());return a.callReturn()}}, +set_object_order:{color:"#EC4466",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,menuName:"objectSequence",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/looks_03.png",size:12}],events:{},def:{params:[null,null],type:"set_object_order"},paramsKeyMap:{VALUE:0},"class":"z-index",isNotFor:[],func:function(b,a){var c=a.getField("VALUE",a),d=Entry.container.getCurrentObjects().indexOf(b.parent);if(-1f)throw Error("object is not available for current scene");switch(d){case "FRONT":c=0;break;case "FORWARD":c=Math.max(0,f-1);break;case "BACKWARD":c=Math.min(e,f+1);break;case "BACK":c=e}Entry.container.moveElementByBlock(f, +c);return a.callReturn()}},move_direction:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number",params:["10"]},null],type:"move_direction"},paramsKeyMap:{VALUE:0},"class":"walk",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setX(b.getX()+c*Math.cos((b.getRotation()+b.getDirection()-90)/180*Math.PI));b.setY(b.getY()-c*Math.sin((b.getRotation()+ +b.getDirection()-90)/180*Math.PI));b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}},move_x:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number",params:["10"]},null],type:"move_x"},paramsKeyMap:{VALUE:0},"class":"move_relative",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setX(b.getX()+c);b.brush&& +!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}},move_y:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number",params:["10"]},null],type:"move_y"},paramsKeyMap:{VALUE:0},"class":"move_relative",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setY(b.getY()+c);b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(), +-1*b.getY());return a.callReturn()}},locate_xy_time:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number",params:["2"]},{type:"number",params:["10"]},{type:"number",params:["10"]},null],type:"locate_xy_time"},paramsKeyMap:{VALUE1:0,VALUE2:1,VALUE3:2},"class":"move_absolute",isNotFor:[],func:function(b, +a){if(!a.isStart){var c;c=a.getNumberValue("VALUE1",a);a.isStart=!0;a.frameCount=Math.floor(c*Entry.FPS);a.x=a.getNumberValue("VALUE2",a);a.y=a.getNumberValue("VALUE3",a)}if(0!=a.frameCount){c=a.x-b.getX();var d=a.y-b.getY();c/=a.frameCount;d/=a.frameCount;b.setX(b.getX()+c);b.setY(b.getY()+d);a.frameCount--;b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a}delete a.isStart;delete a.frameCount;return a.callReturn()}},rotate_by_angle:{color:"#A751E3",skeleton:"basic",statements:[], +params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number",params:["90"]},null],type:"rotate_by_angle"},paramsKeyMap:{VALUE:0},"class":"rotate",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setRotation(b.getRotation()+c);return a.callReturn()}},rotate_by_angle_dropdown:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[["45","45"],["90","90"],["135", +"135"],["180","180"]],value:"45",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:["45",null],type:"rotate_by_angle_dropdown"},paramsKeyMap:{VALUE:0},"class":"ebs",isNotFor:[],func:function(b,a){var c=a.getField("VALUE",a);b.setRotation(b.getRotation()+Number(c));return a.callReturn()}},see_angle:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png", +size:12}],events:{},def:{params:[{type:"number",params:["90"]},null],type:"see_angle"},paramsKeyMap:{VALUE:0},"class":"rotate",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setDirection(c);return a.callReturn()}},see_direction:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,menuName:"sprites",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[null,null]},paramsKeyMap:{VALUE:0}, +func:function(b,a){var c=a.getField("VALUE",a),d=Entry.container.getEntity(c),c=d.getX()-b.getX(),d=d.getY()-b.getY();0<=c?b.setRotation(Math.atan(d/c)/Math.PI*180+90):b.setRotation(Math.atan(d/c)/Math.PI*180+270);return a.callReturn()}},locate_xy:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number",params:["0"]},{type:"number", +params:["0"]},null],type:"locate_xy"},paramsKeyMap:{VALUE1:0,VALUE2:1},"class":"move_absolute",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE1",a);b.setX(c);c=a.getNumberValue("VALUE2",a);b.setY(c);b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}},locate_x:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number", +params:["10"]},null],type:"locate_x"},paramsKeyMap:{VALUE:0},"class":"move_absolute",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setX(c);b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}},locate_y:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number",params:["10"]},null],type:"locate_y"},paramsKeyMap:{VALUE:0}, +"class":"move_absolute",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setY(c);b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}},locate:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,menuName:"spritesWithMouse",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[null,null],type:"locate"},paramsKeyMap:{VALUE:0},"class":"move_absolute",isNotFor:[], +func:function(b,a){var c=a.getField("VALUE",a),d;"mouse"==c?(c=Entry.stage.mouseCoordinate.x,d=Entry.stage.mouseCoordinate.y):(d=Entry.container.getEntity(c),c=d.getX(),d=d.getY());b.setX(Number(c));b.setY(Number(d));b.brush&&!b.brush.stop&&b.brush.lineTo(c,-1*d);return a.callReturn()}},move_xy_time:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png", +size:12}],events:{},def:{params:[{type:"number",params:["2"]},{type:"number",params:["10"]},{type:"number",params:["10"]},null],type:"move_xy_time"},paramsKeyMap:{VALUE1:0,VALUE2:1,VALUE3:2},"class":"move_relative",isNotFor:[],func:function(b,a){if(!a.isStart){var c;c=a.getNumberValue("VALUE1",a);var d=a.getNumberValue("VALUE2",a),e=a.getNumberValue("VALUE3",a);a.isStart=!0;a.frameCount=Math.floor(c*Entry.FPS);a.dX=d/a.frameCount;a.dY=e/a.frameCount}if(0!=a.frameCount)return b.setX(b.getX()+a.dX), +b.setY(b.getY()+a.dY),a.frameCount--,b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY()),a;delete a.isStart;delete a.frameCount;return a.callReturn()}},rotate_by_angle_time:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Angle"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number",params:["2"]},{type:"number",params:["2"]},null],type:"rotate_by_angle_time"},paramsKeyMap:{VALUE:1}, +"class":"rotate",isNotFor:[],func:function(b,a){if(!a.isStart){var c;c=a.getNumberValue("VALUE",a);var d=a.getNumberField("VALUE",a);a.isStart=!0;a.frameCount=Math.floor(c*Entry.FPS);a.dAngle=d/a.frameCount}if(0!=a.frameCount)return b.setRotation(b.getRotation()+a.dAngle),a.frameCount--,a;delete a.isStart;delete a.frameCount;return a.callReturn()}},bounce_wall:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{}, +def:{params:[null],type:"bounce_wall"},"class":"walk",isNotFor:[],func:function(b,a){var c=b.parent.getRotateMethod(),d="free"==c?(b.getRotation()+b.getDirection()).mod(360):b.getDirection(),e=Entry.Utils.COLLISION.NONE;if(90>d&&0<=d||360>d&&270<=d){var e=b.collision==Entry.Utils.COLLISION.UP,f=ndgmr.checkPixelCollision(Entry.stage.wall.up,b.object,0,!1);!f&&e&&(b.collision=Entry.Utils.COLLISION.NONE);f&&e&&(f=!1);f?("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()+180):b.setDirection(-b.getDirection()+ +180),b.collision=Entry.Utils.COLLISION.UP):(e=b.collision==Entry.Utils.COLLISION.DOWN,f=ndgmr.checkPixelCollision(Entry.stage.wall.down,b.object,0,!1),!f&&e&&(b.collision=Entry.Utils.COLLISION.NONE),f&&e&&(f=!1),f&&("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()+180):b.setDirection(-b.getDirection()+180),b.collision=Entry.Utils.COLLISION.DOWN))}else 270>d&&90<=d&&(e=b.collision==Entry.Utils.COLLISION.DOWN,f=ndgmr.checkPixelCollision(Entry.stage.wall.down,b.object,0,!1),!f&&e&&(b.collision= +Entry.Utils.COLLISION.NONE),f&&e&&(f=!1),f?("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()+180):b.setDirection(-b.getDirection()+180),b.collision=Entry.Utils.COLLISION.DOWN):(e=b.collision==Entry.Utils.COLLISION.UP,f=ndgmr.checkPixelCollision(Entry.stage.wall.up,b.object,0,!1),!f&&e&&(b.collision=Entry.Utils.COLLISION.NONE),f&&e&&(f=!1),f&&("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()+180):b.setDirection(-b.getDirection()+180),b.collision=Entry.Utils.COLLISION.UP)));360> +d&&180<=d?(e=b.collision==Entry.Utils.COLLISION.LEFT,d=ndgmr.checkPixelCollision(Entry.stage.wall.left,b.object,0,!1),!d&&e&&(b.collision=Entry.Utils.COLLISION.NONE),d&&e&&(d=!1),d?("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()):b.setDirection(-b.getDirection()+360),b.collision=Entry.Utils.COLLISION.LEFT):(e=b.collision==Entry.Utils.COLLISION.RIGHT,d=ndgmr.checkPixelCollision(Entry.stage.wall.right,b.object,0,!1),!d&&e&&(b.collision=Entry.Utils.COLLISION.NONE),d&&e&&(d=!1),d&&("free"== +c?b.setRotation(-b.getRotation()-2*b.getDirection()):b.setDirection(-b.getDirection()+360),b.collision=Entry.Utils.COLLISION.RIGHT))):180>d&&0<=d&&(e=b.collision==Entry.Utils.COLLISION.RIGHT,d=ndgmr.checkPixelCollision(Entry.stage.wall.right,b.object,0,!1),!d&&e&&(b.collision=Entry.Utils.COLLISION.NONE),d&&e&&(d=!1),d?("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()):b.setDirection(-b.getDirection()+360),b.collision=Entry.Utils.COLLISION.RIGHT):(e=b.collision==Entry.Utils.COLLISION.LEFT, +d=ndgmr.checkPixelCollision(Entry.stage.wall.left,b.object,0,!1),!d&&e&&(b.collision=Entry.Utils.COLLISION.NONE),d&&e&&(d=!1),d&&("free"==c?b.setRotation(-b.getRotation()-2*b.getDirection()):b.setDirection(-b.getDirection()+360),b.collision=Entry.Utils.COLLISION.LEFT)));return a.callReturn()}},flip_arrow_horizontal:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[null]},func:function(b,a){b.setDirection(b.getDirection()+ +180);return a.callReturn()}},flip_arrow_vertical:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[null]},func:function(b,a){b.setDirection(b.getDirection()+180);return a.callReturn()}},see_angle_object:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,menuName:"spritesWithMouse",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png", +size:12}],events:{},def:{params:[null,null],type:"see_angle_object"},paramsKeyMap:{VALUE:0},"class":"rotate_absolute",isNotFor:[],func:function(b,a){var c=a.getField("VALUE",a),d=b.getX(),e=b.getY();if(b.parent.id==c)return a.callReturn();"mouse"==c?(c=Entry.stage.mouseCoordinate.y,d=Entry.stage.mouseCoordinate.x-d,e=c-e):(c=Entry.container.getEntity(c),d=c.getX()-d,e=c.getY()-e);e=0===d&&0===e?b.getDirection()+b.getRotation():0<=d?-Math.atan(e/d)/Math.PI*180+90:-Math.atan(e/d)/Math.PI*180+270;d= +b.getDirection()+b.getRotation();b.setRotation(b.getRotation()+e-d);return a.callReturn()}},see_angle_direction:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number",params:["90"]},null],type:"see_angle_direction"},paramsKeyMap:{VALUE:0},"class":"rotate",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a),d=b.getDirection()+b.getRotation(); +b.setRotation(b.getRotation()+c-d);return a.callReturn()}},rotate_direction:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number",params:["90"]},null],type:"rotate_direction"},paramsKeyMap:{VALUE:0},"class":"rotate",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setDirection(c+b.getDirection());return a.callReturn()}},locate_object_time:{color:"#A751E3", +skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"DropdownDynamic",value:null,menuName:"spritesWithMouse",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number",params:["2"]},null,null],type:"locate_object_time"},paramsKeyMap:{VALUE:0,TARGET:1},"class":"move_absolute",isNotFor:[],func:function(b,a){if(!a.isStart){var c,d,e;d=a.getField("TARGET",a);c=a.getNumberValue("VALUE",a);c=Math.floor(c*Entry.FPS); +e=Entry.stage.mouseCoordinate;if(0!=c)"mouse"==d?(d=e.x-b.getX(),e=e.y-b.getY()):(e=Entry.container.getEntity(d),d=e.getX()-b.getX(),e=e.getY()-b.getY()),a.isStart=!0,a.frameCount=c,a.dX=d/a.frameCount,a.dY=e/a.frameCount;else return"mouse"==d?(d=Number(e.x),e=Number(e.y)):(e=Entry.container.getEntity(d),d=e.getX(),e=e.getY()),b.setX(d),b.setY(e),b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY()),a.callReturn()}if(0!=a.frameCount)return b.setX(b.getX()+a.dX),b.setY(b.getY()+a.dY),a.frameCount--, +b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY()),a;delete a.isStart;delete a.frameCount;return a.callReturn()}},rotate_absolute:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"angle"},null],type:"rotate_absolute"},paramsKeyMap:{VALUE:0},"class":"rotate_absolute",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setRotation(c); +return a.callReturn()}},rotate_relative:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"angle"},null],type:"rotate_relative"},paramsKeyMap:{VALUE:0},"class":"rotate",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setRotation(c+b.getRotation());return a.callReturn()}},direction_absolute:{color:"#A751E3",skeleton:"basic",statements:[], +params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"angle"},null],type:"direction_absolute"},paramsKeyMap:{VALUE:0},"class":"rotate_absolute",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setDirection(c);return a.callReturn()}},direction_relative:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png", +size:12}],events:{},def:{params:[{type:"angle"},null],type:"direction_relative"},paramsKeyMap:{VALUE:0},"class":"rotate",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a);b.setDirection(c+b.getDirection());return a.callReturn()}},move_to_angle:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"angle"},{type:"number", +params:["10"]},null],type:"move_to_angle"},paramsKeyMap:{ANGLE:0,VALUE:1},"class":"move_rotate",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a),d=a.getNumberValue("ANGLE",a);b.setX(b.getX()+c*Math.cos((d-90)/180*Math.PI));b.setY(b.getY()-c*Math.sin((d-90)/180*Math.PI));b.brush&&!b.brush.stop&&b.brush.lineTo(b.getX(),-1*b.getY());return a.callReturn()}},rotate_by_time:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"}, +{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"number",params:["2"]},{type:"angle"},null],type:"rotate_by_time"},paramsKeyMap:{VALUE:0,ANGLE:1},"class":"rotate",isNotFor:[],func:function(b,a){if(!a.isStart){var c;c=a.getNumberValue("VALUE",a);var d=a.getNumberValue("ANGLE",a);a.isStart=!0;a.frameCount=Math.floor(c*Entry.FPS);a.dAngle=d/a.frameCount}if(0!=a.frameCount)return b.setRotation(b.getRotation()+a.dAngle),a.frameCount--,a;delete a.isStart; +delete a.frameCount;return a.callReturn()}},direction_relative_duration:{color:"#A751E3",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/moving_03.png",size:12}],events:{},def:{params:[{type:"text",params:["2"]},{type:"angle"},null],type:"direction_relative_duration"},paramsKeyMap:{DURATION:0,AMOUNT:1},"class":"rotate",isNotFor:[],func:function(b,a){if(!a.isStart){var c;c=a.getNumberValue("DURATION", +a);var d=a.getNumberValue("AMOUNT",a);a.isStart=!0;a.frameCount=Math.floor(c*Entry.FPS);a.dDirection=d/a.frameCount}if(0!=a.frameCount)return b.setDirection(b.getDirection()+a.dDirection),a.frameCount--,a;delete a.isStart;delete a.frameCount;delete a.dDirection;return a.callReturn()}},neobot_sensor_value:{color:"#00979D",skeleton:"basic_string_field",fontColor:"#fff",statements:[],template:"%1 \uac12",params:[{type:"Dropdown",options:[["1\ubc88 \ud3ec\ud2b8","IN1"],["2\ubc88 \ud3ec\ud2b8","IN2"], +["3\ubc88 \ud3ec\ud2b8","IN3"],["\ub9ac\ubaa8\ucee8","IR"],["\ubc30\ud130\ub9ac","BAT"]],value:"IN1",fontSize:11}],events:{},def:{params:[null],type:"neobot_sensor_value",id:"k9wp"},paramsKeyMap:{PORT:0},"class":"neobot_value",isNotFor:["neobot"],func:function(b,a){var c=a.getStringField("PORT");return Entry.hw.portData[c]}},neobot_left_motor:{color:"#00979D",skeleton:"basic",statements:[],template:"\uc67c\ucabd\ubaa8\ud130\ub97c %1 %2 \uc758 \uc18d\ub3c4\ub85c \ud68c\uc804 %3",params:[{type:"Dropdown", +options:[["\uc55e\uc73c\ub85c","16"],["\ub4a4\ub85c","32"]],value:"16",fontSize:11},{type:"Dropdown",options:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],value:"0",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,"15",null],type:"neobot_left_motor",id:"wguy"},paramsKeyMap:{DIRECTION:0,SPEED:1},"class":"neobot_motor", +isNotFor:["neobot"],func:function(b,a){var c=a.getNumberField("SPEED"),d=a.getNumberField("DIRECTION");Entry.hw.sendQueue.DCL=c+d;return a.callReturn()}},neobot_stop_left_motor:{color:"#00979D",skeleton:"basic",statements:[],template:"\uc67c\ucabd\ubaa8\ud130 \uc815\uc9c0 %1",params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null],type:"neobot_stop_left_motor",id:"bq9n"},"class":"neobot_motor",isNotFor:["neobot"],func:function(b,a){Entry.hw.sendQueue.DCL= +0;return a.callReturn()}},neobot_right_motor:{color:"#00979D",skeleton:"basic",statements:[],template:"\uc624\ub978\ucabd\ubaa8\ud130\ub97c %1 %2 \uc758 \uc18d\ub3c4\ub85c \ud68c\uc804 %3",params:[{type:"Dropdown",options:[["\uc55e\uc73c\ub85c","16"],["\ub4a4\ub85c","32"]],value:"16",fontSize:11},{type:"Dropdown",options:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],value:"0", +fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,"15",null],type:"neobot_right_motor",id:"g15e"},paramsKeyMap:{DIRECTION:0,SPEED:1},"class":"neobot_motor",isNotFor:["neobot"],func:function(b,a){var c=a.getNumberField("SPEED"),d=a.getNumberField("DIRECTION");Entry.hw.sendQueue.DCR=c+d;return a.callReturn()}},neobot_stop_right_motor:{color:"#00979D",skeleton:"basic",statements:[],template:"\uc624\ub978\ucabd\ubaa8\ud130 \uc815\uc9c0 %1", +params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null],type:"neobot_stop_right_motor",id:"rkgh"},"class":"neobot_motor",isNotFor:["neobot"],func:function(b,a){Entry.hw.sendQueue.DCR=0;return a.callReturn()}},neobot_all_motor:{color:"#00979D",skeleton:"basic",statements:[],template:"\uc591\ucabd \ubaa8\ud130\ub97c %1 \uc758 \uc18d\ub3c4\ub85c %2",params:[{type:"Dropdown",options:[["\uc591\ucabd","1"],["\uc67c\ucabd","2"],["\uc624\ub978\ucabd", +"3"]],value:"1",fontSize:11},{type:"Block",accept:"string"},{type:"Dropdown",options:[["\ub290\ub9ac\uac8c","1"],["\ubcf4\ud1b5","2"],["\ube60\ub974\uac8c","3"]],value:"1",fontSize:11},{type:"Dropdown",options:[["\uc804\uc9c4","1"],["\ud6c4\uc9c4","2"],["\uc88c\ud68c\uc804","3"],["\uc6b0\ud68c\uc804","4"]],value:"1",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:["15",null,null],type:"neobot_all_motor",id:"kxpn"},paramsKeyMap:{SPEED:0, +DIRECTION:1},"class":"neobot_motor",isNotFor:["neobot"],func:function(b,a){a.getNumberField("TYPE");var c=a.getNumberField("SPEED");switch(a.getNumberField("DIRECTION")){case 1:Entry.hw.sendQueue.DCL=16+c;Entry.hw.sendQueue.DCR=16+c;break;case 2:Entry.hw.sendQueue.DCL=32+c;Entry.hw.sendQueue.DCR=32+c;break;case 3:Entry.hw.sendQueue.DCL=32+c;Entry.hw.sendQueue.DCR=16+c;break;case 4:Entry.hw.sendQueue.DCL=16+c;Entry.hw.sendQueue.DCR=32+c;break;case 5:Entry.hw.sendQueue.DCL=0;Entry.hw.sendQueue.DCR= +16+c;break;case 6:Entry.hw.sendQueue.DCL=16+c,Entry.hw.sendQueue.DCR=0}return a.callReturn()}},neobot_set_servo:{color:"#00979D",skeleton:"basic",statements:[],template:"%1 \ud3ec\ud2b8\uc758 \uc11c\ubcf4\ubaa8\ud130\ub97c %2 \uc774\ub3d9 %3",params:[{type:"Dropdown",options:[["OUT1","1"],["OUT2","2"],["OUT3","3"]],value:"1",fontSize:11},{type:"Dropdown",options:[["0\ub3c4","0"],["10\ub3c4","10"],["20\ub3c4","20"],["30\ub3c4","30"],["40\ub3c4","40"],["50\ub3c4","50"],["60\ub3c4","60"],["70\ub3c4", +"70"],["80\ub3c4","80"],["90\ub3c4","90"],["100\ub3c4","100"],["110\ub3c4","110"],["120\ub3c4","120"],["130\ub3c4","130"],["140\ub3c4","140"],["150\ub3c4","150"],["160\ub3c4","160"],["170\ub3c4","170"],["180\ub3c4","180"]],value:"0",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,null,null],type:"neobot_set_servo",id:"eokl"},paramsKeyMap:{PORT:0,DEGREE:1},"class":"neobot_output",isNotFor:["neobot"],func:function(b,a){var c= +a.getNumberField("PORT"),d=a.getNumberField("DEGREE");Entry.hw.sendQueue["OUT"+c]=d;3===c&&(c=4);Entry.hw.sendQueue.OPT|=c;return a.callReturn()}},neobot_set_output:{color:"#00979D",skeleton:"basic",statements:[],template:"%1 \ubc88 \ud3ec\ud2b8\uc758 \uac12\uc744 %2 \ub9cc\ud07c \ucd9c\ub825 %3",params:[{type:"Dropdown",options:[["OUT1","1"],["OUT2","2"],["OUT3","3"]],value:"1",fontSize:11},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}], +events:{},def:{params:[null,{type:"number",params:["255"],id:"dg6t"},null],type:"neobot_set_output",id:"au77"},paramsKeyMap:{PORT:0,VALUE:1},"class":"neobot_output",isNotFor:["neobot"],func:function(b,a){var c=a.getStringField("PORT",a),d=a.getNumberValue("VALUE",a),e=c;0>d?d=0:255c&&(c=0);Entry.hw.sendQueue.FND=c;return a.callReturn()}},neobot_play_note_for:{color:"#00979D",skeleton:"basic",statements:[],template:"\uba5c\ub85c\ub514 %1 \uc744(\ub97c) %2 \uc625\ud0c0\ube0c\ub85c %3 \uae38\uc774\ub9cc\ud07c \uc18c\ub9ac\ub0b4\uae30 %4", +params:[{type:"Dropdown",options:[["\ubb34\uc74c","0"],["\ub3c4","1"],["\ub3c4#","2"],["\ub808","3"],["\ub808#","4"],["\ubbf8","5"],["\ud30c","6"],["\ud30c#","7"],["\uc194","8"],["\uc194#","9"],["\ub77c","10"],["\ub77c#","11"],["\uc2dc","12"]],value:"0",fontSize:11},{type:"Dropdown",options:[["1","0"],["2","1"],["3","2"],["4","3"],["5","4"],["6","5"]],value:"0",fontSize:11},{type:"Dropdown",options:[["2\ubd84\uc74c\ud45c","2"],["4\ubd84\uc74c\ud45c","4"],["8\ubd84\uc74c\ud45c","8"],["16\ubd84\uc74c\ud45c", +"16"]],value:"2",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:["1","2","4",null],type:"neobot_play_note_for",id:"ldg8"},paramsKeyMap:{NOTE:0,OCTAVE:1,DURATION:2},"class":"neobot_note",isNotFor:["neobot"],func:function(b,a){var c=Entry.hw.sendQueue;if(a.isStart){if(1==a.timeFlag)return a;delete a.timeFlag;delete a.isStart;Entry.hw.sendQueue.SND=0;Entry.engine.isContinue=!1;return a.callReturn()}var d=a.getNumberField("NOTE",a), +e=a.getNumberField("OCTAVE",a),f=a.getNumberField("DURATION",a),d=d+12*e;a.isStart=!0;a.timeFlag=1;65d&&(d=0);return Entry.Robotis_carCont.postCallReturn(a,[[e,f+(c-1)*g,g,d]],Entry.Robotis_openCM70.delay)}},robotis_openCM70_aux_led_module:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[[Lang.Blocks.robotis_common_port_3,"3"],[Lang.Blocks.robotis_common_port_4,"4"],[Lang.Blocks.robotis_common_port_5,"5"],[Lang.Blocks.robotis_common_port_6,"6"]],value:"3",fontSize:11},{type:"Dropdown",options:[[Lang.Blocks.robotis_cm_led_both+Lang.Blocks.robotis_common_off, +"0"],[Lang.Blocks.robotis_cm_led_right+Lang.Blocks.robotis_common_on,"1"],[Lang.Blocks.robotis_cm_led_left+Lang.Blocks.robotis_common_on,"2"],[Lang.Blocks.robotis_cm_led_both+Lang.Blocks.robotis_common_on,"3"]],value:"0",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,null,null],type:"robotis_openCM70_aux_led_module"},paramsKeyMap:{PORT:0,LED_MODULE:1},"class":"robotis_openCM70_cm",isNotFor:["robotis_openCM70"],func:function(b, +a){var c=a.getField("PORT",a),d=a.getField("LED_MODULE",a),e=Entry.Robotis_openCM70.INSTRUCTION.WRITE,f=0,g=0,f=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[0],g=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[1];return Entry.Robotis_carCont.postCallReturn(a,[[e,f+(c-1)*g,g,d]],Entry.Robotis_openCM70.delay)}},robotis_openCM70_aux_custom:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[[Lang.Blocks.robotis_common_port_3,"3"],[Lang.Blocks.robotis_common_port_4, +"4"],[Lang.Blocks.robotis_common_port_5,"5"],[Lang.Blocks.robotis_common_port_6,"6"]],value:"3",fontSize:11},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[null,{type:"number",params:["0"]},null],type:"robotis_openCM70_aux_custom"},paramsKeyMap:{PORT:0,VALUE:1},"class":"robotis_openCM70_cm",isNotFor:["robotis_openCM70"],func:function(b,a){var c=a.getField("PORT",a),d=a.getNumberValue("VALUE"),e=Entry.Robotis_openCM70.INSTRUCTION.WRITE, +f=0,g=0,f=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[0],g=Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[1];return Entry.Robotis_carCont.postCallReturn(a,[[e,f+(c-1)*g,g,d]],Entry.Robotis_openCM70.delay)}},robotis_openCM70_cm_custom:{color:"#00979D",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/hardware_03.png",size:12}],events:{},def:{params:[{type:"number",params:["0"]},{type:"number", +params:["0"]},null],type:"robotis_openCM70_cm_custom"},paramsKeyMap:{ADDRESS:0,VALUE:1},"class":"robotis_openCM70_custom",isNotFor:["robotis_openCM70"],func:function(b,a){var c=Entry.Robotis_openCM70.INSTRUCTION.WRITE,d=0,e=0,d=a.getNumberValue("ADDRESS"),e=a.getNumberValue("VALUE");return Entry.Robotis_carCont.postCallReturn(a,[[c,d,65535c&&(c=0);createjs.Sound.setVolume(c);return a.callReturn()}},sound_volume_set:{color:"#A4D01D",skeleton:"basic",statements:[],params:[{type:"Block", +accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/sound_03.png",size:12}],events:{},def:{params:[{type:"number",params:["10"]},null],type:"sound_volume_set"},paramsKeyMap:{VALUE:0},"class":"sound_volume",isNotFor:[],func:function(b,a){var c=a.getNumberValue("VALUE",a)/100;1c&&(c=0);createjs.Sound.setVolume(c);return a.callReturn()}},sound_silent_all:{color:"#A4D01D",skeleton:"basic",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/sound_03.png", +size:12}],events:{},def:{params:[null],type:"sound_silent_all"},"class":"sound_stop",isNotFor:[],func:function(b,a){createjs.Sound.stop();return a.callReturn()}},get_sounds:{color:"#A4D01D",skeleton:"basic_string_field",statements:[],params:[{type:"DropdownDynamic",value:null,menuName:"sounds",fontSize:11}],events:{},def:{params:[null],type:"get_sounds"},paramsKeyMap:{VALUE:0},func:function(b,a){return a.getStringField("VALUE")}},sound_something_with_block:{color:"#A4D01D",skeleton:"basic",statements:[], +params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/sound_03.png",size:12}],events:{},def:{params:[{type:"get_sounds"},null],type:"sound_something_with_block"},paramsKeyMap:{VALUE:0},"class":"sound_play",isNotFor:[],func:function(b,a){var c=a.getStringValue("VALUE",a);(c=b.parent.getSound(c))&&createjs.Sound.play(c.id);return a.callReturn()}},sound_something_second_with_block:{color:"#A4D01D",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"}, +{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/sound_03.png",size:12}],events:{},def:{params:[{type:"get_sounds",id:"95dw"},{type:"number",params:["1"]},null],type:"sound_something_second_with_block"},paramsKeyMap:{VALUE:0,SECOND:1},"class":"sound_play",isNotFor:[],func:function(b,a){var c=a.getStringValue("VALUE",a),d=a.getNumberValue("SECOND",a);(c=b.parent.getSound(c))&&createjs.Sound.play(c.id,{startTime:0,duration:1E3*d});return a.callReturn()}},sound_something_wait_with_block:{color:"#A4D01D", +skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/sound_03.png",size:12}],events:{},def:{params:[{type:"get_sounds"},null],type:"sound_something_wait_with_block"},paramsKeyMap:{VALUE:0},"class":"sound_wait",isNotFor:[],func:function(b,a){if(a.isPlay){if(1==a.playState)return a;delete a.playState;delete a.isPlay;return a.callReturn()}a.isPlay=!0;a.playState=1;var c=a.getStringValue("VALUE",a);if(c=b.parent.getSound(c))createjs.Sound.play(c.id), +setTimeout(function(){a.playState=0},1E3*c.duration);return a}},sound_something_second_wait_with_block:{color:"#A4D01D",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/sound_03.png",size:12}],events:{},def:{params:[{type:"get_sounds"},{type:"number",params:["1"]},null],type:"sound_something_second_wait_with_block"},paramsKeyMap:{VALUE:0,SECOND:1},"class":"sound_wait",isNotFor:[],func:function(b, +a){if(a.isPlay){if(1==a.playState)return a;delete a.isPlay;delete a.playState;return a.callReturn()}a.isPlay=!0;a.playState=1;var c=a.getStringValue("VALUE",a);if(c=b.parent.getSound(c)){var d=createjs.Sound.play(c.id),c=a.getNumberValue("SECOND",a);setTimeout(function(){d.stop();a.playState=0},1E3*c);d.addEventListener("complete",function(a){})}return a}},sound_from_to:{color:"#A4D01D",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Block", +accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/sound_03.png",size:12}],events:{},def:{params:[{type:"get_sounds"},{type:"text",params:["1"]},{type:"text",params:["10"]},null],type:"sound_from_to"},paramsKeyMap:{VALUE:0,START:1,END:2},"class":"sound_play",isNotFor:[],func:function(b,a){var c=a.getStringValue("VALUE",a);if(c=b.parent.getSound(c)){var d=1E3*a.getNumberValue("START",a),e=1E3*a.getNumberValue("END",a);createjs.Sound.play(c.id,{startTime:Math.min(d,e),duration:Math.max(d, +e)-Math.min(d,e)})}return a.callReturn()}},sound_from_to_and_wait:{color:"#A4D01D",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/sound_03.png",size:12}],events:{},def:{params:[{type:"get_sounds"},{type:"text",params:["1"]},{type:"text",params:["10"]},null],type:"sound_from_to_and_wait"},paramsKeyMap:{VALUE:0,START:1,END:2},"class":"sound_wait",isNotFor:[],func:function(b, +a){if(a.isPlay){if(1==a.playState)return a;delete a.isPlay;delete a.playState;return a.callReturn()}a.isPlay=!0;a.playState=1;var c=a.getStringValue("VALUE",a);if(c=b.parent.getSound(c)){var d=1E3*a.getNumberValue("START",a),e=1E3*a.getNumberValue("END",a),f=Math.min(d,e),d=Math.max(d,e)-f;createjs.Sound.play(c.id,{startTime:f,duration:d});setTimeout(function(){a.playState=0},d)}return a}},when_run_button_click:{color:"#3BBD70",skeleton:"basic_event",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/start_icon_play.png", +size:17,position:{x:0,y:-2}}],events:{},def:{params:[null],type:"when_run_button_click"},"class":"event",isNotFor:[],func:function(b,a){return a.callReturn()},event:"start"},press_some_key:{color:"#3BBD70",skeleton:"basic_event",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/start_icon_keyboard.png",size:17,position:{x:0,y:-2}},{type:"Dropdown",options:[["q","81"],["w","87"],["e","69"],["r","82"],["a","65"],["s","83"],["d","68"],["\uc704\ucabd \ud654\uc0b4\ud45c","38"], +["\uc544\ub798\ucabd \ud654\uc0b4\ud45c","40"],["\uc67c\ucabd \ud654\uc0b4\ud45c","37"],["\uc624\ub978\ucabd \ud654\uc0b4\ud45c","39"],["\uc5d4\ud130","13"],["\uc2a4\ud398\uc774\uc2a4","32"]],value:"81",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/start_03.png",size:12}],events:{},def:{params:[null,null,null]},paramsKeyMap:{VALUE:1},func:function(b,a){return a.callReturn()}},when_some_key_pressed:{color:"#3BBD70",skeleton:"basic_event",statements:[],params:[{type:"Indicator", +img:"/lib/entryjs/images/block_icon/start_icon_keyboard.png",size:17,position:{x:0,y:-2}},{type:"Keyboard",value:"81"}],events:{},def:{params:[null,"81"],type:"when_some_key_pressed"},paramsKeyMap:{VALUE:1},"class":"event",isNotFor:[],func:function(b,a){return a.callReturn()},event:"keyPress"},mouse_clicked:{color:"#3BBD70",skeleton:"basic_event",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/start_icon_mouse.png",size:17,position:{x:0,y:-2}}],events:{},def:{params:[null], +type:"mouse_clicked"},"class":"event",isNotFor:[],func:function(b,a){return a.callReturn()},event:"mouse_clicked"},mouse_click_cancled:{color:"#3BBD70",skeleton:"basic_event",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/start_icon_mouse.png",size:17,position:{x:0,y:-2}}],events:{},def:{params:[null],type:"mouse_click_cancled"},"class":"event",isNotFor:[],func:function(b,a){return a.callReturn()},event:"mouse_click_cancled"},when_object_click:{color:"#3BBD70",skeleton:"basic_event", +statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/start_icon_mouse.png",size:17,position:{x:0,y:-2}}],events:{},def:{params:[null],type:"when_object_click"},"class":"event",isNotFor:[],func:function(b,a){return a.callReturn()},event:"when_object_click"},when_object_click_canceled:{color:"#3BBD70",skeleton:"basic_event",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/start_icon_mouse.png",size:17,position:{x:0,y:-2}}],events:{},def:{params:[null], +type:"when_object_click_canceled"},"class":"event",isNotFor:[],func:function(b,a){return a.callReturn()},event:"when_object_click_canceled"},when_some_key_click:{color:"#3BBD70",skeleton:"basic_event",statements:[],params:[{type:"Indicator",img:"/lib/entryjs/images/block_icon/start_icon_keyboard.png",size:17,position:{x:0,y:-2}}],events:{},def:{params:[null]},func:function(b,a){return a.callReturn()},event:"keyPress"},when_message_cast:{color:"#3BBD70",skeleton:"basic_event",statements:[],params:[{type:"Indicator", +img:"/lib/entryjs/images/block_icon/start_icon_signal.png",size:17,position:{x:0,y:-2}},{type:"DropdownDynamic",value:null,menuName:"messages",fontSize:11}],events:{dataAdd:[function(b){var a=Entry.variableContainer;a&&a.addRef("_messageRefs",b)}],viewDestroy:[function(b){var a=Entry.variableContainer;a&&a.removeRef("_messageRefs",b)}]},def:{params:[null,null],type:"when_message_cast"},paramsKeyMap:{VALUE:1},"class":"message",isNotFor:["message"],func:function(b,a){return a.callReturn()},event:"when_message_cast"}, +message_cast:{color:"#3BBD70",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,menuName:"messages",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/start_03.png",size:12}],events:{dataAdd:[function(b){var a=Entry.variableContainer;a&&a.addRef("_messageRefs",b)}],viewDestroy:[function(b){var a=Entry.variableContainer;a&&a.removeRef("_messageRefs",b)}]},def:{params:[null,null],type:"message_cast"},paramsKeyMap:{VALUE:0},"class":"message",isNotFor:["message"], +func:function(b,a){var c=a.getField("VALUE",a),d=Entry.isExist(c,"id",Entry.variableContainer.messages_);if("null"==c||!d)throw Error("value can not be null or undefined");Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent,["when_message_cast",c]);return a.callReturn()}},message_cast_wait:{color:"#3BBD70",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,menuName:"messages",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/start_03.png", +size:12}],events:{dataAdd:[function(b){var a=Entry.variableContainer;a&&a.addRef("_messageRefs",b)}],dataDestroy:[function(b){var a=Entry.variableContainer;a&&a.removeRef("_messageRefs",b)}]},def:{params:[null,null],type:"message_cast_wait"},paramsKeyMap:{VALUE:0},"class":"message",isNotFor:["message"],func:function(b,a){if(a.runningScript){for(var c=a.runningScript,d=c.length,e=0;ec.array_.length)throw Error("can not remove value from array");c.array_.splice(d-1,1);c.updateView();return a.callReturn()}},insert_value_to_list:{color:"#E457DC",skeleton:"basic",statements:[],params:[{type:"Block",accept:"string"},{type:"DropdownDynamic",value:null,menuName:"lists",fontSize:11},{type:"Block", +accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/variable_03.png",size:12}],events:{},def:{params:[{type:"text",params:["10"]},null,{type:"text",params:["1"]},null],type:"insert_value_to_list"},paramsKeyMap:{DATA:0,LIST:1,INDEX:2},"class":"list",isNotFor:["list","listNotExist"],func:function(b,a){var c=a.getField("LIST",a),d=a.getValue("DATA",a),e=a.getValue("INDEX",a),c=Entry.variableContainer.getList(c,b);if(!c.array_||isNaN(e)||0==e||e>c.array_.length+1)throw Error("can not insert value to array"); +c.array_.splice(e-1,0,{data:d});c.updateView();return a.callReturn()}},change_value_list_index:{color:"#E457DC",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,menuName:"lists",fontSize:11},{type:"Block",accept:"string"},{type:"Block",accept:"string"},{type:"Indicator",img:"/lib/entryjs/images/block_icon/variable_03.png",size:12}],events:{},def:{params:[null,{type:"text",params:["1"]},{type:"text",params:["10"]},null],type:"change_value_list_index"},paramsKeyMap:{LIST:0, +INDEX:1,DATA:2},"class":"list",isNotFor:["list","listNotExist"],func:function(b,a){var c=a.getField("LIST",a),d=a.getValue("DATA",a),e=a.getValue("INDEX",a),c=Entry.variableContainer.getList(c,b);if(!c.array_||isNaN(e)||e>c.array_.length)throw Error("can not insert value to array");c.array_[e-1].data=d;c.updateView();return a.callReturn()}},value_of_index_from_list:{color:"#E457DC",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.VARIABLE_value_of_index_from_list_1, +color:"white"},{type:"DropdownDynamic",value:null,menuName:"lists",fontSize:11},{type:"Text",text:Lang.Blocks.VARIABLE_value_of_index_from_list_2,color:"white"},{type:"Block",accept:"string"},{type:"Text",text:Lang.Blocks.VARIABLE_value_of_index_from_list_3,color:"white"}],events:{},def:{params:[null,null,null,{type:"number",params:["1"]}],type:"value_of_index_from_list"},paramsKeyMap:{LIST:1,INDEX:3},"class":"list_element",isNotFor:["list","listNotExist"],func:function(b,a){var c=a.getField("LIST", +a),d=a.getValue("INDEX",a),c=Entry.variableContainer.getList(c,b),d=Entry.getListRealIndex(d,c);if(!c.array_||isNaN(d)||d>c.array_.length)throw Error("can not insert value to array");return c.array_[d-1].data}},length_of_list:{color:"#E457DC",skeleton:"basic_string_field",statements:[],params:[{type:"Text",text:Lang.Blocks.VARIABLE_length_of_list_1,color:"white"},{type:"DropdownDynamic",value:null,menuName:"lists",fontSize:11},{type:"Text",text:Lang.Blocks.VARIABLE_length_of_list_2,color:"white"}], +events:{},def:{params:[null,null,null],type:"length_of_list"},paramsKeyMap:{LIST:1},"class":"list",isNotFor:["list","listNotExist"],func:function(b,a){var c=a.getField("LIST",a);return Entry.variableContainer.getList(c).array_.length}},show_list:{color:"#E457DC",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,menuName:"lists",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/variable_03.png",size:12}],events:{},def:{params:[null,null],type:"show_list"},paramsKeyMap:{LIST:0}, +"class":"list_visibility",isNotFor:["list","listNotExist"],func:function(b,a){var c=a.getField("LIST",a);Entry.variableContainer.getList(c).setVisible(!0);return a.callReturn()}},hide_list:{color:"#E457DC",skeleton:"basic",statements:[],params:[{type:"DropdownDynamic",value:null,menuName:"lists",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/variable_03.png",size:12}],events:{},def:{params:[null,null],type:"hide_list"},paramsKeyMap:{LIST:0},"class":"list_visibility",isNotFor:["list", +"listNotExist"],func:function(b,a){var c=a.getField("LIST",a);Entry.variableContainer.getList(c).setVisible(!1);return a.callReturn()}},options_for_list:{color:"#E457DC",skeleton:"basic_string_field",statements:[],params:[{type:"Dropdown",options:[["\uccab\ubc88\uc9f8","FIRST"],["\ub9c8\uc9c0\ub9c9","LAST"],["\ubb34\uc791\uc704","RANDOM"]],value:"FIRST",fontSize:11}],events:{},def:{params:[null]},paramsKeyMap:{OPERATOR:0},func:function(b,a){return a.getField("OPERATOR",a)}},set_visible_answer:{color:"#E457DC", +skeleton:"basic",statements:[],params:[{type:"Dropdown",options:[[Lang.Blocks.CALC_timer_visible_show,"SHOW"],[Lang.Blocks.CALC_timer_visible_hide,"HIDE"]],value:"SHOW",fontSize:11},{type:"Indicator",img:"/lib/entryjs/images/block_icon/variable_03.png",size:12}],events:{viewAdd:[function(b){Entry.container&&Entry.container.showProjectAnswer()}],viewDestroy:[function(b){Entry.container&&Entry.container.hideProjectAnswer(b)}]},def:{params:["HIDE",null],type:"set_visible_answer"},paramsKeyMap:{BOOL:0}, +"class":"ask",isNotFor:[],func:function(b,a){"HIDE"==a.getField("BOOL",a)?Entry.container.inputValue.setVisible(!1):Entry.container.inputValue.setVisible(!0);return a.callReturn()}},is_included_in_list:{color:"#E457DC",skeleton:"basic_boolean_field",statements:[],params:[{type:"Text",text:Lang.Blocks.VARIABLE_is_included_in_list_1,color:"white"},{type:"DropdownDynamic",value:null,menuName:"lists",fontSize:11},{type:"Text",text:Lang.Blocks.VARIABLE_is_included_in_list_2,color:"white"},{type:"Block", +accept:"string"},{type:"Text",text:Lang.Blocks.VARIABLE_is_included_in_list_3,color:"white"}],events:{},def:{params:[null,null,null,{type:"text",params:["10"]},null],type:"is_included_in_list"},paramsKeyMap:{LIST:1,DATA:3},"class":"list",isNotFor:["list","listNotExist"],func:function(b,a){var c=a.getField("LIST",a),d=a.getStringValue("DATA",a),c=Entry.variableContainer.getList(c);if(!c)return!1;for(var c=c.array_,e=0,f=c.length;eEntry.hw.getAnalogPortValue(1)?1:0}},nemoino_get_number_sensor_value:{parent:"arduino_get_number_sensor_value",isNotFor:["nemoino"],def:{params:[{type:"arduino_get_sensor_number"}],type:"nemoino_get_number_sensor_value"},"class":"arduino_value"},nemoino_get_digital_value:{parent:"arduino_get_digital_value",isNotFor:["nemoino"], +def:{params:[{type:"arduino_get_port_number"}],type:"nemoino_get_digital_value"},"class":"arduino_value"},nemoino_toggle_led:{parent:"arduino_toggle_led",isNotFor:["nemoino"],def:{params:[{type:"arduino_get_port_number"},null,null],type:"nemoino_toggle_led"},"class":"arduino_set"},nemoino_toggle_pwm:{parent:"arduino_toggle_pwm",isNotFor:["nemoino"],def:{params:[{type:"arduino_get_pwm_port_number"},{type:"arduino_text",params:["255"]},null],type:"nemoino_toggle_pwm"},"class":"arduino_set"},nemoino_convert_scale:{parent:"arduino_convert_scale", +isNotFor:["nemoino"],def:{params:[{type:"arduino_get_number_sensor_value",params:[{type:"arduino_get_sensor_number",id:"bl5e"}]},{type:"number",params:["0"]},{type:"number",params:["1023"]},{type:"number",params:["0"]},{type:"number",params:["100"]}],type:"nemoino_convert_scale"},"class":"arduino"},sensorBoard_get_number_sensor_value:{parent:"arduino_get_number_sensor_value",isNotFor:["sensorBoard"],def:{params:[{type:"arduino_get_sensor_number"}],type:"sensorBoard_get_number_sensor_value"},"class":"arduino_value"}, +sensorBoard_get_digital_value:{parent:"arduino_get_digital_value",isNotFor:["sensorBoard"],def:{params:[{type:"arduino_get_port_number"}],type:"sensorBoard_get_digital_value"},"class":"arduino_value"},sensorBoard_toggle_led:{parent:"arduino_toggle_led",isNotFor:["sensorBoard"],def:{params:[{type:"arduino_get_port_number"},null,null],type:"sensorBoard_toggle_led"},"class":"arduino_set"},sensorBoard_toggle_pwm:{parent:"arduino_toggle_pwm",isNotFor:["sensorBoard"],def:{params:[{type:"arduino_get_pwm_port_number"}, +{type:"arduino_text",params:["255"]},null],type:"sensorBoard_toggle_pwm"},"class":"arduino_set"},sensorBoard_convert_scale:{parent:"arduino_convert_scale",isNotFor:["sensorBoard"],def:{params:[{type:"arduino_get_number_sensor_value",params:[{type:"arduino_get_sensor_number",id:"bl5e"}]},{type:"number",params:["0"]},{type:"number",params:["1023"]},{type:"number",params:["0"]},{type:"number",params:["100"]}],type:"sensorBoard_convert_scale"},"class":"arduino"},CODEino_get_number_sensor_value:{parent:"arduino_get_number_sensor_value", +isNotFor:["CODEino"],def:{params:[{type:"arduino_get_sensor_number"}],type:"CODEino_get_number_sensor_value"},"class":"arduino_value"},CODEino_get_digital_value:{parent:"arduino_get_digital_value",isNotFor:["CODEino"],def:{params:[{type:"arduino_get_port_number"}],type:"CODEino_get_digital_value"},"class":"arduino_value"},CODEino_toggle_led:{parent:"arduino_toggle_led",isNotFor:["CODEino"],def:{params:[{type:"arduino_get_port_number"},null,null],type:"CODEino_toggle_led"},"class":"arduino_set"},CODEino_toggle_pwm:{parent:"arduino_toggle_pwm", +isNotFor:["CODEino"],def:{params:[{type:"arduino_get_pwm_port_number"},{type:"arduino_text",params:["255"]},null],type:"CODEino_toggle_pwm"},"class":"arduino_set"},CODEino_convert_scale:{parent:"arduino_convert_scale",isNotFor:["CODEino"],def:{params:[{type:"arduino_get_number_sensor_value",params:[{type:"arduino_get_sensor_number",id:"bl5e"}]},{type:"number",params:["0"]},{type:"number",params:["1023"]},{type:"number",params:["0"]},{type:"number",params:["100"]}],type:"CODEino_convert_scale"},"class":"arduino"}}; +(function(){for(var b in Entry.block){var a=Entry.block[b];if(a.parent){var c=function(){};c.prototype=Entry.block[a.parent];var c=new c,d;for(d in a)c[d]=a[d];Entry.block[b]=c}}})();"object"==typeof exports&&(exports.block=Entry.block);Entry.BlockMenu=function(b,a,c,d){Entry.Model(this,!1);this._align=a||"CENTER";this._scroll=void 0!==d?d:!1;this._bannedClass=[];this._categories=[];this.suffix="blockMenu";b="string"===typeof b?$("#"+b):$(b);if("DIV"!==b.prop("tagName"))return console.error("Dom is not div element");this.view=b;this.visible=!0;this._svgId="blockMenu"+(new Date).getTime();this._clearCategory();this._generateView(c);this._splitters=[];this.setWidth();this.svg=Entry.SVG(this._svgId);Entry.Utils.addFilters(this.svg, +this.suffix);this.patternRect=Entry.Utils.addBlockPattern(this.svg,this.suffix);this.svgGroup=this.svg.elem("g");this.svgThreadGroup=this.svgGroup.elem("g");this.svgThreadGroup.board=this;this.svgBlockGroup=this.svgGroup.elem("g");this.svgBlockGroup.board=this;this.changeEvent=new Entry.Event(this);c&&this._generateCategoryCodes(c);this.observe(this,"_handleDragBlock",["dragBlock"]);this._scroll&&(this._scroller=new Entry.BlockMenuScroller(this),this._addControl(b));Entry.documentMousedown&&Entry.documentMousedown.attach(this, +this.setSelectedBlock);this._categoryCodes&&Entry.keyPressed&&Entry.keyPressed.attach(this,this._captureKeyEvent);Entry.windowResized&&(b=_.debounce(this.updateOffset,200),Entry.windowResized.attach(this,b))}; +(function(b){b.schema={code:null,dragBlock:null,closeBlock:null,selectedBlockView:null};b._generateView=function(a){var b=this.view,d=this;a&&(this._categoryCol=Entry.Dom("ul",{class:"entryCategoryListWorkspace",parent:b}),this._generateCategoryView(a));this.blockMenuContainer=Entry.Dom("div",{"class":"blockMenuContainer",parent:b});this.svgDom=Entry.Dom($(''),{parent:this.blockMenuContainer});this.svgDom.mouseenter(function(a){d._scroller&& +d._scroller.setOpacity(1);a=d.workspace.selectedBlockView;!Entry.playground||Entry.playground.resizing||a&&a.dragMode===Entry.DRAG_MODE_DRAG||(Entry.playground.focusBlockMenu=!0,a=d.svgGroup.getBBox(),a=a.width+a.x+64,a>Entry.interfaceState.menuWidth&&(this.widthBackup=Entry.interfaceState.menuWidth-64,$(this).stop().animate({width:a-62},200)))});this.svgDom.mouseleave(function(a){Entry.playground&&!Entry.playground.resizing&&(d._scroller&&d._scroller.setOpacity(0),(a=this.widthBackup)&&$(this).stop().animate({width:a}, +200),delete this.widthBackup,delete Entry.playground.focusBlockMenu)});$(window).scroll(function(){d.updateOffset()})};b.changeCode=function(a){if(!(a instanceof Entry.Code))return console.error("You must inject code instance");this.codeListener&&this.code.changeEvent.detach(this.codeListener);var b=this;this.set({code:a});this.codeListener=this.code.changeEvent.attach(this,function(){b.changeEvent.notify()});a.createView(this);this.align()};b.bindCodeView=function(a){this.svgBlockGroup.remove(); +this.svgThreadGroup.remove();this.svgBlockGroup=a.svgBlockGroup;this.svgThreadGroup=a.svgThreadGroup;this.svgGroup.appendChild(this.svgThreadGroup);this.svgGroup.appendChild(this.svgBlockGroup);this._scroller&&this.svgGroup.appendChild(this._scroller.svgGroup)};b.align=function(){if(this.code){this._clearSplitters();for(var a=this.code.getThreads(),b=10,d="LEFT"==this._align?10:this.svgDom.width()/2,e,f=0,g=a.length;fthis._bannedClass.indexOf(a)&&this._bannedClass.push(a);this.align()};b.unbanClass=function(a){a=this._bannedClass.indexOf(a);-1b&&(a.preventDefault(), +this.selectMenu(b-49))};b.setPatternRectFill=function(a){this.patternRect.attr({fill:a})};b._clearCategory=function(){this._selectedCategoryView=null;this._categories=[];var a=this._categoryElems,b;for(b in a)a[b].remove();this._categoryElems={};a=this._categoryCodes;for(b in a){var d=a[b];d.constructor==Entry.Code&&d.clear()}this._categoryCodes=null};b.setCategoryData=function(a){this._clearCategory();this._generateCategoryView(a);this._generateCategoryCodes(a)};b._generateCategoryView=function(a){if(a)for(var b= +this,d=0;d=b?this.setVisible(!1):this.setVisible(!0)};b._reset=function(){this.vY=0;this.vScrollbar.attr({y:this.vY});this.resizeScrollBar()};b.onMouseDown=function(a){function b(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();a=a.originalEvent&&a.originalEvent.touches?a.originalEvent.touches[0]:a;var c=e.dragInstance; +e.scroll(a.pageY-c.offsetY);c.set({offsetY:a.pageY})}function d(a){$(document).unbind(".scroll");delete e.dragInstance}var e=this;a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();if(0===a.button||a.originalEvent&&a.originalEvent.touches){Entry.documentMousedown&&Entry.documentMousedown.notify(a);var f;f=a.originalEvent&&a.originalEvent.touches?a.originalEvent.touches[0]:a;var g=$(document);g.bind("mousemove.scroll",b);g.bind("mouseup.scroll",d);g.bind("touchmove.scroll", +b);g.bind("touchend.scroll",d);e.dragInstance=new Entry.DragInstance({startY:f.pageY,offsetY:f.pageY})}a.stopPropagation()};b._addControl=function(){$(this.vScrollbar).bind("mousedown touchstart",this.mouseHandler)}})(Entry.BlockMenuScroller.prototype);Entry.BlockView=function(b,a,c){Entry.Model(this,!1);this.block=b;this._board=a;this._observers=[];this.set(b);this.svgGroup=a.svgBlockGroup.elem("g");this._schema=Entry.block[b.type];this._schema.changeEvent&&(this._schemaChangeEvent=this._schema.changeEvent.attach(this,this._updateSchema));var d=this._skeleton=Entry.skeleton[this._schema.skeleton];this._contents=[];this._statements=[];this.magnet={};this._paramMap={};d.magnets&&d.magnets(this).next&&(this.svgGroup.nextMagnet=this.block,this._nextGroup= +this.svgGroup.elem("g"),this._observers.push(this.observe(this,"_updateMagnet",["contentHeight"])));this.isInBlockMenu=this.getBoard()instanceof Entry.BlockMenu;var e=this;this.mouseHandler=function(){var a=e.block.events;a&&a.mousedown&&a.mousedown.forEach(function(a){a(e)});e.onMouseDown.apply(e,arguments)};this._startRender(b,c);this._observers.push(this.block.observe(this,"_setMovable",["movable"]));this._observers.push(this.block.observe(this,"_setReadOnly",["movable"]));this._observers.push(this.block.observe(this, +"_setCopyable",["copyable"]));this._observers.push(this.block.observe(this,"_updateColor",["deletable"],!1));this._observers.push(this.observe(this,"_updateBG",["magneting"],!1));this._observers.push(this.observe(this,"_updateOpacity",["visible"],!1));this._observers.push(this.observe(this,"_updateDisplay",["display"],!1));this._observers.push(this.observe(this,"_updateShadow",["shadow"]));this._observers.push(this.observe(this,"_updateMagnet",["offsetY"]));this._observers.push(a.code.observe(this, +"_setBoard",["board"],!1));this.dragMode=Entry.DRAG_MODE_NONE;Entry.Utils.disableContextmenu(this.svgGroup.node);(a=b.events.viewAdd)&&!this.isInBlockMenu&&a.forEach(function(a){Entry.Utils.isFunction(a)&&a(b)});if("function_general"==this.block.type)debugger};Entry.BlockView.PARAM_SPACE=5;Entry.BlockView.DRAG_RADIUS=5; +(function(b){b.schema={id:0,type:Entry.STATIC.BLOCK_RENDER_MODEL,x:0,y:0,offsetX:0,offsetY:0,width:0,height:0,contentWidth:0,contentHeight:0,magneting:!1,visible:!0,animating:!1,shadow:!0,display:!0};b._startRender=function(a,b){var d=this,e=this._skeleton;this.svgGroup.attr({class:"block"});var f=e.classes;f&&0!==f.length&&f.forEach(function(a){d.svgGroup.addClass(a)});f=e.path(this);this.pathGroup=this.svgGroup.elem("g");this._updateMagnet();this._path=this.pathGroup.elem("path");this.getBoard().patternRect&& +($(this._path).mouseenter(function(a){d._mouseEnable&&d._changeFill(!0)}),$(this._path).mouseleave(function(a){d._mouseEnable&&d._changeFill(!1)}));var g=this._schema.color;this.block.deletable===Entry.Block.DELETABLE_FALSE_LIGHTEN&&(g=Entry.Utils.colorLighten(g));this._fillColor=g;f={d:f,fill:g,class:"blockPath"};if(this.magnet.next||this._skeleton.nextShadow)g=this.getBoard().suffix,this.pathGroup.attr({filter:"url(#entryBlockShadowFilter_"+g+")"});else if(this.magnet.string||this.magnet.boolean)f.stroke= +e.outerLine;e.outerLine&&(f["stroke-width"]="0.6");this._path.attr(f);this._moveTo(this.x,this.y,!1);this._startContentRender(b);!0!==this._board.disableMouseEvent&&this._addControl();this.bindPrev()};b._startContentRender=function(a){a=void 0===a?Entry.Workspace.MODE_BOARD:a;this.contentSvgGroup&&this.contentSvgGroup.remove();var b=this._schema;b.statements&&b.statements.length&&this.statementSvgGroup&&this.statementSvgGroup.remove();this._contents=[];this.contentSvgGroup=this.svgGroup.elem("g"); +b.statements&&b.statements.length&&(this.statementSvgGroup=this.svgGroup.elem("g"));switch(a){case Entry.Workspace.MODE_BOARD:case Entry.Workspace.MODE_OVERLAYBOARD:for(var d=/(%\d)/mi,e=(b.template?b.template:Lang.template[this.block.type]).split(d),f=b.params,g=0;gEntry.BlockView.DRAG_RADIUS)&&m.movable&&(m.isInBlockMenu?e.cloneToGlobal(a):(a=!1,m.dragMode!=Entry.DRAG_MODE_DRAG&&(m._toGlobalCoordinate(),m.dragMode=Entry.DRAG_MODE_DRAG, +m.block.getThread().changeEvent.notify(),Entry.GlobalSvg.setView(m,c),a=!0),this.animating&&this.set({animating:!1}),0===m.dragInstance.height&&m.dragInstance.set({height:-1+m.height}),c=m.dragInstance,m._moveBy(d.pageX-c.offsetX,d.pageY-c.offsetY,!1),c.set({offsetX:d.pageX,offsetY:d.pageY}),Entry.GlobalSvg.position(),m._updateCloseBlock(),m.originPos||(m.originPos={x:m.x,y:m.y}),a&&e.generateCodeMagnetMap()))}function d(a){$(document).unbind(".block");m.terminateDrag(a);e&&e.set({dragBlock:null}); +m._changeFill(!1);Entry.GlobalSvg.remove();delete this.mouseDownCoordinate;delete m.dragInstance}console.log(this.block.pointer());a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();this._changeFill(!1);var e=this.getBoard();Entry.documentMousedown&&Entry.documentMousedown.notify(a);if(!this.readOnly&&!e.viewOnly){e.setSelectedBlock(this);this.dominate();if(0===a.button||a.originalEvent&&a.originalEvent.touches){var f;f=a.originalEvent&&a.originalEvent.touches?a.originalEvent.touches[0]: +a;this.mouseDownCoordinate={x:f.pageX,y:f.pageY};var g=$(document);g.bind("mousemove.block touchmove.block",c);g.bind("mouseup.block touchend.block",d);this.dragInstance=new Entry.DragInstance({startX:f.pageX,startY:f.pageY,offsetX:f.pageX,offsetY:f.pageY,height:0,mode:!0});e.set({dragBlock:this});this.addDragging();this.dragMode=Entry.DRAG_MODE_MOUSEDOWN}else if(Entry.Utils.isRightButton(a)){var h=this,k=h.block;if(this.isInBlockMenu)return;f=[];var g={text:"\ube14\ub85d \ubcf5\uc0ac & \ubd99\uc5ec\ub123\uae30", +enable:this.copyable,callback:function(){Entry.do("cloneBlock",k)}},l={text:"\ube14\ub85d \ubcf5\uc0ac",enable:this.copyable,callback:function(){h.block.copyToClipboard()}},n={text:"\ube14\ub85d \uc0ad\uc81c",enable:k.isDeletable(),callback:function(){Entry.do("destroyBlock",h.block)}};f.push(g);f.push(l);f.push(n);Entry.ContextMenu.show(f)}var m=this;e.workspace.getMode()===Entry.Workspace.MODE_VIMBOARD&&a&&document.getElementsByClassName("CodeMirror")[0].dispatchEvent(Entry.Utils.createMouseEvent("dragStart", +event))}};b.vimBoardEvent=function(a,b,d){a&&(a=Entry.Utils.createMouseEvent(b,a),d&&(a.block=d),document.getElementsByClassName("CodeMirror")[0].dispatchEvent(a))};b.terminateDrag=function(a){var b=this.getBoard(),d=this.dragMode,e=this.block,f=b.workspace.getMode();this.removeDragging();this.set({visible:!0});this.dragMode=Entry.DRAG_MODE_NONE;if(f===Entry.Workspace.MODE_VIMBOARD)b instanceof Entry.BlockMenu?(b.terminateDrag(),this.vimBoardEvent(a,"dragEnd",e)):b.clear();else if(d===Entry.DRAG_MODE_DRAG){(d= +this.dragInstance&&this.dragInstance.isNew)&&(b.workspace.blockMenu.terminateDrag()||e._updatePos());var g=Entry.GlobalSvg;a=!1;f=this.block.getPrevBlock(this.block);a=!1;switch(Entry.GlobalSvg.terminateDrag(this)){case g.DONE:g=b.magnetedBlockView;g instanceof Entry.BlockView&&(g=g.block);f&&!g?Entry.do("separateBlock",e):f||g||d?g?("next"===g.view.magneting?(a=e.getLastBlock(),Entry.do("insertBlock",g,a).isPass(d)):Entry.do("insertBlock",e,g).isPass(d),createjs.Sound.play("entryMagneting"),a=!0): +Entry.do("moveBlock",e).isPass(d):e.getThread().view.isGlobal()?Entry.do("moveBlock",e):Entry.do("separateBlock",e);break;case g.RETURN:e=this.block;d=this.originPos;f?(this.set({animating:!1}),createjs.Sound.play("entryMagneting"),this.bindPrev(f),e.insert(f)):(f=e.getThread().view.getParent(),f instanceof Entry.Board?this._moveTo(d.x,d.y,!1):(createjs.Sound.play("entryMagneting"),Entry.do("insertBlock",e,f)));break;case g.REMOVE:createjs.Sound.play("entryDelete"),d?this.block.destroy(!1,!0):this.block.doDestroyBelow(!1)}b.setMagnetedBlock(null); +a&&Entry.ConnectionRipple.setView(e.view).dispose()}this.destroyShadow();delete this.originPos;this.dominate()};b._updateCloseBlock=function(){var a=this.getBoard(),b;if(this._skeleton.magnets){for(var d in this.magnet)if(b="next"===d?this.getBoard().getNearestMagnet(this.x,this.y+this.getBelowHeight(),d):this.getBoard().getNearestMagnet(this.x,this.y,d))return a.setMagnetedBlock(b.view,d);a.setMagnetedBlock(null)}};b.dominate=function(){this.block.getThread().view.dominate()};b.getSvgRoot=function(){for(var a= +this.getBoard().svgBlockGroup,b=this.svgGroup;b.parentNode!==a;)b=b.parentNode;return b};b.getBoard=function(){return this._board};b._setBoard=function(){this._board=this._board.code.board};b.destroy=function(a){this._destroyObservers();var b=this.svgGroup;a?$(b).fadeOut(100,function(){b.remove()}):b.remove();this._contents.forEach(function(a){a.constructor!==Entry.Block&&a.destroy()});var d=this.block;(a=d.events.viewDestroy)&&!this.isInBlockMenu&&a.forEach(function(a){Entry.Utils.isFunction(a)&& +a(d)});this._schemaChangeEvent&&this._schemaChangeEvent.destroy()};b.getShadow=function(){this._shadow||(this._shadow=Entry.SVG.createElement(this.svgGroup.cloneNode(!0),{opacity:.5}),this.getBoard().svgGroup.appendChild(this._shadow));return this._shadow};b.destroyShadow=function(){this._shadow&&(this._shadow.remove(),delete this._shadow)};b._updateMagnet=function(){if(this._skeleton.magnets){var a=this._skeleton.magnets(this);a.next&&this._nextGroup.attr("transform","translate("+a.next.x+","+a.next.y+ +")");this.magnet=a;this.block.getThread().changeEvent.notify()}};b._updateBG=function(){if(this._board.dragBlock&&this._board.dragBlock.dragInstance){var a=this.svgGroup;if(this.magnet.next){if(a=this.magneting){var b=this._board.dragBlock.getShadow(),d=this.getAbsoluteCoordinate(),e;if("previous"===a)e=this.magnet.next,e="translate("+(d.x+e.x)+","+(d.y+e.y)+")";else if("next"===a){e=this.magnet.previous;var f=this._board.dragBlock.getBelowHeight();e="translate("+(d.x+e.x)+","+(d.y+e.y-f)+")"}$(b).attr({transform:e, +display:"block"});this._clonedShadow=b;this.background&&(this.background.remove(),this.nextBackground.remove(),delete this.background,delete this.nextBackground);"previous"===a&&(a=this._board.dragBlock.getBelowHeight()+this.offsetY,this.originalHeight=this.offsetY,this.set({offsetY:a}))}else this._clonedShadow&&(this._clonedShadow.attr({display:"none"}),delete this._clonedShadow),a=this.originalHeight,void 0!==a&&(this.background&&(this.background.remove(),this.nextBackground.remove(),delete this.background, +delete this.nextBackground),this.set({offsetY:a}),delete this.originalHeight);(a=this.block.thread.changeEvent)&&a.notify()}else this.magneting?(a.attr({filter:"url(#entryBlockHighlightFilter_"+this.getBoard().suffix+")"}),a.addClass("outputHighlight")):(a.removeClass("outputHighlight"),a.removeAttr("filter"))}};b.addDragging=function(){this.svgGroup.addClass("dragging")};b.removeDragging=function(){this.svgGroup.removeClass("dragging")};b.addSelected=function(){this.svgGroup.addClass("selected")}; +b.removeSelected=function(){this.svgGroup.removeClass("selected")};b.getSkeleton=function(){return this._skeleton};b.getContentPos=function(){return this._skeleton.contentPos(this)};b.renderText=function(){this._startContentRender(Entry.Workspace.MODE_VIMBOARD)};b.renderBlock=function(){this._startContentRender(Entry.Workspace.MODE_BOARD)};b._updateOpacity=function(){this.svgGroup.attr({opacity:!1===this.visible?0:1});this.visible&&this._setPosition()};b._updateShadow=function(){this.shadow&&Entry.Utils.colorDarken(this._schema.color, +.7)};b._setMovable=function(){this.movable=null!==this.block.isMovable()?this.block.isMovable():void 0!==this._skeleton.movable?this._skeleton.movable:!0};b._setReadOnly=function(){this.readOnly=null!==this.block.isReadOnly()?this.block.isReadOnly():void 0!==this._skeleton.readOnly?this._skeleton.readOnly:!1};b._setCopyable=function(){this.copyable=null!==this.block.isCopyable()?this.block.isCopyable():void 0!==this._skeleton.copyable?this._skeleton.copyable:!0};b.bumpAway=function(a,b){var d=this; +a=a||15;b?window.setTimeout(function(){d._moveBy(a,a,!1)},b):d._moveBy(a,a,!1)};b.bindPrev=function(a){if(a){if(this._toLocalCoordinate(a.view._nextGroup),(a=a.getNextBlock())&&a!==this.block){var b=this.block.getLastBlock();b.view.magnet.next?a.view._toLocalCoordinate(b.view._nextGroup):(a.view._toGlobalCoordinate(),a.separate(),a.view.bumpAway(null,100))}}else if(a=this.block.getPrevBlock())this._toLocalCoordinate(a.view._nextGroup),(a=this.block.getNextBlock())&&a.view&&a.view._toLocalCoordinate(this._nextGroup)}; +b.getAbsoluteCoordinate=function(a){a=void 0!==a?a:this.dragMode;if(a===Entry.DRAG_MODE_DRAG)return{x:this.x,y:this.y};a=this.block.getThread().view.requestAbsoluteCoordinate(this);a.x+=this.x;a.y+=this.y;return a};b.getBelowHeight=function(){return this.block.getThread().view.requestPartHeight(this)};b._updateDisplay=function(){this.svgGroup.attr({display:!1===this.display?"none":"block"});this.display&&this._setPosition()};b._updateColor=function(){var a=this._schema.color;this.block.deletable=== +Entry.Block.DELETABLE_FALSE_LIGHTEN&&(a=Entry.Utils.colorLighten(a));this._fillColor=a;this._path.attr({fill:a});this._updateContents()};b._updateContents=function(){for(var a=0;ae||d.splice(e,1)}};b.raiseEvent=function(a,b,d){a=this._eventMap[a];var e=[];if(void 0!==a){for(var f=0;fe||d.splice(e,1)};b.doDestroyThread=function(a,b){var d=this._data,e=d.indexOf(a);0>e||d.splice(e,1)};b.getThreads=function(){return this._data.map(function(a){return a})};b.toJSON=function(){for(var a=this.getThreads(),b=[],d=0,e=a.length;db&&(d+="...");return d};b.appendSvgOptionGroup=function(){return this._block.view.getBoard().svgGroup.elem("g")};b.getValue=function(){return this._block.params[this._index]};b.setValue=function(a,b){this.value!=a&&(this.value=a,this._block.params[this._index]=a,b&&this._blockView.reDraw())};b._isEditable=function(){if(this._block.view.dragMode==Entry.DRAG_MODE_DRAG)return!1;var a=this._block.view,b=a.getBoard();if(!0===b.disableMouseEvent)return!1;var d=b.workspace.selectedBlockView; +if(!d||b!=d.getBoard())return!1;b=a.getSvgRoot();return b==d.svgGroup||$(b).has($(a.svgGroup))};b._selectBlockView=function(){var a=this._block.view;a.getBoard().setSelectedBlock(a)};b._bindRenderOptions=function(){var a=this;$(this.svgGroup).bind("mouseup touchend",function(b){a._isEditable()&&(a.destroyOption(),a._startValue=a.getValue(),a.renderOptions())})};b.pointer=function(a){a=a||[];a.unshift(this._index);a.unshift(Entry.PARAM);return this._block.pointer(a)}})(Entry.Field.prototype);Entry.FieldAngle=function(b,a,c){this._block=a.block;this._blockView=a;this.box=new Entry.BoxModel;this.svgGroup=null;this.position=b.position;this._contents=b;this._index=c;b=this.getValue();this.setValue(this.modValue(void 0!==b?b:90));this.renderStart()};Entry.Utils.inherit(Entry.Field,Entry.FieldAngle); +(function(b){b.renderStart=function(){this.svgGroup&&$(this.svgGroup).remove();this.svgGroup=this._blockView.contentSvgGroup.elem("g",{class:"entry-input-field"});this.textElement=this.svgGroup.elem("text",{x:4,y:4,"font-size":"9pt"});this.textElement.textContent=this.getText();var a=this.getTextWidth(),b=this.position&&this.position.y?this.position.y:0;this._header=this.svgGroup.elem("rect",{x:0,y:b-8,rx:3,ry:3,width:a,height:16,rx:3,ry:3,fill:"#fff","fill-opacity":.4});this.svgGroup.appendChild(this.textElement); +this._bindRenderOptions();this.box.set({x:0,y:0,width:a,height:16})};b.renderOptions=function(){var a=this;this._attachDisposeEvent(function(){a.applyValue();a.destroyOption()});this.optionGroup=Entry.Dom("input",{class:"entry-widget-input-field",parent:$("body")});this.optionGroup.val(this.value);this.optionGroup.on("mousedown",function(a){a.stopPropagation()});this.optionGroup.on("keyup",function(b){var c=b.keyCode||b.which;a.applyValue(b);-1<[13,27].indexOf(c)&&a.destroyOption()});var b=this.getAbsolutePosFromDocument(); +b.y-=this.box.height/2;this.optionGroup.css({height:16,left:b.x,top:b.y,width:a.box.width});this.optionGroup.select();this.svgOptionGroup=this.appendSvgOptionGroup();this.svgOptionGroup.elem("circle",{x:0,y:0,r:49,class:"entry-field-angle-circle"});this._dividerGroup=this.svgOptionGroup.elem("g");for(b=0;360>b;b+=15)this._dividerGroup.elem("line",{x1:49,y1:0,x2:49-(0===b%45?10:5),y2:0,transform:"rotate("+b+", 0, 0)",class:"entry-angle-divider"});b=this.getAbsolutePosFromBoard();b.x+=this.box.width/ +2;b.y=b.y+this.box.height/2+49+1;this.svgOptionGroup.attr({class:"entry-field-angle",transform:"translate("+b.x+","+b.y+")"});var b=a.getAbsolutePosFromDocument(),d=[b.x+a.box.width/2,b.y+a.box.height/2+1];$(this.svgOptionGroup).mousemove(function(b){a.optionGroup.val(a.modValue(function(a,b){var c=b[0]-a[0],d=b[1]-a[1]-49-1,e=Math.atan(-d/c),e=Entry.toDegrees(e),e=90-e;0>c?e+=180:0Math.PI?1:0;this._fillPath=this.svgOptionGroup.elem("path",{d:"M 0,0 v -49 A 49,49 0 %LARGE 1 %X,%Y z".replace("%X",b).replace("%Y",d).replace("%LARGE",a),class:"entry-angle-fill-area"});this.svgOptionGroup.appendChild(this._dividerGroup);this._indicator&&this._indicator.remove();this._indicator=this.svgOptionGroup.elem("line",{x1:0,y1:0,x2:b,y2:d});this._indicator.attr({class:"entry-angle-indicator"})}; +b.applyValue=function(){var a=this.optionGroup.val();isNaN(a)||(a=this.modValue(a),this.setValue(a),this.updateGraph(),this.textElement.textContent=this.getValue(),this.optionGroup&&this.optionGroup.val(a),this.resize())};b.resize=function(){var a=this.getTextWidth();this._header.attr({width:a});this.optionGroup&&this.optionGroup.css({width:a});this.box.set({width:a});this._block.view.alignContent()};b.getTextWidth=function(){return this.textElement?this.textElement.getComputedTextLength()+8:8};b.getText= +function(){return this.getValue()+"\u00b0"};b.modValue=function(a){return a%360};b.destroyOption=function(){this.disposeEvent&&(Entry.disposeEvent.detach(this.disposeEvent),delete this.documentDownEvent);this.optionGroup&&(this.optionGroup.remove(),delete this.optionGroup);this.svgOptionGroup&&(this.svgOptionGroup.remove(),delete this.svgOptionGroup);this.textElement.textContent=this.getText();this.command()}})(Entry.FieldAngle.prototype);Entry.FieldBlock=function(b,a,c,d,e){Entry.Model(this,!1);this._blockView=a;this._block=a.block;this._valueBlock=null;this.box=new Entry.BoxModel;this.changeEvent=new Entry.Event(this);this._index=c;this.contentIndex=e;this._content=b;this.acceptType=b.accept;this._restoreCurrent=b.restore;this.view=this;this.svgGroup=null;this._position=b.position;this.box.observe(a,"alignContent",["width","height"]);this.observe(this,"_updateBG",["magneting"],!1);this.renderStart(a.getBoard(),d)}; +Entry.Utils.inherit(Entry.Field,Entry.FieldBlock); +(function(b){b.schema={magneting:!1};b.renderStart=function(a,b){this.svgGroup=this._blockView.contentSvgGroup.elem("g");this.view=this;this._nextGroup=this.svgGroup;this.box.set({x:0,y:0,width:0,height:20});var d=this.getValue();d&&!d.view&&(d.setThread(this),d.createView(a,b),d.getThread().view.setParent(this));this.updateValueBlock(d);this._blockView.getBoard().constructor!==Entry.Board&&this._valueBlock.view.removeControl()};b.align=function(a,b,d){var e=this.svgGroup;this._position&&(this._position.x&& +(a=this._position.x),this._position.y&&(b=this._position.y));var f=this._valueBlock;f&&(b=-.5*f.view.height);f="translate("+a+","+b+")";void 0===d||d?e.animate({transform:f},300,mina.easeinout):e.attr({transform:f});this.box.set({x:a,y:b})};b.calcWH=function(){var a=this._valueBlock;a?(a=a.view,this.box.set({width:a.width,height:a.height})):this.box.set({width:15,height:20})};b.calcHeight=b.calcWH;b.destroy=function(){};b.inspectBlock=function(){var a=null;if(this._originBlock)a=this._originBlock.type, +delete this._originBlock;else switch(this.acceptType){case "boolean":a="True";break;case "string":a="text";break;case "param":a="function_field_label"}return this._createBlockByType(a)};b._setValueBlock=function(a){this._restoreCurrent&&(this._originBlock=this._valueBlock);a||(a=this.inspectBlock());this._valueBlock=a;this.setValue(a);a.setThread(this);a.getThread().view.setParent(this);return this._valueBlock};b.getValueBlock=function(){return this._valueBlock};b.updateValueBlock=function(a){a instanceof +Entry.Block||(a=void 0);this._destroyObservers();a=this._setValueBlock(a).view;a.bindPrev(this);this._blockView.alignContent();this._posObserver=a.observe(this,"updateValueBlock",["x","y"],!1);this._sizeObserver=a.observe(this,"calcWH",["width","height"]);a=this._blockView.getBoard();a.constructor===Entry.Board&&a.generateCodeMagnetMap()};b._destroyObservers=function(){this._sizeObserver&&this._sizeObserver.destroy();this._posObserver&&this._posObserver.destroy()};b.getPrevBlock=function(a){return this._valueBlock=== +a?this:null};b.getNextBlock=function(){return null};b.requestAbsoluteCoordinate=function(a){a=this._blockView;var b=a.contentPos;a=a.getAbsoluteCoordinate();a.x+=this.box.x+b.x;a.y+=this.box.y+b.y;return a};b.dominate=function(){this._blockView.dominate()};b.isGlobal=function(){return!1};b.separate=function(a){this.getCode().createThread([a]);this.calcWH();this.changeEvent.notify()};b.getCode=function(){return this._block.thread.getCode()};b.cut=function(a){return this._valueBlock===a?[a]:null};b.replace= +function(a){"string"===typeof a&&(a=this._createBlockByType(a));var b=this._valueBlock;Entry.block[b.type].isPrimitive?(b.doNotSplice=!0,b.destroy()):"param"===this.acceptType?(this._destroyObservers(),b.view._toGlobalCoordinate(),a.getTerminateOutputBlock().view._contents[1].replace(b)):(this._destroyObservers(),b.view._toGlobalCoordinate(),this.separate(b),b.view.bumpAway(30,150));this.updateValueBlock(a);a.view._toLocalCoordinate(this.svgGroup);this.calcWH();this.changeEvent.notify()};b.setParent= +function(a){this._parent=a};b.getParent=function(){return this._parent};b._createBlockByType=function(a){this._block.getThread();var b=this._blockView.getBoard();a=new Entry.Block({type:a},this);var d=b.workspace,e;d&&(e=d.getMode());a.createView(b,e);return a};b.spliceBlock=function(){this.updateValueBlock()};b._updateBG=function(){this.magneting?this._bg=this.svgGroup.elem("path",{d:"m 8,12 l -4,0 -2,-2 0,-3 3,0 1,-1 0,-12 -1,-1 -3,0 0,-3 2,-2 l 4,0 z",fill:"#fff",stroke:"#fff","fill-opacity":.7, +transform:"translate(0,12)"}):this._bg&&(this._bg.remove(),delete this._bg)};b.getThread=function(){return this};b.pointer=function(a){a.unshift(this._index);a.unshift(Entry.PARAM);return this._block.pointer(a)}})(Entry.FieldBlock.prototype);Entry.FieldColor=function(b,a,c){this._block=a.block;this._blockView=a;this.box=new Entry.BoxModel;this.svgGroup=null;this._contents=b;this._index=c;this._position=b.position;this.key=b.key;this.setValue(this.getValue()||"#FF0000");this.renderStart(a)};Entry.Utils.inherit(Entry.Field,Entry.FieldColor); +(function(b){b.renderStart=function(){this.svgGroup&&$(this.svgGroup).remove();this.svgGroup=this._blockView.contentSvgGroup.elem("g",{class:"entry-field-color"});var a=this._position,b;a?(b=a.x||0,a=a.y||0):(b=0,a=-8);this._header=this.svgGroup.elem("rect",{x:b,y:a,width:14.5,height:16,fill:this.getValue()});this._bindRenderOptions();this.box.set({x:b,y:a,width:14.5,height:16})};b.renderOptions=function(){var a=this;this._attachDisposeEvent();var b=Entry.FieldColor.getWidgetColorList();this.optionGroup= +Entry.Dom("table",{class:"entry-widget-color-table",parent:$("body")});for(var d=0;d'),{parent:a});this.svg=Entry.SVG("globalSvg");this.top=this.left=this.width=0;this._inited=!0}};b.setView= +function(a,b){if(a!=this._view&&!a.block.isReadOnly()&&a.movable)return this._view=a,this._mode=b,b!==Entry.Workspace.MODE_VIMBOARD&&a.set({visible:!1}),this.draw(),this.show(),this.align(),this.position(),!0};b.draw=function(){var a=this._view;this._svg&&this.remove();var b=this._mode==Entry.Workspace.MODE_VIMBOARD;this.svgGroup=Entry.SVG.createElement(a.svgGroup.cloneNode(!0),{opacity:1});this.svg.appendChild(this.svgGroup);b&&(a=$(this.svgGroup),a.find("g").css({filter:"none"}),a.find("path").velocity({opacity:0}, +{duration:500}),a.find("text").velocity({fill:"#000000"},{duration:530}))};b.remove=function(){this.svgGroup&&(this.svgGroup.remove(),delete this.svgGroup,delete this._view,delete this._offsetX,delete this._offsetY,delete this._startX,delete this._startY,this.hide())};b.align=function(){var a=this._view.getSkeleton().box(this._view).offsetX||0,b=this._view.getSkeleton().box(this._view).offsetY||0,a=-1*a+1,b=-1*b+1;this._offsetX=a;this._offsetY=b;this.svgGroup.attr({transform:"translate("+a+","+b+ +")"})};b.show=function(){this._container.removeClass("entryRemove");this.svgDom.css("display","block")};b.hide=function(){this._container.addClass("entryRemove");this.svgDom.css("display","none")};b.position=function(){var a=this._view,b=a.getAbsoluteCoordinate(),a=a.getBoard().offset();this.left=b.x+a.left-this._offsetX;this.top=b.y+a.top-this._offsetY;b=this.svgDom[0];b.style.left=this.left+"px";b.style.top=this.top+"px"};b.terminateDrag=function(a){var b=Entry.mouseCoordinate;a=a.getBoard().workspace.blockMenu; +var d=a.offset().left,e=a.offset().top,f=a.visible?a.svgDom.width():0;return b.y>e&&b.x>d+f?this.DONE:b.y>e&&b.x>d&&a.visible?this.REMOVE:this.RETURN};b.addControl=function(a){this.onMouseDown.apply(this,arguments)};b.onMouseDown=function(a){function b(a){var c=a.pageX;a=a.pageY;var d=e.left+(c-e._startX),f=e.top+(a-e._startY);e.svgDom.css({left:d,top:f});e._startX=c;e._startY=a;e.left=d;e.top=f}function d(a){$(document).unbind(".block")}this._startY=a.pageY;var e=this;a.stopPropagation();a.preventDefault(); +var f=$(document);f.bind("mousemove.block",b);f.bind("mouseup.block",d);f.bind("touchmove.block",b);f.bind("touchend.block",d);this._startX=a.pageX;this._startY=a.pageY}})(Entry.GlobalSvg);Entry.Mutator=function(){};(function(b){b.mutate=function(a,b){var d=Entry.block[a];void 0===d.changeEvent&&(d.changeEvent=new Entry.Event);d.template=b.template;d.params=b.params;d.changeEvent.notify(1)}})(Entry.Mutator);(function(b){})(Entry.Mutator.prototype);Entry.RenderView=function(b,a){this._align=a||"CENTER";b="string"===typeof b?$("#"+b):$(b);if("DIV"!==b.prop("tagName"))return console.error("Dom is not div element");this.view=b;this.viewOnly=!0;this.suffix="renderView";this.disableMouseEvent=this.visible=!0;this._svgId="renderView_"+(new Date).getTime();this._generateView();this.offset=this.svgDom.offset();this.setWidth();this.svg=Entry.SVG(this._svgId);Entry.Utils.addFilters(this.svg,this.suffix);this.svg&&(this.svgGroup=this.svg.elem("g"),this.svgThreadGroup= +this.svgGroup.elem("g"),this.svgThreadGroup.board=this,this.svgBlockGroup=this.svgGroup.elem("g"),this.svgBlockGroup.board=this)}; +(function(b){b.schema={code:null,dragBlock:null,closeBlock:null,selectedBlockView:null};b._generateView=function(){this.renderViewContainer=Entry.Dom("div",{"class":"renderViewContainer",parent:this.view});this.svgDom=Entry.Dom($(''),{parent:this.renderViewContainer})};b.changeCode=function(a){if(!(a instanceof Entry.Code))return console.error("You must inject code instance");this.code=a;this.svg|| +(this.svg=Entry.SVG(this._svgId),this.svgGroup=this.svg.elem("g"),this.svgThreadGroup=this.svgGroup.elem("g"),this.svgThreadGroup.board=this,this.svgBlockGroup=this.svgGroup.elem("g"),this.svgBlockGroup.board=this);a.createView(this);this.align();this.resize()};b.align=function(){var a=this.code.getThreads();if(a&&0!==a.length){for(var b=0,d="LEFT"==this._align?20:this.svgDom.width()/2,e=0,f=a.length;e'), +{parent:this.wrapper});this.visible=!0;var d=this;this.svg=Entry.SVG(this._svgId);$(window).scroll(function(){d.updateOffset()});this.svgGroup=this.svg.elem("g");this.svgThreadGroup=this.svgGroup.elem("g");this.svgThreadGroup.board=this;this.svgBlockGroup=this.svgGroup.elem("g");this.svgBlockGroup.board=this;a.isOverlay?(this.wrapper.addClass("entryOverlayBoard"),this.generateButtons(),this.suffix="overlayBoard"):this.suffix="board";Entry.Utils.addFilters(this.svg,this.suffix);this.patternRect=Entry.Utils.addBlockPattern(this.svg, +this.suffix)};b.changeCode=function(a){this.code&&this.codeListener&&this.code.changeEvent.detach(this.codeListener);this.set({code:a});var b=this;a&&(this.codeListener=this.code.changeEvent.attach(this,function(){b.changeEvent.notify()}),a.createView(this),this.generateCodeMagnetMap(a));this.scroller.resizeScrollBar()};b.bindCodeView=function(a){this.svgBlockGroup.remove();this.svgThreadGroup.remove();this.svgBlockGroup=a.svgBlockGroup;this.svgThreadGroup=a.svgThreadGroup;this.svgGroup.appendChild(this.svgThreadGroup); +this.svgGroup.appendChild(this.svgBlockGroup)};b.setMagnetedBlock=function(a,b){if(this.magnetedBlockView){if(this.magnetedBlockView===a)return;this.magnetedBlockView.set({magneting:!1})}this.set({magnetedBlockView:a});a&&(a.set({magneting:b}),a.dominate())};b.getCode=function(){return this.code};b.findById=function(a){return this.code.findById(a)};b._addControl=function(){var a=this.svgDom,b=this;a.mousedown(function(){b.onMouseDown.apply(b,arguments)});a.bind("touchstart",function(){b.onMouseDown.apply(b, +arguments)});a.on("wheel",function(){b.mouseWheel.apply(b,arguments)});var d=b.scroller;d&&(a.mouseenter(function(a){d.setOpacity(1)}),a.mouseleave(function(a){d.setOpacity(0)}))};b.onMouseDown=function(a){function b(a){a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();a=a.originalEvent&&a.originalEvent.touches?a.originalEvent.touches[0]:a;var c=f.dragInstance;f.scroller.scroll(a.pageX-c.offsetX,a.pageY-c.offsetY);c.set({offsetX:a.pageX,offsetY:a.pageY})}function d(a){$(document).unbind(".entryBoard"); +delete f.dragInstance}if(this.workspace.getMode()!=Entry.Workspace.MODE_VIMBOARD){a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();if(0===a.button||a.originalEvent&&a.originalEvent.touches){a=a.originalEvent&&a.originalEvent.touches?a.originalEvent.touches[0]:a;Entry.documentMousedown&&Entry.documentMousedown.notify(a);var e=$(document);e.bind("mousemove.entryBoard",b);e.bind("mouseup.entryBoard",d);e.bind("touchmove.entryBoard",b);e.bind("touchend.entryBoard",d);this.dragInstance= +new Entry.DragInstance({startX:a.pageX,startY:a.pageY,offsetX:a.pageX,offsetY:a.pageY})}else if(Entry.Utils.isRightButton(a)){if(!this.visible)return;a=[];this._contextOptions[Entry.Board.OPTION_PASTE].option.enable=!!Entry.clipboard;for(e=0;ea&&(f=f+e+10,e=0,d=15);e=Math.max(e,k.width);l=d+15;h._moveTo(f,l,!1);d=d+k.height+15}}this.scroller.resizeScrollBar()};b.clear=function(){this.svgBlockGroup.remove();this.svgThreadGroup.remove()};b.updateOffset=function(){this._offset=this.svg.getBoundingClientRect();var a=$(window),b=a.scrollTop(), +a=a.scrollLeft(),d=this._offset;this.relativeOffset={top:d.top-b,left:d.left-a};this.btnWrapper&&this.btnWrapper.attr({transform:"translate("+(d.width/2-65)+","+(d.height-200)+")"})};b.generateButtons=function(){var a=this,b=this.svgGroup.elem("g");this.btnWrapper=b;var d=b.elem("text",{x:27,y:33,class:"entryFunctionButtonText"});d.textContent=Lang.Buttons.save;var e=b.elem("text",{x:102.5,y:33,class:"entryFunctionButtonText"});e.textContent=Lang.Buttons.cancel;var f=b.elem("circle",{cx:27.5,cy:27.5, +r:27.5,class:"entryFunctionButton"}),b=b.elem("circle",{cx:102.5,cy:27.5,r:27.5,class:"entryFunctionButton"});f.onclick=function(b){a.save()};d.onclick=function(b){a.save()};b.onclick=function(b){a.cancelEdit()};e.onclick=function(b){a.cancelEdit()}};b.cancelEdit=function(){this.workspace.setMode(Entry.Workspace.MODE_BOARD,"cancelEdit")};b.save=function(){this.workspace.setMode(Entry.Workspace.MODE_BOARD,"save")};b.generateCodeMagnetMap=function(){var a=this.code;if(a&&this.dragBlock)for(var b in this.dragBlock.magnet){var d= +this._getCodeBlocks(a,b);d.sort(function(a,b){return a.point-b.point});d.unshift({point:-Number.MAX_VALUE,blocks:[]});for(var e=1;eg.point&&(g.blocks.push(h),l++,g=d[l],g););delete f.startBlock}f.endPoint=Number.MAX_VALUE;d[e-1].endPoint=f.point}this._magnetMap[b]=d}};b._getCodeBlocks=function(a,b){var d=a.getThreads(),e=[],f;switch(b){case "previous":f=this._getNextMagnets;break;case "next":f=this._getPreviousMagnets;break; +case "string":f=this._getFieldMagnets;break;case "boolean":f=this._getFieldMagnets;break;case "param":f=this._getOutputMagnets;break;default:return[]}for(var g=0;gd.endPoint)f=h+1;else{e=d.blocks;for(f=0;fthis.events[b].indexOf(f)&&this.events[b].push(f)}}this._schema.event&&this.thread.registerEvent(this,this._schema.event);a=this.params;b=this._schema.params;for(e=0;b&&e=e&&g>=b)}};b.align=function(){var a=this.getPosition();this.svgGroup.attr({transform:"translate("+a.x+","+a.y+")"})};b.setPosition=function(){if(this.board){var a=this.board.svgDom;this._x=a.width()-110;this._y=a.height()-110;this.align()}};b.getPosition=function(){return{x:this._x,y:this._y}};b.tAnimation=function(a){if(a!==this.isOver){a=void 0===a?!0:a;var b,d=this.trashcanTop;b=a?{translateX:15,translateY:-25, +rotateZ:30}:{translateX:0,translateY:0,rotateZ:0};$(d).velocity(b,{duration:50});this.isOver=a}};b.setBoard=function(a){this._dragBlockObserver&&this._dragBlockObserver.destroy();this.board=a;this.svgGroup||this._generateView();var b=a.svg,d=b.firstChild;d?b.insertBefore(this.svgGroup,d):b.appendChild(this.svgGroup);this._dragBlockObserver=a.observe(this,"updateDragBlock",["dragBlock"]);this.svgGroup.attr({filter:"url(#entryTrashcanFilter_"+a.suffix+")"});this.setPosition()}})(Entry.FieldTrashcan.prototype);Entry.Vim=function(b){b="string"===typeof b?$("#"+b):$(b);if("DIV"!==b.prop("tagName"))return console.error("Dom is not div element");this.createDom(b);this._parser=new Entry.Parser("maze","js",this.codeMirror);this._blockParser=new Entry.Parser("maze","block");Entry.Model(this,!1);window.eventset=[]}; +(function(b){b.createDom=function(a){function b(a){var c=e.getCodeToText(a.block);e.codeMirror.display.dragFunctions.leave(a);var d=Entry.Utils.createMouseEvent("mousedown",a);e.codeMirror.display.scroller.dispatchEvent(d);var c=c.split("\n"),k=c.length-1,l=0;c.forEach(function(a,b){e.codeMirror.replaceSelection(a);l=e.doc.getCursor().line;e.codeMirror.indentLine(l);0!==b&&k===b||e.codeMirror.replaceSelection("\n")});a=Entry.Utils.createMouseEvent("mouseup",a);e.codeMirror.display.scroller.dispatchEvent(a)} +function d(a){e.codeMirror.display.dragFunctions.over(a)}var e;this.view=Entry.Dom("div",{parent:a,class:"entryVimBoard"});this.codeMirror=CodeMirror(this.view[0],{lineNumbers:!0,value:"",mode:{name:"javascript",globalVars:!0},theme:"default",indentUnit:4,styleActiveLine:!0,extraKeys:{"Ctrl-Space":"javascriptComplete",Tab:function(a){var b=Array(a.getOption("indentUnit")+1).join(" ");a.replaceSelection(b)}},lint:!0,viewportMargin:10});this.doc=this.codeMirror.getDoc();e=this;a=this.view[0];a.removeEventListener("dragEnd", +b);a.removeEventListener("dragOver",d);a.addEventListener("dragEnd",b);a.addEventListener("dragOver",d)};b.hide=function(){this.view.addClass("entryRemove")};b.show=function(){this.view.removeClass("entryRemove")};b.textToCode=function(){var a=this.codeMirror.getValue(),a=this._parser.parse(a);if(0===a.length)throw"\ube14\ub85d \ud30c\uc2f1 \uc624\ub958";return a};b.codeToText=function(a){a=this._blockParser.parse(a);this.codeMirror.setValue(a)};b.getCodeToText=function(a){return this._blockParser.parse(a)}})(Entry.Vim.prototype);Entry.Workspace=function(b){Entry.Model(this,!1);this.observe(this,"_handleChangeBoard",["selectedBoard"],!1);this.trashcan=new Entry.FieldTrashcan;var a=b.blockMenu;a&&(this.blockMenu=new Entry.BlockMenu(a.dom,a.align,a.categoryData,a.scroll),this.blockMenu.workspace=this,this.blockMenu.observe(this,"_setSelectedBlockView",["selectedBlockView"],!1));if(a=b.board)a.workspace=this,this.board=new Entry.Board(a),this.board.observe(this,"_setSelectedBlockView",["selectedBlockView"],!1),this.set({selectedBoard:this.board}); +if(a=b.vimBoard)this.vimBoard=new Entry.Vim(a.dom),this.vimBoard.workspace=this;this.board&&this.vimBoard&&this.vimBoard.hide();Entry.GlobalSvg.createDom();this.mode=Entry.Workspace.MODE_BOARD;Entry.keyPressed&&Entry.keyPressed.attach(this,this._keyboardControl);this.changeEvent=new Entry.Event(this);Entry.commander.setCurrentEditor("board",this.board)};Entry.Workspace.MODE_BOARD=0;Entry.Workspace.MODE_VIMBOARD=1;Entry.Workspace.MODE_OVERLAYBOARD=2; +(function(b){b.schema={selectedBlockView:null,selectedBoard:null};b.getBoard=function(){return this.board};b.getSelectedBoard=function(){return this.selectedBoard};b.getBlockMenu=function(){return this.blockMenu};b.getVimBoard=function(){return this.vimBoard};b.getMode=function(){return this.mode};b.setMode=function(a,b){a=Number(a);var d=this.mode;this.mode=a;switch(a){case d:return;case Entry.Workspace.MODE_VIMBOARD:this.board&&this.board.hide();this.overlayBoard&&this.overlayBoard.hide();this.set({selectedBoard:this.vimBoard}); +this.vimBoard.show();this.vimBoard.codeToText(this.board.code);this.blockMenu.renderText();this.board.clear();break;case Entry.Workspace.MODE_BOARD:try{this.board.show(),this.set({selectedBoard:this.board}),this.textToCode(d),this.vimBoard&&this.vimBoard.hide(),this.overlayBoard&&this.overlayBoard.hide(),this.blockMenu.renderBlock()}catch(e){throw this.board&&this.board.hide(),this.set({selectedBoard:this.vimBoard}),Entry.dispatchEvent("setProgrammingMode",Entry.Workspace.MODE_VIMBOARD),e;}Entry.commander.setCurrentEditor("board", +this.board);break;case Entry.Workspace.MODE_OVERLAYBOARD:this.overlayBoard||this.initOverlayBoard(),this.overlayBoard.show(),this.set({selectedBoard:this.overlayBoard}),Entry.commander.setCurrentEditor("board",this.overlayBoard)}this.changeEvent.notify(b)};b.changeBoardCode=function(a){this.board.changeCode(a)};b.changeOverlayBoardCode=function(a){this.overlayBoard&&this.overlayBoard.changeCode(a)};b.changeBlockMenuCode=function(a){this.blockMenu.changeCode(a)};b.textToCode=function(a){if(a==Entry.Workspace.MODE_VIMBOARD){a= +this.vimBoard.textToCode();var b=this.board,d=b.code;d.load(a);d.createView(b);b.reDraw();this.board.alignThreads()}};b.codeToText=function(a){return this.vimBoard.codeToText(a)};b.getCodeToText=function(a){return this.vimBoard.getCodeToText(a)};b._setSelectedBlockView=function(){this.set({selectedBlockView:this.board.selectedBlockView||this.blockMenu.selectedBlockView||(this.overlayBoard?this.overlayBoard.selectedBlockView:null)})};b.initOverlayBoard=function(){this.overlayBoard=new Entry.Board({dom:this.board.view, +workspace:this,isOverlay:!0});this.overlayBoard.changeCode(new Entry.Code([]));this.overlayBoard.workspace=this;this.overlayBoard.observe(this,"_setSelectedBlockView",["selectedBlockView"],!1)};b._keyboardControl=function(a){var b=a.keyCode||a.which,d=a.ctrlKey;if(!Entry.Utils.isInInput(a)){var e=this.selectedBlockView;e&&!e.isInBlockMenu&&e.block.isDeletable()&&(8==b||46==b?(Entry.do("destroyBlock",e.block),a.preventDefault()):d&&(67==b?e.block.copyToClipboard():88==b&&(a=e.block,a.copyToClipboard(), +a.destroy(!0,!0),e.getBoard().setSelectedBlock(null))));d&&86==b&&(b=this.selectedBoard)&&b instanceof Entry.Board&&Entry.clipboard&&Entry.do("addThread",Entry.clipboard).value.getFirstBlock().copyToClipboard()}};b._handleChangeBoard=function(){var a=this.selectedBoard;a&&a.constructor===Entry.Board&&this.trashcan.setBoard(a)}})(Entry.Workspace.prototype);Entry.Playground=function(){this.enableArduino=this.isTextBGMode_=!1;this.viewMode_="default";Entry.addEventListener("textEdited",this.injectText);Entry.addEventListener("hwChanged",this.updateHW)}; +Entry.Playground.prototype.generateView=function(b,a){this.view_=b;this.view_.addClass("entryPlayground");if(a&&"workspace"!=a)"phone"==a&&(this.view_.addClass("entryPlaygroundPhone"),c=Entry.createElement("div","entryCategoryTab"),c.addClass("entryPlaygroundTabPhone"),Entry.view_.insertBefore(c,this.view_),this.generateTabView(c),this.tabView_=c,c=Entry.createElement("div","entryCurtain"),c.addClass("entryPlaygroundCurtainPhone"),c.addClass("entryRemove"),c.innerHTML=Lang.Workspace.cannot_edit_click_to_stop, +c.bindOnClick(function(){Entry.engine.toggleStop()}),this.view_.appendChild(c),this.curtainView_=c,Entry.pictureEditable&&(c=Entry.createElement("div","entryPicture"),c.addClass("entryPlaygroundPicturePhone"),c.addClass("entryRemove"),this.view_.appendChild(c),this.generatePictureView(c),this.pictureView_=c),c=Entry.createElement("div","entryText"),c.addClass("entryRemove"),this.view_.appendChild(c),this.generateTextView(c),this.textView_=c,Entry.soundEditable&&(c=Entry.createElement("div","entrySound"), +c.addClass("entryPlaygroundSoundWorkspacePhone"),c.addClass("entryRemove"),this.view_.appendChild(c),this.generateSoundView(c),this.soundView_=c),c=Entry.createElement("div","entryDefault"),this.view_.appendChild(c),this.generateDefaultView(c),this.defaultView_=c,c=Entry.createElement("div","entryCode"),c.addClass("entryPlaygroundCodePhone"),this.view_.appendChild(c),this.generateCodeView(c),this.codeView_=this.codeView_=c,Entry.addEventListener("run",function(a){Entry.playground.curtainView_.removeClass("entryRemove")}), +Entry.addEventListener("stop",function(a){Entry.playground.curtainView_.addClass("entryRemove")}));else{this.view_.addClass("entryPlaygroundWorkspace");var c=Entry.createElement("div","entryCategoryTab");c.addClass("entryPlaygroundTabWorkspace");this.view_.appendChild(c);this.generateTabView(c);this.tabView_=c;c=Entry.createElement("div","entryCurtain");c.addClass("entryPlaygroundCurtainWorkspace");c.addClass("entryRemove");var d=Lang.Workspace.cannot_edit_click_to_stop.split(".");c.innerHTML=d[0]+ +".
"+d[1];c.addEventListener("click",function(){Entry.engine.toggleStop()});this.view_.appendChild(c);this.curtainView_=c;Entry.pictureEditable&&(c=Entry.createElement("div","entryPicture"),c.addClass("entryPlaygroundPictureWorkspace"),c.addClass("entryRemove"),this.view_.appendChild(c),this.generatePictureView(c),this.pictureView_=c);c=Entry.createElement("div","entryText");c.addClass("entryPlaygroundTextWorkspace");c.addClass("entryRemove");this.view_.appendChild(c);this.generateTextView(c); +this.textView_=c;Entry.soundEditable&&(c=Entry.createElement("div","entrySound"),c.addClass("entryPlaygroundSoundWorkspace"),c.addClass("entryRemove"),this.view_.appendChild(c),this.generateSoundView(c),this.soundView_=c);c=Entry.createElement("div","entryDefault");c.addClass("entryPlaygroundDefaultWorkspace");this.view_.appendChild(c);this.generateDefaultView(c);this.defaultView_=c;c=Entry.createElement("div","entryCode");c.addClass("entryPlaygroundCodeWorkspace");c.addClass("entryRemove");this.view_.appendChild(c); +this.generateCodeView(c);this.codeView_=c;d=Entry.createElement("div");d.addClass("entryPlaygroundResizeWorkspace","entryRemove");this.resizeHandle_=d;this.view_.appendChild(d);this.initializeResizeHandle(d);this.codeView_=c;Entry.addEventListener("run",function(a){Entry.playground.curtainView_.removeClass("entryRemove")});Entry.addEventListener("stop",function(a){Entry.playground.curtainView_.addClass("entryRemove")})}};Entry.Playground.prototype.generateDefaultView=function(b){return b}; +Entry.Playground.prototype.generateTabView=function(b){var a=this,c=Entry.createElement("ul");c.addClass("entryTabListWorkspace");this.tabList_=c;b.appendChild(c);this.tabViewElements={};b=Entry.createElement("li","entryCodeTab");b.innerHTML=Lang.Workspace.tab_code;b.addClass("entryTabListItemWorkspace");b.addClass("entryTabSelected");c.appendChild(b);b.bindOnClick(function(b){a.changeViewMode("code");a.blockMenu.reDraw()});this.tabViewElements.code=b;Entry.pictureEditable&&(b=Entry.createElement("li", +"entryPictureTab"),b.innerHTML=Lang.Workspace.tab_picture,b.addClass("entryTabListItemWorkspace"),c.appendChild(b),b.bindOnClick(function(a){Entry.playground.changeViewMode("picture")}),this.tabViewElements.picture=b,b=Entry.createElement("li","entryTextboxTab"),b.innerHTML=Lang.Workspace.tab_text,b.addClass("entryTabListItemWorkspace"),c.appendChild(b),b.bindOnClick(function(a){Entry.playground.changeViewMode("text")}),this.tabViewElements.text=b,b.addClass("entryRemove"));Entry.soundEditable&&(b= +Entry.createElement("li","entrySoundTab"),b.innerHTML=Lang.Workspace.tab_sound,b.addClass("entryTabListItemWorkspace"),c.appendChild(b),b.bindOnClick(function(a){Entry.playground.changeViewMode("sound")}),this.tabViewElements.sound=b);Entry.hasVariableManager&&(b=Entry.createElement("li","entryVariableTab"),b.innerHTML=Lang.Workspace.tab_attribute,b.addClass("entryTabListItemWorkspace"),b.addClass("entryVariableTabWorkspace"),c.appendChild(b),b.bindOnClick(function(a){Entry.playground.toggleOnVariableView(); +Entry.playground.changeViewMode("variable")}),this.tabViewElements.variable=b)}; +Entry.Playground.prototype.generateCodeView=function(b){var a=this.createVariableView();b.appendChild(a);this.variableView_=a;b=Entry.Dom(b);a=Entry.Dom("div",{parent:b,id:"entryWorkspaceBoard",class:"entryWorkspaceBoard"});b=Entry.Dom("div",{parent:b,id:"entryWorkspaceBlockMenu",class:"entryWorkspaceBlockMenu"});this.mainWorkspace=new Entry.Workspace({blockMenu:{dom:b,align:"LEFT",categoryData:EntryStatic.getAllBlocks(),scroll:!0},board:{dom:a}});this.blockMenu=this.mainWorkspace.blockMenu;this.board= +this.mainWorkspace.board;Entry.hw&&this.updateHW()}; +Entry.Playground.prototype.generatePictureView=function(b){if("workspace"==Entry.type){var a=Entry.createElement("div","entryAddPicture");a.addClass("entryPlaygroundAddPicture");a.bindOnClick(function(a){Entry.dispatchEvent("openPictureManager")});var c=Entry.createElement("div","entryAddPictureInner");c.addClass("entryPlaygroundAddPictureInner");c.innerHTML=Lang.Workspace.picture_add;a.appendChild(c);b.appendChild(a);a=Entry.createElement("ul","entryPictureList");a.addClass("entryPlaygroundPictureList"); +$&&$(a).sortable({start:function(a,b){b.item.data("start_pos",b.item.index())},stop:function(a,b){var c=b.item.data("start_pos"),g=b.item.index();Entry.playground.movePicture(c,g)},axis:"y"});b.appendChild(a);this.pictureListView_=a;a=Entry.createElement("div","entryPainter");a.addClass("entryPlaygroundPainter");b.appendChild(a);this.painter=new Entry.Painter;this.painter.initialize(a)}else"phone"==Entry.type&&(a=Entry.createElement("div","entryAddPicture"),a.addClass("entryPlaygroundAddPicturePhone"), +a.bindOnClick(function(a){Entry.dispatchEvent("openPictureManager")}),c=Entry.createElement("div","entryAddPictureInner"),c.addClass("entryPlaygroundAddPictureInnerPhone"),c.innerHTML=Lang.Workspace.picture_add,a.appendChild(c),b.appendChild(a),a=Entry.createElement("ul","entryPictureList"),a.addClass("entryPlaygroundPictureListPhone"),$&&$(a).sortable({start:function(a,b){b.item.data("start_pos",b.item.index())},stop:function(a,b){var c=b.item.data("start_pos"),g=b.item.index();Entry.playground.movePicture(c, +g)},axis:"y"}),b.appendChild(a),this.pictureListView_=a)}; +Entry.Playground.prototype.generateTextView=function(b){var a=Entry.createElement("div");b.appendChild(a);b=Entry.createElement("div");b.addClass("textProperties");a.appendChild(b);var c=Entry.createElement("div");c.addClass("entryTextFontSelect");b.appendChild(c);var d=Entry.createElement("select","entryPainterAttrFontName");d.addClass("entryPlaygroundPainterAttrFontName","entryTextFontSelecter");d.size="1";d.onchange=function(a){Entry.playground.object.entity.setFontType(a.target.value)};for(var e= +0;e p").html(Lang.Menus.linebreak_on_desc_1),$(".entryPlaygroundLinebreakDescription > ul > li").eq(0).html(Lang.Menus.linebreak_on_desc_2),$(".entryPlaygroundLinebreakDescription > ul > li").eq(1).html(Lang.Menus.linebreak_on_desc_3)); +Entry.playground.setFontAlign(Entry.playground.object.entity.getTextAlign());b=Entry.playground.object.entity.getFontSize();Entry.playground.fontSizeIndiciator.style.width=b+"%";Entry.playground.fontSizeKnob.style.left=.88*b+"px"}};Entry.Playground.prototype.injectSound=function(){var b=this.soundListView_;if(b){for(;b.hasChildNodes();)b.removeChild(b.lastChild);if(this.object)for(var a=this.object.sounds,c=0,d=a.length;c>>>>>> refac/entry-block +>>>>>>> origin/release/1.3.0 +======= +"lineCount":20075, +"mappings":"AAIA,IAAAA,QAAQ,CAEF,MAAQ,EAFN,EAIF,kBAAoB,CAJlB,EAMF,gBAAkB,CANhB,EAQF,iBAAmB,CARjB,EAUF,YAAc,CAAC,QAAD,EAAW,MAAX,EAAmB,OAAnB,CAVZ,EAYF,UAAY,IAZV,EAkBF,YAAcC,QAAQ,CAACC,CAAD,CAAU;AAC7BA,GAAL,KACIA,CADJ,GACcF,KAAAG,gBAAA,CAAsB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GAAY4F,QAAS,EAAG;AACvB,SAAO,IAAA1H,eADgB;CAIxBvU;CAAA3/D,OAAA,GAAW67E,QAAQ,EAAG;AAClB,MAAItiF,IAAYghC,QAAA09C,eAAA,CAAwB,2BAAxB,CAAhB,EACInD,IAASv6C,QAAA09C,eAAA,CAAwB,eAAxB,CACb6D;GAAA,GAAIviF,CAAAwiF,YACJjH;GAAAt1E,MAAA,GAAes8E,CAAf,GAAiB,IACjBhH;GAAAr1E,OAAA,GAAkB,CAAlB,GAAgBq8E,CAAhB,GAAoB,EAApB,GAAyB,IALP;;", +>>>>>>> refac/entry-block +"sources":["src/entry.js","src/blocks/block_albert.js","src/blocks/block_arduino.js","src/blocks/block_bitbrick.js","src/blocks/block_brush.js","src/blocks/block_calc.js","src/blocks/block_flow.js","src/blocks/block_function.js","src/blocks/block_hamster.js","src/blocks/block_judgement.js","src/blocks/block_looks.js","src/blocks/block_moving.js","src/blocks/block_neobot.js","src/blocks/block_robotis.js","src/blocks/block_scene.js","src/blocks/block_sound.js","src/blocks/block_start.js","src/blocks/block_text.js","src/blocks/block_variable.js","src/blocks/block_xbot.js","src/class/collection.js","src/class/event.js","src/class/observer.js","src/command/command.js","src/command/commander.js","src/command/commands/block.js","src/command/commands/object.js","src/container.js","src/core/db.js","src/core/dom.js","src/core/svg.js","src/dialog.js","src/doneProject.js","src/engine.js","src/entity.js","src/helper.js","src/log/activity.js","src/log/activityReporter.js","src/log/state.js","src/log/state_manager.js","src/object.js","src/painter.js","src/parser/block.js","src/parser/js.js","src/parser/parser.js","src/popup.js","src/popup_helper.js","src/project.js","src/property_panel.js","src/init.js","src/reporter.js","src/scene.js","src/script.js","src/stage.js","src/stamp_entity.js","src/toast.js","src/tvCast.js","src/util/block_driver.js","src/util/contextmenu.js","src/util/static.js","src/util/utils.js","src/class/model.js","src/function.js","src/hw_monitor.js","src/hw.js","src/model/block_model.js","src/model/block_render_model.js","src/model/box_model.js","src/model/drag_instance.js","src/model/thread_model.js","src/variable.js","src/variable_container.js","src/workspace/basic_block.js","src/workspace/block_menu.js","src/workspace/block_menu_scroll.js","src/workspace/block_view.js","src/workspace/code.js","src/workspace/code_view.js","src/workspace/connection_ripple.js","src/workspace/executors.js","src/workspace/field/field.js","src/workspace/field/angle.js","src/workspace/field/block.js","src/workspace/field/color.js","src/workspace/field/dropdown.js","src/workspace/field/dropdownDynamic.js","src/workspace/field/image.js","src/workspace/field/indicator.js","src/workspace/field/keyboardInput.js","src/workspace/field/lineBreak.js","src/workspace/field/output.js","src/workspace/field/statement.js","src/workspace/field/text.js","src/workspace/field/textInput.js","src/workspace/globalSvg.js","src/workspace/mutator.js","src/workspace/renderView.js","src/workspace/scroll.js","src/workspace/board.js","src/workspace/skeleton.js","src/workspace/thread.js","src/workspace/block.js","src/workspace/thread_view.js","src/workspace/trashcan.js","src/workspace/vim.js","src/workspace/workspace.js","src/playground.js","src/xml.js","src/youtube.js"], +"names":["Entry","Entry.loadProject","project","getStartProject","mediaFilePath","type","stateManager","startIgnore","projectId","_id","variableContainer","setVariables","variables","setMessages","messages","scene","addScenes","scenes","stage","initObjectContainers","setFunctions","functions","container","setObjects","objects","FPS","speed","createjs","Ticker","setFPS","endIgnore","engine","projectTimer","generateTimer","Object","keys","inputValue","length","generateAnswer","start","Entry.exportProject","isState","toggleStop","Func","workspace","visible","cancelEdit","toJSON","getVariableJSON","getMessageJSON","getFunctionJSON","Entry.setBlockByText","objectType","blockText","blockJSON","categories","jQuery","parseXML","xml","getElementsByTagName","i","category","json","getAttribute","blocks","childNodes","j","b","tagName","toUpperCase","push","playground","setBlockMenu","Entry.setBlock","XML","setMenuBlock","Entry.enableArduino","Entry.initSound","sound","path","fileurl","defaultPath","filename","substring","ext","soundQueue","loadFile","id","src","LoadQueue","SOUND","Entry.beforeUnload","e","hw","closeConnection","updateCloudVariables","localStorage","interfaceState","setItem","JSON","stringify","isSaved","Lang","Workspace","project_changed","Entry.loadInterfaceState","getItem","interfaceModel","resizeElement","parse","menuWidth","canvasWidth","Entry.resizeElement","speedPanelOn","toggleSpeedPanel","canvasSize","canvasHeight","view_","style","width","height","top","canvas","removeClass","addClass","left","propertyPanel","resize","addButton","getElementsByClassName","objectAddable","display","runButton","stopButton","$","css","mainWorkspace","blockMenu","setWidth","resizeHandle_","variableViewWrapper_","windowResized","notify","Entry.getUpTime","getTime","Date","startTime","Entry.addActivity","activityType","addActivity","Entry.startActivityLogging","reporter","window","user","Entry.getActivityLog","log","activityLog","activityLog_","Entry.cancelObjectEdit","object","target","isCurrent","find","isEditing","editObjectValues","Albert","PORT_MAP","leftWheel","rightWheel","buzzer","leftEye","rightEye","note","bodyLed","frontLed","padWidth","padHeight","setZero","portMap","sq","sendQueue","port","update","albert","tempo","removeAllTimeouts","monitorTemplate","imgPath","listPorts","name","pos","x","y","Hw","ports","Blocks","ALBERT_sensor_leftProximity","ALBERT_sensor_rightProximity","ALBERT_sensor_battery","ALBERT_sensor_light","body","led","front","mode","timeouts","removeTimeout","clearTimeout","index","indexOf","splice","Blockly","albert_hand_found","init","setColour","appendDummyInput","appendField","ALBERT_hand_found","setOutput","setInputsInline","block","Entry.block.albert_hand_found","sprite","script","pd","portData","leftProximity","rightProximity","albert_value","FieldDropdown","ALBERT_sensor_signalStrength","ALBERT_sensor_frontOid","ALBERT_sensor_backOid","ALBERT_sensor_positionX","ALBERT_sensor_positionY","ALBERT_sensor_orientation","Entry.block.albert_value","dev","getField","albert_move_forward_for_secs","ALBERT_move_forward_for_secs_1","appendValueInput","setCheck","ALBERT_move_forward_for_secs_2","FieldIcon","setPreviousStatement","setNextStatement","Entry.block.albert_move_forward_for_secs","isStart","timeFlag","isContinue","callReturn","timeValue","getNumberValue","timer","setTimeout","albert_move_backward_for_secs","ALBERT_move_backward_for_secs_1","ALBERT_move_backward_for_secs_2","Entry.block.albert_move_backward_for_secs","albert_turn_for_secs","ALBERT_turn_for_secs_1","General","right","ALBERT_turn_for_secs_2","ALBERT_turn_for_secs_3","Entry.block.albert_turn_for_secs","direction","albert_change_both_wheels_by","ALBERT_change_both_wheels_by_1","ALBERT_change_both_wheels_by_2","ALBERT_change_both_wheels_by_3","Entry.block.albert_change_both_wheels_by","undefined","albert_set_both_wheels_to","ALBERT_set_both_wheels_to_1","ALBERT_set_both_wheels_to_2","ALBERT_set_both_wheels_to_3","Entry.block.albert_set_both_wheels_to","albert_change_wheel_by","ALBERT_change_wheel_by_1","both","ALBERT_change_wheel_by_2","ALBERT_change_wheel_by_3","Entry.block.albert_change_wheel_by","value","albert_set_wheel_to","ALBERT_set_wheel_to_1","ALBERT_set_wheel_to_2","ALBERT_set_wheel_to_3","Entry.block.albert_set_wheel_to","albert_stop","ALBERT_stop","Entry.block.albert_stop","albert_set_pad_size_to","ALBERT_set_pad_size_to_1","ALBERT_set_pad_size_to_2","ALBERT_set_pad_size_to_3","Entry.block.albert_set_pad_size_to","albert_set_eye_to","ALBERT_set_eye_to_1","ALBERT_set_eye_to_2","red","yellow","green","ALBERT_color_cyan","blue","ALBERT_color_magenta","white","ALBERT_set_eye_to_3","Entry.block.albert_set_eye_to","color","Number","albert_clear_eye","ALBERT_clear_eye_1","ALBERT_clear_eye_2","Entry.block.albert_clear_eye","albert_body_led","ALBERT_body_led_1","turn_on","turn_off","ALBERT_body_led_2","Entry.block.albert_body_led","state","albert_front_led","ALBERT_front_led_1","ALBERT_front_led_2","Entry.block.albert_front_led","albert_beep","ALBERT_beep","Entry.block.albert_beep","albert_change_buzzer_by","ALBERT_change_buzzer_by_1","ALBERT_change_buzzer_by_2","Entry.block.albert_change_buzzer_by","albert_set_buzzer_to","ALBERT_set_buzzer_to_1","ALBERT_set_buzzer_to_2","Entry.block.albert_set_buzzer_to","albert_clear_buzzer","ALBERT_clear_buzzer","Entry.block.albert_clear_buzzer","albert_play_note_for","ALBERT_play_note_for_1","note_c","note_d","note_e","note_f","note_g","note_a","note_b","ALBERT_play_note_for_2","ALBERT_play_note_for_3","ALBERT_play_note_for_4","Entry.block.albert_play_note_for","getNumberField","octave","beat","timer1","timer2","albert_rest_for","ALBERT_rest_for_1","ALBERT_rest_for_2","Entry.block.albert_rest_for","albert_change_tempo_by","ALBERT_change_tempo_by_1","ALBERT_change_tempo_by_2","Entry.block.albert_change_tempo_by","albert_set_tempo_to","ALBERT_set_tempo_to_1","ALBERT_set_tempo_to_2","Entry.block.albert_set_tempo_to","albert_move_forward","HAMSTER_move_forward","Entry.block.albert_move_forward","albert_move_backward","HAMSTER_move_backward","Entry.block.albert_move_backward","albert_turn_around","HAMSTER_turn_around_1","HAMSTER_turn_around_2","Entry.block.albert_turn_around","leftValue","rightValue","isLeft","albert_set_led_to","HAMSTER_set_led_to_1","ALBERT_set_led_to_2","skyblue","purple","HAMSTER_set_led_to_3","Entry.block.albert_set_led_to","albert_clear_led","HAMSTER_clear_led_1","ALBERT_clear_led_2","Entry.block.albert_clear_led","albert_change_wheels_by","HAMSTER_change_wheels_by_1","HAMSTER_change_wheels_by_2","HAMSTER_change_wheels_by_3","Entry.block.albert_change_wheels_by","albert_set_wheels_to","HAMSTER_set_wheels_to_1","HAMSTER_set_wheels_to_2","HAMSTER_set_wheels_to_3","Entry.block.albert_set_wheels_to","Arduino","readablePorts","port_en","port_ko","SensorBoard","light","sensor","CODEino_sensor_name_2","temp","right_ko","switch_","right_en","left_ko","left_en","up_ko","up_en","down_ko","down_en","dplay","nemoino","CODEino","arduino_text","FieldTextInput","Entry.block.arduino_text","getStringField","arduino_send","ARDUINO_arduino_send_1","ARDUINO_arduino_send_2","Entry.block.arduino_send","signal","getValue","xmlHttp","XMLHttpRequest","open","send","String","assert","status","arduino_get_string","ARDUINO_arduino_get_string_1","ARDUINO_arduino_get_string_2","arduino_get_number","Entry.block.arduino_get_number","responseText","ARDUINO_arduino_get_number_1","ARDUINO_arduino_get_number_2","Entry.block.arduino_get_string","arduino_get_sensor_number","ARDUINO_arduino_get_sensor_number_0","ARDUINO_arduino_get_sensor_number_1","ARDUINO_arduino_get_sensor_number_2","ARDUINO_arduino_get_sensor_number_3","ARDUINO_arduino_get_sensor_number_4","ARDUINO_arduino_get_sensor_number_5","Entry.block.arduino_get_sensor_number","arduino_get_port_number","Entry.block.arduino_get_port_number","arduino_get_pwm_port_number","Entry.block.arduino_get_pwm_port_number","arduino_get_number_sensor_value","ARDUINO_num_sensor_value_1","ARDUINO_num_sensor_value_2","Entry.block.arduino_get_number_sensor_value","getAnalogPortValue","arduino_get_digital_value","ARDUINO_get_digital_value_1","Entry.block.arduino_get_digital_value","getDigitalPortValue","arduino_toggle_led","ARDUINO_num_pin_1","ARDUINO_num_pin_2","ARDUINO_on","ARDUINO_off","Entry.block.arduino_toggle_led","operator","setDigitalPortValue","arduino_toggle_pwm","ARDUINO_toggle_pwm_1","ARDUINO_toggle_pwm_2","ARDUINO_toggle_pwm_3","Entry.block.arduino_toggle_pwm","Math","round","max","min","arduino_convert_scale","ARDUINO_convert_scale_1","ARDUINO_convert_scale_2","ARDUINO_convert_scale_3","ARDUINO_convert_scale_4","ARDUINO_convert_scale_5","ARDUINO_convert_scale_6","Entry.block.arduino_convert_scale","value1","value2","value3","value4","value5","swap","result","sensorBoard_get_named_sensor_value","Entry.block.sensorBoard_get_named_sensor_value","sensorBoard_is_button_pressed","Entry.block.sensorBoard_is_button_pressed","sensorBoard_led","Entry.block.sensorBoard_led","arduino_download_connector","skeleton","template","params","text","align","func","events","mousedown","console","arduino_download_source","arduino_connected","arduino_reconnect","CODEino_get_sensor_number","CODEino_get_sensor_number_0","CODEino_get_sensor_number_1","CODEino_get_sensor_number_2","CODEino_get_sensor_number_3","CODEino_get_sensor_number_4","CODEino_get_sensor_number_5","CODEino_get_sensor_number_6","Entry.block.CODEino_get_sensor_number","CODEino_get_named_sensor_value","CODEino_sensor_name_0","CODEino_sensor_name_1","CODEino_sensor_name_3","CODEino_sensor_name_4","CODEino_sensor_name_5","CODEino_sensor_name_6","CODEino_string_1","Entry.block.CODEino_get_named_sensor_value","CODEino_get_sound_status","CODEino_string_10","CODEino_string_11","CODEino_string_12","Entry.block.CODEino_get_sound_status","CODEino_get_light_status","CODEino_string_13","CODEino_string_14","CODEino_string_15","Entry.block.CODEino_get_light_status","CODEino_is_button_pressed","CODEino_string_2","CODEino_string_3","CODEino_string_4","CODEino_string_5","CODEino_string_6","CODEino_string_7","Entry.block.CODEino_is_button_pressed","CODEino_get_accelerometer_direction","CODEino_string_8","CODEino_string_16","CODEino_string_17","CODEino_string_18","CODEino_string_19","CODEino_string_20","Entry.block.CODEino_get_accelerometer_direction","value6","value7","CODEino_get_accelerometer_value","CODEino_accelerometer_X","CODEino_accelerometer_Y","CODEino_accelerometer_Z","CODEino_string_9","Entry.block.CODEino_get_accelerometer_value","dplay_select_led","dplay_num_pin_1","Entry.block.dplay_select_led","port1","dplay_get_switch_status","dplay_num_pin_2","dplay_string_5","dplay_string_6","Entry.block.dplay_get_switch_status","dplay_get_light_status","dplay_light","dplay_string_3","dplay_string_4","Entry.block.dplay_get_light_status","dplay_get_value","dplay_num_pin_3","dplay_num_pin_5","Entry.block.dplay_get_value","dplay_get_tilt","dplay_tilt","Entry.block.dplay_get_tilt","dplay_DCmotor","Entry.block.dplay_DCmotor","port2","dplay_buzzer","Entry.block.dplay_buzzer","dplay_servo","Entry.block.dplay_servo","Bitbrick","SENSOR_MAP","sensorList","list","data","toString","no_target","touchList","servoList","dcList","servoMaxValue","servoMinValue","dcMaxValue","dcMinValue","bitbrick_sensor_value","FieldDropdownDynamic","Entry.block.bitbrick_sensor_value","bitbrick_is_touch_pressed","BITBRICK_touch","Entry.block.bitbrick_is_touch_pressed","bitbrick_turn_off_color_led","Entry.block.bitbrick_turn_off_color_led","bitbrick_turn_on_color_led_by_rgb","Entry.block.bitbrick_turn_on_color_led_by_rgb","adjustor","adjustValueWithMaxMin","bitbrick_turn_on_color_led_by_picker","FieldColour","Entry.block.bitbrick_turn_on_color_led_by_picker","parseInt","substr","bitbrick_turn_on_color_led_by_value","Entry.block.bitbrick_turn_on_color_led_by_value","bitbrick_buzzer","Entry.block.bitbrick_buzzer","bitbrick_turn_off_all_motors","Entry.block.bitbrick_turn_off_all_motors","bitbrick","map","servo","dc","bitbrick_dc_speed","Entry.block.bitbrick_dc_speed","bitbrick_dc_direction_speed","BITBRICK_dc_direction_cw","BITBRICK_dc_direction_ccw","Entry.block.bitbrick_dc_direction_speed","isFront","bitbrick_servomotor_angle","Entry.block.bitbrick_servomotor_angle","bitbrick_convert_scale","Entry.block.bitbrick_convert_scale","categoryColor","start_drawing","BRUSH_start_drawing","Entry.block.start_drawing","brush","stop","setBasicBrush","sortZorder","moveTo","getX","getY","stop_drawing","BRUSH_stop_drawing","Entry.block.stop_drawing","shape","set_color","BRUSH_set_color_1","BRUSH_set_color_2","Entry.block.set_color","colour","rgb","hex2rgb","endStroke","beginStroke","r","g","opacity","set_random_color","BRUSH_set_random_color","Entry.block.set_random_color","generateRgb","change_thickness","BRUSH_change_thickness_1","BRUSH_change_thickness_2","Entry.block.change_thickness","thickness","setStrokeStyle","set_thickness","BRUSH_set_thickness_1","BRUSH_set_thickness_2","Entry.block.set_thickness","change_opacity","BRUSH_change_opacity_1","BRUSH_change_opacity_2","Entry.block.change_opacity","set_opacity","BRUSH_set_opacity_1","BRUSH_set_opacity_2","Entry.block.set_opacity","brush_erase_all","BRUSH_brush_erase_all","Entry.block.brush_erase_all","stroke","_stroke","_strokeStyle","clear","stampEntities","parent","getStampEntities","entity","removeClone","brush_stamp","BRUSH_stamp","Entry.block.brush_stamp","addStampEntity","change_brush_transparency","BRUSH_change_brush_transparency_1","BRUSH_change_brush_transparency_2","Entry.block.change_brush_transparency","set_brush_tranparency","BRUSH_set_brush_transparency_1","BRUSH_set_brush_transparency_2","Entry.block.set_brush_tranparency","calcArrowColor","calcBlockColor","calcFontColor","number","Entry.block.number","angle","FieldAngle","Entry.block.angle","get_x_coordinate","CALC_get_x_coordinate","Entry.block.get_x_coordinate","get_y_coordinate","CALC_get_y_coordinate","Entry.block.get_y_coordinate","get_angle","CALC_get_angle","Entry.block.get_angle","parseFloat","getRotation","toFixed","get_rotation_direction","CALC_rotation_value","CALC_direction_value","Entry.block.get_rotation_direction","o","getDirection","distance_something","CALC_distance_something_1","CALC_distance_something_2","Entry.block.distance_something","targetId","mousePos","mouseCoordinate","sqrt","pow","targetEntity","getEntity","coordinate_mouse","CALC_coordinate_mouse_1","CALC_coordinate_mouse_2","Entry.block.coordinate_mouse","targetCoordinate","coordinate_object","CALC_coordinate_object_1","CALC_coordinate_object_2","CALC_coordinate_x_value","CALC_coordinate_y_value","CALC_coordinate_rotation_value","CALC_coordinate_direction_value","CALC_coordinate_size_value","CALC_picture_index","CALC_picture_name","CALC_coordinate_object_3","Entry.block.coordinate_object","pictures","picture","getSize","calc_basic","Entry.block.calc_basic","calc_plus","Entry.block.calc_plus","calc_minus","Entry.block.calc_minus","calc_times","Entry.block.calc_times","calc_divide","Entry.block.calc_divide","calc_mod","CALC_calc_mod_1","CALC_calc_mod_2","CALC_calc_mod_3","Entry.block.calc_mod","calc_share","CALC_calc_share_1","CALC_calc_share_2","CALC_calc_share_3","Entry.block.calc_share","floor","calc_operation","CALC_calc_operation_of_1","CALC_calc_operation_of_2","CALC_calc_operation_square","CALC_calc_operation_root","CALC_calc_operation_sin","CALC_calc_operation_cos","CALC_calc_operation_tan","CALC_calc_operation_asin","CALC_calc_operation_acos","CALC_calc_operation_atan","CALC_calc_operation_log","CALC_calc_operation_ln","CALC_calc_operation_unnatural","CALC_calc_operation_floor","CALC_calc_operation_ceil","CALC_calc_operation_round","CALC_calc_operation_factorial","CALC_calc_operation_abs","Entry.block.calc_operation","xRangeCheckList","Error","split","needToConvertList","toRadian","returnVal","factorial","LN10","toDegrees","calc_rand","CALC_calc_rand_1","CALC_calc_rand_2","CALC_calc_rand_3","Entry.block.calc_rand","getStringValue","isLeftFloat","isFloat","isRightFloat","random","get_date","CALC_get_date_1","CALC_get_date_year","CALC_get_date_month","CALC_get_date_day","CALC_get_date_hour","CALC_get_date_minute","CALC_get_date_second","CALC_get_date_2","Entry.block.get_date","dateTime","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","get_sound_duration","CALC_get_sound_duration_1","CALC_get_sound_duration_2","Entry.block.get_sound_duration","soundId","soundsArr","sounds","duration","reset_project_timer","CALC_timer_reset","whenAdd","showProjectTimer","whenRemove","removeBlock","hideProjectTimer","Entry.block.reset_project_timer","updateProjectTimer","set_visible_project_timer","CALC_timer_visible_1","CALC_timer_visible_show","CALC_timer_visible_hide","CALC_timer_visible_2","Entry.block.set_visible_project_timer","action","setVisible","timer_variable","CALC_get_timer_value","Entry.block.timer_variable","get_project_timer_value","Entry.block.get_project_timer_value","char_at","CALC_char_at_1","CALC_char_at_2","CALC_char_at_3","Entry.block.char_at","str","length_of_string","CALC_length_of_string_1","CALC_length_of_string_2","Entry.block.length_of_string","CALC_substring_1","CALC_substring_2","CALC_substring_3","CALC_substring_4","Entry.block.substring","end","strLen","replace_string","CALC_replace_string_1","CALC_replace_string_2","CALC_replace_string_3","CALC_replace_string_4","Entry.block.replace_string","replace","RegExp","change_string_case","CALC_change_string_case_1","CALC_change_string_case_2","CALC_change_string_case_sub_1","CALC_change_string_case_sub_2","CALC_change_string_case_3","Entry.block.change_string_case","index_of_string","CALC_index_of_string_1","CALC_index_of_string_2","CALC_index_of_string_3","Entry.block.index_of_string","combine_something","VARIABLE_combine_something_1","VARIABLE_combine_something_2","VARIABLE_combine_something_3","Entry.block.combine_something","get_sound_volume","CALC_get_sound_volume","Entry.block.get_sound_volume","Sound","getVolume","quotient_and_mod","CALC_quotient_and_mod_1","CALC_quotient_and_mod_2","CALC_quotient_and_mod_3","CALC_quotient_and_mod_sub_1","CALC_quotient_and_mod_sub_2","CALC_quotient_and_mod_4","Entry.block.quotient_and_mod","isNaN","choose_project_timer_action","CALC_choose_project_timer_action_1","CALC_choose_project_timer_action_sub_1","CALC_choose_project_timer_action_sub_2","CALC_choose_project_timer_action_sub_3","CALC_choose_project_timer_action_2","Entry.block.choose_project_timer_action","isInit","isPaused","pauseStart","pausedTime","startProjectTimer","setValue","wait_second","FLOW_wait_second_1","FLOW_wait_second_2","Entry.block.wait_second","repeat_basic","FLOW_repeat_basic_1","FLOW_repeat_basic_2","appendStatementInput","Entry.block.repeat_basic","iterNumber","isLooped","FLOW_repeat_basic_errorMsg","iterCount","getStatement","repeat_inf","FLOW_repeat_inf","Entry.block.repeat_inf","stop_repeat","FLOW_stop_repeat","Entry.block.stop_repeat","executor","break","wait_until_true","FLOW_wait_until_true_1","FLOW_wait_until_true_2","Entry.block.wait_until_true","getBooleanValue","_if","FLOW__if_1","FLOW__if_2","Entry.block._if","if_else","FLOW_if_else_1","FLOW_if_else_2","FLOW_if_else_3","Entry.block.if_else","create_clone","FLOW_create_clone_1","FLOW_create_clone_2","Entry.block.create_clone","targetSpriteId","returnBlock","addCloneEntity","getObject","delete_clone","FLOW_delete_clone","Entry.block.delete_clone","isClone","when_clone_start","FLOW_when_clone_start","Entry.block.when_clone_start","stop_run","FLOW_stop_run","Entry.block.stop_run","repeat_while_true","FLOW_repeat_while_true_1","FLOW_repeat_while_true_until","FLOW_repeat_while_true_while","FLOW_repeat_while_true_2","Entry.block.repeat_while_true","stop_object","FLOW_stop_object_1","FLOW_stop_object_all","FLOW_stop_object_this_object","FLOW_stop_object_this_thread","FLOW_stop_object_other_thread","FLOW_stop_object_2","Entry.block.stop_object","clearRunningState","die","clearExecutorsByEntity","clearExecutors","addExecutor","restart_project","FLOW_restart","Entry.block.restart_project","toggleRun","remove_all_clones","FLOW_delete_clone_all","Entry.block.remove_all_clones","clonedEntities","getClonedEntities","functionAddButton","isNotFor","createFunction","function_field_label","FUNCTION_explanation_1","accept","function_field_string","restore","function_field_boolean","function_param_string","setEditable","domToMutation","xmlElement","hashId","targetFunc","stringHash","FUNCTION_character_variable","mutationToDom","document","createElement","setAttribute","Entry.block.function_param_string","register","run","paramMap","function_param_boolean","booleanHash","FUNCTION_logical_variable","Entry.block.function_param_boolean","function_create","FUNCTION_define","Entry.block.function_create","event","img","size","function_general","fields","FUNCTION_function","field","hash","toLowerCase","inputList","input","fieldRow","FieldLabel","text_","connection","check_","appendChild","Entry.block.function_general","thread","getFunction","Script","values","content","Engine","computeThread","initiated","funcCode","funcExecutor","raiseEvent","getParams","execute","isEnd","removeExecutor","BREAK","STATIC","Hamster","outputA","outputB","leftLed","rightLed","lineTracerMode","lineTracerModeId","lineTracerSpeed","ioModeA","ioModeB","hamster","lineTracerStateId","setLineTracerMode","HAMSTER_sensor_temperature","HAMSTER_sensor_accelerationX","HAMSTER_sensor_accelerationY","HAMSTER_sensor_accelerationZ","output","HAMSTER_sensor_leftProximity","HAMSTER_sensor_rightProximity","HAMSTER_sensor_leftFloor","HAMSTER_sensor_rightFloor","hamster_hand_found","HAMSTER_hand_found","Entry.block.hamster_hand_found","hamster_value","HAMSTER_sensor_light","HAMSTER_sensor_signalStrength","HAMSTER_sensor_inputA","HAMSTER_sensor_inputB","Entry.block.hamster_value","hamster_move_forward_once","HAMSTER_move_forward_once","Entry.block.hamster_move_forward_once","isMoving","boardState","count","leftFloor","rightFloor","diff","hamster_turn_once","HAMSTER_turn_once_1","HAMSTER_turn_once_2","Entry.block.hamster_turn_once","hamster_move_forward_for_secs","HAMSTER_move_forward_for_secs_1","HAMSTER_move_forward_for_secs_2","Entry.block.hamster_move_forward_for_secs","hamster_move_backward_for_secs","HAMSTER_move_backward_for_secs_1","HAMSTER_move_backward_for_secs_2","Entry.block.hamster_move_backward_for_secs","hamster_turn_for_secs","HAMSTER_turn_for_secs_1","HAMSTER_turn_for_secs_2","HAMSTER_turn_for_secs_3","Entry.block.hamster_turn_for_secs","hamster_change_both_wheels_by","HAMSTER_change_both_wheels_by_1","HAMSTER_change_both_wheels_by_2","HAMSTER_change_both_wheels_by_3","Entry.block.hamster_change_both_wheels_by","hamster_set_both_wheels_to","HAMSTER_set_both_wheels_to_1","HAMSTER_set_both_wheels_to_2","HAMSTER_set_both_wheels_to_3","Entry.block.hamster_set_both_wheels_to","hamster_change_wheel_by","HAMSTER_change_wheel_by_1","HAMSTER_change_wheel_by_2","HAMSTER_change_wheel_by_3","Entry.block.hamster_change_wheel_by","hamster_set_wheel_to","HAMSTER_set_wheel_to_1","HAMSTER_set_wheel_to_2","HAMSTER_set_wheel_to_3","Entry.block.hamster_set_wheel_to","hamster_follow_line_using","HAMSTER_follow_line_using_1","HAMSTER_color_black","HAMSTER_follow_line_using_2","HAMSTER_follow_line_using_3","Entry.block.hamster_follow_line_using","hamster_follow_line_until","HAMSTER_follow_line_until_1","HAMSTER_follow_line_until_2","HAMSTER_front","HAMSTER_rear","HAMSTER_follow_line_until_3","Entry.block.hamster_follow_line_until","lineTracerState","hamster_set_following_speed_to","HAMSTER_set_following_speed_to_1","HAMSTER_set_following_speed_to_2","Entry.block.hamster_set_following_speed_to","hamster_stop","HAMSTER_stop","Entry.block.hamster_stop","hamster_set_led_to","HAMSTER_set_led_to_2","HAMSTER_color_cyan","HAMSTER_color_magenta","Entry.block.hamster_set_led_to","hamster_clear_led","HAMSTER_clear_led_2","Entry.block.hamster_clear_led","hamster_beep","HAMSTER_beep","Entry.block.hamster_beep","hamster_change_buzzer_by","HAMSTER_change_buzzer_by_1","HAMSTER_change_buzzer_by_2","Entry.block.hamster_change_buzzer_by","hamster_set_buzzer_to","HAMSTER_set_buzzer_to_1","HAMSTER_set_buzzer_to_2","Entry.block.hamster_set_buzzer_to","hamster_clear_buzzer","HAMSTER_clear_buzzer","Entry.block.hamster_clear_buzzer","hamster_play_note_for","HAMSTER_play_note_for_1","HAMSTER_play_note_for_2","HAMSTER_play_note_for_3","HAMSTER_play_note_for_4","Entry.block.hamster_play_note_for","hamster_rest_for","HAMSTER_rest_for_1","HAMSTER_rest_for_2","Entry.block.hamster_rest_for","hamster_change_tempo_by","HAMSTER_change_tempo_by_1","HAMSTER_change_tempo_by_2","Entry.block.hamster_change_tempo_by","hamster_set_tempo_to","HAMSTER_set_tempo_to_1","HAMSTER_set_tempo_to_2","Entry.block.hamster_set_tempo_to","hamster_set_port_to","HAMSTER_set_port_to_1","HAMSTER_port_a","HAMSTER_port_b","HAMSTER_port_ab","HAMSTER_set_port_to_2","HAMSTER_analog_input","HAMSTER_digital_input","HAMSTER_servo_output","HAMSTER_pwm_output","HAMSTER_digital_output","HAMSTER_set_port_to_3","Entry.block.hamster_set_port_to","hamster_change_output_by","HAMSTER_change_output_by_1","HAMSTER_change_output_by_2","HAMSTER_change_output_by_3","Entry.block.hamster_change_output_by","hamster_set_output_to","HAMSTER_set_output_to_1","HAMSTER_set_output_to_2","HAMSTER_set_output_to_3","Entry.block.hamster_set_output_to","is_clicked","JUDGEMENT_is_clicked","Entry.block.is_clicked","isClick","is_press_some_key","JUDGEMENT_is_press_some_key_1","FieldKeydownInput","JUDGEMENT_is_press_some_key_2","Entry.block.is_press_some_key","keycode","pressedKeys","reach_something","JUDGEMENT_reach_something_1","JUDGEMENT_reach_something_2","Entry.block.reach_something","getVisible","isWall","reg","test","collision","ndgmr","checkPixelCollision","wall","up","ath","down","pt","globalToLocal","mouseX","mouseY","hitTest","targetSprite","targetBound","getTransformedBounds","bound","checkCollisionRect","len","isStamp","boolean_comparison","Entry.block.boolean_comparison","boolean_equal","Entry.block.boolean_equal","boolean_bigger","Entry.block.boolean_bigger","boolean_smaller","Entry.block.boolean_smaller","boolean_and_or","JUDGEMENT_boolean_and","JUDGEMENT_boolean_or","Entry.block.boolean_and_or","boolean_and","Entry.block.boolean_and","boolean_or","Entry.block.boolean_or","boolean_not","JUDGEMENT_boolean_not_1","JUDGEMENT_boolean_not_2","Entry.block.boolean_not","true_or_false","JUDGEMENT_true","JUDGEMENT_false","Entry.block.true_or_false","children","textContent","True","Entry.block.True","False","Entry.block.False","boolean_basic_operator","Entry.block.boolean_basic_operator","show","LOOKS_show","Entry.block.show","hide","LOOKS_hide","Entry.block.hide","dialog_time","LOOKS_dialog_time_1","LOOKS_dialog_time_2","LOOKS_dialog_time_3","speak","LOOKS_dialog_time_4","Entry.block.dialog_time","message","convertToRoundedDecimals","Dialog","syncDialogVisible","dialog","remove","LOOKS_dialog_1","LOOKS_dialog_2","LOOKS_dialog_3","Entry.block.dialog","remove_dialog","LOOKS_remove_dialog","Entry.block.remove_dialog","change_to_nth_shape","LOOKS_change_to_nth_shape_1","LOOKS_change_to_nth_shape_2","Entry.block.change_to_nth_shape","imageId","getPicture","setImage","change_to_next_shape","LOOKS_change_to_near_shape_1","LOOKS_change_shape_next","LOOKS_change_shape_prev","LOOKS_change_to_near_shape_2","Entry.block.change_to_next_shape","getPrevPicture","getNextPicture","set_effect_volume","LOOKS_set_effect_volume_1","brightness","LOOKS_set_effect_volume_2","LOOKS_set_effect_volume_3","Entry.block.set_effect_volume","effect","effectValue","hue","alpha","applyFilter","set_effect","LOOKS_set_effect_1","LOOKS_set_effect_2","LOOKS_set_effect_3","Entry.block.set_effect","erase_all_effects","LOOKS_erase_all_effects","Entry.block.erase_all_effects","resetFilter","change_scale_percent","LOOKS_change_scale_percent_1","LOOKS_change_scale_percent_2","Entry.block.change_scale_percent","scaleValue","setScaleX","getScaleX","setScaleY","getScaleY","set_scale_percent","LOOKS_set_scale_percent_1","LOOKS_set_scale_percent_2","Entry.block.set_scale_percent","snapshot","snapshot_","scaleX","scaleY","change_scale_size","Entry.block.change_scale_size","sizeValue","setSize","set_scale_size","Entry.block.set_scale_size","flip_y","LOOKS_flip_y","Entry.block.flip_y","flip_x","LOOKS_flip_x","Entry.block.flip_x","set_object_order","LOOKS_set_object_order_1","LOOKS_set_object_order_2","Entry.block.set_object_order","targetIndex","currentIndex","getCurrentObjects","moveElementByBlock","get_pictures","Entry.block.get_pictures","change_to_some_shape","Entry.block.change_to_some_shape","parseNumber","add_effect_amount","transparency","Entry.block.add_effect_amount","hsv","change_effect_amount","Entry.block.change_effect_amount","set_effect_amount","Entry.block.set_effect_amount","set_entity_effect","Entry.block.set_entity_effect","change_object_index","LOOKS_change_object_index_1","LOOKS_change_object_index_sub_1","LOOKS_change_object_index_sub_2","LOOKS_change_object_index_sub_3","LOOKS_change_object_index_sub_4","LOOKS_change_object_index_2","Entry.block.change_object_index","location","move_direction","MOVING_move_direction_1","MOVING_move_direction_2","Entry.block.move_direction","setX","cos","PI","setY","sin","lineTo","move_x","MOVING_move_x_1","MOVING_move_x_2","Entry.block.move_x","move_y","MOVING_move_y_1","MOVING_move_y_2","Entry.block.move_y","locate_xy_time","MOVING_locate_xy_time_1","MOVING_locate_xy_time_2","MOVING_locate_xy_time_3","MOVING_locate_xy_time_4","Entry.block.locate_xy_time","frameCount","dX","dY","rotate_by_angle","MOVING_rotate_by_angle_1","MOVING_rotate_by_angle_2","Entry.block.rotate_by_angle","setRotation","rotate_by_angle_dropdown","MOVING_rotate_by_angle_dropdown_1","MOVING_rotate_by_angle_dropdown_2","Entry.block.rotate_by_angle_dropdown","see_angle","MOVING_see_angle_1","MOVING_see_angle_2","Entry.block.see_angle","setDirection","see_direction","MOVING_see_direction_1","MOVING_see_direction_2","Entry.block.see_direction","deltaX","deltaY","atan","locate_xy","MOVING_locate_xy_1","MOVING_locate_xy_2","MOVING_locate_xy_3","Entry.block.locate_xy","locate_x","MOVING_locate_x_1","MOVING_locate_x_2","Entry.block.locate_x","locate_y","MOVING_locate_y_1","MOVING_locate_y_2","Entry.block.locate_y","locate","MOVING_locate_1","MOVING_locate_2","Entry.block.locate","move_xy_time","MOVING_move_xy_time_1","MOVING_move_xy_time_2","MOVING_move_xy_time_3","MOVING_move_xy_time_4","Entry.block.move_xy_time","xValue","yValue","locate_time","MOVING_locate_time_1","MOVING_locate_time_2","MOVING_locate_time_3","rotate_by_angle_time","MOVING_rotate_by_angle_time_1","MOVING_rotate_by_angle_time_2","MOVING_rotate_by_angle_time_3","Entry.block.rotate_by_angle_time","angleValue","dAngle","bounce_when","MOVING_bounce_when_1","MOVING_bounce_when_2","bounce_wall","MOVING_bounce_wall","Entry.block.bounce_wall","method","getRotateMethod","mod","skip","Utils","COLLISION","NONE","UP","threshold","DOWN","LEFT","RIGHT","flip_arrow_horizontal","MOVING_flip_arrow_horizontal","Entry.block.flip_arrow_horizontal","flip_arrow_vertical","MOVING_flip_arrow_vertical","Entry.block.flip_arrow_vertical","see_angle_object","MOVING_see_angle_object_1","MOVING_see_angle_object_2","Entry.block.see_angle_object","spriteX","spriteY","mY","nativeDirection","see_angle_direction","MOVING_see_angle_direction_1","MOVING_see_angle_direction_2","Entry.block.see_angle_direction","rotate_direction","MOVING_rotate_direction_1","MOVING_rotate_direction_2","Entry.block.rotate_direction","locate_object_time","MOVING_locate_object_time_1","MOVING_locate_object_time_2","MOVING_locate_object_time_3","Entry.block.locate_object_time","mouseCoordi","rotate_absolute","MOVING_set_direction_by_angle_1","MOVING_set_direction_by_angle_2","Entry.block.rotate_absolute","rotate_relative","MOVING_add_direction_by_angle_1","MOVING_add_direction_by_angle_2","Entry.block.rotate_relative","direction_absolute","Entry.block.direction_absolute","direction_relative","Entry.block.direction_relative","move_to_angle","MOVING_move_direction_angle_1","MOVING_move_direction_angle_2","MOVING_move_direction_angle_3","Entry.block.move_to_angle","rotate_by_time","MOVING_add_direction_by_angle_time_explain_1","MOVING_add_direction_by_angle_time_2","MOVING_add_direction_by_angle_time_1","MOVING_add_direction_by_angle_time_3","Entry.block.rotate_by_time","direction_relative_duration","MOVING_direction_relative_duration_1","MOVING_direction_relative_duration_2","MOVING_direction_relative_duration_3","Entry.block.direction_relative_duration","directionValue","dDirection","Neobot","LOCAL_MAP","REMOTE_MAP","neobot_sensor_value","Entry.block.neobot_sensor_value","neobot_left_motor","Entry.block.neobot_left_motor","neobot_stop_left_motor","Entry.block.neobot_stop_left_motor","neobot_right_motor","Entry.block.neobot_right_motor","neobot_stop_right_motor","Entry.block.neobot_stop_right_motor","neobot_all_motor","Entry.block.neobot_all_motor","neobot_set_servo","Entry.block.neobot_set_servo","degree","option","neobot_set_output","Entry.block.neobot_set_output","neobot_set_fnd","Entry.block.neobot_set_fnd","neobot_play_note_for","Entry.block.neobot_play_note_for","SND","Robotis_carCont","INSTRUCTION","WRITE","READ","CONTROL_TABLE","CM_LED","CM_SPRING_RIGHT","CM_SPRING_LEFT","CM_SWITCH","CM_SOUND_DETECTED","CM_SOUND_DETECTING","CM_IR_LEFT","CM_IR_RIGHT","CM_CALIBRATION_LEFT","CM_CALIBRATION_RIGHT","AUX_MOTOR_SPEED_LEFT","AUX_MOTOR_SPEED_RIGHT","setRobotisData","delay","postCallReturn","ms","wait","socket","concat","Robotis_openCM70","CM_LED_R","CM_LED_G","CM_LED_B","CM_BUZZER_INDEX","CM_BUZZER_TIME","CM_USER_BUTTON","CM_MOTION","AUX_SERVO_POSITION","AUX_IR","AUX_TOUCH","AUX_TEMPERATURE","AUX_ULTRASONIC","AUX_MAGNETIC","AUX_MOTION_DETECTION","AUX_COLOR","AUX_CUSTOM","AUX_BRIGHTNESS","AUX_HYDRO_THEMO_HUMIDITY","AUX_HYDRO_THEMO_TEMPER","AUX_SERVO_MODE","AUX_SERVO_SPEED","AUX_MOTOR_SPEED","AUX_LED_MODULE","robotis_openCM70_cm_custom_value","robotis_cm_custom","robotis_common_value","Entry.block.robotis_openCM70_cm_custom_value","data_instruction","data_address","data_length","data_default_address","data_value","robotis_openCM70_sensor_value","robotis_common_cm","robotis_cm_sound_detected","robotis_cm_sound_detecting","robotis_cm_user_button","Entry.block.robotis_openCM70_sensor_value","data_default_length","increase","robotis_openCM70_aux_sensor_value","portList","robotis_common_port_3","robotis_common_port_4","robotis_common_port_5","robotis_common_port_6","robotis_aux_servo_position","robotis_aux_ir","robotis_aux_touch","robotis_aux_brightness","robotis_aux_hydro_themo_humidity","robotis_aux_hydro_themo_temper","robotis_aux_temperature","robotis_aux_ultrasonic","robotis_aux_magnetic","robotis_aux_motion_detection","robotis_aux_color","robotis_aux_custom","Entry.block.robotis_openCM70_aux_sensor_value","robotis_openCM70_cm_buzzer_index","robotis_cm_buzzer_index","robotis_common_play_buzzer","Entry.block.robotis_openCM70_cm_buzzer_index","cmBuzzerIndex","cmBuzzerTime","data_address_1","data_length_1","data_value_1","data_address_2","data_length_2","data_sendqueue","robotis_openCM70_cm_buzzer_melody","robotis_cm_buzzer_melody","robotis_common_index_number","Entry.block.robotis_openCM70_cm_buzzer_melody","cmBuzzerMelody","robotis_openCM70_cm_sound_detected_clear","robotis_cm_clear_sound_detected","Entry.block.robotis_openCM70_cm_sound_detected_clear","robotis_openCM70_cm_led","robotis_common_red_color","robotis_common_green_color","robotis_common_blue_color","robotis_common_on","robotis_common_off","Entry.block.robotis_openCM70_cm_led","cmLed","robotis_openCM70_cm_motion","robotis_common_motion","robotis_common_play_motion","Entry.block.robotis_openCM70_cm_motion","robotis_openCM70_aux_motor_speed","robotis_common_port_1","robotis_common_port_2","robotis_openCM70_aux_motor_speed_1","robotis_common_clockwhise","robotis_common_counter_clockwhise","robotis_openCM70_aux_motor_speed_2","robotis_common_set","Entry.block.robotis_openCM70_aux_motor_speed","directionAngle","robotis_openCM70_aux_servo_mode","robotis_openCM70_aux_servo_mode_1","robotis_common_wheel_mode","robotis_common_joint_mode","Entry.block.robotis_openCM70_aux_servo_mode","robotis_openCM70_aux_servo_speed","robotis_openCM70_aux_servo_speed_1","robotis_openCM70_aux_servo_speed_2","Entry.block.robotis_openCM70_aux_servo_speed","robotis_openCM70_aux_servo_position","robotis_openCM70_aux_servo_position_1","Entry.block.robotis_openCM70_aux_servo_position","robotis_openCM70_aux_led_module","robotis_openCM70_aux_led_module_1","robotis_cm_led_both","robotis_cm_led_right","robotis_cm_led_left","Entry.block.robotis_openCM70_aux_led_module","ledModule","robotis_openCM70_aux_custom","robotis_openCM70_aux_custom_1","Entry.block.robotis_openCM70_aux_custom","robotis_openCM70_cm_custom","robotis_common_case_01","Entry.block.robotis_openCM70_cm_custom","robotis_carCont_sensor_value","robotis_cm_spring_left","robotis_cm_spring_right","robotis_cm_switch","robotis_cm_ir_left","robotis_cm_ir_right","robotis_cm_calibration_left","robotis_cm_calibration_right","Entry.block.robotis_carCont_sensor_value","CM_BUTTON_STATUS","robotis_carCont_cm_led","robotis_cm_led_4","robotis_cm_led_1","Entry.block.robotis_carCont_cm_led","value_left","value_right","robotis_carCont_cm_sound_detected_clear","Entry.block.robotis_carCont_cm_sound_detected_clear","robotis_carCont_aux_motor_speed","robotis_carCont_aux_motor_speed_1","robotis_carCont_aux_motor_speed_2","Entry.block.robotis_carCont_aux_motor_speed","robotis_carCont_cm_calibration","robotis_carCont_calibration_1","Entry.block.robotis_carCont_cm_calibration","when_scene_start","SCENE_when_scene_start","Entry.block.when_scene_start","start_scene","SCENE_start_scene_1","SCENE_start_scene_2","Entry.block.start_scene","getSceneById","selectScene","fireEvent","start_neighbor_scene","SCENE_start_neighbor_scene_1","SCENE_start_scene_next","SCENE_start_scene_pre","SCENE_start_neighbor_scene_2","Entry.block.start_neighbor_scene","currentScene","selectedScene","getScenes","nextScene","sound_something","SOUND_sound_something_1","SOUND_sound_something_2","Entry.block.sound_something","isExist","play","sound_something_second","SOUND_sound_something_second_1","SOUND_sound_something_second_2","SOUND_sound_something_second_3","Entry.block.sound_something_second","instance","sound_something_wait","SOUND_sound_something_wait_1","SOUND_sound_something_wait_2","Entry.block.sound_something_wait","isPlay","playState","getSound","sound_something_second_wait","SOUND_sound_something_second_wait_1","SOUND_sound_something_second_wait_2","SOUND_sound_something_second_wait_3","Entry.block.sound_something_second_wait","addEventListener","sound_volume_change","SOUND_sound_volume_change_1","SOUND_sound_volume_change_2","Entry.block.sound_volume_change","setVolume","sound_volume_set","SOUND_sound_volume_set_1","SOUND_sound_volume_set_2","Entry.block.sound_volume_set","sound_silent_all","SOUND_sound_silent_all","Entry.block.sound_silent_all","get_sounds","Entry.block.get_sounds","sound_something_with_block","Entry.block.sound_something_with_block","sound_something_second_with_block","Entry.block.sound_something_second_with_block","sound_something_wait_with_block","Entry.block.sound_something_wait_with_block","sound_something_second_wait_with_block","Entry.block.sound_something_second_wait_with_block","sound_from_to","SOUND_sound_from_to_1","SOUND_sound_from_to_2","SOUND_sound_from_to_3","SOUND_sound_from_to_4","Entry.block.sound_from_to","sound_from_to_and_wait","SOUND_sound_from_to_and_wait_1","SOUND_sound_from_to_and_wait_2","SOUND_sound_from_to_and_wait_3","SOUND_sound_from_to_and_wait_4","Entry.block.sound_from_to_and_wait","startValue","endValue","when_run_button_click","START_when_run_button_click","Entry.block.when_run_button_click","press_some_key","START_press_some_key_1","START_press_some_key_up","START_press_some_key_down","START_press_some_key_left","START_press_some_key_right","START_press_some_key_enter","START_press_some_key_space","START_press_some_key_2","Entry.block.press_some_key","when_some_key_pressed","Entry.block.when_some_key_pressed","START_mouse_clicked","mouse_clicked","Entry.block.mouse_clicked","mouse_click_cancled","START_mouse_click_cancled","Entry.block.mouse_click_cancled","when_object_click","START_when_object_click","Entry.block.when_object_click","when_object_click_canceled","START_when_object_click_canceled","Entry.block.when_object_click_canceled","when_some_key_click","START_when_some_key_click","Entry.block.when_some_key_click","when_message_cast","START_when_message_cast_1","START_when_message_cast_2","vc","addRef","removeRef","Entry.block.when_message_cast","message_cast","START_message_cast_1","START_message_cast_2","Entry.block.message_cast","messages_","mapEntityIncludeCloneOnScene","raiseKeyEvent","message_cast_wait","START_message_send_wait_1","START_message_send_wait_2","Entry.block.message_cast_wait","runningScript","shift","TEXT_text","Entry.block.text","text_write","TEXT_text_write_1","TEXT_text_write_2","Entry.block.text_write","setText","text_append","TEXT_text_append_1","TEXT_text_append_2","Entry.block.text_append","getText","text_prepend","TEXT_text_prepend_1","TEXT_text_prepend_2","Entry.block.text_prepend","text_flush","TEXT_text_flush","Entry.block.text_flush","variableAddButton","openVariableAddPanel","listAddButton","change_variable","VARIABLE_change_variable_1","VARIABLE_change_variable_2","VARIABLE_change_variable_3","Entry.block.change_variable","variableId","fixed","variable","getVariable","getMaxFloatPoint","set_variable","VARIABLE_set_variable_1","VARIABLE_set_variable_2","VARIABLE_set_variable_3","Entry.block.set_variable","show_variable","VARIABLE_show_variable_1","VARIABLE_show_variable_2","Entry.block.show_variable","updateView","hide_variable","VARIABLE_hide_variable_1","VARIABLE_hide_variable_2","Entry.block.hide_variable","get_y","VARIABLE_get_y","get_variable","VARIABLE_get_variable_1","VARIABLE_get_variable_2","Entry.block.get_variable","ask_and_wait","VARIABLE_ask_and_wait_1","VARIABLE_ask_and_wait_2","showProjectAnswer","hideProjectAnswer","Entry.block.ask_and_wait","inputModel","inputView","inputField","_isHidden","complete","showInputField","get_canvas_input_value","VARIABLE_get_canvas_input_value","Entry.block.get_canvas_input_value","getInputValue","add_value_to_list","VARIABLE_add_value_to_list_1","VARIABLE_add_value_to_list_2","VARIABLE_add_value_to_list_3","Entry.block.add_value_to_list","listId","getList","array_","remove_value_from_list","VARIABLE_remove_value_from_list_1","VARIABLE_remove_value_from_list_2","VARIABLE_remove_value_from_list_3","Entry.block.remove_value_from_list","insert_value_to_list","VARIABLE_insert_value_to_list_1","VARIABLE_insert_value_to_list_2","VARIABLE_insert_value_to_list_3","VARIABLE_insert_value_to_list_4","Entry.block.insert_value_to_list","change_value_list_index","VARIABLE_change_value_list_index_1","VARIABLE_change_value_list_index_2","VARIABLE_change_value_list_index_3","VARIABLE_change_value_list_index_4","Entry.block.change_value_list_index","value_of_index_from_list","VARIABLE_value_of_index_from_list_1","VARIABLE_value_of_index_from_list_2","VARIABLE_value_of_index_from_list_3","Entry.block.value_of_index_from_list","getListRealIndex","length_of_list","VARIABLE_length_of_list_1","VARIABLE_length_of_list_2","Entry.block.length_of_list","show_list","VARIABLE_show_list_1","VARIABLE_show_list_2","Entry.block.show_list","hide_list","VARIABLE_hide_list_1","VARIABLE_hide_list_2","Entry.block.hide_list","options_for_list","VARIABLE_list_option_first","VARIABLE_list_option_last","VARIABLE_list_option_random","Entry.block.options_for_list","set_visible_answer","Entry.block.set_visible_answer","bool","is_included_in_list","VARIABLE_is_included_in_list_1","VARIABLE_is_included_in_list_2","VARIABLE_is_included_in_list_3","Entry.block.is_included_in_list","arr","Xbot","head","armR","armL","analogD5","analogD6","D4","D7","D12","D13","ledR","ledG","ledB","lcdNum","lcdTxt","xbot_digitalInput","XBOT_D2_digitalInput","XBOT_D3_digitalInput","XBOT_D11_digitalInput","Entry.block.xbot_digitalInput","xbot_analogValue","XBOT_CDS","XBOT_MIC","XBOT_analog0","XBOT_analog1","XBOT_analog2","XBOT_analog3","Entry.block.xbot_analogValue","xbot_digitalOutput","XBOT_digital","XBOT_pin_OutputValue","XBOT_High","XBOT_Low","Entry.block.xbot_digitalOutput","xbot_analogOutput","XBOT_analog","XBOT_pin_Output_Value","Entry.block.xbot_analogOutput","xbot_servo","XBOT_Servo","XBOT_Head","XBOT_ArmR","XBOT_ArmL","XBOT_angle","Entry.block.xbot_servo","mtype","xbot_oneWheel","XBOT_DC","XBOT_rightWheel","XBOT_leftWheel","XBOT_bothWheel","XBOT_speed","Entry.block.xbot_oneWheel","dir","xbot_twoWheel","XBOT_rightSpeed","XBOT_leftSpeed","Entry.block.xbot_twoWheel","xbot_rgb","XBOT_RGBLED_R","XBOT_RGBLED_G","XBOT_RGBLED_B","Entry.block.xbot_rgb","xbot_rgb_picker","XBOT_RGBLED_color","XBOT_set","Entry.block.xbot_rgb_picker","xbot_buzzer","XBOT_c","XBOT_d","XBOT_e","XBOT_f","XBOT_g","XBOT_a","XBOT_b","XBOT_melody_ms","Entry.block.xbot_buzzer","noteOctave","xbot_lcd","XBOT_Line","XBOT_outputValue","Entry.block.xbot_lcd","line","Collection","Entry.Collection","_hashMap","_observers","set","p","ap","p.set","pop","call","hashMap","key","datum","p.push","elem","unshift","p.unshift","args","Array","prototype","slice","arguments","insert","p.insert","has","p.has","get","p.get","at","p.at","getAll","p.getAll","ret","p.indexOf","obj","p.find","cond","flag","p.pop","p.shift","p.slice","amount","p.remove","p.splice","splicedData","p.clear","p.map","fn","param","array","moveFromTo","p.moveFromTo","from","to","sort","p.sort","fromJSON","p.fromJSON","p.toJSON","observe","p.observe","unobserve","p.unobserve","p.notify","destroy","p.destroy","Event","Entry.Event","sender","_sender","_listeners","attach","p.attach","that","listener","detach","p.detach","listeners","forEach","apply","Observer","Entry.Observer","funcName","attrs","Command","Commander","Entry.Commander","injectType","StateManager","do","bind","undo","editor","p.do","commandType","argumentArray","command","addCommand","isPass","p.undo","commandFunc","redo","p.redo","setCurrentEditor","p.setCurrentEditor","p.isPass","lastCommand","getLastCommand","c","addThread","board","code","createThread","generateId","destroyThread","findById","destroyBlock","doDestroy","pointer","recoverBlock","blockModel","getFirstBlock","insertBlock","targetBlock","targetPointer","getBlockType","getCount","separateBlock","view","_toGlobalCoordinate","DRAG_MODE_DRAG","doSeparate","moveBlock","_updatePos","cloneBlock","copy","uncloneBlock","getThreads","threads","lastBlock","scrollBoard","dx","dy","scroller","_scroll","setFieldValue","oldValue","newValue","selectObject","objectId","Container","Entry.Container","objects_","cachedPicture","currentObjects_","copiedObject","generateView","Entry.Container.prototype.generateView","containerView","_view","innerHTML","add_object","bindOnClick","dispatchEvent","ulWrapper","listView","listView_","isForLecture","generateTabView","disableContextmenu","on","ContextMenu","options","Paste_blocks","callback","addCloneObject","toast","alert","add_object_alert","object_not_found_for_paste","enableSort","Entry.Container.prototype.enableSort","sortable","ui","item","moveElement","axis","disableSort","Entry.Container.prototype.disableSort","updateListView","Entry.Container.prototype.updateListView","hasChildNodes","removeChild","lastChild","objs","Entry.Container.prototype.setObjects","objectModels","EntryObject","generatePictureElement","s","generateSoundElement","updateObjectsOrder","updateViews","getPictureElement","Entry.Container.prototype.getPictureElement","pictureId","setPicture","Entry.Container.prototype.setPicture","picture_","dimension","selectPicture","Entry.Container.prototype.selectPicture","selectedPicture","updateThumbnailView","addObject","Entry.Container.prototype.addObject","objectModel","getOrderedName","removeObject","backgroundStr","main","setLock","generateHash","setCurrentObjects","State","Entry.Container.prototype.addCloneObject","newObjectId","addCloneLocalVariables","Entry.Container.prototype.removeObject","objectJSON","flushPlayground","success","remove_object","remove_object_msg","removeLocalVariables","reloadPlayground","Entry.Container.prototype.selectObject","changeScene","mapObjectOnScene","isSelected_","injectObject","getAllObjects","Entry.Container.prototype.getAllObjects","Entry.Container.prototype.getObject","Entry.Container.prototype.getEntity","Msgs","runtime_error","object_not_found","Entry.Container.prototype.getVariable","variables_","getId","getName","Entry.Container.prototype.moveElement","isCallFromState","startIndex","endIndex","Entry.Container.prototype.moveElementByBlock","getDropdownList","Entry.Container.prototype.getDropdownList","menuName","mouse_pointer","self","wall_up","wall_down","wall_right","wall_left","object_","VARIABLE_variable","lists","lists_","VARIABLE_list","scenes_","oneself","Entry.Container.prototype.clearRunningState","mapObject","clearExecutor","Entry.Container.prototype.mapObject","mapFunction","Entry.Container.prototype.mapObjectOnScene","clearRunningStateOnScene","Entry.Container.prototype.clearRunningStateOnScene","mapEntity","Entry.Container.prototype.mapEntity","mapEntityOnScene","Entry.Container.prototype.mapEntityOnScene","mapEntityIncludeClone","Entry.Container.prototype.mapEntityIncludeClone","lenx","Entry.Container.prototype.mapEntityIncludeCloneOnScene","getCachedPicture","Entry.Container.prototype.getCachedPicture","cachePicture","Entry.Container.prototype.cachePicture","image","Entry.Container.prototype.toJSON","takeSequenceSnapshot","Entry.Container.prototype.takeSequenceSnapshot","loadSequenceSnapshot","Entry.Container.prototype.loadSequenceSnapshot","Entry.Container.prototype.getInputValue","setInputValue","Entry.Container.prototype.setInputValue","resetSceneDuringRun","Entry.Container.prototype.resetSceneDuringRun","loadSnapshot","filters","removeBrush","setCopiedObject","Entry.Container.prototype.setCopiedObject","Entry.Container.prototype.updateObjectsOrder","tempObjs","getSceneObjects","Entry.Container.prototype.getSceneObjects","containerObjects","Entry.Container.prototype.setCurrentObjects","Entry.Container.prototype.getCurrentObjects","getProjectWithJSON","Entry.Container.prototype.getProjectWithJSON","Entry.Container.prototype.generateTabView","tabViews","tab1","Menus","lecture_container_tab_object","changeTabView","tab2","lecture_container_tab_video","youtubeTab","tab3","lecture_container_tab_project","iframeTab","tab4","lecture_container_tab_help","movieContainer","doneContainer","helperContainer","Entry.Container.prototype.changeTabView","tab","movieFrame","doneProjectFrame","helper","blockHelperOn","initYoutube","Entry.Container.prototype.initYoutube","youtubeHash","iframe","url","initTvcast","Entry.Container.prototype.initTvcast","tvcast","initDoneProject","Entry.Container.prototype.initDoneProject","doneProject","blurAllInputs","Entry.Container.prototype.blurAllInputs","inputs","blur","Entry.Container.prototype.showProjectAnswer","answer","Entry.Container.prototype.hideProjectAnswer","isVisible","answerTypes","hasBlockType","getView","Entry.Container.prototype.getView","Entry.Container.prototype.resize","db","typeMap","add","db.add","db.has","hasOwnProperty","db.remove","db.get","db.find","db.clear","Dom","Entry.Dom","tag","tagRegex","dom","HTMLElement","attr","class","classes","className","append","dom.bindOnClick","child","handler","stopImmediatePropagation","handled","Function","SVG","Entry.SVG","element","getElementById","NS","NS_XLINK","Entry.SVG.createElement","el","createElementNS","href","setAttributeNS","SVGElement","hasClass","removeAttr","Entry.SVG.attr","property","Entry.SVG.addClass","classAttr","Entry.SVG.removeClass","Entry.SVG.hasClass","match","Entry.SVG.remove","parentNode","Entry.SVG.removeAttr","attrName","removeAttribute","Entry.Dialog","padding","border","message_","messageChunks","join","mode_","generateSpeak","loadDialog","Entry.Dialog.prototype.generateSpeak","Text","font","textBaseline","textAlign","rect","Shape","graphics","f","ss","rr","addChild","regX","regY","notch","createSpeakNotch","Entry.Dialog.prototype.update","notchType","Entry.Dialog.prototype.createSpeakNotch","mt","lt","Entry.Dialog.prototype.remove","unloadDialog","DoneProject","Entry.DoneProject","p.init","p.generateView","p.getView","p.resize","w","offsetWidth","Entry.Engine","arrowHandler","arrows","keyCode","which","hasFocus","preventDefault","popup","isUpdating","speeds","keyPressed","captureKeyEvent","fireEventOnEntity","updateMouseView","hideMouseView","unbind","Entry.Engine.prototype.generateView","controlView","maximizeButton","toggleFullscreen","coordinateButton","toggleCoordinator","START","runButton2","pauseButton","pause","togglePause","mouseView","headerView_","footerView_","launchFullScreen","exitFullScreen","speedButton","stopButton2","Entry.Engine.prototype.toggleSpeedPanel","animate","speedLabel_","speedProgress_","fadeOut","speedHandle_","insertBefore","tr","td","setSpeedMeter","grid","draggable","containment","drag","level","position","Entry.Engine.prototype.setSpeedMeter","clearInterval","ticker","setInterval","Entry.Engine.prototype.start","Entry.Engine.prototype.stop","Entry.Engine.prototype.update","computeObjects","Entry.Engine.prototype.computeObjects","computeFunction","Entry.Engine.prototype.computeFunction","tick","Entry.Engine.computeThread","isSame","isRepeat","newScript","Entry.Engine.prototype.isState","Entry.Engine.prototype.run","Entry.Engine.prototype.toggleRun","takeSnapshot","mapVariable","mapList","takeStartSceneSnapshot","Entry.Engine.prototype.toggleStop","stopProjectTimer","loadStartSceneSnapshot","clearThreads","hideInputField","Entry.Engine.prototype.togglePause","restart","Entry.Engine.prototype.fireEvent","eventName","Entry.Engine.prototype.raiseEvent","Entry.Engine.prototype.fireEventOnEntity","raiseEventOnEntity","Entry.Engine.prototype.raiseEventOnEntity","Entry.Engine.prototype.captureKeyEvent","ctrlKey","shiftKey","moveSprite","Entry.Engine.prototype.raiseKeyEvent","Entry.Engine.prototype.updateMouseView","coordinate","Entry.Engine.prototype.hideMouseView","Entry.Engine.prototype.toggleFullscreen","Popup","$doc","body_","scrollTop","window_","Entry.Engine.prototype.exitFullScreen","webkitIsFullScreen","mozIsFullScreen","isFullScreen","Entry.Engine.prototype.showProjectTimer","Entry.Engine.prototype.hideProjectTimer","timerTypes","clearTimer","Entry.Engine.prototype.clearTimer","Entry.Engine.prototype.startProjectTimer","Entry.Engine.prototype.stopProjectTimer","Entry.Engine.prototype.updateProjectTimer","current","EntityObject","Entry.EntityObject","flip","Bitmap","setInitialEffectValue","textObject","bgObject","drawRect","fontType","fontSize","strike","underLine","fontItalic","fontBold","cursor","evt","isObjectClick","offset","stageX","stageY","initCommand","checkCommand","getLock","doCommand","updateObject","injectModel","Entry.EntityObject.prototype.injectModel","pictureModel","entityModel","setFont","setBGColour","bgColor","setUnderLine","setStrike","syncModel_","Entry.EntityObject.prototype.syncModel_","setRegX","setRegY","rotation","setLineBreak","lineBreak","setHeight","setTextAlign","setFontSize","getFontSize","Entry.EntityObject.prototype.initCommand","isCommandValid","restoreEntity","Entry.EntityObject.prototype.doCommand","Entry.EntityObject.prototype.checkCommand","Entry.EntityObject.prototype.restoreEntity","currentModel","Entry.EntityObject.prototype.setX","updateCoordinateView","updateDialog","Entry.EntityObject.prototype.getX","Entry.EntityObject.prototype.setY","Entry.EntityObject.prototype.getY","Entry.EntityObject.prototype.getDirection","Entry.EntityObject.prototype.setDirection","flippable","updateRotationView","Entry.EntityObject.prototype.setRotation","Entry.EntityObject.prototype.getRotation","Entry.EntityObject.prototype.setRegX","getRegX","Entry.EntityObject.prototype.getRegX","Entry.EntityObject.prototype.setRegY","getRegY","Entry.EntityObject.prototype.getRegY","Entry.EntityObject.prototype.setScaleX","Entry.EntityObject.prototype.getScaleX","Entry.EntityObject.prototype.setScaleY","Entry.EntityObject.prototype.getScaleY","Entry.EntityObject.prototype.setSize","scale","Entry.EntityObject.prototype.getSize","getWidth","abs","getHeight","Entry.EntityObject.prototype.setWidth","getLineBreak","lineWidth","updateBG","Entry.EntityObject.prototype.getWidth","Entry.EntityObject.prototype.setHeight","alignTextBox","Entry.EntityObject.prototype.getHeight","Entry.EntityObject.prototype.setColour","getColour","Entry.EntityObject.prototype.getColour","Entry.EntityObject.prototype.setBGColour","getBGColour","Entry.EntityObject.prototype.getBGColour","Entry.EntityObject.prototype.setUnderLine","getUnderLine","Entry.EntityObject.prototype.getUnderLine","Entry.EntityObject.prototype.setStrike","getStrike","Entry.EntityObject.prototype.getStrike","getFont","Entry.EntityObject.prototype.getFont","fontArray","Entry.EntityObject.prototype.setFont","setFontBold","setFontItalic","setFontType","getMeasuredWidth","syncFont","Entry.EntityObject.prototype.syncFont","getFontType","Entry.EntityObject.prototype.getFontType","Entry.EntityObject.prototype.setFontType","Entry.EntityObject.prototype.getFontSize","Entry.EntityObject.prototype.setFontSize","Entry.EntityObject.prototype.setFontBold","isFontBold","toggleFontBold","Entry.EntityObject.prototype.toggleFontBold","Entry.EntityObject.prototype.setFontItalic","isFontItalic","toggleFontItalic","Entry.EntityObject.prototype.toggleFontItalic","setFontName","Entry.EntityObject.prototype.setFontName","fontName","currentFontArray","tempArray","getFontName","Entry.EntityObject.prototype.getFontName","trim","Entry.EntityObject.prototype.setText","Entry.EntityObject.prototype.getText","Entry.EntityObject.prototype.setTextAlign","TEXT_ALIGN_CENTER","TEXT_ALIGNS","getTextAlign","Entry.EntityObject.prototype.getTextAlign","Entry.EntityObject.prototype.setLineBreak","previousState","getMeasuredLineHeight","Entry.EntityObject.prototype.getLineBreak","Entry.EntityObject.prototype.setVisible","Entry.EntityObject.prototype.getVisible","Entry.EntityObject.prototype.setImage","absoluteRegX","absoluteRegY","cache","Image","fileName","thisPointer","onload","image.onload","Entry.EntityObject.prototype.applyFilter","effects","adjust","cmBrightness","ColorMatrix","adjustColor","brightnessFilter","ColorMatrixFilter","cmHue","hueFilter","matrixValue","cosVal","sinVal","v","calcMatrix","colorFilter","Entry.EntityObject.prototype.resetFilter","Entry.EntityObject.prototype.updateDialog","Entry.EntityObject.prototype.takeSnapshot","Entry.EntityObject.prototype.loadSnapshot","Entry.EntityObject.prototype.removeClone","unloadEntity","isFunction","Entry.EntityObject.prototype.clearExecutor","Entry.EntityObject.prototype.toJSON","cutDecimal","Entry.EntityObject.prototype.setInitialEffectValue","Entry.EntityObject.prototype.removeBrush","selectedObjectContainer","Entry.EntityObject.prototype.updateBG","beginFill","fontAlign","TEXT_ALIGN_LEFT","TEXT_ALIGN_RIGHT","Entry.EntityObject.prototype.alignTextBox","textObjectHeight","maxHeight","Entry.EntityObject.prototype.syncDialogVisible","Helper","Entry.Helper","parentView","parentView_","blockHelpData","EntryStatic","blockInfo","blockHelperView","blockHelperHeader","Block_info","blockHelperContent","blockHelperContent_","blockHelperView_","blockHelperBlock","blockHelperDescription","Block_click_msg","blockHelperDescription_","_renderView","RenderView","Code","changeCode","first","bindWorkspace","p.bindWorkspace","_blockViewObserver","_updateSelectedBlock","p._updateSelectedBlock","blockView","selectedBlockView","_blockView","renderBlock","p.renderBlock","description","isPrimitive","def","bBox","svgGroup","getBBox","blockWidth","blockHeight","offsetX","getSkeleton","box","svgDom","Activity","Entry.Activity","timestamp","ActivityReporter","Entry.ActivityReporter","_activities","p.add","activity","error","Entry.State","caller","time","getUpTime","generateMessage","Entry.State.prototype.generateMessage","Entry.StateManager","undoStack_","redoStack_","isIgnore","isRestore","cancelLastCommand","addStamp","Entry.StateManager.prototype.generateView","stateManagerView","Entry.StateManager.prototype.addCommand","isIgnoring","isRestoring","constructor","report","creationChangedEvent","Entry.StateManager.prototype.cancelLastCommand","canUndo","Entry.StateManager.prototype.getLastCommand","Entry.StateManager.prototype.undo","startRestore","endRestore","Entry.StateManager.prototype.redo","canRedo","Entry.StateManager.prototype.updateView","undoButton","redoButton","Entry.StateManager.prototype.startRestore","Entry.StateManager.prototype.endRestore","Entry.StateManager.prototype.isRestoring","Entry.StateManager.prototype.startIgnore","Entry.StateManager.prototype.endIgnore","Entry.StateManager.prototype.isIgnoring","Entry.StateManager.prototype.canUndo","Entry.StateManager.prototype.canRedo","Entry.StateManager.prototype.addStamp","stamp","Entry.StateManager.prototype.isSaved","Entry.StateManager.prototype.addActivity","Entry.EntryObject","model","initSound","lock","selectedPictureId","setRotateMethod","rotateMethod","initEntity","loadObject","Entry.EntryObject.prototype.generateView","objectView","context_rename","stopPropagation","nameView_","select","context_duplicate","context_remove","copy_file","objectInfoView","objectEditable","objectInfo_visible","objectInfo_lock","isLocked","updateInputViews","thumbnailView","thumbnailView_","wrapperView","nameView","entryObject","onblur","this.nameView_.onblur","onkeypress","this.nameView_.onkeypress","editView","editView_","documentMousedown","editView.blur","editObjectComplete","objectDeletable","deleteView","deleteView_","informationView","isInformationToggle","informationView_","rotationWrapperView","coordinateView","xCoordi","xInput","yCoordi","yInput","sizeSpan","Size","sizeInput","xInput_","yInput_","sizeInput_","coordinateView_","xInput.onkeypress","xInput.onblur","yInput.onkeypress","yInput.onblur","sizeInput.onkeypress","sizeInput.onblur","rotateLabelWrapperView","rotateLabelWrapperView_","rotateSpan","rotateInput","rotateSpan_","rotateInput_","directionSpan","directionInput","directionInput_","rotateInput.onkeypress","rotateInput.onblur","directionInput.onkeypress","directionInput.onblur","rotationMethodWrapper","rotationMethodWrapper_","rotateMethodLabelView","rotate_method","rotateModeAView","rotateModeAView_","initRotateValue","rotateModeBView","rotateModeBView_","rotateModeCView","rotateModeCView_","updateRotateMethodView","context","editBtn","sizeTitle","setName","Entry.EntryObject.prototype.setName","Entry.EntryObject.prototype.setText","setScript","Entry.EntryObject.prototype.setScript","getScriptText","Entry.EntryObject.prototype.getScriptText","Entry.EntryObject.prototype.initEntity","fontStyle","bold","italic","underline","family","background","Entry.EntryObject.prototype.updateThumbnailView","backgroundImage","Entry.EntryObject.prototype.updateCoordinateView","isForced","isSelected","originX","originY","newX","newY","newSize","Entry.EntryObject.prototype.updateRotationView","Entry.EntryObject.prototype.select","addPicture","Entry.EntryObject.prototype.addPicture","removePicture","injectPicture","Entry.EntryObject.prototype.removePicture","Entry.EntryObject.prototype.getPicture","checker","Entry.EntryObject.prototype.setPicture","Entry.EntryObject.prototype.getPrevPicture","Entry.EntryObject.prototype.getNextPicture","Entry.EntryObject.prototype.selectPicture","addSound","Entry.EntryObject.prototype.addSound","removeSound","injectSound","Entry.EntryObject.prototype.removeSound","Entry.EntryObject.prototype.getRotateMethod","Entry.EntryObject.prototype.setRotateMethod","selectedObject","updateHandle","Entry.EntryObject.prototype.initRotateValue","Entry.EntryObject.prototype.updateRotateMethodView","toggleInformation","Entry.EntryObject.prototype.toggleInformation","isToggle","Entry.EntryObject.prototype.addCloneEntity","maxCloneLimit","clonedEntity","cloneSimpleObject","setCloneBrush","isStarted","addCloneVariables","loadEntity","initializeSplitter","Entry.EntryObject.prototype.initializeSplitter","splitter","onmousedown","splitter.onmousedown","splitterEnable","clientX","Entry.EntryObject.prototype.isSelected","Entry.EntryObject.prototype.toJSON","getPicturesJSON","getSoundsJSON","Entry.EntryObject.prototype.destroy","removeElement","Entry.EntryObject.prototype.getSound","Entry.EntryObject.prototype.addCloneVariables","findObjsByKey","keyName","clone","Entry.EntryObject.prototype.getLock","Entry.EntryObject.prototype.setLock","Entry.EntryObject.prototype.updateInputViews","Entry.EntryObject.prototype.editObjectValues","click","blurAllInput","Entry.EntryObject.prototype.blurAllInput","Entry.EntryObject.prototype.addStampEntity","stampEntity","StampEntity","Entry.EntryObject.prototype.getClonedEntities","entities","Entry.EntryObject.prototype.getStampEntities","Entry.EntryObject.prototype.clearExecutor","Painter","Entry.Painter","toolbox","selected","enabled","fillColor","lineColor","fill","transparent","locked","file","modified","selectArea","firstStatement","initialize","Entry.Painter.prototype.initialize","painterView","canvas_","Stage","autoClear","enableDOMEvents","enableMouseOver","mouseMoveOutside","Touch","enable","objectContainer","ctx","getContext","imageSmoothingEnabled","webkitImageSmoothingEnabled","mozImageSmoothingEnabled","msImageSmoothingEnabled","oImageSmoothingEnabled","ctx_","initDashedLine","initPicture","initCoordinator","initHandle","initDraw","painter","string","drawText","selectToolbox","Entry.Painter.prototype.initHandle","_handle","handle","handleMode","isSelectCenter","updateImageHandle","NEHandle","generateCornerHandle","NWHandle","SWHandle","SEHandle","EHandle","generateXHandle","WHandle","NHandle","generateYHandle","SHandle","RHandle","dr","updateImageHandleCursor","Entry.Painter.prototype.generateCornerHandle","delta","Entry.Painter.prototype.generateXHandle","Entry.Painter.prototype.generateYHandle","Entry.Painter.prototype.updateImageHandle","cp","x1","y1","x2","y2","objectWidthInput","objectHeightInput","objectRotateInput","Entry.Painter.prototype.updateImageHandleCursor","cursorList","iter","clearCanvas","Entry.Painter.prototype.clearCanvas","skipInit","clearHandle","removeAllChildren","colorLayerData","getImageData","reloadContext","newPicture","Entry.Painter.prototype.newPicture","new_picture","Entry.Painter.prototype.initPicture","confirm","save","file_","file_save","addImage","Entry.Painter.prototype.initDraw","stagemousedown","stagemouseup","stagemousemove","Entry.Painter.prototype.selectObject","bitmap","isCrop","selectTextObject","Entry.Painter.prototype.selectTextObject","bounds","Entry.Painter.prototype.updateHandle","getChildIndex","hit","hitArea","drawDashedRect","updateHandle_","Entry.Painter.prototype.updateHandle_","matchTolerance","Entry.Painter.prototype.matchTolerance","startR","startG","startB","tolerance","matchColorOnly","Entry.Painter.prototype.matchColorOnly","matchColor","Entry.Painter.prototype.matchColor","a","colorPixel","Entry.Painter.prototype.colorPixel","pickStrokeColor","Entry.Painter.prototype.pickStrokeColor","rgb2hex","backgroundColor","Entry.Painter.prototype.drawText","oldPt","Entry.Painter.prototype.addImage","createBrush","Entry.Painter.prototype.createBrush","createEraser","Entry.Painter.prototype.createEraser","eraser","Entry.Painter.prototype.clearHandle","coordinator","Entry.Painter.prototype.initCommand","restoreHandle","restoreCoordinator","colorLayerModel","restorePainter","Entry.Painter.prototype.doCommand","Entry.Painter.prototype.checkCommand","Entry.Painter.prototype.restorePainter","currentColorModel","clearRect","putImageData","toDataURL","platten","Entry.Painter.prototype.platten","Entry.Painter.prototype.fill","point","Point","reachLeft","reachRight","pixelStack","newPos","Entry.Painter.prototype.reloadContext","move_pen","Entry.Painter.prototype.move_pen","midPt","curveTo","oldMidPt","move_line","Entry.Painter.prototype.move_line","move_rect","Entry.Painter.prototype.move_rect","move_circle","Entry.Painter.prototype.move_circle","drawEllipse","edit_copy","Entry.Painter.prototype.edit_copy","copyLayerData","edit_cut","Entry.Painter.prototype.edit_cut","edit_paste","Entry.Painter.prototype.edit_paste","edit_select","Entry.Painter.prototype.edit_select","selectImage","selectImage.onload","selectBitmap","move_erase","Entry.Painter.prototype.move_erase","settingShapeBlur","Entry.Painter.prototype.settingShapeBlur","Entry.Painter.prototype.stagemousedown","getViewMode","Entry.Painter.prototype.stagemousemove","painterTopStageXY","Entry.Painter.prototype.stagemouseup","Entry.Painter.prototype.file_save","saveChanges","canvasImage","Entry.Painter.prototype.transparent","leftBottom","rightTop","rightBottom","leftTop","fillTransparent","Entry.Painter.prototype.fillTransparent","Entry.Painter.prototype.trim","pixels","bottom","trimHeight","trimWidth","trimmed","Entry.Painter.prototype.showInputField","CanvasInput","fontFamily","fontColor","borderWidth","borderColor","borderRadius","boxShadow","innerShadow","onsubmit","Entry.Painter.prototype.addPicture","Entry.Painter.prototype.initCoordinator","Entry.Painter.prototype.toggleCoordinator","Entry.Painter.prototype.initDashedLine","Graphics","dashedLineTo","createjs.Graphics.prototype.dashedLineTo","dashLen","dashes","dashX","dashY","q","createjs.Graphics.prototype.drawDashedRect","h","drawResizableDashedRect","createjs.Graphics.prototype.drawResizableDashedRect","Entry.Painter.prototype.generateView","painterTop","painterToolbox","painterToolboxTop","painterContainer","painterCanvas","painterCanvas_","painterAttr","flipObject","flipx","title","flipy","iw","innerWidth","documentElement","clientWidth","ih","innerHeight","clientHeight","ecw","painterTopMenu","painterTopMenuContainer","painterTopMenuFileNew","painterTopMenuFileNewLink","painterTopMenuFile","painter_file","painterTopMenuFileContainer","painterTopMenuFileSave","painterTopMenuFileSaveLink","painter_file_save","painterTopMenuFileSaveAs","painterTopMenuFileSaveAsLink","painter_file_saveas","painterTopMenuEdit","painter_edit","painterTopMenuEditContainer","painterTopMenuEditImport","painterTopMenuEditImportLink","get_file","painterTopMenuEditCopy","painterTopMenuEditCopyLink","painterTopMenuEditCut","painterTopMenuEditCutLink","cut_picture","painterTopMenuEditPaste","painterTopMenuEditPasteLink","paste_picture","painterTopMenuEditEraseAll","painterTopMenuEditEraseAllLink","remove_all","painterTopToolbar","painterTopToolbarUndo","painterTopToolbarRedo","painterToolboxContainer","toolboxCursor","toolboxSelect","toolboxPen","toolboxLine","toolboxRect","toolboxCircle","toolboxText","toolboxFill","toolboxErase","painterToolboxCoordinate","attrResizeArea","painterAttrResizeTitle","picture_size","entryPlaygroundPainterAttrResizeX","entryPlaygroundPainterAttrResizeXTop","this.objectWidthInput.onblur","entryPlaygroundPainterSizeText","entryPlaygroundPainterAttrResizeY","entryPlaygroundPainterAttrResizeYTop","this.objectHeightInput.onblur","attrRotateArea","painterAttrRotate","painterAttrRotateName","picture_rotation","painterAttrRotateTop","this.objectRotateInput.onblur","defaultValue","attrColorArea","painterAttrColorContainer","attrCircleArea","painterAttrCircle","painterAttrCircleInput","attrColorSpoid","getColourCodes","painterColors","backgroundClick","attrThickArea","painterAttrThickName","painterAttrThick","painterAttrThickTop","painterAttrThickInput","onchange","painterAttrThickInput.onchange","painterAttrShapeLineColor","painterAttrShapeBackgroundInnerColor","painterAttrShapeBackgroundColor","zIndex","attrBackgroundArea","painterAttrBackground","painterAttrBackgroundTop","attrFontArea","paintAttrFontTop","paintAttrFontTop_","painterAttrFontTitle","textStyle","painterAttrFontName","painterAttrFontName.onchange","fonts","painterAttrFontSizeArea","painterAttrFontSizeTop","painterAttrFontSize","painterAttrFontSize.onchange","paintAttrFontStyleArea","painterAttrFontStyleTop","painterAttrFontStyle","painterAttrFontStyle.onchange","fontStyles","label","attrLineArea","painterAttrLineStyleLine","painterAttrLineArea","painterAttrLineStyleLine1","painterAttrLineStyleBackgroundLine","painterAttrLineArea.blur","onmouseleave","painterAttrLineArea.onmouseleave","this.attrLineArea.onchange","Entry.Painter.prototype.restoreHandle","initDisplay","Entry.Painter.prototype.initDisplay","Entry.Painter.prototype.selectToolbox","BlockParser","Entry.BlockParser","syntax","_iterVariableCount","_iterVariableChunk","p.Code","Thread","Block","textCode","p.Thread","getBlocks","p.Block","_schema","syntaxType","Program","p.Program","Scope","p.Scope","BasicFunction","p.BasicFunction","statementCode","statements","indent","BasicIteration","p.BasicIteration","iterateNumber","iterVariable","publishIterateVariable","unpublishIterateVariable","BasicIf","p.BasicIf","BasicWhile","p.BasicWhile","p.indent","indentedCode","p.publishIterateVariable","iterVariableCount","chunk","p.unpublishIterateVariable","JSParser","Entry.JSParser","scopeChain","scope","node","separatedBlocks","initScope","BlockStatement","unloadScope","Identifier","p.Identifier","ExpressionStatement","p.ExpressionStatement","expression","ForStatement","p.ForStatement","startVal","declarations","op","endVal","res","p.BlockStatement","childNode","EmptyStatement","p.EmptyStatement","DebuggerStatement","p.DebuggerStatement","WithStatement","p.WithStatement","ReturnStaement","p.ReturnStaement","LabeledStatement","p.LabeledStatement","BreakStatement","p.BreakStatement","ContinueStatement","p.ContinueStatement","IfStatement","p.IfStatement","SwitchStatement","p.SwitchStatement","SwitchCase","p.SwitchCase","ThrowStatement","p.ThrowStatement","TryStatement","p.TryStatement","CatchClause","p.CatchClause","WhileStatement","p.WhileStatement","blockType","DoWhileStatement","p.DoWhileStatement","ForInStatement","p.ForInStatement","FunctionDeclaration","p.FunctionDeclaration","VariableDeclaration","p.VariableDeclaration","ThisExpression","p.ThisExpression","this","ArrayExpression","p.ArrayExpression","ObjectExpression","p.ObjectExpression","Property","p.Property","FunctionExpression","p.FunctionExpression","UnaryExpression","p.UnaryExpression","UnaryOperator","p.UnaryOperator","updateOperator","p.updateOperator","BinaryOperator","p.BinaryOperator","AssignmentExpression","p.AssignmentExpression","AssignmentOperator","p.AssignmentOperator","LogicalExpression","p.LogicalExpression","LogicalOperator","p.LogicalOperator","MemberExpression","p.MemberExpression","getPrototypeOf","ConditionalExpression","p.ConditionalExpression","UpdateExpression","p.UpdateExpression","CallExpression","p.CallExpression","callee","NewExpression","p.NewExpression","SequenceExpression","p.SequenceExpression","p.initScope","scoper","scanDefinition","p.unloadScope","p.scanDefinition","promise","childBody","raw","consequent","isArray","Parser","Entry.Parser","cm","_mode","codeMirror","_lang","availableCode","_stageId","Ntry","configManager","getConfig","NtryData","setAvailableCode","config","player","mappingSyntax","_parser","assistScope","CodeMirror","commands","javascriptComplete","CodeMirror.commands.javascriptComplete","showHint","globalScope","completionActive","completeSingle","p.parse","astTree","acorn","SyntaxError","annotation","loc","ch","column","getLineNumber","severity","markText","__annotation","clearOnEnter","textArr","reduce","prev","p.getLineNumber","lines","startline","endline","p.mappingSyntax","types","syntaxArray","p.setAvailableCode","configCode","playerCode","availableList","items","getBlockList","Entry.Popup","Entry.Popup.prototype.remove","firstChild","removeEventListener","Entry.Popup.prototype.resize","popupWindow","maxWidth","popupHelper","Entry.popupHelper","reset","popupList","nowContent","ignoreCloseType","spanArea","prop","$target","middle","clearPopup","Entry.popupHelper.prototype.clearPopup","popupWrapper_","addPopup","Entry.popupHelper.prototype.addPopup","popupObject","content_","titleButton_","closeEvent","title_","setPopupLayout","hasPopup","Entry.popupHelper.prototype.hasPopup","setPopup","Entry.popupHelper.prototype.setPopup","Entry.popupHelper.prototype.remove","Entry.popupHelper.prototype.resize","Entry.popupHelper.prototype.show","Entry.popupHelper.prototype.hide","Entry.getStartProject","walking_entryBot","PropertyPanel","Entry.PropertyPanel","modes","parentDom","_tabView","_contentView","selectedImgView","selectedImgView_","addMode","p.addMode","contentObj","contentDom","tabDom","modeResize","resizeList","p.select","modeName","p.initializeSplitter","documentMousemove","resizeEvent","Entry.init","events_","bindGlobalEvent","parseOptions","libDir","defaultDir","blockInjectPath","blockInjectDir","isPhone","initialize_","initFonts","createDom","loadInterfaceState","overridePrototype","cloudSavable","onkeydown","document.onkeydown","onkeyup","document.onkeyup","onresize","window.onresize","onbeforeunload","beforeUnload","getBrowserType","flashaudio","registerPlugins","WebAudioPlugin","FlashAudioPlugin","swfPath","installPlugin","loadAudio_","Entry.loadAudio_","filenames","Audio","Entry.initialize_","youtube","Youtube","VariableContainer","commander","Scene","Playground","Toast","HW","enableActivityLogging","Reporter","Entry.createDom","canvasWrapper","initStage","engineView","playgroundView","cancelObjectEdit","sceneView","tempList","getListById","wheelDirection","wheelDelta","scrollButton_","Entry.start","Entry.parseOptions","projectSaveable","projectsaveable","objectaddable","objectdeletable","soundEditable","soundeditable","pictureEditable","pictureeditable","sceneEditable","functionEnable","messageEnable","variableEnable","listEnable","hasVariableManager","hasvariablemanager","Entry.initFonts","Entry.Reporter","isRealTime","userId","activities","Entry.Reporter.prototype.start","io","emit","Entry.Reporter.prototype.report","Entry.Scene","maxCount","viewBasicWidth","Entry.Scene.prototype.generateView","$window","pageX","scrollLeft","pageY","slope","selectedLeft","getNextScene","$sceneView","trigger","moveScene","addScene","addButton_","generateElement","Entry.Scene.prototype.generateElement","viewTemplate","nameField","disabled","sceneLeft","divide","computeInputWidth","inputWrapper","nameField.onkeyup","isArrowOrBackspace","nameField.onblur","removeButtonCover","removeButton","will_you_delete_scene","removeScene","duplicate_scene","cloneScene","Entry.Scene.prototype.updateView","Entry.Scene.prototype.addScenes","createScene","Entry.Scene.prototype.addScene","objectContainers","createObjectContainer","Entry.Scene.prototype.removeScene","Scene_delete_error","removeObjectContainer","Entry.Scene.prototype.selectScene","selectObjectContainer","targetObject","refreshPlayground","updateList","Entry.Scene.prototype.toJSON","Entry.Scene.prototype.moveScene","Entry.Scene.prototype.getSceneById","sceneId","Entry.Scene.prototype.getScenes","Entry.Scene.prototype.takeStartSceneSnapshot","sceneBeforeRun","Entry.Scene.prototype.loadStartSceneSnapshot","Entry.Scene.prototype.createScene","SCENE","Entry.Scene.prototype.cloneScene","Scene_add_error","clonedScene","replica_of_object","Entry.Scene.prototype.resize","firstScene","startPos","marginLeft","totalWidth","normWidth","removeProp","fieldWidth","Entry.Scene.prototype.getNextScene","Entry.Script","previousScript","parentScript","hasAttribute","childrens","nextScript","statement","p.clone","p.getStatement","statementName","compute","p.compute","p.getValue","valueName","p.getNumberValue","p.getStringValue","p.getBooleanValue","p.getField","fieldName","p.getStringField","p.getNumberField","p.callReturn","p.run","Entry.Stage","dialogContainer","Entry.Stage.prototype.initStage","ontouchstart","canvas.ontouchstart","ontouchend","canvas.ontouchend","downFunc","upFunc","onmouseup","focused","moveFunc","roundRect","getBoundingClientRect","changedTouches","onmousemove","ontouchmove","onmouseout","canvas.onmouseout","exception","initWall","render","Entry.Stage.prototype.render","Entry.Stage.prototype.update","objectUpdated","Entry.Stage.prototype.loadObject","getObjectContainerByScene","objContainer","Entry.Stage.prototype.loadEntity","Entry.Stage.prototype.unloadEntity","loadVariable","Entry.Stage.prototype.loadVariable","variableView","removeVariable","Entry.Stage.prototype.removeVariable","Entry.Stage.prototype.loadDialog","Entry.Stage.prototype.unloadDialog","Entry.Stage.prototype.sortZorder","setChildIndex","Entry.Stage.prototype.initCoordinator","Entry.Stage.prototype.toggleCoordinator","Entry.Stage.prototype.selectObject","Entry.Stage.prototype.initHandle","EaselHandle","setChangeListener","setEditStartListener","startEdit","setEditEndListener","endEdit","Entry.Stage.prototype.updateObject","setDraggable","editEntity","toggleCenter","toggleRotation","toggleDirection","toggleResize","Entry.Stage.prototype.updateHandle","newRegX","newRegY","Entry.Stage.prototype.startEdit","Entry.Stage.prototype.endEdit","Entry.Stage.prototype.initWall","Entry.Stage.prototype.showInputField","topPosition","inputSubmitButton","buttonImg","button","Entry.Stage.prototype.hideInputField","Entry.Stage.prototype.initObjectContainers","Entry.Stage.prototype.selectObjectContainer","containers","addChildAt","reAttachToCanvas","Entry.Stage.prototype.reAttachToCanvas","Entry.Stage.prototype.createObjectContainer","Entry.Stage.prototype.removeObjectContainer","Entry.Stage.prototype.getObjectContainerByScene","Entry.Stage.prototype.moveSprite","distance","Entry.StampEntity","EntityPrototype","Entry.Toast","toasts_","exist","warning","Entry.Toast.prototype.warning","isNotAutoDispose","toastTitle","toastMessage","Entry.Toast.prototype.success","Entry.Toast.prototype.alert","TvCast","Entry.TvCast","tvCast","tvCastHash","BlockDriver","Entry.BlockDriver","convert","p.convert","_convertBlock","p._convertBlock","generateBlockDef","subChild","nodeName","blocklyInfo","blockObject","mockup","BlockMockup","_","isEmpty","paramsKeyMap","statementsKeyMap","PRIMITIVES","Entry.BlockMockup","templates","isNext","isPrev","fieldCount","definition","simulate","p.simulate","blockViewAdd","blockViewDestroy","removeIndex","filter","p.appendDummyInput","p.appendValueInput","_addToParamsKeyMap","getFieldCount","p.appendStatementInput","_addToStatementsKeyMap","p.setCheck","p.appendField","opt","src_","menuGenerator_","menuName_","p.setColour","p.setInputsInline","p.setOutput","p.setPreviousStatement","p.setNextStatement","p.setEditable","p.getFieldCount","p._addToParamsKeyMap","p._addToStatementsKeyMap","Entry.ContextMenu","ctx.createDom","ctx.show","_className","empty","cb","ctx.position","win","winWidth","winHeight","ctx.hide","OBJECT","ENTITY","SPRITE","VARIABLE","FUNCTION","MESSAGE","BLOCK_MODEL","BLOCK_RENDER_MODEL","BOX_MODEL","THREAD_MODEL","DRAG_INSTANCE","BLOCK_STATIC","BLOCK_MOVE","BLOCK_FOLLOW","RETURN","CONTINUE","PASS","Entry.Utils","Entry.overridePrototype","Number.prototype.mod","n","Entry.Utils.generateId","intersectArray","Entry.Utils.intersectArray","z","isPointInMatrix","Entry.Utils.isPointInMatrix","matrix","offsetY","offsety","colorDarken","Entry.Utils.colorDarken","factor","inspect","val","colorLighten","Entry.Utils.colorLighten","hsl","hexToHsl","l","hslToHex","bound01","Entry.Utils.bound01","processPercent","Entry.Utils.hexToHsl","d","Entry.Utils.hslToHex","hue2rgb","t","pad2","hex","Entry.Utils.bindGlobalEvent","doc","windowReszied","off","originalEvent","touches","clientY","keyUpped","disposeEvent","makeActivityReporter","Entry.Utils.makeActivityReporter","activityReporter","initEntryEvent_","Entry.Utils.initEntryEvent_","sampleColours","Entry.assert","condition","parseTexttoXML","Entry.parseTexttoXML","xmlText","ActiveXObject","async","loadXML","parseFromString","parser","DOMParser","Entry.createElement","elementId","element.hasClass","element.addClass","element.removeClass","element.bindOnClick","makeAutolink","Entry.makeAutolink","html","regURL","regEmail","Entry.generateHash","Entry.addEventListener","Entry.dispatchEvent","Entry.removeEventListener","removeAllEventListener","Entry.removeAllEventListener","addTwoNumber","Entry.addTwoNumber","indexA","indexB","fixedA","fixedB","Entry.hex2rgb","exec","Entry.rgb2hex","Entry.generateRgb","Entry.adjustValueWithMaxMin","Entry.isExist","targetValue","identifier","Entry.getColourCodes","Entry.removeElement","Entry.getElementsByClassName","cl","retnode","Entry.parseNumber","countStringLength","Entry.countStringLength","dataString","charCodeAt","cutStringByLength","Entry.cutStringByLength","stringLength","isChild","Entry.isChild","Entry.launchFullScreen","requestFullscreen","mozRequestFulScreen","webkitRequestFullscreen","msRequestFullScreen","Entry.exitFullScreen","mozCancelFullScreen","webkitExitFullscreen","Entry.isPhone","getKeyCodeMap","Entry.getKeyCodeMap","Entry.checkCollisionRect","rectA","rectB","bindAnimationCallback","Entry.bindAnimationCallback","Entry.cloneSimpleObject","nodeListToArray","Entry.nodeListToArray","nl","Entry.computeInputWidth","tmp","theWidth","Entry.isArrowOrBackspace","codes","hexStringToBin","Entry.hexStringToBin","hexString","bytes","fromCharCode","Entry.findObjsByKey","factorials","Entry.factorial","Entry.getListRealIndex","Entry.toRadian","Entry.toDegrees","radians","Entry.getPicturesJSON","Entry.getSoundsJSON","Entry.cutDecimal","Entry.getBrowserType","userAgent","ua","navigator","tem","M","appName","appVersion","uaResult","Entry.setBasicBrush","Entry.setCloneBrush","parentBrush","Entry.isFloat","num","getStringIndex","Entry.getStringIndex","idx","charAt","Entry.getOrderedName","maxNumber","source","changeXmlHashId","Entry.changeXmlHashId","xmlBlock","mutations","Entry.getMaxFloatPoint","numbers","Entry.convertToRoundedDecimals","decimals","attachEventListener","Entry.attachEventListener","eventType","deAttachEventListener","Entry.deAttachEventListener","Entry.isEmpty","Entry.Utils.disableContextmenu","isRightButton","Entry.Utils.isRightButton","isTouchEvent","Entry.Utils.isTouchEvent","inherit","Entry.Utils.inherit","F","bindAnimationCallbackOnce","Entry.bindAnimationCallbackOnce","$elem","one","isInInput","Entry.Utils.isInInput","Entry.Utils.isFunction","addFilters","Entry.Utils.addFilters","boardSvgDom","suffix","defs","trashCanFilter","feMerge","blockFilter","in","in1","blockHighlightFilter","addBlockPattern","Entry.Utils.addBlockPattern","group","pattern","patternUnits","patternTransform","imagePath","createMouseEvent","Entry.Utils.createMouseEvent","createEvent","initMouseEvent","Model","Entry.Model","isSeal","generateSchema","generateSetter","generateObserve","seal","m","m.generateSchema","schema","localKey","defineProperty","_toJSON","m.generateSetter","m.set","isSilent","m.generateObserve","observers","m.observe","isNotify","observer","m.unobserve","m.notify","observeData","m._toJSON","Entry.Func","deletable","blockSchema","changeEvent","blockMap","_blockMap","registerParamBlock","generateWsBlock","registerFunction","updateMenu","Entry.Func.registerFunction","_targetFuncBlock","getBlockMenu","getCategoryCodes","menuCode","executeFunction","Entry.Func.executeFunction","threadHash","Entry.Func.clearThreads","Entry.Func.prototype.init","Xml","textToDom","edit","Entry.Func.edit","initEditView","bindFuncChangeEvent","Entry.Func.initEditView","setupMenuCode","setMode","MODE_OVERLAYBOARD","changeOverlayBoardCode","_workspaceStateEvent","Entry.Func.endEdit","unbindFuncChangeEvent","Entry.Func.save","generateBlock","saveFunction","syncFuncName","Entry.Func.syncFuncName","dstFName","dstFNameTokens","getAllBlocks","iList","srcFName","k","updatedDom","workspaceToDom","domToWorkspace","Entry.Func.cancelEdit","isEdit","functions_","MODE_BOARD","getMenuXml","Entry.Func.getMenuXml","createBtn","fieldXml","FIELD_BLOCK","syncFunc","Entry.Func.syncFunc","fieldText","topBlocks_","workspaceLength","dragMode_","Entry.Func.setupMenuCode","_fieldLabel","_fieldString","requestParamBlock","_fieldBoolean","refreshMenuCode","Entry.Func.refreshMenuCode","referenceCount","changeType","Entry.Func.requestParamBlock","blockPrototype","createParamBlock","Entry.Func.registerParamBlock","Entry.Func.createParamBlock","originalType","Entry.Func.updateMenu","banClass","unbanClass","reDraw","Entry.Func.prototype.edit","svg","Entry.Func.generateBlock","templateParams","booleanIndex","stringIndex","templateChunk","paramIndex","param_string","Entry.Func.prototype.generateBlock","toSave","generatedInfo","Entry.Func.generateWsBlock","outputBlock","getEventMap","defBlock","schemaParams","schemaTemplate","Mutator","mutate","getOutputBlock","Entry.Func.bindFuncChangeEvent","_funcChangeEvent","_contents","Entry.Func.unbindFuncChangeEvent","Entry.HWMontior","HWMonitor","Entry.HWMonitor","hwModule","_hwModule","changeMode","changeOffset","_listPortViews","initView","p.initView","snap","_svgGroup","_portMap","imgObj","_portViews","hwView","_template","pathGroup","portsTemp","portView","generatePortView","atan2","toggleMode","p.toggleMode","TempPort","addPortEle","_svglistGroup","_pathGroup","generateListView","removePortEle","setHwmonitor","p.setHwmonitor","module","_hwmodule","p.changeMode","p.addPortEle","listPort","p.removePortEle","p.generateListView","_portMapList","listsnap","portsTempList","portMapList","p.generatePortView","wrapperRect","getComputedTextLength","valueView","returnObj","p.update","bRect","_rect","p.resizeList","alignList","p.align","_alignNS","_alignEW","p.alignList","_alignNSList","p._alignEW","xCursor","gap","standardsize","tP","bP","listVLine","wholeHeight","tPort","bPort","prevTP","prevBP","gapTemp","wholeWidth","rPort","_movePort","p._alignNS","yCursor","lP","rP","lPort","prevLP","prevRP","p._alignNSList","initX","initY","listLine","lineIndent","currentWidth","tempXpos","Yval","cPort","nPort","p._movePort","prevPointer","groupX","portX","portY","Entry.HW","connectTrial","isFirstConnect","initSocket","connected","outputQueue","settingQueue","socketType","selectedDevice","hwInfo","TRIAL_LIMIT","p.initSocket","connect_hw","connect_fail","socketSecurity","protocol","WebSocket","binaryType","onopen","socket.onopen","initHardware","onmessage","socket.onmessage","checkDevice","updatePortData","onclose","socket.onclose","socketSecurity.onopen","socketSecurity.onmessage","socketSecurity.onclose","retryConnect","p.retryConnect","p.initHardware","setMenu","p.setDigitalPortValue","removePortReadable","p.getAnalogPortValue","p.getDigitalPortValue","setPortReadable","p.setPortReadable","p.removePortReadable","readyState","p.updatePortData","hwMonitor","p.closeConnection","close","downloadConnector","p.downloadConnector","focus","downloadSource","p.downloadSource","p.setZero","p.checkDevice","company","banHW","p.banHW","hwOptions","BlockModel","Entry.BlockModel","next","BlockRenderModel","Entry.BlockRenderModel","magneting","BoxModel","Entry.BoxModel","DragInstance","Entry.DragInstance","startX","startY","absX","absY","isNew","ThreadModel","Entry.ThreadModel","minWidth","Variable","Entry.Variable","name_","id_","variableType","isCloud_","isCloud","parsedValue","value_","minValue_","minValue","maxValue_","maxValue","visible_","x_","y_","width_","height_","scrollPosition","BORDER","FONT","Entry.Variable.prototype.generateView","variableIndex","rect_","wrapper_","textView_","valueView_","variableLength","slide","isAdjusting","slideBar_","getSlidePosition","valueSetter_","commandX","setSlideCommandX","viewValue_","titleView_","isResizing","elementView","indexView","valueWrapper","rawY","moveAmount","listLength","Entry.Variable.prototype.updateView","isNumber","rc","maxView","Entry.Variable.prototype.getName","Entry.Variable.prototype.setName","variableName","Entry.Variable.prototype.getId","Entry.Variable.prototype.getValue","Entry.Variable.prototype.isNumber","Entry.Variable.prototype.setValue","isFloatPoint","Entry.Variable.prototype.isVisible","Entry.Variable.prototype.setVisible","visibleState","Entry.Variable.prototype.setX","Entry.Variable.prototype.getX","Entry.Variable.prototype.setY","Entry.Variable.prototype.getY","Entry.Variable.prototype.setWidth","Entry.Variable.prototype.getWidth","isInList","Entry.Variable.prototype.isInList","Entry.Variable.prototype.setHeight","Entry.Variable.prototype.getHeight","Entry.Variable.prototype.takeSnapshot","Entry.Variable.prototype.loadSnapshot","Entry.Variable.prototype.syncModel_","variableModel","Entry.Variable.prototype.toJSON","Entry.Variable.prototype.remove","Entry.Variable.prototype.clone","getType","Entry.Variable.prototype.getType","setType","Entry.Variable.prototype.setType","Entry.Variable.prototype.getSlidePosition","Entry.Variable.prototype.setSlideCommandX","isSetter","updateSlideValueByView","Entry.Variable.prototype.updateSlideValueByView","ratio","getMinValue","Entry.Variable.prototype.getMinValue","setMinValue","Entry.Variable.prototype.setMinValue","isMinFloat","getMaxValue","Entry.Variable.prototype.getMaxValue","setMaxValue","Entry.Variable.prototype.setMaxValue","isMaxFloat","Entry.Variable.prototype.isFloatPoint","Entry.VariableContainer","viewMode_","variableAddPanel","isOpen","info","listAddPanel","selectedVariable","_variableRefs","_messageRefs","_functionRefs","Entry.VariableContainer.prototype.createDom","selectView","selectTrView","allButton","createSelectButton","variable_create","variableAddButton_","panel","addVariable","generateVariableAddView","generateListAddView","generateVariableSplitterView","generateVariableSettingView","generateListSettingView","messageAddButton","message_create","messageAddButton_","addMessage","list_create","listAddButton_","addList","functionAddButton_","_getBlockMenu","changeViewMode","lastSelector","selectMenu","Entry.VariableContainer.prototype.createSelectButton","isEnable","selectFilter","Entry.VariableContainer.prototype.selectFilter","elements","updateVariableAddView","Entry.VariableContainer.prototype.updateVariableAddView","cloudCheck","localCheck","globalCheck","cloudWrapper","Entry.VariableContainer.prototype.select","listElement","callerListElement","renderVariableReference","renderFunctionReference","renderMessageReference","Entry.VariableContainer.prototype.renderMessageReference","refs","messageId","callers","cloneNode","nameElement","toggleOnVariableView","no_use","Entry.VariableContainer.prototype.renderVariableReference","funcBlock","getBoard","activateBlock","Entry.VariableContainer.prototype.renderFunctionReference","Entry.VariableContainer.prototype.updateList","variableSettingView","listSettingView","viewMode","elementList","variableSplitters","Variable_used_at_all_objects","Variable_used_at_special_object","List_used_all_objects","list_used_specific_objects","Entry.VariableContainer.prototype.setMessages","createMessageView","Entry.VariableContainer.prototype.setVariables","createVariableView","createListView","Entry.VariableContainer.prototype.setFunctions","createFunctionView","Entry.VariableContainer.prototype.getFunction","funcId","Entry.VariableContainer.prototype.getVariable","Entry.VariableContainer.prototype.getList","Entry.VariableContainer.prototype.createFunction","addFunction","Entry.VariableContainer.prototype.addFunction","removeFunction","Entry.VariableContainer.prototype.removeFunction","checkListPosition","Entry.VariableContainer.prototype.checkListPosition","mouse","area_w","start_h","area_h","Entry.VariableContainer.prototype.getListById","mouseevt","returnList","editFunction","Entry.VariableContainer.prototype.editFunction","Entry.VariableContainer.prototype.saveFunction","Entry.VariableContainer.prototype.createFunctionView","editButton","checkAllVariableName","Entry.VariableContainer.prototype.checkAllVariableName","Entry.VariableContainer.prototype.addVariable","resetVariableAddPanel","Entry.VariableContainer.prototype.removeVariable","variableJSON","changeVariableName","Entry.VariableContainer.prototype.changeVariableName","variable_rename_failed","variable_dup","variable_too_long","variable_rename","variable_rename_ok","changeListName","Entry.VariableContainer.prototype.changeListName","list_rename_failed","list_dup","list_too_long","list_rename","list_rename_ok","removeList","Entry.VariableContainer.prototype.removeList","listJSON","Entry.VariableContainer.prototype.createVariableView","wrapper","editSaveButton","updateSelectedVariable","warn","variable_can_not_space","nameField.onkeydown","Entry.VariableContainer.prototype.addMessage","removeMessage","Entry.VariableContainer.prototype.removeMessage","changeMessageName","Entry.VariableContainer.prototype.changeMessageName","message_rename_failed","message_dup","message_too_long","message_rename","message_rename_ok","Entry.VariableContainer.prototype.createMessageView","sign_can_not_space","Entry.VariableContainer.prototype.addList","removelist","Entry.VariableContainer.prototype.createListView","selectedList","list_can_not_space","Entry.VariableContainer.prototype.mapVariable","Entry.VariableContainer.prototype.mapList","Entry.VariableContainer.prototype.getVariableJSON","Entry.VariableContainer.prototype.getMessageJSON","Entry.VariableContainer.prototype.getFunctionJSON","funcJSON","Entry.VariableContainer.prototype.resetVariableAddPanel","Entry.VariableContainer.prototype.generateVariableAddView","variableAddSpace","addSpaceNameWrapper","addSpaceInput","Variable_placeholder_name","addSpaceInput.onkeypress","addSpaceGlobalWrapper","addVariableGlobalSpan","Variable_use_all_objects","addVariableGlobalCheck","addSpaceLocalWrapper","addVariableLocalSpan","Variable_use_this_object","addVariableLocalCheck","addSpaceCloudWrapper","addSpaceCloudSpan","Variable_create_cloud","addVariableCloudCheck","addSpaceButtonWrapper","addSpaceCancelButton","Buttons","cancel","addSpaceConfirmButton","Entry.VariableContainer.prototype.generateListAddView","listAddSpace","list_name","addListGlobalSpan","use_all_objects","addListGlobalCheck","addListLocalSpan","addListLocalCheck","List_create_cloud","addListCloudCheck","Entry.VariableContainer.prototype.generateVariableSplitterView","topSplitter","bottomSplitter","Entry.VariableContainer.prototype.openVariableAddPanel","Entry.VariableContainer.prototype.getMenuXml","xmlList","hasVariable","hasList","Entry.VariableContainer.prototype.addCloneLocalVariables","newVar","originId","Entry.VariableContainer.prototype.generateTimer","Variable_Timer","Entry.VariableContainer.prototype.generateAnswer","Entry.VariableContainer.prototype.generateVariableSettingView","visibleWrapper","visibleCheck","visibleSpan","initValueWrapper","initValueSpan","default_value","initValueInput","initValueInput.onkeyup","initValueInput.onblur","slideWrapper","slideSpan","slideCheck","newVariable","minValueInput","maxValueInput","minMaxWrapper","minValueSpan","min_value","minValueInput.onblur","updateVariableSettingView","maxValueSpan","max_value","maxValueInput.onblur","Entry.VariableContainer.prototype.updateVariableSettingView","initValue","Entry.VariableContainer.prototype.generateListSettingView","show_list_workspace","lengthWrapper","lengthSpan","number_of_list","lengthController","minus","updateListSettingView","lengthInput","lengthInput.onblur","setListLength","lengthInput.onkeypress","plus","seperator","listValues","Entry.VariableContainer.prototype.updateListSettingView","numberSpan","input.onblur","input.onkeypress","Entry.VariableContainer.prototype.setListLength","arrLen","Entry.VariableContainer.prototype.updateViews","Entry.VariableContainer.prototype.updateSelectedVariable","Entry.VariableContainer.prototype.removeLocalVariables","Entry.VariableContainer.prototype.updateCloudVariables","cloudVariables","cloudLists","ajax","done","Entry.VariableContainer.prototype.addRef","getMode","getCode","viewAdd","dataAdd","Entry.VariableContainer.prototype.removeRef","wsMode","viewDestroy","dataDestroy","Entry.VariableContainer.prototype._getBlockMenu","contents","mutant","jr_start","highlightColor","entityManager","getEntitiesByComponent","UNIT","_unit","unitComp","getComponent","jr_repeat","repeat_0","roundValue","repeat_1","repeatCount","stepInto","jr_item","isAction","GET_ITEM","callBack","cparty_jr_item","pick_up_pencil","jr_north","go_up","WALK","actionType","EAST","TURN_LEFT","SOUTH","HALF_ROTATION","WEST","TURN_RIGHT","jr_east","go_right","NORTH","jr_south","go_down","jr_west","go_left","jr_start_basic","boxMultiplier","maze_when_run","jr_go_straight","go_forward","jr_turn_left","jr_turn_right","jr_go_slow","go_slow","GO_SLOW","jr_repeat_until_dest","repeat_until_reach_2","repeat_until_reach_1","jr_if_construction","jr_if_1","jr_if_2","gridComp","GRID","addVectorByDirection","fitEntities","TILE","tileType","OBSTACLE_REPAIR","jr_if_speed","OBSTACLE_SLOW","maze_step_start","maze_step_jump","JUMP","maze_step_for","maze_repeat_until_1","maze_repeat_until_2","maze_step_if_1","existEntities","WALL","maze_step_if_2","OBSTACLE_BEE","maze_call_function","CODE","Executor","components","maze_define_function","executed","maze_step_if_3","OBSTACLE_BANANA","maze_step_if_4","maze_step_move_step","maze_step_rotate_left","maze_step_rotate_right","test_wrapper","basic_button","BlockMenu","Entry.BlockMenu","categoryData","scroll","_align","_bannedClass","_categories","_svgId","_clearCategory","_generateView","_splitters","patternRect","svgThreadGroup","svgBlockGroup","_generateCategoryCodes","_scroller","BlockMenuScroller","_addControl","setSelectedBlock","_categoryCodes","_captureKeyEvent","dUpdateOffset","debounce","updateOffset","dragBlock","closeBlock","p._generateView","_categoryCol","_generateCategoryView","blockMenuContainer","mouseenter","setOpacity","resizing","dragMode","focusBlockMenu","expandWidth","widthBackup","mouseleave","p.changeCode","codeListener","createView","bindCodeView","p.bindCodeView","codeView","_clearSplitters","marginFromTop","hPadding","pastClass","checkBanClass","_createSplitter","vPadding","_moveTo","updateSplitters","cloneToGlobal","p.cloneToGlobal","_boardBlockView","workspaceMode","svgWidth","_svgWidth","selectedBoard","GlobalSvg","setView","addControl","currentThread","getThread","threadJSON","onMouseDown","dragInstance","terminateDrag","p.terminateDrag","boardBlockView","blockLeft","boardLeft","p.getCode","_code","p.setSelectedBlock","old","removeSelected","BlockView","addSelected","p.hide","p.show","renderText","p.renderText","p._createSplitter","topPos","splitterHPadding","p.updateSplitters","xDest","yDest","p._clearSplitters","splitters","p.setWidth","p.setMenu","categoryCodes","elems","_categoryElems","p.getCategoryCodes","selector","_convertSelector","p._convertSelector","p.selectMenu","doNotFold","checkVariables","oldView","_selectedCategoryView","boardView","showTabs","hideTabs","resizeScrollBar","p._generateCategoryCodes","codesJSON","categoryName","p.banClass","p.unbanClass","p.checkBanClass","p._addControl","_mouseWheel","p._mouseWheel","wheelDeltaY","dominate","p.dominate","p.reDraw","_handleDragBlock","p._handleDragBlock","p._captureKeyEvent","setPatternRectFill","p.setPatternRectFill","p._clearCategory","setCategoryData","p.setCategoryData","p._generateCategoryView","p.updateOffset","_offset","p.offset","Entry.BlockMenuScroller","_reset","vRatio","vY","vWidth","hX","_visible","_opacity","mouseHandler","this.mouseHandler","createScrollBar","RADIUS","p.createScrollBar","vScrollbar","rx","ry","p.resizeScrollBar","_updateRatio","updateScrollBar","p.updateScrollBar","p.scroll","_adjustValue","dest","moveBy","p._adjustValue","domHeight","limitBottom","p.setVisible","p.setOpacity","p.isVisible","p._updateRatio","realHeight","p._reset","p.onMouseDown","onMouseMove","mouseEvent","onMouseUp","Entry.BlockView","_board","_schemaChangeEvent","_updateSchema","_skeleton","_statements","magnet","_paramMap","magnets","nextMagnet","_nextGroup","isInBlockMenu","_startRender","DRAG_MODE_NONE","PARAM_SPACE","DRAG_RADIUS","contentWidth","contentHeight","animating","shadow","p._startRender","_updateMagnet","_path","_mouseEnable","_changeFill","DELETABLE_FALSE_LIGHTEN","_fillColor","pathStyle","nextShadow","boolean","outerLine","_startContentRender","disableMouseEvent","bindPrev","p._startContentRender","contentSvgGroup","statementSvgGroup","FieldText","FieldStatement","MODE_VIMBOARD","getCodeToText","alignContent","p._updateSchema","p.changeType","p.alignContent","statementIndex","secondLineHeight","FieldLineBreak","_alignStatement","_text","contentPos","getContentPos","_render","p._alignStatement","positions","statementPos","p._render","_renderPath","p._renderPath","_setPosition","p._setPosition","_toLocalCoordinate","p._toLocalCoordinate","parentSvgGroup","p._toGlobalCoordinate","getAbsoluteCoordinate","p._moveTo","_moveBy","p._moveBy","dblclick","removeControl","p.removeControl","vimBoardEvent","mouseDownCoordinate","movable","isFirst","_updateCloseBlock","originPos","generateCodeMagnetMap","readOnly","viewOnly","addDragging","DRAG_MODE_MOUSEDOWN","copyAndPaste","copyable","copyToClipboard","isDeletable","p.vimBoardEvent","dragEvent","_vimBoard","removeDragging","fromBlockMenu","removed","gs","ripple","prevBlock","getPrevBlock","DONE","magnetedBlockView","getLastBlock","isGlobal","getParent","Board","REMOVE","doDestroyBelow","setMagnetedBlock","ConnectionRipple","dispose","destroyShadow","p._updateCloseBlock","getNearestMagnet","getBelowHeight","getSvgRoot","p.getSvgRoot","p.getBoard","_setBoard","p._setBoard","_destroyObservers","getShadow","p.getShadow","_shadow","p.destroyShadow","p._updateMagnet","_updateBG","p._updateBG","transform","previous","dragHeight","_clonedShadow","nextBackground","originalHeight","p.addDragging","p.removeDragging","p.addSelected","p.removeSelected","p.getSkeleton","p.getContentPos","_updateOpacity","p._updateOpacity","_updateShadow","p._updateShadow","_setMovable","p._setMovable","isMovable","_setReadOnly","p._setReadOnly","isReadOnly","_setCopyable","p._setCopyable","isCopyable","bumpAway","p.bumpAway","p.bindPrev","nextBlock","getNextBlock","endBlock","separate","p.getAbsoluteCoordinate","requestAbsoluteCoordinate","p.getBelowHeight","requestPartHeight","_updateDisplay","p._updateDisplay","_updateColor","p._updateColor","_updateContents","p._updateContents","renderStart","p._destroyObservers","p._changeFill","isPattern","addActivated","p.addActivated","removeActivated","p.removeActivated","getParam","p.getParam","Entry.Code","_data","_eventMap","executors","executeEndEvent","_handleChange","_maxZIndex","load","STATEMENT","PARAM","p.load","p.createView","CodeView","registerEvent","p.registerEvent","unregisterEvent","p.unregisterEvent","p.raiseEvent","p.getEventMap","p.tick","p.removeExecutor","p.clearExecutors","p.clearExecutorsByEntity","p.addExecutor","p.createThread","cloneThread","p.cloneThread","newThread","p.destroyThread","doDestroyThread","p.doDestroyThread","p.getThreads","countBlock","p.countBlock","p.moveBy","firstBlock","p.stringify","setZIndex","p._handleChange","p.hasBlockType","p.findById","registerBlock","p.registerBlock","unregisterBlock","p.unregisterBlock","getByPointer","p.getByPointer","getBlock","getValueBlock","getTargetByPointer","p.getTargetByPointer","p.getBlockList","excludePrimitive","Entry.CodeView","scrollX","scrollY","Entry.ConnectionRipple","cr","cr.createDom","_ripple","cr.setView","cx","cy","_startTime","cr.dispose","percent","Entry.Executor","_callStack","p.execute","getSchema","oldScope","p.stepInto","p.break","breakLoop","p.breakLoop","p.end","p.isEnd","Entry.Scope","fieldBlock","newScope","p.getParams","_getParamIndex","_getStatementIndex","p._getParamIndex","p._getStatementIndex","p.die","Field","Entry.Field","TEXT_LIMIT_LENGTH","destroyOption","p.command","_startValue","_block","p.destroyOption","documentDownEvent","optionGroup","_attachDisposeEvent","p._attachDisposeEvent","_position","mina","easeinout","getAbsolutePosFromBoard","p.getAbsolutePosFromBoard","absPos","getAbsolutePosFromDocument","p.getAbsolutePosFromDocument","getRelativePos","p.getRelativePos","truncate","p.truncate","limit","appendSvgOptionGroup","p.appendSvgOptionGroup","_index","p.setValue","_isEditable","p._isEditable","root","_selectBlockView","p._selectBlockView","_bindRenderOptions","p._bindRenderOptions","renderOptions","p.pointer","Entry.FieldAngle","modValue","p.renderStart","textElement","TEXT_Y_PADDING","getTextWidth","_header","CONTENT_HEIGHT","p.renderOptions","applyValue","exitKeys","svgOptionGroup","_dividerGroup","absolutePos","zeroPos","mousemove","updateGraph","p.updateGraph","_fillPath","angleRadians","largeFlag","FILL_PATH","_indicator","p.applyValue","p.getTextWidth","X_PADDING","p.getText","p.modValue","FieldBlock","Entry.FieldBlock","contentIndex","_valueBlock","_content","acceptType","_restoreCurrent","setThread","setParent","updateValueBlock","calcWH","p.calcWH","calcHeight","inspectBlock","p.inspectBlock","_originBlock","_createBlockByType","_setValueBlock","p._setValueBlock","p.getValueBlock","p.updateValueBlock","_posObserver","_sizeObserver","p.getPrevBlock","p.getNextBlock","p.requestAbsoluteCoordinate","p.isGlobal","p.separate","cut","p.cut","p.replace","valueBlock","doNotSplice","getTerminateOutputBlock","p.setParent","_parent","p.getParent","p._createBlockByType","spliceBlock","p.spliceBlock","_bg","p.getThread","FieldColor","Entry.FieldColor","WIDTH","HEIGHT","colors","getWidgetColorList","mouseup","Entry.FieldColor.getWidgetColorList","Entry.FieldDropdown","_noArrow","noArrow","_arrowColor","arrowColor","_CONTENT_HEIGHT","dropdownHeight","_FONT_SIZE","_ROUND","_updateValue","getTextByValue","_arrow","points","p._position","documentHeight","optionGroupHeight","relPos","p.getTextByValue","Entry.FieldDropdownDynamic","FieldDropDownDynamic","p._updateValue","FieldImage","Entry.FieldImage","_size","_highlightColor","_imgElement","_imgUrl","FieldIndicator","Entry.FieldIndicator","_boxMultiplier","enableHighlight","p.enableHighlight","pathLen","getTotalLength","strokeWidth","easeout","Entry.Keyboard","FieldKeyboard","Entry.FieldKeyboard","_optionVisible","_keyboardControl","p._keyboardControl","Entry.FieldLineBreak","targetStatementIndex","FieldOutput","Entry.FieldOutput","_updateValueBlock","_inspectBlock","p._inspectBlock","p._updateValueBlock","Entry.FieldStatement","_thread","_initThread","p._initThread","checkTopBlock","p.calcHeight","insertTopBlock","p.insertTopBlock","newBlock","doInsert","p.checkTopBlock","Entry.FieldText","_fontSize","_color","Entry.FieldTextInput","Entry.GlobalSvg","_inited","gs.createDom","inited","_container","gs.setView","draw","gs.draw","_svg","isVimMode","velocity","gs.remove","_offsetX","_offsetY","_startX","_startY","gs.align","gs.show","gs.hide","gs.position","gs.terminateDrag","bLeft","bTop","bWidth","gs.addControl","gs.onMouseDown","newLeft","newTop","Entry.Mutator","m.mutate","schemaDiff","Entry.RenderView","renderViewContainer","_bBox","Scroller","Entry.Scroller","horizontal","vertical","_horizontal","_vertical","hRatio","hWidth","_bindEvent","hScrollbar","this.hScrollbar.mousedown","this.vScrollbar.mousedown","clientRect","BOARD_PADDING","p._scroll","bHeight","hLimitA","hLimitB","vLimitA","vLimitB","p._bindEvent","dResizeScrollBar","Entry.Board","_magnetMap","ANIMATION_DURATION","_initContextOptions","OPTION_PASTE","OPTION_ALIGN","OPTION_CLEAR","_activatedBlockView","isOverlay","generateButtons","p.setMagnetedBlock","magnetType","mouseWheel","_contextOptions","clipboard","activated","p.mouseWheel","wheelDeltaX","alignThreads","p.alignThreads","acculmulatedTop","columWidth","limitTopPosition","verticalGap","relativeOffset","btnWrapper","p.generateButtons","saveText","cancelText","saveButton","cancelButton","onclick","saveButton.onclick","saveText.onclick","cancelButton.onclick","cancelText.onclick","p.cancelEdit","p.save","p.generateCodeMagnetMap","targetType","metaData","_getCodeBlocks","MAX_VALUE","pointData","includeData","startBlock","endPoint","p._getCodeBlocks","_getNextMagnets","_getPreviousMagnets","_getFieldMagnets","_getOutputMagnets","p._getNextMagnets","statementBlocks","cursorX","cursorY","p._getPreviousMagnets","p._getFieldMagnets","_getFieldBlockMetaData","p._getFieldBlockMetaData","contentBlock","endY","contentBlockView","p._getOutputMagnets","_getOutputMetaData","p._getOutputMetaData","p.getNearestMagnet","targetArray","minIndex","maxIndex","searchValue","leftOffset","resultBlock","_removeActivated","p._removeActivated","p.activateBlock","blockX","blockY","targetThread","insertToTop","targetObj","adjustThreadsPosition","p.adjustThreadsPosition","p._initContextOptions","activateContextOption","p.activateContextOption","deActivateContextOption","p.deActivateContextOption","Entry.skeleton","basic","marginBottom","basic_event","basic_loop","statementHeight","basic_define","pebble_event","pebble_loop","pebble_basic","morph","basic_string_field","basic_boolean_field","basic_param","basic_without_next","basic_double_loop","height1","height2","statementHeight1","statementHeight2","contentHeight1","contentHeight2","Entry.Thread","handleChange","_event","isDummy","ThreadView","insertByBlock","p.insertByBlock","newBlocks","p.insertToTop","cloned","p.getBlock","p.getBlocks","p.handleChange","setCode","p.setCode","p.getFirstBlock","p.getLastBlock","getRootBlock","p.getRootBlock","p.getCount","indexOfStatements","topBlock","Entry.Block","MAGNET_RANGE","MAGNET_OFFSET","DELETABLE_TRUE","DELETABLE_FALSE","loadSchema","changeSchema","p.changeSchema","p.getSchema","p.loadSchema","funcs","thisParams","paramInjected","p.setThread","insertAfter","p.insertAfter","p._updatePos","p.moveTo","setMovable","p.setMovable","setCopyable","p.setCopyable","p.isMovable","p.isCopyable","setDeletable","p.setDeletable","p.isDeletable","p.isReadOnly","doAdd","p.doAdd","doMove","p.doMove","p.doSeparate","p.doInsert","p.doDestroy","p.doDestroyBelow","p.copy","p.copyToClipboard","p.getOutputBlock","paramDef","p.getTerminateOutputBlock","p.getBlockType","p.indexOfStatements","p.targetPointer","Entry.ThreadView","prevBlockView","p.requestPartHeight","forAll","p.setZIndex","FieldTrashcan","Entry.FieldTrashcan","setBoard","dragBlockObserver","isOver","setPosition","trashcanTop","updateDragBlock","p.updateDragBlock","tAnimation","checkBlock","p.checkBlock","boardOffset","getPosition","trashcanX","trashcanY","p.setPosition","_x","_y","p.getPosition","p.tAnimation","animation","trashTop","translateX","translateY","rotateZ","p.setBoard","_dragBlockObserver","Vim","Entry.Vim","_blockParser","eventset","p.createDom","eventDragEnd","_self","dragFunctions","leave","testArr","lastLine","replaceSelection","getCursor","indentLine","eventDragOver","over","lineNumbers","globalVars","theme","indentUnit","styleActiveLine","extraKeys","Tab","spaces","getOption","lint","viewportMargin","getDoc","textToCode","p.textToCode","codeToText","p.codeToText","p.getCodeToText","Entry.Workspace","trashcan","vimBoard","getSelectedBoard","p.getSelectedBoard","p.getBlockMenu","getVimBoard","p.getVimBoard","p.getMode","p.setMode","oldMode","overlayBoard","initOverlayBoard","changeBoardCode","p.changeBoardCode","p.changeOverlayBoardCode","changeBlockMenuCode","p.changeBlockMenuCode","changedCode","_setSelectedBlockView","p._setSelectedBlockView","p.initOverlayBoard","_handleChangeBoard","p._handleChangeBoard","Entry.Playground","enableArduino","isTextBGMode_","injectText","updateHW","Entry.Playground.prototype.generateView","tabView","tabView_","curtainView","cannot_edit_click_to_stop","curtainView_","pictureView","generatePictureView","pictureView_","textView","generateTextView","soundView","generateSoundView","soundView_","defaultView","generateDefaultView","defaultView_","generateCodeView","codeView_","ment","resizeHandle","initializeResizeHandle","Entry.Playground.prototype.generateDefaultView","Entry.Playground.prototype.generateTabView","tabList","tabList_","tabViewElements","codeTab","tab_code","pictureTab","tab_picture","textboxTab","tab_text","soundTab","tab_sound","variableTab","tab_attribute","Entry.Playground.prototype.generateCodeView","variableView_","blockMenuView","Entry.Playground.prototype.generatePictureView","PictureView","pictureAdd","innerPictureAdd","picture_add","pictureList","movePicture","pictureListView_","Entry.Playground.prototype.generateTextView","wrap","textProperties","fontWrapper","fontName.onchange","fontName_","textButtons","alignLeftBtn","setFontAlign","alignCenterBtn","alignRightBtn","boldWrap","boldButton","isBold","boldImage","underLineWrap","underLineButton","underLineState","underLineImage","italicWrap","italicButton","isItalic","italicImage","strikeWrap","strikeButton","strikeState","strikeImage","foregroundWrap","foregroundButton","toggleColourChooser","foregroundImage","backgroundWrap","backgroundButton","fgColorDiv","bgColorDiv","coloursWrapper","colours","cell","setTextColour","backgroundsWrapper","setBackgroundColour","textEditInput","textEditInput.onkeyup","textEditInput.onblur","textEditArea","textEditArea.onkeyup","textEditArea.onblur","fontSizeWrapper","fontSizeSlider","fontSizeIndiciator","fontSizeKnob","fontSizeLabel","isFontSizing","resizeOffset","fontSizeKnob.onmousedown","linebreakWrapper","linebreakHorizontal","linebreakButtons","linebreakOffImage","toggleLineBreak","linebreakDescTitle","linebreak_off_desc_1","linebreakDescList1","linebreak_off_desc_2","linebreakDescList2","linebreak_off_desc_3","linebreakOnImage","linebreak_on_desc_1","linebreak_on_desc_2","linebreak_on_desc_3","linebreakDescription","linebreakDescUL","Entry.Playground.prototype.generateSoundView","SoundView","soundAdd","innerSoundAdd","sound_add","soundList","moveSound","soundListView_","Entry.Playground.prototype.injectObject","injectCode","Entry.Playground.prototype.injectCode","adjustScroll","Entry.Playground.prototype.adjustScroll","xc","yc","vScroll","scrollbar","hScroll","svgGroup_","getMetrics","removeAllRanges","metrics","contentLeft","contentTop","viewWidth","viewHeight","Entry.Playground.prototype.injectPicture","orderHolder","Entry.Playground.prototype.addPicture","NotForView","tempPicture","Entry.Playground.prototype.setPicture","$element","sizeView","clonePicture","Entry.Playground.prototype.clonePicture","sourcePicture","Entry.Playground.prototype.selectPicture","objectId_","Entry.Playground.prototype.movePicture","Entry.Playground.prototype.injectText","isUnderLine","isStrike","bgColour","eq","Entry.Playground.prototype.injectSound","Entry.Playground.prototype.moveSound","updateListViewOrder","Entry.Playground.prototype.addSound","tempSound","Entry.Playground.prototype.changeViewMode","viewType","views","toggleOffVariableView","Entry.Playground.prototype.createVariableView","Entry.Playground.prototype.toggleOnVariableView","hideBlockMenu","Entry.Playground.prototype.toggleOffVariableView","showBlockMenu","editBlock","Entry.Playground.prototype.editBlock","restoreBlock","mouseupBlock","Entry.Playground.prototype.mouseupBlock","Entry.Playground.prototype.restoreBlock","blockString","Entry.Playground.prototype.setMenu","currentObjectType","Entry.Playground.prototype.hideTabs","hideTab","Entry.Playground.prototype.hideTab","Entry.Playground.prototype.showTabs","showTab","Entry.Playground.prototype.showTab","Entry.Playground.prototype.initializeResizeHandle","handle.onmousedown","Entry.Playground.prototype.reloadPlayground","Entry.Playground.prototype.flushPlayground","Entry.Playground.prototype.refreshPlayground","Entry.Playground.prototype.updateListViewOrder","Entry.Playground.prototype.generatePictureElement","nameViewBlur","nameViewArray","shape_remove_ok","shape_remove_ok_msg","shape_remove_fail","shape_remove_fail_msg","divider","context_download","encodeURIComponent","nameView.onkeypress","Entry.Playground.prototype.generateSoundElement","sound_remove_ok","sound_remove_ok_msg","sound_remove_fail","isPlaying","soundInstance","nameView.onblur","lengthView","Entry.Playground.prototype.toggleColourChooser","Entry.Playground.prototype.setTextColour","Entry.Playground.prototype.setBackgroundColour","isTextBGMode","Entry.Playground.prototype.isTextBGMode","Entry.Playground.prototype.checkVariables","forEBS","Entry.Playground.prototype.getViewMode","Entry.Playground.prototype.updateHW","Entry.Playground.prototype.toggleLineBreak","isLineBreak","Entry.Playground.prototype.setFontAlign","Entry.Playground.prototype.hideBlockMenu","Entry.Playground.prototype.showBlockMenu","isTypeOf","Entry.Xml.isTypeOf","typeName","Entry.Xml.getNextBlock","getStatementBlock","Entry.Xml.getStatementBlock","getParentLoop","Entry.Xml.getParentLoop","getParentIterateLoop","Entry.Xml.getParentIterateLoop","getParentBlock","Entry.Xml.getParentBlock","Entry.Xml.callReturn","parentBlock","isRootBlock","Entry.Xml.isRootBlock","Entry.Xml.getValue","Entry.Xml.getNumberValue","operate","Entry.Xml.getField","Entry.Xml.getNumberField","Entry.Xml.getBooleanValue","Entry.Xml.operate","Entry.Xml.cloneBlock","linkNode","clonedBlock","Entry.Youtube"] } diff --git a/extern/blockly/core/block_menu.js b/extern/blockly/core/block_menu.js index 0aa744934d..f98d8081c6 100644 --- a/extern/blockly/core/block_menu.js +++ b/extern/blockly/core/block_menu.js @@ -293,7 +293,7 @@ Blockly.BlockMenu.prototype.unbanClass = function(className) { Blockly.BlockMenu.prototype.checkBanClass = function(blockInfo) { var isNotFor = blockInfo.isNotFor; for (var i in this.bannedClass) { - if (isNotFor.indexOf(this.bannedClass[i]) > -1) + if (isNotFor && isNotFor.indexOf(this.bannedClass[i]) > -1) return true; } return false; diff --git a/extern/lang/code.js b/extern/lang/code.js new file mode 100644 index 0000000000..944d03c70d --- /dev/null +++ b/extern/lang/code.js @@ -0,0 +1,3238 @@ +var Lang = {}; +Lang.category = { + "name": "ko" +}; +Lang.type = "ko"; +Lang.en = "English"; +Lang.Blocks = { + "ARDUINO": "하드웨어", + "ARDUINO_download_connector": "Download Arduino Connector", + "ARDUINO_download_source": "Entry Arduino code", + "ARDUINO_reconnect": "Connect Hardware", + "ARDUINO_connected": "Hardware connected", + "ARDUINO_arduino_get_number_1": "신호", + "ARDUINO_arduino_get_number_2": "의 숫자 결과값", + "ARDUINO_arduino_get_sensor_number_0": "0", + "ARDUINO_arduino_get_sensor_number_1": "1", + "ARDUINO_arduino_get_sensor_number_2": "2", + "ARDUINO_arduino_get_sensor_number_3": "3", + "ARDUINO_arduino_get_sensor_number_4": "4", + "ARDUINO_arduino_get_sensor_number_5": "5", + "BITBRICK_light": "light", + "BITBRICK_IR": "IR", + "BITBRICK_touch": "touch", + "BITBRICK_potentiometer": "potentiometer", + "BITBRICK_MIC": "MIC", + "BITBRICK_UserSensor": "UserSensor", + "BITBRICK_dc_direction_ccw": "CCW", + "BITBRICK_dc_direction_cw": "CW", + "CODEino_get_sensor_number_0": "0", + "CODEino_get_sensor_number_1": "1", + "CODEino_get_sensor_number_2": "2", + "CODEino_get_sensor_number_3": "3", + "CODEino_get_sensor_number_4": "4", + "CODEino_get_sensor_number_5": "5", + "CODEino_get_sensor_number_6": "6", + "CODEino_sensor_name_0": "Sound", + "CODEino_sensor_name_1": "Light", + "CODEino_sensor_name_2": "Slider", + "CODEino_sensor_name_3": "resistance-A", + "CODEino_sensor_name_4": "resistance-B", + "CODEino_sensor_name_5": "resistance-C", + "CODEino_sensor_name_6": "resistance-D", + "CODEino_string_1": " Sensor value ", + "CODEino_string_2": " Operation ", + "CODEino_string_3": "Push button", + "CODEino_string_4": "Connected A", + "CODEino_string_5": "Connected B", + "CODEino_string_6": "Connected C", + "CODEino_string_7": "Connected D", + "CODEino_string_8": " 3-AXIS Accelerometer ", + "CODEino_string_9": "-axis value ", + "CODEino_string_10": "Sound is ", + "CODEino_string_11": "Great", + "CODEino_string_12": "Small", + "CODEino_string_13": "Light is ", + "CODEino_string_14": "Bright", + "CODEino_string_15": "Dark", + "CODEino_string_16": "Left tilt", + "CODEino_string_17": "Right tilt", + "CODEino_string_18": "Front tilt", + "CODEino_string_19": "Rear tilt", + "CODEino_string_20": "Reverse", + "CODEino_accelerometer_X": "X", + "CODEino_accelerometer_Y": "Y", + "CODEino_accelerometer_Z": "Z", + "ARDUINO_arduino_get_string_1": "신호", + "ARDUINO_arduino_get_string_2": "의 글자 결과값", + "ARDUINO_arduino_send_1": "신호", + "ARDUINO_arduino_send_2": "보내기", + "ARDUINO_num_sensor_value_1": "아날로그", + "ARDUINO_num_sensor_value_2": "번 센서값", + "ARDUINO_get_digital_value_1": "디지털", + "ARDUINO_num_pin_1": "Digital", + "ARDUINO_num_pin_2": "Pin", + "ARDUINO_toggle_pwm_1": "Digital", + "ARDUINO_toggle_pwm_2": "Pin", + "ARDUINO_toggle_pwm_3": "", + "ARDUINO_on": "On", + "ARDUINO_convert_scale_1": "Map Value", + "ARDUINO_convert_scale_2": "", + "ARDUINO_convert_scale_3": "~", + "ARDUINO_convert_scale_4": "to", + "ARDUINO_convert_scale_5": "~", + "ARDUINO_convert_scale_6": "", + "ARDUINO_off": "Off", + "brightness": "밝기", + "BRUSH": "붓", + "BRUSH_brush_erase_all": "this.brush.removeAll()", + "BRUSH_change_opacity_1": "this.brush.opacity +=", + "BRUSH_change_opacity_2": "", + "BRUSH_change_thickness_1": "this.brush.thickness +=", + "BRUSH_change_thickness_2": "", + "BRUSH_set_color_1": "this.brush.color =", + "BRUSH_set_color_2": "", + "BRUSH_set_opacity_1": "this.brush.opacity =", + "BRUSH_set_opacity_2": "", + "BRUSH_set_random_color": "this.brush.color = Entry.getRandomColor()", + "BRUSH_set_thickness_1": "this.brush.thickness =", + "BRUSH_set_thickness_2": "", + "BRUSH_stamp": "Stamp", + "BRUSH_start_drawing": "this.startDraw()", + "BRUSH_stop_drawing": "this.stopDraw()", + "CALC": "계산", + "CALC_calc_mod_1": "Entry.getMod(", + "CALC_calc_mod_2": ",", + "CALC_calc_mod_3": ")", + "CALC_calc_operation_of_1": "Entry.calculate(", + "CALC_calc_operation_of_2": ",", + "CALC_calc_operation_root": "루트", + "CALC_calc_operation_square": "제곱", + "CALC_calc_rand_1": "Entry.getRandomNumber(", + "CALC_calc_rand_2": ",", + "CALC_calc_rand_3": ")", + "CALC_calc_share_1": "Entry.getShare(", + "CALC_calc_share_2": ",", + "CALC_calc_share_3": ")", + "CALC_coordinate_mouse_1": "Entry.getMousePosition(", + "CALC_coordinate_mouse_2": ")", + "CALC_coordinate_object_1": "Entry.getPosition(", + "CALC_coordinate_object_2": ",", + "CALC_coordinate_object_3": ")", + "CALC_distance_something_1": "Entry.getDistance(this,", + "CALC_distance_something_2": ")", + "CALC_get_angle": "각도값", + "CALC_get_date_1": "Entry.getDate(", + "CALC_get_date_2": ")", + "CALC_get_date_day": "일", + "CALC_get_date_hour": "시각(시)", + "CALC_get_date_minute": "시각(분)", + "CALC_get_date_month": "월", + "CALC_get_date_second": "시각(초)", + "CALC_get_date_year": "연도", + "CALC_get_sound_duration_1": "Entry.getSoundDuration(", + "CALC_get_sound_duration_2": ")", + "CALC_get_timer_value": "Entry.getTimerValue()", + "CALC_get_x_coordinate": "this.x", + "CALC_get_y_coordinate": "this.y", + "CALC_timer_reset": "Entry.resetTimer()", + "CALC_timer_visible_1": "Entry.timerVisible(", + "CALC_timer_visible_2": ")", + "CALC_timer_visible_show": "Show", + "CALC_timer_visible_hide": "Hide", + "color": "색깔", + "FLOW": "흐름", + "FLOW__if_1": "if (", + "FLOW__if_2": ")", + "FLOW_create_clone_1": "Entry.createClone(", + "FLOW_create_clone_2": ")", + "FLOW_delete_clone": "Entry.removeClone(this)", + "FLOW_delete_clone_all": "Entry.removeAllClone()", + "FLOW_if_else_1": "if (", + "FLOW_if_else_2": ")", + "FLOW_if_else_3": "else", + "FLOW_repeat_basic_1": "for ( i = 0", + "FLOW_repeat_basic_2": ")", + "FLOW_repeat_basic_errorMsg": "", + "FLOW_repeat_inf": "while(true)", + "FLOW_restart": "Entry.restart()", + "FLOW_stop_object_1": "Entry.stop(", + "FLOW_stop_object_2": ")", + "FLOW_stop_object_all": "모두", + "FLOW_stop_object_this_object": "this.", + "FLOW_stop_object_this_thread": "이 코드", + "FLOW_stop_object_other_thread": "자신의 다른 코드", + "FLOW_stop_repeat": "break", + "FLOW_stop_run": "프로그램 끝내기", + "FLOW_wait_second_1": "Entry.wait(", + "FLOW_wait_second_2": ")", + "FLOW_wait_until_true_1": "while (", + "FLOW_wait_until_true_2": "!= true) { }", + "FLOW_when_clone_start": "Entry.addEventListener('clone_created')", + "FUNC": "함수", + "JUDGEMENT": "판단", + "JUDGEMENT_boolean_and": "&&", + "JUDGEMENT_boolean_not_1": "if (!", + "JUDGEMENT_boolean_not_2": ")", + "JUDGEMENT_boolean_or": "||", + "JUDGEMENT_false": "false", + "JUDGEMENT_is_clicked": "Entry.addEventListener('mouse_clicked')", + "JUDGEMENT_is_press_some_key_1": "Entry.isKeyPressed(", + "JUDGEMENT_is_press_some_key_2": ")", + "JUDGEMENT_reach_something_1": "Entry.isCollide(this,", + "JUDGEMENT_reach_something_2": ")", + "JUDGEMENT_true": "true", + "LOOKS": "생김새", + "LOOKS_change_scale_percent_1": "this.scale +=", + "LOOKS_change_scale_percent_2": "", + "LOOKS_change_to_next_shape": "this.setToNextShape()", + "LOOKS_change_to_nth_shape_1": "this.setShape(", + "LOOKS_change_to_nth_shape_2": ")", + "LOOKS_change_shape_prev": "Prev", + "LOOKS_change_shape_next": "Next", + "LOOKS_change_to_near_shape_1": "this.setTo", + "LOOKS_change_to_near_shape_2": "Shape()", + "LOOKS_dialog_1": "this.setDialog(", + "LOOKS_dialog_2": ",", + "LOOKS_dialog_3": ")", + "LOOKS_dialog_time_1": "this.setDialogByTime(", + "LOOKS_dialog_time_2": ",", + "LOOKS_dialog_time_3": ",", + "LOOKS_dialog_time_4": ")", + "LOOKS_erase_all_effects": "this.removeAllEffects()", + "LOOKS_flip_x": "this.flip('vertical')", + "LOOKS_flip_y": "this.flip('horizontal')", + "LOOKS_hide": "this.hide()", + "LOOKS_remove_dialog": "this.removeDialog()", + "LOOKS_set_effect_1": "this.setEffect(", + "LOOKS_set_effect_2": ",", + "LOOKS_set_effect_3": ")", + "LOOKS_set_effect_volume_1": "this.addEffect(", + "LOOKS_set_effect_volume_2": ",", + "LOOKS_set_effect_volume_3": ")", + "LOOKS_set_object_order_1": "Entry.setLayerOrder(this,", + "LOOKS_set_object_order_2": ")", + "LOOKS_set_scale_percent_1": "this.scale =", + "LOOKS_set_scale_percent_2": "", + "LOOKS_show": "this.show()", + "mouse_pointer": "마우스포인터", + "MOVING": "움직임", + "MOVING_bounce_wall": "Entry.bounceWall(this)", + "MOVING_bounce_when_1": "", + "MOVING_bounce_when_2": "에 닿으면 튕기기", + "MOVING_flip_arrow_horizontal": "화살표 방향 좌우 뒤집기", + "MOVING_flip_arrow_vertical": "화살표 방향 상하 뒤집기", + "MOVING_locate_1": "this.locateAt(", + "MOVING_locate_2": ")", + "MOVING_locate_time_1": "", + "MOVING_locate_time_2": "초 동안", + "MOVING_locate_time_3": "위치로 이동하기", + "MOVING_locate_x_1": "this.x =", + "MOVING_locate_x_2": "", + "MOVING_locate_xy_1": "this.setXY(", + "MOVING_locate_xy_2": ",", + "MOVING_locate_xy_3": ")", + "MOVING_locate_xy_time_1": "this.setXYbyTime(", + "MOVING_locate_xy_time_2": ",", + "MOVING_locate_xy_time_3": ",", + "MOVING_locate_xy_time_4": ")", + "MOVING_locate_y_1": "this.y =", + "MOVING_locate_y_2": "", + "MOVING_move_direction_1": "Entry.moveToDirection(", + "MOVING_move_direction_2": ")", + "MOVING_move_direction_angle_1": "Entry.moveToDirection(", + "MOVING_move_direction_angle_2": ",", + "MOVING_move_direction_angle_3": ")", + "MOVING_move_x_1": "this.x +=", + "MOVING_move_x_2": "", + "MOVING_move_xy_time_1": "this.moveXYbyTime(", + "MOVING_move_xy_time_2": ",", + "MOVING_move_xy_time_3": ",", + "MOVING_move_xy_time_4": ")", + "MOVING_move_y_1": "this.y +=", + "MOVING_move_y_2": "", + "MOVING_rotate_by_angle_1": "this.rotation +=", + "MOVING_rotate_by_angle_2": "", + "MOVING_rotate_by_angle_dropdown_1": "", + "MOVING_rotate_by_angle_dropdown_2": "만큼 회전하기", + "MOVING_rotate_by_angle_time_1": "this.rotateByTime(", + "MOVING_rotate_by_angle_time_2": ",", + "MOVING_rotate_by_angle_time_3": ")", + "MOVING_rotate_direction_1": "this.direction +=", + "MOVING_rotate_direction_2": "", + "MOVING_see_angle_1": "this.direction =", + "MOVING_see_angle_2": "", + "MOVING_see_angle_direction_1": "this.rotation =", + "MOVING_see_angle_direction_2": "", + "MOVING_see_angle_object_1": "this.setDirectionTo(", + "MOVING_see_angle_object_2": ")", + "MOVING_see_direction_1": "", + "MOVING_see_direction_2": "쪽 보기", + "MOVING_set_direction_by_angle_1": "this.rotation =", + "MOVING_set_direction_by_angle_2": "", + "MOVING_add_direction_by_angle_1": "this.rotation =", + "MOVING_add_direction_by_angle_2": "", + "MOVING_add_direction_by_angle_time_1": "this.rotate(", + "MOVING_add_direction_by_angle_time_2": ",", + "MOVING_add_direction_by_angle_time_3": ")", + "no_target": "대상없음", + "oneself": "자신", + "opacity": "투명도", + "SCENE": "장면", + "SOUND": "소리", + "SOUND_sound_silent_all": "Entry.silentAll()", + "SOUND_sound_something_1": "Entry.playSound(", + "SOUND_sound_something_2": ")", + "SOUND_sound_something_second_1": "Entry.playSoundByTime(", + "SOUND_sound_something_second_2": ",", + "SOUND_sound_something_second_3": ")", + "SOUND_sound_something_second_wait_1": "Entry.playSoundAndWaitByTime(", + "SOUND_sound_something_second_wait_2": ",", + "SOUND_sound_something_second_wait_3": ")", + "SOUND_sound_something_wait_1": "Entry.playSoundAndWait(", + "SOUND_sound_something_wait_2": ")", + "SOUND_sound_volume_change_1": "Entry.volume +=", + "SOUND_sound_volume_change_2": "", + "SOUND_sound_volume_set_1": "Entry.volume =", + "SOUND_sound_volume_set_2": "", + "speak": "말하기", + "START": "시작", + "START_add_message": "신호 추가하기", + "START_delete_message": "신호 삭제하기", + "START_message_cast": "신호 보내기", + "START_message_cast_1": "Entry.dispatchEvent(", + "START_message_cast_2": ")", + "START_message_cast_wait": ")", + "START_message_send_wait_1": "Entry.dispatchEventAndWait(", + "START_message_send_wait_2": ")", + "START_mouse_click_cancled": "Entry.addEventListener('mouseup')", + "START_mouse_clicked": "Entry.addEventListener('mousedown')", + "START_press_some_key_1": "Entry.addEventListener('keydown', key==", + "START_press_some_key_2": ")", + "START_press_some_key_down": "아래쪽 화살표", + "START_press_some_key_enter": "엔터", + "START_press_some_key_left": "왼쪽 화살표", + "START_press_some_key_right": "오른쪽 화살표", + "START_press_some_key_space": "스페이스", + "START_press_some_key_up": "위쪽 화살표", + "START_when_message_cast": "신호를 받았을 때", + "START_when_message_cast_1": "Entry.addEventListener(", + "START_when_message_cast_2": ")", + "START_when_object_click": "this.addEventListener('mousedown')", + "START_when_object_click_canceled": "this.addEventListener('mouseup')", + "START_when_run_button_click": "Entry.addEventListener('run')", + "START_when_scene_start": "장면이 시작했을때", + "START_when_some_key_click": "키를 눌렀을 때", + "TEXT": "글상자", + "TEXT_text": "Entry", + "TEXT_text_append_1": "Entry.appendText(", + "TEXT_text_append_2": ")", + "TEXT_text_flush": "Entry.clearText()", + "TEXT_text_prepend_1": "Entry.insertText(", + "TEXT_text_prepend_2": ")", + "TEXT_text_write_1": "Entry.writeText(", + "TEXT_text_write_2": ")", + "VARIABLE": "자료", + "VARIABLE_add_value_to_list": "항목을 리스트에 추가하기", + "VARIABLE_add_value_to_list_1": "Entry.pushValueToList(", + "VARIABLE_add_value_to_list_2": ",", + "VARIABLE_add_value_to_list_3": ")", + "VARIABLE_ask_and_wait_1": "Entry.askAndWait(", + "VARIABLE_ask_and_wait_2": ")", + "VARIABLE_change_value_list_index": "항목을 바꾸기", + "VARIABLE_change_value_list_index_1": "Entry.changeValueListAt(", + "VARIABLE_change_value_list_index_3": ",", + "VARIABLE_change_value_list_index_2": ",", + "VARIABLE_change_value_list_index_4": ")", + "VARIABLE_change_variable": "변수 더하기", + "VARIABLE_change_variable_1": "Entry.addValueToVariable(", + "VARIABLE_change_variable_2": ",", + "VARIABLE_change_variable_3": ")", + "VARIABLE_change_variable_name": "변수 이름 바꾸기", + "VARIABLE_combine_something_1": "Entry.concat(", + "VARIABLE_combine_something_2": ",", + "VARIABLE_combine_something_3": ")", + "VARIABLE_get_canvas_input_value": "Entry.getAnswer()", + "VARIABLE_get_variable": "변수값", + "VARIABLE_get_variable_1": "Entry.getVariableValue(", + "VARIABLE_get_variable_2": ")", + "VARIABLE_get_y": "Y 좌푯값", + "VARIABLE_hide_list": "리스트 숨기기", + "VARIABLE_hide_list_1": "Entry.hideList(", + "VARIABLE_hide_list_2": ")", + "VARIABLE_hide_variable": "변수값 숨기기", + "VARIABLE_hide_variable_1": "Entry.hideVariable(", + "VARIABLE_hide_variable_2": ")", + "VARIABLE_insert_value_to_list": "항목을 넣기", + "VARIABLE_insert_value_to_list_1": "Entry.pushValueToListAt(", + "VARIABLE_insert_value_to_list_2": ",", + "VARIABLE_insert_value_to_list_3": ",", + "VARIABLE_insert_value_to_list_4": ")", + "VARIABLE_length_of_list": "리스트의 길이", + "VARIABLE_length_of_list_1": "Entry.getLength(", + "VARIABLE_length_of_list_2": ")", + "VARIABLE_list": "리스트", + "VARIABLE_make_variable": "변수 만들기", + "VARIABLE_list_option_first": "FIRST", + "VARIABLE_list_option_last": "LAST", + "VARIABLE_list_option_random": "RANDOM", + "VARIABLE_remove_value_from_list": "항목을 삭제하기", + "VARIABLE_remove_value_from_list_1": "Entry.removeValueListAt(", + "VARIABLE_remove_value_from_list_2": ",", + "VARIABLE_remove_value_from_list_3": ")", + "VARIABLE_remove_variable": "변수 삭제", + "VARIABLE_set_variable": "변수 정하기", + "VARIABLE_set_variable_1": "Entry.setValueVariable(", + "VARIABLE_set_variable_2": ",", + "VARIABLE_set_variable_3": ")", + "VARIABLE_show_list": "리스트 보이기", + "VARIABLE_show_list_1": "Entry.showList(", + "VARIABLE_show_list_2": ")", + "VARIABLE_show_variable": "변수값 보이기", + "VARIABLE_show_variable_1": "Entry.showVariable(", + "VARIABLE_show_variable_2": ")", + "VARIABLE_value_of_index_from_list": "리스트 항목의 값", + "VARIABLE_value_of_index_from_list_1": "Entry.getListValueAt(", + "VARIABLE_value_of_index_from_list_2": ",", + "VARIABLE_value_of_index_from_list_3": ")", + "HAMSTER_hand_found": "Entry.Hamster.isHandFound()", + "HAMSTER_sensor_leftProximity": "Entry.Hamster.getLeftProximity()", + "HAMSTER_sensor_rightProximity": "Entry.Hamster.getRightProximity()", + "HAMSTER_sensor_leftFloor": "Entry.Hamster.getLeftFloor()", + "HAMSTER_sensor_rightFloor": "Entry.Hamster.getRightFloor()", + "HAMSTER_sensor_accelerationX": "Entry.Hamster.getAccelerationX()", + "HAMSTER_sensor_accelerationY": "Entry.Hamster.getAccelerationY()", + "HAMSTER_sensor_accelerationZ": "Entry.Hamster..getAccelerationZ()", + "HAMSTER_sensor_light": "Entry.Hamster.getLight()", + "HAMSTER_sensor_temperature": "Entry.Hamster.getTemperature()", + "HAMSTER_sensor_signalStrength": "Entry.Hamster.getSignalStrength()", + "HAMSTER_sensor_inputA": "Entry.Hamster.getInputA()", + "HAMSTER_sensor_inputB": "Entry.Hamster.getInputB()", + "HAMSTER_move_forward_once": "Entry.Hamster.moveForwardOnceOnBoard()", + "HAMSTER_turn_once_1": "Entry.Hamster.turnOnceOnBoard('", + "HAMSTER_turn_once_2": "')", + "HAMSTER_move_forward": "move forward", + "HAMSTER_move_backward": "move backward", + "HAMSTER_turn_around_1": "turn", + "HAMSTER_turn_around_2": "", + "HAMSTER_move_forward_for_secs_1": "move forward for", + "HAMSTER_move_forward_for_secs_2": "secs", + "HAMSTER_move_backward_for_secs_1": "move backward", + "HAMSTER_move_backward_for_secs_2": "secs", + "HAMSTER_turn_for_secs_1": "turn", + "HAMSTER_turn_for_secs_2": "for", + "HAMSTER_turn_for_secs_3": "secs", + "HAMSTER_change_both_wheels_by_1": "change wheel by left:", + "HAMSTER_change_both_wheels_by_2": "right:", + "HAMSTER_change_both_wheels_by_3": "", + "HAMSTER_set_both_wheels_to_1": "set wheel to left:", + "HAMSTER_set_both_wheels_to_2": "right:", + "HAMSTER_set_both_wheels_to_3": ")", + "HAMSTER_change_wheel_by_1": "Entry.Hamster.changeWheelBy('", + "HAMSTER_change_wheel_by_2": "',", + "HAMSTER_change_wheel_by_3": ")", + "HAMSTER_set_wheel_to_1": "Entry.Hamster.setWheelTo('", + "HAMSTER_set_wheel_to_2": "',", + "HAMSTER_set_wheel_to_3": ")", + "HAMSTER_follow_line_using_1": "Entry.Hamster.followLineUsingFloorSensor('", + "HAMSTER_follow_line_using_2": "','", + "HAMSTER_follow_line_using_3": "')", + "HAMSTER_follow_line_until_1": "Entry.Hamster.followLineUntilIntersection('", + "HAMSTER_follow_line_until_2": "','", + "HAMSTER_follow_line_until_3": "')", + "HAMSTER_set_following_speed_to_1": "Entry.Hamster.setFollowingSpeedTo(", + "HAMSTER_set_following_speed_to_2": ")", + "HAMSTER_front": "front", + "HAMSTER_rear": "rear", + "HAMSTER_stop": "stop", + "HAMSTER_set_led_to_1": "Entry.Hamster.setLedTo('", + "HAMSTER_set_led_to_2": "','", + "HAMSTER_set_led_to_3": "')", + "HAMSTER_clear_led_1": "Entry.Hamster.clearLed('", + "HAMSTER_clear_led_2": "')", + "HAMSTER_color_cyan": "cyan", + "HAMSTER_color_magenta": "magenta", + "HAMSTER_color_black": "black", + "HAMSTER_beep": "Entry.Hamster.beep()", + "HAMSTER_change_buzzer_by_1": "change buzzer by", + "HAMSTER_change_buzzer_by_2": "", + "HAMSTER_set_buzzer_to_1": "set buzzer to", + "HAMSTER_set_buzzer_to_2": "", + "HAMSTER_clear_buzzer": "clear buzzer", + "HAMSTER_play_note_for_1": "Entry.Hamster.playNoteForBeats('", + "HAMSTER_play_note_for_2": "',", + "HAMSTER_play_note_for_3": ",", + "HAMSTER_play_note_for_4": ")", + "HAMSTER_rest_for_1": "Entry.Hamster.restForBeats(", + "HAMSTER_rest_for_2": ")", + "HAMSTER_change_tempo_by_1": "Entry.Hamster.changeTempoBy(", + "HAMSTER_change_tempo_by_2": ")", + "HAMSTER_set_tempo_to_1": "Entry.Hamster.setTempoTo(", + "HAMSTER_set_tempo_to_2": ")", + "HAMSTER_set_port_to_1": "Entry.Hamster.setPortTo('", + "HAMSTER_set_port_to_2": "','", + "HAMSTER_set_port_to_3": "')", + "HAMSTER_change_output_by_1": "Entry.Hamster.changeOutputBy('", + "HAMSTER_change_output_by_2": "',", + "HAMSTER_change_output_by_3": ")", + "HAMSTER_set_output_to_1": "Entry.Hamster.setOutputTo('", + "HAMSTER_set_output_to_2": "',", + "HAMSTER_set_output_to_3": ")", + "HAMSTER_port_a": "A", + "HAMSTER_port_b": "B", + "HAMSTER_port_ab": "AB", + "HAMSTER_analog_input": "AnalogInput", + "HAMSTER_digital_input": "DigitalInput", + "HAMSTER_servo_output": "ServoOutput", + "HAMSTER_pwm_output": "PwmOutput", + "HAMSTER_digital_output": "DigitalOutput", + "ALBERT_hand_found": "Entry.Albert.isHandFound()", + "ALBERT_sensor_leftProximity": "Entry.Albert.getLeftProximity()", + "ALBERT_sensor_rightProximity": "Entry.Albert.getRightProximity()", + "ALBERT_sensor_light": "Entry.Albert.getLight()", + "ALBERT_sensor_battery": "Entry.Albert.getBattery()", + "ALBERT_sensor_signalStrength": "Entry.Albert.getSignalStrength()", + "ALBERT_sensor_frontOid": "Entry.Albert.getFrontOid()", + "ALBERT_sensor_backOid": "Entry.Albert.getBackOid()", + "ALBERT_sensor_positionX": "Entry.Albert.getPositionX()", + "ALBERT_sensor_positionY": "Entry.Albert.getPositionY()", + "ALBERT_sensor_orientation": "Entry.Albert.getOrientation()", + "ALBERT_move_forward": "Entry.Albert.moveForward()", + "ALBERT_move_backward": "Entry.Albert.moveBackward()", + "ALBERT_turn_around_1": "Entry.Albert.turn('", + "ALBERT_turn_around_2": "')", + "ALBERT_move_forward_for_secs_1": "Entry.Albert.moveForwardForSecs(", + "ALBERT_move_forward_for_secs_2": ")", + "ALBERT_move_backward_for_secs_1": "Entry.Albert.moveBackwardForSecs(", + "ALBERT_move_backward_for_secs_2": ")", + "ALBERT_turn_for_secs_1": "Entry.Albert.turnForSecs('", + "ALBERT_turn_for_secs_2": "',", + "ALBERT_turn_for_secs_3": ")", + "ALBERT_change_both_wheels_by_1": "Entry.Albert.changeWheelsBy(", + "ALBERT_change_both_wheels_by_2": ",", + "ALBERT_change_both_wheels_by_3": ")", + "ALBERT_set_both_wheels_to_1": "Entry.Albert.setWheelsTo(", + "ALBERT_set_both_wheels_to_2": ",", + "ALBERT_set_both_wheels_to_3": ")", + "ALBERT_change_wheel_by_1": "Entry.Albert.changeWheelBy('", + "ALBERT_change_wheel_by_2": "',", + "ALBERT_change_wheel_by_3": ")", + "ALBERT_set_wheel_to_1": "Entry.Albert.setWheelTo('", + "ALBERT_set_wheel_to_2": "',", + "ALBERT_set_wheel_to_3": ")", + "ALBERT_stop": "Entry.Albert.stop()", + "ALBERT_set_pad_size_to_1": "Entry.Albert.setPadSizeTo(", + "ALBERT_set_pad_size_to_2": ",", + "ALBERT_set_pad_size_to_3": ")", + "ALBERT_set_eye_to_1": "Entry.Albert.setEyeTo('", + "ALBERT_set_eye_to_2": "','", + "ALBERT_set_eye_to_3": "')", + "ALBERT_clear_eye_1": "Entry.Albert.clearEye('", + "ALBERT_clear_eye_2": "')", + "ALBERT_body_led_1": "", + "ALBERT_body_led_2": "body led", + "ALBERT_front_led_1": "", + "ALBERT_front_led_2": "front led", + "ALBERT_color_cyan": "cyan", + "ALBERT_color_magenta": "magenta", + "ALBERT_beep": "Entry.Albert.beep()", + "ALBERT_change_buzzer_by_1": "Entry.Albert.changeBuzzerBy(", + "ALBERT_change_buzzer_by_2": ")", + "ALBERT_set_buzzer_to_1": "Entry.Albert.setBuzzerTo(", + "ALBERT_set_buzzer_to_2": ")", + "ALBERT_clear_buzzer": "Entry.Albert.clearBuzzer()", + "ALBERT_play_note_for_1": "Entry.Albert.playNoteForBeats('", + "ALBERT_play_note_for_2": "',", + "ALBERT_play_note_for_3": ",", + "ALBERT_play_note_for_4": ")", + "ALBERT_rest_for_1": "Entry.Albert.restForBeats(", + "ALBERT_rest_for_2": ")", + "ALBERT_change_tempo_by_1": "Entry.Albert.changeTempoBy(", + "ALBERT_change_tempo_by_2": ")", + "ALBERT_set_tempo_to_1": "Entry.Albert.setTempoTo(", + "ALBERT_set_tempo_to_2": ")", + "VARIABLE_variable": "변수", + "wall": "벽", + "robotis_common_case_01": "(을)를", + "robotis_common_set": "(으)로 정하기", + "robotis_common_value": "값", + "robotis_common_clockwhise": "시계방향", + "robotis_common_counter_clockwhise": "반시계방향", + "robotis_common_wheel_mode": "회전모드", + "robotis_common_joint_mode": "관절모드", + "robotis_common_red_color": "빨간색", + "robotis_common_green_color": "녹색", + "robotis_common_blue_color": "파란색", + "robotis_common_on": "켜기", + "robotis_common_off": "끄기", + "robotis_common_cm": "제어기", + "robotis_common_port_1": "포트 1", + "robotis_common_port_2": "포트 2", + "robotis_common_port_3": "포트 3", + "robotis_common_port_4": "포트 4", + "robotis_common_port_5": "포트 5", + "robotis_common_port_6": "포트 6", + "robotis_common_play_buzzer": "연주", + "robotis_common_play_motion": "실행", + "robotis_common_motion": "모션", + "robotis_common_index_number": "번", + "robotis_cm_custom": "직접입력 주소", + "robotis_cm_spring_left": "왼쪽 접촉 센서", + "robotis_cm_spring_right": "오른쪽 접촉 센서", + "robotis_cm_led_left": "왼쪽 LED", + "robotis_cm_led_right": "오른쪽 LED", + "robotis_cm_led_both": "양 쪽 LED", + "robotis_cm_switch": "선택 버튼 상태", + "robotis_cm_user_button": "사용자 버튼 상태", + "robotis_cm_sound_detected": "최종 소리 감지 횟수", + "robotis_cm_sound_detecting": "실시간 소리 감지 횟수", + "robotis_cm_ir_left": "왼쪽 적외선 센서", + "robotis_cm_ir_right": "오른쪽 적외선 센서", + "robotis_cm_calibration_left": "왼쪽 적외선 센서 캘리브레이션 값", + "robotis_cm_calibration_right": "오른쪽 적외선 센서 캘리브레이션 값", + "robotis_cm_clear_sound_detected": "최종소리감지횟수 초기화", + "robotis_cm_buzzer_index": "음계값", + "robotis_cm_buzzer_melody": "멜로디", + "robotis_cm_led_1": "1번 LED", + "robotis_cm_led_4": "4번 LED", + "robotis_aux_servo_position": "서보모터 위치", + "robotis_aux_ir": "적외선센서", + "robotis_aux_touch": "접촉센서", + "robotis_aux_brightness": "조도센서(CDS)", + "robotis_aux_hydro_themo_humidity": "온습도센서(습도)", + "robotis_aux_hydro_themo_temper": "온습도센서(온도)", + "robotis_aux_temperature": "온도센서", + "robotis_aux_ultrasonic": "초음파센서", + "robotis_aux_magnetic": "자석센서", + "robotis_aux_motion_detection": "동작감지센서", + "robotis_aux_color": "컬러센서", + "robotis_aux_custom": "사용자 장치", + "robotis_carCont_aux_motor_speed_1": "감속모터 속도를", + "robotis_carCont_aux_motor_speed_2": ", 출력값을", + "robotis_carCont_calibration_1": "적외선 센서 캘리브레이션 값을", + "robotis_openCM70_aux_motor_speed_1": "감속모터 속도를", + "robotis_openCM70_aux_motor_speed_2": ", 출력값을", + "robotis_openCM70_aux_servo_mode_1": "서보모터 모드를", + "robotis_openCM70_aux_servo_speed_1": "서보모터 속도를", + "robotis_openCM70_aux_servo_speed_2": ", 출력값을", + "robotis_openCM70_aux_servo_position_1": "서보모터 위치를", + "robotis_openCM70_aux_led_module_1": "LED 모듈을", + "robotis_openCM70_aux_custom_1": "사용자 장치를", + "XBOT_digital": "디지털", + "XBOT_D2_digitalInput": "D2 디지털 입력", + "XBOT_D3_digitalInput": "D3 디지털 입력", + "XBOT_D11_digitalInput": "D11 디지털 입력", + "XBOT_analog": "아날로그", + "XBOT_CDS": "광 센서 값", + "XBOT_MIC": "마이크 센서 값", + "XBOT_analog0": "아날로그 0번 핀 값", + "XBOT_analog1": "아날로그 1번 핀 값", + "XBOT_analog2": "아날로그 2번 핀 값", + "XBOT_analog3": "아날로그 3번 핀 값", + "XBOT_Value": "출력 값", + "XBOT_pin_OutputValue": "핀, 출력 값", + "XBOT_High": "높음", + "XBOT_Low": "낮음", + "XBOT_Servo": "서보 모터", + "XBOT_Head": "머리(D8)", + "XBOT_ArmR": "오른 팔(D9)", + "XBOT_ArmL": "왼 팔(D10)", + "XBOT_angle": ", 각도", + "XBOT_DC": "바퀴(DC) 모터", + "XBOT_rightWheel": "오른쪽", + "XBOT_leftWheel": "왼쪽", + "XBOT_bothWheel": "양쪽", + "XBOT_speed": ", 속도", + "XBOT_rightSpeed": "바퀴(DC) 모터 오른쪽(2) 속도:", + "XBOT_leftSpeed": "왼쪽(1) 속도:", + "XBOT_RGBLED_R": "RGB LED 켜기 R 값", + "XBOT_RGBLED_G": "G 값", + "XBOT_RGBLED_B": "B 값", + "XBOT_RGBLED_color": "RGB LED 색", + "XBOT_set": "로 정하기", + "XBOT_c": "도", + "XBOT_d": "레", + "XBOT_e": "미", + "XBOT_f": "파", + "XBOT_g": "솔", + "XBOT_a": "라", + "XBOT_b": "시", + "XBOT_melody_ms": "초 연주하기", + "XBOT_Line": "번째 줄", + "XBOT_outputValue": "출력 값", + "CALC_rotation_value": "this.getRotation()", + "CALC_direction_value": "this.getDirection()", + "VARIABLE_is_included_in_list_1": "Entry.isExistValueInList(", + "VARIABLE_is_included_in_list_2": ",", + "VARIABLE_is_included_in_list_3": ")", + "SCENE_when_scene_start": "this.addEventListener('sceneStart')", + "SCENE_start_scene_1": "Scene.changeScene(", + "SCENE_start_scene_2": ")", + "SCENE_start_neighbor_scene_1": "Scene.changeScene(", + "SCENE_start_neighbor_scene_2": ")", + "SCENE_start_scene_pre": "Scene.getPrevious()", + "SCENE_start_scene_next": "Scene.getNext()", + "FUNCTION_explanation_1": "이름", + "FUNCTION_character_variable": "문자/숫자값", + "FUNCTION_logical_variable": "판단값", + "FUNCTION_function": "함수", + "FUNCTION_define": "함수 정의하기", + "CALC_calc_operation_sin": "Math.sin(value)", + "CALC_calc_operation_cos": "Math.cos(value)", + "CALC_calc_operation_tan": "Math.tan(value)", + "CALC_calc_operation_floor": "Math.floor(value)", + "CALC_calc_operation_ceil": "Math.ceil(value)", + "CALC_calc_operation_round": "Math.round(value)", + "CALC_calc_operation_factorial": "펙토리얼값", + "CALC_calc_operation_asin": "Math.asin(value)", + "CALC_calc_operation_acos": "Math.acos(value)", + "CALC_calc_operation_atan": "Math.atan(value)", + "CALC_calc_operation_log": "로그값", + "CALC_calc_operation_ln": "자연로그값", + "CALC_calc_operation_natural": "integer value", + "CALC_calc_operation_unnatural": "소수점 부분", + "MOVING_locate_object_time_1": "", + "MOVING_locate_object_time_2": "초 동안", + "MOVING_locate_object_time_3": "위치로 이동하기", + "wall_up": "위쪽 벽", + "wall_down": "아래쪽 벽", + "wall_right": "오른쪽 벽", + "wall_left": "왼쪽 벽", + "CALC_coordinate_x_value": "x 좌푯값", + "CALC_coordinate_y_value": "y 좌푯값", + "CALC_coordinate_rotation_value": "방향", + "CALC_coordinate_direction_value": "이동방향", + "CALC_picture_index": "모양 번호", + "CALC_picture_name": "모양 이름", + "FLOW_repeat_while_true_1": "Repeat", + "FLOW_repeat_while_true_2": "", + "TUT_when_start": "Entry.addEventListener('run_button_clicked')", + "TUT_move_once": "Entry.moveOnce()", + "TUT_rotate_left": "Entry.rotateLeft()", + "TUT_rotate_right": "Entry.rotateRight()", + "TUT_jump_barrier": "Entry.jumpBarrier()", + "TUT_repeat_tutorial_1": "Entry.repeat(", + "TUT_repeat_tutorial_2": ")", + "TUT_if_barrier_1": "if (", + "TUT_if_barrier_2": ")", + "TUT_if_conical_1": "if (", + "TUT_if_conical_2": ")", + "TUT_repeat_until": "while (Entry.reachToPart()) {}", + "TUT_repeat_until_gold": "while (Entry.reachToPart()) {}", + "TUT_declare_function": "new function()", + "TUT_call_function": "call function()", + "CALC_calc_operation_abs": "절댓값", + "CONTEXT_COPY_option": "코드 복사", + "Delete_Blocks": "코드 삭제", + "Duplication_option": "코드 복사 & 붙여넣기", + "Paste_blocks": "붙여넣기", + "Clear_all_blocks": "모든 코드 삭제하기", + "transparency": "투명도", + "BRUSH_change_brush_transparency_1": "this.brush.opacity -=", + "BRUSH_change_brush_transparency_2": "", + "BRUSH_set_brush_transparency_1": "this.brush.opacity -=", + "BRUSH_set_brush_transparency_2": "", + "CALC_char_at_1": "", + "CALC_char_at_2": ".charAt(", + "CALC_char_at_3": ")", + "CALC_length_of_string_1": "", + "CALC_length_of_string_2": ".length()", + "CALC_substring_1": "", + "CALC_substring_2": ".subString(", + "CALC_substring_3": ",", + "length_of_string": "", + "CALC_substring_4": ")", + "CALC_replace_string_1": "", + "CALC_replace_string_2": ".replace(", + "CALC_replace_string_3": ",", + "CALC_replace_string_4": ")", + "CALC_change_string_case_1": "", + "CALC_change_string_case_2": "", + "CALC_change_string_case_3": " ", + "CALC_change_string_case_sub_1": ".uppercase()", + "CALC_change_string_case_sub_2": ".lowercase()", + "CALC_index_of_string_1": "", + "CALC_index_of_string_2": ".indexOf(", + "CALC_index_of_string_3": ")", + "MOVING_add_direction_by_angle_time_explain_1": "", + "MOVING_direction_relative_duration_1": "", + "MOVING_direction_relative_duration_2": "", + "MOVING_direction_relative_duration_3": "", + "CALC_get_sound_volume": "Volume", + "SOUND_sound_from_to_1": "", + "SOUND_sound_from_to_2": "", + "SOUND_sound_from_to_3": "", + "SOUND_sound_from_to_4": "", + "SOUND_sound_from_to_and_wait_1": "", + "SOUND_sound_from_to_and_wait_2": "", + "SOUND_sound_from_to_and_wait_3": "", + "SOUND_sound_from_to_and_wait_4": "", + "CALC_quotient_and_mod_1": "", + "CALC_quotient_and_mod_2": "/", + "CALC_quotient_and_mod_3": "", + "CALC_quotient_and_mod_4": " ", + "CALC_quotient_and_mod_sub_1": "몫", + "CALC_quotient_and_mod_sub_2": "나머지", + "self": "자신", + "CALC_coordinate_size_value": "크기", + "CALC_choose_project_timer_action_1": "Entry.setTimer(", + "CALC_choose_project_timer_action_2": ")", + "CALC_choose_project_timer_action_sub_1": "시작하기", + "CALC_choose_project_timer_action_sub_2": "정지하기", + "CALC_choose_project_timer_action_sub_3": "초기화하기", + "LOOKS_change_object_index_1": "Entry.setLayerOrder(this,", + "LOOKS_change_object_index_2": ")", + "LOOKS_change_object_index_sub_1": "맨 앞으로", + "LOOKS_change_object_index_sub_2": "앞으로", + "LOOKS_change_object_index_sub_3": "뒤로", + "LOOKS_change_object_index_sub_4": "맨 뒤로", + "FLOW_repeat_while_true_until": "until", + "FLOW_repeat_while_true_while": "while", + "copy_block": "블록 복사", + "delete_block": "블록 삭제", + "tidy_up_block": "블록 정리하기", + "block_hi": "안녕!", + "entry_bot_name": "", + "hi_entry": "안녕 엔트리!", + "hi_entry_en": "Hello Entry!", + "bark_dog": "강아지 짖는 소리", + "walking_entryBot": "", + "entry": "엔트리", + "hello": "안녕", + "nice": "반가워" +}; +Lang.Buttons = { + "apply": "적용하기", + "cancel": "취소", + "save": "확인", + "start": "시작", + "confirm": "확인", + "delete": "삭제", + "create": "학급 만들기", + "done": "완료", + "accept": "수락", + "refuse": "거절", + "yes": "예", + "button_no": "아니오" +}; +Lang.ko = "한국어"; +Lang.Menus = { + "helper": "도움말", + "youtube": "영상", + "tvcast": "영상", + "goal": "목표", + "basicproject": "시작단계", + "hw": "하드웨어", + "object": "오브젝트", + "download_info": "모든 교육자료는 각각의 제목을 클릭 하시면 다운받으실 수 있습니다.", + "entry_materials_all": "엔트리 교육자료 모음", + "recommand_grade": "추천학년", + "3_4_grades": "3-4 학년", + "5_6_grades": "5-6 학년", + "middle_grades": "중학생 이상", + "entry_go_go": "엔트리 고고!", + "entry_go_go_desc": "학년별, 난이도 별로 준비된 교재를 만나보세요. 각 과정별로 교육과정, 교재, 교사용 지도자료 3종 세트가 제공됩니다.", + "stage_beginner": "초급", + "stage_middle": "중급", + "stage_high": "고급", + "middle_school_short": "중등", + "learn_entry_programming": "따라하며 배우는 엔트리 프로그래밍", + "entry_programming_desc": "차근 차근 따라하다 보면 어느 새 나도 엔트리 고수!", + "ebs": "EBS", + "ebs_material_desc": "방송 영상과 교사용 지도서를 활용하여 수업을 해보세요!", + "season_1_material": "시즌1 교사용 지도서", + "season_2_material": "시즌2 교사용 지도서", + "compute_think_textbook": "교과서로 배우는 컴퓨팅 사고력", + "computational_sw": "국어, 수학, 과학, 미술... 학교에서 배우는 다양한 교과와 연계하여 sw를 배워보세요!", + "entry_x_hardware": "엔트리 X 하드웨어 교육자료 모음", + "e_sensor": "E 센서보드", + "arduino": "아두이노", + "orange_board": "오렌지보드", + "joystick": "조이스틱 쉴드", + "materials_etc_all": "기타 교육자료 모음", + "materials_teaching": "교원 연수 자료", + "materials_etc": "기타 참고 자료", + "materials_teaching_1": "SW교육의 필요성과 교육 방법론", + "materials_teaching_2": "엔트리와 함께하는 언플러그드 활동", + "materials_teaching_3": "게임으로 배우는 엔트리 학습모드 활동", + "materials_teaching_4": "실생활 문제해결을 위한 엔트리 프로그래밍", + "materials_teaching_5": "엔트리로 시작하는 교과연계sw교육1", + "materials_teaching_6": "엔트리로 시작하는 교과연계sw교육2", + "materials_teaching_7": "피지컬 컴퓨팅 실습1(E센서보드)", + "materials_teaching_8": "피지컬 컴퓨팅 실습2(햄스터)", + "materials_teaching_9": "수업에 필요한 학급/강의 기능 알아보기", + "materials_etc_1": "수업에 바로 활용할 수 있는 다양한 콘텐츠 모음집", + "materials_etc_2": "엔트리를 처음 사용하는 선생님들을 위한 가이드", + "materials_etc_3": "월간 엔트리", + "materials_etc_4": "엔트리 설명서", + "materials_etc_5": "엔트리 소개 자료", + "materials_etc_6": "엔트리 블록 책받침", + "jr_if_1": "만약", + "jr_if_2": "앞에 있다면", + "jr_fail_no_pencil": "이런 그곳에는 연필이 없어. 연필이 있는 곳에서 사용해보자~", + "jr_fail_forgot_pencil": "앗! 책가방에 넣을 연필을 깜빡했어. 연필을 모아서 가자~", + "jr_fail_much_blocks": "너무많은 블록을 사용했어, 다시 도전해볼래?", + "cparty_jr_success_1": "좋아! 책가방을 챙겼어!", + "go_right": "오른쪽", + "go_down": " 아래쪽", + "go_up": " 위쪽", + "go_left": " 왼쪽", + "go_forward": "앞으로 가기", + "jr_turn_left": "왼쪽으로 돌기", + "jr_turn_right": "오른쪽으로 돌기", + "go_slow": "천천히 가기", + "repeat_until_reach_1": "만날 때 까지 반복하기", + "repeat_until_reach_2": "", + "pick_up_pencil": "연필 줍기", + "repeat_0": "", + "repeat_1": "반복", + "when_start_clicked": "시작 버튼을 눌렀을 때", + "age_0": "작품체험", + "create_character": "캐릭터 만들기", + "age_7_9": "초등 저학년", + "going_school": "엔트리 학교가기", + "age_10_12_1": "초등 고학년1", + "collect_parts": "로봇공장 부품모으기", + "age_10_12_2": "초등 고학년2", + "driving_elec_car": "전기자동차 운전하기", + "age_13": "중등", + "travel_space": "우주여행하기", + "people": "사람", + "all": "전체", + "life": "일상생활", + "nature": "자연", + "animal_insect": "동물/곤충", + "environment": "자연환경", + "things": "사물", + "vehicles": "이동수단", + "others": "기타", + "fantasy": "판타지", + "instrument": "악기", + "piano": "피아노", + "marimba": "마림바", + "drum": "드럼", + "janggu": "장구", + "sound_effect": "효과음", + "others_instrument": "기타타악기", + "aboutEntryDesc_1": "엔트리는 누구나 무료로 소프트웨어 교육을 받을 수 있게 개발된 소프트웨어 교육 플랫폼입니다.", + "aboutEntryDesc_2": "학생들은 소프트웨어를 쉽고 재미있게 배울 수 있고,", + "aboutEntryDesc_3": "선생님은 효과적으로 학생들을 가르치고 관리할 수 있습니다.", + "aboutEntryDesc_4": "엔트리는 공공재와 같이", + "aboutEntryDesc_5": "비영리로 운영됩니다.", + "viewProjectTerms": "이용정책 보기", + "openSourceTitle": "오픈소스를 통한 생태계 조성", + "openSourceDesc_1": "엔트리의 소스코드 뿐 아니라 모든 교육", + "openSourceDesc_2": "자료는 CC라이센스를 적용하여", + "openSourceDesc_3": "공개합니다.", + "viewOpenSource": "오픈소스 보기", + "eduPlatformTitle": "국내교육 현장에 맞는 교육 플랫폼", + "eduPlatformDesc_1": "국내 교육 현장에 적합한 교육 도구가", + "eduPlatformDesc_2": "될 수 있도록 학교 선생님들과 함께", + "eduPlatformDesc_3": "개발하고 있습니다.", + "madeWith": "자문단", + "researchTitle": "다양한 연구를 통한 전문성 강화", + "researchDesc_1": "대학/학회 등과 함께 다양한 연구를", + "researchDesc_2": "진행하여 전문성을 강화해나가고", + "researchDesc_3": "있습니다.", + "viewResearch": "연구자료 보기", + "atEntry": "엔트리에서는", + "entryLearnDesc_1": "재미있게 배우는 학습공간", + "entryLearnDesc_2": "<학습하기>에서는 컴퓨터를 활용해 논리적으로 문제를 해결할 수 있는 다양한 학습", + "entryLearnDesc_3": "콘텐츠가 준비되어 있습니다. 게임을 하듯이 주어진 미션들을 컴퓨터 프로그래밍으로", + "entryLearnDesc_4": "해결하고, 동영상을 보면서 소프트웨어의 원리를 재미있게 배울 수 있습니다.", + "entryMakeDesc_1": "<만들기>에서는 미국 MIT에서 개발한 Scratch와 같은 블록형 프로그래밍 언어를", + "entryMakeDesc_2": "사용하여 처음 접하는 사람들도 쉽게 자신만의 창작물을 만들 수 있습니다.", + "entryShareDesc_1": "<공유하기>에서는 엔트리를 통해 제작한 작품을 다른 사람들과 공유할 수 있습니다. 또한", + "entryShareDesc_2": "공유된 작품이 어떻게 구성되었는지 살펴볼 수 있고, 이를 발전시켜 또 다른 작품을 만들 수", + "entryShareDesc_3": "있습니다. 또한 친구들과 협업해 더 멋진 작품을 만들 수도 있습니다.", + "entryGroup": "학급기능", + "entryGroupTitle": "우리 반 학습 공간", + "entryGroupDesc_1": "<학급기능>은 선생님께서 학급별로 학생들을 관리할 수 있는 기능입니다. 학급만의", + "entryGroupDesc_2": "학습하기, 만들기, 공유하기를 만들 수 있으며, 과제를 만들고 학생들의 결과물을 확인할", + "entryGroupDesc_3": "수 있습니다.", + "unpluggedToPhysical": "언플러그드 활동부터 피지컬 컴퓨팅까지", + "algorithmActivity": "기초 알고리즘 활동", + "programmignLang": "교육용 프로그래밍 언어", + "unpluggedDesc_1": "엔트리봇 보드게임과 카드게임을 통해 컴퓨터 없이도", + "unpluggedDesc_2": "소프트웨어의 기본 개념과 원리(순차, 반복, 선택, 함수)를 익힐 수 있습니다.", + "entryMaze": "엔트리봇 미로탈출", + "entryAI": "엔트리봇 우주여행", + "algorithmDesc_1": "게임을 하듯이 미션을 해결하고 인증서를 받아보세요.", + "algorithmDesc_2": "소프트웨어의 기본적인 원리를 쉽고 재미있게 배울 수 있습니다.", + "programmingLangDesc_1": "엔트리에서는 블록을 쌓듯이 프로그래밍을 하기 때문에 누구나 쉽게", + "programmingLangDesc_2": "자신만의 게임, 애니메이션, 미디어아트와 같은 멋진 작품을 만들고 공유할 수 있어 교육용으로 적합합니다.", + "viewSupporHw": "연결되는 하드웨어 보기", + "supportHwDesc_1": "엔트리와 피지컬 컴퓨팅 도구를 연결하면 현실세계와 상호작용하는 멋진 작품들을 만들어낼 수 있습니다.", + "supportHwDesc_2": "국내, 외 다양한 하드웨어 연결을 지원하며, 계속적으로 추가될 예정입니다.", + "entryEduSupport": "엔트리 교육 지원", + "eduSupportDesc_1": "엔트리교육연구소에서는 소프트웨어 교육을 위한 다양한 교육 자료를 제작하여 무상으로 배포하고 있습니다.", + "eduSupportDesc_2": "모든 자료는 교육자료 페이지에서 다운받으실 수 있습니다.", + "materials_1_title": "수준별 교재", + "materials_1_desc_1": "학년별 수준에 맞는 교재를 통해 차근차근", + "materials_1_desc_2": "따라하며 쉽게 엔트리를 익혀보세요!", + "materials_2_title": "EBS 방송 연계 교안", + "materials_2_desc_1": "EBS 소프트웨어야 놀자 방송과 함께 교사용", + "materials_2_desc_2": "수업 지도안을 제공합니다.", + "materials_3_title": "초, 중등 교과 연계 수업자료", + "materials_3_desc_1": "다양한 과목에서 만나는 실생활 문제를", + "materials_3_desc_2": "컴퓨팅 사고력으로 해결해 보세요.", + "moreMaterials": "더 많은 교육 자료 보러가기", + "moreInfoAboutEntry_1": "더 많은 엔트리의 소식들을 확인하고 싶다면 아래의 링크들로 접속해보세요.", + "moreInfoAboutEntry_2": "교육자료 외에도 다양한 SW 교육과 관련한 정보를 공유하고 있습니다.", + "blog": "블로그", + "post": "포스트", + "tvCast": "TV캐스트", + "albertSchool": "알버트 스쿨버전", + "arduinoBoard": "아두이노 점품보드", + "arduinoCompatible": "아두이노 호환보드", + "bitBlock": "비트블록", + "bitbrick": "비트브릭", + "codeino": "코드이노", + "e-sensor": "E-센서보드", + "hamster": "햄스터", + "littlebits": "리틀비츠", + "orangeBoard": "오렌지 보드", + "robotis_carCont": "로보티즈 로봇자동차", + "robotis_IoT": "로보티즈 IoT", + "about": "알아보기", + "articles": "토론하기", + "gallery": "구경하기", + "learn": "학습하기", + "login": "로그인", + "logout": "로그아웃", + "make": "만들기", + "register": "가입하기", + "Join": "회원가입", + "Edit_info": "내 정보 수정", + "Discuss": "글 나누기", + "Explore": "구경하기", + "Load": "불러오기", + "My_lesson": "오픈 강의", + "Resources": "교육 자료", + "play_software": "소프트웨어야 놀자", + "problem_solve": "문제 해결하기", + "Learn": "학습하기", + "teaching_tools": "엔트리 교구", + "about_entry": "엔트리 소개", + "what_entry": "엔트리는?", + "create": "만들기", + "create_new": "새로 만들기", + "start_programming": "소프트웨어 교육의 첫걸음", + "Entry": "엔트리", + "intro_learning": "누구나 쉽고 재밌게 소프트웨어를 배울 수 있어요. ", + "intro_learning_anyone": "지금 바로 시작해보세요! ", + "start_now": "For Free, Forever.", + "welcome_entry": "엔트리에 오신걸 환영합니다.", + "student": "학생", + "non_menber": "일반인", + "teacher": "선생님", + "terms_conditions": "이용약관", + "personal_information": "개인정보 수집 및 이용에 대한 안내", + "limitation_liability": "책임의 한계와 법적 고지", + "entry_agree": "엔트리의 이용약관에 동의 합니다.", + "info_agree": "개인정보 수집 및 이용에 동의합니다.", + "next": "다음", + "enter_id": "아이디 입력", + "enter_password": "비밀번호 입력", + "confirm_password": "비밀번호 확인", + "enter_password_again": "비밀번호를 한번 더 입력하세요.", + "validation_password": "5자 이상의 영문/숫자 등을 조합하세요.", + "validation_id": "4~20자의 영문/숫자를 조합하세요", + "prev": "이전", + "born_year": "태어난 연도", + "select_born": "태어난 연도를 선택 하세요", + "year": "년", + "gender": "성별", + "choose_gender": "성별을 선택 하세요", + "male": "남성", + "female": "여성", + "language": "언어", + "best_language": "주 언어를 선택 하세요", + "korean": "한국어", + "english": "영어", + "viet": "베트남", + "option_email": "이메일(선택)", + "insert_email": "이메일 주소를 입력 하세요", + "sign_up_complete": "회원 가입이 완료 되었습니다", + "agree_terms_conditions": "이용약관에 동의해 주세요.", + "agree_personal_information": "개인정보 수집 및 이용에 대한 안내에 동의해 주세요.", + "insert_studying_stage": "작품을 공유하고 싶은 그룹을 선택해 주세요.", + "insert_born_year": "태어난 연도를 입력해 주세요.", + "insert_gender": "성별을 입력해 주세요.", + "select_language": "언어를 선택해 주세요.", + "check_email": "이메일 형식을 확인해 주세요.", + "already_exist_id": "이미 존재하는 아이디 입니다.", + "id_validation_id": "아이디는 4~20자의 영문/숫자를 조합하세요", + "password_validate_pwd": "패스워드는 5자 이상의 영문/숫자 등을 조합하세요.", + "insert_same_pwd": "같은 패스워드를 입력해 주세요.", + "studying_stage_group": "작품 공유 그룹", + "studying_stage": "작품을 공유하고 싶은 그룹을 선택해 주세요.", + "password": "비밀번호 입력", + "save_id": "아이디 저장", + "forgot_password": "아이디와 비밀번호가 기억나지 않으세요 ?", + "did_not_join": "아직 엔트리 회원이 아니세요?", + "go_join": "회원가입하기 ", + "first_step": "소프트웨어 교육의 첫걸음", + "entry_content_one": "상상했던 것들을 블록 놀이하듯 하나씩 쌓아보세요.", + "entry_content_two": "게임, 애니메이션, 미디어아트와 같은 멋진 작품이 완성된답니다!", + "entry_content_three": "재미있는 놀이로 배우고, 나만의 멋진 작품을 만들어 친구들과 공유할 수 있는 멋진 엔트리의 세상으로 여러분을 초대합니다!", + "funny_space": "재미있게 배우는 학습공간", + "in_learn_section": "< 학습하기 > 에서는", + "learn_problem_solving": "컴퓨터를 활용해 논리적으로 문제를 해결할 수 있는 다양한 학습 콘텐츠가 준비되어 있습니다. 게임을 하듯이 주어진 미션들을 컴퓨터 프로그래밍으로 해결해볼 수도 있고 재미있는 동영상으로 소프트웨어의 원리를 배울 수도 있습니다 .", + "joy_create": "창작의 즐거움", + "in_make": "< 만들기 > 는", + "make_contents": "미국 MIT에서 개발한 Scratch와 같은 비주얼 프로그래밍 언어를 사용하여 프로그래밍을 처음 접하는 사람들도 쉽게 나만의 창작물을 만들 수 있습니다. 또 엔트리를 통해 만들 수 있는 컨텐츠의 모습은 무궁무진합니다. 과학 시간에 배운 물리 법칙을 실험해 볼 수도 있고 좋아하는 캐릭터로 애니메이션을 만들거나 직접 게임을 만들어 볼 수 있습니다.", + "and_content": "또 엔트리를 통해 만들 수 있는 콘텐츠의 모습은 무궁무진합니다. 과학 시간에 배운 물리 법칙을 실험해 볼 수도 있고 좋아하는 캐릭터로 애니메이션을 만들거나 직접 게임을 만들어 볼 수 있습니다.", + "share_collaborate": "공유와 협업", + "explore_contents": "< 구경하기 > 에서는 엔트리를 통해 제작한 작품을 다른 사람들과 쉽게 공유할 수 있습니다. 또한 공유된 작품이 어떻게 구성되었는지 살펴볼 수 있고, 이를 발전시켜 자신만의 프로젝트를 만들 수 있습니다. 그리고 엔트리에서는 공동 창작도 가능합니다. 친구들과 협업하여 더 멋진 프로젝트를 만들어볼 수 있습니다.", + "why_software": "왜 소프트웨어 교육이 필요할까?", + "speak_obama_contents": "컴퓨터 과학을 배우는 것은 단지 여러분의 미래에만 중요한 일이 아닙니다. 이것은 우리 미국의 미래를 위해 중요한 일 입니다.", + "obama": "버락 오바마", + "us_president": "미국 대통령", + "billgates_contents": "컴퓨터 프로그래밍은 사고의 범위를 넓혀주고 더 나은 생각을 할 수 있게 만들며 분야에 상관없이 모든 문제에 대해 새로운 해결책을 생각할 수 있는 힘을 길러줍니다.", + "billgates": "빌게이츠", + "chairman_micro": "Microsoft 회장", + "eric_contents": "현재 디지털 혁명은 지구상 대부분의 사람들에게 아직 시작도 안된 수준입니다. 프로그래밍을 통해 향후 10년간 모든 것이 변화할 것 입니다.", + "eric": "에릭 슈미츠", + "sandbug_contents": "오늘날 컴퓨터 과학에 대한 이해는 필수가 되었습니다. 우리의 국가 경쟁력은 우리가 아이들에게 이것을 얼마나 잘 가르칠 수 있느냐에 달려있습니다.", + "sandbug": "쉐릴 샌드버그", + "view_entry_tools": "엔트리와 함께할 수 있는 교구들을 살펴볼 수 있습니다.", + "solve_problem": "문제 해결하기", + "solve_problem_content": "게임을 하듯 미션을 해결해 가면서 소프트 웨어의 원리를 배웁니다.", + "find_extra_title": "엔트리봇 부품 찾기 대작전", + "all_ages": "전 연령", + "total": "총", + "step": "단계", + "find_extra_contents": "로봇 강아지를 생산하던 루츠 공장에 어느 날 갑자기 일어난 정전 사태로 태어난 특별한 강아지 엔트리 봇. 아직 조립이 덜 된 나머지 부품들을 찾아 공장을 탈출 하도록 도와주면서 소프트웨어의 동작 원리를 익혀보자!", + "software_play_contents": "EBS에서 방영한 '소프트웨어야 놀자' 프로그램을 실습해볼 수 있습니다.", + "resources_contents": "엔트리를 활용한 다양한 교육자료들을 무료로 얻을 수 있습니다.", + "from": " 출처", + "sw_camp": "미래부 SW 창의캠프", + "elementary": "초등학교", + "middle": "중학교", + "grades": "학년", + "lesson": "차시", + "sw_contents_one": "5차시 분량으로 초등학생이 엔트리와 피지컬 컴퓨팅을 경험할 수 있는 교재입니다. 학생들은 엔트리 사용법을 학습하고, 그림판과 이야기 만들기를 합니다. 마지막에는 아두이노 교구를 활용하여 키보드를 만들어보는 활동을 합니다.", + "sw_camp_detail": "미래창조과학부 SW창의캠프", + "sw_contents_two": "5차시 분량으로 중학생이 엔트리와 피지컬 컴퓨팅을 경험할 수 있는 교재입니다. 학생들은 엔트리 사용법을 학습하고, 미로찾기 게임과, 퀴즈 프로그램을 만들어 봅니다. 마지막에는 아두이노 교구를 활용하여 키보드로 자동차를 조종하는 활동을 합니다.", + "sw_contents_three": "선생님들이 학교에서 시작할 수 있는 소프트웨어 수업 지도서입니다. 다양한 언플러그드 활동과, '소프트웨어야 놀자' 방송을 활용한 수업 지도안이 담겨 있습니다.", + "naver_sw": "NAVER 소프트웨어야 놀자", + "teacher_teaching": "교사용지도서 (초등학교 5~6학년 이상)", + "funny_sw": "즐거운 SW놀이 교실", + "sw_contents_four": "소프트웨어를 놀이하듯 재미있게 배울 수 있는 교재로 엔트리보드게임을 비롯한 다양한 언플러그드 활동과 엔트리 학습모드로 소프트웨어를 만드는 기본 원리를 배우게 됩니다. 기본 원리를 배웠다면 학생들은 이제 엔트리로 이야기, 게임, 예술작품, 응용프로그램을 만드는 방법을 배우고, 자신이 생각한 소프트웨어를 만들고 발표할 수 있도록 교재가 구성되어 있습니다.", + "ct_text_5": "교과서와 함께 키우는 컴퓨팅 사고력", + "teacher_grade_5": "교원 (초등학교 5학년)", + "ct_text_5_content": "실생활의 문제를 해결하자는 테마로 준비된 총 8개의 학습콘텐츠가 담긴 교사용 지도안입니다. 각 콘텐츠는 개정된 교육과정을 반영한 타교과와의 연계를 통해 다양한 문제를 만나고 해결해볼 수 있도록 설계되었습니다. 아이들이 컴퓨팅 사고력을 갖춘 융합형 인재가 될 수 있도록 지금 적용해보세요!", + "ct_text_6": "교과서와 함께 키우는 컴퓨팅 사고력", + "teacher_grade_6": "교원 (초등학교 6학년)", + "ct_text_6_content": "실생활의 문제를 해결하자는 테마로 준비된 총 8개의 학습콘텐츠가 담긴 교사용 지도안입니다. 각 콘텐츠는 개정된 교육과정을 반영한 타교과와의 연계를 통해 다양한 문제를 만나고 해결해볼 수 있도록 설계되었습니다. 아이들이 컴퓨팅 사고력을 갖춘 융합형 인재가 될 수 있도록 지금 적용해보세요!", + "sw_use": "모든 교재들은 비영리 목적에 한하여 저작자를 밝히고 자유롭게 이용할 수 있습니다.", + "title": "제목", + "writer": "작성자", + "view": "보기", + "date": "등록일", + "find_id_pwd": "아이디와 비밀번호 찾기", + "send_email": "이메일로 비밀번호 변경을 위한 링크를 발송해드립니다.", + "user_not_exist": "존재하지 않는 이메일 주소 입니다.", + "not_signup": "아직 회원이 아니세요?", + "send": "발송하기", + "sensorboard": "엔트리봇 센서보드", + "physical_computing": "피지컬 컴퓨팅", + "sensorboard_contents": "아두이노를 사용하기 위해서 더 이상 많은 케이블을 사용해 회로를 구성할 필요가 없습니다. 엔트리 보드는 아두이노 위에 끼우기만 하면 간단하게 LED, 온도센서, 소리센서, 빛, 슬라이더, 스위치를 활용할 수 있습니다. 이제 엔트리 보드를 활용해 누구라도 쉽게 자신만의 특별한 작품을 만들어보세요!", + "entrybot_boardgame": "엔트리봇 보드게임", + "unplugged": "언플러그드 활동", + "unplugged_contents": "재밌는 보드게임을 통해 컴퓨터의 작동 원리를 배워보세요. 로봇강아지인 엔트리봇이 정전된 공장에서 필요한 부품을 찾아 탈출하도록 돕다보면 컴퓨터 전문가처럼 문제를 바라 볼 수 있게됩니다.", + "entrybot_cardgame": "엔트리봇 카드게임 : 폭탄 대소동", + "entrybot_cardgame_contents": "갑자기 엔트리도시에 나타난 12종류의 폭탄들! 과연 폭탄들을 안전하게 해체할 수 있을까요? 폭탄들을 하나씩 해체하며 엔트리 블록과 함께 소프트웨어의 원리를 배워봐요! 순차, 반복, 조건을 통해 폭탄을 하나씩 해체하다 보면 엔트리도시를 구한 영웅이 될 수 있답니다!", + "basic_learn": "엔트리 기본 학습", + "basic_learn_contents": "엔트리를 활용한 다양한 교육 콘텐츠를 제공합니다.", + "troubleshooting": "문제해결 학습", + "playsoftware": "소프트웨어야 놀자", + "make_own_lesson": "나만의 수업을 만들어 다른 사람과 공유할 수 있습니다.", + "lecture": "강의", + "curriculum": "코스", + "group_lecture": "우리 반 강의", + "group_curriculum": "우리 반 코스", + "group_homework": "우리 반 과제", + "group_noproject": "전시된 작품이 없습니다.", + "group_nolecture": "생성된 강의가 없습니다.", + "group_nocurriculum": "생성된 코스가 없습니다.", + "lecture_contents": "필요한 기능만 선택하여 나만의 수업을 만들어 볼 수 있습니다.", + "curriculum_contents": "여러개의 강의를 하나의 코스로 묶어 차근차근 따라할 수 있는 수업을 만들 수 있습니다.", + "grade_info": "학년 정보", + "difficulty": "난이도", + "usage": "사용요소", + "learning_concept": "학습개념", + "related_subject": "연개 교과", + "show_more": "더보기", + "close": "닫기", + "latest": "최신순", + "viewer": "조회순", + "like": "좋아요순", + "comment": "댓글순", + "entire_period": "전체기간", + "today": "오늘", + "latest_week": "최근 1 주일", + "latest_month": "최근 1개월", + "latest_three_month": "최근 3개월", + "current_password": "현재 비밀번호", + "incorrect_password": "비밀번호가 일치하지 않습니다.", + "new_password": "새로운 비밀번호", + "password_option_1": "영문과 숫자의 조합으로 5자 이상이 필요합니다.", + "again_new_password": "새로운 비밀번호 재입력", + "enter_new_pwd": "새로운 비밀번호를 입력하세요.", + "enter_new_pwd_again": "새로운 비밀번호를 다시 입력하세요.", + "password_match": "비밀번호가 일치하지 않습니다.", + "incorrect_email": "유효한 이메일이 아닙니다", + "edit_button": "정보수정", + "edit_profile": "마이페이지 관리", + "my_project": "나의 작품", + "my_group": "나의 학급", + "mark": "관심 작품", + "prev_state": "이전", + "profile_image": "자기소개 이미지", + "insert_profile_image": "자기소개 이미지를 등록해 주세요.", + "at_least_180": "180 x 180 픽셀의 이미지를 권장합니다.", + "upload_image": "이미지 업로드", + "main_image": "메인 이미지", + "about_me": "자기소개", + "save_change": "변경사항 저장", + "basic_image": "기본 이미지", + "profile_condition": "70자 내외로 자기소개를 작성해주세요.", + "profile_back": "돌아가기", + "make_project": "작품 만들기", + "exhibit_project": "작품 전시하기", + "art_list_shared": "개인", + "art_list_group_shared": "그룹", + "view_project": "코드 보기", + "comment_view": "댓글", + "upload_project": "올리기", + "edit": "수정", + "save_complete": "저장", + "just_like": "좋아요", + "share": "공유", + "who_likes_project": "작품을 좋아하는 사람", + "people_interest": "작품을 관심있어 하는 사람", + "none_person": "없음", + "inserted_date": "등록일", + "last_modified": "최종 수정일", + "original_project": "원본 작품", + "for_someone": "님의", + "original_project_deleted": "원본 작품이 삭제되었습니다.", + "delete_project": "삭제", + "delete_group_project": "목록에서 삭제", + "currnet_month_time": "월", + "current_day_time": "일", + "game": "게임", + "animation": "애니메이션", + "media_art": "미디어 아트", + "physical": "피지컬", + "etc": "기타", + "connected_contents": "연계되는 콘텐츠", + "connected_contents_content": "엔트리와 함께 할 수 있는 다양한 콘텐츠를 만나보세요. 처음 소프트웨어를 배우는 사람이라면 쉽게 즐기는 보드게임부터 아두이노와 같은 피지컬 컴퓨팅을 활용하여 자신만의 고급스러운 창작물을 만들어 볼 수 있습니다.", + "basic_mission": "기본 미션: 엔트리봇 미로찾기", + "basic_mission_content": "강아지 로봇을 만드는 공장에서 우연한 정전으로 혼자서 생각할 수 있게 된 엔트리봇! 공장을 탈출하고 자유를 찾을 수 있도록 엔트리봇을 도와주세요!", + "application_mission": "응용미션: 엔트리봇 우주여행", + "write_article": "글쓰기", + "view_all_articles": "모든 글 보기", + "view_own_articles": "내가 쓴 글 보기", + "learning_materials": "교육자료", + "ebs_software_first": "<소프트웨어야 놀자>는 네이버 와 EBS 그리고 엔트리가 함께 만든 교육 콘텐츠입니다. 여기에서는 엔트리를 활용하여 실제로 간단한 프로그램을 만들어보며 소프트웨어의 기초 원리를 배워나갈 수 있습니다. 또한 각 콘텐츠에서는 동영상을 통해 컴퓨터과학에 대한 선행지식이 없더라도 충분히 재미와 호기심을 느끼며 진행할 수 있도록 준비되어있습니다.", + "go_software": "소프트웨어야 놀자 가기", + "ebs_context": "EBS 가기", + "category": "카테고리", + "add_picture": "사진첨부", + "upload_article": "글 올리기", + "list": "목록", + "report": "신고하기", + "upload": "올리기", + "staff_picks": "스태프 선정", + "popular_picks": "인기 작품", + "lecture_header_more": "더 만들어 보기", + "lecture_header_reset": "초기화", + "lecture_header_reset_exec": "초기화 하기", + "lecture_header_save": "저장", + "lecture_header_save_content": "학습내용 저장하기", + "lecture_header_export_project": "내 작품으로 저장하기", + "lecture_header_undo": "취소", + "lecture_header_redo": "복원", + "lecture_header_bugs": "버그신고", + "lecture_container_tab_object": "오브젝트", + "lecture_container_tab_video": "강의 동영상", + "lecture_container_tab_project": "완성된 작품", + "lecture_container_tab_help": "블록 도움말", + "illigal": "불법적인 내용 또는 사회질서를 위반하는 활동", + "verbal": "언어 폭력 또는 개인 정보를 침해하는 활동", + "commertial": "상업적인 목적을 가지고 활동", + "explicit": "음란물", + "other": "기타", + "report_result": "결과 회신을 원하시면 메일을 입력해 주세요.", + "report_success": "신고하기가 정상적으로 처리 되었습니다.", + "etc_detail": "기타 항목 선택후 입력해주세요.", + "lecture_play": "강의 보기", + "list_view_link": "다른 코스 보기", + "lecture_intro": "강의 소개 보기", + "study_goal": "학습목표", + "study_description": "설명", + "study_created": "등록일", + "study_last_updated": "최종 수정일", + "study_remove": "삭제", + "study_group_lecture_remove": "목록에서 삭제", + "study_group_curriculum_remove": "목록에서 삭제", + "study_edit": "코스 수정", + "study_comments": "댓글", + "study_comment_post": "올리기", + "study_comment_remove": "삭제", + "study_comment_edit": "수정", + "study_comment_save": "저장", + "study_guide_video": "안내 영상", + "study_basic_project": "기본 작품", + "study_done_project": "완성 작품을 선택하세요.", + "study_usage_element": "사용요소", + "study_concept_element": "적용개념", + "study_subject_element": "연계교과", + "study_element_none": "없음", + "study_label_like": "좋아요", + "study_label_interest": "관심 강의", + "study_label_share": "공유", + "study_label_like_people": "강좌를 좋아하는 사람", + "study_label_interest_people": "강좌를 관심있어 하는 사람", + "study_related_lectures": "강의 목록", + "study_expand": "전체보기", + "study_collapse": "줄이기", + "aftercopy": "주소가 복사되었습니다.", + "study_remove_curriculum": "코스를 삭제하시겠습니까?", + "content_required": "내용을 입력하세요", + "study_remove_lecture": "강의를 삭제하시겠습니까?", + "lecture_build": "강의 만들기", + "lecture_build_step1": "1. 강의를 소개하기 위한 정보를 입력해주세요", + "lecture_build_step2": "2. 학습에 사용되는 기능들만 선택해주세요", + "lecture_build_step3": "3. 모든 정보를 올바르게 입력했는지 확인해주세요", + "lecture_build_choice": "어떤 것을 올리시겠습니까?", + "lecture_build_project": "엔트리 작품", + "lecture_build_video": "강의 영상", + "lecture_build_grade": "추천학년", + "lecture_build_goals": "학습목표", + "lecture_build_add_goal": "이곳을 클릭하여 목표를 추가", + "lecture_build_attach": "파일 첨부", + "lecture_build_attach_text": "20MB 이내의 파일을 업로드해 주세요.", + "lecture_build_assist": "보조 영상", + "lecture_build_youtube_url": "Youtube 공유 링크를 넣어주세요.", + "lecture_build_project_done": "완성 작품을 선택하세요.", + "lecture_build_scene_text1": "장면기능을 끄면 새로운 장면을 추가하거나,", + "lecture_build_scene_text2": "삭제할 수 없습니다.", + "lecture_build_object_text": "오브젝트 추가하기를 끄면 새로운 오브젝트를 추가하거나 삭제할 수 없습니다.", + "lecture_build_blocks_text1": "학습에 필요한 블록들만 선택해주세요.", + "lecture_build_blocks_text2": "선택하지 않은 블록은 숨겨집니다.", + "lecture_build_basic1": "학습을 시작할때 사용할 작품을 선택해 주세요.", + "lecture_build_basic2": "학습자는 선택한 작품을 가지고 학습을 하게 됩니다.", + "lecture_build_help": "이 도움말을 다시 보시려면 눌러주세요.", + "lecture_build_help_never": "다시보지 않기", + "lecture_build_close": "닫기", + "lecture_build_scene": "장면 1", + "lecture_build_add_object": "오브젝트 추가하기", + "lecture_build_start": "시작하기", + "lecture_build_tab_code": "블록", + "lecture_build_tab_shape": "모양", + "lecture_build_tab_sound": "소리", + "lecture_build_tab_attribute": "속성", + "lecture_build_block_category": "블록 카테고리를 선택하세요.", + "lecture_build_attr_all": "전체", + "lecture_build_attr_var": "변수", + "lecture_build_attr_signal": "신호", + "lecture_build_attr_list": "리스트", + "lecture_build_attr_func": "함수", + "lecture_build_edit": "강의 수정", + "lecture_build_remove": "삭제", + "curriculum_build": "코스 만들기", + "curriculum_step1": "1. 코스를 소개하는 정보를 입력해주세요.", + "curriculum_step2": "2. 코스를 구성하는 강의를 선택해주세요.", + "curriculum_step3": "3. 올바르게 코스가 구성되었는지 확인해주세요.", + "curriculum_lecture_upload": "강의 올리기", + "curriculum_lecture_edit": "강의 편집", + "curriculum_lecture_open": "불러오기", + "group_lecture_add": "우리 반 강의 추가하기", + "group_curriculum_add": "우리 반 코스 추가하기", + "group_lecture_delete": "삭제", + "group_curriculum_delete": "삭제", + "group_select": "", + "group_studentNo": "학번", + "group_username": "이름", + "group_userId": "아이디", + "group_tempPassword": "비밀번호 수정", + "group_gender": "성별", + "group_studentCode": "코드", + "group_viewWorks": "작품보기", + "added_group_lecture": "강의가 삭되었습니다.", + "added_group_curriculum": "코스가 삭제되었습니다.", + "deleted_group_lecture": "강의가 삭제되었습니다.", + "deleted_group_curriculum": "코스가 삭제되었습니다.", + "modal_my": "나의", + "modal_interest": "관심", + "modal_project": "작품", + "section": "단원", + "connect_hw": "하드웨어 연결", + "connect_message": "%1에 연결되었습니다.", + "connect_fail": "하드웨어 연결에 실패했습니다. 연결프로그램이 켜져 있는지 확인해 주세요.", + "interest_curriculum": "관심 코스", + "searchword_required": "검색어를 입력하세요.", + "file_required": "파일은 필수 입력 항목입니다.", + "file_upload_max_count": "한번에 10개까지 업로드가 가능합니다.", + "image_file_only": "이미지 파일만 등록이 가능합니다.", + "file_upload_max_size": "파일당 10MB 이하만 업로드가 가능합니다.", + "curriculum_modal_lectures": "나의 강의", + "curriculum_modal_interest": "관심 강의", + "group_curriculum_modal_curriculums": "나의 코스", + "group_curriculum_modal_interest": "관심 코스", + "picture_import": "모양 가져오기", + "picture_select": "모양 선택", + "lecture_list_view": "다른 강의 보기", + "play_software_2": "EBS 소프트웨어야 놀자2", + "play_software_2_content": "네이버와 EBS 그리고 엔트리가 함께 만든 두 번째 이야기, <소프트웨어야 놀자> 시즌2를 만나보세요! 재미있는 동영상 강의를 통해 소프트웨어의 기본 개념을 배워보고, 다양하고 흥미로운 주제로 실생활 문제를 해결해 볼 수 있습니다. 방송영상과 특별영상을 보며 재미있는 프로그램들을 직접 만들어보세요. 소프트웨어 교육을 처음 접하는 친구들도 쉽게 소프트웨어와 친구가 될 수 있답니다!", + "open_project_to_all": "공개", + "close_project": "비공개", + "category_media_art": "미디어 아트", + "go_further": "더 나아가기", + "marked_project": "관심 작품", + "marked_group_project": "그룹 관심 작품", + "basic": "기본", + "application": "응용", + "the_great_escape": "탈출 모험기", + "escape_guide_1": "강아지 로봇을 만드는 공장에서 우연한 정전으로 혼자서 생각할 수 있게 된 엔트리봇! ", + "escape_guide_1_2": " 공장을 탈출하고 자유를 찾을 수 있도록 엔트리봇을 도와주세요!", + "escape_guide_2": "엔트리봇이 먼 길을 가기엔 고쳐야 할 곳이 너무 많아 공장에서 탈출하면서 몸을 수리할 수 있는 부품들을 찾아보자! 아직 몸이 완전하지는 않지만 걷거나 뛰면서, 방향을 바꾸는 정도는 가능할 거야! ", + "escape_guide_2_2": "학습 목표: 순차적 실행", + "escape_guide_3": "드디어 공장을 탈출했어! 하지만 마을로 가기 위해서는 아직 가야 할 길이 멀어. 그래도 몸은 어느 정도 고쳐져서 똑같은 일을 많이 해도 무리는 없을 거야! 어? 근데 저 로봇은 뭐지? ", + "escape_guide_3_2": "학습 목표: 반복문과 조건문", + "escape_guide_4": "드디어 마을 근처까지 왔어! 아까부터 똑같은 일을 많이 했더니 이제 외울 지경이야! 차라리 쓰일 블록은 이제 기억해뒀다가 쓰면 좋을 것 같아. 여기서 배터리만 충전해 놓으면 이제 평생 자유롭게 살 수 있을 거야.", + "escape_guide_4_2": "학습 목표: 함수 정의와 호출", + "space_travel_log": "우주 여행기", + "space_guide_1": "머나먼 우주를 탐사하기 위해 떠난 엔트리봇. 드디어 탐사 임무를 마치고 고향별인 지구로 돌아오려 하는데 수많은 돌이 지구로 가는 길을 막고 있다! 엔트리봇이 안전하게 지구로 돌아올 수 있도록 도와주세요!", + "space_guide_2": "드디어 지구에 돌아갈 시간이야! 얼른 지구에 돌아가서 쉬고 싶어!앞에 돌들이 어떻게 되어 있는지 확인하고 언제 어디로 가야 하는지 알려줘! 그러면 내가 가르쳐준 방향으로 움직일게!", + "space_guide_2_2": "학습 목표: 조건문 중첩과 논리 연산", + "cfest_mission": "엔트리 체험 미션", + "maze_1_intro": "안녕 나는 엔트리봇이라고 해. 지금 나는 다친 친구들을 구하려고 하는데 너의 도움이 필요해. 나를 도와서 친구들을 구해줘! 먼저 앞으로 가기 블록을 조립하고 시작을 눌러봐", + "maze_1_title": "시작 방법", + "maze_1_content": "엔트리봇은 어떻게 움직이나요?", + "maze_1_detail": "1. 블록 꾸러미에서 원하는 블록을 꺼내어 “시작하기를 클릭했을 때” 블록과 연결해봐
2. 다 조립했으면, 시작을 눌러봐
3. 나는 네가 조립한 블록대로 위에서부터 순서대로 움직일게", + "maze_2_intro": "좋아! 덕분에 첫 번째 친구를 무사히 구할 수 있었어! 그럼 다음 친구를 구해볼까? 어! 그런데 앞에 벌집이 있어! 뛰어넘기 블록을 사용해서 벌집을 피하고 친구를 구해보자.", + "maze_2_title_1": "장애물 뛰어넘기", + "maze_2_content_1": "장애물이 있으면 어떻게 해야하나요?", + "maze_2_detail_1": "길을 가다보면 장애물을 만날 수 있어.
장애물이 앞에 있을 때에는 뛰어넘기 블록을 사용해야 해.", + "maze_2_title_2": "시작 방법", + "maze_2_content_2": "엔트리봇은 어떻게 움직이나요?", + "maze_2_detail_2": "1. 블록 꾸러미에서 원하는 블록을 꺼내어 “시작하기를 클릭했을 때” 블록과 연결해봐
2. 다 조립했으면, 시작을 눌러봐
3. 나는 네가 조립한 블록대로 위에서부터 순서대로 움직일게", + "maze_3_intro": "멋졌어! 이제 또 다른 친구를 구하러 가자~ 이번에는 아까 구한 친구가 준 반복하기 블록을 이용해볼까? 반복하기를 이용하면 똑같은 동작을 쉽게 여러번 할 수 있어! 한 번 반복할 숫자를 바꿔볼래?", + "maze_3_title": "반복 블록(1)", + "maze_3_content": "(3)회 반복하기 블록은 어떻게 사용하나요?", + "maze_3_detail": "같은 행동을 여러번 반복하려면 ~번 반복하기 블록을 사용해야 해.
반복하고 싶은 블록들을 ~번 반복하기 안에 넣고 반복 횟수를 입력하면 돼", + "maze_4_intro": "훌륭해! 이제 구해야 할 친구 로봇들도 별로 남지 않았어. 벌집에 닿지 않도록 뛰어넘기를 반복하면서 친구에게 갈 수 있게 해줘!", + "maze_4_title": "반복 블록(1)", + "maze_4_content": "(3)회 반복하기 블록은 어떻게 사용하나요?", + "maze_4_detail": "같은 행동을 여러번 반복하려면 ~번 반복하기 블록을 사용해야 해.
반복하고 싶은 블록들을 ~번 반복하기 안에 넣고 반복 횟수를 입력하면 돼", + "maze_5_intro": "대단해! 이제 반복하기 블록과 만약 블록을 같이 사용해보자~ 만약 블록을 사용하면 앞에 벽이 있을 때 벽이 없는 쪽으로 회전할 수 있어. 그럼 친구를 구해주러 출발해볼까?", + "maze_5_title_1": "만약 블록", + "maze_5_content_1": "만약 ~라면 블록은 어떻게 동작하나요?", + "maze_5_detail_1": "만약 앞에 {이미지}가 있다면' 블록을 사용하면 앞에 {이미지}가 있을 때 어떤 행동을 할 지 정해줄 수 있어.
앞에 {이미지}가 있을 때에만 블록 안의 블록들을 실행하고
그렇지 않으면 실행하지 않게 되는 거야.", + "maze_5_title_2": "반복 블록(2)", + "maze_5_content_2": "~를 만날 때 까지 반복하기 블록은 어떻게 사용하나요?", + "maze_5_detail_2": "~까지 반복하기'를 사용하면 같은 행동을 언제까지 반복할지를 정해줄 수 있어.
반복하고 싶은 블록들을 ~까지 반복하기안에 넣으면 돼.
그러면 {이미지}와 같은 타일 위에 있는 경우 반복이 멈추게 될 거야.", + "maze_6_intro": "이제 마지막 친구야! 아까 해본 것처럼만 하면 될거야! 그럼 마지막 친구를 구하러 가볼까?", + "maze_6_title_1": "만약 블록", + "maze_6_content_1": "만약 ~라면 블록은 어떻게 동작하나요?", + "maze_6_detail_1": "만약 앞에 {이미지}가 있다면' 블록을 사용하면 앞에 {이미지}가 있을 때 어떤 행동을 할 지 정해줄 수 있어.
앞에 {이미지}가 있을 때에만 블록 안의 블록들을 실행하고
그렇지 않으면 실행하지 않게 되는 거야.", + "maze_6_title_2": "반복 블록(2)", + "maze_6_content_2": "~를 만날 때 까지 반복하기 블록은 어떻게 사용하나요?", + "maze_6_detail_2": "~까지 반복하기'를 사용하면 같은 행동을 언제까지 반복할지를 정해줄 수 있어.
반복하고 싶은 블록들을 ~까지 반복하기안에 넣으면 돼.
그러면 {이미지}와 같은 타일 위에 있는 경우 반복이 멈추게 될 거야.", + "maze_programing_mode_0": "블록 코딩", + "maze_programing_mode_1": "자바스크립트", + "maze_operation1_title": "1단계 – 자바스크립트모드 안내", + "maze_operation1_1_desc": "나는 로봇강아지 엔트리봇이야. 나에게 명령을 내려서 미션을 해결할 수 있게 도와줘! 미션은 시작할 때마다 \'목표\'를 통해서 확인할 수 있어!", + "maze_operation1_2_desc": "미션을 확인했다면 명령을 내려야 해 \'명령어 꾸러미\'명령어가 있는 공간이야. 마우스키보드명령을 내릴 수 있어. 마우스로는 명령어 꾸러미에 있는 명령어를 클릭하거나, 명령어\'명령어 조립소\'로 끌고와서 나에게 명령을 내릴 수 있어!", + "maze_operation1_2_textset_1": "마우스로 명령어를 클릭하는 방법 ", + "maze_operation1_2_textset_2": "마우스로 명령어를 드래그앤드랍하는 방법 ", + "maze_operation1_3_desc": "키보드로 명령을 내리려면 \'명령어 꾸러미\' 에 있는 명령어를 키보드로 직접 입력하면 돼.
명령어를 입력할 때 명령어 끝에 있는 ()와 ; 를 빼먹지 않도록 주의해야해!", + "maze_operation1_4_desc": "미션을 해결하기 위한 명령어를 다 입력했다면 [시작하기]를 누르면 돼.
[시작하기]를 누르면 나는 명령을 내린대로 움직일 거야!
각 명령어가 궁금하다면 [명령어 도움말]을 확인해봐!", + "maze_operation7_title": "7단계 - 반복 명령 알아보기(횟수반복)", + "maze_operation7_1_desc": "똑같은 일을 반복해서 명령하는건 매우 귀찮은 일이야.
이럴땐 반복과 관련된 명령어를 사용하면 훨씬 쉽게 명령을 내릴 수 있어.", + "maze_operation7_2_desc": "그렇다면 반복되는 명령을 쉽게 내리는 방법을 알아보자.
먼저 반복하기 명령어를 클릭한 다음, i<1 의 숫자를 바꿔서 반복횟수를 정하고
괄호({ }) 사이에 반복할 명령어를 넣어주면 돼!", + "maze_operation7_3_desc": "예를 들어 이 명령어은 move(); 를 10번 반복해서 실행해.
명령어와 동일한 명령어지.", + "maze_operation7_4_desc": "이 명령어를 사용할 때는 { } 안에 반복할 명령어를 잘 입력했는지,
`;`는 빠지지 않았는지 잘 살펴봐!
이 명령어에 대한 자세한 설명은 [명령어 도움말]에서 볼 수 있어.", + "maze_operation7_1_textset_1": "똑같은 명령어를 반복해서 사용하는 경우", + "maze_operation7_1_textset_2": "반복 명령어를 사용하는 경우", + "maze_operation7_2_textset_1": "반복 횟수", + "maze_operation7_2_textset_2": "반복할 명령", + "maze_operation7_4_textset_1": "괄호({})가 빠진 경우", + "maze_operation7_4_textset_2": "세미콜론(;)이 빠진 경우", + "maze_operation9_title": "9단계 - 반복 명령 알아보기(조건반복)", + "maze_operation9_1_desc": "앞에서는 몇 번을 반복하는 횟수반복 명령어에 대해 배웠어.
이번에는 계속해서 반복하는 명령어를 살펴보자.
이 명령어를 사용하면 미션이 끝날 때까지 동일한 행동을 계속 반복하게 돼.
이 명령어 역시 괄호({ }) 사이에 반복할 명령어를 넣어 사용할 수 있어!", + "maze_operation9_2_desc": "예를 들어 이 명령어 은 미션을 완료할때까지 반복해서 move(); right()를 실행해.
명령어와 동일한 명령어지.", + "maze_operation9_3_desc": "이 명령어를 사용할 때도 { } 안에 반복할 명령어를 잘 입력했는지,
`true`가 빠지지 않았는지 잘 살펴봐!
이 명령어에 대한 자세한 설명은 [명령어 도움말]에서 볼 수 있어.", + "maze_operation9_1_textset_1": "반복할 명령", + "maze_operation9_3_textset_1": "괄호({})가 빠진 경우", + "maze_operation9_3_textset_2": "세미콜론(;)이 빠진 경우", + "maze_operation10_title": "10단계 - 조건 명령 알아보기", + "maze_operation10_1_desc": "앞에서는 미션이 끝날 때까지 계속 반복하는 반복 명령어에 대해 배웠어.
이번에는 특정한 조건에서만 행동을 하는 조건 명령어를 살펴보자.
에서 보는것처럼 조건 명령어를 사용하면 명령을 보다 효율적으로 잘 내릴 수 있어.", + "maze_operation10_2_desc": "조건 명령어는 크게 `조건``조건이 발생했을때 실행되는 명령`으로 나눌수 있어.
먼저 조건 부분을 살펴보자. If 다음에 나오는 ( ) 부분이 조건을 입력하는 부분이야.
과 같은 명령어를 예로 살펴보자. if(front == \“wall\”) 는 만약 내 앞에(front) \"wall(벽)\"이 있다면을 뜻해", + "maze_operation10_3_desc": "이제 `조건이 발생했을 때 실행되는 명령`을 살펴보자.
이 부분은 괄호{}로 묶여 있고, 조건이 발생했을때 괄호안의 명령을 실행하게 돼!
조건이 발생하지 않으면 이 부분은 무시하고 그냥 넘어가게 되지.
의 명령어를 예로 살펴보자. 조건은 만약에 `내 앞에 벽이 있을 때` 이고,
이 조건이 발생했을 때 나는 괄호안의 명령어 right(); 처럼 오른쪽으로 회전하게 돼!", + "maze_operation10_4_desc": "조건 명령어반복하기 명령어와 함께 쓰이는 경우가 많아.
앞으로 쭉 가다가, 벽을 만났을때만 회전하게 하려면
순서와 같이 명령을 내릴 수 있지!", + "maze_operation10_1_textset_1": "[일반명령]", + "maze_operation10_1_textset_2": "앞으로 2칸 가고
오른쪽으로 회전하고,
앞으로 3칸가고,
오른쪽으로 회전하고, 앞으로...
", + "maze_operation10_1_textset_3": "[조건명령]", + "maze_operation10_1_textset_4": "앞으로 계속 가다가
`만약에 벽을 만나면`
오른쪽으로 회전해~!
", + "maze_operation10_2_textset_1": "조건", + "maze_operation10_2_textset_2": "조건이 발생했을 때 실행되는 명령", + "maze_operation10_3_textset_1": "조건", + "maze_operation10_3_textset_2": "조건이 발생했을 때 실행되는 명령", + "maze_operation10_4_textset_1": "미션이 끝날때 까지
계속 앞으로 간다.
", + "maze_operation10_4_textset_2": "계속 앞으로 가다가,
만약에 벽을 만나면
", + "maze_operation10_4_textset_3": "계속 앞으로 가다가,
만약에 벽을 만나면
오른쪽으로 회전한다.
", + "maze_operation15_title": "15단계 - 함수 명령 알아보기", + "maze_operation15_1_desc": "자주 사용하는 명령어들을 매번 입력하는건 매우 귀찮은 일이야.
자주 사용하는 명령어들을 묶어서 이름을 붙이고,
필요할 때마다 그 명령어 묶음을 불러온다면 훨씬 편리하게 명령을 내릴 수 있어!
이런 명령어 묶음을 `함수`라고 해. 이제 함수 명령에 대해 자세히 알아보자.", + "maze_operation15_2_desc": "함수 명령어는 명령어를 묶는 `함수만들기` 과정과,
묶은 명령어를 필요할 때 사용하는 `함수 불러오기` 과정이 있어.
먼저 함수만들기 과정을 살펴보자.
함수를 만들려면 함수의 이름과, 그 함수에 들어갈 명령어를 입력해야 해.
function을 입력한 다음 함수의 이름을 정할 수 있어. 여기서는 promise로 만들거야.
함수 이름을 만들었으면 ()를 붙여줘. 그 다음 괄호({})를 입력해.
그리고 이 괄호 안에 함수에 들어갈 명령어들을 입력하면 함수가 만들어져!", + "maze_operation15_3_desc": "이 명령어를 예로 살펴보자. 나는 promise 라는 함수를 만들었어.
이 함수를 불러서 실행하면 괄호({})안에 있는
move();
move();
left(); 가 실행돼!", + "maze_operation15_4_desc": "함수를 불러와서 실행하려면 아까 만든 함수의 이름을 입력하고 뒤에 `();`를 붙이면 돼.
promise 라는 이름으로 함수를 만들었으니 promise(); 를 입력하면 앞에서 묶어놓은
명령어들이 실행되는거지!
과 같이 명령을 내리면 처럼 동작하게 돼!
함수 명령어를 사용하려면 과 같이 함수를 만들고 함수를 불러와야해!", + "maze_operation15_1_textset_1": "자주 사용하는 명령어 확인하기", + "maze_operation15_1_textset_2": "명령어들을 묶어서 이름 붙이기", + "maze_operation15_1_textset_3": "명령어 묶음 불러오기", + "maze_operation15_2_textset_1": "명령어 묶음의 이름(함수 이름)", + "maze_operation15_2_textset_2": "묶을 명령어들", + "maze_operation15_3_textset_1": "명령어 묶음의 이름(함수 이름)", + "maze_operation15_3_textset_2": "묶을 명령어들", + "maze_operation15_4_textset_1": "함수 만들기", + "maze_operation15_4_textset_2": "함수 불러오기", + "maze_operation15_4_textset_3": "실제 상황", + "maze_object_title": "오브젝트 정보", + "maze_object_parts_box": "부품 상자", + "maze_object_obstacle1": "장애물", + "maze_object_obstacle2": "bee", + "maze_object_obstacle3": "banana", + "maze_object_friend": "친구", + "maze_object_wall1": "wall", + "maze_object_wall2": "wall", + "maze_object_wall3": "wall", + "maze_object_battery": "베터리", + "maze_command_ex": "예시", + "maze_command_title": "명령어 도움말", + "maze_command_move_desc": "엔트리봇을 한 칸 앞으로 이동시킵니다.", + "maze_command_jump_desc": "아래 이미지와 같은 장애물 앞에서 장애물을 뛰어 넘습니다.
", + "maze_command_right_desc": "제자리에서 오른쪽으로 90도 회전합니다.", + "maze_command_left_desc": "제자리에서 왼쪽으로 90도 회전합니다.", + "maze_command_for_desc": "괄호{} 안에 있는 명령을 입력한 횟수 만큼 반복해서 실행합니다.", + "maze_command_while_desc": "미션이 끝날 때가지 괄호{} 안에 있는 명령을 계속 반복해서 실행합니다.", + "maze_command_if1_desc": "조건 `바로 앞에 벽이 있을때`이 발생했을 때,
괄호{} 안에 있는 명령을 실행합니다.", + "maze_command_if2_desc": "조건 `바로 앞에 벌집이 있을때`이 발생했을 때,
괄호{} 안에 있는 명령을 실행합니다.", + "maze_command_if3_desc": "조건 `바로 앞에 바나나가 있을때`이 발생했을 때,
괄호{} 안에 있는 명령을 실행합니다.", + "maze_command_promise_desc": "promise 라는 함수를 만들고 실행하면 괄호{} 안에
있던 명령어가 실행합니다.", + "perfect": "아주 완벽해! ", + "succeeded_using_blocks": " 개의 블록을 사용해서 성공했어!", + "awesome": "대단한 걸!", + "succeeded_go_to_next": "개의 블록만으로 성공했어!
다음 단계로 넘어가자.", + "good": "좋아! ", + "but": "
하지만, ", + "try_again": " 개의 블록만으로 성공하는 방법도 있어.
다시 도전해 보는건 어때?", + "cfest_success": "대단한걸! 덕분에 친구들을 구할 수 있었어!
아마도 너는 타고난 프로그래머 인가봐!
나중에 또 만나자~!", + "succeeded_and_cert": "개의 블록만으로 성공했어!
인증서를 받으러 가자.", + "cause_msgs_1": "에구, 앞으로 갈 수 없는 곳이였어. 다시 해보자.", + "cause_msgs_2": "히잉. 그냥 길에서는 뛰어 넘을 곳이 없어. 다시 해보자.", + "cause_msgs_3": "에고고, 아파라. 뛰어 넘었어야 했던 곳이였어. 다시 해보자.", + "cause_msgs_4": "아쉽지만, 이번 단계에서는 꼭 아래 블록을 써야만 해.
다시 해볼래?", + "cause_msgs_5": "이런, 실행할 블록들이 다 떨어졌어. 다시 해보자.", + "close_experience": "체험
종료", + "replay": "다시하기", + "go_to_next_level": "다음단계 가기", + "move_forward": "앞으로 한 칸 이동", + "turn_left": "왼쪽", + "turn_right": "오른쪽", + "turn_en": "", + "turn_ko": "으로 회전", + "jump_over": "뛰어넘기", + "when_start_is_pressed": "시작하기를 클릭했을 때", + "repeat_until_ko": "만날 때 까지 반복", + "repeat_until_en": "", + "repeat_until": "만날 때 까지 반복", + "if_there_is_1": "만약 앞에 ", + "if_there_is_2": "있다면", + "used_blocks": "사용 블록", + "maximum": "목표 블록", + "used_command": "사용 명령어 갯수", + "maximum_command": "목표 명령어 갯수", + "block_box": "블록 꾸러미", + "block_assembly": "블록 조립소", + "command_box": "명령어 꾸러미", + "command_assembly": "명령어 조립소", + "start": "시작하기", + "engine_running": "실행중", + "engine_replay": "돌아가기", + "goto_show": "보러가기", + "make_together": "함께 만드는 엔트리", + "make_together_content": "엔트리는 학교에 계신 선생님들과 학생 친구들이 함께 고민하며 만들어갑니다.", + "project_nobody_like": "이 작품이 마음에 든다면 '좋아요'를 눌러 주세요.", + "project_nobody_interest": "'관심 작품'을 누르면 마이 페이지에서 볼 수 있어요.", + "lecture_nobody_like": "이 강의가 마음에 든다면 '좋아요'를 눌러 주세요.", + "lecture_nobody_interest": "'관심 강의'을 누르면 마이 페이지에서 볼 수 있어요.", + "course_nobody_like": "이 코스가 마음에 든다면 '좋아요'를 눌러 주세요.", + "course_nobody_interest": "'관심 코스'을 누르면 마이 페이지에서 볼 수 있어요.", + "before_changed": "변경전", + "after_changed": "변경후", + "from_changed": "( 2016년 04월 17일 부터 ) ", + "essential": "필수", + "access_term_title": "안녕하세요. 엔트리 교육연구소 입니다. 
엔트리를 사랑해주시는 여러분께 감사드리며, 
엔트리 교육연구소 웹사이트 이용약관이
2016년 4월 17일 부로 다음과 같이 개정됨을 알려드립니다. ", + "member_info": "회원 안내", + "personal_info": "개인정보 수집 및 이용에 동의 합니다.", + "option": "선택", + "latest_news": "최근소식", + "edu_data": "교육자료", + "footer_phrase": "엔트리는 누구나 무료로 소프트웨어 교육을 받을 수 있게 개발된 비영리 교육 플랫폼입니다.", + "footer_use_free": "모든 엔트리교육연구소의 저작물은 교육적 목적에 한하여 출처를 밝히고 자유롭게 이용할 수 있습니다.", + "nonprofit_platform": "비영리 교육 플랫폼", + "this_is": "입니다.", + "privacy": "개인정보 처리방침", + "entry_addr": "주소 : 서울특별시 강남구 강남대로 382 메리츠타워 7층 엔트리 교육연구소", + "phone": "전화번호", + "alert_agree_term": "이용약관에 동의하여 주세요.", + "alert_private_policy": "개인정보 수집 약관에 동의하여 주세요.", + "agree": "동의", + "optional": "선택", + "start_software": "소프트웨어 교육의 첫걸음", + "analyze_procedure": "절차", + "analyze_repeat": "반복", + "analyze_condition": "분기", + "analyze_interaction": "상호작용", + "analyze_dataRepresentation": "데이터 표현", + "analyze_abstraction": "추상화", + "analyze_sync": "병렬 및 동기화", + "jr_intro_1": "안녕! 난 쥬니라고 해! 내 친구 엔트리봇이 오른쪽에 있어! 날 친구에게 데려다 줘!", + "jr_intro_2": "엔트리봇이 내 왼쪽에 있어! 왼쪽으로 가보자.", + "jr_intro_3": "엔트리봇이 위쪽에 있어! 친구를 만날 수 있도록 도와줘!", + "jr_intro_4": "어서 엔트리봇을 만나러 가자! 아래쪽으로 가보는거야~ ", + "jr_intro_5": "우왓! 내 친구가 멀리 떨어져있어. 엔트리봇이 있는 곳까지 안내해줄래? ", + "jr_intro_6": "저기 엔트리봇이 있어~ 얼른 만나러 가보자.", + "jr_intro_7": "예쁜 꽃이 있네. 꽃들을 모아 엔트리봇에게 가보자!", + "jr_intro_8": "가는 길에 꽃이 있어! 꽃을 모아 엔트리봇에게 가보자!", + "jr_intro_9": "엔트리봇이 멀리 떨어져 있네? 가장 빠른 길로 엔트리봇에게 가 보자.", + "jr_intro_10": "엔트리봇을 만나러 가는 길에 꽃을 모두 모아서 가보자.", + "jr_intro_11": "엔트리봇에게 가려면 오른쪽으로 다섯번이나 가야 하잖아? 반복하기 블록을 사용해서 좀 더 쉽게 가 보자.", + "jr_intro_12": "반복하기를 사용해서 엔트리봇을 만나러 가자.", + "jr_intro_13": "지금 블록으로는 친구에게 갈 수가 없어. 반복 횟수를 바꿔 엔트리봇에게 갈 수 있게 해줘.", + "jr_intro_14": "반복 블록을 사용하여 엔트리봇에게 데려다 줘.", + "jr_intro_15": "엔트리봇이 정~말 멀리 있잖아? 그래도 반복 블록을 사용하면 쉽게 엔트리봇에게 갈 수 있을 거야.", + "jr_whats_ur_name": "내가 받을 인증서에 적힐 이름은?", + "jr_down_cert": "인증서 받기", + "jr_popup_prefix_1": "좋아! 엔트리봇을 만났어!", + "jr_popup_prefix_2": "우왓! 엔트리봇을 만났어!
하지만 엔트리봇을 만나기에는 더 적은 블록을 사용해서도
만날 수 있는데 다시 해볼래? ", + "jr_popup_suffix": "고마워~ 덕분에 엔트리봇이랑 재밌게 놀 수 있었어~
다음에 또 엔트리봇이랑 놀자~", + "jr_fail_dont_go": "에궁, 그 곳으로는 갈 수 없어. 가야하는 길을 다시 알려줘~", + "jr_fail_dont_know": "어? 이제 어디로 가지? 어디로 가야하는 지 더 알려줘~", + "jr_fail_no_flower": "이런 그곳에는 꽃이 없어. 꽃이 있는 곳에서 사용해보자~", + "jr_fail_forgot_flower": "앗! 엔트리봇한테 줄 꽃을 깜빡했어. 꽃을 모아서 가자~", + "jr_fail_need_repeat": "반복 블록이 없잖아! 반복 블록을 사용해서 해보자~", + "jr_hint_1": "안녕! 난 쥬니라고 해! 내 친구 엔트리봇이 오른쪽에 있어! 날 친구에게 데려다 줘!", + "jr_hint_2": "엔트리봇이 내 왼쪽에 있어! 왼쪽으로 가보자.", + "jr_hint_3": "엔트리봇이 위쪽에 있어! 친구를 만날 수 있도록 도와줘!", + "jr_hint_4": "어서 엔트리봇을 만나러 가자! 아래쪽으로 가보는거야~", + "jr_hint_5": "우왓! 내 친구가 멀리 떨어져있어. 엔트리봇이 있는 곳까지 안내해줄래?", + "jr_hint_6": "잘못된 블록들 때문에 친구에게 가지 못하고 있어, 잘못된 블록을 지우고 엔트리봇에게 갈 수 있도록 해줘!", + "jr_hint_7": "예쁜 꽃이 있네. 꽃들을 모아 엔트리봇에게 가보자!", + "jr_hint_8": "가는 길에 꽃이 있어! 꽃을 모아 엔트리봇에게 가보자!", + "jr_hint_9": "엔트리봇이 멀리 떨어져 있네? 가장 빠른 길로 엔트리봇에게 가 보자.", + "jr_hint_10": "앗, 블록을 잘못 조립해서 제대로 갈 수가 없어. 가는 길에 꽃을 모두 모아 엔트리봇에게 가져다 줄 수 있도록 고쳐 보자.", + "jr_hint_11": "엔트리봇에게 가려면 오른쪽으로 다섯번이나 가야 하잖아? 반복하기 블록을 사용해서 좀 더 쉽게 가 보자.", + "jr_hint_12": "반복하기를 사용해서 엔트리봇을 만나러 가자.", + "jr_hint_13": "지금 블록으로는 친구에게 갈 수가 없어. 반복 횟수를 바꿔 엔트리봇에게 갈 수 있게 해줘.", + "jr_hint_14": "반복 블록을 사용하여 엔트리봇에게 데려다 줘.", + "jr_hint_15": "엔트리봇이 정~말 멀리 있잖아? 그래도 반복 블록을 사용하면 쉽게 엔트리봇에게 갈 수 있을 거야.", + "jr_certification": "인증서", + "jr_congrat": "축하드립니다!", + "jr_congrat_msg": "문제해결 과정을 성공적으로 마쳤습니다.", + "jr_share": "공유", + "go_see_friends": "친구들 만나러 가요~!", + "junior_naver": "쥬니어 네이버", + "junior_naver_contents_1": "의 멋진 곰 '쥬니'가 엔트리를 찾아 왔어요! ", + "junior_naver_contents_2": "그런데 쥬니는 길을 찾는 것이 아직 어렵나봐요.", + "junior_naver_contents_3": "쥬니가 엔트리봇을 만날 수 있도록 가야하는 방향을 알려주세요~", + "basic_content": "기초", + "jr_help": "도움말", + "help": "도움말", + "cparty_robot_intro_1": "안녕 나는 엔트리봇이야. 난 부품을 얻어서 내몸을 고쳐야해. 앞으로 가기 블록으로 부품을 얻게 도와줘!", + "cparty_robot_intro_2": "좋아! 앞에도 부품이 있는데 이번에는 잘못 가다간 감전되기 쉬울 것 같아. 뛰어넘기 블록을 써서 부품까지 데려다 줘.", + "cparty_robot_intro_3": "멋진걸! 저기에도 부품이 있어! 길이 조금 꼬여있지만 회전하기 블록을 쓰면 충분히 갈 수 있을 것 같아! ", + "cparty_robot_intro_4": "좋아 이제 움직이는 건 많이 편해졌어! 이번에는 회전과 뛰어넘기를 같이 써서 저 부품을 얻어보자! ", + "cparty_robot_intro_5": "덕분에 몸이 아주 좋아졌어! 이번에도 회전과 뛰어넘기를 같이 써야 할 거야! 어서 가보자!", + "cparty_robot_intro_6": "멋져! 이제 몸이 많이 좋아져서, 똑같은 일은 여러 번 해도 괜찮을 거야! 한 번 반복하기를 사용해서 가보자!", + "cparty_robot_intro_7": "어? 중간중간에 뛰어넘어야 할 곳이 있어! 그래도 반복하기로 충분히 갈 수 있을 거야!", + "cparty_robot_intro_8": "이런! 이번에는 부품이 저기 멀리 떨어져 있어. 그래도 반복하기를 사용하면 쉽게 갈수 있지! 얼른 도와줘!", + "cparty_robot_intro_9": "우와~ 이제 내 몸이 거의 다 고쳐진 것 같아! 이번에도 반복하기를 이용해서 부품 구하러 가보자!", + "cparty_robot_intro_10": "대단해! 이제 마지막 부품만 있으면 내 몸을 완벽하게 고칠 수 있을 거야! 빨리 반복하기로 도와줘!", + "cparty_car_intro_1": "안녕! 나는 엔트리봇이라고 해, 자동차를 타고 계속 이동하려면 연료가 필요해! 앞에 있는 연료를 얻을 수 있게 도와줄래?", + "cparty_car_intro_2": "좋아! 그런데 이번에는 길이 직선이 아니네! 왼쪽/오른쪽 돌기 블록으로 잘 운전해서 함께 연료를 얻으러 가볼까?", + "cparty_car_intro_3": "잘했어! 이번 길 앞에는 과속방지턱이 있어. 빠르게 운전하면 사고가 날 수도 있을 것 같아, 천천히 가기 블록을 써서 연료를 얻으러 가보자!", + "cparty_car_intro_4": "야호, 이제 운전이 한결 편해졌어! 이 도로에서는 반복하기 블록을 사용해서 연료를 채우러 가볼까?", + "cparty_car_intro_5": "와 이번 도로는 조금 복잡해 보이지만, 앞으로 가기와 왼쪽/오른쪽 돌기 블록을 반복하면서 가보면 돼! 차분하게 연료까지 가보자", + "cparty_car_intro_6": "이번에는 도로에 장애물이 있어서 잘 돌아가야 될 것 같아, 만약에 장애물이 앞에 있다면 어떻게 해야 하는지 알려줘!", + "cparty_car_intro_7": "좋아 잘했어! 한번 더 만약에 블록을 사용해서 장애물을 피해 연료를 얻으러 가보자!", + "cparty_car_intro_8": "앗 아까 만났던 과속 방지턱이 두 개나 있네, 천천히 가기 블록을 이용해서 안전하게 연료를 채우러 가보자!", + "cparty_car_intro_9": "복잡해 보이는 길이지만, 앞에서 사용한 반복 블록과 만약에 블록을 잘 이용하면 충분히 운전할 수 있어, 연료를 채울 수 있도록 도와줘!", + "cparty_car_intro_10": "정말 멋져! 블록의 순서를 잘 나열해서 이제 마지막 남은 연료를 향해 힘을 내어 가보자!", + "cparty_car_popup_prefix_1": "좋아! 연료를 얻었어!", + "cparty_car_popup_prefix_2": "우왓! 연료를 얻었어!
하지만 연료를 얻기에는 더 적은 블록을 사용해서도
얻을 수 있는데 다시 해볼래? ", + "cparty_car_popup_suffix": "고마워~ 덕분에 모든 배터리를 얻을 수 있었어~
다음에 또 나랑 놀자~", + "all_grade": "모든 학년", + "grade_e3_e4": "초등 3 ~ 4 학년 이상", + "grade_e5_e6": "초등 5 ~ 6 학년 이상", + "grade_m1_m3": "중등 1 ~ 3 학년 이상", + "entry_first_step": "엔트리 첫걸음", + "entry_monthly": "월간 엔트리", + "play_sw_2": "EBS 소프트웨어야 놀자2", + "entry_programming": "실전, 프로그래밍!", + "entry_recommanded_course": "엔트리 추천 코스", + "introduce_course": "누구나 쉽게 보고 따라하면서 재미있고 다양한 소프트웨어를 만들 수 있는 강의 코스를 소개합니다.", + "all_free": "*강의 동영상, 만들기, 교재 등이 모두 무료로 제공됩니다.", + "cparty_result_fail_1": "에궁, 그 곳으로는 갈 수 없어. 가야하는 길을 다시 알려줘~", + "cparty_result_fail_2": "에고고, 아파라. 뛰어 넘었어야 했던 곳이였어. 다시 해보자.", + "cparty_result_fail_3": "아이고 힘들다. 아래 블록들을 안 썼더니 너무 힘들어! 아래 블록들로 다시 만들어줘.", + "cparty_result_fail_4": "어? 이제 어디로 가지? 어디로 가야하는 지 더 알려줘~", + "cparty_result_fail_5": "앗! 과속방지턱에서는 속도를 줄여야해. 천천히 가기 블록을 사용해보자~", + "cparty_result_success_1": "좋아! 부품을 얻었어!", + "cparty_result_success_2": "우왓! 부품을 얻었어!
하지만 부품을 얻기에는 더 적은 블록을 사용해서도 얻을 수 있는데 다시 해볼래?", + "cparty_result_success_3": "고마워~ 덕분에 내몸이 다 고쳐졌어~ 다음에 또 나랑 놀자~", + "cparty_insert_name": "이름을 입력하세요.", + "offline_file": "파일", + "offline_edit": "편집", + "offline_undo": "되돌리기", + "offline_redo": "다시실행", + "offline_quit": "종료", + "select_one": "선택해 주세요.", + "evaluate_challenge": "도전해본 미션의 난이도를 평가해 주세요.", + "very_easy": "매우쉬움", + "easy": "쉬움", + "normal": "보통", + "difficult": "어려움", + "very_difficult": "매우 어려움", + "save_dismiss": "바꾼 내용을 저장하지 않았습니다. 계속 하시겠습니까?", + "entry_info": "엔트리 정보", + "actual_size": "실제크기", + "zoom_in": "확대", + "zoom_out": "축소", + "cparty_jr_intro_1": "안녕! 난 엔트리봇 이라고 해! 학교가는 길에 책가방을 챙길 수 있도록 도와줘! ", + "cparty_jr_intro_2": "책가방이 내 왼쪽에 있어! 왼쪽으로 가보자.", + "cparty_jr_intro_3": "책가방이 위쪽에 있어! 책가방을 챙길 수 있도록 도와줘!", + "cparty_jr_intro_4": "어서 책가방을 챙기러 가자! 아래쪽으로 가보는 거야~", + "cparty_jr_intro_5": "우왓! 내 책가방이 멀리 떨어져 있어. 책가방이 있는 곳까지 안내해줄래?", + "cparty_jr_intro_6": "책가방이 있어! 얼른 가지러 가자~", + "cparty_jr_intro_7": "길 위에 내 연필이 있네. 연필들을 모아 책가방을 챙기러 가보자!", + "cparty_jr_intro_8": "학교 가는 길에 연필이 있어! 연필을 모아 책가방을 챙기러 가보자!", + "cparty_jr_intro_9": "내 책가방이 멀리 떨어져 있네? 가장 빠른 길로 책가방을 챙기러 가 보자.", + "cparty_jr_intro_10": "가는 길에 연필을 모두 모으고 책가방을 챙기자!", + "cparty_jr_intro_11": "책가방을 챙기러 가려면 오른쪽으로 다섯 번이나 가야 하잖아? 반복하기 블록을 사용해서 좀 더 쉽게 가 보자.", + "cparty_jr_intro_12": "반복하기를 사용해서 책가방을 챙기러 가자.", + "cparty_jr_intro_13": "지금 블록으로는 책가방이 있는 쪽으로 갈 수가 없어. 반복 횟수를 바꿔 책가방을 챙기러 갈 수 있게 해줘.", + "cparty_jr_intro_14": "반복 블록을 사용하여 책가방을 챙기러 가줘.", + "cparty_jr_intro_15": "학교가 정~말 멀리 있잖아? 그래도 반복 블록을 사용하면 쉽게 학교에 도착 할수 있을 거야.", + "make_new_project": "새로운 작품 만들기", + "open_old_project": "저장된 작품 불러오기", + "offline_download": "엔트리 다운로드", + "offline_release": "엔트리 오프라인 에디터 출시!", + "offline_description_1": "엔트리 오프라인 버전은", + "offline_description_2": "인터넷이 연결되어 있지 않아도 사용할 수 있습니다. ", + "offline_description_3": "지금 다운받아서 시작해보세요!", + "sw_week_2015": "2015 소프트웨어교육 체험 주간", + "cparty_desc": "두근두근 소프트웨어와의 첫만남", + "entry_offline_download": "엔트리 오프라인 다운로드", + "offline_desc_1": "엔트리 오프라인 버전은 인터넷이 연결되어 있지 않아도 사용할 수 있습니다.", + "offline_desc_2": "지금 다운받아서 시작해보세요!", + "download": "다운로드", + "version": "버전", + "file_size": "크기", + "update": "업데이트", + "use_range": "사용범위", + "offline_desc_free": "엔트리 오프라인은 기업과 개인 모두 제한 없이 무료로 사용하실 수 있습니다.", + "offline_required": "최소 요구사항", + "offline_required_detail": "디스크 여유 공간 500MB 이상, windows XP SP2 혹은 MAC OS 10.8 이상", + "offline_notice": "설치 전 참고사항", + "offline_notice_1": "1. 버전 1.0.5 에서는 하드웨어 연결 프로그램 통합 설치가 지원되지 않습니다.", + "offline_notice_2": "2. 별도의 웹브라우져가 필요하지 않습니다.", + "cparty_jr_result_2": "고마워~ 덕분에 책가방을 챙겨서 학교에 올 수 있었어~
다음 학교 가는 길도 함께 가자~ ", + "cparty_jr_result_3": "우왓! 학교까지 왔어!
하지만 더 적은 블록을 사용해도 학교에 갈 수 있는데
다시 해볼래?", + "cparty_jr_result_4": "우왓! 책가방을 얻었어!
하지만 더 적은 블록을 사용해도 책가방을 얻을 수 있는데
다시 해볼래? ", + "lms_no_class": "아직 만든 학급이 없습니다.", + "lms_create_class": "학급을 만들어 주세요.", + "lms_add_class": "학급 만들기", + "lms_base_class": "기본", + "lms_delete_class": "삭제", + "lms_my_class": "나의 학급", + "lms_grade_1": "초등 1", + "lms_grade_2": "초등 2", + "lms_grade_3": "초등 3", + "lms_grade_4": "초등 4", + "lms_grade_5": "초등 5", + "lms_grade_6": "초등 6", + "lms_grade_7": "중등 1", + "lms_grade_8": "중등 2", + "lms_grade_9": "중등 3", + "lms_grade_10": "일반", + "lms_add_groupId_personal": "선생님께 받은 학급 아이디를 입력하여, 회원 정보에 추가하세요.", + "lms_add_groupId": "학급 아이디 추가하기", + "lms_add_group_account": "학급 계정 추가", + "lms_enter_group_info": "발급받은 학급 아이디와 비밀번호를 입력하세요.", + "lms_group_id": "학급 아이디", + "lms_group_pw": "비밀번호", + "lms_group_name": "소속 학급명", + "personal_pwd_alert": "올바른 비밀번호 양식을 입력해 주세요", + "personal_form_alert": "양식을 바르게 입력해 주세요", + "personal_form_alert_2": "모든 양식을 완성해 주세요", + "personal_no_pwd_alert": "비밀번호를 입력해 주세요", + "select_gender": "성별을 선택해 주세요", + "enter_group_id": "학급 아이디를 입력해 주세요", + "enter_group_pwd": "비밀번호를 입력해 주세요", + "info_added": "추가되었습니다", + "no_group_id": "학급 아이디가 존재하지 않습니다", + "no_group_pwd": "비밀번호가 일치하지 않습니다", + "lms_please_choice": "선택해 주세요.", + "group_lesson": "나의 학급 강의", + "lms_banner_add_group": "학급 기능 도입", + "lms_banner_entry_group": "엔트리 학급 만들기", + "lms_banner_desc_1": "우리 반 학생들을 엔트리에 등록하세요!", + "lms_banner_desc_2": "이제 보다 편리하고 쉽게 우리 반 학생들의 작품을 찾고,", + "lms_banner_desc_3": "성장하는 모습을 확인할 수 있습니다. ", + "lms_banner_download_manual": "메뉴얼 다운로드", + "lms_banner_detail": "자세히 보기", + "already_exist_email": "이미 존재하는 이메일 입니다.", + "remove_project": "작품을 삭제하시겠습니까?", + "study_lesson": "우리 반 학습하기", + "open_project": "작품 불러오기", + "make_group": "학급 만들기", + "project_share": "작품 공유하기", + "group_project_share": "학급 공유하기", + "group_discuss": "학급 글 나누기", + "my_profile": "마이 페이지", + "search_updated": "최신 작품", + "search_recent": "최근 조회수 높은 작품", + "search_complexity": "최근 제작에 공들인 작품", + "search_staffPicked": "스태프선정 작품 저장소", + "search_childCnt": "사본이 많은 작품", + "search_likeCnt": "최근 좋아요가 많은 작품", + "gnb_share": "공유하기", + "gnb_community": "커뮤니티", + "lms_add_lectures": "강의 올리기", + "lms_add_course": "코스 올리기", + "lms_add_homework": "과제 올리기", + "remove_lecture_confirm": "강의를 정말 삭제하시겠습니까?", + "popup_delete": "삭제하기", + "remove_course_confirm": "코스를 정말 삭제하시겠습니까?", + "lms_no_lecture_teacher_1": "추가된 강의가 없습니다.", + "lms_no_lecture_teacher_2": "우리 반 강의를 추가해 주세요.", + "gnb_download": "다운로드", + "lms_no_lecture_student_1": "아직 올라온 강의가 없습니다.", + "lms_no_lecture_student_2": "선생님이 강의를 올려주시면,", + "lms_no_lecture_student_3": "학습 내용을 확인할 수 있습니다.", + "lms_no_class_teacher": "아직 만든 학급이 없습니다.", + "lms_no_course_teacher_1": "추가된 코스가 없습니다.", + "lms_no_course_teacher_2": "우리 반 코스를 추가해 주세요.", + "lms_no_course_student_1": "아직 올라온 코스가 없습니다.", + "lms_no_course_student_2": "선생님이 코스를 올려주시면,", + "lms_no_course_student_3": "학습 내용을 확인할 수 있습니다.", + "lms_no_hw_teacher_1": "추가된 과제가 없습니다.", + "lms_no_hw_teacher_2": "우리 반 과제를 추가해 주세요.", + "lms_no_hw_student_1": "아직 올라온 과제가 없습니다.", + "lms_no_hw_student_2": "선생님이 과제를 올려주시면,", + "lms_no_hw_student_3": "학습 내용을 확인할 수 있습니다.", + "modal_edit": "수정하기", + "modal_deadline": "마감일 설정", + "modal_hw_desc": "상세설명 (선택)", + "desc_optional": "", + "modal_create_hw": "과제 만들기", + "vol": "회차", + "hw_title": "과제명", + "hw_description": "내용", + "deadline": "마감일", + "do_homework": "과제하기", + "hw_progress": "진행 상태", + "hw_submit": "제출", + "view_list": "명단보기", + "view_desc": "내용보기", + "do_submit": "제출하기", + "popup_notice": "알림", + "no_selected_hw": "선택된 과제가 없습니다.", + "hw_delete_confirm": "선택한 과제를 정말 삭제하시겠습니까?", + "hw_submitter": "과제 제출자 명단", + "hw_student_desc_1": "* '제출하기'를 눌러 제출을 완료하기 전까지 얼마든지 수정이 가능합니다", + "hw_student_desc_2": "* 제출 기한이 지나면 과제를 제출할 수 없습니다.", + "popup_create_class": "학급 만들기", + "class_name": "학급 이름", + "image": "이미지", + "select_class_image": "학급 이미지를 선택해 주세요.", + "type_class_description": "학급 소개 입력", + "set_as_primary_group": "기본학급으로 지정", + "set_primary_group": "지정", + "not_primary_group": "지정안함", + "type_class_name": "학급 이름을 입력해주세요. ", + "type_class_description_long": "학급 소개를 입력해 주세요. 80자 내외", + "add_students": "학생 추가하기", + "download_as_pdf": "학급계정 PDF로 내려받기", + "download_as_excel": "학급계정 엑셀로 내려받기", + "temp_password": "임시 비밀번호 발급", + "step_name": "이름 입력", + "step_info": "정보 추가/수정", + "preview": "미리보기", + "type_name_enter": "학급에 추가할 학생의 이름을 입력하고 엔터를 치세요.", + "multiple_name_possible": "여러명의 이름 입력이 가능합니다.", + "id_auto_create": "학번은 별도로 수정하지 않으면 자동으로 생성됩니다.", + "student_id_desc_1": "학급 아이디는 별도의 입력없이 자동으로 생성됩니다.", + "student_id_desc_2": "단, 엔트리에 이미 가입된 학생을 학급에 추가한다면 학생의 엔트리 아이디를", + "student_id_desc_3": "입력해주세요. 해당 학생은 로그인 후, 학급 초대를 수락하면 됩니다.", + "student_number": "학번", + "temp_password_desc_1": "임시 비밀번호로 로그인 후,", + "temp_password_desc_2": "신규 비밀번호를 다시 설정할 수 있도록 안내해주세요.", + "temp_password_desc_3": "*한번 발급된 임시 비밀번호는 다시 볼 수 없습니다.", + "student_delete_confirm": "학생을 정말 삭제하시겠습니까?", + "no_student_selected": "선택된 학생이 없습니다.", + "class_assignment": "학급 과제", + "class_list": "학급 목록", + "select_grade": "학년을 선택 하세요.", + "add_project": "작품 올리기", + "no_project_display": "아직 학생들이 전시한 작품이 없습니다.", + "plz_display_project": "나의 작품을 전시해 주세요.", + "refuse_confirm": "학급 초대를 정말 거절하시겠습니까?", + "select_class": "학급 선택", + "mon": "월", + "tue": "화", + "wed": "수", + "thu": "목", + "fri": "금", + "sat": "토", + "sun": "일", + "jan": "1월", + "feb": "2월", + "mar": "3월", + "apr": "4월", + "may": "5월", + "jun": "6월", + "jul": "7월", + "aug": "8월", + "sep": "9월", + "oct": "10월", + "nov": "11월", + "dec": "12월", + "plz_select_lecture": "강의를 선택해 주세요.", + "plz_set_deadline": "마감일을 설정해 주세요.", + "hide_entry": "엔트리 가리기", + "hide_others": "기타 가리기", + "show_all": "모두 보기", + "lecture_description": "선생님들이 직접 만드는 강의입니다.", + "curriculum_description": "선생님들이 직접 만드는 코스입니다.", + "linebreak_off_desc_1": "글상자의 크기가 글자의 크기를 결정합니다.", + "linebreak_off_desc_2": "내용을 한 줄로만 작성할 수 있습니다.", + "linebreak_off_desc_3": "새로운 글자가 추가되면 글상자의 좌우 길이가 길어집니다.", + "linebreak_on_desc_1": "글상자의 크기가 글자가 쓰일 수 있는 영역을 결정합니다.", + "linebreak_on_desc_2": "내용 작성시 엔터키로 줄바꿈을 할 수 있습니다.", + "linebreak_on_desc_3": "내용을 작성하시거나 새로운 글자를 추가시 길이가 글상자의 가로 영역을 넘어서면 자동으로 줄이 바뀝니다.", + "entry_with": "함께 만드는 엔트리", + "ebs_season_1": "시즌 1 보러가기", + "ebs_season_2": "시즌 2 보러가기", + "partner": "파트너", + "project_term_popup_title": "작품 공개에 따른 엔트리 저작권 정책 동의", + "project_term_popup_description_1": "작품 공개를 위해", + "project_term_popup_description_2": "아래 정책을 확인해주세요.", + "project_term_popup_description_3": "", + "project_term_popup_description_4": "", + "project_term_agree_1_1": "내가 만든 작품과 그 소스코드의 공개를 동의합니다.", + "project_term_agree_1_2": "", + "project_term_agree_2_1": "다른 사람이 나의 작품을 이용하는 것을 허락합니다.", + "project_term_agree_2_2": "( 복제 , 배포 , 공중송신 포함 )", + "project_term_agree_2_3": "", + "project_term_agree_3_1": "다른 사람이 나의 작품을 수정하는 것을 허락합니다.", + "project_term_agree_3_2": "( 리믹스, 변형, 2차 제작물 작성 포함)", + "agree_all": "전체 동의", + "select_login": "로그인 선택", + "select": "선택하세요", + "with_login": "로그인 하고", + "without_login": "로그인 안하고", + "start_challenge": "미션 도전하기", + "start_challenge_2": "미션 도전하기", + "if_not_save_not_login": "* 로그인을 안하고 미션에 참여하시면 진행 상황이 저장되지 않습니다.", + "if_not_member_yet": "엔트리 회원이 아니라면?", + "join_entry": "엔트리 회원 가입하기", + "learned_computing": "기존에 소프트웨어 교육을 받아보셨나요?", + "cparty_index_description_1": "두근두근 소프트웨어와 첫 만남.", + "cparty_index_description_2": "소프트웨어랑 재미있게 놀다 보면 소프트웨어의 원리도 배우고, 생각하는힘도 쑥쑥!", + "cparty_index_description_3": "엔트리를 통해 코딩 미션에 도전하고 인증서 받으세요.", + "cparty_index_description_4": "2015 Online Coding Party는", + "cparty_index_description_5": "SW교육 체험 주간", + "cparty_index_description_6": "의 일환으로써,", + "cparty_index_description_7": "SW교육을 준비하는 선생님들의 모임", + "cparty_index_description_8": "과 함께 만들어졌습니다.", + "congratulation": "축하 드립니다!", + "warm_up": "체험", + "beginner": "입문", + "intermediate": "기본", + "advanced": "발전", + "applied": "응용", + "cert_msg_tail": "과정을 성공적으로 마쳤습니다.", + "cert_msg_head": "", + "maze_text_content_1": "안녕? 나는 엔트리봇이야. 지금 나는 공장에서 탈출을 해야 해! 탈출하기 위해서 먼저 몸을 고쳐야 할 것 같아. 앞에 있는 부품을 얻을 수 있게 도와줄래? move()", + "maze_text_content_2": "좋아 아주 잘했어! 덕분에 몸이 한결 가벼워졌어! 이번에도 부품상자까지 나를 이동시켜줘. 그런데 가는길에 장애물이 있어. 장애물 앞에서는 jump()", + "maze_text_content_3": "멋진걸! 저기에도 부품이 있어! 길이 조금 꼬여있지만 오른쪽, 왼쪽으로 회전할 수 있는 right(); left() 명령어를 쓰면 충분히 갈 수 있을것 같아!", + "maze_text_content_4": "좋아 이제 움직이는 건 많이 편해졌어! 이번에는 지금까지 배운 명령어를 같이 써서 저 부품상자까지 가보자!", + "maze_text_content_5": "우와 부품이 두 개나 있잖아! 두 개 다 챙겨서 가자! 그러면 몸을 빨리 고칠 수 있을 것 같아!", + "maze_text_content_6": "이번이 마지막 부품들이야! 저것들만 있으면 내 몸을 다 고칠 수 있을 거야! 이번에도 도와줄 거지?", + "maze_text_content_7": "덕분에 몸이 아주 좋아졌어! 이제 똑같은 일을 여러 번 반복해도 무리는 없을 거야. 어? 그런데 앞에 있는 저 로봇은 뭐지? 뭔가 도움이 필요한 것 같아! 도와주자! for 명령어를 사용해서 저 친구한테 나를 데려다줘!", + "maze_text_content_8": "좋아! 덕분에 친구 로봇을 살릴 수 있었어! 하지만 앞에도 도움이 필요한 친구가 있네, 하지만 이번에는 벌집이 있으니까 조심해서 벌집에 안 닿게 뛰어넘어가자! 할 수 있겠지? 이번에도 for 명령어를 사용해서 친구가 있는곳까지 나를 이동시켜줘!", + "maze_text_content_9": "이번에는 for 명령어 대신 미션이 끝날때까지 같은 일을 반복하도록 하는 while 명령어를 사용해봐! 나를 친구에게 데려다주면 미션이 끝나!", + "maze_text_content_10": "이번에는 if 명령어가 나왔어! if와 while 명령어를 사용해서 내가 언제 어느 쪽으로 회전해야 하는지 알려줘!", + "maze_text_content_11": "좋아 아까 했던 것처럼 해볼까? 언제 왼쪽으로 돌아야 하는지 알려줄 수 있겠어?", + "maze_text_content_12": "이번에는 중간중간 벌집(bee)이 있네? 언제 뛰어넘어가야 할지 알려줄래?", + "maze_text_content_13": "여기저기 도움이 필요한 친구들이 많이 있네! 모두 가서 도와주자!", + "maze_text_content_14": "우와 이번에도 도와줘야 할 친구들이 많네. 먼저 조그마한 사각형을 돌도록 명령어를 만들고 만든 걸 반복해서 모든 친구를 구해보자.", + "maze_text_content_15": "오래 움직이다 보니 벌써 지쳐버렸어. 자주 쓰는 명령어를 function 명령어를 사용해서 함수로 만들어 놓았어! 함수를 사용하여 나를 배터리 까지 이동시켜줘!", + "maze_text_content_16": "좋아 멋진걸! 그럼 이번에는 함수에 들어갈 명령어들을 넣어서 나를 배터리까지 이동시켜줘!", + "maze_text_content_17": "좋아 이번에는 함수를 만들고, 함수를 사용해서 배터리를 얻을 수 있도록 도와줘! 함수를 만들때 jump();를 잘 섞어봐!", + "maze_text_content_18": "이번에는 길이 좀 복잡한걸? 그래도 언제 left();를 쓰고, 언제 right();를 쓰면 되는지 알려만 주면 배터리 까지 갈 수 있겠어!.", + "maze_text_content_19": "이번에는 함수가 미리 정해져 있어! 그런데 함수만 써서 배터리까지 가기 힘들것 같아. 함수와 다른 명령어들을 섞어 써서 배터리 까지 이동시켜줘!", + "maze_text_content_20": "좋아! 지금까지 정말 멋지게 잘 해줬어. 덕분에 이제 마지막 배터리만 채우면 앞으로는 충전이 필요 없을 거야. 함수를 이용해서 저 배터리를 얻고 내가 자유롭게 살 수 있도록 도와줘!", + "maze_content_1": "안녕 나는 엔트리봇이라고 해. 지금 나는 공장에서 탈출하려는데 먼저 몸을 고쳐야 할 것 같아. 앞에 있는 부품을 얻을 수 있게 도와줄래? 앞으로 가기 블록을 조립하고 시작을 눌러봐.", + "maze_content_2": "좋아 아주 잘했어! 덕분에 몸이 한결 가벼워졌어! 앞에도 부품이 있는데 이번에는 잘못 가다간 감전되기 쉬울 것 같아. 한 번 장애물 뛰어넘기 블록을 써서 부품까지 가볼까?", + "maze_content_3": "멋진걸! 저기에도 부품이 있어! 길이 조금 꼬여있지만 회전하기 블록을 쓰면 충분히 갈 수 있을 것 같아! 이번에도 도와줄 거지?", + "maze_content_4": "좋아 이제 움직이는 건 많이 편해졌어! 이번에는 회전과 뛰어넘기를 같이 써서 저 부품을 얻어보자!", + "maze_content_5": "우와 부품이 두 개나 있잖아! 두 개 다 챙겨서 가자! 그러면 몸을 빨리 고칠 수 있을 것 같아!", + "maze_content_6": "이번이 마지막 부품들이야! 저것들만 있으면 내 몸을 다 고칠 수 있을 거야! 이번에도 도와줄 거지?", + "maze_content_7": "덕분에 몸이 아주 좋아졌어! 이제 똑같은 일을 여러 번 반복해도 무리는 없을 거야. 어? 그런데 앞에 있는 저 로봇은 뭐지? 뭔가 도움이 필요한 것 같아! 도와주자! 얼른 반복하기의 숫자를 바꿔서 저 친구한테 나를 데려다줘!", + "maze_content_8": "좋아! 덕분에 친구 로봇을 살릴 수 있었어! 하지만 앞에도 도움이 필요한 친구가 있는 것 같아, 하지만 이번에는 벌집이 있으니까 조심해서 벌집에 안 닿게 뛰어넘어가자! 할 수 있겠지? 그럼 아까 했던 것처럼 반복을 써서 친구한테 갈 수 있게 해줄래?", + "maze_content_9": "이번에는 숫자만큼 반복하는 게 아니라 친구 로봇한테 갈 때까지 똑같은 일을 반복할 수 있어! 이번에도 친구를 구할 수 있도록 도와줘!", + "maze_content_10": "이번에는 만약 블록이란 게 있어! 만약 블록을 써서 언제 어느 쪽으로 돌아야 하는지 알려줘!", + "maze_content_11": "좋아 아까 했던 것처럼 해볼까? 언제 왼쪽으로 돌아야 하는지 알려줄 수 있겠어?", + "maze_content_12": "이번에는 중간중간 벌집이 있네? 언제 뛰어넘어가야 할지 알려줄래?", + "maze_content_13": "여기저기 도움이 필요한 친구들이 많이 있네! 모두 도와주자!", + "maze_content_14": "우와 이번에도 도와줘야 할 친구들이 많네. 먼저 조그마한 사각형을 돌도록 블록을 만들고 만든 걸 반복해서 모든 친구를 구해보자.", + "maze_content_15": "반복을 하도 많이 했더니 자주 쓰는 블록은 외울 수 있을 것 같아! 약속 블록은 지금 내가 외운 블록들이야! 일단은 오래 움직여서 지쳤으니까 배터리를 좀 채울 수 있게 약속 호출 블록을 써서 배터리를 채울 수 있게 해줘!", + "maze_content_16": "좋아 멋진걸! 그럼 이번에는 네가 자주 쓰일 블록을 나한테 가르쳐줘! 약속 정의 블록 안에 자주 쓰일 블록을 넣어보면 돼!", + "maze_content_17": "좋아 이번에도 그러면 약속을 이용해서 배터리를 얻을 수 있도록 도와줄 거지? 약속에 뛰어넘기를 잘 섞어봐!", + "maze_content_18": "이번에는 길이 좀 복잡한걸? 그래도 언제 왼쪽으로 돌고, 언제 오른쪽으로 돌면 되는지 알려만 주면 충전할 수 있을 것 같아.", + "maze_content_19": "이번에는 약속이 미리 정해져 있어! 그런데 바로 약속을 쓰기에는 안될 것 같아. 내가 갈 길을 보고 약속을 쓰면 배터리를 채울 수 있을 것 같은데 도와줄 거지?", + "maze_content_20": "좋아! 지금까지 정말 멋지게 잘 해줬어. 덕분에 이제 마지막 배터리만 채우면 앞으로는 충전이 필요 없을 거야. 그러니까 약속을 이용해서 저 배터리를 얻고 내가 자유롭게 살 수 있도록 도와줄래?", + "ai_content_1": "안녕? 나는 엔트리봇이라고 해. 우주 탐사를 마치고 지구로 돌아가려는데 우주를 떠다니는 돌들 때문에 쉽지 않네. 내가 안전하게 집에 갈 수 있도록 도와줄래? 나의 우주선에는 나의 앞과 위, 아래에 무엇이 어느 정도의 거리에 있는지 알려주는 레이더가 있어 너의 판단을 도와줄 거야!", + "ai_content_2": "고마워! 덕분에 돌을 쉽게 피할 수 있었어. 그런데 이번엔 더 많은 돌이 있잖아? 블록들을 조립하여 돌들을 이리저리 잘 피해 보자!", + "ai_content_3": "좋았어! 안전하게 돌을 피했어. 그런데 앞을 봐! 아까보다 더 많은 돌이 있어. 하지만 걱정하지 마. 나에게 반복하기 블록이 있거든. 반복하기 블록 안에 움직이는 블록을 넣으면 목적지에 도착할 때까지 계속 움직일게!", + "ai_content_4": "대단해! 반복하기 블록을 쓰니 많은 돌을 피하기가 훨씬 수월한걸! 하지만 이렇게 일일이 조종하기는 피곤하다. 나에겐 레이더가 있으니 앞으로 무엇이 나올지 알 수 있어. 앞으로 계속 가다가 앞에 돌이 있으면 피할 수 있도록 해줄래?", + "ai_content_5": "잘했어! 여기까지 와서 아주 기뻐. 이번에는 레이더가 앞에 있는 물체까지의 거리를 말해줄 거야. 이 기능을 사용하여 돌을 피해 보자! 돌까지의 거리가 멀 때는 앞으로 계속 가다가, 거리가 가까워지면 피할 수 있도록 해줄래?", + "ai_content_6": "와~ 멋진걸? 레이더를 활용하여 돌을 잘 피해 나가고 있어! 이번에는 여러 개의 레이더를 사용하여 이리저리 돌들을 피해 나갈 수 있게 만들어줄래?", + "ai_content_7": "휴~ 지구에 점점 가까워지고 있어! 돌을 피할 때 기왕이면 더 안전한 길로 가고 싶어! 아마도 돌이 더 멀리 있는 쪽이 더 안전한 길이겠지? 위쪽 레이더와 아래쪽 레이더를 비교하여 더 안전한 쪽으로 움직이도록 해줄래?", + "ai_content_8": "좋아! 덕분에 무사히 비행하고 있어. 어? 그런데 저게 뭐지? 저건 내가 아주 위급한 상황에서 사용할 수 있는 특별한 에너지야! 이번에는 저 아이템들을 모두 모으며 움직이자!", + "ai_content_9": "훌륭해! 이제 지구까지 얼마 안 남았어. 그런데 앞을 보니 돌들로 길이 꽉 막혀서 지나갈 수가 없잖아? 하지만 걱정하지 마. 아이템을 획득해서 사용하면 앞에 있는 꽉 막힌 돌들을 없앨 수 있다고!", + "ai_content_10": "좋아! 드디어 저기 지구가 보여! 이럴 수가! 이제는 날아오는 돌들을 미리 볼 수가 없잖아? 돌들이 어떻게 날아올지 알지 못해도 지금까지처럼만 움직이면 잘 피할 수 있을 것 같아! 지구까지 가보는 거야!", + "maze_hints_title_1": "시작 방법", + "maze_hints_content_1": "엔트리봇은 어떻게 움직이나요?", + "maze_hints_detail_1": "1. 블록 꾸러미에서 원하는 블록을 꺼내어 “시작하기를 클릭했을 때” 블록과 연결해봐
2. 다 조립했으면, 시작을 눌러봐
3. 나는 네가 조립한 블록대로 위에서부터 순서대로 움직일게", + "maze_hints_title_2": "장애물 뛰어넘기", + "maze_hints_content_2": "장애물이 있으면 어떻게 해야하나요?", + "maze_hints_detail_2": "길을 가다보면 장애물을 만날 수 있어.
장애물이 앞에 있을 때에는 뛰어넘기 블록을 사용해야 해.", + "maze_hints_title_3": "반복 블록(1)", + "maze_hints_content_3": "(3)회 반복하기 블록은 어떻게 사용하나요?", + "maze_hints_detail_3": "같은 행동을 여러번 반복하려면 ~번 반복하기 블록을 사용해야 해.
반복하고 싶은 블록들을 ~번 반복하기 안에 넣고 반복 횟수를 입력하면 돼.", + "maze_hints_title_4": "반복 블록(2)", + "maze_hints_content_4": "~를 만날 때 까지 반복하기 블록은 어떻게 사용하나요?", + "maze_hints_detail_4": "~까지 반복하기'를 사용하면 같은 행동을 언제까지 반복할지를 정해줄 수 있어.
반복하고 싶은 블록들을 ~까지 반복하기안에 넣으면 돼.
그러면 {이미지}와 같은 타일 위에 있는 경우 반복이 멈추게 될 거야.", + "maze_hints_title_5": "만약 블록", + "maze_hints_content_5": "만약 ~라면 블록은 어떻게 동작하나요?", + "maze_hints_detail_5": "만약 앞에 {이미지}가 있다면' 블록을 사용하면 앞에 {이미지}가 있을 때 어떤 행동을 할 지 정해줄 수 있어.
앞에 {이미지}가 있을 때에만 블록 안의 블록들을 실행하고
그렇지 않으면 실행하지 않게 되는 거야.", + "maze_hints_title_6": "반복 블록(3)", + "maze_hints_content_6": "모든 ~를 만날 때 까지 블록은 어떻게 동작하나요?", + "maze_hints_detail_6": "모든 {타일}에 한 번씩 도착할 때까지 그 안에 있는 블록을 반복해서 실행해.
모든 {타일}에 한 번씩 도착하면 반복이 멈추게 될 거야.", + "maze_hints_title_7": "특별 힌트", + "maze_hints_content_7": "너무 어려워요. 도와주세요.", + "maze_hints_detail_7": "내가 가야하는 길을 자세히 봐. 작은 사각형 4개가 보여?
작은 사각형을 도는 블록을 만들고, 반복하기를 사용해 보는것은 어때?", + "maze_hints_title_8": "약속", + "maze_hints_content_8": "약속하기/약속 불러오기 무엇인가요? 어떻게 사용하나요?", + "maze_hints_detail_8": "나를 움직이기 위해 자주 쓰는 블록들의 묶음을 '약속하기' 블록 아래에 조립하여 약속으로 만들 수 있어.
한번 만들어 놓은 약속은 '약속 불러오기' 블록을 사용하여 여러 번 꺼내 쓸 수 있다구.", + "ai_hints_title_1_1": "게임의 목표", + "ai_hints_content_1_1": "돌을 피해 오른쪽 행성까지 안전하게 이동할 수 있도록 도와주세요.", + "ai_hints_detail_1_1": "돌을 피해 오른쪽 행성까지 안전하게 이동할 수 있도록 도와주세요.", + "ai_hints_title_1_2": "시작 방법", + "ai_hints_content_1_2": "어떻게 시작할 수 있나요?", + "ai_hints_detail_1_2": "1. 블록 꾸러미에서 원하는 블록을 꺼내어 “시작하기를 클릭했을 때” 블록과 연결해봐
2. 다 조립했으면, 시작을 눌러봐
3. 나는 네가 조립한 블록대로 위에서부터 순서대로 움직일게", + "ai_hints_title_1_3": "움직이게 하기", + "ai_hints_content_1_3": "엔트리봇은 어떻게 움직이나요?", + "ai_hints_detail_1_3": "나는 위쪽으로 가거나 앞으로 가거나 아래쪽으로 갈 수 있어.
방향을 정할 때에는 돌이 없는 방향으로 안전하게 갈 수 있도록 해줘.
나를 화면 밖으로 내보내면 우주미아가 되어버리니 조심해!", + "ai_hints_title_2_1": "게임의 목표", + "ai_hints_content_2_1": "반복하기 블록으로 돌들을 피할 수 있도록 도와주세요.", + "ai_hints_detail_2_1": "반복하기 블록으로 돌들을 피할 수 있도록 도와주세요.", + "ai_hints_title_2_2": "반복 블록", + "ai_hints_content_2_2": "반복 블록은 무슨 블록인가요?", + "ai_hints_detail_2_2": "휴~ 이번에 가야 할 길은 너무 멀어서 하나씩 조립하기는 힘들겠는걸? 반복하기블록을 사용해봐.
똑같이 반복되는 블록들을 반복하기 블록으로 묶어주면 아주 긴 블록을 짧게 줄여줄 수 있어!", + "ai_hints_content_3_1": "만약 블록으로 돌을 피할 수 있도록 도와주세요.", + "ai_hints_title_3_2": "만약 블록(1)", + "ai_hints_content_3_2": "만약 ~라면 블록은 어떻게 동작하나요?", + "ai_hints_detail_3_2": "만약 앞에 ~가 있다면 / 아니면 블록을 사용하면 내 바로 앞에 돌이 있는지 없는지 확인해서 다르게 움직일 수 있어~
만약 내 바로 앞에 돌이 있다면 '만약' 아래에 있는 블록들을 실행하고 돌이 없으면 '아니면' 안에 있는 블록들을 실행할 거야.
내 바로 앞에 돌이 있을 때와 없을 때, 어떻게 움직일지 잘 결정해줘~", + "ai_hints_content_4_1": "레이더의 사용 방법을 익히고 돌을 피해보세요.", + "ai_hints_detail_4_1": "레이더의 사용 방법을 익히고 돌을 피해보세요.", + "ai_hints_title_4_2": "레이더(1)", + "ai_hints_content_4_2": "레이더란 무엇인가요? 어떻게 활용할 수 있나요?", + "ai_hints_detail_4_2": "레이더는 지금 내가 물체와 얼마나 떨어져 있는지 알려주는 기계야.
만약 바로 내 앞에 무엇인가 있다면 앞쪽 레이더는 '1'을 보여줘.
또, 레이더는 혼자 있을 때 보다 만약 <사실>이라면 / 아니면 블록과
같이 쓰이면 아주 강력하게 쓸 수 있어.
예를 들어 내 앞에 물체와의 거리가 1보다 크다면 나는 안전하게 앞으로 갈 수 있겠지만, 아니라면 위나 아래쪽으로 피하도록 할 수 있지.", + "ai_hints_title_4_3": "만약 블록(2)", + "ai_hints_content_4_3": "만약 <사실>이라면 블록은 어떻게 사용하나요?", + "ai_hints_detail_4_3": "만약 <사실>이라면 / 아니면 블록은 <사실> 안에 있는 내용이 맞으면 '만약' 아래에 있는 블록을 실행하고, 아니면 '아니면' 아래에 있는 블록을 실행해.
어떤 상황에서 다르게 움직이고 싶은 지를 잘 생각해서 <사실> 안에 적절한 판단 조건을 만들어 넣어봐.
판단 조건을 만족해서 '만약' 아래에 있는 블록을 실행하고 나면 '아니면' 아래에 있는 블록들은 실행되지 않는다는 걸 기억해!", + "ai_hints_content_5_1": "레이더를 활용해 돌을 쉽게 피할 수 있도록 도와주세요.", + "ai_hints_detail_5_1": "레이더를 활용해 돌을 쉽게 피할 수 있도록 도와주세요.", + "ai_hints_title_5_2": "만약 블록(3)", + "ai_hints_content_5_2": "만약 블록이 겹쳐져 있으면 어떻게 동작하나요?", + "ai_hints_detail_5_2": "만약 ~ / 아니면 블록안에도 만약 ~ / 아니면 블록을 넣을 수 있어! 이렇게 되면 다양한 상황에서 내가 어떻게 행동해야 할지 정할 수 있어.
예를 들어 앞에 돌이 길을 막고 있을때와 없을때의 행동을 정한다음, 돌이 있을때의 상황에서도 상황에 따라 위쪽으로 갈지 아래쪽으로 갈지 선택 할 수 있어", + "ai_hints_title_6_1": "레이더(2)", + "ai_hints_content_6_1": "위쪽 레이더와 아래쪽 레이더의 값을 비교하고 싶을 땐 어떻게 하나요?", + "ai_hints_detail_6_1": "([위쪽]레이더) 블록은 위쪽 물체까지의 거리를 뜻하는 블록이야.
아래쪽과 위쪽 중에서 어느 쪽에 돌이 더 멀리 있는지 확인하기 위해서 쓸 수 있는 블록이지.
돌을 피해가는 길을 선택할 때에는 돌이 멀리 떨어져 있는 쪽으로 피하는게 앞으로 멀리 가는데 유리할거야~", + "ai_hints_content_7_1": "아이템을 향해 이동하여 돌을 피해보세요.", + "ai_hints_detail_7_1": "아이템을 향해 이동하여 돌을 피해보세요.", + "ai_hints_title_7_2": "물체 이름 확인", + "ai_hints_content_7_2": "앞으로 만날 물체의 이름을 확인해서 무엇을 할 수 있나요?", + "ai_hints_detail_7_2": "아이템을 얻기위해서는 아이템이 어디에 있는지 확인할 필요가 있어.
그럴 때 사용할 수 있는 블록이 [위쪽] 물체는 [아이템]인가? 블록이야.
이 블록을 활용하면 아이템이 어느 위치에 있는지 알 수 있고 아이템이 있는 방향으로 움직이도록 블록을 조립할 수 있어.", + "ai_hints_content_8_1": "아이템을 적절하게 사용해서 돌을 피해보세요.", + "ai_hints_detail_8_1": "아이템을 적절하게 사용해서 돌을 피해보세요.", + "ai_hints_title_8_2": "아이템", + "ai_hints_content_8_2": "아이템은 어떻게 얻고 사용하나요?", + "ai_hints_detail_8_2": "돌들을 이리저리 잘 피해 나가더라도 앞이 모두 돌들로 꽉 막혀있을 땐 빠져나갈 방법이 없겠지? 그럴 때에는 아이템사용 블럭을 사용해봐.
이 블록은 내 앞의 돌들을 모두 없애는 블록이야.
단, 아이템이 있어야지만 블록을 사용할 수 있고, 아이템은 이미지를 지나면 얻을 수 있어.", + "ai_hints_content_9_1": "지금까지 배운 것들을 모두 활용해서 최대한 멀리 가보세요.", + "ai_hints_detail_9_1": "지금까지 배운 것들을 모두 활용해서 최대한 멀리 가보세요.", + "ai_hints_title_9_2": "그리고", + "ai_hints_content_9_2": "그리고 블록은 어떻게 사용하나요?", + "ai_hints_detail_9_2": "그리고 블록에는 여러개의 조건을 넣을 수 있어, 넣은 모든 조건이 사실일때만 사실이 되어 만약 블록 안에 있는 블록이 실행되고, 하나라도 거짓이 있으면 거짓으로 인식해서 그 안에 있는 블록을 실행하지 않아", + "maze_text_goal_1": "move(); 명령어를 사용하여 부품 상자까지 나를 이동시켜줘!", + "maze_text_goal_2": "jump(); 명령어로 장애물을 피해 부품 상자까지 나를 이동시켜줘!", + "maze_text_goal_3": "left(); right(); 명령어로 부품상자까지 나를 이동시켜줘!", + "maze_text_goal_4": "여러가지 명령어를 사용하여 부품상자까지 나를 이동시켜줘!", + "maze_text_goal_5": "두 부품상자에 다 갈 수 있도록 나를 이동시켜줘!", + "maze_text_goal_6": "두 부품상자에 다 갈 수 있도록 나를 이동시켜줘!", + "maze_text_goal_7": "for 명령어를 사용하여 친구가 있는 곳 까지 나를 이동시켜줘!", + "maze_text_goal_8": "for 명령어를 사용하고, 장애물을 피해 친구가 있는 곳 까지 나를 이동시켜줘!", + "maze_text_goal_9": "while 명령어를 사용하여 친구가 있는 곳 까지 나를 이동시켜줘!", + "maze_text_goal_10": "if와 while 명령어를 사용하여 친구가 있는 곳 까지 나를 이동시켜줘!", + "maze_text_goal_11": "if와 while 명령어를 사용하여 친구가 있는 곳 까지 나를 이동시켜줘!", + "maze_text_goal_12": "if와 while 명령어를 사용하여 친구가 있는 곳 까지 나를 이동시켜줘!", + "maze_text_goal_13": "while과 for 명령어를 사용하여 모든 친구들을 만날 수 있도록 나를 이동시켜줘!", + "maze_text_goal_14": "while과 for 명령어를 사용하여 모든 친구들을 만날 수 있도록 나를 이동시켜줘!", + "maze_text_goal_15": "함수를 불러와서 배터리까지 나를 이동시켜줘!", + "maze_text_goal_16": "함수에 명령어를 넣고 함수를 불러와서 배터리까지 나를 이동시켜줘!", + "maze_text_goal_17": "함수에 명령어를 넣고 함수를 불러와서 배터리까지 나를 이동시켜줘!", + "maze_text_goal_18": "함수에 명령어를 넣고 함수를 불러와서 배터리까지 나를 이동시켜줘!", + "maze_text_goal_19": "함수에 명령어를 넣고 함수를 불러와서 배터리까지 나를 이동시켜줘!", + "maze_text_goal_20": "함수와 다른명령어들을 섞어 사용하여 배터리까지 나를 이동시켜줘!", + "above_radar": "위쪽 레이더", + "bottom_radar": "아래쪽 레이더", + "front_radar": "앞쪽 레이더", + "above_object": "위쪽 물체", + "front_object": "앞쪽 물체", + "object_below": "아래쪽 물체", + "destination": "목적지", + "asteroids": "돌", + "item": "아이템", + "wall": "벽", + "buy_now": "구매바로가기", + "goals": "목표", + "instructions": "이용 안내", + "object_info": "오브젝트 정보", + "entry_basic_mission": "엔트리 기본 미션", + "entry_application_mission": "엔트리 응용 미션", + "maze_move_forward": "앞으로 한 칸 이동", + "maze_when_run": "시작하기를 클릭했을때", + "maze_turn_left": "왼쪽으로 회전", + "maze_turn_right": "오른쪽으로 회전", + "maze_repeat_times_1": "", + "maze_repeat_times_2": "번 반복하기", + "maze_repeat_until_1": "", + "maze_repeat_until_2": "을 만날때까지 반복", + "maze_call_function": "약속 불러오기", + "maze_function": "약속하기", + "maze_repeat_until_all_1": "모든", + "maze_repeat_until_all_2": "만날 때 까지 반복", + "command_guide": "명령어 도움말", + "ai_success_msg_1": "덕분에 무사히 지구에 도착할 수 있었어! 고마워!", + "ai_success_msg_2": "다행이야! 덕분에", + "ai_success_msg_3": "번 만큼 앞쪽으로 갈 수 있어서 지구에 구조 신호를 보냈어! 이제 지구에서 구조대가 올거야! 고마워!", + "ai_success_msg_4": "좋았어!", + "ai_cause_msg_1": "이런, 어떻게 움직여야 할 지 더 말해줄래?", + "ai_cause_msg_2": "아이쿠! 정말로 위험했어! 다시 도전해보자", + "ai_cause_msg_3": "우와왓! 가야할 길에서 벗어나버리면 우주 미아가 되버릴꺼야. 다시 도전해보자", + "ai_cause_msg_4": "너무 복잡해, 이 블록을 써서 움직여볼래?", + "ai_move_forward": "앞으로 가기", + "ai_move_above": "위쪽으로 가기", + "ai_move_under": "아래쪽으로 가기", + "ai_repeat_until_dest": "목적지에 도달 할 때까지 반복하기", + "ai_if_front_1": "만약 앞에", + "ai_if_front_2": "가 있다면", + "ai_else": "아니면", + "ai_if_1": "만약", + "ai_if_2": "이라면", + "ai_use_item": "아이템 사용", + "ai_radar": "레이더", + "ai_above": "위쪽", + "ai_front": "앞쪽", + "ai_under": "아래쪽", + "ai_object_is_1": "", + "ai_object_is_2": "물체는", + "challengeMission": "다른 미션 도전하기", + "withTeacher": "함께 만든 선생님들", + "host": "주최", + "support": "후원", + "subjectivity": "주관", + "learnMore": " 더 배우고 싶어요", + "ai_object_is_3": "인가?", + "stage_is_not_available": "아직 진행할 수 없는 스테이지입니다. 순서대로 스테이지를 진행해 주세요.", + "progress_not_saved": "진행상황이 저장되지 않습니다.", + "want_refresh": "이 페이지를 새로고침 하시겠습니까?", + "monthly_entry_grade": "초등학교 3학년 ~ 중학교 3학년", + "monthly_entry_contents": "매월 발간되는 월간엔트리와 함께 소프트웨어 교육을 시작해 보세요! 차근차근 따라하며 쉽게 익힐 수 있도록 가볍게 구성되어있습니다. 기본, 응용 콘텐츠와 더 나아가기까지! 매월 업데이트되는 8개의 콘텐츠와 교재를 만나보세요~", + "monthly_entry_etc1": "*메인 페이지의 월간 엔트리 추천코스를 활용하면 더욱 쉽게 수업을 할 수 있습니다.", + "monthly_entry_etc2": "*월간엔트리는 학기 중에만 발간됩니다.", + "group_make_lecture_1": "내가 만든 강의가 없습니다.", + "group_make_lecture_2": "'학습하기>오픈 강의> 강의'에서", + "group_make_lecture_3": "우리반 학습내용에 추가하고 싶은 강의를 만들어 주세요.", + "group_make_lecture_4": "강의 만들기", + "group_add_lecture_1": "관심 강의가 없습니다.", + "group_add_lecture_2": "'학습하기>오픈 강의> 강의'에서 우리반 학습내용에", + "group_add_lecture_3": "추가하고 싶은 강의를 관심강의로 등록해 주세요.", + "group_add_lecture_4": "강의 보기", + "group_make_course_1": "내가 만든 코스가 없습니다.", + "group_make_course_2": "'학습하기 > 오픈 강의 > 코스 만들기'에서", + "group_make_course_3": "우리반 학습내용에 추가하고 싶은 코스를 만들어 주세요.", + "group_make_course_4": "코스 만들기", + "group_add_course_1": "관심 코스가 없습니다.", + "group_add_course_2": "'학습하기 > 오픈 강의 > 코스'에서 우리반 학습내용에", + "group_add_course_3": "추가하고 싶은 코스를 관심코스로 등록해 주세요.", + "group_add_course_4": "코스 보기" +}; +Lang.Msgs = { + "auth_only": "인증된 사용자만 이용이 가능합니다.", + "runtime_error": "실행 오류", + "to_be_continue": "준비 중입니다.", + "warn": "경고", + "error_occured": "다시 한번 시도해 주세요. 만약 같은 문제가 다시 발생 하면 '제안 및 건의' 게시판에 문의 바랍니다. ", + "list_can_not_space": "리스트의 이름은 빈 칸이 될 수 없습니다.", + "sign_can_not_space": "신호의 이름은 빈 칸이 될 수 없습니다.", + "variable_can_not_space": "변수의 이름은 빈 칸이 될 수 없습니다." +}; +Lang.Users = { + "auth_failed": "인증에 실패하였습니다", + "birth_year": "태어난 해", + "birth_year_before_1990": "1990년 이전", + "edit_personal": "정보수정", + "email": "이메일", + "email_desc": "새 소식이나 정보를 받을 수 있 이메일 주소", + "email_inuse": "이미 등록된 메일주소 입니다", + "email_match": "이메일 주소를 올바르게 입력해 주세요", + "forgot_password": "암호를 잊으셨습니까?", + "job": "직업", + "language": "언어", + "name": "이름", + "name_desc": "사이트내에서 표현될 이름 또는 별명", + "name_not_empty": "이름을 반드시 입력하세요", + "password": "암호", + "password_desc": "최소 4자이상 영문자와 숫자, 특수문자", + "password_invalid": "암호가 틀렸습니다", + "password_long": "암호는 4~20자 사이의 영문자와 숫자, 특수문자로 입력해 주세요", + "password_required": "암호는 필수입력 항목입니다", + "project_list": "작품 조회", + "regist": "가입 완료", + "rememberme": "자동 로그인", + "repeat_password": "암호 확인", + "repeat_password_desc": "암호를 한번더 입력해 주세요", + "repeat_password_not_match": "암호가 일치하지 않습니다", + "sex": "성별", + "signup_required_for_save": "저장을 하려면 로그인이 필요합니다.", + "username": "아이디", + "username_desc": "로그인시 사용할 아이디", + "username_inuse": "이미 사용중인 아이디 입니다", + "username_long": "아이디는 4~20자 사이의 영문자로 입력해 주세요", + "username_unknown": "존재하지 않는 사용자 입니다" +}; +Lang.Workspace = { + "new_project": "새 프로젝트", + "add_object": "오브젝트 추가하기", + "all": "전체", + "animal": "동물", + "arduino_entry": "아두이노 연결 프로그램", + "arduino_program": "아두이노 프로그램", + "arduino_sample": "엔트리 연결블록", + "arduino_driver": "아두이노 드라이버", + "cannot_add_object": "실행중에는 오브젝트를 추가할 수 없습니다.", + "cannot_add_picture": "실행중에는 모양을 추가할 수 없습니다.", + "cannot_add_sound": "실행중에는 소리를 추가할 수 없습니다.", + "cannot_edit_click_to_stop": "실행중에는 수정할 수 없습니다.\n클릭하여 정지하기.", + "cannot_open_private_project": "비공개 작품은 불러올 수 없습니다. 홈으로 이동합니다.", + "cannot_save_running_project": "실행 중에는 저장할 수 없습니다.", + "character_gen": "캐릭터 만들기", + "check_runtime_error": "빨간색으로 표시된 블록을 확인해 주세요.", + "context_download": "PC에 저장", + "context_duplicate": "복제", + "context_remove": "삭제", + "context_rename": "이름 수정", + "coordinate": "좌표", + "create_function": "함수 만들기", + "direction": "이동 방향", + "drawing": "직접 그리기", + "enter_list_name": "새로운 리스트의 이름을 입력하세요(10글자 이하)", + "enter_name": "새로운 이름을 입력하세요", + "enter_new_message": "새로운 신호의 이름을 입력하세요.", + "enter_variable_name": "새로운 변수의 이름을 입력하세요(10글자 이하)", + "family": "엔트리봇 가족", + "fantasy": "판타지/기타", + "file_new": "새로 만들기", + "file_open": "온라인 작품 불러오기", + "file_upload": "오프라인 작품 불러오기", + "file_upload_login_check_msg": "오프라인 작품을 불러오기 위해서는 로그인을 해야 합니다.", + "file_save": "저장하기", + "file_save_as": "복사본으로 저장하기", + "file_save_download": "내 컴퓨터에 저장하기", + "func": "함수", + "function_create": "함수 추가", + "interface": "인터페이스", + "landscape": "배경", + "list": "리스트", + "list_add_calcel": "리스트 추가 취소", + "list_add_calcel_msg": "리스트 추가를 취소하였습니다.", + "list_add_fail": "리스트 추가 실패", + "list_add_fail_msg1": "같은 이름의 리스트가 이미 존재합니다.", + "list_add_fail_msg2": "리스트의 이름이 적절하지 않습니다.", + "list_add_ok": "리스트 추가 완료", + "list_add_ok_msg": "을(를) 추가하였습니다.", + "list_create": "리스트 추가", + "list_dup": "같은 이름의 리스트가 이미 존재합니다.", + "list_newname": "새로운 이름", + "list_remove": "리스트 삭제", + "list_rename": "리스트 이름 변경", + "list_rename_failed": "리스트 이름 변경 실패", + "list_rename_ok": "리스트의 이름이 성공적으로 변경 되었습니다.", + "list_too_long": "리스트의 이름이 너무 깁니다.", + "message": "신호", + "message_add_cancel": "신호 추가 취소", + "message_add_cancel_msg": "신호 추가를 취소하였습니다.", + "message_add_fail": "신호 추가 실패", + "message_add_fail_msg": "같은 이름의 신호가 이미 존재합니다.", + "message_add_ok": "신호 추가 완료", + "message_add_ok_msg": "을(를) 추가하였습니다.", + "message_create": "신호 추가", + "message_dup": "같은 이름의 신호가 이미 존재합니다.", + "message_remove": "신호 삭제", + "message_remove_canceled": "신호 삭제를 취소하였습니다.", + "message_rename": "신호 이름을 변경하였습니다.", + "message_rename_failed": "신호 이름 변경에 실패하였습니다. ", + "message_rename_ok": "신호의 이름이 성공적으로 변경 되었습니다.", + "message_too_long": "신호의 이름이 너무 깁니다.", + "no_message_to_remove": "삭제할 신호가 없습니다", + "no_use": "사용되지 않음", + "no_variable_to_remove": "삭제할 변수가 없습니다.", + "no_variable_to_rename": "변경할 변수가 없습니다.", + "object_not_found": "블록에서 지정한 오브젝트가 존재하지 않습니다.", + "object_not_found_for_paste": "붙여넣기 할 오브젝트가 없습니다.", + "people": "일반 사람들", + "picture_add": "모양 추가", + "plant": "식물", + "project": "작품", + "project_copied": "의 사본", + "PROJECTDEFAULTNAME": ['멋진', '재밌는', '착한', '큰', '대단한', '잘생긴', '행운의'], + "remove_object": "오브젝트 삭제", + "remove_object_msg": "(이)가 삭제되었습니다.", + "removed_msg": "(이)가 성공적으로 삭제 되었습니다.", + "rotate_method": "회전방식", + "rotation": "방향", + "run": "시작하기", + "saved": "저장완료", + "saved_msg": "(이)가 저장되었습니다.", + "save_failed": "저장시 문제가 발생하였습니다. 다시 시도해 주세요.", + "select_library": "라이브러리 선택", + "select_sprite": "적용할 스프라이트를 하나 이상 선택하세요.", + "shape_remove_fail": "모양 삭제 실패", + "shape_remove_fail_msg": "적어도 하나 이상의 모양이 존재하여야 합니다.", + "shape_remove_ok": "모양이 삭제 되었습니다. ", + "shape_remove_ok_msg": "이(가) 삭제 되었습니다.", + "sound_add": "소리 추가", + "sound_remove_fail": "소리 삭제 실패", + "sound_remove_ok": "소리 삭제 완료", + "sound_remove_ok_msg": "이(가) 삭제 되었습니다.", + "stop": "정지하기", + "pause": "일시정지", + "restart": "다시시작", + "speed": "속도 조절하기", + "tab_attribute": "속성", + "tab_code": "블록", + "tab_picture": "모양", + "tab_sound": "소리", + "tab_text": "글상자", + "textbox": "글상자", + "textbox_edit": "글상자 편집", + "textbox_input": "글상자의 내용을 입력해주세요.", + "things": "물건", + "upload": "파일 업로드", + "upload_addfile": "파일추가", + "variable": "변수", + "variable_add_calcel": "변수 추가 취소", + "variable_add_calcel_msg": "변수 추가를 취소하였습니다.", + "variable_add_fail": "변수 추가 실패", + "variable_add_fail_msg1": "같은 이름의 변수가 이미 존재합니다.", + "variable_add_fail_msg2": "변수의 이름이 적절하지 않습니다.", + "variable_add_ok": "변수 추가 완료", + "variable_add_ok_msg": "을(를) 추가하였습니다.", + "variable_create": "변수 추가", + "variable_dup": "같은 이름의 변수가 이미 존재합니다.", + "variable_newname": "새로운 이름", + "variable_remove": "변수 삭제", + "variable_remove_canceled": "변수 삭제를 취소하였습니다.", + "variable_rename": "변수 이름을 변경합니다. ", + "variable_rename_failed": "변수 이름 변경에 실패하였습니다. ", + "variable_rename_msg": "'변수의 이름이 성공적으로 변경 되었습니다.'", + "variable_rename_ok": "변수의 이름이 성공적으로 변경 되었습니다.", + "variable_select": "변수를 선택하세요", + "variable_too_long": "변수의 이름이 너무 깁니다.", + "vehicle": "탈것", + "add_object_alert_msg": "오브젝트를 추가해주세요", + "add_object_alert": "경고", + "create_variable_block": "변수 만들기", + "create_list_block": "리스트 만들기", + "Variable_Timer": "초시계", + "Variable_placeholder_name": "변수 이름", + "Variable_use_all_objects": "모든 오브젝트에서 사용", + "Variable_use_this_object": "이 오브젝트에서 사용", + "Variable_used_at_all_objects": "모든 오브젝트에서 사용되는 변수", + "Variable_create_cloud": "공유 변수로 사용
(서버에 저장됩니다)", + "Variable_used_at_special_object": "특정 오브젝트에서만 사용되는 변수 입니다. ", + "draw_new": "새로 그리기", + "painter_file": "파일 ▼", + "painter_file_save": "저장하기", + "painter_file_saveas": "새 모양으로 저장", + "painter_edit": "편집 ▼", + "get_file": "가져오기", + "copy_file": "복사하기", + "cut_picture": "자르기", + "paste_picture": "붙이기", + "remove_all": "모두 지우기", + "new_picture": "새그림", + "picture_size": "크기", + "picture_rotation": "회전", + "thickness": "굵기", + "textStyle": "글자", + "add_picture": "모양 추가", + "select_picture": "모양 선택", + "select_sound": "소리 선택", + "Size": "크기", + "show_variable": "변수 보이기", + "default_value": "기본값 ", + "slide": "슬라이드", + "min_value": "최솟값", + "max_value": "최댓값", + "number_of_list": "리스트 항목 수", + "use_all_objects": "모든 오브젝트에 사용", + "list_name": "리스트 이름", + "list_used_specific_objects": "특정 오브젝트에서만 사용되는 리스트 입니다. ", + "List_used_all_objects": "모든 오브젝트에서 사용되는 리스트", + "Scene_delete_error": "장면은 최소 하나 이상 존재해야 합니다.", + "Scene_add_error": "장면은 최대 10개까지 추가 가능합니다.", + "replica_of_object": "의 복제본", + "will_you_delete_scene": "장면은 한번 삭제하면 취소가 불가능 합니다. \n정말 삭제 하시겠습니까?", + "duplicate_scene": "복제하기", + "block_explain": "블록 설명 ", + "block_intro": "블록을 클릭하면 블록에 대한 설명이 나타납니다.", + "blocks_reference": "블록 설명", + "hardware_guide": "하드웨어 연결 안내", + "show_list_workspace": "리스트 보이기", + "List_create_cloud": "공유 리스트로 사용
(서버에 저장됩니다)", + "confirm_quit": "바꾼 내용을 저장하지 않았습니다.", + "confirm_load_temporary": "저장되지 않은 작품이 있습니다. 여시겠습니까?", + "login_to_save": "로그인후에 저장 바랍니다.", + "cannot_save_in_edit_func": "함수 편집중에는 저장할 수 없습니다.", + "new_object": "새 오브젝트", + "arduino_connect": "하드웨어 연결", + "arduino_connect_success": "하드웨어가 연결되었습니다.", + "confirm_load_header": "작품 복구", + "uploading_msg": "업로드 중입니다", + "upload_fail_msg": "업로드에 실패하였습니다.
다시 한번 시도해주세요.", + "file_converting_msg": "파일 변환 중입니다.", + "file_converting_fail_msg": "파일 변환에 실패하였습니다.", + "fail_contact_msg": "문제가 계속된다면
contact_entry@entrylabs.org로 문의해주세요.", + "saving_msg": "저장 중입니다", + "saving_fail_msg": "저장에 실패하였습니다.
다시 한번 시도해주세요.", + "loading_msg": "불러오는 중입니다", + "loading_fail_msg": "불러오기에 실패하였습니다.
다시 한번 시도해주세요.", + "restore_project_msg": "정상적으로 저장되지 않은 작품이 있습니다. 해당 작품을 복구하시겠습니까?", + "quit_stop_msg": "저장 중에는 종료하실 수 없습니다.", + "ent_drag_and_drop": "업로드 하려면 파일을 놓으세요", + "not_supported_file_msg": "지원하지 않은 형식의 파일입니다.", + "broken_file_msg": "파일이 깨졌거나 잘못된 파일을 불러왔습니다.", + "check_audio_msg": "MP3, WAV 파일만 업로드가 가능합니다." +}; +Lang.code = "코드보기"; +Lang.EntryStatic = { + "lecture_is_open_true": "공개", + "lecture_is_open_false": "비공개", + "category_all": "모든 작품", + "category_game": "게임", + "category_animation": "애니메이션", + "category_media_art": "미디어 아트", + "category_physical": "피지컬", + "category_etc": "기타", + "lecture_required_time_1": " ~ 15분", + "lecture_required_time_2": "15분 ~ 30분", + "lecture_required_time_3": "30분 ~ 45분", + "lecture_required_time_4": "45 분 ~ 60분", + "lecture_required_time_5": "1시간 이상", + "usage_event": "이벤트", + "usage_signal": "신호보내기", + "usage_scene": "장면", + "usage_repeat": "반복", + "usage_condition_repeat": "조건반복", + "usage_condition": "조건", + "usage_clone": "복제본", + "usage_rotation": "회전", + "usage_coordinate": "좌표이동", + "usage_arrow_move": "화살표이동", + "usage_shape": "모양", + "usage_speak": "말하기", + "usage_picture_effect": "그림효과", + "usage_textBox": "글상자", + "usage_draw": "그리기", + "usage_sound": "소리", + "usage_confirm": "확인", + "usage_comp_operation": "비교연산", + "usage_logical_operation": "논리연산", + "usage_math_operation": "수리연산", + "usage_random": "무작위수", + "usage_timer": "초시계", + "usage_variable": "변수", + "usage_list": "리스트", + "usage_ask_answer": "묻고답하기", + "usage_function": "함수", + "usage_arduino": "아두이노", + "concept_resource_analytics": "자료수집/분석/표현", + "concept_procedual": "알고리즘과 절차", + "concept_abstractive": "추상화", + "concept_individual": "문제분해", + "concept_automation": "자동화", + "concept_simulation": "시뮬레이션", + "concept_parallel": "병렬화", + "subject_korean": "국어", + "subject_english": "영어", + "subject_mathmatics": "수학", + "subject_social": "사회", + "subject_science": "과학", + "subject_music": "음악", + "subject_paint": "미술", + "subject_athletic": "체육", + "subject_courtesy": "도덕", + "subject_progmatic": "실과", + "lecture_grade_1": "초1", + "lecture_grade_2": "초2", + "lecture_grade_3": "초3", + "lecture_grade_4": "초4", + "lecture_grade_5": "초5", + "lecture_grade_6": "초6", + "lecture_grade_7": "중1", + "lecture_grade_8": "중2", + "lecture_grade_9": "중3", + "lecture_grade_10": "일반", + "lecture_level_1": "쉬움", + "lecture_level_2": "중간", + "lecture_level_3": "어려움", + "listEnable": "리스트", + "functionEnable": "함수", + "messageEnable": "신호", + "objectEditable": "오브젝트", + "pictureeditable": "모양", + "sceneEditable": "장면", + "soundeditable": "소리", + "variableEnable": "변수", + "e_1": "초등 1학년", + "e_2": "초등 2학년", + "e_3": "초등 3학년", + "e_4": "초등 4학년", + "e_5": "초등 5학년", + "e_6": "초등 6학년", + "m_1": "중등 1학년", + "m_2": "중등 2학년", + "m_3": "중등 3학년", + "general": "일반", + "curriculum_is_open_true": "공개", + "curriculum_open_false": "비공개", + "notice": "공지사항", + "qna": "묻고답하기", + "tips": "노하우&팁", + "free": "자유 게시판", + "report": "제안 및 건의", + "art_category_all": "모든 작품", + "art_category_game": "게임", + "art_category_animation": "애니메이션", + "art_category_physical": "피지컬", + "art_category_etc": "기타", + "art_category_media": "미디어 아트", + "art_sort_updated": "최신순", + "art_sort_visit": "조회순", + "art_sort_likeCnt": "좋아요순", + "art_sort_comment": "댓글순", + "art_period_all": "전체기간", + "art_period_day": "오늘", + "art_period_week": "최근 1주일", + "art_period_month": "최근 1개월", + "art_period_three_month": "최근 3개월", + "level_high": "상", + "level_mid": "중", + "level_row": "하", + "discuss_sort_created": "최신순", + "discuss_sort_visit": "조회순", + "discuss_sort_likesLength": "좋아요순", + "discuss_sort_commentsLength": "댓글순", + "discuss_period_all": "전체기간", + "discuss_period_day": "오늘", + "discuss_period_week": "최근 1주일", + "discuss_period_month": "최근 1개월", + "discuss_period_three_month": "최근 3개월" +}; +Lang.Helper = { + "when_run_button_click": "시작하기 버튼을 클릭하면 아래에 연결된 블록들을 실행합니다.", + "when_some_key_pressed": "지정된 키를 누르면 아래에 연결된 블록들을 실행 합니다", + "mouse_clicked": "마우스를 클릭 했을 때 아래에 연결된 블록들을 실행 합니다.", + "mouse_click_cancled": "마우스 클릭을 해제 했을 때 아래에 연결된 블록들을 실행합니다.", + "when_object_click": "해당 오브젝트를 클릭했을 때 아래에 연결된 블록들을 실행합니다.", + "when_object_click_canceled": "해당 오브젝트 클릭을 해제 했을때 아래에 연결된 블록들을 실행 합니다.", + "when_message_cast": "해당 신호를 받으면 연결된 블록들을 실행합니다.", + "message_cast": "목록에 선택된 신호를 보냅니다.", + "message_cast_wait": "목록에 선택된 신호를 보내고, 해당 신호를 받는 블록들의 실행이 끝날때 까지 기다립니다.", + "when_scene_start": "장면이 시작되면 아래에 연결된 블록들을 실행 합니다. ", + "start_scene": "선택한 장면을 시작 합니다.", + "start_neighbor_scene": "이전 장면 또는 다음 장면을 시작합니다.", + "wait_second": "설정한 시간만큼 기다린 후 다음 블록을 실행 합니다.", + "repeat_basic": "설정한 횟수만큼 감싸고 있는 블록들을 반복 실행합니다.", + "repeat_inf": "감싸고 있는 블록들을 계속해서 반복 실행합니다.", + "repeat_while_true": "판단이 참인 동안 감싸고 있는 블록들을 반복 실행합니다.", + "stop_repeat": "이 블록을 감싸는 가장 가까운 반복 블록의 반복을 중단 합니다.", + "_if": "만일 판단이 참이면, 감싸고 있는 블록들을 실행합니다.", + "if_else": "만일 판단이 참이면, 첫 번째 감싸고 있는 블록들을 실행하고, 거짓이면 두 번째 감싸고 있는 블록들을 실행합니다.", + "restart_project": "모든 오브젝트를 처음부터 다시 실행합니다.", + "stop_object": "모두 : 모든 오브젝트들이 즉시 실행을 멈춥니다.
자신 : 해당 오브젝트의 모든 블록들을 멈춥니다.
이 코드 : 이 블록이 포함된 코드가 즉시 실행을 멈춥니다.
자신의 다른 코드 : 해당 오브젝트 중 이 블록이 포함된 코드를 제외한 모든 코드가 즉시 실행을 멈춥니다.", + "wait_until_true": "판단이 참이 될 때까지 실행을 멈추고 기다립니다.", + "when_clone_start": "해당 오브젝트의 복제본이 새로 생성되었을 때 아래에 연결된 블록들을 실행합니다.", + "create_clone": "선택한 오브젝트의 복제본을 생성합니다.", + "delete_clone": "‘복제본이 처음 생성되었을 때’ 블록과 함께 사용하여 생성된 복제본을 삭제합니다.", + "remove_all_clones": "해당 오브젝트의 모든 복제본을 삭제합니다.", + "move_direction": "설정한 값만큼 오브젝트의 이동방향 화살표가 가리키는 방향으로 움직입니다.", + "move_x": "오브젝트의 X좌표를 설정한 값만큼 바꿉니다. ", + "move_y": "오브젝트의 Y좌표를 설정한 값만큼 바꿉니다.", + "move_xy_time": "오브젝트가 입력한 시간에 걸쳐 x와 y좌표를 설정한 값만큼 바꿉니다", + "locate_object_time": "오브젝트가 입력한 시간에 걸쳐 선택한 오브젝트 또는 마우스 포인터의 위치로 이동합니다. (오브젝트의 중심점이 기준이 됩니다.)", + "locate_x": "오브젝트가 입력한 x좌표로 이동합니다. (오브젝트의 중심점이 기준이 됩니다.)", + "locate_y": "오브젝트가 입력한 y좌표로 이동합니다. (오브젝트의 중심점이 기준이 됩니다.)", + "locate_xy": "오브젝트가 입력한 x와 y좌표로 이동합니다. (오브젝트의 중심점이 기준이 됩니다.)", + "locate_xy_time": "오브젝트가 입력한 시간에 걸쳐 지정한 x, y좌표로 이동합니다. (오브젝트의 중심점이 기준이 됩니다.)", + "locate": "오브젝트가 선택한 오브젝트 또는 마우스 포인터의 위치로 이동합니다. (오브젝트의 중심점이 기준이 됩니다.)", + "rotate_absolute": "해당 오브젝트의 방향을 입력한 각도로 정합니다.", + "rotate_by_time": "오브젝트의 방향을 입력한 시간에 걸쳐 입력한 각도만큼 시계방향으로 회전합니다. (오브젝트의 중심점을 기준으로 회전합니다.)", + "rotate_relative": "오브젝트의 방향을 입력한 각도만큼 시계방향으로 회전합니다. (오브젝트의 중심점을 기준으로 회전합니다.)", + "direction_absolute": "해당 오브젝트의 이동 방향을 입력한 각도로 정합니다.", + "direction_relative": "오브젝트의 이동 방향을 입력한 각도만큼 회전합니다.", + "move_to_angle": "설정한 각도 방향으로 입력한 값만큼 움직입니다. (실행화면 위쪽이 0도, 시계방향으로 갈수록 각도 증가)", + "see_angle_object": "해당 오브젝트가 다른 오브젝트 또는 마우스 포인터 쪽을 바라봅니다. 오브젝트의 이동방향이 선택된 항목을 향하도록 오브젝트의 방향을 회전해줍니다.", + "bounce_wall": "해당 오브젝트가 화면 끝에 닿으면 튕겨져 나옵니다. ", + "show": "해당 오브젝트를 화면에 나타냅니다.", + "hide": "해당 오브젝트를 화면에서 보이지 않게 합니다.", + "dialog_time": "오브젝트가 입력한 내용을 입력한 시간 동안 말풍선으로 말한 후 다음 블록이 실행됩니다.", + "dialog": "오브젝트가 입력한 내용을 말풍선으로 말하는 동시에 다음 블록이 실행됩니다.", + "remove_dialog": "오브젝트가 말하고 있는 말풍선을 지웁니다.", + "change_to_some_shape": "오브젝트를 선택한 모양으로 바꿉니다. (내부 블록을 분리하면 모양의 번호를 사용하여 모양 선택 가능)", + "change_to_next_shape": "오브젝트의 모양을 다음 모양으로 바꿉니다.", + "set_effect_volume": "해당 오브젝트에 선택한 효과를 입력한 값만큼 줍니다.", + "set_effect_amount": "색깔 : 오브젝트에 색깔 효과를 입력한 값만큼 줍니다. (0~100을 주기로 반복됨)
밝기 : 오브젝트에 밝기 효과를 입력한 값만큼 줍니다. (-100~100 사이의 범위, -100 이하는 -100으로 100 이상은 100으로 처리 됨)
투명도 : 오브젝트에 투명도 효과를 입력한 값만큼 줍니다. (0~100 사이의 범위, 0이하는 0으로, 100 이상은 100으로 처리됨)", + "set_effect": "해당 오브젝트에 선택한 효과를 입력한 값으로 정합니다.", + "set_entity_effect": "해당 오브젝트에 선택한 효과를 입력한 값으로 정합니다.", + "add_effect_amount": "해당 오브젝트에 선택한 효과를 입력한 값만큼 줍니다.", + "change_effect_amount": "색깔 : 오브젝트의 색깔 효과를 입력한 값으로 정합니다. (0~100을 주기로 반복됨)
밝기 : 오브젝트의 밝기 효과를 입력한 값으로 정합니다. (-100~100 사이의 범위, -100 이하는 -100으로 100 이상은 100으로 처리 됨)
투명도 : 오브젝트의 투명도 효과를 입력한 값으로 정합니다. (0~100 사이의 범위, 0이하는 0으로, 100 이상은 100으로 처리됨)", + "change_scale_percent": "해당 오브젝트의 크기를 입력한 값만큼 바꿉니다.", + "set_scale_percent": "해당 오브젝트의 크기를 입력한 값으로 정합니다.", + "change_scale_size": "해당 오브젝트의 크기를 입력한 값만큼 바꿉니다.", + "set_scale_size": "해당 오브젝트의 크기를 입력한 값으로 정합니다.", + "flip_x": "해당 오브젝트의 상하 모양을 뒤집습니다.", + "flip_y": "해당 오브젝트의 좌우 모양을 뒤집습니다.", + "change_object_index": "맨 앞으로 : 해당 오브젝트를 화면의 가장 앞쪽으로 가져옵니다.
앞으로 : 해당 오브젝트를 한 층 앞쪽으로 가져옵니다.
뒤로 : 해당 오브젝트를 한 층 뒤쪽으로 보냅니다.
맨 뒤로 : 해당 오브젝트를 화면의 가장 뒤쪽으로 보냅니다.", + "set_object_order": "해당 오브젝트가 설정한 순서로 올라옵니다.", + "brush_stamp": "오브젝트의 모양을 도장처럼 실행화면 위에 찍습니다.", + "start_drawing": "오브젝트가 이동하는 경로를 따라 선이 그려지기 시작합니다. (오브젝트의 중심점이 기준)", + "stop_drawing": "오브젝트가 선을 그리는 것을 멈춥니다.", + "set_color": "오브젝트가 그리는 선의 색을 선택한 색으로 정합니다.", + "set_random_color": "오브젝트가 그리는 선의 색을 무작위로 정합니다. ", + "change_thickness": "오브젝트가 그리는 선의 굵기를 입력한 값만큼 바꿉니다. (1~무한의 범위, 1 이하는 1로 처리)", + "set_thickness": "오브젝트가 그리는 선의 굵기를 입력한 값으로 정합니다. (1~무한의 범위, 1 이하는 1로 처리)", + "change_opacity": "해당 오브젝트가 그리는 붓의 투명도를 입력한 값만큼 바꿉니다.", + "change_brush_transparency": "해당 오브젝트가 그리는 붓의 투명도를 입력한 값만큼 바꿉니다. (0~100의 범위, 0이하는 0, 100 이상은 100으로 처리)", + "set_opacity": "해당 오브젝트가 그리는 붓의 투명도를 입력한 값으로 정합니다.", + "set_brush_tranparency": "해당 오브젝트가 그리는 붓의 투명도를 입력한 값으로 정합니다. (0~100의 범위, 0이하는 0, 100 이상은 100으로 처리)", + "brush_erase_all": "해당 오브젝트가 그린 선과 도장을 모두 지웁니다.", + "sound_something_with_block": "해당 오브젝트가 선택한 소리를 재생하는 동시에 다음 블록을 실행합니다.", + "sound_something_second_with_block": "해당 오브젝트가 선택한 소리를 입력한 시간 만큼만 재생하는 동시에 다음 블록을 실행합니다.", + "sound_something_wait_with_block": "해당 오브젝트가 선택한 소리를 재생하고, 소리 재생이 끝나면 다음 블록을 실행합니다.", + "sound_something_second_wait_with_block": "해당 오브젝트가 선택한 소리를 입력한 시간 만큼만 재생하고, 소리 재생이 끝나면 다음 블록을 실행합니다.", + "sound_volume_change": "작품에서 재생되는 모든 소리의 크기를 입력한 퍼센트만큼 바꿉니다.", + "sound_volume_set": "작품에서 재생되는 모든 소리의 크기를 입력한 퍼센트로 정합니다.", + "sound_silent_all": "현재 재생중인 모든 소리를 멈춥니다.", + "is_clicked": "마우스를 클릭한 경우 ‘참’으로 판단합니다.", + "is_press_some_key": "선택한 키가 눌려져 있는 경우 ‘참’으로 판단합니다.", + "reach_something": "해당 오브젝트가 선택한 항목과 닿은 경우 ‘참’으로 판단합니다.", + "is_included_in_list": "선택한 리스트에 입력한 값을 가진 항목이 포함되어 있는지 확인합니다.", + "boolean_basic_operator": "= : 왼쪽에 위치한 값과 오른쪽에 위치한 값이 같으면 '참'으로 판단합니다.
> : 왼쪽에 위치한 값이 오른쪽에 위치한 값보다 크면 '참'으로 판단합니다.
< : 왼쪽에 위치한 값이 오른쪽에 위치한 값보다 작으면 '참'으로 판단합니다.
≥ : 왼쪽에 위치한 값이 오른쪽에 위치한 값보다 크거나 같으면 '참'으로 판단합니다.
≤ : 왼쪽에 위치한 값이 오른쪽에 위치한 값보다 작거나 같으면 '참'으로 판단합니다.", + "function_create": "자주 쓰는 코드를 이 블록 아래에 조립하여 함수로 만듭니다. [함수 정의하기]의 오른쪽 빈칸에 [이름]을 조립하여 함수의 이름을 정할 수 있습니다. 함수를 실행하는 데 입력값이 필요한 경우 빈칸에 [문자/숫자값], [판단값]을 조립하여 매개변수로 사용합니다.", + "function_field_label": "'함수 정의하기'의 빈칸 안에 조립하고, 이름을 입력하여 함수의 이름을 정해줍니다. ", + "function_field_string": "해당 함수를 실행하는데 문자/숫자 값이 필요한 경우 빈칸 안에 조립하여 매개변수로 사용합니다. 이 블록 내부의[문자/숫자값]을 분리하여 함수의 코드 중 필요한 부분에 넣어 사용합니다.", + "function_field_boolean": "해당 함수를 실행하는 데 참 또는 거짓의 판단이 필요한 경우 빈칸 안에 조립하여 매개변수로 사용합니다. 이 블록 내부의 [판단값]을 분리하여 함수의 코드 중 필요한 부분에 넣어 사용합니다.", + "function_general": "현재 만들고 있는 함수 블록 또는 지금까지 만들어 둔 함수 블록입니다.", + "boolean_and": "두 판단이 모두 참인 경우 ‘참’으로 판단합니다.", + "boolean_or": "두 판단 중 하나라도 참이 있는 경우 ‘참’으로 판단합니다.", + "boolean_not": "해당 판단이 참이면 거짓, 거짓이면 참으로 만듭니다.", + "calc_basic": "+ : 입력한 두 수를 더한 값입니다.
- : 입력한 두 수를 뺀 값입니다.
X : 입력한 두 수를 곱한 값입니다.
/ : 입력한 두 수를 나눈 값입니다.", + "calc_rand": "입력한 두 수 사이에서 선택된 무작위 수의 값입니다. (두 수 모두 정수를 입력한 경우 정수로, 두 수 중 하나라도 소수를 입력한 경우 소수로 무작위 수가 선택됩니다.)", + "get_x_coordinate": "해당 오브젝트의 x 좌푯값을 의미합니다.", + "get_y_coordinate": "해당 오브젝트의 y 좌푯값을 의미합니다.", + "coordinate_mouse": "마우스 포인터의 x 또는 y의 좌표 값을 의미합니다.", + "coordinate_object": "선택한 오브젝트 또는 자신의 각종 정보값(x좌표, y좌표, 방향, 이동방향, 크기, 모양번호, 모양이름)입니다.", + "quotient_and_mod": "몫 : 앞의 수에서 뒤의 수를 나누어 생긴 몫의 값입니다.
나머지 : 앞의 수에서 뒤의 수를 나누어 생긴 나머지 값입니다.", + "get_rotation_direction": "해당 오브젝트의 방향값, 이동 방향값을 의미합니다.", + "calc_share": "앞 수에서 뒤 수를 나누어 생긴 몫을 의미합니다.", + "calc_mod": "앞 수에서 뒤 수를 나누어 생긴 나머지를 의미합니다.", + "calc_operation": "입력한 수에 대한 다양한 수학식의 계산값입니다.", + "get_date": "현재 연도, 월, 일, 시각과 같이 시간에 대한 값입니다.", + "distance_something": "자신과 선택한 오브젝트 또는 마우스 포인터 간의 거리 값입니다.", + "get_sound_duration": "선택한 소리의 길이(초) 값입니다.", + "get_project_timer_value": "이 블록이 실행되는 순간 초시계에 저장된 값입니다.", + "choose_project_timer_action": "시작하기: 초시계를 시작합니다.
정지하기: 초시계를 정지합니다.
초기화하기: 초시계의 값을 0으로 초기화합니다.
(이 블록을 블록조립소로 가져오면 실행화면에 ‘초시계 창’이 생성됩니다.)", + "reset_project_timer": "실행되고 있던 타이머를 0으로 초기화합니다.", + "set_visible_project_timer": "초시계 창을 화면에서 숨기거나 보이게 합니다.", + "ask_and_wait": "해당 오브젝트가 입력한 문자를 말풍선으로 묻고, 대답을 입력받습니다. (이 블록을 블록조립소로 가져오면 실행화면에 ‘대답 창’이 생성됩니다.)", + "get_canvas_input_value": "묻고 기다리기에 의해 입력된 값입니다.", + "set_visible_answer": "실행화면에 있는 ‘대답 창’을 보이게 하거나 숨길 수 있습니다.", + "combine_something": "입력한 두 자료를 결합한 값입니다.", + "get_variable": "선택된 변수에 저장된 값입니다.", + "change_variable": "선택한 변수에 입력한 값을 더합니다.", + "set_variable": "선택한 변수의 값을 입력한 값으로 정합니다.", + "robotis_carCont_sensor_value": "왼쪽 접속 센서 : 접촉(1), 비접촉(0) 값 입니다.
오른쪽 접촉 센서 : 접촉(1), 비접촉(0) 값 입니다.
선택 버튼 상태 : 접촉(1), 비접촉(0) 값 입니다.
최종 소리 감지 횟수 : 마지막 실시간 소리 감지 횟수 값 입니다.
실시간 소리 감지 횟수 : 약 1초 안에 다음 소리가 감지되면 1씩 증가합니다.
왼쪽 적외선 센서 : 물체와 가까울 수록 큰 값 입니다.
오른쪽 적외선 센서 : 물체와 가까울 수록 큰 값 값 입니다.
왼쪽 적외선 센서 캘리브레이션 값 : 적외선 센서의 캘리브레이션 값 입니다.
오른쪽 적외선 센서 캘리브레이션 값 : 적외선 센서의 캘리브레이션 값 입니다.
(*캘리브레이션 값 - 적외선센서 조정 값)", + "robotis_carCont_cm_led": "4개의 LED 중 1번 또는 4번 LED 를 켜거나 끕니다.
LED 2번과 3번은 동작 지원하지 않습니다.", + "robotis_carCont_cm_sound_detected_clear": "최종 소리 감지횟 수를 0 으로 초기화 합니다.", + "robotis_carCont_aux_motor_speed": "감속모터 속도를 0 ~ 1023 의 값(으)로 정합니다.", + "robotis_carCont_cm_calibration": "적외선센서 조정 값(http://support.robotis.com/ko/: 자동차로봇> 2. B. 적외선 값 조정)을 직접 정합니다.", + "robotis_openCM70_sensor_value": "최종 소리 감지 횟수 : 마지막 실시간 소리 감지 횟수 값 입니다.
실시간 소리 감지 횟수 : 약 1초 안에 다음 소리가 감지되면 1씩 증가합니다.
사용자 버튼 상태 : 접촉(1), 비접촉(0) 값 입니다.최종 소리 감지 횟수 : 마지막 실시간 소리 감지 횟수 값 입니다.
실시간 소리 감지 횟수 : 약 1초 안에 다음 소리가 감지되면 1씩 증가합니다.
사용자 버튼 상태 : 접촉(1), 비접촉(0) 값 입니다.", + "robotis_openCM70_aux_sensor_value": "서보모터 위치 : 0 ~ 1023, 중간 위치의 값은 512 입니다.
적외선센서 : 물체와 가까울 수록 큰 값 입니다.
접촉센서 : 접촉(1), 비접촉(0) 값 입니다.
조도센서(CDS) : 0 ~ 1023, 밝을 수록 큰 값 입니다.
온습도센서(습도) : 0 ~ 100, 습할 수록 큰 값 입니다.
온습도센서(온도) : -20 ~ 100, 온도가 높을 수록 큰 값 입니다.
온도센서 : -20 ~ 100, 온도가 높을 수록 큰 값 입니다.
초음파센서 : -
자석센서 : 접촉(1), 비접촉(0) 값 입니다.
동작감지센서 : 동작 감지(1), 동작 미감지(0) 값 입니다.
컬러센서 : 알수없음(0), 흰색(1), 검은색(2), 빨간색(3), 녹색(4), 파란색(5), 노란색(6) 값 입니다.
사용자 장치 : 사용자 센서 제작에 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "robotis_openCM70_cm_buzzer_index": "음계를 0.1 ~ 5 초 동안 연주 합니다.", + "robotis_openCM70_cm_buzzer_melody": "멜로디를 연주 합니다.
멜로디를 연속으로 재생하는 경우, 다음 소리가 재생되지 않으면 '흐름 > X 초 기다리기' 블록을 사용하여 기다린 후 실행합니다.", + "robotis_openCM70_cm_sound_detected_clear": "최종 소리 감지횟 수를 0 으로 초기화 합니다.", + "robotis_openCM70_cm_led": "제어기의 빨간색, 녹색, 파란색 LED 를 켜거나 끕니다.", + "robotis_openCM70_cm_motion": "제어기에 다운로드 되어있는 모션을 실행합니다.", + "robotis_openCM70_aux_motor_speed": "감속모터 속도를 0 ~ 1023 의 값(으)로 정합니다.", + "robotis_openCM70_aux_servo_mode": "서보모터를 회전모드 또는 관절모드로 정합니다.
한번 설정된 모드는 계속 적용됩니다.
회전모드는 서보모터 속도를 지정하여 서보모터를 회전 시킵니다.
관절모드는 지정한 서보모터 속도로 서보모터 위치를 이동 시킵니다.", + "robotis_openCM70_aux_servo_speed": "서보모터 속도를 0 ~ 1023 의 값(으)로 정합니다.", + "robotis_openCM70_aux_servo_position": "서보모터 위치를 0 ~ 1023 의 값(으)로 정합니다.
서보모터 속도와 같이 사용해야 합니다.", + "robotis_openCM70_aux_led_module": "LED 모듈의 LED 를 켜거나 끕니다.", + "robotis_openCM70_aux_custom": "사용자 센서 제작에 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "robotis_openCM70_cm_custom_value": "컨트롤 테이블 주소를 직접 입력하여 값을 확인 합니다.
컨트롤 테이블 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "robotis_openCM70_cm_custom": "컨트롤 테이블 주소를 직접 입력하여 값을 정합니다.
컨트롤 테이블 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "show_variable": "선택한 변수 창을 실행화면에 보이게 합니다.", + "hide_variable": "선택한 변수 창을 실행화면에서 숨깁니다.", + "value_of_index_from_list": "선택한 리스트에서 선택한 값의 순서에 있는 항목 값을 의미합니다. (내부 블록을 분리하면 순서를 숫자로 입력 가능)", + "add_value_to_list": "입력한 값이 선택한 리스트의 마지막 항목으로 추가됩니다.", + "remove_value_from_list": "선택한 리스트의 입력한 순서에 있는 항목을 삭제합니다.", + "insert_value_to_list": "선택한 리스트의 입력한 순서의 위치에 입력한 항목을 넣습니다. (입력한 항목의 뒤에 있는 항목들은 순서가 하나씩 밀려납니다.)", + "change_value_list_index": "선택한 리스트에서 입력한 순서에 있는 항목의 값을 입력한 값으로 바꿉니다.", + "length_of_list": "선택한 리스트가 보유한 항목 개수 값입니다.", + "show_list": "선택한 리스트를 무대에 보이게 합니다.", + "hide_list": "선택한 리스트를 무대에서 숨깁니다.", + "text": "해당 글상자가 표시하고 있는 문자값을 의미합니다.", + "text_write": "글상자의 내용을 입력한 값으로 고쳐씁니다.", + "text_append": "글상자의 내용 뒤에 입력한 값을 추가합니다.", + "text_prepend": "글상자의 내용 앞에 입력한 값을 추가합니다.", + "text_flush": "글상자에 저장된 값을 모두 지웁니다.", + "erase_all_effects": "해당 오브젝트에 적용된 효과를 모두 지웁니다.", + "char_at": "입력한 문자/숫자값 중 입력한 숫자 번째의 글자 값입니다.", + "length_of_string": "입력한 문자값의 공백을 포함한 글자 수입니다.", + "substring": "입력한 문자/숫자 값에서 입력한 범위 내의 문자/숫자 값입니다.", + "replace_string": "입력한 문자/숫자 값에서 지정한 문자/숫자 값을 찾아 추가로 입력한 문자/숫자값으로 모두 바꾼 값입니다. (영문 입력시 대소문자를 구분합니다.)", + "index_of_string": "입력한 문자/숫자 값에서 지정한 문자/숫자 값이 처음으로 등장하는 위치의 값입니다. (안녕, 엔트리!에서 엔트리의 시작 위치는 5)", + "change_string_case": "입력한 영문의 모든 알파벳을 대문자 또는 소문자로 바꾼 문자값을 의미합니다.", + "direction_relative_duration": "해당 오브젝트의 이동방향을 입력한 시간에 걸쳐 입력한 각도만큼 시계방향으로 회전합니다. ", + "get_sound_volume": "현재 작품에 설정된 소리의 크기값을 의미합니다.", + "sound_from_to": "해당 오브젝트가 선택한 소리를 입력한 시간 부분만을 재생하는 동시에 다음 블록을 실행합니다.", + "sound_from_to_and_wait": "해당 오브젝트가 선택한 소리를 입력한 시간 부분만을 재생하고, 소리 재생이 끝나면 다음 블록을 실행합니다.", + "Block_info": "블록 설명", + "Block_click_msg": "블록을 클릭하면 블록에 대한 설명이 나타납니다." +}; +Lang.Category = { + "entrybot_friends": "엔트리봇 친구들", + "people": "사람", + "animal": "동물", + "animal_flying": "하늘", + "animal_land": "땅", + "animal_water": "물", + "animal_others": "기타", + "plant": "식물", + "plant_flower": "꽃", + "plant_grass": "풀", + "plant_tree": "나무", + "plant_others": "기타", + "vehicles": "탈것", + "vehicles_flying": "하늘", + "vehicles_land": "땅", + "vehicles_water": "물", + "vehicles_others": "기타", + "architect": "건물", + "architect_building": "건축물", + "architect_monument": "기념물", + "architect_others": "기타", + "food": "음식", + "food_vegetables": "과일/채소", + "food_meat": "고기", + "food_drink": "음료", + "food_others": "기타", + "environment": "환경", + "environment_nature": "자연", + "environment_space": "우주", + "environment_others": "기타", + "stuff": "물건", + "stuff_living": "생활", + "stuff_hobby": "취미", + "stuff_others": "기타", + "fantasy": "판타지", + "interface": "인터페이스", + "background": "배경", + "background_outdoor": "실외", + "background_indoor": "실내", + "background_nature": "자연", + "background_others": "기타" +}; +Lang.Device = { + "arduino": "아두이노", + "hamster": "햄스터", + "albert": "알버트", + "robotis_carCont": "로보티즈 자동차 로봇", + "robotis_openCM70": "로보티즈 IoT", + "sensorBoard": "엔트리 센서보드", + "CODEino": "코드이노", + "bitbrick": "비트브릭", + "bitBlock": "비트블록", + "xbot_epor_edge": "엑스봇", + "dplay": "디플레이", + "nemoino": "네모이노" +}; +Lang.General = { + "turn_on": "켜기", + "turn_off": "끄기", + "left": "왼쪽", + "right": "오른쪽", + "both": "양쪽", + "red": "빨간색", + "yellow": "노란색", + "green": "초록색", + "skyblue": "하늘색", + "blue": "파란색", + "purple": "보라색", + "white": "하얀색", + "note_c": "도", + "note_d": "레", + "note_e": "미", + "note_f": "파", + "note_g": "솔", + "note_a": "라", + "note_b": "시" +}; +Lang.Fonts = { + "batang": "바탕체", + "myeongjo": "명조체", + "gothic": "고딕체", + "pen_script": "필기체", + "jeju_hallasan": "한라산체", + "gothic_coding": "코딩고딕체" +}; +Lang.Hw = { + "note": "노트", + "leftWheel": "왼쪽 바퀴", + "rightWheel": "오른쪽 바퀴", + "leftEye": "왼쪽 눈", + "rightEye": "오른쪽 눈", + "led": "불빛", + "body": "몸통", + "front": "앞쪽", + "port_en": "", + "port_ko": "번 포트", + "sensor": "센서", + "light": "빛", + "temp": "온도", + "switch_": "스위치", + "right_ko": "오른쪽", + "right_en": "", + "left_ko": "왼쪽", + "left_en": "", + "up_ko": "위쪽", + "up_en": "", + "down_ko": "아래쪽", + "down_en": "", + "output": "출력", + "left": "왼쪽", + "right": "오른쪽", + "sub": "서보", + "motor": "모터", + "": "", + "buzzer": "부저" +}; +Lang.template = { + "albert_hand_found": "Entry.Albert.isHandFound()", + "albert_value": "%1", + "albert_move_forward_for_secs": "Entry.Albert.moveForwardForSecs( %1 ) %2", + "albert_move_backward_for_secs": "Entry.Albert.moveBackwardForSecs( %1 ) %2", + "albert_turn_for_secs": "Entry.Albert.turnForSecs(' %1 ', %2 ) %3", + "albert_change_both_wheels_by": "Entry.Albert.changeWheelsBy( %1 , %2 ) %3", + "albert_set_both_wheels_to": "Entry.Albert.setWheelsTo( %1 , %2 ) %3", + "albert_change_wheel_by": "Entry.Albert.changeWheelBy(' %1 ', %2 ) %3", + "albert_set_wheel_to": "Entry.Albert.setWheelTo(' %1 ', %2 ) %3", + "albert_stop": "Entry.Albert.stop() %1", + "albert_set_pad_size_to": "Entry.Albert.setPadSizeTo( %1 , %2 ) %3", + "albert_set_eye_to": "Entry.Albert.setEyeTo(' %1 ',' %2 ') %3", + "albert_clear_eye": "Entry.Albert.clearEye(' %1 ') %2", + "albert_body_led": "%1 body led %2", + "albert_front_led": "%1 front led %2", + "albert_beep": "Entry.Albert.beep() %1", + "albert_change_buzzer_by": "Entry.Albert.changeBuzzerBy( %1 ) %2", + "albert_set_buzzer_to": "Entry.Albert.setBuzzerTo( %1 ) %2", + "albert_clear_buzzer": "Entry.Albert.clearBuzzer() %1", + "albert_play_note_for": "Entry.Albert.playNoteForBeats(' %1 ', %2 , %3 ) %4", + "albert_rest_for": "Entry.Albert.restForBeats( %1 ) %2", + "albert_change_tempo_by": "Entry.Albert.changeTempoBy( %1 ) %2", + "albert_set_tempo_to": "Entry.Albert.setTempoTo( %1 ) %2", + "albert_move_forward": "move forward %1", + "albert_move_backward": "move backward %1", + "albert_turn_around": "turn %1 %2", + "albert_set_led_to": "Entry.Hamster.setLedTo(' %1 %2 ') %3", + "albert_clear_led": "Entry.Hamster.clearLed(' %1 %2", + "albert_change_wheels_by": "%1 %2 %3", + "albert_set_wheels_to": "%1 %2 %3", + "arduino_text": "%1", + "arduino_send": "신호 %1 보내기", + "arduino_get_number": "신호 %1 의 숫자 결과값", + "arduino_get_string": "신호 %1 의 글자 결과값", + "arduino_get_sensor_number": "%1 ", + "arduino_get_port_number": "%1 ", + "arduino_get_pwm_port_number": "%1 ", + "arduino_get_number_sensor_value": "아날로그 %1 번 센서값 ", + "arduino_get_digital_value": "디지털 %1 번 센서값 ", + "arduino_toggle_led": "Digital %1 Pin %2 %3", + "arduino_toggle_pwm": "Digital %1 Pin %2 %3", + "arduino_convert_scale": "Map Value %1 %2 ~ %3 to %4 ~ %5 ", + "sensorBoard_get_named_sensor_value": "%1 센서값", + "sensorBoard_is_button_pressed": "%1 버튼을 눌렀는가?", + "sensorBoard_led": "%1 LED %2 %3", + "arduino_download_connector": "%1", + "arduino_download_source": "%1", + "arduino_connected": "%1", + "arduino_reconnect": "%1", + "CODEino_get_sensor_number": "%1 ", + "CODEino_get_named_sensor_value": " %1 Sensor value ", + "CODEino_get_sound_status": "Sound is %1 ", + "CODEino_get_light_status": "Light is %1 ", + "CODEino_is_button_pressed": " Operation %1 ", + "CODEino_get_accelerometer_direction": " 3-AXIS Accelerometer %1 ", + "CODEino_get_accelerometer_value": " 3-AXIS Accelerometer %1 -axis value ", + "bitbrick_sensor_value": "%1 값", + "bitbrick_is_touch_pressed": "touch %1 이(가) 눌렸는가?", + "bitbrick_turn_off_color_led": "컬러 LED 끄기 %1", + "bitbrick_turn_on_color_led_by_rgb": "컬러 LED 켜기 R %1 G %2 B %3 %4", + "bitbrick_turn_on_color_led_by_picker": "컬러 LED 색 %1 로 정하기 %2", + "bitbrick_turn_on_color_led_by_value": "컬러 LED 켜기 색 %1 로 정하기 %2", + "bitbrick_buzzer": "버저음 %1 내기 %2", + "bitbrick_turn_off_all_motors": "모든 모터 끄기 %1", + "bitbrick_dc_speed": "DC 모터 %1 속도 %2 %3", + "bitbrick_dc_direction_speed": "DC 모터 %1 %2 방향 속력 %3 %4", + "bitbrick_servomotor_angle": "서보 모터 %1 각도 %2 %3", + "bitbrick_convert_scale": "변환 %1 값 %2 ~ %3 에서 %4 ~ %5", + "start_drawing": "this.startDraw() %1", + "stop_drawing": "this.stopDraw() %1", + "set_color": "this.brush.color = %1 %2", + "set_random_color": "this.brush.color = Entry.getRandomColor() %1", + "change_thickness": "this.brush.thickness += %1 %2", + "set_thickness": "this.brush.thickness = %1 %2", + "change_opacity": "this.brush.opacity += %1 %2", + "set_opacity": "this.brush.opacity = %1 %2", + "brush_erase_all": "this.brush.removeAll() %1", + "brush_stamp": "Stamp %1", + "change_brush_transparency": "this.brush.opacity -= %1 %2", + "set_brush_tranparency": "this.brush.opacity -= %1 %2", + "number": "%1", + "angle": "%1", + "get_x_coordinate": "%1", + "get_y_coordinate": "%1", + "get_angle": "%1", + "get_rotation_direction": "%1 ", + "distance_something": "%1 %2 %3", + "coordinate_mouse": "%1 %2 %3", + "coordinate_object": "%1 %2 %3 %4", + "calc_basic": "%1 %2 %3", + "calc_plus": "%1 %2 %3", + "calc_minus": "%1 %2 %3", + "calc_times": "%1 %2 %3", + "calc_divide": "%1 %2 %3", + "calc_mod": "%1 %2 %3 %4 %5", + "calc_share": "%1 %2 %3 %4 %5", + "calc_operation": "%1 %2 %3 %4 ", + "calc_rand": "%1 %2 %3 %4 %5", + "get_date": "%1 %2 %3", + "get_sound_duration": "%1 %2 %3", + "reset_project_timer": "%1", + "set_visible_project_timer": "%1 %2 %3 %4", + "timer_variable": "%1 %2", + "get_project_timer_value": "%1 %2", + "char_at": "%1 %2 %3 %4 %5", + "length_of_string": "%1 %2 %3", + "substring": "%1 %2 %3 %4 %5 %6 %7", + "replace_string": "%1 %2 %3 %4 %5 %6 %7", + "change_string_case": "%1 %2 %3 %4 %5", + "index_of_string": "%1 %2 %3 %4 %5", + "combine_something": "%1 %2 %3 %4 %5", + "get_sound_volume": "%1 %2", + "quotient_and_mod": "%1 %2 %3 %4 %5 %6", + "choose_project_timer_action": "%1 %2 %3 %4", + "wait_second": "Entry.wait( %1 ) %2", + "repeat_basic": "for ( i = 0 %1 ) %2", + "repeat_inf": "while(true) %1", + "stop_repeat": "break %1", + "wait_until_true": "while ( %1 != true) { } %2", + "_if": "if ( %1 ) %2", + "if_else": "if ( %1 ) %2 %3 else", + "create_clone": "Entry.createClone( %1 ) %2", + "delete_clone": "Entry.removeClone(this) %1", + "when_clone_start": "%1 Entry.addEventListener('clone_created')", + "stop_run": "프로그램 끝내기 %1", + "repeat_while_true": "Repeat %1 %2 %3", + "stop_object": "Entry.stop( %1 ) %2", + "restart_project": "Entry.restart() %1", + "remove_all_clones": "Entry.removeAllClone() %1", + "functionAddButton": "%1", + "function_field_label": "%1%2", + "function_field_string": "%1%2", + "function_field_boolean": "%1%2", + "function_param_string": "문자/숫자값", + "function_param_boolean": "판단값", + "function_create": "함수 정의하기 %1 %2", + "function_general": "name %1", + "hamster_hand_found": "Entry.Hamster.isHandFound()", + "hamster_value": "%1", + "hamster_move_forward_once": "Entry.Hamster.moveForwardOnceOnBoard() %1", + "hamster_turn_once": "Entry.Hamster.turnOnceOnBoard(' %1 ') %2", + "hamster_move_forward_for_secs": "move forward for %1 secs %2", + "hamster_move_backward_for_secs": "move backward %1 secs %2", + "hamster_turn_for_secs": "turn %1 for %2 secs %3", + "hamster_change_both_wheels_by": "change wheel by left: %1 right: %2 %3", + "hamster_set_both_wheels_to": "set wheel to left: %1 right: %2 ) %3", + "hamster_change_wheel_by": "Entry.Hamster.changeWheelBy(' %1 ', %2 ) %3", + "hamster_set_wheel_to": "Entry.Hamster.setWheelTo(' %1 ', %2 ) %3", + "hamster_follow_line_using": "Entry.Hamster.followLineUsingFloorSensor(' %1 ',' %2 ') %3", + "hamster_follow_line_until": "Entry.Hamster.followLineUntilIntersection(' %1 ',' %2 ') %3", + "hamster_set_following_speed_to": "Entry.Hamster.setFollowingSpeedTo( %1 ) %2", + "hamster_stop": "stop %1", + "hamster_set_led_to": "Entry.Hamster.setLedTo(' %1 ',' %2 ') %3", + "hamster_clear_led": "Entry.Hamster.clearLed(' %1 ') %2", + "hamster_beep": "Entry.Hamster.beep() %1", + "hamster_change_buzzer_by": "change buzzer by %1 %2", + "hamster_set_buzzer_to": "set buzzer to %1 %2", + "hamster_clear_buzzer": "clear buzzer %1", + "hamster_play_note_for": "Entry.Hamster.playNoteForBeats(' %1 ', %2 , %3 ) %4", + "hamster_rest_for": "Entry.Hamster.restForBeats( %1 ) %2", + "hamster_change_tempo_by": "Entry.Hamster.changeTempoBy( %1 ) %2", + "hamster_set_tempo_to": "Entry.Hamster.setTempoTo( %1 ) %2", + "hamster_set_port_to": "Entry.Hamster.setPortTo(' %1 ',' %2 ') %3", + "hamster_change_output_by": "Entry.Hamster.changeOutputBy(' %1 ', %2 ) %3", + "hamster_set_output_to": "Entry.Hamster.setOutputTo(' %1 ', %2 ) %3", + "is_clicked": "%1", + "is_press_some_key": "%1 %2", + "reach_something": "%1 %2 %3", + "boolean_comparison": "%1 %2 %3", + "boolean_equal": "%1 %2 %3", + "boolean_bigger": "%1 %2 %3", + "boolean_smaller": "%1 %2 %3", + "boolean_and_or": "%1 %2 %3", + "boolean_and": "%1 %2 %3", + "boolean_or": "%1 %2 %3", + "boolean_not": "%1 %2 %3", + "true_or_false": "%1", + "True": "%1 ", + "False": "%1 ", + "boolean_basic_operator": "%1 %2 %3", + "show": "this.show() %1", + "hide": "this.hide() %1", + "dialog_time": "this.setDialogByTime( %1 , %2 , %3 ) %4", + "dialog": "this.setDialog( %1 , %2 ) %3", + "remove_dialog": "this.removeDialog() %1", + "change_to_nth_shape": "this.setShape( %1 ) %2", + "change_to_next_shape": "this.setTo %1 Shape() %2", + "set_effect_volume": "this.addEffect( %1 , %2 ) %3", + "set_effect": "this.setEffect( %1 , %2 ) %3", + "erase_all_effects": "this.removeAllEffects() %1", + "change_scale_percent": "this.scale += %1 %2", + "set_scale_percent": "this.scale = %1 %2", + "change_scale_size": "this.scale += %1 %2", + "set_scale_size": "this.scale = %1 %2", + "flip_y": "this.flip('horizontal') %1", + "flip_x": "this.flip('vertical') %1", + "set_object_order": "Entry.setLayerOrder(this, %1 ) %2", + "get_pictures": "%1 ", + "change_to_some_shape": "this.setShape( %1 ) %2", + "add_effect_amount": "this.addEffect( %1 , %2 ) %3", + "change_effect_amount": "this.setEffect( %1 , %2 ) %3", + "set_effect_amount": "this.addEffect( %1 , %2 ) %3", + "set_entity_effect": "this.setEffect( %1 , %2 ) %3", + "change_object_index": "Entry.setLayerOrder(this, %1 ) %2", + "move_direction": "Entry.moveToDirection( %1 ) %2", + "move_x": "this.x += %1 %2", + "move_y": "this.y += %1 %2", + "locate_xy_time": "this.setXYbyTime( %1 , %2 , %3 ) %4", + "rotate_by_angle": "this.rotation += %1 %2", + "rotate_by_angle_dropdown": "%1 만큼 회전하기 %2", + "see_angle": "this.direction = %1 %2", + "see_direction": "%1 쪽 보기 %2", + "locate_xy": "this.setXY( %1 , %2 ) %3", + "locate_x": "this.x = %1 %2", + "locate_y": "this.y = %1 %2", + "locate": "this.locateAt( %1 ) %2", + "move_xy_time": "this.moveXYbyTime( %1 , %2 , %3 ) %4", + "rotate_by_angle_time": "this.rotateByTime( %1 , %2 ) %3", + "bounce_wall": "Entry.bounceWall(this) %1", + "flip_arrow_horizontal": "화살표 방향 좌우 뒤집기 %1", + "flip_arrow_vertical": "화살표 방향 상하 뒤집기 %1", + "see_angle_object": "this.setDirectionTo( %1 ) %2", + "see_angle_direction": "this.rotation = %1 %2", + "rotate_direction": "this.direction += %1 %2", + "locate_object_time": "%1 초 동안 %2 위치로 이동하기 %3", + "rotate_absolute": "this.rotation = %1 %2", + "rotate_relative": "this.rotation = %1 %2", + "direction_absolute": "this.direction = %1 %2", + "direction_relative": "this.direction += %1 %2", + "move_to_angle": "Entry.moveToDirection( %1 , %2 ) %3", + "rotate_by_time": "%1 , this.rotate( %2 ) %3", + "direction_relative_duration": "%1 %2 %3", + "neobot_sensor_value": "%1 값", + "neobot_turn_left": "왼쪽모터를 %1 %2 회전 %3", + "neobot_stop_left": "왼쪽모터 정지 %1", + "neobot_turn_right": "오른쪽모터를 %1 %2 회전 %3", + "neobot_stop_right": "오른쪽모터 정지 %1", + "neobot_run_motor": "%1 모터를 %2 초간 %3 %4 %5", + "neobot_servo_1": "SERVO1에 연결된 서보모터를 %1 속도로 %2 로 이동 %3", + "neobot_servo_2": "SERVO2에 연결된 서보모터를 %1 속도로 %2 로 이동 %3", + "neobot_play_note_for": "멜로디 %1 을(를) %2 옥타브로 %3 길이만큼 소리내기 %4", + "neobot_set_sensor_value": "%1 번 포트의 값을 %2 %3", + "robotis_openCM70_cm_custom_value": "직접입력 주소 ( %1 ) %2 값", + "robotis_openCM70_sensor_value": "제어기 %1 값", + "robotis_openCM70_aux_sensor_value": "%1 %2 값", + "robotis_openCM70_cm_buzzer_index": "제어기 음계값 %1 , %2 , 연주 %3", + "robotis_openCM70_cm_buzzer_melody": "제어기 멜로디 %1 번 연주 %2", + "robotis_openCM70_cm_sound_detected_clear": "최종소리감지횟수 초기화 %1", + "robotis_openCM70_cm_led": "제어기 %1 LED %2 %3", + "robotis_openCM70_cm_motion": "모션 %1 번 실행 %2", + "robotis_openCM70_aux_motor_speed": "%1 감속모터 속도를 %2 , 출력값을 %3 (으)로 정하기 %4", + "robotis_openCM70_aux_servo_mode": "%1 서보모터 모드를 %2 (으)로 정하기 %3", + "robotis_openCM70_aux_servo_speed": "%1 서보모터 속도를 %2 , 출력값을 %3 (으)로 정하기 %4", + "robotis_openCM70_aux_servo_position": "%1 서보모터 위치를 %2 (으)로 정하기 %3", + "robotis_openCM70_aux_led_module": "%1 LED 모듈을 %2 (으)로 정하기 %3", + "robotis_openCM70_aux_custom": "%1 사용자 장치를 %2 (으)로 정하기 %3", + "robotis_openCM70_cm_custom": "직접입력 주소 ( %1 ) (을)를 %2 (으)로 정하기 %3", + "robotis_carCont_sensor_value": "%1 값", + "robotis_carCont_cm_led": "4번 LED %1 , 1번 LED %2 %3", + "robotis_carCont_cm_sound_detected_clear": "최종소리감지횟수 초기화 %1", + "robotis_carCont_aux_motor_speed": "%1 감속모터 속도를 %2 , 출력값을 %3 (으)로 정하기 %4", + "robotis_carCont_cm_calibration": "%1 적외선 센서 캘리브레이션 값을 %2 (으)로 정하기 %3", + "when_scene_start": "%1 this.addEventListener('sceneStart')", + "start_scene": "Scene.changeScene( %1 ) %2", + "start_neighbor_scene": "Scene.changeScene( %1 ) %2", + "sound_something": "Entry.playSound( %1 ) %2", + "sound_something_second": "Entry.playSoundByTime( %1 , %2 ) %3", + "sound_something_wait": "Entry.playSoundAndWait( %1 ) %2", + "sound_something_second_wait": "Entry.playSoundAndWaitByTime( %1 , %2 ) %3", + "sound_volume_change": "Entry.volume += %1 %2", + "sound_volume_set": "Entry.volume = %1 %2", + "sound_silent_all": "Entry.silentAll() %1", + "get_sounds": "%1 ", + "sound_something_with_block": "Entry.playSound( %1 ) %2", + "sound_something_second_with_block": "Entry.playSoundByTime( %1 , %2 ) %3", + "sound_something_wait_with_block": "Entry.playSoundAndWait( %1 ) %2", + "sound_something_second_wait_with_block": "Entry.playSoundAndWaitByTime( %1 , %2 ) %3", + "sound_from_to": "%1 %2 %3 %4", + "sound_from_to_and_wait": "%1 %2 %3 %4", + "when_run_button_click": "%1 Entry.addEventListener('run')", + "press_some_key": "%1 Entry.addEventListener('keydown', key== %2 ) %3", + "when_some_key_pressed": "%1 Entry.addEventListener('keydown', key== %2 )", + "mouse_clicked": "%1 Entry.addEventListener('mousedown')", + "mouse_click_cancled": "%1 Entry.addEventListener('mouseup')", + "when_object_click": "%1 this.addEventListener('mousedown')", + "when_object_click_canceled": "%1 this.addEventListener('mouseup')", + "when_some_key_click": "%1 키를 눌렀을 때", + "when_message_cast": "%1 Entry.addEventListener( %2 )", + "message_cast": "Entry.dispatchEvent( %1 ) %2", + "message_cast_wait": "Entry.dispatchEventAndWait( %1 ) %2", + "text": "%1", + "text_write": "Entry.writeText( %1 )", + "text_append": "Entry.appendText( %1 )", + "text_prepend": "Entry.insertText( %1 )", + "text_flush": "Entry.clearText()", + "variableAddButton": "%1", + "listAddButton": "%1", + "change_variable": "Entry.addValueToVariable( %1 , %2 ) %3", + "set_variable": "Entry.setValueVariable( %1 , %2 ) %3", + "show_variable": "Entry.showVariable( %1 ) %2", + "hide_variable": "Entry.hideVariable( %1 ) %2", + "get_variable": "Entry.getVariableValue( %1 )", + "ask_and_wait": "Entry.askAndWait( %1 ) %2", + "get_canvas_input_value": "%1 ", + "add_value_to_list": "Entry.pushValueToList( %1 , %2 ) %3", + "remove_value_from_list": "Entry.removeValueListAt( %1 , %2 ) %3", + "insert_value_to_list": "Entry.pushValueToListAt( %1 , %2 , %3 ) %4", + "change_value_list_index": "Entry.changeValueListAt( %1 , %2 , %3 ) %4", + "value_of_index_from_list": "%1 %2 %3 %4 %5", + "length_of_list": "%1 %2 %3", + "show_list": "Entry.showList( %1 ) %2", + "hide_list": "Entry.hideList( %1 ) %2", + "options_for_list": "%1 ", + "set_visible_answer": "Entry.getAnswer() %1 %2", + "is_included_in_list": "%1 %2 %3 %4 %5", + "xbot_digitalInput": "%1", + "xbot_analogValue": "%1", + "xbot_digitalOutput": "디지털 %1 핀, 출력 값 %2 %3", + "xbot_analogOutput": "아날로그 %1 %2 %3", + "xbot_servo": "서보 모터 %1 , 각도 %2 %3", + "xbot_oneWheel": "바퀴(DC) 모터 %1 , 속도 %2 %3", + "xbot_twoWheel": "바퀴(DC) 모터 오른쪽(2) 속도: %1 왼쪽(1) 속도: %2 %3", + "xbot_rgb": "RGB LED 켜기 R 값 %1 G 값 %2 B 값 %3 %4", + "xbot_rgb_picker": "RGB LED 색 %1 로 정하기 %2", + "xbot_buzzer": "Entry.Hamster.playNoteForBeats(' %1 %2 , %3 초 연주하기 %4", + "xbot_lcd": "LCD %1 번째 줄 , 출력 값 %2 %3", + "run": "", + "mutant": "test mutant block", + "jr_start": "%1", + "jr_repeat": "%1 반복", + "jr_item": "꽃 모으기 %1", + "cparty_jr_item": "%1 %2", + "jr_north": "%1 %2", + "jr_east": "%1 %2", + "jr_south": "%1 %2", + "jr_west": "%1 %2", + "jr_start_basic": "%1 %2", + "jr_go_straight": "%1 %2", + "jr_turn_left": "%1 %2", + "jr_turn_right": "%1 %2", + "jr_go_slow": "%1 %2", + "jr_repeat_until_dest": "%1 %2 %3 %4", + "jr_if_construction": "%1 %2 %3 %4", + "jr_if_speed": "만약 %1 앞에 있다면 %2", + "maze_step_start": "%1 시작하기를 클릭했을 때", + "maze_step_jump": "뛰어넘기%1", + "maze_step_for": "%1 번 반복하기%2", + "test": "%1 this is test block %2", + "maze_repeat_until_1": "%1 만날 때 까지 반복%2", + "maze_repeat_until_2": "모든 %1 만날 때 까지 반복%2", + "maze_step_if_1": "만약 앞에 %1 있다면%2", + "maze_step_if_2": "만약 앞에 %1 있다면%2", + "maze_call_function": "약속 불러오기%1", + "maze_define_function": "약속하기%1", + "maze_step_if_3": "만약 앞에 %1 있다면%2", + "maze_step_if_4": "만약 앞에 %1 있다면%2", + "maze_step_move_step": "앞으로 한 칸 이동%1", + "maze_step_rotate_left": "왼쪽으로 회전%1", + "maze_step_rotate_right": "오른쪽으로 회전%1", + "test_wrapper": "%1 this is test block %2", + "basic_button": "%1" +}; + +if (typeof exports == "object") + exports.Lang = Lang; \ No newline at end of file diff --git a/extern/lang/en.js b/extern/lang/en.js new file mode 100644 index 0000000000..951d145669 --- /dev/null +++ b/extern/lang/en.js @@ -0,0 +1,3238 @@ +var Lang = {}; +Lang.category = { + "name": "en" +}; +Lang.type = "en"; +Lang.en = "English"; +Lang.Blocks = { + "ARDUINO": "Hardware", + "ARDUINO_download_connector": "Download Arduino Connector", + "ARDUINO_download_source": "Entry Arduino code", + "ARDUINO_reconnect": "Connect Hardware", + "ARDUINO_connected": "Hardware connected", + "ARDUINO_arduino_get_number_1": "number result of signal", + "ARDUINO_arduino_get_number_2": "", + "ARDUINO_arduino_get_sensor_number_0": "0", + "ARDUINO_arduino_get_sensor_number_1": "1", + "ARDUINO_arduino_get_sensor_number_2": "2", + "ARDUINO_arduino_get_sensor_number_3": "3", + "ARDUINO_arduino_get_sensor_number_4": "4", + "ARDUINO_arduino_get_sensor_number_5": "5", + "BITBRICK_light": "light", + "BITBRICK_IR": "IR", + "BITBRICK_touch": "touch", + "BITBRICK_potentiometer": "potentiometer", + "BITBRICK_MIC": "MIC", + "BITBRICK_UserSensor": "UserSensor", + "BITBRICK_dc_direction_ccw": "CCW", + "BITBRICK_dc_direction_cw": "CW", + "CODEino_get_sensor_number_0": "0", + "CODEino_get_sensor_number_1": "1", + "CODEino_get_sensor_number_2": "2", + "CODEino_get_sensor_number_3": "3", + "CODEino_get_sensor_number_4": "4", + "CODEino_get_sensor_number_5": "5", + "CODEino_get_sensor_number_6": "6", + "CODEino_sensor_name_0": "Sound", + "CODEino_sensor_name_1": "Light", + "CODEino_sensor_name_2": "Slider", + "CODEino_sensor_name_3": "resistance-A", + "CODEino_sensor_name_4": "resistance-B", + "CODEino_sensor_name_5": "resistance-C", + "CODEino_sensor_name_6": "resistance-D", + "CODEino_string_1": " Sensor value ", + "CODEino_string_2": " Operation ", + "CODEino_string_3": "Push button", + "CODEino_string_4": "Connected A", + "CODEino_string_5": "Connected B", + "CODEino_string_6": "Connected C", + "CODEino_string_7": "Connected D", + "CODEino_string_8": " 3-AXIS Accelerometer ", + "CODEino_string_9": "-axis value ", + "CODEino_string_10": "Sound is ", + "CODEino_string_11": "Great", + "CODEino_string_12": "Small", + "CODEino_string_13": "Light is ", + "CODEino_string_14": "Bright", + "CODEino_string_15": "Dark", + "CODEino_string_16": "Left tilt", + "CODEino_string_17": "Right tilt", + "CODEino_string_18": "Front tilt", + "CODEino_string_19": "Rear tilt", + "CODEino_string_20": "Reverse", + "CODEino_accelerometer_X": "X", + "CODEino_accelerometer_Y": "Y", + "CODEino_accelerometer_Z": "Z", + "ARDUINO_arduino_get_string_1": "string result of signal", + "ARDUINO_arduino_get_string_2": "", + "ARDUINO_arduino_send_1": "Send signal", + "ARDUINO_arduino_send_2": "", + "ARDUINO_num_sensor_value_1": "Analog", + "ARDUINO_num_sensor_value_2": "Sensor value", + "ARDUINO_get_digital_value_1": "Digital", + "ARDUINO_num_pin_1": "Digital", + "ARDUINO_num_pin_2": "Pin", + "ARDUINO_toggle_pwm_1": "Digital", + "ARDUINO_toggle_pwm_2": "Pin", + "ARDUINO_toggle_pwm_3": "", + "ARDUINO_on": "On", + "ARDUINO_convert_scale_1": "Map Value", + "ARDUINO_convert_scale_2": "", + "ARDUINO_convert_scale_3": "~", + "ARDUINO_convert_scale_4": "to", + "ARDUINO_convert_scale_5": "~", + "ARDUINO_convert_scale_6": "", + "ARDUINO_off": "Off", + "brightness": "Brightness", + "BRUSH": "Brush", + "BRUSH_brush_erase_all": "Erase all brush", + "BRUSH_change_opacity_1": "Change opacity by", + "BRUSH_change_opacity_2": "%", + "BRUSH_change_thickness_1": "Change thickness by", + "BRUSH_change_thickness_2": "", + "BRUSH_set_color_1": "Set brush color to", + "BRUSH_set_color_2": "", + "BRUSH_set_opacity_1": "Set opacity to", + "BRUSH_set_opacity_2": "%", + "BRUSH_set_random_color": "Set brush color to random", + "BRUSH_set_thickness_1": "Set thickness to", + "BRUSH_set_thickness_2": "", + "BRUSH_stamp": "Stamp", + "BRUSH_start_drawing": "Start drawing", + "BRUSH_stop_drawing": "Stop drawing", + "CALC": "Calculate", + "CALC_calc_mod_1": "Rest of", + "CALC_calc_mod_2": "", + "CALC_calc_mod_3": "", + "CALC_calc_operation_of_1": "", + "CALC_calc_operation_of_2": "'s", + "CALC_calc_operation_root": "Root", + "CALC_calc_operation_square": "Square", + "CALC_calc_rand_1": "Random number between", + "CALC_calc_rand_2": "and", + "CALC_calc_rand_3": "", + "CALC_calc_share_1": "Quotient of", + "CALC_calc_share_2": "", + "CALC_calc_share_3": "", + "CALC_coordinate_mouse_1": "Mouse", + "CALC_coordinate_mouse_2": "Coordinate", + "CALC_coordinate_object_1": "", + "CALC_coordinate_object_2": "'s", + "CALC_coordinate_object_3": "Coordinate", + "CALC_distance_something_1": "Distance to", + "CALC_distance_something_2": "", + "CALC_get_angle": "Angle value", + "CALC_get_date_1": "Date", + "CALC_get_date_2": "", + "CALC_get_date_day": "Day", + "CALC_get_date_hour": "Time(Hour)", + "CALC_get_date_minute": "Time(Minutes)", + "CALC_get_date_month": "Month", + "CALC_get_date_second": "Time(Seconds)", + "CALC_get_date_year": "Year", + "CALC_get_sound_duration_1": "Length of", + "CALC_get_sound_duration_2": "sound", + "CALC_get_timer_value": "Timer value", + "CALC_get_x_coordinate": "X Coordinate", + "CALC_get_y_coordinate": "Y Coordinate", + "CALC_timer_reset": "Start timer", + "CALC_timer_visible_1": "", + "CALC_timer_visible_2": "Timer", + "CALC_timer_visible_show": "Show", + "CALC_timer_visible_hide": "Hide", + "color": "Color", + "FLOW": "Flow", + "FLOW__if_1": "If", + "FLOW__if_2": "then", + "FLOW_create_clone_1": "Create", + "FLOW_create_clone_2": "'s clone", + "FLOW_delete_clone": "Remove this clone", + "FLOW_delete_clone_all": "Remove all clone", + "FLOW_if_else_1": "If", + "FLOW_if_else_2": "then", + "FLOW_if_else_3": "else", + "FLOW_repeat_basic_1": "Repeat ", + "FLOW_repeat_basic_2": "times", + "FLOW_repeat_basic_errorMsg": "Repeat count must greater than 0 or equal.", + "FLOW_repeat_inf": "Repeat infinitely", + "FLOW_restart": "Restart Project", + "FLOW_stop_object_1": "Stop", + "FLOW_stop_object_2": "", + "FLOW_stop_object_all": "All objects", + "FLOW_stop_object_this_object": "This", + "FLOW_stop_object_this_thread": "This code", + "FLOW_stop_object_other_thread": "Other block of this object", + "FLOW_stop_repeat": "Stop repeat", + "FLOW_stop_run": "Exit program", + "FLOW_wait_second_1": "Wait", + "FLOW_wait_second_2": "seconds", + "FLOW_wait_until_true_1": "Wait until", + "FLOW_wait_until_true_2": "", + "FLOW_when_clone_start": "When clone is created", + "FUNC": "Function", + "JUDGEMENT": "Decision", + "JUDGEMENT_boolean_and": "AND", + "JUDGEMENT_boolean_not_1": "Is Not", + "JUDGEMENT_boolean_not_2": "", + "JUDGEMENT_boolean_or": "OR", + "JUDGEMENT_false": "False", + "JUDGEMENT_is_clicked": "Mouse down?", + "JUDGEMENT_is_press_some_key_1": "Key", + "JUDGEMENT_is_press_some_key_2": " pressed?", + "JUDGEMENT_reach_something_1": "touching", + "JUDGEMENT_reach_something_2": "?", + "JUDGEMENT_true": "True", + "LOOKS": "Looks", + "LOOKS_change_scale_percent_1": "Change scale by", + "LOOKS_change_scale_percent_2": "", + "LOOKS_change_to_next_shape": "Change to next", + "LOOKS_change_to_nth_shape_1": "Change shape to", + "LOOKS_change_to_nth_shape_2": "", + "LOOKS_change_shape_prev": "prev", + "LOOKS_change_shape_next": "next", + "LOOKS_change_to_near_shape_1": "Change to", + "LOOKS_change_to_near_shape_2": "shape", + "LOOKS_dialog_1": "Say", + "LOOKS_dialog_2": "", + "LOOKS_dialog_3": "", + "LOOKS_dialog_time_1": "Say", + "LOOKS_dialog_time_2": "for", + "LOOKS_dialog_time_3": "secs", + "LOOKS_dialog_time_4": "", + "LOOKS_erase_all_effects": "Erase all effects", + "LOOKS_flip_x": "Flip vertically", + "LOOKS_flip_y": "Flip horizontally", + "LOOKS_hide": "hide", + "LOOKS_remove_dialog": "Remove speech", + "LOOKS_set_effect_1": "Set", + "LOOKS_set_effect_2": "effect to", + "LOOKS_set_effect_3": "", + "LOOKS_set_effect_volume_1": "Change", + "LOOKS_set_effect_volume_2": "effect by", + "LOOKS_set_effect_volume_3": "", + "LOOKS_set_object_order_1": "go to", + "LOOKS_set_object_order_2": "th layer", + "LOOKS_set_scale_percent_1": "Set scale to", + "LOOKS_set_scale_percent_2": "", + "LOOKS_show": "show", + "mouse_pointer": "Mouse Pointer", + "MOVING": "Moving", + "MOVING_bounce_wall": "if on edge, bounce", + "MOVING_bounce_when_1": "Bounce if reach to the", + "MOVING_bounce_when_2": "", + "MOVING_flip_arrow_horizontal": "Flip horizontally by arrow direction", + "MOVING_flip_arrow_vertical": "Flip vertically by arrow direction", + "MOVING_locate_1": "Move to", + "MOVING_locate_2": "", + "MOVING_locate_time_1": "Moving while", + "MOVING_locate_time_2": "seconds to the", + "MOVING_locate_time_3": "", + "MOVING_locate_x_1": "Move to the X:", + "MOVING_locate_x_2": "", + "MOVING_locate_xy_1": "Move to the X:", + "MOVING_locate_xy_2": "Y:", + "MOVING_locate_xy_3": "", + "MOVING_locate_xy_time_1": "Moving while", + "MOVING_locate_xy_time_2": "seconds to x:", + "MOVING_locate_xy_time_3": "y:", + "MOVING_locate_xy_time_4": "", + "MOVING_locate_y_1": "Move to the Y:", + "MOVING_locate_y_2": "", + "MOVING_move_direction_1": "Move", + "MOVING_move_direction_2": "forward", + "MOVING_move_direction_angle_1": "Rotate", + "MOVING_move_direction_angle_2": "and move", + "MOVING_move_direction_angle_3": "", + "MOVING_move_x_1": "Change X by", + "MOVING_move_x_2": "", + "MOVING_move_xy_time_1": "For", + "MOVING_move_xy_time_2": "secs move to X:", + "MOVING_move_xy_time_3": "Y:", + "MOVING_move_xy_time_4": "", + "MOVING_move_y_1": "Change Y by", + "MOVING_move_y_2": "", + "MOVING_rotate_by_angle_1": "Rotate by", + "MOVING_rotate_by_angle_2": "degree", + "MOVING_rotate_by_angle_dropdown_1": "Rotate by", + "MOVING_rotate_by_angle_dropdown_2": "degree", + "MOVING_rotate_by_angle_time_1": "Rotate while", + "MOVING_rotate_by_angle_time_2": "seconds by", + "MOVING_rotate_by_angle_time_3": "degree", + "MOVING_rotate_direction_1": "Change direction by ", + "MOVING_rotate_direction_2": "", + "MOVING_see_angle_1": "Set direction to", + "MOVING_see_angle_2": "", + "MOVING_see_angle_direction_1": "See angle to", + "MOVING_see_angle_direction_2": "degree", + "MOVING_see_angle_object_1": "Turn towards", + "MOVING_see_angle_object_2": "", + "MOVING_see_direction_1": "Rotate to the", + "MOVING_see_direction_2": "", + "MOVING_set_direction_by_angle_1": "Set rotation to", + "MOVING_set_direction_by_angle_2": "", + "MOVING_add_direction_by_angle_1": "Rotate", + "MOVING_add_direction_by_angle_2": "", + "MOVING_add_direction_by_angle_time_1": "", + "MOVING_add_direction_by_angle_time_2": "secs rotate", + "MOVING_add_direction_by_angle_time_3": "", + "no_target": "No Target", + "oneself": "Self", + "opacity": "Opacity", + "SCENE": "Scene", + "SOUND": "Sound", + "SOUND_sound_silent_all": "Stop all sounds", + "SOUND_sound_something_1": "Play", + "SOUND_sound_something_2": "Sound", + "SOUND_sound_something_second_1": "Play", + "SOUND_sound_something_second_2": "sound for", + "SOUND_sound_something_second_3": "secs", + "SOUND_sound_something_second_wait_1": "Play", + "SOUND_sound_something_second_wait_2": "Sound for", + "SOUND_sound_something_second_wait_3": "secs and wait", + "SOUND_sound_something_wait_1": "Play", + "SOUND_sound_something_wait_2": "Sound and wait", + "SOUND_sound_volume_change_1": "Change volume by", + "SOUND_sound_volume_change_2": "%", + "SOUND_sound_volume_set_1": "Set volume to", + "SOUND_sound_volume_set_2": "%", + "speak": "Speak", + "START": "Start", + "START_add_message": "Add a message", + "START_delete_message": "Remove a message", + "START_message_cast": "Send message", + "START_message_cast_1": "Send", + "START_message_cast_2": "message", + "START_message_cast_wait": "message and wait", + "START_message_send_wait_1": "Send", + "START_message_send_wait_2": " message and wait", + "START_mouse_click_cancled": "When mouse click released", + "START_mouse_clicked": "When mouse clicked", + "START_press_some_key_1": "When key", + "START_press_some_key_2": "pressed", + "START_press_some_key_down": "Down", + "START_press_some_key_enter": "Enter", + "START_press_some_key_left": "Left", + "START_press_some_key_right": "Right", + "START_press_some_key_space": "Space", + "START_press_some_key_up": "Up", + "START_when_message_cast": "When message received", + "START_when_message_cast_1": "When", + "START_when_message_cast_2": "message received", + "START_when_object_click": "When object clicked", + "START_when_object_click_canceled": "When object click released", + "START_when_run_button_click": "When run", + "START_when_scene_start": "When scene was started", + "START_when_some_key_click": "When press some key", + "TEXT": "Text", + "TEXT_text": "Entry", + "TEXT_text_append_1": "After writing that", + "TEXT_text_append_2": "", + "TEXT_text_flush": "Remove all text", + "TEXT_text_prepend_1": "Add", + "TEXT_text_prepend_2": "in front of that", + "TEXT_text_write_1": "Writing that", + "TEXT_text_write_2": "", + "VARIABLE": "Variable", + "VARIABLE_add_value_to_list": "", + "VARIABLE_add_value_to_list_1": "add", + "VARIABLE_add_value_to_list_2": "to the list", + "VARIABLE_add_value_to_list_3": "", + "VARIABLE_ask_and_wait_1": "Ask", + "VARIABLE_ask_and_wait_2": "and wait", + "VARIABLE_change_value_list_index": "", + "VARIABLE_change_value_list_index_1": "change", + "VARIABLE_change_value_list_index_3": "th element to", + "VARIABLE_change_value_list_index_2": "", + "VARIABLE_change_value_list_index_4": "", + "VARIABLE_change_variable": "Adding variable", + "VARIABLE_change_variable_1": "Plus to", + "VARIABLE_change_variable_2": "by", + "VARIABLE_change_variable_3": "", + "VARIABLE_change_variable_name": "Rename variable", + "VARIABLE_combine_something_1": "join", + "VARIABLE_combine_something_2": "", + "VARIABLE_combine_something_3": "", + "VARIABLE_get_canvas_input_value": "response", + "VARIABLE_get_variable": "Value of variable", + "VARIABLE_get_variable_1": "Value of", + "VARIABLE_get_variable_2": "", + "VARIABLE_get_y": "Y Coordinate", + "VARIABLE_hide_list": "", + "VARIABLE_hide_list_1": "Hide list", + "VARIABLE_hide_list_2": "", + "VARIABLE_hide_variable": "Hide variable", + "VARIABLE_hide_variable_1": "Hide variable", + "VARIABLE_hide_variable_2": "value", + "VARIABLE_insert_value_to_list": "", + "VARIABLE_insert_value_to_list_1": "insert", + "VARIABLE_insert_value_to_list_2": "to", + "VARIABLE_insert_value_to_list_3": "", + "VARIABLE_insert_value_to_list_4": "th position", + "VARIABLE_length_of_list": "", + "VARIABLE_length_of_list_1": "length of", + "VARIABLE_length_of_list_2": "", + "VARIABLE_list": "", + "VARIABLE_make_variable": "Make variable", + "VARIABLE_list_option_first": "First", + "VARIABLE_list_option_last": "Last", + "VARIABLE_list_option_random": "Randomly", + "VARIABLE_remove_value_from_list": "", + "VARIABLE_remove_value_from_list_1": "remove", + "VARIABLE_remove_value_from_list_2": "th element from", + "VARIABLE_remove_value_from_list_3": "", + "VARIABLE_remove_variable": "Remove variable", + "VARIABLE_set_variable": "Set variable", + "VARIABLE_set_variable_1": "Set", + "VARIABLE_set_variable_2": "to", + "VARIABLE_set_variable_3": "", + "VARIABLE_show_list": "", + "VARIABLE_show_list_1": "Show list", + "VARIABLE_show_list_2": "", + "VARIABLE_show_variable": "Show variable", + "VARIABLE_show_variable_1": "Show variable", + "VARIABLE_show_variable_2": "value", + "VARIABLE_value_of_index_from_list": "", + "VARIABLE_value_of_index_from_list_1": "value of", + "VARIABLE_value_of_index_from_list_2": "", + "VARIABLE_value_of_index_from_list_3": "th element", + "HAMSTER_hand_found": "hand found?", + "HAMSTER_sensor_leftProximity": "left proximity", + "HAMSTER_sensor_rightProximity": "right proximity", + "HAMSTER_sensor_leftFloor": "left floor", + "HAMSTER_sensor_rightFloor": "right floor", + "HAMSTER_sensor_accelerationX": "x acceleration", + "HAMSTER_sensor_accelerationY": "y acceleration", + "HAMSTER_sensor_accelerationZ": "z acceleration", + "HAMSTER_sensor_light": "light", + "HAMSTER_sensor_temperature": "temperature", + "HAMSTER_sensor_signalStrength": "signal strength", + "HAMSTER_sensor_inputA": "input A", + "HAMSTER_sensor_inputB": "input B", + "HAMSTER_move_forward_once": "move forward once on board", + "HAMSTER_turn_once_1": "turn", + "HAMSTER_turn_once_2": "once on board", + "HAMSTER_move_forward": "move forward", + "HAMSTER_move_backward": "move backward", + "HAMSTER_turn_around_1": "turn", + "HAMSTER_turn_around_2": "", + "HAMSTER_move_forward_for_secs_1": "move forward for", + "HAMSTER_move_forward_for_secs_2": "secs", + "HAMSTER_move_backward_for_secs_1": "move backward", + "HAMSTER_move_backward_for_secs_2": "secs", + "HAMSTER_turn_for_secs_1": "turn", + "HAMSTER_turn_for_secs_2": "for", + "HAMSTER_turn_for_secs_3": "secs", + "HAMSTER_change_both_wheels_by_1": "change wheel by left:", + "HAMSTER_change_both_wheels_by_2": "right:", + "HAMSTER_change_both_wheels_by_3": "", + "HAMSTER_set_both_wheels_to_1": "set wheel to left:", + "HAMSTER_set_both_wheels_to_2": "right:", + "HAMSTER_set_both_wheels_to_3": "", + "HAMSTER_change_wheel_by_1": "change", + "HAMSTER_change_wheel_by_2": "wheel by", + "HAMSTER_change_wheel_by_3": "", + "HAMSTER_set_wheel_to_1": "set", + "HAMSTER_set_wheel_to_2": "wheel to", + "HAMSTER_set_wheel_to_3": "", + "HAMSTER_follow_line_using_1": "follow", + "HAMSTER_follow_line_using_2": "line using", + "HAMSTER_follow_line_using_3": "floor sensor", + "HAMSTER_follow_line_until_1": "follow", + "HAMSTER_follow_line_until_2": "line until", + "HAMSTER_follow_line_until_3": "intersection", + "HAMSTER_set_following_speed_to_1": "set following speed to", + "HAMSTER_set_following_speed_to_2": "", + "HAMSTER_front": "front", + "HAMSTER_rear": "rear", + "HAMSTER_stop": "stop", + "HAMSTER_set_led_to_1": "set", + "HAMSTER_set_led_to_2": "led to", + "HAMSTER_set_led_to_3": "", + "HAMSTER_clear_led_1": "clear", + "HAMSTER_clear_led_2": "led", + "HAMSTER_color_cyan": "cyan", + "HAMSTER_color_magenta": "magenta", + "HAMSTER_color_black": "black", + "HAMSTER_beep": "beep", + "HAMSTER_change_buzzer_by_1": "change buzzer by", + "HAMSTER_change_buzzer_by_2": "", + "HAMSTER_set_buzzer_to_1": "set buzzer to", + "HAMSTER_set_buzzer_to_2": "", + "HAMSTER_clear_buzzer": "clear buzzer", + "HAMSTER_play_note_for_1": "play note", + "HAMSTER_play_note_for_2": "", + "HAMSTER_play_note_for_3": "for", + "HAMSTER_play_note_for_4": "beats", + "HAMSTER_rest_for_1": "rest for", + "HAMSTER_rest_for_2": "beats", + "HAMSTER_change_tempo_by_1": "change tempo by", + "HAMSTER_change_tempo_by_2": "", + "HAMSTER_set_tempo_to_1": "set tempo to", + "HAMSTER_set_tempo_to_2": "bpm", + "HAMSTER_set_port_to_1": "set port", + "HAMSTER_set_port_to_2": "to", + "HAMSTER_set_port_to_3": "", + "HAMSTER_change_output_by_1": "change output", + "HAMSTER_change_output_by_2": "by", + "HAMSTER_change_output_by_3": "", + "HAMSTER_set_output_to_1": "set output", + "HAMSTER_set_output_to_2": "to", + "HAMSTER_set_output_to_3": "", + "HAMSTER_port_a": "A", + "HAMSTER_port_b": "B", + "HAMSTER_port_ab": "A and B", + "HAMSTER_analog_input": "analog input", + "HAMSTER_digital_input": "digital input", + "HAMSTER_servo_output": "servo output", + "HAMSTER_pwm_output": "pwm output", + "HAMSTER_digital_output": "digital output", + "ALBERT_hand_found": "hand found?", + "ALBERT_sensor_leftProximity": "left proximity", + "ALBERT_sensor_rightProximity": "right proximity", + "ALBERT_sensor_light": "light", + "ALBERT_sensor_battery": "battery", + "ALBERT_sensor_signalStrength": "signal strength", + "ALBERT_sensor_frontOid": "front oid", + "ALBERT_sensor_backOid": "back oid", + "ALBERT_sensor_positionX": "x position", + "ALBERT_sensor_positionY": "y position", + "ALBERT_sensor_orientation": "orientation", + "ALBERT_move_forward": "move forward", + "ALBERT_move_backward": "move backward", + "ALBERT_turn_around_1": "turn", + "ALBERT_turn_around_2": "", + "ALBERT_move_forward_for_secs_1": "move forward for", + "ALBERT_move_forward_for_secs_2": "secs", + "ALBERT_move_backward_for_secs_1": "move backward for", + "ALBERT_move_backward_for_secs_2": "secs", + "ALBERT_turn_for_secs_1": "turn", + "ALBERT_turn_for_secs_2": "for", + "ALBERT_turn_for_secs_3": "secs", + "ALBERT_change_both_wheels_by_1": "change wheels by left:", + "ALBERT_change_both_wheels_by_2": "right:", + "ALBERT_change_both_wheels_by_3": "", + "ALBERT_set_both_wheels_to_1": "set wheels to left:", + "ALBERT_set_both_wheels_to_2": "right:", + "ALBERT_set_both_wheels_to_3": "", + "ALBERT_change_wheel_by_1": "change", + "ALBERT_change_wheel_by_2": "wheel by", + "ALBERT_change_wheel_by_3": "", + "ALBERT_set_wheel_to_1": "set", + "ALBERT_set_wheel_to_2": "wheel to", + "ALBERT_set_wheel_to_3": "", + "ALBERT_stop": "stop", + "ALBERT_set_pad_size_to_1": "set pad size to width:", + "ALBERT_set_pad_size_to_2": "height:", + "ALBERT_set_pad_size_to_3": "", + "ALBERT_set_eye_to_1": "set", + "ALBERT_set_eye_to_2": "eye to", + "ALBERT_set_eye_to_3": "", + "ALBERT_clear_eye_1": "clear", + "ALBERT_clear_eye_2": "eye", + "ALBERT_body_led_1": "", + "ALBERT_body_led_2": "body led", + "ALBERT_front_led_1": "", + "ALBERT_front_led_2": "front led", + "ALBERT_color_cyan": "cyan", + "ALBERT_color_magenta": "magenta", + "ALBERT_beep": "beep", + "ALBERT_change_buzzer_by_1": "change buzzer by", + "ALBERT_change_buzzer_by_2": ")", + "ALBERT_set_buzzer_to_1": "set buzzer to", + "ALBERT_set_buzzer_to_2": ")", + "ALBERT_clear_buzzer": "clear buzzer", + "ALBERT_play_note_for_1": "play note", + "ALBERT_play_note_for_2": "',", + "ALBERT_play_note_for_3": "for", + "ALBERT_play_note_for_4": "beats", + "ALBERT_rest_for_1": "rest for", + "ALBERT_rest_for_2": "beats", + "ALBERT_change_tempo_by_1": "change tempo by", + "ALBERT_change_tempo_by_2": ")", + "ALBERT_set_tempo_to_1": "set tempo to", + "ALBERT_set_tempo_to_2": "bpm", + "VARIABLE_variable": "variable", + "wall": "Wall", + "robotis_common_case_01": "(을)를", + "robotis_common_set": "(으)로 정하기", + "robotis_common_value": "값", + "robotis_common_clockwhise": "시계방향", + "robotis_common_counter_clockwhise": "반시계방향", + "robotis_common_wheel_mode": "회전모드", + "robotis_common_joint_mode": "관절모드", + "robotis_common_red_color": "빨간색", + "robotis_common_green_color": "녹색", + "robotis_common_blue_color": "파란색", + "robotis_common_on": "켜기", + "robotis_common_off": "끄기", + "robotis_common_cm": "제어기", + "robotis_common_port_1": "포트 1", + "robotis_common_port_2": "포트 2", + "robotis_common_port_3": "포트 3", + "robotis_common_port_4": "포트 4", + "robotis_common_port_5": "포트 5", + "robotis_common_port_6": "포트 6", + "robotis_common_play_buzzer": "연주", + "robotis_common_play_motion": "실행", + "robotis_common_motion": "모션", + "robotis_common_index_number": "번", + "robotis_cm_custom": "직접입력 주소", + "robotis_cm_spring_left": "왼쪽 접촉 센서", + "robotis_cm_spring_right": "오른쪽 접촉 센서", + "robotis_cm_led_left": "왼쪽 LED", + "robotis_cm_led_right": "오른쪽 LED", + "robotis_cm_led_both": "양 쪽 LED", + "robotis_cm_switch": "선택 버튼 상태", + "robotis_cm_user_button": "사용자 버튼 상태", + "robotis_cm_sound_detected": "최종 소리 감지 횟수", + "robotis_cm_sound_detecting": "실시간 소리 감지 횟수", + "robotis_cm_ir_left": "왼쪽 적외선 센서", + "robotis_cm_ir_right": "오른쪽 적외선 센서", + "robotis_cm_calibration_left": "왼쪽 적외선 센서 캘리브레이션 값", + "robotis_cm_calibration_right": "오른쪽 적외선 센서 캘리브레이션 값", + "robotis_cm_clear_sound_detected": "최종소리감지횟수 초기화", + "robotis_cm_buzzer_index": "음계값", + "robotis_cm_buzzer_melody": "멜로디", + "robotis_cm_led_1": "1번 LED", + "robotis_cm_led_4": "4번 LED", + "robotis_aux_servo_position": "서보모터 위치", + "robotis_aux_ir": "적외선센서", + "robotis_aux_touch": "접촉센서", + "robotis_aux_brightness": "조도센서(CDS)", + "robotis_aux_hydro_themo_humidity": "온습도센서(습도)", + "robotis_aux_hydro_themo_temper": "온습도센서(온도)", + "robotis_aux_temperature": "온도센서", + "robotis_aux_ultrasonic": "초음파센서", + "robotis_aux_magnetic": "자석센서", + "robotis_aux_motion_detection": "동작감지센서", + "robotis_aux_color": "컬러센서", + "robotis_aux_custom": "사용자 장치", + "robotis_carCont_aux_motor_speed_1": "감속모터 속도를", + "robotis_carCont_aux_motor_speed_2": ", 출력값을", + "robotis_carCont_calibration_1": "적외선 센서 캘리브레이션 값을", + "robotis_openCM70_aux_motor_speed_1": "감속모터 속도를", + "robotis_openCM70_aux_motor_speed_2": ", 출력값을", + "robotis_openCM70_aux_servo_mode_1": "서보모터 모드를", + "robotis_openCM70_aux_servo_speed_1": "서보모터 속도를", + "robotis_openCM70_aux_servo_speed_2": ", 출력값을", + "robotis_openCM70_aux_servo_position_1": "서보모터 위치를", + "robotis_openCM70_aux_led_module_1": "LED 모듈을", + "robotis_openCM70_aux_custom_1": "사용자 장치를", + "XBOT_digital": "Digital", + "XBOT_D2_digitalInput": "D2 Digital Input", + "XBOT_D3_digitalInput": "D3 Digital Input", + "XBOT_D11_digitalInput": "D11 Digital Input", + "XBOT_analog": "Analog", + "XBOT_CDS": "Light Sensor Value", + "XBOT_MIC": "Mic Sensor Value", + "XBOT_analog0": "Analog PIN0 Value", + "XBOT_analog1": "Analog PIN1 Value", + "XBOT_analog2": "Analog PIN2 Value", + "XBOT_analog3": "Analog PIN3 Value", + "XBOT_Value": "Ouput Value", + "XBOT_pin_OutputValue": "PIN, Ouput Value", + "XBOT_High": "HI", + "XBOT_Low": "LO", + "XBOT_Servo": "Servo Motor", + "XBOT_Head": "Head(D8)", + "XBOT_ArmR": "Right Arm(D9)", + "XBOT_ArmL": "Left Arm(D10)", + "XBOT_angle": ", Angle", + "XBOT_DC": "Wheel(DC) Motor", + "XBOT_rightWheel": "Right", + "XBOT_leftWheel": "Left", + "XBOT_bothWheel": "Both", + "XBOT_speed": ", Speed", + "XBOT_rightSpeed": "Wheel(DC) Motor Right(2) Speed:", + "XBOT_leftSpeed": "Left(1) Speed:", + "XBOT_RGBLED_R": "RGB LED Color from Red", + "XBOT_RGBLED_G": "Green", + "XBOT_RGBLED_B": "Blue", + "XBOT_RGBLED_color": "RGB LED Color from", + "XBOT_set": " ", + "XBOT_c": "C", + "XBOT_d": "D", + "XBOT_e": "E", + "XBOT_f": "F", + "XBOT_g": "G", + "XBOT_a": "A", + "XBOT_b": "B", + "XBOT_melody_ms": "sec of Melody Playing", + "XBOT_Line": "th Line", + "XBOT_outputValue": "Text", + "CALC_rotation_value": "rotation value", + "CALC_direction_value": "direction value", + "VARIABLE_is_included_in_list_1": "is included in", + "VARIABLE_is_included_in_list_2": "value", + "VARIABLE_is_included_in_list_3": "", + "SCENE_when_scene_start": "When scene started", + "SCENE_start_scene_1": "Start", + "SCENE_start_scene_2": "scene", + "SCENE_start_neighbor_scene_1": "Start", + "SCENE_start_neighbor_scene_2": "scene", + "SCENE_start_scene_pre": "pre", + "SCENE_start_scene_next": "next", + "FUNCTION_explanation_1": "name", + "FUNCTION_character_variable": "string/number", + "FUNCTION_logical_variable": "logical variable", + "FUNCTION_function": "function", + "FUNCTION_define": "Define function", + "CALC_calc_operation_sin": "sin value", + "CALC_calc_operation_cos": "cos value", + "CALC_calc_operation_tan": "tan value", + "CALC_calc_operation_floor": "floor value", + "CALC_calc_operation_ceil": "ceil value", + "CALC_calc_operation_round": "round value", + "CALC_calc_operation_factorial": "factorial value", + "CALC_calc_operation_asin": "asin value", + "CALC_calc_operation_acos": "acos value", + "CALC_calc_operation_atan": "atan value", + "CALC_calc_operation_log": "log value", + "CALC_calc_operation_ln": "natural log value", + "CALC_calc_operation_natural": "integer value", + "CALC_calc_operation_unnatural": "decimal value", + "MOVING_locate_object_time_1": "factorial value", + "MOVING_locate_object_time_2": "seconds to the", + "MOVING_locate_object_time_3": "", + "wall_up": "upper wall", + "wall_down": "down wall", + "wall_right": "right wall", + "wall_left": "left wall", + "CALC_coordinate_x_value": "coordinate x", + "CALC_coordinate_y_value": "coordinate y", + "CALC_coordinate_rotation_value": "rotation", + "CALC_coordinate_direction_value": "direction", + "CALC_picture_index": "index of picture", + "CALC_picture_name": "name of picture", + "FLOW_repeat_while_true_1": "Repeat", + "FLOW_repeat_while_true_2": " ", + "TUT_when_start": "", + "TUT_move_once": "", + "TUT_rotate_left": "", + "TUT_rotate_right": "", + "TUT_jump_barrier": "", + "TUT_repeat_tutorial_1": "", + "TUT_repeat_tutorial_2": "", + "TUT_if_barrier_1": "", + "TUT_if_barrier_2": "", + "TUT_if_conical_1": "", + "TUT_if_conical_2": "", + "TUT_repeat_until": "", + "TUT_repeat_until_gold": "", + "TUT_declare_function": "", + "TUT_call_function": "", + "CALC_calc_operation_abs": "absolute value", + "CONTEXT_COPY_option": "copy code(s)", + "Delete_Blocks": "delete code(s)", + "Duplication_option": "copy & paste", + "Paste_blocks": "paste code(s)", + "Clear_all_blocks": "remove all codes", + "transparency": "Transparency", + "BRUSH_change_brush_transparency_1": "Change transparency by", + "BRUSH_change_brush_transparency_2": "%", + "BRUSH_set_brush_transparency_1": "Set transparency to", + "BRUSH_set_brush_transparency_2": "%", + "CALC_char_at_1": "letter", + "CALC_char_at_2": "of", + "CALC_char_at_3": "", + "CALC_length_of_string_1": "length of", + "CALC_length_of_string_2": "", + "CALC_substring_1": "substring of", + "CALC_substring_2": "from", + "CALC_substring_3": "to", + "length_of_string": "to", + "CALC_substring_4": "", + "CALC_replace_string_1": "replace", + "CALC_replace_string_2": "in", + "CALC_replace_string_3": "with", + "CALC_replace_string_4": "", + "CALC_change_string_case_1": "", + "CALC_change_string_case_2": "of", + "CALC_change_string_case_3": " ", + "CALC_change_string_case_sub_1": "uppercase", + "CALC_change_string_case_sub_2": "lowercase", + "CALC_index_of_string_1": "index of", + "CALC_index_of_string_2": "in", + "CALC_index_of_string_3": "", + "MOVING_add_direction_by_angle_time_explain_1": "For", + "MOVING_direction_relative_duration_1": "For", + "MOVING_direction_relative_duration_2": "secs set direction to", + "MOVING_direction_relative_duration_3": "", + "CALC_get_sound_volume": "Volume", + "SOUND_sound_from_to_1": "Play", + "SOUND_sound_from_to_2": "sound from", + "SOUND_sound_from_to_3": "to", + "SOUND_sound_from_to_4": "secs", + "SOUND_sound_from_to_and_wait_1": "Play", + "SOUND_sound_from_to_and_wait_2": "sound from", + "SOUND_sound_from_to_and_wait_3": "to", + "SOUND_sound_from_to_and_wait_4": "secs and wait", + "CALC_quotient_and_mod_1": "", + "CALC_quotient_and_mod_2": "of", + "CALC_quotient_and_mod_3": "/", + "CALC_quotient_and_mod_4": " ", + "CALC_quotient_and_mod_sub_1": "Quotient", + "CALC_quotient_and_mod_sub_2": "Rest", + "self": "Self", + "CALC_coordinate_size_value": "Scale", + "CALC_choose_project_timer_action_1": "", + "CALC_choose_project_timer_action_2": "timer", + "CALC_choose_project_timer_action_sub_1": "Start", + "CALC_choose_project_timer_action_sub_2": "Stop", + "CALC_choose_project_timer_action_sub_3": "Reset", + "LOOKS_change_object_index_1": "bring to", + "LOOKS_change_object_index_2": "", + "LOOKS_change_object_index_sub_1": "front", + "LOOKS_change_object_index_sub_2": "forward", + "LOOKS_change_object_index_sub_3": "backward", + "LOOKS_change_object_index_sub_4": "back", + "FLOW_repeat_while_true_until": "until", + "FLOW_repeat_while_true_while": "while", + "copy_block": "copy block(s)", + "delete_block": "delete block(s)", + "tidy_up_block": "tidy up the blocks", + "block_hi": "Hi", + "entry_bot_name": "Entrybot", + "hi_entry": "Hello Entry!", + "hi_entry_en": "Hello Entry!", + "bark_dog": "dog barking", + "walking_entryBot": "Walking Entrybot", + "entry": "Entry", + "hello": "Hello", + "nice": "nice to meet you" +}; +Lang.Buttons = { + "apply": "Apply", + "cancel": "Cancel", + "save": "OK", + "start": "Start", + "confirm": "OK", + "delete": "Delete", + "create": "Create Class", + "done": "Done", + "accept": "Accept", + "refuse": "Refuse", + "yes": "Yes", + "button_no": "No" +}; +Lang.ko = "한국어"; +Lang.Menus = { + "helper": "helper", + "youtube": "vedio", + "tvcast": "vedio", + "goal": "goal", + "basicproject": "basic", + "hw": "hardware", + "object": "object", + "download_info": "모든 교육자료는 각각의 제목을 클릭 하시면 다운받으실 수 있습니다.", + "entry_materials_all": "엔트리 교육자료 모음", + "recommand_grade": "추천학년", + "3_4_grades": "3-4 학년", + "5_6_grades": "5-6 학년", + "middle_grades": "중학생 이상", + "entry_go_go": "엔트리 고고!", + "entry_go_go_desc": "학년별, 난이도 별로 준비된 교재를 만나보세요. 각 과정별로 교육과정, 교재, 교사용 지도자료 3종 세트가 제공됩니다.", + "stage_beginner": "초급", + "stage_middle": "중급", + "stage_high": "고급", + "middle_school_short": "중등", + "learn_entry_programming": "따라하며 배우는 엔트리 프로그래밍", + "entry_programming_desc": "차근 차근 따라하다 보면 어느 새 나도 엔트리 고수!", + "ebs": "EBS", + "ebs_material_desc": "방송 영상과 교사용 지도서를 활용하여 수업을 해보세요!", + "season_1_material": "시즌1 교사용 지도서", + "season_2_material": "시즌2 교사용 지도서", + "compute_think_textbook": "교과서로 배우는 컴퓨팅 사고력", + "computational_sw": "국어, 수학, 과학, 미술... 학교에서 배우는 다양한 교과와 연계하여 sw를 배워보세요!", + "entry_x_hardware": "엔트리 X 하드웨어 교육자료 모음", + "e_sensor": "E 센서보드", + "arduino": "아두이노", + "orange_board": "오렌지보드", + "joystick": "조이스틱 쉴드", + "materials_etc_all": "기타 교육자료 모음", + "materials_teaching": "교원 연수 자료", + "materials_etc": "기타 참고 자료", + "materials_teaching_1": "SW교육의 필요성과 교육 방법론", + "materials_teaching_2": "엔트리와 함께하는 언플러그드 활동", + "materials_teaching_3": "게임으로 배우는 엔트리 학습모드 활동", + "materials_teaching_4": "실생활 문제해결을 위한 엔트리 프로그래밍", + "materials_teaching_5": "엔트리로 시작하는 교과연계sw교육1", + "materials_teaching_6": "엔트리로 시작하는 교과연계sw교육2", + "materials_teaching_7": "피지컬 컴퓨팅 실습1(E센서보드)", + "materials_teaching_8": "피지컬 컴퓨팅 실습2(햄스터)", + "materials_teaching_9": "수업에 필요한 학급/강의 기능 알아보기", + "materials_etc_1": "수업에 바로 활용할 수 있는 다양한 콘텐츠 모음집", + "materials_etc_2": "엔트리를 처음 사용하는 선생님들을 위한 가이드", + "materials_etc_3": "월간 엔트리", + "materials_etc_4": "엔트리 설명서", + "materials_etc_5": "엔트리 소개 자료", + "materials_etc_6": "엔트리 블록 책받침", + "jr_if_1": "if", + "jr_if_2": "in front", + "jr_fail_no_pencil": "There is no pencil. Use 'pencil block' at the pencil!", + "jr_fail_forgot_pencil": "Oh no! I forgot my pencil. Let's pick up the pencil.", + "jr_fail_much_blocks": "너무많은 블록을 사용했어, 다시 도전해볼래?", + "cparty_jr_success_1": "Hooray! I got my backpack!", + "go_right": "go right", + "go_down": "go down", + "go_up": "go up", + "go_left": "go left", + "go_forward": "Go forward", + "jr_turn_left": "Turn left", + "jr_turn_right": "Turn right", + "go_slow": "Go slow", + "repeat_until_reach_1": "", + "repeat_until_reach_2": "Repeat until reach", + "pick_up_pencil": "Pick up", + "repeat_0": "Repeat", + "repeat_1": "", + "when_start_clicked": "When start button clicked", + "age_0": "Age 0+", + "create_character": "Creating Character", + "age_7_9": "Age 7~9", + "going_school": "Going to School", + "age_10_12_1": "Age 10~12", + "collect_parts": "Collecting Parts", + "age_10_12_2": "Age 10~12", + "driving_elec_car": "Driving Electric Car", + "age_13": "Age 13+", + "travel_space": "Traveling Space", + "people": "People", + "all": "All", + "life": "Life", + "nature": "Nature", + "animal_insect": "Animal/Insect", + "environment": "Environment", + "things": "Things", + "vehicles": "Vehicles", + "others": "Others", + "fantasy": "Fantasy", + "instrument": "Instrument", + "piano": "Piano", + "marimba": "Marimba", + "drum": "Drum", + "janggu": "Janggu", + "sound_effect": "Sound", + "others_instrument": "Others", + "aboutEntryDesc_1": "엔트리는 누구나 무료로 소프트웨어 교육을 받을 수 있게 개발된 소프트웨어 교육 플랫폼입니다.", + "aboutEntryDesc_2": "학생들은 소프트웨어를 쉽고 재미있게 배울 수 있고,", + "aboutEntryDesc_3": "선생님은 효과적으로 학생들을 가르치고 관리할 수 있습니다.", + "aboutEntryDesc_4": "엔트리는 공공재와 같이", + "aboutEntryDesc_5": "비영리로 운영됩니다.", + "viewProjectTerms": "이용정책 보기", + "openSourceTitle": "오픈소스를 통한 생태계 조성", + "openSourceDesc_1": "엔트리의 소스코드 뿐 아니라 모든 교육", + "openSourceDesc_2": "자료는 CC라이센스를 적용하여", + "openSourceDesc_3": "공개합니다.", + "viewOpenSource": "오픈소스 보기", + "eduPlatformTitle": "국내교육 현장에 맞는 교육 플랫폼", + "eduPlatformDesc_1": "국내 교육 현장에 적합한 교육 도구가", + "eduPlatformDesc_2": "될 수 있도록 학교 선생님들과 함께", + "eduPlatformDesc_3": "개발하고 있습니다.", + "madeWith": "자문단", + "researchTitle": "다양한 연구를 통한 전문성 강화", + "researchDesc_1": "대학/학회 등과 함께 다양한 연구를", + "researchDesc_2": "진행하여 전문성을 강화해나가고", + "researchDesc_3": "있습니다.", + "viewResearch": "연구자료 보기", + "atEntry": "엔트리에서는", + "entryLearnDesc_1": "재미있게 배우는 학습공간", + "entryLearnDesc_2": "<학습하기>에서는 컴퓨터를 활용해 논리적으로 문제를 해결할 수 있는 다양한 학습", + "entryLearnDesc_3": "콘텐츠가 준비되어 있습니다. 게임을 하듯이 주어진 미션들을 컴퓨터 프로그래밍으로", + "entryLearnDesc_4": "해결하고, 동영상을 보면서 소프트웨어의 원리를 재미있게 배울 수 있습니다.", + "entryMakeDesc_1": "<만들기>에서는 미국 MIT에서 개발한 Scratch와 같은 블록형 프로그래밍 언어를", + "entryMakeDesc_2": "사용하여 처음 접하는 사람들도 쉽게 자신만의 창작물을 만들 수 있습니다.", + "entryShareDesc_1": "<공유하기>에서는 엔트리를 통해 제작한 작품을 다른 사람들과 공유할 수 있습니다. 또한", + "entryShareDesc_2": "공유된 작품이 어떻게 구성되었는지 살펴볼 수 있고, 이를 발전시켜 또 다른 작품을 만들 수", + "entryShareDesc_3": "있습니다. 또한 친구들과 협업해 더 멋진 작품을 만들 수도 있습니다.", + "entryGroup": "학급기능", + "entryGroupTitle": "우리 반 학습 공간", + "entryGroupDesc_1": "<학급기능>은 선생님께서 학급별로 학생들을 관리할 수 있는 기능입니다. 학급만의", + "entryGroupDesc_2": "학습하기, 만들기, 공유하기를 만들 수 있으며, 과제를 만들고 학생들의 결과물을 확인할", + "entryGroupDesc_3": "수 있습니다.", + "unpluggedToPhysical": "언플러그드 활동부터 피지컬 컴퓨팅까지", + "algorithmActivity": "기초 알고리즘 활동", + "programmignLang": "교육용 프로그래밍 언어", + "unpluggedDesc_1": "엔트리봇 보드게임과 카드게임을 통해 컴퓨터 없이도", + "unpluggedDesc_2": "소프트웨어의 기본 개념과 원리(순차, 반복, 선택, 함수)를 익힐 수 있습니다.", + "entryMaze": "엔트리봇 미로탈출", + "entryAI": "엔트리봇 우주여행", + "algorithmDesc_1": "게임을 하듯이 미션을 해결하고 인증서를 받아보세요.", + "algorithmDesc_2": "소프트웨어의 기본적인 원리를 쉽고 재미있게 배울 수 있습니다.", + "programmingLangDesc_1": "엔트리에서는 블록을 쌓듯이 프로그래밍을 하기 때문에 누구나 쉽게", + "programmingLangDesc_2": "자신만의 게임, 애니메이션, 미디어아트와 같은 멋진 작품을 만들고 공유할 수 있어 교육용으로 적합합니다.", + "viewSupporHw": "연결되는 하드웨어 보기", + "supportHwDesc_1": "엔트리와 피지컬 컴퓨팅 도구를 연결하면 현실세계와 상호작용하는 멋진 작품들을 만들어낼 수 있습니다.", + "supportHwDesc_2": "국내, 외 다양한 하드웨어 연결을 지원하며, 계속적으로 추가될 예정입니다.", + "entryEduSupport": "엔트리 교육 지원", + "eduSupportDesc_1": "엔트리교육연구소에서는 소프트웨어 교육을 위한 다양한 교육 자료를 제작하여 무상으로 배포하고 있습니다.", + "eduSupportDesc_2": "모든 자료는 교육자료 페이지에서 다운받으실 수 있습니다.", + "materials_1_title": "수준별 교재", + "materials_1_desc_1": "학년별 수준에 맞는 교재를 통해 차근차근", + "materials_1_desc_2": "따라하며 쉽게 엔트리를 익혀보세요!", + "materials_2_title": "EBS 방송 연계 교안", + "materials_2_desc_1": "EBS 소프트웨어야 놀자 방송과 함께 교사용", + "materials_2_desc_2": "수업 지도안을 제공합니다.", + "materials_3_title": "초, 중등 교과 연계 수업자료", + "materials_3_desc_1": "다양한 과목에서 만나는 실생활 문제를", + "materials_3_desc_2": "컴퓨팅 사고력으로 해결해 보세요.", + "moreMaterials": "더 많은 교육 자료 보러가기", + "moreInfoAboutEntry_1": "더 많은 엔트리의 소식들을 확인하고 싶다면 아래의 링크들로 접속해보세요.", + "moreInfoAboutEntry_2": "교육자료 외에도 다양한 SW 교육과 관련한 정보를 공유하고 있습니다.", + "blog": "Blog", + "post": "Post", + "tvCast": "TVCast", + "albertSchool": "알버트 스쿨버전", + "arduinoBoard": "아두이노 점품보드", + "arduinoCompatible": "아두이노 호환보드", + "bitBlock": "bitBlock", + "bitbrick": "bitbrick", + "codeino": "CODEino", + "e-sensor": "E-센서보드", + "hamster": "hamster", + "littlebits": "littlebits", + "orangeBoard": "오렌지 보드", + "robotis_carCont": "로보티즈 로봇자동차", + "robotis_IoT": "로보티즈 IoT", + "about": "About", + "articles": "Articles", + "gallery": "Gallery", + "learn": "Learn", + "login": "Sign In", + "logout": "Sign Out", + "make": "Create", + "register": "Sign Up", + "Join": "Join", + "Edit_info": "Edit Info", + "Discuss": "Discuss", + "Explore": "Explore", + "Load": "Load", + "My_lesson": "Open Lessons", + "Resources": "Resources", + "play_software": "Let’s play, SW!", + "problem_solve": "Problem Solving", + "Learn": "Learn", + "teaching_tools": "Teaching Tools", + "about_entry": "About ENTRY", + "what_entry": "What is ENTRY ?", + "create": "Create", + "create_new": "Create new", + "start_programming": "First Step for Software Education", + "Entry": "Entry", + "intro_learning": "Learn to code in fun and easy way.", + "intro_learning_anyone": "Start now with Entry!", + "start_now": "For Free, Forever.", + "welcome_entry": "Welcome to ENTRY", + "student": "Student", + "non_menber": "General", + "teacher": "Teacher", + "terms_conditions": "Terms and Conditions", + "personal_information": "Information about the collection and use of personal information ", + "limitation_liability": "Limitation of Liability", + "entry_agree": "Agree to ENTRY’s Terms of Use", + "info_agree": "", + "next": "Next", + "enter_id": "Enter ID", + "enter_password": "Enter Password", + "confirm_password": "Confirm Password", + "enter_password_again": "Enter your password again", + "validation_password": "Please use at least 5 letters and/or numbers", + "validation_id": "Please use 4-20 letters and/or numbers.", + "prev": "Back", + "born_year": "Year born ", + "select_born": "Select the year you were born.", + "year": "years", + "gender": "Gender", + "choose_gender": "Choose gender", + "male": "Male", + "female": "Female", + "language": "Language", + "best_language": "Select your best language", + "korean": "Korean", + "english": "English", + "viet": "Vietnamese", + "option_email": "Email (optional)", + "insert_email": "Enter your email address", + "sign_up_complete": "Sign up complete!", + "agree_terms_conditions": "Please agree Terms and Conditions", + "agree_personal_information": "Please agree to the collection and use of personal information.", + "insert_studying_stage": "Please select the group you want to share your project .", + "insert_born_year": "Insert the year you were born", + "insert_gender": "Insert gender", + "select_language": "select language", + "check_email": "Check email's format", + "already_exist_id": "ID already exists", + "id_validation_id": "ID use 4-20 letters and/or numbers.", + "password_validate_pwd": "Password use at least 5 letters and/or numbers", + "insert_same_pwd": "Insert same password", + "studying_stage_group": "", + "studying_stage": "Please select the group you want to share.", + "password": "Password", + "save_id": "Save ID", + "forgot_password": "Forgot your ID or password?", + "did_not_join": "Haven’t signed up yet?", + "go_join": "Go to join", + "first_step": "First Step for Software Education", + "entry_content_one": "Bring your imagination to life with ENTRY.", + "entry_content_two": "Create games, animations, media art, and other cool projects!", + "entry_content_three": "Create projects and share with your friends. Enter the exciting world of ENTRY!", + "funny_space": "A Fun Learning Space", + "in_learn_section": "In < Learn > section,", + "learn_problem_solving": "Various learning contents and mini challenges are available for you in the < Learn > section. Solve mini challenges by coding. Watch fun videos and learn to program.", + "joy_create": "A Creative Space", + "in_make": "In < Create > section", + "make_contents": "In the section, create your own program with block-based programming language. Create simulation programs to test laws of Physics. Create animation program with your favorite characters. Bring your imagination to life with Entry. ", + "and_content": "There is no limit to what you can create. You can experiment physical laws you’ve learned in science class, create animations featuring your favorite characters, and even make your own games. ", + "share_collaborate": "A Sharing Space", + "explore_contents": "The section, showcases thousands of projects created and shared by the Entry community. Try out the fun and creative projects, see how they are coded, and improve them. You can also cooperate with your peers to create exciting projects.", + "why_software": "Why is learning to code important?", + "speak_obama_contents": "Learning these skills isn’t just important for your future. It’s important for our country’s future.", + "obama": "Barack Obama", + "us_president": "U.S President", + "billgates_contents": "Learning to write programs stretches your mind, and helps you think better, creates a way of thinking about things that I think is helpful in all domains.", + "billgates": "Bill Gates", + "chairman_micro": "Chairman, Microsoft", + "eric_contents": "For most people on Earth, the digital revolution hasn't even started yet. Within the next 10 years, all that will change. Let's get the whole world coding!", + "eric": "Eric Schmidt", + "sandbug_contents": "An understanding of computer science is becoming increasingly essential in today’s world. Our national competitiveness depends upon our ability to educate our children—and that includes our girls—in this critical field.", + "sandbug": "sheryl Sandberg", + "view_entry_tools": "Introducing Entry’s unplugged games for teaching programming.", + "solve_problem": "Problem Solving", + "solve_problem_content": "Mini challenges will help you learn the basics of programming.", + "find_extra_title": "ENTRY Bot part finding extravaganza", + "all_ages": "For all ages", + "total": "Total", + "step": "steps", + "find_extra_contents": "Entry bot is special robot created one day at the Rutz Robot Toy Factory during a blackout. Help him find his missing parts and escape the factory while learning to code.", + "software_play_contents": "Watch ‘Let’s Play Software’ , follow along the tutorials and learn to create fun programs.", + "resources_contents": "Download free learning materials created for teachers and students", + "from": "From", + "sw_camp": "Software Creativity Camp, Ministry of Science, ICT and Future Planning", + "elementary": "Elementary", + "middle": "Middle school", + "grades": "Grades", + "lesson": "Lessons", + "sw_contents_one": "This guidebook is for elementary students learn physical computing over a 5-lesson course. Students learn to use Entry and create images and stoires. In the final section, students use Arduino to create a musical keyboard", + "sw_camp_detail": "Ministry of Science, ICT and Future Planning Software Creation Camp", + "sw_contents_two": "This textbook allows middle school students to experience ENTRY and physical computing over a 5-lesson course. Students learn how to use ENTRY, and create a maze game and quiz program. In the final section, students use Arduino and keyboard to steer a car.", + "sw_contents_three": "This is a teacher’s guide for starting computing classes in schools. It contains a variety of unplugged activities and lesson plans using clips from ‘Let’s play, Software!’broadcasts. ", + "naver_sw": "NAVER Let’s play, Software!", + "teacher_teaching": "Teacher’s Guide (for elementary grades 5-6 and above)", + "funny_sw": "Have Fun with Software", + "sw_contents_four": "This textbook allows students to learn about computing in a fun and playful way through a variety of unplugged activities such as ENTRY Board, and teaches students the basic principles of programming via ENTRY Course Mode. Once they have got down the basics, students learn how to create stories, games, artistic works, and applications using ENTRY. The textbook allows students to create and present their own software. ", + "ct_text_5": "Grow computational thinking with skills.", + "teacher_grade_5": "교원 (초등학교 5학년)", + "ct_text_5_content": "This teacher's guide contains 8 problem solving tasks. Each task is designed to reflect the revised National Curriculum and contains interdisciplinary themes. Cultivate computational thinking skills.", + "ct_text_6": "교과서와 함께 키우는 컴퓨팅 사고력", + "teacher_grade_6": "교원 (초등학교 6학년)", + "ct_text_6_content": "실생활의 문제를 해결하자는 테마로 준비된 총 8개의 학습콘텐츠가 담긴 교사용 지도안입니다. 각 콘텐츠는 개정된 교육과정을 반영한 타교과와의 연계를 통해 다양한 문제를 만나고 해결해볼 수 있도록 설계되었습니다. 아이들이 컴퓨팅 사고력을 갖춘 융합형 인재가 될 수 있도록 지금 적용해보세요!", + "sw_use": "All textbooks are for non-commercial use only, and can be used freely so long as the author is credited. ", + "title": "Title", + "writer": "By", + "view": "View", + "date": "Date", + "find_id_pwd": "Find ID or Password", + "send_email": "A link to change your password has been sent to you by email.", + "user_not_exist": "This email does not exist.", + "not_signup": "Haven't signed up yet?", + "send": "Send", + "sensorboard": "ENTRY Sensor Board", + "physical_computing": "Physical Computing", + "sensorboard_contents": "Using Arduino no longer requires building a circuit using lots of wires. With ENTRY Board, you can use LED lights, temperature, sound, light sensors, a slider, and switches by simply mounting it onto an Arduino board. Now anyone can easily create their own unique projects using ENTRY Board!", + "entrybot_boardgame": "ENTRY-Bot Board Game", + "unplugged": "Unplugged Activities", + "unplugged_contents": "Learn the principles of programming through Entry-bot Board Game. By helping Entrybot escape the factory, you can learn to think like a computer scientist.", + "entrybot_cardgame": "ENTRY Bot Cardgame : Bomb Tempest", + "entrybot_cardgame_contents": "12 different types of bombs appear at the city of Entry! Dismantle the bombs one at a time and learn the basics of programming. By using the concepts of sequence, repetition and conditionals, save the City and become a hero!", + "basic_learn": "Entry Basics", + "basic_learn_contents": "Learn to program with Entry’s coursewares", + "troubleshooting": "Problem Solving", + "playsoftware": "Let's play, Software!", + "make_own_lesson": "Create your own lessons and share them with everyone.", + "lecture": "Lecture", + "curriculum": "Course", + "group_lecture": "Lectures", + "group_curriculum": "Courseware", + "group_homework": "Assignment", + "group_noproject": "No Project", + "group_nolecture": "No Lecture", + "group_nocurriculum": "No Course", + "lecture_contents": "Create customized lessons with limited blocks.", + "curriculum_contents": "Create a course by putting together series of lessons.", + "grade_info": "Grades information", + "difficulty": "Difficulty", + "usage": "Usages", + "learning_concept": "Learning concepts", + "related_subject": "Related subjects", + "show_more": "Show more", + "close": "Close", + "latest": "By Latest", + "viewer": "By Viewers", + "like": "By Likes", + "comment": "By Comments", + "entire_period": "Entire period", + "today": "Today", + "latest_week": "Latest 1 week", + "latest_month": "Latest 1 month", + "latest_three_month": "Latest 3 months", + "current_password": "Current password", + "incorrect_password": "Incorrect! Try again.", + "new_password": "New password", + "password_option_1": "Please use at least 5 letters and/or numbers.", + "again_new_password": "Confirm new password", + "enter_new_pwd": "Enter new password.", + "enter_new_pwd_again": "Enter new password again.", + "password_match": "Passwords do not match.", + "incorrect_email": "Incorrect email. Try again.", + "edit_button": "Edit info", + "edit_profile": "Edit profile", + "my_project": "My projects", + "my_group": "My Class", + "mark": "Marking", + "prev_state": "Back", + "profile_image": "Profile image", + "insert_profile_image": "Please upload a profile image.", + "at_least_180": "At least 180 X 180 pixels is recommended.", + "upload_image": "Upload image", + "main_image": "Main image", + "about_me": "About me", + "save_change": "Save changes", + "basic_image": "Basic Image", + "profile_condition": "Please give a short self-introduction (less than 40 words).", + "profile_back": "Go back", + "make_project": "Create Project", + "exhibit_project": "Exhibit Project", + "art_list_shared": "Shared", + "art_list_group_shared": "Group", + "view_project": "View Project", + "comment_view": "Comment", + "upload_project": "Upload", + "edit": "Edit", + "save_complete": "Save", + "just_like": "Like", + "share": "Share", + "who_likes_project": "Who likes the projects", + "people_interest": "People interested projects", + "none_person": "Nobody", + "inserted_date": "Date", + "last_modified": "Last Modified", + "original_project": "Original project", + "for_someone": "'s", + "original_project_deleted": "The original project was deleted", + "delete_project": "Delete", + "delete_group_project": "Delete From List", + "currnet_month_time": "months", + "current_day_time": "days", + "game": "Game", + "animation": "Animation", + "media_art": "Media Arts", + "physical": "Physical", + "etc": "ETC", + "connected_contents": "Linking content", + "connected_contents_content": "Discover the variety of content that can be done with the entry . If you're new software to learn easily from person to enjoy board games , you can take advantage of the Arduino and physical computing , such as creating a luxurious view of your own creation .", + "basic_mission": "Basic mission : Entry bot Maze", + "basic_mission_content": "A power outage at a toy robot factory magically enabled Entrybot to come to life. Help Entrybot escape the factory and find freedom!", + "application_mission": "Application mission: Entry bot's Space Odyssey", + "write_article": "Write", + "view_all_articles": "View all posts", + "view_own_articles": "View my posts", + "learning_materials": "Learning materials", + "ebs_software_first": " is a TV series created by Naver, EBS and Entry Labs. Learn the basic principles of programming. Watch the show, follow along the video tutorials, and learn to code!", + "go_software": "Visit Let's play software!", + "ebs_context": "Visit EBS", + "category": "Category", + "add_picture": "Add Picture", + "upload_article": "Upload article", + "list": "List", + "report": "Report", + "upload": "Upload", + "staff_picks": "Staff Picks", + "popular_picks": "Popular Projects", + "lecture_header_more": "More Projects", + "lecture_header_reset": "Reset", + "lecture_header_reset_exec": "Reset to basic project", + "lecture_header_save": "Save", + "lecture_header_save_content": "Save current lecture", + "lecture_header_export_project": "Export to my project", + "lecture_header_undo": "Undo", + "lecture_header_redo": "Redo", + "lecture_header_bugs": "Feedback", + "lecture_container_tab_object": "Objects", + "lecture_container_tab_video": "Video", + "lecture_container_tab_project": "Final project", + "lecture_container_tab_help": "Help", + "illigal": "Illegal or inappropriate behavior", + "verbal": "Verbal abuse or posting personal information", + "commertial": "Posting for commercial purposes", + "explicit": "Explicit content", + "other": "Other", + "report_result": "Please enter email address to be informed of report results. ", + "report_success": "Your report was submitted successfully.", + "etc_detail": "Please give details", + "lecture_play": "Play", + "list_view_link": "List", + "lecture_intro": "Introduction Lecture", + "study_goal": "Goals", + "study_description": "Description", + "study_created": "Created", + "study_last_updated": "Updated", + "study_remove": "Remove", + "study_group_lecture_remove": "Remove From List", + "study_group_curriculum_remove": "Remove From List", + "study_edit": "Edit", + "study_comments": "Comments", + "study_comment_post": "Post", + "study_comment_remove": "Remove", + "study_comment_edit": "Edit", + "study_comment_save": "Save", + "study_guide_video": "Guide Video", + "study_basic_project": "Initial Project", + "study_done_project": "Complete Project", + "study_usage_element": "Usage", + "study_concept_element": "Concept", + "study_subject_element": "Related", + "study_element_none": "None", + "study_label_like": "Like", + "study_label_interest": "Interest", + "study_label_share": "Share", + "study_label_like_people": "People who liked this lecture", + "study_label_interest_people": "People who interested this lecture", + "study_related_lectures": "Related lectures", + "study_expand": "Show all", + "study_collapse": "Collapse", + "aftercopy": "Copied to clipboard", + "study_remove_curriculum": "Are you sure to remove this course?", + "content_required": "Content required", + "study_remove_lecture": "Are you sure to remove this lecture?", + "lecture_build": "Make a lecture", + "lecture_build_step1": "1. Enter basic lecture information", + "lecture_build_step2": "2. Selecte required functions", + "lecture_build_step3": "3. Confirm all of information correctly.", + "lecture_build_choice": "What is main content?", + "lecture_build_project": "Entry Project", + "lecture_build_video": "Lecture Video", + "lecture_build_grade": "Grades", + "lecture_build_goals": "Goals", + "lecture_build_add_goal": "Add a goal", + "lecture_build_attach": "Attachment", + "lecture_build_attach_text": "Less than 20MB", + "lecture_build_assist": "Additional", + "lecture_build_youtube_url": "Paste a Youtube share link", + "lecture_build_project_done": "Select a completed project.", + "lecture_build_scene_text1": "Using scene function or not", + "lecture_build_scene_text2": "", + "lecture_build_object_text": "Using Object add function or not", + "lecture_build_blocks_text1": "Select required blocks only.", + "lecture_build_blocks_text2": "", + "lecture_build_basic1": "Select a project.", + "lecture_build_basic2": "User start with this project.", + "lecture_build_help": "", + "lecture_build_help_never": "Close permanently", + "lecture_build_close": "Close", + "lecture_build_scene": "Scene 1", + "lecture_build_add_object": "Add Object", + "lecture_build_start": "Start", + "lecture_build_tab_code": "Block", + "lecture_build_tab_shape": "Shape", + "lecture_build_tab_sound": "Sound", + "lecture_build_tab_attribute": "Attribute", + "lecture_build_block_category": "Select block category.", + "lecture_build_attr_all": "All", + "lecture_build_attr_var": "Variable", + "lecture_build_attr_signal": "Signal", + "lecture_build_attr_list": "List", + "lecture_build_attr_func": "Function", + "lecture_build_edit": "Edit", + "lecture_build_remove": "Remove", + "curriculum_build": "Make a course", + "curriculum_step1": "Fill information about this course.", + "curriculum_step2": "Select lectures for this course.", + "curriculum_step3": "Confirm information.", + "curriculum_lecture_upload": "Upload", + "curriculum_lecture_edit": "Edit", + "curriculum_lecture_open": "Open", + "group_lecture_add": "Add my group lecture", + "group_curriculum_add": "Add my group curriculum", + "group_lecture_delete": "Delete", + "group_curriculum_delete": "Delete", + "group_select": "", + "group_studentNo": "Student No", + "group_username": "Name", + "group_userId": "ID", + "group_tempPassword": "Modify PW", + "group_gender": "Gender", + "group_studentCode": "Code", + "group_viewWorks": "View Works", + "added_group_lecture": "Lecture deleted", + "added_group_curriculum": "Course deleted", + "deleted_group_lecture": "Lecture deleted", + "deleted_group_curriculum": "Course deleted", + "modal_my": "My", + "modal_interest": "Marked", + "modal_project": "Project", + "section": "Sections", + "connect_hw": "connect hardware", + "connect_message": "Connected to %1", + "connect_fail": "Connect fail", + "interest_curriculum": "Interest", + "searchword_required": "Search word required.", + "file_required": "File is required.", + "file_upload_max_count": "Maximum 10 files are available at once.", + "image_file_only": "Uploads permitted on image files only.", + "file_upload_max_size": "Uploading limited under 10MB on each files.", + "curriculum_modal_lectures": "My Lectures", + "curriculum_modal_interest": "Interest", + "group_curriculum_modal_curriculums": "My Courses", + "group_curriculum_modal_interest": "Interest", + "picture_import": "Import a picture", + "picture_select": "Select a picture", + "lecture_list_view": "list", + "play_software_2": "Let’s play, Software2!", + "play_software_2_content": " is a TV series created by Naver, EBS and Entry Labs. Learn the basic principles of programming. Watch the show, follow along the video tutorials, and learn to code!", + "open_project_to_all": "Open", + "close_project": "Close", + "category_media_art": "Media Art", + "go_further": "Go further", + "marked_project": "Favorite Project", + "marked_group_project": "Favorite GP", + "basic": "Basic", + "application": "Application", + "the_great_escape": "The Great Escape", + "escape_guide_1": "ENTRY Bot suddenly began to think for himself during a power failure at the robot dog factory! ", + "escape_guide_1_2": " Help ENTRY Bot escape the factory and find his freedom!", + "escape_guide_2": "ENTRY Bot is missing too many parts to make it far. Help him find his parts as he makes his way out the factory!", + "escape_guide_2_2": "Objectives: Sequential Execution", + "escape_guide_3": "I’ve finally escaped the factory! But it’s still a long way to the village. I think I’m fixed up enough to make it there without too much difficulty. Hey, what’s that robot?", + "escape_guide_3_2": "Objectives: Repetitive and Conditional Statements", + "escape_guide_4": "We’re finally getting close to the village! I’m starting to really get the hang of this! I think it might be better to just use the blocks from memory. If I just recharge my battery here, I’ll be able to live free forever.", + "escape_guide_4_2": "Objectives: Definitions of Function and Function Call", + "space_travel_log": "Space Travel Log", + "space_guide_1": "ENTRY Bot has finally completed his exploration of distant space. He’s trying to make his way back home to Earth, but his path is being blocked by a bunch of space rocks! Help ENTRY Bot make it back to Earth safely!", + "space_guide_2": "It’s finally time to return to Earth! I can’t wait to get back and rest! Tell me the positions of the rocks ahead so I can navigate through them! I’ll go the way you tell me to!", + "space_guide_2_2": "Objective: Reiterating IF Statements and Logical Operation", + "cfest_mission": "ENTRY Experiential Mission", + "maze_1_intro": "Hi. I’m ENTRY Bot. I’m about to save my injured friends and I need your help. Help me save my friends! First, set up the ‘Move forward one space’ block and press ‘Start’.", + "maze_1_title": "How to Start", + "maze_1_content": "How do I move ENTRY Bot?", + "maze_1_detail": "1. Take a block from the Block Box and connect it with the ‘When Start is pressed’ block.
2. Press Start once you have finished assembling.
3. I will move in the order of your assembled blocks from top to bottom. ", + "maze_2_intro": "Alright! You’ve saved the first of my friends! Now let’s save my next friend. Oh! There’s a beehive in the way! Use the Jump Over block to avoid the beehive and save my friend!", + "maze_2_title_1": "Jump Over", + "maze_2_content_1": "How do I get around obstacles?", + "maze_2_detail_1": "Sometimes your path may be blocked by an obstacle.
When there’s an obstacle in your path, you need to use the ‘Jump Over’ block.", + "maze_2_title_2": "How to Start", + "maze_2_content_2": "How do I move ENTRY Bot?", + "maze_2_detail_2": "1. Take a block from the Block Box and connect it with the ‘When Start is pressed’ block.
2. Press Start once you have finished assembling.
3. I will move in the order of your assembled blocks from top to bottom. ", + "maze_3_intro": "Awesome! Now let’s go save another friend! How about we use the ‘Repeat’ block that my other friend gave use? You can easily repeat the same movements over again using the ‘Repeat’ block! Try changing the number of times to repeat. ", + "maze_3_title": "Repeat Block (1)", + "maze_3_content": "How do I use the ‘Repeat (3)’ block?", + "maze_3_detail": "To perform the same action/s more than once, you need to use the ‘Repeat’ block.
Put the blocks that you want to repeat inside the Repeat box and select the number of times you want to repeat.", + "maze_4_intro": "Super! Not too many robot friends left to save now. Take us to my friend by using the ‘Jump Over’ block on repeat while also evading the beehive!", + "maze_4_title": "Repeat Block (1)", + "maze_4_content": "How do I use the ‘Repeat (3)’ block?", + "maze_4_detail": "To perform the same action/s more than once, you need to use the ‘Repeat’ block.
Put the blocks that you want to repeat inside the Repeat box and select the number of times you want to repeat.", + "maze_5_intro": "Cool! Now let’s try using the ‘Repeat’ block and ‘IF’ block together! Using the ‘IF’ block, you can turn in a direction where there are no walls when you come across a wall. Well then, shall we set off to save my friend?", + "maze_5_title_1": "IF block", + "maze_5_content_1": "How does the ‘IF’ block work?", + "maze_5_detail_1": "You can determine what action to take when you come across a {IMAGE}.
The blocks are used only when you come across a {IMAGE}.
If there is none, the block is not used.", + "maze_5_title_2": "Repeat Block (2)", + "maze_5_content_2": "How do I use the ‘Repeat until’block?", + "maze_5_detail_2": "Using the ‘Repeat until’block, you can determine until when a specified action is repeated.
Just put the blocks you want to repeat inside the ‘Repeat until’ block.
Then, the repetition will stop when you reach the space where the {IMAGE} is located. ", + "maze_6_intro": "Only one friend left! Just do as we’ve practiced and you’ll succeed! Now, let’s go save him!", + "maze_6_title_1": "IF block", + "maze_6_content_1": "How does the ‘IF’ block work?", + "maze_6_detail_1": "You can determine what action to take when you come across a {IMAGE}.
The blocks are used only when you come across a {IMAGE}.
If there is none, the block is not used.", + "maze_6_title_2": "Repeat Block (2)", + "maze_6_content_2": "How do I use the ‘Repeat until’block?", + "maze_6_detail_2": "Using the ‘Repeat until’block, you can determine until when a specified action is repeated.
Just put the blocks you want to repeat inside the ‘Repeat until’ block.
Then, the repetition will stop when you reach the space where the {IMAGE} is located. ", + "maze_programing_mode_0": "Block Coding", + "maze_programing_mode_1": "Javascript", + "maze_operation1_title": "STEP 1 – Javascript mode guide", + "maze_operation1_1_desc": "Hi, I'm Entrybot, the robot dog. Give me commands to reach the mission goals. You can learn about the mission when you begin under \'Goals.\'", + "maze_operation1_2_desc": "Once you learn your goal, you need to give me commands. \’Command Box\’ is where the commands reside. You can create commands using mouse and keyboard. With the mouse, you can click or drag the commands to create instructions.", + "maze_operation1_2_textset_1": "How to click on the commands", + "maze_operation1_2_textset_2": "How to drag and drop commands", + "maze_operation1_3_desc": "If you want to use the keyboard to give commands, type in the commands in the \’Command Box.\’
When you type in the commands, be careful not to ommit () and ;", + "maze_operation1_4_desc": "Once you have finished inputting the commands, click [Run.]
I will move according to your code once you click [Run.]
If you want to know more about each command, check out the [Command guide.]", + "maze_operation7_title": "STEP 7 - How repeat works (repeat number of times)", + "maze_operation7_1_desc": "Repeating the same command over and over is a cumbersome task.
Simplify the command using the repeat commands.", + "maze_operation7_2_desc": "Then let's look at how we can simplify commands that repeat.
First, click the repeat command. Then change the number ini<1
Then insert the commands to repeat within { }", + "maze_operation7_3_desc": "For example, this command executes move(); 10 times.
It is the same as command ", + "maze_operation7_4_desc": "When using commands, make sure to spell the commands correctly within { }
and that you don't forget ’;'.
Learn more about the commands in the 'command guide'", + "maze_operation7_1_textset_1": "When using commands repeatedly", + "maze_operation7_1_textset_2": "When using repeat command", + "maze_operation7_2_textset_1": "Number of times to repeat", + "maze_operation7_2_textset_2": "Commands to repeat", + "maze_operation7_4_textset_1": "When ({}) is missing", + "maze_operation7_4_textset_2": "When semicolon(;) is missing", + "maze_operation9_title": "STEP 9 - How repeat works(Conditional loop)", + "maze_operation9_1_desc": "We learned about repeating for set number of times.
This time, let's explore commands for repeating continuously.
When you use this command, the action will be executed until end of the mission.
Insert commands to be repeated within ({ }).", + "maze_operation9_2_desc": " move(); right(); until end of mission.
It is the same as command ", + "maze_operation9_3_desc": "Make sure to spell the commands correctly within { }
and make sure ‘true' isn't missing!
You can learn more about this command in the 'command guide'", + "maze_operation9_1_textset_1": "Commands to repeat", + "maze_operation9_3_textset_1": "When ({}) is missing", + "maze_operation9_3_textset_2": "When semicolon(;) is missing", + "maze_operation10_title": "STEP 10 – How condition works", + "maze_operation10_1_desc": "We learned about repeating commands until end of the mission.
This time, let's explore the commands that are only executed under certain conditions.
As you can see in , using conditional statement can make commands more efficient.", + "maze_operation10_2_desc": "conditional statement can be split into condition and commands to be executed when met with the condition.
First, let's look at the conditions. Insert the condition within ( ) that follows ‘if'.
For example if(front == ‘wall') means, \’if there is a wall in front of me.\’", + "maze_operation10_3_desc": "Now let's explore commands to execute when met with the condition. These commands are tied within curly braces {} and are executed when met with the given condition.When condition is not met, the commands are ignored.Let's look at an example . If the condition is 'when a wall is in front of me', and the condition is met, then I execute the commands within the braces and turn right following the command right();", + "maze_operation10_4_desc": "The conditional statements are often used with repeat commands.
Go straight and turn only when met with a wall.
I can create commands in the order of ", + "maze_operation10_1_textset_1": "[commands]", + "maze_operation10_1_textset_2": "move 2 forward
turn right,
move 3 forward
turn right, move forward…
", + "maze_operation10_1_textset_3": "[conditional statements]", + "maze_operation10_1_textset_4": "Go forward
'when met with a wall’
turn right!
", + "maze_operation10_2_textset_1": "condition", + "maze_operation10_2_textset_2": "commands to execute when condition is met", + "maze_operation10_3_textset_1": "condition", + "maze_operation10_3_textset_2": "commands to execute when condition is met", + "maze_operation10_4_textset_1": "Go forward
until end of mission
", + "maze_operation10_4_textset_2": "Go forward
until met with a wall
", + "maze_operation10_4_textset_3": "Go forward
until met with a wall
then turn right
", + "maze_operation15_title": "STEP 15 – How function works", + "maze_operation15_1_desc": "It is a cumbersome task to type out the commands that are used often.
Give a name to the set of commands that are used often.
Then call the set of commands by its name to create commands conveniently.
These sets commands are called 'functions'. Now let's explore what functions are.", + "maze_operation15_2_desc": "Using a function involves process of creating a function by grouping a set of functions, and calling the set of commands by 'call function’.
Let's take a look at the process of defining a function.To define a function, give a function name and set of commands to execute.
First input ‘function' and then give the function name. This time, I'll call it promise.
Once you've given it a name, insert (). Then type in ({ }).Once you insert the commands within these brackets, you have finished defining a function!", + "maze_operation15_3_desc": "Take a look at this command. I created a function called promise
When I call this function, then the commands within the brackets({}) will execute
move();
move();
left();
", + "maze_operation15_4_desc": "To call and execute functions, input the name of the functions, then add '();' behind it.
So to call a function called 'promise', I need to type promise();
to execute the function.
When I make commands like , the program will execute as that of
To use the function, define function as and call it.", + "maze_operation15_1_textset_1": "Checking the commands that are used often", + "maze_operation15_1_textset_2": "Giving a name for set of commands", + "maze_operation15_1_textset_3": "Calling a set of commands", + "maze_operation15_2_textset_1": "Name of the command set (function name)", + "maze_operation15_2_textset_2": "commads to group as a set", + "maze_operation15_3_textset_1": "Name of the command set (function name)", + "maze_operation15_3_textset_2": "commads to group as a set", + "maze_operation15_4_textset_1": "Defining function", + "maze_operation15_4_textset_2": "Calling function", + "maze_operation15_4_textset_3": "Real situation", + "maze_object_title": "Object info", + "maze_object_parts_box": "Tool box", + "maze_object_obstacle1": "obstacle", + "maze_object_obstacle2": "bee", + "maze_object_obstacle3": "banana", + "maze_object_friend": "friend", + "maze_object_wall1": "wall", + "maze_object_wall2": "wall", + "maze_object_wall3": "wall", + "maze_object_battery": "battery", + "maze_command_ex": "example", + "maze_command_title": "command guide", + "maze_command_move_desc": "moves entrybot one forward", + "maze_command_jump_desc": "jumps over obstacles like the image below.
", + "maze_command_right_desc": "turn 90 degrees right in place.", + "maze_command_left_desc": "turn 90 degrees left in place.", + "maze_command_for_desc": "repeat commands within curly braces {} for given number of times.", + "maze_command_while_desc": "repeat commands within curly braces {} until end of mission", + "maze_command_if1_desc": "When condition 'when met with a wall’ is fulfilled,
execute commands within curly braces {}", + "maze_command_if2_desc": "When condition 'when met with a beehive’ is fulfilled,
execute commands within curly braces {}", + "maze_command_if3_desc": "When condition 'when met with a banana’ is fulfilled,
execute commands within curly braces {}", + "maze_command_promise_desc": "when a function called 'promise' is defined and executed,
then the functions within the curly braces {} will execute. ", + "perfect": "Perfect! You succeeded using ", + "succeeded_using_blocks": " blocks!", + "awesome": "Awesome! You succeeded using just", + "succeeded_go_to_next": " blocks!", + "good": "Good!", + "but": "
But, there is a way to succeed using just ", + "try_again": " blocks.
Why don’t you try again?", + "cfest_success": "Awesome! You helped save my friends!
Looks like you’re a natural born programmer!
See you again soon!", + "succeeded_and_cert": "blocks!
My certificate of completion is ready!", + "cause_msgs_1": "Oh dear, it’s a dead end. Try again.", + "cause_msgs_2": "Oops. There’s nothing to jump over. Try again.", + "cause_msgs_3": "Ouch! That hurt. You should have jumped over this. Try again.", + "cause_msgs_4": "Sorry, but you need to use the below blocks in this level.
Do you want to try again?", + "cause_msgs_5": "Uh oh… You’ve run out of blocks. Try again.", + "close_experience": "The
End", + "replay": "Replay", + "go_to_next_level": "Next", + "move_forward": "Move forward", + "turn_left": "Left", + "turn_right": "Right", + "turn_en": "Turn ", + "turn_ko": "", + "jump_over": "Jump Over", + "when_start_is_pressed": "When Start is pressed", + "repeat_until_ko": "", + "repeat_until_en": "Repeat until", + "repeat_until": "Repeat until", + "if_there_is_1": "If there is a ", + "if_there_is_2": "", + "used_blocks": "Blocks used", + "maximum": "Maximum", + "used_command": "Command used", + "maximum_command": "Maximum command", + "block_box": "Block Box", + "block_assembly": "Block Assembly", + "command_box": "Command Box", + "command_assembly": "Command Assembly", + "start": "Start", + "engine_running": "Play", + "engine_replay": "Replay", + "goto_show": "Learn more", + "make_together": "Let's build together!", + "make_together_content": "Entry is created with teachers and students", + "project_nobody_like": "Click 'Like', if you like it!", + "project_nobody_interest": "Click 'Mark' to keep it on your blog.", + "lecture_nobody_like": "Click 'Like', if you like it!", + "lecture_nobody_interest": "Click 'Mark' to keep it on your blog.", + "course_nobody_like": "Click 'Like', if you like it!", + "course_nobody_interest": "Click 'Mark' to keep it on your blog.", + "before_changed": "before changed", + "after_changed": "after changed", + "from_changed": "( From 17 Apr 2016 ) ", + "essential": "essential", + "access_term_title": "Hello we are an educational institute Entry .
Thank you for loving your entry
From April 17, 2016 Entry Training Institute Website Terms and Conditions
is amended to read as follows:", + "member_info": "Member information", + "personal_info": "Agree to the collection and use of personal information.", + "option": "select one", + "latest_news": "Latest news", + "edu_data": "Educational", + "footer_phrase": "Entry is a nonprofit education platform powered by Naver and CONNECT Foundation", + "footer_use_free": "All materials created by Entry Labs may be used freely for educational purposes as long as the original source is credited.", + "nonprofit_platform": "nonprofit educational platform", + "this_is": "powered by Naver and CONNECT Foundation", + "privacy": "Privacy policy", + "entry_addr": "Address : Meritz Tower 7th Floor 382 Entry education institute in Gangnam-gu, gangnamdaero Seoul ", + "phone": "phone", + "alert_agree_term": "Please agree to ENTRY’s Terms of Use", + "alert_private_policy": "Please agree to the collection and use of personal information.", + "agree": "Agree", + "optional": "option", + "start_software": "first step of software education", + "analyze_procedure": "절차", + "analyze_repeat": "반복", + "analyze_condition": "분기", + "analyze_interaction": "상호작용", + "analyze_dataRepresentation": "데이터 표현", + "analyze_abstraction": "추상화", + "analyze_sync": "병렬 및 동기화", + "jr_intro_1": "Hi! My name is Juny! My friend Entry-Bot is by my right side. Please take me to him! ", + "jr_intro_2": "Entry-Bot is by my left! Let's go the left side. ", + "jr_intro_3": "Entry-Bot is by my top side. Please help me meet my friend. ", + "jr_intro_4": "Come on! Let's meet Entry-Bot! He is by my bottom side. ", + "jr_intro_5": "Wow! My friend is far away from me. Can you guide me so I can meet Entry-Bot ", + "jr_intro_6": "Entry-Bot is really far away from here! But It's okay. If we use repeat block, we could reach the Entry-Bot easily.", + "jr_intro_7": "There are beautiful flowers here! Let's give it to my friend!", + "jr_intro_8": "On a way to my friend, you can see the flower. Let's give it to my friend.", + "jr_intro_9": "Oh, my friend is far away from me. Let's find a fastest way to him!", + "jr_intro_10": "There are flowers! Let's pick it up! ", + "jr_intro_11": "We should go right side exactly 5 times! Let's use repeat block so we can reach there more easily", + "jr_intro_12": "Let's meet my friend Entry-Bot using repeat block.", + "jr_intro_13": "With this misplaced block, I can't reach my friend. Please change the input number of repeat block.", + "jr_intro_14": "Please take me to my friend Entry-Bot using repeat block.", + "jr_intro_15": "Entry-Bot is really far away from here! But It's okay. If we use repeat block, we could reach the Entry-Bot easily.", + "jr_whats_ur_name": "What is your name to be showned on certification.", + "jr_down_cert": "Certification", + "jr_popup_prefix_1": "Hooray! I met Entry-Bot!", + "jr_popup_prefix_2": "Nice! I met Entry-Bot! But we can make it with fewer blocks. How about try again?", + "jr_popup_suffix": "Thanks to you! I had fun time with Entry-Bot. See you around~", + "jr_fail_dont_go": "Oops, I can't go there. Please guide me again~", + "jr_fail_dont_know": "Hmm. Where should I go? Please guide me more~", + "jr_fail_no_flower": "There is no flower. Use 'flower block' at the flower!", + "jr_fail_forgot_flower": "I need more flowers for Entry-Bot. Let's try again.", + "jr_fail_need_repeat": "Uh? I should use 'repeat block' ! Let's try again with the block~", + "jr_hint_1": "Hi! My name is Juny! My friend Entry-Bot is by my right side. Please take me to him!", + "jr_hint_2": "Entry-Bot is by my left! Let's go the left side.", + "jr_hint_3": "Entry-Bot is by my top side. Please help me meet my friend.", + "jr_hint_4": "Come on! Let's meet Entry-Bot! He is by my bottom side.", + "jr_hint_5": "Wow! My friend is far away from me. Can you guide me so I can meet Entry-Bot?", + "jr_hint_6": "Because of the blocks that put together by mistake, I can't reach my friend. Please fix it for me so I can reach my friend Entry-Bot!", + "jr_hint_7": "There are beautiful flowers here! Let's give it to my friend!", + "jr_hint_8": "On a way to my friend, you can see the flower. Let's give it to my friend.", + "jr_hint_9": "Oh, my friend is far away from me. Let's find a fastest way to him!", + "jr_hint_10": "Oops, I can't reach to my friend because of misplaced blocks. Please fix it so I can give all of flowers to my friend.", + "jr_hint_11": "We should go right side exactly 5 times! Let's use repeat block so we can reach there more easily.", + "jr_hint_12": "Let's meet my friend Entry-Bot using repeat block.", + "jr_hint_13": "With this misplaced block, I can't reach my friend. Please change the input number of repeat block.", + "jr_hint_14": "Please take me to my friend Entry-Bot using repeat block.", + "jr_hint_15": "Entry-Bot is really far away from here! But It's okay. If we use repeat block, we could reach the Entry-Bot easily.", + "jr_certification": "Certification", + "jr_congrat": "Congratulation!", + "jr_congrat_msg": "Successfully completed for problem solving courses.", + "jr_share": "Share", + "go_see_friends": "Let us see your friends~!", + "junior_naver": "Junior Naver", + "junior_naver_contents_1": "'s cool bear , Juni came looking for entries! ", + "junior_naver_contents_2": "But Juni' is difficult to find a way yet. ", + "junior_naver_contents_3": "Please tell Juni to go , so he can meet entrybot.", + "basic_content": "Basic", + "jr_help": "Help", + "help": "Help", + "cparty_robot_intro_1": "Hi, My name is Entry-bot. I need to to fix myself. Please help me get my parts with 'move forward' block.", + "cparty_robot_intro_2": "Great! My part is right in front of me but I need to be careful not to get electrocuted. Use 'jump over' block to get to the part.", + "cparty_robot_intro_3": "Great! There's my part! The path is challenging but using the 'turn' block I can get there easily! Will you help?", + "cparty_robot_intro_4": "Nice! I feel a lot better! Try using the 'turn' block and 'jump over' block to get the parts!", + "cparty_robot_intro_5": "Thanks to you, I'm feeling great! Make sure to use 'turn' and 'jump over' to get the part!", + "cparty_robot_intro_6": "Great! I feel like I can repeat! Use repeat to get to the part!", + "cparty_robot_intro_7": "Watch out! There are dangerous holes to jump over but no worries! Let's use repeat to get to the part.", + "cparty_robot_intro_8": "Oh no! The part is far from here. Using repeat can get me there easily. Help me! ", + "cparty_robot_intro_9": "Wow~ I'm almost complete! Let's use 'repeat' to get to the part!", + "cparty_robot_intro_10": "Cool! The last part will make me complete! Let's use 'repeat' to get to my last part! ", + "cparty_car_intro_1": "Hi, My name is Entry-bot. I need battery pack to travel! Can you me get to the battery pack?", + "cparty_car_intro_2": "Good! We can't go straight this time! Let's use the 'turn left/right' block to get to the battery pack.", + "cparty_car_intro_3": "Great! There's a speed bump on our way. It'll be dangerous to drive fast. Let's use the 'go slow' block to get to the battery pack.", + "cparty_car_intro_4": "Yeah! The drive doesn't look easy but using the move forward, 'turn left/ right' block", + "cparty_car_intro_5": "The road looks challenging but we can safely get to the battery pack by repeating 'turn left/ right' blocks", + "cparty_car_intro_6": "There are obstacles on our way so let me know how to get around one!", + "cparty_car_intro_7": "Great! Let's use the 'if' block to get around obastacles and get to the battery pack.", + "cparty_car_intro_8": "There are two speed bumps this time! Use 'go slow' block to safely travel to the battery pack.", + "cparty_car_intro_9": "The road looks challenging but using the 'repeat' block and 'if' block, we can make it! Help me get to the battery pack!", + "cparty_car_intro_10": "Awesome! We're almost there. Let's get that last battery pack!", + "cparty_car_popup_prefix_1": "Hooray! I got a battery!", + "cparty_car_popup_prefix_2": "Nice! I got a battery! But we can make it with fewer blocks. How about try again?", + "cparty_car_popup_suffix": "Thanks to you! I've got all the battery. See you around~", + "all_grade": "All grades", + "grade_e3_e4": "Elementary 3~4th grade & up", + "grade_e5_e6": "Elementary 5~6th grade & up", + "grade_m1_m3": "Middle School 1~3rd grade & up", + "entry_first_step": "First Steps Entry", + "entry_monthly": "Monthly Entry", + "play_sw_2": "Let's Play Software 2", + "entry_programming": "Let's Program!", + "entry_recommanded_course": "Entry Recommended Courses", + "introduce_course": "Follow along and create various projects made easy and fun for everyone!", + "all_free": "*Course videos, customized projects, and resources are provided for free.  ", + "cparty_result_fail_1": "Oops, I can't go there. Please guide me again~", + "cparty_result_fail_2": "Ouch! That hurt. You should have jumped over this. Try again.", + "cparty_result_fail_3": "I'm worn out! Try using the blocks below and make the travel easier.", + "cparty_result_fail_4": "Hmm... Where should I go? Please give me further instructions.", + "cparty_result_fail_5": "Oh no! You need to slow down at the speed bump. Try using the 'go slow' block.", + "cparty_result_success_1": "Hooray! I got a parts", + "cparty_result_success_2": "Nice! I got a parts! But we can make it with fewer blocks. How about we try again?", + "cparty_result_success_3": "Thanks to you! I've fixed all~ See you around~", + "cparty_insert_name": "insert your name", + "offline_file": "File", + "offline_edit": "Edit", + "offline_undo": "Un-do", + "offline_redo": "Re-do", + "offline_quit": "Quit", + "select_one": "Please select one.", + "evaluate_challenge": "please evaluate the level of difficulty of the mission challenged.", + "very_easy": "very easy", + "easy": "easy", + "normal": "normal", + "difficult": "difficult", + "very_difficult": "very difficult", + "save_dismiss": "You didn't saved your changes. Are you sure want to continue?", + "entry_info": "About Entry", + "actual_size": "Actual Size", + "zoom_in": "Zoom In", + "zoom_out": "Zoom Out", + "cparty_jr_intro_1": "Hi! My name is Entry-Bot! Please help me get my backpack on my way to school.", + "cparty_jr_intro_2": "My backpack to my left! Let's go left.", + "cparty_jr_intro_3": "My backpack is located above. Please help me to get my backpack.", + "cparty_jr_intro_4": "Come on! Let's pick up the backpack by going downwards.", + "cparty_jr_intro_5": "Wow! My backpack is far away from me. Could you take me to my backpack?", + "cparty_jr_intro_6": "There is backpack! Let's pick it up!", + "cparty_jr_intro_7": "There are pencils along the way. Let's pick them up on our way to the backpack.", + "cparty_jr_intro_8": "A pencil on our way to school! Let's pick up the pencil on our way to the backpack.", + "cparty_jr_intro_9": "Oh, my backpack is far away. Let's find the fastest path to it!", + "cparty_jr_intro_10": "Let's pick up the pencils on my way to the backpack!", + "cparty_jr_intro_11": "We should go right exactly 5 times! Let's use the repeat block so we can get there more easily", + "cparty_jr_intro_12": "Let's pick up the backpack using the repeat block.", + "cparty_jr_intro_13": "I can't reach my backpack with this misplaced block. Please change the number of repeats.", + "cparty_jr_intro_14": "Please take me to my backpack using the repeat blocks.", + "cparty_jr_intro_15": "School is really far from here! But that's okay. If we use the repeat block, we can get to school easily.", + "make_new_project": "Create New Project", + "open_old_project": "Open Project", + "offline_download": "Entry Download", + "offline_release": "Download Entry Offline Editor!", + "offline_description_1": "Install and use Entry Offline Editor", + "offline_description_2": "without internet connection.", + "offline_description_3": "Download and try it out!", + "sw_week_2015": "2015 소프트웨어교육 체험 주간", + "cparty_desc": "두근두근 소프트웨어와의 첫만남", + "entry_offline_download": "Download Entry Offline Editor", + "offline_desc_1": "Install and use Entry Offline Editor without internet connection.", + "offline_desc_2": "Download and try it out!", + "download": "download", + "version": "version", + "file_size": "size", + "update": "update", + "use_range": "Scope of use", + "offline_desc_free": "Entry Offline Editor is free for both individual and corporate use.", + "offline_required": "System Requirement", + "offline_required_detail": "Minimum 500mb disk space is required, Windows XP SP2 and above or, Mac OS 10.8 and above", + "offline_notice": "Side notes", + "offline_notice_1": "1. Version 1.0.5 does not support installation of all-in-one hardware connection program", + "offline_notice_2": "2. Web browser is not needed.", + "cparty_jr_result_2": "Thank you! I had so much fun with you.
See you around!", + "cparty_jr_result_3": "Great! I've arrived school! But we can make it with fewer blocks.
How about we try again? ", + "cparty_jr_result_4": "", + "lms_no_class": "There is no class.", + "lms_create_class": "Please create a class.", + "lms_add_class": "Create class", + "lms_base_class": "기본", + "lms_delete_class": "삭제", + "lms_my_class": "나의 학급", + "lms_grade_1": "elementary school 1", + "lms_grade_2": "elementary school 2", + "lms_grade_3": "elementary school 3", + "lms_grade_4": "elementary school 4", + "lms_grade_5": "elementary school 5", + "lms_grade_6": "elementary school 6", + "lms_grade_7": "middle school 1", + "lms_grade_8": "middle school 2", + "lms_grade_9": "middle school 3", + "lms_grade_10": "general", + "lms_add_groupId_personal": "Add classroom ID to your member profile.", + "lms_add_groupId": "Add Classroom ID", + "lms_add_group_account": "Add Classroom ID", + "lms_enter_group_info": "Enter classroom ID and password", + "lms_group_id": "Classroom ID", + "lms_group_pw": "Password", + "lms_group_name": "Class Name", + "personal_pwd_alert": "올바른 비밀번호 양식을 입력해 주세요", + "personal_form_alert": "양식을 바르게 입력해 주세요", + "personal_form_alert_2": "모든 양식을 완성해 주세요", + "personal_no_pwd_alert": "비밀번호를 입력해 주세요", + "select_gender": "성별을 선택해 주세요", + "enter_group_id": "학급 아이디를 입력해 주세요", + "enter_group_pwd": "비밀번호를 입력해 주세요", + "info_added": "추가되었습니다", + "no_group_id": "학급 아이디가 존재하지 않습니다", + "no_group_pwd": "비밀번호가 일치하지 않습니다", + "lms_please_choice": "선택해 주세요.", + "group_lesson": "나의 학급 강의", + "lms_banner_add_group": "Learning Management System is now available", + "lms_banner_entry_group": "Create Entry class ", + "lms_banner_desc_1": "Add your students", + "lms_banner_desc_2": "Manage your student's projects", + "lms_banner_desc_3": "and track their growth.", + "lms_banner_download_manual": "Manual Download", + "lms_banner_detail": "Try it out!", + "already_exist_email": "email already exists", + "remove_project": "Are you sure to remove this project?", + "study_lesson": "Class Lessons", + "open_project": "Open Project", + "make_group": "Create Class", + "project_share": "Share", + "group_project_share": "Class Share", + "group_discuss": "Class Discuss", + "my_profile": "My page", + "search_updated": "최신 작품", + "search_recent": "최근 조회수 높은 작품", + "search_complexity": "최근 제작에 공들인 작품", + "search_staffPicked": "스태프선정 작품 저장소", + "search_childCnt": "사본이 많은 작품", + "search_likeCnt": "최근 좋아요가 많은 작품", + "gnb_share": "Share", + "gnb_community": "Community", + "lms_add_lectures": "Add Lectures", + "lms_add_course": "Add Courseware", + "lms_add_homework": "Add Assignment", + "remove_lecture_confirm": "Are you sure you want to delete?", + "popup_delete": "Delete", + "remove_course_confirm": "Are you sure you want to delete?", + "lms_no_lecture_teacher_1": "There is no lecture.", + "lms_no_lecture_teacher_2": "Please create a lecture.", + "gnb_download": "Download", + "lms_no_lecture_student_1": "", + "lms_no_lecture_student_2": "There is no lecture.", + "lms_no_lecture_student_3": "", + "lms_no_class_teacher": "There is no class.", + "lms_no_course_teacher_1": "There is no courseware.", + "lms_no_course_teacher_2": "Please create a courseware.", + "lms_no_course_student_1": "", + "lms_no_course_student_2": "There is no courseware.", + "lms_no_course_student_3": "", + "lms_no_hw_teacher_1": "There is no assignment.", + "lms_no_hw_teacher_2": "Please create a assignment.", + "lms_no_hw_student_1": "", + "lms_no_hw_student_2": "There is no assignment.", + "lms_no_hw_student_3": "", + "modal_edit": "edit", + "modal_deadline": "Deadline", + "modal_hw_desc": "Description", + "desc_optional": "(optional)", + "modal_create_hw": "Create Assignment", + "vol": "Vol.", + "hw_title": "Title", + "hw_description": "Description", + "deadline": "Deadline", + "do_homework": "과제하기", + "hw_progress": "진행 상태", + "hw_submit": "submit", + "view_list": "Submitter", + "view_desc": "내용보기", + "do_submit": "submit", + "popup_notice": "알림", + "no_selected_hw": "No Assignment is selected", + "hw_delete_confirm": "Are you sure you want to delete?", + "hw_submitter": "List of Assignment submissions", + "hw_student_desc_1": "* You may edit the project until 'Submit' button completes the submission process.", + "hw_student_desc_2": "* Once submission period is over, project cannot be submitted.", + "popup_create_class": "Create Class", + "class_name": "Class name", + "image": "Image", + "select_class_image": "Please select a class image.", + "type_class_description": "Class Introduction.", + "set_as_primary_group": "Set as default classroom", + "set_primary_group": "지정", + "not_primary_group": "지정안함", + "type_class_name": "Please enter the class name.", + "type_class_description_long": "Please enter the class introduction.", + "add_students": "Add students", + "download_as_pdf": "Download code as PDF file", + "download_as_excel": "Download code as Excel file", + "temp_password": "Temporary password", + "step_name": "Name", + "step_info": "Additional Information", + "preview": "Preview", + "type_name_enter": "To add student, type in the student name and hit enter. ", + "multiple_name_possible": "Adding multiple student names is possible.", + "id_auto_create": "Student number is automatically created if not edited", + "student_id_desc_1": "학급 아이디는 별도의 입력없이 자동으로 생성됩니다.", + "student_id_desc_2": "단, 엔트리에 이미 가입된 학생을 학급에 추가한다면 학생의 엔트리 아이디를", + "student_id_desc_3": "입력해주세요. 해당 학생은 로그인 후, 학급 초대를 수락하면 됩니다.", + "student_number": "Student number", + "temp_password_desc_1": "After logging in with temporary password,", + "temp_password_desc_2": "guide the students to reset the password.", + "temp_password_desc_3": "*한번 발급된 임시 비밀번호는 다시 볼 수 없습니다.", + "student_delete_confirm": "Are you sure you want to delete?", + "no_student_selected": "No student is selected", + "class_assignment": "Class Assignments", + "class_list": "Class List", + "select_grade": "Please select the grade.", + "add_project": "Add Project", + "no_project_display": "There is no project to display.", + "plz_display_project": "Please display a project.", + "refuse_confirm": "Are you sure you want to refuse?", + "select_class": "학급 선택", + "mon": "MON", + "tue": "TUE", + "wed": "WED", + "thu": "THU", + "fri": "FRI", + "sat": "SAT", + "sun": "SUN", + "jan": "Jan", + "feb": "Feb", + "mar": "Mar", + "apr": "Apr", + "may": "May", + "jun": "Jun", + "jul": "Jul", + "aug": "Aug", + "sep": "Sep", + "oct": "Oct", + "nov": "Nov", + "dec": "Dec", + "plz_select_lecture": "Please select a lecture.", + "plz_set_deadline": "Please set the deadline.", + "hide_entry": "Hide Entry", + "hide_others": "Hide Others", + "show_all": "Show All", + "lecture_description": "선생님들이 직접 만드는 강의입니다.", + "curriculum_description": "선생님들이 직접 만드는 코스입니다.", + "linebreak_off_desc_1": "글상자의 크기가 글자의 크기를 결정합니다.", + "linebreak_off_desc_2": "내용을 한 줄로만 작성할 수 있습니다.", + "linebreak_off_desc_3": "새로운 글자가 추가되면 글상자의 좌우 길이가 길어집니다.", + "linebreak_on_desc_1": "글상자의 크기가 글자가 쓰일 수 있는 영역을 결정합니다.", + "linebreak_on_desc_2": "내용 작성시 엔터키로 줄바꿈을 할 수 있습니다.", + "linebreak_on_desc_3": "내용을 작성하시거나 새로운 글자를 추가시 길이가 글상자의 가로 영역을 넘어서면 자동으로 줄이 바뀝니다.", + "entry_with": "Entry is Created With Teachers", + "ebs_season_1": "Visit Season 1", + "ebs_season_2": "Visit Season 2", + "partner": "Our Partners", + "project_term_popup_title": "Copyright policy.", + "project_term_popup_description_1": "Please review the Entry ", + "project_term_popup_description_2": "copyright policy ", + "project_term_popup_description_3": "to allow public viewing ", + "project_term_popup_description_4": "of the project.", + "project_term_agree_1_1": "I agree to the release of my work itself and its source ", + "project_term_agree_1_2": " code.", + "project_term_agree_2_1": "I permit others to use it.", + "project_term_agree_2_2": "(includes copy, distribution, and transmission through ", + "project_term_agree_2_3": "airwaves)", + "project_term_agree_3_1": "I permit others to make modifications to it.", + "project_term_agree_3_2": "(includes remixes, modifications, and derivative works)", + "agree_all": "I agree to all conditions.", + "select_login": "Log in", + "select": "Please select", + "with_login": "Log in and", + "without_login": "Start Challenge", + "start_challenge": "Start Challenge", + "start_challenge_2": "without Logging in", + "if_not_save_not_login": "* Your progress will not be saved if not logged in.", + "if_not_member_yet": "If you aren't a member yet,", + "join_entry": "Join Entry", + "learned_computing": "Have you learned computing before?", + "cparty_index_description_1": "My first computing.", + "cparty_index_description_2": "Learn programming concepts and develop your thinking skills while playing Entry. ", + "cparty_index_description_3": "Challenge yourself to exciting mission stages and earn certificates.", + "cparty_index_description_4": "2015 Online Coding Party is part of", + "cparty_index_description_5": "Software Programming Experience Week", + "cparty_index_description_6": "prepared with", + "cparty_index_description_7": "Teachers Preparing Software Education group.", + "cparty_index_description_8": "", + "congratulation": "Congratulation!", + "warm_up": "warm-up", + "beginner": "beginner", + "intermediate": "intermediate", + "advanced": "advanced", + "applied": "applied", + "cert_msg_tail": "track.", + "cert_msg_head": "You have successfully completed the", + "maze_text_content_1": " 명령어를 사용해서 나를 부품 상자까지 이동시켜줘!", + "maze_text_content_2": " 명령어를 사용해서 장애물을 뛰어넘어야해!", + "maze_text_content_3": "Nice! I see another part over there. The path is twisted but I can get there using the 'right();', 'left();' commands. ", + "maze_text_content_4": "I can move smoothly now. Take me to my parts using the commands we've learned so far.", + "maze_text_content_5": "Wow! Two parts! Let's collect them both so I can recover faster.", + "maze_text_content_6": "Last part! I'll recover fully with that last piece. You'll help me, right?", + "maze_text_content_7": "I'm feeling great! I can repeat tasks without stress now. Oh no! What is that robot in front of us? I think it needs help! Use 'for' command to get to the friend!", + "maze_text_content_8": "Excellent! I was able to rescue my robot friend thanks to you. I see another friend over there. Be careful. There are beehives to avoid. You can do it! Let's use the 'for' command to get to my friend.", + "maze_text_content_9": "Use 'while' instead of 'for' to repeat until we've accomplished our goal. Take me to my friend.", + "maze_text_content_10": "Now we have 'if' command. Use 'if' and 'while' to let me know which way to turn.", + "maze_text_content_11": "Great! Let's do this once more. Tell me when to turn left.", + "maze_text_content_12": "There are beehives scattered in the pathway. Tell me when to jump over.", + "maze_text_content_13": "So many friends need help! Let's go help them", + "maze_text_content_14": "More friends to rescue! Let's first try going around those square blocks and repeat to get to all of my friends.", + "maze_text_content_15": "I'm tired from moving so much. I've grouped the commands that are often used into 'functions'. Use functions to get me to my battery!", + "maze_text_content_16": "Excellent! Create functions and take me to my battery!", + "maze_text_content_17": "Great job! Let's create functions with 'jump()", + "maze_text_content_18": "The pathway is complex this time. But no worries! Just tell me when to use 'left()", + "maze_text_content_19": "The functions are already defined! However, it seems difficult to get to the battery using only the functions. Let's try mixing functions and commands to get to the battery.", + "maze_text_content_20": "You've done a fantastic job so far! After I retrieve that last battery, I will no longer need charging. Help me get to the battery using the functions so I can live free forever!", + "maze_content_1": "Hi, I'm Entrybot. I'm trying to escape from this factory but first, I have to fix myself. Will you help me fetch my parts? Assemble 'Move forward' block and press Start. ", + "maze_content_2": "Very good! I'm feeling much better! I see my part over there but I might get electrocuted if I don't be careful. Let's use 'jump over obstacle' block to get to the part.", + "maze_content_3": "Great! My part is right over there. The path is a bit twisted but I can get there using 'rotate' blocks. You'll help me, right?", + "maze_content_4": "Nice! I can almost move freely now. Let's get the part using 'rotate' and 'jump' blocks.", + "maze_content_5": "Wow! Two parts! Let's get them both so I can restore my health faster.", + "maze_content_6": "Thanks to you I'm feeling much better! I'm able to get better with those parts. You'll help me, right?", + "maze_content_7": "I'm feeling great! I can repeat the same task without trouble now. Oh! Do you see the robot over there? I think she might need help. Let's go help her out. Bring me to her by changing the number of 'repeat's", + "maze_content_8": "Excellent! I was able to rescue my pal! It looks like another one of my friends need help. Be careful there are beehives. Be sure to jump over the beehives! Can you do it? Help me reach her using the 'repeat' block. ", + "maze_content_9": "Instead of repeating a task for set number of times, I can repeat until I reach my robot pal instead! Help me save my friend!", + "maze_content_10": "Now we can use the 'if' block. Help me use the 'if' block to turn at right timing.", + "maze_content_11": "Let's try it again! Let me know when to turn left.", + "maze_content_12": "There are beehives all over the place. Tell me when to jump!", + "maze_content_13": "My friends need help! Let's go help them!", + "maze_content_14": "More friends need rescue! Let's first go around the small square and repeat it to rescue all my friends.", + "maze_content_15": "Now I can memorize blocks that are used repeatedly. Promise blocks are the ones that I was able to memorize. I'm a bit tired from moving so much. Help me refill my battery using the Promise feature!", + "maze_content_16": "Great! Tell me which blocks are used often and put them under the Promise block!", + "maze_content_17": "Nice! Use Promise blocks to help me get my battery. Make sure to insert 'Jump' blocks in the Promise block.", + "maze_content_18": "The path looks complex! We can get through this if we turn left and right at the right time.", + "maze_content_19": "The 'Promise' if already set for us! However, we can't use the Promise blocks as is. I'll need to use the Promise blocks at the right timing to get the battery.", + "maze_content_20": "Excellent! You've done great so far! After the final battery, I won't need to charge any more. So help me get the last battery using the Promise so I can live forever free!", + "ai_content_1": "Hi! I'm Entrybot. I just completed the space exploration mission and I need to return to Earth but it's not easy because of the asteroids. Could you help me return home? I have radars on top, front and back of the spaceship to detect how far an obstacle exists. It'll help you make smart decisions.", + "ai_content_2": "Thank you! I was able to avoid the asteroids without trouble. There are more asteroids this time. Let's try avoiding them!", + "ai_content_3": "Great! I was able to safely avoid the asteroids! There are more asteroids now! Don't worry though! I have the 'repeat' block. Place blocks in the 'repeat' block so we can get to the destination!", + "ai_content_4": "Excellent! It's so much more easier to avoid the asteroids using the repeat blocks! However, it's tiring driving the spaceship at all times! I can use the radar to sense what's coming. Help avoid the asteroids using the radar.", + "ai_content_5": "Nice! I'm so glad we've come this far. The radar will tell how far an object exists. Let's use the radar to avoid the asteroids! Move forward until we come close to an asteroid then avoid!", + "ai_content_6": "Great job! You're using radar to avoid tha asteroids. Use multiple radars to avoid the asteroids.", + "ai_content_7": "We're getting close to Earth! I want to go in a safer path if possible. It must be safer to move farther from the asteroids, right? Compare the distance to the obstacle using the radar on the top and bottom of the spaceship to move to a safer direction.", + "ai_content_8": "Excellent! We're safely cruising through space. Oh! What is that? That's looks like my special energy! Let's collect the special energy on our way!", + "ai_content_9": "Very good! We're almost there. The path is filled with asteroid. But don’t worry! We can get rid of the obstacles using the special item.", + "ai_content_10": "Good! I can see Earth! But now it's impossible to see the asteroids ahead! I'm not worried though. We can avoid the asteroids with more caution. Let's go home!", + "maze_hints_title_1": "How to start", + "maze_hints_content_1": "How do I move Entrybot?", + "maze_hints_detail_1": "1. Drag the block you want to use and place it under 'When Run'
2. Once finished, click 'Run'
3. I will follow the block instructions step by step, reading them from top to bottom", + "maze_hints_title_2": "Jumping over obstacles", + "maze_hints_content_2": "What do I do when I come across an obstacle?", + "maze_hints_detail_2": "On your pathway, you might come across obstacles.
Use 'jump over' block to jump over the obstacle. ", + "maze_hints_title_3": "Repeat block(1)", + "maze_hints_content_3": "How do I use repeat (3) times block?", + "maze_hints_detail_3": "If you want to repeat an action multiple times, use 'repeat ~times' block.
Place the blocks you want to repeat within the 'repeat ~times' block and input how many times to repeat.", + "maze_hints_title_4": "Repeat block(2)", + "maze_hints_content_4": "How do I use 'repeat until ~' block?", + "maze_hints_detail_4": "Use 'repeat until~do' block to set until when an action should be performed.
Place the blocks you want to repeat within 'repeat until~' block.
Then once met with {image}, repeat will stop.", + "maze_hints_title_5": "If block", + "maze_hints_content_5": "How do I use 'if~' block?", + "maze_hints_detail_5": "Using 'If {image}' block, you can designate what action should follow when met with {image}.
Blocks within the 'If {image}' will only execute when met with {image}.", + "maze_hints_title_6": "Repeat block(3)", + "maze_hints_content_6": "How does 'Until met with all ~' block work?", + "maze_hints_detail_6": "Repeat blocks within 'Until met with all ~' block until met with all {tile}.
Once met with all {tile} repeat will stop.", + "maze_hints_title_7": "Special Hint", + "maze_hints_content_7": "It's too difficult. Help!", + "maze_hints_detail_7": "Look at the path that I should travel. See the 4 small squares?
First create blocks that will take me around the square and repeat.", + "maze_hints_title_8": "Function", + "maze_hints_content_8": "What is 'Functions/ Call Functions'? How do I use them?", + "maze_hints_detail_8": "Put the most often used sets of blocks under 'Function'.
Once you create functions, use 'Call Function' to use it as often as needed.", + "ai_hints_title_1_1": "Goal of the game", + "ai_hints_content_1_1": "Avoid asteroids and help me get to Earth", + "ai_hints_detail_1_1": "Avoid asteroids and help me get to Earth", + "ai_hints_title_1_2": "Instructions", + "ai_hints_content_1_2": "How do I begin?", + "ai_hints_detail_1_2": "1. Drag out blocks from the block box and connect is with the 'when run' block
2. Once finished assembling blocks, click 'Run'
3. I'll move according to your block instructions.", + "ai_hints_title_1_3": "To move", + "ai_hints_content_1_3": "How do I move the entrybot?", + "ai_hints_detail_1_3": "I can move up, forward or below.
When creating instructions, make sure I avoid the asteroids.
If you send me out of the screen, I can be lost in space forever! So be careful.", + "ai_hints_title_2_1": "Goal of the game", + "ai_hints_content_2_1": "Use repeat blocks to avoid the asteroids.", + "ai_hints_detail_2_1": "Use repeat blocks to avoid the asteroids.", + "ai_hints_title_2_2": "Repeat block", + "ai_hints_content_2_2": "What is a repeat block?", + "ai_hints_detail_2_2": "Geez! It's a long way home so putting blocks together one by one is too tiresome. Let's try using the repeat block.
Once you group the blocks under the repeat block, you can shorten the length of the blocks!", + "ai_hints_content_3_1": "Help me avoid the asteroids using the 'if' block", + "ai_hints_title_3_2": "if block(1)", + "ai_hints_content_3_2": "How does 'if ~' block work? ", + "ai_hints_detail_3_2": "Using 'if~ in front/ else' block can help me check if there are asteroids in front of me and help me avoid them.
If there's an asteroid in front of me, then blocks under 'if' will execute or if there isn't an asteroid, the blocks under 'else' will execute.
Tell me which way to go depending on whether there's an asteroid to avoid or not.", + "ai_hints_content_4_1": "Learn to use the radar to avoid the asteroids.", + "ai_hints_detail_4_1": "Learn to use the radar to avoid the asteroids.", + "ai_hints_title_4_2": "radar(1)", + "ai_hints_content_4_2": "What is a radar and how can I use it?", + "ai_hints_detail_4_2": "Radar tells me how far an object exists from where I am located.
If there is an object in front of me, the front radar will show '1'.
Also, radar can become a powerful tool when used with 'if <true>/else' block.
For example, when the distance to an object in front of me shows value greater than 1, then I am able to move forward safely.
However, if not, then I can go above or under to avoid it.", + "ai_hints_title_4_3": "if block(2)", + "ai_hints_content_4_3": "How do I use 'if ' block?", + "ai_hints_detail_4_3": "if <true> block/ else' block executes blocks under 'if' when condition is met and executes blocks under 'else' when condition is not met.
Think about how you want to move at different situations and create a condition within <true> block.
Remember that when condition is met and blocks under 'if' are executed, then the blocks under 'else' will be ignored.", + "ai_hints_content_5_1": "Use the radar to help me avoid the asteroids.", + "ai_hints_detail_5_1": "Use the radar to help me avoid the asteroids.", + "ai_hints_title_5_2": "if block(3)", + "ai_hints_content_5_2": "How does nested if blocks work?", + "ai_hints_detail_5_2": "I can nest 'if ~/else' block within 'if ~/else' block. This will help me make smart decisions in various situations.
For example, I can act according to whether an asteroid is in my path or not, then when I'm met with and asteroid, I can decide whether to go under or above.", + "ai_hints_title_6_1": "Radar(2)", + "ai_hints_content_6_1": "How do I compare the values given by radar above and radar below?", + "ai_hints_detail_6_1": "([above]radar) block shows distance to an object above.
You can use this block to check which asteroid above or below exist further away.
When deciding which way to avoid the asteroid, it'll be a smarter move to go in the direction where the asteroid is further away.", + "ai_hints_content_7_1": "Use the item to avoid the asteroids.", + "ai_hints_detail_7_1": "Use the item to avoid the asteroids.", + "ai_hints_title_7_2": "Checking object name", + "ai_hints_content_7_2": "What can I do by checking the object name in front of me?", + "ai_hints_detail_7_2": "To gain a special item, you need to check where the item is located.
Use 'object [above] is [item]' block.
By using this block, you can figure out where the item is located and move towards it.", + "ai_hints_content_8_1": "Use the item to help me avoid the asteroids.", + "ai_hints_detail_8_1": "Use the item to help me avoid the asteroids.", + "ai_hints_title_8_2": "Item", + "ai_hints_content_8_2": "How do I gain special item and use it?", + "ai_hints_detail_8_2": "Even though you succeed in avoiding the asteroids, when the pathway is lined with asteroids, there is no way to avoid them. In this case, use the 'use item' block.
It will get rid of all blocks in front.
However, you can only use this block when you've gained the item by passing through the item.", + "ai_hints_content_9_1": "Use all your skills and knowledge to go as far as you can.", + "ai_hints_detail_9_1": "Use all your skills and knowledge to go as far as you can.", + "ai_hints_title_9_2": "and", + "ai_hints_content_9_2": "How do I use the 'and' block?", + "ai_hints_detail_9_2": "and' block can fit in many conditions. When all conditions in the 'and' block is met, then the blocks will be executed. If one of them is false, the whole 'and' statement will be false and the blocks will not be executed.", + "maze_text_goal_1": "Use move(); command to move me to the part box!", + "maze_text_goal_2": "Use jump(); command to avoid obstacles.", + "maze_text_goal_3": "Use left();right(); command to take me to my parts.", + "maze_text_goal_4": "Use various commands to take me to my parts.", + "maze_text_goal_5": "Move me so I can collect both of my part boxes.", + "maze_text_goal_6": "Move me so I can collect both of my part boxes.", + "maze_text_goal_7": "Use for command to take me to my friend!", + "maze_text_goal_8": "Use for command and avoid obstacles to take me to my friend!", + "maze_text_goal_9": "Use while command to take me to my friend.", + "maze_text_goal_10": "Use if and while commands to take me to all my friends.", + "maze_text_goal_11": "Use if and while commands to take me to all my friends.", + "maze_text_goal_12": "Use if and while commands to take me to all my friends.", + "maze_text_goal_13": "Call function to take me to my battery", + "maze_text_goal_14": "Call function to take me to my battery", + "maze_text_goal_15": "Insert commands within function. Then call the function to take me to my battery", + "maze_text_goal_16": "Insert commands under a function. Then call the function to move me to the battery!", + "maze_text_goal_17": "Insert commands under a function. Then call the function to move me to the battery!", + "maze_text_goal_18": "Insert commands under a function. Then call the function to move me to the battery!", + "maze_text_goal_19": "Insert commands under a function. Then call the function to move me to the battery!", + "maze_text_goal_20": "Call the function and mix it with other commands and take me to my battery.", + "above_radar": "above radar", + "bottom_radar": "bottom radar", + "front_radar": "front radar", + "above_object": "object above", + "front_object": "object in front", + "object_below": "object below", + "destination": "destination", + "asteroids": "asteroids", + "item": "item", + "wall": "wall", + "buy_now": "Buy now", + "goals": "Goal", + "instructions": "Instructions", + "object_info": "Object info", + "entry_basic_mission": "Entry basic mission", + "entry_application_mission": "Entry application mission", + "maze_move_forward": "move one forward", + "maze_when_run": "when Run", + "maze_turn_left": "turn left", + "maze_turn_right": "turn right", + "maze_repeat_times_1": "repeat", + "maze_repeat_times_2": "times", + "maze_repeat_until_1": "repeat until", + "maze_repeat_until_2": "", + "maze_call_function": "call function", + "maze_function": "function", + "maze_repeat_until_all_1": "repeat until all of", + "maze_repeat_until_all_2": "", + "command_guide": "Command guide", + "ai_success_msg_1": "Thanks to you I've safely arrived home!", + "ai_success_msg_2": "Phew! I was able to travel ", + "ai_success_msg_3": "distance enough to send a rescue signal to Earth! The rescue crew is on its way! Thank you!", + "ai_success_msg_4": "Great! You succeeded using ", + "ai_cause_msg_1": "Oh no. Tell me which way to go.", + "ai_cause_msg_2": "Yikes! That was close! Let's try again.", + "ai_cause_msg_3": "Yikes! I might get lost in space if I go off the path. Let's try again.", + "ai_cause_msg_4": "It's too complicated. Try this block to move.", + "ai_move_forward": "move forward", + "ai_move_above": "go above", + "ai_move_under": "go under", + "ai_repeat_until_dest": "repeat until destination", + "ai_if_front_1": "if", + "ai_if_front_2": "in front", + "ai_else": "else", + "ai_if_1": "if", + "ai_if_2": "", + "ai_use_item": "use item", + "ai_radar": "radar", + "ai_above": "above", + "ai_front": "front", + "ai_under": "under", + "ai_object_is_1": "is", + "ai_object_is_2": "object", + "challengeMission": "back", + "withTeacher": "Advisory teachers", + "host": "Host", + "support": "Support", + "subjectivity": "Subjectivity", + "learnMore": "Learn more ", + "ai_object_is_3": "?", + "stage_is_not_available": "The stage isn't available yet. Please enter the stages in the given order.", + "progress_not_saved": "Your progress will not be saved.", + "want_refresh": "Do you still want to refresh the page?", + "monthly_entry_grade": "Elementary 3rd - Middle school 3rd grade", + "monthly_entry_contents": "Learn to program with Monthly Entry. This monthly digest provides project tutorials, tips and tricks and fun comics. ", + "monthly_entry_etc1": "*The Monthly Entry project templates are provided in the main page's recommended course", + "monthly_entry_etc2": "* Monthly Entry is published during school semesters only", + "group_make_lecture_1": "내가 만든 강의가 없습니다.", + "group_make_lecture_2": "'학습하기>오픈 강의> 강의'에서", + "group_make_lecture_3": "우리반 학습내용에 추가하고 싶은 강의를 만들어 주세요.", + "group_make_lecture_4": "강의 만들기", + "group_add_lecture_1": "관심 강의가 없습니다.", + "group_add_lecture_2": "'학습하기>오픈 강의> 강의'에서 우리반 학습내용에", + "group_add_lecture_3": "추가하고 싶은 강의를 관심강의로 등록해 주세요.", + "group_add_lecture_4": "강의 보기", + "group_make_course_1": "내가 만든 코스가 없습니다.", + "group_make_course_2": "'학습하기 > 오픈 강의 > 코스 만들기'에서", + "group_make_course_3": "우리반 학습내용에 추가하고 싶은 코스를 만들어 주세요.", + "group_make_course_4": "코스 만들기", + "group_add_course_1": "관심 코스가 없습니다.", + "group_add_course_2": "'학습하기 > 오픈 강의 > 코스'에서 우리반 학습내용에", + "group_add_course_3": "추가하고 싶은 코스를 관심코스로 등록해 주세요.", + "group_add_course_4": "코스 보기" +}; +Lang.Msgs = { + "auth_only": "Authenticated users only", + "runtime_error": "Runtime Error", + "to_be_continue": "Still not working", + "warn": "Warning", + "error_occured": "Oops, something went wrong. Why don't you try again? If you see this more than once, please let us know by Proposal board!", + "list_can_not_space": "List's name can't be space", + "sign_can_not_space": "Sign's name can't be space", + "variable_can_not_space": "Variable's name can't be space" +}; +Lang.Users = { + "auth_failed": "Authentication failed", + "birth_year": "Birth Year", + "birth_year_before_1990": "Before 1990s", + "edit_personal": "Edit Personal", + "email": "Email", + "email_desc": "Enter your Email address to receive newsletters", + "email_inuse": "E-mail address is already in-use", + "email_match": "Please enter a valid email", + "forgot_password": "Forgot your password?", + "job": "Job", + "language": "Language", + "name": "Full Name", + "name_desc": "Enter your name", + "name_not_empty": "You must enter your name", + "password": "Password", + "password_desc": "", + "password_invalid": "Invalid Password", + "password_long": "Password must be between 4-20 characters long", + "password_required": "Password can not be blank", + "project_list": "Project List", + "regist": "Signup Complete", + "rememberme": "Remember me", + "repeat_password": "Repeat Password", + "repeat_password_desc": "Repeat Password", + "repeat_password_not_match": "Passwords do not match", + "sex": "Sex", + "signup_required_for_save": "Signin required for saving a project.", + "username": "Username", + "username_desc": "Enter your unique name for signin", + "username_inuse": "Username already taken", + "username_long": "Username must be between 4-20 characters long", + "username_unknown": "Unknown user" +}; +Lang.Workspace = { + "new_project": "New Project", + "add_object": "Add objects", + "all": "All", + "animal": "Animal", + "arduino_entry": "Program for connect to Arduino", + "arduino_program": "Arduino program", + "arduino_sample": "Sample code for Arduino", + "arduino_driver": "Driver for arduino", + "cannot_add_object": "Cannot add objects while running a project.", + "cannot_add_picture": "Cannot add picture while running a project.", + "cannot_add_sound": "Cannot add sound while running a project.", + "cannot_edit_click_to_stop": "Can not modify a project.\nClick to stop", + "cannot_open_private_project": "Can not load private project. Move to home.", + "cannot_save_running_project": "Can not save while running a project.", + "character_gen": "Make an avarta", + "check_runtime_error": "Please check the block marked with red.", + "context_download": "Download to PC", + "context_duplicate": "Duplicate", + "context_remove": "Remove", + "context_rename": "Rename", + "coordinate": "Coord", + "create_function": "Create Function", + "direction": "Direction", + "drawing": "Paint", + "enter_list_name": "", + "enter_name": "Enter a new name", + "enter_new_message": "Enter new message name.", + "enter_variable_name": "Enter the new variable name (less than 10)", + "family": "Family", + "fantasy": "Fantasy/etc", + "file_new": "New Project", + "file_open": "Open project", + "file_upload": "Upload my project", + "file_upload_login_check_msg": "For the uploading your project you have to sign in", + "file_save": "Save", + "file_save_as": "Save as clone", + "file_save_download": "Download project", + "func": "function", + "function_create": "Add function", + "interface": "Interface", + "landscape": "Landscape", + "list": "List", + "list_add_calcel": "", + "list_add_calcel_msg": "", + "list_add_fail": "", + "list_add_fail_msg1": "", + "list_add_fail_msg2": "", + "list_add_ok": "", + "list_add_ok_msg": "", + "list_create": "Add list", + "list_dup": "", + "list_newname": "New name", + "list_remove": "Remove list", + "list_rename": "Rename list", + "list_rename_failed": "", + "list_rename_ok": "", + "list_too_long": "", + "message": "Signal", + "message_add_cancel": "Canceled", + "message_add_cancel_msg": "Add a message was canceled.", + "message_add_fail": "Failed", + "message_add_fail_msg": "Message name conflicted.", + "message_add_ok": "Message added", + "message_add_ok_msg": "was successfully added.", + "message_create": "Add Signal", + "message_dup": "Message name conflicted.", + "message_remove": "Remove a message", + "message_remove_canceled": "Remove a message was canceled", + "message_rename": "Rename a message", + "message_rename_failed": "Rename message failed", + "message_rename_ok": "Successfully rename message.", + "message_too_long": "Message name too long.", + "no_message_to_remove": "There is no message to remove.", + "no_use": "No use", + "no_variable_to_remove": "", + "no_variable_to_rename": "There is no varibale to remove", + "object_not_found": "No object is specified in the block.", + "object_not_found_for_paste": "붙여넣기 할 오브젝트가 없습니다.", + "people": "People", + "picture_add": "Add Shape", + "plant": "Plant", + "project": "Project", + "project_copied": "Copy", + "PROJECTDEFAULTNAME": ['Cool', 'Funny', 'Nice', 'Huge', 'Great', 'Handsome', 'Lucky'], + "remove_object": "Remove Object", + "remove_object_msg": "remove was successfully completed.", + "removed_msg": "was successfully removed", + "rotate_method": "Rotate", + "rotation": "Rotation", + "run": "Run", + "saved": "Saved", + "saved_msg": "was successfully saved.", + "save_failed": "Problem occurred while saving a project. Please try again.", + "select_library": "Select Library", + "select_sprite": "Please select at least one sprite to apply.", + "shape_remove_fail": "Remove a shape was failed.", + "shape_remove_fail_msg": "At least one or more shapes required.", + "shape_remove_ok": "Shape Removed", + "shape_remove_ok_msg": "was removed.", + "sound_add": "Add Sound", + "sound_remove_fail": "Remove a sound was failed.", + "sound_remove_ok": "Sound Removed", + "sound_remove_ok_msg": "was removed.", + "stop": "Stop", + "pause": "Pause", + "restart": "Restart", + "speed": "Speed", + "tab_attribute": "Attribute", + "tab_code": "Block", + "tab_picture": "Shape", + "tab_sound": "Sound", + "tab_text": "TextBox", + "textbox": "Textbox", + "textbox_edit": "Edit Textbox", + "textbox_input": "Please input text for apply.", + "things": "Things", + "upload": "Upload files", + "upload_addfile": "Add a file", + "variable": "Variable", + "variable_add_calcel": "Canceled", + "variable_add_calcel_msg": "Add a variable was canceled.", + "variable_add_fail": "Failed", + "variable_add_fail_msg1": "Variable name conflicted.", + "variable_add_fail_msg2": "Variable name is not proper.", + "variable_add_ok": "Variable added", + "variable_add_ok_msg": "was successfully added.", + "variable_create": "Add variable", + "variable_dup": "Variable name was already exists.", + "variable_newname": "New Name", + "variable_remove": "Remove variable", + "variable_remove_canceled": "Remove a variable was canceled", + "variable_rename": "Rename variable name", + "variable_rename_failed": "Failed", + "variable_rename_msg": "'Rename variable was successfully completed.'", + "variable_rename_ok": "Rename variabled was successfully completed.", + "variable_select": "Select a variable", + "variable_too_long": "Variable name too long.", + "vehicle": "Vehicles", + "add_object_alert_msg": "Add object firstly", + "add_object_alert": "Alert", + "create_variable_block": "Create variable", + "create_list_block": "Create list", + "Variable_Timer": "timer", + "Variable_placeholder_name": "variable name", + "Variable_use_all_objects": "Use for all objects", + "Variable_use_this_object": "Use for this object", + "Variable_used_at_all_objects": "variable used at all objects", + "Variable_create_cloud": "\n", + "Variable_used_at_special_object": "variable used at special object", + "draw_new": "Draw new", + "painter_file": "File ▼", + "painter_file_save": "Save", + "painter_file_saveas": "Save as a new picture", + "painter_edit": "Edit ▼", + "get_file": "get", + "copy_file": "copy", + "cut_picture": "cut", + "paste_picture": "paste", + "remove_all": "remove all", + "new_picture": "New Picture", + "picture_size": "size", + "picture_rotation": "rotation", + "thickness": "thickness", + "textStyle": "text", + "add_picture": "Add Shape", + "select_picture": "Select Library", + "select_sound": "Select sound", + "Size": "Size", + "show_variable": " show variable", + "default_value": "default value", + "slide": "slide", + "min_value": "min value", + "max_value": "max value", + "number_of_list": "number of list items", + "use_all_objects": "Use for all objects", + "list_name": "List name", + "list_used_specific_objects": "List used for specific object", + "List_used_all_objects": "List used for all objects", + "Scene_delete_error": "The scene is, there should be at least one.", + "Scene_add_error": "The scene is up to 10.", + "replica_of_object": "'s replicas", + "will_you_delete_scene": "Deleting scene can not be restored.\nAre you sure you want to delete scene?", + "duplicate_scene": "duplicate", + "block_explain": "Block description ", + "block_intro": "Clicking on the block comes the description of the block . ", + "blocks_reference": "Blocks Reference", + "hardware_guide": "Hardware Guide", + "show_list_workspace": "Show list", + "List_create_cloud": "Use for shared list
(Stored in Server)", + "confirm_quit": "You didn't saved your changes.", + "confirm_load_temporary": "You have unsaved project. Do you want to open it?", + "login_to_save": "Try to save after login.", + "cannot_save_in_edit_func": "Can not save while editing function.", + "new_object": "New Object", + "arduino_connect": "", + "arduino_connect_success": "", + "confirm_load_header": "Project Recovery", + "uploading_msg": "Uploading", + "upload_fail_msg": "Upload failed. Please try again.", + "file_converting_msg": "​File converting in process", + "file_converting_fail_msg": "​File conversion has failed", + "fail_contact_msg": "If the problem persists,
contact contact_entry@entrylabs.org", + "saving_msg": "Saving", + "saving_fail_msg": "Save failed. Please try again.", + "loading_msg": "Loading", + "loading_fail_msg": "Load failed. Please try again.", + "restore_project_msg": "Project is not saved properly. Would you like to restore this project?", + "quit_stop_msg": "Program cannot be closed during save.", + "ent_drag_and_drop": "Drag and drop the file to upload", + "not_supported_file_msg": "This file format is not supported", + "broken_file_msg": "File is corrupt or wrong file is loaded", + "check_audio_msg": "Only MP3 or WAV files are uploadable" +}; +Lang.code = "view code"; +Lang.EntryStatic = { + "lecture_is_open_true": "open", + "lecture_is_open_false": "closed", + "category_all": "All Categories", + "category_game": "Game", + "category_animation": "Animation", + "category_media_art": "Media Art", + "category_physical": "Physical", + "category_etc": "etc", + "lecture_required_time_1": "Less than 15 min.", + "lecture_required_time_2": "15 to 30 min.", + "lecture_required_time_3": "30 to 45 min.", + "lecture_required_time_4": "45 to 60 min", + "lecture_required_time_5": "over 1 hour", + "usage_event": "Event", + "usage_signal": "Sign", + "usage_scene": "Scene", + "usage_repeat": "Repeat", + "usage_condition_repeat": "Condition repeat", + "usage_condition": "Repeat", + "usage_clone": "Cloned Object", + "usage_rotation": "Rotation", + "usage_coordinate": "Coordination move", + "usage_arrow_move": "Arrow move", + "usage_shape": "Shape", + "usage_speak": "Speak", + "usage_picture_effect": "Effect", + "usage_textBox": "Textbox", + "usage_draw": "Draw", + "usage_sound": "Sound", + "usage_confirm": "Confirm", + "usage_comp_operation": "Compare operation", + "usage_logical_operation": "Logical operation", + "usage_math_operation": "Math operation", + "usage_random": "Random", + "usage_timer": "Timer", + "usage_variable": "variable", + "usage_list": "List", + "usage_ask_answer": "Ask and answer", + "usage_function": "Function", + "usage_arduino": "Arduino", + "concept_resource_analytics": "Procedual Thinking", + "concept_procedual": "Abstractive Thinking", + "concept_abstractive": "Korean", + "concept_individual": "English", + "concept_automation": "Automation", + "concept_simulation": "Simulation", + "concept_parallel": "Parallel", + "subject_korean": "Korean", + "subject_english": "English", + "subject_mathmatics": "Mathmatics", + "subject_social": "Social", + "subject_science": "Science", + "subject_music": "Music", + "subject_paint": "Paint", + "subject_athletic": "Athletics", + "subject_courtesy": "Courtesy", + "subject_progmatic": "Progmatic", + "lecture_grade_1": "1 th", + "lecture_grade_2": "2 th", + "lecture_grade_3": "3 th", + "lecture_grade_4": "4 th", + "lecture_grade_5": "5 th", + "lecture_grade_6": "6 th", + "lecture_grade_7": "7 th", + "lecture_grade_8": "8 th", + "lecture_grade_9": "9 th", + "lecture_grade_10": "Graduated", + "lecture_level_1": "Low", + "lecture_level_2": "Middle", + "lecture_level_3": "High", + "listEnable": "list", + "functionEnable": "function", + "messageEnable": "message", + "objectEditable": "object", + "pictureeditable": "shape", + "sceneEditable": "scene", + "soundeditable": "sound", + "variableEnable": "variable", + "e_1": "elementary school 1", + "e_2": "elementary school 2", + "e_3": "elementary school 3", + "e_4": "elementary school 4", + "e_5": "elementary school 5", + "e_6": "elementary school 6", + "m_1": "middle school 1", + "m_2": "middle school 2", + "m_3": "middle school 3", + "general": "general", + "curriculum_is_open_true": "open", + "curriculum_open_false": "closed", + "notice": "Notice", + "qna": "Q&A", + "tips": "Tips & Tricks", + "free": "Discussions", + "report": "Suggestions", + "art_category_all": "All projects", + "art_category_game": "Game", + "art_category_animation": "Animation", + "art_category_physical": "Physical", + "art_category_etc": "etc", + "art_category_media": "media art", + "art_sort_updated": "Most Recent", + "art_sort_visit": "Views", + "art_sort_likeCnt": "Likes", + "art_sort_comment": "Comments", + "art_period_all": "All", + "art_period_day": "Today", + "art_period_week": "Recent week", + "art_period_month": "Recent month", + "art_period_three_month": "Recent three month", + "level_high": "Row", + "level_mid": "Middle", + "level_row": "High", + "discuss_sort_created": "Most Recent", + "discuss_sort_visit": "Views", + "discuss_sort_likesLength": "Likes", + "discuss_sort_commentsLength": "Comments", + "discuss_period_all": "All", + "discuss_period_day": "Today", + "discuss_period_week": "Recent week", + "discuss_period_month": "Recent month", + "discuss_period_three_month": "Recent three month" +}; +Lang.Helper = { + "when_run_button_click": "When thew Start button is clicked, the connected block blow will run.", + "when_some_key_pressed": "When an assigned key is pressed, the connected blocks below will run.", + "mouse_clicked": "When mouse is clicked, the connected blocks below will run.", + "mouse_click_cancled": "When mouse is released, the connected blocks below will run.", + "when_object_click": "When a relevant object is clicked, the connected blocks below will run.", + "when_object_click_canceled": "When the object click is released, the connect blocks below will run.", + "when_message_cast": "When a relevant sign is received, the connected blocks below will run.", + "message_cast": "Sends signal selected from list.", + "message_cast_wait": "Send signal selected from list, and wait for the blocks the finish running.", + "when_scene_start": "When the scene starts, the connected blocks blow will run.", + "start_scene": "Starts selected scene.", + "start_neighbor_scene": "Starts the previous or following scene.", + "wait_second": "Runs the next block after waiting for the set a mount of time.", + "repeat_basic": "Repeats the blocks inside for set number of times.", + "repeat_inf": "Repeats thi blocks inside for an unlimited number of times.", + "repeat_while_true": "Repeats the blocks until the set condition is met.", + "stop_repeat": "Stops repeat of the closest wrapping block.", + "_if": "if condition is true, runs blocks inside.", + "if_else": "if condition is true, runs blocks in the 'if' portion. If not, runs the blocks inside 'else' portion.", + "restart_project": "Restart all objects", + "stop_object": "All objects : Stops all objects
This block : Stop all blocks in this object.
This object: Stops all blocks in this object. This Object's other blocs : Stops blocks not connected to this object's blocks.", + "wait_until_true": "Stops running and waits until the value of the condition is true.", + "when_clone_start": "When a new clone of the object is created, the connected blocks below will run.", + "create_clone": "Creates a clone of the object.", + "delete_clone": "Deletes the objects.", + "remove_all_clones": "Deletes all copies of the object.", + "move_direction": "Moves in the direction of the arrow by set value.", + "move_x": "Changes the x-position by the value regardless of the direction of the object.", + "move_y": "Changes the y-position by the value regardless of the direction of the object.", + "move_xy_time": "Changes the x- and y-position by the value regardless of the direction of the object.", + "locate_object_time": "Moves the object to the mouse pointer position or to the position of another object over the input amount of time. ", + "locate_x": "Moves the object to the input x-position value.", + "locate_y": "Moves the object to the input y-position value.", + "locate_xy": "Moves the object to the input x- and y-position values.", + "locate_xy_time": "Moves the object to the determined x- and y-position values over the input amount of time.", + "locate": "Moves the object to the position of the mouse pointer or to the position of another object.", + "rotate_absolute": "Sets the rotation of the object by the input number of degrees.", + "rotate_by_time": "Rotates the object by the input number of degrees over the input amount of time.", + "rotate_relative": "Rotates the object by the input number of degrees.", + "direction_absolute": "Sets the direction of the object by the input number of degrees.", + "direction_relative": "Changes the direction of the object by the input number of degrees.", + "move_to_angle": "Moves the object by the input value in the direction of the input number of degrees.", + "see_angle_object": "Makes the object face another object or the mouse pointer.", + "bounce_wall": "When object touches the edge of the screen, it bounces back.", + "show": "Makes the object show on the screen.", + "hide": "Hides the object from the screen.", + "dialog_time": "Runs the next block after the input content is spoken by the object for the input amount of time.", + "dialog": "Runs next block while the input contents is spoken by the object.", + "remove_dialog": "Deletes the dialog box created (using dialog block) by the object.", + "change_to_some_shape": "Changes the object into the selected shape.", + "change_to_next_shape": "Changes the object into the next shape.", + "set_effect_volume": "Applies the selected effect to the object by the input value.", + "set_effect_amount": "Applies the selected effect to the object by the input value.", + "set_effect": "Sets the selected effect to the object by the input value.", + "set_entity_effect": "Sets the selected effect to the object by the input value.", + "add_effect_amount": "Applies the selected effect to the object by the input value.", + "change_effect_amount": "Sets the selected effect to the object by the input value.", + "change_scale_percent": "Changes the size of the object by the input value.", + "set_scale_percent": "Sets the size of the object to the input value.", + "change_scale_size": "Changes the size of the object by the input value.", + "set_scale_size": "Sets the size of the object to the input value.", + "flip_x": "Flips the object vertically.", + "flip_y": "Flips the object horizontally.", + "change_object_index": "Bring to front : Bring object to front.
Bring one front : Bring object one layer front.
Send one back : Send object one layer back.
Send to back : Send object back.", + "set_object_order": "Shows the object in the set order.", + "brush_stamp": "Clones the object on stage like a stamp.", + "start_drawing": "Paints brush along the path of the object.", + "stop_drawing": "Stops object’s painting.", + "set_color": "Sets object’s color of the brush to the selected color.", + "set_random_color": "Sets object’s color of the brush to random.", + "change_thickness": "Changes object’s brush thickness to the input value.", + "set_thickness": "Sets object’s brush thickness to the input value.", + "change_opacity": "Changes object’s brush transparency to the input value.", + "change_brush_transparency": "Changes object’s brush transparency to the input value.", + "set_opacity": "Sets object’s brush transparency to the input value.", + "set_brush_tranparency": "Sets object’s brush transparency to the input value.", + "brush_erase_all": "Deletes object’s all brush paint and stamps.", + "sound_something_with_block": "Plays object’s select sound while next block runs.", + "sound_something_second_with_block": "Plays object’s select sound for input amount of time while next block runs.", + "sound_something_wait_with_block": "Plays object’s select sound then runs next blocks once sound has finished playing.", + "sound_something_second_wait_with_block": "Plays object’s select sound for input amount of time then runs next blocks.", + "sound_volume_change": "Changes the volume of all sounds played in the project by the input percentage.", + "sound_volume_set": "Sets the volume of all sounds played in the project to the input percentage.", + "sound_silent_all": "Stops all sounds currently playing.", + "is_clicked": "Checks whether mouse is clicked.", + "is_press_some_key": "Checks whether an assigned key is pressed.", + "reach_something": "Checks whether the object reaches the selected point.", + "is_included_in_list": "Checks whether select list contains the input value.", + "boolean_basic_operator": "=: Checks whether the value on the left is greater than the value on the right.
> : Checks whether the value on the left is greater than the value on the right.
< : Checks whether the value on the left is less than the value on the right.
≥ : Checks whether the value on the left is the same as or greater than the value on the right.
≤ : Checks whether the value on the left is the same as or less than the value on the right.", + "function_create": "Define a function by placing frequently used sets of blocks under this block. Place [name] next to [Define function] to give function a name. Pass on number of text values by placing [numeric/text value] block. Pass on boolean value of true or false by placing the [boolean value] block.", + "function_field_label": "Place next to [Define function] to give function a name.", + "function_field_string": "Pass on numeric/text value by placing this block next to [Define function] block. Grab/copy the [numeric/text value] block in the [Define function] block and use its value in function.", + "function_field_boolean": "Use this block to pass on boolean value of true or false. Grab/copy the [boolean value] block in the [Define function] block and use its value in function.", + "function_general": "This is current function block or function blocks created so far.", + "boolean_and": "Checks whether both conditions are true.", + "boolean_or": "Checks whether at least one of the two conditions is true.", + "boolean_not": "Changes the input condition to its opposite.", + "calc_basic": "+ : Adds two numbers.
- : Subtracts two numbers.
X : Multiplies two numbers.
/ : Divides two numbers.", + "calc_rand": "Selects a random value between the two input numbers.", + "get_x_coordinate": "Reports the x-position value of the object.", + "get_y_coordinate": "Reports the y-position value of the object.", + "coordinate_mouse": "Reports either the x- or y-position value of the mouse.", + "coordinate_object": "Reports the x/y-position of the object and various information (direction, shape name, etc.).", + "quotient_and_mod": "quotient: The answer after you divide the first number by the second number.
remainder: The amount left over after division.", + "get_rotation_direction": "Reports the object’s value of direction and value of movement.", + "calc_share": "Reports the quotient occurring from first number divided by the second number. ", + "calc_mod": "Reports the remainder occurring from the first number divided by the second number.", + "calc_operation": "Reports calculated values of a variety of equations relating to input numbers.", + "get_date": "Reports values regarding the current year, month, day, and time.", + "distance_something": "Reports the distance between the object and the selected object.", + "get_sound_duration": "Reports the time length of the selected sound.", + "get_project_timer_value": "Reports how many seconds have passed since the project started.", + "choose_project_timer_action": "Start: Start timer.
Stop: Stop timer.
Reset: Reset timer to 0. (When this block is in workspace, the program will show timer window when run.) ", + "reset_project_timer": "Resets the timer to 0.", + "set_visible_project_timer": "Shows or hides the timer.", + "ask_and_wait": "The object asks the inputted text, and then receives an answer as a response.", + "get_canvas_input_value": "Reports the contents inputted taken place after the object asked.", + "set_visible_answer": "Hide or show ‘response window’.", + "combine_something": "Combines two input texts.", + "get_variable": "Reports the value of the select variable.", + "change_variable": "Adds the input value to the selected variable.", + "set_variable": "Sets the value of the selected variable to the input value.", + "robotis_carCont_sensor_value": "왼쪽 접속 센서 : 접촉(1), 비접촉(0) 값 입니다.
오른쪽 접촉 센서 : 접촉(1), 비접촉(0) 값 입니다.
선택 버튼 상태 : 접촉(1), 비접촉(0) 값 입니다.
최종 소리 감지 횟수 : 마지막 실시간 소리 감지 횟수 값 입니다.
실시간 소리 감지 횟수 : 약 1초 안에 다음 소리가 감지되면 1씩 증가합니다.
왼쪽 적외선 센서 : 물체와 가까울 수록 큰 값 입니다.
오른쪽 적외선 센서 : 물체와 가까울 수록 큰 값 값 입니다.
왼쪽 적외선 센서 캘리브레이션 값 : 적외선 센서의 캘리브레이션 값 입니다.
오른쪽 적외선 센서 캘리브레이션 값 : 적외선 센서의 캘리브레이션 값 입니다.
(*캘리브레이션 값 - 적외선센서 조정 값)", + "robotis_carCont_cm_led": "4개의 LED 중 1번 또는 4번 LED 를 켜거나 끕니다.
LED 2번과 3번은 동작 지원하지 않습니다.", + "robotis_carCont_cm_sound_detected_clear": "최종 소리 감지횟 수를 0 으로 초기화 합니다.", + "robotis_carCont_aux_motor_speed": "감속모터 속도를 0 ~ 1023 의 값(으)로 정합니다.", + "robotis_carCont_cm_calibration": "적외선센서 조정 값(http://support.robotis.com/ko/: 자동차로봇> 2. B. 적외선 값 조정)을 직접 정합니다.", + "robotis_openCM70_sensor_value": "최종 소리 감지 횟수 : 마지막 실시간 소리 감지 횟수 값 입니다.
실시간 소리 감지 횟수 : 약 1초 안에 다음 소리가 감지되면 1씩 증가합니다.
사용자 버튼 상태 : 접촉(1), 비접촉(0) 값 입니다.최종 소리 감지 횟수 : 마지막 실시간 소리 감지 횟수 값 입니다.
실시간 소리 감지 횟수 : 약 1초 안에 다음 소리가 감지되면 1씩 증가합니다.
사용자 버튼 상태 : 접촉(1), 비접촉(0) 값 입니다.", + "robotis_openCM70_aux_sensor_value": "서보모터 위치 : 0 ~ 1023, 중간 위치의 값은 512 입니다.
적외선센서 : 물체와 가까울 수록 큰 값 입니다.
접촉센서 : 접촉(1), 비접촉(0) 값 입니다.
조도센서(CDS) : 0 ~ 1023, 밝을 수록 큰 값 입니다.
온습도센서(습도) : 0 ~ 100, 습할 수록 큰 값 입니다.
온습도센서(온도) : -20 ~ 100, 온도가 높을 수록 큰 값 입니다.
온도센서 : -20 ~ 100, 온도가 높을 수록 큰 값 입니다.
초음파센서 : -
자석센서 : 접촉(1), 비접촉(0) 값 입니다.
동작감지센서 : 동작 감지(1), 동작 미감지(0) 값 입니다.
컬러센서 : 알수없음(0), 흰색(1), 검은색(2), 빨간색(3), 녹색(4), 파란색(5), 노란색(6) 값 입니다.
사용자 장치 : 사용자 센서 제작에 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "robotis_openCM70_cm_buzzer_index": "음계를 0.1 ~ 5 초 동안 연주 합니다.", + "robotis_openCM70_cm_buzzer_melody": "멜로디를 연주 합니다.
멜로디를 연속으로 재생하는 경우, 다음 소리가 재생되지 않으면 '흐름 > X 초 기다리기' 블록을 사용하여 기다린 후 실행합니다.", + "robotis_openCM70_cm_sound_detected_clear": "최종 소리 감지횟 수를 0 으로 초기화 합니다.", + "robotis_openCM70_cm_led": "제어기의 빨간색, 녹색, 파란색 LED 를 켜거나 끕니다.", + "robotis_openCM70_cm_motion": "제어기에 다운로드 되어있는 모션을 실행합니다.", + "robotis_openCM70_aux_motor_speed": "감속모터 속도를 0 ~ 1023 의 값(으)로 정합니다.", + "robotis_openCM70_aux_servo_mode": "서보모터를 회전모드 또는 관절모드로 정합니다.
한번 설정된 모드는 계속 적용됩니다.
회전모드는 서보모터 속도를 지정하여 서보모터를 회전 시킵니다.
관절모드는 지정한 서보모터 속도로 서보모터 위치를 이동 시킵니다.", + "robotis_openCM70_aux_servo_speed": "서보모터 속도를 0 ~ 1023 의 값(으)로 정합니다.", + "robotis_openCM70_aux_servo_position": "서보모터 위치를 0 ~ 1023 의 값(으)로 정합니다.
서보모터 속도와 같이 사용해야 합니다.", + "robotis_openCM70_aux_led_module": "LED 모듈의 LED 를 켜거나 끕니다.", + "robotis_openCM70_aux_custom": "사용자 센서 제작에 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "robotis_openCM70_cm_custom_value": "컨트롤 테이블 주소를 직접 입력하여 값을 확인 합니다.
컨트롤 테이블 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "robotis_openCM70_cm_custom": "컨트롤 테이블 주소를 직접 입력하여 값을 정합니다.
컨트롤 테이블 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "show_variable": "Shows the value of the selected variable on the stage.", + "hide_variable": "Hides the value of the selected variable from the stage.", + "value_of_index_from_list": "Reports the item at the location of the input value on the selected list.", + "add_value_to_list": "Adds the input item to the end location of the selected list.", + "remove_value_from_list": "Deletes the item at the location of the input value from the selected list.", + "insert_value_to_list": "Inserts the input item at the location of the input value in the selected list. ", + "change_value_list_index": "Replaces the item at the location of the input value to the input text", + "length_of_list": "Reports the number of items contained in the selected list.", + "show_list": "Shows the selected list on the stage.", + "hide_list": "Hides the selected list from the stage.", + "text": "Reports the text in the text box. ", + "text_write": "Changes the content of the text box to the input text.", + "text_append": "Adds the input text behind the text box.", + "text_prepend": "Adds the input text in front of the text box.", + "text_flush": "Deletes all saved text in the text box.", + "erase_all_effects": "Delete all effects about this object.", + "char_at": "Reports the letter of the input text.", + "length_of_string": "Reports the length of input text include spacing", + "substring": "Reports the text extracted from the input text between two specified indices", + "replace_string": "Reports the text that replaced all the input text with another input text", + "index_of_string": "Reports the index of first input text in second input text", + "change_string_case": "Reports the text that converted to uppercase or lowercase", + "direction_relative_duration": "Rotates the direction of this object by the input number of degrees over the input amount of time.", + "get_sound_volume": "Reports the sound volume.", + "sound_from_to": "", + "sound_from_to_and_wait": "", + "Block_info": "Block Info ", + "Block_click_msg": "Clicking on the block comes the description of the block . " +}; +Lang.Category = { + "entrybot_friends": "Entrybot friends", + "people": "People", + "animal": "Animal", + "animal_flying": "Flying", + "animal_land": "Land", + "animal_water": "Water", + "animal_others": "Others", + "plant": "Plant", + "plant_flower": "Flowers", + "plant_grass": "Grass", + "plant_tree": "Tree", + "plant_others": "Others", + "vehicles": "Vehicles", + "vehicles_flying": "Flying", + "vehicles_land": "Land", + "vehicles_water": "Water", + "vehicles_others": "Others", + "architect": "Building", + "architect_building": "Structure", + "architect_monument": "Monument", + "architect_others": "Others", + "food": "Food", + "food_vegetables": "Fruits/Vegetables", + "food_meat": "Meat", + "food_drink": "Drink", + "food_others": "Others", + "environment": "Environment", + "environment_nature": "Nature", + "environment_space": "Space", + "environment_others": "Others", + "stuff": "Things", + "stuff_living": "Living", + "stuff_hobby": "Hobby", + "stuff_others": "Others", + "fantasy": "Fantasy", + "interface": "Interface", + "background": "Background", + "background_outdoor": "Outdoor", + "background_indoor": "Indoor", + "background_nature": "Nature", + "background_others": "Others" +}; +Lang.Device = { + "arduino": "arduino", + "hamster": "hamster", + "albert": "albert", + "robotis_carCont": "", + "robotis_openCM70": "", + "sensorBoard": "Entry Sensor Board", + "CODEino": "CODEino", + "bitbrick": "bitbrick", + "bitBlock": "bitBlock", + "xbot_epor_edge": "XBOT", + "dplay": "DPLAY", + "nemoino": "NEMOino" +}; +Lang.General = { + "turn_on": "turn on", + "turn_off": "turn off", + "left": "left", + "right": "right", + "both": "both", + "red": "red", + "yellow": "yellow", + "green": "green", + "skyblue": "sykblue", + "blue": "blue", + "purple": "purple", + "white": "white", + "note_c": "C", + "note_d": "D", + "note_e": "E", + "note_f": "F", + "note_g": "G", + "note_a": "A", + "note_b": "B" +}; +Lang.Fonts = { + "batang": "KoPub Batang", + "myeongjo": "Nanum Myeongjo", + "gothic": "Nanum Gothic", + "pen_script": "Nanum Pen Script", + "jeju_hallasan": "Jeju Hallasan", + "gothic_coding": "Nanum Gothic Coding" +}; +Lang.Hw = { + "note": "note", + "leftWheel": "left wheel", + "rightWheel": "right wheel", + "leftEye": "left eye", + "rightEye": "right eye", + "led": "LED", + "body": "body", + "front": " front", + "port_en": "port", + "port_ko": "", + "sensor": "sensor", + "light": "light", + "temp": "temp", + "switch_": "sw_", + "right_ko": "", + "right_en": "R", + "left_ko": "", + "left_en": "L", + "up_ko": "", + "up_en": "U", + "down_ko": "", + "down_en": "D", + "output": "output", + "left": "left", + "right": "right", + "sub": "servo", + "motor": "motor", + "": "", + "buzzer": "buzzer" +}; +Lang.template = { + "albert_hand_found": "hand found?", + "albert_value": "%1", + "albert_move_forward_for_secs": "move forward for %1 secs %2", + "albert_move_backward_for_secs": "move backward for %1 secs %2", + "albert_turn_for_secs": "turn %1 for %2 secs %3", + "albert_change_both_wheels_by": "change wheels by left: %1 right: %2 %3", + "albert_set_both_wheels_to": "set wheels to left: %1 right: %2 %3", + "albert_change_wheel_by": "change %1 wheel by %2 %3", + "albert_set_wheel_to": "set %1 wheel to %2 %3", + "albert_stop": "stop %1", + "albert_set_pad_size_to": "set pad size to width: %1 height: %2 %3", + "albert_set_eye_to": "set %1 eye to %2 %3", + "albert_clear_eye": "clear %1 eye %2", + "albert_body_led": "%1 body led %2", + "albert_front_led": "%1 front led %2", + "albert_beep": "beep %1", + "albert_change_buzzer_by": "change buzzer by %1 ) %2", + "albert_set_buzzer_to": "set buzzer to %1 ) %2", + "albert_clear_buzzer": "clear buzzer %1", + "albert_play_note_for": "play note %1 ', %2 for %3 beats %4", + "albert_rest_for": "rest for %1 beats %2", + "albert_change_tempo_by": "change tempo by %1 ) %2", + "albert_set_tempo_to": "set tempo to %1 bpm %2", + "albert_move_forward": "move forward %1", + "albert_move_backward": "move backward %1", + "albert_turn_around": "turn %1 %2", + "albert_set_led_to": "set %1 %2 %3", + "albert_clear_led": "clear %1 %2", + "albert_change_wheels_by": "%1 %2 %3", + "albert_set_wheels_to": "%1 %2 %3", + "arduino_text": "%1", + "arduino_send": "Send signal %1", + "arduino_get_number": "number result of signal %1", + "arduino_get_string": "string result of signal %1", + "arduino_get_sensor_number": "%1 ", + "arduino_get_port_number": "%1 ", + "arduino_get_pwm_port_number": "%1 ", + "arduino_get_number_sensor_value": "Analog %1 Sensor value ", + "arduino_get_digital_value": "Digital %1 Sensor value ", + "arduino_toggle_led": "Digital %1 Pin %2 %3", + "arduino_toggle_pwm": "Digital %1 Pin %2 %3", + "arduino_convert_scale": "Map Value %1 %2 ~ %3 to %4 ~ %5 ", + "sensorBoard_get_named_sensor_value": "%1 센서값", + "sensorBoard_is_button_pressed": "%1 버튼을 눌렀는가?", + "sensorBoard_led": "%1 LED %2 %3", + "arduino_download_connector": "%1", + "arduino_download_source": "%1", + "arduino_connected": "%1", + "arduino_reconnect": "%1", + "CODEino_get_sensor_number": "%1 ", + "CODEino_get_named_sensor_value": " %1 Sensor value ", + "CODEino_get_sound_status": "Sound is %1 ", + "CODEino_get_light_status": "Light is %1 ", + "CODEino_is_button_pressed": " Operation %1 ", + "CODEino_get_accelerometer_direction": " 3-AXIS Accelerometer %1 ", + "CODEino_get_accelerometer_value": " 3-AXIS Accelerometer %1 -axis value ", + "bitbrick_sensor_value": "%1 값", + "bitbrick_is_touch_pressed": "touch %1 이(가) 눌렸는가?", + "bitbrick_turn_off_color_led": "컬러 LED 끄기 %1", + "bitbrick_turn_on_color_led_by_rgb": "컬러 LED 켜기 R %1 G %2 B %3 %4", + "bitbrick_turn_on_color_led_by_picker": "컬러 LED 색 %1 로 정하기 %2", + "bitbrick_turn_on_color_led_by_value": "컬러 LED 켜기 색 %1 로 정하기 %2", + "bitbrick_buzzer": "버저음 %1 내기 %2", + "bitbrick_turn_off_all_motors": "모든 모터 끄기 %1", + "bitbrick_dc_speed": "DC 모터 %1 속도 %2 %3", + "bitbrick_dc_direction_speed": "DC 모터 %1 %2 방향 속력 %3 %4", + "bitbrick_servomotor_angle": "서보 모터 %1 각도 %2 %3", + "bitbrick_convert_scale": "변환 %1 값 %2 ~ %3 에서 %4 ~ %5", + "start_drawing": "Start drawing %1", + "stop_drawing": "Stop drawing %1", + "set_color": "Set brush color to %1 %2", + "set_random_color": "Set brush color to random %1", + "change_thickness": "Change thickness by %1 %2", + "set_thickness": "Set thickness to %1 %2", + "change_opacity": "Change opacity by %1 % %2", + "set_opacity": "Set opacity to %1 % %2", + "brush_erase_all": "Erase all brush %1", + "brush_stamp": "Stamp %1", + "change_brush_transparency": "Change transparency by %1 % %2", + "set_brush_tranparency": "Set transparency to %1 % %2", + "number": "%1", + "angle": "%1", + "get_x_coordinate": "%1", + "get_y_coordinate": "%1", + "get_angle": "%1", + "get_rotation_direction": "%1 ", + "distance_something": "%1 %2 %3", + "coordinate_mouse": "%1 %2 %3", + "coordinate_object": "%1 %2 %3 %4", + "calc_basic": "%1 %2 %3", + "calc_plus": "%1 %2 %3", + "calc_minus": "%1 %2 %3", + "calc_times": "%1 %2 %3", + "calc_divide": "%1 %2 %3", + "calc_mod": "%1 %2 %3", + "calc_share": "%1 %2 %3", + "calc_operation": "%1 %2 %3 %4", + "calc_rand": "%1 %2 %3 %4 %5", + "get_date": "%1 %2 %3", + "get_sound_duration": "%1 %2 %3", + "reset_project_timer": "%1", + "set_visible_project_timer": "%1 %2 %3 %4", + "timer_variable": "%1 %2", + "get_project_timer_value": "%1 %2", + "char_at": "%1 %2 %3 %4 %5", + "length_of_string": "%1 %2 %3", + "substring": "%1 %2 %3 %4 %5 %6 %7", + "replace_string": "%1 %2 %3 %4 %5 %6 %7", + "change_string_case": "%1 %2 %3 %4 %5", + "index_of_string": "%1 %2 %3 %4 %5", + "combine_something": "%1 %2 %3 %4 %5", + "get_sound_volume": "%1 %2", + "quotient_and_mod": " %1 %6 %3 %2 %5 %4", + "choose_project_timer_action": "%1 %2 %3 %4", + "wait_second": "Wait %1 seconds %2", + "repeat_basic": "Repeat %1 times %2", + "repeat_inf": "Repeat infinitely %1", + "stop_repeat": "Stop repeat %1", + "wait_until_true": "Wait until %1 %2", + "_if": "If %1 then %2", + "if_else": "If %1 then %2 %3 else", + "create_clone": "Create %1 's clone %2", + "delete_clone": "Remove this clone %1", + "when_clone_start": "%1 When clone is created", + "stop_run": "Exit program %1", + "repeat_while_true": "Repeat %2 %1 %3", + "stop_object": "Stop %1 %2", + "restart_project": "Restart Project %1", + "remove_all_clones": "Remove all clone %1", + "functionAddButton": "%1", + "function_field_label": "%1%2", + "function_field_string": "%1%2", + "function_field_boolean": "%1%2", + "function_param_string": "문자/숫자값", + "function_param_boolean": "판단값", + "function_create": "함수 정의하기 %1 %2", + "function_general": "name %1", + "hamster_hand_found": "hand found?", + "hamster_value": "%1", + "hamster_move_forward_once": "move forward once on board %1", + "hamster_turn_once": "turn %1 once on board %2", + "hamster_move_forward_for_secs": "move forward for %1 secs %2", + "hamster_move_backward_for_secs": "move backward %1 secs %2", + "hamster_turn_for_secs": "turn %1 for %2 secs %3", + "hamster_change_both_wheels_by": "change wheel by left: %1 right: %2 %3", + "hamster_set_both_wheels_to": "set wheel to left: %1 right: %2 %3", + "hamster_change_wheel_by": "change %1 wheel by %2 %3", + "hamster_set_wheel_to": "set %1 wheel to %2 %3", + "hamster_follow_line_using": "follow %1 line using %2 floor sensor %3", + "hamster_follow_line_until": "follow %1 line until %2 intersection %3", + "hamster_set_following_speed_to": "set following speed to %1 %2", + "hamster_stop": "stop %1", + "hamster_set_led_to": "set %1 led to %2 %3", + "hamster_clear_led": "clear %1 led %2", + "hamster_beep": "beep %1", + "hamster_change_buzzer_by": "change buzzer by %1 %2", + "hamster_set_buzzer_to": "set buzzer to %1 %2", + "hamster_clear_buzzer": "clear buzzer %1", + "hamster_play_note_for": "play note %1 %2 for %3 beats %4", + "hamster_rest_for": "rest for %1 beats %2", + "hamster_change_tempo_by": "change tempo by %1 %2", + "hamster_set_tempo_to": "set tempo to %1 bpm %2", + "hamster_set_port_to": "set port %1 to %2 %3", + "hamster_change_output_by": "change output %1 by %2 %3", + "hamster_set_output_to": "set output %1 to %2 %3", + "is_clicked": "%1", + "is_press_some_key": "%1 %2", + "reach_something": "%1 %2 %3", + "boolean_comparison": "%1 %2 %3", + "boolean_equal": "%1 %2 %3", + "boolean_bigger": "%1 %2 %3", + "boolean_smaller": "%1 %2 %3", + "boolean_and_or": "%1 %2 %3", + "boolean_and": "%1 %2 %3", + "boolean_or": "%1 %2 %3", + "boolean_not": "%1 %2 %3", + "true_or_false": "%1", + "True": "%1 ", + "False": "%1 ", + "boolean_basic_operator": "%1 %2 %3", + "show": "show %1", + "hide": "hide %1", + "dialog_time": "Say %1 for %2 secs %3 %4", + "dialog": "Say %1 %2 %3", + "remove_dialog": "Remove speech %1", + "change_to_nth_shape": "Change shape to %1 %2", + "change_to_next_shape": "Change to %1 shape %2", + "set_effect_volume": "Change %1 effect by %2 %3", + "set_effect": "Set %1 effect to %2 %3", + "erase_all_effects": "Erase all effects %1", + "change_scale_percent": "Change scale by %1 %2", + "set_scale_percent": "Set scale to %1 %2", + "change_scale_size": "Change scale by %1 %2", + "set_scale_size": "Set scale to %1 %2", + "flip_y": "Flip horizontally %1", + "flip_x": "Flip vertically %1", + "set_object_order": "go to %1 th layer %2", + "get_pictures": "%1 ", + "change_to_some_shape": "Change shape to %1 %2", + "add_effect_amount": "Change %1 effect by %2 %3", + "change_effect_amount": "Set %1 effect to %2 %3", + "set_effect_amount": "Change %1 effect by %2 %3", + "set_entity_effect": "Set %1 effect to %2 %3", + "change_object_index": "bring to %1 %2", + "move_direction": "Move %1 forward %2", + "move_x": "Change X by %1 %2", + "move_y": "Change Y by %1 %2", + "locate_xy_time": "Moving while %1 seconds to x: %2 y: %3 %4", + "rotate_by_angle": "Rotate by %1 degree %2", + "rotate_by_angle_dropdown": "Rotate by %1 degree %2", + "see_angle": "Set direction to %1 %2", + "see_direction": "Rotate to the %1 %2", + "locate_xy": "Move to the X: %1 Y: %2 %3", + "locate_x": "Move to the X: %1 %2", + "locate_y": "Move to the Y: %1 %2", + "locate": "Move to %1 %2", + "move_xy_time": "For %1 secs move to X: %2 Y: %3 %4", + "rotate_by_angle_time": "Rotate while %1 seconds by %2 degree %3", + "bounce_wall": "if on edge, bounce %1", + "flip_arrow_horizontal": "Flip horizontally by arrow direction %1", + "flip_arrow_vertical": "Flip vertically by arrow direction %1", + "see_angle_object": "Turn towards %1 %2", + "see_angle_direction": "See angle to %1 degree %2", + "rotate_direction": "Change direction by %1 %2", + "locate_object_time": "factorial value %1 seconds to the %2 %3", + "rotate_absolute": "Set rotation to %1 %2", + "rotate_relative": "Rotate %1 %2", + "direction_absolute": "Set direction to %1 %2", + "direction_relative": "Change direction by %1 %2", + "move_to_angle": "Rotate %1 and move %2 %3", + "rotate_by_time": "For %1 secs rotate %2 %3", + "direction_relative_duration": "For %1 secs set direction to %2 %3", + "neobot_sensor_value": "%1 값", + "neobot_turn_left": "왼쪽모터를 %1 %2 회전 %3", + "neobot_stop_left": "왼쪽모터 정지 %1", + "neobot_turn_right": "오른쪽모터를 %1 %2 회전 %3", + "neobot_stop_right": "오른쪽모터 정지 %1", + "neobot_run_motor": "%1 모터를 %2 초간 %3 %4 %5", + "neobot_servo_1": "SERVO1에 연결된 서보모터를 %1 속도로 %2 로 이동 %3", + "neobot_servo_2": "SERVO2에 연결된 서보모터를 %1 속도로 %2 로 이동 %3", + "neobot_play_note_for": "멜로디 %1 을(를) %2 옥타브로 %3 길이만큼 소리내기 %4", + "neobot_set_sensor_value": "%1 번 포트의 값을 %2 %3", + "robotis_openCM70_cm_custom_value": "직접입력 주소 ( %1 ) %2 값", + "robotis_openCM70_sensor_value": "제어기 %1 값", + "robotis_openCM70_aux_sensor_value": "%1 %2 값", + "robotis_openCM70_cm_buzzer_index": "제어기 음계값 %1 for %2 secs 연주 %3", + "robotis_openCM70_cm_buzzer_melody": "제어기 멜로디 %1 번 연주 %2", + "robotis_openCM70_cm_sound_detected_clear": "최종소리감지횟수 초기화 %1", + "robotis_openCM70_cm_led": "제어기 %1 LED %2 %3", + "robotis_openCM70_cm_motion": "모션 %1 번 실행 %2", + "robotis_openCM70_aux_motor_speed": "%1 감속모터 속도를 %2 , 출력값을 %3 (으)로 정하기 %4", + "robotis_openCM70_aux_servo_mode": "%1 서보모터 모드를 %2 (으)로 정하기 %3", + "robotis_openCM70_aux_servo_speed": "%1 서보모터 속도를 %2 , 출력값을 %3 (으)로 정하기 %4", + "robotis_openCM70_aux_servo_position": "%1 서보모터 위치를 %2 (으)로 정하기 %3", + "robotis_openCM70_aux_led_module": "%1 LED 모듈을 %2 (으)로 정하기 %3", + "robotis_openCM70_aux_custom": "%1 사용자 장치를 %2 (으)로 정하기 %3", + "robotis_openCM70_cm_custom": "직접입력 주소 ( %1 ) (을)를 %2 (으)로 정하기 %3", + "robotis_carCont_sensor_value": "%1 값", + "robotis_carCont_cm_led": "4번 LED %1 , 1번 LED %2 %3", + "robotis_carCont_cm_sound_detected_clear": "최종소리감지횟수 초기화 %1", + "robotis_carCont_aux_motor_speed": "%1 감속모터 속도를 %2 , 출력값을 %3 (으)로 정하기 %4", + "robotis_carCont_cm_calibration": "%1 적외선 센서 캘리브레이션 값을 %2 (으)로 정하기 %3", + "when_scene_start": "%1 When scene started", + "start_scene": "Start %1 scene %2", + "start_neighbor_scene": "Start %1 scene %2", + "sound_something": "Play %1 Sound %2", + "sound_something_second": "Play %1 sound for %2 secs %3", + "sound_something_wait": "Play %1 Sound and wait %2", + "sound_something_second_wait": "Play %1 Sound for %2 secs and wait %3", + "sound_volume_change": "Change volume by %1 % %2", + "sound_volume_set": "Set volume to %1 % %2", + "sound_silent_all": "Stop all sounds %1", + "get_sounds": "%1 ", + "sound_something_with_block": "Play %1 Sound %2", + "sound_something_second_with_block": "Play %1 sound for %2 secs %3", + "sound_something_wait_with_block": "Play %1 Sound and wait %2", + "sound_something_second_wait_with_block": "Play %1 Sound for %2 secs and wait %3", + "sound_from_to": "Play %1 sound from %2 to %3 secs %4", + "sound_from_to_and_wait": "Play %1 sound from %2 to %3 secs and wait %4", + "when_run_button_click": "%1 When run", + "press_some_key": "%1 When key %2 pressed %3", + "when_some_key_pressed": "%1 When key %2 pressed", + "mouse_clicked": "%1 When mouse clicked", + "mouse_click_cancled": "%1 When mouse click released", + "when_object_click": "%1 When object clicked", + "when_object_click_canceled": "%1 When object click released", + "when_some_key_click": "%1 When press some key", + "when_message_cast": "%1 When %2 message received", + "message_cast": "Send %1 message %2", + "message_cast_wait": "Send %1 message and wait %2", + "text": "%1", + "text_write": "Writing that %1", + "text_append": "After writing that %1", + "text_prepend": "Add %1 in front of that", + "text_flush": "Remove all text", + "variableAddButton": "%1", + "listAddButton": "%1", + "change_variable": "Plus to %1 by %2 %3", + "set_variable": "Set %1 to %2 %3", + "show_variable": "Show variable %1 value %2", + "hide_variable": "Hide variable %1 value %2", + "get_variable": "%2 %1", + "ask_and_wait": "Ask %1 and wait %2", + "get_canvas_input_value": "%1 ", + "add_value_to_list": "add %1 to the list %2 %3", + "remove_value_from_list": "remove %1 th element from %2 %3", + "insert_value_to_list": "insert %1 to %2 %3 th position %4", + "change_value_list_index": "change %1 %2 th element to %3 %4", + "value_of_index_from_list": "%1 %2 %3 %4 %5", + "length_of_list": "%1 %2 %3", + "show_list": "Show list %1 %2", + "hide_list": "Hide list %1 %2", + "options_for_list": "%1 ", + "set_visible_answer": "response %1 %2", + "is_included_in_list": "%1 %2 %3 %4 %5", + "xbot_digitalInput": "%1", + "xbot_analogValue": "%1", + "xbot_digitalOutput": "Digital %1 PIN, Ouput Value %2 %3", + "xbot_analogOutput": "Analog %1 %2 %3", + "xbot_servo": "Servo Motor %1 , Angle %2 %3", + "xbot_oneWheel": "Wheel(DC) Motor %1 , Speed %2 %3", + "xbot_twoWheel": "Wheel(DC) Motor Right(2) Speed: %1 Left(1) Speed: %2 %3", + "xbot_rgb": "RGB LED Color from Red %1 Green %2 Blue %3 %4", + "xbot_rgb_picker": "RGB LED Color from %1 %2", + "xbot_buzzer": "play note %1 %2 for %3 sec of Melody Playing %4", + "xbot_lcd": "LCD %1 th Line , Text %2 %3", + "run": "", + "mutant": "test mutant block", + "jr_start": "%1", + "jr_repeat": "%1 반복", + "jr_item": "꽃 모으기 %1", + "cparty_jr_item": "%1 %2", + "jr_north": "%1 %2", + "jr_east": "%1 %2", + "jr_south": "%1 %2", + "jr_west": "%1 %2", + "jr_start_basic": "%1 %2", + "jr_go_straight": "%1 %2", + "jr_turn_left": "%1 %2", + "jr_turn_right": "%1 %2", + "jr_go_slow": "%1 %2", + "jr_repeat_until_dest": "%1 %2 %3 %4", + "jr_if_construction": "%1 %2 %3 %4", + "jr_if_speed": "if %1 in front %2", + "maze_step_start": "%1 시작하기를 클릭했을 때", + "maze_step_jump": "뛰어넘기%1", + "maze_step_for": "%1 번 반복하기%2", + "test": "%1 this is test block %2", + "maze_repeat_until_1": "%1 만날 때 까지 반복%2", + "maze_repeat_until_2": "모든 %1 만날 때 까지 반복%2", + "maze_step_if_1": "만약 앞에 %1 있다면%2", + "maze_step_if_2": "만약 앞에 %1 있다면%2", + "maze_call_function": "약속 불러오기%1", + "maze_define_function": "약속하기%1", + "maze_step_if_3": "만약 앞에 %1 있다면%2", + "maze_step_if_4": "만약 앞에 %1 있다면%2", + "maze_step_move_step": "앞으로 한 칸 이동%1", + "maze_step_rotate_left": "왼쪽으로 회전%1", + "maze_step_rotate_right": "오른쪽으로 회전%1", + "test_wrapper": "%1 this is test block %2", + "basic_button": "%1" +}; + +if (typeof exports == "object") + exports.Lang = Lang; \ No newline at end of file diff --git a/extern/lang/ko.js b/extern/lang/ko.js new file mode 100644 index 0000000000..6242ae2369 --- /dev/null +++ b/extern/lang/ko.js @@ -0,0 +1,3238 @@ +var Lang = {}; +Lang.category = { + "name": "ko" +}; +Lang.type = "ko"; +Lang.en = "English"; +Lang.Blocks = { + "ARDUINO": "하드웨어", + "ARDUINO_download_connector": "연결 프로그램 다운로드", + "ARDUINO_download_source": "엔트리 아두이노 소스", + "ARDUINO_reconnect": "하드웨어 연결하기", + "ARDUINO_connected": "하드웨어가 연결되었습니다. ", + "ARDUINO_arduino_get_number_1": "신호", + "ARDUINO_arduino_get_number_2": "의 숫자 결과값", + "ARDUINO_arduino_get_sensor_number_0": "0", + "ARDUINO_arduino_get_sensor_number_1": "1", + "ARDUINO_arduino_get_sensor_number_2": "2", + "ARDUINO_arduino_get_sensor_number_3": "3", + "ARDUINO_arduino_get_sensor_number_4": "4", + "ARDUINO_arduino_get_sensor_number_5": "5", + "BITBRICK_light": "밝기센서", + "BITBRICK_IR": "거리센서", + "BITBRICK_touch": "버튼", + "BITBRICK_potentiometer": "가변저항", + "BITBRICK_MIC": "소리감지센서", + "BITBRICK_UserSensor": "사용자입력", + "BITBRICK_dc_direction_ccw": "반시계", + "BITBRICK_dc_direction_cw": "시계", + "CODEino_get_sensor_number_0": "0", + "CODEino_get_sensor_number_1": "1", + "CODEino_get_sensor_number_2": "2", + "CODEino_get_sensor_number_3": "3", + "CODEino_get_sensor_number_4": "4", + "CODEino_get_sensor_number_5": "5", + "CODEino_get_sensor_number_6": "6", + "CODEino_sensor_name_0": "소리", + "CODEino_sensor_name_1": "빛", + "CODEino_sensor_name_2": "슬라이더", + "CODEino_sensor_name_3": "저항-A", + "CODEino_sensor_name_4": "저항-B", + "CODEino_sensor_name_5": "저항-C", + "CODEino_sensor_name_6": "저항-D", + "CODEino_string_1": " 센서값 ", + "CODEino_string_2": " 보드의 ", + "CODEino_string_3": "버튼누름", + "CODEino_string_4": "A 연결됨", + "CODEino_string_5": "B 연결됨", + "CODEino_string_6": "C 연결됨", + "CODEino_string_7": "D 연결됨", + "CODEino_string_8": " 3축 가속도센서 ", + "CODEino_string_9": "축의 센서값 ", + "CODEino_string_10": "소리센서 ", + "CODEino_string_11": "소리큼", + "CODEino_string_12": "소리작음", + "CODEino_string_13": "빛센서 ", + "CODEino_string_14": "밝음", + "CODEino_string_15": "어두움", + "CODEino_string_16": "왼쪽 기울임", + "CODEino_string_17": "오른쪽 기울임", + "CODEino_string_18": "위쪽 기울임", + "CODEino_string_19": "아래쪽 기울임", + "CODEino_string_20": "뒤집힘", + "CODEino_accelerometer_X": "X", + "CODEino_accelerometer_Y": "Y", + "CODEino_accelerometer_Z": "Z", + "ARDUINO_arduino_get_string_1": "신호", + "ARDUINO_arduino_get_string_2": "의 글자 결과값", + "ARDUINO_arduino_send_1": "신호", + "ARDUINO_arduino_send_2": "보내기", + "ARDUINO_num_sensor_value_1": "아날로그", + "ARDUINO_num_sensor_value_2": "번 센서값", + "ARDUINO_get_digital_value_1": "디지털", + "ARDUINO_num_pin_1": "디지털", + "ARDUINO_num_pin_2": "번 핀", + "ARDUINO_toggle_pwm_1": "디지털", + "ARDUINO_toggle_pwm_2": "번 핀을", + "ARDUINO_toggle_pwm_3": "(으)로 정하기", + "ARDUINO_on": "켜기", + "ARDUINO_convert_scale_1": "", + "ARDUINO_convert_scale_2": "값의 범위를", + "ARDUINO_convert_scale_3": "~", + "ARDUINO_convert_scale_4": "에서", + "ARDUINO_convert_scale_5": "~", + "ARDUINO_convert_scale_6": "(으)로 바꾼값", + "ARDUINO_off": "끄기", + "brightness": "밝기", + "BRUSH": "붓", + "BRUSH_brush_erase_all": "모든 붓 지우기", + "BRUSH_change_opacity_1": "붓의 불투명도를", + "BRUSH_change_opacity_2": "% 만큼 바꾸기", + "BRUSH_change_thickness_1": "붓의 굵기를", + "BRUSH_change_thickness_2": "만큼 바꾸기", + "BRUSH_set_color_1": "붓의 색을", + "BRUSH_set_color_2": "(으)로 정하기", + "BRUSH_set_opacity_1": "붓의 불투명도를", + "BRUSH_set_opacity_2": "% 로 정하기", + "BRUSH_set_random_color": "붓의 색을 무작위로 정하기", + "BRUSH_set_thickness_1": "붓의 굵기를", + "BRUSH_set_thickness_2": "(으)로 정하기", + "BRUSH_stamp": "도장찍기", + "BRUSH_start_drawing": "그리기 시작하기", + "BRUSH_stop_drawing": "그리기 멈추기", + "CALC": "계산", + "CALC_calc_mod_1": "", + "CALC_calc_mod_2": "/", + "CALC_calc_mod_3": "의 나머지", + "CALC_calc_operation_of_1": "", + "CALC_calc_operation_of_2": "의", + "CALC_calc_operation_root": "루트", + "CALC_calc_operation_square": "제곱", + "CALC_calc_rand_1": "", + "CALC_calc_rand_2": "부터", + "CALC_calc_rand_3": "사이의 무작위 수", + "CALC_calc_share_1": "", + "CALC_calc_share_2": "/", + "CALC_calc_share_3": "의 몫", + "CALC_coordinate_mouse_1": "마우스", + "CALC_coordinate_mouse_2": "좌표", + "CALC_coordinate_object_1": "", + "CALC_coordinate_object_2": "의", + "CALC_coordinate_object_3": "", + "CALC_distance_something_1": "", + "CALC_distance_something_2": "까지의 거리", + "CALC_get_angle": "각도값", + "CALC_get_date_1": " 현재", + "CALC_get_date_2": "", + "CALC_get_date_day": "일", + "CALC_get_date_hour": "시각(시)", + "CALC_get_date_minute": "시각(분)", + "CALC_get_date_month": "월", + "CALC_get_date_second": "시각(초)", + "CALC_get_date_year": "연도", + "CALC_get_sound_duration_1": "", + "CALC_get_sound_duration_2": "소리의 길이", + "CALC_get_timer_value": " 초시계 값", + "CALC_get_x_coordinate": "X 좌푯값", + "CALC_get_y_coordinate": "Y 좌푯값", + "CALC_timer_reset": "초시계 초기화", + "CALC_timer_visible_1": "초시계", + "CALC_timer_visible_2": "", + "CALC_timer_visible_show": "보이기", + "CALC_timer_visible_hide": "숨기기", + "color": "색깔", + "FLOW": "흐름", + "FLOW__if_1": "만일", + "FLOW__if_2": "이라면", + "FLOW_create_clone_1": "", + "FLOW_create_clone_2": "의 복제본 만들기", + "FLOW_delete_clone": "이 복제본 삭제하기", + "FLOW_delete_clone_all": "모든 복제본 삭제하기", + "FLOW_if_else_1": "만일", + "FLOW_if_else_2": "이라면", + "FLOW_if_else_3": "아니면", + "FLOW_repeat_basic_1": "", + "FLOW_repeat_basic_2": "번 반복하기", + "FLOW_repeat_basic_errorMsg": "반복 횟수는 0보다 같거나 커야 합니다.", + "FLOW_repeat_inf": "계속 반복하기", + "FLOW_restart": "처음부터 다시 실행하기", + "FLOW_stop_object_1": "", + "FLOW_stop_object_2": "멈추기", + "FLOW_stop_object_all": "모든 코드", + "FLOW_stop_object_this_object": "자신의 코드", + "FLOW_stop_object_this_thread": "이 코드", + "FLOW_stop_object_other_thread": "자신의 다른 코드", + "FLOW_stop_repeat": "반복 중단하기", + "FLOW_stop_run": "프로그램 끝내기", + "FLOW_wait_second_1": "", + "FLOW_wait_second_2": "초 기다리기", + "FLOW_wait_until_true_1": "", + "FLOW_wait_until_true_2": "이(가) 될 때까지 기다리기", + "FLOW_when_clone_start": "복제본이 처음 생성되었을때", + "FUNC": "함수", + "JUDGEMENT": "판단", + "JUDGEMENT_boolean_and": "그리고", + "JUDGEMENT_boolean_not_1": "", + "JUDGEMENT_boolean_not_2": "(이)가 아니다", + "JUDGEMENT_boolean_or": "또는", + "JUDGEMENT_false": " 거짓 ", + "JUDGEMENT_is_clicked": "마우스를 클릭했는가?", + "JUDGEMENT_is_press_some_key_1": "", + "JUDGEMENT_is_press_some_key_2": "키가 눌러져 있는가?", + "JUDGEMENT_reach_something_1": "", + "JUDGEMENT_reach_something_2": "에 닿았는가?", + "JUDGEMENT_true": " 참 ", + "LOOKS": "생김새", + "LOOKS_change_scale_percent_1": "크기를", + "LOOKS_change_scale_percent_2": "만큼 바꾸기", + "LOOKS_change_to_next_shape": "다음 모양으로 바꾸기", + "LOOKS_change_to_nth_shape_1": "", + "LOOKS_change_to_nth_shape_2": "모양으로 바꾸기", + "LOOKS_change_shape_prev": "이전", + "LOOKS_change_shape_next": "다음", + "LOOKS_change_to_near_shape_1": "", + "LOOKS_change_to_near_shape_2": "모양으로 바꾸기", + "LOOKS_dialog_1": "", + "LOOKS_dialog_2": "을(를)", + "LOOKS_dialog_3": "", + "LOOKS_dialog_time_1": "", + "LOOKS_dialog_time_2": "을(를)", + "LOOKS_dialog_time_3": "초 동안", + "LOOKS_dialog_time_4": "", + "LOOKS_erase_all_effects": "효과 모두 지우기", + "LOOKS_flip_x": "상하 모양 뒤집기", + "LOOKS_flip_y": "좌우 모양 뒤집기", + "LOOKS_hide": "모양 숨기기", + "LOOKS_remove_dialog": "말하기 지우기", + "LOOKS_set_effect_1": "", + "LOOKS_set_effect_2": "효과를", + "LOOKS_set_effect_3": "(으)로 정하기", + "LOOKS_set_effect_volume_1": "", + "LOOKS_set_effect_volume_2": "효과를", + "LOOKS_set_effect_volume_3": "만큼 주기", + "LOOKS_set_object_order_1": "", + "LOOKS_set_object_order_2": "번째로 올라오기", + "LOOKS_set_scale_percent_1": "크기를", + "LOOKS_set_scale_percent_2": " (으)로 정하기", + "LOOKS_show": "모양 보이기", + "mouse_pointer": "마우스포인터", + "MOVING": "움직임", + "MOVING_bounce_wall": "화면 끝에 닿으면 튕기기", + "MOVING_bounce_when_1": "", + "MOVING_bounce_when_2": "에 닿으면 튕기기", + "MOVING_flip_arrow_horizontal": "화살표 방향 좌우 뒤집기", + "MOVING_flip_arrow_vertical": "화살표 방향 상하 뒤집기", + "MOVING_locate_1": "", + "MOVING_locate_2": "위치로 이동하기", + "MOVING_locate_time_1": "", + "MOVING_locate_time_2": "초 동안", + "MOVING_locate_time_3": "위치로 이동하기", + "MOVING_locate_x_1": "x:", + "MOVING_locate_x_2": "위치로 이동하기", + "MOVING_locate_xy_1": "x:", + "MOVING_locate_xy_2": "y:", + "MOVING_locate_xy_3": "위치로 이동하기", + "MOVING_locate_xy_time_1": "", + "MOVING_locate_xy_time_2": "초 동안 x:", + "MOVING_locate_xy_time_3": "y:", + "MOVING_locate_xy_time_4": "위치로 이동하기", + "MOVING_locate_y_1": "y:", + "MOVING_locate_y_2": "위치로 이동하기", + "MOVING_move_direction_1": "이동 방향으로", + "MOVING_move_direction_2": "만큼 움직이기", + "MOVING_move_direction_angle_1": "", + "MOVING_move_direction_angle_2": "방향으로", + "MOVING_move_direction_angle_3": "만큼 움직이기", + "MOVING_move_x_1": "x 좌표를", + "MOVING_move_x_2": "만큼 바꾸기", + "MOVING_move_xy_time_1": "", + "MOVING_move_xy_time_2": "초 동안 x:", + "MOVING_move_xy_time_3": "y:", + "MOVING_move_xy_time_4": "만큼 움직이기", + "MOVING_move_y_1": "y 좌표를", + "MOVING_move_y_2": "만큼 바꾸기", + "MOVING_rotate_by_angle_1": "오브젝트를", + "MOVING_rotate_by_angle_2": "만큼 회전하기", + "MOVING_rotate_by_angle_dropdown_1": "", + "MOVING_rotate_by_angle_dropdown_2": "만큼 회전하기", + "MOVING_rotate_by_angle_time_1": "오브젝트를", + "MOVING_rotate_by_angle_time_2": "초 동안", + "MOVING_rotate_by_angle_time_3": "만큼 회전하기", + "MOVING_rotate_direction_1": "이동 방향을", + "MOVING_rotate_direction_2": "만큼 회전하기", + "MOVING_see_angle_1": "이동 방향을", + "MOVING_see_angle_2": "(으)로 정하기", + "MOVING_see_angle_direction_1": "오브젝트를", + "MOVING_see_angle_direction_2": "(으)로 정하기", + "MOVING_see_angle_object_1": "", + "MOVING_see_angle_object_2": "쪽 바라보기", + "MOVING_see_direction_1": "", + "MOVING_see_direction_2": "쪽 보기", + "MOVING_set_direction_by_angle_1": "방향을", + "MOVING_set_direction_by_angle_2": "(으)로 정하기", + "MOVING_add_direction_by_angle_1": "방향을", + "MOVING_add_direction_by_angle_2": "만큼 회전하기", + "MOVING_add_direction_by_angle_time_1": "방향을", + "MOVING_add_direction_by_angle_time_2": "초 동안", + "MOVING_add_direction_by_angle_time_3": "만큼 회전하기", + "no_target": "대상없음", + "oneself": "자신", + "opacity": "불투명도", + "SCENE": "장면", + "SOUND": "소리", + "SOUND_sound_silent_all": "모든 소리 멈추기", + "SOUND_sound_something_1": "소리", + "SOUND_sound_something_2": "재생하기", + "SOUND_sound_something_second_1": "소리", + "SOUND_sound_something_second_2": "", + "SOUND_sound_something_second_3": "초 재생하기", + "SOUND_sound_something_second_wait_1": "소리", + "SOUND_sound_something_second_wait_2": "", + "SOUND_sound_something_second_wait_3": "초 재생하고 기다리기", + "SOUND_sound_something_wait_1": "소리 ", + "SOUND_sound_something_wait_2": "재생하고 기다리기", + "SOUND_sound_volume_change_1": "소리 크기를", + "SOUND_sound_volume_change_2": "% 만큼 바꾸기", + "SOUND_sound_volume_set_1": "소리 크기를", + "SOUND_sound_volume_set_2": "% 로 정하기", + "speak": "말하기", + "START": "시작", + "START_add_message": "신호 추가하기", + "START_delete_message": "신호 삭제하기", + "START_message_cast": "신호 보내기", + "START_message_cast_1": "", + "START_message_cast_2": "신호 보내기", + "START_message_cast_wait": "신호 보내고 기다리기", + "START_message_send_wait_1": "", + "START_message_send_wait_2": "신호 보내고 기다리기", + "START_mouse_click_cancled": "마우스 클릭을 해제했을 때", + "START_mouse_clicked": "마우스를 클릭했을 때", + "START_press_some_key_1": "", + "START_press_some_key_2": "키를 눌렀을 때", + "START_press_some_key_down": "아래쪽 화살표", + "START_press_some_key_enter": "엔터", + "START_press_some_key_left": "왼쪽 화살표", + "START_press_some_key_right": "오른쪽 화살표", + "START_press_some_key_space": "스페이스", + "START_press_some_key_up": "위쪽 화살표", + "START_when_message_cast": "신호를 받았을 때", + "START_when_message_cast_1": "", + "START_when_message_cast_2": "신호를 받았을 때", + "START_when_object_click": "오브젝트를 클릭했을 때", + "START_when_object_click_canceled": "오브젝트 클릭을 해제했을 때", + "START_when_run_button_click": "시작하기 버튼을 클릭했을 때", + "START_when_scene_start": "장면이 시작했을때", + "START_when_some_key_click": "키를 눌렀을 때", + "TEXT": "글상자", + "TEXT_text": "엔트리", + "TEXT_text_append_1": "", + "TEXT_text_append_2": "라고 뒤에 이어쓰기", + "TEXT_text_flush": "텍스트 모두 지우기", + "TEXT_text_prepend_1": "", + "TEXT_text_prepend_2": "라고 앞에 추가하기", + "TEXT_text_write_1": "", + "TEXT_text_write_2": "라고 글쓰기", + "VARIABLE": "자료", + "VARIABLE_add_value_to_list": "항목을 리스트에 추가하기", + "VARIABLE_add_value_to_list_1": "", + "VARIABLE_add_value_to_list_2": "항목을", + "VARIABLE_add_value_to_list_3": "에 추가하기", + "VARIABLE_ask_and_wait_1": "", + "VARIABLE_ask_and_wait_2": "을(를) 묻고 대답 기다리기", + "VARIABLE_change_value_list_index": "항목을 바꾸기", + "VARIABLE_change_value_list_index_1": "", + "VARIABLE_change_value_list_index_3": "번째 항목을", + "VARIABLE_change_value_list_index_2": " ", + "VARIABLE_change_value_list_index_4": "(으)로 바꾸기", + "VARIABLE_change_variable": "변수 더하기", + "VARIABLE_change_variable_1": "", + "VARIABLE_change_variable_2": "에", + "VARIABLE_change_variable_3": "만큼 더하기", + "VARIABLE_change_variable_name": "변수 이름 바꾸기", + "VARIABLE_combine_something_1": "", + "VARIABLE_combine_something_2": "과(와)", + "VARIABLE_combine_something_3": "를 합치기", + "VARIABLE_get_canvas_input_value": " 대답 ", + "VARIABLE_get_variable": "변수", + "VARIABLE_get_variable_1": "값", + "VARIABLE_get_variable_2": "값", + "VARIABLE_get_y": "Y 좌푯값", + "VARIABLE_hide_list": "리스트 숨기기", + "VARIABLE_hide_list_1": "리스트", + "VARIABLE_hide_list_2": "숨기기", + "VARIABLE_hide_variable": "변수값 숨기기", + "VARIABLE_hide_variable_1": "변수", + "VARIABLE_hide_variable_2": "숨기기", + "VARIABLE_insert_value_to_list": "항목을 넣기", + "VARIABLE_insert_value_to_list_1": "", + "VARIABLE_insert_value_to_list_2": "을(를)", + "VARIABLE_insert_value_to_list_3": "의", + "VARIABLE_insert_value_to_list_4": "번째에 넣기", + "VARIABLE_length_of_list": "리스트의 길이", + "VARIABLE_length_of_list_1": "", + "VARIABLE_length_of_list_2": " 항목 수", + "VARIABLE_list": "리스트", + "VARIABLE_make_variable": "변수 만들기", + "VARIABLE_list_option_first": "첫번째", + "VARIABLE_list_option_last": "마지막", + "VARIABLE_list_option_random": "무작위", + "VARIABLE_remove_value_from_list": "항목을 삭제하기", + "VARIABLE_remove_value_from_list_1": "", + "VARIABLE_remove_value_from_list_2": "번째 항목을", + "VARIABLE_remove_value_from_list_3": "에서 삭제하기", + "VARIABLE_remove_variable": "변수 삭제", + "VARIABLE_set_variable": "변수 정하기", + "VARIABLE_set_variable_1": "", + "VARIABLE_set_variable_2": "를", + "VARIABLE_set_variable_3": "로 정하기", + "VARIABLE_show_list": "리스트 보이기", + "VARIABLE_show_list_1": "리스트", + "VARIABLE_show_list_2": "보이기", + "VARIABLE_show_variable": "변수값 보이기", + "VARIABLE_show_variable_1": "변수", + "VARIABLE_show_variable_2": "보이기", + "VARIABLE_value_of_index_from_list": "리스트 항목의 값", + "VARIABLE_value_of_index_from_list_1": "", + "VARIABLE_value_of_index_from_list_2": "의", + "VARIABLE_value_of_index_from_list_3": "번째 항목", + "HAMSTER_hand_found": "손 찾음?", + "HAMSTER_sensor_leftProximity": "왼쪽 근접 센서", + "HAMSTER_sensor_rightProximity": "오른쪽 근접 센서", + "HAMSTER_sensor_leftFloor": "왼쪽 바닥 센서", + "HAMSTER_sensor_rightFloor": "오른쪽 바닥 센서", + "HAMSTER_sensor_accelerationX": "x축 가속도", + "HAMSTER_sensor_accelerationY": "y축 가속도", + "HAMSTER_sensor_accelerationZ": "z축 가속도", + "HAMSTER_sensor_light": "밝기", + "HAMSTER_sensor_temperature": "온도", + "HAMSTER_sensor_signalStrength": "신호 세기", + "HAMSTER_sensor_inputA": "입력 A", + "HAMSTER_sensor_inputB": "입력 B", + "HAMSTER_move_forward_once": "말판 앞으로 한 칸 이동하기", + "HAMSTER_turn_once_1": "말판", + "HAMSTER_turn_once_2": "으로 한 번 돌기", + "HAMSTER_move_forward": "앞으로 이동하기", + "HAMSTER_move_backward": "뒤로 이동하기", + "HAMSTER_turn_around_1": "", + "HAMSTER_turn_around_2": "으로 돌기", + "HAMSTER_move_forward_for_secs_1": "앞으로", + "HAMSTER_move_forward_for_secs_2": "초 이동하기", + "HAMSTER_move_backward_for_secs_1": "뒤로", + "HAMSTER_move_backward_for_secs_2": "초 이동하기", + "HAMSTER_turn_for_secs_1": "", + "HAMSTER_turn_for_secs_2": "으로", + "HAMSTER_turn_for_secs_3": "초 돌기", + "HAMSTER_change_both_wheels_by_1": "왼쪽 바퀴", + "HAMSTER_change_both_wheels_by_2": "오른쪽 바퀴", + "HAMSTER_change_both_wheels_by_3": "만큼 바꾸기", + "HAMSTER_set_both_wheels_to_1": "왼쪽 바퀴", + "HAMSTER_set_both_wheels_to_2": "오른쪽 바퀴", + "HAMSTER_set_both_wheels_to_3": "(으)로 정하기", + "HAMSTER_change_wheel_by_1": "", + "HAMSTER_change_wheel_by_2": "바퀴", + "HAMSTER_change_wheel_by_3": "만큼 바꾸기", + "HAMSTER_set_wheel_to_1": "", + "HAMSTER_set_wheel_to_2": "바퀴", + "HAMSTER_set_wheel_to_3": "(으)로 정하기", + "HAMSTER_follow_line_using_1": "", + "HAMSTER_follow_line_using_2": "선을", + "HAMSTER_follow_line_using_3": "바닥 센서로 따라가기", + "HAMSTER_follow_line_until_1": "", + "HAMSTER_follow_line_until_2": "선을 따라", + "HAMSTER_follow_line_until_3": "교차로까지 이동하기", + "HAMSTER_set_following_speed_to_1": "선 따라가기 속도를", + "HAMSTER_set_following_speed_to_2": "(으)로 정하기", + "HAMSTER_front": "앞쪽", + "HAMSTER_rear": "뒤쪽", + "HAMSTER_stop": "정지하기", + "HAMSTER_set_led_to_1": "", + "HAMSTER_set_led_to_2": "LED를", + "HAMSTER_set_led_to_3": "으로 정하기", + "HAMSTER_clear_led_1": "", + "HAMSTER_clear_led_2": "LED 끄기", + "HAMSTER_color_cyan": "하늘색", + "HAMSTER_color_magenta": "보라색", + "HAMSTER_color_black": "검은색", + "HAMSTER_beep": "삐 소리내기", + "HAMSTER_change_buzzer_by_1": "버저 음을", + "HAMSTER_change_buzzer_by_2": "만큼 바꾸기", + "HAMSTER_set_buzzer_to_1": "버저 음을", + "HAMSTER_set_buzzer_to_2": "(으)로 정하기", + "HAMSTER_clear_buzzer": "버저 끄기", + "HAMSTER_play_note_for_1": "", + "HAMSTER_play_note_for_2": "", + "HAMSTER_play_note_for_3": "음을", + "HAMSTER_play_note_for_4": "박자 연주하기", + "HAMSTER_rest_for_1": "", + "HAMSTER_rest_for_2": "박자 쉬기", + "HAMSTER_change_tempo_by_1": "연주 속도를", + "HAMSTER_change_tempo_by_2": "만큼 바꾸기", + "HAMSTER_set_tempo_to_1": "연주 속도를", + "HAMSTER_set_tempo_to_2": "BPM으로 정하기", + "HAMSTER_set_port_to_1": "포트", + "HAMSTER_set_port_to_2": "를", + "HAMSTER_set_port_to_3": "으로 정하기", + "HAMSTER_change_output_by_1": "출력", + "HAMSTER_change_output_by_2": "를", + "HAMSTER_change_output_by_3": "만큼 바꾸기", + "HAMSTER_set_output_to_1": "출력", + "HAMSTER_set_output_to_2": "를", + "HAMSTER_set_output_to_3": "(으)로 정하기", + "HAMSTER_port_a": "A", + "HAMSTER_port_b": "B", + "HAMSTER_port_ab": "A와 B", + "HAMSTER_analog_input": "아날로그 입력", + "HAMSTER_digital_input": "디지털 입력", + "HAMSTER_servo_output": "서보 출력", + "HAMSTER_pwm_output": "PWM 출력", + "HAMSTER_digital_output": "디지털 출력", + "ALBERT_hand_found": "손 찾음?", + "ALBERT_sensor_leftProximity": "왼쪽 근접 센서", + "ALBERT_sensor_rightProximity": "오른쪽 근접 센서", + "ALBERT_sensor_light": "밝기", + "ALBERT_sensor_battery": "배터리", + "ALBERT_sensor_signalStrength": "신호 세기", + "ALBERT_sensor_frontOid": "앞쪽 OID", + "ALBERT_sensor_backOid": "뒤쪽 OID", + "ALBERT_sensor_positionX": "x 위치", + "ALBERT_sensor_positionY": "y 위치", + "ALBERT_sensor_orientation": "방향", + "ALBERT_move_forward": "앞으로 이동하기", + "ALBERT_move_backward": "뒤로 이동하기", + "ALBERT_turn_around_1": "", + "ALBERT_turn_around_2": "으로 돌기", + "ALBERT_move_forward_for_secs_1": "앞으로", + "ALBERT_move_forward_for_secs_2": "초 이동하기", + "ALBERT_move_backward_for_secs_1": "뒤로", + "ALBERT_move_backward_for_secs_2": "초 이동하기", + "ALBERT_turn_for_secs_1": "", + "ALBERT_turn_for_secs_2": "으로", + "ALBERT_turn_for_secs_3": "초 돌기", + "ALBERT_change_both_wheels_by_1": "왼쪽 바퀴", + "ALBERT_change_both_wheels_by_2": "오른쪽 바퀴", + "ALBERT_change_both_wheels_by_3": "만큼 바꾸기", + "ALBERT_set_both_wheels_to_1": "왼쪽 바퀴", + "ALBERT_set_both_wheels_to_2": "오른쪽 바퀴", + "ALBERT_set_both_wheels_to_3": "(으)로 정하기", + "ALBERT_change_wheel_by_1": "", + "ALBERT_change_wheel_by_2": "바퀴", + "ALBERT_change_wheel_by_3": "만큼 바꾸기", + "ALBERT_set_wheel_to_1": "", + "ALBERT_set_wheel_to_2": "바퀴", + "ALBERT_set_wheel_to_3": "(으)로 정하기", + "ALBERT_stop": "정지하기", + "ALBERT_set_pad_size_to_1": "패드 크기를 폭", + "ALBERT_set_pad_size_to_2": "높이", + "ALBERT_set_pad_size_to_3": "(으)로 정하기", + "ALBERT_set_eye_to_1": "", + "ALBERT_set_eye_to_2": "눈을", + "ALBERT_set_eye_to_3": "으로 정하기", + "ALBERT_clear_eye_1": "", + "ALBERT_clear_eye_2": "눈 끄기", + "ALBERT_body_led_1": "몸통 LED", + "ALBERT_body_led_2": "", + "ALBERT_front_led_1": "앞쪽 LED", + "ALBERT_front_led_2": "", + "ALBERT_color_cyan": "하늘색", + "ALBERT_color_magenta": "보라색", + "ALBERT_beep": "삐 소리내기", + "ALBERT_change_buzzer_by_1": "버저 음을", + "ALBERT_change_buzzer_by_2": "만큼 바꾸기", + "ALBERT_set_buzzer_to_1": "버저 음을", + "ALBERT_set_buzzer_to_2": "(으)로 정하기", + "ALBERT_clear_buzzer": "버저 끄기", + "ALBERT_play_note_for_1": "", + "ALBERT_play_note_for_2": "", + "ALBERT_play_note_for_3": "음을", + "ALBERT_play_note_for_4": "박자 연주하기", + "ALBERT_rest_for_1": "", + "ALBERT_rest_for_2": "박자 쉬기", + "ALBERT_change_tempo_by_1": "연주 속도를", + "ALBERT_change_tempo_by_2": "만큼 바꾸기", + "ALBERT_set_tempo_to_1": "연주 속도를", + "ALBERT_set_tempo_to_2": "BPM으로 정하기", + "VARIABLE_variable": "변수", + "wall": "벽", + "robotis_common_case_01": "(을)를", + "robotis_common_set": "(으)로 정하기", + "robotis_common_value": "값", + "robotis_common_clockwhise": "시계방향", + "robotis_common_counter_clockwhise": "반시계방향", + "robotis_common_wheel_mode": "회전모드", + "robotis_common_joint_mode": "관절모드", + "robotis_common_red_color": "빨간색", + "robotis_common_green_color": "녹색", + "robotis_common_blue_color": "파란색", + "robotis_common_on": "켜기", + "robotis_common_off": "끄기", + "robotis_common_cm": "제어기", + "robotis_common_port_1": "포트 1", + "robotis_common_port_2": "포트 2", + "robotis_common_port_3": "포트 3", + "robotis_common_port_4": "포트 4", + "robotis_common_port_5": "포트 5", + "robotis_common_port_6": "포트 6", + "robotis_common_play_buzzer": "연주", + "robotis_common_play_motion": "실행", + "robotis_common_motion": "모션", + "robotis_common_index_number": "번", + "robotis_cm_custom": "직접입력 주소", + "robotis_cm_spring_left": "왼쪽 접촉 센서", + "robotis_cm_spring_right": "오른쪽 접촉 센서", + "robotis_cm_led_left": "왼쪽 LED", + "robotis_cm_led_right": "오른쪽 LED", + "robotis_cm_led_both": "양 쪽 LED", + "robotis_cm_switch": "선택 버튼 상태", + "robotis_cm_user_button": "사용자 버튼 상태", + "robotis_cm_sound_detected": "최종 소리 감지 횟수", + "robotis_cm_sound_detecting": "실시간 소리 감지 횟수", + "robotis_cm_ir_left": "왼쪽 적외선 센서", + "robotis_cm_ir_right": "오른쪽 적외선 센서", + "robotis_cm_calibration_left": "왼쪽 적외선 센서 캘리브레이션 값", + "robotis_cm_calibration_right": "오른쪽 적외선 센서 캘리브레이션 값", + "robotis_cm_clear_sound_detected": "최종소리감지횟수 초기화", + "robotis_cm_buzzer_index": "음계값", + "robotis_cm_buzzer_melody": "멜로디", + "robotis_cm_led_1": "1번 LED", + "robotis_cm_led_4": "4번 LED", + "robotis_aux_servo_position": "서보모터 위치", + "robotis_aux_ir": "적외선센서", + "robotis_aux_touch": "접촉센서", + "robotis_aux_brightness": "조도센서(CDS)", + "robotis_aux_hydro_themo_humidity": "온습도센서(습도)", + "robotis_aux_hydro_themo_temper": "온습도센서(온도)", + "robotis_aux_temperature": "온도센서", + "robotis_aux_ultrasonic": "초음파센서", + "robotis_aux_magnetic": "자석센서", + "robotis_aux_motion_detection": "동작감지센서", + "robotis_aux_color": "컬러센서", + "robotis_aux_custom": "사용자 장치", + "robotis_carCont_aux_motor_speed_1": "감속모터 속도를", + "robotis_carCont_aux_motor_speed_2": ", 출력값을", + "robotis_carCont_calibration_1": "적외선 센서 캘리브레이션 값을", + "robotis_openCM70_aux_motor_speed_1": "감속모터 속도를", + "robotis_openCM70_aux_motor_speed_2": ", 출력값을", + "robotis_openCM70_aux_servo_mode_1": "서보모터 모드를", + "robotis_openCM70_aux_servo_speed_1": "서보모터 속도를", + "robotis_openCM70_aux_servo_speed_2": ", 출력값을", + "robotis_openCM70_aux_servo_position_1": "서보모터 위치를", + "robotis_openCM70_aux_led_module_1": "LED 모듈을", + "robotis_openCM70_aux_custom_1": "사용자 장치를", + "XBOT_digital": "디지털", + "XBOT_D2_digitalInput": "D2 디지털 입력", + "XBOT_D3_digitalInput": "D3 디지털 입력", + "XBOT_D11_digitalInput": "D11 디지털 입력", + "XBOT_analog": "아날로그", + "XBOT_CDS": "광 센서 값", + "XBOT_MIC": "마이크 센서 값", + "XBOT_analog0": "아날로그 0번 핀 값", + "XBOT_analog1": "아날로그 1번 핀 값", + "XBOT_analog2": "아날로그 2번 핀 값", + "XBOT_analog3": "아날로그 3번 핀 값", + "XBOT_Value": "출력 값", + "XBOT_pin_OutputValue": "핀, 출력 값", + "XBOT_High": "높음", + "XBOT_Low": "낮음", + "XBOT_Servo": "서보 모터", + "XBOT_Head": "머리(D8)", + "XBOT_ArmR": "오른 팔(D9)", + "XBOT_ArmL": "왼 팔(D10)", + "XBOT_angle": ", 각도", + "XBOT_DC": "바퀴(DC) 모터", + "XBOT_rightWheel": "오른쪽", + "XBOT_leftWheel": "왼쪽", + "XBOT_bothWheel": "양쪽", + "XBOT_speed": ", 속도", + "XBOT_rightSpeed": "바퀴(DC) 모터 오른쪽(2) 속도:", + "XBOT_leftSpeed": "왼쪽(1) 속도:", + "XBOT_RGBLED_R": "RGB LED 켜기 R 값", + "XBOT_RGBLED_G": "G 값", + "XBOT_RGBLED_B": "B 값", + "XBOT_RGBLED_color": "RGB LED 색", + "XBOT_set": "로 정하기", + "XBOT_c": "도", + "XBOT_d": "레", + "XBOT_e": "미", + "XBOT_f": "파", + "XBOT_g": "솔", + "XBOT_a": "라", + "XBOT_b": "시", + "XBOT_melody_ms": "초 연주하기", + "XBOT_Line": "번째 줄", + "XBOT_outputValue": "출력 값", + "CALC_rotation_value": "방향값", + "CALC_direction_value": "이동 방향값", + "VARIABLE_is_included_in_list_1": "", + "VARIABLE_is_included_in_list_2": "에", + "VARIABLE_is_included_in_list_3": "이 포함되어 있는가?", + "SCENE_when_scene_start": "장면이 시작되었을때", + "SCENE_start_scene_1": "", + "SCENE_start_scene_2": "시작하기", + "SCENE_start_neighbor_scene_1": "", + "SCENE_start_neighbor_scene_2": "장면 시작하기", + "SCENE_start_scene_pre": "이전", + "SCENE_start_scene_next": "다음", + "FUNCTION_explanation_1": "이름", + "FUNCTION_character_variable": "문자/숫자값", + "FUNCTION_logical_variable": "판단값", + "FUNCTION_function": "함수", + "FUNCTION_define": "함수 정의하기", + "CALC_calc_operation_sin": "사인값", + "CALC_calc_operation_cos": "코사인값", + "CALC_calc_operation_tan": "탄젠트값", + "CALC_calc_operation_floor": "소수점 버림값", + "CALC_calc_operation_ceil": "소수점 올림값", + "CALC_calc_operation_round": "반올림값", + "CALC_calc_operation_factorial": "펙토리얼값", + "CALC_calc_operation_asin": "아크사인값", + "CALC_calc_operation_acos": "아크코사인값", + "CALC_calc_operation_atan": "아크탄젠트값", + "CALC_calc_operation_log": "로그값", + "CALC_calc_operation_ln": "자연로그값", + "CALC_calc_operation_natural": "정수 부분", + "CALC_calc_operation_unnatural": "소수점 부분", + "MOVING_locate_object_time_1": "", + "MOVING_locate_object_time_2": "초 동안", + "MOVING_locate_object_time_3": "위치로 이동하기", + "wall_up": "위쪽 벽", + "wall_down": "아래쪽 벽", + "wall_right": "오른쪽 벽", + "wall_left": "왼쪽 벽", + "CALC_coordinate_x_value": "x 좌푯값", + "CALC_coordinate_y_value": "y 좌푯값", + "CALC_coordinate_rotation_value": "방향", + "CALC_coordinate_direction_value": "이동방향", + "CALC_picture_index": "모양 번호", + "CALC_picture_name": "모양 이름", + "FLOW_repeat_while_true_1": "", + "FLOW_repeat_while_true_2": " 반복하기", + "TUT_when_start": "프로그램 실행을 클릭했을때", + "TUT_move_once": "앞으로 한 칸 이동", + "TUT_rotate_left": "왼쪽으로 회전", + "TUT_rotate_right": "오른쪽으로 회전", + "TUT_jump_barrier": "장애물 뛰어넘기", + "TUT_repeat_tutorial_1": "", + "TUT_repeat_tutorial_2": "번 반복", + "TUT_if_barrier_1": "만약 앞에", + "TUT_if_barrier_2": " 이 있다면", + "TUT_if_conical_1": "만약 앞에", + "TUT_if_conical_2": " 이 있다면", + "TUT_repeat_until": "부품에 도달할 때 까지 반복", + "TUT_repeat_until_gold": "부품에 도달할 때 까지 반복", + "TUT_declare_function": "함수 선언", + "TUT_call_function": "함수 호출", + "CALC_calc_operation_abs": "절댓값", + "CONTEXT_COPY_option": "코드 복사", + "Delete_Blocks": "코드 삭제", + "Duplication_option": "코드 복사 & 붙여넣기", + "Paste_blocks": "붙여넣기", + "Clear_all_blocks": "모든 코드 삭제하기", + "transparency": "투명도", + "BRUSH_change_brush_transparency_1": "붓의 투명도를", + "BRUSH_change_brush_transparency_2": "% 만큼 바꾸기", + "BRUSH_set_brush_transparency_1": "붓의 투명도를", + "BRUSH_set_brush_transparency_2": "% 로 정하기", + "CALC_char_at_1": "", + "CALC_char_at_2": "의", + "CALC_char_at_3": "번째 글자", + "CALC_length_of_string_1": "", + "CALC_length_of_string_2": "의 글자 수", + "CALC_substring_1": "", + "CALC_substring_2": "의", + "CALC_substring_3": "번째 글자부터", + "length_of_string": "번째 글자부터", + "CALC_substring_4": "번째 글자까지의 글자", + "CALC_replace_string_1": "", + "CALC_replace_string_2": "의", + "CALC_replace_string_3": "을(를)", + "CALC_replace_string_4": "로 바꾸기", + "CALC_change_string_case_1": "", + "CALC_change_string_case_2": "의", + "CALC_change_string_case_3": " ", + "CALC_change_string_case_sub_1": "대문자", + "CALC_change_string_case_sub_2": "소문자", + "CALC_index_of_string_1": "", + "CALC_index_of_string_2": "에서", + "CALC_index_of_string_3": "의 시작 위치", + "MOVING_add_direction_by_angle_time_explain_1": "", + "MOVING_direction_relative_duration_1": "", + "MOVING_direction_relative_duration_2": "초 동안 이동 방향", + "MOVING_direction_relative_duration_3": "만큼 회전하기", + "CALC_get_sound_volume": " 소릿값", + "SOUND_sound_from_to_1": "소리", + "SOUND_sound_from_to_2": "", + "SOUND_sound_from_to_3": "초 부터", + "SOUND_sound_from_to_4": "초까지 재생하기", + "SOUND_sound_from_to_and_wait_1": "소리", + "SOUND_sound_from_to_and_wait_2": "", + "SOUND_sound_from_to_and_wait_3": "초 부터", + "SOUND_sound_from_to_and_wait_4": "초까지 재생하고 기다리기", + "CALC_quotient_and_mod_1": "", + "CALC_quotient_and_mod_2": "/", + "CALC_quotient_and_mod_3": "의", + "CALC_quotient_and_mod_4": "", + "CALC_quotient_and_mod_sub_1": "몫", + "CALC_quotient_and_mod_sub_2": "나머지", + "self": "자신", + "CALC_coordinate_size_value": "크기", + "CALC_choose_project_timer_action_1": "초시계", + "CALC_choose_project_timer_action_2": "", + "CALC_choose_project_timer_action_sub_1": "시작하기", + "CALC_choose_project_timer_action_sub_2": "정지하기", + "CALC_choose_project_timer_action_sub_3": "초기화하기", + "LOOKS_change_object_index_1": "", + "LOOKS_change_object_index_2": "보내기", + "LOOKS_change_object_index_sub_1": "맨 앞으로", + "LOOKS_change_object_index_sub_2": "앞으로", + "LOOKS_change_object_index_sub_3": "뒤로", + "LOOKS_change_object_index_sub_4": "맨 뒤로", + "FLOW_repeat_while_true_until": "이 될 때까지", + "FLOW_repeat_while_true_while": "인 동안", + "copy_block": "블록 복사", + "delete_block": "블록 삭제", + "tidy_up_block": "블록 정리하기", + "block_hi": "안녕!", + "entry_bot_name": "엔트리봇", + "hi_entry": "안녕 엔트리!", + "hi_entry_en": "Hello Entry!", + "bark_dog": "강아지 짖는 소리", + "walking_entryBot": "엔트리봇_걷기", + "entry": "엔트리", + "hello": "안녕", + "nice": "반가워" +}; +Lang.Buttons = { + "apply": "적용하기", + "cancel": "취소", + "save": "확인", + "start": "시작", + "confirm": "확인", + "delete": "삭제", + "create": "학급 만들기", + "done": "완료", + "accept": "수락", + "refuse": "거절", + "yes": "예", + "button_no": "아니오" +}; +Lang.ko = "한국어"; +Lang.Menus = { + "helper": "도움말", + "youtube": "영상", + "tvcast": "영상", + "goal": "목표", + "basicproject": "시작단계", + "hw": "하드웨어", + "object": "오브젝트", + "download_info": "모든 교육자료는 각각의 제목을 클릭 하시면 다운받으실 수 있습니다.", + "entry_materials_all": "엔트리 교육자료 모음", + "recommand_grade": "추천학년", + "3_4_grades": "3-4 학년", + "5_6_grades": "5-6 학년", + "middle_grades": "중학생 이상", + "entry_go_go": "엔트리 고고!", + "entry_go_go_desc": "학년별, 난이도 별로 준비된 교재를 만나보세요. 각 과정별로 교육과정, 교재, 교사용 지도자료 3종 세트가 제공됩니다.", + "stage_beginner": "초급", + "stage_middle": "중급", + "stage_high": "고급", + "middle_school_short": "중등", + "learn_entry_programming": "따라하며 배우는 엔트리 프로그래밍", + "entry_programming_desc": "차근 차근 따라하다 보면 어느 새 나도 엔트리 고수!", + "ebs": "EBS", + "ebs_material_desc": "방송 영상과 교사용 지도서를 활용하여 수업을 해보세요!", + "season_1_material": "시즌1 교사용 지도서", + "season_2_material": "시즌2 교사용 지도서", + "compute_think_textbook": "교과서로 배우는 컴퓨팅 사고력", + "computational_sw": "국어, 수학, 과학, 미술... 학교에서 배우는 다양한 교과와 연계하여 sw를 배워보세요!", + "entry_x_hardware": "엔트리 X 하드웨어 교육자료 모음", + "e_sensor": "E 센서보드", + "arduino": "아두이노", + "orange_board": "오렌지보드", + "joystick": "조이스틱 쉴드", + "materials_etc_all": "기타 교육자료 모음", + "materials_teaching": "교원 연수 자료", + "materials_etc": "기타 참고 자료", + "materials_teaching_1": "SW교육의 필요성과 교육 방법론", + "materials_teaching_2": "엔트리와 함께하는 언플러그드 활동", + "materials_teaching_3": "게임으로 배우는 엔트리 학습모드 활동", + "materials_teaching_4": "실생활 문제해결을 위한 엔트리 프로그래밍", + "materials_teaching_5": "엔트리로 시작하는 교과연계sw교육1", + "materials_teaching_6": "엔트리로 시작하는 교과연계sw교육2", + "materials_teaching_7": "피지컬 컴퓨팅 실습1(E센서보드)", + "materials_teaching_8": "피지컬 컴퓨팅 실습2(햄스터)", + "materials_teaching_9": "수업에 필요한 학급/강의 기능 알아보기", + "materials_etc_1": "수업에 바로 활용할 수 있는 다양한 콘텐츠 모음집", + "materials_etc_2": "엔트리를 처음 사용하는 선생님들을 위한 가이드", + "materials_etc_3": "월간 엔트리", + "materials_etc_4": "엔트리 설명서", + "materials_etc_5": "엔트리 소개 자료", + "materials_etc_6": "엔트리 블록 책받침", + "jr_if_1": "만약", + "jr_if_2": "앞에 있다면", + "jr_fail_no_pencil": "이런 그곳에는 연필이 없어. 연필이 있는 곳에서 사용해보자~", + "jr_fail_forgot_pencil": "앗! 책가방에 넣을 연필을 깜빡했어. 연필을 모아서 가자~", + "jr_fail_much_blocks": "너무많은 블록을 사용했어, 다시 도전해볼래?", + "cparty_jr_success_1": "좋아! 책가방을 챙겼어!", + "go_right": "오른쪽", + "go_down": " 아래쪽", + "go_up": " 위쪽", + "go_left": " 왼쪽", + "go_forward": "앞으로 가기", + "jr_turn_left": "왼쪽으로 돌기", + "jr_turn_right": "오른쪽으로 돌기", + "go_slow": "천천히 가기", + "repeat_until_reach_1": "만날 때 까지 반복하기", + "repeat_until_reach_2": "", + "pick_up_pencil": "연필 줍기", + "repeat_0": "", + "repeat_1": "반복", + "when_start_clicked": "시작 버튼을 눌렀을 때", + "age_0": "작품체험", + "create_character": "캐릭터 만들기", + "age_7_9": "초등 저학년", + "going_school": "엔트리 학교가기", + "age_10_12_1": "초등 고학년1", + "collect_parts": "로봇공장 부품모으기", + "age_10_12_2": "초등 고학년2", + "driving_elec_car": "전기자동차 운전하기", + "age_13": "중등", + "travel_space": "우주여행하기", + "people": "사람", + "all": "전체", + "life": "일상생활", + "nature": "자연", + "animal_insect": "동물/곤충", + "environment": "자연환경", + "things": "사물", + "vehicles": "이동수단", + "others": "기타", + "fantasy": "판타지", + "instrument": "악기", + "piano": "피아노", + "marimba": "마림바", + "drum": "드럼", + "janggu": "장구", + "sound_effect": "효과음", + "others_instrument": "기타타악기", + "aboutEntryDesc_1": "엔트리는 누구나 무료로 소프트웨어 교육을 받을 수 있게 개발된 소프트웨어 교육 플랫폼입니다.", + "aboutEntryDesc_2": "학생들은 소프트웨어를 쉽고 재미있게 배울 수 있고,", + "aboutEntryDesc_3": "선생님은 효과적으로 학생들을 가르치고 관리할 수 있습니다.", + "aboutEntryDesc_4": "엔트리는 공공재와 같이", + "aboutEntryDesc_5": "비영리로 운영됩니다.", + "viewProjectTerms": "이용정책 보기", + "openSourceTitle": "오픈소스를 통한 생태계 조성", + "openSourceDesc_1": "엔트리의 소스코드 뿐 아니라 모든 교육", + "openSourceDesc_2": "자료는 CC라이센스를 적용하여", + "openSourceDesc_3": "공개합니다.", + "viewOpenSource": "오픈소스 보기", + "eduPlatformTitle": "국내교육 현장에 맞는 교육 플랫폼", + "eduPlatformDesc_1": "국내 교육 현장에 적합한 교육 도구가", + "eduPlatformDesc_2": "될 수 있도록 학교 선생님들과 함께", + "eduPlatformDesc_3": "개발하고 있습니다.", + "madeWith": "자문단", + "researchTitle": "다양한 연구를 통한 전문성 강화", + "researchDesc_1": "대학/학회 등과 함께 다양한 연구를", + "researchDesc_2": "진행하여 전문성을 강화해나가고", + "researchDesc_3": "있습니다.", + "viewResearch": "연구자료 보기", + "atEntry": "엔트리에서는", + "entryLearnDesc_1": "재미있게 배우는 학습공간", + "entryLearnDesc_2": "<학습하기>에서는 컴퓨터를 활용해 논리적으로 문제를 해결할 수 있는 다양한 학습", + "entryLearnDesc_3": "콘텐츠가 준비되어 있습니다. 게임을 하듯이 주어진 미션들을 컴퓨터 프로그래밍으로", + "entryLearnDesc_4": "해결하고, 동영상을 보면서 소프트웨어의 원리를 재미있게 배울 수 있습니다.", + "entryMakeDesc_1": "<만들기>에서는 미국 MIT에서 개발한 Scratch와 같은 블록형 프로그래밍 언어를", + "entryMakeDesc_2": "사용하여 처음 접하는 사람들도 쉽게 자신만의 창작물을 만들 수 있습니다.", + "entryShareDesc_1": "<공유하기>에서는 엔트리를 통해 제작한 작품을 다른 사람들과 공유할 수 있습니다. 또한", + "entryShareDesc_2": "공유된 작품이 어떻게 구성되었는지 살펴볼 수 있고, 이를 발전시켜 또 다른 작품을 만들 수", + "entryShareDesc_3": "있습니다. 또한 친구들과 협업해 더 멋진 작품을 만들 수도 있습니다.", + "entryGroup": "학급기능", + "entryGroupTitle": "우리 반 학습 공간", + "entryGroupDesc_1": "<학급기능>은 선생님께서 학급별로 학생들을 관리할 수 있는 기능입니다. 학급만의", + "entryGroupDesc_2": "학습하기, 만들기, 공유하기를 만들 수 있으며, 과제를 만들고 학생들의 결과물을 확인할", + "entryGroupDesc_3": "수 있습니다.", + "unpluggedToPhysical": "언플러그드 활동부터 피지컬 컴퓨팅까지", + "algorithmActivity": "기초 알고리즘 활동", + "programmignLang": "교육용 프로그래밍 언어", + "unpluggedDesc_1": "엔트리봇 보드게임과 카드게임을 통해 컴퓨터 없이도", + "unpluggedDesc_2": "소프트웨어의 기본 개념과 원리(순차, 반복, 선택, 함수)를 익힐 수 있습니다.", + "entryMaze": "엔트리봇 미로탈출", + "entryAI": "엔트리봇 우주여행", + "algorithmDesc_1": "게임을 하듯이 미션을 해결하고 인증서를 받아보세요.", + "algorithmDesc_2": "소프트웨어의 기본적인 원리를 쉽고 재미있게 배울 수 있습니다.", + "programmingLangDesc_1": "엔트리에서는 블록을 쌓듯이 프로그래밍을 하기 때문에 누구나 쉽게", + "programmingLangDesc_2": "자신만의 게임, 애니메이션, 미디어아트와 같은 멋진 작품을 만들고 공유할 수 있어 교육용으로 적합합니다.", + "viewSupporHw": "연결되는 하드웨어 보기", + "supportHwDesc_1": "엔트리와 피지컬 컴퓨팅 도구를 연결하면 현실세계와 상호작용하는 멋진 작품들을 만들어낼 수 있습니다.", + "supportHwDesc_2": "국내, 외 다양한 하드웨어 연결을 지원하며, 계속적으로 추가될 예정입니다.", + "entryEduSupport": "엔트리 교육 지원", + "eduSupportDesc_1": "엔트리교육연구소에서는 소프트웨어 교육을 위한 다양한 교육 자료를 제작하여 무상으로 배포하고 있습니다.", + "eduSupportDesc_2": "모든 자료는 교육자료 페이지에서 다운받으실 수 있습니다.", + "materials_1_title": "수준별 교재", + "materials_1_desc_1": "학년별 수준에 맞는 교재를 통해 차근차근", + "materials_1_desc_2": "따라하며 쉽게 엔트리를 익혀보세요!", + "materials_2_title": "EBS 방송 연계 교안", + "materials_2_desc_1": "EBS 소프트웨어야 놀자 방송과 함께 교사용", + "materials_2_desc_2": "수업 지도안을 제공합니다.", + "materials_3_title": "초, 중등 교과 연계 수업자료", + "materials_3_desc_1": "다양한 과목에서 만나는 실생활 문제를", + "materials_3_desc_2": "컴퓨팅 사고력으로 해결해 보세요.", + "moreMaterials": "더 많은 교육 자료 보러가기", + "moreInfoAboutEntry_1": "더 많은 엔트리의 소식들을 확인하고 싶다면 아래의 링크들로 접속해보세요.", + "moreInfoAboutEntry_2": "교육자료 외에도 다양한 SW 교육과 관련한 정보를 공유하고 있습니다.", + "blog": "블로그", + "post": "포스트", + "tvCast": "TV캐스트", + "albertSchool": "알버트 스쿨버전", + "arduinoBoard": "아두이노 점품보드", + "arduinoCompatible": "아두이노 호환보드", + "bitBlock": "비트블록", + "bitbrick": "비트브릭", + "codeino": "코드이노", + "e-sensor": "E-센서보드", + "hamster": "햄스터", + "littlebits": "리틀비츠", + "orangeBoard": "오렌지 보드", + "robotis_carCont": "로보티즈 로봇자동차", + "robotis_IoT": "로보티즈 IoT", + "about": "알아보기", + "articles": "토론하기", + "gallery": "구경하기", + "learn": "학습하기", + "login": "로그인", + "logout": "로그아웃", + "make": "만들기", + "register": "가입하기", + "Join": "회원가입", + "Edit_info": "내 정보 수정", + "Discuss": "글 나누기", + "Explore": "구경하기", + "Load": "불러오기", + "My_lesson": "오픈 강의", + "Resources": "교육 자료", + "play_software": "소프트웨어야 놀자", + "problem_solve": "문제 해결하기", + "Learn": "학습하기", + "teaching_tools": "엔트리 교구", + "about_entry": "엔트리 소개", + "what_entry": "엔트리는?", + "create": "만들기", + "create_new": "새로 만들기", + "start_programming": "소프트웨어 교육의 첫걸음", + "Entry": "엔트리", + "intro_learning": "누구나 쉽고 재밌게 소프트웨어를 배울 수 있어요. ", + "intro_learning_anyone": "지금 바로 시작해보세요! ", + "start_now": "For Free, Forever.", + "welcome_entry": "엔트리에 오신걸 환영합니다.", + "student": "학생", + "non_menber": "일반인", + "teacher": "선생님", + "terms_conditions": "이용약관", + "personal_information": "개인정보 수집 및 이용에 대한 안내", + "limitation_liability": "책임의 한계와 법적 고지", + "entry_agree": "엔트리의 이용약관에 동의 합니다.", + "info_agree": "개인정보 수집 및 이용에 동의합니다.", + "next": "다음", + "enter_id": "아이디 입력", + "enter_password": "비밀번호 입력", + "confirm_password": "비밀번호 확인", + "enter_password_again": "비밀번호를 한번 더 입력하세요.", + "validation_password": "5자 이상의 영문/숫자 등을 조합하세요.", + "validation_id": "4~20자의 영문/숫자를 조합하세요", + "prev": "이전", + "born_year": "태어난 연도", + "select_born": "태어난 연도를 선택 하세요", + "year": "년", + "gender": "성별", + "choose_gender": "성별을 선택 하세요", + "male": "남성", + "female": "여성", + "language": "언어", + "best_language": "주 언어를 선택 하세요", + "korean": "한국어", + "english": "영어", + "viet": "베트남", + "option_email": "이메일(선택)", + "insert_email": "이메일 주소를 입력 하세요", + "sign_up_complete": "회원 가입이 완료 되었습니다", + "agree_terms_conditions": "이용약관에 동의해 주세요.", + "agree_personal_information": "개인정보 수집 및 이용에 대한 안내에 동의해 주세요.", + "insert_studying_stage": "작품을 공유하고 싶은 그룹을 선택해 주세요.", + "insert_born_year": "태어난 연도를 입력해 주세요.", + "insert_gender": "성별을 입력해 주세요.", + "select_language": "언어를 선택해 주세요.", + "check_email": "이메일 형식을 확인해 주세요.", + "already_exist_id": "이미 존재하는 아이디 입니다.", + "id_validation_id": "아이디는 4~20자의 영문/숫자를 조합하세요", + "password_validate_pwd": "패스워드는 5자 이상의 영문/숫자 등을 조합하세요.", + "insert_same_pwd": "같은 패스워드를 입력해 주세요.", + "studying_stage_group": "작품 공유 그룹", + "studying_stage": "작품을 공유하고 싶은 그룹을 선택해 주세요.", + "password": "비밀번호 입력", + "save_id": "아이디 저장", + "forgot_password": "아이디와 비밀번호가 기억나지 않으세요 ?", + "did_not_join": "아직 엔트리 회원이 아니세요?", + "go_join": "회원가입하기 ", + "first_step": "소프트웨어 교육의 첫걸음", + "entry_content_one": "상상했던 것들을 블록 놀이하듯 하나씩 쌓아보세요.", + "entry_content_two": "게임, 애니메이션, 미디어아트와 같은 멋진 작품이 완성된답니다!", + "entry_content_three": "재미있는 놀이로 배우고, 나만의 멋진 작품을 만들어 친구들과 공유할 수 있는 멋진 엔트리의 세상으로 여러분을 초대합니다!", + "funny_space": "재미있게 배우는 학습공간", + "in_learn_section": "< 학습하기 > 에서는", + "learn_problem_solving": "컴퓨터를 활용해 논리적으로 문제를 해결할 수 있는 다양한 학습 콘텐츠가 준비되어 있습니다. 게임을 하듯이 주어진 미션들을 컴퓨터 프로그래밍으로 해결해볼 수도 있고 재미있는 동영상으로 소프트웨어의 원리를 배울 수도 있습니다 .", + "joy_create": "창작의 즐거움", + "in_make": "< 만들기 > 는", + "make_contents": "미국 MIT에서 개발한 Scratch와 같은 비주얼 프로그래밍 언어를 사용하여 프로그래밍을 처음 접하는 사람들도 쉽게 나만의 창작물을 만들 수 있습니다. 또 엔트리를 통해 만들 수 있는 컨텐츠의 모습은 무궁무진합니다. 과학 시간에 배운 물리 법칙을 실험해 볼 수도 있고 좋아하는 캐릭터로 애니메이션을 만들거나 직접 게임을 만들어 볼 수 있습니다.", + "and_content": "또 엔트리를 통해 만들 수 있는 콘텐츠의 모습은 무궁무진합니다. 과학 시간에 배운 물리 법칙을 실험해 볼 수도 있고 좋아하는 캐릭터로 애니메이션을 만들거나 직접 게임을 만들어 볼 수 있습니다.", + "share_collaborate": "공유와 협업", + "explore_contents": "< 구경하기 > 에서는 엔트리를 통해 제작한 작품을 다른 사람들과 쉽게 공유할 수 있습니다. 또한 공유된 작품이 어떻게 구성되었는지 살펴볼 수 있고, 이를 발전시켜 자신만의 프로젝트를 만들 수 있습니다. 그리고 엔트리에서는 공동 창작도 가능합니다. 친구들과 협업하여 더 멋진 프로젝트를 만들어볼 수 있습니다.", + "why_software": "왜 소프트웨어 교육이 필요할까?", + "speak_obama_contents": "컴퓨터 과학을 배우는 것은 단지 여러분의 미래에만 중요한 일이 아닙니다. 이것은 우리 미국의 미래를 위해 중요한 일 입니다.", + "obama": "버락 오바마", + "us_president": "미국 대통령", + "billgates_contents": "컴퓨터 프로그래밍은 사고의 범위를 넓혀주고 더 나은 생각을 할 수 있게 만들며 분야에 상관없이 모든 문제에 대해 새로운 해결책을 생각할 수 있는 힘을 길러줍니다.", + "billgates": "빌게이츠", + "chairman_micro": "Microsoft 회장", + "eric_contents": "현재 디지털 혁명은 지구상 대부분의 사람들에게 아직 시작도 안된 수준입니다. 프로그래밍을 통해 향후 10년간 모든 것이 변화할 것 입니다.", + "eric": "에릭 슈미츠", + "sandbug_contents": "오늘날 컴퓨터 과학에 대한 이해는 필수가 되었습니다. 우리의 국가 경쟁력은 우리가 아이들에게 이것을 얼마나 잘 가르칠 수 있느냐에 달려있습니다.", + "sandbug": "쉐릴 샌드버그", + "view_entry_tools": "엔트리와 함께할 수 있는 교구들을 살펴볼 수 있습니다.", + "solve_problem": "문제 해결하기", + "solve_problem_content": "게임을 하듯 미션을 해결해 가면서 소프트 웨어의 원리를 배웁니다.", + "find_extra_title": "엔트리봇 부품 찾기 대작전", + "all_ages": "전 연령", + "total": "총", + "step": "단계", + "find_extra_contents": "로봇 강아지를 생산하던 루츠 공장에 어느 날 갑자기 일어난 정전 사태로 태어난 특별한 강아지 엔트리 봇. 아직 조립이 덜 된 나머지 부품들을 찾아 공장을 탈출 하도록 도와주면서 소프트웨어의 동작 원리를 익혀보자!", + "software_play_contents": "EBS에서 방영한 '소프트웨어야 놀자' 프로그램을 실습해볼 수 있습니다.", + "resources_contents": "엔트리를 활용한 다양한 교육자료들을 무료로 얻을 수 있습니다.", + "from": " 출처", + "sw_camp": "미래부 SW 창의캠프", + "elementary": "초등학교", + "middle": "중학교", + "grades": "학년", + "lesson": "차시", + "sw_contents_one": "5차시 분량으로 초등학생이 엔트리와 피지컬 컴퓨팅을 경험할 수 있는 교재입니다. 학생들은 엔트리 사용법을 학습하고, 그림판과 이야기 만들기를 합니다. 마지막에는 아두이노 교구를 활용하여 키보드를 만들어보는 활동을 합니다.", + "sw_camp_detail": "미래창조과학부 SW창의캠프", + "sw_contents_two": "5차시 분량으로 중학생이 엔트리와 피지컬 컴퓨팅을 경험할 수 있는 교재입니다. 학생들은 엔트리 사용법을 학습하고, 미로찾기 게임과, 퀴즈 프로그램을 만들어 봅니다. 마지막에는 아두이노 교구를 활용하여 키보드로 자동차를 조종하는 활동을 합니다.", + "sw_contents_three": "선생님들이 학교에서 시작할 수 있는 소프트웨어 수업 지도서입니다. 다양한 언플러그드 활동과, '소프트웨어야 놀자' 방송을 활용한 수업 지도안이 담겨 있습니다.", + "naver_sw": "NAVER 소프트웨어야 놀자", + "teacher_teaching": "교사용지도서 (초등학교 5~6학년 이상)", + "funny_sw": "즐거운 SW놀이 교실", + "sw_contents_four": "소프트웨어를 놀이하듯 재미있게 배울 수 있는 교재로 엔트리보드게임을 비롯한 다양한 언플러그드 활동과 엔트리 학습모드로 소프트웨어를 만드는 기본 원리를 배우게 됩니다. 기본 원리를 배웠다면 학생들은 이제 엔트리로 이야기, 게임, 예술작품, 응용프로그램을 만드는 방법을 배우고, 자신이 생각한 소프트웨어를 만들고 발표할 수 있도록 교재가 구성되어 있습니다.", + "ct_text_5": "교과서와 함께 키우는 컴퓨팅 사고력", + "teacher_grade_5": "교원 (초등학교 5학년)", + "ct_text_5_content": "실생활의 문제를 해결하자는 테마로 준비된 총 8개의 학습콘텐츠가 담긴 교사용 지도안입니다. 각 콘텐츠는 개정된 교육과정을 반영한 타교과와의 연계를 통해 다양한 문제를 만나고 해결해볼 수 있도록 설계되었습니다. 아이들이 컴퓨팅 사고력을 갖춘 융합형 인재가 될 수 있도록 지금 적용해보세요!", + "ct_text_6": "교과서와 함께 키우는 컴퓨팅 사고력", + "teacher_grade_6": "교원 (초등학교 6학년)", + "ct_text_6_content": "실생활의 문제를 해결하자는 테마로 준비된 총 8개의 학습콘텐츠가 담긴 교사용 지도안입니다. 각 콘텐츠는 개정된 교육과정을 반영한 타교과와의 연계를 통해 다양한 문제를 만나고 해결해볼 수 있도록 설계되었습니다. 아이들이 컴퓨팅 사고력을 갖춘 융합형 인재가 될 수 있도록 지금 적용해보세요!", + "sw_use": "모든 교재들은 비영리 목적에 한하여 저작자를 밝히고 자유롭게 이용할 수 있습니다.", + "title": "제목", + "writer": "작성자", + "view": "보기", + "date": "등록일", + "find_id_pwd": "아이디와 비밀번호 찾기", + "send_email": "이메일로 비밀번호 변경을 위한 링크를 발송해드립니다.", + "user_not_exist": "존재하지 않는 이메일 주소 입니다.", + "not_signup": "아직 회원이 아니세요?", + "send": "발송하기", + "sensorboard": "엔트리봇 센서보드", + "physical_computing": "피지컬 컴퓨팅", + "sensorboard_contents": "아두이노를 사용하기 위해서 더 이상 많은 케이블을 사용해 회로를 구성할 필요가 없습니다. 엔트리 보드는 아두이노 위에 끼우기만 하면 간단하게 LED, 온도센서, 소리센서, 빛, 슬라이더, 스위치를 활용할 수 있습니다. 이제 엔트리 보드를 활용해 누구라도 쉽게 자신만의 특별한 작품을 만들어보세요!", + "entrybot_boardgame": "엔트리봇 보드게임", + "unplugged": "언플러그드 활동", + "unplugged_contents": "재밌는 보드게임을 통해 컴퓨터의 작동 원리를 배워보세요. 로봇강아지인 엔트리봇이 정전된 공장에서 필요한 부품을 찾아 탈출하도록 돕다보면 컴퓨터 전문가처럼 문제를 바라 볼 수 있게됩니다.", + "entrybot_cardgame": "엔트리봇 카드게임 : 폭탄 대소동", + "entrybot_cardgame_contents": "갑자기 엔트리도시에 나타난 12종류의 폭탄들! 과연 폭탄들을 안전하게 해체할 수 있을까요? 폭탄들을 하나씩 해체하며 엔트리 블록과 함께 소프트웨어의 원리를 배워봐요! 순차, 반복, 조건을 통해 폭탄을 하나씩 해체하다 보면 엔트리도시를 구한 영웅이 될 수 있답니다!", + "basic_learn": "엔트리 기본 학습", + "basic_learn_contents": "엔트리를 활용한 다양한 교육 콘텐츠를 제공합니다.", + "troubleshooting": "문제해결 학습", + "playsoftware": "소프트웨어야 놀자", + "make_own_lesson": "나만의 수업을 만들어 다른 사람과 공유할 수 있습니다.", + "lecture": "강의", + "curriculum": "코스", + "group_lecture": "우리 반 강의", + "group_curriculum": "우리 반 코스", + "group_homework": "우리 반 과제", + "group_noproject": "전시된 작품이 없습니다.", + "group_nolecture": "생성된 강의가 없습니다.", + "group_nocurriculum": "생성된 코스가 없습니다.", + "lecture_contents": "필요한 기능만 선택하여 나만의 수업을 만들어 볼 수 있습니다.", + "curriculum_contents": "여러개의 강의를 하나의 코스로 묶어 차근차근 따라할 수 있는 수업을 만들 수 있습니다.", + "grade_info": "학년 정보", + "difficulty": "난이도", + "usage": "사용요소", + "learning_concept": "학습개념", + "related_subject": "연개 교과", + "show_more": "더보기", + "close": "닫기", + "latest": "최신순", + "viewer": "조회순", + "like": "좋아요순", + "comment": "댓글순", + "entire_period": "전체기간", + "today": "오늘", + "latest_week": "최근 1 주일", + "latest_month": "최근 1개월", + "latest_three_month": "최근 3개월", + "current_password": "현재 비밀번호", + "incorrect_password": "비밀번호가 일치하지 않습니다.", + "new_password": "새로운 비밀번호", + "password_option_1": "영문과 숫자의 조합으로 5자 이상이 필요합니다.", + "again_new_password": "새로운 비밀번호 재입력", + "enter_new_pwd": "새로운 비밀번호를 입력하세요.", + "enter_new_pwd_again": "새로운 비밀번호를 다시 입력하세요.", + "password_match": "비밀번호가 일치하지 않습니다.", + "incorrect_email": "유효한 이메일이 아닙니다", + "edit_button": "정보수정", + "edit_profile": "마이페이지 관리", + "my_project": "나의 작품", + "my_group": "나의 학급", + "mark": "관심 작품", + "prev_state": "이전", + "profile_image": "자기소개 이미지", + "insert_profile_image": "자기소개 이미지를 등록해 주세요.", + "at_least_180": "180 x 180 픽셀의 이미지를 권장합니다.", + "upload_image": "이미지 업로드", + "main_image": "메인 이미지", + "about_me": "자기소개", + "save_change": "변경사항 저장", + "basic_image": "기본 이미지", + "profile_condition": "70자 내외로 자기소개를 작성해주세요.", + "profile_back": "돌아가기", + "make_project": "작품 만들기", + "exhibit_project": "작품 전시하기", + "art_list_shared": "개인", + "art_list_group_shared": "그룹", + "view_project": "코드 보기", + "comment_view": "댓글", + "upload_project": "올리기", + "edit": "수정", + "save_complete": "저장", + "just_like": "좋아요", + "share": "공유", + "who_likes_project": "작품을 좋아하는 사람", + "people_interest": "작품을 관심있어 하는 사람", + "none_person": "없음", + "inserted_date": "등록일", + "last_modified": "최종 수정일", + "original_project": "원본 작품", + "for_someone": "님의", + "original_project_deleted": "원본 작품이 삭제되었습니다.", + "delete_project": "삭제", + "delete_group_project": "목록에서 삭제", + "currnet_month_time": "월", + "current_day_time": "일", + "game": "게임", + "animation": "애니메이션", + "media_art": "미디어 아트", + "physical": "피지컬", + "etc": "기타", + "connected_contents": "연계되는 콘텐츠", + "connected_contents_content": "엔트리와 함께 할 수 있는 다양한 콘텐츠를 만나보세요. 처음 소프트웨어를 배우는 사람이라면 쉽게 즐기는 보드게임부터 아두이노와 같은 피지컬 컴퓨팅을 활용하여 자신만의 고급스러운 창작물을 만들어 볼 수 있습니다.", + "basic_mission": "기본 미션: 엔트리봇 미로찾기", + "basic_mission_content": "강아지 로봇을 만드는 공장에서 우연한 정전으로 혼자서 생각할 수 있게 된 엔트리봇! 공장을 탈출하고 자유를 찾을 수 있도록 엔트리봇을 도와주세요!", + "application_mission": "응용미션: 엔트리봇 우주여행", + "write_article": "글쓰기", + "view_all_articles": "모든 글 보기", + "view_own_articles": "내가 쓴 글 보기", + "learning_materials": "교육자료", + "ebs_software_first": "<소프트웨어야 놀자>는 네이버 와 EBS 그리고 엔트리가 함께 만든 교육 콘텐츠입니다. 여기에서는 엔트리를 활용하여 실제로 간단한 프로그램을 만들어보며 소프트웨어의 기초 원리를 배워나갈 수 있습니다. 또한 각 콘텐츠에서는 동영상을 통해 컴퓨터과학에 대한 선행지식이 없더라도 충분히 재미와 호기심을 느끼며 진행할 수 있도록 준비되어있습니다.", + "go_software": "소프트웨어야 놀자 가기", + "ebs_context": "EBS 가기", + "category": "카테고리", + "add_picture": "사진첨부", + "upload_article": "글 올리기", + "list": "목록", + "report": "신고하기", + "upload": "올리기", + "staff_picks": "스태프 선정", + "popular_picks": "인기 작품", + "lecture_header_more": "더 만들어 보기", + "lecture_header_reset": "초기화", + "lecture_header_reset_exec": "초기화 하기", + "lecture_header_save": "저장", + "lecture_header_save_content": "학습내용 저장하기", + "lecture_header_export_project": "내 작품으로 저장하기", + "lecture_header_undo": "취소", + "lecture_header_redo": "복원", + "lecture_header_bugs": "버그신고", + "lecture_container_tab_object": "오브젝트", + "lecture_container_tab_video": "강의 동영상", + "lecture_container_tab_project": "완성된 작품", + "lecture_container_tab_help": "블록 도움말", + "illigal": "불법적인 내용 또는 사회질서를 위반하는 활동", + "verbal": "언어 폭력 또는 개인 정보를 침해하는 활동", + "commertial": "상업적인 목적을 가지고 활동", + "explicit": "음란물", + "other": "기타", + "report_result": "결과 회신을 원하시면 메일을 입력해 주세요.", + "report_success": "신고하기가 정상적으로 처리 되었습니다.", + "etc_detail": "기타 항목 선택후 입력해주세요.", + "lecture_play": "강의 보기", + "list_view_link": "다른 코스 보기", + "lecture_intro": "강의 소개 보기", + "study_goal": "학습목표", + "study_description": "설명", + "study_created": "등록일", + "study_last_updated": "최종 수정일", + "study_remove": "삭제", + "study_group_lecture_remove": "목록에서 삭제", + "study_group_curriculum_remove": "목록에서 삭제", + "study_edit": "코스 수정", + "study_comments": "댓글", + "study_comment_post": "올리기", + "study_comment_remove": "삭제", + "study_comment_edit": "수정", + "study_comment_save": "저장", + "study_guide_video": "안내 영상", + "study_basic_project": "기본 작품", + "study_done_project": "완성 작품을 선택하세요.", + "study_usage_element": "사용요소", + "study_concept_element": "적용개념", + "study_subject_element": "연계교과", + "study_element_none": "없음", + "study_label_like": "좋아요", + "study_label_interest": "관심 강의", + "study_label_share": "공유", + "study_label_like_people": "강좌를 좋아하는 사람", + "study_label_interest_people": "강좌를 관심있어 하는 사람", + "study_related_lectures": "강의 목록", + "study_expand": "전체보기", + "study_collapse": "줄이기", + "aftercopy": "주소가 복사되었습니다.", + "study_remove_curriculum": "코스를 삭제하시겠습니까?", + "content_required": "내용을 입력하세요", + "study_remove_lecture": "강의를 삭제하시겠습니까?", + "lecture_build": "강의 만들기", + "lecture_build_step1": "1. 강의를 소개하기 위한 정보를 입력해주세요", + "lecture_build_step2": "2. 학습에 사용되는 기능들만 선택해주세요", + "lecture_build_step3": "3. 모든 정보를 올바르게 입력했는지 확인해주세요", + "lecture_build_choice": "어떤 것을 올리시겠습니까?", + "lecture_build_project": "엔트리 작품", + "lecture_build_video": "강의 영상", + "lecture_build_grade": "추천학년", + "lecture_build_goals": "학습목표", + "lecture_build_add_goal": "이곳을 클릭하여 목표를 추가", + "lecture_build_attach": "파일 첨부", + "lecture_build_attach_text": "20MB 이내의 파일을 업로드해 주세요.", + "lecture_build_assist": "보조 영상", + "lecture_build_youtube_url": "Youtube 공유 링크를 넣어주세요.", + "lecture_build_project_done": "완성 작품을 선택하세요.", + "lecture_build_scene_text1": "장면기능을 끄면 새로운 장면을 추가하거나,", + "lecture_build_scene_text2": "삭제할 수 없습니다.", + "lecture_build_object_text": "오브젝트 추가하기를 끄면 새로운 오브젝트를 추가하거나 삭제할 수 없습니다.", + "lecture_build_blocks_text1": "학습에 필요한 블록들만 선택해주세요.", + "lecture_build_blocks_text2": "선택하지 않은 블록은 숨겨집니다.", + "lecture_build_basic1": "학습을 시작할때 사용할 작품을 선택해 주세요.", + "lecture_build_basic2": "학습자는 선택한 작품을 가지고 학습을 하게 됩니다.", + "lecture_build_help": "이 도움말을 다시 보시려면 눌러주세요.", + "lecture_build_help_never": "다시보지 않기", + "lecture_build_close": "닫기", + "lecture_build_scene": "장면 1", + "lecture_build_add_object": "오브젝트 추가하기", + "lecture_build_start": "시작하기", + "lecture_build_tab_code": "블록", + "lecture_build_tab_shape": "모양", + "lecture_build_tab_sound": "소리", + "lecture_build_tab_attribute": "속성", + "lecture_build_block_category": "블록 카테고리를 선택하세요.", + "lecture_build_attr_all": "전체", + "lecture_build_attr_var": "변수", + "lecture_build_attr_signal": "신호", + "lecture_build_attr_list": "리스트", + "lecture_build_attr_func": "함수", + "lecture_build_edit": "강의 수정", + "lecture_build_remove": "삭제", + "curriculum_build": "코스 만들기", + "curriculum_step1": "1. 코스를 소개하는 정보를 입력해주세요.", + "curriculum_step2": "2. 코스를 구성하는 강의를 선택해주세요.", + "curriculum_step3": "3. 올바르게 코스가 구성되었는지 확인해주세요.", + "curriculum_lecture_upload": "강의 올리기", + "curriculum_lecture_edit": "강의 편집", + "curriculum_lecture_open": "불러오기", + "group_lecture_add": "우리 반 강의 추가하기", + "group_curriculum_add": "우리 반 코스 추가하기", + "group_lecture_delete": "삭제", + "group_curriculum_delete": "삭제", + "group_select": "", + "group_studentNo": "학번", + "group_username": "이름", + "group_userId": "아이디", + "group_tempPassword": "비밀번호 수정", + "group_gender": "성별", + "group_studentCode": "코드", + "group_viewWorks": "작품보기", + "added_group_lecture": "강의가 삭되었습니다.", + "added_group_curriculum": "코스가 삭제되었습니다.", + "deleted_group_lecture": "강의가 삭제되었습니다.", + "deleted_group_curriculum": "코스가 삭제되었습니다.", + "modal_my": "나의", + "modal_interest": "관심", + "modal_project": "작품", + "section": "단원", + "connect_hw": "하드웨어 연결", + "connect_message": "%1에 연결되었습니다.", + "connect_fail": "하드웨어 연결에 실패했습니다. 연결프로그램이 켜져 있는지 확인해 주세요.", + "interest_curriculum": "관심 코스", + "searchword_required": "검색어를 입력하세요.", + "file_required": "파일은 필수 입력 항목입니다.", + "file_upload_max_count": "한번에 10개까지 업로드가 가능합니다.", + "image_file_only": "이미지 파일만 등록이 가능합니다.", + "file_upload_max_size": "파일당 10MB 이하만 업로드가 가능합니다.", + "curriculum_modal_lectures": "나의 강의", + "curriculum_modal_interest": "관심 강의", + "group_curriculum_modal_curriculums": "나의 코스", + "group_curriculum_modal_interest": "관심 코스", + "picture_import": "모양 가져오기", + "picture_select": "모양 선택", + "lecture_list_view": "다른 강의 보기", + "play_software_2": "EBS 소프트웨어야 놀자2", + "play_software_2_content": "네이버와 EBS 그리고 엔트리가 함께 만든 두 번째 이야기, <소프트웨어야 놀자> 시즌2를 만나보세요! 재미있는 동영상 강의를 통해 소프트웨어의 기본 개념을 배워보고, 다양하고 흥미로운 주제로 실생활 문제를 해결해 볼 수 있습니다. 방송영상과 특별영상을 보며 재미있는 프로그램들을 직접 만들어보세요. 소프트웨어 교육을 처음 접하는 친구들도 쉽게 소프트웨어와 친구가 될 수 있답니다!", + "open_project_to_all": "공개", + "close_project": "비공개", + "category_media_art": "미디어 아트", + "go_further": "더 나아가기", + "marked_project": "관심 작품", + "marked_group_project": "그룹 관심 작품", + "basic": "기본", + "application": "응용", + "the_great_escape": "탈출 모험기", + "escape_guide_1": "강아지 로봇을 만드는 공장에서 우연한 정전으로 혼자서 생각할 수 있게 된 엔트리봇! ", + "escape_guide_1_2": " 공장을 탈출하고 자유를 찾을 수 있도록 엔트리봇을 도와주세요!", + "escape_guide_2": "엔트리봇이 먼 길을 가기엔 고쳐야 할 곳이 너무 많아 공장에서 탈출하면서 몸을 수리할 수 있는 부품들을 찾아보자! 아직 몸이 완전하지는 않지만 걷거나 뛰면서, 방향을 바꾸는 정도는 가능할 거야! ", + "escape_guide_2_2": "학습 목표: 순차적 실행", + "escape_guide_3": "드디어 공장을 탈출했어! 하지만 마을로 가기 위해서는 아직 가야 할 길이 멀어. 그래도 몸은 어느 정도 고쳐져서 똑같은 일을 많이 해도 무리는 없을 거야! 어? 근데 저 로봇은 뭐지? ", + "escape_guide_3_2": "학습 목표: 반복문과 조건문", + "escape_guide_4": "드디어 마을 근처까지 왔어! 아까부터 똑같은 일을 많이 했더니 이제 외울 지경이야! 차라리 쓰일 블록은 이제 기억해뒀다가 쓰면 좋을 것 같아. 여기서 배터리만 충전해 놓으면 이제 평생 자유롭게 살 수 있을 거야.", + "escape_guide_4_2": "학습 목표: 함수 정의와 호출", + "space_travel_log": "우주 여행기", + "space_guide_1": "머나먼 우주를 탐사하기 위해 떠난 엔트리봇. 드디어 탐사 임무를 마치고 고향별인 지구로 돌아오려 하는데 수많은 돌이 지구로 가는 길을 막고 있다! 엔트리봇이 안전하게 지구로 돌아올 수 있도록 도와주세요!", + "space_guide_2": "드디어 지구에 돌아갈 시간이야! 얼른 지구에 돌아가서 쉬고 싶어!앞에 돌들이 어떻게 되어 있는지 확인하고 언제 어디로 가야 하는지 알려줘! 그러면 내가 가르쳐준 방향으로 움직일게!", + "space_guide_2_2": "학습 목표: 조건문 중첩과 논리 연산", + "cfest_mission": "엔트리 체험 미션", + "maze_1_intro": "안녕 나는 엔트리봇이라고 해. 지금 나는 다친 친구들을 구하려고 하는데 너의 도움이 필요해. 나를 도와서 친구들을 구해줘! 먼저 앞으로 가기 블록을 조립하고 시작을 눌러봐", + "maze_1_title": "시작 방법", + "maze_1_content": "엔트리봇은 어떻게 움직이나요?", + "maze_1_detail": "1. 블록 꾸러미에서 원하는 블록을 꺼내어 “시작하기를 클릭했을 때” 블록과 연결해봐
2. 다 조립했으면, 시작을 눌러봐
3. 나는 네가 조립한 블록대로 위에서부터 순서대로 움직일게", + "maze_2_intro": "좋아! 덕분에 첫 번째 친구를 무사히 구할 수 있었어! 그럼 다음 친구를 구해볼까? 어! 그런데 앞에 벌집이 있어! 뛰어넘기 블록을 사용해서 벌집을 피하고 친구를 구해보자.", + "maze_2_title_1": "장애물 뛰어넘기", + "maze_2_content_1": "장애물이 있으면 어떻게 해야하나요?", + "maze_2_detail_1": "길을 가다보면 장애물을 만날 수 있어.
장애물이 앞에 있을 때에는 뛰어넘기 블록을 사용해야 해.", + "maze_2_title_2": "시작 방법", + "maze_2_content_2": "엔트리봇은 어떻게 움직이나요?", + "maze_2_detail_2": "1. 블록 꾸러미에서 원하는 블록을 꺼내어 “시작하기를 클릭했을 때” 블록과 연결해봐
2. 다 조립했으면, 시작을 눌러봐
3. 나는 네가 조립한 블록대로 위에서부터 순서대로 움직일게", + "maze_3_intro": "멋졌어! 이제 또 다른 친구를 구하러 가자~ 이번에는 아까 구한 친구가 준 반복하기 블록을 이용해볼까? 반복하기를 이용하면 똑같은 동작을 쉽게 여러번 할 수 있어! 한 번 반복할 숫자를 바꿔볼래?", + "maze_3_title": "반복 블록(1)", + "maze_3_content": "(3)회 반복하기 블록은 어떻게 사용하나요?", + "maze_3_detail": "같은 행동을 여러번 반복하려면 ~번 반복하기 블록을 사용해야 해.
반복하고 싶은 블록들을 ~번 반복하기 안에 넣고 반복 횟수를 입력하면 돼", + "maze_4_intro": "훌륭해! 이제 구해야 할 친구 로봇들도 별로 남지 않았어. 벌집에 닿지 않도록 뛰어넘기를 반복하면서 친구에게 갈 수 있게 해줘!", + "maze_4_title": "반복 블록(1)", + "maze_4_content": "(3)회 반복하기 블록은 어떻게 사용하나요?", + "maze_4_detail": "같은 행동을 여러번 반복하려면 ~번 반복하기 블록을 사용해야 해.
반복하고 싶은 블록들을 ~번 반복하기 안에 넣고 반복 횟수를 입력하면 돼", + "maze_5_intro": "대단해! 이제 반복하기 블록과 만약 블록을 같이 사용해보자~ 만약 블록을 사용하면 앞에 벽이 있을 때 벽이 없는 쪽으로 회전할 수 있어. 그럼 친구를 구해주러 출발해볼까?", + "maze_5_title_1": "만약 블록", + "maze_5_content_1": "만약 ~라면 블록은 어떻게 동작하나요?", + "maze_5_detail_1": "만약 앞에 {이미지}가 있다면' 블록을 사용하면 앞에 {이미지}가 있을 때 어떤 행동을 할 지 정해줄 수 있어.
앞에 {이미지}가 있을 때에만 블록 안의 블록들을 실행하고
그렇지 않으면 실행하지 않게 되는 거야.", + "maze_5_title_2": "반복 블록(2)", + "maze_5_content_2": "~를 만날 때 까지 반복하기 블록은 어떻게 사용하나요?", + "maze_5_detail_2": "~까지 반복하기'를 사용하면 같은 행동을 언제까지 반복할지를 정해줄 수 있어.
반복하고 싶은 블록들을 ~까지 반복하기안에 넣으면 돼.
그러면 {이미지}와 같은 타일 위에 있는 경우 반복이 멈추게 될 거야.", + "maze_6_intro": "이제 마지막 친구야! 아까 해본 것처럼만 하면 될거야! 그럼 마지막 친구를 구하러 가볼까?", + "maze_6_title_1": "만약 블록", + "maze_6_content_1": "만약 ~라면 블록은 어떻게 동작하나요?", + "maze_6_detail_1": "만약 앞에 {이미지}가 있다면' 블록을 사용하면 앞에 {이미지}가 있을 때 어떤 행동을 할 지 정해줄 수 있어.
앞에 {이미지}가 있을 때에만 블록 안의 블록들을 실행하고
그렇지 않으면 실행하지 않게 되는 거야.", + "maze_6_title_2": "반복 블록(2)", + "maze_6_content_2": "~를 만날 때 까지 반복하기 블록은 어떻게 사용하나요?", + "maze_6_detail_2": "~까지 반복하기'를 사용하면 같은 행동을 언제까지 반복할지를 정해줄 수 있어.
반복하고 싶은 블록들을 ~까지 반복하기안에 넣으면 돼.
그러면 {이미지}와 같은 타일 위에 있는 경우 반복이 멈추게 될 거야.", + "maze_programing_mode_0": "블록 코딩", + "maze_programing_mode_1": "자바스크립트", + "maze_operation1_title": "1단계 – 자바스크립트모드 안내", + "maze_operation1_1_desc": "나는 로봇강아지 엔트리봇이야. 나에게 명령을 내려서 미션을 해결할 수 있게 도와줘! 미션은 시작할 때마다 \'목표\'를 통해서 확인할 수 있어!", + "maze_operation1_2_desc": "미션을 확인했다면 명령을 내려야 해 \'명령어 꾸러미\'명령어가 있는 공간이야. 마우스키보드명령을 내릴 수 있어. 마우스로는 명령어 꾸러미에 있는 명령어를 클릭하거나, 명령어\'명령어 조립소\'로 끌고와서 나에게 명령을 내릴 수 있어!", + "maze_operation1_2_textset_1": "마우스로 명령어를 클릭하는 방법 ", + "maze_operation1_2_textset_2": "마우스로 명령어를 드래그앤드랍하는 방법 ", + "maze_operation1_3_desc": "키보드로 명령을 내리려면 \'명령어 꾸러미\' 에 있는 명령어를 키보드로 직접 입력하면 돼.
명령어를 입력할 때 명령어 끝에 있는 ()와 ; 를 빼먹지 않도록 주의해야해!", + "maze_operation1_4_desc": "미션을 해결하기 위한 명령어를 다 입력했다면 [시작하기]를 누르면 돼.
[시작하기]를 누르면 나는 명령을 내린대로 움직일 거야!
각 명령어가 궁금하다면 [명령어 도움말]을 확인해봐!", + "maze_operation7_title": "7단계 - 반복 명령 알아보기(횟수반복)", + "maze_operation7_1_desc": "똑같은 일을 반복해서 명령하는건 매우 귀찮은 일이야.
이럴땐 반복과 관련된 명령어를 사용하면 훨씬 쉽게 명령을 내릴 수 있어.", + "maze_operation7_2_desc": "그렇다면 반복되는 명령을 쉽게 내리는 방법을 알아보자.
먼저 반복하기 명령어를 클릭한 다음, i<1 의 숫자를 바꿔서 반복횟수를 정하고
괄호({ }) 사이에 반복할 명령어를 넣어주면 돼!", + "maze_operation7_3_desc": "예를 들어 이 명령어은 move(); 를 10번 반복해서 실행해.
명령어와 동일한 명령어지.", + "maze_operation7_4_desc": "이 명령어를 사용할 때는 { } 안에 반복할 명령어를 잘 입력했는지,
`;`는 빠지지 않았는지 잘 살펴봐!
이 명령어에 대한 자세한 설명은 [명령어 도움말]에서 볼 수 있어.", + "maze_operation7_1_textset_1": "똑같은 명령어를 반복해서 사용하는 경우", + "maze_operation7_1_textset_2": "반복 명령어를 사용하는 경우", + "maze_operation7_2_textset_1": "반복 횟수", + "maze_operation7_2_textset_2": "반복할 명령", + "maze_operation7_4_textset_1": "괄호({})가 빠진 경우", + "maze_operation7_4_textset_2": "세미콜론(;)이 빠진 경우", + "maze_operation9_title": "9단계 - 반복 명령 알아보기(조건반복)", + "maze_operation9_1_desc": "앞에서는 몇 번을 반복하는 횟수반복 명령어에 대해 배웠어.
이번에는 계속해서 반복하는 명령어를 살펴보자.
이 명령어를 사용하면 미션이 끝날 때까지 동일한 행동을 계속 반복하게 돼.
이 명령어 역시 괄호({ }) 사이에 반복할 명령어를 넣어 사용할 수 있어!", + "maze_operation9_2_desc": "예를 들어 이 명령어 은 미션을 완료할때까지 반복해서 move(); right()를 실행해.
명령어와 동일한 명령어지.", + "maze_operation9_3_desc": "이 명령어를 사용할 때도 { } 안에 반복할 명령어를 잘 입력했는지,
`true`가 빠지지 않았는지 잘 살펴봐!
이 명령어에 대한 자세한 설명은 [명령어 도움말]에서 볼 수 있어.", + "maze_operation9_1_textset_1": "반복할 명령", + "maze_operation9_3_textset_1": "괄호({})가 빠진 경우", + "maze_operation9_3_textset_2": "세미콜론(;)이 빠진 경우", + "maze_operation10_title": "10단계 - 조건 명령 알아보기", + "maze_operation10_1_desc": "앞에서는 미션이 끝날 때까지 계속 반복하는 반복 명령어에 대해 배웠어.
이번에는 특정한 조건에서만 행동을 하는 조건 명령어를 살펴보자.
에서 보는것처럼 조건 명령어를 사용하면 명령을 보다 효율적으로 잘 내릴 수 있어.", + "maze_operation10_2_desc": "조건 명령어는 크게 `조건``조건이 발생했을때 실행되는 명령`으로 나눌수 있어.
먼저 조건 부분을 살펴보자. If 다음에 나오는 ( ) 부분이 조건을 입력하는 부분이야.
과 같은 명령어를 예로 살펴보자. if(front == \“wall\”) 는 만약 내 앞에(front) \"wall(벽)\"이 있다면을 뜻해", + "maze_operation10_3_desc": "이제 `조건이 발생했을 때 실행되는 명령`을 살펴보자.
이 부분은 괄호{}로 묶여 있고, 조건이 발생했을때 괄호안의 명령을 실행하게 돼!
조건이 발생하지 않으면 이 부분은 무시하고 그냥 넘어가게 되지.
의 명령어를 예로 살펴보자. 조건은 만약에 `내 앞에 벽이 있을 때` 이고,
이 조건이 발생했을 때 나는 괄호안의 명령어 right(); 처럼 오른쪽으로 회전하게 돼!", + "maze_operation10_4_desc": "조건 명령어반복하기 명령어와 함께 쓰이는 경우가 많아.
앞으로 쭉 가다가, 벽을 만났을때만 회전하게 하려면
순서와 같이 명령을 내릴 수 있지!", + "maze_operation10_1_textset_1": "[일반명령]", + "maze_operation10_1_textset_2": "앞으로 2칸 가고
오른쪽으로 회전하고,
앞으로 3칸가고,
오른쪽으로 회전하고, 앞으로...
", + "maze_operation10_1_textset_3": "[조건명령]", + "maze_operation10_1_textset_4": "앞으로 계속 가다가
`만약에 벽을 만나면`
오른쪽으로 회전해~!
", + "maze_operation10_2_textset_1": "조건", + "maze_operation10_2_textset_2": "조건이 발생했을 때 실행되는 명령", + "maze_operation10_3_textset_1": "조건", + "maze_operation10_3_textset_2": "조건이 발생했을 때 실행되는 명령", + "maze_operation10_4_textset_1": "미션이 끝날때 까지
계속 앞으로 간다.
", + "maze_operation10_4_textset_2": "계속 앞으로 가다가,
만약에 벽을 만나면
", + "maze_operation10_4_textset_3": "계속 앞으로 가다가,
만약에 벽을 만나면
오른쪽으로 회전한다.
", + "maze_operation15_title": "15단계 - 함수 명령 알아보기", + "maze_operation15_1_desc": "자주 사용하는 명령어들을 매번 입력하는건 매우 귀찮은 일이야.
자주 사용하는 명령어들을 묶어서 이름을 붙이고,
필요할 때마다 그 명령어 묶음을 불러온다면 훨씬 편리하게 명령을 내릴 수 있어!
이런 명령어 묶음을 `함수`라고 해. 이제 함수 명령에 대해 자세히 알아보자.", + "maze_operation15_2_desc": "함수 명령어는 명령어를 묶는 `함수만들기` 과정과,
묶은 명령어를 필요할 때 사용하는 `함수 불러오기` 과정이 있어.
먼저 함수만들기 과정을 살펴보자.
함수를 만들려면 함수의 이름과, 그 함수에 들어갈 명령어를 입력해야 해.
function을 입력한 다음 함수의 이름을 정할 수 있어. 여기서는 promise로 만들거야.
함수 이름을 만들었으면 ()를 붙여줘. 그 다음 괄호({})를 입력해.
그리고 이 괄호 안에 함수에 들어갈 명령어들을 입력하면 함수가 만들어져!", + "maze_operation15_3_desc": "이 명령어를 예로 살펴보자. 나는 promise 라는 함수를 만들었어.
이 함수를 불러서 실행하면 괄호({})안에 있는
move();
move();
left(); 가 실행돼!", + "maze_operation15_4_desc": "함수를 불러와서 실행하려면 아까 만든 함수의 이름을 입력하고 뒤에 `();`를 붙이면 돼.
promise 라는 이름으로 함수를 만들었으니 promise(); 를 입력하면 앞에서 묶어놓은
명령어들이 실행되는거지!
과 같이 명령을 내리면 처럼 동작하게 돼!
함수 명령어를 사용하려면 과 같이 함수를 만들고 함수를 불러와야해!", + "maze_operation15_1_textset_1": "자주 사용하는 명령어 확인하기", + "maze_operation15_1_textset_2": "명령어들을 묶어서 이름 붙이기", + "maze_operation15_1_textset_3": "명령어 묶음 불러오기", + "maze_operation15_2_textset_1": "명령어 묶음의 이름(함수 이름)", + "maze_operation15_2_textset_2": "묶을 명령어들", + "maze_operation15_3_textset_1": "명령어 묶음의 이름(함수 이름)", + "maze_operation15_3_textset_2": "묶을 명령어들", + "maze_operation15_4_textset_1": "함수 만들기", + "maze_operation15_4_textset_2": "함수 불러오기", + "maze_operation15_4_textset_3": "실제 상황", + "maze_object_title": "오브젝트 정보", + "maze_object_parts_box": "부품 상자", + "maze_object_obstacle1": "장애물", + "maze_object_obstacle2": "bee", + "maze_object_obstacle3": "banana", + "maze_object_friend": "친구", + "maze_object_wall1": "wall", + "maze_object_wall2": "wall", + "maze_object_wall3": "wall", + "maze_object_battery": "베터리", + "maze_command_ex": "예시", + "maze_command_title": "명령어 도움말", + "maze_command_move_desc": "엔트리봇을 한 칸 앞으로 이동시킵니다.", + "maze_command_jump_desc": "아래 이미지와 같은 장애물 앞에서 장애물을 뛰어 넘습니다.
", + "maze_command_right_desc": "제자리에서 오른쪽으로 90도 회전합니다.", + "maze_command_left_desc": "제자리에서 왼쪽으로 90도 회전합니다.", + "maze_command_for_desc": "괄호{} 안에 있는 명령을 입력한 횟수 만큼 반복해서 실행합니다.", + "maze_command_while_desc": "미션이 끝날 때가지 괄호{} 안에 있는 명령을 계속 반복해서 실행합니다.", + "maze_command_if1_desc": "조건 `바로 앞에 벽이 있을때`이 발생했을 때,
괄호{} 안에 있는 명령을 실행합니다.", + "maze_command_if2_desc": "조건 `바로 앞에 벌집이 있을때`이 발생했을 때,
괄호{} 안에 있는 명령을 실행합니다.", + "maze_command_if3_desc": "조건 `바로 앞에 바나나가 있을때`이 발생했을 때,
괄호{} 안에 있는 명령을 실행합니다.", + "maze_command_promise_desc": "promise 라는 함수를 만들고 실행하면 괄호{} 안에
있던 명령어가 실행합니다.", + "perfect": "아주 완벽해! ", + "succeeded_using_blocks": " 개의 블록을 사용해서 성공했어!", + "awesome": "대단한 걸!", + "succeeded_go_to_next": "개의 블록만으로 성공했어!
다음 단계로 넘어가자.", + "good": "좋아! ", + "but": "
하지만, ", + "try_again": " 개의 블록만으로 성공하는 방법도 있어.
다시 도전해 보는건 어때?", + "cfest_success": "대단한걸! 덕분에 친구들을 구할 수 있었어!
아마도 너는 타고난 프로그래머 인가봐!
나중에 또 만나자~!", + "succeeded_and_cert": "개의 블록만으로 성공했어!
인증서를 받으러 가자.", + "cause_msgs_1": "에구, 앞으로 갈 수 없는 곳이였어. 다시 해보자.", + "cause_msgs_2": "히잉. 그냥 길에서는 뛰어 넘을 곳이 없어. 다시 해보자.", + "cause_msgs_3": "에고고, 아파라. 뛰어 넘었어야 했던 곳이였어. 다시 해보자.", + "cause_msgs_4": "아쉽지만, 이번 단계에서는 꼭 아래 블록을 써야만 해.
다시 해볼래?", + "cause_msgs_5": "이런, 실행할 블록들이 다 떨어졌어. 다시 해보자.", + "close_experience": "체험
종료", + "replay": "다시하기", + "go_to_next_level": "다음단계 가기", + "move_forward": "앞으로 한 칸 이동", + "turn_left": "왼쪽", + "turn_right": "오른쪽", + "turn_en": "", + "turn_ko": "으로 회전", + "jump_over": "뛰어넘기", + "when_start_is_pressed": "시작하기를 클릭했을 때", + "repeat_until_ko": "만날 때 까지 반복", + "repeat_until_en": "", + "repeat_until": "만날 때 까지 반복", + "if_there_is_1": "만약 앞에 ", + "if_there_is_2": "있다면", + "used_blocks": "사용 블록", + "maximum": "목표 블록", + "used_command": "사용 명령어 갯수", + "maximum_command": "목표 명령어 갯수", + "block_box": "블록 꾸러미", + "block_assembly": "블록 조립소", + "command_box": "명령어 꾸러미", + "command_assembly": "명령어 조립소", + "start": "시작하기", + "engine_running": "실행중", + "engine_replay": "돌아가기", + "goto_show": "보러가기", + "make_together": "함께 만드는 엔트리", + "make_together_content": "엔트리는 학교에 계신 선생님들과 학생 친구들이 함께 고민하며 만들어갑니다.", + "project_nobody_like": "이 작품이 마음에 든다면 '좋아요'를 눌러 주세요.", + "project_nobody_interest": "'관심 작품'을 누르면 마이 페이지에서 볼 수 있어요.", + "lecture_nobody_like": "이 강의가 마음에 든다면 '좋아요'를 눌러 주세요.", + "lecture_nobody_interest": "'관심 강의'을 누르면 마이 페이지에서 볼 수 있어요.", + "course_nobody_like": "이 코스가 마음에 든다면 '좋아요'를 눌러 주세요.", + "course_nobody_interest": "'관심 코스'을 누르면 마이 페이지에서 볼 수 있어요.", + "before_changed": "변경전", + "after_changed": "변경후", + "from_changed": "( 2016년 04월 17일 부터 ) ", + "essential": "필수", + "access_term_title": "안녕하세요. 엔트리 교육연구소 입니다. 
엔트리를 사랑해주시는 여러분께 감사드리며, 
엔트리 교육연구소 웹사이트 이용약관이
2016년 4월 17일 부로 다음과 같이 개정됨을 알려드립니다. ", + "member_info": "회원 안내", + "personal_info": "개인정보 수집 및 이용에 동의 합니다.", + "option": "선택", + "latest_news": "최근소식", + "edu_data": "교육자료", + "footer_phrase": "엔트리는 누구나 무료로 소프트웨어 교육을 받을 수 있게 개발된 비영리 교육 플랫폼입니다.", + "footer_use_free": "모든 엔트리교육연구소의 저작물은 교육적 목적에 한하여 출처를 밝히고 자유롭게 이용할 수 있습니다.", + "nonprofit_platform": "비영리 교육 플랫폼", + "this_is": "입니다.", + "privacy": "개인정보 처리방침", + "entry_addr": "주소 : 서울특별시 강남구 강남대로 382 메리츠타워 7층 엔트리 교육연구소", + "phone": "전화번호", + "alert_agree_term": "이용약관에 동의하여 주세요.", + "alert_private_policy": "개인정보 수집 약관에 동의하여 주세요.", + "agree": "동의", + "optional": "선택", + "start_software": "소프트웨어 교육의 첫걸음", + "analyze_procedure": "절차", + "analyze_repeat": "반복", + "analyze_condition": "분기", + "analyze_interaction": "상호작용", + "analyze_dataRepresentation": "데이터 표현", + "analyze_abstraction": "추상화", + "analyze_sync": "병렬 및 동기화", + "jr_intro_1": "안녕! 난 쥬니라고 해! 내 친구 엔트리봇이 오른쪽에 있어! 날 친구에게 데려다 줘!", + "jr_intro_2": "엔트리봇이 내 왼쪽에 있어! 왼쪽으로 가보자.", + "jr_intro_3": "엔트리봇이 위쪽에 있어! 친구를 만날 수 있도록 도와줘!", + "jr_intro_4": "어서 엔트리봇을 만나러 가자! 아래쪽으로 가보는거야~ ", + "jr_intro_5": "우왓! 내 친구가 멀리 떨어져있어. 엔트리봇이 있는 곳까지 안내해줄래? ", + "jr_intro_6": "저기 엔트리봇이 있어~ 얼른 만나러 가보자.", + "jr_intro_7": "예쁜 꽃이 있네. 꽃들을 모아 엔트리봇에게 가보자!", + "jr_intro_8": "가는 길에 꽃이 있어! 꽃을 모아 엔트리봇에게 가보자!", + "jr_intro_9": "엔트리봇이 멀리 떨어져 있네? 가장 빠른 길로 엔트리봇에게 가 보자.", + "jr_intro_10": "엔트리봇을 만나러 가는 길에 꽃을 모두 모아서 가보자.", + "jr_intro_11": "엔트리봇에게 가려면 오른쪽으로 다섯번이나 가야 하잖아? 반복하기 블록을 사용해서 좀 더 쉽게 가 보자.", + "jr_intro_12": "반복하기를 사용해서 엔트리봇을 만나러 가자.", + "jr_intro_13": "지금 블록으로는 친구에게 갈 수가 없어. 반복 횟수를 바꿔 엔트리봇에게 갈 수 있게 해줘.", + "jr_intro_14": "반복 블록을 사용하여 엔트리봇에게 데려다 줘.", + "jr_intro_15": "엔트리봇이 정~말 멀리 있잖아? 그래도 반복 블록을 사용하면 쉽게 엔트리봇에게 갈 수 있을 거야.", + "jr_whats_ur_name": "내가 받을 인증서에 적힐 이름은?", + "jr_down_cert": "인증서 받기", + "jr_popup_prefix_1": "좋아! 엔트리봇을 만났어!", + "jr_popup_prefix_2": "우왓! 엔트리봇을 만났어!
하지만 엔트리봇을 만나기에는 더 적은 블록을 사용해서도
만날 수 있는데 다시 해볼래? ", + "jr_popup_suffix": "고마워~ 덕분에 엔트리봇이랑 재밌게 놀 수 있었어~
다음에 또 엔트리봇이랑 놀자~", + "jr_fail_dont_go": "에궁, 그 곳으로는 갈 수 없어. 가야하는 길을 다시 알려줘~", + "jr_fail_dont_know": "어? 이제 어디로 가지? 어디로 가야하는 지 더 알려줘~", + "jr_fail_no_flower": "이런 그곳에는 꽃이 없어. 꽃이 있는 곳에서 사용해보자~", + "jr_fail_forgot_flower": "앗! 엔트리봇한테 줄 꽃을 깜빡했어. 꽃을 모아서 가자~", + "jr_fail_need_repeat": "반복 블록이 없잖아! 반복 블록을 사용해서 해보자~", + "jr_hint_1": "안녕! 난 쥬니라고 해! 내 친구 엔트리봇이 오른쪽에 있어! 날 친구에게 데려다 줘!", + "jr_hint_2": "엔트리봇이 내 왼쪽에 있어! 왼쪽으로 가보자.", + "jr_hint_3": "엔트리봇이 위쪽에 있어! 친구를 만날 수 있도록 도와줘!", + "jr_hint_4": "어서 엔트리봇을 만나러 가자! 아래쪽으로 가보는거야~", + "jr_hint_5": "우왓! 내 친구가 멀리 떨어져있어. 엔트리봇이 있는 곳까지 안내해줄래?", + "jr_hint_6": "잘못된 블록들 때문에 친구에게 가지 못하고 있어, 잘못된 블록을 지우고 엔트리봇에게 갈 수 있도록 해줘!", + "jr_hint_7": "예쁜 꽃이 있네. 꽃들을 모아 엔트리봇에게 가보자!", + "jr_hint_8": "가는 길에 꽃이 있어! 꽃을 모아 엔트리봇에게 가보자!", + "jr_hint_9": "엔트리봇이 멀리 떨어져 있네? 가장 빠른 길로 엔트리봇에게 가 보자.", + "jr_hint_10": "앗, 블록을 잘못 조립해서 제대로 갈 수가 없어. 가는 길에 꽃을 모두 모아 엔트리봇에게 가져다 줄 수 있도록 고쳐 보자.", + "jr_hint_11": "엔트리봇에게 가려면 오른쪽으로 다섯번이나 가야 하잖아? 반복하기 블록을 사용해서 좀 더 쉽게 가 보자.", + "jr_hint_12": "반복하기를 사용해서 엔트리봇을 만나러 가자.", + "jr_hint_13": "지금 블록으로는 친구에게 갈 수가 없어. 반복 횟수를 바꿔 엔트리봇에게 갈 수 있게 해줘.", + "jr_hint_14": "반복 블록을 사용하여 엔트리봇에게 데려다 줘.", + "jr_hint_15": "엔트리봇이 정~말 멀리 있잖아? 그래도 반복 블록을 사용하면 쉽게 엔트리봇에게 갈 수 있을 거야.", + "jr_certification": "인증서", + "jr_congrat": "축하드립니다!", + "jr_congrat_msg": "문제해결 과정을 성공적으로 마쳤습니다.", + "jr_share": "공유", + "go_see_friends": "친구들 만나러 가요~!", + "junior_naver": "쥬니어 네이버", + "junior_naver_contents_1": "의 멋진 곰 '쥬니'가 엔트리를 찾아 왔어요! ", + "junior_naver_contents_2": "그런데 쥬니는 길을 찾는 것이 아직 어렵나봐요.", + "junior_naver_contents_3": "쥬니가 엔트리봇을 만날 수 있도록 가야하는 방향을 알려주세요~", + "basic_content": "기초", + "jr_help": "도움말", + "help": "도움말", + "cparty_robot_intro_1": "안녕 나는 엔트리봇이야. 난 부품을 얻어서 내몸을 고쳐야해. 앞으로 가기 블록으로 부품을 얻게 도와줘!", + "cparty_robot_intro_2": "좋아! 앞에도 부품이 있는데 이번에는 잘못 가다간 감전되기 쉬울 것 같아. 뛰어넘기 블록을 써서 부품까지 데려다 줘.", + "cparty_robot_intro_3": "멋진걸! 저기에도 부품이 있어! 길이 조금 꼬여있지만 회전하기 블록을 쓰면 충분히 갈 수 있을 것 같아! ", + "cparty_robot_intro_4": "좋아 이제 움직이는 건 많이 편해졌어! 이번에는 회전과 뛰어넘기를 같이 써서 저 부품을 얻어보자! ", + "cparty_robot_intro_5": "덕분에 몸이 아주 좋아졌어! 이번에도 회전과 뛰어넘기를 같이 써야 할 거야! 어서 가보자!", + "cparty_robot_intro_6": "멋져! 이제 몸이 많이 좋아져서, 똑같은 일은 여러 번 해도 괜찮을 거야! 한 번 반복하기를 사용해서 가보자!", + "cparty_robot_intro_7": "어? 중간중간에 뛰어넘어야 할 곳이 있어! 그래도 반복하기로 충분히 갈 수 있을 거야!", + "cparty_robot_intro_8": "이런! 이번에는 부품이 저기 멀리 떨어져 있어. 그래도 반복하기를 사용하면 쉽게 갈수 있지! 얼른 도와줘!", + "cparty_robot_intro_9": "우와~ 이제 내 몸이 거의 다 고쳐진 것 같아! 이번에도 반복하기를 이용해서 부품 구하러 가보자!", + "cparty_robot_intro_10": "대단해! 이제 마지막 부품만 있으면 내 몸을 완벽하게 고칠 수 있을 거야! 빨리 반복하기로 도와줘!", + "cparty_car_intro_1": "안녕! 나는 엔트리봇이라고 해, 자동차를 타고 계속 이동하려면 연료가 필요해! 앞에 있는 연료를 얻을 수 있게 도와줄래?", + "cparty_car_intro_2": "좋아! 그런데 이번에는 길이 직선이 아니네! 왼쪽/오른쪽 돌기 블록으로 잘 운전해서 함께 연료를 얻으러 가볼까?", + "cparty_car_intro_3": "잘했어! 이번 길 앞에는 과속방지턱이 있어. 빠르게 운전하면 사고가 날 수도 있을 것 같아, 천천히 가기 블록을 써서 연료를 얻으러 가보자!", + "cparty_car_intro_4": "야호, 이제 운전이 한결 편해졌어! 이 도로에서는 반복하기 블록을 사용해서 연료를 채우러 가볼까?", + "cparty_car_intro_5": "와 이번 도로는 조금 복잡해 보이지만, 앞으로 가기와 왼쪽/오른쪽 돌기 블록을 반복하면서 가보면 돼! 차분하게 연료까지 가보자", + "cparty_car_intro_6": "이번에는 도로에 장애물이 있어서 잘 돌아가야 될 것 같아, 만약에 장애물이 앞에 있다면 어떻게 해야 하는지 알려줘!", + "cparty_car_intro_7": "좋아 잘했어! 한번 더 만약에 블록을 사용해서 장애물을 피해 연료를 얻으러 가보자!", + "cparty_car_intro_8": "앗 아까 만났던 과속 방지턱이 두 개나 있네, 천천히 가기 블록을 이용해서 안전하게 연료를 채우러 가보자!", + "cparty_car_intro_9": "복잡해 보이는 길이지만, 앞에서 사용한 반복 블록과 만약에 블록을 잘 이용하면 충분히 운전할 수 있어, 연료를 채울 수 있도록 도와줘!", + "cparty_car_intro_10": "정말 멋져! 블록의 순서를 잘 나열해서 이제 마지막 남은 연료를 향해 힘을 내어 가보자!", + "cparty_car_popup_prefix_1": "좋아! 연료를 얻었어!", + "cparty_car_popup_prefix_2": "우왓! 연료를 얻었어!
하지만 연료를 얻기에는 더 적은 블록을 사용해서도
얻을 수 있는데 다시 해볼래? ", + "cparty_car_popup_suffix": "고마워~ 덕분에 모든 배터리를 얻을 수 있었어~
다음에 또 나랑 놀자~", + "all_grade": "모든 학년", + "grade_e3_e4": "초등 3 ~ 4 학년 이상", + "grade_e5_e6": "초등 5 ~ 6 학년 이상", + "grade_m1_m3": "중등 1 ~ 3 학년 이상", + "entry_first_step": "엔트리 첫걸음", + "entry_monthly": "월간 엔트리", + "play_sw_2": "EBS 소프트웨어야 놀자2", + "entry_programming": "실전, 프로그래밍!", + "entry_recommanded_course": "엔트리 추천 코스", + "introduce_course": "누구나 쉽게 보고 따라하면서 재미있고 다양한 소프트웨어를 만들 수 있는 강의 코스를 소개합니다.", + "all_free": "*강의 동영상, 만들기, 교재 등이 모두 무료로 제공됩니다.", + "cparty_result_fail_1": "에궁, 그 곳으로는 갈 수 없어. 가야하는 길을 다시 알려줘~", + "cparty_result_fail_2": "에고고, 아파라. 뛰어 넘었어야 했던 곳이였어. 다시 해보자.", + "cparty_result_fail_3": "아이고 힘들다. 아래 블록들을 안 썼더니 너무 힘들어! 아래 블록들로 다시 만들어줘.", + "cparty_result_fail_4": "어? 이제 어디로 가지? 어디로 가야하는 지 더 알려줘~", + "cparty_result_fail_5": "앗! 과속방지턱에서는 속도를 줄여야해. 천천히 가기 블록을 사용해보자~", + "cparty_result_success_1": "좋아! 부품을 얻었어!", + "cparty_result_success_2": "우왓! 부품을 얻었어!
하지만 부품을 얻기에는 더 적은 블록을 사용해서도 얻을 수 있는데 다시 해볼래?", + "cparty_result_success_3": "고마워~ 덕분에 내몸이 다 고쳐졌어~ 다음에 또 나랑 놀자~", + "cparty_insert_name": "이름을 입력하세요.", + "offline_file": "파일", + "offline_edit": "편집", + "offline_undo": "되돌리기", + "offline_redo": "다시실행", + "offline_quit": "종료", + "select_one": "선택해 주세요.", + "evaluate_challenge": "도전해본 미션의 난이도를 평가해 주세요.", + "very_easy": "매우쉬움", + "easy": "쉬움", + "normal": "보통", + "difficult": "어려움", + "very_difficult": "매우 어려움", + "save_dismiss": "바꾼 내용을 저장하지 않았습니다. 계속 하시겠습니까?", + "entry_info": "엔트리 정보", + "actual_size": "실제크기", + "zoom_in": "확대", + "zoom_out": "축소", + "cparty_jr_intro_1": "안녕! 난 엔트리봇 이라고 해! 학교가는 길에 책가방을 챙길 수 있도록 도와줘! ", + "cparty_jr_intro_2": "책가방이 내 왼쪽에 있어! 왼쪽으로 가보자.", + "cparty_jr_intro_3": "책가방이 위쪽에 있어! 책가방을 챙길 수 있도록 도와줘!", + "cparty_jr_intro_4": "어서 책가방을 챙기러 가자! 아래쪽으로 가보는 거야~", + "cparty_jr_intro_5": "우왓! 내 책가방이 멀리 떨어져 있어. 책가방이 있는 곳까지 안내해줄래?", + "cparty_jr_intro_6": "책가방이 있어! 얼른 가지러 가자~", + "cparty_jr_intro_7": "길 위에 내 연필이 있네. 연필들을 모아 책가방을 챙기러 가보자!", + "cparty_jr_intro_8": "학교 가는 길에 연필이 있어! 연필을 모아 책가방을 챙기러 가보자!", + "cparty_jr_intro_9": "내 책가방이 멀리 떨어져 있네? 가장 빠른 길로 책가방을 챙기러 가 보자.", + "cparty_jr_intro_10": "가는 길에 연필을 모두 모으고 책가방을 챙기자!", + "cparty_jr_intro_11": "책가방을 챙기러 가려면 오른쪽으로 다섯 번이나 가야 하잖아? 반복하기 블록을 사용해서 좀 더 쉽게 가 보자.", + "cparty_jr_intro_12": "반복하기를 사용해서 책가방을 챙기러 가자.", + "cparty_jr_intro_13": "지금 블록으로는 책가방이 있는 쪽으로 갈 수가 없어. 반복 횟수를 바꿔 책가방을 챙기러 갈 수 있게 해줘.", + "cparty_jr_intro_14": "반복 블록을 사용하여 책가방을 챙기러 가줘.", + "cparty_jr_intro_15": "학교가 정~말 멀리 있잖아? 그래도 반복 블록을 사용하면 쉽게 학교에 도착 할수 있을 거야.", + "make_new_project": "새로운 작품 만들기", + "open_old_project": "저장된 작품 불러오기", + "offline_download": "엔트리 다운로드", + "offline_release": "엔트리 오프라인 에디터 출시!", + "offline_description_1": "엔트리 오프라인 버전은", + "offline_description_2": "인터넷이 연결되어 있지 않아도 사용할 수 있습니다. ", + "offline_description_3": "지금 다운받아서 시작해보세요!", + "sw_week_2015": "2015 소프트웨어교육 체험 주간", + "cparty_desc": "두근두근 소프트웨어와의 첫만남", + "entry_offline_download": "엔트리 오프라인 다운로드", + "offline_desc_1": "엔트리 오프라인 버전은 인터넷이 연결되어 있지 않아도 사용할 수 있습니다.", + "offline_desc_2": "지금 다운받아서 시작해보세요!", + "download": "다운로드", + "version": "버전", + "file_size": "크기", + "update": "업데이트", + "use_range": "사용범위", + "offline_desc_free": "엔트리 오프라인은 기업과 개인 모두 제한 없이 무료로 사용하실 수 있습니다.", + "offline_required": "최소 요구사항", + "offline_required_detail": "디스크 여유 공간 500MB 이상, windows XP SP2 혹은 MAC OS 10.8 이상", + "offline_notice": "설치 전 참고사항", + "offline_notice_1": "1. 버전 1.0.5 에서는 하드웨어 연결 프로그램 통합 설치가 지원되지 않습니다.", + "offline_notice_2": "2. 별도의 웹브라우져가 필요하지 않습니다.", + "cparty_jr_result_2": "고마워~ 덕분에 책가방을 챙겨서 학교에 올 수 있었어~
다음 학교 가는 길도 함께 가자~ ", + "cparty_jr_result_3": "우왓! 학교까지 왔어!
하지만 더 적은 블록을 사용해도 학교에 갈 수 있는데
다시 해볼래?", + "cparty_jr_result_4": "우왓! 책가방을 얻었어!
하지만 더 적은 블록을 사용해도 책가방을 얻을 수 있는데
다시 해볼래? ", + "lms_no_class": "아직 만든 학급이 없습니다.", + "lms_create_class": "학급을 만들어 주세요.", + "lms_add_class": "학급 만들기", + "lms_base_class": "기본", + "lms_delete_class": "삭제", + "lms_my_class": "나의 학급", + "lms_grade_1": "초등 1", + "lms_grade_2": "초등 2", + "lms_grade_3": "초등 3", + "lms_grade_4": "초등 4", + "lms_grade_5": "초등 5", + "lms_grade_6": "초등 6", + "lms_grade_7": "중등 1", + "lms_grade_8": "중등 2", + "lms_grade_9": "중등 3", + "lms_grade_10": "일반", + "lms_add_groupId_personal": "선생님께 받은 학급 아이디를 입력하여, 회원 정보에 추가하세요.", + "lms_add_groupId": "학급 아이디 추가하기", + "lms_add_group_account": "학급 계정 추가", + "lms_enter_group_info": "발급받은 학급 아이디와 비밀번호를 입력하세요.", + "lms_group_id": "학급 아이디", + "lms_group_pw": "비밀번호", + "lms_group_name": "소속 학급명", + "personal_pwd_alert": "올바른 비밀번호 양식을 입력해 주세요", + "personal_form_alert": "양식을 바르게 입력해 주세요", + "personal_form_alert_2": "모든 양식을 완성해 주세요", + "personal_no_pwd_alert": "비밀번호를 입력해 주세요", + "select_gender": "성별을 선택해 주세요", + "enter_group_id": "학급 아이디를 입력해 주세요", + "enter_group_pwd": "비밀번호를 입력해 주세요", + "info_added": "추가되었습니다", + "no_group_id": "학급 아이디가 존재하지 않습니다", + "no_group_pwd": "비밀번호가 일치하지 않습니다", + "lms_please_choice": "선택해 주세요.", + "group_lesson": "나의 학급 강의", + "lms_banner_add_group": "학급 기능 도입", + "lms_banner_entry_group": "엔트리 학급 만들기", + "lms_banner_desc_1": "우리 반 학생들을 엔트리에 등록하세요!", + "lms_banner_desc_2": "이제 보다 편리하고 쉽게 우리 반 학생들의 작품을 찾고,", + "lms_banner_desc_3": "성장하는 모습을 확인할 수 있습니다. ", + "lms_banner_download_manual": "메뉴얼 다운로드", + "lms_banner_detail": "자세히 보기", + "already_exist_email": "이미 존재하는 이메일 입니다.", + "remove_project": "작품을 삭제하시겠습니까?", + "study_lesson": "우리 반 학습하기", + "open_project": "작품 불러오기", + "make_group": "학급 만들기", + "project_share": "작품 공유하기", + "group_project_share": "학급 공유하기", + "group_discuss": "학급 글 나누기", + "my_profile": "마이 페이지", + "search_updated": "최신 작품", + "search_recent": "최근 조회수 높은 작품", + "search_complexity": "최근 제작에 공들인 작품", + "search_staffPicked": "스태프선정 작품 저장소", + "search_childCnt": "사본이 많은 작품", + "search_likeCnt": "최근 좋아요가 많은 작품", + "gnb_share": "공유하기", + "gnb_community": "커뮤니티", + "lms_add_lectures": "강의 올리기", + "lms_add_course": "코스 올리기", + "lms_add_homework": "과제 올리기", + "remove_lecture_confirm": "강의를 정말 삭제하시겠습니까?", + "popup_delete": "삭제하기", + "remove_course_confirm": "코스를 정말 삭제하시겠습니까?", + "lms_no_lecture_teacher_1": "추가된 강의가 없습니다.", + "lms_no_lecture_teacher_2": "우리 반 강의를 추가해 주세요.", + "gnb_download": "다운로드", + "lms_no_lecture_student_1": "아직 올라온 강의가 없습니다.", + "lms_no_lecture_student_2": "선생님이 강의를 올려주시면,", + "lms_no_lecture_student_3": "학습 내용을 확인할 수 있습니다.", + "lms_no_class_teacher": "아직 만든 학급이 없습니다.", + "lms_no_course_teacher_1": "추가된 코스가 없습니다.", + "lms_no_course_teacher_2": "우리 반 코스를 추가해 주세요.", + "lms_no_course_student_1": "아직 올라온 코스가 없습니다.", + "lms_no_course_student_2": "선생님이 코스를 올려주시면,", + "lms_no_course_student_3": "학습 내용을 확인할 수 있습니다.", + "lms_no_hw_teacher_1": "추가된 과제가 없습니다.", + "lms_no_hw_teacher_2": "우리 반 과제를 추가해 주세요.", + "lms_no_hw_student_1": "아직 올라온 과제가 없습니다.", + "lms_no_hw_student_2": "선생님이 과제를 올려주시면,", + "lms_no_hw_student_3": "학습 내용을 확인할 수 있습니다.", + "modal_edit": "수정하기", + "modal_deadline": "마감일 설정", + "modal_hw_desc": "상세설명 (선택)", + "desc_optional": "", + "modal_create_hw": "과제 만들기", + "vol": "회차", + "hw_title": "과제명", + "hw_description": "내용", + "deadline": "마감일", + "do_homework": "과제하기", + "hw_progress": "진행 상태", + "hw_submit": "제출", + "view_list": "명단보기", + "view_desc": "내용보기", + "do_submit": "제출하기", + "popup_notice": "알림", + "no_selected_hw": "선택된 과제가 없습니다.", + "hw_delete_confirm": "선택한 과제를 정말 삭제하시겠습니까?", + "hw_submitter": "과제 제출자 명단", + "hw_student_desc_1": "* '제출하기'를 눌러 제출을 완료하기 전까지 얼마든지 수정이 가능합니다", + "hw_student_desc_2": "* 제출 기한이 지나면 과제를 제출할 수 없습니다.", + "popup_create_class": "학급 만들기", + "class_name": "학급 이름", + "image": "이미지", + "select_class_image": "학급 이미지를 선택해 주세요.", + "type_class_description": "학급 소개 입력", + "set_as_primary_group": "기본학급으로 지정", + "set_primary_group": "지정", + "not_primary_group": "지정안함", + "type_class_name": "학급 이름을 입력해주세요. ", + "type_class_description_long": "학급 소개를 입력해 주세요. 80자 내외", + "add_students": "학생 추가하기", + "download_as_pdf": "학급계정 PDF로 내려받기", + "download_as_excel": "학급계정 엑셀로 내려받기", + "temp_password": "임시 비밀번호 발급", + "step_name": "이름 입력", + "step_info": "정보 추가/수정", + "preview": "미리보기", + "type_name_enter": "학급에 추가할 학생의 이름을 입력하고 엔터를 치세요.", + "multiple_name_possible": "여러명의 이름 입력이 가능합니다.", + "id_auto_create": "학번은 별도로 수정하지 않으면 자동으로 생성됩니다.", + "student_id_desc_1": "학급 아이디는 별도의 입력없이 자동으로 생성됩니다.", + "student_id_desc_2": "단, 엔트리에 이미 가입된 학생을 학급에 추가한다면 학생의 엔트리 아이디를", + "student_id_desc_3": "입력해주세요. 해당 학생은 로그인 후, 학급 초대를 수락하면 됩니다.", + "student_number": "학번", + "temp_password_desc_1": "임시 비밀번호로 로그인 후,", + "temp_password_desc_2": "신규 비밀번호를 다시 설정할 수 있도록 안내해주세요.", + "temp_password_desc_3": "*한번 발급된 임시 비밀번호는 다시 볼 수 없습니다.", + "student_delete_confirm": "학생을 정말 삭제하시겠습니까?", + "no_student_selected": "선택된 학생이 없습니다.", + "class_assignment": "학급 과제", + "class_list": "학급 목록", + "select_grade": "학년을 선택 하세요.", + "add_project": "작품 올리기", + "no_project_display": "아직 학생들이 전시한 작품이 없습니다.", + "plz_display_project": "나의 작품을 전시해 주세요.", + "refuse_confirm": "학급 초대를 정말 거절하시겠습니까?", + "select_class": "학급 선택", + "mon": "월", + "tue": "화", + "wed": "수", + "thu": "목", + "fri": "금", + "sat": "토", + "sun": "일", + "jan": "1월", + "feb": "2월", + "mar": "3월", + "apr": "4월", + "may": "5월", + "jun": "6월", + "jul": "7월", + "aug": "8월", + "sep": "9월", + "oct": "10월", + "nov": "11월", + "dec": "12월", + "plz_select_lecture": "강의를 선택해 주세요.", + "plz_set_deadline": "마감일을 설정해 주세요.", + "hide_entry": "엔트리 가리기", + "hide_others": "기타 가리기", + "show_all": "모두 보기", + "lecture_description": "선생님들이 직접 만드는 강의입니다.", + "curriculum_description": "선생님들이 직접 만드는 코스입니다.", + "linebreak_off_desc_1": "글상자의 크기가 글자의 크기를 결정합니다.", + "linebreak_off_desc_2": "내용을 한 줄로만 작성할 수 있습니다.", + "linebreak_off_desc_3": "새로운 글자가 추가되면 글상자의 좌우 길이가 길어집니다.", + "linebreak_on_desc_1": "글상자의 크기가 글자가 쓰일 수 있는 영역을 결정합니다.", + "linebreak_on_desc_2": "내용 작성시 엔터키로 줄바꿈을 할 수 있습니다.", + "linebreak_on_desc_3": "내용을 작성하시거나 새로운 글자를 추가시 길이가 글상자의 가로 영역을 넘어서면 자동으로 줄이 바뀝니다.", + "entry_with": "함께 만드는 엔트리", + "ebs_season_1": "시즌 1 보러가기", + "ebs_season_2": "시즌 2 보러가기", + "partner": "파트너", + "project_term_popup_title": "작품 공개에 따른 엔트리 저작권 정책 동의", + "project_term_popup_description_1": "작품 공개를 위해", + "project_term_popup_description_2": "아래 정책을 확인해주세요.", + "project_term_popup_description_3": "", + "project_term_popup_description_4": "", + "project_term_agree_1_1": "내가 만든 작품과 그 소스코드의 공개를 동의합니다.", + "project_term_agree_1_2": "", + "project_term_agree_2_1": "다른 사람이 나의 작품을 이용하는 것을 허락합니다.", + "project_term_agree_2_2": "( 복제 , 배포 , 공중송신 포함 )", + "project_term_agree_2_3": "", + "project_term_agree_3_1": "다른 사람이 나의 작품을 수정하는 것을 허락합니다.", + "project_term_agree_3_2": "( 리믹스, 변형, 2차 제작물 작성 포함)", + "agree_all": "전체 동의", + "select_login": "로그인 선택", + "select": "선택하세요", + "with_login": "로그인 하고", + "without_login": "로그인 안하고", + "start_challenge": "미션 도전하기", + "start_challenge_2": "미션 도전하기", + "if_not_save_not_login": "* 로그인을 안하고 미션에 참여하시면 진행 상황이 저장되지 않습니다.", + "if_not_member_yet": "엔트리 회원이 아니라면?", + "join_entry": "엔트리 회원 가입하기", + "learned_computing": "기존에 소프트웨어 교육을 받아보셨나요?", + "cparty_index_description_1": "두근두근 소프트웨어와 첫 만남.", + "cparty_index_description_2": "소프트웨어랑 재미있게 놀다 보면 소프트웨어의 원리도 배우고, 생각하는힘도 쑥쑥!", + "cparty_index_description_3": "엔트리를 통해 코딩 미션에 도전하고 인증서 받으세요.", + "cparty_index_description_4": "2015 Online Coding Party는", + "cparty_index_description_5": "SW교육 체험 주간", + "cparty_index_description_6": "의 일환으로써,", + "cparty_index_description_7": "SW교육을 준비하는 선생님들의 모임", + "cparty_index_description_8": "과 함께 만들어졌습니다.", + "congratulation": "축하 드립니다!", + "warm_up": "체험", + "beginner": "입문", + "intermediate": "기본", + "advanced": "발전", + "applied": "응용", + "cert_msg_tail": "과정을 성공적으로 마쳤습니다.", + "cert_msg_head": "", + "maze_text_content_1": "안녕? 나는 엔트리봇이야. 지금 나는 공장에서 탈출을 해야 해! 탈출하기 위해서 먼저 몸을 고쳐야 할 것 같아. 앞에 있는 부품을 얻을 수 있게 도와줄래? move()", + "maze_text_content_2": "좋아 아주 잘했어! 덕분에 몸이 한결 가벼워졌어! 이번에도 부품상자까지 나를 이동시켜줘. 그런데 가는길에 장애물이 있어. 장애물 앞에서는 jump()", + "maze_text_content_3": "멋진걸! 저기에도 부품이 있어! 길이 조금 꼬여있지만 오른쪽, 왼쪽으로 회전할 수 있는 right(); left() 명령어를 쓰면 충분히 갈 수 있을것 같아!", + "maze_text_content_4": "좋아 이제 움직이는 건 많이 편해졌어! 이번에는 지금까지 배운 명령어를 같이 써서 저 부품상자까지 가보자!", + "maze_text_content_5": "우와 부품이 두 개나 있잖아! 두 개 다 챙겨서 가자! 그러면 몸을 빨리 고칠 수 있을 것 같아!", + "maze_text_content_6": "이번이 마지막 부품들이야! 저것들만 있으면 내 몸을 다 고칠 수 있을 거야! 이번에도 도와줄 거지?", + "maze_text_content_7": "덕분에 몸이 아주 좋아졌어! 이제 똑같은 일을 여러 번 반복해도 무리는 없을 거야. 어? 그런데 앞에 있는 저 로봇은 뭐지? 뭔가 도움이 필요한 것 같아! 도와주자! for 명령어를 사용해서 저 친구한테 나를 데려다줘!", + "maze_text_content_8": "좋아! 덕분에 친구 로봇을 살릴 수 있었어! 하지만 앞에도 도움이 필요한 친구가 있네, 하지만 이번에는 벌집이 있으니까 조심해서 벌집에 안 닿게 뛰어넘어가자! 할 수 있겠지? 이번에도 for 명령어를 사용해서 친구가 있는곳까지 나를 이동시켜줘!", + "maze_text_content_9": "이번에는 for 명령어 대신 미션이 끝날때까지 같은 일을 반복하도록 하는 while 명령어를 사용해봐! 나를 친구에게 데려다주면 미션이 끝나!", + "maze_text_content_10": "이번에는 if 명령어가 나왔어! if와 while 명령어를 사용해서 내가 언제 어느 쪽으로 회전해야 하는지 알려줘!", + "maze_text_content_11": "좋아 아까 했던 것처럼 해볼까? 언제 왼쪽으로 돌아야 하는지 알려줄 수 있겠어?", + "maze_text_content_12": "이번에는 중간중간 벌집(bee)이 있네? 언제 뛰어넘어가야 할지 알려줄래?", + "maze_text_content_13": "여기저기 도움이 필요한 친구들이 많이 있네! 모두 가서 도와주자!", + "maze_text_content_14": "우와 이번에도 도와줘야 할 친구들이 많네. 먼저 조그마한 사각형을 돌도록 명령어를 만들고 만든 걸 반복해서 모든 친구를 구해보자.", + "maze_text_content_15": "오래 움직이다 보니 벌써 지쳐버렸어. 자주 쓰는 명령어를 function 명령어를 사용해서 함수로 만들어 놓았어! 함수를 사용하여 나를 배터리 까지 이동시켜줘!", + "maze_text_content_16": "좋아 멋진걸! 그럼 이번에는 함수에 들어갈 명령어들을 넣어서 나를 배터리까지 이동시켜줘!", + "maze_text_content_17": "좋아 이번에는 함수를 만들고, 함수를 사용해서 배터리를 얻을 수 있도록 도와줘! 함수를 만들때 jump();를 잘 섞어봐!", + "maze_text_content_18": "이번에는 길이 좀 복잡한걸? 그래도 언제 left();를 쓰고, 언제 right();를 쓰면 되는지 알려만 주면 배터리 까지 갈 수 있겠어!.", + "maze_text_content_19": "이번에는 함수가 미리 정해져 있어! 그런데 함수만 써서 배터리까지 가기 힘들것 같아. 함수와 다른 명령어들을 섞어 써서 배터리 까지 이동시켜줘!", + "maze_text_content_20": "좋아! 지금까지 정말 멋지게 잘 해줬어. 덕분에 이제 마지막 배터리만 채우면 앞으로는 충전이 필요 없을 거야. 함수를 이용해서 저 배터리를 얻고 내가 자유롭게 살 수 있도록 도와줘!", + "maze_content_1": "안녕 나는 엔트리봇이라고 해. 지금 나는 공장에서 탈출하려는데 먼저 몸을 고쳐야 할 것 같아. 앞에 있는 부품을 얻을 수 있게 도와줄래? 앞으로 가기 블록을 조립하고 시작을 눌러봐.", + "maze_content_2": "좋아 아주 잘했어! 덕분에 몸이 한결 가벼워졌어! 앞에도 부품이 있는데 이번에는 잘못 가다간 감전되기 쉬울 것 같아. 한 번 장애물 뛰어넘기 블록을 써서 부품까지 가볼까?", + "maze_content_3": "멋진걸! 저기에도 부품이 있어! 길이 조금 꼬여있지만 회전하기 블록을 쓰면 충분히 갈 수 있을 것 같아! 이번에도 도와줄 거지?", + "maze_content_4": "좋아 이제 움직이는 건 많이 편해졌어! 이번에는 회전과 뛰어넘기를 같이 써서 저 부품을 얻어보자!", + "maze_content_5": "우와 부품이 두 개나 있잖아! 두 개 다 챙겨서 가자! 그러면 몸을 빨리 고칠 수 있을 것 같아!", + "maze_content_6": "이번이 마지막 부품들이야! 저것들만 있으면 내 몸을 다 고칠 수 있을 거야! 이번에도 도와줄 거지?", + "maze_content_7": "덕분에 몸이 아주 좋아졌어! 이제 똑같은 일을 여러 번 반복해도 무리는 없을 거야. 어? 그런데 앞에 있는 저 로봇은 뭐지? 뭔가 도움이 필요한 것 같아! 도와주자! 얼른 반복하기의 숫자를 바꿔서 저 친구한테 나를 데려다줘!", + "maze_content_8": "좋아! 덕분에 친구 로봇을 살릴 수 있었어! 하지만 앞에도 도움이 필요한 친구가 있는 것 같아, 하지만 이번에는 벌집이 있으니까 조심해서 벌집에 안 닿게 뛰어넘어가자! 할 수 있겠지? 그럼 아까 했던 것처럼 반복을 써서 친구한테 갈 수 있게 해줄래?", + "maze_content_9": "이번에는 숫자만큼 반복하는 게 아니라 친구 로봇한테 갈 때까지 똑같은 일을 반복할 수 있어! 이번에도 친구를 구할 수 있도록 도와줘!", + "maze_content_10": "이번에는 만약 블록이란 게 있어! 만약 블록을 써서 언제 어느 쪽으로 돌아야 하는지 알려줘!", + "maze_content_11": "좋아 아까 했던 것처럼 해볼까? 언제 왼쪽으로 돌아야 하는지 알려줄 수 있겠어?", + "maze_content_12": "이번에는 중간중간 벌집이 있네? 언제 뛰어넘어가야 할지 알려줄래?", + "maze_content_13": "여기저기 도움이 필요한 친구들이 많이 있네! 모두 도와주자!", + "maze_content_14": "우와 이번에도 도와줘야 할 친구들이 많네. 먼저 조그마한 사각형을 돌도록 블록을 만들고 만든 걸 반복해서 모든 친구를 구해보자.", + "maze_content_15": "반복을 하도 많이 했더니 자주 쓰는 블록은 외울 수 있을 것 같아! 약속 블록은 지금 내가 외운 블록들이야! 일단은 오래 움직여서 지쳤으니까 배터리를 좀 채울 수 있게 약속 호출 블록을 써서 배터리를 채울 수 있게 해줘!", + "maze_content_16": "좋아 멋진걸! 그럼 이번에는 네가 자주 쓰일 블록을 나한테 가르쳐줘! 약속 정의 블록 안에 자주 쓰일 블록을 넣어보면 돼!", + "maze_content_17": "좋아 이번에도 그러면 약속을 이용해서 배터리를 얻을 수 있도록 도와줄 거지? 약속에 뛰어넘기를 잘 섞어봐!", + "maze_content_18": "이번에는 길이 좀 복잡한걸? 그래도 언제 왼쪽으로 돌고, 언제 오른쪽으로 돌면 되는지 알려만 주면 충전할 수 있을 것 같아.", + "maze_content_19": "이번에는 약속이 미리 정해져 있어! 그런데 바로 약속을 쓰기에는 안될 것 같아. 내가 갈 길을 보고 약속을 쓰면 배터리를 채울 수 있을 것 같은데 도와줄 거지?", + "maze_content_20": "좋아! 지금까지 정말 멋지게 잘 해줬어. 덕분에 이제 마지막 배터리만 채우면 앞으로는 충전이 필요 없을 거야. 그러니까 약속을 이용해서 저 배터리를 얻고 내가 자유롭게 살 수 있도록 도와줄래?", + "ai_content_1": "안녕? 나는 엔트리봇이라고 해. 우주 탐사를 마치고 지구로 돌아가려는데 우주를 떠다니는 돌들 때문에 쉽지 않네. 내가 안전하게 집에 갈 수 있도록 도와줄래? 나의 우주선에는 나의 앞과 위, 아래에 무엇이 어느 정도의 거리에 있는지 알려주는 레이더가 있어 너의 판단을 도와줄 거야!", + "ai_content_2": "고마워! 덕분에 돌을 쉽게 피할 수 있었어. 그런데 이번엔 더 많은 돌이 있잖아? 블록들을 조립하여 돌들을 이리저리 잘 피해 보자!", + "ai_content_3": "좋았어! 안전하게 돌을 피했어. 그런데 앞을 봐! 아까보다 더 많은 돌이 있어. 하지만 걱정하지 마. 나에게 반복하기 블록이 있거든. 반복하기 블록 안에 움직이는 블록을 넣으면 목적지에 도착할 때까지 계속 움직일게!", + "ai_content_4": "대단해! 반복하기 블록을 쓰니 많은 돌을 피하기가 훨씬 수월한걸! 하지만 이렇게 일일이 조종하기는 피곤하다. 나에겐 레이더가 있으니 앞으로 무엇이 나올지 알 수 있어. 앞으로 계속 가다가 앞에 돌이 있으면 피할 수 있도록 해줄래?", + "ai_content_5": "잘했어! 여기까지 와서 아주 기뻐. 이번에는 레이더가 앞에 있는 물체까지의 거리를 말해줄 거야. 이 기능을 사용하여 돌을 피해 보자! 돌까지의 거리가 멀 때는 앞으로 계속 가다가, 거리가 가까워지면 피할 수 있도록 해줄래?", + "ai_content_6": "와~ 멋진걸? 레이더를 활용하여 돌을 잘 피해 나가고 있어! 이번에는 여러 개의 레이더를 사용하여 이리저리 돌들을 피해 나갈 수 있게 만들어줄래?", + "ai_content_7": "휴~ 지구에 점점 가까워지고 있어! 돌을 피할 때 기왕이면 더 안전한 길로 가고 싶어! 아마도 돌이 더 멀리 있는 쪽이 더 안전한 길이겠지? 위쪽 레이더와 아래쪽 레이더를 비교하여 더 안전한 쪽으로 움직이도록 해줄래?", + "ai_content_8": "좋아! 덕분에 무사히 비행하고 있어. 어? 그런데 저게 뭐지? 저건 내가 아주 위급한 상황에서 사용할 수 있는 특별한 에너지야! 이번에는 저 아이템들을 모두 모으며 움직이자!", + "ai_content_9": "훌륭해! 이제 지구까지 얼마 안 남았어. 그런데 앞을 보니 돌들로 길이 꽉 막혀서 지나갈 수가 없잖아? 하지만 걱정하지 마. 아이템을 획득해서 사용하면 앞에 있는 꽉 막힌 돌들을 없앨 수 있다고!", + "ai_content_10": "좋아! 드디어 저기 지구가 보여! 이럴 수가! 이제는 날아오는 돌들을 미리 볼 수가 없잖아? 돌들이 어떻게 날아올지 알지 못해도 지금까지처럼만 움직이면 잘 피할 수 있을 것 같아! 지구까지 가보는 거야!", + "maze_hints_title_1": "시작 방법", + "maze_hints_content_1": "엔트리봇은 어떻게 움직이나요?", + "maze_hints_detail_1": "1. 블록 꾸러미에서 원하는 블록을 꺼내어 “시작하기를 클릭했을 때” 블록과 연결해봐
2. 다 조립했으면, 시작을 눌러봐
3. 나는 네가 조립한 블록대로 위에서부터 순서대로 움직일게", + "maze_hints_title_2": "장애물 뛰어넘기", + "maze_hints_content_2": "장애물이 있으면 어떻게 해야하나요?", + "maze_hints_detail_2": "길을 가다보면 장애물을 만날 수 있어.
장애물이 앞에 있을 때에는 뛰어넘기 블록을 사용해야 해.", + "maze_hints_title_3": "반복 블록(1)", + "maze_hints_content_3": "(3)회 반복하기 블록은 어떻게 사용하나요?", + "maze_hints_detail_3": "같은 행동을 여러번 반복하려면 ~번 반복하기 블록을 사용해야 해.
반복하고 싶은 블록들을 ~번 반복하기 안에 넣고 반복 횟수를 입력하면 돼.", + "maze_hints_title_4": "반복 블록(2)", + "maze_hints_content_4": "~를 만날 때 까지 반복하기 블록은 어떻게 사용하나요?", + "maze_hints_detail_4": "~까지 반복하기'를 사용하면 같은 행동을 언제까지 반복할지를 정해줄 수 있어.
반복하고 싶은 블록들을 ~까지 반복하기안에 넣으면 돼.
그러면 {이미지}와 같은 타일 위에 있는 경우 반복이 멈추게 될 거야.", + "maze_hints_title_5": "만약 블록", + "maze_hints_content_5": "만약 ~라면 블록은 어떻게 동작하나요?", + "maze_hints_detail_5": "만약 앞에 {이미지}가 있다면' 블록을 사용하면 앞에 {이미지}가 있을 때 어떤 행동을 할 지 정해줄 수 있어.
앞에 {이미지}가 있을 때에만 블록 안의 블록들을 실행하고
그렇지 않으면 실행하지 않게 되는 거야.", + "maze_hints_title_6": "반복 블록(3)", + "maze_hints_content_6": "모든 ~를 만날 때 까지 블록은 어떻게 동작하나요?", + "maze_hints_detail_6": "모든 {타일}에 한 번씩 도착할 때까지 그 안에 있는 블록을 반복해서 실행해.
모든 {타일}에 한 번씩 도착하면 반복이 멈추게 될 거야.", + "maze_hints_title_7": "특별 힌트", + "maze_hints_content_7": "너무 어려워요. 도와주세요.", + "maze_hints_detail_7": "내가 가야하는 길을 자세히 봐. 작은 사각형 4개가 보여?
작은 사각형을 도는 블록을 만들고, 반복하기를 사용해 보는것은 어때?", + "maze_hints_title_8": "약속", + "maze_hints_content_8": "약속하기/약속 불러오기 무엇인가요? 어떻게 사용하나요?", + "maze_hints_detail_8": "나를 움직이기 위해 자주 쓰는 블록들의 묶음을 '약속하기' 블록 아래에 조립하여 약속으로 만들 수 있어.
한번 만들어 놓은 약속은 '약속 불러오기' 블록을 사용하여 여러 번 꺼내 쓸 수 있다구.", + "ai_hints_title_1_1": "게임의 목표", + "ai_hints_content_1_1": "돌을 피해 오른쪽 행성까지 안전하게 이동할 수 있도록 도와주세요.", + "ai_hints_detail_1_1": "돌을 피해 오른쪽 행성까지 안전하게 이동할 수 있도록 도와주세요.", + "ai_hints_title_1_2": "시작 방법", + "ai_hints_content_1_2": "어떻게 시작할 수 있나요?", + "ai_hints_detail_1_2": "1. 블록 꾸러미에서 원하는 블록을 꺼내어 “시작하기를 클릭했을 때” 블록과 연결해봐
2. 다 조립했으면, 시작을 눌러봐
3. 나는 네가 조립한 블록대로 위에서부터 순서대로 움직일게", + "ai_hints_title_1_3": "움직이게 하기", + "ai_hints_content_1_3": "엔트리봇은 어떻게 움직이나요?", + "ai_hints_detail_1_3": "나는 위쪽으로 가거나 앞으로 가거나 아래쪽으로 갈 수 있어.
방향을 정할 때에는 돌이 없는 방향으로 안전하게 갈 수 있도록 해줘.
나를 화면 밖으로 내보내면 우주미아가 되어버리니 조심해!", + "ai_hints_title_2_1": "게임의 목표", + "ai_hints_content_2_1": "반복하기 블록으로 돌들을 피할 수 있도록 도와주세요.", + "ai_hints_detail_2_1": "반복하기 블록으로 돌들을 피할 수 있도록 도와주세요.", + "ai_hints_title_2_2": "반복 블록", + "ai_hints_content_2_2": "반복 블록은 무슨 블록인가요?", + "ai_hints_detail_2_2": "휴~ 이번에 가야 할 길은 너무 멀어서 하나씩 조립하기는 힘들겠는걸? 반복하기블록을 사용해봐.
똑같이 반복되는 블록들을 반복하기 블록으로 묶어주면 아주 긴 블록을 짧게 줄여줄 수 있어!", + "ai_hints_content_3_1": "만약 블록으로 돌을 피할 수 있도록 도와주세요.", + "ai_hints_title_3_2": "만약 블록(1)", + "ai_hints_content_3_2": "만약 ~라면 블록은 어떻게 동작하나요?", + "ai_hints_detail_3_2": "만약 앞에 ~가 있다면 / 아니면 블록을 사용하면 내 바로 앞에 돌이 있는지 없는지 확인해서 다르게 움직일 수 있어~
만약 내 바로 앞에 돌이 있다면 '만약' 아래에 있는 블록들을 실행하고 돌이 없으면 '아니면' 안에 있는 블록들을 실행할 거야.
내 바로 앞에 돌이 있을 때와 없을 때, 어떻게 움직일지 잘 결정해줘~", + "ai_hints_content_4_1": "레이더의 사용 방법을 익히고 돌을 피해보세요.", + "ai_hints_detail_4_1": "레이더의 사용 방법을 익히고 돌을 피해보세요.", + "ai_hints_title_4_2": "레이더(1)", + "ai_hints_content_4_2": "레이더란 무엇인가요? 어떻게 활용할 수 있나요?", + "ai_hints_detail_4_2": "레이더는 지금 내가 물체와 얼마나 떨어져 있는지 알려주는 기계야.
만약 바로 내 앞에 무엇인가 있다면 앞쪽 레이더는 '1'을 보여줘.
또, 레이더는 혼자 있을 때 보다 만약 <사실>이라면 / 아니면 블록과
같이 쓰이면 아주 강력하게 쓸 수 있어.
예를 들어 내 앞에 물체와의 거리가 1보다 크다면 나는 안전하게 앞으로 갈 수 있겠지만, 아니라면 위나 아래쪽으로 피하도록 할 수 있지.", + "ai_hints_title_4_3": "만약 블록(2)", + "ai_hints_content_4_3": "만약 <사실>이라면 블록은 어떻게 사용하나요?", + "ai_hints_detail_4_3": "만약 <사실>이라면 / 아니면 블록은 <사실> 안에 있는 내용이 맞으면 '만약' 아래에 있는 블록을 실행하고, 아니면 '아니면' 아래에 있는 블록을 실행해.
어떤 상황에서 다르게 움직이고 싶은 지를 잘 생각해서 <사실> 안에 적절한 판단 조건을 만들어 넣어봐.
판단 조건을 만족해서 '만약' 아래에 있는 블록을 실행하고 나면 '아니면' 아래에 있는 블록들은 실행되지 않는다는 걸 기억해!", + "ai_hints_content_5_1": "레이더를 활용해 돌을 쉽게 피할 수 있도록 도와주세요.", + "ai_hints_detail_5_1": "레이더를 활용해 돌을 쉽게 피할 수 있도록 도와주세요.", + "ai_hints_title_5_2": "만약 블록(3)", + "ai_hints_content_5_2": "만약 블록이 겹쳐져 있으면 어떻게 동작하나요?", + "ai_hints_detail_5_2": "만약 ~ / 아니면 블록안에도 만약 ~ / 아니면 블록을 넣을 수 있어! 이렇게 되면 다양한 상황에서 내가 어떻게 행동해야 할지 정할 수 있어.
예를 들어 앞에 돌이 길을 막고 있을때와 없을때의 행동을 정한다음, 돌이 있을때의 상황에서도 상황에 따라 위쪽으로 갈지 아래쪽으로 갈지 선택 할 수 있어", + "ai_hints_title_6_1": "레이더(2)", + "ai_hints_content_6_1": "위쪽 레이더와 아래쪽 레이더의 값을 비교하고 싶을 땐 어떻게 하나요?", + "ai_hints_detail_6_1": "([위쪽]레이더) 블록은 위쪽 물체까지의 거리를 뜻하는 블록이야.
아래쪽과 위쪽 중에서 어느 쪽에 돌이 더 멀리 있는지 확인하기 위해서 쓸 수 있는 블록이지.
돌을 피해가는 길을 선택할 때에는 돌이 멀리 떨어져 있는 쪽으로 피하는게 앞으로 멀리 가는데 유리할거야~", + "ai_hints_content_7_1": "아이템을 향해 이동하여 돌을 피해보세요.", + "ai_hints_detail_7_1": "아이템을 향해 이동하여 돌을 피해보세요.", + "ai_hints_title_7_2": "물체 이름 확인", + "ai_hints_content_7_2": "앞으로 만날 물체의 이름을 확인해서 무엇을 할 수 있나요?", + "ai_hints_detail_7_2": "아이템을 얻기위해서는 아이템이 어디에 있는지 확인할 필요가 있어.
그럴 때 사용할 수 있는 블록이 [위쪽] 물체는 [아이템]인가? 블록이야.
이 블록을 활용하면 아이템이 어느 위치에 있는지 알 수 있고 아이템이 있는 방향으로 움직이도록 블록을 조립할 수 있어.", + "ai_hints_content_8_1": "아이템을 적절하게 사용해서 돌을 피해보세요.", + "ai_hints_detail_8_1": "아이템을 적절하게 사용해서 돌을 피해보세요.", + "ai_hints_title_8_2": "아이템", + "ai_hints_content_8_2": "아이템은 어떻게 얻고 사용하나요?", + "ai_hints_detail_8_2": "돌들을 이리저리 잘 피해 나가더라도 앞이 모두 돌들로 꽉 막혀있을 땐 빠져나갈 방법이 없겠지? 그럴 때에는 아이템사용 블럭을 사용해봐.
이 블록은 내 앞의 돌들을 모두 없애는 블록이야.
단, 아이템이 있어야지만 블록을 사용할 수 있고, 아이템은 이미지를 지나면 얻을 수 있어.", + "ai_hints_content_9_1": "지금까지 배운 것들을 모두 활용해서 최대한 멀리 가보세요.", + "ai_hints_detail_9_1": "지금까지 배운 것들을 모두 활용해서 최대한 멀리 가보세요.", + "ai_hints_title_9_2": "그리고", + "ai_hints_content_9_2": "그리고 블록은 어떻게 사용하나요?", + "ai_hints_detail_9_2": "그리고 블록에는 여러개의 조건을 넣을 수 있어, 넣은 모든 조건이 사실일때만 사실이 되어 만약 블록 안에 있는 블록이 실행되고, 하나라도 거짓이 있으면 거짓으로 인식해서 그 안에 있는 블록을 실행하지 않아", + "maze_text_goal_1": "move(); 명령어를 사용하여 부품 상자까지 나를 이동시켜줘!", + "maze_text_goal_2": "jump(); 명령어로 장애물을 피해 부품 상자까지 나를 이동시켜줘!", + "maze_text_goal_3": "left(); right(); 명령어로 부품상자까지 나를 이동시켜줘!", + "maze_text_goal_4": "여러가지 명령어를 사용하여 부품상자까지 나를 이동시켜줘!", + "maze_text_goal_5": "두 부품상자에 다 갈 수 있도록 나를 이동시켜줘!", + "maze_text_goal_6": "두 부품상자에 다 갈 수 있도록 나를 이동시켜줘!", + "maze_text_goal_7": "for 명령어를 사용하여 친구가 있는 곳 까지 나를 이동시켜줘!", + "maze_text_goal_8": "for 명령어를 사용하고, 장애물을 피해 친구가 있는 곳 까지 나를 이동시켜줘!", + "maze_text_goal_9": "while 명령어를 사용하여 친구가 있는 곳 까지 나를 이동시켜줘!", + "maze_text_goal_10": "if와 while 명령어를 사용하여 친구가 있는 곳 까지 나를 이동시켜줘!", + "maze_text_goal_11": "if와 while 명령어를 사용하여 친구가 있는 곳 까지 나를 이동시켜줘!", + "maze_text_goal_12": "if와 while 명령어를 사용하여 친구가 있는 곳 까지 나를 이동시켜줘!", + "maze_text_goal_13": "while과 for 명령어를 사용하여 모든 친구들을 만날 수 있도록 나를 이동시켜줘!", + "maze_text_goal_14": "while과 for 명령어를 사용하여 모든 친구들을 만날 수 있도록 나를 이동시켜줘!", + "maze_text_goal_15": "함수를 불러와서 배터리까지 나를 이동시켜줘!", + "maze_text_goal_16": "함수에 명령어를 넣고 함수를 불러와서 배터리까지 나를 이동시켜줘!", + "maze_text_goal_17": "함수에 명령어를 넣고 함수를 불러와서 배터리까지 나를 이동시켜줘!", + "maze_text_goal_18": "함수에 명령어를 넣고 함수를 불러와서 배터리까지 나를 이동시켜줘!", + "maze_text_goal_19": "함수에 명령어를 넣고 함수를 불러와서 배터리까지 나를 이동시켜줘!", + "maze_text_goal_20": "함수와 다른명령어들을 섞어 사용하여 배터리까지 나를 이동시켜줘!", + "above_radar": "위쪽 레이더", + "bottom_radar": "아래쪽 레이더", + "front_radar": "앞쪽 레이더", + "above_object": "위쪽 물체", + "front_object": "앞쪽 물체", + "object_below": "아래쪽 물체", + "destination": "목적지", + "asteroids": "돌", + "item": "아이템", + "wall": "벽", + "buy_now": "구매바로가기", + "goals": "목표", + "instructions": "이용 안내", + "object_info": "오브젝트 정보", + "entry_basic_mission": "엔트리 기본 미션", + "entry_application_mission": "엔트리 응용 미션", + "maze_move_forward": "앞으로 한 칸 이동", + "maze_when_run": "시작하기를 클릭했을때", + "maze_turn_left": "왼쪽으로 회전", + "maze_turn_right": "오른쪽으로 회전", + "maze_repeat_times_1": "", + "maze_repeat_times_2": "번 반복하기", + "maze_repeat_until_1": "", + "maze_repeat_until_2": "을 만날때까지 반복", + "maze_call_function": "약속 불러오기", + "maze_function": "약속하기", + "maze_repeat_until_all_1": "모든", + "maze_repeat_until_all_2": "만날 때 까지 반복", + "command_guide": "명령어 도움말", + "ai_success_msg_1": "덕분에 무사히 지구에 도착할 수 있었어! 고마워!", + "ai_success_msg_2": "다행이야! 덕분에", + "ai_success_msg_3": "번 만큼 앞쪽으로 갈 수 있어서 지구에 구조 신호를 보냈어! 이제 지구에서 구조대가 올거야! 고마워!", + "ai_success_msg_4": "좋았어!", + "ai_cause_msg_1": "이런, 어떻게 움직여야 할 지 더 말해줄래?", + "ai_cause_msg_2": "아이쿠! 정말로 위험했어! 다시 도전해보자", + "ai_cause_msg_3": "우와왓! 가야할 길에서 벗어나버리면 우주 미아가 되버릴꺼야. 다시 도전해보자", + "ai_cause_msg_4": "너무 복잡해, 이 블록을 써서 움직여볼래?", + "ai_move_forward": "앞으로 가기", + "ai_move_above": "위쪽으로 가기", + "ai_move_under": "아래쪽으로 가기", + "ai_repeat_until_dest": "목적지에 도달 할 때까지 반복하기", + "ai_if_front_1": "만약 앞에", + "ai_if_front_2": "가 있다면", + "ai_else": "아니면", + "ai_if_1": "만약", + "ai_if_2": "이라면", + "ai_use_item": "아이템 사용", + "ai_radar": "레이더", + "ai_above": "위쪽", + "ai_front": "앞쪽", + "ai_under": "아래쪽", + "ai_object_is_1": "", + "ai_object_is_2": "물체는", + "challengeMission": "다른 미션 도전하기", + "withTeacher": "함께 만든 선생님들", + "host": "주최", + "support": "후원", + "subjectivity": "주관", + "learnMore": " 더 배우고 싶어요", + "ai_object_is_3": "인가?", + "stage_is_not_available": "아직 진행할 수 없는 스테이지입니다. 순서대로 스테이지를 진행해 주세요.", + "progress_not_saved": "진행상황이 저장되지 않습니다.", + "want_refresh": "이 페이지를 새로고침 하시겠습니까?", + "monthly_entry_grade": "초등학교 3학년 ~ 중학교 3학년", + "monthly_entry_contents": "매월 발간되는 월간엔트리와 함께 소프트웨어 교육을 시작해 보세요! 차근차근 따라하며 쉽게 익힐 수 있도록 가볍게 구성되어있습니다. 기본, 응용 콘텐츠와 더 나아가기까지! 매월 업데이트되는 8개의 콘텐츠와 교재를 만나보세요~", + "monthly_entry_etc1": "*메인 페이지의 월간 엔트리 추천코스를 활용하면 더욱 쉽게 수업을 할 수 있습니다.", + "monthly_entry_etc2": "*월간엔트리는 학기 중에만 발간됩니다.", + "group_make_lecture_1": "내가 만든 강의가 없습니다.", + "group_make_lecture_2": "'학습하기>오픈 강의> 강의'에서", + "group_make_lecture_3": "우리반 학습내용에 추가하고 싶은 강의를 만들어 주세요.", + "group_make_lecture_4": "강의 만들기", + "group_add_lecture_1": "관심 강의가 없습니다.", + "group_add_lecture_2": "'학습하기>오픈 강의> 강의'에서 우리반 학습내용에", + "group_add_lecture_3": "추가하고 싶은 강의를 관심강의로 등록해 주세요.", + "group_add_lecture_4": "강의 보기", + "group_make_course_1": "내가 만든 코스가 없습니다.", + "group_make_course_2": "'학습하기 > 오픈 강의 > 코스 만들기'에서", + "group_make_course_3": "우리반 학습내용에 추가하고 싶은 코스를 만들어 주세요.", + "group_make_course_4": "코스 만들기", + "group_add_course_1": "관심 코스가 없습니다.", + "group_add_course_2": "'학습하기 > 오픈 강의 > 코스'에서 우리반 학습내용에", + "group_add_course_3": "추가하고 싶은 코스를 관심코스로 등록해 주세요.", + "group_add_course_4": "코스 보기" +}; +Lang.Msgs = { + "auth_only": "인증된 사용자만 이용이 가능합니다.", + "runtime_error": "실행 오류", + "to_be_continue": "준비 중입니다.", + "warn": "경고", + "error_occured": "다시 한번 시도해 주세요. 만약 같은 문제가 다시 발생 하면 '제안 및 건의' 게시판에 문의 바랍니다. ", + "list_can_not_space": "리스트의 이름은 빈 칸이 될 수 없습니다.", + "sign_can_not_space": "신호의 이름은 빈 칸이 될 수 없습니다.", + "variable_can_not_space": "변수의 이름은 빈 칸이 될 수 없습니다." +}; +Lang.Users = { + "auth_failed": "인증에 실패하였습니다", + "birth_year": "태어난 해", + "birth_year_before_1990": "1990년 이전", + "edit_personal": "정보수정", + "email": "이메일", + "email_desc": "새 소식이나 정보를 받을 수 있 이메일 주소", + "email_inuse": "이미 등록된 메일주소 입니다", + "email_match": "이메일 주소를 올바르게 입력해 주세요", + "forgot_password": "암호를 잊으셨습니까?", + "job": "직업", + "language": "언어", + "name": "이름", + "name_desc": "사이트내에서 표현될 이름 또는 별명", + "name_not_empty": "이름을 반드시 입력하세요", + "password": "암호", + "password_desc": "최소 4자이상 영문자와 숫자, 특수문자", + "password_invalid": "암호가 틀렸습니다", + "password_long": "암호는 4~20자 사이의 영문자와 숫자, 특수문자로 입력해 주세요", + "password_required": "암호는 필수입력 항목입니다", + "project_list": "작품 조회", + "regist": "가입 완료", + "rememberme": "자동 로그인", + "repeat_password": "암호 확인", + "repeat_password_desc": "암호를 한번더 입력해 주세요", + "repeat_password_not_match": "암호가 일치하지 않습니다", + "sex": "성별", + "signup_required_for_save": "저장을 하려면 로그인이 필요합니다.", + "username": "아이디", + "username_desc": "로그인시 사용할 아이디", + "username_inuse": "이미 사용중인 아이디 입니다", + "username_long": "아이디는 4~20자 사이의 영문자로 입력해 주세요", + "username_unknown": "존재하지 않는 사용자 입니다" +}; +Lang.Workspace = { + "new_project": "새 프로젝트", + "add_object": "오브젝트 추가하기", + "all": "전체", + "animal": "동물", + "arduino_entry": "아두이노 연결 프로그램", + "arduino_program": "아두이노 프로그램", + "arduino_sample": "엔트리 연결블록", + "arduino_driver": "아두이노 드라이버", + "cannot_add_object": "실행중에는 오브젝트를 추가할 수 없습니다.", + "cannot_add_picture": "실행중에는 모양을 추가할 수 없습니다.", + "cannot_add_sound": "실행중에는 소리를 추가할 수 없습니다.", + "cannot_edit_click_to_stop": "실행중에는 수정할 수 없습니다.\n클릭하여 정지하기.", + "cannot_open_private_project": "비공개 작품은 불러올 수 없습니다. 홈으로 이동합니다.", + "cannot_save_running_project": "실행 중에는 저장할 수 없습니다.", + "character_gen": "캐릭터 만들기", + "check_runtime_error": "빨간색으로 표시된 블록을 확인해 주세요.", + "context_download": "PC에 저장", + "context_duplicate": "복제", + "context_remove": "삭제", + "context_rename": "이름 수정", + "coordinate": "좌표", + "create_function": "함수 만들기", + "direction": "이동 방향", + "drawing": "직접 그리기", + "enter_list_name": "새로운 리스트의 이름을 입력하세요(10글자 이하)", + "enter_name": "새로운 이름을 입력하세요", + "enter_new_message": "새로운 신호의 이름을 입력하세요.", + "enter_variable_name": "새로운 변수의 이름을 입력하세요(10글자 이하)", + "family": "엔트리봇 가족", + "fantasy": "판타지/기타", + "file_new": "새로 만들기", + "file_open": "온라인 작품 불러오기", + "file_upload": "오프라인 작품 불러오기", + "file_upload_login_check_msg": "오프라인 작품을 불러오기 위해서는 로그인을 해야 합니다.", + "file_save": "저장하기", + "file_save_as": "복사본으로 저장하기", + "file_save_download": "내 컴퓨터에 저장하기", + "func": "함수", + "function_create": "함수 추가", + "interface": "인터페이스", + "landscape": "배경", + "list": "리스트", + "list_add_calcel": "리스트 추가 취소", + "list_add_calcel_msg": "리스트 추가를 취소하였습니다.", + "list_add_fail": "리스트 추가 실패", + "list_add_fail_msg1": "같은 이름의 리스트가 이미 존재합니다.", + "list_add_fail_msg2": "리스트의 이름이 적절하지 않습니다.", + "list_add_ok": "리스트 추가 완료", + "list_add_ok_msg": "을(를) 추가하였습니다.", + "list_create": "리스트 추가", + "list_dup": "같은 이름의 리스트가 이미 존재합니다.", + "list_newname": "새로운 이름", + "list_remove": "리스트 삭제", + "list_rename": "리스트 이름 변경", + "list_rename_failed": "리스트 이름 변경 실패", + "list_rename_ok": "리스트의 이름이 성공적으로 변경 되었습니다.", + "list_too_long": "리스트의 이름이 너무 깁니다.", + "message": "신호", + "message_add_cancel": "신호 추가 취소", + "message_add_cancel_msg": "신호 추가를 취소하였습니다.", + "message_add_fail": "신호 추가 실패", + "message_add_fail_msg": "같은 이름의 신호가 이미 존재합니다.", + "message_add_ok": "신호 추가 완료", + "message_add_ok_msg": "을(를) 추가하였습니다.", + "message_create": "신호 추가", + "message_dup": "같은 이름의 신호가 이미 존재합니다.", + "message_remove": "신호 삭제", + "message_remove_canceled": "신호 삭제를 취소하였습니다.", + "message_rename": "신호 이름을 변경하였습니다.", + "message_rename_failed": "신호 이름 변경에 실패하였습니다. ", + "message_rename_ok": "신호의 이름이 성공적으로 변경 되었습니다.", + "message_too_long": "신호의 이름이 너무 깁니다.", + "no_message_to_remove": "삭제할 신호가 없습니다", + "no_use": "사용되지 않음", + "no_variable_to_remove": "삭제할 변수가 없습니다.", + "no_variable_to_rename": "변경할 변수가 없습니다.", + "object_not_found": "블록에서 지정한 오브젝트가 존재하지 않습니다.", + "object_not_found_for_paste": "붙여넣기 할 오브젝트가 없습니다.", + "people": "일반 사람들", + "picture_add": "모양 추가", + "plant": "식물", + "project": "작품", + "project_copied": "의 사본", + "PROJECTDEFAULTNAME": ['멋진', '재밌는', '착한', '큰', '대단한', '잘생긴', '행운의'], + "remove_object": "오브젝트 삭제", + "remove_object_msg": "(이)가 삭제되었습니다.", + "removed_msg": "(이)가 성공적으로 삭제 되었습니다.", + "rotate_method": "회전방식", + "rotation": "방향", + "run": "시작하기", + "saved": "저장완료", + "saved_msg": "(이)가 저장되었습니다.", + "save_failed": "저장시 문제가 발생하였습니다. 다시 시도해 주세요.", + "select_library": "라이브러리 선택", + "select_sprite": "적용할 스프라이트를 하나 이상 선택하세요.", + "shape_remove_fail": "모양 삭제 실패", + "shape_remove_fail_msg": "적어도 하나 이상의 모양이 존재하여야 합니다.", + "shape_remove_ok": "모양이 삭제 되었습니다. ", + "shape_remove_ok_msg": "이(가) 삭제 되었습니다.", + "sound_add": "소리 추가", + "sound_remove_fail": "소리 삭제 실패", + "sound_remove_ok": "소리 삭제 완료", + "sound_remove_ok_msg": "이(가) 삭제 되었습니다.", + "stop": "정지하기", + "pause": "일시정지", + "restart": "다시시작", + "speed": "속도 조절하기", + "tab_attribute": "속성", + "tab_code": "블록", + "tab_picture": "모양", + "tab_sound": "소리", + "tab_text": "글상자", + "textbox": "글상자", + "textbox_edit": "글상자 편집", + "textbox_input": "글상자의 내용을 입력해주세요.", + "things": "물건", + "upload": "파일 업로드", + "upload_addfile": "파일추가", + "variable": "변수", + "variable_add_calcel": "변수 추가 취소", + "variable_add_calcel_msg": "변수 추가를 취소하였습니다.", + "variable_add_fail": "변수 추가 실패", + "variable_add_fail_msg1": "같은 이름의 변수가 이미 존재합니다.", + "variable_add_fail_msg2": "변수의 이름이 적절하지 않습니다.", + "variable_add_ok": "변수 추가 완료", + "variable_add_ok_msg": "을(를) 추가하였습니다.", + "variable_create": "변수 추가", + "variable_dup": "같은 이름의 변수가 이미 존재합니다.", + "variable_newname": "새로운 이름", + "variable_remove": "변수 삭제", + "variable_remove_canceled": "변수 삭제를 취소하였습니다.", + "variable_rename": "변수 이름을 변경합니다. ", + "variable_rename_failed": "변수 이름 변경에 실패하였습니다. ", + "variable_rename_msg": "'변수의 이름이 성공적으로 변경 되었습니다.'", + "variable_rename_ok": "변수의 이름이 성공적으로 변경 되었습니다.", + "variable_select": "변수를 선택하세요", + "variable_too_long": "변수의 이름이 너무 깁니다.", + "vehicle": "탈것", + "add_object_alert_msg": "오브젝트를 추가해주세요", + "add_object_alert": "경고", + "create_variable_block": "변수 만들기", + "create_list_block": "리스트 만들기", + "Variable_Timer": "초시계", + "Variable_placeholder_name": "변수 이름", + "Variable_use_all_objects": "모든 오브젝트에서 사용", + "Variable_use_this_object": "이 오브젝트에서 사용", + "Variable_used_at_all_objects": "모든 오브젝트에서 사용되는 변수", + "Variable_create_cloud": "공유 변수로 사용
(서버에 저장됩니다)", + "Variable_used_at_special_object": "특정 오브젝트에서만 사용되는 변수 입니다. ", + "draw_new": "새로 그리기", + "painter_file": "파일 ▼", + "painter_file_save": "저장하기", + "painter_file_saveas": "새 모양으로 저장", + "painter_edit": "편집 ▼", + "get_file": "가져오기", + "copy_file": "복사하기", + "cut_picture": "자르기", + "paste_picture": "붙이기", + "remove_all": "모두 지우기", + "new_picture": "새그림", + "picture_size": "크기", + "picture_rotation": "회전", + "thickness": "굵기", + "textStyle": "글자", + "add_picture": "모양 추가", + "select_picture": "모양 선택", + "select_sound": "소리 선택", + "Size": "크기", + "show_variable": "변수 보이기", + "default_value": "기본값 ", + "slide": "슬라이드", + "min_value": "최솟값", + "max_value": "최댓값", + "number_of_list": "리스트 항목 수", + "use_all_objects": "모든 오브젝트에 사용", + "list_name": "리스트 이름", + "list_used_specific_objects": "특정 오브젝트에서만 사용되는 리스트 입니다. ", + "List_used_all_objects": "모든 오브젝트에서 사용되는 리스트", + "Scene_delete_error": "장면은 최소 하나 이상 존재해야 합니다.", + "Scene_add_error": "장면은 최대 10개까지 추가 가능합니다.", + "replica_of_object": "의 복제본", + "will_you_delete_scene": "장면은 한번 삭제하면 취소가 불가능 합니다. \n정말 삭제 하시겠습니까?", + "duplicate_scene": "복제하기", + "block_explain": "블록 설명 ", + "block_intro": "블록을 클릭하면 블록에 대한 설명이 나타납니다.", + "blocks_reference": "블록 설명", + "hardware_guide": "하드웨어 연결 안내", + "show_list_workspace": "리스트 보이기", + "List_create_cloud": "공유 리스트로 사용
(서버에 저장됩니다)", + "confirm_quit": "바꾼 내용을 저장하지 않았습니다.", + "confirm_load_temporary": "저장되지 않은 작품이 있습니다. 여시겠습니까?", + "login_to_save": "로그인후에 저장 바랍니다.", + "cannot_save_in_edit_func": "함수 편집중에는 저장할 수 없습니다.", + "new_object": "새 오브젝트", + "arduino_connect": "하드웨어 연결", + "arduino_connect_success": "하드웨어가 연결되었습니다.", + "confirm_load_header": "작품 복구", + "uploading_msg": "업로드 중입니다", + "upload_fail_msg": "업로드에 실패하였습니다.
다시 한번 시도해주세요.", + "file_converting_msg": "파일 변환 중입니다.", + "file_converting_fail_msg": "파일 변환에 실패하였습니다.", + "fail_contact_msg": "문제가 계속된다면
contact_entry@entrylabs.org로 문의해주세요.", + "saving_msg": "저장 중입니다", + "saving_fail_msg": "저장에 실패하였습니다.
다시 한번 시도해주세요.", + "loading_msg": "불러오는 중입니다", + "loading_fail_msg": "불러오기에 실패하였습니다.
다시 한번 시도해주세요.", + "restore_project_msg": "정상적으로 저장되지 않은 작품이 있습니다. 해당 작품을 복구하시겠습니까?", + "quit_stop_msg": "저장 중에는 종료하실 수 없습니다.", + "ent_drag_and_drop": "업로드 하려면 파일을 놓으세요", + "not_supported_file_msg": "지원하지 않은 형식의 파일입니다.", + "broken_file_msg": "파일이 깨졌거나 잘못된 파일을 불러왔습니다.", + "check_audio_msg": "MP3, WAV 파일만 업로드가 가능합니다." +}; +Lang.code = "코드보기"; +Lang.EntryStatic = { + "lecture_is_open_true": "공개", + "lecture_is_open_false": "비공개", + "category_all": "모든 작품", + "category_game": "게임", + "category_animation": "애니메이션", + "category_media_art": "미디어 아트", + "category_physical": "피지컬", + "category_etc": "기타", + "lecture_required_time_1": " ~ 15분", + "lecture_required_time_2": "15분 ~ 30분", + "lecture_required_time_3": "30분 ~ 45분", + "lecture_required_time_4": "45 분 ~ 60분", + "lecture_required_time_5": "1시간 이상", + "usage_event": "이벤트", + "usage_signal": "신호보내기", + "usage_scene": "장면", + "usage_repeat": "반복", + "usage_condition_repeat": "조건반복", + "usage_condition": "조건", + "usage_clone": "복제본", + "usage_rotation": "회전", + "usage_coordinate": "좌표이동", + "usage_arrow_move": "화살표이동", + "usage_shape": "모양", + "usage_speak": "말하기", + "usage_picture_effect": "그림효과", + "usage_textBox": "글상자", + "usage_draw": "그리기", + "usage_sound": "소리", + "usage_confirm": "확인", + "usage_comp_operation": "비교연산", + "usage_logical_operation": "논리연산", + "usage_math_operation": "수리연산", + "usage_random": "무작위수", + "usage_timer": "초시계", + "usage_variable": "변수", + "usage_list": "리스트", + "usage_ask_answer": "묻고답하기", + "usage_function": "함수", + "usage_arduino": "아두이노", + "concept_resource_analytics": "자료수집/분석/표현", + "concept_procedual": "알고리즘과 절차", + "concept_abstractive": "추상화", + "concept_individual": "문제분해", + "concept_automation": "자동화", + "concept_simulation": "시뮬레이션", + "concept_parallel": "병렬화", + "subject_korean": "국어", + "subject_english": "영어", + "subject_mathmatics": "수학", + "subject_social": "사회", + "subject_science": "과학", + "subject_music": "음악", + "subject_paint": "미술", + "subject_athletic": "체육", + "subject_courtesy": "도덕", + "subject_progmatic": "실과", + "lecture_grade_1": "초1", + "lecture_grade_2": "초2", + "lecture_grade_3": "초3", + "lecture_grade_4": "초4", + "lecture_grade_5": "초5", + "lecture_grade_6": "초6", + "lecture_grade_7": "중1", + "lecture_grade_8": "중2", + "lecture_grade_9": "중3", + "lecture_grade_10": "일반", + "lecture_level_1": "쉬움", + "lecture_level_2": "중간", + "lecture_level_3": "어려움", + "listEnable": "리스트", + "functionEnable": "함수", + "messageEnable": "신호", + "objectEditable": "오브젝트", + "pictureeditable": "모양", + "sceneEditable": "장면", + "soundeditable": "소리", + "variableEnable": "변수", + "e_1": "초등 1학년", + "e_2": "초등 2학년", + "e_3": "초등 3학년", + "e_4": "초등 4학년", + "e_5": "초등 5학년", + "e_6": "초등 6학년", + "m_1": "중등 1학년", + "m_2": "중등 2학년", + "m_3": "중등 3학년", + "general": "일반", + "curriculum_is_open_true": "공개", + "curriculum_open_false": "비공개", + "notice": "공지사항", + "qna": "묻고답하기", + "tips": "노하우&팁", + "free": "자유 게시판", + "report": "제안 및 건의", + "art_category_all": "모든 작품", + "art_category_game": "게임", + "art_category_animation": "애니메이션", + "art_category_physical": "피지컬", + "art_category_etc": "기타", + "art_category_media": "미디어 아트", + "art_sort_updated": "최신순", + "art_sort_visit": "조회순", + "art_sort_likeCnt": "좋아요순", + "art_sort_comment": "댓글순", + "art_period_all": "전체기간", + "art_period_day": "오늘", + "art_period_week": "최근 1주일", + "art_period_month": "최근 1개월", + "art_period_three_month": "최근 3개월", + "level_high": "상", + "level_mid": "중", + "level_row": "하", + "discuss_sort_created": "최신순", + "discuss_sort_visit": "조회순", + "discuss_sort_likesLength": "좋아요순", + "discuss_sort_commentsLength": "댓글순", + "discuss_period_all": "전체기간", + "discuss_period_day": "오늘", + "discuss_period_week": "최근 1주일", + "discuss_period_month": "최근 1개월", + "discuss_period_three_month": "최근 3개월" +}; +Lang.Helper = { + "when_run_button_click": "시작하기 버튼을 클릭하면 아래에 연결된 블록들을 실행합니다.", + "when_some_key_pressed": "지정된 키를 누르면 아래에 연결된 블록들을 실행 합니다", + "mouse_clicked": "마우스를 클릭 했을 때 아래에 연결된 블록들을 실행 합니다.", + "mouse_click_cancled": "마우스 클릭을 해제 했을 때 아래에 연결된 블록들을 실행합니다.", + "when_object_click": "해당 오브젝트를 클릭했을 때 아래에 연결된 블록들을 실행합니다.", + "when_object_click_canceled": "해당 오브젝트 클릭을 해제 했을때 아래에 연결된 블록들을 실행 합니다.", + "when_message_cast": "해당 신호를 받으면 연결된 블록들을 실행합니다.", + "message_cast": "목록에 선택된 신호를 보냅니다.", + "message_cast_wait": "목록에 선택된 신호를 보내고, 해당 신호를 받는 블록들의 실행이 끝날때 까지 기다립니다.", + "when_scene_start": "장면이 시작되면 아래에 연결된 블록들을 실행 합니다. ", + "start_scene": "선택한 장면을 시작 합니다.", + "start_neighbor_scene": "이전 장면 또는 다음 장면을 시작합니다.", + "wait_second": "설정한 시간만큼 기다린 후 다음 블록을 실행 합니다.", + "repeat_basic": "설정한 횟수만큼 감싸고 있는 블록들을 반복 실행합니다.", + "repeat_inf": "감싸고 있는 블록들을 계속해서 반복 실행합니다.", + "repeat_while_true": "판단이 참인 동안 감싸고 있는 블록들을 반복 실행합니다.", + "stop_repeat": "이 블록을 감싸는 가장 가까운 반복 블록의 반복을 중단 합니다.", + "_if": "만일 판단이 참이면, 감싸고 있는 블록들을 실행합니다.", + "if_else": "만일 판단이 참이면, 첫 번째 감싸고 있는 블록들을 실행하고, 거짓이면 두 번째 감싸고 있는 블록들을 실행합니다.", + "restart_project": "모든 오브젝트를 처음부터 다시 실행합니다.", + "stop_object": "모두 : 모든 오브젝트들이 즉시 실행을 멈춥니다.
자신 : 해당 오브젝트의 모든 블록들을 멈춥니다.
이 코드 : 이 블록이 포함된 코드가 즉시 실행을 멈춥니다.
자신의 다른 코드 : 해당 오브젝트 중 이 블록이 포함된 코드를 제외한 모든 코드가 즉시 실행을 멈춥니다.", + "wait_until_true": "판단이 참이 될 때까지 실행을 멈추고 기다립니다.", + "when_clone_start": "해당 오브젝트의 복제본이 새로 생성되었을 때 아래에 연결된 블록들을 실행합니다.", + "create_clone": "선택한 오브젝트의 복제본을 생성합니다.", + "delete_clone": "‘복제본이 처음 생성되었을 때’ 블록과 함께 사용하여 생성된 복제본을 삭제합니다.", + "remove_all_clones": "해당 오브젝트의 모든 복제본을 삭제합니다.", + "move_direction": "설정한 값만큼 오브젝트의 이동방향 화살표가 가리키는 방향으로 움직입니다.", + "move_x": "오브젝트의 X좌표를 설정한 값만큼 바꿉니다. ", + "move_y": "오브젝트의 Y좌표를 설정한 값만큼 바꿉니다.", + "move_xy_time": "오브젝트가 입력한 시간에 걸쳐 x와 y좌표를 설정한 값만큼 바꿉니다", + "locate_object_time": "오브젝트가 입력한 시간에 걸쳐 선택한 오브젝트 또는 마우스 포인터의 위치로 이동합니다. (오브젝트의 중심점이 기준이 됩니다.)", + "locate_x": "오브젝트가 입력한 x좌표로 이동합니다. (오브젝트의 중심점이 기준이 됩니다.)", + "locate_y": "오브젝트가 입력한 y좌표로 이동합니다. (오브젝트의 중심점이 기준이 됩니다.)", + "locate_xy": "오브젝트가 입력한 x와 y좌표로 이동합니다. (오브젝트의 중심점이 기준이 됩니다.)", + "locate_xy_time": "오브젝트가 입력한 시간에 걸쳐 지정한 x, y좌표로 이동합니다. (오브젝트의 중심점이 기준이 됩니다.)", + "locate": "오브젝트가 선택한 오브젝트 또는 마우스 포인터의 위치로 이동합니다. (오브젝트의 중심점이 기준이 됩니다.)", + "rotate_absolute": "해당 오브젝트의 방향을 입력한 각도로 정합니다.", + "rotate_by_time": "오브젝트의 방향을 입력한 시간에 걸쳐 입력한 각도만큼 시계방향으로 회전합니다. (오브젝트의 중심점을 기준으로 회전합니다.)", + "rotate_relative": "오브젝트의 방향을 입력한 각도만큼 시계방향으로 회전합니다. (오브젝트의 중심점을 기준으로 회전합니다.)", + "direction_absolute": "해당 오브젝트의 이동 방향을 입력한 각도로 정합니다.", + "direction_relative": "오브젝트의 이동 방향을 입력한 각도만큼 회전합니다.", + "move_to_angle": "설정한 각도 방향으로 입력한 값만큼 움직입니다. (실행화면 위쪽이 0도, 시계방향으로 갈수록 각도 증가)", + "see_angle_object": "해당 오브젝트가 다른 오브젝트 또는 마우스 포인터 쪽을 바라봅니다. 오브젝트의 이동방향이 선택된 항목을 향하도록 오브젝트의 방향을 회전해줍니다.", + "bounce_wall": "해당 오브젝트가 화면 끝에 닿으면 튕겨져 나옵니다. ", + "show": "해당 오브젝트를 화면에 나타냅니다.", + "hide": "해당 오브젝트를 화면에서 보이지 않게 합니다.", + "dialog_time": "오브젝트가 입력한 내용을 입력한 시간 동안 말풍선으로 말한 후 다음 블록이 실행됩니다.", + "dialog": "오브젝트가 입력한 내용을 말풍선으로 말하는 동시에 다음 블록이 실행됩니다.", + "remove_dialog": "오브젝트가 말하고 있는 말풍선을 지웁니다.", + "change_to_some_shape": "오브젝트를 선택한 모양으로 바꿉니다. (내부 블록을 분리하면 모양의 번호를 사용하여 모양 선택 가능)", + "change_to_next_shape": "오브젝트의 모양을 다음 모양으로 바꿉니다.", + "set_effect_volume": "해당 오브젝트에 선택한 효과를 입력한 값만큼 줍니다.", + "set_effect_amount": "색깔 : 오브젝트에 색깔 효과를 입력한 값만큼 줍니다. (0~100을 주기로 반복됨)
밝기 : 오브젝트에 밝기 효과를 입력한 값만큼 줍니다. (-100~100 사이의 범위, -100 이하는 -100으로 100 이상은 100으로 처리 됨)
투명도 : 오브젝트에 투명도 효과를 입력한 값만큼 줍니다. (0~100 사이의 범위, 0이하는 0으로, 100 이상은 100으로 처리됨)", + "set_effect": "해당 오브젝트에 선택한 효과를 입력한 값으로 정합니다.", + "set_entity_effect": "해당 오브젝트에 선택한 효과를 입력한 값으로 정합니다.", + "add_effect_amount": "해당 오브젝트에 선택한 효과를 입력한 값만큼 줍니다.", + "change_effect_amount": "색깔 : 오브젝트의 색깔 효과를 입력한 값으로 정합니다. (0~100을 주기로 반복됨)
밝기 : 오브젝트의 밝기 효과를 입력한 값으로 정합니다. (-100~100 사이의 범위, -100 이하는 -100으로 100 이상은 100으로 처리 됨)
투명도 : 오브젝트의 투명도 효과를 입력한 값으로 정합니다. (0~100 사이의 범위, 0이하는 0으로, 100 이상은 100으로 처리됨)", + "change_scale_percent": "해당 오브젝트의 크기를 입력한 값만큼 바꿉니다.", + "set_scale_percent": "해당 오브젝트의 크기를 입력한 값으로 정합니다.", + "change_scale_size": "해당 오브젝트의 크기를 입력한 값만큼 바꿉니다.", + "set_scale_size": "해당 오브젝트의 크기를 입력한 값으로 정합니다.", + "flip_x": "해당 오브젝트의 상하 모양을 뒤집습니다.", + "flip_y": "해당 오브젝트의 좌우 모양을 뒤집습니다.", + "change_object_index": "맨 앞으로 : 해당 오브젝트를 화면의 가장 앞쪽으로 가져옵니다.
앞으로 : 해당 오브젝트를 한 층 앞쪽으로 가져옵니다.
뒤로 : 해당 오브젝트를 한 층 뒤쪽으로 보냅니다.
맨 뒤로 : 해당 오브젝트를 화면의 가장 뒤쪽으로 보냅니다.", + "set_object_order": "해당 오브젝트가 설정한 순서로 올라옵니다.", + "brush_stamp": "오브젝트의 모양을 도장처럼 실행화면 위에 찍습니다.", + "start_drawing": "오브젝트가 이동하는 경로를 따라 선이 그려지기 시작합니다. (오브젝트의 중심점이 기준)", + "stop_drawing": "오브젝트가 선을 그리는 것을 멈춥니다.", + "set_color": "오브젝트가 그리는 선의 색을 선택한 색으로 정합니다.", + "set_random_color": "오브젝트가 그리는 선의 색을 무작위로 정합니다. ", + "change_thickness": "오브젝트가 그리는 선의 굵기를 입력한 값만큼 바꿉니다. (1~무한의 범위, 1 이하는 1로 처리)", + "set_thickness": "오브젝트가 그리는 선의 굵기를 입력한 값으로 정합니다. (1~무한의 범위, 1 이하는 1로 처리)", + "change_opacity": "해당 오브젝트가 그리는 붓의 투명도를 입력한 값만큼 바꿉니다.", + "change_brush_transparency": "해당 오브젝트가 그리는 붓의 투명도를 입력한 값만큼 바꿉니다. (0~100의 범위, 0이하는 0, 100 이상은 100으로 처리)", + "set_opacity": "해당 오브젝트가 그리는 붓의 투명도를 입력한 값으로 정합니다.", + "set_brush_tranparency": "해당 오브젝트가 그리는 붓의 투명도를 입력한 값으로 정합니다. (0~100의 범위, 0이하는 0, 100 이상은 100으로 처리)", + "brush_erase_all": "해당 오브젝트가 그린 선과 도장을 모두 지웁니다.", + "sound_something_with_block": "해당 오브젝트가 선택한 소리를 재생하는 동시에 다음 블록을 실행합니다.", + "sound_something_second_with_block": "해당 오브젝트가 선택한 소리를 입력한 시간 만큼만 재생하는 동시에 다음 블록을 실행합니다.", + "sound_something_wait_with_block": "해당 오브젝트가 선택한 소리를 재생하고, 소리 재생이 끝나면 다음 블록을 실행합니다.", + "sound_something_second_wait_with_block": "해당 오브젝트가 선택한 소리를 입력한 시간 만큼만 재생하고, 소리 재생이 끝나면 다음 블록을 실행합니다.", + "sound_volume_change": "작품에서 재생되는 모든 소리의 크기를 입력한 퍼센트만큼 바꿉니다.", + "sound_volume_set": "작품에서 재생되는 모든 소리의 크기를 입력한 퍼센트로 정합니다.", + "sound_silent_all": "현재 재생중인 모든 소리를 멈춥니다.", + "is_clicked": "마우스를 클릭한 경우 ‘참’으로 판단합니다.", + "is_press_some_key": "선택한 키가 눌려져 있는 경우 ‘참’으로 판단합니다.", + "reach_something": "해당 오브젝트가 선택한 항목과 닿은 경우 ‘참’으로 판단합니다.", + "is_included_in_list": "선택한 리스트에 입력한 값을 가진 항목이 포함되어 있는지 확인합니다.", + "boolean_basic_operator": "= : 왼쪽에 위치한 값과 오른쪽에 위치한 값이 같으면 '참'으로 판단합니다.
> : 왼쪽에 위치한 값이 오른쪽에 위치한 값보다 크면 '참'으로 판단합니다.
< : 왼쪽에 위치한 값이 오른쪽에 위치한 값보다 작으면 '참'으로 판단합니다.
≥ : 왼쪽에 위치한 값이 오른쪽에 위치한 값보다 크거나 같으면 '참'으로 판단합니다.
≤ : 왼쪽에 위치한 값이 오른쪽에 위치한 값보다 작거나 같으면 '참'으로 판단합니다.", + "function_create": "자주 쓰는 코드를 이 블록 아래에 조립하여 함수로 만듭니다. [함수 정의하기]의 오른쪽 빈칸에 [이름]을 조립하여 함수의 이름을 정할 수 있습니다. 함수를 실행하는 데 입력값이 필요한 경우 빈칸에 [문자/숫자값], [판단값]을 조립하여 매개변수로 사용합니다.", + "function_field_label": "'함수 정의하기'의 빈칸 안에 조립하고, 이름을 입력하여 함수의 이름을 정해줍니다. ", + "function_field_string": "해당 함수를 실행하는데 문자/숫자 값이 필요한 경우 빈칸 안에 조립하여 매개변수로 사용합니다. 이 블록 내부의[문자/숫자값]을 분리하여 함수의 코드 중 필요한 부분에 넣어 사용합니다.", + "function_field_boolean": "해당 함수를 실행하는 데 참 또는 거짓의 판단이 필요한 경우 빈칸 안에 조립하여 매개변수로 사용합니다. 이 블록 내부의 [판단값]을 분리하여 함수의 코드 중 필요한 부분에 넣어 사용합니다.", + "function_general": "현재 만들고 있는 함수 블록 또는 지금까지 만들어 둔 함수 블록입니다.", + "boolean_and": "두 판단이 모두 참인 경우 ‘참’으로 판단합니다.", + "boolean_or": "두 판단 중 하나라도 참이 있는 경우 ‘참’으로 판단합니다.", + "boolean_not": "해당 판단이 참이면 거짓, 거짓이면 참으로 만듭니다.", + "calc_basic": "+ : 입력한 두 수를 더한 값입니다.
- : 입력한 두 수를 뺀 값입니다.
X : 입력한 두 수를 곱한 값입니다.
/ : 입력한 두 수를 나눈 값입니다.", + "calc_rand": "입력한 두 수 사이에서 선택된 무작위 수의 값입니다. (두 수 모두 정수를 입력한 경우 정수로, 두 수 중 하나라도 소수를 입력한 경우 소수로 무작위 수가 선택됩니다.)", + "get_x_coordinate": "해당 오브젝트의 x 좌푯값을 의미합니다.", + "get_y_coordinate": "해당 오브젝트의 y 좌푯값을 의미합니다.", + "coordinate_mouse": "마우스 포인터의 x 또는 y의 좌표 값을 의미합니다.", + "coordinate_object": "선택한 오브젝트 또는 자신의 각종 정보값(x좌표, y좌표, 방향, 이동방향, 크기, 모양번호, 모양이름)입니다.", + "quotient_and_mod": "몫 : 앞의 수에서 뒤의 수를 나누어 생긴 몫의 값입니다.
나머지 : 앞의 수에서 뒤의 수를 나누어 생긴 나머지 값입니다.", + "get_rotation_direction": "해당 오브젝트의 방향값, 이동 방향값을 의미합니다.", + "calc_share": "앞 수에서 뒤 수를 나누어 생긴 몫을 의미합니다.", + "calc_mod": "앞 수에서 뒤 수를 나누어 생긴 나머지를 의미합니다.", + "calc_operation": "입력한 수에 대한 다양한 수학식의 계산값입니다.", + "get_date": "현재 연도, 월, 일, 시각과 같이 시간에 대한 값입니다.", + "distance_something": "자신과 선택한 오브젝트 또는 마우스 포인터 간의 거리 값입니다.", + "get_sound_duration": "선택한 소리의 길이(초) 값입니다.", + "get_project_timer_value": "이 블록이 실행되는 순간 초시계에 저장된 값입니다.", + "choose_project_timer_action": "시작하기: 초시계를 시작합니다.
정지하기: 초시계를 정지합니다.
초기화하기: 초시계의 값을 0으로 초기화합니다.
(이 블록을 블록조립소로 가져오면 실행화면에 ‘초시계 창’이 생성됩니다.)", + "reset_project_timer": "실행되고 있던 타이머를 0으로 초기화합니다.", + "set_visible_project_timer": "초시계 창을 화면에서 숨기거나 보이게 합니다.", + "ask_and_wait": "해당 오브젝트가 입력한 문자를 말풍선으로 묻고, 대답을 입력받습니다. (이 블록을 블록조립소로 가져오면 실행화면에 ‘대답 창’이 생성됩니다.)", + "get_canvas_input_value": "묻고 기다리기에 의해 입력된 값입니다.", + "set_visible_answer": "실행화면에 있는 ‘대답 창’을 보이게 하거나 숨길 수 있습니다.", + "combine_something": "입력한 두 자료를 결합한 값입니다.", + "get_variable": "선택된 변수에 저장된 값입니다.", + "change_variable": "선택한 변수에 입력한 값을 더합니다.", + "set_variable": "선택한 변수의 값을 입력한 값으로 정합니다.", + "robotis_carCont_sensor_value": "왼쪽 접속 센서 : 접촉(1), 비접촉(0) 값 입니다.
오른쪽 접촉 센서 : 접촉(1), 비접촉(0) 값 입니다.
선택 버튼 상태 : 접촉(1), 비접촉(0) 값 입니다.
최종 소리 감지 횟수 : 마지막 실시간 소리 감지 횟수 값 입니다.
실시간 소리 감지 횟수 : 약 1초 안에 다음 소리가 감지되면 1씩 증가합니다.
왼쪽 적외선 센서 : 물체와 가까울 수록 큰 값 입니다.
오른쪽 적외선 센서 : 물체와 가까울 수록 큰 값 값 입니다.
왼쪽 적외선 센서 캘리브레이션 값 : 적외선 센서의 캘리브레이션 값 입니다.
오른쪽 적외선 센서 캘리브레이션 값 : 적외선 센서의 캘리브레이션 값 입니다.
(*캘리브레이션 값 - 적외선센서 조정 값)", + "robotis_carCont_cm_led": "4개의 LED 중 1번 또는 4번 LED 를 켜거나 끕니다.
LED 2번과 3번은 동작 지원하지 않습니다.", + "robotis_carCont_cm_sound_detected_clear": "최종 소리 감지횟 수를 0 으로 초기화 합니다.", + "robotis_carCont_aux_motor_speed": "감속모터 속도를 0 ~ 1023 의 값(으)로 정합니다.", + "robotis_carCont_cm_calibration": "적외선센서 조정 값(http://support.robotis.com/ko/: 자동차로봇> 2. B. 적외선 값 조정)을 직접 정합니다.", + "robotis_openCM70_sensor_value": "최종 소리 감지 횟수 : 마지막 실시간 소리 감지 횟수 값 입니다.
실시간 소리 감지 횟수 : 약 1초 안에 다음 소리가 감지되면 1씩 증가합니다.
사용자 버튼 상태 : 접촉(1), 비접촉(0) 값 입니다.최종 소리 감지 횟수 : 마지막 실시간 소리 감지 횟수 값 입니다.
실시간 소리 감지 횟수 : 약 1초 안에 다음 소리가 감지되면 1씩 증가합니다.
사용자 버튼 상태 : 접촉(1), 비접촉(0) 값 입니다.", + "robotis_openCM70_aux_sensor_value": "서보모터 위치 : 0 ~ 1023, 중간 위치의 값은 512 입니다.
적외선센서 : 물체와 가까울 수록 큰 값 입니다.
접촉센서 : 접촉(1), 비접촉(0) 값 입니다.
조도센서(CDS) : 0 ~ 1023, 밝을 수록 큰 값 입니다.
온습도센서(습도) : 0 ~ 100, 습할 수록 큰 값 입니다.
온습도센서(온도) : -20 ~ 100, 온도가 높을 수록 큰 값 입니다.
온도센서 : -20 ~ 100, 온도가 높을 수록 큰 값 입니다.
초음파센서 : -
자석센서 : 접촉(1), 비접촉(0) 값 입니다.
동작감지센서 : 동작 감지(1), 동작 미감지(0) 값 입니다.
컬러센서 : 알수없음(0), 흰색(1), 검은색(2), 빨간색(3), 녹색(4), 파란색(5), 노란색(6) 값 입니다.
사용자 장치 : 사용자 센서 제작에 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "robotis_openCM70_cm_buzzer_index": "음계를 0.1 ~ 5 초 동안 연주 합니다.", + "robotis_openCM70_cm_buzzer_melody": "멜로디를 연주 합니다.
멜로디를 연속으로 재생하는 경우, 다음 소리가 재생되지 않으면 '흐름 > X 초 기다리기' 블록을 사용하여 기다린 후 실행합니다.", + "robotis_openCM70_cm_sound_detected_clear": "최종 소리 감지횟 수를 0 으로 초기화 합니다.", + "robotis_openCM70_cm_led": "제어기의 빨간색, 녹색, 파란색 LED 를 켜거나 끕니다.", + "robotis_openCM70_cm_motion": "제어기에 다운로드 되어있는 모션을 실행합니다.", + "robotis_openCM70_aux_motor_speed": "감속모터 속도를 0 ~ 1023 의 값(으)로 정합니다.", + "robotis_openCM70_aux_servo_mode": "서보모터를 회전모드 또는 관절모드로 정합니다.
한번 설정된 모드는 계속 적용됩니다.
회전모드는 서보모터 속도를 지정하여 서보모터를 회전 시킵니다.
관절모드는 지정한 서보모터 속도로 서보모터 위치를 이동 시킵니다.", + "robotis_openCM70_aux_servo_speed": "서보모터 속도를 0 ~ 1023 의 값(으)로 정합니다.", + "robotis_openCM70_aux_servo_position": "서보모터 위치를 0 ~ 1023 의 값(으)로 정합니다.
서보모터 속도와 같이 사용해야 합니다.", + "robotis_openCM70_aux_led_module": "LED 모듈의 LED 를 켜거나 끕니다.", + "robotis_openCM70_aux_custom": "사용자 센서 제작에 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "robotis_openCM70_cm_custom_value": "컨트롤 테이블 주소를 직접 입력하여 값을 확인 합니다.
컨트롤 테이블 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "robotis_openCM70_cm_custom": "컨트롤 테이블 주소를 직접 입력하여 값을 정합니다.
컨트롤 테이블 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "show_variable": "선택한 변수 창을 실행화면에 보이게 합니다.", + "hide_variable": "선택한 변수 창을 실행화면에서 숨깁니다.", + "value_of_index_from_list": "선택한 리스트에서 선택한 값의 순서에 있는 항목 값을 의미합니다. (내부 블록을 분리하면 순서를 숫자로 입력 가능)", + "add_value_to_list": "입력한 값이 선택한 리스트의 마지막 항목으로 추가됩니다.", + "remove_value_from_list": "선택한 리스트의 입력한 순서에 있는 항목을 삭제합니다.", + "insert_value_to_list": "선택한 리스트의 입력한 순서의 위치에 입력한 항목을 넣습니다. (입력한 항목의 뒤에 있는 항목들은 순서가 하나씩 밀려납니다.)", + "change_value_list_index": "선택한 리스트에서 입력한 순서에 있는 항목의 값을 입력한 값으로 바꿉니다.", + "length_of_list": "선택한 리스트가 보유한 항목 개수 값입니다.", + "show_list": "선택한 리스트를 무대에 보이게 합니다.", + "hide_list": "선택한 리스트를 무대에서 숨깁니다.", + "text": "해당 글상자가 표시하고 있는 문자값을 의미합니다.", + "text_write": "글상자의 내용을 입력한 값으로 고쳐씁니다.", + "text_append": "글상자의 내용 뒤에 입력한 값을 추가합니다.", + "text_prepend": "글상자의 내용 앞에 입력한 값을 추가합니다.", + "text_flush": "글상자에 저장된 값을 모두 지웁니다.", + "erase_all_effects": "해당 오브젝트에 적용된 효과를 모두 지웁니다.", + "char_at": "입력한 문자/숫자값 중 입력한 숫자 번째의 글자 값입니다.", + "length_of_string": "입력한 문자값의 공백을 포함한 글자 수입니다.", + "substring": "입력한 문자/숫자 값에서 입력한 범위 내의 문자/숫자 값입니다.", + "replace_string": "입력한 문자/숫자 값에서 지정한 문자/숫자 값을 찾아 추가로 입력한 문자/숫자값으로 모두 바꾼 값입니다. (영문 입력시 대소문자를 구분합니다.)", + "index_of_string": "입력한 문자/숫자 값에서 지정한 문자/숫자 값이 처음으로 등장하는 위치의 값입니다. (안녕, 엔트리!에서 엔트리의 시작 위치는 5)", + "change_string_case": "입력한 영문의 모든 알파벳을 대문자 또는 소문자로 바꾼 문자값을 의미합니다.", + "direction_relative_duration": "해당 오브젝트의 이동방향을 입력한 시간에 걸쳐 입력한 각도만큼 시계방향으로 회전합니다. ", + "get_sound_volume": "현재 작품에 설정된 소리의 크기값을 의미합니다.", + "sound_from_to": "해당 오브젝트가 선택한 소리를 입력한 시간 부분만을 재생하는 동시에 다음 블록을 실행합니다.", + "sound_from_to_and_wait": "해당 오브젝트가 선택한 소리를 입력한 시간 부분만을 재생하고, 소리 재생이 끝나면 다음 블록을 실행합니다.", + "Block_info": "블록 설명", + "Block_click_msg": "블록을 클릭하면 블록에 대한 설명이 나타납니다." +}; +Lang.Category = { + "entrybot_friends": "엔트리봇 친구들", + "people": "사람", + "animal": "동물", + "animal_flying": "하늘", + "animal_land": "땅", + "animal_water": "물", + "animal_others": "기타", + "plant": "식물", + "plant_flower": "꽃", + "plant_grass": "풀", + "plant_tree": "나무", + "plant_others": "기타", + "vehicles": "탈것", + "vehicles_flying": "하늘", + "vehicles_land": "땅", + "vehicles_water": "물", + "vehicles_others": "기타", + "architect": "건물", + "architect_building": "건축물", + "architect_monument": "기념물", + "architect_others": "기타", + "food": "음식", + "food_vegetables": "과일/채소", + "food_meat": "고기", + "food_drink": "음료", + "food_others": "기타", + "environment": "환경", + "environment_nature": "자연", + "environment_space": "우주", + "environment_others": "기타", + "stuff": "물건", + "stuff_living": "생활", + "stuff_hobby": "취미", + "stuff_others": "기타", + "fantasy": "판타지", + "interface": "인터페이스", + "background": "배경", + "background_outdoor": "실외", + "background_indoor": "실내", + "background_nature": "자연", + "background_others": "기타" +}; +Lang.Device = { + "arduino": "아두이노", + "hamster": "햄스터", + "albert": "알버트", + "robotis_carCont": "로보티즈 자동차 로봇", + "robotis_openCM70": "로보티즈 IoT", + "sensorBoard": "엔트리 센서보드", + "CODEino": "코드이노", + "bitbrick": "비트브릭", + "bitBlock": "비트블록", + "xbot_epor_edge": "엑스봇", + "dplay": "디플레이", + "nemoino": "네모이노" +}; +Lang.General = { + "turn_on": "켜기", + "turn_off": "끄기", + "left": "왼쪽", + "right": "오른쪽", + "both": "양쪽", + "red": "빨간색", + "yellow": "노란색", + "green": "초록색", + "skyblue": "하늘색", + "blue": "파란색", + "purple": "보라색", + "white": "하얀색", + "note_c": "도", + "note_d": "레", + "note_e": "미", + "note_f": "파", + "note_g": "솔", + "note_a": "라", + "note_b": "시" +}; +Lang.Fonts = { + "batang": "바탕체", + "myeongjo": "명조체", + "gothic": "고딕체", + "pen_script": "필기체", + "jeju_hallasan": "한라산체", + "gothic_coding": "코딩고딕체" +}; +Lang.Hw = { + "note": "노트", + "leftWheel": "왼쪽 바퀴", + "rightWheel": "오른쪽 바퀴", + "leftEye": "왼쪽 눈", + "rightEye": "오른쪽 눈", + "led": "불빛", + "body": "몸통", + "front": "앞쪽", + "port_en": "", + "port_ko": "번 포트", + "sensor": "센서", + "light": "빛", + "temp": "온도", + "switch_": "스위치", + "right_ko": "오른쪽", + "right_en": "", + "left_ko": "왼쪽", + "left_en": "", + "up_ko": "위쪽", + "up_en": "", + "down_ko": "아래쪽", + "down_en": "", + "output": "출력", + "left": "왼쪽", + "right": "오른쪽", + "sub": "서보", + "motor": "모터", + "": "", + "buzzer": "부저" +}; +Lang.template = { + "albert_hand_found": "손 찾음?", + "albert_value": "%1", + "albert_move_forward_for_secs": "앞으로 %1 초 이동하기 %2", + "albert_move_backward_for_secs": "뒤로 %1 초 이동하기 %2", + "albert_turn_for_secs": "%1 으로 %2 초 돌기 %3", + "albert_change_both_wheels_by": "왼쪽 바퀴 %1 오른쪽 바퀴 %2 만큼 바꾸기 %3", + "albert_set_both_wheels_to": "왼쪽 바퀴 %1 오른쪽 바퀴 %2 (으)로 정하기 %3", + "albert_change_wheel_by": "%1 바퀴 %2 만큼 바꾸기 %3", + "albert_set_wheel_to": "%1 바퀴 %2 (으)로 정하기 %3", + "albert_stop": "정지하기 %1", + "albert_set_pad_size_to": "패드 크기를 폭 %1 높이 %2 (으)로 정하기 %3", + "albert_set_eye_to": "%1 눈을 %2 으로 정하기 %3", + "albert_clear_eye": "%1 눈 끄기 %2", + "albert_body_led": "몸통 LED %1 %2", + "albert_front_led": "앞쪽 LED %1 %2", + "albert_beep": "삐 소리내기 %1", + "albert_change_buzzer_by": "버저 음을 %1 만큼 바꾸기 %2", + "albert_set_buzzer_to": "버저 음을 %1 (으)로 정하기 %2", + "albert_clear_buzzer": "버저 끄기 %1", + "albert_play_note_for": "%1 %2 음을 %3 박자 연주하기 %4", + "albert_rest_for": "%1 박자 쉬기 %2", + "albert_change_tempo_by": "연주 속도를 %1 만큼 바꾸기 %2", + "albert_set_tempo_to": "연주 속도를 %1 BPM으로 정하기 %2", + "albert_move_forward": "앞으로 이동하기 %1", + "albert_move_backward": "뒤로 이동하기 %1", + "albert_turn_around": "%1 으로 돌기 %2", + "albert_set_led_to": "%1 %2 으로 정하기 %3", + "albert_clear_led": "%1 %2", + "albert_change_wheels_by": "%1 %2 %3", + "albert_set_wheels_to": "%1 %2 %3", + "arduino_text": "%1", + "arduino_send": "신호 %1 보내기", + "arduino_get_number": "신호 %1 의 숫자 결과값", + "arduino_get_string": "신호 %1 의 글자 결과값", + "arduino_get_sensor_number": "%1 ", + "arduino_get_port_number": "%1 ", + "arduino_get_pwm_port_number": "%1 ", + "arduino_get_number_sensor_value": "아날로그 %1 번 센서값 ", + "arduino_get_digital_value": "디지털 %1 번 센서값 ", + "arduino_toggle_led": "디지털 %1 번 핀 %2 %3", + "arduino_toggle_pwm": "디지털 %1 번 핀을 %2 (으)로 정하기 %3", + "arduino_convert_scale": "%1 값의 범위를 %2 ~ %3 에서 %4 ~ %5 (으)로 바꾼값 ", + "sensorBoard_get_named_sensor_value": "%1 센서값", + "sensorBoard_is_button_pressed": "%1 버튼을 눌렀는가?", + "sensorBoard_led": "%1 LED %2 %3", + "arduino_download_connector": "%1", + "arduino_download_source": "%1", + "arduino_connected": "%1", + "arduino_reconnect": "%1", + "CODEino_get_sensor_number": "%1 ", + "CODEino_get_named_sensor_value": " %1 센서값 ", + "CODEino_get_sound_status": "소리센서 %1 ", + "CODEino_get_light_status": "빛센서 %1 ", + "CODEino_is_button_pressed": " 보드의 %1 ", + "CODEino_get_accelerometer_direction": " 3축 가속도센서 %1 ", + "CODEino_get_accelerometer_value": " 3축 가속도센서 %1 축의 센서값 ", + "bitbrick_sensor_value": "%1 값", + "bitbrick_is_touch_pressed": "버튼 %1 이(가) 눌렸는가?", + "bitbrick_turn_off_color_led": "컬러 LED 끄기 %1", + "bitbrick_turn_on_color_led_by_rgb": "컬러 LED 켜기 R %1 G %2 B %3 %4", + "bitbrick_turn_on_color_led_by_picker": "컬러 LED 색 %1 로 정하기 %2", + "bitbrick_turn_on_color_led_by_value": "컬러 LED 켜기 색 %1 로 정하기 %2", + "bitbrick_buzzer": "버저음 %1 내기 %2", + "bitbrick_turn_off_all_motors": "모든 모터 끄기 %1", + "bitbrick_dc_speed": "DC 모터 %1 속도 %2 %3", + "bitbrick_dc_direction_speed": "DC 모터 %1 %2 방향 속력 %3 %4", + "bitbrick_servomotor_angle": "서보 모터 %1 각도 %2 %3", + "bitbrick_convert_scale": "변환 %1 값 %2 ~ %3 에서 %4 ~ %5", + "start_drawing": "그리기 시작하기 %1", + "stop_drawing": "그리기 멈추기 %1", + "set_color": "붓의 색을 %1 (으)로 정하기 %2", + "set_random_color": "붓의 색을 무작위로 정하기 %1", + "change_thickness": "붓의 굵기를 %1 만큼 바꾸기 %2", + "set_thickness": "붓의 굵기를 %1 (으)로 정하기 %2", + "change_opacity": "붓의 불투명도를 %1 % 만큼 바꾸기 %2", + "set_opacity": "붓의 불투명도를 %1 % 로 정하기 %2", + "brush_erase_all": "모든 붓 지우기 %1", + "brush_stamp": "도장찍기 %1", + "change_brush_transparency": "붓의 투명도를 %1 % 만큼 바꾸기 %2", + "set_brush_tranparency": "붓의 투명도를 %1 % 로 정하기 %2", + "number": "%1", + "angle": "%1", + "get_x_coordinate": "%1", + "get_y_coordinate": "%1", + "get_angle": "%1", + "get_rotation_direction": "%1 ", + "distance_something": "%1 %2 %3", + "coordinate_mouse": "%1 %2 %3", + "coordinate_object": "%1 %2 %3 %4", + "calc_basic": "%1 %2 %3", + "calc_plus": "%1 %2 %3", + "calc_minus": "%1 %2 %3", + "calc_times": "%1 %2 %3", + "calc_divide": "%1 %2 %3", + "calc_mod": "%1 %2 %3 %4", + "calc_share": "%1 %2 %3 %4", + "calc_operation": "%1 %2 %3 %4", + "calc_rand": "%1 %2 %3 %4 %5", + "get_date": "%1 %2 %3", + "get_sound_duration": "%1 %2 %3", + "reset_project_timer": "%1", + "set_visible_project_timer": "%1 %2 %3 %4", + "timer_variable": "%1 %2", + "get_project_timer_value": "%1 %2", + "char_at": "%1 %2 %3 %4 %5", + "length_of_string": "%1 %2 %3", + "substring": "%1 %2 %3 %4 %5 %6 %7", + "replace_string": "%1 %2 %3 %4 %5 %6 %7", + "change_string_case": "%1 %2 %3 %4 %5", + "index_of_string": "%1 %2 %3 %4 %5", + "combine_something": "%1 %2 %3 %4 %5", + "get_sound_volume": "%1 %2", + "quotient_and_mod": "%1 %2 %3 %4 %5 %6", + "choose_project_timer_action": "%1 %2 %3 %4", + "wait_second": "%1 초 기다리기 %2", + "repeat_basic": "%1 번 반복하기 %2", + "repeat_inf": "계속 반복하기 %1", + "stop_repeat": "반복 중단하기 %1", + "wait_until_true": "%1 이(가) 될 때까지 기다리기 %2", + "_if": "만일 %1 이라면 %2", + "if_else": "만일 %1 이라면 %2 %3 아니면", + "create_clone": "%1 의 복제본 만들기 %2", + "delete_clone": "이 복제본 삭제하기 %1", + "when_clone_start": "%1 복제본이 처음 생성되었을때", + "stop_run": "프로그램 끝내기 %1", + "repeat_while_true": "%1 %2 반복하기 %3", + "stop_object": "%1 멈추기 %2", + "restart_project": "처음부터 다시 실행하기 %1", + "remove_all_clones": "모든 복제본 삭제하기 %1", + "functionAddButton": "%1", + "function_field_label": "%1%2", + "function_field_string": "%1%2", + "function_field_boolean": "%1%2", + "function_param_string": "문자/숫자값", + "function_param_boolean": "판단값", + "function_create": "함수 정의하기 %1 %2", + "function_general": "이름 %1", + "hamster_hand_found": "손 찾음?", + "hamster_value": "%1", + "hamster_move_forward_once": "말판 앞으로 한 칸 이동하기 %1", + "hamster_turn_once": "말판 %1 으로 한 번 돌기 %2", + "hamster_move_forward_for_secs": "앞으로 %1 초 이동하기 %2", + "hamster_move_backward_for_secs": "뒤로 %1 초 이동하기 %2", + "hamster_turn_for_secs": "%1 으로 %2 초 돌기 %3", + "hamster_change_both_wheels_by": "왼쪽 바퀴 %1 오른쪽 바퀴 %2 만큼 바꾸기 %3", + "hamster_set_both_wheels_to": "왼쪽 바퀴 %1 오른쪽 바퀴 %2 (으)로 정하기 %3", + "hamster_change_wheel_by": "%1 바퀴 %2 만큼 바꾸기 %3", + "hamster_set_wheel_to": "%1 바퀴 %2 (으)로 정하기 %3", + "hamster_follow_line_using": "%1 선을 %2 바닥 센서로 따라가기 %3", + "hamster_follow_line_until": "%1 선을 따라 %2 교차로까지 이동하기 %3", + "hamster_set_following_speed_to": "선 따라가기 속도를 %1 (으)로 정하기 %2", + "hamster_stop": "정지하기 %1", + "hamster_set_led_to": "%1 LED를 %2 으로 정하기 %3", + "hamster_clear_led": "%1 LED 끄기 %2", + "hamster_beep": "삐 소리내기 %1", + "hamster_change_buzzer_by": "버저 음을 %1 만큼 바꾸기 %2", + "hamster_set_buzzer_to": "버저 음을 %1 (으)로 정하기 %2", + "hamster_clear_buzzer": "버저 끄기 %1", + "hamster_play_note_for": "%1 %2 음을 %3 박자 연주하기 %4", + "hamster_rest_for": "%1 박자 쉬기 %2", + "hamster_change_tempo_by": "연주 속도를 %1 만큼 바꾸기 %2", + "hamster_set_tempo_to": "연주 속도를 %1 BPM으로 정하기 %2", + "hamster_set_port_to": "포트 %1 를 %2 으로 정하기 %3", + "hamster_change_output_by": "출력 %1 를 %2 만큼 바꾸기 %3", + "hamster_set_output_to": "출력 %1 를 %2 (으)로 정하기 %3", + "is_clicked": "%1", + "is_press_some_key": "%1 %2", + "reach_something": "%1 %2 %3", + "boolean_comparison": "%1 %2 %3", + "boolean_equal": "%1 %2 %3", + "boolean_bigger": "%1 %2 %3", + "boolean_smaller": "%1 %2 %3", + "boolean_and_or": "%1 %2 %3", + "boolean_and": "%1 %2 %3", + "boolean_or": "%1 %2 %3", + "boolean_not": "%1 %2 %3", + "true_or_false": "%1", + "True": "%1 ", + "False": "%1 ", + "boolean_basic_operator": "%1 %2 %3", + "show": "모양 보이기 %1", + "hide": "모양 숨기기 %1", + "dialog_time": "%1 을(를) %2 초 동안 %3 %4", + "dialog": "%1 을(를) %2 %3", + "remove_dialog": "말하기 지우기 %1", + "change_to_nth_shape": "%1 모양으로 바꾸기 %2", + "change_to_next_shape": "%1 모양으로 바꾸기 %2", + "set_effect_volume": "%1 효과를 %2 만큼 주기 %3", + "set_effect": "%1 효과를 %2 (으)로 정하기 %3", + "erase_all_effects": "효과 모두 지우기 %1", + "change_scale_percent": "크기를 %1 만큼 바꾸기 %2", + "set_scale_percent": "크기를 %1 (으)로 정하기 %2", + "change_scale_size": "크기를 %1 만큼 바꾸기 %2", + "set_scale_size": "크기를 %1 (으)로 정하기 %2", + "flip_y": "좌우 모양 뒤집기 %1", + "flip_x": "상하 모양 뒤집기 %1", + "set_object_order": "%1 번째로 올라오기 %2", + "get_pictures": "%1 ", + "change_to_some_shape": "%1 모양으로 바꾸기 %2", + "add_effect_amount": "%1 효과를 %2 만큼 주기 %3", + "change_effect_amount": "%1 효과를 %2 (으)로 정하기 %3", + "set_effect_amount": "%1 효과를 %2 만큼 주기 %3", + "set_entity_effect": "%1 효과를 %2 (으)로 정하기 %3", + "change_object_index": "%1 보내기 %2", + "move_direction": "이동 방향으로 %1 만큼 움직이기 %2", + "move_x": "x 좌표를 %1 만큼 바꾸기 %2", + "move_y": "y 좌표를 %1 만큼 바꾸기 %2", + "locate_xy_time": "%1 초 동안 x: %2 y: %3 위치로 이동하기 %4", + "rotate_by_angle": "오브젝트를 %1 만큼 회전하기 %2", + "rotate_by_angle_dropdown": "%1 만큼 회전하기 %2", + "see_angle": "이동 방향을 %1 (으)로 정하기 %2", + "see_direction": "%1 쪽 보기 %2", + "locate_xy": "x: %1 y: %2 위치로 이동하기 %3", + "locate_x": "x: %1 위치로 이동하기 %2", + "locate_y": "y: %1 위치로 이동하기 %2", + "locate": "%1 위치로 이동하기 %2", + "move_xy_time": "%1 초 동안 x: %2 y: %3 만큼 움직이기 %4", + "rotate_by_angle_time": "오브젝트를 %1 초 동안 %2 만큼 회전하기 %3", + "bounce_wall": "화면 끝에 닿으면 튕기기 %1", + "flip_arrow_horizontal": "화살표 방향 좌우 뒤집기 %1", + "flip_arrow_vertical": "화살표 방향 상하 뒤집기 %1", + "see_angle_object": "%1 쪽 바라보기 %2", + "see_angle_direction": "오브젝트를 %1 (으)로 정하기 %2", + "rotate_direction": "이동 방향을 %1 만큼 회전하기 %2", + "locate_object_time": "%1 초 동안 %2 위치로 이동하기 %3", + "rotate_absolute": "방향을 %1 (으)로 정하기 %2", + "rotate_relative": "방향을 %1 만큼 회전하기 %2", + "direction_absolute": "이동 방향을 %1 (으)로 정하기 %2", + "direction_relative": "이동 방향을 %1 만큼 회전하기 %2", + "move_to_angle": "%1 방향으로 %2 만큼 움직이기 %3", + "rotate_by_time": "%1 초 동안 방향을 %2 만큼 회전하기 %3", + "direction_relative_duration": "%1 초 동안 이동 방향 %2 만큼 회전하기 %3", + "neobot_sensor_value": "%1 값", + "neobot_turn_left": "왼쪽모터를 %1 %2 회전 %3", + "neobot_stop_left": "왼쪽모터 정지 %1", + "neobot_turn_right": "오른쪽모터를 %1 %2 회전 %3", + "neobot_stop_right": "오른쪽모터 정지 %1", + "neobot_run_motor": "%1 모터를 %2 초간 %3 %4 %5", + "neobot_servo_1": "SERVO1에 연결된 서보모터를 %1 속도로 %2 로 이동 %3", + "neobot_servo_2": "SERVO2에 연결된 서보모터를 %1 속도로 %2 로 이동 %3", + "neobot_play_note_for": "멜로디 %1 을(를) %2 옥타브로 %3 길이만큼 소리내기 %4", + "neobot_set_sensor_value": "%1 번 포트의 값을 %2 %3", + "robotis_openCM70_cm_custom_value": "직접입력 주소 ( %1 ) %2 값", + "robotis_openCM70_sensor_value": "제어기 %1 값", + "robotis_openCM70_aux_sensor_value": "%1 %2 값", + "robotis_openCM70_cm_buzzer_index": "제어기 음계값 %1 을(를) %2 초 동안 연주 %3", + "robotis_openCM70_cm_buzzer_melody": "제어기 멜로디 %1 번 연주 %2", + "robotis_openCM70_cm_sound_detected_clear": "최종소리감지횟수 초기화 %1", + "robotis_openCM70_cm_led": "제어기 %1 LED %2 %3", + "robotis_openCM70_cm_motion": "모션 %1 번 실행 %2", + "robotis_openCM70_aux_motor_speed": "%1 감속모터 속도를 %2 , 출력값을 %3 (으)로 정하기 %4", + "robotis_openCM70_aux_servo_mode": "%1 서보모터 모드를 %2 (으)로 정하기 %3", + "robotis_openCM70_aux_servo_speed": "%1 서보모터 속도를 %2 , 출력값을 %3 (으)로 정하기 %4", + "robotis_openCM70_aux_servo_position": "%1 서보모터 위치를 %2 (으)로 정하기 %3", + "robotis_openCM70_aux_led_module": "%1 LED 모듈을 %2 (으)로 정하기 %3", + "robotis_openCM70_aux_custom": "%1 사용자 장치를 %2 (으)로 정하기 %3", + "robotis_openCM70_cm_custom": "직접입력 주소 ( %1 ) (을)를 %2 (으)로 정하기 %3", + "robotis_carCont_sensor_value": "%1 값", + "robotis_carCont_cm_led": "4번 LED %1 , 1번 LED %2 %3", + "robotis_carCont_cm_sound_detected_clear": "최종소리감지횟수 초기화 %1", + "robotis_carCont_aux_motor_speed": "%1 감속모터 속도를 %2 , 출력값을 %3 (으)로 정하기 %4", + "robotis_carCont_cm_calibration": "%1 적외선 센서 캘리브레이션 값을 %2 (으)로 정하기 %3", + "when_scene_start": "%1 장면이 시작되었을때", + "start_scene": "%1 시작하기 %2", + "start_neighbor_scene": "%1 장면 시작하기 %2", + "sound_something": "소리 %1 재생하기 %2", + "sound_something_second": "소리 %1 %2 초 재생하기 %3", + "sound_something_wait": "소리 %1 재생하고 기다리기 %2", + "sound_something_second_wait": "소리 %1 %2 초 재생하고 기다리기 %3", + "sound_volume_change": "소리 크기를 %1 % 만큼 바꾸기 %2", + "sound_volume_set": "소리 크기를 %1 % 로 정하기 %2", + "sound_silent_all": "모든 소리 멈추기 %1", + "get_sounds": "%1 ", + "sound_something_with_block": "소리 %1 재생하기 %2", + "sound_something_second_with_block": "소리 %1 %2 초 재생하기 %3", + "sound_something_wait_with_block": "소리 %1 재생하고 기다리기 %2", + "sound_something_second_wait_with_block": "소리 %1 %2 초 재생하고 기다리기 %3", + "sound_from_to": "소리 %1 %2 초 부터 %3 초까지 재생하기 %4", + "sound_from_to_and_wait": "소리 %1 %2 초 부터 %3 초까지 재생하고 기다리기 %4", + "when_run_button_click": "%1 시작하기 버튼을 클릭했을 때", + "press_some_key": "%1 %2 키를 눌렀을 때 %3", + "when_some_key_pressed": "%1 %2 키를 눌렀을 때", + "mouse_clicked": "%1 마우스를 클릭했을 때", + "mouse_click_cancled": "%1 마우스 클릭을 해제했을 때", + "when_object_click": "%1 오브젝트를 클릭했을 때", + "when_object_click_canceled": "%1 오브젝트 클릭을 해제했을 때", + "when_some_key_click": "%1 키를 눌렀을 때", + "when_message_cast": "%1 %2 신호를 받았을 때", + "message_cast": "%1 신호 보내기 %2", + "message_cast_wait": "%1 신호 보내고 기다리기 %2", + "text": "%1", + "text_write": "%1 라고 글쓰기", + "text_append": "%1 라고 뒤에 이어쓰기", + "text_prepend": "%1 라고 앞에 추가하기", + "text_flush": "텍스트 모두 지우기", + "variableAddButton": "%1", + "listAddButton": "%1", + "change_variable": "%1 에 %2 만큼 더하기 %3", + "set_variable": "%1 를 %2 로 정하기 %3", + "show_variable": "변수 %1 보이기 %2", + "hide_variable": "변수 %1 숨기기 %2", + "get_variable": "%1 %2", + "ask_and_wait": "%1 을(를) 묻고 대답 기다리기 %2", + "get_canvas_input_value": "%1 ", + "add_value_to_list": "%1 항목을 %2 에 추가하기 %3", + "remove_value_from_list": "%1 번째 항목을 %2 에서 삭제하기 %3", + "insert_value_to_list": "%1 을(를) %2 의 %3 번째에 넣기 %4", + "change_value_list_index": "%1 %2 번째 항목을 %3 (으)로 바꾸기 %4", + "value_of_index_from_list": "%1 %2 %3 %4 %5", + "length_of_list": "%1 %2 %3", + "show_list": "리스트 %1 보이기 %2", + "hide_list": "리스트 %1 숨기기 %2", + "options_for_list": "%1 ", + "set_visible_answer": "대답 %1 %2", + "is_included_in_list": "%1 %2 %3 %4 %5", + "xbot_digitalInput": "%1", + "xbot_analogValue": "%1", + "xbot_digitalOutput": "디지털 %1 핀, 출력 값 %2 %3", + "xbot_analogOutput": "아날로그 %1 %2 %3", + "xbot_servo": "서보 모터 %1 , 각도 %2 %3", + "xbot_oneWheel": "바퀴(DC) 모터 %1 , 속도 %2 %3", + "xbot_twoWheel": "바퀴(DC) 모터 오른쪽(2) 속도: %1 왼쪽(1) 속도: %2 %3", + "xbot_rgb": "RGB LED 켜기 R 값 %1 G 값 %2 B 값 %3 %4", + "xbot_rgb_picker": "RGB LED 색 %1 로 정하기 %2", + "xbot_buzzer": "%1 %2 음을 %3 초 연주하기 %4", + "xbot_lcd": "LCD %1 번째 줄 , 출력 값 %2 %3", + "run": "", + "mutant": "test mutant block", + "jr_start": "%1", + "jr_repeat": "%1 반복", + "jr_item": "꽃 모으기 %1", + "cparty_jr_item": "%1 %2", + "jr_north": "%1 %2", + "jr_east": "%1 %2", + "jr_south": "%1 %2", + "jr_west": "%1 %2", + "jr_start_basic": "%1 %2", + "jr_go_straight": "%1 %2", + "jr_turn_left": "%1 %2", + "jr_turn_right": "%1 %2", + "jr_go_slow": "%1 %2", + "jr_repeat_until_dest": "%1 %2 %3 %4", + "jr_if_construction": "%1 %2 %3 %4", + "jr_if_speed": "만약 %1 앞에 있다면 %2", + "maze_step_start": "%1 시작하기를 클릭했을 때", + "maze_step_jump": "뛰어넘기%1", + "maze_step_for": "%1 번 반복하기%2", + "test": "%1 this is test block %2", + "maze_repeat_until_1": "%1 만날 때 까지 반복%2", + "maze_repeat_until_2": "모든 %1 만날 때 까지 반복%2", + "maze_step_if_1": "만약 앞에 %1 있다면%2", + "maze_step_if_2": "만약 앞에 %1 있다면%2", + "maze_call_function": "약속 불러오기%1", + "maze_define_function": "약속하기%1", + "maze_step_if_3": "만약 앞에 %1 있다면%2", + "maze_step_if_4": "만약 앞에 %1 있다면%2", + "maze_step_move_step": "앞으로 한 칸 이동%1", + "maze_step_rotate_left": "왼쪽으로 회전%1", + "maze_step_rotate_right": "오른쪽으로 회전%1", + "test_wrapper": "%1 this is test block %2", + "basic_button": "%1" +}; + +if (typeof exports == "object") + exports.Lang = Lang; \ No newline at end of file diff --git a/extern/lang/vn.js b/extern/lang/vn.js new file mode 100644 index 0000000000..dabbe6fa79 --- /dev/null +++ b/extern/lang/vn.js @@ -0,0 +1,2599 @@ +var Lang = {}; +Lang.category = { + "name": "vn" +}; +Lang.type = "en"; +Lang.en = "English"; +Lang.Blocks = { + "ARDUINO": "Hardware", + "ARDUINO_download_connector": "Download Arduino Connector", + "ARDUINO_download_source": "Entry Arduino code", + "ARDUINO_reconnect": "Connect Hardware", + "ARDUINO_connected": "Hardware connected", + "ARDUINO_arduino_get_number_1": "number result of signal", + "ARDUINO_arduino_get_number_2": "", + "ARDUINO_arduino_get_sensor_number_0": "0", + "ARDUINO_arduino_get_sensor_number_1": "1", + "ARDUINO_arduino_get_sensor_number_2": "2", + "ARDUINO_arduino_get_sensor_number_3": "3", + "ARDUINO_arduino_get_sensor_number_4": "4", + "ARDUINO_arduino_get_sensor_number_5": "5", + "BITBRICK_light": "light", + "BITBRICK_IR": "IR", + "BITBRICK_touch": "touch", + "BITBRICK_potentiometer": "potentiometer", + "BITBRICK_MIC": "MIC", + "BITBRICK_UserSensor": "UserSensor", + "BITBRICK_dc_direction_ccw": "CCW", + "BITBRICK_dc_direction_cw": "CW", + "CODEino_get_sensor_number_0": "0", + "CODEino_get_sensor_number_1": "1", + "CODEino_get_sensor_number_2": "2", + "CODEino_get_sensor_number_3": "3", + "CODEino_get_sensor_number_4": "4", + "CODEino_get_sensor_number_5": "5", + "CODEino_get_sensor_number_6": "6", + "CODEino_sensor_name_0": "Sound", + "CODEino_sensor_name_1": "Light", + "CODEino_sensor_name_2": "Slider", + "CODEino_sensor_name_3": "resistance-A", + "CODEino_sensor_name_4": "resistance-B", + "CODEino_sensor_name_5": "resistance-C", + "CODEino_sensor_name_6": "resistance-D", + "CODEino_string_1": " Sensor value", + "CODEino_string_2": " Operation", + "CODEino_string_3": "Push button", + "CODEino_string_4": "Connected A", + "CODEino_string_5": "Connected B", + "CODEino_string_6": "Connected C", + "CODEino_string_7": "Connected D", + "CODEino_string_8": " 3-AXIS Accelerometer", + "CODEino_string_9": "-axis value", + "CODEino_string_10": "Sound is", + "CODEino_string_11": "Great", + "CODEino_string_12": "Small", + "CODEino_string_13": "Light is", + "CODEino_string_14": "Bright", + "CODEino_string_15": "Dark", + "CODEino_string_16": "Left tilt", + "CODEino_string_17": "Right tilt", + "CODEino_string_18": "Front tilt", + "CODEino_string_19": "Rear tilt", + "CODEino_string_20": "Reverse", + "CODEino_accelerometer_X": "X", + "CODEino_accelerometer_Y": "Y", + "CODEino_accelerometer_Z": "Z", + "ARDUINO_arduino_get_string_1": "string result of signal", + "ARDUINO_arduino_get_string_2": "", + "ARDUINO_arduino_send_1": "Send signal", + "ARDUINO_arduino_send_2": "", + "ARDUINO_num_sensor_value_1": "Analog", + "ARDUINO_num_sensor_value_2": "Sensor value", + "ARDUINO_get_digital_value_1": "Digital", + "ARDUINO_num_pin_1": "Digital", + "ARDUINO_num_pin_2": "Pin", + "ARDUINO_toggle_pwm_1": "Digital", + "ARDUINO_toggle_pwm_2": "Pin", + "ARDUINO_toggle_pwm_3": "", + "ARDUINO_on": "On", + "ARDUINO_convert_scale_1": "Map Value", + "ARDUINO_convert_scale_2": "", + "ARDUINO_convert_scale_3": "~", + "ARDUINO_convert_scale_4": "to", + "ARDUINO_convert_scale_5": "~", + "ARDUINO_convert_scale_6": "", + "ARDUINO_off": "Off", + "brightness": "Độ sáng", + "BRUSH": "Cây bút", + "BRUSH_brush_erase_all": "Xóa tất cả", + "BRUSH_change_opacity_1": "thay đổi", + "BRUSH_change_opacity_2": "% độ sáng", + "BRUSH_change_thickness_1": "Thay đổi", + "BRUSH_change_thickness_2": "độ đậm", + "BRUSH_set_color_1": "định màu sắc với màu", + "BRUSH_set_color_2": "", + "BRUSH_set_opacity_1": "xác định", + "BRUSH_set_opacity_2": "% độ sáng", + "BRUSH_set_random_color": "tự động định màu sắc", + "BRUSH_set_thickness_1": "định độ đậm", + "BRUSH_set_thickness_2": "", + "BRUSH_stamp": "Entry.stamp()", + "BRUSH_start_drawing": "bắt đầu vẽ", + "BRUSH_stop_drawing": "dừng vẽ", + "CALC": "Tính toán", + "CALC_calc_mod_1": "", + "CALC_calc_mod_2": "của phần còn lại", + "CALC_calc_mod_3": "của phần còn lại", + "CALC_calc_operation_of_1": "", + "CALC_calc_operation_of_2": "của", + "CALC_calc_operation_root": "Root", + "CALC_calc_operation_square": "x2", + "CALC_calc_rand_1": "Tự động con số từ", + "CALC_calc_rand_2": "đến", + "CALC_calc_rand_3": "", + "CALC_calc_share_1": "phần", + "CALC_calc_share_2": "/", + "CALC_calc_share_3": "của", + "CALC_coordinate_mouse_1": "con chuột đến tọa độ", + "CALC_coordinate_mouse_2": "", + "CALC_coordinate_object_1": "của Tọa độ", + "CALC_coordinate_object_2": "", + "CALC_coordinate_object_3": "", + "CALC_distance_something_1": "Khoảng cách từ đâu đến", + "CALC_distance_something_2": "", + "CALC_get_angle": "Giá các góc độ", + "CALC_get_date_1": "Date", + "CALC_get_date_2": "", + "CALC_get_date_day": "Day", + "CALC_get_date_hour": "Time(Hour)", + "CALC_get_date_minute": "Time(Minutes)", + "CALC_get_date_month": "Month", + "CALC_get_date_second": "Time(Seconds)", + "CALC_get_date_year": "Year", + "CALC_get_sound_duration_1": "Length of", + "CALC_get_sound_duration_2": "sound", + "CALC_get_timer_value": "Timer value", + "CALC_get_x_coordinate": "Giá tọa độ X", + "CALC_get_y_coordinate": "Giá các góc độ Y", + "CALC_timer_reset": "Reset timer", + "CALC_timer_visible_1": "", + "CALC_timer_visible_2": "Timer", + "CALC_timer_visible_show": "Show", + "CALC_timer_visible_hide": "Hide", + "color": "màu", + "FLOW": "Dòng", + "FLOW__if_1": "nếu", + "FLOW__if_2": "như", + "FLOW_create_clone_1": "Tạo bản sao của bản", + "FLOW_create_clone_2": "", + "FLOW_delete_clone": "Xóa bản sao này", + "FLOW_delete_clone_all": "Remove all clone", + "FLOW_if_else_1": "Nếu", + "FLOW_if_else_2": "hoặc nếu", + "FLOW_if_else_3": "không phải", + "FLOW_repeat_basic_1": " i <", + "FLOW_repeat_basic_2": " i++)", + "FLOW_repeat_basic_errorMsg": "Repeat count must greater than 0 or equal.", + "FLOW_repeat_inf": "lặp lại niều lần", + "FLOW_restart": "Restart Project", + "FLOW_stop_object_1": "Stop", + "FLOW_stop_object_2": "", + "FLOW_stop_object_all": "All objects", + "FLOW_stop_object_this_object": "This object", + "FLOW_stop_object_this_thread": "This block", + "FLOW_stop_object_other_thread": "Other block of this object", + "FLOW_stop_repeat": "Liên tục để ngăn chặn", + "FLOW_stop_run": "Exit program", + "FLOW_wait_second_1": "Chờ", + "FLOW_wait_second_2": "giây", + "FLOW_wait_until_true_1": "", + "FLOW_wait_until_true_2": "Chờ cho đến khi dược thực hiện", + "FLOW_when_clone_start": "Khi lần đầu tạo bản sao", + "FUNC": "Function", + "JUDGEMENT": "phán đoán", + "JUDGEMENT_boolean_and": "AND", + "JUDGEMENT_boolean_not_1": "Is Not", + "JUDGEMENT_boolean_not_2": "", + "JUDGEMENT_boolean_or": "OR", + "JUDGEMENT_false": "giả dối", + "JUDGEMENT_is_clicked": "Mouse clicked?", + "JUDGEMENT_is_press_some_key_1": "", + "JUDGEMENT_is_press_some_key_2": "Đã nhấn nút chìa khóa chưa?", + "JUDGEMENT_reach_something_1": "Đã chạm chưa", + "JUDGEMENT_reach_something_2": "?", + "JUDGEMENT_true": "thực tế", + "LOOKS": "hình dạng", + "LOOKS_change_scale_percent_1": "Thay đổi", + "LOOKS_change_scale_percent_2": "% kích thước", + "LOOKS_change_to_next_shape": "Thay thế bằng hình dạng khác", + "LOOKS_change_to_nth_shape_1": "Thay đổi", + "LOOKS_change_to_nth_shape_2": "theo hình dạng", + "LOOKS_change_shape_prev": "prev", + "LOOKS_change_shape_next": "next", + "LOOKS_change_to_near_shape_1": "Change to the", + "LOOKS_change_to_near_shape_2": "shape", + "LOOKS_dialog_1": "", + "LOOKS_dialog_2": "do", + "LOOKS_dialog_3": "", + "LOOKS_dialog_time_1": "", + "LOOKS_dialog_time_2": "Nói xin chào trong vong", + "LOOKS_dialog_time_3": "giây", + "LOOKS_dialog_time_4": "", + "LOOKS_erase_all_effects": "cài đặt tất cả các hiệu ứng", + "LOOKS_flip_x": "lật ngược mô hình", + "LOOKS_flip_y": "lật trái và phải mô hình", + "LOOKS_hide": "ẩn mô hinh", + "LOOKS_remove_dialog": "xóa giọng nói", + "LOOKS_set_effect_1": "", + "LOOKS_set_effect_2": "định các hiệu ứng màu", + "LOOKS_set_effect_3": "", + "LOOKS_set_effect_volume_1": "", + "LOOKS_set_effect_volume_2": "Tạo hiệu ứng màu sắc", + "LOOKS_set_effect_volume_3": "", + "LOOKS_set_object_order_1": "go to", + "LOOKS_set_object_order_2": "th layer", + "LOOKS_set_scale_percent_1": "định", + "LOOKS_set_scale_percent_2": "% kích thước", + "LOOKS_show": "Xem mô hình", + "mouse_pointer": "trỏ chuột", + "MOVING": "di chuyển", + "MOVING_bounce_wall": "Nếu chạm cuối màn hình cảm ứng sẽ bị nhảy", + "MOVING_bounce_when_1": "Bounce if reach to the", + "MOVING_bounce_when_2": "", + "MOVING_flip_arrow_horizontal": "Flip horizontally by arrow direction", + "MOVING_flip_arrow_vertical": "Flip vertically by arrow direction", + "MOVING_locate_1": "", + "MOVING_locate_2": "Tới địa điểm", + "MOVING_locate_time_1": "Di chuyển", + "MOVING_locate_time_2": "trong vòng", + "MOVING_locate_time_3": "", + "MOVING_locate_x_1": "X:", + "MOVING_locate_x_2": "Tới địa điểm", + "MOVING_locate_xy_1": "X:", + "MOVING_locate_xy_2": "Y:", + "MOVING_locate_xy_3": "Tới địa điểm", + "MOVING_locate_xy_time_1": "Di chuyển trong vòng", + "MOVING_locate_xy_time_2": "", + "MOVING_locate_xy_time_3": "", + "MOVING_locate_xy_time_4": "s", + "MOVING_locate_y_1": "Y:", + "MOVING_locate_y_2": "Tới địa điểm", + "MOVING_move_direction_1": "Di chuyển theo hướng mũi tên", + "MOVING_move_direction_2": "", + "MOVING_move_direction_angle_1": "Rotate", + "MOVING_move_direction_angle_2": "and move", + "MOVING_move_direction_angle_3": "times", + "MOVING_move_x_1": "di chuyển theo tọa độ x", + "MOVING_move_x_2": "", + "MOVING_move_xy_time_1": "Di chuyển trong vòng", + "MOVING_move_xy_time_2": "X:", + "MOVING_move_xy_time_3": "Y:", + "MOVING_move_xy_time_4": "", + "MOVING_move_y_1": "di chuyển như các tọa độ y", + "MOVING_move_y_2": "", + "MOVING_rotate_by_angle_1": "Xoay", + "MOVING_rotate_by_angle_2": "độ", + "MOVING_rotate_by_angle_dropdown_1": "Mũi tên để xoay", + "MOVING_rotate_by_angle_dropdown_2": "độ", + "MOVING_rotate_by_angle_time_1": "Xoay", + "MOVING_rotate_by_angle_time_2": "trong vòng", + "MOVING_rotate_by_angle_time_3": "", + "MOVING_rotate_direction_1": "Move direction by", + "MOVING_rotate_direction_2": "degree", + "MOVING_see_angle_1": "Xác định hướng", + "MOVING_see_angle_2": "độ", + "MOVING_see_angle_direction_1": "See angle to", + "MOVING_see_angle_direction_2": "degree", + "MOVING_see_angle_object_1": "See angle to the", + "MOVING_see_angle_object_2": "", + "MOVING_see_direction_1": "Rotate to the", + "MOVING_see_direction_2": "", + "MOVING_set_direction_by_angle_1": "Set rotation to", + "MOVING_set_direction_by_angle_2": "degree", + "MOVING_add_direction_by_angle_1": "Add rotation by", + "MOVING_add_direction_by_angle_2": "degree", + "MOVING_add_direction_by_angle_time_1": "Add rotation by", + "MOVING_add_direction_by_angle_time_2": "seconds, rotate", + "MOVING_add_direction_by_angle_time_3": "degree", + "no_target": "không đôi tượng", + "oneself": "bản thân", + "opacity": "minh bạch", + "SCENE": "cảnh", + "SOUND": "âm lượng", + "SOUND_sound_silent_all": "Dừng tất cả âm lượng", + "SOUND_sound_something_1": "", + "SOUND_sound_something_2": "Chạy âm lượng", + "SOUND_sound_something_second_1": "Play", + "SOUND_sound_something_second_2": "Sound", + "SOUND_sound_something_second_3": "seconds", + "SOUND_sound_something_second_wait_1": "Play", + "SOUND_sound_something_second_wait_2": "Sound for", + "SOUND_sound_something_second_wait_3": "seconds and wait", + "SOUND_sound_something_wait_1": "Play", + "SOUND_sound_something_wait_2": "Sound and wait", + "SOUND_sound_volume_change_1": "Thay đổi", + "SOUND_sound_volume_change_2": "% độ lớn âm lượng", + "SOUND_sound_volume_set_1": "Xác định", + "SOUND_sound_volume_set_2": "% độ lớn âm lượng", + "speak": "Phát biểu", + "START": "bắt đầu", + "START_add_message": "Thêm tín hiệu", + "START_delete_message": "xóa tín hiệu", + "START_message_cast": "Send message", + "START_message_cast_1": "", + "START_message_cast_2": "Khi gửi tín hiệu", + "START_message_cast_wait": " message and wait", + "START_message_send_wait_1": "Send", + "START_message_send_wait_2": " message and wait", + "START_mouse_click_cancled": "Khi bạn thả chuột", + "START_mouse_clicked": "Khi bạn nhấp chuột", + "START_press_some_key_1": "", + "START_press_some_key_2": "khi bạn nhấn vào nút chìa khóa", + "START_press_some_key_down": "Down", + "START_press_some_key_enter": "Enter", + "START_press_some_key_left": "Left", + "START_press_some_key_right": "Right", + "START_press_some_key_space": "Space", + "START_press_some_key_up": "Up", + "START_when_message_cast": "When message received", + "START_when_message_cast_1": "Khi nhận được tín hiệu", + "START_when_message_cast_2": "", + "START_when_object_click": "Khi bạn nhấp chuột vào đối tượng", + "START_when_object_click_canceled": "khi bạn nhả chuột vào đối tượng", + "START_when_run_button_click": "khi nhấn chuột vào nút bắt đầu", + "START_when_scene_start": "When scene was started", + "START_when_some_key_click": "When press some key", + "TEXT": "hộp định dạng chữ", + "TEXT_text": "Entry", + "TEXT_text_append_1": "After writing that", + "TEXT_text_append_2": "", + "TEXT_text_flush": "Remove all text", + "TEXT_text_prepend_1": "Add", + "TEXT_text_prepend_2": "in front of that", + "TEXT_text_write_1": "Writing that", + "TEXT_text_write_2": "", + "VARIABLE": "Biến", + "VARIABLE_add_value_to_list": "", + "VARIABLE_add_value_to_list_1": "add", + "VARIABLE_add_value_to_list_2": "to the list", + "VARIABLE_add_value_to_list_3": "", + "VARIABLE_ask_and_wait_1": "", + "VARIABLE_ask_and_wait_2": "and wait", + "VARIABLE_change_value_list_index": "", + "VARIABLE_change_value_list_index_1": "change", + "VARIABLE_change_value_list_index_3": "th element to", + "VARIABLE_change_value_list_index_2": "", + "VARIABLE_change_value_list_index_4": "", + "VARIABLE_change_variable": "Adding variable", + "VARIABLE_change_variable_1": "Thêm với", + "VARIABLE_change_variable_2": "", + "VARIABLE_change_variable_3": "không đối tượng", + "VARIABLE_change_variable_name": "Thay đổi tên biến", + "VARIABLE_combine_something_1": "join", + "VARIABLE_combine_something_2": "", + "VARIABLE_combine_something_3": "", + "VARIABLE_get_canvas_input_value": "Answer", + "VARIABLE_get_variable": "Value of variable", + "VARIABLE_get_variable_1": "", + "VARIABLE_get_variable_2": "giá số biến", + "VARIABLE_get_y": "Giá tọa độ Y", + "VARIABLE_hide_list": "", + "VARIABLE_hide_list_1": "hide", + "VARIABLE_hide_list_2": "", + "VARIABLE_hide_variable": "Hide variable", + "VARIABLE_hide_variable_1": "", + "VARIABLE_hide_variable_2": "ẩn giá", + "VARIABLE_insert_value_to_list": "", + "VARIABLE_insert_value_to_list_1": "insert", + "VARIABLE_insert_value_to_list_2": "to", + "VARIABLE_insert_value_to_list_3": "", + "VARIABLE_insert_value_to_list_4": "th position", + "VARIABLE_length_of_list": "", + "VARIABLE_length_of_list_1": "length of", + "VARIABLE_length_of_list_2": "", + "VARIABLE_list": "list", + "VARIABLE_make_variable": "Tạo một số biến", + "VARIABLE_list_option_first": "First", + "VARIABLE_list_option_last": "Last", + "VARIABLE_list_option_random": "Randomly", + "VARIABLE_remove_value_from_list": "", + "VARIABLE_remove_value_from_list_1": "", + "VARIABLE_remove_value_from_list_2": "th element from", + "VARIABLE_remove_value_from_list_3": "", + "VARIABLE_remove_variable": "xóa số biến", + "VARIABLE_set_variable": "Set variable", + "VARIABLE_set_variable_1": "Định với", + "VARIABLE_set_variable_2": "", + "VARIABLE_set_variable_3": "không đối tượng", + "VARIABLE_show_list": "", + "VARIABLE_show_list_1": "show", + "VARIABLE_show_list_2": "", + "VARIABLE_show_variable": "Show variable", + "VARIABLE_show_variable_1": "", + "VARIABLE_show_variable_2": "Xem giá", + "VARIABLE_value_of_index_from_list": "", + "VARIABLE_value_of_index_from_list_1": "value of", + "VARIABLE_value_of_index_from_list_2": "", + "VARIABLE_value_of_index_from_list_3": "th element", + "HAMSTER_hand_found": "hand found?", + "HAMSTER_sensor_leftProximity": "left proximity", + "HAMSTER_sensor_rightProximity": "right proximity", + "HAMSTER_sensor_leftFloor": "left floor", + "HAMSTER_sensor_rightFloor": "right floor", + "HAMSTER_sensor_accelerationX": "x acceleration", + "HAMSTER_sensor_accelerationY": "y acceleration", + "HAMSTER_sensor_accelerationZ": "z acceleration", + "HAMSTER_sensor_light": "light", + "HAMSTER_sensor_temperature": "temperature", + "HAMSTER_sensor_signalStrength": "signal strength", + "HAMSTER_sensor_inputA": "input A", + "HAMSTER_sensor_inputB": "input B", + "HAMSTER_move_forward_once": "move forward once on board", + "HAMSTER_turn_once_1": "turn", + "HAMSTER_turn_once_2": "once on board", + "HAMSTER_move_forward": "move forward", + "HAMSTER_move_backward": "move backward", + "HAMSTER_turn_around_1": "turn", + "HAMSTER_turn_around_2": "", + "HAMSTER_move_forward_for_secs_1": "move forward for", + "HAMSTER_move_forward_for_secs_2": "secs", + "HAMSTER_move_backward_for_secs_1": "move backward", + "HAMSTER_move_backward_for_secs_2": "secs", + "HAMSTER_turn_for_secs_1": "turn", + "HAMSTER_turn_for_secs_2": "for", + "HAMSTER_turn_for_secs_3": "secs", + "HAMSTER_change_both_wheels_by_1": "change wheel by left:", + "HAMSTER_change_both_wheels_by_2": "right:", + "HAMSTER_change_both_wheels_by_3": "", + "HAMSTER_set_both_wheels_to_1": "set wheel to left:", + "HAMSTER_set_both_wheels_to_2": "right:", + "HAMSTER_set_both_wheels_to_3": "", + "HAMSTER_change_wheel_by_1": "change", + "HAMSTER_change_wheel_by_2": "wheel by", + "HAMSTER_change_wheel_by_3": "", + "HAMSTER_set_wheel_to_1": "set", + "HAMSTER_set_wheel_to_2": "wheel to", + "HAMSTER_set_wheel_to_3": "", + "HAMSTER_follow_line_using_1": "follow", + "HAMSTER_follow_line_using_2": "line using", + "HAMSTER_follow_line_using_3": "floor sensor", + "HAMSTER_follow_line_until_1": "follow", + "HAMSTER_follow_line_until_2": "line until", + "HAMSTER_follow_line_until_3": "intersection", + "HAMSTER_set_following_speed_to_1": "set following speed to", + "HAMSTER_set_following_speed_to_2": "", + "HAMSTER_front": "front", + "HAMSTER_rear": "rear", + "HAMSTER_stop": "stop", + "HAMSTER_set_led_to_1": "set", + "HAMSTER_set_led_to_2": "led to", + "HAMSTER_set_led_to_3": "", + "HAMSTER_clear_led_1": "clear", + "HAMSTER_clear_led_2": "led", + "HAMSTER_color_cyan": "cyan", + "HAMSTER_color_magenta": "magenta", + "HAMSTER_color_black": "black", + "HAMSTER_beep": "beep", + "HAMSTER_change_buzzer_by_1": "change buzzer by", + "HAMSTER_change_buzzer_by_2": "", + "HAMSTER_set_buzzer_to_1": "set buzzer to", + "HAMSTER_set_buzzer_to_2": "", + "HAMSTER_clear_buzzer": "clear buzzer", + "HAMSTER_play_note_for_1": "play note", + "HAMSTER_play_note_for_2": "", + "HAMSTER_play_note_for_3": "for", + "HAMSTER_play_note_for_4": "beats", + "HAMSTER_rest_for_1": "rest for", + "HAMSTER_rest_for_2": "beats", + "HAMSTER_change_tempo_by_1": "change tempo by", + "HAMSTER_change_tempo_by_2": "", + "HAMSTER_set_tempo_to_1": "set tempo to", + "HAMSTER_set_tempo_to_2": "bpm", + "HAMSTER_set_port_to_1": "set port", + "HAMSTER_set_port_to_2": "to", + "HAMSTER_set_port_to_3": "", + "HAMSTER_change_output_by_1": "change output", + "HAMSTER_change_output_by_2": "by", + "HAMSTER_change_output_by_3": "", + "HAMSTER_set_output_to_1": "set output", + "HAMSTER_set_output_to_2": "to", + "HAMSTER_set_output_to_3": "", + "HAMSTER_port_a": "A", + "HAMSTER_port_b": "B", + "HAMSTER_port_ab": "A and B", + "HAMSTER_analog_input": "analog input", + "HAMSTER_digital_input": "digital input", + "HAMSTER_servo_output": "servo output", + "HAMSTER_pwm_output": "pwm output", + "HAMSTER_digital_output": "digital output", + "ALBERT_hand_found": "hand found?", + "ALBERT_sensor_leftProximity": "left proximity", + "ALBERT_sensor_rightProximity": "right proximity", + "ALBERT_sensor_light": "light", + "ALBERT_sensor_battery": "battery", + "ALBERT_sensor_signalStrength": "signal strength", + "ALBERT_sensor_frontOid": "front oid", + "ALBERT_sensor_backOid": "back oid", + "ALBERT_sensor_positionX": "x position", + "ALBERT_sensor_positionY": "y position", + "ALBERT_sensor_orientation": "orientation", + "ALBERT_move_forward": "move forward", + "ALBERT_move_backward": "move backward", + "ALBERT_turn_around_1": "turn", + "ALBERT_turn_around_2": "", + "ALBERT_move_forward_for_secs_1": "move forward for", + "ALBERT_move_forward_for_secs_2": "secs", + "ALBERT_move_backward_for_secs_1": "move backward for", + "ALBERT_move_backward_for_secs_2": "secs", + "ALBERT_turn_for_secs_1": "turn", + "ALBERT_turn_for_secs_2": "for", + "ALBERT_turn_for_secs_3": "secs", + "ALBERT_change_both_wheels_by_1": "change wheels by left:", + "ALBERT_change_both_wheels_by_2": "right:", + "ALBERT_change_both_wheels_by_3": "", + "ALBERT_set_both_wheels_to_1": "set wheels to left:", + "ALBERT_set_both_wheels_to_2": "right:", + "ALBERT_set_both_wheels_to_3": "", + "ALBERT_change_wheel_by_1": "change", + "ALBERT_change_wheel_by_2": "wheel by", + "ALBERT_change_wheel_by_3": "", + "ALBERT_set_wheel_to_1": "set", + "ALBERT_set_wheel_to_2": "wheel to", + "ALBERT_set_wheel_to_3": "", + "ALBERT_stop": "stop", + "ALBERT_set_pad_size_to_1": "set pad size to width:", + "ALBERT_set_pad_size_to_2": "height:", + "ALBERT_set_pad_size_to_3": "", + "ALBERT_set_eye_to_1": "set", + "ALBERT_set_eye_to_2": "eye to", + "ALBERT_set_eye_to_3": "", + "ALBERT_clear_eye_1": "clear", + "ALBERT_clear_eye_2": "eye", + "ALBERT_body_led_1": "", + "ALBERT_body_led_2": "body led", + "ALBERT_front_led_1": "", + "ALBERT_front_led_2": "front led", + "ALBERT_color_cyan": "cyan", + "ALBERT_color_magenta": "magenta", + "ALBERT_beep": "beep", + "ALBERT_change_buzzer_by_1": "change buzzer by", + "ALBERT_change_buzzer_by_2": "", + "ALBERT_set_buzzer_to_1": "set buzzer to", + "ALBERT_set_buzzer_to_2": "", + "ALBERT_clear_buzzer": "clear buzzer", + "ALBERT_play_note_for_1": "play note", + "ALBERT_play_note_for_2": "", + "ALBERT_play_note_for_3": "for", + "ALBERT_play_note_for_4": "beats", + "ALBERT_rest_for_1": "rest for", + "ALBERT_rest_for_2": "beats", + "ALBERT_change_tempo_by_1": "change tempo by", + "ALBERT_change_tempo_by_2": "", + "ALBERT_set_tempo_to_1": "set tempo to", + "ALBERT_set_tempo_to_2": "bpm", + "VARIABLE_variable": "variable", + "wall": "tường", + "robotis_common_case_01": "(을)를", + "robotis_common_set": "(으)로 정하기", + "robotis_common_value": "값", + "robotis_common_clockwhise": "시계방향", + "robotis_common_counter_clockwhise": "반시계방향", + "robotis_common_wheel_mode": "회전모드", + "robotis_common_joint_mode": "관절모드", + "robotis_common_red_color": "빨간색", + "robotis_common_green_color": "녹색", + "robotis_common_blue_color": "파란색", + "robotis_common_on": "켜기", + "robotis_common_off": "끄기", + "robotis_common_cm": "제어기", + "robotis_common_port_1": "포트 1", + "robotis_common_port_2": "포트 2", + "robotis_common_port_3": "포트 3", + "robotis_common_port_4": "포트 4", + "robotis_common_port_5": "포트 5", + "robotis_common_port_6": "포트 6", + "robotis_common_play_buzzer": "연주", + "robotis_common_play_motion": "실행", + "robotis_common_motion": "모션", + "robotis_common_index_number": "번", + "robotis_cm_custom": "직접입력 주소", + "robotis_cm_spring_left": "왼쪽 접촉 센서", + "robotis_cm_spring_right": "오른쪽 접촉 센서", + "robotis_cm_led_left": "왼쪽 LED", + "robotis_cm_led_right": "오른쪽 LED", + "robotis_cm_led_both": "양 쪽 LED", + "robotis_cm_switch": "선택 버튼 상태", + "robotis_cm_user_button": "사용자 버튼 상태", + "robotis_cm_sound_detected": "최종 소리 감지 횟수", + "robotis_cm_sound_detecting": "실시간 소리 감지 횟수", + "robotis_cm_ir_left": "왼쪽 적외선 센서", + "robotis_cm_ir_right": "오른쪽 적외선 센서", + "robotis_cm_calibration_left": "왼쪽 적외선 센서 캘리브레이션 값", + "robotis_cm_calibration_right": "오른쪽 적외선 센서 캘리브레이션 값", + "robotis_cm_clear_sound_detected": "최종소리감지횟수 초기화", + "robotis_cm_buzzer_index": "음계값", + "robotis_cm_buzzer_melody": "멜로디", + "robotis_cm_led_1": "1번 LED", + "robotis_cm_led_4": "4번 LED", + "robotis_aux_servo_position": "서보모터 위치", + "robotis_aux_ir": "적외선센서", + "robotis_aux_touch": "접촉센서", + "robotis_aux_brightness": "조도센서(CDS)", + "robotis_aux_hydro_themo_humidity": "온습도센서(습도)", + "robotis_aux_hydro_themo_temper": "온습도센서(온도)", + "robotis_aux_temperature": "온도센서", + "robotis_aux_ultrasonic": "초음파센서", + "robotis_aux_magnetic": "자석센서", + "robotis_aux_motion_detection": "동작감지센서", + "robotis_aux_color": "컬러센서", + "robotis_aux_custom": "사용자 장치", + "robotis_carCont_aux_motor_speed_1": "감속모터 속도를", + "robotis_carCont_aux_motor_speed_2": ", 출력값을", + "robotis_carCont_calibration_1": "적외선 센서 캘리브레이션 값을", + "robotis_openCM70_aux_motor_speed_1": "감속모터 속도를", + "robotis_openCM70_aux_motor_speed_2": ", 출력값을", + "robotis_openCM70_aux_servo_mode_1": "서보모터 모드를", + "robotis_openCM70_aux_servo_speed_1": "서보모터 속도를", + "robotis_openCM70_aux_servo_speed_2": ", 출력값을", + "robotis_openCM70_aux_servo_position_1": "서보모터 위치를", + "robotis_openCM70_aux_led_module_1": "LED 모듈을", + "robotis_openCM70_aux_custom_1": "사용자 장치를", + "CALC_rotation_value": "rotation value", + "CALC_direction_value": "direction value", + "VARIABLE_is_included_in_list_1": "is included in", + "VARIABLE_is_included_in_list_2": "value", + "VARIABLE_is_included_in_list_3": "", + "SCENE_when_scene_start": "When scene started", + "SCENE_start_scene_1": "", + "SCENE_start_scene_2": "", + "SCENE_start_neighbor_scene_1": "", + "SCENE_start_neighbor_scene_2": "", + "SCENE_start_scene_pre": "previous", + "SCENE_start_scene_next": "next", + "FUNCTION_explanation_1": "name", + "FUNCTION_character_variable": "character variable", + "FUNCTION_logical_variable": "logical variable", + "FUNCTION_function": "function", + "FUNCTION_define": "Define function", + "CALC_calc_operation_sin": "", + "CALC_calc_operation_cos": "", + "CALC_calc_operation_tan": "", + "CALC_calc_operation_floor": "", + "CALC_calc_operation_ceil": "", + "CALC_calc_operation_round": "", + "CALC_calc_operation_factorial": "factorial value", + "CALC_calc_operation_asin": "", + "CALC_calc_operation_acos": "", + "CALC_calc_operation_atan": "", + "CALC_calc_operation_log": "log value", + "CALC_calc_operation_ln": "natural log value", + "CALC_calc_operation_natural": "integer value", + "CALC_calc_operation_unnatural": "decimal value", + "MOVING_locate_object_time_1": "Di chuyển", + "MOVING_locate_object_time_2": "trong vòng", + "MOVING_locate_object_time_3": "", + "wall_up": "upper wall", + "wall_down": "down wall", + "wall_right": "right wall", + "wall_left": "left wall", + "CALC_coordinate_x_value": "coordinate x", + "CALC_coordinate_y_value": "coordinate y", + "CALC_coordinate_rotation_value": "rotation", + "CALC_coordinate_direction_value": "direction", + "CALC_picture_index": "index of picture", + "CALC_picture_name": "name of picture", + "FLOW_repeat_while_true_1": "Repeat", + "FLOW_repeat_while_true_2": "", + "TUT_when_start": "", + "TUT_move_once": "", + "TUT_rotate_left": "", + "TUT_rotate_right": "", + "TUT_jump_barrier": "", + "TUT_repeat_tutorial_1": "", + "TUT_repeat_tutorial_2": "", + "TUT_if_barrier_1": "", + "TUT_if_barrier_2": "", + "TUT_if_conical_1": "", + "TUT_if_conical_2": "", + "TUT_repeat_until": "", + "TUT_repeat_until_gold": "", + "TUT_declare_function": "", + "TUT_call_function": "", + "CALC_calc_operation_abs": "absolute value", + "CONTEXT_COPY_option": "copy codes", + "Delete_Blocks": "delete code(s)", + "Duplication_option": "copy & paste", + "Paste_blocks": "paste code(s)", + "Clear_all_blocks": "remove all codes", + "transparency": "Transparency", + "BRUSH_change_brush_transparency_1": "thay đổi", + "BRUSH_change_brush_transparency_2": "% độ sáng", + "BRUSH_set_brush_transparency_1": "xác định", + "BRUSH_set_brush_transparency_2": "% độ sáng", + "CALC_char_at_1": "letter", + "CALC_char_at_2": "of", + "CALC_char_at_3": "", + "CALC_length_of_string_1": "length of", + "CALC_length_of_string_2": "", + "CALC_substring_1": "substring of", + "CALC_substring_2": "from", + "CALC_substring_3": "to", + "length_of_string": "to", + "CALC_substring_4": "", + "CALC_replace_string_1": "replace", + "CALC_replace_string_2": "in", + "CALC_replace_string_3": "with", + "CALC_replace_string_4": "", + "CALC_change_string_case_1": "", + "CALC_change_string_case_2": "of", + "CALC_change_string_case_3": "", + "CALC_change_string_case_sub_1": "uppercase", + "CALC_change_string_case_sub_2": "lowercase", + "CALC_index_of_string_1": "index of", + "CALC_index_of_string_2": "in", + "CALC_index_of_string_3": "", + "MOVING_add_direction_by_angle_time_explain_1": "", + "MOVING_direction_relative_duration_1": "Adding direction while", + "MOVING_direction_relative_duration_2": "seconds by", + "MOVING_direction_relative_duration_3": "", + "CALC_get_sound_volume": "Volume", + "SOUND_sound_from_to_1": "Play", + "SOUND_sound_from_to_2": "Sound", + "SOUND_sound_from_to_3": "to", + "SOUND_sound_from_to_4": "seconds", + "SOUND_sound_from_to_and_wait_1": "Play", + "SOUND_sound_from_to_and_wait_2": "Sound", + "SOUND_sound_from_to_and_wait_3": "to", + "SOUND_sound_from_to_and_wait_4": "seconds and wait", + "CALC_quotient_and_mod_1": "", + "CALC_quotient_and_mod_2": "of", + "CALC_quotient_and_mod_3": "/", + "CALC_quotient_and_mod_4": "", + "CALC_quotient_and_mod_sub_1": "Quotient", + "CALC_quotient_and_mod_sub_2": "Rest", + "self": "Self", + "CALC_coordinate_size_value": "Scale", + "CALC_choose_project_timer_action_1": "", + "CALC_choose_project_timer_action_2": "timer", + "CALC_choose_project_timer_action_sub_1": "Start", + "CALC_choose_project_timer_action_sub_2": "Stop", + "CALC_choose_project_timer_action_sub_3": "Reset", + "LOOKS_change_object_index_1": "bring to", + "LOOKS_change_object_index_2": "", + "LOOKS_change_object_index_sub_1": "front", + "LOOKS_change_object_index_sub_2": "forward", + "LOOKS_change_object_index_sub_3": "backward", + "LOOKS_change_object_index_sub_4": "back", + "FLOW_repeat_while_true_until": "until", + "FLOW_repeat_while_true_while": "while", + "copy_block": "", + "delete_block": "", + "tidy_up_block": "", + "block_hi": "", + "entry_bot_name": "", + "hi_entry": "", + "bark_dog": "", + "walking_entryBot": "", + "entry": "", + "hello": "", + "nice": "" +}; +Lang.Buttons = { + "apply": "Áp dụng", + "cancel": "Hủy bỏ", + "save": "Áp dụng", + "start": "bắt đầu", + "confirm": "Áp dụng", + "delete": "", + "create": "", + "done": "", + "accept": "", + "refuse": "", + "yes": "", + "button_no": "" +}; +Lang.ko = "한국어"; +Lang.Menus = { + "about": "Tìm hiểu thêm", + "articles": "Thảo luận", + "gallery": "xem", + "learn": "học tập", + "login": "Sign In", + "logout": "Sign Out", + "make": "Tạo", + "register": "Sign Up", + "Join": "Join", + "Edit_info": "Edit info", + "Discuss": "Discuss", + "Explore": "Explore", + "Load": "Load", + "My_lesson": "Open Lessons", + "Resources": "Resources", + "play_software": "Let’s play, SW!", + "problem_solve": "Problem Solving", + "Learn": "Learn", + "teaching_tools": "Teaching Tools", + "about_entry": "About ENTRY", + "what_entry": "What is ENTRY?", + "create": "Create", + "create_new": "Create new", + "start_programming": "First Step for Software Education", + "Entry": "ENTRY", + "intro_learning": "Learn to code in fun and easy way.", + "intro_learning_anyone": "Start now with Entry!", + "start_now": "For Free, Forever.", + "welcome_entry": "Welcome to ENTRY", + "student": "Student", + "non_menber": "Non-member", + "teacher": "Teacher", + "terms_conditions": "Terms and Conditions", + "personal_information": "", + "limitation_liability": "Limitation of Liability and Duty of Announcement", + "entry_agree": "Agree to ENTRY’s Terms of Use", + "info_agree": "", + "next": "Next", + "enter_id": "", + "enter_password": "Enter Password", + "confirm_password": "Confirm Password", + "enter_password_again": "Enter your password again", + "validation_password": "Please use at least 5 letters and/or numbers", + "validation_id": "Please use 4-20 letters and/or numbers.", + "prev": "Back", + "born_year": "Year born", + "select_born": "Select the year you were born.", + "year": "years", + "gender": "Gender", + "choose_gender": "Choose gender", + "male": "Male", + "female": "Female", + "language": "Language", + "best_language": "Select your best language", + "korean": "Korean", + "english": "English", + "viet": "Vietnamese", + "option_email": "Email (optional)", + "insert_email": "Enter your email address", + "sign_up_complete": "Sign up complete!", + "agree_terms_conditions": "Please agree Terms and Conditions", + "agree_personal_information": "", + "insert_studying_stage": "", + "insert_born_year": "Insert the year you were born", + "insert_gender": "Insert gender", + "select_language": "select language", + "check_email": "Check email's format", + "already_exist_id": "email already exists", + "id_validation_id": "ID use 4-20 letters and/or numbers.", + "password_validate_pwd": "Password use at least 5 letters and/or numbers", + "insert_same_pwd": "Insert same password", + "studying_stage_group": "", + "studying_stage": "", + "password": "Password", + "save_id": "Save ID", + "forgot_password": "", + "did_not_join": "Haven’t signed up yet?", + "go_join": "Go to join", + "first_step": "", + "entry_content_one": "", + "entry_content_two": "", + "entry_content_three": "", + "funny_space": "", + "in_learn_section": "", + "learn_problem_solving": "", + "joy_create": "", + "in_make": "", + "make_contents": "", + "and_content": "", + "share_collaborate": "", + "explore_contents": "", + "why_software": "", + "speak_obama_contents": "", + "obama": "", + "us_president": "", + "billgates_contents": "", + "billgates": "", + "chairman_micro": "", + "eric_contents": "", + "eric": "", + "sandbug_contents": "", + "sandbug": "", + "view_entry_tools": "", + "solve_problem": "", + "solve_problem_content": "", + "find_extra_title": "", + "all_ages": "", + "total": "", + "step": "", + "find_extra_contents": "", + "software_play_contents": "", + "resources_contents": "", + "from": "", + "sw_camp": "", + "elementary": "", + "middle": "", + "grades": "", + "lesson": "", + "sw_contents_one": "", + "sw_camp_detail": "", + "sw_contents_two": "", + "sw_contents_three": "", + "naver_sw": "", + "teacher_teaching": "", + "funny_sw": "", + "sw_contents_four": "", + "ct_text_5": "", + "teacher_grade_5": "", + "ct_text_5_content": "", + "ct_text_6": "", + "teacher_grade_6": "", + "ct_text_6_content": "", + "sw_use": "", + "title": "", + "writer": "", + "view": "", + "date": "", + "find_id_pwd": "", + "send_email": "", + "user_not_exist": "", + "not_signup": "", + "send": "", + "sensorboard": "", + "physical_computing": "", + "sensorboard_contents": "", + "entrybot_boardgame": "", + "unplugged": "", + "unplugged_contents": "", + "entrybot_cardgame": "", + "entrybot_cardgame_contents": "", + "basic_learn": "", + "basic_learn_contents": "", + "troubleshooting": "", + "playsoftware": "", + "make_own_lesson": "", + "lecture": "", + "curriculum": "", + "group_lecture": "", + "group_curriculum": "", + "group_homework": "", + "group_noproject": "", + "group_nolecture": "", + "group_nocurriculum": "", + "lecture_contents": "", + "curriculum_contents": "", + "grade_info": "", + "difficulty": "", + "usage": "", + "learning_concept": "", + "related_subject": "", + "show_more": "", + "close": "", + "latest": "", + "viewer": "", + "like": "", + "comment": "", + "entire_period": "", + "today": "", + "latest_week": "", + "latest_month": "", + "latest_three_month": "", + "current_password": "", + "incorrect_password": "", + "new_password": "", + "password_option_1": "", + "again_new_password": "", + "enter_new_pwd": "", + "enter_new_pwd_again": "", + "password_match": "", + "incorrect_email": "", + "edit_button": "", + "edit_profile": "", + "my_project": "", + "my_group": "", + "mark": "", + "prev_state": "", + "profile_image": "", + "insert_profile_image": "", + "at_least_180": "", + "upload_image": "", + "main_image": "", + "about_me": "", + "save_change": "", + "basic_image": "", + "profile_condition": "", + "profile_back": "", + "make_project": "", + "exhibit_project": "", + "art_list_shared": "", + "art_list_group_shared": "", + "view_project": "", + "comment_view": "", + "upload_project": "", + "edit": "", + "save_complete": "", + "just_like": "", + "share": "", + "who_likes_project": "", + "people_interest": "", + "none_person": "", + "inserted_date": "", + "last_modified": "", + "original_project": "", + "for_someone": "", + "original_project_deleted": "", + "delete_project": "", + "currnet_month_time": "", + "current_day_time": "", + "game": "", + "animation": "", + "media_art": "", + "physical": "", + "etc": "", + "connected_contents": "", + "connected_contents_content": "", + "basic_mission": "", + "basic_mission_content": "", + "application_mission": "", + "write_article": "Write", + "view_all_articles": "View all articles", + "view_own_articles": "View own articles", + "learning_materials": "", + "ebs_software_first": "", + "go_software": "", + "ebs_context": "", + "category": "Category", + "add_picture": "Add Picture", + "upload_article": "Upload article", + "list": "List", + "report": "Report", + "upload": "Upload", + "staff_picks": "Staff Picks", + "popular_picks": "Popular Projects", + "lecture_header_more": "", + "lecture_header_reset": "", + "lecture_header_reset_exec": "", + "lecture_header_save": "", + "lecture_header_save_content": "", + "lecture_header_export_project": "", + "lecture_header_undo": "", + "lecture_header_redo": "", + "lecture_header_bugs": "", + "lecture_container_tab_object": "", + "lecture_container_tab_video": "", + "lecture_container_tab_project": "", + "lecture_container_tab_help": "", + "illigal": "", + "verbal": "", + "commertial": "", + "explicit": "", + "other": "", + "report_result": "", + "report_success": "", + "etc_detail": "", + "lecture_play": "", + "list_view_link": "", + "lecture_intro": "", + "study_goal": "", + "study_description": "", + "study_created": "", + "study_last_updated": "", + "study_remove": "", + "study_edit": "", + "study_comments": "", + "study_comment_post": "", + "study_comment_remove": "", + "study_comment_edit": "", + "study_comment_save": "", + "study_guide_video": "", + "study_basic_project": "", + "study_done_project": "", + "study_usage_element": "", + "study_concept_element": "", + "study_subject_element": "", + "study_element_none": "", + "study_label_like": "", + "study_label_interest": "", + "study_label_share": "", + "study_label_like_people": "", + "study_label_interest_people": "", + "study_related_lectures": "", + "study_expand": "", + "study_collapse": "", + "aftercopy": "", + "study_remove_curriculum": "", + "content_required": "", + "study_remove_lecture": "", + "lecture_build": "", + "lecture_build_step1": "", + "lecture_build_step2": "", + "lecture_build_step3": "", + "lecture_build_choice": "", + "lecture_build_project": "", + "lecture_build_video": "", + "lecture_build_grade": "", + "lecture_build_goals": "", + "lecture_build_add_goal": "", + "lecture_build_attach": "", + "lecture_build_attach_text": "", + "lecture_build_assist": "", + "lecture_build_youtube_url": "", + "lecture_build_project_done": "", + "lecture_build_scene_text1": "", + "lecture_build_scene_text2": "", + "lecture_build_object_text": "", + "lecture_build_blocks_text1": "", + "lecture_build_blocks_text2": "", + "lecture_build_basic1": "", + "lecture_build_basic2": "", + "lecture_build_help": "", + "lecture_build_help_never": "", + "lecture_build_close": "", + "lecture_build_scene": "", + "lecture_build_add_object": "", + "lecture_build_start": "", + "lecture_build_tab_code": "", + "lecture_build_tab_shape": "", + "lecture_build_tab_sound": "", + "lecture_build_tab_attribute": "", + "lecture_build_block_category": "", + "lecture_build_attr_all": "", + "lecture_build_attr_var": "", + "lecture_build_attr_signal": "", + "lecture_build_attr_list": "", + "lecture_build_attr_func": "", + "lecture_build_edit": "", + "lecture_build_remove": "", + "curriculum_build": "", + "curriculum_step1": "", + "curriculum_step2": "", + "curriculum_step3": "", + "curriculum_lecture_upload": "", + "curriculum_lecture_edit": "", + "curriculum_lecture_open": "", + "group_lecture_add": "", + "group_curriculum_add": "", + "group_lecture_delete": "", + "group_curriculum_delete": "", + "group_select": "", + "group_studentNo": "", + "group_username": "", + "group_userId": "", + "group_tempPassword": "", + "group_gender": "", + "group_studentCode": "", + "group_viewWorks": "", + "added_group_lecture": "", + "added_group_curriculum": "", + "deleted_group_lecture": "", + "deleted_group_curriculum": "", + "modal_my": "", + "modal_interest": "", + "modal_project": "", + "section": "", + "connect_hw": "connect hardware", + "connect_message": "Connected to %1", + "connect_fail": "Connect fail", + "interest_curriculum": "Interest", + "searchword_required": "Search word required.", + "file_required": "File is required.", + "file_upload_max_count": "Maximum 10 files are available at once.", + "image_file_only": "Uploads permitted on image files only.", + "file_upload_max_size": "Uploading limited under 10MB on each files.", + "curriculum_modal_lectures": "My Lectures", + "curriculum_modal_interest": "Interest", + "group_curriculum_modal_curriculums": "My Courses", + "group_curriculum_modal_interest": "Interest", + "picture_import": "Import a picture", + "picture_select": "Select a picture", + "lecture_list_view": "", + "play_software_2": "", + "play_software_2_content": "", + "open_project_to_all": "", + "close_project": "", + "category_media_art": "Media Art", + "go_further": "", + "marked_project": "", + "basic": "", + "application": "", + "the_great_escape": "", + "escape_guide_1": "", + "escape_guide_1_2": "", + "escape_guide_2": "", + "escape_guide_2_2": "", + "escape_guide_3": "", + "escape_guide_3_2": "", + "escape_guide_4": "", + "escape_guide_4_2": "", + "space_travel_log": "", + "space_guide_1": "", + "space_guide_2": "", + "space_guide_2_2": "", + "cfest_mission": "", + "maze_1_intro": "", + "maze_1_title": "", + "maze_1_content": "", + "maze_1_detail": "", + "maze_2_intro": "", + "maze_2_title_1": "", + "maze_2_content_1": "", + "maze_2_detail_1": "", + "maze_2_title_2": "", + "maze_2_content_2": "", + "maze_2_detail_2": "", + "maze_3_intro": "", + "maze_3_title": "", + "maze_3_content": "", + "maze_3_detail": "", + "maze_4_intro": "", + "maze_4_title": "", + "maze_4_content": "", + "maze_4_detail": "", + "maze_5_intro": "", + "maze_5_title_1": "", + "maze_5_content_1": "", + "maze_5_detail_1": "", + "maze_5_title_2": "", + "maze_5_content_2": "", + "maze_5_detail_2": "", + "maze_6_intro": "", + "maze_6_title_1": "", + "maze_6_content_1": "", + "maze_6_detail_1": "", + "maze_6_title_2": "", + "maze_6_content_2": "", + "maze_6_detail_2": "", + "maze_programing_mode_0": "", + "maze_programing_mode_1": "", + "maze_operation1_title": "", + "maze_operation1_1_desc": "", + "maze_operation1_2_desc": "", + "maze_operation1_2_textset_1": "", + "maze_operation1_2_textset_2": "", + "maze_operation1_3_desc": "", + "maze_operation1_4_desc": "", + "maze_operation7_title": "", + "maze_operation7_1_desc": "", + "maze_operation7_2_desc": "", + "maze_operation7_3_desc": "", + "maze_operation7_4_desc": "", + "maze_operation7_1_textset_1": "", + "maze_operation7_1_textset_2": "", + "maze_operation7_2_textset_1": "", + "maze_operation7_2_textset_2": "", + "maze_operation7_4_textset_1": "", + "maze_operation7_4_textset_2": "", + "maze_operation9_title": "", + "maze_operation9_1_desc": "", + "maze_operation9_2_desc": "", + "maze_operation9_3_desc": "", + "maze_operation9_1_textset_1": "", + "maze_operation9_3_textset_1": "", + "maze_operation9_3_textset_2": "", + "maze_operation10_title": "", + "maze_operation10_1_desc": "", + "maze_operation10_2_desc": "", + "maze_operation10_3_desc": "", + "maze_operation10_4_desc": "", + "maze_operation10_1_textset_1": "", + "maze_operation10_1_textset_2": "", + "maze_operation10_1_textset_3": "", + "maze_operation10_1_textset_4": "", + "maze_operation10_2_textset_1": "", + "maze_operation10_2_textset_2": "", + "maze_operation10_3_textset_1": "", + "maze_operation10_3_textset_2": "", + "maze_operation10_4_textset_1": "", + "maze_operation10_4_textset_2": "", + "maze_operation10_4_textset_3": "", + "maze_operation15_title": "", + "maze_operation15_1_desc": "", + "maze_operation15_2_desc": "", + "maze_operation15_3_desc": "", + "maze_operation15_4_desc": "", + "maze_operation15_1_textset_1": "", + "maze_operation15_1_textset_2": "", + "maze_operation15_1_textset_3": "", + "maze_operation15_2_textset_1": "", + "maze_operation15_2_textset_2": "", + "maze_operation15_3_textset_1": "", + "maze_operation15_3_textset_2": "", + "maze_operation15_4_textset_1": "", + "maze_operation15_4_textset_2": "", + "maze_operation15_4_textset_3": "", + "maze_object_title": "", + "maze_object_parts_box": "", + "maze_object_obstacle1": "", + "maze_object_obstacle2": "", + "maze_object_obstacle3": "", + "maze_object_friend": "", + "maze_object_wall1": "", + "maze_object_wall2": "", + "maze_object_wall3": "", + "maze_object_battery": "", + "maze_command_ex": "", + "maze_command_title": "", + "maze_command_move_desc": "", + "maze_command_jump_desc": "", + "maze_command_right_desc": "", + "maze_command_left_desc": "", + "maze_command_for_desc": "", + "maze_command_while_desc": "", + "maze_command_if1_desc": "", + "maze_command_if2_desc": "", + "maze_command_if3_desc": "", + "maze_command_promise_desc": "", + "perfect": "", + "succeeded_using_blocks": "", + "awesome": "", + "succeeded_go_to_next": "", + "good": "", + "but": "", + "try_again": "", + "cfest_success": "", + "succeeded_and_cert": "", + "cause_msgs_1": "", + "cause_msgs_2": "", + "cause_msgs_3": "", + "cause_msgs_4": "", + "cause_msgs_5": "", + "close_experience": "", + "replay": "", + "go_to_next_level": "", + "move_forward": "", + "turn_left": "", + "turn_right": "", + "turn_en": "", + "turn_ko": "", + "jump_over": "", + "when_start_is_pressed": "", + "repeat_until_ko": "", + "repeat_until_en": "", + "repeat_until": "", + "if_there_is_1": "", + "if_there_is_2": "", + "used_blocks": "", + "maximum": "", + "used_command": "", + "maximum_command": "", + "block_box": "", + "block_assembly": "", + "command_box": "", + "command_assembly": "", + "start": "", + "engine_running": "", + "engine_replay": "", + "goto_show": "", + "make_together": "", + "make_together_content": "", + "project_nobody_like": "", + "project_nobody_interest": "", + "lecture_nobody_like": "", + "lecture_nobody_interest": "", + "course_nobody_like": "", + "course_nobody_interest": "", + "before_changed": "", + "after_changed": "", + "from_changed": "", + "essential": "", + "access_term_title": "", + "member_info": "", + "personal_info": "", + "option": "", + "latest_news": "", + "edu_data": "", + "footer_phrase": "", + "footer_use_free": "", + "nonprofit_platform": "", + "this_is": "", + "privacy": "", + "entry_addr": "", + "phone": "", + "alert_agree_term": "", + "alert_private_policy": "", + "agree": "", + "optional": "", + "start_software": "", + "analyze_procedure": "", + "analyze_repeat": "", + "analyze_condition": "", + "analyze_interaction": "", + "analyze_dataRepresentation": "", + "analyze_abstraction": "", + "analyze_sync": "", + "jr_intro_1": "", + "jr_intro_2": "", + "jr_intro_3": "", + "jr_intro_4": "", + "jr_intro_5": "", + "jr_intro_6": "", + "jr_intro_7": "", + "jr_intro_8": "", + "jr_intro_9": "", + "jr_intro_10": "", + "jr_intro_11": "", + "jr_intro_12": "", + "jr_intro_13": "", + "jr_intro_14": "", + "jr_intro_15": "", + "jr_whats_ur_name": "", + "jr_down_cert": "", + "jr_popup_prefix_1": "", + "jr_popup_prefix_2": "", + "jr_popup_suffix": "", + "jr_fail_dont_go": "", + "jr_fail_dont_know": "", + "jr_fail_no_flower": "", + "jr_fail_forgot_flower": "", + "jr_fail_need_repeat": "", + "jr_hint_1": "", + "jr_hint_2": "", + "jr_hint_3": "", + "jr_hint_4": "", + "jr_hint_5": "", + "jr_hint_6": "", + "jr_hint_7": "", + "jr_hint_8": "", + "jr_hint_9": "", + "jr_hint_10": "", + "jr_hint_11": "", + "jr_hint_12": "", + "jr_hint_13": "", + "jr_hint_14": "", + "jr_hint_15": "", + "jr_certification": "", + "jr_congrat": "", + "jr_congrat_msg": "", + "jr_share": "", + "go_see_friends": "", + "junior_naver": "", + "junior_naver_contents_1": "", + "junior_naver_contents_2": "", + "junior_naver_contents_3": "", + "basic_content": "", + "jr_help": "", + "help": "", + "cparty_robot_intro_1": "", + "cparty_robot_intro_2": "", + "cparty_robot_intro_3": "", + "cparty_robot_intro_4": "", + "cparty_robot_intro_5": "", + "cparty_robot_intro_6": "", + "cparty_robot_intro_7": "", + "cparty_robot_intro_8": "", + "cparty_robot_intro_9": "", + "cparty_robot_intro_10": "", + "cparty_car_intro_1": "", + "cparty_car_intro_2": "", + "cparty_car_intro_3": "", + "cparty_car_intro_4": "", + "cparty_car_intro_5": "", + "cparty_car_intro_6": "", + "cparty_car_intro_7": "", + "cparty_car_intro_8": "", + "cparty_car_intro_9": "", + "cparty_car_intro_10": "", + "cparty_car_popup_prefix_1": "", + "cparty_car_popup_prefix_2": "", + "cparty_car_popup_suffix": "", + "all_grade": "", + "grade_e3_e4": "", + "grade_e5_e6": "", + "grade_m1_m3": "", + "entry_first_step": "", + "entry_monthly": "", + "play_sw_2": "", + "entry_programming": "", + "entry_recommanded_course": "", + "introduce_course": "", + "all_free": "", + "cparty_result_fail_1": "", + "cparty_result_fail_2": "", + "cparty_result_fail_3": "", + "cparty_result_fail_4": "", + "cparty_result_fail_5": "", + "cparty_result_success_1": "", + "cparty_result_success_2": "", + "cparty_result_success_3": "", + "cparty_insert_name": "", + "offline_file": "File", + "offline_edit": "Edit", + "offline_undo": "Un-do", + "offline_redo": "Re-do", + "offline_quit": "Quit", + "select_one": "", + "evaluate_challenge": "", + "very_easy": "", + "easy": "", + "normal": "", + "difficult": "", + "very_difficult": "", + "save_dismiss": "", + "entry_info": "", + "actual_size": "", + "zoom_in": "", + "zoom_out": "", + "cparty_jr_intro_1": "", + "cparty_jr_intro_2": "", + "cparty_jr_intro_3": "", + "cparty_jr_intro_4": "", + "cparty_jr_intro_5": "", + "cparty_jr_intro_6": "", + "cparty_jr_intro_7": "", + "cparty_jr_intro_8": "", + "cparty_jr_intro_9": "", + "cparty_jr_intro_10": "", + "cparty_jr_intro_11": "", + "cparty_jr_intro_12": "", + "cparty_jr_intro_13": "", + "cparty_jr_intro_14": "", + "cparty_jr_intro_15": "", + "make_new_project": "", + "open_old_project": "", + "offline_download": "", + "offline_release": "", + "offline_description_1": "", + "offline_description_2": "", + "offline_description_3": "", + "sw_week_2015": "", + "cparty_desc": "", + "entry_offline_download": "", + "offline_desc_1": "", + "offline_desc_2": "", + "download": "", + "version": "", + "file_size": "", + "update": "", + "use_range": "", + "offline_desc_free": "", + "offline_required": "", + "offline_required_detail": "", + "offline_notice": "", + "offline_notice_1": "", + "offline_notice_2": "", + "cparty_jr_result_2": "", + "cparty_jr_result_3": "", + "cparty_jr_result_4": "", + "lms_no_class": "", + "lms_create_class": "", + "lms_add_class": "", + "lms_base_class": "", + "lms_delete_class": "", + "lms_my_class": "", + "lms_grade_1": "", + "lms_grade_2": "", + "lms_grade_3": "", + "lms_grade_4": "", + "lms_grade_5": "", + "lms_grade_6": "", + "lms_grade_7": "", + "lms_grade_8": "", + "lms_grade_9": "", + "lms_grade_10": "", + "lms_add_groupId_personal": "", + "lms_add_groupId": "", + "lms_add_group_account": "", + "lms_enter_group_info": "", + "lms_group_id": "", + "lms_group_pw": "", + "lms_group_name": "", + "personal_pwd_alert": "", + "personal_form_alert": "", + "personal_form_alert_2": "", + "personal_no_pwd_alert": "", + "select_gender": "", + "enter_group_id": "", + "enter_group_pwd": "", + "info_added": "", + "no_group_id": "", + "no_group_pwd": "", + "lms_please_choice": "", + "group_lesson": "", + "lms_banner_add_group": "", + "lms_banner_entry_group": "", + "lms_banner_desc_1": "", + "lms_banner_desc_2": "", + "lms_banner_desc_3": "", + "lms_banner_download_manual": "", + "lms_banner_detail": "", + "already_exist_email": "", + "remove_project": "", + "study_lesson": "", + "open_project": "", + "make_group": "", + "project_share": "", + "group_project_share": "", + "group_discuss": "", + "my_profile": "", + "search_updated": "", + "search_recent": "", + "search_complexity": "", + "search_staffPicked": "", + "search_childCnt": "", + "search_likeCnt": "", + "gnb_share": "", + "gnb_community": "", + "lms_add_lectures": "", + "lms_add_course": "", + "lms_add_homework": "", + "remove_lecture_confirm": "", + "popup_delete": "", + "remove_course_confirm": "", + "lms_no_lecture_teacher_1": "", + "lms_no_lecture_teacher_2": "", + "gnb_download": "", + "lms_no_lecture_student_1": "", + "lms_no_lecture_student_2": "", + "lms_no_lecture_student_3": "", + "lms_no_class_teacher": "", + "lms_no_course_teacher_1": "", + "lms_no_course_teacher_2": "", + "lms_no_course_student_1": "", + "lms_no_course_student_2": "", + "lms_no_course_student_3": "", + "lms_no_hw_teacher_1": "", + "lms_no_hw_teacher_2": "", + "lms_no_hw_student_1": "", + "lms_no_hw_student_2": "", + "lms_no_hw_student_3": "", + "modal_edit": "", + "modal_deadline": "", + "modal_hw_desc": "", + "desc_optional": "", + "modal_create_hw": "", + "vol": "", + "hw_title": "", + "hw_description": "", + "deadline": "", + "do_homework": "", + "hw_progress": "", + "hw_submit": "", + "view_list": "", + "view_desc": "", + "do_submit": "", + "popup_notice": "", + "no_selected_hw": "", + "hw_delete_confirm": "", + "hw_submitter": "", + "hw_student_desc_1": "", + "hw_student_desc_2": "", + "popup_create_class": "", + "class_name": "", + "image": "", + "select_class_image": "", + "type_class_description": "", + "set_as_primary_group": "", + "set_primary_group": "", + "not_primary_group": "", + "type_class_name": "", + "type_class_description_long": "", + "add_students": "", + "download_as_pdf": "", + "download_as_excel": "", + "temp_password": "", + "step_name": "", + "step_info": "", + "preview": "", + "type_name_enter": "", + "multiple_name_possible": "", + "id_auto_create": "", + "student_id_desc_1": "", + "student_id_desc_2": "", + "student_id_desc_3": "", + "student_number": "", + "temp_password_desc_1": "", + "temp_password_desc_2": "", + "temp_password_desc_3": "", + "student_delete_confirm": "", + "no_student_selected": "", + "class_assignment": "", + "class_list": "", + "select_grade": "", + "add_project": "", + "no_project_display": "", + "plz_display_project": "", + "refuse_confirm": "", + "select_class": "", + "mon": "", + "tue": "", + "wed": "", + "thu": "", + "fri": "", + "sat": "", + "sun": "", + "jan": "", + "feb": "", + "mar": "", + "apr": "", + "may": "", + "jun": "", + "jul": "", + "aug": "", + "sep": "", + "oct": "", + "nov": "", + "dec": "", + "plz_select_lecture": "", + "plz_set_deadline": "", + "hide_entry": "Hide Entry", + "hide_others": "Hide Others", + "show_all": "Show All", + "lecture_description": "", + "curriculum_description": "", + "linebreak_off_desc_1": "", + "linebreak_off_desc_2": "", + "linebreak_off_desc_3": "", + "linebreak_on_desc_1": "", + "linebreak_on_desc_2": "", + "linebreak_on_desc_3": "", + "entry_with": "", + "ebs_season_1": "", + "ebs_season_2": "", + "partner": "", + "project_term_popup_title": "", + "project_term_popup_description_1": "", + "project_term_popup_description_2": "", + "project_term_popup_description_3": "", + "project_term_popup_description_4": "", + "project_term_agree_1_1": "", + "project_term_agree_1_2": "", + "project_term_agree_2_1": "", + "project_term_agree_2_2": "", + "project_term_agree_2_3": "", + "project_term_agree_3_1": "", + "project_term_agree_3_2": "", + "agree_all": "", + "select_login": "", + "select": "", + "with_login": "", + "without_login": "", + "start_challenge": "", + "start_challenge_2": "", + "if_not_save_not_login": "", + "if_not_member_yet": "", + "join_entry": "", + "learned_computing": "", + "cparty_index_description_1": "", + "cparty_index_description_2": "", + "cparty_index_description_3": "", + "cparty_index_description_4": "", + "cparty_index_description_5": "", + "cparty_index_description_6": "", + "cparty_index_description_7": "", + "cparty_index_description_8": "", + "congratulation": "", + "warm_up": "", + "beginner": "", + "intermediate": "", + "advanced": "", + "applied": "", + "cert_msg_tail": "", + "cert_msg_head": "", + "maze_text_content_1": "", + "maze_text_content_2": "", + "maze_text_content_3": "", + "maze_text_content_4": "", + "maze_text_content_5": "", + "maze_text_content_6": "", + "maze_text_content_7": "", + "maze_text_content_8": "", + "maze_text_content_9": "", + "maze_text_content_10": "", + "maze_text_content_11": "", + "maze_text_content_12": "", + "maze_text_content_13": "", + "maze_text_content_14": "", + "maze_text_content_15": "", + "maze_text_content_16": "", + "maze_text_content_17": "", + "maze_text_content_18": "", + "maze_text_content_19": "", + "maze_text_content_20": "", + "maze_content_1": "", + "maze_content_2": "", + "maze_content_3": "", + "maze_content_4": "", + "maze_content_5": "", + "maze_content_6": "", + "maze_content_7": "", + "maze_content_8": "", + "maze_content_9": "", + "maze_content_10": "", + "maze_content_11": "", + "maze_content_12": "", + "maze_content_13": "", + "maze_content_14": "", + "maze_content_15": "", + "maze_content_16": "", + "maze_content_17": "", + "maze_content_18": "", + "maze_content_19": "", + "maze_content_20": "", + "ai_content_1": "", + "ai_content_2": "", + "ai_content_3": "", + "ai_content_4": "", + "ai_content_5": "", + "ai_content_6": "", + "ai_content_7": "", + "ai_content_8": "", + "ai_content_9": "", + "ai_content_10": "", + "maze_hints_title_1": "", + "maze_hints_content_1": "", + "maze_hints_detail_1": "", + "maze_hints_title_2": "", + "maze_hints_content_2": "", + "maze_hints_detail_2": "", + "maze_hints_title_3": "", + "maze_hints_content_3": "", + "maze_hints_detail_3": "", + "maze_hints_title_4": "", + "maze_hints_content_4": "", + "maze_hints_detail_4": "", + "maze_hints_title_5": "", + "maze_hints_content_5": "", + "maze_hints_detail_5": "", + "maze_hints_title_6": "", + "maze_hints_content_6": "", + "maze_hints_detail_6": "", + "maze_hints_title_7": "", + "maze_hints_content_7": "", + "maze_hints_detail_7": "", + "maze_hints_title_8": "", + "maze_hints_content_8": "", + "maze_hints_detail_8": "", + "ai_hints_title_1_1": "", + "ai_hints_content_1_1": "", + "ai_hints_detail_1_1": "", + "ai_hints_title_1_2": "", + "ai_hints_content_1_2": "", + "ai_hints_detail_1_2": "", + "ai_hints_title_1_3": "", + "ai_hints_content_1_3": "", + "ai_hints_detail_1_3": "", + "ai_hints_title_2_1": "", + "ai_hints_content_2_1": "", + "ai_hints_detail_2_1": "", + "ai_hints_title_2_2": "", + "ai_hints_content_2_2": "", + "ai_hints_detail_2_2": "", + "ai_hints_content_3_1": "", + "ai_hints_title_3_2": "", + "ai_hints_content_3_2": "", + "ai_hints_detail_3_2": "", + "ai_hints_content_4_1": "", + "ai_hints_detail_4_1": "", + "ai_hints_title_4_2": "", + "ai_hints_content_4_2": "", + "ai_hints_detail_4_2": "", + "ai_hints_title_4_3": "", + "ai_hints_content_4_3": "", + "ai_hints_detail_4_3": "", + "ai_hints_content_5_1": "", + "ai_hints_detail_5_1": "", + "ai_hints_title_5_2": "", + "ai_hints_content_5_2": "", + "ai_hints_detail_5_2": "", + "ai_hints_title_6_1": "", + "ai_hints_content_6_1": "", + "ai_hints_detail_6_1": "", + "ai_hints_content_7_1": "", + "ai_hints_detail_7_1": "", + "ai_hints_title_7_2": "", + "ai_hints_content_7_2": "", + "ai_hints_detail_7_2": "", + "ai_hints_content_8_1": "", + "ai_hints_detail_8_1": "", + "ai_hints_title_8_2": "", + "ai_hints_content_8_2": "", + "ai_hints_detail_8_2": "", + "ai_hints_content_9_1": "", + "ai_hints_detail_9_1": "", + "ai_hints_title_9_2": "", + "ai_hints_content_9_2": "", + "ai_hints_detail_9_2": "", + "maze_text_goal_1": "", + "maze_text_goal_2": "", + "maze_text_goal_3": "", + "maze_text_goal_4": "", + "maze_text_goal_5": "", + "maze_text_goal_6": "", + "maze_text_goal_7": "", + "maze_text_goal_8": "", + "maze_text_goal_9": "", + "maze_text_goal_10": "", + "maze_text_goal_11": "", + "maze_text_goal_12": "", + "maze_text_goal_13": "", + "maze_text_goal_14": "", + "maze_text_goal_15": "", + "maze_text_goal_16": "", + "maze_text_goal_17": "", + "maze_text_goal_18": "", + "maze_text_goal_19": "", + "maze_text_goal_20": "", + "above_radar": "", + "bottom_radar": "", + "front_radar": "", + "above_object": "", + "front_object": "", + "object_below": "", + "destination": "", + "asteroids": "", + "item": "", + "wall": "", + "buy_now": "", + "goals": "", + "instructions": "", + "object_info": "", + "entry_basic_mission": "", + "entry_application_mission": "", + "maze_move_forward": "", + "maze_when_run": "", + "maze_turn_left": "", + "maze_turn_right": "", + "maze_repeat_times_1": "", + "maze_repeat_times_2": "", + "maze_repeat_until_1": "", + "maze_repeat_until_2": "", + "maze_call_function": "", + "maze_function": "", + "maze_repeat_until_all_1": "", + "maze_repeat_until_all_2": "", + "command_guide": "", + "ai_success_msg_1": "", + "ai_success_msg_2": "", + "ai_success_msg_3": "", + "ai_success_msg_4": "", + "ai_cause_msg_1": "", + "ai_cause_msg_2": "", + "ai_cause_msg_3": "", + "ai_cause_msg_4": "", + "ai_move_forward": "", + "ai_move_above": "", + "ai_move_under": "", + "ai_repeat_until_dest": "", + "ai_if_front_1": "", + "ai_if_front_2": "", + "ai_else": "", + "ai_if_1": "", + "ai_if_2": "", + "ai_use_item": "", + "ai_radar": "", + "ai_above": "", + "ai_front": "", + "ai_under": "", + "ai_object_is_1": "", + "ai_object_is_2": "", + "challengeMission": "", + "withTeacher": "", + "host": "", + "support": "", + "subjectivity": "", + "learnMore": "", + "ai_object_is_3": "", + "stage_is_not_available": "", + "progress_not_saved": "", + "want_refresh": "", + "monthly_entry_grade": "", + "monthly_entry_contents": "", + "monthly_entry_etc1": "", + "monthly_entry_etc2": "", + "group_make_lecture_1": "", + "group_make_lecture_2": "", + "group_make_lecture_3": "", + "group_make_lecture_4": "", + "group_add_lecture_1": "", + "group_add_lecture_2": "", + "group_add_lecture_3": "", + "group_add_lecture_4": "", + "group_make_course_1": "", + "group_make_course_2": "", + "group_make_course_3": "", + "group_make_course_4": "", + "group_add_course_1": "", + "group_add_course_2": "", + "group_add_course_3": "", + "group_add_course_4": "" +}; +Lang.Msgs = { + "auth_only": "Authenticated users only", + "runtime_error": "Runtime Error", + "to_be_continue": "Still not working", + "warn": "Warning", + "error_occured": "Oops, something went wrong. Why don't you try again? If you see this more than once, please let us know by Proposal board!", + "list_can_not_space": "List's name can't be space", + "sign_can_not_space": "Sign's name can't be space", + "variable_can_not_space": "Variable's name can't be space" +}; +Lang.Users = { + "auth_failed": "Authentication failed", + "birth_year": "Birth Year", + "birth_year_before_1990": "Before 1990s", + "edit_personal": "Edit Personal", + "email": "Email", + "email_desc": "Enter your Email address to receive newsletters", + "email_inuse": "E-mail address is already in-use", + "email_match": "Please enter a valid email", + "forgot_password": "Forgot your password?", + "job": "Job", + "language": "Language", + "name": "Full Name", + "name_desc": "Enter your name", + "name_not_empty": "You must enter your name", + "password": "Password", + "password_desc": "", + "password_invalid": "Invalid Password", + "password_long": "Password must be between 4-20 characters long", + "password_required": "Password can not be blank", + "project_list": "thực hiện dự án", + "regist": "Signup Complete", + "rememberme": "Remember me", + "repeat_password": "Repeat Password", + "repeat_password_desc": "Repeat Password", + "repeat_password_not_match": "Passwords do not match", + "sex": "Sex", + "signup_required_for_save": "Signin required for saving a project.", + "username": "Username", + "username_desc": "Enter your unique name for signin", + "username_inuse": "Username already taken", + "username_long": "Username must be between 4-20 characters long", + "username_unknown": "Unknown user" +}; +Lang.vn = "Việt"; +Lang.Workspace = { + "new_project": "New Project", + "add_object": "Add objects", + "all": "toàn bộ", + "animal": "Động vật", + "arduino_entry": "Program for connect to Arduino", + "arduino_program": "Arduino program", + "arduino_sample": "Sample code for Arduino", + "arduino_driver": "Driver for arduino", + "cannot_add_object": "Cannot add objects while running a project.", + "cannot_add_picture": "Cannot add picture while running a project.", + "cannot_add_sound": "Cannot add sound while running a project.", + "cannot_edit_click_to_stop": "Can not modify a project.\nClick to stop", + "cannot_open_private_project": "Can not load private project. Move to home.", + "cannot_save_running_project": "Can not save while running a project.", + "character_gen": "Make an avarta", + "check_runtime_error": "Please check the block marked with red.", + "context_download": "Download to PC", + "context_duplicate": "Duplicate", + "context_remove": "Remove", + "context_rename": "Rename", + "coordinate": "tọa độ", + "create_function": "Create Function", + "direction": "Direction", + "drawing": "vẽ trực tiếp", + "enter_list_name": "", + "enter_name": "Enter a new name", + "enter_new_message": "Enter new message name.", + "enter_variable_name": "Enter the new variable name (less than 10)", + "family": "Family", + "fantasy": "Ảo", + "file_new": "làm mới", + "file_open": "tải", + "file_upload": "Upload my project", + "file_upload_login_check_msg": "For the uploading your project you have to sign in", + "file_save": "lưu vào", + "file_save_as": "Save as clone", + "file_save_download": "Download project", + "func": "function", + "function_create": "Add function", + "interface": "Interface", + "landscape": "Bối cảnh", + "list": "List", + "list_add_calcel": "", + "list_add_calcel_msg": "", + "list_add_fail": "", + "list_add_fail_msg1": "", + "list_add_fail_msg2": "", + "list_add_ok": "", + "list_add_ok_msg": "", + "list_create": "Add list", + "list_dup": "", + "list_newname": "New name", + "list_remove": "Remove list", + "list_rename": "Rename list", + "list_rename_failed": "", + "list_rename_ok": "", + "list_too_long": "", + "message": "Signal", + "message_add_cancel": "Canceled", + "message_add_cancel_msg": "Add a message was canceled.", + "message_add_fail": "Failed", + "message_add_fail_msg": "Message name conflicted.", + "message_add_ok": "Message added", + "message_add_ok_msg": "was successfully added.", + "message_create": "Add Signal", + "message_dup": "Message name conflicted.", + "message_remove": "Remove a message", + "message_remove_canceled": "Remove a message was canceled", + "message_rename": "Rename a message", + "message_rename_failed": "Rename message failed", + "message_rename_ok": "Successfully rename message.", + "message_too_long": "Message name too long.", + "no_message_to_remove": "There is no message to remove.", + "no_use": "No use", + "no_variable_to_remove": "", + "no_variable_to_rename": "There is no varibale to remove", + "object_not_found": "No object is specified in the block.", + "object_not_found_for_paste": "", + "people": "chân dung", + "picture_add": "Add Shape", + "plant": "thực vật", + "project": "Project", + "project_copied": "Copy", + "PROJECTDEFAULTNAME": ['Cool', 'Funny', 'Nice', 'Huge', 'Great', 'Handsome', 'Lucky'], + "remove_object": "Remove Object", + "remove_object_msg": "remove was successfully completed.", + "removed_msg": "was successfully removed", + "rotate_method": "Rotate", + "rotation": "Rotation", + "run": "tiến hành", + "saved": "Saved", + "saved_msg": "was successfully saved.", + "save_failed": "Problem occurred while saving a project. Please try again.", + "select_library": "lựa chọn thư viện", + "select_sprite": "Please select at least one sprite to apply.", + "shape_remove_fail": "Remove a shape was failed.", + "shape_remove_fail_msg": "At least one or more shapes required.", + "shape_remove_ok": "Shape Removed", + "shape_remove_ok_msg": "was removed.", + "sound_add": "Add Sound", + "sound_remove_fail": "Remove a sound was failed.", + "sound_remove_ok": "Sound Removed", + "sound_remove_ok_msg": "was removed.", + "stop": "Stop", + "pause": "", + "restart": "", + "speed": "", + "tab_attribute": "Attribute", + "tab_code": "Block", + "tab_picture": "hình ảnh", + "tab_sound": "Sound", + "tab_text": "Textbox", + "textbox": "Textbox", + "textbox_edit": "Edit Textbox", + "textbox_input": "nhập nôi dung vào hộp định dạng chữ", + "things": "đồ vật", + "upload": "Upload files", + "upload_addfile": "Thêm một tập tin", + "variable": "Variable", + "variable_add_calcel": "Canceled", + "variable_add_calcel_msg": "Add a variable was canceled.", + "variable_add_fail": "Failed", + "variable_add_fail_msg1": "Variable name conflicted.", + "variable_add_fail_msg2": "Variable name is not proper.", + "variable_add_ok": "Variable added", + "variable_add_ok_msg": "was successfully added.", + "variable_create": "Add variable", + "variable_dup": "Variable name was already exists.", + "variable_newname": "New Name", + "variable_remove": "Remove variable", + "variable_remove_canceled": "Remove a variable was canceled", + "variable_rename": "Rename variable name", + "variable_rename_failed": "Failed", + "variable_rename_msg": "'Rename variable was successfully completed.'", + "variable_rename_ok": "Rename variabled was successfully completed.", + "variable_select": "Select a variable", + "variable_too_long": "Variable name too long.", + "vehicle": "Phương tiện đi lại", + "add_object_alert_msg": "Add object firstly", + "add_object_alert": "Alert", + "create_variable_block": "Create variable", + "create_list_block": "Create list", + "Variable_Timer": "timer", + "Variable_placeholder_name": "variable name", + "Variable_use_all_objects": "Use for all objects", + "Variable_use_this_object": "Use for this object", + "Variable_used_at_all_objects": "variable used at all objects", + "Variable_create_cloud": "Use for shared variable
(Stored in Server)", + "Variable_used_at_special_object": "variable used at special object", + "draw_new": "Draw new", + "painter_file": "edit▼", + "painter_file_save": "edit▼", + "painter_file_saveas": "edit▼", + "painter_edit": "edit▼", + "get_file": "get", + "copy_file": "copy", + "cut_picture": "cut", + "paste_picture": "paste", + "remove_all": "remove all", + "new_picture": "", + "picture_size": "size", + "picture_rotation": "rotation", + "thickness": "thickness", + "textStyle": "text", + "add_picture": "Add Shape", + "select_picture": "Select Library", + "select_sound": "Select sound", + "Size": "Size", + "show_variable": "Show variable", + "default_value": "default value", + "slide": "slide", + "min_value": "min value", + "max_value": "max value", + "number_of_list": "number of list items", + "use_all_objects": "Use for all objects", + "list_name": "List name", + "list_used_specific_objects": "List used for specific object", + "List_used_all_objects": "List used for all objects", + "Scene_delete_error": "The scene is, there should be at least one.", + "Scene_add_error": "The scene is up to 10.", + "replica_of_object": "'s replicas", + "will_you_delete_scene": "Deleting scene can not be restored.\nAre you sure you want to delete scene?", + "duplicate_scene": "duplicate", + "block_explain": "Block description", + "block_intro": "Clicking on the block comes the description of the block .", + "blocks_reference": "Blocks Reference", + "hardware_guide": "Hardware Guide", + "show_list_workspace": "", + "List_create_cloud": "Use for shared list
(Stored in Server)", + "confirm_quit": "", + "confirm_load_temporary": "", + "login_to_save": "", + "cannot_save_in_edit_func": "", + "new_object": "", + "arduino_connect": "", + "arduino_connect_success": "", + "confirm_load_header": "" +}; +Lang.code = "view code"; +Lang.EntryStatic = { + "lecture_is_open_true": "open", + "lecture_is_open_false": "closed", + "category_all": "All Categories", + "category_game": "Game", + "category_animation": "Animation", + "category_media_art": "Media Art", + "category_physical": "Physical", + "category_etc": "etc", + "lecture_required_time_1": "Less than 15 min.", + "lecture_required_time_2": "15 to 30 min.", + "lecture_required_time_3": "30 to 40 min.", + "lecture_required_time_4": "45 to 60 min.", + "lecture_required_time_5": "over 1 hour", + "usage_event": "Event", + "usage_signal": "Sign", + "usage_scene": "Scene", + "usage_repeat": "Repeat", + "usage_condition_repeat": "Condition repeat", + "usage_condition": "Repeat", + "usage_clone": "Cloned Object", + "usage_rotation": "Rotation", + "usage_coordinate": "Coordination move", + "usage_arrow_move": "Arrow move", + "usage_shape": "Shape", + "usage_speak": "Speak", + "usage_picture_effect": "Effect", + "usage_textBox": "Textbox", + "usage_draw": "Draw", + "usage_sound": "Sound", + "usage_confirm": "Confirm", + "usage_comp_operation": "Compare operation", + "usage_logical_operation": "Logical operation", + "usage_math_operation": "Math operation", + "usage_random": "Random", + "usage_timer": "Timer", + "usage_variable": "variable", + "usage_list": "List", + "usage_ask_answer": "Ask and answer", + "usage_function": "Function", + "usage_arduino": "Arduino", + "concept_resource_analytics": "Procedual Thinking", + "concept_procedual": "Abstractive Thinking", + "concept_abstractive": "Korean", + "concept_individual": "English", + "concept_automation": "Automation", + "concept_simulation": "Simulation", + "concept_parallel": "Parallel", + "subject_korean": "Korean", + "subject_english": "English", + "subject_mathmatics": "Mathmatics", + "subject_social": "Social", + "subject_science": "Science", + "subject_music": "Music", + "subject_paint": "Paint", + "subject_athletic": "Athletics", + "subject_courtesy": "Courtesy", + "subject_progmatic": "Progmatic", + "lecture_grade_1": "1 th", + "lecture_grade_2": "2 th", + "lecture_grade_3": "3 th", + "lecture_grade_4": "4 th", + "lecture_grade_5": "5 th", + "lecture_grade_6": "6 th", + "lecture_grade_7": "7 th", + "lecture_grade_8": "8 th", + "lecture_grade_9": "9 th", + "lecture_grade_10": "Graduated", + "lecture_level_1": "Low", + "lecture_level_2": "Middle", + "lecture_level_3": "High", + "listEnable": "list", + "functionEnable": "function", + "messageEnable": "message", + "objectEditable": "object", + "pictureeditable": "shape", + "sceneEditable": "scene", + "soundeditable": "sound", + "variableEnable": "variable", + "e_1": "elementary school 1", + "e_2": "elementary school 2", + "e_3": "elementary school 3", + "e_4": "elementary school 4", + "e_5": "elementary school 5", + "e_6": "elementary school 6", + "m_1": "middle school 1", + "m_2": "middle school 2", + "m_3": "middle school 3", + "general": "general", + "curriculum_is_open_true": "open", + "curriculum_open_false": "closed", + "notice": "Notice", + "qna": "Q&A", + "tips": "Know How & Tips", + "free": "Free", + "report": "Proposal", + "art_category_all": "All projects", + "art_category_game": "Game", + "art_category_animation": "Animation", + "art_category_physical": "Physical", + "art_category_etc": "etc", + "art_category_media": "art_category_media", + "art_sort_updated": "Updated", + "art_sort_visit": "Views", + "art_sort_likeCnt": "Likes", + "art_sort_comment": "Comments", + "art_period_all": "All", + "art_period_day": "Today", + "art_period_week": "Recent week", + "art_period_month": "Recent month", + "art_period_three_month": "Recent three month", + "level_high": "Row", + "level_mid": "Middle", + "level_row": "High", + "discuss_sort_created": "Updated", + "discuss_sort_visit": "Views", + "discuss_sort_likesLength": "Likes", + "discuss_sort_commentsLength": "Comments", + "discuss_period_all": "All", + "discuss_period_day": "Today", + "discuss_period_week": "Recent week", + "discuss_period_month": "Recent month", + "discuss_period_three_month": "Recent three month" +}; +Lang.Helper = { + "when_run_button_click": "When thew Start button is clicked, the connected block blow will run.", + "when_some_key_pressed": "When an assigned key is pressed, the connected blocks below will run.", + "mouse_clicked": "When mouse is clicked, the connected blocks below will run.", + "mouse_click_cancled": "When mouse is released, the connected blocks below will run.", + "when_object_click": "When a relevant object is clicked, the connected blocks below will run.", + "when_object_click_canceled": "When the object click is released, the connect blocks below will run.", + "when_message_cast": "When a relevant sign is received, the connected blocks below will run.", + "message_cast": "Sends signal selected from list.", + "message_cast_wait": "Send signal selected from list, and wait for the blocks the finish running.", + "when_scene_start": " When the scene starts, the connected blocks blow will run.", + "start_scene": "Starts selected scene.", + "start_neighbor_scene": "Starts the previous or following scene.", + "wait_second": "Runs the next block after waiting for the set a mount of time.", + "repeat_basic": "Repeats the blocks inside for set number of times.", + "repeat_inf": "Repeats thi blocks inside for an unlimited number of times.", + "repeat_while_true": "Repeats the blocks until the set condition is met.", + "stop_repeat": "Stops repeat of the closest wrapping block.", + "_if": "if condition is true, runs blocks inside.", + "if_else": "if condition is true, runs blocks in the 'if' portion. If not, runs the blocks inside 'else' portion.", + "restart_project": "Restart all objects.", + "stop_object": "All objects : Stops all objects
This block : Stop all blocks in this object.
This object: Stops all blocks in this object. This Object's other blocs : Stops blocks not connected to this object's blocks.", + "wait_until_true": "Stops running and waits until the value of the condition is true.", + "when_clone_start": "When a new clone of the object is created, the connected blocks below will run.", + "create_clone": "Creates a clone of the object.", + "delete_clone": "Deletes the objects.", + "remove_all_clones": "Deletes all copies of the object.", + "move_direction": "Moves in the direction of the arrow by set value.", + "move_x": "Changes the x-position by the value regardless of the direction of the object.", + "move_y": "Changes the y-position by the value regardless of the direction of the object.", + "move_xy_time": "Changes the x- and y-position by the value regardless of the direction of the object.", + "locate_object_time": "Moves the object to the mouse pointer position or to the position of another object over the input amount of time.", + "locate_x": "Moves the object to the input x-position value.", + "locate_y": "Moves the object to the input y-position value.", + "locate_xy": "Moves the object to the input x- and y-position values.", + "locate_xy_time": "Moves the object to the determined x- and y-position values over the input amount of time.", + "locate": "Moves the object to the position of the mouse pointer or to the position of another object.", + "rotate_absolute": "Rotates the object by the input number of degrees.", + "rotate_by_time": "Rotates the object by the input number of degrees over the input amount of time.", + "rotate_relative": "Rotates the object by the input number of degrees regardless of the direction of the object.", + "direction_absolute": "Sets the direction of the object by the input number of degrees.", + "direction_relative": "Sets the direction of movement of the object by the input number of degrees.", + "move_to_angle": "Moves the object by the input value in the direction of the input number of degrees.", + "see_angle_object": "Makes the object face another object or the mouse pointer.", + "bounce_wall": "When object touches the edge of the screen, it bounces back.", + "show": "Makes the object show on the screen.", + "hide": "Hides the object from the screen.", + "dialog_time": "Runs the next block after the input content is spoken by the object for the input amount of time.", + "dialog": "Runs next block while the input contents is spoken by the object.", + "remove_dialog": "Deletes the dialog box created (using dialog block) by the object.", + "change_to_some_shape": "Changes the object into the selected shape.", + "change_to_next_shape": "Changes the object into the next shape.", + "set_effect_volume": "Applies the selected effect to the object by the input value.", + "set_effect_amount": "Applies the selected effect to the object by the input value.", + "set_effect": "Sets the selected effect to the object by the input value.", + "set_entity_effect": "Deletes all effects applied to the object.", + "add_effect_amount": "Applies the selected effect to the object by the input value.", + "change_effect_amount": "Deletes all effects applied to the object.", + "change_scale_percent": "Changes the size of the object by the input value.", + "set_scale_percent": "Sets the size of the object to the input value.", + "change_scale_size": "Changes the size of the object by the input value.", + "set_scale_size": "Sets the size of the object to the input value.", + "flip_x": "Flips the object vertically.", + "flip_y": "Flips the object horizontally.", + "change_object_index": "Bring to front : Bring object to front.
Bring one front : Bring object one layer front.
Send one back : Send object one layer back.
Send to back : Send object back.", + "set_object_order": "Shows the object in the set order.", + "brush_stamp": "Clones the object on stage like a stamp.", + "start_drawing": "Paints brush along the path of the object.", + "stop_drawing": "Stops object’s painting.", + "set_color": "Sets object’s color of the brush to the selected color.", + "set_random_color": "Sets object’s color of the brush to random.", + "change_thickness": "Changes object’s brush thickness to the input value.", + "set_thickness": "Sets object’s brush thickness to the input value.", + "change_opacity": "Changes object’s brush transparency to the input value.", + "change_brush_transparency": "Changes object’s brush transparency to the input value.", + "set_opacity": "Sets object’s brush transparency to the input value.", + "set_brush_tranparency": "Sets object’s brush transparency to the input value.", + "brush_erase_all": "Deletes object’s all brush paint and stamps.", + "sound_something_with_block": "Plays object’s select sound while next block runs.", + "sound_something_second_with_block": "Plays object’s select sound for input amount of time while next block runs.", + "sound_something_wait_with_block": "Plays object’s select sound then runs next blocks once sound has finished playing.", + "sound_something_second_wait_with_block": "Plays object’s select sound for input amount of time then runs next blocks.", + "sound_volume_change": "Changes the volume of all sounds played in the project by the input percentage.", + "sound_volume_set": "Sets the volume of all sounds played in the project to the input percentage.", + "sound_silent_all": "Stops all sounds currently playing.", + "is_clicked": "Checks whether mouse is clicked.", + "is_press_some_key": "Checks whether an assigned key is pressed.", + "reach_something": "Checks whether the object reaches the selected point.", + "is_included_in_list": "Checks whether select list contains the input value.", + "boolean_basic_operator": "&equals: Checks whether the value on the left is greater than the value on the right.
>, : Checks whether the value on the left is greater than the value on the right.
<, : Checks whether the value on the left is less than the value on the right.
>&equals : Checks whether the value on the left is the same as or greater than the value on the right.
<&equals : Checks whether the value on the left is the same as or less than the value on the right.", + "function_create": "Define a function by placing frequently used sets of blocks under this block. Place [name] next to [Define function] to give function a name. Pass on number of text values by placing [numeric/text value] block. Pass on boolean value of true or false by placing the [boolean value] block.", + "function_field_label": "Place next to ‘Define function’ to give function a name.", + "function_field_string": "Pass on numeric/text value by placing this block next to [Define function] block. Grab/copy the [numeric/text value] block in the [Define function] block and use its value in function.", + "function_field_boolean": "Use this block to pass on boolean value of true or false. Grab/copy the [boolean value] block in the [Define function] block and use its value in function.", + "function_general": "This is current function block or function blocks created so far.", + "boolean_and": "Checks whether both conditions are true.", + "boolean_or": "Checks whether at least one of the two conditions is true.", + "boolean_not": "Changes the input condition to its opposite.", + "calc_basic": "+ : Adds two numbers.
- : Subtracts two numbers.
X : Multiplies two numbers.
/ : Divides two numbers.", + "calc_rand": "Selects a random value between the two input numbers.", + "get_x_coordinate": "Reports the x-position value of the object.", + "get_y_coordinate": "Reports the y-position value of the object.", + "coordinate_mouse": "Reports either the x- or y-position value of the mouse.", + "coordinate_object": "Reports the x/y-position of the object and various information (direction, shape name, etc.).", + "quotient_and_mod": "quotient: The answer after you divide the first number by the second number.
remainder: The amount left over after division.", + "get_rotation_direction": "Reports the object’s value of direction and value of movement.", + "calc_share": "Reports the quotient occurring from first number divided by the second number.", + "calc_mod": "Reports the remainder occurring from the first number divided by the second number.", + "calc_operation": "Reports calculated values of a variety of equations relating to input numbers.", + "get_date": "Reports values regarding the current year, month, day, and time.", + "distance_something": "Reports the distance between the object and the selected object.", + "get_sound_duration": "Reports the time length of the selected sound.", + "get_project_timer_value": "Reports how many seconds have passed since the project started.", + "choose_project_timer_action": "Start: Start timer.
Stop: Stop timer.
Reset: Reset timer to 0. (When this block is in workspace, the program will show timer window when run.) ", + "reset_project_timer": "Resets the timer to 0.", + "set_visible_project_timer": "Shows or hides the timer.", + "ask_and_wait": "The object asks the inputted text, and then receives an answer as a response.", + "get_canvas_input_value": "Reports the contents inputted taken place after the object asked", + "set_visible_answer": "Hide or show ‘response window’.", + "combine_something": "Combines two input texts.", + "get_variable": "Reports the value of the select variable.", + "change_variable": "Adds the input value to the selected variable.", + "set_variable": "Sets the value of the selected variable to the input value.", + "robotis_carCont_sensor_value": "왼쪽 접속 센서 : 접촉(1), 비접촉(0) 값 입니다.
오른쪽 접촉 센서 : 접촉(1), 비접촉(0) 값 입니다.
선택 버튼 상태 : 접촉(1), 비접촉(0) 값 입니다.
최종 소리 감지 횟수 : 마지막 실시간 소리 감지 횟수 값 입니다.
실시간 소리 감지 횟수 : 약 1초 안에 다음 소리가 감지되면 1씩 증가합니다.
왼쪽 적외선 센서 : 물체와 가까울 수록 큰 값 입니다.
오른쪽 적외선 센서 : 물체와 가까울 수록 큰 값 값 입니다.
왼쪽 적외선 센서 캘리브레이션 값 : 적외선 센서의 캘리브레이션 값 입니다.
오른쪽 적외선 센서 캘리브레이션 값 : 적외선 센서의 캘리브레이션 값 입니다.
(*캘리브레이션 값 - 적외선센서 조정 값)", + "robotis_carCont_cm_led": "4개의 LED 중 1번 또는 4번 LED 를 켜거나 끕니다.
LED 2번과 3번은 동작 지원하지 않습니다.", + "robotis_carCont_cm_sound_detected_clear": "최종 소리 감지횟 수를 0 으로 초기화 합니다.", + "robotis_carCont_aux_motor_speed": "감속모터 속도를 0 ~ 1023 의 값(으)로 정합니다.", + "robotis_carCont_cm_calibration": "적외선센서 조정 값(http://support.robotis.com/ko/: 자동차로봇> 2. B. 적외선 값 조정)을 직접 정합니다.", + "robotis_openCM70_sensor_value": "최종 소리 감지 횟수 : 마지막 실시간 소리 감지 횟수 값 입니다.
실시간 소리 감지 횟수 : 약 1초 안에 다음 소리가 감지되면 1씩 증가합니다.
사용자 버튼 상태 : 접촉(1), 비접촉(0) 값 입니다.최종 소리 감지 횟수 : 마지막 실시간 소리 감지 횟수 값 입니다.
실시간 소리 감지 횟수 : 약 1초 안에 다음 소리가 감지되면 1씩 증가합니다.
사용자 버튼 상태 : 접촉(1), 비접촉(0) 값 입니다.", + "robotis_openCM70_aux_sensor_value": "서보모터 위치 : 0 ~ 1023, 중간 위치의 값은 512 입니다.
적외선센서 : 물체와 가까울 수록 큰 값 입니다.
접촉센서 : 접촉(1), 비접촉(0) 값 입니다.
조도센서(CDS) : 0 ~ 1023, 밝을 수록 큰 값 입니다.
온습도센서(습도) : 0 ~ 100, 습할 수록 큰 값 입니다.
온습도센서(온도) : -20 ~ 100, 온도가 높을 수록 큰 값 입니다.
온도센서 : -20 ~ 100, 온도가 높을 수록 큰 값 입니다.
초음파센서 : -
자석센서 : 접촉(1), 비접촉(0) 값 입니다.
동작감지센서 : 동작 감지(1), 동작 미감지(0) 값 입니다.
컬러센서 : 알수없음(0), 흰색(1), 검은색(2), 빨간색(3), 녹색(4), 파란색(5), 노란색(6) 값 입니다.
사용자 장치 : 사용자 센서 제작에 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "robotis_openCM70_cm_buzzer_index": "음계를 0.1 ~ 5 초 동안 연주 합니다.", + "robotis_openCM70_cm_buzzer_melody": "멜로디를 연주 합니다.
멜로디를 연속으로 재생하는 경우, 다음 소리가 재생되지 않으면 '흐름 > X 초 기다리기' 블록을 사용하여 기다린 후 실행합니다.", + "robotis_openCM70_cm_sound_detected_clear": "최종 소리 감지횟 수를 0 으로 초기화 합니다.", + "robotis_openCM70_cm_led": "제어기의 빨간색, 녹색, 파란색 LED 를 켜거나 끕니다.", + "robotis_openCM70_cm_motion": "제어기에 다운로드 되어있는 모션을 실행합니다.", + "robotis_openCM70_aux_motor_speed": "감속모터 속도를 0 ~ 1023 의 값(으)로 정합니다.", + "robotis_openCM70_aux_servo_mode": "서보모터를 회전모드 또는 관절모드로 정합니다.
한번 설정된 모드는 계속 적용됩니다.
회전모드는 서보모터 속도를 지정하여 서보모터를 회전 시킵니다.
관절모드는 지정한 서보모터 속도로 서보모터 위치를 이동 시킵니다.", + "robotis_openCM70_aux_servo_speed": "서보모터 속도를 0 ~ 1023 의 값(으)로 정합니다.", + "robotis_openCM70_aux_servo_position": "서보모터 위치를 0 ~ 1023 의 값(으)로 정합니다.
서보모터 속도와 같이 사용해야 합니다.", + "robotis_openCM70_aux_led_module": "LED 모듈의 LED 를 켜거나 끕니다.", + "robotis_openCM70_aux_custom": "사용자 센서 제작에 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "robotis_openCM70_cm_custom_value": "컨트롤 테이블 주소를 직접 입력하여 값을 확인 합니다.
컨트롤 테이블 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "robotis_openCM70_cm_custom": "컨트롤 테이블 주소를 직접 입력하여 값을 정합니다.
컨트롤 테이블 대한 설명은 ROBOTIS e-매뉴얼(http://support.robotis.com/ko/)을 참고하세요.", + "show_variable": "Shows the value of the selected variable on the stage.", + "hide_variable": "Hides the value of the selected variable from the stage.", + "value_of_index_from_list": "Reports the item at the location of the input value on the selected list.", + "add_value_to_list": "Adds the input item to the end location of the selected list.", + "remove_value_from_list": "Deletes the item at the location of the input value from the selected list.", + "insert_value_to_list": "Inserts the input item at the location of the input value in the selected list.", + "change_value_list_index": "Replaces the item at the location of the input value to the input text", + "length_of_list": "Reports the number of items contained in the selected list.", + "show_list": "Shows the selected list on the stage.", + "hide_list": "Hides the selected list from the stage.", + "text": "Reports the text in the text box.", + "text_write": "Changes the content of the text box to the input text.", + "text_append": "Adds the input text behind the text box.", + "text_prepend": "Adds the input text in front of the text box.", + "text_flush": "Deletes all saved text in the text box.", + "erase_all_effects": "Delete all effects about this object.", + "char_at": "Reports the letter of the input text.", + "length_of_string": "Reports the length of input text include spacing", + "substring": "Reports the text extracted from the input text between two specified indices", + "replace_string": "Reports the text that replaced all the input text with another input text", + "index_of_string": "Reports the index of first input text in second input text", + "change_string_case": "Reports the text that converted to uppercase or lowercase", + "direction_relative_duration": "Rotates the direction of this object by the input number of degrees over the input amount of time.", + "get_sound_volume": "Reports the sound volume.", + "sound_from_to": "", + "sound_from_to_and_wait": "", + "Block_info": "", + "Block_click_msg": "" +}; +Lang.Category = { + "entrybot_friends": "", + "people": "", + "animal": "", + "animal_flying": "", + "animal_land": "", + "animal_water": "", + "animal_others": "", + "plant": "", + "plant_flower": "", + "plant_grass": "", + "plant_tree": "", + "plant_others": "", + "vehicles": "", + "vehicles_flying": "", + "vehicles_land": "", + "vehicles_water": "", + "vehicles_others": "", + "architect": "", + "architect_building": "", + "architect_monument": "", + "architect_others": "", + "food": "", + "food_vegetables": "", + "food_meat": "", + "food_drink": "", + "food_others": "", + "environment": "", + "environment_nature": "", + "environment_space": "", + "environment_others": "", + "stuff": "", + "stuff_living": "", + "stuff_hobby": "", + "stuff_others": "", + "fantasy": "", + "interface": "", + "background": "", + "background_outdoor": "", + "background_indoor": "", + "background_nature": "", + "background_others": "" +}; +Lang.Device = { + "arduino": "arduino", + "hamster": "hamster", + "albert": "albert", + "robotis_carCont": "", + "robotis_openCM70": "", + "sensorBoard": "Entry Sensor Board", + "CODEino": "CODEino", + "bitbrick": "bitbrick" +}; +Lang.General = { + "turn_on": "turn on", + "turn_off": "turn off", + "left": "left", + "right": "right", + "both": "both", + "red": "red", + "yellow": "yellow", + "green": "green", + "skyblue": "sykblue", + "blue": "blue", + "purple": "purple", + "white": "white", + "note_c": "C", + "note_d": "D", + "note_e": "E", + "note_f": "F", + "note_g": "G", + "note_a": "A", + "note_b": "B" +}; +Lang.Fonts = { + "batang": "KoPub Batang", + "myeongjo": "Nanum Myeongjo", + "gothic": "Nanum Gothic", + "pen_script": "Nanum Pen Script", + "jeju_hallasan": "Jeju Hallasan", + "gothic_coding": "Nanum Gothic Coding" +}; diff --git a/extern/util/static.js b/extern/util/static.js index f765cad445..a77fa14828 100644 --- a/extern/util/static.js +++ b/extern/util/static.js @@ -258,6 +258,12 @@ EntryStatic.getAllBlocks = function() { "hide_list" ] }, + { + category: "func", + blocks: [ + "functionAddButton", + ] + }, { category: "arduino", blocks: [ @@ -275,7 +281,15 @@ EntryStatic.getAllBlocks = function() { "dplay_get_digital_value", "dplay_toggle_led", "dplay_toggle_pwm", - "dplay_convert_scale", + "dplay_convert_scale", + "dplay_get_value", + "dplay_get_switch_status", + "dplay_get_tilt", + "dplay_get_light_status", + "dplay_select_led", + "dplay_DCmotor", + "dplay_buzzer", + "dplay_servo", //nemoino "nemoino_get_number_sensor_value", "nemoino_get_digital_value", @@ -284,15 +298,15 @@ EntryStatic.getAllBlocks = function() { "nemoino_convert_scale", //neobot "neobot_sensor_value", - "neobot_turn_left", - "neobot_stop_left", - "neobot_turn_right", - "neobot_stop_right", - "neobot_run_motor", - "neobot_servo_1", - "neobot_servo_2", + "neobot_left_motor", + "neobot_stop_left_motor", + "neobot_right_motor", + "neobot_stop_right_motor", + "neobot_all_motor", + "neobot_set_servo", + "neobot_set_output", + "neobot_set_fnd", "neobot_play_note_for", - "neobot_set_sensor_value", "bitbrick_sensor_value", "bitbrick_convert_scale", "bitbrick_is_touch_pressed", @@ -410,15 +424,15 @@ EntryStatic.getAllBlocks = function() { "xbot_oneWheel", "xbot_twoWheel", "xbot_lcd" - //end of XBOT Blocks added + //end of XBOT Blocks added ] } ] } EntryStatic.blockInfo = { - - //XBOT Blocks added + + //XBOT Blocks added "xbot_servo": { "isNotFor": ['xbot_epor_edge'], "xml": "90", @@ -481,7 +495,7 @@ EntryStatic.blockInfo = { "xml": "255", "class": "xbot_sensor" }, - //end of XBOT Blocks added + //end of XBOT Blocks added "when_run_button_click": { "xml": "", @@ -490,7 +504,7 @@ EntryStatic.blockInfo = { "usage": ["start"] }, "when_some_key_pressed": { - "xml": "", + "xml": "67", "class": "event", "isNotFor": [], "usage": ["start"] @@ -1018,7 +1032,7 @@ EntryStatic.blockInfo = { "usage": ["list"] }, "boolean_basic_operator": { - "xml": " EQUAL 10 10 ", + "xml": " 10 EQUAL 10 ", "xmls": [ " EQUAL 10 10 ", " GREATER 10 10 ", @@ -1581,50 +1595,50 @@ EntryStatic.blockInfo = { "xml": "", "class": "neobot_value" }, - "neobot_turn_left": { + "neobot_left_motor": { "isNotFor": ['neobot'], - "xml": "", + "xml": "15", "class": "neobot_motor" }, - "neobot_stop_left": { + "neobot_stop_left_motor": { "isNotFor": ['neobot'], - "xml": "", + "xml": "", "class": "neobot_motor" }, - "neobot_turn_right": { + "neobot_right_motor": { "isNotFor": ['neobot'], - "xml": "", + "xml": "15", "class": "neobot_motor" }, - "neobot_stop_right": { + "neobot_stop_right_motor": { "isNotFor": ['neobot'], - "xml": "", + "xml": "", "class": "neobot_motor" }, - "neobot_run_motor": { + "neobot_all_motor": { "isNotFor": ['neobot'], - "xml": "1", + "xml": "15", "class": "neobot_motor" }, - "neobot_servo_1": { + "neobot_set_servo": { "isNotFor": ['neobot'], - "xml": "", - "class": "neobot_servo" + "xml": "", + "class": "neobot_output" }, - "neobot_servo_2": { + "neobot_set_output": { "isNotFor": ['neobot'], - "xml": "", - "class": "neobot_servo" + "xml": "255", + "class": "neobot_output" }, - "neobot_play_note_for": { + "neobot_set_fnd": { "isNotFor": ['neobot'], - "xml": "", - "class": "neobot_note" + "xml": "0", + "class": "neobot_output" }, - "neobot_set_sensor_value": { + "neobot_play_note_for": { "isNotFor": ['neobot'], - "xml": "", - "class": "neobot_set_value" + "xml": "124", + "class": "neobot_note" }, "bitbrick_sensor_value": { "isNotFor": ['bitbrick'], @@ -1994,6 +2008,54 @@ EntryStatic.blockInfo = { "usage": ["arduino"], "class": "CODEino" }, + "dplay_get_tilt": { + "xml": "", + "isNotFor": ["dplay"], + "usage": ["arduino"], + "class": "dplay_set" + }, + "dplay_get_value": { + "xml": "", + "isNotFor": ['dplay'], + "usage": ["arduino"], + "class": "dplay_set" + }, + "dplay_get_light_status": { + "xml": "", + "isNotFor": ["dplay"], + "usage": ["arduino"], + "class": "dplay_set" + }, + "dplay_get_switch_status": { + "xml": "", + "isNotFor": ["dplay"], + "usage": ["arduino"], + "class": "dplay_set" + }, + "dplay_buzzer": { + "xml": "0", + "isNotFor": ['dplay'], + "usage": ["arduino"], + "class": "dplay" + }, + "dplay_select_led": { + "xml": "", + "isNotFor": ['dplay'], + "usage": ["arduino"], + "class": "dplay" + }, + "dplay_DCmotor": { + "xml": "", + "isNotFor": ['dplay'], + "usage": ["arduino"], + "class": "dplay" + }, + "dplay_servo": { + "xml": "255", + "isNotFor": ['dplay'], + "usage": ["arduino"], + "class": "dplay" + }, "direction_relative_duration": { "isNotFor": [""], "xml": "2", diff --git a/images/hw/neobot.png b/images/hw/neobot.png index 9f111ddc4b..967f9196f2 100644 Binary files a/images/hw/neobot.png and b/images/hw/neobot.png differ diff --git a/images/sounds/click.mp3 b/images/sounds/click.mp3 new file mode 100644 index 0000000000..4534b0ddca Binary files /dev/null and b/images/sounds/click.mp3 differ diff --git a/images/sounds/click.ogg b/images/sounds/click.ogg new file mode 100644 index 0000000000..e8ae42a610 Binary files /dev/null and b/images/sounds/click.ogg differ diff --git a/images/sounds/click.wav b/images/sounds/click.wav new file mode 100644 index 0000000000..41a50cd76f Binary files /dev/null and b/images/sounds/click.wav differ diff --git a/images/sounds/delete.mp3 b/images/sounds/delete.mp3 new file mode 100644 index 0000000000..442bd9c1f4 Binary files /dev/null and b/images/sounds/delete.mp3 differ diff --git a/images/sounds/delete.ogg b/images/sounds/delete.ogg new file mode 100644 index 0000000000..67f84ac19a Binary files /dev/null and b/images/sounds/delete.ogg differ diff --git a/images/sounds/delete.wav b/images/sounds/delete.wav new file mode 100644 index 0000000000..18debcf96d Binary files /dev/null and b/images/sounds/delete.wav differ diff --git a/src/blocks/block_arduino.js b/src/blocks/block_arduino.js index f45410a5cb..b4f3b1aa6a 100644 --- a/src/blocks/block_arduino.js +++ b/src/blocks/block_arduino.js @@ -484,6 +484,95 @@ Entry.block.sensorBoard_led = function (sprite, script) { return script.callReturn(); }; +Entry.block.arduino_download_connector = { + skeleton: "basic_button", + color: "#eee", + template: "%1", + params: [ + { + type: "Text", + text: "연결 프로그램 다운로드", + color: "#333", + align: "center" + } + ], + func: function() {}, + events: { + mousedown: [ + function() { + console.log('download connector'); + } + ] + } +}; + +Entry.block.arduino_download_source = { + skeleton: "basic_button", + color: "#eee", + template: "%1", + params: [ + { + type: "Text", + text: "엔트리 아두이노 소스", + color: "#333", + align: "center" + } + ], + func: function() {}, + events: { + mousedown: [ + function() { + console.log('download source'); + } + ] + } +}; + +Entry.block.arduino_connected = { + skeleton: "basic_button", + color: "#eee", + template: "%1", + params: [ + { + type: "Text", + text: "연결 됨", + color: "#333", + align: "center" + } + ], + func: function() {}, + events: { + mousedown: [ + function() { + console.log('download source'); + } + ] + } +}; + + +Entry.block.arduino_reconnect = { + skeleton: "basic_button", + color: "#eee", + template: "%1", + params: [ + { + type: "Text", + text: "다시 연결하기", + color: "#333", + align: "center" + } + ], + func: function() {}, + events: { + mousedown: [ + function() { + console.log('download source'); + } + ] + } +}; + Blockly.Blocks.CODEino_get_sensor_number = { init: function() { @@ -685,3 +774,262 @@ Entry.block.CODEino_get_accelerometer_value = function (sprite, script) { result = Math.max(value4, result); return Math.round(result); }; + +Blockly.Blocks.dplay_select_led = { + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.ARDUINO_num_pin_1); + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([ + ['7',"7"], + ['8',"8"], + ['9',"9"], + ['10',"10"] + ]), "PORT") + this.appendDummyInput() + .appendField(Lang.Blocks.dplay_num_pin_1); + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([ + [Lang.Blocks.ARDUINO_on,"on"], + [Lang.Blocks.ARDUINO_off,"off"] + ]), "OPERATOR") + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } +}; + +Entry.block.dplay_select_led = function (sprite, script) { + var port1 = script.getField("PORT"); + var port = 7; + if (port1 == "7") port = 7; + else if (port1 == "8") port = 8; + else if (port1 == "9") port = 9; + else if (port1 == "10") port = 10; + var operator = script.getField("OPERATOR"); + var value = operator == "on" ? 255 : 0; + Entry.hw.setDigitalPortValue(port, value); + return script.callReturn(); +}; + +Blockly.Blocks.dplay_get_switch_status = { + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField("디지털 "); + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([ + ['2',"2"], + ['4',"4"] + ]), "PORT") + this.appendDummyInput() + .appendField(Lang.Blocks.dplay_num_pin_2) + .appendField(new Blockly.FieldDropdown([ + [Lang.Blocks.dplay_string_5,"ON"], + [Lang.Blocks.dplay_string_6,"OFF"] + ]), "STATUS") + .appendField(' '); + this.setInputsInline(true); + this.setOutput(true, 'Boolean'); + } +}; + +Entry.block.dplay_get_switch_status = function (sprite, script) { + var port1 = script.getField("PORT"); + var port = 2; + if (port1 == "2") port = 2; + else if (port1 == "4") port = 4; + var value1 = script.getField("STATUS"); + if (value1 == "OFF") return Entry.hw.getDigitalPortValue(port) == 1 ? 1 : 0; + else return Entry.hw.getDigitalPortValue(port) == 0 ? 1 : 0; +}; + +Blockly.Blocks.dplay_get_light_status = { + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.dplay_light) + .appendField(new Blockly.FieldDropdown([ + [Lang.Blocks.dplay_string_3,"BRIGHT"], + [Lang.Blocks.dplay_string_4,"DARK"] + ]), "STATUS") + .appendField(' '); + this.setInputsInline(true); + this.setOutput(true, 'Boolean'); + } +}; + +Entry.block.dplay_get_light_status = function (sprite, script) { + var value1 = script.getField("STATUS", script); + var value2 = 1; + if (value1 == "DARK") return Entry.hw.getAnalogPortValue(value2) > 800 ? 1 : 0; + else return Entry.hw.getAnalogPortValue(value2) < 800 ? 1 : 0; +}; + +Blockly.Blocks.dplay_get_value = { + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.dplay_num_pin_3); + this.appendValueInput("VALUE") + .setCheck(["Number", "String", null]); + this.appendDummyInput() + .appendField("번 "); + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([ + ['가변저항',"ADJU"], + ['빛센서',"LIGHT"], + ['온도센서',"TEMP"], + ['조이스틱 X',"JOYS"], + ['조이스틱 Y',"JOYS"], + ['적외선',"INFR"] + ]), "OPERATOR") + this.appendDummyInput() + .appendField(Lang.Blocks.dplay_num_pin_5) + this.setInputsInline(true); + this.setOutput(true, 'Number'); + } +}; + +Entry.block.dplay_get_value = function (sprite, script) { + var signal = script.getValue("VALUE", script); + return Entry.hw.getAnalogPortValue(signal[1]); +}; + +Blockly.Blocks.dplay_get_tilt = { + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.dplay_tilt) + .appendField(new Blockly.FieldDropdown([ + ['왼쪽 기울임',"LEFT"], + ['오른쪽 기울임',"LIGHT"] + ]), "STATUS") + .appendField(' '); + this.setInputsInline(true); + this.setOutput(true, 'Boolean'); + } +}; + +Entry.block.dplay_get_tilt = function (sprite, script) { + var value1 = script.getField("STATUS", script); + var value2 = 12; + if (value1 == "LIGHT") return Entry.hw.getDigitalPortValue(value2) == 1 ? 1 : 0; + else return Entry.hw.getDigitalPortValue(value2) == 0 ? 1 : 0; +}; + +Blockly.Blocks.dplay_DCmotor = { + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([ + ['왼쪽',"3"], + ['오른쪽',"6"] + ]), "PORT"); + this.appendDummyInput() + .appendField(' DC모터 상태를'); + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([ + ['정방향',"FRONT"], + ['역방향',"REAR"], + ['정지',"OFF"] + ]), "OPERATOR") + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } +}; + +Entry.block.dplay_DCmotor = function (sprite, script) { + var port1 = script.getField("PORT"); + var port2 = 0; + if (port1 == "3") port2 = 5; + else if (port1 == "6") value2 = 11; + var operator = script.getField("OPERATOR"); + var value1 = 0; + var value2 = 0; + if (operator == "FRONT") { + value1 = 255; + value2 = 0; + } + else if (operator == "REAR") { + value1 = 0; + value2 = 255; + } + else if (operator == "OFF") { + value1 = 0; + value2 = 0; + } + Entry.hw.setDigitalPortValue(port1, value1); + Entry.hw.setDigitalPortValue(port2, value2); + return script.callReturn(); +}; + +Blockly.Blocks.dplay_buzzer = { + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField('부저를 '); + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([ + ['도',"1"], + ['레',"2"], + ['미',"3"] + ]), "PORT"); + this.appendDummyInput() + .appendField('로'); + this.appendValueInput("VALUE") + .setCheck(["Number", "String", null]); + this.appendDummyInput() + .appendField('박자로 연주하기'); + this.appendDummyInput() + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } +}; + +Entry.block.dplay_buzzer = function (sprite, script) { + var port1 = script.getField("PORT"); + var port = 2; + if (port1 == "1") port = 2; + else if (port1 == "2") port = 4; + else if (port1 == "3") port = 7; + var value = script.getNumberValue("VALUE"); + value = Math.round(value); + value = Math.max(value, 0); + value = Math.min(value, 100); + Entry.hw.setDigitalPortValue(port, value); + return script.callReturn(); +}; + +Blockly.Blocks.dplay_servo = { + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField('서보모터 각도를'); + this.appendValueInput("VALUE") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField('로 이동'); + this.appendDummyInput() + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } +}; + +Entry.block.dplay_servo = function (sprite, script) { + var port = 9; + var value = script.getNumberValue("VALUE"); + value = Math.round(value); + value = Math.max(value, 0); + value = Math.min(value, 180); + Entry.hw.setDigitalPortValue(port, value); + return script.callReturn(); +}; diff --git a/src/blocks/block_calc.js b/src/blocks/block_calc.js index 94d285626d..589ce25b4f 100644 --- a/src/blocks/block_calc.js +++ b/src/blocks/block_calc.js @@ -16,7 +16,7 @@ Blockly.Blocks.number = { }; Entry.block.number = function (sprite, script) { - return script.fields['NUM']; + return script.getField('NUM', script); }; Blockly.Blocks.angle = { @@ -564,10 +564,10 @@ Blockly.Blocks.reset_project_timer = { this.setNextStatement(true); }, whenAdd: function () { - Entry.engine.showProjectTimer(); + if (Entry.engine) Entry.engine.showProjectTimer(); }, whenRemove: function (removeBlock) { - Entry.engine.hideProjectTimer(removeBlock); + if (Entry.engine) Entry.engine.hideProjectTimer(removeBlock); } }; @@ -594,10 +594,10 @@ Blockly.Blocks.set_visible_project_timer = { this.setNextStatement(true); }, whenAdd: function () { - Entry.engine.showProjectTimer(); + if (Entry.engine) Entry.engine.showProjectTimer(); }, whenRemove: function (removeBlock) { - Entry.engine.hideProjectTimer(removeBlock); + if (Entry.engine) Entry.engine.hideProjectTimer(removeBlock); } }; @@ -639,10 +639,10 @@ Blockly.Blocks.get_project_timer_value = { this.setInputsInline(true); }, whenAdd: function () { - Entry.engine.showProjectTimer(); + if (Entry.engine) Entry.engine.showProjectTimer(); }, whenRemove: function (removeBlock) { - Entry.engine.hideProjectTimer(removeBlock); + if (Entry.engine) Entry.engine.hideProjectTimer(removeBlock); } }; @@ -919,10 +919,10 @@ Blockly.Blocks.choose_project_timer_action = { this.setNextStatement(true); }, whenAdd: function () { - Entry.engine.showProjectTimer(); + if (Entry.engine) Entry.engine.showProjectTimer(); }, whenRemove: function (removeBlock) { - Entry.engine.hideProjectTimer(removeBlock); + if (Entry.engine) Entry.engine.hideProjectTimer(removeBlock); } }; diff --git a/src/blocks/block_flow.js b/src/blocks/block_flow.js index 86f1be782f..194702390e 100644 --- a/src/blocks/block_flow.js +++ b/src/blocks/block_flow.js @@ -108,21 +108,7 @@ Blockly.Blocks.stop_repeat = { }; Entry.block.stop_repeat = function (sprite, script) { - var parentScript = script; - while (parentScript.type.substr(0, 6).toUpperCase() != "REPEAT" && - parentScript.parentScript) { - parentScript = parentScript.parentScript; - delete parentScript.isLooped; - delete parentScript.iterCount; - } - var nextScript = parentScript.callReturn(); - if (parentScript.statements && nextScript) { - return nextScript; - } - else if (parentScript) - return null; - else - return script.callReturn(); + return this.executor.break(); }; // wait until condtion is true @@ -311,7 +297,6 @@ Blockly.Blocks.repeat_while_true = { ]), "OPTION") .appendField(Lang.Blocks.FLOW_repeat_while_true_2) .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/flow_03.png', '*')); -; this.appendStatementInput('DO'); this.setInputsInline(true); this.setPreviousStatement(true); @@ -325,10 +310,10 @@ Blockly.Blocks.repeat_while_true = { [Lang.Blocks.FLOW_repeat_while_true_while,"while"] ]), "OPTION"); this.appendValueInput("BOOL") - .setCheck("Boolean"); + .setCheck("Boolean"); this.appendDummyInput() .appendField(Lang.Blocks.FLOW_repeat_while_true_2) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/flow_03.png', '*'));; + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/flow_03.png', '*')); this.appendStatementInput('DO'); this.setInputsInline(true); this.setPreviousStatement(true); @@ -375,31 +360,18 @@ Entry.block.stop_object = function (sprite, script) { switch(target) { case 'all': - container.mapEntityIncludeCloneOnScene(function (entity){ - entity.clearScript(); - }); - break; - case 'thisObject': - sprite.clearScript(); - var clonedEntities = sprite.parent.clonedEntities; - clonedEntities.map(function (entity) { - entity.clearScript(); - }); - break; + container.clearRunningState(); + return this.die(); case 'thisOnly': - sprite.clearScript(); - break; + sprite.parent.script.clearExecutorsByEntity(sprite); + return this.die(); case 'thisThread': - break; + return this.die(); case 'otherThread': - sprite.clearScript(); - var clonedEntities = sprite.parent.clonedEntities; - clonedEntities.map(function (entity) { - entity.clearScript(); - }); - return script.callReturn(); + sprite.parent.script.clearExecutors(); + sprite.parent.script.addExecutor(this.executor); + return; } - return null; }; Blockly.Blocks.restart_project = { diff --git a/src/blocks/block_function.js b/src/blocks/block_function.js index 1db4dbb095..6b52be02b0 100644 --- a/src/blocks/block_function.js +++ b/src/blocks/block_function.js @@ -1,5 +1,27 @@ "use strict"; +Entry.block.functionAddButton = { + skeleton: "basic_button", + color: "#eee", + isNotFor: ["functionInit"], + template: "%1", + params: [ + { + type: "Text", + text: "함수 추가", + color: "#333", + align: "center" + } + ], + events: { + mousedown: [ + function() { + Entry.variableContainer.createFunction(); + } + ] + } +}; + Blockly.Blocks.function_field_label = { init: function() { this.setColour("#f9c535"); @@ -12,6 +34,23 @@ Blockly.Blocks.function_field_label = { } }; +Entry.block.function_field_label = { + skeleton: "basic_param", + isNotFor: ["functionEdit"], + color: "#f9c535", + template: "%1%2", + params: [ + { + type: "TextInput", + value: "함수" + }, + { + type: "Output", + accept: "paramMagnet" + } + ] +}; + Blockly.Blocks.function_field_string = { init: function() { this.setColour("#FFD974"); @@ -24,6 +63,24 @@ Blockly.Blocks.function_field_string = { } }; +Entry.block.function_field_string = { + skeleton: "basic_param", + isNotFor: ["functionEdit"], + color: "#ffd974", + template: "%1%2", + params: [ + { + type: "Block", + accept: "stringMagnet", + restore: true + }, + { + type: "Output", + accept: "paramMagnet" + } + ] +}; + Blockly.Blocks.function_field_boolean = { init: function() { this.setColour("#AEB8FF"); @@ -36,6 +93,24 @@ Blockly.Blocks.function_field_boolean = { } }; +Entry.block.function_field_boolean = { + skeleton: "basic_param", + isNotFor: ["functionEdit"], + color: "#aeb8ff", + template: "%1%2", + params: [ + { + type: "Block", + accept: "booleanMagnet", + restore: true + }, + { + type: "Output", + accept: "paramMagnet" + } + ] +}; + Blockly.Blocks.function_param_string = { init: function() { this.setEditable(false); @@ -67,6 +142,15 @@ Entry.block.function_param_string = function (sprite, script, register) { return script.register[script.hashId].run() }; +Entry.block.function_param_string = { + skeleton: "basic_string_field", + color: "#ffd974", + template: "문자/숫자값", + func: function() { + return this.executor.register.params[this.executor.register.paramMap[this.block.type]]; + } +}; + Blockly.Blocks.function_param_boolean = { init: function() { this.setEditable(false); @@ -93,6 +177,15 @@ Entry.block.function_param_boolean = function (sprite, script, register) { return script.register[script.hashId].run() }; +Entry.block.function_param_boolean = { + skeleton: "basic_boolean_field", + color: "#aeb8ff", + template: "판단값", + func: function() { + return this.executor.register.params[this.executor.register.paramMap[this.block.type]]; + } +}; + Blockly.Blocks.function_create = { init: function() { this.appendDummyInput() @@ -111,6 +204,29 @@ Entry.block.function_create = function (sprite, script) { return script.callReturn(); }; +Entry.block.function_create = { + skeleton: "basic", + color: "#cc7337", + event: "funcDef", + template: "함수 정의하기 %1 %2", + params: [ + { + type: "Block", + accept: "paramMagnet", + value: { + type: "function_field_label" + } + }, + { + type: "Indicator", + img: "/lib/entryjs/images/block_icon/function_03.png", + size: 12 + } + ], + func: function() { + } +}; + Blockly.Blocks.function_general = { init: function() { this.setColour("#cc7337"); @@ -197,3 +313,31 @@ Entry.block.function_general = function (sprite, script) { return script; } }; + +Entry.block.function_general = { + skeleton: "basic", + color: "#cc7337", + template: "함수", + params: [ + ], + func: function(entity) { + if (!this.initiated) { + this.initiated = true; + + var func = Entry.variableContainer.getFunction( + this.block.type.substr(5, 9) + ); + this.funcCode = func.content; + this.funcExecutor = this.funcCode.raiseEvent("funcDef", entity)[0]; + this.funcExecutor.register.params = this.getParams(); + var paramMap = {}; + this.funcExecutor.register.paramMap = func.paramMap; + } + this.funcExecutor.execute(); + if (!this.funcExecutor.isEnd()) { + this.funcCode.removeExecutor(this.funcExecutor); + return Entry.STATIC.BREAK; + } + } +}; + diff --git a/src/blocks/block_hamster.js b/src/blocks/block_hamster.js index 8f30f80ee2..824da3e126 100644 --- a/src/blocks/block_hamster.js +++ b/src/blocks/block_hamster.js @@ -1,60 +1,60 @@ "use strict"; Entry.Hamster = { - PORT_MAP: { - leftWheel: 0, - rightWheel: 0, - buzzer: 0, - outputA: 0, - outputB: 0, - leftLed: 0, - rightLed: 0, - note: 0, - lineTracerMode: 0, - lineTracerModeId: 0, - lineTracerSpeed: 5, - ioModeA: 0, - ioModeB: 0 - }, - setZero: function() { - var portMap = Entry.Hamster.PORT_MAP; - var sq = Entry.hw.sendQueue; - for (var port in portMap) { - sq[port] = portMap[port]; - } - Entry.hw.update(); - var hamster = Entry.Hamster; - hamster.lineTracerModeId = 0; - hamster.lineTracerStateId = -1; - hamster.tempo = 60; - hamster.removeAllTimeouts(); - }, - lineTracerModeId: 0, - lineTracerStateId: -1, - tempo: 60, - timeouts: [], - removeTimeout: function(id) { - clearTimeout(id); - var timeouts = this.timeouts; - var index = timeouts.indexOf(id); - if(index >= 0) { - timeouts.splice(index, 1); - } - }, - removeAllTimeouts: function() { - var timeouts = this.timeouts; - for(var i in timeouts) { - clearTimeout(timeouts[i]); - } - this.timeouts = []; - }, - setLineTracerMode: function(sq, mode) { - this.lineTracerModeId = (this.lineTracerModeId + 1) & 0xff; - sq.lineTracerMode = mode; - sq.lineTracerModeId = this.lineTracerModeId; - }, - name: 'hamster', - monitorTemplate: { + PORT_MAP: { + leftWheel: 0, + rightWheel: 0, + buzzer: 0, + outputA: 0, + outputB: 0, + leftLed: 0, + rightLed: 0, + note: 0, + lineTracerMode: 0, + lineTracerModeId: 0, + lineTracerSpeed: 5, + ioModeA: 0, + ioModeB: 0 + }, + setZero: function() { + var portMap = Entry.Hamster.PORT_MAP; + var sq = Entry.hw.sendQueue; + for (var port in portMap) { + sq[port] = portMap[port]; + } + Entry.hw.update(); + var hamster = Entry.Hamster; + hamster.lineTracerModeId = 0; + hamster.lineTracerStateId = -1; + hamster.tempo = 60; + hamster.removeAllTimeouts(); + }, + lineTracerModeId: 0, + lineTracerStateId: -1, + tempo: 60, + timeouts: [], + removeTimeout: function(id) { + clearTimeout(id); + var timeouts = this.timeouts; + var index = timeouts.indexOf(id); + if(index >= 0) { + timeouts.splice(index, 1); + } + }, + removeAllTimeouts: function() { + var timeouts = this.timeouts; + for(var i in timeouts) { + clearTimeout(timeouts[i]); + } + this.timeouts = []; + }, + setLineTracerMode: function(sq, mode) { + this.lineTracerModeId = (this.lineTracerModeId + 1) & 0xff; + sq.lineTracerMode = mode; + sq.lineTracerModeId = this.lineTracerModeId; + }, + name: 'hamster', + monitorTemplate: { imgPath: "hw/hamster.png", width: 256, height: 256, @@ -75,7 +75,7 @@ Entry.Hamster = { "rightFloor":{name: Lang.Blocks.HAMSTER_sensor_rightFloor, type: "input", pos: {x: 13, y: 180}}, "lightsensor":{name: Lang.Hw.light + Lang.Hw.sensor, type: "input", pos: {x: 56, y: 189}}, "leftWheel":{name: Lang.Hw.leftWheel, type: "output", pos: {x: 209, y: 115}}, - "rightWheel":{name: Lang.Hw.rightWheel, type: "output", pos: {x: 98, y: 30}}, + "rightWheel":{name: Lang.Hw.rightWheel, type: "output", pos: {x: 98, y: 30}}, "leftLed":{name: Lang.Hw.left + " " + Lang.Hw.led, type: "output", pos: {x: 87, y: 210}}, "rightLed":{name: Lang.Hw.right + " " + Lang.Hw.led , type: "output", pos: {x: 24, y: 168}}, }, @@ -85,1152 +85,1152 @@ Entry.Hamster = { //sensor Blockly.Blocks.hamster_hand_found = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_hand_found); - this.setOutput(true, 'Boolean'); - this.setInputsInline(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_hand_found); + this.setOutput(true, 'Boolean'); + this.setInputsInline(true); + } }; Entry.block.hamster_hand_found = function (sprite, script) { - var pd = Entry.hw.portData; - return pd.leftProximity > 50 || pd.rightProximity > 50; + var pd = Entry.hw.portData; + return pd.leftProximity > 50 || pd.rightProximity > 50; }; Blockly.Blocks.hamster_value = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField('') - .appendField(new Blockly.FieldDropdown([ - [Lang.Blocks.HAMSTER_sensor_leftProximity, "leftProximity"], - [Lang.Blocks.HAMSTER_sensor_rightProximity, "rightProximity"], - [Lang.Blocks.HAMSTER_sensor_leftFloor, "leftFloor"], - [Lang.Blocks.HAMSTER_sensor_rightFloor, "rightFloor"], - [Lang.Blocks.HAMSTER_sensor_accelerationX, "accelerationX"], - [Lang.Blocks.HAMSTER_sensor_accelerationY, "accelerationY"], - [Lang.Blocks.HAMSTER_sensor_accelerationZ, "accelerationZ"], - [Lang.Blocks.HAMSTER_sensor_light, "light"], - [Lang.Blocks.HAMSTER_sensor_temperature, "temperature"], - [Lang.Blocks.HAMSTER_sensor_signalStrength, "signalStrength"], - [Lang.Blocks.HAMSTER_sensor_inputA, "inputA"], - [Lang.Blocks.HAMSTER_sensor_inputB, "inputB"] - ]), "DEVICE"); - this.setInputsInline(true); - this.setOutput(true, 'Number'); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField('') + .appendField(new Blockly.FieldDropdown([ + [Lang.Blocks.HAMSTER_sensor_leftProximity, "leftProximity"], + [Lang.Blocks.HAMSTER_sensor_rightProximity, "rightProximity"], + [Lang.Blocks.HAMSTER_sensor_leftFloor, "leftFloor"], + [Lang.Blocks.HAMSTER_sensor_rightFloor, "rightFloor"], + [Lang.Blocks.HAMSTER_sensor_accelerationX, "accelerationX"], + [Lang.Blocks.HAMSTER_sensor_accelerationY, "accelerationY"], + [Lang.Blocks.HAMSTER_sensor_accelerationZ, "accelerationZ"], + [Lang.Blocks.HAMSTER_sensor_light, "light"], + [Lang.Blocks.HAMSTER_sensor_temperature, "temperature"], + [Lang.Blocks.HAMSTER_sensor_signalStrength, "signalStrength"], + [Lang.Blocks.HAMSTER_sensor_inputA, "inputA"], + [Lang.Blocks.HAMSTER_sensor_inputB, "inputB"] + ]), "DEVICE"); + this.setInputsInline(true); + this.setOutput(true, 'Number'); + } }; Entry.block.hamster_value = function (sprite, script) { - var pd = Entry.hw.portData; - var dev = script.getField('DEVICE'); - return pd[dev]; + var pd = Entry.hw.portData; + var dev = script.getField('DEVICE'); + return pd[dev]; }; //board Blockly.Blocks.hamster_move_forward_once = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_move_forward_once) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_move_forward_once) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_move_forward_once = function (sprite, script) { - var sq = Entry.hw.sendQueue; - var pd = Entry.hw.portData; - if (!script.isStart) { - script.isStart = true; - script.isMoving = true; - script.count = 0; - script.boardState = 1; - sq.leftWheel = 45; - sq.rightWheel = 45; - Entry.Hamster.setLineTracerMode(sq, 0); - return script; - } else if (script.isMoving) { - switch(script.boardState) { - case 1: { - if(script.count < 2) { - if(pd.leftFloor < 50 && pd.rightFloor < 50) - script.count ++; - else - script.count = 0; - var diff = pd.leftFloor - pd.rightFloor; - sq.leftWheel = 45 + diff * 0.25; - sq.rightWheel = 45 - diff * 0.25; - } else { - script.count = 0; - script.boardState = 2; - } - break; - } - case 2: { - var diff = pd.leftFloor - pd.rightFloor; - sq.leftWheel = 45 + diff * 0.25; - sq.rightWheel = 45 - diff * 0.25; - script.boardState = 3; - var timer = setTimeout(function() { - script.boardState = 4; - Entry.Hamster.removeTimeout(timer); - }, 250); - Entry.Hamster.timeouts.push(timer); - break; - } - case 3: { - var diff = pd.leftFloor - pd.rightFloor; - sq.leftWheel = 45 + diff * 0.25; - sq.rightWheel = 45 - diff * 0.25; - break; - } - case 4: { - sq.leftWheel = 0; - sq.rightWheel = 0; - script.boardState = 0; - script.isMoving = false; - break; - } - } - return script; - } else { - delete script.isStart; - delete script.isMoving; - delete script.count; - delete script.boardState; - Entry.engine.isContinue = false; - sq.leftWheel = 0; - sq.rightWheel = 0; - return script.callReturn(); - } + var sq = Entry.hw.sendQueue; + var pd = Entry.hw.portData; + if (!script.isStart) { + script.isStart = true; + script.isMoving = true; + script.count = 0; + script.boardState = 1; + sq.leftWheel = 45; + sq.rightWheel = 45; + Entry.Hamster.setLineTracerMode(sq, 0); + return script; + } else if (script.isMoving) { + switch(script.boardState) { + case 1: { + if(script.count < 2) { + if(pd.leftFloor < 50 && pd.rightFloor < 50) + script.count ++; + else + script.count = 0; + var diff = pd.leftFloor - pd.rightFloor; + sq.leftWheel = 45 + diff * 0.25; + sq.rightWheel = 45 - diff * 0.25; + } else { + script.count = 0; + script.boardState = 2; + } + break; + } + case 2: { + var diff = pd.leftFloor - pd.rightFloor; + sq.leftWheel = 45 + diff * 0.25; + sq.rightWheel = 45 - diff * 0.25; + script.boardState = 3; + var timer = setTimeout(function() { + script.boardState = 4; + Entry.Hamster.removeTimeout(timer); + }, 250); + Entry.Hamster.timeouts.push(timer); + break; + } + case 3: { + var diff = pd.leftFloor - pd.rightFloor; + sq.leftWheel = 45 + diff * 0.25; + sq.rightWheel = 45 - diff * 0.25; + break; + } + case 4: { + sq.leftWheel = 0; + sq.rightWheel = 0; + script.boardState = 0; + script.isMoving = false; + break; + } + } + return script; + } else { + delete script.isStart; + delete script.isMoving; + delete script.count; + delete script.boardState; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } }; Blockly.Blocks.hamster_turn_once = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_turn_once_1) - .appendField(new Blockly.FieldDropdown([ - [Lang.General.left,"LEFT"], - [Lang.General.right,"RIGHT"] - ]), "DIRECTION") - .appendField(Lang.Blocks.HAMSTER_turn_once_2) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_turn_once_1) + .appendField(new Blockly.FieldDropdown([ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"] + ]), "DIRECTION") + .appendField(Lang.Blocks.HAMSTER_turn_once_2) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_turn_once = function (sprite, script) { - var sq = Entry.hw.sendQueue; - var pd = Entry.hw.portData; - if (!script.isStart) { - script.isStart = true; - script.isMoving = true; - script.count = 0; - script.boardState = 1; - var direction = script.getField("DIRECTION", script); - if (direction == 'LEFT') { - script.isLeft = true; - sq.leftWheel = -45; - sq.rightWheel = 45; - } else { - script.isLeft = false; - sq.leftWheel = 45; - sq.rightWheel = -45; - } - Entry.Hamster.setLineTracerMode(sq, 0); - return script; - } else if (script.isMoving) { - if(script.isLeft) { - switch(script.boardState) { - case 1: { - if(script.count < 2) { - if(pd.leftFloor > 50) - script.count ++; - } else { - script.count = 0; - script.boardState = 2; - } - break; - } - case 2: { - if(pd.leftFloor < 20) { - script.boardState = 3; - } - break; - } - case 3: { - if(script.count < 2) { - if(pd.leftFloor < 20) - script.count ++; - } else { - script.count = 0; - script.boardState = 4; - } - break; - } - case 4: { - if(pd.leftFloor > 50) { - script.boardState = 5; - } - break; - } - case 5: { - var diff = pd.leftFloor - pd.rightFloor; - if(diff > -15) { - sq.leftWheel = 0; - sq.rightWheel = 0; - script.boardState = 0; - script.isMoving = false; - } else { - sq.leftWheel = diff * 0.5; - sq.rightWheel = -diff * 0.5; - } - break; - } - } - } else { - switch(script.boardState) { - case 1: { - if(script.count < 2) { - if(pd.rightFloor > 50) - script.count ++; - } else { - script.count = 0; - script.boardState = 2; - } - break; - } - case 2: { - if(pd.rightFloor < 20) { - script.boardState = 3; - } - break; - } - case 3: { - if(script.count < 2) { - if(pd.rightFloor < 20) - script.count ++; - } else { - script.count = 0; - script.boardState = 4; - } - break; - } - case 4: { - if(pd.rightFloor > 50) { - script.boardState = 5; - } - break; - } - case 5: { - var diff = pd.rightFloor - pd.leftFloor; - if(diff > -15) { - sq.leftWheel = 0; - sq.rightWheel = 0; - script.boardState = 0; - script.isMoving = false; - } else { - sq.leftWheel = -diff * 0.5; - sq.rightWheel = diff * 0.5; - } - break; - } - } - } - return script; - } else { - delete script.isStart; - delete script.isMoving; - delete script.count; - delete script.boardState; - delete script.isLeft; - Entry.engine.isContinue = false; - sq.leftWheel = 0; - sq.rightWheel = 0; - return script.callReturn(); - } + var sq = Entry.hw.sendQueue; + var pd = Entry.hw.portData; + if (!script.isStart) { + script.isStart = true; + script.isMoving = true; + script.count = 0; + script.boardState = 1; + var direction = script.getField("DIRECTION", script); + if (direction == 'LEFT') { + script.isLeft = true; + sq.leftWheel = -45; + sq.rightWheel = 45; + } else { + script.isLeft = false; + sq.leftWheel = 45; + sq.rightWheel = -45; + } + Entry.Hamster.setLineTracerMode(sq, 0); + return script; + } else if (script.isMoving) { + if(script.isLeft) { + switch(script.boardState) { + case 1: { + if(script.count < 2) { + if(pd.leftFloor > 50) + script.count ++; + } else { + script.count = 0; + script.boardState = 2; + } + break; + } + case 2: { + if(pd.leftFloor < 20) { + script.boardState = 3; + } + break; + } + case 3: { + if(script.count < 2) { + if(pd.leftFloor < 20) + script.count ++; + } else { + script.count = 0; + script.boardState = 4; + } + break; + } + case 4: { + if(pd.leftFloor > 50) { + script.boardState = 5; + } + break; + } + case 5: { + var diff = pd.leftFloor - pd.rightFloor; + if(diff > -15) { + sq.leftWheel = 0; + sq.rightWheel = 0; + script.boardState = 0; + script.isMoving = false; + } else { + sq.leftWheel = diff * 0.5; + sq.rightWheel = -diff * 0.5; + } + break; + } + } + } else { + switch(script.boardState) { + case 1: { + if(script.count < 2) { + if(pd.rightFloor > 50) + script.count ++; + } else { + script.count = 0; + script.boardState = 2; + } + break; + } + case 2: { + if(pd.rightFloor < 20) { + script.boardState = 3; + } + break; + } + case 3: { + if(script.count < 2) { + if(pd.rightFloor < 20) + script.count ++; + } else { + script.count = 0; + script.boardState = 4; + } + break; + } + case 4: { + if(pd.rightFloor > 50) { + script.boardState = 5; + } + break; + } + case 5: { + var diff = pd.rightFloor - pd.leftFloor; + if(diff > -15) { + sq.leftWheel = 0; + sq.rightWheel = 0; + script.boardState = 0; + script.isMoving = false; + } else { + sq.leftWheel = -diff * 0.5; + sq.rightWheel = diff * 0.5; + } + break; + } + } + } + return script; + } else { + delete script.isStart; + delete script.isMoving; + delete script.count; + delete script.boardState; + delete script.isLeft; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } }; //wheel Blockly.Blocks.hamster_move_forward_for_secs = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_move_forward_for_secs_1); - this.appendValueInput("VALUE") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_move_forward_for_secs_2) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_move_forward_for_secs_1); + this.appendValueInput("VALUE") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_move_forward_for_secs_2) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_move_forward_for_secs = function (sprite, script) { - var sq = Entry.hw.sendQueue; - if (!script.isStart) { - script.isStart = true; - script.timeFlag = 1; - sq.leftWheel = 30; - sq.rightWheel = 30; - Entry.Hamster.setLineTracerMode(sq, 0); - var timeValue = script.getNumberValue("VALUE") * 1000; - var timer = setTimeout(function() { - script.timeFlag = 0; - Entry.Hamster.removeTimeout(timer); - }, timeValue); - Entry.Hamster.timeouts.push(timer); - return script; - } else if (script.timeFlag == 1) { - return script; - } else { - delete script.isStart; - delete script.timeFlag; - Entry.engine.isContinue = false; - sq.leftWheel = 0; - sq.rightWheel = 0; - return script.callReturn(); - } + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + sq.leftWheel = 30; + sq.rightWheel = 30; + Entry.Hamster.setLineTracerMode(sq, 0); + var timeValue = script.getNumberValue("VALUE") * 1000; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Hamster.removeTimeout(timer); + }, timeValue); + Entry.Hamster.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } }; Blockly.Blocks.hamster_move_backward_for_secs = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_move_backward_for_secs_1); - this.appendValueInput("VALUE") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_move_backward_for_secs_2) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_move_backward_for_secs_1); + this.appendValueInput("VALUE") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_move_backward_for_secs_2) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_move_backward_for_secs = function (sprite, script) { - var sq = Entry.hw.sendQueue; - if (!script.isStart) { - script.isStart = true; - script.timeFlag = 1; - sq.leftWheel = -30; - sq.rightWheel = -30; - Entry.Hamster.setLineTracerMode(sq, 0); - var timeValue = script.getNumberValue("VALUE") * 1000; - var timer = setTimeout(function() { - script.timeFlag = 0; - Entry.Hamster.removeTimeout(timer); - }, timeValue); - Entry.Hamster.timeouts.push(timer); - return script; - } else if (script.timeFlag == 1) { - return script; - } else { - delete script.isStart; - delete script.timeFlag; - Entry.engine.isContinue = false; - sq.leftWheel = 0; - sq.rightWheel = 0; - return script.callReturn(); - } + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + sq.leftWheel = -30; + sq.rightWheel = -30; + Entry.Hamster.setLineTracerMode(sq, 0); + var timeValue = script.getNumberValue("VALUE") * 1000; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Hamster.removeTimeout(timer); + }, timeValue); + Entry.Hamster.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } }; Blockly.Blocks.hamster_turn_for_secs = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_turn_for_secs_1) - .appendField(new Blockly.FieldDropdown([ - [Lang.General.left,"LEFT"], - [Lang.General.right,"RIGHT"] - ]), "DIRECTION") - .appendField(Lang.Blocks.HAMSTER_turn_for_secs_2) - this.appendValueInput("VALUE") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_turn_for_secs_3) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_turn_for_secs_1) + .appendField(new Blockly.FieldDropdown([ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"] + ]), "DIRECTION") + .appendField(Lang.Blocks.HAMSTER_turn_for_secs_2) + this.appendValueInput("VALUE") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_turn_for_secs_3) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_turn_for_secs = function (sprite, script) { - var sq = Entry.hw.sendQueue; - if (!script.isStart) { - script.isStart = true; - script.timeFlag = 1; - var direction = script.getField("DIRECTION", script); - if (direction == 'LEFT') { - sq.leftWheel = -30; - sq.rightWheel = 30; - } else { - sq.leftWheel = 30; - sq.rightWheel = -30; - } - Entry.Hamster.setLineTracerMode(sq, 0); - var timeValue = script.getNumberValue("VALUE") * 1000; - var timer = setTimeout(function() { - script.timeFlag = 0; - Entry.Hamster.removeTimeout(timer); - }, timeValue); - Entry.Hamster.timeouts.push(timer); - return script; - } else if (script.timeFlag == 1) { - return script; - } else { - delete script.isStart; - delete script.timeFlag; - Entry.engine.isContinue = false; - sq.leftWheel = 0; - sq.rightWheel = 0; - return script.callReturn(); - } + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + var direction = script.getField("DIRECTION", script); + if (direction == 'LEFT') { + sq.leftWheel = -30; + sq.rightWheel = 30; + } else { + sq.leftWheel = 30; + sq.rightWheel = -30; + } + Entry.Hamster.setLineTracerMode(sq, 0); + var timeValue = script.getNumberValue("VALUE") * 1000; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Hamster.removeTimeout(timer); + }, timeValue); + Entry.Hamster.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } }; Blockly.Blocks.hamster_change_both_wheels_by = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_change_both_wheels_by_1); - this.appendValueInput("LEFT") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_change_both_wheels_by_2) - this.appendValueInput("RIGHT") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_change_both_wheels_by_3) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_change_both_wheels_by_1); + this.appendValueInput("LEFT") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_change_both_wheels_by_2) + this.appendValueInput("RIGHT") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_change_both_wheels_by_3) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_change_both_wheels_by = function (sprite, script) { - var sq = Entry.hw.sendQueue; - var left = script.getNumberValue('LEFT'); - var right = script.getNumberValue('RIGHT'); - sq.leftWheel = sq.leftWheel != undefined ? sq.leftWheel + left : left; - sq.rightWheel = sq.rightWheel != undefined ? sq.rightWheel + right : right; - Entry.Hamster.setLineTracerMode(sq, 0); - return script.callReturn(); + var sq = Entry.hw.sendQueue; + var left = script.getNumberValue('LEFT'); + var right = script.getNumberValue('RIGHT'); + sq.leftWheel = sq.leftWheel != undefined ? sq.leftWheel + left : left; + sq.rightWheel = sq.rightWheel != undefined ? sq.rightWheel + right : right; + Entry.Hamster.setLineTracerMode(sq, 0); + return script.callReturn(); }; Blockly.Blocks.hamster_set_both_wheels_to = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_both_wheels_to_1); - this.appendValueInput("LEFT") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_both_wheels_to_2); - this.appendValueInput("RIGHT") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_both_wheels_to_3) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_both_wheels_to_1); + this.appendValueInput("LEFT") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_both_wheels_to_2); + this.appendValueInput("RIGHT") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_both_wheels_to_3) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_set_both_wheels_to = function (sprite, script) { - var sq = Entry.hw.sendQueue; - sq.leftWheel = script.getNumberValue('LEFT'); - sq.rightWheel = script.getNumberValue('RIGHT'); - Entry.Hamster.setLineTracerMode(sq, 0); - return script.callReturn(); + var sq = Entry.hw.sendQueue; + sq.leftWheel = script.getNumberValue('LEFT'); + sq.rightWheel = script.getNumberValue('RIGHT'); + Entry.Hamster.setLineTracerMode(sq, 0); + return script.callReturn(); }; Blockly.Blocks.hamster_change_wheel_by = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_change_wheel_by_1) - .appendField(new Blockly.FieldDropdown([ - [Lang.General.left,"LEFT"], - [Lang.General.right,"RIGHT"], - [Lang.General.both,"BOTH"] - ]), "DIRECTION") - .appendField(Lang.Blocks.HAMSTER_change_wheel_by_2); - this.appendValueInput("VALUE") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_change_wheel_by_3) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_change_wheel_by_1) + .appendField(new Blockly.FieldDropdown([ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ]), "DIRECTION") + .appendField(Lang.Blocks.HAMSTER_change_wheel_by_2); + this.appendValueInput("VALUE") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_change_wheel_by_3) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_change_wheel_by = function (sprite, script) { - var sq = Entry.hw.sendQueue; - var direction = script.getField('DIRECTION'); - var value = script.getNumberValue('VALUE'); - if (direction == 'LEFT') { - sq.leftWheel = sq.leftWheel != undefined ? sq.leftWheel + value : value; - } else if (direction == 'RIGHT') { - sq.rightWheel = sq.rightWheel != undefined ? sq.rightWheel + value : value; - } else { - sq.leftWheel = sq.leftWheel != undefined ? sq.leftWheel + value : value; - sq.rightWheel = sq.rightWheel != undefined ? sq.rightWheel + value : value; - } - Entry.Hamster.setLineTracerMode(sq, 0); - return script.callReturn(); + var sq = Entry.hw.sendQueue; + var direction = script.getField('DIRECTION'); + var value = script.getNumberValue('VALUE'); + if (direction == 'LEFT') { + sq.leftWheel = sq.leftWheel != undefined ? sq.leftWheel + value : value; + } else if (direction == 'RIGHT') { + sq.rightWheel = sq.rightWheel != undefined ? sq.rightWheel + value : value; + } else { + sq.leftWheel = sq.leftWheel != undefined ? sq.leftWheel + value : value; + sq.rightWheel = sq.rightWheel != undefined ? sq.rightWheel + value : value; + } + Entry.Hamster.setLineTracerMode(sq, 0); + return script.callReturn(); }; Blockly.Blocks.hamster_set_wheel_to = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_wheel_to_1) - .appendField(new Blockly.FieldDropdown([ - [Lang.General.left,"LEFT"], - [Lang.General.right,"RIGHT"], - [Lang.General.both,"BOTH"] - ]), "DIRECTION") - .appendField(Lang.Blocks.HAMSTER_set_wheel_to_2); - this.appendValueInput("VALUE") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_wheel_to_3) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_wheel_to_1) + .appendField(new Blockly.FieldDropdown([ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ]), "DIRECTION") + .appendField(Lang.Blocks.HAMSTER_set_wheel_to_2); + this.appendValueInput("VALUE") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_wheel_to_3) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_set_wheel_to = function (sprite, script) { - var sq = Entry.hw.sendQueue; - var direction = script.getField('DIRECTION'); - var value = script.getNumberValue('VALUE'); - if (direction == 'LEFT') { - sq.leftWheel = value; - } else if (direction == 'RIGHT') { - sq.rightWheel = value; - } else { - sq.leftWheel = value; - sq.rightWheel = value; - } - Entry.Hamster.setLineTracerMode(sq, 0); - return script.callReturn(); + var sq = Entry.hw.sendQueue; + var direction = script.getField('DIRECTION'); + var value = script.getNumberValue('VALUE'); + if (direction == 'LEFT') { + sq.leftWheel = value; + } else if (direction == 'RIGHT') { + sq.rightWheel = value; + } else { + sq.leftWheel = value; + sq.rightWheel = value; + } + Entry.Hamster.setLineTracerMode(sq, 0); + return script.callReturn(); }; Blockly.Blocks.hamster_follow_line_using = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_follow_line_using_1) - .appendField(new Blockly.FieldDropdown([ - [Lang.Blocks.HAMSTER_color_black,"BLACK"], - [Lang.General.white,"WHITE"] - ]), "COLOR") - .appendField(Lang.Blocks.HAMSTER_follow_line_using_2) - .appendField(new Blockly.FieldDropdown([ - [Lang.General.left,"LEFT"], - [Lang.General.right,"RIGHT"], - [Lang.General.both,"BOTH"] - ]), "DIRECTION") - .appendField(Lang.Blocks.HAMSTER_follow_line_using_3) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_follow_line_using_1) + .appendField(new Blockly.FieldDropdown([ + [Lang.Blocks.HAMSTER_color_black,"BLACK"], + [Lang.General.white,"WHITE"] + ]), "COLOR") + .appendField(Lang.Blocks.HAMSTER_follow_line_using_2) + .appendField(new Blockly.FieldDropdown([ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ]), "DIRECTION") + .appendField(Lang.Blocks.HAMSTER_follow_line_using_3) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_follow_line_using = function (sprite, script) { - var sq = Entry.hw.sendQueue; - var color = script.getField('COLOR'); - var direction = script.getField('DIRECTION'); + var sq = Entry.hw.sendQueue; + var color = script.getField('COLOR'); + var direction = script.getField('DIRECTION'); - var mode = 1; - if (direction == 'RIGHT') mode = 2; - else if (direction == 'BOTH') mode = 3; - if (color == 'WHITE') mode += 7; + var mode = 1; + if (direction == 'RIGHT') mode = 2; + else if (direction == 'BOTH') mode = 3; + if (color == 'WHITE') mode += 7; - sq.leftWheel = 0; - sq.rightWheel = 0; - Entry.Hamster.setLineTracerMode(sq, mode); - return script.callReturn(); + sq.leftWheel = 0; + sq.rightWheel = 0; + Entry.Hamster.setLineTracerMode(sq, mode); + return script.callReturn(); }; Blockly.Blocks.hamster_follow_line_until = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_follow_line_until_1) - .appendField(new Blockly.FieldDropdown([ - [Lang.Blocks.HAMSTER_color_black,"BLACK"], - [Lang.General.white,"WHITE"] - ]), "COLOR") - .appendField(Lang.Blocks.HAMSTER_follow_line_until_2) - .appendField(new Blockly.FieldDropdown([ - [Lang.General.left,"LEFT"], - [Lang.General.right,"RIGHT"], - [Lang.Blocks.HAMSTER_front,"FRONT"], - [Lang.Blocks.HAMSTER_rear,"REAR"] - ]), "DIRECTION") - .appendField(Lang.Blocks.HAMSTER_follow_line_until_3) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_follow_line_until_1) + .appendField(new Blockly.FieldDropdown([ + [Lang.Blocks.HAMSTER_color_black,"BLACK"], + [Lang.General.white,"WHITE"] + ]), "COLOR") + .appendField(Lang.Blocks.HAMSTER_follow_line_until_2) + .appendField(new Blockly.FieldDropdown([ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.Blocks.HAMSTER_front,"FRONT"], + [Lang.Blocks.HAMSTER_rear,"REAR"] + ]), "DIRECTION") + .appendField(Lang.Blocks.HAMSTER_follow_line_until_3) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_follow_line_until = function (sprite, script) { - var sq = Entry.hw.sendQueue; - var pd = Entry.hw.portData; - var color = script.getField('COLOR'); - var direction = script.getField('DIRECTION'); + var sq = Entry.hw.sendQueue; + var pd = Entry.hw.portData; + var color = script.getField('COLOR'); + var direction = script.getField('DIRECTION'); - var mode = 4; - if (direction == 'RIGHT') mode = 5; - else if (direction == 'FRONT') mode = 6; - else if (direction == 'REAR') mode = 7; - if (color == 'WHITE') mode += 7; + var mode = 4; + if (direction == 'RIGHT') mode = 5; + else if (direction == 'FRONT') mode = 6; + else if (direction == 'REAR') mode = 7; + if (color == 'WHITE') mode += 7; - if (!script.isStart) { - script.isStart = true; - sq.leftWheel = 0; - sq.rightWheel = 0; - Entry.Hamster.setLineTracerMode(sq, mode); - return script; - } else { - var hamster = Entry.Hamster; - if (pd.lineTracerStateId != hamster.lineTracerStateId) { - hamster.lineTracerStateId = pd.lineTracerStateId; - if (pd.lineTracerState == 0x40) { - delete script.isStart; - Entry.engine.isContinue = false; - hamster.setLineTracerMode(sq, 0); - return script.callReturn(); - } - } - return script; - } + if (!script.isStart) { + script.isStart = true; + sq.leftWheel = 0; + sq.rightWheel = 0; + Entry.Hamster.setLineTracerMode(sq, mode); + return script; + } else { + var hamster = Entry.Hamster; + if (pd.lineTracerStateId != hamster.lineTracerStateId) { + hamster.lineTracerStateId = pd.lineTracerStateId; + if (pd.lineTracerState == 0x40) { + delete script.isStart; + Entry.engine.isContinue = false; + hamster.setLineTracerMode(sq, 0); + return script.callReturn(); + } + } + return script; + } }; Blockly.Blocks.hamster_set_following_speed_to = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_following_speed_to_1) - .appendField(new Blockly.FieldDropdown([ - ["1","1"], - ["2","2"], - ["3","3"], - ["4","4"], - ["5","5"], - ["6","6"], - ["7","7"], - ["8","8"], - ]), "SPEED") - .appendField(Lang.Blocks.HAMSTER_set_following_speed_to_2) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_following_speed_to_1) + .appendField(new Blockly.FieldDropdown([ + ["1","1"], + ["2","2"], + ["3","3"], + ["4","4"], + ["5","5"], + ["6","6"], + ["7","7"], + ["8","8"], + ]), "SPEED") + .appendField(Lang.Blocks.HAMSTER_set_following_speed_to_2) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_set_following_speed_to = function (sprite, script) { - var sq = Entry.hw.sendQueue; - sq.lineTracerSpeed = Number(script.getField("SPEED", script)); - return script.callReturn(); + var sq = Entry.hw.sendQueue; + sq.lineTracerSpeed = Number(script.getField("SPEED", script)); + return script.callReturn(); }; Blockly.Blocks.hamster_stop = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_stop) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_stop) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_stop = function (sprite, script) { - var sq = Entry.hw.sendQueue; - sq.leftWheel = 0; - sq.rightWheel = 0; - Entry.Hamster.setLineTracerMode(sq, 0); - return script.callReturn(); + var sq = Entry.hw.sendQueue; + sq.leftWheel = 0; + sq.rightWheel = 0; + Entry.Hamster.setLineTracerMode(sq, 0); + return script.callReturn(); }; //led Blockly.Blocks.hamster_set_led_to = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_led_to_1) - .appendField(new Blockly.FieldDropdown([ - [Lang.General.left,"LEFT"], - [Lang.General.right,"RIGHT"], - [Lang.General.both,"BOTH"] - ]), "DIRECTION") - .appendField(Lang.Blocks.HAMSTER_set_led_to_2) - .appendField(new Blockly.FieldDropdown([ - [Lang.General.red,"4"], - [Lang.General.yellow,"6"], - [Lang.General.green,"2"], - [Lang.Blocks.HAMSTER_color_cyan,"3"], - [Lang.General.blue,"1"], - [Lang.Blocks.HAMSTER_color_magenta,"5"], - [Lang.General.white,"7"] - ]), "COLOR") - .appendField(Lang.Blocks.HAMSTER_set_led_to_3) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_led_to_1) + .appendField(new Blockly.FieldDropdown([ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ]), "DIRECTION") + .appendField(Lang.Blocks.HAMSTER_set_led_to_2) + .appendField(new Blockly.FieldDropdown([ + [Lang.General.red,"4"], + [Lang.General.yellow,"6"], + [Lang.General.green,"2"], + [Lang.Blocks.HAMSTER_color_cyan,"3"], + [Lang.General.blue,"1"], + [Lang.Blocks.HAMSTER_color_magenta,"5"], + [Lang.General.white,"7"] + ]), "COLOR") + .appendField(Lang.Blocks.HAMSTER_set_led_to_3) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_set_led_to = function (sprite, script) { - var sq = Entry.hw.sendQueue; - var direction = script.getField("DIRECTION", script); - var color = Number(script.getField("COLOR", script)); - if (direction == 'LEFT') { - sq.leftLed = color; - } else if (direction == 'RIGHT') { - sq.rightLed = color; - } else { - sq.leftLed = color; - sq.rightLed = color; - } - return script.callReturn(); + var sq = Entry.hw.sendQueue; + var direction = script.getField("DIRECTION", script); + var color = Number(script.getField("COLOR", script)); + if (direction == 'LEFT') { + sq.leftLed = color; + } else if (direction == 'RIGHT') { + sq.rightLed = color; + } else { + sq.leftLed = color; + sq.rightLed = color; + } + return script.callReturn(); }; Blockly.Blocks.hamster_clear_led = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_clear_led_1) - .appendField(new Blockly.FieldDropdown([ - [Lang.General.left,"LEFT"], - [Lang.General.right,"RIGHT"], - [Lang.General.both,"BOTH"] - ]), "DIRECTION") - .appendField(Lang.Blocks.HAMSTER_clear_led_2) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_clear_led_1) + .appendField(new Blockly.FieldDropdown([ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ]), "DIRECTION") + .appendField(Lang.Blocks.HAMSTER_clear_led_2) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_clear_led = function (sprite, script) { - var sq = Entry.hw.sendQueue; - var direction = script.getField("DIRECTION", script); - if (direction == 'LEFT') { - sq.leftLed = 0; - } else if (direction == 'RIGHT') { - sq.rightLed = 0; - } else { - sq.leftLed = 0; - sq.rightLed = 0; - } - return script.callReturn(); + var sq = Entry.hw.sendQueue; + var direction = script.getField("DIRECTION", script); + if (direction == 'LEFT') { + sq.leftLed = 0; + } else if (direction == 'RIGHT') { + sq.rightLed = 0; + } else { + sq.leftLed = 0; + sq.rightLed = 0; + } + return script.callReturn(); }; //buzzer Blockly.Blocks.hamster_beep = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_beep) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_beep) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_beep = function (sprite, script) { - var sq = Entry.hw.sendQueue; - if (!script.isStart) { - script.isStart = true; - script.timeFlag = 1; - sq.buzzer = 440; - sq.note = 0; - var timeValue = 0.2 * 1000; - var timer = setTimeout(function() { - script.timeFlag = 0; - Entry.Hamster.removeTimeout(timer); - }, timeValue); - Entry.Hamster.timeouts.push(timer); - return script; - } else if (script.timeFlag == 1) { - return script; - } else { - delete script.isStart; - delete script.timeFlag; - Entry.engine.isContinue = false; - sq.buzzer = 0; - return script.callReturn(); - } + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + sq.buzzer = 440; + sq.note = 0; + var timeValue = 0.2 * 1000; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Hamster.removeTimeout(timer); + }, timeValue); + Entry.Hamster.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.buzzer = 0; + return script.callReturn(); + } }; Blockly.Blocks.hamster_change_buzzer_by = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_change_buzzer_by_1); - this.appendValueInput("VALUE") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_change_buzzer_by_2) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_change_buzzer_by_1); + this.appendValueInput("VALUE") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_change_buzzer_by_2) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_change_buzzer_by = function (sprite, script) { - var sq = Entry.hw.sendQueue; - var value = script.getNumberValue('VALUE'); - sq.buzzer = sq.buzzer != undefined ? sq.buzzer + value : value; - sq.note = 0; - return script.callReturn(); + var sq = Entry.hw.sendQueue; + var value = script.getNumberValue('VALUE'); + sq.buzzer = sq.buzzer != undefined ? sq.buzzer + value : value; + sq.note = 0; + return script.callReturn(); }; Blockly.Blocks.hamster_set_buzzer_to = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_buzzer_to_1); - this.appendValueInput("VALUE") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_buzzer_to_2) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_buzzer_to_1); + this.appendValueInput("VALUE") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_buzzer_to_2) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_set_buzzer_to = function (sprite, script) { - var sq = Entry.hw.sendQueue; - sq.buzzer = script.getNumberValue('VALUE'); - sq.note = 0; - return script.callReturn(); + var sq = Entry.hw.sendQueue; + sq.buzzer = script.getNumberValue('VALUE'); + sq.note = 0; + return script.callReturn(); }; Blockly.Blocks.hamster_clear_buzzer = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_clear_buzzer) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_clear_buzzer) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_clear_buzzer = function (sprite, script) { - var sq = Entry.hw.sendQueue; - sq.buzzer = 0; - sq.note = 0; - return script.callReturn(); + var sq = Entry.hw.sendQueue; + sq.buzzer = 0; + sq.note = 0; + return script.callReturn(); }; Blockly.Blocks.hamster_play_note_for = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_play_note_for_1) - .appendField(new Blockly.FieldDropdown([ - [Lang.General.note_c + '',"4"], - [Lang.General.note_c + '#',"5"], - [Lang.General.note_d + '',"6"], - [Lang.General.note_e + 'b',"7"], - [Lang.General.note_e + '',"8"], - [Lang.General.note_f + '',"9"], - [Lang.General.note_f + '#',"10"], - [Lang.General.note_g + '',"11"], - [Lang.General.note_g + '#',"12"], - [Lang.General.note_a + '',"13"], - [Lang.General.note_b + 'b',"14"], - [Lang.General.note_b + '',"15"] - ]), "NOTE") - .appendField(Lang.Blocks.HAMSTER_play_note_for_2) - .appendField(new Blockly.FieldDropdown([ - ['1',"1"], - ['2',"2"], - ['3',"3"], - ['4',"4"], - ['5',"5"], - ['6',"6"], - ['7',"7"] - ]), "OCTAVE") - .appendField(Lang.Blocks.HAMSTER_play_note_for_3) - this.appendValueInput("VALUE") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_play_note_for_4) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_play_note_for_1) + .appendField(new Blockly.FieldDropdown([ + [Lang.General.note_c + '',"4"], + [Lang.General.note_c + '#',"5"], + [Lang.General.note_d + '',"6"], + [Lang.General.note_e + 'b',"7"], + [Lang.General.note_e + '',"8"], + [Lang.General.note_f + '',"9"], + [Lang.General.note_f + '#',"10"], + [Lang.General.note_g + '',"11"], + [Lang.General.note_g + '#',"12"], + [Lang.General.note_a + '',"13"], + [Lang.General.note_b + 'b',"14"], + [Lang.General.note_b + '',"15"] + ]), "NOTE") + .appendField(Lang.Blocks.HAMSTER_play_note_for_2) + .appendField(new Blockly.FieldDropdown([ + ['1',"1"], + ['2',"2"], + ['3',"3"], + ['4',"4"], + ['5',"5"], + ['6',"6"], + ['7',"7"] + ]), "OCTAVE") + .appendField(Lang.Blocks.HAMSTER_play_note_for_3) + this.appendValueInput("VALUE") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_play_note_for_4) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_play_note_for = function (sprite, script) { - var sq = Entry.hw.sendQueue; - if (!script.isStart) { - var note = script.getNumberField("NOTE", script); - var octave = script.getNumberField("OCTAVE", script); - var beat = script.getNumberValue("VALUE", script); - var tempo = Entry.Hamster.tempo; - note += (octave-1)*12; - var timeValue = beat*60*1000/tempo; - script.isStart = true; - script.timeFlag = 1; - sq.buzzer = 0; - sq.note = note; - if (timeValue > 100) { - var timer1 = setTimeout(function() { - sq.note = 0; - Entry.Hamster.removeTimeout(timer1); - }, timeValue-100); - Entry.Hamster.timeouts.push(timer1); - } - var timer2 = setTimeout(function() { - script.timeFlag = 0; - Entry.Hamster.removeTimeout(timer2); - }, timeValue); - Entry.Hamster.timeouts.push(timer2); - return script; - } else if (script.timeFlag == 1) { - return script; - } else { - delete script.isStart; - delete script.timeFlag; - Entry.engine.isContinue = false; - sq.note = 0; - return script.callReturn(); - } + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + var note = script.getNumberField("NOTE", script); + var octave = script.getNumberField("OCTAVE", script); + var beat = script.getNumberValue("VALUE", script); + var tempo = Entry.Hamster.tempo; + note += (octave-1)*12; + var timeValue = beat*60*1000/tempo; + script.isStart = true; + script.timeFlag = 1; + sq.buzzer = 0; + sq.note = note; + if (timeValue > 100) { + var timer1 = setTimeout(function() { + sq.note = 0; + Entry.Hamster.removeTimeout(timer1); + }, timeValue-100); + Entry.Hamster.timeouts.push(timer1); + } + var timer2 = setTimeout(function() { + script.timeFlag = 0; + Entry.Hamster.removeTimeout(timer2); + }, timeValue); + Entry.Hamster.timeouts.push(timer2); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.note = 0; + return script.callReturn(); + } }; Blockly.Blocks.hamster_rest_for = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_rest_for_1) - this.appendValueInput("VALUE") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_rest_for_2) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_rest_for_1) + this.appendValueInput("VALUE") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_rest_for_2) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_rest_for = function (sprite, script) { - var sq = Entry.hw.sendQueue; - if (!script.isStart) { - script.isStart = true; - script.timeFlag = 1; - var timeValue = script.getNumberValue('VALUE'); - timeValue = timeValue*60*1000/Entry.Hamster.tempo; - sq.buzzer = 0; - sq.note = 0; - var timer = setTimeout(function() { - script.timeFlag = 0; - Entry.Hamster.removeTimeout(timer); - }, timeValue); - Entry.Hamster.timeouts.push(timer); - return script; - } else if (script.timeFlag == 1) { - return script; - } else { - delete script.isStart; - delete script.timeFlag; - Entry.engine.isContinue = false; - return script.callReturn(); - } + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + var timeValue = script.getNumberValue('VALUE'); + timeValue = timeValue*60*1000/Entry.Hamster.tempo; + sq.buzzer = 0; + sq.note = 0; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Hamster.removeTimeout(timer); + }, timeValue); + Entry.Hamster.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + return script.callReturn(); + } }; Blockly.Blocks.hamster_change_tempo_by = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_change_tempo_by_1); - this.appendValueInput("VALUE") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_change_tempo_by_2) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_change_tempo_by_1); + this.appendValueInput("VALUE") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_change_tempo_by_2) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_change_tempo_by = function (sprite, script) { - Entry.Hamster.tempo += script.getNumberValue('VALUE'); - if (Entry.Hamster.tempo < 1) Entry.Hamster.tempo = 1; - return script.callReturn(); + Entry.Hamster.tempo += script.getNumberValue('VALUE'); + if (Entry.Hamster.tempo < 1) Entry.Hamster.tempo = 1; + return script.callReturn(); }; Blockly.Blocks.hamster_set_tempo_to = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_tempo_to_1); - this.appendValueInput("VALUE") - .setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_tempo_to_2) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_tempo_to_1); + this.appendValueInput("VALUE") + .setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_tempo_to_2) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_set_tempo_to = function (sprite, script) { - Entry.Hamster.tempo = script.getNumberValue('VALUE'); - if (Entry.Hamster.tempo < 1) Entry.Hamster.tempo = 1; - return script.callReturn(); + Entry.Hamster.tempo = script.getNumberValue('VALUE'); + if (Entry.Hamster.tempo < 1) Entry.Hamster.tempo = 1; + return script.callReturn(); }; Blockly.Blocks.hamster_set_port_to = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_port_to_1) - .appendField(new Blockly.FieldDropdown([ - [Lang.Blocks.HAMSTER_port_a, "A"], - [Lang.Blocks.HAMSTER_port_b, "B"], - [Lang.Blocks.HAMSTER_port_ab, "AB"] - ]), "PORT") - .appendField(Lang.Blocks.HAMSTER_set_port_to_2) - .appendField(new Blockly.FieldDropdown([ - [Lang.Blocks.HAMSTER_analog_input, "0"], - [Lang.Blocks.HAMSTER_digital_input, "1"], - [Lang.Blocks.HAMSTER_servo_output, "8"], - [Lang.Blocks.HAMSTER_pwm_output, "9"], - [Lang.Blocks.HAMSTER_digital_output, "10"] - ]), "MODE") - .appendField(Lang.Blocks.HAMSTER_set_port_to_3) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_port_to_1) + .appendField(new Blockly.FieldDropdown([ + [Lang.Blocks.HAMSTER_port_a, "A"], + [Lang.Blocks.HAMSTER_port_b, "B"], + [Lang.Blocks.HAMSTER_port_ab, "AB"] + ]), "PORT") + .appendField(Lang.Blocks.HAMSTER_set_port_to_2) + .appendField(new Blockly.FieldDropdown([ + [Lang.Blocks.HAMSTER_analog_input, "0"], + [Lang.Blocks.HAMSTER_digital_input, "1"], + [Lang.Blocks.HAMSTER_servo_output, "8"], + [Lang.Blocks.HAMSTER_pwm_output, "9"], + [Lang.Blocks.HAMSTER_digital_output, "10"] + ]), "MODE") + .appendField(Lang.Blocks.HAMSTER_set_port_to_3) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } }; Entry.block.hamster_set_port_to = function(sprite, script) { - var sq = Entry.hw.sendQueue; - var port = script.getField("PORT", script); - var mode = Number(script.getField("MODE", script)); - if (port == 'A') { - sq.ioModeA = mode; - } else if (port == 'B') { - sq.ioModeB = mode; - } else { - sq.ioModeA = mode; - sq.ioModeB = mode; - } - return script.callReturn(); + var sq = Entry.hw.sendQueue; + var port = script.getField("PORT", script); + var mode = Number(script.getField("MODE", script)); + if (port == 'A') { + sq.ioModeA = mode; + } else if (port == 'B') { + sq.ioModeB = mode; + } else { + sq.ioModeA = mode; + sq.ioModeB = mode; + } + return script.callReturn(); }; Blockly.Blocks.hamster_change_output_by = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_change_output_by_1) - .appendField(new Blockly.FieldDropdown([ - [Lang.Blocks.HAMSTER_port_a, "A"], - [Lang.Blocks.HAMSTER_port_b, "B"], - [Lang.Blocks.HAMSTER_port_ab, "AB"] - ]), "PORT") - .appendField(Lang.Blocks.HAMSTER_change_output_by_2); - this.appendValueInput("VALUE").setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_change_output_by_3) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); - this.setInputsInline(!0); - this.setPreviousStatement(!0); - this.setNextStatement(!0); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_change_output_by_1) + .appendField(new Blockly.FieldDropdown([ + [Lang.Blocks.HAMSTER_port_a, "A"], + [Lang.Blocks.HAMSTER_port_b, "B"], + [Lang.Blocks.HAMSTER_port_ab, "AB"] + ]), "PORT") + .appendField(Lang.Blocks.HAMSTER_change_output_by_2); + this.appendValueInput("VALUE").setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_change_output_by_3) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.setInputsInline(!0); + this.setPreviousStatement(!0); + this.setNextStatement(!0); + } }; Entry.block.hamster_change_output_by = function(sprite, script) { - var sq = Entry.hw.sendQueue; - var port = script.getField('PORT'); - var value = script.getNumberValue('VALUE'); - if (port == 'A') { - sq.outputA = sq.outputA != undefined ? sq.outputA + value : value; - } else if (port == 'B') { - sq.outputB = sq.outputB != undefined ? sq.outputB + value : value; - } else { - sq.outputA = sq.outputA != undefined ? sq.outputA + value : value; - sq.outputB = sq.outputB != undefined ? sq.outputB + value : value; - } - return script.callReturn(); + var sq = Entry.hw.sendQueue; + var port = script.getField('PORT'); + var value = script.getNumberValue('VALUE'); + if (port == 'A') { + sq.outputA = sq.outputA != undefined ? sq.outputA + value : value; + } else if (port == 'B') { + sq.outputB = sq.outputB != undefined ? sq.outputB + value : value; + } else { + sq.outputA = sq.outputA != undefined ? sq.outputA + value : value; + sq.outputB = sq.outputB != undefined ? sq.outputB + value : value; + } + return script.callReturn(); }; Blockly.Blocks.hamster_set_output_to = { - init: function() { - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_output_to_1) - .appendField(new Blockly.FieldDropdown([ - [Lang.Blocks.HAMSTER_port_a, "A"], - [Lang.Blocks.HAMSTER_port_b, "B"], - [Lang.Blocks.HAMSTER_port_ab, "AB"] - ]), "PORT") - .appendField(Lang.Blocks.HAMSTER_set_output_to_2); - this.appendValueInput("VALUE").setCheck(["Number", "String"]); - this.appendDummyInput() - .appendField(Lang.Blocks.HAMSTER_set_output_to_3) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); - this.setInputsInline(!0); - this.setPreviousStatement(!0); - this.setNextStatement(!0); - } + init: function() { + this.setColour("#00979D"); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_output_to_1) + .appendField(new Blockly.FieldDropdown([ + [Lang.Blocks.HAMSTER_port_a, "A"], + [Lang.Blocks.HAMSTER_port_b, "B"], + [Lang.Blocks.HAMSTER_port_ab, "AB"] + ]), "PORT") + .appendField(Lang.Blocks.HAMSTER_set_output_to_2); + this.appendValueInput("VALUE").setCheck(["Number", "String"]); + this.appendDummyInput() + .appendField(Lang.Blocks.HAMSTER_set_output_to_3) + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + "block_icon/hardware_03.png", "*")); + this.setInputsInline(!0); + this.setPreviousStatement(!0); + this.setNextStatement(!0); + } }; Entry.block.hamster_set_output_to = function(sprite, script) { - var sq = Entry.hw.sendQueue; - var port = script.getField('PORT'); - var value = script.getNumberValue('VALUE'); - if (port == 'A') { - sq.outputA = value; - } else if (port == 'B') { - sq.outputB = value; - } else { - sq.outputA = value; - sq.outputB = value; - } - return script.callReturn(); + var sq = Entry.hw.sendQueue; + var port = script.getField('PORT'); + var value = script.getNumberValue('VALUE'); + if (port == 'A') { + sq.outputA = value; + } else if (port == 'B') { + sq.outputB = value; + } else { + sq.outputA = value; + sq.outputB = value; + } + return script.callReturn(); }; diff --git a/src/blocks/block_judgement.js b/src/blocks/block_judgement.js index 4737d2ec5a..d68bbdf86a 100644 --- a/src/blocks/block_judgement.js +++ b/src/blocks/block_judgement.js @@ -29,7 +29,7 @@ Blockly.Blocks.is_press_some_key = { Entry.block.is_press_some_key = function (sprite, script) { var keycode = Number(script.getField("VALUE", script)); - return Entry.engine.pressedKeys.indexOf(keycode) >= 0; + return Entry.pressedKeys.indexOf(keycode) >= 0; }; // (▼) 에 닿았는가? diff --git a/src/blocks/block_neobot.js b/src/blocks/block_neobot.js index bb7fe5d319..b9aee69bfd 100644 --- a/src/blocks/block_neobot.js +++ b/src/blocks/block_neobot.js @@ -1,84 +1,104 @@ Entry.Neobot = { name: 'neobot', - PORT_MAP : { - "1":0, - "2":0, - "3":0, - "SERVO1":0, - "SERVO2":0, - "SERVO1_SPEED":3, - "SERVO2_SPEED":3, - "LMOT":0, - "RMOT":0, - "note":0, - "octave":0, - "duration":0, - "sound_check":0, - "O_1":0, - "O_2":0 - }, + LOCAL_MAP: [ + 'IN1', + 'IN2', + 'IN3', + 'IR', + 'BAT' + ], + REMOTE_MAP: [ + 'OUT1', + 'OUT2', + 'OUT3', + 'DCR', + 'DCL', + 'SND', + 'FND', + 'OPT' + ], setZero: function () { - for(var port in Entry.Neobot.PORT_MAP) { - Entry.hw.sendQueue[port] = Entry.Neobot.PORT_MAP[port]; + for(var port in Entry.Neobot.REMOTE_MAP) { + Entry.hw.sendQueue[Entry.Neobot.REMOTE_MAP[port]] = 0; } Entry.hw.update(); }, name: 'neobot', monitorTemplate: { - imgPath: "hw/neobot.png", - width: 268, - height: 270, + imgPath: 'hw/neobot.png', + width: 700, + height: 700, + listPorts: { + 'IR':{name: '리모컨', type: 'input', pos: {x: 0, y: 0}}, + 'BAT':{name: '베터리', type: 'input', pos: {x: 0, y: 0}}, + 'SND':{name: Lang.Hw.buzzer , type: 'output', pos: {x: 0, y: 0}}, + 'FND':{name: 'FND', type: 'output', pos: {x: 0, y: 0}} + }, ports: { - - "1":{name: Lang.Hw.port_en + " 1 " + Lang.Hw.port_ko, type: "input", pos: {x: 78, y: 9}}, - "2":{name: Lang.Hw.port_en + " 2 " + Lang.Hw.port_ko, type: "input", pos: {x : 115, y: 9}}, - "3":{name: Lang.Hw.port_en + " 3 " + Lang.Hw.port_ko, type: "input", pos: {x: 153, y: 9}}, - "LMOT":{name: Lang.Hw.left + " " + Lang.Hw.motor , type: "output", pos: {x: 78, y: 259}}, - "RMOT":{name: Lang.Hw.right + " " + Lang.Hw.motor , type: "output", pos: {x: 191, y: 259}}, - "note":{name: Lang.Hw.buzzer , type: "output", pos: {x: 98, y: 184}}, - "SERVO1":{name: Lang.Hw.sub + " " + Lang.Hw.motor + " 1", type: "output", pos: {x: 115, y: 259}}, - "SERVO2":{name: Lang.Hw.sub + " " + Lang.Hw.motor + " 2", type: "output", pos: {x: 191, y: 9}} - } + 'IN1':{name: 'IN1', type: 'input', pos: {x: 270, y: 200}}, + 'IN2':{name: 'IN2', type: 'input', pos: {x : 325, y: 200}}, + 'IN3':{name: 'IN3', type: 'input', pos: {x: 325, y: 500}}, + 'DCL':{name: 'L-Motor', type: 'output', pos: {x: 270, y: 500}}, + 'DCR':{name: 'R-Motor', type: 'output', pos: {x: 435, y: 500}}, + 'OUT1':{name: 'OUT1', type: 'output', pos: {x: 380, y: 200}}, + 'OUT2':{name: 'OUT2', type: 'output', pos: {x: 435, y: 200}}, + 'OUT3':{name: 'OUT3', type: 'output', pos: {x: 380, y: 500}} + }, + mode: 'both' } } Blockly.Blocks.neobot_sensor_value = { init: function() { - this.setColour("#00979D"); + this.setColour('#00979D'); this.appendDummyInput() - .appendField("") + .appendField('') .appendField(new Blockly.FieldDropdown([ - ['1번 포트',"1"], - ['2번 포트',"2"], - ['3번 포트',"3"], - ['리모컨',"4"] - ]), "PORT") - .appendField(" 값"); + ['1번 포트','IN1'], + ['2번 포트','IN2'], + ['3번 포트','IN3'], + ['리모컨','IR'], + ['배터리','BAT'], + ]), 'PORT') + .appendField(' 값'); this.setOutput(true, 'Number'); this.setInputsInline(true); } }; Entry.block.neobot_sensor_value = function (sprite, script) { - var port = script.getStringField("PORT"); + var port = script.getStringField('PORT'); return Entry.hw.portData[port]; }; -Blockly.Blocks.neobot_turn_left = { +Blockly.Blocks.neobot_left_motor = { init: function() { - this.setColour("#00979D"); + this.setColour('#00979D'); this.appendDummyInput() .appendField('왼쪽모터를') .appendField(new Blockly.FieldDropdown([ - ['앞으로',"1"], - ['뒤로',"-1"] - ]), "DIRECTION") + ['앞으로', '16'], + ['뒤로', '32'] + ]), 'DIRECTION') .appendField(new Blockly.FieldDropdown([ - ['느리게',"1"], - ['보통',"2"], - ['빠르게',"3"] - ]), "VALUE") - .appendField('회전') + ['0','0'], + ['1','1'], + ['2','2'], + ['3','3'], + ['4','4'], + ['5','5'], + ['6','6'], + ['7','7'], + ['8','8'], + ['9','9'], + ['10','10'], + ['11','11'], + ['12','12'], + ['13','13'], + ['14','14'], + ['15','15'] + ]), 'SPEED') + .appendField('의 속도로 회전') .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); this.setInputsInline(true); this.setPreviousStatement(true); @@ -86,16 +106,16 @@ Blockly.Blocks.neobot_turn_left = { } }; -Entry.block.neobot_turn_left = function (sprite, script) { - var port = script.getNumberField("VALUE"); - var direction = script.getNumberField("DIRECTION"); - Entry.hw.sendQueue["LMOT"] = port * direction; +Entry.block.neobot_left_motor = function (sprite, script) { + var speed = script.getNumberField('SPEED'); + var direction = script.getNumberField('DIRECTION'); + Entry.hw.sendQueue['DCL'] = speed + direction; return script.callReturn(); }; -Blockly.Blocks.neobot_stop_left = { +Blockly.Blocks.neobot_stop_left_motor = { init: function() { - this.setColour("#00979D"); + this.setColour('#00979D'); this.appendDummyInput() .appendField('왼쪽모터 정지') .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); @@ -105,44 +125,57 @@ Blockly.Blocks.neobot_stop_left = { } }; -Entry.block.neobot_stop_left = function (sprite, script) { - Entry.hw.sendQueue["LMOT"] = 0; +Entry.block.neobot_stop_left_motor = function (sprite, script) { + Entry.hw.sendQueue['DCL'] = 0; return script.callReturn(); }; -Blockly.Blocks.neobot_turn_right = { +Blockly.Blocks.neobot_right_motor = { init: function() { - this.setColour("#00979D"); + this.setColour('#00979D'); this.appendDummyInput() - .appendField('오른쪽모터를') - .appendField(new Blockly.FieldDropdown([ - ['앞으로',"1"], - ['뒤로',"-1"] - ]), "DIRECTION") - .appendField(new Blockly.FieldDropdown([ - ['느리게',"1"], - ['보통',"2"], - ['빠르게',"3"] - ]), "VALUE") - .appendField('회전') - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + .appendField('오른쪽모터를') + .appendField(new Blockly.FieldDropdown([ + ['앞으로', '16'], + ['뒤로', '32'] + ]), 'DIRECTION') + .appendField(new Blockly.FieldDropdown([ + ['0','0'], + ['1','1'], + ['2','2'], + ['3','3'], + ['4','4'], + ['5','5'], + ['6','6'], + ['7','7'], + ['8','8'], + ['9','9'], + ['10','10'], + ['11','11'], + ['12','12'], + ['13','13'], + ['14','14'], + ['15','15'] + ]), 'SPEED') + .appendField('의 속도로 회전') + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); this.setInputsInline(true); this.setPreviousStatement(true); this.setNextStatement(true); } }; -Entry.block.neobot_turn_right = function (sprite, script) { - var port = script.getNumberField("VALUE"); - var direction = script.getNumberField("DIRECTION"); - Entry.hw.sendQueue["RMOT"] = port * direction; +Entry.block.neobot_right_motor = function (sprite, script) { + var speed = script.getNumberField('SPEED'); + var direction = script.getNumberField('DIRECTION'); + Entry.hw.sendQueue['DCR'] = speed + direction; return script.callReturn(); }; -Blockly.Blocks.neobot_stop_right = { +Blockly.Blocks.neobot_stop_right_motor = { init: function() { - this.setColour("#00979D"); + this.setColour('#00979D'); this.appendDummyInput() .appendField('오른쪽모터 정지') .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); @@ -152,38 +185,44 @@ Blockly.Blocks.neobot_stop_right = { } }; -Entry.block.neobot_stop_right = function (sprite, script) { - Entry.hw.sendQueue["RMOT"] = 0; +Entry.block.neobot_stop_right_motor = function (sprite, script) { + Entry.hw.sendQueue['DCR'] = 0; return script.callReturn(); }; - - -Blockly.Blocks.neobot_run_motor = { +Blockly.Blocks.neobot_all_motor = { init: function() { - this.setColour("#00979D"); + this.setColour('#00979D'); this.appendDummyInput() - .appendField(new Blockly.FieldDropdown([ - ['양쪽',"1"], - ['왼쪽',"2"], - ['오른쪽',"3"] - ]), "TYPE") - .appendField('모터를 ') - this.appendValueInput("DURATION") - .setCheck(["Number", "String"]); + .appendField('양쪽 모터를 ') this.appendDummyInput() - .appendField('초간') .appendField(new Blockly.FieldDropdown([ - ['느리게',"1"], - ['보통',"2"], - ['빠르게',"3"] - ]), "VALUE") + ['0','0'], + ['1','1'], + ['2','2'], + ['3','3'], + ['4','4'], + ['5','5'], + ['6','6'], + ['7','7'], + ['8','8'], + ['9','9'], + ['10','10'], + ['11','11'], + ['12','12'], + ['13','13'], + ['14','14'], + ['15','15'] + ]), 'SPEED') + .appendField(' 의 속도로 ') .appendField(new Blockly.FieldDropdown([ - ['전진',"1"], - ['후진',"2"], - ['좌회전',"3"], - ['우회전',"4"], - ]), "DIRECTION") + ['전진','1'], + ['후진','2'], + ['제자리 좌회전','3'], + ['제자리 우회전','4'], + ['좌회전','5'], + ['우회전','6'], + ]), 'DIRECTION') .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); this.setInputsInline(true); this.setPreviousStatement(true); @@ -191,87 +230,73 @@ Blockly.Blocks.neobot_run_motor = { } }; -Entry.block.neobot_run_motor = function (sprite, script) { - if (!script.isStart) { - script.isStart = true; - script.timeFlag = 1; - var timeValue = script.getNumberValue("DURATION") * 1000; - setTimeout(function() { - script.timeFlag = 0; - }, timeValue); - return script; - } else if (script.timeFlag == 1) { - var type = script.getNumberField("TYPE"); - var value = script.getNumberField("VALUE"); - var direction = script.getNumberField("DIRECTION"); - switch (direction) { - case 1: - Entry.hw.sendQueue["LMOT"] = value; - Entry.hw.sendQueue["RMOT"] = value; - break; - case 2: - Entry.hw.sendQueue["LMOT"] = value * -1; - Entry.hw.sendQueue["RMOT"] = value * -1; - break; - case 3: - Entry.hw.sendQueue["LMOT"] = value; - Entry.hw.sendQueue["RMOT"] = value * -1; - break; - case 4: - Entry.hw.sendQueue["LMOT"] = value * -1; - Entry.hw.sendQueue["RMOT"] = value; - break; - } - - if(type === 2) { - Entry.hw.sendQueue["RMOT"] = 0; - } else if(type === 3) { - Entry.hw.sendQueue["LMOT"] = 0; - } - - return script; - } else { - delete script.timeFlag; - delete script.isStart; - Entry.engine.isContinue = false; - Entry.hw.sendQueue["LMOT"] = 0; - Entry.hw.sendQueue["RMOT"] = 0; - return script.callReturn(); +Entry.block.neobot_all_motor = function (sprite, script) { + var type = script.getNumberField('TYPE'); + var speed = script.getNumberField('SPEED'); + var direction = script.getNumberField('DIRECTION'); + switch (direction) { + case 1: + Entry.hw.sendQueue['DCL'] = 0x10 + speed; + Entry.hw.sendQueue['DCR'] = 0x10 + speed; + break; + case 2: + Entry.hw.sendQueue['DCL'] = 0x20 + speed; + Entry.hw.sendQueue['DCR'] = 0x20 + speed; + break; + case 3: + Entry.hw.sendQueue['DCL'] = 0x20 + speed; + Entry.hw.sendQueue['DCR'] = 0x10 + speed; + break; + case 4: + Entry.hw.sendQueue['DCL'] = 0x10 + speed; + Entry.hw.sendQueue['DCR'] = 0x20 + speed; + break; + case 5: + Entry.hw.sendQueue['DCL'] = 0; + Entry.hw.sendQueue['DCR'] = 0x10 + speed; + break; + case 6: + Entry.hw.sendQueue['DCL'] = 0x10 + speed; + Entry.hw.sendQueue['DCR'] = 0; + break; } + + return script.callReturn(); }; -Blockly.Blocks.neobot_servo_1 = { +Blockly.Blocks.neobot_set_servo = { init: function() { - this.setColour("#00979D"); + this.setColour('#00979D'); this.appendDummyInput() - .appendField('SERVO1에 연결된 서보모터를') .appendField(new Blockly.FieldDropdown([ - ['빠른',"3"], - ['보통',"2"], - ['느린',"1"] - ]), "SPEED") - .appendField('속도로') + ['OUT1','1'], + ['OUT2','2'], + ['OUT3','3'] + ]), 'PORT') + .appendField('포트의 서보모터를') .appendField(new Blockly.FieldDropdown([ - ['0도',"0"], - ['10도',"1"], - ['20도',"2"], - ['30도',"3"], - ['40도',"4"], - ['50도',"5"], - ['60도',"6"], - ['70도',"7"], - ['80도',"8"], - ['90도',"9"], - ['100도',"10"], - ['110도',"11"], - ['120도',"12"], - ['130도',"13"], - ['140도',"14"], - ['150도',"15"], - ['160도',"16"] - ]), "VALUE") - .appendField('로 이동') + ['0도','0'], + ['10도','10'], + ['20도','20'], + ['30도','30'], + ['40도','40'], + ['50도','50'], + ['60도','60'], + ['70도','70'], + ['80도','80'], + ['90도','90'], + ['100도','100'], + ['110도','110'], + ['120도','120'], + ['130도','130'], + ['140도','140'], + ['150도','150'], + ['160도','160'], + ['170도','170'], + ['180도','180'] + ]), 'DEGREE') + .appendField(' 이동') .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); this.setInputsInline(true); this.setPreviousStatement(true); @@ -279,88 +304,119 @@ Blockly.Blocks.neobot_servo_1 = { } }; -Entry.block.neobot_servo_1 = function (sprite, script) { - var value = script.getNumberField("VALUE"); - var speed = script.getNumberField("SPEED"); - Entry.hw.sendQueue["SERVO1"] = value; - Entry.hw.sendQueue["SERVO1_SPEED"] = speed; +Entry.block.neobot_set_servo = function (sprite, script) { + var port = script.getNumberField('PORT'); + var degree = script.getNumberField('DEGREE'); + Entry.hw.sendQueue['OUT' + port] = degree; + var option = port; + if(option === 3) { + option = 4; + } + Entry.hw.sendQueue['OPT'] = Entry.hw.sendQueue['OPT'] | option; return script.callReturn(); }; +Blockly.Blocks.neobot_set_output = { + init: function() { + this.setColour('#00979D'); + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([ + ['OUT1','1'], + ['OUT2','2'], + ['OUT3','3'] + ]), 'PORT') + .appendField('번 포트의 값을') + this.appendValueInput("VALUE") + .setCheck(["Number"]) + this.appendDummyInput() + .appendField('만큼 출력') + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + this.setInputsInline(true); + this.setPreviousStatement(true); + this.setNextStatement(true); + } +}; + +Entry.block.neobot_set_output = function (sprite, script) { + var port = script.getStringField('PORT', script); + var value = script.getNumberValue('VALUE', script); + var option = port; + if(value < 0) { + value = 0; + } else if (value > 255) { + value = 255; + } + if(option === 3) { + option = 4; + } + Entry.hw.sendQueue['OUT' + port] = value; + Entry.hw.sendQueue['OPT'] = Entry.hw.sendQueue['OPT'] & (~option); + return script.callReturn(); +}; -Blockly.Blocks.neobot_servo_2 = { +Blockly.Blocks.neobot_set_fnd = { init: function() { - this.setColour("#00979D"); + this.setColour('#00979D'); this.appendDummyInput() - .appendField('SERVO2에 연결된 서보모터를') - .appendField(new Blockly.FieldDropdown([ - ['빠른',"3"], - ['보통',"2"], - ['느린',"1"] - ]), "SPEED") - .appendField('속도로') - .appendField(new Blockly.FieldDropdown([ - ['0도',"0"], - ['10도',"1"], - ['20도',"2"], - ['30도',"3"], - ['40도',"4"], - ['50도',"5"], - ['60도',"6"], - ['70도',"7"], - ['80도',"8"], - ['90도',"9"], - ['100도',"10"], - ['110도',"11"], - ['120도',"12"], - ['130도',"13"], - ['140도',"14"], - ['150도',"15"], - ['160도',"16"] - ]), "VALUE") - .appendField('로 이동') - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); + .appendField('FND에') + this.appendValueInput("VALUE") + .setCheck(["Number"]) + this.appendDummyInput() + .appendField('출력') + .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); this.setInputsInline(true); this.setPreviousStatement(true); this.setNextStatement(true); } }; -Entry.block.neobot_servo_2 = function (sprite, script) { - var value = script.getNumberField("VALUE"); - var speed = script.getNumberField("SPEED"); - Entry.hw.sendQueue["SERVO2"] = value; - Entry.hw.sendQueue["SERVO2_SPEED"] = speed; +Entry.block.neobot_set_fnd = function (sprite, script) { + var value = script.getNumberValue('VALUE', script); + if(value > 255) { + value = 255; + } else if(value < 0) { + value = 0; + } + Entry.hw.sendQueue['FND'] = value; return script.callReturn(); }; Blockly.Blocks.neobot_play_note_for = { init: function() { - this.setColour("#00979D"); + this.setColour('#00979D'); this.appendDummyInput() .appendField('멜로디') .appendField(new Blockly.FieldDropdown([ - [Lang.General.note_c + '',"1"], - [Lang.General.note_d + '',"2"], - [Lang.General.note_e + '',"3"], - [Lang.General.note_f + '',"4"], - [Lang.General.note_g + '',"5"], - [Lang.General.note_a + '',"6"], - [Lang.General.note_b + '',"7"], - [Lang.General.note_c + '',"8"] - ]), "NOTE") + ['무음','0'], + [Lang.General.note_c,'1'], + [Lang.General.note_c + '#','2'], + [Lang.General.note_d,'3'], + [Lang.General.note_d + '#','4'], + [Lang.General.note_e,'5'], + [Lang.General.note_f,'6'], + [Lang.General.note_f + '#','7'], + [Lang.General.note_g,'8'], + [Lang.General.note_g + '#','9'], + [Lang.General.note_a,'10'], + [Lang.General.note_a + '#','11'], + [Lang.General.note_b,'12'] + ]), 'NOTE') .appendField('을(를)') .appendField(new Blockly.FieldDropdown([ - ['1',"0"], - ['2',"1"], - ['3',"2"] - ]), "OCTAVE") + ['1','0'], + ['2','1'], + ['3','2'], + ['4','3'], + ['5','4'], + ['6','5'] + ]), 'OCTAVE') .appendField('옥타브로') .appendField(new Blockly.FieldDropdown([ - ['2분음표',"2"], - ['4분음표',"4"], - ['8분음표',"8"] - ]), "DURATION"); + ['2분음표','2'], + ['4분음표','4'], + ['8분음표','8'], + ['16분음표','16'], + ]), 'DURATION'); this.appendDummyInput() .appendField('길이만큼 소리내기') .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); @@ -371,20 +427,31 @@ Blockly.Blocks.neobot_play_note_for = { }; Entry.block.neobot_play_note_for = function (sprite, script) { + // var note = script.getNumberField('NOTE', script); + // var octave = script.getNumberField('OCTAVE', script); + // var duration = script.getNumberField('DURATION', script); + // var value = note * octave; + // if(value > 65) { + // value = 65; + // } + // Entry.hw.sendQueue['SND'] = value; + + // return script.callReturn(); + var sq = Entry.hw.sendQueue; if (!script.isStart) { var note = script.getNumberField("NOTE", script); var octave = script.getNumberField("OCTAVE", script); var duration = script.getNumberField("DURATION", script); - script.note = note; + var value = note + (12 * octave); script.isStart = true; script.timeFlag = 1; - sq.note = note; - sq.octave = octave; - sq.duration = duration; - sq.sound_check = (Math.random() * 100000).toFixed(0); + if(value > 65) { + value = 65; + } + sq.SND = value; setTimeout(function() { script.timeFlag = 0; }, 1 / duration * 2000); @@ -394,38 +461,9 @@ Entry.block.neobot_play_note_for = function (sprite, script) { } else { delete script.timeFlag; delete script.isStart; + Entry.hw.sendQueue['SND'] = 0; Entry.engine.isContinue = false; return script.callReturn(); } -}; -Blockly.Blocks.neobot_set_sensor_value = { - init: function() { - - this.setColour("#00979D"); - this.appendDummyInput() - .appendField(new Blockly.FieldDropdown([ - ['1',"O_1"], - ['2',"O_2"] - ]), "PORT") - .appendField('번 포트의 값을') - .appendField(new Blockly.FieldDropdown([ - ['켜기',"1"], - ['끄기',"0"] - ]), "VALUE"); - this.appendDummyInput() - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/hardware_03.png', '*')); - this.setInputsInline(true); - this.setPreviousStatement(true); - this.setNextStatement(true); - } -}; - -Entry.block.neobot_set_sensor_value = function (sprite, script) { - var sq = Entry.hw.sendQueue; - - var port = script.getStringField("PORT", script); - var value = script.getNumberField("VALUE", script); - sq[port] = value; - return script.callReturn(); -} +}; \ No newline at end of file diff --git a/src/blocks/block_robotis.js b/src/blocks/block_robotis.js index 6ff6b02f55..0b4c6d3222 100644 --- a/src/blocks/block_robotis.js +++ b/src/blocks/block_robotis.js @@ -18,14 +18,14 @@ Entry.Robotis_carCont = { CM_IR_RIGHT: [93, 2, 91, 4], CM_CALIBRATION_LEFT: [95, 2], CM_CALIBRATION_RIGHT: [97, 2], - + AUX_MOTOR_SPEED_LEFT: [152, 2],// car_cont AUX_MOTOR_SPEED_RIGHT: [154, 2], }, setZero: function() { // instruction / address / length / value / default length this.setRobotisData([ - [Entry.Robotis_carCont.INSTRUCTION.WRITE, 152, 2, 0], + [Entry.Robotis_carCont.INSTRUCTION.WRITE, 152, 2, 0], [Entry.Robotis_carCont.INSTRUCTION.WRITE, 154, 2, 0] ]); Entry.hw.sendQueue['setZero'] = [1]; @@ -68,7 +68,7 @@ Entry.Robotis_carCont = { }, wait: function(sq, ms) { Entry.hw.socket.send(JSON.stringify(sq)); - + var start = new Date().getTime(); var end = start; while(end < start + ms) {//wait XX ms @@ -105,31 +105,31 @@ Entry.Robotis_openCM70 = { CM_SOUND_DETECTING: [87, 1], CM_USER_BUTTON: [26, 1], CM_MOTION: [66, 1], - + AUX_SERVO_POSITION: [152, 2], AUX_IR: [168, 2], AUX_TOUCH: [202, 1], - AUX_TEMPERATURE: [234, 1], + AUX_TEMPERATURE: [234, 1], AUX_ULTRASONIC: [242, 1], AUX_MAGNETIC: [250, 1], - AUX_MOTION_DETECTION: [258, 1], + AUX_MOTION_DETECTION: [258, 1], AUX_COLOR: [266, 1], AUX_CUSTOM: [216, 2], AUX_BRIGHTNESS: [288, 2], AUX_HYDRO_THEMO_HUMIDITY: [274, 1], AUX_HYDRO_THEMO_TEMPER: [282, 1], - + AUX_SERVO_MODE: [126, 1], AUX_SERVO_SPEED: [136, 2], AUX_MOTOR_SPEED: [136, 2], - AUX_LED_MODULE: [210, 1], + AUX_LED_MODULE: [210, 1], }, setZero: function() { // instruction / address / length / value / default length Entry.Robotis_carCont.setRobotisData([ - [Entry.Robotis_openCM70.INSTRUCTION.WRITE, 136, 2, 0], - [Entry.Robotis_openCM70.INSTRUCTION.WRITE, 138, 2, 0], - [Entry.Robotis_openCM70.INSTRUCTION.WRITE, 140, 2, 0], + [Entry.Robotis_openCM70.INSTRUCTION.WRITE, 136, 2, 0], + [Entry.Robotis_openCM70.INSTRUCTION.WRITE, 138, 2, 0], + [Entry.Robotis_openCM70.INSTRUCTION.WRITE, 140, 2, 0], [Entry.Robotis_openCM70.INSTRUCTION.WRITE, 142, 2, 0], [Entry.Robotis_openCM70.INSTRUCTION.WRITE, 144, 2, 0], [Entry.Robotis_openCM70.INSTRUCTION.WRITE, 146, 2, 0], @@ -152,7 +152,7 @@ Blockly.Blocks.robotis_openCM70_cm_custom_value = { this.setColour("#00979D"); this.appendDummyInput().appendField(Lang.Blocks.robotis_cm_custom); this.appendDummyInput().appendField('('); - this.appendValueInput("VALUE").setCheck(["Number", "String"]); + this.appendValueInput("VALUE").setCheck(["Number", "String"]); this.appendDummyInput().appendField(')'); this.appendDummyInput().appendField(new Blockly.FieldDropdown([ ["BYTE", "BYTE"], @@ -172,7 +172,7 @@ Entry.block.robotis_openCM70_cm_custom_value = function (sprite, script) { var data_length = 0; var data_value = 0; - var data_default_address = 0; + var data_default_address = 0; var data_default_length = 0; var size = script.getStringField("SIZE"); @@ -184,16 +184,16 @@ Entry.block.robotis_openCM70_cm_custom_value = function (sprite, script) { } else if (size == 'DWORD') { data_length = 4; } - + data_address = script.getNumberValue('VALUE'); - data_default_address = data_address; + data_default_address = data_address; data_default_length = data_length; - + Entry.Robotis_carCont.setRobotisData([[data_instruction, data_address, data_length, data_value, data_default_length]]); // Entry.hw.socket.send(JSON.stringify(Entry.hw.sendQueue)); Entry.Robotis_carCont.update(); - + return Entry.hw.portData[data_default_address]; }; @@ -211,7 +211,7 @@ Blockly.Blocks.robotis_openCM70_sensor_value = { list.push([Lang.Blocks.robotis_cm_sound_detected,"CM_SOUND_DETECTED"]); list.push([Lang.Blocks.robotis_cm_sound_detecting,"CM_SOUND_DETECTING"]); list.push([Lang.Blocks.robotis_cm_user_button, "CM_USER_BUTTON"]); - + return list; } }; @@ -223,11 +223,11 @@ Entry.block.robotis_openCM70_sensor_value = function (sprite, script) { var data_length = 0; var data_value = 0; - var data_default_address = 0; + var data_default_address = 0; var data_default_length = 0; var sensor = script.getStringField("SENSOR"); - + var increase = 0; if (sensor == 'CM_SOUND_DETECTED') { @@ -246,13 +246,13 @@ Entry.block.robotis_openCM70_sensor_value = function (sprite, script) { data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_USER_BUTTON[0]; data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_USER_BUTTON[1]; } - + data_default_address = data_default_address + increase * data_default_length; - + Entry.Robotis_carCont.setRobotisData([[data_instruction, data_address, data_length, data_value, data_default_length]]); // Entry.hw.socket.send(JSON.stringify(Entry.hw.sendQueue)); Entry.Robotis_carCont.update(); - + return Entry.hw.portData[data_default_address]; }; @@ -273,7 +273,7 @@ Blockly.Blocks.robotis_openCM70_aux_sensor_value = { list.push([Lang.Blocks.robotis_common_port_4,"PORT_4"]); list.push([Lang.Blocks.robotis_common_port_5,"PORT_5"]); list.push([Lang.Blocks.robotis_common_port_6,"PORT_6"]); - + return list; }, sensorList: function() { @@ -289,8 +289,8 @@ Blockly.Blocks.robotis_openCM70_aux_sensor_value = { list.push([Lang.Blocks.robotis_aux_magnetic,"AUX_MAGNETIC"]); list.push([Lang.Blocks.robotis_aux_motion_detection,"AUX_MOTION_DETECTION"]); list.push([Lang.Blocks.robotis_aux_color,"AUX_COLOR"]); - list.push([Lang.Blocks.robotis_aux_custom,"AUX_CUSTOM"]); - + list.push([Lang.Blocks.robotis_aux_custom,"AUX_CUSTOM"]); + return list; } }; @@ -302,10 +302,10 @@ Entry.block.robotis_openCM70_aux_sensor_value = function (sprite, script) { var data_length = 0; var data_value = 0; - var data_default_address = 0; + var data_default_address = 0; var data_default_length = 0; - var port = script.getStringField("PORT"); + var port = script.getStringField("PORT"); var sensor = script.getStringField("SENSOR"); var increase = 0; @@ -380,16 +380,16 @@ Entry.block.robotis_openCM70_aux_sensor_value = function (sprite, script) { data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[0]; data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[1]; } - + data_default_address = data_default_address + increase * data_default_length; if (increase != 0) { data_length = 6 * data_default_length; } - + Entry.Robotis_carCont.setRobotisData([[data_instruction, data_address, data_length, data_value, data_default_length]]); // Entry.hw.socket.send(JSON.stringify(Entry.hw.sendQueue)); Entry.Robotis_carCont.update(); - + return Entry.hw.portData[data_default_address]; }; @@ -480,7 +480,7 @@ Entry.block.robotis_openCM70_cm_buzzer_index = function (sprite, script) { // instruction / address / length / value / default length var cmBuzzerIndex = script.getField("CM_BUZZER_INDEX", script); var cmBuzzerTime = script.getNumberValue("CM_BUZZER_TIME", script); - + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; var data_address_1 = 0; var data_length_1 = 0; @@ -488,7 +488,7 @@ Entry.block.robotis_openCM70_cm_buzzer_index = function (sprite, script) { var data_address_2 = 0; var data_length_2 = 0; var data_value_2 = 0; - + data_address_1 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[0]; data_length_1 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[1]; // data_value_1 = cmBuzzerTime * 10; @@ -497,7 +497,7 @@ Entry.block.robotis_openCM70_cm_buzzer_index = function (sprite, script) { if (data_value_1 > 50) { data_value_1 = 50; } - + data_address_2 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[0]; data_length_2 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[1]; data_value_2 = cmBuzzerIndex; @@ -551,7 +551,7 @@ Blockly.Blocks.robotis_openCM70_cm_buzzer_melody = { Entry.block.robotis_openCM70_cm_buzzer_melody = function (sprite, script) { // instruction / address / length / value / default length var cmBuzzerMelody = script.getField("CM_BUZZER_MELODY", script); - + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; var data_address_1 = 0; var data_length_1 = 0; @@ -559,11 +559,11 @@ Entry.block.robotis_openCM70_cm_buzzer_melody = function (sprite, script) { var data_address_2 = 0; var data_length_2 = 0; var data_value_2 = 0; - + data_address_1 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[0]; data_length_1 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[1]; data_value_1 = 255; - + data_address_2 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[0]; data_length_2 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[1]; data_value_2 = cmBuzzerMelody; @@ -586,16 +586,16 @@ Blockly.Blocks.robotis_openCM70_cm_sound_detected_clear = { Entry.block.robotis_openCM70_cm_sound_detected_clear = function (sprite, script) { // instruction / address / length / value / default length - + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; - var data_value = 0; - + var data_value = 0; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[0]; data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[1]; - data_value = 0; - + data_value = 0; + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); }; @@ -626,12 +626,12 @@ Entry.block.robotis_openCM70_cm_led = function (sprite, script) { // instruction / address / length / value / default length var cmLed = script.getField("CM_LED", script); var value = script.getField("VALUE", script); - + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; var data_value = 0; - + if (cmLed == 'CM_LED_R') { data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_R[0]; data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_R[1]; @@ -642,12 +642,12 @@ Entry.block.robotis_openCM70_cm_led = function (sprite, script) { data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_B[0]; data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_B[1]; } - + data_value = value; var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); - + }; Blockly.Blocks.robotis_openCM70_cm_motion = { @@ -670,14 +670,14 @@ Entry.block.robotis_openCM70_cm_motion = function (sprite, script) { var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; - var data_value = 0; - + var data_value = 0; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_MOTION[0]; data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_MOTION[1]; data_value = script.getNumberValue("VALUE", script); var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; - return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); }; Blockly.Blocks.robotis_openCM70_aux_motor_speed = { @@ -710,17 +710,17 @@ Entry.block.robotis_openCM70_aux_motor_speed = function (sprite, script) { var port = script.getField("PORT", script); var directionAngle = script.getField("DIRECTION_ANGLE", script); var value = script.getNumberValue('VALUE'); - + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; var data_value = 0; - + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MOTOR_SPEED[0]; data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MOTOR_SPEED[1]; - + data_address = data_address + (port - 1) * data_length; - + if (directionAngle == 'CW') { value = value + 1024; if (value > 2047) { @@ -731,9 +731,9 @@ Entry.block.robotis_openCM70_aux_motor_speed = function (sprite, script) { value = 1023; } } - + data_value = value; - + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); }; @@ -766,18 +766,18 @@ Entry.block.robotis_openCM70_aux_servo_mode = function (sprite, script) { // instruction / address / length / value / default length var port = script.getField("PORT", script); var mode = script.getField("MODE", script); - + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; var data_value = 0; - + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_MODE[0]; data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_MODE[1]; - + data_address = data_address + (port - 1) * data_length; data_value = mode; - + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); }; @@ -814,17 +814,17 @@ Entry.block.robotis_openCM70_aux_servo_speed = function (sprite, script) { var port = script.getField("PORT", script); var directionAngle = script.getField("DIRECTION_ANGLE", script); var value = script.getNumberValue('VALUE'); - + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; var data_value = 0; - + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_SPEED[0]; data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_SPEED[1]; - + data_address = data_address + (port - 1) * data_length; - + if (directionAngle == 'CW') { value = value + 1024; if (value > 2047) { @@ -835,9 +835,9 @@ Entry.block.robotis_openCM70_aux_servo_speed = function (sprite, script) { value = 1023; } } - + data_value = value; - + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); }; @@ -868,25 +868,25 @@ Entry.block.robotis_openCM70_aux_servo_position = function (sprite, script) { // instruction / address / length / value / default length var port = script.getField("PORT", script); var value = script.getNumberValue('VALUE'); - + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; var data_value = 0; - + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[0]; data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[1]; - + data_address = data_address + (port - 1) * data_length; - + if (value > 1023) { value = 1023; } else if (value < 0) { value = 0; } - + data_value = value; - + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); }; @@ -921,18 +921,18 @@ Entry.block.robotis_openCM70_aux_led_module = function (sprite, script) { // instruction / address / length / value / default length var port = script.getField("PORT", script); var ledModule = script.getField("LED_MODULE", script); - + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; var data_value = 0; - + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[0]; data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[1]; - + data_address = data_address + (port - 1) * data_length; data_value = ledModule; - + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); }; @@ -963,18 +963,18 @@ Entry.block.robotis_openCM70_aux_custom = function (sprite, script) { // instruction / address / length / value / default length var port = script.getField("PORT", script); var value = script.getNumberValue('VALUE'); - + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; var data_value = 0; - + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[0]; data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[1]; - + data_address = data_address + (port - 1) * data_length; data_value = value; - + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); }; @@ -984,7 +984,7 @@ Blockly.Blocks.robotis_openCM70_cm_custom = { this.setColour("#00979D"); this.appendDummyInput().appendField(Lang.Blocks.robotis_cm_custom); this.appendDummyInput().appendField('('); - this.appendValueInput("ADDRESS").setCheck(["Number", "String"]); + this.appendValueInput("ADDRESS").setCheck(["Number", "String"]); this.appendDummyInput().appendField(')'); this.appendDummyInput().appendField(Lang.Blocks.robotis_common_case_01); this.appendValueInput("VALUE").setCheck(["Number", "String"]); @@ -1048,9 +1048,9 @@ Entry.block.robotis_carCont_sensor_value = function (sprite, script) { var data_length = 0; var data_value = 0; - var data_default_address = 0; + var data_default_address = 0; var data_default_length = 0; - + var sensor = script.getStringField("SENSOR"); if (sensor == 'CM_SPRING_LEFT') { @@ -1104,11 +1104,11 @@ Entry.block.robotis_carCont_sensor_value = function (sprite, script) { data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_BUTTON_STATUS[0]; data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_BUTTON_STATUS[1]; } - + Entry.Robotis_carCont.setRobotisData([[data_instruction, data_address, data_length, data_value, data_default_length]]); // Entry.hw.socket.send(JSON.stringify(Entry.hw.sendQueue)); Entry.Robotis_carCont.update(); - + return Entry.hw.portData[data_default_address]; }; @@ -1138,23 +1138,23 @@ Entry.block.robotis_carCont_cm_led = function (sprite, script) { // instruction / address / length / value / default length var value_left = script.getField("VALUE_LEFT", script); var value_right = script.getField("VALUE_RIGHT", script); - + var data_instruction = Entry.Robotis_carCont.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; var data_value = 0; - + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_LED[0]; data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_LED[1]; - + if (value_left == 1 && value_right == 1) { - data_value = 9; + data_value = 9; } else if (value_left == 1 && value_right == 0) { - data_value = 8; + data_value = 8; } if (value_left == 0 && value_right == 1) { - data_value = 1; + data_value = 1; } - + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_carCont.delay); }; @@ -1173,16 +1173,16 @@ Blockly.Blocks.robotis_carCont_cm_sound_detected_clear = { Entry.block.robotis_carCont_cm_sound_detected_clear = function (sprite, script) { // instruction / address / length / value / default length - + var data_instruction = Entry.Robotis_carCont.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; - var data_value = 0; - + var data_value = 0; + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[0]; data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[1]; - data_value = 0; - + data_value = 0; + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_carCont.delay); }; @@ -1217,12 +1217,12 @@ Entry.block.robotis_carCont_aux_motor_speed = function (sprite, script) { var direction = script.getField("DIRECTION", script); var directionAngle = script.getField("DIRECTION_ANGLE", script); var value = script.getNumberValue('VALUE'); - + var data_instruction = Entry.Robotis_carCont.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; var data_value = 0; - + if (direction == 'LEFT') { data_address = Entry.Robotis_carCont.CONTROL_TABLE.AUX_MOTOR_SPEED_LEFT[0]; data_length = Entry.Robotis_carCont.CONTROL_TABLE.AUX_MOTOR_SPEED_LEFT[1]; @@ -1230,7 +1230,7 @@ Entry.block.robotis_carCont_aux_motor_speed = function (sprite, script) { data_address = Entry.Robotis_carCont.CONTROL_TABLE.AUX_MOTOR_SPEED_RIGHT[0]; data_length = Entry.Robotis_carCont.CONTROL_TABLE.AUX_MOTOR_SPEED_RIGHT[1]; } - + if (directionAngle == 'CW') { value = value + 1024; if (value > 2047) { @@ -1241,9 +1241,9 @@ Entry.block.robotis_carCont_aux_motor_speed = function (sprite, script) { value = 1023; } } - + data_value = value; - + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_carCont.delay); }; @@ -1272,12 +1272,12 @@ Entry.block.robotis_carCont_cm_calibration = function (sprite, script) { // instruction / address / length / value / default length var direction = script.getField("DIRECTION", script); var value = script.getNumberValue('VALUE'); - + var data_instruction = Entry.Robotis_carCont.INSTRUCTION.WRITE; var data_address = 0; var data_length = 0; var data_value = 0; - + if (direction == 'LEFT') { data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_LEFT[0]; data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_LEFT[1]; @@ -1285,12 +1285,12 @@ Entry.block.robotis_carCont_cm_calibration = function (sprite, script) { data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_RIGHT[0]; data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_RIGHT[1]; } - + data_value = value; - + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_carCont.delay); - + // Entry.hw.sendQueue['ROBOTIS_DATA'] = [[data_instruction, data_address, data_length, data_value]]; // update(); // return script.callReturn(); diff --git a/src/blocks/block_start.js b/src/blocks/block_start.js index 98a156d0b0..302c5262d4 100644 --- a/src/blocks/block_start.js +++ b/src/blocks/block_start.js @@ -98,23 +98,6 @@ Entry.block.mouse_click_cancled = function (sprite, script) { return script.callReturn(); }; - -// //장면이 시작했을 때 -// Blockly.Blocks.when_scene_start = { -// init: function() { -// this.setColour("#3BBD70"); -// this.appendDummyInput() -// .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/start_icon_start.png', '*', "start")) -// .appendField(Lang.Blocks.START_when_scene_start); -// this.setInputsInline(true); -// this.setNextStatement(true); -// } -// }; - -// Entry.block.when_scene_start = function (sprite, script) { -// return script.callReturn(); -// }; - //오브젝트를 클릭 했을 때 Blockly.Blocks.when_object_click = { init: function() { @@ -174,7 +157,15 @@ Blockly.Blocks.when_message_cast = { .appendField(Lang.Blocks.START_when_message_cast_2); this.setInputsInline(true); this.setNextStatement(true); - } + }, + whenAdd: function (block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_messageRefs', block); + }, + whenRemove: function (block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_messageRefs', block); + } }; Entry.block.when_message_cast = function (sprite, script) { @@ -194,7 +185,15 @@ Blockly.Blocks.message_cast = { this.setInputsInline(true); this.setNextStatement(true); this.setPreviousStatement(true); - } + }, + whenAdd: function (block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_messageRefs', block); + }, + whenRemove: function (block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_messageRefs', block); + } }; Entry.block.message_cast = function (sprite, script) { @@ -205,27 +204,12 @@ Entry.block.message_cast = function (sprite, script) { if (value == 'null' || !isExist) throw new Error('value can not be null or undefined'); + Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent, ["when_message_cast", value]); return script.callReturn(); }; - -//메시지 추가 -Blockly.Blocks.add_message = { - init: function() { - this.setColour("#3BBD70"); - this.appendDummyInput() - .appendField(Lang.Blocks.START_add_message) - .appendField(new Blockly.FieldIcon(Entry.mediaFilePath + 'block_icon/start_03.png', '*')); - this.setInputsInline(true); - } -}; - -Entry.block.add_massage = function (sprite, script) { - return script.callReturn(); -}; - Blockly.Blocks.message_cast_wait = { init: function() { this.setColour("#3BBD70"); @@ -237,16 +221,29 @@ Blockly.Blocks.message_cast_wait = { this.setInputsInline(true); this.setNextStatement(true); this.setPreviousStatement(true); - } + }, + whenAdd: function (block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_messageRefs', block); + }, + whenRemove: function (block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_messageRefs', block); + } }; Entry.block.message_cast_wait = function (sprite, script) { if (script.runningScript) { - if (script.runningScript.length) { - Entry.engine.computeFunction(script); + var runningScript = script.runningScript; + var length = runningScript.length; + for (var i = 0; i < length; i++) { + var executor = runningScript.shift(); + if (executor && !executor.isEnd()) + runningScript.push(executor); + } + if (runningScript.length) { return script; } else { - delete script.runningScript; return script.callReturn(); } } else { @@ -255,24 +252,16 @@ Entry.block.message_cast_wait = function (sprite, script) { var isExist = Entry.isExist(value, 'id', arr); if (value == 'null' || !isExist) throw new Error('value can not be null or undefined'); - var runningScript = [] - - Entry.container.mapEntityIncludeCloneOnScene(function(entity, param) { - var eventName = param[0]; - var keyCode = param[1]; - var blocks = entity.parent.script.childNodes; - //handle clone entity - for (var i=0; i 0) + thread[0].id = Entry.Utils.generateId(); + return [thread]; + }, + log: function(block) { + return [block.id, block.toJSON()]; + }, + undo: "destroyThread" + }; + + c.destroyThread = { + type: 106, + do: function(thread) { + var blockId = thread[0].id; + var block = this.editor.board.findById(blockId); + block.destroy(true, true); + }, + state: function(thread) { + var blockId = thread[0].id; + var block = this.editor.board.findById(blockId); + return [block.thread.toJSON()]; + }, + log: function(block) { + }, + undo: "addThread" + }; + + c.destroyBlock = { + type: 106, + do: function(block) { + if (typeof block === "string") + block = this.editor.board.findById(block); + block.doDestroy(true); + }, + state: function(block) { + if (typeof block === "string") + block = this.editor.board.findById(block); + return [block.toJSON(), block.pointer()]; + }, + log: function(block) { + }, + undo: "recoverBlock" + }; + + c.recoverBlock = { + type: 106, + do: function(blockModel, pointer) { + var block = this.editor.board.code.createThread([blockModel]).getFirstBlock(); + if (typeof block === "string") + block = this.editor.board.findById(block); + this.editor.board.insert(block, pointer); + }, + state: function(block) { + if (typeof block !== "string") + block = block.id; + return [block]; + }, + log: function(block) { + }, + undo: "destroyBlock" + }; + + c.insertBlock = { + type: 102, + do: function(block, targetBlock, count) { + if (typeof block === "string") + block = this.editor.board.findById(block); + this.editor.board.insert(block, targetBlock, count); + }, + state: function(block, targetBlock) { + if (typeof block === "string") + block = this.editor.board.findById(block); + var data = [ + block.id + ]; + var pointer = block.targetPointer() + data.push(pointer); + + if (typeof block !== "string" && block.getBlockType() === "basic") + data.push(block.thread.getCount(block)); + return data; + }, + log: function(block) { + }, + undo: "insertBlock" + }; + + c.separateBlock = { + type: 103, + do: function(block) { + if (block.view) + block.view._toGlobalCoordinate(Entry.DRAG_MODE_DRAG); + block.doSeparate(); + }, + state: function(block) { + var data = [ + block.id + ]; + var pointer = block.targetPointer() + data.push(pointer); + + if (block.getBlockType() === "basic") + data.push(block.thread.getCount(block)); + return data; + }, + log: function(block) { + }, + undo: "insertBlock" + }; + + c.moveBlock = { + type: 104, + do: function(block, x, y) { + if (x !== undefined) { // do from undo stack + block = this.editor.board.findById(block); + block.moveTo(x, y); + } else { + block._updatePos(); + } + }, + state: function(block) { + if (typeof block === "string") + block = this.editor.board.findById(block); + return [ + block.id, + block.x, + block.y + ]; + }, + log: function(block) { + return [block.id, block.toJSON()]; + }, + undo: "moveBlock" + }; + + c.cloneBlock = { + type: 105, + do: function(block) { + if (typeof block === "string") + block = this.editor.board.findById(block); + this.editor.board.code.createThread(block.copy()); + }, + state: function(block) { + if (typeof block !== "string") + block = block.id; + return [block]; + }, + log: function(block) { + return [block.id, block.toJSON()]; + }, + undo: "uncloneBlock" + }; + + c.uncloneBlock = { + type: 105, + do: function(block) { + var threads = this.editor.board.code.getThreads(); + var lastBlock = threads.pop().getFirstBlock(); + lastBlock.destroy(true, true); + }, + state: function(block) { + return [block]; + }, + log: function(block) { + return [block.id, block.toJSON()]; + }, + undo: "cloneBlock" + }; + + c.scrollBoard = { + type: 105, + do: function(dx, dy) { + this.editor.board.scroller._scroll(dx, dy); + }, + state: function(dx, dy) { + return [-dx, -dy]; + }, + log: function(block) { + return [block.id, block.toJSON()]; + }, + undo: "scrollBoard" + }; + + c.setFieldValue = { + type: 106, + do: function(block, field, pointer, oldValue, newValue) { + field.setValue(newValue, true); + }, + state: function(block, field, pointer, oldValue, newValue) { + return [block, field, pointer, newValue, oldValue]; + }, + log: function(block, newValue) { + return [block.id, newValue]; + }, + undo: "setFieldValue" + }; + +})(Entry.Command); diff --git a/src/command/commands/object.js b/src/command/commands/object.js new file mode 100644 index 0000000000..19cd09a9c8 --- /dev/null +++ b/src/command/commands/object.js @@ -0,0 +1,25 @@ +/* + * + */ +"use strict"; + +goog.require("Entry.Command"); + +(function(c) { + c.selectObject = { + type: 201, + do: function(objectId) { + return Entry.container.selectObject(objectId); + }, + state: function(objectId) { + var playground = Entry.playground; + if (playground && playground.object) + return [playground.object.id]; + }, + log: function(objectId) { + return [objectId]; + }, + undo: "selectObject" + }; + +})(Entry.Command); diff --git a/src/container.js b/src/container.js index d989ccdb33..32a1f802bc 100644 --- a/src/container.js +++ b/src/container.js @@ -544,6 +544,8 @@ Entry.Container.prototype.getDropdownList = function(menuName) { result.push([Lang.Blocks.wall_left, 'wall_left']); break; case 'pictures': + if (!Entry.playground.object) + break; var pictures = Entry.playground.object.pictures; for (var i = 0; i0; j--) { var entity = object.clonedEntities[j-1]; entity.removeClone(); @@ -635,25 +639,29 @@ Entry.Container.prototype.clearRunningState = function() { */ Entry.Container.prototype.mapObject = function(mapFunction, param) { var length = this.objects_.length; + var output = []; for (var i = 0; i0; j--) { var entity = object.clonedEntities[j-1]; entity.removeClone(); @@ -671,19 +679,23 @@ Entry.Container.prototype.clearRunningStateOnScene = function() { */ Entry.Container.prototype.mapEntity = function(mapFunction, param) { var length = this.objects_.length; + var output = []; for (var i = 0; i -1) { - if (blocks[j].getAttribute('id') == removeBlock.getAttribute('id')) - continue; - else - return; - } - } + var answerTypes = [ + 'ask_and_wait', + 'get_canvas_input_value', + 'set_visible_answer' + ]; + + for (var i = 0, len = objects.length; i < len; i++) { + var code = objects[i].script; + for (var j = 0; j < answerTypes.length; j++) + if (code.hasBlockType(answerTypes[j])) return; } + + //answer related blocks not found + //hide canvas answer view answer.setVisible(false); }; diff --git a/src/core/dom.js b/src/core/dom.js index 17ec7e7d17..baaadfed2d 100644 --- a/src/core/dom.js +++ b/src/core/dom.js @@ -17,29 +17,17 @@ Entry.Dom = function (tag, options) { var tagRegex = /<(\w+)>/, dom; - if (tag instanceof HTMLElement) - dom = $(tag); - else if (tag instanceof jQuery) - dom = tag; - else if (tagRegex.test(tag)) - dom = $(tag); - else - dom = $('<' + tag + '>'); - - if (options === undefined) - return dom; - - if (options.id) - dom.attr('id', options.id); - - if (options.class) - dom.addClass(options.class); - - if (options.classes) - options.classes.map(function (className) { dom.addClass(className); }); - - if (options.parent) - options.parent.append(dom); + if (tag instanceof HTMLElement) dom = $(tag); + else if (tag instanceof jQuery) dom = tag; + else if (tagRegex.test(tag)) dom = $(tag); + else dom = $('<' + tag + '>'); + + if (options === undefined) return dom; + if (options.id) dom.attr('id', options.id); + if (options.class) dom.addClass(options.class); + if (options.classes) options.classes.map(function (className) {dom.addClass(className);}); + if (options.src) dom.attr('src', options.src); + if (options.parent) options.parent.append(dom); dom.bindOnClick = function() { var hasChild = false; @@ -61,9 +49,9 @@ Entry.Dom = function (tag, options) { } if(child) { - $(this).on('click touchstart', child, handler); + $(this).on('click tab', child, handler); } else { - $(this).on('click touchstart', handler); + $(this).on('click tab', handler); } }; diff --git a/src/core/svg.js b/src/core/svg.js index b6edee5dfd..e7bff50be8 100644 --- a/src/core/svg.js +++ b/src/core/svg.js @@ -49,6 +49,7 @@ Entry.SVG.createElement = function (tag, options) { el.removeClass = Entry.SVG.removeClass; el.hasClass = Entry.SVG.hasClass; el.remove = Entry.SVG.remove; + el.removeAttr = Entry.SVG.removeAttr; return el; }; @@ -102,10 +103,14 @@ Entry.SVG.hasClass = function(className) { var attr = this.getAttribute("class"); if(!attr) return false; - else + else return attr.match(new RegExp('(\\s|^)'+className+'(\\s|$)')); }; Entry.SVG.remove = function() { if (this.parentNode) this.parentNode.removeChild(this); }; + +Entry.SVG.removeAttr = function(attrName) { + this.removeAttribute(attrName); +}; diff --git a/src/css/codemirror_theme.less b/src/css/codemirror_theme.less new file mode 100644 index 0000000000..e6e2bb7585 --- /dev/null +++ b/src/css/codemirror_theme.less @@ -0,0 +1,342 @@ +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: 'Nanum Gothic Coding' !important; + height: 100%; + color: black; +} + +.CodeMirror *{ + font-family: 'Nanum Gothic Coding' !important; +} + +/* PADDING */ + +.CodeMirror-sizer { + padding-top: 7px; +} + +.CodeMirror-lines { + padding: 5px 0; /* Vertical padding around content */ +} +.CodeMirror pre { + padding: 0 5px; /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; +} +.CodeMirror-linenumbers {} +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #A0A0A0; + white-space: nowrap; +} + +.CodeMirror-guttermarker { color: black; } +.CodeMirror-guttermarker-subtle { color: #999; } + +/* CURSOR */ + +.CodeMirror-cursor { + border-left: 1px solid black; + border-right: none; + width: 0; +} +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} +.cm-fat-cursor .CodeMirror-cursor { + width: auto; + border: 0; + background: #7e7; +} +.cm-fat-cursor div.CodeMirror-cursors { + z-index: 1; +} + +.cm-animate-fat-cursor { + width: auto; + border: 0; + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; + background-color: #7e7; +} +@-moz-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} +@-webkit-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} +@keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} + +/* Can style cursor different in overwrite (non-insert) mode */ +.CodeMirror-overwrite .CodeMirror-cursor {} + +.cm-tab { display: inline-block; text-decoration: inherit; } + +.CodeMirror-ruler { + border-left: 1px solid #ccc; + position: absolute; +} + +/* DEFAULT THEME */ + +.cm-s-default .cm-header {color: blue;} +.cm-s-default .cm-quote {color: #090;} +.cm-negative {color: #d44;} +.cm-positive {color: #292;} +.cm-header, .cm-strong {font-weight: bold;} +.cm-em {font-style: italic;} +.cm-link {text-decoration: underline;} +.cm-strikethrough {text-decoration: line-through;} + +.cm-s-default .cm-keyword {color: #2BBFED ;} +.cm-s-default .cm-atom {color: #FF9E00;} +.cm-s-default .cm-number {color: #E22C0B;} +.cm-s-default .cm-def {color: #4F39DB;} +.cm-s-default .cm-variable, +.cm-s-default .cm-punctuation, +.cm-s-default .cm-property, +.cm-s-default .cm-operator {color: #E22C0B;} +.cm-s-default .cm-variable-2 {color: #0FC764;} +.cm-s-default .cm-variable-3 {color: #085;} +.cm-s-default .cm-comment {color: #a50;} +.cm-s-default .cm-string {color: #4F39DB;} +.cm-s-default .cm-string-2 {color: #f50;} +.cm-s-default .cm-meta {color: #555;} +.cm-s-default .cm-qualifier {color: #555;} +.cm-s-default .cm-builtin {color: #30a;} +.cm-s-default .cm-bracket {color: #997;} +.cm-s-default .cm-tag {color: #170;} +.cm-s-default .cm-attribute {color: #00c;} +.cm-s-default .cm-hr {color: #999;} +.cm-s-default .cm-link {color: #00c;} + +.cm-s-default .cm-error {color: #f00;} +.cm-invalidchar {color: #f00;} + +.CodeMirror-composing { border-bottom: 2px solid; } + +/* Default styles for common addons */ + +div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} +div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} +.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } +.CodeMirror-activeline-background {background: #E7F1FD;} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror { + position: relative; + overflow: hidden; + background: white; +} + +.CodeMirror-scroll { + overflow: scroll !important; /* Things will break if this is overridden */ + /* 30px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -30px; margin-right: -30px; + padding-bottom: 30px; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; +} +.CodeMirror-sizer { + position: relative; + border-right: 30px solid transparent; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actuall scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; +} +.CodeMirror-vscrollbar { + right: 0; top: 0; + overflow-x: hidden; + overflow-y: scroll; +} +.CodeMirror-hscrollbar { + bottom: 0; left: 0; + overflow-y: hidden; + overflow-x: scroll; +} +.CodeMirror-scrollbar-filler { + right: 0; bottom: 0; +} +.CodeMirror-gutter-filler { + left: 0; bottom: 0; +} + +.CodeMirror-gutters { + position: absolute; left: 0; top: 0; + z-index: 3; +} +.CodeMirror-gutter { + white-space: normal; + height: 100%; + display: inline-block; + margin-bottom: -30px; + /* Hack to make IE7 behave */ + *zoom:1; + *display:inline; +} +.CodeMirror-gutter-wrapper { + position: absolute; + z-index: 4; + background: none !important; + border: none !important; +} +.CodeMirror-gutter-background { + position: absolute; + top: 0; bottom: 0; + z-index: 4; +} +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; +} +.CodeMirror-gutter-wrapper { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +.CodeMirror-lines { + cursor: text; + min-height: 1px; /* prevents collapsing before first draw */ +} +.CodeMirror pre { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; + -webkit-tap-highlight-color: transparent; +} +.CodeMirror-wrap pre { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; +} + +.CodeMirror-linebackground { + position: absolute; + left: 0; right: 0; top: 0; bottom: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; + overflow: auto; +} + +.CodeMirror-widget {} + +.CodeMirror-code { + outline: none; +} + +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; + height: 0; + overflow: hidden; + visibility: hidden; +} + +.CodeMirror-cursor { position: absolute; } +.CodeMirror-measure pre { position: static; } + +div.CodeMirror-cursors { + visibility: hidden; + position: relative; + z-index: 3; +} +div.CodeMirror-dragcursors { + visibility: visible; +} + +.CodeMirror-focused div.CodeMirror-cursors { + visibility: visible; +} + +.CodeMirror-selected { background: #d9d9d9; } +.CodeMirror-focused .CodeMirror-selected { background: #E4F9ED; } +.CodeMirror-crosshair { cursor: crosshair; } +.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } +.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } + +.cm-searching { + background: #ffa; + background: rgba(255, 255, 0, .4); +} + +/* IE7 hack to prevent it from returning funny offsetTops on the spans */ +.CodeMirror span { *vertical-align: text-bottom; } + +/* Used to force a border model for a node */ +.cm-force-border { padding-right: .1px; } + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursors { + visibility: hidden; + } +} + +/* See issue #2901 */ +.cm-tab-wrap-hack:after { content: ''; } + +/* Help users use markselection to safely style text background */ +span.CodeMirror-selectedtext { background: none; } diff --git a/src/css/common.less b/src/css/common.less index 7d7f934e7a..01988d77d3 100644 --- a/src/css/common.less +++ b/src/css/common.less @@ -1,7 +1,42 @@ @url: "../../img/"; -@image_url: "../../images/"; +@image_url: "../images/"; .backgroundImage(@imageName) { background-image: url("@{image_url}@{imageName}"); } +.entry { + +} + +.dragNone { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.entryHidden { + visibility: hidden; +} + +.entryRemove { + display: none !important; +} + +.entryRemoveElement { + display: none !important; +} + +.entryNoDeco { + text-decoration: none !important; +} + + +.entryBtn { + border: none; + margin: 0; + background-color: transparent; +} diff --git a/src/css/components/block.less b/src/css/components/block.less new file mode 100644 index 0000000000..5d7a5b7d27 --- /dev/null +++ b/src/css/components/block.less @@ -0,0 +1,241 @@ +.block.selected > g > .blockPath { + stroke-width: 3px; + stroke: #798EB1; +} + +.block.outputHighlight > g > .blockPath { + stroke-width: 2px; + stroke: white; +} + +.block.basicButtonView { + cursor: pointer; +} + +.block.basicButtonView:hover > g > path { + fill: #f4f4f4; +} + +.block { + cursor: url('@{image_url}handopen.cur') 8 5, auto; + -ms-touch-action: none; +} + +.block.dragging { + cursor: url('@{image_url}handclosed.cur') 8 5, auto; +} + +.block.selected > path { + stroke-width: 3px; + stroke: #798EB1; +} + +.block.activated > g > path { + stroke-width: 3px; + stroke: red; + + /*stroke-dasharray: 20;*/ + /*stroke-dashoffset: 1000;*/ + /*-webkit-animation: activationDash 15s forwards linear;*/ + /*-webkit-animation-iteration-count: infinite;*/ + /*-moz-animation: activationDash 15s forwards linear;*/ + /*-moz-animation-iteration-count: infinite;*/ + /*animation: activationDash 15s forwards linear;*/ + /*animation-iteration-count: infinite;*/ + /*-o-animation: activationDash 15s forwards linear;*/ + /*-o-animation-iteration-count: infinite;*/ + /*-ms-animation: activationDash 15s forwards linear;*/ + /*-ms-animation-iteration-count: infinite;*/ +} + +@keyframes activationDash { + to {stroke-dashoffset: 0;} +} + +@-o-keyframes activationDash { + to {stroke-dashoffset: 0;} +} + +@-ms-keyframes activationDash { + to {stroke-dashoffset: 0;} +} + +@-moz-keyframes activationDash { + to {stroke-dashoffset: 0;} +} + +@-webkit-keyframes activationDash { + to {stroke-dashoffset: 0;} +} + +.block g text, +.block g image { + pointer-events: none; +} + +svg .svgBlockGroup text { + white-space: pre; +} + +.entry-field-color { + cursor: pointer; +} + +.entry-input-field { + cursor: text; +} + +.entry-input-field:hover rect { + stroke-width: 1.5px; + stroke: white; +} + +.entry-widget-input-field { + position: fixed; + font-family: ng; + font-size: 9pt; + border: none; + outline: none; + line-height: normal; + } + + .entry-field-angle { + cursor: default; + } + +.entry-field-angle-circle { + stroke: #444; + stroke-width: 1; + fill: #ddd; + fill-opacity: 0.8; +} + +.entry-angle-divider { + stroke: #444; + stroke-width: 1; +} + +.entry-angle-indicator { + stroke: #f00; + stroke-width: 2; + stroke-linecap: round; +} + +.entry-angle-fill-area { + fill: #f88; + fill-opacity: 0.8; +} + +.entryWorkspaceFilters { + position: absolute; + left: -100px; + top: -100px; +} + +.entry-widget-keyboard-input { + position: fixed; +} + +.entry-widget-dropdown { + position: fixed; + cursor: pointer; + list-style: none; + background-color: white; + border: 1px gray solid; + margin: 0; + padding: 0; + text-align: left; + font-size: 9pt; + color: #000; + z-index: 1001; + overflow: auto; + + .rect { + height: 20px; + padding: 3px 19px 3px 6px; + width: 100%; + + .left { + display: inline-block; + width: 13px; + } + + .right { + display: inline-block; + } + } + + .rect:hover { + background-color: #127cdb; + color: white; + } +} + +.blockHoverPattern { + .pattern1 { + opacity: 0; + .animation-duration(0.7s); + .animation-direction(alternate); + .animation-name(blockPatternAnimation); + .animation-iteration-count(infinite); + } + + .pattern2 { + opacity: 0; + .animation-delay(0.33s); + .animation-duration(0.7s); + .animation-direction(alternate); + .animation-name(blockPatternAnimation); + .animation-iteration-count(infinite); + } + + .pattern3 { + opacity: 0; + .animation-delay(0.67s); + .animation-duration(0.7s); + .animation-direction(alternate); + .animation-name(blockPatternAnimation); + .animation-iteration-count(infinite); + } + + .pattern4 { + opacity: 0; + .animation-delay(1s); + .animation-duration(0.7s); + .animation-direction(alternate); + .animation-name(blockPatternAnimation); + .animation-iteration-count(infinite); + } + +} + +//hover block background pattern animation +@keyframes blockPatternAnimation { + from {opacity:0} + to {opacity:0.2} +} + +@-o-keyframes blockPatternAnimation { + from {opacity:0} + to {opacity:0.2} +} + +@-ms-keyframes blockPatternAnimation { + from {opacity:0} + to {opacity:0.2} +} + +@-moz-keyframes blockPatternAnimation { + from {opacity:0} + to {opacity:0.2} +} + +@-webkit-keyframes blockPatternAnimation { + from {opacity:0} + to {opacity:0.2} +} + +.entry-field-dropdown { + cursor: default; +} + diff --git a/src/css/components/block_menu.less b/src/css/components/block_menu.less new file mode 100644 index 0000000000..745cfd9282 --- /dev/null +++ b/src/css/components/block_menu.less @@ -0,0 +1,351 @@ +.entryWorkspaceBlockMenu { + background-color: #e5e5e5; + position: absolute; + top: 45px; + bottom: 0px; +} + +.entryCategoryListWorkspace { + width: 64px; + height: 100%; + display: inline-block; + background-color: #f5f5f5; + list-style-type: none; + margin: 0; + padding: 0; +} + +.blockMenuContainer { + display: inline-block; + vertical-align: top; + width: 200px; + height: 100%; +} + +.blockMenu { + height: 100%; + width: 100%; +} + +.entryCategoryListPhone { + padding: 0; + margin: 0; + list-style-type: none; +} + +.entryCategoryElementWorkspace { + clear: both; + padding-top: 38px; + width: 64px; + text-align: center; + background-color: #edf5f7; + font-size: 13px; + color: #474747; + float: left; + border-bottom: 1px solid #a6cafb; + cursor: pointer; + font-family: nanumBarunBold !important; +} + +@media screen and (max-height: 10000px) { + .entryCategoryElementWorkspace { + height: 61px; + background-position: 50% 6px; + padding-top: 38px; + } +} + +@media screen and (max-height: 880px) { + .entryCategoryElementWorkspace { + height: 56px; + background-position: 50% 4px; + padding-top: 34px; + } +} + +@media screen and (max-height: 810px) { + .entryCategoryElementWorkspace { + height: 50px; + background-position: 50% 2px; + padding-top: 30px; + } +} + +@media screen and (max-height: 740px) { + .entryCategoryElementWorkspace { + height: 42px; + background-position: 50% 1px; + background-size: 35px; + padding-top: 23px; + } + +} + +@media screen and (max-height: 640px) { + .entryCategoryElementWorkspace { + height: 36px; + background-position: 50% 1px; + background-size: 30px; + padding-top: 18px; + } +} + +.entryCategoryElementPhone { + height: 50px; + clear: both; + width: 56px; + padding-top: 30px; + text-align: center; + background-color: #E2E9F0; + font-size: 13px; + color: #474747; + float: left; + border-bottom: 1px solid #B7C4CC; + background-position: 5px 2px; + cursor: pointer; +} + +.entryCategoryElementEndWorkspace { + clear: both; + width: 3px; + margin-left: 56px; + background-color: #515B7C; + height: 4000px; +} + +.entrySelectedCategory { + margin: 0; + background-color: #e5e5e5; +} + +.entryCategoryWorkspace { + width: 74px; + height: 100%; + display: block; +} + + +.entryBlockMenuWorkspace { + background-color: #e5e5e5; + position: absolute; + left: 64px; + top: 45px; + width: 186px; + bottom: 0px; + z-index: 100; +} + +#entryCategorymoving { + /*border-right: 4px solid #A751E3;*/ + .backgroundImage("movement.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategorymoving { + /*border-left: 4px solid #A751E3;*/ + border-right: none; +} + +#entryCategorylooks { + /*border-right: 4px solid #EC4466;*/ + .backgroundImage("looks.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategorylooks { + /*border-left: 4px solid #EC4466;*/ + border-right: none; +} + +#entryCategorybrush { + /*border-right: 4px solid #FF9E20;*/ + .backgroundImage("brush.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategorybrush { + border-right: none; +} + +#entryCategorytext { + .backgroundImage("postbox_new.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategorytext { + border-right: none; +} + +#entryCategorysound { + .backgroundImage("sound.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategorysound { + border-right: none; +} + +#entryCategorystart { + .backgroundImage("start.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategorystart { + border-right: none; +} + +#entryCategoryflow { + .backgroundImage("flow.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategoryflow { + border-right: none; +} + +#entryCategoryjudgement { + .backgroundImage("judgement.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategoryjudgement { + border-right: none; +} + +#entryCategorycalc { + .backgroundImage("calc.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategorycalc { + border-right: none; +} + +#entryCategoryvariable { + .backgroundImage("variable.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategoryvariable { + border-right: none; +} + +#entryCategoryfunc { + .backgroundImage("function.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategoryfunc { + border-right: none; +} + +#entryCategoryscene { + border-right: none; + .backgroundImage("scene.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategoryscene { + border-left: none; + border-right: none; +} + +#entryCategoryarduino { + .backgroundImage("arduino.png"); + background-repeat: no-repeat; +} + +.entrySelectedCategory#entryCategoryarduino { + border-right: none; +} + +.entryBlocklyWorkspace { + position: absolute; + left: 250px; + top: 8px; + bottom: 0px; + right: 0px; + overflow: hidden; + border: solid 1px #C4C4B9; + border-top-left-radius: 10px; + .backgroundImage("entry_bg.png"); +} + +.entryBlocklyWorkspace.folding { + z-index: 300; + border-left: solid 1px #C4C4B9; + .animation-duration(0.7s); + .animation-name(foldBlockly); + .animation-fill-mode(forwards); +} + +@keyframes foldBlockly { + from {} + to {left: 64px;} +} + +@-ot-keyframes foldBlockly { + from {} + to {left: 64px;} +} + +@-ms-keyframes foldBlockly { + from {} + to {left: 64px;} +} + +@-moz-keyframes foldBlockly { + from {} + to {left: 64px;} +} + +@-webkit-keyframes foldBlockly { + from {} + to {left: 64px;} +} + +.entryBlocklyWorkspace.foldOut { + z-index:300; + .animation-duration(0.7s); + .animation-name(foldOutBlockly); + .animation-fill-mode(forwards); +} + +@keyframes foldOutBlockly { + from {left: 64px;} + to {} +} + +@-o-keyframes foldOutBlockly { + from {left: 64px;} + to {} +} + +@-ms-keyframes foldOutBlockly { + from {left: 64px;} + to {} +} + +@-moz-keyframes foldOutBlockly { + from {left: 64px;} + to {} +} + +@-webkit-keyframes foldOutBlockly { + from {left: 64px;} + to {} +} + +.entryBlocklyPhone { + position: absolute; + top: 0px; + left: 56px; + right: 0px; + bottom: 0px; + overflow: hidden; + border: solid 1px #C4C4B9; + border-left: 0; + .backgroundImage("entry_bg_1.png"); +} + + diff --git a/src/css/components/board.less b/src/css/components/board.less new file mode 100644 index 0000000000..247e478d97 --- /dev/null +++ b/src/css/components/board.less @@ -0,0 +1,154 @@ +.entryBoard { + cursor: move; + position: absolute; + -ms-touch-action: none; +} + +.entryOverlayBoard { + background: rgba(180,180,180,0.4); +} + +.boardScrollbar { + opacity: 0.4; + cursor: move; + -ms-touch-action: none; +} + +.boardScrollbar:hover { + opacity: 0.6; +} + +.entry-widget-color-table { + border: 1px solid #666; + border-collapse: collapse; + z-index: 1001; + position: fixed; + .entry-widget-color-row { + border-bottom: 2px solid #666; + } + + .entry-widget-color-cell { + height: 13px; + width: 15px; + margin: 0; + border: 0; + text-align: center; + vertical-align: middle; + border-right: 2px solid #666; + font-size: 1px; + cursor: pointer; + } +} + +.entryBoardWrapper { + position: absolute; + top: 0; + left: 0; + right: 0; + height: 100%; +} + +.entryVimBoard { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +.entryFunctionButton { + stroke: #555; + stroke-width: 3; + fill: transparent; + cursor: pointer; +} + +.entryFunctionButton:hover { + stroke: #000; +} + +.entryFunctionButtonText { + font-family: ng !important; + font-size: 13 !important; + text-anchor: middle; + fill: black; + cursor: pointer !important; +} + +.entryWorkspaceBoard { + position: absolute; + left: 250px; + top: 8px; + bottom: 0px; + right: 0px; + overflow: hidden; + border: solid 1px #C4C4B9; + border-top-left-radius: 10px; + .backgroundImage("entry_bg.png"); +} + +.entryWorkspaceBoard.folding { + z-index: 300; + border-left: solid 1px #C4C4B9; + .animation-duration(0.7s); + .animation-name(foldBoard); + .animation-fill-mode(forwards); +} + +@keyframes foldBoard { + from {} + to {left: 64px;} +} + +@-ot-keyframes foldBoard { + from {} + to {left: 64px;} +} + +@-ms-keyframes foldBoard { + from {} + to {left: 64px;} +} + +@-moz-keyframes foldBoard { + from {} + to {left: 64px;} +} + +@-webkit-keyframes foldBoard { + from {} + to {left: 64px;} +} + +.entryWorkspaceBoard.foldOut { + z-index:300; + .animation-duration(0.7s); + .animation-name(foldOutBoard); + .animation-fill-mode(forwards); +} + +@keyframes foldOutBoard { + from {left: 64px;} + to {} +} + +@-o-keyframes foldOutBoard { + from {left: 64px;} + to {} +} + +@-ms-keyframes foldOutBoard { + from {left: 64px;} + to {} +} + +@-moz-keyframes foldOutBoard { + from {left: 64px;} + to {} +} + +@-webkit-keyframes foldOutBoard { + from {left: 64px;} + to {} +} + diff --git a/src/css/components/container.less b/src/css/components/container.less new file mode 100644 index 0000000000..5fe1b85f9b --- /dev/null +++ b/src/css/components/container.less @@ -0,0 +1,561 @@ +.entryContainerWorkspace { + background-color: #e7e7e7; +} + +.entryContainerPhone { + width: 100%; + background-color: #e7e7e7; +} + +.entryAddObjectWorkspace { + display: block; + height: 48px; + background-color: #e7e7e7; + color: #757575; + text-align: center; + font-size: 11pt; + line-height: 44px; + margin: 10px; + border: 2px dashed #979797; + cursor: pointer; +} + +.entryContainerListWorkspaceWrapper { + position: absolute; + bottom: 0; + padding: 0; + margin: 0; + overflow: auto; + width: 100%; + top: 0; + background-color: #363C46; +} + +.entryContainerListWorkspace { + position: relative; + margin: 0px; + padding: 0px; + width: 100%; + background-color: #363C46; + list-style-type: none; + border-top: 1pt solid #ebeff1; +} + +.entryContainerListPhone { + position: relative; + margin: 0px; + padding: 0px; + width: 100%; + background-color: #363C46; + list-style-type: none; + border-top: 1pt solid #ebeff1; +} + +.entryContainerListWorkspace::-webkit-scrollbar { + display: none; +} + +.entryContainerListElementWorkspace { + background-color: white; + display: block; + padding: 0; + margin: 0; + border-bottom: 1pt solid #ebeff1; + position: relative; + overflow: hidden; + cursor: move; + min-height: 59px; + .box-sizing(border-box); +} + +.entryContainerListElementWorkspace.selectedObject { + background-color: #f4f4f4; + height: 118px; + border-top: 1px solid #aaaaaa; + border-bottom: 1px solid #aaaaaa; +} + +.collapsed .selectedObject { + height: 149px; +} + +.entryContainerListElementWorkspace:first-child, +.entryContainerListElementWorkspace.selectedObject + .entryContainerListElementWorkspace { + border-top: 0; +} + +.objectInfoView { + list-style: none; + padding: 0; + height: 59px; + width: 19px; + position: relative; + margin-left: 10px; + float: left; +} + +.objectInfo_visible { + display: inline-block; + position: absolute; + top: 10px; + left:0; + height: 18px; + width: 18px; + .backgroundImage("layers_icon_visible.png"); + border-bottom: 1px solid rgba(159,159,159,0.3); + cursor: pointer; + .box-sizing(border-box); +} + +.objectInfo_unvisible { + .backgroundImage("layers_icon_unvisible.png"); +} + +.objectInfo_unlock { + display: inline-block; + position: absolute; + top:33px; + left:0; + height: 18px; + width: 18px; + .backgroundImage("layers_icon_unlock.png"); + cursor: pointer; + .box-sizing(border-box); +} + +.objectInfo_lock { + .backgroundImage("layers_icon_lock.png"); +} + + +.entryObjectThumbnailWorkspace{ + float: left; + position: absolute; + height: 49px; + width: 49px; + top: 5px; + left: 41px; + border: 1px solid #bcc2c8; + background-color: #ccc; + background-size: contain; + background-repeat: no-repeat; + background-position: center; +} + +.entryObjectWrapperWorkspace{ + float: left; + position: relative; + top: 10px; + left: 72px; + width: 135px; + height: 43px; + overflow: hidden; +} + +.entryObjectNameWorkspace{ + float: left; + width: 112px; + top: 8px; + left: 20px; + position: absolute; + background-color: transparent; + border: none; + color: #000000; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + border: 1px solid transparent; +} +.editButtonToggle { + display :block; +} +.editButtonToggle_ { + display :none; +} + +.selectedEditingObject { + background-color: white !important; + border-radius: 3px; + border: 1px solid #878787 !important; + outline:none; + background-color: transparent; +} + +.selectedNotEditionObject { + background-color: transparent; +} + +.selectedNotEditionObject:hover { + background-color: transparent; +} + +.selectedNotEditionObject:focus { + background-color: transparent !important; +} +/*sj*/ + +.selectedObject .entryObjectNameWorkspace{ + color: #474747; +} + +.selectedObject>.entryObjectWrapperWorkspace>.entryObjectNameWorkspace{ + color: black; + font-family: nanumBarunRegular !important; +} + + +.entryObjectNameWorkspace:disabled{ + background-color: transparent; +} +.entryObjectEditWorkspace { + float: left; + position: absolute; + width: 19px; + height: 19px; + right: 43px; + top: 22px; + cursor: pointer; + .backgroundImage("layers_icon_edit_nor_new.png"); + +} + +.entryObjectDeleteWorkspace { + float: left; + position: absolute; + width: 19px; + height: 19px; + right: 21px; + top: 22px; + cursor: pointer; + .backgroundImage("layers_icon_close_nor_new.png"); +} + +.entryObjectDeletePhone { + float: left; + position: absolute; + width: 16px; + height: 16px; + right: 57px; + top: 25px; + cursor: pointer; + .backgroundImage("layers_icon_close_nor.png"); +} + +.entryObjectEditPhone { + float: left; + position: absolute; + width: 24px; + background-repeat: no-repeat; + height: 21px; + right: 17px; + background-color: transparent; + border: none; + top: 21px; + cursor: pointer; + .backgroundImage("glyphicons_150_edit.png"); +} + +.entryObjectSelectedImgWorkspace { + float: left; + position: absolute; + width: 14px; + height: 26px; + right: 0; + top: 20px; + cursor: col-resize; + .backgroundImage("entry_scroll.png"); +} + +.selectedObject .entryObjectSelectedImgWorkspace { + float: left; + position: absolute; + width: 14px; + height: 26px; + right: 0; + top: 20px; + cursor: col-resize; + .backgroundImage("entry_scroll.png"); +} + +.entryObjectCoordinateWorkspace{ + float: left; + width: 100%; + position: relative; + font-size: 9pt; + color: #000000; + top: 12px; + left: 28px; + width: 150px; +} + +.selectedObject>.entryObjectWrapperWorkspace>.entryObjectCoordinateWorkspace{ + color: black; +} + +.entryObjectInformationWorkspace{ + position: absolute; + cursor: pointer; + margin: 12px 0 0 0; + width: 13px; + height: 13px; + .backgroundImage("layers_arrow_up_nor.png"); +} + +.selectedObject .entryObjectInformationWorkspace{ + .backgroundImage("layers_arrow_down_nor.png"); +} + +.informationToggle>.entryObjectWrapperWorkspace>.entryObjectInformationWorkspace{ + .backgroundImage("layers_arrow_down_nor_1.png"); +} + +.entryObjectButtonWorkspace { + display: none; + float: right; + position: relative; + width: 40px; + height: 40px; + background-color: #bcc3c9; + border-radius: 50%; + margin: 10px 10px 10px 5px; + background-position:center; + background-repeat: no-repeat; + background-position: 50% 35%; + color: white; + font-size: 7.5pt; + padding: 23px 0 0 0; + text-align: center; + outline: none; + border: none; +} + +.informationToggle>.entryObjectButtonWorkspace{ + display: none; +} + +.entryObjectSoundWorkspace { + .backgroundImage("icon_sound.png"); + background-color: #6a9a1f; +} + +.entryObjectSoundWorkspace:hover { + background-color: #83AF3D; +} + +.entryObjectPictureWorkspace { + .backgroundImage("icon_picture.png"); + background-color: #f26724; +} + +.entryObjectPictureWorkspace:hover { + background-color: #F3783C; +} + +.entryObjectCodeWorkspace { + .backgroundImage("icon_code.png"); + background-color: #00ace9; +} + +.entryObjectCodeWorkspace:hover { + background-color: #5FC8EE; +} + +.entryObjectTextWorkspace { + .backgroundImage("text_icon_white.png"); + background-color: #F3BB1D; + background-position: 50% 20%; + background-size: 75%; +} + +.entryObjectRotationWrapperWorkspace { + display: none; + width: 100%; + height: 59px; + padding: 0 0px 10px 10px; + border-top: 1px solid #e1e1e1; + background-color: #e5e5e5; +} + +.collapsed .entryObjectRotationWrapperWorkspace { + height: 90px; +} + +.selectedObject .entryObjectRotationWrapperWorkspace { + display: inline-block; +} + +.informationToggle>.entryObjectRotationWrapperWorkspace { + display: inline-block; +} + +.rotationMethodWrapper { + float: right; + width: 180px; + position: relative; +} + +.collapsed .rotationMethodWrapper { + float: left; + top: 39px; +} + +.entryObjectRotateMethodLabelWorkspace { + display: inline-block; + line-height: 20px; + font-size: 9pt; + color: #000000; + position: absolute; + padding-left: 20px; + padding-top: 20px; +} + +/*.entryObjectRotateLabelWorkspace { + display: block; + font-size: 9pt; + color: #000000; + left: 38px; + margin-top: 31px; +} +*/ +.entryObjectRotateLabelWrapperWorkspace { + position: absolute; + top: 90px; + margin-left: 37px; + font-size: 9pt; + color: #000000; +} + +.entryObjectRotateInputWorkspace, .entryObjectDirectionInputWorkspace { + width: 40px; + background-color: #e5e5e5; + border: none; + outline: none; + border: 1px solid transparent; + +} + +.entryObjectDirectionSpanWorkspace { + margin-left: 12px; +} + +.entryObjectRotateModeWorkspace { + cursor: pointer; + display: inline-block; + vertical-align: middle; + float: left; + margin-left: 8px; + margin-top: 18px; + width: 22px; + height: 22px; +} + +.propertyTabhelper { + .backgroundImage("property/helper_off.png"); +} + +.propertyTabhelper.selected { + .backgroundImage("property/helper_on.png"); +} + +.propertyTabContainer { + .backgroundImage("property/container_off.png"); +} +.propertyTabContainer.selected { + .backgroundImage("property/container_on.png"); +} +.entryObjectRotateModeAWorkspace { + margin-left: 80px; + .backgroundImage("layers_icon_rotate01_nor.png"); +} + +.entryObjectRotateModeAWorkspace.selected { + .backgroundImage("layers_icon_rotate01_sel.png"); +} + +.entryObjectRotateModeBWorkspace { + .backgroundImage("layers_icon_rotate02_nor.png"); +} + +.entryObjectRotateModeBWorkspace.selected { + .backgroundImage("layers_icon_rotate02_sel.png"); +} + +.entryObjectRotateModeCWorkspace { + .backgroundImage("layers_icon_rotate03_nor.png"); +} + +.entryObjectRotateModeCWorkspace.selected { + .backgroundImage("layers_icon_rotate03_sel.png"); +} + +.entryContainerTabViewWorkspace { + width: 100%; + height: 45px; + border-bottom: 2px solid #1bafea; +} + +.entryContainerTabItemWorkspace { + vertical-align: top; + height: 100%; + width: 25%; + text-align: center; + display: inline-block; + background-color: rgb(229, 229, 229); + color: rgb(158,159,159); + font-size: 13px; + cursor: pointer; + padding-top: 13px; +} + +.entryContainerTabItemWorkspace:nth-child(2) { + border-left: 2px solid white; + border-right: 2px solid white; +} + +.entryContainerTabItemWorkspace:nth-child(3) { + border-right: 2px solid white; +} + +.entryContainerTabItemWorkspace.selected { + background-color: #1bafea; + color: white; +} + +.entryContainerMovieWorkspace { +/* + position: absolute; + width: 100%; + top: 45px; + bottom: 0px; + + z-index: 1000; +*/ + position: absolute; + background-color: #363C46; + top: 0px; + width: 100%; + overflow: scroll; +} +.entryContainerMovieWorkspace::-webkit-scrollbar { + display: none; +} + +.entryContainerDoneWorkspace { + position: absolute; + width: 100%; + top: 0px; + background-color: #363C46; + overflow: hidden; + text-align: center; +} + + +.entryContainerHelperWorkspace { + position: absolute; + width: 100%; + top: 45px; + bottom: 0; + background-color: #fff; + z-index: 1000; + background: gray; +} diff --git a/src/css/components/context_menu.less b/src/css/components/context_menu.less new file mode 100644 index 0000000000..97a1c342db --- /dev/null +++ b/src/css/components/context_menu.less @@ -0,0 +1,54 @@ +#entry-contextmenu { + position: fixed; + background-color: white; + display: inline-block; + list-style: none; + padding: 4px 0; + border-color: #ccc #666 #666 #ccc; + border-style: solid; + border-width: 1px; + outline: none; + font-size: 13px; + z-index: 300; + .menuAble { + cursor: pointer; + padding: 3px 20px; + } + .menuAble:hover { + color: white; + background-color: #57e; + } + .menuDisable { + color: #ccc; + padding: 3px 20px; + } +} + +#entry-contextmenu.workspace-contextmenu { + position: fixed; + background-color: white; + display: inline-block; + list-style: none; + padding: 4px 0; + border-color: #ccc #666 #666 #ccc; + border-style: solid; + border-width: 1px; + outline: none; + font-size: 14px; + box-shadow: 0 6px 12px rgba(0,0,0,.175); + min-width: 160px; + border-radius: 4px; + background-clip: padding-box; + color: #262626; + .menuAble { + padding: 3px 20px; + } + .menuAble:hover { + color: white; + background-color: #57e; + } + .menuDisable { + color: #ccc; + padding: 3px 20px; + } +} diff --git a/src/css/components/engine.less b/src/css/components/engine.less new file mode 100644 index 0000000000..c19b361c2f --- /dev/null +++ b/src/css/components/engine.less @@ -0,0 +1,578 @@ +.entryEngineWorkspace { + height: 35px; + width: 480px; + background-color: white; + border-top: 1pt solid #ebeff1; +} + +.entryEngineMinimize { + height: 35px; + width: 100%; + background-color: white; + border-top: 1pt solid #ebeff1; +} + +.entryEngineWorkspace_w { + height: 225px; + width: 400px; + background-color: white; + border-top: 1pt solid #ebeff1; + position: absolute; +} + +.entryPopupWindow > .entryEngineWorkspace { + position: absolute; + top: auto !important; + width: 100% !important; + bottom: 0px; +} + +.entryPopupWindow > .entryEngineWorkspace_w { + position: absolute; + width: 100% !important; + top: 0px !important; +} + +.entryPopupWindow > .entryEngineWorkspace_w > .entryRunButtonWorkspace_w { + display: none; + top: 37%; + left: 46%; +} + +.entryPopupWindow > .entryEngineWorkspace_w > .entryRunButtonWorkspace_w2 { + display: block; + width: 111px; + height: 111px; + background-image: url("@{image_url}play_btn.png"); + background-position: 40px center; + background-color: rgba(0,0,0,0.5); + border-radius: 55px; + background-repeat: no-repeat; + right: 5px; + /*bottom: 5px;*/ + bottom: -10px; + left: 44%; + top : 35%; +} + +.entryPopupWindow > .entryEngineWorkspace_w > .entryStopButtonWorkspace_w2 { + display: block; + background-image: url("@{image_url}stop_btn.png"); + background-repeat: no-repeat; + left: 20px; + color: transparent; + bottom: -10px; + width: 90px; + background-position:left; + color: @bora; +} + +.entryPopupWindow > .entryEngineWorkspace_w > .entryStopButtonWorkspace_w { + display: none; +} + +.entryPopupWindow > .entryEngineWorkspace_w > .entryCoordinateButtonWorkspace_w { + background-image : url("@{image_url}grid.png") !important; + right: 34px; + color : @bora; +} + +.entryPopupWindow > .entryEngineWorkspace_w > .entryMaximizeButtonWorkspace_w { + background-image: url("@{image_url}zoom_out_btn.png"); + background-repeat: no-repeat; + right: 5px; +} + +.entryPopupWindow > .entryEngineWorkspace_w > .entryEngineButtonWorkspace_w { + position: absolute; + bottom: 1px; +} + +.entryPopupWindow > .entryEngineWorkspace_w > .entryAddButtonWorkspace_w { + display: none; +} + +.entryEngineBlueWorkspace { + background-color: #61abdb; +} + +.entryEngineButtonWorkspace { + border: none; + outline: none; + width: 25px; + height: 35px; + background-color: transparent; + background-repeat: no-repeat; + background-position: center; +} + +.entryEngineButtonMinimize { + border: none; + outline: none; + width: 25px; + height: 35px; + background-color: transparent; + background-repeat: no-repeat; + background-position: center; +} + +.entryEngineButtonWorkspace_w { + border: none; + outline: none; + width: 25px; + height: 24px; + background-color: transparent; + background-repeat: no-repeat; + background-position: center; +} + +.entryRunButtonPhone { + width: 100%; + height: 100%; + border: none; + background-color: transparent; + font-size: 12pt; + border-bottom: 2px solid #89c0d5; + .backgroundImage("layers_icon_button_play_nor.png"); + background-position: 10px 50%; + background-repeat: no-repeat; +} + +.entryStopButtonPhone { + width: 100%; + height: 100%; + border: none; + background-color: transparent; + font-size: 12pt; + border-bottom: 2px solid #89c0d5; + .backgroundImage("layers_icon_button_stop_nor.png"); + background-position: 10px 50%; + background-repeat: no-repeat; +} + +.entryRunButtonPhone.small { +} + +.entryEnginePhone { + width: 100%; +} + +.entryEngineHeaderPhone { + border-bottom: 1px solid #ccc; + width: 100%; + background-color: #fff; + height:34px; +} + +.entryEngineFooterPhone { + border-top: 1px solid #ccc; + width: 100%; + background-color: #fff; + height:38px; +} + +.entryMouseViewWorkspace { + position: relative; + font-size: 9pt; + margin: 0 auto; + width: 40%; + color: #61abdb; + line-height: 35px; + text-align: center; +} + +.entryMouseViewMinimize { + font-size: 9pt; + margin: 0 auto; + width: 40%; + color: @lightBora; + line-height: 35px; + text-align: center; +} + +.entryMouseViewWorkspace_w { + font-size: 9pt; + margin: 0 auto; + width: 40%; + color: #61abdb; + line-height: 24px; + text-align: center; +} + +.entryEngineBlueWorkspace > .entryMouseViewWorkspace { + color: white; +} + +.entryMaximizeButtonWorkspace { + float: left; + margin-left: 5px; + .backgroundImage("fullscreen_edit.png"); +} + +.entryMaximizeButtonMinimize { + float: right; + margin-right: 5px; + background-image: url("@{image_url}zoom_in_btn.png"); +} + +.entryPopupWindow > .entryEngineMinimize > .entryMaximizeButtonMinimize { + float: right; + margin-right: 5px; + background-image: url("@{image_url}zoom_out_btn.png"); +} + +.entryMaximizeButtonPhone { + width: 20px; + height: 100%; + border: none; + float: right; + margin-right: 9px; + background-repeat: no-repeat; + background-position: center; + background-color: transparent; + .backgroundImage("layers_icon_fullmode01_nor.png"); +} + +.entryMaximizeButtonWorkspace_w { + float: right; + margin-right: 5px; + .backgroundImage("layers_icon_fullmode01_nor_1.png"); + background-repeat: no-repeat; +} + +.entryEngineBlueWorkspace > .entryMaximizeButtonWorkspace { + .backgroundImage("fullscreen_play.png"); +} + +#entrySpeedPanelWorkspace { + width: 100%; + height: 0px; + background-color: #0e0; + +} + +.entrySpeedButtonWorkspace { + float: left; + background-size: contain; + width: 22px; + height: 15px; + margin-top: 5px; + margin-left: 10px; + .backgroundImage("speed_edit.png"); +} + +.entryPopupWindow > div > .entrySpeedButtonWorkspace { + display: none; +} + +.entryPopupWindow .entryMouseViewWorkspace_w { + font-size: 9pt; + margin: 0 auto; + width: 100%; + color: @bora; + line-height: 24px; + text-align: center; + bottom: 1px; + position: absolute; + text-align: center; +} + +#entrySpeedProgressWorkspace { + position: absolute; + display: block; + left: 80px; + top: 23px; + right: 4px; + height: 13px; +} + +#entrySpeedProgressWorkspace > tr { width: 100%; } + +#entrySpeedProgressWorkspace > tr > td { + position: absolute; + height: 14px; + width: 20%; + cursor: pointer; +} + +#progressCell0 { + border-top-left-radius: 6.5px; + border-bottom-left-radius: 6.5px; + left: 0%; background-color: #bee8f4; +} +#progressCell1 {left: 20%; background-color: #96cfe7; } +#progressCell2 {left: 40%; background-color: #83b8e1; } +#progressCell3 {left: 60%; background-color: #67a9c9; } +#progressCell4 { + border-top-right-radius: 6.5px; + border-bottom-right-radius: 6.5px; + left: 80%; background-color: #5099b5; +} + +#entrySpeedLabelWorkspace { + clear: both; + display: block; + font-family: ng; + padding-top: 2px; + padding-left: 10px; + font-size: 11px; +} + +#entrySpeedHandleWorkspace { + position: absolute !important; + cursor: pointer; + width: 18px; + height: 16px; + top: 21px; + z-index: 100; + .backgroundImage("speed_handle.png"); +} + +.entryCoordinateButtonWorkspace { + float: right; + .backgroundImage("coordinates_edit.png"); +} + +.entryCoordinateButtonMinimize { + float: right; + .backgroundImage("grid.png"); +} + +.entryCoordinateButtonWorkspace_w { + float: right; + .backgroundImage("layers_icon_grid_nor.png"); +} + +.entryCoordinateButtonWorkspace.toggleOn { + .backgroundImage("coordinates_edit_on.png"); +} + +.entryCoordinateButtonWorkspace_w.toggleOn { + .backgroundImage("layers_icon_grid_nor_1.png"); +} + +.entryEngineBlueWorkspace > .entryCoordinateButtonWorkspace { + .backgroundImage("coordinates_play.png"); +} + +.entryRunButtonWorkspace { + float: right; + width: 80px; + background-position: 7px 50%; + padding-right: 10px; + text-align: right; + font-size:9pt; + color: #61abdb; + .backgroundImage("playbutton_edit.png"); +} + +.entryRunButtonMinimize { + display: none; + float: left; + width: 65px; + font-size:9pt; + color: @lightBora; +} + +.entryAddButtonWorkspace_w { + top: 289px; + left: 0px; + width: 236px; + height: 38px; + font-size: 12pt; + background-color: #fff; + color: #666666; + text-align: center; + position: absolute; + border-top: 1px solid #ccc; + padding-left: 50px; + background-repeat: no-repeat; + background-position: 10% 43%; + font-family: nanumBarunBold !important; + .backgroundImage("layers_icon_button_plus_nor.png"); +} + +.collapsed>.entryAddButtonWorkspace_w { + color: transparent; + background-position: 50% 43%; +} + +.entryRunButtonWorkspace_w { + top: 289px; + left: 272px; + width: 156px; + height: 38px; + font-size: 12pt; + border-left: 1px solid #ccc; + border-top: 1px solid #ccc; + background-color: #fff; + padding-left: 28px; + color: #666666; + text-align: center; + position: absolute; + background-repeat: no-repeat; + background-position: 10% 43%; + font-family: nanumBarunBold !important; + .backgroundImage("layers_icon_button_play_nor_1.png"); +} + +.collapsed>.entryRunButtonWorkspace_w { + color: transparent; + background-position: 50% 43%; +} + +.entryRunButtonWorkspace_w2 { + display:none; +} + +.entryEngineBlueWorkspace > .entryRunButtonWorkspace { + .backgroundImage("playbutton_play.png"); + color: white; +} + +.entryStopButtonWorkspace { + float:right; + width: 80px; + background-position: 7px 50%; + border-top: 1px solid #ccc; + padding-right: 10px; + text-align: right; + font-size:9pt; + color: #61abdb; + .backgroundImage("stopbutton_pause.png"); +} + +.entryStopButtonMinimize { + float: left; + width: 80px; + background-position: 7px 50%; + padding-right: 10px; + text-align: right; + font-size:9pt; + color: @lightBora; + .backgroundImage("stop_btn.png"); +} + +.entryStopButtonWorkspace_w { + top: 289px; + left: 272px; + width: 156px; + height: 38px; + font-size: 12pt; + border-top: 1px solid #ccc; + border-left: 1px solid #ccc; + background-color: #fff; + color: #666666; + padding-left: 28px; + text-align: center; + position: absolute; + background-repeat: no-repeat; + background-position: 10% center; + font-weight: 600; + .backgroundImage("layers_icon_button_stop_nor_1.png"); +} + +.collapsed>.entryStopButtonWorkspace_w { + color: transparent; + background-position: 50% 43%; +} + +.entryStopButtonWorkspace_w2 { + display: none; +} + +.entryPauseButtonWorkspace_w { + display: none; +} + +.entryEngineBigButtonMinimize_popup { + border: none; + display: none; + margin: 0; + padding: 0; + position: absolute; + left: 50%; + width: 111px; + height: 111px; + margin-left: -55.5px; + top: 50%; + margin-top: -55.5px; + background-repeat: no-repeat; + background-position: 40px center; + background-color: rgba(0,0,0,0.5); + border-radius: 55px; +} + +.entryEngineBigButtonMinimize_popup:hover { + opacity: 0.8; +} + +.entryEngineBigButtonMinimize_popup:focus { + outline: none; +} + +.entryEngineBigButtonMinimize_popup.entryEngineBigButtonMinimize_popup_run { + .backgroundImage("play_btn.png"); +} + +.entryPopupWindow .entryEngineBigButtonMinimize_popup { + display: block; +} + +.entryPauseButtonWorkspace_w { + display: none; +} + +.entryPopupWindow .entryPauseButtonWorkspace_w { + display: inline-block; + background: url("@{image_url}pause_btn.png"); + background-repeat: no-repeat; + color: transparent; + width: 90px; + left: 103px; + color: @bora; + background-position: center left; +} + + +.nav_right_wrapper { + right: 0; +} + +.navbar-default { + background-color: #89c1e4; + border-color: #89c1e4; + /*background-color: #4accaa; + border-color: #4accaa;*/ +} + +#project_name.normal { + background-color: #89c1e4; + /*background-color: #4accaa;*/ +} + + +.btn-group > .btn { + background-color: transparent; + border-color: transparent; + /*background-color: #4accaa; + border-color: #4accaa;*/ +} + +.art_project_name { + background-color: white !important; +} + +.art_project_name:hover { + border: 1px solid #b4b4b4 !important; +} + +.entryPauseButtonMinimize { + float: left; + background-image: url("@{image_url}pause_btn.png"); + width: auto; + background-position: left; + padding-left: 17px; + color: #6c5af2; + font-size: 9pt; +} diff --git a/src/css/components/function.less b/src/css/components/function.less new file mode 100644 index 0000000000..7601c1e01b --- /dev/null +++ b/src/css/components/function.less @@ -0,0 +1,48 @@ +.entryFunctionEdit { + position: absolute; + width: 100%; + height: 100%; + background-color: rgba(180,180,180, 0.4) !important; + z-index: 50; +} + +.entryFunctionEdit { + position: absolute; + width: 100%; + height: 100%; + background-color: rgba(180,180,180, 0.4) !important; + z-index: 50; +} + +#entryFunctionBtnWrapper { + position: absolute; + z-index: 100; + bottom: 90px; + margin: 0 auto; + left: 50%; +} + +.entryFunctionBtn { + position: relative; + display: inline-block; + cursor: pointer; + border: solid 3px #888; + color: #666; + width: 55px; height: 55px; + border-radius: 27.5px; + text-align: center; + line-height: 48px; + left: -50%; +} + +.entryFunctionBtn:hover { + border: solid 3px #555; + color: #222; +} + +#entryFunctionCancel { +} + +#entryFunctionSave { + margin-right: 20px; +} diff --git a/src/css/components/global_svg.less b/src/css/components/global_svg.less new file mode 100644 index 0000000000..5c34388af9 --- /dev/null +++ b/src/css/components/global_svg.less @@ -0,0 +1,18 @@ +.globalSvgSurface { + position: fixed; + width: 100%; + height: 100%; + z-index: 1111; + top: 0; + left: 0; +} + +#globalSvg { + position: fixed; + width: 1px; + height: 1px; + overflow: visible; + z-index: 1111; + opacity: 0.8; + display: none; +} diff --git a/src/css/components/helper.less b/src/css/components/helper.less new file mode 100644 index 0000000000..26c8299f34 --- /dev/null +++ b/src/css/components/helper.less @@ -0,0 +1,298 @@ +/* helper */ +@keyframes blockHelperUp { + 0% {top: 100%;} + 100%{top: 0%;} +} + +@-o-keyframes blockHelperUp { + 0% {top: 100%;} + 100%{top: 0%;} +} + +@-ms-keyframes blockHelperUp { + 0% {top: 100%;} + 100%{top: 0%;} +} + +@-moz-keyframes blockHelperUp { + 0% {top: 100%;} + 100%{top: 0%;} +} + +@-webkit-keyframes blockHelperUp { + 0% {top: 100%;} + 100%{top: 0%;} +} + +@keyframes blockHelperDown { + 0% {top: 0%;} + 100%{top: 100%;} +} + +@-o-keyframes blockHelperDown { + 0% {top: 0%;} + 100%{top: 100%;} +} + +@-ms-keyframes blockHelperDown { + 0% {top: 0%;} + 100%{top: 100%;} +} + +@-moz-keyframes blockHelperDown { + 0% {top: 0%;} + 100%{top: 100%;} +} + +@-webkit-keyframes blockHelperDown { + 0% {top: 0%;} + 100%{top: 100%;} +} + +#entryBlockHelperWorkspace { + position: absolute; + bottom: 0; + width: 100%; + height: 100%; + background-color: #fff; + z-index: 1000; + /*.animation-name(blockHelperUp);*/ + /*.animation-duration(0.6s);*/ +} + +#entryBlockHelperWorkspace.lecture { + .animation-duration(0.0s); +} + +#entryBlockHelperWorkspace.dispose { + display: none; + /*.animation-name(blockHelperDown);*/ +} + +#entryBlockHelperHeaderWorkspace { + position: absolute; + width: 100%; + height: 40px; + background-color: #1bafea; + font-size: 16px; + line-height: 38px; + padding-left: 28px; + color: #fff; +} + +#entryBlockHelperDisposeWorkspace { + float: right; + .backgroundImage("block_helper_dispose.png"); + background-repeat: no-repeat; + background-position: center; + padding: 15px; + margin-top: 4px; + margin-right: 5px; +} + +#entryBlockHelperContentWorkspace { + position: absolute; + width: 100%; + top: 40px; + bottom: 0px; + overflow-y: auto; + overflow-x: hidden; +} + +#entryBlockHelperContentWorkspace.lecture { + top: 0px; +} + +.entryBlockHelperIntro { + .backgroundImage("block_help_icon.png"); + background-repeat: no-repeat; + background-position: center top; + margin-top: 28px; + padding-top: 100px; + text-align: center; + color: #707070; + font-size: 12px; +} + +#entryBlockHelpBtn { + position: absolute; + .backgroundImage("block_help.png"); + background-repeat: no-repeat; + background-position: center; + padding: 15px; + margin-top: 3px; + margin-left: 6px; + z-index: 100; +} + +#entryBlockHelperBlockWorkspace { + width: 400px; + height: 160px; + top: 16px; + overflow: hidden; +} + +#entryBlockHelperBlockWorkspace>.renderViewContainer { + width: 100%; +} + +#entryBlockHelperBlockWorkspace>.renderViewContainer > svg { + position: absolute; + overflow: visible; + left: 50%; +} + +#entryBlockHelperDescriptionWorkspace { + position: absolute; + line-height: 20px; + width: 100%; + top: 100px; + font-size: 13px; + color: #707074; + padding: 0 50px; +} + +/* helper */ +@keyframes blockHelperUp { + 0% {top: 100%;} + 100%{top: 0%;} +} + +@-o-keyframes blockHelperUp { + 0% {top: 100%;} + 100%{top: 0%;} +} + +@-ms-keyframes blockHelperUp { + 0% {top: 100%;} + 100%{top: 0%;} +} + +@-moz-keyframes blockHelperUp { + 0% {top: 100%;} + 100%{top: 0%;} +} + +@-webkit-keyframes blockHelperUp { + 0% {top: 100%;} + 100%{top: 0%;} +} + +@keyframes blockHelperDown { + 0% {top: 0%;} + 100%{top: 100%;} +} + +@-o-keyframes blockHelperDown { + 0% {top: 0%;} + 100%{top: 100%;} +} + +@-ms-keyframes blockHelperDown { + 0% {top: 0%;} + 100%{top: 100%;} +} + +@-moz-keyframes blockHelperDown { + 0% {top: 0%;} + 100%{top: 100%;} +} + +@-webkit-keyframes blockHelperDown { + 0% {top: 0%;} + 100%{top: 100%;} +} + +#entryBlockHelperWorkspace { + position: absolute; + bottom: 0; + width: 100%; + height: 100%; + background-color: #fff; + .animation-name(blockHelperUp); + .animation-duration(0.6s); +} + +#entryBlockHelperWorkspace.lecture { + .animation-duration(0.0s); +} + +#entryBlockHelperWorkspace.dispose { + .animation-name(blockHelperDown); +} + +#entryBlockHelperHeaderWorkspace { + position: absolute; + width: 100%; + height: 40px; + background-color: #1bafea; + font-size: 16px; + line-height: 38px; + padding-left: 28px; + color: #fff; +} + +#entryBlockHelperDisposeWorkspace { + float: right; + .backgroundImage("block_helper_dispose.png"); + background-repeat: no-repeat; + background-position: center; + padding: 15px; + margin-top: 4px; + margin-right: 5px; +} + +#entryBlockHelperContentWorkspace { + position: absolute; + width: 100%; + top: 40px; + bottom: 0px; + overflow-y: auto; + overflow-x: hidden; +} + +.entryBlockHelperIntro { + .backgroundImage("block_help_icon.png"); + background-repeat: no-repeat; + background-position: center top; + margin-top: 28px; + padding-top: 100px; + text-align: center; + color: #707070; + font-size: 12px; +} + +#entryBlockHelpBtn { + position: absolute; + .backgroundImage("block_help.png"); + background-repeat: no-repeat; + background-position: center; + padding: 15px; + margin-top: 3px; + margin-left: 6px; + z-index: 100; +} + +#entryBlockHelperBlockWorkspace { + position: absolute; + width: 100%; + bottom: 0px; + overflow-y: auto; + overflow-x: hidden; +} + +#entryBlockHelperBlockWorkspace>svg { + position: relative; left: -50%; +} + +#entryBlockHelperDescriptionWorkspace { + position: absolute; + line-height: 20px; + width: 100%; + top: 100px; + font-size: 13px; + color: #707074; + padding: 0 50px; + text-align: center; +} + diff --git a/src/css/components/object.less b/src/css/components/object.less new file mode 100644 index 0000000000..6b309e8428 --- /dev/null +++ b/src/css/components/object.less @@ -0,0 +1,432 @@ +.objectInfoView { + list-style: none; + padding: 0; + height: 59px; + width: 19px; + position: relative; + margin-left: 10px; + float: left; +} + +.objectInfo_visible { + display: inline-block; + position: absolute; + top: 10px; + left:0; + height: 18px; + width: 18px; + .backgroundImage("layers_icon_visible.png"); + border-bottom: 1px solid rgba(159,159,159,0.3); + cursor: pointer; + .box-sizing(border-box); +} + +.objectInfo_unvisible { + .backgroundImage("layers_icon_unvisible.png"); +} + +.objectInfo_unlock { + display: inline-block; + position: absolute; + top:33px; + left:0; + height: 18px; + width: 18px; + .backgroundImage("layers_icon_unlock.png"); + cursor: pointer; + .box-sizing(border-box); +} + +.objectInfo_lock { + .backgroundImage("layers_icon_lock.png"); +} + + +.entryObjectThumbnailWorkspace{ + float: left; + position: absolute; + height: 49px; + width: 49px; + top: 5px; + left: 41px; + border: 1px solid #bcc2c8; + background-color: #ccc; + background-size: contain; + background-repeat: no-repeat; + background-position: center; +} + +.entryObjectWrapperWorkspace{ + float: left; + position: relative; + top: 10px; + left: 72px; + width: 135px; + height: 43px; + overflow: hidden; +} + +.entryObjectNameWorkspace{ + float: left; + width: 112px; + top: 8px; + left: 20px; + position: absolute; + background-color: transparent; + border: none; + color: #000000; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + border: 1px solid transparent; +} +.editButtonToggle { + display :block; +} +.editButtonToggle_ { + display :none; +} + +.selectedEditingObject { + background-color: white !important; + border-radius: 3px; + border: 1px solid #878787 !important; + outline:none; + background-color: transparent; +} + +/*sj*/ + +.selectedObject .entryObjectNameWorkspace{ + color: #474747; +} + +.selectedObject>.entryObjectWrapperWorkspace>.entryObjectNameWorkspace{ + color: black; + font-family: nanumBarunRegular !important; +} + +.entryObjectNameWorkspace:focus{ + background-color: white; + color: black; +} + +.entryObjectNameWorkspace:disabled{ + background-color: transparent; +} +.entryObjectEditWorkspace { + float: left; + position: absolute; + width: 19px; + height: 19px; + right: 43px; + top: 22px; + cursor: pointer; + .backgroundImage("layers_icon_edit_nor_new.png"); + +} + +.entryObjectDeleteWorkspace { + float: left; + position: absolute; + width: 19px; + height: 19px; + right: 21px; + top: 22px; + cursor: pointer; + .backgroundImage("layers_icon_close_nor_new.png"); +} + +.entryObjectDeletePhone { + float: left; + position: absolute; + width: 16px; + height: 16px; + right: 57px; + top: 25px; + cursor: pointer; + .backgroundImage("layers_icon_close_nor.png"); +} + +.entryObjectEditPhone { + float: left; + position: absolute; + width: 24px; + background-repeat: no-repeat; + height: 21px; + right: 17px; + background-color: transparent; + border: none; + top: 21px; + cursor: pointer; + .backgroundImage("glyphicons_150_edit.png"); +} + +.entryObjectSelectedImgWorkspace { + float: left; + position: absolute; + width: 14px; + height: 26px; + right: 0; + top: 20px; + cursor: col-resize; + .backgroundImage("entry_scroll.png"); +} + +.selectedObject .entryObjectSelectedImgWorkspace { + float: left; + position: absolute; + width: 14px; + height: 26px; + right: 0; + top: 20px; + cursor: col-resize; + .backgroundImage("entry_scroll.png"); +} + +.entryObjectCoordinateWorkspace{ + float: left; + width: 100%; + position: relative; + font-size: 9pt; + color: #000000; + top: 12px; + left: 28px; + width: 150px; +} + +.selectedObject>.entryObjectWrapperWorkspace>.entryObjectCoordinateWorkspace{ + color: black; +} + +.entryObjectInformationWorkspace{ + position: absolute; + cursor: pointer; + margin: 12px 0 0 0; + width: 13px; + height: 13px; + .backgroundImage("layers_arrow_up_nor.png"); +} + +.selectedObject .entryObjectInformationWorkspace{ + .backgroundImage("layers_arrow_down_nor.png"); +} + +.informationToggle>.entryObjectWrapperWorkspace>.entryObjectInformationWorkspace{ + .backgroundImage("layers_arrow_down_nor_1.png"); +} + +.entryObjectButtonWorkspace { + display: none; + float: right; + position: relative; + width: 40px; + height: 40px; + background-color: #bcc3c9; + border-radius: 50%; + margin: 10px 10px 10px 5px; + background-position:center; + background-repeat: no-repeat; + background-position: 50% 35%; + color: white; + font-size: 7.5pt; + padding: 23px 0 0 0; + text-align: center; + outline: none; + border: none; +} + +.informationToggle>.entryObjectButtonWorkspace{ + display: none; +} + +.entryObjectSoundWorkspace { + .backgroundImage("icon_sound.png"); + background-color: #6a9a1f; +} + +.entryObjectSoundWorkspace:hover { + background-color: #83AF3D; +} + +.entryObjectPictureWorkspace { + .backgroundImage("icon_picture.png"); + background-color: #f26724; +} + +.entryObjectPictureWorkspace:hover { + background-color: #F3783C; +} + +.entryObjectCodeWorkspace { + .backgroundImage("icon_code.png"); + background-color: #00ace9; +} + +.entryObjectCodeWorkspace:hover { + background-color: #5FC8EE; +} + +.entryObjectTextWorkspace { + .backgroundImage("text_icon_white.png"); + background-color: #F3BB1D; + background-position: 50% 20%; + background-size: 75%; +} + +.entryObjectRotationWrapperWorkspace { + display: none; + width: 100%; + height: 59px; + padding: 0 0px 10px 10px; + border-top: 1px solid #e1e1e1; + background-color: #e5e5e5; +} + +.collapsed .entryObjectRotationWrapperWorkspace { + height: 90px; +} + +.selectedObject .entryObjectRotationWrapperWorkspace { + display: inline-block; +} + +.informationToggle>.entryObjectRotationWrapperWorkspace { + display: inline-block; +} + +.rotationMethodWrapper { + float: right; + width: 180px; + position: relative; +} + +.collapsed .rotationMethodWrapper { + float: left; + top: 39px; +} + +.entryObjectRotateMethodLabelWorkspace { + display: inline-block; + line-height: 20px; + font-size: 9pt; + color: #000000; + position: absolute; + padding-left: 20px; + padding-top: 20px; +} + +/*.entryObjectRotateLabelWorkspace { + display: block; + font-size: 9pt; + color: #000000; + left: 38px; + margin-top: 31px; +} +*/ +.entryObjectRotateLabelWrapperWorkspace { + position: absolute; + top: 90px; + margin-left: 37px; + font-size: 9pt; + color: #000000; +} + +.entryObjectRotateInputWorkspace, .entryObjectDirectionInputWorkspace { + width: 40px; + background-color: #e5e5e5; + border: none; + outline: none; + border: 1px solid transparent; + +} + +.entryObjectDirectionSpanWorkspace { + margin-left: 12px; +} + +.entryObjectRotateModeWorkspace { + cursor: pointer; + display: inline-block; + vertical-align: middle; + float: left; + margin-left: 8px; + margin-top: 18px; + width: 22px; + height: 22px; +} + +.entryObjectRotateModeAWorkspace { + margin-left: 80px; + .backgroundImage("layers_icon_rotate01_nor.png"); +} + +.entryObjectRotateModeAWorkspace.selected { + .backgroundImage("layers_icon_rotate01_sel.png"); +} + +.entryObjectRotateModeBWorkspace { + .backgroundImage("layers_icon_rotate02_nor.png"); +} + +.entryObjectRotateModeBWorkspace.selected { + .backgroundImage("layers_icon_rotate02_sel.png"); +} + +.entryObjectRotateModeCWorkspace { + .backgroundImage("layers_icon_rotate03_nor.png"); +} + +.entryObjectRotateModeCWorkspace.selected { + .backgroundImage("layers_icon_rotate03_sel.png"); +} + +.entryObjectCoordinateSpanWorkspace { + float: left; + position: absolute; +} + +.entryObjectCoordinateSpanWorkspace:nth-child(3) { + float: left; + margin-left: 57px; +} + +.entryObjectCoordinateSizeWorkspace { + float: left; + margin-left: 113px; + position: absolute; +} + +.entryObjectCoordinateInputWorkspace { + width: 40px; + height: 20px; + position: absolute; + float: left; + margin: -2px 5px 0px 15px; + background-color: #e5e5e5; + border: none; + border: 1px solid transparent; +} + +.entryObjectCoordinateInputWorkspace_right { + margin-left: 70px; +} + +.entryObjectCoordinateInputWorkspace_size { + float: left; + position: absolute; + margin-left: 145px; +} + +.entryObjectCoordinateInputWorkspace:disabled, +.entryObjectRotateInputWorkspace:disabled, +.entryObjectDirectionInputWorkspace:disabled{ + background-color: transparent; +} + +.entryObjectCoordinateInputWorkspace:focus, +.entryObjectRotateInputWorkspace:focus, +.entryObjectDirectionInputWorkspace:focus{ + background-color: transparent; +} + diff --git a/src/css/components/painter.less b/src/css/components/painter.less new file mode 100644 index 0000000000..773f49d8e7 --- /dev/null +++ b/src/css/components/painter.less @@ -0,0 +1,1138 @@ +/* Painter css start */ +.entryPlaygroundPainter { + position: absolute; + left: 240px; + top: 0; + bottom: 0; + right: 0; + overflow: hidden; + border-left: 2px solid #c4c4b9; + background-color: #fff; +} + +.entryPlaygroundPainterTop { + position: absolute; + display: block; + width: 100%; + + left:55px; + background-color: #634cd9; + height: 29px; +} + +.entryPlaygroundPainterTopMenu ul ul { + display: none; + margin-top: 5px; + margin-left: -8px; +} + +/*.entryPlaygroundPainterTopMenu ul ul { + background: #5f6975; + border-radius: 0px; + padding: 0; + position: absolute; + top: 100%; + width: 120px; +}*/ +.entryPlaygroundPainterTopMenu> li { + list-style-type: none; + top:100%; + width: 120px; +} + +/*.entryPlaygroundPainterTopMenu ul ul ul { + position: absolute; + color:black; + left: 100%; + top:0; +}*/ + +/*.entryPlaygroundPainterTopMenu ul ul li { + float: none; + border-top: 1px solid #6b727c; + border-bottom: 1px solid #575f6a; + position: relative; + cursor: pointer; + color:black; +}*/ + +.entryPlaygroundPainterTopMenu ul ul li a { + padding: 10px; + /*color: #fff;*/ + color:black; +} + +.entryPlaygroundPainterTopMenu ul ul li a:hover { + background: white; + color:black; +} +.entryPlaygroundPainterTopMenu li a:hover { + background: #4b545f; + color:white; + +} +.entryPlaygroundPainterTopMenu ul li:hover > ul { + display: block; +} +.entryPlaygroundPainterTopMenu ul li a:hover{ + background-color:#3b329e; +} + +.entryPlaygroundPainterTopMenu ul { + padding: 0; + border-radius: 0; + height: 50px; + list-style: none; + position: relative; + display: inline-table; + z-index: 100; +} + +.entryPlaygroundPainterTopMenu ul:after { + content: ""; + clear: both; + display: block; +} +.entryPlaygroundPainterTopMenuEdit:hover { + background-color: #3b329e; +} + +/*.entryPlaygroundPainterTopMenu ul li { + float: left; +}*/ + +/*.entryPlaygroundPainterTopMenu ul li:hover { + background: #4b545f; +}*/ +/*.entryPlaygroundPainterTopMenu ul li:hover { + background-color: #3b329e !important; + font:bold; +}*/ + +.entryPlaygroundPainterTopMenu ul li a { + display: block; + padding: 5px 10px; + color: white; + text-decoration: none; +} +#entryPainterTopMenuEdit>ul>li{ + border-bottom:solid 1px #643cd9; + border-left:solid 1px #643cd9; + border-right:solid 1px #643cd9; + background-color: white; + font-family: nanumBarunRegular !important; +} +#entryPainterTopMenuEdit>ul>li{ + background-color:white; + border-bottom:solid 1px #643cd9; +} +#entryPainterTopMenuEdit>ul>li>:hover{ + background-color:#643cd9; + color:white; +} +#entryPainterTopMenuEdit{ + color: white; +} + +#entryPainterTopMenuFile>ul>li{ + border-bottom:solid 1px #643cd9; + border-left:solid 1px #643cd9; + border-right:solid 1px #643cd9; + background-color: white; + font-family: nanumBarunRegular !important; +} +#entryPainterTopMenuFile>ul>li{ + background-color:white; + border-bottom:solid 1px #643cd9; +} +#entryPainterTopMenuFile>ul>li>:hover{ + background-color:#643cd9; + color:white; +} +#entryPainterTopMenuFile{ + color: white; +} + + +.entryPlaygroundPainterTopStageXY { + position:absolute; + width: 150px; + height: 30px; + top: 5px; + left: 280px; + font-size: 10pt; + color:white; +} + +.entryPlaygroundPainterTopToolbar { + position: absolute; + top: 0; + list-style-type: none; + margin: 0; + padding: 0; + right: 170px; + width: 100px; + height: 30px; +} +.entryPlaygroundPainterFlip { + width: 200px; +} +.entryPlaygroundPainterFlipY { + position: absolute; + top:90px; + left: 90px; + .backgroundImage("horizontal.png"); + background-repeat: no-repeat; + border-radius: 3px; + width: 28px; + height: 28px; +} +.entryPlaygroundPainterFlipX { + position: absolute; + top:90px; + left: 60px; + .backgroundImage("vertical.png"); + background-repeat: no-repeat; + border-radius: 3px; + width: 28px; + height: 28px; +} + +.entryPlaygroundPainterTopToolbar>li { + float: left; + position: relative; + left: 0; + margin: 2px 5px; + width: 35px; + height: 25px; + text-align: center; + line-height: 30px; + cursor: pointer; +} + +.entryPlaygroundPainterToolbox { + position: absolute; + height: 100%; + width: 54px; + + background-color: #f5f5f5; +} + +.entryPlaygroundPainterToolboxContainer li { + cursor: pointer; + top: 16px; +} + +.entryPlaygroundPainterToolboxSelected { + background-color: #ccc; +} + +.entryPlaygroundPainterContainer { + position: absolute; + top: 30px; + left: 56px; + background-color: transparent; + overflow: scroll; +} + +.entryPlaygroundPainterCanvas { + position: absolute; + top: 0; + left: 0; + width: 960px; + height: 540px; +} + +.entryPlaygroundPainterAttr { + position: absolute; + top:342px; + width: 100%; + height: 192px; + background-color: #f5f5f5; + padding-left: 6px; + left:54px; +} + +.entryPlaygroundPainterToolboxContainer { + list-style-type: none; + margin: 0; + padding: 0; +} + +.entryPlaygroundPainterToolboxContainer>li { + float: left; + position: relative; + left: 8px; + margin: 5px 5px; + width: 27px; + height: 27px; + background-color: #fff; + font-size: 9pt; + color: #000; + text-align: center; + line-height: 40px; + +} + +.entryPlaygroundPainterAttrResize{ + position: absolute; + top: 4px; + left: 5px; + padding: 4px; +} +.entryPlaygroundPainterAttrResize>legend { + background-color: transparent; + padding: 2px; + width: 30px; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; +} +.entryPlaygroundPainterAttrResize>span { + font-size: 9pt; + padding: 2px; + margin: 0; +} +.painterAttrRotateTop { + padding-left: 28px; + color: white; +} +.entryPlaygroundPainterAttrRotate { + position: absolute; + top:77px; + left: 10px; + width: 40px; + height: 40px; + background-color: #643cd9; + border-radius: 3px; +} +.entryPlaygroundPainterSizeText { + position: absolute; + left: 48px; + width:10px; + color:black; +} +.painterAttrRotateTop { + width: 40px; + height: 10px; +} +.entryPlaygroundPainterNumberInput { + width: 30px; + font-size: 9pt; + color:white; + padding-left:3px; + padding-right:3px; +} +.entryPlaygroundPainterAttrOpacity { + position: absolute; + top: 77px; + left: 65px; + border-radius: 3px; + background-color: #643cd9; +} +.entryPlaygroundPainterAttrOpacity>legend { + background-color: transparent; + padding: 2px; + width: 45px; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; +} +.entryPlaygroundPainterAttrOpacity>span { + font-size: 9pt; + padding: 2px; + margin: 0; +} +.entryPlaygroundPainterNumberInput { + width: 30px; + font-size: 9pt; +} +.entryPlaygroundPainterAttrColor { + position: absolute; + left: 210px; + top:20px; + width: 160px; + padding: 4px; +} +.entryPlaygroundPainterAttrColor>legend { + background-color: transparent; + padding: 2px; + width: 35px; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; +} +.entryPlaygroundPainterAttrColorElement { + float:left; + width: 15px; + height: 15px; +} + +.entryPlaygroundPainterAttrThick { + position: absolute; + top: 20px; + left: 2px; + background-color: #643cd9; + border-radius: 3px; +} +.entryPlaygroundPainterAttrThick > legend { + position:absolute; + top:-30pxpx; + background-color: transparent; + padding: 2px; + width: 60px; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; +} +.entryPlaygroundPainterAttrThickInput { + font-size: 9pt; +} +.entryPlaygroundPainterAttrRect { + position: absolute; + top: 40px; + left: 490px; + padding: 4px; + border: 1px solid #000; +} +.entryPlaygroundPainterAttrRect>legend { + background-color: transparent; + padding: 2px; + width: 60px; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; +} +.entryPlaygroundPainterAttrRectFilled { + width: 15px; + height: 15px; + background-color: #000; + border: 1px solid #000; + float: left; +} +.entryPlaygroundPainterAttrRectEmpty { + width: 15px; + height: 15px; + background-color: #fff; + border: 1px solid #000; + float: right; +} +.entryPlaygroundPainterAttrFont { + position: absolute; + left: 0px; + padding: 4px; + width: 100px; + height:40px; +} +.entryPlaygroundPainterAttrTop { + position: absolute; + top:20px; + width:93px; + height:40px; + border-radius: 3px; + color: white; + background-color: #643cd9; +} +.entryPlaygroundPaintAttrTop_ { + width: 93px; + height:10px; +} +.entryPlaygroundPainterAttrFont>legend { + background-color: transparent; + width: 60px; + margin-bottom: 0; + border-bottom: 0; + font-size: 9pt; +} + +.painterAttrFontSizeArea { + position: absolute; + top: 70px; + background-color: #643cd9; + width:44px; + height:40px; + color:white; + border-radius: 3px; +} +.painterAttrFontSizeTop { + width:40px; + height: 10px; +} +.entryPlaygroundPainterAttrFontName , .entryPlaygroundPainterAttrFontSize, .entryPlaygroundPainterAttrFontStyle{ + background: transparent; + border:0px; +} +.entryPlaygroundPainterAttrFontStyleArea { + position:absolute; + background-color: #643cd9 ; + top:120px; + width:67px; + height: 40px; + border-radius: 3px; + color:white; +} +.entryPlaygroundPainterAttrFontStyle option{ + color: black; +} +.entryPlaygroundPainterAttrFontSize option{ + color: black; +} +.entryPlaygroundPainterAttrFontName option{ + color:black; +} +.entryPlaygroundPainterAttrFontTop { + width:67px; + height: 10px; +} + +.entryPlaygroundPainterTopMenuFileNew { + position: absolute; + color:white; + left: 20px; + top:0px; + padding: 4px; + height:28px; + cursor: pointer; + list-style: none; + font-family: nanumBarunBold !important; +} +.entryPlaygroundPainterTopMenuFileSave { + position: absolute; + color:white; + padding-left:8px; + left: 95px; + top: 0px; + padding-top:4px; + height:28px; + width:70px; + cursor: pointer; + font-family: nanumBarunBold !important; +} +.entryPlaygroundPainterTopMenuFileSave:hover,.entryPlaygroundPainterTopMenuFileNew:hover { + background-color: #3b329e !important; +} + +.entryPlaygroundPainterTopMenuEdit { + position: absolute; + color:white; + padding-left:8px; + left: 158px; + height:28px; + width:55px; + cursor: pointer; + margin-top: -4px; + padding-top: 3px; + font-family: nanumBarunBold !important; +} +.entryPlaygroundPainterTopMenuEdit>li { + list-style-type: none; +} + +.entryPlaygroundPainterTopMenuFile:extend(.entryPlaygroundPainterTopMenuEdit) { + left: 100px; +} +.entryPlaygroundPainterTopMenuFile>li { + list-style-type: none; +} + + +.entryPlaygroundPainterToolboxPen { + .backgroundImage("off_pen.png"); + background-repeat: no-repeat; +} +.entryPlaygroundPainterToolboxPen:hover { + .backgroundImage("on_pen.png"); +} + +.entryPlaygroundPainterToolboxLine { + .backgroundImage("off_line.png"); +} +.entryPlaygroundPainterToolboxLine:hover { + .backgroundImage("on_line.png"); +} + +.entryPlaygroundPainterToolboxRect { + .backgroundImage("off_square.png"); +} +.entryPlaygroundPainterToolboxRect:hover { + .backgroundImage("on_square.png"); +} +.entryPlaygroundPainterToolboxCircle { + .backgroundImage("off_circle.png"); +} +.entryPlaygroundPainterToolboxCircle:hover { + .backgroundImage("on_circle.png"); +} + +.entryPlaygroundPainterToolboxCursor { + +} + +.entryPlaygroundPainterToolboxSelect { + +} +.entryPlaygroundPainterToolboxSelect:hover { + .backgroundImage("on_choice.png"); +} + +.entryPlaygroundPainterToolboxText { + .backgroundImage("off_text.png"); +} +.entryPlaygroundPainterToolboxText:hover { + .backgroundImage("on_text.png"); +} + +.entryPlaygroundPainterToolboxFill { + .backgroundImage("off_paint.png"); +} +.entryPlaygroundPainterToolboxFill:hover { + .backgroundImage("on_paint.png"); +} + +.entryPlaygroundPainterToolboxErase { + .backgroundImage("off_eraser.png"); +} +.entryPlaygroundPainterToolboxErase:hover { + .backgroundImage("on_eraser.png"); +} +.entryPlaygroundPainterToolboxSelect { + .backgroundImage("off_choice.png"); +} + +.entryPlaygroundPainterToolboxCoordinate { + .backgroundImage("off_center.png"); +} +.entryPlaygroundPainterToolboxCoordinate:hover { + .backgroundImage("on_center.png"); +} +.entryPlaygroundPainterToolboxGlasses { + .backgroundImage("off_zoom.png"); +} +.entryPlaygroundPainterToolboxGlasses:hover { + .backgroundImage("on_zoom.png"); +} +.entryPlaygroundPainterToolboxCursor { + .backgroundImage("off_hand.png"); +} +.entryPlaygroundPainterToolboxCursor:hover { + .backgroundImage("on_hand.png"); +} +.entryPlaygroundPainterAttrResizeX { + position:absolute; + top:17px; + background-color: transparent; + width:40px; + height:40px; + background-color: #643cd9; + border-radius: 3px 3px 3px 3px; +} +.entryPlaygroundPainterAttrResizeXTop { + width:40px; + height:10px; + border-radius: 3px 3px 0 0; + background-color: #643cd9; + padding: 0 0 0 3px ; + font-size:11px; + color: white; +} +.entryPlaygroundPainterAttrResizeXBottom { + width:40px; + height:10px; + border-radius: 0 0 3px 3px; + background-color: #aaa; +} +.entryPlaygroundPainterNumberInput{ + width:40px; + height:20px; + background-color: transparent; + border:0px; +} + +.entryPlaygroundPainterAttrResizeYTop { + width:40px; + height:10px; + border-radius: 3px 3px 0 0; + background-color: #643cd9; + padding: 0 0 0 3px ; + font-size:11px; + color: white; +} +.entryPlaygroundPainterAttrResizeYBottom { + width:40px; + height:10px; + border-radius: 0 0 3px 3px; + background-color: #643cd9; +} +.entryPlaygroundPainterAttrResize { + float: left; + width: 100px; +} +.entryPlaygroundAttrReiszeY { + position: absolute; + top:17px; + left:60px; + width:40px; + height:40px; + background-color: #643cd9; + border-radius: 3px; + +} +.entryPlaygroundPainterspace{ + position:absolute; + left:50px; + top:35px; + width:20px; +} +.entryPlaygroundPainterRotateArea{ + position:absolute; + top:90px; + left:19px; + width: 40px; + height:40px; + background-color: #643cd9; + border-radius: 3px; +} +.entryPlaygroundPainterRotateAreaTop{ + height: 10px; + width: 20px; +} +.entryPlaygroundPainterRotateArea_{ + height: 10px; + width: 40px; +} +.entryPlaygroundPainterNumberInput{ + height: 20px; +} + +.entryPlaygroundPainterAttrOpacity{ + width: 40px; + height: 40px; +} + +.entryPlaygroundPainterAttyOpacityTop { + width: 40px; + height: 10px; + color: white; + padding-left:25px; +} + +.entryPlaygroundPainterNumberInput { + width:40px; + height:20px; + +} + +.entryPlaygroundPainterRotateName { + position:absolute; + top:70px; + left:20px; +} + +.entryPlaygroundPainterOpacityName { + position:absolute; + top:70px; + left:80px; +} + +.paintAttrThickTop { + width: 40px; + height: 10px; +} + +.entryPlaygroundPainterAttrThickInput { + width: 45px; + height: 20px; + background-color: transparent; + border: 0px; + color: white; +} +.entryPlaygroundPainterAttrThickInput option { + color:black; + border: 1px solid; +} + +.entryPlaygroundPainterAttrThick { + width: 45px; + height: 40px; +} + +.painterAttrBackgroundName { + width: 45px; + height: 20px; + background-color: transparent; + color: black; + border:0px; + position: absolute; + top: 60px; + font-size: 9pt; +} + +.paintAttrBackgroundTop { + position: absolute; + top: 77px; + left: 2px; + background-color: #643cd9; + border-radius: 3px; + font-size: 11pt; +} + +.painterAttrShapeLineColor { + position: absolute; + top: 18px; + left: 154px; + width: 40px; + height: 40px; + background-color: #000; +} + +.painterAttrShapeBackgroundColor { + position: absolute; + top: -57px; + left: 140px; + width: 40px; + height: 40px; + background-color: #000; +} + +.entryPlaygroundPainterAttrFGButton { + .backgroundImage("square_on_in.png"); + background-repeat: no-repeat; + width: 42px; + height: 42px; + cursor: pointer; +} + +.painterAttrShapeInnerBackground { + width: 20px; + height: 20px; + background: #f5f5f5; + margin: 10px; + +} + +.entryPlaygroundPainterAttrBGButton { + .backgroundImage("square_off_out.png"); + background-repeat: no-repeat; + width: 42px; + height: 42px; + cursor: pointer; +} + +.painterAttrColorSpoid { + position: absolute; + top:150px; + left:330px; + width:27px; + height:27px; + background-repeat: no-repeat; + .backgroundImage("color_off_spoid.png"); +} + +.painterAttrColorSpoidClicked { + position: absolute; + top:150px; + left:330px; + width:27px; + height:27px; + background-repeat: no-repeat; + .backgroundImage("color_on_spoid.png"); +} + +.painterAttrColorTransparent { + position: absolute; + top:150px; + left:300px; + width:27px; + height:27px; + background-repeat: no-repeat; + .backgroundImage("color_off_spoid_1.png"); +} + +.painterAttrRotateName ,.painterAttrOpacityName { + position:absolute; + background-color: transparent; + margin-bottom: 0; + border-bottom: 0; + left: 2px; + padding:2px; + font-size:9pt; +} + +.painterAttrThickName { + position:absolute; + background-color: transparent; + margin-bottom: 0; + border-bottom: 0; + font-size:9pt; + padding-top: 2px ; +} +.painterAttrRotateName{ + top:60px; + left:9px; + width:30px; +} + +.painterAttrOpacityName{ + top:60px; + left:65px; + width:50px; +} +/* +.painterAttrThickName { + top:115px; + left:10px; +} +*/ +.painterAttrCircleArea{ + position: absolute; + left:150px; + top:20px; +} + +/*.painterInnerCircle { + width: 20px; + height: 20px; + background: #000000; + margin: 9px; +}*/ + +.painterAttrCircle { + width: 40px; + height: 40px; + top: 13px; + position: absolute; + left: 5px; + background-color: black; +} +.painterAttrCircleInput { + position:absolute; + top: 65px; + width: 50px; + height: 15px; + font-size: 5pt; +} + +.entryPlaygroundPainterAttrButtonGroup > div{ + position: absolute; + top: 70px; + width: 42px; + height: 42px; + background-color: #fff; +} + +.entryPlaygroundPainterAttrFGButton { + + left: 0px; +} +.entryPlaygroundPainterAttrBGButton { + left: 55px; +} + +.entryPlaygroundPainterAttrAddButton { + .backgroundImage("fill_in.png"); +} + +.entryPlaygroundPainterAttrRemoveButton { + .backgroundImage("fill_out.png"); +} +.painterAttrColorSpoid:hover { + .backgroundImage("color_on_spoid_1.png"); + background-repeat: no-repeat; +} + +.displayPaintArea { + display: none !important; + position: absolute !important; +} + +.displayOpacityArea { + position:absolute; + top:-56px; + left:0px; + +} +.displayThickArea { + position:absolute; + top:-112px; + width:50px; + left:0px; +} +.displayFontArea { + position:absolute; + top:0px; + left:0px; + font:9px; +} +.displayRotateArea{ + position:absolute; + top:-56px; + left:0px; +} +.entryPlaygroundPainterAttrLineStyle { + position: absolute; + top: 140px; + left: 230px; + background-repeat: no-repeat; +} +.entryPlaygroundPainterAttrLineStyle:hover { + background-repeat: no-repeat; +} +.entryPlaygroundPainterAttrLineStyleLine { + position: absolute; + top: 10px; + .backgroundImage("line1_category_off.png"); + background-repeat: no-repeat; + background-color: #f5f5f5; + width: 76px; + height: 24px; +} +.entryPlaygroundPainterAttrLineStyleLine:hover { + .backgroundImage("line1_category_on.png"); + background-repeat: no-repeat; +} + +.entryPlaygroundPainterAttrLineStyleDot1 { + position: absolute; + top: -9px; + left:1px; + .backgroundImage("line2_off.png"); + background-repeat: no-repeat; + background-color: #f5f5f5; + width: 75px; + height: 20px; +} +.entryPlaygroundPainterAttrLineStyleDot1:hover { + .backgroundImage("line2_on.png"); + background-repeat: no-repeat; +} + +.entryPlaygroundPainterAttrLineStyleDot2 { + position: absolute; + top: -29px; + left:1px; + .backgroundImage("line3_off.png"); + background-repeat: no-repeat; + background-color: #f5f5f5; + width: 75px; + height: 20px; +} +.entryPlaygroundPainterAttrLineStyleDot2:hover { + .backgroundImage("line3_on.png"); + background-repeat: no-repeat; +} +.entryPlaygroundPainterAttrLineStyleDot3 { + position: absolute; + top: -48px; + left:1px; + .backgroundImage("line4_off.png"); + background-repeat: no-repeat; + background-color: #f5f5f5; + width: 75px; + height: 19px; +} +.entryPlaygroundPainterAttrLineStyleDot3:hover { + .backgroundImage("line4_on.png"); + background-repeat: no-repeat; +} +.entryPlaygroundPainterAttrLineStyleLine1 { + position: absolute; + top: -67px; + left:1px; + .backgroundImage("line1_off.png"); + background-repeat: no-repeat; + background-color: #f5f5f5; + width: 75px; + height: 19px; + border-radius: 4px; +} +.entryPlaygroundPainterAttrLineStyleLine1:hover { + .backgroundImage("line1_on.png"); + background-repeat: no-repeat; +} +.painterAttrLineStyleBackgroundDot1, .painterAttrLineStyleBackgroundDot2, +.painterAttrLineStyleBackgroundDot3, .painterAttrLineStyleBackgroundLine { + position: absolute; + top: 10px; + background-repeat: no-repeat; + background-color: #f5f5f5; + width: 76px; + height: 21px; +} +.painterAttrLineStyleBackgroundDot1 { + .backgroundImage("line2_category_off.png"); +} +.painterAttrLineStyleBackgroundDot2 { + .backgroundImage("line3_category_off.png"); +} +.painterAttrLineStyleBackgroundDot3 { + .backgroundImage("line4_category_off.png"); +} +.painterAttrLineStyleBackgroundLine { + .backgroundImage("line1_category_off_1.png"); +} +.painterAttrLineStyleBackgroundDot1:hover { + .backgroundImage("line2_category_on.png"); + background-repeat: no-repeat; +} +.painterAttrLineStyleBackgroundDot2:hover { + .backgroundImage("line3_category_on.png"); + background-repeat: no-repeat; +} + +.painterAttrLineStyleBackgroundDot3:hover { + .backgroundImage("line4_category_on.png"); + background-repeat: no-repeat; +} +.painterAttrLineStyleBackgroundLine:hover { + .backgroundImage("line1_category_on_1.png"); + background-repeat: no-repeat; +} +.entryToolboxCursorClicked { + .backgroundImage("on_hand_1.png"); +} +.entryToolboxSelectClicked { + .backgroundImage("on_choice_1.png"); +} +.entryToolboxPenClicked { + .backgroundImage("on_pen_1.png"); +} +.entryToolboxLineClicked { + .backgroundImage("on_line_1.png"); +} +.entryToolboxRectClicked { + .backgroundImage("on_square_1.png"); +} +.entryToolBoxCircleClicked { + .backgroundImage("on_circle_1.png"); +} +.entryToolBoxTextClicked { + .backgroundImage("on_text_1.png"); +} +.entryToolBoxFillClicked { + .backgroundImage("on_paint_1.png"); +} +.entryToolBoxEraseClicked { + .backgroundImage("on_eraser_1.png"); +} +.dd { + cursor:url("@{image_url}cursor_eraser.cur"); +} + +.entryPlaygroundPainterTopMenuEdit>ul>li { + list-style-type: none; + width:120px; +} + +.entryPlaygroundPainterTopMenuFile>ul>li { + list-style-type: none; + width:120px; +} + +.entryPlaygroundPainterTopMenu>ul{ + position:absolute; + top:5px; +} +.entryPainterTopMenuEditImport { + height: 40px; +} + diff --git a/src/css/components/playground.less b/src/css/components/playground.less new file mode 100644 index 0000000000..2d587cdf89 --- /dev/null +++ b/src/css/components/playground.less @@ -0,0 +1,876 @@ +.entryPlayground_text_buttons { + display: inline-block; + list-style-type: none; + margin: 0; + padding: 0; +} + +.entryPlayground_text_buttons > li { + float: left; + width: 32px; + height: 32px; + margin-left: 2px; + cursor: pointer; +} + +.entryPlaygroundTextAlignLeft { + .backgroundImage("text_align_left_off.png"); +} +.entryPlaygroundTextAlignLeft.toggle { + .backgroundImage("text_align_left_on.png"); +} + +.entryPlaygroundTextAlignCenter { + .backgroundImage("text_align_center_off.png"); +} +.entryPlaygroundTextAlignCenter.toggle { + .backgroundImage("text_align_center_on.png"); +} + +.entryPlaygroundTextAlignRight { + .backgroundImage("text_align_right_off.png"); +} +.entryPlaygroundTextAlignRight.toggle { + .backgroundImage("text_align_right_on.png"); +} + +.entryPlayground_fgColorDiv { + position: absolute; + width: 15px; + height: 4px; + margin-top: -15px; + margin-left: 345px; +} + +.entryPlayground_bgColorDiv { + position: absolute; + width: 15px; + height: 4px; + margin-top: -15px; + margin-left: 379px; +} +.entryPlayground_textBox { + margin-top: 5px; + height: 33px; + width: 400px; +} +.entryPlayground_textArea { + margin-top: 5px; + height: 120px; + width: 400px; + resize: none; +} + +.entryPlaygroundFontSizeWrapper { + width: 400px; + height: 39px; +} + +.entryPlaygroundFontSizeLabel { + display: inline-block; + float: right; + font-size: 9px; + font-family: notoSansMedium; + color: #444; + line-height: 39px; +} + +.entryPlaygroundFontSizeSlider { + display: inline-block; + float: right; + width: 96px; + height: 3px; + margin: 18px 0px 18px 4px; + background-color: #cfcfcf; + border-radius: 1.5px; +} + +#entryTextColourTable { + margin-top: 12px; + cursor: pointer; + border-collapse: collapse; +} + + +.entryTd { + width: 22px; + height: 22px; +} + +.entryTdTransparent { + width: 20px; + height: 20px; + background-color: white; + background-image: -webkit-linear-gradient(135deg, transparent 11.5px, rgb(255,0,0) 13px, rgba(255,255,255,.5) 14.5px); + border: 1px solid; +} + +.entryPlaygroundPainterTopMenuEdit>ul>li { + list-style-type: none; + width:120px; +} + +.entryPlaygroundPainterTopMenuFile>ul>li { + list-style-type: none; + width:120px; +} + +.entryPlaygroundPainterTopMenu>ul{ + position:absolute; + top:5px; +} +.entryPainterTopMenuEditImport { + height: 40px; +} + +.entryPlaygroundSoundLength { + float: right; + position: relative; + top: 20px; + right: 10px; + font-size: 9pt; +} + +.entryPlaygroundDefaultWorkspace { + height: 100%; + background-color: #363C46; + color: white; +} + +.entryPlaygroundWorkspace { + position: absolute; + top: 40px; + bottom: 0px; + left: 400.5px; + right: 0px; + background-color: #F5F5F5; + overflow: hidden; +} + +.entryPlaygroundPhone { + width: 100%; + height: 500px; + background-color: #F5F5F5; +} + +.entryPlaygroundResizeWorkspace { + position: absolute; + top: 45%; + height: 28px; + width: 11px; + left: 272px; + cursor: ew-resize; + border: solid 1px #afafaf; + border-left: none; + z-index: 250; + .backgroundImage("entry_scroll_02.png"); +} + +.entryPlaygroundTabWorkspace { + position: absolute; + /*margin-top: 1px;*/ + top: 0; + height: 43px; + width: 100%; + background-color: #f1f1f1; +} + +.entryPlaygroundTabWorkspace.entryRemove { + display: block !important; +} + +.entryPlaygroundTabPhone { + width: 100%; + height: 43px; + position: relative; + background-color: #f1f1f1; +} + +.entryTabListWorkspace { + list-style: none; + height: 44px; + padding: 0; + margin: 1px 0 0 0; + border-bottom: 2px solid #643cd9; +} + +.entryTabListItemWorkspace { + float: left; + width: 59px; + height: 42px; + margin: 0 1px 0 1px; + cursor: pointer; + display:block; + padding: 10px 0 0 0; + text-align: center; + font-family: nanumBarunBold !important; + color: gray; + background-color: #e5e5e5; + border-top-right-radius: 7px; + border-top-left-radius: 7px; +} + +.entryTabSelected { + color: white; + background-color: #6e5ae6; +} + +.entryTabListItemWorkspace:hover { +} + +#entrySoundTab { + .animation-delay(0.1s); +} +#entryPictureTab.hideTab, #entryTextTab.hideTab{ + .animation-delay(0.2s); +} +#entrySoundTab.hideTab { + .animation-delay(0.1s); +} +#entryVariableTab.showTab { + .animation-delay(0.2s); +} + + +.hideTab { + .animation-duration(0.7s); + .animation-name(hideTab); + .animation-fill-mode(forwards); +} + +@keyframes hideTab { + from {} + to {margin-top: 44px;opacity:0} +} + +@-o-keyframes hideTab { + from {} + to {margin-top: 44px;opacity:0} +} + +@-ms-keyframes hideTab { + from {} + to {margin-top: 44px;opacity:0} +} + +@-moz-keyframes hideTab { + from {} + to {margin-top: 44px;opacity:0} +} + +@-webkit-keyframes hideTab { + from {} + to {margin-top: 44px;opacity:0} +} + +.showTab { + opacity: 0; + .animation-duration(0.7s); + .animation-name(showTab); + .animation-fill-mode(forwards); +} + +@keyframes showTab { + from {margin-top: 44px;opacity:0} + to {opacity: 1} +} + +@-o-keyframes showTab { + from {margin-top: 44px;opacity:0} + to {opacity: 1} +} + +@-ms-keyframes showTab { + from {margin-top: 44px;opacity:0} + to {opacity: 1} +} + +@-moz-keyframes showTab { + from {margin-top: 44px;opacity:0} + to {opacity: 1} +} + +@-webkit-keyframes showTab { + from {margin-top: 44px;opacity:0} + to {opacity: 1} +} + +.entryPlaygroundCurtainWorkspace { + position: absolute; + background-color: black; + color: white; + padding-top: 270px; + text-align: center; + font-size: 40px; + height: 100%; + top: 0; + left: 0; + right: 0; + bottom: 0; + opacity: 0.5; + z-index: 5000; + cursor: pointer; +} + +.entryPlaygroundCurtainPhone { + position: absolute; + background-color: rgba(0,0,0,0.8); + color: white; + padding-top: 100px; + text-align: center; + font-size: 17px; + height: 110%; + width: 100%; + opacity: 0.5; + z-index: 5000; + cursor: pointer; +} + + +.entryPlaygroundCodeWorkspace { + height: 100%; + background-color: #F5F5F5; +} + +.entryPlaygroundCodeWorkspace.entryRemove { + display: block !important; + visibility: hidden; +} + +.entryPlaygroundCodePhone { + position: relative; + height: 100%; + background-color: #F5F5F5; +} + +.entryPlaygroundCodePhone.entryRemove { + display: block !important; + visibility: hidden; +} + +.entryPlaygroundPictureWorkspace { + position: absolute; + top: 47px; + margin-left: 0; + height: 100%; + background-color: #ececec; +} + +.entryPlaygroundPicturePhone { + margin-left: 0; + height: 100%; + background-color: #ececec; +} + +.entryPlaygroundAddPicture { + position: absolute; + width: 240px; + height: 60px; + background-color: #e5e5e5; + cursor: pointer; + border-bottom: 1pt solid #ebeff1; +} + +.entryPlaygroundAddPicturePhone { + position: relative; + padding: 0; + margin: 0; + height: 50px; + cursor: pointer; + border-bottom: 1pt solid #ebeff1; +} + +.entryPlaygroundAddPictureInner { + display: block; + width: 141px; + height: 30px; + background-color: #eeeeee; + color: black; + text-align: center; + font-size: 11px; + line-height: 28px; + border: 1px solid #cccccc; + border-radius: 7px; + margin-top: 15px; + margin-left: 49.5px; +} + +.entryPlaygroundAddPictureInnerPhone { + display: block; + height: 50px; + background-color: #CDCFC9; + color: #656565; + text-align: center; + font-size: 10.5pt; + line-height: 36px; + border: 2px dashed #737373; + width: 240px; + padding: 8px 10px 12px 10px; +} + +.entryPlaygroundPictureList { + position: absolute; + padding: 0px; + margin: 0px; + width: 240px; + top: 60px; + margin-bottom: 47px; + bottom: 0px; + overflow: auto; + list-style: none; + background-color: #Cfcfcf; +} + +.entryPlaygroundPictureListPhone { + position: relative; + padding: 0px; + margin: 0px; + width: 240px; + bottom: 0px; + overflow: auto; + list-style: none; + background-color: #Cfcfcf; +} + +.entryPlaygroundPictureElement { + display: block; + background-color: #f4f4f4; + border-bottom: 1pt solid #ebeff1; + height: 60px; + color: #294117; + cursor: pointer; +} + +.entryPlaygroundPictureElement:hover { + background-color: #C0C0C0; + cursor: move; +} + + +.entryPlaygroundPictureOrder, +.entryPlaygroundSoundOrder { + width: 15px; + height: 100%; + float: left; + line-height: 57px; + font-size: 10px; + text-align: center; + background-color: #d8d8d8; +} + +.entryPlaygroundPictureElement:hover .entryPlaygroundPictureOrder, +.entryPlaygroundSoundElement:hover .entryPlaygroundSoundOrder { + background-color: #634cd9; + color: white; +} + +.entryPictureSelected { + background-color: #c1c1c1; +} + +.entryPlaygroundPictureThumbnail { + float: left; + position: relative; + height: 49px; + width: 49px; + top: 5px; + left: 10px; + border: 1px solid #bcc2c8; + background-color: #ccc; + background-size: contain; + background-repeat: no-repeat; + background-position: center; +} + +.entryPlaygroundPictureName { + float: left; + position: relative; + top: 17px; + left: 17px; + width: 78px; + background-color: transparent; + font-size: 10pt; + text-overflow: ellipsis; + color: #294117; + cursor: text; + border: 1px solid transparent; +} + +.entryPlaygroundPictureName:focus, .entryPlaygroundSoundName:focus { + border: 1px solid gray; + background-color: white; +} + +.entryPlaygroundPictureName:hover, .entryPlaygroundSoundName:hover { + border: 1px solid gray; +} + +.entryPlaygroundPictureSize { + float: right; + position: relative; + top: 21px; + right: 10px; + font-size: 8pt; +} + +.entryPlaygroundTextWorkspace { + position: absolute; + top: 45px; + height: 100%; + width: 100%; + background-color: #ececec; + padding-left: 20px; + padding-top: 20px; +} + +.entryTextHead { + font-size: 18px; +} + +.entryTextEdit { + font-size: 17px; + width: 220px; + height: 30px; + border: 1px solid #808080; + border-radius: 3px; +} + +#entryTextProperty { + width: 220px; + height: 32px; + margin-top: 12px; +} + +.entryTextFontSelect { + display: inline-block; + width: 96px; + height: 32px; + border: 1px solid #808080; + border-radius: 4px; + background-color: white; + float: left; +} + +.entryTextFontSelecter { + margin-top: 5px; + margin-left: 2px; +} + +.entryFontToggle { + display: inline-block; + width: 96px; + width: 32px; + height: 32px; + float: right; +} + +#entryFontColorToggle { + .backgroundImage("text_in_off.png"); +} + +#entryFontColorToggle.selected { + .backgroundImage("text_in_on.png"); +} + +#entryFontBGToggle { + margin-left: 6px; + .backgroundImage("text_out_off.png"); +} + +#entryFontBGToggle.selected { + .backgroundImage("text_out_on.png"); +} + +.entryPlaygroundSoundWorkspace { + position: absolute; + top: 47px; + margin-left: 0; + height: 100%; + background-color: #ececec; +} + +.entryPlaygroundAddSound { + position: absolute; + height: 60px; + width: 240px; + background-color: #e5e5e5; + cursor: pointer; + border-bottom: 1pt solid #ebeff1; +} + +.entryPlaygroundAddSoundPhone { + position: relative; + height: 50px; + cursor: pointer; + border-bottom: 1pt solid #ebeff1; +} + +.entryPlaygroundAddSoundInner { + display: block; + width: 141px; + height: 30px; + background-color: #eeeeee; + color: black; + text-align: center; + font-size: 11px; + line-height: 28px; + border: 1px solid #cccccc; + border-radius: 7px; + margin-top: 15px; + margin-left: 49.5px; +} + +.entryPlaygroundAddSoundInnerPhone { + display: block; + height: 40px; + background-color: #CDCFC9; + color: #656565; + text-align: center; + font-size: 10.5pt; + line-height: 36px; + margin: 10px; + border: 2px dashed #737373; + width: 220px; +} + +.entryPlaygroundSoundList { + position: absolute; + padding: 0px; + margin: 0px; + width: 240px; + top: 60px; + margin-bottom: 47px; + bottom: 0px; + overflow: auto; + list-style: none; + background-color: #cfcfcf; +} + +.entryPlaygroundSoundListPhone { + position: relative; + padding: 0px; + margin: 0px; + width: 240px; + bottom: 0px; + overflow: auto; + list-style: none; + background-color: #cfcfcf; +} + +.entryPlaygroundSoundElement { + display: block; + background-color: #f4f4f4; + border-bottom: 1pt solid #ebeff1; + height: 60px; + color: #294117; + cursor: pointer; +} + +.entryPlaygroundSoundElement:hover { + background-color: #c1c1c1; + cursor: move; +} + +.entryPlaygroundSoundThumbnail { + float: left; + position: relative; + height: 49px; + width: 49px; + top: 5px; + left: 10px; + border: 1px solid #bcc2c8; + background-color: #ccc; + background-size: 32px 32px; + background-repeat: no-repeat; + background-position: center; + cursor: pointer; +} + +.entryPlaygroundSoundThumbnail.entryPlaygroundSoundPlay { + .backgroundImage("workspace_sound_play.png"); +} + +.entryPlaygroundSoundThumbnail.entryPlaygroundSoundStop { + .backgroundImage("workspace_sound_stop.png"); +} + +.entryPlaygroundSoundName { + float: left; + position: relative; + top: 18px; + left: 17px; + width: 95px; + background-color: transparent; + font-size: 10pt; + border: 1px solid transparent; + text-overflow: ellipsis; + color: #294117; +} + +.entryPlayground_text_buttons { + display: inline-block; + list-style-type: none; + margin: 0; + padding: 0; +} + +.entryPlayground_text_buttons > li { + float: left; + width: 32px; + height: 32px; + margin-left: 2px; + cursor: pointer; +} + +.entryPlaygroundTextAlignLeft { + .backgroundImage("text_align_left_off.png"); +} +.entryPlaygroundTextAlignLeft.toggle { + .backgroundImage("text_align_left_on.png"); +} + +.entryPlaygroundTextAlignCenter { + .backgroundImage("text_align_center_off.png"); +} +.entryPlaygroundTextAlignCenter.toggle { + .backgroundImage("text_align_center_on.png"); +} + +.entryPlaygroundTextAlignRight { + .backgroundImage("text_align_right_off.png"); +} +.entryPlaygroundTextAlignRight.toggle { + .backgroundImage("text_align_right_on.png"); +} + +.entryPlayground_fgColorDiv { + position: absolute; + width: 15px; + height: 4px; + margin-top: -15px; + margin-left: 345px; +} + +.entryPlayground_bgColorDiv { + position: absolute; + width: 15px; + height: 4px; + margin-top: -15px; + margin-left: 379px; +} +.entryPlayground_textBox { + margin-top: 5px; + height: 33px; + width: 400px; +} +.entryPlayground_textArea { + margin-top: 5px; + height: 120px; + width: 400px; + resize: none; +} + +.entryPlaygroundFontSizeWrapper { + width: 400px; + height: 39px; +} + +.entryPlaygroundFontSizeLabel { + display: inline-block; + float: right; + font-size: 9px; + font-family: notoSansMedium; + color: #444; + line-height: 39px; +} + +.entryPlaygroundFontSizeSlider { + display: inline-block; + float: right; + width: 96px; + height: 3px; + margin: 18px 0px 18px 4px; + background-color: #cfcfcf; + border-radius: 1.5px; +} + +.entryPlaygroundFontSizeIndicator { + height: 100%; + width: 45%; + background-color: #643cd9; +} + +.entryPlaygroundFontSizeKnob { + width: 16px; height: 16px; + position: relative; + margin-top: -10px; + margin-left: -7px; + .backgroundImage("text_size_knob.png"); + cursor: pointer; +} + +.entryPlaygroundTextColoursWrapper { + width : 260px; + height: 226px; + z-index: 10; + cursor: pointer; + margin-top: -5px; + margin-left: 335px; + padding: 20px 5px; + position: absolute; + .backgroundImage("text_color_bg.png"); + background-repeat: no-repeat; + background-size: 260px 226px; +} +.entryPlaygroundTextBackgroundsWrapper { + width : 260px; + height: 226px; + z-index: 10; + cursor: pointer; + margin-top: -5px; + margin-left: 369px; + padding: 20px 5px; + position: absolute; + .backgroundImage("text_color_bg_1.png"); + background-repeat: no-repeat; + background-size: 260px 226px; +} + + +.entryPlaygroundLinebreakWrapper { + position: fixed; + top: 351px; +} + +.entryPlaygroundLinebreakButtons { + display: inline; + font-size:0; + img { + cursor: pointer; + } +} + +.entryPlaygroundLinebreakHorizontal { + display: block; + border-top: 1px solid #808080; + margin: 0 0 12px 0; + padding: 0; + width: 260px; +} + +.entryPlaygroundLinebreakDescription { + margin-top: 12px; + p { + color: #8888; + font-size: 11px; + margin-bottom: 5px; + } + + ul { + padding-left: 20px; + li { + color: #B4B4B5; + font-size: 11px; + } + } +} diff --git a/src/css/components/popup.less b/src/css/components/popup.less new file mode 100644 index 0000000000..e75be5b811 --- /dev/null +++ b/src/css/components/popup.less @@ -0,0 +1,77 @@ +.entryPopup { + overflow: hidden; + position: absolute; + margin: 0; + padding: 0; + top: 0; + left: 0; + height: 100%; + width: 100%; + z-index: 7000; + background-color: rgba(0, 0, 0, 0.2); +} + +.entryPopup.popupHelper { + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} + +.entryPopupWindow { + width: 80%; + height: 80%; + position: absolute; + left: 0; right: 0; + top: 0; bottom: 0; + margin: auto; + max-width: 100%; + max-height: 100%; + /*overflow: hidden;*/ + z-index: 8000; + background-color: @white; +} + +.entryPopup.hiddenPopup { + display: none; +} + +.entryPopupHelperTopSpan, +.entryPopupHelperBottomSpan { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -ms-flex: 1; + flex: 1; +} + +.entryPopupHelperMiddleSpan { + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-direction: normal; + -moz-box-direction: normal; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + + .entryPopupHelperLeftSpan, + .entryPopupHelperRightSpan { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -ms-flex: 1; + flex: 1; + } +} + diff --git a/src/css/components/scene.less b/src/css/components/scene.less new file mode 100644 index 0000000000..bdca27335c --- /dev/null +++ b/src/css/components/scene.less @@ -0,0 +1,161 @@ +.entrySceneWorkspace { + height: 40px; + width: 100%; + background-color: @blueHaneul; + position: fixed; + overflow: hidden; +} + +.entrySceneListWorkspace { + margin: 0px; + padding: 0px 5px 0px 55px; +} +.entrySceneElementWorkspace { + float: left; + display: inline-block; + list-style-type: none; + color: white; + font-size: 10pt; + cursor: move; + border-radius: 20px; + margin-left: -40px; + position: relative; + margin-right: -2px; +} + +.entrySceneElementWorkspace.selectedScene { + z-index: 888; +} + +.entrySceneAddButtonWorkspace:hover { + background-color: #A3CAF5; +} +.entrySceneAddButtonWorkspace{ + float: left; + margin-left: -23px; + margin-top: 8px; + width: 23px; + height: 23px; + position: relative; + z-index: 999; + cursor: pointer; + .backgroundImage("top_icon_add_b_nor.png"); +} + +.selectedScene .entrySceneLeftWorkspace { + .backgroundImage("top_tab_b_sel_left.png"); +} + +.entrySceneLeftWorkspace { + display: inline-block; + float: left; + width: 15px; + height: 40px; + .backgroundImage("top_tab_b_nor_left_blue.png"); +} + +.entrySceneInputCover { + margin-left: -1px; + display: inline-block; + float: left; + height: 40px; + width: 76px; + padding-top: 11px; + padding-right: 2px; + background-color: #0e68e3; +} + +.minValue .entrySceneInputCover { + min-width: 70px; +} + +.entrySceneFieldWorkspace { + cursor: text !important; + display: inline-block; + margin: 0px; + height: 20px; + width: 100%; + color: white; + border: 1px solid transparent; + background-color: #0e68e3; + padding: 0px 0px 0px 5px; +} + +.entrySceneFieldWorkspace:focus { + background-color: #eee; + color: #000; +} + +.selectedScene .entrySceneInputCover { + background-color: white; + min-width: 70px; +} + +.selectedScene .entrySceneFieldWorkspace { + background-color: white; + color: black; +} + +.entrySceneFieldWorkspace:hover, +.entrySceneFieldWorkspace:focus, +.entrySceneFieldWorkspace:active { + outline: none; + border: 1px solid gray; +} + +.entrySceneRemoveButtonCoverWorkspace { + border: 0; + padding: 0; + width: 55px; + background-color: transparent; + display: inline-block; + float: left; + height: 40px; + position: relative; + .backgroundImage("top_tab_b_nor_right_blue.png"); +} + +.selectedScene .entrySceneRemoveButtonCoverWorkspace { + display: inline-block; + background: url("@{image_url}top_tab_b_sel_right.png"); +} + +.entrySceneRemoveButtonWorkspace { + border: 0; + padding: 0; + width: 12px; + background-color: #0e68e3; + height: 14px; + position: absolute; + right: 45px; + top: 12px; + display: none; +} + +.selectedScene .entrySceneRemoveButtonWorkspace { + background-color: white; + color: black; +} + +.minValue .entrySceneRemoveButtonWorkspace { + display: inline-block; +} + +.entrySceneRemoveButtonWorkspace:hover { + color: #FF3E24; +} + + +.entrySceneDummyView { + width: 55px; + height: 40px; + background-color: orange; + display: inline-block; + opacity: 0.3; + position: absolute; + left: 0; + top: 0; + z-index: 889; + left: 100px; +} + diff --git a/src/css/components/stage.less b/src/css/components/stage.less new file mode 100644 index 0000000000..28a36e241a --- /dev/null +++ b/src/css/components/stage.less @@ -0,0 +1,48 @@ +.entryCanvasWrapper { + position: absolute; +} + +.entryCanvasWorkspace { + width: 480px; + height: 270px; + background-color: white; + display: block; + position: absolute; + top: 24px; +} + +.entryPopupWindow .entryCanvasWorkspace { + top: -11px !important; +} + + +.entryCanvasPhone { + width: 100%; + background-color: white; + display: block; +} + +.entryPopupWindow > .entryCanvasWorkspace { + width: 100% !important; + height: 100% !important; + position: relative; + border-bottom: 1px solid #ccc; + border-top: 0px; +} + +.entryPopupWindow > .entryEngine_w { + width: 100% !important; + height: 100% !important; +} + +.entryEngine_w > .entryCanvasWorkspace { + border-top: 1px solid #ccc; +} + +.entryPopupWindow> div > .entryCanvasWorkspace { + bottom: 24px; + border-bottom: 1px solid #ccc; + width: 100% !important; + height: 100% !important; + top: -25px !important; +} diff --git a/src/css/components/state_manager.less b/src/css/components/state_manager.less new file mode 100644 index 0000000000..5fc1cfeb7a --- /dev/null +++ b/src/css/components/state_manager.less @@ -0,0 +1,39 @@ +.entryStateManagerWorkspace { + float: right; + height: 40px; + margin-right: 10px; +} + +.entryStateManagerButtonWorkspace { + border:0; + margin: 3px; + padding-left: 26px; + height: 32px; + border-radius: 4px; + background-color: #BDC4C9; + color: #E2EBFA; + font-size: 10pt; + background-repeat: no-repeat; + background-position: 7px 8px; + border-bottom: 2pt solid #A0ACB2; + border-right: 2pt solid #A0ACB2; +} + +.entryStateManagerButtonWorkspace.active:hover { + background-color: #7CC2EE; +} + +.entryStateManagerButtonWorkspace.active { + background-color: #6AAFDA; + border-bottom: 2pt solid #639FBD; + border-right: 2pt solid #639FBD; +} + +.entryUndoButtonWorkspace { + background-image: url("/img/assets/undo.png"); +} + +.entryRedoButtonWorkspace { + background-image: url("/img/assets/redo.png"); +} + diff --git a/src/css/components/toast.less b/src/css/components/toast.less new file mode 100644 index 0000000000..683be4c5dc --- /dev/null +++ b/src/css/components/toast.less @@ -0,0 +1,54 @@ +.entryToastContainer { + position: fixed; + right: 0px; + bottom: 0px; + margin: 0px; + padding: 10px; + width: 300px; + max-height: 100%; + overflow: auto; + z-index: 9000; +} + +.entryToast { + padding: 7px 16px; + margin-top: 8px; + width: 100%; + background-color: #eee; + box-shadow: #999 0 0 8px; + border: 2px solid; + .border-radius(4px); + .transition(opacity .25s ease-in-out); + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + cursor: pointer; + opacity: 1; +} + +.entryToastSuccess { + border-color: #d6e9c6; + background-color: #e5f3df; + color: #468847; +} + +.entryToastWarning { + border-color: #7e719; + background-color: #fff9ab; + color: #e07000; +} + +.entryToastAlert { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} + +.entryToastTitle { + font-size: 12pt; + font-weight: bold; +} + +.entryToastMessage { + font-size: 9pt; + margin-top: 4px; + margin-bottom: 2px; +} diff --git a/src/css/components/variable_container.less b/src/css/components/variable_container.less new file mode 100644 index 0000000000..e3f1fa3ade --- /dev/null +++ b/src/css/components/variable_container.less @@ -0,0 +1,587 @@ +.entryVariablePanelWorkspace { + position: absolute; + width: 250px; + top: 47px; + bottom: 0px; + padding: 6px 4px 0px 4px; +} + +.entryVariablePanelPhone { + width: 250px; + top: 47px; + bottom: 0px; + padding: 6px 4px 0px 4px; +} + +.entryVariableSelectorWorkspace { + width: 100%; + border-collapse: separate; + border-spacing: 0; +} + +.entryVariableSelectButtonWorkspace { + font-family: nanumBarunBold !important; + width: 25%; + border-collapse: collapse; + text-align: center; + vertical-align: center; + background-color: #EDEDED; + height: 38px; + border: solid 1px #bdbdbd; + border-left: none; + color: #535353; + padding-top: 4px; + cursor: pointer; +} + +.entryVariableSelectButtonWorkspace.selected { + color: #ffffff; + background-color: #0e68e3; +} + +.entryVariableSelectButtonWorkspace.allButton { + border-radius: 6px 0 0 6px; + border-left: solid 1px #bdbdbd; +} + +.entryVariableSelectButtonWorkspace.message { + border-radius: 0 6px 0px 0; +} + +.entryVariableSelectButtonWorkspace.list { + border-top: none; +} + +.entryVariableSelectButtonWorkspace.func { + border-top: none; + border-radius: 0 0px 6px 0; +} + +.entryVariableSelectButtonWorkspace.disable { + color: #bdbdbd; + cursor: default; +} + +.entryVariableListWorkspace { + position: absolute; + top: 88px; + bottom: 0px; + right: 4px; + left: 4px; + padding: 0; + margin: 0; + list-style: none; + overflow: auto; +} + +.entryVariableListElementWorkspace { + background-repeat: no-repeat; + background-position: 14px 10px; + background-color: #efefef; + border: solid 1px #a8a8a8; + margin-bottom: -1px; + min-height: 50px; +} + +.entryVariableAddWorkspace { + padding: 0; + font-size: 13pt; + color: #717171; + cursor: pointer; + line-height: 49px; + position: relative; + text-align: center; +} + +.entryVariableAddWorkspace:hover { + background-color: #d3d3d3; + color: #333; +} + +.entryVariableListElementWorkspace.selected { + background-color: #d3d3d3; +} + +.entryVariableListElementNameWorkspace { + position: absolute; + left: 47px; + margin-top: 12px; + background-color: #efefef; + width: 55%; + border: 1px solid transparent; + padding-left: 5px; +} +.selected .entryVariableListElementNameWorkspace { + background-color: #d3d3d3; +} + +.entryVariableListElementNameWorkspace:focus { + background-color: white; + border: 1px solid gray; +} + +.entryVariableFunctionElementNameWorkspace { + border: none; + position: absolute; + left: 55px; + margin-top: 12px; + background-color: transparent; + width: 60%; + overflow: hidden; + height: 20px; + text-overflow: ellipsis; + white-space: nowrap; +} + +.entryVariableListElementDeleteWorkspace { + position: absolute; + margin-top: 5px; + padding-right: 5px; + right: 3px; + border: 0; + outline: 0; + width: 22px; + height: 40px; + opacity: 0; + background-color: transparent; + .backgroundImage("layers_icon_close_nor_new_1.png"); + background-repeat: no-repeat; + background-position: center; +} + +.entryVariableListElementWorkspace:hover +.entryVariableListElementDeleteWorkspace { + opacity: 1; +} + +.entryVariableListElementEditWorkspace { + display: inline-block; + float: right; + border: 0; + outline: 0; + width: 20px; + height: 40px; + margin-top: 5px; + margin-right: 25px; + background-color: transparent; + .backgroundImage("layers_icon_edit_nor_new_1.png"); + background-repeat: no-repeat; + background-position: center; + opacity: 0; +} + +.entryVariableListElementWorkspace:hover +.entryVariableListElementEditWorkspace { + opacity: 1; +} + +.entryVariableListCallerListWorkspace { + list-style: none; + padding: 0; +} + +.entryVariableListCallerWorkspace { + border: solid 1px #c8c8c8; + border-top: none; + height: 50px; + cursor: pointer; + overflow: hidden; +} + +.entryVariableListCallerWorkspace:hover { + background-color: #e0e0e0; +} + +.entryVariableListCallerWorkspace:first-child { + border-top: none; +} + +.entryVariableListCallerWorkspace>.entryObjectThumbnailWorkspace { + position: inherit; + display:block; + float: left; + top: 0; left: 0; + margin: 5px 0 0 5px; + height: 40px; + width: 40px; +} + +.entryVariableListCallerNameWorkspace { + position: absolute; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + float: left; + height: 49px; + line-height: 49px; + left: 60px; right: 0; + padding-right: 7px; +} + +.entryVariableListCallerNoneWorkspace { + color: #C16B6B; + cursor: default; + line-height: 48px; + padding-left: 50px; +} + +.entryVariableLocalElementWorkspace { + .backgroundImage("local_question_icon.png"); +} + +.entryVariableCloudElementWorkspace { + .backgroundImage("cloud_question_icon.png"); +} + +.entryVariableGlobalElementWorkspace { + .backgroundImage("list_icon_question.png"); +} + +.entryMessageElementWorkspace { + .backgroundImage("list_icon_signal.png"); +} + +.entryListCloudElementWorkspace { + .backgroundImage("cloud_list_icon.png"); +} + +.entryListGlobalElementWorkspace { + .backgroundImage("list_icon_list.png"); +} + +.entryListLocalElementWorkspace { + .backgroundImage("local_list_icon.png"); +} + +.entryFunctionElementWorkspace { + .backgroundImage("list_icon_function_v1.png"); +} + +.entryVariableAddSpaceWorkspace { + padding: 0; + padding-left: 16px; + padding-right: 16px; + margin: 0; + /*height: 215px;*/ + height: 200px; + background-color: white; + border: 1px solid #a8a8a8; +} + +.entryVariableAddSpaceNameWrapperWorkspace { + height: 28px; + margin-top: 16px; + .backgroundImage("list_icon_question_1.png"); + background-repeat: no-repeat; +} + +.entryVariableAddSpaceNameWrapperWorkspace.entryListAddSpaceNameWrapperWorkspace { + .backgroundImage("list_icon_list_1.png"); +} + +.entryVariableAddSpaceInputWorkspace { + width: 80%; + margin-left: 42px; + margin-top: 2px; +} + +.entryVariableAddSpaceGlobalWrapperWorkspace { + margin-top: 16px; + color: #5e5e5e; + font-size: 11px; + position: relative; + cursor: pointer; +} + +.entryVariableAddSpaceCheckWorkspace { + display: inline-block; + width: 10px; + height: 10px; + border-radius: 2px; + margin-top: 2px; + position: absolute; + right: 17px; + border: 1px solid gray; +} + + +.entryVariableAddSpaceLocalWrapperWorkspace { + color: #5e5e5e; + font-size: 11px; + position: relative; + margin-top: 12px; + cursor: pointer; + padding-bottom: 10px; + border-bottom: 1px solid #a8a8a8; +} + +.entryVariableAddSpaceCloudWrapperWorkspace { + padding-top: 8px; +} + +.entryVariableAddSpaceCloudWrapperWorkspace { + cursor: pointer; + color: #5e5e5e; + font-size: 11px; + position: relative; +} + +.entryVariableAddSpaceUnCheckedWorkspace { + color: #afafaf; +} + +.entryVariableAddSpaceCloudCheckWorkspace { + margin-top: -12px; +} + +.entryVariableAddSpaceButtonWrapperWorkspace { + margin-top: 12px; +} + +.entryVariableAddSpaceButtonWorkspace { + font-size: 11px; + display: inline-block; + width: 48px; + height: 24px; + border: 2px solid gray; + text-align: center; + line-height: 22px; + cursor: pointer; + float: right; +} + +.entryVariableAddSpaceCancelWorkspace { + margin-left: 7px; +} + +.entryVariableSplitterWorkspace { + height: 25px; + font-size: 11px; + border: 1px solid #a8a8a8; + border-top: none; + line-height: 25px; + padding-left: 9px; +} + +/*first element after splitter should not have border-top*/ +.entryVariableSplitterWorkspace + .entryVariableListElementWorkspace { + border-top: none; +} + +.entryVariableListCallerListWorkspace + .entryVariableListElementWorkspace { + border-top: none; +} + +.entryVariableSettingWorkspace { + width: 100%; + height: 165px; + border-top: 1px solid #a8a8a8; + padding-left: 16px; + padding-right: 16px; + font-size: 11px; + background-color: #efefef; +} + +.entryVariableSettingVisibleWrapperWorkspace { + padding-top: 22px; + cursor: pointer; +} + +.entryVariableSettingCheckWorkspace { + display: inline-block; + position: absolute; + width: 10px; + height: 10px; + border-radius: 2px; + left: 90px; + margin-top: 2px; + border: 1px solid gray; + color: #5e5e5e; +} + +.entryVariableAddSpaceCheckWorkspace.entryVariableAddChecked, +.entryVariableSettingCheckWorkspace.entryVariableSettingChecked { + .backgroundImage("check_on.png"); + background-repeat: no-repeat; +} + +.entryVariableSettingInitValueWrapperWorkspace, +.entryVariableSettingSlideWrapperWorkspace, +.entryVariableSettingMinMaxWrapperWorkspace { + margin-top: 12px; +} + +.entryVariableSettingSlideWrapperWorkspace { + cursor: pointer; +} + +.entryVariableMinMaxDisabledWorkspace.entryVariableSettingMinMaxWrapperWorkspace { + color: #a8a8a8; +} + +.entryVariableSettingInitValueInputWorkspace { + margin-left: 33px; + border: 2px solid #a8a8a8; + padding-left: 5px; + width: 65%; +} + +.entryVariableSettingSplitterWorkspace { + width: 100%; + height: 1px; + background-color: #a8a8a8; + margin-top: 16px; +} + +.entryVariableSettingMinValueInputWorkspace, +.entryVariableSettingMaxValueInputWorkspace { + margin-left: 3px; + width: 22%; + border: 1px solid #afafaf; + padding-left: 5px; +} + +.entryVariableSettingMinValueInputWorkspace:disabled, +.entryVariableSettingMaxValueInputWorkspace:disabled { + background-color: #d3d3d3; +} + +.entryVariableSettingMaxValueSpanWorkspace { + margin-left: 5px; +} + +.entryVariableSettingButtonWrapperWorkspace { + margin-top: 18px; +} + +.entryVariableListElementWrapperWorkspace { + width: 100%; + height: 50px; +} + + +.entryListSettingWorkspace { + width: 100%; + padding-top: 24px; + padding-bottom: 5px; + border-top: 1px solid #a8a8a8; + padding-left: 16px; + padding-right: 16px; + font-size: 13px; + background-color: #efefef; +} + +.entryListSettingVisibleWrapperWorkspace { + cursor: pointer; +} + +.entryListSettingCheckWorkspace { + display: inline-block; + position: absolute; + width: 10px; + height: 10px; + border-radius: 2px; + left: 103px; + margin-top: 4px; + border: 1px solid gray; + color: #5e5e5e; +} + +.entryListSettingCheckWorkspace.entryListSettingCheckedWorkspace { + .backgroundImage("check_on.png"); + background-repeat: no-repeat; +} + +.entryListSettingLengthWrapperWorkspace { + margin-top: 15px; + overflow: hidden; +} + +.entryListSettingLengthControllerWorkspace { + margin-left: 5px; + height: 23px; + display: inline-block; + position: relative; +} + +.entryListSettingLengthSpanWorkspace { + float: left; + margin-top: 2px; +} + +.entryListSettingMinusWorkspace { + width: 23px; + height: 23px; + float: left; + .backgroundImage("list_minus.png"); + cursor: pointer; +} + +.entryListSettingLengthInputWorkspace { + float: left; + height: 23px; + margin-left: 5px; + margin-right: 5px; + padding-left: 5px; + border: 2px solid #a8a8a8; + width: 60px; +} + +.entryListSettingLengthInputWorkspace:focus { + border: 2px solid #1bafea; + outline: none; +} + +.entryListSettingPlusWorkspace { + width: 23px; + height: 23px; + float: left; + .backgroundImage("list_plus.png"); + cursor: pointer; +} +.entryListSettingSeperatorWorkspace { + height: 1px; + background-color: gray; + margin-top: 10px; + margin-bottom: 10px; +} + +.entryListSettingListValuesWorkspace { + padding-left: 15px; + color: #a8a8a8; +} + +.entryListSettingValueWrapperWorkspace { + margin-bottom: 10px; + overflow: hidden; +} + +.entryListSettingEachInputWorkspace { + border: 2px solid #a8a8a8; + width: 130px; + float: left; + padding-left: 5px; +} + +.entryListSettingEachInputWorkspace:focus { + border: 2px solid #1baefa; + outline: none; +} + +.entryListSettingValueNumberSpanWorkspace { + width: 20px; + display: inline-block; + float: left; + margin-top: 3px; +} + +.entryListSettingValueRemoveWorkspace { + display: inline-block; + width: 16px; + height: 16px; + float: right; + margin-right: 10px; + margin-top: 4px; + cursor: pointer; + .backgroundImage("list_remove_button.png"); +} diff --git a/src/css/entry.less b/src/css/entry.less index 006821f86d..1b10d8e9ca 100644 --- a/src/css/entry.less +++ b/src/css/entry.less @@ -1,4735 +1,26 @@ @import "prefix.less"; @import "static.less"; @import "common.less"; -@bora: #4b37a0; -@lightBora: #6c5af2; -.entry { - -} - -.dragNone { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.entryHidden { - visibility: hidden; -} - -.entryRemove { - display: none !important; -} - -.entryRemoveElement { - display: none !important; -} - -.entryNoDeco { - text-decoration: none !important; -} - - -.entryBtn { - border: none; - margin: 0; - background-color: transparent; -} - -.entrySceneWorkspace { - height: 40px; - width: 100%; - background-color: @blueHaneul; - position: fixed; - overflow: hidden; -} - -.entrySceneListWorkspace { - margin: 0px; - padding: 0px 5px 0px 55px; -} -.entrySceneElementWorkspace { - float: left; - display: inline-block; - list-style-type: none; - color: white; - font-size: 10pt; - cursor: move; - border-radius: 20px; - margin-left: -40px; - position: relative; - margin-right: -2px; -} - -.entrySceneElementWorkspace.selectedScene { - z-index: 888; -} - -.entrySceneAddButtonWorkspace:hover { - background-color: #A3CAF5; -} -.entrySceneAddButtonWorkspace{ - float: left; - margin-left: -23px; - margin-top: 8px; - width: 23px; - height: 23px; - position: relative; - z-index: 999; - cursor: pointer; - .backgroundImage("top_icon_add_b_nor.png"); -} - -.selectedScene .entrySceneLeftWorkspace { - .backgroundImage("top_tab_b_sel_left.png"); -} - -.entrySceneLeftWorkspace { - display: inline-block; - float: left; - width: 15px; - height: 40px; - .backgroundImage("top_tab_b_nor_left_blue.png"); -} - -.entrySceneInputCover { - margin-left: -1px; - display: inline-block; - float: left; - height: 40px; - width: 76px; - padding-top: 11px; - padding-right: 2px; - background-color: #0e68e3; -} - -.minValue .entrySceneInputCover { - min-width: 70px; -} - -.entrySceneFieldWorkspace { - cursor: text !important; - display: inline-block; - margin: 0px; - height: 20px; - width: 100%; - color: white; - border: 1px solid transparent; - background-color: #0e68e3; - padding: 0px 0px 0px 5px; -} - -.entrySceneFieldWorkspace:focus { - background-color: #eee; - color: #000; -} - -.selectedScene .entrySceneInputCover { - background-color: white; - min-width: 70px; -} - -.selectedScene .entrySceneFieldWorkspace { - background-color: white; - color: black; -} - -.entrySceneFieldWorkspace:hover, -.entrySceneFieldWorkspace:focus, -.entrySceneFieldWorkspace:active { - outline: none; - border: 1px solid gray; -} - -.entrySceneRemoveButtonCoverWorkspace { - border: 0; - padding: 0; - width: 55px; - background-color: transparent; - display: inline-block; - float: left; - height: 40px; - position: relative; - .backgroundImage("top_tab_b_nor_right_blue.png"); -} - -.selectedScene .entrySceneRemoveButtonCoverWorkspace { - display: inline-block; - background: url("@{image_url}top_tab_b_sel_right.png"); -} - -.entrySceneRemoveButtonWorkspace { - border: 0; - padding: 0; - width: 12px; - background-color: #0e68e3; - height: 14px; - position: absolute; - right: 45px; - top: 12px; - display: none; -} - -.selectedScene .entrySceneRemoveButtonWorkspace { - background-color: white; - color: black; -} - -.minValue .entrySceneRemoveButtonWorkspace { - display: inline-block; -} - -.entrySceneRemoveButtonWorkspace:hover { - color: #FF3E24; -} - - -.entryStateManagerWorkspace { - float: right; - height: 40px; - margin-right: 10px; -} - -.entryStateManagerButtonWorkspace { - border:0; - margin: 3px; - padding-left: 26px; - height: 32px; - border-radius: 4px; - background-color: #BDC4C9; - color: #E2EBFA; - font-size: 10pt; - background-repeat: no-repeat; - background-position: 7px 8px; - border-bottom: 2pt solid #A0ACB2; - border-right: 2pt solid #A0ACB2; -} - -.entryStateManagerButtonWorkspace.active:hover { - background-color: #7CC2EE; -} - -.entryStateManagerButtonWorkspace.active { - background-color: #6AAFDA; - border-bottom: 2pt solid #639FBD; - border-right: 2pt solid #639FBD; -} - -.entryUndoButtonWorkspace { - background-image: url("/img/assets/undo.png"); -} - -.entryRedoButtonWorkspace { - background-image: url("/img/assets/redo.png"); -} - - -.entryCanvasWrapper { - position: absolute; -} - -.entryCanvasWorkspace { - width: 480px; - height: 270px; - background-color: white; - display: block; - position: absolute; - top: 24px; -} - -.entryPopupWindow .entryCanvasWorkspace { - top: -11px !important; -} - - -.entryCanvasPhone { - width: 100%; - background-color: white; - display: block; -} - -.entryPopupWindow > .entryCanvasWorkspace { - width: 100% !important; - height: 100% !important; - position: relative; - border-bottom: 1px solid #ccc; - border-top: 0px; -} - -.entryPopupWindow > .entryEngine_w { - width: 100% !important; - height: 100% !important; -} - -.entryEngine_w > .entryCanvasWorkspace { - border-top: 1px solid #ccc; -} - -.entryPopupWindow> div > .entryCanvasWorkspace { - bottom: 24px; - border-bottom: 1px solid #ccc; - width: 100% !important; - height: 100% !important; - top: -25px !important; -} - -.entryEngineWorkspace { - height: 35px; - width: 480px; - background-color: white; - border-top: 1pt solid #ebeff1; -} - -.entryEngineMinimize { - height: 35px; - width: 100%; - background-color: white; - border-top: 1pt solid #ebeff1; -} - -.entryEngineWorkspace_w { - height: 225px; - width: 400px; - background-color: white; - border-top: 1pt solid #ebeff1; - position: absolute; -} - -.entryPopupWindow > .entryEngineWorkspace { - position: absolute; - top: auto !important; - width: 100% !important; - bottom: 0px; -} - -.entryPopupWindow > .entryEngineWorkspace_w { - position: absolute; - width: 100% !important; - top: 0px !important; -} - -.entryPopupWindow > .entryEngineWorkspace_w > .entryRunButtonWorkspace_w { - display: none; - top: 37%; - left: 46%; -} - -.entryPopupWindow > .entryEngineWorkspace_w > .entryRunButtonWorkspace_w2 { - display: block; - width: 111px; - height: 111px; - background-image: url("@{image_url}play_btn.png"); - background-position: 40px center; - background-color: rgba(0,0,0,0.5); - border-radius: 55px; - background-repeat: no-repeat; - right: 5px; - /*bottom: 5px;*/ - bottom: -10px; - left: 44%; - top : 35%; -} - -.entryPopupWindow > .entryEngineWorkspace_w > .entryStopButtonWorkspace_w2 { - display: block; - background-image: url("@{image_url}stop_btn.png"); - background-repeat: no-repeat; - left: 20px; - color: transparent; - bottom: -10px; - width: 90px; - background-position:left; - color: @bora; -} - -.entryPopupWindow > .entryEngineWorkspace_w > .entryStopButtonWorkspace_w { - display: none; -} - -.entryPopupWindow > .entryEngineWorkspace_w > .entryCoordinateButtonWorkspace_w { - background-image : url("@{image_url}grid.png") !important; - right: 34px; - color : @bora; -} - -.entryPopupWindow > .entryEngineWorkspace_w > .entryMaximizeButtonWorkspace_w { - background-image: url("@{image_url}zoom_out_btn.png"); - background-repeat: no-repeat; - right: 5px; -} - -.entryPopupWindow > .entryEngineWorkspace_w > .entryEngineButtonWorkspace_w { - position: absolute; - bottom: 1px; -} - -.entryPopupWindow > .entryEngineWorkspace_w > .entryAddButtonWorkspace_w { - display: none; -} - -.entryEngineBlueWorkspace { - background-color: #61abdb; -} - -.entryEngineButtonWorkspace { - border: none; - outline: none; - width: 25px; - height: 35px; - background-color: transparent; - background-repeat: no-repeat; - background-position: center; -} - -.entryEngineButtonMinimize { - border: none; - outline: none; - width: 25px; - height: 35px; - background-color: transparent; - background-repeat: no-repeat; - background-position: center; -} - -.entryEngineButtonWorkspace_w { - border: none; - outline: none; - width: 25px; - height: 24px; - background-color: transparent; - background-repeat: no-repeat; - background-position: center; -} - -.entryRunButtonPhone { - width: 100%; - height: 100%; - border: none; - background-color: transparent; - font-size: 12pt; - border-bottom: 2px solid #89c0d5; - .backgroundImage("layers_icon_button_play_nor.png"); - background-position: 10px 50%; - background-repeat: no-repeat; -} - -.entryStopButtonPhone { - width: 100%; - height: 100%; - border: none; - background-color: transparent; - font-size: 12pt; - border-bottom: 2px solid #89c0d5; - .backgroundImage("layers_icon_button_stop_nor.png"); - background-position: 10px 50%; - background-repeat: no-repeat; -} - -.entryRunButtonPhone.small { -} - -.entryEnginePhone { - width: 100%; -} - -.entryEngineHeaderPhone { - border-bottom: 1px solid #ccc; - width: 100%; - background-color: #fff; - height:34px; -} - -.entryEngineFooterPhone { - border-top: 1px solid #ccc; - width: 100%; - background-color: #fff; - height:38px; -} - -.entryMouseViewWorkspace { - position: relative; - font-size: 9pt; - margin: 0 auto; - width: 40%; - color: #61abdb; - line-height: 35px; - text-align: center; -} - -.entryMouseViewMinimize { - font-size: 9pt; - margin: 0 auto; - width: 40%; - color: @lightBora; - line-height: 35px; - text-align: center; -} - -.entryMouseViewWorkspace_w { - font-size: 9pt; - margin: 0 auto; - width: 40%; - color: #61abdb; - line-height: 24px; - text-align: center; -} - -.entryEngineBlueWorkspace > .entryMouseViewWorkspace { - color: white; -} - -.entryMaximizeButtonWorkspace { - float: left; - margin-left: 5px; - .backgroundImage("fullscreen_edit.png"); -} - -.entryMaximizeButtonMinimize { - float: right; - margin-right: 5px; - background-image: url("@{image_url}zoom_in_btn.png"); -} - -.entryPopupWindow > .entryEngineMinimize > .entryMaximizeButtonMinimize { - float: right; - margin-right: 5px; - background-image: url("@{image_url}zoom_out_btn.png"); -} - -.entryMaximizeButtonPhone { - width: 20px; - height: 100%; - border: none; - float: right; - margin-right: 9px; - background-repeat: no-repeat; - background-position: center; - background-color: transparent; - .backgroundImage("layers_icon_fullmode01_nor.png"); -} - -.entryMaximizeButtonWorkspace_w { - float: right; - margin-right: 5px; - .backgroundImage("layers_icon_fullmode01_nor_1.png"); - background-repeat: no-repeat; -} - -.entryEngineBlueWorkspace > .entryMaximizeButtonWorkspace { - .backgroundImage("fullscreen_play.png"); -} - -#entrySpeedPanelWorkspace { - width: 100%; - height: 0px; - background-color: #0e0; - -} - -.entrySpeedButtonWorkspace { - float: left; - background-size: contain; - width: 22px; - height: 15px; - margin-top: 5px; - margin-left: 10px; - .backgroundImage("speed_edit.png"); -} - -.entryPopupWindow > div > .entrySpeedButtonWorkspace { - display: none; -} - -.entryPopupWindow .entryMouseViewWorkspace_w { - font-size: 9pt; - margin: 0 auto; - width: 100%; - color: @bora; - line-height: 24px; - text-align: center; - bottom: 1px; - position: absolute; - text-align: center; -} - -#entrySpeedProgressWorkspace { - position: absolute; - display: block; - left: 80px; - top: 23px; - right: 4px; - height: 13px; -} - -#entrySpeedProgressWorkspace > tr { width: 100%; } - -#entrySpeedProgressWorkspace > tr > td { - position: absolute; - height: 14px; - width: 20%; - cursor: pointer; -} - -#progressCell0 { - border-top-left-radius: 6.5px; - border-bottom-left-radius: 6.5px; - left: 0%; background-color: #bee8f4; -} -#progressCell1 {left: 20%; background-color: #96cfe7; } -#progressCell2 {left: 40%; background-color: #83b8e1; } -#progressCell3 {left: 60%; background-color: #67a9c9; } -#progressCell4 { - border-top-right-radius: 6.5px; - border-bottom-right-radius: 6.5px; - left: 80%; background-color: #5099b5; -} - -#entrySpeedLabelWorkspace { - clear: both; - display: block; - font-family: ng; - padding-top: 2px; - padding-left: 10px; - font-size: 11px; -} - -#entrySpeedHandleWorkspace { - position: absolute !important; - cursor: pointer; - width: 18px; - height: 16px; - top: 21px; - z-index: 100; - .backgroundImage("speed_handle.png"); -} - -.entryCoordinateButtonWorkspace { - float: right; - .backgroundImage("coordinates_edit.png"); -} - -.entryCoordinateButtonMinimize { - float: right; - .backgroundImage("grid.png"); -} - -.entryCoordinateButtonWorkspace_w { - float: right; - .backgroundImage("layers_icon_grid_nor.png"); -} - -.entryCoordinateButtonWorkspace.toggleOn { - .backgroundImage("coordinates_edit_on.png"); -} - -.entryCoordinateButtonWorkspace_w.toggleOn { - .backgroundImage("layers_icon_grid_nor_1.png"); -} - -.entryEngineBlueWorkspace > .entryCoordinateButtonWorkspace { - .backgroundImage("coordinates_play.png"); -} - -.entryRunButtonWorkspace { - float: right; - width: 80px; - background-position: 7px 50%; - padding-right: 10px; - text-align: right; - font-size:9pt; - color: #61abdb; - .backgroundImage("playbutton_edit.png"); -} - -.entryRunButtonMinimize { - display: none; - float: left; - width: 65px; - font-size:9pt; - color: @lightBora; -} - -.entryAddButtonWorkspace_w { - top: 289px; - left: 0px; - width: 236px; - height: 38px; - font-size: 12pt; - background-color: #fff; - color: #666666; - text-align: center; - position: absolute; - border-top: 1px solid #ccc; - padding-left: 50px; - background-repeat: no-repeat; - background-position: 10% 43%; - font-family: nanumBarunBold !important; - .backgroundImage("layers_icon_button_plus_nor.png"); -} - -.collapsed>.entryAddButtonWorkspace_w { - color: transparent; - background-position: 50% 43%; -} - -.entryRunButtonWorkspace_w { - top: 289px; - left: 272px; - width: 156px; - height: 38px; - font-size: 12pt; - border-left: 1px solid #ccc; - border-top: 1px solid #ccc; - background-color: #fff; - padding-left: 28px; - color: #666666; - text-align: center; - position: absolute; - background-repeat: no-repeat; - background-position: 10% 43%; - font-family: nanumBarunBold !important; - .backgroundImage("layers_icon_button_play_nor_1.png"); -} - -.collapsed>.entryRunButtonWorkspace_w { - color: transparent; - background-position: 50% 43%; -} - -.entryRunButtonWorkspace_w2 { - display:none; -} - -.entryEngineBlueWorkspace > .entryRunButtonWorkspace { - .backgroundImage("playbutton_play.png"); - color: white; -} - -.entryStopButtonWorkspace { - float:right; - width: 80px; - background-position: 7px 50%; - border-top: 1px solid #ccc; - padding-right: 10px; - text-align: right; - font-size:9pt; - color: #61abdb; - .backgroundImage("stopbutton_pause.png"); -} - -.entryStopButtonMinimize { - float: left; - width: 80px; - background-position: 7px 50%; - padding-right: 10px; - text-align: right; - font-size:9pt; - color: @lightBora; - .backgroundImage("stop_btn.png"); -} - -.entryStopButtonWorkspace_w { - top: 289px; - left: 272px; - width: 156px; - height: 38px; - font-size: 12pt; - border-top: 1px solid #ccc; - border-left: 1px solid #ccc; - background-color: #fff; - color: #666666; - padding-left: 28px; - text-align: center; - position: absolute; - background-repeat: no-repeat; - background-position: 10% center; - font-weight: 600; - .backgroundImage("layers_icon_button_stop_nor_1.png"); -} - -.collapsed>.entryStopButtonWorkspace_w { - color: transparent; - background-position: 50% 43%; -} - -.entryStopButtonWorkspace_w2 { - display: none; -} - -.entryPauseButtonWorkspace_w { - display: none; -} - -.entryEngineBlueWorkspace > .entryStopButtonWorkspace { - .backgroundImage("stopbutton_play.png"); - color: white; -} - -.entryPauseButtonWorkspace { - float:right; - .backgroundImage("pausebutton_edit.png"); -} - -.entryPauseButtonMinimize { - float:left; - .backgroundImage("pause_btn.png"); - width: auto; - background-position: left; - padding-left: 17px; - color: #6c5af2; - font-size: 9pt; -} - -.entryEngineBlueWorkspace > .entryPauseButtonWorkspace { - .backgroundImage("pausebutton_play.png"); - color: white; -} - -@import "/components/property_panel.less"; +@import "/components/block.less"; +@import "/components/block_menu.less"; +@import "/components/board.less"; +@import "/components/container.less"; +@import "/components/context_menu.less"; +@import "/components/engine.less"; +@import "/components/function.less"; +@import "/components/global_svg.less"; +@import "/components/helper.less"; @import "/components/hw_monitor.less"; - -.entryContainerWorkspace { - background-color: #e7e7e7; -} - -.entryContainerPhone { - width: 100%; - background-color: #e7e7e7; -} - -.entryAddObjectWorkspace { - display: block; - height: 48px; - background-color: #e7e7e7; - color: #757575; - text-align: center; - font-size: 11pt; - line-height: 44px; - margin: 10px; - border: 2px dashed #979797; - cursor: pointer; -} - -.entryContainerListWorkspaceWrapper { - position: absolute; - bottom: 0; - padding: 0; - margin: 0; - overflow: auto; - width: 100%; - top: 0; - background-color: #363C46; -} - -.entryContainerListWorkspace { - position: relative; - margin: 0px; - padding: 0px; - width: 100%; - background-color: #363C46; - list-style-type: none; - border-top: 1pt solid #ebeff1; -} - -.entryContainerListPhone { - position: relative; - margin: 0px; - padding: 0px; - width: 100%; - background-color: #363C46; - list-style-type: none; - border-top: 1pt solid #ebeff1; -} - -.entryContainerListWorkspace::-webkit-scrollbar { - display: none; -} - -.entryContainerListElementWorkspace { - background-color: white; - display: block; - padding: 0; - margin: 0; - border-bottom: 1pt solid #ebeff1; - position: relative; - overflow: hidden; - cursor: move; - min-height: 59px; - .box-sizing(border-box); -} - -.entryContainerListElementWorkspace.selectedObject { - background-color: #f4f4f4; - height: 118px; - border-top: 1px solid #aaaaaa; - border-bottom: 1px solid #aaaaaa; -} - -.collapsed .selectedObject { - height: 149px; -} - -.entryContainerListElementWorkspace:first-child, -.entryContainerListElementWorkspace.selectedObject + .entryContainerListElementWorkspace { - border-top: 0; -} - -.objectInfoView { - list-style: none; - padding: 0; - height: 59px; - width: 19px; - position: relative; - margin-left: 10px; - float: left; -} - -.objectInfo_visible { - display: inline-block; - position: absolute; - top: 10px; - left:0; - height: 18px; - width: 18px; - .backgroundImage("layers_icon_visible.png"); - border-bottom: 1px solid rgba(159,159,159,0.3); - cursor: pointer; - .box-sizing(border-box); -} - -.objectInfo_unvisible { - .backgroundImage("layers_icon_unvisible.png"); -} - -.objectInfo_unlock { - display: inline-block; - position: absolute; - top:33px; - left:0; - height: 18px; - width: 18px; - .backgroundImage("layers_icon_unlock.png"); - cursor: pointer; - .box-sizing(border-box); -} - -.objectInfo_lock { - .backgroundImage("layers_icon_lock.png"); -} - - -.entryObjectThumbnailWorkspace{ - float: left; - position: absolute; - height: 49px; - width: 49px; - top: 5px; - left: 41px; - border: 1px solid #bcc2c8; - background-color: #ccc; - background-size: contain; - background-repeat: no-repeat; - background-position: center; -} - -.entryObjectWrapperWorkspace{ - float: left; - position: relative; - top: 10px; - left: 72px; - width: 135px; - height: 43px; - overflow: hidden; -} - -.entryObjectNameWorkspace{ - float: left; - width: 112px; - top: 8px; - left: 20px; - position: absolute; - background-color: transparent; - border: none; - color: #000000; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - border: 1px solid transparent; -} -.editButtonToggle { - display :block; -} -.editButtonToggle_ { - display :none; -} - -.selectedEditingObject { - background-color: white !important; - border-radius: 3px; - border: 1px solid #878787 !important; - outline:none; - background-color: transparent; -} - -.selectedNotEditionObject { - background-color: transparent; -} - -.selectedNotEditionObject:hover { - background-color: transparent; -} - -.selectedNotEditionObject:focus { - background-color: transparent !important; -} -/*sj*/ - -.selectedObject .entryObjectNameWorkspace{ - color: #474747; -} - -.selectedObject>.entryObjectWrapperWorkspace>.entryObjectNameWorkspace{ - color: black; - font-family: nanumBarunRegular !important; -} - - -.entryObjectNameWorkspace:disabled{ - background-color: transparent; -} -.entryObjectEditWorkspace { - float: left; - position: absolute; - width: 19px; - height: 19px; - right: 43px; - top: 22px; - cursor: pointer; - .backgroundImage("layers_icon_edit_nor_new.png"); - -} - -.entryObjectDeleteWorkspace { - float: left; - position: absolute; - width: 19px; - height: 19px; - right: 21px; - top: 22px; - cursor: pointer; - .backgroundImage("layers_icon_close_nor_new.png"); -} - -.entryObjectDeletePhone { - float: left; - position: absolute; - width: 16px; - height: 16px; - right: 57px; - top: 25px; - cursor: pointer; - .backgroundImage("layers_icon_close_nor.png"); -} - -.entryObjectEditPhone { - float: left; - position: absolute; - width: 24px; - background-repeat: no-repeat; - height: 21px; - right: 17px; - background-color: transparent; - border: none; - top: 21px; - cursor: pointer; - .backgroundImage("glyphicons_150_edit.png"); -} - -.entryObjectSelectedImgWorkspace { - float: left; - position: absolute; - width: 14px; - height: 26px; - right: 0; - top: 20px; - cursor: col-resize; - .backgroundImage("entry_scroll.png"); -} - -.selectedObject .entryObjectSelectedImgWorkspace { - float: left; - position: absolute; - width: 14px; - height: 26px; - right: 0; - top: 20px; - cursor: col-resize; - .backgroundImage("entry_scroll.png"); -} - -.entryObjectCoordinateWorkspace{ - float: left; - width: 100%; - position: relative; - font-size: 9pt; - color: #000000; - top: 12px; - left: 28px; - width: 150px; -} - -.selectedObject>.entryObjectWrapperWorkspace>.entryObjectCoordinateWorkspace{ - color: black; -} - -.entryObjectInformationWorkspace{ - position: absolute; - cursor: pointer; - margin: 12px 0 0 0; - width: 13px; - height: 13px; - .backgroundImage("layers_arrow_up_nor.png"); -} - -.selectedObject .entryObjectInformationWorkspace{ - .backgroundImage("layers_arrow_down_nor.png"); -} - -.informationToggle>.entryObjectWrapperWorkspace>.entryObjectInformationWorkspace{ - .backgroundImage("layers_arrow_down_nor_1.png"); -} - -.entryObjectButtonWorkspace { - display: none; - float: right; - position: relative; - width: 40px; - height: 40px; - background-color: #bcc3c9; - border-radius: 50%; - margin: 10px 10px 10px 5px; - background-position:center; - background-repeat: no-repeat; - background-position: 50% 35%; - color: white; - font-size: 7.5pt; - padding: 23px 0 0 0; - text-align: center; - outline: none; - border: none; -} - -.informationToggle>.entryObjectButtonWorkspace{ - display: none; -} - -.entryObjectSoundWorkspace { - .backgroundImage("icon_sound.png"); - background-color: #6a9a1f; -} - -.entryObjectSoundWorkspace:hover { - background-color: #83AF3D; -} - -.entryObjectPictureWorkspace { - .backgroundImage("icon_picture.png"); - background-color: #f26724; -} - -.entryObjectPictureWorkspace:hover { - background-color: #F3783C; -} - -.entryObjectCodeWorkspace { - .backgroundImage("icon_code.png"); - background-color: #00ace9; -} - -.entryObjectCodeWorkspace:hover { - background-color: #5FC8EE; -} - -.entryObjectTextWorkspace { - .backgroundImage("text_icon_white.png"); - background-color: #F3BB1D; - background-position: 50% 20%; - background-size: 75%; -} - -.entryObjectRotationWrapperWorkspace { - display: none; - width: 100%; - height: 59px; - padding: 0 0px 10px 10px; - border-top: 1px solid #e1e1e1; - background-color: #e5e5e5; -} - -.collapsed .entryObjectRotationWrapperWorkspace { - height: 90px; -} - -.selectedObject .entryObjectRotationWrapperWorkspace { - display: inline-block; -} - -.informationToggle>.entryObjectRotationWrapperWorkspace { - display: inline-block; -} - -.rotationMethodWrapper { - float: right; - width: 180px; - position: relative; -} - -.collapsed .rotationMethodWrapper { - float: left; - top: 39px; -} - -.entryObjectRotateMethodLabelWorkspace { - display: inline-block; - line-height: 20px; - font-size: 9pt; - color: #000000; - position: absolute; - padding-left: 20px; - padding-top: 20px; -} - -/*.entryObjectRotateLabelWorkspace { - display: block; - font-size: 9pt; - color: #000000; - left: 38px; - margin-top: 31px; -} -*/ -.entryObjectRotateLabelWrapperWorkspace { - position: absolute; - top: 90px; - margin-left: 37px; - font-size: 9pt; - color: #000000; -} - -.entryObjectRotateInputWorkspace, .entryObjectDirectionInputWorkspace { - width: 40px; - background-color: #e5e5e5; - border: none; - outline: none; - border: 1px solid transparent; - -} - -.entryObjectDirectionSpanWorkspace { - margin-left: 12px; -} - -.entryObjectRotateModeWorkspace { - cursor: pointer; - display: inline-block; - vertical-align: middle; - float: left; - margin-left: 8px; - margin-top: 18px; - width: 22px; - height: 22px; -} - -.propertyTabhelper { - .backgroundImage("property/helper_off.png"); -} - -.propertyTabhelper.selected { - .backgroundImage("property/helper_on.png"); -} - -.propertyTabContainer { - .backgroundImage("property/container_off.png"); -} -.propertyTabContainer.selected { - .backgroundImage("property/container_on.png"); -} -.entryObjectRotateModeAWorkspace { - margin-left: 80px; - .backgroundImage("layers_icon_rotate01_nor.png"); -} - -.entryObjectRotateModeAWorkspace.selected { - .backgroundImage("layers_icon_rotate01_sel.png"); -} - -.entryObjectRotateModeBWorkspace { - .backgroundImage("layers_icon_rotate02_nor.png"); -} - -.entryObjectRotateModeBWorkspace.selected { - .backgroundImage("layers_icon_rotate02_sel.png"); -} - -.entryObjectRotateModeCWorkspace { - .backgroundImage("layers_icon_rotate03_nor.png"); -} - -.entryObjectRotateModeCWorkspace.selected { - .backgroundImage("layers_icon_rotate03_sel.png"); -} - -.entryPlaygroundWorkspace { - position: absolute; - top: 40px; - bottom: 0px; - left: 400.5px; - right: 0px; - background-color: #F5F5F5; - overflow: hidden; -} - -.entryPlaygroundPhone { - width: 100%; - height: 500px; - background-color: #F5F5F5; -} - -.entryPlaygroundResizeWorkspace { - position: absolute; - top: 45%; - height: 28px; - width: 11px; - left: 272px; - cursor: ew-resize; - border: solid 1px #afafaf; - border-left: none; - z-index: 250; - .backgroundImage("entry_scroll_02.png"); -} - -.entryPlaygroundTabWorkspace { - position: absolute; - /*margin-top: 1px;*/ - top: 0; - height: 43px; - width: 100%; - background-color: #f1f1f1; -} - -.entryPlaygroundTabWorkspace.entryRemove { - display: block !important; -} - -.entryPlaygroundTabPhone { - width: 100%; - height: 43px; - position: relative; - background-color: #f1f1f1; -} - -.entryTabListWorkspace { - list-style: none; - height: 44px; - padding: 0; - margin: 1px 0 0 0; - border-bottom: 2px solid #643cd9; -} - -.entryTabListItemWorkspace { - float: left; - width: 59px; - height: 42px; - margin: 0 1px 0 1px; - cursor: pointer; - display:block; - padding: 10px 0 0 0; - text-align: center; - font-family: nanumBarunBold !important; - color: gray; - background-color: #e5e5e5; - border-top-right-radius: 7px; - border-top-left-radius: 7px; -} - -.entryTabSelected { - color: white; - background-color: #6e5ae6; -} - -.entryTabListItemWorkspace:hover { -} - -#entrySoundTab { - .animation-delay(0.1s); -} -#entryPictureTab.hideTab, #entryTextTab.hideTab{ - .animation-delay(0.2s); -} -#entrySoundTab.hideTab { - .animation-delay(0.1s); -} -#entryVariableTab.showTab { - .animation-delay(0.2s); -} - - -.hideTab { - .animation-duration(0.7s); - .animation-name(hideTab); - .animation-fill-mode(forwards); -} - -@keyframes hideTab { - from {} - to {margin-top: 44px;opacity:0} -} - -@-o-keyframes hideTab { - from {} - to {margin-top: 44px;opacity:0} -} - -@-ms-keyframes hideTab { - from {} - to {margin-top: 44px;opacity:0} -} - -@-moz-keyframes hideTab { - from {} - to {margin-top: 44px;opacity:0} -} - -@-webkit-keyframes hideTab { - from {} - to {margin-top: 44px;opacity:0} -} - -.showTab { - opacity: 0; - .animation-duration(0.7s); - .animation-name(showTab); - .animation-fill-mode(forwards); -} - -@keyframes showTab { - from {margin-top: 44px;opacity:0} - to {opacity: 1} -} - -@-o-keyframes showTab { - from {margin-top: 44px;opacity:0} - to {opacity: 1} -} - -@-ms-keyframes showTab { - from {margin-top: 44px;opacity:0} - to {opacity: 1} -} - -@-moz-keyframes showTab { - from {margin-top: 44px;opacity:0} - to {opacity: 1} -} - -@-webkit-keyframes showTab { - from {margin-top: 44px;opacity:0} - to {opacity: 1} -} - -.entryPlaygroundCurtainWorkspace { - position: absolute; - background-color: black; - color: white; - padding-top: 270px; - text-align: center; - font-size: 40px; - height: 100%; - top: 0; - left: 0; - right: 0; - bottom: 0; - opacity: 0.5; - z-index: 5000; - cursor: pointer; -} - -.entryPlaygroundCurtainPhone { - position: absolute; - background-color: rgba(0,0,0,0.8); - color: white; - padding-top: 100px; - text-align: center; - font-size: 17px; - height: 110%; - width: 100%; - opacity: 0.5; - z-index: 5000; - cursor: pointer; -} - - -.entryPlaygroundCodeWorkspace { - height: 100%; - background-color: #F5F5F5; -} - -.entryPlaygroundCodeWorkspace.entryRemove { - display: block !important; - visibility: hidden; -} - -.entryPlaygroundCodePhone { - position: relative; - height: 100%; - background-color: #F5F5F5; -} - -.entryPlaygroundCodePhone.entryRemove { - display: block !important; - visibility: hidden; -} - -.entryVariablePanelWorkspace { - position: absolute; - width: 250px; - top: 47px; - bottom: 0px; - padding: 6px 4px 0px 4px; -} - -.entryVariablePanelPhone { - width: 250px; - top: 47px; - bottom: 0px; - padding: 6px 4px 0px 4px; -} - -.entryVariableSelectorWorkspace { - width: 100%; - border-collapse: separate; - border-spacing: 0; -} - -.entryVariableSelectButtonWorkspace { - font-family: nanumBarunBold !important; - width: 25%; - border-collapse: collapse; - text-align: center; - vertical-align: center; - background-color: #EDEDED; - height: 38px; - border: solid 1px #bdbdbd; - border-left: none; - color: #535353; - padding-top: 4px; - cursor: pointer; -} - -.entryVariableSelectButtonWorkspace.selected { - color: #ffffff; - background-color: #0e68e3; -} - -.entryVariableSelectButtonWorkspace.allButton { - border-radius: 6px 0 0 6px; - border-left: solid 1px #bdbdbd; -} - -.entryVariableSelectButtonWorkspace.message { - border-radius: 0 6px 0px 0; -} - -.entryVariableSelectButtonWorkspace.list { - border-top: none; -} - -.entryVariableSelectButtonWorkspace.func { - border-top: none; - border-radius: 0 0px 6px 0; -} - -.entryVariableSelectButtonWorkspace.disable { - color: #bdbdbd; - cursor: default; -} - -.entryVariableListWorkspace { - position: absolute; - top: 88px; - bottom: 0px; - right: 4px; - left: 4px; - padding: 0; - margin: 0; - list-style: none; - overflow: auto; -} - -.entryVariableListElementWorkspace { - background-repeat: no-repeat; - background-position: 14px 10px; - background-color: #efefef; - border: solid 1px #a8a8a8; - margin-bottom: -1px; - min-height: 50px; -} - -.entryVariableAddWorkspace { - padding: 0; - font-size: 13pt; - color: #717171; - cursor: pointer; - line-height: 49px; - position: relative; - text-align: center; -} - -.entryVariableAddWorkspace:hover { - background-color: #d3d3d3; - color: #333; -} - -.entryVariableListElementWorkspace.selected { - background-color: #d3d3d3; -} - -.entryVariableListElementNameWorkspace { - position: absolute; - left: 47px; - margin-top: 12px; - background-color: #efefef; - width: 55%; - border: 1px solid transparent; - padding-left: 5px; -} -.selected .entryVariableListElementNameWorkspace { - background-color: #d3d3d3; -} - -.entryVariableListElementNameWorkspace:focus { - background-color: white; - border: 1px solid gray; -} - -.entryVariableFunctionElementNameWorkspace { - border: none; - position: absolute; - left: 55px; - margin-top: 12px; - background-color: transparent; - width: 60%; - overflow: hidden; - height: 20px; - text-overflow: ellipsis; - white-space: nowrap; -} - -.entryVariableListElementDeleteWorkspace { - position: absolute; - margin-top: 5px; - padding-right: 5px; - right: 3px; - border: 0; - outline: 0; - width: 22px; - height: 40px; - opacity: 0; - background-color: transparent; - .backgroundImage("layers_icon_close_nor_new_1.png"); - background-repeat: no-repeat; - background-position: center; -} - -.entryVariableListElementWorkspace:hover -.entryVariableListElementDeleteWorkspace { - opacity: 1; -} - -.entryVariableListElementEditWorkspace { - display: inline-block; - float: right; - border: 0; - outline: 0; - width: 20px; - height: 40px; - margin-top: 5px; - margin-right: 25px; - background-color: transparent; - .backgroundImage("layers_icon_edit_nor_new_1.png"); - background-repeat: no-repeat; - background-position: center; - opacity: 0; -} - -.entryVariableListElementWorkspace:hover -.entryVariableListElementEditWorkspace { - opacity: 1; -} - -.entryVariableListCallerListWorkspace { - list-style: none; - padding: 0; -} - -.entryVariableListCallerWorkspace { - border: solid 1px #c8c8c8; - border-top: none; - height: 50px; - cursor: pointer; - overflow: hidden; -} - -.entryVariableListCallerWorkspace:hover { - background-color: #e0e0e0; -} - -.entryVariableListCallerWorkspace:first-child { - border-top: none; -} - -.entryVariableListCallerWorkspace>.entryObjectThumbnailWorkspace { - position: inherit; - display:block; - float: left; - top: 0; left: 0; - margin: 5px 0 0 5px; - height: 40px; - width: 40px; -} - -.entryVariableListCallerNameWorkspace { - position: absolute; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - float: left; - height: 49px; - line-height: 49px; - left: 60px; right: 0; - padding-right: 7px; -} - -.entryVariableListCallerNoneWorkspace { - color: #C16B6B; - cursor: default; - line-height: 48px; - padding-left: 50px; -} - -.entryVariableLocalElementWorkspace { - .backgroundImage("local_question_icon.png"); -} - -.entryVariableCloudElementWorkspace { - .backgroundImage("cloud_question_icon.png"); -} - -.entryVariableGlobalElementWorkspace { - .backgroundImage("list_icon_question.png"); -} - -.entryMessageElementWorkspace { - .backgroundImage("list_icon_signal.png"); -} - -.entryListCloudElementWorkspace { - .backgroundImage("cloud_list_icon.png"); -} - -.entryListGlobalElementWorkspace { - .backgroundImage("list_icon_list.png"); -} - -.entryListLocalElementWorkspace { - .backgroundImage("local_list_icon.png"); -} - -.entryFunctionElementWorkspace { - .backgroundImage("list_icon_function_v1.png"); -} - -.entryPlaygroundPictureWorkspace { - position: absolute; - top: 47px; - margin-left: 0; - height: 100%; - background-color: #ececec; -} - -.entryPlaygroundPicturePhone { - margin-left: 0; - height: 100%; - background-color: #ececec; -} - -.entryPlaygroundAddPicture { - position: absolute; - width: 240px; - height: 60px; - background-color: #e5e5e5; - cursor: pointer; - border-bottom: 1pt solid #ebeff1; -} - -.entryPlaygroundAddPicturePhone { - position: relative; - padding: 0; - margin: 0; - height: 50px; - cursor: pointer; - border-bottom: 1pt solid #ebeff1; -} - -.entryPlaygroundAddPictureInner { - display: block; - width: 141px; - height: 30px; - background-color: #eeeeee; - color: black; - text-align: center; - font-size: 11px; - line-height: 28px; - border: 1px solid #cccccc; - border-radius: 7px; - margin-top: 15px; - margin-left: 49.5px; -} - -.entryPlaygroundAddPictureInnerPhone { - display: block; - height: 50px; - background-color: #CDCFC9; - color: #656565; - text-align: center; - font-size: 10.5pt; - line-height: 36px; - border: 2px dashed #737373; - width: 240px; - padding: 8px 10px 12px 10px; -} - -.entryPlaygroundPictureList { - position: absolute; - padding: 0px; - margin: 0px; - width: 240px; - top: 60px; - margin-bottom: 47px; - bottom: 0px; - overflow: auto; - list-style: none; - background-color: #Cfcfcf; -} - -.entryPlaygroundPictureListPhone { - position: relative; - padding: 0px; - margin: 0px; - width: 240px; - bottom: 0px; - overflow: auto; - list-style: none; - background-color: #Cfcfcf; -} - -.entryPlaygroundPictureElement { - display: block; - background-color: #f4f4f4; - border-bottom: 1pt solid #ebeff1; - height: 60px; - color: #294117; - cursor: pointer; -} - -.entryPlaygroundPictureElement:hover { - background-color: #C0C0C0; - cursor: move; -} - -.entryPlaygroundPictureElement:hover .entryPlaygroundPictureOrder, -.entryPlaygroundSoundElement:hover .entryPlaygroundSoundOrder { - background-color: #634cd9; - color: white; -} - -.entryPictureSelected { - background-color: #c1c1c1; -} - -.entryPlaygroundPictureThumbnail { - float: left; - position: relative; - height: 49px; - width: 49px; - top: 5px; - left: 10px; - border: 1px solid #bcc2c8; - background-color: #ccc; - background-size: contain; - background-repeat: no-repeat; - background-position: center; -} - -.entryPlaygroundPictureName { - float: left; - position: relative; - top: 17px; - left: 17px; - width: 78px; - background-color: transparent; - font-size: 10pt; - text-overflow: ellipsis; - color: #294117; - cursor: text; - border: 1px solid transparent; -} - -.entryPlaygroundPictureName:focus, .entryPlaygroundSoundName:focus { - border: 1px solid gray; - background-color: white; -} - -.entryPlaygroundPictureName:hover, .entryPlaygroundSoundName:hover { - border: 1px solid gray; -} - -.entryPlaygroundPictureSize { - float: right; - position: relative; - top: 21px; - right: 10px; - font-size: 8pt; -} - -.entryPlaygroundTextWorkspace { - position: absolute; - top: 45px; - height: 100%; - width: 100%; - background-color: #ececec; - padding-left: 20px; - padding-top: 20px; -} - -.entryTextHead { - font-size: 18px; -} - -.entryTextEdit { - font-size: 17px; - width: 220px; - height: 30px; - border: 1px solid #808080; - border-radius: 3px; -} - -#entryTextProperty { - width: 220px; - height: 32px; - margin-top: 12px; -} - -.entryTextFontSelect { - display: inline-block; - width: 96px; - height: 32px; - border: 1px solid #808080; - border-radius: 4px; - background-color: white; - float: left; -} - -.entryTextFontSelecter { - margin-top: 5px; - margin-left: 2px; -} - -.entryFontToggle { - display: inline-block; - width: 96px; - width: 32px; - height: 32px; - float: right; -} - -#entryFontColorToggle { - .backgroundImage("text_in_off.png"); -} - -#entryFontColorToggle.selected { - .backgroundImage("text_in_on.png"); -} - -#entryFontBGToggle { - margin-left: 6px; - .backgroundImage("text_out_off.png"); -} - -#entryFontBGToggle.selected { - .backgroundImage("text_out_on.png"); -} - -.entryPlaygroundSoundWorkspace { - position: absolute; - top: 47px; - margin-left: 0; - height: 100%; - background-color: #ececec; -} - -.entryPlaygroundAddSound { - position: absolute; - height: 60px; - width: 240px; - background-color: #e5e5e5; - cursor: pointer; - border-bottom: 1pt solid #ebeff1; -} - -.entryPlaygroundAddSoundPhone { - position: relative; - height: 50px; - cursor: pointer; - border-bottom: 1pt solid #ebeff1; -} - -.entryPlaygroundAddSoundInner { - display: block; - width: 141px; - height: 30px; - background-color: #eeeeee; - color: black; - text-align: center; - font-size: 11px; - line-height: 28px; - border: 1px solid #cccccc; - border-radius: 7px; - margin-top: 15px; - margin-left: 49.5px; -} - -.entryPlaygroundAddSoundInnerPhone { - display: block; - height: 40px; - background-color: #CDCFC9; - color: #656565; - text-align: center; - font-size: 10.5pt; - line-height: 36px; - margin: 10px; - border: 2px dashed #737373; - width: 220px; -} - -.entryPlaygroundSoundList { - position: absolute; - padding: 0px; - margin: 0px; - width: 240px; - top: 60px; - margin-bottom: 47px; - bottom: 0px; - overflow: auto; - list-style: none; - background-color: #cfcfcf; -} - -.entryPlaygroundSoundListPhone { - position: relative; - padding: 0px; - margin: 0px; - width: 240px; - bottom: 0px; - overflow: auto; - list-style: none; - background-color: #cfcfcf; -} - -.entryPlaygroundSoundElement { - display: block; - background-color: #f4f4f4; - border-bottom: 1pt solid #ebeff1; - height: 60px; - color: #294117; - cursor: pointer; -} - -.entryPlaygroundSoundElement:hover { - background-color: #c1c1c1; - cursor: move; -} - -.entryPlaygroundSoundThumbnail { - float: left; - position: relative; - height: 49px; - width: 49px; - top: 5px; - left: 10px; - border: 1px solid #bcc2c8; - background-color: #ccc; - background-size: 32px 32px; - background-repeat: no-repeat; - background-position: center; - cursor: pointer; -} - -.entryPlaygroundSoundThumbnail.entryPlaygroundSoundPlay { - .backgroundImage("workspace_sound_play.png"); -} - -.entryPlaygroundSoundThumbnail.entryPlaygroundSoundStop { - .backgroundImage("workspace_sound_stop.png"); -} - -.entryPlaygroundSoundName { - float: left; - position: relative; - top: 18px; - left: 17px; - width: 95px; - background-color: transparent; - font-size: 10pt; - border: 1px solid transparent; - text-overflow: ellipsis; - color: #294117; -} - -.entryPlaygroundSoundLength { - float: right; - position: relative; - top: 20px; - right: 10px; - font-size: 9pt; -} - -.entryPlaygroundDefaultWorkspace { - height: 100%; - background-color: #363C46; - color: white; -} - -.entryCategoryWorkspace { - width: 74px; - height: 100%; - display: block; -} - -.entryCategoryPhone{ -} - -.entryCategoryListWorkspace { - padding: 44px 0 0 0; - margin: 0; - list-style-type: none; -} - -.entryCategoryListPhone { - padding: 0; - margin: 0; - list-style-type: none; -} - -.entryCategoryElementWorkspace { - clear: both; - padding-top: 38px; - width: 64px; - text-align: center; - background-color: #edf5f7; - font-size: 13px; - color: #474747; - float: left; - border-bottom: 1px solid #a6cafb; - cursor: pointer; - font-family: nanumBarunBold !important; -} - -@media screen and (max-height: 10000px) { - .entryCategoryElementWorkspace { - height: 61px; - background-position: 50% 6px; - padding-top: 38px; - } -} - -@media screen and (max-height: 880px) { - .entryCategoryElementWorkspace { - height: 56px; - background-position: 50% 4px; - padding-top: 34px; - } -} - -@media screen and (max-height: 810px) { - .entryCategoryElementWorkspace { - height: 50px; - background-position: 50% 2px; - padding-top: 30px; - } -} - -@media screen and (max-height: 740px) { - .entryCategoryElementWorkspace { - height: 42px; - background-position: 50% 1px; - background-size: 35px; - padding-top: 23px; - } - -} - -@media screen and (max-height: 640px) { - .entryCategoryElementWorkspace { - height: 36px; - background-position: 50% 1px; - background-size: 30px; - padding-top: 18px; - } -} - -.entryCategoryElementPhone { - height: 50px; - clear: both; - width: 56px; - padding-top: 30px; - text-align: center; - background-color: #E2E9F0; - font-size: 13px; - color: #474747; - float: left; - border-bottom: 1px solid #B7C4CC; - background-position: 5px 2px; - cursor: pointer; -} - -.entryCategoryElementEndWorkspace { - clear: both; - width: 3px; - margin-left: 56px; - background-color: #515B7C; - height: 4000px; -} - -.entrySelectedCategory { - margin: 0; - background-color: #e5e5e5; -} - -.entryBlockMenuWorkspace { - background-color: #e5e5e5; - position: absolute; - left: 64px; - top: 45px; - width: 186px; - bottom: 0px; - z-index: 100; -} - -.entryBlocklyWorkspace { - position: absolute; - left: 250px; - top: 8px; - bottom: 0px; - right: 0px; - overflow: hidden; - border: solid 1px #C4C4B9; - border-top-left-radius: 10px; - .backgroundImage("entry_bg.png"); -} - -.entryBlocklyWorkspace.folding { - z-index: 300; - border-left: solid 1px #C4C4B9; - .animation-duration(0.7s); - .animation-name(foldBlockly); - .animation-fill-mode(forwards); -} - -@keyframes foldBlockly { - from {} - to {left: 64px;} -} - -@-ot-keyframes foldBlockly { - from {} - to {left: 64px;} -} - -@-ms-keyframes foldBlockly { - from {} - to {left: 64px;} -} - -@-moz-keyframes foldBlockly { - from {} - to {left: 64px;} -} - -@-webkit-keyframes foldBlockly { - from {} - to {left: 64px;} -} - -.entryBlocklyWorkspace.foldOut { - z-index:300; - .animation-duration(0.7s); - .animation-name(foldOutBlockly); - .animation-fill-mode(forwards); -} - -@keyframes foldOutBlockly { - from {left: 64px;} - to {} -} - -@-o-keyframes foldOutBlockly { - from {left: 64px;} - to {} -} - -@-ms-keyframes foldOutBlockly { - from {left: 64px;} - to {} -} - -@-moz-keyframes foldOutBlockly { - from {left: 64px;} - to {} -} - -@-webkit-keyframes foldOutBlockly { - from {left: 64px;} - to {} -} - -.entryBlocklyPhone { - position: absolute; - top: 0px; - left: 56px; - right: 0px; - bottom: 0px; - overflow: hidden; - border: solid 1px #C4C4B9; - border-left: 0; - .backgroundImage("entry_bg_1.png"); -} - -#entryCategorymoving { - /*border-right: 4px solid #A751E3;*/ - .backgroundImage("movement.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategorymoving { - /*border-left: 4px solid #A751E3;*/ - border-right: none; -} - -#entryCategorylooks { - /*border-right: 4px solid #EC4466;*/ - .backgroundImage("looks.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategorylooks { - /*border-left: 4px solid #EC4466;*/ - border-right: none; -} - -#entryCategorybrush { - /*border-right: 4px solid #FF9E20;*/ - .backgroundImage("brush.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategorybrush { - border-right: none; -} - -#entryCategorytext { - .backgroundImage("postbox_new.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategorytext { - border-right: none; -} - -#entryCategorysound { - .backgroundImage("sound.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategorysound { - border-right: none; -} - -#entryCategorystart { - .backgroundImage("start.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategorystart { - border-right: none; -} - -#entryCategoryflow { - .backgroundImage("flow.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategoryflow { - border-right: none; -} - -#entryCategoryjudgement { - .backgroundImage("judgement.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategoryjudgement { - border-right: none; -} - -#entryCategorycalc { - .backgroundImage("calc.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategorycalc { - border-right: none; -} - -#entryCategoryvariable { - .backgroundImage("variable.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategoryvariable { - border-right: none; -} - -#entryCategoryfunc { - .backgroundImage("function.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategoryfunc { - border-right: none; -} - -#entryCategoryscene { - border-right: none; - .backgroundImage("scene.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategoryscene { - border-left: none; - border-right: none; -} - -#entryCategoryarduino { - .backgroundImage("arduino.png"); - background-repeat: no-repeat; -} - -.entrySelectedCategory#entryCategoryarduino { - border-right: none; -} - -.entryToastContainer { - position: fixed; - right: 0px; - bottom: 0px; - margin: 0px; - padding: 10px; - width: 300px; - max-height: 100%; - overflow: auto; - z-index: 9000; -} - -.entryToast { - padding: 7px 16px; - margin-top: 8px; - width: 100%; - background-color: #eee; - box-shadow: #999 0 0 8px; - border: 2px solid; - .border-radius(4px); - .transition(opacity .25s ease-in-out); - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - cursor: pointer; - opacity: 1; -} - -.entryToastSuccess { - border-color: #d6e9c6; - background-color: #e5f3df; - color: #468847; -} - -.entryToastWarning { - border-color: #7e719; - background-color: #fff9ab; - color: #e07000; -} - -.entryToastAlert { - color: #b94a48; - background-color: #f2dede; - border-color: #eed3d7; -} - -.entryToastTitle { - font-size: 12pt; - font-weight: bold; -} - -.entryToastMessage { - font-size: 9pt; - margin-top: 4px; - margin-bottom: 2px; -} - -.entryPopup { - position: absolute; - margin: 0; - padding: 0; - top: 0; - left: 0; - height: 100%; - width: 100%; - z-index: 7000; - background-color: rgba(0, 0, 0, 0.2); -} - -.entryPopupWindow { - width: 80%; - height: 80%; - position: absolute; - left: 0; right: 0; - top: 0; bottom: 0; - margin: auto; - max-width: 100%; - max-height: 100%; - /*overflow: hidden;*/ - z-index: 8000; - background-color: white; -} - - -#entryTextColourTable { - margin-top: 12px; - cursor: pointer; - border-collapse: collapse; -} - - -.entryTd { - width: 22px; - height: 22px; -} - -.entryTdTransparent { - width: 20px; - height: 20px; - background-color: white; - background-image: -webkit-linear-gradient(135deg, transparent 11.5px, rgb(255,0,0) 13px, rgba(255,255,255,.5) 14.5px); - border: 1px solid; -} - -.nav_right_wrapper { - right: 0; -} - -.navbar-default { - background-color: #89c1e4; - border-color: #89c1e4; - /*background-color: #4accaa; - border-color: #4accaa;*/ -} - -#project_name.normal { - background-color: #89c1e4; - /*background-color: #4accaa;*/ -} - - -.btn-group > .btn { - background-color: transparent; - border-color: transparent; - /*background-color: #4accaa; - border-color: #4accaa;*/ -} - -.art_project_name { - background-color: white !important; -} - -.art_project_name:hover { - border: 1px solid #b4b4b4 !important; -} - -.entryObjectCoordinateSpanWorkspace { - float: left; - position: absolute; -} - -.entryObjectCoordinateSpanWorkspace:nth-child(3) { - float: left; - margin-left: 57px; -} - - -.entryObjectCoordinateSizeWorkspace { - float: left; - margin-left: 113px; - position: absolute; -} - -.entryObjectCoordinateInputWorkspace { - width: 40px; - height: 20px; - position: absolute; - float: left; - margin: -2px 5px 0px 15px; - background-color: #e5e5e5; - border: none; - border: 1px solid transparent; -} - -.entryObjectCoordinateInputWorkspace_right { - margin-left: 70px; -} - -.entryObjectCoordinateInputWorkspace_size { - float: left; - position: absolute; - margin-left: 145px; -} - -.entryObjectCoordinateInputWorkspace:focus, -.entryObjectRotateInputWorkspace:focus, -.entryObjectDirectionInputWorkspace:focus{ - background-color: transparent; -} - -.entryFunctionEdit { - position: absolute; - width: 100%; - height: 100%; - background-color: rgba(180,180,180, 0.4) !important; - z-index: 50; -} - -#entryFunctionBtnWrapper { - position: absolute; - z-index: 100; - bottom: 90px; - margin: 0 auto; - left: 50%; -} - -.entryFunctionBtn { - position: relative; - display: inline-block; - cursor: pointer; - border: solid 3px #888; - color: #666; - width: 55px; height: 55px; - border-radius: 27.5px; - text-align: center; - line-height: 48px; - left: -50%; -} - -.entryFunctionBtn:hover { - border: solid 3px #555; - color: #222; -} - -#entryFunctionCancel { -} - -#entryFunctionSave { - margin-right: 20px; -} - -/* Painter css start */ -.entryPlaygroundPainter { - position: absolute; - left: 240px; - top: 0; - bottom: 0; - right: 0; - overflow: hidden; - border-left: 2px solid #c4c4b9; - background-color: #fff; -} - -.entryPlaygroundPainterTop { - position: absolute; - display: block; - width: 100%; - - left:55px; - background-color: #634cd9; - height: 29px; -} - -.entryPlaygroundPainterTopMenu ul ul { - display: none; - margin-top: 5px; - margin-left: -8px; -} - -/*.entryPlaygroundPainterTopMenu ul ul { - background: #5f6975; - border-radius: 0px; - padding: 0; - position: absolute; - top: 100%; - width: 120px; -}*/ -.entryPlaygroundPainterTopMenu> li { - list-style-type: none; - top:100%; - width: 120px; -} - -/*.entryPlaygroundPainterTopMenu ul ul ul { - position: absolute; - color:black; - left: 100%; - top:0; -}*/ - -/*.entryPlaygroundPainterTopMenu ul ul li { - float: none; - border-top: 1px solid #6b727c; - border-bottom: 1px solid #575f6a; - position: relative; - cursor: pointer; - color:black; -}*/ - -.entryPlaygroundPainterTopMenu ul ul li a { - padding: 10px; - /*color: #fff;*/ - color:black; -} - -.entryPlaygroundPainterTopMenu ul ul li a:hover { - background: white; - color:black; -} -.entryPlaygroundPainterTopMenu li a:hover { - background: #4b545f; - color:white; - -} -.entryPlaygroundPainterTopMenu ul li:hover > ul { - display: block; -} -.entryPlaygroundPainterTopMenu ul li a:hover{ - background-color:#3b329e; -} - -.entryPlaygroundPainterTopMenu ul { - padding: 0; - border-radius: 0; - height: 50px; - list-style: none; - position: relative; - display: inline-table; - z-index: 100; -} - -.entryPlaygroundPainterTopMenu ul:after { - content: ""; - clear: both; - display: block; -} -.entryPlaygroundPainterTopMenuEdit:hover { - background-color: #3b329e; -} - -/*.entryPlaygroundPainterTopMenu ul li { - float: left; -}*/ - -/*.entryPlaygroundPainterTopMenu ul li:hover { - background: #4b545f; -}*/ -/*.entryPlaygroundPainterTopMenu ul li:hover { - background-color: #3b329e !important; - font:bold; -}*/ - -.entryPlaygroundPainterTopMenu ul li a { - display: block; - padding: 5px 10px; - color: white; - text-decoration: none; -} -#entryPainterTopMenuEdit>ul>li{ - border-bottom:solid 1px #643cd9; - border-left:solid 1px #643cd9; - border-right:solid 1px #643cd9; - background-color: white; - font-family: nanumBarunRegular !important; -} -#entryPainterTopMenuEdit>ul>li{ - background-color:white; - border-bottom:solid 1px #643cd9; -} -#entryPainterTopMenuEdit>ul>li>:hover{ - background-color:#643cd9; - color:white; -} -#entryPainterTopMenuEdit{ - color: white; -} - -#entryPainterTopMenuFile>ul>li{ - border-bottom:solid 1px #643cd9; - border-left:solid 1px #643cd9; - border-right:solid 1px #643cd9; - background-color: white; - font-family: nanumBarunRegular !important; -} -#entryPainterTopMenuFile>ul>li{ - background-color:white; - border-bottom:solid 1px #643cd9; -} -#entryPainterTopMenuFile>ul>li>:hover{ - background-color:#643cd9; - color:white; -} -#entryPainterTopMenuFile{ - color: white; -} - - -.entryPlaygroundPainterTopStageXY { - position:absolute; - width: 150px; - height: 30px; - top: 5px; - left: 280px; - font-size: 10pt; - color:white; -} - -.entryPlaygroundPainterTopToolbar { - position: absolute; - top: 0; - list-style-type: none; - margin: 0; - padding: 0; - right: 170px; - width: 100px; - height: 30px; -} -.entryPlaygroundPainterFlip { - width: 200px; -} -.entryPlaygroundPainterFlipY { - position: absolute; - top:90px; - left: 90px; - .backgroundImage("horizontal.png"); - background-repeat: no-repeat; - border-radius: 3px; - width: 28px; - height: 28px; -} -.entryPlaygroundPainterFlipX { - position: absolute; - top:90px; - left: 60px; - .backgroundImage("vertical.png"); - background-repeat: no-repeat; - border-radius: 3px; - width: 28px; - height: 28px; -} - -.entryPlaygroundPainterTopToolbar>li { - float: left; - position: relative; - left: 0; - margin: 2px 5px; - width: 35px; - height: 25px; - text-align: center; - line-height: 30px; - cursor: pointer; -} - -.entryPlaygroundPainterToolbox { - position: absolute; - height: 100%; - width: 54px; - - background-color: #f5f5f5; -} - -.entryPlaygroundPainterToolboxContainer li { - cursor: pointer; - top: 16px; -} - -.entryPlaygroundPainterToolboxSelected { - background-color: #ccc; -} - -.entryPlaygroundPainterContainer { - position: absolute; - top: 30px; - left: 56px; - background-color: transparent; - overflow: scroll; -} - -.entryPlaygroundPainterCanvas { - position: absolute; - top: 0; - left: 0; - width: 960px; - height: 540px; -} - -.entryPlaygroundPainterAttr { - position: absolute; - top:342px; - width: 100%; - height: 192px; - background-color: #f5f5f5; - padding-left: 6px; - left:54px; -} - -.entryPlaygroundPainterToolboxContainer { - list-style-type: none; - margin: 0; - padding: 0; -} - -.entryPlaygroundPainterToolboxContainer>li { - float: left; - position: relative; - left: 8px; - margin: 5px 5px; - width: 27px; - height: 27px; - background-color: #fff; - font-size: 9pt; - color: #000; - text-align: center; - line-height: 40px; - -} - -.entryPlaygroundPainterAttrResize{ - position: absolute; - top: 4px; - left: 5px; - padding: 4px; -} -.entryPlaygroundPainterAttrResize>legend { - background-color: transparent; - padding: 2px; - width: 30px; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; -} -.entryPlaygroundPainterAttrResize>span { - font-size: 9pt; - padding: 2px; - margin: 0; -} -.painterAttrRotateTop { - padding-left: 28px; - color: white; -} -.entryPlaygroundPainterAttrRotate { - position: absolute; - top:77px; - left: 10px; - width: 40px; - height: 40px; - background-color: #643cd9; - border-radius: 3px; -} -.entryPlaygroundPainterSizeText { - position: absolute; - left: 48px; - width:10px; - color:black; -} -.painterAttrRotateTop { - width: 40px; - height: 10px; -} -.entryPlaygroundPainterNumberInput { - width: 30px; - font-size: 9pt; - color:white; - padding-left:3px; - padding-right:3px; -} -.entryPlaygroundPainterAttrOpacity { - position: absolute; - top: 77px; - left: 65px; - border-radius: 3px; - background-color: #643cd9; -} -.entryPlaygroundPainterAttrOpacity>legend { - background-color: transparent; - padding: 2px; - width: 45px; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; -} -.entryPlaygroundPainterAttrOpacity>span { - font-size: 9pt; - padding: 2px; - margin: 0; -} -.entryPlaygroundPainterNumberInput { - width: 30px; - font-size: 9pt; -} -.entryPlaygroundPainterAttrColor { - position: absolute; - left: 210px; - top:20px; - width: 160px; - padding: 4px; -} -.entryPlaygroundPainterAttrColor>legend { - background-color: transparent; - padding: 2px; - width: 35px; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; -} -.entryPlaygroundPainterAttrColorElement { - float:left; - width: 15px; - height: 15px; -} - -.entryPlaygroundPainterAttrThick { - position: absolute; - top: 20px; - left: 2px; - background-color: #643cd9; - border-radius: 3px; -} -.entryPlaygroundPainterAttrThick > legend { - position:absolute; - top:-30pxpx; - background-color: transparent; - padding: 2px; - width: 60px; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; -} -.entryPlaygroundPainterAttrThickInput { - font-size: 9pt; -} -.entryPlaygroundPainterAttrRect { - position: absolute; - top: 40px; - left: 490px; - padding: 4px; - border: 1px solid #000; -} -.entryPlaygroundPainterAttrRect>legend { - background-color: transparent; - padding: 2px; - width: 60px; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; -} -.entryPlaygroundPainterAttrRectFilled { - width: 15px; - height: 15px; - background-color: #000; - border: 1px solid #000; - float: left; -} -.entryPlaygroundPainterAttrRectEmpty { - width: 15px; - height: 15px; - background-color: #fff; - border: 1px solid #000; - float: right; -} -.entryPlaygroundPainterAttrFont { - position: absolute; - left: 0px; - padding: 4px; - width: 100px; - height:40px; -} -.entryPlaygroundPainterAttrTop { - position: absolute; - top:20px; - width:93px; - height:40px; - border-radius: 3px; - color: white; - background-color: #643cd9; -} -.entryPlaygroundPaintAttrTop_ { - width: 93px; - height:10px; -} -.entryPlaygroundPainterAttrFont>legend { - background-color: transparent; - width: 60px; - margin-bottom: 0; - border-bottom: 0; - font-size: 9pt; -} - -.painterAttrFontSizeArea { - position: absolute; - top: 70px; - background-color: #643cd9; - width:44px; - height:40px; - color:white; - border-radius: 3px; -} -.painterAttrFontSizeTop { - width:40px; - height: 10px; -} -.entryPlaygroundPainterAttrFontName , .entryPlaygroundPainterAttrFontSize, .entryPlaygroundPainterAttrFontStyle{ - background: transparent; - border:0px; -} -.entryPlaygroundPainterAttrFontStyleArea { - position:absolute; - background-color: #643cd9 ; - top:120px; - width:67px; - height: 40px; - border-radius: 3px; - color:white; -} -.entryPlaygroundPainterAttrFontStyle option{ - color: black; -} -.entryPlaygroundPainterAttrFontSize option{ - color: black; -} -.entryPlaygroundPainterAttrFontName option{ - color:black; -} -.entryPlaygroundPainterAttrFontTop { - width:67px; - height: 10px; -} -/* Painter css finish */ - -.temp-element { - visibility: hidden; - white-space: pre; -} - -.highlight { - margin:0; - color:white; - width:120px; - float: left; - list-style:none; - display: block; -} - -.entryVariableAddSpaceWorkspace { - padding: 0; - padding-left: 16px; - padding-right: 16px; - margin: 0; - /*height: 215px;*/ - height: 200px; - background-color: white; - border: 1px solid #a8a8a8; -} - -.entryVariableAddSpaceNameWrapperWorkspace { - height: 28px; - margin-top: 16px; - .backgroundImage("list_icon_question_1.png"); - background-repeat: no-repeat; -} - -.entryVariableAddSpaceNameWrapperWorkspace.entryListAddSpaceNameWrapperWorkspace { - .backgroundImage("list_icon_list_1.png"); -} - -.entryVariableAddSpaceInputWorkspace { - width: 80%; - margin-left: 42px; - margin-top: 2px; -} - -.entryVariableAddSpaceGlobalWrapperWorkspace { - margin-top: 16px; - color: #5e5e5e; - font-size: 11px; - position: relative; - cursor: pointer; -} - -.entryVariableAddSpaceCheckWorkspace { - display: inline-block; - width: 10px; - height: 10px; - border-radius: 2px; - margin-top: 2px; - position: absolute; - right: 17px; - border: 1px solid gray; -} - -.entryVariableAddSpaceCheckWorkspace.entryVariableAddChecked { - /*background-color: gray;*/ - .backgroundImage("check_on.png"); - background-repeat: no-repeat; -} - -.entryVariableAddSpaceLocalWrapperWorkspace { - color: #5e5e5e; - font-size: 11px; - position: relative; - margin-top: 12px; - cursor: pointer; - padding-bottom: 10px; - border-bottom: 1px solid #a8a8a8; -} - -.entryVariableAddSpaceCloudWrapperWorkspace { - padding-top: 8px; -} - -.entryVariableAddSpaceCloudWrapperWorkspace { - cursor: pointer; - color: #5e5e5e; - font-size: 11px; - position: relative; -} - -.entryVariableAddSpaceUnCheckedWorkspace { - color: #afafaf; -} - -.entryVariableAddSpaceCloudCheckWorkspace { - margin-top: -12px; -} - -.entryVariableAddSpaceButtonWrapperWorkspace { - margin-top: 12px; -} - -.entryVariableAddSpaceButtonWorkspace { - font-size: 11px; - display: inline-block; - width: 48px; - height: 24px; - border: 2px solid gray; - text-align: center; - line-height: 22px; - cursor: pointer; - float: right; -} - -.entryVariableAddSpaceCancelWorkspace { - margin-left: 7px; -} - -.entryVariableSplitterWorkspace { - height: 25px; - font-size: 11px; - border: 1px solid #a8a8a8; - border-top: none; - line-height: 25px; - padding-left: 9px; -} - -/*first element after splitter should not have border-top*/ -.entryVariableSplitterWorkspace + .entryVariableListElementWorkspace { - border-top: none; -} - -.entryVariableListCallerListWorkspace + .entryVariableListElementWorkspace { - border-top: none; -} - -.entryPlaygroundPainterTopMenuFileNew { - position: absolute; - color:white; - left: 20px; - top:0px; - padding: 4px; - height:28px; - cursor: pointer; - list-style: none; - font-family: nanumBarunBold !important; -} -.entryPlaygroundPainterTopMenuFileSave { - position: absolute; - color:white; - padding-left:8px; - left: 95px; - top: 0px; - padding-top:4px; - height:28px; - width:70px; - cursor: pointer; - font-family: nanumBarunBold !important; -} -.entryPlaygroundPainterTopMenuFileSave:hover,.entryPlaygroundPainterTopMenuFileNew:hover { - background-color: #3b329e !important; -} - -.entryPlaygroundPainterTopMenuEdit { - position: absolute; - color:white; - padding-left:8px; - left: 158px; - height:28px; - width:55px; - cursor: pointer; - margin-top: -4px; - padding-top: 3px; - font-family: nanumBarunBold !important; -} -.entryPlaygroundPainterTopMenuEdit>li { - list-style-type: none; -} - -.entryPlaygroundPainterTopMenuFile:extend(.entryPlaygroundPainterTopMenuEdit) { - left: 100px; -} -.entryPlaygroundPainterTopMenuFile>li { - list-style-type: none; -} - - -.entryPlaygroundPainterToolboxPen { - .backgroundImage("off_pen.png"); - background-repeat: no-repeat; -} -.entryPlaygroundPainterToolboxPen:hover { - .backgroundImage("on_pen.png"); -} - -.entryPlaygroundPainterToolboxLine { - .backgroundImage("off_line.png"); -} -.entryPlaygroundPainterToolboxLine:hover { - .backgroundImage("on_line.png"); -} - -.entryPlaygroundPainterToolboxRect { - .backgroundImage("off_square.png"); -} -.entryPlaygroundPainterToolboxRect:hover { - .backgroundImage("on_square.png"); -} -.entryPlaygroundPainterToolboxCircle { - .backgroundImage("off_circle.png"); -} -.entryPlaygroundPainterToolboxCircle:hover { - .backgroundImage("on_circle.png"); -} - -.entryPlaygroundPainterToolboxCursor { - -} - -.entryPlaygroundPainterToolboxSelect { - -} -.entryPlaygroundPainterToolboxSelect:hover { - .backgroundImage("on_choice.png"); -} - -.entryPlaygroundPainterToolboxText { - .backgroundImage("off_text.png"); -} -.entryPlaygroundPainterToolboxText:hover { - .backgroundImage("on_text.png"); -} - -.entryPlaygroundPainterToolboxFill { - .backgroundImage("off_paint.png"); -} -.entryPlaygroundPainterToolboxFill:hover { - .backgroundImage("on_paint.png"); -} - -.entryPlaygroundPainterToolboxErase { - .backgroundImage("off_eraser.png"); -} -.entryPlaygroundPainterToolboxErase:hover { - .backgroundImage("on_eraser.png"); -} -.entryPlaygroundPainterToolboxSelect { - .backgroundImage("off_choice.png"); -} - -.entryPlaygroundPainterToolboxCoordinate { - .backgroundImage("off_center.png"); -} -.entryPlaygroundPainterToolboxCoordinate:hover { - .backgroundImage("on_center.png"); -} -.entryPlaygroundPainterToolboxGlasses { - .backgroundImage("off_zoom.png"); -} -.entryPlaygroundPainterToolboxGlasses:hover { - .backgroundImage("on_zoom.png"); -} -.entryPlaygroundPainterToolboxCursor { - .backgroundImage("off_hand.png"); -} -.entryPlaygroundPainterToolboxCursor:hover { - .backgroundImage("on_hand.png"); -} -.entryPlaygroundPainterAttrResizeX { - position:absolute; - top:17px; - background-color: transparent; - width:40px; - height:40px; - background-color: #643cd9; - border-radius: 3px 3px 3px 3px; -} -.entryPlaygroundPainterAttrResizeXTop { - width:40px; - height:10px; - border-radius: 3px 3px 0 0; - background-color: #643cd9; - padding: 0 0 0 3px ; - font-size:11px; - color: white; -} -.entryPlaygroundPainterAttrResizeXBottom { - width:40px; - height:10px; - border-radius: 0 0 3px 3px; - background-color: #aaa; -} -.entryPlaygroundPainterNumberInput{ - width:40px; - height:20px; - background-color: transparent; - border:0px; -} - -.entryPlaygroundPainterAttrResizeYTop { - width:40px; - height:10px; - border-radius: 3px 3px 0 0; - background-color: #643cd9; - padding: 0 0 0 3px ; - font-size:11px; - color: white; -} -.entryPlaygroundPainterAttrResizeYBottom { - width:40px; - height:10px; - border-radius: 0 0 3px 3px; - background-color: #643cd9; -} -.entryPlaygroundPainterAttrResize { - float: left; - width: 100px; -} -.entryPlaygroundAttrReiszeY { - position: absolute; - top:17px; - left:60px; - width:40px; - height:40px; - background-color: #643cd9; - border-radius: 3px; - -} -.entryPlaygroundPainterspace{ - position:absolute; - left:50px; - top:35px; - width:20px; -} -.entryPlaygroundPainterRotateArea{ - position:absolute; - top:90px; - left:19px; - width: 40px; - height:40px; - background-color: #643cd9; - border-radius: 3px; -} -.entryPlaygroundPainterRotateAreaTop{ - height: 10px; - width: 20px; -} -.entryPlaygroundPainterRotateArea_{ - height: 10px; - width: 40px; -} -.entryPlaygroundPainterNumberInput{ - height: 20px; -} - -.entryPlaygroundPainterAttrOpacity{ - width: 40px; - height: 40px; -} - -.entryPlaygroundPainterAttyOpacityTop { - width: 40px; - height: 10px; - color: white; - padding-left:25px; -} - -.entryPlaygroundPainterNumberInput { - width:40px; - height:20px; - -} - -.entryPlaygroundPainterRotateName { - position:absolute; - top:70px; - left:20px; -} - -.entryPlaygroundPainterOpacityName { - position:absolute; - top:70px; - left:80px; -} - -.paintAttrThickTop { - width: 40px; - height: 10px; -} - -.entryPlaygroundPainterAttrThickInput { - width: 45px; - height: 20px; - background-color: transparent; - border: 0px; - color: white; -} -.entryPlaygroundPainterAttrThickInput option { - color:black; - border: 1px solid; -} - -.entryPlaygroundPainterAttrThick { - width: 45px; - height: 40px; -} - -.painterAttrBackgroundName { - width: 45px; - height: 20px; - background-color: transparent; - color: black; - border:0px; - position: absolute; - top: 60px; - font-size: 9pt; -} - -.paintAttrBackgroundTop { - position: absolute; - top: 77px; - left: 2px; - background-color: #643cd9; - border-radius: 3px; - font-size: 11pt; -} - -.painterAttrShapeLineColor { - position: absolute; - top: 18px; - left: 154px; - width: 40px; - height: 40px; - background-color: #000; -} - -.painterAttrShapeBackgroundColor { - position: absolute; - top: -57px; - left: 140px; - width: 40px; - height: 40px; - background-color: #000; -} - -.entryPlaygroundPainterAttrFGButton { - .backgroundImage("square_on_in.png"); - background-repeat: no-repeat; - width: 42px; - height: 42px; - cursor: pointer; -} - -.painterAttrShapeInnerBackground { - width: 20px; - height: 20px; - background: #f5f5f5; - margin: 10px; - -} - -.entryPlaygroundPainterAttrBGButton { - .backgroundImage("square_off_out.png"); - background-repeat: no-repeat; - width: 42px; - height: 42px; - cursor: pointer; -} - -.painterAttrColorSpoid { - position: absolute; - top:150px; - left:330px; - width:27px; - height:27px; - background-repeat: no-repeat; - .backgroundImage("color_off_spoid.png"); -} - -.painterAttrColorSpoidClicked { - position: absolute; - top:150px; - left:330px; - width:27px; - height:27px; - background-repeat: no-repeat; - .backgroundImage("color_on_spoid.png"); -} - -.painterAttrColorTransparent { - position: absolute; - top:150px; - left:300px; - width:27px; - height:27px; - background-repeat: no-repeat; - .backgroundImage("color_off_spoid_1.png"); -} - -.painterAttrRotateName ,.painterAttrOpacityName { - position:absolute; - background-color: transparent; - margin-bottom: 0; - border-bottom: 0; - left: 2px; - padding:2px; - font-size:9pt; -} - -.painterAttrThickName { - position:absolute; - background-color: transparent; - margin-bottom: 0; - border-bottom: 0; - font-size:9pt; - padding-top: 2px ; -} -.painterAttrRotateName{ - top:60px; - left:9px; - width:30px; -} - -.painterAttrOpacityName{ - top:60px; - left:65px; - width:50px; -} -/* -.painterAttrThickName { - top:115px; - left:10px; -} -*/ -.painterAttrCircleArea{ - position: absolute; - left:150px; - top:20px; -} - -/*.painterInnerCircle { - width: 20px; - height: 20px; - background: #000000; - margin: 9px; -}*/ - -.painterAttrCircle { - width: 40px; - height: 40px; - top: 13px; - position: absolute; - left: 5px; - background-color: black; -} -.painterAttrCircleInput { - position:absolute; - top: 65px; - width: 50px; - height: 15px; - font-size: 5pt; -} - -.entryPlaygroundPainterAttrButtonGroup > div{ - position: absolute; - top: 70px; - width: 42px; - height: 42px; - background-color: #fff; -} - -.entryPlaygroundPainterAttrFGButton { - - left: 0px; -} -.entryPlaygroundPainterAttrBGButton { - left: 55px; -} -.btn_code, .btn_undo_workspace { - margin-left: 15px; -} - -.entryPlaygroundPictureOrder, -.entryPlaygroundSoundOrder { - width: 15px; - height: 100%; - float: left; - line-height: 57px; - font-size: 10px; - text-align: center; - background-color: #d8d8d8; -} - -.entryPictureSelected .entryPlaygroundPictureOrder { - background-color: #634cd9; - color: white; -} -.deleteChild> * { - display: none; -} - - -.entryPlaygroundPainterAttrAddButton { - .backgroundImage("fill_in.png"); -} - -.entryPlaygroundPainterAttrRemoveButton { - .backgroundImage("fill_out.png"); -} -.painterAttrColorSpoid:hover { - .backgroundImage("color_on_spoid_1.png"); - background-repeat: no-repeat; -} - -.displayPaintArea { - display: none !important; - position: absolute !important; -} - -.displayOpacityArea { - position:absolute; - top:-56px; - left:0px; - -} -.displayThickArea { - position:absolute; - top:-112px; - width:50px; - left:0px; -} -.displayFontArea { - position:absolute; - top:0px; - left:0px; - font:9px; -} -.displayRotateArea{ - position:absolute; - top:-56px; - left:0px; -} -.entryPlaygroundPainterAttrLineStyle { - position: absolute; - top: 140px; - left: 230px; - background-repeat: no-repeat; -} -.entryPlaygroundPainterAttrLineStyle:hover { - background-repeat: no-repeat; -} -.entryPlaygroundPainterAttrLineStyleLine { - position: absolute; - top: 10px; - .backgroundImage("line1_category_off.png"); - background-repeat: no-repeat; - background-color: #f5f5f5; - width: 76px; - height: 24px; -} -.entryPlaygroundPainterAttrLineStyleLine:hover { - .backgroundImage("line1_category_on.png"); - background-repeat: no-repeat; -} - -.entryPlaygroundPainterAttrLineStyleDot1 { - position: absolute; - top: -9px; - left:1px; - .backgroundImage("line2_off.png"); - background-repeat: no-repeat; - background-color: #f5f5f5; - width: 75px; - height: 20px; -} -.entryPlaygroundPainterAttrLineStyleDot1:hover { - .backgroundImage("line2_on.png"); - background-repeat: no-repeat; -} - -.entryPlaygroundPainterAttrLineStyleDot2 { - position: absolute; - top: -29px; - left:1px; - .backgroundImage("line3_off.png"); - background-repeat: no-repeat; - background-color: #f5f5f5; - width: 75px; - height: 20px; -} -.entryPlaygroundPainterAttrLineStyleDot2:hover { - .backgroundImage("line3_on.png"); - background-repeat: no-repeat; -} -.entryPlaygroundPainterAttrLineStyleDot3 { - position: absolute; - top: -48px; - left:1px; - .backgroundImage("line4_off.png"); - background-repeat: no-repeat; - background-color: #f5f5f5; - width: 75px; - height: 19px; -} -.entryPlaygroundPainterAttrLineStyleDot3:hover { - .backgroundImage("line4_on.png"); - background-repeat: no-repeat; -} -.entryPlaygroundPainterAttrLineStyleLine1 { - position: absolute; - top: -67px; - left:1px; - .backgroundImage("line1_off.png"); - background-repeat: no-repeat; - background-color: #f5f5f5; - width: 75px; - height: 19px; - border-radius: 4px; -} -.entryPlaygroundPainterAttrLineStyleLine1:hover { - .backgroundImage("line1_on.png"); - background-repeat: no-repeat; -} -.painterAttrLineStyleBackgroundDot1, .painterAttrLineStyleBackgroundDot2, .painterAttrLineStyleBackgroundDot3,.painterAttrLineStyleBackgroundLine{ - - position: absolute; - top: 10px; - background-repeat: no-repeat; - background-color: #f5f5f5; - width: 76px; - height: 21px; -} -.painterAttrLineStyleBackgroundDot1 { - .backgroundImage("line2_category_off.png"); -} -.painterAttrLineStyleBackgroundDot2 { - .backgroundImage("line3_category_off.png"); -} -.painterAttrLineStyleBackgroundDot3 { - .backgroundImage("line4_category_off.png"); -} -.painterAttrLineStyleBackgroundLine { - .backgroundImage("line1_category_off_1.png"); -} -.painterAttrLineStyleBackgroundDot1:hover { - .backgroundImage("line2_category_on.png"); - background-repeat: no-repeat; -} -.painterAttrLineStyleBackgroundDot2:hover { - .backgroundImage("line3_category_on.png"); - background-repeat: no-repeat; -} - -.painterAttrLineStyleBackgroundDot3:hover { - .backgroundImage("line4_category_on.png"); - background-repeat: no-repeat; -} -.painterAttrLineStyleBackgroundLine:hover { - .backgroundImage("line1_category_on_1.png"); - background-repeat: no-repeat; -} -.entryToolboxCursorClicked { - .backgroundImage("on_hand_1.png"); -} -.entryToolboxSelectClicked { - .backgroundImage("on_choice_1.png"); -} -.entryToolboxPenClicked { - .backgroundImage("on_pen_1.png"); -} -.entryToolboxLineClicked { - .backgroundImage("on_line_1.png"); -} -.entryToolboxRectClicked { - .backgroundImage("on_square_1.png"); -} -.entryToolBoxCircleClicked { - .backgroundImage("on_circle_1.png"); -} -.entryToolBoxTextClicked { - .backgroundImage("on_text_1.png"); -} -.entryToolBoxFillClicked { - .backgroundImage("on_paint_1.png"); -} -.entryToolBoxEraseClicked { - .backgroundImage("on_eraser_1.png"); -} - -.dd { - cursor:url("@{image_url}cursor_eraser.cur"); -} -/* helper */ -@keyframes blockHelperUp { - 0% {top: 100%;} - 100%{top: 0%;} -} - -@-o-keyframes blockHelperUp { - 0% {top: 100%;} - 100%{top: 0%;} -} - -@-ms-keyframes blockHelperUp { - 0% {top: 100%;} - 100%{top: 0%;} -} - -@-moz-keyframes blockHelperUp { - 0% {top: 100%;} - 100%{top: 0%;} -} - -@-webkit-keyframes blockHelperUp { - 0% {top: 100%;} - 100%{top: 0%;} -} - -@keyframes blockHelperDown { - 0% {top: 0%;} - 100%{top: 100%;} -} - -@-o-keyframes blockHelperDown { - 0% {top: 0%;} - 100%{top: 100%;} -} - -@-ms-keyframes blockHelperDown { - 0% {top: 0%;} - 100%{top: 100%;} -} - -@-moz-keyframes blockHelperDown { - 0% {top: 0%;} - 100%{top: 100%;} -} - -@-webkit-keyframes blockHelperDown { - 0% {top: 0%;} - 100%{top: 100%;} -} - -#entryBlockHelperWorkspace { - position: absolute; - bottom: 0; - width: 100%; - height: 100%; - background-color: #fff; - .animation-name(blockHelperUp); - .animation-duration(0.6s); -} - -#entryBlockHelperWorkspace.lecture { - .animation-duration(0.0s); -} - -#entryBlockHelperWorkspace.dispose { - .animation-name(blockHelperDown); -} - -#entryBlockHelperHeaderWorkspace { - position: absolute; - width: 100%; - height: 40px; - background-color: #1bafea; - font-size: 16px; - line-height: 38px; - padding-left: 28px; - color: #fff; -} - -#entryBlockHelperDisposeWorkspace { - float: right; - .backgroundImage("block_helper_dispose.png"); - background-repeat: no-repeat; - background-position: center; - padding: 15px; - margin-top: 4px; - margin-right: 5px; -} - -#entryBlockHelperContentWorkspace { - position: absolute; - width: 100%; - top: 40px; - bottom: 0px; - overflow-y: auto; - overflow-x: hidden; -} - -#entryBlockHelperContentWorkspace.lecture { - top: 40px; -} - -.entryBlockHelperIntro { - .backgroundImage("block_help_icon.png"); - background-repeat: no-repeat; - background-position: center top; - margin-top: 28px; - padding-top: 100px; - text-align: center; - color: #707070; - font-size: 12px; -} - -#entryBlockHelpBtn { - position: absolute; - .backgroundImage("block_help.png"); - background-repeat: no-repeat; - background-position: center; - padding: 15px; - margin-top: 3px; - margin-left: 6px; - z-index: 100; -} - -#entryBlockHelperBlockWorkspace { - position: absolute; - width: 400px; - height: 160px; - top: 16px; - left: 50%; -} - -#entryBlockHelperBlockWorkspace>svg { - position: relative; left: -50%; -} - -#entryBlockHelperDescriptionWorkspace { - position: absolute; - line-height: 20px; - width: 100%; - top: 100px; - font-size: 13px; - color: #707074; - padding: 0 50px; - text-align: center; -} - -.entryPlaygroundPainterTopMenuEdit>ul>li { - list-style-type: none; - width:120px; -} - -.entryPlaygroundPainterTopMenuFile>ul>li { - list-style-type: none; - width:120px; -} - -.entryPlaygroundPainterTopMenu>ul{ - position:absolute; - top:5px; -} -.entryPainterTopMenuEditImport { - height: 40px; -} - -.entryVariableSettingWorkspace { - width: 100%; - height: 165px; - border-top: 1px solid #a8a8a8; - padding-left: 16px; - padding-right: 16px; - font-size: 11px; - background-color: #efefef; -} - -.entryVariableSettingVisibleWrapperWorkspace { - padding-top: 22px; - cursor: pointer; -} - -.entryVariableSettingCheckWorkspace { - display: inline-block; - position: absolute; - width: 10px; - height: 10px; - border-radius: 2px; - left: 90px; - margin-top: 2px; - border: 1px solid gray; - color: #5e5e5e; -} - -.entryVariableAddSpaceCheckWorkspace.entryVariableAddChecked, -.entryVariableSettingCheckWorkspace.entryVariableSettingChecked { - /*background-color: gray;*/ - .backgroundImage("check_on.png"); - background-repeat: no-repeat; -} - -.entryVariableSettingInitValueWrapperWorkspace, -.entryVariableSettingSlideWrapperWorkspace, -.entryVariableSettingMinMaxWrapperWorkspace { - margin-top: 12px; -} - -.entryVariableSettingSlideWrapperWorkspace { - cursor: pointer; -} - -.entryVariableMinMaxDisabledWorkspace.entryVariableSettingMinMaxWrapperWorkspace { - color: #a8a8a8; -} - -.entryVariableSettingInitValueInputWorkspace { - margin-left: 33px; - border: 2px solid #a8a8a8; - padding-left: 5px; - width: 65%; -} - -.entryVariableSettingSplitterWorkspace { - width: 100%; - height: 1px; - background-color: #a8a8a8; - margin-top: 16px; -} - -.entryVariableSettingMinValueInputWorkspace, -.entryVariableSettingMaxValueInputWorkspace { - margin-left: 3px; - width: 22%; - border: 1px solid #afafaf; - padding-left: 5px; -} - -.entryVariableSettingMinValueInputWorkspace:disabled, -.entryVariableSettingMaxValueInputWorkspace:disabled { - background-color: #d3d3d3; -} - -.entryVariableSettingMaxValueSpanWorkspace { - margin-left: 5px; -} - -.entryVariableSettingButtonWrapperWorkspace { - margin-top: 18px; -} - -.entryVariableListElementWrapperWorkspace { - width: 100%; - height: 50px; -} - - -.entryListSettingWorkspace { - width: 100%; - padding-top: 24px; - padding-bottom: 5px; - border-top: 1px solid #a8a8a8; - padding-left: 16px; - padding-right: 16px; - font-size: 13px; - background-color: #efefef; -} - -.entryListSettingVisibleWrapperWorkspace { - cursor: pointer; -} - -.entryListSettingCheckWorkspace { - display: inline-block; - position: absolute; - width: 10px; - height: 10px; - border-radius: 2px; - left: 103px; - margin-top: 4px; - border: 1px solid gray; - color: #5e5e5e; -} - -.entryListSettingCheckedWorkspace { - /*background-color: gray;*/ - .backgroundImage("check_on.png"); - background-repeat: no-repeat; -} - -.entryListSettingLengthWrapperWorkspace { - margin-top: 15px; - overflow: hidden; -} - -.entryListSettingLengthControllerWorkspace { - margin-left: 5px; - height: 23px; - display: inline-block; - position: relative; -} - -.entryListSettingLengthSpanWorkspace { - float: left; - margin-top: 2px; -} - -.entryListSettingMinusWorkspace { - width: 23px; - height: 23px; - float: left; - .backgroundImage("list_minus.png"); - cursor: pointer; -} - -.entryListSettingLengthInputWorkspace { - float: left; - height: 23px; - margin-left: 5px; - margin-right: 5px; - padding-left: 5px; - border: 2px solid #a8a8a8; - width: 60px; -} - -.entryListSettingLengthInputWorkspace:focus { - border: 2px solid #1bafea; - outline: none; -} - -.entryListSettingPlusWorkspace { - width: 23px; - height: 23px; - float: left; - .backgroundImage("list_plus.png"); - cursor: pointer; -} - -.entryListSettingSeperatorWorkspace { - height: 1px; - background-color: gray; - margin-top: 10px; - margin-bottom: 10px; -} - -.entryListSettingListValuesWorkspace { - padding-left: 15px; - color: #a8a8a8; -} - -.entryListSettingValueWrapperWorkspace { - margin-bottom: 10px; - overflow: hidden; -} - -.entryListSettingEachInputWorkspace { - border: 2px solid #a8a8a8; - width: 130px; - float: left; - padding-left: 5px; -} - -.entryListSettingEachInputWorkspace:focus { - border: 2px solid #1baefa; - outline: none; -} - -.entryListSettingValueNumberSpanWorkspace { - width: 20px; - display: inline-block; - float: left; - margin-top: 3px; -} - -.entryListSettingValueRemoveWorkspace { - display: inline-block; - width: 16px; - height: 16px; - float: right; - margin-right: 10px; - margin-top: 4px; - cursor: pointer; - .backgroundImage("list_remove_button.png"); -} - -.entryEngineBigButtonMinimize_popup { - border: none; - display: none; - margin: 0; - padding: 0; - position: absolute; - left: 50%; - width: 111px; - height: 111px; - margin-left: -55.5px; - top: 50%; - margin-top: -55.5px; - background-repeat: no-repeat; - background-position: 40px center; - background-color: rgba(0,0,0,0.5); - border-radius: 55px; -} - -.entryEngineBigButtonMinimize_popup:hover { - opacity: 0.8; -} - -.entryEngineBigButtonMinimize_popup:focus { - outline: none; -} - -.entryEngineBigButtonMinimize_popup.entryEngineBigButtonMinimize_popup_run { - .backgroundImage("play_btn.png"); -} - -.entryPopupWindow .entryEngineBigButtonMinimize_popup { - display: block; -} - -.entryContainerTabViewWorkspace { - width: 100%; - height: 45px; - border-bottom: 2px solid #1bafea; -} - -.entryContainerTabItemWorkspace { - vertical-align: top; - height: 100%; - width: 25%; - text-align: center; - display: inline-block; - background-color: rgb(229, 229, 229); - color: rgb(158,159,159); - font-size: 13px; - cursor: pointer; - padding-top: 13px; -} - -.entryContainerTabItemWorkspace:nth-child(2) { - border-left: 2px solid white; - border-right: 2px solid white; -} - -.entryContainerTabItemWorkspace:nth-child(3) { - border-right: 2px solid white; -} - -.entryContainerTabItemWorkspace.selected { - background-color: #1bafea; - color: white; -} - -.entryContainerMovieWorkspace { -/* - position: absolute; - width: 100%; - top: 45px; - bottom: 0px; - - z-index: 1000; -*/ - position: absolute; - background-color: #363C46; - top: 0px; - width: 100%; - overflow: scroll; -} -.entryContainerMovieWorkspace::-webkit-scrollbar { - display: none; -} - -.entryContainerDoneWorkspace { - position: absolute; - width: 100%; - top: 0px; - background-color: #363C46; - overflow: hidden; - text-align: center; -} - - -.entryContainerHelperWorkspace { - position: absolute; - width: 100%; - top: 45px; - bottom: 0; - background-color: #fff; - z-index: 1000; - background: gray; -} - -.entryPlayground_text_buttons { - display: inline-block; - list-style-type: none; - margin: 0; - padding: 0; -} - -.entryPlayground_text_buttons > li { - float: left; - width: 32px; - height: 32px; - margin-left: 2px; - cursor: pointer; -} - -.entryPlaygroundTextAlignLeft { - .backgroundImage("text_align_left_off.png"); -} -.entryPlaygroundTextAlignLeft.toggle { - .backgroundImage("text_align_left_on.png"); -} - -.entryPlaygroundTextAlignCenter { - .backgroundImage("text_align_center_off.png"); -} -.entryPlaygroundTextAlignCenter.toggle { - .backgroundImage("text_align_center_on.png"); -} - -.entryPlaygroundTextAlignRight { - .backgroundImage("text_align_right_off.png"); -} -.entryPlaygroundTextAlignRight.toggle { - .backgroundImage("text_align_right_on.png"); -} - -.entryPlayground_fgColorDiv { - position: absolute; - width: 15px; - height: 4px; - margin-top: -15px; - margin-left: 345px; -} - -.entryPlayground_bgColorDiv { - position: absolute; - width: 15px; - height: 4px; - margin-top: -15px; - margin-left: 379px; -} -.entryPlayground_textBox { - margin-top: 5px; - height: 33px; - width: 400px; -} -.entryPlayground_textArea { - margin-top: 5px; - height: 120px; - width: 400px; - resize: none; -} - -.entryPlaygroundFontSizeWrapper { - width: 400px; - height: 39px; -} - -.entryPlaygroundFontSizeLabel { - display: inline-block; - float: right; - font-size: 9px; - font-family: notoSansMedium; - color: #444; - line-height: 39px; -} - -.entryPlaygroundFontSizeSlider { - display: inline-block; - float: right; - width: 96px; - height: 3px; - margin: 18px 0px 18px 4px; - background-color: #cfcfcf; - border-radius: 1.5px; -} - -.entryPlaygroundFontSizeIndicator { - height: 100%; - width: 45%; - background-color: #643cd9; -} - -.entryPlaygroundFontSizeKnob { - width: 16px; height: 16px; - position: relative; - margin-top: -10px; - margin-left: -7px; - .backgroundImage("text_size_knob.png"); - cursor: pointer; -} - -.entryPlaygroundTextColoursWrapper { - width : 260px; - height: 226px; - z-index: 10; - cursor: pointer; - margin-top: -5px; - margin-left: 335px; - padding: 20px 5px; - position: absolute; - .backgroundImage("text_color_bg.png"); - background-repeat: no-repeat; - background-size: 260px 226px; -} -.entryPlaygroundTextBackgroundsWrapper { - width : 260px; - height: 226px; - z-index: 10; - cursor: pointer; - margin-top: -5px; - margin-left: 369px; - padding: 20px 5px; - position: absolute; - .backgroundImage("text_color_bg_1.png"); - background-repeat: no-repeat; - background-size: 260px 226px; -} - - -.entryPlaygroundLinebreakWrapper { - position: fixed; - top: 351px; -} - -.entryPlaygroundLinebreakButtons { - display: inline; - font-size:0; - img { - cursor: pointer; - } -} - -.entryPlaygroundLinebreakHorizontal { - display: block; - border-top: 1px solid #808080; - margin: 0 0 12px 0; - padding: 0; - width: 260px; -} - -.entryPlaygroundLinebreakDescription { - margin-top: 12px; - p { - color: #8888; - font-size: 11px; - margin-bottom: 5px; - } - - ul { - padding-left: 20px; - li { - color: #B4B4B5; - font-size: 11px; - } - } -} - - - -#entry-contextmenu.workspace-contextmenu { - position: fixed; - background-color: white; - display: inline-block; - list-style: none; - padding: 4px 0; - border-color: #ccc #666 #666 #ccc; - border-style: solid; - border-width: 1px; - outline: none; - font-size: 14px; - box-shadow: 0 6px 12px rgba(0,0,0,.175); - min-width: 160px; - border-radius: 4px; - background-clip: padding-box; - color: #262626; - .menuAble { - padding: 3px 20px; - } - .menuAble:hover { - color: white; - background-color: #57e; - } - .menuDisable { - color: #ccc; - padding: 3px 20px; - } -} - -.entryPauseButtonWorkspace_w { - display: none; -} - -.entryPopupWindow .entryPauseButtonWorkspace_w { - display: inline-block; - background: url("@{image_url}pause_btn.png"); - background-repeat: no-repeat; - color: transparent; - width: 90px; - left: 103px; - color: @bora; - background-position: center left; -} - -.entrySceneDummyView { - width: 55px; - height: 40px; - background-color: orange; - display: inline-block; - opacity: 0.3; - position: absolute; - left: 0; - top: 0; - z-index: 889; - left: 100px; -} - -.entryPopup { - overflow: hidden; - position: absolute; - margin: 0; - padding: 0; - top: 0; - left: 0; - height: 100%; - width: 100%; - z-index: 7000; - background-color: rgba(0, 0, 0, 0.2); -} - -.entryPopup.popupHelper { - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; - display: -webkit-flex; - display: flex; - -webkit-box-direction: normal; - -moz-box-direction: normal; - -webkit-box-orient: vertical; - -moz-box-orient: vertical; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; -} - -.entryPopupWindow { - width: 80%; - height: 80%; - position: absolute; - left: 0; right: 0; - top: 0; bottom: 0; - margin: auto; - max-width: 100%; - max-height: 100%; - /*overflow: hidden;*/ - z-index: 8000; - background-color: @white; -} - -.entryPopup.hiddenPopup { - display: none; -} - -.entryPopupHelperTopSpan, -.entryPopupHelperBottomSpan { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -ms-flex: 1; - flex: 1; -} - -.entryPopupHelperMiddleSpan { - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; - display: -webkit-flex; - display: flex; - -webkit-box-direction: normal; - -moz-box-direction: normal; - -webkit-box-orient: horizontal; - -moz-box-orient: horizontal; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - - .entryPopupHelperLeftSpan, - .entryPopupHelperRightSpan { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -ms-flex: 1; - flex: 1; - } -} +@import "/components/object.less"; +@import "/components/painter.less"; +@import "/components/playground.less"; +@import "/components/popup.less"; +@import "/components/property_panel.less"; +@import "/components/scene.less"; +@import "/components/stage.less"; +@import "/components/state_manager.less"; +@import "/components/toast.less"; +@import "/components/variable_container.less"; diff --git a/src/css/playground.less b/src/css/playground.less deleted file mode 100644 index 0e197e026a..0000000000 --- a/src/css/playground.less +++ /dev/null @@ -1,45 +0,0 @@ -@import "./common.less"; - -.block { - cursor: url('@{image_url}handopen.cur') 8 5, auto; -} - -.block.dragging { - cursor: url('@{image_url}handclosed.cur') 8 5, auto; -} - -.block.selected > path { - stroke-width: 3px; - stroke: #798EB1; -} - - -.entry-field-dropdown { - cursor: pointer; - .rect { - fill: white; - text { - fill :black; - } - } - - .rect:hover { - fill: #127cdb; - text { - fill: white; - } - } -} - -.entryBoard { - cursor: move; -} - -.boardScrollbar { - opacity: 0.4; - cursor: move; -} - -.boardScrollbar:hover { - opacity: 0.6; -} diff --git a/src/css/popup.less b/src/css/popup.less deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/css/static.less b/src/css/static.less index ea4fce078d..4ad1c837da 100644 --- a/src/css/static.less +++ b/src/css/static.less @@ -56,5 +56,6 @@ @indicatorOn: #2f50f4; -//etc colors @white: #ffffff; +@white: #ffffff; + diff --git a/src/engine.js b/src/engine.js index db1fd3ca4c..ffee894dcf 100644 --- a/src/engine.js +++ b/src/engine.js @@ -14,10 +14,10 @@ Entry.Engine = function() { this.isUpdating = true; this.speeds = [1, 15, 30, 45, 60]; - this.pressedKeys = []; - Entry.addEventListener('keyPressed', this.captureKeyEvent); - Entry.addEventListener('keyUpped', this.captureKeyUpEvent); + if (Entry.keyPressed) + Entry.keyPressed.attach(this, this.captureKeyEvent); + Entry.addEventListener('canvasClick', function(e){ Entry.engine.fireEvent('mouse_clicked'); }); @@ -47,7 +47,7 @@ Entry.Engine = function() { $(window).unbind('keydown', arrowHandler); }); - function arrowHandler(e){ + function arrowHandler(e) { var arrows = [37,38,39,40,32]; var code = (e.keyCode || e.which); var input = Entry.stage.inputField; @@ -124,7 +124,6 @@ Entry.Engine.prototype.generateView = function(controlView, option) { this.view_.appendChild(this.runButton); this.runButton.bindOnClick(function(e) { - e.preventDefault(); Entry.engine.toggleRun(); }); this.runButton2 = Entry.createElement('button'); @@ -133,7 +132,6 @@ Entry.Engine.prototype.generateView = function(controlView, option) { this.view_.appendChild(this.runButton2); this.runButton2.bindOnClick(function(e) { - e.preventDefault(); Entry.engine.toggleRun(); }); @@ -144,7 +142,6 @@ Entry.Engine.prototype.generateView = function(controlView, option) { this.stopButton.innerHTML = Lang.Workspace.stop; this.view_.appendChild(this.stopButton); this.stopButton.bindOnClick(function(e) { - e.preventDefault(); Entry.engine.toggleStop(); }); @@ -155,7 +152,6 @@ Entry.Engine.prototype.generateView = function(controlView, option) { this.stopButton2.innerHTML = Lang.Workspace.stop; this.view_.appendChild(this.stopButton2); this.stopButton2.bindOnClick(function(e) { - e.preventDefault(); Entry.engine.toggleStop(); }); @@ -165,7 +161,6 @@ Entry.Engine.prototype.generateView = function(controlView, option) { this.pauseButton.addClass('entryRemove'); this.view_.appendChild(this.pauseButton); this.pauseButton.bindOnClick(function(e) { - e.preventDefault(); Entry.engine.togglePause(); }); @@ -205,7 +200,6 @@ Entry.Engine.prototype.generateView = function(controlView, option) { this.runButton.innerHTML = Lang.Blocks.START; this.view_.appendChild(this.runButton); this.runButton.bindOnClick(function(e) { - e.preventDefault(); Entry.engine.toggleRun(); }); @@ -214,7 +208,6 @@ Entry.Engine.prototype.generateView = function(controlView, option) { this.runButton2.addClass('entryEngineBigButtonMinimize_popup_run'); this.view_.appendChild(this.runButton2); this.runButton2.bindOnClick(function(e) { - e.preventDefault(); Entry.engine.toggleRun(); }); @@ -226,7 +219,6 @@ Entry.Engine.prototype.generateView = function(controlView, option) { this.view_.appendChild(this.stopButton); this.stopButton.bindOnClick(function(e) { this.blur(); - e.preventDefault(); Entry.engine.toggleStop(); }); @@ -238,7 +230,6 @@ Entry.Engine.prototype.generateView = function(controlView, option) { this.view_.appendChild(this.pauseButton); this.pauseButton.bindOnClick(function(e) { this.blur(); - e.preventDefault(); Entry.engine.togglePause(); }); @@ -286,7 +277,6 @@ Entry.Engine.prototype.generateView = function(controlView, option) { this.footerView_.appendChild(this.runButton); this.runButton.bindOnClick(function(e) { - e.preventDefault(); Entry.engine.toggleRun(); }); @@ -300,7 +290,6 @@ Entry.Engine.prototype.generateView = function(controlView, option) { this.footerView_.appendChild(this.stopButton); this.stopButton.bindOnClick(function(e) { - e.preventDefault(); Entry.engine.toggleStop(); }); } @@ -415,41 +404,16 @@ Entry.Engine.prototype.update = function() { * compute each object with runningScript on entity. */ Entry.Engine.prototype.computeObjects = function() { - Entry.container.mapEntityIncludeCloneOnScene(this.computeFunction); + Entry.container.mapObjectOnScene(this.computeFunction); }; /** * Compute function for map. * @param {Entry.EntryObject} object */ -Entry.Engine.prototype.computeFunction = function(entity) { - var scripts = entity.runningScript; - for (var i=0; i 48 && keyCode < 58) { - e.preventDefault(); - Entry.playground.selectMenu(keyCode - 49); } } else if (Entry.engine.isState('run')) { Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent, - ["press_some_key", keyCode]); - Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent, - ["when_some_key_pressed", keyCode]); + ["keyPress", keyCode]); } if (Entry.engine.isState('stop')) { @@ -688,16 +630,6 @@ Entry.Engine.prototype.captureKeyEvent = function(e) { } } }; -/** - * capture keyboard press up input - * @param {keyboard event} e - */ -Entry.Engine.prototype.captureKeyUpEvent = function(e) { - var keyCode = e.keyCode; - if (Entry.engine.pressedKeys.indexOf(keyCode) >= 0) - Entry.engine.pressedKeys.splice( - Entry.engine.pressedKeys.indexOf(keyCode), 1); -}; /** * this is callback function for map. @@ -706,19 +638,8 @@ Entry.Engine.prototype.captureKeyUpEvent = function(e) { */ Entry.Engine.prototype.raiseKeyEvent = function(entity, param) { var eventName = param[0]; - var keyCode = param[1]; - var blocks = entity.parent.script.childNodes; - //handle clone entity - for (var i=0; i -1) { - if (blocks[j].getAttribute('id') == removeBlock.getAttribute('id')) - continue; - else - return; - } - } + + var timerTypes = [ + 'get_project_timer_value', + 'reset_project_timer', + 'set_visible_project_timer', + 'choose_project_timer_action' + ]; + + for (var i = 0, len = objects.length; i < len; i++) { + var code = objects[i].script; + for (var j = 0; j < timerTypes.length; j++) + if(code.hasBlockType(timerTypes[j])) return; } timer.setVisible(false); }; diff --git a/src/entity.js b/src/entity.js index c9e544b218..f9dc46647d 100644 --- a/src/entity.js +++ b/src/entity.js @@ -13,7 +13,6 @@ Entry.EntityObject = function(object) { this.parent = object; this.type = object.objectType; /** @type {Array} */ - this.runningScript = []; this.flip = false; this.collision = Entry.Utils.COLLISION.NONE; this.id = Entry.generateHash(); @@ -169,14 +168,6 @@ Entry.EntityObject.prototype.restoreEntity = function(entityModel) { ); }; -/** - * clear runningscript - */ -Entry.EntityObject.prototype.clearScript = function(entityModel) { - while (this.runningScript.length) - this.runningScript.pop(); -}; - /** * X coordinate setter * @param {number} x @@ -957,9 +948,15 @@ Entry.EntityObject.prototype.removeClone = function() { Entry.stage.unloadEntity(this); var index = this.parent.clonedEntities.indexOf(this); this.parent.clonedEntities.splice(index, 1); + if (Entry.Utils.isFunction(this.clearExecutor)) + this.clearExecutor(); } }; +Entry.EntityObject.prototype.clearExecutor = function() { + this.parent.script.clearExecutorsByEntity(this); +}; + /** * convert this entity's data to JSON. * @return {JSON} diff --git a/src/entry.js b/src/entry.js index a64fd34a2b..9f431772a1 100644 --- a/src/entry.js +++ b/src/entry.js @@ -14,6 +14,8 @@ Entry.TEXT_ALIGN_RIGHT = 2; Entry.TEXT_ALIGNS = ["center", "left", "right"]; +Entry.clipboard = null; + /** * Load project * @param {?Project} project @@ -28,9 +30,9 @@ Entry.loadProject = function(project) { Entry.projectId = project._id; Entry.variableContainer.setVariables(project.variables); Entry.variableContainer.setMessages(project.messages); - Entry.variableContainer.setFunctions(project.functions); Entry.scene.addScenes(project.scenes); Entry.stage.initObjectContainers(); + Entry.variableContainer.setFunctions(project.functions); Entry.container.setObjects(project.objects); Entry.FPS = project.speed ? project.speed : 60; createjs.Ticker.setFPS(Entry.FPS); @@ -51,13 +53,10 @@ Entry.loadProject = function(project) { * @param {?Project} project */ Entry.exportProject = function(project) { - if (!project) { - project = {}; - } + if (!project) project = {}; - if (!Entry.engine.isState('stop')) { + if (!Entry.engine.isState('stop')) Entry.engine.toggleStop(); - } if (Entry.Func && Entry.Func.workspace && @@ -275,15 +274,16 @@ Entry.resizeElement = function(interfaceModel) { menuWidth = 400; interfaceModel.menuWidth = menuWidth; - Entry.playground.blockMenuView_.style.width = (menuWidth - 64) + 'px'; - $('.entryBlockMenuWorkspace>svg').css({width: (menuWidth - 64) + 'px'}); - $('.entryBlocklyWorkspace').css({left: (menuWidth) + 'px'}); + $('.blockMenuContainer').css({width: (menuWidth - 64) + 'px'}); + $('.blockMenuContainer>svg').css({width: (menuWidth - 64) + 'px'}); + Entry.playground.mainWorkspace.blockMenu.setWidth(); + $('.entryWorkspaceBoard').css({left: (menuWidth) + 'px'}); Entry.playground.resizeHandle_.style.left = (menuWidth) + 'px'; Entry.playground.variableViewWrapper_.style.width = menuWidth + 'px'; this.interfaceState = interfaceModel; } - Blockly.fireUiEvent(window, 'resize'); + Entry.windowResized.notify(); }; /** @@ -333,7 +333,7 @@ Entry.cancelObjectEdit = function(e) { var tagName = target.tagName.toUpperCase(); if (!object.isEditing || (tagName === 'INPUT' && isCurrent)) return; - + object.editObjectValues(false); }; diff --git a/src/function.js b/src/function.js index f18e6d8c55..ce90d655d4 100644 --- a/src/function.js +++ b/src/function.js @@ -1,4 +1,4 @@ -/** +/* * @fileoverview Func object for entry function. */ 'use strict'; @@ -10,23 +10,54 @@ goog.require("Entry.Utils"); * @param {variable model} variable * @constructor */ -Entry.Func = function() { - this.id = Entry.generateHash(); - this.content = Blockly.Xml.textToDom(Entry.Func.CREATE_BLOCK); +Entry.Func = function(func) { + this.id = func ? func.id : Entry.generateHash(); + this.content = func ? new Entry.Code(func.content) : new Entry.Code([ + [ + { + type: "function_create", + deletable: false, + x: 40, y: 40 + } + ] + ]); this.block = null; - this.stringHash = {}; - this.booleanHash = {}; + this.hashMap = {}; + + this.paramMap = {}; + + var blockSchema = function () {}; + var blockPrototype = Entry.block.function_general; + blockSchema.prototype = blockPrototype; + blockSchema = new blockSchema(); + blockSchema.changeEvent = new Entry.Event(); + blockSchema.template = Lang.template.function_general; + + Entry.block["func_" + this.id] = blockSchema; + + if (func) { + var blockMap = this.content._blockMap; + for (var key in blockMap) { + Entry.Func.registerParamBlock(blockMap[key].type); + } + Entry.Func.generateWsBlock(this); + } + + Entry.Func.registerFunction(this); + + Entry.Func.updateMenu(); }; Entry.Func.threads = {}; -Entry.Func.registerFunction = function(functionHash, entity) { - var threadHash = Entry.generateHash(); - var func = Entry.variableContainer.getFunction(functionHash); - var script = new Entry.Script(entity); - script.init(func.content.childNodes[0]); - this.threads[threadHash] = script; - return threadHash; +Entry.Func.registerFunction = function(func) { + var workspace = Entry.playground.mainWorkspace; + if (!workspace) return; + var blockMenu = workspace.getBlockMenu(); + var menuCode = blockMenu.getCategoryCodes("func"); + this._targetFuncBlock = menuCode.createThread([{ + type: "func_" + func.id + }]); }; Entry.Func.executeFunction = function(threadHash) { @@ -52,138 +83,38 @@ Entry.Func.prototype.init = function(model) { this.block = Blockly.Xml.textToDom(xmlText).childNodes[0]; }; -Entry.Func.CREATE_BTN = - ''; - -Entry.Func.createBtn = Entry.nodeListToArray( - Blockly.Xml.textToDom(Entry.Func.CREATE_BTN).childNodes); - -Entry.Func.FIELD_BLOCK = - '' + - '' + - '' + - '' + - '' + - ''; - -Entry.Func.fieldBlocks = Entry.nodeListToArray( - Blockly.Xml.textToDom(Entry.Func.FIELD_BLOCK).childNodes); - -Entry.Func.CREATE_BLOCK = - '' + - ''; - Entry.Func.edit = function(func) { - this.srcFName = ""; - var fieldElement = $(func.content.innerHTML).find('field'); - - for(var i = 0; i < fieldElement.length; i++) - if($(fieldElement[i]).attr('name') === "NAME") { - this.srcFName+=$(fieldElement[i]).text(); - this.srcFName+=' '; - } - this.srcFName = this.srcFName.trim(); - - this.cancelEdit(); - if (this.workspace) - this.workspace.visible = true; - this.initEditView(); + this.cancelEdit(); this.targetFunc = func; - this.workspace.clear(); - Blockly.Xml.domToWorkspace(this.workspace, func.content); + this.initEditView(func.content); + this.bindFuncChangeEvent(); this.updateMenu(); - this.position_(); }; -Entry.Func.initEditView = function() { - this.parentView = Entry.playground.blocklyView_; - if (!this.svg) { - this.svg = Blockly.createSvgElement('svg', { - 'xmlns': 'http://www.w3.org/2000/svg', - 'xmlns:html': 'http://www.w3.org/1999/xhtml', - 'xmlns:xlink': 'http://www.w3.org/1999/xlink', - 'version': '1.1', - 'class': 'blocklySvg entryFunctionEdit' - }); - this.workspace = new Blockly.Workspace(); - this.workspace.visible = true; - var func = this; - - this.generateButtons(); - - this.svg.appendChild(this.workspace.createDom()); - this.workspace.scrollbar = new Blockly.ScrollbarPair( - this.workspace); - var scrollbar = this.workspace.scrollbar; - scrollbar.resize(); - - this.workspace.addTrashcan(); - - Blockly.bindEvent_(window, 'resize', scrollbar, scrollbar.resize); - document.addEventListener("blocklyWorkspaceChange", this.syncFunc, false); - - var workspace = this.workspace; - Blockly.bindEvent_(this.svg, 'mousedown', null, function(e) { - workspace.dragMode = true; - workspace.startDragMouseX = e.clientX; - workspace.startDragMouseY = e.clientY; - workspace.startDragMetrics = workspace.getMetrics(); - workspace.startScrollX = workspace.scrollX; - workspace.startScrollY = workspace.scrollY; - }); - Blockly.bindEvent_(this.svg, 'mousemove', null, function(e) { - var hScroll = scrollbar.hScroll; - var vScroll = scrollbar.hScroll; - hScroll.svgGroup_.setAttribute('opacity', '1'); - vScroll.svgGroup_.setAttribute('opacity', '1'); - if (workspace.dragMode) { - Blockly.removeAllRanges(); - var dx = e.clientX - workspace.startDragMouseX; - var dy = e.clientY - workspace.startDragMouseY; - var metrics = workspace.startDragMetrics; - var x = workspace.startScrollX + dx; - var y = workspace.startScrollY + dy; - x = Math.min(x, -metrics.contentLeft); - y = Math.min(y, -metrics.contentTop); - x = Math.max(x, metrics.viewWidth - metrics.contentLeft - - metrics.contentWidth); - y = Math.max(y, metrics.viewHeight - metrics.contentTop - - metrics.contentHeight); - - // Move the scrollbars and the page will scroll automatically. - scrollbar.set(-x - metrics.contentLeft, - -y - metrics.contentTop); - } - }); - Blockly.bindEvent_(this.svg, 'mouseup', null, function(e) { - workspace.dragMode = false; - }); - } - - Blockly.mainWorkspace.blockMenu.targetWorkspace = this.workspace; - - this.doWhenInit(); - this.parentView.appendChild(this.svg); +Entry.Func.initEditView = function(content) { + if (!this.menuCode) + this.setupMenuCode(); + var workspace = Entry.playground.mainWorkspace; + workspace.setMode(Entry.Workspace.MODE_OVERLAYBOARD); + workspace.changeOverlayBoardCode(content); + this._workspaceStateEvent = workspace.changeEvent.attach(this, this.endEdit); }; +Entry.Func.endEdit = function(message) { + this.unbindFuncChangeEvent(); + this._workspaceStateEvent.destroy(); + delete this._workspaceStateEvent; + switch(message){ + case "save": + this.save(); + case "cancelEdit": + this.cancelEdit(); + } +} + Entry.Func.save = function() { - var dstFName = ""; - this.targetFunc.content = Blockly.Xml.workspaceToDom(this.workspace); this.targetFunc.generateBlock(true); Entry.variableContainer.saveFunction(this.targetFunc); - var fieldElement = $(this.targetFunc.content.innerHTML).find('field'); - - for(var i = 0; i < fieldElement.length; i++) - if($(fieldElement[i]).attr('name') === "NAME") { - - dstFName+=$(fieldElement[i]).text(); - dstFName+=' '; - } - dstFName = dstFName.trim(); - this.syncFuncName(dstFName); - - this.cancelEdit(); }; Entry.Func.syncFuncName = function(dstFName) { @@ -193,7 +124,7 @@ Entry.Func.syncFuncName = function(dstFName) { var name =""; var blocks = []; blocks = Blockly.mainWorkspace.getAllBlocks(); - for(var i = 0; i < blocks.length; i++) { + for(var i = 0; i < blocks.length; i++) { var block = blocks[i]; if(block.type === "function_general") { var iList = []; @@ -208,7 +139,7 @@ Entry.Func.syncFuncName = function(dstFName) { name = name.trim(); if(name === this.srcFName && (this.srcFName.split(' ').length == dstFNameTokens.length)) { for(var k=0; k < iList.length; k++) { - var input = iList[k]; + var input = iList[k]; if(input.fieldRow.length > 0 && (input.fieldRow[0] instanceof Blockly.FieldLabel) && (input.fieldRow[0].text_ != undefined)) { if(dstFNameTokens[index] === undefined) { iList.splice(k,1); @@ -229,23 +160,22 @@ Entry.Func.syncFuncName = function(dstFName) { var updatedDom = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace) Blockly.mainWorkspace.clear(); Blockly.Xml.domToWorkspace(Blockly.mainWorkspace, updatedDom); -}; +}; Entry.Func.cancelEdit = function() { - if (!this.svg || !this.targetFunc) + if (!this.targetFunc) return; - this.workspace.visible = false; - this.parentView.removeChild(this.svg); Entry.Func.isEdit = false; - Blockly.mainWorkspace.blockMenu.targetWorkspace = Blockly.mainWorkspace; if (!this.targetFunc.block) { + this._targetFuncBlock.destroy(); delete Entry.variableContainer.functions_[this.targetFunc.id]; delete Entry.variableContainer.selected; } delete this.targetFunc; this.updateMenu(); - this.doWhenCancel(); Entry.variableContainer.updateList(); + var workspace = Entry.playground.mainWorkspace; + workspace.setMode(Entry.Workspace.MODE_BOARD); }; Entry.Func.getMenuXml = function() { @@ -288,82 +218,100 @@ Entry.Func.syncFunc = function() { } }; -Entry.Func.updateMenu = function() { - if (Entry.playground.selectedMenu == 'func') { - Entry.playground.blockMenu.hide(); - Entry.playground.blockMenu.show(Entry.Func.getMenuXml()); - if (!Blockly.WidgetDiv.field_ && Entry.Func.targetFunc) { - var target = Entry.Func.targetFunc; - var xml = Blockly.Xml.workspaceToDom(Entry.Func.workspace); - var generals = xml.getElementsByClassName("function_general"); - var hash = target.id; - var block; - generals = Entry.nodeListToArray(generals); - var currentGenerals = []; - var otherGenerals = {}; - - generals.map(function(b) { - var functionHash = b.getElementsByTagName("mutation")[0] - .getAttribute('hashid'); - if (functionHash == hash) currentGenerals.push(b); - else { - if (!otherGenerals[functionHash]) - otherGenerals[functionHash] = []; - otherGenerals[functionHash].push(b); - } - }); - currentGenerals.map(function(b) { - block = Entry.Func.generateWsBlock(xml, - Blockly.Xml.workspaceToDom(Entry.Func.workspace), - hash).block; - var remainBlocks = []; - var flag = false; - while (b.firstChild) { - var child = b.firstChild; - var xmlTag = child.tagName; - if (flag || xmlTag == 'NEXT') { - flag = true; - remainBlocks.push(child); - } - b.removeChild(child); - } - while (block.firstChild) - b.appendChild(block.firstChild); - while(remainBlocks.length) - b.appendChild(remainBlocks.shift()); - }); +Entry.Func.setupMenuCode = function() { + var workspace = Entry.playground.mainWorkspace; + if (!workspace) return; + var blockMenu = workspace.getBlockMenu(); + var menuCode = blockMenu.getCategoryCodes("func"); + this._fieldLabel = menuCode.createThread([{ + type: "function_field_label" + }]).getFirstBlock(); + this._fieldString = menuCode.createThread([{ + type: "function_field_string", + params: [ + {type: this.requestParamBlock("string")} + ] + }]).getFirstBlock(); + this._fieldBoolean = menuCode.createThread([{ + type: "function_field_boolean", + params: [ + {type: this.requestParamBlock("boolean")} + ] + }]).getFirstBlock(); + this.menuCode = menuCode; +} + +Entry.Func.refreshMenuCode = function() { + var workspace = Entry.playground.mainWorkspace; + if (!workspace) return; + if (!this.menuCode) + this.setupMenuCode(); + var stringType = this._fieldString.params[0].type; + var referenceCount = Entry.block[stringType].changeEvent._listeners.length; + if (referenceCount > 2) // check new block type is used + this._fieldString.params[0].changeType(this.requestParamBlock("string")); + var booleanType = this._fieldBoolean.params[0].type; + referenceCount = Entry.block[booleanType].changeEvent._listeners.length; + if (referenceCount > 2) + this._fieldBoolean.params[0].changeType(this.requestParamBlock("boolean")); +}; - for (var hashKey in otherGenerals) { - var otherBlocks = otherGenerals[hashKey]; - var funcContent = Entry.variableContainer.getFunction(hashKey).content; - otherBlocks.map(function(b) { - block = Entry.Func.generateWsBlock(xml, - funcContent, - hashKey).block; - var remainBlocks = []; - var flag = false; - while (b.firstChild) { - var child = b.firstChild; - var xmlTag = child.tagName; - if (flag || xmlTag == 'NEXT') { - flag = true; - remainBlocks.push(child); - } - b.removeChild(child); - } - while (block.firstChild) - b.appendChild(block.firstChild); - while(remainBlocks.length) - b.appendChild(remainBlocks.shift()); - }); - } +Entry.Func.requestParamBlock = function(type) { + var id = Entry.generateHash(); + var blockPrototype; + switch (type) { + case "string": + blockPrototype = Entry.block.function_param_string; + break; + case "boolean": + blockPrototype = Entry.block.function_param_boolean; + break; + default: + return null; + } - Entry.Func.workspace.clear(); - Blockly.Xml.domToWorkspace(Entry.Func.workspace, xml); - } + var blockType = type + "Param_" + id; + var blockSchema = Entry.Func.createParamBlock(blockType, blockPrototype, type); + Entry.block[blockType] = blockSchema; + return blockType; +}; + +Entry.Func.registerParamBlock = function(type) { + if (type.substr(0,6) === "string") { + Entry.Func.createParamBlock(type, Entry.block.function_param_string, type); + } else if (type.substr(0,7) === "boolean") { + Entry.Func.createParamBlock(type, Entry.block.function_param_boolean, type); } }; +Entry.Func.createParamBlock = function(type, blockPrototype, originalType) { + var blockSchema = function () {}; + originalType = originalType === "string" ? "function_param_string" : "function_param_boolean"; + blockSchema.prototype = blockPrototype; + blockSchema = new blockSchema(); + blockSchema.changeEvent = new Entry.Event(); + blockSchema.template = Lang.template[originalType]; + + Entry.block[type] = blockSchema; + return blockSchema; +} + +Entry.Func.updateMenu = function() { + var workspace = Entry.playground.mainWorkspace; + if (!workspace) return; + var blockMenu = workspace.getBlockMenu(); + if (this.targetFunc) { + if (!this.menuCode) + this.setupMenuCode(); + blockMenu.banClass("functionInit"); + blockMenu.unbanClass("functionEdit"); + } else { + blockMenu.unbanClass("functionInit"); + blockMenu.banClass("functionEdit"); + } + blockMenu.reDraw(); +}; + Entry.Func.prototype.edit = function() { if (Entry.Func.isEdit) return; @@ -375,236 +323,139 @@ Entry.Func.prototype.edit = function() { } }; -Entry.Func.generateBlock = function(func, content, id) { - var topBlocks = Entry.nodeListToArray(content.childNodes); - var createBlock; - for (var i in topBlocks) - if (topBlocks[i].getAttribute('type') == 'function_create') - createBlock = topBlocks[i]; - var script = new Entry.Script(); - script.init(createBlock); - var field = script; - if (field.values) - field = script.values.FIELD; - var mutationXml = ''; - var fieldXml = ''; - var description = ''; - var stringCount = 0; - var booleanCount = 0; - func.stringHash = {}; - func.booleanHash = {}; - while(true) { - var type = field.type; - switch (type) { - case 'function_field_label': - mutationXml += '", ">") + '">'; - description += field.fields.NAME; - break; - case 'function_field_boolean': - var hash = field.values.PARAM.hashId; - mutationXml += ''; - fieldXml += '' + - ''; - func.booleanHash[hash] = booleanCount; - booleanCount++; - description += '논리값' + booleanCount; - break; - case 'function_field_string': - var hash = field.values.PARAM.hashId; - mutationXml += ''; - fieldXml += '' + - '10'; - func.stringHash[hash] = stringCount; - stringCount++; - description += '문자값' + stringCount; - break; +Entry.Func.generateBlock = function(func) { + var blockSchema = Entry.block["func_" + func.id]; + var block = { + template: blockSchema.template, + params: blockSchema.params + } + + var reg = /(%\d)/mi; + var templateParams = blockSchema.template.split(reg); + var description = ""; + var booleanIndex = 0; + var stringIndex = 0; + for (var i in templateParams) { + var templateChunk = templateParams[i]; + if (reg.test(templateChunk)) { + var paramIndex = Number(templateChunk.split('%')[1]) - 1; + var param = blockSchema.params[paramIndex]; + if (param.type === "Indicator") { + } else if (param.accept === "boolean") { + description += + Lang.template.function_param_boolean + + (booleanIndex ? booleanIndex : ""); + booleanIndex++; + } else { + description += Lang.General.param_string + + (stringIndex ? stringIndex : ""); + stringIndex++; + } + } else { + description += templateChunk } - if (field.values && field.values.NEXT) field = field.values.NEXT; - else break; - description += ' '; + } - mutationXml += ''; - var blockText = '' + mutationXml + - fieldXml + ''; - var block = Blockly.Xml.textToDom(blockText).childNodes[0]; - if (!description) description = "함수"; + return {block: block, description: description}; }; Entry.Func.prototype.generateBlock = function(toSave) { - var generatedInfo = Entry.Func.generateBlock(this, this.content, this.id); + var generatedInfo = Entry.Func.generateBlock(this); this.block = generatedInfo.block; this.description = generatedInfo.description; }; -/** - * Update view when window resizing - * @private - */ -Entry.Func.prototype.syncViewSize_ = function() { - var rect = this.parentView.getBoundingClientRect(); - this.svg.style.width = rect.width; - this.svg.style.height = rect.height; -}; - -Entry.Func.generateButtons = function() { - var func = this; - var btnWrapper = Blockly.createSvgElement('g', {}, this.svg); - this.btnWrapper = btnWrapper; - var saveText = Blockly.createSvgElement('text', { - 'x': '27', - 'y': '33', - 'class': 'entryFunctionButtonText' - }, btnWrapper); - var saveTextNode = document.createTextNode(Lang.Buttons.save); - saveText.appendChild(saveTextNode); - - var cancelText = Blockly.createSvgElement('text', { - 'x': '102.5', - 'y': '33', - 'class': 'entryFunctionButtonText' - }, btnWrapper); - var cancelTextNode = document.createTextNode(Lang.Buttons.cancel); - cancelText.appendChild(cancelTextNode); - var saveButton = Blockly.createSvgElement('circle', { - 'cx': '27.5', - 'cy': '27.5', - 'r': '27.5', - 'class': 'entryFunctionButton' - }, btnWrapper); - var cancelButton = Blockly.createSvgElement('circle', { - 'cx': '102.5', - 'cy': '27.5', - 'r': '27.5', - 'class': 'entryFunctionButton' - }, btnWrapper); - - saveButton.onclick = function(e) { func.save(); }; - saveText.onclick = function(e) { func.save(); }; - - cancelButton.onclick = function(e) { func.cancelEdit(); }; - cancelText.onclick = function(e) { func.cancelEdit(); }; -}; - -Entry.Func.position_ = function() { - var metrics = this.workspace.getMetrics(); - if (!metrics || !this.workspace.visible) { - // There are no metrics available (workspace is probably not visible). - return; - } - var wrapper = this.btnWrapper; - wrapper.setAttribute('transform', 'translate(30, 501)'); - - if (Blockly.RTL) { - //I didn't code here anything - this.left_ = this.MARGIN_SIDE_; - } else { - wrapper.left_ = metrics.viewWidth/2 + metrics.absoluteLeft - 60; - } - wrapper.top_ = metrics.viewHeight + metrics.absoluteTop - 200; - wrapper.setAttribute('transform', - 'translate(' + wrapper.left_ + ',' + wrapper.top_ + ')'); -}; - -Entry.Func.positionBlock_ = function(block) { - var metrics = this.workspace.getMetrics(); - if (!metrics || !this.workspace.visible) - return; - - var originRoot = block.getSvgRoot(); - var originXY = Blockly.getSvgXY_(originRoot); - - var hw = block.getHeightWidth(); - var targetX = metrics.viewWidth/2 - 80; - var targetY = metrics.viewHeight/2 - 50; - block.moveBy(targetX-originXY.x, targetY-originXY.y); -}; - -Entry.Func.doWhenInit = function() { - var svg = this.svg; - svg.appendChild(Blockly.fieldKeydownDom); - svg.appendChild(Blockly.fieldDropdownDom); - svg.appendChild(Blockly.contextMenu); - Blockly.bindEvent_(window, 'resize', this, this.position_); - Blockly.bindEvent_(svg, 'mousedown', null, Blockly.onMouseDown_); - Blockly.bindEvent_(svg, 'contextmenu', null, Blockly.onContextMenu_); -}; - -Entry.Func.doWhenCancel = function() { - Blockly.clipboard_ = null; - var svg = Blockly.svg; - svg.appendChild(Blockly.fieldKeydownDom); - svg.appendChild(Blockly.fieldDropdownDom); - svg.appendChild(Blockly.contextMenu); - Blockly.unbindEvent_(window, 'resize', this, this.position_); - Blockly.unbindEvent_(svg, 'mousedown', null, Blockly.onMouseDown_); - Blockly.unbindEvent_(svg, 'contextmenu', null, Blockly.onContextMenu_); -}; - -Entry.Func.generateWsBlock = function(func, content, id) { - var topBlocks = content.childNodes; - var createBlock; - for (var i in topBlocks) { - if (topBlocks[i].getAttribute('type') == 'function_create') { - createBlock = topBlocks[i]; - break; - } - } - var script = new Entry.Script(); - script.init(createBlock); - var field = script; - if (field.values) - field = script.values.FIELD; - var mutationXml = ''; - var fieldXml = ''; - var description = ''; - var stringCount = 0; - var booleanCount = 0; - func.stringHash = {}; - func.booleanHash = {}; - while(true) { - switch (field.type) { +Entry.Func.generateWsBlock = function(targetFunc) { + this.unbindFuncChangeEvent(); + targetFunc = targetFunc ? targetFunc : this.targetFunc; + var defBlock = targetFunc.content.getEventMap("funcDef")[0]; + var outputBlock = defBlock.params[0]; + var booleanIndex = 0; + var stringIndex = 0; + var schemaParams = []; + var schemaTemplate = ""; + var hashMap = targetFunc.hashMap; + var paramMap = targetFunc.paramMap; + while(outputBlock) { + var value = outputBlock.params[0]; + switch(outputBlock.type) { case 'function_field_label': - mutationXml += '", ">") + '">'; - description += field.fields.NAME; + schemaTemplate = schemaTemplate + " " + value; break; case 'function_field_boolean': - var hash = field.values.PARAM.hashId; - mutationXml += ''; - fieldXml += '' + - ''; - func.booleanHash[hash] = booleanCount; - booleanCount++; - description += '논리값' + booleanCount; + Entry.Mutator.mutate(value.type, { + template: Lang.Blocks.FUNCTION_logical_variable + + " " + (booleanIndex ? booleanIndex : "") + }); + hashMap[value.type] = false; + paramMap[value.type] = booleanIndex + stringIndex; + booleanIndex++; + schemaParams.push({ + type: "Block", + accept: "boolean" + }); + schemaTemplate += " %" + (booleanIndex + stringIndex); break; case 'function_field_string': - var hash = field.values.PARAM.hashId; - mutationXml += ''; - fieldXml += '' + - ''; - func.stringHash[hash] = stringCount; - stringCount++; - description += '문자값' + stringCount; + Entry.Mutator.mutate(value.type, { + template: Lang.Blocks.FUNCTION_character_variable + + " " + (stringIndex ? stringIndex : "") + }); + hashMap[value.type] = false; + paramMap[value.type] = booleanIndex + stringIndex; + stringIndex++; + schemaTemplate += " %" + (booleanIndex + stringIndex); + schemaParams.push({ + type: "Block", + accept: "string" + }); break; } - if (field.values && field.values.NEXT) - field = field.values.NEXT; - else break; - description += ' '; + outputBlock = outputBlock.getOutputBlock(); + } + booleanIndex++; + schemaTemplate += " %" + (booleanIndex + stringIndex); + schemaParams.push({ + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/function_03.png", + "size": 12 + }); + Entry.Mutator.mutate( + "func_" + targetFunc.id, + {params: schemaParams, template: schemaTemplate} + ); + + for (var key in hashMap) { + var state = hashMap[key]; + if (state) { + var text; + if (key.indexOf("string") > -1) + text = Lang.Blocks.FUNCTION_character_variable; + else + text = Lang.Blocks.FUNCTION_logical_variable; + Entry.Mutator.mutate(key, { + template: text + }); + } else { + hashMap[key] = true; + } } - mutationXml += ''; - var blockText = '' + - mutationXml + fieldXml + ''; - if (!description) description = "함수"; - return { - block: Blockly.Xml.textToDom(blockText).childNodes[0], - description: description - }; + + this.bindFuncChangeEvent(targetFunc); +}; + +Entry.Func.bindFuncChangeEvent = function(targetFunc) { + targetFunc = targetFunc ? targetFunc : this.targetFunc; + if (!this._funcChangeEvent && targetFunc.content.getEventMap("funcDef")[0].view) + this._funcChangeEvent = targetFunc.content + .getEventMap("funcDef")[0].view._contents[1] + .changeEvent.attach(this, this.generateWsBlock); +}; + +Entry.Func.unbindFuncChangeEvent = function() { + if (this._funcChangeEvent) + this._funcChangeEvent.destroy(); + delete this._funcChangeEvent; }; diff --git a/src/helper.js b/src/helper.js index 78aa7c6744..f8f53c4805 100644 --- a/src/helper.js +++ b/src/helper.js @@ -7,27 +7,29 @@ * Helper provide block description with 'blockHelper' */ Entry.Helper = function() { - this.generateView(); + this.visible = false; }; var p = Entry.Helper.prototype; -p.generateView = function() { +p.generateView = function(parentView, option) { + if (this.parentView_) return; + /** @type {!Element} parent view */ + this.parentView_ = parentView; var helper = this; helper.blockHelpData = EntryStatic.blockInfo; var blockHelperView = Entry.createElement('div', 'entryBlockHelperWorkspace'); - this._view = blockHelperView; - + this.view = blockHelperView; if (Entry.isForLecture) blockHelperView.addClass('lecture'); - - // if (!Entry.isForLecture) { + helper.parentView_.appendChild(blockHelperView); + if (!Entry.isForLecture) { var blockHelperHeader = Entry.createElement('div', 'entryBlockHelperHeaderWorkspace'); blockHelperHeader.innerHTML = Lang.Helper.Block_info; blockHelperView.appendChild(blockHelperHeader); - // } + } var blockHelperContent = Entry.createElement('div', 'entryBlockHelperContentWorkspace'); blockHelperContent.addClass('entryBlockHelperIntro'); @@ -39,9 +41,6 @@ p.generateView = function() { var blockHelperBlock = Entry.createElement('div', 'entryBlockHelperBlockWorkspace'); - this.blockMenu_ = new Blockly.BlockMenu(blockHelperBlock); - this.blockMenu_.isViewOnly = true; - this.blockMenu_.isCenterAlign = true; helper.blockHelperContent_.appendChild(blockHelperBlock); var blockHelperDescription = Entry.createElement('div', @@ -49,51 +48,78 @@ p.generateView = function() { helper.blockHelperContent_.appendChild(blockHelperDescription); blockHelperDescription.innerHTML = Lang.Helper.Block_click_msg; this.blockHelperDescription_ = blockHelperDescription; - + + this._renderView = new Entry.RenderView($(blockHelperBlock), 'LEFT'); + this.code = new Entry.Code([]); + this._renderView.changeCode(this.code); + this.first = true; }; +p.bindWorkspace = function(workspace) { + if (!workspace) return; + + if (this._blockViewObserver) this._blockViewObserver.destroy(); + + this.workspace = workspace; + this._blockViewObserver = + workspace.observe(this, "_updateSelectedBlock", ['selectedBlockView']); +}; + /** * toggle on block helper */ +p._updateSelectedBlock = function() { + var blockView = this.workspace.selectedBlockView; + if (!blockView || !this.visible || blockView == this._blockView) return; -p.getView = function() { - this.bindEvent(); - return this._view; + var type = blockView.block.type; + this._blockView = blockView; + this.renderBlock(type); }; -p.bindEvent = function() { - if (!this.blockChangeEvent) { - this.blockChangeEvent = Blockly.bindEvent_(Blockly.mainWorkspace.getCanvas(), - 'blocklySelectChange', this, this.updateSelectedBlock); - if (Entry.playground.blockMenu) - this.menuBlockChangeEvent = Blockly.bindEvent_( - Entry.playground.blockMenu.workspace_.getCanvas(), - 'blocklySelectChange', this, this.updateSelectedBlock); - } -} - +p.renderBlock = function(type) { + var description = Lang.Helper[type]; + if (!type || !this.visible || !description || Entry.block[type].isPrimitive) return; -p.updateSelectedBlock = function() { - if (!Blockly.selected) - return; if (this.first) { this.blockHelperContent_.removeClass('entryBlockHelperIntro'); this.first = false; } - var type = Blockly.selected.type; - this.renderBlock(type); -}; -p.renderBlock = function(type) { - var data = this.blockHelpData[type]; - if (!data) - return; - var xmlText = data.xml; - var XML = jQuery.parseXML(xmlText); - var blockHeight = this.blockMenu_.show(XML.childNodes); - this.blockHelperDescription_.innerHTML = Entry.makeAutolink(Lang.Helper[type]); + var code = this.code; + this.code.clear(); + + var def = Entry.block[type].def; + def = def || {type:type}; + this.code.createThread([def]); + + this.code.board.align(); + this.code.board.resize(); + + + var blockView = this.code.getThreads()[0].getFirstBlock().view; + var bBox = blockView.svgGroup.getBBox(); + var blockWidth = bBox.width; + var blockHeight = bBox.height; + var offsetX =blockView.getSkeleton().box(blockView).offsetX; + if (isNaN(offsetX)) offsetX = 0; + this.blockHelperDescription_.innerHTML = description; + this._renderView.align(); + $(this.blockHelperDescription_).css({ - top: blockHeight + 40 + top: blockHeight + 30 }); -}; \ No newline at end of file + + var renderView = this._renderView; + var dom = renderView.svgDom; + dom.css({ + 'margin-left':-(blockWidth/2) -20 - offsetX + }); +}; + +p.getView = function() { + return this.view; +}; + +p.resize = function() {}; diff --git a/src/hw.js b/src/hw.js index 287aa9c69d..2aadcfb4f4 100644 --- a/src/hw.js +++ b/src/hw.js @@ -27,7 +27,7 @@ Entry.HW = function() { '13': Entry.CODEino, '15': Entry.dplay, '16': Entry.nemoino, - '17': Entry.Xbot, + '17': Entry.Xbot, '24': Entry.Hamster, '25': Entry.Albert, '31': Entry.Bitbrick, @@ -278,6 +278,6 @@ p.checkDevice = function(data) { p.banHW = function() { var hwOptions = this.hwInfo; for (var i in hwOptions) - Entry.playground.blockMenu.banClass(hwOptions[i].name); + Entry.playground.mainWorkspace.blockMenu.banClass(hwOptions[i].name); }; diff --git a/src/hw_monitor.js b/src/hw_monitor.js index 3a698d51ad..3078e070aa 100644 --- a/src/hw_monitor.js +++ b/src/hw_monitor.js @@ -476,7 +476,6 @@ Entry.HWMonitor = function(hwModule) { this._movePort(rPort, xCursor, bP, prevBP); } - }; p._alignNS = function(ports, yCursor, gap) { @@ -606,5 +605,4 @@ Entry.HWMonitor = function(hwModule) { port.path.attr({ "d": path }); }; - })(Entry.HWMonitor.prototype) diff --git a/src/init.js b/src/init.js index e7aa388834..55b365a2af 100644 --- a/src/init.js +++ b/src/init.js @@ -4,6 +4,7 @@ 'use strict'; goog.require("Entry.PropertyPanel"); +goog.require("Entry.Commander"); /** * Initialize method with options. @@ -17,7 +18,11 @@ Entry.init = function(container, options) { menuWidth: 264 }; - Entry.Utils.bindGlobalEvent(['mousedown', 'mousemove']); + Entry.Utils.bindGlobalEvent([ + 'resize', 'mousedown', + 'mousemove', 'keydown', + 'keyup', 'dispose' + ]); /** @type {object} */ this.options = options; @@ -69,10 +74,15 @@ Entry.init = function(container, options) { Entry.soundQueue.installPlugin(createjs.Sound); Entry.loadAudio_( - [Entry.mediaFilePath + 'media/click.mp3', Entry.mediaFilePath + 'media/click.wav', Entry.mediaFilePath + 'media/click.ogg'], 'click'); + [Entry.mediaFilePath + 'sounds/click.mp3', + Entry.mediaFilePath + 'sounds/click.wav', + Entry.mediaFilePath + 'sounds/click.ogg'], 'entryMagneting'); Entry.loadAudio_( - [Entry.mediaFilePath + 'media/delete.mp3', Entry.mediaFilePath + 'media/delete.ogg', Entry.mediaFilePath + 'media/delete.wav'], 'delete'); + [Entry.mediaFilePath + 'sounds/delete.mp3', + Entry.mediaFilePath + 'sounds/delete.ogg', + Entry.mediaFilePath + 'sounds/delete.wav'], 'entryDelete'); + createjs.Sound.stop(); }; @@ -146,13 +156,7 @@ Entry.initialize_ = function() { */ this.variableContainer = new Entry.VariableContainer(); - /** - * Initialize stateManager for redo and undo. - * @type {!Entry.StateManager} - * @type {!object} - */ - if (this.type == 'workspace' || this.type == 'phone') - this.stateManager = new Entry.StateManager(); + this.commander = new Entry.Commander(this.type); /** * Initialize scenes. @@ -235,7 +239,7 @@ Entry.createDom = function(container, option) { for(var i=0; i= 46 ) + if(list.scrollButton_.y >= 46 ) list.scrollButton_.y -= 23; else list.scrollButton_.y = 23; @@ -256,6 +260,10 @@ Entry.createDom = function(container, option) { /** @type {!Element} */ this.containerView = containerView; this.container.generateView(this.containerView, option); + this.propertyPanel.addMode("object", this.container); + + this.helper.generateView(this.containerView, option); + this.propertyPanel.addMode("helper" , this.helper); var playgroundView = Entry.createElement('div'); container.appendChild(playgroundView); @@ -263,11 +271,11 @@ Entry.createDom = function(container, option) { this.playgroundView = playgroundView; this.playground.generateView(this.playgroundView, option); - this.propertyPanel.addMode("object", this.container); - this.propertyPanel.addMode("helper" , this.helper); // this.propertyPanel.addMode("youtube" , this.youtube); + this.propertyPanel.select("object"); + this.helper.bindWorkspace(this.playground.mainWorkspace); } else if (option == 'minimize') { var canvas = Entry.createElement('canvas'); canvas.className = 'entryCanvasWorkspace'; diff --git a/src/state.js b/src/log/state.js similarity index 91% rename from src/state.js rename to src/log/state.js index 9fe7c8d0eb..c659fe3525 100644 --- a/src/state.js +++ b/src/log/state.js @@ -33,6 +33,8 @@ Entry.State = function(type, caller, func, param) { * @type {Number} * */ this.time = Entry.getUpTime(); + + this.isPass = Entry.Command[type] ? Entry.Command[type].isPass : false; }; /** diff --git a/src/state_manager.js b/src/log/state_manager.js similarity index 90% rename from src/state_manager.js rename to src/log/state_manager.js index 145a68ff74..0b7dd89d6c 100644 --- a/src/state_manager.js +++ b/src/log/state_manager.js @@ -86,7 +86,8 @@ Entry.StateManager.prototype.addCommand = Entry.reporter.report(state); this.updateView(); } - Entry.dispatchEvent('saveLocalStorageProject'); + if (Entry.creationChangedEvent) + Entry.creationChangedEvent.notify(); }; /** @@ -97,7 +98,12 @@ Entry.StateManager.prototype.cancelLastCommand = function() { return; this.undoStack_.pop(); this.updateView(); - Entry.dispatchEvent('saveLocalStorageProject'); + if (Entry.creationChangedEvent) + Entry.creationChangedEvent.notify(); +}; + +Entry.StateManager.prototype.getLastCommand = function() { + return this.undoStack_[this.undoStack_.length - 1]; }; /** @@ -108,11 +114,16 @@ Entry.StateManager.prototype.undo = function() { return; this.addActivity("undo"); this.startRestore(); - var state = this.undoStack_.pop(); - state.func.apply(state.caller, state.params); + while (this.undoStack_.length) { + var state = this.undoStack_.pop(); + state.func.apply(state.caller, state.params); + if (state.isPass !== true) + break; + } this.updateView(); this.endRestore(); - Entry.dispatchEvent('saveLocalStorageProject'); + if (Entry.creationChangedEvent) + Entry.creationChangedEvent.notify(); }; /** @@ -125,7 +136,8 @@ Entry.StateManager.prototype.redo = function() { var state = this.redoStack_.pop(); state.func.apply(state.caller, state.params); this.updateView(); - Entry.dispatchEvent('saveLocalStorageProject'); + if (Entry.creationChangedEvent) + Entry.creationChangedEvent.notify(); }; /** diff --git a/src/model/drag_instance.js b/src/model/drag_instance.js index 7a3c00f2d4..786d01f417 100644 --- a/src/model/drag_instance.js +++ b/src/model/drag_instance.js @@ -17,6 +17,8 @@ Entry.DragInstance.prototype.schema = { startY: 0, offsetX: 0, offsetY: 0, + absX: 0, + absY: 0, prev: null, height: 0, mode: 0, diff --git a/src/object.js b/src/object.js index 9da7c3b8fd..8bea73466f 100644 --- a/src/object.js +++ b/src/object.js @@ -23,11 +23,8 @@ Entry.EntryObject = function(model) { if (!this.objectType) this.objectType = 'sprite'; - /** @type {Blockly Xml} */ - if (model.script) - this.script = Blockly.Xml.textToDom(model.script); - else - this.script = Blockly.Xml.textToDom(''); + var script = model.script ? model.script : []; + this.script = new Entry.Code(script, this); /** @type {Array.} */ this.pictures = model.sprite.pictures; @@ -232,7 +229,7 @@ Entry.EntryObject.prototype.generateView = function() { self.editObjectValues(false); } - + }; this.nameView_.value = this.name; @@ -342,7 +339,7 @@ Entry.EntryObject.prototype.generateView = function() { xInput.onkeypress = function (e) { if (e.keyCode == 13) { thisPointer.editObjectValues(false); - } + } }; xInput.onblur = function (bool) { @@ -506,11 +503,11 @@ Entry.EntryObject.prototype.generateView = function() { this.updateThumbnailView(); this.updateCoordinateView(); this.updateRotateMethodView(); - this.updateInputViews(); + this.updateInputViews(); this.updateCoordinateView(true); this.updateRotationView(true); - + return this.view_; } else if (Entry.type == "phone") { @@ -838,13 +835,8 @@ Entry.EntryObject.prototype.setScript = function(script) { * Object script getter * @return {!xml script} script */ -Entry.EntryObject.prototype.getScriptText = function(script) { - var xmlText = Blockly.Xml.domToText(this.script); - xmlText = xmlText.replace(/\sxmlns=\"(.*?)\"/,""); - xmlText = xmlText.replace(/\sclass=\"(.*?)\"/g,''); - xmlText = xmlText.replace(/\sid=\"(.*?)\"/g,""); - xmlText = xmlText.replace(/\sinline=\"(.*?)\"/g,""); - return xmlText; +Entry.EntryObject.prototype.getScriptText = function() { + return JSON.stringify(this.script.toJSON()); }; /** @@ -1455,7 +1447,7 @@ Entry.EntryObject.prototype.editObjectValues = function(click) { } if (click) { - + $(inputs).removeClass('selectedNotEditingObject'); for(var i=0; i 0); + this._iterVariableCount++; + return iterVariable; + }; + + p.unpublishIterateVariable = function() { + if (this._iterVariableCount) + this._iterVariableCount--; + }; + +})(Entry.BlockParser.prototype); diff --git a/src/parser/js.js b/src/parser/js.js new file mode 100644 index 0000000000..31038a88f2 --- /dev/null +++ b/src/parser/js.js @@ -0,0 +1,621 @@ +/* + * + */ +"use strict"; + +goog.provide("Entry.JSParser"); + +Entry.JSParser = function(syntax) { + this.syntax = syntax; + + this.scopeChain = []; + this.scope = null; +}; + +(function(p){ + p.Program = function(node) { + var code = []; + var block = []; + var body = node.body; + + //block statement + + block.push({ + type: this.syntax.Program + }); + + var separatedBlocks = this.initScope(node); + + block = block.concat(this.BlockStatement(node)); + + this.unloadScope(); + + code.push(block); + code = code.concat(separatedBlocks); + return code; + }; + + p.Identifier = function(node, scope) { + if (scope) + return scope[node.name]; + else + return this.scope[node.name]; + }; + + // Statement + p.ExpressionStatement = function(node) { + var expression = node.expression; + return this[expression.type](expression); + }; + + p.ForStatement = function(node) { + var init = node.init, + test = node.test, + update = node.update, + body = node.body; + + var contents = ""; + + var blockType = this.syntax.ForStatement; + + if (!blockType) { + body = this[body.type](body); + + var startVal = init.declarations[0].init.value; + var test = test; + var op = test.operator; + var endVal = test.right.value; + var updateOp = update.operator; + + var res = 0; + if(!(updateOp == '++')){ + var temp = startVal; + var startVal = endVal; + var endVal = temp; + } + + switch (op) { + case '<': + res = endVal - startVal; + break; + + case '<=': + res = ((endVal+1) - startVal); + break; + + case '>': + res = startVal - endVal; + break; + + case '>=': + res = ((startVal+ 1) - endVal); + break; + } + + return this.BasicIteration(node, res, body); + } else { + throw { + message : '지원하지 않는 표현식 입니다.', + node : node + }; + } + }; + + p.BlockStatement = function(node) { + var blocks = []; + var body = node.body; + + for (var i = 0; i < body.length; i++) { + var childNode = body[i]; + + var block = this[childNode.type](childNode); + if(!block) { + continue; + } + else if(block.type === undefined) { + throw { + message : '해당하는 블록이 없습니다.', + node : childNode + }; + } + else if (block) + blocks.push(block); + } + + return blocks; + }; + + p.EmptyStatement = function(node) { + throw { + message : 'empty는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.DebuggerStatement = function(node) { + throw { + message : 'debugger는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.WithStatement = function(node) { + var object = node.object, + body = node.body; + + throw { + message : 'with는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + //control flow + p.ReturnStaement = function(node) { + var args = node.arguments; + + throw { + message : 'return은 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.LabeledStatement = function(node) { + var label = node.label, + body = node.body; + + throw { + message : 'label은 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.BreakStatement = function(node) { + var label = node.label; + + throw { + message : 'break는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.ContinueStatement = function(node) { + var label = node.label; + + throw { + message : 'continue는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.IfStatement = function(node) { + var test = node.test, + consequent = node.consequent, + alternate = node.alternate; + + var blockType = this.syntax.IfStatement; + if (!blockType) { + return this.BasicIf(node); + } else { + throw { + message : 'if는 지원하지 않는 표현식 입니다.', + node : node + }; + } + + }; + + p.SwitchStatement = function(node) { + var discriminant = node.discriminant, + cases = node.cases; + + throw { + message : 'switch는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.SwitchCase = function(node) { + var test = node.test, + consequent = node.consequent; + + throw { + message : 'switch ~ case는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + //throwstatement + + p.ThrowStatement = function(node) { + var args = node.arguments; + + throw { + message : 'throw는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.TryStatement = function(node) { + var block = node.block, + handler = node.handler, + finalizer = node.finalizer; + + throw { + message : 'try는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.CatchClause = function(node) { + var param = node.param, + body = node.body; + + throw { + message : 'catch는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.WhileStatement = function(node) { + var test = node.test, + body = node.body; + var blockType = this.syntax.WhileStatement; + body = this[body.type](body); + + if (!blockType) { + return this.BasicWhile(node, body); + } else { + + throw { + message : 'while은 지원하지 않는 표현식 입니다.', + node : node + }; + } + }; + + p.DoWhileStatement = function(node) { + var body = node.body, + test = node.test; + + throw { + message : 'do ~ while은 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + + p.ForInStatement = function(node) { + var left = node.left, + right = node.right, + body = node.body; + + throw { + message : 'for ~ in은 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + //Declaration + + p.FunctionDeclaration = function(node) { + var id = node.id; + + var blockType = this.syntax.FunctionDeclaration; + + if (!blockType) { + return null; + } else { + throw { + message : 'function은 지원하지 않는 표현식 입니다.', + node : node + }; + } + }; + + p.VariableDeclaration = function(node) { + var declaration = node.declarations, + kind = node.kind; + + throw { + message : 'var은 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + // Expression + p.ThisExpression = function(node) { + return this.scope.this; + }; + + p.ArrayExpression = function(node) { + var elements = node.elements; + + throw { + message : 'array는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.ObjectExpression = function(node) { + var property = node.property; + + throw { + message : 'object는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.Property = function(node) { + var key = node.key, + value = node.value, + kind = node.kind; + + throw { + message : 'init, get, set은 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.FunctionExpression = function(node) { + + throw { + message : 'function은 지원하지 않는 표현식 입니다.', + node : node + }; + }; + // unary expression + + p.UnaryExpression = function(node) { + var operator = node.operator, + prefix = node.prefix, + args = node.argument; + + throw { + message : operator + '은(는) 지원하지 않는 명령어 입니다.', + node : node + }; + }; + + p.UnaryOperator = function(){ + return ["-" , "+" , "!" , "~" , "typeof" , "void" , "delete"]; + }; + + p.updateOperator = function() { + return ["++" , "--"]; + }; + + //Binary expression + p.BinaryOperator = function() { + return [ + "==" , "!=" , "===" , "!==", + "<" , "<=" , ">" , ">=", + "<<" , ">>" , ">>>", + "+" , "-" , "*" , "/" , "%", + "," , "^" , "&" , "in", + "instanceof" + ]; + }; + + p.AssignmentExpression = function(node) { + var operator = node.operator, + left = node.left, + right = node.right; + + throw { + message : operator + '은(는) 지원하지 않는 명령어 입니다.', + node : node + }; + }; + + p.AssignmentOperator = function() { + return [ + "=" , "+=" , "-=" , "*=" , "/=" , "%=", + "<<=" , ">>=" , ">>>=", + ",=" , "^=" , "&=" + ]; + }; + + p.LogicalExpression = function(node) { + var operator = node.operator, + left = node.left, + right = node.right; + throw { + message : operator + '은(는) 지원하지 않는 명령어 입니다.', + node : node + }; + }; + + p.LogicalOperator = function() { + return ["||" , "&&"]; + }; + + p.MemberExpression = function(node) { + var object = node.object, + property = node.property, + computed = node.computed; + + console.log(object.type) + object = this[object.type](object); + console.log(object); + + property = this[property.type](property, object); + + if(!(Object(object) === object && Object.getPrototypeOf(object) === Object.prototype)) { + throw { + message : object + '은(는) 잘못된 멤버 변수입니다.', + node : node + }; + } + + var blockType = property; + if(!blockType) { + throw { + message : property + '이(가) 존재하지 않습니다.', + node : node + }; + } + return blockType; + }; + + p.ConditionalExpression = function(node) { + var test = node.test, + alternate = node.alternate, + consequent = node.consequent; + + throw { + message : '지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.UpdateExpression = function(node) { + var operator = node.operator, + args = node.argument, + prefix = node.prefix; + + throw { + message : operator + '은(는) 지원하지 않는 명렁어 입니다.', + node : node + }; + }; + + p.CallExpression = function(node) { + var callee = node.callee, + args = node.arguments; + var blockType = this[callee.type](callee); + return { + type: blockType + }; + }; + + p.NewExpression = function(node) { + throw { + message : 'new는 지원하지 않는 표현식 입니다.', + node : node + }; + }; + + p.SequenceExpression = function(node) { + var expressions = node.expressions; + + throw { + message : '지원하지 않는 표현식 입니다.', + node : node + }; + }; + + // scope method + p.initScope = function(node) { + if (this.scope === null) { + var scoper = function() {}; + scoper.prototype = this.syntax.Scope; + this.scope = new scoper(); + } else { + var scoper = function() {}; + scoper.prototype = this.scope; + this.scope = new scoper(); + } + this.scopeChain.push(this.scope); + return this.scanDefinition(node); + }; + + p.unloadScope = function() { + this.scopeChain.pop(); + if (this.scopeChain.length) + this.scope = this.scopeChain[this.scopeChain.length - 1]; + else + this.scope = null; + }; + + p.scanDefinition = function(node) { + var body = node.body; + var separatedBlocks = []; + for (var i = 0; i < body.length; i++) { + var childNode = body[i]; + if (childNode.type === "FunctionDeclaration") { + this.scope[childNode.id.name] = this.scope.promise; + if (this.syntax.BasicFunction) { + var childBody = childNode.body; + separatedBlocks.push([{ + type: this.syntax.BasicFunction, + statements: [this[childBody.type](childBody)] + }]); + } + } + } + return separatedBlocks; + }; + + p.BasicFunction = function(node, body) { + + return null; + }; + + // custom node parser + p.BasicIteration = function(node, iterCount, body) { + var blockType = this.syntax.BasicIteration; + if (!blockType) + throw { + message : '지원하지 않는 표현식 입니다.', + node : node + }; + return { + params: [iterCount], + type: blockType, + statements: [body] + }; + }; + + p.BasicWhile = function(node, body) { + var raw = node.test.raw; + if (this.syntax.BasicWhile[raw]) { + return { + type: this.syntax.BasicWhile[raw], + statements: [body] + } + } else { + throw { + message : '지원하지 않는 표현식 입니다.', + node : node.test + }; + } + }; + + p.BasicIf = function(node) { + var consequent = node.consequent; + consequent = this[consequent.type](consequent); + try{ + var test = ''; + var operator = (node.test.operator === '===') ? '==' : node.test.operator; + + if(node.test.left.type === 'Identifier' && node.test.right.type === 'Literal') { + test = node.test.left.name + " " + + operator + " " + + node.test.right.raw; + } else if(node.test.left.type === 'Literal' && node.test.right.type === 'Identifier') { + test = node.test.right.name + " " + + operator + " " + + node.test.left.raw; + } else { + throw new Error(); + } + + if (this.syntax.BasicIf[test]) { + if(!Array.isArray(consequent) && typeof consequent === 'object') + consequent = [consequent]; + return { + type: this.syntax.BasicIf[test], + statements: [consequent] + } + } else { + throw new Error(); + } + } catch (e) { + throw { + message : '지원하지 않는 표현식 입니다.', + node : node.test + }; + } + }; + +})(Entry.JSParser.prototype); diff --git a/src/parser/parser.js b/src/parser/parser.js new file mode 100644 index 0000000000..ab2c64d342 --- /dev/null +++ b/src/parser/parser.js @@ -0,0 +1,204 @@ +/* + * + */ +"use strict"; + +goog.provide("Entry.Parser"); + +goog.require("Entry.JSParser"); +goog.require("Entry.BlockParser"); + +Entry.Parser = function(mode, syntax, cm) { + this._mode = mode; // maze ai workspace + this.syntax = {}; + this.codeMirror = cm; + this._lang = syntax || "js"; + this.availableCode = []; + + + if (mode === "maze") { + this._stageId = Number(Ntry.configManager.getConfig('stageId')); + if (typeof NtryData == "object") { + var configCode = NtryData.config[this._stageId].availableCode; + var playerCode = NtryData.player[this._stageId].code; + this.setAvailableCode(configCode, playerCode); + } + } + this.mappingSyntax(mode); + + switch (this._lang) { + case "js": + this._parser = new Entry.JSParser(this.syntax); + + var syntax = this.syntax; + + var assistScope = {}; + + for(var key in syntax.Scope ) { + assistScope[key + '();\n'] = syntax.Scope[key]; + } + + if('BasicIf' in syntax) { + assistScope['front'] = 'BasicIf'; + } + + CodeMirror.commands.javascriptComplete = function (cm) { + CodeMirror.showHint(cm, null, {globalScope:assistScope}); + } + + cm.on("keyup", function (cm, event) { + if (!cm.state.completionActive && (event.keyCode >= 65 && event.keyCode <= 95)) { + CodeMirror.showHint(cm, null, {completeSingle: false, globalScope:assistScope}); + } + }); + + break; + case "block": + this._parser = new Entry.BlockParser(this.syntax); + break; + } +}; + +(function(p) { + p.parse = function(code) { + var result = null; + + switch (this._lang) { + case "js": + try { + var astTree = acorn.parse(code); + result = this._parser.Program(astTree); + } catch(error) { + if (this.codeMirror) { + var annotation; + if (error instanceof SyntaxError) { + annotation = { + from: {line: error.loc.line - 1, ch: error.loc.column - 2}, + to: {line: error.loc.line - 1, ch: error.loc.column + 1} + } + error.message = "문법 오류입니다."; + } else { + annotation = this.getLineNumber(error.node.start, + error.node.end); + annotation.message = error.message; + annotation.severity = "error"; + this.codeMirror.markText( + annotation.from, annotation.to, { + className: "CodeMirror-lint-mark-error", + __annotation: annotation, + clearOnEnter: true + }); + } + + Entry.toast.alert('Error', error.message); + } + result = []; + } + break; + case "block": + var textCode = this._parser.Code(code); + var textArr = textCode.match(/(.*{.*[\S|\s]+?}|.+)/g); + if(Array.isArray(textArr)) { + result = textArr.reduce(function (prev, current, index) { + var temp = ''; + + if(index === 1) { + prev = prev + '\n'; + } + if(current.indexOf('function') > -1) { + temp = current + prev; + } else { + temp = prev + current; + } + + return temp + '\n'; + }); + } else { + result = ''; + } + + break; + } + + return result; + }; + + p.getLineNumber = function (start, end) { + var value = this.codeMirror.getValue(); + var lines = { + 'from' : {}, + 'to' : {} + }; + + var startline = value.substring(0, start).split(/\n/gi); + lines.from.line = startline.length - 1; + lines.from.ch = startline[startline.length - 1].length; + + var endline = value.substring(0, end).split(/\n/gi); + lines.to.line = endline.length - 1; + lines.to.ch = endline[endline.length - 1].length; + + return lines; + }; + + p.mappingSyntax = function(mode) { + var types = Object.keys(Entry.block); + + for (var i = 0; i < types.length; i++) { + var type = types[i]; + var block = Entry.block[type]; + if (block.mode === mode && this.availableCode.indexOf(type) > -1) { + var syntaxArray = block.syntax; + if (!syntaxArray) + continue; + var syntax = this.syntax; + for (var j = 0; j < syntaxArray.length; j++) { + var key = syntaxArray[j]; + if (j === syntaxArray.length - 2 && + typeof syntaxArray[j + 1] === "function") { + syntax[key] = syntaxArray[j + 1]; + break; + } + if (!syntax[key]) { + syntax[key] = {}; + } + if (j === syntaxArray.length - 1) { + syntax[key] = type; + } else { + syntax = syntax[key]; + } + } + } + } + }; + + p.setAvailableCode = function (configCode, playerCode) { + + var availableList = []; + configCode.forEach(function (items, i) { + items.forEach(function (item, i) { + availableList.push(item.type); + }); + }); + + if (playerCode instanceof Entry.Code) { + var blocks = playerCode.getBlockList(); + blocks.forEach(function(item){ + if(item.type !== NtryData.START && availableList.indexOf(item.type) === -1) + availableList.push(item.type); + }); + } else { + playerCode.forEach(function (items, i) { + items.forEach(function (item, i) { + if(item.type !== NtryData.START && availableList.indexOf(item.type) === -1) { + availableList.push(item.type); + } + }); + }); + } + + this.availableCode = this.availableCode.concat(availableList); + } + + +})(Entry.Parser.prototype); diff --git a/src/playground.js b/src/playground.js index 7c8b2c9175..c0f9e2443c 100644 --- a/src/playground.js +++ b/src/playground.js @@ -4,18 +4,15 @@ */ 'use strict'; +goog.require("Entry.Workspace"); +goog.require("Entry.BlockDriver"); + /** * Class for a playground. * This manage all view related with block. * @constructor */ Entry.Playground = function() { - /** - * apply menu blocks by object type - * @type {dictionary} - */ - this.menuBlocks_ = {}; - this.isTextBGMode_ = false; this.enableArduino = false; @@ -27,10 +24,7 @@ Entry.Playground = function() { */ this.viewMode_ = 'default'; Entry.addEventListener('textEdited', this.injectText); - Entry.addEventListener('entryBlocklyChanged', this.editBlock); - Entry.addEventListener('entryBlocklyMouseUp', this.mouseupBlock); Entry.addEventListener('hwChanged', this.updateHW); - }; /** @@ -196,6 +190,7 @@ Entry.Playground.prototype.generateDefaultView = function(defaultView) { * @return {Element} */ Entry.Playground.prototype.generateTabView = function(tabView) { + var that = this; var tabList = Entry.createElement('ul'); tabList.addClass('entryTabListWorkspace'); this.tabList_ = tabList; @@ -208,7 +203,8 @@ Entry.Playground.prototype.generateTabView = function(tabView) { codeTab.addClass('entryTabSelected'); tabList.appendChild(codeTab); codeTab.bindOnClick(function(e) { - Entry.playground.changeViewMode('code'); + that.changeViewMode('code'); + that.blockMenu.reDraw(); }); this.tabViewElements.code = codeTab; @@ -264,130 +260,63 @@ Entry.Playground.prototype.generateTabView = function(tabView) { * @return {Element} */ Entry.Playground.prototype.generateCodeView = function(codeView) { - if (!Entry.type || Entry.type == 'workspace') { - var categoryView = Entry.createElement('div', 'entryCategory'); - categoryView.addClass('entryCategoryWorkspace'); - codeView.appendChild(categoryView); - this.categoryView_ = categoryView; - - var categoryListView = Entry.createElement('ul', 'entryCategoryList'); - categoryListView.addClass('entryCategoryListWorkspace'); - categoryView.appendChild(categoryListView); - this.categoryListView_ = categoryListView; - - var blockMenuView = Entry.createElement('div', 'entryBlocklyWorkspace'); - blockMenuView.addClass('entryBlockMenuWorkspace'); - codeView.appendChild(blockMenuView); - $(blockMenuView).mouseenter(function(e) { - if (Entry.playground.resizing) - return; - Entry.playground.focusBlockMenu = true; - var width = Blockly.mainWorkspace.blockMenu.blockMenuWidth + 84; - if (width > Entry.interfaceState.menuWidth) { - this.widthBackup = Entry.interfaceState.menuWidth; - $('.entryBlockMenuWorkspace>svg').stop().animate({ - width: width - 64 - }, 200); - //Entry.resizeElement({menuWidth: width}) - } - }); - $(blockMenuView).mouseleave(function(e) { - if (Entry.playground.resizing) - return; - if (blockMenuView.widthBackup && - !Blockly.mainWorkspace.blockMenu.hasStalkerBlock) - $('.entryBlockMenuWorkspace>svg').stop().animate({ - width: this.widthBackup - 64 - }, 200); - delete this.widthBackup; - delete Entry.playground.focusBlockMenu; - }); - Entry.addEventListener('entryBlocklyChanged', function(e) { - var blockMenuView = Entry.playground.blockMenuView_; - if (blockMenuView.widthBackup) - Entry.resizeElement({menuWidth: blockMenuView.widthBackup}); - delete blockMenuView.widthBackup; - delete Entry.playground.focusBlockMenu; - }); - this.blockMenuView_ = blockMenuView; - - var variableView = this.createVariableView(); - codeView.appendChild(variableView); - this.variableView_ = variableView; - - var blocklyView = Entry.createElement('div', 'entryBlockly'); - blocklyView.addClass('entryBlocklyWorkspace'); - this.blocklyView_ = blocklyView; - Entry.bindAnimationCallback(this.blocklyView_, - function(e) {Blockly.fireUiEvent(window, 'resize'); - Entry.playground.blocklyView_.removeClass('foldOut'); - }); - codeView.appendChild(blocklyView); - - var XML = Entry.parseTexttoXML(''); - Blockly.inject( - blocklyView, - { - path: Entry.blockInjectPath || '.././', - toolbox: XML, - trashcan: true, - blockmenu: this.blockMenuView_, - mediaFilePath: Entry.mediaFilePath - }); - Blockly.mainWorkspace.flyout_.hide(); - Blockly.mainWorkspace.blockMenu.hide(); - document.addEventListener("blocklyWorkspaceChange", this.syncObjectWithEvent, false); - - /* - var blockHelpBtn = Entry.createElement('button', 'entryBlockHelpBtn'); - blockHelpBtn.addClass('entryBlockHelpBtn', 'entryBtn'); - blockHelpBtn.bindOnClick(function() { - Entry.helper.blockHelperOn(); - }); - blocklyView.appendChild(blockHelpBtn); - */ - - this.blockMenu = Blockly.mainWorkspace.blockMenu; - Entry.hw.banHW(); - return codeView; - } else if (Entry.type == 'phone') { - var categoryView = Entry.createElement('div', 'entryCategory'); - categoryView.addClass('entryCategoryPhone'); - codeView.appendChild(categoryView); - this.categoryView_ = categoryView; - - var categoryListView = Entry.createElement('ul', 'entryCategoryList'); - categoryListView.addClass('entryCategoryListPhone'); - categoryView.appendChild(categoryListView); - this.categoryListView_ = categoryListView; - - - var variableView = this.createVariableView(); - codeView.appendChild(variableView); - this.variableView_ = variableView; + var variableView = this.createVariableView(); + codeView.appendChild(variableView); + this.variableView_ = variableView; + + codeView = Entry.Dom(codeView); + var boardView = Entry.Dom("div", { + parent: codeView, + id: "entryWorkspaceBoard", + class: "entryWorkspaceBoard" + }); + var blockMenuView = Entry.Dom("div", { + parent: codeView, + id: "entryWorkspaceBlockMenu", + class: "entryWorkspaceBlockMenu" + }); - var blocklyView = Entry.createElement('div', 'entryBlockly'); - blocklyView.addClass('entryBlocklyPhone'); - this.blocklyView_ = blocklyView; - codeView.appendChild(blocklyView); + // new Entry.BlockDriver().convert(); + // //attach event for event block + // var blocks = Entry.block; + + // blocks.when_run_button_click.event = "start"; + // blocks.when_some_key_pressed.event = "keyPress"; + // blocks.when_some_key_click.event = "keyPress"; + // blocks.when_message_cast.event = "when_message_cast"; + // blocks.when_scene_start.event = "when_scene_start"; + // blocks.when_clone_start.event = "when_clone_start"; + // blocks.mouse_clicked.event = "mouse_clicked"; + // blocks.mouse_click_cancled.event = "mouse_click_cancled"; + // blocks.when_object_click.event = "when_object_click"; + // blocks.when_object_click_canceled.event = "when_object_click_canceled"; + + // blocks.if_else.template = "만일 %1 이라면 %2 %3 아니면"; + // blocks.if_else.params.push({ + // type: 'LineBreak' + // }); + + this.mainWorkspace = new Entry.Workspace( + { + 'blockMenu': { + dom: blockMenuView, + align: "LEFT", + categoryData: EntryStatic.getAllBlocks(), + scroll: true + }, + 'board': { + dom: boardView + }/*, + 'vimBoard': { + dom: boardView + }*/ + } + ); + this.blockMenu = this.mainWorkspace.blockMenu; + this.board = this.mainWorkspace.board; - var XML = Entry.parseTexttoXML(''); - Blockly.inject( - blocklyView, - { - path: Entry.blockInjectPath || '.././', - toolbox: XML, - trashcan: true, - mediaFilePath: Entry.mediaFilePath - }); - Blockly.mainWorkspace.flyout_.autoClose = true; - Blockly.mainWorkspace.flyout_.hide(); - document.addEventListener("blocklyWorkspaceChange", this.syncObjectWithEvent, false); - this.blockMenu = Blockly.mainWorkspace.flyout_; - Entry.hw.banHW(); - return codeView; - } + if (Entry.hw) this.updateHW(); }; /** @@ -858,10 +787,9 @@ Entry.Playground.prototype.injectObject = function(object) { this.object = null; return; } - if (object === this.object) - return; + if (object === this.object) return; + if (this.object) { - this.syncObject(this.object); this.object.toggleInformation(false); } this.object = object; @@ -889,64 +817,17 @@ Entry.Playground.prototype.injectObject = function(object) { this.changeViewMode('picture'); else if (viewMode == 'sound') this.changeViewMode('sound'); + this.reloadPlayground(); - if (!this.menuInjected) - this.selectMenu(0); }; /** * Inject code */ Entry.Playground.prototype.injectCode = function() { - var object = this.object; - Blockly.mainWorkspace.clear(); - Blockly.Xml.domToWorkspace(Blockly.mainWorkspace, object.script); - - var blockXML = object.script; - var veryLeftX = 0; - var veryTopY = 0; - var veryLeftBlock = null; - - $(blockXML).children("block").each(function(index) { - var x = Number($(this).attr('x')); - var y = Number($(this).attr('y')); - - if(index == 0) { - veryLeftX = x; - veryTopY = y; - veryLeftBlock = this; - } - - if(x < veryLeftX) { - veryLeftX = x; //most left-located X coordinate - veryLeftBlock = this; //most left-located block for this point - } - - if(y < veryTopY) { - varyTopY = y; //most top-located Y coordinate for this point - } - }); - - //adjusing scroll bar by most left-located block - if(veryLeftBlock != null) { - var targetX = Number($(veryLeftBlock).attr('x')); - var targetY = Number($(veryLeftBlock).attr('y')); - - var metrics = Blockly.mainWorkspace.getMetrics(); - - var adjustingX = (metrics.viewWidth * 0.1).toFixed(1); - var adjustingY = (metrics.viewHeight * 0.4).toFixed(1); - - if(targetY == veryTopY) - adjustingY = (metrics.viewHeight * 0.1).toFixed(1); - - var scrollX = targetX - metrics.contentLeft - adjustingX; - var scrollY = targetY - metrics.contentTop - adjustingY; - - Blockly.mainWorkspace.scrollbar.set(scrollX, scrollY); - - //this.adjustScroll(0, 0); - } + var code = this.object.script; + this.mainWorkspace.changeBoardCode(code); + code.board.adjustThreadsPosition(); }; Entry.Playground.prototype.adjustScroll = function(xc, yc) { @@ -954,7 +835,7 @@ Entry.Playground.prototype.adjustScroll = function(xc, yc) { var vScroll = Blockly.mainWorkspace.scrollbar.vScroll; hScroll.svgGroup_.setAttribute('opacity', '1'); vScroll.svgGroup_.setAttribute('opacity', '1'); - + if(Blockly.mainWorkspace.getMetrics()) { Blockly.removeAllRanges(); var metrics = Blockly.mainWorkspace.getMetrics(); @@ -969,16 +850,15 @@ Entry.Playground.prototype.adjustScroll = function(xc, yc) { Blockly.mainWorkspace.scrollbar.set(-x - metrics.contentLeft, -y - metrics.contentTop); - - } + + } }; /** * Inject picture */ Entry.Playground.prototype.injectPicture = function() { var view = this.pictureListView_; - if (!view) - return; + if (!view) return; while (view.hasChildNodes()) { view.removeChild(view.lastChild); } @@ -1207,7 +1087,6 @@ Entry.Playground.prototype.changeViewMode = function(viewType) { if (viewType == 'variable') return; var views = this.view_.children; - this.viewMode_ = viewType; for (var i = 0; i -1) @@ -1259,32 +1138,17 @@ Entry.Playground.prototype.createVariableView = function() { */ Entry.Playground.prototype.toggleOnVariableView = function() { Entry.playground.changeViewMode('code'); - this.categoryView_.addClass('entryRemove'); - if (this.blockMenuView_) - this.blockMenuView_.addClass('entryHidden'); + this.hideBlockMenu(); Entry.variableContainer.updateList(); this.variableView_.removeClass('entryRemove'); this.resizeHandle_.removeClass('entryRemove'); }; Entry.Playground.prototype.toggleOffVariableView = function() { - this.categoryView_.removeClass('entryRemove'); - if (this.blockMenuView_) - this.blockMenuView_.removeClass('entryHidden'); + this.showBlockMenu(); this.variableView_.addClass('entryRemove'); }; -/** - * Save current playground data to selected object - * @param {?Entry.EntryObject} object - */ -Entry.Playground.prototype.syncObject = function(object) { - if (this.object && !object) - object = this.object; - if (object) { - object.setScript(Blockly.Xml.workspaceToDom(Blockly.mainWorkspace)); - } -}; /** */ @@ -1331,17 +1195,7 @@ Entry.Playground.prototype.restoreBlock = function(targetObject, blockString) { ); } var script = Blockly.Xml.textToDom(blockString); - Blockly.mainWorkspace.clear(); - Blockly.Xml.domToWorkspace(Blockly.mainWorkspace, script); - this.syncObject(); -}; - -/** - * Save current playground data to selected object with event - * @param {event} e - */ -Entry.Playground.prototype.syncObjectWithEvent = function(e) { - Entry.playground.syncObject(); + //TODO: restore block }; /** @@ -1349,106 +1203,15 @@ Entry.Playground.prototype.syncObjectWithEvent = function(e) { * @param {!string} objectType */ Entry.Playground.prototype.setMenu = function(objectType) { - if (this.currentObjectType == objectType) - return; - this.categoryListView_.innerHTML = ''; - this.blockMenu.unbanClass(this.currentObjectType); - this.blockMenu.banClass(objectType); - for (var i in this.blockJSON) { - var categoryName = this.blockJSON[i].category; - var element = Entry.createElement('li', 'entryCategory' + categoryName); - if ((categoryName == "brush" && objectType == "textBox") || - (categoryName == "text" && objectType == "sprite") || - ((categoryName != "func") && (!this.blockJSON[i].blocks || !this.blockJSON[i].blocks.length))) - element.addClass("entryRemove"); - element.innerHTML = Lang.Blocks[categoryName.toUpperCase()]; - element.bindOnClick(function () { - Entry.playground.selectMenu(this.id.substring(13)); - }); - if (!Entry.type || Entry.type == 'workspace') { - element.addClass('entryCategoryElementWorkspace'); - } else if (Entry.type == 'phone') { - element.addClass('entryCategoryElementPhone'); - } - this.categoryListView_.appendChild(element); - } - this.selectMenu(0); + if (this.currentObjectType == objectType) return; + var blockMenu = this.blockMenu; + blockMenu.unbanClass(this.currentObjectType); + blockMenu.banClass(objectType); + blockMenu.setMenu(); + blockMenu.selectMenu(0, true); this.currentObjectType = objectType; }; -/**blockMenu - * Show blocks on blockly when user click - * @param {string|number} selector - * @param {?boolean} disableTab - */ -Entry.Playground.prototype.selectMenu = function(selector, disableTab) { - if (!this.object) { - Entry.toast.alert(Lang.Workspace.add_object_alert, - Lang.Workspace.add_object_alert_msg); - return; - } - this.lastSelector = selector; - - var elements = this.categoryListView_.children; - if (!Entry.type || Entry.type == 'workspace') { - for (var i in this.blockJSON) { - var categoryName = this.blockJSON[i].category; - if (typeof selector == 'string' && categoryName == selector || - typeof selector == 'number' && selector == i) { - if (elements[i].hasClass('entrySelectedCategory') && !disableTab) { - //Blockly.mainWorkspace.blockMenu.hide(); - this.blocklyView_.addClass('folding'); - this.blocklyView_.removeClass('foldOut'); - this.hideTabs(); - elements[i].removeClass('entrySelectedCategory'); - delete this.selectedMenu; - } else { - if (categoryName == "func") { - this.blockMenu.show( - Entry.Func.getMenuXml()); - } else { - if (categoryName == "variable") - this.checkVariables(); - this.blockMenu.showCategory(this.blockJSON[i]); - } - this.menuInjected = true; - if (this.blocklyView_.hasClass('folding')) { - this.blocklyView_.addClass('foldOut'); - this.blocklyView_.removeClass('folding'); - } - this.showTabs(); - elements[i].addClass('entrySelectedCategory'); - this.selectedMenu = categoryName; - } - } else { - elements[i].removeClass('entrySelectedCategory'); - } - } - } else if (Entry.type == 'phone') { - var categories = []; - for (var i = 0; i 1 && - blockJSON[blockJSON.length-1].category == "arduino") - blockJSON.splice(blockJSON.length-1, 0, {category: "func"}); - if (!Entry.messageEnable) - this.blockMenu.banClass("message"); - if (!Entry.variableEnable) - this.blockMenu.banClass("variable"); - if (!Entry.listEnable) - this.blockMenu.banClass("list"); - this.updateHW(); - if (!Entry.sceneEditable) - for (var i in blockJSON) - if (blockJSON[i].category == "scene") - blockJSON.splice(i, 1); - this.blockJSON = blockJSON; -}; - /** * Handle is resizing playground handle. * This add mouse move and mouse up event to document. @@ -1510,16 +1248,24 @@ Entry.Playground.prototype.setBlockMenu = function(blockJSON) { Entry.Playground.prototype.initializeResizeHandle = function(handle) { handle.onmousedown = function(e) { Entry.playground.resizing = true; - }; - document.addEventListener('mousemove', function(e) { - if (Entry.playground.resizing) { - Entry.resizeElement({ - menuWidth: e.x - Entry.interfaceState.canvasWidth + if (Entry.documentMousemove) { + Entry.playground.resizeEvent = Entry.documentMousemove.attach(this, function(e) { + if (Entry.playground.resizing) { + Entry.resizeElement({ + menuWidth: e.clientX - Entry.interfaceState.canvasWidth + }); + } }); } - }); + }; + document.addEventListener('mouseup', function(e) { - Entry.playground.resizing = false; + var listener = Entry.playground.resizeEvent + if (listener) { + Entry.playground.resizing = false; + Entry.documentMousemove.detach(listener); + delete Entry.playground.resizeEvent; + } }); }; @@ -1529,17 +1275,11 @@ Entry.Playground.prototype.initializeResizeHandle = function(handle) { Entry.Playground.prototype.reloadPlayground = function () { var selectedCategory, selector; - if (document.getElementsByClassName('entrySelectedCategory')[0]) { - selectedCategory = document.getElementsByClassName('entrySelectedCategory')[0]; - selector = selectedCategory.getAttribute('id').substring(13); - selectedCategory.removeClass('entrySelectedCategory'); - Entry.playground.selectMenu(selector); - } + var mainWorkspace = this.mainWorkspace; + if (!mainWorkspace) return; + mainWorkspace.getBlockMenu().reDraw(); - if (Entry.stage.selectedObject) { - Blockly.mainWorkspace.clear(); - Blockly.Xml.domToWorkspace(Blockly.mainWorkspace, Entry.stage.selectedObject.script); - } + if (this.object) this.object.script.view.reDraw(); }; /** @@ -1548,9 +1288,12 @@ Entry.Playground.prototype.reloadPlayground = function () { Entry.Playground.prototype.flushPlayground = function () { this.object = null; if (Entry.playground && Entry.playground.view_) { - Blockly.mainWorkspace.clear(); this.injectPicture(); this.injectSound(); + var board = Entry.playground.mainWorkspace.getBoard(); + board.clear(); + board.changeCode(null); + } }; @@ -1850,23 +1593,24 @@ Entry.Playground.prototype.getViewMode = function() { Entry.Playground.prototype.updateHW = function() { var self = Entry.playground; - if (!self.blockMenu) - return; + var blockMenu = self.mainWorkspace.blockMenu; + if (!blockMenu) return; + + var hw = Entry.hw; if (hw && hw.connected) { - self.blockMenu.unbanClass("arduinoConnected"); - self.blockMenu.banClass("arduinoDisconnected"); + blockMenu.unbanClass("arduinoConnected"); + blockMenu.banClass("arduinoDisconnected"); hw.banHW(); if (hw.hwModule) - self.blockMenu.unbanClass(hw.hwModule.name); + blockMenu.unbanClass(hw.hwModule.name); } else { - self.blockMenu.banClass("arduinoConnected"); - self.blockMenu.unbanClass("arduinoDisconnected"); + blockMenu.banClass("arduinoConnected"); + blockMenu.unbanClass("arduinoDisconnected"); Entry.hw.banHW(); } - if (self.object) - self.selectMenu(self.lastSelector, true); + if (self.object) blockMenu.reDraw(); }; Entry.Playground.prototype.toggleLineBreak = function(isLineBreak) { @@ -1909,3 +1653,10 @@ Entry.Playground.prototype.setFontAlign = function(fontAlign) { this.object.entity.setTextAlign(fontAlign); }; +Entry.Playground.prototype.hideBlockMenu = function() { + this.mainWorkspace.getBlockMenu().hide(); +}; + +Entry.Playground.prototype.showBlockMenu = function() { + this.mainWorkspace.getBlockMenu().show(); +}; diff --git a/src/project.js b/src/project.js index 22092068ff..b6c5d29cc2 100644 --- a/src/project.js +++ b/src/project.js @@ -5,13 +5,13 @@ Entry.getStartProject = function(mediaFilePath) { "category" : "기타", "scenes" : [ { - "name" : Lang.Blocks.SCENE + " 1", + "name" : "장면 1", "id" : "7dwq" } ], "variables" : [ { - "name" : Lang.Blocks.CALC_choose_project_timer_action_1, + "name" : "초시계", "id" : "brih", "visible" : false, "value" : "0", @@ -23,7 +23,7 @@ Entry.getStartProject = function(mediaFilePath) { "isCloud" : false }, { - "name" : Lang.Blocks.VARIABLE_get_canvas_input_value, + "name" : "대답", "id" : "1vu8", "visible" : false, "value" : "0", @@ -38,8 +38,24 @@ Entry.getStartProject = function(mediaFilePath) { "objects" : [ { "id" : "7y0y", - "name" : Lang.Blocks.entry_bot_name, - "script" : "1010", + "name" : "엔트리봇", + "script" : [ + [ + { + type: "when_run_button_click", + x: 40, + y: 50 + }, + { + type: "repeat_basic", + statements: [ + [ + {type: "move_direction"} + ] + ] + } + ] + ], "selectedPictureId" : "vx80", "objectType" : "sprite", "rotateMethod" : "free", @@ -51,7 +67,7 @@ Entry.getStartProject = function(mediaFilePath) { "ext" : ".mp3", "id" : "8el5", "fileurl" : mediaFilePath + "media/bark.mp3", - "name" : Lang.Blocks.bark_dog + "name" : "강아지 짖는소리" } ], "pictures" : [ @@ -95,6 +111,5 @@ Entry.getStartProject = function(mediaFilePath) { } ], "speed" : 60 - }; - + }; }; diff --git a/src/property_panel.js b/src/property_panel.js index 4522f58f40..1eeea67d23 100644 --- a/src/property_panel.js +++ b/src/property_panel.js @@ -70,6 +70,7 @@ Entry.PropertyPanel = function() { tabDom: tabDom, contentDom: contentDom }; + if(mode == 'hw') { $('.propertyTabhw').bind('dblclick',(function(){ Entry.dispatchEvent('hwModeChange'); @@ -105,13 +106,14 @@ Entry.PropertyPanel = function() { var mode = this.modes[key]; mode.tabDom.removeClass("selected"); mode.contentDom.addClass("entryHidden"); + mode.obj.visible = false; } var selected = this.modes[modeName]; selected.tabDom.addClass("selected"); selected.contentDom.removeClass("entryHidden"); - if(selected.obj.resize) selected.obj.resize(); + selected.obj.visible = true; this.selected = modeName; }; @@ -119,15 +121,25 @@ Entry.PropertyPanel = function() { splitter.onmousedown = function(e) { Entry.container.disableSort(); Entry.container.splitterEnable = true; - }; - document.addEventListener('mousemove', function(e) { - if (Entry.container.splitterEnable) { - Entry.resizeElement({canvasWidth: e.x || e.clientX}); + if (Entry.documentMousemove) { + Entry.container.resizeEvent = Entry.documentMousemove.attach(this, function(e) { + if (Entry.container.splitterEnable) { + Entry.resizeElement({ + canvasWidth: e.clientX || e.x + }); + } + }); } - }); + }; + document.addEventListener('mouseup', function(e) { - Entry.container.splitterEnable = false; + var listener = Entry.container.resizeEvent + if (listener) { + Entry.container.splitterEnable = false; + Entry.documentMousemove.detach(listener); + delete Entry.container.resizeEvent; + } Entry.container.enableSort(); }); }; -})(Entry.PropertyPanel.prototype) +})(Entry.PropertyPanel.prototype); diff --git a/src/util/block_driver.js b/src/util/block_driver.js new file mode 100644 index 0000000000..afd2f6bce9 --- /dev/null +++ b/src/util/block_driver.js @@ -0,0 +1,375 @@ +"use strict"; + +goog.provide("Entry.BlockDriver"); + +Entry.BlockDriver = function() { +}; + +(function(p) { + p.convert = function() { + var time = new Date(); + for (var blockType in Entry.block) { + if (typeof Entry.block[blockType] === "function") { + this._convertBlock(blockType); + } + } + console.log(new Date().getTime() - time.getTime()); + }; + + p._convertBlock = function(blockType) { + var blocklyInfo = Blockly.Blocks[blockType]; + var blockInfo = EntryStatic.blockInfo[blockType]; + var className, isNotFor; + if (blockInfo) { + className = blockInfo.class; + isNotFor = blockInfo.isNotFor; + + + //add block definition by xml to json + var xml = blockInfo.xml; + if (xml) { + xml = $.parseXML(xml); + var child = xml.childNodes[0]; + var def = generateBlockDef(child); + } + } + var mockup = new Entry.BlockMockup(blocklyInfo, def, blockType); + + var blockObject = mockup.toJSON(); + blockObject.class = className; + blockObject.isNotFor = isNotFor; + + if (_.isEmpty(blockObject.paramsKeyMap)) + delete blockObject.paramsKeyMap + if (_.isEmpty(blockObject.statementsKeyMap)) + delete blockObject.statementsKeyMap + + blockObject.func = Entry.block[blockType]; + + var PRIMITIVES = ['NUMBER', 'TRUE', 'FALSE', + 'TEXT', 'FUNCTION_PARAM_BOOLEAN', 'FUNCTION_PARAM_STRING', 'TRUE_UN']; + + if (PRIMITIVES.indexOf(blockType.toUpperCase()) > -1) + blockObject.isPrimitive = true; + Entry.block[blockType] = blockObject; + + + function generateBlockDef(block) { + var def = { + type: block.getAttribute('type'), + index: {} + }; + + var children = $(block).children(); + if (!children) return def; + for (var i =0; i 0) { + if (opt) { + field = { + type: 'Text', + text: field, + color: opt + }; + this.params.push(field); + this._addToParamsKeyMap(); + this.templates.push(this.getFieldCount()); + if (this.def && this.def.index && this.def.index[opt] !== undefined) { + this.definition.params.push(this.def.params[this.def.index[opt]]) + } else + this.definition.params.push(undefined); + } else { + this.templates.push(field); + } + } else { + if (field.constructor == Blockly.FieldIcon) { + if (field.type === "start") + this.params.push({ + type: "Indicator", + img: field.src_, + size: 17, + position: { + x: 0, y: -2 + } + }); + else + this.params.push({ + type: "Indicator", + img: field.src_, + size: 12, + }); + this._addToParamsKeyMap(); + this.templates.push(this.getFieldCount()); + if (this.definition) + this.definition.params.push(null); + } else if (field.constructor == Blockly.FieldDropdown) { + this.params.push({ + type: "Dropdown", + options: field.menuGenerator_, + value: field.menuGenerator_[0][1], + fontSize: 11 + }); + this._addToParamsKeyMap(opt); + + this.templates.push(this.getFieldCount()); + if (this.def && this.def.index && this.def.index[opt] !== undefined) { + this.definition.params.push(this.def.params[this.def.index[opt]]) + } else + this.definition.params.push(undefined); + } else if (field.constructor == Blockly.FieldDropdownDynamic) { + this.params.push({ + type: "DropdownDynamic", + value: null, + menuName: field.menuName_, + fontSize: 11 + }); + this.templates.push(this.getFieldCount()); + if (this.def && this.def.index && this.def.index[opt] !== undefined) { + this.definition.params.push(this.def.params[this.def.index[opt]]) + } else + this.definition.params.push(undefined); + this._addToParamsKeyMap(opt); + } else if (field.constructor == Blockly.FieldTextInput) { + this.params.push({ + type: "TextInput", + value: 10 + }); + this.templates.push(this.getFieldCount()); + this._addToParamsKeyMap(opt); + } else if (field.constructor == Blockly.FieldAngle) { + this.params.push({ + type: "Angle" + }); + this.templates.push(this.getFieldCount()); + if (this.def && this.def.index && this.def.index[opt] !== undefined) { + this.definition.params.push(this.def.params[this.def.index[opt]]) + } else + this.definition.params.push(null); + this._addToParamsKeyMap(opt); + } else if (field.constructor == Blockly.FieldKeydownInput) { + this.params.push({ + type: "Keyboard", + value: 81 + }); + this.templates.push(this.getFieldCount()); + if (this.def.index[opt] !== undefined) { + this.definition.params.push(this.def.params[this.def.index[opt]]) + } else + this.definition.params.push(undefined); + this._addToParamsKeyMap(opt); + } else if (field.constructor == Blockly.FieldColour) { + this.params.push({ + type: "Color" + }); + this.templates.push(this.getFieldCount()); + this._addToParamsKeyMap(opt); + } else { + console.log('else', field); + //console.log('else', field); + } + } + return this; + }; + + p.setColour = function(color) { + this.color = color; + }; + + p.setInputsInline = function() { + }; + + p.setOutput = function(bool, type) { + if (!bool) + return; + this.output = type; + }; + + p.setPreviousStatement = function(bool) { + this.isPrev = bool; + }; + + p.setNextStatement = function(bool) { + this.isNext = bool; + }; + + p.setEditable = function(bool) { + // Not implemented + }; + + p.getFieldCount = function() { + this.fieldCount++; + return "%" + this.fieldCount; + }; + + p._addToParamsKeyMap = function(key) { + key = key ? key : 'dummy_'+ Entry.Utils.generateId(); + var map = this.paramsKeyMap; + map[key] = Object.keys(map).length; + }; + + p._addToStatementsKeyMap = function(key) { + key = key ? key : 'dummy_'+ Entry.Utils.generateId(); + var map = this.statementsKeyMap; + map[key] = Object.keys(map).length; + }; + + +})(Entry.BlockMockup.prototype); diff --git a/src/util/static.js b/src/util/static.js index e13041cbb9..f0d01e79bb 100644 --- a/src/util/static.js +++ b/src/util/static.js @@ -25,5 +25,7 @@ Entry.STATIC = { /* execute return state */ RETURN: 0, - CONTINUE: 1 + CONTINUE: 1, + BREAK: 2, + PASS: 3 }; diff --git a/src/util/utils.js b/src/util/utils.js index e384c889b0..4517a91ada 100644 --- a/src/util/utils.js +++ b/src/util/utils.js @@ -53,45 +53,207 @@ Entry.Utils.colorDarken = function(color, factor) { } factor = factor === undefined ? 0.7 : factor; - r = Math.floor(r * factor).toString(16); - g = Math.floor(g * factor).toString(16); - b = Math.floor(b * factor).toString(16); + r = inspect(Math.floor(r * factor).toString(16)); + g = inspect(Math.floor(g * factor).toString(16)); + b = inspect(Math.floor(b * factor).toString(16)); + + function inspect(val) { + if (val.length != 2) val = '0' + val; + return val; + } return '#' + r + g + b; }; +Entry.Utils.colorLighten = function(color, amount) { + function clamp01(val) { + return Math.min(1, Math.max(0, val)); + } + + amount = (amount === 0) ? 0 : (amount || 20); + var hsl = Entry.Utils.hexToHsl(color); + hsl.l += amount / 100; + hsl.l = clamp01(hsl.l); + return Entry.Utils.hslToHex(hsl); +}; + +// Take input from [0, n] and return it as [0, 1] +Entry.Utils.bound01 = function(n, max) { + function isOnePointZero(n) { + return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; + } + + function isPercentage(n) { + return typeof n === "string" && n.indexOf('%') != -1; + } + + if (isOnePointZero(n)) { n = "100%"; } + + var processPercent = isPercentage(n); + n = Math.min(max, Math.max(0, parseFloat(n))); + + // Automatically convert percentage into number + if (processPercent) { + n = parseInt(n * max, 10) / 100; + } + + // Handle floating point rounding errors + if ((Math.abs(n - max) < 0.000001)) { + return 1; + } + + // Convert into [0, 1] range if it isn't already + return (n % max) / parseFloat(max); +}; + +// `rgbToHsl` +// Converts an RGB color value to HSL. +// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] +// *Returns:* { h, s, l } in [0,1] +Entry.Utils.hexToHsl = function(color) { + var r, g, b; + if (color.length === 7) { + r = parseInt(color.substr(1, 2), 16); + g = parseInt(color.substr(3, 2), 16); + b = parseInt(color.substr(5, 2), 16); + } else { + r = parseInt(color.substr(1, 2), 16); + g = parseInt(color.substr(2, 2), 16); + b = parseInt(color.substr(3, 2), 16); + } + + r = Entry.Utils.bound01(r, 255); + g = Entry.Utils.bound01(g, 255); + b = Entry.Utils.bound01(b, 255); + + var max = Math.max(r, g, b), min = Math.min(r, g, b); + var h, s, l = (max + min) / 2; + + if(max == min) { + h = s = 0; // achromatic + } + else { + var d = max - min; + s = l > 0.5 ? d / (2 - max - min) : d / (max + min); + switch(max) { + case r: h = (g - b) / d + (g < b ? 6 : 0); break; + case g: h = (b - r) / d + 2; break; + case b: h = (r - g) / d + 4; break; + } + + h /= 6; + } + + var hsl = { h: h, s: s, l: l }; + return { h: hsl.h * 360, s: hsl.s, l: hsl.l}; +}; + +// `hslToRgb` +// Converts an HSL color value to RGB. +// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] +// *Returns:* { r, g, b } in the set [0, 255] +Entry.Utils.hslToHex = function(color) { + var r, g, b; + + var h = Entry.Utils.bound01(color.h, 360); + var s = Entry.Utils.bound01(color.s, 1); + var l = Entry.Utils.bound01(color.l, 1); + + function hue2rgb(p, q, t) { + if(t < 0) t += 1; + if(t > 1) t -= 1; + if(t < 1/6) return p + (q - p) * 6 * t; + if(t < 1/2) return q; + if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; + return p; + } + + function pad2(c) { + return c.length == 1 ? '0' + c : '' + c; + } + + if(s === 0) { + r = g = b = l; // achromatic + } + else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = hue2rgb(p, q, h + 1/3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1/3); + } + + var rgb = { r: r * 255, g: g * 255, b: b * 255 }; + + var hex = [ + pad2(Math.round(rgb.r).toString(16)), + pad2(Math.round(rgb.g).toString(16)), + pad2(Math.round(rgb.b).toString(16)) + ]; + + return '#' + hex.join(''); +}; + + Entry.Utils.bindGlobalEvent = function(options) { + var doc = $(document); if (options === undefined) - options = ['resize', 'mousedown', 'mousemove', 'keydown', 'keyup']; - - if (!Entry.windowReszied && options.indexOf('resize') > -1) { + options = [ + 'resize', + 'mousedown', + 'mousemove', + 'keydown', + 'keyup', + 'dispose' + ]; + + if (options.indexOf('resize') > -1) { + if (Entry.windowReszied) { + $(window).off('resize'); + Entry.windowReszied.clear() + } Entry.windowResized = new Entry.Event(window); $(window).on('resize', (function(e) { Entry.windowResized.notify(e); })); } - if (!Entry.documentMousedown && options.indexOf('mousedown') > -1) { + if (options.indexOf('mousedown') > -1) { + if (Entry.documentMousedown) { + doc.off('mousedown'); + Entry.documentMousedown.clear() + } Entry.documentMousedown = new Entry.Event(window); - $(document).on('mousedown', (function(e) { + doc.on('mousedown', (function(e) { Entry.documentMousedown.notify(e); })); } - if (!Entry.documentMousemove && options.indexOf('mousemove') > -1) { + if (options.indexOf('mousemove') > -1) { + if (Entry.documentMousemove) { + doc.off('touchmove mousemove'); + Entry.documentMousemove.clear() + } + Entry.mouseCoordinate = {}; Entry.documentMousemove = new Entry.Event(window); - $(document).on('mousemove', (function(e) { + doc.on('touchmove mousemove', (function(e) { + if (e.originalEvent && e.originalEvent.touches) + e = e.originalEvent.touches[0]; Entry.documentMousemove.notify(e); Entry.mouseCoordinate.x = e.clientX; Entry.mouseCoordinate.y = e.clientY; })); } - if (!Entry.keyPressed && options.indexOf('keydown') > -1) { + if (options.indexOf('keydown') > -1) { + if (Entry.keyPressed) { + doc.off('keydown'); + Entry.keyPressed.clear() + } Entry.pressedKeys = []; Entry.keyPressed = new Entry.Event(window); - $(document).on('keydown', (function(e) { + doc.on('keydown', (function(e) { var keyCode = e.keyCode; if (Entry.pressedKeys.indexOf(keyCode) < 0) Entry.pressedKeys.push(keyCode); @@ -99,15 +261,28 @@ Entry.Utils.bindGlobalEvent = function(options) { })); } - if (!Entry.keyUpped && options.indexOf('keyup') > -1) { + if (options.indexOf('keyup') > -1) { + if (Entry.keyUpped) { + doc.off('keyup'); + Entry.keyUpped.clear() + } Entry.keyUpped = new Entry.Event(window); - $(document).on('keyup', (function(e) { + doc.on('keyup', (function(e) { var keyCode = e.keyCode; var index = Entry.pressedKeys.indexOf(keyCode); if (index > -1) Entry.pressedKeys.splice(index,1); Entry.keyUpped.notify(e); })); } + + if (options.indexOf('dispose') > -1) { + if (Entry.disposeEvent) Entry.disposeEvent.clear() + Entry.disposeEvent = new Entry.Event(window); + if (Entry.documentMousedown) + Entry.documentMousedown.attach(this, function(e) { + Entry.disposeEvent.notify(e); + }); + } }; Entry.Utils.makeActivityReporter = function() { @@ -187,10 +362,8 @@ Entry.createElement = function(type, elementId) { } }; element.bindOnClick = function(func) { - $(this).on('click touchstart', function(e) { + $(this).on('click tab', function(e) { e.stopImmediatePropagation(); - if (e.handled) return; - e.handled = true; func.call(this, e); }); }; @@ -832,6 +1005,90 @@ Entry.Utils.isRightButton = function(e) { return e.button == 2 || e.ctrlKey; }; +Entry.Utils.isTouchEvent = function(e) { + return e.type.toLowerCase() !== 'mousedown'; +}; + +Entry.Utils.inherit = function(parent, child) { + function F() {} + F.prototype = parent.prototype; + child.prototype = new F(); + return child; +}; + +Entry.bindAnimationCallbackOnce = function($elem, func) { + $elem.one("webkitAnimationEnd animationendo animationend", func); +}; + +Entry.Utils.isInInput = function(e) { + return e.target.type == 'textarea' || e.target.type == 'text'; +}; + +Entry.Utils.isFunction = function(fn) { + return typeof fn === 'function'; +}; + +Entry.Utils.addFilters = function (boardSvgDom, suffix) { + var defs = boardSvgDom.elem('defs'); + + //trashcan filter + var trashCanFilter = defs.elem('filter', {'id': 'entryTrashcanFilter_' + suffix}); + trashCanFilter.elem('feGaussianBlur', {'in': 'SourceAlpha', 'stdDeviation': 2, 'result': 'blur'}); + trashCanFilter.elem('feOffset', {'in': 'blur', 'dx': 1, 'dy': 1, 'result': 'offsetBlur'}); + var feMerge = trashCanFilter.elem('feMerge'); + feMerge.elem('feMergeNode', {'in': 'offsetBlur'}); + feMerge.elem('feMergeNode', {'in': 'SourceGraphic'}, feMerge); + + + var blockFilter = defs.elem('filter', {'id': 'entryBlockShadowFilter_' + suffix, 'height': '200%'}); + blockFilter.elem('feOffset', {result: 'offOut', in: 'SourceGraphic', dx: 0, dy:1}); + blockFilter.elem('feColorMatrix', { + result: 'matrixOut', in: 'offOut', type: 'matrix', values: '0.7 0 0 0 0 0 0.7 0 0 0 0 0 0.7 0 0 0 0 0 1 0' + }); + blockFilter.elem('feBlend', {in: 'SourceGraphic', in1:'offOut', mode: 'normal'}); + + var blockHighlightFilter = defs.elem('filter', {'id': 'entryBlockHighlightFilter_' + suffix}); + blockHighlightFilter.elem('feOffset', {result: 'offOut', in:"SourceGraphic", dx:0, dy:0}); + blockHighlightFilter.elem('feColorMatrix', { + result: 'matrixOut', in:"offOut", type: 'matrix', values: '1.3 0 0 0 0 0 1.3 0 0 0 0 0 1.3 0 0 0 0 0 1 0' + }); +}; + +Entry.Utils.addBlockPattern = function (boardSvgDom, suffix) { + var pattern = boardSvgDom.elem('pattern', { + id: 'blockHoverPattern_' + suffix, + class: 'blockHoverPattern', + patternUnits: "userSpaceOnUse", + patternTransform: "translate(12, 0)", + x: 0, y: 0, + width: 125, + height: 33 + }); + + var group = pattern.elem('g'); + + //this rect should be controlled by the board + //according to the target block + var elem = group.elem("rect", { + x: 0, y: 0, + width: 125, + height: 33 + }); + + var imagePath = Entry.mediaFilePath + 'block_pattern_(order).png'; + for (var i=1; i<5; i++) { + group.elem("image", { + class: 'pattern' + i, + href: imagePath.replace('(order)', i), + x: 0, y: 0, + width: 125, + height: 33 + }); + } + + return elem; +}; + Entry.Utils.COLLISION = { NONE: 0, UP: 1, @@ -839,3 +1096,13 @@ Entry.Utils.COLLISION = { LEFT: 3, DOWN: 4 }; + +Entry.Utils.createMouseEvent = function(type, event) { + var e = document.createEvent('MouseEvent'); + e.initMouseEvent( + type,true,true,window,0,0,0, + event.clientX, event.clientY, + false,false,false,false,0,null + ); + return e; +}; diff --git a/src/variable.js b/src/variable.js index 602a92dc76..34a0187a2f 100644 --- a/src/variable.js +++ b/src/variable.js @@ -29,8 +29,8 @@ Entry.Variable = function(variable) { this.value_ = variable.value; if (this.type == 'slide') { - this.minValue_ = variable.minValue ? variable.minValue : 0; - this.maxValue_ = variable.maxValue ? variable.maxValue : 100; + this.minValue_ = Number(variable.minValue ? variable.minValue : 0); + this.maxValue_ = Number(variable.maxValue ? variable.maxValue : 100); } if (!variable.isClone) { @@ -365,11 +365,10 @@ Entry.Variable.prototype.updateView = function() { this.valueView_.y = 1; if (this.isNumber()) { this.valueView_.text = this.getValue().toFixed(2).replace('.00', ''); - } - else { + } else { this.valueView_.text = this.getValue(); - } + var width = this.textView_.getMeasuredWidth() + this.valueView_.getMeasuredWidth() + 26; width = Math.max(width, 90); this.rect_.graphics.clear().f("#ffffff").ss(1, 2, 0).s("#A0A1A1") @@ -554,17 +553,15 @@ Entry.Variable.prototype.isNumber = function() { Entry.Variable.prototype.setValue = function(value) { if (this.type != 'slide') this.value_ = value; else { - var isMinFloat = Entry.isFloat(this.minValue_); - var isMaxFloat = Entry.isFloat(this.maxValue_); + value = Number(value); if (value < this.minValue_) this.value_ = this.minValue_; else if (value > this.maxValue_) this.value_ = this.maxValue_; else this.value_ = value; - if (!isMinFloat && !isMaxFloat) { + if (!this.isFloatPoint()) { this.viewValue_ = this.value_; - this.value_ = Math.floor(this.value_); - } + } else delete this.viewValue_; } if (this.isCloud_) Entry.variableContainer.updateCloudVariables(); @@ -790,9 +787,16 @@ Entry.Variable.prototype.updateSlideValueByView = function() { var value = (minValue + Number((Math.abs(maxValue - minValue) * ratio))).toFixed(2); value = parseFloat(value); - if (value < minValue) this.setValue(this.minValue_); - else if (value > maxValue) this.setValue(this.maxValue_); - else this.setValue(value); + + if (value < minValue) + value = this.minValue_; + else if (value > maxValue) + value = this.maxValue_; + if (!this.isFloatPoint()) { + this.viewValue_ = value; + value = Math.round(value); + } + this.setValue(value); }; Entry.Variable.prototype.getMinValue = function() { @@ -804,6 +808,7 @@ Entry.Variable.prototype.setMinValue = function(minValue) { if (this.value_ < minValue) this.value_ = minValue; this.updateView(); + this.isMinFloat = Entry.isFloat(this.minValue_); }; Entry.Variable.prototype.getMaxValue = function() { @@ -815,4 +820,9 @@ Entry.Variable.prototype.setMaxValue = function(maxValue) { if (this.value_ > maxValue) this.value_ = maxValue; this.updateView(); + this.isMaxFloat = Entry.isFloat(this.maxValue_); +}; + +Entry.Variable.prototype.isFloatPoint = function() { + return this.isMaxFloat || this.isMinFloat; }; diff --git a/src/variable_container.js b/src/variable_container.js index e94f07300f..d0433e0010 100644 --- a/src/variable_container.js +++ b/src/variable_container.js @@ -29,6 +29,9 @@ Entry.VariableContainer = function() { } }; this.selectedVariable = null; + this._variableRefs = []; + this._messageRefs = []; + this._functionRefs = []; }; Entry.VariableContainer.prototype.createDom = function(view) { @@ -128,9 +131,10 @@ Entry.VariableContainer.prototype.createDom = function(view) { //functionAddButton.innerHTML = '+ ' + Lang.Msgs.to_be_continue; this.functionAddButton_ = functionAddButton; functionAddButton.bindOnClick(function(e) { + var blockMenu = that._getBlockMenu(); Entry.playground.changeViewMode('code'); - if (Entry.playground.selectedMenu != 'func') - Entry.playground.selectMenu('func'); + if (blockMenu.lastSelector != 'func') + blockMenu.selectMenu('func'); that.createFunction(); }); @@ -203,8 +207,10 @@ Entry.VariableContainer.prototype.select = function(object) { object = this.selected == object ? null : object; if (this.selected) { this.selected.listElement.removeClass('selected'); - this.listView_.removeChild(this.selected.callerListElement); - delete this.selected.callerListElement; + if (this.selected.callerListElement) { + this.listView_.removeChild(this.selected.callerListElement); + delete this.selected.callerListElement; + } this.selected = null; } if (!object) @@ -227,46 +233,19 @@ Entry.VariableContainer.prototype.select = function(object) { */ Entry.VariableContainer.prototype.renderMessageReference = function(message) { var that = this; - var objects = Entry.container.objects_; - var messageType = ['when_message_cast', 'message_cast', 'message_cast_wait']; + var refs = this._messageRefs; + var messageId = message.id; var callers = []; + + for (var i=0; i -1) callers.push(refs[i]); + } + var listView = Entry.createElement('ul'); listView.addClass('entryVariableListCallerListWorkspace'); - for (var i in objects) { - var object = objects[i]; - var script = object.script; - var blocks = script.getElementsByTagName('block'); - for (var j = 0; j < blocks.length; j++) { - var block = blocks[j]; - var type = block.getAttribute('type'); - if (messageType.indexOf(type) > -1) { - var value = Entry.Xml.getField("VALUE", block); - if (value == message.id) - callers.push({object:object, block: block}); - } else if (type == 'function_general') { - var hashId = block.getElementsByTagName('mutation')[0]. - getAttribute('hashid'); - var func = Entry.variableContainer.getFunction(hashId); - if (func) { - func = func.content; - var funcBlocks = func.getElementsByTagName('block'); - for (var k = 0; k < funcBlocks.length; k++) { - var funcBlock = funcBlocks[k]; - type = funcBlock.getAttribute('type'); - if (messageType.indexOf(type) > -1) { - var value = Entry.Xml.getField("VALUE", funcBlock); - if (value == message.id) - callers.push({ - object:object, - block: funcBlock, - funcBlock: block - }); - } - } - } - } - } - } + for (var i in callers) { var caller = callers[i]; var element = Entry.createElement('li'); @@ -275,7 +254,7 @@ Entry.VariableContainer.prototype.renderMessageReference = function(message) { var nameElement = Entry.createElement('div'); nameElement.addClass('entryVariableListCallerNameWorkspace'); nameElement.innerHTML = caller.object.name + ' : ' + - Lang.Blocks['START_' + caller.block.getAttribute('type')]; + Lang.Blocks['START_' + caller.block.type]; element.appendChild(nameElement); element.caller = caller; element.message = message; @@ -288,10 +267,6 @@ Entry.VariableContainer.prototype.renderMessageReference = function(message) { } var caller = this.caller; - var id; - if (caller.funcBlock) id = caller.funcBlock.getAttribute("id"); - else id = caller.block.getAttribute("id"); - Blockly.mainWorkspace.activatePreviousBlock(Number(id)); Entry.playground.toggleOnVariableView(); Entry.playground.changeViewMode('variable'); }); @@ -314,55 +289,20 @@ Entry.VariableContainer.prototype.renderMessageReference = function(message) { */ Entry.VariableContainer.prototype.renderVariableReference = function(variable) { var that = this; - var objects = Entry.container.objects_; - var variableType = [ - 'get_variable', 'change_variable', 'hide_variable', - 'set_variable', 'show_variable', - 'add_value_to_list', 'remove_value_from_list', 'insert_value_to_list', - 'change_value_list_index', 'value_of_index_from_list', - 'length_of_list', 'show_list', 'hide_list', 'is_included_in_list' - ]; + var refs = this._variableRefs; + var variableId = variable.id_; var callers = []; + + + for (var i=0; i -1) callers.push(refs[i]); + } + var listView = Entry.createElement('ul'); listView.addClass('entryVariableListCallerListWorkspace'); - var value; - for (var i in objects) { - var object = objects[i]; - var script = object.script; - var blocks = script.getElementsByTagName('block'); - for (var j = 0; j < blocks.length; j++) { - var block = blocks[j]; - var type = block.getAttribute('type'); - if (variableType.indexOf(type) > -1) { - value = Entry.Xml.getField("VARIABLE", block) || - Entry.Xml.getField('LIST', block); - if (value == variable.id_) - callers.push({object:object, block: block}); - } else if (type == 'function_general') { - var hashId = block.getElementsByTagName('mutation')[0]. - getAttribute('hashid'); - var func = Entry.variableContainer.getFunction(hashId); - if (func) { - func = func.content; - var funcBlocks = func.getElementsByTagName('block'); - for (var k = 0; k < funcBlocks.length; k++) { - var funcBlock = funcBlocks[k]; - type = funcBlock.getAttribute('type'); - if (variableType.indexOf(type) > -1) { - value = Entry.Xml.getField("VARIABLE", funcBlock) || - Entry.Xml.getField('LIST', funcBlock); - if (value == variable.id_) - callers.push({ - object:object, - block: funcBlock, - funcBlock: block - }); - } - } - } - } - } - } + for (var i in callers) { var caller = callers[i]; var element = Entry.createElement('li'); @@ -371,7 +311,7 @@ Entry.VariableContainer.prototype.renderVariableReference = function(variable) { var nameElement = Entry.createElement('div'); nameElement.addClass('entryVariableListCallerNameWorkspace'); nameElement.innerHTML = caller.object.name + ' : ' + - Lang.Blocks['VARIABLE_' + caller.block.getAttribute('type')]; + Lang.Blocks['VARIABLE_' + caller.block.type]; element.appendChild(nameElement); element.caller = caller; element.variable = variable; @@ -382,15 +322,14 @@ Entry.VariableContainer.prototype.renderVariableReference = function(variable) { that.select(null); } var caller = this.caller; - var id; - if (caller.funcBlock) id = caller.funcBlock.getAttribute("id"); - else id = caller.block.getAttribute("id"); - Blockly.mainWorkspace.activatePreviousBlock(Number(id)); + var block = caller.funcBlock || caller.block; + block.view.getBoard().activateBlock(block); Entry.playground.toggleOnVariableView(); Entry.playground.changeViewMode('variable'); }); listView.appendChild(element); } + if (callers.length === 0) { var element = Entry.createElement('li'); element.addClass('entryVariableListCallerWorkspace'); @@ -408,25 +347,17 @@ Entry.VariableContainer.prototype.renderVariableReference = function(variable) { */ Entry.VariableContainer.prototype.renderFunctionReference = function(func) { var that = this; - var objects = Entry.container.objects_; - var variableType = 'function_general'; + var refs = this._functionRefs; + var funcId = func.id_; var callers = []; + + + for (var i=0; i -1) { + var funcId = block.type.substr(5); + if (funcId == id) continue; + } + + if (events && events.viewAdd) { + events.viewAdd.forEach(function(fn) { + block.getCode().object = datum.object; + if (fn) { + block.funcBlock = datum.block; + fn(block); + } + });; + } + + if (events && events.dataAdd) { + events.dataAdd.forEach(function(fn) { + block.getCode().object = datum.object; + if (fn) { + block.funcBlock = datum.block; + fn(block); + } + });; + } + } + } + + return datum; +}; + +Entry.VariableContainer.prototype.removeRef = function(type, block) { + var wsMode = Entry.playground.mainWorkspace.getMode(); + if (wsMode !== Entry.Workspace.MODE_BOARD) return; + + var arr = this[type]; + + for (var i=0; i -1) { + var funcId = block.type.substr(5); + if (funcId == id) continue; + } + + if (events && events.viewDestroy) { + events.viewDestroy.forEach(function(fn) { + if (fn) fn(block); + });; + } + + if (events && events.dataDestroy) { + events.dataDestroy.forEach(function(fn) { + if (fn) fn(block); + });; + } + } + } +}; + +Entry.VariableContainer.prototype._getBlockMenu = function() { + return Entry.playground.mainWorkspace.getBlockMenu(); +}; diff --git a/src/workspace/basic_block.js b/src/workspace/basic_block.js index 9817db428b..b88c46f86d 100644 --- a/src/workspace/basic_block.js +++ b/src/workspace/basic_block.js @@ -12,16 +12,30 @@ Entry.block.run = { } }; +Entry.block.mutant = { + skeleton: "basic", + event: "start", + color: "#3BBD70", + template: "test mutant block", + params: [ + ], + func: function() { + }, + changeEvent: new Entry.Event() +}; + Entry.block.jr_start = { skeleton: "pebble_event", event: "start", color: "#3BBD70", - contents: [ + template: "%1", + params: [ { type: "Indicator", img: "/img/assets/ntry/bitmap/jr/block_play_image.png", highlightColor: "#3BBD70", + position: {x: 0, y: 0}, size: 22 } ], @@ -40,14 +54,14 @@ Entry.block.jr_start = { Entry.block.jr_repeat = { skeleton: "pebble_loop", color: "#127CDB", - contents: [ + template: "%1 반복", + params: [ { type: "Text", text: Lang.Menus.repeat_0 }, { type: "Dropdown", - key: "REPEAT", options: [ [1,1], [2,2], @@ -60,26 +74,27 @@ Entry.block.jr_repeat = { [9,9], [10,10] ], - value: 1 + value: 3, + fontSize: 14, + roundValue: 3 }, { type: "Text", text: Lang.Menus.repeat_1 - }, - { - type: "Statement", - key: "STATEMENT", - accept: "pebble_basic" } ], + statements: [ + ], func: function() { if (this.repeatCount === undefined) { - this.repeatCount = this.block.values.REPEAT; + this.repeatCount = this.block.params[0]; return Entry.STATIC.CONTINUE; } else if (this.repeatCount > 0) { - console.log(this.repeatCount); this.repeatCount--; - this.executor.stepInto(this.block.values.STATEMENT); + var statement = this.block.statements[0]; + if (statement.getBlocks().length === 0) + return; + this.executor.stepInto(statement); return Entry.STATIC.CONTINUE; } else { delete this.repeatCount; @@ -90,11 +105,8 @@ Entry.block.jr_repeat = { Entry.block.jr_item = { skeleton: "pebble_basic", color: "#F46C6C", - contents: [ - { - type: "Text", - text: "꽃 모으기" - }, + template: "꽃 모으기 %1", + params: [ { type: "Indicator", img: "/img/assets/ntry/bitmap/jr/block_item_image.png", @@ -127,7 +139,8 @@ Entry.block.jr_item = { Entry.block.cparty_jr_item = { skeleton: "pebble_basic", color: "#8ABC1D", - contents: [ + template: "%1 %2", + params: [ { type: "Text", text: Lang.Menus.pick_up_pencil @@ -165,7 +178,8 @@ Entry.block.cparty_jr_item = { Entry.block.jr_north = { skeleton: "pebble_basic", color: "#A751E3", - contents: [ + template: "%1 %2", + params: [ { type: "Text", text: Lang.Menus.go_up @@ -221,7 +235,8 @@ Entry.block.jr_north = { Entry.block.jr_east = { skeleton: "pebble_basic", color: "#A751E3", - contents: [ + template: "%1 %2", + params: [ { type: "Text", text: Lang.Menus.go_right @@ -281,7 +296,8 @@ Entry.block.jr_east = { Entry.block.jr_south = { skeleton: "pebble_basic", color: "#A751E3", - contents: [ + template: "%1 %2", + params: [ { type: "Text", text: Lang.Menus.go_down @@ -341,7 +357,8 @@ Entry.block.jr_south = { Entry.block.jr_west = { skeleton: "pebble_basic", color: "#A751E3", - contents: [ + template: "%1 %2", + params: [ { type: "Text", text: Lang.Menus.go_left @@ -402,10 +419,11 @@ Entry.block.jr_start_basic = { skeleton: "basic_event", event: "start", color: "#3BBD70", - contents: [ + template: "%1 %2", + params: [ { type: "Indicator", - boxMultiplier: 1, + boxMultiplier: 2, img: "/img/assets/block_icon/start_icon_play.png", highlightColor: "#3BBD70", size: 17, @@ -430,7 +448,8 @@ Entry.block.jr_start_basic = { Entry.block.jr_go_straight = { skeleton: "basic", color: "#A751E3", - contents: [ + template: "%1 %2", + params: [ Lang.Menus.go_forward, { type: "Image", @@ -447,7 +466,6 @@ Entry.block.jr_go_straight = { var callBack = function() { self.isAction = false; }; - // turn direction Ntry.dispatchEvent("unitAction", Ntry.STATIC.WALK, callBack); @@ -464,7 +482,8 @@ Entry.block.jr_go_straight = { Entry.block.jr_turn_left = { skeleton: "basic", color: "#A751E3", - contents: [ + template: "%1 %2", + params: [ Lang.Menus.jr_turn_left, { type: "Image", @@ -498,7 +517,8 @@ Entry.block.jr_turn_left = { Entry.block.jr_turn_right = { skeleton: "basic", color: "#A751E3", - contents: [ + template: "%1 %2", + params: [ Lang.Menus.jr_turn_right, { type: "Image", @@ -532,7 +552,8 @@ Entry.block.jr_turn_right = { Entry.block.jr_go_slow = { skeleton: "basic", color: "#f46c6c", - contents: [ + template: "%1 %2", + params: [ Lang.Menus.go_slow, { type: "Image", @@ -566,7 +587,9 @@ Entry.block.jr_go_slow = { Entry.block.jr_repeat_until_dest = { skeleton: "basic_loop", color: "#498DEB", - contents: [ + template: "%1 %2 %3 %4", + syntax: ["BasicWhile", "true"], + params: [ Lang.Menus.repeat_until_reach_2, { type: "Image", @@ -578,20 +601,19 @@ Entry.block.jr_repeat_until_dest = { type: "Image", img: "/img/assets/week/blocks/for.png", size: 24 - }, + } + ], + statements: [ { - type: "Statement", - key: "STATEMENT", - accept: "basic", - alignY: 15, - alignX: 2 + accept: "basic" } ], func: function() { - if (this.block.values.STATEMENT.getBlocks().length === 1) + var statement = this.block.statements[0]; + if (statement.getBlocks().length === 0) return; - this.executor.stepInto(this.block.values.STATEMENT); + this.executor.stepInto(statement); return Entry.STATIC.CONTINUE; } }; @@ -599,7 +621,8 @@ Entry.block.jr_repeat_until_dest = { Entry.block.jr_if_construction = { skeleton: "basic_loop", color: "#498DEB", - contents: [ + template: "%1 %2 %3 %4", + params: [ Lang.Menus.jr_if_1, { type: "Image", @@ -611,13 +634,11 @@ Entry.block.jr_if_construction = { type: "Image", img: "/img/assets/week/blocks/for.png", size: 24 - }, + } + ], + statements: [ { - type: "Statement", - key: "STATEMENT", - accept: "basic", - alignY: 15, - alignX: 2 + accept: "basic" } ], func: function() { @@ -652,11 +673,9 @@ Entry.block.jr_if_construction = { this.isContinue = true; - var statement = this.block.values.STATEMENT; - if (fitEntities.length === 0) { - return; - } else if (statement.getBlocks().length === 1) - return; + var statement = this.block.statements[0]; + if (fitEntities.length === 0) return; + else if (statement.getBlocks().length === 0) return; else { this.executor.stepInto(statement); return Entry.STATIC.CONTINUE; @@ -667,25 +686,22 @@ Entry.block.jr_if_construction = { Entry.block.jr_if_speed = { skeleton: "basic_loop", color: "#498DEB", - contents: [ - Lang.Menus.jr_if_1, + template: Lang.Menus.jr_if_1 + " %1 " + Lang.Menus.jr_if_2 + " %2", + params: [ { type: "Image", img: "/img/assets/ntry/bitmap/jr/jr_speed_image.png", size: 18 }, - Lang.Menus.jr_if_2, { type: "Image", img: "/img/assets/week/blocks/for.png", size: 24 - }, + } + ], + statements: [ { - type: "Statement", - key: "STATEMENT", - accept: "basic", - alignY: 15, - alignX: 2 + accept: "basic" } ], func: function() { @@ -721,12 +737,741 @@ Entry.block.jr_if_speed = { this.isContinue = true; - var statement = this.block.values.STATEMENT; + var statement = this.block.statements[0]; if (fitEntities.length === 0) return; - else if(statement.getBlocks().length === 1) return; + else if(statement.getBlocks().length === 0) return; else { this.executor.stepInto(statement); return Entry.STATIC.CONTINUE; } } }; + +// Entry.block.jr_promise_call = Entry.block.jr_promise_wrap; +// maze start block + +Entry.block.maze_step_start = { + skeleton: "basic_event", + mode: "maze", + event: "start", + color: "#3BBD70", + template: "%1 시작하기를 클릭했을 때", + syntax: ["Program"], + params: [ + { + type: "Indicator", + boxMultiplier: 2, + img: "/img/assets/block_icon/start_icon_play.png", + highlightColor: "#3BBD70", + size: 17, + position: { + x: 0, y: -2 + } + } + ], + func: function() { + var entities = Ntry.entityManager.getEntitiesByComponent( + Ntry.STATIC.UNIT); + + for (var key in entities) + this._unit = entities[key]; + + Ntry.unitComp = Ntry.entityManager.getComponent( + this._unit.id, Ntry.STATIC.UNIT); + } +}; + +Entry.block.maze_step_jump = { + skeleton: "basic", + mode: "maze", + color: "#FF6E4B", + template: "뛰어넘기%1", + params: [ + { + type: "Image", + img: "/img/assets/week/blocks/jump.png", + size: 24 + } + ], + syntax: ["Scope", "jump"], + func: function() { + if (!this.isContinue) { + + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + self.isAction = false; + }; + + // turn direction + + Ntry.dispatchEvent("unitAction", Ntry.STATIC.JUMP, callBack); + + return Entry.STATIC.CONTINUE; + } else if (this.isAction) { + return Entry.STATIC.CONTINUE; + } else { + delete this.isAction; + delete this.isContinue; + } + } +}; + +Entry.block.maze_step_for = { + skeleton: "basic_loop", + mode: "maze", + color: "#498DEB", + template: "%1 번 반복하기%2", + syntax: ["BasicIteration"], + params: [ + { + type: "Dropdown", + key: "REPEAT", + options: [ + [1,1], + [2,2], + [3,3], + [4,4], + [5,5], + [6,6], + [7,7], + [8,8], + [9,9], + [10,10] + ], + value: 1 + }, + { + type: "Image", + img: "/img/assets/week/blocks/for.png", + size: 24 + } + ], + statements: [ + { + accept: "basic" + } + ], + func: function() { + if (this.repeatCount === undefined) { + this.repeatCount = this.block.params[0]; + return Entry.STATIC.CONTINUE; + } else if (this.repeatCount > 0) { + this.repeatCount--; + var statement = this.block.statements[0]; + if (statement.getBlocks().length === 0) + return; + this.executor.stepInto(statement); + return Entry.STATIC.CONTINUE; + } else { + delete this.repeatCount; + } + } +}; + +Entry.block.test = { + skeleton: "basic_boolean_field", + mode: "maze", + color: "#127CDB", + template: "%1 this is test block %2", + params: [ + { + type: "Angle", + value: "90" + + }, + { + type: "Dropdown", + options: [ + [1,1], + [2,2], + [3,3], + [4,4], + [5,5], + [6,6], + [7,7], + [8,8], + [9,9], + [10,10] + ], + value: 1 + } + ], + func: function() { + } +}; + +Entry.block.maze_repeat_until_1 = { + skeleton: "basic_loop", + mode: "maze", + color: "#498DEB", + template: "%1 만날 때 까지 반복%2", + syntax: ["BasicWhile", "true"], + params: [ + { + type: "Image", + img: "/img/assets/ntry/block_inner/repeat_goal_1.png", + size: 18 + }, + { + type: "Image", + img: "/img/assets/week/blocks/for.png", + size: 24 + } + ], + statements: [ + { + accept: "basic" + } + ], + func: function() { + var statement = this.block.statements[0]; + if (statement.getBlocks().length === 0) + return; + + this.executor.stepInto(statement); + return Entry.STATIC.CONTINUE; + } +}; + +Entry.block.maze_repeat_until_2 = { + skeleton: "basic_loop", + mode: "maze", + color: "#498DEB", + template: "모든 %1 만날 때 까지 반복%2", + syntax: ["BasicWhile", "true"], + params: [ + { + type: "Image", + img: "/img/assets/ntry/block_inner/repeat_goal_1.png", + size: 18 + }, + { + type: "Image", + img: "/img/assets/week/blocks/for.png", + size: 24 + } + ], + statements: [ + { + accept: "basic" + } + ], + func: function() { + var statement = this.block.statements[0]; + if (statement.getBlocks().length === 0) + return; + + this.executor.stepInto(statement); + return Entry.STATIC.CONTINUE; + } +}; + + +Entry.block.maze_step_if_1 = { + skeleton: "basic_loop", + mode: "maze", + color: "#498DEB", + template: "만약 앞에 %1 있다면%2", + syntax: ["BasicIf", 'front == "wall"'], + params: [ + { + type: "Image", + img: "/img/assets/ntry/block_inner/if_target_1.png", + size: 18 + }, + { + type: "Image", + img: "/img/assets/week/blocks/if.png", + size: 24 + } + ], + statements: [ + { + accept: "basic" + } + ], + func: function() { + if (this.isContinue) + return; + var entities = Ntry.entityManager.getEntitiesByComponent( + Ntry.STATIC.UNIT); + + var entity; + for (var key in entities) + entity = entities[key]; + + var unitComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.UNIT); + var gridComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.GRID); + + var grid = {x: gridComp.x, y: gridComp.y}; + Ntry.addVectorByDirection(grid, unitComp.direction, 1); + + var existEntities = Ntry.entityManager.find( + { + type: Ntry.STATIC.GRID, + x: grid.x, + y: grid.y + }); + + var statement = this.block.statements[0]; + + if (existEntities.length === 0) { + this.executor.stepInto(statement); + return Entry.STATIC.CONTINUE; + } + + var fitEntities = Ntry.entityManager.find( + { + type: Ntry.STATIC.GRID, + x: grid.x, + y: grid.y + }, + { + type: Ntry.STATIC.TILE, + tileType: Ntry.STATIC.WALL + } + ); + + this.isContinue = true; + + if (fitEntities.length === 0) { + return; + } else if (statement.getBlocks().length === 0) + return; + else { + this.executor.stepInto(statement); + return Entry.STATIC.CONTINUE; + } + } +}; + +Entry.block.maze_step_if_2 = { + skeleton: "basic_loop", + mode: "maze", + color: "#498DEB", + template: "만약 앞에 %1 있다면%2", + syntax: ["BasicIf", 'front == "bee"'], + params: [ + { + type: "Image", + img: "/img/assets/ntry/bitmap/maze2/obstacle_01.png", + size: 18 + }, + { + type: "Image", + img: "/img/assets/week/blocks/if.png", + size: 24 + } + ], + statements: [ + { + accept: "basic" + } + ], + func: function() { + if (this.isContinue) + return; + var entities = Ntry.entityManager.getEntitiesByComponent( + Ntry.STATIC.UNIT); + + var entity; + for (var key in entities) + entity = entities[key]; + + var unitComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.UNIT); + var gridComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.GRID); + + var grid = {x: gridComp.x, y: gridComp.y}; + Ntry.addVectorByDirection(grid, unitComp.direction, 1); + + var fitEntities = Ntry.entityManager.find( + { + type: Ntry.STATIC.GRID, + x: grid.x, + y: grid.y + }, + { + type: Ntry.STATIC.TILE, + tileType: Ntry.STATIC.OBSTACLE_BEE + } + ); + + this.isContinue = true; + + var statement = this.block.statements[0]; + if (fitEntities.length === 0) { + return; + } else if (statement.getBlocks().length === 0) + return; + else { + this.executor.stepInto(statement); + return Entry.STATIC.CONTINUE; + } + } +}; + +Entry.block.maze_call_function = { + skeleton: "basic", + mode: "maze", + color: "#B57242", + template: "약속 불러오기%1", + syntax: ["Scope", "promise"], + params: [ + { + type: "Image", + img: "/img/assets/week/blocks/function.png", + size: 24 + } + ], + func: function() { + if (!this.funcExecutor) { + var codes = Ntry.entityManager.getEntitiesByComponent( + Ntry.STATIC.CODE); + + for (var key in codes) { + var code = codes[key].components[Ntry.STATIC.CODE].code; + this.funcExecutor = new Entry.Executor( + code.getEventMap("define")[0] + ); + } + } + + this.funcExecutor.execute(); + if (this.funcExecutor.scope.block === null) + return; + else + return Entry.STATIC.CONTINUE; + } +}; + +Entry.block.maze_define_function = { + skeleton: "basic_define", + mode: "maze", + color: "#B57242", + event: "define", + template: "약속하기%1", + syntax: ["BasicFunction"], + params: [ + { + type: "Image", + img: "/img/assets/week/blocks/function.png", + size: 24 + } + ], + statements: [ + { + accept: "basic" + } + ], + func: function(executor) { + if (this.executed) + return; + var statement = this.block.statements[0]; + if (statement.getBlocks().length === 0) + return; + this.executor.stepInto(statement); + this.executed = true; + return Entry.STATIC.CONTINUE; + } +}; + +Entry.block.maze_step_if_3 = { + skeleton: "basic_loop", + mode: "maze", + color: "#498DEB", + template: "만약 앞에 %1 있다면%2", + syntax: ["BasicIf", 'front == "banana"'], + params: [ + { + type: "Image", + img: "/img/assets/ntry/block_inner/if_target_3.png", + size: 18 + }, + { + type: "Image", + img: "/img/assets/week/blocks/if.png", + size: 24 + } + ], + statements: [ + { + accept: "basic" + } + ], + func: function() { + if (this.isContinue) + return; + var entities = Ntry.entityManager.getEntitiesByComponent( + Ntry.STATIC.UNIT); + + var entity; + for (var key in entities) + entity = entities[key]; + + var unitComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.UNIT); + var gridComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.GRID); + + var grid = {x: gridComp.x, y: gridComp.y}; + Ntry.addVectorByDirection(grid, unitComp.direction, 1); + + var fitEntities = Ntry.entityManager.find( + { + type: Ntry.STATIC.GRID, + x: grid.x, + y: grid.y + }, + { + type: Ntry.STATIC.TILE, + tileType: Ntry.STATIC.OBSTACLE_BANANA + } + ); + + this.isContinue = true; + + var statement = this.block.statements[0]; + if (fitEntities.length === 0) { + return; + } else if (statement.getBlocks().length === 0) + return; + else { + this.executor.stepInto(statement); + return Entry.STATIC.CONTINUE; + } + } +}; + +Entry.block.maze_step_if_4 = { + skeleton: "basic_loop", + mode: "maze", + color: "#498DEB", + template: "만약 앞에 %1 있다면%2", + syntax: ["BasicIf", 'front == "wall"'], + params: [ + { + type: "Image", + img: "/img/assets/ntry/block_inner/if_target_2.png", + size: 18 + }, + { + type: "Image", + img: "/img/assets/week/blocks/if.png", + size: 24 + } + ], + statements: [ + { + accept: "basic" + } + ], + func: function() { + if (this.isContinue) + return; + var entities = Ntry.entityManager.getEntitiesByComponent( + Ntry.STATIC.UNIT); + + var entity; + for (var key in entities) + entity = entities[key]; + + var unitComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.UNIT); + var gridComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.GRID); + + var grid = {x: gridComp.x, y: gridComp.y}; + Ntry.addVectorByDirection(grid, unitComp.direction, 1); + + var fitEntities = Ntry.entityManager.find( + { + type: Ntry.STATIC.GRID, + x: grid.x, + y: grid.y + }, + { + type: Ntry.STATIC.TILE, + tileType: Ntry.STATIC.WALL + } + ); + + this.isContinue = true; + + var statement = this.block.statements[0]; + if (fitEntities.length === 0) { + return; + } else if (statement.getBlocks().length === 0) + return; + else { + this.executor.stepInto(statement); + return Entry.STATIC.CONTINUE; + } + } +}; + +Entry.block.maze_step_move_step = { + skeleton: "basic", + mode: "maze", + color: "#A751E3", + template: "앞으로 한 칸 이동%1", + syntax: ["Scope", "move"], + params: [ + { + type: "Image", + img: "/img/assets/week/blocks/moveStep.png", + size: 24 + } + ], + func: function() { + if (!this.isContinue) { + + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + self.isAction = false; + }; + // turn direction + Ntry.dispatchEvent("unitAction", Ntry.STATIC.WALK, callBack); + + return Entry.STATIC.CONTINUE; + } else if (this.isAction) { + return Entry.STATIC.CONTINUE; + } else { + delete this.isAction; + delete this.isContinue; + } + } +}; + +Entry.block.maze_step_rotate_left= { + skeleton: "basic", + mode: "maze", + color: "#A751E3", + template: "왼쪽으로 회전%1", + syntax: ["Scope", "left"], + params: [ + { + type: "Image", + img: "/img/assets/week/blocks/turnL.png", + size: 24 + } + ], + func: function() { + if (!this.isContinue) { + + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + self.isAction = false; + }; + + // turn direction + Ntry.dispatchEvent("unitAction", Ntry.STATIC.TURN_LEFT, callBack); + + return Entry.STATIC.CONTINUE; + } else if (this.isAction) { + return Entry.STATIC.CONTINUE; + } else { + delete this.isAction; + delete this.isContinue; + } + } +}; + +Entry.block.maze_step_rotate_right = { + skeleton: "basic", + mode: "maze", + color: "#A751E3", + template: "오른쪽으로 회전%1", + syntax: ["Scope", "right"], + params: [ + { + type: "Image", + img: "/img/assets/week/blocks/turnR.png", + size: 24 + } + ], + func: function() { + if (!this.isContinue) { + + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + self.isAction = false; + }; + + // turn direction + Ntry.dispatchEvent("unitAction", Ntry.STATIC.TURN_RIGHT, callBack); + + return Entry.STATIC.CONTINUE; + } else if (this.isAction) { + return Entry.STATIC.CONTINUE; + } else { + delete this.isAction; + delete this.isContinue; + } + } + +}; + +Entry.block.test_wrapper = { + skeleton: "basic", + mode: "maze", + color: "#3BBD70", + template: "%1 this is test block %2", + params: [ + { + type: "Block", + accept: "basic_boolean_field", + value: [ + { + type: "test", + params: [30,50] + } + ] + }, + { + type: "Dropdown", + options: [ + [1,1], + [2,2], + [3,3], + [4,4], + [5,5], + [6,6], + [7,7], + [8,8], + [9,9], + [10,10] + ], + value: 1 + } + ], + func: function() { + } +}; + +Entry.block.basic_button = { + skeleton: "basic_button", + color: "#eee", + template: "%1", + params: [ + { + type: "Text", + text: "basic button", + color: "#333", + align: "center" + } + ], + func: function() { + } +}; diff --git a/src/workspace/block.js b/src/workspace/block.js index 0bf6fa52b5..fc9b92659c 100644 --- a/src/workspace/block.js +++ b/src/workspace/block.js @@ -1,44 +1,59 @@ /* -on* + * */ "use strict"; goog.provide("Entry.Block"); +goog.require('Entry.Thread'); goog.require('Entry.Utils'); goog.require('Entry.Model'); -goog.require("Entry.BoxModel"); goog.require("Entry.skeleton"); /* * */ Entry.Block = function(block, thread) { + var that = this; Entry.Model(this, false); this._schema = null; this.setThread(thread); this.load(block); + + var code = this.getCode(); + + code.registerBlock(this); + var events = this.events.dataAdd; + if (events && code.object) { + events.forEach(function(fn) { + if (Entry.Utils.isFunction(fn)) fn(that); + }); + } }; Entry.Block.MAGNET_RANGE = 10; Entry.Block.MAGNET_OFFSET = 0.4; +Entry.Block.DELETABLE_TRUE = 1; +Entry.Block.DELETABLE_FALSE = 2; +Entry.Block.DELETABLE_FALSE_LIGHTEN = 3; + (function(p) { p.schema = { id: null, - name: null, x: 0, y: 0, type: null, - values: {}, - prev: null, - next: null, + params: [], + statements: [], view: null, thread: null, - movable: true, - deletable: true, - readOnly: false + movable: null, + deletable: Entry.Block.DELETABLE_TRUE, + readOnly: null, + copyable: true, + events: {} }; p.load = function(block) { @@ -46,27 +61,82 @@ Entry.Block.MAGNET_OFFSET = 0.4; block.id = Entry.Utils.generateId(); this.set(block); - this.getSchema(); + this.loadSchema(); }; - p.getSchema = function() { + p.changeSchema = function(diff) { + this.set({params: []}); + this.loadSchema(); + }; + + p.getSchema = function() { // for lazy loading + if (!this._schema) + this.loadSchema(); + return this._schema; + }; + + p.loadSchema = function() { + var that = this; this._schema = Entry.block[this.type]; + + if (!this._schema) return; + + if (!this._schemaChangeEvent && this._schema.changeEvent) + this._schemaChangeEvent = this._schema.changeEvent.attach( + this, this.changeSchema); + + var events = this._schema.events; + if (events) { + for (var key in events) { + if (!this.events[key]) this.events[key] = []; + var funcs = events[key]; + for (var i=0; i 40 || pd.rightProximity > 40; + } + }, + "albert_value": { + "color": "#00979D", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.ALBERT_sensor_leftProximity ,"leftProximity"], + [Lang.Blocks.ALBERT_sensor_rightProximity,"rightProximity"], + [Lang.Blocks.ALBERT_sensor_light,"light"], + [Lang.Blocks.ALBERT_sensor_battery,"battery"], + [Lang.Blocks.ALBERT_sensor_signalStrength,"signalStrength"], + [Lang.Blocks.ALBERT_sensor_frontOid,"frontOid"], + [Lang.Blocks.ALBERT_sensor_backOid,"backOid"], + [Lang.Blocks.ALBERT_sensor_positionX,"positionX"], + [Lang.Blocks.ALBERT_sensor_positionY,"positionY"], + [Lang.Blocks.ALBERT_sensor_orientation,"orientation"] + ], + "value": "leftProximity", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ + null + ], + "type": "albert_value" + }, + "paramsKeyMap": { + "DEVICE": 0 + }, + "class": "albert_sensor", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var pd = Entry.hw.portData; + var dev = script.getField('DEVICE'); + return pd[dev]; + } + }, + "albert_move_forward_for_secs": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "1" ] + }, + null + ], + "type": "albert_move_forward_for_secs" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "albert_wheel", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + sq.leftWheel = 30; + sq.rightWheel = 30; + var timeValue = script.getNumberValue("VALUE") * 1000; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Albert.removeTimeout(timer); + }, timeValue); + Entry.Albert.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } + } + }, + "albert_move_backward_for_secs": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ + "1" + ] + }, + null + ], + "type": "albert_move_backward_for_secs" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "albert_wheel", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + sq.leftWheel = -30; + sq.rightWheel = -30; + var timeValue = script.getNumberValue("VALUE") * 1000; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Albert.removeTimeout(timer); + }, timeValue); + Entry.Albert.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } + } + }, + "albert_turn_for_secs": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "1" ] + }, + null + ], + "type": "albert_turn_for_secs", + "id": "como" + }, + "paramsKeyMap": { + "DIRECTION": 0, + "VALUE": 1 + }, + "class": "albert_wheel", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + var direction = script.getField("DIRECTION", script); + if (direction == 'LEFT') { + sq.leftWheel = -30; + sq.rightWheel = 30; + } else { + sq.leftWheel = 30; + sq.rightWheel = -30; + } + var timeValue = script.getNumberValue("VALUE") * 1000; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Albert.removeTimeout(timer); + }, timeValue); + Entry.Albert.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } + } + }, + "albert_change_both_wheels_by": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "10" ] + }, + { + "type": "text", + "params": [ "10" ] + }, + null + ], + "type": "albert_change_both_wheels_by" + }, + "paramsKeyMap": { + "LEFT": 0, + "RIGHT": 1 + }, + "class": "albert_wheel", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var left = script.getNumberValue('LEFT'); + var right = script.getNumberValue('RIGHT'); + sq.leftWheel = sq.leftWheel != undefined ? sq.leftWheel + left : left; + sq.rightWheel = sq.rightWheel != undefined ? sq.rightWheel + right : right; + return script.callReturn(); + } + }, + "albert_set_both_wheels_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "30" ] + }, + { + "type": "text", + "params": [ "30" ] + }, + null + ], + "type": "albert_set_both_wheels_to" + }, + "paramsKeyMap": { + "LEFT": 0, + "RIGHT": 1 + }, + "class": "albert_wheel", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + sq.leftWheel = script.getNumberValue('LEFT'); + sq.rightWheel = script.getNumberValue('RIGHT'); + return script.callReturn(); + } + }, + "albert_change_wheel_by": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "10" ] + }, + null + ], + "type": "albert_change_wheel_by" + }, + "paramsKeyMap": { + "DIRECTION": 0, + "VALUE": 1 + }, + "class": "albert_wheel", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var direction = script.getField('DIRECTION'); + var value = script.getNumberValue('VALUE'); + if (direction == 'LEFT') { + sq.leftWheel = sq.leftWheel != undefined ? sq.leftWheel + value : value; + } else if (direction == 'RIGHT') { + sq.rightWheel = sq.rightWheel != undefined ? sq.rightWheel + value : value; + } else { + sq.leftWheel = sq.leftWheel != undefined ? sq.leftWheel + value : value; + sq.rightWheel = sq.rightWheel != undefined ? sq.rightWheel + value : value; + } + return script.callReturn(); + } + }, + "albert_set_wheel_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "30" ] + }, + null + ], + "type": "albert_set_wheel_to" + }, + "paramsKeyMap": { + "DIRECTION": 0, + "VALUE": 1 + }, + "class": "albert_wheel", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var direction = script.getField('DIRECTION'); + var value = script.getNumberValue('VALUE'); + if (direction == 'LEFT') { + sq.leftWheel = value; + } else if (direction == 'RIGHT') { + sq.rightWheel = value; + } else { + sq.leftWheel = value; + sq.rightWheel = value; + } + return script.callReturn(); + } + }, + "albert_stop": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null + ], + "type": "albert_stop", + "id": "4adb" + }, + "class": "albert_wheel", + "isNotFor": [ + "albert" + ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } + }, + "albert_set_pad_size_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "108" ] + }, + { + "type": "text", + "params": [ "76" ] + }, + null + ], + "type": "albert_set_pad_size_to", + "id": "5mhg" + }, + "paramsKeyMap": { + "WIDTH": 0, + "HEIGHT": 1 + }, + "class": "albert_wheel", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + sq.padWidth = script.getNumberValue('WIDTH'); + sq.padHeight = script.getNumberValue('HEIGHT'); + return script.callReturn(); + } + }, + "albert_set_eye_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.General.red,"4"], + [Lang.General.yellow,"6"], + [Lang.General.green,"2"], + [Lang.Blocks.ALBERT_color_cyan,"3"], + [Lang.General.blue,"1"], + [Lang.Blocks.ALBERT_color_magenta,"5"], + [Lang.General.white,"7"] + ], + "value": "4", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "albert_set_eye_to" + }, + "paramsKeyMap": { + "DIRECTION": 0, + "COLOR": 1 + }, + "class": "albert_led", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var direction = script.getField("DIRECTION", script); + var color = Number(script.getField("COLOR", script)); + if (direction == 'LEFT') { + sq.leftEye = color; + } else if (direction == 'RIGHT') { + sq.rightEye = color; + } else { + sq.leftEye = color; + sq.rightEye = color; + } + return script.callReturn(); + } + }, + "albert_clear_eye": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "albert_clear_eye" + }, + "paramsKeyMap": { + "DIRECTION": 0 + }, + "class": "albert_led", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var direction = script.getField("DIRECTION", script); + if (direction == 'LEFT') { + sq.leftEye = 0; + } else if (direction == 'RIGHT') { + sq.rightEye = 0; + } else { + sq.leftEye = 0; + sq.rightEye = 0; + } + return script.callReturn(); + } + }, + "albert_body_led": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "켜기", "ON" ], + [ "끄기", "OFF" ] + ], + "value": "ON", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "albert_body_led" + }, + "paramsKeyMap": { + "STATE": 0 + }, + "class": "albert_led", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var state = script.getField("STATE", script); + if (state == 'ON') sq.bodyLed = 1; + else sq.bodyLed = 0; + return script.callReturn(); + } + }, + "albert_front_led": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "켜기", "ON" ], + [ "끄기", "OFF" ] + ], + "value": "ON", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "albert_front_led" + }, + "paramsKeyMap": { + "STATE": 0 + }, + "class": "albert_led", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var state = script.getField("STATE", script); + if (state == 'ON') sq.frontLed = 1; + else sq.frontLed = 0; + return script.callReturn(); + } + }, + "albert_beep": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "albert_beep" + }, + "class": "albert_buzzer", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + sq.buzzer = 440; + sq.note = 0; + var timeValue = 0.2 * 1000; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Albert.removeTimeout(timer); + }, timeValue); + Entry.Albert.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.buzzer = 0; + return script.callReturn(); + } + } + }, + "albert_change_buzzer_by": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "10" ] + }, + null + ], + "type": "albert_change_buzzer_by" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "albert_buzzer", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var value = script.getNumberValue('VALUE'); + sq.buzzer = sq.buzzer != undefined ? sq.buzzer + value : value; + sq.note = 0; + return script.callReturn(); + } + }, + "albert_set_buzzer_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "1000" ] + }, + null + ], + "type": "albert_set_buzzer_to" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "albert_buzzer", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + sq.buzzer = script.getNumberValue('VALUE'); + sq.note = 0; + return script.callReturn(); + } + }, + "albert_clear_buzzer": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "albert_clear_buzzer" + }, + "class": "albert_buzzer", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + sq.buzzer = 0; + sq.note = 0; + return script.callReturn(); + } + }, + "albert_play_note_for": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.note_c + '',"4"], + [Lang.General.note_c + '#',"5"], + [Lang.General.note_d + '',"6"], + [Lang.General.note_e + 'b',"7"], + [Lang.General.note_e + '',"8"], + [Lang.General.note_f + '',"9"], + [Lang.General.note_f + '#',"10"], + [Lang.General.note_g + '',"11"], + [Lang.General.note_g + '#',"12"], + [Lang.General.note_a + '',"13"], + [Lang.General.note_b + 'b',"14"], + [Lang.General.note_b + '',"15"] + ], + "value": "4", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [ "1", "1" ], + [ "2", "2" ], + [ "3", "3" ], + [ "4", "4" ], + [ "5", "5" ], + [ "6", "6" ], + [ "7", "7" ] + ], + "value": "1", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + "4", + { + "type": "text", + "params": [ "0.5" ] + }, + null + ], + "type": "albert_play_note_for" + }, + "paramsKeyMap": { + "NOTE": 0, + "OCTAVE": 1, + "VALUE": 2 + }, + "class": "albert_buzzer", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + var note = script.getNumberField("NOTE", script); + var octave = script.getNumberField("OCTAVE", script); + var beat = script.getNumberValue("VALUE", script); + var tempo = Entry.Albert.tempo; + note += (octave-1)*12; + var timeValue = beat*60*1000/tempo; + script.isStart = true; + script.timeFlag = 1; + sq.buzzer = 0; + sq.note = note; + if (timeValue > 100) { + var timer1 = setTimeout(function() { + sq.note = 0; + Entry.Albert.removeTimeout(timer1); + }, timeValue-100); + Entry.Albert.timeouts.push(timer1); + } + var timer2 = setTimeout(function() { + script.timeFlag = 0; + Entry.Albert.removeTimeout(timer2); + }, timeValue); + Entry.Albert.timeouts.push(timer2); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.note = 0; + return script.callReturn(); + } + } + }, + "albert_rest_for": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "0.25" ] + }, + null + ], + "type": "albert_rest_for" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "albert_buzzer", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + var timeValue = script.getNumberValue('VALUE'); + timeValue = timeValue*60*1000/Entry.Albert.tempo; + sq.buzzer = 0; + sq.note = 0; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Albert.removeTimeout(timer); + }, timeValue); + Entry.Albert.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + return script.callReturn(); + } + } + }, + "albert_change_tempo_by": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "20" ] + }, + null + ], + "type": "albert_change_tempo_by" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "albert_buzzer", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + Entry.Albert.tempo += script.getNumberValue('VALUE'); + if (Entry.Albert.tempo < 1) Entry.Albert.tempo = 1; + return script.callReturn(); + } + }, + "albert_set_tempo_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "60" ] + }, + null + ], + "type": "albert_set_tempo_to" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "albert_buzzer", + "isNotFor": [ "albert" ], + "func": function (sprite, script) { + Entry.Albert.tempo = script.getNumberValue('VALUE'); + if (Entry.Albert.tempo < 1) Entry.Albert.tempo = 1; + return script.callReturn(); + } + }, + "albert_move_forward": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + sq.leftWheel = 30; + sq.rightWheel = 30; + var timeValue = 1 * 1000; + setTimeout(function() { + script.timeFlag = 0; + }, timeValue); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.timeFlag; + delete script.isStart; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } + } + }, + "albert_move_backward": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null + ] + }, + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + var timeValue = 1 * 1000; + setTimeout(function() { + script.timeFlag = 0; + }, timeValue); + return script; + } else if (script.timeFlag == 1) { + sq.leftWheel = -30; + sq.rightWheel = -30; + return script; + } else { + delete script.timeFlag; + delete script.isStart; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } + } + }, + "albert_turn_around": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "왼쪽", "LEFT" ], + [ "오른쪽", "RIGHT" ] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ] + }, + "paramsKeyMap": { + "DIRECTION": 0 + }, + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + var direction = script.getField("DIRECTION", script); + var isLeft = direction == 'LEFT'; + script.leftValue = isLeft ? -30 : 30; + script.rightValue = isLeft ? 30 : -30; + script.isStart = true; + script.timeFlag = 1; + var timeValue = 1 * 1000; + setTimeout(function() { + script.timeFlag = 0; + }, timeValue); + return script; + } else if (script.timeFlag == 1) { + sq.leftWheel = script.leftValue; + sq.rightWheel = script.rightValue; + return script; + } else { + delete script.timeFlag; + delete script.isStart; + delete script.leftValue; + delete script.rightValue; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } + } + }, + "albert_set_led_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "왼쪽", "LEFT" ], + [ "오른쪽", "RIGHT" ], + [ "양쪽", "FRONT" ] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [ "빨간색", "4" ], + [ "노란색", "6" ], + [ "초록색", "2" ], + [ "하늘색", "3" ], + [ "파란색", "1" ], + [ "보라색", "5" ], + [ "하얀색", "7" ] + ], + "value": "4", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null, null ] + }, + "paramsKeyMap": { + "DIRECTION": 0, + "COLOR": 1 + }, + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var direction = script.getField("DIRECTION", script); + var color = Number(script.getField("COLOR", script)); + if (direction == 'FRONT') { + sq.leftEye = color; + sq.rightEye = color; + } else if (direction == 'LEFT') + sq.leftEye = color; + else + sq.rightEye = color; + + return script.callReturn(); + } + }, + "albert_clear_led": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "왼쪽", "LEFT" ], + [ "오른쪽", "RIGHT" ], + [ "양쪽", "FRONT" ] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ] + }, + "paramsKeyMap": { + "DIRECTION": 0 + }, + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var direction = script.getField("DIRECTION", script); + if (direction == 'FRONT') { + sq.leftEye = 0; + sq.rightEye = 0; + } else if (direction == 'LEFT') sq.leftEye = 0; + else sq.rightEye = 0; + + return script.callReturn(); + } + }, + "albert_change_wheels_by": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "왼쪽", "LEFT" ], + [ "오른쪽", "RIGHT" ], + [ "양쪽", "FRONT" ] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ] + }, + "paramsKeyMap": { + "DIRECTION": 0, + "VALUE": 1 + }, + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var pd = Entry.hw.portData; + var direction = script.getField('DIRECTION'); + var value = script.getNumberValue('VALUE'); + + if (direction == 'LEFT') { + sq.leftWheel = sq.leftWheel != undefined ? + sq.leftWheel + value : pd.leftWheel + value; + } else if (direction == 'RIGHT') + sq.rightWheel = sq.rightWheel != undefined ? + sq.rightWheel + value : pd.rightWheel + value; + else { + sq.leftWheel = sq.leftWheel != undefined ? + sq.leftWheel + value : pd.leftWheel + value; + sq.rightWheel = sq.rightWheel != undefined ? + sq.rightWheel + value : pd.rightWheel + value; + } + + return script.callReturn(); + } + }, + "albert_set_wheels_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "왼쪽", "LEFT" ], + [ "오른쪽", "RIGHT" ], + [ "양쪽", "FRONT" ] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ] + }, + "paramsKeyMap": { + "DIRECTION": 0, + "VALUE": 1 + }, + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var direction = script.getField('DIRECTION'); + var value = script.getNumberValue('VALUE'); + + if (direction == 'LEFT') sq.leftWheel = value; + else if (direction == 'RIGHT') sq.rightWheel = value; + else { + sq.leftWheel = value; + sq.rightWheel = value; + } + + return script.callReturn(); + } + }, + "arduino_text": { + "color": "#00979D", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "TextInput", + "value": 10 + } + ], + "events": {}, + "def": { + "params": [] + }, + "paramsKeyMap": { + "NAME": 0 + }, + "func": function (sprite, script) { + return script.getStringField("NAME"); + } + }, + "arduino_send": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [] + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "func": function (sprite, script) { + var signal = script.getValue("VALUE", script); + var xmlHttp = new XMLHttpRequest(); + xmlHttp.open( "POST", 'http://localhost:23518/arduino/', false ); + xmlHttp.send(String(signal)); + Entry.assert(xmlHttp.status == 200, "arduino is not connected"); + return script.callReturn(); + } + }, + "arduino_get_number": { + "color": "#00979D", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [] + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "func": function (sprite, script) { + var signal = script.getValue("VALUE", script); + var xmlHttp = new XMLHttpRequest(); + xmlHttp.open( "POST", 'http://localhost:23518/arduino/', false ); + xmlHttp.send(String(signal)); + Entry.assert(xmlHttp.status == 200, "arduino is not connected"); + var data = xmlHttp.responseText; + return Number(data); + } + }, + "arduino_get_string": { + "color": "#00979D", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [] + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "func": function (sprite, script) { + var signal = script.getValue("VALUE", script); + var xmlHttp = new XMLHttpRequest(); + xmlHttp.open( "POST", 'http://localhost:23518/arduino/', false ); + xmlHttp.send(String(signal)); + Entry.assert(xmlHttp.status == 200, "arduino is not connected"); + var data = xmlHttp.responseText; + return data; + } + }, + "arduino_get_sensor_number": { + "color": "#00979D", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "0", "A0" ], + [ "1", "A1" ], + [ "2", "A2" ], + [ "3", "A3" ], + [ "4", "A4" ], + [ "5", "A5" ] + ], + "value": "A0", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "paramsKeyMap": { + "PORT": 0 + }, + "func": function (sprite, script) { + return script.getStringField("PORT"); + } + }, + "arduino_get_port_number": { + "color": "#00979D", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "0", "0" ], + [ "1", "1" ], + [ "2", "2" ], + [ "3", "3" ], + [ "4", "4" ], + [ "5", "5" ], + [ "6", "6" ], + [ "7", "7" ], + [ "8", "8" ], + [ "9", "9" ], + [ "10", "10" ], + [ "11", "11" ], + [ "12", "12" ], + [ "13", "13" ] + ], + "value": "0", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "paramsKeyMap": { + "PORT": 0 + }, + "func": function (sprite, script) { + return script.getStringField("PORT"); + } + }, + "arduino_get_pwm_port_number": { + "color": "#00979D", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "3", "3" ], + [ "5", "5" ], + [ "6", "6" ], + [ "9", "9" ], + [ "10", "10" ], + [ "11", "11" ] + ], + "value": "3", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "paramsKeyMap": { + "PORT": 0 + }, + "func": function (sprite, script) { + return script.getStringField("PORT"); + } + }, + "arduino_get_number_sensor_value": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "arduino_get_sensor_number" + } + ], + "type": "arduino_get_number_sensor_value" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "arduino_value", + "isNotFor": [ "arduino" ], + "func": function (sprite, script) { + var signal = script.getValue("VALUE", script); + return Entry.hw.getAnalogPortValue(signal[1]); + } + }, + "arduino_get_digital_value": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "arduino_get_port_number" + } + ], + "type": "arduino_get_digital_value" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "arduino_value", + "isNotFor": [ "arduino" ], + "func": function (sprite, script) { + var signal = script.getNumberValue("VALUE", script); + return Entry.hw.getDigitalPortValue(signal); + } + }, + "arduino_toggle_led": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.ARDUINO_on,"on"], + [Lang.Blocks.ARDUINO_off,"off"] + ], + "value": "on", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "arduino_get_port_number" + }, + null, + null + ], + "type": "arduino_toggle_led" + }, + "paramsKeyMap": { + "VALUE": 0, + "OPERATOR": 1 + }, + "class": "arduino_set", + "isNotFor": [ "arduino" ], + "func": function (sprite, script) { + var port = script.getNumberValue("VALUE"); + var operator = script.getField("OPERATOR"); + var value = operator == "on" ? 255 : 0; + Entry.hw.setDigitalPortValue(port, value); + return script.callReturn(); + } + }, + "arduino_toggle_pwm": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "arduino_get_pwm_port_number" + }, + { + "type": "arduino_text", + "params": [ "255" ] + }, + null + ], + "type": "arduino_toggle_pwm" + }, + "paramsKeyMap": { + "PORT": 0, + "VALUE": 1 + }, + "class": "arduino_set", + "isNotFor": [ "arduino" ], + "func": function (sprite, script) { + var port = script.getNumberValue("PORT"); + var value = script.getNumberValue("VALUE"); + value = Math.round(value); + value = Math.max(value, 0); + value = Math.min(value, 255); + Entry.hw.setDigitalPortValue(port, value); + return script.callReturn(); + } + }, + "arduino_convert_scale": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "arduino_get_number_sensor_value", + "params": [ + { + "type": "arduino_get_sensor_number", + "id": "bl5e" + } + ] + }, + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "1023" ] + }, + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "100" ] + } + ], + "type": "arduino_convert_scale" + }, + "paramsKeyMap": { + "VALUE1": 0, + "VALUE2": 1, + "VALUE3": 2, + "VALUE4": 3, + "VALUE5": 4 + }, + "class": "arduino", + "isNotFor": [ "arduino" ], + "func": function (sprite, script) { + var value1 = script.getNumberValue("VALUE1", script); + var value2 = script.getNumberValue("VALUE2", script); + var value3 = script.getNumberValue("VALUE3", script); + var value4 = script.getNumberValue("VALUE4", script); + var value5 = script.getNumberValue("VALUE5", script); + var result = value1; + if (value2 > value3) { + var swap = value2; + value2 = value3; + value3 = swap; + } + if (value4 > value5) { + var swap = value4; + value4 = value5; + value5 = swap; + } + result -= value2; + result = result * ((value5 - value4) / (value3 - value2)); + result += value4; + result = Math.min(value5, result); + result = Math.max(value4, result); + return Math.round(result); + } + }, + "sensorBoard_get_named_sensor_value": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "소리", "0" ], + [ "빛 감지", "1" ], + [ "슬라이더", "2" ], + [ "온도", "3" ] + ], + "value": "0", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "sensorBoard_get_named_sensor_value" + }, + "paramsKeyMap": { + "PORT": 0 + }, + "class": "sensorBoard", + "isNotFor": [ "sensorBoard" ], + "func": function (sprite, script) { + return Entry.hw.getAnalogPortValue(script.getField("PORT", script)); + } + }, + "sensorBoard_is_button_pressed": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "빨간", "8" ], + [ "파란", "9" ], + [ "노란", "10" ], + [ "초록", "11" ] + ], + "value": "8", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "sensorBoard_is_button_pressed" + }, + "paramsKeyMap": { + "PORT": 0 + }, + "class": "sensorBoard", + "isNotFor": [ "sensorBoard" ], + "func": function (sprite, script) { + return Entry.hw.getDigitalPortValue(script.getNumberField("PORT", script)); + } + }, + "sensorBoard_led": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "빨간", "2" ], + [ "초록", "3" ], + [ "파란", "4" ], + [ "흰색", "5" ] + ], + "value": "2", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [ "켜기", "255" ], + [ "끄기", "0" ] + ], + "value": "255", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "sensorBoard_led" + }, + "paramsKeyMap": { + "PORT": 0, + "OPERATOR": 1 + }, + "class": "sensorBoard", + "isNotFor": [ "sensorBoard" ], + "func": function (sprite, script) { + Entry.hw.setDigitalPortValue(script.getField("PORT"), + script.getNumberField("OPERATOR")); + return script.callReturn(); + } + }, + "arduino_download_connector": { + "skeleton": "basic_button", + "isNotFor": ["arduinoDisconnected"], + "color": "#eee", + "params": [ + { + "type": "Text", + "text": Lang.Blocks.ARDUINO_download_connector, + "color": "#333", + "align": "center" + } + ], + "events": { + "mousedown": [ + function() { + Entry.hw.downloadConnector(); + } + ] + } + }, + "arduino_download_source": { + "skeleton": "basic_button", + "isNotFor": ["arduinoDisconnected"], + "color": "#eee", + "params": [ + { + "type": "Text", + "text": Lang.Blocks.ARDUINO_download_source, + "color": "#333", + "align": "center" + } + ], + "events": { + "mousedown": [ + function() { + Entry.hw.downloadSource(); + } + ] + } + }, + "arduino_connected": { + "skeleton": "basic_button", + "color": "#eee", + "isNotFor": ["arduinoConnected"], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.ARDUINO_connected, + "color": "#333", + "align": "center" + } + ], + "events": {} + }, + "arduino_reconnect": { + "skeleton": "basic_button", + "color": "#eee", + "isNotFor": ["arduinoDisconnected"], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.ARDUINO_reconnect, + "color": "#333", + "align": "center" + } + ], + "events": { + "mousedown": [ + function() { + Entry.hw.retryConnect(); + } + ] + } + }, + "CODEino_get_sensor_number": { + "color": "#00979D", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "0", "A0" ], + [ "1", "A1" ], + [ "2", "A2" ], + [ "3", "A3" ], + [ "4", "A4" ], + [ "5", "A5" ], + [ "6", "A6" ] + ], + "value": "A0", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "paramsKeyMap": { + "PORT": 0 + }, + "func": function (sprite, script) { + return script.getStringField("PORT"); + } + }, + "CODEino_get_named_sensor_value": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CODEino_sensor_name_0,"0"], + [Lang.Blocks.CODEino_sensor_name_1,"1"], + [Lang.Blocks.CODEino_sensor_name_2,"2"], + [Lang.Blocks.CODEino_sensor_name_3,"3"], + [Lang.Blocks.CODEino_sensor_name_4,"4"], + [Lang.Blocks.CODEino_sensor_name_5,"5"], + [Lang.Blocks.CODEino_sensor_name_6,"6"] + ], + "value": "0", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "CODEino_get_named_sensor_value" + }, + "paramsKeyMap": { + "PORT": 0 + }, + "class": "CODEino", + "isNotFor": [ "CODEino" ], + "func": function (sprite, script) { + return Entry.hw.getAnalogPortValue(script.getField("PORT", script)); + } + }, + "CODEino_get_sound_status": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CODEino_string_11,"GREAT"], + [Lang.Blocks.CODEino_string_12,"SMALL"] + ], + "value": "GREAT", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "CODEino_get_sound_status" + }, + "paramsKeyMap": { + "STATUS": 0 + }, + "class": "CODEino", + "isNotFor": [ "CODEino" ], + "func": function (sprite, script) { + var value1 = script.getField("STATUS", script); + var value2 = 0; + if (value1 == "GREAT") return Entry.hw.getAnalogPortValue(value2) > 600 ? 1 : 0; + else return Entry.hw.getAnalogPortValue(value2) < 600 ? 1 : 0; + } + }, + "CODEino_get_light_status": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CODEino_string_14,"BRIGHT"], + [Lang.Blocks.CODEino_string_15,"DARK"] + ], + "value": "BRIGHT", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "CODEino_get_light_status" + }, + "paramsKeyMap": { + "STATUS": 0 + }, + "class": "CODEino", + "isNotFor": [ "CODEino" ], + "func": function (sprite, script) { + var value1 = script.getField("STATUS", script); + var value2 = 1; + if (value1 == "DARK") return Entry.hw.getAnalogPortValue(value2) > 800 ? 1 : 0; + else return Entry.hw.getAnalogPortValue(value2) < 800 ? 1 : 0; + } + }, + "CODEino_is_button_pressed": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CODEino_string_3,"4"], + [Lang.Blocks.CODEino_string_4,"17"], + [Lang.Blocks.CODEino_string_5,"18"], + [Lang.Blocks.CODEino_string_6,"19"], + [Lang.Blocks.CODEino_string_7,"20"] + ], + "value": "4", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "CODEino_is_button_pressed" + }, + "paramsKeyMap": { + "PORT": 0 + }, + "class": "CODEino", + "isNotFor": [ "CODEino" ], + "func": function (sprite, script) { + var value = script.getNumberField("PORT", script); + if (value > 14) { + value = value - 14; + return !Entry.hw.getAnalogPortValue(value); + } else return !Entry.hw.getDigitalPortValue(value); + } + }, + "CODEino_get_accelerometer_direction": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CODEino_string_16, "LEFT"], + [Lang.Blocks.CODEino_string_17, "RIGHT"], + [Lang.Blocks.CODEino_string_18, "FRONT"], + [Lang.Blocks.CODEino_string_19, "REAR"], + [Lang.Blocks.CODEino_string_20, "REVERSE"] + ], + "value": "LEFT", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "CODEino_get_accelerometer_direction" + }, + "paramsKeyMap": { + "DIRECTION": 0 + }, + "class": "CODEino", + "isNotFor": [ "CODEino" ], + "func": function (sprite, script) { + var value1 = script.getField("DIRECTION", script); + var value2 = 0; + if (value1 == "LEFT" || value1 =="RIGHT") value2 = 3; + else if (value1 == "FRONT" || value1 =="REAR") value2 = 4; + else if (value1 == "REVERSE") value2 = 5; + var value3 = Entry.hw.getAnalogPortValue(value2); + var value4 = 265; + var value5 = 402; + var value6 = -90; + var value7 = 90; + var result = value3; + result -= value4; + result = result * ((value7 - value6) / (value5 - value4)); + result += value6; + result = Math.min(value7, result); + result = Math.max(value6, result); + result = Math.round(result); + if (value1 == "LEFT" || value1 == "REAR") return result < -30 ? 1 : 0; + else if (value1 == "RIGHT" || value1 == "FRONT") return result > 30 ? 1 : 0; + else if (value1 == "REVERSE") return result < -50 ? 1 : 0; + } + }, + "CODEino_get_accelerometer_value": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "X", "3" ], + [ "Y", "4" ], + [ "Z", "5" ] + ], + "value": "3", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "CODEino_get_accelerometer_value" + }, + "paramsKeyMap": { + "PORT": 0 + }, + "class": "CODEino", + "isNotFor": [ "CODEino" ], + "func": function (sprite, script) { + var value1 = Entry.hw.getAnalogPortValue(script.getField("PORT", script)); + var value2 = 265; + var value3 = 402; + var value4 = -90; + var value5 = 90; + var result = value1; + if (value2 > value3) { + var swap = value2; + value2 = value3; + value3 = swap; + } + if (value4 > value5) { + var swap = value4; + value4 = value5; + value5 = swap; + } + result -= value2; + result = result * ((value5 - value4) / (value3 - value2)); + result += value4; + result = Math.min(value5, result); + result = Math.max(value4, result); + return Math.round(result); + } + }, + "bitbrick_sensor_value": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "bitbrick_sensor_value" + }, + "paramsKeyMap": { + "PORT": 0 + }, + "class": "condition", + "isNotFor": [ "bitbrick" ], + "func": function (sprite, script) { + var port = script.getStringField("PORT"); + return Entry.hw.portData[port].value; + } + }, + "bitbrick_is_touch_pressed": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "bitbrick_is_touch_pressed" + }, + "paramsKeyMap": { + "PORT": 0 + }, + "class": "condition", + "isNotFor": [ "bitbrick" ], + "func": function (sprite, script) { + return Entry.hw.portData[script.getStringField("PORT")].value === 0; + } + }, + "bitbrick_turn_off_color_led": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "bitbrick_turn_off_color_led", + "id": "i3je" + }, + "class": "condition", + "isNotFor": [ "bitbrick" ], + "func": function (sprite, script) { + Entry.hw.sendQueue["LEDR"] = 0; + Entry.hw.sendQueue["LEDG"] = 0; + Entry.hw.sendQueue["LEDB"] = 0; + return script.callReturn(); + } + }, + "bitbrick_turn_on_color_led_by_rgb": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "255" ] + }, + { + "type": "text", + "params": [ "255" ] + }, + { + "type": "text", + "params": [ "255" ] + }, + null + ], + "type": "bitbrick_turn_on_color_led_by_rgb" + }, + "paramsKeyMap": { + "rValue": 0, + "gValue": 1, + "bValue": 2 + }, + "class": "condition", + "isNotFor": [ "bitbrick" ], + "func": function (sprite, script) { + var red = script.getNumberValue("rValue"), + green = script.getNumberValue("gValue"), + blue = script.getNumberValue("bValue"), + min = 0, + max = 255, + adjustor = Entry.adjustValueWithMaxMin, + sq = Entry.hw.sendQueue; + + sq["LEDR"] = adjustor(red, min, max); + sq["LEDG"] = adjustor(green, min, max); + sq["LEDB"] = adjustor(blue, min, max); + return script.callReturn(); + } + }, + "bitbrick_turn_on_color_led_by_picker": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Color" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "bitbrick_turn_on_color_led_by_picker" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "condition", + "isNotFor": [ "bitbrick" ], + "func": function (sprite, script) { + var port = script.getStringField("VALUE"); + Entry.hw.sendQueue["LEDR"] = parseInt(port.substr(1,2), 16); + Entry.hw.sendQueue["LEDG"] = parseInt(port.substr(3,2), 16); + Entry.hw.sendQueue["LEDB"] = parseInt(port.substr(5,2), 16); + return script.callReturn(); + } + }, + "bitbrick_turn_on_color_led_by_value": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "0" ] + }, + null + ], + "type": "bitbrick_turn_on_color_led_by_value" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "condition", + "isNotFor": [ "bitbrick" ], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE"); + var red, green, blue; + value = value % 200; + if ( value < 67 ) { + red = 200 - (value * 3); + green = value * 3; + blue = 0; + } else if ( value < 134 ) { + value = value - 67; + red = 0; + green = 200 - (value * 3); + blue = value * 3; + } else if ( value < 201 ) { + value = value - 134; + red = value * 3; + green = 0; + blue = 200 - (value * 3); + } + Entry.hw.sendQueue["LEDR"] = red; + Entry.hw.sendQueue["LEDG"] = green; + Entry.hw.sendQueue["LEDB"] = blue; + return script.callReturn(); + } + }, + "bitbrick_buzzer": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "60" ] + }, + null + ], + "type": "bitbrick_buzzer" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "condition", + "isNotFor": [ "bitbrick" ], + "func": function (sprite, script) { + if (!script.isStart) { + var value = script.getNumberValue("VALUE"); + Entry.hw.sendQueue["buzzer"] = value; + script.isStart = true; + return script; + } else { + Entry.hw.sendQueue["buzzer"] = 0; + delete script.isStart; + return script.callReturn(); + } + } + }, + "bitbrick_turn_off_all_motors": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "bitbrick_turn_off_all_motors" + }, + "class": "condition", + "isNotFor": [ "bitbrick" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var bitbrick = Entry.Bitbrick; + bitbrick.servoList().map(function(servo){ + sq[servo[1]] = 0; + }); + bitbrick.dcList().map(function(dc){ + sq[dc[1]] = 128; + }); + return script.callReturn(); + } + }, + "bitbrick_dc_speed": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "60" ] + }, + null + ], + "type": "bitbrick_dc_speed" + }, + "paramsKeyMap": { + "PORT": 0, + "VALUE": 1 + }, + "class": "condition", + "isNotFor": [ "bitbrick" ], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE"); + value = Math.min(value, Entry.Bitbrick.dcMaxValue); + value = Math.max(value, Entry.Bitbrick.dcMinValue); + + Entry.hw.sendQueue[script.getStringField("PORT")] = + value + 128; + return script.callReturn(); + } + }, + "bitbrick_dc_direction_speed": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.BITBRICK_dc_direction_cw,"CW"], + [Lang.Blocks.BITBRICK_dc_direction_ccw,"CCW"] + ], + "value": "CW", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + null, + { + "type": "text", + "params": [ "100" ] + }, + null + ], + "type": "bitbrick_dc_direction_speed" + }, + "paramsKeyMap": { + "PORT": 0, + "DIRECTION": 1, + "VALUE": 2 + }, + "class": "condition", + "isNotFor": [ "bitbrick" ], + "func": function (sprite, script) { + var isFront = script.getStringField("DIRECTION") === "CW"; + var value = script.getNumberValue("VALUE"); + value = Math.min(value, Entry.Bitbrick.dcMaxValue); + value = Math.max(value, 0); + + Entry.hw.sendQueue[script.getStringField("PORT")] = + isFront ? value + 128 : 128 - value; + return script.callReturn(); + } + }, + "bitbrick_servomotor_angle": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "100" ] + }, + null + ], + "type": "bitbrick_servomotor_angle" + }, + "paramsKeyMap": { + "PORT": 0, + "VALUE": 1 + }, + "class": "condition", + "isNotFor": [ "bitbrick" ], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE") + 1; + value = Math.min(value, Entry.Bitbrick.servoMaxValue); + value = Math.max(value, Entry.Bitbrick.servoMinValue); + Entry.hw.sendQueue[script.getStringField("PORT")] = value; + return script.callReturn(); + } + }, + "bitbrick_convert_scale": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "1023" ] + }, + { + "type": "number", + "params": [ "-100" ] + }, + { + "type": "number", + "params": [ "100" ] + } + ], + "type": "bitbrick_convert_scale" + }, + "paramsKeyMap": { + "PORT": 0, + "VALUE2": 1, + "VALUE3": 2, + "VALUE4": 3, + "VALUE5": 4 + }, + "class": "condition", + "isNotFor": [ "bitbrick" ], + "func": function (sprite, script) { + var port = script.getNumberField("PORT"); + var value1 = Entry.hw.portData[port].value; + var value2 = script.getNumberValue("VALUE2", script); + var value3 = script.getNumberValue("VALUE3", script); + var value4 = script.getNumberValue("VALUE4", script); + var value5 = script.getNumberValue("VALUE5", script); + var result = value1; + + if (value4 > value5) { + var swap = value4; + value4 = value5; + value5 = swap; + } + + result -= value2; + result = result * ((value5 - value4) / (value3 - value2)); + result += value4; + result = Math.min(value5, result); + result = Math.max(value4, result); + return Math.round(result); + } + }, + "start_drawing": { + "color": "#FF9E20", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/brush_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "start_drawing" + }, + "class": "brush_control", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + + if (sprite.brush) + sprite.brush.stop = false; + else + Entry.setBasicBrush(sprite); + + Entry.stage.sortZorder(); + sprite.brush.moveTo(sprite.getX(), sprite.getY()*-1); + + return script.callReturn(); + } + }, + "stop_drawing": { + "color": "#FF9E20", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/brush_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "stop_drawing" + }, + "class": "brush_control", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + if (sprite.brush && sprite.shape) + sprite.brush.stop = true; + + return script.callReturn(); + } + }, + "set_color": { + "color": "#FF9E20", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Color" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/brush_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "set_color" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "brush_color", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var colour = script.getField("VALUE", script); + + if (!sprite.brush) { + Entry.setBasicBrush(sprite); + sprite.brush.stop = true; + } + + if (sprite.brush) { + var rgb = Entry.hex2rgb(colour); + sprite.brush.rgb = rgb; + sprite.brush.endStroke(); + sprite.brush.beginStroke("rgba("+rgb.r+","+rgb.g+","+rgb.b+","+(sprite.brush.opacity/100)+")"); + + sprite.brush.moveTo(sprite.getX(), sprite.getY()*-1); + } + + return script.callReturn(); + } + }, + "set_random_color": { + "color": "#FF9E20", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/brush_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "set_random_color" + }, + "class": "brush_color", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + if (!sprite.brush) { + Entry.setBasicBrush(sprite); + sprite.brush.stop = true; + } + + if (sprite.brush) { + var rgb = Entry.generateRgb(); + sprite.brush.rgb = rgb; + sprite.brush.endStroke(); + sprite.brush.beginStroke("rgba("+rgb.r+","+rgb.g+","+rgb.b+","+(sprite.brush.opacity/100)+")"); + + sprite.brush.moveTo(sprite.getX(), sprite.getY()*-1); + } + return script.callReturn(); + } + }, + "change_thickness": { + "color": "#FF9E20", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/brush_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "1" ] + }, + null + ], + "type": "change_thickness" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "brush_thickness", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var thickness = script.getNumberValue("VALUE", script); + + if (!sprite.brush) { + Entry.setBasicBrush(sprite); + sprite.brush.stop = true; + } + + if (sprite.brush) { + sprite.brush.thickness += thickness; + if (sprite.brush.thickness < 1) + sprite.brush.thickness = 1; + + sprite.brush.setStrokeStyle(sprite.brush.thickness); + + sprite.brush.moveTo(sprite.getX(), sprite.getY()*-1); + } + + return script.callReturn(); + } + }, + "set_thickness": { + "color": "#FF9E20", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/brush_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "1" ] + }, + null + ], + "type": "set_thickness" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "brush_thickness", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var thickness = script.getNumberValue("VALUE", script); + + if (!sprite.brush) { + Entry.setBasicBrush(sprite); + sprite.brush.stop = true; + } + + if (sprite.brush) { + sprite.brush.thickness = thickness; + sprite.brush.setStrokeStyle(sprite.brush.thickness); + + sprite.brush.moveTo(sprite.getX(), sprite.getY()*-1); + } + + return script.callReturn(); + } + }, + "change_opacity": { + "color": "#FF9E20", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/brush_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "change_opacity" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "brush_opacity", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var opacity = script.getNumberValue("VALUE", script); + + if (!sprite.brush) { + Entry.setBasicBrush(sprite); + sprite.brush.stop = true; + } + opacity = Entry.adjustValueWithMaxMin(sprite.brush.opacity + opacity, 0, 100); + + if (sprite.brush) { + sprite.brush.opacity = opacity; + sprite.brush.endStroke(); + var rgb = sprite.brush.rgb; + sprite.brush.beginStroke("rgba("+rgb.r+","+rgb.g+","+rgb.b+","+(sprite.brush.opacity/100)+")"); + sprite.brush.moveTo(sprite.getX(), sprite.getY()*-1); + } + + return script.callReturn(); + } + }, + "set_opacity": { + "color": "#FF9E20", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/brush_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "50" ] + }, + null + ], + "type": "set_opacity" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "brush_opacity", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var opacity = script.getNumberValue("VALUE", script); + + if (!sprite.brush) { + Entry.setBasicBrush(sprite); + sprite.brush.stop = true; + } + + if (sprite.brush) { + sprite.brush.opacity = Entry.adjustValueWithMaxMin(opacity, 0, 100); + sprite.brush.endStroke(); + var rgb = sprite.brush.rgb; + sprite.brush.beginStroke("rgba("+rgb.r+","+rgb.g+","+rgb.b+","+(sprite.brush.opacity/100)+")"); + sprite.brush.moveTo(sprite.getX(), sprite.getY()*-1); + } + + return script.callReturn(); + + } + }, + "brush_erase_all": { + "color": "#FF9E20", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/brush_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "brush_erase_all" + }, + "class": "brush_clear", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var brush = sprite.brush; + if (brush) { + var stroke = brush._stroke.style; + var style = brush._strokeStyle.width; + brush.clear().setStrokeStyle(style).beginStroke(stroke); + brush.moveTo(sprite.getX(), sprite.getY()*-1); + } + + var stampEntities = sprite.parent.getStampEntities(); + stampEntities.map(function (entity) { + entity.removeClone(); + }); + stampEntities = null; + + return script.callReturn(); + } + }, + "brush_stamp": { + "color": "#FF9E20", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/brush_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "brush_stamp" + }, + "class": "stamp", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + sprite.parent.addStampEntity(sprite); + + return script.callReturn(); + } + }, + "change_brush_transparency": { + "color": "#FF9E20", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/brush_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "change_brush_transparency" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "brush_opacity", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var opacity = script.getNumberValue("VALUE", script); + + if (!sprite.brush) { + Entry.setBasicBrush(sprite); + sprite.brush.stop = true; + } + opacity = Entry.adjustValueWithMaxMin(sprite.brush.opacity - opacity, 0, 100); + + if (sprite.brush) { + sprite.brush.opacity = opacity; + sprite.brush.endStroke(); + var rgb = sprite.brush.rgb; + sprite.brush.beginStroke("rgba("+rgb.r+","+rgb.g+","+rgb.b+","+(sprite.brush.opacity/100)+")"); + sprite.brush.moveTo(sprite.getX(), sprite.getY()*-1); + } + + return script.callReturn(); + } + }, + "set_brush_tranparency": { + "color": "#FF9E20", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/brush_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "50" ] + }, + null + ], + "type": "set_brush_tranparency" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "brush_opacity", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var opacity = script.getNumberValue("VALUE", script); + + if (!sprite.brush) { + Entry.setBasicBrush(sprite); + sprite.brush.stop = true; + } + + if (sprite.brush) { + sprite.brush.opacity = Entry.adjustValueWithMaxMin(opacity, 0, 100); + sprite.brush.endStroke(); + var rgb = sprite.brush.rgb; + sprite.brush.beginStroke("rgba("+rgb.r+","+rgb.g+","+rgb.b+","+(1 - sprite.brush.opacity/100)+")"); + sprite.brush.moveTo(sprite.getX(), sprite.getY()*-1); + } + + return script.callReturn(); + + } + }, + "number": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "TextInput", + "value": 10 + } + ], + "events": {}, + "def": { + "params": [] + }, + "paramsKeyMap": { + "NUM": 0 + }, + "func": function (sprite, script) { + return script.getField('NUM', script); + }, + "isPrimitive": true + }, + "angle": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Angle" + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "angle" + }, + "paramsKeyMap": { + "ANGLE": 0 + }, + "func": function (sprite, script) { + return script.getNumberField("ANGLE"); + } + }, + "get_x_coordinate": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_get_x_coordinate, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "get_x_coordinate" + }, + "class": "calc", + "isNotFor": [], + "func": function (sprite, script) { + return sprite.getX(); + } + }, + "get_y_coordinate": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_get_y_coordinate, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "get_y_coordinate" + }, + "class": "calc", + "isNotFor": [], + "func": function (sprite, script) { + return sprite.getY(); + } + }, + "get_angle": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_get_angle, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "func": function (sprite, script) { + return parseFloat(sprite.getRotation().toFixed(1)); + } + }, + "get_rotation_direction": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CALC_rotation_value,"ROTATION"], + [Lang.Blocks.CALC_direction_value,"DIRECTION"] + ], + "value": "ROTATION", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "get_rotation_direction" + }, + "paramsKeyMap": { + "OPERATOR": 0 + }, + "class": "calc", + "isNotFor": [], + "func": function (sprite, script) { + var o = script.getField("OPERATOR", script); + if (o.toUpperCase() == 'DIRECTION') + return parseFloat(sprite.getDirection().toFixed(1)); + else + return parseFloat(sprite.getRotation().toFixed(1)); + } + }, + "distance_something": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_distance_something_1, + "color": "#3D3D3D" + }, + { + "type": "DropdownDynamic", + "value": null, + "menuName": "spritesWithMouse", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_distance_something_2, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "distance_something" + }, + "paramsKeyMap": { + "VALUE": 1 + }, + "class": "calc_distance", + "isNotFor": [], + "func": function (sprite, script) { + var targetId = script.getField("VALUE", script); + if (targetId == 'mouse') { + var mousePos = Entry.stage.mouseCoordinate; + return Math.sqrt( + Math.pow(sprite.getX() - mousePos.x, 2) + + Math.pow(sprite.getY() - mousePos.y, 2) + ); + } else { + var targetEntity = Entry.container.getEntity(targetId); + return Math.sqrt( + Math.pow(sprite.getX() - targetEntity.getX(), 2) + + Math.pow(sprite.getY() - targetEntity.getY(), 2) + ); + } + } + }, + "coordinate_mouse": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_coordinate_mouse_1, + "color": "#3D3D3D" + }, + { + "type": "Dropdown", + "options": [ + [ "x", "x" ], + [ "y", "y" ] + ], + "value": "x", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_coordinate_mouse_2, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "coordinate_mouse" + }, + "paramsKeyMap": { + "VALUE": 1 + }, + "class": "calc", + "isNotFor": [], + "func": function (sprite, script) { + var targetCoordinate = script.getField("VALUE", script); + if (targetCoordinate === 'x') { + return Number(Entry.stage.mouseCoordinate.x); + } else { + return Number(Entry.stage.mouseCoordinate.y); + } + } + }, + "coordinate_object": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_coordinate_object_1, + "color": "#3D3D3D" + }, + { + "type": "DropdownDynamic", + "value": null, + "menuName": "spritesWithSelf", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_coordinate_object_2, + "color": "#3D3D3D" + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CALC_coordinate_x_value,"x"], + [Lang.Blocks.CALC_coordinate_y_value, "y"], + [Lang.Blocks.CALC_coordinate_rotation_value, "rotation"], + [Lang.Blocks.CALC_coordinate_direction_value, "direction"], + [Lang.Blocks.CALC_coordinate_size_value, "size"], + [Lang.Blocks.CALC_picture_index, "picture_index"], + [Lang.Blocks.CALC_picture_name, "picture_name"] + ], + "value": "x", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null, null, null, null ], + "type": "coordinate_object" + }, + "paramsKeyMap": { + "VALUE": 1, + "COORDINATE": 3 + }, + "class": "calc", + "isNotFor": [], + "func": function (sprite, script) { + var targetId = script.getField("VALUE", script); + var targetEntity; + if (targetId == 'self') + targetEntity = sprite; + else + targetEntity = Entry.container.getEntity(targetId); + + var targetCoordinate = script.getField("COORDINATE", script); + switch(targetCoordinate) { + case 'x': + return targetEntity.getX(); + case 'y': + return targetEntity.getY(); + case 'rotation': + return targetEntity.getRotation(); + case 'direction': + return targetEntity.getDirection(); + case 'picture_index': + var object = targetEntity.parent; + var pictures = object.pictures; + return pictures.indexOf(targetEntity.picture) + 1; + case 'size': + return Number(targetEntity.getSize().toFixed(1)); + case 'picture_name': + var object = targetEntity.parent; + var pictures = object.pictures; + var picture = pictures[pictures.indexOf(targetEntity.picture)]; + return picture.name; + } + } + }, + "calc_basic": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Dropdown", + "options": [ + [ "+", "PLUS" ], + [ "-", "MINUS" ], + [ "x", "MULTI" ], + [ "/", "DIVIDE" ] + ], + "value": "PLUS", + "fontSize": 11, + noArrow: true + }, + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + "PLUS", + { + "type": "number", + "params": [ "10" ] + } + ], + "type": "calc_basic" + }, + "defs": [ + { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + "PLUS", + { + "type": "number", + "params": [ "10" ] + } + ], + "type": "calc_basic" + }, + { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + "MINUS", + { + "type": "number", + "params": [ "10" ] + } + ], + "type": "calc_basic" + }, + { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + "MULTI", + { + "type": "number", + "params": [ "10" ] + } + ], + "type": "calc_basic" + }, + { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + "DIVIDE", + { + "type": "number", + "params": [ "10" ] + } + ], + "type": "calc_basic" + } + ], + "paramsKeyMap": { + "LEFTHAND": 0, + "OPERATOR": 1, + "RIGHTHAND": 2 + }, + "class": "calc", + "isNotFor": [], + "func": function (sprite, script) { + var operator = script.getField("OPERATOR", script); + var leftValue = script.getNumberValue("LEFTHAND", script); + var rightValue = script.getNumberValue("RIGHTHAND", script); + if (operator == "PLUS") + return leftValue + rightValue; + else if (operator == "MINUS") + return leftValue - rightValue; + else if (operator == "MULTI") + return leftValue * rightValue; + else + return leftValue / rightValue; + } + }, + "calc_plus": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": "+", + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "RIGHTHAND": 2 + }, + "func": function (sprite, script) { + var leftValue = script.getNumberValue("LEFTHAND", script); + var rightValue = script.getNumberValue("RIGHTHAND", script); + return leftValue + rightValue; + } + }, + "calc_minus": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": "-", + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "RIGHTHAND": 2 + }, + "func": function (sprite, script) { + var leftValue = script.getNumberValue("LEFTHAND", script); + var rightValue = script.getNumberValue("RIGHTHAND", script); + return leftValue - rightValue; + } + }, + "calc_times": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": "x", + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "RIGHTHAND": 2 + }, + "func": function (sprite, script) { + var leftValue = script.getNumberValue("LEFTHAND", script); + var rightValue = script.getNumberValue("RIGHTHAND", script); + return leftValue * rightValue; + } + }, + "calc_divide": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": "/", + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "RIGHTHAND": 2 + }, + "func": function (sprite, script) { + var leftValue = script.getNumberValue("LEFTHAND", script); + var rightValue = script.getNumberValue("RIGHTHAND", script); + return leftValue / rightValue; + } + }, + "calc_mod": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": "/", + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_calc_mod_3, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null, + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "calc_mod" + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "RIGHTHAND": 2 + }, + "class": "calc", + "isNotFor": [], + "func": function (sprite, script) { + var leftValue = script.getNumberValue("LEFTHAND", script); + var rightValue = script.getNumberValue("RIGHTHAND", script); + return leftValue % rightValue; + } + }, + "calc_share": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": "/", + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": "의 몫", + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null, + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "calc_share" + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "RIGHTHAND": 2 + }, + "class": "calc", + "isNotFor": [], + "func": function (sprite, script) { + var leftValue = script.getNumberValue("LEFTHAND", script); + var rightValue = script.getNumberValue("RIGHTHAND", script); + return Math.floor(leftValue/rightValue); + } + }, + "calc_operation": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_calc_operation_of_1, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_calc_operation_of_2, + "color": "#3D3D3D" + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CALC_calc_operation_square,"square"], + [Lang.Blocks.CALC_calc_operation_root, "root"], + [Lang.Blocks.CALC_calc_operation_sin, "sin"], + [Lang.Blocks.CALC_calc_operation_cos,"cos"], + [Lang.Blocks.CALC_calc_operation_tan,"tan"], + [Lang.Blocks.CALC_calc_operation_asin, "asin_radian"], + [Lang.Blocks.CALC_calc_operation_acos,"acos_radian"], + [Lang.Blocks.CALC_calc_operation_atan,"atan_radian"], + [Lang.Blocks.CALC_calc_operation_log,"log"], + [Lang.Blocks.CALC_calc_operation_ln,"ln"], + [Lang.Blocks.CALC_calc_operation_unnatural,"unnatural"], + [Lang.Blocks.CALC_calc_operation_floor,"floor"], + [Lang.Blocks.CALC_calc_operation_ceil,"ceil"], + [Lang.Blocks.CALC_calc_operation_round,"round"], + [Lang.Blocks.CALC_calc_operation_factorial,"factorial"], + [Lang.Blocks.CALC_calc_operation_abs,"abs"] + ], + "value": "square", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "10" ] + }, + null, + null + ], + "type": "calc_operation" + }, + "paramsKeyMap": { + "LEFTHAND": 1, + "VALUE": 3 + }, + "class": "calc", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("LEFTHAND", script); + var operator = script.getField("VALUE", script); + var xRangeCheckList = ['asin_radian', 'acos_radian']; + if ((xRangeCheckList.indexOf(operator) > -1) && + (value > 1 || value < -1)) + throw new Error('x range exceeded'); + + var needToConvertList = ['sin', 'cos', 'tan']; + if (operator.indexOf('_')) + operator = operator.split('_')[0]; + + if (needToConvertList.indexOf(operator) > -1) + value = Entry.toRadian(value); + + var returnVal = 0; + switch(operator){ + case "square": + returnVal = value * value; + break; + case "factorial": + returnVal = Entry.factorial(value); + break; + case "root": + returnVal = Math.sqrt(value); + break; + case "log": + returnVal = Math.log(value) / Math.LN10; + break; + case "ln": + returnVal = Math.log(value); + break; + case "asin": + case "acos": + case "atan": + returnVal = Entry.toDegrees(Math[operator](value)); + break; + case "unnatural": + returnVal = value - Math.floor(value); + if (value < 0) + returnVal = 1 - returnVal; + break; + default: + returnVal = Math[operator](value); + } + return Math.round(returnVal*1000)/1000; + } + }, + "calc_rand": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_calc_rand_1, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_calc_rand_2, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_calc_rand_3, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "0" ] + }, + null, + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "calc_rand" + }, + "paramsKeyMap": { + "LEFTHAND": 1, + "RIGHTHAND": 3 + }, + "class": "calc", + "isNotFor": [], + "func": function (sprite, script) { + var leftValue = script.getStringValue("LEFTHAND", script); + var rightValue = script.getStringValue("RIGHTHAND", script); + var left = Math.min(leftValue, rightValue); + var right = Math.max(leftValue, rightValue); + var isLeftFloat = Entry.isFloat(leftValue); + var isRightFloat = Entry.isFloat(rightValue); + if (isRightFloat || isLeftFloat) + return (Math.random() * (right - left) + left).toFixed(2); + else + return Math.floor((Math.random() * (right - left +1) + left)); + } + }, + "get_date": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_get_date_1, + "color": "#3D3D3D" + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CALC_get_date_year,"YEAR"], + [Lang.Blocks.CALC_get_date_month,"MONTH"], + [Lang.Blocks.CALC_get_date_day,"DAY"], + [Lang.Blocks.CALC_get_date_hour,"HOUR"], + [Lang.Blocks.CALC_get_date_minute,"MINUTE"], + [Lang.Blocks.CALC_get_date_second,"SECOND"] + ], + "value": "YEAR", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_get_date_2, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null, "YEAR", null ], + "type": "get_date" + }, + "paramsKeyMap": { + "VALUE": 1 + }, + "class": "calc_date", + "isNotFor": [], + "func": function (sprite, script) { + var operator = script.getField("VALUE", script); + var dateTime = new Date(); + if (operator == "YEAR") + return dateTime.getFullYear(); + else if (operator == "MONTH") + return dateTime.getMonth()+1; + else if (operator == "DAY") + return dateTime.getDate(); + else if (operator == "HOUR") + return dateTime.getHours(); + else if (operator == "MINUTE") + return dateTime.getMinutes(); + else + return dateTime.getSeconds(); + } + }, + "get_sound_duration": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_get_sound_duration_1, + "color": "#3D3D3D" + }, + { + "type": "DropdownDynamic", + "value": null, + "menuName": "sounds", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_get_sound_duration_2, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "get_sound_duration" + }, + "paramsKeyMap": { + "VALUE": 1 + }, + "class": "calc_duration", + "isNotFor": [], + "func": function (sprite, script) { + var soundId = script.getField("VALUE", script); + var soundsArr = sprite.parent.sounds; + + for (var i = 0; i < soundsArr.length; i++) { + if (soundsArr[i].id == soundId) + return soundsArr[i].duration; + } + } + }, + "reset_project_timer": { + "color": "#FFD974", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Text", + "text": "초시계 초기화", + "color": "#3D3D3D" + } + ], + "events": { + "viewAdd": [ + function() { + if (Entry.engine) Entry.engine.showProjectTimer(); + } + ], + "viewDestroy": [ + function(block) { + if (Entry.engine) Entry.engine.hideProjectTimer(block); + } + ] + }, + "def": { + "params": [ null ], + "type": "reset_project_timer" + }, + "class": "calc_timer", + "isNotFor": [], + "func": function (sprite, script) { + Entry.engine.updateProjectTimer(0); + return script.callReturn(); + } + }, + "set_visible_project_timer": { + "color": "#FFD974", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_timer_visible_1, + "color": "#3D3D3D" + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CALC_timer_visible_show,"SHOW"], + [Lang.Blocks.CALC_timer_visible_hide,"HIDE"] + ], + "value": "SHOW", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_timer_visible_2, + "color": "#3D3D3D" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/calc_01.png", + "size": 12 + } + ], + "events": { + "viewAdd": [ + function() { + if (Entry.engine) Entry.engine.showProjectTimer(); + } + ], + "viewDestroy": [ + function(block) { + if (Entry.engine) Entry.engine.hideProjectTimer(block); + } + ] + }, + "def": { + "params": [ null, "HIDE", null, null ], + "type": "set_visible_project_timer" + }, + "paramsKeyMap": { + "ACTION": 1 + }, + "class": "calc_timer", + "isNotFor": [], + "func": function (sprite, script) { + var action = script.getField("ACTION", script); + var timer = Entry.engine.projectTimer; + if (action == 'SHOW') + timer.setVisible(true); + else + timer.setVisible(false); + + return script.callReturn(); + } + }, + "timer_variable": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": "초시계 값", + "color": "#3D3D3D" + }, + { + "type": "Text", + "text": " ", + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null, null ] + }, + "func": function (sprite, script) { + return Entry.container.inputValue.getValue(); + } + }, + "get_project_timer_value": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_get_timer_value, + "color": "#3D3D3D" + }, + { + "type": "Text", + "text": "", + "color": "#3D3D3D" + } + ], + "events": { + "viewAdd": [ + function() { + if (Entry.engine) Entry.engine.showProjectTimer(); + } + ], + "viewDestroy": [ + function(block) { + if (Entry.engine) Entry.engine.hideProjectTimer(block); + } + ] + }, + "def": { + "params": [ null, null ], + "type": "get_project_timer_value" + }, + "class": "calc_timer", + "isNotFor": [], + "func": function (sprite, script) { + return Entry.engine.projectTimer.getValue(); + } + }, + "char_at": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_char_at_1, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_char_at_2, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_char_at_3, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ Lang.Blocks.hi_entry ] + }, + null, + { + "type": "number", + "params": [ "1" ] + }, + null + ], + "type": "char_at" + }, + "paramsKeyMap": { + "LEFTHAND": 1, + "RIGHTHAND": 3 + }, + "class": "calc_string", + "isNotFor": [], + "func": function (sprite, script) { + var str = script.getStringValue("LEFTHAND", script); + var index = script.getNumberValue("RIGHTHAND", script)-1; + if (index <0 || index >str.length-1) + throw new Error(); + else + return str[index]; + } + }, + "length_of_string": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_length_of_string_1, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_length_of_string_2, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ Lang.Blocks.entry ] + }, + null + ], + "type": "length_of_string" + }, + "paramsKeyMap": { + "STRING": 1 + }, + "class": "calc_string", + "isNotFor": [], + "func": function (sprite, script) { + return script.getStringValue("STRING", script).length; + } + }, + "substring": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_substring_1, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_substring_2, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_substring_3, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_substring_4, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ Lang.Blocks.hi_entry ] + }, + null, + { + "type": "number", + "params": [ "2" ] + }, + null, + { + "type": "number", + "params": [ "5" ] + }, + null + ], + "type": "substring" + }, + "paramsKeyMap": { + "STRING": 1, + "START": 3, + "END": 5 + }, + "class": "calc_string", + "isNotFor": [], + "func": function (sprite, script) { + var str = script.getStringValue("STRING", script); + var start = script.getNumberValue("START", script)-1; + var end = script.getNumberValue("END", script)-1; + var strLen = str.length-1; + if (start <0 || end<0 || start>strLen || end>strLen) + throw new Error(); + else + return str.substring(Math.min(start, end), Math.max(start, end)+1); + } + }, + "replace_string": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_replace_string_1, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_replace_string_2, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_replace_string_3, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_replace_string_4, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ Lang.Blocks.hi_entry ] + }, + null, + { + "type": "text", + "params": [ Lang.Blocks.hello ] + }, + null, + { + "type": "text", + "params": [ Lang.Blocks.nice ] + }, + null + ], + "type": "replace_string" + }, + "paramsKeyMap": { + "STRING": 1, + "OLD_WORD": 3, + "NEW_WORD": 5 + }, + "class": "calc_string", + "isNotFor": [], + "func": function (sprite, script) { + return script.getStringValue("STRING", script). + replace( + new RegExp(script.getStringValue("OLD_WORD", script), 'gm'), + script.getStringValue("NEW_WORD", script) + ); + } + }, + "change_string_case": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_change_string_case_1, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_change_string_case_2, + "color": "#3D3D3D" + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CALC_change_string_case_sub_1,"toUpperCase"], + [Lang.Blocks.CALC_change_string_case_sub_2,"toLowerCase"] + ], + "value": "toUpperCase", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_change_string_case_3, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "Hello Entry!" ] + }, + null, + null, + null + ], + "type": "change_string_case" + }, + "paramsKeyMap": { + "STRING": 1, + "CASE": 3 + }, + "class": "calc_string", + "isNotFor": [], + "func": function (sprite, script) { + return script.getStringValue("STRING", script)[script.getField("CASE", script)](); + } + }, + "index_of_string": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_index_of_string_1, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_index_of_string_2, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_index_of_string_3, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ Lang.Blocks.hi_entry ] + }, + null, + { + "type": "text", + "params": [ Lang.Blocks.entry ] + }, + null + ], + "type": "index_of_string" + }, + "paramsKeyMap": { + "LEFTHAND": 1, + "RIGHTHAND": 3 + }, + "class": "calc_string", + "isNotFor": [], + "func": function (sprite, script) { + var str = script.getStringValue("LEFTHAND", script); + var target = script.getStringValue("RIGHTHAND", script); + var index = str.indexOf(target); + return index > -1 ? index + 1 : 0; + } + }, + "combine_something": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_combine_something_1, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_combine_something_2, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_combine_something_3, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ Lang.Blocks.block_hi ] + }, + null, + { + "type": "text", + "params": [ Lang.Blocks.entry ] + }, + null + ], + "type": "combine_something" + }, + "paramsKeyMap": { + "VALUE1": 1, + "VALUE2": 3 + }, + "class": "calc_string", + "isNotFor": [], + "func": function (sprite, script) { + var leftValue = script.getStringValue("VALUE1", script); + var rightValue = script.getStringValue("VALUE2", script); + + return leftValue + rightValue; + } + }, + "get_sound_volume": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_get_sound_volume, + "color": "#3D3D3D" + }, + { + "type": "Text", + "text": "", + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "get_sound_volume" + }, + "class": "calc", + "isNotFor": [ + "" + ], + "func": function (sprite, script) { + return createjs.Sound.getVolume() * 100; + } + }, + "quotient_and_mod": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_quotient_and_mod_1, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_quotient_and_mod_2, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_quotient_and_mod_3, + "color": "#3D3D3D" + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CALC_quotient_and_mod_sub_1,"QUOTIENT"], + [Lang.Blocks.CALC_quotient_and_mod_sub_2,"MOD"] + ], + "value": "QUOTIENT", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "10" ] + }, + null, + { + "type": "text", + "params": [ "10" ] + }, + null, + null + ], + "type": "quotient_and_mod" + }, + "paramsKeyMap": { + "LEFTHAND": 1, + "RIGHTHAND": 3, + "OPERATOR": 5 + }, + "class": "calc", + "isNotFor": [], + "func": function (sprite, script) { + var left = script.getNumberValue("LEFTHAND", script); + var right = script.getNumberValue("RIGHTHAND", script); + if (isNaN(left) || isNaN(right)) + throw new Error(); + var operator = script.getField("OPERATOR", script); + if (operator == 'QUOTIENT') + return Math.floor(left/right); + else + return left % right; + } + }, + "choose_project_timer_action": { + "color": "#FFD974", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.CALC_choose_project_timer_action_1, + "color": "#3D3D3D" + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CALC_choose_project_timer_action_sub_1,"START"], + [Lang.Blocks.CALC_choose_project_timer_action_sub_2,"STOP"], + [Lang.Blocks.CALC_choose_project_timer_action_sub_3,"RESET"] + ], + "value": "START", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.CALC_choose_project_timer_action_2, + "color": "#3D3D3D" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/calc_01.png", + "size": 12 + } + ], + "events": { + "viewAdd": [ + function() { + if (Entry.engine) Entry.engine.showProjectTimer(); + } + ], + "dataDestroy": [ + function(block) { + if (Entry.engine) Entry.engine.hideProjectTimer(block); + } + ] + }, + "def": { + "params": [ + null, + "START", + null, + null + ], + "type": "choose_project_timer_action" + }, + "paramsKeyMap": { + "ACTION": 1 + }, + "class": "calc_timer", + "isNotFor": [], + "func": function (sprite, script) { + var action = script.getField('ACTION'); + var engine = Entry.engine; + var timer = engine.projectTimer; + + if (action == 'START') { + if (!timer.isInit) { + engine.startProjectTimer(); + } + else if (timer.isInit && timer.isPaused) { + if (timer.pauseStart) + timer.pausedTime += (new Date()).getTime() - timer.pauseStart; + delete timer.pauseStart; + timer.isPaused = false; + } + } else if (action == 'STOP') { + if (timer.isInit && !timer.isPaused) { + timer.isPaused = true; + timer.pauseStart = (new Date()).getTime(); + } + } else if (action == 'RESET') { + if (timer.isInit) { + timer.setValue(0); + timer.start = (new Date()).getTime(); + timer.pausedTime = 0; + delete timer.pauseStart; + } + + } + return script.callReturn(); + } + }, + "wait_second": { + "color": "#498deb", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "2" ] + }, + null + ], + "type": "wait_second" + }, + "paramsKeyMap": { + "SECOND": 0 + }, + "class": "delay", + "isNotFor": [], + "func": function (sprite, script) { + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + var timeValue = script.getNumberValue("SECOND", script); + var fps = Entry.FPS || 60; + timeValue = 60/fps*timeValue*1000; + setTimeout(function() { + script.timeFlag = 0; + }, timeValue); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.timeFlag; + delete script.isStart; + Entry.engine.isContinue = false; + return script.callReturn(); + } + } + }, + "repeat_basic": { + "color": "#498deb", + "skeleton": "basic_loop", + "statements": [ + { + "accept": "basic" + } + ], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "repeat_basic" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "statementsKeyMap": { + "DO": 0 + }, + "class": "repeat", + "isNotFor": [], + "func": function (sprite, script) { + var iterNumber; + if (!script.isLooped) { + script.isLooped = true; + var iterNumber = script.getNumberValue("VALUE", script); + if(iterNumber < 0) throw new Error(Lang.Blocks.FLOW_repeat_basic_errorMsg); + script.iterCount = Math.floor(iterNumber); + } + if (script.iterCount != 0 && !(script.iterCount < 0)) { + script.iterCount--; + return script.getStatement("DO", script); + } else { + delete script.isLooped; + delete script.iterCount; + return script.callReturn(); + } + } + }, + "repeat_inf": { + "color": "#498deb", + "skeleton": "basic_loop", + "statements": [ + { + "accept": "basic" + } + ], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "repeat_inf" + }, + "statementsKeyMap": { + "DO": 0 + }, + "class": "repeat", + "isNotFor": [], + "func": function (sprite, script) { + //return script.getStatement("DO", script); + script.isLooped = true; + return script.getStatement('DO'); + } + }, + "stop_repeat": { + "color": "#498deb", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null + ], + "type": "stop_repeat" + }, + "class": "repeat", + "isNotFor": [], + "func": function (sprite, script) { + return this.executor.breakLoop(); + } + }, + "wait_until_true": { + "color": "#498deb", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "boolean" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "True" + }, + null + ], + "type": "wait_until_true" + }, + "paramsKeyMap": { + "BOOL": 0 + }, + "class": "wait", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getBooleanValue("BOOL", script); + if (value) { + return script.callReturn(); + } else { + return script; + } + } + }, + "_if": { + "color": "#498deb", + "skeleton": "basic_loop", + "statements": [ + { + "accept": "basic" + } + ], + "params": [ + { + "type": "Block", + "accept": "boolean" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "True" + }, + null + ], + "type": "_if" + }, + "paramsKeyMap": { + "BOOL": 0 + }, + "statementsKeyMap": { + "STACK": 0 + }, + "class": "condition", + "isNotFor": [], + "func": function (sprite, script) { + if (script.isCondition) { + delete script.isCondition; + return script.callReturn(); + } + var value = script.getBooleanValue("BOOL", script); + if (value) { + script.isCondition = true; + return script.getStatement("STACK", script); + } else { + return script.callReturn(); + } + } + }, + "if_else": { + "color": "#498deb", + "skeleton": "basic_double_loop", + "statements": [ + { + "accept": "basic" + }, + { + "accept": "basic" + } + ], + "params": [ + { + "type": "Block", + "accept": "boolean" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + }, + { + "type": "LineBreak" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "True" + }, + null + ], + "type": "if_else" + }, + "paramsKeyMap": { + "BOOL": 0 + }, + "statementsKeyMap": { + "STACK_IF": 0, + "STACK_ELSE": 1 + }, + "class": "condition", + "isNotFor": [], + "func": function (sprite, script) { + if (script.isCondition) { + delete script.isCondition; + return script.callReturn(); + } + var value = script.getBooleanValue("BOOL", script); + script.isCondition = true; + if (value) + return script.getStatement("STACK_IF", script); + else + return script.getStatement("STACK_ELSE", script); + } + }, + "create_clone": { + "color": "#498deb", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "clone", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "create_clone" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "clone", + "isNotFor": [], + "func": function (sprite, script) { + var targetSpriteId = script.getField("VALUE", script); + var returnBlock = script.callReturn(); + if (targetSpriteId == "self") + sprite.parent.addCloneEntity(sprite.parent, sprite, null); + else { + var object = Entry.container.getObject(targetSpriteId); + object.addCloneEntity(sprite.parent, null, null); + } + return returnBlock; + } + }, + "delete_clone": { + "color": "#498deb", + "skeleton": "basic_without_next", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "delete_clone" + }, + "class": "clone", + "isNotFor": [], + "func": function (sprite, script) { + if (!sprite.isClone) + return script.callReturn(); + sprite.removeClone(); + return this.die(); + } + }, + "when_clone_start": { + "color": "#498deb", + "skeleton": "basic_event", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_icon_clone.png", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "when_clone_start" + }, + "class": "clone", + "isNotFor": [], + "func": function (sprite, script) { + return script.callReturn(); + }, + "event": "when_clone_start" + }, + "stop_run": { + "color": "#498deb", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "func": function (sprite, script) { + return Entry.engine.toggleStop(); + } + }, + "repeat_while_true": { + "color": "#498deb", + "skeleton": "basic_loop", + "statements": [ + { + "accept": "basic" + } + ], + "params": [ + { + "type": "Block", + "accept": "boolean" + }, + { + "type": "Dropdown", + "options": [ + [ Lang.Blocks.FLOW_repeat_while_true_until, "until" ], + [ Lang.Blocks.FLOW_repeat_while_true_while, "while" ] + ], + "value": "until", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "True" + }, + null, + null + ], + "type": "repeat_while_true" + }, + "paramsKeyMap": { + "BOOL": 0, + "OPTION": 1 + }, + "statementsKeyMap": { + "DO": 0 + }, + "class": "repeat", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getBooleanValue("BOOL", script); + + if (script.getField("OPTION", script) == 'until') + value = !value; + script.isLooped = value; + + return value ? script.getStatement("DO", script) : + script.callReturn(); + } + }, + "stop_object": { + "color": "#498deb", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ Lang.Blocks.FLOW_stop_object_all, "all" ], + [ Lang.Blocks.FLOW_stop_object_this_object, "thisOnly" ], + [ Lang.Blocks.FLOW_stop_object_this_thread, "thisThread" ], + [ Lang.Blocks.FLOW_stop_object_other_thread, "otherThread" ] + ], + "value": "all", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "stop_object" + }, + "paramsKeyMap": { + "TARGET": 0 + }, + "class": "terminate", + "isNotFor": [], + "func": function (sprite, script) { + var target = script.getField("TARGET", script); + var container = Entry.container; + + switch(target) { + case 'all': + container.clearRunningState(); + return this.die(); + case 'thisOnly': + sprite.parent.script.clearExecutorsByEntity(sprite); + return this.die(); + case 'thisObject': + sprite.parent.script.clearExecutors(); + return this.die(); + case 'thisThread': + return this.die(); + case 'otherThread': + sprite.parent.script.clearExecutors(); + sprite.parent.script.addExecutor(this.executor); + return script.callReturn(); + } + } + }, + "restart_project": { + "color": "#498deb", + "skeleton": "basic_without_next", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "restart_project" + }, + "class": "terminate", + "isNotFor": [], + "func": function (sprite, script) { + Entry.engine.toggleStop(); + Entry.engine.toggleRun(); + } + }, + "remove_all_clones": { + "color": "#498deb", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/flow_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "remove_all_clones" + }, + "class": "clone", + "isNotFor": [], + "func": function (sprite, script) { + var clonedEntities = sprite.parent.getClonedEntities(); + clonedEntities.map(function (entity) { + entity.removeClone(); + }); + clonedEntities = null; + + return script.callReturn(); + } + }, + "functionAddButton": { + "skeleton": "basic_button", + "color": "#eee", + "isNotFor": [ + "functionInit" + ], + "params": [ + { + "type": "Text", + "text": Lang.Workspace.function_create, + "color": "#333", + "align": "center" + } + ], + "events": { + "mousedown": [ + function() { + Entry.variableContainer.createFunction(); + } + ] + } + }, + "function_field_label": { + "skeleton": "basic_param", + "isNotFor": [ "functionEdit" ], + "color": "#f9c535", + "params": [ + { + "type": "TextInput", + "value": Lang.Blocks.FUNCTION_explanation_1 + }, + { + "type": "Output", + "accept": "param" + } + ], + paramsKeyMap:{ + NAME: 0, + NEXT: 1 + }, + "def": { + "params": [ "이름" ], + "type": "function_field_label" + } + }, + "function_field_string": { + "skeleton": "basic_param", + "isNotFor": [ "functionEdit" ], + "color": "#ffd974", + "params": [ + { + "type": "Block", + "accept": "string", + "restore": true + }, + { + "type": "Output", + "accept": "param" + } + ], + paramsKeyMap:{ + PARAM: 0, + NEXT: 1 + }, + "def": { + "params": [ + { + "type": "text", + "params": [ "문자/숫자값" ] + } + ], + "type": "function_field_string" + } + }, + "function_field_boolean": { + "skeleton": "basic_param", + "isNotFor": [ "functionEdit" ], + "color": "#aeb8ff", + "params": [ + { + "type": "Block", + "accept": "boolean", + "restore": true + }, + { + "type": "Output", + "accept": "param" + } + ], + paramsKeyMap:{ + PARAM: 0, + NEXT: 1 + }, + "def": { + "params": [ + { + "type": "True", + "params": [ "판단값" ] + } + ], + "type": "function_field_boolean" + } + }, + "function_param_string": { + "skeleton": "basic_string_field", + "color": "#ffd974", + "template": "%1 %2", + "events": { + "viewAdd": [ + function() { + Entry.Func.refreshMenuCode(); + } + ] + }, + func: function() { + return this.executor.register.params[this.executor.register.paramMap[this.block.type]]; + } + }, + "function_param_boolean": { + "skeleton": "basic_boolean_field", + "color": "#aeb8ff", + "template": "%1 %2", + "events": { + "viewAdd": [ + function() { + Entry.Func.refreshMenuCode(); + } + ] + }, + func: function() { + return this.executor.register.params[this.executor.register.paramMap[this.block.type]]; + } + }, + "function_create": { + "skeleton": "basic", + "color": "#cc7337", + "event": "funcDef", + "params": [ + { + "type": "Block", + "accept": "param", + "value": { + "type": "function_field_label", + "params": [Lang.Blocks.FUNC] + } + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/function_03.png", + "size": 12 + } + ], + paramsKeyMap:{ + FIELD: 0 + }, + func: function() { + } + }, + "function_general": { + "skeleton": "basic", + "color": "#cc7337", + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/function_03.png", + "size": 12 + } + ], + "events": { + "dataAdd": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_functionRefs', block); + } + ], + "dataDestroy": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_functionRefs', block); + } + ], + "dblclick": [ + function(blockView) { + var mode = blockView.getBoard().workspace.getMode(); + if (mode !== Entry.Workspace.MODE_BOARD) return; + var block = blockView.block; + var id = block.type.substr(5); + Entry.Func.edit(Entry.variableContainer.functions_[id]); + } + ] + }, + func: function(entity) { + if (!this.initiated) { + this.initiated = true; + + var func = Entry.variableContainer.getFunction( + this.block.type.substr(5, 9) + ); + this.funcCode = func.content; + this.funcExecutor = this.funcCode.raiseEvent("funcDef", entity)[0]; + this.funcExecutor.register.params = this.getParams(); + var paramMap = {}; + this.funcExecutor.register.paramMap = func.paramMap; + } + this.funcExecutor.execute(); + if (!this.funcExecutor.isEnd()) { + this.funcCode.removeExecutor(this.funcExecutor); + return Entry.STATIC.BREAK; + } + } + }, + "hamster_hand_found": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [], + "events": {}, + "def": { + "params": [], + "type": "hamster_hand_found" + }, + "class": "hamster_sensor", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var pd = Entry.hw.portData; + return pd.leftProximity > 50 || pd.rightProximity > 50; + } + }, + "hamster_value": { + "color": "#00979D", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.HAMSTER_sensor_leftProximity, "leftProximity"], + [Lang.Blocks.HAMSTER_sensor_rightProximity, "rightProximity"], + [Lang.Blocks.HAMSTER_sensor_leftFloor, "leftFloor"], + [Lang.Blocks.HAMSTER_sensor_rightFloor, "rightFloor"], + [Lang.Blocks.HAMSTER_sensor_accelerationX, "accelerationX"], + [Lang.Blocks.HAMSTER_sensor_accelerationY, "accelerationY"], + [Lang.Blocks.HAMSTER_sensor_accelerationZ, "accelerationZ"], + [Lang.Blocks.HAMSTER_sensor_light, "light"], + [Lang.Blocks.HAMSTER_sensor_temperature, "temperature"], + [Lang.Blocks.HAMSTER_sensor_signalStrength, "signalStrength"], + [Lang.Blocks.HAMSTER_sensor_inputA, "inputA"], + [Lang.Blocks.HAMSTER_sensor_inputB, "inputB"] + ], + "value": "leftProximity", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "hamster_value" + }, + "paramsKeyMap": { + "DEVICE": 0 + }, + "class": "hamster_sensor", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var pd = Entry.hw.portData; + var dev = script.getField('DEVICE'); + return pd[dev]; + } + }, + "hamster_move_forward_once": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "hamster_move_forward_once" + }, + "class": "hamster_board", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var pd = Entry.hw.portData; + if (!script.isStart) { + script.isStart = true; + script.isMoving = true; + script.count = 0; + script.boardState = 1; + sq.leftWheel = 45; + sq.rightWheel = 45; + Entry.Hamster.setLineTracerMode(sq, 0); + return script; + } else if (script.isMoving) { + switch(script.boardState) { + case 1: { + if(script.count < 2) { + if(pd.leftFloor < 50 && pd.rightFloor < 50) + script.count ++; + else + script.count = 0; + var diff = pd.leftFloor - pd.rightFloor; + sq.leftWheel = 45 + diff * 0.25; + sq.rightWheel = 45 - diff * 0.25; + } else { + script.count = 0; + script.boardState = 2; + } + break; + } + case 2: { + var diff = pd.leftFloor - pd.rightFloor; + sq.leftWheel = 45 + diff * 0.25; + sq.rightWheel = 45 - diff * 0.25; + script.boardState = 3; + var timer = setTimeout(function() { + script.boardState = 4; + Entry.Hamster.removeTimeout(timer); + }, 250); + Entry.Hamster.timeouts.push(timer); + break; + } + case 3: { + var diff = pd.leftFloor - pd.rightFloor; + sq.leftWheel = 45 + diff * 0.25; + sq.rightWheel = 45 - diff * 0.25; + break; + } + case 4: { + sq.leftWheel = 0; + sq.rightWheel = 0; + script.boardState = 0; + script.isMoving = false; + break; + } + } + return script; + } else { + delete script.isStart; + delete script.isMoving; + delete script.count; + delete script.boardState; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } + } + }, + "hamster_turn_once": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "hamster_turn_once" + }, + "paramsKeyMap": { + "DIRECTION": 0 + }, + "class": "hamster_board", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var pd = Entry.hw.portData; + if (!script.isStart) { + script.isStart = true; + script.isMoving = true; + script.count = 0; + script.boardState = 1; + var direction = script.getField("DIRECTION", script); + if (direction == 'LEFT') { + script.isLeft = true; + sq.leftWheel = -45; + sq.rightWheel = 45; + } else { + script.isLeft = false; + sq.leftWheel = 45; + sq.rightWheel = -45; + } + Entry.Hamster.setLineTracerMode(sq, 0); + return script; + } else if (script.isMoving) { + if(script.isLeft) { + switch(script.boardState) { + case 1: { + if(script.count < 2) { + if(pd.leftFloor > 50) + script.count ++; + } else { + script.count = 0; + script.boardState = 2; + } + break; + } + case 2: { + if(pd.leftFloor < 20) { + script.boardState = 3; + } + break; + } + case 3: { + if(script.count < 2) { + if(pd.leftFloor < 20) + script.count ++; + } else { + script.count = 0; + script.boardState = 4; + } + break; + } + case 4: { + if(pd.leftFloor > 50) { + script.boardState = 5; + } + break; + } + case 5: { + var diff = pd.leftFloor - pd.rightFloor; + if(diff > -15) { + sq.leftWheel = 0; + sq.rightWheel = 0; + script.boardState = 0; + script.isMoving = false; + } else { + sq.leftWheel = diff * 0.5; + sq.rightWheel = -diff * 0.5; + } + break; + } + } + } else { + switch(script.boardState) { + case 1: { + if(script.count < 2) { + if(pd.rightFloor > 50) + script.count ++; + } else { + script.count = 0; + script.boardState = 2; + } + break; + } + case 2: { + if(pd.rightFloor < 20) { + script.boardState = 3; + } + break; + } + case 3: { + if(script.count < 2) { + if(pd.rightFloor < 20) + script.count ++; + } else { + script.count = 0; + script.boardState = 4; + } + break; + } + case 4: { + if(pd.rightFloor > 50) { + script.boardState = 5; + } + break; + } + case 5: { + var diff = pd.rightFloor - pd.leftFloor; + if(diff > -15) { + sq.leftWheel = 0; + sq.rightWheel = 0; + script.boardState = 0; + script.isMoving = false; + } else { + sq.leftWheel = -diff * 0.5; + sq.rightWheel = diff * 0.5; + } + break; + } + } + } + return script; + } else { + delete script.isStart; + delete script.isMoving; + delete script.count; + delete script.boardState; + delete script.isLeft; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } + } + }, + "hamster_move_forward_for_secs": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "1" ] + }, + null + ], + "type": "hamster_move_forward_for_secs" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "hamster_wheel", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + sq.leftWheel = 30; + sq.rightWheel = 30; + Entry.Hamster.setLineTracerMode(sq, 0); + var timeValue = script.getNumberValue("VALUE") * 1000; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Hamster.removeTimeout(timer); + }, timeValue); + Entry.Hamster.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } + } + }, + "hamster_move_backward_for_secs": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "1" ] + }, + null + ], + "type": "hamster_move_backward_for_secs" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "hamster_wheel", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + sq.leftWheel = -30; + sq.rightWheel = -30; + Entry.Hamster.setLineTracerMode(sq, 0); + var timeValue = script.getNumberValue("VALUE") * 1000; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Hamster.removeTimeout(timer); + }, timeValue); + Entry.Hamster.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } + } + }, + "hamster_turn_for_secs": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "1" ] + }, + null + ], + "type": "hamster_turn_for_secs" + }, + "paramsKeyMap": { + "DIRECTION": 0, + "VALUE": 1 + }, + "class": "hamster_wheel", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + var direction = script.getField("DIRECTION", script); + if (direction == 'LEFT') { + sq.leftWheel = -30; + sq.rightWheel = 30; + } else { + sq.leftWheel = 30; + sq.rightWheel = -30; + } + Entry.Hamster.setLineTracerMode(sq, 0); + var timeValue = script.getNumberValue("VALUE") * 1000; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Hamster.removeTimeout(timer); + }, timeValue); + Entry.Hamster.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.leftWheel = 0; + sq.rightWheel = 0; + return script.callReturn(); + } + } + }, + "hamster_change_both_wheels_by": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "10" ] + }, + { + "type": "text", + "params": [ "10" ] + }, + null + ], + "type": "hamster_change_both_wheels_by" + }, + "paramsKeyMap": { + "LEFT": 0, + "RIGHT": 1 + }, + "class": "hamster_wheel", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var left = script.getNumberValue('LEFT'); + var right = script.getNumberValue('RIGHT'); + sq.leftWheel = sq.leftWheel != undefined ? sq.leftWheel + left : left; + sq.rightWheel = sq.rightWheel != undefined ? sq.rightWheel + right : right; + Entry.Hamster.setLineTracerMode(sq, 0); + return script.callReturn(); + } + }, + "hamster_set_both_wheels_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "30" ] + }, + { + "type": "text", + "params": [ "30" ] + }, + null + ], + "type": "hamster_set_both_wheels_to" + }, + "paramsKeyMap": { + "LEFT": 0, + "RIGHT": 1 + }, + "class": "hamster_wheel", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + sq.leftWheel = script.getNumberValue('LEFT'); + sq.rightWheel = script.getNumberValue('RIGHT'); + Entry.Hamster.setLineTracerMode(sq, 0); + return script.callReturn(); + } + }, + "hamster_change_wheel_by": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "10" ] + }, + null + ], + "type": "hamster_change_wheel_by" + }, + "paramsKeyMap": { + "DIRECTION": 0, + "VALUE": 1 + }, + "class": "hamster_wheel", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var direction = script.getField('DIRECTION'); + var value = script.getNumberValue('VALUE'); + if (direction == 'LEFT') { + sq.leftWheel = sq.leftWheel != undefined ? sq.leftWheel + value : value; + } else if (direction == 'RIGHT') { + sq.rightWheel = sq.rightWheel != undefined ? sq.rightWheel + value : value; + } else { + sq.leftWheel = sq.leftWheel != undefined ? sq.leftWheel + value : value; + sq.rightWheel = sq.rightWheel != undefined ? sq.rightWheel + value : value; + } + Entry.Hamster.setLineTracerMode(sq, 0); + return script.callReturn(); + } + }, + "hamster_set_wheel_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "30" ] + }, + null + ], + "type": "hamster_set_wheel_to" + }, + "paramsKeyMap": { + "DIRECTION": 0, + "VALUE": 1 + }, + "class": "hamster_wheel", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var direction = script.getField('DIRECTION'); + var value = script.getNumberValue('VALUE'); + if (direction == 'LEFT') { + sq.leftWheel = value; + } else if (direction == 'RIGHT') { + sq.rightWheel = value; + } else { + sq.leftWheel = value; + sq.rightWheel = value; + } + Entry.Hamster.setLineTracerMode(sq, 0); + return script.callReturn(); + } + }, + "hamster_follow_line_using": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.HAMSTER_color_black,"BLACK"], + [Lang.General.white,"WHITE"] + ], + "value": "BLACK", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "hamster_follow_line_using" + }, + "paramsKeyMap": { + "COLOR": 0, + "DIRECTION": 1 + }, + "class": "hamster_wheel", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var color = script.getField('COLOR'); + var direction = script.getField('DIRECTION'); + + var mode = 1; + if (direction == 'RIGHT') mode = 2; + else if (direction == 'BOTH') mode = 3; + if (color == 'WHITE') mode += 7; + + sq.leftWheel = 0; + sq.rightWheel = 0; + Entry.Hamster.setLineTracerMode(sq, mode); + return script.callReturn(); + } + }, + "hamster_follow_line_until": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.HAMSTER_color_black,"BLACK"], + [Lang.General.white,"WHITE"] + ], + "value": "BLACK", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.Blocks.HAMSTER_front,"FRONT"], + [Lang.Blocks.HAMSTER_rear,"REAR"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "hamster_follow_line_until" + }, + "paramsKeyMap": { + "COLOR": 0, + "DIRECTION": 1 + }, + "class": "hamster_wheel", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var pd = Entry.hw.portData; + var color = script.getField('COLOR'); + var direction = script.getField('DIRECTION'); + + var mode = 4; + if (direction == 'RIGHT') mode = 5; + else if (direction == 'FRONT') mode = 6; + else if (direction == 'REAR') mode = 7; + if (color == 'WHITE') mode += 7; + + if (!script.isStart) { + script.isStart = true; + sq.leftWheel = 0; + sq.rightWheel = 0; + Entry.Hamster.setLineTracerMode(sq, mode); + return script; + } else { + var hamster = Entry.Hamster; + if (pd.lineTracerStateId != hamster.lineTracerStateId) { + hamster.lineTracerStateId = pd.lineTracerStateId; + if (pd.lineTracerState == 0x40) { + delete script.isStart; + Entry.engine.isContinue = false; + hamster.setLineTracerMode(sq, 0); + return script.callReturn(); + } + } + return script; + } + } + }, + "hamster_set_following_speed_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "1", "1" ], + [ "2", "2" ], + [ "3", "3" ], + [ "4", "4" ], + [ "5", "5" ], + [ "6", "6" ], + [ "7", "7" ], + [ "8", "8" ] + ], + "value": "1", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ "5", null ], + "type": "hamster_set_following_speed_to" + }, + "paramsKeyMap": { + "SPEED": 0 + }, + "class": "hamster_wheel", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + sq.lineTracerSpeed = Number(script.getField("SPEED", script)); + return script.callReturn(); + } + }, + "hamster_stop": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "hamster_stop" + }, + "class": "hamster_wheel", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + sq.leftWheel = 0; + sq.rightWheel = 0; + Entry.Hamster.setLineTracerMode(sq, 0); + return script.callReturn(); + } + }, + "hamster_set_led_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.General.red,"4"], + [Lang.General.yellow,"6"], + [Lang.General.green,"2"], + [Lang.Blocks.HAMSTER_color_cyan,"3"], + [Lang.General.blue,"1"], + [Lang.Blocks.HAMSTER_color_magenta,"5"], + [Lang.General.white,"7"] + ], + "value": "4", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "hamster_set_led_to" + }, + "paramsKeyMap": { + "DIRECTION": 0, + "COLOR": 1 + }, + "class": "hamster_led", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var direction = script.getField("DIRECTION", script); + var color = Number(script.getField("COLOR", script)); + if (direction == 'LEFT') { + sq.leftLed = color; + } else if (direction == 'RIGHT') { + sq.rightLed = color; + } else { + sq.leftLed = color; + sq.rightLed = color; + } + return script.callReturn(); + } + }, + "hamster_clear_led": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"], + [Lang.General.both,"BOTH"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "hamster_clear_led" + }, + "paramsKeyMap": { + "DIRECTION": 0 + }, + "class": "hamster_led", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var direction = script.getField("DIRECTION", script); + if (direction == 'LEFT') { + sq.leftLed = 0; + } else if (direction == 'RIGHT') { + sq.rightLed = 0; + } else { + sq.leftLed = 0; + sq.rightLed = 0; + } + return script.callReturn(); + } + }, + "hamster_beep": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "hamster_beep" + }, + "class": "hamster_buzzer", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + sq.buzzer = 440; + sq.note = 0; + var timeValue = 0.2 * 1000; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Hamster.removeTimeout(timer); + }, timeValue); + Entry.Hamster.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.buzzer = 0; + return script.callReturn(); + } + } + }, + "hamster_change_buzzer_by": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "10" ] + }, + null + ], + "type": "hamster_change_buzzer_by" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "hamster_buzzer", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var value = script.getNumberValue('VALUE'); + sq.buzzer = sq.buzzer != undefined ? sq.buzzer + value : value; + sq.note = 0; + return script.callReturn(); + } + }, + "hamster_set_buzzer_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "1000" ] + }, + null + ], + "type": "hamster_set_buzzer_to" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "hamster_buzzer", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + sq.buzzer = script.getNumberValue('VALUE'); + sq.note = 0; + return script.callReturn(); + } + }, + "hamster_clear_buzzer": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "hamster_clear_buzzer" + }, + "class": "hamster_buzzer", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + sq.buzzer = 0; + sq.note = 0; + return script.callReturn(); + } + }, + "hamster_play_note_for": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.note_c + '',"4"], + [Lang.General.note_c + '#',"5"], + [Lang.General.note_d + '',"6"], + [Lang.General.note_e + 'b',"7"], + [Lang.General.note_e + '',"8"], + [Lang.General.note_f + '',"9"], + [Lang.General.note_f + '#',"10"], + [Lang.General.note_g + '',"11"], + [Lang.General.note_g + '#',"12"], + [Lang.General.note_a + '',"13"], + [Lang.General.note_b + 'b',"14"], + [Lang.General.note_b + '',"15"] + ], + "value": "4", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [ "1", "1" ], + [ "2", "2" ], + [ "3", "3" ], + [ "4", "4" ], + [ "5", "5" ], + [ "6", "6" ], + [ "7", "7" ] + ], + "value": "1", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + "4", + { + "type": "text", + "params": [ "0.5" ] + }, + null + ], + "type": "hamster_play_note_for" + }, + "paramsKeyMap": { + "NOTE": 0, + "OCTAVE": 1, + "VALUE": 2 + }, + "class": "hamster_buzzer", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + var note = script.getNumberField("NOTE", script); + var octave = script.getNumberField("OCTAVE", script); + var beat = script.getNumberValue("VALUE", script); + var tempo = Entry.Hamster.tempo; + note += (octave-1)*12; + var timeValue = beat*60*1000/tempo; + script.isStart = true; + script.timeFlag = 1; + sq.buzzer = 0; + sq.note = note; + if (timeValue > 100) { + var timer1 = setTimeout(function() { + sq.note = 0; + Entry.Hamster.removeTimeout(timer1); + }, timeValue-100); + Entry.Hamster.timeouts.push(timer1); + } + var timer2 = setTimeout(function() { + script.timeFlag = 0; + Entry.Hamster.removeTimeout(timer2); + }, timeValue); + Entry.Hamster.timeouts.push(timer2); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + sq.note = 0; + return script.callReturn(); + } + } + }, + "hamster_rest_for": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "0.25" ] + }, + null + ], + "type": "hamster_rest_for" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "hamster_buzzer", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + if (!script.isStart) { + script.isStart = true; + script.timeFlag = 1; + var timeValue = script.getNumberValue('VALUE'); + timeValue = timeValue*60*1000/Entry.Hamster.tempo; + sq.buzzer = 0; + sq.note = 0; + var timer = setTimeout(function() { + script.timeFlag = 0; + Entry.Hamster.removeTimeout(timer); + }, timeValue); + Entry.Hamster.timeouts.push(timer); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.isStart; + delete script.timeFlag; + Entry.engine.isContinue = false; + return script.callReturn(); + } + } + }, + "hamster_change_tempo_by": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "20" ] + }, + null + ], + "type": "hamster_change_tempo_by" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "hamster_buzzer", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + Entry.Hamster.tempo += script.getNumberValue('VALUE'); + if (Entry.Hamster.tempo < 1) Entry.Hamster.tempo = 1; + return script.callReturn(); + } + }, + "hamster_set_tempo_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "60" ] + }, + null + ], + "type": "hamster_set_tempo_to" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "hamster_buzzer", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + Entry.Hamster.tempo = script.getNumberValue('VALUE'); + if (Entry.Hamster.tempo < 1) Entry.Hamster.tempo = 1; + return script.callReturn(); + } + }, + "hamster_set_port_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.HAMSTER_port_a, "A"], + [Lang.Blocks.HAMSTER_port_b, "B"], + [Lang.Blocks.HAMSTER_port_ab, "AB"] + ], + "value": "A", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.HAMSTER_analog_input, "0"], + [Lang.Blocks.HAMSTER_digital_input, "1"], + [Lang.Blocks.HAMSTER_servo_output, "8"], + [Lang.Blocks.HAMSTER_pwm_output, "9"], + [Lang.Blocks.HAMSTER_digital_output, "10"] + ], + "value": "0", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "hamster_set_port_to" + }, + "paramsKeyMap": { + "PORT": 0, + "MODE": 1 + }, + "class": "hamster_port", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var port = script.getField("PORT", script); + var mode = Number(script.getField("MODE", script)); + if (port == 'A') { + sq.ioModeA = mode; + } else if (port == 'B') { + sq.ioModeB = mode; + } else { + sq.ioModeA = mode; + sq.ioModeB = mode; + } + return script.callReturn(); + } + }, + "hamster_change_output_by": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.HAMSTER_port_a, "A"], + [Lang.Blocks.HAMSTER_port_b, "B"], + [Lang.Blocks.HAMSTER_port_ab, "AB"] + ], + "value": "A", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "10" ] + }, + null + ], + "type": "hamster_change_output_by" + }, + "paramsKeyMap": { + "PORT": 0, + "VALUE": 1 + }, + "class": "hamster_port", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var port = script.getField('PORT'); + var value = script.getNumberValue('VALUE'); + if (port == 'A') { + sq.outputA = sq.outputA != undefined ? sq.outputA + value : value; + } else if (port == 'B') { + sq.outputB = sq.outputB != undefined ? sq.outputB + value : value; + } else { + sq.outputA = sq.outputA != undefined ? sq.outputA + value : value; + sq.outputB = sq.outputB != undefined ? sq.outputB + value : value; + } + return script.callReturn(); + } + }, + "hamster_set_output_to": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.HAMSTER_port_a, "A"], + [Lang.Blocks.HAMSTER_port_b, "B"], + [Lang.Blocks.HAMSTER_port_ab, "AB"] + ], + "value": "A", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "100" ] + }, + null + ], + "type": "hamster_set_output_to" + }, + "paramsKeyMap": { + "PORT": 0, + "VALUE": 1 + }, + "class": "hamster_port", + "isNotFor": [ "hamster" ], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + var port = script.getField('PORT'); + var value = script.getNumberValue('VALUE'); + if (port == 'A') { + sq.outputA = value; + } else if (port == 'B') { + sq.outputB = value; + } else { + sq.outputA = value; + sq.outputB = value; + } + return script.callReturn(); + } + }, + "is_clicked": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.JUDGEMENT_is_clicked, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "is_clicked" + }, + "class": "boolean_input", + "isNotFor": [], + "func": function (sprite, script) { + return Entry.stage.isClick; + } + }, + "is_press_some_key": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Keyboard", + "value": 81 + }, + { + "type": "Text", + "text": Lang.Blocks.JUDGEMENT_is_press_some_key_2, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "is_press_some_key" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "boolean_input", + "isNotFor": [], + "func": function (sprite, script) { + var keycode = Number(script.getField("VALUE", script)); + return Entry.pressedKeys.indexOf(keycode) >= 0; + } + }, + "reach_something": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.JUDGEMENT_reach_something_1, + "color": "#3D3D3D" + }, + { + "type": "DropdownDynamic", + "value": null, + "menuName": "collision", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.JUDGEMENT_reach_something_2, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "reach_something" + }, + "paramsKeyMap": { + "VALUE": 1 + }, + "class": "boolean_collision", + "isNotFor": [], + "func": function (sprite, script) { + if (!sprite.getVisible()) + return false; + var targetSpriteId = script.getField("VALUE", script); + var reg = /wall/; + var ath = 0.2; + var object = sprite.object + var isWall = reg.test(targetSpriteId); + var collision = ndgmr.checkPixelCollision; + if (isWall) { + var wall = Entry.stage.wall; + switch(targetSpriteId) { + case 'wall': + if (collision(object,wall.up,ath,true) || + collision(object,wall.down,ath,true) || + collision(object,wall.left,ath,true) || + collision(object,wall.right,ath,true)) + return true; + else + return false; + + case 'wall_up': + if (collision(object,wall.up,ath,true)) + return true; + else + return false; + case 'wall_down': + if (collision(object,wall.down,ath,true)) + return true; + else + return false; + case 'wall_right': + if (collision(object,wall.right,ath,true)) + return true; + else + return false; + case 'wall_left': + if (collision(object,wall.left,ath,true)) + return true; + else + return false; + } + } else if (targetSpriteId == 'mouse') { + var stage = Entry.stage.canvas; + var pt = object.globalToLocal(stage.mouseX, stage.mouseY); + return object.hitTest(pt.x, pt.y); + } else { + var targetSprite = Entry.container.getEntity(targetSpriteId); + if (targetSprite.type == "textBox" || sprite.type == 'textBox') { + var targetBound = targetSprite.object.getTransformedBounds(); + var bound = object.getTransformedBounds(); + if (Entry.checkCollisionRect(bound, targetBound)) + return true; + var clonedEntities = targetSprite.parent.clonedEntities; + for (var i=0, len=clonedEntities.length; i", "BIGGER" ] + ], + "value": "EQUAL", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ null ], + type: "boolean_comparison" + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "OPERATOR": 1, + "RIGHTHAND": 2 + }, + "func": function (sprite, script) { + var operator = script.getField("OPERATOR", script); + var leftValue = script.getNumberValue("LEFTHAND", script); + var rightValue = script.getNumberValue("RIGHTHAND", script); + if (operator == "EQUAL") + return leftValue == rightValue; + else if (operator == "BIGGER") + return leftValue > rightValue; + else + return leftValue < rightValue; + } + }, + "boolean_equal": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": "=", + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null, + { + "type": "number", + "params": [ "10" ] + } + ], + "type": "boolean_equal" + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "RIGHTHAND": 2 + }, + "class": "boolean_compare", + "isNotFor": [], + "func": function (sprite, script) { + var leftValue = script.getStringValue("LEFTHAND", script); + var rightValue = script.getStringValue("RIGHTHAND", script); + return leftValue == rightValue; + } + }, + "boolean_bigger": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": ">", + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null, + { + "type": "number", + "params": [ "10" ] + } + ], + "type": "boolean_bigger" + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "RIGHTHAND": 2 + }, + "class": "boolean_compare", + "isNotFor": [], + "func": function (sprite, script) { + var leftValue = script.getNumberValue("LEFTHAND", script); + var rightValue = script.getNumberValue("RIGHTHAND", script); + return leftValue > rightValue; + } + }, + "boolean_smaller": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": "<", + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null, + { + "type": "number", + "params": [ "10" ] + } + ], + "type": "boolean_smaller" + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "RIGHTHAND": 2 + }, + "class": "boolean_compare", + "isNotFor": [], + "func": function (sprite, script) { + var leftValue = script.getNumberValue("LEFTHAND", script); + var rightValue = script.getNumberValue("RIGHTHAND", script); + return leftValue < rightValue; + } + }, + "boolean_and_or": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "boolean" + }, + { + "type": "Dropdown", + "options": [ + [ Lang.Blocks.JUDGEMENT_boolean_and, "AND" ], + [ Lang.Blocks.JUDGEMENT_boolean_or, "OR" ] + ], + "value": "AND", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "boolean" + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "OPERATOR": 1, + "RIGHTHAND": 2 + }, + "func": function (sprite, script) { + var operator = script.getField("OPERATOR", script); + var leftValue = script.getBooleanValue("LEFTHAND", script); + var rightValue = script.getBooleanValue("RIGHTHAND", script); + if (operator == "AND") + return leftValue && rightValue; + else + return leftValue || rightValue; + } + }, + "boolean_and": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "boolean" + }, + { + "type": "Text", + "text": Lang.Blocks.JUDGEMENT_boolean_and, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "boolean" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "True" + }, + null, + { + "type": "True" + } + ], + "type": "boolean_and" + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "RIGHTHAND": 2 + }, + "class": "boolean", + "isNotFor": [], + "func": function (sprite, script) { + var leftValue = script.getBooleanValue("LEFTHAND", script); + var rightValue = script.getBooleanValue("RIGHTHAND", script); + return leftValue && rightValue; + } + }, + "boolean_or": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "boolean" + }, + { + "type": "Text", + "text": Lang.Blocks.JUDGEMENT_boolean_or, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "boolean" + } + ], + "events": {}, + "def": { + "params": [ + { "type": "True" }, + null, + { "type": "False" } + ], + "type": "boolean_or" + }, + "paramsKeyMap": { + "LEFTHAND": 0, + "RIGHTHAND": 2 + }, + "class": "boolean", + "isNotFor": [], + "func": function (sprite, script) { + var leftValue = script.getBooleanValue("LEFTHAND", script); + var rightValue = script.getBooleanValue("RIGHTHAND", script); + return leftValue || rightValue; + } + }, + "boolean_not": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.JUDGEMENT_boolean_not_1, + "color": "#3D3D3D" + }, + { + "type": "Block", + "accept": "boolean" + }, + { + "type": "Text", + "text": Lang.Blocks.JUDGEMENT_boolean_not_2, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ + null, + { "type": "True" }, + null + ], + "type": "boolean_not" + }, + "paramsKeyMap": { + "VALUE": 1 + }, + "class": "boolean", + "isNotFor": [], + "func": function (sprite, script) { + return !script.getBooleanValue("VALUE"); + } + }, + "true_or_false": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.JUDGEMENT_true,"true"], + [Lang.Blocks.JUDGEMENT_false, "false"] + ], + "value": "true", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "func": function (sprite, script) { + var value = script.children[0].textContent; + return value == "true"; + } + }, + "True": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.JUDGEMENT_true, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ null ], + type: "True" + }, + "func": function (sprite, script) { + return true; + }, + "isPrimitive": true + }, + "False": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.JUDGEMENT_false, + "color": "#3D3D3D" + } + ], + "events": {}, + "def": { + "params": [ + null + ], + type: "False" + }, + "func": function (sprite, script) { + return false; + }, + "isPrimitive": true + }, + "boolean_basic_operator": { + "color": "#AEB8FF", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Dropdown", + "options": [ + [ "=", "EQUAL" ], + [ ">", "GREATER" ], + [ "<", "LESS" ], + [ "≥", "GREATER_OR_EQUAL" ], + [ "≤", "LESS_OR_EQUAL" ] + ], + "value": "EQUAL", + "fontSize": 11, + noArrow: true + }, + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "10" ] + }, + "EQUAL", + { + "type": "text", + "params": [ "10" ] + } + ], + "type": "boolean_basic_operator" + }, + "defs": [ + { + "params": [ + { + "type": "text", + "params": [ "10" ] + }, + "EQUAL", + { + "type": "text", + "params": [ "10" ] + } + ], + "type": "boolean_basic_operator" + }, + { + "params": [ + { + "type": "text", + "params": [ "10" ] + }, + "GREATER", + { + "type": "text", + "params": [ "10" ] + } + ], + "type": "boolean_basic_operator" + }, + { + "params": [ + { + "type": "text", + "params": [ "10" ] + }, + "LESS", + { + "type": "text", + "params": [ "10" ] + } + ], + "type": "boolean_basic_operator" + }, + { + "params": [ + { + "type": "text", + "params": [ "10" ] + }, + "GREATER_OR_EQUAL", + { + "type": "text", + "params": [ "10" ] + } + ], + "type": "boolean_basic_operator" + }, + { + "params": [ + { + "type": "text", + "params": [ "10" ] + }, + "LESS_OR_EQUAL", + { + "type": "text", + "params": [ "10" ] + } + ], + "type": "boolean_basic_operator" + } + ], + "paramsKeyMap": { + "LEFTHAND": 0, + "OPERATOR": 1, + "RIGHTHAND": 2 + }, + "class": "boolean_compare", + "isNotFor": [], + "func": function (sprite, script) { + var operator = script.getField("OPERATOR", script); + var leftValue = script.getStringValue("LEFTHAND", script); + var rightValue = script.getStringValue("RIGHTHAND", script); + + switch(operator) { + case 'EQUAL': + return leftValue == rightValue; + case 'GREATER': + return Number(leftValue) > Number(rightValue); + case 'LESS': + return Number(leftValue) < Number(rightValue); + case 'GREATER_OR_EQUAL': + return Number(leftValue) >= Number(rightValue); + case 'LESS_OR_EQUAL': + return Number(leftValue) <= Number(rightValue); + } + } + }, + "show": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "show" + }, + "class": "visibility", + "isNotFor": [], + "func": function (sprite, script) { + sprite.setVisible(true); + return script.callReturn(); + } + }, + "hide": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "hide" + }, + "class": "visibility", + "isNotFor": [], + "func": function (sprite, script) { + sprite.setVisible(false); + return script.callReturn(); + } + }, + "dialog_time": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Dropdown", + "options": [ + [ Lang.Blocks.speak, "speak" ] + ], + "value": "speak", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ Lang.Blocks.block_hi ] + }, + { + "type": "number", + "params": [ "4" ] + }, + null, + null + ], + "type": "dialog_time" + }, + "paramsKeyMap": { + "VALUE": 0, + "SECOND": 1, + "OPTION": 2 + }, + "class": "say", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + if (!script.isStart) { + var timeValue = script.getNumberValue("SECOND", script); + var message = script.getStringValue("VALUE", script); + var mode = script.getField("OPTION", script); + script.isStart = true; + script.timeFlag = 1; + if (!message && typeof message != 'number') + message = ' '; + message = Entry.convertToRoundedDecimals(message, 3); + new Entry.Dialog(sprite, message, mode); + sprite.syncDialogVisible(sprite.getVisible()); + setTimeout(function() { + script.timeFlag = 0; + }, timeValue * 1000); + } + if (script.timeFlag == 0) { + delete script.timeFlag; + delete script.isStart; + if(sprite.dialog) sprite.dialog.remove(); + return script.callReturn(); + } else + return script; + } + }, + "dialog": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Dropdown", + "options": [ + [ Lang.Blocks.speak, "speak" ] + ], + "value": "speak", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ Lang.Blocks.block_hi ] + }, + null, + null + ], + "type": "dialog" + }, + "paramsKeyMap": { + "VALUE": 0, + "OPTION": 1 + }, + "class": "say", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var message = script.getStringValue("VALUE", script); + if (!message && typeof message != 'number') { + message = ' '; + } + var mode = script.getField("OPTION", script); + message = Entry.convertToRoundedDecimals(message, 3); + new Entry.Dialog(sprite, message, mode); + sprite.syncDialogVisible(sprite.getVisible()); + return script.callReturn(); + } + }, + "remove_dialog": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "remove_dialog" + }, + "class": "say", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + if(sprite.dialog) sprite.dialog.remove(); + return script.callReturn(); + } + }, + "change_to_nth_shape": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "pictures", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "change_to_nth_shape" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "shape", + "isNotFor": [], + "func": function (sprite, script) { + var imageId = script.getField("VALUE", script); + var picture = sprite.parent.getPicture(imageId); + sprite.setImage(picture); + return script.callReturn(); + } + }, + "change_to_next_shape": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ Lang.Blocks.LOOKS_change_shape_next, "next" ], + [ Lang.Blocks.LOOKS_change_shape_prev, "prev" ] + ], + "value": "next", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "change_to_next_shape" + }, + "paramsKeyMap": { + "DRIECTION": 0 + }, + "class": "shape", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var picture; + if(!script.fields || script.getStringField("DRIECTION") !== 'prev') { + picture = sprite.parent.getNextPicture(sprite.picture.id); + } else { + picture = sprite.parent.getPrevPicture(sprite.picture.id); + } + sprite.setImage(picture); + return script.callReturn(); + } + }, + "set_effect_volume": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.color, "color"], + [Lang.Blocks.brightness, "brightness"], + [Lang.Blocks.opacity, "opacity"] + ], + "value": "color", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "set_effect_volume" + }, + "paramsKeyMap": { + "EFFECT": 0, + "VALUE": 1 + }, + "class": "effect", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var effect = script.getField("EFFECT", script); + var effectValue = script.getNumberValue("VALUE", script); + if (effect == "color") { + sprite.effect.hue = effectValue + sprite.effect.hue; + } else if (effect == "lens") { + } else if (effect == "swriling") { + } else if (effect == "pixel") { + } else if (effect == "mosaic") { + } else if (effect == "brightness") { + sprite.effect.brightness = effectValue + sprite.effect.brightness; + } else if (effect == "blur") { + } else if (effect == "opacity") { + sprite.effect.alpha = (sprite.effect.alpha + effectValue / 100) ; + } + sprite.applyFilter(); + return script.callReturn(); + } + }, + "set_effect": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.color, "color"], + [Lang.Blocks.brightness, "brightness"], + [Lang.Blocks.opacity, "opacity"] + ], + "value": "color", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "100" ] + }, + null + ], + "type": "set_effect" + }, + "paramsKeyMap": { + "EFFECT": 0, + "VALUE": 1 + }, + "class": "effect", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var effect = script.getField("EFFECT", script); + var effectValue = script.getNumberValue("VALUE", script); + if (effect == "color") { + sprite.effect.hue = effectValue; + } else if (effect == "lens") { + } else if (effect == "swriling") { + } else if (effect == "pixel") { + } else if (effect == "mosaic") { + } else if (effect == "brightness") { + sprite.effect.brightness = effectValue; + } else if (effect == "blur") { + } else if (effect == "opacity") { + sprite.effect.alpha = effectValue / 100; + } + sprite.applyFilter(); + return script.callReturn(); + } + }, + "erase_all_effects": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "erase_all_effects" + }, + "class": "effect", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + sprite.resetFilter(); + return script.callReturn(); + } + }, + "change_scale_percent": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "change_scale_percent" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "scale", + "isNotFor": [], + "func": function (sprite, script) { + var scaleValue = (script.getNumberValue("VALUE", script) + 100) / 100; + sprite.setScaleX(sprite.getScaleX() * scaleValue); + sprite.setScaleY(sprite.getScaleY() * scaleValue); + return script.callReturn(); + } + }, + "set_scale_percent": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "100" ] + }, + null + ], + "type": "set_scale_percent" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "scale", + "isNotFor": [], + "func": function (sprite, script) { + var scaleValue = script.getNumberValue("VALUE", script) / 100; + var snapshot = sprite.snapshot_; + sprite.setScaleX(scaleValue * snapshot.scaleX); + sprite.setScaleY(scaleValue * snapshot.scaleY); + return script.callReturn(); + } + }, + "change_scale_size": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "change_scale_size" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "scale", + "isNotFor": [], + "func": function (sprite, script) { + var sizeValue = script.getNumberValue("VALUE", script); + sprite.setSize(sprite.getSize() + sizeValue); + return script.callReturn(); + } + }, + "set_scale_size": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "100" ] + }, + null + ], + "type": "set_scale_size" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "scale", + "isNotFor": [], + "func": function (sprite, script) { + var sizeValue = script.getNumberValue("VALUE", script); + sprite.setSize(sizeValue); + return script.callReturn(); + } + }, + "flip_y": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "flip_y" + }, + "class": "flip", + "isNotFor": [], + "func": function (sprite, script) { + sprite.setScaleX((-1)*sprite.getScaleX()); + return script.callReturn(); + } + }, + "flip_x": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null + ], + "type": "flip_x" + }, + "class": "flip", + "isNotFor": [], + "func": function (sprite, script) { + sprite.setScaleY((-1)*sprite.getScaleY()); + return script.callReturn(); + } + }, + "set_object_order": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "objectSequence", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "set_object_order" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "z-index", + "isNotFor": [], + "func": function (sprite, script) { + var targetIndex = script.getField("VALUE", script); + //var currentIndex = Entry.container.getBelongedObjectsToScene().indexOf(sprite.parent); + var currentIndex = Entry.container.getCurrentObjects().indexOf(sprite.parent); + + if (currentIndex > -1) { + Entry.container.moveElementByBlock(currentIndex, targetIndex); + return script.callReturn(); + } else + throw new Error('object is not available'); + } + }, + "get_pictures": { + "color": "#EC4466", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "pictures", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "func": function (sprite, script) { + return script.getStringField("VALUE"); + } + }, + "change_to_some_shape": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "get_pictures", + "id": "z4jm" + }, + null + ], + "type": "change_to_some_shape" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "shape", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var imageId = script.getStringValue("VALUE"); + var value = Entry.parseNumber(imageId); + var picture = sprite.parent.getPicture(imageId); + + sprite.setImage(picture); + return script.callReturn(); + } + }, + "add_effect_amount": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ Lang.Blocks.color, "color" ], + [ Lang.Blocks.brightness, "brightness" ], + [ Lang.Blocks.transparency, "transparency" ] + ], + "value": "color", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "add_effect_amount" + }, + "paramsKeyMap": { + "EFFECT": 0, + "VALUE": 1 + }, + "class": "effect", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var effect = script.getField("EFFECT", script); + var effectValue = script.getNumberValue("VALUE", script); + if (effect == "color") { + sprite.effect.hsv = effectValue + sprite.effect.hsv; + } else if (effect == "brightness") { + sprite.effect.brightness = effectValue + sprite.effect.brightness; + } else if (effect == "transparency") { + sprite.effect.alpha = (sprite.effect.alpha - effectValue / 100) ; + } + sprite.applyFilter(); + return script.callReturn(); + } + }, + "change_effect_amount": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ Lang.Blocks.color, "color" ], + [ Lang.Blocks.brightness, "brightness" ], + [ Lang.Blocks.transparency, "transparency" ] + ], + "value": "color", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "100" ] + }, + null + ], + "type": "change_effect_amount" + }, + "paramsKeyMap": { + "EFFECT": 0, + "VALUE": 1 + }, + "class": "effect", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var effect = script.getField("EFFECT", script); + var effectValue = script.getNumberValue("VALUE", script); + if (effect == "color") { + sprite.effect.hsv = effectValue; + } else if (effect == "brightness") { + sprite.effect.brightness = effectValue; + } else if (effect == "transparency") { + sprite.effect.alpha = 1 - (effectValue / 100); + } + sprite.applyFilter(); + return script.callReturn(); + } + }, + "set_effect_amount": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.color, "color"], + [Lang.Blocks.brightness, "brightness"], + [Lang.Blocks.transparency, "transparency"] + ], + "value": "color", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "set_effect_amount" + }, + "paramsKeyMap": { + "EFFECT": 0, + "VALUE": 1 + }, + "class": "effect", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var effect = script.getField("EFFECT", script); + var effectValue = script.getNumberValue("VALUE", script); + if (effect == "color") { + sprite.effect.hue = effectValue + sprite.effect.hue; + } else if (effect == "brightness") { + sprite.effect.brightness = effectValue + sprite.effect.brightness; + } else if (effect == "transparency") { + sprite.effect.alpha = (sprite.effect.alpha - effectValue / 100) ; + } + sprite.applyFilter(); + return script.callReturn(); + } + }, + "set_entity_effect": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.color, "color"], + [Lang.Blocks.brightness, "brightness"], + [Lang.Blocks.transparency, "transparency"] + ], + "value": "color", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "100" ] + }, + null + ], + "type": "set_entity_effect" + }, + "paramsKeyMap": { + "EFFECT": 0, + "VALUE": 1 + }, + "class": "effect", + "isNotFor": [ "textBox" ], + "func": function (sprite, script) { + var effect = script.getField("EFFECT", script); + var effectValue = script.getNumberValue("VALUE", script); + if (effect == "color") { + sprite.effect.hue = effectValue; + } else if (effect == "brightness") { + sprite.effect.brightness = effectValue; + } else if (effect == "transparency") { + sprite.effect.alpha = 1 - (effectValue / 100); + } + sprite.applyFilter(); + return script.callReturn(); + } + }, + "change_object_index": { + "color": "#EC4466", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ Lang.Blocks.LOOKS_change_object_index_sub_1, "FRONT" ], + [ Lang.Blocks.LOOKS_change_object_index_sub_2, "FORWARD" ], + [ Lang.Blocks.LOOKS_change_object_index_sub_3, "BACKWARD" ], + [ Lang.Blocks.LOOKS_change_object_index_sub_4, "BACK" ] + ], + "value": "FRONT", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/looks_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "change_object_index" + }, + "paramsKeyMap": { + "LOCATION": 0 + }, + "class": "z-index", + "isNotFor": [], + "func": function (sprite, script) { + var targetIndex; + var location = script.getField("LOCATION", script); + var objects = Entry.container.getCurrentObjects(); + var currentIndex = objects.indexOf(sprite.parent); + var max = objects.length-1 + + if (currentIndex < 0) + throw new Error('object is not available for current scene'); + + switch (location) { + case 'FRONT': + targetIndex = 0; + break; + case 'FORWARD': + targetIndex = Math.max(0, currentIndex-1); + break; + case 'BACKWARD': + targetIndex = Math.min(max, currentIndex+1); + break; + case 'BACK': + targetIndex = max; + break; + + } + + Entry.container.moveElementByBlock(currentIndex, targetIndex); + return script.callReturn(); + } + }, + "move_direction": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "move_direction" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "walk", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE", script); + sprite.setX(sprite.getX() + value * Math.cos((sprite.getRotation() + sprite.getDirection() - 90) / 180 * Math.PI)); + sprite.setY(sprite.getY() - value * Math.sin((sprite.getRotation() + sprite.getDirection() - 90) / 180 * Math.PI)); + if (sprite.brush && !sprite.brush.stop) { + sprite.brush.lineTo(sprite.getX(), sprite.getY()*-1); + } + return script.callReturn(); + } + }, + "move_x": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "move_x" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "move_relative", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE", script); + sprite.setX(sprite.getX() + value); + if (sprite.brush && !sprite.brush.stop) { + sprite.brush.lineTo(sprite.getX(), sprite.getY()*-1); + } + return script.callReturn(); + } + }, + "move_y": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "move_y" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "move_relative", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE", script); + sprite.setY(sprite.getY() + value); + if (sprite.brush && !sprite.brush.stop) { + sprite.brush.lineTo(sprite.getX(), sprite.getY()*-1); + } + return script.callReturn(); + } + }, + "locate_xy_time": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "2" ] + }, + { + "type": "number", + "params": [ "10" ] + }, + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "locate_xy_time" + }, + "paramsKeyMap": { + "VALUE1": 0, + "VALUE2": 1, + "VALUE3": 2 + }, + "class": "move_absolute", + "isNotFor": [], + "func": function (sprite, script) { + if (!script.isStart) { + var timeValue; + timeValue = script.getNumberValue("VALUE1", script); + script.isStart = true; + script.frameCount = Math.floor(timeValue * Entry.FPS) + script.x = script.getNumberValue("VALUE2", script); + script.y = script.getNumberValue("VALUE3", script); + } + if (script.frameCount != 0) { + var dX = script.x - sprite.getX(); + var dY = script.y - sprite.getY(); + dX /= script.frameCount; + dY /= script.frameCount; + sprite.setX(sprite.getX() + dX); + sprite.setY(sprite.getY() + dY); + script.frameCount--; + if (sprite.brush && !sprite.brush.stop) { + sprite.brush.lineTo(sprite.getX(), sprite.getY()*-1); + } + return script; + } else { + delete script.isStart; + delete script.frameCount; + return script.callReturn(); + } + } + }, + "rotate_by_angle": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "90" ] + }, + null + ], + "type": "rotate_by_angle" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "rotate", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE", script); + sprite.setRotation(sprite.getRotation() + value); + return script.callReturn(); + } + }, + "rotate_by_angle_dropdown": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "45", "45" ], + [ "90", "90" ], + [ "135", "135" ], + [ "180", "180" ] + ], + "value": "45", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ "45", null ], + "type": "rotate_by_angle_dropdown" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "ebs", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getField("VALUE", script); + sprite.setRotation(sprite.getRotation() + Number(value)); + return script.callReturn(); + } + }, + "see_angle": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "90" ] + }, + null + ], + "type": "see_angle" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "rotate", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE", script); + sprite.setDirection(value); + return script.callReturn(); + } + }, + "see_direction": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "sprites", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ] + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "func": function (sprite, script) { + var targetId = script.getField("VALUE", script); + var targetEntity = Entry.container.getEntity(targetId); + var deltaX = targetEntity.getX() - sprite.getX(); + var deltaY = targetEntity.getY() - sprite.getY(); + if (deltaX>=0) { + sprite.setRotation(Math.atan(deltaY / deltaX) / Math.PI * 180 + 90); + } else { + sprite.setRotation(Math.atan(deltaY / deltaX) / Math.PI * 180 + 270); + } + return script.callReturn(); + } + }, + "locate_xy": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "0" ] + }, + null + ], + "type": "locate_xy" + }, + "paramsKeyMap": { + "VALUE1": 0, + "VALUE2": 1 + }, + "class": "move_absolute", + "isNotFor": [], + "func": function (sprite, script) { + var value1 = script.getNumberValue("VALUE1", script); + sprite.setX(value1); + var value2 = script.getNumberValue("VALUE2", script); + sprite.setY(value2); + if (sprite.brush && !sprite.brush.stop) { + sprite.brush.lineTo(sprite.getX(), sprite.getY()*-1); + } + return script.callReturn(); + } + }, + "locate_x": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "locate_x" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "move_absolute", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE", script); + sprite.setX(value); + if (sprite.brush && !sprite.brush.stop) { + sprite.brush.lineTo(sprite.getX(), sprite.getY()*-1); + } + return script.callReturn(); + } + }, + "locate_y": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "locate_y" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "move_absolute", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE", script); + //sprite.y = 340 - value; + sprite.setY(value); + if (sprite.brush && !sprite.brush.stop) { + sprite.brush.lineTo(sprite.getX(), sprite.getY()*-1); + } + return script.callReturn(); + } + }, + "locate": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "spritesWithMouse", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "locate" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "move_absolute", + "isNotFor": [], + "func": function (sprite, script) { + var targetId = script.getField("VALUE", script); + var x,y; + if (targetId == 'mouse') { + x = Entry.stage.mouseCoordinate.x; + y = Entry.stage.mouseCoordinate.y; + } else { + var targetEntity = Entry.container.getEntity(targetId); + x = targetEntity.getX(); + y = targetEntity.getY(); + } + sprite.setX(Number(x)); + sprite.setY(Number(y)); + if (sprite.brush && !sprite.brush.stop) { + sprite.brush.lineTo(x, y*-1); + } + return script.callReturn(); + } + }, + "move_xy_time": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "2" ] + }, + { + "type": "number", + "params": [ "10" ] + }, + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "move_xy_time" + }, + "paramsKeyMap": { + "VALUE1": 0, + "VALUE2": 1, + "VALUE3": 2 + }, + "class": "move_relative", + "isNotFor": [], + "func": function (sprite, script) { + if (!script.isStart) { + var timeValue; + timeValue = script.getNumberValue("VALUE1", script); + var xValue = script.getNumberValue("VALUE2", script); + var yValue = script.getNumberValue("VALUE3", script); + script.isStart = true; + script.frameCount = Math.floor(timeValue * Entry.FPS) + script.dX = xValue/script.frameCount; + script.dY = yValue/script.frameCount; + } + if (script.frameCount != 0) { + sprite.setX(sprite.getX() + script.dX); + sprite.setY(sprite.getY() + script.dY); + script.frameCount--; + if (sprite.brush && !sprite.brush.stop) { + sprite.brush.lineTo(sprite.getX(), sprite.getY()*-1); + } + return script; + } else { + delete script.isStart; + delete script.frameCount; + return script.callReturn(); + } + } + }, + "rotate_by_angle_time": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { "type": "Angle" }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "2" ] + }, + { + "type": "number", + "params": [ "2" ] + }, + null + ], + "type": "rotate_by_angle_time" + }, + "paramsKeyMap": { + "VALUE": 1 + }, + "class": "rotate", + "isNotFor": [], + "func": function (sprite, script) { + if (!script.isStart) { + var timeValue; + timeValue = script.getNumberValue("VALUE", script); + var angleValue = script.getNumberField("VALUE", script); + script.isStart = true; + script.frameCount = Math.floor(timeValue * Entry.FPS) + script.dAngle = angleValue/script.frameCount; + } + if (script.frameCount != 0) { + sprite.setRotation(sprite.getRotation() + script.dAngle); + script.frameCount--; + return script; + } else { + delete script.isStart; + delete script.frameCount; + return script.callReturn(); + } + } + }, + "bounce_wall": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "bounce_wall" + }, + "class": "walk", + "isNotFor": [], + "func": function (sprite, script) { + var threshold = 0; + + var method = sprite.parent.getRotateMethod(); + /* + var bound = sprite.object.getTransformedBounds(); + var size = {}; + size.width = bound.width * Math.sqrt(1.0 + (bound.height/bound.width) * (bound.height/bound.width)); + size.height = bound.height * Math.sqrt(1.0 + (bound.width/bound.height) * (bound.width/bound.height)); + */ + + if (method == 'free') + var angle = (sprite.getRotation() + sprite.getDirection()).mod(360); + else + var angle = sprite.getDirection(); + + var skip = Entry.Utils.COLLISION.NONE; + if ((angle < 90 && angle >= 0) || (angle < 360 && angle >= 270)) { + skip = (sprite.collision == Entry.Utils.COLLISION.UP); + var up = ndgmr.checkPixelCollision(Entry.stage.wall.up,sprite.object,threshold,false); + if (!up && skip) + sprite.collision = Entry.Utils.COLLISION.NONE; + + if (up && skip) + up = false; + + if (up) { + if (method == 'free') + sprite.setRotation(- sprite.getRotation() - sprite.getDirection() * 2 + 180); + else + sprite.setDirection(- sprite.getDirection() + 180); + + sprite.collision = Entry.Utils.COLLISION.UP; + //sprite.setY(135 - bound.height/2 - 1); + } else { + skip = (sprite.collision == Entry.Utils.COLLISION.DOWN); + var down = ndgmr.checkPixelCollision(Entry.stage.wall.down,sprite.object,threshold,false); + if (!down && skip) + sprite.collision = Entry.Utils.COLLISION.NONE; + + if (down && skip) + down = false; + + if (down) { + if (method == 'free') + sprite.setRotation(- sprite.getRotation() - sprite.getDirection() * 2 + 180); + else + sprite.setDirection(- sprite.getDirection() + 180); + + sprite.collision = Entry.Utils.COLLISION.DOWN; + //sprite.setY(-135 + bound.height/2 + 1); + } + + } + } else if (angle < 270 && angle >= 90) { + skip = (sprite.collision == Entry.Utils.COLLISION.DOWN); + var down = ndgmr.checkPixelCollision(Entry.stage.wall.down,sprite.object,threshold,false); + if (!down && skip) + sprite.collision = Entry.Utils.COLLISION.NONE; + + if (down && skip) + down = false; + + if (down) { + if (method == 'free') + sprite.setRotation(- sprite.getRotation() - sprite.getDirection() * 2 + 180); + else + sprite.setDirection(- sprite.getDirection() + 180); + + sprite.collision = Entry.Utils.COLLISION.DOWN; + //sprite.setY(-135 + bound.height/2 + 1); + } else { + skip = (sprite.collision == Entry.Utils.COLLISION.UP); + var up = ndgmr.checkPixelCollision(Entry.stage.wall.up,sprite.object,threshold,false); + if (!up && skip) + sprite.collision = Entry.Utils.COLLISION.NONE; + + if (up && skip) + up = false; + + if (up) { + if (method == 'free') + sprite.setRotation(- sprite.getRotation() - sprite.getDirection() * 2 + 180); + else + sprite.setDirection(- sprite.getDirection() + 180); + + sprite.collision = Entry.Utils.COLLISION.UP; + //sprite.setY(135 - bound.height/2 - 1); + } + } + } + if (angle < 360 && angle >= 180) { + skip = (sprite.collision == Entry.Utils.COLLISION.LEFT); + var left = ndgmr.checkPixelCollision(Entry.stage.wall.left,sprite.object,threshold,false); + if (!left && skip) + sprite.collision = Entry.Utils.COLLISION.NONE; + + if (left && skip) + left = false; + + if (left) { + if (method == 'free') + sprite.setRotation(- sprite.getRotation() - sprite.getDirection() * 2); + else + sprite.setDirection(- sprite.getDirection() + 360); + + sprite.collision = Entry.Utils.COLLISION.LEFT; + //sprite.setX(-240 + bound.width/2 + 1); + } else { + skip = (sprite.collision == Entry.Utils.COLLISION.RIGHT); + var right = ndgmr.checkPixelCollision(Entry.stage.wall.right,sprite.object,threshold,false); + if (!right && skip) + sprite.collision = Entry.Utils.COLLISION.NONE; + + if (right && skip) + right = false; + + if (right) { + if (method == 'free') + sprite.setRotation(- sprite.getRotation() - sprite.getDirection() * 2); + else + sprite.setDirection(- sprite.getDirection() + 360); + + sprite.collision = Entry.Utils.COLLISION.RIGHT; + //sprite.setX(240 - bound.width/2 - 1); + } + + } + } else if (angle < 180 && angle >= 0) { + skip = (sprite.collision == Entry.Utils.COLLISION.RIGHT); + var right = ndgmr.checkPixelCollision(Entry.stage.wall.right,sprite.object,threshold,false); + if (!right && skip) + sprite.collision = Entry.Utils.COLLISION.NONE; + + if (right && skip) + right = false; + + if (right) { + if (method == 'free') + sprite.setRotation(- sprite.getRotation() - sprite.getDirection() * 2); + else + sprite.setDirection(- sprite.getDirection() + 360); + + sprite.collision = Entry.Utils.COLLISION.RIGHT; + //sprite.setX(240 - bound.width/2 - 1); + } else { + skip = (sprite.collision == Entry.Utils.COLLISION.LEFT); + var left = ndgmr.checkPixelCollision(Entry.stage.wall.left,sprite.object,threshold,false); + if (!left && skip) + sprite.collision = Entry.Utils.COLLISION.NONE; + + if (left && skip) + left = false; + + if (left) { + if (method == 'free') + sprite.setRotation(- sprite.getRotation() - sprite.getDirection() * 2); + else + sprite.setDirection(- sprite.getDirection() + 360); + + sprite.collision = Entry.Utils.COLLISION.LEFT; + //sprite.setX(-240 + bound.width/2 + 1); + } + } + } + return script.callReturn(); + } + }, + "flip_arrow_horizontal": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "func": function (sprite, script) { + sprite.setDirection(sprite.getDirection() + 180); + return script.callReturn(); + } + }, + "flip_arrow_vertical": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "func": function (sprite, script) { + sprite.setDirection(sprite.getDirection() + 180); + return script.callReturn(); + } + }, + "see_angle_object": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "spritesWithMouse", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "see_angle_object" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "rotate_absolute", + "isNotFor": [], + "func": function (sprite, script) { + var targetId = script.getField("VALUE", script); + var spriteX = sprite.getX(); + var spriteY = sprite.getY(); + var deltaX, deltaY, value; + + if (sprite.parent.id == targetId) + return script.callReturn(); + + if ( targetId == 'mouse' ) { + var mX = Entry.stage.mouseCoordinate.x; + var mY = Entry.stage.mouseCoordinate.y; + + deltaX = mX - spriteX; + deltaY = mY - spriteY; + } else { + var targetEntity = Entry.container.getEntity(targetId); + deltaX = targetEntity.getX() - spriteX; + deltaY = targetEntity.getY() - spriteY; + } + + if(deltaX === 0 && deltaY === 0) { + value = sprite.getDirection() + sprite.getRotation(); + } else if ( deltaX >= 0 ) { + value = -Math.atan(deltaY / deltaX) / Math.PI * 180 + 90; + } else { + value = -Math.atan(deltaY / deltaX) / Math.PI * 180 + 270; + } + var nativeDirection = sprite.getDirection() + sprite.getRotation(); + sprite.setRotation(sprite.getRotation() + value - nativeDirection); + return script.callReturn(); + } + }, + "see_angle_direction": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "90" ] + }, + null + ], + "type": "see_angle_direction" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "rotate", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE", script); + var nativeDirection = sprite.getDirection() + sprite.getRotation(); + sprite.setRotation(sprite.getRotation() + value - nativeDirection); + return script.callReturn(); + } + }, + "rotate_direction": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "90" ] + }, + null + ], + "type": "rotate_direction" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "rotate", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE", script); + sprite.setDirection(value + sprite.getDirection()); + return script.callReturn(); + } + }, + "locate_object_time": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "DropdownDynamic", + "value": null, + "menuName": "spritesWithMouse", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "2" ] + }, + null, + null + ], + "type": "locate_object_time" + }, + "paramsKeyMap": { + "VALUE": 0, + "TARGET": 1 + }, + "class": "move_absolute", + "isNotFor": [], + "func": function (sprite, script) { + if (!script.isStart) { + var timeValue, xValue, yValue; + var targetId = script.getField("TARGET", script); + timeValue = script.getNumberValue("VALUE", script); + var frameCount = Math.floor(timeValue * Entry.FPS); + var mouseCoordi = Entry.stage.mouseCoordinate; + + if (frameCount != 0) { + if (targetId == 'mouse') { + xValue = mouseCoordi.x - sprite.getX(); + yValue = mouseCoordi.y - sprite.getY(); + } else { + var targetEntity = Entry.container.getEntity(targetId); + xValue = targetEntity.getX() - sprite.getX(); + yValue = targetEntity.getY() - sprite.getY(); + } + script.isStart = true; + script.frameCount = frameCount; + script.dX = xValue/script.frameCount; + script.dY = yValue/script.frameCount; + } else { + //frame count is zero so execute immediately + if (targetId == 'mouse') { + xValue = Number(mouseCoordi.x); + yValue = Number(mouseCoordi.y); + } else { + var targetEntity = Entry.container.getEntity(targetId); + xValue = targetEntity.getX(); + yValue = targetEntity.getY(); + } + sprite.setX(xValue); + sprite.setY(yValue); + if (sprite.brush && !sprite.brush.stop) { + sprite.brush.lineTo(sprite.getX(), sprite.getY()*-1); + } + return script.callReturn(); + } + } + if (script.frameCount != 0) { + sprite.setX(sprite.getX() + script.dX); + sprite.setY(sprite.getY() + script.dY); + script.frameCount--; + if (sprite.brush && !sprite.brush.stop) + sprite.brush.lineTo(sprite.getX(), sprite.getY()*-1); + return script; + } else { + delete script.isStart; + delete script.frameCount; + return script.callReturn(); + } + } + }, + "rotate_absolute": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { "type": "angle" }, + null + ], + "type": "rotate_absolute" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "rotate_absolute", + "isNotFor": [], + "func": function (entity, script) { + var value = script.getNumberValue("VALUE", script); + entity.setRotation(value); + return script.callReturn(); + } + }, + "rotate_relative": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { "type": "angle" }, + null + ], + "type": "rotate_relative" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "rotate", + "isNotFor": [], + "func": function (entity, script) { + var value = script.getNumberValue("VALUE", script); + entity.setRotation(value + entity.getRotation()); + return script.callReturn(); + } + }, + "direction_absolute": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { "type": "angle" }, + null + ], + "type": "direction_absolute" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "rotate_absolute", + "isNotFor": [], + "func": function (entity, script) { + var value = script.getNumberValue("VALUE", script); + entity.setDirection(value); + return script.callReturn(); + } + }, + "direction_relative": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { "type": "angle" }, + null + ], + "type": "direction_relative" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "rotate", + "isNotFor": [], + "func": function (entity, script) { + var value = script.getNumberValue("VALUE", script); + entity.setDirection(value + entity.getDirection()); + return script.callReturn(); + } + }, + "move_to_angle": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { "type": "angle" }, + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "move_to_angle" + }, + "paramsKeyMap": { + "ANGLE": 0, + "VALUE": 1 + }, + "class": "move_rotate", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE", script); + var angle = script.getNumberValue("ANGLE", script); + sprite.setX(sprite.getX() + value * Math.cos((angle - 90) / 180 * Math.PI)); + sprite.setY(sprite.getY() - value * Math.sin((angle - 90) / 180 * Math.PI)); + if (sprite.brush && !sprite.brush.stop) { + sprite.brush.lineTo(sprite.getX(), sprite.getY()*-1); + } + return script.callReturn(); + } + }, + "rotate_by_time": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "2" ] + }, + { + "type": "angle" + }, + null + ], + "type": "rotate_by_time" + }, + "paramsKeyMap": { + "VALUE": 0, + "ANGLE": 1 + }, + "class": "rotate", + "isNotFor": [], + "func": function (sprite, script) { + if (!script.isStart) { + var timeValue; + timeValue = script.getNumberValue("VALUE", script); + var angleValue = script.getNumberValue("ANGLE", script); + script.isStart = true; + script.frameCount = Math.floor(timeValue * Entry.FPS) + script.dAngle = angleValue/script.frameCount; + } + if (script.frameCount != 0) { + sprite.setRotation(sprite.getRotation() + script.dAngle); + script.frameCount--; + return script; + } else { + delete script.isStart; + delete script.frameCount; + return script.callReturn(); + } + } + }, + "direction_relative_duration": { + "color": "#A751E3", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/moving_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "2" ] + }, + { "type": "angle" }, + null + ], + "type": "direction_relative_duration" + }, + "paramsKeyMap": { + "DURATION": 0, + "AMOUNT": 1 + }, + "class": "rotate", + "isNotFor": [], + "func": function (sprite, script) { + if (!script.isStart) { + var timeValue; + timeValue = script.getNumberValue("DURATION", script); + var directionValue = script.getNumberValue("AMOUNT", script); + script.isStart = true; + script.frameCount = Math.floor(timeValue * Entry.FPS) + script.dDirection = directionValue/script.frameCount; + } + if (script.frameCount != 0) { + sprite.setDirection(sprite.getDirection() + script.dDirection); + script.frameCount--; + return script; + } else { + delete script.isStart; + delete script.frameCount; + delete script.dDirection; + return script.callReturn(); + } + } + }, + "neobot_sensor_value": { + "color": "#00979D", + "skeleton": "basic_string_field", + "fontColor": "#fff", + "statements": [], + "template": "%1 값", + "params": [{ + "type": "Dropdown", + "options": [ + ["1번 포트", "IN1"], + ["2번 포트", "IN2"], + ["3번 포트", "IN3"], + ["리모컨", "IR"], + ["배터리", "BAT"] + ], + "value": "IN1", + "fontSize": 11 + }], + "events": {}, + "def": { + "params": [null], + "type": "neobot_sensor_value", + "id": "k9wp" + }, + "paramsKeyMap": { + "PORT": 0 + }, + "class": "neobot_value", + "isNotFor": ["neobot"], + "func": function (sprite, script) { + var port = script.getStringField('PORT'); + return Entry.hw.portData[port]; + } + }, + "neobot_left_motor": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "template": "왼쪽모터를 %1 %2 의 속도로 회전 %3", + "params": [{ + "type": "Dropdown", + "options": [ + ["앞으로", "16"], + ["뒤로", "32"] + ], + "value": "16", + "fontSize": 11 + }, { + "type": "Dropdown", + "options": [ + ["0", "0"], + ["1", "1"], + ["2", "2"], + ["3", "3"], + ["4", "4"], + ["5", "5"], + ["6", "6"], + ["7", "7"], + ["8", "8"], + ["9", "9"], + ["10", "10"], + ["11", "11"], + ["12", "12"], + ["13", "13"], + ["14", "14"], + ["15", "15"] + ], + "value": "0", + "fontSize": 11 + }, { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + }], + "events": {}, + "def": { + "params": [null, "15", null], + "type": "neobot_left_motor", + "id": "wguy" + }, + "paramsKeyMap": { + "DIRECTION": 0, + "SPEED": 1 + }, + "class": "neobot_motor", + "isNotFor": ["neobot"], + "func": function (sprite, script) { + var speed = script.getNumberField('SPEED'); + var direction = script.getNumberField('DIRECTION'); + Entry.hw.sendQueue['DCL'] = speed + direction; + return script.callReturn(); + } + }, + "neobot_stop_left_motor": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "template": "왼쪽모터 정지 %1", + "params": [{ + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + }], + "events": {}, + "def": { + "params": [null], + "type": "neobot_stop_left_motor", + "id": "bq9n" + }, + "class": "neobot_motor", + "isNotFor": ["neobot"], + "func": function (sprite, script) { + Entry.hw.sendQueue['DCL'] = 0; + return script.callReturn(); + } + }, + "neobot_right_motor": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "template": "오른쪽모터를 %1 %2 의 속도로 회전 %3", + "params": [{ + "type": "Dropdown", + "options": [ + ["앞으로", "16"], + ["뒤로", "32"] + ], + "value": "16", + "fontSize": 11 + }, { + "type": "Dropdown", + "options": [ + ["0", "0"], + ["1", "1"], + ["2", "2"], + ["3", "3"], + ["4", "4"], + ["5", "5"], + ["6", "6"], + ["7", "7"], + ["8", "8"], + ["9", "9"], + ["10", "10"], + ["11", "11"], + ["12", "12"], + ["13", "13"], + ["14", "14"], + ["15", "15"] + ], + "value": "0", + "fontSize": 11 + }, { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + }], + "events": {}, + "def": { + "params": [null, "15", null], + "type": "neobot_right_motor", + "id": "g15e" + }, + "paramsKeyMap": { + "DIRECTION": 0, + "SPEED": 1 + }, + "class": "neobot_motor", + "isNotFor": ["neobot"], + "func": function (sprite, script) { + var speed = script.getNumberField('SPEED'); + var direction = script.getNumberField('DIRECTION'); + Entry.hw.sendQueue['DCR'] = speed + direction; + return script.callReturn(); + } + }, + "neobot_stop_right_motor": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "template": "오른쪽모터 정지 %1", + "params": [{ + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + }], + "events": {}, + "def": { + "params": [null], + "type": "neobot_stop_right_motor", + "id": "rkgh" + }, + "class": "neobot_motor", + "isNotFor": ["neobot"], + "func": function (sprite, script) { + Entry.hw.sendQueue['DCR'] = 0; + return script.callReturn(); + } + }, + "neobot_all_motor": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "template": "양쪽 모터를 %1 의 속도로 %2", + "params": [ + { + "type": "Dropdown", + "options": [ + [ "양쪽", "1" ], + [ "왼쪽", "2" ], + [ "오른쪽", "3" ] + ], + "value": "1", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Dropdown", + "options": [ + [ "느리게", "1" ], + [ "보통", "2" ], + [ "빠르게", "3" ] + ], + "value": "1", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [ "전진", "1" ], + [ "후진", "2" ], + [ "좌회전", "3" ], + [ "우회전", "4" ] + ], + "value": "1", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": ["15", null, null], + "type": "neobot_all_motor", + "id": "kxpn" + }, + "paramsKeyMap": { + "SPEED": 0, + "DIRECTION": 1 + }, + "class": "neobot_motor", + "isNotFor": ["neobot"], + "func": function (sprite, script) { + var type = script.getNumberField('TYPE'); + var speed = script.getNumberField('SPEED'); + var direction = script.getNumberField('DIRECTION'); + switch (direction) { + case 1: + Entry.hw.sendQueue['DCL'] = 0x10 + speed; + Entry.hw.sendQueue['DCR'] = 0x10 + speed; + break; + case 2: + Entry.hw.sendQueue['DCL'] = 0x20 + speed; + Entry.hw.sendQueue['DCR'] = 0x20 + speed; + break; + case 3: + Entry.hw.sendQueue['DCL'] = 0x20 + speed; + Entry.hw.sendQueue['DCR'] = 0x10 + speed; + break; + case 4: + Entry.hw.sendQueue['DCL'] = 0x10 + speed; + Entry.hw.sendQueue['DCR'] = 0x20 + speed; + break; + case 5: + Entry.hw.sendQueue['DCL'] = 0; + Entry.hw.sendQueue['DCR'] = 0x10 + speed; + break; + case 6: + Entry.hw.sendQueue['DCL'] = 0x10 + speed; + Entry.hw.sendQueue['DCR'] = 0; + break; + } + return script.callReturn(); + } + }, + "neobot_set_servo": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "template": "%1 포트의 서보모터를 %2 이동 %3", + "params": [{ + "type": "Dropdown", + "options": [ + ["OUT1", "1"], + ["OUT2", "2"], + ["OUT3", "3"] + ], + "value": "1", + "fontSize": 11 + }, { + "type": "Dropdown", + "options": [ + ["0도", "0"], + ["10도", "10"], + ["20도", "20"], + ["30도", "30"], + ["40도", "40"], + ["50도", "50"], + ["60도", "60"], + ["70도", "70"], + ["80도", "80"], + ["90도", "90"], + ["100도", "100"], + ["110도", "110"], + ["120도", "120"], + ["130도", "130"], + ["140도", "140"], + ["150도", "150"], + ["160도", "160"], + ["170도", "170"], + ["180도", "180"] + ], + "value": "0", + "fontSize": 11 + }, { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + }], + "events": {}, + "def": { + "params": [null, null, null], + "type": "neobot_set_servo", + "id": "eokl" + }, + "paramsKeyMap": { + "PORT": 0, + "DEGREE": 1 + }, + "class": "neobot_output", + "isNotFor": ["neobot"], + "func": function (sprite, script) { + var port = script.getNumberField('PORT'); + var degree = script.getNumberField('DEGREE'); + Entry.hw.sendQueue['OUT' + port] = degree; + var option = port; + if(option === 3) { + option = 4; + } + Entry.hw.sendQueue['OPT'] = Entry.hw.sendQueue['OPT'] | option; + return script.callReturn(); + } + }, + "neobot_set_output": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "template": "%1 번 포트의 값을 %2 만큼 출력 %3", + "params": [{ + "type": "Dropdown", + "options": [ + ["OUT1", "1"], + ["OUT2", "2"], + ["OUT3", "3"] + ], + "value": "1", + "fontSize": 11 + }, { + "type": "Block", + "accept": "string" + }, { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + }], + "events": {}, + "def": { + "params": [null, { + "type": "number", + "params": ["255"], + "id": "dg6t" + }, null], + "type": "neobot_set_output", + "id": "au77" + }, + "paramsKeyMap": { + "PORT": 0, + "VALUE": 1 + }, + "class": "neobot_output", + "isNotFor": ["neobot"], + "func": function (sprite, script) { + var port = script.getStringField('PORT', script); + var value = script.getNumberValue('VALUE', script); + var option = port; + if(value < 0) { + value = 0; + } else if (value > 255) { + value = 255; + } + if(option === 3) { + option = 4; + } + Entry.hw.sendQueue['OUT' + port] = value; + Entry.hw.sendQueue['OPT'] = Entry.hw.sendQueue['OPT'] & (~option); + return script.callReturn(); + } + }, + "neobot_set_fnd": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "template": "FND에 %1 출력 %2", + "params": [{ + "type": "Block", + "accept": "string" + }, { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + }], + "events": {}, + "def": { + "params": [{ + "type": "number", + "params": ["0"], + "id": "4z3f" + }, null], + "type": "neobot_set_fnd", + "id": "oj82" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "neobot_output", + "isNotFor": ["neobot"], + "func": function (sprite, script) { + var value = script.getNumberValue('VALUE', script); + if(value > 255) { + value = 255; + } else if(value < 0) { + value = 0; + } + Entry.hw.sendQueue['FND'] = value; + return script.callReturn(); + } + }, + "neobot_play_note_for": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "template": "멜로디 %1 을(를) %2 옥타브로 %3 길이만큼 소리내기 %4", + "params": [{ + "type": "Dropdown", + "options": [ + ["무음", "0"], + ["도", "1"], + ["도#", "2"], + ["레", "3"], + ["레#", "4"], + ["미", "5"], + ["파", "6"], + ["파#", "7"], + ["솔", "8"], + ["솔#", "9"], + ["라", "10"], + ["라#", "11"], + ["시", "12"] + ], + "value": "0", + "fontSize": 11 + }, { + "type": "Dropdown", + "options": [ + ["1", "0"], + ["2", "1"], + ["3", "2"], + ["4", "3"], + ["5", "4"], + ["6", "5"] + ], + "value": "0", + "fontSize": 11 + }, { + "type": "Dropdown", + "options": [ + ["2분음표", "2"], + ["4분음표", "4"], + ["8분음표", "8"], + ["16분음표", "16"] + ], + "value": "2", + "fontSize": 11 + }, { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + }], + "events": {}, + "def": { + "params": ["1", "2", "4", null], + "type": "neobot_play_note_for", + "id": "ldg8" + }, + "paramsKeyMap": { + "NOTE": 0, + "OCTAVE": 1, + "DURATION": 2 + }, + "class": "neobot_note", + "isNotFor": ["neobot"], + "func": function (sprite, script) { + var sq = Entry.hw.sendQueue; + + if (!script.isStart) { + var note = script.getNumberField("NOTE", script); + var octave = script.getNumberField("OCTAVE", script); + var duration = script.getNumberField("DURATION", script); + var value = note + (12 * octave); + + script.isStart = true; + script.timeFlag = 1; + if(value > 65) { + value = 65; + } + sq.SND = value; + setTimeout(function() { + script.timeFlag = 0; + }, 1 / duration * 2000); + return script; + } else if (script.timeFlag == 1) { + return script; + } else { + delete script.timeFlag; + delete script.isStart; + Entry.hw.sendQueue['SND'] = 0; + Entry.engine.isContinue = false; + return script.callReturn(); + } + + } + }, + "robotis_openCM70_cm_custom_value": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Dropdown", + "options": [ + [ "BYTE", "BYTE" ], + [ "WORD", "WORD" ], + [ "DWORD", "DWORD" ] + ], + "value": "BYTE", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "0" ] + }, + null + ], + "type": "robotis_openCM70_cm_custom_value" + }, + "paramsKeyMap": { + "VALUE": 0, + "SIZE": 1 + }, + "class": "robotis_openCM70_custom", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.READ; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + var data_default_address = 0; + var data_default_length = 0; + + var size = script.getStringField("SIZE"); + + if (size == 'BYTE') { + data_length = 1; + } else if (size == 'WORD') { + data_length = 2; + } else if (size == 'DWORD') { + data_length = 4; + } + + data_address = script.getNumberValue('VALUE'); + + data_default_address = data_address; + data_default_length = data_length; + + Entry.Robotis_carCont.setRobotisData([[data_instruction, data_address, data_length, data_value, data_default_length]]); + // Entry.hw.socket.send(JSON.stringify(Entry.hw.sendQueue)); + Entry.Robotis_carCont.update(); + + return Entry.hw.portData[data_default_address]; + } + }, + "robotis_openCM70_sensor_value": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ Lang.Blocks.robotis_cm_sound_detected, "CM_SOUND_DETECTED" ], + [ Lang.Blocks.robotis_cm_sound_detecting, "CM_SOUND_DETECTING" ], + [ Lang.Blocks.robotis_cm_user_button, "CM_USER_BUTTON" ] + ], + "value": "CM_SOUND_DETECTED", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "robotis_openCM70_sensor_value" + }, + "paramsKeyMap": { + "SENSOR": 0 + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.READ; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + var data_default_address = 0; + var data_default_length = 0; + + var sensor = script.getStringField("SENSOR"); + + var increase = 0; + + if (sensor == 'CM_SOUND_DETECTED') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[1]; + } else if (sensor == 'CM_SOUND_DETECTING') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTING[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTING[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTING[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTING[1]; + } else if (sensor == 'CM_USER_BUTTON') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_USER_BUTTON[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_USER_BUTTON[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_USER_BUTTON[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_USER_BUTTON[1]; + } + + data_default_address = data_default_address + increase * data_default_length; + + Entry.Robotis_carCont.setRobotisData([[data_instruction, data_address, data_length, data_value, data_default_length]]); + // Entry.hw.socket.send(JSON.stringify(Entry.hw.sendQueue)); + Entry.Robotis_carCont.update(); + + return Entry.hw.portData[data_default_address]; + } + }, + "robotis_openCM70_aux_sensor_value": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "3", "PORT_3" ], + [ "4", "PORT_4" ], + [ "5", "PORT_5" ], + [ "6", "PORT_6" ] + ], + "value": "PORT_3", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [ Lang.Blocks.robotis_aux_servo_position, "AUX_SERVO_POSITION" ], + [ Lang.Blocks.robotis_aux_ir, "AUX_IR" ], + [ Lang.Blocks.robotis_aux_touch, "AUX_TOUCH" ], + [ Lang.Blocks.robotis_aux_brightness, "AUX_BRIGHTNESS" ], + [ Lang.Blocks.robotis_aux_hydro_themo_humidity, "AUX_HYDRO_THEMO_HUMIDITY" ], + [ Lang.Blocks.robotis_aux_hydro_themo_temper, "AUX_HYDRO_THEMO_TEMPER" ], + [ Lang.Blocks.robotis_aux_temperature, "AUX_TEMPERATURE" ], + [ Lang.Blocks.robotis_aux_ultrasonic, "AUX_ULTRASONIC" ], + [ Lang.Blocks.robotis_aux_magnetic, "AUX_MAGNETIC" ], + [ Lang.Blocks.robotis_aux_motion_detection, "AUX_MOTION_DETECTION" ], + [ Lang.Blocks.robotis_aux_color, "AUX_COLOR" ], + [ Lang.Blocks.robotis_aux_custom, "AUX_CUSTOM" ] + ], + "value": "AUX_SERVO_POSITION", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "robotis_openCM70_aux_sensor_value" + }, + "paramsKeyMap": { + "PORT": 0, + "SENSOR": 1 + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.READ; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + var data_default_address = 0; + var data_default_length = 0; + + var port = script.getStringField("PORT"); + var sensor = script.getStringField("SENSOR"); + + var increase = 0; + if (port == 'PORT_3') { + increase = 2; + } else if (port == 'PORT_4') { + increase = 3; + } else if (port == 'PORT_5') { + increase = 4; + } else if (port == 'PORT_6') { + increase = 5; + } + + if (sensor == 'AUX_SERVO_POSITION') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[1]; + } else if (sensor == 'AUX_IR') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_IR[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_IR[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_IR[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_IR[1]; + } else if (sensor == 'AUX_TOUCH') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TOUCH[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TOUCH[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TOUCH[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TOUCH[1]; + } else if (sensor == 'AUX_TEMPERATURE') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TEMPERATURE[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TEMPERATURE[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TEMPERATURE[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_TEMPERATURE[1]; + } else if (sensor == 'AUX_BRIGHTNESS') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_BRIGHTNESS[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_BRIGHTNESS[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_BRIGHTNESS[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_BRIGHTNESS[1]; + } else if (sensor == 'AUX_HYDRO_THEMO_HUMIDITY') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_HYDRO_THEMO_HUMIDITY[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_HYDRO_THEMO_HUMIDITY[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_HYDRO_THEMO_HUMIDITY[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_HYDRO_THEMO_HUMIDITY[1]; + } else if (sensor == 'AUX_HYDRO_THEMO_TEMPER') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_HYDRO_THEMO_TEMPER[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_HYDRO_THEMO_TEMPER[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_HYDRO_THEMO_TEMPER[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_HYDRO_THEMO_TEMPER[1]; + } else if (sensor == 'AUX_ULTRASONIC') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_ULTRASONIC[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_ULTRASONIC[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_ULTRASONIC[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_ULTRASONIC[1]; + } else if (sensor == 'AUX_MAGNETIC') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MAGNETIC[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MAGNETIC[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MAGNETIC[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MAGNETIC[1]; + } else if (sensor == 'AUX_MOTION_DETECTION') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MOTION_DETECTION[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MOTION_DETECTION[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MOTION_DETECTION[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MOTION_DETECTION[1]; + } else if (sensor == 'AUX_COLOR') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_COLOR[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_COLOR[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_COLOR[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_COLOR[1]; + } else if (sensor == 'AUX_CUSTOM') { + data_default_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[0]; + data_default_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[1]; + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[1]; + } + + data_default_address = data_default_address + increase * data_default_length; + if (increase != 0) { + data_length = 6 * data_default_length; + } + + Entry.Robotis_carCont.setRobotisData([[data_instruction, data_address, data_length, data_value, data_default_length]]); + // Entry.hw.socket.send(JSON.stringify(Entry.hw.sendQueue)); + Entry.Robotis_carCont.update(); + + return Entry.hw.portData[data_default_address]; + } + }, + "robotis_openCM70_cm_buzzer_index": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.note_a + '(0)',"0"], + [Lang.General.note_a + '#(1)',"1"], + [Lang.General.note_b + '(2)',"2"], + [Lang.General.note_c + '(3)',"3"], + [Lang.General.note_c + '#(4)',"4"], + [Lang.General.note_d + '(5)',"5"], + [Lang.General.note_d + '#(6)',"6"], + [Lang.General.note_e + '(7)',"7"], + [Lang.General.note_f + '(8)',"8"], + [Lang.General.note_f + '#(9)',"9"], + [Lang.General.note_g + '(10)',"10"], + [Lang.General.note_g + '#(11)',"11"], + [Lang.General.note_a + '(12)',"12"], + [Lang.General.note_a + '#(13)',"13"], + [Lang.General.note_b + '(14)',"14"], + [Lang.General.note_c + '(15)',"15"], + [Lang.General.note_c + '#(16)',"16"], + [Lang.General.note_d + '(17)',"17"], + [Lang.General.note_d + '#(18)',"18"], + [Lang.General.note_e + '(19)',"19"], + [Lang.General.note_f + '(20)',"20"], + [Lang.General.note_f + '#(21)',"21"], + [Lang.General.note_g + '(22)',"22"], + [Lang.General.note_g + '#(23)',"23"], + [Lang.General.note_a + '(24)',"24"], + [Lang.General.note_a + '#(25)',"25"], + [Lang.General.note_b + '(26)',"26"], + [Lang.General.note_c + '(27)',"27"], + [Lang.General.note_c + '#(28)',"28"], + [Lang.General.note_d + '(29)',"29"], + [Lang.General.note_d + '#(30)',"30"], + [Lang.General.note_e + '(31)',"31"], + [Lang.General.note_f + '(32)',"32"], + [Lang.General.note_f + '#(33)',"33"], + [Lang.General.note_g + '(34)',"34"], + [Lang.General.note_g + '#(35)',"35"], + [Lang.General.note_a + '(36)',"36"], + [Lang.General.note_a + '#(37)',"37"], + [Lang.General.note_b + '(38)',"38"], + [Lang.General.note_c + '(39)',"39"], + [Lang.General.note_c + '#(40)',"40"], + [Lang.General.note_d + '(41)',"41"], + [Lang.General.note_d + '#(42)',"42"], + [Lang.General.note_e + '(43)',"43"], + [Lang.General.note_f + '(44)',"44"], + [Lang.General.note_f + '#(45)',"45"], + [Lang.General.note_g + '(46)',"46"], + [Lang.General.note_g + '#(47)',"47"], + [Lang.General.note_a + '(48)',"48"], + [Lang.General.note_a + '#(49)',"49"], + [Lang.General.note_b + '(50)',"50"], + [Lang.General.note_c + '(51)',"51"] + ], + "value": "0", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "1" ] + }, + null + ], + "type": "robotis_openCM70_cm_buzzer_index" + }, + "paramsKeyMap": { + "CM_BUZZER_INDEX": 0, + "CM_BUZZER_TIME": 1 + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var cmBuzzerIndex = script.getField("CM_BUZZER_INDEX", script); + var cmBuzzerTime = script.getNumberValue("CM_BUZZER_TIME", script); + + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; + var data_address_1 = 0; + var data_length_1 = 0; + var data_value_1 = 0; + var data_address_2 = 0; + var data_length_2 = 0; + var data_value_2 = 0; + + data_address_1 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[0]; + data_length_1 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[1]; + // data_value_1 = cmBuzzerTime * 10; + // TODO 텍스트 입력으로 바꾸고 최대는 5초 : 0.5 초 하려면 5를 입력 - console.log(parseInt(0.59 * 10)); max 는 5초 + data_value_1 = parseInt(cmBuzzerTime * 10); + if (data_value_1 > 50) { + data_value_1 = 50; + } + + data_address_2 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[0]; + data_length_2 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[1]; + data_value_2 = cmBuzzerIndex; + + var data_sendqueue = [[data_instruction, data_address_1, data_length_1, data_value_1], [data_instruction, data_address_2, data_length_2, data_value_2]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, cmBuzzerTime * 1000); + } + }, + "robotis_openCM70_cm_buzzer_melody": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "0", "0" ], + [ "1", "1" ], + [ "2", "2" ], + [ "3", "3" ], + [ "4", "4" ], + [ "5", "5" ], + [ "6", "6" ], + [ "7", "7" ], + [ "8", "8" ], + [ "9", "9" ], + [ "10", "10" ], + [ "11", "11" ], + [ "12", "12" ], + [ "13", "13" ], + [ "14", "14" ], + [ "15", "15" ], + [ "16", "16" ], + [ "17", "17" ], + [ "18", "18" ], + [ "19", "19" ], + [ "20", "20" ], + [ "21", "21" ], + [ "22", "22" ], + [ "23", "23" ], + [ "24", "24" ] + ], + "value": "0", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "robotis_openCM70_cm_buzzer_melody" + }, + "paramsKeyMap": { + "CM_BUZZER_MELODY": 0 + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var cmBuzzerMelody = script.getField("CM_BUZZER_MELODY", script); + + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; + var data_address_1 = 0; + var data_length_1 = 0; + var data_value_1 = 0; + var data_address_2 = 0; + var data_length_2 = 0; + var data_value_2 = 0; + + data_address_1 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[0]; + data_length_1 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_TIME[1]; + data_value_1 = 255; + + data_address_2 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[0]; + data_length_2 = Entry.Robotis_openCM70.CONTROL_TABLE.CM_BUZZER_INDEX[1]; + data_value_2 = cmBuzzerMelody; + + var data_sendqueue = [[data_instruction, data_address_1, data_length_1, data_value_1], [data_instruction, data_address_2, data_length_2, data_value_2]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, 1000); + } + }, + "robotis_openCM70_cm_sound_detected_clear": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "robotis_openCM70_cm_sound_detected_clear" + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_SOUND_DETECTED[1]; + data_value = 0; + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); + } + }, + "robotis_openCM70_cm_led": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_red_color,"CM_LED_R"], + [Lang.Blocks.robotis_common_green_color,"CM_LED_G"], + [Lang.Blocks.robotis_common_blue_color,"CM_LED_B"], + ], + "value": "CM_LED_R", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_on,"1"], + [Lang.Blocks.robotis_common_off,"0"] + ], + "value": "1", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "robotis_openCM70_cm_led" + }, + "paramsKeyMap": { + "CM_LED": 0, + "VALUE": 1 + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var cmLed = script.getField("CM_LED", script); + var value = script.getField("VALUE", script); + + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + if (cmLed == 'CM_LED_R') { + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_R[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_R[1]; + } else if (cmLed == 'CM_LED_G') { + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_G[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_G[1]; + } else if (cmLed == 'CM_LED_B') { + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_B[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_LED_B[1]; + } + + data_value = value; + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); + } + }, + "robotis_openCM70_cm_motion": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "1" ] + }, + null + ], + "type": "robotis_openCM70_cm_motion" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.CM_MOTION[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.CM_MOTION[1]; + data_value = script.getNumberValue("VALUE", script); + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); + } + }, + "robotis_openCM70_aux_motor_speed": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_port_1,"1"], + [Lang.Blocks.robotis_common_port_2,"2"] + ], + "value": "1", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_clockwhise,"CW"], + [Lang.Blocks.robotis_common_counter_clockwhise,"CCW"] + ], + "value": "CW", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + null, + { + "type": "number", + "params": [ "500" ] + }, + null + ], + "type": "robotis_openCM70_aux_motor_speed" + }, + "paramsKeyMap": { + "PORT": 0, + "DIRECTION_ANGLE": 1, + "VALUE": 2 + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var port = script.getField("PORT", script); + var directionAngle = script.getField("DIRECTION_ANGLE", script); + var value = script.getNumberValue('VALUE'); + + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MOTOR_SPEED[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_MOTOR_SPEED[1]; + + data_address = data_address + (port - 1) * data_length; + + if (directionAngle == 'CW') { + value = value + 1024; + if (value > 2047) { + value = 2047; + } + } else { + if (value > 1023) { + value = 1023; + } + } + + data_value = value; + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); + } + }, + "robotis_openCM70_aux_servo_mode": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_port_3,"3"], + [Lang.Blocks.robotis_common_port_4,"4"], + [Lang.Blocks.robotis_common_port_5,"5"], + [Lang.Blocks.robotis_common_port_6,"6"] + ], + "value": "3", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_wheel_mode,"0"], + [Lang.Blocks.robotis_common_joint_mode,"1"] + ], + "value": "0", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "robotis_openCM70_aux_servo_mode" + }, + "paramsKeyMap": { + "PORT": 0, + "MODE": 1 + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var port = script.getField("PORT", script); + var mode = script.getField("MODE", script); + + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_MODE[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_MODE[1]; + + data_address = data_address + (port - 1) * data_length; + data_value = mode; + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); + } + }, + "robotis_openCM70_aux_servo_speed": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_port_3,"3"], + [Lang.Blocks.robotis_common_port_4,"4"], + [Lang.Blocks.robotis_common_port_5,"5"], + [Lang.Blocks.robotis_common_port_6,"6"] + ], + "value": "3", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_clockwhise,"CW"], + [Lang.Blocks.robotis_common_counter_clockwhise,"CCW"] + ], + "value": "CW", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + null, + { + "type": "number", + "params": [ "500" ] + }, + null + ], + "type": "robotis_openCM70_aux_servo_speed" + }, + "paramsKeyMap": { + "PORT": 0, + "DIRECTION_ANGLE": 1, + "VALUE": 2 + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var port = script.getField("PORT", script); + var directionAngle = script.getField("DIRECTION_ANGLE", script); + var value = script.getNumberValue('VALUE'); + + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_SPEED[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_SPEED[1]; + + data_address = data_address + (port - 1) * data_length; + + if (directionAngle == 'CW') { + value = value + 1024; + if (value > 2047) { + value = 2047; + } + } else { + if (value > 1023) { + value = 1023; + } + } + + data_value = value; + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); + } + }, + "robotis_openCM70_aux_servo_position": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_port_3,"3"], + [Lang.Blocks.robotis_common_port_4,"4"], + [Lang.Blocks.robotis_common_port_5,"5"], + [Lang.Blocks.robotis_common_port_6,"6"] + ], + "value": "3", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "512" ] + }, + null + ], + "type": "robotis_openCM70_aux_servo_position" + }, + "paramsKeyMap": { + "PORT": 0, + "VALUE": 1 + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var port = script.getField("PORT", script); + var value = script.getNumberValue('VALUE'); + + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_SERVO_POSITION[1]; + + data_address = data_address + (port - 1) * data_length; + + if (value > 1023) { + value = 1023; + } else if (value < 0) { + value = 0; + } + + data_value = value; + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); + } + }, + "robotis_openCM70_aux_led_module": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_port_3,"3"], + [Lang.Blocks.robotis_common_port_4,"4"], + [Lang.Blocks.robotis_common_port_5,"5"], + [Lang.Blocks.robotis_common_port_6,"6"] + ], + "value": "3", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_cm_led_both + Lang.Blocks.robotis_common_off,"0"], + [Lang.Blocks.robotis_cm_led_right + Lang.Blocks.robotis_common_on,"1"], + [Lang.Blocks.robotis_cm_led_left + Lang.Blocks.robotis_common_on,"2"], + [Lang.Blocks.robotis_cm_led_both + Lang.Blocks.robotis_common_on,"3"] + ], + "value": "0", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "robotis_openCM70_aux_led_module" + }, + "paramsKeyMap": { + "PORT": 0, + "LED_MODULE": 1 + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var port = script.getField("PORT", script); + var ledModule = script.getField("LED_MODULE", script); + + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_LED_MODULE[1]; + + data_address = data_address + (port - 1) * data_length; + data_value = ledModule; + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); + } + }, + "robotis_openCM70_aux_custom": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_port_3,"3"], + [Lang.Blocks.robotis_common_port_4,"4"], + [Lang.Blocks.robotis_common_port_5,"5"], + [Lang.Blocks.robotis_common_port_6,"6"] + ], + "value": "3", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "0" ] + }, + null + ], + "type": "robotis_openCM70_aux_custom" + }, + "paramsKeyMap": { + "PORT": 0, + "VALUE": 1 + }, + "class": "robotis_openCM70_cm", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var port = script.getField("PORT", script); + var value = script.getNumberValue('VALUE'); + + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + data_address = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[0]; + data_length = Entry.Robotis_openCM70.CONTROL_TABLE.AUX_CUSTOM[1]; + + data_address = data_address + (port - 1) * data_length; + data_value = value; + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); + } + }, + "robotis_openCM70_cm_custom": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "0" ] + }, + null + ], + "type": "robotis_openCM70_cm_custom" + }, + "paramsKeyMap": { + "ADDRESS": 0, + "VALUE": 1 + }, + "class": "robotis_openCM70_custom", + "isNotFor": [ "robotis_openCM70" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var data_instruction = Entry.Robotis_openCM70.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + data_address = script.getNumberValue('ADDRESS'); + data_value = script.getNumberValue('VALUE'); + if (data_value > 65535) { + data_length = 4; + } else if (data_value > 255) { + data_length = 2; + } else { + data_length = 1; + } + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_openCM70.delay); + } + }, + "robotis_carCont_sensor_value": { + "color": "#00979D", + "fontColor": "#fff", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_cm_spring_left,"CM_SPRING_LEFT"], + [Lang.Blocks.robotis_cm_spring_right,"CM_SPRING_RIGHT"], + [Lang.Blocks.robotis_cm_switch,"CM_SWITCH"], + [Lang.Blocks.robotis_cm_sound_detected,"CM_SOUND_DETECTED"], + [Lang.Blocks.robotis_cm_sound_detecting,"CM_SOUND_DETECTING"], + [Lang.Blocks.robotis_cm_ir_left,"CM_IR_LEFT"], + [Lang.Blocks.robotis_cm_ir_right,"CM_IR_RIGHT"], + [Lang.Blocks.robotis_cm_calibration_left,"CM_CALIBRATION_LEFT"], + [Lang.Blocks.robotis_cm_calibration_right,"CM_CALIBRATION_RIGHT"], + ], + "value": "CM_SPRING_LEFT", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "robotis_carCont_sensor_value" + }, + "paramsKeyMap": { + "SENSOR": 0 + }, + "class": "robotis_carCont_cm", + "isNotFor": [ "robotis_carCont" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var data_instruction = Entry.Robotis_carCont.INSTRUCTION.READ; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + var data_default_address = 0; + var data_default_length = 0; + + var sensor = script.getStringField("SENSOR"); + + if (sensor == 'CM_SPRING_LEFT') { + data_default_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_LEFT[0]; + data_default_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_LEFT[1]; + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_LEFT[2]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_LEFT[3]; + } else if (sensor == 'CM_SPRING_RIGHT') { + data_default_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_RIGHT[0]; + data_default_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_RIGHT[1]; + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_RIGHT[2]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_SPRING_RIGHT[3]; + } else if (sensor == 'CM_SWITCH') { + data_default_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_SWITCH[0]; + data_default_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_SWITCH[1]; + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_SWITCH[0]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_SWITCH[1]; + } else if (sensor == 'CM_SOUND_DETECTED') { + data_default_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[0]; + data_default_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[1]; + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[0]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[1]; + } else if (sensor == 'CM_SOUND_DETECTING') { + data_default_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTING[0]; + data_default_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTING[1]; + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTING[0]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTING[1]; + } else if (sensor == 'CM_IR_LEFT') { + data_default_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_IR_LEFT[0]; + data_default_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_IR_LEFT[1]; + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_IR_LEFT[2]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_IR_LEFT[3]; + } else if (sensor == 'CM_IR_RIGHT') { + data_default_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_IR_RIGHT[0]; + data_default_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_IR_RIGHT[1]; + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_IR_RIGHT[2]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_IR_RIGHT[3]; + } else if (sensor == 'CM_CALIBRATION_LEFT') { + data_default_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_LEFT[0]; + data_default_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_LEFT[1]; + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_LEFT[0]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_LEFT[1]; + } else if (sensor == 'CM_CALIBRATION_RIGHT') { + data_default_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_RIGHT[0]; + data_default_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_RIGHT[1]; + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_RIGHT[0]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_RIGHT[1]; + } else if (sensor == 'CM_BUTTON_STATUS') { + data_default_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_BUTTON_STATUS[0]; + data_default_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_BUTTON_STATUS[1]; + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_BUTTON_STATUS[0]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_BUTTON_STATUS[1]; + } + + Entry.Robotis_carCont.setRobotisData([[data_instruction, data_address, data_length, data_value, data_default_length]]); + // Entry.hw.socket.send(JSON.stringify(Entry.hw.sendQueue)); + Entry.Robotis_carCont.update(); + + return Entry.hw.portData[data_default_address]; + } + }, + "robotis_carCont_cm_led": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_on,"1"], + [Lang.Blocks.robotis_common_off,"0"] + ], + "value": "1", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_on,"1"], + [Lang.Blocks.robotis_common_off,"0"] + ], + "value": "1", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "robotis_carCont_cm_led" + }, + "paramsKeyMap": { + "VALUE_LEFT": 0, + "VALUE_RIGHT": 1 + }, + "class": "robotis_carCont_cm", + "isNotFor": [ "robotis_carCont" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var value_left = script.getField("VALUE_LEFT", script); + var value_right = script.getField("VALUE_RIGHT", script); + + var data_instruction = Entry.Robotis_carCont.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_LED[0]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_LED[1]; + + if (value_left == 1 && value_right == 1) { + data_value = 9; + } else if (value_left == 1 && value_right == 0) { + data_value = 8; + } if (value_left == 0 && value_right == 1) { + data_value = 1; + } + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_carCont.delay); + } + }, + "robotis_carCont_cm_sound_detected_clear": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "robotis_carCont_cm_sound_detected_clear" + }, + "class": "robotis_carCont_cm", + "isNotFor": [ "robotis_carCont" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + + var data_instruction = Entry.Robotis_carCont.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[0]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_SOUND_DETECTED[1]; + data_value = 0; + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_carCont.delay); + } + }, + "robotis_carCont_aux_motor_speed": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.robotis_common_clockwhise,"CW"], + [Lang.Blocks.robotis_common_counter_clockwhise,"CCW"] + ], + "value": "CW", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + null, + { + "type": "number", + "params": [ "500" ] + }, + null + ], + "type": "robotis_carCont_aux_motor_speed" + }, + "paramsKeyMap": { + "DIRECTION": 0, + "DIRECTION_ANGLE": 1, + "VALUE": 2 + }, + "class": "robotis_carCont_cm", + "isNotFor": [ "robotis_carCont" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var direction = script.getField("DIRECTION", script); + var directionAngle = script.getField("DIRECTION_ANGLE", script); + var value = script.getNumberValue('VALUE'); + + var data_instruction = Entry.Robotis_carCont.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + if (direction == 'LEFT') { + data_address = Entry.Robotis_carCont.CONTROL_TABLE.AUX_MOTOR_SPEED_LEFT[0]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.AUX_MOTOR_SPEED_LEFT[1]; + } else { + data_address = Entry.Robotis_carCont.CONTROL_TABLE.AUX_MOTOR_SPEED_RIGHT[0]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.AUX_MOTOR_SPEED_RIGHT[1]; + } + + if (directionAngle == 'CW') { + value = value + 1024; + if (value > 2047) { + value = 2047; + } + } else { + if (value > 1023) { + value = 1023; + } + } + + data_value = value; + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_carCont.delay); + } + }, + "robotis_carCont_cm_calibration": { + "color": "#00979D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.General.left,"LEFT"], + [Lang.General.right,"RIGHT"] + ], + "value": "LEFT", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "0" ] + }, + null + ], + "type": "robotis_carCont_cm_calibration" + }, + "paramsKeyMap": { + "DIRECTION": 0, + "VALUE": 1 + }, + "class": "robotis_carCont_cm", + "isNotFor": [ "robotis_carCont" ], + "func": function (sprite, script) { + // instruction / address / length / value / default length + var direction = script.getField("DIRECTION", script); + var value = script.getNumberValue('VALUE'); + + var data_instruction = Entry.Robotis_carCont.INSTRUCTION.WRITE; + var data_address = 0; + var data_length = 0; + var data_value = 0; + + if (direction == 'LEFT') { + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_LEFT[0]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_LEFT[1]; + } else { + data_address = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_RIGHT[0]; + data_length = Entry.Robotis_carCont.CONTROL_TABLE.CM_CALIBRATION_RIGHT[1]; + } + + data_value = value; + + var data_sendqueue = [[data_instruction, data_address, data_length, data_value]]; + return Entry.Robotis_carCont.postCallReturn(script, data_sendqueue, Entry.Robotis_carCont.delay); + + // Entry.hw.sendQueue['ROBOTIS_DATA'] = [[data_instruction, data_address, data_length, data_value]]; + // update(); + // return script.callReturn(); + } + }, + "when_scene_start": { + "color": "#3BBD70", + "skeleton": "basic_event", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_icon_scene_1_2.png", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "when_scene_start" + }, + "class": "scene", + "isNotFor": [ "scene" ], + "func": function (sprite, script) { + return script.callReturn(); + }, + "event": "when_scene_start" + }, + "start_scene": { + "color": "#3BBD70", + "skeleton": "basic_without_next", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "scenes", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "start_scene" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "scene", + "isNotFor": [ "scene" ], + "func": function (sprite, script) { + var value = script.getField("VALUE", script); + var scene = Entry.scene.getSceneById(value); + if (scene) { + Entry.scene.selectScene(scene); + Entry.engine.fireEvent('when_scene_start'); + } + return null; + } + }, + "start_neighbor_scene": { + "color": "#3BBD70", + "skeleton": "basic_without_next", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ Lang.Blocks.SCENE_start_scene_next, "next" ], + [ Lang.Blocks.SCENE_start_scene_pre, "pre" ] + ], + "value": "next", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "start_neighbor_scene" + }, + "paramsKeyMap": { + "OPERATOR": 0 + }, + "class": "scene", + "isNotFor": [ "scene" ], + "func": function (sprite, script) { + var currentScene = Entry.scene.selectedScene; + var scenes = Entry.scene.getScenes(); + var index = scenes.indexOf(currentScene); + var o = script.getField("OPERATOR", script); + if (o == 'next') { + if (index + 1 < scenes.length) { + var nextScene = Entry.scene.getSceneById(scenes[index + 1].id); + if (nextScene) { + Entry.scene.selectScene(nextScene); + Entry.engine.fireEvent('when_scene_start'); + } + } + } else { + if (index > 0) { + var nextScene = Entry.scene.getSceneById(scenes[index - 1].id); + if (nextScene) { + Entry.scene.selectScene(nextScene); + Entry.engine.fireEvent('when_scene_start'); + } + } + } + return null; + } + }, + "sound_something": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "sounds", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "sound_something" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "sound", + "isNotFor": [], + "func": function (sprite, script) { + var soundId = script.getField("VALUE", script); + var sounds = sprite.parent.sounds; + var isExist = Entry.isExist(soundId, 'id', sounds); + if (isExist) + createjs.Sound.play(soundId); + return script.callReturn(); + } + }, + "sound_something_second": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "sounds", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "1" ] + }, + null + ], + "type": "sound_something_second" + }, + "paramsKeyMap": { + "VALUE": 0, + "SECOND": 1 + }, + "class": "sound", + "isNotFor": [], + "func": function (sprite, script) { + var soundId = script.getField("VALUE", script); + var timeValue = script.getNumberValue("SECOND", script); + var sounds = sprite.parent.sounds; + var isExist = Entry.isExist(soundId, 'id', sounds); + if (isExist) { + //var instance = createjs.Sound.play(soundId, {startTime: 0, duration: timeValue * 1000}); + var instance = createjs.Sound.play(soundId); + setTimeout(function() { + instance.stop(); + }, timeValue * 1000); + } + return script.callReturn(); + } + }, + "sound_something_wait": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "sounds", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "sound_something_wait" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "sound", + "isNotFor": [], + "func": function (sprite, script) { + if (!script.isPlay) { + script.isPlay = true; + script.playState = 1; + var soundId = script.getField("VALUE", script); + var sound = sprite.parent.getSound(soundId); + var sounds = sprite.parent.sounds; + var isExist = Entry.isExist(soundId, 'id', sounds); + if (isExist) { + var instance = createjs.Sound.play(soundId); + setTimeout(function() { + script.playState = 0; + }, sound.duration * 1000) + } + return script; + } else if (script.playState == 1) { + return script; + } else { + delete script.playState; + delete script.isPlay; + return script.callReturn(); + } + } + }, + "sound_something_second_wait": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "sounds", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "number", + "params": [ "1" ] + }, + null + ], + "type": "sound_something_second_wait" + }, + "paramsKeyMap": { + "VALUE": 0, + "SECOND": 1 + }, + "class": "sound", + "isNotFor": [], + "func": function (sprite, script) { + if (!script.isPlay) { + script.isPlay = true; + script.playState = 1; + var soundId = script.getField("VALUE", script); + var sounds = sprite.parent.sounds; + var isExist = Entry.isExist(soundId, 'id', sounds); + if (isExist) { + var instance = createjs.Sound.play(soundId); + var timeValue = script.getNumberValue("SECOND", script); + setTimeout(function() { + instance.stop(); + script.playState = 0; + }, timeValue * 1000) + instance.addEventListener('complete', function(e) { + }); + } + return script; + } else if (script.playState == 1) { + return script; + } else { + delete script.isPlay; + delete script.playState; + return script.callReturn(); + } + } + }, + "sound_volume_change": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "sound_volume_change" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "sound_volume", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE", script) / 100; + value = value + createjs.Sound.getVolume(); + if (value>1) + value = 1; + if (value<0) + value = 0; + createjs.Sound.setVolume(value); + return script.callReturn(); + } + }, + "sound_volume_set": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "10" ] + }, + null + ], + "type": "sound_volume_set" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "sound_volume", + "isNotFor": [], + "func": function (sprite, script) { + var value = script.getNumberValue("VALUE", script) / 100; + if (value>1) + value = 1; + if (value<0) + value = 0; + createjs.Sound.setVolume(value); + return script.callReturn(); + } + }, + "sound_silent_all": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "sound_silent_all" + }, + "class": "sound_stop", + "isNotFor": [], + "func": function (sprite, script) { + createjs.Sound.stop(); + return script.callReturn(); + } + }, + "get_sounds": { + "color": "#A4D01D", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "sounds", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "get_sounds" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "func": function (sprite, script) { + return script.getStringField("VALUE"); + } + }, + "sound_something_with_block": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "get_sounds" + }, + null + ], + "type": "sound_something_with_block" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "sound_play", + "isNotFor": [], + "func": function (sprite, script) { + var soundId = script.getStringValue("VALUE", script); + var sound = sprite.parent.getSound(soundId); + + if (sound) + createjs.Sound.play(sound.id); + + return script.callReturn(); + } + }, + "sound_something_second_with_block": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "get_sounds", + "id": "95dw" + }, + { + "type": "number", + "params": [ "1" ] + }, + null + ], + "type": "sound_something_second_with_block" + }, + "paramsKeyMap": { + "VALUE": 0, + "SECOND": 1 + }, + "class": "sound_play", + "isNotFor": [], + "func": function (sprite, script) { + var soundId = script.getStringValue("VALUE", script); + var timeValue = script.getNumberValue("SECOND", script); + var sound = sprite.parent.getSound(soundId); + + if (sound) { + var instance = createjs.Sound.play(sound.id, {startTime: 0, duration: timeValue * 1000}); + /* + var instance = createjs.Sound.play(sound.id); + setTimeout(function() { + instance.stop(); + }, timeValue * 1000); + */ + } + return script.callReturn(); + } + }, + "sound_something_wait_with_block": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "get_sounds" + }, + null + ], + "type": "sound_something_wait_with_block" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "sound_wait", + "isNotFor": [], + "func": function (sprite, script) { + if (!script.isPlay) { + script.isPlay = true; + script.playState = 1; + var soundId = script.getStringValue("VALUE", script); + var sound = sprite.parent.getSound(soundId); + if (sound) { + var instance = createjs.Sound.play(sound.id); + setTimeout(function() { + script.playState = 0; + }, sound.duration * 1000) + } + return script; + } else if (script.playState == 1) { + return script; + } else { + delete script.playState; + delete script.isPlay; + return script.callReturn(); + } + } + }, + "sound_something_second_wait_with_block": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "get_sounds" + }, + { + "type": "number", + "params": [ "1" ] + }, + null + ], + "type": "sound_something_second_wait_with_block" + }, + "paramsKeyMap": { + "VALUE": 0, + "SECOND": 1 + }, + "class": "sound_wait", + "isNotFor": [], + "func": function (sprite, script) { + if (!script.isPlay) { + script.isPlay = true; + script.playState = 1; + var soundId = script.getStringValue("VALUE", script); + var sound = sprite.parent.getSound(soundId); + if (sound) { + var instance = createjs.Sound.play(sound.id); + var timeValue = script.getNumberValue("SECOND", script); + setTimeout(function() { + instance.stop(); + script.playState = 0; + }, timeValue * 1000) + instance.addEventListener('complete', function(e) { + }); + } + return script; + } else if (script.playState == 1) { + return script; + } else { + delete script.isPlay; + delete script.playState; + return script.callReturn(); + } + } + }, + "sound_from_to": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "get_sounds" + }, + { + "type": "text", + "params": [ "1" ] + }, + { + "type": "text", + "params": [ "10" ] + }, + null + ], + "type": "sound_from_to" + }, + "paramsKeyMap": { + "VALUE": 0, + "START": 1, + "END": 2 + }, + "class": "sound_play", + "isNotFor": [], + "func": function (sprite, script) { + var soundId = script.getStringValue("VALUE", script); + var sound = sprite.parent.getSound(soundId); + + if (sound) { + var start = script.getNumberValue("START", script)*1000; + var end = script.getNumberValue("END", script)*1000; + createjs.Sound.play(sound.id, { + startTime: Math.min(start, end), + duration: Math.max(start, end) - Math.min(start, end) + }); + } + return script.callReturn(); + } + }, + "sound_from_to_and_wait": { + "color": "#A4D01D", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/sound_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "get_sounds" + }, + { + "type": "text", + "params": [ "1" ] + }, + { + "type": "text", + "params": [ "10" ] + }, + null + ], + "type": "sound_from_to_and_wait" + }, + "paramsKeyMap": { + "VALUE": 0, + "START": 1, + "END": 2 + }, + "class": "sound_wait", + "isNotFor": [], + "func": function (sprite, script) { + if (!script.isPlay) { + script.isPlay = true; + script.playState = 1; + var soundId = script.getStringValue("VALUE", script); + var sound = sprite.parent.getSound(soundId); + if (sound) { + var start = script.getNumberValue("START", script)*1000; + var end = script.getNumberValue("END", script)*1000; + var startValue = Math.min(start, end); + var endValue = Math.max(start, end); + var duration = endValue - startValue; + + createjs.Sound.play(sound.id, { + startTime: startValue, + duration: duration + }); + + setTimeout(function() { + script.playState = 0; + }, duration) + } + return script; + } else if (script.playState == 1) { + return script; + } else { + delete script.isPlay; + delete script.playState; + return script.callReturn(); + } + } + }, + "when_run_button_click": { + "color": "#3BBD70", + "skeleton": "basic_event", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_icon_play.png", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "when_run_button_click" + }, + "class": "event", + "isNotFor": [], + "func": function (sprite, script) { + return script.callReturn(); + }, + "event": "start" + }, + "press_some_key": { + "color": "#3BBD70", + "skeleton": "basic_event", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_icon_keyboard.png", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + }, + { + "type": "Dropdown", + "options": [ + [ "q", "81" ], + [ "w", "87" ], + [ "e", "69" ], + [ "r", "82" ], + [ "a", "65" ], + [ "s", "83" ], + [ "d", "68" ], + [ "위쪽 화살표", "38" ], + [ "아래쪽 화살표", "40" ], + [ "왼쪽 화살표", "37" ], + [ "오른쪽 화살표", "39" ], + [ "엔터", "13" ], + [ "스페이스", "32" ] + ], + "value": "81", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null, null ] + }, + "paramsKeyMap": { + "VALUE": 1 + }, + "func": function (sprite, script) { + return script.callReturn(); + } + }, + "when_some_key_pressed": { + "color": "#3BBD70", + "skeleton": "basic_event", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_icon_keyboard.png", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + }, + { + "type": "Keyboard", + "value": '81' + } + ], + "events": {}, + "def": { + "params": [ null, "81" ], + "type": "when_some_key_pressed" + }, + "paramsKeyMap": { + "VALUE": 1 + }, + "class": "event", + "isNotFor": [], + "func": function (sprite, script) { + return script.callReturn(); + }, + "event": "keyPress" + }, + "mouse_clicked": { + "color": "#3BBD70", + "skeleton": "basic_event", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_icon_mouse.png", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "mouse_clicked" + }, + "class": "event", + "isNotFor": [], + "func": function (sprite, script) { + return script.callReturn(); + }, + "event": "mouse_clicked" + }, + "mouse_click_cancled": { + "color": "#3BBD70", + "skeleton": "basic_event", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_icon_mouse.png", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "mouse_click_cancled" + }, + "class": "event", + "isNotFor": [], + "func": function (sprite, script) { + return script.callReturn(); + }, + "event": "mouse_click_cancled" + }, + "when_object_click": { + "color": "#3BBD70", + "skeleton": "basic_event", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_icon_mouse.png", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "when_object_click" + }, + "class": "event", + "isNotFor": [], + "func": function (sprite, script) { + return script.callReturn(); + }, + "event": "when_object_click" + }, + "when_object_click_canceled": { + "color": "#3BBD70", + "skeleton": "basic_event", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_icon_mouse.png", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + } + ], + "events": {}, + "def": { + "params": [ null ], + "type": "when_object_click_canceled" + }, + "class": "event", + "isNotFor": [], + "func": function (sprite, script) { + return script.callReturn(); + }, + "event": "when_object_click_canceled" + }, + "when_some_key_click": { + "color": "#3BBD70", + "skeleton": "basic_event", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_icon_keyboard.png", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "func": function (sprite, script) { + return script.callReturn(); + }, + "event": "keyPress" + }, + "when_message_cast": { + "color": "#3BBD70", + "skeleton": "basic_event", + "statements": [], + "params": [ + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_icon_signal.png", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + }, + { + "type": "DropdownDynamic", + "value": null, + "menuName": "messages", + "fontSize": 11 + } + ], + "events": { + "dataAdd": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_messageRefs', block); + } + ], + "viewDestroy": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_messageRefs', block); + } + ] + }, + "def": { + "params": [ null, null ], + "type": "when_message_cast" + }, + "paramsKeyMap": { + "VALUE": 1 + }, + "class": "message", + "isNotFor": [ "message" ], + "func": function (sprite, script) { + return script.callReturn(); + }, + "event": "when_message_cast" + }, + "message_cast": { + "color": "#3BBD70", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "messages", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_03.png", + "size": 12 + } + ], + "events": { + "dataAdd": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_messageRefs', block); + } + ], + "viewDestroy": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_messageRefs', block); + } + ] + }, + "def": { + "params": [ null, null ], + "type": "message_cast" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "message", + "isNotFor": [ "message" ], + "func": function (sprite, script) { + var value = script.getField("VALUE", script); + + var arr = Entry.variableContainer.messages_; + var isExist = Entry.isExist(value, 'id', arr); + + if (value == 'null' || !isExist) + throw new Error('value can not be null or undefined'); + + Entry.container.mapEntityIncludeCloneOnScene(Entry.engine.raiseKeyEvent, + ["when_message_cast", value]); + return script.callReturn(); + } + }, + "message_cast_wait": { + "color": "#3BBD70", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "messages", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/start_03.png", + "size": 12 + } + ], + "events": { + "dataAdd": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_messageRefs', block); + } + ], + "dataDestroy": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_messageRefs', block); + } + ] + }, + "def": { + "params": [ null, null ], + "type": "message_cast_wait" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "message", + "isNotFor": [ "message" ], + "func": function (sprite, script) { + if (script.runningScript) { + var runningScript = script.runningScript; + var length = runningScript.length; + for (var i = 0; i < length; i++) { + var executor = runningScript.shift(); + if (executor && !executor.isEnd()) + runningScript.push(executor); + } + if (runningScript.length) { + return script; + } else { + return script.callReturn(); + } + } else { + var value = script.getField("VALUE", script); + var arr = Entry.variableContainer.messages_; + var isExist = Entry.isExist(value, 'id', arr); + if (value == 'null' || !isExist) + throw new Error('value can not be null or undefined'); + var data = Entry.container.mapEntityIncludeCloneOnScene( + Entry.engine.raiseKeyEvent, + ["when_message_cast", value] + ); + var runningScript = []; + while (data.length) { + var executor = data.shift(); + if (executor) + runningScript = runningScript.concat(executor); + } + + script.runningScript = runningScript; + return script; + } + } + }, + "text": { + "color": "#FFD974", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "TextInput", + "value": 10 + } + ], + "events": {}, + "def": { + "params": [], + type: "text" + }, + "paramsKeyMap": { + "NAME": 0 + }, + "func": function (sprite, script) { + return script.getField('NAME', script); + }, + "isPrimitive": true + }, + "text_write": { + "color": "#FFCA36", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ Lang.Blocks.entry ] + } + ], + "type": "text_write" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "text", + "isNotFor": [ "sprite" ], + "func": function (sprite, script) { + var text = script.getStringValue("VALUE", script); + text = Entry.convertToRoundedDecimals(text, 3); + sprite.setText(text); + return script.callReturn(); + } + }, + "text_append": { + "color": "#FFCA36", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ Lang.Blocks.entry ] + } + ], + "type": "text_append" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "text", + "isNotFor": [ "sprite" ], + "func": function (sprite, script) { + var text = script.getStringValue("VALUE", script); + sprite.setText(Entry.convertToRoundedDecimals(sprite.getText(),3) + + Entry.convertToRoundedDecimals(text, 3)); + return script.callReturn(); + } + }, + "text_prepend": { + "color": "#FFCA36", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ Lang.Blocks.entry ] + } + ], + "type": "text_prepend" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "text", + "isNotFor": [ "sprite" ], + "func": function (sprite, script) { + var text = script.getStringValue("VALUE", script); + sprite.setText(Entry.convertToRoundedDecimals(text, 3) + + Entry.convertToRoundedDecimals(sprite.getText(), 3)); + return script.callReturn(); + } + }, + "text_flush": { + "color": "#FFCA36", + "skeleton": "basic", + "statements": [], + "params": [], + "events": {}, + "def": { + "params": [], + "type": "text_flush" + }, + "class": "text", + "isNotFor": [ "sprite" ], + "func": function (sprite, script) { + sprite.setText(''); + return script.callReturn(); + } + }, + "variableAddButton": { + "skeleton": "basic_button", + "color": "#eee", + "params": [ + { + "type": "Text", + "text": Lang.Workspace.variable_create, + "color": "#333", + "align": "center" + } + ], + "events": { + "mousedown": [ + function() { + Entry.variableContainer.openVariableAddPanel('variable'); + } + ] + } + }, + "listAddButton": { + "skeleton": "basic_button", + "color": "#eee", + "params": [ + { + "type": "Text", + "text": Lang.Workspace.list_create, + "color": "#333", + "align": "center" + } + ], + "events": { + "mousedown": [ + function() { + Entry.variableContainer.openVariableAddPanel('list'); + } + ] + } + }, + "change_variable": { + "color": "#E457DC", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "variables", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/variable_03.png", + "size": 12 + } + ], + "events": { + "dataAdd": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_variableRefs', block); + } + ], + "dataDestroy": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_variableRefs', block); + } + ] + }, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "10" ] + }, + null + ], + "type": "change_variable" + }, + "paramsKeyMap": { + "VARIABLE": 0, + "VALUE": 1 + }, + "class": "variable", + "isNotFor": [ "variable", "variableNotExist" ], + "func": function (sprite, script) { + var variableId = script.getField("VARIABLE", script); + var value = script.getNumberValue("VALUE", script); + var fixed = 0; + + value = Entry.parseNumber(value); + if ((value == false && typeof value == 'boolean')) + throw new Error('Type is not correct'); + var variable = Entry.variableContainer.getVariable(variableId, sprite); + fixed = Entry.getMaxFloatPoint([value, variable.getValue()]); + variable.setValue((value + variable.getValue()).toFixed(fixed)); + return script.callReturn(); + } + }, + "set_variable": { + "color": "#E457DC", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "variables", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/variable_03.png", + "size": 12 + } + ], + "events": { + "dataAdd": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_variableRefs', block); + } + ], + "dataDestroy": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_variableRefs', block); + } + ] + }, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "10" ] + }, + null + ], + "type": "set_variable" + }, + "paramsKeyMap": { + "VARIABLE": 0, + "VALUE": 1 + }, + "class": "variable", + "isNotFor": [ "variable", "variableNotExist" ], + "func": function (sprite, script) { + var variableId = script.getField("VARIABLE", script); + var value = script.getValue("VALUE", script); + var variable = Entry.variableContainer.getVariable(variableId, sprite); + variable.setValue(value); + return script.callReturn(); + } + }, + "show_variable": { + "color": "#E457DC", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "variables", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/variable_03.png", + "size": 12 + } + ], + "events": { + "dataAdd": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_variableRefs', block); + } + ], + "dataDestroy": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_variableRefs', block); + } + ] + }, + "def": { + "params": [ null, null ], + "type": "show_variable" + }, + "paramsKeyMap": { + "VARIABLE": 0 + }, + "class": "variable_visibility", + "isNotFor": [ "variable", "variableNotExist" ], + "func": function (sprite, script) { + var variableId = script.getField("VARIABLE", script); + var variable = Entry.variableContainer.getVariable(variableId, sprite); + variable.setVisible(true); + variable.updateView(); + return script.callReturn(); + } + }, + "hide_variable": { + "color": "#E457DC", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "variables", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/variable_03.png", + "size": 12 + } + ], + "events": { + "dataAdd": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_variableRefs', block); + } + ], + "dataDestroy": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_variableRefs', block); + } + ] + }, + "def": { + "params": [ null, null ], + "type": "hide_variable" + }, + "paramsKeyMap": { + "VARIABLE": 0 + }, + "class": "variable_visibility", + "isNotFor": [ "variable", "variableNotExist" ], + "func": function (sprite, script) { + var variableId = script.getField("VARIABLE", script); + var variable = Entry.variableContainer.getVariable(variableId, sprite); + variable.setVisible(false); + return script.callReturn(); + } + }, + "get_variable": { + "color": "#E457DC", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "variables", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_get_variable_1, + "color": "white" + } + ], + "events": { + "dataAdd": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_variableRefs', block); + } + ], + "dataDestroy": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_variableRefs', block); + } + ] + }, + "def": { + "params": [ null ], + "type": "get_variable" + }, + "paramsKeyMap": { + "VARIABLE": 0 + }, + "class": "variable", + "isNotFor": [ "variable", "variableNotExist" ], + "func": function (sprite, script) { + var variableId = script.getField("VARIABLE", script); + var variable = Entry.variableContainer.getVariable(variableId, sprite); + return variable.getValue(); + } + }, + "ask_and_wait": { + "color": "#E457DC", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/variable_03.png", + "size": 12 + } + ], + "events": { + "viewAdd": [ + function() { + if (Entry.container) Entry.container.showProjectAnswer(); + } + ], + "viewDestroy": [ + function(block) { + if (Entry.container) Entry.container.hideProjectAnswer(block); + } + ] + }, + "def": { + "params": [ + { + "type": "text", + "params": [ Lang.Blocks.block_hi ] + }, + null + ], + "type": "ask_and_wait" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "ask", + "isNotFor": [], + "func": function (sprite, script) { + var inputModel = Entry.container.inputValue, + inputView = Entry.stage.inputField, + message = script.getValue("VALUE", script); + + if (!message) + throw new Error('message can not be empty'); + + if (inputModel.sprite == sprite && + inputView && !inputView._isHidden) { + return script; + } else if (inputModel.sprite != sprite && script.isInit) { + if(sprite.dialog) + sprite.dialog.remove(); + delete script.isInit; + return script.callReturn(); + } else if (inputModel.complete && + inputModel.sprite == sprite && + inputView._isHidden && script.isInit) { + if(sprite.dialog) + sprite.dialog.remove(); + delete inputModel.complete; + delete script.isInit; + return script.callReturn(); + } else { + message = Entry.convertToRoundedDecimals(message, 3); + new Entry.Dialog(sprite, message, 'speak'); + Entry.stage.showInputField(); + inputModel.script = script; + inputModel.sprite = sprite; + script.isInit = true; + return script; + } + } + }, + "get_canvas_input_value": { + "color": "#E457DC", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_get_canvas_input_value, + "color": "#fff" + } + ], + "events": { + "viewAdd": [ + function() { + if (Entry.container) Entry.container.showProjectAnswer(); + } + ], + "viewDestroy": [ + function(block) { + if (Entry.container) Entry.container.hideProjectAnswer(block); + } + ] + }, + "def": { + "params": [ null ], + "type": "get_canvas_input_value" + }, + "class": "ask", + "isNotFor": [], + "func": function (sprite, script) { + return Entry.container.getInputValue(); + } + }, + "add_value_to_list": { + "color": "#E457DC", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "DropdownDynamic", + "value": null, + "menuName": "lists", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/variable_03.png", + "size": 12 + } + ], + "events": { + "dataAdd": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.addRef('_variableRefs', block); + } + ], + "dataDestroy": [ + function(block) { + var vc = Entry.variableContainer; + if (vc) vc.removeRef('_variableRefs', block); + } + ] + }, + "def": { + "params": [ + { + "type": "text", + "params": [ "10" ] + }, + null, + null + ], + "type": "add_value_to_list" + }, + "paramsKeyMap": { + "VALUE": 0, + "LIST": 1 + }, + "class": "list", + "isNotFor": [ "list", "listNotExist" ], + "func": function (sprite, script) { + var listId = script.getField("LIST", script); + var value = script.getValue("VALUE", script); + var list = Entry.variableContainer.getList(listId, sprite); + + if (!list.array_) + list.array_ = []; + list.array_.push({'data' : value}); + list.updateView(); + return script.callReturn(); + } + }, + "remove_value_from_list": { + "color": "#E457DC", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "DropdownDynamic", + "value": null, + "menuName": "lists", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/variable_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "number", + "params": [ "1" ] + }, + null, + null + ], + "type": "remove_value_from_list" + }, + "paramsKeyMap": { + "VALUE": 0, + "LIST": 1 + }, + "class": "list", + "isNotFor": [ "list", "listNotExist" ], + "func": function (sprite, script) { + var listId = script.getField("LIST", script); + var value = script.getValue("VALUE", script); + var list = Entry.variableContainer.getList(listId, sprite); + + if (!list.array_ || isNaN(value) || value > list.array_.length) + throw new Error('can not remove value from array'); + + list.array_.splice(value-1,1); + + list.updateView(); + return script.callReturn(); + } + }, + "insert_value_to_list": { + "color": "#E457DC", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Block", + "accept": "string" + }, + { + "type": "DropdownDynamic", + "value": null, + "menuName": "lists", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/variable_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + { + "type": "text", + "params": [ "10" ] + }, + null, + { + "type": "text", + "params": [ "1" ] + }, + null + ], + "type": "insert_value_to_list" + }, + "paramsKeyMap": { + "DATA": 0, + "LIST": 1, + "INDEX": 2 + }, + "class": "list", + "isNotFor": [ "list", "listNotExist" ], + "func": function (sprite, script) { + var listId = script.getField("LIST", script); + var data = script.getValue("DATA", script); + var index = script.getValue("INDEX", script); + var list = Entry.variableContainer.getList(listId, sprite); + + if (!list.array_ || isNaN(index) || index == 0 || index > list.array_.length +1) + throw new Error('can not insert value to array'); + + list.array_.splice(index-1, 0, {'data': data}); + list.updateView(); + return script.callReturn(); + } + }, + "change_value_list_index": { + "color": "#E457DC", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "lists", + "fontSize": 11 + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/variable_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ + null, + { + "type": "text", + "params": [ "1" ] + }, + { + "type": "text", + "params": [ "10" ] + }, + null + ], + "type": "change_value_list_index" + }, + "paramsKeyMap": { + "LIST": 0, + "INDEX": 1, + "DATA": 2 + }, + "class": "list", + "isNotFor": [ "list", "listNotExist" ], + "func": function (sprite, script) { + var listId = script.getField("LIST", script); + var data = script.getValue("DATA", script); + var index = script.getValue("INDEX", script); + var list = Entry.variableContainer.getList(listId, sprite); + + if (!list.array_ || isNaN(index) || index > list.array_.length) + throw new Error('can not insert value to array'); + + list.array_[index-1].data = data; + list.updateView(); + return script.callReturn(); + } + }, + "value_of_index_from_list": { + "color": "#E457DC", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_value_of_index_from_list_1, + "color": "white" + }, + { + "type": "DropdownDynamic", + "value": null, + "menuName": "lists", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_value_of_index_from_list_2, + "color": "white" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_value_of_index_from_list_3, + "color": "white" + } + ], + "events": {}, + "def": { + "params": [ + null, + null, + null, + { + "type": "number", + "params": [ "1" ] + } + ], + "type": "value_of_index_from_list" + }, + "paramsKeyMap": { + "LIST": 1, + "INDEX": 3 + }, + "class": "list_element", + "isNotFor": [ "list", "listNotExist" ], + "func": function (sprite, script) { + var listId = script.getField("LIST", script); + var index = script.getValue("INDEX", script); + var list = Entry.variableContainer.getList(listId, sprite); + index = Entry.getListRealIndex(index, list); + + if (!list.array_ || isNaN(index) || index > list.array_.length) + throw new Error('can not insert value to array'); + + return list.array_[index-1].data + } + }, + "length_of_list": { + "color": "#E457DC", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_length_of_list_1, + "color": "white" + }, + { + "type": "DropdownDynamic", + "value": null, + "menuName": "lists", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_length_of_list_2, + "color": "white" + } + ], + "events": {}, + "def": { + "params": [ null, null, null ], + "type": "length_of_list" + }, + "paramsKeyMap": { + "LIST": 1 + }, + "class": "list", + "isNotFor": [ "list", "listNotExist" ], + "func": function (sprite, script) { + var listId = script.getField("LIST", script); + var list = Entry.variableContainer.getList(listId); + + return list.array_.length; + } + }, + "show_list": { + "color": "#E457DC", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "lists", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/variable_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "show_list" + }, + "paramsKeyMap": { + "LIST": 0 + }, + "class": "list_visibility", + "isNotFor": [ "list", "listNotExist" ], + "func": function (sprite, script) { + var listId = script.getField("LIST", script); + var list = Entry.variableContainer.getList(listId); + + list.setVisible(true); + return script.callReturn(); + } + }, + "hide_list": { + "color": "#E457DC", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "DropdownDynamic", + "value": null, + "menuName": "lists", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/variable_03.png", + "size": 12 + } + ], + "events": {}, + "def": { + "params": [ null, null ], + "type": "hide_list" + }, + "paramsKeyMap": { + "LIST": 0 + }, + "class": "list_visibility", + "isNotFor": [ "list", "listNotExist" ], + "func": function (sprite, script) { + var listId = script.getField("LIST", script); + var list = Entry.variableContainer.getList(listId); + + list.setVisible(false); + return script.callReturn(); + } + }, + "options_for_list": { + "color": "#E457DC", + "skeleton": "basic_string_field", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [ "첫번째", "FIRST" ], + [ "마지막", "LAST" ], + [ "무작위", "RANDOM" ] + ], + "value": "FIRST", + "fontSize": 11 + } + ], + "events": {}, + "def": { + "params": [ null ] + }, + "paramsKeyMap": { + "OPERATOR": 0 + }, + "func": function (sprite, script) { + return script.getField("OPERATOR", script); + } + }, + "set_visible_answer": { + "color": "#E457DC", + "skeleton": "basic", + "statements": [], + "params": [ + { + "type": "Dropdown", + "options": [ + [Lang.Blocks.CALC_timer_visible_show,"SHOW"], + [Lang.Blocks.CALC_timer_visible_hide,"HIDE"] + ], + "value": "SHOW", + "fontSize": 11 + }, + { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/variable_03.png", + "size": 12 + } + ], + "events": { + "viewAdd": [ + function(block) { + if (Entry.container) Entry.container.showProjectAnswer(); + } + ], + "viewDestroy": [ + function(block) { + if (Entry.container) Entry.container.hideProjectAnswer(block); + } + ] + }, + "def": { + "params": [ "HIDE", null ], + "type": "set_visible_answer" + }, + "paramsKeyMap": { + "BOOL": 0 + }, + "class": "ask", + "isNotFor": [], + "func": function (sprite, script) { + var bool = script.getField("BOOL", script); + if (bool == 'HIDE') + Entry.container.inputValue.setVisible(false); + else + Entry.container.inputValue.setVisible(true); + return script.callReturn(); + } + }, + "is_included_in_list": { + "color": "#E457DC", + "skeleton": "basic_boolean_field", + "statements": [], + "params": [ + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_is_included_in_list_1, + "color": "white" + }, + { + "type": "DropdownDynamic", + "value": null, + "menuName": "lists", + "fontSize": 11 + }, + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_is_included_in_list_2, + "color": "white" + }, + { + "type": "Block", + "accept": "string" + }, + { + "type": "Text", + "text": Lang.Blocks.VARIABLE_is_included_in_list_3, + "color": "white" + } + ], + "events": {}, + "def": { + "params": [ + null, null, null, + { + "type": "text", + "params": [ "10" ] + }, null + ], + "type": "is_included_in_list" + }, + "paramsKeyMap": { + "LIST": 1, + "DATA": 3 + }, + "class": "list", + "isNotFor": [ "list", "listNotExist" ], + "func": function (sprite, script) { + var listId = script.getField("LIST", script); + var data = script.getStringValue("DATA", script); + var list = Entry.variableContainer.getList(listId); + if (!list) + return false; + var arr = list.array_; + + for (var i=0, len=arr.length; i 0) { + this.repeatCount--; + var statement = this.block.statements[0]; + if (statement.getBlocks().length === 0) + return; + this.executor.stepInto(statement); + return Entry.STATIC.BREAK; + } else { + delete this.repeatCount; + } + } + }, + "jr_item": { + "skeleton": "pebble_basic", + "color": "#F46C6C", + "params": [ + { + "type": "Indicator", + "img": "/img/assets/ntry/bitmap/jr/block_item_image.png", + "highlightColor": "#FFF", + "position": { + "x": 83, + "y": 0 + }, + "size": 22 + } + ], + func: function() { + if (!this.isContinue) { + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + Ntry.dispatchEvent("getItem"); + self.isAction = false; + }; + Ntry.dispatchEvent("unitAction", Ntry.STATIC.GET_ITEM , callBack); + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "cparty_jr_item": { + "skeleton": "pebble_basic", + "color": "#8ABC1D", + "params": [ + { + "type": "Text", + "text": "연필 줍기" + }, + { + "type": "Indicator", + "img": "/img/assets/ntry/bitmap/cpartyjr/pen.png", + "highlightColor": "#FFF", + "position": { + "x": 83, + "y": 0 + }, + "size": 22 + } + ], + func: function() { + if (!this.isContinue) { + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + Ntry.dispatchEvent("getItem"); + self.isAction = false; + }; + Ntry.dispatchEvent("unitAction", Ntry.STATIC.GET_ITEM , callBack); + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + + } + } + }, + "jr_north": { + "skeleton": "pebble_basic", + "color": "#A751E3", + "params": [ + { + "type": "Text", + "text": " 위쪽" + }, + { + "type": "Indicator", + "img": "/img/assets/ntry/bitmap/jr/block_up_image.png", + "position": { + "x": 83, + "y": 0 + }, + "size": 22 + } + ], + func: function() { + if (!this.isContinue) { + this.isContinue = true; + this.isAction = true; + var STATIC = Ntry.STATIC; + var self = this; + var callBack = function() { + window.setTimeout( + function() { Ntry.dispatchEvent("unitAction", Ntry.STATIC.WALK, function() { + self.isAction = false; + } + );}, 3); + }; + var actionType; + switch (Ntry.unitComp.direction) { + case Ntry.STATIC.EAST: + actionType = STATIC.TURN_LEFT; + break; + case Ntry.STATIC.SOUTH: + actionType = STATIC.HALF_ROTATION; + break; + case Ntry.STATIC.WEST: + actionType = STATIC.TURN_RIGHT; + break; + default: + callBack(); + break; + } + if (actionType) + Ntry.dispatchEvent("unitAction", actionType, callBack); + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "jr_east": { + "skeleton": "pebble_basic", + "color": "#A751E3", + "params": [ + { + "type": "Text", + "text": "오른쪽" + }, + { + "type": "Indicator", + "img": "/img/assets/ntry/bitmap/jr/block_right_image.png", + "position": { + "x": 83, + "y": 0 + }, + "size": 22 + } + ], + func: function() { + var STATIC = Ntry.STATIC; + + if (!this.isContinue) { + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + window.setTimeout( + function() { + Ntry.dispatchEvent( + "unitAction", + STATIC.WALK, + function() { self.isAction = false; } );}, + 3); + }; + + // turn direction + var actionType; + switch (Ntry.unitComp.direction) { + case STATIC.SOUTH: + actionType = STATIC.TURN_LEFT; + break; + case STATIC.WEST: + actionType = STATIC.HALF_ROTATION; + break; + case STATIC.NORTH: + actionType = STATIC.TURN_RIGHT; + break; + default: + callBack(); + break; + } + if (actionType) + Ntry.dispatchEvent("unitAction", actionType, callBack); + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "jr_south": { + "skeleton": "pebble_basic", + "color": "#A751E3", + "params": [ + { + "type": "Text", + "text": " 아래쪽" + }, + { + "type": "Indicator", + "img": "/img/assets/ntry/bitmap/jr/block_down_image.png", + "position": { + "x": 83, + "y": 0 + }, + "size": 22 + } + ], + func: function() { + if (!this.isContinue) { + + this.isContinue = true; + this.isAction = true; + var STATIC = Ntry.STATIC; + var self = this; + var callBack = function() { + window.setTimeout( + function() { + Ntry.dispatchEvent( + "unitAction", + Ntry.STATIC.WALK, + function() { self.isAction = false; } );}, + 3); + }; + + // turn direction + var actionType; + switch (Ntry.unitComp.direction) { + case STATIC.EAST: + actionType = STATIC.TURN_RIGHT; + break; + case STATIC.NORTH: + actionType = STATIC.HALF_ROTATION; + break; + case STATIC.WEST: + actionType = STATIC.TURN_LEFT; + break; + default: + callBack(); + break; + } + if (actionType) + Ntry.dispatchEvent("unitAction", actionType, callBack); + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "jr_west": { + "skeleton": "pebble_basic", + "color": "#A751E3", + "params": [ + { + "type": "Text", + "text": " 왼쪽" + }, + { + "type": "Indicator", + "img": "/img/assets/ntry/bitmap/jr/block_left_image.png", + "position": { + "x": 83, + "y": 0 + }, + "size": 22 + } + ], + func: function() { + if (!this.isContinue) { + this.isContinue = true; + this.isAction = true; + var STATIC = Ntry.STATIC; + var self = this; + var callBack = function() { + window.setTimeout( + function() { Ntry.dispatchEvent( + "unitAction", + STATIC.WALK, + function() { self.isAction = false; } );}, + 3); + }; + + // turn direction + var actionType; + switch (Ntry.unitComp.direction) { + case STATIC.SOUTH: + actionType = STATIC.TURN_RIGHT; + break; + case STATIC.EAST: + actionType = STATIC.HALF_ROTATION; + break; + case STATIC.NORTH: + actionType = STATIC.TURN_LEFT; + break; + default: + callBack(); + break; + } + if (actionType) + Ntry.dispatchEvent("unitAction", actionType, callBack); + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "jr_start_basic": { + "skeleton": "basic_event", + "event": "start", + "color": "#3BBD70", + "params": [ + { + "type": "Indicator", + "boxMultiplier": 2, + "img": "/img/assets/block_icon/start_icon_play.png", + "highlightColor": "#3BBD70", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + }, + { + text: "시작하기를 클릭했을때", + type: "Text" + } + ], + func: function() { + var entities = Ntry.entityManager.getEntitiesByComponent( + Ntry.STATIC.UNIT); + + for (var key in entities) + this._unit = entities[key]; + + Ntry.unitComp = Ntry.entityManager.getComponent( + this._unit.id, Ntry.STATIC.UNIT); + } + }, + "jr_go_straight": { + "skeleton": "basic", + "color": "#A751E3", + "params": [ + { + text: "앞으로 가기", + type: "Text" + }, + { + "type": "Image", + "img": "/img/assets/ntry/bitmap/jr/cparty_go_straight.png", + "size": 24 + } + ], + func: function() { + if (!this.isContinue) { + + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + self.isAction = false; + }; + // turn direction + Ntry.dispatchEvent("unitAction", Ntry.STATIC.WALK, callBack); + + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "jr_turn_left": { + "skeleton": "basic", + "color": "#A751E3", + "params": [ + { + text: "왼쪽으로 돌기", + type: "Text" + }, + { + "type": "Image", + "img": "/img/assets/ntry/bitmap/jr/cparty_rotate_l.png", + "size": 24 + } + ], + func: function() { + if (!this.isContinue) { + + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + self.isAction = false; + }; + + // turn direction + Ntry.dispatchEvent("unitAction", Ntry.STATIC.TURN_LEFT, callBack); + + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "jr_turn_right": { + "skeleton": "basic", + "color": "#A751E3", + "params": [ + { + text: "오른쪽으로 돌기", + type: "Text" + }, + { + "type": "Image", + "img": "/img/assets/ntry/bitmap/jr/cparty_rotate_r.png", + "size": 24 + } + ], + func: function() { + if (!this.isContinue) { + + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + self.isAction = false; + }; + + // turn direction + Ntry.dispatchEvent("unitAction", Ntry.STATIC.TURN_RIGHT, callBack); + + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "jr_go_slow": { + "skeleton": "basic", + "color": "#f46c6c", + "params": [ + { + text: "천천히 가기", + type: "Text" + }, + { + "type": "Image", + "img": "/img/assets/ntry/bitmap/jr/cparty_go_slow.png", + "size": 24 + } + ], + func: function() { + if (!this.isContinue) { + + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + self.isAction = false; + }; + + // turn direction + Ntry.dispatchEvent("unitAction", Ntry.STATIC.GO_SLOW, callBack); + + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "jr_repeat_until_dest": { + "skeleton": "basic_loop", + "color": "#498DEB", + "syntax": [ + "BasicWhile", + "true" + ], + "params": [ + { + "type": "Image", + "img": "/img/assets/ntry/bitmap/jr/jr_goal_image.png", + "size": 18 + }, + { + text: "만날 때 까지 반복하기", + type: "Text" + }, + { + "type": "Image", + "img": "/img/assets/week/blocks/for.png", + "size": 24 + } + ], + "statements": [ + { + "accept": "basic" + } + ], + func: function() { + var statement = this.block.statements[0]; + if (statement.getBlocks().length === 0) + return; + + this.executor.stepInto(statement); + return Entry.STATIC.BREAK; + } + }, + "jr_if_construction": { + "skeleton": "basic_loop", + "color": "#498DEB", + "params": [ + { + text: "만약", + type: "Text" + }, + { + "type": "Image", + "img": "/img/assets/ntry/bitmap/jr/jr_construction_image.png", + "size": 18 + }, + { + text: "앞에 있다면", + type: "Text" + }, + { + "type": "Image", + "img": "/img/assets/week/blocks/for.png", + "size": 24 + } + ], + "statements": [ + { + "accept": "basic" + } + ], + func: function() { + if (this.isContinue) + return; + var entities = Ntry.entityManager.getEntitiesByComponent( + Ntry.STATIC.UNIT); + + var entity; + for (var key in entities) + entity = entities[key]; + + var unitComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.UNIT); + var gridComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.GRID); + + var grid = {x: gridComp.x, y: gridComp.y}; + Ntry.addVectorByDirection(grid, unitComp.direction, 1); + + var fitEntities = Ntry.entityManager.find( + { + type: Ntry.STATIC.GRID, + x: grid.x, + y: grid.y + }, + { + type: Ntry.STATIC.TILE, + tileType: Ntry.STATIC.OBSTACLE_REPAIR + } + ); + + this.isContinue = true; + + var statement = this.block.statements[0]; + if (fitEntities.length === 0) return; + else if (statement.getBlocks().length === 0) return; + else { + this.executor.stepInto(statement); + return Entry.STATIC.BREAK; + } + } + }, + "jr_if_speed": { + "skeleton": "basic_loop", + "color": "#498DEB", + "params": [ + { + "type": "Image", + "img": "/img/assets/ntry/bitmap/jr/jr_speed_image.png", + "size": 18 + }, + { + "type": "Image", + "img": "/img/assets/week/blocks/for.png", + "size": 24 + } + ], + "statements": [ + { + "accept": "basic" + } + ], + func: function() { + if (this.isContinue) + return; + var entities = Ntry.entityManager.getEntitiesByComponent( + Ntry.STATIC.UNIT); + + var entity; + for (var key in entities) + entity = entities[key]; + + var unitComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.UNIT); + var gridComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.GRID); + + var grid = {x: gridComp.x, y: gridComp.y}; + Ntry.addVectorByDirection(grid, unitComp.direction, 1); + + var fitEntities = Ntry.entityManager.find( + { + type: Ntry.STATIC.GRID, + x: grid.x, + y: grid.y + }, + { + type: Ntry.STATIC.TILE, + tileType: Ntry.STATIC.OBSTACLE_SLOW + } + ); + + this.isContinue = true; + + var statement = this.block.statements[0]; + if (fitEntities.length === 0) return; + else if(statement.getBlocks().length === 0) return; + else { + this.executor.stepInto(statement); + return Entry.STATIC.BREAK; + } + } + }, + "maze_step_start": { + "skeleton": "basic_event", + "mode": "maze", + "event": "start", + "color": "#3BBD70", + "syntax": [ + "Program" + ], + "params": [ + { + "type": "Indicator", + "boxMultiplier": 2, + "img": "/img/assets/block_icon/start_icon_play.png", + "highlightColor": "#3BBD70", + "size": 17, + "position": { + "x": 0, + "y": -2 + } + } + ], + "func": function () { + var entities = Ntry.entityManager.getEntitiesByComponent( + Ntry.STATIC.UNIT); + + for (var key in entities) + this._unit = entities[key]; + + Ntry.unitComp = Ntry.entityManager.getComponent( + this._unit.id, Ntry.STATIC.UNIT); + } + }, + "maze_step_jump": { + "skeleton": "basic", + "mode": "maze", + "color": "#FF6E4B", + "params": [ + { + "type": "Image", + "img": "/img/assets/week/blocks/jump.png", + "size": 24 + } + ], + "syntax": [ "Scope", "jump" ], + func: function() { + if (!this.isContinue) { + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + self.isAction = false; + }; + + Ntry.dispatchEvent("unitAction", Ntry.STATIC.JUMP, callBack); + + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "maze_step_for": { + "skeleton": "basic_loop", + "mode": "maze", + "color": "#498DEB", + "syntax": [ + "BasicIteration" + ], + "params": [ + { + "type": "Dropdown", + "key": "REPEAT", + "options": [ + [ 1, 1 ], + [ 2, 2 ], + [ 3, 3 ], + [ 4, 4 ], + [ 5, 5 ], + [ 6, 6 ], + [ 7, 7 ], + [ 8, 8 ], + [ 9, 9 ], + [ 10, 10 ] + ], + "value": 1 + }, + { + "type": "Image", + "img": "/img/assets/week/blocks/for.png", + "size": 24 + } + ], + "statements": [ + { + "accept": "basic" + } + ], + func: function() { + if (this.repeatCount === undefined) { + this.repeatCount = this.block.params[0]; + return Entry.STATIC.BREAK; + } else if (this.repeatCount > 0) { + this.repeatCount--; + var statement = this.block.statements[0]; + if (statement.getBlocks().length === 0) + return; + this.executor.stepInto(statement); + return Entry.STATIC.BREAK; + } else { + delete this.repeatCount; + } + } + }, + "test": { + "skeleton": "basic_boolean_field", + "mode": "maze", + "color": "#127CDB", + "params": [ + { + "type": "Angle", + "value": "90" + }, + { + "type": "Dropdown", + "options": [ + [ 1, 1 ], + [ 2, 2 ], + [ 3, 3 ], + [ 4, 4 ], + [ 5, 5 ], + [ 6, 6 ], + [ 7, 7 ], + [ 8, 8 ], + [ 9, 9 ], + [ 10, 10 ] + ], + "value": 1 + } + ] + }, + "maze_repeat_until_1": { + "skeleton": "basic_loop", + "mode": "maze", + "color": "#498DEB", + "syntax": [ + "BasicWhile", + "true" + ], + "params": [ + { + "type": "Image", + "img": "/img/assets/ntry/block_inner/repeat_goal_1.png", + "size": 18 + }, + { + "type": "Image", + "img": "/img/assets/week/blocks/for.png", + "size": 24 + } + ], + "statements": [ + { + "accept": "basic" + } + ], + func: function() { + var statement = this.block.statements[0]; + if (statement.getBlocks().length === 0) + return; + + this.executor.stepInto(statement); + return Entry.STATIC.BREAK; + } + }, + "maze_repeat_until_2": { + "skeleton": "basic_loop", + "mode": "maze", + "color": "#498DEB", + "syntax": [ + "BasicWhile", + "true" + ], + "params": [ + { + "type": "Image", + "img": "/img/assets/ntry/block_inner/repeat_goal_1.png", + "size": 18 + }, + { + "type": "Image", + "img": "/img/assets/week/blocks/for.png", + "size": 24 + } + ], + "statements": [ + { + "accept": "basic" + } + ] + }, + "maze_step_if_1": { + "skeleton": "basic_loop", + "mode": "maze", + "color": "#498DEB", + "syntax": [ + "BasicIf", + "front == wall" + ], + "params": [ + { + "type": "Image", + "img": "/img/assets/ntry/block_inner/if_target_1.png", + "size": 18 + }, + { + "type": "Image", + "img": "/img/assets/week/blocks/if.png", + "size": 24 + } + ], + "statements": [ + { + "accept": "basic" + } + ], + func: function() { + if (this.isContinue) + return; + var entities = + Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT); + + var entity; + for (var key in entities) + entity = entities[key]; + + var unitComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.UNIT); + var gridComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.GRID); + + var grid = {x: gridComp.x, y: gridComp.y}; + Ntry.addVectorByDirection(grid, unitComp.direction, 1); + + var existEntities = Ntry.entityManager.find( + { + type: Ntry.STATIC.GRID, + x: grid.x, + y: grid.y + }); + + var statement = this.block.statements[0]; + + if (existEntities.length === 0) { + this.executor.stepInto(statement); + return Entry.STATIC.BREAK; + } + + var fitEntities = Ntry.entityManager.find( + { + type: Ntry.STATIC.GRID, + x: grid.x, + y: grid.y + }, + { + type: Ntry.STATIC.TILE, + tileType: Ntry.STATIC.WALL + } + ); + + this.isContinue = true; + + if (fitEntities.length === 0) { + return; + } else if (statement.getBlocks().length === 0) + return; + else { + this.executor.stepInto(statement); + return Entry.STATIC.BREAK; + } + } + }, + "maze_step_if_2": { + "skeleton": "basic_loop", + "mode": "maze", + "color": "#498DEB", + "syntax": [ + "BasicIf", + "front == bee" + ], + "params": [ + { + "type": "Image", + "img": "/img/assets/ntry/bitmap/maze2/obstacle_01.png", + "size": 18 + }, + { + "type": "Image", + "img": "/img/assets/week/blocks/if.png", + "size": 24 + } + ], + "statements": [ + { + "accept": "basic" + } + ], + func: function() { + if (this.isContinue) return; + + var entities = + Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT); + + var entity; + for (var key in entities) + entity = entities[key]; + + var unitComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.UNIT); + var gridComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.GRID); + + var grid = {x: gridComp.x, y: gridComp.y}; + Ntry.addVectorByDirection(grid, unitComp.direction, 1); + + var fitEntities = Ntry.entityManager.find( + { + type: Ntry.STATIC.GRID, + x: grid.x, + y: grid.y + }, + { + type: Ntry.STATIC.TILE, + tileType: Ntry.STATIC.OBSTACLE_BEE + } + ); + + this.isContinue = true; + + var statement = this.block.statements[0]; + if (fitEntities.length === 0) { + return; + } else if (statement.getBlocks().length === 0) + return; + else { + this.executor.stepInto(statement); + return Entry.STATIC.BREAK; + } + } + }, + "maze_call_function": { + "skeleton": "basic", + "mode": "maze", + "color": "#B57242", + "syntax": [ + "Scope", + "promise" + ], + "params": [ + { + "type": "Image", + "img": "/img/assets/week/blocks/function.png", + "size": 24 + } + ], + func: function() { + if (!this.funcExecutor) { + var codes = + Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.CODE); + + for (var key in codes) { + var code = codes[key].components[Ntry.STATIC.CODE].code; + this.funcExecutor = new Entry.Executor( + code.getEventMap("define")[0] + ); + } + } + + this.funcExecutor.execute(); + if (this.funcExecutor.scope.block === null) + return; + else + return Entry.STATIC.BREAK; + } + }, + "maze_define_function": { + "skeleton": "basic_define", + "mode": "maze", + "color": "#B57242", + "event": "define", + "syntax": [ + "BasicFunction" + ], + "params": [ + { + "type": "Image", + "img": "/img/assets/week/blocks/function.png", + "size": 24 + } + ], + "statements": [ + { + "accept": "basic" + } + ], + func: function(executor) { + if (this.executed) + return; + var statement = this.block.statements[0]; + if (statement.getBlocks().length === 0) + return; + this.executor.stepInto(statement); + this.executed = true; + return Entry.STATIC.BREAK; + } + }, + "maze_step_if_3": { + "skeleton": "basic_loop", + "mode": "maze", + "color": "#498DEB", + "syntax": [ + "BasicIf", + "front == banana" + ], + "params": [ + { + "type": "Image", + "img": "/img/assets/ntry/block_inner/if_target_3.png", + "size": 18 + }, + { + "type": "Image", + "img": "/img/assets/week/blocks/if.png", + "size": 24 + } + ], + "statements": [ + { + "accept": "basic" + } + ], + func: function() { + if (this.isContinue) return; + + var entities = + Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT); + + var entity; + for (var key in entities) + entity = entities[key]; + + var unitComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.UNIT); + var gridComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.GRID); + + var grid = {x: gridComp.x, y: gridComp.y}; + Ntry.addVectorByDirection(grid, unitComp.direction, 1); + + var fitEntities = Ntry.entityManager.find( + { + type: Ntry.STATIC.GRID, + x: grid.x, + y: grid.y + }, + { + type: Ntry.STATIC.TILE, + tileType: Ntry.STATIC.OBSTACLE_BANANA + } + ); + + this.isContinue = true; + + var statement = this.block.statements[0]; + if (fitEntities.length === 0) { + return; + } else if (statement.getBlocks().length === 0) + return; + else { + this.executor.stepInto(statement); + return Entry.STATIC.BREAK; + } + } + }, + "maze_step_if_4": { + "skeleton": "basic_loop", + "mode": "maze", + "color": "#498DEB", + "syntax": [ + "BasicIf", + "front == wall" + ], + "params": [ + { + "type": "Image", + "img": "/img/assets/ntry/block_inner/if_target_2.png", + "size": 18 + }, + { + "type": "Image", + "img": "/img/assets/week/blocks/if.png", + "size": 24 + } + ], + "statements": [ + { + "accept": "basic" + } + ], + func: function() { + if (this.isContinue) return; + + var entities = + Ntry.entityManager.getEntitiesByComponent(Ntry.STATIC.UNIT); + + var entity; + for (var key in entities) + entity = entities[key]; + + var unitComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.UNIT); + var gridComp = Ntry.entityManager.getComponent( + entity.id, Ntry.STATIC.GRID); + + var grid = {x: gridComp.x, y: gridComp.y}; + Ntry.addVectorByDirection(grid, unitComp.direction, 1); + + var fitEntities = Ntry.entityManager.find( + { + type: Ntry.STATIC.GRID, + x: grid.x, + y: grid.y + }, + { + type: Ntry.STATIC.TILE, + tileType: Ntry.STATIC.WALL + } + ); + + this.isContinue = true; + + var statement = this.block.statements[0]; + if (fitEntities.length === 0) { + return; + } else if (statement.getBlocks().length === 0) + return; + else { + this.executor.stepInto(statement); + return Entry.STATIC.BREAK; + } + } + }, + "maze_step_move_step": { + "skeleton": "basic", + "mode": "maze", + "color": "#A751E3", + "syntax": [ + "Scope", + "move" + ], + "params": [ + { + "type": "Image", + "img": "/img/assets/week/blocks/moveStep.png", + "size": 24 + } + ], + func: function() { + if (!this.isContinue) { + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + self.isAction = false; + }; + // turn direction + Ntry.dispatchEvent("unitAction", Ntry.STATIC.WALK, callBack); + + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "maze_step_rotate_left": { + "skeleton": "basic", + "mode": "maze", + "color": "#A751E3", + "syntax": [ + "Scope", + "left" + ], + "params": [ + { + "type": "Image", + "img": "/img/assets/week/blocks/turnL.png", + "size": 24 + } + ], + func: function() { + if (!this.isContinue) { + + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + self.isAction = false; + }; + + // turn direction + Ntry.dispatchEvent("unitAction", Ntry.STATIC.TURN_LEFT, callBack); + + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "maze_step_rotate_right": { + "skeleton": "basic", + "mode": "maze", + "color": "#A751E3", + "syntax": [ + "Scope", + "right" + ], + "params": [ + { + "type": "Image", + "img": "/img/assets/week/blocks/turnR.png", + "size": 24 + } + ], + func: function() { + if (!this.isContinue) { + + this.isContinue = true; + this.isAction = true; + var self = this; + var callBack = function() { + self.isAction = false; + }; + + // turn direction + Ntry.dispatchEvent("unitAction", Ntry.STATIC.TURN_RIGHT, callBack); + + return Entry.STATIC.BREAK; + } else if (this.isAction) { + return Entry.STATIC.BREAK; + } else { + delete this.isAction; + delete this.isContinue; + } + } + }, + "test_wrapper": { + "skeleton": "basic", + "mode": "maze", + "color": "#3BBD70", + "params": [ + { + "type": "Block", + "accept": "basic_boolean_field", + "value": [ + { + "type": "test", + "params": [ + 30, + 50 + ] + } + ] + }, + { + "type": "Dropdown", + "options": [ + [ 1, 1 ], + [ 2, 2 ], + [ 3, 3 ], + [ 4, 4 ], + [ 5, 5 ], + [ 6, 6 ], + [ 7, 7 ], + [ 8, 8 ], + [ 9, 9 ], + [ 10, 10 ] + ], + "value": 1 + } + ] + }, + "basic_button": { + "skeleton": "basic_button", + "color": "#eee", + "params": [ + { + "type": "Text", + "text": "basic button", + "color": "#333", + "align": "center" + } + ] + }, + "dplay_get_number_sensor_value": { + "parent": "arduino_get_number_sensor_value", + "isNotFor": [ + "dplay" + ], + "def": { + "params": [ + { + "type": "arduino_get_sensor_number" + } + ], + "type": "dplay_get_number_sensor_value" + }, + "class": "arduino_value" + }, + "dplay_get_digital_value": { + "parent": "arduino_get_digital_value", + "isNotFor": [ + "dplay" + ], + "def": { + "params": [ + { + "type": "arduino_get_port_number" + } + ], + "type": "dplay_get_digital_value" + }, + "class": "arduino_value" + }, + "dplay_toggle_led": { + "parent": "arduino_toggle_led", + "isNotFor": [ + "dplay" + ], + "def": { + "params": [ + { + "type": "arduino_get_port_number" + }, + null, + null + ], + "type": "dplay_toggle_led" + }, + "class": "arduino_set" + }, + "dplay_toggle_pwm": { + "parent": "arduino_toggle_pwm", + "isNotFor": [ + "dplay" + ], + "def": { + "params": [ + { + "type": "arduino_get_pwm_port_number" + }, + { + "type": "arduino_text", + "params": [ "255" ] + }, + null + ], + "type": "dplay_toggle_pwm" + }, + "class": "arduino_set" + }, + "dplay_convert_scale": { + "parent": "arduino_convert_scale", + "isNotFor": [ + "dplay" + ], + "def": { + "params": [ + { + "type": "arduino_get_number_sensor_value", + "params": [ + { + "type": "arduino_get_sensor_number", + "id": "bl5e" + } + ] + }, + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "1023" ] + }, + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "100" ] + } + ], + "type": "dplay_convert_scale" + }, + "class": "arduino" + }, + "dplay_get_value": { + "color": "#00979D", + "fontColor": "#FFF", + "skeleton": "basic_string_field", + "statements": [], + "template": "아날로그 %1 번 %2 센서값", + "params": [{ + "type": "Block", + "accept": "string" + }, { + "type": "Dropdown", + "options": [ + ["가변저항", "ADJU"], + ["빛센서", "LIGHT"], + ["온도센서", "TEMP"], + ["조이스틱 X", "JOYS"], + ["조이스틱 Y", "JOYS"], + ["적외선", "INFR"] + ], + "value": "ADJU", + "fontSize": 11 + }], + "events": {}, + "def": { + "params": [{ + "type": "arduino_get_sensor_number", + "id": "4rx2" + }, null], + "type": "dplay_get_value", + "id": "hh5b" + }, + "paramsKeyMap": { + "VALUE": 0, + "OPERATOR": 1 + }, + "class": "dplay_set", + "isNotFor": ["dplay"], + "func": function (sprite, script) { + var signal = script.getValue("VALUE", script); + return Entry.hw.getAnalogPortValue(signal[1]); + } + }, + "dplay_get_tilt": { + "color": "#00979D", + "fontColor": "#FFF", + "skeleton": "basic_boolean_field", + "statements": [], + "template": "기울기센서 상태가 %1 ", + "params": [{ + "type": "Dropdown", + "options": [ + ["왼쪽", "LEFT"], + ["오른쪽", "LIGHT"] + ], + "value": "LEFT", + "fontSize": 11 + }], + "events": {}, + "def": { + "params": [null], + "type": "dplay_get_tilt", + "id": "edht" + }, + "paramsKeyMap": { + "STATUS": 0 + }, + "class": "dplay_set", + "isNotFor": ["dplay"], + "func": function (sprite, script) { + var value1 = script.getField("STATUS", script); + var value2 = 12; + if (value1 == "LIGHT") return Entry.hw.getDigitalPortValue(value2) == 1 ? 1 : 0; + else return Entry.hw.getDigitalPortValue(value2) == 0 ? 1 : 0; + } + }, + "dplay_DCmotor": { + "color": "#00979D", + "fontColor": "#FFF", + "skeleton": "basic", + "statements": [], + "template": "%1 DC모터 상태를 %2 %3", + "params": [{ + "type": "Dropdown", + "options": [ + ["왼쪽", "3"], + ["오른쪽", "6"] + ], + "value": "3", + "fontSize": 11 + }, { + "type": "Dropdown", + "options": [ + ["정방향", "FRONT"], + ["역방향", "REAR"], + ["정지", "OFF"] + ], + "value": "FRONT", + "fontSize": 11 + }, { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + }], + "events": {}, + "def": { + "params": [null, null, null], + "type": "dplay_DCmotor", + "id": "7b8v" + }, + "paramsKeyMap": { + "PORT": 0, + "OPERATOR": 1 + }, + "class": "dplay", + "isNotFor": ["dplay"], + "func": function (sprite, script) { + var port1 = script.getField("PORT"); + var port2 = 0; + if (port1 == "3") port2 = 5; + else if (port1 == "6") value2 = 11; + var operator = script.getField("OPERATOR"); + var value1 = 0; + var value2 = 0; + if (operator == "FRONT") { + value1 = 255; + value2 = 0; + } + else if (operator == "REAR") { + value1 = 0; + value2 = 255; + } + else if (operator == "OFF") { + value1 = 0; + value2 = 0; + } + Entry.hw.setDigitalPortValue(port1, value1); + Entry.hw.setDigitalPortValue(port2, value2); + return script.callReturn(); + } + }, + "dplay_buzzer": { + "color": "#00979D", + "fontColor": "#FFF", + "skeleton": "basic", + "statements": [], + "template": "부저를 %1 로 %2 박자로 연주하기 %3", + "params": [{ + "type": "Dropdown", + "options": [ + ["도", "1"], + ["레", "2"], + ["미", "3"] + ], + "value": "1", + "fontSize": 11 + }, { + "type": "Block", + "accept": "string" + }, { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + }], + "events": {}, + "def": { + "params": [null, { + "type": "arduino_text", + "params": ["0"], + "id": "04wh" + }, null], + "type": "dplay_buzzer", + "id": "rl5l" + }, + "paramsKeyMap": { + "PORT": 0, + "VALUE": 1 + }, + "class": "dplay", + "isNotFor": ["dplay"], + "func": function (sprite, script) { + var port1 = script.getField("PORT"); + var port = 2; + if (port1 == "1") port = 2; + else if (port1 == "2") port = 4; + else if (port1 == "3") port = 7; + var value = script.getNumberValue("VALUE"); + value = Math.round(value); + value = Math.max(value, 0); + value = Math.min(value, 100); + Entry.hw.setDigitalPortValue(port, value); + return script.callReturn(); + } + }, + "dplay_servo": { + "color": "#00979D", + "fontColor": "#FFF", + "skeleton": "basic", + "statements": [], + "template": "서보모터 각도를 %1 로 이동 %2", + "params": [{ + "type": "Block", + "accept": "string" + }, { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + }], + "events": {}, + "def": { + "params": [{ + "type": "arduino_text", + "params": ["255"], + "id": "5ld8" + }, null], + "type": "dplay_servo", + "id": "lo2z" + }, + "paramsKeyMap": { + "VALUE": 0 + }, + "class": "dplay", + "isNotFor": ["dplay"], + "func": function (sprite, script) { + var port = 9; + var value = script.getNumberValue("VALUE"); + value = Math.round(value); + value = Math.max(value, 0); + value = Math.min(value, 180); + Entry.hw.setDigitalPortValue(port, value); + return script.callReturn(); + } + }, + "dplay_select_led": { + "color": "#00979D", + "fontColor": "#FFF", + "skeleton": "basic", + "statements": [], + "template": "디지털 %1 LED 상태를 %2 %3", + "params": [{ + "type": "Dropdown", + "options": [ + ["7", "7"], + ["8", "8"], + ["9", "9"], + ["10", "10"] + ], + "value": "7", + "fontSize": 11 + }, { + "type": "Dropdown", + "options": [ + ["켜기", "on"], + ["끄기", "off"] + ], + "value": "on", + "fontSize": 11 + }, { + "type": "Indicator", + "img": "/lib/entryjs/images/block_icon/hardware_03.png", + "size": 12 + }], + "events": {}, + "def": { + "params": [null, null, null], + "type": "dplay_select_led", + "id": "9kmq" + }, + "paramsKeyMap": { + "PORT": 0, + "OPERATOR": 1 + }, + "class": "dplay", + "isNotFor": ["dplay"], + "func": function (sprite, script) { + var port1 = script.getField("PORT"); + var port = 7; + if (port1 == "7") port = 7; + else if (port1 == "8") port = 8; + else if (port1 == "9") port = 9; + else if (port1 == "10") port = 10; + var operator = script.getField("OPERATOR"); + var value = operator == "on" ? 255 : 0; + Entry.hw.setDigitalPortValue(port, value); + return script.callReturn(); + } + }, + "dplay_get_switch_status": { + "color": "#00979D", + "fontColor": "#FFF", + "skeleton": "basic_boolean_field", + "statements": [], + "template": "디지털 %1 번 스위치가 %2 ", + "params": [{ + "type": "Dropdown", + "options": [ + ["2", "2"], + ["4", "4"] + ], + "value": "2", + "fontSize": 11 + }, { + "type": "Dropdown", + "options": [ + ["눌림", "ON"], + ["열림", "OFF"] + ], + "value": "ON", + "fontSize": 11 + }], + "events": {}, + "def": { + "params": [null, null], + "type": "dplay_get_switch_status", + "id": "fik8" + }, + "paramsKeyMap": { + "PORT": 0, + "STATUS": 1 + }, + "class": "dplay_set", + "isNotFor": ["dplay"], + "func": function (sprite, script) { + var port1 = script.getField("PORT"); + var port = 2; + if (port1 == "2") port = 2; + else if (port1 == "4") port = 4; + var value1 = script.getField("STATUS"); + if (value1 == "OFF") return Entry.hw.getDigitalPortValue(port) == 1 ? 1 : 0; + else return Entry.hw.getDigitalPortValue(port) == 0 ? 1 : 0; + } + }, + "dplay_get_light_status": { + "color": "#00979D", + "fontColor": "#FFF", + "skeleton": "basic_boolean_field", + "statements": [], + "template": "빛센서가 %1 ", + "params": [{ + "type": "Dropdown", + "options": [ + ["밝음", "BRIGHT"], + ["어두움", "DARK"] + ], + "value": "BRIGHT", + "fontSize": 11 + }], + "events": {}, + "def": { + "params": [null], + "type": "dplay_get_light_status", + "id": "do3r" + }, + "paramsKeyMap": { + "STATUS": 0 + }, + "class": "dplay_set", + "isNotFor": ["dplay"], + "func": function (sprite, script) { + var value1 = script.getField("STATUS", script); + var value2 = 1; + if (value1 == "DARK") return Entry.hw.getAnalogPortValue(value2) > 800 ? 1 : 0; + else return Entry.hw.getAnalogPortValue(value2) < 800 ? 1 : 0; + } + }, + "nemoino_get_number_sensor_value": { + "parent": "arduino_get_number_sensor_value", + "isNotFor": [ + "nemoino" + ], + "def": { + "params": [ + { + "type": "arduino_get_sensor_number" + } + ], + "type": "nemoino_get_number_sensor_value" + }, + "class": "arduino_value" + }, + "nemoino_get_digital_value": { + "parent": "arduino_get_digital_value", + "isNotFor": [ + "nemoino" + ], + "def": { + "params": [ + { + "type": "arduino_get_port_number" + } + ], + "type": "nemoino_get_digital_value" + }, + "class": "arduino_value" + }, + "nemoino_toggle_led": { + "parent": "arduino_toggle_led", + "isNotFor": [ + "nemoino" + ], + "def": { + "params": [ + { + "type": "arduino_get_port_number" + }, + null, + null + ], + "type": "nemoino_toggle_led" + }, + "class": "arduino_set" + }, + "nemoino_toggle_pwm": { + "parent": "arduino_toggle_pwm", + "isNotFor": [ + "nemoino" + ], + "def": { + "params": [ + { + "type": "arduino_get_pwm_port_number" + }, + { + "type": "arduino_text", + "params": [ "255" ] + }, + null + ], + "type": "nemoino_toggle_pwm" + }, + "class": "arduino_set" + }, + "nemoino_convert_scale": { + "parent": "arduino_convert_scale", + "isNotFor": [ + "nemoino" + ], + "def": { + "params": [ + { + "type": "arduino_get_number_sensor_value", + "params": [ + { + "type": "arduino_get_sensor_number", + "id": "bl5e" + } + ] + }, + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "1023" ] + }, + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "100" ] + } + ], + "type": "nemoino_convert_scale" + }, + "class": "arduino" + }, + "sensorBoard_get_number_sensor_value": { + "parent": "arduino_get_number_sensor_value", + "isNotFor": [ + "sensorBoard" + ], + "def": { + "params": [ + { + "type": "arduino_get_sensor_number" + } + ], + "type": "sensorBoard_get_number_sensor_value" + }, + "class": "arduino_value" + }, + "sensorBoard_get_digital_value": { + "parent": "arduino_get_digital_value", + "isNotFor": [ + "sensorBoard" + ], + "def": { + "params": [ + { + "type": "arduino_get_port_number" + } + ], + "type": "sensorBoard_get_digital_value" + }, + "class": "arduino_value" + }, + "sensorBoard_toggle_led": { + "parent": "arduino_toggle_led", + "isNotFor": [ + "sensorBoard" + ], + "def": { + "params": [ + { + "type": "arduino_get_port_number" + }, + null, + null + ], + "type": "sensorBoard_toggle_led" + }, + "class": "arduino_set" + }, + "sensorBoard_toggle_pwm": { + "parent": "arduino_toggle_pwm", + "isNotFor": [ + "sensorBoard" + ], + "def": { + "params": [ + { + "type": "arduino_get_pwm_port_number" + }, + { + "type": "arduino_text", + "params": [ "255" ] + }, + null + ], + "type": "sensorBoard_toggle_pwm" + }, + "class": "arduino_set" + }, + "sensorBoard_convert_scale": { + "parent": "arduino_convert_scale", + "isNotFor": [ + "sensorBoard" + ], + "def": { + "params": [ + { + "type": "arduino_get_number_sensor_value", + "params": [ + { + "type": "arduino_get_sensor_number", + "id": "bl5e" + } + ] + }, + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "1023" ] + }, + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "100" ] + } + ], + "type": "sensorBoard_convert_scale" + }, + "class": "arduino" + }, + "CODEino_get_number_sensor_value": { + "parent": "arduino_get_number_sensor_value", + "isNotFor": [ + "CODEino" + ], + "def": { + "params": [ + { + "type": "arduino_get_sensor_number" + } + ], + "type": "CODEino_get_number_sensor_value" + }, + "class": "arduino_value" + }, + "CODEino_get_digital_value": { + "parent": "arduino_get_digital_value", + "isNotFor": [ + "CODEino" + ], + "def": { + "params": [ + { + "type": "arduino_get_port_number" + } + ], + "type": "CODEino_get_digital_value" + }, + "class": "arduino_value" + }, + "CODEino_toggle_led": { + "parent": "arduino_toggle_led", + "isNotFor": [ + "CODEino" + ], + "def": { + "params": [ + { + "type": "arduino_get_port_number" + }, + null, + null + ], + "type": "CODEino_toggle_led" + }, + "class": "arduino_set" + }, + "CODEino_toggle_pwm": { + "parent": "arduino_toggle_pwm", + "isNotFor": [ + "CODEino" + ], + "def": { + "params": [ + { + "type": "arduino_get_pwm_port_number" + }, + { + "type": "arduino_text", + "params": [ "255" ] + }, + null + ], + "type": "CODEino_toggle_pwm" + }, + "class": "arduino_set" + }, + "CODEino_convert_scale": { + "parent": "arduino_convert_scale", + "isNotFor": [ + "CODEino" + ], + "def": { + "params": [ + { + "type": "arduino_get_number_sensor_value", + "params": [ + { + "type": "arduino_get_sensor_number", + "id": "bl5e" + } + ] + }, + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "1023" ] + }, + { + "type": "number", + "params": [ "0" ] + }, + { + "type": "number", + "params": [ "100" ] + } + ], + "type": "CODEino_convert_scale" + }, + "class": "arduino" + } +}; + +(function() { + for (var type in Entry.block) { + var block = Entry.block[type]; + if (block.parent) { + var f = function() {}; + f.prototype = Entry.block[block.parent]; + var schema = new f(); + for (var key in block) { + schema[key] = block[key]; + } + Entry.block[type] = schema; + } + } +})(); + +if (typeof exports == "object") { + exports.block = Entry.block; +} + diff --git a/src/workspace/block_menu.js b/src/workspace/block_menu.js index 24f2ec6a74..9445b1694f 100644 --- a/src/workspace/block_menu.js +++ b/src/workspace/block_menu.js @@ -10,9 +10,13 @@ goog.require("Entry.Utils"); * * @param {object} dom which to inject playground */ -Entry.BlockMenu = function(dom, align) { +Entry.BlockMenu = function(dom, align, categoryData, scroll) { Entry.Model(this, false); this._align = align || "CENTER"; + this._scroll = scroll !== undefined ? scroll : false; + this._bannedClass = []; + this._categories = []; + this.suffix = 'blockMenu'; if (typeof dom === "string") dom = $('#' + dom); else dom = $(dom); @@ -20,38 +24,50 @@ Entry.BlockMenu = function(dom, align) { if (dom.prop("tagName") !== "DIV") return console.error("Dom is not div element"); - if (typeof window.Snap !== "function") - return console.error("Snap library is required"); + this.view = dom; - this.svgDom = Entry.Dom( - $(''), - { parent: dom } - ); + this.visible = true; + this._svgId = 'blockMenu' + new Date().getTime(); + this._clearCategory(); + this._generateView(categoryData); - this.offset = this.svgDom.offset(); - this._svgWidth = this.svgDom.width(); + this._splitters = []; + this.setWidth(); - this.snap = Snap('#blockMenu'); + this.svg = Entry.SVG(this._svgId); + Entry.Utils.addFilters(this.svg, this.suffix); + this.patternRect = Entry.Utils.addBlockPattern(this.svg, this.suffix); - this.svgGroup = this.snap.group(); + this.svgGroup = this.svg.elem("g"); - this.svgThreadGroup = this.svgGroup.group(); + this.svgThreadGroup = this.svgGroup.elem("g"); this.svgThreadGroup.board = this; - this.svgBlockGroup = this.svgGroup.group(); + this.svgBlockGroup = this.svgGroup.elem("g"); this.svgBlockGroup.board = this; this.changeEvent = new Entry.Event(this); - //TODO scroller should be attached - //this.scroller = new Entry.Scroller(this, false, true); + if (categoryData) this._generateCategoryCodes(categoryData); + + this.observe(this, "_handleDragBlock", ["dragBlock"]); + + if (this._scroll) { + this._scroller = new Entry.BlockMenuScroller(this); + this._addControl(dom); + } - this.observe(this, "generateDragBlockObserver", ['dragBlock']); if (Entry.documentMousedown) Entry.documentMousedown.attach(this, this.setSelectedBlock); + if (this._categoryCodes && Entry.keyPressed) + Entry.keyPressed.attach(this, this._captureKeyEvent); + if (Entry.windowResized) { + var dUpdateOffset = _.debounce(this.updateOffset, 200); + Entry.windowResized.attach(this, dUpdateOffset); + } }; (function(p) { + var splitterHPadding = 20; p.schema = { code: null, dragBlock: null, @@ -59,13 +75,73 @@ Entry.BlockMenu = function(dom, align) { selectedBlockView: null }; + p._generateView = function(categoryData) { + var parent = this.view; + var that = this; + + if (categoryData) { + this._categoryCol = Entry.Dom('ul', { + class: 'entryCategoryListWorkspace', + parent: parent + }); + + this._generateCategoryView(categoryData); + } + + this.blockMenuContainer = Entry.Dom('div', { + 'class':'blockMenuContainer', + 'parent':parent + }); + + this.svgDom = Entry.Dom( + $(''), + { parent: this.blockMenuContainer } + ); + + this.svgDom.mouseenter(function(e) { + if (that._scroller) that._scroller.setOpacity(1); + + var selectedBlockView = that.workspace.selectedBlockView; + if (!Entry.playground || Entry.playground.resizing || + (selectedBlockView && selectedBlockView.dragMode === Entry.DRAG_MODE_DRAG)) return; + Entry.playground.focusBlockMenu = true; + var bBox = that.svgGroup.getBBox(); + var expandWidth = bBox.width + bBox.x + 64; + if (expandWidth > Entry.interfaceState.menuWidth) { + this.widthBackup = Entry.interfaceState.menuWidth - 64; + $(this).stop().animate({ + width: expandWidth - 62 + }, 200); + } + }); + + this.svgDom.mouseleave(function(e) { + if (!Entry.playground || Entry.playground.resizing) return; + + if (that._scroller) + that._scroller.setOpacity(0); + + var widthBackup = this.widthBackup; + if (widthBackup) + $(this).stop().animate({ + width: widthBackup + }, 200); + delete this.widthBackup; + delete Entry.playground.focusBlockMenu; + }); + + $(window).scroll(function() { + that.updateOffset(); + }); + }; + p.changeCode = function(code) { if (!(code instanceof Entry.Code)) return console.error("You must inject code instance"); if (this.codeListener) this.code.changeEvent.detach(this.codeListener); - this.set({code: code}); var that = this; + this.set({code:code}); this.codeListener = this.code.changeEvent.attach( this, function() {that.changeEvent.notify();} @@ -79,98 +155,98 @@ Entry.BlockMenu = function(dom, align) { this.svgThreadGroup.remove(); this.svgBlockGroup = codeView.svgBlockGroup; this.svgThreadGroup = codeView.svgThreadGroup; - this.svgGroup.append(this.svgThreadGroup); - this.svgGroup.append(this.svgBlockGroup); + this.svgGroup.appendChild(this.svgThreadGroup); + this.svgGroup.appendChild(this.svgBlockGroup); + if (this._scroller) + this.svgGroup.appendChild(this._scroller.svgGroup); }; p.align = function() { + if (!this.code) return; + this._clearSplitters(); + var threads = this.code.getThreads(); var vPadding = 15, marginFromTop = 10, - hPadding = this._align == 'LEFT' ? 20 : this.svgDom.width()/2; + hPadding = this._align == 'LEFT' ? 10 : this.svgDom.width()/2; + var pastClass; for (var i=0,len=threads.length; i=0; i--) { + splitters[i].remove(); + splitters.pop(); + } + }; + + p.setWidth = function() { + this._svgWidth = this.blockMenuContainer.width(); + this.updateSplitters(); + }; + + p.setMenu = function() { + var categoryCodes = this._categoryCodes; + var elems = this._categoryElems; + for (var key in categoryCodes) { + var code = categoryCodes[key]; + if (!(code instanceof Entry.Code)) + code = categoryCodes[key] = new Entry.Code(code); + var threads = code.getThreads(); + + var count = threads.length; + for (var i=0; i -1) + this._bannedClass.splice(index, 1); + this.align(); + }; + + p.checkBanClass = function(blockInfo) { + if (!blockInfo) return; + var isNotFor = blockInfo.isNotFor; + for (var i in this._bannedClass) { + if (isNotFor && isNotFor.indexOf(this._bannedClass[i]) > -1) + return true; + } + return false; + }; + + p._addControl = function(dom) { + var that = this; + var svgDom = this.svgDom; + dom.on('wheel', function(){ + that._mouseWheel.apply(that, arguments); + }); + }; + + p._mouseWheel = function(e) { + e = e.originalEvent; + e.preventDefault(); + var disposeEvent = Entry.disposeEvent; + if (disposeEvent) + disposeEvent.notify(e); + this._scroller.scroll( + -e.wheelDeltaY || e.deltaY / 3 + ); + }; + + p.dominate = function(block) { + this.svgBlockGroup + .appendChild(block.view.svgGroup); + }; + + p.reDraw = function() { + this.selectMenu(this.lastSelector, true); + var codeView = this.code && this.code.view ? this.code.view : null; + if (codeView) codeView.reDraw(); + }; + + p._handleDragBlock = function() { + this._boardBlockView = null; + if (this._scroller) this._scroller.setOpacity(0); + }; + + p._captureKeyEvent = function(e) { + var keyCode = e.keyCode; + var type = Entry.type; + + if (e.ctrlKey && type == 'workspace') { + if (keyCode > 48 && keyCode < 58) { + e.preventDefault(); + this.selectMenu(keyCode - 49); } } }; - p.setSelectedBlock = function(blockView) { - var old = this.selectedBlockView; + p.setPatternRectFill = function(color) { + this.patternRect.attr({fill:color}); + }; - if (old) old.removeSelected(); + p._clearCategory = function() { + this._selectedCategoryView = null; + this._categories = []; - if (blockView instanceof Entry.BlockView) { - blockView.addSelected(); - } else blockView = null; + var categories = this._categoryElems; + for (var key in categories) + categories[key].remove(); + this._categoryElems = {}; - this.set({selectedBlockView:blockView}); + categories = this._categoryCodes; + for (key in categories) { + var code = categories[key]; + if (code.constructor == Entry.Code) + code.clear(); + } + this._categoryCodes = null; + }; + + p.setCategoryData = function(data) { + this._clearCategory(); + this._generateCategoryView(data); + this._generateCategoryCodes(data); + }; + + p._generateCategoryView = function(data) { + if (!data) return; + var that = this; + + for (var i=0; i Entry.BlockView.DRAG_RADIUS) { + if (!blockView.movable) return; + + if (!blockView.isInBlockMenu) { + var isFirst = false; + if (blockView.dragMode != Entry.DRAG_MODE_DRAG) { + blockView._toGlobalCoordinate(); + blockView.dragMode = Entry.DRAG_MODE_DRAG; + blockView.block.getThread().changeEvent.notify(); + Entry.GlobalSvg.setView(blockView, workspaceMode); + isFirst = true; + } - if (this.animating) - this.set({animating: false}); + if (this.animating) + this.set({animating: false}); - if (blockView.dragInstance.height === 0) { - var block = blockView.block; - var height = - 1; - while (block) { - height += block.view.height + 1; - block = block.next; + if (blockView.dragInstance.height === 0) { + var block = blockView.block; + var height = - 1 + blockView.height; + blockView.dragInstance.set({ + height: height + }); } - blockView.dragInstance.set({ - height: height - }); - } - if (e.originalEvent.touches) { - e = e.originalEvent.touches[0]; - } - var dragInstance = blockView.dragInstance; - blockView._moveBy( - e.pageX - dragInstance.offsetX, - e.pageY - dragInstance.offsetY, - false - ); - dragInstance.set({ - offsetX: e.pageX, - offsetY: e.pageY - }); - blockView.dragMode = Entry.DRAG_MODE_DRAG; + var dragInstance = blockView.dragInstance; + blockView._moveBy( + mouseEvent.pageX - dragInstance.offsetX, + mouseEvent.pageY - dragInstance.offsetY, + false + ); + dragInstance.set({ + offsetX: mouseEvent.pageX, + offsetY: mouseEvent.pageY + }); - var magnetedBlock = blockView._getCloseBlock(); - if (magnetedBlock) { - board = magnetedBlock.view.getBoard(); - board.setMagnetedBlock(magnetedBlock.view); + Entry.GlobalSvg.position(); + blockView._updateCloseBlock(); + if (!blockView.originPos) + blockView.originPos = {x: blockView.x, y: blockView.y}; + if (isFirst) + board.generateCodeMagnetMap(); } else { - board.setMagnetedBlock(null); + board.cloneToGlobal(e); } } } function onMouseUp(e) { $(document).unbind('.block'); - delete this.mouseDownCoordinate; - blockView.terminateDrag(); + blockView.terminateDrag(e); if (board) board.set({dragBlock: null}); + blockView._changeFill(false); + Entry.GlobalSvg.remove(); + delete this.mouseDownCoordinate; delete blockView.dragInstance; } - e.stopPropagation(); }; - p.terminateDrag = function() { + p.vimBoardEvent = function(event, type, block) { + if (event) { + var dragEvent = Entry.Utils.createMouseEvent(type, event); + + if (block) dragEvent.block = block; + + var _vimBoard = document.getElementsByClassName('CodeMirror')[0]; + _vimBoard.dispatchEvent(dragEvent); + } + }; + + p.terminateDrag = function(e) { var board = this.getBoard(); var dragMode = this.dragMode; var block = this.block; + var workspaceMode = board.workspace.getMode(); this.removeDragging(); - if (board instanceof Entry.BlockMenu) { - board.terminateDrag(); - } else if (dragMode !== Entry.DRAG_MODE_MOUSEDOWN) { - if (this.dragInstance && this.dragInstance.isNew) - block.doAdd(); - var prevBlock = this.dragInstance && this.dragInstance.prev; - var closeBlock = this._getCloseBlock(); - if (!prevBlock && !closeBlock) { - if (dragMode == Entry.DRAG_MODE_DRAG) - block.doMove(); - } else { - if (closeBlock) { - this.set({animating: true}); - if (closeBlock.next) - closeBlock.next.view.set({animating: true}); - block.doInsert(closeBlock); - createjs.Sound.play('entryMagneting'); - } else block.doSeparate(); + this.set({visible:true}); + this.dragMode = Entry.DRAG_MODE_NONE; + + if (workspaceMode === Entry.Workspace.MODE_VIMBOARD) { + if (board instanceof Entry.BlockMenu) { + board.terminateDrag(); + this.vimBoardEvent(e, 'dragEnd', block); + } else board.clear(); + } else { + if (dragMode === Entry.DRAG_MODE_DRAG) { + var fromBlockMenu = this.dragInstance && this.dragInstance.isNew; + if (fromBlockMenu) { + var removed = board.workspace.blockMenu.terminateDrag(); + if (!removed) { + block._updatePos(); + //Entry.do("addBlock", block); + } + } + + var gs = Entry.GlobalSvg; + var ripple = false; + var prevBlock = this.block.getPrevBlock(this.block); + var ripple = false; + switch (Entry.GlobalSvg.terminateDrag(this)) { + case gs.DONE: + var closeBlock = board.magnetedBlockView; + if (closeBlock instanceof Entry.BlockView) closeBlock = closeBlock.block; + if (prevBlock && !closeBlock) { + Entry.do("separateBlock", block); + } else if (!prevBlock && !closeBlock && !fromBlockMenu) { + if (!block.getThread().view.isGlobal()) { + Entry.do("separateBlock", block); + } else { + Entry.do("moveBlock", block); + } + } else { + if (closeBlock) { + if (closeBlock.view.magneting === "next") { + var lastBlock = block.getLastBlock(); + Entry.do("insertBlock", closeBlock, lastBlock).isPass(fromBlockMenu); + } else { + Entry.do("insertBlock", block, closeBlock).isPass(fromBlockMenu); + } + createjs.Sound.play('entryMagneting'); + ripple = true; + } else { + Entry.do("moveBlock", block).isPass(fromBlockMenu); + } + } + break; + case gs.RETURN: + var block = this.block; + var originPos = this.originPos; + if (prevBlock) { + this.set({animating: false}); + createjs.Sound.play('entryMagneting'); + this.bindPrev(prevBlock); + block.insert(prevBlock); + } else { + var parent = block.getThread().view.getParent(); + + if (!(parent instanceof Entry.Board)) { + createjs.Sound.play('entryMagneting'); + Entry.do("insertBlock", block, parent); + } else this._moveTo(originPos.x, originPos.y, false); + } + break; + case gs.REMOVE: + createjs.Sound.play('entryDelete'); + if (!fromBlockMenu) { + this.block.doDestroyBelow(false); + } else { + this.block.destroy(false, true); + } + break; + } + board.setMagnetedBlock(null); + if (ripple) { + Entry.ConnectionRipple + .setView(block.view) + .dispose(); + } } - board.setMagnetedBlock(null); } - this.dragMode = Entry.DRAG_MODE_NONE; this.destroyShadow(); - + delete this.originPos; + this.dominate(); return; }; - p._getCloseBlock = function() { - var board = this.getBoard(); - var isInBlockMenu = board instanceof Entry.BlockMenu; - var x = this.x, - y = this.y; - - if (isInBlockMenu) { - x -= board._svgWidth; - board = board.workspace.getBoard(); - } - - var offset = board.relativeOffset; - var targetElement = Snap.getElementByPoint( - x + offset.left, y + offset.top - ); - if (targetElement === null) return; - - var targetBlock = targetElement.block; - - while (!targetBlock && - targetElement.parent() && - targetElement.type !== "svg" && - targetElement.type !== "BODY") { - targetElement = targetElement.parent(); - targetBlock = targetElement.block; + p._updateCloseBlock = function() { + var board = this.getBoard(), + closeBlock; + if (!this._skeleton.magnets) return; + for (var type in this.magnet) { + var magnet = this.magnet[type]; + if (type === "next") { + closeBlock = this.getBoard().getNearestMagnet( + this.x, this.y + this.getBelowHeight(), type); + } else { + closeBlock = this.getBoard().getNearestMagnet( + this.x, this.y, type); + } + if (closeBlock) + return board.setMagnetedBlock(closeBlock.view, type); } - if (targetBlock === undefined) return null; - if (targetBlock === this.block) return null; - if (isInBlockMenu) return targetBlock; - return targetBlock.view.getBoard() == - board ? targetBlock : null; + board.setMagnetedBlock(null); }; - p._inheritAnimate = function() { - var prevBlockView = this.block.prev.view; - if (prevBlockView) - this.set({animating: prevBlockView.animating}); + p.dominate = function() { + var threadView = this.block.getThread().view; + threadView.dominate(); }; - p.dominate = function() { + p.getSvgRoot = function() { var svgBlockGroup = this.getBoard().svgBlockGroup; - var node = this.svgGroup; - while (node.parent() !== svgBlockGroup) - node = node.parent(); - - svgBlockGroup.append(node); + while (node.parentNode !== svgBlockGroup) + node = node.parentNode; + return node; }; p.getBoard = function() {return this._board;}; @@ -457,48 +681,95 @@ Entry.BlockView = function(block, board) { }; p.destroy = function(animate) { + this._destroyObservers(); var svgGroup = this.svgGroup; if (animate) { - svgGroup.animate( - { opacity: 0 }, - 100, - null, - function(){ - this.remove(); - } - ); + $(svgGroup).fadeOut(100, function() { + svgGroup.remove(); + }); } else svgGroup.remove(); + + this._contents.forEach(function(c) { + if (c.constructor !== Entry.Block) c.destroy(); + }); + + var block = this.block; + var events = block.events.viewDestroy; + if (events && !this.isInBlockMenu) + events.forEach(function(fn){ + if (Entry.Utils.isFunction(fn)) fn(block); + }); + + if (this._schemaChangeEvent) + this._schemaChangeEvent.destroy(); }; p.getShadow = function() { if (!this._shadow) { - this._shadow = this.svgGroup.clone(); - this._shadow.attr({ - opacity: 0.5 - }); + this._shadow = Entry.SVG.createElement( + this.svgGroup.cloneNode(true), + { opacity: 0.5 } + ); + this.getBoard().svgGroup.appendChild(this._shadow); } return this._shadow; }; p.destroyShadow = function() { - delete this._shadow; + if (this._shadow) { + this._shadow.remove(); + delete this._shadow; + } + }; + + p._updateMagnet = function() { + if (!this._skeleton.magnets) return; + var magnet = this._skeleton.magnets(this); + if (magnet.next) + this._nextGroup.attr( + "transform", "translate(" + magnet.next.x + ',' + magnet.next.y + ")" + ); + this.magnet = magnet; + this.block.getThread().changeEvent.notify(); }; p._updateBG = function() { if (!this._board.dragBlock || !this._board.dragBlock.dragInstance) return; - var dragThreadHeight = this._board.dragBlock.dragInstance.height; var blockView = this; + var svgGroup = blockView.svgGroup; + if (!this.magnet.next) {// field block + if (this.magneting) { + svgGroup.attr({ + filter: 'url(#entryBlockHighlightFilter_' + this.getBoard().suffix + ')' + }); + svgGroup.addClass('outputHighlight'); + } else { + svgGroup.removeClass('outputHighlight'); + svgGroup.removeAttr('filter'); + } + return; + } var magneting = blockView.magneting; var block = blockView.block; - var svgGroup = blockView.svgGroup; if (magneting) { var shadow = this._board.dragBlock.getShadow(); - $(shadow.node).attr({ - transform: 'translate(0 ' + (this.height + 1) + ')' + var pos = this.getAbsoluteCoordinate(); + var magnet, transform; + if (magneting === "previous") { + magnet = this.magnet.next; + transform = 'translate(' + (pos.x + magnet.x) + ',' + (pos.y + magnet.y) + ')'; + } else if (magneting === "next") { + magnet = this.magnet.previous; + var dragHeight = this._board.dragBlock.getBelowHeight(); + transform = 'translate(' + (pos.x + magnet.x) + ',' + (pos.y + magnet.y - dragHeight) + ')'; + } + $(shadow).attr({ + transform: transform, + display: 'block' }); - this.svgGroup.prepend(shadow); + this._clonedShadow = shadow; if (blockView.background) { @@ -507,86 +778,37 @@ Entry.BlockView = function(block, board) { delete blockView.background; delete blockView.nextBackground; } - var height = blockView.height + dragThreadHeight; - var nextBg = svgGroup.rect( - 0 - blockView.width/2, - blockView.height * 1.5 + 1, - blockView.width, - Math.max(0, height - blockView.height * 1.5) - ); - nextBg.block = blockView.block.next; - blockView.nextBackground = nextBg; - - nextBg.attr({ - fill: 'transparent' - }); - svgGroup.prepend(nextBg); - - var bg = svgGroup.rect( - 0 - blockView.width/2, - 0, - blockView.width, - height - ); - blockView.background = bg; - - bg.attr({ - fill: 'transparent' - }); - svgGroup.prepend(bg); + if (magneting === "previous") { + var height = this._board.dragBlock.getBelowHeight() + this.offsetY; - blockView.originalHeight = blockView.height; - blockView.set({ - height: height - }); + blockView.originalHeight = blockView.offsetY; + blockView.set({ + offsetY: height, + }); + } } else { if (this._clonedShadow) { - this._clonedShadow.remove(); + this._clonedShadow.attr({display: 'none'}); delete this._clonedShadow; } var height = blockView.originalHeight; - if (height) { - setTimeout(function() { - if (blockView.background) { - blockView.background.remove(); - blockView.nextBackground.remove(); - delete blockView.background; - delete blockView.nextBackground; - } - }, Entry.ANIMATION_DURATION); + if (height !== undefined) { + if (blockView.background) { + blockView.background.remove(); + blockView.nextBackground.remove(); + delete blockView.background; + delete blockView.nextBackground; + } blockView.set({ - height: height + offsetY: height }); delete blockView.originalHeight; } - - } - blockView.block.thread.changeEvent.notify(); - }; - - p._createEmptyBG = function() { - var blockView = this; - if (!this.block.next) { - var bg = this.svgGroup.rect( - 0 + blockView.offsetX, - blockView.height, - blockView.width, - 20 - ); - blockView.emptyBackground = bg; - - bg.attr({ - fill: 'transparent' - }); - this.svgGroup.prepend(bg); - } else { - if (blockView.emptyBackground) { - blockView.emptyBackground.remove(); - delete blockView.emptyBackground; - } } + var changeEvent = blockView.block.thread.changeEvent; + if (changeEvent) changeEvent.notify(); }; p.addDragging = function() { @@ -607,4 +829,179 @@ Entry.BlockView = function(block, board) { p.getSkeleton = function() {return this._skeleton;}; + p.getContentPos = function() { + return this._skeleton.contentPos(this); + }; + + p.renderText = function() { + this._startContentRender(Entry.Workspace.MODE_VIMBOARD); + }; + + p.renderBlock = function() { + this._startContentRender(Entry.Workspace.MODE_BOARD); + }; + + p._updateOpacity = function() { + this.svgGroup.attr({ + opacity:this.visible === false ? 0 : 1 + }); + + if (this.visible) this._setPosition(); + }; + + p._updateShadow = function() { + var shadow = this.shadow; + var fill; + + if (shadow) fill = Entry.Utils.colorDarken(this._schema.color, 0.7); + else fill = 'transparent'; + }; + + p._setMovable = function() { + this.movable = this.block.isMovable() !== null ? this.block.isMovable() : + (this._skeleton.movable !== undefined ? this._skeleton.movable : true); + }; + + p._setReadOnly = function() { + this.readOnly = this.block.isReadOnly() !== null ? this.block.isReadOnly() : + (this._skeleton.readOnly !== undefined ? this._skeleton.readOnly : false); + }; + + p._setCopyable = function() { + this.copyable = this.block.isCopyable() !== null ? this.block.isCopyable() : + (this._skeleton.copyable !== undefined ? this._skeleton.copyable : true); + }; + + p.bumpAway = function(distance, delay) { + var that = this; + distance = distance || 15; + if (delay) { + window.setTimeout(function() { + that._moveBy(distance, distance, false); + }, delay); + } else that._moveBy(distance, distance, false); + }; + + p.bindPrev = function(prevBlock) { + if (prevBlock) { + this._toLocalCoordinate(prevBlock.view._nextGroup); + var nextBlock = prevBlock.getNextBlock(); + if (nextBlock && nextBlock !== this.block) { + var endBlock = this.block.getLastBlock(); + if (endBlock.view.magnet.next) + nextBlock.view._toLocalCoordinate(endBlock.view._nextGroup); + else { + nextBlock.view._toGlobalCoordinate(); + nextBlock.separate(); + nextBlock.view.bumpAway(null, 100); + } + } + } else { + prevBlock = this.block.getPrevBlock(); + if (prevBlock) { + var prevBlockView = prevBlock.view; + + this._toLocalCoordinate(prevBlockView._nextGroup); + var nextBlock = this.block.getNextBlock(); + if (nextBlock && nextBlock.view) + nextBlock.view._toLocalCoordinate(this._nextGroup); + } + } + }; + + p.getAbsoluteCoordinate = function(dragMode) { + dragMode = dragMode !== undefined ? dragMode : this.dragMode; + if (dragMode === Entry.DRAG_MODE_DRAG) + return {x: this.x, y: this.y}; + var threadView = this.block.getThread().view; + var pos = threadView.requestAbsoluteCoordinate(this); + pos.x += this.x; + pos.y += this.y; + return pos; + }; + + p.getBelowHeight = function() { + var threadView = this.block.getThread().view; + return threadView.requestPartHeight(this); + }; + + p._updateDisplay = function() { + this.svgGroup.attr({ + display:this.display === false ? 'none' : 'block' + }); + + if (this.display) this._setPosition(); + }; + + p._updateColor = function() { + var fillColor = this._schema.color; + if (this.block.deletable === Entry.Block.DELETABLE_FALSE_LIGHTEN) + fillColor = Entry.Utils.colorLighten(fillColor); + this._fillColor = fillColor; + this._path.attr({fill:fillColor}); + this._updateContents(); + }; + + p._updateContents = function() { + for (var i=0; i'), - { parent: dom } - ); - - var zoom = document.documentElement.clientWidth / window.innerWidth; - this.offset = this.svgDom.offset(); - this.offset.top = 130; - this.offset.left -= $(window).scrollLeft(); - this.relativeOffset = this.offset; - var that = this; - $(window).scroll(updateOffset); - Entry.windowResized.attach(this, updateOffset); - function updateOffset(e) { - var w = $(window), - scrollTop = w.scrollTop(), - scrollLeft = w.scrollLeft(), - offset = that.offset; - - that.relativeOffset = { - top: offset.top - scrollTop, - left: offset.left - scrollLeft - }; - console.log('update'); - } - - this.snap = Snap('#play'); - - this._blockViews = []; - - this.trashcan = new Entry.FieldTrashcan(this); - this.svgGroup = this.snap.group(); + this.createView(option); + this.updateOffset(); - this.svgThreadGroup = this.svgGroup.group(); - this.svgThreadGroup.board = this; + this.scroller = new Entry.Scroller(this, true, true); - this.svgBlockGroup = this.svgGroup.group(); - this.svgBlockGroup.board = this; + this._magnetMap = {}; Entry.ANIMATION_DURATION = 200; Entry.BOARD_PADDING = 100; - this.changeEvent = new Entry.Event(this); - this.scroller = new Entry.Scroller(this, true, true); - this._addControl(dom); - if (Entry.documentMousedown) - Entry.documentMousedown.attach(this, this.setSelectedBlock); - if (Entry.keyPressed) - Entry.keyPressed.attach(this, this._keyboardControl); + this._initContextOptions(); + Entry.Utils.disableContextmenu(this.svgDom); + + this._addControl(); + this._bindEvent(); }; +Entry.Board.OPTION_PASTE = 0; +Entry.Board.OPTION_ALIGN = 1; +Entry.Board.OPTION_CLEAR = 2; + (function(p) { p.schema = { code: null, @@ -90,17 +49,74 @@ Entry.Board = function(dom) { selectedBlockView: null }; + p.createView = function(option) { + var dom = option.dom; + if (typeof dom === "string") + dom = $('#' + dom); + else + dom = $(dom); + + if (dom.prop("tagName") !== "DIV") + return console.error("Dom is not div element"); + + this.view = dom; + this._svgId = 'play' + new Date().getTime(); + + this.workspace = option.workspace; + + this._activatedBlockView = null; + + this.wrapper = Entry.Dom('div', { + parent: dom, + class: 'entryBoardWrapper' + }); + + this.svgDom = Entry.Dom( + $(''), + { parent: this.wrapper } + ); + + this.visible = true; + var that = this; + this.svg = Entry.SVG(this._svgId); + $(window).scroll(function() { + that.updateOffset(); + }); + + this.svgGroup = this.svg.elem("g"); + + this.svgThreadGroup = this.svgGroup.elem("g"); + this.svgThreadGroup.board = this; + + this.svgBlockGroup = this.svgGroup.elem("g"); + this.svgBlockGroup.board = this; + + if (option.isOverlay) { + this.wrapper.addClass("entryOverlayBoard"); + this.generateButtons(); + this.suffix = 'overlayBoard'; + } else this.suffix = 'board'; + + Entry.Utils.addFilters(this.svg, this.suffix); + this.patternRect = Entry.Utils.addBlockPattern(this.svg, this.suffix); + }; + p.changeCode = function(code) { - if (this.codeListener) + if (this.code && this.codeListener) this.code.changeEvent.detach(this.codeListener); + this.set({code: code}); + var that = this; - this.codeListener = this.code.changeEvent.attach( - this, - function() {that.changeEvent.notify();} - ); - code.createView(this); - this.changeEvent.notify(); + if (code) { + this.codeListener = this.code.changeEvent.attach( + this, function() {that.changeEvent.notify();} + ); + code.createView(this); + this.generateCodeMagnetMap(code); + } + this.scroller.resizeScrollBar(); }; p.bindCodeView = function(codeView) { @@ -108,11 +124,11 @@ Entry.Board = function(dom) { this.svgThreadGroup.remove(); this.svgBlockGroup = codeView.svgBlockGroup; this.svgThreadGroup = codeView.svgThreadGroup; - this.svgGroup.append(this.svgThreadGroup); - this.svgGroup.append(this.svgBlockGroup); + this.svgGroup.appendChild(this.svgThreadGroup); + this.svgGroup.appendChild(this.svgBlockGroup); }; - p.setMagnetedBlock = function(block) { + p.setMagnetedBlock = function(block, magnetType) { if (this.magnetedBlockView) { if (this.magnetedBlockView === block) return; @@ -121,9 +137,8 @@ Entry.Board = function(dom) { } this.set({magnetedBlockView: block}); if (block) { - block.set({magneting: true, animating: true}); + block.set({magneting: magnetType}); block.dominate(); - this.dragBlock.dominate(); } }; @@ -132,22 +147,11 @@ Entry.Board = function(dom) { }; p.findById = function(id) { - var code = this.code; - var threads = code.getThreads(); - for (var i=0,len=threads.length; i limitTopPosition) { + left = left + columWidth + 10; + columWidth = 0; + acculmulatedTop = 15; + } + columWidth = Math.max(columWidth, bBox.width); + top = acculmulatedTop + verticalGap; + blockView._moveTo(left, top, false); + acculmulatedTop = acculmulatedTop + bBox.height + verticalGap; + } + this.scroller.resizeScrollBar(); + }; + + p.clear = function() { + this.svgBlockGroup.remove(); + this.svgThreadGroup.remove(); + }; + + p.updateOffset = function () { + this._offset = this.svg.getBoundingClientRect(); + var w = $(window), + scrollTop = w.scrollTop(), + scrollLeft = w.scrollLeft(), + offset = this._offset; + + this.relativeOffset = { + top: offset.top - scrollTop, + left: offset.left - scrollLeft + }; + + if (this.btnWrapper) { + this.btnWrapper.attr({ + "transform": "translate(" + + (offset.width / 2 - 65) + "," + + (offset.height - 200) +")" + }); + } + }; + + p.generateButtons = function() { + var that = this; + var btnWrapper = this.svgGroup.elem("g"); + this.btnWrapper = btnWrapper; + + var saveText = btnWrapper.elem('text', { + x: 27, y: 33, class: 'entryFunctionButtonText' + }); + saveText.textContent = Lang.Buttons.save; + + var cancelText = btnWrapper.elem('text', { + x: 102.5, y: 33, class: 'entryFunctionButtonText' + }); + cancelText.textContent = Lang.Buttons.cancel; + + var saveButton = btnWrapper.elem('circle', { + cx: 27.5, cy: 27.5, r: 27.5, class: 'entryFunctionButton' + }); + + var cancelButton = btnWrapper.elem('circle', { + cx: 102.5, cy: 27.5, r: 27.5, class: 'entryFunctionButton' + }); + + saveButton.onclick = function(e) { that.save(); }; + saveText.onclick = function(e) { that.save(); }; + + cancelButton.onclick = function(e) { that.cancelEdit(); }; + cancelText.onclick = function(e) { that.cancelEdit(); }; + }; + + p.cancelEdit = function() { + this.workspace.setMode(Entry.Workspace.MODE_BOARD, "cancelEdit"); + }; + + p.save = function() { + this.workspace.setMode(Entry.Workspace.MODE_BOARD, "save"); + }; + + p.generateCodeMagnetMap = function() { + var code = this.code; + if (!code || !this.dragBlock) return; + + for (var targetType in this.dragBlock.magnet) { + var metaData = this._getCodeBlocks(code, targetType); + metaData.sort(function(a, b) {return a.point - b.point;}); + + metaData.unshift({ + point: - Number.MAX_VALUE, + blocks: [] + }); + for (var i = 1; i < metaData.length; i++) { + var pointData = metaData[i]; + var includeData = pointData; + var block = pointData.startBlock; + if (block) { + var limit = pointData.endPoint, + index = i; + while (limit > includeData.point) { + includeData.blocks.push(block); + index++; + includeData = metaData[index]; + if (!includeData) + break; + } + delete pointData.startBlock; + } + pointData.endPoint = Number.MAX_VALUE; + metaData[i - 1].endPoint = pointData.point; + } + + this._magnetMap[targetType] = metaData; } }; + + p._getCodeBlocks = function(code, targetType) { + var threads = code.getThreads(); + var blocks = []; + var func; + switch (targetType) { + case "previous": + func = this._getNextMagnets; + break; + case "next": + func = this._getPreviousMagnets; + break; + case "string": + func = this._getFieldMagnets; + break; + case "boolean": + func = this._getFieldMagnets; + break; + case "param": + func = this._getOutputMagnets; + break; + default: + return []; + } + for (var i = 0; i < threads.length; i++) { + var thread = threads[i]; + blocks = blocks.concat(func.call(this, thread, thread.view.zIndex, null, targetType)); + } + return blocks; + }; + + p._getNextMagnets = function(thread, zIndex, offset, targetType) { + var blocks = thread.getBlocks(); + var statementBlocks = []; + var metaData = []; + if (!offset) offset = {x: 0, y: 0}; + var cursorX = offset.x; + var cursorY = offset.y; + + for (var i = 0; i < blocks.length; i++) { + var block = blocks[i]; + var blockView = block.view; + blockView.zIndex = zIndex; + if (blockView.dragInstance) { + break; + } + cursorY += blockView.y; + cursorX += blockView.x; + var endPoint = cursorY + 1; + if (blockView.magnet.next) { + endPoint += blockView.height; + metaData.push({ + point: cursorY, + endPoint: endPoint, + startBlock: block, + blocks: [] + }); + metaData.push({ + point: endPoint, + blocks: [] + }); + blockView.absX = cursorX; + } + if (block.statements) + zIndex += 0.01; + for (var j = 0; j < block.statements.length; j++) { + var thread = block.statements[j]; + var statement = block.view._statements[j]; + statement.zIndex = zIndex; + statement.absX = cursorX + statement.x; + metaData.push({ + point: statement.y + cursorY - 30, + endPoint: statement.y + cursorY, + startBlock: statement, + blocks: [] + }); + metaData.push({ + point: statement.y + cursorY + statement.height, + blocks: [] + }); + zIndex += 0.01; + statementBlocks = statementBlocks.concat( + this._getNextMagnets(thread, zIndex, { + x: statement.x + cursorX, + y: statement.y + cursorY + }, targetType) + ); + } + if (blockView.magnet.next) { + cursorY += blockView.magnet.next.y; + cursorX += blockView.magnet.next.x; + } + } + return statementBlocks.concat(metaData); + }; + + p._getPreviousMagnets = function(thread, zIndex, offset, targetType) { + var blocks = thread.getBlocks(); + var metaData = []; + if (!offset) offset = {x: 0, y: 0}; + var cursorX = offset.x; + var cursorY = offset.y; + + var block = blocks[0]; + var blockView = block.view; + blockView.zIndex = zIndex; + if (blockView.dragInstance) + return []; + cursorY += blockView.y - 15; + cursorX += blockView.x; + var endPoint = cursorY + 1; + if (blockView.magnet.previous) { + endPoint += blockView.height; + metaData.push({ + point: cursorY, + endPoint: endPoint, + startBlock: block, + blocks: [] + }); + metaData.push({ + point: endPoint, + blocks: [] + }); + blockView.absX = cursorX; + return metaData; + } + return []; + }; + + p._getFieldMagnets = function(thread, zIndex, offset, targetType) { + var blocks = thread.getBlocks(); + var statementBlocks = []; + var metaData = []; + var that = this; + if (!offset) offset = {x: 0, y: 0}; + var cursorX = offset.x; + var cursorY = offset.y; + for (var i = 0; i < blocks.length; i++) { + var block = blocks[i]; + var blockView = block.view; + if (blockView.dragInstance) + break; + blockView.zIndex = zIndex; + cursorY += blockView.y; + cursorX += blockView.x; + var endPoint = cursorY + 1; + if (blockView.magnet.next) + endPoint += blockView.magnet.next.y; + metaData = metaData.concat( + this._getFieldBlockMetaData(blockView, cursorX, cursorY, zIndex, targetType) + ); + if (block.statements) + zIndex += 0.01; + for (var j = 0; j < block.statements.length; j++) { + var thread = block.statements[j]; + var statement = block.view._statements[j]; + statementBlocks = statementBlocks.concat( + this._getFieldMagnets(thread, zIndex, { + x: statement.x + cursorX, + y: statement.y + cursorY + }, targetType) + ); + } + if (blockView.magnet.next) { + cursorY += blockView.magnet.next.y; + cursorX += blockView.magnet.next.x; + } + } + return statementBlocks.concat(metaData); + }; + + p._getFieldBlockMetaData = function(blockView, cursorX, cursorY, zIndex, targetType) { + var contents = blockView._contents; + var metaData = []; + cursorY += blockView.contentPos.y; + for (var i = 0; i < contents.length; i++) { + var content = contents[i]; + if (!(content instanceof Entry.FieldBlock)) + continue; + var contentBlock = content._valueBlock; + if (contentBlock.view.dragInstance) + continue; + if (content.acceptType !== targetType && content.acceptType !== "boolean") { + continue; + } + var startX = cursorX + content.box.x; + var startY = cursorY + content.box.y + (blockView.contentHeight % 1000) * -0.5; + var endY = cursorY + content.box.y + content.box.height; + if (content.acceptType === targetType) { + metaData.push({ + point: startY, + endPoint: endY, + startBlock: contentBlock, + blocks: [] + }); + metaData.push({ + point: endY, + blocks: [] + }); + } + var contentBlockView = contentBlock.view; + contentBlockView.absX = startX; + contentBlockView.zIndex = zIndex; + metaData = metaData.concat( + this._getFieldBlockMetaData(contentBlockView, + startX + contentBlockView.contentPos.x, + startY + contentBlockView.contentPos.y, + zIndex + 0.01, + targetType) + ); + } + return metaData; + }; + + p._getOutputMagnets = function(thread, zIndex, offset, targetType) { + var blocks = thread.getBlocks(); + var statementBlocks = []; + var metaData = []; + var that = this; + if (!offset) offset = {x: 0, y: 0}; + var cursorX = offset.x; + var cursorY = offset.y; + for (var i = 0; i < blocks.length; i++) { + var block = blocks[i]; + var blockView = block.view; + if (blockView.dragInstance) + break; + blockView.zIndex = zIndex; + cursorY += blockView.y; + cursorX += blockView.x; + var endPoint = cursorY + 1; + if (blockView.magnet.next) + endPoint += blockView.magnet.next.y; + metaData = metaData.concat( + this._getOutputMetaData(blockView, cursorX, cursorY, zIndex, targetType) + ); + if (block.statements) + zIndex += 0.01; + for (var j = 0; j < block.statements.length; j++) { + var thread = block.statements[j]; + var statement = block.view._statements[j]; + statementBlocks = statementBlocks.concat( + this._getOutputMagnets(thread, zIndex, { + x: statement.x + cursorX, + y: statement.y + cursorY + }, targetType) + ); + } + if (blockView.magnet.next) { + cursorY += blockView.magnet.next.y; + cursorX += blockView.magnet.next.x; + } + } + return statementBlocks.concat(metaData); + }; + + p._getOutputMetaData = function(blockView, cursorX, cursorY, zIndex, targetType) { + var contents = blockView._contents; + var metaData = []; + cursorX += blockView.contentPos.x; + cursorY += blockView.contentPos.y; + for (var i = 0; i < contents.length; i++) { + var content = contents[i]; + var startX = cursorX + content.box.x; + var startY = cursorY - 24; + var endY = cursorY; + if (content instanceof Entry.FieldBlock) { + if (content.acceptType === targetType) { + metaData.push({ + point: startY, + endPoint: endY, + startBlock: content, + blocks: [] + }); + metaData.push({ + point: endY, + blocks: [] + }); + content.absX = startX; + content.zIndex = zIndex; + content.width = 20; + } + + var contentBlock = content._valueBlock; + if (contentBlock) { + metaData = metaData.concat( + this._getOutputMetaData(contentBlock.view, + startX, + cursorY + content.box.y, + zIndex + 0.01, + targetType) + ); + } + continue; + } else if (content instanceof Entry.FieldOutput) { + if (content.acceptType !== targetType) + continue; + metaData.push({ + point: startY, + endPoint: endY, + startBlock: content, + blocks: [] + }); + metaData.push({ + point: endY, + blocks: [] + }); + content.absX = startX; + content.zIndex = zIndex; + content.width = 20; + var contentBlock = content._valueBlock; + if (!contentBlock) + continue; + if (contentBlock.view.dragInstance) + continue; + var contentBlockView = contentBlock.view; + metaData = metaData.concat( + this._getOutputMetaData(contentBlockView, + cursorX + content.box.x, + cursorY + content.box.y, + zIndex + 0.01, + targetType) + ); + } + } + return metaData; + }; + + + p.getNearestMagnet = function(x, y, targetType) { + var targetArray = this._magnetMap[targetType]; + if (!targetArray || targetArray.length ===0) return; + + var minIndex = 0, + maxIndex = targetArray.length - 1, + index, + pointData, + result = null, + searchValue = targetType === "previous" ? y - 15 : y, + leftOffset = ["previous", "next"].indexOf(targetType) > - 1 ? 20 : 0; + while (minIndex <= maxIndex) { + index = (minIndex + maxIndex) / 2 | 0; + pointData = targetArray[index]; + + if (searchValue < pointData.point) { + maxIndex = index - 1; + } else if (searchValue > pointData.endPoint) { + minIndex = index + 1; + } else { + var blocks = pointData.blocks; + for (var i = 0; i < blocks.length; i++) { + var blockView = blocks[i].view; + if (blockView.absX - leftOffset < x && x < blockView.absX + blockView.width) { + var resultBlock = pointData.blocks[i]; + if (!result || result.view.zIndex < resultBlock.view.zIndex) + result = pointData.blocks[i]; + } + } + return result; + } + } + return null; + }; + + p.dominate = function(thread) { + if (!thread) return; + var block = thread.getFirstBlock(); + if (!block) return; + this.svgBlockGroup + .appendChild(block.view.svgGroup); + this.code.dominate(block.thread); + }; + + p.setPatternRectFill = function(color) { + this.patternRect.attr({fill:color}); + }; + + p._removeActivated = function() { + if (!this._activatedBlockView) return; + + this._activatedBlockView.removeActivated(); + this._activatedBlockView = null; + }; + + p.activateBlock = function(block) { + var view = block.view; + var pos = view.getAbsoluteCoordinate(); + var svgDom = this.svgDom; + var blockX = pos.x, + blockY = pos.y; + + var dx = svgDom.width()/2 - blockX; + var dy = svgDom.height()/2 - blockY - 100; + this.scroller.scroll( + dx, dy + ); + + view.addActivated(); + + this._activatedBlockView = view; + }; + + p.reDraw = function() { + this.code.view.reDraw(); + }; + + p.separate = function(block, count) { + if (typeof block === "string") + block = this.findById(block); + if (block.view) + block.view._toGlobalCoordinate(); + var prevBlock = block.getPrevBlock(); + block.separate(count); + if (prevBlock && prevBlock.getNextBlock()) + prevBlock.getNextBlock().view.bindPrev(); + }; + + p.insert = function(block, pointer, count) { // pointer can be target + if (typeof block === "string") + block = this.findById(block); + this.separate(block, count); + if (pointer.length === 3) // is global + block.moveTo(pointer[0], pointer[1]); + else if (pointer.length === 4 && pointer[3] === 0) { + var targetThread = this.code.getThreads()[pointer[2]]; + block.thread.cut(block); + targetThread.insertToTop(block); + block.getNextBlock().view.bindPrev(); + } + else { + var targetObj; + if (pointer instanceof Array) + targetObj = this.code.getTargetByPointer(pointer); + else + targetObj = pointer; + if (targetObj instanceof Entry.Block) { + if (block.getBlockType() === "basic") + block.view.bindPrev(targetObj); + block.doInsert(targetObj); + } else if (targetObj instanceof Entry.FieldStatement) { + block.view.bindPrev(targetObj); + targetObj.insertTopBlock(block); + } else { + block.doInsert(targetObj); + } + } + }; + + p.adjustThreadsPosition = function() { + return; + var code = this.code; + if (!code) return; + + var threads = code.getThreads(); + var arr = []; + + threads.forEach(function(t) { + arr.push({ + thread: t, + len: t.countBlock() + }); + }); + + arr = arr.sort(function(a,b) { + return b.len - a.len; + }); + + var target = arr[0]; + if (target) { + target = target.thread.getFirstBlock().view; + var pos = target.getAbsoluteCoordinate(); + + this.scroller.scroll( + 50 - pos.x, 30 - pos.y + ); + } + }; + + p._initContextOptions = function() { + var that = this; + this._contextOptions = [ + { + activated: true, + option: { + text: '붙여넣기', + enable: !!Entry.clipboard, + callback: function(){ + Entry.do('addThread', Entry.clipboard).value + .getFirstBlock().copyToClipboard(); + } + } + }, + { + activated: true, + option: { + text: '블록 정리하기', + callback: function(){ + that.alignThreads(); + } + } + }, + { + activated: true, + option: { + text: '모든 코드 삭제하기', + callback: function(){ + that.code.clear(); + } + } + } + ]; + }; + + p.activateContextOption = function(option) { + this._contextOptions[option].activated = true; + }; + + p.deActivateContextOption = function(option) { + this._contextOptions[option].activated = false; + }; + + p._bindEvent = function() { + if (Entry.documentMousedown) { + Entry.documentMousedown.attach(this, this.setSelectedBlock); + Entry.documentMousedown.attach(this, this._removeActivated); + } + if (Entry.keyPressed) + Entry.keyPressed.attach(this, this._keyboardControl); + + if (Entry.windowResized) { + var dUpdateOffset = _.debounce(this.updateOffset, 200); + Entry.windowResized.attach(this, dUpdateOffset); + } + }; + + p.offset = function() { + if (!this._offset || (this._offset.top === 0 && this._offset.left === 0)) { + this.updateOffset(); + return this._offset; + } + return this._offset; + }; + + + })(Entry.Board.prototype); + diff --git a/src/workspace/code.js b/src/workspace/code.js index 9c81e60a30..c526704e21 100644 --- a/src/workspace/code.js +++ b/src/workspace/code.js @@ -11,21 +11,30 @@ goog.require('Entry.STATIC'); /* * */ -Entry.Code = function(code) { +Entry.Code = function(code, object) { Entry.Model(this, false); + if (object) this.object = object; + this._data = new Entry.Collection(); this._eventMap = {}; + this._blockMap = {}; this.executors = []; this.executeEndEvent = new Entry.Event(this); this.changeEvent = new Entry.Event(this); + this.changeEvent.attach(this, this._handleChange); + + this._maxZIndex = 0; this.load(code); }; +Entry.STATEMENT = 0; +Entry.PARAM = -1; + (function(p) { p.schema = { view: null, @@ -34,11 +43,22 @@ Entry.Code = function(code) { p.load = function(code) { if (!(code instanceof Array)) - return console.error("code must be array"); + code = JSON.parse(code); + + this.clear(); - for (var i = 0; i < code.length; i++) { + for (var i = 0; i < code.length; i++) this._data.push(new Entry.Thread(code[i], this)); - } + + return this; + }; + + p.clear = function() { + for (var i = this._data.length - 1; i >= 0; i--) + this._data[i].destroy(false); + + this.clearExecutors(); + this._eventMap = {}; }; p.createView = function(board) { @@ -60,15 +80,32 @@ Entry.Code = function(code) { this._eventMap[eventType].push(block); }; - p.raiseEvent = function(eventType) { + p.unregisterEvent = function(block, eventType) { var blocks = this._eventMap[eventType]; + if (!blocks || blocks.length === 0) return; + + var index = blocks.indexOf(block); + if (index < 0) return; + blocks.splice(index,1); + }; + + p.raiseEvent = function(eventType, entity, value) { + var blocks = this._eventMap[eventType]; + var executors = []; if (blocks === undefined) return; for (var i = 0; i < blocks.length; i++) { - this.executors.push(new Entry.Executor(blocks[i])); + var block = blocks[i]; + if (value === undefined || + block.params.indexOf(value) > -1) { + var executor = new Entry.Executor(blocks[i], entity); + this.executors.push(executor); + executors.push(executor); + } } + return executors; }; - p.getEventMap = function(eventType) {return this._eventMap;}; + p.getEventMap = function(eventType) {return this._eventMap[eventType];}; p.map = function(func) { this._data.map(func); @@ -78,8 +115,9 @@ Entry.Code = function(code) { var executors = this.executors; for (var i = 0; i < executors.length; i++) { var executor = executors[i]; - executor.execute(); - if (executor.scope.block === null) { + if (!executor.isEnd()) + executor.execute(); + if (executor.isEnd()) { executors.splice(i, 1); i--; if (executors.length === 0) @@ -88,19 +126,43 @@ Entry.Code = function(code) { } }; + p.removeExecutor = function(executor) { + var index = this.executors.indexOf(executor); + if (index > -1) + this.executors.splice(index, 1); + }; + p.clearExecutors = function() { this.executors = []; }; - p.createThread = function(blocks) { + p.clearExecutorsByEntity = function(entity) { + var executors = this.executors; + for (var i = 0; i < executors.length; i++) { + var executor = executors[i]; + if (executor.entity === entity) { + executor.end(); + } + } + }; + + p.addExecutor = function(executor) { + this.executors.push(executor); + }; + + p.createThread = function(blocks, index) { if (!(blocks instanceof Array)) return console.error("blocks must be array"); - this._data.push(new Entry.Thread(blocks, this)); + var thread = new Entry.Thread(blocks, this); + if (index === undefined) this._data.push(thread); + else this._data.insert(thread, index); + + return thread; }; - p.cloneThread = function(thread) { - var newThread = thread.clone(this); + p.cloneThread = function(thread, mode) { + var newThread = thread.clone(this, mode); this._data.push(newThread); return newThread; }; @@ -111,8 +173,6 @@ Entry.Code = function(code) { // case of statement thread if (index < 0) return; data.splice(index, 1); - var firstBlock = thread.getFirstBlock(); - if (firstBlock) firstBlock.destroy(animate); }; p.doDestroyThread = function(thread, animate) { @@ -121,12 +181,10 @@ Entry.Code = function(code) { // case of statement thread if (index < 0) return; data.splice(index, 1); - var firstBlock = thread.getFirstBlock(); - if (firstBlock) firstBlock.doDestroy(animate); }; p.getThreads = function() { - return this._data; + return this._data.map(function(t){return t;}); }; p.toJSON = function() { @@ -152,10 +210,110 @@ Entry.Code = function(code) { if (firstBlock) firstBlock.view._moveBy(x, y, false); } + + var board = this.board; + if (board instanceof Entry.BlockMenu) board.updateSplitters(y); }; p.stringify = function() { return JSON.stringify(this.toJSON()); }; + p.dominate = function(thread) { + thread.view.setZIndex(this._maxZIndex++); + }; + + p.indexOf = function(thread) { + return this._data.indexOf(thread); + }; + + p._handleChange = function() { + if (Entry.creationChangedEvent) + Entry.creationChangedEvent.notify(); + }; + + p.hasBlockType = function(type) { + var threads = this.getThreads(); + + for (var i = 0; i < threads.length; i ++) + if (threads[i].hasBlockType(type)) return true; + + return false; + }; + + p.findById = function(id) { + return this._blockMap[id]; + }; + + p.registerBlock = function(block) { + this._blockMap[block.id] = block; + }; + + p.unregisterBlock = function(block) { + delete this._blockMap[block.id]; + }; + + p.getByPointer = function(pointer) { + pointer = pointer.concat(); + pointer.shift(); + pointer.shift(); + var thread = this._data[pointer.shift()]; + var block = thread.getBlock(pointer.shift()); + while (pointer.length) { + if (!(block instanceof Entry.Block)) + block = block.getValueBlock(); + var type = pointer.shift(); + var index = pointer.shift(); + if (type > -1) { + var statements = block.statements[type]; + block = statements.getBlock(index); + } else if (type === -1) { + block = block.view.getParam(index); + } + } + return block; + }; + + p.getTargetByPointer = function(pointer) { + pointer = pointer.concat(); + pointer.shift(); + pointer.shift(); + var thread = this._data[pointer.shift()]; + var block; + if (pointer.length === 1) { + block = thread.getBlock(pointer.shift() - 1); + } else { + block = thread.getBlock(pointer.shift()); + while (pointer.length) { + if (!(block instanceof Entry.Block)) + block = block.getValueBlock(); + var type = pointer.shift(); + var index = pointer.shift(); + if (type > -1) { + var statement = block.statements[type]; + if (!pointer.length) { + if (index === 0) + block = statement.view.getParent(); + else + block = statement.getBlock(index - 1); + } else { + block = statement.getBlock(index); + } + } else if (type === -1) { + block = block.view.getParam(index); + } + } + } + return block; + }; + + p.getBlockList = function(excludePrimitive) { + var threads = this.getThreads(); + var blocks = []; + + for (var i = 0; i < threads.length; i ++) + blocks = blocks.concat(threads[i].getBlockList(excludePrimitive)); + + return blocks; + }; })(Entry.Code.prototype); diff --git a/src/workspace/code_view.js b/src/workspace/code_view.js index 5e566679cf..c7824c1441 100644 --- a/src/workspace/code_view.js +++ b/src/workspace/code_view.js @@ -15,14 +15,14 @@ Entry.CodeView = function(code, board) { this.set({board: board}); - this.svgThreadGroup = board.svgGroup.group(); + this.svgThreadGroup = board.svgGroup.elem("g"); this.svgThreadGroup.attr({ class: 'svgThreadGroup' }); this.svgThreadGroup.board = board; - this.svgBlockGroup = board.svgGroup.group(); + this.svgBlockGroup = board.svgGroup.elem("g"); this.svgBlockGroup.attr({ class: 'svgBlockGroup' }); @@ -48,4 +48,10 @@ Entry.CodeView = function(code, board) { this.set({board:this.code.board}); }; + p.reDraw = function() { + this.code.map(function(thread) { + thread.view.reDraw(); + }); + }; + })(Entry.CodeView.prototype); diff --git a/src/workspace/connection_ripple.js b/src/workspace/connection_ripple.js new file mode 100644 index 0000000000..be1f1ce980 --- /dev/null +++ b/src/workspace/connection_ripple.js @@ -0,0 +1,47 @@ +"use strict"; + +goog.provide("Entry.ConnectionRipple"); + +(function(cr) { + cr.createDom = function(blockView) { + if (this.svgDom) return; + + var svgGroup = blockView.getBoard().svgGroup; + this._ripple = svgGroup.elem("circle", { + "cx": 0, "cy": 0, "r": 0, + 'stroke': '#888', + 'stroke-width': 10 + }); + }; + + cr.setView = function(blockView) { + if (!this._ripple) this.createDom(blockView); + var ripple = this._ripple; + var svgGroup = blockView.getBoard().svgGroup; + ripple.remove(); + + var pos = blockView.getAbsoluteCoordinate(); + ripple.attr({cx:pos.x, cy:pos.y}); + + svgGroup.appendChild(ripple); + ripple._startTime = new Date(); + return this; + }; + + cr.dispose = function() { + var that = this; + var ripple = this._ripple; + var ms = (new Date()) - ripple._startTime; + var percent = ms / 150; + if (percent > 1) ripple.remove(); + else { + ripple.attr({ + 'r': percent * 25, + 'opacity': 1 - percent + }); + window.setTimeout(function(){ + that.dispose(); + }, 10); + } + }; +})(Entry.ConnectionRipple); diff --git a/src/workspace/executors.js b/src/workspace/executors.js index 8a8edae36b..5e7385de9c 100644 --- a/src/workspace/executors.js +++ b/src/workspace/executors.js @@ -5,27 +5,35 @@ goog.provide("Entry.Executor"); - -Entry.Executor = function(block) { - this.scope = { - block: block, - executor: this - }; +Entry.Executor = function(block, entity) { + this.scope = new Entry.Scope(block, this); + this.entity = entity; this._callStack = []; + this.register = {}; }; (function(p) { p.execute = function() { - var returnVal = this.scope.block._schema.func.call(this.scope); - if (returnVal === undefined) { - this.scope = { - block: this.scope.block.next, - executor: this - }; - } - if (this.scope.block === null) { - if (this._callStack.length) - this.scope = this._callStack.pop(); + if (this.isEnd()) + return; + while (true) { + var returnVal = this.scope.block.getSchema().func.call(this.scope, this.entity, this.scope); + if (returnVal === undefined || returnVal === null || returnVal === Entry.STATIC.PASS) { + this.scope = new Entry.Scope(this.scope.block.getNextBlock(), this); + if (this.scope.block === null) { + if (this._callStack.length) { + var oldScope = this.scope; + this.scope = this._callStack.pop(); + if (this.scope.isLooped !== oldScope.isLooped) + break; + } + else + break; + } + } else if (returnVal === Entry.STATIC.CONTINUE) { + } else if (returnVal === Entry.STATIC.BREAK || this.scope === returnVal) { + break; + } } }; @@ -33,14 +41,121 @@ Entry.Executor = function(block) { if (!(thread instanceof Entry.Thread)) console.error("Must step in to thread"); + var block = thread.getFirstBlock(); + if (!block) { + return Entry.STATIC.BREAK; + } + this._callStack.push(this.scope); - var block = thread.getFirstBlock(); - if (block instanceof Entry.DummyBlock) - block = block.next; - this.scope = { - block: block, - executor: this - }; + this.scope = new Entry.Scope(block, this); + return Entry.STATIC.CONTINUE; + }; + + p.break = function() { + if (this._callStack.length) + this.scope = this._callStack.pop(); + return Entry.STATIC.PASS; + }; + + p.breakLoop = function() { + if (this._callStack.length) + this.scope = this._callStack.pop(); + while (this._callStack.length) { + var schema = Entry.block[this.scope.block.type]; + if (schema.class === "repeat") + break; + this.scope = this._callStack.pop(); + } + return Entry.STATIC.PASS; + }; + + p.end = function() { + this.scope.block = null; + }; + + p.isEnd = function() { + return this.scope.block === null; }; })(Entry.Executor.prototype); + +Entry.Scope = function(block, executor) { + this.block = block; + this.type = block ? block.type : null; //legacy + this.executor = executor; + this.entity = executor.entity; +}; + +(function(p) { + p.callReturn = function() { + return undefined; + }; + + p.getParam = function(index) { + var fieldBlock = this.block.params[index]; + var newScope = new Entry.Scope(fieldBlock, this.executor); + var result = Entry.block[fieldBlock.type].func.call(newScope, this.entity, newScope); + return result; + }; + + p.getParams = function() { + var that = this; + return this.block.params.map(function(param){ + if (param instanceof Entry.Block) { + var fieldBlock = param; + var newScope = new Entry.Scope(fieldBlock, that.executor); + return Entry.block[fieldBlock.type].func.call(newScope, that.entity, newScope); + } else return param; + }); + }; + + p.getValue = function(key, block) { + var fieldBlock = this.block.params[this._getParamIndex(key, block)]; + var newScope = new Entry.Scope(fieldBlock, this.executor); + var result = Entry.block[fieldBlock.type].func.call(newScope, this.entity, newScope); + return result; + }; + + p.getStringValue = function(key, block) { + return String(this.getValue(key, block)); + }; + + p.getNumberValue = function(key, block) { + return Number(this.getValue(key)); + }; + + p.getBooleanValue = function(key, block) { + return Number(this.getValue(key, block)) ? true : false; + }; + + p.getField = function(key, block) { + return this.block.params[this._getParamIndex(key)]; + }; + + p.getStringField = function(key, block) { + return String(this.getField(key)); + }; + + p.getNumberField = function(key) { + return Number(this.getField(key)); + }; + + p.getStatement = function(key, block) { + return this.executor.stepInto(this.block.statements[ + this._getStatementIndex(key, block) + ]); + }; + + p._getParamIndex = function(key) { + return Entry.block[this.type].paramsKeyMap[key]; + }; + + p._getStatementIndex = function(key) { + return Entry.block[this.type].statementsKeyMap[key]; + }; + + p.die = function() { + this.block = null; + return Entry.STATIC.BREAK; + }; +})(Entry.Scope.prototype); diff --git a/src/workspace/field/angle.js b/src/workspace/field/angle.js new file mode 100644 index 0000000000..64d1afb1a2 --- /dev/null +++ b/src/workspace/field/angle.js @@ -0,0 +1,259 @@ +/* + */ +"use strict"; + +goog.provide("Entry.FieldAngle"); + +goog.require("Entry.Field"); +/* + * + */ +Entry.FieldAngle = function(content, blockView, index) { + this._block = blockView.block; + this._blockView = blockView; + + var box = new Entry.BoxModel(); + this.box = box; + + this.svgGroup = null; + + this.position = content.position; + this._contents = content; + this._index = index; + var value = this.getValue(); + this.setValue(this.modValue( + value !== undefined ? value : 90 + )); + + this.renderStart(); +}; + +Entry.Utils.inherit(Entry.Field, Entry.FieldAngle); + + +(function(p) { + var X_PADDING = 8, + TEXT_Y_PADDING = 4, + CONTENT_HEIGHT = 16, + RADIUS = 49, + FILL_PATH = 'M 0,0 v -49 A 49,49 0 %LARGE 1 %X,%Y z'; + + p.renderStart = function() { + if (this.svgGroup) $(this.svgGroup).remove(); + var blockView = this._blockView; + var that = this; + var contents = this._contents; + + this.svgGroup = blockView.contentSvgGroup.elem("g", { + class: 'entry-input-field' + }); + + this.textElement = + this.svgGroup.elem('text', { + x:X_PADDING/2, y:TEXT_Y_PADDING, + 'font-size': '9pt' + }); + + this.textElement.textContent = this.getText(); + + var width = this.getTextWidth(); + + var y = this.position && this.position.y ? this.position.y : 0; + y -= CONTENT_HEIGHT/2; + this._header = this.svgGroup.elem('rect', { + x: 0, y: y, + rx: 3, ry: 3, + width: width, + height: CONTENT_HEIGHT, 'rx':3, 'ry': 3, + fill: "#fff", + 'fill-opacity': 0.4 + }); + + this.svgGroup.appendChild(this.textElement); + + this._bindRenderOptions(); + + this.box.set({ + x: 0, + y: 0, + width: width, + height: CONTENT_HEIGHT + }); + }; + + p.renderOptions = function() { + var that = this; + + var blockView = this._block.view; + var func = function() { + that.applyValue(); + that.destroyOption(); + }; + + this._attachDisposeEvent(func); + + //html option + this.optionGroup = Entry.Dom('input', { + class:'entry-widget-input-field', + parent: $('body') + }); + + this.optionGroup.val(this.value); + + this.optionGroup.on('mousedown', function(e) { + e.stopPropagation(); + }); + + this.optionGroup.on('keyup', function(e){ + var exitKeys = [13, 27]; + var keyCode = e.keyCode || e.which; + that.applyValue(e); + + if (exitKeys.indexOf(keyCode) > -1) + that.destroyOption(); + }); + + var pos = this.getAbsolutePosFromDocument(); + pos.y -= this.box.height/2; + this.optionGroup.css({ + height: CONTENT_HEIGHT, + left:pos.x, + top:pos.y, + width: that.box.width + }); + + this.optionGroup.select(); + + //svg option dom + this.svgOptionGroup = this.appendSvgOptionGroup(); + var circle = this.svgOptionGroup.elem('circle', { + x:0, y:0, r:RADIUS, + class:'entry-field-angle-circle' + }); + + this._dividerGroup = this.svgOptionGroup.elem('g'); + for (var a = 0; a < 360; a += 15) { + this._dividerGroup.elem('line', { + x1:RADIUS, y1:0, + x2:RADIUS - (a % 45 === 0 ? 10 : 5), y2:0, + transform: 'rotate(' + a + ', ' + (0) + ', ' + (0) + ')', + class: 'entry-angle-divider' + }); + } + var pos = this.getAbsolutePosFromBoard(); + pos.x = pos.x + this.box.width/2; + pos.y = pos.y + this.box.height/2 + RADIUS + 1; + + this.svgOptionGroup.attr({ + class: 'entry-field-angle', + transform: "translate(" + pos.x + "," + pos.y + ")" + }); + + var absolutePos = that.getAbsolutePosFromDocument(); + var zeroPos = [ + absolutePos.x + that.box.width/2, + absolutePos.y + that.box.height/2 + 1 + ]; + + $(this.svgOptionGroup).mousemove(function(e) { + var mousePos = [e.clientX, e.clientY]; + + that.optionGroup.val(that.modValue( + compute(zeroPos, mousePos))); + function compute(zeroPos, mousePos) { + var dx = mousePos[0] - zeroPos[0]; + var dy = mousePos[1] - zeroPos[1] - RADIUS - 1; + var angle = Math.atan(-dy / dx); + angle = Entry.toDegrees(angle); + angle = 90 - angle; + if (dx < 0) angle += 180; + else if (dy > 0) angle += 360; + return Math.round(angle / 15) * 15; + } + that.applyValue(); + }); + this.updateGraph(); + }; + + p.updateGraph = function() { + if (this._fillPath) this._fillPath.remove(); + + var angleRadians = Entry.toRadian(this.getValue()); + var x = Math.sin(angleRadians) * RADIUS; + var y = Math.cos(angleRadians) * -RADIUS; + var largeFlag = (angleRadians > Math.PI) ? 1 : 0; + + + this._fillPath = this.svgOptionGroup.elem('path', { + d: FILL_PATH. + replace('%X', x). + replace('%Y', y). + replace('%LARGE', largeFlag), + class: 'entry-angle-fill-area' + }); + + this.svgOptionGroup.appendChild(this._dividerGroup); + + if (this._indicator) this._indicator.remove(); + + this._indicator = + this.svgOptionGroup.elem('line', { + x1: 0, y1: 0, x2: x, y2: y + }); + + this._indicator.attr({class:'entry-angle-indicator'}); + }; + + p.applyValue = function() { + var value = this.optionGroup.val(); + if (isNaN(value)) return; + value = this.modValue(value); + this.setValue(value); + this.updateGraph(); + this.textElement.textContent = this.getValue(); + if (this.optionGroup) this.optionGroup.val(value); + this.resize(); + }; + + p.resize = function() { + var width = this.getTextWidth(); + + this._header.attr({width: width}); + if (this.optionGroup) + this.optionGroup.css({width: width}); + + this.box.set({width: width}); + this._block.view.alignContent(); + }; + + p.getTextWidth = function() { + if (!this.textElement) return X_PADDING; + return this.textElement.getComputedTextLength() + X_PADDING; + }; + + p.getText = function() { + return this.getValue() + '\u00B0'; + }; + + p.modValue = function(value) {return value % 360;}; + + p.destroyOption = function() { + if (this.disposeEvent) { + Entry.disposeEvent.detach(this.disposeEvent); + delete this.documentDownEvent; + } + + if (this.optionGroup) { + this.optionGroup.remove(); + delete this.optionGroup; + } + + if (this.svgOptionGroup) { + this.svgOptionGroup.remove(); + delete this.svgOptionGroup; + } + this.textElement.textContent = this.getText(); + this.command(); + }; +})(Entry.FieldAngle.prototype); + diff --git a/src/workspace/field/block.js b/src/workspace/field/block.js new file mode 100644 index 0000000000..2c64f6e6b2 --- /dev/null +++ b/src/workspace/field/block.js @@ -0,0 +1,299 @@ +/* + */ +"use strict"; + +goog.provide("Entry.FieldBlock"); + +goog.require("Entry.Field"); +/* + * + */ +Entry.FieldBlock = function(content, blockView, index, mode, contentIndex) { + Entry.Model(this, false); + this._blockView = blockView; + this._block = blockView.block; + this._valueBlock = null; + + var box = new Entry.BoxModel(); + this.box = box; + + this.changeEvent = new Entry.Event(this); + + this._index = index; + this.contentIndex = contentIndex; + this._content = content; + + this.acceptType = content.accept; + this._restoreCurrent = content.restore; + + this.view = this; + + this.svgGroup = null; + + this._position = content.position; + + this.box.observe(blockView, "alignContent", ["width", "height"]); + this.observe(this, "_updateBG", ["magneting"], false); + + this.renderStart(blockView.getBoard(), mode); +}; + +Entry.Utils.inherit(Entry.Field, Entry.FieldBlock); + +(function(p) { + p.schema = { + magneting: false + }; + + p.renderStart = function(board, mode) { + this.svgGroup = this._blockView.contentSvgGroup.elem("g"); + this.view = this; + this._nextGroup = this.svgGroup; + this.box.set({ + x: 0, + y: 0, + width: 0, + height: 20 + }); + var block = this.getValue(); + if (block && !block.view) { + block.setThread(this); + block.createView(board, mode); + block.getThread().view.setParent(this); + } + this.updateValueBlock(block); + + if (this._blockView.getBoard().constructor !== Entry.Board) + this._valueBlock.view.removeControl(); + + }; + + p.align = function(x, y, animate) { + animate = animate === undefined ? true : animate; + var svgGroup = this.svgGroup; + if (this._position) { + if (this._position.x) + x = this._position.x; + if (this._position.y) + y = this._position.y; + } + + var block = this._valueBlock; + + if (block) { + y = block.view.height * -0.5; + } + var transform = "translate(" + x + "," + y + ")"; + + if (animate) + svgGroup.animate({ + transform: transform + }, 300, mina.easeinout); + else + svgGroup.attr({ + transform: transform + }); + + this.box.set({ + x: x, + y: y + }); + }; + + p.calcWH = function() { + var block = this._valueBlock; + + if (block) { + var blockView = block.view; + this.box.set({ + width: blockView.width, + height: blockView.height + }); + } else { + this.box.set({ + width: 15, + height: 20 + }); + } + }; + + p.calcHeight = p.calcWH; + + p.destroy = function() {}; + + p.inspectBlock = function() { + var blockType = null; + if (this._originBlock) { + blockType = this._originBlock.type; + delete this._originBlock; + } else { + switch (this.acceptType) { + case "boolean": + blockType = "True"; + break; + case "string": + blockType = "text"; + break; + case "param": + blockType = "function_field_label"; + break; + } + } + var block = this._createBlockByType(blockType); + return block; + }; + + p._setValueBlock = function(block) { + if (this._restoreCurrent) + this._originBlock = this._valueBlock; + if (!block) + block = this.inspectBlock(); + this._valueBlock = block; + this.setValue(block); + + block.setThread(this); + block.getThread().view.setParent(this); + + return this._valueBlock; + }; + + p.getValueBlock = function() {return this._valueBlock;}; + + p.updateValueBlock = function(block) { + if (!(block instanceof Entry.Block)) block = undefined; + this._destroyObservers(); + + var view = this._setValueBlock(block).view; + view.bindPrev(this); + this._blockView.alignContent(); + this._posObserver = view.observe(this, "updateValueBlock", ["x", "y"], false); + this._sizeObserver = view.observe(this, "calcWH", ["width", "height"]); + var board = this._blockView.getBoard();// performance issue + if (board.constructor === Entry.Board) + board.generateCodeMagnetMap(); + }; + + p._destroyObservers = function() { + if (this._sizeObserver) this._sizeObserver.destroy(); + if (this._posObserver) this._posObserver.destroy(); + }; + + p.getPrevBlock = function(block) { + if (this._valueBlock === block) return this; + else return null; + }; + + p.getNextBlock = function() { + return null; + }; + + p.requestAbsoluteCoordinate = function(blockView) { + var blockView = this._blockView; + var contentPos = blockView.contentPos; + var pos = blockView.getAbsoluteCoordinate(); + pos.x += this.box.x + contentPos.x; + pos.y += this.box.y + contentPos.y; + return pos; + }; + + p.dominate = function() { + this._blockView.dominate(); + }; + + p.isGlobal = function() { + return false; + }; + + p.separate = function(block) { + this.getCode().createThread([block]); + this.calcWH(); + this.changeEvent.notify(); + }; + + p.getCode = function() { + return this._block.thread.getCode(); + }; + + p.cut = function(block) { + if (this._valueBlock === block) return [block]; + else return null; + }; + + p.replace = function(block) { + if (typeof block === "string") + block = this._createBlockByType(block); + var valueBlock = this._valueBlock; + var valueBlockType = valueBlock.type; + if (Entry.block[valueBlockType].isPrimitive) { + valueBlock.doNotSplice = true; + valueBlock.destroy(); + } else if (this.acceptType === "param") { + this._destroyObservers(); + valueBlock.view._toGlobalCoordinate(); + block.getTerminateOutputBlock().view._contents[1].replace( + valueBlock + ); + } else { + this._destroyObservers(); + valueBlock.view._toGlobalCoordinate(); + this.separate(valueBlock); + valueBlock.view.bumpAway(30, 150); + } + this.updateValueBlock(block); + block.view._toLocalCoordinate(this.svgGroup); + this.calcWH(); + this.changeEvent.notify(); + }; + + p.setParent = function(parent) { + this._parent = parent; + }; + + p.getParent = function() { + return this._parent; + }; + + p._createBlockByType = function(blockType) { + var thread = this._block.getThread(); + var board = this._blockView.getBoard(); + + var block = new Entry.Block({type: blockType}, this); + var workspace = board.workspace; + var mode; + if (workspace) + mode = workspace.getMode(); + + block.createView(board, mode); + return block; + }; + + p.spliceBlock = function() { + this.updateValueBlock(); + }; + + p._updateBG = function() { + if (this.magneting) { + this._bg = this.svgGroup.elem("path", { + d: "m 8,12 l -4,0 -2,-2 0,-3 3,0 1,-1 0,-12 -1,-1 -3,0 0,-3 2,-2 l 4,0 z", + fill: "#fff", + stroke: "#fff", + 'fill-opacity': 0.7, + transform: "translate(0,12)" + }); + } else { + if (this._bg) { + this._bg.remove(); + delete this._bg; + } + } + }; + + p.getThread = function() {return this;}; + + p.pointer = function(pointer) { + pointer.unshift(this._index); + pointer.unshift(Entry.PARAM); + return this._block.pointer(pointer); + }; + +})(Entry.FieldBlock.prototype); diff --git a/src/workspace/field/color.js b/src/workspace/field/color.js new file mode 100644 index 0000000000..1e788e76c0 --- /dev/null +++ b/src/workspace/field/color.js @@ -0,0 +1,139 @@ +/* + */ +"use strict"; + +goog.provide("Entry.FieldColor"); + +goog.require("Entry.Field"); +/* + * + */ +Entry.FieldColor = function(content, blockView, index) { + this._block = blockView.block; + this._blockView = blockView; + + var box = new Entry.BoxModel(); + this.box = box; + + this.svgGroup = null; + + this._contents = content; + this._index = index; + this._position = content.position; + this.key = content.key; + this.setValue(this.getValue() || '#FF0000'); + + this.renderStart(blockView); +}; + +Entry.Utils.inherit(Entry.Field, Entry.FieldColor); + +(function(p) { + var WIDTH = 14.5, + HEIGHT = 16; + + p.renderStart = function() { + if (this.svgGroup) $(this.svgGroup).remove(); + var blockView = this._blockView; + var that = this; + var contents = this._contents; + + + this.svgGroup = blockView.contentSvgGroup.elem('g', { + class: 'entry-field-color' + }); + + var position = this._position; + var x,y; + if (position) { + x = position.x || 0; + y = position.y || 0; + } else { + x = 0; + y = -HEIGHT/2; + } + + this._header = this.svgGroup.elem('rect', { + x:x, y:y, width: WIDTH, height: HEIGHT, + fill: this.getValue() + }); + + this._bindRenderOptions(); + + this.box.set({ + x: x, + y: y, + width: WIDTH, + height: HEIGHT + }); + }; + + p.renderOptions = function() { + var that = this; + + var blockView = this._block.view; + + this._attachDisposeEvent(); + + var colors = Entry.FieldColor.getWidgetColorList(); + this.optionGroup = Entry.Dom('table', { + class:'entry-widget-color-table', + parent: $('body') + }); + for (var i=0; i limit) + ret += '...'; + return ret; + }; + + p.appendSvgOptionGroup = function() { + return this._block.view.getBoard().svgGroup.elem('g'); + }; + + p.getValue = function() { + return this._block.params[this._index]; + }; + + p.setValue = function(value, reDraw) { + if (this.value == value) return; + this.value = value; + this._block.params[this._index] = value; + if (reDraw) this._blockView.reDraw(); + }; + + p._isEditable = function() { + var dragMode = this._block.view.dragMode; + if (dragMode == Entry.DRAG_MODE_DRAG) return false; + var blockView = this._block.view; + var board = blockView.getBoard(); + if (board.disableMouseEvent === true) return false; + + var selectedBlockView = board.workspace.selectedBlockView; + + if (!selectedBlockView || board != selectedBlockView.getBoard()) return false; + + var root = blockView.getSvgRoot(); + + return root == selectedBlockView.svgGroup || + $(root).has($(blockView.svgGroup)); + }; + + p._selectBlockView = function() { + var blockView = this._block.view; + blockView.getBoard().setSelectedBlock(blockView); + }; + + p._bindRenderOptions = function() { + var that = this; + + $(this.svgGroup).bind('mouseup touchend', function(e){ + if (that._isEditable()) { + that.destroyOption(); + that._startValue = that.getValue(); + that.renderOptions(); + } + }); + }; + + p.pointer = function(pointer) { + pointer = pointer || []; + pointer.unshift(this._index); + pointer.unshift(Entry.PARAM); + return this._block.pointer(pointer); + }; + + + +})(Entry.Field.prototype); diff --git a/src/workspace/field/image.js b/src/workspace/field/image.js index 2c339b4f88..0dfca04d5b 100644 --- a/src/workspace/field/image.js +++ b/src/workspace/field/image.js @@ -4,17 +4,19 @@ goog.provide("Entry.FieldImage"); +goog.require("Entry.Field"); /* * */ -Entry.FieldImage = function(content, block) { - this._block = block; +Entry.FieldImage = function(content, blockView, index) { + this._block = blockView.block; + this._blockView = blockView; + this._content = content; var box = new Entry.BoxModel(); this.box = box; this._size = content.size; - this._imgUrl = content.img; this._highlightColor = content.highlightColor? content.highlightColor : "#F59900"; this._position = content.position; @@ -22,20 +24,31 @@ Entry.FieldImage = function(content, block) { this.svgGroup = null; this._path = null; this._imgElement = null; + this._index = index; + this.setValue(null); this.renderStart(); }; +Entry.Utils.inherit(Entry.Field, Entry.FieldImage); + (function(p) { p.renderStart = function() { - this.svgGroup = this._block.contentSvgGroup.group(); - this._imgElement = this.svgGroup.image( - this._imgUrl, - 0, - this._size * -0.5, - this._size, - this._size - ); + if (this.svgGroup) this.svgGroup.remove(); + + var block = this._block; + if(this._block.deletable === Entry.Block.DELETABLE_FALSE_LIGHTEN) + this._imgUrl = this._content.img.replace('.png', '_un.png'); + else this._imgUrl = this._content.img; + + this.svgGroup = this._blockView.contentSvgGroup.elem("g"); + this._imgElement = this.svgGroup.elem("image", { + href: this._imgUrl, + x: 0, + y: this._size * -0.5, + width: this._size, + height: this._size + }); this.box.set({ x: this._size, @@ -45,46 +58,4 @@ Entry.FieldImage = function(content, block) { }); }; - p.align = function(x, y, animate) { - animate = animate === undefined ? true : animate; - var svgGroup = this.svgGroup; - if (this._position) x = this._position.x; - var transform = "t" + x + " " + y; - - if (animate) - svgGroup.animate({ - transform: transform - }, 300, mina.easeinout); - else - svgGroup.attr({ - transform: transform - }); - - this.box.set({ - x: x, - y: y - }); - }; - - p.enableHighlight = function() { - var pathLen = this._path.getTotalLength(); - var path = this._path; - this._path.attr({ - stroke: this._highlightColor, - strokeWidth: 2, - "stroke-linecap": "round", - "stroke-dasharray": pathLen + " " + pathLen, - "stroke-dashoffset": pathLen - }); - setInterval(function() { - path.attr({"stroke-dashoffset": pathLen}) - .animate({"stroke-dashoffset": 0}, 300); - }, 1400, mina.easeout); - setTimeout(function() { - setInterval(function() { - path.animate({"stroke-dashoffset": - pathLen}, 300); - }, 1400, mina.easeout); - }, 500); - }; - })(Entry.FieldImage.prototype); diff --git a/src/workspace/field/indicator.js b/src/workspace/field/indicator.js index da52770d3c..901e8f8115 100644 --- a/src/workspace/field/indicator.js +++ b/src/workspace/field/indicator.js @@ -4,81 +4,67 @@ goog.provide("Entry.FieldIndicator"); +goog.require("Entry.Field"); +goog.require("Entry.SVG"); /* * */ -Entry.FieldIndicator = function(content, block) { - this._block = block; +Entry.FieldIndicator = function(content, blockView, index) { + this._block = blockView.block; + this._blockView = blockView; var box = new Entry.BoxModel(); this.box = box; this._size = content.size; - this._imgUrl = content.img; + if(this._block.deletable === Entry.Block.DELETABLE_FALSE_LIGHTEN) + this._imgUrl = content.img.replace('.png', '_un.png'); + else this._imgUrl = content.img; this._boxMultiplier = content.boxMultiplier || 2; this._highlightColor = content.highlightColor? content.highlightColor : "#F59900"; this._position = content.position; + this._index = index; this.svgGroup = null; this._path = null; this._imgElement = null; + this.setValue(null); this.renderStart(); }; +Entry.Utils.inherit(Entry.Field, Entry.FieldIndicator); + (function(p) { p.renderStart = function() { - this.svgGroup = this._block.contentSvgGroup.group(); - this._imgElement = this.svgGroup.image( - this._imgUrl, - this._size * -1, - this._size * -1, - this._size * 2, - this._size * 2 - ); + if (this.svgGroup) this.svgGroup.remove(); + + this.svgGroup = this._blockView.contentSvgGroup.elem("g"); + + this._imgElement = this.svgGroup.elem("image", { + href: this._imgUrl, + x: this._position ? this._size * -1 : 0, + y: this._size * -1, + width: this._size * 2, + height: this._size * 2 + }); var path = "m 0,-%s a %s,%s 0 1,1 -0.1,0 z" .replace(/%s/gi, this._size); - this._path = this.svgGroup.path(path); - this._path.attr({ + this._path = this.svgGroup.elem("path", { + d: path, stroke: "none", fill: "none" }); this.box.set({ - x: this._size, - y: 0, - width: this._size * this._boxMultiplier, + width: this._size * this._boxMultiplier + + (this._position ? - this._size : 0), height: this._size * this._boxMultiplier }); }; - p.align = function(x, y, animate) { - animate = animate === undefined ? true : animate; - var svgGroup = this.svgGroup; - if (this._position) { - x = this._position.x; - y = this._position.y; - } - - var transform = "t" + x + " " + y; - - if (animate) - svgGroup.animate({ - transform: transform - }, 300, mina.easeinout); - else - svgGroup.attr({ - transform: transform - }); - - this.box.set({ - x: x, - y: y - }); - }; - p.enableHighlight = function() { var pathLen = this._path.getTotalLength(); var path = this._path; diff --git a/src/workspace/field/keyboardInput.js b/src/workspace/field/keyboardInput.js new file mode 100644 index 0000000000..8a9b62f396 --- /dev/null +++ b/src/workspace/field/keyboardInput.js @@ -0,0 +1,160 @@ +/* + */ +"use strict"; + +goog.provide("Entry.Keyboard"); + +goog.require("Entry.Field"); +/* + * + */ +Entry.FieldKeyboard = function(content, blockView, index) { + this._block = blockView.block; + this._blockView = blockView; + + var box = new Entry.BoxModel(); + this.box = box; + + this.svgGroup = null; + + this.position = content.position; + this._contents = content; + this._index = index; + this.setValue(String(this.getValue())); + + this._optionVisible = false; + + this.renderStart(blockView); +}; + +Entry.Utils.inherit(Entry.Field, Entry.FieldKeyboard); + +(function(p) { + var X_PADDING = 8, + TEXT_Y_PADDING = 4, + CONTENT_HEIGHT = 16; + + p.renderStart = function() { + if (this.svgGroup) $(this.svgGroup).remove(); + var blockView = this._blockView; + var that = this; + var contents = this._contents; + + this.svgGroup = blockView.contentSvgGroup.elem("g", { + class: 'entry-input-field' + }); + + this.textElement = + this.svgGroup.elem('text').attr({ + x: X_PADDING/2, + y: TEXT_Y_PADDING, + 'font-size' : '9pt' + }); + + this.textElement.textContent = Entry.getKeyCodeMap()[this.getValue()]; + + var width = this.getTextWidth(); + + var y = this.position && this.position.y ? this.position.y : 0; + y -= CONTENT_HEIGHT/2; + this._header = this.svgGroup.elem('rect', { + x: 0, y: y, + width: width, + height: CONTENT_HEIGHT, + rx: 3, ry: 3, + fill: "#fff", + 'fill-opacity': 0.4 + }); + + this.svgGroup.appendChild(this.textElement); + + this._bindRenderOptions(); + + this.box.set({ + x: 0, + y: 0, + width: width, + height: CONTENT_HEIGHT + }); + }; + + p.renderOptions = function() { + if (Entry.keyPressed) + this.keyPressed = Entry.keyPressed.attach(this, this._keyboardControl); + var that = this; + this._optionVisible = true; + + var blockView = this._blockView; + this._attachDisposeEvent(); + + var pos = this.getAbsolutePosFromDocument(); + pos.x -= this.box.width/2; + pos.y += this.box.height/2 + 1; + + this.optionGroup = Entry.Dom('img', { + class:'entry-widget-keyboard-input', + src: Entry.mediaFilePath + '/media/keyboard_workspace.png', + parent: $('body') + }); + + this.optionGroup.css({ + left: pos.x, top: pos.y + }); + }; + + p.destroyOption = function() { + if (this.disposeEvent) { + Entry.disposeEvent.detach(this.disposeEvent); + delete this.disposeEvent; + } + + if (this.optionGroup) { + this.optionGroup.remove(); + delete this.optionGroup; + } + + this._optionVisible = false; + this.command(); + if (this.keyPressed) { + Entry.keyPressed.detach(this.keyPressed); + delete this.keyPressed; + } + }; + + p._keyboardControl = function(event) { + event.stopPropagation(); + if (!this._optionVisible) return; + + var value = event.keyCode; + var text = Entry.getKeyCodeMap()[value]; + if (text !== undefined) this.applyValue(text, value); + }; + + p.applyValue = function(text, value) { + this.setValue(String(value)); + this.destroyOption(); + this.textElement.textContent = text; + this.resize(); + }; + + p.resize = function() { + var width = this.getTextWidth(); + + this._header.attr({width: width}); + + this.box.set({width: width}); + this._blockView.alignContent(); + }; + + p.getTextWidth = function() { + return this.textElement.getComputedTextLength() + X_PADDING; + }; + + p.destroy = function() { + this.destroyOption(); + + if (Entry.keyPressed && this.keyPressed) + Entry.keyPressed.detach(this.keyPressed); + }; + +})(Entry.FieldKeyboard.prototype); diff --git a/src/workspace/field/lineBreak.js b/src/workspace/field/lineBreak.js new file mode 100644 index 0000000000..5ee5829681 --- /dev/null +++ b/src/workspace/field/lineBreak.js @@ -0,0 +1,45 @@ +/* + * + */ +"use strict"; + +goog.provide("Entry.FieldLineBreak"); + +goog.require("Entry.Field"); + +/* + * + */ +Entry.FieldLineBreak = function(content, blockView, index) { + this._block = blockView.block; + this._blockView = blockView; + this._index = index; + + var box = new Entry.BoxModel(); + this.box = box; + + this.setValue(null); + this.renderStart(); +}; + +Entry.Utils.inherit(Entry.Field, Entry.FieldLineBreak); + +(function(p) { + p.renderStart = function() { + return; + }; + + p.align = function(targetStatementIndex) { + var blockView = this._blockView; + + if (blockView._statements.length === 0) return; + + this.box.set({ + y: (blockView._statements[targetStatementIndex].height || 20) + + Math.max(blockView.contentHeight%1000, 30) + }); + }; + + + +})(Entry.FieldLineBreak.prototype); diff --git a/src/workspace/field/output.js b/src/workspace/field/output.js new file mode 100644 index 0000000000..5ec0e91519 --- /dev/null +++ b/src/workspace/field/output.js @@ -0,0 +1,252 @@ +/* + */ +"use strict"; + +goog.provide("Entry.FieldOutput"); + +goog.require("Entry.Field"); +/* + * + */ +Entry.FieldOutput = function(content, blockView, index, mode, contentIndex) { + Entry.Model(this, false); + + this._blockView = blockView; + this._block = blockView.block; + this._valueBlock = null; + + var box = new Entry.BoxModel(); + this.box = box; + + this.changeEvent = new Entry.Event(this); + + this._index = index; + this.contentIndex = contentIndex; + this._content = content; + + this.acceptType = content.accept; + + this.view = this; + + this.svgGroup = null; + + this._position = content.position; + + this.box.observe(blockView, "alignContent", ["width", "height"]); + this.observe(this, "_updateBG", ["magneting"], false); + + this.renderStart(blockView.getBoard(), mode); +}; + +Entry.Utils.inherit(Entry.Field, Entry.FieldOutput); + +(function(p) { + p.schema = { + magneting: false + }; + + p.renderStart = function(board, mode) { + this.svgGroup = this._blockView.contentSvgGroup.elem("g"); + this.view = this; + this._nextGroup = this.svgGroup; + this.box.set({ + x: 0, + y: 0, + width: 0, + height: 20 + }); + var block = this.getValue(); + if (block && !block.view) { + block.setThread(this); + block.createView(board, mode); + } + this._updateValueBlock(block); + + if (this._blockView.getBoard().constructor == Entry.BlockMenu && + this._valueBlock) + this._valueBlock.view.removeControl(); + }; + + p.align = function(x, y, animate) { + animate = animate === undefined ? true : animate; + var svgGroup = this.svgGroup; + if (this._position) { + if (this._position.x) + x = this._position.x; + if (this._position.y) + y = this._position.y; + } + + var block = this._valueBlock; + + if (block) { + y = block.view.height * -0.5; + } + var transform = "translate(" + x + "," + y + ")"; + + if (animate) + svgGroup.animate({ + transform: transform + }, 300, mina.easeinout); + else + svgGroup.attr({ + transform: transform + }); + + this.box.set({ + x: x, + y: y + }); + }; + + p.calcWH = function() { + var block = this._valueBlock; + + if (block) { + var blockView = block.view; + this.box.set({ + width: blockView.width, + height: blockView.height + }); + } else { + this.box.set({ + width: 0, + height: 20 + }); + } + }; + + p.calcHeight = p.calcWH; + + p.destroy = function() {}; + + p._inspectBlock = function() { + }; + + p._setValueBlock = function(block) { + if (block != this._valueBlock || !this._valueBlock) { + + this._valueBlock = block; + this.setValue(block); + + if (block) + block.setThread(this); + + return this._valueBlock; + } + }; + + p._updateValueBlock = function(block) { + if (!(block instanceof Entry.Block)) block = undefined; + if (this._sizeObserver) this._sizeObserver.destroy(); + if (this._posObserver) this._posObserver.destroy(); + + block = this._setValueBlock(block); + if (block) { + var view = block.view; + view.bindPrev(); + this._posObserver = view.observe(this, "_updateValueBlock", ["x", "y"], false); + this._sizeObserver = view.observe(this, "calcWH", ["width", "height"]); + } else { + this.calcWH(); + } + this._blockView.alignContent(); + var board = this._blockView.getBoard();// performance issue + if (board.constructor === Entry.Board) + board.generateCodeMagnetMap(); + }; + + p.getPrevBlock = function(block) { + if (this._valueBlock === block) return this; + else return null; + }; + + p.getNextBlock = function() { + return null; + }; + + p.requestAbsoluteCoordinate = function(blockView) { + var blockView = this._blockView; + var contentPos = blockView.contentPos; + var pos = blockView.getAbsoluteCoordinate(); + pos.x += this.box.x + contentPos.x; + pos.y += this.box.y + contentPos.y; + return pos; + }; + + p.dominate = function() { + this._blockView.dominate(); + }; + + p.isGlobal = function() { + return false; + }; + + p.separate = function(block) { + this.getCode().createThread([block]); + this.changeEvent.notify(); + }; + + p.getCode = function() { + return this._block.thread.getCode(); + }; + + p.cut = function(block) { + if (this._valueBlock === block) { + delete this._valueBlock; + return [block]; + } + else return null; + }; + + p._updateBG = function() { + if (this.magneting) { + this._bg = this.svgGroup.elem("path", { + d: "m -4,-12 h 3 l 2,2 0,3 3,0 1,1 0,12 -1,1 -3,0 0,3 -2,2 h -3 ", + fill: "#fff", + stroke: "#fff", + 'fill-opacity': 0.7, + transform: "translate(0," + (this._valueBlock ? 12 : 0) + ")" + }); + } else { + if (this._bg) { + this._bg.remove(); + delete this._bg; + } + } + }; + + p.replace = function(block) { + var valueBlock = this._valueBlock; + if (valueBlock) { + valueBlock.view._toGlobalCoordinate(); + block.getTerminateOutputBlock().view._contents[1].replace( + valueBlock + ); + } + this._updateValueBlock(block); + block.view._toLocalCoordinate(this.svgGroup); + this.calcWH(); + }; + + p.setParent = function(parent) { + this._parent = parent; + }; + + p.getParent = function() { + return this._parent; + }; + + p.getThread = function() { + return this; + }; + + p.getValueBlock = function() {return this._valueBlock;}; + + p.pointer = function(pointer) { + pointer.unshift(this._index); + pointer.unshift(Entry.PARAM); + return this._block.pointer(pointer); + }; + +})(Entry.FieldOutput.prototype); diff --git a/src/workspace/field/statement.js b/src/workspace/field/statement.js index f24dfb4948..4b0189d929 100644 --- a/src/workspace/field/statement.js +++ b/src/workspace/field/statement.js @@ -3,67 +3,85 @@ "use strict"; goog.provide("Entry.FieldStatement"); -goog.provide("Entry.DummyBlock"); + +goog.require("Entry.BlockView"); /* * */ -Entry.FieldStatement = function(content, blockView) { +Entry.FieldStatement = function(content, blockView, index) { + Entry.Model(this, false); + this._blockView = blockView; this.block = blockView.block; - this.key = content.key; + this.view = this; - var box = new Entry.BoxModel(); - this.box = box; + this._index = index; this.acceptType = content.accept; this.svgGroup = null; - this.dummyBlock = null; + this.statementSvgGroup = null; + this._thread = null; - if (content.alignX) this._alignX = content.alignX; - if (content.alignY) this._alignY = content.alignY; + this._position = content.position; - this.box.observe(blockView, "alignContent", ["height"]); + this.observe(blockView, "alignContent", ["height"], false); + this.observe(this, "_updateBG", ["magneting"], false); this.renderStart(blockView.getBoard()); - this.block.observe(this, "_updateThread", ["thread"]); }; (function(p) { + p.schema = { + x: 0, + y: 0, + width: 100, + height: 20, + magneting: false + }; + + p.magnet = { + next: {x: 0, y: 0} + }; + p.renderStart = function(board) { - this.svgGroup = this._blockView.contentSvgGroup.group(); - this.box.set({ - x: 46, - y: 0, - width: 20, - height: 20 - }); - this._thread = this._blockView.block.values[this.key]; - this.dummyBlock = new Entry.DummyBlock(this, this._blockView); - this._thread.insertDummyBlock(this.dummyBlock); - this._thread.createView(board); - this._thread.changeEvent.attach(this, this.calcHeight); - this.calcHeight(); + this.svgGroup = this._blockView.statementSvgGroup.elem('g'); + this.statementSvgGroup = this.svgGroup.elem('g'); + this._nextGroup = this.statementSvgGroup; + this._initThread(board); + this._board = board; }; - p.calcHeight = function() { - var block = this.dummyBlock, - height = - 1; - while (block) { - height += block.view.height + 1; - block = block.next; + p._initThread = function(board) { + var thread = this.getValue(); + this._thread = thread; + thread.createView(board); + thread.view.setParent(this); + var firstBlock = thread.getFirstBlock(); + if (firstBlock) { + firstBlock.view._toLocalCoordinate(this.statementSvgGroup); + this.firstBlock = firstBlock; } - this.box.set({height: height}); + thread.changeEvent.attach(this, this.calcHeight); + thread.changeEvent.attach(this, this.checkTopBlock); + this.calcHeight(); }; p.align = function(x, y, animate) { animate = animate === undefined ? true : animate; var svgGroup = this.svgGroup; - var x = this._alignX || 46; - var y = this._alignY || 14; - var transform = "t" + x + " " + y; + if (this._position) { + if (this._position.x) + x = this._position.x; + if (this._position.y) + y = this._position.y; + } + + var transform = "translate(" + x + "," + y + ")"; + + this.set({x: x, y: y}); if (animate) svgGroup.animate({ @@ -75,117 +93,109 @@ Entry.FieldStatement = function(content, blockView) { }); }; - p._updateThread = function() { - if (this._threadChangeEvent) - this._thread.changeEvent.detach(this._threadChangeEvent); - var thread = this.block.thread; - this._threadChangeEvent = this._thread.changeEvent.attach(this, function() { - thread.changeEvent.notify(); - }); - }; - -})(Entry.FieldStatement.prototype); - -Entry.DummyBlock = function(statementField, blockView) { - Entry.Model(this, false); - - this.view = this; - this.originBlockView = blockView; - this._schema = {}; - this._thread = statementField._thread; - this.statementField = statementField; - - this.svgGroup = statementField.svgGroup.group(); - this.svgGroup.block = this; - - var acceptBox = Entry.skeleton[statementField.acceptType].box(); - - this.path = this.svgGroup.rect( - acceptBox.offsetX, - acceptBox.offsetY - 10, - acceptBox.width, - acceptBox.height - ); - this.path.attr({ - fill: "transparent" - }); - - this.prevObserver = blockView.observe( - this, "_align", ["x", "y"] - ); - - this.prevAnimatingObserver = blockView.observe( - this, "_inheritAnimate", ["animating"] - ); - - this.observe(this, "_updateBG", ["magneting"]); - - this._align(); -}; - -(function(p) { - p.schema = { - x: 0, - y: 0, - width: 0, - height: 0, - animating: false, - magneting: false + p.calcHeight = function() { + var height = this._thread.view.requestPartHeight(null); + this.set({height: height}); }; - p._align = function(animate) { - this.set({ - x: this.originBlockView.x, - y: this.originBlockView.y - }); + p.getValue = function() { + return this.block.statements[this._index]; }; - p.insertAfter = function(blocks) { - this._thread.insertByBlock(this, blocks); - this.statementField.calcHeight(); + p.requestAbsoluteCoordinate = function() { + var pos = this._blockView.getAbsoluteCoordinate(); + pos.x += this.x; + pos.y += this.y; + return pos; }; - p.createView = function() { + p.dominate = function() { + this._blockView.dominate(); }; - p.setThread = function() { - }; + p.destroy = function() {}; - p.setPrev = function() { - }; - - p.setNext = function(block) { - this.next = block; - }; + p._updateBG = function() { + if (!this._board.dragBlock || !this._board.dragBlock.dragInstance) + return; + var blockView = this; + var magneting = blockView.magneting; + var block = blockView.block; + var svgGroup = blockView.svgGroup; + + if (magneting) { + var shadow = this._board.dragBlock.getShadow(); + var pos = this.requestAbsoluteCoordinate(); + var transform = 'translate(' + pos.x + ',' + pos.y + ')'; + $(shadow).attr({ + transform: transform, + display: 'block' + }); + this._clonedShadow = shadow; - p.getBoard = function() { - return this.originBlockView.getBoard(); - }; + if (blockView.background) { + blockView.background.remove(); + blockView.nextBackground.remove(); + delete blockView.background; + delete blockView.nextBackground; + } + var height = this._board.dragBlock.getBelowHeight(); - p._inheritAnimate = function() { - this.set({animating: this.originBlockView.animating}); - }; + this.statementSvgGroup.attr({ + transform: 'translate(0,' + height + ')' + }); - p._updateBG = function() { - if (this.magneting) { - var dragThreadHeight = this.getBoard().dragBlock.dragInstance.height; - this.set({height: dragThreadHeight}); - var shadow = this.getBoard().dragBlock.getShadow(); - shadow.attr({transform: "t0 " + 0}); - this.svgGroup.prepend(shadow); - this._clonedShadow = shadow; + this.set({height: this.height + height}); } else { if (this._clonedShadow) { - this._clonedShadow.remove(); + this._clonedShadow.attr({display: 'none'}); delete this._clonedShadow; } - this.set({height: 0}); + + var height = blockView.originalHeight; + if (height !== undefined) { + if (blockView.background) { + blockView.background.remove(); + blockView.nextBackground.remove(); + delete blockView.background; + delete blockView.nextBackground; + } + delete blockView.originalHeight; + } + this.statementSvgGroup.attr({ + transform: 'translate(0,0)' + }); + this.calcHeight(); } - this._thread.changeEvent.notify(); + var changeEvent = blockView.block.thread.changeEvent; + if (changeEvent) changeEvent.notify(); }; - p.dominate = function() { - this.originBlockView.dominate(); + p.insertTopBlock = function(newBlock) { + if (this._posObserver) this._posObserver.destroy(); + + var block = this.firstBlock; + this.firstBlock = newBlock; + if (newBlock) { + newBlock.doInsert(this._thread); + + } + return block; + }; + + p.getNextBlock = function () { + return this.firstBlock; }; -})(Entry.DummyBlock.prototype); + p.checkTopBlock = function() { + var firstBlock = this._thread.getFirstBlock(); + if (firstBlock && this.firstBlock !== firstBlock) { + this.firstBlock = firstBlock; + firstBlock.view.bindPrev(this); + firstBlock._updatePos(); + } else if (!firstBlock){ + this.firstBlock = null; + } + }; + +})(Entry.FieldStatement.prototype); diff --git a/src/workspace/field/text.js b/src/workspace/field/text.js index 5f95d2ac9e..22beaa6da3 100644 --- a/src/workspace/field/text.js +++ b/src/workspace/field/text.js @@ -5,64 +5,65 @@ goog.provide("Entry.FieldText"); +goog.require("Entry.Field"); + /* * */ -Entry.FieldText = function(content, block) { - this._block = block; +Entry.FieldText = function(content, blockView, index) { + this._block = blockView.block; + this._blockView = blockView; + this._index = index; var box = new Entry.BoxModel(); this.box = box; - this._fontSize = content.fontSize || block.getSkeleton().fontSize || 12; - this._text = content.text; + this._fontSize = content.fontSize || blockView.getSkeleton().fontSize || 12; + this._color = content.color || this._block.getSchema().fontColor || + blockView.getSkeleton().color || 'white'; + this._align = content.align || 'left'; + this._text = this.getValue() || content.text; + this.setValue(null); this.textElement = null; - this.renderStart(); + this.renderStart(blockView); }; +Entry.Utils.inherit(Entry.Field, Entry.FieldText); + (function(p) { p.renderStart = function() { + if (this.svgGroup) $(this.svgGroup).remove(); + var blockView = this._blockView; var that = this; - this.textElement = this._block.contentSvgGroup.text(0, 0, this._text); - this.textElement.attr({ + + this.svgGroup = blockView.contentSvgGroup.elem("g"); + + this._text = this._text.replace(/(\r\n|\n|\r)/gm," "); + this.textElement = this.svgGroup.elem("text").attr({ 'style': 'white-space: pre; font-size:' + that._fontSize + 'px', "class": "dragNone", - "fill": "white" + "fill": that._color }); - var bBox = this.textElement.getBBox(); + this.textElement.textContent = this._text; + + var x = 0; + var bBox = this.textElement.getBoundingClientRect(); + if (this._align == 'center') x = -bBox.width/2; + this.textElement.attr({ - 'y': bBox.height * 0.25 + x: x, + y: bBox.height * 0.25 }); + this.box.set({ x: 0, y: 0, - width: this.textElement.node.getComputedTextLength(), + width: bBox.width, height: bBox.height }); }; - p.align = function(x, y, animate) { - if (animate !== true) animate = false; - var elem = this.textElement; - - var attr = {x: x}; - - if (animate) - elem.animate( - attr, - 300, - mina.easeinout - ); - else elem.attr(attr); - - - this.box.set({ - x: x, - width: this.textElement.node.getComputedTextLength(), - y: y - }); - }; })(Entry.FieldText.prototype); diff --git a/src/workspace/field/textInput.js b/src/workspace/field/textInput.js new file mode 100644 index 0000000000..11413688f0 --- /dev/null +++ b/src/workspace/field/textInput.js @@ -0,0 +1,143 @@ +/* + */ +"use strict"; + +goog.provide("Entry.FieldTextInput"); + +goog.require("Entry.Field"); +/* + * + */ +Entry.FieldTextInput = function(content, blockView, index) { + this._blockView = blockView; + this._block = blockView.block; + + var box = new Entry.BoxModel(); + this.box = box; + + this.svgGroup = null; + + this.position = content.position; + this._contents = content; + this._index = index; + this.value = this.getValue() || ''; + + this.renderStart(); +}; + +Entry.Utils.inherit(Entry.Field, Entry.FieldTextInput); + +(function(p) { + var X_PADDING = 6, + TEXT_Y_PADDING = 4, + CONTENT_HEIGHT = 16; + + p.renderStart = function() { + if (this.svgGroup) $(this.svgGroup).remove(); + var blockView = this._blockView; + var that = this; + var contents = this._contents; + + this.svgGroup = blockView.contentSvgGroup.elem("g"); + this.svgGroup.attr({ + class: 'entry-input-field' + }); + + this.textElement = this.svgGroup.elem("text", { + x: X_PADDING/2, + y: TEXT_Y_PADDING, + 'font-size' : '9pt' + }); + this.textElement.textContent = this.truncate(); + + var width = this.getTextWidth(); + + var y = this.position && this.position.y ? this.position.y : 0; + y -= CONTENT_HEIGHT/2; + this._header = this.svgGroup.elem("rect", { + width: width, + height: CONTENT_HEIGHT, + y: y, + rx: 3, ry: 3, + fill: "transparent" + }); + + this.svgGroup.appendChild(this.textElement); + + this._bindRenderOptions(); + + this.box.set({ + x: 0, + y: 0, + width: width, + height: CONTENT_HEIGHT + }); + }; + + p.renderOptions = function() { + var that = this; + + var blockView = this._blockView; + + var func = function() { + that.applyValue(); + that.destroyOption(); + }; + + this._attachDisposeEvent(func); + + this.optionGroup = Entry.Dom('input', { + class:'entry-widget-input-field', + parent: $('body') + }); + + this.optionGroup.val(this.getValue()); + + this.optionGroup.on('mousedown', function(e) { + e.stopPropagation(); + }); + + this.optionGroup.on('keyup', function(e){ + var exitKeys = [13, 27]; + var keyCode = e.keyCode || e.which; + that.applyValue(e); + + if (exitKeys.indexOf(keyCode) > -1) + that.destroyOption(); + }); + + var pos = this.getAbsolutePosFromDocument(); + pos.y -= this.box.height/2; + this.optionGroup.css({ + height: CONTENT_HEIGHT, + left:pos.x, + top:pos.y, + width: that.box.width + }); + + this.optionGroup.focus(); + this.optionGroup.select(); + }; + + p.applyValue = function(event) { + var value = this.optionGroup.val(); + this.setValue(value); + this.textElement.textContent = this.truncate(); + this.resize(); + }; + + p.resize = function() { + var width = this.getTextWidth(); + + this._header.attr({width: width}); + this.optionGroup.css({width: width}); + + this.box.set({width: width}); + this._blockView.alignContent(); + }; + + p.getTextWidth = function() { + return this.textElement.getComputedTextLength() + X_PADDING + 2; + }; + +})(Entry.FieldTextInput.prototype); diff --git a/src/workspace/globalSvg.js b/src/workspace/globalSvg.js new file mode 100644 index 0000000000..f67ab6d7e7 --- /dev/null +++ b/src/workspace/globalSvg.js @@ -0,0 +1,186 @@ +'use strict'; + +goog.provide('Entry.GlobalSvg'); + +(function(gs) { + gs.DONE = 0; + gs._inited = false; + gs.REMOVE = 1; + gs.RETURN = 2; + + gs.createDom = function() { + if (this.inited) return; + + + //document attached element not removed by angular + $('#globalSvgSurface').remove(); + $('#globalSvg').remove(); + + var body = $('body'); + this._container = Entry.Dom('div', { + classes: ['globalSvgSurface', 'entryRemove'], + id: 'globalSvgSurface', + parent: body + }); + + this.svgDom = Entry.Dom( + $(''), + { parent: body } + ); + + this.svg = Entry.SVG('globalSvg'); + this.width = 0; + this.left = 0; + this.top = 0; + this._inited = true; + }; + + gs.setView = function(view, mode) { + if (view == this._view) return; + var data = view.block; + if (data.isReadOnly() || !view.movable) return; + this._view = view; + this._mode = mode; + if (mode !== Entry.Workspace.MODE_VIMBOARD) + view.set({visible:false}); + + this.draw(); + this.show(); + this.align(); + this.position(); + return true; + }; + + gs.draw = function() { + var that = this; + var blockView = this._view; + if (this._svg) this.remove(); + var isVimMode = this._mode == Entry.Workspace.MODE_VIMBOARD; + + this.svgGroup = Entry.SVG.createElement( + blockView.svgGroup.cloneNode(true), + {'opacity':1} + ); + + this.svg.appendChild(this.svgGroup); + //TODO selectAll function replace + if (isVimMode) { + var svg = $(this.svgGroup); + svg.find('g').css({filter: 'none'}); + svg.find('path').velocity({ + opacity: 0 + }, { + duration: 500 + }); + + svg.find('text').velocity({ + fill: '#000000' + }, { + duration: 530 + }); + } + }; + + gs.remove = function() { + if (!this.svgGroup) return; + this.svgGroup.remove(); + delete this.svgGroup; + delete this._view; + delete this._offsetX; + delete this._offsetY; + delete this._startX; + delete this._startY; + this.hide(); + }; + + gs.align = function() { + var offsetX = this._view.getSkeleton().box(this._view).offsetX || 0; + var offsetY = this._view.getSkeleton().box(this._view).offsetY || 0; + offsetX *= -1; + offsetX += 1; + offsetY *= -1; + offsetY += 1; + this._offsetX = offsetX; + this._offsetY = offsetY; + var transform = "translate(" + offsetX + "," + offsetY + ')'; + this.svgGroup.attr({transform: transform}); + }; + + gs.show = function() { + this._container.removeClass('entryRemove'); + this.svgDom.css('display', 'block'); + }; + + gs.hide = function() { + this._container.addClass('entryRemove'); + this.svgDom.css('display', 'none'); + }; + + gs.position = function() { + var that = this; + var blockView = this._view; + var pos = blockView.getAbsoluteCoordinate(); + var offset = blockView.getBoard().offset(); + this.left = pos.x + offset.left - this._offsetX; + this.top = pos.y + offset.top - this._offsetY; + + var dom = this.svgDom[0]; + dom.style.left = this.left + 'px'; + dom.style.top = this.top + 'px'; + }; + + gs.terminateDrag = function(blockView) { + var mousePos = Entry.mouseCoordinate; + var blockMenu = blockView.getBoard().workspace.blockMenu; + var bLeft = blockMenu.offset().left; + var bTop = blockMenu.offset().top; + var bWidth = blockMenu.visible ? blockMenu.svgDom.width() : 0; + if (mousePos.y > bTop && mousePos.x > bLeft + bWidth) + return this.DONE; + else if (mousePos.y > bTop && mousePos.x > bLeft && blockMenu.visible) + return this.REMOVE; + else return this.RETURN; + }; + + gs.addControl = function(e) { + this.onMouseDown.apply(this, arguments); + }; + + + gs.onMouseDown = function(e) { + this._startY = e.pageY; + var that = this; + e.stopPropagation(); + e.preventDefault(); + var doc = $(document); + doc.bind('mousemove.block', onMouseMove); + doc.bind('mouseup.block', onMouseUp); + doc.bind('touchmove.block', onMouseMove); + doc.bind('touchend.block', onMouseUp); + this._startX = e.pageX; + this._startY = e.pageY; + + function onMouseMove(e) { + var newX = e.pageX; + var newY = e.pageY; + var dX = newX - that._startX; + var dY = newY - that._startY; + var newLeft = that.left + dX; + var newTop = that.top + dY; + that.svgDom.css({ + left : newLeft, + top : newTop, + }); + that._startX = newX; + that._startY = newY; + that.left = newLeft; + that.top = newTop; + } + + function onMouseUp(e) { + $(document).unbind('.block'); + } + }; + +})(Entry.GlobalSvg); diff --git a/src/workspace/mutator.js b/src/workspace/mutator.js new file mode 100644 index 0000000000..43cffd15b6 --- /dev/null +++ b/src/workspace/mutator.js @@ -0,0 +1,30 @@ +/* + * + */ +"use strict"; + +goog.provide("Entry.Mutator"); + +/* + * + */ +Entry.Mutator = function() { +}; + +(function(m) { + m.mutate = function(blockType, schemaDiff) { + var blockSchema = Entry.block[blockType]; + if (blockSchema.changeEvent === undefined) + blockSchema.changeEvent = new Entry.Event(); + + //statements params template + blockSchema.template = schemaDiff.template; + + blockSchema.params = schemaDiff.params; + + blockSchema.changeEvent.notify(1); + }; +})(Entry.Mutator); + +(function(p) { +})(Entry.Mutator.prototype); diff --git a/src/workspace/renderView.js b/src/workspace/renderView.js new file mode 100644 index 0000000000..5cb5020364 --- /dev/null +++ b/src/workspace/renderView.js @@ -0,0 +1,138 @@ +"use strict"; + +goog.provide("Entry.RenderView"); + +goog.require("Entry.Dom"); +goog.require("Entry.Utils"); + +Entry.RenderView = function(dom, align) { + this._align = align || "CENTER"; + + if (typeof dom === "string") dom = $('#' + dom); + else dom = $(dom); + + if (dom.prop("tagName") !== "DIV") + return console.error("Dom is not div element"); + + this.view = dom; + this.viewOnly = true; + this.suffix = 'renderView'; + + this.visible = true; + this.disableMouseEvent = true; + this._svgId = 'renderView_' + new Date().getTime(); + this._generateView(); + + this.offset = this.svgDom.offset(); + this.setWidth(); + + + this.svg = Entry.SVG(this._svgId); + Entry.Utils.addFilters(this.svg, this.suffix); + + if (this.svg) { + this.svgGroup = this.svg.elem("g"); + + this.svgThreadGroup = this.svgGroup.elem("g"); + this.svgThreadGroup.board = this; + + this.svgBlockGroup = this.svgGroup.elem("g"); + this.svgBlockGroup.board = this; + } +}; + +(function(p) { + p.schema = { + code: null, + dragBlock: null, + closeBlock: null, + selectedBlockView: null + }; + + p._generateView = function() { + var parent = this.view; + var that = this; + + this.renderViewContainer = Entry.Dom('div', { + 'class':'renderViewContainer', + 'parent':parent + }); + + + this.svgDom = Entry.Dom( + $(''), + { parent: this.renderViewContainer } + ); + }; + + p.changeCode = function(code) { + if (!(code instanceof Entry.Code)) + return console.error("You must inject code instance"); + var that = this; + this.code = code; + if (!this.svg) { + this.svg = Entry.SVG(this._svgId); + this.svgGroup = this.svg.elem("g"); + + this.svgThreadGroup = this.svgGroup.elem("g"); + this.svgThreadGroup.board = this; + + this.svgBlockGroup = this.svgGroup.elem("g"); + this.svgBlockGroup.board = this; + } + + code.createView(this); + this.align(); + this.resize(); + }; + + p.align = function() { + var threads = this.code.getThreads(); + if (!threads || threads.length === 0) return; + var totalHeight = 0; + var vPadding = 15, + marginFromTop = 0, + hPadding = this._align == 'LEFT' ? 20 : this.svgDom.width()/2; + + for (var i=0,len=threads.length; i bWidth || bBox.height > bHeight) - //visible = true; - - this.setVisible(visible); - - if (visible) { - // hScroll - if (this._horizontal) { - var hLimitA = - bBox.width + Entry.BOARD_PADDING, - hLimitB = bWidth - Entry.BOARD_PADDING; - - var hWidth = (bWidth + 2 * Entry.Scroller.RADIUS) * bBox.width / - (hLimitB - hLimitA + bBox.width); - if (isNaN(hWidth)) hWidth = 0; - this.hX = (bBox.x - hLimitA) / (hLimitB - hLimitA) * - (bWidth - hWidth - 2 * Entry.Scroller.RADIUS); - this.hScrollbar.attr({ - width: hWidth, - x: this.hX, - y: bHeight - 2 * Entry.Scroller.RADIUS - }); - - this.hRatio = (bWidth - hWidth - 2 * Entry.Scroller.RADIUS)/ (hLimitB - hLimitA); - } - - // vScroll - if (this._vertical) { - var vLimitA = - bBox.height + Entry.BOARD_PADDING, - vLimitB = bHeight - Entry.BOARD_PADDING; - - var vWidth = (bHeight + 2 * Entry.Scroller.RADIUS) * bBox.height / - (vLimitB - vLimitA + bBox.height); - this.vY = (bBox.y - vLimitA) / (vLimitB - vLimitA) * - (bHeight - vWidth - 2 * Entry.Scroller.RADIUS); - this.vScrollbar.attr({ - height: vWidth, - y: this.vY, - x: bWidth - 2 * Entry.Scroller.RADIUS - }); - - this.vRatio = (bHeight - vWidth - 2 * Entry.Scroller.RADIUS)/ (vLimitB - vLimitA); - } + }; } }; @@ -206,8 +169,15 @@ Entry.Scroller.RADIUS = 7; }; p.scroll = function(x, y) { - var bBox = this.board.svgBlockGroup.getBBox(), - svgDom = this.board.svgDom; + if (!this.board.code) return; + var clientRect = this.board.svgBlockGroup.getBoundingClientRect(), + svgDom = this.board.svgDom, + bBox = { + x: clientRect.left - this.board.offset().left, + y: clientRect.top - this.board.offset().top, + width: clientRect.width, + height: clientRect.height + }; x = Math.max(-bBox.width + Entry.BOARD_PADDING - bBox.x, x); y = Math.max(-bBox.height + Entry.BOARD_PADDING - bBox.y, y); x = Math.min( @@ -218,6 +188,11 @@ Entry.Scroller.RADIUS = 7; svgDom.height() - Entry.BOARD_PADDING - bBox.y, y ); + + Entry.do("scrollBoard", x, y).isPass(); + }; + + p._scroll = function(x, y) { this.board.code.moveBy(x, y); this.updateScrollBar(x, y); }; @@ -234,4 +209,72 @@ Entry.Scroller.RADIUS = 7; p.isVisible = function() { return this._visible; }; + + p.setOpacity = function(value) { + if (this._opacity == value) return; + this.hScrollbar.attr({ opacity: value }); + this.vScrollbar.attr({ opacity: value }); + + this._opacity = value; + }; + + p.resizeScrollBar = function() { + if (!this._visible) return; + + var board = this.board, + bRect = board.svgBlockGroup.getBoundingClientRect(), + svgDom = board.svgDom, + bWidth = svgDom.width(), + bHeight = svgDom.height(), + bBox = { + x: bRect.left - board.offset().left, + y: bRect.top - board.offset().top, + width: bRect.width, + height: bRect.height + }; + + // hScroll + if (this._horizontal) { + var hLimitA = - bBox.width + Entry.BOARD_PADDING, + hLimitB = bWidth - Entry.BOARD_PADDING; + + var hWidth = (bWidth + 2 * Entry.Scroller.RADIUS) * bBox.width / + (hLimitB - hLimitA + bBox.width); + if (isNaN(hWidth)) hWidth = 0; + this.hX = (bBox.x - hLimitA) / (hLimitB - hLimitA) * + (bWidth - hWidth - 2 * Entry.Scroller.RADIUS); + this.hScrollbar.attr({ + width: hWidth, + x: this.hX, + y: bHeight - 2 * Entry.Scroller.RADIUS + }); + + this.hRatio = (bWidth - hWidth - 2 * Entry.Scroller.RADIUS)/ (hLimitB - hLimitA); + } + + // vScroll + if (this._vertical) { + var vLimitA = - bBox.height + Entry.BOARD_PADDING, + vLimitB = bHeight - Entry.BOARD_PADDING; + + var vWidth = (bHeight + 2 * Entry.Scroller.RADIUS) * bBox.height / + (vLimitB - vLimitA + bBox.height); + this.vY = (bBox.y - vLimitA) / (vLimitB - vLimitA) * + (bHeight - vWidth - 2 * Entry.Scroller.RADIUS); + this.vScrollbar.attr({ + height: vWidth, + y: this.vY, + x: bWidth - 2 * Entry.Scroller.RADIUS + }); + + this.vRatio = (bHeight - vWidth - 2 * Entry.Scroller.RADIUS)/ (vLimitB - vLimitA); + } + }; + + p._bindEvent = function() { + var dResizeScrollBar = _.debounce(this.resizeScrollBar, 200); + this.board.changeEvent.attach(this, dResizeScrollBar); + if (Entry.windowResized) + Entry.windowResized.attach(this, dResizeScrollBar); + }; })(Entry.Scroller.prototype); diff --git a/src/workspace/skeleton.js b/src/workspace/skeleton.js index c826c6ca03..c529ac51c8 100644 --- a/src/workspace/skeleton.js +++ b/src/workspace/skeleton.js @@ -13,80 +13,141 @@ Entry.skeleton = function() { }; Entry.skeleton.basic = { - path: function(block) { - var width = block.contentWidth; - width = Math.max(0, width - 6); - return "m -8,0 l 8,8 8,-8 h %w a 15,15 0 0,1 0,30 h -%w l -8,8 -8,-8 v -30 z" - .replace(/%w/gi, width); + path: function(blockView) { + var width = blockView.contentWidth; + var height = blockView.contentHeight; + height = Math.max(30, height + 2); + width = Math.max(0, width + 9 - height / 2); + return "m -8,0 l 8,8 8,-8 h %w a %h,%h 0 0,1 0,%wh h -%w l -8,8 -8,-8 v -%wh z" + .replace(/%wh/gi, height) + .replace(/%w/gi, width) + .replace(/%h/gi, height / 2); }, - box: function(block) { - var width = block ? block.contentWidth : 150; + box: function(blockView) { + var width = blockView ? blockView.contentWidth : 150; + var height = blockView ? blockView.contentHeight : 28; return { - offsetX: 0, offsetY: 0, + offsetX: -8, offsetY: 0, width: width + 30, - height: 30, + height: Math.max(30, height + 2), marginBottom: 0 }; }, - magnets: { + magnets: function(blockView) { // apply scale required. - previous: {}, - next: {x: 0, y: 31} + var height = blockView ? Math.max(blockView.height, 30) : 30; + return { + previous: {x: 0, y: 0}, + next: {x: 0, y: height + 1 + blockView.offsetY} + }; }, - contentPos: function(block) { + contentPos: function(blockView) { // apply scale required. - return {x: 14, y: 15}; + var height = Math.max(blockView.contentHeight, 28); + return {x: 14, y: height / 2 + 1}; } - }; Entry.skeleton.basic_event = { - path: function(block) { - var width = block.contentWidth; + path: function(blockView) { + var width = blockView.contentWidth; width = Math.max(0, width); return ("m -8,0 m 0,-5 a 19.5,19.5 0, 0,1 16,0 c 10,5 15,5 20,5 h %w " + "a 15,15 0 0,1 0,30 H 8 l -8,8 -8,-8 l 0,0.5 a 19.5,19.5 0, 0,1 0,-35 z") .replace(/%w/gi, width - 30); }, - box: function(block) { + box: function(blockView) { return { - offsetX: 0, offsetY: 0, - width: block.contentWidth + 30, + offsetX: -19, offsetY: -7, + width: blockView.contentWidth + 30, height: 30, marginBottom: 0 }; }, - magnets: { + magnets: function(blockView) { // apply scale required. - previous: {}, - next: {x: 0, y: 31} + var height = blockView ? Math.max(blockView.height + blockView.offsetY + 7, 30) : 30; + return { + next: {x: 0, y: height + 1} + }; }, - contentPos: function(block) { + contentPos: function(blockView) { // apply scale required. return {x: 1, y: 15}; } }; Entry.skeleton.basic_loop = { - path: function(block) { - var contentWidth = Math.max(0, block.contentWidth - 31); - var contentHeight = Math.max(block.contentHeight, 25); - return ("m -8,0 l 8,8 8,-8 h %cw a 15,15 0 0,1 0,30 H 24 l -8,8 -8,-8 h -0.4 v %ch h 0.4 l 8,8 8,-8 h %cw h -8 a 8,8 0 0,1 0,16 H 8 l -8,8 -8,-8 z") - .replace(/%cw/gi, contentWidth) - .replace(/%ch/gi, contentHeight); + path: function(blockView) { + var width = blockView.contentWidth; + var height = blockView.contentHeight; + height = Math.max(30, height + 2); + width = Math.max(0, width + 9 - height / 2); + var statementHeight = blockView._statements[0] ? blockView._statements[0].height : 20; + statementHeight = Math.max(statementHeight, 20); + return ("m -8,0 l 8,8 8,-8 h %w a %h,%h 0 0,1 0,%wh H 24 l -8,8 -8,-8 h -0.4 v %sh h 0.4 l 8,8 8,-8 h %bw a 8,8 0 0,1 0,16 H 8 l -8,8 -8,-8 z") + .replace(/%wh/gi, height) + .replace(/%w/gi, width) + .replace(/%bw/gi, width - 8) + .replace(/%h/gi, height / 2) + .replace(/%sh/gi, statementHeight + 1); }, - magnets: function() { - var contentWidth = 124; - var contentHeight = 50; - // apply scale required. + magnets: function(blockView) { + var contentHeight = Math.max(blockView.contentHeight + 2, 30); + var statementHeight = blockView._statements[0] ? blockView._statements[0].height : 20; + statementHeight = Math.max(statementHeight, 20); return { previous: {x: 0, y: 0}, - next: {x: 0, y: contentHeight + 55} + next: {x: 0, y: statementHeight + contentHeight + 18 + blockView.offsetY} + }; + }, + box: function(blockView) { + var contentWidth = blockView.contentWidth; + var contentHeight = Math.max(blockView.contentHeight + 2, 30); + var statementHeight = blockView._statements[0] ? blockView._statements[0].height : 20; + statementHeight = Math.max(statementHeight, 20); + return { + offsetX: -8, offsetY: 0, + width: contentWidth + 30, + height: contentHeight + statementHeight + 17, + marginBottom: 0 }; }, - box: function(block) { - var contentWidth = block.contentWidth; - var contentHeight = Math.max(block.contentHeight, 25); + statementPos: function(blockView) { + var height = Math.max(30, blockView.contentHeight + 2) + 1; + return [ + { x: 16, y: height } + ]; + }, + contentPos: function(blockView) { + // apply scale required. + var height = Math.max(blockView.contentHeight, 28); + return {x: 14, y: height / 2 + 1}; + } +}; + + +Entry.skeleton.basic_define = { + path: function(blockView) { + var width = blockView.contentWidth; + var height = blockView.contentHeight; + height = Math.max(30, height + 2); + width = Math.max(0, width + 9 - height / 2); + var statementHeight = blockView._statements[0] ? blockView._statements[0].height : 30; + statementHeight = Math.max(statementHeight, 20); + return ("m -8,0 l 16,0 h %w a %h,%h 0 0,1 0,%wh H 24 l -8,8 -8,-8 h -0.4 v %sh h 0.4 l 8,8 8,-8 h %bw a 8,8 0 0,1 0,16 H -8 z") + .replace(/%wh/gi, height) + .replace(/%w/gi, width) + .replace(/%h/gi, height / 2) + .replace(/%bw/gi, width - 8) + .replace(/%sh/gi, statementHeight + 1); + }, + magnets: function() { + return {}; + }, + box: function(blockView) { + var contentWidth = blockView.contentWidth; + var contentHeight = Math.max(blockView.contentHeight, 25); return { offsetX: 0, offsetY: 0, width: contentWidth, @@ -94,18 +155,25 @@ Entry.skeleton.basic_loop = { marginBottom: 0 }; }, + statementPos: function(blockView) { + var height = Math.max(30, blockView.contentHeight + 2); + return [{ + x: 16, y: height + }]; + }, contentPos: function() { // apply scale required. return {x: 14, y: 15}; } }; + Entry.skeleton.pebble_event = { - path: function(block) { - var width = block.contentWidth; + path: function(blockView) { + var width = blockView.contentWidth; return "m 0,0 a 25,25 0 0,1 9,48.3 a 9,9 0 0,1 -18,0 a 25,25 0 0,1 9,-48.3 z"; }, - box: function(block) { + box: function(blockView) { return { offsetX: -25, offsetY: 0, width: 50, @@ -113,10 +181,11 @@ Entry.skeleton.pebble_event = { marginBottom: 0 }; }, - magnets: function(block) { + magnets: function(blockView) { // apply scale required. + var height = blockView ? Math.max(blockView.height, 49.3) : 49.3; return { - next: {x: 0, y: 49.3} + next: {x: 0, y: height + blockView.offsetY} }; }, contentPos: function() { @@ -127,36 +196,46 @@ Entry.skeleton.pebble_event = { Entry.skeleton.pebble_loop = { fontSize: 16, - path: function(block) { + dropdownHeight: 23, + path: function(blockView) { var contentWidth = 124; - var contentHeight = Math.max(block.contentHeight, 50); + var contentHeight = Math.max(blockView.contentHeight, 50); + var statementHeight = Math.max(blockView._statements[0] ? blockView._statements[0].height : 50, 50); return ("M 0,9 a 9,9 0 0,0 9,-9 h %cw q 25,0 25,25 v %ch q 0,25 -25,25 h -%cw a 9,9 0 0,1 -18,0 " + "h -%cw q -25,0 -25,-25 v -%ch q 0,-25 25,-25 h %cw a 9,9 0 0,0 9,9 " + "M 0,49 a 9,9 0 0,1 -9,-9 h -28 a 25,25 0 0,0 -25,25 v %cih a 25,25 0 0,0 25,25 h 28 a 9,9 0 0,0 18,0 " + "h 28 a 25,25 0 0,0 25,-25 v -%cih a 25,25 0 0,0 -25,-25 h -28 a 9,9 0 0,1 -9,9 z") .replace(/%cw/gi, contentWidth/2 - 21) - .replace(/%ch/gi, contentHeight + 4) - .replace(/%cih/gi, contentHeight - 50); + .replace(/%ch/gi, statementHeight + 4) + .replace(/%cih/gi, statementHeight - 50); }, - magnets: function() { - var contentWidth = 124; - var contentHeight = 50; - // apply scale required. + magnets: function(blockView) { + var contentHeight = Math.max(blockView.contentHeight + 2, 41); + var statementHeight = blockView._statements[0] ? blockView._statements[0].height : 20; + statementHeight = Math.max(statementHeight, 51); return { previous: {x: 0, y: 0}, - next: {x: 0, y: contentHeight + 55} + next: {x: 0, y: statementHeight + contentHeight + 13 + blockView.offsetY} }; }, - box: function(block) { - var contentWidth = 124; - var contentHeight = Math.max(block.contentHeight, 50); + box: function(blockView) { + var contentWidth = blockView.contentWidth; + var contentHeight = Math.max(blockView.contentHeight + 2, 41); + var statementHeight = blockView._statements[0] ? blockView._statements[0].height : 20; + statementHeight = Math.max(statementHeight, 51); return { offsetX: -(contentWidth / 2 + 13), offsetY: 0, - width: contentWidth + 26, - height: contentHeight + 54, + width: contentWidth + 30, + height: contentHeight + statementHeight + 13, marginBottom: 0 }; }, + statementPos: function(blockView) { + var height = Math.max(39, blockView.contentHeight + 2) + 1.5; + return [ + { x: 0, y: height } + ]; + }, contentPos: function() { // apply scale required. return {x: -46, y: 25}; @@ -169,23 +248,36 @@ Entry.skeleton.pebble_basic = { "prev", "next" ], path: function(blockView) { - var block = blockView.block; - var isPrevSame = block.prev && block.prev._schema.skeleton === "pebble_basic"; - var isNextSame = block.next && block.next._schema.skeleton === "pebble_basic"; - return "m 0,9 a 9,9 0 0,0 9,-9 h 28 " + - (isPrevSame ? "l 25,0 0,25" : "q 25,0 25,25") + - (isNextSame ? "l 0,25 -25,0" : "q 0,25 -25,25") + + "q 25,0 25,25" + + "q 0,25 -25,25" + "h -28 a 9,9 0 0,1 -18,0 h -28 " + - (isNextSame ? "l -25,0 0,-25" : "q -25,0 -25,-25") + - (isPrevSame ? "l 0,-25 25,0" : "q 0,-25 25,-25") + + "q -25,0 -25,-25" + + "q 0,-25 25,-25" + "h 28 a 9,9 0 0,0 9,9 z"; }, - magnets: function() { + //path: function(blockView) { + //var block = blockView.block; + //var prev = block.getPrevBlock(); + //var next = block.getNextBlock(); + //var isPrevSame = prev && prev._schema.skeleton === "pebble_basic"; + //var isNextSame = next && next._schema.skeleton === "pebble_basic"; + + + //return "m 0,9 a 9,9 0 0,0 9,-9 h 28 " + + //(isPrevSame ? "l 25,0 0,25" : "q 25,0 25,25") + + //(isNextSame ? "l 0,25 -25,0" : "q 0,25 -25,25") + + //"h -28 a 9,9 0 0,1 -18,0 h -28 " + + //(isNextSame ? "l -25,0 0,-25" : "q -25,0 -25,-25") + + //(isPrevSame ? "l 0,-25 25,0" : "q 0,-25 25,-25") + + //"h 28 a 9,9 0 0,0 9,9 z"; + //}, + magnets: function(blockView) { // apply scale required. + var height = blockView ? Math.max(blockView.height, 51) : 51; return { previous: {x: 0, y: 0}, - next: {x: 0, y: 51} + next: {x: 0, y: height + blockView.offsetY} }; }, box: function() { @@ -201,3 +293,224 @@ Entry.skeleton.pebble_basic = { return {x: -46, y: 25}; } }; + +Entry.skeleton.basic_string_field = { + path: function(blockView) { + var width = blockView.contentWidth; + var height = blockView.contentHeight; + height = Math.max(18, height + 2); + width = Math.max(0, width - height + 12); + return "m %h,0 h %w a %h,%h 0 1,1 0,%wh H %h A %h,%h 0 1,1 %h,0 z" + .replace(/%wh/gi, height) + .replace(/%w/gi, width) + .replace(/%h/gi, height / 2); + }, + color: "#000", + outerLine: '#768dce', + box: function(blockView) { + var width = blockView ? blockView.contentWidth : 5; + var height = blockView ? blockView.contentHeight : 18; + return { + offsetX: 0, offsetY: 0, + width: width + 12, + height: Math.max(height + 2, 18), + marginBottom: 0 + }; + }, + magnets: function() { + return { + string: {} + }; + }, + contentPos: function(blockView) { + // apply scale required. + var height = Math.max(blockView.contentHeight, 16); + return {x: 6, y: height / 2 + 1}; + } +}; + +Entry.skeleton.basic_boolean_field = { + path: function(blockView) { + var width = blockView.contentWidth; + var height = blockView.contentHeight; + height = Math.max(18, height + 2); + width = Math.max(0, width - height + 19); + return "m %h,0 h %w l %h,%h -%h,%h H %h l -%h,-%h %h,-%h z" + .replace(/%wh/gi, height) + .replace(/%w/gi, width) + .replace(/%h/gi, height / 2); + }, + color: "#000", + outerLine: '#768dce', + box: function(blockView) { + var width = blockView ? blockView.contentWidth : 5; + var height = blockView ? blockView.contentHeight : 18; + return { + offsetX: 0, offsetY: 0, + width: width + 19, + height: Math.max(height + 2, 18), + marginBottom: 0 + }; + }, + magnets: function() { + return { + boolean: {} + }; + }, + contentPos: function(blockView) { + // apply scale required. + var height = Math.max(blockView.contentHeight, 16); + return {x: 10, y: height / 2 + 1}; + } +}; + +Entry.skeleton.basic_param = { + path: function(blockView) { + var width = blockView.contentWidth; + var output = blockView._contents[blockView._contents.length- 1]; + if (output) + width -= output.box.width + Entry.BlockView.PARAM_SPACE - 2; + width = Math.max(0, width); + return ("m 4,0 h 10 h %w l 2,2 0,3 3,0 1,1 0,12 -1,1 -3,0 0,3 -2,2" + + "h -%w h -10 l -2,-2 0,-3 3,0 1,-1 0,-12 -1,-1 -3,0 0,-3 2,-2") + .replace(/%w/gi, width); + }, + outerLine: '#768dce', + box: function(blockView) { + var width = blockView ? blockView.contentWidth : 5; + return { + offsetX: 0, offsetY: 0, + width: width + 11, + height: 24, + marginBottom: 0 + }; + }, + magnets: function() { + return { + param: {} + }; + }, + contentPos: function(blockView) { + // apply scale required. + return {x: 11, y: 12}; + } +}; + + +Entry.skeleton.basic_button = { + path: function() { + return "m -64,0 h 128 a 6,6 0, 0,1 6,6 v 18 a 6,6 0, 0,1 -6,6 h -128 a 6,6 0, 0,1 -6,-6 v -18 a 6,6 0, 0,1 6,-6 z"; + }, + box: function() { + return { + offsetX: -80, offsetY: 0, + width: 140, + height: 30 + }; + }, + contentPos: function() { + // apply scale required. + return {x: 0, y: 15}; + }, + movable: false, + readOnly: true, + nextShadow: true, + classes: ['basicButtonView'] +}; + +Entry.skeleton.basic_without_next = { + box: Entry.skeleton.basic.box, + contentPos: Entry.skeleton.basic.contentPos, + path: function(blockView) { + var width = blockView.contentWidth; + var height = blockView.contentHeight; + height = Math.max(30, height + 2); + width = Math.max(0, width + 9 - height / 2); + return "m -8,0 l 8,8 8,-8 h %w a %h,%h 0 0,1 0, %wh H -8 z" + .replace(/%wh/gi, height) + .replace(/%w/gi, width) + .replace(/%h/gi, height / 2); + }, + magnets: function(blockView) { + // apply scale required. + var height = blockView ? Math.max(blockView.height, 30) : 30; + return { + previous: {x: 0, y: 0} + }; + } +}; + +Entry.skeleton.basic_double_loop = { + path: function(blockView) { + var width = blockView.contentWidth; + var height1 = blockView.contentHeight%1000; + var height2 = Math.floor(blockView.contentHeight/1000); + height1 = Math.max(30, height1 + 2); + height2 = Math.max(30, height2 + 2); + width = Math.max(0, width + 5 - height1 / 2); + var statements = blockView._statements; + var statementHeight1 = statements[0] ? statements[0].height : 20; + var statementHeight2 = statements[1] ? statements[1].height : 20; + + statementHeight1 = Math.max(statementHeight1, 20); + statementHeight2 = Math.max(statementHeight2, 20); + + return ("m -8,0 l 8,8 8,-8 h %w a %h1,%h1 0 0,1 0,%wh1 H 24 l -8,8 -8,-8 h -0.4 v %sh1 h 0.4 l 8,8 8,-8 h %bw a %h2,%h2 0 0,1 0,%wh2 H 24 l -8,8 -8,-8 h -0.4 v %sh2 h 0.4 l 8,8 8,-8 h %bw a 8,8 0 0,1 0,16 H 8 l -8,8 -8,-8 z") + .replace(/%wh1/gi, height1) + .replace(/%wh2/gi, height2) + .replace(/%w/gi, width) + .replace(/%bw/gi, width - 8) + .replace(/%h1/gi, height1 / 2) + .replace(/%h2/gi, height2 / 2) + .replace(/%sh1/gi, statementHeight1 + 1) + .replace(/%sh2/gi, statementHeight2 + 1); + }, + magnets: function(blockView) { + var contentHeight1 = Math.max(blockView.contentHeight%1000 + 2, 30); + var contentHeight2 = Math.max(Math.floor(blockView.contentHeight/1000) + 2, 30); + var statementHeight1 = blockView._statements[0] ? blockView._statements[0].height : 20; + var statementHeight2 = blockView._statements[1] ? blockView._statements[1].height : 20; + statementHeight1 = Math.max(statementHeight1, 20); + statementHeight2 = Math.max(statementHeight2, 20); + return { + previous: {x: 0, y: 0}, + next: { + x: 0, + y: statementHeight1 + statementHeight2 + + contentHeight1 + contentHeight2 + 19 + blockView.offsetY + } + }; + }, + box: function(blockView) { + var contentWidth = blockView.contentWidth; + var contentHeight1 = Math.max(Math.floor(blockView.contentHeight/1000) + 2, 30); + var contentHeight2 = Math.max(blockView.contentHeight%1000 + 2, 30); + var statementHeight1 = blockView._statements[0] ? blockView._statements[0].height%1000 : 20; + var statementHeight2 = blockView._statements[1] ? blockView._statements[1].height : 20; + statementHeight2 = Math.floor(statementHeight2/1000); + statementHeight1 = Math.max(statementHeight1, 20); + statementHeight2 = Math.max(statementHeight2, 20); + return { + offsetX: -8, offsetY: 0, + width: contentWidth + 30, + height: contentHeight1 + contentHeight2 + statementHeight1 + statementHeight2 + 17, + marginBottom: 0 + }; + }, + statementPos: function(blockView) { + var statementHeight1 = blockView._statements[0] ? blockView._statements[0].height%1000 : 20; + var height1 = Math.max(30, blockView.contentHeight%1000 + 2) + 1; + var height2 = height1 + Math.max(statementHeight1, 20) + + Math.max(Math.floor(blockView.contentHeight/1000) +2 ,30) +1; + + return [ + {x: 16, y: height1}, + {x: 16, y: height2} + ]; + }, + contentPos: function(blockView) { + // apply scale required. + var height = Math.max(blockView.contentHeight%1000, 28); + return {x: 14, y: height / 2 + 1}; + } +}; diff --git a/src/workspace/thread.js b/src/workspace/thread.js index d15d8777bc..3751da89f9 100644 --- a/src/workspace/thread.js +++ b/src/workspace/thread.js @@ -7,23 +7,23 @@ goog.provide("Entry.Thread"); goog.require('Entry.Model'); goog.require("Entry.Collection"); -goog.require("Entry.DummyBlock"); /* * */ -Entry.Thread = function(thread, code) { +Entry.Thread = function(thread, code, parent) { this._data = new Entry.Collection(); this._code = code; - this.changeEvent = new Entry.Event(this); - this.changeEvent.attach(this, this.inspectExist); + this.changeEvent.attach(this, this.handleChange); + this._event = null; + this.parent = parent ? parent : code; this.load(thread); }; (function(p) { - p.load = function(thread) { + p.load = function(thread, mode) { if (thread === undefined) thread = []; if (!(thread instanceof Array)) { @@ -32,55 +32,38 @@ Entry.Thread = function(thread, code) { for (var i = 0; i < thread.length; i++) { var block = thread[i]; - if (block instanceof Entry.Block || - block instanceof Entry.DummyBlock) { + if (block instanceof Entry.Block || block.isDummy) { block.setThread(this); this._data.push(block); - } else { - this._data.push(new Entry.Block(block, this)); - } + } else this._data.push(new Entry.Block(block, this)); } - this._setRelation(); var codeView = this._code.view; - if (codeView) this.createView(codeView.board); - }; - - p._setRelation = function() { - var blocks = this._data.getAll(); - if (blocks.length === 0) return; - - var prevBlock = blocks[0]; - prevBlock.setPrev(null); - blocks[blocks.length - 1].setNext(null); - for (var i = 1; i < blocks.length; i++) { - var block = blocks[i]; - block.setPrev(prevBlock); - prevBlock.setNext(block); - prevBlock = block; - } + if (codeView) this.createView(codeView.board, mode); }; p.registerEvent = function(block, eventType) { + this._event = eventType; this._code.registerEvent(block, eventType); }; - p.createView = function(board) { + p.unregisterEvent = function(block, eventType) { + this._code.unregisterEvent(block, eventType); + }; + + p.createView = function(board, mode) { if (!this.view) this.view = new Entry.ThreadView(this, board); + var prevBlock = null; this._data.map(function(b) { - b.createView(board); + b.createView(board, mode); }); }; - p.separate = function(block) { - if (!this._data.has(block.id)) - return; - if (block.prev) { - block.prev.setNext(null); - block.setPrev(null); - } - var blocks = this._data.splice(this._data.indexOf(block)); + p.separate = function(block, count) { + if (!this._data.has(block.id)) return; + + var blocks = this._data.splice(this._data.indexOf(block), count); this._code.createThread(blocks); this.changeEvent.notify(); }; @@ -88,44 +71,41 @@ Entry.Thread = function(thread, code) { p.cut = function(block) { var index = this._data.indexOf(block); var splicedData = this._data.splice(index); - if (this._data[index - 1]) - this._data[index - 1].setNext(null); this.changeEvent.notify(); return splicedData; }; - p.insertDummyBlock = function(dummyBlock) { - this._data.unshift(dummyBlock); - if (this._data[1]) { - this._data[1].setPrev(dummyBlock); - dummyBlock.setNext(this._data[1]); - } - }; - p.insertByBlock = function(block, newBlocks) { - var index = this._data.indexOf(block); - block.setNext(newBlocks[0]); - newBlocks[0].setPrev(block); - for (var i in newBlocks) { + var index = block ? this._data.indexOf(block) : -1; + for (var i = 0; i < newBlocks.length; i++) { newBlocks[i].setThread(this); } this._data.splice.apply( this._data, [index + 1, 0].concat(newBlocks) ); - this._setRelation(); this.changeEvent.notify(); }; - p.clone = function(code) { + p.insertToTop = function(newBlock) { + newBlock.setThread(this); + this._data.unshift.apply( + this._data, + [newBlock] + ); + this.changeEvent.notify(); + }; + + p.clone = function(code, mode) { var code = code || this._code; var newThread = new Entry.Thread([], code); var data = this._data; var cloned = []; for (var i=0, len=data.length; i=0; i--) + blocks[i].destroy(animate); }; - p.getFirstBlock = function() { - return this._data[0]; + p.getBlock = function(index) { + return this._data[index]; }; p.getBlocks = function() { - return this._data; + return this._data.map(function(b){return b;}); }; p.countBlock = function() { @@ -160,20 +145,20 @@ Entry.Thread = function(thread, code) { if (!block.type) continue; count++; - var schema = Entry.block[block.type]; - var contents = schema.contents; - for (var j = 0; j < contents.length; j++) { - var content = contents[j]; - if (content.type == "Statement") { - count += block.values[content.key].countBlock(); + + var statements = block.statements; + if (statements) { + for (var j = 0; j < statements.length; j++) { + var statement = statements[j]; + count += statement.countBlock(); } } } return count; }; - p.inspectExist = function() { - //if (this._data.length === 0) this.destroy(); + p.handleChange = function() { + if (this._data.length === 0) this.destroy(); }; p.getCode = function() { @@ -185,22 +170,98 @@ Entry.Thread = function(thread, code) { }; p.spliceBlock = function(block) { - var blocks = this.getBlocks(); + var blocks = this._data; blocks.remove(block); - if (blocks.length !== 0) { - if (block.prev === null) - block.next.setPrev(null); - else if (block.next === null) - block.prev.setNext(null); - else { - block.prev.setNext(block.next); - block.next.setPrev(block.prev); - } - this._setRelation(); - } else this.destroy(); + if (blocks.length === 0) { + var parent = this.view.getParent(); + if (parent.constructor !== Entry.FieldStatement) + this.destroy(); + } this.changeEvent.notify(); }; + p.getFirstBlock = function() { + return this._data[0]; + }; + + p.getPrevBlock = function(block) { + var index = this._data.indexOf(block); + return this._data.at(index - 1); + }; + + p.getNextBlock = function(block) { + var index = this._data.indexOf(block); + return this._data.at(index + 1); + }; + + p.getLastBlock = function() { + return this._data.at(this._data.length - 1); + }; + + p.getRootBlock = function() { + return this._data.at(0); + }; + + p.hasBlockType = function(type) { + for (var i = 0; i < this._data.length; i++) + if (inspectBlock(this._data[i])) return true; + return false; + + function inspectBlock(block) { + if (type == block.type) return true; + + var params = block.params; + for (var k = 0; k < params.length; k++) { + var param = params[k]; + if (param && param.constructor == Entry.Block) { + if (inspectBlock(param)) return true; + } + } + var statements = block.statements; + if (statements) { + for (var j = 0; j < statements.length; j++) { + if (statements[j].hasBlockType(type)) + return true; + } + } + return false; + } + }; + + p.getCount = function(startBlock) { + var result = this._data.length; + if (startBlock) + result -= this._data.indexOf(startBlock); + return result + }; + + p.indexOf = function(block) { + return this._data.indexOf(block); + }; + + p.pointer = function(pointer, block) { + var index = this.indexOf(block); + pointer.unshift(index); + if (this.parent instanceof Entry.Block) + pointer.unshift(this.parent.indexOfStatements(this)); + if (this._code === this.parent) { + pointer.unshift(this._code.indexOf(this)); + var topBlock = this._data[0]; + pointer.unshift(topBlock.y); + pointer.unshift(topBlock.x); + return pointer; + } + return this.parent.pointer(pointer); + }; + + p.getBlockList = function(excludePrimitive) { + var blocks = []; + for (var i = 0; i < this._data.length; i++) + blocks = blocks.concat(this._data[i].getBlockList(excludePrimitive)); + + return blocks; + }; + })(Entry.Thread.prototype); diff --git a/src/workspace/thread_view.js b/src/workspace/thread_view.js index f9fa2551b9..e37f5c74b8 100644 --- a/src/workspace/thread_view.js +++ b/src/workspace/thread_view.js @@ -13,17 +13,92 @@ Entry.ThreadView = function(thread, board) { this.thread = thread; - this.svgGroup = board.svgThreadGroup.group(); + this.svgGroup = board.svgThreadGroup.elem("g"); + + this.parent = board; // statement }; (function(p) { p.schema = { - scrollX: 0, - scrollY: 0 + height: 0, + zIndex: 0 }; p.destroy = function() { this.svgGroup.remove(); }; + p.setParent = function(parent) { + this.parent = parent; + }; + + p.getParent = function() { + return this.parent; + }; + + p.renderText = function() { + var blocks = this.thread.getBlocks(); + for (var i=0; i=0; i--) + blocks[i].view.reDraw(); + }; + + p.setZIndex = function(zIndex) { + this.set({zIndex: zIndex}); + } + })(Entry.ThreadView.prototype); diff --git a/src/workspace/trashcan.js b/src/workspace/trashcan.js index fb5e58a953..9b074e29c0 100644 --- a/src/workspace/trashcan.js +++ b/src/workspace/trashcan.js @@ -3,45 +3,68 @@ goog.provide("Entry.FieldTrashcan"); Entry.FieldTrashcan = function(board) { - this.board = board; - this.svgGroup = board.snap.group(); + if (board) this.setBoard(board); - this.renderStart(); this.dragBlock = null; this.dragBlockObserver = null; this.isOver = false; - board.observe(this, "updateDragBlock", ["dragBlock"]); - - this.setPosition(); - if (Entry.windowResized) Entry.windowResized.attach(this, this.setPosition); }; (function(p) { + p._generateView = function() { + this.svgGroup = this.board.svg.elem("g"); + this.renderStart(); + this._addControl(); + }; + p.renderStart = function() { var path = Entry.mediaFilePath + 'delete_'; - this.trashcanTop = this.svgGroup.image ( - path + 'cover.png', 0, 0, 60, 20); + this.trashcanTop = this.svgGroup.elem("image", { + href: path + 'cover.png', + width: 60, + height: 20 + }); - this.trashcan = this.svgGroup.image ( - path + 'body.png', 0, 20, 60, 60); + this.svgGroup.elem("image", { + href: path + 'body.png', + y: 20, + width: 60, + height: 60 + }); + }; + + p._addControl = function() { + var that = this; + $(this.svgGroup).bind( 'mousedown', function(e) { + if (Entry.Utils.isRightButton(e)) { + e.stopPropagation(); + $('#entryWorkspaceBoard').css('background', 'white'); + } + }); - var filter = this.svgGroup.filter(Snap.filter.shadow(1,1,2)); - this.svgGroup.attr({filter: filter}); }; p.updateDragBlock = function() { var block = this.board.dragBlock; var observer = this.dragBlockObserver; + + if (observer) { + observer.destroy(); + this.dragBlockObserver = null; + } + if (block) { - observer = block.observe(this, "checkBlock", ["x", "y"]); + this.dragBlockObserver = block.observe(this, "checkBlock", ["x", "y"]); } else { - if (observer) observer.destroy(); if (this.isOver && this.dragBlock) { - this.dragBlock.block.doDestroy(true); - createjs.Sound.play('entryDelete'); + var prevBlock = this.dragBlock.block.getPrevBlock(); + if (!prevBlock) { + this.dragBlock.block.doDestroyBelow(true); + createjs.Sound.play('entryDelete'); + } } this.tAnimation(false); } @@ -52,7 +75,7 @@ Entry.FieldTrashcan = function(board) { var dragBlock = this.dragBlock; if (!dragBlock || !dragBlock.block.isDeletable()) return; - var boardOffset = this.board.offset; + var boardOffset = this.board.offset(); var position = this.getPosition(); var trashcanX = position.x + boardOffset.left; var trashcanY = position.y + boardOffset.top; @@ -70,7 +93,7 @@ Entry.FieldTrashcan = function(board) { p.align = function() { var position = this.getPosition(); - var transform = "t" + position.x + " " + position.y; + var transform = "translate(" + position.x + "," + position.y + ")"; this.svgGroup.attr({ transform: transform @@ -78,6 +101,7 @@ Entry.FieldTrashcan = function(board) { }; p.setPosition = function() { + if (!this.board) return; var svgDom = this.board.svgDom; this._x = svgDom.width()-110; this._y = svgDom.height()-110; @@ -95,16 +119,45 @@ Entry.FieldTrashcan = function(board) { if (isOver === this.isOver) return; isOver = isOver === undefined ? true : isOver; + var animation; var trashTop = this.trashcanTop; - if(isOver) { - trashTop.animate({ - transform: "t5 -20 r30"}, 50); - } else { - trashTop.animate({ - transform: "r0"}, 50); - } + if(isOver) + animation = { + translateX:15, + translateY:-25, + rotateZ:30 + }; + else + animation = { + translateX:0, + translateY:0, + rotateZ: 0 + }; + + $(trashTop).velocity( + animation, {duration:50} + ); this.isOver = isOver; }; + + p.setBoard = function(board) { + if (this._dragBlockObserver) this._dragBlockObserver.destroy(); + this.board = board; + if (!this.svgGroup) this._generateView(); + + //control z-index + var svg = board.svg; + var firstChild = svg.firstChild; + if (firstChild) svg.insertBefore(this.svgGroup, firstChild); + else svg.appendChild(this.svgGroup); + + this._dragBlockObserver = board.observe(this, "updateDragBlock", ["dragBlock"]); + this.svgGroup.attr({ + 'filter': 'url(#entryTrashcanFilter_'+ board.suffix +')' + }); + this.setPosition(); + }; + })(Entry.FieldTrashcan.prototype); diff --git a/src/workspace/vim.js b/src/workspace/vim.js new file mode 100644 index 0000000000..a3fe20d875 --- /dev/null +++ b/src/workspace/vim.js @@ -0,0 +1,114 @@ +'use strict'; + +goog.provide("Entry.Vim"); + +Entry.Vim = function(dom) { + if (typeof dom === "string") + dom = $('#' + dom); + else + dom = $(dom); + + if (dom.prop("tagName") !== "DIV") + return console.error("Dom is not div element"); + + this.createDom(dom); + + this._parser = new Entry.Parser("maze", "js", this.codeMirror); + this._blockParser = new Entry.Parser("maze", "block"); + + Entry.Model(this, false); + window.eventset = []; +}; + +(function(p) { + p.createDom = function (dom) { + var parent, _self, target; + parent = dom; + this.view = Entry.Dom('div', { + parent:parent, + class: 'entryVimBoard' + }); + + this.codeMirror = CodeMirror(this.view[0], { + lineNumbers: true, + value: "", + mode: {name:"javascript", globalVars: true}, + theme: "default", + indentUnit: 4, + styleActiveLine: true, + extraKeys: { + "Ctrl-Space": "javascriptComplete", + "Tab": function(cm) { + var spaces = Array(cm.getOption("indentUnit") + 1).join(" "); + cm.replaceSelection(spaces); + } + }, + // gutters: ["CodeMirror-lint-markers"], + lint: true, + viewportMargin: 10 + }); + + this.doc = this.codeMirror.getDoc(); + + _self = this; + target = this.view[0]; + function eventDragEnd(e) { + var textCode = _self.getCodeToText(e.block); + _self.codeMirror.display.dragFunctions.leave(e); + var mousedown = Entry.Utils.createMouseEvent('mousedown', e); + _self.codeMirror.display.scroller.dispatchEvent(mousedown); + var testArr = textCode.split('\n'); + var max = testArr.length - 1; + var lastLine = 0; + testArr.forEach(function (text, i) { + _self.codeMirror.replaceSelection(text); + var cursor = _self.doc.getCursor(); + lastLine = cursor.line; + _self.codeMirror.indentLine(lastLine); + if(i === 0 || max !== i) { + _self.codeMirror.replaceSelection('\n'); + } + }); + var mouseup = Entry.Utils.createMouseEvent('mouseup', e); + _self.codeMirror.display.scroller.dispatchEvent(mouseup); + } + + function eventDragOver(e) { + _self.codeMirror.display.dragFunctions.over(e); + } + + target.removeEventListener("dragEnd", eventDragEnd); + target.removeEventListener("dragOver", eventDragOver); + target.addEventListener('dragEnd', eventDragEnd); + target.addEventListener('dragOver', eventDragOver); + }; + + p.hide = function() { + this.view.addClass('entryRemove'); + }; + + p.show = function() { + this.view.removeClass('entryRemove'); + }; + + p.textToCode = function() { + var textCode = this.codeMirror.getValue(); + var code = this._parser.parse(textCode); + if(code.length === 0) { + throw ('블록 파싱 오류'); + } + return code; + }; + + p.codeToText = function(code) { + var textCode = this._blockParser.parse(code); + this.codeMirror.setValue(textCode); + // this.codeMirror.getDoc().markText({line:0, ch:0}, {line: 1, ch: 100}, {readOnly: true}); + }; + + p.getCodeToText = function(code) { + var textCode = this._blockParser.parse(code); + return textCode; + }; + +})(Entry.Vim.prototype); diff --git a/src/workspace/workspace.js b/src/workspace/workspace.js index b7dcb2a1c9..2644ba2a5a 100644 --- a/src/workspace/workspace.js +++ b/src/workspace/workspace.js @@ -4,178 +4,212 @@ "use strict"; goog.provide("Entry.Workspace"); + goog.require("Entry.Model"); +goog.require("Entry.FieldTrashcan"); -Entry.Workspace = function(blockMenu, board) { +Entry.Workspace = function(options) { Entry.Model(this, false); - - blockMenu.workspace = this; - board.workspace = this; - - this._blockMenu = blockMenu; - this._board = board; - - - this.svgGroup = blockMenu.snap.group(); - - - this._stopEvent = new Entry.Event(this); + this.observe(this, "_handleChangeBoard", ["selectedBoard"], false); + this.trashcan = new Entry.FieldTrashcan(); + var that = this; + + var option = options.blockMenu; + if (option) { + this.blockMenu = new Entry.BlockMenu( + option.dom, + option.align, + option.categoryData, + option.scroll + ); + this.blockMenu.workspace = this; + this.blockMenu.observe(this, "_setSelectedBlockView", ["selectedBlockView"], false); + } + + option = options.board; + if (option) { + option.workspace = this; + this.board = new Entry.Board(option); + this.board.observe(this, "_setSelectedBlockView", ["selectedBlockView"], false); + this.set({selectedBoard:this.board}); + } + + option = options.vimBoard; + if (option) { + this.vimBoard = new Entry.Vim(option.dom); + this.vimBoard.workspace = this; + } + + if (this.board && this.vimBoard) + this.vimBoard.hide(); + + Entry.GlobalSvg.createDom(); + + this.mode = Entry.Workspace.MODE_BOARD; + + if (Entry.keyPressed) + Entry.keyPressed.attach(this, this._keyboardControl); + + // view state change event + this.changeEvent = new Entry.Event(this); + + Entry.commander.setCurrentEditor("board", this.board); }; +Entry.Workspace.MODE_BOARD = 0; +Entry.Workspace.MODE_VIMBOARD = 1; +Entry.Workspace.MODE_OVERLAYBOARD = 2; + (function(p) { + p.schema = { + selectedBlockView: null, + selectedBoard: null + }; - p.getBoard = function(){return this._board;}; - p.getBlockMenu = function(){return this._blockMenu;}; - - p.playAddBlock = function(help) { - var self = this; - var targetBlock; - if (help.cloneId) { - targetBlock = this._blockMenu.findById(help.cloneId); - if (!targetBlock) - targetBlock = this._board.findById(help.cloneId); - } else { - targetBlock = this._blockMenu.findById(help.target); + p.getBoard = function(){return this.board;}; + + p.getSelectedBoard = function(){return this.selectedBoard;}; + + p.getBlockMenu = function(){return this.blockMenu;}; + + p.getVimBoard = function(){return this.vimBoard;}; + + p.getMode = function() {return this.mode;}; + + p.setMode = function(mode, message){ + mode = Number(mode); + var oldMode = this.mode; + this.mode = mode; + switch (mode) { + case oldMode: + return; + case Entry.Workspace.MODE_VIMBOARD: + if (this.board) this.board.hide(); + if (this.overlayBoard) this.overlayBoard.hide(); + this.set({selectedBoard:this.vimBoard}); + this.vimBoard.show(); + this.vimBoard.codeToText(this.board.code); + this.blockMenu.renderText(); + this.board.clear(); + break; + case Entry.Workspace.MODE_BOARD: + try { + this.board.show(); + this.set({selectedBoard:this.board}); + this.textToCode(oldMode); + if (this.vimBoard) this.vimBoard.hide(); + if (this.overlayBoard) this.overlayBoard.hide(); + this.blockMenu.renderBlock(); + } catch(e) { + if (this.board) this.board.hide(); + this.set({selectedBoard:this.vimBoard}); + Entry.dispatchEvent('setProgrammingMode', Entry.Workspace.MODE_VIMBOARD); + throw e; + } + Entry.commander.setCurrentEditor("board", this.board); + break; + case Entry.Workspace.MODE_OVERLAYBOARD: + if (!this.overlayBoard) + this.initOverlayBoard(); + this.overlayBoard.show(); + this.set({selectedBoard:this.overlayBoard}); + Entry.commander.setCurrentEditor("board", this.overlayBoard); + break; } + this.changeEvent.notify(message); + }; - if (!targetBlock) - return; - - if (help.dest.id) { // find x,y by id - var destBlock = this._board.findById(help.dest.id); - help.dest.x = this.getBlockMenu()._svgWidth + destBlock.view.x; - help.dest.y = destBlock.view.y + destBlock.view.height; - } //else x,y was already known - - var blockView = targetBlock.view; - var board = blockView.getBoard(); - - // mousedown - board.set({dragBlock:blockView}); - var cloneId = board.cloneThread(); - help.cloneId = cloneId; - //var cloneId = clonedThread.getFirstBlock().id; - //console.log('cloneId=',cloneId); - //help.cloneId = cloneId; - var observer = blockView.moveBoardBlockObserver; - if (observer) observer.destroy(); - - var distanceX = help.dest.x; - var distanceY = help.dest.y; - - blockView._moveTo(distanceX, - distanceY, - true, - help.duration - 300); - - var boardOffset = this.getBoard().offset; - var blockMenuOffset = this.getBlockMenu().offset; - - var offsetX = boardOffset.left - blockMenuOffset.left, - offsetY = boardOffset.top - blockMenuOffset.top; - - this.getBoard().dragBlock._moveTo( - distanceX-offsetX, - distanceY-offsetY, - true, - help.duration - 300); - - setTimeout(function() { - blockView._align(true); - - var magnetedBlock = blockView._getCloseBlock(); - if (magnetedBlock) { - board.setMagnetedBlock(magnetedBlock.view); - } else { - board.setMagnetedBlock(null); - } - - blockView.terminateDrag(); - if (board) board.set({dragBoard: null}); - - self._stopEvent.notify(help); + p.changeBoardCode = function(code) { + this.board.changeCode(code); + }; - }, help.duration - 300); + p.changeOverlayBoardCode = function(code) { + if (this.overlayBoard) + this.overlayBoard.changeCode(code); }; - p.playMoveBlock = function(help) { - var self = this; - var targetBlock; - console.log('cloneId=',help.cloneId); - if (help.cloneId) { - targetBlock = this._board.findById(help.cloneId); - } else { - targetBlock = this._board.findById(help.target); - } + p.changeBlockMenuCode = function(code) { + this.blockMenu.changeCode(code); + }; - if (help.dest.id) { // find x,y by id - var destBlock = this._board.findById(help.dest.id); - help.dest.x = this.getBlockMenu()._svgWidth + destBlock.view.x; - help.dest.y = destBlock.view.y + destBlock.view.height; - } //else x,y was already known - - var blockView = targetBlock.view; - var board = blockView.getBoard(); - - // mousedown - board.set({dragBlock:blockView}); - //board.cloneThread(); - var observer = blockView.moveBoardBlockObserver; - if (observer) observer.destroy(); - - var distanceX = help.dest.x; - var distanceY = help.dest.y; - - blockView._moveTo(distanceX, - distanceY, - true, - help.duration - 300); - - var boardOffset = this.getBoard().offset; - var blockMenuOffset = this.getBlockMenu().offset; - - var offsetX = boardOffset.left - blockMenuOffset.left, - offsetY = boardOffset.top - blockMenuOffset.top; - - blockView._moveTo( - distanceX-offsetX, - distanceY-offsetY, - true, - help.duration - 300); - - setTimeout(function() { - blockView._align(true); - - var magnetedBlock = blockView._getCloseBlock(); - if (magnetedBlock) { - board.setMagnetedBlock(magnetedBlock.view); - } else { - board.setMagnetedBlock(null); - } + p.textToCode = function(mode) { + if (mode != Entry.Workspace.MODE_VIMBOARD) return; + var changedCode = this.vimBoard.textToCode(); + var board = this.board; + var code = board.code; - blockView.terminateDrag(); - if (board) board.set({dragBoard: null}); + code.load(changedCode); + code.createView(board); + board.reDraw(); - self._stopEvent.notify(help); + this.board.alignThreads(); + }; - }, help.duration - 300); + p.codeToText = function(code) { + return this.vimBoard.codeToText(code); + }; + p.getCodeToText = function(code) { + return this.vimBoard.getCodeToText(code); }; - p.moveMouse = function(startpos, endPos) { + p._setSelectedBlockView = function() { + var view = 'selectedBlockView'; + var blockView = this.board[view] || + this.blockMenu[view] || + (this.overlayBoard ? this.overlayBoard[view] : null); + this.set({selectedBlockView:blockView}); + }; + p.initOverlayBoard = function() { + this.overlayBoard = new Entry.Board({ + dom: this.board.view, + workspace: this, + isOverlay: true + }); + this.overlayBoard.changeCode(new Entry.Code([])); + this.overlayBoard.workspace = this; + this.overlayBoard.observe(this, "_setSelectedBlockView", ["selectedBlockView"], false); }; - p.generateImage = function(imagePath) { - var block = this.getBoard(); - var dom = block.svgDom[0]; - var PosX = dom.clientWidth / 2; - var PosY = dom.clientHeight / 2; + p._keyboardControl = function(e) { + var keyCode = e.keyCode || e.which, + ctrlKey = e.ctrlKey; + + if (Entry.Utils.isInInput(e)) return; + + var blockView = this.selectedBlockView; + + if (blockView && !blockView.isInBlockMenu && blockView.block.isDeletable()) { + if (keyCode == 8 || keyCode == 46) { //destroy + Entry.do("destroyBlock", blockView.block); + e.preventDefault(); + } else if (ctrlKey) { + if (keyCode == 67) //copy + blockView.block.copyToClipboard(); + else if (keyCode == 88) { //cut + (function(block) { + block.copyToClipboard(); + block.destroy(true, true); + blockView.getBoard().setSelectedBlock(null); + })(blockView.block); + } + } + } + + if (ctrlKey && keyCode == 86) { //paste + var board = this.selectedBoard; + if (board && board instanceof Entry.Board && Entry.clipboard) + Entry.do('addThread', Entry.clipboard).value + .getFirstBlock().copyToClipboard(); + } + }; - this.svgGroup = this._board.snap.group(); - this.image = this.svgGroup.image ( - imagePath , PosX, PosY, 30, 30 - ); + p._handleChangeBoard = function() { + var board = this.selectedBoard; + if (!board) return; + if (board.constructor === Entry.Board) + this.trashcan.setBoard(board); }; })(Entry.Workspace.prototype);