【发布时间】:2014-01-06 16:34:10
【问题描述】:
三个.js:12917 上的错误是Uncaught TypeError: Cannot read property 'opacity' of undefined
我使用的场景文件是:
{
"metadata": {
"version": 4.3,
"type": "Object",
"generator": "ObjectExporter"
},
"geometries": [
{
"uuid": "7F5BC6A2-4B74-4049-8AF8-40A5EF310430",
"type": "CubeGeometry",
"width": 100,
"height": 100,
"depth": 100,
"widthSegments": 1,
"heightSegments": 1,
"depthSegments": 1
}],
"materials": [
{
"uuid": "95D0C78A-2066-4A8D-9F46-73B3038E55DE",
"type": "MeshBasicMaterial",
"color": 16777215,
"opacity": 1,
"transparent": false,
"wireframe": false
}],
"object": {
"uuid": "E0E0DAAE-012A-49DB-BC1B-2878BCA7F0DA",
"type": "Scene",
"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],
"children": [
{
"uuid": "E60D8291-4E35-4365-A98E-7AEA1D1D433F",
"name": "Cube 1",
"type": "Mesh",
"geometry": "7F5BC6A2-4B74-4049-8AF8-40A5EF310430",
"material": "95D0C78A-2066-4A8D-9F46-73B3038E55DE",
"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]
}]
}
}
我已经检查过了,它确实加载成功并且是有效的 JSON(JSONLint); 我还测试了 JSONLoader 以成功加载 JSON 模型。 我似乎在使用the latest version。场景是在THREE.js Editor中创建的,恐怕我不知道如何在它之外创建场景。
【问题讨论】:
标签: javascript three.js