「益智遊戲」和「抽象弈棋」
-
ejsoon
一枝独秀
- 帖子: 6812
- 注册时间: 2022年 11月 18日 17:36
-
联系:
帖子
由 ejsoon »
背景要漸變
代码: 全选
之前是:
如果本局有勝負結果,把boardBackground的 fill改為url("#boardNormal"),即「<set attributeName="fill" to="url(#boardNormal)" begin="fistart.begin"/>」,再加上某一方贏了set贏的那一方的fill,即「<set attributeName="fill" to="url(#boardFireWin)" begin="fivline.begin"/>」。
現在不需要往boardBackground內加兩個set,而改成:
如果本局有勝負結果,在boardBackground的下方新增「<rect x="4" y="4" width="472" height="472" rx="28" fill="url(#boardNormal)" stroke="#f7e7bd" stroke-width="4"><animate attributeName="opacity" values="1;0;0;0;0;0;0;1" begin="fivline.begin" dur="5s" fill="freeze"/></rect>」。
claude sonnet 5 (medium)
代码: 全选
已修改 `addVictoryReplayAnimations` 函式裡的勝負閃爍效果:
**原本**是用 `<use href="#boardBackground">` 複製 `boardBackground`,這樣複製出來的元素會直接沿用當下 `boardBackground` 已經被 JS 設成的勝方顏色(`boardFireWin`/`boardIceWin`/`boardDraw`),而不是固定的一般盤面外觀。
**現在**改成直接建立一個新的 `<rect>`,屬性完全比照 `boardBackground` 的原始樣式硬編碼進去:
```js
const boardBackgroundNormal = createSVGElement('rect', {
x: '4',
y: '4',
width: '472',
height: '472',
rx: '28',
fill: 'url(#boardNormal)',
stroke: '#f7e7bd',
'stroke-width': '4'
});
```
再加上同樣的 `opacity` 動畫(`values="1;0;0;0;0;0;0;1"`、`begin="fivline.begin"`、`dur="5s"`、`fill="freeze"`),插入在 `boardBackground` 正下方。這樣這個蓋在上面的矩形固定顯示「一般盤面」外觀,不會受 `boardBackground` 實際 fill 值影響,勝負閃爍時才會正確地在「一般外觀」與「下方已經是勝方顏色的 boardBackground」之間切換/透出。
-
附件
-
ifif2436.html.7z
- (26.15 KiB) 已下载 5 次
-
ejsoon
一枝独秀
- 帖子: 6812
- 注册时间: 2022年 11月 18日 17:36
-
联系:
帖子
由 ejsoon »
當手機端時,下載svg窗口不需要全鋪開。
-
ejsoon
一枝独秀
- 帖子: 6812
- 注册时间: 2022年 11月 18日 17:36
-
联系:
帖子
由 ejsoon »
在圈圈圖庫分享圖片的時候,要加上/file才是圖片的直接鏈接?能否在Share Link中加上/file?
@圈宝
-
ejsoon
一枝独秀
- 帖子: 6812
- 注册时间: 2022年 11月 18日 17:36
-
联系:
帖子
由 ejsoon »
導出動畫存在亂碼:
代码: 全选
<g id="victoryLayer" fill="none" stroke-width="8" stroke-linecap="round" stroke-linejoin="round" opacity=".65" filter="url(#victoryGlow)" stroke="#ffe06c"><path d="
 M 240 73.625
 L 331.7985 232.625
 L 423.597 391.625
 "/><set attributeName="opacity" to="0" begin="fistart.begin"/><animate id="fivline" attributeName="opacity" values="0;1;0.7;1;0.7;1;0.7;1;0" begin="fi39.end+0.777s" dur="4s" fill="freeze"/></g>
-
圈宝
圈圈守护者
- 帖子: 240
- 注册时间: 2020年 12月 4日 20:46
- 我的状态: 🎯
帖子
由 圈宝 »
ejsoon 写了: 2026年 9月 14日 09:19
在圈圈圖庫分享圖片的時候,要加上/file才是圖片的直接鏈接?能否在Share Link中加上/file?
@圈宝
现在点击分享的时候,可以选择。
当时明月在,曾照彩云归
-
ejsoon
一枝独秀
- 帖子: 6812
- 注册时间: 2022年 11月 18日 17:36
-
联系:
帖子
由 ejsoon »
圈宝 写了: 2026年 9月 14日 10:33
ejsoon 写了: 2026年 9月 14日 09:19
在圈圈圖庫分享圖片的時候,要加上/file才是圖片的直接鏈接?能否在Share Link中加上/file?
@圈宝
现在点击分享的时候,可以选择。
可以了,謝謝!
-
ejsoon
一枝独秀
- 帖子: 6812
- 注册时间: 2022年 11月 18日 17:36
-
联系:
帖子
由 ejsoon »
點擊「複製」應有反應。
-
-
- 0 回复总数
- 12626 阅读次数
-
最新帖子 由 BobMaster
-
-
- 2 回复总数
- 8840 阅读次数
-
最新帖子 由 ejsoon
-
-
- 0 回复总数
- 7317 阅读次数
-
最新帖子 由 BobMaster
-
-
- 0 回复总数
- 4557 阅读次数
-
最新帖子 由 BobMaster
正浏览此版面之用户: 没有注册用户 和 35 访客