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
error
euler
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
pbr
perspective
physical
plane
point
pointer
points
pose_helper
Bone-axis gizmo helper for a SkeletonPose.
primitives
probe
quat
ray
raycaster
sampler
shader
shadow
shape
skeleton_helper
skin
Skinning data model + CPU skinning fallback.
spherical
spot
sprite
state
texture
toon
touch
traits
transform
unlit
vec
video
viewport
wireframe

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.
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.
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.
Euler
Euler angles in radians plus a rotation order.
FirstPersonController
Ground-plane first-person control with optional vertical movement.
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.
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.
PbrMaterial
Metallic-roughness physically based material.
PerspectiveCamera
Perspective camera with right-handed WebGPU-depth projection.
PhysicalMaterial
PBR material with advanced physical surface effects.
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.
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.
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.
SpotLight
Cone-shaped punctual light.
SpotLightHelper
Wireframe spot-light cone helper.
Sprite
CPU-side sprite attachment data.
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.
WireframeMaterial
Wireframe overlay material.

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.
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.

Constants§

FEATURE_ALBEDO_TEXTURE
Base color texture is bound.
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_GRADIENT_TEXTURE
Gradient/ramp texture is bound.
FEATURE_IRIDESCENCE
Iridescence path is active.
FEATURE_METALLIC_ROUGHNESS_TEXTURE
Metallic-roughness texture is bound.
FEATURE_NORMAL_TEXTURE
Normal map is bound.
FEATURE_OCCLUSION_TEXTURE
Occlusion texture is bound.
FEATURE_OUTLINE
Toon outline path is active.
FEATURE_SHEEN
Sheen lobe is active.
FEATURE_SIZE_ATTENUATION
Point size attenuation is active.
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.
MAX_GAMEPADS
Maximum gamepads tracked without allocating.
MAX_TOUCH_POINTS
Maximum simultaneous touch contacts tracked without allocating.

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.
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.
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.
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.