Is there a way to make the background of LWFNode to be transparent instead of opaque black?
@siauw wrote:
Is there a way to make the background of LWFNode to be transparent instead of opaque black?
What do you mean? LWFNode itself doesnât draw anything at all.
yes youâre right, as it turns out, the Layer that draws the background black, Iâm still looking a way to make it transparent. Sorry itâs not LWFNode
@splhack I got it. Thanks!
Another two problems:
1.how to get a movieclip(say its name is âmyMCâ) and remove it from the lwf.
2.Is there a way to get the bitmap data of the lwf, or any other way to make me able to check the touches point in lwf has none-transparent pixel there ?
Thanks ahead.
@joni I have similar problem. I need to replace a picture dynamicly, but the picture name differs to different lwf. I tried publish for lwf, and the name problem solved but there is no .lwf file created.
@jianhan513@163.com wrote:
@splhack I got it. Thanks!
Another two problems:
1.how to get a movieclip(say its name is âmyMCâ) and remove it from the lwf.
What do you want to do? Please describe more detail.
2.Is there a way to get the bitmap data of the lwf, or any other way to make me able to check the touches point in lwf has none-transparent pixel there ?
Thanks ahead.
Itâs not a part of LWF. Please search âPixel Perfect Collision Detection in Cocos2d-xâ.
@jianhan513@163.com
Could you share your fla file?
how can i fix it when i convert swf !!
swf2lwf.rb:2479:in parse_place_object2': undefined methodreferenceâ for nil:NilClass (NoMethodError)
from swf2lwf.rb:2693:in parse_tags' from swf2lwf.rb:2254:inparse_define_spriteâ
from swf2lwf.rb:2693:in parse_tags' from swf2lwf.rb:2742:inparse_swfâ
from swf2lwf.rb:3505:in swf2lwf' from swf2lwf.rb:4407:inâ
@cbingt Could you share your fla file with me? we canât fix it without fla file.
hi~ splhack. i have a question.
i solved problem that change image(or texture).
âŚ
std::regex re(âcard\d+\.png$â);
LWF::LWF::SetTextureLoadHandler([=](std::string fullPath, std::string basePath, std::string filename) {
return regex_replace(fullPath, re, âcard01.pngâ);
});
âŚ
but, i donât know that how can i change image on texture-atlas.
(i make use of texturepacker, json, âŚ)
@manpage currently, LWF doesnât support it.
@jianhan513@163.com thanks. your data has no problem. Could you check your ~/Desktop/LWFS_work_output/native?
bitmap_b.png bitmap_c.png bitmap_d.png bitmap_e.png testJaney.lwf
If I import swf, there is a grey outline on the image.
I had no problem on Flash program, so Iâm not sure what is making this happen.
so if possible please check what the problem is.
@jamesYou It sounds the same as this problem http://www.pixelenvision.com/3273/texture-packer-the-tool-that-stands-the-test-of-time/ . I recommend you to try to use TexturePacker and âReduce border artifactsâ option just for the problem.
Is there a way to scale LWF with ResolutionPolicy::NO_BORDER? Because my other resources are made with this resolution policy.
Thanks
@siauw Have you tried it?
CCSize frameSize = cocos2d::Director::getInstance()->getOpenGLView()->getFrameSize();
lwfNode->lwf->FitForHeight(frameSize.width, frameSize.height);
will you make API for 3.0 rc ?
thanks!
@jamesYou we are almost done, but there is a clipping problem on rc0. In some cases, sprites doesnât appear on the screen due to Sprite::isInsideBounds returns false. weâre now investigating it.