@huukhanhnguyen/model / core/applyDocument
core/applyDocument
applyDocument()
applyDocument(
model,next):ApplyReport
Apply next onto model in place. Returns what actually changed.
Validates first, for the same reason fromJSON does: the engine speaks only the current schema, and a document in an older shape is REJECTED rather than quietly accommodated (the applyMaterial → faceMaterial name rewrite runs inside that validate).