UNPKG

mylingo3d

Version:

Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor

12 lines (10 loc) 406 B
import PhysicsObjectManager from "../.." import getActualScale from "../../../../utils/getActualScale" import loadCannon from "../loadCannon" export default async function (this: PhysicsObjectManager) { const { Cylinder } = await loadCannon() const { x, y } = getActualScale(this) const radius = x * 0.5 const shape = new Cylinder(radius, radius, y) this.cannonBody!.addShape(shape) }