Currently the easiest way to setup a full-sized image on the screen is creating a custom component to adjust the width and height of the element on tick.
Hereβs a custom component that should do the trick:
import * as ecs from '@8thwall/ecs'
ecs.registerComponent({
name: 'bg-image',
schema: {
},
schemaDefaults: {
},
data: {
},
add: (world, component) => {
},
tick: (world, component) => {
ecs.Ui.mutate(world, component.eid, (cursor) => {
cursor.width = window.innerWidth
cursor.height = window.innerHeight
})
},
remove: (world, component) => {
},
})
Hereβs how it should look when itβs applied:
Thanks! itβs perfect