Abstract
Protected
constructorThe settings JSON object.
Abstract
mocRelative path of he moc file, typically ends with .moc
in Cubism 2 and .moc3
in Cubism 4.
The model's name, typically used for displaying or logging. By default it's inferred from
the URL by taking the folder name (the second to last component). In Cubism 2 it'll be overwritten
by the name
field of settings JSON.
Optional
physicsRelative path of the physics file.
Optional
poseRelative path of the pose file.
Abstract
texturesRelative paths of the texture images.
URL of the model settings file, used to resolve paths of the resource files defined in settings.
This typically ends with .model.json
in Cubism 2 and .model3.json
in Cubism 4.
Replaces the resource files by running each file through the replacer
.
Invoked with two arguments: (file, path)
, where file
is the file definition,
and path
is its property path in the ModelSettings instance. A string must be returned to be the replacement.
modelSettings.replaceFiles((file, path) => {
// file = "foo.moc", path = "moc"
// file = "foo.png", path = "textures[0]"
// file = "foo.mtn", path = "motions.idle[0].file"
// file = "foo.motion3.json", path = "motions.idle[0].File"
return "bar/" + file;
});
Resolves a relative path using the url. This is used to resolve the resource files defined in the settings.
Resolved path.
Relative path.
Validates that the files defined in the settings exist in given files. Each file will be resolved by resolveURL before comparison.
All the files which are defined in the settings and also exist in given files, including the optional files.
Error if any essential file is defined in settings but not included in given files.
A flat array of file paths.
Generated using TypeDoc
Parses, and provides access to the settings JSON.