@shards-design/core
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -79,3 +79,4 @@ import { Mesh, MeshBuilder, Vector3 } from '@babylonjs/core'; | ||
export declare class Box extends BaseObject { | ||
constructor(name: string | undefined, options: Parameters<typeof MeshBuilder.CreateBox>[1] & { | ||
constructor(options: Parameters<typeof MeshBuilder.CreateBox>[1] & { | ||
name?: string; | ||
anchor?: Vector3; | ||
@@ -85,3 +86,4 @@ }); | ||
export declare class Sphere extends BaseObject { | ||
constructor(name: string | undefined, options: Parameters<typeof MeshBuilder.CreateSphere>[1] & { | ||
constructor(options: Parameters<typeof MeshBuilder.CreateSphere>[1] & { | ||
name?: string; | ||
anchor?: Vector3; | ||
@@ -91,5 +93,6 @@ }); | ||
export declare class Extrude extends BaseObject { | ||
constructor(name: string | undefined, options: Parameters<typeof MeshBuilder.ExtrudeShape>[1] & { | ||
constructor(options: Parameters<typeof MeshBuilder.ExtrudeShape>[1] & { | ||
name?: string; | ||
anchor?: Vector3; | ||
}); | ||
} |
"use strict"; | ||
var __rest = (this && this.__rest) || function (s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -179,6 +190,7 @@ exports.Extrude = exports.Sphere = exports.Box = exports.Cylinder = exports.BaseObject = exports.BACK = exports.FRONT = exports.RIGHT = exports.LEFT = exports.TOP = exports.BOTTOM = void 0; | ||
class Box extends BaseObject { | ||
constructor(name = 'box', options) { | ||
const mesh = core_1.MeshBuilder.CreateBox(name, options); | ||
constructor(options) { | ||
const { name = 'box', anchor } = options, rest = __rest(options, ["name", "anchor"]); | ||
const mesh = core_1.MeshBuilder.CreateBox(name, rest); | ||
super(name, mesh); | ||
this.anchor = (options === null || options === void 0 ? void 0 : options.anchor) || core_1.Vector3.Zero(); | ||
this.anchor = anchor || core_1.Vector3.Zero(); | ||
placeAnchor(mesh, this.anchor); | ||
@@ -189,6 +201,7 @@ } | ||
class Sphere extends BaseObject { | ||
constructor(name = 'sphere', options) { | ||
const mesh = core_1.MeshBuilder.CreateSphere(name, options); | ||
constructor(options) { | ||
const { name = 'sphere', anchor } = options, rest = __rest(options, ["name", "anchor"]); | ||
const mesh = core_1.MeshBuilder.CreateSphere(name, rest); | ||
super(name, mesh); | ||
this.anchor = (options === null || options === void 0 ? void 0 : options.anchor) || core_1.Vector3.Zero(); | ||
this.anchor = anchor || core_1.Vector3.Zero(); | ||
placeAnchor(mesh, this.anchor); | ||
@@ -199,6 +212,7 @@ } | ||
class Extrude extends BaseObject { | ||
constructor(name = 'extrusion', options) { | ||
const mesh = core_1.MeshBuilder.ExtrudeShape(name, options); | ||
constructor(options) { | ||
const { name = 'extrusion', anchor } = options, rest = __rest(options, ["name", "anchor"]); | ||
const mesh = core_1.MeshBuilder.ExtrudeShape(name, rest); | ||
super(name, mesh); | ||
this.anchor = (options === null || options === void 0 ? void 0 : options.anchor) || core_1.Vector3.Zero(); | ||
this.anchor = anchor || core_1.Vector3.Zero(); | ||
placeAnchor(mesh, this.anchor); | ||
@@ -205,0 +219,0 @@ } |
{ | ||
"name": "@shards-design/core", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "", | ||
@@ -12,3 +12,3 @@ "main": "index.ts", | ||
"build": "npx -p typescript tsc", | ||
"publish": "npm publish --access public" | ||
"publish": "yarn build && npm publish --access public" | ||
}, | ||
@@ -15,0 +15,0 @@ "author": "", |
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
17725
554