ui.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. /* eslint-disable quote-props */
  2. module.exports = {
  3. classes: {
  4. 'cc': {
  5. 'UIRenderer': {
  6. properties: {
  7. customMaterial: {
  8. displayName: '自定义材质',
  9. tooltip: '使用自定义材质。',
  10. },
  11. color: {
  12. displayName: '颜色',
  13. tooltip: '渲染颜色。',
  14. },
  15. },
  16. },
  17. 'Label': {
  18. properties: {
  19. __extends__: 'classes.cc.UIRenderer.properties',
  20. 'string': {
  21. displayName: '字符串',
  22. tooltip: '显示的文本内容字符串。',
  23. },
  24. 'horizontalAlign': {
  25. displayName: '水平对齐',
  26. tooltip: '文字水平对齐模式。',
  27. tooltip_left: '左对齐。',
  28. tooltip_right: '右对齐。',
  29. tooltip_center: '居中对齐。',
  30. },
  31. 'verticalAlign': {
  32. displayName: '竖直对齐',
  33. tooltip: '文字竖直对齐模式。',
  34. tooltip_top: '上对齐。',
  35. tooltip_bottom: '下对齐。',
  36. tooltip_center: '居中对齐。',
  37. },
  38. 'fontSize': {
  39. displayName: '字体大小',
  40. tooltip: '文字尺寸,以点为单位。',
  41. },
  42. 'lineHeight': {
  43. displayName: '行高',
  44. tooltip: '文字行高,以点为单位。',
  45. },
  46. 'spacingX': {
  47. displayName: '水平间距',
  48. tooltip: '文本字符之间的间距。仅在使用位图字体时生效。',
  49. },
  50. 'overflow': {
  51. displayName: '溢出处理',
  52. tooltip: '文字排版模式,包括以下三种:<br> ' +
  53. '1. CLAMP: 节点约束框之外的文字会被截断。 <br> ' +
  54. '2. SHRINK: 自动根据节点约束框缩小文字。<br> ' +
  55. '3. RESIZE: 根据文本内容自动更新节点的 height 属性。',
  56. },
  57. 'enableWrapText': {
  58. displayName: '自动换行',
  59. tooltip: '自动换行。',
  60. },
  61. 'useSystemFont': {
  62. displayName: '系统字体',
  63. tooltip: '是否使用系统默认字体,选中此项会将引用的字体资产置空。',
  64. },
  65. 'fontFamily': {
  66. displayName: '字体族',
  67. tooltip: '文字字体名字。',
  68. },
  69. 'font': {
  70. displayName: '字体',
  71. tooltip: '使用的字体资源。',
  72. },
  73. 'cacheMode': {
  74. displayName: '缓存模式',
  75. tooltip: '文本缓存模式,包括以下三种:<br> ' +
  76. '1. NONE: 不做任何缓存,文本内容进行一次绘制。 <br> ' +
  77. '2. BITMAP: 将文本作为静态图像加入动态图集进行批次合并,但是不能频繁动态修改文本内容。 <br> ' +
  78. '3. CHAR: 将文本拆分为字符并且把字符纹理缓存到一张字符图集中进行复用,适用于字符内容重复并且频繁更新的文本内容。',
  79. },
  80. 'isBold': {
  81. displayName: '粗体',
  82. tooltip: '使字体加粗。',
  83. },
  84. 'isItalic': {
  85. displayName: '斜体',
  86. tooltip: '使字体倾斜。',
  87. },
  88. 'isUnderline': {
  89. displayName: '下划线',
  90. tooltip: '为字体加下划线。',
  91. },
  92. 'underlineHeight': {
  93. displayName: '下划线高度',
  94. tooltip: '下划线高度。',
  95. },
  96. 'enableOutline': {
  97. displayName: '启用描边',
  98. tooltip: '是否启用描边。',
  99. },
  100. 'outlineColor': {
  101. displayName: '描边颜色',
  102. tooltip: '描边颜色。',
  103. },
  104. 'outlineWidth': {
  105. displayName: '描边宽度',
  106. tooltip: '描边宽度。',
  107. },
  108. 'enableShadow': {
  109. displayName: '启用阴影',
  110. tooltip: '是否启用阴影。',
  111. },
  112. 'shadowColor': {
  113. displayName: '阴影颜色',
  114. tooltip: '阴影颜色。',
  115. },
  116. 'shadowOffset': {
  117. displayName: '阴影偏移',
  118. tooltip: '阴影偏移量。',
  119. },
  120. 'shadowBlur': {
  121. displayName: '阴影模糊',
  122. tooltip: '阴影模糊程度。',
  123. },
  124. },
  125. },
  126. 'RichText': {
  127. properties: {
  128. 'string': {
  129. tooltip: '显示的富文本内容字符串。',
  130. },
  131. 'horizontalAlign': {
  132. displayName: '水平对齐',
  133. tooltip: '文字水平对齐模式。',
  134. tooltip_left: '左对齐。',
  135. tooltip_right: '右对齐。',
  136. tooltip_center: '居中对齐。',
  137. },
  138. 'verticalAlign': {
  139. displayName: '竖直对齐',
  140. tooltip: '文字竖直对齐模式。',
  141. tooltip_top: '上对齐。',
  142. tooltip_bottom: '下对齐。',
  143. tooltip_center: '居中对齐。',
  144. },
  145. 'fontSize': {
  146. displayName: '字体大小',
  147. tooltip: '文字尺寸,以点为单位。',
  148. },
  149. 'fontColor': {
  150. displayName: '颜色',
  151. tooltip: '富文本默认文字颜色。在文本内容没有设置颜色参数时生效。暂不支持颜色级联。',
  152. },
  153. 'fontFamily': {
  154. displayName: '字体族',
  155. tooltip: '文字字体名字。',
  156. },
  157. 'font': {
  158. displayName: '字体',
  159. tooltip: '使用的字体资源。',
  160. },
  161. 'useSystemFont': {
  162. displayName: '系统字体',
  163. tooltip: '是否使用系统默认字体,选中此项会将引用的字体资产置空。',
  164. },
  165. 'cacheMode': {
  166. displayName: '缓存模式',
  167. tooltip: '文本缓存模式,包括以下三种:<br> ' +
  168. '1. NONE: 不做任何缓存,文本内容进行一次绘制。 <br> ' +
  169. '2. BITMAP: 将文本作为静态图像加入动态图集进行批次合并,但是不能频繁动态修改文本内容。 <br> ' +
  170. '3. CHAR: 将文本拆分为字符并且把字符纹理缓存到一张字符图集中进行复用,适用于字符内容重复并且频繁更新的文本内容。',
  171. },
  172. 'maxWidth': {
  173. displayName: '最大宽度',
  174. tooltip: '富文本的最大宽度, 传 0 的话意味着必须手动换行。',
  175. },
  176. 'lineHeight': {
  177. displayName: '行高',
  178. tooltip: '文字行高,以点为单位。',
  179. },
  180. 'imageAtlas': {
  181. displayName: '图集',
  182. tooltip: '对于 img 标签里面的 src 属性名称,' +
  183. '<br>都需要在 image atlas 里面找到一个有效的 sprite frame,' +
  184. '<br>否则 img tag 会判定为无效。',
  185. },
  186. 'handleTouchEvent': {
  187. displayName: '阻止输入事件',
  188. tooltip: '选中此选项后,rich text 将阻止节点边界框中的所有输入事件(鼠标和触摸),' +
  189. '<br>从而防止输入事件穿透到底层节点。',
  190. },
  191. },
  192. },
  193. 'Sprite': {
  194. properties: {
  195. __extends__: 'classes.cc.UIRenderer.properties',
  196. 'grayscale': {
  197. displayName: 'Grayscale',
  198. tooltip: '是否开启灰度渲染模式',
  199. },
  200. 'spriteAtlas': {
  201. displayName: 'Sprite Atlas',
  202. tooltip: '图片资源所属的 Atlas 图集资源',
  203. },
  204. 'spriteFrame': {
  205. displayName: 'Sprite Frame',
  206. tooltip: '渲染 Sprite 使用的 Sprite Frame 图片资源',
  207. },
  208. 'type': {
  209. displayName: 'Type',
  210. tooltip: '渲染模式:<br> - 普通(Simple):修改尺寸会整体拉伸图像,适用于序列帧动画和普通图像 <br>' +
  211. '- 九宫格 Sliced 修改尺寸时四个角的区域不会拉伸,适用于 UI 按钮和面板背景 <br>' +
  212. '- 平铺 Tiled 修改尺寸时会不断平铺原始大小的图片 <br>' +
  213. '- 填充 Filled 设置一定的填充起始位置和方向,能够以一定比率剪裁显示图片',
  214. },
  215. 'sizeMode': {
  216. displayName: 'Size Mode',
  217. tooltip: '指定 Sprite 所在节点的尺寸<br>CUSTOM 表示自定义尺寸<br>TRIMMED 表示取原始图片剪裁透明像素后的尺寸<br>RAW 表示取原始图片未剪裁的尺寸',
  218. },
  219. 'trim': {
  220. displayName: 'Trim',
  221. tooltip: '节点约束框内是否包括透明像素区域,勾选此项会去除节点约束框内的透明区域',
  222. },
  223. },
  224. },
  225. 'UISkew': {
  226. properties: {
  227. 'rotational': {
  228. displayName: 'Rotational',
  229. tooltip: '是否使用旋转类型的斜切算法?',
  230. },
  231. 'skew': {
  232. displayName: 'Skew',
  233. tooltip: '斜切角度值',
  234. },
  235. },
  236. },
  237. },
  238. 'sp': {
  239. 'Skeleton': {
  240. properties: {
  241. __extends__: 'classes.cc.UIRenderer.properties',
  242. 'skeletonData': {
  243. displayName: 'SkeletonData',
  244. tooltip: '骨骼信息数据,拖拽 Spine 导出的骨骼动画信息 json 资源到这里来开始使用',
  245. },
  246. '_defaultSkinIndex': {
  247. displayName: 'Default skin',
  248. tooltip: '选择默认的皮肤',
  249. },
  250. '_animationIndex': {
  251. displayName: 'Animation',
  252. tooltip: '正在播放的动画名称',
  253. },
  254. 'defaultCacheMode': {
  255. displayName: 'Animation Cache Mode',
  256. tooltip: '动画模式,可选实时模式,私有 cached 或公共 cached 模式',
  257. },
  258. 'loop': {
  259. displayName: 'Loop',
  260. tooltip: '是否循环播放当前动画',
  261. },
  262. 'timeScale': {
  263. displayName: 'Time Scale',
  264. tooltip: '当前骨骼中所有动画的时间缩放率',
  265. },
  266. 'debugSlots': {
  267. displayName: 'Debug Slots',
  268. tooltip: '是否显示 slot 的 debug 信息',
  269. },
  270. 'debugBones': {
  271. displayName: 'Debug Bones',
  272. tooltip: '是否显示 bone 的 debug 信息',
  273. },
  274. 'debugMesh': {
  275. displayName: 'Debug Mesh',
  276. tooltip: '是否显示 mesh 的 debug 信息',
  277. },
  278. 'useTint': {
  279. displayName: 'Use Tint',
  280. tooltip: '是否启用染色效果',
  281. },
  282. 'premultipliedAlpha': {
  283. displayName: 'Premultiplied Alpha',
  284. tooltip: '是否启用贴图预乘',
  285. },
  286. 'enableBatch': {
  287. displayName: 'Enable Batch',
  288. tooltip: '如果渲染大量相同纹理,且结构简单的骨骼动画,开启合批可以降低 draw call 数量提升渲染性能',
  289. },
  290. 'sockets': {
  291. displayName: 'Sockets',
  292. tooltip: '当前动画组件维护的挂点数组。一个挂点组件包括动画节点路径和目标节点',
  293. },
  294. },
  295. },
  296. },
  297. },
  298. };