UNPKG

awayjs-display

Version:
116 lines 3.68 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 TesselatedFontChar_1 = require("../text/TesselatedFontChar"); /** * 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 TesselatedFontTable = (function (_super) { __extends(TesselatedFontTable, _super); //TODO test shader picking // public get shaderPickingDetails():boolean // { // // return this.sourceEntity.shaderPickingDetails; // } /** * Creates a new TesselatedFont object */ function TesselatedFontTable() { _super.call(this); this._font_chars = new Array(); this._font_chars_dic = new Object(); this._ascent = 0; this._descent = 0; } /** * */ TesselatedFontTable.prototype.dispose = function () { }; Object.defineProperty(TesselatedFontTable.prototype, "ascent", { get: function () { return this._ascent; }, set: function (value) { this._ascent = value; }, enumerable: true, configurable: true }); Object.defineProperty(TesselatedFontTable.prototype, "descent", { get: function () { return this._descent; }, set: function (value) { this._descent = value; }, enumerable: true, configurable: true }); Object.defineProperty(TesselatedFontTable.prototype, "offset_x", { get: function () { return this._offset_x; }, set: function (value) { this._offset_x = value; }, enumerable: true, configurable: true }); Object.defineProperty(TesselatedFontTable.prototype, "offset_y", { get: function () { return this._offset_y; }, set: function (value) { this._offset_y = value; }, enumerable: true, configurable: true }); TesselatedFontTable.prototype.get_font_chars = function () { return this._font_chars; }; TesselatedFontTable.prototype.get_font_em_size = function () { return this._font_em_size; }; TesselatedFontTable.prototype.set_whitespace_width = function (value) { this._whitespace_width = value; }; TesselatedFontTable.prototype.get_whitespace_width = function () { return this._whitespace_width; }; TesselatedFontTable.prototype.set_font_em_size = function (font_em_size) { this._font_em_size = font_em_size; }; /** * */ TesselatedFontTable.prototype.getChar = function (name) { return this._font_chars_dic[name]; }; /** * */ TesselatedFontTable.prototype.setChar = function (name, elements, char_width) { var tesselated_font_char = new TesselatedFontChar_1.default(elements); tesselated_font_char.char_width = char_width; elements.name = name; this._font_chars.push(tesselated_font_char); this._font_chars_dic[name] = tesselated_font_char; }; return TesselatedFontTable; }(AssetBase_1.default)); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = TesselatedFontTable; //# sourceMappingURL=TesselatedFontTable.js.map