惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
Attack and Defense Labs
Attack and Defense Labs
V2EX - 技术
V2EX - 技术
O
OpenAI News
S
Secure Thoughts
H
Heimdal Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Schneier on Security
Schneier on Security
H
Hacker News: Front Page
S
Security Affairs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
The Register - Security
The Register - Security
GbyAI
GbyAI
Cloudbric
Cloudbric
MongoDB | Blog
MongoDB | Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
Forbes - Security
Forbes - Security
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
The Cloudflare Blog
Recorded Future
Recorded Future
人人都是产品经理
人人都是产品经理
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
Webroot Blog
Webroot Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog
T
Tor Project blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
I
Intezer
V
V2EX
T
Tailwind CSS Blog
SecWiki News
SecWiki News
NISL@THU
NISL@THU
C
Check Point Blog

博客园 - SeanLin

Cocos2d-html5资源预加载列表自动扫描脚本 [转]Git常用操作命令 Cocos2d-html5 HelloWorld模板和引擎使用简介 Javascript API Document生成工具JSDoc HTML5游戏开发涉及到的安全问题 Javascript开发的HTML5游戏的知识产权保护 CCTextureCache的多线程加载原理和使用 引擎demo任务 引擎初始化过程 引擎开发数据记录 游戏引擎消息循环机制 渲染部分 几个需要思考的问题 【转】使用Jasob混淆javascript代码 【转】html5游戏开发引擎大全 【转】V8 Javascript 引擎设计理念 android 字体位置信息 【转】蓝牙协议中HCI层的研究与开发 【转】蓝牙协议的命令和事件
JSDoc参考注释模板
SeanLin · 2012-06-11 · via 博客园 - SeanLin

1. 注释宏或者常量 

/**

 * Default Node tag

 * @constant

 * @type Number

 */

cc.CCNODE_TAG_INVALID = -1;

2. 注释的分段采用<p>,<br/>,</P> 

3.注明类和继承方式

/** 

 * @class

 * @extends cc.Class

 */

cc.Node = cc.Class.extend(/** @lends cc.Node# */{

});

4. 静态构造函数的注释

/** allocates and initializes a node.

 *

 * @constructs

 * @return {cc.Node}

 * @example

 * // example

 * var node = cc.Node.create();

 */

cc.Node.create = function () {

    return new this();

};

5. 函数方法的注释方式:

    /** converts a CCTouch (world coordinates) into a local coordiante. This method is AR (Anchor Relative).

     *

     * @param {cc.Touch}touch

     * @return {cc.Point}

     */

    convertTouchToNodeSpaceAR:function (touch) {

        var point = touch.locationInView(touch.view());

        point = cc.Director.sharedDirector().convertToGL(point);

        return this.convertToNodeSpaceAR(point);

    },

其中数据类型有:Number, Boolean, Array,String,object,function,以及引擎的自定义类型,比如cc.Node,cc.Sprite等。

6. 名字空间

 /**

 * @namespace

 */

var cc = cc = cc || {};