Skip to content

@genetic-assembly/three / Class: CandidatePreview ​

Applies candidate patches to a Three.js scene and retains original values for revert().

Constructors ​

Constructor ​

ts
new CandidatePreview(scene): CandidatePreview;

Parameters ​

scene ​

Scene

Returns ​

CandidatePreview

Methods ​

apply() ​

ts
apply(patches): void;

Applies a retained candidate to the scene. The first original value of each changed property is preserved.

Parameters ​

patches ​

ScenePatch[]

Returns ​

void


revert() ​

ts
revert(): void;

Restores properties changed by previews and clears the saved originals.

Returns ​

void

Genetic Assembly · Deterministic NSGA-II optimization