API Reference

new Campzimmer(options) → {Object}

Source:

Campzimmer module

Parameters:
NameTypeDescription
optionsCampzimmerOptions

Options to initilize the module with

Returns:

Campzimmer instance

Type
Object

Methods

updateImage(image) → Promise<void>

Source:

Updates the current image loaded into the viewer.

Parameters:
NameTypeDescription
imagestring

Url of new image

Returns:

Promise<void>

Type
Promise

getSize() → {Object}

Source:

Returns the size of the viewer's container

Parameters:
NameTypeDescription
Returns:

Object

Type
Size

setSize(size) → <void>

Source:

Set the size of the viewer's container and reconfigures the field of view.

Parameters:
NameTypeDescription
sizeSize

Size of the container

Returns:

Void

Type
<void>
Interfaces

CampzimmerOptions

Options to configure campzimmer viewer.

Parameters:
NameTypeRequiredDescription
containerstring | HTMLElementYes

Either the id of the container, or the HTMLElement for which the viewer will fill.

imagestringNo

Image Url.

captionstringNo

Caption of the image displayed below the image. See example.

loading_imagestringNo

Image Url of the image which will replace the loading text in the center of the loading indicator.

loading_textstringNo

If a loading image is not set, this loading text will display in the center of the loading indicator. Default 'loading'.

autorotatebooleanNo

Configures the image to rotate without user interaction. Default true.

rotationSpeednumberNo

Configures the speed in which the image rotates. Range 0 to .1. Default 0.04.

idleTimeoutnumber(milliseconds)No

Configures the amount of time between last user interaction and autorotation start again. Default 4000.

gyroscopebooleanNo

Enables/Disables gyroscope control on mobile devices. Default false.

Size

Size option to configure container

Parameters:
NameTypeRequiredDescription
widthstring Yes

Width. Can be described in px, vw, vh, or % units.

heightstringYes

Height. Can be described in px, vw, vh, or % units.