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

Method createMaskShape

core/2d/ParticleSystem.cpp:1154–1178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1152}
1153
1154EmissionShape ParticleSystem::createMaskShape(std::string_view maskId,
1155 Vec2 pos,
1156 Vec2 overrideSize,
1157 Vec2 scale,
1158 float angle)
1159{
1160 EmissionShape shape{};
1161
1162 shape.type = EmissionShapeType::TEXTURE_ALPHA_MASK;
1163
1164 shape.fourccId = utils::fourccValue(maskId);
1165
1166 shape.x = pos.x;
1167 shape.y = pos.y;
1168
1169 shape.innerWidth = overrideSize.x;
1170 shape.innerHeight = overrideSize.y;
1171
1172 shape.outerWidth = scale.x;
1173 shape.outerHeight = scale.y;
1174
1175 shape.coneOffset = angle;
1176
1177 return shape;
1178}
1179
1180EmissionShape ParticleSystem::createPointShape(Vec2 pos)
1181{

Callers

nothing calls this directly

Calls 1

fourccValueFunction · 0.50

Tested by

no test coverage detected