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:
@@ -1,5 +1,6 @@
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { FrameId } from '../types';
|
||||
import { IS_PRO_BUILD } from '../provariant';
|
||||
|
||||
// Lite (free, forever) vs PRO (one unlock key). The gate is on the FILE, not on
|
||||
// the preview: a Lite user may pick any preset, frame or watermark, compose
|
||||
@@ -18,6 +19,10 @@ export const PRO_FRAMES: FrameId[] = ['classic-white', 'polaroid', 'wallframe'];
|
||||
export const isFreeRecipe = (id: string | null | undefined): boolean =>
|
||||
!id || id.startsWith('sim-');
|
||||
|
||||
// Lite may store its own recipes, up to this many: creating and editing them is
|
||||
// free, deleting one is PRO — so a Lite list only ever grows to this size.
|
||||
export const LITE_RECIPE_LIMIT = 3;
|
||||
|
||||
// Burned into every Lite export, bottom-right of the photo/frame area. Fractions
|
||||
// of the stamp canvas, same space the custom mark uses.
|
||||
export const LITE_MARK = {
|
||||
@@ -43,8 +48,11 @@ export function proLookInUse(look: Look): string | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
// The Pro apk is the product: it is unlocked by being the paid build, and its
|
||||
// SETTINGS sheet never shows a key field. The Lite apk unlocks the same features
|
||||
// with a keygen key, which is what a buyer of the cheap tier gets instead.
|
||||
export const loadPro = async (): Promise<boolean> =>
|
||||
(await AsyncStorage.getItem(PRO_KEY)) === '1';
|
||||
IS_PRO_BUILD || (await AsyncStorage.getItem(PRO_KEY)) === '1';
|
||||
|
||||
// ---- unlock key -------------------------------------------------------------
|
||||
// Offline product key: 12 payload chars + 4 checksum chars, any punctuation
|
||||
|
||||
Reference in New Issue
Block a user