D Paste by Anonymous
Description: None
Hide line numbers

Create new paste
Post a reply
View replies

Paste:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
        scene = new Node;
        scene.name = `scene root`;
        
        {    auto n = new Map(`maps\charon3dm13.bsp`, `toLight`, vec3(-20, -8, 32));
            n.name = `q3 map`;
            scene.attachChild(n);
        }
        with (scene.attachChild((new Model(`scenes\teapot.hme`, `showNormals`)).translate(vec3fi[1, 0, 0]))) {
            name = `teapot.normals`;
            updateDgs ~= delegate void(Node n, float seconds) {
                n.rotate(quat.yRot(30.f * seconds));
            };
        }
        with (scene.attachChild((new Model(`scenes\teapot.hme`, `metal`)).translate(vec3fi[1, 0, 0]).rotate(quat.yRot(120), scene.localCS))) {
            name = `teapot.metal`;
            updateDgs ~= delegate void(Node n, float seconds) {
                n.rotate(quat.yRot(30.f * seconds));
            };
        }
        with (scene.attachChild((new Model(`scenes\teapot.hme`, `phong`)).translate(vec3fi[1, 0, 0]).rotate(quat.yRot(240), scene.localCS))) {
            name = `teapot.phong`;
            updateDgs ~= delegate void(Node n, float seconds) {
                n.rotate(quat.yRot(30.f * seconds));
            };
        }
        with (scene.attachChild((new Model(`scenes\teapot2.hme`, `fresnel`)).translate(vec3fi[3, 0, 0]))) {
            name = `teapot.fresnel`;
            updateDgs ~= delegate void(Node n, float seconds) {
                n.rotate(quat.yRot(15.f * seconds), n.worldCS);
            };
        }

Replies:

    (some replies deleted)