@shards-design/core
Advanced tools
Comparing version 0.0.3 to 0.0.4
21
index.ts
@@ -233,12 +233,13 @@ import { CSG, Mesh, MeshBuilder, Vector3 } from '@babylonjs/core' | ||
constructor( | ||
name: string = 'box', | ||
options: Parameters<typeof MeshBuilder.CreateBox>[1] & { | ||
name?: string | ||
anchor?: Vector3 | ||
}, | ||
) { | ||
const mesh = MeshBuilder.CreateBox(name, options) | ||
const { name = 'box', anchor, ...rest } = options | ||
const mesh = MeshBuilder.CreateBox(name, rest) | ||
super(name, mesh) | ||
this.anchor = options?.anchor || Vector3.Zero() | ||
this.anchor = anchor || Vector3.Zero() | ||
placeAnchor(mesh, this.anchor) | ||
@@ -250,12 +251,13 @@ } | ||
constructor( | ||
name: string = 'sphere', | ||
options: Parameters<typeof MeshBuilder.CreateSphere>[1] & { | ||
name?: string | ||
anchor?: Vector3 | ||
}, | ||
) { | ||
const mesh = MeshBuilder.CreateSphere(name, options) | ||
const { name = 'sphere', anchor, ...rest } = options | ||
const mesh = MeshBuilder.CreateSphere(name, rest) | ||
super(name, mesh) | ||
this.anchor = options?.anchor || Vector3.Zero() | ||
this.anchor = anchor || Vector3.Zero() | ||
placeAnchor(mesh, this.anchor) | ||
@@ -267,14 +269,15 @@ } | ||
constructor( | ||
name: string = 'extrusion', | ||
options: Parameters<typeof MeshBuilder.ExtrudeShape>[1] & { | ||
name?: string | ||
anchor?: Vector3 | ||
}, | ||
) { | ||
const mesh = MeshBuilder.ExtrudeShape(name, options) | ||
const { name = 'extrusion', anchor, ...rest } = options | ||
const mesh = MeshBuilder.ExtrudeShape(name, rest) | ||
super(name, mesh) | ||
this.anchor = options?.anchor || Vector3.Zero() | ||
this.anchor = anchor || Vector3.Zero() | ||
placeAnchor(mesh, this.anchor) | ||
} | ||
} |
{ | ||
"name": "@shards-design/core", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17178
537