when i add to scene textGeometry, and try save it, get this message:
string(226) “You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'stdClass”:4:{s:5:“x_min”;i:79;s:5:“x_max”;d:223.46875;s:2:“ha”;i:306;s:1:“o”;s:4’ at line 1"
if don’t add textGeometry everything work fine.
How to fix this?
hi, did you try mysql_escape_string ?
i fixed those problem just save it into file, but have another issue:
THREE.ObjectLoader: Unsupported geometry type “TextGeometry”
THREE.ObjectLoader: Undefined geometry C455146F-3545-4581-80F0-EF303E92423A
TextGeometry
is not supported by ObjectLoader
, see:
opened 06:02PM - 20 Oct 16 UTC
Enhancement
##### Description of the problem
I think that the ability to add and edit text … to a scene would be a great addition to the three.js editor, so I started an implementation based on this example: https://threejs.org/docs/scenes/geometry-browser.html#TextGeometry
Now I am trying to figure out what the best practice would be to save TextGeometry and its parameters to a JSON file and then load it later on with the ObjectLoader. If I understand the current code correctly, TextGeometry only generates a generic Geometry object, but does not store the actual text and parameters (font, size, curvesegments, ...). Does anyone have thoughts on extending the TextGeometry object so that it stores these parameters, can be serialized to a JSON object and then loaded and edited again later on? Maybe that would also require storing the JSON font file in the exported JSON object?
Any input is welcome, as I don't want to reinvent the wheel and hopefully contribute this feature to the editor later on.
##### Three.js version
- [x] r81
##### Browser
- [x] All of them
##### OS
- [x] All of them
Serializing/deserializing fonts is the problem in context of this geometry type.