bs-community / skinview3d

Three.js powered Minecraft skin viewer.
https://skinview3d-demo.vercel.app
MIT License
550 stars 90 forks source link

"Sample Bias value is limited to the range" #139

Closed Kenhuey closed 1 year ago

Kenhuey commented 1 year ago

When I using SkinView3D in vue, three.js throws a warning, don't know how to fix it.

core code:

const playerSkinCanvas: Ref<HTMLCanvasElement | null> = ref(null);
const skinViewer: Ref<SkinViewer | null> = ref(null);

onMounted(() => {
    skinViewer.value = new SkinViewer({
        canvas: playerSkinCanvas.value as HTMLCanvasElement,
        width: playerSkinCanvas.value!.clientWidth,
        height: playerSkinCanvas.value!.clientHeight,
        skin: DefaultSteveImage,
        animation: new WalkingAnimation(),
        zoom: 1,
        enableControls: false
    });
    skinViewer.value.camera.position.setX(45);
    skinViewer.value.camera.position.setY(0);
    skinViewer.value.animation!.speed = anmieSpeed;
});

<canvas ref="playerSkinCanvas" class="skin-canvas" />

logs:

THREE.WebGLProgram: Program Info Log: C:\fakepath(53,12-96): warning X4713: Sample Bias value is limited to the range [-16.00, 15.99], using -16.000000 instead of -100.000000
C:\fakepath(53,12-96): warning X4713: Sample Bias value is limited to the range [-16.00, 15.99], using -16.000000 instead of -100.000000
C:\fakepath(53,12-96): warning X4713: Sample Bias value is limited to the range [-16.00, 15.99], using -16.000000 instead of -100.000000
C:\fakepath(53,12-96): warning X4713: Sample Bias value is limited to the range [-16.00, 15.99], using -16.000000 instead of -100.000000
C:\fakepath(53,12-96): warning X4713: Sample Bias value is limited to the range [-16.00, 15.99], using -16.000000 instead of -100.000000
C:\fakepath(53,12-96): warning X4713: Sample Bias value is limited to the range [-16.00, 15.99], using -16.000000 instead of -100.000000
C:\fakepath(53,12-96): warning X4713: Sample Bias value is limited to the range [-16.00, 15.99], using -16.000000 instead of -100.000000
[Violation] 'requestAnimationFrame' handler took 77ms

Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
Hacksore commented 1 year ago

@Kenhuey are you able to make a codesanbox/stackblitz to repro this issue?