1 Star 0 Fork 1

C-Band / RXJS弹珠测试生成器

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
animation.js 876 Bytes
一键复制 编辑 原始数据 按行查看 历史
KonghaYao 提交于 2021-04-10 18:52 . 2021/4/10
import { drawer } from "./js/BaseChange.js";
let { fromEvent } = rxjs;
let { pluck, tap, filter } = rxjs.operators;
// 重新加载动画的一个函数
function restart(code) {
code = code || localStorage.getItem("my-code");
drawer.canvasClean();
const rxjs = drawer.rxjs;
CodePrepare.bind(rxjs)(code, rxjs);
}
function CodePrepare(code, rxjs) {
try {
eval(code);
} catch (e) {
console.log(e);
}
}
window.onload = () => {
restart();
};
let Origan = ["https://konghayao.github.io"];
fromEvent(window, "message")
.pipe(
tap((i) => console.warn(i)),
pluck("data")
)
.subscribe((data) => {
console.log("数据", data);
const { listening, data: code } = data;
drawer.listening = listening;
if (code) localStorage.setItem("my-code", code);
restart(code);
});
JavaScript
1
https://gitee.com/C-BAND/rxjs-marble-test-creator.git
git@gitee.com:C-BAND/rxjs-marble-test-creator.git
C-BAND
rxjs-marble-test-creator
RXJS弹珠测试生成器
master

搜索帮助