Skip to content

Commit 735c0c7

Browse files
committed
Automated Extension submission for issue #1520
1 parent 59dabfa commit 735c0c7

File tree

1 file changed

+142
-0
lines changed

1 file changed

+142
-0
lines changed

extensions/community/OscilloWave.json

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
{
2+
"author": "",
3+
"category": "User interface",
4+
"extensionNamespace": "",
5+
"fullName": "OscilloWave",
6+
"helpPath": "",
7+
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRpbGRlIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTIsMTVDMiwxNSAyLDkgOCw5QzEyLDkgMTIuNSwxMi41IDE1LjUsMTIuNUMxOS41LDEyLjUgMTkuNSw5IDE5LjUsOUgyMkMyMiw5IDIyLDE1IDE2LDE1QzEyLDE1IDEwLjUsMTEuNSA4LjUsMTEuNUM0LjUsMTEuNSA0LjUsMTUgNC41LDE1SDIiIC8+PC9zdmc+",
8+
"name": "OscilloWave",
9+
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/261f5ee19b69f65a27fcdb4b0d3ec64029f928fe8713db1bb180bb69d72fc4a7_tilde.svg",
10+
"shortDescription": "OscilloWave is a simple extension that adds smooth, sinusoidal wave motion or shock to any object, perfect for creating dynamic UI elements and eye-catching animations. Ideal for making title images float and move seamlessly in menu screens.",
11+
"version": "1.0.0",
12+
"description": [
13+
"**OscilloWave** is a user-friendly extension that enhances your user interface by smoothly oscillating selected objects in a wave motion, similar to a sine function. This effect is perfect for animating game titles, giving them a dynamic \"floating\" effect as they move up and down ideal for creating a more engaging menu screen. However, it can also be applied to any other scene elements to create visually appealing, rhythmic motion throughout your game.",
14+
""
15+
],
16+
"tags": [
17+
"animation",
18+
"wave",
19+
"UI",
20+
"motion",
21+
"interactive",
22+
"banner",
23+
"text",
24+
"background",
25+
"effects",
26+
"smooth",
27+
"shock"
28+
],
29+
"authorIds": [
30+
"MVyDtd59ONXYYSVjuI3Z1AgWt8g1"
31+
],
32+
"dependencies": [],
33+
"globalVariables": [],
34+
"sceneVariables": [],
35+
"eventsFunctions": [
36+
{
37+
"description": "Apply a smooth wave motion to the selected object.",
38+
"fullName": "Apply a smooth wave motion to the object",
39+
"functionType": "Action",
40+
"group": "Oscilate",
41+
"name": "Function",
42+
"sentence": "Apply wave motion to _PARAM1_ continuously, with an amplitude of _PARAM2_, a frequency of _PARAM3_, and a speed of _PARAM4_,the motion lasts for _PARAM5_, with a phase offset of _PARAM6_, movement applied on _PARAM7_ axis , and a modulation strenght of _PARAM8_",
43+
"events": [
44+
{
45+
"type": "BuiltinCommonInstructions::JsCode",
46+
"inlineCode": [
47+
"// Retrieve parameters\r",
48+
"const amplitude = eventsFunctionContext.getArgument(\"Amplitude\");\r",
49+
"const frequency = eventsFunctionContext.getArgument(\"Frequency\");\r",
50+
"const speed = eventsFunctionContext.getArgument(\"Speed\");\r",
51+
"const elapsedTime = eventsFunctionContext.getArgument(\"Time\"); // Passed from the event\r",
52+
"const phaseOffset = eventsFunctionContext.getArgument(\"PhaseOffset\");\r",
53+
"const axis = eventsFunctionContext.getArgument(\"Axis\"); // \"X\", \"Y\", or \"Both\"\r",
54+
"const modulationStrength = eventsFunctionContext.getArgument(\"ModulationStrength\"); // Controls easing strength\r",
55+
"\r",
56+
"// Get objects\r",
57+
"const objectsToAnimate = eventsFunctionContext.getObjects(\"Oscilate\");\r",
58+
"\r",
59+
"for (let index = 0; index < objectsToAnimate.length; index++) {\r",
60+
" const object = objectsToAnimate[index];\r",
61+
"\r",
62+
" if (object) {\r",
63+
" // Initialize original positions once\r",
64+
" if (typeof object.initialY === \"undefined\") {\r",
65+
" object.initialY = object.getY();\r",
66+
" }\r",
67+
" if (typeof object.initialX === \"undefined\") {\r",
68+
" object.initialX = object.getX();\r",
69+
" }\r",
70+
"\r",
71+
" // Calculate unique phase offset per object\r",
72+
" const x = object.getX();\r",
73+
" const objectPhase = phaseOffset * index; // Each object has a unique shift\r",
74+
" const easedWave = Math.sin(frequency * x + elapsedTime * speed + objectPhase) \r",
75+
" * (1 - Math.cos(elapsedTime * 2 * modulationStrength)) / 2;\r",
76+
" const offset = amplitude * easedWave;\r",
77+
"\r",
78+
" // Apply movement based on selected axis\r",
79+
" if (axis === \"Y\" || axis === \"Both\") {\r",
80+
" object.setY(object.initialY + offset);\r",
81+
" }\r",
82+
" if (axis === \"X\" || axis === \"Both\") {\r",
83+
" object.setX(object.initialX + offset);\r",
84+
" }\r",
85+
" }\r",
86+
"}\r",
87+
""
88+
],
89+
"parameterObjects": "Oscilate",
90+
"useStrict": true,
91+
"eventsSheetExpanded": true
92+
}
93+
],
94+
"parameters": [
95+
{
96+
"description": "Object",
97+
"name": "Oscilate",
98+
"type": "objectList"
99+
},
100+
{
101+
"description": "Height of the wave",
102+
"name": "Amplitude",
103+
"type": "expression"
104+
},
105+
{
106+
"description": "Frequency of the wave",
107+
"name": "Frequency",
108+
"type": "expression"
109+
},
110+
{
111+
"description": "Speed of the wave movement",
112+
"name": "Speed",
113+
"type": "expression"
114+
},
115+
{
116+
"description": "TimeFromStart()",
117+
"name": "Time",
118+
"type": "expression"
119+
},
120+
{
121+
"description": "How much each wave is offset",
122+
"name": "PhaseOffset",
123+
"type": "expression"
124+
},
125+
{
126+
"description": "Choose \"X\", \"Y\", or \"Both\"",
127+
"name": "Axis",
128+
"supplementaryInformation": "[\"Y\",\"X\",\"Both\"]",
129+
"type": "stringWithSelector"
130+
},
131+
{
132+
"description": "Controls how strong the easing effect is",
133+
"name": "ModulationStrength",
134+
"type": "expression"
135+
}
136+
],
137+
"objectGroups": []
138+
}
139+
],
140+
"eventsBasedBehaviors": [],
141+
"eventsBasedObjects": []
142+
}

0 commit comments

Comments
 (0)