Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
A jam submission

.obj File ViewerView project page

A small .obj file viewer made in 560 characters for TweetTweetJam5
Submitted by ValerADHD — 2 days, 11 hours before the deadline
Add to collection

Play tool

.obj File Viewer's itch.io page

How many characters of code did you use?
559

Include your code here, if you'd like to show it off!
cls()u=unpack
p={}e={}q=0w=0m=1s=split::x::
o=stat(4)print("paste in .obj file",28,61)
if(#o<1)goto x
for i in all(s(o,"\n"))do
d=s(i," ")
if(ord(i)==118)add(p,d)
if(ord(i)==108)add(e,d)end
camera(-64,-64)::_::
cls()s=sin(q)d=cos(q)f=sin(w)g=cos(w)for i in all(e)do
_,x,y,z=u(p[i[2]])_,a,b,c=u(p[i[3]])x,z=x*d+z*s,d*z-x*s
a,c=a*d+c*s,d*c-a*s
y,z=y*g-z*f,y*f+z*g
b,c=b*g-c*f,b*f+c*g
a*=m
b*=m
c*=m
x*=m
y*=m
z*=m
c-=4z-=4x=x/z*64y=y/z*64a=a/c*64b=b/c*64line(x,y,a,b)end
b=btn()q+=(b\2%2-b%2)/30w+=(b\8%2-b\4%2)/30
if(btn(4))m+=.01
if(btn(5))m-=.01
flip()goto _

Leave a comment

Log in with itch.io to leave a comment.

Comments

No one has posted a comment yet