File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,9 @@ function normalizePresetTypes(preset: Preset): StatePreset {
4949export function initializePresets ( presetOptions : ButterchurnOptions ) : Thunk {
5050 return async ( dispatch ) => {
5151 const { getPresets, importButterchurn } = presetOptions ;
52- importButterchurn ( ) . then ( ( butterchurn ) => {
53- dispatch ( { type : GOT_BUTTERCHURN , butterchurn : butterchurn . default } ) ;
52+ importButterchurn ( ) . then ( ( butterchurnModule ) => {
53+ const butterchurn = butterchurnModule . default ?? butterchurnModule ;
54+ dispatch ( { type : GOT_BUTTERCHURN , butterchurn } ) ;
5455 } ) ;
5556
5657 const presets = await getPresets ( ) ;
Original file line number Diff line number Diff line change @@ -6,8 +6,18 @@ import butterchurn from "butterchurn/dist/butterchurn.min.js"; // buterchurn@3.0
66// @ts -ignore
77import butterchurnPresets from "butterchurn-presets/dist/base.js" ; // butterchurn-presets@3.0.0-beta.4
88
9- console . log ( "Using butterchurn" , butterchurn ) ;
10- console . log ( "Using butterchurn presets" , butterchurnPresets ) ;
9+ const DEFAULT_BUTTERCHURN_WINDOW_LAYOUT = {
10+ main : { position : { left : 0 , top : 0 } } ,
11+ equalizer : { position : { left : 0 , top : 116 } } ,
12+ playlist : {
13+ position : { left : 0 , top : 232 } ,
14+ size : { extraHeight : 4 , extraWidth : 0 } ,
15+ } ,
16+ milkdrop : {
17+ position : { left : 275 , top : 0 } ,
18+ size : { extraHeight : 12 , extraWidth : 7 } ,
19+ } ,
20+ } ;
1121
1222export default class WebampWithButterchurn extends Webamp {
1323 constructor ( options : Options & PrivateOptions ) {
@@ -21,7 +31,9 @@ export default class WebampWithButterchurn extends Webamp {
2131 return { name, butterchurnPresetObject : preset } ;
2232 } ) ;
2333 } ,
34+ butterchurnOpen : true ,
2435 } ,
36+ windowLayout : options . windowLayout ?? DEFAULT_BUTTERCHURN_WINDOW_LAYOUT ,
2537 } ) ;
2638 }
2739}
You can’t perform that action at this time.
0 commit comments