Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -273,7 +273,11 @@ export async function initializeViewer(config, instanceId) {
|
|
| 273 |
}
|
| 274 |
|
| 275 |
cameraEntity = new pc.Entity('camera');
|
| 276 |
-
cameraEntity.addComponent('camera',
|
|
|
|
|
|
|
|
|
|
|
|
|
| 277 |
cameraEntity.setPosition(chosenCameraX, chosenCameraY, chosenCameraZ);
|
| 278 |
cameraEntity.lookAt(modelEntity.getPosition());
|
| 279 |
cameraEntity.addComponent('script');
|
|
|
|
| 273 |
}
|
| 274 |
|
| 275 |
cameraEntity = new pc.Entity('camera');
|
| 276 |
+
cameraEntity.addComponent('camera',
|
| 277 |
+
{ clearColor: new pc.Color(color_bg)},
|
| 278 |
+
nearClip: 0.01,
|
| 279 |
+
farClip: 100
|
| 280 |
+
);
|
| 281 |
cameraEntity.setPosition(chosenCameraX, chosenCameraY, chosenCameraZ);
|
| 282 |
cameraEntity.lookAt(modelEntity.getPosition());
|
| 283 |
cameraEntity.addComponent('script');
|