Spaces:
Running
Running
| // Base bubble templates (defaults). Templates prefill everything except bubbleText.text for text templates. | |
| export const BaseBubbleTemplates = { | |
| // Simple text box: black text on white rounded box at top-center | |
| 'simple-top-center': { | |
| // top-level bubble background controls whether a box is rendered | |
| backgroundColor: '#ffffff', | |
| borderRadius: 20, | |
| normalizeAudio: true, | |
| audioEffectFile: 'click', | |
| audioEffectDurationSec: 0.2, | |
| animExtra: { | |
| template: 'slide_down', | |
| durationSec: 0.1 | |
| }, | |
| bubbleText: { | |
| fontSize: 100, | |
| fontColor: '#1a1a1c', | |
| fontName: 'Montserrat', | |
| fontWeight: '700', | |
| }, | |
| bubbleExtra: { | |
| positionX: 'center', | |
| positionY: 'top' | |
| } | |
| }, | |
| // image-only variant: the caller must still provide the path when using this | |
| // template. animation defaults are pulled up to the top level so they survive | |
| // the case where the user specifies `mediaAbsPath` as a simple string. | |
| 'simple-top-center-media': { | |
| borderRadius: 20, | |
| normalizeAudio: true, | |
| audioEffectFile: 'woosh', | |
| audioEffectDurationSec: 0.2, | |
| // default animation for the overlay itself. callers can override | |
| animExtra: { | |
| template: 'slide_down', | |
| durationSec: 0.1 | |
| }, | |
| bubbleExtra: { | |
| positionX: 'center', | |
| positionY: 'top', | |
| size: 'full', // | 'half' // useful for images and videos | |
| paddingX: 10, // number in percentage | |
| paddingY: 10 // number in percentage | |
| } | |
| }, | |
| 'simple-full-media': { | |
| borderRadius: 20, | |
| normalizeAudio: true, | |
| audioEffectFile: 'woosh', | |
| audioEffectDurationSec: 0.2, | |
| // default animation for the overlay itself. callers can override | |
| animExtra: { | |
| template: 'slide_down', | |
| durationSec: 0.1 | |
| }, | |
| bubbleExtra: { | |
| positionX: 'full', | |
| positionY: 'full', | |
| size: 'full', // | 'half' // useful for images and videos | |
| paddingX: 0, // number in percentage | |
| paddingY: 0 // number in percentage | |
| } | |
| } | |
| }; | |