MikaFil commited on
Commit
738af79
·
verified ·
1 Parent(s): c031c50

Update viewer.js

Browse files
Files changed (1) hide show
  1. viewer.js +4 -1
viewer.js CHANGED
@@ -181,10 +181,13 @@ export async function initializeViewer(config, instanceId) {
181
  app.start();
182
  progressDialog.style.display = 'none';
183
 
 
 
 
184
  modelEntity = new pc.Entity('model');
185
  modelEntity.addComponent('gsplat', { asset: assets.sogs });
186
  modelEntity.setLocalPosition(modelX, modelY, modelZ);
187
- modelEntity.setLocalRotation(modelRotationX, modelRotationY, modelRotationZ);
188
  modelEntity.setLocalScale(modelScale, modelScale, modelScale);
189
  app.root.addChild(modelEntity);
190
 
 
181
  app.start();
182
  progressDialog.style.display = 'none';
183
 
184
+ const quat = new pc.Quat();
185
+ quat.setFromEulerAngles(modelRotationX, modelRotationY, modelRotationZ);
186
+
187
  modelEntity = new pc.Entity('model');
188
  modelEntity.addComponent('gsplat', { asset: assets.sogs });
189
  modelEntity.setLocalPosition(modelX, modelY, modelZ);
190
+ modelEntity.setLocalRotation(quat);
191
  modelEntity.setLocalScale(modelScale, modelScale, modelScale);
192
  app.root.addChild(modelEntity);
193