Gets entity blue component (0-255 int, returns 0 on error, 255 default).
Takes entity (mesh entity handle).
Returns blue component 0-255 (converted from material.baseColorFactor.z), 0 if invalid handle/non-mesh, 255 if valid mesh without material.
3D Graphics
Parameters & Returns
Parameters
entityInt
Returns
Int
Quick Summary
Gets entity blue component (0-255 int, returns 0 on error, 255 default).
Takes entity (mesh entity handle).
Returns blue component 0-255 (converted from material.baseColorFactor.z), 0 if invalid handle/non-mesh, 255 if valid mesh without material.
Technical Exegesis...
Gets entity blue component (0-255 int, returns 0 on error, 255 default). Takes entity (mesh entity handle). Returns blue component 0-255 (converted from material.baseColorFactor.z), 0 if invalid handle/non-mesh, 255 if valid mesh without material. Checks material override first then base material. Mesh entities only.
This function retrieves blue color. Color conversion: reads material.baseColorFactor.z (0.0-1.0 float), converts to 0-255 int (multiply by 255.0 and cast to int).
Gets entity blue component (0-255 int, returns 0 on error, 255 default). Takes entity (mesh entity handle). Returns blue component 0-255 (converted from material.baseColorFactor.z), 0 if invalid handle/non-mesh, 255 if valid mesh without material. Checks material override first then base material. Mesh entities only.
This function retrieves blue color. Color conversion: reads material.baseColorFactor.z (0.0-1.0 float), converts to 0-255 int (multiply by 255.0 and cast to int). Material priority: checks entity.materialOverrideIndex first (if >= 0 uses override material, allows per-entity color reading), falls back to entity.mesh->materialIndex if no override (shared material reading). Use cases: (1) Color queries (read current entity color for UI display), (2) Color restoration (save color before modification, restore later), (3) Conditional logic (if b3dGetEntityBlueFX(entity) > 128 then bright blue tint), (4) Color manipulation (oldBlue = b3dGetEntityBlueFX(entity), newBlue = oldBlue * 0.5 for darkening), (5) Color interpolation (lerp between current and target color). Common patterns: save color oldBlue = b3dGetEntityBlueFX(entity), check sky if b3dGetEntityBlueFX(entity) > b3dGetEntityRedFX(entity) then bluish, extract RGB red% = b3dGetEntityRedFX(entity%), green% = b3dGetEntityGreenFX(entity%), blue% = b3dGetEntityBlueFX(entity%). Typical usage: read color before modification for later restoration, query color for conditional logic (detect blue-tinted objects), extract RGB components for color math, display current color in UI. PBR baseColorFactor: .z component is blue channel (RGBA order x=red, y=green, z=blue, w=alpha). Material override awareness: reads from correct material (override if exists, else base), consistent with SetEntityColorFX behavior (set and get use same material). Return value semantics: 0 on error (invalid handle, non-mesh entity, prints error to stderr), 255 on valid mesh without material (white default), 0-255 on success (actual blue component). Default white: meshes without materials return 255 for blue (white default color 255,255,255,255). Performance: O(1) lookup (simple material access and conversion). Validation: prints error if invalid mesh handle or non-mesh entity, silently returns 255 if mesh has no material. Related: b3dGetEntityRedFX reads red component, b3dGetEntityGreenFX reads green component, b3dSetEntityColorFX sets RGB color, b3dGetEntityAlphaFX reads alpha component.