threejs.miniprogram icon indicating copy to clipboard operation
threejs.miniprogram copied to clipboard

JavaScript 3D library. Three.js for wechat miniprogram

Results 9 threejs.miniprogram issues
Sort by recently updated
recently updated
newest added

使用 GLTFLoader 加载gltf文件后,报错 ` const gltfLoader = new GLTFLoader(); gltfLoader.load('https://threejsfundamentals.org/threejs/resources/models/cartoon_lowpoly_small_city_free_pack/scene.gltf', (gltf) => { const root = gltf.scene; scene.add(root); }, (e) => { console.log('loading') }); ` 报错提示为:XMLHttpRequest is not a constructor

//加载cube const geometry = new THREE.BoxBufferGeometry(0.2, 0.2, 0.2); /* This doesn't work on iOS because of Uint8ClampedArray bug: https://developers.weixin.qq.com/community/develop/doc/000408d4f304e038c20e4a00a51400 */ /* const rgbaData = new Uint8ClampedArray([ 255,255,255,0, 0,0,0,0, 0,0,0,0, 255,255,255,0...

加载基本的cube没有问题,加载obj模型没有问题;但加载glb后,微信开发者工具可以响应事件,真机上无法响应事件,附加载glb模型的代码: let GLTFLoader = gLTF(THREE) const gltfLoader = new GLTFLoader(); gltfLoader.load(glbUrl, (gltf) => { const item = gltf.scene; _this.modelItem = item; _this.scene.add(_this.modelItem); _this.lights.forEach(light => { light.target = _this.modelItem }) _this.inited...

``` gltfLoader.load(url, (gltf) => { console.log("strat to load model"); const root = gltf.scene; scene.add(root); root.updateMatrixWorld(); const box = new THREE.Box3().setFromObject(root); const boxSize = box.getSize(new THREE.Vector3()).length(); const boxCenter = box.getCenter(new THREE.Vector3());...

本机yarn start 启动项目成功 ![image](https://user-images.githubusercontent.com/30064739/174929788-730fe951-fc45-4764-85ec-60fe8227d45b.png) 但是访问项目失败 ![image](https://user-images.githubusercontent.com/30064739/174929823-337dd2ac-9e9e-48e5-b476-f780e1601fc8.png)

TextureLoader在电脑端调试可以正确载入纹理,可正确显示,但在真机上运行时不能正确载入纹理,模型一片黑。

three.weapp.js的包,没有使用new THREE.MeshBasicMaterial({ map: texture })时正常渲染 但是使用图片贴图后就渲染不出来了,一片空白 另外作者的demo下下来运行后发现也有同样的问题