-
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Material type definitions: Add MaterialJSON format (#1072)
* Update Material type definitions: Add MaterialJSON format Introduces the MaterialJSON format in Three.js, which extends the Material interface. The new format includes serializable properties such as color, roughness, metallic, map, normalMap, and many more. This change enables better JSON parsing and handling of material configurations for Three.js applications. Confirmed: Types and interfaces have been updated in Object3D.d.ts and Material.d.ts. The Material class has also been updated to include toJSON methods that return MaterialJSON or MaterialJSONRoot objects based on the provided meta data. Reference(s): #1071 #1070 #426 * Fix: Error: 240:16 error Array type using 'T[]' is forbidden for non-simple types. Use 'Array<T>' instead @typescript-eslint/array-type * ShaderMaterial & Fixes * Add ShaderMaterialJSON to JSONMeta.materials record * Fixes Error: 105:28 error Array type using 'Array<number>' is forbidden for simple types. Use 'number[]' instead @typescript-eslint/array-type Error: 136:19 error Array type using 'Array<number>' is forbidden for simple types. Use 'number[]' instead @typescript-eslint/array-type Error: 157:22 error Array type using 'Array<number>' is forbidden for simple types. Use 'number[]' instead @typescript-eslint/array-type Error: 242:14 error Array type using 'Array<SourceJSON>' is forbidden for simple types. Use 'SourceJSON[]' instead @typescript-eslint/array-type * Error: 240:16 error Array type using 'T[]' is forbidden for non-simple types. Use 'Array<T>' instead @typescript-eslint/array-type * Material * ShaderMaterial * Object3D --------- Co-authored-by: Nathan Bierema <nbierema@gmail.com>
- Loading branch information
1 parent
b72e5c5
commit 12a22f8
Showing
3 changed files
with
215 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters