Spaces:
Running
Running
File size: 2,073 Bytes
0eec79d 82367ec f8a99c0 048ed88 a997fd4 e03abf9 9fba405 0eec79d f2d0ffb f8a99c0 2887549 f8a99c0 0eec79d 9fba405 0eec79d 82367ec 23a704f 5f2100b 82367ec 048ed88 82367ec e03abf9 82367ec 5635fbe 844fd99 5635fbe 82367ec 0eec79d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | // 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
}
}
};
|