The strange interaction between Three.js and web workers

I've been experiencing some unusual behavior with web workers in a three.js application. Initially, everything looks fine when loading a new page.

However, after about 20 page reloads, and only when web workers are running, this strange phenomenon occurs:

Suddenly, my cube appears zoomed in the top right corner! It seems to happen after multiple reloads for some reason.

Oddly enough, if I resize my screen to be smaller, the cube snaps back to the center. I checked and found that the ratio of screen height/width is not consistent when this snapback happens.

Furthermore, continuous reloading leads to the cube eventually disappearing entirely, resulting in a blank screen. However, if I reload the page in a new window, everything goes back to normal.

Initially, I suspected the issue might be related to improper termination of web workers. I tried setting up a beforeunload event handler to terminate all workers, but it didn't solve the problem. So, I'm unsure of what exactly is causing this strange behavior. Can anyone help?

For reference, I'm using Chrome 24, and the issue doesn't seem to occur on Firefox 18.

Answer №1

I encountered this issue before as well - it appears to be a known bug in Chrome and Webkit. However, I've noticed that with the latest version of Chrome 25 beta, I haven't experienced it anymore.

Here are some helpful references:

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Locate the class and execute the function on the existing page

Stepping outside of my comfort zone here and I'm pretty sure what I've come up with so far is totally off. Ajax is new to me and Google isn't making things any clearer, so I was hoping someone more knowledgeable could assist! Basically, I w ...

No data found in req.query object in ExpressJS

When I use http.post to send data from Angular to NodeJS, the req.query always comes back empty for me. Here is my server.js setup: const express = require('express'); const cors = require('cors'); const bodyParser = require('body ...

Combining Two Models in Sails.js

I'm facing an issue with linking two models in sails. I have two models: 'Singer' and 'Country'. In the 'Singer' model, I have an attribute 'singer_country' which represents the id of the 'Country' mod ...

What are the most optimal configurations for tsconfig.json in conjunction with node.js modules?

Presently, I have 2 files located in "./src": index.ts and setConfig.ts. Both of these files import 'fs' and 'path' as follows: const fs = require('fs'); const path = require('path'); ...and this is causing TypeScr ...

Ways to verify the identity of a user using an external authentication service

One of my microservices deals with user login and registration. Upon making a request to localhost:8080 with the body { "username": "test", "password":"test"}, I receive an authentication token like this: { "tok ...

Creating a dynamic `v-model` for computed properties that is dependent on the route parameter

I am creating a versatile component that can update different vuex properties based on the route parameter passed. Below is a simplified version of the code: <template> <div> <input v-model="this[$route.params.name]"/> </div&g ...

Incorporating JQuery Plugins into Angular 4 Apps

I am currently attempting to incorporate various jquery plugins, such as Magnific-Popup, into my Angular 4 application but encountering difficulties. I successfully installed jQuery using npm install --save-dev @types/jquery in the terminal, yet implementi ...

Exploring JS files for bugs using VS Code

Just starting out with learning javascript. Currently trying to troubleshoot this basic code: console.log("Hello World!\n"); // there's a breakpoint here let million = 1_000_000; console.log(million); However, upon hitting the play b ...

Retrieve data from two separate files and store it as a two-dimensional array in JavaScript

Is there a way to read and convert two .txt files into a 2d array? I currently have a code snippet that looks like this : var fs = require('fs') file = './text1.txt' fs.readFile(file,'utf-8', (e,d) => { textByLine = d.s ...

JavaScript - Capture user input and store it in a cookie when the input field is changed

Any help with my issue would be greatly appreciated. I'm currently working on saving the value of a form input type="text" to a cookie when the input has changed. It seems like I'm close to getting it right, but unfortunately, it's not worki ...

The bootstrap card layout breaks with Google Maps in Chrome and is not functioning properly

I have encountered an issue with the bootstrap card layout and Google Maps integration. When I move the Google Map to a card in a right column, it does not display properly. However, placing it in the first column works perfectly fine. This problem seems t ...

Adjust the value based on selection

I aim to display another div when either the Full Time or Part Time option is selected. Additionally, I would like to calculate a different value for each option; if 'Part Time' is chosen, PrcA should change to PrcB. Here is the code snippet tha ...

Sending variables to other parts of the application within stateless functional components

My main component is Productos and I also have a child component called EditarProductos. My goal is to pass the producto.id value from Productos to EditarProductos. Here is my Productos component code: import {Button, TableHead, TableRow, TableCell, Tabl ...

extracting information from a database based on specific search criteria

"_id":{"$id":"61b5eb36029b48135465e766"}, "name":"push-ups","link":"https://google.com", "image":"https://google.com", "gender":["0","1" ...

The member 'email' is not found in the promise type 'KindeUser | null'

I'm currently developing a chat feature that includes PDF document integration, using '@kinde-oss/kinde-auth-nextjs/server' for authentication. When trying to retrieve the 'email' property from the user object obtained through &apo ...

Enhance your live table previews with the power of React JS

I'm trying to optimize the process of live updating a table in React. Currently, I am using setInterval which sends unnecessary requests to the server. Is there a more efficient way to achieve this without overwhelming the server with these unnecessar ...

Navigate to link based on selected option in Bootstrap select menu

How can I make a page redirection based on the selected option value from a bootstrap select? Here is the HTML code: <select class="selectpicker"> <option value="https://example.com/">Home</option> <option value="https://exam ...

What steps are involved in setting up a point distribution system in AngularJS?

My objective is to develop a point allocation system within AngularJS. I have successfully created a basic directive that introduces DOM elements, including a span displaying "0" points and buttons for incrementing and decrementing. The total number of poi ...

You do not have the authorization to access this content

I have been working on a Laravel web application to upload images into a data table and allow users to download the uploaded image on click. Initially, everything was working fine until I made changes in the code from return '{!! Html::link('ima ...

Attempting to access a variable without wrapping it in a setTimeout function will

I have a form without any input and my goal is to automatically set the "responsible clerk" field to the currently logged-in user when the component mounts. Here's what I have: <b-form-select v-model="form.responsible_clerk" :op ...