Windows, graphics, audio and networking for Node.js. Browse a module or search for an API by name.
Time, vectors and streams. The foundations shared by every module.
Return a new object adding values of the same type; vectors add component-wise, and Color channels saturate at 255.
Add right to left in place and return left; read-only constants cannot be modified.
sf::Angle's float32 value, with native ownership created on demand.
A pausable monotonic stopwatch, with no native SFML handle.
Create an angle from degrees, stored with float32 precision.
Return a new object divided by a scalar; dividing two Time or two Angle values returns a numeric ratio.
Divide the left value by a scalar in place and return it; throw RangeError if the divisor is zero.
Compare same-type operands by value; floating-point comparisons are exact, and vectors require the same scalar type.
A singleton Writable whose bytes are written to the actual SFML stream.
Seekable asynchronous file input that reads directly into caller buffers.
Test whether the left value is greater than the right; both must have the same orderable type.
Test whether the left value is greater than or equal to the right; both must have the same orderable type.
Seekable input. Each operation may complete synchronously or asynchronously.
Test whether the left value is less than the right; supports Time, Angle, VideoMode, and IpAddress.
Test whether the left value is less than or equal to the right; both must have the same orderable type.
Retains the supplied bytes without copying them.
Create a duration from an exact signed 64-bit microsecond count, throwing RangeError if out of range.
Create a duration from milliseconds; the input truncated toward zero must fit in a signed 32-bit integer.
Return the duration remainder of integer microsecond division, with the remainder taking the sign of left.
Write the duration remainder back to left and return left.
Return a new object from scalar scaling, transform composition, or point transformation; Color channels are multiplied and then divided by 255.
Scale, compose transforms, or modulate colors in place, returning the left operand.
Return a new negated object, converted to the original scalar type; Color is unsupported, and boolean vector values remain unchanged.
Return whether same-type operands are unequal by value.
Create an angle from radians, stored with float32 precision.
Const data members recurse; methods still return independent mutable values.
Vector scalar type: i/u denotes signed/unsigned integers, f denotes floating point, and the suffix is the bit width.
Create a duration from seconds using float32 arithmetic, truncating to whole microseconds.
Process-wide SFML output: Writable redirects, null mutes, undefined resets.
Runtime failure reported by the SFML binding.
Asynchronous wait; the calling thread remains available to the event loop.
undefined reports an I/O failure; throws and rejected promises reject loading.
Return a new object subtracting values of the same type; Color channels have a minimum of 0.
Subtract right from left in place and return left; each Color channel has a minimum of 0.
SFML's Android clock, including time spent in system suspend.
A signed microsecond duration; native APIs receive its bigint by value.
Called once per check period; return true to keep waiting or false to stop.
Timeout configuration; the consuming operation performs waits and checks.
Test for a grapheme boundary before UTF-16 index position using SFML's Unicode rules. The start and end are boundaries; the middle of a surrogate pair is not. Isolated surrogate code units are treated as U+FFFD.
Test for a sentence boundary before UTF-16 index position using SFML's Unicode rules. The start and end are boundaries; the middle of a surrogate pair is not. Isolated surrogate code units are treated as U+FFFD.
Test for a word boundary before UTF-16 index position using SFML's Unicode rules. The start and end are boundaries; the middle of a surrogate pair is not. Isolated surrogate code units are treated as U+FFFD.
sf::Vector2
sf::Vector2
sf::Vector2
sf::Vector2
sf::Vector3
A vector of three float32 components.
A vector of three signed 32-bit integer components.
A vector of three unsigned 32-bit integer components.
Runtime SFML version, cached as one immutable native-backed value.
The version of the currently loaded native SFML library.
Windows, input and OpenGL contexts. Connect your application to the desktop.
An OS window with an OpenGL context, usable by Texture.update().
SFML's variant: kind identifies the subtype; payload fields stay intact.
A video mode: pixel dimensions and bits per pixel.
Return the system clipboard text, or an empty string if it contains no text.
Replace the system clipboard text with text.
Native-owned OpenGL context; activation remains per native thread.
OpenGL context attribute bit flags.
SFML context requests; omitted members use SFML's defaults.
A system cursor or a custom RGBA pixel cursor.
System cursor shapes; availability depends on the platform.
SFML's variant: kind identifies the subtype; payload fields stay intact.
An event-data union discriminated by the kind field.
Optional synchronous handlers for each event kind.
Names of supported window event kinds.
Window event kinds and their payloads; all positions are client-area pixel coordinates.
A visitor receiving data for any window event.
Return the specified axis position, from -100 to 100.
Return the number of buttons on the specified joystick.
Return the specified joystick's name, vendor ID, and product ID.
Return whether the joystick provides the specified axis.
Joystick device identification information.
Query the pressed state of the specified joystick button; indices start at zero.
Return whether the specified joystick is connected; indices start at zero.
Refresh joystick state manually; window event processing also refreshes it.
Joystick axes.
Maximum number of supported axes
Maximum number of supported buttons
Maximum number of supported joysticks
Convert a logical key code to a physical scancode using the current keyboard layout.
Return a human-readable name for the physical key.
Query a logical key's real-time pressed state, independent of the event queue.
Convert a physical scancode to a logical key code using the current keyboard layout.
Show or hide the on-screen keyboard on supported platforms.
Logical keys that depend on the system keyboard layout.
The total number of keyboard keys, ignoring Key::Unknown
Physical keys independent of the keyboard layout.
The total number of scancodes, ignoring Scan::Unknown
Return the mouse pixel position relative to the client area if a window is provided, or to the desktop otherwise.
Query a mouse button's real-time pressed state.
Move the mouse using client-area pixel coordinates if a window is provided, or desktop pixel coordinates otherwise.
Mouse buttons.
The total number of mouse buttons
Mouse wheel orientations.
A read-only settings interface for the current OpenGL context.
Return three-axis measurements: acceleration in m/s², angular velocity in degrees/second, magnetic field in µT, and orientation in degrees.
Return whether the device provides the specified sensor.
Enable or disable sensor data acquisition.
The total number of sensor types
Sensor types.
Initial window display state.
Window style bit flags that can be combined with bitwise OR.
Return the touch's pixel position relative to the client area of relativeTo, or to the desktop if omitted.
Return whether the specified touch is still down.
A video mode: pixel dimensions and bits per pixel.
Query a Vulkan function address, returning undefined if not found. The address uses bigint to preserve precision; calling it requires a native binding with the matching function signature.
Return a copy of the extension names required to create a graphics instance; the contents depend on SFML's platform backend.
Query whether the SFML backend supports Vulkan; false checks only compute capabilities.
An OS window with an OpenGL context, usable by Texture.update().
Platform window handles and Vulkan pointers are represented losslessly.
Window creation options.
Textures, shapes, text and rendering. Build your 2D scene.
A window supporting both Window operations and RenderTarget 2D drawing.
GPU texture with background image decoding and ordered pixel uploads.
sf::Sprite with the shared Transformable API.
Adds the alpha-scaled source color to the destination; read-only.
Standard alpha blending; read-only.
How to combine source and destination colors after applying their factors.
Factor multiplying the source or destination color in the blend equation.
Component-wise maximum of source and destination; read-only.
Component-wise minimum of source and destination; read-only.
sf::BlendMode. Values are copied into each recorded draw.
Multiplies source and destination component-wise; read-only.
Source overwrites destination without color blending; read-only.
sf::CircleShape geometry with Shape appearance and transformations.
Initial circle geometry parameters.
Glyph cluster grouping for text shaping.
RGBA color with four one-byte channels in the range 0 to 255. Channel writes convert according to Uint8Array rules; storage is shared with Native as needed.
sf::ConvexShape; points must describe a convex polygon in winding order.
Units for texture coordinates.
sf::Drawable: override draw to synchronously compose other drawables.
sf::Rect
Native-owned font face, input storage and retained glyph atlases.
Identity and properties of the current font.
sf::Vector2
sf::Vector3
GLSL bvec4 with four boolean components.
GLSL ivec4 with four signed 32-bit integer components.
GLSL mat3 with nine column-major float32 components.
GLSL mat4 with sixteen column-major float32 components.
GLSL vec4 with four float32 components.
sf::Glyph and its rectangle members share a 44-byte allocation.
Single-glyph appearance editable by the glyph preprocessor.
Callback that synchronously changes glyph appearance; must not modify or query geometry of the same Text while running.
Native-owned RGBA8 pixels with asynchronous file and codec operations.
sf::Rect
Text line alignment.
SFML 3 primitive types (quads are not supported).
Read-only interface to the same font resource, retaining the font and its glyph textures for their lifetimes.
Compile-time const view. Runtime storage is the same native Uint8Array.
Read-only draw states; textures and shaders retain resource references.
Read-only interface to the same shader program.
Compile-time const reference to the same texture resource.
sf::RectangleShape geometry with Shape appearance and transformations.
Value members copy deeply; texture and shader references retain identity.
Draw state input: a configuration object or a single transform, blend mode, stencil mode, texture or shader resource.
Partially specified draw state parameters.
Shared draw dispatch and command recording for render targets.
sf::RenderTexture: record clear/draw, submit when display is called.
Depth, stencil, antialiasing and OpenGL context settings for an off-screen render target.
A window supporting both Window operations and RenderTarget 2D drawing.
Native-owned program; source loading and compilation run asynchronously.
GLSL shader stages.
Custom shapes publish a convex point outline by calling update().
A single shaped glyph and its layout information.
sf::Sprite with the shared Transformable API.
Compares the masked reference value with the masked stencil buffer value.
sf::StencilMode; reference and mask are independent value copies.
Initial stencil test settings; omitted fields use StencilMode defaults.
How the stencil buffer is updated after the stencil test passes.
sf::StencilValue, including the signed-to-unsigned integer conversion.
Exchange same-type resources, preserving previously recorded draws.
SFML shaping with native vertex storage and batched draw snapshots.
Glyph layout direction.
Initial text parameters.
Horizontal or vertical writing direction.
Text style bit flags, combinable with bitwise operations.
GPU texture with background image decoding and ordered pixel uploads.
sf::Transform, using its 64-byte column-major storage from construction.
sf::Transformable with native-owned staging and JS transform calculations.
sf::Vertex, sharing position, RGBA and texture coordinates in 20 bytes.
Native contiguous vertices, exposed through stable per-allocation views.
GPU storage owned by Native; draw records a handle without uploading vertices.
Strings distinguish the single-argument Usage and PrimitiveType constructors.
A value camera; mutation and projection math stay on the JS side.
Playback, recording and spatial audio. Work with sound in real time.
Play short sound effects from memory, holding a SoundBuffer to retain sample storage.
Views retain the exact native allocation from which they were obtained.
Decode and play long audio in blocks without loading all samples into memory at once.
Actual processing parameters passed to the audio callback factory.
A module export is a factory receiving context and structured-clone data.
Audio Worker module and block queue configuration.
Cumulative statistics for the native audio block queue.
Read-only view of channel positions in interleaved order.
One native sf::SoundSource::Cone, exposed through its float fields.
Directional cone parameters for a spatial sound source or listener.
Frame counts actually consumed and produced by the effect processor.
Buffered DSP on native float blocks. Underflow produces silence.
Floating-point PCM effect callbacks executed in a Node Worker.
Worker and capacity configuration for a floating-point PCM effect processor.
Seekable audio decoder reading interleaved 16-bit PCM asynchronously in invocation order.
Return a copy of the listener's directional cone parameters.
Return a copy of the listener's facing direction.
Return the global volume percentage.
Return a copy of the listener's 3D position.
Return a copy of the listener's up direction.
Return a copy of the listener's velocity.
Copy directional cone parameters and update the native listener.
Set the listener's forward direction.
Set the global volume percentage for all sources; 0 is silent and 100 is the original volume.
Set the listener's position in world coordinates.
Set the listener's up direction, which defines orientation together with the forward direction.
Set the listener's velocity for the Doppler effect, in position units/second.
Decode and play long audio in blocks without loading all samples into memory at once.
Asynchronously encode interleaved 16-bit PCM into an audio file whose format is determined by the file extension.
Return the names of available playback devices.
Return the system's default playback device name, or undefined if unavailable.
Return the current playback device name, or undefined if unavailable.
Return the current device sample rate in Hz, or undefined if unavailable.
Return whether the current device follows the system default.
Lifecycle notifications for the audio playback device.
Callback receiving playback device status notifications.
Switch to the named playback device and return whether it succeeded.
Switch to the system's default playback device and report success.
Switch to a null device with no sound output and return whether it succeeded.
Set the device notification callback; undefined or null removes it.
Read-only typed view of 16-bit interleaved PCM, retaining native storage.
Read-only audio buffer interface; sample views retain their native storage.
Play short sound effects from memory, holding a SoundBuffer to retain sample storage.
Views retain the exact native allocation from which they were obtained.
Recorder that saves captured PCM in a SoundBuffer.
Speaker positions for interleaved PCM channels.
Registrations belong to the current Node environment.
Custom audio decoder interface; I/O positions count samples across all channels.
Registrable decoder class requiring a no-argument constructor and format probe.
sf::SoundFileReader::Info with directly mapped scalar fields.
Format information returned by a custom audio decoder.
Custom audio encoder interface accepting interleaved 16-bit PCM.
Registrable encoder class requiring a no-argument constructor and a filename-based format probe.
Capture device audio and process interleaved 16-bit PCM in a Node Worker.
Recording callbacks executed in a Node Worker.
Shared control/result fields; every engine operation still executes in SFML.
Current playback status of a sound source.
Buffered SFML stream. The supplied module produces PCM in a Node Worker.
Playback stream callbacks executed in a Node Worker.
samples aliases a reusable native slot, valid until the callback settles.
Format and Worker configuration for a custom PCM playback stream.
Mutable audio time span stored as exact microsecond counts.
Audio time span input.
Sockets, packets and protocols. Connect your application to the network.
TCP socket supporting raw bytes, SFML Packet framing, and TLS upgrades.
HTTP/HTTPS client using one connection per request without automatically following redirects.
Integers use network order; SFML floats use host order.
Result of receiving a single UDP datagram.
Query the public outbound address for the given address family via OpenDNS; return undefined on failure.
Mail exchanger record.
Query mail exchanger records with a default 1-second timeout; return an empty array on query failure.
Query name server records; default to system DNS and a 1-second timeout. Return an empty array on query failure.
Query service discovery records (e.g. _service._tcp.domain); return an empty array on failure.
Query TXT records, each containing multiple text segments; return an empty array on failure.
Resolve IPv4/IPv6 addresses asynchronously; return undefined on failure. With no servers, use the system resolver without applying timeout. With explicit DNS servers, the default timeout is 1 second.
Service discovery record.
Remote filesystem entry type.
FTP client based on basic-ftp; queued operations run in call order.
FTP response containing a working directory path.
FTP response containing directory entry names.
FTP status code and server message.
FTP server response codes and client error codes.
HTTP/HTTPS client using one connection per request without automatically following redirects.
HTTP request method.
Mutable HTTP/1 request, defaulting to GET /, HTTP/1.0, and an empty body.
HTTP response status, header fields, and body.
HTTP response statuses and client errors; values retain SFML definitions.
Immutable IP address value supporting IPv4 and IPv6.
IP address family.
Integers use network order; SFML floats use host order.
Encoding type names accepted by Packet.write/read.
Packet encodings and their JS values; multibyte integers use network order.
Socket readiness conditions, combinable as bit flags.
Receive the readiness bit flags obtained by this wait.
Asynchronous SFTP client based on ssh2; file operations run in call order.
Remote entry attributes; fields omitted by the server are undefined.
Result containing attributes of one filesystem entry.
Consume a download chunk; return false to stop early. An empty chunk indicates end of file.
SSH server host public key types.
Result containing a list of directory entry attributes.
Operation result containing a remote path.
SFTP operation status and message.
SFTP operation result codes.
SSH handshake negotiation results for application verification of the host public key and algorithms.
No-progress timeout configuration; reset the timer when data arrives or an RPC completes. A zero duration disables the timeout.
Fill an upload chunk and set size; returning false still sends the current chunk before stopping.
Writable data chunk received by an upload callback.
Common base for Node network transports; defaults to blocking semantics implemented with asynchronous waits.
Node TCP, UDP, or listener transport object; raw OS file descriptors are not accepted.
Wait asynchronously for a set of sockets to become ready, retaining the results of the latest wait.
Result of sending raw TCP bytes.
Socket operation result; blocking mode waits via Promise without blocking the Node event loop.
Result of reading raw TCP bytes.
Socket transport protocol, corresponding to sf::Socket::Type.
Listen for TCP connections and hand them to TcpSocket through accept.
TCP socket supporting raw bytes, SFML Packet framing, and TLS upgrades.
Current TLS upgrade state.
FTP file transfer modes.
UDP socket preserving datagram boundaries; Packet data has no TCP length header.
A pausable monotonic stopwatch, with no native SFML handle.