mirror of
https://github.com/MapMakersAndProgrammers/alternativa3d-archive.git
synced 2025-10-26 01:49:05 -07:00
36 lines
979 B
Plaintext
36 lines
979 B
Plaintext
package com.alternativagame.engine3d.material {
|
|
import com.alternativagame.type.RGB;
|
|
|
|
import flash.display.BitmapData;
|
|
|
|
public final class TextureMaterial extends FillMaterial {
|
|
|
|
// Текстура
|
|
public var texture:BitmapData = null;
|
|
|
|
// Сглаженность
|
|
public var smoothing:Boolean;
|
|
|
|
public function TextureMaterial(texture:BitmapData = null, smoothing:Boolean = true, color:RGB = null, twoSided:Boolean = false) {
|
|
super(color, twoSided);
|
|
this.texture = texture;
|
|
this.smoothing = smoothing;
|
|
}
|
|
|
|
// Клон
|
|
override public function clone():Material {
|
|
var res:TextureMaterial = new TextureMaterial();
|
|
cloneParams(res);
|
|
return res;
|
|
}
|
|
|
|
// Клонировать параметры
|
|
override protected function cloneParams(material:*):void {
|
|
var mat:TextureMaterial = TextureMaterial(material);
|
|
super.cloneParams(mat);
|
|
mat.texture = texture;
|
|
mat.smoothing = smoothing;
|
|
}
|
|
|
|
}
|
|
} |