Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

356
Views
[Violación] Se agregó un detector de eventos no pasivo a un evento 'touchstart' que bloquea el desplazamiento

Acabo de empezar a trabajar con Three.js y cada vez que trato de usar el evento onchange, sigo recibiendo esta violación del detector de eventos no pasivo para mi evento onchange. por favor ayuda.

ERROR: [Violación] Se agregó un detector de eventos no pasivo a un evento 'touchstart' que bloquea el desplazamiento. Considere marcar el controlador de eventos como "pasivo" para que la página responda mejor. Consulte https://www.chromestatus.com/feature/5745543795965952

CÓDIGO :

 "use strict"; import * as THREE from "https://unpkg.com/three@0.141.0/build/three.module"; import * as dat from "https://cdn.skypack.dev/dat.gui"; // Adding the gui // const gui = new dat.GUI(); const world = { plane: { width: 10 } } gui.add(world.plane, 'width', 1, 20). onchange = function() { console.log(planeMesh.geometry); // planeMesh.geometry.dispose(); // planeMesh.geometry = new THREE.planeGeometry(world.plane.width, 10, 10, 10); } // Instantiating scene, camera & renderer // const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000); camera.position.z = 5; const renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth,window.innerHeight); document.body.appendChild(renderer.domElement); // Building the geometry & material // const planeGeometry = new THREE.PlaneGeometry(10, 10, 10, 10); const planeMaterial = new THREE.MeshPhongMaterial({ color: 0xff0000, side: THREE.DoubleSide, flatShading: THREE.FlatShading }); // Binding the geometry and material // const planeMesh = new THREE.Mesh(planeGeometry,planeMaterial); // Adding the planeMesh to the scene // scene.add( planeMesh ); const {array} = planeMesh.geometry.attributes.position; for(let i=0; i<array.length; i += 3){ const x = array[i]; const y = array[i+1]; const z = array[i+2]; array[i+2] = z + Math.random(); } // Adding light // const light = new THREE.DirectionalLight(0xffffff, 1); light.position.set(0,0,1); scene.add(light); // Animating & rendering the design // function animate() { requestAnimationFrame( animate ); renderer.render( scene, camera ); }; animate();

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!