Crate paddle

Source
Expand description

Paddle is a framework for easy game building for the browser. TODO: more description, README

Re-exports§

pub use nuts;
pub use graphics::*;

Modules§

asset
graphics
Parent module for stuff related to graphics manipulation, such as textures and tessellation. (exclusive display + GPU)
progress
quicksilver_compat
This module has a copy of quicksilver types to ease transition form quicksilver to something else.
web_integration

Structs§

CustomShader
Display
An object to manage the full display area for your game inside the browser.
DisplayArea
DisplayConfig
DrawWorld
EndOfFrame
End of frame as in frames-per-second. Published when drawing has finished.
ErrorMessage
FloatingText
FrameHandle
Handle to frame is returned when adding it to the view manager. Can be used to add listeners. (And potentially other manipulations of the frame are possible in the future)
GpuConfig
GpuMesh
Buffer for GPU primitives ready to be drawn, after tesselation and all CPU-side transformations have finished
GpuTriangle
A triangle to draw to the GPU
GpuVertex
A vertex for drawing items to the GPU
Grid
JsError
KeyEvent
KeyEventTypeIter
LoadScheduler
Helper object to manage resource loading.
LoadedData
LoadingDone
LoadingProgress
PaddleConfig
PointerEvent
Event type and cursor position
PointerTracker
Helper struct that can be added to a frame to track advanced cursor updates.
Rectangle
A rectangle with a top-left position and a size
RenderPipelineHandle
A handle to a registered shader program (essentially a pair of fragment + vertex shaders).
StartOfFrame
TextBoard
TextNode
TextPool
Allocates FloatingText units
Transform
A 2D transformation represented by a matrix
UpdateWorld
Vector
A 2D vector with single-precision floating point numbers
VertexDescriptor
Describes the layout of a vertex as it is uploaded to the GPU.
ViewManager

Enums§

CanvasConfig
Domain
EventListenerType
FitStrategy
Key
Rust representation of a set of common keys. The names match the Key Code Values. The keys listed should all have the same representation on all platforms.
KeyEventType
Rust representation for key event types. Has a one-to-one correspondence to browser events.
MessageChannel
PointerEventType
Rust representation for mouse and touch event types.
UniformValue

Constants§

PADDLE_GREY
Z_MAX
Z_MIN

Traits§

Frame
A frame takes up some area on the screen where it is drawn and reacts to UI events.
NutsCheck
Render
Some object that can be rendered to a GpuMesh with position parameters and a color or image
Scalar
A Scalar type that can be converted to a component of a Vector

Functions§

click_event_gate
enable_custom_nuts_checks
enable_nuts_checks_to_console
enable_nuts_checks_to_textboard
init
keyboard_event_gate
load_blob
Returns an asynchronous BLOB.
load_file
mouse_event_gate
pointer_event_gate
register_frame
register_frame_no_state
Use this if the state has already been registered previously.
register_frame_with
Use this if the state needs access to the graphics environment
send
Send a message to a private receiver
share
Share anything with all other activities in background and foreground
share_foreground
Share anything with all foreground activities
start_drawing
start_updating
touch_event_gate
utc_now

Type Aliases§

PaddleResult