@adatechnology/game-floorplan-three 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -58,7 +58,7 @@ const shelf = furnitureSpec(THREE, 'bookcase') // 1.2 x 0.35 x 2 m: uprights, ba
58
58
  world.add(shelf.spec, { id: 'shelf', position: [-3.5, 0, 0] })
59
59
  scene.add(shelf.build(THREE)) // meshes named by part id
60
60
  const table = furnitureSpec(THREE, 'dining_table', { w: 1.6, d: 0.8, h: 0.78, options: { chairs: false } })
61
- table.top // { part: 'wood_0', y: 0.78 }: what loose things rest on
61
+ table.top // { part: 'wood_0_b2', y: 0.78, parts: ['wood_0_b0', ...] }: what loose things rest on (a solid wooden top is boards: it breaks board by board where it is hit)
62
62
  ```
63
63
 
64
64
  `tapSpec(THREE, { kind: 'counter' | 'wall', reach? })` does the same for the team's tap (`counterTap` of the sink, `wallTap` of the laundry tub): the steel parts of the base, column, spout and lever, and `spout`, where the water thread starts (the thread itself is not drawn).
package/dist/index.d.ts CHANGED
@@ -577,9 +577,11 @@ interface FurnitureSpecResult {
577
577
  /** Draws the piece: one mesh per part, named by the part id, coloured as the builder coloured it. */
578
578
  build(THREE: any): any;
579
579
  /** The widest high horizontal part and the height of its upper face (what loose things rest on), or null when the piece has none. */
580
+ /** What loose things rest on. A solid top is boards: `parts` are all of them, `part` the one in the middle. */
580
581
  top: {
581
582
  part: string;
582
583
  y: number;
584
+ parts?: string[];
583
585
  } | null;
584
586
  /** Size the piece was drawn at. */
585
587
  size: {