refactor: viewSize
This commit is contained in:
parent
536562c061
commit
2d5459399c
|
@ -8,6 +8,10 @@ export default {
|
||||||
[Hooks]: {
|
[Hooks]: {
|
||||||
'@avocado/resource.resources': Flecks.provide(require.context('./resources', false, /\.js$/)),
|
'@avocado/resource.resources': Flecks.provide(require.context('./resources', false, /\.js$/)),
|
||||||
'@avocado/traits.traits': Flecks.provide(require.context('./traits', 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$/)),
|
'@flecks/socket.packets': Flecks.provide(require.context('./packets', false, /\.js$/)),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,13 +2,13 @@ import {Trait} from '@avocado/traits';
|
||||||
|
|
||||||
import Camera from '../camera';
|
import Camera from '../camera';
|
||||||
|
|
||||||
export default () => class Followed extends Trait {
|
export default (flecks) => class Followed extends Trait {
|
||||||
|
|
||||||
#camera = new Camera();
|
#camera = new Camera();
|
||||||
|
|
||||||
static defaultParams() {
|
static defaultParams() {
|
||||||
return {
|
return {
|
||||||
viewSize: [320, 180],
|
viewSize: flecks.get('@avocado/topdown.viewSize'),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user