[prev in list] [next in list] [prev in thread] [next in thread]
List: osflash-sandy
Subject: [Sandy] [sandy commit] r683 -
From: codesite-noreply () google ! com (codesite-noreply at google ! com)
Date: 2008-07-09 19:14:45
Message-ID: 0016e6464fbe22061004519c1fe5 () google ! com
[Download RAW message or body]
Author: baepstein at gmail.com
Date: Wed Jul 9 12:14:11 2008
New Revision: 683
Modified:
trunk/sandy/as3/trunk/src/sandy/primitive/Line3D.as
Log:
Allow an array of vertices to be passed to Line3D (instead of requiring
a series of comma-separated parameters)
Modified: trunk/sandy/as3/trunk/src/sandy/primitive/Line3D.as
==============================================================================
--- trunk/sandy/as3/trunk/src/sandy/primitive/Line3D.as (original)
+++ trunk/sandy/as3/trunk/src/sandy/primitive/Line3D.as Wed Jul 9
12:14:11 2008
@@ -50,9 +50,15 @@
public function Line3D ( p_sName:String=null, ...rest )
{
super ( p_sName );
- if( rest.length < 2 )
+ // "rest" can be a two-or-more-element array of vectors. Or the
first element can itself be an array
+ if (rest.length == 1 && rest[0] is Array) {
+ rest = rest[0];
+ }
+
+ if( rest.length < 2)
{
trace('Line3D::Too few arguments');
+ // Should throw an exception, frankly
}
else
{
@@ -100,4 +106,4 @@
return "sandy.primitive.Line3D";
}
}
-}
\ No newline at end of file
+}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic