@EugeneRedwing8 see my answer here:
or if you just want to convert one number:
const hexChars = "0123456789ABCDEF";
function toHex(int: number) {
return toHexByte(int >> 24) + toHexByte((int >> 16) & 0xffff) + toHexByte((int >> 8) & 0xffff) + toHexByte(int & 0xffff)
}
function toHexByte(byte: number) {
return hexChars.charAt(byte >> 4) + hexChars.charAt(byte & 0xf);
}
2 Likes
i used to to this:
projectedx=(x/z)+80
projectedy=(y/z)+60
80 and 60 is half of screen width and height.
1 Like
same! But with many polygons/points, it gets increadebly slow. That is mainly why when i found a fast raytracing algorithm, I switch to that.