• Jobs
  • About Us
  • Jobs
    • Home
    • Jobs
    • Courses and challenges
  • Businesses
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

302
Views
Three.js: Modificador de curvas con múltiples geometrías

A partir de este ejemplo https://threejs.org/examples/?q=curve#webgl_modifier_curve_instanced , ¿cómo es posible que se muestre un texto diferente en las dos curvas? (Por ejemplo: "Hola tres.js!" en el superior y "¿Cómo estás?" en el otro).

¿Debo tener múltiples geometrías? Pero, ¿cómo puedo dárselos a InstancedFlow?

Esa es la parte donde creo la geometría y el flujo:

 const fontLoader = new THREE.FontLoader(); const font = fontLoader.load('fonts/Righteous-Regular.json', function(font){ const geometry = new THREE.TextGeometry('Hello', { font: font, size: 0.1, height: 0.05, curveSegments: 12 }); geometry.rotateX(Math.PI); geometry.rotateY(Math.PI); const material = new THREE.MeshStandardMaterial({ color: 0x99ffff //emissive... }); const numberOfIntances = 3; flow = new InstancedFlow(numberOfIntances, curves.length, geometry, material); curves.forEach(function({curve}, i){ flow.updateCurve(i, curve); scene.add(flow.object3D); }); for(let i=0; i<numberOfIntances; i++){ const curveIndex = i%curves.length; flow.setCurve(i, curveIndex); flow.moveIndividualAlongCurve(i, i*i/numberOfIntances); flow.object3D.setColorAt(i, new THREE.Color(0xffffff*Math.random())); } });

Muchas gracias de antemano.

over 3 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 Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Show me some job opportunities
There's an error!