Skip to content

Commit

Permalink
fix(EntityModel): the model is now rotated 90 degrees to match the be…
Browse files Browse the repository at this point in the history
…havior of loading meshes
  • Loading branch information
meszaros-lajos-gyorgy committed Oct 18, 2023
1 parent af29cf4 commit 99e863e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/EntityModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'node:path'
import { FTL } from 'arx-convert'
import { ArxAction, ArxFTL, ArxFaceType } from 'arx-convert/types'
import { Expand, TripleOf } from 'arx-convert/utils'
import { BufferAttribute, Mesh, MeshBasicMaterial, Vector2 } from 'three'
import { BufferAttribute, MathUtils, Mesh, MeshBasicMaterial, Vector2 } from 'three'
import { Settings } from '@src/Settings.js'
import { Texture } from '@src/Texture.js'
import { Vector3 } from '@src/Vector3.js'
Expand Down Expand Up @@ -111,6 +111,8 @@ export class EntityModel {

const { geometry, material } = this.threeJsObj as Mesh

geometry.rotateY(MathUtils.degToRad(90))

const normals = geometry.getAttribute('normal') as BufferAttribute
const uvs = geometry.getAttribute('uv') as BufferAttribute

Expand Down

0 comments on commit 99e863e

Please sign in to comment.