-
Functionality:
- In the desktop version, changes to graphics options are now persisted across launches.
-
all-is-cubes-ui
library:apps::Settings
manages user-editable settings that eventually will be more than just the graphics options.apps::SessionBuilder::settings()
links a possibly-sharedSettings
to the created session.
all-is-cubes-ui
library:apps::Session::settings()
replacesgraphics_options_mut()
.
-
all-is-cubes
library:-
Block inventories are now more functional.
block::EvaluatedBlock::with_inventory()
attaches inventory to a block.inv::InvInBlock
, stored inblock::BlockAttributes::inventory
, describes the size and rendering such inventories should have.
-
block::EvaluatedBlock::block()
returns the original block that was evaluated. -
block::Modifier::Attributes
allows overriding block attributes. -
listen::Store
andlisten::StoreLock
help implementListener
with less boilerplate. -
math::Aab
now implementsEq
. -
math::Aab::union()
. -
math::Aab::union_point()
. -
math::Cube
implementscore::ops::Add<Face6>
to obtain adjacent cubes. -
math::Face6::rotation_from_nz()
produces the same transformation asFace6::face_transform()
, but expressed as a rotation value. -
math::PositiveSign
is a floating-point numeric type restricted to values which have a positive sign bit. -
math::ZeroOne
is a floating-point numeric type restricted to values between 0.0 and 1.0. -
op::Operation::Alt
allows operations to try alternatives. -
op::Operation::Replace
allows replacing a specific block and not any other. -
op::Operation::StartMove
allows setting up an animated move into an adjacent cube. -
time::Schedule
describes the timing of repeated events, now used inblock::TickAction
andblock::Move
.
-
-
all-is-cubes-mesh
library:- Is now
no_std
compatible, if thedynamic
feature is not enabled. BlockMesh::bounding_box()
SpaceMesh::bounding_box()
- Is now
-
all-is-cubes-render
library:Resolution
implementsRtBlockData
.
-
all-is-cubes-ui
library:- Is now
no_std
compatible, if thesession
feature is not enabled.
- Is now
-
Graphics:
- The handling of voxels with light emission is now more consistent. In particular, emission is not modified by alpha; it always describes light emitted from the surface of the material regardless of the alpha, or transmittance, of the volume behind that surface.
-
all-is-cubes
library:-
block::EvaluatedBlock
’s fields are now private. Use methods instead. -
block::EvaluatedBlock::voxel_opacity_mask
now has its own data type,VoxelOpacityMask
. -
block::EvalBlockError
is now astruct
with an innerErrorKind
enum, instead of an enum, and contains more information. -
block::Evoxels
is no longer an enum; use its constructors and accessor functions instead. -
block::Move
’s means of construction have been changed to be more systematic and orthogonal. In particular, paired moves are constructed from unpaired ones. -
The interactions of
Move
andComposite
with other block modifiers occurring after them, and attributes such astick_action
have been redesigned and should be more consistent, though not yet entirely free of quirks. -
block::TickAction
’speriod
field is now of typetime::Schedule
-
The
listen
module is now a reexport of the separate librarynosy
. Many items have changed in name and signature. -
math::FaceMap::repeat()
has been renamed tosplat()
, for consistency with the same concept in theeuclid
vector types which we use. -
math::Geometry
is nowmath::Wireframe
, and itstranslate()
method has been replaced with inherent methods on its implementors. -
math::GridAab::expand()
now takes unsigned values; useGridAab::shrink()
instead of negative ones. This allows both versions to never panic. -
math::{Rgb, Rgba}
now use more restricted numeric types for their components,math::PositiveSign
andmath::ZeroOne
. This prevents various arithmetic edge cases from arising. -
math::Vol::subdivide()
now returns an array instead of a tuple, and theVol<&mut [_]>
version takes a filter function. The filter should make it easier to use in cases where the mutable subdivisions need to meet some size condition. -
Renamed
behavior::BehaviorContext
tobehavior::Context
. -
Renamed
behavior::BehaviorHost
tobehavior::Host
. -
Renamed
behavior::BehaviorPersistence
tobehavior::Persistence
. -
Renamed
block::BlockBuilder
toblock::Builder
. -
Renamed
space::SpaceBuilder
tospace::Builder
.
-
-
all-is-cubes-content
library:BoxStyle
’s functionality has been expanded;BoxStyle::from_fn()
and the new companion typeBoxPart
allows constructing arbitraryBoxStyle
s rather than only the specific patterns supported by previous constructors.
-
all-is-cubes-gpu
library:in_wgpu::SurfaceRenderer::new()
requireswgpu::Adapter
instead of&wgpu::Adapter
.
-
all-is-cubes-mesh
library:texture::Allocator
implementations are now permitted to reject zero-volume allocations.
-
all-is-cubes-port
library:- All functionality is now conditional on feature flags, to allow omitting unneeded formats and operations.
ExportFormat
is now namedFormat
.
-
all-is-cubes-render
library:- The trait method
raytracer::Accumulate::add()
now accepts the surface color via aColorBuf
(which acts essentially as a form of premultiplied alpha) rather thanRgba
. This enables more consistent handling of emissive materials. See the method documentation for details. - Raytracer update operations return whether any changes were actually found. This can be used to avoid rerendering an unchanged scene.
- The trait method
-
all-is-cubes-ui
library:- Visual changes:
- Better dialog box backgrounds, and addition of titles.
- Visual changes:
all-is-cubes
library:block::Primitive
no longer containsBlockAttributes
in any of its variants. The new means of specifying attributes isblock::Modifier::Attributes
.
-
New library crate
all-is-cubes-render
, which replacesall_is_cubes::camera
andall-is-cubes::raytracer
. -
all-is-cubes
library:-
color_block!
macro is a constant, non-allocating version ofBlock::from(Rgba::new(...))
. -
block::Resolution::MAX
provides the maximum available resolution. This value is not planned to change, -
block::AnimationHint
now offers constructor functionsredefinition()
andreplacement()
for the common case of setting one of its fields to a specificAnimationChange
. -
block::Modifier::Inventory
is a new modifier allowing blocks to carry inventory. It does not do anything yet. -
listen::Notifier::buffer()
andlisten::Buffer
allows creating and sending batches of messages, to improve efficiency over dispatching each message individually to all listeners. -
math::FaceMap
now implementsExhaust
. -
math::GridAab::intersection_box()
is a new definition of box intersection which returns a bigger box in some zero-volume/flat cases. -
math::GridAab::union_cubes()
is a new definition of union which returns a smaller box in zero-volume/flat cases. -
math::GridAab::union_cube()
is a convenience for expanding the box to include one cube. -
math::GridAab::to_free()
is another name forAab::from()
, useful for method chaining and not importingAab
. -
math::GridRotation::transform_size()
rotatesGridSize
values, liketransform_vector()
without negation. -
math::GridSize
type alias foreuclid::Size3D<u32, Cube>
, the sizes ofGridAab
s. -
math::Octant
is a new type identifying an octant. -
math::OctantMap
is a new type storing eight values associated with octants (likeFaceMap
is toFace6
). -
math::Vol::subdivide()
splits aVol
's bounds and data into parts that can be processed in parallel. -
op::Operation::AddModifiers
allows an operation to add modifiers rather than replacing a block. -
op::Operation::Neighbors
allows an operation to modify nearby blocks. -
op::Operation::DestroyTo
allows an operation to express replacing a block when the replacement is less important thanOperation::Become
. -
raycast::AaRay
andraycast::AxisAlignedRaycaster
represent rays which are always axis-aligned. This new raycaster is slightly simpler and faster. -
raytracer::SpaceRaytracer::trace_axis_aligned_ray()
does what it says and is slightly faster than the non-axis-aligned version. -
transaction::Transaction::check()
now returns an error type specified by the newMismatch
associated type, rather than necessarilyPreconditionFailed
. -
transaction::Transactional::transact()
provides a convenient way to create and immediately execute transactions.
-
-
all-is-cubes-mesh
library:- New features in
dynamic::ChunkedSpaceMesh
:- Blocks may now be rendered via instancing.
dynamic::DynamicMeshTypes::MAXIMUM_MERGED_BLOCK_MESH_SIZE
controls whether this is done; set it tousize::MAX
if you don't want instances.dynamic::ChunkMesh::block_instances()
returns the instance data. - Parallelism for block and chunk mesh calculations:
- Block mesh updates may be executed in the background rather than strictly during
update()
. This must be externally driven; if you wish to do so, clone theChunkedSpaceMesh::job_queue()
, and create one or more tasks/threads which take work from it. - Chunk mesh updates are performed in parallel using
rayon
if the"auto-threads"
feature is enabled. They are not performed in the background, because they currently still require read access to theSpace
being rendered.
- Block mesh updates may be executed in the background rather than strictly during
- Blocks may now be rendered via instancing.
- New features in
-
all-is-cubes-ui
library:- New widget
ProgressBar
. - New module
notification
and methodSession::show_notification()
for displaying notifications to the user (within the window, not platform notification integration).
- New widget
-
The
"threads"
feature has been renamed to"auto-threads"
in those libraries which have it, for clarity. -
all-is-cubes
library:-
chunking::OctantMask
has been moved to themath
module. -
listen::Listener::receive()
now accepts batches of messages instead of single messages, and thealive()
method has been replaced with a return value fromreceive()
. Implementors should review the new requirements documentation. -
math::FaceMap
’sDebug
deduplicates identical elements. -
math::GridAab
is now allowed to be bigger thani32::MAX
, up toi32::MAX - i32::MIN
. -
math::GridAab
no longer has a limit on total volume (onlyVol
does). -
math::GridAab::from_lower_size()
now takes aGridSize
instead ofGridVector
. -
math::GridAab::size()
andmath::Aab::size()
now returnGridSize
instead ofGridVector
. -
math::GridAab::intersection()
has been renamed tointersection_cubes()
, and its precise behavior with zero-volume boxes clarified. If the alternative behavior is desired, seeintersection_box()
. -
math::GridAab::union()
has been renamed tounion_box()
, and is no longer fallible. -
math::GridArray
has been removed. Uses ofGridArray<T>
may be replaced withVol<Box<[T]>>
. -
transaction::ExecuteError
is now generic over the type of transaction it is an error from. -
transaction::Transaction
now has an associated typeTarget
instead of a type parameter; it is no longer possible for a transaction type to be used with more than one target type. -
universe::Handle::execute()
no longer takes a uselessoutputs
parameter. -
Renamed
universe::URef
touniverse::Handle
. Related items have also been renamed:URefErased
toErasedHandle
AnyURef
toAnyHandle
VisitRefs
toVisitHandles
RefVisitor
toHandleVisitor
-
The macros
rgb_const!
,rgba_const!
, andnotnan!
have been moved to themath
module.
-
-
all-is-cubes-gpu
library:in_wgpu::headless::Builder::from_adapter()
requireswgpu::Adapter
instead ofArc<wgpu::Adapter>
.
-
all-is-cubes-mesh
library:- The return type of
GetBlockMesh::get_block_mesh()
has changed toOption<&BlockMesh>
.None
is to be returned when the implementor intends to request that the block be omitted from a producedSpaceMesh
(such as when it is being rendered separately) rather than the mesh merely being empty (invisible). - Renamed
dynamic::ChunkedSpaceMesh::update_blocks_and_some_chunks()
toupdate()
, which is shorter and also more accurate nowadays since it isn't guaranteed to update all blocks. - The caller-supplied types in
MeshTypes
andDynamicMeshTypes
must meetSend + Sync
bounds. dynamic::ChunkedSpaceMesh::update()
requires therender_data_updater
callback to be aFn
, not just aFnMut
.dynamic::ChunkedSpaceMesh
requires a texture allocator passed tonew()
instead ofupdate()
.
- The return type of
-
all-is-cubes-render
library (formerly part ofall-is-cubes
):-
camera::Camera::projection_matrix()
now produces a depth range of 0 to 1 instead of −1 to 1. -
camera::ImageSize
is now aneuclid::Size2D
instead ofeuclid::Vector2D
. -
camera::Viewport
's fields are noweuclid::Size2D
instead ofeuclid::Vector2D
. -
Renamed
camera::Camera
methods:projection()
toprojection_matrix()
get_view_transform()
toview_transform()
-
raytracer::SpaceRaytracer::trace_scene_to_text()
andtrace_scene_to_string()
have been replaced with the single methodto_text()
. -
HeadlessRenderer
implementors must always produces futures that areSend
.
-
-
all-is-cubes-ui
library:apps::Session::set_universe_async()
has been replaced with the more flexibleset_main_task()
. It can do several things via theMainTaskContext
type.vui::widgets::LargeText
now usesall_is_cubes::block::text::Font
as the font type.
all-is-cubes
library:-
The modules
camera
andraytracer
have been removed — or rather, made pseudo-private. Use the new libraryall-is-cubes-render
instead. -
block::AnimationHint::{TEMPORARY, CONTINUOUS}
constants have been removed. Use the new constructor functions andAnimationChange
instead. -
drawing::draw_to_blocks()
has been removed. There is no replacement. -
From<Rgb> for Cow<Block>
andFrom<Rgba> for Cow<Block>
have been removed. Use explicit conversion throughBlock
instead. Consider using the newcolor_block!()
macro for constant colors. -
listen::Sink::take_equal()
-
op::Operation::Paint
has been removed. UseOperation::Neighbors
andOperation::DestroyTo
to get the same effect. -
transaction::PreconditionFailed
no longer exists. It has been replaced with error types specific to each transaction type.
-
all-is-cubes
library:- Fixed compilation error in the case where the
save
feature is enabled (and no other crate is enablingserde/alloc
).
- Fixed compilation error in the case where the
-
Functionality:
- Sound effects for character/world collisions.
-
Graphics:
- Improved initial startup behavior of mesh generation; chunks will be filled in sooner but lacking detail.
- Windowed raytracing mode now uses background threads for increased throughput.
-
all-is-cubes
library:-
Now
no_std
compatible (with caveats), if thestd
feature is disabled. -
New variant
block::Primitive::Text
allows displaying text as part of a block, without having to separately draw the text as blocks first. -
Expanded
block::BlockAttributes::tick_action
can now specify a time period rather than always occurring on the next tick. -
New
block::CompositeOperator
variantsAtop
andOut
, as per the standard Porter-Duff compositing operators. -
New field
block::EvaluatedBlock::face_colors
provides colors which may be distinct for each face of the block. These colors may be used for low-detail rendering. -
New method
Camera::near_plane_distance()
returns the (currently hard-coded) near plane distance used in the calculated projection matrix. -
New type
linking::Provider
isBlockProvider
but generalized to non-block types. -
New type
math::Axis
is an enum of coordinate axes. -
New type
math::Cube
represents a unit cube on the grid; it replaces many previous uses ofGridPoint
to identify cubes. -
New constructor function
math::GridAab::from_ranges()
can make it more convenient to constructGridAab
s where different axes are handled differently. -
New method
math::GridAab::volume_f64()
returns the volume as a float, for calculations where volume is a scaling factor. -
New type
math::Gridgid
represents rigid transformations (including reflection), a useful subset of whatGridMatrix
already could do.The following new functions return
Gridgid
:math::Face6::face_transform()
math::GridRotation::to_positive_octant_transform()
-
New type
math::Vol
is a more general replacement formath::GridArray
which allows choice of the data container type (including&[T]
for borrowing without additional indirection), and also a replacement for uses ofmath::GridAab
which care about volume and linearization. -
New type
op::Operation
describes local transformations of aSpace
and an interacting agent with an inventory. It is now the type for specifyingBlockAttributes::tick_action
effects, and in the future will be used byTool
s as well. -
universe::UniverseTransaction::insert_anonymous()
anduniverse::UniverseTransaction::insert_mut()
allow conveniently building transactions that insert multiple members without needingmerge()
s. Such transactions allow building universe content without passing around a&mut Universe
.
-
-
Demo content and
all-is-cubes-content
library:- The
atrium
scene now includes more elements.
- The
-
The
all-is-cubes-desktop
package now contains a library, which in principle can be used to create applications with different behavior than the included binary (such as creating and displaying a universe from some data source other than files and the provided templates). However, it does not yet have a well-designed API. -
all-is-cubes-ui
library:- The UI optionally presents a “Quit” button, if configured via the
SessionBuilder
. - New type
vui::widgets::ButtonLabel
allows givingActionButton
andToggleButton
text labels in addition to or instead of icons. - New function
Session::set_character()
allows changing the player character without also changing the universe. - New function
vui::leaf_widget()
allows easier, less type-error-prone construction ofWidgetTree
s. It should generally be used in place ofLayoutTree::leaf()
.
- The UI optionally presents a “Quit” button, if configured via the
-
all-is-cubes
library:-
Block schema and behavior changes:
- Light emission is now a property of
Atom
blocks instead ofBlockAttributes
. EvaluatedBlock
’scolor
field is computed more accurately, ignoring voxels hidden by other voxels.BlockAttributes::tick_action
is now a dedicatedTickAction
type instead ofVoxelBrush
.BlockDef
now caches evaluation of its contained block. The cache is updated duringUniverse::step()
.
- Light emission is now a property of
-
All vector and matrix types from the library
cgmath
have been replaced with the libraryeuclid
. -
All functions manipulating volume data in
Space
,GridArray
/Vol
,Evoxels
, etc. have changed signature to use the new typemath::Cube
instead ofmath::GridPoint
. -
All functions using
usize
to identify a coordinate axis now usemath::Axis
instead.Face6::axis_number()
andFace7::axis_number()
are now calledaxis()
. -
space::SpaceChange
now includes block indices, not just positions, in cube changes; and all variants have been renamed for clarity. -
space::SpaceTransaction
now exposes its components as individualCubeTransaction
s, which can be mutated usingSpaceTransaction::at()
. -
In block names and universe member names,
Cow<'static, str>
andArc<str>
have been replaced witharcstr::ArcStr
. This type allows both refcounting and static literal strings. -
The following functions have changed signature to use the new type
math::Gridgid
:math::GridAab::transform()
math::GridMatrix::decompose()
space::Space::draw_target()
space::SpaceTransaction::draw_target()
-
The trait method
Behavior::step()
now must return a value of typebehavior::Then
, which specifies when the behavior should next be stepped. -
block::BlockBuilder::voxels_fn()
no longer takes a&mut Universe
parameter. Instead, either the universe or a transaction must be supplied through a call to.build_into()
or.build_txn()
. -
block::EvalBlockError::StackOverflow
has been replaced withblock::EvalBlockError::BudgetExceeded
, which reflects a new, better-fitting block evaluation limit system. -
math::GridAab::volume()
now returnsOption<usize>
, in preparation for a future change whereGridAab
will not have a limit on volume. -
math::GridArray
is nowmath::Vol
and allows choice of the data container type. -
camera::HeadlessRenderer
now returns a custom image container typeRendering
instead of usingimage::RgbaImage
. (This way, no dependency onimage
is needed.) -
linking::BlockProvider::install()
now requires a&mut UniverseTransaction
instead of a&mut Universe
. -
drawing::VoxelBrush::transform()
is renamed torotate()
and only accepts a rotation. This avoids confusion between points in space and cube-identifying coordinates. -
Renamed
raytracer::PixelBuf
trait toAccumulate
. -
all_is_cubes::util::CustomFormat
has been split into a separate library calledmanyfmt
, reexported atall_is_cubes::util::manyfmt
. TheCustomFormat
trait is now split into two traits,Fmt
(for implementing) andRefmt
(extension).
-
-
all-is-cubes-gpu
library:- Block textures are now fully dynamically allocated; it is no longer possible to run out of texture space.
-
all-is-cubes-mesh
library:-
The new trait
MeshTypes
is now used to combine declaration of vertex and texture types.BlockMesh
,SpaceMesh
,ChunkedSpaceMesh
, andGetBlockMesh
all have a singleM: MeshTypes
parameter in place of multiple generics. -
Major changes to texturing:
-
It is now possible for texture allocator implementations to use purely 2D texturing;
Tile
s are now subdivided intoPlane
s before usage, and each plane may provide its own texture coordinates independent of other planes in the volume. -
Texture allocators may opt out of supporting multiple writes, and have only immutable allocations.
-
Texture allocators are expected to be able to store emissive color in addition to reflectance. The new type
texture::Channels
communicates which properties each allocation must actually store, so that allocators can conserve memory when it is not necessary. -
Texture writes are now given data using
Vol<&[Evoxel]>
rather than pre-converted sRGB data; it is up to the texture implementation to convert and shuffle data as needed. -
Trait method
GetBlockMesh::get_block_mesh()
takes additional arguments which support instanced rendering of blocks. (They are not yet used.) -
Renamed
TextureAllocator
totexture::Allocator
. -
Renamed
TextureTile
totexture::Tile
. -
Renamed
NoTexture
totexture::NoTexture
. -
Renamed
NoTextures
totexture::NoTextures
.
-
-
-
all-is-cubes
library:- No longer depends on the
instant
library; WebAssembly builds do not need to depend on it to set its features. block::BlockBuilder::into_named_definition()
no longer exists. Instead, create theBlockDef
separately after using the builder.block::BlockDef
no longer implementsDeref<Target = Block>
. Instead, callBlockDef::block()
when needed.math::Aab::from_cube()
no longer exists. UseCube::aab()
instead.math::Face7::matrix()
no longer exists. UseFace6::face_transform()
instead.math::GridAab::contains_cube()
no longer acceptsimpl Into<GridPoint>
. Call sites should be changed to pass onlyCube
.math::GridAab::index()
no longer exists. UseVol::index()
instead.math::GridRotation::to_positive_octant_matrix()
no longer exists. Useto_positive_octant_transform()
instead.math::cube_to_midpoint()
no longer exists. UseCube::midpoint()
instead.math::point_to_enclosing_cube()
no longer exists. UseCube::containing()
instead.space::SpaceTransaction::set_overwrite()
no longer exists. Usetransaction.at(cube).overwrite(block)
instead.
- No longer depends on the
-
all-is-cubes-mesh
library:- No longer depends on the
instant
library; WebAssembly builds do not need to depend on it to set its features. TextureCoordinate
type alias no longer exists. Its only use was when implementingTextureTile
; simply usef32
instead.Texel
type alias no longer exists; callers are free to choose their own texel data type.
- No longer depends on the
- Block voxel data is kept to smaller bounds where possible:
BlockBuilder::voxels_fn()
trims empty space surrounding the produced voxels.all_is_cubes::block::Modifier::Composite
produces voxel data bounds that are the union or intersection of the inputs, as appropriate, rather than a full block.
- Various tweaks to reduce the size of compiled code.
-
Command line application (crate
all-is-cubes-desktop
) functionality:- Exporting universes to files; see below section on
all-is-cubes-port
for supported formats. - Option
--template-size
allows controlling the size of spaces produced by universe templates. - Window titles name the data source (file or template) for the contained universe.
- Exporting universes to files; see below section on
-
all-is-cubes
library:-
Many types, including
Universe
and its components, now support serialization viaserde
. This serialization support is still a work in progress and long-term save data compatibility is planned but not currently guaranteed. -
block::Atom
, a struct for the data of thePrimitive::Atom
enum variant. -
block::CompositeOperator::In
allows masking one block shape by another. -
block::Modifier::Composite
has a new optiondisassemblable
, which causesBlock::unspecialize()
(and its callers such asTool::RemoveBlock
) to return the composed blocks separately instead of the composite. -
linking::BlockProvider
now has methodssubset()
(replace keys) andmap()
(replace values) to allow usingBlockProvider
s in more ways. -
math::GridAab::iter()
to iterate over(cube, &item)
. -
save::WhenceUniverse
, a trait for associating aUniverse
with disk files or other persistent storage.Universe
now keeps anArc<dyn WhenceUniverse>
. -
space::SpaceBuilder::palette_and_contents()
allows efficiently specifying arbitrary contents for a newly createdSpace
. -
universe::RefVisitor
is now implemented for allFnMut(&dyn URefErased)
, allowing visitors to simply be functions. -
universe::Universe::universe_id()
returns a unique identifier for thisUniverse
.
-
-
all-is-cubes-port
library:- Import and export of a “native” file format (serialized
Universe
s). - Export to
.stl
meshes (commonly used for 3D printing). - Export to MagicaVoxel
.vox
files. ImportError
type for precise error reporting.
- Import and export of a “native” file format (serialized
-
all-is-cubes-ui
library:vui::LayoutTree::Shrink
allows a subtree to be shrunk to only be as big as needed, rather than filling available space, allowing for “shrink wrapped” layouts such as framed dialog boxes.vui::widgets::Frame::as_background_of()
allows conveniently making dialog frames.
-
Graphics:
Space
light propagation no longer updates deterministically, but as much as possible given available time for the computation.
-
New crate
all-is-cubes-mesh
contains the former contents ofall_is_cubes::mesh
, except forLineVertex
which is now inall_is_cubes::math
.SpaceMesh
indices are now eitheru16
oru32
depending on the size of the mesh, rather than alwaysu32
. The new enumall_is_cubes_mesh::IndexSlice
is used to work with them.SpaceMesh
index ranges and other metadata are now kept in a sub-structMeshMeta
.- Newly public/documented module
dynamic
provides support for incrementally updated meshes for interactive rendering. - Renamed:
BlockMeshProvider
is nowGetBlockMesh
. This aligns with the general principle of naming traits for the action that they enable.
-
all-is-cubes
library:-
Block collision control has been redesigned:
BlockCollision
is now stored inAtom
s and not inBlockAttributes
;Primitive::Recur
blocks always get their collision from their component voxels.BlockCollision::Recur
no longer exists andBlockCollision::Hard
cannot be used to disregard voxels' own collision. This change should be an overall simplification of the semantics and eliminates the common mistake of forgetting to specifyRecur
.
-
Universes are now considered to have an inherent, fixed time step.
- This time step cannot yet be changed; it is currently always 1/60 second.
- Within a single second, instants and
Tick
s have a “phase” value which cycles from 0 to 59. This will enable simulations to run on an intentionally slow but consistent schedule by skipping some ticks. - The
time
module contains new typesTickSchedule
andClock
to support this.
-
block::Block::listen()
is nowevaluate_and_listen()
which includes a simultaneousevaluate()
. -
block::Block::unspecialize()
now returnsVec<Block>
, to allow for cases where a block comes apart into multiple parts, such as withModifier::Composite
. -
block::EvaluatedBlock
now has avoxels
field of the new typeEvoxels
, which replaces the previousresolution
andvoxels
fields. This simplifies the data model, in that there is now always a set ofEvoxel
s defining a block's shape, even if there's only one of them, and it is always found in thevoxels
field. This is a breaking change for code that accessesEvaluatedBlock
data. -
block::Modifier::attach()
has been replaced byblock::Block::with_modifier()
. This is intended to be more convenient in all cases. -
block::Primitive::Atom
now contains astruct Atom
instead of individual fields. -
block::AIR
now has its own dedicated primitive,Primitive::Air
. The behavior is unchanged. -
camera::Flaws
now implementsDisplay
. Use this instead ofDebug
for printing the flaws. -
math::Geometry::wireframe_points()
now produces a new typemesh::LineVertex
instead of a tuple (with the same position and color data). -
space::Space::extract()
now passes one argument instead of three to the callback function; it is of the new typeExtract
which has methods to return all the previously available data. This is intended to be more extensible and potentially more efficient. -
transaction::Transaction
can now produce any number ofOutput
s, delivered through a callback. -
transaction::Merge
now has an associated typeConflict
for more informative conflict errors. -
universe::Name
now has a variantPending
for not-yet-assigned names. -
universe::URef::name()
now returns an owned instead of borrowedName
. -
universe::UniverseIndex
is no longer a public trait; the relevant methods are now inherent methods onUniverse
. -
universe::UniverseTransaction::insert()
now takes aURef
created byURef::new_pending()
, instead of a bare value. This allows associations between the new member and other objects to be created within the same transaction. -
Types that previously had a
pub fn listen(&self, impl Listener)
now implement thelisten::Listen
trait instead.listen::DirtyFlag::listening()
now expectsimpl Listen
instead of a closure.
-
-
all-is-cubes-port
library:load_universe_from_file
returns its ownImportError
instead ofanyhow::Error
.
-
all-is-cubes-ui
library:vui::LayoutGrant
now takes an additional parameter,enlarge_for_symmetry
. Existing calls should be changed to passfalse
to get the prior behavior.
all_is_cubes::block::BlockCollision::Recur
no longer exists; it is the default behavior.all_is_cubes::transaction::TransactionConflict
no longer exists; theTransaction
trait has aConflict
associated type instead.
- Fixed packaging error in
all-is-cubes-desktop
.
This is a large revision with many breaking changes. This log does not record all of them; I have chosen “get a release out” over “document everything”.
-
New crate
all-is-cubes-port
contains import/export routines (not very many, for now):- Import MagicaVoxel
.vox
files. - Export glTF 3D model files. (This support is very incomplete and currently is not feasible to use outside of the export feature in
all-is-cubes-desktop
).
- Import MagicaVoxel
-
New crate
all-is-cubes-ui
contains the user interface components which used to be inall-is-cubes
. This separation should improve compilation times. -
Graphics:
- The
all-is-cubes-gpu
renderer now fully supports blocks with a resolution greater than 16.
- The
-
all-is-cubes
library:block::Modifier::Move
, for drawing blocks in motion or off the grid.block::Modifier::Zoom
, for creating multi-block structures from a single block definition.camera::HeadlessRenderer
, for easily creating images using the raytracer or other renderers.math::point_to_enclosing_cube()
math::Face6
, which is likemath::Face
(now)Face7
but without theWithin
variant.DirtyFlag::listening()
which simplifies typical usage.GridArray::repeat()
for constructing arrays with uniform contents.GridArray::from_element()
for constructing single-element arrays.GridRotation::ALL_BUT_REFLECTIONS
, asGridRotation::ALL
but excluding reflections.SpaceBuilder::filled_with()
allows specifying the initial block in a newSpace
.SpaceTransaction::draw_target()
allows 2.5D drawing into a transaction in the same waySpace::draw_target()
works on&mut Space
.StandardCameras::world_space()
, so that clients don't need to consult theCharacter
each frame.Universe::get_any()
allows looking up universe members without knowing their type.UniverseTransaction::insert()
allows inserting objects into aUniverse
via transaction rather than directly.VoxelBrush::transform()
allows rotating aVoxelBrush
.VoxelBrush::with_thickness()
allows easily constructing a brush with a Z-axis stack of one block.- The previously-existing widget system is now publicly available in the
vui
module. - Most
Listener
implementations now also implementClone
andDebug
. This allows taking a listener and registering it with more than oneNotifier
. Relatedly, some uses of-> impl Listener
have been replaced with concrete types.
-
all-is-cubes
library:-
Breaking: The
Block
type has been substantially redesigned (though it still has existing functionality).- It is no longer an
enum
; it is an opaque type. - It is logically made up of two components, a
block::Primitive
and any number ofblock::Modifier
s.block::Primitive
is an enum which hasAtom
,Recur
, andIndirect
variants as before.- The
Rotated
variant is nowModifier::Rotate
.
- It internally uses reference counting to be predictably cheap to
clone()
; this is intended to help use cases such as transactions which mean that even a block which only exists once in the universe is frequently cloned. - Many changes to the functions, associated methods, and
BlockBuilder
were made to support this new structure.
- It is no longer an
-
Breaking:
mesh::TextureAllocator
implementations may now choose an arbitrary type to represent their texture coordinates.mesh::BlockVertex
is now generic to accomodate this. -
Breaking:
behavior::BehaviorSet
now stores additional data, the “attachment”, with each behavior, which must be specified when adding a behavior. -
Breaking:
apps::Session::new()
(formerlyAllIsCubesAppState::new()
) has been replaced withSessionBuilder
, whosebuild()
is now an async function. -
Breaking:
apps::StandardCameras
now works with aListenableSource<Viewport>
instead of aViewport
andset_viewport()
method, and it is constructed usingSession::create_cameras()
instead ofStandardCameras::from_session()
. -
Breaking:
block::AnimationHint
(fromBlockAttributes::animation_hint
) has been redesigned to be more systematic. -
Breaking:
linking::BlockProvider::new()
is now an async function. -
Breaking: The
linking::BlockModule
trait now requires theexhaust::Exhaust
trait in place ofstrum::IntoEnumIterator
. This allows implementors to use enums with fields (or non-enums). -
Breaking:
raytracer::SpaceRaytracer::trace_scene_to_image()
now expects a buffer rather than allocating one. -
Renamed:
space::Grid
is nowmath::GridAab
.- Methods named
grid()
that return the bounding box of something are now calledbounds()
. Grid::contains_grid()
is nowGridAab::contains_box()
.Raycaster::within_grid()
is nowRaycaster::within()
.Grid::new()
is nowGridAab::from_lower_size()
.Grid::checked_new()
is nowGridAab::checked_from_lower_size()
.
- Methods named
-
Renamed:
apps::AllIsCubesAppState
toapps::Session
. -
Renamed:
math::Face
is nowmath::Face7
. -
Renamed:
mesh::SpaceMesh::new()
is nowmesh::SpaceMesh::default()
. -
Renamed:
mesh::triangulate_block()
is nowmesh::BlockMesh::new()
. -
Renamed:
mesh::triangulate_blocks()
is nowmesh::block_meshes_for_space()
. -
Renamed:
mesh::triangulate_space()
is nowmesh::SpaceMesh::new()
. -
Renamed:
space::SpaceBuilder::build_empty()
is nowbuild()
. -
Renamed:
transaction::UniverseTransaction
is nowuniverse::UniverseTransaction
. -
Renamed:
vui::Icons
is nowinv::Icons
. -
Moved to
all-is-cubes-ui
: the modulesapps
andvui
. -
Renamed: The feature
"rayon"
is now"threads"
.
-
-
all-is-cubes-gpu
library:- No longer supports
luminance
GPU API; useswgpu
instead.
- No longer supports
all-is-cubes
library:math::NoiseFnExt
(no longer public).
-
Functionality:
- New universe template, "dungeon", generating an enclosed maze of rooms. I hope to build on this further to create some sort of gameplay (e.g. finding keys to unlock doors) and a tutorial for All is Cubes' functionality from a player's perspective; currently, all the rooms are the same.
- New universe template, "menger-sponge". Fractals are cool.
- There is now some amount of clickable user interface: pause and mouselook functions are visible as clickable buttons. Soon we may have actual menu screens!
-
Graphics:
- The software raytracer now implements volumetric transparency; blocks whose colors have alpha between 0 and 1 may be rendered as a solid volume of translucent material, rather than the alpha being applied at the surface, if the graphics options request it. However, the light model does not yet have a reasonable interpretation of how to light these volumes, so blocks may have unreasonably dark parts. I hope that future work will address this and also better handling of material surfaces (e.g. light reflections at the surface of glass, vs the lack of them in fog or at the meeting surfaces of adjacent similar blocks).
-
all-is-cubes
library:- New major items:
apps::StandardCameras
manages theCamera
s needed for rendering, given the necessary inputs. It is intended to reduce duplicated code and coupling in each renderer.universe::VisitRefs
trait allows traversing theURef
graph inside aUniverse
.util::YieldProgress
is an interface for long-running async tasks to report their progress.
- New features in existing types:
Aab::center()
returns the center point of the box.BehaviorSet::query()
for looking up existing behaviors.BehaviorSetTransaction::insert()
for adding a behavior via transaction.BlockAttributes::rotation_rule
andRotationPlacementRule
define how a block should be automatically rotated when placed.Camera::exposure
for controlling displayed brightness. Both renderers implement it. Nothing sets it yet.Camera::post_process_color()
applies the new exposure and tone-mapping settings to a color value.Evoxel::from_block()
for performing the same conversion from a full block to a voxel thatBlock::Recur(...).evaluate()
does.Face::dot()
, for dot product with a vector without constructing an intermediate unit vector.GraphicsOptions::tone_mapping
andToneMappingOperator
(not yet providing good operators, just the mechanisms to have the feature at all).Rgb::from_srgb8()
.Rgb::luminance()
andRgba::luminance()
.SpaceMesh
now remembers theTextureAllocator::Tile
s it was constructed using, just likeBlockMesh
does, so callers no longer need to do so.SpaceMesh::blocks_used_iter()
reports which block indices went into the mesh.SpaceTransaction::set()
, for faster construction of large transactions instead of many small ones. (This will likely be changed further to have better naming and convenience.)SpaceTransaction::nonconserved()
requests that merging two transactions with the same effect on some cube should not be considered a conflict.math::cube_to_midpoint()
function for the pattern of converting to float and adding 0.5.
- The following functions are now
const fn
:Grid::for_block()
Rgb::from_srgb8()
Rgba::from_srgb8()
- New major items:
-
all-is-cubes-content
library:UniverseTemplate::build
is now an async function, which accepts aYieldProgress
hook parameter. This means that there can be progress bars (currently implemented in desktop but not web) and that building doesn't hang the web event loop.
-
all-is-cubes-desktop
:- Can now “open data files”. Currently the only file format supported is MagicaVoxel
.vox
scene files; when we have a native file format that will be supported too. Files can be opened by passing them on the command line or by dropping them on an open window. - Terminal mode now has mouse support for placing and removing blocks.
- Terminal mode no longer goes blank if asked to use graphic characters but not colors.
- Can now “open data files”. Currently the only file format supported is MagicaVoxel
-
Game mechanics:
Character
s no longer inherently have the ability to fly; they can only do so if they have aTool::Jetpack
in their inventory.- It is no longer possible to jump multiple times in the same frame.
-
Graphics:
- Fixed a bug in the GPU renderer where dark areas would always have a noticeable minimum brightness (
PackedLight
did not have the same interpretation in the Rust and GLSL code for a value of zero). - Block meshes are no longer computed all at once, reducing maximum frame time during startup (or, in the future, when moving from viewing one
Space
to another). - Optimized construction and depth-sorting of meshes for transparent blocks. They still don't draw correctly, but they are less slow.
- Various performance improvements to the raytracer.
- Fixed a bug in the GPU renderer where dark areas would always have a noticeable minimum brightness (
-
all_is_cubes
library:-
The new minimum supported Rust version is 1.56.0 (2021 edition).
-
Breaking: The items previously in
all_is_cubes::lum
are now in a separate crateall_is_cubes_gpu
, and the"lum"
feature no longer exists. -
Breaking: The
triangulator
module has been renamed tomesh
. All types withTriangulation
in the name now useMesh
instead.BlockTriangulation
→BlockMesh
BlockTriangulations
→BlockMeshes
SpaceTriangulation
→SpaceMesh
SpaceMesh
takes an additional type parameter for the texture type.
BlockTriangulationProvider
→BlockMeshProvider
TriangulatorOptions
→MeshOptions
-
Breaking: The raytracer is now more flexible and allows custom data to pass into the tracing process.
- Instead of
PixelBuf
having a single output type, the raytracer returns thePixelBuf
and lets the caller convert it (or provide a conversion function, fortrace_scene_to_image
which returns a slice of converted values). - Block data is computed via a separate trait,
RtBlockData
, and has access toGraphicsOptions
and an arbitrary extra parameter. Multiple types ofPixelBuf
may be used with the sameSpaceRaytracer
as long as they agree on a concrete type ofRtBlockData
.
- Instead of
-
Breaking: The color values written into
all_is_cubes::mesh::TextureTile
are now in sRGB; previously, they were linear. -
Breaking:
GLRenderer::new()
now expects aStandardCameras
(instead of the components of one). -
Breaking:
AllIsCubesAppState::update_cursor()
now expects a&StandardCameras
instead of twoCamera
s. -
Breaking:
Camera::set_view_matrix()
is nowCamera::set_view_transform()
, and expects acgmath::Decomposed
transform, inverted from the matrix version. -
Breaking:
Space::spawn_mut()
replaced bySpace::set_spawn()
. -
The
Name
enum is now intended to be reliably cheap to clone:Name::Specific
's field holds anArc<str>
instead of aString
.Universe
-related errors now holdName
instead ofArc<Name>
.
-
Renamed:
Evoxel::new()
toEvoxel::from_color()
. -
Renamed:
apps::Tick
is nowtime::Tick
. -
Renamed:
Rgba::from_srgb_32bit()
is nowRgba::from_srgb8()
, andRgba::to_srgb_32bit()
is nowRgba::to_srgb8()
. This is more consistent with what I understand to be common terminology (specifying the component size instead of the total size), and allows the same name to be used sensibly forRgb
.
-
-
Demo content: Multiple scenes are now available, through the command-line option
--template
, web page URL parameter?template=
, or in code asall_is_cubes_content::UniverseTemplate
. The available templates include:demo-city
: The default in the previous version: a collection of many examples of specific functionality. (Now with more stuff, of course.)atrium
: A voxel interpretation of the Sponza Atrium rendering test scene (from scratch, not a data conversion).blank
: No data at all. Mostly useless except for testing.cornell-box
: A version of the Cornell box rendering test scene.
-
all-is-cubes-desktop
:- New graphics mode
-g record
for rendering images or video (currently only in PNG or APNG format). - New option
--display-size
to choose the window or image size. - New option
--precompute-light
to fully computeSpace
light before displaying anything. - Terminal mode (
-g terminal
):- Pipelined simulation and rendering for more CPU utilization.
- Keyboard controls over the text and color modes used.
- Double-resolution mode using “▄” graphic characters.
- UI has more HUD elements.
- Implemented using the
crossterm
library instead oftermion
, and should therefore support Windows (not tested).
- Reads graphics options from
graphics.json
in whatever directories-next thinks is a platform-appropriate app configuration directory. - Added info text overlay like the web version.
- New graphics mode
-
Graphics:
- Color values produced in all modes are now sRGB instead of linear, which should be more correct on most displays.
- Various graphics options are now configurable without recompiling, through the
GraphicsOptions
type. - “Smooth lighting”, interpolated across block faces.
- Triangulator and
all-is-cubes::lum
(GPU triangle-based renderer):- Blocks with resolution greater than 16 are now drawn with correct shapes, though not textures unless they have solid-colored faces because the texture allocator is still limited.
- Added frustum culling.
- Added distance fog.
- Now supports transparent blocks, as the raytracer already did. This support is complete for
Block::Atom
blocks but poor to nonexistent forBlock::Recur
blocks. - Light changes no longer require rebuilding chunk triangulations.
- Fixed several bugs in light calculation, including one that could lead to runaway brightness.
-
Physics and game mechanics:
- Character now has limited reach (can no longer interact with arbitrarily distant blocks).
- Gravity is now a property of individual
Space
s. - Characters collide against the voxel shapes of blocks, not just their unit cube bounds. This happens only if the block's
BlockCollision
attribute isRecur
. - Inventory items are now stackable, and “finite rather than infinite” block items exist — you can place a block in a
Space
and lose it from your inventory, or the reverse.
-
User interface:
- Mouselook support.
- Cursor markers no longer lag behind the camera.
- The HUD now displays a “tooltip” with the name of the selected tool/block.
-
all_is_cubes
library API:Universe
,URef
,Space
,Listener
, and so on now implementSend
andSync
. They are not fully equipped for useful multithreaded operation (in particular, there is are no principles for deadlock-free lock acquisition of variousURef
s), but it is now possible to, for example, construct aUniverse
on one thread and send it to another.- Transactions (
all_is_cubes::transaction
). Transactions describe modifications to a game object or many within the sameUniverse
. They enable:- Ensuring that a set of modifications is committed or entirely rejected (preventing “item duplication” kinds of bugs).
- Deferring mutations to solve borrowing problems.
- For example,
Tool
s' modifications ofSpace
s are now exclusively performed as transactions.
- Behaviors (
all_is_cubes::behavior
). TheBehavior
trait can be implemented to add custom behavior to aSpace
orCharacter
(a sort of “scripting”). Its functionality is very limited for now and may be substantially revised. - Inventories and items (
all_is_cubes::inv
) are now public. Aab
implementsFrom<Grid>
.Aab::contains()
Aab::face_coordinate()
: returns one of the box's six coordinates.Aab::random_point()
Aab::round_up_to_grid()
Aab::scale()
Block::rotate()
: generates a canonicalBlock::Rotated
version of a block.Block::unspecialize()
to undo rotation and, in the future, other changes that are considered specific to a block's particular placement in aSpace
(such as being due to interactions with other blocks).BlockAttributes::animation_hint
Face
implementsTryFrom<GridVector>
.FaceMap::iter()
FaceMap::repeat()
GenError
andInGenError
types for classifying worldgen failures.Grid::checked_new()
: returns an error instead of panicking.Grid::abut()
: constructs a grid adjacent to an existing one (useful for making walls).Grid::axis_range()
: asx_range()
,y_range()
,z_range()
but with a parameter for the axis.Grid::expand()
: enlarges a grid by moving its faces.Grid::intersection()
Grid::unsigned_size()
GridArray
implementsIndexMut
.GridArray::from_elements()
GridArray::map()
GridMatrix::decompose()
to decompose into a translation and rotation.GridMatrix::inverse_transform()
GridMatrix::transform_cube()
GridRotation::{ALL, IDENTITY, CLOCKWISE, COUNTERCLOCKWISE}
GridRotation::from_to()
(a “look at” operation of sorts)GridRotation::inverse()
GridRotation::is_reflection()
GridRotation::iterate()
to repeat a rotation exactly until it loops to the start.GridRotation::to_rotation_matrix()
Rgb::clamp()
,Rgba::clamp()
Space::builder()
: returnsSpaceBuilder
for configuring a new space's properties.Space::evaluate_light()
andSpace::fast_evaluate_light()
can be used for immediate light evaluation.Space::fill_uniform()
: faster thanSpace::fill()
when filling with only one block.SpaceRaytracer::trace_scene_to_image()
can be used to produce an RGBA image.TextureAllocator
, the trait through which the triangulator outputs textures, is now expected to offer 3D textures instead of 2D. This significantly reduces the number of redundant texels for complex blocks (at the cost of more never-seen texels for simple blocks).
-
Some information is logged using the
log
crate (startup progress and some nonfatal errors).
-
all_is_cubes
library:-
No longer depends on the
luminance-front
crate. -
Expansions:
Space
can now store up tou16::MAX
(65536) distinct blocks, instead of 256.Grid
now allows zero-volume grids.
-
Breaking parameter/field/type changes:
draw_to_blocks()
now takes options for Z dimensions and the attributes of the resulting blocks.GridRotation
is now an enum, so its size is 1 byte and it cannot have invalid values.EvaluatedBlock
now has an explicit.resolution
field. The dimensions of the.voxels
field no longer implicitly define the resolution; if.voxels
is smaller than the block then the missing voxels should be treated asAIR
.- The API of
all_is_cubes::triangulator
has been substantially revised to support depth sorting and separation of transparent triangles, and to remove unnecessary complexity. - New type
GraphicsOptions
stores global user-settable rendering options, and is required by most graphics-related functions. make_some_blocks()
returns an array rather than a vector, taking the size as a const generic parameter.Universe::get_default_character()
returnsOption
instead of panicking.Face::axis_number()
returnsOption
instead of panicking.all_is_cubes::listen::Sink
now stores messages in order without duplicates, and offers the method.drain()
instead of implementingIterator
.
-
Breaking: The integration with
embedded_graphics
now uses API version 0.7. The drawing target type has been renamed fromVoxelDisplayAdapter
toDrawingPlane
. -
Breaking:
all_is_cubes::util::ConciseDebug
is now generalized asall_is_cubes::util::CustomFormat
which takes one of several formatting types. -
Renamed: The modules
all_is_cubes::blockgen
,all_is_cubes::worldgen
, andall_is_cubes::content
have all been replaced by the separate crateall_is_cubes_content
. -
Renamed:
all_is_cubes::camera::Camera
toall_is_cubes::character::Character
, andall_is_cubes::camera::ProjectionHelper
toCamera
. -
Renamed:
all_is_cubes::camera::InputProcessor
toall_is_cubes::apps::InputProcessor
. -
Renamed:
all_is_cubes::lum::glrender::Viewport
toall_is_cubes::camera::Viewport
. -
Renamed:
all_is_cubes::universe::FrameClock
toall_is_cubes::apps::FrameClock
. -
Renamed:
GridArray::generate()
andFaceMap::generate()
tofrom_fn()
. -
Renamed:
Aab::expand()
toAab::enlarge()
-
Grid::index()
no longer overflows on some out of range coordinates. -
Raycaster
will stop iteration rather than overflowing if the ray exits the range of possible cube coordinates (i32
).
-
-
Development tools:
- The project's custom build scripts are now provided using the cargo xtask pattern rather than a Makefile. This means that the
make
tool is not needed, and instead of e.g.make run-dev
, you would now writecargo xtask run-dev
.
- The project's custom build scripts are now provided using the cargo xtask pattern rather than a Makefile. This means that the
- Most of
all_is_cubes::lum
is no longer public as I have decided those items should be considered implementation details. The top-level structGLRenderer
(which needs a better name) is no longer in theglrender
submodule. FaceMap::values()
: useFaceMap::iter()
instead.Universe::get_default_space()
A changelog was not kept for this and earlier releases.