1.1.2 Bitmap Explorer
In addition to setting metaverse-related attributes, Bitmap Explorer-related resource inscriptions also have custom application settings, which are located in the attribute block.
The Bitmap Explorer protocol is still evolving and undergoing updates. The following examples do not represent the final protocol.
Example:
We will assign specific attributes to the cute dog mentioned in the previous two chapters, making it compatible with Bitmap Explorer applications.
In theory, applications or games (appdata) should have default loading settings for generic resources, as the basic attributes are already sufficient for applications and games to reference. However, some attributes are not universal. If an application wants to support more related resources, it should align its default loading settings for more generalized handling. It should provide default values for some attributes so that when resources don't have these settings, they will be loaded in a default manner.
base
Attributes that exist in the attribute block are specific to Bitmap Explorer.
In Metaverse Resources Inscription, the attributes under the appdata section are customizable. We recommend not to conflict with HTML attribute names to avoid errors during web loading. For instance, here we use "bitmap-explorer" as the attribute block name for appdata.
The size of a plot in Bitmap Explorer is strictly defined, set as unit 1, which defaults to 10 meters. If your resource is set to 1m x 1m, then you must set the collision shaperange or graphic display size (size) to a reference size of 0.1. This setting is unrelated to the original image resource size; it can be understood as stretching your original resource image to fit within the 0.1x0.1 area. Therefore, getting the aspect ratio right is critical.
category
Yes
related usage status. Defaults to static in BitmapExplorer; can be static or owner.
static: fixed placement.
owner: personal asset that can be used or dynamically set.
type
Yes
the category to which the resource belongs. Defaults to item. There are different types like ground, item, pet, and avatar, each with its specific attributes.
construction
No
"It's a boolean variable, defaulting to false when not filled out. When set to true, this resource will be defined as an editable unit, much like every brick in building a house. You can edit them in the Bitmap Explorer, such as moving or flipping. This way, you can use this resource to construct your own metaverse space.
tag
No
The labels assigned to resources, a resource can contain multiple tags, which will be reflected in the resource index in the Bitmap Explorer.
useable
No
the number of times it can be reused. Can be set to -1, 0, or a positive integer.
shape
No
the collision shape. Options are rect, circle.
shaperange
No
collision range parameters x, y.
pivot
No
reference point for the image. Example: Let's say we have an image that is 50x50 pixels in size. If we set the pivot to [0.5, 0.5], it means the center of the image is placed at the center of the collision range determined by the first two parameters. When pivot is set to [0, 0], it places the pivot at the bottom-left corner of the entire collision range. When pivot is set to [1, 1], it places the pivot at the top-right corner of the entire collision range. You can set this value to be less than 0 or greater than 1. Doing so will offset the image's center outside the collision range, which may be useful in some special situations.
size
No
the display size of the image in the scene. The reference scale is based on a unit size of 1, which is the size of one block within the entire BitmapExplorer. If you set it to [0.1, 0.1], it means the image will be displayed within a 0.1x0.1 area. If you don't set this parameter, you may get a display result with incorrect sizing. Therefore, we strongly recommend setting this parameter and calculating the aspect ratio of the image to match its dimensions appropriately.
height
No
the height of the resource in Bitmap Explorer.
speed
No
default moving speed, generally for avatar type.
animation
animation contains configuration information for animations within BitmapExplorer. It is intended for matching animations within BitmapExplorer. When we receive relevant animation resource information from the metaverse, we need to match that animation with the corresponding one.
Sits in its attribute block, <animation ... />. Keys are as follows:
name
Yes
functional keyword, such as idle for idle animation.
srcname
Yes
animation name retrieved from metaverse.
perframespeed
No
time needed per frame in seconds.
loop
No
whether the animation loops, default is false.
Appendix
Optimizations are made for directional animations. If your resource has limited animations, like only an idle and a move-left, you can just map these, and other directions will auto-align. Make sure to match the directions correctly; otherwise, you will get a reversed display.
Animation Function Keywords Table:
idle
Idle animation, also the default.
move
Movement animation.
idle-down
Idle facing downwards, etc.
idle-up
Idle facing upwards, etc
idle-right
Idle facing right, etc.
idle-left
Idle facing left, etc.
move-down
Moving down, etc
move-up
Moving up, etc.
move-right
Moving right, etc
move-left
Moving left, etc.
Note: The custom animations like idle-down, idle-up are specific and should be considered when setting 2-way, 4-way, or 8-way directional animations.
Last updated