浏览代码

File input for the mesh asset task
With no big changes, the mesh asset task can accept a File as its input.
This way the FileInput class can use a mesh asset task instead of SceneLoader.Load

Raanan Weber 5 年之前
父节点
当前提交
090c22175a
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 1 0
      dist/preview release/what's new.md
  2. 3 3
      src/Misc/assetsManager.ts

+ 1 - 0
dist/preview release/what's new.md

@@ -15,6 +15,7 @@
 - Add a `CascadedShadowMap.IsSupported` method and log an error instead of throwing an exception when CSM is not supported ([Popov72](https://github.com/Popov72))
 - Added initial code for DeviceInputSystem ([PolygonalSun](https://github.com/PolygonalSun))
 - Added support for `material.disableColorWrite` ([Deltakosh](https://github.com/deltakosh))
+- The Mesh Asset Task also accepts File as sceneInput ([RaananW](https://github.com/RaananW))
 
 ### Engine
 

+ 3 - 3
src/Misc/assetsManager.ts

@@ -248,7 +248,7 @@ export class MeshAssetTask extends AbstractAssetTask {
      * @param name defines the name of the task
      * @param meshesNames defines the list of mesh's names you want to load
      * @param rootUrl defines the root url to use as a base to load your meshes and associated resources
-     * @param sceneFilename defines the filename of the scene to load from
+     * @param sceneFilename defines the filename or File of the scene to load from
      */
     constructor(
         /**
@@ -264,9 +264,9 @@ export class MeshAssetTask extends AbstractAssetTask {
          */
         public rootUrl: string,
         /**
-         * Defines the filename of the scene to load from
+         * Defines the filename or File of the scene to load from
          */
-        public sceneFilename: string) {
+        public sceneFilename: string | File) {
         super(name);
     }