@gg-web-engine/core 0.0.57 → 0.0.58
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.
- package/dist/2d/components/physics/i-physics-world-2d.component.d.ts +1 -1
- package/dist/2d/components/physics/i-rigid-body-2d.component.d.ts +1 -1
- package/dist/2d/components/physics/i-trigger-2d.component.d.ts +3 -3
- package/dist/2d/components/rendering/i-display-object-2d.component.d.ts +1 -1
- package/dist/2d/components/rendering/i-renderer-2d.component.d.ts +1 -1
- package/dist/2d/components/rendering/i-visual-scene-2d.component.d.ts +2 -2
- package/dist/2d/entities/controllers/entity-2d-positioning.animator.d.ts +2 -2
- package/dist/2d/entities/entity-2d.d.ts +7 -7
- package/dist/2d/entities/i-renderable-2d.entity.d.ts +4 -4
- package/dist/2d/entities/renderer-2d.entity.d.ts +1 -1
- package/dist/2d/entities/trigger-2d.entity.d.ts +8 -4
- package/dist/2d/factories.d.ts +7 -7
- package/dist/2d/gg-2d-world.d.ts +34 -6
- package/dist/2d/gg-2d-world.js +23 -19
- package/dist/3d/components/physics/i-physics-world-3d.component.d.ts +5 -5
- package/dist/3d/components/physics/i-raycast-vehicle.component.d.ts +1 -1
- package/dist/3d/components/physics/i-rigid-body-3d.component.d.ts +1 -1
- package/dist/3d/components/physics/i-trigger-3d.component.d.ts +3 -3
- package/dist/3d/components/rendering/i-camera.component.d.ts +1 -1
- package/dist/3d/components/rendering/i-display-object-3d.component.d.ts +1 -1
- package/dist/3d/components/rendering/i-renderer-3d.component.d.ts +2 -2
- package/dist/3d/components/rendering/i-visual-scene-3d.component.d.ts +3 -3
- package/dist/3d/entities/controllers/animators/camera-3d.animator.d.ts +3 -3
- package/dist/3d/entities/controllers/animators/entity-3d-positioning.animator.d.ts +2 -2
- package/dist/3d/entities/entity-3d.d.ts +6 -6
- package/dist/3d/entities/gg-car/gg-car.entity.d.ts +5 -5
- package/dist/3d/entities/i-renderable-3d.entity.d.ts +4 -4
- package/dist/3d/entities/map-graph-3d.entity.d.ts +6 -6
- package/dist/3d/entities/raycast-vehicle-3d.entity.d.ts +3 -3
- package/dist/3d/entities/renderer-3d.entity.d.ts +2 -2
- package/dist/3d/entities/surface-following.entity.d.ts +3 -3
- package/dist/3d/entities/surface-following.entity.js +3 -0
- package/dist/3d/entities/trigger-3d.entity.d.ts +8 -4
- package/dist/3d/factories.d.ts +14 -14
- package/dist/3d/gg-3d-world.d.ts +35 -7
- package/dist/3d/gg-3d-world.js +23 -19
- package/dist/3d/loader.d.ts +12 -12
- package/dist/3d/loader.js +6 -5
- package/dist/3d/loaders.d.ts +4 -4
- package/dist/base/components/i-world-component.d.ts +5 -5
- package/dist/base/components/physics/i-body.component.d.ts +5 -5
- package/dist/base/components/physics/i-physics-world.component.d.ts +13 -5
- package/dist/base/components/physics/i-rigid-body.component.d.ts +2 -2
- package/dist/base/components/physics/i-trigger.component.d.ts +4 -4
- package/dist/base/components/rendering/i-display-object.component.d.ts +6 -6
- package/dist/base/components/rendering/i-renderer.component.d.ts +4 -4
- package/dist/base/components/rendering/i-visual-scene.component.d.ts +2 -2
- package/dist/base/entities/controllers/animation-mixer.d.ts +3 -3
- package/dist/base/entities/i-entity.d.ts +8 -8
- package/dist/base/entities/i-renderable.entity.d.ts +2 -2
- package/dist/base/entities/i-renderer.entity.d.ts +5 -5
- package/dist/base/gg-world.d.ts +29 -5
- package/dist/base/gg-world.js +22 -9
- package/dist/base/index.d.ts +1 -0
- package/dist/base/index.js +1 -0
- package/dist/base/math/numbers.d.ts +2 -1
- package/dist/base/math/numbers.js +7 -1
- package/dist/base/math/point2.d.ts +17 -1
- package/dist/base/math/point2.js +35 -0
- package/dist/base/math/point3.d.ts +2 -0
- package/dist/base/math/point3.js +15 -1
- package/dist/base/models/points.d.ts +20 -16
- package/dist/base/models/raycasting.d.ts +52 -0
- package/dist/base/models/raycasting.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -93,6 +93,9 @@ export class SurfaceFollowingEntity extends IEntity {
|
|
|
93
93
|
* @param world - The game world instance.
|
|
94
94
|
*/
|
|
95
95
|
onSpawned(world) {
|
|
96
|
+
if (!world.physicsWorld) {
|
|
97
|
+
throw new Error('Cannot add surface following entity to the world without physics');
|
|
98
|
+
}
|
|
96
99
|
super.onSpawned(world);
|
|
97
100
|
for (const [collider] of this.colliders.entries()) {
|
|
98
101
|
this.setupCollider(collider);
|
|
@@ -2,12 +2,16 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { ITrigger3dComponent } from '../components/physics/i-trigger-3d.component';
|
|
3
3
|
import { IPositionable3d } from '../interfaces/i-positionable-3d';
|
|
4
4
|
import { IEntity, Point3, Point4, TickOrder } from '../../base';
|
|
5
|
-
import {
|
|
6
|
-
export declare class Trigger3dEntity<
|
|
5
|
+
import { Gg3dWorldTypeDocPPatch, Gg3dWorldTypeDocRepo, PhysicsTypeDocRepo3D } from '../gg-3d-world';
|
|
6
|
+
export declare class Trigger3dEntity<PTypeDoc extends PhysicsTypeDocRepo3D = PhysicsTypeDocRepo3D> extends IEntity<Point3, Point4, Gg3dWorldTypeDocPPatch<PTypeDoc>> implements IPositionable3d {
|
|
7
7
|
readonly objectBody: ITrigger3dComponent;
|
|
8
8
|
readonly tickOrder = TickOrder.OBJECTS_BINDING;
|
|
9
|
-
get onEntityEntered(): Observable<IEntity<Point3, Point4,
|
|
10
|
-
|
|
9
|
+
get onEntityEntered(): Observable<IEntity<Point3, Point4, Gg3dWorldTypeDocRepo & {
|
|
10
|
+
pTypeDoc: PTypeDoc;
|
|
11
|
+
}> & IPositionable3d>;
|
|
12
|
+
get onEntityLeft(): Observable<(IEntity<Point3, Point4, Gg3dWorldTypeDocRepo & {
|
|
13
|
+
pTypeDoc: PTypeDoc;
|
|
14
|
+
}> & IPositionable3d) | null>;
|
|
11
15
|
private _position;
|
|
12
16
|
get position(): Point3;
|
|
13
17
|
set position(value: Point3);
|
package/dist/3d/factories.d.ts
CHANGED
|
@@ -8,32 +8,32 @@ export type DisplayObject3dOpts<Tex> = {
|
|
|
8
8
|
castShadow?: boolean;
|
|
9
9
|
receiveShadow?: boolean;
|
|
10
10
|
};
|
|
11
|
-
export declare abstract class IDisplayObject3dComponentFactory<
|
|
12
|
-
abstract createPrimitive(descriptor: Shape3DMeshDescriptor, material?: DisplayObject3dOpts<
|
|
13
|
-
abstract createPerspectiveCamera(settings
|
|
11
|
+
export declare abstract class IDisplayObject3dComponentFactory<VTypeDoc extends VisualTypeDocRepo3D = VisualTypeDocRepo3D> {
|
|
12
|
+
abstract createPrimitive(descriptor: Shape3DMeshDescriptor, material?: DisplayObject3dOpts<VTypeDoc['texture']>): VTypeDoc['displayObject'];
|
|
13
|
+
abstract createPerspectiveCamera(settings?: {
|
|
14
14
|
fov?: number;
|
|
15
15
|
aspectRatio?: number;
|
|
16
16
|
frustrum?: {
|
|
17
17
|
near: number;
|
|
18
18
|
far: number;
|
|
19
19
|
};
|
|
20
|
-
}):
|
|
20
|
+
}): VTypeDoc['camera'];
|
|
21
21
|
randomColor(): number;
|
|
22
|
-
createPlane(material?: DisplayObject3dOpts<
|
|
23
|
-
createBox(dimensions: Point3, material?: DisplayObject3dOpts<
|
|
24
|
-
createCapsule(radius: number, centersDistance: number, material?: DisplayObject3dOpts<
|
|
25
|
-
createCylinder(radius: number, height: number, material?: DisplayObject3dOpts<
|
|
26
|
-
createCone(radius: number, height: number, material?: DisplayObject3dOpts<
|
|
27
|
-
createSphere(radius: number, material?: DisplayObject3dOpts<
|
|
22
|
+
createPlane(material?: DisplayObject3dOpts<VTypeDoc['texture']>): VTypeDoc['displayObject'];
|
|
23
|
+
createBox(dimensions: Point3, material?: DisplayObject3dOpts<VTypeDoc['texture']>): VTypeDoc['displayObject'];
|
|
24
|
+
createCapsule(radius: number, centersDistance: number, material?: DisplayObject3dOpts<VTypeDoc['texture']>): VTypeDoc['displayObject'];
|
|
25
|
+
createCylinder(radius: number, height: number, material?: DisplayObject3dOpts<VTypeDoc['texture']>): VTypeDoc['displayObject'];
|
|
26
|
+
createCone(radius: number, height: number, material?: DisplayObject3dOpts<VTypeDoc['texture']>): VTypeDoc['displayObject'];
|
|
27
|
+
createSphere(radius: number, material?: DisplayObject3dOpts<VTypeDoc['texture']>): VTypeDoc['displayObject'];
|
|
28
28
|
}
|
|
29
|
-
export interface IPhysicsBody3dComponentFactory<
|
|
29
|
+
export interface IPhysicsBody3dComponentFactory<PTypeDoc extends PhysicsTypeDocRepo3D = PhysicsTypeDocRepo3D> {
|
|
30
30
|
createRigidBody(descriptor: BodyShape3DDescriptor, transform?: {
|
|
31
31
|
position?: Point3;
|
|
32
32
|
rotation?: Point4;
|
|
33
|
-
}):
|
|
33
|
+
}): PTypeDoc['rigidBody'];
|
|
34
34
|
createTrigger(descriptor: Shape3DDescriptor, transform?: {
|
|
35
35
|
position?: Point3;
|
|
36
36
|
rotation?: Point4;
|
|
37
|
-
}):
|
|
38
|
-
createRaycastVehicle(chassis:
|
|
37
|
+
}): PTypeDoc['trigger'];
|
|
38
|
+
createRaycastVehicle(chassis: PTypeDoc['rigidBody']): PTypeDoc['raycastVehicle'];
|
|
39
39
|
}
|
package/dist/3d/gg-3d-world.d.ts
CHANGED
|
@@ -29,13 +29,41 @@ export type PhysicsTypeDocRepo3D = {
|
|
|
29
29
|
trigger: ITrigger3dComponent;
|
|
30
30
|
raycastVehicle: IRaycastVehicleComponent;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
export type Gg3dWorldTypeDocRepo = {
|
|
33
|
+
vTypeDoc: VisualTypeDocRepo3D;
|
|
34
|
+
pTypeDoc: PhysicsTypeDocRepo3D;
|
|
35
|
+
};
|
|
36
|
+
export type Gg3dWorldTypeDocVPatch<VTypeDoc extends VisualTypeDocRepo3D> = Omit<Gg3dWorldTypeDocRepo, 'vTypeDoc'> & {
|
|
37
|
+
vTypeDoc: VTypeDoc;
|
|
38
|
+
};
|
|
39
|
+
export type Gg3dWorldTypeDocPPatch<PTypeDoc extends PhysicsTypeDocRepo3D> = Omit<Gg3dWorldTypeDocRepo, 'pTypeDoc'> & {
|
|
40
|
+
pTypeDoc: PTypeDoc;
|
|
41
|
+
};
|
|
42
|
+
export type Gg3dWorldSceneTypeRepo<TypeDoc extends Gg3dWorldTypeDocRepo = Gg3dWorldTypeDocRepo> = {
|
|
43
|
+
visualScene: IVisualScene3dComponent<TypeDoc['vTypeDoc']> | null;
|
|
44
|
+
physicsWorld: IPhysicsWorld3dComponent<TypeDoc['pTypeDoc']> | null;
|
|
45
|
+
};
|
|
46
|
+
export type Gg3dWorldSceneTypeDocVPatch<VTypeDoc extends VisualTypeDocRepo3D, VS extends IVisualScene3dComponent<VTypeDoc> | null> = Omit<Gg3dWorldSceneTypeRepo, 'visualScene'> & {
|
|
47
|
+
visualScene: VS;
|
|
48
|
+
};
|
|
49
|
+
export type Gg3dWorldSceneTypeDocPPatch<PTypeDoc extends PhysicsTypeDocRepo3D, PW extends IPhysicsWorld3dComponent<PTypeDoc> | null> = Omit<Gg3dWorldSceneTypeRepo, 'physicsWorld'> & {
|
|
50
|
+
physicsWorld: PW;
|
|
51
|
+
};
|
|
52
|
+
export type TypedGg3dWorld<VW extends Gg3dWorld<any> | null, PW extends Gg3dWorld<any> | null> = VW extends Gg3dWorld<infer VTD, infer VSTD> | null ? PW extends Gg3dWorld<infer PTD, infer PSTD> | null ? Gg3dWorld<{
|
|
53
|
+
vTypeDoc: VTD['vTypeDoc'];
|
|
54
|
+
pTypeDoc: PTD['pTypeDoc'];
|
|
55
|
+
}, {
|
|
56
|
+
visualScene: VSTD['visualScene'];
|
|
57
|
+
physicsWorld: PSTD['physicsWorld'];
|
|
58
|
+
}> : never : never;
|
|
59
|
+
export declare class Gg3dWorld<TypeDoc extends Gg3dWorldTypeDocRepo = Gg3dWorldTypeDocRepo, SceneTypeDoc extends Gg3dWorldSceneTypeRepo<TypeDoc> = Gg3dWorldSceneTypeRepo<TypeDoc>> extends GgWorld<Point3, Point4, TypeDoc, SceneTypeDoc> {
|
|
60
|
+
readonly loader: Gg3dLoader<TypeDoc>;
|
|
61
|
+
constructor(args: {
|
|
62
|
+
visualScene?: SceneTypeDoc['visualScene'];
|
|
63
|
+
physicsWorld?: SceneTypeDoc['physicsWorld'];
|
|
64
|
+
});
|
|
65
|
+
addPrimitiveRigidBody(descr: BodyShape3DDescriptor, position?: Point3, rotation?: Point4, material?: DisplayObject3dOpts<TypeDoc['vTypeDoc']['texture']>): Entity3d<TypeDoc>;
|
|
66
|
+
addRenderer(camera: TypeDoc['vTypeDoc']['camera'], canvas?: HTMLCanvasElement, rendererOptions?: Partial<RendererOptions & TypeDoc['vTypeDoc']['rendererExtraOpts']>): Renderer3dEntity<TypeDoc['vTypeDoc']>;
|
|
39
67
|
protected registerConsoleCommands(ggstatic: {
|
|
40
68
|
registerConsoleCommand: (world: GgWorld<any, any> | null, command: string, handler: (...args: string[]) => Promise<string>, doc?: string) => void;
|
|
41
69
|
}): void;
|
package/dist/3d/gg-3d-world.js
CHANGED
|
@@ -12,16 +12,15 @@ import { Gg3dLoader } from './loader';
|
|
|
12
12
|
import { Entity3d } from './entities/entity-3d';
|
|
13
13
|
import { Renderer3dEntity } from './entities/renderer-3d.entity';
|
|
14
14
|
export class Gg3dWorld extends GgWorld {
|
|
15
|
-
constructor(
|
|
16
|
-
super(
|
|
17
|
-
this.visualScene = visualScene;
|
|
18
|
-
this.physicsWorld = physicsWorld;
|
|
15
|
+
constructor(args) {
|
|
16
|
+
super(args);
|
|
19
17
|
this.loader = new Gg3dLoader(this);
|
|
20
18
|
}
|
|
21
19
|
addPrimitiveRigidBody(descr, position = Pnt3.O, rotation = Qtrn.O, material = {}) {
|
|
20
|
+
var _a, _b;
|
|
22
21
|
const entity = new Entity3d({
|
|
23
|
-
object3D: this.visualScene.factory.createPrimitive(descr.shape, material),
|
|
24
|
-
objectBody: this.physicsWorld.factory.createRigidBody(descr),
|
|
22
|
+
object3D: (_a = this.visualScene) === null || _a === void 0 ? void 0 : _a.factory.createPrimitive(descr.shape, material),
|
|
23
|
+
objectBody: (_b = this.physicsWorld) === null || _b === void 0 ? void 0 : _b.factory.createRigidBody(descr),
|
|
25
24
|
});
|
|
26
25
|
entity.position = position;
|
|
27
26
|
entity.rotation = rotation;
|
|
@@ -29,25 +28,30 @@ export class Gg3dWorld extends GgWorld {
|
|
|
29
28
|
return entity;
|
|
30
29
|
}
|
|
31
30
|
addRenderer(camera, canvas, rendererOptions) {
|
|
31
|
+
if (!this.visualScene) {
|
|
32
|
+
throw new Error('Cannot add renderer to the world without visual scene');
|
|
33
|
+
}
|
|
32
34
|
const entity = new Renderer3dEntity(this.visualScene.createRenderer(camera, canvas, rendererOptions));
|
|
33
35
|
this.addEntity(entity);
|
|
34
36
|
return entity;
|
|
35
37
|
}
|
|
36
38
|
registerConsoleCommands(ggstatic) {
|
|
37
39
|
super.registerConsoleCommands(ggstatic);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (args.length > 0) {
|
|
43
|
-
if (isNaN(+args[0]) || isNaN(+args[1]) || isNaN(+args[2])) {
|
|
44
|
-
throw new Error('Wrong arguments');
|
|
40
|
+
if (this.physicsWorld) {
|
|
41
|
+
ggstatic.registerConsoleCommand(this, 'gravity', (...args) => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
if (args.length == 1) {
|
|
43
|
+
args = ['0', '0', '' + -+args[0]]; // mean -Z axis
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
if (args.length > 0) {
|
|
46
|
+
if (isNaN(+args[0]) || isNaN(+args[1]) || isNaN(+args[2])) {
|
|
47
|
+
throw new Error('Wrong arguments');
|
|
48
|
+
}
|
|
49
|
+
this.physicsWorld.gravity = { x: +args[0], y: +args[1], z: +args[2] };
|
|
50
|
+
}
|
|
51
|
+
return JSON.stringify(this.physicsWorld.gravity);
|
|
52
|
+
}), 'args: [ ?float, ?float, ?float ]; Get or set 3D world gravity vector. 1 argument sets ' +
|
|
53
|
+
'vector {x: 0, y: 0, z: -value}, 3 arguments set the whole vector.' +
|
|
54
|
+
' Default value is "9.82" or "0 0 -9.82"');
|
|
55
|
+
}
|
|
52
56
|
}
|
|
53
57
|
}
|
package/dist/3d/loader.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gg3dWorld,
|
|
1
|
+
import { Gg3dWorld, Gg3dWorldTypeDocRepo } from './gg-3d-world';
|
|
2
2
|
import { GgMeta } from './models/gg-meta';
|
|
3
3
|
import { Entity3d } from './entities/entity-3d';
|
|
4
4
|
import { Point3, Point4 } from '../base';
|
|
@@ -14,26 +14,26 @@ export type LoadOptions = {
|
|
|
14
14
|
loadProps: boolean;
|
|
15
15
|
propsPath?: string;
|
|
16
16
|
};
|
|
17
|
-
export type LoadResourcesResult<
|
|
17
|
+
export type LoadResourcesResult<TypeDoc extends Gg3dWorldTypeDocRepo = Gg3dWorldTypeDocRepo> = {
|
|
18
18
|
resources: {
|
|
19
|
-
object3D:
|
|
20
|
-
body:
|
|
19
|
+
object3D: TypeDoc['vTypeDoc']['displayObject'] | null;
|
|
20
|
+
body: TypeDoc['pTypeDoc']['rigidBody'] | null;
|
|
21
21
|
}[];
|
|
22
22
|
meta: GgMeta;
|
|
23
23
|
};
|
|
24
|
-
export type LoadResult<
|
|
25
|
-
entities: Entity3d<
|
|
24
|
+
export type LoadResult<TypeDoc extends Gg3dWorldTypeDocRepo = Gg3dWorldTypeDocRepo> = {
|
|
25
|
+
entities: Entity3d<TypeDoc>[];
|
|
26
26
|
meta: GgMeta;
|
|
27
27
|
};
|
|
28
|
-
export type LoadResultWithProps<
|
|
29
|
-
props?: LoadResult<
|
|
28
|
+
export type LoadResultWithProps<TypeDoc extends Gg3dWorldTypeDocRepo = Gg3dWorldTypeDocRepo> = LoadResult<TypeDoc> & {
|
|
29
|
+
props?: LoadResult<TypeDoc>[];
|
|
30
30
|
};
|
|
31
|
-
export declare class Gg3dLoader<
|
|
31
|
+
export declare class Gg3dLoader<TypeDoc extends Gg3dWorldTypeDocRepo = Gg3dWorldTypeDocRepo> {
|
|
32
32
|
protected readonly world: Gg3dWorld;
|
|
33
33
|
readonly filesCache: Map<string, [ArrayBuffer, GgMeta] | Promise<[ArrayBuffer, GgMeta]>>;
|
|
34
|
-
readonly loadResultCache: Map<string, LoadResourcesResult<
|
|
34
|
+
readonly loadResultCache: Map<string, LoadResourcesResult<TypeDoc> | Promise<LoadResourcesResult<TypeDoc>>>;
|
|
35
35
|
constructor(world: Gg3dWorld);
|
|
36
36
|
loadGgGlbFiles(path: string, useCache?: boolean): Promise<[ArrayBuffer, GgMeta]>;
|
|
37
|
-
loadGgGlbResources(path: string, cachingStrategy?: CachingStrategy): Promise<LoadResourcesResult<
|
|
38
|
-
loadGgGlb(path: string, options?: Partial<LoadOptions>): Promise<LoadResultWithProps<
|
|
37
|
+
loadGgGlbResources(path: string, cachingStrategy?: CachingStrategy): Promise<LoadResourcesResult<TypeDoc>>;
|
|
38
|
+
loadGgGlb(path: string, options?: Partial<LoadOptions>): Promise<LoadResultWithProps<TypeDoc>>;
|
|
39
39
|
}
|
package/dist/3d/loader.js
CHANGED
|
@@ -57,6 +57,7 @@ export class Gg3dLoader {
|
|
|
57
57
|
}
|
|
58
58
|
loadGgGlbResources(path_1) {
|
|
59
59
|
return __awaiter(this, arguments, void 0, function* (path, cachingStrategy = CachingStrategy.Nothing) {
|
|
60
|
+
var _a, _b;
|
|
60
61
|
if (cachingStrategy == CachingStrategy.Entities && this.loadResultCache.has(path)) {
|
|
61
62
|
const cached = this.loadResultCache.get(path);
|
|
62
63
|
const cachedResult = cached instanceof Promise ? yield cached : cached;
|
|
@@ -67,21 +68,21 @@ export class Gg3dLoader {
|
|
|
67
68
|
throw new Error('GLB not found');
|
|
68
69
|
}
|
|
69
70
|
const [object, bodies] = yield Promise.all([
|
|
70
|
-
this.world.visualScene.loader.loadFromGgGlb(glb, meta),
|
|
71
|
-
this.world.physicsWorld.loader.loadFromGgGlb(glb, meta),
|
|
71
|
+
(_a = this.world.visualScene) === null || _a === void 0 ? void 0 : _a.loader.loadFromGgGlb(glb, meta),
|
|
72
|
+
(_b = this.world.physicsWorld) === null || _b === void 0 ? void 0 : _b.loader.loadFromGgGlb(glb, meta),
|
|
72
73
|
]);
|
|
73
74
|
const result = { resources: [], meta };
|
|
74
75
|
if (!object) {
|
|
75
76
|
return result;
|
|
76
77
|
}
|
|
77
|
-
if (bodies.length == 0) {
|
|
78
|
+
if ((bodies === null || bodies === void 0 ? void 0 : bodies.length) == 0) {
|
|
78
79
|
result.resources.push({ object3D: object, body: null });
|
|
79
80
|
}
|
|
80
|
-
else if (bodies.length == 1) {
|
|
81
|
+
else if ((bodies === null || bodies === void 0 ? void 0 : bodies.length) == 1) {
|
|
81
82
|
result.resources.push({ object3D: object, body: bodies[0] });
|
|
82
83
|
}
|
|
83
84
|
else {
|
|
84
|
-
for (const body of bodies) {
|
|
85
|
+
for (const body of bodies || []) {
|
|
85
86
|
result.resources.push({ object3D: object.popChild(body.name), body });
|
|
86
87
|
}
|
|
87
88
|
if (!object.isEmpty()) {
|
package/dist/3d/loaders.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { GgMeta } from './models/gg-meta';
|
|
2
2
|
import { IPhysicsWorld3dComponent } from './components/physics/i-physics-world-3d.component';
|
|
3
3
|
import { PhysicsTypeDocRepo3D, VisualTypeDocRepo3D } from './gg-3d-world';
|
|
4
|
-
export declare abstract class IPhysicsBody3dComponentLoader<
|
|
4
|
+
export declare abstract class IPhysicsBody3dComponentLoader<PTypeDoc extends PhysicsTypeDocRepo3D = PhysicsTypeDocRepo3D> {
|
|
5
5
|
protected readonly world: IPhysicsWorld3dComponent;
|
|
6
6
|
protected constructor(world: IPhysicsWorld3dComponent);
|
|
7
|
-
loadFromGgGlb(glbFile: ArrayBuffer, meta: GgMeta): Promise<
|
|
7
|
+
loadFromGgGlb(glbFile: ArrayBuffer, meta: GgMeta): Promise<PTypeDoc['rigidBody'][]>;
|
|
8
8
|
}
|
|
9
|
-
export interface IDisplayObject3dComponentLoader<
|
|
10
|
-
loadFromGgGlb(glbFile: ArrayBuffer, meta: GgMeta): Promise<
|
|
9
|
+
export interface IDisplayObject3dComponentLoader<VTypeDoc extends VisualTypeDocRepo3D = VisualTypeDocRepo3D> {
|
|
10
|
+
loadFromGgGlb(glbFile: ArrayBuffer, meta: GgMeta): Promise<VTypeDoc['displayObject'] | null>;
|
|
11
11
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IEntity } from '../entities/i-entity';
|
|
2
|
-
import { GgWorld,
|
|
3
|
-
|
|
2
|
+
import { GgWorld, GgWorldTypeDocRepo } from '../gg-world';
|
|
3
|
+
import { IComponent } from './i-component';
|
|
4
|
+
export interface IWorldComponent<D, R, TypeDoc extends GgWorldTypeDocRepo<D, R> = GgWorldTypeDocRepo<D, R>> extends IComponent {
|
|
4
5
|
entity: IEntity | null;
|
|
5
|
-
addToWorld(world: GgWorld<D, R,
|
|
6
|
-
removeFromWorld(world: GgWorld<D, R,
|
|
7
|
-
dispose(): void;
|
|
6
|
+
addToWorld(world: GgWorld<D, R, TypeDoc>): void;
|
|
7
|
+
removeFromWorld(world: GgWorld<D, R, TypeDoc>, dispose?: boolean): void;
|
|
8
8
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IEntity } from '../../entities/i-entity';
|
|
2
2
|
import { IWorldComponent } from '../i-world-component';
|
|
3
|
-
import { GgWorld,
|
|
3
|
+
import { GgWorld, GgWorldTypeDocPPatch, PhysicsTypeDocRepo } from '../../gg-world';
|
|
4
4
|
import { CollisionGroup, DebugBodySettings } from '../../models/body-options';
|
|
5
|
-
export interface IBodyComponent<D, R,
|
|
5
|
+
export interface IBodyComponent<D, R, PTypeDoc extends PhysicsTypeDocRepo<D, R> = PhysicsTypeDocRepo<D, R>> extends IWorldComponent<D, R, GgWorldTypeDocPPatch<D, R, PTypeDoc>> {
|
|
6
6
|
entity: IEntity | null;
|
|
7
7
|
position: D;
|
|
8
8
|
rotation: R;
|
|
@@ -13,7 +13,7 @@ export interface IBodyComponent<D, R, TypeDoc extends PhysicsTypeDocRepo<D, R> =
|
|
|
13
13
|
set interactWithCollisionGroups(value: ReadonlyArray<CollisionGroup> | 'all');
|
|
14
14
|
/** body info for physics debugger view */
|
|
15
15
|
readonly debugBodySettings: DebugBodySettings<any>;
|
|
16
|
-
clone(): IBodyComponent<D, R,
|
|
17
|
-
addToWorld(world: GgWorld<D, R,
|
|
18
|
-
removeFromWorld(world: GgWorld<D, R,
|
|
16
|
+
clone(): IBodyComponent<D, R, PTypeDoc>;
|
|
17
|
+
addToWorld(world: GgWorld<D, R, GgWorldTypeDocPPatch<D, R, PTypeDoc>>): void;
|
|
18
|
+
removeFromWorld(world: GgWorld<D, R, GgWorldTypeDocPPatch<D, R, PTypeDoc>>): void;
|
|
19
19
|
}
|
|
@@ -2,6 +2,7 @@ import { PhysicsTypeDocRepo } from '../../gg-world';
|
|
|
2
2
|
import { IComponent } from '../i-component';
|
|
3
3
|
import { CollisionGroup } from '../../models/body-options';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
|
+
import { RaycastOptions, RaycastResult } from '../../models/raycasting';
|
|
5
6
|
/**
|
|
6
7
|
* Interface representing a physics world component.
|
|
7
8
|
*
|
|
@@ -9,11 +10,11 @@ import { Subject } from 'rxjs';
|
|
|
9
10
|
* @template R - Type representing the physics engine's rigid body.
|
|
10
11
|
* @template TypeDoc - Physics typings repository.
|
|
11
12
|
*/
|
|
12
|
-
export interface IPhysicsWorldComponent<D, R,
|
|
13
|
+
export interface IPhysicsWorldComponent<D, R, PTypeDoc extends PhysicsTypeDocRepo<D, R> = PhysicsTypeDocRepo<D, R>> extends IComponent {
|
|
13
14
|
/**
|
|
14
15
|
* Factory function for creating physics-related objects.
|
|
15
16
|
*/
|
|
16
|
-
readonly factory:
|
|
17
|
+
readonly factory: PTypeDoc['factory'];
|
|
17
18
|
/**
|
|
18
19
|
* The gravity vector affecting the physics world.
|
|
19
20
|
*/
|
|
@@ -21,15 +22,15 @@ export interface IPhysicsWorldComponent<D, R, TypeDoc extends PhysicsTypeDocRepo
|
|
|
21
22
|
/**
|
|
22
23
|
* Event emitter that emits newly added physics components.
|
|
23
24
|
*/
|
|
24
|
-
readonly added$: Subject<
|
|
25
|
+
readonly added$: Subject<PTypeDoc['rigidBody'] | PTypeDoc['trigger'] | any>;
|
|
25
26
|
/**
|
|
26
27
|
* Event emitter that emits just removed physics components.
|
|
27
28
|
*/
|
|
28
|
-
readonly removed$: Subject<
|
|
29
|
+
readonly removed$: Subject<PTypeDoc['rigidBody'] | PTypeDoc['trigger'] | any>;
|
|
29
30
|
/**
|
|
30
31
|
* List of currently added physics components in the world.
|
|
31
32
|
*/
|
|
32
|
-
readonly children: (
|
|
33
|
+
readonly children: (PTypeDoc['rigidBody'] | PTypeDoc['trigger'] | any)[];
|
|
33
34
|
/**
|
|
34
35
|
* The main collision group. All physics bodies have this collision group set by default.
|
|
35
36
|
*/
|
|
@@ -58,4 +59,11 @@ export interface IPhysicsWorldComponent<D, R, TypeDoc extends PhysicsTypeDocRepo
|
|
|
58
59
|
* @param group - The collision group to be removed.
|
|
59
60
|
*/
|
|
60
61
|
deregisterCollisionGroup(group: CollisionGroup): void;
|
|
62
|
+
/**
|
|
63
|
+
* Performs a raycast in the physics world.
|
|
64
|
+
*
|
|
65
|
+
* @param options - The options for the raycast.
|
|
66
|
+
* @returns The result of the raycast.
|
|
67
|
+
*/
|
|
68
|
+
raycast(options: RaycastOptions<D>): RaycastResult<D, PTypeDoc['rigidBody'] | PTypeDoc['trigger']>;
|
|
61
69
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IBodyComponent } from './i-body.component';
|
|
2
2
|
import { PhysicsTypeDocRepo } from '../../gg-world';
|
|
3
|
-
export interface IRigidBodyComponent<D, R,
|
|
3
|
+
export interface IRigidBodyComponent<D, R, PTypeDoc extends PhysicsTypeDocRepo<D, R> = PhysicsTypeDocRepo<D, R>> extends IBodyComponent<D, R, PTypeDoc> {
|
|
4
4
|
linearVelocity: D;
|
|
5
5
|
angularVelocity: R | D;
|
|
6
|
-
clone(): IRigidBodyComponent<D, R,
|
|
6
|
+
clone(): IRigidBodyComponent<D, R, PTypeDoc>;
|
|
7
7
|
/** clear velocities etc. */
|
|
8
8
|
resetMotion(): void;
|
|
9
9
|
}
|
|
@@ -2,9 +2,9 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { IRigidBodyComponent } from './i-rigid-body.component';
|
|
3
3
|
import { IBodyComponent } from './i-body.component';
|
|
4
4
|
import { PhysicsTypeDocRepo } from '../../gg-world';
|
|
5
|
-
export interface ITriggerComponent<D, R,
|
|
6
|
-
get onEntityEntered(): Observable<IRigidBodyComponent<D, R,
|
|
7
|
-
get onEntityLeft(): Observable<IRigidBodyComponent<D, R,
|
|
8
|
-
clone(): ITriggerComponent<D, R,
|
|
5
|
+
export interface ITriggerComponent<D, R, PTypeDoc extends PhysicsTypeDocRepo<D, R> = PhysicsTypeDocRepo<D, R>> extends IBodyComponent<D, R, PTypeDoc> {
|
|
6
|
+
get onEntityEntered(): Observable<IRigidBodyComponent<D, R, PTypeDoc>>;
|
|
7
|
+
get onEntityLeft(): Observable<IRigidBodyComponent<D, R, PTypeDoc> | null>;
|
|
8
|
+
clone(): ITriggerComponent<D, R, PTypeDoc>;
|
|
9
9
|
checkOverlaps(): void;
|
|
10
10
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { GgBox, GgWorld, VisualTypeDocRepo } from '../../../base';
|
|
1
|
+
import { GgBox, GgWorld, GgWorldTypeDocVPatch, VisualTypeDocRepo } from '../../../base';
|
|
2
2
|
import { IWorldComponent } from '../i-world-component';
|
|
3
|
-
export interface IDisplayObjectComponent<D, R,
|
|
3
|
+
export interface IDisplayObjectComponent<D, R, VTypeDoc extends VisualTypeDocRepo<D, R> = VisualTypeDocRepo<D, R>> extends IWorldComponent<D, R, GgWorldTypeDocVPatch<D, R, VTypeDoc>> {
|
|
4
4
|
position: D;
|
|
5
5
|
rotation: R;
|
|
6
6
|
scale: D;
|
|
7
7
|
visible: boolean;
|
|
8
8
|
name: string;
|
|
9
9
|
isEmpty(): boolean;
|
|
10
|
-
popChild(name: string): IDisplayObjectComponent<D, R,
|
|
10
|
+
popChild(name: string): IDisplayObjectComponent<D, R, VTypeDoc> | null;
|
|
11
11
|
getBoundings(): GgBox<D>;
|
|
12
|
-
clone(): IDisplayObjectComponent<D, R,
|
|
13
|
-
addToWorld(world: GgWorld<D, R,
|
|
14
|
-
removeFromWorld(world: GgWorld<D, R,
|
|
12
|
+
clone(): IDisplayObjectComponent<D, R, VTypeDoc>;
|
|
13
|
+
addToWorld(world: GgWorld<D, R, GgWorldTypeDocVPatch<D, R, VTypeDoc>>): void;
|
|
14
|
+
removeFromWorld(world: GgWorld<D, R, GgWorldTypeDocVPatch<D, R, VTypeDoc>>): void;
|
|
15
15
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Point2 } from '../../models/points';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { IWorldComponent } from '../i-world-component';
|
|
4
|
-
import { GgWorld, VisualTypeDocRepo } from '../../gg-world';
|
|
4
|
+
import { GgWorld, GgWorldTypeDocVPatch, VisualTypeDocRepo } from '../../gg-world';
|
|
5
5
|
import { IEntity } from '../../entities/i-entity';
|
|
6
6
|
import { IVisualSceneComponent } from './i-visual-scene.component';
|
|
7
7
|
/**
|
|
@@ -20,7 +20,7 @@ export type RendererOptions = {
|
|
|
20
20
|
forceResolution?: number;
|
|
21
21
|
antialias: boolean;
|
|
22
22
|
};
|
|
23
|
-
export declare abstract class IRendererComponent<D, R, VTypeDoc extends VisualTypeDocRepo<D, R> = VisualTypeDocRepo<D, R>> implements IWorldComponent<D, R, VTypeDoc
|
|
23
|
+
export declare abstract class IRendererComponent<D, R, VTypeDoc extends VisualTypeDocRepo<D, R> = VisualTypeDocRepo<D, R>> implements IWorldComponent<D, R, GgWorldTypeDocVPatch<D, R, VTypeDoc>> {
|
|
24
24
|
readonly scene: IVisualSceneComponent<D, R, VTypeDoc>;
|
|
25
25
|
readonly canvas?: HTMLCanvasElement | undefined;
|
|
26
26
|
entity: IEntity | null;
|
|
@@ -35,8 +35,8 @@ export declare abstract class IRendererComponent<D, R, VTypeDoc extends VisualTy
|
|
|
35
35
|
* Renders the scene.
|
|
36
36
|
*/
|
|
37
37
|
abstract render(): void;
|
|
38
|
-
abstract addToWorld(world: GgWorld<D, R, VTypeDoc
|
|
39
|
-
abstract removeFromWorld(world: GgWorld<D, R, VTypeDoc
|
|
38
|
+
abstract addToWorld(world: GgWorld<D, R, GgWorldTypeDocVPatch<D, R, VTypeDoc>>): void;
|
|
39
|
+
abstract removeFromWorld(world: GgWorld<D, R, GgWorldTypeDocVPatch<D, R, VTypeDoc>>): void;
|
|
40
40
|
/**
|
|
41
41
|
* Resizes the renderer to the specified size.
|
|
42
42
|
* @param {Point2} newSize - The new size of the renderer.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IComponent } from '../i-component';
|
|
2
2
|
import { VisualTypeDocRepo } from '../../gg-world';
|
|
3
|
-
export interface IVisualSceneComponent<D, R,
|
|
4
|
-
readonly factory:
|
|
3
|
+
export interface IVisualSceneComponent<D, R, VTypeDoc extends VisualTypeDocRepo<D, R> = VisualTypeDocRepo<D, R>> extends IComponent {
|
|
4
|
+
readonly factory: VTypeDoc['factory'];
|
|
5
5
|
init(): Promise<void>;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IEntity } from '../i-entity';
|
|
2
2
|
import { Observable, Subject } from 'rxjs';
|
|
3
|
-
import { GgWorld,
|
|
3
|
+
import { GgWorld, GgWorldTypeDocRepo } from '../../gg-world';
|
|
4
4
|
export type AnimationFunction<T> = (elapsed: number, delta: number) => T;
|
|
5
5
|
/**
|
|
6
6
|
* A class that performs property animations for a specific type `T` by using provided animation function.
|
|
@@ -8,7 +8,7 @@ export type AnimationFunction<T> = (elapsed: number, delta: number) => T;
|
|
|
8
8
|
* The current value of the animation can be subscribed to using the `subscribeToValue` property.
|
|
9
9
|
* The animation function can be changed with `transitAnimationFunction` or `transitFromStaticState`.
|
|
10
10
|
*/
|
|
11
|
-
export declare class AnimationMixer<T, D = any, R = any,
|
|
11
|
+
export declare class AnimationMixer<T, D = any, R = any, TypeDoc extends GgWorldTypeDocRepo<D, R> = GgWorldTypeDocRepo<D, R>> extends IEntity<D, R, TypeDoc> {
|
|
12
12
|
protected _animationFunction: AnimationFunction<T>;
|
|
13
13
|
protected _lerp: (a: T, b: T, t: number) => T;
|
|
14
14
|
readonly tickOrder: number;
|
|
@@ -71,6 +71,6 @@ export declare class AnimationMixer<T, D = any, R = any, VTypeDoc extends Visual
|
|
|
71
71
|
* @param easing an easing function for transition
|
|
72
72
|
*/
|
|
73
73
|
transitAnimationFunction(newFunc: AnimationFunction<T>, transitionDuration: number, easing?: (t: number) => number): void;
|
|
74
|
-
onSpawned(world: GgWorld<D, R,
|
|
74
|
+
onSpawned(world: GgWorld<D, R, TypeDoc>): void;
|
|
75
75
|
dispose(): void;
|
|
76
76
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GgWorld,
|
|
1
|
+
import { GgWorld, GgWorldTypeDocRepo } from '../gg-world';
|
|
2
2
|
import { Observable, Subject } from 'rxjs';
|
|
3
3
|
import { IWorldComponent } from '../components/i-world-component';
|
|
4
4
|
/**
|
|
@@ -13,7 +13,7 @@ export declare enum TickOrder {
|
|
|
13
13
|
RENDERING = 1000,
|
|
14
14
|
POST_RENDERING = 1200
|
|
15
15
|
}
|
|
16
|
-
export declare abstract class IEntity<D = any, R = any,
|
|
16
|
+
export declare abstract class IEntity<D = any, R = any, TypeDoc extends GgWorldTypeDocRepo<D, R> = GgWorldTypeDocRepo<D, R>> {
|
|
17
17
|
private static default_name_counter;
|
|
18
18
|
/**
|
|
19
19
|
* will receive [elapsed time, delta] of each world clock tick
|
|
@@ -26,8 +26,8 @@ export declare abstract class IEntity<D = any, R = any, VTypeDoc extends VisualT
|
|
|
26
26
|
/**
|
|
27
27
|
* a world reference, where this entity was added to
|
|
28
28
|
*/
|
|
29
|
-
protected _world: GgWorld<D, R,
|
|
30
|
-
get world(): GgWorld<D, R,
|
|
29
|
+
protected _world: GgWorld<D, R, TypeDoc> | null;
|
|
30
|
+
get world(): GgWorld<D, R, TypeDoc> | null;
|
|
31
31
|
protected _name: string;
|
|
32
32
|
get name(): string;
|
|
33
33
|
set name(value: string);
|
|
@@ -43,14 +43,14 @@ export declare abstract class IEntity<D = any, R = any, VTypeDoc extends VisualT
|
|
|
43
43
|
addChildren(...entities: IEntity[]): void;
|
|
44
44
|
removeChildren(entities: IEntity[], dispose?: boolean): void;
|
|
45
45
|
private _components;
|
|
46
|
-
get components(): IWorldComponent<D, R,
|
|
47
|
-
addComponents(...components: IWorldComponent<D, R,
|
|
48
|
-
removeComponents(components: IWorldComponent<D, R,
|
|
46
|
+
get components(): IWorldComponent<D, R, TypeDoc>[];
|
|
47
|
+
addComponents(...components: IWorldComponent<D, R, TypeDoc>[]): void;
|
|
48
|
+
removeComponents(components: IWorldComponent<D, R, TypeDoc>[], dispose?: boolean): void;
|
|
49
49
|
protected _onSpawned$: Subject<void>;
|
|
50
50
|
protected _onRemoved$: Subject<void>;
|
|
51
51
|
get onSpawned$(): Observable<void>;
|
|
52
52
|
get onRemoved$(): Observable<void>;
|
|
53
|
-
onSpawned(world: GgWorld<D, R,
|
|
53
|
+
onSpawned(world: GgWorld<D, R, TypeDoc>): void;
|
|
54
54
|
onRemoved(): void;
|
|
55
55
|
dispose(): void;
|
|
56
56
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IEntity } from './i-entity';
|
|
2
|
-
import {
|
|
3
|
-
export declare abstract class IRenderableEntity<D = any, R = any, TypeDoc extends
|
|
2
|
+
import { GgWorldTypeDocRepo } from '../gg-world';
|
|
3
|
+
export declare abstract class IRenderableEntity<D = any, R = any, TypeDoc extends GgWorldTypeDocRepo<D, R> = GgWorldTypeDocRepo<D, R>> extends IEntity<D, R, TypeDoc> {
|
|
4
4
|
private _visible;
|
|
5
5
|
get visible(): boolean;
|
|
6
6
|
get worldVisible(): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IEntity, TickOrder } from './i-entity';
|
|
2
|
-
import { GgWorld, VisualTypeDocRepo } from '../gg-world';
|
|
2
|
+
import { GgWorld, GgWorldTypeDocVPatch, VisualTypeDocRepo } from '../gg-world';
|
|
3
3
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
4
4
|
import { Point2 } from '../models/points';
|
|
5
5
|
import { RendererOptions } from '../components/rendering/i-renderer.component';
|
|
@@ -7,8 +7,8 @@ import { RendererOptions } from '../components/rendering/i-renderer.component';
|
|
|
7
7
|
* Represents a base class for a renderer entity.
|
|
8
8
|
* @class
|
|
9
9
|
*/
|
|
10
|
-
export declare abstract class IRendererEntity<D, R,
|
|
11
|
-
readonly renderer:
|
|
10
|
+
export declare abstract class IRendererEntity<D, R, VTypeDoc extends VisualTypeDocRepo<D, R> = VisualTypeDocRepo<D, R>> extends IEntity<D, R, GgWorldTypeDocVPatch<D, R, VTypeDoc>> {
|
|
11
|
+
readonly renderer: VTypeDoc['renderer'];
|
|
12
12
|
readonly tickOrder = TickOrder.RENDERING;
|
|
13
13
|
/** Represents the current size of the renderer. */
|
|
14
14
|
protected _rendererSize$: BehaviorSubject<Point2 | null>;
|
|
@@ -31,7 +31,7 @@ export declare abstract class IRendererEntity<D, R, TypeDoc extends VisualTypeDo
|
|
|
31
31
|
Initializes a new instance of the BaseGgRenderer class.
|
|
32
32
|
* @param renderer
|
|
33
33
|
*/
|
|
34
|
-
constructor(renderer:
|
|
35
|
-
onSpawned(world: GgWorld<D, R,
|
|
34
|
+
constructor(renderer: VTypeDoc['renderer']);
|
|
35
|
+
onSpawned(world: GgWorld<D, R, GgWorldTypeDocVPatch<D, R, VTypeDoc>>): void;
|
|
36
36
|
dispose(): void;
|
|
37
37
|
}
|