breaking change: Change "type" to be a keyword, import() "type:" parameter to "format:" (#4517)

This commit is contained in:
Jonathan Tran
2024-11-20 09:53:37 -05:00
committed by GitHub
parent 986675fe89
commit a2f9e70d18
8 changed files with 31 additions and 30 deletions

File diff suppressed because one or more lines are too long

View File

@ -78138,10 +78138,10 @@
"description": "Autodesk Filmbox (FBX) format",
"type": "object",
"required": [
"type"
"format"
],
"properties": {
"type": {
"format": {
"type": "string",
"enum": [
"fbx"
@ -78153,10 +78153,10 @@
"description": "Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).",
"type": "object",
"required": [
"type"
"format"
],
"properties": {
"type": {
"format": {
"type": "string",
"enum": [
"gltf"
@ -78168,11 +78168,11 @@
"description": "Wavefront OBJ format.",
"type": "object",
"required": [
"type",
"format",
"units"
],
"properties": {
"type": {
"format": {
"type": "string",
"enum": [
"obj"
@ -78201,11 +78201,11 @@
"description": "The PLY Polygon File Format.",
"type": "object",
"required": [
"type",
"format",
"units"
],
"properties": {
"type": {
"format": {
"type": "string",
"enum": [
"ply"
@ -78234,10 +78234,10 @@
"description": "SolidWorks part (SLDPRT) format.",
"type": "object",
"required": [
"type"
"format"
],
"properties": {
"type": {
"format": {
"type": "string",
"enum": [
"sldprt"
@ -78249,10 +78249,10 @@
"description": "ISO 10303-21 (STEP) format.",
"type": "object",
"required": [
"type"
"format"
],
"properties": {
"type": {
"format": {
"type": "string",
"enum": [
"step"
@ -78264,11 +78264,11 @@
"description": "ST**ereo**L**ithography format.",
"type": "object",
"required": [
"type",
"format",
"units"
],
"properties": {
"type": {
"format": {
"type": "string",
"enum": [
"stl"
@ -78506,7 +78506,7 @@
"deprecated": false,
"examples": [
"model = import(\"tests/inputs/cube.obj\")",
"model = import(\"tests/inputs/cube.obj\", { type: \"obj\", units: \"m\" })",
"model = import(\"tests/inputs/cube.obj\", { format: \"obj\", units: \"m\" })",
"model = import(\"tests/inputs/cube.gltf\")",
"model = import(\"tests/inputs/cube.sldprt\")",
"model = import(\"tests/inputs/cube.step\")",

View File

@ -24,7 +24,7 @@ Autodesk Filmbox (FBX) format
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `fbx`| | No |
| `format` |enum: `fbx`| | No |
----
@ -40,7 +40,7 @@ Binary glTF 2.0. We refer to this as glTF since that is how our customers refer
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `gltf`| | No |
| `format` |enum: `gltf`| | No |
----
@ -56,7 +56,7 @@ Wavefront OBJ format.
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `obj`| | No |
| `format` |enum: `obj`| | No |
| `coords` |[`System`](/docs/kcl/types/System)| Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system. | No |
| `units` |[`UnitLength`](/docs/kcl/types/UnitLength)| The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters. | No |
@ -74,7 +74,7 @@ The PLY Polygon File Format.
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `ply`| | No |
| `format` |enum: `ply`| | No |
| `coords` |[`System`](/docs/kcl/types/System)| Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system. | No |
| `units` |[`UnitLength`](/docs/kcl/types/UnitLength)| The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters. | No |
@ -92,7 +92,7 @@ SolidWorks part (SLDPRT) format.
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `sldprt`| | No |
| `format` |enum: `sldprt`| | No |
----
@ -108,7 +108,7 @@ ISO 10303-21 (STEP) format.
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `step`| | No |
| `format` |enum: `step`| | No |
----
@ -124,7 +124,7 @@ ST**ereo**L**ithography format.
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `stl`| | No |
| `format` |enum: `stl`| | No |
| `coords` |[`System`](/docs/kcl/types/System)| Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system. | No |
| `units` |[`UnitLength`](/docs/kcl/types/UnitLength)| The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters. | No |