Skip to content

Commit

Permalink
Missed a few changed
Browse files Browse the repository at this point in the history
  • Loading branch information
erikcharlebois committed Feb 1, 2010
1 parent 90d6de9 commit 544acdb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion extra/game/models/collada/collada-docs.factor
Expand Up @@ -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." } ;
Expand Down
5 changes: 4 additions & 1 deletion extra/game/models/collada/collada.factor
Expand Up @@ -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 ]
Expand Down Expand Up @@ -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 ;
Expand Down

0 comments on commit 544acdb

Please sign in to comment.