Skip to content

Commit

Permalink
refactor(paths): move instruments in dedicated folder
Browse files Browse the repository at this point in the history
  • Loading branch information
domi7777 committed Dec 28, 2024
1 parent 88e1736 commit 40f24f5
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {isDarkMode} from './settings/color-settings.ts';
import {EmptyScene} from './scenes/EmptyScene.ts';
import {TweakPane} from './settings/TweakPane.ts';
import {Colors} from './utils/colors.ts';
import {InstrumentScene, instrumentScenes} from './scenes/instrumentScenes.ts';
import {InstrumentScene, instrumentScenes} from './scenes/instruments/instrumentScenes.ts';

export class LarsenGame extends Phaser.Game {
static isInitialized = false;
Expand Down
2 changes: 1 addition & 1 deletion src/scenes/EmptyScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {LoopTracksScene} from './LoopTracksScene.ts';
import {Colors, colorToHex, PhaserColor, PhaserColors} from '../utils/colors.ts';
import {FontFamily, FontSize} from '../utils/fonts.ts';
import {EVENTS} from '../events.ts';
import {InstrumentScene, instrumentScenes} from './instrumentScenes.ts';
import {InstrumentScene, instrumentScenes} from './instruments/instrumentScenes.ts';
import {LarsenGame} from '../Game.ts';

export class EmptyScene extends Phaser.Scene {
Expand Down
2 changes: 1 addition & 1 deletion src/scenes/LoopTracksScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Colors, colorToHex, HexaColor, hexToColor, PhaserColors} from '../utils/
import {FontColor, FontFamily, FontSize} from '../utils/fonts.ts';
import {EmptyScene} from './EmptyScene.ts';
import {Loop} from '../Loop.ts';
import {PadsScene} from './PadsScene.ts';
import {PadsScene} from './instruments/PadsScene.ts';
import {EVENTS} from '../events.ts';

const controlIcons = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Colors, HexaColor, hexToColor, PhaserColors} from '../utils/colors.ts';
import {playSample, Sample} from '../samples/play-sample.ts';
import {Colors, HexaColor, hexToColor, PhaserColors} from '../../utils/colors.ts';
import {playSample, Sample} from '../../samples/play-sample.ts';
import {PadsScene} from './PadsScene.ts';

const padColors: Record<Sample, HexaColor> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {allFrequencies} from '../samples/synth-frequencies.ts';
import {createAudioContext} from '../samples/sample-utils.ts';
import {allFrequencies} from '../../samples/synth-frequencies.ts';
import {createAudioContext} from '../../samples/sample-utils.ts';
import {PianoScene} from './PianoScene.ts';
import Phaser from 'phaser';
import {PadsSceneSettings} from './PadsScene.ts';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {logger} from '../utils/logger.ts';
import {logger} from '../../utils/logger.ts';
import {PadsScene} from './PadsScene.ts';
import Phaser from 'phaser';
import {PhaserColors} from '../utils/colors.ts';
import {PhaserColors} from '../../utils/colors.ts';

declare const Freeverb: any, Bus2: any, Gibberish: any, Synth: any, Add: any, Sine: any, Sequencer: any;

Expand Down
12 changes: 6 additions & 6 deletions src/scenes/PadsScene.ts → src/scenes/instruments/PadsScene.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Phaser from 'phaser';
import {LoopTracksScene} from './LoopTracksScene.ts';
import {rotateArray} from '../utils/math.ts';
import {colorToHex, PhaserColor, PhaserColors} from '../utils/colors.ts';
import {FontColor, FontFamily, FontSize} from '../utils/fonts.ts';
import {EVENTS} from '../events.ts';
import {logger} from '../utils/logger.ts';
import {LoopTracksScene} from '../LoopTracksScene.ts';
import {rotateArray} from '../../utils/math.ts';
import {colorToHex, PhaserColor, PhaserColors} from '../../utils/colors.ts';
import {FontColor, FontFamily, FontSize} from '../../utils/fonts.ts';
import {EVENTS} from '../../events.ts';
import {logger} from '../../utils/logger.ts';

type Pad = {
instrument: number,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {PadsScene, PadsSceneSettings, PadText, Range, Setting} from './PadsScene.ts';
import {allFrequencies} from '../samples/synth-frequencies.ts';
import {createAudioContext} from '../samples/sample-utils.ts';
import {allFrequencies} from '../../samples/synth-frequencies.ts';
import {createAudioContext} from '../../samples/sample-utils.ts';
import Phaser from 'phaser';
import {PhaserColors} from '../utils/colors.ts';
import {PhaserColors} from '../../utils/colors.ts';

export class PianoScene extends PadsScene {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Phaser from 'phaser';
import {PhaserColor, PhaserColors} from '../utils/colors.ts';
import {PhaserColor, PhaserColors} from '../../utils/colors.ts';
import {GibberishScene} from './GiberishScene.ts';
import {DrumsScene} from './DrumsScene.ts';
import {ElectroScene} from './ElectroScene.ts';
import {PianoScene} from './PianoScene.ts';
import {ValueOf} from '../utils/types.ts';
import {ValueOf} from '../../utils/types.ts';

export const instrumentScenes = {
synth: {
Expand Down
2 changes: 1 addition & 1 deletion src/settings/TweakPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {LoopTracksScene} from '../scenes/LoopTracksScene.ts';
import {logger} from '../utils/logger.ts';
import {BindingApi} from '@tweakpane/core';
import {EVENTS} from '../events.ts';
import {PadsSceneSettings} from '../scenes/PadsScene.ts';
import {PadsSceneSettings} from '../scenes/instruments/PadsScene.ts';

type MinMax = { min: number; max: number; };

Expand Down

0 comments on commit 40f24f5

Please sign in to comment.