Skip to content

Commit 3e8ea96

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

File tree

1 file changed

+111
-0
lines changed

1 file changed

+111
-0
lines changed

extensions/community/OscilloWave.json

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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_",
42+
"events": [
43+
{
44+
"type": "BuiltinCommonInstructions::JsCode",
45+
"inlineCode": [
46+
"// Retrieve parameters\r",
47+
"const amplitude = eventsFunctionContext.getArgument(\"Amplitude\"); // Max height of movement\r",
48+
"const frequency = eventsFunctionContext.getArgument(\"Frequency\"); // Speed of the oscillation\r",
49+
"const speed = eventsFunctionContext.getArgument(\"Speed\"); // Overall movement speed\r",
50+
"\r",
51+
"// Get elapsed time\r",
52+
"const elapsedTime = runtimeScene.getTimeManager().getTimeFromStart() / 1000;\r",
53+
"\r",
54+
"// Get objects\r",
55+
"const objectsToAnimate = eventsFunctionContext.getObjects(\"Oscilate\");\r",
56+
"\r",
57+
"// Loop through each object and apply the effect\r",
58+
"for (let i = 0; i < objectsToAnimate.length; i++) {\r",
59+
" const object = objectsToAnimate[i];\r",
60+
"\r",
61+
" if (object) {\r",
62+
" const x = object.getX();\r",
63+
"\r",
64+
" // Store original Y position\r",
65+
" if (object.initialY === undefined) {\r",
66+
" object.initialY = object.getY();\r",
67+
" }\r",
68+
"\r",
69+
" // **Unique Floating Effect with Ease-In**\r",
70+
" const easedWave = Math.sin(frequency * x + elapsedTime * speed) * (1 - Math.cos(elapsedTime * 2)) / 2;\r",
71+
"\r",
72+
" const yOffset = amplitude * easedWave; // Apply easing to smooth out motion\r",
73+
"\r",
74+
" object.setY(object.initialY + yOffset);\r",
75+
" }\r",
76+
"}\r",
77+
""
78+
],
79+
"parameterObjects": "Oscilate",
80+
"useStrict": true,
81+
"eventsSheetExpanded": true
82+
}
83+
],
84+
"parameters": [
85+
{
86+
"description": "Object",
87+
"name": "Oscilate",
88+
"type": "objectList"
89+
},
90+
{
91+
"description": "Height of the wave",
92+
"name": "Amplitude",
93+
"type": "expression"
94+
},
95+
{
96+
"description": "Frequency of the wave",
97+
"name": "Frequency",
98+
"type": "expression"
99+
},
100+
{
101+
"description": "Speed of the wave movement",
102+
"name": "Speed",
103+
"type": "expression"
104+
}
105+
],
106+
"objectGroups": []
107+
}
108+
],
109+
"eventsBasedBehaviors": [],
110+
"eventsBasedObjects": []
111+
}

0 commit comments

Comments
 (0)