v0.3.4
Pre-release
Pre-release
- Add
GenericVmFunction::simplify_with
to simultaneously simplify a function and pick a new register count for the resulting tape - Add bidirectional conversions between
JitFunction
andGenericVmFunction
(exposing the inner data member) - Add a new
TileSizes(Vec<usize>)
object representing tile sizes used during rendering. Unlike the previousVec<usize>
, this data type checks our tile size invariants at construction. It is used in thestruct RenderConfig
. - Rethink rendering and viewport configuration:
- Add a new
RegionSize<const N: usize>
type (withImageSize
andVoxelSize
aliases), representing a render region. This type is responsible for the screen-to-world transform - Add
View2
andView3
types, which stores the world-to-model transform (scaling, panning, etc) - Image rendering uses both
RegionSize
andViewX
; this means that we can now render non-square images! - Meshing uses just a
View3
, to position the model within the ±1 bounds - The previous
fidget::shape::Bounds
type is removed - Remove
fidget::render::render2d/3d
from the public API, as they're equivalent to the functions onImageRenderConfig
/VoxelRenderConfig
- Add a new
- Move
RenderHints
intofidget::render
- Remove fine-grained features from
fidget
crate, because we aren't actually testing the power-set of feature combinations in CI (and some were breaking!). The only remaining features arerhai
,jit
andeval-tests
. - Add new
ShapeVars<T>
type, representing a map fromVarIndex -> T
. This type is used for high-level rendering and meshing ofShape
objects that include supplementary variables - Add
Octree::build_with_vars
andImage/VoxelRenderConfig::run_with_vars
functions for shapes with supplementary variables - Change
ShapeBulkEval::eval_v
to take single variables (i.e.x
,y
,z
vary but each variable has a constant value across the whole slice). AddShapeBulkEval::eval_vs
ifx
,y
,z
and variables are all changing through the slices. - Add a new
GenericVmTape<N>
type, and use it for VM evaluation. Previously, theGenericVmFunction<N>
type implemented bothTape
andFunction
. - Add
vars()
toFunction
trait, because there are cases where we want to get the variable map without building a tape (and it must always be the same). - Fix soundness bug in
Mmap
(probably not user-visible) - Add
Send + Sync + Clone
bounds to thetrait Tape
, to make them easily shared between threads. Previously, we used anArc<Tape>
to share tapes between threads, but tapes were already using anArc<..>
under the hood. - Changed
Tape::recycle
from returning aStorage
to returning anOption<Storage>
, as tapes may now be shared between threads. - Use Rayon for 2D and 3D rasterization
- The
threads
member ofVoxelRenderConfig
andImageRenderConfig
is now aOption<ThreadPool>
, which can beNone
(use a single thread),Some(ThreadPool::Global)
(use the global Rayon pool), orSome(ThreadPool::Custom(..))
(use a user-provided pool) - This is a step towards WebAssembly multithreading, using
wasm-bindgen-rayon
. ThreadCount
is moved tofidget::mesh
, because that's the only place it's now used- The plan is to switch to Rayon for meshing as well, eventually
- The
- Tweak
View2
andView3
APIs to make them more useful as camera types