egret 位图字体支持按文本换行

熟悉label和textfield都知道有个属性:wordWrap = true; 意思是按照文本换行,遇到空格或标点,不连续的语句才换行。

而egret的位图字体并不支持,所以我这里稍微改了下官方源码,有能力的自行替换:

//代码为5.12.2分支

//////////////////////////////////////////////////////////////////////////////////////
//
//  Copyright (c) 2014-present, Egret Technology.
//  All rights reserved.
//  Redistribution and use in source and binary forms, with or without
//  modification, are permitted provided that the following conditions are met:
//
//     * Redistributions of source code must retain the above copyright
//       notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above copyright
//       notice, this list of conditions and the following disclaimer in the
//       documentation and/or other materials provided with the distribution.
//     * Neither the name of the Egret nor the
//       names of its contributors may be used to endorse or promote products
//       derived from this software without specific prior written permission.
//
//  THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
//  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
//  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
//  IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
//  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA,
//  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
//  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
//  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
//  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////////////
namespace egret {
    /**
     * Bitmap font adopts the Bitmap+SpriteSheet mode to render text.
     * @version Egret 2.4
     * @platform Web,Native
     * @includeExample egret/text/BitmapText.ts
     * @language en_US
     */
    /**
     * 位图字体采用了Bitmap+SpriteSheet的方式来渲染文字。
     * @version Egret 2.4
     * @platform Web,Native
     * @includeExample egret/text/BitmapText.ts
     * @language zh_CN
     */
    export class BitmapText extends DisplayObject {

        /**
         * Create an egret.BitmapText object
         * @version Egret 2.4
         * @platform Web,Native
         * @language en_US
         */
        /**
         * 创建一个 egret.BitmapText 对象
         * @version Egret 2.4
         * @platform Web,Native
         * @language zh_CN
         */
        public constructor() {
            super();
            if (!egret.nativeRender) {
                this.$renderNode = new sys.BitmapNode();
            }
        }

         /**
         * color
         * @version Egret 3.0
         * @platform Web
         * @language en_US
         */
        protected color:number = -1;

         /**
         * set color
         * @version Egret 3.0
         * @platform Web
         * @language en_US
         */
        public setColor(color:number){
            let colorMatrix1;
            if(color>=0){
                this.color = color;
                let colorConf = {r:(color>>16&0xff)/255.0,g:(color>>8&0xff)/255.0,b:(color&0xff)/255.0,a:1};
                // console.log(colorConf);
                colorMatrix1 = [
                    colorConf.r, 0, 0, 0, 0,
                    0, colorConf.g, 0, 0, 0,
                    0, 0, colorConf.b, 0, 0,
                    0, 0, 0, colorConf.a, 0
                ];
            }else{
                this.color = -1;
            }
            if(this.color!=-1){
                let color = new egret.ColorMatrixFilter(colorMatrix1);
                this.filters = [color];
            }else{
                this.filters = null;
            }
        }

         /**
         * get color
         * @version Egret 3.0
         * @platform Web
         * @language en_US
         */
        public getColor(){
            return this.color;
        }


        protected createNativeDisplayObject(): void {
            this.$nativeDisplayObject = new egret_native.NativeDisplayObject(egret_native.NativeObjectType.BITMAP_TEXT);
        }

        private $smoothing: boolean = Bitmap.defaultSmoothing;

        /**
         * Whether or not is smoothed when scaled.
         * @default true。
         * @version Egret 3.0
         * @platform Web
         * @language en_US
         */
        /**
         * 控制在缩放时是否进行平滑处理。
         * @default true。
         * @version Egret 3.0
         * @platform Web
         * @language zh_CN
         */
        public get smoothing(): boolean {
            return this.$smoothing;
        }

        public set smoothing(value: boolean) {
            let self = this;
            if (value == self.$smoothing) {
                return;
            }
            self.$smoothing = value;
            if (!egret.nativeRender) {
                let p = self.$parent;
                if (p && !p.$cacheDirty) {
                    p.$cacheDirty = true;
                    p.$cacheDirtyUp();
                }
                let maskedObject = self.$maskedObject;
                if (maskedObject && !maskedObject.$cacheDirty) {
                    maskedObject.$cacheDirty = true;
                    maskedObject.$cacheDirtyUp();
                }
            }
        }

        private $text: string = "";

        /**
         * A string to display in the text field.
         * @version Egret 2.4
         * @platform Web,Native
         * @language en_US
         */
        /**
         * 要显示的文本内容
         * @version Egret 2.4
         * @platform Web,Native
         * @language zh_CN
         */
        public get text(): string {
            return this.$text;
        }

        public set text(value: string) {
            this.$setText(value);
        }

        /**
         * @private
         */
        $setText(value: string): boolean {
            if (value == null) {
                value = "";
            } else {
                value = String(value);
            }
            let self = this;
            if (value == self.$text)
                return false;
            self.$text = value;
            self.$invalidateContentBounds();

            return true;
        }

        protected $textFieldWidth: number = NaN;

        /**
         * @private
         */
        $getWidth(): number {
            let self = this;
            let w = self.$textFieldWidth;
            return isNaN(w) ? self.$getContentBounds().width : w;
        }

        /**
         * @private
         */
        $setWidth(value: number): boolean {
            let self = this;
            if (value < 0 || value == self.$textFieldWidth) {
                return false;
            }
            self.$textFieldWidth = value;
            self.$invalidateContentBounds();
            return true;
        }

        private $textLinesChanged: boolean = false;

        /**
         * @private
         */
        $invalidateContentBounds(): void {
            this.$renderDirty = true;
            this.$textLinesChanged = true;
            //todo lcj
            this.$updateRenderNode();
        }

        protected $textFieldHeight: number = NaN;

        /**
         * @private
         */
        $getHeight(): number {
            let self = this;
            let h = self.$textFieldHeight;
            return isNaN(h) ? self.$getContentBounds().height : h;
        }

        /**
         * @private
         */
        $setHeight(value: number): boolean {
            let self = this;
            if (value < 0 || value == self.$textFieldHeight) {
                return false;
            }
            self.$textFieldHeight = value;
            self.$invalidateContentBounds();
            return true;
        }

        protected $font: BitmapFont = null;
        protected $fontStringChanged: boolean = false;

        /**
         * The name of the font to use, or a comma-separated list of font names, the type of value must be BitmapFont.
         * @default null
         * @version Egret 2.4
         * @platform Web,Native
         * @language en_US
         */
        /**
         * 要使用的字体的名称或用逗号分隔的字体名称列表,类型必须是 BitmapFont。
         * @default null
         * @version Egret 2.4
         * @platform Web,Native
         * @language zh_CN
         */
        public get font(): Object {
            return this.$font;
        }

        public set font(value: Object) {
            this.$setFont(value);
        }

        $setFont(value: any): boolean {
            let self = this;
            if (self.$font == value) {
                return false;
            }
            self.$font = value;
            self.$fontStringChanged = true;
            this.$invalidateContentBounds();
            return true;
        }

        private $lineSpacing: number = 0;

        /**
         /**
         * An integer representing the amount of vertical space between lines.
         * @default 0
         * @version Egret 2.4
         * @platform Web,Native
         * @language en_US
         */
        /**
         * 一个整数,表示行与行之间的垂直间距量
         * @default 0
         * @version Egret 2.4
         * @platform Web,Native
         * @language zh_CN
         */
        public get lineSpacing(): number {
            return this.$lineSpacing;
        }

        public set lineSpacing(value: number) {
            this.$setLineSpacing(value);
        }

        $setLineSpacing(value: number): boolean {
            let self = this;
            if (self.$lineSpacing == value)
                return false;
            self.$lineSpacing = value;
            self.$invalidateContentBounds();
            return true;
        }

        private $letterSpacing: number = 0;

        /**
         * An integer representing the amount of distance between characters.
         * @default 0
         * @version Egret 2.4
         * @platform Web,Native
         * @language en_US
         */
        /**
         * 一个整数,表示字符之间的距离。
         * @default 0
         * @version Egret 2.4
         * @platform Web,Native
         * @language zh_CN
         */
        public get letterSpacing(): number {
            return this.$letterSpacing;
        }

        public set letterSpacing(value: number) {
            this.$setLetterSpacing(value);
        }

        $setLetterSpacing(value: number): boolean {
            let self = this;
            if (self.$letterSpacing == value) {
                return false;
            }
            self.$letterSpacing = value;
            self.$invalidateContentBounds();
            return true;
        }

        private $textAlign: string = egret.HorizontalAlign.LEFT;

        /**
         * Horizontal alignment of text.
         * @default:egret.HorizontalAlign.LEFT
         * @version Egret 2.5.6
         * @platform Web,Native
         * @language en_US
         */
        /**
         * 文本的水平对齐方式。
         * @default:egret.HorizontalAlign.LEFT
         * @version Egret 2.5.6
         * @platform Web,Native
         * @language zh_CN
         */
        public get textAlign(): string {
            return this.$textAlign;
        }

        public set textAlign(value: string) {
            this.$setTextAlign(value);
        }

        $setTextAlign(value: string): boolean {
            let self = this;
            if (self.$textAlign == value) {
                return false;
            }
            self.$textAlign = value;
            self.$invalidateContentBounds();
            return true;
        }

        private $verticalAlign: string = egret.VerticalAlign.TOP;

        /**
         * Vertical alignment of text.
         * @default:egret.VerticalAlign.TOP
         * @version Egret 2.5.6
         * @platform Web,Native
         * @language en_US
         */
        /**
         * 文字的垂直对齐方式。
         * @default:egret.VerticalAlign.TOP
         * @version Egret 2.5.6
         * @platform Web,Native
         * @language zh_CN
         */
        public get verticalAlign(): string {
            return this.$verticalAlign;
        }

        public set verticalAlign(value: string) {
            this.$setVerticalAlign(value);
        }

        $setVerticalAlign(value: string): boolean {
            let self = this;
            if (self.$verticalAlign == value) {
                return false;
            }
            self.$verticalAlign = value;
            self.$invalidateContentBounds();
            return true;
        }

        /**
         * A ratio of the width of the space character. This value is multiplied by the height of the first character is the space character width.
         * @default 0.33
         * @version Egret 2.4
         * @platform Web,Native
         * @language en_US
         */
        /**
         * 一个空格字符的宽度比例。这个数值乘以第一个字符的高度即为空格字符的宽。
         * @default 0.33
         * @version Egret 2.4
         * @platform Web,Native
         * @language zh_CN
         */
        public static EMPTY_FACTOR: number = 0.33;

        /**
         * @private
         */
        $updateRenderNode(): void {
            let self = this;
            let textLines: string[] = this.$getTextLines();
            let length: number = textLines.length;
            if (length == 0) {
                if (egret.nativeRender && self.$font) {
                    self.$nativeDisplayObject.setDataToBitmapNode(self.$nativeDisplayObject.id, self.$font.$texture, []);
                    self.$nativeDisplayObject.setWidth(0);
                    self.$nativeDisplayObject.setHeight(0);
                }
                return;
            }
            let drawArr = [];
            let textLinesWidth: number[] = this.$textLinesWidth;
            let bitmapFont: BitmapFont = self.$font;
            let node
            if (!egret.nativeRender) {
                node = <sys.BitmapNode>this.$renderNode;
                if (bitmapFont.$texture) {
                    node.image = bitmapFont.$texture.$bitmapData;
                }
                node.smoothing = self.$smoothing;
            }
            let emptyHeight: number = bitmapFont._getFirstCharHeight();
            let emptyWidth: number = Math.ceil(emptyHeight * BitmapText.EMPTY_FACTOR);
            let hasSetHeight: boolean = !isNaN(self.$textFieldHeight);
            let textWidth: number = self.$textWidth;
            let textFieldWidth: number = self.$textFieldWidth;
            let textFieldHeight: number = self.$textFieldHeight;
            let align: string = self.$textAlign;
            let yPos: number = this.$textOffsetY + this.$textStartY;
            let lineHeights: number[] = this.$lineHeights;
            for (let i: number = 0; i < length; i++) {
                let lineHeight: number = lineHeights[i];
                if (hasSetHeight && i > 0 && yPos + lineHeight > textFieldHeight) {
                    break;
                }
                let line = textLines[i];
                let len = line.length;
                let xPos = this.$textOffsetX;

                if (align != egret.HorizontalAlign.LEFT) {
                    let countWidth: number = textFieldWidth > textWidth ? textFieldWidth : textWidth;
                    if (align == egret.HorizontalAlign.RIGHT) {
                        xPos += countWidth - textLinesWidth[i];
                    } else if (align == egret.HorizontalAlign.CENTER) {
                        xPos += Math.floor((countWidth - textLinesWidth[i]) / 2);
                    }
                }
                for (let j: number = 0; j < len; j++) {
                    let character = line.charAt(j);
                    let texture = bitmapFont.getTexture(character);
                    if (!texture) {
                        if (character == " ") {
                            xPos += emptyWidth;
                        }
                        else {
                            egret.$warn(1046, character);
                        }
                        continue;
                    }
                    let bitmapWidth = texture.$bitmapWidth;
                    let bitmapHeight = texture.$bitmapHeight;
                    if (egret.nativeRender) {
                        drawArr.push(texture.$bitmapX, texture.$bitmapY,
                            bitmapWidth, bitmapHeight, xPos + texture.$offsetX, yPos + texture.$offsetY,
                            texture.$getScaleBitmapWidth(), texture.$getScaleBitmapHeight(),
                            texture.$sourceWidth, texture.$sourceHeight);
                    }
                    else {
                        node.imageWidth = texture.$sourceWidth;
                        node.imageHeight = texture.$sourceHeight;
                        node.drawImage(texture.$bitmapX, texture.$bitmapY,
                            bitmapWidth, bitmapHeight, xPos + texture.$offsetX, yPos + texture.$offsetY,
                            texture.$getScaleBitmapWidth(), texture.$getScaleBitmapHeight());
                    }
                    xPos += (bitmapFont.getConfig(character, "xadvance") || texture.$getTextureWidth()) + self.$letterSpacing;
                }
                yPos += lineHeight + self.$lineSpacing;
            }
            if (egret.nativeRender) {
                self.$nativeDisplayObject.setDataToBitmapNode(self.$nativeDisplayObject.id, bitmapFont.$texture, drawArr);
                let bounds = self.$getContentBounds();
                self.$nativeDisplayObject.setWidth(bounds.width);
                self.$nativeDisplayObject.setHeight(bounds.height);
            }
        }

        /**
         * @private
         */
        $measureContentBounds(bounds: Rectangle): void {
            let lines: string[] = this.$getTextLines();
            if (lines.length == 0) {
                bounds.setEmpty();
            }
            else {
                bounds.setTo(this.$textOffsetX + this.$textStartX, this.$textOffsetY + this.$textStartY, this.$textWidth - this.$textOffsetX,
                    this.$textHeight - this.$textOffsetY);
            }
        }

        private $textWidth: number = NaN;

        /**
         * Get the BitmapText measured width
         * @version Egret 2.4
         * @platform Web,Native
         * @language en_US
         */
        /**
         * 获取位图文本测量宽度
         * @version Egret 2.4
         * @platform Web,Native
         * @language zh_CN
         */
        public get textWidth(): number {
            this.$getTextLines();
            return this.$textWidth;
        }

        private $textHeight: number = NaN;

        /**
         * Get Text BitmapText height
         * @version Egret 2.4
         * @platform Web,Native
         * @language en_US
         */
        /**
         * 获取位图文本测量高度
         * @version Egret 2.4
         * @platform Web,Native
         * @language zh_CN
         */
        public get textHeight(): number {
            this.$getTextLines();
            return this.$textHeight;
        }

        /**
         * @private
         */
        private $textOffsetX: number = 0;
        /**
         * @private
         */
        private $textOffsetY: number = 0;
        /**
         * @private
         */
        private $textStartX: number = 0;
        /**
         * @private
         */
        private $textStartY: number = 0;

        /**
         * @private
         */
        private textLines: string[] = [];
        /**
         * @private 每一行文字的宽度
         */
        private $textLinesWidth: number[];
        /**
         * @private
         */
        public $lineHeights: number[] = [];

        /**
         * @private
         *
         * @returns
         */
        $getTextLines(): string[] {
            let self = this;
            if (!self.$textLinesChanged) {
                return self.textLines;
            }
            let textLines: string[] = [];
            self.textLines = textLines;
            let textLinesWidth: number[] = [];
            self.$textLinesWidth = textLinesWidth;
            self.$textLinesChanged = false;
            let lineHeights: number[] = [];
            self.$lineHeights = lineHeights;
            if (!self.$text || !self.$font) {
                self.$textWidth = 0;
                self.$textHeight = 0;
                return textLines;
            }
            let lineSpacing = self.$lineSpacing;
            let letterSpacing = self.$letterSpacing;
            let textWidth: number = 0;
            let textHeight: number = 0;
            let textOffsetX: number = 0;
            let textOffsetY: number = 0;
            let hasWidthSet: boolean = !isNaN(self.$textFieldWidth);
            let textFieldWidth: number = self.$textFieldWidth;
            let textFieldHeight: number = self.$textFieldHeight;
            let bitmapFont: BitmapFont = self.$font;
            let emptyHeight: number = bitmapFont._getFirstCharHeight();
            let emptyWidth: number = Math.ceil(emptyHeight * BitmapText.EMPTY_FACTOR);
            let text: string = self.$text;
            let textArr: string[] = text.split(/(?:\r\n|\r|\n)/);
            let length: number = textArr.length;
            let isFirstLine: boolean = true;
            let isFirstChar: boolean;
            let isLastChar: boolean;
            let lineHeight: number;
            let xPos: number;
            var autoWrapChar = " .,\"'";
            for (let i = 0; i < length; i++) {
                let line: string = textArr[i];
                // console.log(line);
                let len = line.length;
                lineHeight = 0;
                xPos = 0;
                isFirstChar = true;
                isLastChar = false;
                for (let j = 0; j < len; j++) {
                    if (!isFirstChar) {
                        xPos += letterSpacing;
                    }
                    let character = line.charAt(j);
                    let texureWidth: number;
                    let textureHeight: number;
                    let offsetX: number = 0;
                    let offsetY: number = 0;
                    let texture = bitmapFont.getTexture(character);
                    if (!texture) {
                        if (character == " ") {
                            texureWidth = emptyWidth;
                            textureHeight = emptyHeight;
                        }
                        else {
                            egret.$warn(1046, character);
                            if (isFirstChar) {
                                isFirstChar = false;
                            }
                            continue;
                        }
                    }
                    else {
                        texureWidth = texture.$getTextureWidth();
                        textureHeight = texture.$getTextureHeight();
                        offsetX = texture.$offsetX;
                        offsetY = texture.$offsetY;
                    }

                    if (isFirstChar) {
                        isFirstChar = false;
                        textOffsetX = Math.min(offsetX, textOffsetX);
                    }

                    if (isFirstLine) {
                        isFirstLine = false;
                        textOffsetY = Math.min(offsetY, textOffsetY);
                    }
                    if (hasWidthSet && j > 0 && xPos + texureWidth > textFieldWidth) {
                        if(autoWrapChar.indexOf(line[j])==-1){
                            let breakPos = 0;
                            let subStr =  line.substring(0,j);
                            for(let k=0;k<autoWrapChar.length;k++){
                                let breakChar = autoWrapChar[k];
                                breakPos = subStr.lastIndexOf(breakChar);
                                if(breakPos>0){
                                    breakPos++;
                                    break;
                                }
                            }
                            if(breakPos>0){
                                // console.log([j,breakPos,j-breakPos]);
                                j-=(j-breakPos);
                                if(!setLineData(line.substring(0, breakPos)))
                                    break;
                            }else{
                                if (!setLineData(line.substring(0, j)))
                                    break;
                            }
                        }else{
                            if (!setLineData(line.substring(0, j)))
                                break;
                        }
                        // if (!setLineData(line.substring(0, j)))
                        //     break;
                        line = line.substring(j);
                        len = line.length;
                        j = 0;
                        //最后一个字符要计算纹理宽度,而不是xadvance
                        if (j == len - 1) {
                            xPos = texureWidth;
                        }
                        else {
                            xPos = bitmapFont.getConfig(character, "xadvance") || texureWidth;
                        }
                        lineHeight = textureHeight;
                        continue;
                    }
                    //最后一个字符要计算纹理宽度,而不是xadvance
                    if (j == len - 1) {
                        xPos += texureWidth;
                    }
                    else {
                        xPos += bitmapFont.getConfig(character, "xadvance") || texureWidth;
                    }
                    lineHeight = Math.max(textureHeight, lineHeight);
                }
                if (textFieldHeight && i > 0 && textHeight > textFieldHeight) {
                    break;
                }
                isLastChar = true;
                if (!setLineData(line))
                    break;
            }
            function setLineData(str: string): boolean {
                if (textFieldHeight && textLines.length > 0 && textHeight > textFieldHeight) {
                    return false;
                }
                textHeight += lineHeight + lineSpacing;
                if (!isFirstChar && !isLastChar) {
                    xPos -= letterSpacing;
                }
                textLines.push(str);
                lineHeights.push(lineHeight);
                textLinesWidth.push(xPos);
                textWidth = Math.max(xPos, textWidth);
                return true;
            }
            textHeight -= lineSpacing;
            self.$textWidth = textWidth;
            self.$textHeight = textHeight;
            this.$textOffsetX = textOffsetX;
            this.$textOffsetY = textOffsetY;
            this.$textStartX = 0;
            this.$textStartY = 0;
            let alignType;
            if (textFieldWidth > textWidth) {
                alignType = self.$textAlign;
                if (alignType == egret.HorizontalAlign.RIGHT) {
                    this.$textStartX = textFieldWidth - textWidth;
                } else if (alignType == egret.HorizontalAlign.CENTER) {
                    this.$textStartX = Math.floor((textFieldWidth - textWidth) / 2);
                }
            }
            if (textFieldHeight > textHeight) {
                alignType = self.$verticalAlign;
                if (alignType == egret.VerticalAlign.BOTTOM) {
                    this.$textStartY = textFieldHeight - textHeight;
                } else if (alignType == egret.VerticalAlign.MIDDLE) {
                    this.$textStartY = Math.floor((textFieldHeight - textHeight) / 2);
                }
            }
            return textLines;
        }
    }
}
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 215,245评论 6 497
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 91,749评论 3 391
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 160,960评论 0 350
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 57,575评论 1 288
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 66,668评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,670评论 1 294
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,664评论 3 415
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,422评论 0 270
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,864评论 1 307
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,178评论 2 331
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,340评论 1 344
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,015评论 5 340
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,646评论 3 323
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,265评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,494评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,261评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,206评论 2 352

推荐阅读更多精彩内容

  • 1.纹理集实际上就是将一些零碎的小图放到一张大图当中。游戏中也经常使用到纹理集。使用纹理集的好处很多,我们通过将大...
    别人家的程序员阅读 8,064评论 1 21
  • 第一部分 HTML&CSS整理答案 1. 什么是HTML5? 答:HTML5是最新的HTML标准。 注意:讲述HT...
    kismetajun阅读 27,467评论 1 45
  • 发现 关注 消息 iOS 第三方库、插件、知名博客总结 作者大灰狼的小绵羊哥哥关注 2017.06.26 09:4...
    肇东周阅读 12,089评论 4 62
  • The English language possesses a vivid saying to describe...
    化真阅读 474评论 0 1
  • 今天我们在大操场上比赛跳兔子舞!我们穿着整齐的校服 白色的球鞋 白白的裤袜 我们表现的非常好!得到了老师们的表扬!...
    张梦洁1阅读 301评论 0 0