Форум Flasher.ru
Ближайшие курсы в Школе RealTime
Список интенсивных курсов: [см.]  
  
Специальные предложения: [см.]  
  
 
Блоги Правила Справка Пользователи Календарь Сообщения за день
 

Вернуться   Форум Flasher.ru > Flash > ActionScript 3.0

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему  
Старый 22.12.2011, 18:35
Alexmody вне форума Посмотреть профиль Отправить личное сообщение для Alexmody Найти все сообщения от Alexmody
  № 10  
Ответить с цитированием
Alexmody

Регистрация: Dec 2010
Сообщений: 177
Ответил разработчик Flint (Ричард), он пояснил:

The Velocity initializer uses a zone, which is passed to the constructor, to define the initial velocity of the particle. The zone defines a region in 2d or 3d space. For example a circle or a rectangle. When Flint sets the velocity of the particle it picks a random point within that space and uses the vector from the origin to that point as the velocity for the particle. So yes, Flint can and does do random velocities. The only way not to get a random velocity is to use a PointZone with the Velocity initializer.

A few of the examples use zones to set random velocities within controlled parameters, like sparkler, fire & smoke, and the most extreme example logo firework, which uses a picture to define the initial velocity and thus force the particles to create the logo image as they spread out.

В моем случае подошел сл. код:
Код AS3:
emitter.addInitializer( new Position( new LineZone( new Point( -150, -12 ), new Point( -150, 90 ) ) ) );
emitter.addInitializer (new Velocity (new LineZone (new Point (25, 0), new Point (50, 0))));
Т.е. тип зоны для velocity: LineZone, а ранее я использовал PointZone (выше Ричард написал, что это единственный тип зоны в котором нету рандома).


Последний раз редактировалось Alexmody; 22.12.2011 в 18:37.
Создать новую тему   Часовой пояс GMT +4, время: 12:10.
Быстрый переход
  « Предыдущая тема | Следующая тема »  

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


 


Часовой пояс GMT +4, время: 12:10.


Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.