Sets global animation FPS (frame-to-time conversion for sequences, default 24 FPS).
Takes fps (frames per second, clamped to positive, default 24.0 if invalid).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
fpsDouble
Returns
Void
Quick Summary
Sets global animation FPS (frame-to-time conversion for sequences, default 24 FPS).
Takes fps (frames per second, clamped to positive, default 24.0 if invalid).
Returns nothing.
Technical Exegesis...
Sets global animation FPS (frame-to-time conversion for sequences, default 24 FPS). Takes fps (frames per second, clamped to positive, default 24.0 if invalid). Returns nothing. Sets g_animFPS global setting (affects all subsequent b3dSetAnimSeq and b3dAnimate frame-to-time conversions).
Sets global animation FPS (frame-to-time conversion for sequences, default 24 FPS). Takes fps (frames per second, clamped to positive, default 24.0 if invalid). Returns nothing. Sets g_animFPS global setting (affects all subsequent b3dSetAnimSeq and b3dAnimate frame-to-time conversions). Use to match animation authoring tool (Blender default 24 FPS, Maya default 24 FPS, some tools use 30 FPS), convert frame numbers to seconds (frame-based workflow in authoring tools, time-based playback in engine), or adjust animation speed globally (higher FPS = animations play faster, lower FPS = slower, but typically use speed parameter instead). FPS conversion: frame-to-time = frameNumber / fps (e.g., frame 48 at 24 FPS = 2.0 seconds), time-to-frame = timeSeconds * fps (e.g., 2.0 seconds at 24 FPS = frame 48). Global setting: affects all animated meshes (not per-entity, one FPS for entire scene), set once at startup (typically before loading animated meshes or defining sequences), persists for session (remains until changed, not reset per mesh). Use cases: (1) Match authoring tool (Blender 24 FPS = b3dSetAnimFPS(24), Maya 24 FPS, 3DS Max 30 FPS), (2) Frame-based workflow (animator works in frames, engine converts to seconds using FPS), (3) Consistent timing (all animations use same FPS, ensures correct playback speed). Common patterns: startup = b3dSetAnimFPS(24) set once at initialization; match tool = b3dSetAnimFPS(30) if animations authored at 30 FPS. Typical values: 24 FPS (film standard, Blender default, smooth motion), 30 FPS (video standard, some tools default, slightly faster), 60 FPS (high framerate, very smooth, uncommon for animation authoring). Affects: b3dSetAnimSeq (converts startFrame/endFrame to startTime/endTime using FPS), b3dAnimate (converts firstFrame/lastFrame to time range using FPS), animation sequences (all frame-based parameters converted using this FPS). Does NOT affect: animation playback speed (use speed parameter in b3dAnimateSeq/b3dAnimate for that), animation file data (GLB animations store time in seconds, FPS only affects user-facing frame numbers), entity movement or game framerate (unrelated to display FPS). Validation: clamps to positive (fps <= 0.0 clamped to 24.0, prevents divide-by-zero), accepts any positive value (no maximum, but very high values unusual), prints confirmation (stdout message shows FPS set, debugging feedback). Related: b3dSetAnimSeq defines sequence (uses FPS to convert frames to time, frame range -> time range), b3dAnimate plays frame range (uses FPS to convert frames to time), b3dLoadAnimMesh loads animated mesh (animations stored as time in seconds, FPS only affects user interface).