What objects are supported in threejs JSON format? - json

I'm trying to export a scene from some modeling software to three.js using the latest JSON format (4).
It's not clear what objects are supported in this format.
Are mesh files (.stl, .obj), AxisHelper, ArrowHelper and TextGeometry supported?
I can export mesh files using Geometry but I don't want to reinvent the wheel.
What objects are supported?

Looking into the code it looks like that supported "objects" in the JSON format are:
Geometry
Material
Skinning/Bones
Animation/Frames
Morphing
Lights
Cameras
So AxisHelper, ArrowHelper and TextGeometry is not.

Related

How import model from forge scene to map(Google, arcGis etc)?

I use forge API in my application. I added an arcGis map to display the model using the methods from the post https://forge.autodesk.com/blog/dump-geometries-2d-curve in GEOMETRY_LOADED_EVENT.
When I work with small models, the data is displayed on the ArcGis map well, but info about layers are lost.
When the models are large, I get a very large data object(100mb + ) and my program does not work. Is it possible to save the model in threejs-friendly formats or to get a more compact object with model and layers data? Or are there still ways to display the model on the map? I would be very grateful for the advice.
I tried methods from the post https://forge.autodesk.com/blog/dump-geometries-2d-curve in GEOMETRY_LOADED_EVENT.
Not sure if this fits your use case, but I've been working on a tool for converting Forge models into glTF format (which is pretty three.js-friendly I'd say): https://github.com/petrbroz/forge-extract.

How to generate Recordio from Java object

I am trying to serialize a list of java Objects (POJO) into RecordIO format. I have seen this BeanIO (http://beanio.org/) but it seems to be outdated. Is there any other Java library that could be used or a different way to do this ?
Once list of objects is serialized it will be used to train a model with SageMaker.
Solving my own problem. I decided to use Apache Avro instead of BeanIO. Spark allow to serialize using Avro (c.f. Spark-Avro). This seems to work however it did not fit my use case has I was trying to serialize an array of numbers.

Load BSON Model in Three.js?

Actually Three.js has JSONLoader to load JSON models.
Is it possible to convert JSON 3D model to BSON and load it using Three.js? Because I need to load huge JSON model.
I dont have a suggestion for BSON but you can take a look at the source in three.js\utils\converters\msgpack and http://threejs.org/examples/#webgl_loader_msgpack and you can read more about the format here: http://msgpack.org/

Is there a way to parse JSON data returned from a web service in actionscript without using as3corelib

I am working on a method that needs to parse the JSON response. I looked around and people use JSON.decode() in the as3corelib. But I was wondering if there was another way to do this without having to install any other libraries like this (as3corelib). Like a native json method that comes with the actionscript libraries.
Take a look at the top level JSON class, available since Flash Player 11, AIR 3.0.
The JSON class lets applications import and export data using JavaScript Object Notation (JSON) format.
Why do you have a problem with using an external library?
There is no such thing as an installation required, you just download it.

Can JSON Format support Scene graph?

I am attempting to write a STEP loader that converts STEP to the THREE JS JSON format.
However, I have not seen anything in the JSON format information about creating a scene graph - i.e. a hierarchical scene structure.
Is it possible to do so?
Thanks - Imtiaz
If you are writing a Loader, you don't need Three.js JSON format as an intermediate step. As the other loaders do, just create the THREE.Geometry, THREE.Mesh, THREE.Object3D etc objects directly as you go about parsing the STEP file. Object3D is the basic container which you can use to create hierarchies. In addition to being able to contain meshes, you can .add() any number of other Object3Ds into Object3D.
If you still want to have this JSON step, the three JSON model format itself does not have support for hierarchies. But there is also (rather new I believe) Three.js object JSON format, which can store hierarchies. See THREE.ObjectLoader , it is in src/loaders/ObjectLoader.js