forked from StudioInfinity/dyna3
Trigger realization more directly
Simplify the system that reactively triggers realizations, at the cost of removing the preconditioning step described in issue #101 and doing unnecessary realizations after certain kinds of updates. The new system should trigger a realization after any update that could affect the assembly's deformation space. For simplicity, any update to the regulator list triggers an update, even if it doesn't affect the set of constraints. In particular, adding a regulator triggers an unnecessary realization.
This commit is contained in:
parent
0801200210
commit
c73008d702
4 changed files with 36 additions and 96 deletions
|
@ -900,9 +900,6 @@ pub fn TestAssemblyChooser() -> View {
|
|||
let state = use_context::<AppState>();
|
||||
let assembly = &state.assembly;
|
||||
|
||||
// pause realization
|
||||
assembly.keep_realized.set(false);
|
||||
|
||||
// clear state
|
||||
assembly.regulators.update(|regs| regs.clear());
|
||||
assembly.elements.update(|elts| elts.clear());
|
||||
|
@ -923,9 +920,6 @@ pub fn TestAssemblyChooser() -> View {
|
|||
"irisawa-hexlet" => load_irisawa_hexlet_assemb(assembly),
|
||||
_ => ()
|
||||
};
|
||||
|
||||
// resume realization
|
||||
assembly.keep_realized.set(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue