forked from mirror/ObjToSchematic
Added warning for using GLTF importer
This commit is contained in:
parent
81e40a41c0
commit
3e05844d39
@ -34,6 +34,7 @@ export const en_GB = {
|
||||
vertex_triangle_count: '{{vertex_count, number}} vertices, {{triangle_count, number}} triangles',
|
||||
missing_normals: 'Some vertices do not have their normals defined, this may cause voxels to be aligned incorrectly',
|
||||
failed_to_parse_line: 'Failed attempt to parse "{{line}}", because "{{error}}"',
|
||||
gltf_experimental: 'The GLTF importer is experimental and may produce unexpected results',
|
||||
components: {
|
||||
input: '3D Model (.obj, .gltf/.glb)',
|
||||
rotation: 'Rotation',
|
||||
|
@ -2,13 +2,17 @@ import { parse } from '@loaders.gl/core';
|
||||
import { GLTFLoader } from '@loaders.gl/gltf';
|
||||
|
||||
import { RGBAColours, RGBAUtil } from '../colour';
|
||||
import { LOC } from '../localiser';
|
||||
import { MaterialMap, MaterialType, Mesh, Tri } from '../mesh';
|
||||
import { StatusHandler } from '../status';
|
||||
import { UV } from '../util';
|
||||
import { Vector3 } from '../vector';
|
||||
import { IImporter } from './base_importer';
|
||||
|
||||
export class GltfLoader extends IImporter {
|
||||
public override import(file: File): Promise<Mesh> {
|
||||
StatusHandler.warning(LOC('import.gltf_experimental'));
|
||||
|
||||
return new Promise<Mesh>((resolve, reject) => {
|
||||
parse(file, GLTFLoader, { limit: 0 })
|
||||
.then((gltf: any) => {
|
||||
|
Loading…
Reference in New Issue
Block a user