Skip to content

Commit

Permalink
feat(EntityModel): add actionPoints property
Browse files Browse the repository at this point in the history
  • Loading branch information
meszaros-lajos-gyorgy committed Oct 9, 2023
1 parent d2df0f7 commit 988f526
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
@@ -1,7 +1,7 @@
import fs from 'node:fs'
import path from 'node:path'
import { FTL } from 'arx-convert'
import { ArxFTL, ArxFaceType } from 'arx-convert/types'
import { ArxAction, ArxFTL, ArxFaceType } from 'arx-convert/types'
import { Expand, TripleOf } from 'arx-convert/utils'
import { BufferAttribute, Mesh, MeshBasicMaterial, Vector2 } from 'three'
import { Settings } from '@src/Settings.js'
Expand All @@ -16,6 +16,7 @@ type EntityModelConstructorProps = {
* default value is "./" (relative to the assets folder)
*/
sourcePath?: string
actionPoints?: ArxAction[]
}

/**
Expand All @@ -33,10 +34,12 @@ export class EntityModel {
sourcePath: string
originIdx: number
threeJsObj?: Mesh
actionPoints: ArxAction[]

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

Expand Down Expand Up @@ -120,7 +123,7 @@ export class EntityModel {
faces: [],
textureContainers: [],
groups: [],
actions: [],
actions: this.actionPoints,
selections: [],
}

Expand Down

0 comments on commit 988f526

Please sign in to comment.