Compare commits

...

44 Commits

Author SHA1 Message Date
724ac19281 0.1.23 2018-04-13 15:24:28 -07:00
3e193e97bf bump pxt-core to 3.8.14, 2018-04-13 15:24:23 -07:00
23c1789976 Fix IE11 for in bug in motor field (#513)
* Fix IE11 for in bug in motor field

* minor fix
2018-04-13 15:21:41 -07:00
87b08bf6f3 0.1.22 2018-04-13 14:02:04 -07:00
3e534f7329 Update state of the landscape brick view as well to be consistent with the portrait view (main) (#508) 2018-04-13 14:01:37 -07:00
7f8499bb5f Always show the motor value regardless if it's 0. (#509) 2018-04-13 14:01:25 -07:00
4bcde58c0c 0.1.21 2018-04-13 12:37:36 -07:00
dd5df88dea Update test 2018-04-13 14:50:20 -04:00
f35ed0205b 0.1.20 2018-04-13 11:47:55 -07:00
7379c8dfe7 Friday 13th using .13 builfd 2018-04-13 11:37:51 -07:00
574de3a15e bumping pxt 2018-04-13 11:29:00 -07:00
a3c08ddb01 branding fixes 2018-04-13 09:05:34 -07:00
070cc42d36 Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-04-12 15:05:19 -07:00
77aa7b86d8 fixing summary 2018-04-12 15:05:14 -07:00
f912ea6104 0.1.19 2018-04-12 15:01:43 -07:00
b06bc6bc6c bump pxt-core to 3.8.11, 2018-04-12 15:01:38 -07:00
af3189d8b5 removing mindstorms from tutorial names (#496)
* removing mindstorms from tutorial names

* lego feedback

* file name issues

* bring back bang
2018-04-12 14:41:22 -07:00
661157f112 0.1.18 2018-04-12 14:29:52 -07:00
141bc6bddb bump pxt-core to 3.8.10, 2018-04-12 14:29:44 -07:00
bd06fb80f3 Threshold to calibration (#495)
* renaming threshold to calibration

* rename threshold to calibration
2018-04-12 14:25:44 -07:00
2c874570ce Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-04-12 10:33:27 -07:00
08ee2b2017 fixing branding 2018-04-12 10:33:21 -07:00
499d97b07c Update targetconfig.json 2018-04-12 13:26:02 -04:00
32b7400e9e Optimizing Logos. 2018-04-12 00:36:11 -07:00
90717cfc33 Change drive label to EV3 (#494) 2018-04-11 17:20:07 -06:00
bd3b149dcc Tutorial theming (#493)
* Tutorial theming

* no border
2018-04-11 13:22:21 -06:00
fafd3d37da Merge branch 'master' of https://github.com/microsoft/pxt-ev3 2018-04-11 09:33:01 -07:00
138425c0fb missed renaming 2018-04-11 09:32:54 -07:00
231cd41f7a rename intruder to security (#492) 2018-04-11 10:31:53 -06:00
eb7cd5d97c 0.1.17 2018-04-11 08:59:01 -07:00
a4a9af28a4 Switch to reflected light when calling threshold (#489)
* fix typo

* fixing threshold functions

* switch to reflected mode when calling threshold
2018-04-11 09:58:34 -06:00
6c253182e4 0.1.16 2018-04-11 08:00:47 -07:00
0198be6dda add screen mode to auto clear screen between modes (#486) 2018-04-11 09:00:22 -06:00
57ab6d153d added support links 2018-04-11 08:00:01 -07:00
fd0bd4ef39 update drive name 2018-04-11 07:58:02 -07:00
8b2ae10980 Initial 'troubleshoot' page (#484)
* Initial 'troubleshoot' page

* Define 'driveDisplayName'

* Tutorial name goof

* Add fake label for drive

* And typo

* Add firmware update section

* Add a hint for offline firmware update
2018-04-11 08:57:29 -06:00
4627328bcd Output set Type fix (#487)
* properly send outputsettype info

* fix simulator

* bump pxt

* typo in docs
2018-04-11 08:48:07 -06:00
80989cf4c9 More tutorial typos (#485) 2018-04-11 08:45:44 -06:00
00b193b126 Add 'intruder alert' tutorial (#452)
* Add 'intrduer alert' tutorial

* Use 'detected' option instead of 'near'
2018-04-10 23:43:28 -06:00
e65db0b756 Update dimmer background, refactor top menu background. (#483)
Minor ui changes (dimmer background)
2018-04-10 12:48:00 -07:00
8f211a5c19 Use sort option in FieldImages to sort the options after showing the editor (not before) (#482) 2018-04-10 11:51:08 -07:00
379a6a26be Add large and medium motor speed labels (#480)
* Add large and medium motor speed labels

* Support dual motor labels.
2018-04-10 11:50:58 -07:00
8398c8efdb Dispose correctly of gradient definitions in the control. Attach to port number not id. 2018-04-10 11:49:15 -07:00
f41310e879 Update large motor holes to be transparent (like the real thing) (#476) 2018-04-09 17:27:57 -07:00
71 changed files with 723 additions and 394 deletions

View File

@ -1,4 +1,4 @@
# LEGO Mindstorms EV3 target for PXT
# LEGO® MINDSTORMS® Education EV3 for Microsoft MakeCode
[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Private/pxt_project_rainbow/master/pxt-ev3_Push)](https://ci2.dot.net/job/Private/job/pxt_project_rainbow/job/master/job/pxt-ev3_Push/)

View File

@ -1,5 +1,11 @@
# @extends
## Support #support
* [Troubleshoot](/troubleshoot)
* [LEGO Support](http://service.lego.com/)
* [EV3 Manager](https://ev3manager.education.lego.com/)
## Projects #projects
* [Getting Started](/getting-started)
@ -10,14 +16,15 @@
* [Wake Up!](/tutorials/wake-up)
* [Make An Animation](/tutorials/make-an-animation)
* [What Animal Am I?](/tutorials/what-animal-am-i)
* [Music Brick](/tutorials/mindstorms-music)
* [Music Brick](/tutorials/music-brick)
* [Run Motors](/tutorials/run-motors)
* [Touch to Run](/tutorials/touch-to-run)
* [Touch Sensor Values](/tutorials/touch-sensor-values)
* [What Color?](/tutorials/what-color)
* [Line Following](/tutorials/line-following)
* [Green Light, Red Light](/tutorials/greenlight-redlight)
* [Red Light, Green Light](/tutorials/redlight-greenlight)
* [Object Near?](/tutorials/object-near)
* [Security Alert](/tutorials/security-alert)
* [Coding](/coding)
* [Autonomous Parking](/coding/autonomous-parking)

View File

@ -16,7 +16,7 @@ Design cars that can park themselves safely without driver intervention.
### Build
Build a LEGO MINDSTORMS vehicle that can park itself safely without driver intervention. Start by constructing this model:
Build a @boardname@ vehicle that can park itself safely without driver intervention. Start by constructing this model:
[![EV3- Robot Driving Base](/static/coding/autonomous-parking/ev3-robot-driving-base.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-driving-base-79bebfc16bd491186ea9c9069842155e.pdf)

View File

@ -16,7 +16,7 @@ Think about:
### Build
Build a LEGO MINDSTORMS vehicle that can help prevent drivers from falling asleep and causing an accident. Start by constructing this model:
Build a @boardname@ vehicle that can help prevent drivers from falling asleep and causing an accident. Start by constructing this model:
[![EV3 robot with color sensor](/static/coding/line-detection/ev3-robot-color-sensor-down.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-color-sensor-down-driving-base-d30ed30610c3d6647d56e17bc64cf6e2.pdf)

View File

@ -16,7 +16,7 @@ Think about:
### Build
Build a LEGO MINDSTORMS vehicle that can avoid accidents between vehicles and objects in the road. Start by constructing this model:
Build a @boardname@ vehicle that can avoid accidents between vehicles and objects in the road. Start by constructing this model:
[![EV3 Robot Driving Base](/static/coding/object-detection/ev3-robot-driving-base.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-ultrasonic-sensor-driving-base-61ffdfa461aee2470b8ddbeab16e2070.pdf)

View File

@ -21,11 +21,11 @@ Here are some fun programs for your @boardname@!
"imageUrl": "/static/maker/security-gadget.png"
},
{
"name": "Intruder Detector",
"description": "Raise the alarm when an intruder sneaks in",
"url":"/maker/intruder-detector",
"name": "Movement Detector",
"description": "Raise the alarm when an movement sneaks in",
"url":"/maker/movement-detector",
"cardType": "example",
"imageUrl": "/static/maker/intruder-detector.png"
"imageUrl": "/static/maker/movement-detector.png"
},
{
"name": "Puppet",

View File

@ -7,7 +7,7 @@
{
"name": "Try",
"imageUrl": "/static/lessons/try.png",
"description": "Get a quick introduction to programming with EV3.",
"description": "Get a quick introduction to programming.",
"url": "/getting-started/try",
"cardType": "side"
},

View File

@ -4,7 +4,7 @@ Get a quick introduction to programming with EV3.
![Display on EV3 Brick with Music Notes](/static/getting-started/01_EyesOn_Intro.png)
We are excited to help you get started with LEGO MINDSTORMS Education EV3. In this project we will guide you through connecting your EV3 brick, creating your first program, controlling a Large Motor, a Touch Sensor and a Color Sensor. These steps can take up to 45 minutes.
We are excited to help you get started with @boardname@. In this project we will guide you through connecting your EV3 brick, creating your first program, controlling a Large Motor, a Touch Sensor and a Color Sensor. These steps can take up to 45 minutes.
## Turn on your EV3 Brick

View File

@ -106,4 +106,4 @@ sensors.ultrasonic4.setThreshold(UltrasonicSensorEvent.ObjectDetected, 10)
**Congratulations!**
You are ready to move on to the next steps.
Try a LEGO MINDSTORMS [Design Engineering](/design-engineering), [Coding](/coding), or [Maker](/maker) activity.
Try a [Design Engineering](/design-engineering), [Coding](/coding), or [Maker](/maker) activity.

View File

@ -1,6 +1,6 @@
# Coding in MakeCode
This guide helps users who are used to the LabView LEGO Minstorms editor quickly get familiar with using blocks in MakeCode.
This guide helps users who are used to work with @boardname@ to get familiar with using blocks in MakeCode.
## Snap together the blocks

View File

@ -1,6 +1,6 @@
# Lessons
Learning activities for LEGO Mindstorms with MakeCode.
Learning activities for @boardname@ with MakeCode.
## Motors and motion

View File

@ -4,7 +4,7 @@
### Required Materials
* [LEGO MINDSTORMS Education EV3 Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
* [@boardname@ Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
* Lesson plan
* Student Worksheet for each activity
* Inspirational images for each activity
@ -16,7 +16,7 @@ Each lesson is designed to take 90 minutes. If you work in shorter class periods
### Preparation
It is important to establish student groups. Groups of two work well. Ensure that each student has a copy of the Student Worksheet for recording their design process, or alternatively, they can use their own preferred method for recording their design journey. They will also need the LEGO MINDSTORMS Education EV3 Core Set (one set for every two students is recommended).
It is important to establish student groups. Groups of two work well. Ensure that each student has a copy of the Student Worksheet for recording their design process, or alternatively, they can use their own preferred method for recording their design journey. They will also need the @boardname@ Core Set (one set for every two students is recommended).
### Prior Learning

View File

@ -10,7 +10,7 @@ Your robot will:
* Use at least one motor
* Use NO wheels for locomotion
![LECG Mindstorms brick with parts](/static/lessons/make-it-move/locomotion-no-wheels.jpg)
![@boardname@ with parts](/static/lessons/make-it-move/locomotion-no-wheels.jpg)
## Construct @unplugged
@ -25,7 +25,7 @@ The legs in the Walker Bot are designed to show how to change the rotary motion
Start by reading [these](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/ev3-dep/building%20instructions/walker-bot-bi-180fc24f9298e1dd6201099627d43903.pdf) instructions first.
![LEGO Mindstorms Walker Bot](/static/lessons/make-it-move/walker-bot.jpg)
![@boardname@ Walker Bot](/static/lessons/make-it-move/walker-bot.jpg)
## Program 1 @fullscreen

View File

@ -10,7 +10,7 @@ Your robot will:
* Use at least one motor
* Use NO wheels for locomotion
![LECG Mindstorms brick with parts](/static/lessons/make-it-move/locomotion-no-wheels.jpg)
![@boardname@ with parts](/static/lessons/make-it-move/locomotion-no-wheels.jpg)
## Construct
@ -24,7 +24,7 @@ The legs in the Walker Bot are designed to show how to change the rotary motion
Start by reading [these](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/ev3-dep/building%20instructions/walker-bot-bi-180fc24f9298e1dd6201099627d43903.pdf) instructions first.
![LEGO Mindstorms Walker Bot](/static/lessons/make-it-move/walker-bot.jpg)
![@boardname@ Walker Bot](/static/lessons/make-it-move/walker-bot.jpg)
## Program

View File

@ -1,6 +1,6 @@
# Maker Activites
These six activities require the [LEGO® MINDSTORMS® Education EV3 Core Set (45544)](https://education.lego.com/en-us/products/lego-mindstorms-education-ev3-core-set-/5003400). Supporting materials for teachers and middle school students are provided, offering everything teachers and students need to explore their inner makers as they follow the design process to solve open-ended, themed challenges...
These six activities require the [@boardname@ Core Set (45544)](https://education.lego.com/en-us/products/lego-mindstorms-education-ev3-core-set-/5003400). Supporting materials for teachers and middle school students are provided, offering everything teachers and students need to explore their inner makers as they follow the design process to solve open-ended, themed challenges...
* [Download Curriculum Materials](https://education.lego.com/en-us/downloads/mindstorms-ev3/curriculum)

View File

@ -1,4 +1,4 @@
# Intruder Detector
# Movement Detector
This program will activate an alarm when an object moves in front of the Ultrasonic Sensor.

View File

@ -20,7 +20,7 @@ Look at the photos and think about:
### Things Youll Need
* [LEGO MINDSTORMS Education EV3 Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
* [@boardname@ Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
Additional materials to add to your Security Gadget:
@ -72,7 +72,7 @@ Some things to do while brainstorming:
It is time to start making!
* Use the components from the LEGO® MINDSTORMS EV3 Core Set and additional materials to make your chosen solution.
* Use the components from the @boardname@ Core Set and additional materials to make your chosen solution.
* Test and analyze your design as you go and record any improvements that you make.
### Review and Revise Your Solution

View File

@ -19,7 +19,7 @@ Look at the photos and think about:
### Things Youll Need
* [LEGO MINDSTORMS Education EV3 Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
* [@boardname@ Core Set](https://education.lego.com/enus/products/legomindstormseducationev3coreset/5003400)
Additional materials to add to your Sound Machine:
@ -71,7 +71,7 @@ Some things to do while brainstorming:
It is time to start making!
* Use the components from the LEGO® MINDSTORMS EV3 Core Set and additional materials to make your chosen solution.
* Use the components from the @boardname@ Core Set and additional materials to make your chosen solution.
* Test and analyze your design as you go and record any improvements that you make.
### Review and Revise Your Solution

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -1,74 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="141.73"
height="141.731"
viewBox="0 0 141.73 141.73101"
enable-background="new 0 0 265.365 141.732"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="lego-logo.svg"><metadata
id="metadata26"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs24" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1199"
inkscape:window-height="604"
id="namedview22"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="1.6520876"
inkscape:cx="101.03204"
inkscape:cy="98.819336"
inkscape:window-x="372"
inkscape:window-y="149"
inkscape:window-maximized="0"
inkscape:current-layer="g6" /><g
id="product_logo" /><g
id="guides" /><g
id="LEGO_LOGO_SMALL_RGB"><g
id="g6"><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z"
id="path8"
inkscape:connector-curvature="0"
style="fill:#ffffff" /><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z m 130.536,58.127 c -0.23,4.356 -1.617,9.786 -2.839,13.414 -4.917,14.609 -10.618,23.666 -23.821,23.666 -3.887,0 -10.783,-1.031 -13.324,-7.947 l -0.602,-1.641 -1.082,1.371 C 85.7,93.168 79.564,96.186 72.998,96.217 67.96,96.24 63.912,94.553 61.293,91.334 l -0.718,-0.883 -0.765,0.844 c -2.797,3.088 -7.668,4.859 -13.364,4.859 -4.473,0 -8.335,-1.521 -10.876,-4.277 l -0.692,-0.752 -0.72,0.727 c -2.825,2.852 -7.276,4.289 -12.873,4.158 -6.79,-0.162 -10.924,-3.951 -11.058,-10.141 -0.205,-9.543 9.031,-29.622 12.854,-35.727 2.482,-4.078 5.895,-6.055 10.438,-6.055 3.092,0 5.207,0.646 6.463,1.977 1.144,1.211 1.37,2.232 1.472,4.688 l 0.131,3.175 1.676,-2.7 c 4.054,-6.532 10.773,-7.434 17.43,-7.434 4.628,0 8.667,1.702 10.289,4.336 l 0.599,0.971 0.866,-0.737 c 3.431,-2.916 8.271,-4.521 13.629,-4.521 5.849,0 10.099,1.454 12.634,4.322 0.576,0.651 0.957,1.106 1.486,2.219 l 0.651,1.366 0.977,-1.155 c 3.712,-4.39 8.779,-6.615 15.067,-6.615 4.98,0 8.761,1.324 11.235,3.935 3.104,3.271 3.547,7.875 3.373,11.161 z"
id="path10"
inkscape:connector-curvature="0"
style="fill:#f6ec36" /><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z M 135.435,64.44 c -0.633,5.089 -4.072,14.518 -5.899,18.286 -4.903,10.102 -11.453,17.863 -24.074,17.863 -6.742,0 -12.288,-2.15 -15.531,-6.283 -4.749,4.162 -10.627,6.342 -16.956,6.342 -4.876,0 -9.185,-1.408 -12.471,-4.012 -3.626,2.555 -8.52,3.98 -13.943,3.98 -4.53,0 -8.606,-1.244 -11.796,-3.543 -3.529,2.342 -8.154,3.506 -13.583,3.377 C 12.149,100.237 5.912,94.507 5.733,86.188 5.497,75.137 14.803,54.911 19.189,47.907 c 3.282,-5.392 8.292,-8.293 14.431,-8.293 6.663,0 9.078,1.903 10.267,4.326 5.141,-4.366 11.956,-4.617 16.808,-4.617 5.356,0 8.717,1.422 11.575,3.697 3.948,-2.368 8.477,-3.599 13.871,-3.599 6.897,0 12.021,1.604 15.595,5.137 4.168,-3.469 9.388,-5.05 15.23,-5.05 7.725,0 12.808,2.786 15.793,6.94 4.203,5.859 3.451,11.757 2.676,17.992 z"
id="path12"
inkscape:connector-curvature="0"
style="fill:#d01012" /><path
d="m 0,0 0,141.731 141.73,0 L 141.73,0 0,0 Z m 139.781,1.952 0,137.832 -137.83,0 0,-137.832 137.83,0 z"
id="path14"
inkscape:connector-curvature="0" /><path
d="m 134.752,42.53 0,-0.965 0.655,0 c 0.479,0 0.728,0.168 0.728,0.479 0,0.247 -0.16,0.486 -0.647,0.486 l -0.736,0 z m 2.351,2.002 -0.408,-0.708 c -0.354,-0.619 -0.452,-0.717 -0.755,-0.823 l 0,-0.019 c 0.596,-0.07 0.95,-0.453 0.95,-0.983 0,-0.56 -0.354,-0.984 -1.109,-0.984 l -1.754,0 0,3.519 0.727,0 0,-1.441 0.133,0 c 0.311,0 0.435,0.035 0.576,0.176 0.142,0.144 0.354,0.443 0.479,0.69 l 0.284,0.575 0.877,-0.002 0,0 z m -1.731,-4.497 c 1.51,0 2.737,1.218 2.737,2.726 0,1.508 -1.229,2.731 -2.737,2.731 -1.506,0 -2.72,-1.225 -2.72,-2.731 0,-1.506 1.214,-2.726 2.72,-2.726 z m 0,-0.67 c -1.877,0 -3.392,1.516 -3.392,3.396 0,1.879 1.515,3.394 3.392,3.394 1.883,0 3.397,-1.515 3.397,-3.394 0.002,-1.882 -1.514,-3.396 -3.397,-3.396 z"
id="path16"
inkscape:connector-curvature="0" /><path
d="m 116.889,43.002 c -7.325,0 -12.386,2.904 -15.812,6.961 -0.579,-1.214 -1.019,-1.746 -1.638,-2.447 -2.805,-3.17 -7.313,-4.649 -13.364,-4.649 -5.912,0 -10.841,1.846 -14.263,4.754 -1.777,-2.89 -6.013,-4.803 -11.121,-4.803 -6.674,0 -13.946,0.944 -18.261,7.896 -0.104,-2.503 -0.33,-3.828 -1.737,-5.317 -1.71,-1.81 -4.477,-2.282 -7.173,-2.282 -4.912,0 -8.605,2.146 -11.266,6.515 -3.859,6.163 -13.212,26.441 -13.001,36.263 0.137,6.344 4.393,10.916 12.01,11.096 5.952,0.143 10.62,-1.449 13.59,-4.447 2.665,2.896 6.731,4.594 11.596,4.594 5.417,0 10.868,-1.627 14.088,-5.182 2.712,3.332 6.979,5.271 12.468,5.244 7.175,-0.035 13.477,-3.438 17.593,-8.652 2.259,6.148 7.985,8.59 14.241,8.59 13.709,0 19.729,-9.428 24.748,-24.332 1.13,-3.357 2.639,-8.963 2.889,-13.672 0.413,-7.839 -2.903,-16.13 -15.587,-16.13 z M 25.672,80.477 c 7.093,-1.232 8.876,1.332 8.653,3.707 -0.669,7.109 -7.191,8.699 -12.854,8.566 -4.107,-0.1 -7.8,-1.98 -7.903,-6.748 -0.18,-8.342 8.328,-27.641 12.333,-34.038 1.85,-3.037 4.104,-4.539 7.698,-4.539 3.406,0 4.25,1.749 4.2,3.844 -0.134,5.589 -9.164,22.574 -12.127,29.208 z M 48.77,73.925 c -0.469,1.27 -1.357,3.93 -2.076,6.75 2.328,-0.582 4.074,-0.986 7.065,-0.914 3.408,0.084 5.586,1.496 5.586,4.314 0,6.832 -7.551,8.838 -12.789,8.838 -5.751,0 -10.803,-3.275 -10.803,-9.564 0,-7.373 3.997,-18.553 7.748,-26.001 4.606,-9.146 9.312,-10.362 17.419,-10.362 3.562,0 7.667,1.524 7.667,4.888 0,4.662 -3.95,6.44 -7.866,6.665 -1.672,0.096 -4.246,0.188 -5.786,0.079 0,0 -1.303,1.985 -2.688,5.523 7.252,-1.021 10.327,0.625 9.103,4.82 -1.657,5.667 -6.567,6.04 -12.58,4.964 z M 84.438,56.293 c -1.961,0 -3.244,1.242 -4.198,2.583 -2.102,2.952 -6.656,14.781 -7.365,19.64 -0.486,3.328 0.951,4.006 2.522,4.006 2.52,0 5.345,-2.666 6.309,-7.064 0,0 -4.797,-0.117 -3.475,-4.371 1.285,-4.128 3.723,-5.022 7.764,-5.188 7.961,-0.325 7.175,5.553 6.538,8.688 -2.069,10.18 -9.314,18.355 -19.562,18.355 -7.016,0 -11.371,-3.881 -11.371,-11.035 0,-5.098 2.529,-13.101 4.534,-17.784 4.267,-9.968 8.742,-16.944 20.143,-16.944 6.84,0 12.235,2.458 11.444,8.866 -0.58,4.703 -2.934,7.465 -7.21,7.799 -1.196,0.093 -6.089,-0.031 -4.466,-4.66 0.565,-1.619 0.799,-2.891 -1.607,-2.891 z m 43.057,8.413 c -1.205,6.002 -3.916,13.101 -6.859,18.392 -4.801,8.633 -10.633,9.842 -15.723,9.781 -5.093,-0.061 -10.83,-1.941 -10.874,-9.795 -0.031,-5.639 2.401,-13.598 4.466,-18.815 3.599,-9.458 7.277,-17.17 18.904,-17.031 13.559,0.161 11.141,12.219 10.086,17.468 z M 115.993,56.49 c -1.164,-0.016 -2.18,0.212 -3.093,1.62 -2.051,2.657 -8.047,19.042 -7.941,22.31 0.038,1.174 0.687,2.201 2.133,2.201 1.659,0.002 2.581,-1.145 3.396,-2.529 1.887,-3.193 7.193,-17.676 7.339,-21.297 0.043,-1.055 -0.133,-2.284 -1.834,-2.305 z"
id="path18"
inkscape:connector-curvature="0" /></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="141.7" height="141.7"><path d="M1 1v139.8h139.8V.9H1z" fill="#fff"/><path d="M1 1v139.8h139.8V.9H1zm130.5 58a56 56 0 0 1-2.8 13.5c-5 14.6-10.7 23.7-23.9 23.7-3.8 0-10.7-1-13.3-8l-.6-1.6-1 1.3A21.5 21.5 0 0 1 73 96.2c-5 0-9-1.6-11.7-4.9l-.7-.8-.8.8c-2.8 3-7.7 4.9-13.4 4.9-4.4 0-8.3-1.6-10.8-4.3l-.7-.8-.7.8c-2.9 2.8-7.3 4.2-13 4.1-6.7-.2-10.8-4-11-10.1-.2-9.6 9-29.7 12.9-35.8 2.5-4 5.9-6 10.4-6 3.1 0 5.2.6 6.5 2 1.1 1.2 1.4 2.2 1.5 4.7v3.1l1.8-2.7c4-6.5 10.7-7.4 17.4-7.4 4.6 0 8.7 1.7 10.3 4.3l.6 1 .8-.7a21 21 0 0 1 13.7-4.6c5.8 0 10 1.5 12.6 4.4a8 8 0 0 1 1.5 2.2l.6 1.3 1-1.1c3.7-4.4 8.8-6.6 15-6.6 5 0 8.9 1.3 11.3 4 3.1 3.2 3.6 7.8 3.4 11z" fill="#f6ec36"/><path d="M1 1v139.8h139.8V.9H1zm134.4 63.4a80 80 0 0 1-5.9 18.3c-4.9 10.1-11.4 17.9-24 17.9-6.8 0-12.3-2.2-15.6-6.3a25.4 25.4 0 0 1-17 6.3c-4.8 0-9.1-1.4-12.4-4a24.2 24.2 0 0 1-25.7.5 23.3 23.3 0 0 1-13.6 3.3c-9-.2-15.3-5.9-15.5-14.2-.2-11 9.1-31.3 13.5-38.3 3.3-5.4 8.3-8.3 14.4-8.3 6.7 0 9.1 2 10.3 4.3 5.1-4.3 12-4.6 16.8-4.6 5.4 0 8.7 1.4 11.6 3.7 4-2.3 8.4-3.6 13.8-3.6 7 0 12 1.6 15.6 5.2 4.2-3.5 9.4-5 15.3-5 7.7 0 12.8 2.7 15.8 6.8 4.2 6 3.4 11.8 2.6 18z" fill="#d01012"/><path d="M0 0v141.7h141.7V0H0zm139.8 2v137.8H2V2h137.8z"/><path d="M134.8 42.5v-1h.6c.5 0 .7.2.7.5s-.1.5-.6.5h-.7zm2.3 2l-.4-.7c-.4-.6-.5-.7-.8-.8.6 0 1-.5 1-1 0-.6-.4-1-1.1-1H134v3.5h.8v-1.4c.4 0 .5 0 .7.2l.4.7.3.5h.9zm-1.7-4.5a2.7 2.7 0 1 1 0 5.5 2.7 2.7 0 0 1 0-5.5zm0-.6a3.4 3.4 0 1 0 0 6.8 3.4 3.4 0 1 0 0-6.8zM116.9 43c-7.3 0-12.4 3-15.8 7a9 9 0 0 0-1.7-2.5c-2.8-3.2-7.3-4.6-13.3-4.6-6 0-10.9 1.8-14.3 4.7-1.8-2.9-6-4.8-11.1-4.8-6.7 0-14 1-18.3 8 0-2.6-.3-4-1.7-5.4-1.7-1.8-4.5-2.3-7.2-2.3-4.9 0-8.6 2.2-11.2 6.5-4 6.2-13.3 26.5-13 36.3 0 6.3 4.3 11 12 11 6 .2 10.6-1.4 13.6-4.4 2.6 3 6.7 4.6 11.5 4.6 5.5 0 11-1.6 14.1-5.1 2.7 3.3 7 5.2 12.5 5.2 7.2 0 13.5-3.4 17.6-8.7 2.3 6.2 8 8.6 14.2 8.6 13.7 0 19.8-9.4 24.8-24.3a57 57 0 0 0 2.9-13.7c.4-7.8-3-16.1-15.6-16.1zM25.7 80.5c7-1.3 8.8 1.3 8.6 3.7-.6 7-7.2 8.7-12.8 8.5-4.1 0-7.8-2-8-6.7-.1-8.3 8.4-27.6 12.4-34 1.9-3 4.1-4.6 7.7-4.6 3.4 0 4.2 1.8 4.2 3.9-.1 5.6-9.2 22.5-12.1 29.2zm23-6.6c-.4 1.3-1.3 4-2 6.8 2.3-.6 4-1 7-1 3.5.1 5.6 1.6 5.6 4.4 0 6.8-7.5 8.8-12.7 8.8-5.8 0-10.8-3.3-10.8-9.6 0-7.3 4-18.5 7.7-26C48.1 48.2 52.8 47 60.9 47c3.6 0 7.7 1.5 7.7 4.9 0 4.6-4 6.4-7.9 6.6a55 55 0 0 1-5.8.1s-1.3 2-2.7 5.5c7.3-1 10.4.7 9.1 4.9-1.6 5.6-6.5 6-12.5 5zm35.7-17.6c-2 0-3.2 1.2-4.2 2.6-2 3-6.6 14.8-7.3 19.6-.5 3.3 1 4 2.5 4 2.5 0 5.3-2.6 6.3-7 0 0-4.8-.2-3.5-4.4 1.3-4.1 3.8-5 7.8-5.2 8-.3 7.2 5.6 6.5 8.7-2 10.2-9.3 18.3-19.5 18.3-7 0-11.4-3.8-11.4-11 0-5 2.5-13 4.5-17.8 4.3-10 8.8-17 20.2-17 6.8 0 12.2 2.5 11.4 9-.6 4.6-3 7.4-7.2 7.7-1.2.1-6 0-4.5-4.6.6-1.6.8-3-1.6-3zm43 8.4c-1.1 6-3.8 13.1-6.8 18.4-4.8 8.6-10.6 9.8-15.7 9.8-5 0-10.8-2-10.9-9.8 0-5.7 2.4-13.6 4.5-18.8 3.6-9.5 7.3-17.2 19-17 13.5.1 11 12.2 10 17.4zM116 56.5c-1.2 0-2.2.2-3.1 1.6-2 2.7-8 19-8 22.3.1 1.2.7 2.2 2.2 2.2 1.7 0 2.6-1.1 3.4-2.5a95 95 0 0 0 7.3-21.3c0-1-.1-2.3-1.8-2.3z"/></svg>

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

BIN
docs/static/setup/ev3-drive-windows.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
docs/static/tutorials/security-alert.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -0,0 +1,56 @@
# Troubleshooting download problems
If your're having trouble getting your code onto the @boardname@, try these steps to see if you can fix the problem.
## Can I see the **@drivename@** drive on my computer?
When your @boardname@ is connected to your computer, you should see a new drive called **@drivename@** attached.
On Windows, it looks like this in Explorer:
![@drivename@ Drive in Windows Explorer](/static/setup/ev3-drive-windows.png)
If you don't see the **@drivename@** drive, make sure your brick is powered on and check that your USB connection is good.
## Is my brick charged and powered on?
Make sure your brick is charged and powered on. If your brick doesn't turn on, find the charger and plug it into wall power, then connect it to your brick. Does it turn on and start up?
## Is my USB connection good?
Make sure that one end of your USB cable is firmly inserted into the port on the computer and the other end is connected to the brick. If you still can't see the **@drivename@** drive, try a different port on the computer. If that doesn't work then maybe your cable is bad or you need to reset the brick.
## How do I reset my brick?
If you think your USB connection is good and you still can't see your **@drivename@** drive, try giving the brick a reset. You can follow these steps to reset:
1. Using a finger from one hand, press the **Back** button. Keep holding it.
2. With your other hand, use two fingers to hold down both the **Left** button and the **Enter** button. You hold these at the same time while you're still pressing the **Back** button.
3. Now, release your finger from the **Back** button.
4. When the brick says "Starting.." you can let go of the **Left** and **Enter** buttons.
You can also watch this [How to Reset](https://www.lego.com/en-us/videos/themes/mindstorms/how-to-reset-the-ev3-p-brick-fbcbdbed398e4e12a7ce30fa662c54be) video to see how to do a reset.
If you try a reset and the **@drivename@** drive still doesn't appear, or you attempted a download and it didn't copy to the brick, you might need a firmware update.
## What's a firmware update and how do I get one?
Firmware is the software that runs all the basic operations on your brick. Your programs run with the firmware to make the @boardname@ do all the things you want it to do. Your brick comes with the firmware already installed. You could have a brick with an older version of firmware that needs updating in order for it to work properly with MakeCode.
To update your firmware, follow these instructions: [Updating and Resetting Firmware](https://www.lego.com/en-us/service/help/products/themes-sets/mindstorms/updating-and-resetting-lego-mindstorms-ev3-firmware-408100000007884).
### ~hint
**Offline firmware update**
If your @boardname@ isn't connected to the internet through a computer, or with some other mobile device, you'll need to do a manual update of the firmware. You need to have the firmware file already downloaded and available on the computer connected to the brick.
To do this, read the instructions in the **Manual Firmware Update** section of the [Firmware Update](https://education.lego.com/en-us/support/mindstorms-ev3/firmware-update) support page.
### ~
## LEGO Support
If you've checked everything here and can't get the **@drivename@** drive to show up on your computer, you can't make the brick reset, or your program just won't download, then try the [Troubleshooting Walkthrough](https://www.lego.com/en-us/service/help/products/themes-sets/mindstorms/lego-mindstorms-ev3-troubleshooting-walkthrough-408100000009798).
You can also find more help at [LEGO Support](https://www.lego.com/en-us/mindstorms/support).

View File

@ -7,13 +7,13 @@ Step by step guides to coding your @boardname@.
```codecard
[{
"name": "Wake Up!",
"description": "Show different moods on your @boardname@. Is it tired, sleepy, or awake?",
"description": "Show different moods on the screen. Is it tired, sleepy, or awake?",
"cardType": "tutorial",
"url":"/tutorials/wake-up",
"imageUrl":"/static/tutorials/wake-up.png"
}, {
"name": "Make An Animation",
"description": "Create a custom animation for your @boardname@.",
"description": "Create a custom animation on your brick screen.",
"cardType": "tutorial",
"url":"/tutorials/make-an-animation",
"imageUrl":"/static/tutorials/make-an-animation.png"
@ -25,10 +25,10 @@ Step by step guides to coding your @boardname@.
"imageUrl":"/static/tutorials/what-animal-am-i.png"
}, {
"name": "Music Brick",
"description": "Transform your @boardname@ into a musical instrument!",
"description": "Transform the brick into a musical instrument!",
"cardType": "tutorial",
"url":"/tutorials/mindstorms-music",
"imageUrl":"/static/tutorials/mindstorms-music.png"
"url":"/tutorials/music-brick",
"imageUrl":"/static/tutorials/music-brick.png"
}]
```
@ -97,3 +97,30 @@ Step by step guides to coding your @boardname@.
"imageUrl":"/static/tutorials/object-near.png"
}]
```
## Infrared Sensor
```codecard
[{
"name": "Security Alert",
"description": "Build an security alert using the infrared sensor.",
"cardType": "tutorial",
"url":"/tutorials/security-alert",
"imageUrl":"/static/tutorials/security-alert.png"
}]
```
## See Also
[Wake Up!](/tutorials/wake-up),
[Make An Animation](/tutorials/make-an-animation),
[What Animal Am I?](/tutorials/what-animal-am-i),
[Music Brick](/tutorials/music-brick),
[Run Motors](/tutorials/run-motors),
[Touch to Run](/tutorials/touch-to-run),
[Touch Sensor Values](/tutorials/touch-sensor-values),
[What Color?](/tutorials/what-color),
[Line Following](/tutorials/line-following),
[Red Light, Green Light](/tutorials/redlight-greenlight),
[Object Near?](/tutorials/object-near),
[Security Alert](/tutorials/security-alert)

View File

@ -4,7 +4,7 @@
Transform your @boardname@ into a musical instrument!
![Press my buttons message](/static/tutorials/mindstorms-music/press-my-buttons.png)
![Press my buttons message](/static/tutorials/music-brick/press-my-buttons.png)
## Step 1
@ -23,7 +23,7 @@ In the ``||brick:show string||`` block, type the text ``"Press my buttons to mak
brick.showString("Press my buttons to make music!", 1)
```
# Step 3
## Step 3
Open the ``||brick:Brick||`` Toolbox drawer. From the **Buttons** section, drag out an ``||brick:on button||`` block onto the Workspace (you can put it anywhere).
@ -53,7 +53,7 @@ brick.showString("Press my buttons to make music!", 1)
In the ``||music:play tone||`` blocks, use the drop-down menu to select a note to play for each block. You can also set the duration to play each note for.
![Tone selector keyboard](/static/tutorials/mindstorms-music/play-tone-dropdown.png)
![Tone selector keyboard](/static/tutorials/music-brick/play-tone-dropdown.png)
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {

View File

@ -0,0 +1,105 @@
# Security Alert
## Introduction @fullscreen
The Infrared Sensor uses infrared light waves to detect proximity to the robot. Build an security alert using the infrared sensor.
![Brick in simulator with infrared sensor](/static/tutorials/security-alert/security-alert.gif)
## Step 1
Open the ``||sensors:Sensors||`` Toolbox drawer. Drag out an ``||sensors:on infrared||`` block onto the Workspace (you can place this anywhere). Use the second drop-down menu to select ``detected``.
![Sensor detect method dropdown selections](/static/tutorials/security-alert/detect-method-dropdown.png)
```blocks
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
})
```
## Step 2
Open the ``||brick:Brick||`` Toolbox drawer. From the **Screen** section, drag out a ``||brick:show image||`` block onto the Workspace, and drop it into the ``||sensors:on infrared||`` block.
```blocks
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
brick.showImage(images.expressionsBigSmile)
})
```
## Step 3
In the ``||brick:show image||`` block, use the drop-down menu to select the **STOP** sign image.
![Screen image selections](/static/tutorials/security-alert/show-image-dropdown.png)
```blocks
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
brick.showImage(images.informationStop1)
})
```
## Step 4
Open the ``||brick:Brick||`` Toolbox drawer. From the **Buttons** section, drag out a ``||brick:set status light||`` block onto the Workspace, and drop it after the ``||brick:show image||`` block.
```blocks
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
brick.showImage(images.informationStop1)
brick.setStatusLight(StatusLight.Orange)
})
```
## Step 5
In the ``||brick:set status light||`` block, use the drop-down menu to select the ``red flash`` light
![Status light selection dropdown list](/static/tutorials/security-alert/set-status-light-dropdown.png)
```blocks
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
brick.showImage(images.informationStop1)
brick.setStatusLight(StatusLight.RedFlash)
})
```
## Step 6
Open the ``||loops:Loops||`` Toolbox drawer. Drag a ``||loops:repeat||`` loop onto the Workspace, and drop it after the ``||brick:set status light||`` block.
```blocks
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
brick.showImage(images.informationStop1)
brick.setStatusLight(StatusLight.RedFlash)
for (let i = 0; i < 4; i++) {
}
})
```
## Step 7
Open the ``||music:Music||`` Toolbox drawer. Drag a ``||music:play sound effect until done||`` block onto the Workspace, and drop it into the ``||loops:repeat||`` loop.
```blocks
sensors.infrared1.onEvent(InfraredSensorEvent.ObjectDetected, function () {
brick.showImage(images.informationStop1)
brick.setStatusLight(StatusLight.RedFlash)
for (let i = 0; i < 4; i++) {
music.playSoundEffectUntilDone(sounds.animalsCatPurr)
}
})
```
## Step 8
In the ``||music:play sound effect until done||`` block, use the drop-down menu to select ``information error alarm`` sound effect.
![Sound effect dropdown selections](/static/tutorials/security-alert/play-sound-effect-dropdown.png)
## Step 9
Now, plug your @boardname@ into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.
Attach an Infrared Sensor to Port 1 of your brick. Test your program by putting an object increasingly closer to the Infrared Sensor your Intruder Alert should trigger when you get too close!

View File

@ -36,7 +36,7 @@ sensors.touch1.onEvent(ButtonEvent.Released, function () {
## Step 3
Open the ``||motors:Motors||`` Toolbox drawer. Drag out a ``||motors:run||`` block onto the Workspace, and drop it into the ``||brick:on touch pressed||`` block.
Open the ``||motors:Motors||`` Toolbox drawer. Drag out a ``||motors:run||`` block onto the Workspace, and drop it into the ``||sensors:on touch pressed||`` block.
```blocks
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {

View File

@ -406,7 +406,7 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC
let opts = {};
let conts = {};
let vals = {};
for (let opt in options) {
for (let opt = 0; opt < options.length; opt++) {
let text = options[opt][0].alt ? options[opt][0].alt : options[opt][0];
if (text.indexOf(' ') == -1) {
// Patch dual motors as they don't have prefixes.

View File

@ -2,7 +2,7 @@
/// <reference path="../node_modules/pxt-core/built/pxtblocks.d.ts"/>
/// <reference path="../node_modules/pxt-core/built/pxtsim.d.ts"/>
export interface FieldPortsOptions extends Blockly.FieldCustomDropdownOptions {
export interface FieldPortsOptions extends pxtblockly.FieldImagesOptions {
columns?: string;
width?: string;
}
@ -11,7 +11,7 @@ export class FieldPorts extends pxtblockly.FieldImages implements Blockly.FieldC
public isFieldCustom_ = true;
constructor(text: string, options: FieldPortsOptions, validator?: Function) {
super(text, options, validator);
super(text, { sort: true, data: options.data }, validator);
this.columns_ = parseInt(options.columns) || 4;
this.width_ = parseInt(options.width) || 300;
@ -24,11 +24,6 @@ export class FieldPorts extends pxtblockly.FieldImages implements Blockly.FieldC
trimOptions_() {
}
getOptions() {
const options = super.getOptions();
return options ? options.sort() : undefined;
}
protected buttonClick_ = function (e: any) {
let value = e.target.getAttribute('data-value');
this.setValue(value);

View File

@ -0,0 +1,209 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg10"
width="236.9"
height="56.7"
version="1.1"
sodipodi:docname="lego-logo-white.svg"
inkscape:export-filename="C:\gh\pxt-ev3\docs\static\lego_education_logo_white.png"
inkscape:export-xdpi="138.33701"
inkscape:export-ydpi="138.33701"
inkscape:version="0.92.1 r15371">
<metadata
id="metadata54">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="837"
id="namedview52"
showgrid="false"
inkscape:zoom="4.8374843"
inkscape:cx="118.45"
inkscape:cy="28.35"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg10" />
<defs
id="defs14">
<clipPath
id="clipPath26">
<path
d="M332 275.6h177.7v42.5H332z"
id="path24" />
</clipPath>
<clipPath
id="clipPath76">
<path
d="M332 275.6h177.7v42.5H332z"
id="path74" />
</clipPath>
</defs>
<g
id="g18"
transform="matrix(1.33333 0 0 -1.33333 0 56.7)"
inkscape:export-xdpi="138.33701"
inkscape:export-ydpi="138.33701">
<g
id="g130"
transform="translate(-332 -275.6)">
<g
id="g20">
<g
clip-path="url(#clipPath26)"
id="g22">
<g
transform="translate(387.6 297.7)"
id="g28">
<path
id="path30"
d="M0 0h6.3c0 1.4-.2 2.2-.5 2.6-.4.3-1.3.5-2.7.5C1.7 3 .8 2.9.5 2.5.2 2 0 1.3 0 0m6.3-4.1h3.4c0-2-.6-3.3-1.8-4-.8-.4-2.4-.6-4.8-.6-2.6 0-4.4.5-5.3 1.6-.8 1-1.2 2.8-1.2 5.5S-3 3-2.2 4C-1.4 5.1.4 5.7 3 5.7 6 5.7 7.8 5 8.6 4c.7-1 1.1-3 1.1-6.2H0c0-1.7.1-2.7.4-3.2.4-.6 1.3-.8 2.7-.8 1.2 0 2 0 2.3.2.6.3 1 .9 1 1.8"
fill="#fff" />
</g>
<g
transform="translate(406.4 300.7)"
id="g32">
<path
id="path34"
d="M0 0c-1.4 0-2.2-.4-2.6-1.1a7 7 0 0 1-.5-3c0-2 .2-3.3.4-3.8.4-.9 1.3-1.3 2.7-1.3 1.6 0 2.6.4 3 1.2.3.6.4 1.8.4 3.8a7 7 0 0 1-.5 3.1C2.4-.4 1.5 0 0 0m3.4-11.7v2.2C2.7-11 1.2-11.8-1-11.8c-2.4 0-4 .7-4.7 2.2-.5 1-.7 2.7-.7 5.4 0 2.3.3 4 .9 5C-4.8 2-3.3 2.5-1 2.5s3.7-.7 4.2-2h.2v7.9h3.3v-20.2z"
fill="#fff" />
</g>
<g
transform="translate(428.8 289)"
id="g36">
<path
id="path38"
d="M0 0h-3.3v2.2C-4 .6-5.6-.1-7.9-.1c-3.2 0-4.8 1.3-4.8 4v10.2h3.4V5.2c0-1 .1-1.8.4-2.1.3-.4 1-.7 2-.7 1.2 0 2.1.3 2.6.9.5.5.8 1.4.8 2.7v8H0z"
fill="#fff" />
</g>
<g
transform="translate(441 294.4)"
id="g40">
<path
id="path42"
d="M0 0h3.4c0-2.3-.5-3.8-1.6-4.6-.8-.6-2.4-1-4.8-1-2.7 0-4.4.6-5.2 1.7-.8 1-1.1 2.8-1.1 5.6 0 2.7.3 4.5 1 5.4C-7.3 8.3-5.6 9-3 9c2.3 0 3.9-.3 4.8-1 1-.6 1.6-2 1.6-4.1H0c0 1-.2 1.8-.7 2-.4.4-1.2.5-2.3.5-1.4 0-2.3-.3-2.6-1-.2-.5-.4-1.7-.4-3.6 0-2 .1-3.2.4-3.6.3-.7 1.2-1 2.6-1 1.3 0 2 .1 2.4.5.4.3.6 1.1.6 2.4"
fill="#fff" />
</g>
<g
transform="translate(452.8 295.4)"
id="g44">
<path
id="path46"
d="M0 0c-1.1 0-1.8 0-2.2-.2-.6-.3-1-1-1-1.8 0-1 .3-1.6.8-1.8.4-.3 1.2-.4 2.4-.4 1.1 0 1.8.1 2.2.3.6.3 1 1 1 1.9 0 .9-.4 1.4-1 1.7A6 6 0 0 1 0 0m3.1-6.3l.1 1.7c-.3-.8-1-1.3-1.9-1.6-.5-.2-1.4-.3-2.5-.3-1.8 0-3.1.3-4 .9C-6-5-6.4-3.8-6.4-2-6.5-.3-6 .8-5 1.5c.7.5 2 .8 3.8.8 1.1 0 2 0 2.5-.2C2 1.8 2.7 1.4 3 .7h.1v1.8c0 1.2-.1 2-.4 2.4-.4.5-1.3.7-2.6.7-.9 0-1.5 0-1.9-.3-.5-.3-.7-.8-.7-1.7H-6c0 1.9.6 3.1 1.8 3.7.8.4 2.2.6 4.2.6 2.4 0 4-.3 4.9-1 1-.7 1.5-2.2 1.5-4.4v-8.8z"
fill="#fff" />
</g>
<g
transform="translate(460.9 300.6)"
id="g48">
<path
id="path50"
d="M0 0v2.6h1.8v3.2H5V2.6h5.5V0H5v-7.2c0-.7 0-1.2.2-1.4.2-.3.6-.5 1.3-.5.8 0 1.3.3 1.5 1l.2 2h3c0-2-.3-3.4-.8-4.2-.7-.9-2-1.4-3.9-1.4-1.8 0-3 .3-3.7.9-.8.6-1.1 1.8-1.1 3.6V0z"
fill="#fff" />
</g>
<path
id="path52"
d="M478.2 289h-3.4v14.2h3.4zm0 17.3h-3.4v3h3.4z"
fill="#fff" />
<g
transform="translate(487.5 300.7)"
id="g54">
<path
id="path56"
d="M0 0c-1.4 0-2.4-.3-2.8-1-.3-.4-.5-1.7-.5-3.6 0-2 .2-3.2.5-3.7.4-.6 1.3-1 2.8-1 1.5 0 2.4.4 2.8 1 .3.5.5 1.7.5 3.7S3-1.4 2.8-1C2.4-.3 1.5 0 0 0m0 2.6C2.8 2.6 4.7 2 5.5 1c.8-.9 1.1-2.7 1.1-5.6 0-2.9-.3-4.8-1-5.6-1-1-2.8-1.6-5.6-1.6s-4.7.5-5.5 1.6c-.8.8-1.1 2.7-1.1 5.6 0 2.9.3 4.7 1 5.6 1 1 2.8 1.6 5.6 1.6"
fill="#fff" />
</g>
<g
transform="translate(497 303.2)"
id="g58">
<path
id="path60"
d="M0 0h3.4v-2.1A3 3 0 0 0 5.3-.2C6 0 6.7 0 8 0c1.8 0 3-.3 3.8-1 .7-.9 1-2.1 1-4v-9H9.4v9c0 1-.2 1.7-.6 2-.3.5-1 .7-2 .7-1.4 0-2.4-.4-2.8-1-.4-.6-.6-1.5-.6-3V-14H0z"
fill="#fff" />
</g>
<path
id="path62"
d="M384.5 316.4h125.2v1.7H384.5z"
fill="#006cb6" />
<path
id="path64"
d="M384.5 275.6H471v1.7h-86.5z"
fill="#006cb6" />
<path
id="path66"
d="M482.3 275.6h27.4v1.7h-27.4z"
fill="#006cb6" />
</g>
</g>
<path
id="path68"
d="M332.3 275.9h42v42h-42z"
fill="#fff" />
<g
id="g70">
<g
clip-path="url(#clipPath76)"
id="g72">
<g
transform="translate(371.5 300.4)"
id="g78">
<path
id="path80"
d="M0 0c0-1.3-.5-3-.9-4C-2.3-8.4-4-11.1-8-11.1c-1.2 0-3.2.3-4 2.4l-.2.5-.3-.5a6.5 6.5 0 0 0-5-2.4c-1.6 0-2.8.5-3.6 1.4l-.2.3-.2-.3c-.8-.9-2.3-1.4-4-1.4-1.4 0-2.5.4-3.3 1.3l-.2.2-.2-.2c-.8-.9-2.2-1.3-3.9-1.3-2 0-3.2 1.2-3.3 3 0 3 2.7 9 3.9 10.8a3.4 3.4 0 0 0 3.1 1.8c1 0 1.6-.2 2-.6.3-.4.4-.7.4-1.4v-1l.5.9c1.2 2 3.3 2.2 5.3 2.2 1.3 0 2.6-.5 3-1.3l.2-.3.3.2a6 6 0 0 0 4 1.4c1.8 0 3.1-.5 3.9-1.3l.4-.7.2-.4.3.3c1.1 1.4 2.6 2 4.5 2 1.5 0 2.6-.4 3.4-1.2C0 2.3 0 1 0 0m-39.2-24.5h42v42h-42z"
fill="#ffed00" />
</g>
<g
transform="translate(372.7 298.8)"
id="g82">
<path
id="path84"
d="M0 0a24 24 0 0 0-1.8-5.5c-1.4-3-3.4-5.3-7.2-5.3-2 0-3.7.6-4.7 1.8a7.6 7.6 0 0 0-5-1.9 6 6 0 0 0-3.8 1.2 7.3 7.3 0 0 0-7.7 0 7 7 0 0 0-4-1.1C-37-10.8-39-9-39-6.5c0 3.3 2.7 9.4 4 11.5a5 5 0 0 0 4.4 2.4c2 0 2.7-.5 3-1.3 1.6 1.4 3.6 1.4 5 1.4 1.7 0 2.7-.4 3.5-1 1.2.6 2.6 1 4.2 1 2 0 3.6-.5 4.7-1.5a7 7 0 0 0 4.6 1.5c2.3 0 3.8-.9 4.7-2.1C.5 3.6.2 1.9 0 0m-40.3-22.9h42v42h-42z"
fill="#e20614" />
</g>
<path
id="path86"
d="M374 276.2h-41.4v41.3H374zm-42-.6h42.6v42.5H332z"
fill="#1c1c1b" />
<g
transform="translate(372.7 306.3)"
id="g88">
<path
id="path90"
d="M0 0a1 1 0 0 1-1-1c0-.6.4-1 1-1s1 .4 1 1C1-.5.6 0 0 0m0-.2a.8.8 0 1 0 0-1.6.8.8 0 0 0 0 1.6m.5-1.4l-.1.3-.2.2.3.3c0 .2-.2.3-.4.3h-.5v-1h.2v.4H0l.2-.3v-.2zm-.7.7v.2H0l.2-.1L0-.9z"
fill="#1c1c1b" />
</g>
<g
transform="translate(367.4 300.5)"
id="g92">
<path
id="path94"
d="M0 0c0-1-1.6-5.4-2.2-6.4-.2-.4-.5-.7-1-.7s-.6.3-.7.6c0 1 1.8 6 2.4 6.7.3.4.6.5 1 .5C0 .7 0 .3 0 0m2.9-1.8c-.4-1.8-1.2-3.9-2-5.5-1.5-2.6-3.2-3-4.8-3-1.5 0-3.2.7-3.2 3 0 1.7.7 4 1.3 5.7 1 2.8 2.2 5.1 5.7 5 4 0 3.3-3.6 3-5.2m-13 2.5c-.5 0-.9-.3-1.2-.7-.6-1-2-4.5-2.2-6-.1-1 .3-1.1.8-1.1.7 0 1.6.8 1.9 2.1 0 0-1.5 0-1 1.3.3 1.3 1 1.5 2.2 1.6 2.4 0 2.2-1.7 2-2.6-.6-3-2.8-5.5-5.9-5.5-2 0-3.4 1.1-3.4 3.3 0 1.5.8 3.9 1.4 5.3 1.3 3 2.6 5 6 5 2 0 3.7-.7 3.5-2.6-.2-1.4-1-2.2-2.2-2.3-.4 0-1.8 0-1.3 1.4.1.5.2.8-.5.8m-10.7-5.2l-.6-2a7 7 0 0 0 2 .2c1.1 0 1.8-.4 1.8-1.3 0-2-2.3-2.6-3.9-2.6-1.7 0-3.2 1-3.2 2.8A21 21 0 0 0-22.3.4c1.4 2.8 2.8 3.1 5.2 3.1 1.1 0 2.3-.4 2.3-1.4 0-1.4-1.2-2-2.3-2H-19s-.4-.6-.8-1.7c2.2.3 3.1-.2 2.8-1.5-.5-1.7-2-1.8-3.8-1.4m-7-2c2.2.4 2.7-.4 2.6-1.1-.2-2.2-2.1-2.6-3.8-2.6-1.2 0-2.3.6-2.4 2 0 2.5 2.5 8.3 3.7 10.2.6 1 1.3 1.4 2.3 1.4 1 0 1.3-.5 1.3-1.1 0-1.7-2.8-6.8-3.6-8.8M-.3 4.7a6 6 0 0 1-4.7-2l-.5.7c-.9 1-2.2 1.4-4 1.4-1.8 0-3.3-.6-4.3-1.4-.5.8-1.8 1.4-3.3 1.4-2 0-4.2-.3-5.5-2.4 0 .8-.1 1.2-.5 1.6-.6.6-1.4.7-2.2.7-1.5 0-2.6-.6-3.4-2-1.1-1.8-4-7.9-3.9-10.8 0-2 1.3-3.3 3.6-3.4 1.8 0 3.2.5 4.1 1.4.8-.9 2-1.4 3.5-1.4 1.6 0 3.2.5 4.2 1.6.8-1 2.1-1.6 3.8-1.6 2.1 0 4 1 5.2 2.6.7-1.9 2.4-2.6 4.3-2.6 4.1 0 6 2.8 7.4 7.3.4 1 .8 2.7.9 4.1.1 2.4-.9 4.8-4.7 4.8"
fill="#1c1c1b" />
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="141.73"
height="141.731"
viewBox="0 0 141.73 141.73101"
enable-background="new 0 0 265.365 141.732"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="lego-logo.svg"><metadata
id="metadata26"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs24" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1199"
inkscape:window-height="604"
id="namedview22"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="1.6520876"
inkscape:cx="101.03204"
inkscape:cy="98.819336"
inkscape:window-x="372"
inkscape:window-y="149"
inkscape:window-maximized="0"
inkscape:current-layer="g6" /><g
id="product_logo" /><g
id="guides" /><g
id="LEGO_LOGO_SMALL_RGB"><g
id="g6"><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z"
id="path8"
inkscape:connector-curvature="0"
style="fill:#ffffff" /><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z m 130.536,58.127 c -0.23,4.356 -1.617,9.786 -2.839,13.414 -4.917,14.609 -10.618,23.666 -23.821,23.666 -3.887,0 -10.783,-1.031 -13.324,-7.947 l -0.602,-1.641 -1.082,1.371 C 85.7,93.168 79.564,96.186 72.998,96.217 67.96,96.24 63.912,94.553 61.293,91.334 l -0.718,-0.883 -0.765,0.844 c -2.797,3.088 -7.668,4.859 -13.364,4.859 -4.473,0 -8.335,-1.521 -10.876,-4.277 l -0.692,-0.752 -0.72,0.727 c -2.825,2.852 -7.276,4.289 -12.873,4.158 -6.79,-0.162 -10.924,-3.951 -11.058,-10.141 -0.205,-9.543 9.031,-29.622 12.854,-35.727 2.482,-4.078 5.895,-6.055 10.438,-6.055 3.092,0 5.207,0.646 6.463,1.977 1.144,1.211 1.37,2.232 1.472,4.688 l 0.131,3.175 1.676,-2.7 c 4.054,-6.532 10.773,-7.434 17.43,-7.434 4.628,0 8.667,1.702 10.289,4.336 l 0.599,0.971 0.866,-0.737 c 3.431,-2.916 8.271,-4.521 13.629,-4.521 5.849,0 10.099,1.454 12.634,4.322 0.576,0.651 0.957,1.106 1.486,2.219 l 0.651,1.366 0.977,-1.155 c 3.712,-4.39 8.779,-6.615 15.067,-6.615 4.98,0 8.761,1.324 11.235,3.935 3.104,3.271 3.547,7.875 3.373,11.161 z"
id="path10"
inkscape:connector-curvature="0"
style="fill:#f6ec36" /><path
d="m 0.961,0.948 0,139.839 139.84,0 0,-139.839 -139.84,0 z M 135.435,64.44 c -0.633,5.089 -4.072,14.518 -5.899,18.286 -4.903,10.102 -11.453,17.863 -24.074,17.863 -6.742,0 -12.288,-2.15 -15.531,-6.283 -4.749,4.162 -10.627,6.342 -16.956,6.342 -4.876,0 -9.185,-1.408 -12.471,-4.012 -3.626,2.555 -8.52,3.98 -13.943,3.98 -4.53,0 -8.606,-1.244 -11.796,-3.543 -3.529,2.342 -8.154,3.506 -13.583,3.377 C 12.149,100.237 5.912,94.507 5.733,86.188 5.497,75.137 14.803,54.911 19.189,47.907 c 3.282,-5.392 8.292,-8.293 14.431,-8.293 6.663,0 9.078,1.903 10.267,4.326 5.141,-4.366 11.956,-4.617 16.808,-4.617 5.356,0 8.717,1.422 11.575,3.697 3.948,-2.368 8.477,-3.599 13.871,-3.599 6.897,0 12.021,1.604 15.595,5.137 4.168,-3.469 9.388,-5.05 15.23,-5.05 7.725,0 12.808,2.786 15.793,6.94 4.203,5.859 3.451,11.757 2.676,17.992 z"
id="path12"
inkscape:connector-curvature="0"
style="fill:#d01012" /><path
d="m 0,0 0,141.731 141.73,0 L 141.73,0 0,0 Z m 139.781,1.952 0,137.832 -137.83,0 0,-137.832 137.83,0 z"
id="path14"
inkscape:connector-curvature="0" /><path
d="m 134.752,42.53 0,-0.965 0.655,0 c 0.479,0 0.728,0.168 0.728,0.479 0,0.247 -0.16,0.486 -0.647,0.486 l -0.736,0 z m 2.351,2.002 -0.408,-0.708 c -0.354,-0.619 -0.452,-0.717 -0.755,-0.823 l 0,-0.019 c 0.596,-0.07 0.95,-0.453 0.95,-0.983 0,-0.56 -0.354,-0.984 -1.109,-0.984 l -1.754,0 0,3.519 0.727,0 0,-1.441 0.133,0 c 0.311,0 0.435,0.035 0.576,0.176 0.142,0.144 0.354,0.443 0.479,0.69 l 0.284,0.575 0.877,-0.002 0,0 z m -1.731,-4.497 c 1.51,0 2.737,1.218 2.737,2.726 0,1.508 -1.229,2.731 -2.737,2.731 -1.506,0 -2.72,-1.225 -2.72,-2.731 0,-1.506 1.214,-2.726 2.72,-2.726 z m 0,-0.67 c -1.877,0 -3.392,1.516 -3.392,3.396 0,1.879 1.515,3.394 3.392,3.394 1.883,0 3.397,-1.515 3.397,-3.394 0.002,-1.882 -1.514,-3.396 -3.397,-3.396 z"
id="path16"
inkscape:connector-curvature="0" /><path
d="m 116.889,43.002 c -7.325,0 -12.386,2.904 -15.812,6.961 -0.579,-1.214 -1.019,-1.746 -1.638,-2.447 -2.805,-3.17 -7.313,-4.649 -13.364,-4.649 -5.912,0 -10.841,1.846 -14.263,4.754 -1.777,-2.89 -6.013,-4.803 -11.121,-4.803 -6.674,0 -13.946,0.944 -18.261,7.896 -0.104,-2.503 -0.33,-3.828 -1.737,-5.317 -1.71,-1.81 -4.477,-2.282 -7.173,-2.282 -4.912,0 -8.605,2.146 -11.266,6.515 -3.859,6.163 -13.212,26.441 -13.001,36.263 0.137,6.344 4.393,10.916 12.01,11.096 5.952,0.143 10.62,-1.449 13.59,-4.447 2.665,2.896 6.731,4.594 11.596,4.594 5.417,0 10.868,-1.627 14.088,-5.182 2.712,3.332 6.979,5.271 12.468,5.244 7.175,-0.035 13.477,-3.438 17.593,-8.652 2.259,6.148 7.985,8.59 14.241,8.59 13.709,0 19.729,-9.428 24.748,-24.332 1.13,-3.357 2.639,-8.963 2.889,-13.672 0.413,-7.839 -2.903,-16.13 -15.587,-16.13 z M 25.672,80.477 c 7.093,-1.232 8.876,1.332 8.653,3.707 -0.669,7.109 -7.191,8.699 -12.854,8.566 -4.107,-0.1 -7.8,-1.98 -7.903,-6.748 -0.18,-8.342 8.328,-27.641 12.333,-34.038 1.85,-3.037 4.104,-4.539 7.698,-4.539 3.406,0 4.25,1.749 4.2,3.844 -0.134,5.589 -9.164,22.574 -12.127,29.208 z M 48.77,73.925 c -0.469,1.27 -1.357,3.93 -2.076,6.75 2.328,-0.582 4.074,-0.986 7.065,-0.914 3.408,0.084 5.586,1.496 5.586,4.314 0,6.832 -7.551,8.838 -12.789,8.838 -5.751,0 -10.803,-3.275 -10.803,-9.564 0,-7.373 3.997,-18.553 7.748,-26.001 4.606,-9.146 9.312,-10.362 17.419,-10.362 3.562,0 7.667,1.524 7.667,4.888 0,4.662 -3.95,6.44 -7.866,6.665 -1.672,0.096 -4.246,0.188 -5.786,0.079 0,0 -1.303,1.985 -2.688,5.523 7.252,-1.021 10.327,0.625 9.103,4.82 -1.657,5.667 -6.567,6.04 -12.58,4.964 z M 84.438,56.293 c -1.961,0 -3.244,1.242 -4.198,2.583 -2.102,2.952 -6.656,14.781 -7.365,19.64 -0.486,3.328 0.951,4.006 2.522,4.006 2.52,0 5.345,-2.666 6.309,-7.064 0,0 -4.797,-0.117 -3.475,-4.371 1.285,-4.128 3.723,-5.022 7.764,-5.188 7.961,-0.325 7.175,5.553 6.538,8.688 -2.069,10.18 -9.314,18.355 -19.562,18.355 -7.016,0 -11.371,-3.881 -11.371,-11.035 0,-5.098 2.529,-13.101 4.534,-17.784 4.267,-9.968 8.742,-16.944 20.143,-16.944 6.84,0 12.235,2.458 11.444,8.866 -0.58,4.703 -2.934,7.465 -7.21,7.799 -1.196,0.093 -6.089,-0.031 -4.466,-4.66 0.565,-1.619 0.799,-2.891 -1.607,-2.891 z m 43.057,8.413 c -1.205,6.002 -3.916,13.101 -6.859,18.392 -4.801,8.633 -10.633,9.842 -15.723,9.781 -5.093,-0.061 -10.83,-1.941 -10.874,-9.795 -0.031,-5.639 2.401,-13.598 4.466,-18.815 3.599,-9.458 7.277,-17.17 18.904,-17.031 13.559,0.161 11.141,12.219 10.086,17.468 z M 115.993,56.49 c -1.164,-0.016 -2.18,0.212 -3.093,1.62 -2.051,2.657 -8.047,19.042 -7.941,22.31 0.038,1.174 0.687,2.201 2.133,2.201 1.659,0.002 2.581,-1.145 3.396,-2.529 1.887,-3.193 7.193,-17.676 7.339,-21.297 0.043,-1.055 -0.133,-2.284 -1.834,-2.305 z"
id="path18"
inkscape:connector-curvature="0" /></g></g></svg>

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -232,11 +232,17 @@ namespace sensors {
return this.getNumber(NumberFormat.UInt8LE, 0)
}
/**
* Gets the ambient light
*/
//%
ambientLight() {
return this.light(LightIntensityMode.Ambient);
}
/**
* Gets the reflected light value
*/
//%
reflectedLight() {
return this.light(LightIntensityMode.Reflected);
@ -245,14 +251,19 @@ namespace sensors {
/**
* Set a threshold value
* @param condition the dark or bright light condition
* @param value the value threshold
* @param value the value threshold, eg: 10
*/
//% blockId=colorSetThreshold block="set **color sensor** %this|%condition|to %value"
//% group="Threshold" blockGap=8 weight=90
//% group="Calibration" blockGap=8 weight=90
//% value.min=0 value.max=100
//% this.fieldEditor="ports"
//% help=sensors/color-sensor/set-threshold
setThreshold(condition: Light, value: number) {
// threshold is used in ambient or reflected modes
if (this.mode != LightIntensityMode.Ambient &&
this.mode != LightIntensityMode.Reflected)
this.setMode(ColorSensorMode.ReflectedLightIntensity);
if (condition == Light.Dark)
this.thresholdDetector.setLowThreshold(value)
else
@ -264,18 +275,23 @@ namespace sensors {
* @param condition the light condition
*/
//% blockId=colorGetThreshold block="**color sensor** %this|%condition"
//% group="Threshold" blockGap=8 weight=89
//% group="Calibration" weight=89
//% this.fieldEditor="ports"
//% help=sensors/color-sensor/threshold
threshold(condition: Light): number {
return this.thresholdDetector.threshold(<ThresholdState><number>Light.Dark);
// threshold is used in ambient or reflected modes
if (this.mode != LightIntensityMode.Ambient &&
this.mode != LightIntensityMode.Reflected)
this.setMode(ColorSensorMode.ReflectedLightIntensity);
return this.thresholdDetector.threshold(<ThresholdState><number>condition);
}
/**
* Collects measurement of the light condition and adjusts the threshold to 10% / 90%.
*/
//% blockId=colorCalibrateLight block="calibrate **color sensor** %this|for %mode"
//% group="Threshold" weight=91 blockGap=8
//% group="Calibration" weight=91 blockGap=8
//% this.fieldEditor="ports"
//% help=sensors/color-sensor/calibrate-light
calibrateLight(mode: LightIntensityMode, deviation: number = 8) {

View File

@ -298,6 +298,23 @@ namespace motors {
pauseUntilReady(timeOut?: number) {
pauseUntil(() => this.isReady(), timeOut);
}
protected setOutputType(large: boolean) {
/*
Instruction opOutput_Set_Type (LAYER, NO, TYPE)
Opcode 0xA1 Arguments (Data8) LAYER Specify chain layer number [0 - 3]
(Data8) NO Port number [0 - 3]
(Data8) TYPE Output device type, (0x07: Large motor, Medium motor = 0x08) Dispatch status Unchanged
Description This function enables specifying the output device type
*/
for (let i = 0; i < DAL.NUM_OUTPUTS; ++i) {
if (this._port & (1 << i)) {
const b = mkCmd(i, DAL.opOutputSetType, 1)
b.setNumber(NumberFormat.Int8LE, 2, large ? 0x07 : 0x08)
writePWM(b)
}
}
}
}
//% fixedInstances
@ -316,11 +333,8 @@ namespace motors {
motors.__motorUsed(this._port, this._large);
}
private __init() {
// specify motor size on this port
const b = mkCmd(outOffset(this._port), DAL.opOutputSetType, 1)
b.setNumber(NumberFormat.Int8LE, 2, this._large ? 0x07 : 0x08)
writePWM(b)
private __init() {
this.setOutputType(this._large);
}
private __setSpeed(speed: number) {
@ -453,13 +467,7 @@ namespace motors {
}
private __init() {
for (let i = 0; i < DAL.NUM_OUTPUTS; ++i) {
if (this._port & (1 << i)) {
const b = mkCmd(outOffset(1 << i), DAL.opOutputSetType, 1)
b.setNumber(NumberFormat.Int8LE, 2, 0x07) // large motor
writePWM(b)
}
}
this.setOutputType(true);
}
private __setSpeed(speed: number) {

View File

@ -8,7 +8,7 @@ namespace brick {
//% color="#C8509B" weight=95 icon="\uf10f"
//% labelLineWidth=100
//% groups='["Touch Sensor", "Color Sensor", "Ultrasonic Sensor", "Gyro Sensor", "Infrared Sensor", "Remote Infrared Beacon", "Threshold"]'
//% groups='["Touch Sensor", "Color Sensor", "Ultrasonic Sensor", "Gyro Sensor", "Infrared Sensor", "Remote Infrared Beacon", "Calibration"]'
namespace sensors {
}

View File

@ -261,7 +261,7 @@ namespace sensors {
* @param value the value threshold
*/
//% blockId=irSetThreshold block="set **infrared** %this|%condition|to %value"
//% group="Threshold" blockGap=8 weight=49
//% group="Calibration" blockGap=8 weight=49
//% value.min=0 value.max=100
//% this.fieldEditor="ports"
setPromixityThreshold(condition: InfraredSensorEvent, value: number) {
@ -276,10 +276,10 @@ namespace sensors {
* @param condition the proximity condition
*/
//% blockId=irGetThreshold block="**infrared** %this|%condition"
//% group="Threshold" blockGap=8 weight=49
//% group="Calibration" weight=49
//% this.fieldEditor="ports"
proximityThreshold(condition: InfraredSensorEvent): number {
return this._proximityThreshold.threshold(<ThresholdState><number>Light.Dark);
return this._proximityThreshold.threshold(<ThresholdState><number>condition);
}
// TODO

View File

@ -22,6 +22,13 @@ namespace _screen_internal {
namespace brick {
const textOffset = 4;
const lineOffset = 2;
enum ScreenMode {
None,
ShowLines,
Image,
Custom
}
let screenMode = ScreenMode.None;
export let font = image.font8;
/**
@ -50,6 +57,11 @@ namespace brick {
//% help=brick/show-string
//% line.min=1 line.max=10
export function showString(text: string, line: number) {
if (screenMode != ScreenMode.ShowLines) {
screenMode = ScreenMode.ShowLines;
screen.fill(0);
}
// line indexing starts at 1.
line = (line - 1) >> 0;
const nlines = lineCount();
@ -98,6 +110,7 @@ namespace brick {
//% help=brick/show-image
export function showImage(image: Image, duration: number = 400) {
if (!image) return;
screenMode = ScreenMode.Image;
screen.fill(0);
screen.drawImage(image, 0, 0);
if (duration > 0)
@ -111,6 +124,8 @@ namespace brick {
//% help=brick/show-ports blockGap=8
//% weight=10 group="Screen"
export function showPorts() {
screenMode = ScreenMode.Custom;
const col = 44;
const lineHeight8 = image.font8.charHeight + 2;
clearScreen();

View File

@ -18,7 +18,7 @@ The distance value returned is the number of centimeters to the object that the
When the ultrasonic sensor on port 4 detects a near object, display its distance on the screen.
```blocks
sensors.ultrasonic4.onEvent(UltrasonicSensorEvent.ObjecNear, function () {
sensors.ultrasonic4.onEvent(UltrasonicSensorEvent.ObjectNear, function () {
brick.showString("Object detected at:", 1)
brick.showNumber(sensors.ultrasonic4.distance(), 2)
brick.showString("centimeters", 3)

View File

@ -96,7 +96,7 @@ namespace sensors {
* @param value the value threshold
*/
//% blockId=ultrasonicSetThreshold block="set **ultrasonic** %this|%condition|to %value"
//% group="Threshold" blockGap=8 weight=80
//% group="Calibration" blockGap=8 weight=80
//% value.min=0 value.max=255
//% this.fieldEditor="ports"
setThreshold(condition: UltrasonicSensorEvent, value: number) {
@ -111,12 +111,12 @@ namespace sensors {
* @param condition the proximity condition
*/
//% blockId=ultrasonicGetThreshold block="**ultrasonic** %this|%condition"
//% group="Threshold" blockGap=8 weight=79
//% group="Calibration" weight=79
//% this.fieldEditor="ports"
threshold(condition: UltrasonicSensorEvent): number {
switch (condition) {
case UltrasonicSensorEvent.ObjectNear: this.promixityThreshold.threshold(ThresholdState.Low); break;
case UltrasonicSensorEvent.ObjectDetected: this.movementThreshold; break;
case UltrasonicSensorEvent.ObjectNear: return this.promixityThreshold.threshold(ThresholdState.Low);
case UltrasonicSensorEvent.ObjectDetected: return this.movementThreshold;
}
return 0;
}

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "pxt-ev3",
"version": "0.1.15",
"version": "0.1.23",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,7 +1,7 @@
{
"name": "pxt-ev3",
"version": "0.1.15",
"description": "LEGO Mindstorms EV3 for Microsoft MakeCode",
"version": "0.1.23",
"description": "LEGO MINDSTORMS EV3 for Microsoft MakeCode",
"private": true,
"keywords": [
"JavaScript",
@ -46,7 +46,7 @@
},
"dependencies": {
"pxt-common-packages": "0.20.38",
"pxt-core": "3.8.6"
"pxt-core": "3.8.14"
},
"scripts": {
"test": "node node_modules/pxt-core/built/pxt.js travis"

View File

@ -2,9 +2,9 @@
"id": "ev3",
"platformid": "linux",
"nickname": "lego",
"name": "LEGO Mindstorms EV3",
"title": "LEGO Mindstorms EV3 - Blocks / Javascript editor",
"description": "A Blocks / JavaScript code editor for the LEGO Mindstorms EV3.",
"name": "LEGO® MINDSTORMS® Education EV3",
"title": "LEGO® MINDSTORMS® Education EV3 - Blocks / Javascript editor",
"description": "A Blocks / JavaScript code editor for the LEGO® MINDSTORMS® Education EV3.",
"corepkg": "ev3",
"bundleddirs": [
"libs/base",
@ -44,7 +44,7 @@
"hasHex": true,
"deployDrives": ".*",
"deployFileMarker": "INFO_UF2.TXT",
"driveName": "LEGO",
"driveName": "EV3",
"flashCodeAlign": 256,
"floatingPoint": true,
"taggedInts": true,
@ -97,7 +97,8 @@
"termsOfUseUrl": "https://go.microsoft.com/fwlink/?LinkID=206977",
"githubUrl": "https://github.com/Microsoft/pxt-ev3",
"betaUrl": "https://makecode.legoeducation.com/about",
"boardName": "LEGO Mindstorms EV3 Brick",
"driveDisplayName": "EV3",
"boardName": "LEGO® MINDSTORMS® Education EV3",
"selectLanguage": true,
"availableLocales": [
"en"

View File

@ -122,10 +122,11 @@ namespace pxsim {
return 2;
}
case DAL.opOutputSetType: {
const port = buf.data[1];
const portIndex = buf.data[1]; // not a port but a port index 0..3
const large = buf.data[2] == 0x07;
const motors = ev3board().getMotor(port);
motors.forEach(motor => motor.setLarge(large));
const motor = ev3board().getMotors()[portIndex];
if (motor)
motor.setLarge(large);
return 2;
}
default:

View File

@ -1,10 +1,46 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 146.25 120.31">
<defs>
<linearGradient id="linear-gradient" x1="-809.89" y1="-16.33" x2="-809.89" y2="-16.88" gradientTransform="translate(53145.53 916.09) scale(65.53 48.84)" gradientUnits="userSpaceOnUse">
<linearGradient id="linear-gradient-background" x1="-809.89" y1="-16.33" x2="-809.89" y2="-16.88" gradientTransform="translate(53145.53 916.09) scale(65.53 48.84)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.52" stop-color="#6a6a6a"/>
<stop offset="1" stop-color="#6a6a6a"/>
</linearGradient>
<linearGradient id="linear-gradient" x1="-374.89" y1="432.9" x2="-374.89" y2="432.82" gradientTransform="matrix(110.73, 0, 0, -106.94, 41567.45, 46425.3)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#f1f1f1"/>
<stop offset="1" stop-color="#7a7a7a"/>
</linearGradient>
<linearGradient id="linear-gradient-2" x1="-376" y1="450.74" x2="-376" y2="450.72" gradientTransform="matrix(100.11, 0, 0, -79.18, 37697.19, 35762.28)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#a8aaa8"/>
<stop offset="1" stop-color="gray"/>
</linearGradient>
<linearGradient id="linear-gradient-3" x1="-376.21" y1="614.94" x2="-376.21" y2="614.75" gradientTransform="matrix(98.29, 0, 0, -23.36, 37033.43, 14529.9)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#a8aaa8"/>
<stop offset="1" stop-color="#535453"/>
</linearGradient>
<linearGradient id="linear-gradient-black" x1="-382.07" y1="493.36" x2="-382.07" y2="494.25" gradientTransform="matrix(65.53, 0, 0, -48.84, 25091.11, 24228.69)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.52" stop-color="#6a6a6a"/>
<stop offset="1" stop-color="#6a6a6a"/>
</linearGradient>
<linearGradient id="linear-gradient-green" x1="0" y1="0" x2="145" y2="48" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.52" stop-color="#8CE300"/>
<stop offset="1" stop-color="#6a6a6a"/>
</linearGradient>
<linearGradient id="linear-gradient-red" x1="0" y1="0" x2="145" y2="48" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.52" stop-color="#D02E26"/>
<stop offset="1" stop-color="#6a6a6a"/>
</linearGradient>
<linearGradient id="linear-gradient-orange" x1="0" y1="0" x2="145" y2="48" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6a6a6a"/>
<stop offset="0.52" stop-color="#F8D039"/>
<stop offset="1" stop-color="#6a6a6a"/>
</linearGradient>
<linearGradient id="linear-gradient-5" x1="-743.87" y1="1256.85" x2="-743.87" y2="1257.21" gradientTransform="matrix(3.03, 0, 0, -6.22, 2312.41, 7891.56)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#757575"/>
<stop offset="1" stop-color="#393939"/>
</linearGradient>
</defs>
<title>EV3Landscape</title>
<g id="EV3">
@ -17,7 +53,7 @@
</g>
<g id="buttons">
<path id="btn_grey" data-name="btn grey" d="M68.9,119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13H57.93a5.13,5.13,0,1,1-.35-10.25h2.47V97.79l8.76-8.94h8.75c3.94,4,8.74,8.75,8.74,8.75v1.32h2a5.13,5.13,0,0,1,.35,10.25H86.3v1.13c-4.66,4.79-8.68,8.84-8.68,8.84Z" style="fill: #6a6a6a"/>
<path id="btn_color" data-name="btn color" d="M68.9,119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13H57.93a5.13,5.13,0,1,1-.35-10.25h2.47V97.79l8.76-8.94h8.75c3.94,4,8.74,8.75,8.74,8.75v1.32h2a5.13,5.13,0,0,1,.35,10.25H86.3v1.13c-4.66,4.79-8.68,8.84-8.68,8.84Z" style="fill: url(#linear-gradient)"/>
<path id="btn_color" data-name="btn color" d="M68.9,119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13H57.93a5.13,5.13,0,1,1-.35-10.25h2.47V97.79l8.76-8.94h8.75c3.94,4,8.74,8.75,8.74,8.75v1.32h2a5.13,5.13,0,0,1,.35,10.25H86.3v1.13c-4.66,4.79-8.68,8.84-8.68,8.84Z" style="fill: url(#linear-gradient-background)"/>
<path id="btn_left" data-name="btn left" d="M57.85,100.14H64.3v7.62H57.85a3.81,3.81,0,0,1-3.8-3.81h0A3.81,3.81,0,0,1,57.85,100.14Z" style="fill: #a8aaa8"/>
<path id="btn_right" data-name="btn right" d="M88.32,107.76H81.88v-7.62h6.44a3.81,3.81,0,0,1,3.81,3.8h0a3.81,3.81,0,0,1-3.81,3.81Z" style="fill: #a8aaa8"/>
<path id="btn_enter" data-name="btn enter" d="M69.37,100.14h7.44a.29.29,0,0,1,.29.28v7.06a.29.29,0,0,1-.29.28H69.37a.29.29,0,0,1-.28-.28v-7.06A.29.29,0,0,1,69.37,100.14Z" style="fill: #393939"/>

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -1,4 +1,4 @@
namespace pxsim.visuals {
export const EV3_LANDSCAPE_SVG = `<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 146.25 120.31"><defs><linearGradient id="linear-gradient" x1="-809.89" y1="-16.33" x2="-809.89" y2="-16.88" gradientTransform="matrix(65.53 0 0 48.84 53145.53 916.09)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6a6a6a"/><stop offset=".52" stop-color="#6a6a6a"/><stop offset="1" stop-color="#6a6a6a"/></linearGradient></defs><g id="EV3"><g id="brick"><path id="ev3_body_2" data-name="ev3 body 2" d="M2.64 0h141a2.47 2.47 0 0 1 2.64 2.25v115.81a2.47 2.47 0 0 1-2.64 2.25h-141A2.47 2.47 0 0 1 0 118.06V2.25A2.47 2.47 0 0 1 2.64 0z" fill="#fff"/><path id="ev3_screenborder" data-name="ev3 screenborder" d="M8.47 1.54h129.31a6.58 6.58 0 0 1 6.58 6.58v72.67a6.6 6.6 0 0 1-6.58 6.6H8.47a6.6 6.6 0 0 1-6.58-6.6V8.12a6.58 6.58 0 0 1 6.58-6.58z" fill="#393939"/><path id="ev3_screen" data-name="ev3 screen" d="M19.06 5.07h106.8a4.6 4.6 0 0 1 4.69 4.52v68.25a4.61 4.61 0 0 1-4.61 4.62H19.06a4.61 4.61 0 0 1-4.61-4.62V9.68a4.6 4.6 0 0 1 4.61-4.61z" fill="#97b5a6"/></g><g id="buttons"><path id="btn_grey" data-name="btn grey" d="M68.9 119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13h-2.13a5.13 5.13 0 1 1-.35-10.25h2.47v-1.13l8.76-8.94h8.75c3.94 4 8.74 8.75 8.74 8.75v1.32h2a5.13 5.13 0 0 1 .35 10.25H86.3v1.13c-4.66 4.79-8.68 8.84-8.68 8.84z" fill="#6a6a6a"/><path id="btn_color" data-name="btn color" d="M68.9 119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13h-2.13a5.13 5.13 0 1 1-.35-10.25h2.47v-1.13l8.76-8.94h8.75c3.94 4 8.74 8.75 8.74 8.75v1.32h2a5.13 5.13 0 0 1 .35 10.25H86.3v1.13c-4.66 4.79-8.68 8.84-8.68 8.84z" fill="url(#linear-gradient)"/><path id="btn_left" data-name="btn left" d="M57.85 100.14h6.45v7.62h-6.45a3.81 3.81 0 0 1-3.8-3.81 3.81 3.81 0 0 1 3.8-3.81z" fill="#a8aaa8"/><path id="btn_right" data-name="btn right" d="M88.32 107.76h-6.44v-7.62h6.44a3.81 3.81 0 0 1 3.81 3.8 3.81 3.81 0 0 1-3.81 3.81z" fill="#a8aaa8"/><path id="btn_enter" data-name="btn enter" d="M69.37 100.14h7.44a.29.29 0 0 1 .29.28v7.06a.29.29 0 0 1-.29.28h-7.44a.29.29 0 0 1-.28-.28v-7.06a.29.29 0 0 1 .28-.28z" fill="#393939"/><path id="btn_up" data-name="btn up" d="M69.19 90.26l7.9-.09L83 96.28l-2.44 2.44v4.42h-2.25v-2.55a1.86 1.86 0 0 0-1.86-1.86h-6.87a1.54 1.54 0 0 0-1.6 1.46v3H65.7v-4.47l-2.44-2.49z" fill="#a8aaa8"/><path id="btn_down" data-name="btn down" d="M77.05 117.65l-7.85.06-5.94-6.1 2.48-2.43v-4.44H68v2.54a1.9 1.9 0 0 0 1.86 1.9h6.82a1.62 1.62 0 0 0 1.65-1.58v-2.86h2.27v4.44l2.4 2.43z" fill="#a8aaa8"/></g></g></svg>`;
export const EV3_LANDSCAPE_SVG = `<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 146.25 120.31"><defs><linearGradient id="linear-gradient-background" x1="-809.89" y1="-16.33" x2="-809.89" y2="-16.88" gradientTransform="matrix(65.53 0 0 48.84 53145.53 916.09)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6a6a6a"/><stop offset=".52" stop-color="#6a6a6a"/><stop offset="1" stop-color="#6a6a6a"/></linearGradient><linearGradient id="linear-gradient" x1="-374.89" y1="432.9" x2="-374.89" y2="432.82" gradientTransform="matrix(110.73 0 0 -106.94 41567.45 46425.3)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f1f1f1"/><stop offset="1" stop-color="#7a7a7a"/></linearGradient><linearGradient id="linear-gradient-2" x1="-376" y1="450.74" x2="-376" y2="450.72" gradientTransform="matrix(100.11 0 0 -79.18 37697.19 35762.28)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a8aaa8"/><stop offset="1" stop-color="gray"/></linearGradient><linearGradient id="linear-gradient-3" x1="-376.21" y1="614.94" x2="-376.21" y2="614.75" gradientTransform="matrix(98.29 0 0 -23.36 37033.43 14529.9)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a8aaa8"/><stop offset="1" stop-color="#535453"/></linearGradient><linearGradient id="linear-gradient-black" x1="-382.07" y1="493.36" x2="-382.07" y2="494.25" gradientTransform="matrix(65.53 0 0 -48.84 25091.11 24228.69)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6a6a6a"/><stop offset=".52" stop-color="#6a6a6a"/><stop offset="1" stop-color="#6a6a6a"/></linearGradient><linearGradient id="linear-gradient-green" x2="145" y2="48" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6a6a6a"/><stop offset=".52" stop-color="#8CE300"/><stop offset="1" stop-color="#6a6a6a"/></linearGradient><linearGradient id="linear-gradient-red" x2="145" y2="48" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6a6a6a"/><stop offset=".52" stop-color="#D02E26"/><stop offset="1" stop-color="#6a6a6a"/></linearGradient><linearGradient id="linear-gradient-orange" x2="145" y2="48" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6a6a6a"/><stop offset=".52" stop-color="#F8D039"/><stop offset="1" stop-color="#6a6a6a"/></linearGradient><linearGradient id="linear-gradient-5" x1="-743.87" y1="1256.85" x2="-743.87" y2="1257.21" gradientTransform="matrix(3.03 0 0 -6.22 2312.41 7891.56)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#757575"/><stop offset="1" stop-color="#393939"/></linearGradient></defs><g id="EV3"><g id="brick"><path id="ev3_body_2" data-name="ev3 body 2" d="M2.64 0h141a2.47 2.47 0 0 1 2.64 2.25v115.81a2.47 2.47 0 0 1-2.64 2.25h-141A2.47 2.47 0 0 1 0 118.06V2.25A2.47 2.47 0 0 1 2.64 0z" fill="#fff"/><path id="ev3_screenborder" data-name="ev3 screenborder" d="M8.47 1.54h129.31a6.58 6.58 0 0 1 6.58 6.58v72.67a6.6 6.6 0 0 1-6.58 6.6H8.47a6.6 6.6 0 0 1-6.58-6.6V8.12a6.58 6.58 0 0 1 6.58-6.58z" fill="#393939"/><path id="ev3_screen" data-name="ev3 screen" d="M19.06 5.07h106.8a4.6 4.6 0 0 1 4.69 4.52v68.25a4.61 4.61 0 0 1-4.61 4.62H19.06a4.61 4.61 0 0 1-4.61-4.62V9.68a4.6 4.6 0 0 1 4.61-4.61z" fill="#97b5a6"/></g><g id="buttons"><path id="btn_grey" data-name="btn grey" d="M68.9 119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13h-2.13a5.13 5.13 0 1 1-.35-10.25h2.47v-1.13l8.76-8.94h8.75c3.94 4 8.74 8.75 8.74 8.75v1.32h2a5.13 5.13 0 0 1 .35 10.25H86.3v1.13c-4.66 4.79-8.68 8.84-8.68 8.84z" fill="#6a6a6a"/><path id="btn_color" data-name="btn color" d="M68.9 119.14c-3.46-3.34-8.84-8.84-8.84-8.84v-1.13h-2.13a5.13 5.13 0 1 1-.35-10.25h2.47v-1.13l8.76-8.94h8.75c3.94 4 8.74 8.75 8.74 8.75v1.32h2a5.13 5.13 0 0 1 .35 10.25H86.3v1.13c-4.66 4.79-8.68 8.84-8.68 8.84z" fill="url(#linear-gradient-background)"/><path id="btn_left" data-name="btn left" d="M57.85 100.14h6.45v7.62h-6.45a3.81 3.81 0 0 1-3.8-3.81 3.81 3.81 0 0 1 3.8-3.81z" fill="#a8aaa8"/><path id="btn_right" data-name="btn right" d="M88.32 107.76h-6.44v-7.62h6.44a3.81 3.81 0 0 1 3.81 3.8 3.81 3.81 0 0 1-3.81 3.81z" fill="#a8aaa8"/><path id="btn_enter" data-name="btn enter" d="M69.37 100.14h7.44a.29.29 0 0 1 .29.28v7.06a.29.29 0 0 1-.29.28h-7.44a.29.29 0 0 1-.28-.28v-7.06a.29.29 0 0 1 .28-.28z" fill="#393939"/><path id="btn_up" data-name="btn up" d="M69.19 90.26l7.9-.09L83 96.28l-2.44 2.44v4.42h-2.25v-2.55a1.86 1.86 0 0 0-1.86-1.86h-6.87a1.54 1.54 0 0 0-1.6 1.46v3H65.7v-4.47l-2.44-2.49z" fill="#a8aaa8"/><path id="btn_down" data-name="btn down" d="M77.05 117.65l-7.85.06-5.94-6.1 2.48-2.43v-4.44H68v2.54a1.9 1.9 0 0 0 1.86 1.9h6.82a1.62 1.62 0 0 0 1.65-1.58v-2.86h2.27v4.44l2.4 2.43z" fill="#a8aaa8"/></g></g></svg>`;
}

View File

@ -60,10 +60,10 @@
<circle id="LM_red-2" cx="17.96" cy="17.95" r="17.06"></circle>
</g>
<g id="LM_details_in_red" transform="translate(2.000000, 2.000000)">
<circle id="LM_detail_red_hole4" fill="#393939" cx="12.9" cy="27.01" r="3.79"></circle>
<circle id="LM_detail_red_hole3" fill="#393939" cx="4.75" cy="12.89" r="3.79"></circle>
<circle id="LM_detail_red_hole2" fill="#393939" cx="18.87" cy="4.74" r="3.79"></circle>
<circle id="LM_detail_red_hole1" fill="#393939" cx="27.02" cy="18.86" r="3.79"></circle>
<circle id="LM_detail_red_hole4" fill="#D6EDFF" cx="12.9" cy="27.01" r="3.79"></circle>
<circle id="LM_detail_red_hole3" fill="#D6EDFF" cx="4.75" cy="12.89" r="3.79"></circle>
<circle id="LM_detail_red_hole2" fill="#D6EDFF" cx="18.87" cy="4.74" r="3.79"></circle>
<circle id="LM_detail_red_hole1" fill="#D6EDFF" cx="27.02" cy="18.86" r="3.79"></circle>
<path d="M18.18,15.31 C17.9816076,15.2705154 17.8089761,15.149396 17.7043432,14.9762761 C17.5997103,14.8031562 17.5727287,14.5940066 17.63,14.4 C17.84,13.68 17.99,13.07 17.99,13.07 C17.99,13.07 17.82,12.72 16.72,12.43 C15.62,12.14 15.37,12.37 15.37,12.37 L14.98,13.7 C14.98,13.7 14.82,14.42 14.17,14.24 L12.98,13.9 C12.98,13.9 12.58,14.03 12.38,14.96 C12.2599627,15.4271881 12.2395203,15.9143986 12.32,16.39 L13.57,16.72 C13.9132251,16.8260991 14.1147049,17.1808788 14.03,17.53 C13.87,18.14 13.7,18.74 13.7,18.74 C13.7,18.74 13.82,19.04 14.9,19.36 C15.98,19.68 16.32,19.45 16.32,19.45 L16.64,18.23 C16.64,18.23 16.9,17.47 17.64,17.64 C18.04,17.7533333 18.44,17.8833333 18.84,18.03 C19.3790257,17.4116231 19.6330766,16.5950309 19.54,15.78 C18.89,15.55 18.18,15.31 18.18,15.31 Z" id="LM_detail_hole" fill="#1F1F1F"></path>
<path d="M15.62,23.13 L14.07,22.9 L12.54,22.33 C12.29437,22.2663058 12.1467122,22.015735 12.21,21.77 L12.76,19.72 C12.8281001,19.4784149 13.0772913,19.3360199 13.32,19.4 L14.77,20 L16.4,20.22 C16.64563,20.2836942 16.7932878,20.534265 16.73,20.78 L16.18,22.83 C16.1519467,22.9468655 16.0773095,23.0471692 15.9734274,23.1076097 C15.8695454,23.1680501 15.7454609,23.1833663 15.63,23.15 L15.62,23.13 Z" id="LM_detail_red4" fill="#393939"></path>
<path d="M23.13,16.2 L22.87,17.75 L22.3,19.27 C22.2716803,19.3872072 22.1975067,19.4881458 22.0941102,19.5501837 C21.9907137,19.6122216 21.8667451,19.6301684 21.75,19.6 L19.69,19.05 C19.4484149,18.9818999 19.3060199,18.7327087 19.37,18.49 L19.98,17.05 L20.2,15.42 C20.2283197,15.3027928 20.3024933,15.2018542 20.4058898,15.1398163 C20.5092863,15.0777784 20.6332549,15.0598316 20.75,15.09 L22.75,15.64 C22.9915851,15.7081001 23.1339801,15.9572913 23.07,16.2 L23.13,16.2 Z" id="LM_detail_red3" fill="#393939"></path>

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 48">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 68">
<defs>
<linearGradient id="linear-gradient" x1="-427.2" y1="440.79" x2="-427.2" y2="440.63" gradientTransform="matrix(44.14, 0, 0, -44.15, 18878.72, 19502.57)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#a8aaa8"/>
@ -6,7 +6,7 @@
</linearGradient>
</defs>
<title>MediumMotor</title>
<g style="isolation: isolate">
<g style="isolation: isolate" transform="translate(0 20)">
<g id="svg7610">
<g id="Medium_Motor" data-name="Medium Motor">
<g id="medmotor_box" data-name="medmotor box">

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -1,3 +1,3 @@
namespace pxsim.visuals {
export const MEDIUM_MOTOR_SVG = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 48"><defs><linearGradient id="linear-gradient" x1="-427.2" y1="440.79" x2="-427.2" y2="440.63" gradientTransform="matrix(44.14 0 0 -44.15 18878.72 19502.57)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a8aaa8"/><stop offset="1" stop-color="#535453"/></linearGradient></defs><g style="isolation:isolate"><g id="svg7610"><g id="Medium_Motor" data-name="Medium Motor"><g id="medmotor_box" data-name="medmotor box"><path id="medmotor_box_wgradient" data-name="medmotor box wgradient" d="M2.57 0h39a2.36 2.36 0 0 1 2.57 2v40.33c0 1-1.1 1.82-2.57 1.82h-39C1.1 44.15 0 43.34 0 42.33V2a2.36 2.36 0 0 1 2.57-2z" transform="translate(2 1.84)" fill="url(#linear-gradient)"/></g><g id="medmotor_star" data-name="medmotor star"><image width="48" height="48" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAxCAYAAACcXioiAAAACXBIWXMAAAsSAAALEgHS3X78AAACfElEQVRoQ+2aPXLbMBBG32ZUijlCnDo/R1AukCoHyAFS5Sw5g5t0bnwCu0ofpTZ9A1usvSmwoClRJEEAI4gzejMcqliS+2FB4AMoUVVyISICrIErO3dpgBpoNONDJde9RKTCJf4R+Ga/u9TADbAFalXdkYEsAiz5L8B3nICxCmyBa+Auh4jVVMAUneR/ABugAuRIaIUT9w4TJyLJIpIEWJ+/wrX8Bng7fgViMRtcRR5F5G/KO/FmKiCANa5Vq6nADhXwwY7DrjaLHALgeJcZQ4D32MtulYwil4AYfOXOogKxRLe8p7SAZC4CSnMRUJrBmThwbBbSRxIh4HFDs3VPwIQl7oXj/M1U3BBr3PUAY3aiEZGjVnzPjQZY4mOscbNqjIgGeLDzGINWvBUQaImHSOlGIUZu2IqbgAr4CtwCT8AL7sbndLzgcrvF5Vq1jQ98An5bwNSNSh9PuFw/A+KH0RhLXIo9K96dB1L68SnZs+JLnchaK75UAWA9ZskCgGULUFiugAZ4BJquAB0IPjcUZz9ugNoL8IqSNplOxA74Z0ezUlU1p3eNG5787tocUuaQOZXfAfe4XB9UVVcAqroTkTsLaghzoZ5TuFGPb+jWzA3Z6dBk/Hrgp53nVEJx7vKXnUMq0XBgp/cWNFaJbe+yYXzCoS14SINL/g9hAnors96KbM5Gqy0Dg+MHUNxjo+6z1Hmg5SKgNBcBpSktIGrk6VJSQOsopwLHKCVAed2sqmPnAMgnICaB9sv9VOAYOQTEWPEdGZKHRAFWeu8Q74Fnpjemnnm1xEndBxI/dEOUFe9Z4hSy/FcCZlnxniVOIZsACPhKYaR2my5ZBZTgP7HrUIs43RAaAAAAAElFTkSuQmCC" style="mix-blend-mode:multiply" opacity=".3"/><path id="medmotor_cut-2" data-name="medmotor cut-2" d="M0 21.25A6.21 6.21 0 0 1 6.22 15H15V6.23A6.22 6.22 0 0 1 21.24 0h1.66a6.22 6.22 0 0 1 6.22 6.22V15h8.8a6.21 6.21 0 0 1 6.22 6.22v1.66a6.21 6.21 0 0 1-6.22 6.22h-8.8v8.8a6.21 6.21 0 0 1-6.22 6.22h-1.66A6.22 6.22 0 0 1 15 37.93v-8.8H6.22A6.22 6.22 0 0 1 0 22.92z" transform="translate(2 1.84)" fill="#a8aaa8"/><circle id="medmotor_hole_4" data-name="medmotor hole 4" cx="39.77" cy="24" r="4.85" fill="#393939"/><circle id="medmotor_hole_3" data-name="medmotor hole 3" cx="8.37" cy="24" r="4.85" fill="#393939"/><circle id="medmotor_hole_2" data-name="medmotor hole 2" cx="24.15" cy="8.22" r="4.85" fill="#393939"/><circle id="medmotor_hole_1" data-name="medmotor hole 1" cx="24.15" cy="39.62" r="4.85" fill="#393939"/></g><g id="medmotor_red" data-name="medmotor red"><circle cx="24.3" cy="24" r="6.75" fill="#d42715"/><circle cx="24.3" cy="24" r="6.63" fill="none" stroke="#a20800" stroke-width=".25"/></g><path id="medmotor_Hole" data-name="medmotor Hole" d="M20.59 19.46s-.05 1-.77 1h-1.46a2.38 2.38 0 0 0-.45 1.69c0 1.27.36 1.6.36 1.6h1.62a.64.64 0 0 1 .7.59.21.21 0 0 1 0 .11v1.67a4 4 0 0 0 1.77.29 6.88 6.88 0 0 0 1.64-.26v-1.67a.73.73 0 0 1 .73-.7 9.89 9.89 0 0 0 1.44-.14s.4-.37.44-1.63-.36-1.64-.36-1.64H24.6a.65.65 0 0 1-.75-.51.49.49 0 0 1 0-.17 11.22 11.22 0 0 1 0-1.64 4.78 4.78 0 0 0-3.25 0c-.02.69-.01 1.41-.01 1.41z" transform="translate(2 1.84)"/></g></g></g></svg>`;
export const MEDIUM_MOTOR_SVG = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 68"><defs><linearGradient id="linear-gradient" x1="-427.2" y1="440.79" x2="-427.2" y2="440.63" gradientTransform="matrix(44.14 0 0 -44.15 18878.72 19502.57)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a8aaa8"/><stop offset="1" stop-color="#535453"/></linearGradient></defs><g style="isolation:isolate" transform="translate(0 20)"><g id="svg7610"><g id="Medium_Motor" data-name="Medium Motor"><g id="medmotor_box" data-name="medmotor box"><path id="medmotor_box_wgradient" data-name="medmotor box wgradient" d="M2.57 0h39a2.36 2.36 0 0 1 2.57 2v40.33c0 1-1.1 1.82-2.57 1.82h-39C1.1 44.15 0 43.34 0 42.33V2a2.36 2.36 0 0 1 2.57-2z" transform="translate(2 1.84)" fill="url(#linear-gradient)"/></g><g id="medmotor_star" data-name="medmotor star"><image width="48" height="48" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAxCAYAAACcXioiAAAACXBIWXMAAAsSAAALEgHS3X78AAACfElEQVRoQ+2aPXLbMBBG32ZUijlCnDo/R1AukCoHyAFS5Sw5g5t0bnwCu0ofpTZ9A1usvSmwoClRJEEAI4gzejMcqliS+2FB4AMoUVVyISICrIErO3dpgBpoNONDJde9RKTCJf4R+Ga/u9TADbAFalXdkYEsAiz5L8B3nICxCmyBa+Auh4jVVMAUneR/ABugAuRIaIUT9w4TJyLJIpIEWJ+/wrX8Bng7fgViMRtcRR5F5G/KO/FmKiCANa5Vq6nADhXwwY7DrjaLHALgeJcZQ4D32MtulYwil4AYfOXOogKxRLe8p7SAZC4CSnMRUJrBmThwbBbSRxIh4HFDs3VPwIQl7oXj/M1U3BBr3PUAY3aiEZGjVnzPjQZY4mOscbNqjIgGeLDzGINWvBUQaImHSOlGIUZu2IqbgAr4CtwCT8AL7sbndLzgcrvF5Vq1jQ98An5bwNSNSh9PuFw/A+KH0RhLXIo9K96dB1L68SnZs+JLnchaK75UAWA9ZskCgGULUFiugAZ4BJquAB0IPjcUZz9ugNoL8IqSNplOxA74Z0ezUlU1p3eNG5787tocUuaQOZXfAfe4XB9UVVcAqroTkTsLaghzoZ5TuFGPb+jWzA3Z6dBk/Hrgp53nVEJx7vKXnUMq0XBgp/cWNFaJbe+yYXzCoS14SINL/g9hAnors96KbM5Gqy0Dg+MHUNxjo+6z1Hmg5SKgNBcBpSktIGrk6VJSQOsopwLHKCVAed2sqmPnAMgnICaB9sv9VOAYOQTEWPEdGZKHRAFWeu8Q74Fnpjemnnm1xEndBxI/dEOUFe9Z4hSy/FcCZlnxniVOIZsACPhKYaR2my5ZBZTgP7HrUIs43RAaAAAAAElFTkSuQmCC" style="mix-blend-mode:multiply" opacity=".3"/><path id="medmotor_cut-2" data-name="medmotor cut-2" d="M0 21.25A6.21 6.21 0 0 1 6.22 15H15V6.23A6.22 6.22 0 0 1 21.24 0h1.66a6.22 6.22 0 0 1 6.22 6.22V15h8.8a6.21 6.21 0 0 1 6.22 6.22v1.66a6.21 6.21 0 0 1-6.22 6.22h-8.8v8.8a6.21 6.21 0 0 1-6.22 6.22h-1.66A6.22 6.22 0 0 1 15 37.93v-8.8H6.22A6.22 6.22 0 0 1 0 22.92z" transform="translate(2 1.84)" fill="#a8aaa8"/><circle id="medmotor_hole_4" data-name="medmotor hole 4" cx="39.77" cy="24" r="4.85" fill="#393939"/><circle id="medmotor_hole_3" data-name="medmotor hole 3" cx="8.37" cy="24" r="4.85" fill="#393939"/><circle id="medmotor_hole_2" data-name="medmotor hole 2" cx="24.15" cy="8.22" r="4.85" fill="#393939"/><circle id="medmotor_hole_1" data-name="medmotor hole 1" cx="24.15" cy="39.62" r="4.85" fill="#393939"/></g><g id="medmotor_red" data-name="medmotor red"><circle cx="24.3" cy="24" r="6.75" fill="#d42715"/><circle cx="24.3" cy="24" r="6.63" fill="none" stroke="#a20800" stroke-width=".25"/></g><path id="medmotor_Hole" data-name="medmotor Hole" d="M20.59 19.46s-.05 1-.77 1h-1.46a2.38 2.38 0 0 0-.45 1.69c0 1.27.36 1.6.36 1.6h1.62a.64.64 0 0 1 .7.59.21.21 0 0 1 0 .11v1.67a4 4 0 0 0 1.77.29 6.88 6.88 0 0 0 1.64-.26v-1.67a.73.73 0 0 1 .73-.7 9.89 9.89 0 0 0 1.44-.14s.4-.37.44-1.63-.36-1.64-.36-1.64H24.6a.65.65 0 0 1-.75-.51.49.49 0 0 1 0-.17 11.22 11.22 0 0 1 0-1.64 4.78 4.78 0 0 0-3.25 0c-.02.69-.01 1.41-.01 1.41z" transform="translate(2 1.84)"/></g></g></g></svg>`;
}

View File

@ -45,6 +45,9 @@ namespace pxsim.visuals {
.sim-text.small {
font-size:6px;
}
.sim-text.medium {
font-size:16px;
}
.sim-text.large {
font-size:30px;
}
@ -385,7 +388,8 @@ namespace pxsim.visuals {
})
}
// Kill the brick
this.layoutView.getBrick().kill();
this.layoutView.getPortraitBrick().kill();
this.layoutView.getLandscapeBrick().kill();
// Save previous inputs for the next cycle
EV3View.previousSelectedInputs = ev3board().getInputNodes().map((node, index) => (this.getDisplayViewForNode(node.id, index).getSelected()) ? node.id : -1)
@ -471,7 +475,8 @@ namespace pxsim.visuals {
const brickNode = ev3board().getBrickNode();
if (brickNode.didChange()) {
this.getDisplayViewForNode(brickNode.id, -1).updateState();
this.layoutView.getPortraitBrick().updateState();
this.layoutView.getLandscapeBrick().updateState();
}
const outputNodes = ev3board().getMotors();

View File

@ -53,7 +53,7 @@ namespace pxsim.visuals {
getInnerView(parent: SVGSVGElement, globalDefs: SVGDefsElement) {
this.group = svg.elt("g") as SVGGElement;
let gc = "gradient-color";
let gc = "gradient-color-" + this.getPort();
this.colorGradient = svg.linearGradient(globalDefs, gc, false);
svg.setGradientValue(this.colorGradient, "50%");
svg.setGradientColors(this.colorGradient, "black", "yellow");
@ -99,5 +99,10 @@ namespace pxsim.visuals {
return this.group;
}
public dispose() {
if (this.colorGradient) this.colorGradient.parentElement.removeChild(this.colorGradient);
super.dispose();
}
}
}

View File

@ -13,7 +13,7 @@ namespace pxsim.visuals {
private static SLIDER_SIDE_PADDING = 6;
getInnerView(parent: SVGSVGElement, globalDefs: SVGDefsElement) {
let gid = "gradient-slider-" + this.getId();
let gid = "gradient-slider-" + this.getPort();
this.group = svg.elt("g") as SVGGElement;
this.gradient = createGradient(gid, this.getGradientDefinition());
this.gradient.setAttribute('x1', '0%');
@ -74,6 +74,11 @@ namespace pxsim.visuals {
return this.group;
}
public dispose() {
if (this.gradient) this.gradient.parentElement.removeChild(this.gradient);
super.dispose();
}
getInnerHeight() {
return 192;
}

View File

@ -78,7 +78,7 @@ namespace pxsim.visuals {
this.brick.setSelected(false);
this.brickLandscape.setSelected(true);
this.brickLandscape.setVisible(false);
this.position();
this.position();
}
public isBrickLandscape() {
@ -86,7 +86,15 @@ namespace pxsim.visuals {
}
public getBrick() {
return this.brickInLandscape ? this.brickLandscape : this.brick;
return this.brickInLandscape ? this.getLandscapeBrick() : this.getPortraitBrick();
}
public getPortraitBrick() {
return this.brick;
}
public getLandscapeBrick() {
return this.brickLandscape;
}
public unselectBrick() {

View File

@ -24,7 +24,9 @@ namespace pxsim.visuals {
} else if (this.syncedLabelG) {
this.syncedLabelG.parentNode.removeChild(this.syncedLabelG);
}
this.setMotorLabel(motorState.getSpeed(), true);
}
this.setMotorLabel(motorState.getSpeed());
}
private showSyncedLabel(motorNode: MotorNode, syncedMotor: MotorNode) {
@ -55,5 +57,11 @@ namespace pxsim.visuals {
getWiringRatio() {
return 0.37;
}
protected positionMotorLabel() {
const hasSyncedLabel = this.syncedMotor;
this.motorLabelGroup.setAttribute('transform', `translate(${hasSyncedLabel ? '15 35' : '25 15'})`);
this.motorLabel.style.fontSize = '13px';
}
}
}

View File

@ -26,5 +26,10 @@ namespace pxsim.visuals {
const transform = `translate(2 1.84) rotate(${angle} ${width / 2} ${height / 2})`;
holeEl.setAttribute("transform", transform);
}
protected positionMotorLabel() {
this.motorLabelGroup.setAttribute('transform', 'translate(25 13)');
this.motorLabel.style.fontSize = '11px';
}
}
}

View File

@ -3,6 +3,10 @@
namespace pxsim.visuals {
export abstract class MotorView extends ModuleView implements LayoutElement {
protected motorLabelGroup: SVGGElement;
protected motorLabel: SVGTextElement;
private currentLabel: string;
constructor(xml: string, prefix: string, id: NodeType, port: NodeType,
protected rotating_hole_id: string) {
super(xml, prefix, id, port);
@ -14,8 +18,8 @@ namespace pxsim.visuals {
if (!motorState) return;
const speed = motorState.getSpeed();
if (!speed) return;
this.setMotorAngle(motorState.getAngle());
this.setMotorAngle(motorState.getAngle() % 360);
this.setMotorLabel(speed);
}
private setMotorAngle(angle: number) {
@ -29,5 +33,18 @@ namespace pxsim.visuals {
getWiringRatio() {
return 0.37;
}
setMotorLabel(speed: number, force?: boolean) {
if (!force && this.currentLabel === `${speed}`) return;
this.currentLabel = `${speed}`;
if (!this.motorLabel) {
this.motorLabelGroup = pxsim.svg.child(this.content, "g") as SVGGElement;
this.motorLabel = pxsim.svg.child(this.motorLabelGroup, "text", { 'text-anchor': 'middle', 'x': '0', 'y': '0', 'class': 'sim-text number inverted' }) as SVGTextElement;
}
this.motorLabel.textContent = `${this.currentLabel}%`;
this.positionMotorLabel();
}
protected abstract positionMotorLabel(): void;
}
}

View File

@ -15,11 +15,6 @@
"Maker": "maker"
},
"electronManifest": {
"majorReleases": {
"0": {
"latest": "v0.1.5",
"promptVersion": "v0.1.5"
}
}
"latest": "v0.1.19"
}
}
}

View File

@ -8,6 +8,5 @@
}
#mainmenu, #homemenu {
background: @legoGreyLight;
border-bottom: 5px solid #00a5c8;
}

View File

@ -108,8 +108,8 @@
Menu
--------------------*/
@mainMenuBackground: #ffffff;
@mainMenuInvertedBackground: @yellow;
@mainMenuBackground: @legoGreyLight;
@mainMenuInvertedBackground: #FFFFFF;
@mainMenuTutorialBackground: @orange;
@ -184,3 +184,9 @@
@blocklyFlyoutColor: #3B3C3D;
@blocklyFlyoutColorOpacity: 1.0;
@monacoFlyoutColor: rgba(59, 60, 61, 1.0);
/*-------------------
Tutorial
--------------------*/
@tutorialSegmentBackground: #f2f2f2;

View File

@ -1,3 +1,5 @@
/*******************************
User Variable Overrides
*******************************/
@backgroundColor: fade(#A2A2A2, 80%);

View File

@ -115,6 +115,11 @@
color: @blue;
}
/* Tutorial */
#tutorialcard .ui.tutorialsegment {
border-radius: 0;
}
/* Mobile */
@media only screen and (max-width: @largestMobileScreen) {
#filelist {