ModelCooking class final
Import settings and cooking for the project's models, on disk.
A model's settings live beside it (<model>.import.json) and its cooked
copy too (<model>.jmodel), which the game loads in its place. A model
with neither is used as it is; one with settings is cooked when they are
saved, and again whenever the file or the settings change (isStale).
Constructors
- ModelCooking({required String root})
-
Cooking for the project at
root.
Properties
Methods
-
cook(
String path) → Future< CookedResult> -
Cooks the model at
pathwith its settings, writing its cooked copy. -
cookStale(
Iterable< String> paths) → Future<(List< String> , Map<String, Object> )> -
Cooks each of
pathsthat isStale; the ones cooked, with what failed by path. -
hasSettings(
String path) → bool -
Whether the model at
pathhas settings of its own. -
isCooked(
String path) → bool -
Whether the model at
pathhas a cooked copy. -
isStale(
String path) → bool -
Whether the model at
pathis to be cooked and its cooked copy is missing or was made from another file or other settings. -
modelsUnder(
String folder) → List< String> -
The model files under
folder(project-relative), recursively. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveSettings(
String path, ModelImportSettings settings) → Future< void> -
Saves
settingsbeside the model atpath. -
settingsOf(
String path) → ModelImportSettings -
The settings of the model at
path: its sidecar's, or the defaults. -
toString(
) → String -
A string representation of this object.
inherited
-
uncook(
String path) → Future< void> -
Deletes the cooked copy of the model at
path: the game loads the file itself again. Its settings stay.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited