完善 docs

This commit is contained in:
SmallMain 2022-06-17 18:44:55 +08:00
parent 142e19d075
commit d081c60b05
3 changed files with 61 additions and 38 deletions

View File

@ -9,7 +9,7 @@
"packageName": "org.cocos2d.helloworld",
"startScene": "cab4af66-dc74-41b5-8826-79b3a30ba99a",
"title": "Cocos-Service-Pack-Demo",
"webOrientation": "auto",
"webOrientation": "landscape",
"inlineSpriteFrames": true,
"inlineSpriteFrames_native": true,
"mainCompressionType": "merge_all_json",

View File

@ -47,7 +47,7 @@ Vue.component("cc-richtext", {
:multi-values="multi"
></ui-prop>
<ui-prop v-prop="target.customMaterial"></ui-prop>
<ui-prop v-show="!_isCharCacheMode()" v-prop="target.customMaterial"></ui-prop>
<ui-prop v-prop="target.autoSwitchMaterial"></ui-prop>
<ui-prop v-prop="target.allowDynamicAtlas"></ui-prop>
<ui-prop v-prop="target.enableRetina"></ui-prop>
@ -65,6 +65,9 @@ Vue.component("cc-richtext", {
T: Editor.T,
_isSystemFont() {
return this.target.useSystemFont.value
}
},
_isCharCacheMode() {
return 2 === this.target.cacheMode.value
},
}
});

90
src/creator-sp.d.ts vendored
View File

@ -144,6 +144,12 @@ declare module cc {
*/
getEmptyIndex(): number;
/**
* -1 cc.Texture2D
*/
autoSetTexture(texture: cc.Texture2D): number;
}
/**
@ -175,14 +181,9 @@ declare module cc {
/**
* 使 cc.Texture2D
* 使
*/
linkMaterial(texture: cc.Texture2D, handler: MultiHandler, index: number): void;
/**
* cc.Texture2D
*/
unlinkMaterial(texture: cc.Texture2D): void;
reset(): void;
}
@ -249,6 +250,11 @@ declare module cc {
*/
enableRetina: cc.RenderComponent.EnableType;
/**
*
*/
setVertsDirty(): void;
}
namespace Label {
@ -399,6 +405,11 @@ declare module cc {
*/
allowDynamicAtlas: cc.RenderComponent.EnableType;
/**
*
*/
setVertsDirty(): void;
}
interface RichText {
@ -423,6 +434,11 @@ declare module cc {
*/
enableRetina: cc.RenderComponent.EnableType;
/**
*
*/
setVertsDirty(): void;
}
interface MotionStreak {
@ -437,34 +453,10 @@ declare module cc {
*/
_checkSwitchMaterial(): void;
}
/**
*
*
* inspector inspector
*/
class RichTextSP extends cc.Component {
/**
* 使
*
*/
customMaterial: cc.Material;
/**
*
*/
autoSwitchMaterial: cc.RenderComponent.EnableType;
/**
*
*/
allowDynamicAtlas: cc.RenderComponent.EnableType;
/**
* DPI
*/
enableRetina: cc.RenderComponent.EnableType;
setVertsDirty(): void;
}
@ -475,6 +467,29 @@ declare module cc {
*/
_multiMaterial: cc.Material;
/**
*
*
* @param material
* @param index
*/
linkMaterial(material: cc.Material, index?: number): boolean;
/**
*
*/
unlinkMaterial(): void;
/**
*
*/
getLinkedMaterial(): cc.Material;
/**
*
*/
hasLinkedMaterial(): boolean;
}
interface Material {
@ -556,7 +571,7 @@ declare module cc {
/**
* 使
*/
_count;
_count: number;
/**
* cc.RenderTexture
@ -681,7 +696,7 @@ declare module cc {
/**
* cc.Texture2D UUID
*/
uuid: cc.Texture2D;
uuid: string;
/**
* 使
@ -829,6 +844,11 @@ declare module sp {
*/
setRegion(slotName: string, attachmentName: string, region: spine.TextureRegion): boolean;
/**
*
*/
setVertsDirty(): void;
}
}