diff --git a/package-lock.json b/package-lock.json index 237706e..dcc71f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "GPL-3.0-or-later", "dependencies": { "arx-convert": "^9.0.0", - "arx-level-generator": "^18.0.1", + "arx-level-generator": "^18.1.0", "three": "^0.158.0" }, "devDependencies": { @@ -487,9 +487,9 @@ } }, "node_modules/arx-level-generator": { - "version": "18.0.1", - "resolved": "https://registry.npmjs.org/arx-level-generator/-/arx-level-generator-18.0.1.tgz", - "integrity": "sha512-TAi/QFakpcaYRVxcugQsVhg9Gv18IHyvjGJ+8bb3BohDgfVBFStaYODXf4zAVo6MqMZsbpcNwAShFdZJ054/+g==", + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/arx-level-generator/-/arx-level-generator-18.1.0.tgz", + "integrity": "sha512-EONMw84e0AIpqmJF+mNbUSfzbKz//zYhTePd2VMRrrdst/9Cnm8w6ci2xUnxR5OybmoRa4jkb3/lLc31IupLFA==", "dependencies": { "arx-header-size": "^2.2.0", "color-rgba": "^3.0.0", @@ -2109,9 +2109,9 @@ } }, "arx-level-generator": { - "version": "18.0.1", - "resolved": "https://registry.npmjs.org/arx-level-generator/-/arx-level-generator-18.0.1.tgz", - "integrity": "sha512-TAi/QFakpcaYRVxcugQsVhg9Gv18IHyvjGJ+8bb3BohDgfVBFStaYODXf4zAVo6MqMZsbpcNwAShFdZJ054/+g==", + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/arx-level-generator/-/arx-level-generator-18.1.0.tgz", + "integrity": "sha512-EONMw84e0AIpqmJF+mNbUSfzbKz//zYhTePd2VMRrrdst/9Cnm8w6ci2xUnxR5OybmoRa4jkb3/lLc31IupLFA==", "requires": { "arx-header-size": "^2.2.0", "color-rgba": "^3.0.0", diff --git a/package.json b/package.json index d0334c1..38a4c1e 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "homepage": "https://github.com/meszaros-lajos-gyorgy/arx-map-lalees-minigame#readme", "dependencies": { "arx-convert": "^9.0.0", - "arx-level-generator": "^18.0.1", + "arx-level-generator": "^18.1.0", "three": "^0.158.0" }, "devDependencies": { diff --git a/src/index.ts b/src/index.ts index 53a673f..0370576 100644 --- a/src/index.ts +++ b/src/index.ts @@ -38,7 +38,7 @@ map.config.offset = new Vector3(6000, 0, 6000) map.player.position.adjustToPlayerHeight().add(new Vector3(1300, 0, -900)) map.player.orientation.y += MathUtils.degToRad(13) map.player.withScript() -map.player.script?.properties.push(new Speed(1.3)) +map.player.script?.properties.push(new Speed(3.3)) // 1.3 map.hud.hide('all') map.hud.show(HudElements.Manabar) map.hud.show(HudElements.BookIcon) diff --git a/src/rooms/secondFloor.ts b/src/rooms/secondFloor.ts index 9bb3048..b056f7c 100644 --- a/src/rooms/secondFloor.ts +++ b/src/rooms/secondFloor.ts @@ -1,6 +1,6 @@ import { ArxPolygonFlags } from 'arx-convert/types' import { Entity, Material, Settings, Texture, TextureOrMaterial, Vector3 } from 'arx-level-generator' -import { createPlaneMesh } from 'arx-level-generator/prefabs/mesh' +import { createPlaneMesh, createBox } from 'arx-level-generator/prefabs/mesh' import { MathUtils, Vector2 } from 'three' import { RoomContents } from '@/types.js' @@ -36,6 +36,16 @@ const createPlaneAt = ({ return plane } +const createPoleAt = ({ position }: { position: Vector3 }) => { + const box = createBox({ + position: position.clone().add(new Vector3(0, -70, 0)), + materials: Texture.stoneHumanPriest4, + size: new Vector3(10, 140, 10), + }) + + return box +} + export const createSecondFloor = async (settings: Settings, gameStateManager: Entity): Promise => { const roomOrigin = new Vector3(-2450, -400, 0) @@ -89,10 +99,30 @@ export const createSecondFloor = async (settings: Settings, gameStateManager: En angleY: 90, }) - // TODO: add corner poles to support glass railing + // ----------------------------- + + const pole1 = createPoleAt({ position: roomOrigin.clone().add(new Vector3(-300, 0, -300)) }) + const pole2 = createPoleAt({ position: roomOrigin.clone().add(new Vector3(300, 0, -300)) }) + const pole3 = createPoleAt({ position: roomOrigin.clone().add(new Vector3(-300, 0, 300)) }) + const pole4 = createPoleAt({ position: roomOrigin.clone().add(new Vector3(300, 0, 300)) }) + + // ----------------------------- return { - meshes: [railing1, railing2, railing3, railing4, blocker1, blocker2, blocker3, blocker4], + meshes: [ + railing1, + railing2, + railing3, + railing4, + blocker1, + blocker2, + blocker3, + blocker4, + pole1, + pole2, + pole3, + pole4, + ], entities: [], lights: [], zones: [],