Commit 444f0d8f authored by haiyoucuv's avatar haiyoucuv

init

parent 5894567f
......@@ -56,10 +56,10 @@
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
</script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1749709870781/assets/index-vchDvU9K.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1749709870781/assets/vendor-oWVubxFE.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1749709870781/assets/vendor-BQh5NVNk.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1749709870781/assets/index-C6GoyIzQ.css">
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1749807258456/assets/index-NVkSC-ss.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1749807258456/assets/vendor-j6d0qki3.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1749807258456/assets/vendor-BQh5NVNk.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1749807258456/assets/index-DfRaK5vY.css">
<script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
</head>
......@@ -67,8 +67,8 @@
<body>
<div id="root"></div>
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1749709870781/assets/polyfills-legacy-arANKBzQ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1749709870781/assets/index-legacy-cZRcWPc-.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1749807258456/assets/polyfills-legacy-arANKBzQ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1749807258456/assets/index-legacy-BSxdUTlL.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
......
......@@ -4,11 +4,12 @@ import store from "@/store/store.ts";
import { Bubble, IBubbleInfo } from "@/pages/HomePage/Top/Components/Bubble.ts";
import { OverflowBubble } from "@/pages/HomePage/Top/Components/OverflowBubble.ts";
import { handleLogExposure } from "@/MD.ts";
import { PlantGameBubble } from "@/pages/HomePage/Top/Components/PlantGameBubble.ts";
const posArr = [
{ x: 570, y: 250 },
{ x: 675, y: 450 },
{ x: 90, y: 440 },
// { x: 90, y: 440 },
{ x: 645, y: 660 },
]
......@@ -19,9 +20,11 @@ export class BubbleMgr extends Base {
bubbleMap: Map<string, Bubble> = new Map();
overflowBubble: OverflowBubble;
plantGameBubble: PlantGameBubble;
onLoad() {
this.overflowBubble = this.addChild(new OverflowBubble());
this.plantGameBubble = this.addChild(new PlantGameBubble());
}
@reactor(() => store.indexData.bubbleRecords)
......@@ -29,7 +32,7 @@ export class BubbleMgr extends Base {
if (!bubbleRecords?.length) return;
const bubbles = bubbleRecords.slice(0, 4);
const bubbles = bubbleRecords.slice(0, posArr.length);
const newBubbleKeys = [];
bubbles.forEach((info) => newBubbleKeys.push(info.id));
......@@ -55,7 +58,7 @@ export class BubbleMgr extends Base {
// 找到bubbleArr第一个空的位置
let emptyPos = -1;
for (let i = 0; i < 4; i++) {
for (let i = 0; i < posArr.length; i++) {
if (!this.bubbleArr[i]) {
emptyPos = i;
break;
......
import { Base, IBase } from "@/pages/HomePage/Top/base/Base.ts";
import { Assets, Container, Sprite, Text, Ticker } from "pixi.js";
import { Ease, Tween } from "@/core/tween";
import { _asyncThrottle, prefixInteger } from "@/utils/utils.ts";
import { reactor, observer } from "@/pages/HomePage/Top/mobx/decorators.ts";
import { handleLogClick, handleLogExposure } from "@/MD.ts";
@observer
export class PlantGameBubble extends Container implements IBase {
text: Text;
time: Text;
id: string;
constructor() {
super();
this.onLoad();
this.on("pointerup", this.onPointerUp, this);
}
onLoad() {
this.position.set(90, 440);
this.addChild(new Sprite(Assets.get("去种树.png")))
.anchor.set(0.5);
this.effect();
}
onPointerUp = _asyncThrottle(async () => {
location.href = "https://89420-activity.dexfu.cn/projectx/p124e3402/index.html?appID=89420"
});
effect() {
const y = this.y;
Tween.get(this, { loop: true })
.to({ y: y + 25 }, 2000, Ease.quadInOut)
.to({ y: y }, 2000, Ease.quadInOut);
}
onUpdate(time: Ticker) {
}
onDestroy() {
Tween.removeTweens(this);
}
destroy() {
this.onDestroy();
super.destroy();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment