<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Share on PlumePHP</title><link>https://plumephp.com/tags/share/</link><description>Recent content in Share on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Mon, 27 Apr 2026 20:22:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/share/index.xml" rel="self" type="application/rss+xml"/><item><title>Phaser 拍照分享模式：截图、隐藏 HUD 和跨端保存限制要提前处理</title><link>https://plumephp.com/phaser-screenshot-share-photo-mode-2026/</link><pubDate>Mon, 27 Apr 2026 20:22:00 +0800</pubDate><guid>https://plumephp.com/phaser-screenshot-share-photo-mode-2026/</guid><description>&lt;h2 id="拍照模式不是截一下-canvas"&gt;拍照模式不是截一下 Canvas&lt;/h2&gt;
&lt;p&gt;很多 Phaser 游戏想做分享功能时，会直接调用 Canvas 的 &lt;code&gt;toDataURL()&lt;/code&gt;，把当前画面保存成图片。原型能跑，但上线会遇到一堆问题：HUD 挡住角色，截图时正好在伤害闪烁，跨域图片污染 Canvas，移动端保存失败，水印尺寸不对，玩家昵称或聊天内容被截进图里。拍照分享是内容传播功能，也涉及隐私和平台限制，不能只看技术上能不能导出图片。&lt;/p&gt;</description></item></channel></rss>