What is the PartsBin? The Lively PartsBin is a repository of active components. It is a collaboration space in which users can find, alter, create and share new content. Parts are morphs that are either directly useful as, for example, editing tools or basic building blocks as, for example, simple input elements. The PartsBin is organized into categories that we call Parts spaces. What is the PartsBin Browser? The PartsBin Browser is a tool to explore, search, and load parts from Lively's PartsBin. It allows searching for a part by the part's name, browsing categories of grouped parts, and exploring the latest changes. How to open the PartsBin Browser? To open the browser, either use the world's menu's "PartsBin" entry or the keyboard short cut "cmd/ctrl - p". How to use the PartsBin Browser? Once the browser is open, use the list on the left side or the search on the top to find a part. When you click on a category or search by name previews of the actual parts appear in the browser's main pane. You can drag the actual versions out – click on one, hold that click and pull it right into your world. All parts are under version control. If you want to access the history you can click on the "more" button in the top-right corner of the browser. It shows all versions, associated commit messages, and a few buttons to load, copy or remove the part. Click on a specific version and then on the "load" button to get a part in a preceding version. How to publish morphs as parts to the PartsBin? Once you have built a new part or finished altering an existing part you can upload your version to the PartsBin. Right-click on the morph you want to share with all users to get its halo buttons. The "M" button opens a menu that holds a "publish" entry. Click it to get a publish dialog up. There you can specify where to publish the part (category), under which name (name), and a comment that describes the part in general. You can also commit a part with a commit message to describe how you changed it. How to load a part programmatically? To load a part from the PartsBin use the lively.PartsBin.getPart(partName, partsSpaceName) function or call the $world.loadPartItem(partName, partsSpaceName) function. Both load the parts from the shared repository. After loading, you can open them in your world. Or do it in one step. Try: $world.openPartItem('Triangle', 'PartsBin/Triangle'); Why and how do we cache Parts? The PartsBin is a central repository of parts. That is, it's part of the Lively Wiki versioning system and, therefore, a retrieving a part means requesting information over the network, which is a quite costly operations (unless your Lively instance is deployed locally). For this reason, we cache parts that are used frequently as, for example, development tools or basic parts. To be more specific, loading parts from the current world ($world.loadPartItem/$world.openPartItem) can return cached versions. That is, the first time you load a part it's always retrieved from the central repository, but a copy is stored locally to speed up the next retrieval. The part cache is not used by the PartsBin browser – loading a version of a part with the browser returns and caches that specific version. Uploading a part invalids the cache for that part – you will get a fresh version the next time you load it. In addition to these simple rules, you can disable part caching (world menu, preferences) or clear the cache manually (world menu, debugging).
Lively's PartsBin
X
M
–