|
@@ -21,7 +21,8 @@ window.updateTexture = (yuv)=>
|
|
|
Y = undefined;
|
|
|
}
|
|
|
const yuv = new Uint8Array(window.generateRandomArray())
|
|
|
-
|
|
|
+const renderCount = 100;
|
|
|
+let sub = 0;
|
|
|
const logger = new Logger('XMaterial')
|
|
|
export default class XMaterialComponent {
|
|
|
constructor(e, t) {
|
|
@@ -222,8 +223,12 @@ export default class XMaterialComponent {
|
|
|
window.testPlane.material.backFaceCulling = false;//Allways show the front and the back of an element
|
|
|
|
|
|
// window.updateTexture( new Uint8Array(window.generateRandomArray()) );
|
|
|
- window._videoRawYTexture.update(stream)
|
|
|
- window._videoRawYTexture.updateSamplingMode(BABYLON.Texture.BILINEAR_SAMPLINGMODE)
|
|
|
+ ++sub
|
|
|
+ if(sub< renderCount)
|
|
|
+ {
|
|
|
+ window._videoRawYTexture.update(stream)
|
|
|
+ window._videoRawYTexture.updateSamplingMode(BABYLON.Texture.BILINEAR_SAMPLINGMODE)
|
|
|
+ }
|
|
|
|
|
|
// this.scene.meshes.forEach(mesh => {
|
|
|
// mesh.material != window.testPlane.material && (mesh.material = window.testPlane.material)
|