Surface Class

A surface, which is a product unit. Each page of a product is a surface.

example
surface = {
    width: 200,
    height: 150,
    printAreas: [{
        bounds: { x:0, y:0, width: 200, height: 150}
    }],
    mockup: {
        down: "envelope"
    },
    previewMockups: ["coolEnvelope"] 
}

Methods

Name Description
setMockup

Sets a new surface mockup. Returns new product instance containing the changed surface.

setPrintAreas

Sets new print areas for the surface. Returns new product instance containing the changed surface.

Properties

height

height: number

A surface height.

id

id: string

A unique surface identifier.

mockup

mockup: SurfaceMockup

A surface mockup.

name

name: string

A surface name.

previewMockups

previewMockups: SurfaceMockup []

A preview mockups.

width

width: number

A surface width.