Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * MyQuad
- * @param gl {WebGLRenderingContext}
- * @constructor
- */
- function MyQuad(scene) {
- CGFobject.call(this,scene);
- this.initBuffers();
- };
- MyQuad.prototype = Object.create(CGFobject.prototype);
- MyQuad.prototype.constructor=MyQuad;
- MyQuad.prototype.initBuffers = function () {
- this.vertices = [
- -0.5, -0.5, 0,
- 0.5, -0.5, 0,
- -0.5, 0.5 , 0,
- 0.5, 0.5 , 0
- ];
- this.indices =
- [
- 0, 1 , 2,
- 3, 2 , 1,
- ];
- this.primitiveType=this.scene.gl.TRIANGLES;
- this.initGLBuffers();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement