完善 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", "packageName": "org.cocos2d.helloworld",
"startScene": "cab4af66-dc74-41b5-8826-79b3a30ba99a", "startScene": "cab4af66-dc74-41b5-8826-79b3a30ba99a",
"title": "Cocos-Service-Pack-Demo", "title": "Cocos-Service-Pack-Demo",
"webOrientation": "auto", "webOrientation": "landscape",
"inlineSpriteFrames": true, "inlineSpriteFrames": true,
"inlineSpriteFrames_native": true, "inlineSpriteFrames_native": true,
"mainCompressionType": "merge_all_json", "mainCompressionType": "merge_all_json",

View File

@ -47,7 +47,7 @@ Vue.component("cc-richtext", {
:multi-values="multi" :multi-values="multi"
></ui-prop> ></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.autoSwitchMaterial"></ui-prop>
<ui-prop v-prop="target.allowDynamicAtlas"></ui-prop> <ui-prop v-prop="target.allowDynamicAtlas"></ui-prop>
<ui-prop v-prop="target.enableRetina"></ui-prop> <ui-prop v-prop="target.enableRetina"></ui-prop>
@ -65,6 +65,9 @@ Vue.component("cc-richtext", {
T: Editor.T, T: Editor.T,
_isSystemFont() { _isSystemFont() {
return this.target.useSystemFont.value 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; 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; reset(): void;
/**
* cc.Texture2D
*/
unlinkMaterial(texture: cc.Texture2D): void;
} }
@ -249,6 +250,11 @@ declare module cc {
*/ */
enableRetina: cc.RenderComponent.EnableType; enableRetina: cc.RenderComponent.EnableType;
/**
*
*/
setVertsDirty(): void;
} }
namespace Label { namespace Label {
@ -399,6 +405,11 @@ declare module cc {
*/ */
allowDynamicAtlas: cc.RenderComponent.EnableType; allowDynamicAtlas: cc.RenderComponent.EnableType;
/**
*
*/
setVertsDirty(): void;
} }
interface RichText { interface RichText {
@ -423,6 +434,11 @@ declare module cc {
*/ */
enableRetina: cc.RenderComponent.EnableType; enableRetina: cc.RenderComponent.EnableType;
/**
*
*/
setVertsDirty(): void;
} }
interface MotionStreak { interface MotionStreak {
@ -437,34 +453,10 @@ declare module cc {
*/ */
_checkSwitchMaterial(): void; _checkSwitchMaterial(): void;
}
/**
*
*
* inspector inspector
*/
class RichTextSP extends cc.Component {
/** /**
* 使 *
*/ */
customMaterial: cc.Material; setVertsDirty(): void;
/**
*
*/
autoSwitchMaterial: cc.RenderComponent.EnableType;
/**
*
*/
allowDynamicAtlas: cc.RenderComponent.EnableType;
/**
* DPI
*/
enableRetina: cc.RenderComponent.EnableType;
} }
@ -475,6 +467,29 @@ declare module cc {
*/ */
_multiMaterial: cc.Material; _multiMaterial: cc.Material;
/**
*
*
* @param material
* @param index
*/
linkMaterial(material: cc.Material, index?: number): boolean;
/**
*
*/
unlinkMaterial(): void;
/**
*
*/
getLinkedMaterial(): cc.Material;
/**
*
*/
hasLinkedMaterial(): boolean;
} }
interface Material { interface Material {
@ -556,7 +571,7 @@ declare module cc {
/** /**
* 使 * 使
*/ */
_count; _count: number;
/** /**
* cc.RenderTexture * cc.RenderTexture
@ -681,7 +696,7 @@ declare module cc {
/** /**
* cc.Texture2D UUID * cc.Texture2D UUID
*/ */
uuid: cc.Texture2D; uuid: string;
/** /**
* 使 * 使
@ -829,6 +844,11 @@ declare module sp {
*/ */
setRegion(slotName: string, attachmentName: string, region: spine.TextureRegion): boolean; setRegion(slotName: string, attachmentName: string, region: spine.TextureRegion): boolean;
/**
*
*/
setVertsDirty(): void;
} }
} }