Skip to content

Commit d90e75e

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

File tree

1 file changed

+109
-0
lines changed

1 file changed

+109
-0
lines changed

extensions/community/OscilloWave.json

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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 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+
],
28+
"authorIds": [
29+
"MVyDtd59ONXYYSVjuI3Z1AgWt8g1"
30+
],
31+
"dependencies": [],
32+
"globalVariables": [],
33+
"sceneVariables": [],
34+
"eventsFunctions": [
35+
{
36+
"description": "Apply a smooth wave motion to the selected object.",
37+
"fullName": "Apply a smooth wave motion to the object",
38+
"functionType": "Action",
39+
"group": "Oscilate",
40+
"name": "Function",
41+
"sentence": "Apply wave motion to _PARAM1_ continuously, with an amplitude of _PARAM2_, a frequency of _PARAM3_, and a speed of _PARAM4_ for the duration of _PARAM5_",
42+
"events": [
43+
{
44+
"type": "BuiltinCommonInstructions::JsCode",
45+
"inlineCode": [
46+
"// Retrieve parameters\r",
47+
"const amplitude = eventsFunctionContext.getArgument(\"Amplitude\");\r",
48+
"const frequency = eventsFunctionContext.getArgument(\"Frequency\");\r",
49+
"const speed = eventsFunctionContext.getArgument(\"Speed\");\r",
50+
"const elapsedTime = eventsFunctionContext.getArgument(\"Time\"); // Passed from the event\r",
51+
"\r",
52+
"// Get objects\r",
53+
"const objectsToAnimate = eventsFunctionContext.getObjects(\"Oscilate\"); // Double-check spelling!\r",
54+
"\r",
55+
"for (const object of objectsToAnimate) {\r",
56+
" if (object) {\r",
57+
" // Initialize original Y once\r",
58+
" if (typeof object.initialY === \"undefined\") {\r",
59+
" object.initialY = object.getY();\r",
60+
" }\r",
61+
"\r",
62+
" // Calculate wave with easing\r",
63+
" const x = object.getX();\r",
64+
" const easedWave = Math.sin(frequency * x + elapsedTime * speed) * (1 - Math.cos(elapsedTime * 2)) / 2;\r",
65+
" const yOffset = amplitude * easedWave;\r",
66+
"\r",
67+
" // Update Y position\r",
68+
" object.setY(object.initialY + yOffset);\r",
69+
" }\r",
70+
"}"
71+
],
72+
"parameterObjects": "Oscilate",
73+
"useStrict": true,
74+
"eventsSheetExpanded": true
75+
}
76+
],
77+
"parameters": [
78+
{
79+
"description": "Object",
80+
"name": "Oscilate",
81+
"type": "objectList"
82+
},
83+
{
84+
"description": "Height of the wave",
85+
"name": "Amplitude",
86+
"type": "expression"
87+
},
88+
{
89+
"description": "Frequency of the wave",
90+
"name": "Frequency",
91+
"type": "expression"
92+
},
93+
{
94+
"description": "Speed of the wave movement",
95+
"name": "Speed",
96+
"type": "expression"
97+
},
98+
{
99+
"description": "TimeFromStart()",
100+
"name": "Time",
101+
"type": "expression"
102+
}
103+
],
104+
"objectGroups": []
105+
}
106+
],
107+
"eventsBasedBehaviors": [],
108+
"eventsBasedObjects": []
109+
}

0 commit comments

Comments
 (0)