blitPoly(id, x, y, z, texOverride)
	{
		// Grab point info.
		let poly = this.polydefs[id][0];
		let posX = x + this.pos.x;
		let posY = y + this.pos.y;
		let posZ = z + this.pos.z;

		let p1 = this.cloud.get(poly.p1).flatten(this.camera, posX, posY, posZ);
		let p2 = this.cloud.get(poly.p2).flatten(this.camera, posX, posY, posZ);
		let p3 = this.cloud.get(poly.p3).flatten(this.camera, posX, posY, posZ);
		let p4 = this.cloud.get(poly.p4).flatten(this.camera, posX, posY, posZ);
		
		// Grab or assign a texture.
		let texture = null;
		if(texOverride == undefined)
		{
			texture = this.polydefs[id][0].texture;
		} else {
			texture = texOverride;
		}
		
		// Textured render code.
		if(!this.mode.wireframe || this.mode.mixed)
		{
			this.camera.drawPoly([p1, p2, p3, p4], {"texture":texture, "flipped":poly.flipped}, this.mode);
		}
		
		// Wireframe render code.
		if(this.mode.wireframe || this.mode.mixed)
		{
			Line(p1.x, p1.y, p2.x, p2.y, CreateColor(255, 255, 255));
			Line(p2.x, p2.y, p3.x, p3.y, CreateColor(255, 255, 255));
			Line(p3.x, p3.y, p4.x, p4.y, CreateColor(255, 255, 255));
			Line(p4.x, p4.y, p1.x, p1.y, CreateColor(255, 255, 255));
		}
	}
// Additionally, you can override textures, useful for select rendering jobs.

Additionally, you can override textures, useful for select rendering jobs.
Additionally you can override textures useful for select rendering jobs .
blitPoly(id, x, y, z, texOverride)
	{
		let poly = this.polydefs[id][0];
		let posX = x + this.pos.x;
		let posY = y + this.pos.y;
		let posZ = z + this.pos.z;
		let p1 = this.cloud.get(poly.p1).flatten(this.camera, posX, posY, posZ);
		let p2 = this.cloud.get(poly.p2).flatten(this.camera, posX, posY, posZ);
		let p3 = this.cloud.get(poly.p3).flatten(this.camera, posX, posY, posZ);
		let p4 = this.cloud.get(poly.p4).flatten(this.camera, posX, posY, posZ);
		let texture = null;
		if(texOverride == undefined)
		{
			texture = this.polydefs[id][0].texture;
		} else {
			texture = texOverride;
		}
		if(!this.mode.wireframe || this.mode.mixed)
		{
			this.camera.drawPoly([p1, p2, p3, p4], {"texture":texture, "flipped":poly.flipped}, this.mode);
		}
		if(this.mode.wireframe || this.mode.mixed)
		{
			Line(p1.x, p1.y, p2.x, p2.y, CreateColor(255, 255, 255));
			Line(p2.x, p2.y, p3.x, p3.y, CreateColor(255, 255, 255));
			Line(p3.x, p3.y, p4.x, p4.y, CreateColor(255, 255, 255));
			Line(p4.x, p4.y, p1.x, p1.y, CreateColor(255, 255, 255));
		}
	}
blitPoly ( id , x , y , z , texOverride ) { let poly = this . polydefs [ id ] [ 0 ] ; let posX = x + this . pos . x ; let posY = y + this . pos . y ; let posZ = z + this . pos . z ; let p1 = this . cloud . get ( poly . p1 ) . flatten ( this . camera , posX , posY , posZ ) ; let p2 = this . cloud . get ( poly . p2 ) . flatten ( this . camera , posX , posY , posZ ) ; let p3 = this . cloud . get ( poly . p3 ) . flatten ( this . camera , posX , posY , posZ ) ; let p4 = this . cloud . get ( poly . p4 ) . flatten ( this . camera , posX , posY , posZ ) ; let texture = null ; if ( texOverride == undefined ) { texture = this . polydefs [ id ] [ 0 ] . texture ; } else { texture = texOverride ; } if ( ! this . mode . wireframe || this . mode . mixed ) { this . camera . drawPoly ( [ p1 , p2 , p3 , p4 ] , { "texture" : texture , "flipped" : poly . flipped } , this . mode ) ; } if ( this . mode . wireframe || this . mode . mixed ) { Line ( p1 . x , p1 . y , p2 . x , p2 . y , CreateColor ( 255 , 255 , 255 ) ) ; Line ( p2 . x , p2 . y , p3 . x , p3 . y , CreateColor ( 255 , 255 , 255 ) ) ; Line ( p3 . x , p3 . y , p4 . x , p4 . y , CreateColor ( 255 , 255 , 255 ) ) ; Line ( p4 . x , p4 . y , p1 . x , p1 . y , CreateColor ( 255 , 255 , 255 ) ) ; } }
Additionally, you can override textures, useful for select rendering jobs.
Additionally you can override textures useful for select rendering jobs .
// Grab point info.
 // Grab or assign a texture.
 // Textured render code.
 // Wireframe render code.
