forgedthoughts

Crates.ioforgedthoughts
lib.rsforgedthoughts
version0.1.5
sourcesrc
created_at2023-02-22 01:15:39.288847
updated_at2023-03-24 06:25:52.330817
descriptionA 3D modeling and rendering programming language utilizing SDFs.
homepage
repositoryhttps://github.com/markusmoenig/ForgedThoughts.git
max_upload_size
id791242
size121,196
Markus Moenig (markusmoenig)

documentation

README

For documentation and examples please visit the Website.

You can render a Forged Thoughts script in your application like this:

use forgedthoughts::prelude::*;

// Create FT
let ft = FT::new();

// Compile a script
let rc = ft.compile_code("let s = Sphere();".to_string(), "main.ft".to_string);

// Render it into a buffer
let mut buffer = ColorBuffer::new(ctx.settings.width as usize, ctx.settings.height as usize);

for i in 0..ctx.settings.renderer.iterations {
    ft.render(&mut ctx, &mut buffer);
}

// Convert the buffer to Vec<u8>
let out = buffer.to_u8_vec();
Commit count: 67

cargo fmt