Skip to main content

Crate scenix

Crate scenix 

Source
Expand description

Facade crate for scenix Renderer APIs.

This release re-exports the Foundation crates, the GPU-free scene graph, CPU-side geometry, materials, lights, textures, cameras, optional loaders, raycasting, debug helper geometry, optional Animato and WASM integration, optional post-processing, and optional renderer APIs.

Modules§

advanced_controls
ambient
animation_path
Line-geometry helper that visualizes a sampled animation path.
area
arrow
atlas
axes
batched
bounding_box
bounds
buffer
bvh
camera_helper
color
controller
cube_camera
cylindrical
depth
directional
editor
editor_helpers
environment_maps
Environment sampling utilities (scenix v1.8.0 “Terrain, Sky, And Water”).
error
euler
flipbook
Grid flipbook sheet layouts shared by particle and sprite systems.
float
Portable f32 intrinsics (sqrt, trig, inverse trig, cube root) with libm/std/fallback selection. Preferred public path for scenix crates that must stay no_std-friendly. Portable f32 intrinsics shared by scenix crates.
fog
format
frustum
gamepad
geometry
gesture
gizmo
graph
grid
hemisphere
ids
instanced
interaction
intersection
iter
keyboard
lambert
light_helper
line
line_geometry
lod
mat
mesh
mipmap
morph
node
normal
orthographic
particle
pbr
perspective
physical
plane
point
pointer
points
pose_helper
Bone-axis gizmo helper for a SkeletonPose.
primitives
probe
quads
Sprite and billboard quad helpers for particle rendering.
quat
ray
raycaster
sampler
shader
shadow
shape
skeleton_helper
skin
Skinning data model + CPU skinning fallback.
sky
Sky background material descriptor (scenix v1.8.0).
spherical
spot
sprite
state
stereo
Stereo/XR camera support for scenix (v1.9).
sun
Sun-directional light bridging for sky and environment systems (scenix v1.8.0 “Terrain, Sky, And Water”).
terrain
Terrain splat material descriptor (scenix v1.8.0 “Terrain, Sky, And Water”).
texture
toon
touch
traits
transform
unlit
vec
video
viewport
water
Water surface material descriptor (scenix v1.8.0).
wireframe
xr
XR controller input mapping (scenix v1.9).
xr_helper
XR pose and hand-skeleton gizmo helpers.

Structs§

Aabb
An axis-aligned bounding box.
AmbientLight
Constant ambient scene light.
AnimationClipId
Typed identifier for an imported animation clip.
AnimationPathHelper
Polyline helper for visualizing a sampled animation trajectory.
ArcballController
Quaternion-based orbit control suitable for model viewers.
AreaLight
Rectangular area light description.
ArrowHelper
Directional arrow helper.
AssetId
Typed identifier for an imported asset package.
AtlasEntry
Named atlas entry.
AtlasRect
Pixel-space rectangle inside a texture atlas.
AudioListenerId
Typed identifier for a registered audio listener.
AudioSourceId
Typed identifier for a registered audio source.
AxesHelper
RGB XYZ axes helper.
BatchedGeometryRange
Draw range metadata for one geometry inside a batched mesh.
BatchedMesh
Multiple geometries merged into one CPU-side geometry with draw ranges.
BoundingBoxHelper
Wireframe AABB helper.
BoundsGizmoHelper
Corner-emphasized editor bounds helper.
BreadthFirstIter
Breadth-first scene graph node ID iterator.
BufferLayout
Vertex buffer layout metadata.
Bvh
Surface-area-heuristic BVH over scene node AABBs.
BvhEntry
Scene-level BVH leaf entry.
BvhNode
A compact BVH node.
CameraHelper
Camera frustum wireframe helper.
CameraId
Typed identifier for a camera resource.
ColliderId
Typed identifier for a registered physics collider.
Color
RGBA color with f32 channels.
CubeCamera
Camera that produces six 90-degree view-projection matrices for cubemaps.
Cylindrical
Cylindrical coordinates around the Y axis.
DepthFirstIter
Depth-first scene graph node ID iterator.
DepthMaterial
Depth-only material used by shadow and prepass renderers.
DirectionalLight
Directional light with optional shadow configuration.
DirectionalLightHelper
Directional-light arrow helper.
DragController
Reversible plane-based node drag controller.
DragPlane
World-space drag plane with robust ray intersection.
EquirectSampler
GPU-free bilinear reader for row-major equirectangular pixels.
Euler
Euler angles in radians plus a rotation order.
FirstPersonController
Ground-plane first-person control with optional vertical movement.
FlipbookGrid
Uniform grid flipbook layout over one texture.
FlipbookParams
Flipbook animation parameters for particle atlas sampling.
FlyController
Fly-style camera controller.
Frustum
Six frustum planes in [left, right, bottom, top, near, far] order.
GamepadId
A gamepad slot identifier.
GamepadState
State for one standard-mapped gamepad.
GamepadStates
Fixed-capacity collection of gamepad states.
Geometry
Indexed triangle geometry stored in CPU-side arrays.
GestureRecognizer
Stateful, allocation-free touch gesture recognizer.
GestureState
Gesture deltas accumulated for the current frame.
GizmoGeometry
Reusable line geometry plus analytic transform handles.
GizmoHandle
Pickable semantic handle.
GridHelper
XZ-plane grid helper.
HandSkeletonHelper
Hand skeleton line gizmo for one tracked 26-slot hand frame.
HemisphereLight
Sky/ground gradient ambient light.
InputState
Complete platform-independent input snapshot.
InstancedMesh
Draw metadata for many instances of the same mesh and material.
InteractionUpdate
Successful transform update.
Intersection
A world-space ray intersection against a scene mesh node.
KeyboardState
Fixed-size keyboard state suitable for no_std.
LambertMaterial
Diffuse-only material for fast lit surfaces.
LayerMask
A bit mask used to filter scene interaction layers.
LayerPolicy
Layer filters applied by editor interactions.
LightId
Typed identifier for a light resource.
LightProbe
Spherical-harmonics environment light using 3rd-order RGB coefficients.
LineGeometry
A validated line-list geometry used by debug helpers.
LineMaterial
Line material with optional dash pattern.
LodGroup
Mesh levels of detail selected by camera distance.
MapController
World-up map/navigation control with orbit, pan, and zoom.
Mat3
A 3x3 column-major matrix.
Mat4
A 4x4 column-major matrix.
MaterialId
Typed identifier for a material resource.
Mesh
A renderable mesh made from geometry and a material identifier.
MeshId
Typed identifier for a mesh resource.
Modifiers
Keyboard modifier state.
MorphTarget
Vertex delta data for blend-shape style mesh deformation.
MorphWeights
Live morph-weight storage for a mesh (one weight per morph target).
NodeEditorMetadata
Sparse editor-only metadata associated with a scene node.
NodeId
Typed identifier for a scene node.
NormalMaterial
Debug material that renders surface normals as RGB colors.
OrbitController
Orbit-style camera controller.
OrthographicCamera
Orthographic camera with right-handed WebGPU-depth projection.
ParticleMaterial
CPU-side particle material description for the v1.7 particle draw path.
ParticleSystemId
Typed identifier for a registered particle system.
PbrMaterial
Metallic-roughness physically based material.
PerspectiveCamera
Perspective camera with right-handed WebGPU-depth projection.
PhysicalMaterial
PBR material with advanced physical surface effects.
PhysicsBodyId
Typed identifier for a registered physics body.
PhysicsWorldId
Typed identifier for a registered physics world.
PipelineKey
Compact renderer pipeline selector.
Plane
A plane defined by a unit normal and signed distance from the origin.
PointLight
Omnidirectional punctual light.
PointLightHelper
Wireframe point-light helper.
PointerLockController
Fly controller adapter that responds only to relative look input while locked.
PointerLockState
Pointer-lock state and relative movement accumulated this frame.
PointerState
Current pointer position, movement, and button state.
PointsMaterial
Point material for point-list geometry.
PoseAxesHelper
Oriented axis triad at one tracked rigid pose (controllers, head rigs).
PoseHelper
Draws a small axis triad at each bone origin for pose debugging.
Quat
A unit quaternion representing 3D rotation.
Ray3
A normalized 3D ray.
Raycaster
BVH-accelerated scene raycaster.
Sampler
CPU-side sampler configuration.
SceneGraph
SlotMap-backed scene node hierarchy with cached world transforms.
SceneNode
A node’s public, user-editable scene data.
SelectionChange
Exact selection differences produced by one operation.
SelectionFrustum
Camera-specific selection volume represented by a view-projection matrix.
SelectionHelper
Selection outline helper for one or more world-space bounds.
SelectionRect
Normalized-device-coordinate selection rectangle.
SelectionState
Current graph-local editor selection.
ShaderMaterial
Custom WGSL material.
ShadowConfig
Shadow-map configuration shared by shadow-casting light types.
Shape
A 2D polygon shape with an exterior contour and optional holes.
SkeletonHelper
Bone-line skeleton helper.
SkinId
Typed identifier for imported skinning metadata.
SkinningAttributes
Per-vertex skinning attributes (glTF JOINTS_0 + WEIGHTS_0).
SkinningData
Full skinning data: per-vertex attributes + inverse-bind matrices.
SkyId
Typed identifier for a registered sky.
SkyMaterial
Sky background material.
SnapGridHelper
Grid helper translated to an editor work-plane origin.
SnapSettings
Quantization increments for editor transforms. Zero disables a component.
Sphere
A bounding sphere.
Spherical
Spherical coordinates using Y as the polar axis.
SplatLayerDesc
One terrain surface layer descriptor.
SpotLight
Cone-shaped punctual light.
SpotLightHelper
Wireframe spot-light cone helper.
Sprite
CPU-side sprite attachment data.
SunLight
Directional sun representation derived from sky elevation.
TerrainId
Typed identifier for a registered terrain system.
TerrainMaterial
Four-layer splat-map terrain material.
Texture2D
CPU-side 2D texture bytes.
Texture3D
CPU-side 3D texture bytes.
TextureAtlas
Deterministic shelf-packed texture atlas.
TextureCube
CPU-side cube texture bytes.
TextureId
Typed identifier for a texture resource.
ToonMaterial
Cel-shading material with discrete lighting bands.
TouchId
Platform-provided touch contact identifier.
TouchPoint
One active touch contact in logical pixels.
TouchState
Fixed-capacity touch state suitable for no_std input loops.
TrackballController
Unconstrained orbit, roll, pan, and zoom control.
Transform
A translation, rotation, and scale transform.
TransformController
Reversible translate/rotate/scale interaction controller.
TransformGizmoHelper
Translate, rotate, or scale gizmo generator.
UnlitMaterial
Constant-color material that ignores scene lighting.
UvRect
Normalized UV rectangle inside a texture atlas.
Vec2
A two-dimensional vector.
Vec3
A three-dimensional vector.
Vec4
A four-dimensional vector.
VertexAttribute
A single vertex attribute in an interleaved or packed buffer.
VideoTexture
Mutable CPU-side texture updated frame by frame.
ViewportMetrics
Logical/physical viewport measurements used by input and camera controls.
WaterId
Typed identifier for a registered water surface.
WaterMaterial
Water surface material.
WireframeMaterial
Wireframe overlay material.
XrAnchorId
Typed identifier for a tracked XR anchor.
XrCameraRig
Head transform coupled with per-eye stereo projections and offsets.
XrControllerInput
Value snapshot for one XR controller, mirroring the WebXR xr-standard interaction profile.
XrControllerInputs
Fixed-slot container for the two handed XR controller inputs.
XrEyeProjection
Near/far planes plus the per-eye tangent frustum.
XrFov
Per-eye tangent-angle frustum in radians, as reported by XR runtimes.
XrSessionId
Typed identifier for a registered XR session plan.

Enums§

AddressMode
Texture coordinate addressing mode.
AlphaMode
Material alpha behavior.
BillboardMode
How a sprite should face the camera.
BufferStepMode
Whether a vertex buffer advances per vertex or per instance.
ColorSpace
The transfer function used by color values.
CompareFunction
Optional depth-compare function for shadow/depth sampling.
CubeFace
Cube-map face order.
FilterMode
Texture filtering mode.
Fog
Scene-wide fog configuration.
GamepadAxis
Axes from the standard browser/native gamepad mapping.
GamepadButton
Buttons from the standard browser/native gamepad mapping.
GizmoHandleId
Semantic transform-gizmo handle.
GizmoHitShape
Analytic picking volume for an editor handle.
GpuError
GPU-related errors.
IndexFormat
Index buffer integer format.
InteractionError
Interaction operation failure.
KeyCode
Portable key codes used by scenix controllers.
LoadError
Asset loading errors.
NodeKind
Render or logical payload attached to a scene node.
ParticleBlend
Blend behavior for particle rendering.
PipelineAlphaMode
Pipeline-level alpha mode. This is hashable because the cutoff value is not part of render-pipeline selection.
PointerButton
Pointer button identifiers.
RotationOrder
Rotation order for Euler angles.
ScenixError
Top-level scenix error type.
SelectionContainment
Whether marquee selection requires full containment.
SelectionMode
How a selection command combines with the existing selection.
ShaderKind
Built-in shader family used by a material.
TextureFormat
CPU-side texture format metadata.
TouchPhase
Phase of a touch event.
TransformConstraint
Axis or plane constraint used by a transform operation.
TransformMode
Active transform tool.
TransformSpace
Coordinate system used by a transform tool.
ValidationError
Validation errors.
VertexFormat
Plain vertex data format.
VertexSemantic
Semantic meaning of a vertex attribute.
Visibility
A frustum visibility result.
XrHand
Which hand an XR controller is held in.
XrTrackingStatus
Per-frame tracking quality reported for an XR input source.

Constants§

FEATURE_ALBEDO_TEXTURE
Base color texture is bound.
FEATURE_ATMOSPHERE
Procedural sky atmosphere evaluation is active (scenix v1.8).
FEATURE_CLEARCOAT
Clearcoat lobe is active.
FEATURE_CUSTOM_TEXTURES
Custom shader has texture bindings.
FEATURE_DASHED
Dashed line path is active.
FEATURE_DOUBLE_SIDED
Material is rendered double-sided.
FEATURE_EMISSIVE_TEXTURE
Emissive texture is bound.
FEATURE_FLAT_SHADING
Flat normal shading is active.
FEATURE_FLIPBOOK
Particle flipbook atlas animation is active (scenix v1.7 “Particles”).
FEATURE_FOAM
Water foam mask path is active (scenix v1.8).
FEATURE_FRESNEL
Water Schlick fresnel reflectance is active (scenix v1.8).
FEATURE_GRADIENT_TEXTURE
Gradient/ramp texture is bound.
FEATURE_IRIDESCENCE
Iridescence path is active.
FEATURE_METALLIC_ROUGHNESS_TEXTURE
Metallic-roughness texture is bound.
FEATURE_NODE_GRAPH
Node-graph driven material shader (scenix v1.6 “Shader Nodes”).
FEATURE_NORMAL_TEXTURE
Normal map is bound.
FEATURE_OCCLUSION_TEXTURE
Occlusion texture is bound.
FEATURE_OUTLINE
Toon outline path is active.
FEATURE_REFRACTION
Water refraction target texture is bound (scenix v1.8).
FEATURE_SHEEN
Sheen lobe is active.
FEATURE_SIZE_ATTENUATION
Point size attenuation is active.
FEATURE_SOFT_PARTICLES
Particle soft-edge path is active (scenix v1.7 “Particles”).
FEATURE_SPLAT_MAP
Splat texture drives terrain layer blending (scenix v1.8).
FEATURE_TRANSMISSION
Transmission path is active.
FEATURE_VERTEX_COLORS
Material expects vertex colors.
FEATURE_WIREFRAME
Wireframe rendering path is active.
FEATURE_WORLD_SPACE
Normals are evaluated in world space.
HAND_JOINT_COUNT
Number of hand joints the XR hand profile exposes.
HAND_LINKS
Skeleton links between hand-joint slots.
MAX_GAMEPADS
Maximum gamepads tracked without allocating.
MAX_TOUCH_POINTS
Maximum simultaneous touch contacts tracked without allocating.
MAX_XR_CONTROLLERS
Maximum XR controllers tracked without allocating: one per hand.
XR_PRESS_THRESHOLD
Analog threshold above which an XR controller input counts as pressed.

Traits§

Bounded
A value that can report conservative bounds.
GeometryProvider
Provides mesh geometry by MeshId.
Material
CPU-side material description with no GPU dependency.
Named
A named object.
Renderable
A value that can provide a stable render order.

Functions§

apply_morph
Applies morph-target deltas to geometry by weights in-place on a clone.
box_geometry
Creates segmented box geometry centered at the origin.
capsule_geometry
Creates capsule geometry centered at the origin.
circle_geometry
Creates a filled circle or arc in the XY plane.
cone_geometry
Creates cone geometry centered at the origin.
cpu_skin
CPU-skins geometry by the given final joint matrices.
cylinder_geometry
Creates cylinder or truncated-cone geometry centered at the origin.
extrude_geometry
Creates extruded 2D shape geometry with sharp side walls.
final_joint_matrices
Computes final per-joint matrices from bone world transforms + inverse binds.
height_to_normal_map
Derives unit tangent-space normals from a height field with central differences.
icosphere_geometry
Creates an icosphere by subdividing an icosahedron.
lathe_geometry
Creates a lathe surface by rotating 2D radius/Y points around the Y axis.
plane_geometry
Creates segmented plane geometry in the XY plane.
quad_geometry
Creates a single centered quad facing +Z.
ring_geometry
Creates ring geometry in the XY plane.
shape_geometry
Creates triangulated 2D shape geometry in the XY plane.
sphere_geometry
Creates UV sphere geometry centered at the origin.
sun_color_from_elevation
The spectral ramp for a sun elevation angle (radians).
sun_direction
Computes the unit direction of a sun at (elevation, azimuth) in radians. Elevation is measured above the XZ horizon; azimuth rotates clockwise ( looking down from +Y ).
torus_geometry
Creates torus geometry around the Y axis.
torus_knot_geometry
Creates torus-knot geometry.
tube_geometry
Creates tube geometry around a polyline path.