mirror of
https://github.com/open-scratch/easy-scratch3.git
synced 2024-11-25 16:36:03 +08:00
云变量配置
This commit is contained in:
parent
80532795cd
commit
08461ab70e
@ -28,7 +28,7 @@
|
||||
cloudData:{
|
||||
enable: true, //是否开启云变量功能
|
||||
id: "create", //默认云变量ID,可使用window.scratch.setCloudId更换ID
|
||||
api: "127.0.0.1:1234/api/websocket/scratch/cloudData" //云变量API地址
|
||||
api: window.location.hostname + ":8081/api/websocket/scratch/cloudData" //云变量API地址
|
||||
},
|
||||
projectInfo: {//作品信息
|
||||
projectName: "",
|
||||
@ -168,6 +168,11 @@
|
||||
},
|
||||
//默认作品加载完毕
|
||||
handleDefaultProjectLoaded:() => {
|
||||
// let url = ''
|
||||
// window.scratch.loadProject(url, () => {
|
||||
// window.scratch.setCloudId('666')
|
||||
// vm.runtime.start()
|
||||
// })
|
||||
},
|
||||
//默认项目地址,不需要修请删除本配置项
|
||||
defaultProjectURL: window.location.protocol+"//"+window.location.host + "/static/project.sb3",
|
||||
|
@ -17,6 +17,15 @@
|
||||
<% } %>
|
||||
<script>
|
||||
window.scratchConfig = {
|
||||
cloudData:{
|
||||
enable: true,
|
||||
id: 'create', //云变量ID
|
||||
api: window.location.hostname + ":8081/api/websocket/scratch/cloudData" //云变量API地址
|
||||
},
|
||||
projectInfo: {//作品信息
|
||||
authorUsername: "",
|
||||
authorAvatar: './static/avatar.png',
|
||||
},
|
||||
stageArea:{
|
||||
scale: window.innerWidth / 480, //自适应屏幕尺寸
|
||||
width: 480,
|
||||
@ -50,6 +59,11 @@
|
||||
handleProjectLoaded:() => {
|
||||
},
|
||||
handleDefaultProjectLoaded:() => {
|
||||
// let url = ''
|
||||
// window.scratch.loadProject(url, () => {
|
||||
// window.scratch.setCloudId('666')
|
||||
// vm.runtime.start()
|
||||
// })
|
||||
},
|
||||
//默认项目地址,不需要修请删除本配置项
|
||||
defaultProjectURL: window.location.protocol+"//"+window.location.host + "/static/project.sb3",
|
||||
|
Loading…
Reference in New Issue
Block a user