Common Project Properties
The following properties are present in the root of a project's JSON.
Default values may be different depending on if the project was initially created on an iPad, iPhone, or the web player.
Metadata
baseObjectScale
Type | number |
---|---|
Default Value | 1 |
Player Version | <1.5.16 |
Unused in modern player versions.
Scales character SVGs by a factor of its value. Does not scale shapes or text.
In any versioned webplayer <=1.?
[needs research], the value is replaced with 0.5
for normal-sized shapes
(ones that are accessible from the editor), and uses a value of 1
for other shapes.
"baseObjectScale": 1
edited_at
Type | string |
---|
Contains a timestamp with the last time the draft was edited.
For an online project's publish date, see published_at and correct_published_at.
"edited_at": "2024-09-09T15:22:57Z"
fontSize
Type | number |
---|---|
Default Value (iPad/Web Editor) | 80 |
Default Value (iPhone) | 72 |
Scales the text size.
If this value is too big, the text line height will exceed the maximum threshold the player can handle, cutting off the text in the middle.[needs elaboration]
"fontSize": 80
playerUpgrades
Type | object |
---|---|
Default Value | {} |
Contains a history of player version upgrades. Populates when the project's player is upgraded via the drafts menu.
In the Hopscotch app, you can upgrade older projects' players by tapping the ellipsis (...),
then selecting "Update to Latest Player".
This updates the project's playerVersion
property, and appends the old and new player versions to playerUpgrades
.
For example, this represents an upgrade from player version 2.0.0
to version 2.1.1
:
playerUpgrades: {
"2.0.0": "2.1.1"
}
playerVersion
Type | string |
---|
Contains the web player version. Uses semantic versioning.
"playerVersion": "2.1.1"
"playerVersion": "1.5.15"
requires_beta_editor
Type | boolean |
---|
Determines if the project is saved with the advanced editor. When set to true
,
projects require a Hopscotch subscription to edit.
requires_beta_editor: true
stageSize
Type | object |
---|---|
Default Value (Mobile) | screen resolution |
Default Value (Web Editor) | 1366x1024 |
Contains the dimensions of the project stage.
"stageSize": {
"width": 1366,
"height": 1024
}
version
Type | number |
---|
Represents the latest Hopscotch app version which a project was saved in.
Older versions of the Hopscotch app will not open projects with a later version
.
If version <=24
, the app will use the old player instead of the web player.
"version": 34
ID Arrays
Type | array |
---|
The following properties are arrays of objects, which are referenced project-wide using unique identifiers.
Each property is its own array, catalogued with its object type: