setText with TextGeometry during runtime?
See original GitHub issueThanks for ThreeJS, great stuff, good to learn with the examples. One issue that I face currently is that I cannot change the text at runtime. My code:
var text3dparams = {
size: 0.3, // size of the text
height: 0.05, // thickness to extrude text
curveSegments: 2, // number of points on the curves
font: 'helvetiker', // font name
weight: 'normal', // font weight (normal, bold)
style: 'normal', // font style (normal, italics)
}
var material = new THREE.MeshBasicMaterial({color: 0xFF5555});
var text3d_volume = new THREE.TextGeometry( "V = 300 m³", text3dparams );
var text3dItemV = new THREE.Mesh(text3d_volume, material);
scene.add(text3dItemV);
I create a cube and label its edges (but labels are not updating the text values): http://www.echteinfach.tv/3d/quader/
Question is, how can the text be changed at runtime?
I hoped there is something like setText(“new text”); but there is not 😦
Unfortunately, the text example provided in the source is not using TextGeometry. Other examples I found just add the text but never change it at runtime.
PS: I see only one workaround to remove the 3d text and add it again on every update in render()?
Issue Analytics
- State:
- Created 10 years ago
- Comments:5
Top Results From Across the Web
TextGeometry performance in Three.js - Stack Overflow
Using a basic scene i'm having, it takes a lot of times to load each text. The code is here: function setText(text, textColor,...
Read more >✎ Create 3D text at runtime? - Questions - three.js forum
Is there a way to create 3D text at runtime? Without using the sIFR approach: https://threejs.org/docs/#api/geometries/TextGeometry helvetiker_regular.typeface.
Read more >How to access text element from a .dae file in SceneKit?
I want to load this .dae file and want to update text on that label at runtime so user name will come there....
Read more >Project with specific transformation | ArcGIS Runtime API for ...
See Spatial references in the ArcGIS Runtime SDK for . ... to label the output TextView beforeLabelTitle = new TextView(this) { Text =...
Read more >Changelog | TextMeshPro | 3.0.6 - Unity - Manual
EndSample() in the TMP_FontAsset.cs file. See forum post for details. Fixed SetText() with formatting issue where large numbers would show a ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Really would be helpful to have
textas a parameter to be set at runtime…For the docs: https://threejs.org/docs/#api/geometries/TextGeometry
is there plan about supporting this issue?