Ship LITE and PRO, and let CLARITY and LIGHT GLOW reach the library

Both flavors build from one JS tree: `lite` hands out the free apk
(com.locphamtran.recipescamera), `pro` sells as-is (same id + .pro, label
"RecipesCam Pro"). Release is signed from android/keystore.properties, both
files gitignored - lose either and no later build can install over this one.
The tier reaches JS through src/provariant.ts, which tools/set-variant.mjs
rewrites before each build (`npm run apk:lite` / `apk:pro`); the gradle flavor
alone would ship a Pro apk that thinks it is Lite.

The dev scaffolding goes: the three src/dev probes and their App effects, the
EXPO_PUBLIC_CAPTURE_MODE [CAPTURE] timing log, and the -PdevtestSuffix
side-by-side install hook. 'balanced' stays the shipped capture mode, which is
what those probes measured on the 12S Ultra.

Looking at the picture: WB now converts kelvin through the Planckian locus into
a luma-normalised gain (unity at 5500K, symmetric tint) instead of the old
one-sided push; LEITZ STREETLIFE splits into CLASSIC and VIVID; selecting a
recipe loads every knob it carries over the defaults and stays editable, and
RESET hands the panel back to the sim's own values. The in-app library picker,
the ultra-wide native module and recipe share/import land here too.

CLARITY and LIGHT GLOW existed only on the camera worklet and the export
engine, so a photo opened from the library ignored both. They now run in all
three library preview branches (libPhoto), and the preview clips them to the
drawn image - the export engine always clipped its bloom to the canvas, the
preview drew it over the whole rect, so the bloom bled past the photo onto the
black letterbox and over the frame's mat.
This commit is contained in:
2026-09-14 19:48:44 +07:00
parent 99405514c6
commit 97949e449d
49 changed files with 2050 additions and 659 deletions
+8 -4
View File
@@ -12,6 +12,7 @@ import { Recipe, GPSInfo, FrameId, AspectRatio, ColorAdjustments } from '../type
import { getSkiaColorMatrix, applyExposureGain } from './colorUtils';
import { getToneUniforms } from './toneShader';
import { getCinemaUniforms } from './cinemaShader';
import { ensureMediaLibraryPermission } from './mediaPermission';
import { nextPhotoPath, stampExifOnFile } from './photoMeta';
export interface NativeExportResult {
@@ -65,8 +66,11 @@ export async function processAndExportPhotoNative(
adjustments.exposureCompensation ?? 0
);
// Base filter is passed so a stock's own tone pass is picked up, but the
// Kotlin side only reads toneDr/Hl/Sh — the split-tone RGB (Classic Neg) is
// preview/engine only. Nothing in the app calls nativeExport (dev probe).
// Kotlin side only reads toneDr/Hl/Sh — the split-tone RGB (Classic Neg)
// and the Color Chrome/Chrome-Blue depths are preview/engine only, so a
// native-export build silently drops those three. ponytail: port them into
// applyTone() when the native path stops being a dev probe
// (EXPO_PUBLIC_NATIVE_EXPORT is not inlined into a release HBC bundle).
const tone = getToneUniforms(adjustments, recipe.baseFilter);
const cinema = getCinemaUniforms(recipe.cinema);
// Final screen sharpen (engine #9): the sharpening knob (0..10) overrides
@@ -114,8 +118,8 @@ export async function processAndExportPhotoNative(
sourceUri
);
const mediaPermission = await MediaLibrary.requestPermissionsAsync();
if (mediaPermission.granted) {
const mediaGranted = await ensureMediaLibraryPermission();
if (mediaGranted) {
try {
const asset = await MediaLibrary.createAssetAsync(exportFile);
return { uri: exportFile, savedToLibrary: true, assetId: asset.id };