Custom camera position doesn't work during embedding #224

This commit is contained in:
kovacsv 2022-02-24 19:20:51 +01:00
parent 47cb58183a
commit 111125ea32
3 changed files with 19 additions and 7 deletions

View File

@ -19,12 +19,7 @@
style="border:1px solid #eeeeee;">
</iframe>
<iframe
src="../../website/embed.html#model=../test/testfiles/3ds/cube_four_instances.3ds,../test/testfiles/3ds/texture.png$camera=3.929421317669367,6.153966358575169,2.7076091223424714,1.5,1.5,0.5,0,0,1"
width=360 height=240
style="border:1px solid #eeeeee;">
</iframe>
<iframe
src="../../website/embed.html#model=../test/testfiles/obj/hundred_cubes.obj,../test/testfiles/obj/hundred_cubes.mtl$camera=1,1,1,0,0,0,0,0,1"
src="../../website/embed.html#model=../test/testfiles/3ds/cube_four_instances.3ds,../test/testfiles/3ds/texture.png$camera=5,4,3,0,0,0,0,1,0"
width=360 height=240
style="border:1px solid #eeeeee;">
</iframe>

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>Online 3D Viewer</title>
</head>
<body>
<iframe
width="640" height="480" style="border:1px solid #eeeeee;"
src="../../website/embed.html#model=assets/models/solids.obj,assets/models/solids.mtl$camera=2.18558,4.53834,2.35460,3.62488,2.61927,-0.52401,0.00000,1.00000,0.00000$envsettings=fishermans_bastion,off$backgroundcolor=255,255,255$defaultcolor=200,200,200$edgesettings=off,0,0,0,1">
</iframe>
</body>
</html>

View File

@ -112,7 +112,7 @@ export class Embed
this.viewer.SetCamera (camera);
} else {
this.viewer.SetUpVector (Direction.Y, false);
this.viewer.FitSphereToWindow (boundingSphere, false);
}
this.viewer.FitSphereToWindow (boundingSphere, false);
}
}