How To Load Fabricjs As Texture For Obj Using Threejs
i'm trying to add svg to fabricjs as texture for my 3d model using threejs, currently my 3d model is using svg as texture, it is working fine except if i map fabricjs as texture th
Solution 1:
i found the solution. so the problem was i created a texture using fabricjs canvas as argument like this
var texture = new THREE.Texture(canvas);
that canvas
was fabricjs canvas, but THREE.Texture
only support image
https://threejs.org/docs/#api/en/textures/Texture
Texture( image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding )
So i cange the argument using canvas tag like this
var texture = newTHREE.Texture(document.getElementById("canvas"));
that way, canvas tag was map to the 3d model. sorry if i dont deliver the best explanation but hope it helps someone
Post a Comment for "How To Load Fabricjs As Texture For Obj Using Threejs"