# Assets and Animations

This section presents examples of how [digital factory models can be instantiated](https://virtualfactory.gitbook.io/vlft/kb/instantiation) in terms of assets and animations.

## Example 1

The first example is a 3D scene consisting of 3 identical bottles whose 3D representation file is available on an online repository.

### Example 1 - Assets in Spreadsheet

The scene and assets can be [instantiated as a spreadsheet](https://difactory.github.io/repository/spreadsheets/VF_assets_example1.xlsx) according to the [template](https://virtualfactory.gitbook.io/vlft/kb/instantiation/assets/spreadsheet).

### Example 1 - Assets in JSON

Similarly, the example can be instantiated in a JSON file[`example_1.json`](https://difactory.github.io/repository/scenes/ex/example_1.json)

### Example 1 - Visualization

The example can be visualized in [VEB.js](https://virtualfactory.gitbook.io/vlft/tools/vebjs) by importing the JSON file `example_1.json` (with command 'Import Scene') or [setting the URL with the path to the JSON file](https://difactory.github.io/DF/scenes/ex/ex1.html) after `?inputscene=` (the JSON file must be available on a [remote repository](https://virtualfactory.gitbook.io/vlft/kb/instantiation/datarepo/remote#online-repository-for-binary-text-files)).

![Example\_1 in VEB.js](https://2247033703-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lh1dC9-F-cM6usakky7%2F-MXqUgW9W25cwrz_4Mf_%2F-MXqYAfvO9cWPxCzQcs6%2FVEB.js_example1.png?alt=media\&token=9dc67927-3d0e-4bba-9e21-36d0d3891cf3)

### Example 1 - Animation

This example can be animated based on the proposed [JSON schema](https://virtualfactory.gitbook.io/vlft/kb/instantiation/animations#schema) with the addition of [predefined sequences](https://virtualfactory.gitbook.io/vlft/kb/instantiation/animations#animation-sequence). File [`example_1_anim.json`](https://difactory.github.io/repository/scenes/ex/example_1_anim.json) defines the animation for one asset (`bottle.1`) using an animation sequence defined in [`bottle_fall.txt`](https://difactory.github.io/repository/animations/example_1/bottle_fall.txt).

If an animation file is not [paired with the scene JSON file](https://virtualfactory.gitbook.io/vlft/tools/vebjs/input-output) and then automatically loaded, the animation can be manually loaded by importing the JSON file `example_1_anim.json` (with command `Import Animation`) and the sequence `bottle_fall.txt` (with command `Import Anim Sequence`).

![](https://2247033703-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lh1dC9-F-cM6usakky7%2F-MY5gPcha43bruf_3ggD%2F-MY5poQ2PHofB4peQdBb%2FVEB.js_example1_anim2.gif?alt=media\&token=27ca69a8-7c6e-46c9-aa8a-97862b7810a8)

## Example 2

The second example is a 3D scene consisting of 3 workstations and 3 trolleys whose 3D representation file is available on a server.

### Example 2 - Assets in Spreadsheet

The scene and assets can be [instantiated as a spreadsheet](https://difactory.github.io/repository/spreadsheets/VF_assets_example2.xlsx) according to the [template](https://virtualfactory.gitbook.io/vlft/kb/instantiation/assets/spreadsheet).

### Example 2 - Assets in JSON

Similarly, the example can be instantiated in a JSON file [`example_2.json`](https://difactory.github.io/repository/scenes/ex/example_2.json)

### Example 2 - Visualization

The example can be visualized in [VEB.js](https://virtualfactory.gitbook.io/vlft/tools/vebjs) by importing the JSON file `example_2.json` (with command 'Import Scene') or loading [this page](https://difactory.github.io/DF/scenes/ex/ex2.html).

![](https://2247033703-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lh1dC9-F-cM6usakky7%2F-MXrVyzd_Y-LQ4z_jTDX%2F-MXrd0vyrNEc-vxxcEjC%2FVEB.js_example2.png?alt=media\&token=661f5537-2d01-4f5a-a843-30091b5d8318)

### Example 2 - Animation

If an animation file is not [paired with the scene JSON file](https://virtualfactory.gitbook.io/vlft/tools/vebjs/input-output) and then automatically loaded, the animation can be manually loaded by importing the JSON file [`example_2_anim.json`](https://difactory.github.io/repository/scenes/ex/example_2_anim.json) that defines the animation of three assets (`Trolley.1, Trolley.2, Trolley.3`) using an additive animation sequence defined in [`trolley_move.txt`](https://difactory.github.io/repository/animations/example_2/trolley_move.txt)&#x20;

![](https://2247033703-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lh1dC9-F-cM6usakky7%2F-MY5gPcha43bruf_3ggD%2F-MY5qJgqA3ZZUbneHVgE%2FVEB.js_example2_anim2.gif?alt=media\&token=e756cab6-7647-4e5b-b2bd-ebe05377a537)

## Example 3

The third example is based on Example 2 with the addition of an animation of the camera.&#x20;

This example can be visualized in [VEB.js](https://virtualfactory.gitbook.io/vlft/tools/vebjs) by loading [this page](https://difactory.github.io/DF/scenes/ex/ex3.html).
