UNPKG

awayjs-display

Version:
74 lines 2.24 kB
"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var AssetBase_1 = require("awayjs-core/lib/library/AssetBase"); var TesselatedFontTable_1 = require("../text/TesselatedFontTable"); /** * GraphicBase wraps a TriangleElements as a scene graph instantiation. A GraphicBase is owned by a Sprite object. * * * @see away.base.TriangleElements * @see away.entities.Sprite * * @class away.base.GraphicBase */ var Font = (function (_super) { __extends(Font, _super); //TODO test shader picking // public get shaderPickingDetails():boolean // { // // return this.sourceEntity.shaderPickingDetails; // } /** * Creates a new TesselatedFont object */ function Font() { _super.call(this); this._font_styles = new Array(); } Object.defineProperty(Font.prototype, "font_styles", { get: function () { return this._font_styles; }, enumerable: true, configurable: true }); Object.defineProperty(Font.prototype, "assetType", { /** * */ get: function () { return Font.assetType; }, enumerable: true, configurable: true }); /** * */ Font.prototype.dispose = function () { }; /** *Get a font-table for a specific name, or create one if it does not exists. */ Font.prototype.get_font_table = function (style_name) { var len = this._font_styles.length; for (var i = 0; i < len; ++i) { if (this._font_styles[i].name == style_name) return this._font_styles[i]; } var font_style = new TesselatedFontTable_1.default(); font_style.name = style_name; this._font_styles.push(font_style); return font_style; }; Font.assetType = "[asset Font]"; return Font; }(AssetBase_1.default)); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Font; //# sourceMappingURL=Font.js.map