Away3D Forum http://away3d.com/forum/ Away3D Forum en Copyright 2019 2019-07-09T11:59:39+00:00 3d modeling company http://away3d.com/forum/viewthread/6043/ http://away3d.com/forum/viewthread/6043/#When:14:24:21Z <p>Hi, </p> <p>Looking for outsource 3D rendering company.<br /> Who do you use for outsourcing 3D rendering?<br /> Who do you recommend?</p> <p>Thanks everyone for your recommendation <img src="/images/smileys/wink.gif" width="19" height="19" alt="wink" style="border:0;" /></p> 2016-03-07T14:24:21+00:00 So you want to be an Animator? Here’s what to expect. http://away3d.com/forum/viewthread/6373/ http://away3d.com/forum/viewthread/6373/#When:14:57:57Z <p>I am only in High School and i have always been into animation. I take mostly advanced level art classes in school.</p> <p>I Want to become a 3D Animator but i dont know what i can come to expect in this career.</p> <p>I just need some advice on how to go about getting a job in 3D Animation<br /> References:<br /> <a href="https://www.awn.com/forum/thread/1005906">https://www.awn.com/forum/thread/1005906</a></p> 2019-04-25T14:57:57+00:00 How to output to render unicode 2d vector font ? (HAXE) http://away3d.com/forum/viewthread/6246/ http://away3d.com/forum/viewthread/6246/#When:21:29:05Z <p> How to output to render unicode 2d vector font ? (HAXE)</p> 2017-06-14T21:29:05+00:00 Virtual Joystick/Knob on Mobile Devices http://away3d.com/forum/viewthread/6008/ http://away3d.com/forum/viewthread/6008/#When:03:14:44Z <p>Hi,</p> <p>I was wondering if this has been requested or brought up yet before. I got to build a demo with Air Mobile, but I’m looking for some decent movement controls to complete it. The only available touch input I’m getting is the camera movement. </p> <p>Are there plans to add touch support, particularly virtual joystick or knob like this one?</p> <p><a href="http://johnstejskal.com/wp/virtual-joystick-for-mobile-games-using-as3/">http://johnstejskal.com/wp/virtual-joystick-for-mobile-games-using-as3/</a></p> <p>Can I use that to incorporate into my 3d scene? I can’t get that example to work in the first place and I’m using FlashDevelop.</p> <p>Sorry, I just got back to flash development again and this was a long time ago so I don’t know where to start again with AS and FLA.</p> <p>I would appreciate any help.</p> 2015-12-30T03:14:44+00:00 RaycastPicker:getSceneCollision doesn’t work http://away3d.com/forum/viewthread/3056/ http://away3d.com/forum/viewthread/3056/#When:13:21:39Z <p>Hellow! I try to find collision from my camera to scene with RaycastPicker:getSceneCollision, for example:</p><div class="codeblock"><code><span style="color: #000000"> <span style="color: #007700">var&nbsp;</span><span style="color: #0000BB">picker</span><span style="color: #007700">:</span><span style="color: #0000BB">RaycastPicker&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">RaycastPicker</span><span style="color: #007700">(</span><span style="color: #0000BB">false</span><span style="color: #007700">)&nbsp;</span><span style="color: #FF8000">//or&nbsp;true,&nbsp;insignificantly<br /></span><span style="color: #007700">var&nbsp;</span><span style="color: #0000BB">VO</span><span style="color: #007700">:</span><span style="color: #0000BB">PickingCollisionVO&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">picker</span><span style="color: #007700">.</span><span style="color: #0000BB">getSceneCollision</span><span style="color: #007700">(new&nbsp;</span><span style="color: #0000BB">Vector3D</span><span style="color: #007700">(</span><span style="color: #0000BB">_view</span><span style="color: #007700">.</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">x</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">_view</span><span style="color: #007700">.</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">y</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">_view</span><span style="color: #007700">.</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">z</span><span style="color: #007700">),&nbsp;new&nbsp;</span><span style="color: #0000BB">Vector3D</span><span style="color: #007700">(</span><span style="color: #0000BB">_view</span><span style="color: #007700">.</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">x</span><span style="color: #007700">,&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">_view</span><span style="color: #007700">.</span><span style="color: #0000BB">camera</span><span style="color: #007700">.</span><span style="color: #0000BB">z</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">_view</span><span style="color: #007700">.</span><span style="color: #0000BB">scene</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">trace</span><span style="color: #007700">(</span><span style="color: #0000BB">VO</span><span style="color: #007700">);&nbsp;</span> </span> </code></div> <p>_view is my View3D<br /> But getSceneCollision returns null at any values of parameters “position” and “direction”<br /> Please, help me to find my mistake.</p> 2012-08-16T13:21:39+00:00 MovieClip Material http://away3d.com/forum/viewthread/6016/ http://away3d.com/forum/viewthread/6016/#When:12:48:18Z <p>Hi, gyus. Here is a animated material for away 4. May be somebody would need it. Or maybe you can improve performance of code, let me know.</p> <div class="codeblock"><code><span style="color: #000000"> <span style="color: #0000BB">package&nbsp;core&nbsp;<br />{<br />&nbsp;import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">display</span><span style="color: #007700">.</span><span style="color: #0000BB">MovieClip</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;away3d</span><span style="color: #007700">.</span><span style="color: #0000BB">materials</span><span style="color: #007700">.</span><span style="color: #0000BB">TextureMaterial</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">display3D</span><span style="color: #007700">.</span><span style="color: #0000BB">textures</span><span style="color: #007700">.</span><span style="color: #0000BB">Texture</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">display</span><span style="color: #007700">.</span><span style="color: #0000BB">BitmapData</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;away3d</span><span style="color: #007700">.</span><span style="color: #0000BB">utils</span><span style="color: #007700">.</span><span style="color: #0000BB">Cast</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">events</span><span style="color: #007700">.</span><span style="color: #0000BB">Event</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">filters</span><span style="color: #007700">.</span><span style="color: #0000BB">BitmapFilter</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;away3d</span><span style="color: #007700">.</span><span style="color: #0000BB">textures</span><span style="color: #007700">.</span><span style="color: #0000BB">BitmapTexture</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">display</span><span style="color: #007700">.</span><span style="color: #0000BB">Bitmap</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;away3d</span><span style="color: #007700">.</span><span style="color: #0000BB">tools</span><span style="color: #007700">.</span><span style="color: #0000BB">utils</span><span style="color: #007700">.</span><span style="color: #0000BB">TextureUtils</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">geom</span><span style="color: #007700">.</span><span style="color: #0000BB">Matrix</span><span style="color: #007700">;<br />&nbsp;<br />&nbsp;public&nbsp;class&nbsp;</span><span style="color: #0000BB">AnimMaterial&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">TextureMaterial<br />&nbsp;{<br />&nbsp;&nbsp;</span><span style="color: #007700">private&nbsp;var&nbsp;</span><span style="color: #0000BB">isPlay</span><span style="color: #007700">:</span><span style="color: #0000BB">Boolean&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;public&nbsp;function&nbsp;</span><span style="color: #0000BB">AnimMaterial</span><span style="color: #007700">(</span><span style="color: #0000BB">animationArg</span><span style="color: #007700">:</span><span style="color: #0000BB">MovieClip</span><span style="color: #007700">)&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #0000BB">{&nbsp;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">var&nbsp;</span><span style="color: #0000BB">totFrames</span><span style="color: #007700">:</span><span style="color: #0000BB">int&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">animationArg</span><span style="color: #007700">.</span><span style="color: #0000BB">totalFrames</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">textures</span><span style="color: #007700">:</span><span style="color: #0000BB">Vector</span><span style="color: #007700">.&lt;</span><span style="color: #0000BB">BitmapTexture</span><span style="color: #007700">&gt;&nbsp;=&nbsp;new&nbsp;</span><span style="color: #0000BB">Vector</span><span style="color: #007700">.&lt;</span><span style="color: #0000BB">BitmapTexture</span><span style="color: #007700">&gt;();<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;for(var&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">:</span><span style="color: #0000BB">int&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">totFrames</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">{<br />&nbsp;&nbsp;&nbsp;&nbsp;alphaThreshold&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">.5</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">animationArg</span><span style="color: #007700">.</span><span style="color: #0000BB">gotoAndStop</span><span style="color: #007700">(</span><span style="color: #0000BB">i</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">textureData</span><span style="color: #007700">:</span><span style="color: #0000BB">BitmapData&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">BitmapData</span><span style="color: #007700">(</span><span style="color: #0000BB">256</span><span style="color: #007700">,</span><span style="color: #0000BB">256</span><span style="color: #007700">,</span><span style="color: #0000BB">true</span><span style="color: #007700">,</span><span style="color: #0000BB">.5</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">textureData&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Cast</span><span style="color: #007700">.</span><span style="color: #0000BB">bitmapData</span><span style="color: #007700">(</span><span style="color: #0000BB">animationArg</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">tempTex</span><span style="color: #007700">:</span><span style="color: #0000BB">BitmapTexture&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Cast</span><span style="color: #007700">.</span><span style="color: #0000BB">bitmapTexture</span><span style="color: #007700">(</span><span style="color: #0000BB">resizeBitmapData</span><span style="color: #007700">(</span><span style="color: #0000BB">textureData</span><span style="color: #007700">,</span><span style="color: #0000BB">512</span><span style="color: #007700">,</span><span style="color: #0000BB">512</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">textures</span><span style="color: #007700">.</span><span style="color: #0000BB">push</span><span style="color: #007700">(</span><span style="color: #0000BB">tempTex</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;animationArg</span><span style="color: #007700">.</span><span style="color: #0000BB">addEventListener</span><span style="color: #007700">(</span><span style="color: #0000BB">Event</span><span style="color: #007700">.</span><span style="color: #0000BB">ENTER_FRAME</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">updateMaterial</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">cnt</span><span style="color: #007700">:</span><span style="color: #0000BB">int&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;function&nbsp;</span><span style="color: #0000BB">updateMaterial</span><span style="color: #007700">(</span><span style="color: #0000BB">event</span><span style="color: #007700">:</span><span style="color: #0000BB">Event</span><span style="color: #007700">)&nbsp;:</span><span style="color: #0000BB">void<br />&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">cnt&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">textures</span><span style="color: #007700">.</span><span style="color: #0000BB">length&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">cnt</span><span style="color: #007700">++;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;</span><span style="color: #0000BB">cnt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">texture&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">textures[cnt]</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #007700">private&nbsp;function&nbsp;</span><span style="color: #0000BB">resizeBitmapData</span><span style="color: #007700">(</span><span style="color: #0000BB">bmData</span><span style="color: #007700">:</span><span style="color: #0000BB">BitmapData</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bmdWidth</span><span style="color: #007700">:</span><span style="color: #0000BB">Number</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bmdHeight</span><span style="color: #007700">:</span><span style="color: #0000BB">Number</span><span style="color: #007700">):</span><span style="color: #0000BB">BitmapData&nbsp;<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">var&nbsp;</span><span style="color: #0000BB">mat</span><span style="color: #007700">:</span><span style="color: #0000BB">Matrix&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Matrix</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">mat</span><span style="color: #007700">.</span><span style="color: #0000BB">scale</span><span style="color: #007700">(</span><span style="color: #0000BB">bmdHeight</span><span style="color: #007700">/</span><span style="color: #0000BB">bmData</span><span style="color: #007700">.</span><span style="color: #0000BB">width</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bmdHeight</span><span style="color: #007700">/</span><span style="color: #0000BB">bmData</span><span style="color: #007700">.</span><span style="color: #0000BB">height</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">bmd</span><span style="color: #007700">:</span><span style="color: #0000BB">BitmapData&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">BitmapData</span><span style="color: #007700">(</span><span style="color: #0000BB">bmdWidth</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bmdHeight</span><span style="color: #007700">,</span><span style="color: #0000BB">true</span><span style="color: #007700">,</span><span style="color: #0000BB">.5</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">bmd</span><span style="color: #007700">.</span><span style="color: #0000BB">draw</span><span style="color: #007700">(</span><span style="color: #0000BB">bmData</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">mat</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">bmd</span><span style="color: #007700">;<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">stop</span><span style="color: #007700">()&nbsp;:</span><span style="color: #0000BB">void<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;isPlay&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">play</span><span style="color: #007700">()&nbsp;:</span><span style="color: #0000BB">void<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;isPlay&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;}<br />&nbsp;<br />}&nbsp;</span> </span> </code></div> 2016-01-19T12:48:18+00:00 MovieClip Material http://away3d.com/forum/viewthread/6015/ http://away3d.com/forum/viewthread/6015/#When:12:48:00Z <p>Hi, gyus. Here is a animated material for away 4. May be somebody would need it. Or maybe you can improve performance of code, let me know.</p> <div class="codeblock"><code><span style="color: #000000"> <span style="color: #0000BB">package&nbsp;core&nbsp;<br />{<br />&nbsp;import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">display</span><span style="color: #007700">.</span><span style="color: #0000BB">MovieClip</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;away3d</span><span style="color: #007700">.</span><span style="color: #0000BB">materials</span><span style="color: #007700">.</span><span style="color: #0000BB">TextureMaterial</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">display3D</span><span style="color: #007700">.</span><span style="color: #0000BB">textures</span><span style="color: #007700">.</span><span style="color: #0000BB">Texture</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">display</span><span style="color: #007700">.</span><span style="color: #0000BB">BitmapData</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;away3d</span><span style="color: #007700">.</span><span style="color: #0000BB">utils</span><span style="color: #007700">.</span><span style="color: #0000BB">Cast</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">events</span><span style="color: #007700">.</span><span style="color: #0000BB">Event</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">filters</span><span style="color: #007700">.</span><span style="color: #0000BB">BitmapFilter</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;away3d</span><span style="color: #007700">.</span><span style="color: #0000BB">textures</span><span style="color: #007700">.</span><span style="color: #0000BB">BitmapTexture</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">display</span><span style="color: #007700">.</span><span style="color: #0000BB">Bitmap</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;away3d</span><span style="color: #007700">.</span><span style="color: #0000BB">tools</span><span style="color: #007700">.</span><span style="color: #0000BB">utils</span><span style="color: #007700">.</span><span style="color: #0000BB">TextureUtils</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">import&nbsp;flash</span><span style="color: #007700">.</span><span style="color: #0000BB">geom</span><span style="color: #007700">.</span><span style="color: #0000BB">Matrix</span><span style="color: #007700">;<br />&nbsp;<br />&nbsp;public&nbsp;class&nbsp;</span><span style="color: #0000BB">AnimMaterial&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">TextureMaterial<br />&nbsp;{<br />&nbsp;&nbsp;</span><span style="color: #007700">private&nbsp;var&nbsp;</span><span style="color: #0000BB">isPlay</span><span style="color: #007700">:</span><span style="color: #0000BB">Boolean&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;public&nbsp;function&nbsp;</span><span style="color: #0000BB">AnimMaterial</span><span style="color: #007700">(</span><span style="color: #0000BB">animationArg</span><span style="color: #007700">:</span><span style="color: #0000BB">MovieClip</span><span style="color: #007700">)&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #0000BB">{&nbsp;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">var&nbsp;</span><span style="color: #0000BB">totFrames</span><span style="color: #007700">:</span><span style="color: #0000BB">int&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">animationArg</span><span style="color: #007700">.</span><span style="color: #0000BB">totalFrames</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">textures</span><span style="color: #007700">:</span><span style="color: #0000BB">Vector</span><span style="color: #007700">.&lt;</span><span style="color: #0000BB">BitmapTexture</span><span style="color: #007700">&gt;&nbsp;=&nbsp;new&nbsp;</span><span style="color: #0000BB">Vector</span><span style="color: #007700">.&lt;</span><span style="color: #0000BB">BitmapTexture</span><span style="color: #007700">&gt;();<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;for(var&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">:</span><span style="color: #0000BB">int&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">totFrames</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">{<br />&nbsp;&nbsp;&nbsp;&nbsp;alphaThreshold&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">.5</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">animationArg</span><span style="color: #007700">.</span><span style="color: #0000BB">gotoAndStop</span><span style="color: #007700">(</span><span style="color: #0000BB">i</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">textureData</span><span style="color: #007700">:</span><span style="color: #0000BB">BitmapData&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">BitmapData</span><span style="color: #007700">(</span><span style="color: #0000BB">256</span><span style="color: #007700">,</span><span style="color: #0000BB">256</span><span style="color: #007700">,</span><span style="color: #0000BB">true</span><span style="color: #007700">,</span><span style="color: #0000BB">.5</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">textureData&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Cast</span><span style="color: #007700">.</span><span style="color: #0000BB">bitmapData</span><span style="color: #007700">(</span><span style="color: #0000BB">animationArg</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">tempTex</span><span style="color: #007700">:</span><span style="color: #0000BB">BitmapTexture&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Cast</span><span style="color: #007700">.</span><span style="color: #0000BB">bitmapTexture</span><span style="color: #007700">(</span><span style="color: #0000BB">resizeBitmapData</span><span style="color: #007700">(</span><span style="color: #0000BB">textureData</span><span style="color: #007700">,</span><span style="color: #0000BB">512</span><span style="color: #007700">,</span><span style="color: #0000BB">512</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">textures</span><span style="color: #007700">.</span><span style="color: #0000BB">push</span><span style="color: #007700">(</span><span style="color: #0000BB">tempTex</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;animationArg</span><span style="color: #007700">.</span><span style="color: #0000BB">addEventListener</span><span style="color: #007700">(</span><span style="color: #0000BB">Event</span><span style="color: #007700">.</span><span style="color: #0000BB">ENTER_FRAME</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">updateMaterial</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">cnt</span><span style="color: #007700">:</span><span style="color: #0000BB">int&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;function&nbsp;</span><span style="color: #0000BB">updateMaterial</span><span style="color: #007700">(</span><span style="color: #0000BB">event</span><span style="color: #007700">:</span><span style="color: #0000BB">Event</span><span style="color: #007700">)&nbsp;:</span><span style="color: #0000BB">void<br />&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">cnt&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">textures</span><span style="color: #007700">.</span><span style="color: #0000BB">length&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">cnt</span><span style="color: #007700">++;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;</span><span style="color: #0000BB">cnt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">texture&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">textures[cnt]</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #007700">private&nbsp;function&nbsp;</span><span style="color: #0000BB">resizeBitmapData</span><span style="color: #007700">(</span><span style="color: #0000BB">bmData</span><span style="color: #007700">:</span><span style="color: #0000BB">BitmapData</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bmdWidth</span><span style="color: #007700">:</span><span style="color: #0000BB">Number</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bmdHeight</span><span style="color: #007700">:</span><span style="color: #0000BB">Number</span><span style="color: #007700">):</span><span style="color: #0000BB">BitmapData&nbsp;<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">var&nbsp;</span><span style="color: #0000BB">mat</span><span style="color: #007700">:</span><span style="color: #0000BB">Matrix&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Matrix</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">mat</span><span style="color: #007700">.</span><span style="color: #0000BB">scale</span><span style="color: #007700">(</span><span style="color: #0000BB">bmdHeight</span><span style="color: #007700">/</span><span style="color: #0000BB">bmData</span><span style="color: #007700">.</span><span style="color: #0000BB">width</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bmdHeight</span><span style="color: #007700">/</span><span style="color: #0000BB">bmData</span><span style="color: #007700">.</span><span style="color: #0000BB">height</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">bmd</span><span style="color: #007700">:</span><span style="color: #0000BB">BitmapData&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">BitmapData</span><span style="color: #007700">(</span><span style="color: #0000BB">bmdWidth</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bmdHeight</span><span style="color: #007700">,</span><span style="color: #0000BB">true</span><span style="color: #007700">,</span><span style="color: #0000BB">.5</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">bmd</span><span style="color: #007700">.</span><span style="color: #0000BB">draw</span><span style="color: #007700">(</span><span style="color: #0000BB">bmData</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">mat</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">bmd</span><span style="color: #007700">;<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">stop</span><span style="color: #007700">()&nbsp;:</span><span style="color: #0000BB">void<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;isPlay&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">play</span><span style="color: #007700">()&nbsp;:</span><span style="color: #0000BB">void<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;isPlay&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br />&nbsp;&nbsp;</span><span style="color: #0000BB">}<br />&nbsp;}<br />&nbsp;<br />}&nbsp;</span> </span> </code></div> 2016-01-19T12:48:00+00:00 Anti-aliasing is really needed on mobile http://away3d.com/forum/viewthread/5197/ http://away3d.com/forum/viewthread/5197/#When:12:20:20Z <p>Anti-aliasing is really needed on mobile.However,the stage3D does not yet support anti-aliasing on even ipad4.May away3d4 supply a nice filter3D of FXAA please?</p> 2013-12-28T12:20:20+00:00 ZIP compression of non-binary 3d content files http://away3d.com/forum/viewthread/2038/ http://away3d.com/forum/viewthread/2038/#When:22:38:54Z <p>would it be difficult to implement this in Loader module? like - if I load ‘file_name.obj.zip’ loader would unzip file first and then pass it to correstponding parser. as3 compression libraries are available for long time now, ‘text’ format 3d files are perfect for compression and grow huge, without it.<br /> or maybe there allready is feature like this?<br /> ty!</p> 2012-03-08T22:38:54+00:00 Global illumination flare3d, unity but not Away3D? http://away3d.com/forum/viewthread/5949/ http://away3d.com/forum/viewthread/5949/#When:15:04:53Z <p>Hi,<br /> His there a global illumination or ambient occlusion fake coming for Away3d??<br /> I know in dynamic it’s hard,&nbsp; buy but just for a static rendering that will be interesting.</p> <p><a href="https://youtu.be/nhQc_w04-oM">https://youtu.be/nhQc_w04-oM</a></p> <p><a href="https://youtu.be/gYIUlzNurLs">https://youtu.be/gYIUlzNurLs</a></p> 2015-09-10T15:04:53+00:00