Skip to content

Commit

Permalink
feat(EntityModel): make sourcePath constructor property optional
Browse files Browse the repository at this point in the history
  • Loading branch information
meszaros-lajos-gyorgy committed Aug 19, 2023
1 parent 7373c82 commit c9d9b73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/EntityModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import { fileExists, roundToNDecimals } from './helpers.js'

type EntityModelConstructorProps = {
filename: string
sourcePath: string
/**
* default value is "./" (relative to the assets folder)
*/
sourcePath?: string
}

export class EntityModel {
Expand All @@ -25,7 +28,7 @@ export class EntityModel {

constructor(props: EntityModelConstructorProps) {
this.filename = props.filename
this.sourcePath = props.sourcePath
this.sourcePath = props.sourcePath ?? './'
this.originIdx = 0
}

Expand Down

0 comments on commit c9d9b73

Please sign in to comment.