|
@@ -37,12 +37,12 @@ class FloatUniform extends WebGPUUniform {
|
|
this.boundary = 4;
|
|
this.boundary = 4;
|
|
this.itemSize = 1;
|
|
this.itemSize = 1;
|
|
|
|
|
|
- Object.defineProperty( this, 'isFloatUniform', { value: true } );
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+FloatUniform.prototype.isFloatUniform = true;
|
|
|
|
+
|
|
class Vector2Uniform extends WebGPUUniform {
|
|
class Vector2Uniform extends WebGPUUniform {
|
|
|
|
|
|
constructor( name, value = new Vector2() ) {
|
|
constructor( name, value = new Vector2() ) {
|
|
@@ -52,12 +52,12 @@ class Vector2Uniform extends WebGPUUniform {
|
|
this.boundary = 8;
|
|
this.boundary = 8;
|
|
this.itemSize = 2;
|
|
this.itemSize = 2;
|
|
|
|
|
|
- Object.defineProperty( this, 'isVector2Uniform', { value: true } );
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+Vector2Uniform.prototype.isVector2Uniform = true;
|
|
|
|
+
|
|
class Vector3Uniform extends WebGPUUniform {
|
|
class Vector3Uniform extends WebGPUUniform {
|
|
|
|
|
|
constructor( name, value = new Vector3() ) {
|
|
constructor( name, value = new Vector3() ) {
|
|
@@ -67,12 +67,12 @@ class Vector3Uniform extends WebGPUUniform {
|
|
this.boundary = 16;
|
|
this.boundary = 16;
|
|
this.itemSize = 3;
|
|
this.itemSize = 3;
|
|
|
|
|
|
- Object.defineProperty( this, 'isVector3Uniform', { value: true } );
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+Vector3Uniform.prototype.isVector3Uniform = true;
|
|
|
|
+
|
|
class Vector4Uniform extends WebGPUUniform {
|
|
class Vector4Uniform extends WebGPUUniform {
|
|
|
|
|
|
constructor( name, value = new Vector4() ) {
|
|
constructor( name, value = new Vector4() ) {
|
|
@@ -82,12 +82,12 @@ class Vector4Uniform extends WebGPUUniform {
|
|
this.boundary = 16;
|
|
this.boundary = 16;
|
|
this.itemSize = 4;
|
|
this.itemSize = 4;
|
|
|
|
|
|
- Object.defineProperty( this, 'isVector4Uniform', { value: true } );
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+Vector4Uniform.prototype.isVector4Uniform = true;
|
|
|
|
+
|
|
class ColorUniform extends WebGPUUniform {
|
|
class ColorUniform extends WebGPUUniform {
|
|
|
|
|
|
constructor( name, value = new Color() ) {
|
|
constructor( name, value = new Color() ) {
|
|
@@ -97,12 +97,12 @@ class ColorUniform extends WebGPUUniform {
|
|
this.boundary = 16;
|
|
this.boundary = 16;
|
|
this.itemSize = 3;
|
|
this.itemSize = 3;
|
|
|
|
|
|
- Object.defineProperty( this, 'isColorUniform', { value: true } );
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ColorUniform.prototype.isColorUniform = true;
|
|
|
|
+
|
|
class Matrix3Uniform extends WebGPUUniform {
|
|
class Matrix3Uniform extends WebGPUUniform {
|
|
|
|
|
|
constructor( name, value = new Matrix3() ) {
|
|
constructor( name, value = new Matrix3() ) {
|
|
@@ -112,12 +112,12 @@ class Matrix3Uniform extends WebGPUUniform {
|
|
this.boundary = 48;
|
|
this.boundary = 48;
|
|
this.itemSize = 12;
|
|
this.itemSize = 12;
|
|
|
|
|
|
- Object.defineProperty( this, 'isMatrix3Uniform', { value: true } );
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+Matrix3Uniform.prototype.isMatrix3Uniform = true;
|
|
|
|
+
|
|
class Matrix4Uniform extends WebGPUUniform {
|
|
class Matrix4Uniform extends WebGPUUniform {
|
|
|
|
|
|
constructor( name, value = new Matrix4() ) {
|
|
constructor( name, value = new Matrix4() ) {
|
|
@@ -127,10 +127,10 @@ class Matrix4Uniform extends WebGPUUniform {
|
|
this.boundary = 64;
|
|
this.boundary = 64;
|
|
this.itemSize = 16;
|
|
this.itemSize = 16;
|
|
|
|
|
|
- Object.defineProperty( this, 'isMatrix4Uniform', { value: true } );
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+Matrix4Uniform.prototype.isMatrix4Uniform = true;
|
|
|
|
+
|
|
export { FloatUniform, Vector2Uniform, Vector3Uniform, Vector4Uniform, ColorUniform, Matrix3Uniform, Matrix4Uniform };
|
|
export { FloatUniform, Vector2Uniform, Vector3Uniform, Vector4Uniform, ColorUniform, Matrix3Uniform, Matrix4Uniform };
|