ݺߣ

ݺߣShare a Scribd company logo
ЛАБОРАТОРНАЯ
РАБОТА 1
«ФАБРИКА BLOCKLY»
ВЫПОЛНИЛ СТУДЕНТ ГРУППЫ ПОС-10А
ШЕПЛЯКОВ Д. В.
Работа с
файлами
SVG
ИСХОДНЫЙ КОД ИЗОБРАЖЕНИЯ
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg"><!-- Created with SVG-edit - http://svg-
edit.googlecode.com/ --> <g><title>Layer 1</title><line fill="none" stroke="#000000" stroke-width="1" stroke-
dasharray="null" stroke-linejoin="null" stroke-linecap="null" x1="25.25" y1="3.25" x2="25.25" y2="25.75" id="svg_4"/>
<line fill="none" stroke="#000000" stroke-width="1" stroke-dasharray="null" stroke-linejoin="null" stroke-
linecap="null" x1="29.5" y1="34" x2="29.5" y2="34.25" id="svg_5"/><line fill="none" stroke="#000000" stroke-
width="1" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" x1="25.25" y1="25.75" x2="58.75"
y2="25.75" id="svg_6"/><line fill="none" stroke="#000000" stroke-width="1" stroke-dasharray="null" stroke-
linejoin="null" stroke-linecap="null" x1="25.5" y1="25.75" x2="6" y2="48.25" id="svg_7"/> <text fill="#000000"
stroke="#000000" stroke-width="0" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" x="60.75"
y="27.75" id="svg_10" font-size="7.024" font-family="serif" text-anchor="middle" xml:space="preserve">x</text><text
fill="#000000" stroke="#000000" stroke-width="0" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null"
x="21.75" y="5.875" font-size="7.024" font-family="serif" text-anchor="middle" xml:space="preserve"
id="svg_11">y</text><text fill="#000000" stroke="#000000" stroke-width="0" stroke-dasharray="null" stroke-
linejoin="null" stroke-linecap="null" x="4.25" y="51.875" font-size="7.024" font-family="serif" text-anchor="middle"
xml:space="preserve" id="svg_12">z</text><text fill="#000000" stroke="#000000" stroke-width="0" stroke-
dasharray="null" stroke-linejoin="null" stroke-linecap="null" x="18.25" y="26.75" id="svg_13" font-size="4.024" font-
family="serif" text-anchor="middle" xml:space="preserve">O(0,0,0)</text></g></svg>
МАСШТАБИРОВАНИЕ SVG ФАЙЛА
ПРЕДСТАВЛЕНИЕ BLOCKLY СГЕНЕРИРОВАННЫЙ КОД
РЕЗУЛЬТАТ
ЗАГОЛОВОК
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("HEADER");
this.setNextStatement(true);
this.setTooltip('');
}
};
Blockly.JavaScript.webgl_a25_1html = function() {
var statements_name = Blockly.JavaScript.statementToCode(this, 'NAME');var code =
'&lt;html&gt;n&lt;head&gt;n&lt;title&gt;' + statements_name.toString() +
'&lt;/title&gt;n&lt;/head&gt;'
return code; };
НАЗВАНИЕ СТРАНИЦЫ
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;
};
ТЕЛО СТРАНИЦЫ
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 = 'n&lt;body&gt;n' + statements_name.toString() +
'n&lt;/body&gt;'
return code;
};
СОЗДАНИЕ СПИСКА
Blockly.Language.webgl_a25_5html = {
category: 'WebGL',
helpUrl:"../../media/lists.html",
init: function() {
this.appendStatementInput("NAME")
.appendTitle("lists");
this.setPreviousStatement(true);
this.setNextStatement(true);
this.setTooltip('');}};
Blockly.JavaScript.webgl_a25_5html = function() {
var statements_name = Blockly.JavaScript.statementToCode(this, 'NAME');
var code = '&lt;lists&gt;n' + statements_name.toString() + 'n&lt;/lists&gt;'
return code;
};
КОНЕЦ ДОКУМЕНТА
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&lt;/html&gt;'
return code;
};
ФАЙЛ СПРАВКИ
СПАСИБО ЗА ВНИМАНИЕ
Ad

Recommended

Александр Кашеверов «Пара слов о веб - приложениях и что такое Gulp»
Александр Кашеверов «Пара слов о веб - приложениях и что такое Gulp»
DataArt
3D na webu - konference OpenAlt
3D na webu - konference OpenAlt
Pavol Hejný
лр1
лр1
SvyatoslavPozhydaev
A Practical Introduction to Coding Events in Libraries
A Practical Introduction to Coding Events in Libraries
karindalziel
Blockly
Blockly
JuliaDrozd
Dojocon2014magsamond
Dojocon2014magsamond
magsamond
Coding 101
Coding 101
Michelle Meracis
Coding Introductory Lesson Upper Elementary
Coding Introductory Lesson Upper Elementary
Brittany Pike
менеджмент проектов по
менеджмент проектов по
sheplyakov
менеджмент проектов по
менеджмент проектов по
sheplyakov
Расчетная работа Цифровой коллаж
Расчетная работа Цифровой коллаж
sheplyakov
цифровой коллаж
цифровой коллаж
sheplyakov
лабораторная работа 1 Исправленная
лабораторная работа 1 Исправленная
sheplyakov
шепляков дмитрий владимирович гр. пос 10а
шепляков дмитрий владимирович гр. пос 10а
sheplyakov

More Related Content

More from sheplyakov (6)

менеджмент проектов по
менеджмент проектов по
sheplyakov
менеджмент проектов по
менеджмент проектов по
sheplyakov
Расчетная работа Цифровой коллаж
Расчетная работа Цифровой коллаж
sheplyakov
цифровой коллаж
цифровой коллаж
sheplyakov
лабораторная работа 1 Исправленная
лабораторная работа 1 Исправленная
sheplyakov
шепляков дмитрий владимирович гр. пос 10а
шепляков дмитрий владимирович гр. пос 10а
sheplyakov
менеджмент проектов по
менеджмент проектов по
sheplyakov
менеджмент проектов по
менеджмент проектов по
sheplyakov
Расчетная работа Цифровой коллаж
Расчетная работа Цифровой коллаж
sheplyakov
цифровой коллаж
цифровой коллаж
sheplyakov
лабораторная работа 1 Исправленная
лабораторная работа 1 Исправленная
sheplyakov
шепляков дмитрий владимирович гр. пос 10а
шепляков дмитрий владимирович гр. пос 10а
sheplyakov

лабораторная работа 1

  • 1. ЛАБОРАТОРНАЯ РАБОТА 1 «ФАБРИКА BLOCKLY» ВЫПОЛНИЛ СТУДЕНТ ГРУППЫ ПОС-10А ШЕПЛЯКОВ Д. В.
  • 3. ИСХОДНЫЙ КОД ИЗОБРАЖЕНИЯ <svg width="64" height="64" xmlns="http://www.w3.org/2000/svg"><!-- Created with SVG-edit - http://svg- edit.googlecode.com/ --> <g><title>Layer 1</title><line fill="none" stroke="#000000" stroke-width="1" stroke- dasharray="null" stroke-linejoin="null" stroke-linecap="null" x1="25.25" y1="3.25" x2="25.25" y2="25.75" id="svg_4"/> <line fill="none" stroke="#000000" stroke-width="1" stroke-dasharray="null" stroke-linejoin="null" stroke- linecap="null" x1="29.5" y1="34" x2="29.5" y2="34.25" id="svg_5"/><line fill="none" stroke="#000000" stroke- width="1" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" x1="25.25" y1="25.75" x2="58.75" y2="25.75" id="svg_6"/><line fill="none" stroke="#000000" stroke-width="1" stroke-dasharray="null" stroke- linejoin="null" stroke-linecap="null" x1="25.5" y1="25.75" x2="6" y2="48.25" id="svg_7"/> <text fill="#000000" stroke="#000000" stroke-width="0" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" x="60.75" y="27.75" id="svg_10" font-size="7.024" font-family="serif" text-anchor="middle" xml:space="preserve">x</text><text fill="#000000" stroke="#000000" stroke-width="0" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" x="21.75" y="5.875" font-size="7.024" font-family="serif" text-anchor="middle" xml:space="preserve" id="svg_11">y</text><text fill="#000000" stroke="#000000" stroke-width="0" stroke-dasharray="null" stroke- linejoin="null" stroke-linecap="null" x="4.25" y="51.875" font-size="7.024" font-family="serif" text-anchor="middle" xml:space="preserve" id="svg_12">z</text><text fill="#000000" stroke="#000000" stroke-width="0" stroke- dasharray="null" stroke-linejoin="null" stroke-linecap="null" x="18.25" y="26.75" id="svg_13" font-size="4.024" font- family="serif" text-anchor="middle" xml:space="preserve">O(0,0,0)</text></g></svg>
  • 6. ЗАГОЛОВОК 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("HEADER"); this.setNextStatement(true); this.setTooltip(''); } }; Blockly.JavaScript.webgl_a25_1html = function() { var statements_name = Blockly.JavaScript.statementToCode(this, 'NAME');var code = '&lt;html&gt;n&lt;head&gt;n&lt;title&gt;' + statements_name.toString() + '&lt;/title&gt;n&lt;/head&gt;' return code; };
  • 7. НАЗВАНИЕ СТРАНИЦЫ 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; };
  • 8. ТЕЛО СТРАНИЦЫ 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 = 'n&lt;body&gt;n' + statements_name.toString() + 'n&lt;/body&gt;' return code; };
  • 9. СОЗДАНИЕ СПИСКА Blockly.Language.webgl_a25_5html = { category: 'WebGL', helpUrl:"../../media/lists.html", init: function() { this.appendStatementInput("NAME") .appendTitle("lists"); this.setPreviousStatement(true); this.setNextStatement(true); this.setTooltip('');}}; Blockly.JavaScript.webgl_a25_5html = function() { var statements_name = Blockly.JavaScript.statementToCode(this, 'NAME'); var code = '&lt;lists&gt;n' + statements_name.toString() + 'n&lt;/lists&gt;' return code; };
  • 10. КОНЕЦ ДОКУМЕНТА 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&lt;/html&gt;' return code; };