Ms3dLoader class

Constructors

Ms3dLoader()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

alphaTest ↔ double
GL_ALPHA_TEST threshold used for .png textures (TEXTURELIST depthtest).
getter/setter pair
animationSets → Map<String, Map<String, Ms3dAnimDef>>
Named animation sets: set name -> animation name -> definition. Filled from config.json "actoranimations" by loadAnimationSets or set directly in code.
final
namedColors → Map<String, int>
Plain colours used as material/texture names in MudClient3D models (e.g. "black", "brownshiny"); used when no texture file matches.
final
textureRoot ↔ String
Prefix added to MS3D material/texture names that aren't full asset paths (MS3D material names in these games are paths relative to the old asset folder, e.g. "models/sand.png").
getter/setter pair

Static Methods

addWieldMeshes(Object3D actor, String path, int joint, {Map<String, String>? texturereplace, Set<String> hidegroups = const {}}) → Future<List<SkinnedMesh>>
MudClient3D OBJECT wieldbone: a MODEL wielded by an actor (a zombie's head or arm, the mower). MudClient drew it inside the actor with its vertices skinned to one joint, so the model's own scale/z are ignored here (they only apply when the item is dropped on the ground). Each group becomes a SkinnedMesh on actor's skeleton with every vertex bound to joint joint; the meshes are added to the actor's holder and returned (remove them, or hide them, to unwield).
clipDuration(Object3D actor, String name) → double?
Clip duration in seconds for name on an actor created by createActor (frames * interval), or null.
createActor(String path, {dynamic animations, Map<String, String>? texturereplace, String? action = 'idle', bool basic = false, bool castshadow = false, double? randomduration, double? startat, double? duration, double? z, Set<String> hidegroups = const {}}) → Future<Object3D>
Creates an animated actor, ready for openworld's Actor/Mob functions.
createModel(String path, {Map<String, String>? texturereplace, bool basic = false, bool castshadow = false, bool merge = false, bool turnfix = true, String rename(String groupName, int groupIndex)?, Set<String> hidegroups = const {}}) → Future<Group>
Loads a static model. Mesh names are the MS3D group names (so BaseObject.setVisible(obj, false, groupname: 'bubbles') works); each mesh also keeps the original name in extra'groupname'.
isMs3dPath(String? path) → bool
loadAnimationSets(Map? json) → void
Reads "actoranimations": {"man": {"idle": {"filename":..., "interval":100}, ...}}.
loadClip(String name, Ms3dAnimDef def) → Future<AnimationClip>
Converts an MS3D/SMD animation into a clip for bones named ms3d_j.
loadMs3d(String path) → Future<Ms3dModel>
Parsed MS3D (or SMD converted to the same structure), cached.
loadTexture(String path) → Future<Texture?>
A texture loaded the way model textures are (MS3D orientation), for swapping a model material's map at runtime (e.g. a sky dome texture).
setItemTransform(Object3D obj, {double turn = 0, double pitch = 0, double scale = 1, double z = 0, bool turnfix = true}) → void
Applies an item transform the way MudClient3D did for a MODEL/ACTOR inside an OBJECT (turn, pitch, scale and z offset, applied in the model's own frame). Use on objects from createModel/createActor.