Visual Logic Editor, aka Puzzles

Verge3D Puzzles is a powerful yet easy-to-use tool for creating behavior scenarios. With Puzzles you can make your 3D content interactive and responsive to user actions.

Puzzles overview

If you are no coder (designer, marketer, engineer, teacher?), this tool will significantly extend your possibilities. But even if you are a seasoned programmer, you may find it very helpful both in prototyping and in production.

Contents

Running the Editor

You can start adding or editing Puzzles for an application by clicking the button in the 'operations' column on the main page:

Run puzzles

... or by using the button on the right bar when on the application page:

Run puzzles from app page

User Interface

Layout

Puzzles are dragged out from the expandable toolbox (located on the left) to the main workspace area. The 3D rendering is contained in a floating viewport window. This window can be moved, resized, hidden, paused, and checked for FPS.

Layout of the Puzzles editor

The control buttons for the Editor are located at the bottom bar. On the top, tabs are displayed (default tabs are called init and main).

The layout settings (tabs, viewport position and size) are saved individually for each project, making it possible to restore the settings if Puzzles are opened with another browser or workstation.

Viewport Resizing / Resetting

Drag a corner or an edge of the viewport window to resize it.

Resizing puzzles viewport

You can reset the position and size of the viewport window by selecting Reset Viewport Dimensions in the context menu invoked by right-clicking on an empty spot of the workspace:

Resetting puzzles viewport

Refreshing the Editor

Use the browser's standard refresh page button to reload the editor and the application running in the viewport.

Reloading puzzles

Any unsaved puzzles or changes will be removed, and all variables and scene objects properties will be reset to their initial values. Therefore you can use this method for cleaning up application state in the course of development iterations.

Controls

Run

After clicking this button, your puzzles take effect. Under the hood, the Run button interprets the puzzles currently present in the work space (in all tabs) and produces JavaScript code from them. The code is then executed by the browser and thus applied to the application running in the background.

Run puzzles logic

Most of the times, you can repeatedly click Run in order to immediately apply your tweaks for the puzzles. However, if you want to reset the state of your app and perform a clean run, simply use the browser's standard refresh page button instead. Once the page is refreshed, the puzzles automatically take effect. Be sure to save your changes before reloading the page otherwise they will be lost!

Save

This button saves your puzzles. Similarly to the Run operator, the Save button interprets the puzzles currently present in the work space (in all tabs) and produces JavaScript code from them. However, the code is not executed. Instead, all puzzles and the generated code are saved in the application folder for persistent storage as the files visual_logic.xml and visual_logic.js, respectively.

Save puzzles

The Save operator requires the local development server to be running. The server is launched automatically with the first instance of Blender, 3ds Max or Maya, but if it went down for some reason, a connection error will be displayed when you try to save your puzzles:

Puzzles save error

In this case you should launch Blender, 3ds Max or Maya, or, if the program is already running, start the App Manager again.

See also Backup.

Tabs

You can reorder your puzzles in tabs to make them more manageable and responsive. To create a new tab, click on the "plus" button in the top bar, and enter the tab name in the text field.

Creating puzzles tab

Now you can add puzzles to the new tab. To move some puzzles from another tab, use the cut and paste shortcuts Ctrl-X / Ctrl-V. All tabs share the same namespace, so you can define procedures or variables in one tab and use them in another.

To delete a tab, click on the cross button near its name. Use this operation with caution as it cannot be undone except by restoring from a backup. All puzzles from a deleted tab will be destroyed!

Deleting puzzles tab

There is no dedicated control for renaming tabs. However, you can easily rename a tab by editing the visual_logic.xml file in your application folder.

Renaming puzzles tab

Once renamed, your tab name will be updated after refreshing the editor.

Right Click Menu (Over a Puzzle)

The context menu can be invoked by right-clicking on a puzzle (residing in the toolbox or placed in the workspace), or on the empty workspace. The menu provides the access to a bunch of very helpful operators.

Duplicate

Creates a copy of a group of puzzles. You can also use the copy and paste shortcuts Ctrl-C / Ctrl-V to do the same.

Duplicate menu in Puzzles editor

Add Comment / Remove Comment

Adds a comment to a puzzle. The comment is represented with a question mark button by clicking on which a comment window is revealed. The comment may be saved persistently in both open and closed state.

Add puzzles comment

A comment can be removed by selecting Remove Comment in the right-click menu.

Remove puzzles comment

By the way, this is not the only method to put comments in your code. You can also use the comment puzzle to add comments that are always visible.

Inline Inputs / External Inputs

By default, a puzzle can be in its inlined or external inputs form. This menu option switches between these forms. The difference is purely cosmetic, yet sometimes transforming puzzles can make them more readable and compact.

Transforming puzzles inputs

Collapse / Expand

A group of puzzles can be collapsed to make it more compact.

Collapsing / expanding puzzles

Disable / Enable

Use this menu option to skip a group of puzzles from execution.

Disabling / enabling puzzles

Delete

Deletes a group of puzzles. Alternatively, use the Del key.

Deleting puzzles

Save to Library

Saves a group of puzzles to the Library for the purpose of reusing it later.

Help

Opens the corresponding puzzle's page from the Puzzles Reference. Available both for the toolbox...

Help menu in puzzles

...and for puzzles in the workspace:

Help menu in puzzles

You can also access the help pages from this manual's contents window (on the left), or by using the following table:

Right Click Menu (Over the Workspace)

Undo / Redo

Reverses or repeats the most recently performed action. You can also use the shortcuts Ctrl-Z / Ctrl-Shift-Z.

Puzzles undo/redo feature

Straighten Up

Repositions all the puzzles in a tab so that they form a neat line.

Puzzles straighten up feature

Collapse / Expand

Works similarly to the single group variant, except it affects all puzzles in a tab.

Puzzles collapse/expand feature

Delete

Works similarly to the single group variant, except it deletes all puzzles in a tab.

Puzzles delete feature

Reset Viewport Dimensions

Resets the position and the dimensions of the viewport window to better fit the screen resolution.

Resetting puzzles viewport window

Backup

Every time you click the Save button, the previously saved file visual_logic.xml is copied to the folder called v3d_app_data/puzzles_backup with a time stamp added to the file name.

Directory with puzzles backup scripts

This allows you to restore any of the previously saved revisions of your puzzles when you need it. Simply copy a file back to the application folder root and remove the time stamp from its name. Your puzzles will be updated after refreshing the editor.

Plugins

Visual Logic Editor supports plugins, which is the preferred way to extend the Editor with new puzzles. The Verge3D distribution already contains stock E-Commerce and E-Learning plugins, but you can also install more or even create your own plugins. See more information here: Plugins.

There is also a community-supported list of the plugins available from the third-party developers.

Got Questions?

Feel free to ask on the forums!