Documentation ¶
Index ¶
- Constants
- func GetFloat32(b []byte, offset int, n int) float32
- type Destination
- type GoneUsersMessage
- type LockSuccess
- type Message
- func (m *Message) Allocate(len int)
- func (m *Message) AsFlatBufferMessage() *api.FlatBuffMsg
- func (m *Message) AsLockSuccess() *LockSuccess
- func (m *Message) AsRelayToController() *RelayToController
- func (m *Message) AsSendPos() []byte
- func (m *Message) AsSetObjectLockState() *SetObjectLockState
- func (m *Message) AsSetStaticObjectPosition() *SetStaticObjectPosition
- func (m *Message) AsSignal() *SwitchWorld
- func (m *Message) AsSwitchWorld() *SwitchWorld
- func (m *Message) AsTeleportRequest() *TeleportRequest
- func (m *Message) AsTriggerInteraction() *TriggerInteraction
- func (m *Message) Buf() []byte
- func (m *Message) Msg() []byte
- func (m *Message) Type() MsgType
- func (m *Message) WebsocketMessage() *websocket.PreparedMessage
- type MsgType
- type Notification
- type RelayToController
- type RelayToReact
- type RelayToUnity
- type RemoveStaticObjects
- type SendPosition
- type SetObjectLockState
- type SetStaticObjectPosition
- type Signal
- type SignalMessage
- type SimpleNotification
- type SwitchWorld
- type TeleportRequest
- type Trigger
- type TriggerInteraction
- type TriggerTransitionalBridgingEffectsOnObject
- type TriggerTransitionalBridgingEffectsOnPosition
- type TriggerTransitionalEffectsOnObject
- type TriggerTransitionalEffectsOnPosition
- type UserPositionsMessage
Constants ¶
View Source
const ( MsgTypeSize = 4 MsgArrTypeSize = 4 MsgUUIDTypeSize = 16 MsgOnePosSize = 4 MsgLockStateSize = 4 )
View Source
const ( TriggerNone = iota TriggerWow TriggerHighFive TriggerEnteredObject TriggerLeftObject TriggerStake )
View Source
const GoneUsersElementSize = MsgUUIDTypeSize
View Source
const LockSuccessMessageSize = MsgUUIDTypeSize + MsgLockStateSize
View Source
const RemoveStaticObjectsElementSize = MsgUUIDTypeSize
View Source
const SetObjectLockStateMessageSize = MsgUUIDTypeSize + MsgLockStateSize
View Source
const StaticObjectPositionMessageSize = MsgUUIDTypeSize + MsgOnePosSize*9
View Source
const TriggerTransitionalBridgingEffectsOnObjectElementSize = 3*MsgUUIDTypeSize + MsgTypeSize
View Source
const TriggerTransitionalBridgingEffectsOnPositionElementSize = MsgUUIDTypeSize + 6*MsgOnePosSize + MsgTypeSize
View Source
const TriggerTransitionalEffectsOnObjectElementSize = 2*MsgUUIDTypeSize + MsgTypeSize
View Source
const TriggerTransitionalEffectsOnPositionElementSize = MsgUUIDTypeSize + 3*MsgOnePosSize + MsgTypeSize
View Source
const UserPositionsMessageSize = MsgUUIDTypeSize + MsgOnePosSize*6
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Destination ¶
type Destination byte
const ( DestinationUnity Destination = 0b01 DestinationReact Destination = 0b10 DestinationBoth Destination = 0b11 )
type GoneUsersMessage ¶
type GoneUsersMessage struct {
*Message
}
func NewGoneUsersMsg ¶
func NewGoneUsersMsg(numUsers int) *GoneUsersMessage
type LockSuccess ¶ added in v0.1.21
type LockSuccess struct {
*Message
}
func NewLockSuccess ¶ added in v0.1.21
func NewLockSuccess(id uuid.UUID, state uint32) *LockSuccess
func (*LockSuccess) ObjectID ¶ added in v0.1.21
func (m *LockSuccess) ObjectID() uuid.UUID
func (*LockSuccess) SetLockState ¶ added in v0.1.21
func (m *LockSuccess) SetLockState(id uuid.UUID, state uint32)
func (*LockSuccess) State ¶ added in v0.1.21
func (m *LockSuccess) State() uint32
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func MsgFromBytes ¶
func NewMessage ¶
func (*Message) AsFlatBufferMessage ¶
func (m *Message) AsFlatBufferMessage() *api.FlatBuffMsg
func (*Message) AsLockSuccess ¶ added in v0.1.21
func (m *Message) AsLockSuccess() *LockSuccess
func (*Message) AsRelayToController ¶ added in v0.1.4
func (m *Message) AsRelayToController() *RelayToController
func (*Message) AsSetObjectLockState ¶ added in v0.1.19
func (m *Message) AsSetObjectLockState() *SetObjectLockState
func (*Message) AsSetStaticObjectPosition ¶ added in v0.1.8
func (m *Message) AsSetStaticObjectPosition() *SetStaticObjectPosition
func (*Message) AsSignal ¶
func (m *Message) AsSignal() *SwitchWorld
func (*Message) AsSwitchWorld ¶
func (m *Message) AsSwitchWorld() *SwitchWorld
func (*Message) AsTeleportRequest ¶ added in v0.1.22
func (m *Message) AsTeleportRequest() *TeleportRequest
func (*Message) AsTriggerInteraction ¶
func (m *Message) AsTriggerInteraction() *TriggerInteraction
func (*Message) WebsocketMessage ¶
func (m *Message) WebsocketMessage() *websocket.PreparedMessage
type MsgType ¶
type MsgType uint32
const ( MsgTypeNONE MsgType = 0x00000000 MsgTypeFlatBufferMessage MsgType = 0x49a0b0b9 MsgTypeUsersPositions MsgType = 0x1FE5B46F // 535147631 (uint32) MsgTypeSendPosition MsgType = 0xfbf6b89f MsgTypeRemoveStaticObjects MsgType = 0x06383502 MsgTypeSetStaticObjectPosition MsgType = 0x300A3883 MsgTypeTriggerTransitionalEffectsOnObject MsgType = 0xE0A9E0A7 MsgTypeTriggerTransitionalEffectsOnPosition MsgType = 0x3597729E MsgTypeTriggerTransitionalBridgingEffectsOnObject MsgType = 0xE45A7B03 MsgTypeTriggerTransitionalBridgingEffectsOnPosition MsgType = 0xF6AB754D MsgTypeSignal MsgType = 0x6A8634A3 MsgTypeSwitchWorld MsgType = 0x7D40FD67 MsgTriggerInteraction MsgType = 0x2C0A16A0 MsgTypeGoneUsers MsgType = 0x3327c20c MsgTypeSimpleNotification MsgType = 0x3CADFD52 MsgTypeNotificationSingleID MsgType = 0x91D2F62B MsgTypeNotificationDualID MsgType = 0xC66E8C60 MsgTypeRelayToReact MsgType = 0xB5BBCFA2 MsgTypeRelayToUnity MsgType = 0xC04DDA1B MsgTypeRelayToController MsgType = 0x768F25E2 MsgTypeSetObjectLockState MsgType = 0xF72C4630 MsgTypeLockSuccess MsgType = 0x78DA55D9 MsgTypeTeleportRequest MsgType = 0x78DA55D9 )
can use fmt.Sprintf("%x", int) to display hex
type Notification ¶
type Notification uint32
const ( NotificationNone Notification = 0 NotificationWow Notification = 1 NotificationHighFive Notification = 2 NotificationStageModeAccept Notification = 10 NotificationStageModeInvitation Notification = 11 NotificationStageModeSet Notification = 12 NotificationStageModeStageJoin Notification = 13 NotificationStageModeStageRequest Notification = 14 NotificationStageModeStageDeclined Notification = 15 NotificationTextMessage Notification = 500 NotificationRelay Notification = 501 NotificationGeneric Notification = 999 NotificationLegacy Notification = 1000 )
type RelayToController ¶ added in v0.1.4
type RelayToController struct {
*Message
}
func (*RelayToController) Data ¶ added in v0.1.4
func (m *RelayToController) Data() []byte
func (*RelayToController) Topic ¶ added in v0.1.4
func (m *RelayToController) Topic() string
type RelayToReact ¶
type RelayToReact struct {
*Message
}
func NewRelayToReactMsg ¶
func NewRelayToReactMsg(module string, message []byte) *RelayToReact
type RelayToUnity ¶ added in v0.1.4
type RelayToUnity struct {
*Message
}
func NewRelayToUnityMsg ¶ added in v0.1.4
func NewRelayToUnityMsg(topic string, message []byte) *RelayToUnity
type RemoveStaticObjects ¶
type RemoveStaticObjects struct {
*Message
}
func NewRemoveStaticObjectsMsg ¶
func NewRemoveStaticObjectsMsg(numObjects int) *RemoveStaticObjects
type SendPosition ¶
type SendPosition struct {
*Message
}
func NewSendPositionMsg ¶
func (*SendPosition) SetPosition ¶
type SetObjectLockState ¶ added in v0.1.19
type SetObjectLockState struct {
*Message
}
func NewSetObjectLockState ¶ added in v0.1.19
func NewSetObjectLockState(id uuid.UUID, state uint32) *SetObjectLockState
func (*SetObjectLockState) ObjectID ¶ added in v0.1.19
func (m *SetObjectLockState) ObjectID() uuid.UUID
func (*SetObjectLockState) SetLockState ¶ added in v0.1.19
func (m *SetObjectLockState) SetLockState(id uuid.UUID, state uint32)
func (*SetObjectLockState) State ¶ added in v0.1.19
func (m *SetObjectLockState) State() uint32
type SetStaticObjectPosition ¶
type SetStaticObjectPosition struct {
*Message
}
func NewSetStaticObjectPositionMsg ¶
func NewSetStaticObjectPositionMsg(id uuid.UUID, pos cmath.ObjectPosition) *SetStaticObjectPosition
func (*SetStaticObjectPosition) ObjectID ¶ added in v0.1.8
func (m *SetStaticObjectPosition) ObjectID() uuid.UUID
func (*SetStaticObjectPosition) Position ¶ added in v0.1.8
func (m *SetStaticObjectPosition) Position() cmath.ObjectPosition
func (*SetStaticObjectPosition) SetPosition ¶
func (m *SetStaticObjectPosition) SetPosition(id uuid.UUID, pos cmath.ObjectPosition)
type SignalMessage ¶
type SignalMessage struct {
*Message
}
func NewSignalMsg ¶
func NewSignalMsg(signal Signal) *SignalMessage
type SimpleNotification ¶
type SimpleNotification struct {
*Message
}
func NewSimpleNotificationMsg ¶
func NewSimpleNotificationMsg(dest Destination, kind Notification, flag int32, s string) *SimpleNotification
type SwitchWorld ¶
type SwitchWorld struct {
*Message
}
func NewSwitchWorldMsg ¶
func NewSwitchWorldMsg(id uuid.UUID) *SwitchWorld
func (*SwitchWorld) Signal ¶
func (m *SwitchWorld) Signal() Signal
func (*SwitchWorld) World ¶
func (m *SwitchWorld) World() uuid.UUID
type TeleportRequest ¶ added in v0.1.22
type TeleportRequest struct {
*Message
}
func NewTeleportRequest ¶ added in v0.1.22
func NewTeleportRequest(id uuid.UUID, url string) *TeleportRequest
func (*TeleportRequest) URL ¶ added in v0.1.22
func (m *TeleportRequest) URL() string
func (*TeleportRequest) WorldID ¶ added in v0.1.22
func (m *TeleportRequest) WorldID() uuid.UUID
type TriggerInteraction ¶
type TriggerInteraction struct {
*Message
}
func NewTriggerInteractionMsg ¶ added in v0.1.2
func (*TriggerInteraction) Flag ¶
func (m *TriggerInteraction) Flag() int32
func (*TriggerInteraction) Kind ¶
func (m *TriggerInteraction) Kind() uint32
func (*TriggerInteraction) Label ¶
func (m *TriggerInteraction) Label() string
func (*TriggerInteraction) Target ¶
func (m *TriggerInteraction) Target() uuid.UUID
type TriggerTransitionalBridgingEffectsOnObject ¶
type TriggerTransitionalBridgingEffectsOnObject struct {
*Message
}
func NewTriggerTransitionalBridgingEffectsOnObjectMsg ¶
func NewTriggerTransitionalBridgingEffectsOnObjectMsg(numEffects int) *TriggerTransitionalBridgingEffectsOnObject
type TriggerTransitionalBridgingEffectsOnPosition ¶
type TriggerTransitionalBridgingEffectsOnPosition struct {
*Message
}
func NewTriggerTransitionalBridgingEffectsOnPositionMsg ¶
func NewTriggerTransitionalBridgingEffectsOnPositionMsg(numEffects int) *TriggerTransitionalBridgingEffectsOnPosition
type TriggerTransitionalEffectsOnObject ¶
type TriggerTransitionalEffectsOnObject struct {
*Message
}
func NewTriggerTransitionalEffectsOnObjectMsg ¶
func NewTriggerTransitionalEffectsOnObjectMsg(numEffects int) *TriggerTransitionalEffectsOnObject
type TriggerTransitionalEffectsOnPosition ¶
type TriggerTransitionalEffectsOnPosition struct {
*Message
}
func NewTriggerTransitionalEffectsOnPositionMsg ¶
func NewTriggerTransitionalEffectsOnPositionMsg(numEffects int) *TriggerTransitionalEffectsOnPosition
type UserPositionsMessage ¶
type UserPositionsMessage struct {
*Message
}
func NewUserPositionsMsg ¶
func NewUserPositionsMsg(numUsers int) *UserPositionsMessage
func (*UserPositionsMessage) SetPosition ¶
func (m *UserPositionsMessage) SetPosition(i int, data []byte)
Source Files ¶
- gone_user.go
- lock_success.go
- message.go
- relay_to_controller.go
- relay_to_react.go
- relay_to_unity.go
- remove_static_objects.go
- send_position.go
- set_object_lock_state.go
- set_static_object_position.go
- signal.go
- simple_notification.go
- switch_world.go
- teleport_request.go
- trigger_interaction.go
- trigger_transitional_bridging_effects_on_object.go
- trigger_transitional_bridging_effects_on_position.go
- trigger_transitional_effects_on_object.go
- trigger_transitional_effects_on_position.go
- user_position.go
Click to show internal directories.
Click to hide internal directories.