Scratch GUI
原文地址:https://github.com/LLK/scratch-gui/wiki/Getting-Started
Getting Started
[Smokey needs Your help to keep this documentation up to date!]
The staging version of the Scratch GUI, a.k.a. the to-be-released Scratch 3.0 Editor, can be viewed at https://llk.github.io/scratch-gui/.
The Scratch editor is built up modularly from several repos. Each can stand alone, but for development purposes you may need to make dependent changes in multiple repos at once. This guide covers how to link repos.
Repos
You probably won't need all the repos. Clone the repo for the issue you are working on, and clone and link other repos as you need them.
The main ones are:
- GUI - the React-based front end
- VM - Manages state and does business logic. It sends the state to the GUI.
- Scratch Blocks - branched from Blockly. This repo handles both the UI and logic for the portions of the editor that blocks appear in. Talks to the GUI, which often pipes things through to the VM.
- Renderer - WebGL-based handler of what appears in the stage area. The GUI tells this what to do.
There are also others, like scratch-storage and scratch-audio.
Prereqs:
- Node 8 (e.g.
brew install node)- If you have multiple versions of Node, you can switch between them using nvm on Mac or https://github.com/coreybutler/nvm-windows on windows
- Git (e.g.
brew install git) - GitHub account with SSH key set up
Getting the GUI
- Make a fork of GUI
- git clone your fork and
cdinto it - git remote add upstream https://github.com/LLK/scratch-gui.git
- git config branch.develop.remote upstream (develop will be where you pull in changes from the official repo)
npm install- gets dependenciesnpm start- starts local server which is hot reloaded- Open http://localhost:8601
Getting the VM
- Make a fork of VM
- git clone your fork and
cdinto it - git remote add upstream https://github.com/LLK/scratch-vm.git
- git config branch.develop.remote upstream (develop will be where you pull in changes from the official repo)
npm install- gets dependenciesnpm run watch- starts local server, and also will tell gui to reload if it changes- Playground which doesn't use GUI available at http://localhost:8073/playground/
Same process as VM for render, audio, etc.
Slightly different for scratch-blocks
- Make a fork of Scratch blocks
- git clone your fork and
cdinto it - git remote add upstream https://github.com/LLK/scratch-blocks.git
- git config branch.develop.remote upstream (develop will be where you pull in changes from the official repo)
npm install- gets dependencies -- If you run into the error 'Closure not found', follow the instructions on the scratch-blocks wiki to install the closure library.npm link- INSTEAD OF
npm run watch, you need to runnpm run prepublisheach time you make a change to scratch blocks that should be reflected in the GUI, then hard refresh. (No hot reloading) - INSTEAD OF having to run a server for testing, simply open file:////tests/vertical_playground.html in a browser
Linking repos
cdthe dependency repo and runnpm linkcdthe GUI and runnpm link <dependency>
Example (Scratch GUI, VM and Blocks linked):
mkdir Scratch
cd Scratch
git clone https://github.com/llk/scratch-gui # if making changes fork the project and check out your copy
git clone https://github.com/llk/scratch-vm # if making changes fork the project and check out your copy
git clone https://github.com/llk/scratch-blocks # if making changes fork the project and check out your copy
cd scratch-vm
npm install
npm link
npm run watch
cd ../scratch-blocks
npm install
npm link
cd ../scratch-gui
npm install
npm link scratch-vm scratch-blocks
npm start
Scratch GUI的更多相关文章
- Scratch Blocks本地环境搭建
关于Scratch Blocks环境的搭建,大家在实现的过程中还是有很多的问题,目前谷歌和MIT的工程师也在进一步完善.可以通过以下方式,简单快捷的导出Scratch Blocks对应的index.h ...
- JAVA GUI编程学习笔记目录
2014年暑假JAVA GUI编程学习笔记目录 1.JAVA之GUI编程概述 2.JAVA之GUI编程布局 3.JAVA之GUI编程Frame窗口 4.JAVA之GUI编程事件监听机制 5.JAVA之 ...
- 如何通过Git GUI将自己本地的项目上传至Github
最近在学习node.js和react,顺便复习了下AngluarJS相关的东西,写了些小demo想放在GitHub上,之前仅限于只申请了GitHub账号从没用过,今天花半天时间查资料认真学习Githu ...
- git图像化界面GUI的使用
GIT学习笔记 一. 基础内容 1.git是一个版本控制软件,与svn类似,特点是分布式管理,不需要中间总的服务器,可以增加很多分支. 2.windows下的git叫msysgit,下载 ...
- egret GUI 和 egret Wing 是我看到h5 最渣的设计
一个抄袭FlexLite抄的连自己思想都没有,别人精髓都不懂的垃圾框架.也不学学MornUI,好歹有点自己想法. 先来个最小可用集合吧: 1. egret create legogame --type ...
- [C#] 走进异步编程的世界 - 在 GUI 中执行异步操作
走进异步编程的世界 - 在 GUI 中执行异步操作 [博主]反骨仔 [原文地址]http://www.cnblogs.com/liqingwen/p/5877042.html 序 这是继<开始接 ...
- 1.JAVA之GUI编程概述
下列内容为本人看毕向东老师java视频教程学习笔记! JAVA GUI图形用户界面编程: Windows 操作系统提供两种操作方式: ...
- 2.JAVA之GUI编程布局
布局管理器 容器中的组件排放方式,就是布局 常见的布局管理器: **************************************************** 1.FlowLayout(流式 ...
- 3.JAVA之GUI编程Frame窗口
创建图形化界面思路: 1.创建frame窗体: 2.对窗体进行基本设置: 比如大小.位置.布局 3.定义组件: 4.将组件通过add方法添加到窗体中: 5.让窗体显示,通过setVisible(tur ...
随机推荐
- 【WinSCP】WinSCP 5.x使用密钥连接服务器
在WinSCP 4.x中,主页面有一个添加密钥文件的选项,如下图所示 但是在WinSCP 5.x中主界面发生了很大的变化 在主页上没有了载入密钥文件的选项,那么我们应该怎么使用密钥验证呢? WinSC ...
- Linux 服务器开发常用命令操作
1)查看网络端口 netstat -na --ip 2)查看特定应用程序进程 ps -ef | grep vsftp or ps aux | grep xxx.exe 3)查看系统日志 vi /et ...
- Hibernate3.3.2_ID生成策略
1,xml生成id generator:常用四个:native.identity.sequence.uuid. Annotation: 1,@GeneratedValue: a)自定义ID b)AUT ...
- JVM-类加载过程(Java类的生命周期)
什么是类加载 类的加载指的是将类的.class文件中的二进制数据读入到内存中,将其放在运行时数据区的方法区内,然后在堆区创建一个java.lang.Class对象,用来封装类在方法区内的数据结构.类的 ...
- WPF 自定义NotifyPropertyChanged
该工具类实现INotifyPropertyChanged接口 /// <summary> /// 实现了属性更改通知的基类 /// </summary> public clas ...
- java的finally简单理解
1. 大家都知道, 普通的try, catch, finally格式: try{ //有可能会抛出异常的代码 }catch{ //抛出异常时处理的代码 }finally{ //无条件执行的代码,就不管 ...
- UTF-8编码
UTF-8是UNICODE的一种变长度的编码表达方式<一般UNICODE为双字节(指UCS2)>,它由Ken Thompson于1992年创建,现在已经标准化为RFC 3629.UTF-8 ...
- ASP.NET MVC Core的ViewComponent
MVC Core新增了ViewComponent的概念,直接强行理解为视图组件,用于在页面上显示可重用的内容,这部分内容包括逻辑和展示内容,而且定义为组件那么其必定是可以独立存在并且是高度可重用的. ...
- Promise原理详解
参考文章:深入理解 Promise.[翻译]Promises/A+规范 从入门Promise的正确姿势中我们已经了解到Promise的基本用法.那么现在给你一个需求:根据Promise的用法和Prom ...
- <深入理解JavaScript>学习笔记(1)_编写高质量JavaScript代码的基本要点
注:本文是拜读了 深入理解JavaScript 之后深有感悟,故做次笔记方便之后查看. JQuery是一个很强大的JavaScript 类库,在我刚刚接触JavaScript的就开始用了. JQuer ...