Home
Explore
Submit Search
Upload
Login
Signup
Advertisement
Check these out next
Odoo - CMS performances optimization
Odoo
Progressive Downloads and Rendering
Stoyan Stefanov
WebXR if X = how?
Luis Diego González-Zúñiga, PhD
SVCC 2013 D3.js Presentation (10/05/2013)
Oswald Campesato
2014 database - course 3 - PHP and MySQL
Hung-yu Lin
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Jeado Ko
Teste2
Guilherme Jorge
Html5 intro
Wilfred Nas
1
of
12
Top clipped slide
Лабораторная работа №1
Mar. 25, 2015
•
0 likes
0 likes
×
Be the first to like this
Show More
•
145 views
views
×
Total views
0
On Slideshare
0
From embeds
0
Number of embeds
0
Download Now
Download to read offline
Report
Education
Ошибки исправлены.
Alexey Potopakhin
Follow
Alexey Potopakhin
Advertisement
Advertisement
Advertisement
Recommended
Blockly
JuliaDrozd
968 views
•
13 slides
фабрика Blockly
Евгений Белов
592 views
•
16 slides
Private slideshow
sblackman
873 views
•
16 slides
HTML5 - Pedro Rosa
Comunidade NetPonto
1.1K views
•
66 slides
StHack 2014 - Mario "@0x6D6172696F" Heiderich - JSMVCOMFG
StHack
1.5K views
•
60 slides
Rapid HTML Prototyping with Bootstrap - Chris Griffith
UXPA International
1.7K views
•
66 slides
More Related Content
Slideshows for you
(20)
Odoo - CMS performances optimization
Odoo
•
5.3K views
Progressive Downloads and Rendering
Stoyan Stefanov
•
6K views
WebXR if X = how?
Luis Diego González-Zúñiga, PhD
•
216 views
SVCC 2013 D3.js Presentation (10/05/2013)
Oswald Campesato
•
2.1K views
2014 database - course 3 - PHP and MySQL
Hung-yu Lin
•
2.5K views
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Jeado Ko
•
2.2K views
Teste2
Guilherme Jorge
•
75 views
Html5 intro
Wilfred Nas
•
419 views
Google
soon
•
977 views
1cst
Griffinder VinHai
•
1.8K views
Vidéo approche en immobilier
hervepouliot
•
1K views
Slides pour blog
lyago
•
454 views
Test upload
Darrell Lawson Jr.
•
4.8K views
Mad Max is back, plus the rest of our new reviews and notable screenings
chicagonewsonlineradio
•
311 views
RCEC Email 8.14.03
Obama White House
•
942 views
Security in Node.JS and Express:
Petros Demetrakopoulos
•
1.8K views
Html5 For Jjugccc2009fall
Shumpei Shiraishi
•
1.9K views
FrontInBahia 2014: 10 dicas de desempenho para apps mobile híbridas
Loiane Groner
•
1.5K views
Moddefaults
André Oliveira
•
402 views
CAR Email 06.05.02 (a)
Obama White House
•
678 views
Similar to Лабораторная работа №1
(20)
лукьянченко л.а. пос 10а
l10bov
•
233 views
CSS3 Takes on the World
Jonathan Snook
•
1.5K views
Web accessibility
Eb Styles
•
299 views
smoke1272528461
mxsmoketest
•
142 views
Creating dynamic SVG elements in JavaScript
Joseph Khan
•
1.2K views
Upload[1]
mirjana stojanova
•
216 views
Blog skins396734
pantangmrny
•
179 views
HTML5: A primer on the web's present and future
Daniel Stout
•
32 views
A HTML5 platform demókon keresztül
Zoltán Dávid
•
428 views
Elinvoimaa hunajasta-yleist-hunajatietoa-ja-kyttvinkkej
Pertti Paavola
•
1.7K views
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
Igor Bronovskyy
•
408 views
Los Estados De La Materia
Mayritalinda
•
1.2K views
Implementing Awesome: An HTML5/CSS3 Workshop
Shoshi Roberts
•
3.5K views
MOConf'13: WebNotBombs: Optimize this
Boris Zapolsky
•
238 views
Svcc 2013-d3
Oswald Campesato
•
1.2K views
Library Program Technology in Ukraine & Romania
Mark Belinsky
•
531 views
Jarv.us Showcase — SenchaCon 2011
Chris Alfano
•
354 views
Jquery presentation
Mevin Mohan
•
43 views
Building iPhone Web Apps using "classic" Domino
Rob Bontekoe
•
1.6K views
HTML5
Brandon Byars
•
451 views
Advertisement
Recently uploaded
(20)
Public Diplomacy Presentation for Mission officers PDF.pdf
QamarBashir9
•
0 views
INDEPENDENT SAMPLE T TEST.pptx
Misbah660782
•
0 views
Essay On Diseases
Lisa Waddell
•
0 views
Racism Essay Topics
Lisa Waddell
•
0 views
M11122063_Seminar Dedi.pptx
DediPuteraLumbantoru
•
0 views
Healthy BBQ.pptx
LauraBrodt
•
0 views
nano_consumer_products.ppt
TridibBhunia2
•
0 views
11. Endoscopic management of bleeding PUD.pptx
Amos Brighton
•
0 views
Conservation and Revitalization of Historic Buildings.ppt
AbdurazakMussema
•
0 views
how to reach to Market 1220.pdf
DediPuteraLumbantoru
•
0 views
445615212-SOLVES-ROUTINE-NON-ROUTINE-PROBLEM-INVOLVING-THE-VOLUME-OF-THE-RECT...
SephTorres1
•
0 views
Public Diplomacy Part-I.pptx
QamarBashir9
•
0 views
Causes And Effects Of World War 1 Essay
Cindy Bradley
•
0 views
week-day resuelto.pptx
maritzaDazOrtz
•
0 views
PRESENTATION_ CONCLUDING SENTENCES.pptx
hakimi38
•
0 views
celebrities (1).pptx
AndreaQuiroz56
•
0 views
GRIP JUNE-2023.pptx
ShreyaVerma108
•
0 views
Adobe Express for Nonprofits_TechSoup_1.pdf
TechSoup
•
0 views
UDL as a Non-linear Unifying Field for Learning - Bridging Diversity and Pers...
Neus Lorenzo
•
0 views
Basic Computer Course in Meerut - Digilearnclasses.pdf
NehaAgarwal377141
•
0 views
Лабораторная работа №1
Лабораторная работа №1 по
дисциплине «Моделирование и анализ программного обеспечения» «Фабрика Blockly» ВЫПОЛНИЛ СТУДЕНТ ГРУППЫ ПОС-12А ПОТОПАХИН АЛЕКСЕЙ
Изображение SVG
Изображение SVG Исходный текст
SVG файла <svg width="640" height="480" xmlns="http://www.w3.org/2000/svg"> <!-- Created with SVG-edit - http://svg-edit.googlecode.com/ --> <g> <title>Layer 1</title> <circle id="svg_1" r="223.789032" cy="237.567027" cx="313.884056" stroke-width="4" stroke="#000000" fill="#ffffff"/> <text font-weight="bold" xml:space="preserve" text-anchor="middle" font-family="Fantasy" font-size="76" id="svg_3" y="362.950012" x="313.183334" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000" fill="#000000">CIRCLE</text> <circle id="svg_4" r="2.632813" cy="240.999995" cx="311.516872" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="4" stroke="#000000" fill="#000000"/> <line id="svg_6" y2="946.383362" x2="1327.450012" y1="1034.383362" x1="1424.450012" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="4" stroke="#000000" fill="none"/> <line id="svg_7" y2="1961.449951" x2="2614.733276" y1="2021.449951" x1="2724.733276" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="4" stroke="#000000" fill="none"/> <line id="svg_8" y2="93.280672" x2="142.531049" y1="239.280672" x1="309.531053" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="4" stroke="#000000" fill="none"/> <line id="svg_9" y2="987.583313" x2="1163.866669" y1="1051.583313" x1="1269.866669" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="4" stroke="#000000" fill="none"/> <line id="svg_10" y2="226.600958" x2="329.000015" y1="240.600958" x1="311.000015" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke="#000000" fill="none"/> <line id="svg_11" y2="1895.5" x2="2418.283325" y1="1953.5" x1="2526.283325" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="4" stroke="#000000" fill="none"/> <line id="svg_13" y2="1016.599976" x2="1632.366638" y1="1016.599976" x1="1580.366638" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke="#000000" fill="none"/> <line id="svg_14" y2="1060.549988" x2="1286.883362" y1="1043.549988" x1="1122.883362" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke="#000000" fill="none"/> <line id="svg_15" y2="226.8" x2="343.801158" y1="226.8" x1="328.801158" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke="#000000" fill="none"/> <line id="svg_16" y2="172.376061" x2="268.776682" y1="186.376062" x1="250.776682" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke="#000000" fill="none"/> <line id="svg_17" y2="172.375885" x2="283.477043" y1="172.375885" x1="268.477043" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke="#000000" fill="none"/> <text id="svg_19" font-weight="bold" xml:space="preserve" text-anchor="middle" font-family="Fantasy" font-size="22" y="234.580564" x="390.294425" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000" fill="#000000">CENTER</text> <text id="svg_20" font-weight="bold" xml:space="preserve" text-anchor="middle" font-family="Fantasy" font-size="22" y="180.233332" x="327.627764" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000" fill="#000000">RADIUS</text> </g> </svg>
Blockly Блоки Сгенерированный HTML
код <html> <head> <title> Circle Default Title</title> </head> <body> <canvas id='canv' width="1000" height="600" ></canvas> <script> if(window.WebGLRenderingContext) { var c = document.getElementById('canv'); var gl = c.getContext('2d'); gl.beginPath(); gl.arc(200, 200, 100, 0, 2 * Math.PI, false); gl.lineWidth = 1; gl.strokeStyle = '#000000'; gl.stroke(); } </script> </body> </html> Результат
Blockly Масштабирование 100% 120% 300%
Blockly Header Blockly.Language.webgl_header = { category:
'WebGL', helpUrl: 'webgl_a09_headerhtml5.help.html', init: function() { this.setColour(70); this.appendStatementInput("NAME") .appendTitle(new Blockly.FieldImage("../../media/circle.svg", 64, 48)) .appendTitle("Header"); this.setNextStatement(true); this.setTooltip(''); } }; Blockly.JavaScript.webgl_header = function() { var statements_name = Blockly.JavaScript.statementToCode(this, 'NAME'); var code = '<html>n<head>n<title>' + statements_name.toString() + '</title>n</head>' return code; };
Blockly Title Blockly.Language.webgl_title = { category:
'WebGL', helpUrl: 'webgl_a09_headerhtml5.help.html', init: function() { this.setColour(140); this.appendDummyInput() .appendTitle("Title") .appendTitle(new Blockly.FieldTextInput("Circle Default Title"), "NAME"); this.setPreviousStatement(true); this.setNextStatement(true); this.setTooltip(''); } }; Blockly.JavaScript.webgl_title = function() { var text_name = this.getTitleValue('NAME'); var code = text_name.toString(); return code; };
Blockly Body Blockly.Language.webgl_body = { category:
'WebGL', helpUrl: 'webgl_a09_headerhtml5.help.html', init: function () { this.setColour(210); this.appendStatementInput("NAME") .appendTitle("Body"); this.setPreviousStatement(true); this.setNextStatement(true); this.setTooltip(''); } }; Blockly.JavaScript.webgl_body = function () { var statements_name = Blockly.JavaScript.statementToCode(this, 'NAME'); var code = "n<body>n" + statements_name.toString() + "n</body>" return code; };
Blockly Canvas Blockly.Language.webgl_canvas = { category:
'WebGL', helpUrl: 'webgl_a09_headerhtml5.help.html', init: function() { this.setColour(280); this.appendDummyInput() .appendTitle("canvas id") .appendTitle(new Blockly.FieldTextInput("canvas"), "NAME"); this.setPreviousStatement(true); this.setNextStatement(true); this.setTooltip(''); } }; Blockly.JavaScript.webgl_canvas = function() { var text_name_canvas = this.getTitleValue('NAME'); var code = "<canvas id='" + text_name_canvas.toString() +"' width="1000" height="600" ></canvas>" canvas_name = text_name_canvas; return code; };
Blockly Draw circle Blockly.Language.webgl_drawcircle
= { category: 'WebGL', helpUrl: 'webgl_a09_headerhtml5.help.html', init: function() { this.setColour(360); this.appendDummyInput() .appendTitle("Layout x =") .appendTitle(new Blockly.FieldTextInput("200"), "x") .appendTitle("Layout y =") .appendTitle(new Blockly.FieldTextInput("200"), "y") .appendTitle("radius =") .appendTitle(new Blockly.FieldTextInput("100"), "r"); this.setPreviousStatement(true); this.setNextStatement(true); this.setTooltip(''); } }; Blockly.JavaScript.webgl_drawcircle = function() { var text_x = this.getTitleValue('x'); var text_y = this.getTitleValue('y'); var text_r = this.getTitleValue('r'); var code = "n<script>" code += "nif(window.WebGLRenderingContext)" code += "n{" code += "n var c = var c = document.getElementById('" + canvas_name + "');"" code += "n var gl = c.getContext('2d');" code += "n gl.beginPath();" code += "n gl.arc(" + parseInt(text_x) + ", "+parseInt(text_y)+", "+parseInt(text_r)+", 0, 2 * Math.PI, false);" code += "n gl.lineWidth = 1;" code += "n gl.strokeStyle = '#000000';" code += "n gl.stroke();" code += "n}" code = code + "n</script>"; return code; };
Blockly Footer Blockly.Language.webgl_a09_footerhtml5 = { category:
'WebGL', helpUrl: 'webgl_a09_headerhtml5.help.html', init: function () { this.appendDummyInput() .appendTitle("Footer"); this.setPreviousStatement(true); this.setTooltip('') } }; Blockly.JavaScript.webgl_a09_footerhtml5 = function () { var code = "n</html>" return code; };
Спасибо за внимание!
Advertisement