From 03072ef67af0623758a660e2cd3fb5e153133efa Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 24 May 2023 08:09:03 -0400 Subject: Update chickadee manual. --- manuals/chickadee/Models.html | 68 +++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'manuals/chickadee/Models.html') diff --git a/manuals/chickadee/Models.html b/manuals/chickadee/Models.html index 3a1a6d6..4d319a1 100644 --- a/manuals/chickadee/Models.html +++ b/manuals/chickadee/Models.html @@ -1,6 +1,6 @@ - - + --> + - + Models (The Chickadee Game Toolkit) - - - - - - - - - - - + + + + + + + + + + + - + @@ -84,7 +84,7 @@ ul.no-bullet {list-style: none}

Next: , Previous: , Up: Graphics   [Contents][Index]

-
+

5.3.8 Models

Disclaimer: Chickadee is alpha software, but 3D model support is @@ -98,20 +98,20 @@ formats.

Here’s some basic boilerplate to render a 3D model:

-
-
(use-modules (chickadee graphics light)
-             (chickadee graphics model)
-             (chickadee graphics skybox))
-
-(define model (load-gltf "Suzanne.gltf"))
-(define camera-position (vec3 0.0 0.0 3.0))
-(define world (make-identity-matrix4))
-(define view (look-at camera-position (vec3 0.0 0.0 0.0) (vec3 0.0 1.0 0.0)))
-(define projection (perspective-projection (/ pi 3.0) (/ 4.0 3.0) 0.1 5.0))
-
-(define (draw alpha)
-  (with-projection projection
-    (draw-model model world view camera-position
+
+
(use-modules (chickadee graphics light)
+             (chickadee graphics model)
+             (chickadee graphics skybox))
+
+(define model (load-gltf "Suzanne.gltf"))
+(define camera-position (vec3 0.0 0.0 3.0))
+(define world (make-identity-matrix4))
+(define view (look-at camera-position (vec3 0.0 0.0 0.0) (vec3 0.0 1.0 0.0)))
+(define projection (perspective-projection (/ pi 3.0) (/ 4.0 3.0) 0.1 5.0))
+
+(define (draw alpha)
+  (with-projection projection
+    (draw-model model world view camera-position
 
@@ -155,7 +155,7 @@ smooth metal? Materials control all of this and more.

There are two types of materials in Chickadee: Phong and PBR.

-
+

Next: , Previous: , Up: Graphics   [Contents][Index]

-- cgit v1.2.3