aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bluebey-studio/src/urlState.js
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-22 23:26:02 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-22 23:26:02 +0900
commit2ced83398189ac47588ddde87fdbf5cae106aa4d (patch)
treef8e22708d5f3261e0a890632d0e8800bd132c07f /public/bluebey-studio/src/urlState.js
parent6258fcb99337aa596f576a9275a867e0b9b2841f (diff)
bluebey-studio: 背景写真に「隠すマスク」を追加
Diffstat (limited to 'public/bluebey-studio/src/urlState.js')
-rw-r--r--public/bluebey-studio/src/urlState.js12
1 files changed, 9 insertions, 3 deletions
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;
}