|
@@ -34,6 +34,8 @@ class FloatUniform extends WebGPUUniform {
|
|
|
|
|
|
super( name, value );
|
|
|
|
|
|
+ this.isFloatUniform = true;
|
|
|
+
|
|
|
this.boundary = 4;
|
|
|
this.itemSize = 1;
|
|
|
|
|
@@ -41,14 +43,14 @@ class FloatUniform extends WebGPUUniform {
|
|
|
|
|
|
}
|
|
|
|
|
|
-FloatUniform.prototype.isFloatUniform = true;
|
|
|
-
|
|
|
class Vector2Uniform extends WebGPUUniform {
|
|
|
|
|
|
constructor( name, value = new Vector2() ) {
|
|
|
|
|
|
super( name, value );
|
|
|
|
|
|
+ this.isVector2Uniform = true;
|
|
|
+
|
|
|
this.boundary = 8;
|
|
|
this.itemSize = 2;
|
|
|
|
|
@@ -56,14 +58,14 @@ class Vector2Uniform extends WebGPUUniform {
|
|
|
|
|
|
}
|
|
|
|
|
|
-Vector2Uniform.prototype.isVector2Uniform = true;
|
|
|
-
|
|
|
class Vector3Uniform extends WebGPUUniform {
|
|
|
|
|
|
constructor( name, value = new Vector3() ) {
|
|
|
|
|
|
super( name, value );
|
|
|
|
|
|
+ this.isVector3Uniform = true;
|
|
|
+
|
|
|
this.boundary = 16;
|
|
|
this.itemSize = 3;
|
|
|
|
|
@@ -71,14 +73,14 @@ class Vector3Uniform extends WebGPUUniform {
|
|
|
|
|
|
}
|
|
|
|
|
|
-Vector3Uniform.prototype.isVector3Uniform = true;
|
|
|
-
|
|
|
class Vector4Uniform extends WebGPUUniform {
|
|
|
|
|
|
constructor( name, value = new Vector4() ) {
|
|
|
|
|
|
super( name, value );
|
|
|
|
|
|
+ this.isVector4Uniform = true;
|
|
|
+
|
|
|
this.boundary = 16;
|
|
|
this.itemSize = 4;
|
|
|
|
|
@@ -86,14 +88,14 @@ class Vector4Uniform extends WebGPUUniform {
|
|
|
|
|
|
}
|
|
|
|
|
|
-Vector4Uniform.prototype.isVector4Uniform = true;
|
|
|
-
|
|
|
class ColorUniform extends WebGPUUniform {
|
|
|
|
|
|
constructor( name, value = new Color() ) {
|
|
|
|
|
|
super( name, value );
|
|
|
|
|
|
+ this.isColorUniform = true;
|
|
|
+
|
|
|
this.boundary = 16;
|
|
|
this.itemSize = 3;
|
|
|
|
|
@@ -101,14 +103,14 @@ class ColorUniform extends WebGPUUniform {
|
|
|
|
|
|
}
|
|
|
|
|
|
-ColorUniform.prototype.isColorUniform = true;
|
|
|
-
|
|
|
class Matrix3Uniform extends WebGPUUniform {
|
|
|
|
|
|
constructor( name, value = new Matrix3() ) {
|
|
|
|
|
|
super( name, value );
|
|
|
|
|
|
+ this.isMatrix3Uniform = true;
|
|
|
+
|
|
|
this.boundary = 48;
|
|
|
this.itemSize = 12;
|
|
|
|
|
@@ -116,14 +118,14 @@ class Matrix3Uniform extends WebGPUUniform {
|
|
|
|
|
|
}
|
|
|
|
|
|
-Matrix3Uniform.prototype.isMatrix3Uniform = true;
|
|
|
-
|
|
|
class Matrix4Uniform extends WebGPUUniform {
|
|
|
|
|
|
constructor( name, value = new Matrix4() ) {
|
|
|
|
|
|
super( name, value );
|
|
|
|
|
|
+ this.isMatrix4Uniform = true;
|
|
|
+
|
|
|
this.boundary = 64;
|
|
|
this.itemSize = 16;
|
|
|
|
|
@@ -131,6 +133,4 @@ class Matrix4Uniform extends WebGPUUniform {
|
|
|
|
|
|
}
|
|
|
|
|
|
-Matrix4Uniform.prototype.isMatrix4Uniform = true;
|
|
|
-
|
|
|
export { FloatUniform, Vector2Uniform, Vector3Uniform, Vector4Uniform, ColorUniform, Matrix3Uniform, Matrix4Uniform };
|