Code edit (5 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
arregla el fallo que crea sistemas solares muy lejos de otro no permitiendo su acceso
User prompt
agrega hasta 200 nombres posibles
Code edit (2 edits merged)
Please save this source code
User prompt
hazlo en bucle
Code edit (2 edits merged)
Please save this source code
User prompt
agrega una pulsación de transparencia a line
Code edit (1 edits merged)
Please save this source code
User prompt
haz que line cambie su asset aleatoriamente
User prompt
no se cambia el color
User prompt
agrega distintos colores a line
User prompt
agrega ship a midgroundcontainer
===================================================================
--- original.js
+++ change.js
@@ -55,8 +55,40 @@
scaleX: Math.sqrt(Math.pow(systemA.x - systemB.x, 2) + Math.pow(systemA.y - systemB.y, 2)) / 100,
scaleY: 0.1,
rotation: Math.atan2(systemB.y - systemA.y, systemB.x - systemA.x)
}));
+ // Add a transparency pulse effect to the line
+ tween(line, {
+ alpha: 0.5
+ }, {
+ duration: 1000,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ tween(line, {
+ alpha: 1
+ }, {
+ duration: 1000,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ // Recursively call to continue the pulse effect
+ tween(line, {
+ alpha: 0.5
+ }, {
+ duration: 1000,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ tween(line, {
+ alpha: 1
+ }, {
+ duration: 1000,
+ easing: tween.easeInOut
+ });
+ }
+ });
+ }
+ });
+ }
+ });
// Store the connection to avoid duplicate lines
if (!systemA.connectedSystems) {
systemA.connectedSystems = [];
}
@@ -141,9 +173,9 @@
for (var i = 0; i < Math.floor(Math.random() * 30) + 45; i++) {
var x, y, validPosition;
do {
var angle = Math.random() * Math.PI * 2; // Random angle
- var radius = Math.random() * 2600 + 350; // Random radius between 300 and 1100
+ var radius = Math.random() * 2500 + 350; // Random radius between 300 and 1100
x = 1024 + Math.cos(angle) * radius; // Centered around 1024
y = 1366 + Math.sin(angle) * radius; // Centered around 1366
validPosition = true;
for (var j = 0; j < network.length; j++) {