three.js THREE.FBXLoader 3d model not showing - javascript

I am trying to add THREE.FBXLoader 3D model into three js project but its showing error
THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js
screenshot

Like mentioned by the error message, just including the examples/js version of THREE.FBXLoader is not sufficient because the loader has a dependency. You need to include this dependency with a separate <script> tag.

Related

My GTFL won't load with GLTFLoader: error Invalid typed array length: 55419

I'm currently trying to load a model gltfLoader I've debugged what I can with some of the common errors.
I've made sure my gltf file is in the /public folder, I've also tried using and import with the path both give the same error:
"Uncaught Could not load /scene.gltf: Invalid typed array length: 55419 "
currently my flies look like this :
I've tired to load the .gltf with different methods such as the useGLTF but i get the same issue. The network call has the scene obj correctly though here:
the main file call in the ThreeD.jsx is wraped in a <suspense/> tag and then the <Model/> call i've also tried to import the model using const Model = lazy(() => import("./Model"));
but that seemed to get me no where on the main issue of the scene not loading. i grabed my flies from : https://sketchfab.com/3d-models?date=week&sort_by=-likeCount&cursor=bz0yJnA9NDA%3D
any help or ideas on what to debug would be amazing, im happy to provied any details needed.
The Issue was i needed to have the entire 3d file in /public and i needed to lazy import the model file.

Forge Model Properties Excel

Currently I was following these steps to get the Forge Viewer into PowerBi. I was able to successfully get that to work but now I am attempting to get the properties out of the revit models.
I am following these steps found here
by editing this package forge-model-properties-excel
I am putting in a revit model that shows up as a 3D model in Forge viewer, and I know it has the material properties that I need. But when i run it i get the error that reads
this model has no {3D} view
I'm not sure why I am receiving this error if the model does have a 3D view.
Many thanks in advance.
The sample application is looking for a 3D view that is actually called "{3D}": https://github.com/xiaodongliang/forgeviewer_embed_in_powerbi_report/blob/70c58ab3217cdf4b10c475abf2721871984ed4e0/forge-model-properties-excel/index.js#L27.
Is it possible that the 3D views in your Revit model are named differently? If they are, make sure to update that line of code with the expected name.

Errors including and calling FBXLoader with Three.js

I'm new to three.js and I was following along a tutorial on loading GLTF Models using Three.js. I wanted to practice by using the FBX loader to import and animate models from Mixamo.
The tutorial used CDNs for the three.min.js and GLTFLoader files. I tried doing the same for the FBXLoader. However, I keep getting errors calling the FBXLoader from my main.js file
In my HTML I have:
In my main.js I've tried calling it like so:
const loader = new THREE.FBXLoader();
and
const loader = new FBXLoader();
then get the following respective errors
Uncaught TypeError: THREE.FBXLoader is not a constructor
Uncaught ReferenceError: FBXLoader is not defined
I've messed around with it quite a bit, and tried removing the type "module" and changing "jsm" to "js" with no luck either. (Plus I also encounter a deprecation warning when I do that). I don't have the best understanding of importing plugins from three.js so any clarification would help.
Also, I see that GLTF is the preferred format for Three.js, should I convert my FBX model and animations from Mixamo to GLTF using blender?
Thank you
Did you try loading the FBXLoader first via script- tag in your html as it must be before instantiating it ? If not, load the .js- version.

How to include threejs (external lib) within SAPUI5 app view controller correctly?

The problem
How to include the library three.js in SAPUI5 so that I can use it like I normally do, using THREE as root variable in my main view controller?
I already tried to create a folder libs in my project directory and include it in my controller header like shown here: SAPUI5: How to use external library in controller
Getting an error:
THREE is undefined
Edit: It's the same for 'three' instead of 'THREE'.
There is also an experimental package within SAPUI5 sap.ui.vk.threejs which is kind of messy and seems not to be well documented.
JavaScript is case sensitive, you are importing the parameter as 'three'. THREE is treated as a different variable

Add dependecy of ngx-charts to integrate combo-chart

I'm using angular5 with library "#swimlane/ngx-charts": "^8.0.0"
I need to add a library to use combo-chart because in ngx-charts the default install not include combo-chart .
This is a demo of ngx combo charts.
This is the source code of combo-chart.
I need to use the combo chart in my project.
Please how do I integrate the combo chart inside an angular5 project?
This post in a github discussion explains why components like combo-chart (useful but a bit more complex) aren't included in the ngx-charts library. Instead, those use cases are featured in the demo section, where you can view the source code and the final look and feel.
As far as I can tell, the best way to integrate the combo-chart is to create a combo-chart.component in your own project and copy the source code into it. You will need to include the ngx-charts library and change any imports that rely on the local structure of the demo to point to that library instead.
For example, in combo-chart.component.ts
import { NgxChartsModule, <other imports> } from '../../src';
would become
import { NgxChartsModule, <other imports> } from '#swimlane/ngx-charts';

Categories