Library for Your Puzzles
Library is a persistent storage for groups of puzzles for re-use in multiple projects.
- Adding Entries
- Using Entries
- Renaming Entries
- Deleting Entries
- Stock Library Reference
There are two libraries in Verge3D:
- Stock Library — stored in library.xml file inside the puzzles subfolder of the installation folder. This is a read-only library which is built in Verge3D. See below for the reference.
- User Library — stored in my_library.xml file inside the applications folder. You can add your own puzzles to this library.
You can add a puzzle group to the user library by right-clicking on it and selecting the option Save N Puzzles to Library. In the modal window type the name for the group as it will appear in the library's list of entries. Refresh the list of entries by reloading the page with the Puzzles editor to update that list.
A saved group of puzzle can be retrieved from the library by dragging it out to a workspace.
There is no dedicated control for renaming library entries. However, you can easily rename an entry by editing the my_library.xml file (in 2 places).
Once renamed, your library entry name will be updated after refreshing the editor.
An entry can be deleted from the user library by clicking the ❌ button.
Every time you save or delete entries, the previously saved file my_library.xml is copied to the folder called library_backup with a timestamp added to the file name.
This allows you to restore any of the previously saved revisions of your user library when you need it. Simply copy a file back to the application folder and remove the time stamp from its name. Your library will be updated after refreshing the editor.
Stock Library Reference
Below is the reference of the entries of the Stock puzzles library which comes with Verge3D.
Detect when the mouse cursor is located just above the target object, then change the mouse cursor to look as "pointer", thus hinting the user that this object is clickable.
Replace Cube by the actual object name. If you need to perform something different in your app beyond simple cursor styling, replace the set style puzzles as well.
For usage example, check out the following demo from the Asset Store: Ring.
The puzzle when clicked does not allow you to separate "down" and "up" movements of the mouse buttons (or pressing/releasing fingers on the touchscreen), hence it's not possible to catch the moment when the mouse is actually pressed (or released). The following set of puzzles allows this:
Replace Cube by the actual object name and the print to console puzzles by the actual blocks you need in your app.
Use this library entry to detect keyboard strikes.
Replace ArrowLeft/ArrowRight by the actual keys, and the print to console puzzles by the actual blocks you need to be executed in your app.
Key values are just letters (e.g. "w", "a", "s", "d") you type on your keyboard. Also it can be special values like "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Enter", "Tab", "Home", "End", "Delete", "Escape", " " (for space), etc. See here for a complete list of keys.
For usage example, check out the following demo from the Asset Store: Farmers Journey.
Use this library entry to optimize quality and performance of your applications. On high-end devices with HiDPI screen this set increases pixel density for better rendering quality. For middle-end and low-end devices this set removes all post-processing effects and disables shadows which should greatly increase rendering performance on such devices.
This library entry does not require any additional tweaks and is recommended for use in all Verge3D applications.
Setup Fullscreen iFrame
Replace the default fullscreen icon by the custom element you have designed for your application.
For this set of puzzles to work properly, specify a new ID for the icon container element instead of fs_button, a new ID for the icon element instead of fs_image, and the new set of enter/exit icons instead of enter.png/exit.png.
This set of puzzles is designed to work with iframed applications, where you have modified fullscreen container element (in most cases it would be <a> or <div> element) located on the parent page (that's why we enabled in parent doc). Also, modification of the src property means the child element should be <img>. However, this particular setup of HTML elements is not mandatory, you are free to modify the puzzles as you wish. For more information please refer to the init fullscreen puzzle reference.
For usage example, check out the following demo from the Asset Store: Teapot Heater.
Sound iOS Workaround
This library entry helps overcome restrictions for playing sounds on iOS/Android devices.
Replace mySound.mp3 by the actual sound you have in your app.
Display an alert message at the bottom of the screen.
Here you can specify both the text shown in the alert message and its styling.
For usage example, check out the following demo from the Asset Store: Custom Image.
Move in VR mode by using device controls (touch pad or stick). This set of puzzles should work with most VR controllers available on the market provided they conform the xr-standard layout.
Replace collision_mesh by the actual collision mesh used to control the zone the camera can move within. Basically, the zone above this material is walkable, while everything outside is forbidden for movement.
Also make sure you have enable the sitting or standing VR positioning mode. Check out the enter VR mode puzzle for more info.
Having Troubles with Puzzles?
Seek help on the forums!