]> gitweb.factorcode.org Git - factor.git/commitdiff
Missed a few changed
authorerikc <erikcharlebois@gmail.com>
Mon, 1 Feb 2010 00:56:58 +0000 (16:56 -0800)
committererikc <erikcharlebois@gmail.com>
Mon, 1 Feb 2010 00:56:58 +0000 (16:56 -0800)
extra/game/models/collada/collada-docs.factor
extra/game/models/collada/collada.factor

index d5f727e303abfb668829f5273b44c542ad0ed36a..32f2bcace1017e3f9631631d146eb39b00a119f9 100644 (file)
@@ -31,7 +31,11 @@ HELP: <indexed-seq>
 
 HELP: string>numbers ( string -- number-seq )
 { $values { "string" string } { "number-seq" sequence } }
-{ $description "Splits a string on whitespace and converts the elements to a number sequence" } ;
+{ $description "Splits a string on whitespace and converts the elements to a number sequence." } ;
+
+HELP: string>floats ( string -- float-seq )
+{ $values { "string" string } { "float-seq" sequence } }
+{ $description "Splits a string on whitespace and converts the elements to a float sequence." } ;
 
 HELP: x-up { $class-description "Right-handed 3D coordinate system where X is up." } ;
 HELP: y-up { $class-description "Right-handed 3D coordinate system where Y is up." } ;
index 6c5601ffd56975414143f3c86c5af5a3da639777..7f04aa992f171863415c3efbe05059223f0895d4 100644 (file)
@@ -59,6 +59,9 @@ M: indexed-seq new-resizable
 : string>numbers ( string -- number-seq )
     " \t\n" split [ "" = ] trim [ string>number ] map ;
 
+: string>floats ( string -- float-seq )
+    " \t\n" split [ "" = ] trim [ string>float ] map ;
+
 : x/ ( tag child-name -- child-tag )
     [ tag-named ]
     [ rot dup [ drop missing-child ] unless 2nip ]
@@ -107,7 +110,7 @@ M: z-up >y-up-axis!
 
 : source>seq ( source-tag up-axis scale -- sequence )
     rot
-    [ "float_array" x/ xt string>numbers [ * ] with map ]
+    [ "float_array" x/ xt string>floats [ * ] with map ]
     [ nip "technique_common" x/ "accessor" x/ "stride" x@ string>number ] 2bi
     group
     [ swap over length 2 > [ >y-up-axis! ] [ drop ] if ] with map ;