glTF models are red in sceneform - gltf

So I have some gltf models I generated and have uploaded them to a url to load them at runtime within Sceneform. When I open the models on windows, it looks great, but when I try to place the objects within Sceneform the models become red. I am unsure why this is happening and would appreciate any pointers.
Object opened in 3D Viewer
Object when placed in Sceneform
The jellyfish gltf model example in case those got corrupted somehow: GLTF Model
.bin file is here, however I don't think looking at this will help much: GLTF .bin
Thanks!

I discovered the issue was due to a malformed glTF file. You can use Kronos' glTF online validator at this link.
https://github.khronos.org/glTF-Validator/
In case anyone is having the same issue, make sure the file is not malformed or try using a different file format like GLB.

Related

Parse WRL file to X3D

Well the problem I have is that I need to transform a WRL file to a X3D xml file, but for this I can't find API's that can get code from the file.
Well first I manually saw what tags were needed for the X3D file, and then I was trying with open source software to modify it by exporting it to that file, but in some cases it doesn't work and I would like to do it by code.
view3dscene https://castle-engine.io/view3dscene.php is a part of the Castle Game engine project. view3dscene by itself is a very capable viewer of both .wrl files -- also known as VRML encoding -- and X3D files. WRL files read by view3dscene can be saved as X3D

Mapbox GL JS : Live geoJSON overlay

I am working on a weather app in Mapbox and trying to get geoJSON files to update tornado warning polygons live on the map. (This would be done by a file called "warnings.geojson" in the same path as the html file and re-written frequently by a back end c++ app). Anyway, I found the following example on how to update live JSON files :
https://www.mapbox.com/mapbox-gl-js/example/live-geojson/
This works for what it is designed to do (and I understand what it is doing - it is what I am looking for), but I cannot seem to replace the code with my own. I would like to have it update the following test polygon file instead.
https://manidoo.000webhostapp.com/test.geoJSON
The above code is just a polygon of the Bermuda triangle. (Once I get this working, I can modify it on my own) I have tried so many variations of code that listing them here would just be a huge mess. Surely it should very simple and I am just missing it?
I believe what I should be changing is the map.addLayer() function, but I am not sure what to do. Any help would be so greatly appreciated.
The correct answer to my own question was testing the app in the wrong browser. Edge will not show geoJSON polygons that are on a local directory (atleast in this specific scenario). As MeltedPenguin pointed out - the JSON was valid. Once I uploaded my HTML and geoJSON to a server online with a http:// prefix, it worked great. Firefox showed the polygon even in offline mode.

iOS - Is there a way to generate a PDF file with layers?

Quick question, that I haven't found a solid answer yet.
Is it possible to generate a PDF in iOS that includes layers, which can then be removed/separated in Photoshop?
What I'm trying to achieve is take a picture with the camera of the phone, then place text over it, submit it as pdf to a customer and then have the customer read the text and remove it.
I can do everything except the layering of the pdf and I have found some hints that this isn't possible to do with the standard iOS library, but I wanted to know if anyone has come across this before.
Thank you.
The standard iOS API for creating PDF files cannot create layers (optional content) in a PDF page.
This library IFXPDFFactory seems to be able to generate PDF files with layers.
PoDoFo and libHaru can also be used to generate PDF files on iOS but I do not know if they support layers.

Exporting primefaces:Tree to pdf

I have a tree structure displayed on my webpage. The nodes are dynamically created from the data retrieved from the database. I want the entire tree(exlpoded view) to be exported to a pdf file. How can I achieve this using a java library? I am using JSF2.1 with primefaces 3.5. Any help would be appreciated.
I had similar problem and I found this "plug-in", check it out: https://github.com/rdicroce/jsfexporter

SVG files in Raphael, can they be used?

I have an SVG file that I would like to display via Raphael (each svg file is a node in a tree I'm trying to draw, the actual connections of the tree will be made by raphael). I tried something like:
var vector_image = paper.image("test.svg", 50,50,50,50);
but no dice, seems only "real" image files like png or jpeg are accepted? I find this very strange as Raphael itself uses Scalable Vector Graphics.
Is there anyway (short of parsing the SVG files into javascript snippets and pasting them into the html document) to display existing SVG files using Raphael (or any other vector based javascript graphical engine?)
If parsing it will have to be, is there any easy way to do this, short of just manually scraping the files? I'm running this code on a Ruby on Rails server, so I'd like to avoid solutions outside this framework, if possible (I've heard of one PHP solution through this site...I'd rather code by hand than add another language onto this project).
-Jenny
It's currently not possible to display existing SVG with Raphael, and there are apparently no plans for the implementation of SVG editing (see this forum post).
As for alternative JavaScript libraries, a newer alternative is Snap.svg, which can load external SVG files via its Snap.load() function.

Resources