From 99e863e991226855352331bd12383009368efe40 Mon Sep 17 00:00:00 2001 From: Lajos Meszaros Date: Wed, 18 Oct 2023 14:54:01 +0200 Subject: [PATCH] fix(EntityModel): the model is now rotated 90 degrees to match the behavior of loading meshes --- src/EntityModel.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/EntityModel.ts b/src/EntityModel.ts index 5cd6149a..abca5acd 100644 --- a/src/EntityModel.ts +++ b/src/EntityModel.ts @@ -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' @@ -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