-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Three json #1071
Open
Hoodgail
wants to merge
76
commits into
three-types:master
Choose a base branch
from
Hoodgail:three-json
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Three json #1071
Conversation
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
Addding a Skeleton.toJSON
JSON data for BufferAttribute
… into three-json
…cally. Prefer to explicitly write 'export' for clarity. If you have a good reason not to export this declaration, add 'export {}' to the module to shut off automatic exporting @definitelytyped/strict-export-declare-modifier
Upgraded the JSON schema for the Object3D hierarchy. This includes updating interface and type definitions to use the new Object3DJSON utility type and extending it to incorporate Object3DRootJSON. This modification will create a more consistent and modular data structure across various objects like OrthographicCamera, PerspectiveCamera, LOD, InstancedMesh, SkinnedMesh, and Mesh. Additionally, this change allows for the inclusion of new fields like "geometries", "materials", and "textures" in the Object3DRootJSON schema.
…afety Generic types to the KeyframeTrack base class and its derived types (BooleanKeyframeTrack, ColorKeyframeTrack, etc.). The updates involve altering the exported interfaces (KeyframeTrackJSON and KeyframeTrack) to accept and maintain more specific types (boolean, number, string, or array-like), and adjusting the constructors accordingly.
@Methuselah96 I made some changes, i'm not sure why it's saying my changes are conflicts, but i will try to use a diff pr branch from now on for when i start working on JSON objects for materials. |
Hoodgail
added a commit
to Hoodgail/three-ts-types
that referenced
this pull request
Jul 17, 2024
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
Methuselah96
added a commit
that referenced
this pull request
Jul 18, 2024
* 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 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Minor fixes