@gg-web-engine/ammo 0.0.2 → 0.0.3

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.
@@ -22,9 +22,9 @@ export declare enum AmmoDebugMode {
22
22
  MAX_DEBUG_DRAW_MODE = 4294967295
23
23
  }
24
24
  export declare class AmmoDebugger implements Ammo.btIDebugDraw {
25
- private readonly world;
25
+ protected readonly world: Gg3dPhysicsWorld;
26
26
  private readonly drawer;
27
- private debugMode;
27
+ protected debugMode: AmmoDebugMode;
28
28
  constructor(world: Gg3dPhysicsWorld, drawer: GgDebugPhysicsDrawer<Point3, Point4>);
29
29
  readonly ammoInstance: Ammo.btIDebugDraw;
30
30
  draw3dText(location: Ammo.btVector3, textString: string): void;
@@ -1,6 +1,6 @@
1
1
  import { Gg3dTriggerEntity, GgPositionable3dEntity, IGg3dTrigger } from '@gg-web-engine/core';
2
2
  import { Gg3dPhysicsWorld } from '../gg-3d-physics-world';
3
- import { Observable } from 'rxjs';
3
+ import { Observable, Subject } from 'rxjs';
4
4
  import Ammo from 'ammojs-typed';
5
5
  import { BaseAmmoGGBody } from './base-ammo-gg-body';
6
6
  export declare class Gg3dTrigger extends BaseAmmoGGBody<Ammo.btPairCachingGhostObject> implements IGg3dTrigger {
@@ -10,9 +10,9 @@ export declare class Gg3dTrigger extends BaseAmmoGGBody<Ammo.btPairCachingGhostO
10
10
  get onEntityEntered(): Observable<GgPositionable3dEntity>;
11
11
  get onEntityLeft(): Observable<GgPositionable3dEntity | null>;
12
12
  constructor(world: Gg3dPhysicsWorld, _nativeBody: Ammo.btPairCachingGhostObject);
13
- private readonly onEnter$;
14
- private readonly onLeft$;
15
- private readonly overlaps;
13
+ protected readonly onEnter$: Subject<number>;
14
+ protected readonly onLeft$: Subject<number>;
15
+ protected readonly overlaps: Set<Ammo.btCollisionObject>;
16
16
  checkOverlaps(): void;
17
17
  clone(): Gg3dTrigger;
18
18
  addToWorld(world: Gg3dPhysicsWorld): void;
@@ -4,7 +4,7 @@ import { Gg3dPhysicsWorld } from './gg-3d-physics-world';
4
4
  import Ammo from 'ammojs-typed';
5
5
  import { Gg3dTrigger } from './bodies/gg-3d-trigger';
6
6
  export declare class Gg3dBodyFactory implements IGg3dBodyFactory<Gg3dBody, Gg3dTrigger> {
7
- private readonly world;
7
+ protected readonly world: Gg3dPhysicsWorld;
8
8
  constructor(world: Gg3dPhysicsWorld);
9
9
  createRigidBody(descriptor: BodyShape3DDescriptor, transform?: {
10
10
  position?: Point3;
@@ -14,7 +14,7 @@ export declare class Gg3dBodyFactory implements IGg3dBodyFactory<Gg3dBody, Gg3dT
14
14
  position?: Point3;
15
15
  rotation?: Point4;
16
16
  }): Gg3dTrigger;
17
- private createShape;
17
+ protected createShape(descriptor: Shape3DDescriptor): Ammo.btCollisionShape;
18
18
  createRigidBodyFromShape(shape: Ammo.btCollisionShape, options: Partial<Body3DOptions>, transform?: {
19
19
  position?: Point3;
20
20
  rotation?: Point4;
@@ -25,7 +25,7 @@ export declare class Gg3dPhysicsWorld implements IGg3dPhysicsWorld {
25
25
  private broadphase;
26
26
  private solver;
27
27
  private gravityVector;
28
- private _dynamicAmmoWorld;
28
+ protected _dynamicAmmoWorld: Ammo.btDiscreteDynamicsWorld | undefined;
29
29
  init(): Promise<void>;
30
30
  simulate(delta: number): void;
31
31
  startDebugger(world: Gg3dWorld, drawer: GgDebugPhysicsDrawer<Point3, Point4>): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gg-web-engine/ammo",
3
- "version": "0.0.02",
3
+ "version": "0.0.03",
4
4
  "description": "An attempt to create open source game engine for browser",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://github.com/AndyGura/gg-web-engine#readme",
29
29
  "dependencies": {
30
- "@gg-web-engine/core": "^0.0.2",
30
+ "@gg-web-engine/core": "^0.0.3",
31
31
  "ammojs-typed": "^1.0.6",
32
32
  "fs-web": "^1.0.1",
33
33
  "mini-signals": "^1.2.0",