feat(icons): 新增微软 Fluent Emoji 3D 位图图标源(1586 个,MIT),支持位图图标渲染与导出内联
@@ -24,7 +24,7 @@ h1{font-size:16px}h2{font-size:14px;margin:14px 0 6px}
|
|||||||
<script src="js/data/decorations.js"></script>
|
<script src="js/data/decorations.js"></script>
|
||||||
<script src="js/core/store.js?v=20260816"></script>
|
<script src="js/core/store.js?v=20260816"></script>
|
||||||
<script src="js/core/ai.js?v=20260927a"></script>
|
<script src="js/core/ai.js?v=20260927a"></script>
|
||||||
<script src="js/core/exporter.js?v=20260812h"></script>
|
<script src="js/core/exporter.js?v=20261105a"></script>
|
||||||
<script src="js/core/generator.js?v=20260815c"></script>
|
<script src="js/core/generator.js?v=20260815c"></script>
|
||||||
<script src="js/core/avatarGen.js?v=20260815c"></script>
|
<script src="js/core/avatarGen.js?v=20260815c"></script>
|
||||||
<script src="js/core/motion.js?v=20260823h"></script>
|
<script src="js/core/motion.js?v=20260823h"></script>
|
||||||
@@ -33,9 +33,9 @@ h1{font-size:16px}h2{font-size:14px;margin:14px 0 6px}
|
|||||||
<script src="js/core/emojiAi.js?v=20260824a"></script>
|
<script src="js/core/emojiAi.js?v=20260824a"></script>
|
||||||
<script src="js/sticker-skills/core.js?v=20260823e"></script>
|
<script src="js/sticker-skills/core.js?v=20260823e"></script>
|
||||||
<script src="js/sticker-skills/skills.js?v=20260824a"></script>
|
<script src="js/sticker-skills/skills.js?v=20260824a"></script>
|
||||||
<script src="js/data/builtin-icons.js?v=20261105c"></script>
|
<script src="js/data/builtin-icons.js?v=20261105d"></script>
|
||||||
<script src="js/data/cn-tags.js?v=20261104a"></script>
|
<script src="js/data/cn-tags.js?v=20261104a"></script>
|
||||||
<script src="js/core/iconlib.js?v=20261105c"></script>
|
<script src="js/core/iconlib.js?v=20261105d"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
"flat-ui.js",
|
"flat-ui.js",
|
||||||
"flowbite.js",
|
"flowbite.js",
|
||||||
"fluent-color.js",
|
"fluent-color.js",
|
||||||
|
"fluent-emoji-3d.js",
|
||||||
"fluent-emoji-flat.js",
|
"fluent-emoji-flat.js",
|
||||||
"fluent-emoji-high-contrast.js",
|
"fluent-emoji-high-contrast.js",
|
||||||
"fluent-emoji.js",
|
"fluent-emoji.js",
|
||||||
|
|||||||
@@ -60,6 +60,24 @@ function svgToCanvas(svgStr, size){
|
|||||||
img.src = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svgStr);
|
img.src = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svgStr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 位图图标(3D PNG)以相对 href 引用:转 data URI 后相对路径失效,需先内联为 base64 */
|
||||||
|
async function inlineRaster(svgStr){
|
||||||
|
const re = /href="(js\/data\/sources\/[^"]+\.png)"/g;
|
||||||
|
const paths = [...new Set([...svgStr.matchAll(re)].map(m => m[1]))];
|
||||||
|
for (const p of paths){
|
||||||
|
try{
|
||||||
|
const blob = await (await fetch(p)).blob();
|
||||||
|
const data = await new Promise((res, rej) => {
|
||||||
|
const fr = new FileReader();
|
||||||
|
fr.onload = () => res(fr.result);
|
||||||
|
fr.onerror = rej;
|
||||||
|
fr.readAsDataURL(blob);
|
||||||
|
});
|
||||||
|
svgStr = svgStr.split('href="' + p + '"').join('href="' + data + '"');
|
||||||
|
}catch(e){ /* 取不到则保持原引用,由像素检测判定空白 */ }
|
||||||
|
}
|
||||||
|
return svgStr;
|
||||||
|
}
|
||||||
async function run(){
|
async function run(){
|
||||||
const out = document.getElementById('out');
|
const out = document.getElementById('out');
|
||||||
const qs = new URLSearchParams(location.search);
|
const qs = new URLSearchParams(location.search);
|
||||||
@@ -101,7 +119,7 @@ async function run(){
|
|||||||
// 其余按描边/填充型处理
|
// 其余按描边/填充型处理
|
||||||
const body = preserve ? ic.svg : prepareBody(ic.svg, isSt);
|
const body = preserve ? ic.svg : prepareBody(ic.svg, isSt);
|
||||||
svg.innerHTML = body;
|
svg.innerHTML = body;
|
||||||
const full = new XMLSerializer().serializeToString(svg);
|
const full = await inlineRaster(new XMLSerializer().serializeToString(svg));
|
||||||
const r = await svgToCanvas(full, size);
|
const r = await svgToCanvas(full, size);
|
||||||
if (r.blank) {
|
if (r.blank) {
|
||||||
blank++;
|
blank++;
|
||||||
|
|||||||
@@ -88,8 +88,8 @@
|
|||||||
<div class="dc-group">
|
<div class="dc-group">
|
||||||
<div class="modal-label">🎨 选择图标(1-5 个,不选则 AI 自动选用)</div>
|
<div class="modal-label">🎨 选择图标(1-5 个,不选则 AI 自动选用)</div>
|
||||||
<div id="design-icons" class="design-icons"></div>
|
<div id="design-icons" class="design-icons"></div>
|
||||||
<button class="tb-btn w-full import-more-btn" id="btn-builtin-icons" title="浏览并选择内置的 32 万+ 开源图标,供 AI 设计使用">
|
<button class="tb-btn w-full import-more-btn" id="btn-builtin-icons" title="浏览并选择内置的 44 万+ 开源图标,供 AI 设计使用">
|
||||||
📦 内置库浏览选择(32 万+)
|
📦 内置库浏览选择(44 万+)
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -283,7 +283,7 @@
|
|||||||
<div id="builtin-modal" class="modal-mask hidden">
|
<div id="builtin-modal" class="modal-mask hidden">
|
||||||
<div class="modal builtin-modal">
|
<div class="modal builtin-modal">
|
||||||
<div class="modal-head">
|
<div class="modal-head">
|
||||||
<span class="modal-title">📦 内置图标库(离线 32 万+)</span>
|
<span class="modal-title">📦 内置图标库(离线 44 万+)</span>
|
||||||
<span class="modal-title-sub" id="builtin-head-info"></span>
|
<span class="modal-title-sub" id="builtin-head-info"></span>
|
||||||
<button class="modal-close" data-builtin-close>✕</button>
|
<button class="modal-close" data-builtin-close>✕</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -309,7 +309,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ===== GitHub 资源浏览弹窗(已移除:内置 32 万+ 图标库覆盖需求) ===== -->
|
<!-- ===== GitHub 资源浏览弹窗(已移除:内置 44 万+ 图标库覆盖需求) ===== -->
|
||||||
|
|
||||||
<!-- 脚本 -->
|
<!-- 脚本 -->
|
||||||
<script src="js/data/icons.js"></script>
|
<script src="js/data/icons.js"></script>
|
||||||
@@ -319,7 +319,7 @@
|
|||||||
<script src="js/data/fonts.js"></script>
|
<script src="js/data/fonts.js"></script>
|
||||||
<script src="js/data/decorations.js"></script>
|
<script src="js/data/decorations.js"></script>
|
||||||
<script src="js/core/store.js?v=20260816"></script>
|
<script src="js/core/store.js?v=20260816"></script>
|
||||||
<script src="js/core/exporter.js?v=20260812h"></script>
|
<script src="js/core/exporter.js?v=20261105a"></script>
|
||||||
<script src="js/core/generator.js?v=20260815c"></script>
|
<script src="js/core/generator.js?v=20260815c"></script>
|
||||||
<script src="js/core/avatarGen.js?v=20260815c"></script>
|
<script src="js/core/avatarGen.js?v=20260815c"></script>
|
||||||
<script src="js/core/dicebear.js?v=20260822e"></script>
|
<script src="js/core/dicebear.js?v=20260822e"></script>
|
||||||
@@ -333,10 +333,10 @@
|
|||||||
<script src="js/skills/ai.js?v=20260815b"></script>
|
<script src="js/skills/ai.js?v=20260815b"></script>
|
||||||
<script src="js/skills/presentation.js?v=20260823d"></script>
|
<script src="js/skills/presentation.js?v=20260823d"></script>
|
||||||
<script src="js/skills/export.js?v=20260823d"></script>
|
<script src="js/skills/export.js?v=20260823d"></script>
|
||||||
<script src="js/ui/panels.js?v=20261105d"></script>
|
<script src="js/ui/panels.js?v=20261105e"></script>
|
||||||
<script src="js/data/builtin-icons.js?v=20261105c"></script>
|
<script src="js/data/builtin-icons.js?v=20261105d"></script>
|
||||||
<script src="js/data/cn-tags.js?v=20261104a"></script>
|
<script src="js/data/cn-tags.js?v=20261104a"></script>
|
||||||
<script src="js/core/iconlib.js?v=20261105c"></script>
|
<script src="js/core/iconlib.js?v=20261105d"></script>
|
||||||
<script src="js/app.js"></script>
|
<script src="js/app.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -75,8 +75,8 @@
|
|||||||
<div class="dc-group">
|
<div class="dc-group">
|
||||||
<div class="modal-label">🎨 选择图标(1-5 个,不选则 AI 从行业与内置库自动选用)</div>
|
<div class="modal-label">🎨 选择图标(1-5 个,不选则 AI 从行业与内置库自动选用)</div>
|
||||||
<div id="design-icons" class="design-icons"></div>
|
<div id="design-icons" class="design-icons"></div>
|
||||||
<button class="tb-btn w-full import-more-btn" id="btn-builtin-icons" title="浏览并选择内置的 32 万+ 开源图标,供表情设计使用">
|
<button class="tb-btn w-full import-more-btn" id="btn-builtin-icons" title="浏览并选择内置的 44 万+ 开源图标,供表情设计使用">
|
||||||
📦 内置库浏览选择(32 万+)
|
📦 内置库浏览选择(44 万+)
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
<div id="builtin-modal" class="modal-mask hidden">
|
<div id="builtin-modal" class="modal-mask hidden">
|
||||||
<div class="modal builtin-modal">
|
<div class="modal builtin-modal">
|
||||||
<div class="modal-head">
|
<div class="modal-head">
|
||||||
<span class="modal-title">📦 内置图标库(离线 32 万+)</span>
|
<span class="modal-title">📦 内置图标库(离线 44 万+)</span>
|
||||||
<span class="modal-title-sub">点击选择图标(最多 5 个),用于表情方案</span>
|
<span class="modal-title-sub">点击选择图标(最多 5 个),用于表情方案</span>
|
||||||
<button class="modal-close" data-builtin-close>✕</button>
|
<button class="modal-close" data-builtin-close>✕</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -207,7 +207,7 @@
|
|||||||
<script src="js/data/decorations.js"></script>
|
<script src="js/data/decorations.js"></script>
|
||||||
<script src="js/core/store.js?v=20260816"></script>
|
<script src="js/core/store.js?v=20260816"></script>
|
||||||
<script src="js/core/ai.js?v=20260927a"></script>
|
<script src="js/core/ai.js?v=20260927a"></script>
|
||||||
<script src="js/core/exporter.js?v=20260812h"></script>
|
<script src="js/core/exporter.js?v=20261105a"></script>
|
||||||
<script src="js/core/generator.js?v=20260815c"></script>
|
<script src="js/core/generator.js?v=20260815c"></script>
|
||||||
<script src="js/core/avatarGen.js?v=20260815c"></script>
|
<script src="js/core/avatarGen.js?v=20260815c"></script>
|
||||||
<script src="js/core/motion.js?v=20260823h"></script>
|
<script src="js/core/motion.js?v=20260823h"></script>
|
||||||
@@ -216,9 +216,9 @@
|
|||||||
<script src="js/core/emojiAi.js?v=20260824a"></script>
|
<script src="js/core/emojiAi.js?v=20260824a"></script>
|
||||||
<script src="js/sticker-skills/core.js?v=20260823e"></script>
|
<script src="js/sticker-skills/core.js?v=20260823e"></script>
|
||||||
<script src="js/sticker-skills/skills.js?v=20260824a"></script>
|
<script src="js/sticker-skills/skills.js?v=20260824a"></script>
|
||||||
<script src="js/data/builtin-icons.js?v=20261105c"></script>
|
<script src="js/data/builtin-icons.js?v=20261105d"></script>
|
||||||
<script src="js/data/cn-tags.js?v=20261104a"></script>
|
<script src="js/data/cn-tags.js?v=20261104a"></script>
|
||||||
<script src="js/core/iconlib.js?v=20261105c"></script>
|
<script src="js/core/iconlib.js?v=20261105d"></script>
|
||||||
<script src="js/ui/emoji.js?v=20260824a"></script>
|
<script src="js/ui/emoji.js?v=20260824a"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<section class="hub-hero">
|
<section class="hub-hero">
|
||||||
<h1>今天想设计什么?</h1>
|
<h1>今天想设计什么?</h1>
|
||||||
<p class="hub-hero-sub">四套工作台共享同一套素材与技能:<b data-stat="icons">37 万</b>图标、<b data-stat="posters">1,582</b> 个海报素材、<b data-stat="skills">130</b> 个设计技能。</p>
|
<p class="hub-hero-sub">四套工作台共享同一套素材与技能:<b data-stat="icons">44 万</b>图标、<b data-stat="posters">1,582</b> 个海报素材、<b data-stat="skills">130</b> 个设计技能。</p>
|
||||||
<div id="hub-recent" class="hub-recent" aria-live="polite"></div>
|
<div id="hub-recent" class="hub-recent" aria-live="polite"></div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -90,8 +90,8 @@
|
|||||||
<div class="dc-group">
|
<div class="dc-group">
|
||||||
<div class="modal-label">🎨 选择图标(1-5 个,不选则 AI 自动选用)</div>
|
<div class="modal-label">🎨 选择图标(1-5 个,不选则 AI 自动选用)</div>
|
||||||
<div id="design-icons" class="design-icons"></div>
|
<div id="design-icons" class="design-icons"></div>
|
||||||
<button class="tb-btn w-full import-more-btn" id="btn-builtin-icons" title="浏览并选择内置的 32 万+ 开源图标,供 AI 设计使用">
|
<button class="tb-btn w-full import-more-btn" id="btn-builtin-icons" title="浏览并选择内置的 44 万+ 开源图标,供 AI 设计使用">
|
||||||
📦 内置库浏览选择(32 万+)
|
📦 内置库浏览选择(44 万+)
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@
|
|||||||
<div id="builtin-modal" class="modal-mask hidden">
|
<div id="builtin-modal" class="modal-mask hidden">
|
||||||
<div class="modal builtin-modal">
|
<div class="modal builtin-modal">
|
||||||
<div class="modal-head">
|
<div class="modal-head">
|
||||||
<span class="modal-title">📦 内置图标库(离线 32 万+)</span>
|
<span class="modal-title">📦 内置图标库(离线 44 万+)</span>
|
||||||
<span class="modal-title-sub" id="builtin-head-info"></span>
|
<span class="modal-title-sub" id="builtin-head-info"></span>
|
||||||
<button class="modal-close" data-builtin-close>✕</button>
|
<button class="modal-close" data-builtin-close>✕</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -311,7 +311,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ===== GitHub 资源浏览弹窗(已移除:内置 32 万+ 图标库覆盖需求) ===== -->
|
<!-- ===== GitHub 资源浏览弹窗(已移除:内置 44 万+ 图标库覆盖需求) ===== -->
|
||||||
|
|
||||||
<!-- 脚本 -->
|
<!-- 脚本 -->
|
||||||
<script src="js/data/icons.js"></script>
|
<script src="js/data/icons.js"></script>
|
||||||
@@ -321,7 +321,7 @@
|
|||||||
<script src="js/data/fonts.js"></script>
|
<script src="js/data/fonts.js"></script>
|
||||||
<script src="js/data/decorations.js"></script>
|
<script src="js/data/decorations.js"></script>
|
||||||
<script src="js/core/store.js?v=20260816"></script>
|
<script src="js/core/store.js?v=20260816"></script>
|
||||||
<script src="js/core/exporter.js?v=20260812h"></script>
|
<script src="js/core/exporter.js?v=20261105a"></script>
|
||||||
<script src="js/core/generator.js?v=20260815c"></script>
|
<script src="js/core/generator.js?v=20260815c"></script>
|
||||||
<script src="js/core/avatarGen.js?v=20260815c"></script>
|
<script src="js/core/avatarGen.js?v=20260815c"></script>
|
||||||
<script src="js/core/dicebear.js?v=20260822e"></script>
|
<script src="js/core/dicebear.js?v=20260822e"></script>
|
||||||
@@ -335,10 +335,10 @@
|
|||||||
<script src="js/skills/ai.js?v=20260815b"></script>
|
<script src="js/skills/ai.js?v=20260815b"></script>
|
||||||
<script src="js/skills/presentation.js?v=20260824a"></script>
|
<script src="js/skills/presentation.js?v=20260824a"></script>
|
||||||
<script src="js/skills/export.js?v=20260824a"></script>
|
<script src="js/skills/export.js?v=20260824a"></script>
|
||||||
<script src="js/ui/panels.js?v=20261105d"></script>
|
<script src="js/ui/panels.js?v=20261105e"></script>
|
||||||
<script src="js/data/builtin-icons.js?v=20261105c"></script>
|
<script src="js/data/builtin-icons.js?v=20261105d"></script>
|
||||||
<script src="js/data/cn-tags.js?v=20261104a"></script>
|
<script src="js/data/cn-tags.js?v=20261104a"></script>
|
||||||
<script src="js/core/iconlib.js?v=20261105c"></script>
|
<script src="js/core/iconlib.js?v=20261105d"></script>
|
||||||
<script src="js/app.js"></script>
|
<script src="js/app.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -220,9 +220,13 @@ const HGB_Exporter = (function () {
|
|||||||
* @param {string|null} bgColor 背景色;null 表示透明
|
* @param {string|null} bgColor 背景色;null 表示透明
|
||||||
*/
|
*/
|
||||||
function renderCanvas(size, bgColor, svgOverride) {
|
function renderCanvas(size, bgColor, svgOverride) {
|
||||||
return new Promise((resolve, reject) => {
|
const raw = svgOverride ||
|
||||||
const svgStr = svgOverride ||
|
|
||||||
buildExportSvg(bgColor === undefined ? null : bgColor);
|
buildExportSvg(bgColor === undefined ? null : bgColor);
|
||||||
|
// 位图图标(3D PNG)以相对 href 引用,转 blob 后相对路径失效 → 先内联为 data URI
|
||||||
|
const ready = (typeof HGB_IconLib !== 'undefined' && HGB_IconLib.inlineRasters)
|
||||||
|
? HGB_IconLib.inlineRasters(raw)
|
||||||
|
: Promise.resolve(raw);
|
||||||
|
return ready.then((svgStr) => new Promise((resolve, reject) => {
|
||||||
const blob = new Blob([svgStr], { type: 'image/svg+xml;charset=utf-8' });
|
const blob = new Blob([svgStr], { type: 'image/svg+xml;charset=utf-8' });
|
||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
|
|
||||||
@@ -245,12 +249,15 @@ const HGB_Exporter = (function () {
|
|||||||
reject(new Error('SVG 渲染失败,请检查元素内容'));
|
reject(new Error('SVG 渲染失败,请检查元素内容'));
|
||||||
};
|
};
|
||||||
img.src = url;
|
img.src = url;
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ============ 导出:SVG ============ */
|
/* ============ 导出:SVG ============ */
|
||||||
function exportSvg(svgOverride, bgColor) {
|
async function exportSvg(svgOverride, bgColor) {
|
||||||
const svgStr = svgOverride || buildExportSvg(bgColor || HGB_Store.get().bg || '#FFFFFF');
|
let svgStr = svgOverride || buildExportSvg(bgColor || HGB_Store.get().bg || '#FFFFFF');
|
||||||
|
if (typeof HGB_IconLib !== 'undefined' && HGB_IconLib.inlineRasters) {
|
||||||
|
svgStr = await HGB_IconLib.inlineRasters(svgStr);
|
||||||
|
}
|
||||||
download(svgStr, 'image/svg+xml', safeName() + '.svg');
|
download(svgStr, 'image/svg+xml', safeName() + '.svg');
|
||||||
return svgStr;
|
return svgStr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
const HGB_IconLib = (function () {
|
const HGB_IconLib = (function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const VERSION = '20261105c'; // 与 index.html 中 builtin-icons.js?v= 版本联动
|
const VERSION = '20261105d'; // 与 index.html 中 builtin-icons.js?v= 版本联动
|
||||||
const cache = {}; // sid -> {icons:[...]}
|
const cache = {}; // sid -> {icons:[...]}
|
||||||
const pending = {}; // sid -> Promise
|
const pending = {}; // sid -> Promise
|
||||||
|
|
||||||
@@ -206,9 +206,54 @@ const HGB_IconLib = (function () {
|
|||||||
return String(fullId || '').split(':')[0];
|
return String(fullId || '').split(':')[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ---------- 位图图标内联(PNG 导出用) ---------- */
|
||||||
|
// 3D 位图图标的数据文件以 <image href="js/data/sources/...png"> 引用原图,
|
||||||
|
// 页面内联渲染可直接显示;但导出 PNG/PDF/SVG 时 SVG 会被转成 blob/data URI,
|
||||||
|
// 相对路径失效 → 导出前把 href 内联成 data URI(按路径缓存,只取一次)。
|
||||||
|
var rasterCache = {}; // 相对路径 -> data URI
|
||||||
|
var RASTER_RE = /href="(js\/data\/sources\/[^"]+\.png)"/g;
|
||||||
|
|
||||||
|
/** 是否含位图图标引用 */
|
||||||
|
function hasRaster(svg) {
|
||||||
|
return typeof svg === 'string' && svg.indexOf('js/data/sources/') !== -1 && svg.indexOf('.png"') !== -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
function fetchDataURI(p) {
|
||||||
|
if (rasterCache[p]) return Promise.resolve(rasterCache[p]);
|
||||||
|
return fetch(p).then(function (r) {
|
||||||
|
if (!r.ok) throw new Error('位图加载失败: ' + p);
|
||||||
|
return r.blob();
|
||||||
|
}).then(function (blob) {
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
var fr = new FileReader();
|
||||||
|
fr.onload = function () { rasterCache[p] = fr.result; resolve(fr.result); };
|
||||||
|
fr.onerror = reject;
|
||||||
|
fr.readAsDataURL(blob);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 把 svg 里的位图相对引用内联为 data URI(导出前调用;无位图时原样返回) */
|
||||||
|
function inlineRasters(svg) {
|
||||||
|
if (!hasRaster(svg)) return Promise.resolve(svg);
|
||||||
|
var paths = [], m;
|
||||||
|
RASTER_RE.lastIndex = 0;
|
||||||
|
while ((m = RASTER_RE.exec(svg))) {
|
||||||
|
if (paths.indexOf(m[1]) === -1) paths.push(m[1]);
|
||||||
|
}
|
||||||
|
return Promise.all(paths.map(fetchDataURI)).then(function () {
|
||||||
|
var out = svg;
|
||||||
|
paths.forEach(function (p) {
|
||||||
|
out = out.split('href="' + p + '"').join('href="' + rasterCache[p] + '"');
|
||||||
|
});
|
||||||
|
return out;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
VERSION, loadSource, loadSources, preload, loadAll,
|
VERSION, loadSource, loadSources, preload, loadAll,
|
||||||
getSource, loaded, loadedIds, findIcon, searchLoaded, searchIndex, sourceOf,
|
getSource, loaded, loadedIds, findIcon, searchLoaded, searchIndex, sourceOf,
|
||||||
expandKeyword, matchIcon: iconMatches, scoreIcon
|
expandKeyword, matchIcon: iconMatches, scoreIcon,
|
||||||
|
hasRaster, inlineRasters
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -1804,6 +1804,35 @@
|
|||||||
{ id: 'withicons-lunar', type: 'emoji', name: 'With Icons Lunar', nameCn: '春节图标', desc: '中国春节主题图标,灯笼、红包与生肖元素,适合年节营销', style: '节日', license: 'MIT', licenseNote: 'MIT 协议,可商用', home: 'https://withicons.com', github: '', npm: '@iconify-json/withicons-lunar', format: 'iconify', scaleMode: 'body', coordText: '24 坐标归一化', variants: '多色 1 套', added: '2026-11-05' },
|
{ id: 'withicons-lunar', type: 'emoji', name: 'With Icons Lunar', nameCn: '春节图标', desc: '中国春节主题图标,灯笼、红包与生肖元素,适合年节营销', style: '节日', license: 'MIT', licenseNote: 'MIT 协议,可商用', home: 'https://withicons.com', github: '', npm: '@iconify-json/withicons-lunar', format: 'iconify', scaleMode: 'body', coordText: '24 坐标归一化', variants: '多色 1 套', added: '2026-11-05' },
|
||||||
{ id: 'withicons-rangoli', type: 'emoji', name: 'With Icons Rangoli', nameCn: '排灯节图标', desc: '印度排灯节主题图标,彩绘与灯饰元素,适合节庆与跨文化设计', style: '节日', license: 'MIT', licenseNote: 'MIT 协议,可商用', home: 'https://withicons.com', github: '', npm: '@iconify-json/withicons-rangoli', format: 'iconify', scaleMode: 'body', coordText: '24 坐标归一化', variants: '多色 1 套', added: '2026-11-05' },
|
{ id: 'withicons-rangoli', type: 'emoji', name: 'With Icons Rangoli', nameCn: '排灯节图标', desc: '印度排灯节主题图标,彩绘与灯饰元素,适合节庆与跨文化设计', style: '节日', license: 'MIT', licenseNote: 'MIT 协议,可商用', home: 'https://withicons.com', github: '', npm: '@iconify-json/withicons-rangoli', format: 'iconify', scaleMode: 'body', coordText: '24 坐标归一化', variants: '多色 1 套', added: '2026-11-05' },
|
||||||
{ id: 'withicons-utsav', type: 'emoji', name: 'With Icons Utsav', nameCn: '印度节庆图标', desc: '印度节庆风格图标,色彩浓烈,适合文化活动和民族品牌', style: '节日', license: 'MIT', licenseNote: 'MIT 协议,可商用', home: 'https://withicons.com', github: '', npm: '@iconify-json/withicons-utsav', format: 'iconify', scaleMode: 'body', coordText: '24 坐标归一化', variants: '多色 1 套', added: '2026-11-05' },
|
{ id: 'withicons-utsav', type: 'emoji', name: 'With Icons Utsav', nameCn: '印度节庆图标', desc: '印度节庆风格图标,色彩浓烈,适合文化活动和民族品牌', style: '节日', license: 'MIT', licenseNote: 'MIT 协议,可商用', home: 'https://withicons.com', github: '', npm: '@iconify-json/withicons-utsav', format: 'iconify', scaleMode: 'body', coordText: '24 坐标归一化', variants: '多色 1 套', added: '2026-11-05' },
|
||||||
{ id: 'withicons-valentine', type: 'emoji', name: 'With Icons Valentine', nameCn: '情人节图标', desc: '情人节主题图标,爱心、玫瑰与巧克力,适合情侣营销与礼品', style: '节日', license: 'MIT', licenseNote: 'MIT 协议,可商用', home: 'https://withicons.com', github: '', npm: '@iconify-json/withicons-valentine', format: 'iconify', scaleMode: 'body', coordText: '24 坐标归一化', variants: '多色 1 套', added: '2026-11-05' }
|
{ id: 'withicons-valentine', type: 'emoji', name: 'With Icons Valentine', nameCn: '情人节图标', desc: '情人节主题图标,爱心、玫瑰与巧克力,适合情侣营销与礼品', style: '节日', license: 'MIT', licenseNote: 'MIT 协议,可商用', home: 'https://withicons.com', github: '', npm: '@iconify-json/withicons-valentine', format: 'iconify', scaleMode: 'body', coordText: '24 坐标归一化', variants: '多色 1 套', added: '2026-11-05' },
|
||||||
|
/* ============================================================
|
||||||
|
* —— 2026-11-05 3D 位图批次:Fluent Emoji 3D ——
|
||||||
|
* 微软官方 3D 渲染表情(PNG,MIT)。仓库体积过大无法整树枚举(jsDelivr API 403),
|
||||||
|
* 改走 GitHub Trees API 枚举 + jsDelivr CDN 单文件下载(format: 'gh-raster'):
|
||||||
|
* - 非人物表情直接 3D:assets/<Name>/3D/<slug>_3d.png
|
||||||
|
* - 人物表情仅取 Default 肤色:assets/<Name>/Default/3D/<slug>_3d_default.png
|
||||||
|
* (Dark/Light/Medium 等 5 种肤色变体同图重复,不收录)
|
||||||
|
* PNG 落盘 js/data/sources/fluent-emoji-3d/files/,图标 svg 为 <image> 引用,
|
||||||
|
* 导出时由 HGB_IconLib.inlineRasters 内联为 data URI
|
||||||
|
* ============================================================ */
|
||||||
|
{
|
||||||
|
id: 'fluent-emoji-3d',
|
||||||
|
type: 'emoji',
|
||||||
|
name: 'Fluent Emoji 3D',
|
||||||
|
nameCn: '微软 3D 立体表情',
|
||||||
|
desc: '微软 Fluent Emoji 官方 3D 渲染版(MIT),真实光影与立体材质,覆盖食物、动物、活动、物体、符号等全品类,适合立体质感 LOGO、头像与社交素材',
|
||||||
|
style: '3D',
|
||||||
|
license: 'MIT',
|
||||||
|
licenseNote: 'MIT 协议,可自由商用、修改与再分发,需保留版权声明',
|
||||||
|
home: 'https://github.com/microsoft/fluentui-emoji',
|
||||||
|
github: 'https://github.com/microsoft/fluentui-emoji',
|
||||||
|
format: 'gh-raster',
|
||||||
|
gh: 'microsoft/fluentui-emoji',
|
||||||
|
ghBranch: 'main',
|
||||||
|
pathRe: '^assets/[^/]+/(?:Default/)?3D/[^/]+\\.png$',
|
||||||
|
coordText: '3D 渲染 PNG(原始 256×256),渲染时按 24 视口等比缩放',
|
||||||
|
variants: '非人物直接 3D + 人物 Default 肤色,共约 1,595 个',
|
||||||
|
added: '2026-11-05'
|
||||||
|
}
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
## 生成时间
|
## 生成时间
|
||||||
|
|
||||||
2026-11-04T18:03:56.685Z
|
2026-11-05T03:30:14.648Z
|
||||||
|
|
||||||
## ① 图标库(共享,LOGO/头像/海报共用)
|
## ① 图标库(共享,LOGO/头像/海报共用)
|
||||||
|
|
||||||
- 源数:262 | 图标总数:443168
|
- 源数:263 | 图标总数:444754
|
||||||
- 类型分布:icon 177 / emoji 53 / brand 32
|
- 类型分布:icon 177 / emoji 54 / brand 32
|
||||||
- 源清单(含 count/file/workspaces):js/data/manifest/icons.json
|
- 源清单(含 count/file/workspaces):js/data/manifest/icons.json
|
||||||
|
|
||||||
## ② 海报素材库
|
## ② 海报素材库
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"kind": "icons",
|
"kind": "icons",
|
||||||
"total": 443168,
|
"total": 444754,
|
||||||
"builtAt": "2026-11-04T17:20:41.111Z",
|
"builtAt": "2026-11-05T03:24:17.570Z",
|
||||||
"guide": "js/data/manifest/README.md",
|
"guide": "js/data/manifest/README.md",
|
||||||
"idRule": "「源:名称」,如 lucide:graduation-cap",
|
"idRule": "「源:名称」,如 lucide:graduation-cap",
|
||||||
"dicebear": {
|
"dicebear": {
|
||||||
@@ -6034,6 +6034,29 @@
|
|||||||
"logo",
|
"logo",
|
||||||
"avatar"
|
"avatar"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "fluent-emoji-3d",
|
||||||
|
"type": "emoji",
|
||||||
|
"name": "Fluent Emoji 3D",
|
||||||
|
"nameCn": "微软 3D 立体表情",
|
||||||
|
"desc": "微软 Fluent Emoji 官方 3D 渲染版(MIT),真实光影与立体材质,覆盖食物、动物、活动、物体、符号等全品类,适合立体质感 LOGO、头像与社交素材",
|
||||||
|
"style": "3D",
|
||||||
|
"license": "MIT",
|
||||||
|
"licenseNote": "MIT 协议,可自由商用、修改与再分发,需保留版权声明",
|
||||||
|
"home": "https://github.com/microsoft/fluentui-emoji",
|
||||||
|
"github": "https://github.com/microsoft/fluentui-emoji",
|
||||||
|
"npm": "",
|
||||||
|
"format": "gh-raster",
|
||||||
|
"coordText": "3D 渲染 PNG(原始 256×256),渲染时按 24 视口等比缩放",
|
||||||
|
"variants": "非人物直接 3D + 人物 Default 肤色,共约 1,595 个",
|
||||||
|
"added": "2026-11-05",
|
||||||
|
"count": 1586,
|
||||||
|
"file": "sources/fluent-emoji-3d.js",
|
||||||
|
"workspaces": [
|
||||||
|
"logo",
|
||||||
|
"avatar"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 30 KiB |