encima / encima/jsc3d

viewer.getScene() seems to return false

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
HTML
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
I'm trying to load a simple non-textured .obj with
viewer.setParameter('SceneUrl',filename)

I can display it fine, but I cannot find a way to get attach a new texture to
this object.

I assumed I'd have to get the scene with

viewer.getScene()

and then iterate through the meshes from scene.getChildren() and add a texture
to each. But getScene() seems to return false even though the object has loaded
and is displaying properly.

Is there some trick that I am missing here? All the examples that use textures
seem to work off either an mtl file (which I can't use because I need to
control the textures in javascript) or without using .obj files.

Finally, does this support, or will it support in the future, transparency?
When I tried it it didn't seem to show any of the faces from behind the object,
so I'm assuming it doesn't do that yet.

```

Original issue reported on code.google.com by `jol...@mindat.org` on 14 Oct 2012 at 9:20

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the viewer.setParameter('SceneUrl', filename) and viewer.getScene() entry points, then trace how the loaded OBJ is exposed through scene.getChildren(). Compare that path with the texture examples and check the reported transparency behavior; done means establishing whether scene access, JavaScript-applied textures, and transparency are supported or need changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.