лабораторная работа 1 Исправленная

  • View
    140

  • Download
    8

Embed Size (px)

Text of лабораторная работа 1 Исправленная

  • 1. 1 BLOCKLY -10 . .

2. SVG 3. Layer 1xyzO(0,0,0) 4. SVG 5. BLOCKLY 6. 7. Blockly.Language.webgl_a25_1html = { category: 'WebGL', helpUrl:"../../media/webgl_a25_header.help.html", init: function() { this.setColour(290); this.appendStatementInput("NAME") // .appendTitle(new Blockly.FieldImage("../../media/1.svg", 64, 64)) .appendTitle("HTML"); this.setNextStatement(true); this.setTooltip(''); } }; Blockly.JavaScript.webgl_a25_1html = function() { var statements_name = Blockly.JavaScript.statementToCode(this, 'NAME'); // TODO: Assemble JavaScript into code variable. var code = 'nn' + statements_name.toString() + 'n' return code; }; 8. Blockly.Language.webgl_a25_2html = { category: 'WebGL', helpUrl:"../../media/title.html", init: function() { this.setColour(230); this.appendDummyInput() .appendTitle("Title") .appendTitle(new Blockly.FieldTextInput(" 1"), "NAME"); this.setPreviousStatement(true); this.setNextStatement(true); this.setTooltip(''); } }; Blockly.JavaScript.webgl_a25_2html = function() { var text_name = this.getTitleValue('NAME'); var code = text_name.toString(); return code; }; 9. Blockly.Language.webgl_a25_3html = { category: 'WebGL', helpUrl: "../../media/Body.html", init: function() { this.setColour(120); this.appendStatementInput("NAME") .appendTitle("Body"); this.setPreviousStatement(true); this.setNextStatement(true); this.setTooltip(''); } }; Blockly.JavaScript.webgl_a25_3html = function() { var statements_name = Blockly.JavaScript.statementToCode(this, 'NAME'); var code = 'nn' + statements_name.toString() + 'n' return code; }; 10. Blockly.Language.canvas_a25_lists_3d_points = { category: 'Canvas',helpUrl: "../../media/lists.html", init: function() { this.setColour(350); this.appendDummyInput() .appendTitle(new Blockly.FieldImage("../../media/1.svg", 64, 64)) .appendTitle("lists_3D_points"); this.appendValueInput("x") .setCheck(Number) .setAlign(Blockly.ALIGN_RIGHT) .appendTitle("X1 Y1 Z1"); this.appendValueInput("x1") .setCheck(Number) .setAlign(Blockly.ALIGN_RIGHT) .appendTitle("X2 Y2 Z2"); this.appendValueInput("x2") .setCheck(Number) .setAlign(Blockly.ALIGN_RIGHT) .appendTitle("X3 Y3 Z3"); this.appendValueInput("x3") .setCheck(Number) .setAlign(Blockly.ALIGN_RIGHT) .appendTitle("X4 Y4 Z4"); this.setPreviousStatement(true); this.setNextStatement(true); this.setTooltip(''); }};Blockly.JavaScript.canvas_a25_lists_3d_points = function() { var value_x = Blockly.JavaScript.valueToCode(this, 'x', Blockly.JavaScript.ORDER_ATOMIC); var value_x1 = Blockly.JavaScript.valueToCode(this, 'x1', Blockly.JavaScript.ORDER_ATOMIC); var value_x2 = Blockly.JavaScript.valueToCode(this, 'x2', Blockly.JavaScript.ORDER_ATOMIC); var value_x3 = Blockly.JavaScript.valueToCode(this, 'x3', Blockly.JavaScript.ORDER_ATOMIC); // TODO: Assemble JavaScript into code variable. var code= ' {'+value_x+','; code += ' '+value_x1+','; code += ' '+value_x2+','; code += ' '+value_x3+' '; code += '}'; return code; }; 11. Blockly.Language.webgl_a25_6html = { category: 'WebGL', helpUrl:"../../media/Footer.html", init: function() { this.setColour(290); this.appendDummyInput() .appendTitle("Footer"); this.setPreviousStatement(true); this.setTooltip(''); }}; Blockly.JavaScript.webgl_a25_6html = function() { var code = 'n' return code; }; 12. HTML 13. TITLE 14. BODY 15. LISTS_3D_POINTS 16. 17. FOOTER 18.