|
@ -121,6 +121,11 @@ $scene->registerObjects($obj); |
|
|
|
|
|
|
|
|
// 二、添加要渲染的模型
|
|
|
// 二、添加要渲染的模型
|
|
|
foreach($taskModel->childsParams as $childParams){ |
|
|
foreach($taskModel->childsParams as $childParams){ |
|
|
|
|
|
// 如果某个模型节点不可见,则不添加到场景渲染
|
|
|
|
|
|
if($childParams->isVisible !== 1){ |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$cacheFileDir = $sceneTemplatePath.'/cacheFiles'; |
|
|
$cacheFileDir = $sceneTemplatePath.'/cacheFiles'; |
|
|
$material = null; |
|
|
$material = null; |
|
|
$matOriginal = (function ($childParams){ |
|
|
$matOriginal = (function ($childParams){ |
|
@ -148,7 +153,6 @@ foreach($taskModel->childsParams as $childParams){ |
|
|
(new Client())->get($childParams->childPlyFile, [RequestOptions::SINK => $plyFileHandle]); |
|
|
(new Client())->get($childParams->childPlyFile, [RequestOptions::SINK => $plyFileHandle]); |
|
|
$obj = new Objects(); |
|
|
$obj = new Objects(); |
|
|
$obj->ply = $plyFileSavaPath; |
|
|
$obj->ply = $plyFileSavaPath; |
|
|
$obj->camerainvisible = $childParams->isVisible === 1 ? Objects::CLOSE : Objects::OPEN; |
|
|
|
|
|
$obj->setMaterial($material); |
|
|
$obj->setMaterial($material); |
|
|
$scene->registerObjects($obj); |
|
|
$scene->registerObjects($obj); |
|
|
} |
|
|
} |
|
|