anden3 icon

TypeScript

anden3 | PRO | 01/13/19 09:44:07 PM UTC | 0 ⭐ | 6220 👁️ | Never ⏰ | []
TypoScript |

2.12 KB

|

None

|

0 👍

/

0 👎

    initializeObjects(): void {
        this.objects.push(<Object3D>new Cone(
            gl, "textures/chessboard.png", 8, 2, 40,
            (matrix: glm.mat4) => {
                glm.mat4.translate(matrix, matrix, glm.vec3.fromValues(-35, 0, -35));
            }
        ));
 
        this.objects.push(<Object3D>new Cone(
            gl, "textures/chessboard.png", 8, 2, 40,
            (matrix: glm.mat4) => {
                glm.mat4.translate(matrix, matrix, glm.vec3.fromValues(-35, 0, 35));
            }
        ));
 
        this.objects.push(<Object3D>new Cone(
            gl, "textures/chessboard.png", 8, 2, 40,
            (matrix: glm.mat4) => {
                glm.mat4.translate(matrix, matrix, glm.vec3.fromValues(35, 0, -35));
            }
        ));
 
        this.objects.push(<Object3D>new Cone(
            gl, "textures/chessboard.png", 8, 2, 40,
            (matrix: glm.mat4) => {
                glm.mat4.translate(matrix, matrix, glm.vec3.fromValues(35, 0, 35));
            }
        ));
 
        this.objects.push(<Object3D>new Plane(
            gl, "textures/chessboard.png", 90, 90,
            (matrix: glm.mat4) => {
                glm.mat4.translate(matrix, matrix, glm.vec3.fromValues(0, -20, 0));
            }
        ));
 
        this.objects.push(<Object3D>new Torus(
            gl, "textures/chessboard.png", 10, 5,
            (matrix: glm.mat4) => {
                glm.mat4.translate(matrix, matrix, glm.vec3.fromValues(-10, -5, -10));
            }
        ));
 
        this.objects.push(<Object3D>new Crescent(
            gl, "textures/chessboard.png", 10, 15, 3, 2,
            (matrix: glm.mat4) => {
                glm.mat4.translate(matrix, matrix, glm.vec3.fromValues(10, -20, -10));
            }
        ));
 
        this.objects.push(<Object3D>new Sphere(
            gl, "textures/chessboard.png", 10,
            (matrix: glm.mat4) => {
                glm.mat4.translate(matrix, matrix, glm.vec3.fromValues(0, -10, 20));
            }
        ));
 
        this.lightSphere = new Sphere(
            gl, "textures/white.png", 1.5
        );
    }

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎