threex.dynamictexture | three.js helper to handle dynamically generated texture | Graphics library
kandi X-RAY | threex.dynamictexture Summary
kandi X-RAY | threex.dynamictexture Summary
threex.dynamictexture is a [threex game extension for three.js] It provides an easy way to handle dynamically generated texture. Inspiration came from the excelent [babylon.js] which got [BABYLON.DynamicTexture] It is mainly used to write text in texture. Say you got a character which says something, you may want to put that in a texture and display that above your character. threex.dynamictexture will make it easy for you.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of threex.dynamictexture
threex.dynamictexture Key Features
threex.dynamictexture Examples and Code Snippets
Community Discussions
Trending Discussions on threex.dynamictexture
QUESTION
I'm working on Threejs to animate a cube with different text on each cube faces. I used DynamicTexture to place text on cube faces, but it places same text on each side of cube. I don't know how to place different text on each side. Is there any way to do is and place text on runtime by user inputs? Thanks.
Main.js
...ANSWER
Answered 2019-Dec-17 at 15:10You can use THREE.MeshFaceMaterial(materials)
to accomplish this. All you need to do is pass an array containing the materials and specifying the map for each of the faces.
QUESTION
I am working on a POC in which I have to customize a watch in 3d model. I am using thee.js for doing webgl stuff. I was able to change strap color , dial color and load texture images on strap. But I am stuck when I try to add dynamic text on the the watch , I have to update text on watch's back dial as user types in Engrave Text text box . For this I tried https://github.com/jeromeetienne/threex.dynamictexture library , which works on a new geometry but I am not able to add it watch's existing model.
I have pushed all code in github : https://github.com/bhupendra1011/watch-3d-engrave , as I was not able to load external 3d models from my fiddle account {CORS issue}. Demo of the POC can be seen here : https://bhupendra1011.github.io/watch-3d-engrave/index.html
Below is the code to add text on watch dial; For loading text click on use textures textbox in index.html
...ANSWER
Answered 2018-Jun-04 at 09:36I was able to reproduce your problem in Blender and it comes from your model's UV map.
I downloaded your model, opened it in Three.js editor and converted it to .obj to open it in blender to reproduve your problem
As you can see on the image, applying a texture is just as messy. You need to rework the model's uvmap to achieve the desired effect like so (I used a random image from your folder)
And while you're at it, you might want to consider optimizing your model, which is pretty heavy and could be simplified for faster load without losing visual quality (but it's entirely up to you, I'm just suggesting).
Here's the current model Here's a quick possible replacement. Cylinder that's open on one end and beveled on the edge loop
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install threex.dynamictexture
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page