Skip to content

Commit

Permalink
[Reviewed] [Flash and transition] Fix the opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
D8H committed Nov 18, 2024
1 parent 2082296 commit 25c3d98
Showing 1 changed file with 22 additions and 214 deletions.
236 changes: 22 additions & 214 deletions extensions/reviewed/FlashTransitionPainter.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLW1vdmllLWZpbHRlciIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCA0TDIwIDdIMTdMMTUgNEgxM0wxNSA3SDEyTDEwIDRIOEwxMCA3SDdMNSA0SDRDMi45IDQgMiA0LjkgMiA2TDIgMThDMiAxOS4xIDIuOSAyMCA0IDIwSDIwQzIxLjEgMjAgMjIgMTkuMSAyMiAxOFY0SDE4TTExLjI1IDE1LjI1TDEwIDE4TDguNzUgMTUuMjVMNiAxNEw4Ljc1IDEyLjc1TDEwIDEwTDExLjI1IDEyLjc1TDE0IDE0TDExLjI1IDE1LjI1TTE2Ljk0IDExLjk0TDE2IDE0TDE1LjA2IDExLjk0TDEzIDExTDE1LjA2IDEwLjA2TDE2IDhMMTYuOTQgMTAuMDZMMTkgMTFMMTYuOTQgMTEuOTRaIiAvPjwvc3ZnPg==",
"name": "FlashTransitionPainter",
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/movie-filter.svg",
"shortDescription": "Paint a color all over the screen for period of time with an effect (useful for simulate flash and transition effect).",
"version": "0.1.2",
"shortDescription": "Paint transition effects with a plain color.",
"version": "0.1.3",
"description": [
"* __Paint effect:__ Action to paint a color all over the screen for a period of time with specific effect.",
"effect type:",
" * __Flash:__ is a monochrome color appear with fade then disappear with fade out.",
" * __Vertical:__ is a monochrome color comes from right side then comes back.",
" * __Horizontal:__ is a monochrome color come from top side then comes back.",
" * __Circular:__ is a circle which increases from the center and narrows.",
"* __Paint effect ended:__ event when the paint effect ends."
"Paint transition effects",
"- Fade in, fade out",
"- Right to left",
"- Top to bottom",
"- Circular",
"",
"A blur effect can be added to the painter layer to smooth the effect."
],
"origin": {
"identifier": "FlashTransitionPainter",
Expand Down Expand Up @@ -387,78 +387,14 @@
"actions": [
{
"type": {
"value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyValue"
},
"parameters": [
"Object",
"Behavior",
"=",
"lerp(CameraBorderLeft(Object.Layer()), CameraBorderRight(Object.Layer()) + 10, Progress)"
]
},
{
"type": {
"value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyIndex"
"value": "PrimitiveDrawing::Rectangle"
},
"parameters": [
"Object",
"Behavior",
"=",
"0"
]
}
],
"events": [
{
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Smooth edges\n"
},
{
"type": "BuiltinCommonInstructions::Repeat",
"repeatExpression": "5",
"conditions": [],
"actions": [
{
"type": {
"value": "PrimitiveDrawing::FillOpacity"
},
"parameters": [
"Object",
"=",
"51 * Index"
]
},
{
"type": {
"value": "PrimitiveDrawing::Rectangle"
},
"parameters": [
"Object",
"CameraBorderLeft(Object.Layer())",
"CameraBorderTop(Object.Layer())",
"Value - 2 * Index",
"CameraBorderBottom(Object.Layer())"
]
},
{
"type": {
"value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyIndex"
},
"parameters": [
"Object",
"Behavior",
"+",
"1"
]
}
"CameraBorderLeft(Object.Layer())",
"CameraBorderTop(Object.Layer())",
"lerp(CameraBorderLeft(Object.Layer()), CameraBorderRight(Object.Layer()), Progress)",
"CameraBorderBottom(Object.Layer())"
]
}
]
Expand Down Expand Up @@ -505,78 +441,14 @@
"actions": [
{
"type": {
"value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyValue"
},
"parameters": [
"Object",
"Behavior",
"=",
"lerp(CameraBorderTop(Object.Layer()), CameraBorderBottom(Object.Layer()) + 10, Progress)"
]
},
{
"type": {
"value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyIndex"
"value": "PrimitiveDrawing::Rectangle"
},
"parameters": [
"Object",
"Behavior",
"=",
"0"
]
}
],
"events": [
{
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Smooth edges\n"
},
{
"type": "BuiltinCommonInstructions::Repeat",
"repeatExpression": "5",
"conditions": [],
"actions": [
{
"type": {
"value": "PrimitiveDrawing::FillOpacity"
},
"parameters": [
"Object",
"=",
"51 * Index"
]
},
{
"type": {
"value": "PrimitiveDrawing::Rectangle"
},
"parameters": [
"Object",
"CameraBorderLeft(Object.Layer())",
"CameraBorderTop(Object.Layer())",
"CameraBorderRight(Object.Layer())",
"Value - 2 * Index"
]
},
{
"type": {
"value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyIndex"
},
"parameters": [
"Object",
"Behavior",
"+",
"1"
]
}
"CameraBorderLeft(Object.Layer())",
"CameraBorderTop(Object.Layer())",
"CameraBorderRight(Object.Layer())",
"lerp(CameraBorderTop(Object.Layer()), CameraBorderBottom(Object.Layer()), Progress)"
]
}
]
Expand Down Expand Up @@ -623,78 +495,14 @@
"actions": [
{
"type": {
"value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyValue"
"value": "PrimitiveDrawing::Circle"
},
"parameters": [
"Object",
"Behavior",
"=",
"CameraCenterX(Object.Layer())",
"CameraCenterY(Object.Layer())",
"(DistanceBetweenPositions(0, 0, CameraWidth(Object.Layer()), CameraHeight(Object.Layer())) / 2 + 1) * Progress"
]
},
{
"type": {
"value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyIndex"
},
"parameters": [
"Object",
"Behavior",
"=",
"0"
]
}
],
"events": [
{
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "Smooth edges\n"
},
{
"type": "BuiltinCommonInstructions::Repeat",
"repeatExpression": "5",
"conditions": [],
"actions": [
{
"type": {
"value": "PrimitiveDrawing::FillOpacity"
},
"parameters": [
"Object",
"=",
"51 * Index"
]
},
{
"type": {
"value": "PrimitiveDrawing::Circle"
},
"parameters": [
"Object",
"CameraCenterX(Object.Layer())",
"CameraCenterY(Object.Layer())",
"Value - 0.2 * Index"
]
},
{
"type": {
"value": "FlashTransitionPainter::FlashTransitionPainter::SetPropertyIndex"
},
"parameters": [
"Object",
"Behavior",
"+",
"1"
]
}
]
}
]
}
Expand Down

0 comments on commit 25c3d98

Please sign in to comment.