Skip to content

Commit

Permalink
update api comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongfq committed Aug 26, 2024
1 parent b967dc7 commit 6b22991
Show file tree
Hide file tree
Showing 43 changed files with 173 additions and 556 deletions.
4 changes: 2 additions & 2 deletions addons/cclua/cclua/library/cclua/QRCode/ECLevel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ local VALUE
---
---@enum cclua.QRCode.ECLevel
local ECLevel = {
---///< highest
---< highest
QR_ECLEVEL_H = 3,
---///< lowest
---< lowest
QR_ECLEVEL_L = 0,
QR_ECLEVEL_M = 1,
QR_ECLEVEL_Q = 2,
Expand Down
12 changes: 6 additions & 6 deletions addons/cclua/cclua/library/cclua/QRCode/EncodeMode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ local VALUE
---
---@enum cclua.QRCode.EncodeMode
local EncodeMode = {
---///< 8-bit data mode
---< 8-bit data mode
QR_MODE_8 = 2,
---///< Alphabet-numeric mode
---< Alphabet-numeric mode
QR_MODE_AN = 1,
---///< Kanji (shift-jis) mode
---< Kanji (shift-jis) mode
QR_MODE_KANJI = 3,
---///< Terminator (NUL character). Internal use only
---< Terminator (NUL character). Internal use only
QR_MODE_NUL = -1,
---///< Numeric mode
---< Numeric mode
QR_MODE_NUM = 0,
---///< Internal use only
---< Internal use only
QR_MODE_STRUCTURE = 4,
}

Expand Down
12 changes: 6 additions & 6 deletions addons/cclua/cocos2d/library/cc/ApplicationProtocol/Platform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ local VALUE
---
---@enum cc.ApplicationProtocol.Platform
local Platform = {
---/**< Android */
---< Android
OS_ANDROID = 3,
---/**< iPad */
---< iPad
OS_IPAD = 5,
---/**< iPhone */
---< iPhone
OS_IPHONE = 4,
---/**< Linux */
---< Linux
OS_LINUX = 1,
---/**< Mac OS X*/
---< Mac OS X
OS_MAC = 2,
---/**< Windows */
---< Windows
OS_WINDOWS = 0,
}

Expand Down
8 changes: 4 additions & 4 deletions addons/cclua/cocos2d/library/cc/Director/Projection.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ local VALUE
---
---@enum cc.Director.Projection
local Projection = {
---/// It calls "updateProjection" on the projection delegate.
---It calls "updateProjection" on the projection delegate.
CUSTOM = 2,
---/// Default projection is 3D projection.
---Default projection is 3D projection.
DEFAULT = 1,
---/// Sets a 2D projection (orthogonal projection).
---Sets a 2D projection (orthogonal projection).
_2D = 0,
---/// Sets a 3D projection with a fovy=60, znear=0.5f and zfar=1500.
---Sets a 3D projection with a fovy=60, znear=0.5f and zfar=1500.
_3D = 1,
}

Expand Down
20 changes: 10 additions & 10 deletions addons/cclua/cocos2d/library/cc/Image/Format.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ local VALUE
---
---@enum cc.Image.Format
local Format = {
---//! ATITC
---! ATITC
ATITC = 6,
---//! ETC
---! ETC
ETC = 4,
---//! JPEG
---! JPEG
JPG = 0,
---//! PNG
---! PNG
PNG = 1,
---//! PVR
---! PVR
PVR = 3,
---//! Raw Data
---! Raw Data
RAW_DATA = 8,
---//! S3TC
---! S3TC
S3TC = 5,
---//! TGA
---! TGA
TGA = 7,
---//! Unknown format
---! Unknown format
UNKNOWN = 9,
---//! WebP
---! WebP
WEBP = 2,
}

Expand Down
12 changes: 3 additions & 9 deletions addons/cclua/cocos2d/library/cc/Label/Overflow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@ local VALUE
---
---@enum cc.Label.Overflow
local Overflow = {
---/**
--- *In CLAMP mode, when label content goes out of the bounding box, it will be clipped.
--- */
---In CLAMP mode, when label content goes out of the bounding box, it will be clipped.
CLAMP = 1,
NONE = 0,
---/**
--- *In RESIZE_HEIGHT mode, you can only change the width of label and the height is changed automatically.
--- */
---In RESIZE_HEIGHT mode, you can only change the width of label and the height is changed automatically.
RESIZE_HEIGHT = 3,
---/**
--- * In SHRINK mode, the font size will change dynamically to adapt the content size.
--- */
---In SHRINK mode, the font size will change dynamically to adapt the content size.
SHRINK = 2,
}

Expand Down
6 changes: 3 additions & 3 deletions addons/cclua/cocos2d/library/cc/MATRIX_STACK_TYPE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ local VALUE
---
---@enum cc.MATRIX_STACK_TYPE
local MATRIX_STACK_TYPE = {
---/// Model view matrix stack
---Model view matrix stack
MATRIX_STACK_MODELVIEW = 0,
---/// projection matrix stack
---projection matrix stack
MATRIX_STACK_PROJECTION = 1,
---/// texture matrix stack
---texture matrix stack
MATRIX_STACK_TEXTURE = 2,
}

Expand Down
1 change: 0 additions & 1 deletion addons/cclua/cocos2d/library/cc/Mat4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ function Mat4:negate() end
---@return cc.Mat4
---@overload fun(m11: number, m12: number, m13: number, m14: number, m21: number, m22: number, m23: number, m24: number, m31: number, m32: number, m33: number, m34: number, m41: number, m42: number, m43: number, m44: number): cc.Mat4
---@overload fun(mat: olua.float): cc.Mat4
---@overload fun(copy: cc.Mat4): cc.Mat4
function Mat4.new() end

---Post-multiplies this matrix by the matrix corresponding to the
Expand Down
1 change: 0 additions & 1 deletion addons/cclua/cocos2d/library/cc/MeshCommand.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ local MeshCommand = {}
function MeshCommand:init(globalZOrder) end

---@return cc.MeshCommand
---@overload fun(arg1: cc.MeshCommand): cc.MeshCommand
function MeshCommand.new() end

return MeshCommand
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ local VALUE
---@enum cc.ParticleSystem.PositionType
local PositionType = {
FREE = 0,
---/** Living particles are attached to the world but will follow the emitter repositioning.
--- Use case: Attach an emitter to an sprite, and you want that the emitter follows the sprite.*/
---Living particles are attached to the world but will follow the emitter repositioning.
---Use case: Attach an emitter to an sprite, and you want that the emitter follows the sprite.
GROUPED = 2,
---/** Living particles are attached to the world and are unaffected by emitter repositioning. */
---Living particles are attached to the world and are unaffected by emitter repositioning.
RELATIVE = 1,
}

Expand Down
4 changes: 2 additions & 2 deletions addons/cclua/cocos2d/library/cc/PhysicsShape/Type.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ local Type = {
CIRCLE = 1,
EDGEBOX = 5,
EDGECHAIN = 7,
---/** @deprecated Use Type::EDGEPOLYGON instead. */
---\deprecated Use Type::EDGEPOLYGON instead.
EDGEPOLYGEN = 6,
EDGEPOLYGON = 6,
EDGESEGMENT = 4,
---/** @deprecated Use Type::POLYGON instead. */
---\deprecated Use Type::POLYGON instead.
POLYGEN = 3,
POLYGON = 3,
UNKNOWN = 0,
Expand Down
2 changes: 1 addition & 1 deletion addons/cclua/cocos2d/library/cc/ProgressTimer/Type.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local VALUE
---
---@enum cc.ProgressTimer.Type
local Type = {
---/** Radial Counter-Clockwise. */
---Radial Counter-Clockwise.
BAR = 1,
RADIAL = 0,
}
Expand Down
1 change: 0 additions & 1 deletion addons/cclua/cocos2d/library/cc/Rect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ function Rect:merge(rect) end
---@return cc.Rect
---@overload fun(x: number, y: number, width: number, height: number): cc.Rect
---@overload fun(pos: cc.Vec2, dimension: cc.Size): cc.Rect
---@overload fun(other: cc.Rect): cc.Rect
function Rect.new() end

---Set the x, y, width and height of Rect.
Expand Down
14 changes: 7 additions & 7 deletions addons/cclua/cocos2d/library/cc/RenderCommand/Type.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ local VALUE
---
---@enum cc.RenderCommand.Type
local Type = {
---/**Callback command, used for calling callback for rendering.*/
---Callback command, used for calling callback for rendering.
CALLBACK_COMMAND = 6,
CAPTURE_SCREEN_COMMAND = 7,
---/**Custom command, used to draw things other then TRIANGLES_COMMAND.*/
---Custom command, used to draw things other then TRIANGLES_COMMAND.
CUSTOM_COMMAND = 2,
---/**Group command, which can group command in a tree hierarchy.*/
---Group command, which can group command in a tree hierarchy.
GROUP_COMMAND = 3,
---/**Mesh command, used to draw 3D meshes.*/
---Mesh command, used to draw 3D meshes.
MESH_COMMAND = 4,
---/** Quad command, used for draw quad.*/
---Quad command, used for draw quad.
QUAD_COMMAND = 1,
---/**Triangles command, used to draw triangles.*/
---Triangles command, used to draw triangles.
TRIANGLES_COMMAND = 5,
---/** Reserved type.*/
---Reserved type.
UNKNOWN_COMMAND = 0,
}

Expand Down
33 changes: 14 additions & 19 deletions addons/cclua/cocos2d/library/cc/ResolutionPolicy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,24 @@ local VALUE
---
---@enum cc.ResolutionPolicy
local ResolutionPolicy = {
---/** The entire application is visible in the specified area without trying to preserve the original aspect ratio.
--- * Distortion can occur, and the application may appear stretched or compressed.
--- */
---The entire application is visible in the specified area without trying to preserve the original aspect ratio.
---Distortion can occur, and the application may appear stretched or compressed.
EXACT_FIT = 0,
---/** The application takes the height of the design resolution size and modifies the width of the internal
--- * canvas so that it fits the aspect ratio of the device.
--- * No distortion will occur however you must make sure your application works on different
--- * aspect ratios.
--- */
---The application takes the height of the design resolution size and modifies the width of the internal
---canvas so that it fits the aspect ratio of the device.
---No distortion will occur however you must make sure your application works on different
---aspect ratios.
FIXED_HEIGHT = 3,
---/** The application takes the width of the design resolution size and modifies the height of the internal
--- * canvas so that it fits the aspect ratio of the device.
--- * No distortion will occur however you must make sure your application works on different
--- * aspect ratios.
--- */
---The application takes the width of the design resolution size and modifies the height of the internal
---canvas so that it fits the aspect ratio of the device.
---No distortion will occur however you must make sure your application works on different
---aspect ratios.
FIXED_WIDTH = 4,
---/** The entire application fills the specified area, without distortion but possibly with some cropping,
--- * while maintaining the original aspect ratio of the application.
--- */
---The entire application fills the specified area, without distortion but possibly with some cropping,
---while maintaining the original aspect ratio of the application.
NO_BORDER = 1,
---/** The entire application is visible in the specified area without distortion while maintaining the original
--- * aspect ratio of the application. Borders can appear on two sides of the application.
--- */
---The entire application is visible in the specified area without distortion while maintaining the original
---aspect ratio of the application. Borders can appear on two sides of the application.
SHOW_ALL = 2,
UNKNOWN = 5,
}
Expand Down
1 change: 0 additions & 1 deletion addons/cclua/cocos2d/library/cc/Size.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function Size:equals(target) end
---\param point Conversion from a point.
---@return cc.Size
---@overload fun(width: number, height: number): cc.Size
---@overload fun(other: cc.Size): cc.Size
---@overload fun(point: cc.Vec2): cc.Size
function Size.new() end

Expand Down
2 changes: 1 addition & 1 deletion addons/cclua/cocos2d/library/cc/Touch/DispatchMode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local VALUE
---@enum cc.Touch.DispatchMode
local DispatchMode = {
ALL_AT_ONCE = 0,
---/** All at once. */
---All at once.
ONE_BY_ONE = 1,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ local VALUE
---
---@enum cc.TransitionScene.Orientation
local Orientation = {
---/// A vertical orientation where the Bottom is nearer
---A vertical orientation where the Bottom is nearer
DOWN_OVER = 1,
---/// An horizontal orientation where the Left is nearer
---An horizontal orientation where the Left is nearer
LEFT_OVER = 0,
---/// An horizontal orientation where the Right is nearer
---An horizontal orientation where the Right is nearer
RIGHT_OVER = 1,
---/// A vertical orientation where the Up is nearer
---A vertical orientation where the Up is nearer
UP_OVER = 0,
}

Expand Down
29 changes: 14 additions & 15 deletions addons/cclua/cocos2d/library/cc/Uniformkey.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,35 @@ local VALUE
---
---@enum cc.Uniformkey
local Uniformkey = {
---/**Ambient color.*/
---Ambient color.
UNIFORM_AMBIENT_COLOR = 0,
---/**cos(Time).*/
---cos(Time).
UNIFORM_COS_TIME = 9,
---/**@}*/
---\}
UNIFORM_MAX = 15,
---/**MultiView Model view projection matrix.*/
---MultiView Model view projection matrix.
UNIFORM_MULTIVIEW_MVP_MATRIX = 5,
---/**MultiView Projection matrix.*/
---MultiView Projection matrix.
UNIFORM_MULTIVIEW_P_MATRIX = 2,
---/**Model view projection matrix.*/
---Model view projection matrix.
UNIFORM_MVP_MATRIX = 4,
---/**Model view matrix.*/
---Model view matrix.
UNIFORM_MV_MATRIX = 3,
---/**Normal matrix.*/
---Normal matrix.
UNIFORM_NORMAL_MATRIX = 6,
---/**Projection matrix.*/
---Projection matrix.
UNIFORM_P_MATRIX = 1,
---/**Random number.*/
---Random number.
UNIFORM_RANDOM01 = 10,
---/** @{
--- * Sampler 0-3, used for texture.
--- */
---\{
---Sampler 0-3, used for texture.
UNIFORM_SAMPLER0 = 11,
UNIFORM_SAMPLER1 = 12,
UNIFORM_SAMPLER2 = 13,
UNIFORM_SAMPLER3 = 14,
---/**sin(Time).*/
---sin(Time).
UNIFORM_SIN_TIME = 8,
---/**Time.*/
---Time.
UNIFORM_TIME = 7,
}

Expand Down
1 change: 0 additions & 1 deletion addons/cclua/cocos2d/library/cc/Vec4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ function Vec4:negate() end
---@overload fun(xx: number, yy: number, zz: number, ww: number): cc.Vec4
---@overload fun(array: olua.float): cc.Vec4
---@overload fun(p1: cc.Vec4, p2: cc.Vec4): cc.Vec4
---@overload fun(copy: cc.Vec4): cc.Vec4
function Vec4.new() end

---Normalizes this vector.
Expand Down
Loading

0 comments on commit 6b22991

Please sign in to comment.