@manycore/custom-sdk
Advanced tools
Comparing version 1.0.1-rc.8 to 1.0.1-rc.9
216
index.d.ts
import { ELineType as ELineType_2 } from '@manycore/custom-miniapp-sdk'; | ||
import { IExportModelData } from '@manycore/custom-miniapp-sdk'; | ||
import { IParamModelPhotoResponse } from '@manycore/custom-miniapp-sdk'; | ||
import { Number3 } from '@manycore/custom-miniapp-sdk'; | ||
@@ -575,2 +576,63 @@ | ||
/** | ||
* 颜色配置信息 | ||
* | ||
* @example | ||
* ```json | ||
* { | ||
* "color": "#234432", | ||
* "opacity": 0.8 | ||
* } | ||
* ``` | ||
*/ | ||
export declare interface IHintBase { | ||
/** | ||
* 颜色,以#开头,16进制 | ||
* | ||
* @example | ||
* ``` | ||
* #FFB6C1 | ||
* ``` | ||
*/ | ||
color: string; | ||
/** | ||
* 透明度,范围为 0~1 ;当为1时,表示不透明;为0时,表示为全透明 | ||
*/ | ||
opacity: number; | ||
} | ||
/** | ||
* 配置默认的高亮配置信息 | ||
*/ | ||
export declare interface IHintPlank { | ||
/** | ||
* 边框高亮颜色 | ||
*/ | ||
hintOutline?: boolean | IHintBase; | ||
/** | ||
* 高亮的板面信息 | ||
*/ | ||
hintPlankFace?: Array<IHintPlankFace | Omit<IHintPlankFace, keyof IHintBase>>; | ||
} | ||
/** | ||
* 板面配置信息 | ||
* | ||
* @example | ||
* ```json | ||
* { | ||
* "color": "#234432", | ||
* "opacity": 0.8, | ||
* "plankFaceId": 1 | ||
* } | ||
* ``` | ||
*/ | ||
export declare interface IHintPlankFace extends IHintBase { | ||
/** | ||
* 需要展示的该信息的板面 | ||
* 支持多个板面ID或单个 | ||
*/ | ||
plankFaceId: number | number[]; | ||
} | ||
export declare interface IHoleData extends IBaseHoleGrooveData { | ||
@@ -640,2 +702,69 @@ /** | ||
/** | ||
* 模型高亮默认配置信息 | ||
* @example | ||
* ```json | ||
* { | ||
* "outline": { | ||
* "color": "#234432", | ||
* "opacity": 0.8, | ||
* }, | ||
* "plankFace":{ | ||
* "color": "#234432", | ||
* "opacity": 0.8, | ||
* } | ||
* } | ||
* ``` | ||
*/ | ||
export declare interface IModelDefaultHintOption { | ||
/** | ||
* 模型轮廓高亮信息 | ||
*/ | ||
outline?: IHintBase; | ||
/** | ||
* 板面高亮配置信息 | ||
*/ | ||
plankFace?: IHintBase; | ||
} | ||
/** | ||
* 设置模型高亮时的配置信息 | ||
* @example | ||
* ```typescript | ||
* { | ||
* "89D2793C-2B23-41A9-BA6E-4E3908490057": { | ||
* // 使用默认的高亮配置信息 | ||
* "hintBorder": true, | ||
* // 板件高亮 | ||
* "hintPlankFace": [ | ||
* { | ||
* "color": "#234432", | ||
* "opacity": 0.8, | ||
* // 仅单个板面 | ||
* "plankFaceId": 1 | ||
* }, | ||
* { | ||
* "color": "#233242", | ||
* "opacity": 0.8, | ||
* // 多个板面 | ||
* "plankFaceId": [2, 4] | ||
* }, | ||
* // 使用默认颜色 | ||
* { | ||
* "plankFaceId": 3 | ||
* } | ||
* ] | ||
* }, | ||
* "89D2793C-2B23-41A9-BA6E-4E3FS8490057": { | ||
* // 自定议高亮配置信息 | ||
* "hintBorder": { | ||
* "color": "#234432", | ||
* "opacity": 0.8 | ||
* } | ||
* } | ||
* } | ||
* ``` | ||
*/ | ||
export declare type IModelHintOption = Record<string, IHintPlank>; | ||
/** | ||
* 获取交接信息 | ||
@@ -676,2 +805,4 @@ * | ||
export { IParamModelPhotoResponse } | ||
/** | ||
@@ -928,2 +1059,81 @@ * 点的基本类型 | ||
/** | ||
* 配置板件特殊标识 | ||
* | ||
* @example | ||
* ```typescript | ||
* const modelHintService = application.getService(ModelHintService); | ||
* ``` | ||
*/ | ||
export declare class ModelHintService extends BaseService { | ||
/** | ||
* 设置板件标识的特殊颜色 | ||
* @example | ||
* modelHintService.setDefaultHint({ | ||
* "outline": { | ||
* "color": "#234432", | ||
* "opacity": 0.8, | ||
* }, | ||
* "plankFace":{ | ||
* "color": "#234432", | ||
* "opacity": 0.8, | ||
* } | ||
* }); | ||
*/ | ||
setDefaultHint(option: IModelDefaultHintOption): void; | ||
/** | ||
* 设置模型高亮 | ||
* | ||
* @example | ||
* ```typescript | ||
* modelHintService.setModelHint({ | ||
* "89D2793C-2B23-41A9-BA6E-4E3908490057": { | ||
* // 使用默认的标识信息 | ||
* "hintBorder": true, | ||
* // 板件高亮 | ||
* "hintPlankFace": [ | ||
* { | ||
* "color": "#234432", | ||
* "opacity": 0.8, | ||
* // 仅单个板面 | ||
* "plankFaceId": 1 | ||
* }, | ||
* { | ||
* "color": "#233242", | ||
* "opacity": 0.8, | ||
* // 多个板面 | ||
* "plankFaceId": [2, 4] | ||
* }, | ||
* // 使用默认颜色配置 | ||
* { | ||
* "plankFaceId": 1 | ||
* }, | ||
* ] | ||
* }, | ||
* "89D2793C-2B23-41A9-BA6E-4E3FS8490057": { | ||
* // 自定议标识颜色 | ||
* "hintBorder": { | ||
* "color": "#234432", | ||
* "opacity": 0.8 | ||
* } | ||
* } | ||
* }) | ||
* ``` | ||
*/ | ||
setModelHint(config: IModelHintOption): void; | ||
/** | ||
* 清空当前已经配置的标识信息 | ||
* | ||
* 当id不传时,清空所有,当id传入部分时,则清除对应的内容 | ||
* | ||
* @example | ||
* ```typescript | ||
* modelHintService.clearModelHint() | ||
* ``` | ||
* | ||
* @param id 待删除标识信息的ID | ||
*/ | ||
clearModelHint(id?: string[]): void; | ||
} | ||
/** | ||
* 主要提供了获取当前模型的 JSON 输出数据,以及当前模型的交接信息的功能。 | ||
@@ -982,2 +1192,8 @@ * | ||
getTopParamModels(options?: ITopParamModelListOption): Promise<ITopParamModelDataResponse>; | ||
/** | ||
* 获取模型缩略图信息 | ||
* @param modelId | ||
* @returns 模型缩略图信息 | ||
*/ | ||
getParamModelPhotoById(modelId: string | string[]): Promise<IParamModelPhotoResponse[]>; | ||
} | ||
@@ -984,0 +1200,0 @@ |
{ | ||
"name": "@manycore/custom-sdk", | ||
"version": "1.0.1-rc.8", | ||
"version": "1.0.1-rc.9", | ||
"description": "custom v2.0 sdk", | ||
@@ -11,2 +11,3 @@ "publishConfig": { | ||
"build:tsc": "tsc", | ||
"build-package:dev": "node --max-old-space-size=16000 node_modules/.bin/webpack-cli -c scripts/webpack.config.js --analyze --mode production", | ||
"build-package": "node --max-old-space-size=16000 node_modules/.bin/webpack-cli -c scripts/webpack.config.js --mode production", | ||
@@ -25,3 +26,3 @@ "build:dts": "api-extractor run --local && rm -rf build", | ||
"servkit": "^1.0.15", | ||
"@manycore/custom-miniapp-sdk": "0.4.1" | ||
"@manycore/custom-miniapp-sdk": "0.5.1-snapshot.4" | ||
}, | ||
@@ -28,0 +29,0 @@ "dependencies": {}, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
7056415
4
2286
1