Skip to content

Commit

Permalink
refactor(lifecycles): tidy imports
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Nov 17, 2024
1 parent 5489be7 commit b406048
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/lifecycles/gameInit.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import * as LittleJS from 'littlejsengine';
import { hsl, tile, vec2 } from 'littlejsengine';

import { setParticleEmitter } from '../shared';

const { tile, vec2, hsl } = LittleJS;

export function gameInit() {
// create tile collision and visible tile layer
const tileCollisionSize = vec2(32, 16);
Expand Down
3 changes: 1 addition & 2 deletions src/lifecycles/gameRender.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as LittleJS from 'littlejsengine';

const { tile, vec2, hsl } = LittleJS;
import { hsl, tile, vec2 } from 'littlejsengine';

export function gameRender() {
// draw a grey square in the background without using webgl
Expand Down
3 changes: 1 addition & 2 deletions src/lifecycles/gameRenderPost.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as LittleJS from 'littlejsengine';

const { vec2 } = LittleJS;
import { vec2 } from 'littlejsengine';

export function gameRenderPost() {
// draw to overlay canvas for hud rendering
Expand Down
3 changes: 1 addition & 2 deletions src/lifecycles/gameUpdate.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import * as LittleJS from 'littlejsengine';
import { hsl } from 'littlejsengine';

import { getParticleEmitter } from '../shared';

const { hsl } = LittleJS;

// sound effects
const sound_click = new LittleJS.Sound([1, 0.5]);

Expand Down

0 comments on commit b406048

Please sign in to comment.