I really like Babylonjs, I’m using Vue2.0 to introduce Babylon. Js, GLTF or obJ, and I’ve got it
The problem is at number two
1 Access port file
BABYLON.SceneLoader.Append(
// Use the service to access files
"http://localhost:55855/obj/",
// Local folder Add images and other files to other tags, and the URL is fine
// "@/assets/obj/",
"antenna_08.obj",
scene,
function(scene) {
// Create a default arc rotate camera and light.
scene.createDefaultCameraOrLight(true, true, true);
// The default camera looks at the back of the asset.
// Rotate the camera by 180 degrees to the front of the asset.
scene.activeCamera.alpha += Math.PI;
}
);
2 Access local folders
BABYLON.SceneLoader.Append(
// Use the service to access files
// "http://localhost:55855/obj/",
// Local folder Add images and other files to other tags, and the URL is fine
"@/assets/obj/",
"antenna_08.obj",
scene,
function(scene) {
// Create a default arc rotate camera and light.
scene.createDefaultCameraOrLight(true, true, true);
// The default camera looks at the back of the asset.
// Rotate the camera by 180 degrees to the front of the asset.
scene.activeCamera.alpha += Math.PI;
}
);
@ is the URL configured by WebPack, and there is no problem introducing @ into other tags
⑴Could please tell me how to solve this problem???
⑵I want to try the game with Babylon. Js, where can I find more literature or tutorials?Because the documentation seems confusing to me, but I love learning Babylon. Js
Thank you again!!