Missed a few changed
parent
676673fc7e
commit
c86bedd912
|
@ -31,7 +31,11 @@ HELP: <indexed-seq>
|
||||||
|
|
||||||
HELP: string>numbers ( string -- number-seq )
|
HELP: string>numbers ( string -- number-seq )
|
||||||
{ $values { "string" string } { "number-seq" sequence } }
|
{ $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: 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." } ;
|
HELP: y-up { $class-description "Right-handed 3D coordinate system where Y is up." } ;
|
||||||
|
|
|
@ -59,6 +59,9 @@ M: indexed-seq new-resizable
|
||||||
: string>numbers ( string -- number-seq )
|
: string>numbers ( string -- number-seq )
|
||||||
" \t\n" split [ "" = ] trim [ string>number ] map ;
|
" \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 )
|
: x/ ( tag child-name -- child-tag )
|
||||||
[ tag-named ]
|
[ tag-named ]
|
||||||
[ rot dup [ drop missing-child ] unless 2nip ]
|
[ 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 )
|
: source>seq ( source-tag up-axis scale -- sequence )
|
||||||
rot
|
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
|
[ nip "technique_common" x/ "accessor" x/ "stride" x@ string>number ] 2bi
|
||||||
group
|
group
|
||||||
[ swap over length 2 > [ >y-up-axis! ] [ drop ] if ] with map ;
|
[ swap over length 2 > [ >y-up-axis! ] [ drop ] if ] with map ;
|
||||||
|
|
Loading…
Reference in New Issue