Project

Project

The Project GUIElement handles the creation of the canvas and drawing the rest of the GUIElements.

Constructor

new Project()

Description:
  • Create a new GUIElement and build the canvas.

Source:

Members

canvasContainer

Description:
  • The div containing the GUI canvas

Source:

The div containing the GUI canvas

frameSizeMode :string

Description:
  • String representation of the current frame size, can be "small", "normal", or "large".

Source:

String representation of the current frame size, can be "small", "normal", or "large".

Type:
  • string

horizontalScrollSpace :number

Description:
  • The amount of distance the timeline can be scrolled horizontally. Depends on the number of frames.

Source:

The amount of distance the timeline can be scrolled horizontally. Depends on the number of frames.

Type:
  • number

scrollX :number

Description:
  • The amount the timeline is scrolled horizontally.

Source:

The amount the timeline is scrolled horizontally.

Type:
  • number

scrollY :number

Description:
  • The amount the timeline is scrolled vertically.

Source:

The amount the timeline is scrolled vertically.

Type:
  • number

verticalScrollSpace :number

Description:
  • The amount of distance the timeline can be scrolled vertically. Depends on the number of layers.

Source:

The amount of distance the timeline can be scrolled vertically. Depends on the number of layers.

Type:
  • number

Methods

_onMouseWheel(e)

Description:
  • Refers to mousewheel events on the timeline.

Source:
Parameters:
Name Type Description
e *

checkForPlayheadAutoscroll()

Description:
  • Auto scrolls the timeline if the playhead is considered off-screen. This is built specifically for moving the playead with hotkeys.

Source:

closePopupMenu()

Description:
  • Close the current popup menu

Source:

createCanvasEvent()

Description:
  • Create an event on the canvas. Saves a reference to the event internally.

Source:

createDocumentEvent()

Description:
  • Create an event on the document. Saves a reference to the event internally.

Source:

dragAssetAtPosition(uuid, x, y, drop)

Description:
  • Drop an asset onto the timeline.

Source:
Parameters:
Name Type Description
uuid string

The UUID of the desired asset.

x number

The x location of the image after creation in relation to the window.

y number

The y location of the image after creation in relation to the window.

drop boolean

If true, will drop the asset with the uuid onto the hovered frame, modifying the frame.

draw()

Description:
  • Draw this GUIElement and update the mouse state

Source:

markElementAsDrawn(elem)

Description:
  • Add a GUIElement to the list of objects that were drawn in the last draw call.

Source:
Parameters:
Name Type Description
elem Wick.GUIElement

the GUIElement to add

onProjectModified(fn)

Description:
  • Give a function to call when the timeline modifies the project.

Source:
Parameters:
Name Type Description
fn function

the function to call

onProjectSoftModified(fn)

Description:
  • Give a function to call when the timeline "soft modifies" the project (moving the playhead, etc).

Source:
Parameters:
Name Type Description
fn function

the function to call

openPopupMenu(popupMenu)

Description:
  • Open a popup menu

Source:
Parameters:
Name Type Description
popupMenu Wick.GUIElement.PopupMenu

the PopupMenu to open

removeAllEventListeners()

Description:
  • Removes all events from the document and canvas.

Source:

resize()

Description:
  • Resize the canvas so that it fits inside the canvas container, call this when the size of the canvas container changes.

Source: