Possible to mask an area?

Post your help queries and engine programming questions here

Possible to mask an area?

Postby RiaanPie » Mon Dec 19, 2016 3:31 pm

Hi there.

I have created a second viewport for my canvas element and I can display an animated sprite etc in it. I am also able to position it on the stage and have it scale with everything else.

My questions:
- Is this the right way to go to create a masked area in Isogenic?
- I am left with a background colour in my viewport - is there any way to set it to "transparent" ?

Code: Select all
self.trainScene = new IgeScene2d()
                        .id('trainScene')
                        .depth(1)
                        .drawBounds(false)
                        .drawBoundsData(false)
                        .background('transparent') // this is causing error output
                        .translateTo(-70, -300, 0);

new IgeViewport()
                        .id('vpTrain')
                        .left(-500)
                        .top(0)
                        .width(1278)
                        .height(855)
                        .autoSize(false)
                        .borderColor('#ffffff')
                        .depth(10)
                        .scene(self.trainScene)
                        .mount(self.mainScene);

self.train = new IgeEntity()
                        .id('train')
                        .addComponent(IgeAnimationComponent)
                        .depth(51)
                        .translate().x(-220)
                        .translate().y(0)
                        .width(550)
                        .height(334)
                        .texture(textures[31]) // .476
                        .scaleTo()
                        .opacity(0)
                        .mount(self.trainScene);
RiaanPie
 
Posts: 20
Joined: Fri Jul 22, 2016 2:20 pm

Return to Help & Questions

Who is online

Users browsing this forum: No registered users and 1 guest
cron