MCPcopy Create free account
hub / github.com/axmolengine/axmol / bakeEmissionMask

Method bakeEmissionMask

core/2d/ParticleSystem.cpp:2284–2296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2282}
2283
2284void ParticleEmissionMaskCache::bakeEmissionMask(std::string_view maskId,
2285 std::string_view texturePath,
2286 float alphaThreshold,
2287 bool inverted,
2288 int inbetweenSamples)
2289{
2290 auto img = new Image();
2291 img->Image::initWithImageFile(texturePath);
2292 img->autorelease();
2293
2294 AXASSERT(img, "image texture was nullptr.");
2295 bakeEmissionMask(maskId, img, alphaThreshold, inverted, inbetweenSamples);
2296}
2297
2298void ParticleEmissionMaskCache::bakeEmissionMask(std::string_view maskId,
2299 Image* imageTexture,

Callers 1

onEnterMethod · 0.80

Calls 11

autoreleaseMethod · 0.80
hasAlphaMethod · 0.80
fourccValueFunction · 0.50
getDataMethod · 0.45
getWidthMethod · 0.45
getHeightMethod · 0.45
emplace_backMethod · 0.45
findMethod · 0.45
endMethod · 0.45
emplaceMethod · 0.45
sizeMethod · 0.45

Tested by 1

onEnterMethod · 0.64