docs(readme): drop Paper feature, simplify gallery, add scripts inventory

Major restructure:
- Remove Paper feature entirely (IPaperSurface, PaperSurface, PaperSurfaceModule).
  Paper is just RectTransforms in the ColorBook scene, exposed via a
  ColorBookSceneRefs MonoBehaviour the scope registers as a singleton.
- Simplify IGalleryService to a single SaveToDeviceAsync(byte[], albumName)
  shim over a native gallery plugin. Drop ListAsync / LoadFullAsync /
  LoadThumbnailAsync / DeleteAsync / GetLatestThumbnailAsync /
  SavedArtworkDTO / sidecar JSON / persistentDataPath gallery folder.
- Drop ArtBook feature (no in-app gallery — users view captures in phone
  Photos). Removes ArtBookLifetimeScope, GalleryPresenter, IExternalShareService.
- Replace ArtworkCapturedSignal / ArtworkSavedSignal with PaperCapturedSignal /
  PaperSavedSignal (templateId only).
- Capture and Gallery are now independent: ICaptureService produces PNG bytes,
  IGalleryService writes them to native Photos. CaptureController orchestrates
  the chain.
- Rewrite §11 Persistence — only ProtectedPlayerPrefs for settings/progression;
  no app-side image store.
- Remove §28 SavedArtwork JSON Schema; replace with §28 Native Gallery
  Integration (plugin recommendations, permission flows).
- Add §31b: Scripts Inventory by Domain — comprehensive path-by-path table
  of every script (existing and planned) across Core / Libs / Services /
  Features / App, with status markers.
- Update Readme.docx — better formatting (page break before each numbered
  section, blue heading underlines, alternating row shading on tables,
  monospace code blocks with left accent bar, expanded title page).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Savya Bikram Shah
2026-05-27 15:07:13 +05:45
parent ec7f2b3eb7
commit 848b176953
4 changed files with 383 additions and 354 deletions

View File

@@ -5,6 +5,6 @@ namespace Darkmatter.Core.Contracts.Services.Gallery
{
public interface IGalleryService
{
void SaveImageAsync(Texture2D sprite, string fileName);
UniTask SaveImageAsync(Texture2D sprite, string fileName, string albumName = "Colorbook");
}
}

View File

@@ -1,3 +1,5 @@
using System;
using Cysharp.Threading.Tasks;
using Darkmatter.Core.Contracts.Services.Gallery;
using UnityEngine;
@@ -5,9 +7,33 @@ namespace Darkmatter.Services.Gallery
{
public class GalleryService : IGalleryService
{
public void SaveImageAsync(Texture2D image, string fileName)
public async UniTask SaveImageAsync(Texture2D image, string fileName, string albumName = "Colorbook")
{
NativeGallery.SaveImageToGallery(image, "ColorBook", fileName);
var permission = await NativeGallery.RequestPermissionAsync(NativeGallery.PermissionType.Write,
NativeGallery.MediaType.Image);
if (permission != NativeGallery.Permission.Granted)
{
return;
}
var tcs = new UniTaskCompletionSource();
NativeGallery.SaveImageToGallery(image, albumName,
filename: $"colorbook_{DateTime.UtcNow:yyyyMMdd_HHmmss}.png", callback: (success, path) =>
{
if (!success)
{
Debug.LogError("Failed to save image to gallery.");
}
else
{
Debug.Log($"Image saved to gallery at: {path}");
}
tcs.TrySetResult();
});
await tcs.Task;
}
}
}

BIN
Readme.docx Normal file

Binary file not shown.

705
Readme.md

File diff suppressed because it is too large Load Diff