Code Monkey home page Code Monkey logo

open-scratch / easy-scratch3 Goto Github PK

View Code? Open in Web Editor NEW
258.0 258.0 117.0 131.29 MB

Easy Scratch封装了如上传、加载、菜单配置、云变量接口、自定义素材库等常用的功能。只需简单js基础,即可轻松对接到平台上。You can easy embed scratch to your website with config and javascript

Home Page: http://teaching.vip

License: BSD 3-Clause "New" or "Revised" License

JavaScript 92.34% Shell 0.10% CSS 6.98% EJS 0.58%
scratch3

easy-scratch3's People

Contributors

chengyu2333 avatar shenqihui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easy-scratch3's Issues

saveProjectSb3方法生成文件保存到服务器后无法加载

请问 调用saveProjectSb3方法生成的blob文件 的type是 application/x.scratch.sb3 这个文件上传到服务器之后,从服务器获取回来加载不了,请问保存的时候前端需要做什么其他的操作吗? 我看到调用saveProjectSb3方法返回的type应该是zip类型啊

通过window.scratch.getProjectFile方式保存到服务器的某些文件,或者有些本地的文件再次加载加载不出来。

楼主您好,非常感谢开源,遇到个问题如标题所述,还请您有空解答下~

我这也有本地的加载不出的文件,如果您需要可以发给您,不过在这个issue上不知道怎么把文件放上去。

这是报错信息。
lib.min.js:93 gui {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}],"sb3Errors":[{"keyword":"enum","dataPath":".targets[0].layerOrder","schemaPath":"sb3_definitions.json#/definitions/stage/properties/layerOrder/enum","params":{"allowedValues":[0]},"message":"should be equal to one of the allowed values"}]}
a.write @ lib.min.js:93
o @ lib.min.js:29
emit @ lib.min.js:93
i.write @ lib.min.js:93
o @ lib.min.js:29
emit @ lib.min.js:93
A.write @ lib.min.js:29
o.warn @ lib.min.js:93
(anonymous) @ lib.min.js:29
Promise.catch (async)
value @ lib.min.js:29
t @ lib.min.js:6
load (async)
value @ lib.min.js:29
mountClassInstance @ lib.min.js:93
beginWork @ lib.min.js:93
A @ lib.min.js:93
i @ lib.min.js:93
a @ lib.min.js:93
I @ lib.min.js:93
w @ lib.min.js:93
batchedUpdates @ lib.min.js:93
ut @ lib.min.js:93
eo @ lib.min.js:93

舞台区域拖拽无拖拽过程的动画

在舞台区域拖拽素材时,没有任务跟随鼠标的拖拽动画,只有松掉鼠标以后素材才会更换位置。
控制台出现了this.renderer.extractDrawableScreenSpace的错误,
在控制台打印出来的renderer里面没有extractDrawableScreenSpace这个方法。
包括开源Teaching该网站里面也有一模一样的错误,
但是Teaching商业版是没有出现这个问题的

加载一个静态sb3文件地址项目失败

不同的域名,已经可以fetch(mode='no-cors'),就是加载的时候异常,sb3资源文件下载下来手动导入可以加载

gui.jsx:154 Uncaught Error: Error in Scratch GUI [location=http://localhost:63342/scratch3-master/build/index.html?_ijt=nroh28kmkj1oo04hn3nn4bvpjp]: Error: Non-ascii character in FixedAsciiString
    at GUI.render (gui.jsx:154)
    at finishClassComponent (react-dom.development.js:7873)
    at updateClassComponent (react-dom.development.js:7850)
    at beginWork (react-dom.development.js:8225)
    at performUnitOfWork (react-dom.development.js:10224)
    at workLoop (react-dom.development.js:10288)
    at HTMLUnknownElement.callCallback (react-dom.development.js:542)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:581)
    at invokeGuardedCallback (react-dom.development.js:438)
    at renderRoot (react-dom.development.js:10366)
render @ gui.jsx:154
finishClassComponent @ react-dom.development.js:7873
updateClassComponent @ react-dom.development.js:7850
beginWork @ react-dom.development.js:8225
performUnitOfWork @ react-dom.development.js:10224
workLoop @ react-dom.development.js:10288
callCallback @ react-dom.development.js:542
invokeGuardedCallbackDev @ react-dom.development.js:581
invokeGuardedCallback @ react-dom.development.js:438
renderRoot @ react-dom.development.js:10366
performWorkOnRoot @ react-dom.development.js:11014
performWork @ react-dom.development.js:10967
requestWork @ react-dom.development.js:10878
scheduleWorkImpl @ react-dom.development.js:10732
scheduleWork @ react-dom.development.js:10689
enqueueSetState @ react-dom.development.js:6212
./node_modules/react/cjs/react.development.js.Component.setState @ react.development.js:237
onStateChange @ connectAdvanced.js:205
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
dispatch @ createStore.js:173
e @ VM178:1
(anonymous) @ index.js:70
dispatch @ VM178:1
onError @ vm-manager-hoc.jsx:139
(anonymous) @ vm-manager-hoc.jsx:74
Promise.catch (async)
loadProject @ vm-manager-hoc.jsx:72
wrapper @ index.js:550
componentDidUpdate @ vm-manager-hoc.jsx:47
commitLifeCycles @ react-dom.development.js:8778
commitAllLifeCycles @ react-dom.development.js:9946
callCallback @ react-dom.development.js:542
invokeGuardedCallbackDev @ react-dom.development.js:581
invokeGuardedCallback @ react-dom.development.js:438
commitRoot @ react-dom.development.js:10050
performWorkOnRoot @ react-dom.development.js:11017
performWork @ react-dom.development.js:10967
requestWork @ react-dom.development.js:10878
scheduleWorkImpl @ react-dom.development.js:10732
scheduleWork @ react-dom.development.js:10689
enqueueSetState @ react-dom.development.js:6212
./node_modules/react/cjs/react.development.js.Component.setState @ react.development.js:237
onStateChange @ connectAdvanced.js:205
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
dispatch @ createStore.js:173
e @ VM178:1
(anonymous) @ index.js:70
dispatch @ VM178:1
onSetFontsLoaded @ font-loader-hoc.jsx:81
(anonymous) @ font-loader-hoc.jsx:57
Promise.then (async)
document.onreadystatechange @ font-loader-hoc.jsx:56
Show 50 more frames
react_devtools_backend.js:2273 The above error occurred in the <GUI> component:
    in GUI (created by Connect(GUI))
    in Connect(GUI) (created by InjectIntl(Connect(GUI)))
    in InjectIntl(Connect(GUI)) (created by CloudManager)
    in CloudManager (created by Connect(CloudManager))
    in Connect(CloudManager) (created by VMManager)
    in VMManager (created by Connect(VMManager))
    in Connect(VMManager) (created by VMListener)
    in VMListener (created by Connect(VMListener))
    in Connect(VMListener) (created by ProjectSaverComponent)
    in ProjectSaverComponent (created by Connect(ProjectSaverComponent))
    in Connect(ProjectSaverComponent) (created by TitledComponent)
    in TitledComponent (created by Connect(TitledComponent))
    in Connect(TitledComponent) (created by InjectIntl(Connect(TitledComponent)))
    in InjectIntl(Connect(TitledComponent)) (created by ProjectFetcherComponent)
    in ProjectFetcherComponent (created by Connect(ProjectFetcherComponent))
    in Connect(ProjectFetcherComponent) (created by InjectIntl(Connect(ProjectFetcherComponent)))
    in InjectIntl(Connect(ProjectFetcherComponent)) (created by QueryParserComponent)
    in QueryParserComponent (created by Connect(QueryParserComponent))
    in Connect(QueryParserComponent) (created by FontLoaderComponent)
    in FontLoaderComponent (created by Connect(FontLoaderComponent))
    in Connect(FontLoaderComponent) (created by ErrorBoundaryWrapper)
    in ErrorBoundary (created by Connect(ErrorBoundary))
    in Connect(ErrorBoundary) (created by ErrorBoundaryWrapper)
    in ErrorBoundaryWrapper (created by LocalizationWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by LocalizationWrapper)
    in LocalizationWrapper (created by Connect(LocalizationWrapper))
    in Connect(LocalizationWrapper) (created by HashParserComponent)
    in HashParserComponent (created by Connect(HashParserComponent))
    in Connect(HashParserComponent) (created by AppStateWrapper)
    in IntlProvider (created by Connect(IntlProvider))
    in Connect(IntlProvider) (created by AppStateWrapper)
    in Provider (created by AppStateWrapper)
    in AppStateWrapper

React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.
overrideMethod @ react_devtools_backend.js:2273
logCapturedError @ react-dom.development.js:9747
captureError @ react-dom.development.js:10540
renderRoot @ react-dom.development.js:10391
performWorkOnRoot @ react-dom.development.js:11014
performWork @ react-dom.development.js:10967
requestWork @ react-dom.development.js:10878
scheduleWorkImpl @ react-dom.development.js:10732
scheduleWork @ react-dom.development.js:10689
enqueueSetState @ react-dom.development.js:6212
./node_modules/react/cjs/react.development.js.Component.setState @ react.development.js:237
onStateChange @ connectAdvanced.js:205
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
dispatch @ createStore.js:173
e @ VM178:1
(anonymous) @ index.js:70
dispatch @ VM178:1
onError @ vm-manager-hoc.jsx:139
(anonymous) @ vm-manager-hoc.jsx:74
Promise.catch (async)
loadProject @ vm-manager-hoc.jsx:72
wrapper @ index.js:550
componentDidUpdate @ vm-manager-hoc.jsx:47
commitLifeCycles @ react-dom.development.js:8778
commitAllLifeCycles @ react-dom.development.js:9946
callCallback @ react-dom.development.js:542
invokeGuardedCallbackDev @ react-dom.development.js:581
invokeGuardedCallback @ react-dom.development.js:438
commitRoot @ react-dom.development.js:10050
performWorkOnRoot @ react-dom.development.js:11017
performWork @ react-dom.development.js:10967
requestWork @ react-dom.development.js:10878
scheduleWorkImpl @ react-dom.development.js:10732
scheduleWork @ react-dom.development.js:10689
enqueueSetState @ react-dom.development.js:6212
./node_modules/react/cjs/react.development.js.Component.setState @ react.development.js:237
onStateChange @ connectAdvanced.js:205
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
notify @ Subscription.js:26
notifyNestedSubs @ Subscription.js:65
onStateChange @ connectAdvanced.js:202
dispatch @ createStore.js:173
e @ VM178:1
(anonymous) @ index.js:70
dispatch @ VM178:1
onSetFontsLoaded @ font-loader-hoc.jsx:81
(anonymous) @ font-loader-hoc.jsx:57
Promise.then (async)
document.onreadystatechange @ font-loader-hoc.jsx:56
Show 44 more frames
react_devtools_backend.js:2273 gui Unhandled Error: Error: Error in Scratch GUI [location=http://localhost:63342/scratch3-master/build/index.html?_ijt=nroh28kmkj1oo04hn3nn4bvpjp]: Error: Non-ascii character in FixedAsciiString    at GUI.render (http://localhost:63342/scratch3-master/build/lib.min.js:327497:15)    at finishClassComponent (http://localhost:63342/scratch3-master/build/lib.min.js:103632:31)    at updateClassComponent (http://localhost:63342/scratch3-master/build/lib.min.js:103609:12)    at beginWork (http://localhost:63342/scratch3-master/build/lib.min.js:103984:16)    at performUnitOfWork (http://localhost:63342/scratch3-master/build/lib.min.js:105983:16)    at workLoop (http://localhost:63342/scratch3-master/build/lib.min.js:106047:26)    at HTMLUnknownElement.callCallback (http://localhost:63342/scratch3-master/build/lib.min.js:96301:14)    at Object.invokeGuardedCallbackDev (http://localhost:63342/scratch3-master/build/lib.min.js:96340:16)    at invokeGuardedCallback (http://localhost:63342/scratch3-master/build/lib.min.js:96197:27)    at renderRoot (http://localhost:63342/scratch3-master/build/lib.min.js:106125:7)Component stack:     in GUI (created by Connect(GUI))    in Connect(GUI) (created by InjectIntl(Connect(GUI)))    in InjectIntl(Connect(GUI)) (created by CloudManager)    in CloudManager (created by Connect(CloudManager))    in Connect(CloudManager) (created by VMManager)    in VMManager (created by Connect(VMManager))    in Connect(VMManager) (created by VMListener)    in VMListener (created by Connect(VMListener))    in Connect(VMListener) (created by ProjectSaverComponent)    in ProjectSaverComponent (created by Connect(ProjectSaverComponent))    in Connect(ProjectSaverComponent) (created by TitledComponent)    in TitledComponent (created by Connect(TitledComponent))    in Connect(TitledComponent) (created by InjectIntl(Connect(TitledComponent)))    in InjectIntl(Connect(TitledComponent)) (created by ProjectFetcherComponent)    in ProjectFetcherComponent (created by Connect(ProjectFetcherComponent))    in Connect(ProjectFetcherComponent) (created by InjectIntl(Connect(ProjectFetcherComponent)))    in InjectIntl(Connect(ProjectFetcherComponent)) (created by QueryParserComponent)    in QueryParserComponent (created by Connect(QueryParserComponent))    in Connect(QueryParserComponent) (created by FontLoaderComponent)    in FontLoaderComponent (created by Connect(FontLoaderComponent))    in Connect(FontLoaderComponent) (created by ErrorBoundaryWrapper)    in ErrorBoundary (created by Connect(ErrorBoundary))    in Connect(ErrorBoundary) (created by ErrorBoundaryWrapper)    in ErrorBoundaryWrapper (created by LocalizationWrapper)    in IntlProvider (created by Connect(IntlProvider))    in Connect(IntlProvider) (created by LocalizationWrapper)    in LocalizationWrapper (created by Connect(LocalizationWrapper))    in Connect(LocalizationWrapper) (created by HashParserComponent)    in HashParserComponent (created by Connect(HashParserComponent))    in Connect(HashParserComponent) (created by AppStateWrapper)    in IntlProvider (created by Connect(IntlProvider))    in Connect(IntlProvider) (created by AppStateWrapper)    in Provider (created by AppStateWrapper)    in AppStateWrapper

menuBar上的一些配置不生效

楼主,您好,遇到个问题请教一下~

window.scratchConfig对象下面的menuBar对象下面的这些配置项除了color之外的配置之后都不生效,我的需求是不想展示教程啊,保存文件啊这些。下面是我的配置,是哪里配的不对吗
menuBar: {
color: 'hsla(215, 100%, 65%, 1)',
newButton:{
show:false
},
loadFileButton:{
show:false
},
saveFileButton:{
show:false
},
turboModeButton:{
show: false
},
helpButton:{
show: false
}
}

无法使用scratch-desktop打包

我使用最新的scratch-desktop进行electron打包,无法正常运行,请问你这个二次开发版如何正确打包为app,谢谢

如何运行

你说,可以在index.html直接运行,但我没找着啊。

支持调出任务描述的弹窗吗

您好,请问有API支持调出任务描述的弹窗吗,并且可以自定义任务描述的内容,描述内容可能包括音频文案图片等

添加角色失败

在npm start 后,页面可以正常访问,但是添加角色的时候,出现以下报错。应该如何处理?

DataCloneError: The object could not be cloned.

image

npm start失败

我在mac os catalina下npm start 失败,错误信息
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: webpack-dev-server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
解决方法多都是 npm cache clean --force rm -rf node_modules rm package-lock.json 之后npm install 依然失败
麻烦问下,这个怎么解决呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.