--- layout: posts title: Api - IModel Interface ---

A model is a composite object which may contain a map of paths, or a map of models recursively.

Example:

var m = {
  paths: {
    "line1": { type: 'line', origin: [0, 0], end: [1, 1] },
    "line2": { type: 'line', origin: [0, 0], end: [-1, -1] }
  }
};

Hierarchy

Implemented by

Index

Properties

Optional caption

caption: ICaption

Optional Caption object.

Optional exporterOptions

exporterOptions: object

Optional exporter options for this model.

Type declaration

  • [exporterName: string]: any

Optional layer

layer: string

Optional layer of this model.

Optional models

models: IModelMap

Optional map of models within this model.

Optional notes

notes: string

An author may wish to add notes to this model instance.

Optional origin

origin: IPoint

Optional origin location of this model.

Optional paths

paths: IPathMap

Optional map of path objects in this model.

Optional type

type: string

A model may want to specify its type, but this value is not employed yet.

Optional units

units: string

Optional unit system of this model. See UnitType for possible values.

Generated using TypeDoc