|
@@ -83,7 +83,7 @@ class Loader3DTiles {
|
|
|
* @returns An object containing the 3D Model to be added to the scene
|
|
|
* and a runtime engine to be updated every frame.
|
|
|
*/
|
|
|
- public static async load (props: LoaderProps): Promise<{ model: Object3D; modelCenter:Vector3;runtime: Runtime }> {
|
|
|
+ public static async load (props: LoaderProps): Promise<{ model: Object3D; runtime: Runtime }> {
|
|
|
const options = { ...defaultOptions, ...props.options };
|
|
|
const { url } = props;
|
|
|
|
|
@@ -454,7 +454,6 @@ class Loader3DTiles {
|
|
|
|
|
|
return {
|
|
|
model: root,
|
|
|
- modelCenter:new Vector3(tilesetJson.root.boundingVolume.box[0],tilesetJson.root.boundingVolume.box[1],tilesetJson.root.boundingVolume.box[2]),
|
|
|
runtime: {
|
|
|
getTileset: () => {
|
|
|
return tileset;
|
|
@@ -601,7 +600,9 @@ async function createGLTFNodes(gltfLoader, tile, unlitMaterial, options, rootTra
|
|
|
|
|
|
// The computed trasnform already contains the root's transform, so we have to invert it
|
|
|
const contentTransform = new Matrix4().fromArray(tile.computedTransform).premultiply(rootTransformInverse);
|
|
|
-
|
|
|
+ console.log('tile.computedTransform:'+tile.computedTransform);
|
|
|
+ console.log('rootTransformInverse:'+rootTransformInverse.elements);
|
|
|
+ //console.log('contentTransform:'+contentTransform.elements);
|
|
|
if (shouldRotate) {
|
|
|
contentTransform.multiply(rotateX); // convert from GLTF Y-up to Z-up
|
|
|
}
|