How do I add a texture to an object? #245
Answered
by
jbaicoianu
jbaicoianu
asked this question in
FAQs
-
How do I set a texture for an object? |
Beta Was this translation helpful? Give feedback.
Answered by
jbaicoianu
Apr 7, 2023
Replies: 1 comment
-
If you're using a custom imported 3d model, such as a glTF, glb, fbx, obj, or other such file, the best place to set your textures is in the 3d editing program that you used to create or modify the model. Janus also supports overriding materials in markup and at runtime, for primitives and for more complex models, using the <janus-viewer>
<assets>
<assetobject id="racecar" src="racecar.obj" />
<assetimage id="sponsors" src="sponsors.png" />
<assetimage id="tree" src="tree.png" />
</assets>
<room>
<object id="racecar" image_id="sponsors" />
<object id="cone" image_id="tree" />
</room>
<room>
</room>
</janus-viewer> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jbaicoianu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're using a custom imported 3d model, such as a glTF, glb, fbx, obj, or other such file, the best place to set your textures is in the 3d editing program that you used to create or modify the model.
Janus also supports overriding materials in markup and at runtime, for primitives and for more complex models, using the
image_id
attribute. For example: