yomotsu / camera-controls

A camera control for three.js, similar to THREE.OrbitControls yet supports smooth transitions and more features.

Home Page:https://yomotsu.github.io/camera-controls/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not update in worker

RyugaRyuzaki opened this issue · comments

Describe the bug

I tried with worker, it did't update in worker

To Reproduce

		( function anim() {

			const delta = clock.getDelta();
			// const elapsed = clock.getElapsedTime();
			const updated = cameraControls.update( delta );

			// if ( elapsed > 30 ) return;

			requestAnimationFrame( anim );

			if ( updated ) {

				renderer.render( scene, camera );
				self.postMessage( 'rendered' );

			}

		} )();

Code

No response

Live example

No response

Expected behavior

Runs stably on worker

Screenshots or Video

No response

Device

Desktop

OS

No response

Browser

Chrome

How do I reproduce that?
Can you please elaborate on your problem, with a SIMPLIFIED demo using Codesandbox or so?

How do I reproduce that? Can you please elaborate on your problem, with a SIMPLIFIED demo using Codesandbox or so?

Hi, i ran in example here :https://github.com/yomotsu/camera-controls/blob/dev/examples/worker.html . It did't work

It works on my devices.
Can you please double check your setup?

It works on my devices. Can you please double check your setup?

Well, i cloned the repo and run, not any change. so i referenced this :https://github.com/pmndrs/react-three-offscreen/blob/main/src/render.ts and it works

Sorry but without being able to reproduce the problem in my environment, I can't investigate the cause...