Skocz do zawartości

Animacja: Scorp Droid

Featured Replies

  • Odpowiedzi 8
  • Wyświetleń 1,5k
  • Created
  • Ostatniej odpowiedzi

Top Posters In This Topic

Napisano

Czy t jest algorytm renderujący we flashu, czy po prostu odpalenie renderków we flashu?? :>

Napisano

nieźle.. pokaż z fpsami i czasami ładowania :) :P Pokaż też na innych obiektach - boxy, kulki, itp :)

Napisano
  • Autor

A to by wymagalo stworzenie takich rzeczy :)

A potem umiejetne ich renderwoanie gdyz jest tam pewien mechanizm.

Coś tam pewnie jeszcze zrobie ale to malo czasu na takie zabawy.

Napisano

Bardzo fajne, aczkolwiek troche chaotyczne przez te mrugajace swiatła;]

Napisano

Nie czaje jaki algorytm ? to przecież animka tylko :P mogę wam to zrobić w 5 min ... ;) z maxa do flasha :P

 

algorytm to byś pisał 3 lata świetlne do takiej animacji ;)

 

this.createEmptyMovieClip("theScene", 1);
theScene._x = 150;
theScene._y = 150;
focalLength = 300;
make3DPoint = function (x, y, z)
{
   var point = new Object();
   point.x = x;
   point.y = y;
   point.z = z;
   return(point);
};
make2DPoint = function (x, y)
{
   var point = new Object();
   point.x = x;
   point.y = y;
   return(point);
};
Transform3DPointsTo2DPoints = function (points, axisRotations)
{
   var TransformedPointsArray = [];
   var sx = Math.sin(axisRotations.x);
   var cx = Math.cos(axisRotations.x);
   var sy = Math.sin(axisRotations.y);
   var cy = Math.cos(axisRotations.y);
   var sz = Math.sin(axisRotations.z);
   var cz = Math.cos(axisRotations.z);
   var x;
   var y;
   var z;
   var xy;
   var xz;
   var yx;
   var yz;
   var zx;
   var zy;
   var scaleRatio;
   var i = points.length;
   while (i--)
   {
       x = points[i].x;
       y = points[i].y;
       z = points[i].z;
       xy = cx * y - sx * z;
       xz = sx * y + cx * z;
       yz = cy * xz - sy * x;
       yx = sy * xz + cy * x;
       zx = cz * yx - sz * xy;
       zy = sz * yx + cz * xy;
       scaleRatio = focalLength / (focalLength + yz);
       x = zx * scaleRatio;
       y = zy * scaleRatio;
       TransformedPointsArray[i] = make2DPoint(x, y);
   } // end while
   return(TransformedPointsArray);
};
pointsArray = [make3DPoint(-50, -50, -50), make3DPoint(50, -50, -50), make3DPoint(50, -50, 50), make3DPoint(-50, -50, 50), make3DPoint(-50, 50, -50), make3DPoint(50, 50, -50), make3DPoint(50, 50, 50), make3DPoint(-50, 50, 50)];
cubeAxisRotations = make3DPoint(0, 0, 0);
rotateCube = function ()
{
   cubeAxisRotations.y = cubeAxisRotations.y - this._xmouse / 3000;
   cubeAxisRotations.x = cubeAxisRotations.x + this._ymouse / 3000;
   var screenPoints = Transform3DPointsTo2DPoints(pointsArray, cubeAxisRotations);
   this.clear();
   this.lineStyle(2, 000000, 100);
   this.moveTo(screenPoints[0].x, screenPoints[0].y);
   this.lineTo(screenPoints[1].x, screenPoints[1].y);
   this.lineTo(screenPoints[2].x, screenPoints[2].y);
   this.lineTo(screenPoints[3].x, screenPoints[3].y);
   this.lineTo(screenPoints[0].x, screenPoints[0].y);
   this.moveTo(screenPoints[4].x, screenPoints[4].y);
   this.lineTo(screenPoints[5].x, screenPoints[5].y);
   this.lineTo(screenPoints[6].x, screenPoints[6].y);
   this.lineTo(screenPoints[7].x, screenPoints[7].y);
   this.lineTo(screenPoints[4].x, screenPoints[4].y);
   this.moveTo(screenPoints[0].x, screenPoints[0].y);
   this.lineTo(screenPoints[4].x, screenPoints[4].y);
   this.moveTo(screenPoints[1].x, screenPoints[1].y);
   this.lineTo(screenPoints[5].x, screenPoints[5].y);
   this.moveTo(screenPoints[2].x, screenPoints[2].y);
   this.lineTo(screenPoints[6].x, screenPoints[6].y);
   this.moveTo(screenPoints[3].x, screenPoints[3].y);
   this.lineTo(screenPoints[7].x, screenPoints[7].y);
};
theScene.onEnterFrame = rotateCube;

 

To jest algorytm ;)

 

http://www.graphix-lab.pl/tutoriale/box.swf

Napisano
Nie czaje jaki algorytm ? to przecież animka tylko :P mogę wam to zrobić w 5 min ... ;) z maxa do flasha :P

 

algorytm to byś pisał 3 lata świetlne do takiej animacji ;)

 

True...

Ale ogólnie spoko, choć fajniejszy efekt dla mnie to ten realistyczny.

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Powiadomienie o plikach cookie

Wykorzystujemy cookies. Przeczytaj więcej Polityka prywatności Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.

Account

Navigation

Szukaj

Szukaj

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.