Engine v1.34.0 has been released. Release notes:
To stay updated on engine development, hit Watch on the repo. Support us by hitting Star too!
Engine v1.34.0 has been released. Release notes:
To stay updated on engine development, hit Watch on the repo. Support us by hitting Star too!
I really love the new attribute type json
, but there seem to be a few problems connected to it. It’s hard for me to narrow down though, but the following problems occurred once I tried using it.
Sometimes when I change one the sub-attributes, or even just reorder them, parsing them seems to not always work in the editor, even though the script has no problem. It just can’t be displayed properly. I then had to reload the browser tab to show the change.
Also sometimes when I parse the script, the editor gives me a warning that it was unable to save and needs me to reload the editor. But when I do that the same warning appears again. This happens multiple times without me being able to do anything in the editor. I got it back to work randomly, by reverting the change in the script, or closing the tab and reopening it. Like I said, I can’t really narrow it down…
I don’t know if you can reproduce it with these attributes, but here is what I changed before the problems occured:
Before the rework:
ModalDialog.attributes.add('_appearAnimation', {
title: 'Appears',
type: 'number',
default: 0,
enum: [
{ 'from Top': 0 },
{ 'from Left': 1 },
{ 'from Bottom': 2 },
{ 'from Right': 3 },
{ 'Scaling In': 4 },
{ 'Fading In': 5 },
]
});
ModalDialog.attributes.add('_appearCurve', {
title: 'Curve',
type: 'string',
default: 'CubicOut',
enum: [
{ 'Linear': 'Linear' },
{ 'Cubic Out': 'CubicOut' },
{ 'Sine Out': 'SineOut' },
{ 'Exponential Out': 'ExponentialOut' },
{ 'Back Out': 'BackOut' },
{ 'Bounce Out': 'BounceOut' },
{ 'Elastic Out': 'ElasticOut' },
]
});
ModalDialog.attributes.add('_appearDelay', {
title: 'Delay',
placeholder: 'sec',
type: 'number',
default: 0,
min: 0
});
ModalDialog.attributes.add('_appearDuration', {
title: 'Duration',
type: 'number',
default: 1,
min: 0.1,
max: 2,
precision: 2
});
ModalDialog.attributes.add('_disappearAnimation', {
title: 'Disappears',
type: 'number',
default: 0,
enum: [
{ 'to Top': 0 },
{ 'to Left': 1 },
{ 'to Bottom': 2 },
{ 'to Right': 3 },
{ 'Scaling Out': 4 },
{ 'Fading Out': 5 },
]
});
ModalDialog.attributes.add('_disappearCurve', {
title: 'Curve',
type: 'string',
default: 'CubicIn',
enum: [
{ 'Linear': 'Linear' },
{ 'Cubic In': 'CubicIn' },
{ 'Sine In': 'SineIn' },
{ 'Exponential In': 'ExponentialIn' },
{ 'Back In': 'BackIn' },
{ 'Bounce In': 'BounceIn' },
{ 'Elastic In': 'ElasticIn' },
]
});
ModalDialog.attributes.add('_disappearDelay', {
title: 'Delay',
placeholder: 'sec',
type: 'number',
default: 0,
min: 0
});
ModalDialog.attributes.add('_disappearDuration', {
title: 'Duration',
type: 'number',
default: 1,
min: 0.1,
max: 2,
precision: 2
});
After the rework:
ModalDialog.attributes.add('_appear', {
title: 'Appear Animation',
type: 'json',
schema: [{
name: 'animationType',
title: 'Appears',
type: 'number',
default: 0,
enum: [
{ 'from the Top': 0 },
{ 'from the Left': 1 },
{ 'from the Bottom': 2 },
{ 'from the Right': 3 },
{ 'by Scaling In': 4 },
{ 'by Fading In': 5 },
],
}, {
name: 'curve',
title: 'Curve',
type: 'string',
default: 'CubicOut',
enum: [
{ 'Linear': 'Linear' },
{ 'Cubic Out': 'CubicOut' },
{ 'Sine Out': 'SineOut' },
{ 'Exponential Out': 'ExponentialOut' },
{ 'Back Out': 'BackOut' },
{ 'Bounce Out': 'BounceOut' },
{ 'Elastic Out': 'ElasticOut' },
],
}, {
name: 'duration',
title: 'Duration',
placeholder: 'sec',
type: 'number',
default: 0.5,
min: 0.1,
max: 2,
}, {
name: 'delay',
title: 'Delay',
placeholder: 'sec',
type: 'number',
default: 0,
min: 0,
}],
});
ModalDialog.attributes.add('_disappear', {
title: 'Disappear Animation',
type: 'json',
schema: [{
name: 'animationType',
title: 'Disappears',
type: 'number',
default: 0,
enum: [
{ 'to the Top': 0 },
{ 'to the Left': 1 },
{ 'to the Bottom': 2 },
{ 'to the Right': 3 },
{ 'by Scaling Out': 4 },
{ 'by Fading Out': 5 },
],
}, {
name: 'curve',
title: 'Curve',
type: 'string',
default: 'CubicIn',
enum: [
{ 'Linear': 'Linear' },
{ 'Cubic In': 'CubicIn' },
{ 'Sine In': 'SineIn' },
{ 'Exponential In': 'ExponentialIn' },
{ 'Back In': 'BackIn' },
{ 'Bounce In': 'BounceIn' },
{ 'Elastic In': 'ElasticIn' },
],
}, {
name: 'duration',
title: 'Duration',
placeholder: 'sec',
type: 'number',
default: 0.5,
min: 0.1,
max: 2,
}, {
name: 'delay',
title: 'Delay',
placeholder: 'sec',
type: 'number',
default: 0,
min: 0,
}],
});
SCHEMA!!