Hey all,
I am interested in writing text to a vtkjs file. My proces of generating a vtkjs file is following;
- generate dataset folders using vtkJSONDataSetWriter
- Reference the folders in the index.json
- Zip everything and rename the extension to .vtkjs
The above process has been working fine. Now I want to add text to it. I see that I can add vtkVectorText as polydata and therefore I can write to a file. This is an example. sunpath.vtkjs (36.5 KB)
As you will see in the file. The text starts from the bottom left and that does not work in all cases. I see several examples where text can be added to a scene to be rendered in a window. Can I add text actor to the index.json I am using to create a vtkjs?
The following shows first object in the “Scene” in index.json. Can I add text as actors here?
"scene": [
{
"name": "Hourly_Analemmas",
"type": "httpDataSetReader",
"httpDataSetReader": {
"url": "Hourly_Analemmas"
},
"actor": {
"origin": [
0,
0,
0
],
"scale": [
1,
1,
1
],
"position": [
0,
0,
0
]
},
"actorRotation": [
0,
0,
0,
1
],
"mapper": {
"colorByArrayName": "",
"colorMode": 0,
"scalarMode": 4
},
"property": {
"representation": 2,
"edgeVisibility": 0,
"diffuseColor": [
0,
0,
0
],
"pointSize": 5,
"opacity": 1
},
"legends": []
},