【发布时间】:2021-11-10 17:39:06
【问题描述】:
我不熟悉使用 three.js、JavaScript、html 和 CSS,我正在加载 3d 模型。当我在线提取 gltf 文件时,我有一个正在运行的程序,例如:
loader.load('https://threejsfundamentals.org/threejs/resources/models/cartoon_lowpoly_small_city_free_pack/scene.gltf', function ( gltf )
{console.log(gltf);
scene.add( gltf.scene );
}, undefined, function ( error ) {console.error( error );} );
但是当我尝试从我的计算机上提取一个 gltf 文件时它不起作用,例如:
loader.load('C:\Models\scene.gltf', function ( gltf )
{console.log(gltf);
scene.add( gltf.scene );
}, undefined, function ( error ) {console.error( error );} );
知道我做错了什么吗?我也在使用 Dreamweaver。
【问题讨论】:
标签: javascript html three.js gltf