From 2ced83398189ac47588ddde87fdbf5cae106aa4d Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Thu, 22 Oct 2026 23:26:02 +0900 Subject: bluebey-studio: 背景写真に「隠すマスク」を追加 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/bluebey-studio/src/urlState.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'public/bluebey-studio/src/urlState.js') diff --git a/public/bluebey-studio/src/urlState.js b/public/bluebey-studio/src/urlState.js index d6fb6bd..e1e5e3e 100644 --- a/public/bluebey-studio/src/urlState.js +++ b/public/bluebey-studio/src/urlState.js @@ -44,9 +44,10 @@ const TAG_PLAIN = '0'; const BASE64URL = /^[A-Za-z0-9_-]+$/; /** - * A copy of `state` that is safe to put in a URL. Only the inline background - * image is dropped (replaced with `null`), and only when it is a `data:` URL - * long enough to blow up the link. + * A copy of `state` that is safe to put in a URL. The inline background image + * and the occlusion mask are both multi-megabyte data URLs, so they are + * dropped (a link cannot carry them) and the mask is marked off; everything + * else is kept. */ export function stripForUrl(state) { // A JSON round-trip gives the copy for free and drops anything that could not @@ -58,6 +59,11 @@ export function stripForUrl(state) { if (typeof image === 'string' && image.startsWith('data:') && image.length > MAX_INLINE_IMAGE) { copy.view.backgroundImage = null; } + if (copy.view && (copy.view.occlusionMask || copy.view.occlusionInverse)) { + copy.view.occlusionMask = null; + copy.view.occlusionInverse = null; + copy.view.occlusionEnabled = false; + } return copy; } -- cgit v1.3.1