In this annexe we look at the file format and other technical stuff.
在本附录中,我们了解文件格式和其他技术内容。
The EV3 Classroom application stores projects with a .lmsp extension. You can remember this as LEGO MINDSTORMS Scratch Program.
EV3 Classroom 应用程序存储扩展名为 .lmsp 的项目。您可以将其记住为 LEGO MINDSTORMS Scratch Program。
When you create your first project, it is called Project 1.lmsp
当您创建第一个项目时,它称为 Project 1.lmsp
The file inspector shows:
文件检查器显示:
The Project 1.lmsp is in fact a ZIP file. You can:
Project 1.lmsp 实际上是一个 ZIP 文件。您可以:
You will get a Project 1 folder with 3 files:
您将获得一个包含 3 个文件的 Project 1 文件夹:
This file contains an image of the program, probably to be displayed in Home > Recent projects.
此文件包含程序的图像,可能显示在主页 > 的“最近的项目 ”中。
This file contains information about the connection, zoom level, position, etc.
此文件包含有关连接、缩放级别、位置等的信息。
{
"autoDelete": true,
"created": "2020-02-07T15:58:32.427Z",
"hardware": {
"=h{q!08=bSKjnG!;0#eZ": {
"address": "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/XHC1@14/XHC1@14000000/PRT2@14200000/EV3@14200000/Xfer data to and from EV3 brick@0/AppleUserUSBHostHIDDevice",
"description": "",
"connection": "usb-hid",
"name": "EV3",
"type": "ev3",
"serial": "0016533d0a6c",
"hubState": {
"programRunning": false
},
"lastConnectedSerial": "0016533d0a6c"
}
},
"id": "lKDY_8BjjFjI",
"lastsaved": "2020-04-11T16:00:46.620Z",
"size": 0,
"name": "Project 1",
"slotIndex": 0,
"showAllBlocks": false,
"state": {
"playMode": "download",
"canvasDrawerTab": "monitorTab"
},
"version": 1,
"zoomLevel": 0.8250000000000002,
"workspaceX": 120.00000000000034,
"workspaceY": 220.00000000000006,
"extensions": [
"ev3events",
"ev3display"
]
}
This is a SB3 file, based on the MIT Scratch 3.0 format.
这是一个基于 MIT Scratch 3 格式的 SB3.0 文件 。
You can again: 您可以再次执行以下作:
You will get a folder called scratch which contains:
您将获得一个名为 scratch 的文件夹,其中包含:
This JSON file contains: 此 JSON 文件包含:
{
"targets": [
{
"isStage": true,
"name": "Stage",
"variables": {},
"lists": {},
"broadcasts": {},
"blocks": {},
"comments": {},
"currentCostume": 0,
"costumes": [
{
"assetId": "14d134f088239ac481523b3c2c6ecd8c",
"name": "backdrop1",
"bitmapResolution": 1,
"md5ext": "14d134f088239ac481523b3c2c6ecd8c.svg",
"dataFormat": "svg",
"rotationCenterX": 47,
"rotationCenterY": 55
}
],
"sounds": [
{
"assetId": "83c36d806dc92327b9e7049a565c6bff",
"name": "Meow",
"dataFormat": "wav",
"format": "",
"rate": 44100,
"sampleCount": 37376,
"md5ext": "83c36d806dc92327b9e7049a565c6bff.wav"
}
],
"volume": 0,
"tempo": 60,
"videoTransparency": 50,
"videoState": "on",
"textToSpeechLanguage": null
},
{
"isStage": false,
"name": "7OQe8zk4TyyTWFib4vkW",
"variables": {},
"lists": {},
"broadcasts": {},
"blocks": {
"xYhpfMLy1ynSQzb93O1W": {
"opcode": "ev3events_whenProgramStarts",
"next": "]}sBQp1+Wg:TSU[;Qw?S",
"parent": null,
"inputs": {},
"fields": {},
"shadow": false,
"topLevel": true,
"x": 34,
"y": -19
},
"]}sBQp1+Wg:TSU[;Qw?S": {
"opcode": "ev3display_displayImageForTime",
"next": null,
"parent": "xYhpfMLy1ynSQzb93O1W",
"inputs": {
"DURATION": [
1,
[
4,
"2"
]
]
},
"fields": {
"IMAGE": [
"Neutral",
null
]
},
"shadow": false,
"topLevel": false
}
},
"comments": {},
"currentCostume": 0,
"costumes": [
{
"assetId": "93ca32a536da1698ea979f183679af29",
"name": "8my-jkz-3zNRywbMFwa-",
"bitmapResolution": 1,
"md5ext": "93ca32a536da1698ea979f183679af29.png",
"dataFormat": "png",
"rotationCenterX": 240,
"rotationCenterY": 180
}
],
"sounds": [
{
"assetId": "83c36d806dc92327b9e7049a565c6bff",
"name": "Meow",
"dataFormat": "wav",
"format": "",
"rate": 44100,
"sampleCount": 37376,
"md5ext": "83c36d806dc92327b9e7049a565c6bff.wav"
}
],
"volume": 100,
"visible": true,
"x": 0,
"y": 0,
"size": 100,
"direction": 90,
"draggable": false,
"rotationStyle": "all around"
}
],
"monitors": [],
"extensions": [
"ev3events",
"ev3display"
],
"meta": {
"semver": "3.0.0",
"vm": "0.2.0-prerelease.20190619042313",
"agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) EV3Classroom/1.0.0 Chrome/69.0.3497.106 Electron/4.0.4 Safari/537.36"
}
}