forge
forge copied to clipboard
[Bug]: Static resource files are lost after packing
Pre-flight checklist
- [X] I have read the contribution documentation for this project.
- [X] I agree to follow the code of conduct that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
7.3.0
Electron version
29.0.1
Operating system
window 10
Last known working Electron Forge version
No response
Expected behavior
Static resources should be packaged correctly and not lost
Actual behavior
If you use electron-forge to package electron, you will lose .obj static files in the packaged file.
Steps to reproduce
I added threejs to electron and then I used electron-forge to package electron. However, .obj files will be lost in the packaged files
var mtlLoader = new THREE.MTLLoader()
var objLoader = new THREE.OBJLoader()
mtlLoader.setPath('static/Map/obj/')
mtlLoader.load('room1.mtl',function(materials){
materials.preload();
objLoader.setMaterials(materials)
});
objLoader.setPath('static/Map/obj/')
objLoader.load('room1.obj',function(object){
object.traverse(function(child) {
if(child instanceof THREE.Mesh) {
child.material.transparent=true;
child.receiveShadow = true;
child.castShadow = true;
child.material.map = texture;
}
})
object.position.set(-6,-6,6)
object.transparent=true;
object.opacity=0.5
scene.add(object);
renderer.render(scene,camera);
},undefined,function(error){
console.log(error)
});
Additional information
No response