Hierarchy

  • Subscribe<Event>
    • Sculpt

Constructors

  • Parameters

    • five: Five
    • Optionaltheme: Partial<{
          box: Partial<BoxStyle>;
          circle: Partial<CircleWithEdgeMeshStyle>;
          cylinder: Partial<CircleWithEdgeMeshStyle>;
          line: Partial<LineMeshStyle>;
          point: Partial<PointStyle>;
          polygon: Partial<AreaStyle>;
          polyline: Partial<LineMeshStyle>;
          prism: Partial<PrismStyle>;
          rectangle: Partial<RectangleWithEdgeMeshStyle>;
      }>

    Returns Sculpt

Properties

group: IObject3D
theme: Partial<{
    box: Partial<BoxStyle>;
    circle: Partial<CircleWithEdgeMeshStyle>;
    cylinder: Partial<CircleWithEdgeMeshStyle>;
    line: Partial<LineMeshStyle>;
    point: Partial<PointStyle>;
    polygon: Partial<AreaStyle>;
    polyline: Partial<LineMeshStyle>;
    prism: Partial<PrismStyle>;
    rectangle: Partial<RectangleWithEdgeMeshStyle>;
}>
modules: GlobalModules = globalModules

Accessors

  • get data(): {
        items: (
            | {
                id: string;
                points: [number, number, number][];
                style: {
                    dashed: boolean;
                    lineColor: number;
                    lineWidth: number;
                };
                type: string;
            }
            | {
                id: string;
                point: [number, number, number];
                style: {
                    color: number;
                    size: number;
                };
                type: string;
            }
            | {
                id: string;
                points: [number, number, number][];
                style: {
                    color: number;
                    lineColor: number;
                    lineWidth: number;
                };
                type: string;
            }
            | {
                heightPoint: [number, number, number];
                id: string;
                points: [number, number, number][];
                style: {
                    color: number;
                    lineColor: number;
                    lineWidth: number;
                };
                type: string;
            }
            | {
                center: [number, number, number];
                id: string;
                normal: [number, number, number];
                radius: number;
                style: {
                    color: number;
                };
                type: string;
            }
            | {
                bottomCenter: [number, number, number];
                id: string;
                radius: number;
                style: {
                    color: number;
                };
                topCenter: [number, number, number];
                type: string;
            })[];
    }
  • Returns {
        items: (
            | {
                id: string;
                points: [number, number, number][];
                style: {
                    dashed: boolean;
                    lineColor: number;
                    lineWidth: number;
                };
                type: string;
            }
            | {
                id: string;
                point: [number, number, number];
                style: {
                    color: number;
                    size: number;
                };
                type: string;
            }
            | {
                id: string;
                points: [number, number, number][];
                style: {
                    color: number;
                    lineColor: number;
                    lineWidth: number;
                };
                type: string;
            }
            | {
                heightPoint: [number, number, number];
                id: string;
                points: [number, number, number][];
                style: {
                    color: number;
                    lineColor: number;
                    lineWidth: number;
                };
                type: string;
            }
            | {
                center: [number, number, number];
                id: string;
                normal: [number, number, number];
                radius: number;
                style: {
                    color: number;
                };
                type: string;
            }
            | {
                bottomCenter: [number, number, number];
                id: string;
                radius: number;
                style: {
                    color: number;
                };
                topCenter: [number, number, number];
                type: string;
            })[];
    }

    • items: (
          | {
              id: string;
              points: [number, number, number][];
              style: {
                  dashed: boolean;
                  lineColor: number;
                  lineWidth: number;
              };
              type: string;
          }
          | {
              id: string;
              point: [number, number, number];
              style: {
                  color: number;
                  size: number;
              };
              type: string;
          }
          | {
              id: string;
              points: [number, number, number][];
              style: {
                  color: number;
                  lineColor: number;
                  lineWidth: number;
              };
              type: string;
          }
          | {
              heightPoint: [number, number, number];
              id: string;
              points: [number, number, number][];
              style: {
                  color: number;
                  lineColor: number;
                  lineWidth: number;
              };
              type: string;
          }
          | {
              center: [number, number, number];
              id: string;
              normal: [number, number, number];
              radius: number;
              style: {
                  color: number;
              };
              type: string;
          }
          | {
              bottomCenter: [number, number, number];
              id: string;
              radius: number;
              style: {
                  color: number;
              };
              topCenter: [number, number, number];
              type: string;
          })[]
  • get items(): BuiltInItem[]
  • Returns BuiltInItem[]

Methods

  • Returns false | void

  • Returns false | void

  • @description: 清空数据

    Returns void

  • @description: 开始绘制 Box

    Parameters

    • Rest...params: [params?: Partial<OpacityStyle & ColorStyle & OcclusionStyle & LineColorStyle & LineOpacityStyle & LineWidthStyle & CreateLimitConfig & DrawMethodConfig>]

    Returns Promise<any>

  • @description: 开始绘制圆形

    Parameters

    • Rest...params: [params?: Partial<CircleWithEdgeMeshStyle>]

    Returns Promise<any>

  • @description: 开始绘制圆柱

    Parameters

    • Rest...params: [params?: Partial<CircleStyle>]

    Returns Promise<any>

  • Parameters

    • Rest...params: [params?: Partial<LineColorStyle & LineOpacityStyle & LineWidthStyle & {
          dashed?: boolean;
      } & OcclusionStyle & Partial<lengthConfig> & Partial<DisplayInfoConfig> & CreateLimitConfig>]

    Returns Promise<void>

    use createLine instead

  • @description: 开始绘制线段

    Parameters

    • Rest...params: [params?: Partial<LineColorStyle & LineOpacityStyle & LineWidthStyle & {
          dashed?: boolean;
      } & OcclusionStyle & Partial<lengthConfig> & Partial<DisplayInfoConfig> & CreateLimitConfig>]

    Returns Promise<any>

  • @description: 开始绘制点

    Parameters

    • Rest...params: [params?: Partial<PointStyle>]

    Returns Promise<any>

  • @description: 开始绘制平面多边形

    Parameters

    • Rest...params: [params?: Partial<OpacityStyle & ColorStyle & OcclusionStyle & {
          lengthEnable: boolean;
      } & CreateLimitConfig>]

    Returns Promise<any>

  • @description: 开始绘制空间折线

    Parameters

    • Rest...params: [params?: Partial<LineColorStyle & LineOpacityStyle & LineWidthStyle & {
          dashed?: boolean;
      } & OcclusionStyle & Partial<lengthConfig> & Partial<DisplayInfoConfig> & CreateLimitConfig>]

    Returns Promise<any>

  • @description: 开始绘制多棱柱

    Parameters

    • Rest...params: [params?: Partial<PrismStyle>]

    Returns Promise<any>

  • @description: 开始绘制矩形

    Parameters

    • Rest...params: [config?: Partial<OpacityStyle & ColorStyle & OcclusionStyle & LineColorStyle & LineOpacityStyle & LineWidthStyle & CreateLimitConfig & DrawMethodConfig>]

    Returns Promise<any>

  • 触发事件

    Type Parameters

    • K extends "click"

      预设的监听事件名称

    Parameters

    • name: K

      事件类型

    • Rest...data: Parameters<Event[K]>

      触发事件的数据

    Returns boolean

    canceled 是否被触发取消

  • @description: 获取物体实例

    Parameters

    • id: string

    Returns BuiltInItem

  • 判断是否注册了事件

    Parameters

    • name: "click"

      事件类型

    Returns boolean

  • @description: 加载数据 展示

    Parameters

    • data: Data
    • Optionalconfig: Partial<BaseObjectConfig>

    Returns void

  • 解除事件

    如果 name 不传的话解除对应所有事件 如果 name, callback 不传的话解除所有name的所有事件

    Type Parameters

    • K extends "click"

      预设的监听事件名称

    Parameters

    • Optionalname: K

      事件类型

    • Optionalcallback: ((...args: Parameters<Event[K]>) => ReturnType<Event[K]>)

      事件回调函数

        • (...args): ReturnType<Event[K]>
        • Parameters

          • Rest...args: Parameters<Event[K]>

          Returns ReturnType<Event[K]>

    Returns void

  • 注册事件

    Type Parameters

    • K extends "click"

      预设的监听事件名称

    Parameters

    • name: K

      事件类型

    • callback: ((...args: Parameters<Event[K]>) => ReturnType<Event[K]>)

      事件回调函数

        • (...args): ReturnType<Event[K]>
        • Parameters

          • Rest...args: Parameters<Event[K]>

          Returns ReturnType<Event[K]>

    • Optionalonce: boolean

      是否只执行一次

    Returns (() => void)

    解除事件

      • (): void
      • Returns void

  • 注册事件(是否只执行一次)

    Type Parameters

    • K extends "click"

      预设的监听事件名称

    Parameters

    • name: K

      事件类型

    • callback: ((...args: Parameters<Event[K]>) => ReturnType<Event[K]>)

      事件回调函数

        • (...args): ReturnType<Event[K]>
        • Parameters

          • Rest...args: Parameters<Event[K]>

          Returns ReturnType<Event[K]>

    Returns (() => void)

    解除事件

      • (): void
      • Returns void

  • @description: 重做

    Returns void

  • @description: 撤销

    Returns void