Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/core/src/BaseGame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import type { KinematicCharacterController, World } from '@dimforge/rapier3d-com
import type winston from 'winston'
import type Logger from './Utils/Logger'
import type GameObjectInterface from './World/GameObjectInterface'
import { Clock, Raycaster, Scene } from 'three'
import { version as RAPIER_VERSION } from '@dimforge/rapier3d-compat'
import { Clock, Raycaster, Scene, REVISION as THREE_REVISION } from 'three'
import EventEmitter from './Utils/EventEmitter'
import { version as ENGINE_VERSION } from './version'

Expand Down Expand Up @@ -50,6 +51,8 @@ export default class BaseGame extends EventEmitter implements GameObjectInterfac
'│ MavonEngine │',
'│ │',
`│ Version: ${ENGINE_VERSION.padEnd(28)} │`,
`│ Three.js: r${THREE_REVISION.padEnd(27)} │`,
...(physicsWorld ? [`│ Rapier: ${RAPIER_VERSION().padEnd(28)} │`] : []),
// eslint-disable-next-line node/prefer-global/process
`│ Mode: ${(process.env.NODE_ENV ?? 'development').padEnd(28)} │`,
'│ │',
Expand Down
4 changes: 4 additions & 0 deletions packages/core/tests/BaseGame.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import { Raycaster, Scene } from 'three'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import BaseGame from './../src/BaseGame'

vi.mock('@dimforge/rapier3d-compat', () => ({
version: vi.fn().mockReturnValue('0.0.0'),
}))

vi.mock('three', async () => {
const actual = await vi.importActual<typeof import('three')>('three')
return {
Expand Down
Loading