@moxijs/core - v0.3.4
    Preparing search index...

    Function asPhysicsEntity

    • Helper function to create a physics-enabled entity

      Type Parameters

      • T extends Container<ContainerChild>

      Parameters

      Returns AsEntity<T>

      const sprite = new PIXI.Sprite(texture);
      const physicsEntity = asPhysicsEntity(sprite, physicsWorld, {
      type: 'dynamic',
      shape: 'circle',
      radius: 25
      });