Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Material type definitions: Add MaterialJSON format #1072

Merged
merged 9 commits into from
Jul 18, 2024

Commits on Jul 17, 2024

  1. 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):
    three-types#1071
    three-types#1070
    three-types#426
    Hoodgail committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    94e871d View commit details
    Browse the repository at this point in the history
  2. Fix: Error: 240:16 error Array type using 'T[]' is forbidden for non-…

    …simple types. Use 'Array<T>' instead @typescript-eslint/array-type
    Hoodgail committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    bce8955 View commit details
    Browse the repository at this point in the history
  3. ShaderMaterial & Fixes

    Hoodgail committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    f04645b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d1a7bc9 View commit details
    Browse the repository at this point in the history
  5. 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
    Hoodgail committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    115faea View commit details
    Browse the repository at this point in the history
  6. Error: 240:16 error Array type using 'T[]' is forbidden for non-simpl…

    …e types. Use 'Array<T>' instead @typescript-eslint/array-type
    Hoodgail committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    0491ae8 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2024

  1. Material

    Methuselah96 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    20518ba View commit details
    Browse the repository at this point in the history
  2. ShaderMaterial

    Methuselah96 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    e70ca24 View commit details
    Browse the repository at this point in the history
  3. Object3D

    Methuselah96 committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    ba4e09b View commit details
    Browse the repository at this point in the history