diff --git a/build/api-types/host/index.d.ts b/build/api-types/host/index.d.ts
index f335d546..8e207738 100644
--- a/build/api-types/host/index.d.ts
+++ b/build/api-types/host/index.d.ts
@@ -1,10 +1,11 @@
- /// Generated using TypeDoc Array with object's children. Note that ids are assigned in chronological order: 1, 2, 3, .
This function is called with the following parameters: renderer, scene, camera, geometry, material, group. This function is called with the following parameters: renderer, scene, camera, geometry, material, group. Object's parent in the scene graph.
Inherited from Scene.up This gets automatically assigned and shouldn't be edited.
The function that gets called when the event is fired.
Inherited from Scene.attach Note: event listeners and user-defined callbacks (
Inherited from Scene.copy Searches through an object and its children, starting with the object itself, and returns the first with a matching id. Unique number of the object instance. Expects a Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object. id Searches through an object and its children, starting with the object itself, and returns the first with a matching name. String to match to the children's Object3D.name property. Note that for most objects the name is an empty string by default Searches through an object and its children, starting with the object itself,
and returns the first with a property that matches the value given. value of the given property. Searches through an object and its children, starting with the object itself,
and returns the first with a property that matches the value given. Value of the given property. The function that gets called when the event is fired. This method does not support objects having non-uniformly-sca
+ Rotates the object to face a point in world space. This method does not support objects having non-uniformly-sca
THREE.Group | Group for info on manually grouping objects. The listener function that gets removed. The axis is assumed to be normalized. The axis is assumed to be normalized Note that this assumes that the upper 3x3 of m is a pure rota
The axis is assumed to be normalized. Note: Modifying the scene graph inside the callback is discou
Note: Modifying the scene graph inside the callback is discou
Descendants of invisible objects are not traversed. Generated using TypeDoc Generated using TypeDoc Generated using TypeDoc Generated using TypeDocClass ArrowKeyInput
Internal
Hierarchy
@@ -56,14 +56,14 @@
Parameters
el: HTMLElement
Returns ArrowKeyInput
+Properties
Private
#privateAccessors
vector
Returns Vector2
Methods
dispose
Returns void
Class BaseScene
@@ -159,14 +159,14 @@
Optional
Returns BaseSceneProperties
Private
#privateanimations
Default Value
[]
background
Default Value
false
children
-Default Value
[]
Optional
customDefault Value
undefined
Optional
customDefault Value
undefined
environment
Default Value
true
Readonly
idRemarks
Readonly
isDefault Value
true
Readonly
isDefault Value
new THREE.Layers()
map
map
matrix
Default Value
new THREE.Matrix4()
matrix
Default Value
matrix
Default Value
new THREE.Matrix4()
matrix
Default Value
matrix
Default Value
false
Readonly
modelDefault Value
new THREE.Matrix4()
name
Default Value
""
Readonly
normalDefault Value
new THREE.Matrix3()
on
scene: camera: Camera
geometry: BufferGeometry
geometry: BufferGeometry<NormalBufferAttributes>
material: Material
group: Group
group: Group<Object3DEventMap>
Returns void
Remarks
Default Value
() => {}
on
scene: camera: Camera
geometry: BufferGeometry
geometry: BufferGeometry<NormalBufferAttributes>
material: Material
group: Group
group: Group<Object3DEventMap>
Returns void
Remarks
Default Value
() => {}
override
Default Value
null
parent
-Default Value
null
Readonly
positionDefault Value
new THREE.Vector3()
- that is (0, 0,
Readonly
quaternionDefault Value
new THREE.Quaternion()
- that is (0,
receive
Default Value
false
render
Default Value
0
Readonly
rotationDefault Value
new THREE.Euler()
- that is (0, 0, 0
Readonly
scaleDefault Value
new THREE.Vector3( 1, 1, 1 )
sunlight
terrain
type
Default Value
-
user
[key: string]: any;
}Default
{}
uuid
Remarks
visible
Default Value
true
Static
DEFAULT_Default Value
true
Static
DEFAULT_Default Value
true
Static
DEFAULT_Default Value
new THREE.Vector3( 0, 1, 0)
Methods
addParameters
+Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]Returns BaseScene
See
add
@@ -762,7 +762,7 @@
add
T extends string
T extends keyof Object3DEventMap
Parameters
@@ -772,7 +772,7 @@
type:
listener: EventListener<Event, T, BaseScene>
+listener: EventListener<Object3DEventMap[T], T, BaseScene>
Returns void
+
Type Parameters
+
+
T extends string
Parameters
+
+
type: T
listener: EventListener<{}, T, BaseScene>
Returns void
apply
@@ -798,7 +816,7 @@
Returns void
apply
attach
@@ -828,7 +846,7 @@
attachParameters
object: Object3D<Event>
+object: Object3D<Object3DEventMap>
Returns BaseScene
See
-
+clear
clone
copy
@@ -895,7 +913,7 @@
Remarks
-
create
@@ -903,19 +921,24 @@
create
Returns void
dispatch
dispose
@@ -931,11 +954,11 @@
dispose
Returns void
get
-
-id:
Integer
Returns undefined | Object3D<Event>
+Returns undefined | Object3D<Object3DEventMap>
Remarks
See
get
-
-name:
Returns undefined | Object3D<Event>
+Returns undefined | Object3D<Object3DEventMap>
Remarks
get
-
-value:
Returns undefined | Object3D<Event>
+Returns undefined | Object3D<Object3DEventMap>
get
-
-value:
Returns Object3D<Event>[]
+Returns Object3D<Object3DEventMap>[]
get
@@ -1049,7 +1072,7 @@
Returns Vector3<
get
@@ -1069,7 +1092,7 @@
Returns Vector3<
get
@@ -1089,7 +1112,7 @@
Returns Quaterni
get
@@ -1109,7 +1132,7 @@
Returns Vector3<
has
@@ -1121,7 +1144,7 @@
has
T extends string
T extends keyof Object3DEventMap
Parameters
@@ -1131,7 +1154,7 @@
type:
listener: EventListener<Event, T, BaseScene>
+listener: EventListener<Object3DEventMap[T], T, BaseScene>
Returns boolean
+
Type Parameters
+
+
T extends string
Parameters
+
+
type: T
listener: EventListener<{}, T, BaseScene>
Returns boolean
local
@@ -1159,7 +1200,7 @@
Returns Vector3<
look
@@ -1181,7 +1222,7 @@
Remarks
Remarks
raycast
@@ -1225,7 +1266,7 @@
Parameters
raycaster: Raycaster
intersects: Intersection<Object3D<Event>>[]
+intersects: Intersection<Object3D<Object3DEventMap>>[]
Returns void
Default Value
() => {}
remove
@@ -1249,7 +1290,7 @@
removeParameters
+Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]Returns BaseScene
See
remove
@@ -1271,7 +1312,7 @@
remove
T extends string
T extends keyof Object3DEventMap
Parameters
@@ -1281,7 +1322,7 @@
type:
listener: EventListener<Event, T, BaseScene>
+listener: EventListener<Object3DEventMap[T], T, BaseScene>
Returns void
+
Type Parameters
+
+
T extends string
Parameters
+
+
type: T
listener: EventListener<{}, T, BaseScene>
Returns void
remove
rotate
@@ -1328,7 +1387,7 @@
Remarks
rotate
@@ -1355,7 +1414,7 @@
Remarks
rotateX
rotateY
rotateZ
set
@@ -1419,7 +1478,7 @@
Parameters
color: number
Returns void
set
@@ -1444,7 +1503,7 @@
Returns void
set
@@ -1464,7 +1523,7 @@
Returns void
set
@@ -1486,7 +1545,7 @@
Remarks
set
@@ -1506,7 +1565,7 @@
Returns void
toJSON
@@ -1553,7 +1612,7 @@
Remarks
translateX
translateY
translateZ
traverse
@@ -1638,7 +1697,7 @@
callback: Parameters
+object: Object3D<Event>
object: Object3D<Object3DEventMap>
Returns any
Returns void
Remarks
traverse
@@ -1671,7 +1730,7 @@
callback: Parameters
+object: Object3D<Event>
object: Object3D<Object3DEventMap>
Returns any
Returns void
Remarks
traverse
@@ -1704,7 +1763,7 @@
callback: Parameters
+object: Object3D<Event>
object: Object3D<Object3DEventMap>
Returns any
Returns void
Remarks
update
@@ -1724,7 +1783,7 @@
Returns void
update
@@ -1746,7 +1805,7 @@
Returns void
update
@@ -1771,7 +1830,7 @@
Returns void
world
@@ -1791,7 +1850,7 @@
Returns Vector3<
Class CameraShake
Internal
Hierarchy
@@ -69,34 +69,34 @@
Optional
Optional strength: numberReturns CameraShake
+Properties
Private
#private_duration
_start
_strength
max
Accessors
enabled
Returns boolean
+Parameters
val: boolean
Returns void
Methods
frequency: strength: number
Returns void
+_update
@@ -154,7 +154,7 @@
component: elapsed: number
Returns undefined | number
restore
@@ -167,7 +167,7 @@
Parameters
camera: Camera
Returns void
set
@@ -186,7 +186,7 @@
frequency: strength: number
Returns void
shake
@@ -205,7 +205,7 @@
frequency: strength: Vector3
Returns void
update
@@ -220,7 +220,7 @@
elapsed: camera: Camera
Returns void
Class CommandsStream
Internal
Hierarchy
-
-
-
-Constructors
-constructor
-
-
Parameters
-
-
Optional
buffer: BufferOptional
stormPlayerToGamePlayer: number[]Returns CommandsStream
Properties
-
-Private
#privateMethods
-generate
-
-
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags: number[];
unitTypeId?: undefined;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags: number[];
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group: number;
hotkeyType: number;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group: number;
hotkeyType: number;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group: number;
hotkeyType: number;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group: number;
hotkeyType: number;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group: number;
hotkeyType: number;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId: number;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId: number;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags: number[];
unitTypeId: number;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId: number;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId: number;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message: string;
order?: undefined;
player: number;
queued: number;
senderSlot: number;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message: string;
order?: undefined;
player: number;
queued?: undefined;
senderSlot: number;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message: string;
order: number;
player: number;
queued: number;
senderSlot: number;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message: string;
order?: undefined;
player: number;
queued?: undefined;
senderSlot: number;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message: string;
order?: undefined;
player: number;
queued?: undefined;
senderSlot: number;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk: number;
value: number;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value: number;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value: number;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value: number;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value: number;
x?: undefined;
y?: undefined;
} | {
alliedVictory: boolean;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds: number[];
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory: boolean;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory: boolean;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory: boolean;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory: boolean;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds: number[];
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
}, void, unknown>Returns Generator<number | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags: number[];
unitTypeId?: undefined;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags: number[];
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group: number;
hotkeyType: number;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group: number;
hotkeyType: number;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group: number;
hotkeyType: number;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group: number;
hotkeyType: number;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group: number;
hotkeyType: number;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId: number;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId: number;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags: number[];
unitTypeId: number;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId: number;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId: number;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message: string;
order?: undefined;
player: number;
queued: number;
senderSlot: number;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message: string;
order?: undefined;
player: number;
queued?: undefined;
senderSlot: number;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message: string;
order: number;
player: number;
queued: number;
senderSlot: number;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message: string;
order?: undefined;
player: number;
queued?: undefined;
senderSlot: number;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message: string;
order?: undefined;
player: number;
queued?: undefined;
senderSlot: number;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk: number;
value: number;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value: number;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value: number;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value: number;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value: number;
x?: undefined;
y?: undefined;
} | {
alliedVictory: boolean;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds: number[];
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory: boolean;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory: boolean;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory: boolean;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory: boolean;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued: number;
senderSlot?: undefined;
slotIds: number[];
unit: number;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag?: undefined;
unitTags: number[];
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order: number;
player: number;
queued: number;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId: number;
unk: number;
value?: undefined;
x: number;
y: number;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag: number;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds: number[];
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
} | {
alliedVictory?: undefined;
data: Buffer;
frame: number;
group?: undefined;
hotkeyType?: undefined;
id: number;
isUnknown: boolean;
message?: undefined;
order?: undefined;
player: number;
queued?: undefined;
senderSlot?: undefined;
slotIds?: undefined;
unit?: undefined;
unitTag?: undefined;
unitTags?: undefined;
unitTypeId?: undefined;
unk?: undefined;
value?: undefined;
x?: undefined;
y?: undefined;
}, void, unknown>Class Creep
Internal
Hierarchy
@@ -66,44 +66,44 @@
creepValuesTexture: creepEdgesValuesTexture: Texture
Returns Creep
+Properties
Private
#privatecreep
creep
map
map
minimap
worker
Methods
dispose
Returns void
generate
@@ -128,7 +128,7 @@
tiles: frame: number
Returns void
+generate
@@ -141,7 +141,7 @@
Parameters
tiles: SimpleBufferView<Uint8Array>
Returns void
Class FlingyBufferView
Internal
Implements
Accessors
Accessors
Methods
-Constructors
@@ -83,7 +84,7 @@ bw: Returns FlingyBufferView
Properties
Protected_addr32: number
Protected
_addr8Protected
_address_bw
-Protected
Optional
_spriteAccessors
addressReturns number
current
+
+
Returns number
current
+
+
Returns number
direction
@@ -135,7 +148,7 @@
directionReturns number
hp
@@ -145,7 +158,7 @@
Returns numberImplementation of FlingyStruct.hp
Inherited from ThingyBufferView.hp
Internal
spriteInherited from ThingyBufferView.spriteIndex
Generated using TypeDoc
Internal
Private
#privateGenerated using TypeDoc
Internal
Readonly
Readonly
definesReadonly
Readonly
extensionsReadonly
Protected
rendererProtectedDeprecated
Readonly
uniformsReadonly
Protected
Experimental
Protected
Experimental
The function that gets called when the event is fired.
Use blendMode instead.
Use defines instead.
Use extensions instead.
Use name instead.
Use uniforms instead.
The function that gets called when the event is fired.
if
The listener function that gets removed.
Protected
setProtected
setProtected
setProtected
setA frame buffer that contains the result of the previous pass.
Generated using TypeDoc
Internal
Private
Private
#privateOptional
ctxGenerated using TypeDoc
Optional
enabled: booleanOverrides Sizeable.constructor
Private
#privateInherited from Sizeable.#private
+Private
#privateInherited from Sizeable.#private
Protected
surfaceInherited from Sizeable.aspect
Inherited from Sizeable.aspect
Inherited from Sizeable.bottom
Inherited from Sizeable.bottom
Inherited from Sizeable.center
Inherited from Sizeable.center
+Inherited from Sizeable.height
Inherited from Sizeable.height
Inherited from Sizeable.left
Inherited from Sizeable.left
Inherited from Sizeable.right
Inherited from Sizeable.right
Inherited from Sizeable.top
Inherited from Sizeable.top
Inherited from Sizeable.width
Inherited from Sizeable.width
Inherited from Sizeable.fullScreen
+Optional
firstRun: booleanInherited from Sizeable.getActualSize
Generated using TypeDoc
Internal
Private
#privatePrivate
Generated using TypeDoc
Internal
Overrides Object3D.constructor
Private
#privateImplementation of ImageBase._zOff
[]
Implementation of ImageBase.animations
Inherited from Object3D.animations
Implementation of ImageBase.atlas
false
Implementation of ImageBase.castShadow
Inherited from Object3D.castShadow
Array with object's children.
[]
Implementation of ImageBase.children
Inherited from Object3D.children
Optional
customundefined
Implementation of ImageBase.customDepthMaterial
Inherited from Object3D.customDepthMaterial
Optional
customundefined
Implementation of ImageBase.customDistanceMaterial
Inherited from Object3D.customDistanceMaterial
true
Implementation of ImageBase.frustumCulled
Inherited from Object3D.frustumCulled
Readonly
idNote that ids are assigned in chronological order: 1, 2, 3, .
Implementation of ImageBase.id
Inherited from Object3D.id
Readonly
image3dImplementation of ImageBase.isImage3d
Implementation of ImageBase.isImageHd
Implementation of ImageBase.isInstanced
Readonly
istrue
Implementation of ImageBase.isObject3D
Inherited from Object3D.isObject3D
new THREE.Layers()
Implementation of ImageBase.layers
Inherited from Object3D.layers
new THREE.Matrix4()
Implementation of ImageBase.matrix
Inherited from Object3D.matrix
Implementation of ImageBase.matrixAutoUpdate
Inherited from Object3D.matrixAutoUpdate
new THREE.Matrix4()
Implementation of ImageBase.matrixWorld
Inherited from Object3D.matrixWorld
Implementation of ImageBase.matrixWorldAutoUpdate
Inherited from Object3D.matrixWorldAutoUpdate
false
Implementation of ImageBase.matrixWorldNeedsUpdate
Inherited from Object3D.matrixWorldNeedsUpdate
Optional
mixerReadonly
modelnew THREE.Matrix4()
Implementation of ImageBase.modelViewMatrix
Inherited from Object3D.modelViewMatrix
""
Implementation of ImageBase.name
Inherited from Object3D.name
Readonly
normalnew THREE.Matrix3()
Implementation of ImageBase.normalMatrix
Inherited from Object3D.normalMatrix
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
@@ -483,7 +483,7 @@() => {}
Implementation of ImageBase.onAfterRender
Inherited from Object3D.onAfterRender
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
@@ -520,10 +520,10 @@() => {}
Implementation of ImageBase.onBeforeRender
Inherited from Object3D.onBeforeRender
Object's parent in the scene graph.
null
Implementation of ImageBase.parent
Inherited from Object3D.parent
Readonly
positionImplementation of ImageBase.position Inherited from Object3D.positionnew THREE.Vector3()
- that is (0, 0,
-
Readonly
quaternionImplementation of ImageBase.quaternion Inherited from Object3D.quaternionnew THREE.Quaternion()
- that is (0,
-
false
Implementation of ImageBase.receiveShadow
Inherited from Object3D.receiveShadow
0
Implementation of ImageBase.renderOrder
Inherited from Object3D.renderOrder
Readonly
rotationImplementation of ImageBase.rotation Inherited from Object3D.rotationnew THREE.Euler()
- that is (0, 0, 0
-
Readonly
scalenew THREE.Vector3( 1, 1, 1 )
Implementation of ImageBase.scale
Inherited from Object3D.scale
Readonly
typeObject3D
Implementation of ImageBase.type
Inherited from Object3D.type
Inherited from Object3D.up
{}
Implementation of ImageBase.userData
Inherited from Object3D.userData
This gets automatically assigned and shouldn't be edited.
Implementation of ImageBase.uuid
Inherited from Object3D.uuid
true
Implementation of ImageBase.visible
Inherited from Object3D.visible
Static
DEFAULT_true
Inherited from Object3D.DEFAULT_MATRIX_AUTO_UPDATE
Static
DEFAULT_true
Inherited from Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE
Static
DEFAULT_new THREE.Vector3( 0, 1, 0)
Inherited from Object3D.DEFAULT_UP
Implementation of ImageBase.dat
Implementation of ImageBase.frame
Implementation of ImageBase.unitTileScale
Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]Implementation of ImageBase.add
Inherited from Object3D.add
The function that gets called when the event is fired.
Inherited from Object3D.addEventListener
Implementation of ImageBase.addEventListener
+Inherited from Object3D.addEventListener
+Inherited from Object3D.applyMatrix4
Inherited from Object3D.applyQuaternion
Inherited from Object3D.attach
Fire an event type.
The event that gets fired.
Inherited from Object3D.dispatchEvent
Searches through an object and its children, starting with the object itself, and returns the first with a matching id.
Unique number of the object instance. Expects a Integer
Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.
@@ -991,11 +1015,11 @@id
Implementation of ImageBase.getObjectById
Inherited from Object3D.getObjectById
Searches through an object and its children, starting with the object itself, and returns the first with a matching name.
String to match to the children's Object3D.name property.
Note that for most objects the name is an empty string by default
Implementation of ImageBase.getObjectByName
Inherited from Object3D.getObjectByName
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
@@ -1036,16 +1060,16 @@value of the given property.
Implementation of ImageBase.getObjectByProperty
Inherited from Object3D.getObjectByProperty
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
@@ -1063,12 +1087,12 @@Value of the given property.
Implementation of ImageBase.getObjectsByProperty
Inherited from Object3D.getObjectsByProperty
Implementation of ImageBase.getWorldDirection
Inherited from Object3D.getWorldDirection
Implementation of ImageBase.getWorldPosition
Inherited from Object3D.getWorldPosition
Implementation of ImageBase.getWorldQuaternion
Inherited from Object3D.getWorldQuaternion
Implementation of ImageBase.getWorldScale
Inherited from Object3D.getWorldScale
The function that gets called when the event is fired.
Implementation of ImageBase.hasEventListener
Inherited from Object3D.hasEventListener
Implementation of ImageBase.hasEventListener
+Inherited from Object3D.hasEventListener
+Implementation of ImageBase.localToWorld
Inherited from Object3D.localToWorld
This method does not support objects having non-uniformly-sca
Implementation of ImageBase.lookAt
Inherited from Object3D.lookAt
Rotates the object to face a point in world space.
@@ -1257,7 +1300,7 @@This method does not support objects having non-uniformly-sca
Implementation of ImageBase.lookAt
Inherited from Object3D.lookAt
() => {}
Implementation of ImageBase.raycast
Inherited from Object3D.raycast
Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]THREE.Group | Group for info on manually grouping objects.
Implementation of ImageBase.remove
Inherited from Object3D.remove
The listener function that gets removed.
Inherited from Object3D.removeEventListener
Implementation of ImageBase.removeEventListener
+Inherited from Object3D.removeEventListener
+Inherited from Object3D.removeFromParent
The axis is assumed to be normalized.
Implementation of ImageBase.rotateOnAxis
Inherited from Object3D.rotateOnAxis
The axis is assumed to be normalized
Implementation of ImageBase.rotateOnWorldAxis
Inherited from Object3D.rotateOnWorldAxis
Inherited from Object3D.rotateX
Inherited from Object3D.rotateY
Inherited from Object3D.rotateZ
Implementation of ImageBase.setEmissive
Implementation of ImageBase.setFrame
Implementation of ImageBase.setModifiers
Inherited from Object3D.setRotationFromAxisAngle
Inherited from Object3D.setRotationFromEuler
Note that this assumes that the upper 3x3 of m is a pure rota
Implementation of ImageBase.setRotationFromMatrix
Inherited from Object3D.setRotationFromMatrix
Inherited from Object3D.setRotationFromQuaternion
Optional
val: ColorOptional
val: anyImplementation of ImageBase.setTeamColor
Inherited from Object3D.toJSON
The axis is assumed to be normalized.
Implementation of ImageBase.translateOnAxis
Inherited from Object3D.translateOnAxis
Inherited from Object3D.translateX
Inherited from Object3D.translateY
Inherited from Object3D.translateZ
Note: Modifying the scene graph inside the callback is discou
Implementation of ImageBase.traverse
Inherited from Object3D.traverse
Note: Modifying the scene graph inside the callback is discou
Implementation of ImageBase.traverseAncestors
Inherited from Object3D.traverseAncestors
Descendants of invisible objects are not traversed.
Implementation of ImageBase.traverseVisible
Inherited from Object3D.traverseVisible
Implementation of ImageBase.updateImageType
Inherited from Object3D.updateMatrix
Inherited from Object3D.updateMatrixWorld
Inherited from Object3D.updateWorldMatrix
Implementation of ImageBase.worldToLocal
Inherited from Object3D.worldToLocal
Static
cloneGenerated using TypeDoc
Internal
Optional
Returns Image3DMaterialOverrides MeshStandardMaterial.constructor
Private
#privateInherited from MeshStandardMaterial.alphaHash
+null
Inherited from MeshStandardMaterial.alphaMap
0
Inherited from MeshStandardMaterial.alphaTest
false
Inherited from MeshStandardMaterial.alphaToCoverage
null
Inherited from MeshStandardMaterial.aoMap
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:85
1
Inherited from MeshStandardMaterial.aoMapIntensity
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:90
THREE
Inherited from MeshStandardMaterial.blendDst
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:84
null
Inherited from MeshStandardMaterial.blendDstAlpha
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:90
THREE
Inherited from MeshStandardMaterial.blendEquation
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:96
null
Inherited from MeshStandardMaterial.blendEquationAlpha
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:102
THREE
Inherited from MeshStandardMaterial.blendSrc
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:114
null
Inherited from MeshStandardMaterial.blendSrcAlpha
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:120
THREE
Inherited from MeshStandardMaterial.blending
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:108
null
Inherited from MeshStandardMaterial.bumpMap
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:110
1
Inherited from MeshStandardMaterial.bumpScale
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:115
false
Inherited from MeshStandardMaterial.clipIntersection
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:126
false
Inherited from MeshStandardMaterial.clipShadows
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:141
User-defined clipping planes specified as THREE.Plane objects in world space. These planes apply to the objects this material is attached to. Points in space whose signed distance to the plane is negative are clipped (not rendered). @@ -356,7 +363,7 @@
null
Inherited from MeshStandardMaterial.clippingPlanes
new
Inherited from MeshStandardMaterial.color
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:55
true
Inherited from MeshStandardMaterial.colorWrite
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:147
{
Inherited from MeshStandardMaterial.defines
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:50
THREE
Inherited from MeshStandardMaterial.depthFunc
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:160
true
Inherited from MeshStandardMaterial.depthTest
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:166
true
Inherited from MeshStandardMaterial.depthWrite
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:173
0
Inherited from MeshStandardMaterial.displacementBias
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:145
null
Inherited from MeshStandardMaterial.displacementMap
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:135
1
Inherited from MeshStandardMaterial.displacementScale
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:140
false
Inherited from MeshStandardMaterial.dithering
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:296
new
Inherited from MeshStandardMaterial.emissive
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:95
1
Inherited from MeshStandardMaterial.emissiveIntensity
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:100
null
Inherited from MeshStandardMaterial.emissiveMap
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:105
null
Inherited from MeshStandardMaterial.envMap
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:165
1
Inherited from MeshStandardMaterial.envMapIntensity
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:170
false
Inherited from MeshStandardMaterial.flatShading
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:196
fog
Inherited from MeshStandardMaterial.fog
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:202
false
Inherited from MeshStandardMaterial.forceSinglePass
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:290
Inherited from MeshStandardMaterial.id
Readonly
isReadonly
Inherited from MeshStandardMaterial.isMaterial
Inherited from MeshStandardMaterial.isMeshStandardMaterial
null
Inherited from MeshStandardMaterial.lightMap
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:75
1
Inherited from MeshStandardMaterial.lightMapIntensity
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:80
null
Inherited from MeshStandardMaterial.map
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:70
0
Inherited from MeshStandardMaterial.metalness
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:65
null
Inherited from MeshStandardMaterial.metalnessMap
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:155
''
Inherited from MeshStandardMaterial.name
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:242
false
Inherited from MeshStandardMaterial.needsUpdate
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:249
null
Inherited from MeshStandardMaterial.normalMap
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:120
THREE
Inherited from MeshStandardMaterial.normalMapType
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:125
new
Inherited from MeshStandardMaterial.normalScale
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:130
1
Inherited from MeshStandardMaterial.opacity
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:255
false
Inherited from MeshStandardMaterial.polygonOffset
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:261
0
Inherited from MeshStandardMaterial.polygonOffsetFactor
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:267
0
Inherited from MeshStandardMaterial.polygonOffsetUnits
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:273
null
Inherited from MeshStandardMaterial.precision
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:279
false
Inherited from MeshStandardMaterial.premultipliedAlpha
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:285
1
Inherited from MeshStandardMaterial.roughness
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:60
null
Inherited from MeshStandardMaterial.roughnessMap
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:150
null
Inherited from MeshStandardMaterial.shadowSide
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:311
{@
Inherited from MeshStandardMaterial.side
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:304
THREE
Inherited from MeshStandardMaterial.stencilFail
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:214
THREE
Inherited from MeshStandardMaterial.stencilFunc
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:190
0xff
Inherited from MeshStandardMaterial.stencilFuncMask
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:208
0
Inherited from MeshStandardMaterial.stencilRef
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:196
false
Inherited from MeshStandardMaterial.stencilWrite
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:184
0xff
Inherited from MeshStandardMaterial.stencilWriteMask
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:202
THREE
Inherited from MeshStandardMaterial.stencilZFail
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:222
THREE
Inherited from MeshStandardMaterial.stencilZPass
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:230
true
Inherited from MeshStandardMaterial.toneMapped
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:318
false
Inherited from MeshStandardMaterial.transparent
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:326
'MeshStand
Inherited from MeshStandardMaterial.type
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:45
{}
Inherited from MeshStandardMaterial.userData
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:355
Inherited from MeshStandardMaterial.uuid
0
Inherited from MeshStandardMaterial.version
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:361
false
Inherited from MeshStandardMaterial.vertexColors
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:343
true
Inherited from MeshStandardMaterial.visible
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:349
false
Inherited from MeshStandardMaterial.wireframe
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:175
'round'
Inherited from MeshStandardMaterial.wireframeLinecap
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:185
'round'
Inherited from MeshStandardMaterial.wireframeLinejoin
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:190
1
Inherited from MeshStandardMaterial.wireframeLinewidth
-- Defined in node_modules/@types/three/src/materials/MeshStandardMaterial.d.ts:180
The function that gets called when the event is fired.
Inherited from MeshStandardMaterial.addEventListener
Inherited from MeshStandardMaterial.addEventListener
+Inherited from MeshStandardMaterial.clone
Inherited from MeshStandardMaterial.copy
Overrides MeshStandardMaterial.customProgramCacheKey
Fire an event type.
The event that gets fired.
Inherited from MeshStandardMaterial.dispatchEvent
Inherited from MeshStandardMaterial.dispose
The function that gets called when the event is fired.
Inherited from MeshStandardMaterial.hasEventListener
Inherited from MeshStandardMaterial.hasEventListener
+Overrides MeshStandardMaterial.onBeforeCompile
The listener function that gets removed.
Inherited from MeshStandardMaterial.removeEventListener
Inherited from MeshStandardMaterial.removeEventListener
+Inherited from MeshStandardMaterial.setValues
Inherited from MeshStandardMaterial.toJSON
Generated using TypeDoc
Internal
Private
#privateImplementation of ImageStruct.flags
Implementation of ImageStruct.frameIndex
Implementation of ImageStruct.frameIndexBase
Implementation of ImageStruct.frameIndexOffset
Implementation of ImageStruct.index
Implementation of ImageStruct.modifier
Implementation of ImageStruct.modifierData1
Implementation of ImageStruct.modifierData2
Implementation of ImageStruct.typeId
Implementation of ImageStruct.x
Implementation of ImageStruct.y
Generated using TypeDoc
Internal
Private
#privateOptional
onOptional
onGenerated using TypeDoc
Internal
Overrides Mesh<BufferGeometry, ImageHDMaterial | ImageHDInstancedMaterial>.constructor
Private
#privateImplementation of ImageBase._zOff
[]
Implementation of ImageBase.animations
Inherited from Mesh.animations
Optional
atlasImplementation of ImageBase.atlas
false
Implementation of ImageBase.castShadow
Inherited from Mesh.castShadow
Array with object's children.
[]
Implementation of ImageBase.children
Inherited from Mesh.children
Optional
customundefined
Implementation of ImageBase.customDepthMaterial
Inherited from Mesh.customDepthMaterial
Optional
customundefined
Implementation of ImageBase.customDistanceMaterial
Inherited from Mesh.customDistanceMaterial
true
Implementation of ImageBase.frustumCulled
Inherited from Mesh.frustumCulled
An instance of THREE.BufferGeometry | BufferGeometry (or derived classes), defining the object's structure.
{@
Inherited from Mesh.geometry
-- Defined in node_modules/@types/three/src/objects/Mesh.d.ts:52
+Defined in node_modules/@types/three/src/objects/Mesh.d.ts:51
Readonly
id
id: number
@@ -323,25 +323,25 @@ Remarks
Note that ids are assigned in chronological order: 1, 2, 3, .
Implementation of ImageBase.id
Inherited from Mesh.id
-- Defined in node_modules/@types/three/src/core/Object3D.d.ts:42
+Defined in node_modules/@types/three/src/core/Object3D.d.ts:47
is Image3d
is Image3d: boolean
Implementation of ImageBase.isImage3d
-- Defined in build/api-types/host/index.d.ts:2872
+Defined in build/api-types/host/index.d.ts:1317
is Image Hd
is Image Hd: boolean
Implementation of ImageBase.isImageHd
-- Defined in build/api-types/host/index.d.ts:2871
+Defined in build/api-types/host/index.d.ts:1316
is Instanced
is Instanced: boolean
Implementation of ImageBase.isInstanced
-- Defined in build/api-types/host/index.d.ts:2873
+Defined in build/api-types/host/index.d.ts:1318
Readonly
is Mesh
is Mesh: true
@@ -354,7 +354,7 @@ Default Value
true
Inherited from Mesh.isMesh
Readonly
istrue
Implementation of ImageBase.isObject3D
Inherited from Mesh.isObject3D
new THREE.Layers()
Implementation of ImageBase.layers
Inherited from Mesh.layers
{@
Inherited from Mesh.material
-- Defined in node_modules/@types/three/src/objects/Mesh.d.ts:58
new THREE.Matrix4()
Implementation of ImageBase.matrix
Inherited from Mesh.matrix
Implementation of ImageBase.matrixAutoUpdate
Inherited from Mesh.matrixAutoUpdate
new THREE.Matrix4()
Implementation of ImageBase.matrixWorld
Inherited from Mesh.matrixWorld
Implementation of ImageBase.matrixWorldAutoUpdate
Inherited from Mesh.matrixWorldAutoUpdate
false
Implementation of ImageBase.matrixWorldNeedsUpdate
Inherited from Mesh.matrixWorldNeedsUpdate
Readonly
modelnew THREE.Matrix4()
Implementation of ImageBase.modelViewMatrix
Inherited from Mesh.modelViewMatrix
Optional
morphInherited from Mesh.morphTargetDictionaryundefined
, but rebuilt by
-
Optional
morphundefined
, but reset to a blank array
Inherited from Mesh.morphTargetInfluences
""
Implementation of ImageBase.name
Inherited from Mesh.name
Readonly
normalnew THREE.Matrix3()
Implementation of ImageBase.normalMatrix
Inherited from Mesh.normalMatrix
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
@@ -556,7 +556,7 @@() => {}
Implementation of ImageBase.onAfterRender
Inherited from Mesh.onAfterRender
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
@@ -593,10 +593,10 @@() => {}
Implementation of ImageBase.onBeforeRender
Inherited from Mesh.onBeforeRender
Object's parent in the scene graph.
null
Implementation of ImageBase.parent
Inherited from Mesh.parent
Readonly
positionImplementation of ImageBase.position Inherited from Mesh.positionnew THREE.Vector3()
- that is (0, 0,
-
Readonly
quaternionImplementation of ImageBase.quaternion Inherited from Mesh.quaternionnew THREE.Quaternion()
- that is (0,
-
false
Implementation of ImageBase.receiveShadow
Inherited from Mesh.receiveShadow
0
Implementation of ImageBase.renderOrder
Inherited from Mesh.renderOrder
Readonly
rotationImplementation of ImageBase.rotation Inherited from Mesh.rotationnew THREE.Euler()
- that is (0, 0, 0
-
Readonly
scalenew THREE.Vector3( 1, 1, 1 )
Implementation of ImageBase.scale
Inherited from Mesh.scale
Protected
spriteProtected
spriteReadonly
typeMesh
Implementation of ImageBase.type
Inherited from Mesh.type
Inherited from Mesh.up
{}
Implementation of ImageBase.userData
Inherited from Mesh.userData
This gets automatically assigned and shouldn't be edited.
Implementation of ImageBase.uuid
Inherited from Mesh.uuid
true
Implementation of ImageBase.visible
Inherited from Mesh.visible
Static
DEFAULT_true
Inherited from Mesh.DEFAULT_MATRIX_AUTO_UPDATE
Static
DEFAULT_true
Inherited from Mesh.DEFAULT_MATRIX_WORLD_AUTO_UPDATE
Static
DEFAULT_new THREE.Vector3( 0, 1, 0)
Inherited from Mesh.DEFAULT_UP
Implementation of ImageBase.dat
Implementation of ImageBase.frame
Implementation of ImageBase.frame
Implementation of ImageBase.unitTileScale
Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]Implementation of ImageBase.add
Inherited from Mesh.add
The function that gets called when the event is fired.
Inherited from Mesh.addEventListener
Implementation of ImageBase.addEventListener
+Inherited from Mesh.addEventListener
+Inherited from Mesh.applyMatrix4
Inherited from Mesh.applyQuaternion
Inherited from Mesh.attach
Protected
createProtected
Returns ImageHDMaterial | ImageHDInstancedMaterial
-- Defined in build/api-types/host/index.d.ts:2879
Fire an event type.
The event that gets fired.
Inherited from Mesh.dispatchEvent
Searches through an object and its children, starting with the object itself, and returns the first with a matching id.
Unique number of the object instance. Expects a Integer
Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.
@@ -1091,11 +1115,11 @@id
Implementation of ImageBase.getObjectById
Inherited from Mesh.getObjectById
Searches through an object and its children, starting with the object itself, and returns the first with a matching name.
String to match to the children's Object3D.name property.
Note that for most objects the name is an empty string by default
Implementation of ImageBase.getObjectByName
Inherited from Mesh.getObjectByName
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
@@ -1136,16 +1160,16 @@value of the given property.
Implementation of ImageBase.getObjectByProperty
Inherited from Mesh.getObjectByProperty
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
@@ -1163,12 +1187,12 @@Value of the given property.
Implementation of ImageBase.getObjectsByProperty
Inherited from Mesh.getObjectsByProperty
Inherited from Mesh.getVertexPosition
Implementation of ImageBase.getWorldDirection
Inherited from Mesh.getWorldDirection
Implementation of ImageBase.getWorldPosition
Inherited from Mesh.getWorldPosition
Implementation of ImageBase.getWorldQuaternion
Inherited from Mesh.getWorldQuaternion
Implementation of ImageBase.getWorldScale
Inherited from Mesh.getWorldScale
The function that gets called when the event is fired.
Implementation of ImageBase.hasEventListener
Inherited from Mesh.hasEventListener
Implementation of ImageBase.hasEventListener
+Inherited from Mesh.hasEventListener
+Implementation of ImageBase.localToWorld
Inherited from Mesh.localToWorld
This method does not support objects having non-uniformly-sca
Implementation of ImageBase.lookAt
Inherited from Mesh.lookAt
Rotates the object to face a point in world space.
@@ -1381,7 +1424,7 @@This method does not support objects having non-uniformly-sca
Implementation of ImageBase.lookAt
Inherited from Mesh.lookAt
() => {}
Implementation of ImageBase.raycast
Overrides Mesh.raycast
Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]THREE.Group | Group for info on manually grouping objects.
Implementation of ImageBase.remove
Inherited from Mesh.remove
The listener function that gets removed.
Inherited from Mesh.removeEventListener
Implementation of ImageBase.removeEventListener
+Inherited from Mesh.removeEventListener
+Inherited from Mesh.removeFromParent
The axis is assumed to be normalized.
Implementation of ImageBase.rotateOnAxis
Inherited from Mesh.rotateOnAxis
The axis is assumed to be normalized
Implementation of ImageBase.rotateOnWorldAxis
Inherited from Mesh.rotateOnWorldAxis
Inherited from Mesh.rotateX
Inherited from Mesh.rotateY
Inherited from Mesh.rotateZ
Implementation of ImageBase.setFrame
Implementation of ImageBase.setModifiers
Inherited from Mesh.setRotationFromAxisAngle
Inherited from Mesh.setRotationFromEuler
Note that this assumes that the upper 3x3 of m is a pure rota
Implementation of ImageBase.setRotationFromMatrix
Inherited from Mesh.setRotationFromMatrix
Inherited from Mesh.setRotationFromQuaternion
Implementation of ImageBase.setTeamColor
Inherited from Mesh.toJSON
The axis is assumed to be normalized.
Implementation of ImageBase.translateOnAxis
Inherited from Mesh.translateOnAxis
Inherited from Mesh.translateX
Inherited from Mesh.translateY
Inherited from Mesh.translateZ
Note: Modifying the scene graph inside the callback is discou
Implementation of ImageBase.traverse
Inherited from Mesh.traverse
Note: Modifying the scene graph inside the callback is discou
Implementation of ImageBase.traverseAncestors
Inherited from Mesh.traverseAncestors
Descendants of invisible objects are not traversed.
Implementation of ImageBase.traverseVisible
Inherited from Mesh.traverseVisible
Implementation of ImageBase.updateImageType
Inherited from Mesh.updateMatrix
Inherited from Mesh.updateMatrixWorld
Inherited from Mesh.updateWorldMatrix
Implementation of ImageBase.worldToLocal
Inherited from Mesh.worldToLocal
Generated using TypeDoc
Internal
Optional
Returns ImageHDInstancedMaterialOverrides MeshBasicMaterial.constructor
Private
#privateInherited from MeshBasicMaterial.alphaHash
+null
Inherited from MeshBasicMaterial.alphaMap
0
Inherited from MeshBasicMaterial.alphaTest
false
Inherited from MeshBasicMaterial.alphaToCoverage
null
Inherited from MeshBasicMaterial.aoMap
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:61
1
Inherited from MeshBasicMaterial.aoMapIntensity
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:66
THREE
Inherited from MeshBasicMaterial.blendDst
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:84
null
Inherited from MeshBasicMaterial.blendDstAlpha
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:90
THREE
Inherited from MeshBasicMaterial.blendEquation
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:96
null
Inherited from MeshBasicMaterial.blendEquationAlpha
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:102
THREE
Inherited from MeshBasicMaterial.blendSrc
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:114
null
Inherited from MeshBasicMaterial.blendSrcAlpha
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:120
THREE
Inherited from MeshBasicMaterial.blending
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:108
false
Inherited from MeshBasicMaterial.clipIntersection
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:126
false
Inherited from MeshBasicMaterial.clipShadows
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:141
User-defined clipping planes specified as THREE.Plane objects in world space. These planes apply to the objects this material is attached to. Points in space whose signed distance to the plane is negative are clipped (not rendered). @@ -324,7 +331,7 @@
null
Inherited from MeshBasicMaterial.clippingPlanes
new
Inherited from MeshBasicMaterial.color
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:41
true
Inherited from MeshBasicMaterial.colorWrite
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:147
THREE
Inherited from MeshBasicMaterial.combine
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:86
undefined
Inherited from MeshBasicMaterial.defines
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:154
THREE
Inherited from MeshBasicMaterial.depthFunc
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:160
true
Inherited from MeshBasicMaterial.depthTest
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:166
true
Inherited from MeshBasicMaterial.depthWrite
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:173
false
Inherited from MeshBasicMaterial.dithering
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:296
null
Inherited from MeshBasicMaterial.envMap
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:81
fog
Inherited from MeshBasicMaterial.fog
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:122
false
Inherited from MeshBasicMaterial.forceSinglePass
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:290
Inherited from MeshBasicMaterial.id
Readonly
isReadonly
Inherited from MeshBasicMaterial.isMaterial
null
Inherited from MeshBasicMaterial.lightMap
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:51
1
Inherited from MeshBasicMaterial.lightMapIntensity
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:56
null
Inherited from MeshBasicMaterial.map
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:46
''
Inherited from MeshBasicMaterial.name
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:242
false
Inherited from MeshBasicMaterial.needsUpdate
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:249
1
Inherited from MeshBasicMaterial.opacity
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:255
false
Inherited from MeshBasicMaterial.polygonOffset
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:261
0
Inherited from MeshBasicMaterial.polygonOffsetFactor
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:267
0
Inherited from MeshBasicMaterial.polygonOffsetUnits
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:273
null
Inherited from MeshBasicMaterial.precision
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:279
false
Inherited from MeshBasicMaterial.premultipliedAlpha
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:285
1
Inherited from MeshBasicMaterial.reflectivity
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:91
0.98
Inherited from MeshBasicMaterial.refractionRatio
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:96
null
Inherited from MeshBasicMaterial.shadowSide
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:311
{@
Inherited from MeshBasicMaterial.side
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:304
null
Inherited from MeshBasicMaterial.specularMap
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:71
THREE
Inherited from MeshBasicMaterial.stencilFail
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:214
THREE
Inherited from MeshBasicMaterial.stencilFunc
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:190
0xff
Inherited from MeshBasicMaterial.stencilFuncMask
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:208
0
Inherited from MeshBasicMaterial.stencilRef
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:196
false
Inherited from MeshBasicMaterial.stencilWrite
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:184
0xff
Inherited from MeshBasicMaterial.stencilWriteMask
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:202
THREE
Inherited from MeshBasicMaterial.stencilZFail
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:222
THREE
Inherited from MeshBasicMaterial.stencilZPass
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:230
true
Inherited from MeshBasicMaterial.toneMapped
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:318
false
Inherited from MeshBasicMaterial.transparent
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:326
'MeshBasic
Inherited from MeshBasicMaterial.type
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:36
{}
Inherited from MeshBasicMaterial.userData
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:355
Inherited from MeshBasicMaterial.uuid
0
Inherited from MeshBasicMaterial.version
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:361
false
Inherited from MeshBasicMaterial.vertexColors
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:343
true
Inherited from MeshBasicMaterial.visible
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:349
false
Inherited from MeshBasicMaterial.wireframe
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:101
'round'
Inherited from MeshBasicMaterial.wireframeLinecap
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:111
'round'
Inherited from MeshBasicMaterial.wireframeLinejoin
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:116
1
Inherited from MeshBasicMaterial.wireframeLinewidth
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:106
The function that gets called when the event is fired.
Inherited from MeshBasicMaterial.addEventListener
Inherited from MeshBasicMaterial.addEventListener
+Inherited from MeshBasicMaterial.clone
Inherited from MeshBasicMaterial.copy
Overrides MeshBasicMaterial.customProgramCacheKey
Fire an event type.
The event that gets fired.
Inherited from MeshBasicMaterial.dispatchEvent
Inherited from MeshBasicMaterial.dispose
The function that gets called when the event is fired.
Inherited from MeshBasicMaterial.hasEventListener
Inherited from MeshBasicMaterial.hasEventListener
+Overrides MeshBasicMaterial.onBeforeCompile
The listener function that gets removed.
Inherited from MeshBasicMaterial.removeEventListener
Inherited from MeshBasicMaterial.removeEventListener
+Inherited from MeshBasicMaterial.setValues
Inherited from MeshBasicMaterial.toJSON
Generated using TypeDoc
Internal
Optional
Returns ImageHDMaterialOverrides MeshBasicMaterial.constructor
Private
#privateInherited from MeshBasicMaterial.alphaHash
+null
Inherited from MeshBasicMaterial.alphaMap
0
Inherited from MeshBasicMaterial.alphaTest
false
Inherited from MeshBasicMaterial.alphaToCoverage
null
Inherited from MeshBasicMaterial.aoMap
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:61
1
Inherited from MeshBasicMaterial.aoMapIntensity
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:66
THREE
Inherited from MeshBasicMaterial.blendDst
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:84
null
Inherited from MeshBasicMaterial.blendDstAlpha
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:90
THREE
Inherited from MeshBasicMaterial.blendEquation
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:96
null
Inherited from MeshBasicMaterial.blendEquationAlpha
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:102
THREE
Inherited from MeshBasicMaterial.blendSrc
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:114
null
Inherited from MeshBasicMaterial.blendSrcAlpha
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:120
THREE
Inherited from MeshBasicMaterial.blending
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:108
false
Inherited from MeshBasicMaterial.clipIntersection
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:126
false
Inherited from MeshBasicMaterial.clipShadows
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:141
User-defined clipping planes specified as THREE.Plane objects in world space. These planes apply to the objects this material is attached to. Points in space whose signed distance to the plane is negative are clipped (not rendered). @@ -327,7 +334,7 @@
null
Inherited from MeshBasicMaterial.clippingPlanes
new
Inherited from MeshBasicMaterial.color
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:41
true
Inherited from MeshBasicMaterial.colorWrite
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:147
THREE
Inherited from MeshBasicMaterial.combine
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:86
undefined
Inherited from MeshBasicMaterial.defines
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:154
THREE
Inherited from MeshBasicMaterial.depthFunc
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:160
true
Inherited from MeshBasicMaterial.depthTest
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:166
true
Inherited from MeshBasicMaterial.depthWrite
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:173
false
Inherited from MeshBasicMaterial.dithering
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:296
null
Inherited from MeshBasicMaterial.envMap
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:81
fog
Inherited from MeshBasicMaterial.fog
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:122
false
Inherited from MeshBasicMaterial.forceSinglePass
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:290
Inherited from MeshBasicMaterial.id
Readonly
isReadonly
Inherited from MeshBasicMaterial.isMaterial
null
Inherited from MeshBasicMaterial.lightMap
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:51
1
Inherited from MeshBasicMaterial.lightMapIntensity
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:56
null
Inherited from MeshBasicMaterial.map
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:46
''
Inherited from MeshBasicMaterial.name
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:242
false
Inherited from MeshBasicMaterial.needsUpdate
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:249
1
Inherited from MeshBasicMaterial.opacity
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:255
false
Inherited from MeshBasicMaterial.polygonOffset
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:261
0
Inherited from MeshBasicMaterial.polygonOffsetFactor
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:267
0
Inherited from MeshBasicMaterial.polygonOffsetUnits
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:273
null
Inherited from MeshBasicMaterial.precision
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:279
false
Inherited from MeshBasicMaterial.premultipliedAlpha
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:285
1
Inherited from MeshBasicMaterial.reflectivity
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:91
0.98
Inherited from MeshBasicMaterial.refractionRatio
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:96
null
Inherited from MeshBasicMaterial.shadowSide
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:311
{@
Inherited from MeshBasicMaterial.side
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:304
null
Inherited from MeshBasicMaterial.specularMap
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:71
THREE
Inherited from MeshBasicMaterial.stencilFail
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:214
THREE
Inherited from MeshBasicMaterial.stencilFunc
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:190
0xff
Inherited from MeshBasicMaterial.stencilFuncMask
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:208
0
Inherited from MeshBasicMaterial.stencilRef
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:196
false
Inherited from MeshBasicMaterial.stencilWrite
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:184
0xff
Inherited from MeshBasicMaterial.stencilWriteMask
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:202
THREE
Inherited from MeshBasicMaterial.stencilZFail
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:222
THREE
Inherited from MeshBasicMaterial.stencilZPass
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:230
true
Inherited from MeshBasicMaterial.toneMapped
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:318
false
Inherited from MeshBasicMaterial.transparent
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:326
'MeshBasic
Inherited from MeshBasicMaterial.type
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:36
{}
Inherited from MeshBasicMaterial.userData
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:355
Inherited from MeshBasicMaterial.uuid
0
Inherited from MeshBasicMaterial.version
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:361
false
Inherited from MeshBasicMaterial.vertexColors
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:343
true
Inherited from MeshBasicMaterial.visible
-- Defined in node_modules/@types/three/src/materials/Material.d.ts:349
false
Inherited from MeshBasicMaterial.wireframe
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:101
'round'
Inherited from MeshBasicMaterial.wireframeLinecap
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:111
'round'
Inherited from MeshBasicMaterial.wireframeLinejoin
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:116
1
Inherited from MeshBasicMaterial.wireframeLinewidth
-- Defined in node_modules/@types/three/src/materials/MeshBasicMaterial.d.ts:106
The function that gets called when the event is fired.
Inherited from MeshBasicMaterial.addEventListener
Inherited from MeshBasicMaterial.addEventListener
+Inherited from MeshBasicMaterial.clone
Inherited from MeshBasicMaterial.copy
Overrides MeshBasicMaterial.customProgramCacheKey
Fire an event type.
The event that gets fired.
Inherited from MeshBasicMaterial.dispatchEvent
Inherited from MeshBasicMaterial.dispose
The function that gets called when the event is fired.
Inherited from MeshBasicMaterial.hasEventListener
Inherited from MeshBasicMaterial.hasEventListener
+Overrides MeshBasicMaterial.onBeforeCompile
The listener function that gets removed.
Inherited from MeshBasicMaterial.removeEventListener
Inherited from MeshBasicMaterial.removeEventListener
+Inherited from MeshBasicMaterial.setValues
Inherited from MeshBasicMaterial.toJSON
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Private
#privateOptional
useRefId: booleanOptional
priority: numberGenerated using TypeDoc
Internal
Private
#privateGenerated using TypeDoc
Internal
Optional
Optional pairOffset: numberPrivate
#privatePrivate
_currentPrivate
_heapPrivate
_pairGenerated using TypeDoc
Internal
A map that also keeps track of insertion order
+Private
#privateGenerated using TypeDoc
Internal
Private
#privateGenerated using TypeDoc
Internal
Optional
teamcolorOptional
stride: numberGenerated using TypeDoc
Optional
k: numberOptional
Optional decay: numberGenerated using TypeDoc
Internal
Private
#privateGenerated using TypeDoc
Internal
Internal
Optional
errorPrivate
#privateOptional
groupOptional
valueGenerated using TypeDoc
Private
#privateInherited from OpenBWWasm.ALLOC_NORMAL
Inherited from OpenBWWasm.HEAP16
Inherited from OpenBWWasm.HEAP32
Inherited from OpenBWWasm.HEAP8
Inherited from OpenBWWasm.HEAPU16
Inherited from OpenBWWasm.HEAPU32
Inherited from OpenBWWasm.HEAPU8
Inherited from OpenBWWasm.UTF8ToString
Inherited from OpenBWWasm._counts
Inherited from OpenBWWasm._create_unit
Inherited from OpenBWWasm._free
Inherited from OpenBWWasm._generate_frame
Inherited from OpenBWWasm._get_buffer
Inherited from OpenBWWasm._load_map
Inherited from OpenBWWasm._load_replay
Inherited from OpenBWWasm._load_replay_with_height_map
Inherited from OpenBWWasm._next_frame
Inherited from OpenBWWasm._next_no_replay
+Inherited from OpenBWWasm._next_replay_step
Inherited from OpenBWWasm._next_step
+Inherited from OpenBWWasm._replay_get_value
Inherited from OpenBWWasm._replay_set_value
Inherited from OpenBWWasm._reset
Inherited from OpenBWWasm._set_player_visibility
Inherited from OpenBWWasm._upload_height_map
Inherited from OpenBWWasm.allocate
Inherited from OpenBWWasm.callMain
Optional
filesInherited from OpenBWWasm.getExceptionMessage
Inherited from OpenBWWasm.get_util_funcs
Increments the game frame where openbw will run until the next frame. If the game is in sandbox mode, the game will run at 24 fps.
@@ -700,7 +725,7 @@Inherited from OpenBWWasm.setupCallback
+Inherited from OpenBWWasm.setupCallbacks
OpenBW uses the height map to determine Y coordinates for units so that we don't have to.
Inherited from OpenBWWasm.AsciiToString
Inherited from OpenBWWasm.UTF16ToString
Inherited from OpenBWWasm.UTF32ToString
Inherited from OpenBWWasm.ccall
Inherited from OpenBWWasm.cwrap
Inherited from OpenBWWasm.getValue
Inherited from OpenBWWasm.intArrayFromString
Inherited from OpenBWWasm.intArrayToString
Inherited from OpenBWWasm.setValue
Inherited from OpenBWWasm.stackTrace
Inherited from OpenBWWasm.stringToUTF16
Inherited from OpenBWWasm.stringToUTF32
Inherited from OpenBWWasm.stringToUTF8
Inherited from OpenBWWasm.writeArrayToMemory
Inherited from OpenBWWasm.writeAsciiToMemory
Generated using TypeDoc
Internal
Private
_clearedPrivate
buffersPrivate
indexGenerated using TypeDoc
Generated using TypeDoc
Internal
Internal
World events that can be listened to and emitted.
-Reactive setting values that apply to the active session only.
-Generated using TypeDoc
Internal
Overrides Array<Player>.constructor
Private
#privateReadonly
[unscopables]Is an object whose properties have the value 'true' +when they will be absent when used in a 'with' statement.
+Optional
Readonly
[unscopables]?: booleanIs an object whose properties have the value 'true' +when they will be absent when used in a 'with' statement.
+Optional
length?: booleanGets or sets the length of the array. This is a number one higher than the highest index in the array.
+Inherited from Array.[unscopables]
+Gets or sets the length of the array. This is a number one higher than the highest index in the array.
Inherited from Array.length
Static
Overrides Array.[species]
Returns an object whose properties have the value 'true' -when they will be absent when used in a 'with' statement.
-Inherited from Array.[unscopables]
-Combines two or more arrays. This method returns a new array without modifying any existing arrays.
@@ -241,8 +232,8 @@Inherited from Array.concat
Combines two or more arrays. This method returns a new array without modifying any existing arrays.
@@ -259,7 +250,7 @@Inherited from Array.concat
Inherited from Array.copyWithin
Inherited from Array.entries
Inherited from Array.every
Determines whether all the members of an array satisfy the specified test.
Inherited from Array.every
Inherited from Array.fill
Returns the elements of an array that meet the condition specified in a callback function.
Inherited from Array.filter
Returns the elements of an array that meet the condition specified in a callback function.
Inherited from Array.filter
find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
@@ -533,14 +524,12 @@Inherited from Array.find
Optional
Returns undefined | PlayerInherited from Array.find
Inherited from Array.findIndex
Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.
@@ -659,11 +648,11 @@Inherited from Array.flat
Calls a defined callback function on each element of an array. Then, flattens the result into a new array. @@ -712,11 +701,11 @@
Inherited from Array.flatMap
Inherited from Array.forEach
Determines whether an array includes a certain element, returning true or false as appropriate.
Inherited from Array.includes
Inherited from Array.indexOf
Inherited from Array.keys
Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.
Inherited from Array.lastIndexOf
Removes the last element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.
@@ -938,11 +927,11 @@Inherited from Array.pop
Inherited from Array.push
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Inherited from Array.reduce
Inherited from Array.reduce
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Inherited from Array.reduce
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Inherited from Array.reduceRight
Inherited from Array.reduceRight
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Inherited from Array.reduceRight
Removes the first element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.
@@ -1219,11 +1216,11 @@Inherited from Array.shift
Returns a copy of a section of an array. For both start and end, a negative index can be used to indicate an offset from the end of the array. @@ -1248,11 +1245,11 @@
Inherited from Array.slice
Inherited from Array.splice
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
Inherited from Array.splice
Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
Inherited from Array.toLocaleString
Inherited from Array.values
Static
fromInherited from Array.from
Creates an array from an iterable object.
@@ -1524,7 +1521,7 @@Inherited from Array.from
Creates an array from an iterable object.
@@ -1546,7 +1543,7 @@Inherited from Array.from
Creates an array from an iterable object.
@@ -1593,7 +1590,7 @@Inherited from Array.from
Static
isInherited from Array.isArray
Static
ofInherited from Array.of
Generated using TypeDoc
Internal
Static
mouseGenerated using TypeDoc
Internal
Optional
key: stringOptional
cache: IndexedDBCachePrivate
#privateProtected
Optional
cacheGenerated using TypeDoc
Internal
Private
#privatePrivate
Readonly
_structGenerated using TypeDoc
Optional
scale: anyOptional
offset: anyOptional
descriptionPrivate
#privateOptional
errorOptional
radius: numberGenerated using TypeDoc
Internal
Private
#privateGenerated using TypeDoc
Internal
Private
#privateGenerated using TypeDoc
Internal
Private
#privateGenerated using TypeDoc
Internal
Private
#privateReadonly
imagesImplementation of SpriteStruct.elevation
Generated using TypeDoc
Internal
Internal
Optional
errorPrivate
#privateOptional
valueGenerated using TypeDoc
Internal
Private
#privateRest
...args: [color: ColorRepresentation]Rest
...args: unknown[]Rest
...args: [x: number, y: number, z: number]Rest
...args: unknown[]Generated using TypeDoc
Internal
Optional
canvas: HTMLCanvasElementOptional
useContext: booleanOptional
styles: Partial<CSSStyleDeclaration>Private
#privateOptional
ctxGenerated using TypeDoc
Internal
Overrides Group.constructor
Private
#private[]
Inherited from Group.animations
false
Inherited from Group.castShadow
Overrides Group.children
Optional
customundefined
Inherited from Group.customDepthMaterial
Optional
customundefined
Inherited from Group.customDistanceMaterial
true
Inherited from Group.frustumCulled
Readonly
geomReadonly
getReadonly
idNote that ids are assigned in chronological order: 1, 2, 3, .
Inherited from Group.id
-
Readonly
istrue
Inherited from Group.isObject3D
new THREE.Layers()
Inherited from Group.layers
new THREE.Matrix4()
Inherited from Group.matrix
new THREE.Matrix4()
Inherited from Group.matrixWorld
false
Inherited from Group.matrixWorldNeedsUpdate
Readonly
modelnew THREE.Matrix4()
Inherited from Group.modelViewMatrix
""
Inherited from Group.name
Readonly
normalnew THREE.Matrix3()
Inherited from Group.normalMatrix
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
@@ -442,7 +442,7 @@() => {}
Inherited from Group.onAfterRender
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
@@ -478,10 +478,10 @@() => {}
Inherited from Group.onBeforeRender
Object's parent in the scene graph.
null
Inherited from Group.parent
Readonly
positionInherited from Group.positionnew THREE.Vector3()
- that is (0, 0,
-
Readonly
quaternionInherited from Group.quaternionnew THREE.Quaternion()
- that is (0,
-
false
Inherited from Group.receiveShadow
0
Inherited from Group.renderOrder
Readonly
rotationInherited from Group.rotationnew THREE.Euler()
- that is (0, 0, 0
-
Readonly
scalenew THREE.Vector3( 1, 1, 1 )
Inherited from Group.scale
Readonly
type
Inherited from Group.up
-
Overrides Group.userData
This gets automatically assigned and shouldn't be edited.
Inherited from Group.uuid
-
true
Inherited from Group.visible
Static
DEFAULT_true
Inherited from Group.DEFAULT_MATRIX_AUTO_UPDATE
Static
DEFAULT_true
Inherited from Group.DEFAULT_MATRIX_WORLD_AUTO_UPDATE
Static
DEFAULT_new THREE.Vector3( 0, 1, 0)
Inherited from Group.DEFAULT_UP
Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]Inherited from Group.add
The function that gets called when the event is fired.
Inherited from Group.addEventListener
Inherited from Group.addEventListener
+Inherited from Group.applyMatrix4
Inherited from Group.applyQuaternion
Inherited from Group.attach
-
+clear
Inherited from Group.clear
Inherited from Group.clone
Note: event listeners and user-defined callbacks (
Inherited from Group.copy
-
Fire an event type.
The event that gets fired.
Inherited from Group.dispatchEvent
Searches through an object and its children, starting with the object itself, and returns the first with a matching id.
Unique number of the object instance. Expects a Integer
Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.
@@ -910,11 +933,11 @@id
Inherited from Group.getObjectById
Searches through an object and its children, starting with the object itself, and returns the first with a matching name.
String to match to the children's Object3D.name property.
Note that for most objects the name is an empty string by default
Inherited from Group.getObjectByName
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
@@ -954,15 +977,15 @@value of the given property.
Inherited from Group.getObjectByProperty
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
@@ -980,11 +1003,11 @@Value of the given property.
Inherited from Group.getObjectsByProperty
Inherited from Group.getWorldDirection
Inherited from Group.getWorldPosition
Inherited from Group.getWorldQuaternion
Inherited from Group.getWorldScale
The function that gets called when the event is fired.
Inherited from Group.hasEventListener
Inherited from Group.hasEventListener
+Inherited from Group.localToWorld
This method does not support objects having non-uniformly-sca
Inherited from Group.lookAt
-
Rotates the object to face a point in world space.
@@ -1165,7 +1206,7 @@This method does not support objects having non-uniformly-sca
Inherited from Group.lookAt
() => {}
Inherited from Group.raycast
Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]THREE.Group | Group for info on manually grouping objects.
Inherited from Group.remove
The listener function that gets removed.
Inherited from Group.removeEventListener
Inherited from Group.removeEventListener
+Inherited from Group.removeFromParent
The axis is assumed to be normalized.
Inherited from Group.rotateOnAxis
The axis is assumed to be normalized
Inherited from Group.rotateOnWorldAxis
Inherited from Group.rotateX
Inherited from Group.rotateY
Inherited from Group.rotateZ
Inherited from Group.setRotationFromAxisAngle
Inherited from Group.setRotationFromEuler
Note that this assumes that the upper 3x3 of m is a pure rota
Inherited from Group.setRotationFromMatrix
-
Inherited from Group.setRotationFromQuaternion
Inherited from Group.toJSON
The axis is assumed to be normalized.
Inherited from Group.translateOnAxis
Inherited from Group.translateX
Inherited from Group.translateY
Inherited from Group.translateZ
Note: Modifying the scene graph inside the callback is discou
Inherited from Group.traverse
Note: Modifying the scene graph inside the callback is discou
Inherited from Group.traverseAncestors
Descendants of invisible objects are not traversed.
Inherited from Group.traverseVisible
Inherited from Group.updateMatrix
Inherited from Group.updateMatrixWorld
Inherited from Group.updateWorldMatrix
Inherited from Group.worldToLocal
Generated using TypeDoc
Internal
Protected
_addr32Protected
_addr8Protected
_addressProtected
Optional
_spriteImplementation of ThingyStruct.hp
Implementation of ThingyStruct.spriteAddr
+Internal
spriteImplementation of ThingyStruct.spriteIndex
Generated using TypeDoc
Internal
Private
#privateOptional
v: T[keyof T]Optional
priority: numberGenerated using TypeDoc
Internal
Private
#privateOptional
priority: numberGenerated using TypeDoc
Inherited from UnitDATIncomingType.constructor
Inherited from UnitDATIncomingType.addonHorizontal
Inherited from UnitDATIncomingType.addonVertical
Inherited from UnitDATIncomingType.airWeapon
Inherited from UnitDATIncomingType.armor
Inherited from UnitDATIncomingType.armorUpgrade
Inherited from UnitDATIncomingType.buildScore
Inherited from UnitDATIncomingType.buildTime
Inherited from UnitDATIncomingType.constructionImage
Inherited from UnitDATIncomingType.destroyScore
Inherited from UnitDATIncomingType.direction
Inherited from UnitDATIncomingType.elevationLevel
Inherited from UnitDATIncomingType.flingy
Inherited from UnitDATIncomingType.groundWeapon
Inherited from UnitDATIncomingType.hp
Inherited from UnitDATIncomingType.index
Inherited from UnitDATIncomingType.infestation
Inherited from UnitDATIncomingType.mineralCost
Inherited from UnitDATIncomingType.pissSound
Inherited from UnitDATIncomingType.pissSoundEnd
Inherited from UnitDATIncomingType.pissSoundStart
Inherited from UnitDATIncomingType.placementHeight
Inherited from UnitDATIncomingType.placementWidth
Inherited from UnitDATIncomingType.portrait
Inherited from UnitDATIncomingType.readySound
Inherited from UnitDATIncomingType.requirements
Inherited from UnitDATIncomingType.shields
Inherited from UnitDATIncomingType.shieldsEnabled
Inherited from UnitDATIncomingType.sightRange
Inherited from UnitDATIncomingType.spaceProvided
Inherited from UnitDATIncomingType.spaceRequired
Inherited from UnitDATIncomingType.starEditAvailabilityFlags
Inherited from UnitDATIncomingType.starEditGroupFlags
Inherited from UnitDATIncomingType.subUnit1
Inherited from UnitDATIncomingType.subUnit2
Inherited from UnitDATIncomingType.supplyProvided
Inherited from UnitDATIncomingType.supplyRequired
Inherited from UnitDATIncomingType.unitSize
Inherited from UnitDATIncomingType.unitSizeDown
Inherited from UnitDATIncomingType.unitSizeLeft
Inherited from UnitDATIncomingType.unitSizeRight
Inherited from UnitDATIncomingType.unitSizeUp
Inherited from UnitDATIncomingType.vespeneCost
Inherited from UnitDATIncomingType.whatSound
Inherited from UnitDATIncomingType.whatSoundEnd
Inherited from UnitDATIncomingType.whatSoundStart
Inherited from UnitDATIncomingType.yesSound
Inherited from UnitDATIncomingType.yesSoundEnd
Inherited from UnitDATIncomingType.yesSoundStart
Generated using TypeDoc
Internal
Optional
externalOptional
Optional
externalGenerated using TypeDoc
Internal
Inherited from FlingyBufferView.constructor
Private
#privateProtected
_addr32Inherited from FlingyBufferView._addr32
Protected
_addr8Inherited from FlingyBufferView._addr8
Protected
_addressInherited from FlingyBufferView._address
Inherited from FlingyBufferView._bw
Protected
Optional
_spriteInherited from FlingyBufferView._sprite
-Readonly
resourceImplementation of UnitStruct.resourceAmount
Inherited from FlingyBufferView.address
Implementation of UnitStruct.airWeaponCooldown
Implementation of UnitStruct.currentSpeed
+Inherited from FlingyBufferView.currentSpeed
+Implementation of UnitStruct.currentVelocityDirection
+Inherited from FlingyBufferView.currentVelocityDirection
+Inherited from FlingyBufferView.direction
Implementation of UnitStruct.groundWeaponCooldown
Inherited from FlingyBufferView.hp
Inherited from FlingyBufferView.moveTargetX
Inherited from FlingyBufferView.moveTargetY
Inherited from FlingyBufferView.movementFlags
Inherited from FlingyBufferView.nextMovementWaypointX
Inherited from FlingyBufferView.nextMovementWaypointY
Inherited from FlingyBufferView.nextTargetWaypointX
Inherited from FlingyBufferView.nextTargetWaypointY
Implementation of UnitStruct.spellCooldown
+Implementation of UnitStruct.spriteAddr
+Inherited from FlingyBufferView.spriteAddr
Internal
spriteInherited from FlingyBufferView.spriteIndex
Internal
subunitInternal
-Implementation of UnitStruct.subunit
Inherited from FlingyBufferView.x
Inherited from FlingyBufferView.y
Optional
bufferView: UnitsBufferViewOverrides FlingyBufferView.copyTo
Inherited from FlingyBufferView.get
Generated using TypeDoc
Internal
Internal
Optional
criticalPrivate
#privateGenerated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Readonly
delta: numberReadonly
elapsed: numberReadonly
delta: numberGenerated using TypeDoc
Readonly
players: PlayersReadonly
units: IterableMap<number, Unit>Optional
direction: numberReadonly
secondReadonly
viewport: GameViewPortReadonly
viewport: GameViewPortReadonly
numReadonly
primaryReadonly
primaryReadonly
primaryReadonly
primaryReadonly
primaryPrimary viewport is necessary because audio will require a camera position, and depth of field will only apply in one viewport for performance.
+Readonly
sceneReadonly
Activates a scene controller plugin. +Runs events on the previous scene controller if it exists. +Resets all viewports.
+Optional
firstRunData: anyOptional
renderMode3D: booleanGenerated using TypeDoc
Internal
Generated using TypeDoc
Internal
Readonly
secondReadonly
viewport: GameViewPortReadonly
viewport: GameViewPortReadonly
numReadonly
primaryReadonly
primaryReadonly
primaryReadonly
primaryReadonly
primaryPrimary viewport is necessary because audio will require a camera position, and depth of field will only apply in one viewport for performance.
+Readonly
sceneReadonly
Activates a scene controller plugin. +Runs events on the previous scene controller if it exists. +Resets all viewports.
+Optional
firstRunData: anyOptional
renderMode3D: booleanOptional
Optional unitTypeId: numberReadonly
frame: numberReadonly
gameReadonly
iterators: OpenBWIteratorsReadonly
mapOptional
setPaused: booleanSets the game speed clamped to REPLAY_MIN_SPEED and REPLAY_MAX_SPEED
+Optional
Optional unitTypeId: numberGenerated using TypeDoc
Internal
Readonly
players: PlayersReadonly
units: IterableMap<number, Unit>Optional
direction: numberReadonly
secondReadonly
viewport: GameViewPortReadonly
viewport: GameViewPortReadonly
numReadonly
primaryReadonly
primaryReadonly
primaryReadonly
primaryReadonly
primaryPrimary viewport is necessary because audio will require a camera position, and depth of field will only apply in one viewport for performance.
+Readonly
sceneReadonly
Activates a scene controller plugin. +Runs events on the previous scene controller if it exists. +Resets all viewports.
+Optional
firstRunData: anyOptional
renderMode3D: booleanOptional
renderMode3D: booleanReadonly
overlayGenerated using TypeDoc
Optional
Optional y: numberOptional
Optional y: numberOptional
Optional y: numberOptional
Optional y: numberGenerated using TypeDoc
Internal
-Generated using TypeDoc
Internal
Optional
audio?: { Optional
Optional
sound?: numberOptional
input?: { Optional
input?: { Optional
cameraOptional
Optional
unitOptional
vrOptional
zoomOptional
minimap?: { Optional
Optional
toneOptional
session?: { Optional
session?: { Optional
audioOptional
sandbox?: booleanOptional
type?: "replay" | "live" | "map"Optional
type?: "replay" | "map"Optional
silentUpdate: booleanOptional
silentUpdate: booleanGenerated using TypeDoc
Internal
Readonly
surface: undefined | GameSurfaceOptional
immediate: booleanGenerated using TypeDoc
Internal
Readonly
surface: undefined | GameSurfaceOptional
immediate: booleanReadonly
secondReadonly
viewport: GameViewPortReadonly
viewport: GameViewPortReadonly
numReadonly
primaryReadonly
primaryReadonly
primaryReadonly
primaryReadonly
primaryPrimary viewport is necessary because audio will require a camera position, and depth of field will only apply in one viewport for performance.
+Readonly
sceneReadonly
Activates a scene controller plugin. +Runs events on the previous scene controller if it exists. +Resets all viewports.
+Optional
firstRunData: anyOptional
renderMode3D: booleanGenerated using TypeDoc
Internal
+Generated using TypeDoc
Internal
+Generated using TypeDoc
Internal
+Generated using TypeDoc
Generated using TypeDoc
Internal
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Internal
+Generated using TypeDoc
Generated using TypeDoc
- +
@@ -41,30 +42,30 @@This is Titan Reactor the WebGL renderer + plugin system. It consists of three primary parts in order to function:
+Replay data is not shared or transmitted by Titan Reactor. Plugins may only access your replay data by granting explicit permission.
-_Using node 16, yarn 1.22, python 3.10.7 + VS (for node-gyp builds)
+Using node 18+, yarn 1.x
+Clone this repo. The development branch is dev
and main
is used for releases.
In this repo:
git lfs install
git lfs fetch
yarn install
and then
-yarn dev
or yarn dist
Now we want to run Titan Reactor, the ui runtime, the plugins, and cascbridge:
+In your terminal run yarn web
, in another terminal run yarn runtime
, in the plugins repo npm run serve
and run cascbridge.
The OpenBW wasm files are included (via git lfs). If you wish to build them yourself visit the openbw fork repository.
-Titan Reactor is made available via the GPLv3 license. The documentation and functionality provided by Titan Reactor may only be utilized with assets provided by ownership of Starcraft. Starcraft® - Copyright © 1998 Blizzard Entertainment, Inc. All rights reserved. Starcraft and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries. Titan Reactor and any of its maintainers are in no way associated with or endorsed by Blizzard Entertainment®
+ +The documentation and functionality provided by Titan Reactor may only be utilized with assets provided by ownership of Starcraft. Starcraft® - Copyright © 1998 Blizzard Entertainment, Inc. All rights reserved. Starcraft and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries. Titan Reactor and any of its maintainers are in no way associated with or endorsed by Blizzard Entertainment®
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Inherited from EmscriptenHeap.ALLOC_NORMAL
Inherited from EmscriptenHeap.HEAP16
Inherited from EmscriptenHeap.HEAP32
Inherited from EmscriptenHeap.HEAP8
Inherited from EmscriptenHeap.HEAPU16
Inherited from EmscriptenHeap.HEAPU32
Inherited from EmscriptenHeap.HEAPU8
Inherited from EmscriptenHeap._free
Inherited from EmscriptenHeap.allocate
Optional
async: booleanOptional
async: booleanGenerated using TypeDoc
Internal
Optional
folderOptional
labelOptional
maxOptional
minOptional
onOptional
optionsOptional
stepOptional
typeOptional
Generated using TypeDoc
Generated using TypeDoc
Internal
Inherited from ThingyStruct.hp
Inherited from ThingyStruct.spriteAddr
+Internal
spriteInherited from ThingyStruct.spriteIndex
Generated using TypeDoc
Inherited from SceneComposerApi.createUnitQuadTree
+Readonly
deltaInherited from GameLoopComposerApi.delta
Readonly
elapsedInherited from GameLoopComposerApi.elapsed
+Inherited from SceneComposerApi.followedUnits
Readonly
gameInherited from OpenBwComposerApi.gameSpeed
+Readonly
frameInherited from OpenBwComposerApi.frame
Inherited from OverlayComposerApi.getMouseMinimapUV
+Inherited from SceneComposerApi.getPlayerColor
+Inherited from SceneComposerApi.getFollowedUnitsCenterPosition
Inherited from SceneComposerApi.getPlayers
+Inherited from OverlayComposerApi.getMouseMinimapUV
Inherited from OpenBwComposerApi.gotoFrame
+Inherited from SceneComposerApi.imageQuadtree
Inherited from SceneComposerApi.initialStartLocation
+Inherited from OverlayComposerApi.isMouseInsideMinimap
Inherited from InputsComposerApi.mouse
Readonly
gameReadonly
iterators: OpenBWIteratorsReadonly
mapOptional
gameSeconds: numberOptional
gameSeconds: numberOptional
setPaused: booleanSets the game speed clamped to REPLAY_MIN_SPEED and REPLAY_MAX_SPEED
+Inherited from OpenBwComposerApi.openBW
+Readonly
playersInherited from SceneComposerApi.players
+Inherited from SceneComposerApi.pxToWorld
Inherited from SceneComposerApi.pxToWorldFlat
+Optional
replayOptional
Optional y: numberOptional
Optional y: numberOptional
Optional y: numberOptional
Optional y: numberInherited from SceneComposerApi.scene
Readonly
secondInherited from ViewControllerComposerApi.secondViewport
Inherited from SceneComposerApi.selectedUnits
Optional
gameSeconds: numberInherited from OpenBwComposerApi.skipBackward
-Optional
gameSeconds: numberInherited from OpenBwComposerApi.skipForward
-Inherited from OpenBwComposerApi.speedDown
-Inherited from OpenBwComposerApi.speedUp
-Optional
setPaused: booleanInherited from OpenBwComposerApi.togglePause
-Inherited from SurfaceComposerApi.togglePointerLock
-Inherited from SceneComposerApi.startLocations
+Readonly
surfaceInherited from SurfaceComposerApi.surface
+Inherited from SceneComposerApi.unitQuadtree
+Readonly
unitsInherited from SceneComposerApi.units
+Readonly
viewportInherited from ViewControllerComposerApi.viewport
Inherited from ViewControllerComposerApi.viewports
+Optional
Returns voidInherited from PostProcessingComposerApi.changeRenderMode
Inherited from OpenBwComposerApi.getCurrentFrame
-Inherited from InputsComposerApi.getHoveredUnit
Inherited from SceneComposerApi.getOriginalColors
-Inherited from SceneComposerApi.getOriginalNames
-Inherited from SurfaceComposerApi.isPointerLockLost
-Optional
Returns voidInherited from OpenBwComposerApi.playSound
Inherited from OpenBwComposerApi.setGameSpeed
-Inherited from SceneComposerApi.setPlayerColors
-Inherited from SceneComposerApi.setPlayerNames
-Inherited from SceneComposerApi.toggleFogOfWarByPlayerId
Generated using TypeDoc
Internal
Inherited from AnimAtlas.diffuse
Inherited from AnimAtlas.frames
Inherited from AnimAtlas.hdLayers
Inherited from AnimAtlas.imageIndex
Inherited from AnimAtlas.isHD
Inherited from AnimAtlas.isHD2
Inherited from AnimAtlas.spriteHeight
Inherited from AnimAtlas.spriteWidth
Inherited from AnimAtlas.teammask
Inherited from AnimAtlas.textureHeight
Inherited from AnimAtlas.textureWidth
Inherited from AnimAtlas.unitTileScale
Inherited from AnimAtlas.uvPos
Inherited from AnimAtlas.uvPosDataTex
Inherited from AnimAtlas.dispose
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
[]
Inherited from Object3D.animations
Optional
atlasfalse
Inherited from Object3D.castShadow
Array with object's children.
[]
Inherited from Object3D.children
Optional
customundefined
Inherited from Object3D.customDepthMaterial
Optional
customundefined
Inherited from Object3D.customDistanceMaterial
true
Inherited from Object3D.frustumCulled
Readonly
idNote that ids are assigned in chronological order: 1, 2, 3, .
Inherited from Object3D.id
-
Optional
isReadonly
istrue
Inherited from Object3D.isObject3D
new THREE.Layers()
Inherited from Object3D.layers
new THREE.Matrix4()
Inherited from Object3D.matrix
new THREE.Matrix4()
Inherited from Object3D.matrixWorld
false
Inherited from Object3D.matrixWorldNeedsUpdate
Readonly
modelnew THREE.Matrix4()
Inherited from Object3D.modelViewMatrix
""
Inherited from Object3D.name
Readonly
normalnew THREE.Matrix3()
Inherited from Object3D.normalMatrix
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
@@ -440,7 +440,7 @@() => {}
Inherited from Object3D.onAfterRender
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
@@ -476,10 +476,10 @@() => {}
Inherited from Object3D.onBeforeRender
Object's parent in the scene graph.
null
Inherited from Object3D.parent
Readonly
positionInherited from Object3D.positionnew THREE.Vector3()
- that is (0, 0,
-
Readonly
quaternionInherited from Object3D.quaternionnew THREE.Quaternion()
- that is (0,
-
false
Inherited from Object3D.receiveShadow
0
Inherited from Object3D.renderOrder
Readonly
rotationInherited from Object3D.rotationnew THREE.Euler()
- that is (0, 0, 0
-
Readonly
scalenew THREE.Vector3( 1, 1, 1 )
Inherited from Object3D.scale
Readonly
typeObject3D
Inherited from Object3D.type
Readonly
unit
Inherited from Object3D.up
-
{}
Inherited from Object3D.userData
This gets automatically assigned and shouldn't be edited.
Inherited from Object3D.uuid
-
true
Inherited from Object3D.visible
Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]Inherited from Object3D.add
The function that gets called when the event is fired.
Inherited from Object3D.addEventListener
Inherited from Object3D.addEventListener
+Inherited from Object3D.applyMatrix4
Inherited from Object3D.applyQuaternion
Inherited from Object3D.attach
Inherited from Object3D.clear
Inherited from Object3D.clone
Note: event listeners and user-defined callbacks (
Inherited from Object3D.copy
-
Fire an event type.
The event that gets fired.
Inherited from Object3D.dispatchEvent
Searches through an object and its children, starting with the object itself, and returns the first with a matching id.
Unique number of the object instance. Expects a Integer
Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.
@@ -903,11 +926,11 @@id
Inherited from Object3D.getObjectById
Searches through an object and its children, starting with the object itself, and returns the first with a matching name.
String to match to the children's Object3D.name property.
Note that for most objects the name is an empty string by default
Inherited from Object3D.getObjectByName
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
@@ -947,15 +970,15 @@value of the given property.
Inherited from Object3D.getObjectByProperty
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
@@ -973,11 +996,11 @@Value of the given property.
Inherited from Object3D.getObjectsByProperty
Inherited from Object3D.getWorldDirection
Inherited from Object3D.getWorldPosition
Inherited from Object3D.getWorldQuaternion
Inherited from Object3D.getWorldScale
The function that gets called when the event is fired.
Inherited from Object3D.hasEventListener
Inherited from Object3D.hasEventListener
+Inherited from Object3D.localToWorld
This method does not support objects having non-uniformly-sca
Inherited from Object3D.lookAt
-
Rotates the object to face a point in world space.
@@ -1158,7 +1199,7 @@This method does not support objects having non-uniformly-sca
Inherited from Object3D.lookAt
() => {}
Inherited from Object3D.raycast
Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]THREE.Group | Group for info on manually grouping objects.
Inherited from Object3D.remove
The listener function that gets removed.
Inherited from Object3D.removeEventListener
Inherited from Object3D.removeEventListener
+Inherited from Object3D.removeFromParent
The axis is assumed to be normalized.
Inherited from Object3D.rotateOnAxis
The axis is assumed to be normalized
Inherited from Object3D.rotateOnWorldAxis
Inherited from Object3D.rotateX
Inherited from Object3D.rotateY
Inherited from Object3D.rotateZ
Optional
setInherited from Object3D.setRotationFromAxisAngle
Inherited from Object3D.setRotationFromEuler
Note that this assumes that the upper 3x3 of m is a pure rota
Inherited from Object3D.setRotationFromMatrix
-
Inherited from Object3D.setRotationFromQuaternion
Inherited from Object3D.toJSON
The axis is assumed to be normalized.
Inherited from Object3D.translateOnAxis
Inherited from Object3D.translateX
Inherited from Object3D.translateY
Inherited from Object3D.translateZ
Note: Modifying the scene graph inside the callback is discou
Inherited from Object3D.traverse
Note: Modifying the scene graph inside the callback is discou
Inherited from Object3D.traverseAncestors
Descendants of invisible objects are not traversed.
Inherited from Object3D.traverseVisible
Optional
force: booleanInherited from Object3D.updateMatrix
Inherited from Object3D.updateMatrixWorld
Inherited from Object3D.updateWorldMatrix
Inherited from Object3D.worldToLocal
Generated using TypeDoc
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Readonly
idReadonly
Optional
initReadonly
nameReadonly
Optional
disposeCaLLed when a plugin must release its resources
-Optional
initOptional
onOptional
onOptional
onWhen a scene is entered and nearly initialized.
-Optional
onWhen a scene has exited. Dispose resources here.
-Optional
onOptional
Returns void
Optional
onOptional
Returns void
Optional
onOptional
onOptional
Returns void
Optional
onOptional
Returns void
Optional
onCalled before render, every render tick
+Optional
onUIMessageOptional
Returns void
Generated using TypeDoc
Internal
Inherited from EmscriptenPreamble.ALLOC_NORMAL
Inherited from EmscriptenPreamble.HEAP16
Inherited from EmscriptenPreamble.HEAP32
Inherited from EmscriptenPreamble.HEAP8
Inherited from EmscriptenPreamble.HEAPU16
Inherited from EmscriptenPreamble.HEAPU32
Inherited from EmscriptenPreamble.HEAPU8
Inherited from EmscriptenPreamble.UTF8ToString
Inherited from EmscriptenPreamble._free
Inherited from EmscriptenPreamble.allocate
Inherited from EmscriptenPreamble.AsciiToString
Inherited from EmscriptenPreamble.UTF16ToString
Inherited from EmscriptenPreamble.UTF32ToString
Inherited from EmscriptenPreamble.ccall
Inherited from EmscriptenPreamble.cwrap
Inherited from EmscriptenPreamble.intArrayFromString
Inherited from EmscriptenPreamble.intArrayToString
Inherited from EmscriptenPreamble.stringToUTF16
Inherited from EmscriptenPreamble.stringToUTF32
Inherited from EmscriptenPreamble.stringToUTF8
Inherited from EmscriptenPreamble.writeArrayToMemory
Inherited from EmscriptenPreamble.writeAsciiToMemory
Generated using TypeDoc
Internal
Optional
valueGenerated using TypeDoc
Generated using TypeDoc
Internal
Optional
startGenerated using TypeDoc
Internal
Optional
Optional
username?: stringOptional
configOptional
descriptionOptional
devOptional
keywordsOptional
peerOptional
permissionsOptional
repositoryOptional
Optional
url?: stringGenerated using TypeDoc
Internal
Generated using TypeDoc
Internal
Internal
Generated using TypeDoc
Internal
Optional
developmentGenerated using TypeDoc
Generated using TypeDoc
Internal
Optional
panOptional
volumeGenerated using TypeDoc
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
[]
Inherited from Group.animations
false
Inherited from Group.castShadow
Array with object's children.
[]
Inherited from Group.children
Optional
customundefined
Inherited from Group.customDepthMaterial
Optional
customundefined
Inherited from Group.customDistanceMaterial
true
Inherited from Group.frustumCulled
Readonly
idNote that ids are assigned in chronological order: 1, 2, 3, .
Inherited from Group.id
-
Readonly
istrue
Inherited from Group.isObject3D
new THREE.Layers()
Inherited from Group.layers
new THREE.Matrix4()
Inherited from Group.matrix
new THREE.Matrix4()
Inherited from Group.matrixWorld
false
Inherited from Group.matrixWorldNeedsUpdate
Readonly
modelnew THREE.Matrix4()
Inherited from Group.modelViewMatrix
""
Inherited from Group.name
Readonly
normalnew THREE.Matrix3()
Inherited from Group.normalMatrix
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
@@ -359,7 +359,7 @@() => {}
Inherited from Group.onAfterRender
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
@@ -395,10 +395,10 @@() => {}
Inherited from Group.onBeforeRender
Object's parent in the scene graph.
null
Inherited from Group.parent
Readonly
positionInherited from Group.positionnew THREE.Vector3()
- that is (0, 0,
-
Readonly
quaternionInherited from Group.quaternionnew THREE.Quaternion()
- that is (0,
-
false
Inherited from Group.receiveShadow
0
Inherited from Group.renderOrder
Readonly
rotationInherited from Group.rotationnew THREE.Euler()
- that is (0, 0, 0
-
Readonly
scalenew THREE.Vector3( 1, 1, 1 )
Inherited from Group.scale
Readonly
type
Inherited from Group.up
-
Overrides Group.userData
This gets automatically assigned and shouldn't be edited.
Inherited from Group.uuid
-
true
Inherited from Group.visible
Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]Inherited from Group.add
The function that gets called when the event is fired.
Inherited from Group.addEventListener
Inherited from Group.addEventListener
+Inherited from Group.applyMatrix4
Inherited from Group.applyQuaternion
Inherited from Group.attach
Inherited from Group.clear
Inherited from Group.clone
Note: event listeners and user-defined callbacks (
Inherited from Group.copy
-
Fire an event type.
The event that gets fired.
Inherited from Group.dispatchEvent
Searches through an object and its children, starting with the object itself, and returns the first with a matching id.
Unique number of the object instance. Expects a Integer
Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.
@@ -750,11 +773,11 @@id
Inherited from Group.getObjectById
Searches through an object and its children, starting with the object itself, and returns the first with a matching name.
String to match to the children's Object3D.name property.
Note that for most objects the name is an empty string by default
Inherited from Group.getObjectByName
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
@@ -794,15 +817,15 @@value of the given property.
Inherited from Group.getObjectByProperty
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
@@ -820,11 +843,11 @@Value of the given property.
Inherited from Group.getObjectsByProperty
Inherited from Group.getWorldDirection
Inherited from Group.getWorldPosition
Inherited from Group.getWorldQuaternion
Inherited from Group.getWorldScale
The function that gets called when the event is fired.
Inherited from Group.hasEventListener
Inherited from Group.hasEventListener
+Inherited from Group.localToWorld
This method does not support objects having non-uniformly-sca
Inherited from Group.lookAt
-
Rotates the object to face a point in world space.
@@ -1005,7 +1046,7 @@This method does not support objects having non-uniformly-sca
Inherited from Group.lookAt
() => {}
Inherited from Group.raycast
Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]THREE.Group | Group for info on manually grouping objects.
Inherited from Group.remove
The listener function that gets removed.
Inherited from Group.removeEventListener
Inherited from Group.removeEventListener
+Inherited from Group.removeFromParent
The axis is assumed to be normalized.
Inherited from Group.rotateOnAxis
The axis is assumed to be normalized
Inherited from Group.rotateOnWorldAxis
Inherited from Group.rotateX
Inherited from Group.rotateY
Inherited from Group.rotateZ
Inherited from Group.setRotationFromAxisAngle
Inherited from Group.setRotationFromEuler
Note that this assumes that the upper 3x3 of m is a pure rota
Inherited from Group.setRotationFromMatrix
-
Inherited from Group.setRotationFromQuaternion
Inherited from Group.toJSON
The axis is assumed to be normalized.
Inherited from Group.translateOnAxis
Inherited from Group.translateX
Inherited from Group.translateY
Inherited from Group.translateZ
Note: Modifying the scene graph inside the callback is discou
Inherited from Group.traverse
Note: Modifying the scene graph inside the callback is discou
Inherited from Group.traverseAncestors
Descendants of invisible objects are not traversed.
Inherited from Group.traverseVisible
Inherited from Group.updateMatrix
Inherited from Group.updateMatrixWorld
Inherited from Group.updateWorldMatrix
Inherited from Group.worldToLocal
Generated using TypeDoc
Generated using TypeDoc
Internal
[]
Inherited from Mesh.animations
false
Inherited from Mesh.castShadow
Array with object's children.
[]
Inherited from Mesh.children
Optional
customundefined
Inherited from Mesh.customDepthMaterial
Optional
customundefined
Inherited from Mesh.customDistanceMaterial
true
Inherited from Mesh.frustumCulled
An instance of THREE.BufferGeometry | BufferGeometry (or derived classes), defining the object's structure.
{@
Inherited from Mesh.geometry
-- Defined in node_modules/@types/three/src/objects/Mesh.d.ts:52
+Defined in node_modules/@types/three/src/objects/Mesh.d.ts:51
Readonly
id
id: number
@@ -212,7 +212,7 @@ Remarks
Note that ids are assigned in chronological order: 1, 2, 3, .
Inherited from Mesh.id
Readonly
istrue
Inherited from Mesh.isMesh
Readonly
istrue
Inherited from Mesh.isObject3D
new THREE.Layers()
Inherited from Mesh.layers
{@
Inherited from Mesh.material
-- Defined in node_modules/@types/three/src/objects/Mesh.d.ts:58
new THREE.Matrix4()
Inherited from Mesh.matrix
new THREE.Matrix4()
Inherited from Mesh.matrixWorld
false
Inherited from Mesh.matrixWorldNeedsUpdate
Readonly
modelnew THREE.Matrix4()
Inherited from Mesh.modelViewMatrix
Optional
morphInherited from Mesh.morphTargetDictionaryundefined
, but rebuilt by
-
Optional
morphInherited from Mesh.morphTargetInfluencesundefined
, but reset to a blank array
-
""
Inherited from Mesh.name
Readonly
normalnew THREE.Matrix3()
Inherited from Mesh.normalMatrix
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
@@ -416,7 +416,7 @@() => {}
Inherited from Mesh.onAfterRender
This function is called with the following parameters: renderer, scene, camera, geometry, material, group.
@@ -452,10 +452,10 @@() => {}
Inherited from Mesh.onBeforeRender
Object's parent in the scene graph.
null
Inherited from Mesh.parent
Readonly
positionInherited from Mesh.positionnew THREE.Vector3()
- that is (0, 0,
-
Readonly
quaternionInherited from Mesh.quaternionnew THREE.Quaternion()
- that is (0,
-
false
Inherited from Mesh.receiveShadow
0
Inherited from Mesh.renderOrder
Readonly
rotationInherited from Mesh.rotationnew THREE.Euler()
- that is (0, 0, 0
-
Readonly
scalenew THREE.Vector3( 1, 1, 1 )
Inherited from Mesh.scale
Readonly
typeMesh
Inherited from Mesh.type
Inherited from Mesh.up
-
Overrides Mesh.userData
This gets automatically assigned and shouldn't be edited.
Inherited from Mesh.uuid
-
true
Inherited from Mesh.visible
Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]Inherited from Mesh.add
The function that gets called when the event is fired.
Inherited from Mesh.addEventListener
Inherited from Mesh.addEventListener
+Inherited from Mesh.applyMatrix4
Inherited from Mesh.applyQuaternion
Inherited from Mesh.attach
Inherited from Mesh.clear
Inherited from Mesh.clone
Note: event listeners and user-defined callbacks (
Inherited from Mesh.copy
-
Fire an event type.
The event that gets fired.
Inherited from Mesh.dispatchEvent
Searches through an object and its children, starting with the object itself, and returns the first with a matching id.
Unique number of the object instance. Expects a Integer
Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.
@@ -809,11 +832,11 @@id
Inherited from Mesh.getObjectById
Searches through an object and its children, starting with the object itself, and returns the first with a matching name.
String to match to the children's Object3D.name property.
Note that for most objects the name is an empty string by default
Inherited from Mesh.getObjectByName
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
@@ -853,15 +876,15 @@value of the given property.
Inherited from Mesh.getObjectByProperty
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
@@ -879,11 +902,11 @@Value of the given property.
Inherited from Mesh.getObjectsByProperty
Inherited from Mesh.getVertexPosition
Inherited from Mesh.getWorldDirection
Inherited from Mesh.getWorldPosition
Inherited from Mesh.getWorldQuaternion
Inherited from Mesh.getWorldScale
The function that gets called when the event is fired.
Inherited from Mesh.hasEventListener
Inherited from Mesh.hasEventListener
+Inherited from Mesh.localToWorld
This method does not support objects having non-uniformly-sca
Inherited from Mesh.lookAt
-
Rotates the object to face a point in world space.
@@ -1088,7 +1129,7 @@This method does not support objects having non-uniformly-sca
Inherited from Mesh.lookAt
() => {}
Inherited from Mesh.raycast
Rest
...object: Object3D<Event>[]Rest
...object: Object3D<Object3DEventMap>[]THREE.Group | Group for info on manually grouping objects.
Inherited from Mesh.remove
The listener function that gets removed.
Inherited from Mesh.removeEventListener
Inherited from Mesh.removeEventListener
+Inherited from Mesh.removeFromParent
The axis is assumed to be normalized.
Inherited from Mesh.rotateOnAxis
The axis is assumed to be normalized
Inherited from Mesh.rotateOnWorldAxis
Inherited from Mesh.rotateX
Inherited from Mesh.rotateY
Inherited from Mesh.rotateZ
Inherited from Mesh.setRotationFromAxisAngle
Inherited from Mesh.setRotationFromEuler
Note that this assumes that the upper 3x3 of m is a pure rota
Inherited from Mesh.setRotationFromMatrix
-
Inherited from Mesh.setRotationFromQuaternion
Inherited from Mesh.toJSON
The axis is assumed to be normalized.
Inherited from Mesh.translateOnAxis
Inherited from Mesh.translateX
Inherited from Mesh.translateY
Inherited from Mesh.translateZ
Note: Modifying the scene graph inside the callback is discou
Inherited from Mesh.traverse
Note: Modifying the scene graph inside the callback is discou
Inherited from Mesh.traverseAncestors
Descendants of invisible objects are not traversed.
Inherited from Mesh.traverseVisible
Inherited from Mesh.updateMatrix
Inherited from Mesh.updateMatrixWorld
Inherited from Mesh.updateWorldMatrix
Inherited from Mesh.worldToLocal
Generated using TypeDoc
Internal
Internal
spriteGenerated using TypeDoc
Inherited from UnitStruct.airWeaponCooldown
+Inherited from UnitStruct.currentSpeed
+Inherited from UnitStruct.currentVelocityDirection
+Inherited from UnitStruct.direction
Inherited from UnitStruct.energy
Optional
selected?: booleanInherited from UnitStruct.groundWeaponCooldown
+Inherited from UnitStruct.hp
Inherited from UnitStruct.id
Inherited from UnitStruct.kills
Inherited from UnitStruct.moveTargetX
Inherited from UnitStruct.moveTargetY
Inherited from UnitStruct.movementFlags
Inherited from UnitStruct.nextMovementWaypointX
Inherited from UnitStruct.nextMovementWaypointY
Inherited from UnitStruct.nextTargetWaypointX
Inherited from UnitStruct.nextTargetWaypointY
Inherited from UnitStruct.order
Inherited from UnitStruct.orderTargetAddr
Inherited from UnitStruct.orderTargetUnit
Inherited from UnitStruct.orderTargetX
Inherited from UnitStruct.orderTargetY
Inherited from UnitStruct.owner
Inherited from UnitStruct.remainingBuildTime
Inherited from UnitStruct.resourceAmount
Inherited from UnitStruct.shields
Inherited from UnitStruct.spellCooldown
+Inherited from UnitStruct.spriteAddr
+Internal
spriteInherited from UnitStruct.spriteIndex
Inherited from UnitStruct.statusFlags
Internal
subunitInherited from UnitStruct.subunit
Inherited from UnitStruct.subunitId
Inherited from UnitStruct.typeId
Inherited from UnitStruct.x
Inherited from UnitStruct.y
Generated using TypeDoc
Generated using TypeDoc
Internal
Inherited from FlingyStruct.currentSpeed
+Inherited from FlingyStruct.currentVelocityDirection
+Inherited from FlingyStruct.direction
Inherited from FlingyStruct.hp
Inherited from FlingyStruct.moveTargetX
Inherited from FlingyStruct.moveTargetY
Inherited from FlingyStruct.movementFlags
Inherited from FlingyStruct.nextMovementWaypointX
Inherited from FlingyStruct.nextMovementWaypointY
Inherited from FlingyStruct.nextTargetWaypointX
Inherited from FlingyStruct.nextTargetWaypointY
Inherited from FlingyStruct.spriteAddr
+Internal
spriteInherited from FlingyStruct.spriteIndex
Internal
subunitInherited from FlingyStruct.x
Inherited from FlingyStruct.y
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Internal
Optional
audio?: { Optional
Optional
sound?: numberOptional
input?: { Optional
input?: { Optional
cameraOptional
Optional
unitOptional
vrOptional
zoomOptional
minimap?: { Optional
Optional
toneOptional
session?: { Optional
session?: { Optional
audioOptional
sandbox?: booleanOptional
type?: "replay" | "live" | "map"Optional
type?: "replay" | "map"Optional
silentUpdate: booleanOptional
silentUpdate: booleanGenerated using TypeDoc
Internal
Optional
audio?: { global?: number | undefined; music?: number | undefined; sound?: number | undefined; playIntroSounds?: boolean | undefined; }Optional
input?: { sceneController?: string | undefined; dampingFactor?: number | undefined; movementSpeed?: number | undefined; rotateSpeed?: number | undefined; cameraShakeStrength?: number | undefined; zoomLevels?: [(number | undefined)?, (number | undefined)?, (number | undefined)?] | undefined; unitSelection?: boolean | undefined; cursorVisible?: boolean | undefined; }Optional
input?: { sceneController?: string | undefined; vrController?: string | undefined; dampingFactor?: number | undefined; movementSpeed?: number | undefined; rotateSpeed?: number | undefined; cameraShakeStrength?: number | undefined; zoomLevels?: [(number | undefined)?, (number | undefined)?, (number | undefined)?] | undefined; unitSelection?: boolean | undefined; cursorVisible?: boolean | undefined; }Optional
minimap?: { mode?: "2d" | "3d" | undefined; position?: [(number | undefined)?, (number | undefined)?] | undefined; rotation?: [(number | undefined)?, (number | undefined)?, (number | undefined)?] | undefined; scale?: number | undefined; enabled?: boolean | undefined; opacity?: number | undefined; softEdges?: boolean | undefined; interactive?: boolean | undefined; drawCamera?: boolean | undefined; }Optional
Optional
postprocessing3d?: { anisotropy?: number | undefined; antialias?: number | undefined; toneMapping?: number | undefined; bloom?: number | undefined; brightness?: number | undefined; contrast?: number | undefined; depthFocalLength?: number | undefined; depthBokehScale?: number | undefined; depthBlurQuality?: number | undefined; depthFocalRange?: number | undefined; fogOfWar?: number | undefined; envMap?: number | undefined; sunlightDirection?: [(number | undefined)?, (number | undefined)?, (number | undefined)?] | undefined; sunlightColor?: string | undefined; sunlightIntensity?: number | undefined; shadowQuality?: number | undefined; }Optional
session?: { type?: "replay" | "live" | "map" | undefined; sandbox?: boolean | undefined; audioListenerDistance?: number | undefined; }Optional
session?: { type?: "replay" | "map" | undefined; sandbox?: boolean | undefined; audioListenerDistance?: number | undefined; }Optional
audio?: { global?: number | undefined; music?: number | undefined; sound?: number | undefined; playIntroSounds?: boolean | undefined; }Optional
input?: { sceneController?: string | undefined; dampingFactor?: number | undefined; movementSpeed?: number | undefined; rotateSpeed?: number | undefined; cameraShakeStrength?: number | undefined; zoomLevels?: [(number | undefined)?, (number | undefined)?, (number | undefined)?] | undefined; unitSelection?: boolean | undefined; cursorVisible?: boolean | undefined; }Optional
input?: { sceneController?: string | undefined; vrController?: string | undefined; dampingFactor?: number | undefined; movementSpeed?: number | undefined; rotateSpeed?: number | undefined; cameraShakeStrength?: number | undefined; zoomLevels?: [(number | undefined)?, (number | undefined)?, (number | undefined)?] | undefined; unitSelection?: boolean | undefined; cursorVisible?: boolean | undefined; }Optional
minimap?: { mode?: "2d" | "3d" | undefined; position?: [(number | undefined)?, (number | undefined)?] | undefined; rotation?: [(number | undefined)?, (number | undefined)?, (number | undefined)?] | undefined; scale?: number | undefined; enabled?: boolean | undefined; opacity?: number | undefined; softEdges?: boolean | undefined; interactive?: boolean | undefined; drawCamera?: boolean | undefined; }Optional
Optional
postprocessing3d?: { anisotropy?: number | undefined; antialias?: number | undefined; toneMapping?: number | undefined; bloom?: number | undefined; brightness?: number | undefined; contrast?: number | undefined; depthFocalLength?: number | undefined; depthBokehScale?: number | undefined; depthBlurQuality?: number | undefined; depthFocalRange?: number | undefined; fogOfWar?: number | undefined; envMap?: number | undefined; sunlightDirection?: [(number | undefined)?, (number | undefined)?, (number | undefined)?] | undefined; sunlightColor?: string | undefined; sunlightIntensity?: number | undefined; shadowQuality?: number | undefined; }Optional
session?: { type?: "replay" | "live" | "map" | undefined; sandbox?: boolean | undefined; audioListenerDistance?: number | undefined; }Optional
session?: { type?: "replay" | "map" | undefined; sandbox?: boolean | undefined; audioListenerDistance?: number | undefined; }Generated using TypeDoc
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Most game assets excepting sprites / images.
Optional
Optional wireframeGenerated using TypeDoc
Internal
Internal
Generated using TypeDoc
Internal
Optional
Optional
js_Optional
js_Optional
Optional
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
+Optional
transformPath: ((path) => string[])Optional
silentUpdate: booleanGenerated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Optional
Optional light?: BufferGenerated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Optional
data?: anyGenerated using TypeDoc
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Generated using TypeDoc
Const
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Private
#privateOptional
useRefId: booleanOptional
priority: numberGenerated using TypeDoc
Generated using TypeDoc
Optional
teamcolorOptional
stride: numberGenerated using TypeDoc
Generated using TypeDoc
Internal
Optional
key: stringOptional
cache: IndexedDBCachePrivate
#privateProtected
Optional
cacheGenerated using TypeDoc
Inherited from UnitDATIncomingType.constructor
Inherited from UnitDATIncomingType.addonHorizontal
Inherited from UnitDATIncomingType.addonVertical
Inherited from UnitDATIncomingType.airWeapon
Inherited from UnitDATIncomingType.armor
Inherited from UnitDATIncomingType.armorUpgrade
Inherited from UnitDATIncomingType.buildScore
Inherited from UnitDATIncomingType.buildTime
Inherited from UnitDATIncomingType.constructionImage
Inherited from UnitDATIncomingType.destroyScore
Inherited from UnitDATIncomingType.direction
Inherited from UnitDATIncomingType.elevationLevel
Inherited from UnitDATIncomingType.flingy
Inherited from UnitDATIncomingType.groundWeapon
Inherited from UnitDATIncomingType.hp
Inherited from UnitDATIncomingType.index
Inherited from UnitDATIncomingType.infestation
Inherited from UnitDATIncomingType.mineralCost
Inherited from UnitDATIncomingType.pissSound
Inherited from UnitDATIncomingType.pissSoundEnd
Inherited from UnitDATIncomingType.pissSoundStart
Inherited from UnitDATIncomingType.placementHeight
Inherited from UnitDATIncomingType.placementWidth
Inherited from UnitDATIncomingType.portrait
Inherited from UnitDATIncomingType.readySound
Inherited from UnitDATIncomingType.requirements
Inherited from UnitDATIncomingType.shields
Inherited from UnitDATIncomingType.shieldsEnabled
Inherited from UnitDATIncomingType.sightRange
Inherited from UnitDATIncomingType.spaceProvided
Inherited from UnitDATIncomingType.spaceRequired
Inherited from UnitDATIncomingType.starEditAvailabilityFlags
Inherited from UnitDATIncomingType.starEditGroupFlags
Inherited from UnitDATIncomingType.subUnit1
Inherited from UnitDATIncomingType.subUnit2
Inherited from UnitDATIncomingType.supplyProvided
Inherited from UnitDATIncomingType.supplyRequired
Inherited from UnitDATIncomingType.unitSize
Inherited from UnitDATIncomingType.unitSizeDown
Inherited from UnitDATIncomingType.unitSizeLeft
Inherited from UnitDATIncomingType.unitSizeRight
Inherited from UnitDATIncomingType.unitSizeUp
Inherited from UnitDATIncomingType.vespeneCost
Inherited from UnitDATIncomingType.whatSound
Inherited from UnitDATIncomingType.whatSoundEnd
Inherited from UnitDATIncomingType.whatSoundStart
Inherited from UnitDATIncomingType.yesSound
Inherited from UnitDATIncomingType.yesSoundEnd
Inherited from UnitDATIncomingType.yesSoundStart
Generated using TypeDoc
Internal
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Internal
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Internal
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Internal
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
Returns void
Generated using TypeDoc
Returns a function that can be used to get player information.
Generated using TypeDoc
Generated using TypeDoc
All players in the current replay.
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
The replay header information.
Generated using TypeDoc
Returns user selected units (if any).
Generated using TypeDoc
Generated using TypeDoc
Optional
Returns void
Generated using TypeDoc
Internal
Generated using TypeDoc
- +
@@ -41,30 +42,30 @@This is Titan Reactor the WebGL renderer + plugin system. It consists of three primary parts in order to function:
+Replay data is not shared or transmitted by Titan Reactor. Plugins may only access your replay data by granting explicit permission.
-_Using node 16, yarn 1.22, python 3.10.7 + VS (for node-gyp builds)
+Using node 18+, yarn 1.x
+Clone this repo. The development branch is dev
and main
is used for releases.
In this repo:
git lfs install
git lfs fetch
yarn install
and then
-yarn dev
or yarn dist
Now we want to run Titan Reactor, the ui runtime, the plugins, and cascbridge:
+In your terminal run yarn web
, in another terminal run yarn runtime
, in the plugins repo npm run serve
and run cascbridge.
The OpenBW wasm files are included (via git lfs). If you wish to build them yourself visit the openbw fork repository.
-Titan Reactor is made available via the GPLv3 license. The documentation and functionality provided by Titan Reactor may only be utilized with assets provided by ownership of Starcraft. Starcraft® - Copyright © 1998 Blizzard Entertainment, Inc. All rights reserved. Starcraft and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries. Titan Reactor and any of its maintainers are in no way associated with or endorsed by Blizzard Entertainment®
+ +The documentation and functionality provided by Titan Reactor may only be utilized with assets provided by ownership of Starcraft. Starcraft® - Copyright © 1998 Blizzard Entertainment, Inc. All rights reserved. Starcraft and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries. Titan Reactor and any of its maintainers are in no way associated with or endorsed by Blizzard Entertainment®
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
airInherited from Partial.airWeaponCooldown
+Optional
buildOptional
currentInherited from Partial.currentSpeed
+Optional
currentInherited from Partial.currentVelocityDirection
+Optional
directionInherited from Partial.direction
Optional
energyInherited from Partial.energy
Optional
extrasInherited from Partial.extras
Optional
groundInherited from Partial.groundWeaponCooldown
+Optional
hpInherited from Partial.hp
Optional
idInherited from Partial.id
Optional
isInherited from Partial.isAttacking
+Optional
killsInherited from Partial.kills
Optional
loadedOptional
moveInherited from Partial.moveTargetX
Optional
moveInherited from Partial.moveTargetY
Optional
movementInherited from Partial.movementFlags
Optional
nextInherited from Partial.nextMovementWaypointX
Optional
nextInherited from Partial.nextMovementWaypointY
Optional
nextInherited from Partial.nextTargetWaypointX
Optional
nextInherited from Partial.nextTargetWaypointY
Optional
orderInherited from Partial.order
Optional
orderInherited from Partial.orderTargetAddr
Optional
orderInherited from Partial.orderTargetUnit
Optional
orderInherited from Partial.orderTargetX
Optional
orderInherited from Partial.orderTargetY
Optional
ownerInherited from Partial.owner
Optional
remainingInherited from Partial.remainingBuildTime
Optional
remainingOptional
researchOptional
resourceInherited from Partial.resourceAmount
Optional
shieldsInherited from Partial.shields
Optional
spellInherited from Partial.spellCooldown
+Optional
spriteInherited from Partial.spriteAddr
+Optional
Internal
spriteInherited from Partial.spriteIndex
Optional
statusInherited from Partial.statusFlags
Optional
Internal
subunitInherited from Partial.subunit
Optional
subunitInherited from Partial.subunitId
Optional
typeInherited from Partial.typeId
Optional
upgradeOptional
xInherited from Partial.x
Optional
yInherited from Partial.y
Optional
optionsOptional
stepOptional
typeOptional
Generated using TypeDoc
Generated using TypeDoc
Inherited from ThingyStruct.hp
Inherited from ThingyStruct.spriteAddr
+Internal
spriteInherited from ThingyStruct.spriteIndex
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
authorOptional
Optional username?: stringInherited from PluginPackage.author
Optional
configInherited from PluginPackage.config
+Overrides PluginPackage.config
Optional
dateOptional
descriptionInherited from PluginPackage.description
Optional
devInherited from PluginPackage.devDependencies
Inherited from PluginPackage.id
Optional
keywordsInherited from PluginPackage.keywords
Inherited from PluginPackage.name
Optional
nativeOptional
peerInherited from PluginPackage.peerDependencies
Optional
permissionsInherited from PluginPackage.permissions
-Optional
readmeOptional
repositoryOptional
Optional url?: stringInherited from PluginPackage.repository
Inherited from PluginPackage.version
Generated using TypeDoc
Optional
Optional
username?: stringOptional
configOptional
descriptionOptional
devOptional
keywordsOptional
peerOptional
permissionsOptional
repositoryOptional
Optional
url?: stringGenerated using TypeDoc
Generated using TypeDoc
Optional
mapOptional
mapOptional
replayGenerated using TypeDoc
Internal
Generated using TypeDoc
Internal
Internal
Optional
valueGenerated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Internal
spriteGenerated using TypeDoc
Inherited from UnitStruct.airWeaponCooldown
+Inherited from UnitStruct.currentSpeed
+Inherited from UnitStruct.currentVelocityDirection
+Inherited from UnitStruct.direction
Inherited from UnitStruct.energy
Optional
selected?: booleanInherited from UnitStruct.groundWeaponCooldown
+Inherited from UnitStruct.hp
Inherited from UnitStruct.id
Inherited from UnitStruct.kills
Inherited from UnitStruct.moveTargetX
Inherited from UnitStruct.moveTargetY
Inherited from UnitStruct.movementFlags
Inherited from UnitStruct.nextMovementWaypointX
Inherited from UnitStruct.nextMovementWaypointY
Inherited from UnitStruct.nextTargetWaypointX
Inherited from UnitStruct.nextTargetWaypointY
Inherited from UnitStruct.order
Inherited from UnitStruct.orderTargetAddr
Inherited from UnitStruct.orderTargetUnit
Inherited from UnitStruct.orderTargetX
Inherited from UnitStruct.orderTargetY
Inherited from UnitStruct.owner
Inherited from UnitStruct.remainingBuildTime
Inherited from UnitStruct.resourceAmount
Inherited from UnitStruct.shields
Inherited from UnitStruct.spellCooldown
+Inherited from UnitStruct.spriteAddr
+Internal
spriteInherited from UnitStruct.spriteIndex
Inherited from UnitStruct.statusFlags
Internal
subunitInherited from UnitStruct.subunit
Inherited from UnitStruct.subunitId
Inherited from UnitStruct.typeId
Inherited from UnitStruct.x
Inherited from UnitStruct.y
Generated using TypeDoc
Inherited from FlingyStruct.currentSpeed
+Inherited from FlingyStruct.currentVelocityDirection
+Inherited from FlingyStruct.direction
Inherited from FlingyStruct.hp
Inherited from FlingyStruct.moveTargetX
Inherited from FlingyStruct.moveTargetY
Inherited from FlingyStruct.movementFlags
Inherited from FlingyStruct.nextMovementWaypointX
Inherited from FlingyStruct.nextMovementWaypointY
Inherited from FlingyStruct.nextTargetWaypointX
Inherited from FlingyStruct.nextTargetWaypointY
Inherited from FlingyStruct.spriteAddr
+Internal
spriteInherited from FlingyStruct.spriteIndex
Internal
subunitInherited from FlingyStruct.x
Inherited from FlingyStruct.y
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Internal
Generated using TypeDoc
Generated using TypeDoc
Most game assets excepting sprites / images.
Optional
Optional wireframeGenerated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
InternalIScript Animation: IScriptOperations[]
-- Defined in index.d.ts:734
+Defined in index.d.ts:1079
Generated using TypeDoc
diff --git a/docs/ui/types/IScriptOperations.html b/docs/ui/types/IScriptOperations.html
index d6745e03..721cc124 100644
--- a/docs/ui/types/IScriptOperations.html
+++ b/docs/ui/types/IScriptOperations.html
@@ -18,7 +18,7 @@ Type alias IScriptOperationsInternal
IScript Operations: [string, number[]]
-- Defined in index.d.ts:739
+Defined in index.d.ts:1084
Generated using TypeDoc
diff --git a/docs/ui/types/LoDAT.html b/docs/ui/types/LoDAT.html
index 7c444530..32e2e48d 100644
--- a/docs/ui/types/LoDAT.html
+++ b/docs/ui/types/LoDAT.html
@@ -18,7 +18,7 @@ Type alias LoDAT
LoDAT: number[][][]
-- Defined in index.d.ts:830
+Defined in index.d.ts:1150
Generated using TypeDoc
diff --git a/docs/ui/types/Palettes.html b/docs/ui/types/Palettes.html
index 9143496a..2f36a809 100644
--- a/docs/ui/types/Palettes.html
+++ b/docs/ui/types/Palettes.html
@@ -25,7 +25,7 @@ Optional
Optional
light?: Buffer
Generated using TypeDoc
Internal
Generated using TypeDoc
Generated using TypeDoc
Images and game data.
Generated using TypeDoc
Internal
Generated using TypeDoc
Internal
Generated using TypeDoc
Generated using TypeDoc
UI_ STATE_ EVENT_ DIMENSIONS_ CHANGED: "dimensions" = "dimensions"
-- Defined in index.d.ts:81
+Defined in index.d.ts:59
Generated using TypeDoc
diff --git a/docs/ui/variables/UI_STATE_EVENT_ON_FRAME.html b/docs/ui/variables/UI_STATE_EVENT_ON_FRAME.html
index c75f7469..c60112d3 100644
--- a/docs/ui/variables/UI_STATE_EVENT_ON_FRAME.html
+++ b/docs/ui/variables/UI_STATE_EVENT_ON_FRAME.html
@@ -18,7 +18,7 @@ Variable UI_STATE_EVENT_ON_FRAMEConstUI_ STATE_ EVENT_ ON_ FRAME: "frame" = "frame"
-- Defined in index.d.ts:270
+Defined in index.d.ts:182
Generated using TypeDoc
diff --git a/docs/ui/variables/UI_STATE_EVENT_PRODUCTION.html b/docs/ui/variables/UI_STATE_EVENT_PRODUCTION.html
index b1326498..8d4a1a27 100644
--- a/docs/ui/variables/UI_STATE_EVENT_PRODUCTION.html
+++ b/docs/ui/variables/UI_STATE_EVENT_PRODUCTION.html
@@ -18,7 +18,7 @@ Variable UI_STATE_EVENT_PRODUCTIONConst
UI_ STATE_ EVENT_ PRODUCTION: "production" = "production"
-- Defined in index.d.ts:275
+Defined in index.d.ts:187
Generated using TypeDoc
diff --git a/docs/ui/variables/UI_STATE_EVENT_SCREEN_CHANGED.html b/docs/ui/variables/UI_STATE_EVENT_SCREEN_CHANGED.html
index 0ef0bba4..04cc486d 100644
--- a/docs/ui/variables/UI_STATE_EVENT_SCREEN_CHANGED.html
+++ b/docs/ui/variables/UI_STATE_EVENT_SCREEN_CHANGED.html
@@ -18,7 +18,7 @@ Variable UI_STATE_EVENT_SCREEN_CHANGEDCon
UI_ STATE_ EVENT_ SCREEN_ CHANGED: "screen" = "screen"
-- Defined in index.d.ts:94
+Defined in index.d.ts:72
Generated using TypeDoc
diff --git a/docs/ui/variables/UI_STATE_EVENT_UNITS_SELECTED.html b/docs/ui/variables/UI_STATE_EVENT_UNITS_SELECTED.html
index 54f36c00..d7453338 100644
--- a/docs/ui/variables/UI_STATE_EVENT_UNITS_SELECTED.html
+++ b/docs/ui/variables/UI_STATE_EVENT_UNITS_SELECTED.html
@@ -18,7 +18,7 @@ Variable UI_STATE_EVENT_UNITS_SELECTEDCon
UI_ STATE_ EVENT_ UNITS_ SELECTED: "units" = "units"
-- Defined in index.d.ts:280
+Defined in index.d.ts:192
Generated using TypeDoc
diff --git a/docs/ui/variables/UI_STATE_EVENT_WORLD_CHANGED.html b/docs/ui/variables/UI_STATE_EVENT_WORLD_CHANGED.html
index 281ef7db..81effd1f 100644
--- a/docs/ui/variables/UI_STATE_EVENT_WORLD_CHANGED.html
+++ b/docs/ui/variables/UI_STATE_EVENT_WORLD_CHANGED.html
@@ -18,7 +18,7 @@ Variable UI_STATE_EVENT_WORLD_CHANGEDCons
UI_ STATE_ EVENT_ WORLD_ CHANGED: "world" = "world"
-- Defined in index.d.ts:103
+Defined in index.d.ts:82
Generated using TypeDoc
diff --git a/docs/ui/variables/assets-1.html b/docs/ui/variables/assets-1.html
index 8a2438b9..842a158d 100644
--- a/docs/ui/variables/assets-1.html
+++ b/docs/ui/variables/assets-1.html
@@ -20,7 +20,7 @@ Variable assetsConst
-- Defined in index.d.ts:1311
+Defined in index.d.ts:1250
Generated using TypeDoc
diff --git a/docs/ui/variables/enums.html b/docs/ui/variables/enums.html
index da8d367b..3d81a1f4 100644
--- a/docs/ui/variables/enums.html
+++ b/docs/ui/variables/enums.html
@@ -20,7 +20,7 @@ Variable enumsConst
-- Defined in index.d.ts:1030
+Defined in index.d.ts:1242
Generated using TypeDoc
diff --git a/esbuild.plugin-host.ts b/esbuild.plugin-host.ts
new file mode 100644
index 00000000..275eb1ce
--- /dev/null
+++ b/esbuild.plugin-host.ts
@@ -0,0 +1,21 @@
+const esbuild = require("esbuild");
+// const { copy, move } = require("fs-extra");
+const { rmSync } = require("fs");
+// const path = require("path");
+// const { createHash } = require("crypto");
+
+const OUTDIR = "dist/plugin-host-es";
+
+rmSync(OUTDIR, { recursive: true, force: true });
+
+(async () => {
+ await esbuild.build({
+ entryPoints: ["src/utils/types/plugin-host.ts"],
+ outdir: OUTDIR,
+ keepNames: true,
+ minify: false,
+ format: "esm",
+ bundle: true,
+ packages: 'external',
+ });
+})();
diff --git a/index.html b/index.html
index b53a6871..4c94b759 100644
--- a/index.html
+++ b/index.html
@@ -2,9 +2,9 @@
-
-
-
+
+
+
diff --git a/package.json b/package.json
index fa19eaf0..d5099608 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,8 @@
{
"name": "titan-reactor",
"productName": "Titan Reactor",
- "version": "0.7.0",
+ "version": "0.7.1",
"description": "An OpenBW Renderer",
- "main": "dist/electron/main/index.js",
- "typings": "dist/types/index.d.ts",
"scripts": {
"sanity": "yarn types:check && yarn test:once",
"types:check": "tsc --noEmit",
@@ -14,23 +12,36 @@
"test:build": "http-server .\\dist\\titan-reactor -p 80",
"lint": "yarn eslint . && yarn prettier --check .",
"postinstall": "git apply -v --stat --directory=node_modules/scm-extractor build/patches/scm-extractor.patch",
- "generate:api-types": "ts-node -T .\\build\\api-types\\index.ts",
- "generate:plugin-api-docs": "typedoc --out docs/host --tsconfig tsconfig.host-api.json build/api-types/host/index.d.ts && typedoc --out docs/ui --tsconfig tsconfig.ui-api.json build/api-types/ui/index.d.ts",
+ "build:api-types": "ts-node -T .\\build\\api-types\\index.ts",
+ "build:plugin-api-docs": "typedoc --out docs/host --tsconfig tsconfig.host-api.json build/api-types/host/index.d.ts && typedoc --out docs/ui --tsconfig tsconfig.ui-api.json build/api-types/ui/index.d.ts",
"build:runtime": "ts-node -T ./esbuild.runtime.ts",
"serve:runtime": "http-server .\\dist\\runtime -p 8090 --cors",
"web": "vite -c vite.config.web.ts",
"runtime": "yarn build:runtime && yarn serve:runtime",
"build": "vite build -c vite.config.web.ts && yarn build:runtime"
},
+ "files": [
+ "./types",
+ "./host",
+ "./ui",
+ "./src",
+ "package.json",
+ "README.md"
+ ],
+ "types": "./types/index.d.ts",
+ "exports": {
+ "./host/*": "./dist/host/*",
+ "./ui/*": "./dist/ui/*"
+ },
"repository": {
"type": "git",
- "url": "git+https://github.com/imbateam-gg/titan-reactor.git"
+ "url": "git+https://github.com/alexpineda/titan-reactor.git"
},
"author": "Alex Pineda ",
"bugs": {
- "url": "https://github.com/imbateam-gg/titan-reactor/issues"
+ "url": "https://github.com/alexpineda/titan-reactor/issues"
},
- "homepage": "https://github.com/imbateam-gg/titan-reactor#readme",
+ "homepage": "https://www.blacksheepwall.tv",
"debug": {
"env": {
"VITE_DEV_SERVER_HOSTNAME": "127.0.0.1",
@@ -54,7 +65,7 @@
"bl": "^5.0.0",
"buffer": "^6.0.3",
"bw-chk": "^1.4.0",
- "camera-controls": "1.37.2",
+ "camera-controls": "2.7.3",
"concat-stream": "^2.0.0",
"deep-diff": "^1.0.2",
"deepmerge": "^4.2.2",
@@ -82,12 +93,10 @@
"three-gpu-pathtracer": "^0.0.6",
"three-instanced-uniforms-mesh": "^0.46.0",
"three-janitor": "^2.0.1",
- "typescript": "^4.8.4",
"zustand": "4.1.1"
},
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
- "@types/bl": "^5.0.2",
"@types/concat-stream": "^2.0.0",
"@types/d3-ease": "^3.0.0",
"@types/deep-diff": "^1.0.1",
@@ -137,9 +146,10 @@
"source-map-support": "^0.5.19",
"spectorjs": "^0.9.27",
"ts-jest": "^29.0.1",
- "ts-morph": "^16.0.0",
+ "ts-morph": "^20.0.0",
"ts-node": "^10.9.1",
"typedoc": "^0.25.1",
+ "typescript": "^5.2.2",
"vite": "^3.1.3",
"webgl-lint": "^1.9.3"
},
diff --git a/src/camera/game-viewport.ts b/src/camera/game-viewport.ts
index 75c837aa..a6be371c 100644
--- a/src/camera/game-viewport.ts
+++ b/src/camera/game-viewport.ts
@@ -23,11 +23,11 @@ export class GameViewPort extends Sizeable {
camera: PerspectiveCamera | OrthographicCamera;
projectedView = new ProjectedCameraView();
orbit!: CameraControls;
- viewport = new Vector4( 0, 0, 300, 200 );
+ viewport = new Vector4(0, 0, 300, 200);
cameraShake = new CameraShake();
shakeCalculation = {
- frequency: new Vector3( 10, 20, 7.5 ),
- duration: new Vector3( 1000, 1000, 1000 ),
+ frequency: new Vector3(10, 20, 7.5),
+ duration: new Vector3(1000, 1000, 1000),
strength: new Vector3(),
needsUpdate: false,
};
@@ -38,11 +38,12 @@ export class GameViewPort extends Sizeable {
needsUpdate = true;
rotateSprites = false;
+ autoUpdateSmoothTime = true;
audioType: "stereo" | "3d" | null = "stereo";
#direction32 = 0;
- set renderMode3D( val: boolean ) {
- if ( val !== this.#renderMode3D ) {
+ set renderMode3D(val: boolean) {
+ if (val !== this.#renderMode3D) {
this.#renderMode3D = val;
this.needsUpdate = true;
}
@@ -56,38 +57,31 @@ export class GameViewPort extends Sizeable {
return this.#enabled;
}
- set enabled( val: boolean ) {
+ set enabled(val: boolean) {
this.#enabled = val;
}
- constructor( surface: Surface, enabled = false ) {
- super( surface );
+ constructor(surface: Surface, enabled = false) {
+ super(surface);
this.surface = surface;
- this.camera = new PerspectiveCamera(
- 15,
- surface.aspect,
- 0.1,
- 500
- );
+ this.camera = new PerspectiveCamera(15, surface.aspect, 0.1, 500);
this.enabled = enabled;
this.#bindOrbitControls();
}
#bindOrbitControls() {
- this.orbit = new CameraControls( this.camera, this.surface.canvas );
+ this.orbit = new CameraControls(this.camera, this.surface.canvas);
this.orbit.mouseButtons.left = CameraControls.ACTION.NONE;
this.orbit.mouseButtons.right = CameraControls.ACTION.NONE;
this.orbit.mouseButtons.middle = CameraControls.ACTION.NONE;
this.orbit.mouseButtons.wheel = CameraControls.ACTION.NONE;
}
- set orthographic( value: boolean ) {
- this.camera = (
- value
- ? new OrthographicCamera()
- : new PerspectiveCamera( 15, this.surface.aspect, 0.1, 500 )
- );
+ set orthographic(value: boolean) {
+ this.camera = value
+ ? new OrthographicCamera()
+ : new PerspectiveCamera(15, this.surface.aspect, 0.1, 500);
this.constrainToAspect = !value;
this.orbit.dispose();
this.#bindOrbitControls();
@@ -101,17 +95,17 @@ export class GameViewPort extends Sizeable {
const target = new Vector3();
const position = new Vector3();
- this.orbit.getTarget( target );
- this.orbit.getPosition( position );
+ this.orbit.getTarget(target);
+ this.orbit.getPosition(position);
return {
target: target,
position: position,
};
}
- shakeStart( elapsed: number, strength: number ) {
- if ( strength && this.shakeCalculation.needsUpdate ) {
- this.shakeCalculation.strength.multiplyScalar( strength );
+ shakeStart(elapsed: number, strength: number) {
+ if (strength && this.shakeCalculation.needsUpdate) {
+ this.shakeCalculation.strength.multiplyScalar(strength);
this.cameraShake.shake(
elapsed,
this.shakeCalculation.duration,
@@ -119,34 +113,35 @@ export class GameViewPort extends Sizeable {
this.shakeCalculation.strength
);
this.shakeCalculation.needsUpdate = false;
- this.shakeCalculation.strength.setScalar( 0 );
+ this.shakeCalculation.strength.setScalar(0);
}
- this.cameraShake.update( elapsed, this.camera );
+ this.cameraShake.update(elapsed, this.camera);
}
shakeEnd() {
- this.cameraShake.restore( this.camera );
+ this.cameraShake.restore(this.camera);
}
- update( targetDamping: number, delta: number ) {
-
+ update(targetSmoothTime: number, delta: number) {
this.viewport.copy(this.getActualSize());
this.#direction32 = this.rotateSprites
- ? getDirection32( this.projectedView.center, this.camera.getWorldPosition( _target ))
+ ? getDirection32(
+ this.projectedView.center,
+ this.camera.getWorldPosition(_target)
+ )
: 0;
- this.orbit.dampingFactor = MathUtils.damp(
- this.orbit.dampingFactor,
- targetDamping,
- 0.0001,
- delta
- );
- this.orbit.update( delta / 1000 );
-
- this.projectedView.update(
- this.camera,
- this.orbit.getTarget( _target )
- );
+ if (this.autoUpdateSmoothTime) {
+ this.orbit.smoothTime = MathUtils.damp(
+ this.orbit.smoothTime,
+ targetSmoothTime,
+ 0.0001,
+ delta
+ );
+ }
+ this.orbit.update(delta / 1000);
+
+ this.projectedView.update(this.camera, this.orbit.getTarget(_target));
}
get direction32() {
diff --git a/src/camera/xr-viewport.ts b/src/camera/xr-viewport.ts
deleted file mode 100644
index cfd1bbdc..00000000
--- a/src/camera/xr-viewport.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-import { renderComposer } from "@render/render-composer";
-import { Group } from "three";
-import { GameViewPort } from "./game-viewport";
-
-// import { XRControllerModelFactory } from 'three/examples/jsm/webxr/XRControllerModelFactory';
-// import { XRHandModelFactory } from 'three/examples/jsm/webxr/XRHandModelFactory';
-
-
-/**
- * @public
- * A "view" into the game. Every viewport contains it's own camera, dimensions, and additional properties.
- */
-export class WebXRGameViewPort extends GameViewPort {
-
- user = new Group();
- get xr(){
- return renderComposer.glRenderer.xr;
- }
-
- constructor( ...args: ConstructorParameters) {
-
- console.log("WebXRGameViewPort")
- super(...args);
- this.orbit.enabled = false;
-
- }
-
- override update( targetDamping: number, delta: number ) {
- super.update( targetDamping, delta );
- }
-
- override dispose(): void {
- super.dispose();
- this.user.removeFromParent();
- }
-
- // initXR(xr: WebXRManager) {
- // const controller1 = xr.getController( 0 );
- // scene.add( controller1 );
-
- // const controller2 = xr.getController( 1 );
- // scene.add( controller2 );
-
- // const controllerModelFactory = new XRControllerModelFactory();
- // const handModelFactory = new XRHandModelFactory();
-
- // // Hand 1
- // const controllerGrip1 = xr.getControllerGrip( 0 );
- // controllerGrip1.add( controllerModelFactory.createControllerModel( controllerGrip1 ) );
- // scene.add( controllerGrip1 );
-
- // const hand1 = xr.getHand( 0 );
- // hand1.add( handModelFactory.createHandModel( hand1 ) );
-
- // scene.add( hand1 );
-
- // // Hand 2
- // const controllerGrip2 = xr.getControllerGrip( 1 );
- // controllerGrip2.add( controllerModelFactory.createControllerModel( controllerGrip2 ) );
- // scene.add( controllerGrip2 );
-
- // const hand2 = xr.getHand( 1 );
- // hand2.add( handModelFactory.createHandModel( hand2 ) );
- // scene.add( hand2 );
- // }
-
-}
diff --git a/src/common/default-settings.ts b/src/common/default-settings.ts
index ed1127dc..ee8515c9 100644
--- a/src/common/default-settings.ts
+++ b/src/common/default-settings.ts
@@ -1,17 +1,5 @@
import { SettingsV6 } from "./types";
-export const DEFAULT_PLUGIN_PACKAGES: string[] = [
- "@titan-reactor-plugins/clock",
- "@titan-reactor-plugins/player-colors",
- "@titan-reactor-plugins/camera-standard",
- "@titan-reactor-plugins/camera-overview",
- "@titan-reactor-plugins/camera-battle",
- "@titan-reactor-plugins/players-bar",
- "@titan-reactor-plugins/unit-selection-display",
- "@titan-reactor-plugins/production-bar",
- "@titan-reactor-plugins/unit-sounds",
-];
-
export const defaultSettingsV6: SettingsV6 = {
version: 6,
language: "en-US",
@@ -39,7 +27,7 @@ export const defaultSettingsV6: SettingsV6 = {
drawCamera: true,
},
input: {
- sceneController: "@titan-reactor-plugins/camera-standard",
+ sceneController: "@titan-reactor-plugins/auto-observer",
vrController: "@titan-reactor-plugins/vr-controller",
dampingFactor: 0.1,
cameraShakeStrength: 1,
diff --git a/src/common/enums/tech-tree.ts b/src/common/enums/tech-tree.ts
index 77d84321..f01d6617 100644
--- a/src/common/enums/tech-tree.ts
+++ b/src/common/enums/tech-tree.ts
@@ -168,6 +168,7 @@ export const techTree: TechTree = {
},
},
// ZERG ----------------------------------------------
+ [unitTypes.extractor]: {},
[unitTypes.creepColony]: {
units: {
builds: [ unitTypes.sunkenColony, unitTypes.sporeColony ],
diff --git a/src/common/get-app-settings-leva-config.ts b/src/common/get-app-settings-leva-config.ts
index e0f8239b..65e112c3 100644
--- a/src/common/get-app-settings-leva-config.ts
+++ b/src/common/get-app-settings-leva-config.ts
@@ -284,11 +284,11 @@ const getInputConfig = (
),
},
"input.dampingFactor": {
- label: "Camera Movement Damping",
+ label: "Camera Movement Time",
value: input.dampingFactor,
- min: 0.01,
- max: 0.1,
- step: 0.01,
+ min: 0.1,
+ max: 10,
+ step: 0.1,
},
"input.zoomLevels": {
label: "Camera Zoom Levels",
diff --git a/src/common/macros/default-macros.json b/src/common/macros/default-macros.json
index 22c48a7a..dc7eb500 100644
--- a/src/common/macros/default-macros.json
+++ b/src/common/macros/default-macros.json
@@ -8,9 +8,7 @@
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "KeyT"
- ],
+ "codes": ["KeyT"],
"onKeyUp": false
}
},
@@ -18,11 +16,7 @@
{
"type": "action",
"id": "624938cb-249d-4b04-9a6b-e942a64d0995",
- "path": [
- ":plugin",
- "@titan-reactor-plugins/camera-standard",
- "tilt"
- ],
+ "path": [":plugin", "@titan-reactor-plugins/camera-standard", "tilt"],
"operator": "Set",
"value": 35,
"group": 1
@@ -30,11 +24,7 @@
{
"type": "action",
"id": "504f2ac2-2c13-47b9-8b3d-32bd2578f616",
- "path": [
- ":plugin",
- "@titan-reactor-plugins/camera-standard",
- "tilt"
- ],
+ "path": [":plugin", "@titan-reactor-plugins/camera-standard", "tilt"],
"operator": "SetToDefault",
"value": 35,
"group": 2
@@ -46,16 +36,12 @@
{
"type": "condition",
"id": "3cfb107d-4f39-403e-8daa-ef64f6b58ea1",
- "path": [
- ":app",
- "input",
- "sceneController"
- ],
+ "path": [":app", "input", "sceneController"],
"comparator": "Equals",
"value": "@titan-reactor-plugins/camera-standard"
}
],
- "description": "Toggles the tilt of the camera up and down"
+ "description": "Toggles the tilt of the camera up and down ( Default Camera Only)"
},
{
"id": "a3f34c04-957a-4ac3-816b-ac0740fe38e4",
@@ -66,9 +52,7 @@
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "KeyP"
- ],
+ "codes": ["KeyP"],
"onKeyUp": false
}
},
@@ -76,9 +60,7 @@
{
"type": "action",
"id": "a18c3df7-e903-44ae-bbbd-9aa73f4bdd96",
- "path": [
- ":function"
- ],
+ "path": [":function"],
"operator": "Execute",
"value": "api.openBW.togglePause();\napi.simpleMessage(`⏯️`);",
"group": 1
@@ -90,11 +72,7 @@
{
"type": "condition",
"id": "27f54945-b793-41d4-bedd-b42e2015896a",
- "path": [
- ":app",
- "session",
- "type"
- ],
+ "path": [":app", "session", "type"],
"comparator": "Equals",
"value": "replay"
}
@@ -110,9 +88,7 @@
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "F5"
- ],
+ "codes": ["F5"],
"onKeyUp": false
}
},
@@ -120,11 +96,7 @@
{
"type": "action",
"id": "74f749ce-e219-4179-9e6a-c8d87d19581f",
- "path": [
- ":macro",
- "11fed136-304d-4ad8-95fb-74448b3be159",
- "program"
- ],
+ "path": [":macro", "11fed136-304d-4ad8-95fb-74448b3be159", "program"],
"operator": "Execute",
"value": true,
"group": 2
@@ -132,9 +104,7 @@
{
"type": "action",
"id": "9647b127-355e-47b5-940e-269864c4a91f",
- "path": [
- ":function"
- ],
+ "path": [":function"],
"operator": "Execute",
"value": "api.changeRenderMode();",
"group": 1
@@ -148,34 +118,20 @@
{
"id": "3f5fb9d4-2a67-4f7e-b70c-fad69f752067",
"name": "Minimap: Full Size",
- "trigger": {
- "type": "None",
- "value": null
- },
+ "trigger": { "type": "None", "value": null },
"actions": [
{
"type": "action",
"id": "9738f275-008d-4cd2-b8e5-1d5b57c19422",
- "path": [
- ":app",
- "minimap",
- "position"
- ],
+ "path": [":app", "minimap", "position"],
"operator": "Set",
- "value": [
- -0.162012939453086,
- -0.18998870849609578
- ],
+ "value": [-0.162012939453086, -0.18998870849609578],
"group": 1
},
{
"type": "action",
"id": "1e0332c3-6bee-4ef5-bdac-8e08be0dbc22",
- "path": [
- ":app",
- "minimap",
- "scale"
- ],
+ "path": [":app", "minimap", "scale"],
"operator": "Set",
"value": 3.600000000000003,
"group": 2
@@ -183,11 +139,7 @@
{
"type": "action",
"id": "43daf709-6eb4-41b2-9c17-f55551f18f4e",
- "path": [
- ":app",
- "minimap",
- "softEdges"
- ],
+ "path": [":app", "minimap", "softEdges"],
"operator": "Set",
"value": false,
"group": 3
@@ -195,11 +147,7 @@
{
"type": "action",
"id": "eb9e214c-61e4-474b-be1a-351816ba6b58",
- "path": [
- ":app",
- "minimap",
- "opacity"
- ],
+ "path": [":app", "minimap", "opacity"],
"operator": "Max",
"value": 1,
"group": 4
@@ -207,17 +155,9 @@
{
"type": "action",
"id": "11adfb82-134c-4f21-90cb-e04bbcd2a334",
- "path": [
- ":app",
- "minimap",
- "rotation"
- ],
+ "path": [":app", "minimap", "rotation"],
"operator": "Set",
- "value": [
- -0.33999999999999975,
- 0,
- 0
- ],
+ "value": [-0.33999999999999975, 0, 0],
"group": 5
}
],
@@ -226,70 +166,18 @@
"conditions": [],
"description": "Toggles the minimap to a larger size."
},
- {
- "id": "38b94168-507b-469f-ad6d-ef01ef62b5e6",
- "name": "Minimap: Toggle Full Size",
- "trigger": {
- "type": "Hotkey",
- "value": {
- "ctrlKey": false,
- "altKey": false,
- "shiftKey": false,
- "codes": [
- "KeyM"
- ],
- "onKeyUp": false
- }
- },
- "actions": [
- {
- "type": "action",
- "id": "b01d003f-736f-4560-b1f3-50c61f5dcd29",
- "path": [
- ":macro",
- "3f5fb9d4-2a67-4f7e-b70c-fad69f752067",
- "program"
- ],
- "operator": "Execute",
- "value": true,
- "group": 1
- },
- {
- "type": "action",
- "id": "a9299cb0-d6f1-4466-92b3-c63faa1e800c",
- "path": [
- ":macro",
- "3f5fb9d4-2a67-4f7e-b70c-fad69f752067",
- "program"
- ],
- "operator": "SetToDefault",
- "value": true,
- "group": 2
- }
- ],
- "enabled": true,
- "actionSequence": "SingleAlternate",
- "conditions": [],
- "description": "Toggles the minimap to a larger size by triggering or resetting the Full Size macro."
- },
{
"id": "70a5b555-30fe-4e94-bb49-741ca72bf75b",
"name": "Minimap: Hover Enter",
"trigger": {
"type": "WorldEvent",
- "value": {
- "eventName": "minimap-enter"
- }
+ "value": { "eventName": "minimap-enter" }
},
"actions": [
{
"type": "action",
"id": "5c3c3369-04ac-4e30-9954-04352bffbe93",
- "path": [
- ":app",
- "minimap",
- "opacity"
- ],
+ "path": [":app", "minimap", "opacity"],
"operator": "Increase",
"group": 1
}
@@ -304,19 +192,13 @@
"name": "Minimap: Hover Leave",
"trigger": {
"type": "WorldEvent",
- "value": {
- "eventName": "minimap-leave"
- }
+ "value": { "eventName": "minimap-leave" }
},
"actions": [
{
"type": "action",
"id": "89122d4a-8a28-4305-a0f9-db9f03d2ff98",
- "path": [
- ":app",
- "minimap",
- "opacity"
- ],
+ "path": [":app", "minimap", "opacity"],
"operator": "SetToDefault",
"group": 1
}
@@ -326,64 +208,6 @@
"conditions": [],
"description": "When the mouse leaves the minimap, set the opacity to the default value."
},
- {
- "id": "702e5376-973d-4927-a4ec-6b23d4e1ebee",
- "name": "✈️Switch View Controller",
- "trigger": {
- "type": "Hotkey",
- "value": {
- "ctrlKey": false,
- "altKey": false,
- "shiftKey": false,
- "codes": [
- "Backquote"
- ],
- "onKeyUp": false
- }
- },
- "actions": [
- {
- "type": "action",
- "id": "76407af6-0f09-4690-9479-58ecc9300918",
- "path": [
- ":app",
- "input",
- "sceneController"
- ],
- "operator": "Set",
- "value": "@titan-reactor-plugins/camera-battle",
- "group": 1
- },
- {
- "type": "action",
- "id": "a3e17199-4394-4063-8a4b-4a1f727383c5",
- "path": [
- ":app",
- "input",
- "sceneController"
- ],
- "operator": "Set",
- "value": "@titan-reactor-plugins/camera-overview",
- "group": 2
- },
- {
- "type": "action",
- "id": "4b98f985-1989-4fdf-a7b5-11ce76929c2a",
- "path": [
- ":app",
- "input",
- "sceneController"
- ],
- "operator": "Set",
- "value": "@titan-reactor-plugins/camera-standard",
- "group": 3
- }
- ],
- "enabled": true,
- "actionSequence": "SingleAlternate",
- "conditions": [],
- "description": "Switches between the different view controllers. A view controller determines how the view is rendered, and how you interact with that view, including camera controls."
- },
{
"id": "d61cdeed-ee93-4f68-bf5f-0785f637db16",
"name": "🎵 Toggle Music",
@@ -393,9 +217,7 @@
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "KeyM"
- ],
+ "codes": ["KeyM"],
"onKeyUp": false
}
},
@@ -403,22 +225,14 @@
{
"type": "action",
"id": "f860a7ef-6769-404a-b9a9-fd79b4c7dfe9",
- "path": [
- ":app",
- "audio",
- "music"
- ],
+ "path": [":app", "audio", "music"],
"operator": "Min",
"group": 1
},
{
"type": "action",
"id": "19ecb8d8-4650-48c7-8607-e5fcb965f3e7",
- "path": [
- ":app",
- "audio",
- "music"
- ],
+ "path": [":app", "audio", "music"],
"operator": "SetToDefault",
"group": 2
}
@@ -437,9 +251,7 @@
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "KeyU"
- ],
+ "codes": ["KeyU"],
"onKeyUp": false
}
},
@@ -447,9 +259,7 @@
{
"type": "action",
"id": "0209b1e3-293d-4bb2-abff-aa84760e5c0d",
- "path": [
- ":function"
- ],
+ "path": [":function"],
"operator": "Execute",
"value": "const speed = api.openBW.speedUp(); \napi.simpleMessage(`🔼 ${speed}x`);",
"group": 1
@@ -461,11 +271,7 @@
{
"type": "condition",
"id": "311e9fdb-decb-42d2-81b4-ee687fa24485",
- "path": [
- ":app",
- "session",
- "type"
- ],
+ "path": [":app", "session", "type"],
"comparator": "Equals",
"value": "replay"
}
@@ -481,9 +287,7 @@
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "KeyD"
- ],
+ "codes": ["KeyD"],
"onKeyUp": false
}
},
@@ -491,9 +295,7 @@
{
"type": "action",
"id": "1c38fad7-7a5d-4d8f-9b3f-53f6b48aae23",
- "path": [
- ":function"
- ],
+ "path": [":function"],
"operator": "Execute",
"value": "const speed = api.openBW.speedDown(); \napi.simpleMessage(`🔽 ${speed}x`);",
"group": 1
@@ -505,11 +307,7 @@
{
"type": "condition",
"id": "2a25db28-47d0-44ff-9ad7-d13ad10827ad",
- "path": [
- ":app",
- "session",
- "type"
- ],
+ "path": [":app", "session", "type"],
"comparator": "Equals",
"value": "replay"
}
@@ -525,9 +323,7 @@
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "BracketLeft"
- ],
+ "codes": ["BracketLeft"],
"onKeyUp": false
}
},
@@ -535,9 +331,7 @@
{
"type": "action",
"id": "83132fdf-8731-4b18-805b-886765b5e5cc",
- "path": [
- ":function"
- ],
+ "path": [":function"],
"operator": "Execute",
"value": "api.openBW.skipBackward(10); \napi.simpleMessage('⏪')",
"group": 1
@@ -549,11 +343,7 @@
{
"type": "condition",
"id": "737d0317-5d2e-409d-a183-eb5a3ebe4ed8",
- "path": [
- ":app",
- "session",
- "type"
- ],
+ "path": [":app", "session", "type"],
"comparator": "Equals",
"value": "replay"
}
@@ -569,9 +359,7 @@
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "BracketRight"
- ],
+ "codes": ["BracketRight"],
"onKeyUp": false
}
},
@@ -579,9 +367,7 @@
{
"type": "action",
"id": "2a1d13d8-5b36-47e0-9fb0-5cc7381087de",
- "path": [
- ":function"
- ],
+ "path": [":function"],
"operator": "Execute",
"value": "api.openBW.skipForward(10); \napi.simpleMessage('⏩');",
"group": 1
@@ -593,11 +379,7 @@
{
"type": "condition",
"id": "d56078b0-a1e6-4368-a9f4-868cadebb933",
- "path": [
- ":app",
- "session",
- "type"
- ],
+ "path": [":app", "session", "type"],
"comparator": "Equals",
"value": "replay"
}
@@ -613,9 +395,7 @@
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "Tab"
- ],
+ "codes": ["Tab"],
"onKeyUp": false
}
},
@@ -623,11 +403,7 @@
{
"type": "action",
"id": "b2e66ead-a917-4295-b37b-21c224e84e45",
- "path": [
- ":plugin",
- "@titan-reactor-plugins/player-colors",
- "enabled"
- ],
+ "path": [":plugin", "@titan-reactor-plugins/player-colors", "enabled"],
"operator": "Toggle",
"group": 1
}
@@ -642,19 +418,13 @@
"name": "Map Viewer: No Fog",
"trigger": {
"type": "WorldEvent",
- "value": {
- "eventName": "world-start"
- }
+ "value": { "eventName": "world-start" }
},
"actions": [
{
"type": "action",
"id": "738c6bac-e2db-4a9b-9e33-84f8d5165609",
- "path": [
- ":app",
- "postprocessing",
- "fogOfWar"
- ],
+ "path": [":app", "postprocessing", "fogOfWar"],
"operator": "Min",
"group": 1
}
@@ -665,11 +435,7 @@
{
"type": "condition",
"id": "ff1f5a91-0e78-4075-8bf4-dde2bd7a3dc8",
- "path": [
- ":app",
- "session",
- "type"
- ],
+ "path": [":app", "session", "type"],
"comparator": "Equals",
"value": "map"
}
@@ -681,17 +447,13 @@
"name": "Follow Units: Right Click to Follow",
"trigger": {
"type": "WorldEvent",
- "value": {
- "eventName": "mouse-click"
- }
+ "value": { "eventName": "mouse-click" }
},
"actions": [
{
"type": "action",
"id": "2f495d89-3a52-4176-a499-910d7b2c7e45",
- "path": [
- ":function"
- ],
+ "path": [":function"],
"operator": "Execute",
"value": "const unit = api.getHoveredUnit();\n\nif ( unit ) {\n api.followedUnits.set([unit]);\n // cancel any other mouse click handlers\n return false;\n} else {\n api.followedUnits.clear();\n}",
"group": 1
@@ -703,9 +465,7 @@
{
"type": "condition",
"id": "be922abe-f1c5-472a-a7ec-1de050c2e2e2",
- "path": [
- ":function"
- ],
+ "path": [":function"],
"comparator": "Execute",
"value": "return context.button === 2;"
}
@@ -721,9 +481,7 @@
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "KeyF"
- ],
+ "codes": ["KeyF"],
"onKeyUp": false
}
},
@@ -731,9 +489,7 @@
{
"type": "action",
"id": "d98ffeec-67a5-4972-8f5a-66b9ffabf334",
- "path": [
- ":function"
- ],
+ "path": [":function"],
"operator": "Execute",
"value": "if ( api.followedUnits.size ) {\n api.followedUnits.clear();\n} else if ( api.selectedUnits.size ) {\n console.log(\"settting units\", api.selectedUnits.copyAsArray());\n api.followedUnits.set(api.selectedUnits.copyAsArray());\n}",
"group": null
@@ -749,17 +505,13 @@
"name": "Follow Units: Clicking Minimap Unfollows",
"trigger": {
"type": "WorldEvent",
- "value": {
- "eventName": "mouse-click"
- }
+ "value": { "eventName": "mouse-click" }
},
"actions": [
{
"type": "action",
"id": "32318e7d-4dcc-4984-8ffb-501e0ab51d1f",
- "path": [
- ":function"
- ],
+ "path": [":function"],
"operator": "Execute",
"value": "api.followedUnits.clear();",
"group": null
@@ -771,9 +523,7 @@
{
"type": "condition",
"id": "2b63c54e-5b6f-4545-9ef6-14649cd0206f",
- "path": [
- ":function"
- ],
+ "path": [":function"],
"comparator": "Execute",
"value": "return api.isMouseInsideMinimap() && api.followedUnits.size;"
}
@@ -789,9 +539,7 @@
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "Digit1"
- ],
+ "codes": ["Digit1"],
"onKeyUp": false
}
},
@@ -799,11 +547,7 @@
{
"type": "action",
"id": "e7787281-fb08-46a0-8622-e6422f7848fa",
- "path": [
- ":app",
- "input",
- "sceneController"
- ],
+ "path": [":app", "input", "sceneController"],
"operator": "Set",
"value": "@titan-reactor-plugins/camera-standard",
"group": null
@@ -811,20 +555,19 @@
],
"enabled": true,
"actionSequence": "AllSync",
- "conditions": []
+ "conditions": [],
+ "description": "Switch to Default camera controller"
},
{
"id": "dcdcb3e7-a365-4793-8ffd-a19c8e189748",
- "name": "Views: Battle ( Helicopter )",
+ "name": "Views: 360",
"trigger": {
"type": "Hotkey",
"value": {
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "Digit2"
- ],
+ "codes": ["Digit2"],
"onKeyUp": false
}
},
@@ -832,11 +575,7 @@
{
"type": "action",
"id": "5083d959-3be3-438d-b5d8-338f2523ea91",
- "path": [
- ":app",
- "input",
- "sceneController"
- ],
+ "path": [":app", "input", "sceneController"],
"operator": "Set",
"value": "@titan-reactor-plugins/camera-battle",
"group": null
@@ -844,7 +583,8 @@
],
"enabled": true,
"actionSequence": "AllSync",
- "conditions": []
+ "conditions": [],
+ "description": "Switch to 360 camera controller"
},
{
"id": "cf6ad5b4-cf84-4f61-9822-b2b90cb9315e",
@@ -855,9 +595,7 @@
"ctrlKey": false,
"altKey": false,
"shiftKey": false,
- "codes": [
- "Digit3"
- ],
+ "codes": ["Digit3"],
"onKeyUp": false
}
},
@@ -865,11 +603,7 @@
{
"type": "action",
"id": "ea21f942-a631-477c-8a77-1bdb66428d94",
- "path": [
- ":app",
- "input",
- "sceneController"
- ],
+ "path": [":app", "input", "sceneController"],
"operator": "Set",
"value": "@titan-reactor-plugins/camera-overview",
"group": null
@@ -877,29 +611,35 @@
],
"enabled": true,
"actionSequence": "AllSync",
- "conditions": []
+ "conditions": [],
+ "description": "Switch to Overview camera controller"
},
{
- "id": "348ae444-5406-4b3a-ba16-5a23f8080265",
- "name": "Test",
+ "id": "40659b03-2300-44ad-8891-416af907113b",
+ "name": "Views: Auto Observer",
"trigger": {
- "type": "None",
- "value": null
+ "type": "Hotkey",
+ "value": {
+ "ctrlKey": false,
+ "altKey": false,
+ "shiftKey": false,
+ "codes": ["Digit4"],
+ "onKeyUp": false
+ }
},
"actions": [
{
"type": "action",
- "id": "8383afe7-c72d-419e-9c17-f5f71f2f4cf9",
- "path": [
- ":function"
- ],
- "operator": "Execute",
- "value": "api.sandboxApi.createUnit(7, 1, 0, 0)\n console.log(api.sandboxApi);\n",
+ "id": "c6577f70-460c-4e15-83cb-b7a7e24b0c43",
+ "path": [":app", "input", "sceneController"],
+ "operator": "Set",
+ "value": "@titan-reactor-plugins/auto-observer",
"group": null
}
],
"enabled": true,
"actionSequence": "AllSync",
- "conditions": []
+ "conditions": [],
+ "description": "Switch to AutoObserver camera controller"
}
-]
\ No newline at end of file
+]
diff --git a/src/common/types/declarations/global.d.ts b/src/common/types/declarations/global.d.ts
index 73c541ed..e4618e0a 100644
--- a/src/common/types/declarations/global.d.ts
+++ b/src/common/types/declarations/global.d.ts
@@ -32,3 +32,9 @@ declare module "*.png" {
const contents: string;
export = contents;
}
+
+declare global {
+ var THREE: typeof import("three");
+ var postprocessing: typeof import("postprocessing");
+ // ... other globals
+}
\ No newline at end of file
diff --git a/src/common/types/plugin.ts b/src/common/types/plugin.ts
index dacf6bbc..438a7131 100644
--- a/src/common/types/plugin.ts
+++ b/src/common/types/plugin.ts
@@ -1,6 +1,3 @@
-import { SessionVariables } from "@core/world/settings-session-store";
-import { WorldEvents } from "@core/world/world-events";
-import { TypeEmitterProxy } from "@utils/type-emitter";
import { FieldDefinition } from "./fields";
export type PluginConfig = Record;
@@ -45,20 +42,6 @@ export interface PluginMetaData extends PluginPackage {
}
}
-/**
- * These are the injectable services that are available to plugins during a world session.
- */
-export interface Injectables {
- /**
- * Reactive setting values that apply to the active session only.
- */
- settings: SessionVariables;
-
- /**
- * World events that can be listened to and emitted.
- */
- events: TypeEmitterProxy;
-}
/**
* A plugin that executes in the main process.
@@ -102,10 +85,7 @@ export interface NativePlugin {
* Called when a plugin has it's configuration changed by the user
*/
onConfigChanged?( oldConfig: Record ): void;
- /**
- * CaLLed when a plugin must release its resources
- */
- dispose?(): void;
+
/**
* Called when an React component sends a message to this window
*/
@@ -122,6 +102,10 @@ export interface NativePlugin {
* Called on a game frame
*/
onFrame?( frame: number, commands?: any[] ): void;
+ /**
+ * Called before render, every render tick
+ */
+ onTick?( delta: number, elapsed: number ): void;
/**
* When a game has been loaded and the game loop is about to begin
*/
@@ -135,13 +119,4 @@ export interface NativePlugin {
*/
onFrameReset?(): void;
- /**
- * When a scene is entered and nearly initialized.
- */
- onEnterScene?( prevData: any ): Promise;
-
- /**
- * When a scene has exited. Dispose resources here.
- */
- onExitScene?( currentData: any ): any;
}
diff --git a/src/common/types/structs/flingy-struct.ts b/src/common/types/structs/flingy-struct.ts
index f0303a78..899de968 100644
--- a/src/common/types/structs/flingy-struct.ts
+++ b/src/common/types/structs/flingy-struct.ts
@@ -12,4 +12,5 @@ export interface FlingyStruct extends ThingyStruct {
nextTargetWaypointX: number;
nextTargetWaypointY: number;
movementFlags: number;
+ currentVelocityDirection: number;
}
diff --git a/src/common/utils/with-error-message.ts b/src/common/utils/with-error-message.ts
index 76332304..20f02043 100644
--- a/src/common/utils/with-error-message.ts
+++ b/src/common/utils/with-error-message.ts
@@ -1,6 +1,6 @@
export const withErrorMessage = ( error: unknown, msg: string ) => {
if ( error instanceof Error ) {
- return `${msg} - ${error.message}`;
+ return `${msg} - ${error.message} ${import.meta.env.DEV && error.stack}`;
} else {
return msg;
}
diff --git a/src/configuration-ui/plugins-configuration.tsx b/src/configuration-ui/plugins-configuration.tsx
index f5a5c913..655e8b39 100644
--- a/src/configuration-ui/plugins-configuration.tsx
+++ b/src/configuration-ui/plugins-configuration.tsx
@@ -36,10 +36,10 @@ export const PluginsConfiguration = ({
setBanner: React.Dispatch>;
}) => {
const [ tabIndex, setTabIndex ] = useState( 0 );
- const plugins = useStore( window.deps.usePluginsStore );
+ const { plugins } = useStore( window.deps.usePluginsStore );
const [ plugin, setSelectedPluginPackage ] = useState(
- plugins.plugins[0]
+ plugins[0]
);
const oldConfig = useRef( plugin?.config );
@@ -86,8 +86,15 @@ export const PluginsConfiguration = ({
display: "flex",
flexDirection: "column",
}}>
- {plugins.plugins
- .sort()
+ {plugins
+ .sort((a, b) => {
+ if (a.isSceneController && !b.isSceneController) {
+ return -1;
+ } else if (!a.isSceneController && b.isSceneController) {
+ return 1;
+ }
+ return (a.description ?? a.name).localeCompare(b.description ?? b.name);
+ })
.map( ( plugin ) => localPluginButton( plugin, !plugin.config?._enabled?.value ) )}
@@ -104,7 +111,7 @@ export const PluginsConfiguration = ({
{plugin?.description ?? plugin?.name} - {plugin?.version}
- {plugin && plugins.plugins.includes( plugin ) && (
+ {plugin && plugins.includes( plugin ) && (
<>
{!isDeprecated( plugin ) && (
;
}
-const spriteRemnants = [
- 134, 139, 141, 143, 147, 150, 158, 160, 192, 230, 236, 484, 490,
-];
-
-const remnantImages = [ 7, 16, 20, 24, 32, 37, 53, 57, 89, 124, 230, 241, 920, 946 ];
-// guardian birth 27?, devourer 917
-const birthImages = [ 2, 15, 19, 27, 31, 40, 44, 49, 52, 56, 917, 919 ];
-const placeFlatOnGround = [ ...remnantImages, ...birthImages ]
- .map( ( id ) => ( { [id]: [ { type: "flat-on-ground" } ] } ) )
- .reduce( ( a, b ) => ( { ...a, ...b } ), {} ) as Record<
- number,
- ModelSetModifierFlatOnGround[]
->;
-
-const spritesFlat = spriteRemnants
- .map( ( id ) => ( { [id]: [ { type: "flat-on-ground" } ] } ) )
- .reduce( ( a, b ) => ( { ...a, ...b } ), {} ) as Record<
- number,
- ModelSetModifierFlatOnGround[]
->;
-
export const modelSetModifiers: ModelSetModifiers = {
sprites: {
- ...spritesFlat,
},
images: {
// egg
@@ -271,7 +249,6 @@ export const modelSetModifiers: ModelSetModifiers = {
type: "hide-sprite",
},
],
- ...placeFlatOnGround,
},
};
diff --git a/src/core/model-effects.ts b/src/core/model-effects.ts
index 2b1aff81..e082408a 100644
--- a/src/core/model-effects.ts
+++ b/src/core/model-effects.ts
@@ -28,8 +28,9 @@ export const applyRenderModeToSprite = (
switch ( effect.type ) {
// set emissive on main image if I'm visible
case "flat-on-ground":
- sprite.rotation.x = -Math.PI / 2;
- sprite.position.y = terrainY + 0.1;
+ // deprecated once we moved to shader based billboarding
+ // sprite.rotation.x = Math.PI / 2;
+ // sprite.position.y = terrainY + 0.1;
break;
}
}
diff --git a/src/core/terrain.ts b/src/core/terrain.ts
index 6def72cf..db429171 100644
--- a/src/core/terrain.ts
+++ b/src/core/terrain.ts
@@ -89,7 +89,6 @@ export class Terrain extends Group {
}
setTerrainQuality( highDefinition: boolean, anisotropy: number ) {
- this.shadowsEnabled = highDefinition;
this.#setAnisotropy( anisotropy );
diff --git a/src/core/titan-reactor.ts b/src/core/titan-reactor.ts
index d0d3a397..04cbdfe8 100644
--- a/src/core/titan-reactor.ts
+++ b/src/core/titan-reactor.ts
@@ -185,7 +185,9 @@ logCapabilities();
// }
// metaVerse().setSession(session);
- await initCacheDB();
+ try {
+ await initCacheDB();
+ } catch (e) {}
await sceneStore().loadScene(new LoadingScene());
diff --git a/src/core/unit-entities.ts b/src/core/unit-entities.ts
index 63a87aa5..3ac4db24 100644
--- a/src/core/unit-entities.ts
+++ b/src/core/unit-entities.ts
@@ -3,7 +3,6 @@ import { Unit } from "@core/unit";
import gameStore from "@stores/game-store";
import { IterableMap } from "@utils/data-structures/iteratible-map";
-//TODO: Deprecate
// The primary purpose of this class is to provide a storage for damage effects, and serialization to plugins ui
// We can store damage effects in a map, and we can serialize the map to plugins ui via an ArrayBuffer of unitData
export class UnitEntities {
diff --git a/src/core/world/api-session.ts b/src/core/world/api-session.ts
index eefea8ce..9037e039 100644
--- a/src/core/world/api-session.ts
+++ b/src/core/world/api-session.ts
@@ -30,12 +30,19 @@ export class ApiSession {
this.#janitor = new Janitor();
this.#events = new WeakRef( events );
- this.#plugins = this.#janitor.mop( await createPluginSession( openBW, events ) );
-
- this.#macros = this.#janitor.mop( createMacrosComposer( settings ) );
const eventsProxy = this.#janitor.mop( new TypeEmitterProxy( events ) );
const customEvents = this.#janitor.mop( new TypeEmitter() );
+ this.#plugins = this.#janitor.mop( await createPluginSession( openBW, events, {
+ settings: settings.vars,
+ events,
+ customEvents,
+ game: gameTimeApi
+ } ) );
+
+ this.#macros = this.#janitor.mop( createMacrosComposer( settings ) );
+
+
this.#macros.macros.targets.setHandler( ":plugin", {
action: ( action ) =>
this.#plugins.store.operate( action, ( path ) => path.slice( 1 ) ),
@@ -66,20 +73,6 @@ export class ApiSession {
} )
);
- this.#janitor.mop(
- this.native.injectApi(
- mix(
- {
- settings: settings.vars,
- events: eventsProxy,
- customEvents,
- },
- gameTimeApi
- )
- ),
- "native.injectApi"
- );
-
this.native.useTryCatchOnHooks =
useSettingsStore.getState().data.utilities.debugMode;
this.#janitor.mop(
diff --git a/src/core/world/commands-composer.ts b/src/core/world/commands-composer.ts
index 40eba7ab..023b9eb6 100644
--- a/src/core/world/commands-composer.ts
+++ b/src/core/world/commands-composer.ts
@@ -1,5 +1,6 @@
import { CommandsStream } from "process-replay";
-import { World } from "./world";
+import { TypeEmitter } from "@utils/type-emitter";
+import { WorldEvents } from "./world-events";
/**
* Mostly responsible for collecting recent commands into a bundle for consumption by plugins, limits to previous 5 seconds of game time.
@@ -9,7 +10,7 @@ import { World } from "./world";
* @returns
*/
export const createCommandsComposer = (
- world: World,
+ events: TypeEmitter,
commandsStream: CommandsStream
) => {
let cmds = commandsStream.generate();
@@ -21,7 +22,7 @@ export const createCommandsComposer = (
cmd = cmds.next();
}
- world.events.on( "frame-reset", reset );
+ events.on( "frame-reset", reset );
return {
get commandsThisFrame() {
diff --git a/src/core/world/create-plugin-session.ts b/src/core/world/create-plugin-session.ts
index 146128a4..30cbb525 100644
--- a/src/core/world/create-plugin-session.ts
+++ b/src/core/world/create-plugin-session.ts
@@ -9,18 +9,20 @@ import { PluginSystemUI } from "@plugins/plugin-system-ui";
import { PluginSystemNative } from "@plugins/plugin-system-native";
import { Janitor } from "three-janitor";
import { createPluginSessionStore } from "@core/world/plugin-session-store";
-import { createCompartment } from "@utils/ses-util";
+import { createCompartment } from "@utils/create-compartment";
import { globalEvents } from "@core/global-events";
import { WorldEvents } from "./world-events";
import { TypeEmitter, TypeEmitterProxy } from "@utils/type-emitter";
import { normalizePluginConfiguration } from "@utils/function-utils";
import { pluginsStore } from "@stores/plugins-store";
+import { PluginSessionContext } from "@plugins/plugin-base";
export type PluginSession = Awaited>;
export const createPluginSession = async (
openBW: OpenBW,
- _events: TypeEmitter
+ _events: TypeEmitter,
+ sessionContext: PluginSessionContext
) => {
const janitor = new Janitor( "PluginSession" );
@@ -28,7 +30,7 @@ export const createPluginSession = async (
const pluginPackages = pluginsStore().sessionPlugins;
const uiPlugins = janitor.mop(
- new PluginSystemUI( openBW, pluginPackages ),
+ new PluginSystemUI( openBW, pluginPackages.filter( ( p ) => p.urls.ui && !p.isSceneController ) ),
"uiPlugins"
);
@@ -41,7 +43,7 @@ export const createPluginSession = async (
} );
const nativePlugins = janitor.mop(
- new PluginSystemNative(),
+ new PluginSystemNative(sessionContext),
"nativePlugins"
);
diff --git a/src/core/world/game-loop-composer.ts b/src/core/world/game-loop-composer.ts
index d451e09b..01478e53 100644
--- a/src/core/world/game-loop-composer.ts
+++ b/src/core/world/game-loop-composer.ts
@@ -1,15 +1,17 @@
import { log } from "@ipc/log";
import { renderComposer } from "@render/render-composer";
-import { World } from "./world";
+import { WorldEvents } from "./world-events";
+import { TypeEmitter } from "@utils/type-emitter";
export type GameLoopComposer = ReturnType;
export type GameLoopComposerApi = GameLoopComposer["api"];
-export const createGameLoopComposer = ( world: World ) => {
+export const createGameLoopComposer = ( events: TypeEmitter ) => {
let delta = 0;
let lastElapsed = 0;
let _onUpdate: ( delta: number, elapsed: number ) => void = () => {};
+ // the < 0 stuff is due to a bug when WebXR is entering/exiting
const GAME_LOOP = ( elapsed: number ) => {
if (elapsed < 0) {
console.error( "Negative elapsed time detected. Skipping frame." );
@@ -18,10 +20,10 @@ export const createGameLoopComposer = ( world: World ) => {
delta = elapsed - lastElapsed;
lastElapsed = elapsed;
- _onUpdate( delta, elapsed );
+ _onUpdate( delta < 0 ? 0 : delta, elapsed );
};
- world.events.on( "dispose", () => {
+ events.on( "dispose", () => {
log.debug( "dispose game loop" );
renderComposer.setAnimationLoop( null );
} );
diff --git a/src/core/world/input-composer.ts b/src/core/world/input-composer.ts
index d0e576d1..bd00e408 100644
--- a/src/core/world/input-composer.ts
+++ b/src/core/world/input-composer.ts
@@ -43,7 +43,7 @@ export const createInputComposer = (
);
const unitSelectionBox = createUnitSelectionBox(
- world,
+ world.events,
mouseInput,
scene,
imageQuadrants,
diff --git a/src/core/world/macros-composer.ts b/src/core/world/macros-composer.ts
index 96461285..4ac1120c 100644
--- a/src/core/world/macros-composer.ts
+++ b/src/core/world/macros-composer.ts
@@ -2,7 +2,7 @@ import { Macros } from "@macros";
import { useMacroStore } from "@stores/settings-store";
import { SettingsSessionStore } from "./settings-session-store";
import { Janitor } from "three-janitor";
-import { createCompartment } from "@utils/ses-util";
+import { createCompartment } from "@utils/create-compartment";
import { globalEvents } from "../global-events";
import { TargetComposer } from "./target-composer";
import { log } from "@ipc/log";
diff --git a/src/core/world/plugin-session-store.test.ts b/src/core/world/plugin-session-store.test.ts
index 6cbd1244..8d277523 100644
--- a/src/core/world/plugin-session-store.test.ts
+++ b/src/core/world/plugin-session-store.test.ts
@@ -6,6 +6,7 @@ import { log } from "@ipc/log";
import { PluginSystemNative } from "@plugins/plugin-system-native";
import { PluginMetaData } from "common/types";
import { PluginSystemUI } from "@plugins/plugin-system-ui";
+import { PluginSessionContext } from "@plugins/plugin-base";
jest.mock( "@ipc/log" );
jest.mock( "@core/global-events" );
@@ -44,6 +45,7 @@ const createBasePlugin = ( _package?: Partial ) => {
};
const plugins = new PluginSystemNative(
+ {} as PluginSessionContext
// [pluginPackage as unknown as PluginMetaData],
// () => {},
// () => {}
diff --git a/src/core/world/plugin-session-store.ts b/src/core/world/plugin-session-store.ts
index 80fd1131..df96394a 100644
--- a/src/core/world/plugin-session-store.ts
+++ b/src/core/world/plugin-session-store.ts
@@ -88,10 +88,8 @@ export const createPluginSessionStore = (
const vars = plugins.reduce( ( acc, plugin ) => {
Object.keys( plugin.rawConfig ?? {} ).forEach( ( key ) => {
- if ( key !== "system" ) {
- const compKey = [ plugin.name, key ];
- lSet( acc, compKey, store.createVariable( compKey ) );
- }
+ const compKey = [ plugin.name, key ];
+ lSet( acc, compKey, store.createVariable( compKey ) );
} );
return acc;
diff --git a/src/core/world/postprocessing-composer.ts b/src/core/world/postprocessing-composer.ts
index 0496d75a..713ba546 100644
--- a/src/core/world/postprocessing-composer.ts
+++ b/src/core/world/postprocessing-composer.ts
@@ -14,7 +14,6 @@ import { ViewControllerComposer } from "@core/world/view-controller-composer";
import { World } from "./world";
import { isImageHd, isMesh } from "@utils/image-utils";
import { createTransition } from "./transition";
-import { VRButton } from "@render/vr/vr-button";
//tank base, minerals
const ignoreRecieveShadow = [250, 253, 347, 349, 351];
@@ -122,6 +121,7 @@ export const createPostProcessingComposer = (
: world.settings.getState().postprocessing;
terrain.setTerrainQuality(renderMode3D, postprocessing.anisotropy);
+ terrain.shadowsEnabled = renderMode3D;
scene.setBorderTileColor(renderMode3D ? 0xffffff : 0x999999);
scene.sunlight.enabled = renderMode3D;
images.use3dImages = renderMode3D;
@@ -144,12 +144,6 @@ export const createPostProcessingComposer = (
world.events.on("dispose", () => janitor.dispose());
- if (import.meta.env.DEV) {
- document.body.appendChild(
- janitor.mop(VRButton.createButton(renderComposer.glRenderer))
- );
- }
-
return {
precompile(camera: PerspectiveCamera | OrthographicCamera) {
_changeRenderMode(false);
diff --git a/src/core/world/scene-composer.ts b/src/core/world/scene-composer.ts
index f70b6020..f7b279e0 100644
--- a/src/core/world/scene-composer.ts
+++ b/src/core/world/scene-composer.ts
@@ -1,4 +1,3 @@
-// @ts-nocheck
import type { SpritesBufferView } from "@openbw/structs/sprites-buffer-view";
import type {
UnitsBufferView,
@@ -38,10 +37,10 @@ import { getJanitorLogLevel } from "@ipc/global";
import { getMapTiles } from "@utils/chk-utils";
import { ImageBase } from "..";
import { ImageHDMaterial } from "@core/image-hd-material";
-import { calculateImagesFromTechTreeUnits } from "@utils/preload-map-units-and-sprites";
-import { TimeSliceJob } from "@utils/time-slice-job";
+import { calculateImagesFromTechTreeUnit } from "@utils/preload-map-units-and-sprites";
import { IterableMap } from "@utils/data-structures/iteratible-map";
import { SimpleQuadtree } from "@utils/data-structures/simple-quadtree";
+import { settingsStore } from "@stores/settings-store";
export type SceneComposer = Awaited>;
export type SceneComposerApi = SceneComposer["api"];
@@ -149,6 +148,7 @@ export const createSceneComposer = async ( world: World, assets: Assets ) => {
}
const _unitPos = new Vector3();
+ const _preloadedUnit = new Set();
const buildUnit = ( unitStruct: UnitsBufferView ) => {
const unit = units.getOrCreate( unitStruct );
@@ -184,8 +184,17 @@ export const createSceneComposer = async ( world: World, assets: Assets ) => {
if ( isCompleted ) {
world.events.emit( "unit-completed", unit );
+
+ if ( settingsStore().data.graphics.preloadMapSprites ) {
+ // get next units in tech tree and start loading their images
+ const preloads = calculateImagesFromTechTreeUnit(unit.typeId, _preloadedUnit);
+ for (const img of preloads) {
+ assets.loader.loadImage(img, 2);
+ }
+ }
}
+
};
@@ -359,24 +368,8 @@ export const createSceneComposer = async ( world: World, assets: Assets ) => {
}
janitor.dispose();
Janitor.logLevel = getJanitorLogLevel();
- // preloader.dispose();
} );
- // const preloader = new TimeSliceJob(
- // ( imageId, next ) => {
- // if ( assets.hasImageAtlas( imageId ) ) {
- // return false;
- // }
- // console.log("preload", imageId)
- // assets.loadImageAtlasAsync( imageId, assets.bwDat ).then( next ).catch( next );
- // },
- // calculateImagesFromTechTreeUnits( world.map.units.map( ( unit ) => unit.unitId ) ),
- // 2000
- // );
-
- const _alreadyCalculated = new Set();
-
-
const pxToWorldInverse = makePxToWorld( ...world.map.size, terrain.getTerrainY, true );
return {
@@ -399,15 +392,6 @@ export const createSceneComposer = async ( world: World, assets: Assets ) => {
elapsed: number,
renderMode3D: boolean,
) {
- // preloader.update( elapsed );
-
- // if ( preloader.isComplete() && elapsed - preloader.timeCompleted > 10000 ) {
- // const work = calculateImagesFromTechTreeUnits(
- // units.units._dangerousArray.map( ( unit ) => unit.typeId ),
- // _alreadyCalculated
- // );
- // preloader.addWork( work );
- // }
world.fogOfWar.onFrame( world.players.getVisionFlag() );
diff --git a/src/core/world/settings-session-store.ts b/src/core/world/settings-session-store.ts
index aa5c1da1..adab50af 100644
--- a/src/core/world/settings-session-store.ts
+++ b/src/core/world/settings-session-store.ts
@@ -62,9 +62,8 @@ export const createSettingsSessionStore = ( events: TypeEmitter ) =
const store = createOperatableStore(
createDeepStore( {
initialState: sourceOfTruth.clone(),
- validateMerge: ( newSettings, rhs ) =>
- events.emit( "settings-changed", { settings: newSettings, rhs } ) !==
- false,
+ onUpdate: ( newSettings, rhs ) =>
+ events.emit( "settings-changed", { settings: newSettings, rhs } ),
} ),
sourceOfTruth,
( path, state ) =>
diff --git a/src/core/world/surface-composer.ts b/src/core/world/surface-composer.ts
index eeaa20bb..10eb7bdd 100644
--- a/src/core/world/surface-composer.ts
+++ b/src/core/world/surface-composer.ts
@@ -3,7 +3,9 @@ import { renderComposer } from "@render/render-composer";
import { settingsStore, useSettingsStore } from "@stores/settings-store";
import { Janitor } from "three-janitor";
import debounce from "lodash.debounce";
-import { World } from "./world";
+import Chk from "bw-chk";
+import { WorldEvents } from "./world-events";
+import { TypeEmitter } from "@utils/type-emitter";
export type SurfaceComposer = ReturnType;
export type SurfaceComposerApi = SurfaceComposer["api"];
@@ -13,11 +15,11 @@ export type SurfaceComposerApi = SurfaceComposer["api"];
* @param world
* @returns
*/
-export const createSurfaceComposer = ( world: World ) => {
+export const createSurfaceComposer = ( map: Chk, events: TypeEmitter ) => {
const janitor = new Janitor( "SurfaceComposer" );
const gameSurface = janitor.mop(
new GameSurface(
- ...world.map.size,
+ ...map.size,
renderComposer.srcCanvas
),
"GameSurface"
@@ -39,7 +41,7 @@ export const createSurfaceComposer = ( world: World ) => {
settingsStore().data.graphics.pixelRatio
);
- world.events.emit( "resize", gameSurface );
+ events.emit( "resize", gameSurface );
};
const sceneResizeHandler = debounce( () => {
@@ -73,7 +75,7 @@ export const createSurfaceComposer = ( world: World ) => {
"useSettingsStore.subscribe"
);
- world.events.on( "dispose", () => {
+ events.on( "dispose", () => {
janitor.dispose();
} );
diff --git a/src/core/world/view-controller-composer.ts b/src/core/world/view-controller-composer.ts
index d6f83d0b..36424644 100644
--- a/src/core/world/view-controller-composer.ts
+++ b/src/core/world/view-controller-composer.ts
@@ -5,11 +5,12 @@ import { DamageType, Explosion } from "common/enums";
import { PerspectiveCamera, Vector3 } from "three";
import { GameViewPort } from "../../camera/game-viewport";
import { World } from "./world";
-import { SceneController } from "@plugins/scene-controller";
+import type { SceneController } from "@plugins/scene-controller";
import { easeInCubic } from "@utils/function-utils";
import range from "common/utils/range";
import { mixer } from "@audio/main-mixer";
-import { WebXRGameViewPort } from "../../camera/xr-viewport";
+import { renderComposer } from "@render/index";
+import { VRSceneController } from "@plugins/vr-controller";
// frequency, duration, strength multiplier
const explosionFrequencyDuration = {
@@ -50,7 +51,7 @@ export const createViewControllerComposer = (
const initViewport = new GameViewPort( gameSurface, true );
initViewport.fullScreen();
initViewport.orbit.setTarget(initialStartLocation.x, initialStartLocation.y, initialStartLocation.z);
- const viewports: (GameViewPort | WebXRGameViewPort)[] = [initViewport]
+ const viewports: GameViewPort[] = [initViewport]
const createViewports = (n = 4) => range( 0, n ).map( i => new GameViewPort( gameSurface, i === 0 ) );
@@ -124,7 +125,6 @@ export const createViewControllerComposer = (
*/
async activate(
newController: SceneController,
- isWebXR: boolean
) {
if ( activating ) {
return;
@@ -136,12 +136,23 @@ export const createViewControllerComposer = (
if ( sceneController?.onExitScene ) {
try {
world.events.emit( "scene-controller-exit", sceneController.name );
- prevData = sceneController.onExitScene( prevData );
+ const _prevData = sceneController.onExitScene( prevData );
+ if (_prevData) {
+ prevData = _prevData;
+ }
} catch ( e ) {
log.error( e );
}
}
+ if (sceneController) {
+ sceneController.parent.removeFromParent();
+ }
+
+ if ( sceneController?.isWebXR ) {
+ (sceneController as VRSceneController).viewerPosition.removeFromParent();
+ }
+
sceneController = null;
gameSurface.togglePointerLock( false );
@@ -150,12 +161,19 @@ export const createViewControllerComposer = (
}
viewports.length = 0;
- if ( isWebXR ) {
- viewports[0] = new WebXRGameViewPort(gameSurface, true);
- } else {
- viewports.push(...createViewports(newController.viewportsCount));
+ viewports.push(...createViewports(newController.viewportsCount));
+
+ if (newController.isWebXR) {
+ const vrController = newController as VRSceneController;
+ vrController.setupXR( renderComposer.glRenderer.xr );
+ newController.scene.add( vrController.viewerPosition );
+ vrController.viewerPosition.add( vrController.viewport.camera );
}
+ newController.scene.add( newController.parent );
+
+ world.settings.vars.input.unitSelection.set(true);
+ world.settings.vars.input.cursorVisible.set(true);
await newController.onEnterScene( prevData );
sceneController = newController;
diff --git a/src/core/world/world-composer.ts b/src/core/world/world-composer.ts
index 6c4ea6c7..19088ac4 100644
--- a/src/core/world/world-composer.ts
+++ b/src/core/world/world-composer.ts
@@ -28,6 +28,7 @@ import { useReplayAndMapStore } from "@stores/replay-and-map-store";
import { mixer } from "@audio/main-mixer";
import { CommandsStream } from "process-replay";
import { log } from "@ipc/log";
+import { pluginsStore } from "@stores/plugins-store";
export type WorldComposer = Awaited>;
@@ -66,10 +67,10 @@ export const createWorldComposer = async (
log.info( "creating composers" );
- const gameLoopComposer = createGameLoopComposer( world );
- const surfaceComposer = createSurfaceComposer( world );
+ const gameLoopComposer = createGameLoopComposer( events );
+ const surfaceComposer = createSurfaceComposer( map, events );
const sceneComposer = await createSceneComposer( world, assets );
- const commandsComposer = createCommandsComposer( world, commands );
+ const commandsComposer = createCommandsComposer( events, commands );
const inputsComposer = createInputComposer( world, sceneComposer );
const viewControllerComposer = createViewControllerComposer( world, surfaceComposer, sceneComposer.api.initialStartLocation );
const sandboxApi = createSandboxApi( world, sceneComposer.pxToWorldInverse );
@@ -109,7 +110,11 @@ export const createWorldComposer = async (
if ( sceneController ) {
apiSession.native.activateSceneController( sceneController );
- await viewControllerComposer.activate( sceneController, isWebXR );
+ if (viewControllerComposer.sceneController) {
+ apiSession.ui.deactivatePlugin( viewControllerComposer.sceneController.name );
+ }
+ await viewControllerComposer.activate( sceneController);
+ apiSession.ui.activatePlugins( pluginsStore().plugins.filter( p => p.name === sceneController.name ) );
inputsComposer.unitSelectionBox.camera =
viewControllerComposer.primaryCamera!;
}
@@ -327,6 +332,11 @@ export const createWorldComposer = async (
);
}
+ apiSession.native.hook_onTick(
+ delta,
+ elapsed
+ )
+
postProcessingComposer.render( delta, elapsed );
inputsComposer.reset();
diff --git a/src/image/assets.ts b/src/image/assets.ts
index 3434f4b5..d4638a75 100644
--- a/src/image/assets.ts
+++ b/src/image/assets.ts
@@ -27,7 +27,7 @@ import processStore from "@stores/process-store";
import { CubeTexture, CubeTextureLoader, Texture } from "three";
import { loadEnvironmentMap } from "./environment/env-map";
import { loadDATFiles } from "common/bwdat/load-dat-files";
-import { ImageLoaderManager } from "./loader/image-loader";
+import { ImageLoaderManager } from "./loader/image-loader-manager";
/**
* @public
@@ -115,18 +115,6 @@ export const initializeAssets = async () => {
selectionCircles,
minimapConsole,
loader: imageLoaderManager,
- loadImageAtlas(imageId: number, priority = 3) {
- return imageLoaderManager.loadImage(imageId, priority);
- },
- getImageAtlas(imageId: number): AnimAtlas | null {
- return imageLoaderManager.getImage(imageId);
- },
- hasImageAtlas(imageId: number): boolean {
- return !!imageLoaderManager.exists(imageId);
- },
- loadImageImmediate(imageId: number) {
- return imageLoaderManager.loadImageImmediate(imageId);
- },
skyBox,
refId,
resetImagesCache: () => {
diff --git a/src/image/generate-map/get-terrain-y.ts b/src/image/generate-map/get-terrain-y.ts
index 139a3652..dfc1b1a6 100644
--- a/src/image/generate-map/get-terrain-y.ts
+++ b/src/image/generate-map/get-terrain-y.ts
@@ -19,7 +19,7 @@ export const getTerrainY = (
const p = py * image.width + px;
- return imageF[p] + offset;
+ return (imageF[p] ?? 0) + offset;
};
};
diff --git a/src/image/loader/image-loader-manager.ts b/src/image/loader/image-loader-manager.ts
new file mode 100644
index 00000000..43c2db18
--- /dev/null
+++ b/src/image/loader/image-loader-manager.ts
@@ -0,0 +1,90 @@
+import { AnimAtlas } from "../atlas";
+import { settingsStore } from "@stores/settings-store";
+import { IndexedDBCache } from "./indexed-db-cache";
+import { ImageLoader } from "./image-loader";
+
+const genFileName = ( i: number, prefix = "" ) =>
+ `${prefix}anim/main_${`00${i}`.slice( -3 )}.anim`;
+
+export class ImageLoaderManager {
+ maxDownloads = 8;
+ currentDownloads = 0;
+ imageLoaders = new Map();
+ #refId: ( id: number ) => number;
+ #cache = new IndexedDBCache( "image-cache" );
+
+ constructor( refId: ( id: number ) => number ) {
+ this.#refId = refId;
+ this.#cache.enabled = settingsStore().data.utilities.cacheLocally;
+ }
+
+ exists( imageId: number ) {
+ const refId = this.#refId( imageId );
+ return this.imageLoaders.has( refId );
+ }
+
+ getImage( imageId: number, useRefId = true ): AnimAtlas | null {
+ const refId = useRefId ? this.#refId( imageId ) : imageId;
+ return this.imageLoaders.get( refId )?.atlas ?? null;
+ }
+
+ loadImage( imageId: number, priority = 3 ) {
+ const refId = this.#refId( imageId );
+
+ if ( this.imageLoaders.has( refId )) {
+ this.processQueue();
+ return;
+ }
+
+ const loader = new ImageLoader(genFileName( refId, "HD2/" ), refId, this.#cache);
+ loader.priority = priority;
+ // const loader = new ImageLoader(genFileName( refId, res === UnitTileScale.HD2 ? "HD2/" : ""));
+
+ this.imageLoaders.set( refId, loader );
+ this.processQueue();
+
+ return new Promise( ( resolve ) => loader.onLoaded = () => {
+ resolve();
+ } );
+ }
+
+ async loadImageImmediate( imageId: number ) {
+ const refId = this.#refId( imageId );
+
+ if ( this.imageLoaders.has( refId ) ) {
+ return this.imageLoaders.get( refId )?.atlas ?? null;
+ }
+
+ const imageLoader = new ImageLoader(genFileName( refId, "HD2/" ), refId, this.#cache);
+ this.imageLoaders.set( refId, imageLoader );
+ await imageLoader.loader.fetch();
+ return imageLoader.atlas;
+ }
+
+
+ async processQueue() {
+ if ( this.currentDownloads >= this.maxDownloads ) {
+ return;
+ }
+
+ const imageLoaders = Array.from( this.imageLoaders.values() )
+ .filter( ( loader ) => loader.status === "idle" )
+ .sort( ( a, b ) => b.priority - a.priority );
+
+ for ( const image of imageLoaders ) {
+ this.currentDownloads++;
+ image.loader.fetch().finally( () => {
+ this.currentDownloads--;
+ this.processQueue();
+ });
+ }
+ }
+
+ dispose() {
+ for (const image of this.imageLoaders.values()) {
+ image.atlas?.dispose();
+ image.loader.cancel();
+ }
+ this.imageLoaders.clear();
+ }
+}
diff --git a/src/image/loader/image-loader.ts b/src/image/loader/image-loader.ts
index 881a3958..1cd67949 100644
--- a/src/image/loader/image-loader.ts
+++ b/src/image/loader/image-loader.ts
@@ -10,13 +10,9 @@ import {
} from "../atlas";
import { ResourceLoaderStatus } from "./resource-loader-status";
import { ResourceLoader } from "./resource-loader";
-import { settingsStore } from "@stores/settings-store";
import { IndexedDBCache } from "./indexed-db-cache";
import { renderComposer } from "@render/index";
-const genFileName = ( i: number, prefix = "" ) =>
- `${prefix}anim/main_${`00${i}`.slice( -3 )}.anim`;
-
// const setHDMipMaps = ( hd: AnimAtlas, hd2: AnimAtlas ) => {
// hd.diffuse.mipmaps.push( hd2.diffuse.mipmaps[0] );
@@ -71,87 +67,4 @@ export class ImageLoader {
}
}
-}
-
-export class ImageLoaderManager {
- maxDownloads = 8;
- currentDownloads = 0;
- imageLoaders = new Map();
- #refId: ( id: number ) => number;
- #cache = new IndexedDBCache( "image-cache" );
-
- constructor( refId: ( id: number ) => number ) {
- this.#refId = refId;
- this.#cache.enabled = settingsStore().data.utilities.cacheLocally;
- }
-
- exists( imageId: number ) {
- const refId = this.#refId( imageId );
- return this.imageLoaders.has( refId );
- }
-
- getImage( imageId: number, useRefId = true ): AnimAtlas | null {
- const refId = useRefId ? this.#refId( imageId ) : imageId;
- return this.imageLoaders.get( refId )?.atlas ?? null;
- }
-
- loadImage( imageId: number, priority = 3 ) {
- const refId = this.#refId( imageId );
-
- if ( this.imageLoaders.has( refId )) {
- this.processQueue();
- return;
- }
-
- const loader = new ImageLoader(genFileName( refId, "HD2/" ), imageId, this.#cache);
- loader.priority = priority;
- // const loader = new ImageLoader(genFileName( refId, res === UnitTileScale.HD2 ? "HD2/" : ""));
-
- this.imageLoaders.set( refId, loader );
- this.processQueue();
-
- return new Promise( ( resolve ) => loader.onLoaded = () => {
- resolve();
- } );
- }
-
- async loadImageImmediate( imageId: number ) {
- const refId = this.#refId( imageId );
-
- if ( this.imageLoaders.has( refId ) ) {
- return this.imageLoaders.get( refId )?.atlas ?? null;
- }
-
- const imageLoader = new ImageLoader(genFileName( refId, "HD2/" ), imageId, this.#cache);
- this.imageLoaders.set( refId, imageLoader );
- await imageLoader.loader.fetch();
- return imageLoader.atlas;
- }
-
-
- async processQueue() {
- if ( this.currentDownloads >= this.maxDownloads ) {
- return;
- }
-
- const imageLoaders = Array.from( this.imageLoaders.values() )
- .filter( ( loader ) => loader.status === "idle" )
- .sort( ( a, b ) => b.priority - a.priority );
-
- for ( const image of imageLoaders ) {
- this.currentDownloads++;
- image.loader.fetch().finally( () => {
- this.currentDownloads--;
- this.processQueue();
- });
- }
- }
-
- dispose() {
- for (const image of this.imageLoaders.values()) {
- image.atlas?.dispose();
- image.loader.cancel();
- }
- this.imageLoaders.clear();
- }
-}
+}
\ No newline at end of file
diff --git a/src/image/loader/indexed-db-cache.ts b/src/image/loader/indexed-db-cache.ts
index 9c345d04..4db600b7 100644
--- a/src/image/loader/indexed-db-cache.ts
+++ b/src/image/loader/indexed-db-cache.ts
@@ -12,18 +12,27 @@ export const cacheDBStoreNames = ["general-casc-cache", "image-cache"] as const;
export let appCacheDb: IDBDatabase;
+let _cacheWasOpened = false;
+
export const initCacheDB = () =>
new Promise((resolve, reject) => {
+ const _timeout = setTimeout(() => {
+ console.error("IndexedDB timeout");
+ reject(new Error("IndexedDB timeout"));
+ }, 1000);
+
console.log("Opening IndexedDB");
const dbReq = indexedDB.open(DB_NAME, DB_VERSION);
dbReq.onblocked = () => {
+ clearTimeout(_timeout);
console.error("IndexedDB blocked");
reject(new Error("IndexedDB blocked"));
};
// Create the schema
dbReq.onupgradeneeded = () => {
+ clearTimeout(_timeout);
console.log("IndexedDB upgrade needed");
appCacheDb = dbReq.result;
for (const storeName of cacheDBStoreNames) {
@@ -31,26 +40,30 @@ export const initCacheDB = () =>
appCacheDb.createObjectStore(storeName, { keyPath: "id" });
}
}
+ _cacheWasOpened = true;
resolve(undefined);
};
// Error handler
dbReq.onerror = (error) => {
+ clearTimeout(_timeout);
console.error(error);
reject(error);
};
// Success handler
dbReq.onsuccess = () => {
+ clearTimeout(_timeout);
console.log("IndexedDB opened successfully");
appCacheDb = dbReq.result;
+ _cacheWasOpened = true;
resolve(undefined);
};
});
export class IndexedDBCache {
#storeName: CacheDBStoreName;
- #enabled = true;
+ #enabled = _cacheWasOpened;
constructor(storeName: CacheDBStoreName) {
this.#storeName = storeName;
@@ -61,6 +74,9 @@ export class IndexedDBCache {
}
set enabled(value: boolean) {
+ if (_cacheWasOpened === false) {
+ return;
+ }
if (value !== this.#enabled && value === false) {
this.clear();
}
diff --git a/src/image/loader/resource-incremental-loader.ts b/src/image/loader/resource-incremental-loader.ts
index 9ae8ffcf..e63d7f78 100644
--- a/src/image/loader/resource-incremental-loader.ts
+++ b/src/image/loader/resource-incremental-loader.ts
@@ -1,23 +1,19 @@
import { ResourceLoader } from "./resource-loader";
function concatenateArrayBuffers(arrayBuffers: ArrayBuffer[]) {
- // Step 2: Calculate Total Length
const totalLength = arrayBuffers.reduce(
(acc, arrayBuffer) => acc + arrayBuffer.byteLength,
0
);
- // Step 3: Create a New Uint8Array
const result = new Uint8Array(totalLength);
- // Step 4: Copy Data
let offset = 0;
for (let arrayBuffer of arrayBuffers) {
result.set(new Uint8Array(arrayBuffer), offset);
offset += arrayBuffer.byteLength;
}
- // Step 5: Convert to Buffer
return Buffer.from(result);
}
diff --git a/src/input/create-unit-selection.ts b/src/input/create-unit-selection.ts
index 71379d5b..bbbe8e68 100644
--- a/src/input/create-unit-selection.ts
+++ b/src/input/create-unit-selection.ts
@@ -3,12 +3,13 @@ import { inverse } from "@utils/function-utils";
import { canOnlySelectOne } from "@utils/unit-utils";
import { Camera, Object3D, PerspectiveCamera, Raycaster, Vector2 } from "three";
import { SelectionBox } from "three/examples/jsm/interactive/SelectionBox";
-import { World } from "@core/world/world";
import BaseScene from "@render/base-scene";
import { ImageBase } from "@core/image-base";
import { ProjectedCameraView } from "../camera/projected-camera-view";
import { InputsComposer } from "@core/world/input-composer";
import { SimpleQuadtree } from "@utils/data-structures/simple-quadtree";
+import { TypeEmitter } from "@utils/type-emitter";
+import { WorldEvents } from "@core/world/world-events";
const MIN_DRAG_SIZE = 0.01;
@@ -28,7 +29,7 @@ export enum UnitSelectionStatus {
}
export const createUnitSelectionBox = (
- world: World,
+ events: TypeEmitter,
mouse: InputsComposer["mouse"],
scene: BaseScene,
imageQuadtree: SimpleQuadtree,
@@ -48,7 +49,7 @@ export const createUnitSelectionBox = (
selectionBox.startPoint.set( mouse.move.x, mouse.move.y, 0.5 );
- world.events.emit( "box-selection-start" );
+ events.emit( "box-selection-start" );
};
const largerThanMinDrag = () => {
@@ -67,7 +68,7 @@ export const createUnitSelectionBox = (
_selectBoxStarted = true;
}
} else {
- world.events.emit( "box-selection-move" );
+ events.emit( "box-selection-move" );
_status = UnitSelectionStatus.Dragging;
}
@@ -145,7 +146,7 @@ export const createUnitSelectionBox = (
if ( unit ) {
draft.push( unit );
} else {
- world.events.emit( "box-selection-end", [] );
+ events.emit( "box-selection-end", [] );
return;
}
} else {
@@ -179,7 +180,7 @@ export const createUnitSelectionBox = (
draft.sort( typeIdSort ).splice( 12 );
- world.events.emit( "box-selection-end", draft );
+ events.emit( "box-selection-end", draft );
};
return {
@@ -191,7 +192,7 @@ export const createUnitSelectionBox = (
},
set enabled( value: boolean ) {
if ( value !== _enabled ) {
- world.events.emit( "box-selection-enabled", value );
+ events.emit( "box-selection-enabled", value );
}
_enabled = value;
_selectActivated = value && _selectActivated;
diff --git a/src/openbw/structs/flingy-buffer-view.ts b/src/openbw/structs/flingy-buffer-view.ts
index cb15c8a7..4ac251e1 100644
--- a/src/openbw/structs/flingy-buffer-view.ts
+++ b/src/openbw/structs/flingy-buffer-view.ts
@@ -63,4 +63,11 @@ export class FlingyBufferView extends ThingyBufferView implements FlingyStruct {
return FP8(this._bw.HEAPU32[this._addr32 + 21]);
}
+ get currentVelocityDirection() {
+ const heading = this._bw.HEAP8[this._addr8 + ( 25 << 2 )];
+ const v = fractional_part( heading, 8 );
+ if ( v < 0 ) return 256 + v;
+ else return v;
+ }
+
}
diff --git a/src/openbw/structs/units-buffer-view.ts b/src/openbw/structs/units-buffer-view.ts
index 0e22fddc..a662bbe3 100644
--- a/src/openbw/structs/units-buffer-view.ts
+++ b/src/openbw/structs/units-buffer-view.ts
@@ -230,7 +230,21 @@ export class UnitsBufferView extends FlingyBufferView implements UnitStruct {
dest.groundWeaponCooldown = this.groundWeaponCooldown;
dest.airWeaponCooldown = this.airWeaponCooldown;
dest.spellCooldown = this.spellCooldown;
-
+
+ dest.moveTargetX = this.moveTargetX;
+ dest.moveTargetY = this.moveTargetY;
+
+ dest.orderTargetX = this.orderTargetX;
+ dest.orderTargetY = this.orderTargetY;
+
+ dest.nextMovementWaypointX = this.nextMovementWaypointX;
+ dest.nextMovementWaypointY = this.nextMovementWaypointY;
+
+ dest.nextTargetWaypointX = this.nextTargetWaypointX;
+ dest.nextTargetWaypointY = this.nextTargetWaypointY;
+
+ dest.currentSpeed = this.currentSpeed;
+ dest.currentVelocityDirection = this.currentVelocityDirection;
}
diff --git a/src/plugins/plugin-base.ts b/src/plugins/plugin-base.ts
index 4a0d7b7d..ee9d6f44 100644
--- a/src/plugins/plugin-base.ts
+++ b/src/plugins/plugin-base.ts
@@ -1,42 +1,61 @@
import type { GameTimeApi } from "@core/world/game-time-api";
import type {
FieldDefinition,
- Injectables,
NativePlugin,
PluginConfig,
PluginPackage,
} from "common/types";
-
-import { log } from "@ipc/log";
// import { savePluginsConfig } from "renderer/command-center/ipc/plugins";
import { normalizePluginConfiguration } from "@utils/function-utils";
+import type { SessionVariables } from "@core/world/settings-session-store";
+import { TypeEmitter, TypeEmitterProxy } from "@utils/type-emitter";
+import type { WorldEvents } from "@core/world/world-events";
+import { usePluginsStore } from "@stores/plugins-store";
const structuredClone =
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
globalThis.structuredClone ??
- ( ( x: any ) => JSON.parse( JSON.stringify( x ) ) as unknown );
+ ((x: any) => JSON.parse(JSON.stringify(x)) as unknown);
+
+export interface PluginBase extends NativePlugin, GameTimeApi {}
-export interface PluginBase extends NativePlugin, GameTimeApi, Injectables {}
+export type PluginSessionContext = {
+ game: GameTimeApi;
+ settings: SessionVariables;
+ events: TypeEmitter;
+ customEvents: TypeEmitter;
+};
-export class PluginBase {
+export class PluginBase implements PluginBase {
readonly id: string;
readonly name: string;
isSceneController = false;
#config: PluginConfig = {};
+ game: GameTimeApi;
+ settings: SessionVariables;
+ events: TypeEmitterProxy;
+
/**
* @internal
* Same as config but simplified to [key] = value
*/
#normalizedConfig: Record = {};
- constructor( pluginPackage: PluginPackage ) {
+ constructor(pluginPackage: PluginPackage, session: PluginSessionContext) {
this.id = pluginPackage.id;
this.name = pluginPackage.name;
- this.rawConfig = structuredClone( pluginPackage.config ?? {} );
+ this.rawConfig = structuredClone(pluginPackage.config ?? {});
+ this.game = session.game;
+ this.settings = session.settings;
+ this.events = new TypeEmitterProxy(session.events);
+ }
+
+ dispose() {
+ this.events.dispose();
}
- sendUIMessage: ( message: any ) => void = () => {};
+ sendUIMessage: (message: any) => void = () => {};
/**
*
@@ -46,18 +65,17 @@ export class PluginBase {
* @param value The configuration value.
* @returns
*/
- saveConfigProperty( key: string, value: unknown, persist = true ): void {
- if ( !( key in this.#config ) ) {
- log.warn(
+ saveConfigProperty(key: string, value: unknown, persist = true): void {
+ if (!(key in this.#config)) {
+ console.warn(
`Plugin ${this.id} tried to set config key ${key} but it was not found`
);
return undefined;
}
this.#config[key].value = value;
- if ( persist ) {
- //todo: persist
- // savePluginsConfig( this.id, this.#config );
+ if (persist) {
+ usePluginsStore.getState().savePluginConfig( this.id, this.#config );
}
}
@@ -66,7 +84,7 @@ export class PluginBase {
* Same as config but simplified to [key] = value
*/
refreshConfig() {
- this.#normalizedConfig = normalizePluginConfiguration( this.#config );
+ this.#normalizedConfig = normalizePluginConfiguration(this.#config);
}
/**
@@ -79,7 +97,7 @@ export class PluginBase {
/**
* Set the config from unnormalized data (ie leva config schema).
*/
- set rawConfig( value: PluginConfig ) {
+ set rawConfig(value: PluginConfig) {
this.#config = value;
this.refreshConfig();
}
@@ -92,7 +110,7 @@ export class PluginBase {
* @param key The configuration key.
* @returns the leva configuration for a particular field
*/
- getFieldDefinition( key: string ) {
+ getFieldDefinition(key: string) {
return this.#config[key] as FieldDefinition | undefined;
}
}
diff --git a/src/plugins/plugin-system-native.ts b/src/plugins/plugin-system-native.ts
index a2363928..57e70aad 100644
--- a/src/plugins/plugin-system-native.ts
+++ b/src/plugins/plugin-system-native.ts
@@ -7,11 +7,12 @@ import { withErrorMessage } from "common/utils/with-error-message";
import { UI_SYSTEM_CUSTOM_MESSAGE } from "./events";
import throttle from "lodash.throttle";
import { Janitor } from "three-janitor";
-import { mix } from "@utils/object-utils";
import { log } from "@ipc/log";
-import { PluginBase } from "./plugin-base";
+import { PluginBase, PluginSessionContext } from "./plugin-base";
import { SceneController } from "./scene-controller";
import lSet from "lodash.set";
+import { mix } from "@utils/object-utils";
+import { VRSceneController } from "./vr-controller";
type PluginsConfigSnapshot = Record<
string,
@@ -28,6 +29,7 @@ export class PluginSystemNative {
#sendCustomUIMessage!: (pluginId: string, message: any) => void;
#compartments = new WeakMap();
+ #sessionContext: PluginSessionContext;
/**
* Error trapping is signficantly slower than not using it.
@@ -43,28 +45,36 @@ export class PluginSystemNative {
return this.#plugins.reduce.bind(this.#plugins);
}
+ constructor( sessionContext: PluginSessionContext ) {
+ this.#sessionContext = sessionContext;
+ }
+
async activatePlugin(
pluginPackage: PluginMetaData,
createCompartment: (env: unknown) => {
globalThis: {
Function: (...args: any[]) => () => object | PluginBase;
};
- }
+ },
+ sessionContext: PluginSessionContext
) {
+ //todo: remove this
const compartment = createCompartment({
PluginBase,
SceneController,
+ VRSceneController,
});
try {
- const Plugin = await import(/* @vite-ignore */ pluginPackage.urls.host! );
+ const Plugin = await import(/* @vite-ignore */pluginPackage.urls.host! );
if (!Plugin) {
throw new Error("Plugin constructor must extend PluginBase");
}
- const plugin = new Plugin.default(pluginPackage);
+ const plugin = new Plugin.default(pluginPackage, sessionContext) as PluginBase;
+ mix(plugin, sessionContext.game);
plugin.isSceneController = pluginPackage.isSceneController;
@@ -94,12 +104,12 @@ export class PluginSystemNative {
async init(
pluginPackages: PluginMetaData[],
msg: (id: string, message: any) => void,
- createCompartment: (env: any) => any
+ createCompartment: (env: any) => any,
) {
log.debug(`@plugin-system-native: init`);
for (const pkg of pluginPackages) {
- const plugin = await this.activatePlugin(pkg, createCompartment);
+ const plugin = await this.activatePlugin(pkg, createCompartment, this.#sessionContext);
if (plugin) {
this.#plugins.push(plugin);
}
@@ -226,12 +236,33 @@ export class PluginSystemNative {
}
}
+ #hook_onTick( delta: number, elapsed: number ) {
+ for (const plugin of this.#plugins) {
+ if (plugin.onTick && this.isRegularPluginOrActiveSceneController(plugin)) {
+ plugin.onTick(delta, elapsed);
+ }
+ }
+ }
+
+ hook_onTick( delta: number, elapsed: number ) {
+ if (this.useTryCatchOnHooks) {
+ try {
+ this.#hook_onTick(delta, elapsed);
+ } catch (e) {
+ log.error(withErrorMessage(e, "@plugin-system-native: onFrame"));
+ }
+ } else {
+ this.#hook_onTick( delta, elapsed );
+ }
+ }
+
activateAdditionalPlugins(
pluginPackages: PluginMetaData[],
createCompartment: (env: any) => any
) {
+
const additionalPlugins = pluginPackages
- .map((p) => this.activatePlugin(p, createCompartment))
+ .map((p) => this.activatePlugin(p, createCompartment, this.#sessionContext))
.filter(Boolean);
this.#plugins = [...this.#plugins, ...additionalPlugins] as PluginBase[];
@@ -240,17 +271,16 @@ export class PluginSystemNative {
/**
* Temporarily inject an api into all active plugins.
*/
- injectApi(object: object) {
- mix(PluginBase.prototype, object);
- const keys = Object.keys(object);
-
- return () => {
- keys.forEach((key) => {
- // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
- delete PluginBase.prototype[key as keyof typeof PluginBase.prototype];
- });
- };
- }
+ // injectApi(object: object) {
+ // const keys = Object.keys(object);
+
+ // return () => {
+ // keys.forEach((key) => {
+ // // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
+ // delete PluginBase.prototype[key as keyof typeof PluginBase.prototype];
+ // });
+ // };
+ // }
getConfigSnapshot() {
return this.#plugins.reduce((acc, plugin) => {
diff --git a/src/plugins/plugin-system-ui.ts b/src/plugins/plugin-system-ui.ts
index df730e4f..a84b76e5 100644
--- a/src/plugins/plugin-system-ui.ts
+++ b/src/plugins/plugin-system-ui.ts
@@ -210,10 +210,7 @@ export class PluginSystemUI {
const assets = gameStore().assets!;
const payload: SystemReadyMessage = {
- plugins: pluginPackages.map( ( plugin ) => ( {
- ...plugin,
- config: normalizePluginConfiguration( plugin.config ?? {} ),
- } ) ),
+ plugins: this.#normalizePlugins( pluginPackages ),
initialStore: initialStore(),
assets: {
bwDat: assets.bwDat,
@@ -273,6 +270,13 @@ export class PluginSystemUI {
}
+ #normalizePlugins(pluginPackages: PluginMetaData[]) {
+ return pluginPackages.map( ( plugin ) => ( {
+ ...plugin,
+ config: normalizePluginConfiguration( plugin.config ?? {} ),
+ } ) );
+ }
+
show() {
this.#iframe.style.visibility = "visible";
}
@@ -344,7 +348,7 @@ export class PluginSystemUI {
activatePlugins( plugins: PluginMetaData[] ) {
this.sendMessage( {
type: UI_SYSTEM_PLUGINS_ENABLED,
- payload: plugins,
+ payload: this.#normalizePlugins( plugins ),
} );
}
diff --git a/src/plugins/scene-controller.ts b/src/plugins/scene-controller.ts
index d0d45962..f17f9bf5 100644
--- a/src/plugins/scene-controller.ts
+++ b/src/plugins/scene-controller.ts
@@ -1,15 +1,36 @@
import { GameTimeApi } from "@core/world/game-time-api";
-import { Injectables, NativePlugin } from "common/types";
-import { Quaternion, Vector2, Vector3 } from "three";
+import { NativePlugin } from "common/types";
+import {
+ Group,
+ Quaternion,
+ Vector2,
+ Vector3,
+} from "three";
import { PluginBase } from "./plugin-base";
/**
* @public
*/
-export interface SceneController
- extends Omit,
- GameTimeApi,
- Injectables {
+export type PrevSceneData = {
+ position: Vector3;
+ target: Vector3;
+ data?: any;
+};
+
+/**
+ * @public
+ */
+export interface SceneController extends Omit, GameTimeApi {
+ /**
+ * When a scene is entered and nearly initialized.
+ */
+ onEnterScene(prevData: PrevSceneData): Promise | void;
+
+ /**
+ * When a scene has exited. Dispose resources here.
+ */
+ onExitScene?(currentData: PrevSceneData): PrevSceneData | void;
+
/**
* Updates every frame with the current mouse data.
*
@@ -43,7 +64,7 @@ export interface SceneController
* @param elapsed - Time in milliseconds since the game started
* @param truck - x,y movement deltas
*/
- onCameraKeyboardUpdate?( delta: number, elapsed: number, truck: Vector2 ): void;
+ onCameraKeyboardUpdate?(delta: number, elapsed: number, truck: Vector2): void;
/**
* An optional override for the position of the audio listener.
@@ -51,7 +72,7 @@ export interface SceneController
* @param target - Vector3 of the current camera target
* @param position - Vector 3 of the current camera position
*/
- onUpdateAudioMixerLocation( target: Vector3, position: Vector3 ): Vector3;
+ onUpdateAudioMixerLocation(target: Vector3, position: Vector3): Vector3;
/**
* Updates when the minimap is clicked and dragged.
@@ -74,17 +95,17 @@ const _va = new Vector3(),
/**
* @public
*/
-export class SceneController extends PluginBase implements SceneController {
+export class SceneController
+ extends PluginBase
+ implements NativePlugin, SceneController
+{
override isSceneController = true;
isWebXR = false;
viewportsCount = 1;
-
- override onEnterScene( prevData: unknown ) {
- return Promise.resolve( prevData );
- }
+ parent = new Group();
//TODO: change to globalThis
- onUpdateAudioMixerLocation( target: Vector3, position: Vector3 ) {
+ onUpdateAudioMixerLocation(target: Vector3, position: Vector3) {
return position.lerp(
target,
this.settings.session.audioListenerDistance() as number
@@ -92,7 +113,9 @@ export class SceneController extends PluginBase implements SceneController {
}
onUpdateAudioMixerOrientation() {
- this.viewport.camera.matrixWorld.decompose( _va, _qa, _vb );
+ this.viewport.camera.matrixWorld.decompose(_va, _qa, _vb);
return _qa;
}
}
+
+
diff --git a/src/plugins/vr-controller.ts b/src/plugins/vr-controller.ts
new file mode 100644
index 00000000..d03292f2
--- /dev/null
+++ b/src/plugins/vr-controller.ts
@@ -0,0 +1,127 @@
+
+
+import { NativePlugin } from "common/types";
+import {
+ Group,
+ Quaternion,
+ Vector3,
+ WebXRManager,
+ XRTargetRaySpace,
+} from "three";
+import { XRControllerModelFactory } from "three/examples/jsm/webxr/XRControllerModelFactory.js";
+import { SceneController } from "./scene-controller";
+
+const _va = new Vector3(),
+ _vb = new Vector3(),
+ _qa = new Quaternion();
+
+/**
+ * @public
+ */
+export class VRSceneController
+ extends SceneController
+ implements NativePlugin, SceneController
+{
+ override isSceneController = true;
+ override isWebXR = true;
+ override viewportsCount = 1;
+
+ xr!: WebXRManager;
+ baseReferenceSpace!: XRReferenceSpace;
+ controllerModelFactory = new XRControllerModelFactory();
+ controller1!: XRTargetRaySpace;
+ controller2!: XRTargetRaySpace;
+ input1?: XRInputSource;
+ input2?: XRInputSource;
+ lastWorldPosition = new Vector3();
+ viewerPosition = new Group();
+
+ constructor(...args: ConstructorParameters) {
+ super(...args);
+ }
+
+ setupXR(xr: WebXRManager) {
+ this.xr = xr;
+ this.baseReferenceSpace = this.xr.getReferenceSpace()!;
+ this.controller1 = this.xr.getController(0);
+ this.controller2 = this.xr.getController(1);
+
+ this.controller1.addEventListener(
+ "connected",
+ ({ data }: { data: XRInputSource }) => {
+ this.input1 = data;
+ }
+ );
+ this.controller1.addEventListener("disconnected", () => {
+ this.input1 = undefined;
+ this.parent.remove(this.controller1.children[0]);
+
+ });
+ this.parent.add(this.controller1);
+
+ // this.controller2.addEventListener("selectstart", onSelectStart);
+ // this.controller2.addEventListener("selectend", onSelectEnd);
+ this.controller2.addEventListener(
+ "connected",
+ ({ data }: { data: XRInputSource }) => {
+ this.input2 = data;
+ }
+ );
+ this.controller2.addEventListener("disconnected", () => {
+ this.input2 = undefined;
+ this.parent.remove(this.controller1.children[0])
+ });
+ this.parent.add(this.controller2);
+
+ // this.getPoseWorldPosition();
+ }
+
+
+
+ moveLocal(targetPosition: Vector3) {
+ // _v4.set( targetPosition.x, targetPosition.y, targetPosition.z, 1 );
+ this.viewerPosition.position.add(targetPosition);
+ // const offsetRotation = new Quaternion();
+ // const transform = new XRRigidTransform( _v4, offsetRotation );
+ // const teleportSpaceOffset = this.xr.getReferenceSpace()!.getOffsetReferenceSpace( transform );
+ // this.xr.setReferenceSpace( teleportSpaceOffset );
+ }
+
+ moveWorld(targetPosition: Vector3) {
+ // _v4.set( targetPosition.x, targetPosition.y, targetPosition.z, 1 );
+ this.viewerPosition.position.copy(targetPosition);
+
+ // const currentPosition = this.lastWorldPosition;
+ // _v3.copy( targetPosition ).sub( currentPosition );
+ // _v4.set( _v3.x, _v3.y, _v3.z, 1 );
+
+ // const offsetRotation = new Quaternion();
+ // const transform = new XRRigidTransform( _v4, offsetRotation );
+
+ // const newReferenceSpace = this.xr.getReferenceSpace()!.getOffsetReferenceSpace(transform);
+
+ // this.xr.setReferenceSpace(newReferenceSpace);
+ }
+
+ getPoseWorldPosition() {
+ const pose = this.xr.getFrame()?.getViewerPose(this.baseReferenceSpace);
+ if (pose) {
+ this.lastWorldPosition.set(
+ pose.transform.position.x,
+ pose.transform.position.y,
+ pose.transform.position.z
+ );
+ return this.lastWorldPosition;
+ }
+ return this.lastWorldPosition;
+ }
+
+ override onUpdateAudioMixerLocation() {
+ return this.viewerPosition.position;
+ }
+
+ override onUpdateAudioMixerOrientation() {
+ this.viewport.camera.matrixWorld.decompose(_va, _qa, _vb);
+ return _qa;
+ }
+}
diff --git a/src/render/render-composer.ts b/src/render/render-composer.ts
index ab807677..a1b2c6de 100644
--- a/src/render/render-composer.ts
+++ b/src/render/render-composer.ts
@@ -10,7 +10,7 @@ import {
WebGLRenderer,
} from "three";
import { EffectComposer, Pass } from "postprocessing";
-import { ColorManagement } from "three/src/math/ColorManagement";
+import { ColorManagement } from "three";
import { globalEvents } from "../core/global-events";
ColorManagement.enabled = true;
diff --git a/src/render/vr/test.tsx b/src/render/vr/vr-button-react.tsx
similarity index 53%
rename from src/render/vr/test.tsx
rename to src/render/vr/vr-button-react.tsx
index 7482457a..e95df84b 100644
--- a/src/render/vr/test.tsx
+++ b/src/render/vr/vr-button-react.tsx
@@ -1,19 +1,17 @@
import React, { useEffect, useState, useCallback } from 'react';
+import { InGameMenuButton } from '../../scenes/game-scene/ingame-menu-button';
type VRButtonProps = {
renderer: any; // replace 'any' with the actual type of renderer
};
-const VRButton: React.FC = ({ renderer }) => {
- const [buttonText, setButtonText] = useState('ENTER VR');
+const VRButtonReact: React.FC = ({ renderer }) => {
const [currentSession, setCurrentSession] = useState(null);
const [isSupported, setIsSupported] = useState(false);
const onSessionStarted = useCallback(
async (session: XRSession) => {
- session.addEventListener('end', onSessionEnded);
await renderer.xr.setSession(session);
- setButtonText('EXIT VR');
setCurrentSession(session);
},
[renderer.xr]
@@ -21,22 +19,26 @@ const VRButton: React.FC = ({ renderer }) => {
const onSessionEnded = useCallback(
() => {
- if (currentSession) {
- currentSession.removeEventListener('end', onSessionEnded);
- }
- setButtonText('ENTER VR');
setCurrentSession(null);
},
[currentSession]
);
+ useEffect(() => {
+ if (currentSession) {
+ currentSession.addEventListener('end', onSessionEnded);
+ }
+ return () => {
+ if (currentSession) {
+ currentSession.removeEventListener('end', onSessionEnded);
+ }
+ }
+ }, [currentSession]);
+
useEffect(() => {
if ('xr' in navigator) {
navigator.xr!.isSessionSupported('immersive-vr').then((supported) => {
setIsSupported(supported);
- if (supported) {
- // additional logic if needed
- }
});
}
}, []);
@@ -52,25 +54,16 @@ const VRButton: React.FC = ({ renderer }) => {
}
};
- const buttonStyle = {
- display: isSupported ? '' : 'none',
- cursor: 'pointer',
- left: 'calc(50% - 50px)',
- width: '100px',
- opacity: '0.5',
- // ... other styles
- };
+ const buttonText = isSupported ? (currentSession ? "Exit VR" : "Enter VR") : 'VR Not Supported';
return (
-
+
);
};
-export default VRButton;
\ No newline at end of file
+export default VRButtonReact;
\ No newline at end of file
diff --git a/src/runtime.tsx b/src/runtime.tsx
index e863cb27..6633c324 100644
--- a/src/runtime.tsx
+++ b/src/runtime.tsx
@@ -10,11 +10,11 @@ import create from "zustand";
// import { Canvas, useFrame as r3fUseFrame } from 'https://cdn.jsdelivr.net/npm/@react-three/fiber@8.14.5/+esm'
// split up an array into chunks of size n
-function chunk( arr: Int32Array, n: number ) {
+function chunk(arr: Int32Array, n: number) {
const chunks = [];
let i = 0;
- while ( i < arr.length ) {
- chunks.push( arr.slice( i, ( i += n ) ) );
+ while (i < arr.length) {
+ chunks.push(arr.slice(i, (i += n)));
}
return chunks;
}
@@ -35,68 +35,68 @@ interface Plugin {
}
type StateMessage = Partial;
-const useStore = create( () => ( {
+const useStore = create(() => ({
screen: {
screen: "@home",
error: undefined,
},
-} ) );
+}));
// friendly utilities
-const _useLocale = ( state: StateMessage ) => state.language;
+const _useLocale = (state: StateMessage) => state.language;
/**
* @public
* Use the translation function to translate a string
*/
export const useLocale = () => {
- return useStore( _useLocale );
+ return useStore(_useLocale);
};
-const _useReplay = ( state: StateMessage ) => state.world!.replay;
+const _useReplay = (state: StateMessage) => state.world!.replay;
/**
* @public
* The replay header information.
*/
export const useReplay = () => {
- return useStore( _useReplay );
+ return useStore(_useReplay);
};
-const _useMap = ( state: StateMessage ) => state.world!.map;
+const _useMap = (state: StateMessage) => state.world!.map;
/**
* @public
* The map information.
*/
export const useMap = () => {
- return useStore( _useMap );
+ return useStore(_useMap);
};
-const _useFrame = ( state: StateMessage ) => state.frame;
+const _useFrame = (state: StateMessage) => state.frame;
/**
* @public
* The current frame of the replay.
*/
export const useFrame = () => {
- return useStore( _useFrame );
+ return useStore(_useFrame);
};
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
-const _usePlayers = ( state: StateMessage ) => state.world?.replay?.players;
+const _usePlayers = (state: StateMessage) => state.world?.replay?.players;
/**
* @public
* All players in the current replay.
*/
export const usePlayers = () => {
- return useStore( _usePlayers ) ?? [];
+ return useStore(_usePlayers) ?? [];
};
-const _usePlayerFrame = ( state: StateMessage ) => state.production!.playerData;
+const _usePlayerFrame = (state: StateMessage) => state.production!.playerData;
/**
* @public
* Returns a function getPlayerInfo that can be used to get resource information about a player.
*/
export const usePlayerFrame = () => {
- const playerData = useStore( _usePlayerFrame );
- return ( id: number ) => getPlayerInfo( id, playerData );
+ const playerData = useStore(_usePlayerFrame);
+ return (id: number) => getPlayerInfo(id, playerData);
};
/**
@@ -105,56 +105,56 @@ export const usePlayerFrame = () => {
*/
export const usePlayer = () => {
const players = usePlayers();
- return ( playerId: number ) => {
- return players.find( ( player ) => player.id === playerId );
+ return (playerId: number) => {
+ return players.find((player) => player.id === playerId);
};
};
-const _useSelectedUnits = ( state: StateMessage ) => state.units;
+const _useSelectedUnits = (state: StateMessage) => state.units;
/**
* @public
* Returns user selected units (if any).
*/
export const useSelectedUnits = () => {
- return ( useStore( _useSelectedUnits ) ?? [] ).map( ( unit ) => {
+ return (useStore(_useSelectedUnits) ?? []).map((unit) => {
return {
...unit,
extras: {
dat: assets.bwDat.units[unit.typeId!],
},
};
- } );
+ });
};
-const unitIsComplete = ( unit: DumpedUnit ) => {
- return ( unit.statusFlags! & 0x01 ) === 1;
+const unitIsComplete = (unit: DumpedUnit) => {
+ return (unit.statusFlags! & 0x01) === 1;
};
/**
* @public
* Get the icon id for a particular unit type.
*/
-export const getUnitIcon = ( unit: DumpedUnit ) => {
+export const getUnitIcon = (unit: DumpedUnit) => {
if (
- ( unit.extras!.dat.isBuilding &&
+ (unit.extras!.dat.isBuilding &&
!unit.extras!.dat.isZerg &&
- unitIsComplete( unit ) &&
- unit.buildQueue?.length ) ||
- ( unit.extras!.dat.isZerg &&
+ unitIsComplete(unit) &&
+ unit.buildQueue?.length) ||
+ (unit.extras!.dat.isZerg &&
!unit.extras!.dat.isBuilding &&
- unit.buildQueue?.length )
+ unit.buildQueue?.length)
) {
return unit.buildQueue[0];
}
- if ( unitIsComplete( unit ) && unit.remainingTrainTime ) {
- if ( unit.typeId === enums.unitTypes.reaver ) {
+ if (unitIsComplete(unit) && unit.remainingTrainTime) {
+ if (unit.typeId === enums.unitTypes.reaver) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return enums.unitTypes.scarab;
- } else if ( unit.typeId === enums.unitTypes.carrier ) {
+ } else if (unit.typeId === enums.unitTypes.carrier) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return enums.unitTypes.interceptor;
- } else if ( unit.typeId === enums.unitTypes.nuclearSilo ) {
+ } else if (unit.typeId === enums.unitTypes.nuclearSilo) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return enums.unitTypes.nuclearMissile;
}
@@ -163,7 +163,7 @@ export const getUnitIcon = ( unit: DumpedUnit ) => {
return null;
};
-const mapUnitInProduction = ( input: Int32Array, unit: UnitDAT ) =>
+const mapUnitInProduction = (input: Int32Array, unit: UnitDAT) =>
unit.isTurret
? null
: {
@@ -174,44 +174,44 @@ const mapUnitInProduction = ( input: Int32Array, unit: UnitDAT ) =>
isUnit: true,
};
-const mapUpgradeInProduction = ( input: Int32Array, upgrade: UpgradeDAT ) => ( {
+const mapUpgradeInProduction = (input: Int32Array, upgrade: UpgradeDAT) => ({
typeId: input[0],
icon: upgrade.icon,
level: input[1],
isUpgrade: true,
progress:
- input[2]! / ( upgrade.researchTimeBase + upgrade.researchTimeFactor * input[1]! ),
-} );
+ input[2]! / (upgrade.researchTimeBase + upgrade.researchTimeFactor * input[1]!),
+});
-const mapResearchInProduction = ( input: Int32Array, research: TechDataDAT ) => ( {
+const mapResearchInProduction = (input: Int32Array, research: TechDataDAT) => ({
typeId: input[0],
icon: research.icon,
progress: input[1]! / research.researchTime,
isResearch: true,
-} );
+});
-const _useProduction = ( state: StateMessage ) => state.production!;
+const _useProduction = (state: StateMessage) => state.production!;
/**
* @public
* Returns three functions that can be used to get player production information.
* Units, Upgrades and Research.
*/
export const useProduction = () => {
- const { unitProduction, upgrades, research } = useStore( _useProduction );
+ const { unitProduction, upgrades, research } = useStore(_useProduction);
return [
- ( playerId: number ) =>
- chunk( unitProduction[playerId]!, 3 )
- .map( ( unit ) => mapUnitInProduction( unit, assets.bwDat.units[unit[0]!]! ) )
- .filter( ( unit ) => unit ),
-
- ( playerId: number ) =>
- chunk( upgrades[playerId]!, 3 ).map( ( upgrade ) =>
- mapUpgradeInProduction( upgrade, assets.bwDat.upgrades[upgrade[0]!]! )
+ (playerId: number) =>
+ chunk(unitProduction[playerId]!, 3)
+ .map((unit) => mapUnitInProduction(unit, assets.bwDat.units[unit[0]!]!))
+ .filter((unit) => unit),
+
+ (playerId: number) =>
+ chunk(upgrades[playerId]!, 3).map((upgrade) =>
+ mapUpgradeInProduction(upgrade, assets.bwDat.upgrades[upgrade[0]!]!)
),
- ( playerId: number ) =>
- chunk( research[playerId]!, 2 ).map( ( research ) =>
- mapResearchInProduction( research, assets.bwDat.tech[research[0]!]! )
+ (playerId: number) =>
+ chunk(research[playerId]!, 2).map((research) =>
+ mapResearchInProduction(research, assets.bwDat.tech[research[0]!]!)
),
];
};
@@ -220,18 +220,18 @@ export const useProduction = () => {
* @public
* Converts a frame numer to a time string eg 01:00.
*/
-export const getFriendlyTime = ( frame: number ) => {
- const t = Math.floor( ( frame * 42 ) / 1000 );
- const minutes = Math.floor( t / 60 );
- const seconds = Math.floor( t % 60 );
+export const getFriendlyTime = (frame: number) => {
+ const t = Math.floor((frame * 42) / 1000);
+ const minutes = Math.floor(t / 60);
+ const seconds = Math.floor(t % 60);
- return `${minutes}:${`00${seconds}`.slice( -2 )}`;
+ return `${minutes}:${`00${seconds}`.slice(-2)}`;
};
/**
* @public
*/
-export const openUrl = ( url: string ) =>
+export const openUrl = (url: string) =>
window.parent.postMessage(
{
type: "system:open-url",
@@ -241,63 +241,62 @@ export const openUrl = ( url: string ) =>
);
// plugin specific configuration
-const useConfig = create>( () => ( {} ) );
+const useConfig = create>(() => ({}));
interface ComponentsStore {
components: Component[];
- add: ( component: Component ) => void;
- remove: ( id: string ) => void;
+ add: (component: Component) => void;
+ remove: (id: string) => void;
}
-const useComponents = create( ( set, get ) => ( {
+const useComponents = create((set, get) => ({
components: [],
- add: ( item ) => set( { components: [ ...get().components, item ] } ),
- remove: ( id ) =>
- set( { components: get().components.filter( ( c ) => c.pluginId !== id ) } ),
-} ) );
-
-const setPluginStyleSheet = ( id: string, content: string ) => {
- let style = document.getElementById( id );
- if ( !style ) {
- style = document.createElement( "style" );
+ add: (item) => set({ components: [...get().components, item] }),
+ remove: (id) =>
+ set({ components: get().components.filter((c) => c.pluginId !== id) }),
+}));
+
+const setPluginStyleSheet = (id: string, content: string) => {
+ let style = document.getElementById(id);
+ if (!style) {
+ style = document.createElement("style");
style.id = id;
- document.head.appendChild( style );
+ document.head.appendChild(style);
}
style.textContent = content;
};
-const removePluginStylesheet = ( id: string ) => {
- const style = document.getElementById( id );
- style && document.head.removeChild( style );
+const removePluginStylesheet = (id: string) => {
+ const style = document.getElementById(id);
+ style && document.head.removeChild(style);
};
const _plugins: Record = {};
-const _removePlugin = ( pluginId: string ) => {
+const _removePlugin = (pluginId: string) => {
const plugin = _plugins[pluginId] as Plugin | undefined;
- if ( !plugin || pluginId !== plugin.id ) {
+ if (!plugin || pluginId !== plugin.id) {
return;
}
- useComponents.getState().remove( plugin.id );
+ useComponents.getState().remove(plugin.id);
plugin.script.remove();
- delete _plugins[plugin.id];
};
-const _addPlugin = ( plugin: PluginMetaData ) => {
+const _addPlugin = (plugin: PluginMetaData) => {
console.log("@runtime/loading-plugin", plugin.name);
- if ( !plugin.urls.ui ) {
+ if (!plugin.urls.ui) {
return;
}
// initialize the plugin channels custom script and we'll later wait for it to register
- const script = document.createElement( "script" );
+ const script = document.createElement("script");
script.type = "module";
script.async = true;
- script.src = plugin.urls.ui;
- document.head.appendChild( script );
+ script.src = `${plugin.urls.ui}?=${Math.random()}`;
+ document.head.appendChild(script);
_plugins[plugin.id] = {
id: plugin.id,
@@ -305,9 +304,9 @@ const _addPlugin = ( plugin: PluginMetaData ) => {
script,
};
- useConfig.setState( {
+ useConfig.setState({
[plugin.id]: plugin.config,
- } );
+ });
};
/**
* @public
@@ -336,20 +335,20 @@ class RollingValue {
_direction = false;
_speed = 0;
- constructor( value = 0, upSpeed = 80, downSpeed = 30 ) {
+ constructor(value = 0, upSpeed = 80, downSpeed = 30) {
this.upSpeed = upSpeed;
this.downSpeed = downSpeed;
this._value = typeof value === "number" ? value : 0;
this._rollingValue = this._value;
}
- update( delta: number ) {
- if ( this._running && delta >= this._speed ) {
+ update(delta: number) {
+ if (this._running && delta >= this._speed) {
this._rollingValue = this._direction
- ? Math.min( this._value, this._rollingValue + 1 )
- : Math.max( this._value, this._rollingValue - 1 );
+ ? Math.min(this._value, this._rollingValue + 1)
+ : Math.max(this._value, this._rollingValue - 1);
- if ( this._rollingValue === this._value ) {
+ if (this._rollingValue === this._value) {
this._running = false;
}
return true;
@@ -365,13 +364,13 @@ class RollingValue {
return this._running;
}
- start( value: number, onUpdate: ( value: number ) => void ) {
- if ( value === this._value ) return;
+ start(value: number, onUpdate: (value: number) => void) {
+ if (value === this._value) return;
this._value = typeof value === "number" ? value : 0;
const direction = this._value > this._rollingValue;
- if ( this._running && direction === this._direction ) {
+ if (this._running && direction === this._direction) {
return;
}
@@ -380,19 +379,19 @@ class RollingValue {
this._running = true;
this.#lastTime = 0;
- const raf = ( elapsed: number ) => {
+ const raf = (elapsed: number) => {
const delta = elapsed - this.#lastTime;
- if ( this.update( delta ) ) {
+ if (this.update(delta)) {
this.#lastTime = elapsed;
- onUpdate( this._rollingValue );
+ onUpdate(this._rollingValue);
}
- if ( this.isRunning ) {
- requestAnimationFrame( raf );
+ if (this.isRunning) {
+ requestAnimationFrame(raf);
}
};
- requestAnimationFrame( raf );
+ requestAnimationFrame(raf);
}
stop() {
@@ -404,7 +403,7 @@ class RollingValue {
* @public
* A number that rolls up and down quickly like a casino slot.
*/
-export const RollingNumber = ( {
+export const RollingNumber = ({
value,
upSpeed,
downSpeed,
@@ -413,29 +412,29 @@ export const RollingNumber = ( {
value: number;
upSpeed: number | undefined;
downSpeed: number | undefined;
-} ) => {
- const numberRef = useRef( null );
+}) => {
+ const numberRef = useRef(null);
const rollingNumber = useRef(
- new RollingValue( value, upSpeed ?? 80, downSpeed ?? 30 )
+ new RollingValue(value, upSpeed ?? 80, downSpeed ?? 30)
);
- useEffect( () => {
- if ( numberRef.current ) {
+ useEffect(() => {
+ if (numberRef.current) {
numberRef.current.textContent = `${value}`;
}
- }, [] );
+ }, []);
- useEffect( () => {
- rollingNumber.current.start( value, ( val ) => {
- if ( numberRef.current ) {
+ useEffect(() => {
+ rollingNumber.current.start(value, (val) => {
+ if (numberRef.current) {
numberRef.current.textContent = `${val}`;
}
- } );
+ });
return () => {
rollingNumber.current.stop();
};
- }, [ value ] );
+ }, [value]);
return ;
};
@@ -491,33 +490,33 @@ const getPlayerInfo = (
return playerInfo;
};
-const updateDimensionsCss = ( dimensions: MinimapDimensions ) => {
+const updateDimensionsCss = (dimensions: MinimapDimensions) => {
setPluginStyleSheet(
"game-dimension-css-vars",
`:root {
--minimap-width: ${dimensions.minimapWidth}px;
--minimap-height: ${dimensions.minimapHeight}px;
- --minimap-matrix: matrix3d(${dimensions.matrix.join( "," )});
+ --minimap-matrix: matrix3d(${dimensions.matrix.join(",")});
}`
);
};
-const PluginContext = createContext( null );
+const PluginContext = createContext(null);
/**
* @public
* Receive ipc messages from your native plugin.
*/
-export const useMessage = ( cb?: ( event: any ) => void, deps: unknown[] = [] ) => {
- const { messageHandler } = useContext( PluginContext )!;
+export const useMessage = (cb?: (event: any) => void, deps: unknown[] = []) => {
+ const { messageHandler } = useContext(PluginContext)!;
- useEffect( () => {
- const handler = ( { detail }: any ) => {
- typeof cb === "function" && cb( detail );
+ useEffect(() => {
+ const handler = ({ detail }: any) => {
+ typeof cb === "function" && cb(detail);
};
- messageHandler.addEventListener( "message", handler );
- return () => messageHandler.removeEventListener( "message", handler );
- }, [ ...deps, cb, messageHandler ] );
+ messageHandler.addEventListener("message", handler);
+ return () => messageHandler.removeEventListener("message", handler);
+ }, [...deps, cb, messageHandler]);
};
/**
@@ -525,9 +524,9 @@ export const useMessage = ( cb?: ( event: any ) => void, deps: unknown[] = [] )
* Send ipc messages to your native plugin.
*/
export const useSendMessage = () => {
- const { pluginId } = useContext( PluginContext )!;
+ const { pluginId } = useContext(PluginContext)!;
- return ( message: unknown ) =>
+ return (message: unknown) =>
window.parent.postMessage(
{
type: "system:custom-message",
@@ -545,29 +544,29 @@ export const useSendMessage = () => {
* Get your users plugin configuration.
*/
export const usePluginConfig = () => {
- const { pluginId } = useContext( PluginContext )!;
- return useConfig( ( store ) => store[pluginId] );
+ const { pluginId } = useContext(PluginContext)!;
+ return useConfig((store) => store[pluginId]);
};
/**
* @public
* Set a global stylesheet.
*/
-export const useStyleSheet = ( content: string, deps = [] ) => {
- const { pluginId } = useContext( PluginContext )!;
- useEffect( () => {
- setPluginStyleSheet( pluginId, content );
- }, [ content, ...deps ] );
-
- useEffect( () => {
- return () => removePluginStylesheet( pluginId );
- }, [] );
+export const useStyleSheet = (content: string, deps = []) => {
+ const { pluginId } = useContext(PluginContext)!;
+ useEffect(() => {
+ setPluginStyleSheet(pluginId, content);
+ }, [content, ...deps]);
+
+ useEffect(() => {
+ return () => removePluginStylesheet(pluginId);
+ }, []);
};
/**
* @public
*/
-export const proxyFetch = ( url: string ) => fetch( `?proxy=${encodeURIComponent( url )}` );
+export const proxyFetch = (url: string) => fetch(`?proxy=${encodeURIComponent(url)}`);
export const _rc = (
pluginId: string,
@@ -575,14 +574,14 @@ export const _rc = (
JSXElement: React.FC
) => {
const plugin = _plugins[pluginId];
- if ( !plugin ) {
+ if (!plugin) {
return;
}
component.id = Math.random();
component.order = component.order ?? 0;
- useComponents.getState().add( {
+ useComponents.getState().add({
...component,
pluginId,
id: Math.random(),
@@ -590,23 +589,23 @@ export const _rc = (
messageHandler: plugin.messageHandler,
JSXElement,
snap: component.snap ?? "loose",
- } );
+ });
};
const AppWrapper = () => {
- const components = useComponents( ( state ) => state.components );
+ const components = useComponents((state) => state.components);
return ;
};
-const _screenSelector = ( store: StateMessage ) => store.screen;
+const _screenSelector = (store: StateMessage) => store.screen;
-const PluginComponent = ( {
+const PluginComponent = ({
key,
JSXElement,
}: {
key: string | number;
JSXElement: Component["JSXElement"];
-} ) => {
+}) => {
const config = usePluginConfig() as { _visible: boolean };
return (
@@ -617,33 +616,33 @@ const PluginComponent = ( {
);
};
-const orderSort = ( a: Component, b: Component ) => {
+const orderSort = (a: Component, b: Component) => {
return a.order! - b.order!;
};
-const App = ( { components }: { components: Component[] } ) => {
- const { screen } = useStore( _screenSelector )!;
- const containerDiv = useRef( null );
+const App = ({ components }: { components: Component[] }) => {
+ const { screen } = useStore(_screenSelector)!;
+ const containerDiv = useRef(null);
- useEffect( () => {
- if ( !containerDiv.current ) return;
+ useEffect(() => {
+ if (!containerDiv.current) return;
- if ( [ "@home", "@loading" ].includes( screen as string ) ) {
+ if (["@home", "@loading"].includes(screen as string)) {
containerDiv.current.style.opacity = "1";
} else {
let opacity = 0;
- const cancelId = setInterval( () => {
+ const cancelId = setInterval(() => {
opacity += 0.025;
- containerDiv.current!.style.opacity = `${Math.min( opacity, 1 )}`;
- if ( opacity >= 1 ) {
- clearInterval( cancelId );
+ containerDiv.current!.style.opacity = `${Math.min(opacity, 1)}`;
+ if (opacity >= 1) {
+ clearInterval(cancelId);
}
- }, 50 );
- return () => clearInterval( cancelId );
+ }, 50);
+ return () => clearInterval(cancelId);
}
- }, [ screen ] );
+ }, [screen]);
- const renderComponent = ( component: Component ) => (
+ const renderComponent = (component: Component) => (
@@ -695,9 +694,9 @@ const App = ( { components }: { components: Component[] } ) => {
flexDirection: "column",
}}>
{components
- .filter( ( c ) => c.snap === "top-left" )
- .sort( orderSort )
- .map( renderComponent )}
+ .filter((c) => c.snap === "top-left")
+ .sort(orderSort)
+ .map(renderComponent)}
{
flexGrow: 1,
}}>
{components
- .filter( ( c ) => c.snap === "top" )
- .sort( orderSort )
- .map( renderComponent )}
+ .filter((c) => c.snap === "top")
+ .sort(orderSort)
+ .map(renderComponent)}
{
flexDirection: "column",
}}>
{components
- .filter( ( c ) => c.snap === "top-right" )
- .sort( orderSort )
- .map( renderComponent )}
+ .filter((c) => c.snap === "top-right")
+ .sort(orderSort)
+ .map(renderComponent)}
{
// marginBottom: "var(--minimap-height)",
}}>
{components
- .filter( ( c ) => c.snap === "left" )
- .sort( orderSort )
- .map( renderComponent )}
+ .filter((c) => c.snap === "left")
+ .sort(orderSort)
+ .map(renderComponent)}
{
flexGrow: 1,
}}>
{components
- .filter( ( c ) => c.snap === "center" )
- .sort( orderSort )
- .map( renderComponent )}
+ .filter((c) => c.snap === "center")
+ .sort(orderSort)
+ .map(renderComponent)}
{
display: "flex",
}}>
{components
- .filter( ( c ) => c.snap === "bottom" )
- .sort( orderSort )
- .map( renderComponent )}
+ .filter((c) => c.snap === "bottom")
+ .sort(orderSort)
+ .map(renderComponent)}
{components
- .filter( ( c ) => c.snap === "right" )
- .sort( orderSort )
- .map( renderComponent )}
+ .filter((c) => c.snap === "right")
+ .sort(orderSort)
+ .map(renderComponent)}
{components
- .filter( ( c ) => c.snap === "loose" )
- .sort( orderSort )
- .map( renderComponent )}
+ .filter((c) => c.snap === "loose")
+ .sort(orderSort)
+ .map(renderComponent)}
>
);
@@ -801,9 +800,9 @@ class ErrorBoundary extends React.Component {
children?: React.ReactNode;
} = {};
- constructor( props: any ) {
+ constructor(props: any) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
- super( props );
+ super(props);
this.state = { hasError: false };
}
@@ -811,12 +810,12 @@ class ErrorBoundary extends React.Component {
return { hasError: true };
}
- override componentDidCatch( error: any, errorInfo: any ) {
- console.error( error, errorInfo );
+ override componentDidCatch(error: any, errorInfo: any) {
+ console.error(error, errorInfo);
}
override render() {
- if ( this.state.hasError ) {
+ if (this.state.hasError) {
return <>☠️>;
}
@@ -850,60 +849,60 @@ class ErrorBoundary extends React.Component {
/**
* Core of runtime, listens for messages from the plugin ui manager.
*/
-window.addEventListener( "message", function ( event: MessageEvent ) {
- if ( event.data.type.startsWith( "system:" ) ) {
- if ( event.data.type === "system:ready" ) {
+window.addEventListener("message", function (event: MessageEvent) {
+ if (event.data.type.startsWith("system:")) {
+ if (event.data.type === "system:ready") {
const payload = event.data.payload as SystemReadyMessage;
- useStore.setState( payload.initialStore );
+ useStore.setState(payload.initialStore);
- updateDimensionsCss( payload.initialStore.dimensions );
+ updateDimensionsCss(payload.initialStore.dimensions);
- Object.assign( assets, payload.assets );
+ Object.assign(assets, payload.assets);
- Object.assign( enums, event.data.payload.enums );
+ Object.assign(enums, event.data.payload.enums);
- event.data.payload.plugins.forEach( _addPlugin );
- ReactDOM.render( , document.body );
- } else if ( event.data.type === "system:plugins-enabled" ) {
- event.data.payload.forEach( _addPlugin );
- } else if ( event.data.type === "system:plugin-disabled" ) {
- _removePlugin( event.data.payload as string );
- } else if ( event.data.type === "system:plugin-config-changed" ) {
- useConfig.setState( {
+ event.data.payload.plugins.forEach(_addPlugin);
+ ReactDOM.render( , document.body);
+ } else if (event.data.type === "system:plugins-enabled") {
+ event.data.payload.forEach(_addPlugin);
+ } else if (event.data.type === "system:plugin-disabled") {
+ _removePlugin(event.data.payload as string);
+ } else if (event.data.type === "system:plugin-config-changed") {
+ useConfig.setState({
[event.data.payload.pluginId]: event.data.payload.config as object,
- } );
- } else if ( event.data.type === "system:mouse-click" ) {
+ });
+ } else if (event.data.type === "system:mouse-click") {
const { clientX, clientY, button, shiftKey, ctrlKey } = event.data
.payload as MouseEvent;
- const element = document.elementFromPoint( clientX, clientY )!;
- ReactTestUtils.Simulate.click( element, {
+ const element = document.elementFromPoint(clientX, clientY)!;
+ ReactTestUtils.Simulate.click(element, {
button,
shiftKey,
ctrlKey,
clientX,
clientY,
- } );
- } else if ( event.data.type === "system:custom-message" ) {
+ });
+ } else if (event.data.type === "system:custom-message") {
const { message, pluginId } = event.data.payload as {
message: object;
pluginId: string;
};
const plugin = _plugins[pluginId];
- if ( plugin ) {
- const event = new CustomEvent( "message", { detail: message } );
- plugin.messageHandler.dispatchEvent( event );
+ if (plugin) {
+ const event = new CustomEvent("message", { detail: message });
+ plugin.messageHandler.dispatchEvent(event);
}
}
} else {
- if ( event.data.type === "dimensions" ) {
- updateDimensionsCss( event.data.payload as MinimapDimensions );
+ if (event.data.type === "dimensions") {
+ updateDimensionsCss(event.data.payload as MinimapDimensions);
}
- useStore.setState( { [event.data.type]: event.data.payload as unknown } );
+ useStore.setState({ [event.data.type]: event.data.payload as unknown });
}
-} );
+});
-ReactDOM.render( , document.body );
+ReactDOM.render( , document.body);
// const canvas = document.createElement("canvas");
// const offscreen = canvas.transferControlToOffscreen();
diff --git a/src/scenes/game-scene/game-scene.tsx b/src/scenes/game-scene/game-scene.tsx
index 97e36ff1..b7fe5836 100644
--- a/src/scenes/game-scene/game-scene.tsx
+++ b/src/scenes/game-scene/game-scene.tsx
@@ -1,29 +1,45 @@
import { globalEvents } from "@core/global-events";
import { useEffect, useState } from "react";
import { InGameMenuScene } from "./ingame-menu-scene";
+import VRButtonReact from "@render/vr/vr-button-react";
+import { renderComposer } from "@render/index";
+import { Welcome } from "./welcome";
+
+
export const GameScene = () => {
const [gameMenu, setGameMenu] = useState(false);
+ const [showWelcome, setShowWelcome] = useState(
+ localStorage.getItem("hideWelcome") !== "true"
+ );
useEffect(() => {
const off = globalEvents.on("replay-complete", async () => {
setGameMenu(true);
});
- const evtListener = ( evt: KeyboardEvent ) => {
- if ( evt.key === "Escape" && document.pointerLockElement === null ) {
+ const evtListener = (evt: KeyboardEvent) => {
+ if (evt.key === "Escape" && document.pointerLockElement === null) {
setGameMenu(!gameMenu);
}
};
- window.addEventListener( "keydown", evtListener );
+ window.addEventListener("keydown", evtListener);
return () => {
off();
- window.removeEventListener( "keydown", evtListener );
- }
-
+ window.removeEventListener("keydown", evtListener);
+ };
}, []);
- return <>{gameMenu && setGameMenu(false)} />}>;
+ return (
+ <>
+ {gameMenu && setGameMenu(false)} />}
+ {showWelcome && {
+ setShowWelcome(false);
+ localStorage.setItem("hideWelcome", "true");
+ }} />}
+
+ >
+ );
};
diff --git a/src/scenes/game-scene/help.tsx b/src/scenes/game-scene/help.tsx
new file mode 100644
index 00000000..6cb3cd23
--- /dev/null
+++ b/src/scenes/game-scene/help.tsx
@@ -0,0 +1,74 @@
+import { HotkeyTrigger, HotkeyTriggerDTO } from "@macros/hotkey-trigger";
+import { useMacroStore } from "@stores/settings-store";
+import { TriggerType } from "common/types";
+
+type HelpProps = {
+ onClose: () => void;
+};
+export const Help = ({ onClose }: HelpProps) => {
+ const macros = useMacroStore((store) => store.macros.macros).filter(
+ (macro) => macro.enabled && macro.trigger.type === TriggerType.Hotkey
+ );
+
+ return (
+
+ {
+ evt.preventDefault();
+ evt.stopPropagation();
+ onClose();
+ }}>
+ Back
+
+ Help
+
+ Visit{" "}
+
+ blacksheepwall.tv
+ {" "}
+ for more information.
+
+
+
+
+ Key
+ Macro
+ Description
+
+ {macros.map((macro) => {
+ const trigger = HotkeyTrigger.deserialize(
+ macro.trigger.value as HotkeyTriggerDTO
+ );
+ return (
+
+ {trigger.stringify()}
+ {macro.name}
+ {macro.description}
+
+ );
+ })}
+
+
+
+ );
+};
diff --git a/src/scenes/game-scene/ingame-menu-scene.tsx b/src/scenes/game-scene/ingame-menu-scene.tsx
index 356cad89..6b812de6 100644
--- a/src/scenes/game-scene/ingame-menu-scene.tsx
+++ b/src/scenes/game-scene/ingame-menu-scene.tsx
@@ -3,14 +3,17 @@ import { useReplayAndMapStore } from "@stores/replay-and-map-store";
import sceneStore from "@stores/scene-store";
import { HomeScene } from "../../scenes/home-scene";
import { InGameMenuButton } from "./ingame-menu-button";
+import VRButtonReact from "@render/vr/vr-button-react";
+import { renderComposer } from "@render/index";
+import { useState } from "react";
+import { Help } from "./help";
-
-export const InGameMenuScene = ({ onClose }: { onClose: () => void }) => {
- const queued = useReplayAndMapStore( ( store ) => store.getNextReplay() );
+export const InGameMenuScene = ({ onClose }: { onClose: () => void }) => {
+ const [showHelp, setShowHelp] = useState(false);
+ const queued = useReplayAndMapStore((store) => store.getNextReplay());
return (
Hierarchy