SVG as texture?
See original GitHub issueI red this question #814
And also I run onto this js library: http://code.google.com/p/canvg/ which can do SVG to canvas to data conversion.
This is my code:
var imageCanvas2 = document.createElement("canvas");
canvg(imageCanvas2, 'images/46.svg');
var imag = imageCanvas2.toDataURL('image/png'); // --> here is the converted image data
var cubeMaterial = [new THREE.MeshBasicMaterial({
map : THREE.ImageUtils.loadTexture(imag)
})];
This gives me error: “Cross-origin image load denied by Cross-Origin Resource Sharing policy.”
What are my options here?
Also I should mention that WebGL is not an option since I will be using this on mobile devices which don’t support WebGL.
Issue Analytics
- State:
- Created 12 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Is there a way to use .svg as texture in blender 2.9?
Is there any way to use SVG File as an Image Texture inside Blender? ... No, you have to render/convert the svg-vector-format into...
Read more >SVG Textures - VISIWIG
Generate scalable vector graphic spots, scratches, splatters, grunge, and grit with our SVG texture maker.
Read more >Blender Tutorial: SVG and Texture Project - YouTube
Learn how to complete the SVG and Texture project in Blender.
Read more >SVG Texture Support — Right-Click Select
Having support for SVG textures in the image texture node would allow for resolution-independent workflows. A practical example is product visualization. In ...
Read more >Is there a way to use .svg as texture in blender 2.8 - Reddit
I am trying to achieve comic style look with lot of handdrawn lines, used as texture map. ... You could import the svg...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

My god… I can’t believe how stupid. This works on iOS also.
I have an SVG image which is the same color as WebView’s background so that is why I didin’t saw it 😄 At least it works and someone can laugh now when reads this 😄