This project gives an opportunity to render simple low resolution scenes in browser using SDF function
It uses a vectors_litemath library that provides vec2, vec3, vec4 classes to work with graphics
You can write your own scene using json file or code editor on web page
Current list of objects you can render:
sphere: {position: [x, y, z],color: [r, g, b],radius: number}box: {position: [x, y, z],color: [r, g, b],side: [x, y, z]}roundBox: {position: [x, y, z],color: [r, g, b],side: [x, y, z],radius: number}mengerSponge: {position: [x, y, z],color: [r, g, b],side: [x, y, z],scale: number}plane: {position: [x, y, z],color: [r, g, b],n: [x, y, z],h: number,isCelled: boolean}mandelbulb: {position: [x, y, z],color: [r, g, b],side: [x, y, z],power: number,scale: number}
Current list of operations:
union: {obj1: object_name,obj2: object_name}intersection: {obj1: object_name,obj2: object_name}difference: {obj1: object_name,obj2: object_name}smoothUnion: {obj1: object_name,obj2: object_name,smoothness: number}smoothIntersection: {obj1: object_name,obj2: object_name,smoothness: number}smoothSubtraction: {obj1: object_name,obj2: object_name,smoothness: number}
TODO:
- Make operations to work as a Tree
- Add more objects
- Make loading screen
- Add support of different resolutions
