UNPKG

@petkoneo/phaser3-rex-plugins

Version:
83 lines 2.65 kB
"use strict"; /** * Copyright(c) Live2D Inc. All rights reserved. * * Use of this source code is governed by the Live2D Open Software license * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html. */ var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }; Object.defineProperty(exports, "__esModule", { value: true }); var csmstring_1 = require("../type/csmstring"); /** * パラメータ名・パーツ名・Drawable名を保持 * * パラメータ名・パーツ名・Drawable名を保持するクラス。 */ var CubismId = /** @class */ (function () { /** * コンストラクタ */ function CubismId(id) { if (typeof id === 'string') { this._id = new csmstring_1.csmString(id); return; } this._id = id; } /** * ID名を取得する */ CubismId.prototype.getString = function () { return this._id; }; /** * idを比較 * @param c 比較するid * @return 同じならばtrue,異なっていればfalseを返す */ CubismId.prototype.isEqual = function (c) { if (typeof c === 'string') { return this._id.isEqual(c); } else if (c instanceof csmstring_1.csmString) { return this._id.isEqual(c.s); } else if (c instanceof CubismId) { return this._id.isEqual(c._id.s); } return false; }; /** * idを比較 * @param c 比較するid * @return 同じならばtrue,異なっていればfalseを返す */ CubismId.prototype.isNotEqual = function (c) { if (typeof c == 'string') { return !this._id.isEqual(c); } else if (c instanceof csmstring_1.csmString) { return !this._id.isEqual(c.s); } else if (c instanceof CubismId) { return !this._id.isEqual(c._id.s); } return false; }; return CubismId; }()); exports.CubismId = CubismId; // Namespace definition for compatibility. var $ = __importStar(require("./cubismid")); // eslint-disable-next-line @typescript-eslint/no-namespace var Live2DCubismFramework; (function (Live2DCubismFramework) { Live2DCubismFramework.CubismId = $.CubismId; })(Live2DCubismFramework = exports.Live2DCubismFramework || (exports.Live2DCubismFramework = {})); //# sourceMappingURL=cubismid.js.map