Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The screen flickers severely when the resize event is triggered #511

Closed
5 tasks done
Steve245270533 opened this issue Jan 14, 2024 · 0 comments
Closed
5 tasks done

Comments

@Steve245270533
Copy link
Contributor

Describe the bug

When the resize event is triggered, the canvas is not re-rendered in time, causing the screen to flicker. This situation is also seen in the official example.

Screen flicker1

Screen flicker2

Reproduction

https://stackblitz.com/edit/stackblitz-starters-hhwpaq?file=src%2Fcomponents%2FTheExperience.vue

Steps to reproduce

This happens even when building the most basic scene:

<template>
	<TresCanvas ref="canvasRef" v-bind="gl">
		<TresAxesHelper />
	</TresCanvas>
</template>

<script setup lang="ts">
	import { BasicShadowMap, SRGBColorSpace, NoToneMapping } from 'three';

	const gl = {
		clearColor: '#82DBC5',
		shadows: true,
		alpha: false,
		shadowMapType: BasicShadowMap,
		outputColorSpace: SRGBColorSpace,
		toneMapping: NoToneMapping,
	};

</script>

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 2.49 GB / 15.90 GB
  Binaries:
    Node: 18.19.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.6.6 - ~\AppData\Roaming\npm\npm.CMD
    pnpm: 7.7.0 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (120.0.2210.133)
    Internet Explorer: 11.0.19041.3636
  npmPackages:
    @tresjs/core: ^3.6.0 => 3.6.0

Used Package Manager

pnpm

Code of Conduct

Steve245270533 added a commit to Steve245270533/tres that referenced this issue Jan 16, 2024
alvarosabu pushed a commit that referenced this issue Jan 16, 2024
…e is triggered (#512)

* fix(usetrescontextprovider): fixed rendering issues caused when resize is triggered (#511)

* fix(usetrescontextprovider): Solved Camel Naming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants