question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EdgesGeometry: Add serialization/ deserialization

See original GitHub issue

All my scene objects is created with a wireframe. When I export objects from the scene it works ok with the code bellow:

var objList = $this.getSceneObjects()
for (var i in objList) {
  $this.savefile.scene.objects.push(objList[i].toJSON())
}

Then I put all objects together, store some more needed information and save in a whatever file. So my program will open this file, it’s not an importation at all, it’s an opening to keep editing objects… But when I try to do it, I get a lot of errors. That’s my opening code:

var fileJson = JSON.parse(fs.readFileSync(file))
var document = new App.Document(file)
        
// Load Scene saved objects
var loader = new THREE.ObjectLoader();
for (var obj in fileJson.scene.objects) {
  var item = fileJson.scene.objects[obj]
  document.getScene().add(loader.parse(item))
}

Note in the image attached that none of the objects could be rendered with that wireframe I said before… =/

Three.js version
  • Dev
  • r93
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
  • Chromium
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS

captura de tela de 2018-06-14 20-54-25

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
Mugen87commented, Jun 24, 2018

Thanks for testing!

1reaction
marcobraghimcommented, Jun 23, 2018

Yeah!! It works just fine for me. Thank you very much =D

#letItBePulledPlease

captura de tela de 2018-06-23 14-37-17 =D

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unsupported geometry - Questions - three.js forum
EdgesGeometry : Add serialization/ deserialization ... All my scene objects is created with a wireframe. When I export objects from the scene it ......
Read more >
Serializing and deserializing geometry in three.js using ...
So, I thought I will die, but then I accidentally found that function: .toNonIndexed() . const box = new BoxBufferGeometry(); const geomJSON ...
Read more >
Serialization — NVIDIA PhysX SDK 4.1 Documentation
The snippet shows how to create and populate collections, specify IDs to enable resolving dependencies, serialize collections, deserialize collections and add ...
Read more >
ArcGIS Pro 3.0 API Reference Guide
The relative position of the two inflexion points that will be inserted along the diagram edges to compute the curved edges geometry.
Read more >
https://raw.githubusercontent.com/mrdoob/three.js/...
setHSL(_hslA.h, _hslA.s, _hslA.l); return this; } add(color) { this.r += ... isPoints) { object.geometry = serialize(meta.geometries, this.geometry); const ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found