File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,17 @@ import { ECS } from './ecs.js';
77import { EventBus } from './event-bus.js' ;
88import { PluginManager } from './plugin-manager.js' ;
99import { EVENTS } from './components.js' ;
10+ // Keep Engine.REVISION aligned with the package version
11+ // Bundlers (Vite/Webpack) and Vitest support JSON imports by default.
12+ import pkg from '../../package.json' ;
1013
1114export class Engine {
15+ // Library identity/versioning
16+ static NAME = '@ar-js-org/ar.js-core' ;
17+ static VERSION = pkg ?. version || '0.0.0-dev' ;
18+ // Back-compat friendly alias (similar to old Context.REVISION)
19+ static REVISION = Engine . VERSION ;
20+
1221 constructor ( ) {
1322 this . ecs = new ECS ( ) ;
1423 this . eventBus = new EventBus ( ) ;
@@ -172,4 +181,4 @@ export class Engine {
172181 // Clear event listeners
173182 this . eventBus . clear ( ) ;
174183 }
175- }
184+ }
You can’t perform that action at this time.
0 commit comments