UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

41 lines (34 loc) 844 B
import ObservedString from "../../../core/model/ObservedString.js"; /** * Represents any name, could be a name of an object, a person, a place etc. * * @example * const name = new Name("John"); * name.getValue() // "John" * name.set("Jane"); * name.getValue() // "Jane" * * @author Alex Goldring * @copyright Company Named Limited (c) 2025 */ export class Name extends ObservedString { /** * Custom constructor is necessary for ECS to differentiate this component class from ObservedString * @param {string} [value] */ constructor(value = "") { super(value); } } /** * @readonly * @type {string} */ Name.typeName = "Name"; /** * @readonly * @type {boolean} */ Name.prototype.isName = true; // prefer named import instead export default Name;