diff --git a/packages/topdown/src/index.js b/packages/topdown/src/index.js index 7a57865..4d1177d 100644 --- a/packages/topdown/src/index.js +++ b/packages/topdown/src/index.js @@ -8,6 +8,10 @@ export default { [Hooks]: { '@avocado/resource.resources': Flecks.provide(require.context('./resources', false, /\.js$/)), '@avocado/traits.traits': Flecks.provide(require.context('./traits', false, /\.js$/)), + '@flecks/core.config': () => ({ + // The default view size. + viewSize: [320, 180], + }), '@flecks/socket.packets': Flecks.provide(require.context('./packets', false, /\.js$/)), }, }; diff --git a/packages/topdown/src/traits/followed.js b/packages/topdown/src/traits/followed.js index 2b4531f..e79a90a 100644 --- a/packages/topdown/src/traits/followed.js +++ b/packages/topdown/src/traits/followed.js @@ -2,13 +2,13 @@ import {Trait} from '@avocado/traits'; import Camera from '../camera'; -export default () => class Followed extends Trait { +export default (flecks) => class Followed extends Trait { #camera = new Camera(); static defaultParams() { return { - viewSize: [320, 180], + viewSize: flecks.get('@avocado/topdown.viewSize'), }; }