Constructor
new Frame(obj)
Initialize a new frame.
If the argument is another frame, this constructor will create a copy of
of that frame.
If the argument is a Presentation
instance,
an object with default properties will be created.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Frame | Presentation | A frame to copy, or a presentation. |
- Source:
Members
cameraStates :Array.<module:model/Presentation.CameraState>
The camera states of this frame for each layer.
Type:
- Array.<module:model/Presentation.CameraState>
- Source:
frameId :string
A unique identifier for this frame.
Type:
- string
- Source:
(readonly) index :number
The index of this frame in the presentation.
Type:
- number
- Source:
layerProperties :Array.<module:model/Presentation.LayerProperties>
The layer-specific properties of this frame.
Type:
- Source:
notes :string
The presenter's notes for this frame.
Type:
- string
- Source:
presentation :module:model/Presentation.Presentation
The presentation that contains this frame.
Type:
- Source:
showFrameNumber :boolean
Will the player show the number of this frame?
Type:
- boolean
- Default Value:
- true
- Source:
showInFrameList :boolean
Will the player show the title of this frame in the table of contents?
Type:
- boolean
- Default Value:
- true
- Source:
timeoutEnable :boolean
Will the player move to the next frame automatically when the duration of this frame has elapsed?
Type:
- boolean
- Source:
timeoutMs :number
The duration of this frame, in milliseconds.
Type:
- number
- Source:
title :string
The title of this frame.
Type:
- string
- Default Value:
- New frame
- Source:
titleLevel :number
The nesting level of the title of this frame in the frame list.
Type:
- number
- Source:
transitionDurationMs :number
The duration of the transition to this frame, in milliseconds.
Type:
- number
- Default Value:
- 1000
- Source:
Methods
copy(other, preserveId)
Copy the properties of another frame into the current instance.
This method will also construct copies of the layer properties and camera states of the original frame. The default behavior is to make a new unique ID to the current frame.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
other |
module:model/Presentation.Frame | The frame to copy. |
|
preserveId |
boolean | false | If |
- Source:
fromStorable(storable)
Copy the properties of the given object into this instance.
Parameters:
Name | Type | Description |
---|---|---|
storable |
object | A plain object with the properties to copy. |
- Source:
isLinkedTo(frame, layerIndex) → {boolean}
Check whether the current frame is linked to the given frame in the layer at the given index.
Considering two frames A and B where A comes before B in the presentation order,
A and B are linked if all frames in the sequence that starts after A and finishes at B
have their link
attribute true
in their layer properties at the given index.
Parameters:
Name | Type | Description |
---|---|---|
frame |
Frame | Another frame to check against the current frame. |
layerIndex |
number | The index of a layer. |
- Source:
Returns:
true
if this frame is linked to the given other frame.
- Type
- boolean
setAtStates(states)
Copy the given camera states into the current frame.
Parameters:
Name | Type | Description |
---|---|---|
states |
Array.<module:model/CameraState.CameraState> | The states to copy. |
- Source:
toMinimalStorable() → {object}
Convert this instance to a plain object that can be stored as JSON.
The result contains only the properties needed by the Sozi player to show and animate the presentation.
- Source:
Returns:
- A plain object with the properties needed by the player.
- Type
- object
toStorable() → {object}
Convert this instance to a plain object that can be stored as JSON.
The result contains all the properties needed by the editor to restore the state of this instance.
- Source:
Returns:
- A plain object with the properties needed by the editor.
- Type
- object